Skip to content

Commit c27d8f4

Browse files
authored
Merge pull request #110 from ducflair/dev
Dev
2 parents e68850b + b5bfed3 commit c27d8f4

236 files changed

Lines changed: 20084 additions & 40777 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.documentation/SchemaUpdates.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
these are the files you must change from the duc repo of the @scopture-monolith/scopture-monolith.code-workspace :
2+
3+
on the typescript side:
4+
@duc/packages/ducjs/src/types/index.ts
5+
@duc/packages/ducjs/src/restore/restoreDataState.ts (and other potential restore files related)
6+
@duc/packages/ducjs/src/parse.ts
7+
@duc/packages/ducjs/src/serialize.ts
8+
9+
on the rust side:
10+
@duc/packages/ducrs/src/types.rs
11+
@duc/packages/ducrs/src/parse.rs
12+
@duc/packages/ducrs/src/serialize.rs
13+
14+
on the python side:
15+
@duc/packages/ducpy/src/ducpy/classes/DataStateClass.py
16+
@duc/packages/ducpy/src/ducpy/parse.py
17+
@duc/packages/ducpy/src/ducpy/serialize.py
18+
19+
And then run the build (or test commands if available) for each from @duc/package.json
20+
21+
and in case you need to check the fbs schema: @duc/schema/duc.fbs
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# In .github/actions/simulate-main-environment/action.yml
2+
3+
name: 'Setup Release Environment'
4+
description: 'Determines release mode and simulates the main branch for dry runs.'
5+
6+
inputs:
7+
current-branch:
8+
description: 'The current branch name (e.g., dev, main)'
9+
required: true
10+
package-name:
11+
description: 'Name of the package being released (for logging)'
12+
required: true
13+
14+
outputs:
15+
release-mode:
16+
description: 'The release mode (--dry-run or --ci)'
17+
value: ${{ steps.setup-and-determine-mode.outputs.mode }}
18+
19+
runs:
20+
using: 'composite'
21+
steps:
22+
- name: Setup Environment and Determine Mode
23+
id: setup-and-determine-mode
24+
shell: bash
25+
run: |
26+
if [ "${{ inputs.current-branch }}" = "dev" ]; then
27+
# This is the DRY-RUN path
28+
echo "Running DRY-RUN for ${{ inputs.package-name }}: simulating dev→main merge"
29+
30+
# 0. Stash any uncommitted changes
31+
git stash
32+
33+
# 1. Simulate the main branch environment
34+
git fetch origin main --tags
35+
git fetch origin dev
36+
git checkout main
37+
git merge origin/dev --no-edit
38+
echo "✅ Simulation complete. Now on a temporary 'main' branch with 'dev' changes."
39+
40+
# 2. Set the output mode
41+
echo "mode=--dry-run" >> $GITHUB_OUTPUT
42+
else
43+
# This is the PRODUCTION path
44+
echo "Running PRODUCTION mode for ${{ inputs.package-name }} on ${{ inputs.current-branch }} branch"
45+
46+
# Set the output mode
47+
echo "mode=--ci" >> $GITHUB_OUTPUT
48+
fi

.github/workflows/release-ducjs.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
with:
3535
bun-version: "latest"
3636
- name: Install deps
37-
run: bun install --frozen-lockfile
37+
run: bun install
3838

3939
- name: Build
4040
run: bun ducjs:build
@@ -46,19 +46,16 @@ jobs:
4646
env:
4747
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4848

49-
- name: Determine release mode
50-
id: release-mode
51-
run: |
52-
if [ "${{ github.ref_name }}" = "dev" ]; then
53-
echo "mode=--dry-run" >> $GITHUB_OUTPUT
54-
echo "Running in DRY-RUN mode on dev branch"
55-
else
56-
echo "mode=--ci" >> $GITHUB_OUTPUT
57-
echo "Running in PRODUCTION mode on ${{ github.ref_name }} branch"
58-
fi
49+
- name: Setup release environment
50+
id: setup-release-environment
51+
uses: ./.github/actions/simulate-main-environment
52+
with:
53+
current-branch: ${{ github.ref_name }}
54+
package-name: ducjs
55+
5956
- name: Release
6057
env:
6158
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6259
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
6360
working-directory: ./packages/ducjs
64-
run: npx semantic-release ${{ steps.release-mode.outputs.mode }}
61+
run: npx semantic-release ${{ steps.setup-release-environment.outputs.release-mode }}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release ducpdf
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main, next, dev]
7+
paths:
8+
- 'packages/ducpdf/**'
9+
- 'package.json'
10+
11+
permissions:
12+
contents: write
13+
issues: write
14+
pull-requests: write
15+
16+
jobs:
17+
release_ducpdf:
18+
runs-on: ubuntu-latest
19+
concurrency:
20+
group: release-ducpdf
21+
cancel-in-progress: false
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
ref: ${{ github.ref_name }}
27+
persist-credentials: true
28+
- name: Set Git User
29+
run: |
30+
git config user.name "GitHub Action"
31+
git config user.email "action@github.com"
32+
- name: Setup Bun
33+
uses: oven-sh/setup-bun@v2
34+
with:
35+
bun-version: "latest"
36+
- name: Install deps
37+
run: bun install
38+
- name: Build
39+
run: bun ducpdf:build
40+
41+
- name: Prepare workspace dependencies for publish
42+
run: node scripts/fix-workspace-deps.mjs packages/ducpdf/package.json
43+
44+
- name: Configure npm auth for publish
45+
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
46+
env:
47+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
49+
- name: Setup release environment
50+
id: setup-release-environment
51+
uses: ./.github/actions/simulate-main-environment
52+
with:
53+
current-branch: ${{ github.ref_name }}
54+
package-name: ducpdf
55+
56+
- name: Release ducpdf package
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
60+
# DEBUG: "semantic-release:*" # For verbose logging
61+
working-directory: ./packages/ducpdf
62+
run: npx semantic-release ${{ steps.setup-release-environment.outputs.release-mode }}
63+
64+
- name: Release duc2pdf crate
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
68+
working-directory: ./packages/ducpdf/src/duc2pdf
69+
run: npx semantic-release

.github/workflows/release-ducpy.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,20 @@ jobs:
5353
with:
5454
enable-cache: true
5555

56-
- name: Determine release mode
57-
id: release-mode
58-
run: |
59-
if [ "${{ github.ref_name }}" = "dev" ]; then
60-
echo "mode=--dry-run" >> $GITHUB_OUTPUT
61-
echo "Running in DRY-RUN mode on dev branch"
62-
else
63-
echo "mode=--ci" >> $GITHUB_OUTPUT
64-
echo "Running in PRODUCTION mode on ${{ github.ref_name }} branch"
65-
fi
56+
- name: Setup release environment
57+
id: setup-release-environment
58+
uses: ./.github/actions/simulate-main-environment
59+
with:
60+
current-branch: ${{ github.ref_name }}
61+
package-name: ducpy
6662

6763
- name: Release
6864
id: release
6965
env:
7066
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7167
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
7268
run: |
73-
if bunx semantic-release ${{ steps.release-mode.outputs.mode }}; then
69+
if bunx semantic-release ${{ steps.setup-release-environment.outputs.release-mode }}; then
7470
echo "status=success" >> $GITHUB_OUTPUT
7571
else
7672
echo "status=failure" >> $GITHUB_OUTPUT

.github/workflows/release-ducrs.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,16 @@ jobs:
4848
- name: Install cargo-edit
4949
run: cargo install cargo-edit
5050

51-
- name: Determine release mode
52-
id: release-mode
53-
run: |
54-
if [ "${{ github.ref_name }}" = "dev" ]; then
55-
echo "mode=--dry-run" >> $GITHUB_OUTPUT
56-
echo "Running in DRY-RUN mode on dev branch"
57-
else
58-
echo "mode=--ci" >> $GITHUB_OUTPUT
59-
echo "Running in PRODUCTION mode on ${{ github.ref_name }} branch"
60-
fi
51+
- name: Setup release environment
52+
id: setup-release-environment
53+
uses: ./.github/actions/simulate-main-environment
54+
with:
55+
current-branch: ${{ github.ref_name }}
56+
package-name: ducrs
6157

6258
- name: Release
6359
env:
6460
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6561
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
66-
run: npx semantic-release ${{ steps.release-mode.outputs.mode }}
62+
run: npx semantic-release ${{ steps.setup-release-environment.outputs.release-mode }}
6763
working-directory: ./packages/ducrs

.github/workflows/release-ducsvg.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
with:
3535
bun-version: "latest"
3636
- name: Install deps
37-
run: bun install --frozen-lockfile
37+
run: bun install
3838
- name: Build
3939
run: bun ducsvg:build
4040

@@ -45,21 +45,18 @@ jobs:
4545
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
4646
env:
4747
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48-
- name: Determine release mode
49-
id: release-mode
50-
run: |
51-
if [ "${{ github.ref_name }}" = "dev" ]; then
52-
echo "mode=--dry-run" >> $GITHUB_OUTPUT
53-
echo "Running in DRY-RUN mode on dev branch"
54-
else
55-
echo "mode=--ci" >> $GITHUB_OUTPUT
56-
echo "Running in PRODUCTION mode on ${{ github.ref_name }} branch"
57-
fi
48+
49+
- name: Setup release environment
50+
id: setup-release-environment
51+
uses: ./.github/actions/simulate-main-environment
52+
with:
53+
current-branch: ${{ github.ref_name }}
54+
package-name: ducsvg
5855

5956
- name: Release
6057
env:
6158
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6259
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
6360
# DEBUG: "semantic-release:*" # For verbose logging
6461
working-directory: ./packages/ducsvg
65-
run: npx semantic-release ${{ steps.release-mode.outputs.mode }}
62+
run: npx semantic-release ${{ steps.setup-release-environment.outputs.release-mode }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ sst.pyi
3333
.open-next
3434

3535
# flatc
36-
build_logs
36+
build_logs
37+
38+
.claude

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"editor.tabSize": 2,
66
"editor.detectIndentation": false,
77
"rust-analyzer.linkedProjects": [
8-
"packages/ducrs/Cargo.toml"
8+
"packages/ducrs/Cargo.toml",
9+
"packages/ducpdf/src/duc2pdf/Cargo.toml"
910
],
1011
"rust-analyzer.files.exclude": [
1112
"packages/ducrs/src/duc_generated.rs"

apps/web/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"scripts": {
77
"build": "next build",
88
"dev": "next dev --turbo",
9-
"start": "next start",
10-
"postinstall": "fumadocs-mdx"
9+
"start": "next start"
1110
}
1211
}

0 commit comments

Comments
 (0)