@smoothbricks/cli 0.10.2 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +31 -23
  2. package/dist/bun/preload.d.ts +13 -0
  3. package/dist/bun/preload.d.ts.map +1 -0
  4. package/dist/bun/preload.js +12 -0
  5. package/dist/cli.js +36 -4
  6. package/dist/generate/index.d.ts.map +1 -1
  7. package/dist/generate/index.js +0 -6
  8. package/dist/github-ci/index.d.ts +17 -2
  9. package/dist/github-ci/index.d.ts.map +1 -1
  10. package/dist/github-ci/index.js +192 -26
  11. package/dist/github-ci/outputs.d.ts +22 -0
  12. package/dist/github-ci/outputs.d.ts.map +1 -0
  13. package/dist/github-ci/outputs.js +648 -0
  14. package/dist/lib/cli-package.js +2 -2
  15. package/dist/lib/json.d.ts +118 -11
  16. package/dist/lib/json.d.ts.map +1 -1
  17. package/dist/lib/json.js +317 -29
  18. package/dist/lib/workspace.d.ts +7 -14
  19. package/dist/lib/workspace.d.ts.map +1 -1
  20. package/dist/lib/workspace.js +76 -82
  21. package/dist/monorepo/ci-workflow.d.ts +2 -0
  22. package/dist/monorepo/ci-workflow.d.ts.map +1 -1
  23. package/dist/monorepo/ci-workflow.js +28 -2
  24. package/dist/monorepo/git-config.js +2 -2
  25. package/dist/monorepo/index.d.ts +3 -1
  26. package/dist/monorepo/index.d.ts.map +1 -1
  27. package/dist/monorepo/index.js +6 -2
  28. package/dist/monorepo/lockfile.d.ts +13 -1
  29. package/dist/monorepo/lockfile.d.ts.map +1 -1
  30. package/dist/monorepo/lockfile.js +33 -21
  31. package/dist/monorepo/managed-files.d.ts +12 -0
  32. package/dist/monorepo/managed-files.d.ts.map +1 -1
  33. package/dist/monorepo/managed-files.js +86 -28
  34. package/dist/monorepo/package-policy.d.ts.map +1 -1
  35. package/dist/monorepo/package-policy.js +78 -45
  36. package/dist/monorepo/packed-manifest.d.ts +5 -2
  37. package/dist/monorepo/packed-manifest.d.ts.map +1 -1
  38. package/dist/monorepo/packed-manifest.js +16 -47
  39. package/dist/monorepo/packed-package.d.ts.map +1 -1
  40. package/dist/monorepo/packed-package.js +28 -16
  41. package/dist/monorepo/packs/index.d.ts +3 -0
  42. package/dist/monorepo/packs/index.d.ts.map +1 -1
  43. package/dist/monorepo/packs/index.js +18 -6
  44. package/dist/monorepo/publish-workflow.d.ts +1 -0
  45. package/dist/monorepo/publish-workflow.d.ts.map +1 -1
  46. package/dist/monorepo/publish-workflow.js +242 -3
  47. package/dist/monorepo/runtime.d.ts +15 -0
  48. package/dist/monorepo/runtime.d.ts.map +1 -1
  49. package/dist/monorepo/runtime.js +66 -12
  50. package/dist/monorepo/tool-validation.d.ts.map +1 -1
  51. package/dist/monorepo/tool-validation.js +32 -23
  52. package/dist/monorepo/wrangler.d.ts.map +1 -1
  53. package/dist/monorepo/wrangler.js +13 -13
  54. package/dist/nx/index.d.ts +12 -4
  55. package/dist/nx/index.d.ts.map +1 -1
  56. package/dist/nx/index.js +86 -19
  57. package/dist/pr/index.d.ts.map +1 -1
  58. package/dist/pr/index.js +28 -32
  59. package/dist/release/candidates.d.ts +3 -2
  60. package/dist/release/candidates.d.ts.map +1 -1
  61. package/dist/release/candidates.js +4 -5
  62. package/dist/release/github-release.d.ts +3 -0
  63. package/dist/release/github-release.d.ts.map +1 -1
  64. package/dist/release/github-release.js +11 -0
  65. package/dist/release/index.d.ts +20 -1
  66. package/dist/release/index.d.ts.map +1 -1
  67. package/dist/release/index.js +221 -89
  68. package/dist/release/orchestration.d.ts +8 -1
  69. package/dist/release/orchestration.d.ts.map +1 -1
  70. package/dist/release/orchestration.js +38 -1
  71. package/dist/wrangler/prepare-env.d.ts +0 -1
  72. package/dist/wrangler/prepare-env.d.ts.map +1 -1
  73. package/dist/wrangler/prepare-env.js +100 -51
  74. package/dist/wrangler/scaffold.d.ts.map +1 -1
  75. package/dist/wrangler/scaffold.js +12 -12
  76. package/managed/raw/git-format-staged.yml +19 -1
  77. package/managed/raw/tooling/direnv/github-actions-bootstrap.sh +6 -0
  78. package/managed/raw/tooling/direnv/merge-newer-pins.sh +3 -3
  79. package/managed/raw/tooling/direnv/setup-environment.ts +187 -19
  80. package/managed/raw/tooling/git-hooks/pre-commit.sh +0 -6
  81. package/managed/templates/github/actions/cache-nix-devenv/action.yml +12 -10
  82. package/managed/templates/github/actions/cache-node-modules/action.yml +6 -2
  83. package/managed/templates/github/actions/cache-nx/action.yml +2 -2
  84. package/managed/templates/github/actions/cache-ttsc-plugins/action.yml +19 -0
  85. package/managed/templates/github/actions/save-nix-devenv/action.yml +11 -3
  86. package/managed/templates/github/actions/setup-devenv/action.yml +5 -0
  87. package/managed/templates/github/workflows/managed-files.yml +80 -0
  88. package/package.json +18 -4
  89. package/src/bun/preload.ts +12 -0
  90. package/src/cli.ts +49 -11
  91. package/src/generate/index.ts +0 -6
  92. package/src/github-ci/index.test.ts +486 -0
  93. package/src/github-ci/index.ts +220 -30
  94. package/src/github-ci/outputs.ts +505 -0
  95. package/src/lib/cli-package.ts +2 -2
  96. package/src/lib/json.ts +291 -32
  97. package/src/lib/workspace.ts +88 -100
  98. package/src/monorepo/__tests__/ci-workflow.test.ts +14 -3
  99. package/src/monorepo/__tests__/publish-workflow.test.ts +222 -1
  100. package/src/monorepo/ci-workflow.ts +28 -2
  101. package/src/monorepo/git-config.ts +2 -2
  102. package/src/monorepo/index.ts +6 -2
  103. package/src/monorepo/lockfile.test.ts +35 -36
  104. package/src/monorepo/lockfile.ts +48 -24
  105. package/src/monorepo/managed-files.test.ts +63 -0
  106. package/src/monorepo/managed-files.ts +94 -34
  107. package/src/monorepo/package-policy.test.ts +70 -51
  108. package/src/monorepo/package-policy.ts +104 -59
  109. package/src/monorepo/packed-manifest.ts +18 -52
  110. package/src/monorepo/packed-package.ts +43 -22
  111. package/src/monorepo/packs/index.test.ts +18 -1
  112. package/src/monorepo/packs/index.ts +20 -7
  113. package/src/monorepo/publish-workflow.ts +482 -3
  114. package/src/monorepo/runtime.test.ts +42 -3
  115. package/src/monorepo/runtime.ts +90 -12
  116. package/src/monorepo/tool-validation.ts +35 -25
  117. package/src/monorepo/wrangler.test.ts +11 -15
  118. package/src/monorepo/wrangler.ts +15 -15
  119. package/src/nx/index.test.ts +43 -0
  120. package/src/nx/index.ts +110 -23
  121. package/src/pr/index.ts +42 -36
  122. package/src/release/__tests__/candidates.test.ts +5 -4
  123. package/src/release/__tests__/fixture-repo.test.ts +18 -16
  124. package/src/release/__tests__/github-release.test.ts +11 -0
  125. package/src/release/__tests__/orchestration.test.ts +57 -2
  126. package/src/release/__tests__/trust-publisher.test.ts +98 -2
  127. package/src/release/candidates.ts +10 -17
  128. package/src/release/github-release.ts +12 -0
  129. package/src/release/index.ts +321 -112
  130. package/src/release/orchestration.ts +55 -3
  131. package/src/wrangler/prepare-env.ts +75 -54
  132. package/src/wrangler/scaffold.test.ts +9 -12
  133. package/src/wrangler/scaffold.ts +13 -13
@@ -33,10 +33,10 @@ runs:
33
33
  ~/.local/state/nix/profiles
34
34
  ~/.cache/nix
35
35
  key:
36
- ${{ runner.os }}-nix-v3-${{ hashFiles('tooling/direnv/devenv.yaml', 'tooling/direnv/devenv.nix',
37
- 'tooling/direnv/devenv.lock') }}
36
+ ${{ runner.os }}-${{ runner.arch }}-nix-v3-${{ hashFiles('tooling/direnv/devenv.yaml',
37
+ 'tooling/direnv/devenv.nix', 'tooling/direnv/devenv.lock') }}
38
38
  restore-keys: |
39
- ${{ runner.os }}-nix-v3-
39
+ ${{ runner.os }}-${{ runner.arch }}-nix-v3-
40
40
 
41
41
  - name: Save Nix profiles and store NAR
42
42
  if: ${{ inputs.segment == 'nix' && inputs.mode == 'save' }}
@@ -48,8 +48,8 @@ runs:
48
48
  ~/.local/state/nix/profiles
49
49
  ~/.cache/nix
50
50
  key:
51
- ${{ runner.os }}-nix-v3-${{ hashFiles('tooling/direnv/devenv.yaml', 'tooling/direnv/devenv.nix',
52
- 'tooling/direnv/devenv.lock') }}
51
+ ${{ runner.os }}-${{ runner.arch }}-nix-v3-${{ hashFiles('tooling/direnv/devenv.yaml',
52
+ 'tooling/direnv/devenv.nix', 'tooling/direnv/devenv.lock') }}
53
53
 
54
54
  # .devenv/.direnv are small, but they contain absolute /nix/store pointers.
55
55
  # Workflows restore this segment only after an exact Nix cache hit.
@@ -62,10 +62,11 @@ runs:
62
62
  ${{ github.workspace }}/tooling/direnv/.devenv
63
63
  ${{ github.workspace }}/tooling/direnv/.direnv
64
64
  key:
65
- ${{ runner.os }}-devenv-v3-${{ hashFiles('tooling/direnv/devenv.yaml', 'tooling/direnv/devenv.nix',
66
- 'tooling/direnv/devenv.lock', 'tooling/direnv/envrc.sh', 'tooling/direnv/setup-environment.ts') }}
65
+ ${{ runner.os }}-${{ runner.arch }}-devenv-v3-${{ hashFiles('tooling/direnv/devenv.yaml',
66
+ 'tooling/direnv/devenv.nix', 'tooling/direnv/devenv.lock', 'tooling/direnv/envrc.sh',
67
+ 'tooling/direnv/setup-environment.ts') }}
67
68
  restore-keys: |
68
- ${{ runner.os }}-devenv-v3-
69
+ ${{ runner.os }}-${{ runner.arch }}-devenv-v3-
69
70
 
70
71
  - name: Save devenv and direnv state
71
72
  if: ${{ inputs.segment == 'devenv' && inputs.mode == 'save' }}
@@ -75,5 +76,6 @@ runs:
75
76
  ${{ github.workspace }}/tooling/direnv/.devenv
76
77
  ${{ github.workspace }}/tooling/direnv/.direnv
77
78
  key:
78
- ${{ runner.os }}-devenv-v3-${{ hashFiles('tooling/direnv/devenv.yaml', 'tooling/direnv/devenv.nix',
79
- 'tooling/direnv/devenv.lock', 'tooling/direnv/envrc.sh', 'tooling/direnv/setup-environment.ts') }}
79
+ ${{ runner.os }}-${{ runner.arch }}-devenv-v3-${{ hashFiles('tooling/direnv/devenv.yaml',
80
+ 'tooling/direnv/devenv.nix', 'tooling/direnv/devenv.lock', 'tooling/direnv/envrc.sh',
81
+ 'tooling/direnv/setup-environment.ts') }}
@@ -7,7 +7,11 @@ runs:
7
7
  - name: Cache node_modules
8
8
  uses: actions/cache@v5.0.5
9
9
  with:
10
+ # Dependencies only. ttsc plugin/GOCACHE live under $TTSC_CACHE_DIR
11
+ # (.cache/ttsc), not inside node_modules.
12
+ # v2 isolates restore-keys from older Darwin caches with a broken TS dual-package hoist.
10
13
  path: node_modules
11
- key: ${{ runner.os }}-node-{{NODE_MODULES_CACHE_KEY}}
14
+ # prettier-ignore
15
+ key: ${{ runner.os }}-${{ runner.arch }}-node-v2-{{NODE_MODULES_CACHE_KEY}}
12
16
  restore-keys: |
13
- ${{ runner.os }}-node-
17
+ ${{ runner.os }}-${{ runner.arch }}-node-v2-
@@ -16,6 +16,6 @@ runs:
16
16
  path: |
17
17
  .nx/cache
18
18
  .nx/workspace-data/*.db*
19
- key: ${{ runner.os }}-nx-db-v1-${{ github.sha }}
19
+ key: ${{ runner.os }}-${{ runner.arch }}-nx-db-v1-${{ github.sha }}
20
20
  restore-keys: |
21
- ${{ runner.os }}-nx-db-v1-
21
+ ${{ runner.os }}-${{ runner.arch }}-nx-db-v1-
@@ -0,0 +1,19 @@
1
+ name: Cache ttsc plugins
2
+ description: >
3
+ Restore/save compiled ttsc native plugin binaries (typia, etc.). These are content-keyed under TTSC_CACHE_DIR/plugins
4
+ and skip the multi-minute `go build` when the cache key matches. The Go object cache (go-build/) is NOT cached — it is
5
+ multi-GB and only helps when the plugin key misses.
6
+
7
+ runs:
8
+ using: composite
9
+ steps:
10
+ - name: Cache ttsc plugin binaries
11
+ uses: actions/cache@v5.0.5
12
+ with:
13
+ # Only the compiled plugin binaries (~30MB each). Path is relative to the
14
+ # workspace; devenv sets TTSC_CACHE_DIR to <repo>/.cache/ttsc.
15
+ path: .cache/ttsc/plugins
16
+ # prettier-ignore
17
+ key: ${{ runner.os }}-${{ runner.arch }}-ttsc-plugins-v1-${{ hashFiles('bun.lock', 'package.json', 'patches/ttsc@*.patch', 'tooling/direnv/devenv.lock') }}
18
+ restore-keys: |
19
+ ${{ runner.os }}-${{ runner.arch }}-ttsc-plugins-v1-
@@ -14,13 +14,21 @@ inputs:
14
14
  runs:
15
15
  using: composite
16
16
  steps:
17
- - name: 🧹 Cleanup and cache Nix store
17
+ - name: 🧹 Prepare Nix/devenv cache save
18
18
  id: cleanup-cache
19
19
  shell: bash
20
20
  working-directory: tooling/direnv
21
- # build-shell normally adds repo paths to GITHUB_PATH, but this cleanup
22
- # must still run when build-shell fails before that happens.
21
+ env:
22
+ NIX_CACHE_HIT: ${{ inputs.nix-cache-hit }}
23
+ # An exact Nix cache hit is immutable and cannot be overwritten by
24
+ # actions/cache. Avoid rebuilding its ~2 GB NAR just to discard it.
25
+ # build-shell normally adds repo paths to GITHUB_PATH, but cleanup must
26
+ # still run after a cache miss when build-shell fails before that happens.
23
27
  run: |
28
+ if [[ "$NIX_CACHE_HIT" == 'true' ]]; then
29
+ echo 'cache-ready=true' >> "$GITHUB_OUTPUT"
30
+ exit 0
31
+ fi
24
32
  export PATH="$(../../tooling/direnv/repo-path)"
25
33
  smoo github-ci cleanup-cache
26
34
 
@@ -51,6 +51,11 @@ runs:
51
51
  - name: 📦 Cache node_modules
52
52
  uses: ./.github/actions/cache-node-modules
53
53
 
54
+ # Restores compiled ttsc native plugins into .cache/ttsc/plugins. TTSC_CACHE_DIR
55
+ # is set by devenv enterShell (+ bootstrap GITHUB_ENV for later steps).
56
+ - name: 🧊 Cache ttsc plugins
57
+ uses: ./.github/actions/cache-ttsc-plugins
58
+
54
59
  - name: 🐚 Build devenv shell
55
60
  shell: bash
56
61
  working-directory: tooling/direnv
@@ -0,0 +1,80 @@
1
+ # Managed by @smoothbricks/cli (smoo monorepo update) - do not edit by hand.
2
+ #
3
+ # Self-healing loop for smoo-managed files: ci.yml runs the authoritative
4
+ # `smoo monorepo check` on every default-branch push (devenv is already up
5
+ # there, so the check is ~free) and dispatches THIS workflow only when real
6
+ # drift exists - typically after a @smoothbricks/cli pin bump. It runs
7
+ # `smoo monorepo update` and pushes the result to ONE persistent review branch
8
+ # (chore/managed-files) with ONE PR. The PR is NEVER auto-merged: a template
9
+ # change is upstream code that deserves a human look before it lands. Re-runs
10
+ # refresh the same branch in place.
11
+ #
12
+ # NOTE: managed files include .github/workflows/*, and the default GITHUB_TOKEN
13
+ # is server-side forbidden to push workflow-file changes. Configure a GitHub App
14
+ # or PAT token with contents:write + workflows:write as MANAGED_FILES_TOKEN;
15
+ # without it, runs that touch workflow files fail at push with a clear error.
16
+ name: Managed files
17
+
18
+ on:
19
+ workflow_dispatch:
20
+
21
+ permissions:
22
+ contents: write
23
+ pull-requests: write
24
+
25
+ concurrency:
26
+ group: managed-files
27
+ cancel-in-progress: true
28
+
29
+ defaults:
30
+ run:
31
+ working-directory: tooling/direnv
32
+
33
+ jobs:
34
+ update:
35
+ runs-on: ubuntu-latest
36
+ timeout-minutes: 30
37
+ steps:
38
+ - name: 📥 Checkout
39
+ uses: actions/checkout@v6.0.2
40
+ with:
41
+ filter: blob:none
42
+ fetch-depth: 0
43
+ persist-credentials: true
44
+ token: ${{ secrets.MANAGED_FILES_TOKEN || github.token }}
45
+
46
+ - name: 🧱 Setup Nix/devenv
47
+ id: setup
48
+ uses: ./.github/actions/setup-devenv
49
+
50
+ - name: 🔄 Regenerate managed files
51
+ run: smoo monorepo update
52
+
53
+ - name: 📤 Push review branch and open PR
54
+ env:
55
+ GH_TOKEN: ${{ secrets.MANAGED_FILES_TOKEN || github.token }}
56
+ run: |
57
+ cd "$(git rev-parse --show-toplevel)"
58
+ if [ -z "$(git status --porcelain)" ]; then
59
+ echo "Managed files are in sync; nothing to do."
60
+ exit 0
61
+ fi
62
+ git config user.name "github-actions[bot]"
63
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
64
+ git switch -C chore/managed-files
65
+ git add -A
66
+ git commit -m "chore: regenerate smoo-managed files"
67
+ git push --force origin chore/managed-files
68
+ gh pr create \
69
+ --head chore/managed-files \
70
+ --base "${GITHUB_REF_NAME}" \
71
+ --title "chore: regenerate smoo-managed files" \
72
+ --body "Automated refresh of smoo-managed files after drift (usually a @smoothbricks/cli pin bump). One persistent PR; re-runs force-push this branch in place. Review the template changes - do NOT enable auto-merge." \
73
+ 2>/dev/null || echo "PR already open; branch refreshed in place."
74
+
75
+ - name: 🧹 Cleanup and cache Nix/devenv
76
+ if: ${{ always() }}
77
+ uses: ./.github/actions/save-nix-devenv
78
+ with:
79
+ nix-cache-hit: ${{ steps.setup.outputs.nix-cache-hit }}
80
+ devenv-cache-hit: ${{ steps.setup.outputs.devenv-cache-hit }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smoothbricks/cli",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "type": "module",
5
5
  "description": "SmoothBricks monorepo automation CLI",
6
6
  "bin": {
@@ -20,6 +20,13 @@
20
20
  "import": "./dist/index.js",
21
21
  "default": "./dist/index.js"
22
22
  },
23
+ "./bun/preload": {
24
+ "types": "./dist/bun/preload.d.ts",
25
+ "bun": "./src/bun/preload.ts",
26
+ "development": "./src/bun/preload.ts",
27
+ "import": "./dist/bun/preload.js",
28
+ "default": "./dist/bun/preload.js"
29
+ },
23
30
  "./monorepo/runtime": {
24
31
  "types": "./dist/monorepo/runtime.d.ts",
25
32
  "bun": "./src/monorepo/runtime.ts",
@@ -42,6 +49,10 @@
42
49
  "default": "./dist/wrangler/prepare-env.js"
43
50
  }
44
51
  },
52
+ "sideEffects": [
53
+ "./dist/bun/preload.js",
54
+ "./src/bun/preload.ts"
55
+ ],
45
56
  "files": [
46
57
  "README.md",
47
58
  "bin",
@@ -52,14 +63,17 @@
52
63
  ],
53
64
  "dependencies": {
54
65
  "@arethetypeswrong/core": "^0.18.2",
55
- "@smoothbricks/nx-plugin": "0.3.1",
56
- "@smoothbricks/validation": "0.1.2",
66
+ "@prettier/sync": "^0.6.1",
67
+ "@smoothbricks/nx-plugin": "0.3.3",
68
+ "@smoothbricks/validation": "0.1.4",
57
69
  "commander": "^14.0.3",
70
+ "prettier": "^3.6.1",
58
71
  "publint": "^0.3.18",
59
72
  "semver": "^7.7.4",
60
73
  "sherif": "^1.11.1",
61
74
  "toml-eslint-parser": "^1.0.3",
62
- "tslib": "^2.8.1"
75
+ "tslib": "^2.8.1",
76
+ "typia": "13.1.19"
63
77
  },
64
78
  "devDependencies": {
65
79
  "fast-check": "^4.4.0"
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Bun runtime preload for consumers of `@smoothbricks/cli`.
3
+ *
4
+ * Re-exports the Typia/ttsc transform preload from `@smoothbricks/validation`.
5
+ * External repos depend on the CLI package only — they must not need a direct
6
+ * `@smoothbricks/validation` dependency just to run `smoo` against source.
7
+ *
8
+ * Usage:
9
+ * import '@smoothbricks/cli/bun/preload';
10
+ * // or bunfig.toml: preload = ["@smoothbricks/cli/bun/preload"]
11
+ */
12
+ import '@smoothbricks/validation/bun/preload';
package/src/cli.ts CHANGED
@@ -61,10 +61,13 @@ function buildProgram(): Command {
61
61
  const { updateManagedFiles } = await import('./monorepo/index.js');
62
62
  updateManagedFiles(await findRepoRoot());
63
63
  });
64
- monorepo.command('check').action(async () => {
65
- const { checkManagedFiles } = await import('./monorepo/index.js');
66
- checkManagedFiles(await findRepoRoot());
67
- });
64
+ monorepo
65
+ .command('check')
66
+ .option('--warn', 'report drift as warnings (GitHub annotations) instead of failing')
67
+ .action(async (options: { warn?: boolean }) => {
68
+ const { checkManagedFiles } = await import('./monorepo/index.js');
69
+ checkManagedFiles(await findRepoRoot(), { warn: options.warn });
70
+ });
68
71
  monorepo.command('diff').action(async () => {
69
72
  const { diffManagedFiles } = await import('./monorepo/index.js');
70
73
  diffManagedFiles(await findRepoRoot());
@@ -78,10 +81,19 @@ function buildProgram(): Command {
78
81
  });
79
82
  monorepo
80
83
  .command('sync-bun-lockfile-versions')
81
- .option('--stage', 'stage bun.lock when versions were resynced (pre-commit self-heal); quiet when clean')
82
- .action(async (options: { stage?: boolean }) => {
84
+ .option('--stage', 'stage bun.lock when versions were resynced; quiet when clean')
85
+ .option(
86
+ '--mode <mode>',
87
+ 'install: match package.json (CI); publish: map unpublished -next to last stable tag (pre-pack)',
88
+ 'publish',
89
+ )
90
+ .action(async (options: { stage?: boolean; mode?: 'install' | 'publish' }) => {
83
91
  const { syncBunLockfileVersions } = await import('./monorepo/index.js');
84
- syncBunLockfileVersions(await findRepoRoot(), options.stage ? { log: false, stage: true } : {});
92
+ const mode = options.mode === 'install' ? 'install' : 'publish';
93
+ syncBunLockfileVersions(await findRepoRoot(), {
94
+ mode,
95
+ ...(options.stage ? { log: false, stage: true } : {}),
96
+ });
85
97
  });
86
98
  monorepo
87
99
  .command('list-release-packages')
@@ -147,10 +159,25 @@ function buildProgram(): Command {
147
159
  .command('repair-pending')
148
160
  .description('Repair incomplete older release commits before releasing the current HEAD')
149
161
  .option('--dry-run [dryRun]', 'run without pushing, publishing, or writing GitHub Releases')
150
- .action(async (options: { dryRun?: string | boolean }) => {
162
+ .option('--ref <ref>', 'fixed release graph ref to inspect')
163
+ .option('--platform-outputs <path>', 'cross-platform repair outputs grouped by release SHA')
164
+ .action(async (options: { dryRun?: string | boolean; platformOutputs?: string; ref?: string }) => {
165
+ // The source self-hosting shim has no Typia transform; release commands import transformed output validators.
151
166
  const { releaseRepairPending } = await import('./release/index.js');
152
167
  await releaseRepairPending(await findRepoRoot(), { ...options, dryRun: booleanOption(options.dryRun) });
153
168
  });
169
+ release
170
+ .command('build-platform-outputs')
171
+ .description('Build selected current and pending-release platform outputs')
172
+ .requiredOption('--bump <bump>', 'auto, patch, minor, major, or prerelease')
173
+ .requiredOption('--targets <targets>', 'comma-separated Nx platform target names or globs')
174
+ .requiredOption('--output <path>', 'output directory for current and repair artifacts')
175
+ .option('--ref <ref>', 'fixed release graph ref to inspect')
176
+ .action(async (options: { bump: string; output: string; ref?: string; targets: string }) => {
177
+ // The source self-hosting shim has no Typia transform; release commands import transformed output validators.
178
+ const { releaseCollectPlatformOutputs } = await import('./release/index.js');
179
+ await releaseCollectPlatformOutputs(await findRepoRoot(), options);
180
+ });
154
181
  release
155
182
  .command('version')
156
183
  .option('--bump <bump>', 'auto, patch, minor, major, or prerelease', 'auto')
@@ -322,9 +349,20 @@ function buildProgram(): Command {
322
349
  .requiredOption('--targets <targets>')
323
350
  .option('--projects <projects>')
324
351
  .option('--configuration <configuration>')
325
- .action(async (options: { targets: string; projects?: string; configuration?: string }) => {
326
- const { githubCiNxRunMany } = await import('./github-ci/index.js');
327
- await githubCiNxRunMany(await findRepoRoot(), options);
352
+ .option('--collect-outputs <directory>')
353
+ .action(
354
+ async (options: { targets: string; projects?: string; configuration?: string; collectOutputs?: string }) => {
355
+ const { githubCiNxRunMany } = await import('./github-ci/index.js');
356
+ await githubCiNxRunMany(await findRepoRoot(), options);
357
+ },
358
+ );
359
+ githubCi
360
+ .command('apply-outputs <directories...>')
361
+ .requiredOption('--source-sha <sha>', 'expected source commit SHA')
362
+ .action(async (directories: string[], options: { sourceSha: string }) => {
363
+ // GitHub CI commands stay lazy so source self-hosting can initialize Typia only at manifest boundaries.
364
+ const { githubCiApplyOutputs } = await import('./github-ci/index.js');
365
+ await githubCiApplyOutputs(await findRepoRoot(), directories, options.sourceSha);
328
366
  });
329
367
  githubCi
330
368
  .command('nx-deploy')
@@ -42,12 +42,6 @@ export const variants: Record<string, GenerateVariant> = {
42
42
  args: (name) => ['--name', name, '--variant', 'ts-lib'],
43
43
  options: [{ flag: '--public', description: 'configure for npm publication' }],
44
44
  },
45
- 'ts-zig': {
46
- generator: 'create-package',
47
- description: 'Create a TypeScript + Zig/WASM hybrid package',
48
- args: (name) => ['--name', name, '--variant', 'ts-zig'],
49
- options: [{ flag: '--public', description: 'configure for npm publication' }],
50
- },
51
45
  'make-public': {
52
46
  generator: 'make-public',
53
47
  description: 'Promote a private package to npm publication',