@ykdz/template 0.0.35 → 0.0.37
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.
- package/dist/application.d.ts +131 -14
- package/dist/application.js +307 -206
- package/dist/command-result.d.ts +9 -0
- package/dist/command-result.js +231 -0
- package/dist/main.d.ts +4 -1
- package/dist/main.js +321 -49
- package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.d.ts +159 -45
- package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.js +2816 -535
- package/node_modules/@ykdz/template-builtin-presets/dist/src/generation-record.d.ts +39 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/generation-record.js +178 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/index.d.ts +2 -2
- package/node_modules/@ykdz/template-builtin-presets/dist/src/index.js +1 -1
- package/node_modules/@ykdz/template-builtin-presets/dist/src/rust-bin/definition.d.ts +31 -2
- package/node_modules/@ykdz/template-builtin-presets/dist/src/rust-bin/definition.js +44 -47
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/development-container.d.ts +1 -1
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/development-container.js +1 -1
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/typescript.d.ts +10 -7
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/typescript.js +11 -7
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.d.ts +6 -4
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.js +8 -7
- package/node_modules/@ykdz/template-builtin-presets/dist/src/template-sources.d.ts +1 -1
- package/node_modules/@ykdz/template-builtin-presets/dist/src/template-sources.js +1 -1
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-cli/definition.d.ts +31 -2
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-cli/definition.js +111 -64
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-lib/definition.d.ts +31 -2
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-lib/definition.js +37 -29
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vike-app/definition.d.ts +48 -2
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vike-app/definition.js +203 -155
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-app/definition.d.ts +26 -2
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-app/definition.js +21 -9
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-hono-app/definition.d.ts +22 -2
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-hono-app/definition.js +48 -38
- package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/bin/semver.js +0 -0
- package/node_modules/{valibot → @ykdz/template-builtin-presets/node_modules/valibot}/README.md +1 -1
- package/node_modules/{valibot → @ykdz/template-builtin-presets/node_modules/valibot}/dist/index.cjs +427 -504
- package/node_modules/{valibot → @ykdz/template-builtin-presets/node_modules/valibot}/dist/index.d.cts +427 -32
- package/node_modules/{valibot → @ykdz/template-builtin-presets/node_modules/valibot}/dist/index.d.mts +427 -32
- package/node_modules/@ykdz/template-builtin-presets/node_modules/valibot/dist/index.min.cjs +2 -0
- package/node_modules/@ykdz/template-builtin-presets/node_modules/valibot/dist/index.min.mjs +2 -0
- package/node_modules/{valibot → @ykdz/template-builtin-presets/node_modules/valibot}/dist/index.mjs +418 -504
- package/node_modules/{valibot → @ykdz/template-builtin-presets/node_modules/valibot}/package.json +7 -2
- package/node_modules/@ykdz/template-builtin-presets/package.json +30 -16
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check-deployment-diagnostics.yml +5 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check-deployment.yml +4 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check-diagnostics.yml +4 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check.yml +3 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.pnpmfile.mjs +19 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/AGENTS.md.template +11 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/devcontainer.json +1 -2
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.dynamic.txt +1 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.yaml +5 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/check-toolchain-versions.ts +556 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/tsconfig.json +4 -6
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/tsconfig.packing-hook.json +7 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo.json +1 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/turbo.json +19 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/devcontainer/node-pnpm.Dockerfile +4 -6
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/oxc/tsconfig.config.json +2 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.app.json +1 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.node.json +2 -2
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/CHANGELOG.md.template +17 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/RELEASING.md +17 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/artifact.ts +1271 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/changelog.ts +283 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/check-artifact.ts +99 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/check-readiness.ts +66 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/cli-command-identity.ts +4 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/handoff.ts +450 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/publish.ts +483 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/readiness.ts +1146 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/release.ts +819 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/release.yml +119 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/root-tsconfig.json +8 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/tsconfig.json +4 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/turbo.json +6 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/README.md +48 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/assets/CHANGELOG.md.template +17 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/assets/LICENSE-APACHE-2.0.txt +202 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/assets/LICENSE-MIT.txt +21 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/assets/README.md.template +5 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/bridge.ts +3336 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/setup.sh +221 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/cli-command-identity.ts +133 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/cli.ts +4 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/main.ts +5 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/integration/command.test.ts +14 -13
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/unit/cli-command-identity.test.ts +76 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/tsconfig.build.json +2 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/tsconfig.json +2 -2
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/tsconfig.build.json +2 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/tsconfig.json +2 -2
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/scripts/reset.ts +3 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/src/db.ts +3 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/src/readiness.ts +6 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/src/storage.ts +93 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/tsconfig.build.json +8 -2
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/tsconfig.json +3 -7
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/turbo.json +1 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/drizzle.config.ts +5 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/tsconfig.build.json +2 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/tsconfig.json +2 -2
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/.env.example +2 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/Dockerfile +25 -17
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/Dockerfile.dockerignore +4 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/playwright.config.ts +5 -25
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/scripts/check-standalone-deployment.ts +17 -15
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/test/playwright-teardown.ts +6 -7
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.app.json +1 -2
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.json +0 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.node.json +2 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.test.json +0 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/turbo.json +0 -8
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/vite.config.ts +3 -39
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/tsconfig.json +7 -2
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/root/playwright.config.ts +34 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/{web → root}/test/e2e/app.spec.ts +3 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/root/test/e2e/fixtures.ts +15 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/root/tsconfig.json +3 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/src/api.ts +1 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/turbo.json +0 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/vite.config.ts +2 -0
- package/node_modules/@ykdz/template-core/dist/ci-diagnostic-artifact.d.ts +2 -2
- package/node_modules/@ykdz/template-core/dist/ci-diagnostic-artifact.js +10 -5
- package/node_modules/@ykdz/template-core/dist/module-graph.d.ts +16 -54
- package/node_modules/@ykdz/template-core/dist/module-graph.js +140 -105
- package/node_modules/@ykdz/template-core/dist/package-contribution.d.ts +47 -11
- package/node_modules/@ykdz/template-core/dist/package-contribution.js +92 -0
- package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +21 -16
- package/node_modules/@ykdz/template-core/dist/preset-definition.d.ts +82 -13
- package/node_modules/@ykdz/template-core/dist/preset-definition.js +16 -1
- package/node_modules/@ykdz/template-core/dist/project-blueprint.d.ts +56 -0
- package/node_modules/@ykdz/template-core/dist/project-blueprint.js +271 -0
- package/node_modules/@ykdz/template-core/dist/project-github.d.ts +6 -4
- package/node_modules/@ykdz/template-core/dist/project-github.js +4 -4
- package/node_modules/@ykdz/template-core/dist/project-linking-v2.d.ts +4 -4
- package/node_modules/@ykdz/template-core/dist/project-linking-v2.js +14 -8
- package/node_modules/@ykdz/template-core/dist/project-projection.d.ts +29 -1
- package/node_modules/@ykdz/template-core/dist/project-projection.js +501 -29
- package/node_modules/@ykdz/template-core/dist/release-toolchain-snapshot.d.ts +10 -0
- package/node_modules/@ykdz/template-core/dist/release-toolchain-snapshot.js +9 -0
- package/node_modules/@ykdz/template-core/dist/renderer.d.ts +0 -2
- package/node_modules/@ykdz/template-core/dist/renderer.js +17 -38
- package/node_modules/@ykdz/template-core/dist/template-boundary-check.d.ts +2 -2
- package/node_modules/@ykdz/template-core/dist/template-boundary-check.js +21 -9
- package/node_modules/@ykdz/template-core/node_modules/valibot/LICENSE.md +9 -0
- package/node_modules/@ykdz/template-core/node_modules/valibot/README.md +94 -0
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.cjs +7897 -0
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.d.cts +16579 -0
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.d.mts +16579 -0
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.min.cjs +2 -0
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.min.mjs +2 -0
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.mjs +7577 -0
- package/node_modules/@ykdz/template-core/node_modules/valibot/package.json +84 -0
- package/node_modules/@ykdz/template-core/package.json +0 -2
- package/node_modules/hosted-git-info/LICENSE +13 -0
- package/node_modules/hosted-git-info/README.md +138 -0
- package/node_modules/hosted-git-info/lib/from-url.js +122 -0
- package/node_modules/hosted-git-info/lib/hosts.js +229 -0
- package/node_modules/hosted-git-info/lib/index.js +227 -0
- package/node_modules/hosted-git-info/lib/parse-url.js +79 -0
- package/node_modules/hosted-git-info/package.json +57 -0
- package/node_modules/jsonc-parser/CHANGELOG.md +76 -0
- package/node_modules/jsonc-parser/LICENSE.md +21 -0
- package/node_modules/jsonc-parser/README.md +364 -0
- package/node_modules/jsonc-parser/SECURITY.md +41 -0
- package/node_modules/jsonc-parser/lib/esm/impl/edit.js +185 -0
- package/node_modules/jsonc-parser/lib/esm/impl/format.js +261 -0
- package/node_modules/jsonc-parser/lib/esm/impl/parser.js +659 -0
- package/node_modules/jsonc-parser/lib/esm/impl/scanner.js +443 -0
- package/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +29 -0
- package/node_modules/jsonc-parser/lib/esm/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/esm/main.js +178 -0
- package/node_modules/jsonc-parser/lib/umd/impl/edit.js +201 -0
- package/node_modules/jsonc-parser/lib/umd/impl/format.js +275 -0
- package/node_modules/jsonc-parser/lib/umd/impl/parser.js +682 -0
- package/node_modules/jsonc-parser/lib/umd/impl/scanner.js +456 -0
- package/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +42 -0
- package/node_modules/jsonc-parser/lib/umd/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/umd/main.js +194 -0
- package/node_modules/jsonc-parser/package.json +37 -0
- package/node_modules/lru-cache/LICENSE.md +55 -0
- package/node_modules/lru-cache/README.md +469 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.js +1733 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +7 -0
- package/node_modules/lru-cache/dist/commonjs/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/index.js +1733 -0
- package/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.js +1733 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/node_modules/lru-cache/dist/commonjs/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.js +7 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/index.js +1733 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
- package/node_modules/lru-cache/dist/esm/browser/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/index.js +1729 -0
- package/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/browser/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +1 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
- package/node_modules/lru-cache/dist/esm/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/index.js +1729 -0
- package/node_modules/lru-cache/dist/esm/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +6 -0
- package/node_modules/lru-cache/dist/esm/node/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/index.js +1729 -0
- package/node_modules/lru-cache/dist/esm/node/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/node/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/esm/node/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/node_modules/lru-cache/dist/esm/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.js +4 -0
- package/node_modules/lru-cache/dist/esm/react-native/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/esm/react-native/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/index.js +1729 -0
- package/node_modules/lru-cache/dist/esm/react-native/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/esm/react-native/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/react-native/perf.js.map +1 -0
- package/node_modules/lru-cache/package.json +180 -0
- package/node_modules/npm-package-arg/LICENSE +15 -0
- package/node_modules/npm-package-arg/README.md +104 -0
- package/node_modules/npm-package-arg/lib/npa.js +479 -0
- package/node_modules/npm-package-arg/node_modules/semver/LICENSE +15 -0
- package/node_modules/npm-package-arg/node_modules/semver/README.md +680 -0
- package/node_modules/npm-package-arg/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/npm-package-arg/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/npm-package-arg/node_modules/semver/classes/index.js +7 -0
- package/node_modules/npm-package-arg/node_modules/semver/classes/range.js +577 -0
- package/node_modules/npm-package-arg/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/major.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/npm-package-arg/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/npm-package-arg/node_modules/semver/index.js +93 -0
- package/node_modules/npm-package-arg/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/npm-package-arg/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/npm-package-arg/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/npm-package-arg/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/npm-package-arg/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/npm-package-arg/node_modules/semver/internal/re.js +223 -0
- package/node_modules/npm-package-arg/node_modules/semver/package.json +78 -0
- package/node_modules/npm-package-arg/node_modules/semver/preload.js +4 -0
- package/node_modules/npm-package-arg/node_modules/semver/range.bnf +17 -0
- package/node_modules/npm-package-arg/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/npm-package-arg/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/npm-package-arg/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/npm-package-arg/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/npm-package-arg/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/npm-package-arg/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/npm-package-arg/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/npm-package-arg/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/npm-package-arg/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/npm-package-arg/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/npm-package-arg/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/npm-package-arg/package.json +60 -0
- package/node_modules/picomatch/LICENSE +21 -0
- package/node_modules/picomatch/README.md +743 -0
- package/node_modules/picomatch/index.js +17 -0
- package/node_modules/picomatch/lib/constants.js +184 -0
- package/node_modules/picomatch/lib/parse.js +1425 -0
- package/node_modules/picomatch/lib/picomatch.js +361 -0
- package/node_modules/picomatch/lib/scan.js +403 -0
- package/node_modules/picomatch/lib/utils.js +72 -0
- package/node_modules/picomatch/package.json +83 -0
- package/node_modules/picomatch/posix.js +3 -0
- package/node_modules/proc-log/LICENSE +15 -0
- package/node_modules/proc-log/README.md +226 -0
- package/node_modules/proc-log/lib/index.js +158 -0
- package/node_modules/proc-log/package.json +46 -0
- package/node_modules/smol-toml/LICENSE +24 -0
- package/node_modules/smol-toml/README.md +605 -0
- package/node_modules/smol-toml/dist/date.d.ts +41 -0
- package/node_modules/smol-toml/dist/date.js +156 -0
- package/node_modules/smol-toml/dist/error.d.ts +37 -0
- package/node_modules/smol-toml/dist/error.js +67 -0
- package/node_modules/smol-toml/dist/extract.js +289 -0
- package/node_modules/smol-toml/dist/index.cjs +770 -0
- package/node_modules/smol-toml/dist/index.d.ts +44 -0
- package/node_modules/smol-toml/dist/index.js +34 -0
- package/node_modules/smol-toml/dist/parse.d.ts +73 -0
- package/node_modules/smol-toml/dist/parse.js +164 -0
- package/node_modules/smol-toml/dist/primitive.js +151 -0
- package/node_modules/smol-toml/dist/stringify.d.ts +32 -0
- package/node_modules/smol-toml/dist/stringify.js +219 -0
- package/node_modules/smol-toml/dist/struct.js +156 -0
- package/node_modules/smol-toml/dist/util.d.ts +43 -0
- package/node_modules/smol-toml/dist/util.js +57 -0
- package/node_modules/smol-toml/package.json +68 -0
- package/node_modules/typescript/bin/tsc +0 -0
- package/node_modules/typescript/bin/tsserver +0 -0
- package/node_modules/unbash/LICENSE +15 -0
- package/node_modules/unbash/README.md +289 -0
- package/node_modules/unbash/dist/ansi-c.d.ts +5 -0
- package/node_modules/unbash/dist/ansi-c.js +130 -0
- package/node_modules/unbash/dist/arithmetic.d.ts +11 -0
- package/node_modules/unbash/dist/arithmetic.js +530 -0
- package/node_modules/unbash/dist/assignment.d.ts +15 -0
- package/node_modules/unbash/dist/assignment.js +118 -0
- package/node_modules/unbash/dist/chars.d.ts +41 -0
- package/node_modules/unbash/dist/chars.js +41 -0
- package/node_modules/unbash/dist/command.d.ts +14 -0
- package/node_modules/unbash/dist/command.js +41 -0
- package/node_modules/unbash/dist/heredoc.d.ts +18 -0
- package/node_modules/unbash/dist/heredoc.js +25 -0
- package/node_modules/unbash/dist/internal-types.d.ts +87 -0
- package/node_modules/unbash/dist/internal-types.js +1 -0
- package/node_modules/unbash/dist/lexer.d.ts +202 -0
- package/node_modules/unbash/dist/lexer.js +3930 -0
- package/node_modules/unbash/dist/parser.d.ts +4 -0
- package/node_modules/unbash/dist/parser.js +1295 -0
- package/node_modules/unbash/dist/parts.d.ts +17 -0
- package/node_modules/unbash/dist/parts.js +82 -0
- package/node_modules/unbash/dist/printer.d.ts +2 -0
- package/node_modules/unbash/dist/printer.js +536 -0
- package/node_modules/unbash/dist/types.d.ts +494 -0
- package/node_modules/unbash/dist/types.js +1 -0
- package/node_modules/unbash/dist/word.d.ts +22 -0
- package/node_modules/unbash/dist/word.js +102 -0
- package/node_modules/unbash/package.json +80 -0
- package/node_modules/validate-npm-package-name/LICENSE +6 -0
- package/node_modules/validate-npm-package-name/README.md +120 -0
- package/node_modules/validate-npm-package-name/lib/builtin-modules.json +1 -0
- package/node_modules/validate-npm-package-name/lib/index.js +114 -0
- package/node_modules/validate-npm-package-name/package.json +59 -0
- package/node_modules/yaml/LICENSE +13 -0
- package/node_modules/yaml/README.md +172 -0
- package/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +226 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +118 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +975 -0
- package/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/yaml/browser/index.js +5 -0
- package/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/yaml/dist/cli.mjs +201 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/yaml/dist/compose/composer.js +224 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +228 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/Alias.js +120 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/yaml/dist/options.d.ts +350 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +723 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +980 -0
- package/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/yaml/package.json +97 -0
- package/node_modules/yaml/util.js +2 -0
- package/package.json +23 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/check-boundaries.ts +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/run-root-owned-task.ts +0 -69
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/test/global-setup.ts +0 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/vitest.config.ts +0 -7
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/playwright.config.ts +0 -90
- package/node_modules/@ykdz/template-core/dist/project-blueprint-v2.d.ts +0 -33
- package/node_modules/@ykdz/template-core/dist/project-blueprint-v2.js +0 -182
- package/node_modules/@ykdz/template-core/dist/toolchain-baseline-update.d.ts +0 -45
- package/node_modules/@ykdz/template-core/dist/toolchain-baseline-update.js +0 -27
- package/node_modules/@ykdz/template-core/dist/toolchain-resolution.d.ts +0 -35
- package/node_modules/@ykdz/template-core/dist/toolchain-resolution.js +0 -189
- package/node_modules/valibot/dist/index.min.cjs +0 -2
- package/node_modules/valibot/dist/index.min.mjs +0 -2
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/LICENSE +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/README.md +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/classes/comparator.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/classes/index.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/classes/range.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/classes/semver.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/clean.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/cmp.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/coerce.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/compare-build.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/compare-loose.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/compare.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/diff.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/eq.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/gt.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/gte.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/inc.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/lt.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/lte.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/major.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/minor.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/neq.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/parse.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/patch.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/prerelease.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/rcompare.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/rsort.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/satisfies.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/sort.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/truncate.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/functions/valid.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/index.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/internal/constants.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/internal/debug.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/internal/identifiers.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/internal/lrucache.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/internal/parse-options.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/internal/re.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/package.json +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/preload.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/range.bnf +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/ranges/gtr.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/ranges/intersects.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/ranges/ltr.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/ranges/max-satisfying.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/ranges/min-satisfying.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/ranges/min-version.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/ranges/outside.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/ranges/simplify.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/ranges/subset.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/ranges/to-comparators.js +0 -0
- /package/node_modules/{semver → @ykdz/template-builtin-presets/node_modules/semver}/ranges/valid.js +0 -0
- /package/node_modules/{valibot → @ykdz/template-builtin-presets/node_modules/valibot}/LICENSE.md +0 -0
- /package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/src/{types.d.ts → types.ts} +0 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import {} from "./application.js";
|
|
2
|
+
/** 纯投影;main 拥有身份前缀和实际流写入。 */
|
|
3
|
+
export function projectCommandResult(result, json, cliVersion) {
|
|
4
|
+
const exitCode = exitCodeFor(result);
|
|
5
|
+
if (json) {
|
|
6
|
+
return {
|
|
7
|
+
destination: "stdout",
|
|
8
|
+
text: `${JSON.stringify({ ...result, cliVersion })}\n`,
|
|
9
|
+
exitCode,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
destination: exitCode === 0 ? "stdout" : "stderr",
|
|
14
|
+
text: `${formatHuman(result)}\n`,
|
|
15
|
+
exitCode,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function exitCodeFor(result) {
|
|
19
|
+
if (result.command === "presets")
|
|
20
|
+
return 0;
|
|
21
|
+
if (result.command === "blueprint validate") {
|
|
22
|
+
return result.status === "success"
|
|
23
|
+
? 0
|
|
24
|
+
: result.status === "invalid"
|
|
25
|
+
? 1
|
|
26
|
+
: 65;
|
|
27
|
+
}
|
|
28
|
+
switch (result.status) {
|
|
29
|
+
case "success":
|
|
30
|
+
return 0;
|
|
31
|
+
case "conflict":
|
|
32
|
+
return 1;
|
|
33
|
+
case "cancelled":
|
|
34
|
+
return 2;
|
|
35
|
+
case "usage-error":
|
|
36
|
+
return 64;
|
|
37
|
+
case "operation-failure":
|
|
38
|
+
return 65;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function formatHuman(result) {
|
|
42
|
+
if (result.command === "presets")
|
|
43
|
+
return formatPresets(result);
|
|
44
|
+
if (result.command === "blueprint validate")
|
|
45
|
+
return formatBlueprint(result);
|
|
46
|
+
if (result.command === "init")
|
|
47
|
+
return formatInit(result);
|
|
48
|
+
return formatAddition(result);
|
|
49
|
+
}
|
|
50
|
+
function formatInit(result) {
|
|
51
|
+
switch (result.status) {
|
|
52
|
+
case "success":
|
|
53
|
+
return [
|
|
54
|
+
result.dryRun ? "项目生成预览" : "已初始化项目",
|
|
55
|
+
"",
|
|
56
|
+
...rows([
|
|
57
|
+
["预设", result.resolved.preset],
|
|
58
|
+
["名称", result.resolved.packages.map(({ name }) => name).join(", ")],
|
|
59
|
+
["路径", result.resolved.packages.map(({ path }) => path).join(", ")],
|
|
60
|
+
["Scope", result.resolved.scope],
|
|
61
|
+
["目标", result.targetDir],
|
|
62
|
+
]),
|
|
63
|
+
...(result.dryRun
|
|
64
|
+
? []
|
|
65
|
+
: [
|
|
66
|
+
"",
|
|
67
|
+
"下一步",
|
|
68
|
+
"",
|
|
69
|
+
...result.nextSteps.map((item, index) => ` ${index + 1}. ${item.display}`),
|
|
70
|
+
]),
|
|
71
|
+
...(result.publicationSetup === null
|
|
72
|
+
? []
|
|
73
|
+
: [
|
|
74
|
+
"",
|
|
75
|
+
"一次性 npm 发布设置",
|
|
76
|
+
"",
|
|
77
|
+
` ${result.publicationSetup.command}`,
|
|
78
|
+
]),
|
|
79
|
+
].join("\n");
|
|
80
|
+
case "cancelled":
|
|
81
|
+
return "已取消初始化;没有写入目标目录。";
|
|
82
|
+
case "usage-error":
|
|
83
|
+
return [
|
|
84
|
+
`错误 [${result.code}]: 初始化参数无效。`,
|
|
85
|
+
...result.issues.map((issue) => ` ${initIssueMessage(issue.code)}`),
|
|
86
|
+
"建议: 修正上述输入后重新运行初始化。",
|
|
87
|
+
].join("\n");
|
|
88
|
+
case "operation-failure":
|
|
89
|
+
return [
|
|
90
|
+
`错误 [${result.code}]: ${result.error.message}`,
|
|
91
|
+
`目标: ${result.targetDir}`,
|
|
92
|
+
`建议: ${result.error.suggestion}`,
|
|
93
|
+
].join("\n");
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function rows(items) {
|
|
97
|
+
const width = Math.max(...items.map(([label]) => `${label}:`.length));
|
|
98
|
+
return items.map(([label, value]) => ` ${`${label}:`.padEnd(width)} ${value}`);
|
|
99
|
+
}
|
|
100
|
+
function initIssueMessage(code) {
|
|
101
|
+
switch (code) {
|
|
102
|
+
case "PRESET_UNKNOWN":
|
|
103
|
+
return "--preset 必须指定一个已支持的内置预设。";
|
|
104
|
+
case "FIXED_TOPOLOGY_OVERRIDE":
|
|
105
|
+
return "该预设使用固定初始包拓扑,不能同时使用 --name 或 --path。";
|
|
106
|
+
case "INVALID_PACKAGE_NAME":
|
|
107
|
+
return "--name 必须是有效的无 scope 包叶名称。";
|
|
108
|
+
case "INVALID_PACKAGE_PATH":
|
|
109
|
+
return "--path 必须恰好包含两个安全路径段。";
|
|
110
|
+
case "RESERVED_PACKAGE_PATH":
|
|
111
|
+
return "--path 不能使用保留的工作区集合。";
|
|
112
|
+
case "INVALID_PACKAGE_SCOPE":
|
|
113
|
+
return "--scope 必须是不含空白字符的有效 npm scope。";
|
|
114
|
+
case "INVALID_REPOSITORY_SCOPE":
|
|
115
|
+
return "目标目录名不能作为默认包 scope;请传入有效的 --scope。";
|
|
116
|
+
case "CONFLICTING_PACKAGE_IDENTITY":
|
|
117
|
+
return "初始包身份不能与 Foundation 的 TypeScript 配置包冲突。";
|
|
118
|
+
case "NON_INTERACTIVE_CONFIRMATION_REQUIRED":
|
|
119
|
+
return "非交互式初始化必须显式传入 --yes 接受默认值。";
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function formatPresets(result) {
|
|
123
|
+
const width = Math.max(...result.presets.map((preset) => `${preset.name}:`.length));
|
|
124
|
+
return [
|
|
125
|
+
"内置预设",
|
|
126
|
+
"",
|
|
127
|
+
...result.presets.map((preset) => ` ${`${preset.name}:`.padEnd(width)} ${preset.title} - ${preset.description}`),
|
|
128
|
+
].join("\n");
|
|
129
|
+
}
|
|
130
|
+
function formatBlueprint(result) {
|
|
131
|
+
switch (result.status) {
|
|
132
|
+
case "success":
|
|
133
|
+
return "蓝图有效。";
|
|
134
|
+
case "invalid":
|
|
135
|
+
return [
|
|
136
|
+
`错误 [BLUEPRINT_INVALID]: 蓝图无效。`,
|
|
137
|
+
"",
|
|
138
|
+
...result.issues.map((issue) => ` ${issue.path}: 该位置的 Blueprint 定义不符合要求;请检查必填字段、数据类型和拓扑约束。`),
|
|
139
|
+
"",
|
|
140
|
+
"建议: 修正上述 Blueprint 问题后重新验证。",
|
|
141
|
+
].join("\n");
|
|
142
|
+
case "operation-failure":
|
|
143
|
+
return [
|
|
144
|
+
`错误 [${result.code}]: ${result.error.message}`,
|
|
145
|
+
`路径: ${result.path}`,
|
|
146
|
+
`建议: ${result.error.suggestion}`,
|
|
147
|
+
].join("\n");
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function formatAddition(result) {
|
|
151
|
+
switch (result.status) {
|
|
152
|
+
case "success":
|
|
153
|
+
return [
|
|
154
|
+
result.dryRun ? "Package Addition 预览" : "已添加 Package",
|
|
155
|
+
"",
|
|
156
|
+
...(result.actions.length === 0
|
|
157
|
+
? ["没有变更。"]
|
|
158
|
+
: result.actions.map((action) => ` ${action.action} ${action.path} (${action.driver})`)),
|
|
159
|
+
].join("\n");
|
|
160
|
+
case "conflict":
|
|
161
|
+
return [
|
|
162
|
+
"Package Addition 冲突",
|
|
163
|
+
"",
|
|
164
|
+
...result.conflicts.flatMap((conflict) => "kind" in conflict
|
|
165
|
+
? [
|
|
166
|
+
` ${conflict.kind === "missing-link" ? "Package Link" : "Package Identity"}`,
|
|
167
|
+
` 已有: ${conflict.existing.name} (${conflict.existing.path}, ${conflict.existing.role})`,
|
|
168
|
+
` 请求: ${conflict.requested.name} (${conflict.requested.path}, ${conflict.requested.role})`,
|
|
169
|
+
...(conflict.missingLink === undefined
|
|
170
|
+
? []
|
|
171
|
+
: [
|
|
172
|
+
` 缺少链接: ${conflict.missingLink.consumerPackagePath} -> ${conflict.missingLink.providerPackagePath}`,
|
|
173
|
+
]),
|
|
174
|
+
]
|
|
175
|
+
: [
|
|
176
|
+
` ${conflict.path} (${conflict.driver})`,
|
|
177
|
+
...(conflict.location === undefined
|
|
178
|
+
? []
|
|
179
|
+
: [` 位置: ${conflict.location || "<文档根>"}`]),
|
|
180
|
+
...(conflict.region === undefined
|
|
181
|
+
? []
|
|
182
|
+
: [
|
|
183
|
+
` 区域: 生成前第 ${conflict.region.before.startLine} 行;当前第 ${conflict.region.current.startLine} 行;请求后第 ${conflict.region.after.startLine} 行`,
|
|
184
|
+
]),
|
|
185
|
+
...(conflict.attribute === undefined
|
|
186
|
+
? []
|
|
187
|
+
: [` 属性: ${conflict.attribute}`]),
|
|
188
|
+
` 原因: ${conflict.reason}`,
|
|
189
|
+
` 生成前: ${conflict.context.before}`,
|
|
190
|
+
` 当前: ${conflict.context.current}`,
|
|
191
|
+
` 请求后: ${conflict.context.after}`,
|
|
192
|
+
]),
|
|
193
|
+
"",
|
|
194
|
+
"建议: 处理冲突后重试;命令没有写入工作区。",
|
|
195
|
+
].join("\n");
|
|
196
|
+
case "usage-error":
|
|
197
|
+
return [
|
|
198
|
+
`错误 [${result.code}]: Package Addition 输入无效。`,
|
|
199
|
+
...result.issues.map((issue) => ` ${additionIssueMessage(issue.code)}`),
|
|
200
|
+
"建议: 修正上述输入后重新运行。",
|
|
201
|
+
].join("\n");
|
|
202
|
+
case "operation-failure":
|
|
203
|
+
return [
|
|
204
|
+
`错误 [${result.code}]: ${result.error.message}`,
|
|
205
|
+
`阶段: ${result.phase}`,
|
|
206
|
+
`建议: ${result.error.suggestion}`,
|
|
207
|
+
].join("\n");
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function additionIssueMessage(code) {
|
|
211
|
+
switch (code) {
|
|
212
|
+
case "PRESET_UNKNOWN":
|
|
213
|
+
return "未找到该预设;使用 template presets 查看可用预设。";
|
|
214
|
+
case "PRESET_NOT_ADDABLE":
|
|
215
|
+
return "该预设不支持添加 Package;选择支持 Package Addition 的预设。";
|
|
216
|
+
case "INVALID_PACKAGE_NAME":
|
|
217
|
+
return "Package 名称必须是有效的小写 npm 叶名称。";
|
|
218
|
+
case "INVALID_PACKAGE_PATH":
|
|
219
|
+
return "Package 路径必须是两段小写路径,例如 packages/example。";
|
|
220
|
+
case "RESERVED_PACKAGE_PATH":
|
|
221
|
+
return "Package 路径不能使用保留工作区目录。";
|
|
222
|
+
case "INVALID_LINK_FROM":
|
|
223
|
+
return "--link-from 必须是两段现有 Package 路径。";
|
|
224
|
+
case "RESERVED_LINK_FROM":
|
|
225
|
+
return "--link-from 不能使用保留工作区目录。";
|
|
226
|
+
case "UNKNOWN_LINK_FROM":
|
|
227
|
+
return "--link-from 指向的 consumer Package 不存在;选择 Blueprint 中已有的 Package 路径。";
|
|
228
|
+
case "UNSUPPORTED_LINK":
|
|
229
|
+
return "该 consumer 与 provider 不支持 Package Link;选择兼容的 Package 角色与公开接口。";
|
|
230
|
+
}
|
|
231
|
+
}
|
package/dist/main.d.ts
CHANGED
|
@@ -13,5 +13,8 @@ export type CliRuntime = ApplicationRuntime & {
|
|
|
13
13
|
};
|
|
14
14
|
readonly version: string;
|
|
15
15
|
};
|
|
16
|
-
export declare function createCliCommand(runtime: CliRuntime
|
|
16
|
+
export declare function createCliCommand(runtime: CliRuntime, commanderOutput?: {
|
|
17
|
+
stdout: string;
|
|
18
|
+
stderr: string;
|
|
19
|
+
}): Command;
|
|
17
20
|
export declare function runCli(runtime: CliRuntime): Promise<number>;
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command, CommanderError } from "commander";
|
|
2
|
-
import {
|
|
2
|
+
import { listPresetCatalog, runAddPackage, runInit, validateBlueprintFile, } from "./application.js";
|
|
3
|
+
import { projectCommandResult, } from "./command-result.js";
|
|
3
4
|
class HandledCliExit extends Error {
|
|
4
5
|
exitCode;
|
|
5
6
|
constructor(exitCode) {
|
|
@@ -7,24 +8,257 @@ class HandledCliExit extends Error {
|
|
|
7
8
|
this.exitCode = exitCode;
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
class OutputFailure extends Error {
|
|
12
|
+
destination;
|
|
13
|
+
epiped;
|
|
14
|
+
constructor(destination, error) {
|
|
15
|
+
super("Unable to write CLI output");
|
|
16
|
+
this.destination = destination;
|
|
17
|
+
this.epiped =
|
|
18
|
+
typeof error === "object" && error !== null && "code" in error
|
|
19
|
+
? error.code === "EPIPE"
|
|
20
|
+
: false;
|
|
13
21
|
}
|
|
14
|
-
|
|
15
|
-
|
|
22
|
+
}
|
|
23
|
+
class ConfirmationFailure extends Error {
|
|
24
|
+
constructor() {
|
|
25
|
+
super("Confirmation adapter failed");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function isConfirmationOutputResourceFailure(error) {
|
|
29
|
+
if (typeof error !== "object" || error === null || !("code" in error)) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return error.code === "EPIPE" || error.code === "ENOSPC";
|
|
33
|
+
}
|
|
34
|
+
class HumanCommandIdentity {
|
|
35
|
+
#runtime;
|
|
36
|
+
#written = false;
|
|
37
|
+
constructor(runtime) {
|
|
38
|
+
this.#runtime = runtime;
|
|
39
|
+
}
|
|
40
|
+
write(destination) {
|
|
41
|
+
if (this.#written)
|
|
42
|
+
return;
|
|
43
|
+
this.#written = true;
|
|
44
|
+
this.#write(destination, `template ${this.#runtime.version}\n`);
|
|
45
|
+
}
|
|
46
|
+
writeText(destination, text) {
|
|
47
|
+
this.write(destination);
|
|
48
|
+
this.#write(destination, text);
|
|
49
|
+
}
|
|
50
|
+
#write(destination, text) {
|
|
51
|
+
try {
|
|
52
|
+
this.#runtime.streams[destination].write(text);
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
throw new OutputFailure(destination, error);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function commandName(argv) {
|
|
60
|
+
const [first, second] = argv.slice(2);
|
|
61
|
+
if (first === "init" || first === "presets")
|
|
62
|
+
return first;
|
|
63
|
+
if (first === "add")
|
|
64
|
+
return second === "package" ? "add package" : "add";
|
|
65
|
+
if (first === "blueprint") {
|
|
66
|
+
return second === "validate" ? "blueprint validate" : "blueprint";
|
|
16
67
|
}
|
|
17
|
-
|
|
18
|
-
throw new HandledCliExit(result.exitCode);
|
|
68
|
+
return "template";
|
|
19
69
|
}
|
|
20
|
-
|
|
70
|
+
function hasJsonControlIntent(argv) {
|
|
71
|
+
return argv.slice(2).includes("--json");
|
|
72
|
+
}
|
|
73
|
+
function localizeHelp(text) {
|
|
74
|
+
return text
|
|
75
|
+
.replaceAll("Usage:", "用法:")
|
|
76
|
+
.replaceAll("Options:", "选项:")
|
|
77
|
+
.replaceAll("Commands:", "命令:")
|
|
78
|
+
.replaceAll("output the version number", "输出版本号")
|
|
79
|
+
.replaceAll("display help for command", "显示命令帮助")
|
|
80
|
+
.replaceAll("Resolve a Preset, initial package name and path, and package scope before initialization.", "初始化前解析预设、初始包名称、路径和包 scope。")
|
|
81
|
+
.replaceAll("Project preset to generate", "要生成的项目预设")
|
|
82
|
+
.replaceAll("Unscoped leaf name when the Preset supports Primary Package Identity overrides", "预设支持主包身份覆盖时使用的无 scope 叶名称")
|
|
83
|
+
.replaceAll("Two-segment path when the Preset supports Primary Package Identity overrides", "预设支持主包身份覆盖时使用的两段路径")
|
|
84
|
+
.replaceAll("Resolved default package scope", "解析后的默认包 scope")
|
|
85
|
+
.replaceAll("Accept defaults for non-interactive generation", "接受非交互式生成的默认值")
|
|
86
|
+
.replaceAll("Print the planned generation without writing files", "打印生成计划而不写文件")
|
|
87
|
+
.replaceAll("Print machine-readable output", "输出机器可读结果")
|
|
88
|
+
.replaceAll("Do not write the generated follow-up TODO.md", "不写入生成后的 TODO.md")
|
|
89
|
+
.replaceAll("Add to a Generated Repository; package supports --dry-run and --json.", "向生成仓库添加内容;package 支持 --dry-run 和 --json。")
|
|
90
|
+
.replaceAll("Add a Package Boundary.", "添加一个 Package Boundary。")
|
|
91
|
+
.replaceAll("Package preset to add", "要添加的 Package 预设")
|
|
92
|
+
.replaceAll("Package name to add", "要添加的 Package 名称")
|
|
93
|
+
.replaceAll("Two-segment Package Path to add", "要添加的两段 Package Path")
|
|
94
|
+
.replaceAll("Existing consumer Package Path to link from; repeatable", "要链接的现有 consumer Package Path;可重复传入")
|
|
95
|
+
.replaceAll("Preview the Addition Delta without writing files", "预览 Addition Delta 而不写文件")
|
|
96
|
+
.replaceAll("List Built-in Presets.", "列出内置预设。")
|
|
97
|
+
.replaceAll("Work with Project Blueprints.", "处理 Project Blueprint。")
|
|
98
|
+
.replaceAll("Validate a Project Blueprint.", "校验 Project Blueprint。");
|
|
99
|
+
}
|
|
100
|
+
function commanderFailure(error, command, capturedError) {
|
|
101
|
+
const usage = capturedError
|
|
102
|
+
.split("\n")
|
|
103
|
+
.find((line) => line.startsWith("Usage:"));
|
|
104
|
+
const suggestion = error.message.match(/Did you mean (.+)\?/u)?.[1];
|
|
105
|
+
const message = error.code === "commander.optionMissingArgument"
|
|
106
|
+
? error.message.replace(/option ('[^']+') argument missing/u, "选项 $1 缺少参数。")
|
|
107
|
+
: error.code === "commander.excessArguments"
|
|
108
|
+
? `命令 ${command} 参数过多。`
|
|
109
|
+
: error.message;
|
|
110
|
+
const localizedMessage = message
|
|
111
|
+
.replace(/^error:\s*/u, "")
|
|
112
|
+
.replace(/unknown command/u, "未知命令")
|
|
113
|
+
.replace(/unknown option/u, "未知选项")
|
|
114
|
+
.replace(/required option/u, "缺少必需选项")
|
|
115
|
+
.replace(/missing required argument/u, "缺少必需参数")
|
|
116
|
+
.replace(/ not specified$/u, "。");
|
|
117
|
+
let code = "USAGE_INVALID_INVOCATION";
|
|
118
|
+
if (error.code === "commander.unknownCommand") {
|
|
119
|
+
code = "USAGE_UNKNOWN_COMMAND";
|
|
120
|
+
}
|
|
121
|
+
else if (error.code === "commander.unknownOption") {
|
|
122
|
+
code = "USAGE_UNKNOWN_OPTION";
|
|
123
|
+
}
|
|
124
|
+
else if (error.code === "commander.optionMissingArgument") {
|
|
125
|
+
code = "USAGE_OPTION_MISSING_ARGUMENT";
|
|
126
|
+
}
|
|
127
|
+
else if (error.code === "commander.excessArguments") {
|
|
128
|
+
code = "USAGE_EXCESS_ARGUMENTS";
|
|
129
|
+
}
|
|
130
|
+
else if (error.message.includes("required option")) {
|
|
131
|
+
code = "USAGE_MISSING_REQUIRED_OPTION";
|
|
132
|
+
}
|
|
133
|
+
else if (error.message.includes("required argument")) {
|
|
134
|
+
code = "USAGE_MISSING_REQUIRED_ARGUMENT";
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
code,
|
|
138
|
+
command,
|
|
139
|
+
message: localizedMessage,
|
|
140
|
+
...(suggestion === undefined
|
|
141
|
+
? {}
|
|
142
|
+
: { suggestion: `Did you mean ${suggestion}?` }),
|
|
143
|
+
...(usage === undefined
|
|
144
|
+
? {}
|
|
145
|
+
: { usage: localizeHelp(usage).replace(/^用法:\s*/u, "") }),
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function applicationFailure(error, command) {
|
|
149
|
+
return {
|
|
150
|
+
code: "OPERATION_INTERNAL_ERROR",
|
|
151
|
+
command,
|
|
152
|
+
message: "命令遇到了内部错误;请重试,若持续发生请人工处理。",
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function exitCodeForOutputFailure(error) {
|
|
156
|
+
return error.destination === "stdout" && error.epiped ? 0 : 65;
|
|
157
|
+
}
|
|
158
|
+
function writeFailure(runtime, identity, json, failure) {
|
|
159
|
+
if (json) {
|
|
160
|
+
try {
|
|
161
|
+
runtime.streams.stdout.write(`${JSON.stringify({
|
|
162
|
+
schemaVersion: 1,
|
|
163
|
+
cliVersion: runtime.version,
|
|
164
|
+
command: failure.command,
|
|
165
|
+
code: failure.code,
|
|
166
|
+
status: "error",
|
|
167
|
+
error: {
|
|
168
|
+
message: failure.message,
|
|
169
|
+
...(failure.suggestion === undefined
|
|
170
|
+
? {}
|
|
171
|
+
: { suggestion: failure.suggestion }),
|
|
172
|
+
...(failure.usage === undefined ? {} : { usage: failure.usage }),
|
|
173
|
+
},
|
|
174
|
+
})}\n`);
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
throw new OutputFailure("stdout", error);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
const lines = [`错误 [${failure.code}]: ${failure.message}`];
|
|
182
|
+
if (failure.suggestion !== undefined) {
|
|
183
|
+
lines.push(`建议: ${failure.suggestion}`);
|
|
184
|
+
}
|
|
185
|
+
if (failure.usage !== undefined) {
|
|
186
|
+
lines.push("", `用法: ${failure.usage}`);
|
|
187
|
+
}
|
|
188
|
+
identity.writeText("stderr", `${lines.join("\n")}\n`);
|
|
189
|
+
}
|
|
190
|
+
function writeOutput(runtime, destination, text) {
|
|
191
|
+
try {
|
|
192
|
+
runtime.streams[destination].write(text);
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
if (error instanceof OutputFailure)
|
|
196
|
+
throw error;
|
|
197
|
+
throw new OutputFailure(destination, error);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
function writeClosedCommandResult(runtime, result, json) {
|
|
201
|
+
const presentation = projectCommandResult(result, json, runtime.version);
|
|
202
|
+
writeOutput(runtime, presentation.destination, presentation.text);
|
|
203
|
+
if (presentation.exitCode !== 0)
|
|
204
|
+
throw new HandledCliExit(presentation.exitCode);
|
|
205
|
+
}
|
|
206
|
+
function withHumanIdentity(runtime, json) {
|
|
207
|
+
const identity = new HumanCommandIdentity(runtime);
|
|
208
|
+
if (json)
|
|
209
|
+
return { runtime, identity };
|
|
210
|
+
return {
|
|
211
|
+
identity,
|
|
212
|
+
runtime: {
|
|
213
|
+
...runtime,
|
|
214
|
+
streams: {
|
|
215
|
+
...runtime.streams,
|
|
216
|
+
stdout: {
|
|
217
|
+
write(chunk) {
|
|
218
|
+
identity.writeText("stdout", chunk);
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
stderr: {
|
|
222
|
+
write(chunk) {
|
|
223
|
+
identity.writeText("stderr", chunk);
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
confirmation: {
|
|
228
|
+
async confirm(request) {
|
|
229
|
+
identity.write("stdout");
|
|
230
|
+
try {
|
|
231
|
+
return await runtime.confirmation.confirm(request);
|
|
232
|
+
}
|
|
233
|
+
catch (error) {
|
|
234
|
+
if (isConfirmationOutputResourceFailure(error)) {
|
|
235
|
+
throw new OutputFailure("stdout", error);
|
|
236
|
+
}
|
|
237
|
+
throw new ConfirmationFailure();
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
export function createCliCommand(runtime, commanderOutput) {
|
|
21
245
|
const command = new Command()
|
|
22
246
|
.name("template")
|
|
23
|
-
.description("
|
|
247
|
+
.description("从维护的项目预设创建仓库。")
|
|
24
248
|
.version(runtime.version)
|
|
25
249
|
.configureOutput({
|
|
26
|
-
writeOut: (text) =>
|
|
27
|
-
|
|
250
|
+
writeOut: (text) => {
|
|
251
|
+
if (commanderOutput === undefined)
|
|
252
|
+
runtime.streams.stdout.write(text);
|
|
253
|
+
else
|
|
254
|
+
commanderOutput.stdout += text;
|
|
255
|
+
},
|
|
256
|
+
writeErr: (text) => {
|
|
257
|
+
if (commanderOutput === undefined)
|
|
258
|
+
runtime.streams.stderr.write(text);
|
|
259
|
+
else
|
|
260
|
+
commanderOutput.stderr += text;
|
|
261
|
+
},
|
|
28
262
|
})
|
|
29
263
|
.configureHelp({
|
|
30
264
|
subcommandTerm(subcommand) {
|
|
@@ -46,13 +280,15 @@ export function createCliCommand(runtime) {
|
|
|
46
280
|
.exitOverride();
|
|
47
281
|
command
|
|
48
282
|
.command("init <dir>")
|
|
49
|
-
.description("
|
|
50
|
-
.requiredOption("--preset <name>", "
|
|
51
|
-
.option("--
|
|
52
|
-
.option("
|
|
53
|
-
.option("--
|
|
54
|
-
.option("--
|
|
55
|
-
.option("--
|
|
283
|
+
.description("初始化前解析预设、初始包名称、路径和包 scope。")
|
|
284
|
+
.requiredOption("--preset <name>", "要生成的项目预设")
|
|
285
|
+
.option("--name <name>", "预设支持主包身份覆盖时使用的无 scope 叶名称")
|
|
286
|
+
.option("--path <path>", "预设支持主包身份覆盖时使用的两段路径")
|
|
287
|
+
.option("--scope <name>", "解析后的默认包 scope")
|
|
288
|
+
.option("-y, --yes", "接受非交互式生成的默认值")
|
|
289
|
+
.option("--dry-run", "打印生成计划而不写文件")
|
|
290
|
+
.option("--json", "输出机器可读结果")
|
|
291
|
+
.option("--no-todo", "不写入生成后的 TODO.md")
|
|
56
292
|
.action(async (dir, options) => {
|
|
57
293
|
const initOptions = {
|
|
58
294
|
dir,
|
|
@@ -61,22 +297,24 @@ export function createCliCommand(runtime) {
|
|
|
61
297
|
dryRun: Boolean(options.dryRun),
|
|
62
298
|
json: Boolean(options.json),
|
|
63
299
|
todo: options.todo,
|
|
300
|
+
...(options.name === undefined ? {} : { name: options.name }),
|
|
301
|
+
...(options.path === undefined ? {} : { path: options.path }),
|
|
64
302
|
...(options.scope === undefined ? {} : { scope: options.scope }),
|
|
65
303
|
};
|
|
66
|
-
runtime
|
|
304
|
+
writeClosedCommandResult(runtime, await runInit(initOptions, runtime), initOptions.json);
|
|
67
305
|
});
|
|
68
306
|
const addCommand = command
|
|
69
307
|
.command("add")
|
|
70
|
-
.description("
|
|
308
|
+
.description("向生成仓库添加内容;package 支持 --dry-run 和 --json。");
|
|
71
309
|
addCommand
|
|
72
310
|
.command("package")
|
|
73
|
-
.description("
|
|
74
|
-
.requiredOption("--preset <name>", "Package
|
|
75
|
-
.requiredOption("--name <name>", "Package
|
|
76
|
-
.option("--path <path>", "
|
|
77
|
-
.option("--link-from <path>", "
|
|
78
|
-
.option("--dry-run", "
|
|
79
|
-
.option("--json", "
|
|
311
|
+
.description("添加一个 Package Boundary。")
|
|
312
|
+
.requiredOption("--preset <name>", "要添加的 Package 预设")
|
|
313
|
+
.requiredOption("--name <name>", "要添加的 Package 名称")
|
|
314
|
+
.option("--path <path>", "要添加的两段 Package Path")
|
|
315
|
+
.option("--link-from <path>", "要链接的现有 consumer Package Path;可重复传入", (value, previous) => [...previous, value], [])
|
|
316
|
+
.option("--dry-run", "预览 Addition Delta 而不写文件")
|
|
317
|
+
.option("--json", "输出机器可读结果")
|
|
80
318
|
.action(async (options) => {
|
|
81
319
|
const addOptions = {
|
|
82
320
|
preset: options.preset,
|
|
@@ -86,44 +324,78 @@ export function createCliCommand(runtime) {
|
|
|
86
324
|
dryRun: Boolean(options.dryRun),
|
|
87
325
|
json: Boolean(options.json),
|
|
88
326
|
};
|
|
89
|
-
|
|
327
|
+
writeClosedCommandResult(runtime, await runAddPackage(addOptions, runtime), addOptions.json);
|
|
90
328
|
});
|
|
91
329
|
command
|
|
92
330
|
.command("presets")
|
|
93
|
-
.description("
|
|
94
|
-
.
|
|
95
|
-
|
|
331
|
+
.description("列出内置预设。")
|
|
332
|
+
.option("--json", "输出机器可读结果")
|
|
333
|
+
.action((options) => {
|
|
334
|
+
writeClosedCommandResult(runtime, listPresetCatalog(), Boolean(options.json));
|
|
96
335
|
});
|
|
97
336
|
command
|
|
98
337
|
.command("blueprint")
|
|
99
|
-
.description("
|
|
338
|
+
.description("处理 Project Blueprint。")
|
|
100
339
|
.command("validate <path>")
|
|
101
|
-
.description("
|
|
102
|
-
.
|
|
103
|
-
|
|
340
|
+
.description("校验 Project Blueprint。")
|
|
341
|
+
.option("--json", "输出机器可读结果")
|
|
342
|
+
.action(async (filePath, options) => {
|
|
343
|
+
writeClosedCommandResult(runtime, await validateBlueprintFile(filePath, runtime), Boolean(options.json));
|
|
104
344
|
});
|
|
105
345
|
return command;
|
|
106
346
|
}
|
|
107
347
|
export async function runCli(runtime) {
|
|
348
|
+
let command = "template";
|
|
349
|
+
let json = false;
|
|
350
|
+
let commandRuntime = runtime;
|
|
351
|
+
let identity = new HumanCommandIdentity(runtime);
|
|
352
|
+
const commanderOutput = { stdout: "", stderr: "" };
|
|
108
353
|
try {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
354
|
+
command = commandName(runtime.argv);
|
|
355
|
+
json = hasJsonControlIntent(runtime.argv);
|
|
356
|
+
({ runtime: commandRuntime, identity } = withHumanIdentity(runtime, json));
|
|
357
|
+
const cli = createCliCommand(commandRuntime, commanderOutput);
|
|
358
|
+
if (commandRuntime.argv.length <= 2) {
|
|
359
|
+
cli.outputHelp();
|
|
360
|
+
identity.writeText("stdout", localizeHelp(commanderOutput.stdout));
|
|
361
|
+
return 0;
|
|
115
362
|
}
|
|
116
|
-
await
|
|
117
|
-
from: "node",
|
|
118
|
-
});
|
|
363
|
+
await cli.parseAsync([...commandRuntime.argv], { from: "node" });
|
|
119
364
|
return 0;
|
|
120
365
|
}
|
|
121
366
|
catch (error) {
|
|
367
|
+
if (error instanceof OutputFailure)
|
|
368
|
+
return exitCodeForOutputFailure(error);
|
|
122
369
|
if (error instanceof HandledCliExit)
|
|
123
370
|
return error.exitCode;
|
|
124
|
-
if (error instanceof CommanderError
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
371
|
+
if (error instanceof CommanderError &&
|
|
372
|
+
(error.code === "commander.helpDisplayed" ||
|
|
373
|
+
error.code === "commander.version")) {
|
|
374
|
+
try {
|
|
375
|
+
identity.writeText("stdout", error.code === "commander.version"
|
|
376
|
+
? ""
|
|
377
|
+
: localizeHelp(commanderOutput.stdout));
|
|
378
|
+
}
|
|
379
|
+
catch (writeError) {
|
|
380
|
+
if (writeError instanceof OutputFailure) {
|
|
381
|
+
return exitCodeForOutputFailure(writeError);
|
|
382
|
+
}
|
|
383
|
+
return 65;
|
|
384
|
+
}
|
|
385
|
+
return 0;
|
|
386
|
+
}
|
|
387
|
+
const failure = error instanceof CommanderError
|
|
388
|
+
? commanderFailure(error, command, commanderOutput.stderr)
|
|
389
|
+
: applicationFailure(error, command);
|
|
390
|
+
try {
|
|
391
|
+
writeFailure(runtime, identity, json, failure);
|
|
392
|
+
}
|
|
393
|
+
catch (writeError) {
|
|
394
|
+
if (writeError instanceof OutputFailure) {
|
|
395
|
+
return exitCodeForOutputFailure(writeError);
|
|
396
|
+
}
|
|
397
|
+
return 65;
|
|
398
|
+
}
|
|
399
|
+
return failure.code.startsWith("USAGE_") ? 64 : 65;
|
|
128
400
|
}
|
|
129
401
|
}
|