@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
package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/setup.sh
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# One-time, local-only setup interface. The generated body is checked Template Source.
|
|
3
|
+
|
|
4
|
+
set -u
|
|
5
|
+
|
|
6
|
+
package_path="{{PUBLIC_CLI_PACKAGE_PATH}}"
|
|
7
|
+
script_dir=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)
|
|
8
|
+
repository_root=$(CDPATH='' cd -- "$script_dir/../.." && pwd)
|
|
9
|
+
mode="run"
|
|
10
|
+
status_requested=false
|
|
11
|
+
json_requested=false
|
|
12
|
+
non_interactive=false
|
|
13
|
+
debug=false
|
|
14
|
+
package_name=""
|
|
15
|
+
command_name=""
|
|
16
|
+
description=""
|
|
17
|
+
license=""
|
|
18
|
+
copyright_holder=""
|
|
19
|
+
repository=""
|
|
20
|
+
|
|
21
|
+
usage() {
|
|
22
|
+
cat <<'USAGE'
|
|
23
|
+
Usage: ./scripts/npm-publication-setup/setup.sh [public-fact options] [--non-interactive] [--debug]
|
|
24
|
+
./scripts/npm-publication-setup/setup.sh --status --json
|
|
25
|
+
./scripts/npm-publication-setup/setup.sh --help
|
|
26
|
+
USAGE
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
diagnostic() {
|
|
30
|
+
local kind=$1 code=$2 observed expected next
|
|
31
|
+
observed=$(sanitize "$3")
|
|
32
|
+
expected=$(sanitize "$4")
|
|
33
|
+
next=$(sanitize "$5")
|
|
34
|
+
printf '%s %s\nObserved: %s\nExpected: %s\nNext action: %s\n' "$kind" "$code" "$observed" "$expected" "$next" >&2
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
fail() { diagnostic "$1" "$2" "$3" "$4" "$5"; exit "$6"; }
|
|
38
|
+
|
|
39
|
+
redact() {
|
|
40
|
+
sed -E 's#(https?://)[^/@[:space:]]+@#\1[REDACTED]@#g; s#(token|password|otp|session|authorization|auth|config)[=:][^[:space:]]+#\1=[REDACTED]#gI; s#(bearer|basic)[[:space:]]+[^[:space:]]+#\1 [REDACTED]#gI'
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
sanitize() {
|
|
44
|
+
printf '%s' "$1" | LC_ALL=C tr -d '\000-\037\177-\237' | redact
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
prompt_public_fact() {
|
|
48
|
+
local label=$1 variable=$2
|
|
49
|
+
printf '%s: ' "$label"
|
|
50
|
+
# shellcheck disable=SC2229
|
|
51
|
+
if ! IFS= read -r "$variable"; then
|
|
52
|
+
fail "ACTION REQUIRED" public-fact-required "end of input" "a complete public package fact" "Run with all public flags or enter the remaining facts interactively." 3
|
|
53
|
+
fi
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
require_value() {
|
|
57
|
+
[ "$#" -eq 2 ] || fail ERROR publication-setup-usage "missing flag value" "a value for $1" "Run --help and provide public facts." 2
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
status_json_intent=false
|
|
61
|
+
status_flag_seen=false
|
|
62
|
+
json_flag_seen=false
|
|
63
|
+
for argument in "$@"; do
|
|
64
|
+
[ "$argument" = "--status" ] && status_flag_seen=true
|
|
65
|
+
[ "$argument" = "--json" ] && json_flag_seen=true
|
|
66
|
+
done
|
|
67
|
+
[ "$status_flag_seen" = true ] && [ "$json_flag_seen" = true ] && status_json_intent=true
|
|
68
|
+
|
|
69
|
+
status_usage_json() {
|
|
70
|
+
printf '%s\n' '{"schemaVersion":1,"currentStage":{"id":"check-prerequisites","number":1,"name":"Check prerequisites"},"observations":{"packagePath":null,"packageName":null,"commandName":null,"version":null,"repository":null,"readiness":"unavailable","git":{"workingTree":null,"currentBranch":null,"defaultBranch":null,"headMatchesRemoteDefault":null}},"blockers":[{"code":"publication-setup-usage","observed":"invalid status arguments","expected":"--status --json only","nextAction":"Run ./scripts/npm-publication-setup/setup.sh --status --json."}],"nextAction":{"kind":"run","command":"./scripts/npm-publication-setup/setup.sh"}}'
|
|
71
|
+
exit 2
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
usage_fail() {
|
|
75
|
+
if [ "$status_json_intent" = true ]; then status_usage_json; fi
|
|
76
|
+
fail "$@"
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
while [ "$#" -gt 0 ]; do
|
|
80
|
+
case "$1" in
|
|
81
|
+
--help) [ "$#" -eq 1 ] || usage_fail ERROR publication-setup-usage "--help with other arguments" "--help alone" "Run --help by itself." 2; usage; exit 0 ;;
|
|
82
|
+
--status) mode="status"; status_requested=true ;;
|
|
83
|
+
--json) json_requested=true ;;
|
|
84
|
+
--non-interactive) non_interactive=true ;;
|
|
85
|
+
--debug) debug=true ;;
|
|
86
|
+
--package-name|--bin|--description|--license|--copyright-holder|--repository)
|
|
87
|
+
flag=$1; shift; [ "$#" -gt 0 ] || usage_fail ERROR publication-setup-usage "missing value" "a value for $flag" "Run --help and provide public facts." 2
|
|
88
|
+
case "$flag" in
|
|
89
|
+
--package-name) package_name=$1 ;; --bin) command_name=$1 ;; --description) description=$1 ;;
|
|
90
|
+
--license) license=$1 ;; --copyright-holder) copyright_holder=$1 ;; --repository) repository=$1 ;;
|
|
91
|
+
esac ;;
|
|
92
|
+
--yes|--password|--otp|--token|--secret|--session|--release-date|--*)
|
|
93
|
+
usage_fail ERROR publication-setup-usage "$1" "a supported public option" "Run --help; credentials and automatic acceptance are unsupported." 2 ;;
|
|
94
|
+
*) usage_fail ERROR publication-setup-usage "$1" "no positional arguments" "Run --help." 2 ;;
|
|
95
|
+
esac
|
|
96
|
+
shift
|
|
97
|
+
done
|
|
98
|
+
|
|
99
|
+
if [ "$status_requested" != "$json_requested" ]; then
|
|
100
|
+
usage_fail ERROR publication-setup-usage "--status and --json must be paired" "--status --json" "Run --status --json." 2
|
|
101
|
+
fi
|
|
102
|
+
if [ "$json_requested" = true ] && [ "$mode" != "status" ]; then
|
|
103
|
+
usage_fail ERROR publication-setup-usage "--json without --status" "--status --json" "Run --status --json." 2
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
if [ "$mode" = "status" ]; then
|
|
107
|
+
if [ "$non_interactive" != false ] || [ "$debug" != false ] || [ -n "$package_name$command_name$description$license$copyright_holder$repository" ]; then
|
|
108
|
+
printf '%s\n' '{"schemaVersion":1,"currentStage":{"id":"check-prerequisites","number":1,"name":"Check prerequisites"},"observations":{"packagePath":null,"packageName":null,"commandName":null,"version":null,"repository":null,"readiness":"unavailable","git":{"workingTree":null,"currentBranch":null,"defaultBranch":null,"headMatchesRemoteDefault":null}},"blockers":[{"code":"publication-setup-usage","observed":"invalid status arguments","expected":"--status --json only","nextAction":"Run ./scripts/npm-publication-setup/setup.sh --status --json."}],"nextAction":{"kind":"run","command":"./scripts/npm-publication-setup/setup.sh"}}'
|
|
109
|
+
exit 2
|
|
110
|
+
fi
|
|
111
|
+
REPOSITORY_ROOT="$repository_root" node --conditions=source "$script_dir/bridge.ts" status
|
|
112
|
+
exit $?
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
cd "$repository_root" || fail ERROR repository-root "unreadable repository root" "the generated repository root" "Run setup from its generated directory." 5
|
|
116
|
+
printf 'STAGE 1/9 Check prerequisites\nCHECK local-toolchain\n'
|
|
117
|
+
for command in bash node pnpm git gh; do command -v "$command" >/dev/null 2>&1 || fail ERROR prerequisite-command "$command is unavailable" "required local command $command" "Install the generated repository toolchain and retry." 5; done
|
|
118
|
+
REPOSITORY_ROOT="$repository_root" node --conditions=source "$script_dir/bridge.ts" preflight
|
|
119
|
+
preflight_status=$?
|
|
120
|
+
[ "$preflight_status" -eq 0 ] || exit "$preflight_status"
|
|
121
|
+
printf 'OK prerequisites\n'
|
|
122
|
+
|
|
123
|
+
existing_public=false
|
|
124
|
+
if node --input-type=module - "$repository_root/$package_path/package.json" <<'NODE' >/dev/null 2>&1
|
|
125
|
+
import { readFileSync } from "node:fs"; const manifest = JSON.parse(readFileSync(process.argv[2], "utf8")); process.exit(manifest.private || manifest.version !== "1.0.0" ? 1 : 0);
|
|
126
|
+
NODE
|
|
127
|
+
then
|
|
128
|
+
existing_public=true
|
|
129
|
+
fi
|
|
130
|
+
if [ "$non_interactive" = false ] && [ "$existing_public" = false ]; then
|
|
131
|
+
[ -n "$package_name" ] || prompt_public_fact "Package name" package_name
|
|
132
|
+
[ -n "$command_name" ] || prompt_public_fact "Command name" command_name
|
|
133
|
+
[ -n "$description" ] || prompt_public_fact "Public description" description
|
|
134
|
+
[ -n "$license" ] || prompt_public_fact "SPDX license" license
|
|
135
|
+
[ -n "$copyright_holder" ] || prompt_public_fact "Copyright holder" copyright_holder
|
|
136
|
+
[ -n "$repository" ] || prompt_public_fact "Public GitHub repository" repository
|
|
137
|
+
fi
|
|
138
|
+
|
|
139
|
+
printf 'STAGE 2/9 Configure the public package\n'
|
|
140
|
+
PACKAGE_NAME="$package_name" COMMAND_NAME="$command_name" DESCRIPTION="$description" LICENSE_NAME="$license" COPYRIGHT_HOLDER="$copyright_holder" REPOSITORY_URL="$repository" REPOSITORY_ROOT="$repository_root" SETUP_DIR="$script_dir" node --conditions=source "$script_dir/bridge.ts" configure
|
|
141
|
+
configuration_status=$?
|
|
142
|
+
[ "$configuration_status" -eq 0 ] || exit "$configuration_status"
|
|
143
|
+
printf 'OK public-package-configured\nSTAGE 3/9 Commit the publication configuration\n'
|
|
144
|
+
if ! working_tree=$(git status --porcelain 2>/dev/null); then
|
|
145
|
+
fail ERROR git-read-unavailable "working tree could not be read" "readable local Git facts" "Correct the Git or platform failure and retry." 5
|
|
146
|
+
fi
|
|
147
|
+
if [ -n "$working_tree" ]; then fail "ACTION REQUIRED" git-handoff-required "publication configuration needs normal Git review" "a clean synchronized public default branch" "Use the normal review, commit, PR, and merge flow; then rerun setup." 3; fi
|
|
148
|
+
branch=$(git symbolic-ref --quiet --short HEAD 2>/dev/null)
|
|
149
|
+
branch_status=$?
|
|
150
|
+
if [ "$branch_status" -eq 1 ]; then
|
|
151
|
+
fail "ACTION REQUIRED" git-handoff-required "HEAD is detached" "a checked-out public default branch" "Complete the normal Git handoff and rerun setup." 3
|
|
152
|
+
fi
|
|
153
|
+
if [ "$branch_status" -ne 0 ]; then
|
|
154
|
+
fail ERROR git-read-unavailable "current branch could not be read" "readable local Git facts" "Correct the Git or platform failure and retry." 5
|
|
155
|
+
fi
|
|
156
|
+
if ! remote=$(git remote get-url origin 2>/dev/null); then
|
|
157
|
+
fail ERROR git-read-unavailable "origin could not be read" "a readable public origin" "Correct the Git or platform failure and retry." 5
|
|
158
|
+
fi
|
|
159
|
+
if ! remote_listing=$(git ls-remote --symref origin HEAD 2>/dev/null); then
|
|
160
|
+
fail ERROR git-read-unavailable "remote default branch could not be read" "a reachable public origin" "Correct the Git or network failure and retry." 5
|
|
161
|
+
fi
|
|
162
|
+
remote_default=$(printf '%s\n' "$remote_listing" | sed -n 's#ref: refs/heads/\([^[:space:]]*\).*#\1#p' | head -n 1)
|
|
163
|
+
if [ -z "$remote_default" ]; then
|
|
164
|
+
fail "ACTION REQUIRED" git-handoff-required "remote default branch is unavailable" "a public default branch" "Complete the normal Git handoff and rerun setup." 3
|
|
165
|
+
fi
|
|
166
|
+
if ! remote_head=$(git ls-remote origin "refs/heads/$remote_default" 2>/dev/null); then
|
|
167
|
+
fail ERROR git-read-unavailable "remote default HEAD could not be read" "a reachable public origin" "Correct the Git or network failure and retry." 5
|
|
168
|
+
fi
|
|
169
|
+
remote_head=$(printf '%s\n' "$remote_head" | awk 'NR==1 {print $1}')
|
|
170
|
+
if ! local_head=$(git rev-parse HEAD 2>/dev/null); then
|
|
171
|
+
fail ERROR git-read-unavailable "local HEAD could not be read" "a readable local HEAD" "Correct the Git or platform failure and retry." 5
|
|
172
|
+
fi
|
|
173
|
+
if [ "$branch" != "$remote_default" ] || [ -z "$remote_head" ] || [ "$local_head" != "$remote_head" ]; then
|
|
174
|
+
fail "ACTION REQUIRED" git-handoff-required "branch or remote is not synchronized" "clean public default branch at its remote HEAD" "Complete the normal Git handoff and rerun setup." 3
|
|
175
|
+
fi
|
|
176
|
+
if ! REMOTE_URL="$remote" REPOSITORY_ROOT="$repository_root" node --conditions=source "$script_dir/bridge.ts" remote-matches-owner; then
|
|
177
|
+
fail ERROR repository-remote-conflict "$(printf '%s' "$remote" | redact)" "the public package owner GitHub repository" "Correct the normal Git remote and retry." 4
|
|
178
|
+
fi
|
|
179
|
+
printf 'OK git-handoff-complete\nSTAGE 4/9 Verify the first release artifact\n'
|
|
180
|
+
artifact_parent_input=${TMPDIR:-/tmp}
|
|
181
|
+
if ! artifact_parent=$(CDPATH='' cd -- "$artifact_parent_input" && pwd -P); then
|
|
182
|
+
fail ERROR artifact-temporary-output "temporary parent is unreadable" "a readable local temporary directory" "Correct TMPDIR permissions and retry." 5
|
|
183
|
+
fi
|
|
184
|
+
artifact_root=$(mktemp -d "$artifact_parent/npm-publication-setup-artifact.XXXXXX") || fail ERROR artifact-temporary-output "unable to create temporary output" "an empty local temporary directory" "Correct temporary directory permissions and retry." 5
|
|
185
|
+
artifact_cleaned=false
|
|
186
|
+
cleanup_artifact_root() {
|
|
187
|
+
[ "$artifact_cleaned" = true ] && return 0
|
|
188
|
+
case "$artifact_root" in
|
|
189
|
+
"$artifact_parent"/npm-publication-setup-artifact.*) ;;
|
|
190
|
+
*) return 1 ;;
|
|
191
|
+
esac
|
|
192
|
+
[ "$(dirname -- "$artifact_root")" = "$artifact_parent" ] || return 1
|
|
193
|
+
[ ! -e "$artifact_root" ] && [ ! -L "$artifact_root" ] || {
|
|
194
|
+
[ -d "$artifact_root" ] && [ ! -L "$artifact_root" ] || return 1
|
|
195
|
+
rm -rf -- "$artifact_root" || return 1
|
|
196
|
+
}
|
|
197
|
+
artifact_cleaned=true
|
|
198
|
+
}
|
|
199
|
+
cleanup_artifact_best_effort() {
|
|
200
|
+
cleanup_artifact_root >/dev/null 2>&1 || :
|
|
201
|
+
}
|
|
202
|
+
trap cleanup_artifact_best_effort EXIT HUP INT TERM
|
|
203
|
+
if [ "$debug" = true ]; then printf 'COMMAND %s\n' "verifyNpmPublicationArtifact [temporary output]"; fi
|
|
204
|
+
artifact_result=$(REPOSITORY_ROOT="$repository_root" ARTIFACT_OUTPUT_DIRECTORY="$artifact_root" node --conditions=source "$script_dir/bridge.ts" artifact)
|
|
205
|
+
artifact_status=$?
|
|
206
|
+
if [ "$artifact_status" -ne 0 ]; then
|
|
207
|
+
printf '%s\n' "$artifact_result" >&2
|
|
208
|
+
exit "$artifact_status"
|
|
209
|
+
fi
|
|
210
|
+
printf '%s\n' "$artifact_result" | sed '$d'
|
|
211
|
+
acceptance=$(printf '%s\n' "$artifact_result" | tail -n 1)
|
|
212
|
+
if [ "$non_interactive" = true ]; then fail "ACTION REQUIRED" artifact-acceptance-required "non-interactive mode cannot accept an artifact" "$acceptance" "Review the receipt and enter the exact acceptance interactively." 3; fi
|
|
213
|
+
printf '%s\n' "$acceptance"; printf 'Acceptance: '; read -r entered || fail "ACTION REQUIRED" artifact-acceptance-required "end of input" "$acceptance" "Review the receipt and enter the exact acceptance." 3
|
|
214
|
+
[ "$entered" = "$acceptance" ] || fail "ACTION REQUIRED" artifact-acceptance-required "acceptance did not match this receipt" "$acceptance" "Review the receipt and enter the exact acceptance." 3
|
|
215
|
+
# A successful exec is the ownership boundary: before it, this shell owns the
|
|
216
|
+
# accepted artifact; after it, the private bridge owns the artifact, session,
|
|
217
|
+
# signal handling, logout, and cleanup as one linear lifecycle.
|
|
218
|
+
REPOSITORY_ROOT="$repository_root" ARTIFACT_ROOT="$artifact_root" DEBUG="$debug" \
|
|
219
|
+
exec node --conditions=source "$script_dir/bridge.ts" external
|
|
220
|
+
exec_status=$?
|
|
221
|
+
fail ERROR external-bridge-unavailable "could not transfer the accepted artifact to the private setup bridge" "a runnable private setup bridge" "Correct the generated setup files and retry." "$exec_status"
|
package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/cli-command-identity.ts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
export type CliCommandIdentity = {
|
|
2
|
+
readonly commandName: string;
|
|
3
|
+
readonly version: string;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
const reservedSystemToolNames = new Set([
|
|
7
|
+
"aux",
|
|
8
|
+
"bash",
|
|
9
|
+
"bun",
|
|
10
|
+
"cmd",
|
|
11
|
+
"com1",
|
|
12
|
+
"com2",
|
|
13
|
+
"com3",
|
|
14
|
+
"com4",
|
|
15
|
+
"com5",
|
|
16
|
+
"com6",
|
|
17
|
+
"com7",
|
|
18
|
+
"com8",
|
|
19
|
+
"com9",
|
|
20
|
+
"con",
|
|
21
|
+
"corepack",
|
|
22
|
+
"deno",
|
|
23
|
+
"git",
|
|
24
|
+
"lpt1",
|
|
25
|
+
"lpt2",
|
|
26
|
+
"lpt3",
|
|
27
|
+
"lpt4",
|
|
28
|
+
"lpt5",
|
|
29
|
+
"lpt6",
|
|
30
|
+
"lpt7",
|
|
31
|
+
"lpt8",
|
|
32
|
+
"lpt9",
|
|
33
|
+
"node",
|
|
34
|
+
"nul",
|
|
35
|
+
"npm",
|
|
36
|
+
"npx",
|
|
37
|
+
"pnpm",
|
|
38
|
+
"powershell",
|
|
39
|
+
"prn",
|
|
40
|
+
"pwsh",
|
|
41
|
+
"sh",
|
|
42
|
+
"yarn",
|
|
43
|
+
"zsh",
|
|
44
|
+
]);
|
|
45
|
+
|
|
46
|
+
export function validateCliCommandName(
|
|
47
|
+
commandName: string,
|
|
48
|
+
occupiedCommandNames: readonly string[] = [],
|
|
49
|
+
): string {
|
|
50
|
+
if (/[/\\]/u.test(commandName)) {
|
|
51
|
+
throw new Error(
|
|
52
|
+
`CLI command name must not be a path; received ${JSON.stringify(commandName)}`,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
if (/\p{White_Space}/u.test(commandName)) {
|
|
56
|
+
throw new Error(
|
|
57
|
+
`CLI command name must not contain whitespace; received ${JSON.stringify(commandName)}`,
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
if (/\p{Control}/u.test(commandName)) {
|
|
61
|
+
throw new Error(
|
|
62
|
+
`CLI command name must not contain a control character; received ${JSON.stringify(commandName)}`,
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
if (commandName.startsWith("-")) {
|
|
66
|
+
throw new Error(
|
|
67
|
+
`CLI command name must not have a leading hyphen; received ${JSON.stringify(commandName)}`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
if (!/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u.test(commandName)) {
|
|
71
|
+
throw new Error(
|
|
72
|
+
`CLI command name must use lowercase ASCII letters, digits, and single hyphens; received ${JSON.stringify(commandName)}`,
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
if (reservedSystemToolNames.has(commandName)) {
|
|
76
|
+
throw new Error(
|
|
77
|
+
`CLI command name is a reserved system tool; received ${JSON.stringify(commandName)}`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
if (occupiedCommandNames.includes(commandName)) {
|
|
81
|
+
throw new Error(
|
|
82
|
+
`CLI command name is already used by another workspace package; received ${JSON.stringify(commandName)}`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
return commandName;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function cliCommandIdentity(
|
|
89
|
+
manifest: unknown,
|
|
90
|
+
occupiedCommandNames: readonly string[] = [],
|
|
91
|
+
): CliCommandIdentity {
|
|
92
|
+
if (
|
|
93
|
+
typeof manifest !== "object" ||
|
|
94
|
+
manifest === null ||
|
|
95
|
+
Array.isArray(manifest)
|
|
96
|
+
) {
|
|
97
|
+
throw new Error("CLI package manifest must be an object");
|
|
98
|
+
}
|
|
99
|
+
const manifestFacts = manifest as Readonly<Record<string, unknown>>;
|
|
100
|
+
if (
|
|
101
|
+
typeof manifestFacts.bin !== "object" ||
|
|
102
|
+
manifestFacts.bin === null ||
|
|
103
|
+
Array.isArray(manifestFacts.bin)
|
|
104
|
+
) {
|
|
105
|
+
throw new Error("CLI package manifest must declare exactly one bin");
|
|
106
|
+
}
|
|
107
|
+
const binEntries = Object.entries(manifestFacts.bin);
|
|
108
|
+
if (binEntries.length !== 1) {
|
|
109
|
+
throw new Error("CLI package manifest must declare exactly one bin");
|
|
110
|
+
}
|
|
111
|
+
const [commandName, executable] = binEntries[0]!;
|
|
112
|
+
if (executable !== "./dist/cli.js") {
|
|
113
|
+
throw new Error('CLI package manifest bin must execute "./dist/cli.js"');
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
let version = "unpublished";
|
|
117
|
+
if (manifestFacts.version !== undefined) {
|
|
118
|
+
if (
|
|
119
|
+
typeof manifestFacts.version !== "string" ||
|
|
120
|
+
manifestFacts.version.length === 0
|
|
121
|
+
) {
|
|
122
|
+
throw new Error(
|
|
123
|
+
"CLI package manifest version must be a non-empty string when present",
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
version = manifestFacts.version;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
commandName: validateCliCommandName(commandName, occupiedCommandNames),
|
|
131
|
+
version,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { cliCommandIdentity } from "./cli-command-identity.ts";
|
|
5
|
+
import { runCli, type CliRuntime } from "./main.ts";
|
|
5
6
|
|
|
6
7
|
const require = createRequire(import.meta.url);
|
|
7
|
-
const packageManifest = require("../package.json") as
|
|
8
|
+
const packageManifest = require("../package.json") as unknown;
|
|
8
9
|
|
|
9
10
|
const runtime: CliRuntime = {
|
|
10
11
|
argv: process.argv,
|
|
@@ -20,7 +21,7 @@ const runtime: CliRuntime = {
|
|
|
20
21
|
stdout: Boolean(process.stdout.isTTY),
|
|
21
22
|
stderr: Boolean(process.stderr.isTTY),
|
|
22
23
|
},
|
|
23
|
-
|
|
24
|
+
identity: cliCommandIdentity(packageManifest),
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
process.exitCode = await runCli(runtime);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command, CommanderError } from "commander";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import type { CliCommandIdentity } from "./cli-command-identity.ts";
|
|
4
|
+
|
|
4
5
|
export type Greeting = {
|
|
5
6
|
readonly message: string;
|
|
6
7
|
};
|
|
@@ -19,7 +20,7 @@ export type CliRuntime = {
|
|
|
19
20
|
readonly stdout: boolean;
|
|
20
21
|
readonly stderr: boolean;
|
|
21
22
|
};
|
|
22
|
-
readonly
|
|
23
|
+
readonly identity: CliCommandIdentity;
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
export function greet(name: string): Greeting {
|
|
@@ -36,9 +37,9 @@ function errorMessage(error: unknown): string {
|
|
|
36
37
|
|
|
37
38
|
export function createCliCommand(runtime: CliRuntime): Command {
|
|
38
39
|
const command = new Command()
|
|
39
|
-
.name(commandName)
|
|
40
|
+
.name(runtime.identity.commandName)
|
|
40
41
|
.description("A TypeScript command-line tool.")
|
|
41
|
-
.version(runtime.version)
|
|
42
|
+
.version(runtime.identity.version)
|
|
42
43
|
.configureOutput({
|
|
43
44
|
writeOut: (text) => runtime.streams.stdout.write(text),
|
|
44
45
|
writeErr: (text) => runtime.streams.stderr.write(text),
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
1
3
|
import { describe, expect, it } from "vitest";
|
|
2
4
|
|
|
5
|
+
import { cliCommandIdentity } from "../../src/cli-command-identity.ts";
|
|
3
6
|
import { runCli, type CliRuntime } from "../../src/main.ts";
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const packageManifest = require("../../package.json") as unknown;
|
|
10
|
+
const identity = cliCommandIdentity(packageManifest);
|
|
7
11
|
|
|
8
|
-
function testRuntime(
|
|
9
|
-
args: readonly string[],
|
|
10
|
-
version = "1.2.3",
|
|
11
|
-
): {
|
|
12
|
+
function testRuntime(args: readonly string[]): {
|
|
12
13
|
readonly runtime: CliRuntime;
|
|
13
14
|
readonly stdout: () => string;
|
|
14
15
|
readonly stderr: () => string;
|
|
@@ -17,7 +18,7 @@ function testRuntime(
|
|
|
17
18
|
let stderr = "";
|
|
18
19
|
return {
|
|
19
20
|
runtime: {
|
|
20
|
-
argv: ["node", commandName, ...args],
|
|
21
|
+
argv: ["node", identity.commandName, ...args],
|
|
21
22
|
streams: {
|
|
22
23
|
stdin: {},
|
|
23
24
|
stdout: { write: (chunk) => (stdout += chunk) },
|
|
@@ -26,7 +27,7 @@ function testRuntime(
|
|
|
26
27
|
cwd: "/workspace",
|
|
27
28
|
env: { MODE: "test" },
|
|
28
29
|
tty: { stdin: false, stdout: false, stderr: false },
|
|
29
|
-
|
|
30
|
+
identity,
|
|
30
31
|
},
|
|
31
32
|
stdout: () => stdout,
|
|
32
33
|
stderr: () => stderr,
|
|
@@ -42,11 +43,11 @@ describe("CLI command control", () => {
|
|
|
42
43
|
expect(output.stderr()).toBe("");
|
|
43
44
|
});
|
|
44
45
|
|
|
45
|
-
it("renders the
|
|
46
|
-
const output = testRuntime(["--version"]
|
|
46
|
+
it("renders the version derived from the package manifest", async () => {
|
|
47
|
+
const output = testRuntime(["--version"]);
|
|
47
48
|
|
|
48
49
|
await expect(runCli(output.runtime)).resolves.toBe(0);
|
|
49
|
-
expect(output.stdout()).toBe(
|
|
50
|
+
expect(output.stdout()).toBe(`${identity.version}\n`);
|
|
50
51
|
expect(output.stderr()).toBe("");
|
|
51
52
|
});
|
|
52
53
|
|
|
@@ -55,7 +56,7 @@ describe("CLI command control", () => {
|
|
|
55
56
|
|
|
56
57
|
await expect(runCli(output.runtime)).resolves.toBe(0);
|
|
57
58
|
expect(output.stdout()).toContain(
|
|
58
|
-
`Usage: ${commandName} [options] [command]`,
|
|
59
|
+
`Usage: ${identity.commandName} [options] [command]`,
|
|
59
60
|
);
|
|
60
61
|
expect(output.stdout()).toContain("greet <name>");
|
|
61
62
|
expect(output.stderr()).toBe("");
|
|
@@ -69,7 +70,7 @@ describe("CLI command control", () => {
|
|
|
69
70
|
expect(output.stderr()).toContain(
|
|
70
71
|
"error: missing required argument 'name'",
|
|
71
72
|
);
|
|
72
|
-
expect(output.stderr()).toContain(`Usage: ${commandName} greet`);
|
|
73
|
+
expect(output.stderr()).toContain(`Usage: ${identity.commandName} greet`);
|
|
73
74
|
});
|
|
74
75
|
|
|
75
76
|
it("adapts business validation into a testable command error", async () => {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
cliCommandIdentity,
|
|
5
|
+
validateCliCommandName,
|
|
6
|
+
} from "../../src/cli-command-identity.ts";
|
|
7
|
+
|
|
8
|
+
describe("CLI command identity", () => {
|
|
9
|
+
it.each([
|
|
10
|
+
{ name: "path separator", command: "tools/release", message: "path" },
|
|
11
|
+
{ name: "backslash path", command: "tools\\release", message: "path" },
|
|
12
|
+
{ name: "whitespace", command: "release tool", message: "whitespace" },
|
|
13
|
+
{ name: "control character", command: "release\u0000", message: "control" },
|
|
14
|
+
{ name: "leading hyphen", command: "-release", message: "leading hyphen" },
|
|
15
|
+
{ name: "uppercase ASCII", command: "Release", message: "lowercase ASCII" },
|
|
16
|
+
{ name: "non-ASCII", command: "发布", message: "lowercase ASCII" },
|
|
17
|
+
{ name: "system tool", command: "node", message: "reserved system tool" },
|
|
18
|
+
{ name: "Windows device", command: "con", message: "reserved system tool" },
|
|
19
|
+
{
|
|
20
|
+
name: "Windows null device",
|
|
21
|
+
command: "nul",
|
|
22
|
+
message: "reserved system tool",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "Windows serial device",
|
|
26
|
+
command: "com1",
|
|
27
|
+
message: "reserved system tool",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "Windows printer device",
|
|
31
|
+
command: "lpt9",
|
|
32
|
+
message: "reserved system tool",
|
|
33
|
+
},
|
|
34
|
+
])("rejects an unsafe command name: $name", ({ command, message }) => {
|
|
35
|
+
expect(() => validateCliCommandName(command)).toThrow(message);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("accepts a portable name unless another workspace command occupies it", () => {
|
|
39
|
+
expect(validateCliCommandName("release-tool", [])).toBe("release-tool");
|
|
40
|
+
expect(() =>
|
|
41
|
+
validateCliCommandName("release-tool", ["release-tool"]),
|
|
42
|
+
).toThrow("already used by another workspace package");
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("derives command and unpublished version only from manifest facts", () => {
|
|
46
|
+
expect(cliCommandIdentity({ bin: { release: "./dist/cli.js" } })).toEqual({
|
|
47
|
+
commandName: "release",
|
|
48
|
+
version: "unpublished",
|
|
49
|
+
});
|
|
50
|
+
expect(
|
|
51
|
+
cliCommandIdentity({
|
|
52
|
+
bin: { ship: "./dist/cli.js" },
|
|
53
|
+
version: "2.3.4",
|
|
54
|
+
}),
|
|
55
|
+
).toEqual({ commandName: "ship", version: "2.3.4" });
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it("rejects malformed manifest identity facts", () => {
|
|
59
|
+
expect(() => cliCommandIdentity(null)).toThrow("must be an object");
|
|
60
|
+
expect(() => cliCommandIdentity({ bin: {} })).toThrow("exactly one bin");
|
|
61
|
+
expect(() =>
|
|
62
|
+
cliCommandIdentity({
|
|
63
|
+
bin: { release: "./dist/cli.js", ship: "./dist/cli.js" },
|
|
64
|
+
}),
|
|
65
|
+
).toThrow("exactly one bin");
|
|
66
|
+
expect(() =>
|
|
67
|
+
cliCommandIdentity({ bin: { release: "./src/cli.ts" } }),
|
|
68
|
+
).toThrow('must execute "./dist/cli.js"');
|
|
69
|
+
expect(() =>
|
|
70
|
+
cliCommandIdentity({
|
|
71
|
+
bin: { release: "./dist/cli.js" },
|
|
72
|
+
version: 1,
|
|
73
|
+
}),
|
|
74
|
+
).toThrow("version must be a non-empty string");
|
|
75
|
+
});
|
|
76
|
+
});
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"module": "nodenext",
|
|
8
8
|
"moduleResolution": "nodenext",
|
|
9
9
|
"rewriteRelativeImportExtensions": true,
|
|
10
|
-
"target": "
|
|
10
|
+
"target": "es2024",
|
|
11
11
|
"types": ["node", "vitest/globals"]
|
|
12
12
|
},
|
|
13
|
-
"include": ["src/**/*.ts", "test/**/*.ts"]
|
|
13
|
+
"include": ["src/**/*.ts", "test/**/*.ts", "scripts/**/*.ts"]
|
|
14
14
|
}
|
|
@@ -5,14 +5,13 @@ import { drizzle } from "drizzle-orm/node-sqlite";
|
|
|
5
5
|
import { defineRelations } from "drizzle-orm/relations";
|
|
6
6
|
|
|
7
7
|
import * as schema from "#db/schema";
|
|
8
|
+
import { databaseStorageTarget } from "#db/storage";
|
|
8
9
|
|
|
9
10
|
const relations = defineRelations(schema);
|
|
10
|
-
const defaultDatabaseFile = "./data/app.sqlite";
|
|
11
|
-
|
|
12
11
|
export type Database = ReturnType<typeof createDatabase>;
|
|
13
12
|
|
|
14
|
-
export function createDatabase(databaseFile =
|
|
15
|
-
const file = databaseFile
|
|
13
|
+
export function createDatabase(databaseFile = databaseStorageTarget()) {
|
|
14
|
+
const file = databaseFile;
|
|
16
15
|
mkdirSync(path.dirname(file), { recursive: true });
|
|
17
16
|
return drizzle(file, { relations });
|
|
18
17
|
}
|
|
@@ -10,12 +10,13 @@ export function assertDatabaseReady(db: Database) {
|
|
|
10
10
|
.limit(1)
|
|
11
11
|
.all();
|
|
12
12
|
} catch (cause) {
|
|
13
|
+
const profile = process.env.DATABASE_PROFILE;
|
|
14
|
+
const preparation =
|
|
15
|
+
profile === "dev" || profile === "test" || profile === "e2e"
|
|
16
|
+
? `请在仓库根运行 \`pnpm run database:prepare:${profile}\``
|
|
17
|
+
: "请先使用配套 migration artifact 完成部署数据库迁移";
|
|
13
18
|
throw new Error(
|
|
14
|
-
|
|
15
|
-
"Database is not ready.",
|
|
16
|
-
"For local development, run `pnpm --dir apps/web dev`.",
|
|
17
|
-
"For deployment, run `pnpm --dir packages/db-migrations run db:prepare:deploy` before starting the app.",
|
|
18
|
-
].join(" "),
|
|
19
|
+
`DATABASE_NOT_READY: 数据库尚未就绪。${preparation} 后重试。`,
|
|
19
20
|
{ cause },
|
|
20
21
|
);
|
|
21
22
|
}
|