@ykdz/template 0.0.42 → 0.1.0-experimental.1
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 +38 -4
- package/dist/application.js +199 -138
- package/dist/cli.js +0 -5
- package/dist/input-schemas.d.ts +14 -0
- package/dist/input-schemas.js +27 -8
- package/dist/input-validation.d.ts +43 -0
- package/dist/input-validation.js +129 -0
- package/dist/main.js +157 -6
- package/dist/preset-catalog.d.ts +36 -0
- package/dist/preset-catalog.js +41 -0
- package/dist/result-schemas.d.ts +63 -34
- package/dist/result-schemas.js +5 -4
- package/dist/standard-schema.d.ts +1 -1
- package/dist/standard-schema.js +1 -9
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/util.d.ts +7 -4
- package/node_modules/@typescript/typescript-linux-x64/LICENSE +55 -0
- package/node_modules/@typescript/typescript-linux-x64/NOTICE.txt +436 -0
- package/node_modules/@typescript/typescript-linux-x64/README.md +3 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.d.ts +20 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.decorators.d.ts +382 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.decorators.legacy.d.ts +20 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.dom.asynciterable.d.ts +18 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.dom.d.ts +45125 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.dom.iterable.d.ts +18 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.collection.d.ts +159 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.core.d.ts +595 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.d.ts +26 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.generator.d.ts +75 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.iterable.d.ts +603 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.promise.d.ts +79 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.proxy.d.ts +126 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.reflect.d.ts +142 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.symbol.d.ts +44 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.array.include.d.ts +114 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.d.ts +19 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.full.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.intl.d.ts +29 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.arraybuffer.d.ts +19 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.d.ts +24 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.date.d.ts +29 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.full.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.intl.d.ts +42 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.object.d.ts +47 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.sharedmemory.d.ts +133 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.string.d.ts +47 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.typedarrays.d.ts +51 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.asyncgenerator.d.ts +75 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.asynciterable.d.ts +51 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.intl.d.ts +81 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.promise.d.ts +28 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.regexp.d.ts +35 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.array.d.ts +77 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.intl.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.object.d.ts +31 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.string.d.ts +35 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.symbol.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.bigint.d.ts +763 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.d.ts +25 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.date.d.ts +40 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.intl.d.ts +472 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.number.d.ts +26 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.promise.d.ts +45 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.sharedmemory.d.ts +97 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.string.d.ts +42 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.intl.d.ts +164 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.promise.d.ts +46 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.string.d.ts +31 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.weakref.d.ts +76 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.array.d.ts +119 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.d.ts +23 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.error.d.ts +73 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.intl.d.ts +143 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.object.d.ts +24 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.regexp.d.ts +37 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.string.d.ts +23 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.array.d.ts +922 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.collection.d.ts +19 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.d.ts +20 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.intl.d.ts +62 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.arraybuffer.d.ts +63 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.collection.d.ts +27 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.d.ts +24 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.object.d.ts +27 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.promise.d.ts +33 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.regexp.d.ts +23 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.sharedmemory.d.ts +66 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.string.d.ts +27 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.collection.d.ts +94 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.d.ts +23 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.float16.d.ts +443 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.intl.d.ts +200 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.iterator.d.ts +146 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.promise.d.ts +32 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.regexp.d.ts +30 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es5.d.ts +4599 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es6.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.array.d.ts +33 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.collection.d.ts +47 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.d.ts +27 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.date.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.decorators.d.ts +26 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.disposable.d.ts +191 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.error.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.intl.d.ts +107 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.sharedmemory.d.ts +23 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.temporal.d.ts +485 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.typedarrays.d.ts +90 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.scripthost.d.ts +320 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.asynciterable.d.ts +18 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.d.ts +15606 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.importscripts.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.iterable.d.ts +18 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/tsc +0 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/tsc.sig +11 -0
- package/node_modules/@typescript/typescript-linux-x64/package.json +45 -0
- package/node_modules/@ykdz/cli-contract/dist/cli-contract.d.ts +689 -184
- package/node_modules/@ykdz/cli-contract/dist/cli-contract.js +816 -243
- package/node_modules/@ykdz/cli-contract/dist/cli-execution.d.ts +11 -7
- package/node_modules/@ykdz/cli-contract/dist/cli-execution.js +69 -22
- package/node_modules/@ykdz/cli-contract/dist/cli-invocation.d.ts +80 -31
- package/node_modules/@ykdz/cli-contract/dist/cli-invocation.js +84 -26
- package/node_modules/@ykdz/cli-contract/dist/contract-definition-error.d.ts +40 -7
- package/node_modules/@ykdz/cli-contract/dist/contract-definition-error.js +28 -6
- package/node_modules/@ykdz/cli-contract/dist/contract-schema-compiler.js +17 -3
- package/node_modules/@ykdz/cli-contract/dist/contract-schema.d.ts +4 -0
- package/node_modules/@ykdz/cli-contract/dist/field-identity.d.ts +2 -0
- package/node_modules/@ykdz/cli-contract/dist/field-identity.js +16 -0
- package/node_modules/@ykdz/cli-contract/dist/index.d.ts +4 -3
- package/node_modules/@ykdz/cli-contract/dist/index.js +2 -2
- package/node_modules/@ykdz/cli-contract/dist/node.d.ts +1 -1
- package/node_modules/@ykdz/cli-contract/dist/node.js +1 -1
- package/node_modules/@ykdz/cli-contract/dist/outcome-fact.d.ts +42 -9
- package/node_modules/@ykdz/cli-contract/dist/outcome-fact.js +98 -24
- package/node_modules/@ykdz/cli-contract/dist/outcome-wire.d.ts +5 -5
- package/node_modules/@ykdz/cli-contract/dist/outcome-wire.js +75 -15
- package/node_modules/@ykdz/cli-contract/package.json +6 -5
- package/node_modules/@ykdz/preset-rust-bin/native/package.json +46 -0
- package/node_modules/@ykdz/preset-rust-bin/native/template-dist/definition.d.ts +43 -0
- package/node_modules/@ykdz/preset-rust-bin/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-rust-bin/native/template-dist/definition.js +21 -0
- package/node_modules/@ykdz/preset-rust-bin/package.json +20 -0
- package/node_modules/@ykdz/preset-ts-cli/native/package.json +48 -0
- package/node_modules/@ykdz/preset-ts-cli/native/template-dist/definition.d.ts +23 -0
- package/node_modules/@ykdz/preset-ts-cli/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-ts-cli/native/template-dist/definition.js +23 -0
- package/node_modules/@ykdz/preset-ts-cli/package.json +20 -0
- package/node_modules/@ykdz/preset-ts-lib/native/package.json +45 -0
- package/node_modules/@ykdz/preset-ts-lib/native/template-dist/definition.d.ts +23 -0
- package/node_modules/@ykdz/preset-ts-lib/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-ts-lib/native/template-dist/definition.js +21 -0
- package/node_modules/@ykdz/preset-ts-lib/package.json +20 -0
- package/node_modules/@ykdz/preset-vike-app/native/package.json +55 -0
- package/node_modules/@ykdz/preset-vike-app/native/resources/deployment/Dockerfile +76 -0
- package/node_modules/@ykdz/preset-vike-app/native/resources/deployment/container.dockerignore +11 -0
- package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → preset-vike-app/native/resources/deployment}/scripts/container-entrypoint.sh +0 -0
- package/node_modules/@ykdz/preset-vike-app/native/resources/deployment/setup-buildx-step.yml +3 -0
- package/node_modules/@ykdz/preset-vike-app/native/scripts/check-standalone-deployment.ts +570 -0
- package/node_modules/@ykdz/preset-vike-app/native/template-dist/definition.d.ts +35 -0
- package/node_modules/@ykdz/preset-vike-app/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-vike-app/native/template-dist/definition.js +61 -0
- package/node_modules/@ykdz/preset-vike-app/native/template-dist/deployment.d.ts +20 -0
- package/node_modules/@ykdz/preset-vike-app/native/template-dist/deployment.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-vike-app/native/template-dist/deployment.js +277 -0
- package/node_modules/@ykdz/preset-vike-app/package.json +24 -0
- package/node_modules/@ykdz/preset-vue-app/native/package.json +44 -0
- package/node_modules/@ykdz/preset-vue-app/native/template-dist/definition.d.ts +23 -0
- package/node_modules/@ykdz/preset-vue-app/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-vue-app/native/template-dist/definition.js +21 -0
- package/node_modules/@ykdz/preset-vue-app/package.json +20 -0
- package/node_modules/@ykdz/preset-vue-hono-app/native/package.json +50 -0
- package/node_modules/@ykdz/preset-vue-hono-app/native/resources/joint-e2e/playwright.config.ts +35 -0
- package/node_modules/@ykdz/preset-vue-hono-app/native/resources/joint-e2e/test/e2e/app.spec.ts +10 -0
- package/node_modules/@ykdz/preset-vue-hono-app/native/template-dist/definition.d.ts +33 -0
- package/node_modules/@ykdz/preset-vue-hono-app/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-vue-hono-app/native/template-dist/definition.js +129 -0
- package/node_modules/@ykdz/preset-vue-hono-app/package.json +21 -0
- package/node_modules/@ykdz/reference-hono-api/native/package.json +55 -0
- package/node_modules/@ykdz/reference-hono-api/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-hono-api/native/template-dist/definition.js +33 -0
- package/node_modules/@ykdz/reference-hono-api/native/tsconfig.build.json +11 -0
- package/node_modules/@ykdz/reference-hono-api/native/tsconfig.json +15 -0
- package/node_modules/@ykdz/reference-hono-api/native/turbo.json +67 -0
- package/node_modules/@ykdz/reference-hono-api/package.json +19 -0
- package/node_modules/@ykdz/reference-npm-publication/native/.changeset/config.json +4 -0
- package/node_modules/@ykdz/reference-npm-publication/native/README.md +11 -0
- package/node_modules/@ykdz/reference-npm-publication/native/package.json +38 -0
- package/node_modules/@ykdz/reference-npm-publication/native/resources/gitignore +1 -0
- package/node_modules/@ykdz/reference-npm-publication/native/resources/release.yml +70 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/definition.d.ts +5 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/definition.js +39 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/target.d.ts +13 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/target.d.ts.map +1 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/target.js +30 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/workspace.d.ts +11 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/workspace.d.ts.map +1 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/workspace.js +51 -0
- package/node_modules/@ykdz/reference-npm-publication/package.json +19 -0
- package/node_modules/@ykdz/reference-rust-bin/native/Cargo.lock +16 -0
- package/node_modules/@ykdz/reference-rust-bin/native/Cargo.toml +27 -0
- package/node_modules/@ykdz/reference-rust-bin/native/package.json +38 -0
- package/node_modules/@ykdz/reference-rust-bin/native/template/rust-toolchain.toml +3 -0
- package/node_modules/@ykdz/reference-rust-bin/native/template-dist/definition.d.ts +15 -0
- package/node_modules/@ykdz/reference-rust-bin/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/reference-rust-bin/native/template-dist/definition.js +145 -0
- package/node_modules/@ykdz/reference-rust-bin/native/tsconfig.json +8 -0
- package/node_modules/@ykdz/reference-rust-bin/native/turbo.json +63 -0
- package/node_modules/@ykdz/reference-rust-bin/package.json +20 -0
- package/node_modules/@ykdz/reference-tooling-config/native/node.json +13 -0
- package/node_modules/@ykdz/reference-tooling-config/native/oxlint.config.ts +8 -0
- package/node_modules/@ykdz/reference-tooling-config/native/package.json +37 -0
- package/node_modules/@ykdz/reference-tooling-config/native/template-dist/definition.d.ts +27 -0
- package/node_modules/@ykdz/reference-tooling-config/native/template-dist/definition.js +27 -0
- package/node_modules/@ykdz/reference-tooling-config/native/tsconfig.json +9 -0
- package/node_modules/@ykdz/reference-tooling-config/native/turbo.json +51 -0
- package/node_modules/@ykdz/reference-tooling-config/package.json +16 -0
- package/node_modules/@ykdz/reference-ts-cli/native/package.json +56 -0
- package/node_modules/@ykdz/reference-ts-cli/native/src/cli.ts +17 -0
- package/node_modules/@ykdz/reference-ts-cli/native/src/main.ts +162 -0
- package/node_modules/@ykdz/reference-ts-cli/native/template-dist/definition.d.ts +8 -0
- package/node_modules/@ykdz/reference-ts-cli/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/reference-ts-cli/native/template-dist/definition.js +80 -0
- package/node_modules/@ykdz/reference-ts-cli/native/test/e2e/journey.ts +31 -0
- package/node_modules/@ykdz/reference-ts-cli/native/test/e2e/journeys/lookup.journey.ts +76 -0
- package/node_modules/@ykdz/reference-ts-cli/native/test/e2e/run-journeys.ts +240 -0
- package/node_modules/@ykdz/reference-ts-cli/native/test/e2e/source-journeys.test.ts +9 -0
- package/node_modules/@ykdz/reference-ts-cli/native/test/integration/command.test.ts +147 -0
- package/node_modules/@ykdz/reference-ts-cli/native/test/unit/cli-command-identity.test.ts +76 -0
- package/node_modules/@ykdz/reference-ts-cli/native/tsconfig.build.json +12 -0
- package/node_modules/@ykdz/reference-ts-cli/native/tsconfig.json +8 -0
- package/node_modules/@ykdz/reference-ts-cli/native/tsconfig.node.json +7 -0
- package/node_modules/@ykdz/reference-ts-cli/native/turbo.json +75 -0
- package/node_modules/@ykdz/reference-ts-cli/package.json +20 -0
- package/node_modules/@ykdz/reference-ts-lib/native/package.json +57 -0
- package/node_modules/@ykdz/reference-ts-lib/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-ts-lib/native/template-dist/definition.js +43 -0
- package/node_modules/@ykdz/reference-ts-lib/native/tsconfig.build.json +9 -0
- package/node_modules/@ykdz/reference-ts-lib/native/tsconfig.json +8 -0
- package/node_modules/@ykdz/reference-ts-lib/native/tsconfig.node.json +8 -0
- package/node_modules/@ykdz/reference-ts-lib/native/turbo.json +63 -0
- package/node_modules/@ykdz/reference-ts-lib/package.json +20 -0
- package/node_modules/@ykdz/reference-vike-db/native/package.json +83 -0
- package/node_modules/@ykdz/reference-vike-db/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-vike-db/native/template-dist/definition.js +39 -0
- package/node_modules/@ykdz/reference-vike-db/native/tsconfig.build.json +12 -0
- package/node_modules/@ykdz/reference-vike-db/native/tsconfig.json +11 -0
- package/node_modules/@ykdz/reference-vike-db/native/tsconfig.node.json +19 -0
- package/node_modules/@ykdz/reference-vike-db/native/tsconfig.scripts.json +13 -0
- package/node_modules/@ykdz/reference-vike-db/native/turbo.json +67 -0
- package/node_modules/@ykdz/reference-vike-db/package.json +19 -0
- package/node_modules/@ykdz/reference-vike-migrations/native/drizzle.config.ts +22 -0
- package/node_modules/@ykdz/reference-vike-migrations/native/package.json +51 -0
- package/node_modules/@ykdz/reference-vike-migrations/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-vike-migrations/native/template-dist/definition.js +39 -0
- package/node_modules/@ykdz/reference-vike-migrations/native/tsconfig.json +15 -0
- package/node_modules/@ykdz/reference-vike-migrations/native/turbo.json +76 -0
- package/node_modules/@ykdz/reference-vike-migrations/package.json +19 -0
- package/node_modules/@ykdz/reference-vike-web/native/package.json +84 -0
- package/node_modules/@ykdz/reference-vike-web/native/pages/index/+Page.telefunc.ts +12 -0
- package/node_modules/@ykdz/reference-vike-web/native/pages/index/+Page.vue +89 -0
- package/node_modules/@ykdz/reference-vike-web/native/server/app.ts +36 -0
- package/node_modules/@ykdz/reference-vike-web/native/server/database.ts +2 -0
- package/node_modules/@ykdz/reference-vike-web/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-vike-web/native/template-dist/definition.js +59 -0
- package/node_modules/@ykdz/reference-vike-web/native/test/e2e/app.spec.ts +16 -0
- package/node_modules/@ykdz/reference-vike-web/native/test/todos.browser.test.ts +37 -0
- package/node_modules/@ykdz/reference-vike-web/native/tooling/vite.ts +5 -0
- package/node_modules/@ykdz/reference-vike-web/native/tsconfig.app.json +27 -0
- package/node_modules/@ykdz/reference-vike-web/native/tsconfig.json +11 -0
- package/node_modules/@ykdz/reference-vike-web/native/tsconfig.node.json +33 -0
- package/node_modules/@ykdz/reference-vike-web/native/turbo.json +92 -0
- package/node_modules/@ykdz/reference-vike-web/native/types/global.d.ts +9 -0
- package/node_modules/@ykdz/reference-vike-web/native/vite.config.ts +16 -0
- package/node_modules/@ykdz/reference-vike-web/native/vitest.config.ts +37 -0
- package/node_modules/@ykdz/reference-vike-web/package.json +20 -0
- package/node_modules/@ykdz/reference-vue-app/native/TESTING.md +7 -0
- package/node_modules/@ykdz/reference-vue-app/native/package.json +70 -0
- package/node_modules/@ykdz/reference-vue-app/native/src/components/CounterButton.vue +18 -0
- package/node_modules/@ykdz/reference-vue-app/native/src/style.css +2 -0
- package/node_modules/@ykdz/reference-vue-app/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-vue-app/native/template-dist/definition.js +53 -0
- package/node_modules/@ykdz/reference-vue-app/native/test/app.browser.test.ts +13 -0
- package/node_modules/@ykdz/reference-vue-app/native/test/counter.node.test.ts +15 -0
- package/node_modules/@ykdz/reference-vue-app/native/test/e2e/app.spec.ts +15 -0
- package/node_modules/@ykdz/reference-vue-app/native/tsconfig.app.json +18 -0
- package/node_modules/@ykdz/reference-vue-app/native/tsconfig.json +11 -0
- package/node_modules/@ykdz/reference-vue-app/native/tsconfig.node.json +25 -0
- package/node_modules/@ykdz/reference-vue-app/native/turbo.json +84 -0
- package/node_modules/@ykdz/reference-vue-app/native/vite.config.ts +8 -0
- package/node_modules/@ykdz/reference-vue-app/native/vitest.config.ts +37 -0
- package/node_modules/@ykdz/reference-vue-app/package.json +20 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/TESTING.md +7 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/package.json +66 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/src/App.vue +49 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/src/main.ts +7 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/src/style.css +2 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/template-dist/definition.js +49 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/test/app.browser.test.ts +13 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/tsconfig.app.json +18 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/tsconfig.json +11 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/tsconfig.node.json +25 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/turbo.json +74 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/vite.config.ts +28 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/vitest.config.ts +37 -0
- package/node_modules/@ykdz/reference-vue-hono-web/package.json +20 -0
- package/node_modules/@ykdz/template-content/dist/index.d.ts +14 -0
- package/node_modules/@ykdz/template-content/dist/index.js +9 -0
- package/node_modules/@ykdz/template-content/dist/template-members.d.ts +9 -0
- package/node_modules/@ykdz/template-content/dist/template-members.js +16 -0
- package/node_modules/@ykdz/template-content/package.json +18 -0
- package/node_modules/@ykdz/template-content-provider-51cfac9642dc43a4/dist/index.d.ts +45 -0
- package/node_modules/@ykdz/template-content-provider-51cfac9642dc43a4/dist/index.js +30 -0
- package/node_modules/@ykdz/template-content-provider-51cfac9642dc43a4/package.json +35 -0
- package/node_modules/@ykdz/template-core/dist/content-identity.d.ts +42 -0
- package/node_modules/@ykdz/template-core/dist/content-identity.js +117 -0
- package/node_modules/@ykdz/template-core/dist/generation-record.d.ts +28 -0
- package/node_modules/@ykdz/template-core/dist/generation-record.js +45 -0
- package/node_modules/@ykdz/template-core/dist/package-contribution.d.ts +3 -81
- package/node_modules/@ykdz/template-core/dist/package-contribution.js +19 -64
- package/node_modules/@ykdz/template-core/dist/preset-definition.d.ts +73 -97
- package/node_modules/@ykdz/template-core/dist/preset-definition.js +107 -15
- package/node_modules/@ykdz/template-core/dist/project-blueprint.d.ts +3 -11
- package/node_modules/@ykdz/template-core/dist/project-blueprint.js +23 -71
- package/node_modules/@ykdz/template-core/dist/project-projection.js +4 -17
- package/node_modules/@ykdz/template-core/dist/renderer-policy-snapshot.d.ts +1 -0
- package/node_modules/@ykdz/template-core/dist/renderer-policy-snapshot.js +2 -0
- package/node_modules/@ykdz/template-core/dist/renderer.d.ts +7 -25
- package/node_modules/@ykdz/template-core/dist/renderer.js +14 -252
- package/node_modules/@ykdz/template-core/dist/toml.d.ts +6 -0
- package/node_modules/@ykdz/template-core/dist/toml.js +31 -0
- package/node_modules/@ykdz/template-core/dist/workspace-strategy.d.ts +188 -0
- package/node_modules/@ykdz/template-core/dist/workspace-strategy.js +1 -0
- package/node_modules/@ykdz/template-core/package.json +24 -20
- package/node_modules/@ykdz/template-environment/dist/development-container-tool-layer.d.ts +65 -0
- package/node_modules/@ykdz/template-environment/dist/development-container-tool-layer.js +414 -0
- package/node_modules/@ykdz/template-environment/package.json +36 -0
- package/node_modules/@ykdz/template-generator/dist/content-source.d.ts +13 -0
- package/node_modules/@ykdz/template-generator/dist/content-source.js +181 -0
- package/node_modules/@ykdz/template-generator/dist/index.d.ts +82 -0
- package/node_modules/@ykdz/template-generator/dist/index.js +1147 -0
- package/node_modules/@ykdz/template-generator/package.json +41 -0
- package/node_modules/@ykdz/template-workspace/assets/environment/devcontainer/workspace-template.json +16 -0
- package/node_modules/@ykdz/template-workspace/assets/github/check.yml +83 -0
- package/node_modules/@ykdz/template-workspace/assets/github/dependabot.yml +49 -0
- package/node_modules/@ykdz/template-workspace/assets/next-steps.md +3 -0
- package/node_modules/@ykdz/template-workspace/assets/tsconfig.config.json +6 -0
- package/node_modules/@ykdz/template-workspace/assets/turbo.json +64 -0
- package/node_modules/@ykdz/template-workspace/dist/application-requirements.d.ts +14 -0
- package/node_modules/@ykdz/template-workspace/dist/application-requirements.js +42 -0
- package/node_modules/@ykdz/template-workspace/dist/ci-diagnostic-artifact.d.ts +17 -0
- package/node_modules/@ykdz/template-workspace/dist/ci-diagnostic-artifact.js +74 -0
- package/node_modules/@ykdz/template-workspace/dist/default-environment-sources.d.ts +5 -0
- package/node_modules/@ykdz/template-workspace/dist/default-environment-sources.js +8 -0
- package/node_modules/@ykdz/template-workspace/dist/default-environment.d.ts +9 -0
- package/node_modules/@ykdz/template-workspace/dist/default-environment.js +5 -0
- package/node_modules/@ykdz/template-workspace/dist/default-package-identity.d.ts +19 -0
- package/node_modules/@ykdz/template-workspace/dist/default-package-identity.js +128 -0
- package/node_modules/@ykdz/template-workspace/dist/default-package-role.d.ts +4 -0
- package/node_modules/@ykdz/template-workspace/dist/default-package-role.js +9 -0
- package/node_modules/@ykdz/template-workspace/dist/default-workspace-strategy.d.ts +89 -0
- package/node_modules/@ykdz/template-workspace/dist/default-workspace-strategy.js +967 -0
- package/node_modules/@ykdz/template-workspace/dist/dependency-catalog.d.ts +25 -0
- package/node_modules/@ykdz/template-workspace/dist/dependency-catalog.js +159 -0
- package/node_modules/@ykdz/template-workspace/dist/development-container.d.ts +3 -0
- package/node_modules/@ykdz/template-workspace/dist/development-container.js +36 -0
- package/node_modules/@ykdz/template-workspace/dist/development-environment.d.ts +36 -0
- package/node_modules/@ykdz/template-workspace/dist/development-environment.js +241 -0
- package/node_modules/@ykdz/template-workspace/dist/editor-customization.d.ts +18 -0
- package/node_modules/@ykdz/template-workspace/dist/editor-customization.js +83 -0
- package/node_modules/@ykdz/template-workspace/dist/environment-needs.d.ts +51 -0
- package/node_modules/@ykdz/template-workspace/dist/environment-needs.js +167 -0
- package/node_modules/@ykdz/template-workspace/dist/generation-context.d.ts +14 -0
- package/node_modules/@ykdz/template-workspace/dist/package-addition-facts.d.ts +21 -0
- package/node_modules/@ykdz/template-workspace/dist/package-addition-facts.js +90 -0
- package/node_modules/@ykdz/template-workspace/dist/package-contribution.d.ts +64 -0
- package/node_modules/@ykdz/template-workspace/dist/package-contribution.js +65 -0
- package/node_modules/@ykdz/template-workspace/dist/project-github.d.ts +24 -0
- package/node_modules/@ykdz/template-workspace/dist/project-github.js +98 -0
- package/node_modules/@ykdz/template-workspace/dist/project-linking.d.ts +48 -0
- package/node_modules/@ykdz/template-workspace/dist/project-linking.js +218 -0
- package/node_modules/@ykdz/template-workspace/dist/project-requirements.d.ts +17 -0
- package/node_modules/@ykdz/template-workspace/dist/reference-package.d.ts +146 -0
- package/node_modules/@ykdz/template-workspace/dist/reference-package.js +521 -0
- package/node_modules/@ykdz/template-workspace/dist/release-toolchain-snapshot.d.ts +6 -0
- package/node_modules/@ykdz/template-workspace/dist/release-toolchain-snapshot.js +6 -0
- package/node_modules/@ykdz/template-workspace/dist/root-projection.d.ts +29 -0
- package/node_modules/@ykdz/template-workspace/dist/root-projection.js +144 -0
- package/node_modules/@ykdz/template-workspace/dist/rust-target-projection.d.ts +35 -0
- package/node_modules/@ykdz/template-workspace/dist/rust-target-projection.js +74 -0
- package/node_modules/@ykdz/template-workspace/dist/rust-toolchain-facts.d.ts +22 -0
- package/node_modules/@ykdz/template-workspace/dist/rust-toolchain-facts.js +64 -0
- package/node_modules/@ykdz/template-workspace/dist/shared-root-files.d.ts +99 -0
- package/node_modules/@ykdz/template-workspace/dist/shared-root-files.js +159 -0
- package/node_modules/@ykdz/template-workspace/dist/vue-policy.d.ts +5 -0
- package/node_modules/@ykdz/template-workspace/dist/vue-policy.js +5 -0
- package/node_modules/@ykdz/template-workspace/dist/workspace-policy-snapshot.d.ts +20 -0
- package/node_modules/@ykdz/template-workspace/dist/workspace-policy-snapshot.js +86 -0
- package/node_modules/@ykdz/template-workspace/dist/workspace-resources.d.ts +23 -0
- package/node_modules/@ykdz/template-workspace/dist/workspace-resources.js +83 -0
- package/node_modules/@ykdz/template-workspace/package.json +135 -0
- package/node_modules/@ykdz/template-workspace/resources/oxfmt.config.ts +1 -0
- package/node_modules/@ykdz/template-workspace/resources/oxlint.config.ts +4 -0
- package/node_modules/@ykdz/template-workspace/scripts/sync-snapshot.ts +27 -0
- package/node_modules/@ykdz/template-workspace/scripts/task-gates.ts +631 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/content-artifact.d.ts +57 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/content-artifact.js +168 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/package-name-projection.d.ts +2 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/package-name-projection.js +22 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/resource-ignore-snapshot.d.ts +1 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/resource-ignore-snapshot.js +2 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/typescript-module-specifiers.d.ts +2 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/typescript-module-specifiers.js +36 -0
- package/node_modules/@ykdz/template-workspace-authoring/package.json +55 -0
- package/node_modules/eslint-visitor-keys/LICENSE +201 -0
- package/node_modules/eslint-visitor-keys/README.md +123 -0
- package/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +187 -0
- package/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts +28 -0
- package/node_modules/eslint-visitor-keys/dist/index.d.ts +16 -0
- package/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts +12 -0
- package/node_modules/eslint-visitor-keys/lib/index.js +67 -0
- package/node_modules/eslint-visitor-keys/lib/visitor-keys.js +118 -0
- package/node_modules/eslint-visitor-keys/package.json +57 -0
- package/node_modules/ignore/LICENSE-MIT +21 -0
- package/node_modules/ignore/README.md +501 -0
- package/node_modules/ignore/index.d.ts +81 -0
- package/node_modules/ignore/index.js +1566 -0
- package/node_modules/ignore/legacy.js +1346 -0
- package/node_modules/ignore/package.json +93 -0
- package/node_modules/smol-toml/dist/extract.js +5 -1
- package/node_modules/smol-toml/dist/index.cjs +2 -1
- package/node_modules/smol-toml/package.json +6 -6
- package/node_modules/toml-eslint-parser/LICENSE +21 -0
- package/node_modules/toml-eslint-parser/README.md +192 -0
- package/node_modules/toml-eslint-parser/lib/chunk-15K8U1wQ.mjs +18 -0
- package/node_modules/toml-eslint-parser/lib/index.d.mts +284 -0
- package/node_modules/toml-eslint-parser/lib/index.mjs +2219 -0
- package/node_modules/toml-eslint-parser/package.json +102 -0
- package/node_modules/typescript-7/LICENSE +55 -0
- package/node_modules/typescript-7/NOTICE.txt +436 -0
- package/node_modules/typescript-7/README.md +49 -0
- package/node_modules/typescript-7/bin/tsc +2 -0
- package/node_modules/typescript-7/dist/api/async/api.d.ts +529 -0
- package/node_modules/typescript-7/dist/api/async/api.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/async/api.js +1657 -0
- package/node_modules/typescript-7/dist/api/async/api.js.map +1 -0
- package/node_modules/typescript-7/dist/api/async/client.d.ts +39 -0
- package/node_modules/typescript-7/dist/api/async/client.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/async/client.js +211 -0
- package/node_modules/typescript-7/dist/api/async/client.js.map +1 -0
- package/node_modules/typescript-7/dist/api/async/types.d.ts +310 -0
- package/node_modules/typescript-7/dist/api/async/types.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/async/types.js +2 -0
- package/node_modules/typescript-7/dist/api/async/types.js.map +1 -0
- package/node_modules/typescript-7/dist/api/compilerOptions.d.ts +109 -0
- package/node_modules/typescript-7/dist/api/compilerOptions.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/compilerOptions.js +2 -0
- package/node_modules/typescript-7/dist/api/compilerOptions.js.map +1 -0
- package/node_modules/typescript-7/dist/api/fs.d.ts +23 -0
- package/node_modules/typescript-7/dist/api/fs.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/fs.js +109 -0
- package/node_modules/typescript-7/dist/api/fs.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/encoder.d.ts +15 -0
- package/node_modules/typescript-7/dist/api/node/encoder.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/encoder.generated.d.ts +5 -0
- package/node_modules/typescript-7/dist/api/node/encoder.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/encoder.generated.js +74 -0
- package/node_modules/typescript-7/dist/api/node/encoder.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/encoder.js +287 -0
- package/node_modules/typescript-7/dist/api/node/encoder.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/msgpack.d.ts +32 -0
- package/node_modules/typescript-7/dist/api/node/msgpack.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/msgpack.js +213 -0
- package/node_modules/typescript-7/dist/api/node/msgpack.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/node.d.ts +76 -0
- package/node_modules/typescript-7/dist/api/node/node.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/node.generated.d.ts +182 -0
- package/node_modules/typescript-7/dist/api/node/node.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/node.generated.js +835 -0
- package/node_modules/typescript-7/dist/api/node/node.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/node.infrastructure.d.ts +62 -0
- package/node_modules/typescript-7/dist/api/node/node.infrastructure.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/node.infrastructure.js +122 -0
- package/node_modules/typescript-7/dist/api/node/node.infrastructure.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/node.js +298 -0
- package/node_modules/typescript-7/dist/api/node/node.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/protocol.d.ts +29 -0
- package/node_modules/typescript-7/dist/api/node/protocol.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/protocol.generated.d.ts +4 -0
- package/node_modules/typescript-7/dist/api/node/protocol.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/protocol.generated.js +241 -0
- package/node_modules/typescript-7/dist/api/node/protocol.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/protocol.js +30 -0
- package/node_modules/typescript-7/dist/api/node/protocol.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/wtf8.d.ts +6 -0
- package/node_modules/typescript-7/dist/api/node/wtf8.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/wtf8.js +61 -0
- package/node_modules/typescript-7/dist/api/node/wtf8.js.map +1 -0
- package/node_modules/typescript-7/dist/api/options.d.ts +32 -0
- package/node_modules/typescript-7/dist/api/options.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/options.js +11 -0
- package/node_modules/typescript-7/dist/api/options.js.map +1 -0
- package/node_modules/typescript-7/dist/api/path.d.ts +110 -0
- package/node_modules/typescript-7/dist/api/path.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/path.js +508 -0
- package/node_modules/typescript-7/dist/api/path.js.map +1 -0
- package/node_modules/typescript-7/dist/api/proto.d.ts +239 -0
- package/node_modules/typescript-7/dist/api/proto.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/proto.js +37 -0
- package/node_modules/typescript-7/dist/api/proto.js.map +1 -0
- package/node_modules/typescript-7/dist/api/sourceFileCache.d.ts +79 -0
- package/node_modules/typescript-7/dist/api/sourceFileCache.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/sourceFileCache.js +169 -0
- package/node_modules/typescript-7/dist/api/sourceFileCache.js.map +1 -0
- package/node_modules/typescript-7/dist/api/sync/api.d.ts +529 -0
- package/node_modules/typescript-7/dist/api/sync/api.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/sync/api.js +1665 -0
- package/node_modules/typescript-7/dist/api/sync/api.js.map +1 -0
- package/node_modules/typescript-7/dist/api/sync/client.d.ts +30 -0
- package/node_modules/typescript-7/dist/api/sync/client.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/sync/client.js +124 -0
- package/node_modules/typescript-7/dist/api/sync/client.js.map +1 -0
- package/node_modules/typescript-7/dist/api/sync/types.d.ts +310 -0
- package/node_modules/typescript-7/dist/api/sync/types.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/sync/types.js +2 -0
- package/node_modules/typescript-7/dist/api/sync/types.js.map +1 -0
- package/node_modules/typescript-7/dist/api/syncChannel.d.ts +114 -0
- package/node_modules/typescript-7/dist/api/syncChannel.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/syncChannel.js +508 -0
- package/node_modules/typescript-7/dist/api/syncChannel.js.map +1 -0
- package/node_modules/typescript-7/dist/api/timing.d.ts +175 -0
- package/node_modules/typescript-7/dist/api/timing.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/timing.js +149 -0
- package/node_modules/typescript-7/dist/api/timing.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/ast.d.ts +100 -0
- package/node_modules/typescript-7/dist/ast/ast.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/ast.generated.d.ts +1161 -0
- package/node_modules/typescript-7/dist/ast/ast.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/ast.generated.js +4 -0
- package/node_modules/typescript-7/dist/ast/ast.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/ast.js +7 -0
- package/node_modules/typescript-7/dist/ast/ast.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/astnav.d.ts +19 -0
- package/node_modules/typescript-7/dist/ast/astnav.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/astnav.js +596 -0
- package/node_modules/typescript-7/dist/ast/astnav.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/clone.d.ts +16 -0
- package/node_modules/typescript-7/dist/ast/clone.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/clone.js +104 -0
- package/node_modules/typescript-7/dist/ast/clone.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/factory.generated.d.ts +520 -0
- package/node_modules/typescript-7/dist/ast/factory.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/factory.generated.js +3057 -0
- package/node_modules/typescript-7/dist/ast/factory.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/index.d.ts +20 -0
- package/node_modules/typescript-7/dist/ast/index.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/index.js +20 -0
- package/node_modules/typescript-7/dist/ast/index.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/is.d.ts +35 -0
- package/node_modules/typescript-7/dist/ast/is.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/is.generated.d.ts +329 -0
- package/node_modules/typescript-7/dist/ast/is.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/is.generated.js +1103 -0
- package/node_modules/typescript-7/dist/ast/is.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/is.js +233 -0
- package/node_modules/typescript-7/dist/ast/is.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/jsdoc.d.ts +11 -0
- package/node_modules/typescript-7/dist/ast/jsdoc.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/jsdoc.js +202 -0
- package/node_modules/typescript-7/dist/ast/jsdoc.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/scanner.d.ts +97 -0
- package/node_modules/typescript-7/dist/ast/scanner.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/scanner.js +2230 -0
- package/node_modules/typescript-7/dist/ast/scanner.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/utils.d.ts +17 -0
- package/node_modules/typescript-7/dist/ast/utils.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/utils.js +67 -0
- package/node_modules/typescript-7/dist/ast/utils.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/visitor.d.ts +14 -0
- package/node_modules/typescript-7/dist/ast/visitor.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/visitor.generated.d.ts +50 -0
- package/node_modules/typescript-7/dist/ast/visitor.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/visitor.generated.js +978 -0
- package/node_modules/typescript-7/dist/ast/visitor.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/visitor.js +47 -0
- package/node_modules/typescript-7/dist/ast/visitor.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.enum.d.ts +129 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.enum.js +132 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.js +130 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.enum.d.ts +5 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.enum.js +6 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.js +6 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.enum.d.ts +28 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.enum.js +30 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.js +30 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.enum.d.ts +7 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.enum.js +9 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.js +9 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.enum.d.ts +12 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.enum.js +14 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.js +14 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.enum.d.ts +23 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.enum.js +25 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.js +25 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.enum.d.ts +9 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.enum.js +11 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.js +11 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.enum.d.ts +5 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.enum.js +6 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.js +6 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.enum.d.ts +42 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.enum.js +44 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.js +44 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.enum.d.ts +7 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.enum.js +9 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.js +9 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.enum.d.ts +17 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.enum.js +19 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.js +19 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.enum.d.ts +9 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.enum.js +11 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.js +11 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.enum.d.ts +6 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.enum.js +8 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.js +8 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.enum.d.ts +36 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.enum.js +38 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.js +38 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.enum.d.ts +44 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.enum.js +46 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.js +46 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.enum.d.ts +50 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.enum.js +52 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.js +52 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.enum.d.ts +16 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.enum.js +18 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.js +18 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.enum.d.ts +13 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.enum.js +14 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.js +14 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.enum.d.ts +11 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.enum.js +12 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.js +12 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.enum.d.ts +17 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.enum.js +18 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.js +18 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.enum.d.ts +15 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.enum.js +17 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.js +17 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.enum.d.ts +5 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.enum.js +7 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.js +7 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.enum.d.ts +71 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.enum.js +73 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.js +73 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.enum.d.ts +389 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.enum.js +391 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.js +391 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.enum.d.ts +30 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.enum.js +32 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.js +32 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.enum.d.ts +76 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.enum.js +78 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.js +78 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.enum.d.ts +7 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.enum.js +9 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.js +9 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.js.map +1 -0
- package/node_modules/typescript-7/dist/internal/utils.d.ts +23 -0
- package/node_modules/typescript-7/dist/internal/utils.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/internal/utils.js +25 -0
- package/node_modules/typescript-7/dist/internal/utils.js.map +1 -0
- package/node_modules/typescript-7/lib/getExePath.d.ts +2 -0
- package/node_modules/typescript-7/lib/getExePath.js +70 -0
- package/node_modules/typescript-7/lib/tsc.js +28 -0
- package/node_modules/typescript-7/lib/version.cjs +3 -0
- package/node_modules/typescript-7/lib/version.d.cts +2 -0
- package/node_modules/typescript-7/package.json +87 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/License.txt +11 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/README.md +54 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/browser/main.d.ts +17 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/browser/main.js +83 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/browser/ril.d.ts +22 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/browser/ril.js +210 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/api.d.ts +14 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/api.js +87 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts +32 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/cancellation.js +132 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/connection.d.ts +367 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/connection.js +1271 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/disposable.d.ts +9 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/disposable.js +16 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/encoding.d.ts +52 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/encoding.js +70 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/events.d.ts +39 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/events.js +135 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/is.d.ts +7 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/is.js +34 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts +55 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/linkedMap.js +412 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts +18 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageBuffer.js +155 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts +77 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageReader.js +246 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts +60 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageWriter.js +157 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messages.d.ts +369 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messages.js +436 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/ral.d.ts +74 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/ral.js +23 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts +10 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/semaphore.js +74 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +15 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +77 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/node/main.d.ts +58 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/node/main.js +289 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/node/ril.d.ts +12 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/node/ril.js +163 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/package.json +54 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/typings/thenable.d.ts +5 -0
- package/package.json +110 -34
- package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.d.ts +0 -243
- package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.js +0 -3567
- package/node_modules/@ykdz/template-builtin-presets/dist/src/generation-record.d.ts +0 -58
- package/node_modules/@ykdz/template-builtin-presets/dist/src/generation-record.js +0 -178
- package/node_modules/@ykdz/template-builtin-presets/dist/src/index.d.ts +0 -4
- package/node_modules/@ykdz/template-builtin-presets/dist/src/index.js +0 -3
- package/node_modules/@ykdz/template-builtin-presets/dist/src/rust-bin/definition.d.ts +0 -31
- package/node_modules/@ykdz/template-builtin-presets/dist/src/rust-bin/definition.js +0 -193
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/development-container.d.ts +0 -3
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/development-container.js +0 -52
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/typescript.d.ts +0 -16
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/typescript.js +0 -74
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.d.ts +0 -36
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.js +0 -117
- package/node_modules/@ykdz/template-builtin-presets/dist/src/template-sources.d.ts +0 -15
- package/node_modules/@ykdz/template-builtin-presets/dist/src/template-sources.js +0 -27
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-cli/definition.d.ts +0 -31
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-cli/definition.js +0 -253
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-lib/definition.d.ts +0 -31
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-lib/definition.js +0 -155
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vike-app/definition.d.ts +0 -48
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vike-app/definition.js +0 -541
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-app/definition.d.ts +0 -26
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-app/definition.js +0 -113
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-hono-app/definition.d.ts +0 -22
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-hono-app/definition.js +0 -204
- package/node_modules/@ykdz/template-builtin-presets/package.json +0 -107
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/dependabot-rust.yml +0 -41
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/dependabot.dynamic.template +0 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/dependabot.yml +0 -33
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check-deployment-diagnostics.yml +0 -82
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check-deployment.yml +0 -42
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check-diagnostics.yml +0 -80
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check.yml +0 -40
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.pnpmfile.mjs +0 -19
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/TODO.md.template +0 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/devcontainer.json +0 -18
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.dynamic.txt +0 -24
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.yaml +0 -35
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/check-toolchain-versions.ts +0 -556
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/node-test-count-reporter.ts +0 -31
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/run-rust-tests.ts +0 -100
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/run-turbo-boundaries.ts +0 -74
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/task-gates.ts +0 -589
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/tsconfig.packing-hook.json +0 -7
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo-boundary-tags/app.json +0 -7
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo-boundary-tags/library.json +0 -7
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo-projections/database-preparation.json +0 -17
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo-projections/deployment.json +0 -13
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo-projections/rust-toolchain.json +0 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo-projections/vue-hono-joint-e2e.json +0 -13
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo.json +0 -20
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/typescript-config/turbo.json +0 -33
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/.github/dependabot.yml +0 -41
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/.vscode/extensions.json +0 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/.vscode/settings.json +0 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/Cargo.lock +0 -16
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/Cargo.toml +0 -27
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/rust-toolchain.toml +0 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/tsconfig.scripts.json +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/turbo.json +0 -37
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/oxc/node/oxlint.config.ts +0 -8
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/oxc/tsconfig.config.json +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/src/components/CounterButton.vue +0 -18
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/src/style.css +0 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/test/counter.browser.test.ts +0 -16
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/test/counter.node.test.ts +0 -15
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.app.json +0 -18
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.json +0 -8
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.node.json +0 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.test.json +0 -10
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/typescript/run-vue-tsc.ts +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/vitest.config.ts +0 -50
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/CHANGELOG.md.template +0 -17
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/RELEASING.md +0 -17
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/artifact.ts +0 -1340
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/changelog.ts +0 -283
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/check-artifact.ts +0 -110
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/check-readiness.ts +0 -66
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/cli-command-identity.ts +0 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/handoff.ts +0 -522
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/publish.ts +0 -483
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/readiness.ts +0 -1150
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/release.ts +0 -819
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/release.yml +0 -122
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/root-tsconfig.json +0 -8
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/tsconfig.json +0 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/turbo.json +0 -9
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/README.md +0 -48
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/assets/CHANGELOG.md.template +0 -17
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/assets/LICENSE-APACHE-2.0.txt +0 -202
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/assets/LICENSE-MIT.txt +0 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/assets/README.md.template +0 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/bridge.ts +0 -3336
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/setup.sh +0 -221
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/cli.ts +0 -17
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/main.ts +0 -162
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/standard-schema.ts +0 -37
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/e2e/journey.ts +0 -31
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/e2e/journeys/lookup.journey.ts +0 -71
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/e2e/run-journeys.test.ts +0 -11
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/e2e/run-journeys.ts +0 -255
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/integration/command.test.ts +0 -146
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/unit/cli-command-identity.test.ts +0 -76
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/tsconfig.build.json +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/tsconfig.json +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/turbo.json +0 -64
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/.github/dependabot.yml +0 -33
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/tsconfig.build.json +0 -9
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/tsconfig.json +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/turbo.json +0 -47
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/scripts/reset.ts +0 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/tsconfig.build.json +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/tsconfig.json +0 -18
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/turbo.json +0 -46
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/drizzle.config.ts +0 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/tsconfig.json +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/turbo.json +0 -53
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/Dockerfile +0 -81
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/Dockerfile.dockerignore +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/components/CounterButton.vue +0 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/pages/index/+Page.telefunc.ts +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/pages/index/+Page.vue +0 -93
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/scripts/check-standalone-deployment.ts +0 -553
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/server/app.ts +0 -36
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/test/counter.browser.test.ts +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/test/e2e/app.spec.ts +0 -18
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.app.json +0 -26
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.json +0 -8
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.node.json +0 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.test.json +0 -15
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/turbo.json +0 -69
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/types/global.d.ts +0 -9
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/vite.config.ts +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/vitest.config.ts +0 -35
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-app/.github/dependabot.yml +0 -33
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-app/test/e2e/app.spec.ts +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-app/turbo.json +0 -71
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-app/vite.config.ts +0 -7
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/tsconfig.build.json +0 -10
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/tsconfig.json +0 -16
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/turbo.json +0 -54
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/root/playwright.config.ts +0 -34
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/root/test/e2e/app.spec.ts +0 -15
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/root/tsconfig.json +0 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/src/App.vue +0 -51
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/turbo.json +0 -65
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/vite.config.ts +0 -27
- package/node_modules/@ykdz/template-core/dist/Cargo.lock +0 -16
- package/node_modules/@ykdz/template-core/dist/Cargo.toml +0 -12
- package/node_modules/@ykdz/template-core/dist/ci-diagnostic-artifact.d.ts +0 -19
- package/node_modules/@ykdz/template-core/dist/ci-diagnostic-artifact.js +0 -76
- package/node_modules/@ykdz/template-core/dist/dependency-catalog.d.ts +0 -33
- package/node_modules/@ykdz/template-core/dist/dependency-catalog.js +0 -238
- package/node_modules/@ykdz/template-core/dist/development-container-tool-layer.d.ts +0 -56
- package/node_modules/@ykdz/template-core/dist/development-container-tool-layer.js +0 -361
- package/node_modules/@ykdz/template-core/dist/editor-customization.d.ts +0 -17
- package/node_modules/@ykdz/template-core/dist/editor-customization.js +0 -73
- package/node_modules/@ykdz/template-core/dist/module-graph.d.ts +0 -53
- package/node_modules/@ykdz/template-core/dist/module-graph.js +0 -167
- package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +0 -75
- package/node_modules/@ykdz/template-core/dist/project-github.d.ts +0 -25
- package/node_modules/@ykdz/template-core/dist/project-github.js +0 -88
- package/node_modules/@ykdz/template-core/dist/project-linking-v2.d.ts +0 -31
- package/node_modules/@ykdz/template-core/dist/project-linking-v2.js +0 -143
- package/node_modules/@ykdz/template-core/dist/release-toolchain-snapshot.d.ts +0 -10
- package/node_modules/@ykdz/template-core/dist/release-toolchain-snapshot.js +0 -9
- package/node_modules/@ykdz/template-core/dist/template-boundary-check.d.ts +0 -58
- package/node_modules/@ykdz/template-core/dist/template-boundary-check.js +0 -839
- package/node_modules/@ykdz/template-core/node_modules/valibot/LICENSE.md +0 -9
- package/node_modules/@ykdz/template-core/node_modules/valibot/README.md +0 -94
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.cjs +0 -7897
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.d.cts +0 -16579
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.d.mts +0 -16579
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.min.cjs +0 -2
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.min.mjs +0 -2
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.mjs +0 -7577
- package/node_modules/@ykdz/template-core/node_modules/valibot/package.json +0 -84
- package/node_modules/npm-package-arg/node_modules/semver/LICENSE +0 -15
- package/node_modules/npm-package-arg/node_modules/semver/README.md +0 -680
- package/node_modules/npm-package-arg/node_modules/semver/bin/semver.js +0 -195
- package/node_modules/npm-package-arg/node_modules/semver/classes/comparator.js +0 -143
- package/node_modules/npm-package-arg/node_modules/semver/classes/index.js +0 -7
- package/node_modules/npm-package-arg/node_modules/semver/classes/range.js +0 -577
- package/node_modules/npm-package-arg/node_modules/semver/classes/semver.js +0 -350
- package/node_modules/npm-package-arg/node_modules/semver/functions/clean.js +0 -8
- package/node_modules/npm-package-arg/node_modules/semver/functions/cmp.js +0 -54
- package/node_modules/npm-package-arg/node_modules/semver/functions/coerce.js +0 -62
- package/node_modules/npm-package-arg/node_modules/semver/functions/compare-build.js +0 -9
- package/node_modules/npm-package-arg/node_modules/semver/functions/compare-loose.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/compare.js +0 -7
- package/node_modules/npm-package-arg/node_modules/semver/functions/diff.js +0 -60
- package/node_modules/npm-package-arg/node_modules/semver/functions/eq.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/gt.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/gte.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/inc.js +0 -21
- package/node_modules/npm-package-arg/node_modules/semver/functions/lt.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/lte.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/major.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/minor.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/neq.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/parse.js +0 -18
- package/node_modules/npm-package-arg/node_modules/semver/functions/patch.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/prerelease.js +0 -8
- package/node_modules/npm-package-arg/node_modules/semver/functions/rcompare.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/rsort.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/satisfies.js +0 -12
- package/node_modules/npm-package-arg/node_modules/semver/functions/sort.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/truncate.js +0 -48
- package/node_modules/npm-package-arg/node_modules/semver/functions/valid.js +0 -8
- package/node_modules/npm-package-arg/node_modules/semver/index.js +0 -93
- package/node_modules/npm-package-arg/node_modules/semver/internal/constants.js +0 -37
- package/node_modules/npm-package-arg/node_modules/semver/internal/debug.js +0 -11
- package/node_modules/npm-package-arg/node_modules/semver/internal/identifiers.js +0 -29
- package/node_modules/npm-package-arg/node_modules/semver/internal/lrucache.js +0 -42
- package/node_modules/npm-package-arg/node_modules/semver/internal/parse-options.js +0 -17
- package/node_modules/npm-package-arg/node_modules/semver/internal/re.js +0 -223
- package/node_modules/npm-package-arg/node_modules/semver/package.json +0 -78
- package/node_modules/npm-package-arg/node_modules/semver/preload.js +0 -4
- package/node_modules/npm-package-arg/node_modules/semver/range.bnf +0 -17
- package/node_modules/npm-package-arg/node_modules/semver/ranges/gtr.js +0 -6
- package/node_modules/npm-package-arg/node_modules/semver/ranges/intersects.js +0 -9
- package/node_modules/npm-package-arg/node_modules/semver/ranges/ltr.js +0 -6
- package/node_modules/npm-package-arg/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/node_modules/npm-package-arg/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/node_modules/npm-package-arg/node_modules/semver/ranges/min-version.js +0 -63
- package/node_modules/npm-package-arg/node_modules/semver/ranges/outside.js +0 -82
- package/node_modules/npm-package-arg/node_modules/semver/ranges/simplify.js +0 -49
- package/node_modules/npm-package-arg/node_modules/semver/ranges/subset.js +0 -249
- package/node_modules/npm-package-arg/node_modules/semver/ranges/to-comparators.js +0 -10
- package/node_modules/npm-package-arg/node_modules/semver/ranges/valid.js +0 -13
- package/node_modules/unbash/LICENSE +0 -15
- package/node_modules/unbash/README.md +0 -289
- package/node_modules/unbash/dist/ansi-c.d.ts +0 -5
- package/node_modules/unbash/dist/ansi-c.js +0 -130
- package/node_modules/unbash/dist/arithmetic.d.ts +0 -11
- package/node_modules/unbash/dist/arithmetic.js +0 -530
- package/node_modules/unbash/dist/assignment.d.ts +0 -15
- package/node_modules/unbash/dist/assignment.js +0 -118
- package/node_modules/unbash/dist/chars.d.ts +0 -41
- package/node_modules/unbash/dist/chars.js +0 -41
- package/node_modules/unbash/dist/command.d.ts +0 -14
- package/node_modules/unbash/dist/command.js +0 -41
- package/node_modules/unbash/dist/heredoc.d.ts +0 -18
- package/node_modules/unbash/dist/heredoc.js +0 -25
- package/node_modules/unbash/dist/internal-types.d.ts +0 -87
- package/node_modules/unbash/dist/lexer.d.ts +0 -202
- package/node_modules/unbash/dist/lexer.js +0 -3930
- package/node_modules/unbash/dist/parser.d.ts +0 -4
- package/node_modules/unbash/dist/parser.js +0 -1295
- package/node_modules/unbash/dist/parts.d.ts +0 -17
- package/node_modules/unbash/dist/parts.js +0 -82
- package/node_modules/unbash/dist/printer.d.ts +0 -2
- package/node_modules/unbash/dist/printer.js +0 -536
- package/node_modules/unbash/dist/types.d.ts +0 -494
- package/node_modules/unbash/dist/word.d.ts +0 -22
- package/node_modules/unbash/dist/word.js +0 -102
- package/node_modules/unbash/package.json +0 -80
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/root → preset-vue-hono-app/native/resources/joint-e2e}/test/e2e/fixtures.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/api → reference-hono-api/native}/src/index.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/api → reference-hono-api/native}/src/runtime.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/api → reference-hono-api/native}/src/server.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/api → reference-hono-api/native}/test/app.test.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/rust-bin → reference-rust-bin/native}/rustfmt.toml +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/rust-bin → reference-rust-bin/native}/src/main.rs +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/foundation/typescript-config → reference-tooling-config/native}/base.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared/oxc → reference-tooling-config/native}/oxfmt.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/ts-cli/src → reference-ts-cli/native/src/publication}/cli-command-identity.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/ts-lib → reference-ts-lib/native}/src/index.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/ts-lib → reference-ts-lib/native}/src/name-schema.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/ts-lib → reference-ts-lib/native}/test/greet.test.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/scripts/seed-example.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/db.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/index.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/queries/todos.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/readiness.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/schema.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/seed/example.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/storage.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/types.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/test/todos.test.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db-migrations → reference-vike-migrations/native}/drizzle/migrations/20260709120325_old_captain_flint/migration.sql +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db-migrations → reference-vike-migrations/native}/drizzle/migrations/20260709120325_old_captain_flint/snapshot.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db-migrations → reference-vike-migrations/native}/tsconfig.build.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/+server.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/.env.example +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared/vue → reference-vike-web/native}/TESTING.md +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/assets/logo.svg +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/components/PageShell.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/pages/+Head.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/pages/+Layout.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/pages/+config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/pages/tailwind.css +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/playwright.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/server/api.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/test/playwright-teardown.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/types/env.d.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-app → reference-vue-app/native}/env.d.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-app → reference-vue-app/native}/index.html +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-app → reference-vue-app/native}/playwright.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-app → reference-vue-app/native}/src/App.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared/vue → reference-vue-app/native}/src/main.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared/vue → reference-vue-app/native}/src/stores/counter.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/web → reference-vue-hono-web/native}/env.d.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/web → reference-vue-hono-web/native}/index.html +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/web → reference-vue-hono-web/native}/src/api.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/foundation/AGENTS.md.template → template-workspace/assets/agent-instructions.md} +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/foundation/devcontainer → template-workspace/assets/environment}/base.Dockerfile +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared → template-workspace/assets/environment}/devcontainer/browser-test.Dockerfile +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared → template-workspace/assets/environment}/devcontainer/github-cli.Dockerfile +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/rust-bin → template-workspace/assets/environment}/devcontainer/rust.Dockerfile +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app → template-workspace/assets/environment}/devcontainer/shellcheck.Dockerfile +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared → template-workspace/assets/environment}/editor-customization/capabilities.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/foundation → template-workspace/assets}/gitignore +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/foundation → template-workspace/assets}/tsconfig.json +0 -0
- /package/node_modules/{unbash/dist/internal-types.js → @ykdz/template-workspace/dist/generation-context.js} +0 -0
- /package/node_modules/{unbash/dist/types.js → @ykdz/template-workspace/dist/project-requirements.js} +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/LICENSE +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/README.md +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/bin/semver.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/classes/comparator.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/classes/index.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/classes/range.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/classes/semver.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/clean.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/cmp.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/coerce.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/compare-build.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/compare-loose.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/compare.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/diff.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/eq.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/gt.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/gte.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/inc.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/lt.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/lte.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/major.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/minor.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/neq.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/parse.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/patch.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/prerelease.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/rcompare.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/rsort.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/satisfies.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/sort.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/truncate.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/valid.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/index.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/internal/constants.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/internal/debug.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/internal/identifiers.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/internal/lrucache.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/internal/parse-options.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/internal/re.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/package.json +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/preload.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/range.bnf +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/gtr.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/intersects.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/ltr.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/max-satisfying.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/min-satisfying.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/min-version.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/outside.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/simplify.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/subset.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/to-comparators.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/valid.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/LICENSE.md +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/README.md +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/dist/index.cjs +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/dist/index.d.cts +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/dist/index.d.mts +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/dist/index.min.cjs +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/dist/index.min.mjs +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/dist/index.mjs +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/package.json +0 -0
|
@@ -1,3567 +0,0 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { isDeepStrictEqual } from "node:util";
|
|
6
|
-
import { composeCiDiagnosticArtifacts } from "@ykdz/template-core/ci-diagnostic-artifact";
|
|
7
|
-
import { collectGeneratedManifestCatalogReferences, selectTemplateDependencyCatalogEntries, } from "@ykdz/template-core/dependency-catalog";
|
|
8
|
-
import { planDevelopmentContainerToolLayersSync, } from "@ykdz/template-core/development-container-tool-layer";
|
|
9
|
-
import { editorCustomizationForCapabilities, loadEditorCustomizationDeclarations, } from "@ykdz/template-core/editor-customization";
|
|
10
|
-
import { normalizeEnvironmentNeeds, parseEnvironmentNeedsMetadata, playwrightBrowserAssetsEnvironmentNeed, shellCheckEnvironmentNeed, } from "@ykdz/template-core/module-graph";
|
|
11
|
-
import { assertPackageContribution, assertPackageContributionCommandNames, } from "@ykdz/template-core/package-contribution";
|
|
12
|
-
import { assertProjectBlueprint, assertProjectBlueprintDraft, isValidNewNpmPackageName, validateNewPackagePath, validateProjectBlueprint as validateCoreProjectBlueprint, } from "@ykdz/template-core/project-blueprint";
|
|
13
|
-
import { projectCheckWorkflowTemplateSource, projectCheckWorkflowTemplateReplacements, projectDependabotTemplateReplacements, } from "@ykdz/template-core/project-github";
|
|
14
|
-
import { canConsumeNodePackageNameImport, canLinkNodePackageRoles, canProvideSourceConditionPackageNameImport, planExplicitProjectLinks, } from "@ykdz/template-core/project-linking-v2";
|
|
15
|
-
import { validateProjectProjectionPlan } from "@ykdz/template-core/project-projection";
|
|
16
|
-
import { releaseToolchainSnapshot } from "@ykdz/template-core/release-toolchain-snapshot";
|
|
17
|
-
import { resolveTemplateSource, } from "@ykdz/template-core/renderer";
|
|
18
|
-
import { parse as parseToml } from "smol-toml";
|
|
19
|
-
import ts from "typescript";
|
|
20
|
-
import { isValidDefaultPackageScope, parseGenerationRecord, } from "./generation-record.js";
|
|
21
|
-
import { rustBinDefinition } from "./rust-bin/definition.js";
|
|
22
|
-
import { githubCliDevelopmentContainerToolLayer } from "./shared/development-container.js";
|
|
23
|
-
import { typescriptConfigContribution, typescriptConfigPackageDefinition, typescriptConfigReplayAdapter, } from "./shared/typescript.js";
|
|
24
|
-
import { vuePnpmDependencyOverrides } from "./shared/vue.js";
|
|
25
|
-
import { templateSources } from "./template-sources.js";
|
|
26
|
-
import { tsCliDefinition } from "./ts-cli/definition.js";
|
|
27
|
-
import { tsLibDefinition } from "./ts-lib/definition.js";
|
|
28
|
-
import { vikeAppDefinition } from "./vike-app/definition.js";
|
|
29
|
-
import { vueAppDefinition } from "./vue-app/definition.js";
|
|
30
|
-
import { vueHonoAppDefinition } from "./vue-hono-app/definition.js";
|
|
31
|
-
const localTemplateMetadataStateKey = Symbol("localTemplateMetadataState");
|
|
32
|
-
export class PackageAdditionBusinessConflict extends Error {
|
|
33
|
-
kind;
|
|
34
|
-
existing;
|
|
35
|
-
requested;
|
|
36
|
-
missingLink;
|
|
37
|
-
constructor(kind, existing, requested, missingLink) {
|
|
38
|
-
super("Package Addition business conflict");
|
|
39
|
-
this.kind = kind;
|
|
40
|
-
this.existing = existing;
|
|
41
|
-
this.requested = requested;
|
|
42
|
-
if (missingLink !== undefined)
|
|
43
|
-
this.missingLink = missingLink;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
const environmentNeedsPath = ".template/environment-needs.json";
|
|
47
|
-
const packageManifestKeyOrder = [
|
|
48
|
-
"name",
|
|
49
|
-
"version",
|
|
50
|
-
"private",
|
|
51
|
-
"bin",
|
|
52
|
-
"files",
|
|
53
|
-
"type",
|
|
54
|
-
"types",
|
|
55
|
-
"imports",
|
|
56
|
-
"exports",
|
|
57
|
-
"publishConfig",
|
|
58
|
-
"scripts",
|
|
59
|
-
"dependencies",
|
|
60
|
-
"devDependencies",
|
|
61
|
-
"dependenciesMeta",
|
|
62
|
-
"peerDependencies",
|
|
63
|
-
"optionalDependencies",
|
|
64
|
-
"engines",
|
|
65
|
-
"packageManager",
|
|
66
|
-
];
|
|
67
|
-
const packageConditionKeyOrder = ["source", "types", "default"];
|
|
68
|
-
/**
|
|
69
|
-
* The Foundation persists the non-rendering half of every Package
|
|
70
|
-
* Contribution with the Generated Repository. Package Addition cannot infer
|
|
71
|
-
* fix, deployment, or maintenance semantics from a package name (or
|
|
72
|
-
* from a lossy subset of scripts), so this is the durable topology it reads.
|
|
73
|
-
*/
|
|
74
|
-
/** Resolve an owned source handle for diagnostics and source checks. */
|
|
75
|
-
export function resolveBuiltInTemplateSource(source, relativePath) {
|
|
76
|
-
return resolveTemplateSource(source, relativePath);
|
|
77
|
-
}
|
|
78
|
-
export function validateProjectBlueprint(value) {
|
|
79
|
-
return validateCoreProjectBlueprint(value);
|
|
80
|
-
}
|
|
81
|
-
class PresetRegistry {
|
|
82
|
-
#definitions;
|
|
83
|
-
constructor(definitions) {
|
|
84
|
-
const names = definitions.map((definition) => definition.metadata.name);
|
|
85
|
-
if (names.some((name) => name.length === 0) ||
|
|
86
|
-
new Set(names).size !== names.length) {
|
|
87
|
-
throw new Error("Preset Registry requires unique non-empty Definition names");
|
|
88
|
-
}
|
|
89
|
-
for (const definition of definitions) {
|
|
90
|
-
const adapterIdentities = definition.packageContributionReplayAdapters.map((adapter) => adapter.identity);
|
|
91
|
-
if (adapterIdentities.length === 0 ||
|
|
92
|
-
adapterIdentities.some((identity) => identity.length === 0) ||
|
|
93
|
-
new Set(adapterIdentities).size !== adapterIdentities.length) {
|
|
94
|
-
throw new Error(`Built-in Preset ${definition.metadata.name} requires unique non-empty Package Contribution replay adapters`);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
this.#definitions = [...definitions].toSorted((left, right) => left.metadata.name.localeCompare(right.metadata.name));
|
|
98
|
-
}
|
|
99
|
-
all() {
|
|
100
|
-
return this.#definitions;
|
|
101
|
-
}
|
|
102
|
-
require(name) {
|
|
103
|
-
const definition = this.#definitions.find((item) => item.metadata.name === name);
|
|
104
|
-
if (!definition)
|
|
105
|
-
throw new Error(`Unknown Built-in Preset: ${name}`);
|
|
106
|
-
return definition;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
export const builtInPresetRegistry = new PresetRegistry([
|
|
110
|
-
tsCliDefinition,
|
|
111
|
-
tsLibDefinition,
|
|
112
|
-
rustBinDefinition,
|
|
113
|
-
vueAppDefinition,
|
|
114
|
-
vueHonoAppDefinition,
|
|
115
|
-
vikeAppDefinition,
|
|
116
|
-
]);
|
|
117
|
-
export function createGenerationContext(options) {
|
|
118
|
-
const repositoryName = path.basename(path.resolve(options.targetDir));
|
|
119
|
-
const defaultPackageScope = options.defaultPackageScope ?? repositoryName;
|
|
120
|
-
return {
|
|
121
|
-
targetDir: options.targetDir,
|
|
122
|
-
repositoryName,
|
|
123
|
-
defaultPackageScope,
|
|
124
|
-
foundationPackages: {
|
|
125
|
-
typescriptConfiguration: {
|
|
126
|
-
name: `@${defaultPackageScope}/typescript-config`,
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
toolchain: options.toolchain,
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
function isRecord(value) {
|
|
133
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
134
|
-
}
|
|
135
|
-
const packageDefinitionIdDomain = "ykdz.template.package-definition-id.v1";
|
|
136
|
-
function packageDefinitionIdDigest(value) {
|
|
137
|
-
return `package-${createHash("sha256")
|
|
138
|
-
.update(JSON.stringify(value))
|
|
139
|
-
.digest("hex")}`;
|
|
140
|
-
}
|
|
141
|
-
function allocatePackageDefinitionId(options) {
|
|
142
|
-
const creationFacts = {
|
|
143
|
-
domain: packageDefinitionIdDomain,
|
|
144
|
-
definition: {
|
|
145
|
-
name: options.definition.name,
|
|
146
|
-
path: options.definition.path,
|
|
147
|
-
role: options.definition.role,
|
|
148
|
-
},
|
|
149
|
-
provenance: {
|
|
150
|
-
definitionName: options.provenance.definitionName,
|
|
151
|
-
planningContribution: options.provenance.planningContribution,
|
|
152
|
-
contributionIdentity: options.provenance.contributionIdentity,
|
|
153
|
-
},
|
|
154
|
-
};
|
|
155
|
-
let nonce = 0;
|
|
156
|
-
while (true) {
|
|
157
|
-
const candidate = packageDefinitionIdDigest(nonce === 0
|
|
158
|
-
? creationFacts
|
|
159
|
-
: {
|
|
160
|
-
creationFacts,
|
|
161
|
-
occupiedIds: [...options.occupiedIds].toSorted(),
|
|
162
|
-
nonce,
|
|
163
|
-
});
|
|
164
|
-
if (!options.occupiedIds.has(candidate))
|
|
165
|
-
return candidate;
|
|
166
|
-
nonce += 1;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
function persistPackageDefinition(options) {
|
|
170
|
-
const packageDefinitionId = allocatePackageDefinitionId(options);
|
|
171
|
-
options.occupiedIds.add(packageDefinitionId);
|
|
172
|
-
return { ...options.definition, packageDefinitionId };
|
|
173
|
-
}
|
|
174
|
-
function readGenerationRecord(options) {
|
|
175
|
-
const generationPath = path.join(options.repositoryRoot, ".template/generation.json");
|
|
176
|
-
return parseGenerationRecord(readJsonFile(generationPath, "Generation Record facts"));
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Package Addition 的目标根 package.json 允许两种 Node 声明:旧仓库的纯大版本
|
|
180
|
-
* ("24")与精确版本("24.16.0"),两者都能派生大版本;范围表达式与两段版本拒绝。
|
|
181
|
-
*/
|
|
182
|
-
const nodeMajorOrExactVersionPattern = /^(\d+)(?:\.(\d+)\.(\d+))?$/u;
|
|
183
|
-
/** 与 npm packageManager 字段一致的精确 pnpm pin(可带预发布或构建元数据)。 */
|
|
184
|
-
const exactPnpmPinPattern = /^pnpm@\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/u;
|
|
185
|
-
/**
|
|
186
|
-
* 目标根现行版本声明缺失或形状错误时的显式带形状内部失败:点名文件与字段、实际值与修正动作,
|
|
187
|
-
* 由 Package Addition 准备边界传递给命令层;其他 metadata 错误保持通用。
|
|
188
|
-
*/
|
|
189
|
-
class PackageAdditionTargetDeclarationFailure extends Error {
|
|
190
|
-
field;
|
|
191
|
-
suggestion;
|
|
192
|
-
constructor(file, field, requirement, actualDeclaration, suggestion) {
|
|
193
|
-
super(`加包需要目标仓库根 ${file} 的 ${field} ${requirement},实际收到 ${actualDeclaration}。${suggestion}`);
|
|
194
|
-
this.field = field;
|
|
195
|
-
this.suggestion = suggestion;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Package Addition 的版本上下文来自目标仓库根 package.json 的当前声明,因此升级过
|
|
200
|
-
* Node 或 pnpm 的仓库会继续按自身版本加包;Generation Record 的 toolchain 只保留为
|
|
201
|
-
* 初始化历史。
|
|
202
|
-
*/
|
|
203
|
-
function readPackageAdditionVersionFacts(repositoryRoot) {
|
|
204
|
-
const manifest = readRepositoryJsonRecord({
|
|
205
|
-
repositoryRoot,
|
|
206
|
-
relativePath: "package.json",
|
|
207
|
-
label: "root Manifest",
|
|
208
|
-
});
|
|
209
|
-
const nodeDeclaration = isRecord(manifest.engines)
|
|
210
|
-
? manifest.engines.node
|
|
211
|
-
: undefined;
|
|
212
|
-
const nodeDeclarationMatch = typeof nodeDeclaration === "string"
|
|
213
|
-
? nodeMajorOrExactVersionPattern.exec(nodeDeclaration)
|
|
214
|
-
: undefined;
|
|
215
|
-
const nodeLtsMajor = nodeDeclarationMatch?.[1];
|
|
216
|
-
if (nodeLtsMajor === undefined || typeof nodeDeclaration !== "string") {
|
|
217
|
-
throw new PackageAdditionTargetDeclarationFailure("package.json", "engines.node", '声明单个 Node 大版本("24")或精确 Node 版本("24.16.0")', JSON.stringify(nodeDeclaration ?? null), "请先修改根 package.json 的 engines.node 声明再加包。");
|
|
218
|
-
}
|
|
219
|
-
const packageManagerDeclaration = manifest.packageManager;
|
|
220
|
-
if (typeof packageManagerDeclaration !== "string" ||
|
|
221
|
-
!exactPnpmPinPattern.test(packageManagerDeclaration)) {
|
|
222
|
-
throw new PackageAdditionTargetDeclarationFailure("package.json", "packageManager", '声明精确 pnpm 版本("pnpm@11.21.0")', JSON.stringify(packageManagerDeclaration ?? null), "请先修改根 package.json 的 packageManager 声明再加包。");
|
|
223
|
-
}
|
|
224
|
-
// 根只声明大版本时没有诚实的精确 patch 可传,保持缺省而不伪造。
|
|
225
|
-
return {
|
|
226
|
-
toolchain: {
|
|
227
|
-
nodeLtsMajor,
|
|
228
|
-
packageManagerPin: packageManagerDeclaration,
|
|
229
|
-
...(nodeDeclarationMatch?.[2] === undefined
|
|
230
|
-
? {}
|
|
231
|
-
: { nodeVersion: nodeDeclaration }),
|
|
232
|
-
},
|
|
233
|
-
rootNodeDeclaration: nodeDeclaration,
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
/** 生成仓库根 Rust 声明的唯一文件名;所有权判定与投影保留都只经这个接缝引用它。 */
|
|
237
|
-
const rootRustDeclarationFileName = "rust-toolchain.toml";
|
|
238
|
-
/**
|
|
239
|
-
* 已选用 Rust 的目标仓库由根 rust-toolchain.toml 的 channel 拥有后续 Rust 版本选择,因此加包
|
|
240
|
-
* 按该现行声明重放根投影与开发容器初值。声明缺失、非法 TOML 或 channel 形状错误时在此失败,
|
|
241
|
-
* 不回退 CLI 发版快照、Generation Record 历史或 ambient 环境。
|
|
242
|
-
*/
|
|
243
|
-
function readPackageAdditionTargetRustChannel(repositoryRoot) {
|
|
244
|
-
const relativePath = rootRustDeclarationFileName;
|
|
245
|
-
const filePath = path.join(repositoryRoot, relativePath);
|
|
246
|
-
if (!existsSync(filePath)) {
|
|
247
|
-
throw new PackageAdditionTargetDeclarationFailure(relativePath, "[toolchain].channel", "存在", "文件不存在", `请先创建根 ${relativePath},在 [toolchain] 表内声明 channel 再加包。`);
|
|
248
|
-
}
|
|
249
|
-
let declaration;
|
|
250
|
-
try {
|
|
251
|
-
declaration = parseToml(readFileSync(filePath, "utf8"));
|
|
252
|
-
}
|
|
253
|
-
catch (error) {
|
|
254
|
-
throw new PackageAdditionTargetDeclarationFailure(relativePath, "[toolchain].channel", "是有效 TOML 声明", `无法解析:${error instanceof Error ? error.message : String(error)}`, `请先修正根 ${relativePath} 的 TOML 语法,使 [toolchain] 表内声明 channel 再加包。`);
|
|
255
|
-
}
|
|
256
|
-
const toolchain = isRecord(declaration) ? declaration.toolchain : undefined;
|
|
257
|
-
const channel = isRecord(toolchain) ? toolchain.channel : undefined;
|
|
258
|
-
if (typeof channel !== "string" || channel.trim().length === 0) {
|
|
259
|
-
throw new PackageAdditionTargetDeclarationFailure(relativePath, "[toolchain].channel", "为非空字符串", JSON.stringify(channel ?? null), `请先在根 ${relativePath} 的 [toolchain] 表内写入 channel 再加包。`);
|
|
260
|
-
}
|
|
261
|
-
return channel;
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Root Rust 来源的最小接缝:从 rust-toolchain.toml 正文结构化读出 `[toolchain].channel`。
|
|
265
|
-
* 复用加包路径同一 smol-toml 真源,供模板仓投影值门核对 M5;不引入第二套版本或文件名表。
|
|
266
|
-
* 正文非法 TOML 或缺少非空 channel 时返回不可解释,由调用方按缺失/漂移分类,不静默跳过。
|
|
267
|
-
*/
|
|
268
|
-
export function readRustToolchainChannelFromToml(contents) {
|
|
269
|
-
let declaration;
|
|
270
|
-
try {
|
|
271
|
-
declaration = parseToml(contents);
|
|
272
|
-
}
|
|
273
|
-
catch (error) {
|
|
274
|
-
return {
|
|
275
|
-
reason: `不是有效 TOML 声明:${error instanceof Error ? error.message : String(error)}`,
|
|
276
|
-
status: "unreadable",
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
const toolchain = isRecord(declaration) ? declaration.toolchain : undefined;
|
|
280
|
-
const channel = isRecord(toolchain) ? toolchain.channel : undefined;
|
|
281
|
-
if (typeof channel !== "string" || channel.trim().length === 0) {
|
|
282
|
-
return {
|
|
283
|
-
reason: `[toolchain].channel 必须是非空字符串,实际为 ${JSON.stringify(channel ?? null)}`,
|
|
284
|
-
status: "unreadable",
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
return { channel, status: "explained" };
|
|
288
|
-
}
|
|
289
|
-
function readJsonFile(filePath, label) {
|
|
290
|
-
try {
|
|
291
|
-
return JSON.parse(readFileSync(filePath, "utf8"));
|
|
292
|
-
}
|
|
293
|
-
catch (error) {
|
|
294
|
-
throw new Error(`Package Addition requires valid ${label}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
function barePackageDefinition(definition) {
|
|
298
|
-
return {
|
|
299
|
-
name: definition.name,
|
|
300
|
-
path: definition.path,
|
|
301
|
-
role: definition.role,
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
function preflightLocalTemplateMetadata(options) {
|
|
305
|
-
const definitionsById = new Map(options.blueprint.packages.map((definition) => [
|
|
306
|
-
definition.packageDefinitionId,
|
|
307
|
-
definition,
|
|
308
|
-
]));
|
|
309
|
-
const joinedPackages = options.generationRecord.packages.map((record) => {
|
|
310
|
-
const definition = definitionsById.get(record.packageDefinitionId);
|
|
311
|
-
if (definition === undefined) {
|
|
312
|
-
throw new Error(`Generation Record Package Definition ID ${record.packageDefinitionId} has no matching Project Blueprint Package Definition`);
|
|
313
|
-
}
|
|
314
|
-
if (record.path !== definition.path) {
|
|
315
|
-
throw new Error(`Generation Record path witness ${record.path} for Package Definition ID ${record.packageDefinitionId} conflicts with Project Blueprint path ${definition.path}`);
|
|
316
|
-
}
|
|
317
|
-
return { record, definition: barePackageDefinition(definition) };
|
|
318
|
-
});
|
|
319
|
-
const recordedIds = new Set(options.generationRecord.packages.map((record) => record.packageDefinitionId));
|
|
320
|
-
const unrecordedDefinition = options.blueprint.packages.find((definition) => !recordedIds.has(definition.packageDefinitionId));
|
|
321
|
-
if (unrecordedDefinition !== undefined) {
|
|
322
|
-
throw new Error(`Project Blueprint Package Definition ID ${unrecordedDefinition.packageDefinitionId} has no matching Generation Record provenance`);
|
|
323
|
-
}
|
|
324
|
-
const records = options.generationRecord.packages.filter((record) => record.planningContribution === "foundationPlan");
|
|
325
|
-
if (records.length !== 1) {
|
|
326
|
-
throw new Error(`Package Addition requires exactly one Foundation Package Planning Provenance record; found ${records.length}`);
|
|
327
|
-
}
|
|
328
|
-
const record = records[0];
|
|
329
|
-
if (record.definitionName !== "foundation") {
|
|
330
|
-
throw new Error(`Foundation Package Planning Provenance at ${record.path} must use definitionName foundation; received ${record.definitionName}`);
|
|
331
|
-
}
|
|
332
|
-
if (record.contributionIdentity !== typescriptConfigReplayAdapter.identity) {
|
|
333
|
-
throw new Error(`Foundation TypeScript Configuration Package provenance must use contribution identity ${typescriptConfigReplayAdapter.identity}`);
|
|
334
|
-
}
|
|
335
|
-
const foundationPackage = joinedPackages.find((candidate) => candidate.record === record);
|
|
336
|
-
let initialDefinition;
|
|
337
|
-
try {
|
|
338
|
-
initialDefinition = builtInPresetRegistry.require(options.generationRecord.preset);
|
|
339
|
-
}
|
|
340
|
-
catch {
|
|
341
|
-
throw new Error(`Package Addition Generation Record preset ${options.generationRecord.preset} is not a registered Built-in Preset`);
|
|
342
|
-
}
|
|
343
|
-
const initialRecords = options.generationRecord.packages.filter((candidate) => candidate.planningContribution === "planInitialization");
|
|
344
|
-
if (initialRecords.length === 0) {
|
|
345
|
-
throw new Error(`Package Addition Generation Record preset ${options.generationRecord.preset} has no initial Package provenance`);
|
|
346
|
-
}
|
|
347
|
-
const conflictingRecord = initialRecords.find((candidate) => candidate.definitionName !== options.generationRecord.preset);
|
|
348
|
-
if (conflictingRecord !== undefined) {
|
|
349
|
-
throw new Error(`Package Addition Generation Record preset ${options.generationRecord.preset} conflicts with initial Package provenance ${conflictingRecord.definitionName} for Blueprint package ${conflictingRecord.path}`);
|
|
350
|
-
}
|
|
351
|
-
const preparedWithoutInitialLookup = joinedPackages.map((candidate) => {
|
|
352
|
-
if (candidate.record === record) {
|
|
353
|
-
return {
|
|
354
|
-
...candidate,
|
|
355
|
-
owner: "foundation",
|
|
356
|
-
adapter: typescriptConfigReplayAdapter,
|
|
357
|
-
kind: "foundation",
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
let definition;
|
|
361
|
-
try {
|
|
362
|
-
definition = builtInPresetRegistry.require(candidate.record.definitionName);
|
|
363
|
-
}
|
|
364
|
-
catch {
|
|
365
|
-
throw new Error(`Package Addition Generation Record Package Planning Provenance references unknown Built-in Preset ${candidate.record.definitionName} for Blueprint package ${candidate.record.path}`);
|
|
366
|
-
}
|
|
367
|
-
if (candidate.record.planningContribution === "planPackageAddition" &&
|
|
368
|
-
definition.planPackageAddition === undefined) {
|
|
369
|
-
throw new Error(`Package Addition Generation Record Package Planning Provenance references unsupported Package Addition for Built-in Preset ${candidate.record.definitionName} at ${candidate.record.path}`);
|
|
370
|
-
}
|
|
371
|
-
return {
|
|
372
|
-
...candidate,
|
|
373
|
-
owner: definition.metadata.name,
|
|
374
|
-
adapter: requireRecordReplayAdapter({
|
|
375
|
-
owner: definition.metadata.name,
|
|
376
|
-
adapters: definition.packageContributionReplayAdapters,
|
|
377
|
-
record: candidate.record,
|
|
378
|
-
}),
|
|
379
|
-
kind: "package",
|
|
380
|
-
};
|
|
381
|
-
});
|
|
382
|
-
const initialPlanningKeys = initialRecords.map((candidate) => `${candidate.definitionName}:${candidate.contributionIdentity}`);
|
|
383
|
-
if (new Set(initialPlanningKeys).size !== initialPlanningKeys.length) {
|
|
384
|
-
throw new Error("Package Addition Generation Record contains duplicate initialization contribution identity");
|
|
385
|
-
}
|
|
386
|
-
if (initialDefinition.initialPrimaryPackage !== undefined) {
|
|
387
|
-
if (initialRecords.length !== 1) {
|
|
388
|
-
throw new Error(`${initialDefinition.metadata.name} requires exactly one initial Primary Package Contribution provenance record`);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
else {
|
|
392
|
-
for (const adapter of initialDefinition.packageContributionReplayAdapters) {
|
|
393
|
-
const matchingRecords = initialRecords.filter((candidate) => candidate.contributionIdentity === adapter.identity);
|
|
394
|
-
if (matchingRecords.length !== 1) {
|
|
395
|
-
throw new Error(`${initialDefinition.metadata.name} requires exactly one initial ${adapter.identity} Package Contribution provenance record`);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
const initialDefinitions = new Map(preparedWithoutInitialLookup.flatMap((candidate) => candidate.record.planningContribution === "planInitialization"
|
|
400
|
-
? [[candidate.record.contributionIdentity, candidate.definition]]
|
|
401
|
-
: []));
|
|
402
|
-
const initialPackages = {
|
|
403
|
-
require(identity) {
|
|
404
|
-
const definition = initialDefinitions.get(identity);
|
|
405
|
-
if (definition === undefined) {
|
|
406
|
-
throw new Error(`${initialDefinition.metadata.name} has no preflighted initial ${identity} Package Definition`);
|
|
407
|
-
}
|
|
408
|
-
return definition;
|
|
409
|
-
},
|
|
410
|
-
};
|
|
411
|
-
const noInitialPackages = {
|
|
412
|
-
require(identity) {
|
|
413
|
-
throw new Error(`Foundation replay adapter does not declare initial Package ${identity}`);
|
|
414
|
-
},
|
|
415
|
-
};
|
|
416
|
-
return {
|
|
417
|
-
foundationPackage,
|
|
418
|
-
replays: preparedWithoutInitialLookup.map((candidate) => ({
|
|
419
|
-
...candidate,
|
|
420
|
-
initialPackages: candidate.kind === "foundation" ? noInitialPackages : initialPackages,
|
|
421
|
-
})),
|
|
422
|
-
};
|
|
423
|
-
}
|
|
424
|
-
export function loadLocalTemplateMetadata(repositoryRoot) {
|
|
425
|
-
const resolvedRoot = path.resolve(repositoryRoot);
|
|
426
|
-
const blueprintPath = path.join(resolvedRoot, ".template/blueprint.json");
|
|
427
|
-
let blueprint;
|
|
428
|
-
try {
|
|
429
|
-
blueprint = assertProjectBlueprint(readJsonFile(blueprintPath, "Project Blueprint facts"));
|
|
430
|
-
}
|
|
431
|
-
catch (error) {
|
|
432
|
-
throw new Error(`Package Addition requires a supported Project Blueprint in .template/blueprint.json: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
433
|
-
}
|
|
434
|
-
const generationRecord = readGenerationRecord({
|
|
435
|
-
repositoryRoot: resolvedRoot,
|
|
436
|
-
});
|
|
437
|
-
const preflight = preflightLocalTemplateMetadata({
|
|
438
|
-
blueprint,
|
|
439
|
-
generationRecord,
|
|
440
|
-
});
|
|
441
|
-
const rootVersions = readPackageAdditionVersionFacts(resolvedRoot);
|
|
442
|
-
const nodeFactsContext = {
|
|
443
|
-
targetDir: resolvedRoot,
|
|
444
|
-
repositoryName: generationRecord.repositoryName,
|
|
445
|
-
defaultPackageScope: generationRecord.defaultPackageScope,
|
|
446
|
-
foundationPackages: {
|
|
447
|
-
typescriptConfiguration: {
|
|
448
|
-
name: preflight.foundationPackage.definition.name,
|
|
449
|
-
},
|
|
450
|
-
},
|
|
451
|
-
toolchain: rootVersions.toolchain,
|
|
452
|
-
};
|
|
453
|
-
let context = nodeFactsContext;
|
|
454
|
-
let planningState = replayLocalTemplateMetadata({
|
|
455
|
-
context: nodeFactsContext,
|
|
456
|
-
preflight,
|
|
457
|
-
});
|
|
458
|
-
// 已有 Rust 能力事实的目标仓库由自己的根 rust-toolchain.toml 拥有后续版本选择:读出该现行
|
|
459
|
-
// channel 后重放,使根声明与开发容器初值来自同一个目标根事实;首次引入 Rust 的仓库还没有
|
|
460
|
-
// 该声明,保持缺省上下文交由建源路径处理。
|
|
461
|
-
if (normalizeRustToolchain([
|
|
462
|
-
planningState.foundationContribution,
|
|
463
|
-
...planningState.packageContributions,
|
|
464
|
-
]) !== undefined) {
|
|
465
|
-
context = {
|
|
466
|
-
...nodeFactsContext,
|
|
467
|
-
toolchain: {
|
|
468
|
-
...nodeFactsContext.toolchain,
|
|
469
|
-
rustVersion: readPackageAdditionTargetRustChannel(resolvedRoot),
|
|
470
|
-
},
|
|
471
|
-
};
|
|
472
|
-
planningState = replayLocalTemplateMetadata({ context, preflight });
|
|
473
|
-
}
|
|
474
|
-
return {
|
|
475
|
-
blueprint,
|
|
476
|
-
context,
|
|
477
|
-
[localTemplateMetadataStateKey]: {
|
|
478
|
-
generationRecord,
|
|
479
|
-
rootNodeDeclaration: rootVersions.rootNodeDeclaration,
|
|
480
|
-
...planningState,
|
|
481
|
-
},
|
|
482
|
-
};
|
|
483
|
-
}
|
|
484
|
-
function requireReplayAdapter(options) {
|
|
485
|
-
const adapter = options.adapters.find((candidate) => candidate.identity === options.identity);
|
|
486
|
-
if (adapter === undefined) {
|
|
487
|
-
throw new Error(`unknown Package Contribution replay adapter ${options.identity}; expected ${options.adapters.map((candidate) => candidate.identity).join(", ")} for ${options.owner}`);
|
|
488
|
-
}
|
|
489
|
-
return adapter;
|
|
490
|
-
}
|
|
491
|
-
function requireRecordReplayAdapter(options) {
|
|
492
|
-
try {
|
|
493
|
-
return requireReplayAdapter({
|
|
494
|
-
owner: options.owner,
|
|
495
|
-
adapters: options.adapters,
|
|
496
|
-
identity: options.record.contributionIdentity,
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
catch (error) {
|
|
500
|
-
throw new Error(`Package Planning Provenance ${options.owner}:${options.record.contributionIdentity} (${options.record.planningContribution}) at ${options.record.path} failed: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
function packageLeafName(packageDefinition) {
|
|
504
|
-
return packageDefinition.name.slice(packageDefinition.name.lastIndexOf("/") + 1);
|
|
505
|
-
}
|
|
506
|
-
function replayPersistedPackageContribution(options) {
|
|
507
|
-
let contribution;
|
|
508
|
-
try {
|
|
509
|
-
contribution = options.adapter.replay({
|
|
510
|
-
context: options.context,
|
|
511
|
-
planningContribution: options.record.planningContribution,
|
|
512
|
-
packageDefinition: options.packageDefinition,
|
|
513
|
-
packageLeafName: packageLeafName(options.packageDefinition),
|
|
514
|
-
initialPackages: options.initialPackages,
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
catch (error) {
|
|
518
|
-
throw new Error(`Package Planning Provenance ${options.owner}:${options.record.contributionIdentity} (${options.record.planningContribution}) at ${options.record.path} failed: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
519
|
-
}
|
|
520
|
-
if (!packageDefinitionsEqual(contribution.definition, options.packageDefinition)) {
|
|
521
|
-
throw new Error(`Package Planning Provenance ${options.owner}:${options.record.contributionIdentity} at ${options.record.path} expected ${options.packageDefinition.name} / ${options.packageDefinition.path} / ${options.packageDefinition.role}, received ${contribution.definition.name} / ${contribution.definition.path} / ${contribution.definition.role}`);
|
|
522
|
-
}
|
|
523
|
-
return options.adapter.identify(contribution);
|
|
524
|
-
}
|
|
525
|
-
function replayLocalTemplateMetadata(options) {
|
|
526
|
-
let foundationContribution;
|
|
527
|
-
const packageContributions = [];
|
|
528
|
-
for (const replay of options.preflight.replays) {
|
|
529
|
-
const contribution = replayPersistedPackageContribution({
|
|
530
|
-
context: options.context,
|
|
531
|
-
owner: replay.owner,
|
|
532
|
-
adapter: replay.adapter,
|
|
533
|
-
record: replay.record,
|
|
534
|
-
packageDefinition: replay.definition,
|
|
535
|
-
initialPackages: replay.initialPackages,
|
|
536
|
-
});
|
|
537
|
-
if (replay.kind === "foundation") {
|
|
538
|
-
foundationContribution = contribution;
|
|
539
|
-
}
|
|
540
|
-
else {
|
|
541
|
-
packageContributions.push(contribution);
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
if (foundationContribution === undefined) {
|
|
545
|
-
throw new Error("Package Addition Generation Record is missing its validated Foundation contribution");
|
|
546
|
-
}
|
|
547
|
-
return { foundationContribution, packageContributions };
|
|
548
|
-
}
|
|
549
|
-
function readPersistedEnvironmentNeeds(targetDir) {
|
|
550
|
-
const filePath = path.join(targetDir, environmentNeedsPath);
|
|
551
|
-
if (!existsSync(filePath)) {
|
|
552
|
-
throw new Error(`Package Addition requires explicit Check Environment Need facts: ${environmentNeedsPath} is missing`);
|
|
553
|
-
}
|
|
554
|
-
let value;
|
|
555
|
-
try {
|
|
556
|
-
value = JSON.parse(readFileSync(filePath, "utf8"));
|
|
557
|
-
}
|
|
558
|
-
catch (error) {
|
|
559
|
-
throw new Error(`Package Addition requires valid Check Environment Need facts: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
560
|
-
}
|
|
561
|
-
try {
|
|
562
|
-
return parseEnvironmentNeedsMetadata(value);
|
|
563
|
-
}
|
|
564
|
-
catch (error) {
|
|
565
|
-
throw new Error(`Package Addition requires valid Environment Need metadata in ${environmentNeedsPath}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
function readExistingPackageAdditionState(options) {
|
|
569
|
-
const { blueprint, context } = options.localTemplateMetadata;
|
|
570
|
-
const state = options.localTemplateMetadata[localTemplateMetadataStateKey];
|
|
571
|
-
const { foundationContribution, generationRecord, packageContributions: contributions, } = state;
|
|
572
|
-
const persistedEnvironmentNeeds = readPersistedEnvironmentNeeds(context.targetDir);
|
|
573
|
-
const allContributions = [foundationContribution, ...contributions];
|
|
574
|
-
const deploymentCheck = normalizeDeploymentCheck(allContributions);
|
|
575
|
-
const vueHonoJointE2e = normalizeVueHonoJointE2e(allContributions);
|
|
576
|
-
const databasePreparation = normalizeDatabasePreparation(allContributions);
|
|
577
|
-
const manifestTruthByPackagePath = new Map();
|
|
578
|
-
const requiredManifestTruthPackagePaths = new Set(options.requiredManifestTruthPackagePaths ?? []);
|
|
579
|
-
const packageByName = new Map(allContributions.map((contribution) => [
|
|
580
|
-
contribution.definition.name,
|
|
581
|
-
contribution,
|
|
582
|
-
]));
|
|
583
|
-
const capabilityPackageNames = [
|
|
584
|
-
...(databasePreparation === undefined
|
|
585
|
-
? []
|
|
586
|
-
: [
|
|
587
|
-
databasePreparation.databasePackageName,
|
|
588
|
-
databasePreparation.migrationPackageName,
|
|
589
|
-
...Object.values(databasePreparation.consumers),
|
|
590
|
-
]),
|
|
591
|
-
...(deploymentCheck === undefined
|
|
592
|
-
? []
|
|
593
|
-
: [
|
|
594
|
-
deploymentCheck.applicationPackageName,
|
|
595
|
-
deploymentCheck.databasePackageName,
|
|
596
|
-
deploymentCheck.migrationPackageName,
|
|
597
|
-
]),
|
|
598
|
-
];
|
|
599
|
-
for (const packageName of capabilityPackageNames) {
|
|
600
|
-
const contribution = packageByName.get(packageName);
|
|
601
|
-
if (contribution !== undefined) {
|
|
602
|
-
requiredManifestTruthPackagePaths.add(contribution.definition.path);
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
for (const packagePath of requiredManifestTruthPackagePaths) {
|
|
606
|
-
if (!blueprint.packages.some((definition) => definition.path === packagePath)) {
|
|
607
|
-
throw new Error(`Package Addition requires manifest truth for unknown Package Path ${packagePath}`);
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
for (const expectedDefinition of blueprint.packages) {
|
|
611
|
-
const manifestPath = path.join(context.targetDir, expectedDefinition.path, "package.json");
|
|
612
|
-
if (!existsSync(manifestPath) &&
|
|
613
|
-
!requiredManifestTruthPackagePaths.has(expectedDefinition.path)) {
|
|
614
|
-
continue;
|
|
615
|
-
}
|
|
616
|
-
let manifest;
|
|
617
|
-
try {
|
|
618
|
-
manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
619
|
-
}
|
|
620
|
-
catch (error) {
|
|
621
|
-
throw new Error(`Package Addition requires manifest truth for ${expectedDefinition.path}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
622
|
-
}
|
|
623
|
-
if (!isRecord(manifest) || manifest.name !== expectedDefinition.name) {
|
|
624
|
-
throw new Error(`Package Addition requires manifest truth for ${expectedDefinition.path}: expected name ${expectedDefinition.name}`);
|
|
625
|
-
}
|
|
626
|
-
manifestTruthByPackagePath.set(expectedDefinition.path, manifest);
|
|
627
|
-
}
|
|
628
|
-
assertCapabilityRepositoryTruth({
|
|
629
|
-
repositoryRoot: context.targetDir,
|
|
630
|
-
blueprint,
|
|
631
|
-
contributions: allContributions,
|
|
632
|
-
packageByName,
|
|
633
|
-
manifestTruthByPackagePath,
|
|
634
|
-
databasePreparation,
|
|
635
|
-
deploymentCheck,
|
|
636
|
-
vueHonoJointE2e,
|
|
637
|
-
});
|
|
638
|
-
const reconstructedEnvironmentNeeds = normalizeEnvironmentNeeds({
|
|
639
|
-
check: foundationCheckEnvironmentNeeds(allContributions, deploymentCheck, vueHonoJointE2e),
|
|
640
|
-
deployment: deploymentCheck?.environmentNeeds ?? [],
|
|
641
|
-
});
|
|
642
|
-
if (JSON.stringify(reconstructedEnvironmentNeeds) !==
|
|
643
|
-
JSON.stringify(persistedEnvironmentNeeds)) {
|
|
644
|
-
throw new Error("Package Addition requires persisted Environment Needs to match the reproducible Project Projection");
|
|
645
|
-
}
|
|
646
|
-
return {
|
|
647
|
-
foundationContribution,
|
|
648
|
-
contributions,
|
|
649
|
-
manifestTruthByPackagePath,
|
|
650
|
-
generationRecord,
|
|
651
|
-
};
|
|
652
|
-
}
|
|
653
|
-
function packageDefinitionsEqual(left, right) {
|
|
654
|
-
return (left.name === right.name &&
|
|
655
|
-
left.path === right.path &&
|
|
656
|
-
left.role === right.role);
|
|
657
|
-
}
|
|
658
|
-
function requirePersistedPackageDefinition(blueprint, definition) {
|
|
659
|
-
const persisted = blueprint.packages.find((candidate) => packageDefinitionsEqual(candidate, definition));
|
|
660
|
-
if (persisted === undefined) {
|
|
661
|
-
throw new Error(`Project Blueprint has no persisted Package Definition for ${definition.name} at ${definition.path} (${definition.role})`);
|
|
662
|
-
}
|
|
663
|
-
return persisted;
|
|
664
|
-
}
|
|
665
|
-
function packageLinkIntentsEqual(left, right) {
|
|
666
|
-
return (left.consumerPackagePath === right.consumerPackagePath &&
|
|
667
|
-
left.providerPackagePath === right.providerPackagePath);
|
|
668
|
-
}
|
|
669
|
-
function turboBoundaryTagsForContributions(contributions) {
|
|
670
|
-
const selectedTags = new Set();
|
|
671
|
-
for (const contribution of contributions) {
|
|
672
|
-
switch (contribution.definition.role) {
|
|
673
|
-
case "cli-tool":
|
|
674
|
-
case "runtime-service":
|
|
675
|
-
selectedTags.add("app");
|
|
676
|
-
break;
|
|
677
|
-
case "shared-library":
|
|
678
|
-
selectedTags.add("library");
|
|
679
|
-
break;
|
|
680
|
-
case "native-package":
|
|
681
|
-
break;
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
return [...selectedTags];
|
|
685
|
-
}
|
|
686
|
-
function contributedDevcontainerComposition(options) {
|
|
687
|
-
const layerPlan = planDevelopmentContainerToolLayersSync({
|
|
688
|
-
baseLayer: {
|
|
689
|
-
identity: "node-pnpm",
|
|
690
|
-
dockerfile: {
|
|
691
|
-
source: templateSources.foundation,
|
|
692
|
-
from: "devcontainer/base.Dockerfile",
|
|
693
|
-
},
|
|
694
|
-
buildArguments: [
|
|
695
|
-
{
|
|
696
|
-
name: "NODE_VERSION",
|
|
697
|
-
// 根 Node 声明原文是 M1 槽位唯一来源;major 与快照字段不得另作真源。
|
|
698
|
-
value: options.rootNodeDeclaration,
|
|
699
|
-
},
|
|
700
|
-
],
|
|
701
|
-
probes: [
|
|
702
|
-
{ identity: "procps", command: "ps", args: ["--version"] },
|
|
703
|
-
{ identity: "bubblewrap", command: "bwrap", args: ["--version"] },
|
|
704
|
-
{
|
|
705
|
-
identity: "awk",
|
|
706
|
-
command: "awk",
|
|
707
|
-
args: ["BEGIN { exit (6 * 7 != 42) }"],
|
|
708
|
-
},
|
|
709
|
-
{ identity: "ripgrep", command: "rg", args: ["--version"] },
|
|
710
|
-
{
|
|
711
|
-
identity: "jq",
|
|
712
|
-
command: "jq",
|
|
713
|
-
args: ["--exit-status", "--null-input", "{ ready: true } | .ready"],
|
|
714
|
-
},
|
|
715
|
-
{
|
|
716
|
-
identity: "python3",
|
|
717
|
-
command: "python3",
|
|
718
|
-
args: [
|
|
719
|
-
"-c",
|
|
720
|
-
'import json, pathlib, sqlite3, urllib.request; assert json.loads("true") is True',
|
|
721
|
-
],
|
|
722
|
-
},
|
|
723
|
-
{
|
|
724
|
-
identity: "python",
|
|
725
|
-
command: "python",
|
|
726
|
-
args: [
|
|
727
|
-
"-c",
|
|
728
|
-
'import os, shutil, sys; assert sys.version_info.major == 3; assert os.path.samefile(sys.executable, shutil.which("python3"))',
|
|
729
|
-
],
|
|
730
|
-
},
|
|
731
|
-
{ identity: "openssh-client", command: "ssh", args: ["-V"] },
|
|
732
|
-
{ identity: "unzip", command: "unzip", args: ["-v"] },
|
|
733
|
-
{ identity: "file", command: "file", args: ["--version"] },
|
|
734
|
-
{ identity: "iproute2", command: "ss", args: ["--version"] },
|
|
735
|
-
],
|
|
736
|
-
mounts: [
|
|
737
|
-
{
|
|
738
|
-
identity: "pnpm-store",
|
|
739
|
-
type: "volume",
|
|
740
|
-
source: "${devcontainerId}-pnpm-store",
|
|
741
|
-
target: "/pnpm/store",
|
|
742
|
-
},
|
|
743
|
-
],
|
|
744
|
-
},
|
|
745
|
-
layers: [githubCliDevelopmentContainerToolLayer(), ...options.layers],
|
|
746
|
-
});
|
|
747
|
-
return {
|
|
748
|
-
operations: [
|
|
749
|
-
{
|
|
750
|
-
kind: "writeTextTemplate",
|
|
751
|
-
source: templateSources.foundation,
|
|
752
|
-
from: "devcontainer.json",
|
|
753
|
-
to: ".devcontainer/devcontainer.json",
|
|
754
|
-
replacements: {
|
|
755
|
-
PROJECT_NAME: options.context.repositoryName,
|
|
756
|
-
NODE_VERSION: options.rootNodeDeclaration,
|
|
757
|
-
},
|
|
758
|
-
},
|
|
759
|
-
{
|
|
760
|
-
kind: "mergeJson",
|
|
761
|
-
to: ".devcontainer/devcontainer.json",
|
|
762
|
-
value: {
|
|
763
|
-
build: {
|
|
764
|
-
args: Object.fromEntries(layerPlan.buildArguments.map((argument) => [
|
|
765
|
-
argument.name,
|
|
766
|
-
argument.value,
|
|
767
|
-
])),
|
|
768
|
-
},
|
|
769
|
-
...(layerPlan.mounts.length === 0
|
|
770
|
-
? {}
|
|
771
|
-
: {
|
|
772
|
-
mounts: layerPlan.mounts.map(({ identity: _identity, ...mount }) => mount),
|
|
773
|
-
}),
|
|
774
|
-
},
|
|
775
|
-
},
|
|
776
|
-
{
|
|
777
|
-
kind: "writeTextFromFragments",
|
|
778
|
-
to: ".devcontainer/Dockerfile",
|
|
779
|
-
validation: "development-container-dockerfile",
|
|
780
|
-
fragments: layerPlan.layers.map((layer) => layer.dockerfile),
|
|
781
|
-
},
|
|
782
|
-
],
|
|
783
|
-
mountIdentitySet: {
|
|
784
|
-
location: "/mounts",
|
|
785
|
-
identity: {
|
|
786
|
-
kind: "projection",
|
|
787
|
-
members: layerPlan.mounts.map(({ identity, target, }) => ({
|
|
788
|
-
identity,
|
|
789
|
-
match: { target },
|
|
790
|
-
})),
|
|
791
|
-
fallback: { fields: ["target"] },
|
|
792
|
-
},
|
|
793
|
-
},
|
|
794
|
-
toolLayers: layerPlan.layers,
|
|
795
|
-
buildArguments: layerPlan.buildArguments,
|
|
796
|
-
mounts: layerPlan.mounts,
|
|
797
|
-
probes: [
|
|
798
|
-
...layerPlan.probes,
|
|
799
|
-
{
|
|
800
|
-
identity: "docker-daemon",
|
|
801
|
-
command: "docker",
|
|
802
|
-
args: ["version"],
|
|
803
|
-
failureMessage: "无法连接宿主 Docker;请检查宿主 daemon 是否运行,以及开发容器 Feature 的连接配置与权限。",
|
|
804
|
-
},
|
|
805
|
-
{
|
|
806
|
-
identity: "docker-buildx",
|
|
807
|
-
command: "docker",
|
|
808
|
-
args: ["buildx", "version"],
|
|
809
|
-
failureMessage: "Buildx 不可用;请重建开发容器以完成官方 Feature 安装。",
|
|
810
|
-
},
|
|
811
|
-
{
|
|
812
|
-
identity: "docker-compose",
|
|
813
|
-
command: "docker",
|
|
814
|
-
args: ["compose", "version"],
|
|
815
|
-
failureMessage: "Compose 不可用;请重建开发容器以完成官方 Feature 安装。",
|
|
816
|
-
},
|
|
817
|
-
],
|
|
818
|
-
};
|
|
819
|
-
}
|
|
820
|
-
function normalizeDatabasePreparation(contributions) {
|
|
821
|
-
const declarations = contributions.flatMap((contribution) => {
|
|
822
|
-
const capability = contribution.foundation.databasePreparation;
|
|
823
|
-
if (capability === undefined)
|
|
824
|
-
return [];
|
|
825
|
-
if (capability.kind !== "sqlite-database-preparation") {
|
|
826
|
-
throw new Error("Database Preparation has an unsupported capability kind");
|
|
827
|
-
}
|
|
828
|
-
const consumers = Object.fromEntries(capability.consumers.map((consumer) => [
|
|
829
|
-
consumer.kind,
|
|
830
|
-
consumer.packageName,
|
|
831
|
-
]));
|
|
832
|
-
if (capability.consumers.length !== 3 ||
|
|
833
|
-
new Set(capability.consumers.map((consumer) => consumer.kind)).size !==
|
|
834
|
-
3 ||
|
|
835
|
-
consumers["application-dev"] === undefined ||
|
|
836
|
-
consumers["database-test"] === undefined ||
|
|
837
|
-
consumers["application-e2e"] === undefined) {
|
|
838
|
-
throw new Error("Database Preparation must declare application-dev, database-test, and application-e2e consumers exactly once");
|
|
839
|
-
}
|
|
840
|
-
const normalizedConsumers = {
|
|
841
|
-
"application-dev": consumers["application-dev"],
|
|
842
|
-
"database-test": consumers["database-test"],
|
|
843
|
-
"application-e2e": consumers["application-e2e"],
|
|
844
|
-
};
|
|
845
|
-
return [
|
|
846
|
-
{
|
|
847
|
-
databasePackageName: contribution.definition.name,
|
|
848
|
-
migrationPackageName: capability.migrationPackageName,
|
|
849
|
-
consumers: normalizedConsumers,
|
|
850
|
-
fingerprint: JSON.stringify({
|
|
851
|
-
databasePackageName: contribution.definition.name,
|
|
852
|
-
migrationPackageName: capability.migrationPackageName,
|
|
853
|
-
consumers: normalizedConsumers,
|
|
854
|
-
profiles: ["dev", "test", "e2e"],
|
|
855
|
-
}),
|
|
856
|
-
},
|
|
857
|
-
];
|
|
858
|
-
});
|
|
859
|
-
const first = declarations.at(0);
|
|
860
|
-
if (first === undefined)
|
|
861
|
-
return undefined;
|
|
862
|
-
if (declarations.some((item) => item.fingerprint !== first.fingerprint)) {
|
|
863
|
-
throw new Error("Database Preparation has conflicting capability declarations");
|
|
864
|
-
}
|
|
865
|
-
return first;
|
|
866
|
-
}
|
|
867
|
-
function databasePreparationCommands(preparation) {
|
|
868
|
-
const run = (profile, packageName, task) => `DATABASE_PROFILE=${profile} pnpm --filter ${packageName} run ${task}`;
|
|
869
|
-
return {
|
|
870
|
-
"database:prepare:dev": [
|
|
871
|
-
run("dev", preparation.migrationPackageName, "db:push"),
|
|
872
|
-
run("dev", preparation.databasePackageName, "db:seed:example"),
|
|
873
|
-
].join(" && "),
|
|
874
|
-
"database:prepare:test": [
|
|
875
|
-
run("test", preparation.databasePackageName, "db:reset"),
|
|
876
|
-
run("test", preparation.migrationPackageName, "db:push"),
|
|
877
|
-
run("test", preparation.databasePackageName, "db:seed:example"),
|
|
878
|
-
].join(" && "),
|
|
879
|
-
"database:prepare:e2e": [
|
|
880
|
-
run("e2e", preparation.databasePackageName, "db:reset"),
|
|
881
|
-
run("e2e", preparation.migrationPackageName, "db:push"),
|
|
882
|
-
run("e2e", preparation.databasePackageName, "db:seed:example"),
|
|
883
|
-
].join(" && "),
|
|
884
|
-
dev: `pnpm run database:prepare:dev && turbo watch dev --filter=${preparation.consumers["application-dev"]}`,
|
|
885
|
-
};
|
|
886
|
-
}
|
|
887
|
-
function databasePreparationRootTurboTasks() {
|
|
888
|
-
return {
|
|
889
|
-
"//#database:prepare:dev": {
|
|
890
|
-
cache: false,
|
|
891
|
-
tags: ["work:preparation"],
|
|
892
|
-
},
|
|
893
|
-
"//#database:prepare:test": {
|
|
894
|
-
cache: false,
|
|
895
|
-
tags: ["work:preparation"],
|
|
896
|
-
},
|
|
897
|
-
"//#database:prepare:e2e": {
|
|
898
|
-
cache: false,
|
|
899
|
-
tags: ["work:preparation"],
|
|
900
|
-
},
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
function deploymentTurboTasks(deploymentCheck) {
|
|
904
|
-
return {
|
|
905
|
-
"//#deployment": {
|
|
906
|
-
dependsOn: [
|
|
907
|
-
`${deploymentCheck.applicationPackageName}#build`,
|
|
908
|
-
`${deploymentCheck.databasePackageName}#build`,
|
|
909
|
-
`${deploymentCheck.migrationPackageName}#build`,
|
|
910
|
-
],
|
|
911
|
-
cache: false,
|
|
912
|
-
tags: ["quality:heavy"],
|
|
913
|
-
},
|
|
914
|
-
};
|
|
915
|
-
}
|
|
916
|
-
function vueHonoJointE2eTurboTasks(e2e) {
|
|
917
|
-
return {
|
|
918
|
-
"//#test:e2e": {
|
|
919
|
-
dependsOn: [
|
|
920
|
-
`${e2e.apiPackageName}#build`,
|
|
921
|
-
`${e2e.webPackageName}#build`,
|
|
922
|
-
`${e2e.webPackageName}#browser:prepare`,
|
|
923
|
-
],
|
|
924
|
-
cache: false,
|
|
925
|
-
tags: ["quality:heavy"],
|
|
926
|
-
},
|
|
927
|
-
};
|
|
928
|
-
}
|
|
929
|
-
function assertDatabasePreparationManifestTruth(options) {
|
|
930
|
-
const { preparation, packageByName, manifestTruthByPackagePath } = options;
|
|
931
|
-
if (preparation === undefined || manifestTruthByPackagePath === undefined) {
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
const expectedTasks = [
|
|
935
|
-
[preparation.databasePackageName, "build"],
|
|
936
|
-
[preparation.databasePackageName, "db:reset"],
|
|
937
|
-
[preparation.databasePackageName, "db:seed:example"],
|
|
938
|
-
[preparation.databasePackageName, "test"],
|
|
939
|
-
[preparation.migrationPackageName, "db:push"],
|
|
940
|
-
[preparation.migrationPackageName, "typecheck"],
|
|
941
|
-
[preparation.consumers["application-dev"], "dev"],
|
|
942
|
-
[preparation.consumers["application-dev"], "typecheck"],
|
|
943
|
-
[preparation.consumers["application-e2e"], "build"],
|
|
944
|
-
[preparation.consumers["application-e2e"], "test:e2e"],
|
|
945
|
-
];
|
|
946
|
-
for (const [packageName, taskName] of expectedTasks) {
|
|
947
|
-
const contribution = requireContributionByName(packageByName, packageName, "Database Preparation");
|
|
948
|
-
const manifest = requireManifestTruth(manifestTruthByPackagePath, contribution, "Database Preparation");
|
|
949
|
-
const actualScripts = manifest.scripts;
|
|
950
|
-
const expectedScripts = contribution.manifest.scripts;
|
|
951
|
-
const actual = isRecord(actualScripts)
|
|
952
|
-
? actualScripts[taskName]
|
|
953
|
-
: undefined;
|
|
954
|
-
const expected = isRecord(expectedScripts)
|
|
955
|
-
? expectedScripts[taskName]
|
|
956
|
-
: undefined;
|
|
957
|
-
if (actual !== expected) {
|
|
958
|
-
throw new Error(`Database Preparation requires exact ${packageName} script ${taskName}`);
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
function normalizeDeploymentCheck(contributions) {
|
|
963
|
-
const declarations = contributions.flatMap((contribution) => {
|
|
964
|
-
const check = contribution.foundation.deploymentCheck;
|
|
965
|
-
if (check === undefined)
|
|
966
|
-
return [];
|
|
967
|
-
if (check.kind !== "application-container-with-database-migrations") {
|
|
968
|
-
throw new Error("Deployment Check has an unsupported capability kind");
|
|
969
|
-
}
|
|
970
|
-
return [{ ...check, declaringPackagePath: contribution.definition.path }];
|
|
971
|
-
});
|
|
972
|
-
if (declarations.length > 1) {
|
|
973
|
-
throw new Error("Deployment Check has multiple capability declarations");
|
|
974
|
-
}
|
|
975
|
-
return declarations.at(0);
|
|
976
|
-
}
|
|
977
|
-
function normalizeVueHonoJointE2e(contributions) {
|
|
978
|
-
const declarations = contributions.flatMap((contribution) => {
|
|
979
|
-
const e2e = contribution.foundation.vueHonoJointE2e;
|
|
980
|
-
if (e2e === undefined)
|
|
981
|
-
return [];
|
|
982
|
-
if (e2e.kind !== "vue-hono-joint-e2e") {
|
|
983
|
-
throw new Error("Vue-Hono joint E2E has an unsupported capability kind");
|
|
984
|
-
}
|
|
985
|
-
return [
|
|
986
|
-
{
|
|
987
|
-
...e2e,
|
|
988
|
-
webPackageName: contribution.definition.name,
|
|
989
|
-
declaringPackagePath: contribution.definition.path,
|
|
990
|
-
},
|
|
991
|
-
];
|
|
992
|
-
});
|
|
993
|
-
if (declarations.length > 1) {
|
|
994
|
-
throw new Error("Vue-Hono joint E2E has multiple capability declarations");
|
|
995
|
-
}
|
|
996
|
-
return declarations.at(0);
|
|
997
|
-
}
|
|
998
|
-
function requireContributionByName(packageByName, packageName, capability) {
|
|
999
|
-
const contribution = packageByName.get(packageName);
|
|
1000
|
-
if (contribution === undefined) {
|
|
1001
|
-
throw new Error(`${capability} references unknown Package ${packageName}`);
|
|
1002
|
-
}
|
|
1003
|
-
return contribution;
|
|
1004
|
-
}
|
|
1005
|
-
function requireManifestTruth(manifestTruthByPackagePath, contribution, capability) {
|
|
1006
|
-
const manifest = manifestTruthByPackagePath.get(contribution.definition.path);
|
|
1007
|
-
if (manifest === undefined) {
|
|
1008
|
-
throw new Error(`${capability} requires manifest truth for ${contribution.definition.path}`);
|
|
1009
|
-
}
|
|
1010
|
-
return manifest;
|
|
1011
|
-
}
|
|
1012
|
-
function assertExpectedRecordMembers(options) {
|
|
1013
|
-
if (!isRecord(options.expected)) {
|
|
1014
|
-
throw new Error(`${options.label} replay did not provide object truth`);
|
|
1015
|
-
}
|
|
1016
|
-
if (!isRecord(options.actual)) {
|
|
1017
|
-
throw new Error(`${options.label} must be an object`);
|
|
1018
|
-
}
|
|
1019
|
-
for (const [key, expectedValue] of Object.entries(options.expected)) {
|
|
1020
|
-
if (!isDeepStrictEqual(options.actual[key], expectedValue)) {
|
|
1021
|
-
throw new Error(`${options.label} must preserve replayed member ${key}`);
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
function assertArtifactConditionOrder(options) {
|
|
1026
|
-
if (!isRecord(options.expected) || !isRecord(options.actual))
|
|
1027
|
-
return;
|
|
1028
|
-
const conditionNames = ["source", "types", "default"];
|
|
1029
|
-
const expectedConditions = Object.keys(options.expected).filter((name) => conditionNames.includes(name));
|
|
1030
|
-
if (!expectedConditions.includes("source") ||
|
|
1031
|
-
!expectedConditions.some((name) => name === "types" || name === "default")) {
|
|
1032
|
-
return;
|
|
1033
|
-
}
|
|
1034
|
-
const actualConditions = Object.keys(options.actual).filter((name) => expectedConditions.includes(name));
|
|
1035
|
-
if (!isDeepStrictEqual(actualConditions, expectedConditions)) {
|
|
1036
|
-
throw new Error(`${options.label} must preserve replayed condition order`);
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
function assertDatabaseArtifactConditionTruth(options) {
|
|
1040
|
-
if (!isRecord(options.actual) || !isRecord(options.expected))
|
|
1041
|
-
return;
|
|
1042
|
-
for (const [memberName, expectedMember] of Object.entries(options.expected)) {
|
|
1043
|
-
assertArtifactConditionOrder({
|
|
1044
|
-
actual: options.actual[memberName],
|
|
1045
|
-
expected: expectedMember,
|
|
1046
|
-
label: `${options.label} ${memberName}`,
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
function assertDatabaseArtifactManifestTruth(options) {
|
|
1051
|
-
if (options.preparation === undefined)
|
|
1052
|
-
return;
|
|
1053
|
-
const database = requireContributionByName(options.packageByName, options.preparation.databasePackageName, "Database Preparation");
|
|
1054
|
-
const actual = requireManifestTruth(options.manifestTruthByPackagePath, database, "Database Preparation");
|
|
1055
|
-
const expected = database.manifest;
|
|
1056
|
-
if (actual.type !== expected.type || expected.type !== "module") {
|
|
1057
|
-
throw new Error(`Database Preparation requires ${database.definition.name} manifest type module`);
|
|
1058
|
-
}
|
|
1059
|
-
if (!Array.isArray(expected.files)) {
|
|
1060
|
-
throw new Error(`Database Preparation replay for ${database.definition.name} did not provide files truth`);
|
|
1061
|
-
}
|
|
1062
|
-
const actualFiles = actual.files;
|
|
1063
|
-
if (!Array.isArray(actualFiles) ||
|
|
1064
|
-
expected.files.some((expectedFile) => !actualFiles.some((actualFile) => isDeepStrictEqual(actualFile, expectedFile)))) {
|
|
1065
|
-
throw new Error(`Database Preparation requires ${database.definition.name} public build files`);
|
|
1066
|
-
}
|
|
1067
|
-
assertExpectedRecordMembers({
|
|
1068
|
-
actual: actual.exports,
|
|
1069
|
-
expected: expected.exports,
|
|
1070
|
-
label: `Database Preparation ${database.definition.name} exports`,
|
|
1071
|
-
});
|
|
1072
|
-
assertDatabaseArtifactConditionTruth({
|
|
1073
|
-
actual: actual.exports,
|
|
1074
|
-
expected: expected.exports,
|
|
1075
|
-
label: `Database Preparation ${database.definition.name} exports`,
|
|
1076
|
-
});
|
|
1077
|
-
assertExpectedRecordMembers({
|
|
1078
|
-
actual: actual.imports,
|
|
1079
|
-
expected: expected.imports,
|
|
1080
|
-
label: `Database Preparation ${database.definition.name} imports`,
|
|
1081
|
-
});
|
|
1082
|
-
assertDatabaseArtifactConditionTruth({
|
|
1083
|
-
actual: actual.imports,
|
|
1084
|
-
expected: expected.imports,
|
|
1085
|
-
label: `Database Preparation ${database.definition.name} imports`,
|
|
1086
|
-
});
|
|
1087
|
-
}
|
|
1088
|
-
function assertDatabaseProjectLinkManifestTruth(options) {
|
|
1089
|
-
if (options.preparation === undefined)
|
|
1090
|
-
return;
|
|
1091
|
-
const database = requireContributionByName(options.packageByName, options.preparation.databasePackageName, "Database Preparation");
|
|
1092
|
-
const expectedLinks = planExplicitProjectLinks({
|
|
1093
|
-
blueprint: options.blueprint,
|
|
1094
|
-
contributions: options.contributions,
|
|
1095
|
-
});
|
|
1096
|
-
for (const intent of options.blueprint.packageLinkIntents ?? []) {
|
|
1097
|
-
if (intent.providerPackagePath !== database.definition.path)
|
|
1098
|
-
continue;
|
|
1099
|
-
const consumer = options.contributions.find((candidate) => candidate.definition.path === intent.consumerPackagePath);
|
|
1100
|
-
if (consumer === undefined) {
|
|
1101
|
-
throw new Error(`Database Preparation Project Link references unknown consumer ${intent.consumerPackagePath}`);
|
|
1102
|
-
}
|
|
1103
|
-
const actual = requireManifestTruth(options.manifestTruthByPackagePath, consumer, "Database Preparation Project Link");
|
|
1104
|
-
if (!isRecord(actual.dependencies) ||
|
|
1105
|
-
actual.dependencies[database.definition.name] !== "workspace:*") {
|
|
1106
|
-
throw new Error(`Database Preparation requires ${consumer.definition.name} to depend on ${database.definition.name} through workspace:*`);
|
|
1107
|
-
}
|
|
1108
|
-
const expectedMetadata = expectedLinks.manifestPatchesByPackagePath.get(consumer.definition.path)?.dependenciesMeta?.[database.definition.name];
|
|
1109
|
-
if (actual.dependenciesMeta !== undefined &&
|
|
1110
|
-
!isRecord(actual.dependenciesMeta)) {
|
|
1111
|
-
throw new Error(`Database Preparation requires valid dependency metadata in ${consumer.definition.name}`);
|
|
1112
|
-
}
|
|
1113
|
-
const actualMetadata = isRecord(actual.dependenciesMeta)
|
|
1114
|
-
? actual.dependenciesMeta[database.definition.name]
|
|
1115
|
-
: undefined;
|
|
1116
|
-
if (!isDeepStrictEqual(actualMetadata, expectedMetadata)) {
|
|
1117
|
-
throw new Error(`Database Preparation requires replayed Project Link metadata for ${consumer.definition.name} -> ${database.definition.name}`);
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
function assertDeploymentBuildManifestTruth(options) {
|
|
1122
|
-
if (options.deploymentCheck === undefined)
|
|
1123
|
-
return;
|
|
1124
|
-
for (const packageName of [
|
|
1125
|
-
options.deploymentCheck.applicationPackageName,
|
|
1126
|
-
options.deploymentCheck.databasePackageName,
|
|
1127
|
-
options.deploymentCheck.migrationPackageName,
|
|
1128
|
-
]) {
|
|
1129
|
-
const contribution = requireContributionByName(options.packageByName, packageName, "Deployment Check");
|
|
1130
|
-
const actual = requireManifestTruth(options.manifestTruthByPackagePath, contribution, "Deployment Check");
|
|
1131
|
-
const actualBuild = isRecord(actual.scripts)
|
|
1132
|
-
? actual.scripts.build
|
|
1133
|
-
: undefined;
|
|
1134
|
-
const expectedBuild = isRecord(contribution.manifest.scripts)
|
|
1135
|
-
? contribution.manifest.scripts.build
|
|
1136
|
-
: undefined;
|
|
1137
|
-
if (typeof expectedBuild !== "string" || actualBuild !== expectedBuild) {
|
|
1138
|
-
throw new Error(`Deployment Check requires exact ${packageName} manifest script build`);
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
function assertVueHonoJointE2eManifestTruth(options) {
|
|
1143
|
-
if (options.e2e === undefined)
|
|
1144
|
-
return;
|
|
1145
|
-
if (options.e2e.apiPackageName === options.e2e.webPackageName) {
|
|
1146
|
-
throw new Error("Vue-Hono joint E2E requires distinct API and web Packages");
|
|
1147
|
-
}
|
|
1148
|
-
const expectedTasks = [
|
|
1149
|
-
[options.e2e.apiPackageName, "build"],
|
|
1150
|
-
[options.e2e.apiPackageName, "start"],
|
|
1151
|
-
[options.e2e.webPackageName, "build"],
|
|
1152
|
-
[options.e2e.webPackageName, "preview"],
|
|
1153
|
-
];
|
|
1154
|
-
for (const [packageName, taskName] of expectedTasks) {
|
|
1155
|
-
const contribution = requireContributionByName(options.packageByName, packageName, "Vue-Hono joint E2E");
|
|
1156
|
-
const actual = requireManifestTruth(options.manifestTruthByPackagePath, contribution, "Vue-Hono joint E2E");
|
|
1157
|
-
const expected = isRecord(contribution.manifest.scripts)
|
|
1158
|
-
? contribution.manifest.scripts[taskName]
|
|
1159
|
-
: undefined;
|
|
1160
|
-
const actualScript = isRecord(actual.scripts)
|
|
1161
|
-
? actual.scripts[taskName]
|
|
1162
|
-
: undefined;
|
|
1163
|
-
if (typeof expected !== "string" || actualScript !== expected) {
|
|
1164
|
-
throw new Error(`Vue-Hono joint E2E requires exact ${packageName} manifest script ${taskName}`);
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
function readRepositoryJsonRecord(options) {
|
|
1169
|
-
const value = readJsonFile(path.join(options.repositoryRoot, options.relativePath), `${options.label} in ${options.relativePath}`);
|
|
1170
|
-
if (!isRecord(value)) {
|
|
1171
|
-
throw new Error(`Package Addition requires ${options.label} in ${options.relativePath} to be an object`);
|
|
1172
|
-
}
|
|
1173
|
-
return value;
|
|
1174
|
-
}
|
|
1175
|
-
function assertRootCapabilityManifestTruth(options) {
|
|
1176
|
-
if (options.databasePreparation === undefined &&
|
|
1177
|
-
options.deploymentCheck === undefined &&
|
|
1178
|
-
options.vueHonoJointE2e === undefined) {
|
|
1179
|
-
return;
|
|
1180
|
-
}
|
|
1181
|
-
const manifest = readRepositoryJsonRecord({
|
|
1182
|
-
repositoryRoot: options.repositoryRoot,
|
|
1183
|
-
relativePath: "package.json",
|
|
1184
|
-
label: "root Manifest Truth",
|
|
1185
|
-
});
|
|
1186
|
-
if (!isRecord(manifest.scripts)) {
|
|
1187
|
-
throw new Error("Package Addition requires root manifest scripts truth");
|
|
1188
|
-
}
|
|
1189
|
-
const expectedScripts = {
|
|
1190
|
-
...(options.databasePreparation === undefined
|
|
1191
|
-
? {}
|
|
1192
|
-
: databasePreparationCommands(options.databasePreparation)),
|
|
1193
|
-
...(options.deploymentCheck === undefined
|
|
1194
|
-
? {}
|
|
1195
|
-
: {
|
|
1196
|
-
deployment: "node --conditions=source scripts/check-standalone-deployment.ts",
|
|
1197
|
-
}),
|
|
1198
|
-
...(options.vueHonoJointE2e === undefined
|
|
1199
|
-
? {}
|
|
1200
|
-
: { "test:e2e": "playwright test" }),
|
|
1201
|
-
};
|
|
1202
|
-
for (const [scriptName, expectedCommand] of Object.entries(expectedScripts)) {
|
|
1203
|
-
if (manifest.scripts[scriptName] !== expectedCommand) {
|
|
1204
|
-
throw new Error(`Package Addition requires exact root manifest script ${scriptName}`);
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
function assertTurboTaskTruth(options) {
|
|
1209
|
-
if (!isRecord(options.config.tasks)) {
|
|
1210
|
-
throw new Error(`${options.label} requires Turbo tasks truth`);
|
|
1211
|
-
}
|
|
1212
|
-
for (const [taskName, expectedTask] of Object.entries(options.expectedTasks)) {
|
|
1213
|
-
const actualTask = options.config.tasks[taskName];
|
|
1214
|
-
if (!isRecord(actualTask)) {
|
|
1215
|
-
throw new Error(`${options.label} requires Turbo task ${taskName}`);
|
|
1216
|
-
}
|
|
1217
|
-
for (const [field, expectedValue] of Object.entries(expectedTask)) {
|
|
1218
|
-
const actualValue = actualTask[field];
|
|
1219
|
-
if (Array.isArray(expectedValue)) {
|
|
1220
|
-
if (!Array.isArray(actualValue) ||
|
|
1221
|
-
expectedValue.some((expectedMember) => !actualValue.includes(expectedMember))) {
|
|
1222
|
-
throw new Error(`${options.label} requires Turbo task ${taskName} ${field}`);
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
else if (!isDeepStrictEqual(actualValue, expectedValue)) {
|
|
1226
|
-
throw new Error(`${options.label} requires Turbo task ${taskName} ${field}`);
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
function assertCapabilityPackageTurboInheritanceTruth(options) {
|
|
1232
|
-
if (!Array.isArray(options.config.extends) ||
|
|
1233
|
-
options.config.extends.length !== 1 ||
|
|
1234
|
-
options.config.extends[0] !== "//") {
|
|
1235
|
-
throw new Error(`${options.label} requires exact Turbo extends truth`);
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
function localCapabilityTaskDependencies(options) {
|
|
1239
|
-
if (!isRecord(options.localTask)) {
|
|
1240
|
-
throw new Error(`${options.label} requires Turbo task ${options.taskName}`);
|
|
1241
|
-
}
|
|
1242
|
-
const extendsValue = options.localTask.extends;
|
|
1243
|
-
if (extendsValue !== undefined && typeof extendsValue !== "boolean") {
|
|
1244
|
-
throw new Error(`${options.label} requires Turbo task ${options.taskName} extends truth`);
|
|
1245
|
-
}
|
|
1246
|
-
return options.localTask.dependsOn;
|
|
1247
|
-
}
|
|
1248
|
-
function assertCapabilityConsumerTurboTruth(options) {
|
|
1249
|
-
const turboByPackagePath = new Map();
|
|
1250
|
-
const assertPackageTaskTruth = (packageName, taskName, expectedTask) => {
|
|
1251
|
-
const contribution = requireContributionByName(options.packageByName, packageName, "Database Preparation");
|
|
1252
|
-
const packageTurbo = turboByPackagePath.get(contribution.definition.path) ??
|
|
1253
|
-
readRepositoryJsonRecord({
|
|
1254
|
-
repositoryRoot: options.repositoryRoot,
|
|
1255
|
-
relativePath: `${contribution.definition.path}/turbo.json`,
|
|
1256
|
-
label: `${contribution.definition.name} Turbo Truth`,
|
|
1257
|
-
});
|
|
1258
|
-
turboByPackagePath.set(contribution.definition.path, packageTurbo);
|
|
1259
|
-
if (!isRecord(packageTurbo.tasks)) {
|
|
1260
|
-
throw new Error(`Package Addition ${contribution.definition.name} Turbo Truth requires Turbo tasks truth`);
|
|
1261
|
-
}
|
|
1262
|
-
assertCapabilityPackageTurboInheritanceTruth({
|
|
1263
|
-
config: packageTurbo,
|
|
1264
|
-
label: `Package Addition ${contribution.definition.name} Turbo Truth`,
|
|
1265
|
-
});
|
|
1266
|
-
const localTask = packageTurbo.tasks[taskName];
|
|
1267
|
-
localCapabilityTaskDependencies({
|
|
1268
|
-
localTask,
|
|
1269
|
-
label: `Package Addition ${contribution.definition.name} Turbo Truth`,
|
|
1270
|
-
taskName,
|
|
1271
|
-
});
|
|
1272
|
-
assertTurboTaskTruth({
|
|
1273
|
-
config: packageTurbo,
|
|
1274
|
-
expectedTasks: { [taskName]: expectedTask },
|
|
1275
|
-
label: `Package Addition ${contribution.definition.name} Turbo Truth`,
|
|
1276
|
-
});
|
|
1277
|
-
};
|
|
1278
|
-
const preparation = options.preparation;
|
|
1279
|
-
assertPackageTaskTruth(preparation.databasePackageName, "test", {
|
|
1280
|
-
dependsOn: ["//#database:prepare:test"],
|
|
1281
|
-
tags: ["quality:light"],
|
|
1282
|
-
});
|
|
1283
|
-
assertPackageTaskTruth(preparation.migrationPackageName, "typecheck", {
|
|
1284
|
-
dependsOn: [`${preparation.databasePackageName}#build`],
|
|
1285
|
-
tags: ["quality:light"],
|
|
1286
|
-
});
|
|
1287
|
-
assertPackageTaskTruth(preparation.consumers["application-dev"], "typecheck", {
|
|
1288
|
-
dependsOn: [`${preparation.databasePackageName}#build`],
|
|
1289
|
-
tags: ["quality:light"],
|
|
1290
|
-
});
|
|
1291
|
-
assertPackageTaskTruth(preparation.consumers["application-dev"], "dev", {
|
|
1292
|
-
dependsOn: [`${preparation.databasePackageName}#build`],
|
|
1293
|
-
cache: false,
|
|
1294
|
-
persistent: true,
|
|
1295
|
-
tags: ["work:development"],
|
|
1296
|
-
});
|
|
1297
|
-
assertPackageTaskTruth(preparation.consumers["application-e2e"], "test:e2e", {
|
|
1298
|
-
dependsOn: [
|
|
1299
|
-
"//#database:prepare:e2e",
|
|
1300
|
-
`${preparation.databasePackageName}#build`,
|
|
1301
|
-
"build",
|
|
1302
|
-
"browser:prepare",
|
|
1303
|
-
],
|
|
1304
|
-
cache: false,
|
|
1305
|
-
tags: ["quality:heavy"],
|
|
1306
|
-
});
|
|
1307
|
-
for (const packageName of options.buildConsumerPackageNames) {
|
|
1308
|
-
const contribution = requireContributionByName(options.packageByName, packageName, "Database Preparation");
|
|
1309
|
-
const packageTurbo = turboByPackagePath.get(contribution.definition.path) ??
|
|
1310
|
-
readRepositoryJsonRecord({
|
|
1311
|
-
repositoryRoot: options.repositoryRoot,
|
|
1312
|
-
relativePath: `${contribution.definition.path}/turbo.json`,
|
|
1313
|
-
label: `${contribution.definition.name} Turbo Truth`,
|
|
1314
|
-
});
|
|
1315
|
-
turboByPackagePath.set(contribution.definition.path, packageTurbo);
|
|
1316
|
-
if (!isRecord(packageTurbo.tasks)) {
|
|
1317
|
-
throw new Error(`Package Addition ${contribution.definition.name} Turbo Truth requires Turbo tasks truth`);
|
|
1318
|
-
}
|
|
1319
|
-
assertCapabilityPackageTurboInheritanceTruth({
|
|
1320
|
-
config: packageTurbo,
|
|
1321
|
-
label: `Package Addition ${contribution.definition.name} Turbo Truth`,
|
|
1322
|
-
});
|
|
1323
|
-
const localBuild = packageTurbo.tasks.build;
|
|
1324
|
-
const dependencies = localCapabilityTaskDependencies({
|
|
1325
|
-
localTask: localBuild,
|
|
1326
|
-
label: `Package Addition ${contribution.definition.name} Turbo Truth`,
|
|
1327
|
-
taskName: "build",
|
|
1328
|
-
});
|
|
1329
|
-
if (!Array.isArray(dependencies) ||
|
|
1330
|
-
!dependencies.some((dependency) => dependency === "^build" ||
|
|
1331
|
-
dependency === `${options.preparation.databasePackageName}#build`)) {
|
|
1332
|
-
throw new Error(`Package Addition ${contribution.definition.name} Turbo Truth requires Turbo task build dependsOn`);
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
function assertCapabilityTurboTruth(options) {
|
|
1337
|
-
if (options.databasePreparation === undefined &&
|
|
1338
|
-
options.deploymentCheck === undefined &&
|
|
1339
|
-
options.vueHonoJointE2e === undefined) {
|
|
1340
|
-
return;
|
|
1341
|
-
}
|
|
1342
|
-
const rootTurbo = readRepositoryJsonRecord({
|
|
1343
|
-
repositoryRoot: options.repositoryRoot,
|
|
1344
|
-
relativePath: "turbo.json",
|
|
1345
|
-
label: "root Turbo Truth",
|
|
1346
|
-
});
|
|
1347
|
-
assertTurboTaskTruth({
|
|
1348
|
-
config: rootTurbo,
|
|
1349
|
-
expectedTasks: {
|
|
1350
|
-
...(options.databasePreparation === undefined
|
|
1351
|
-
? {}
|
|
1352
|
-
: databasePreparationRootTurboTasks()),
|
|
1353
|
-
...(options.deploymentCheck === undefined
|
|
1354
|
-
? {}
|
|
1355
|
-
: deploymentTurboTasks(options.deploymentCheck)),
|
|
1356
|
-
...(options.vueHonoJointE2e === undefined
|
|
1357
|
-
? {}
|
|
1358
|
-
: vueHonoJointE2eTurboTasks(options.vueHonoJointE2e)),
|
|
1359
|
-
},
|
|
1360
|
-
label: "Package Addition root Turbo Truth",
|
|
1361
|
-
});
|
|
1362
|
-
if (options.databasePreparation === undefined)
|
|
1363
|
-
return;
|
|
1364
|
-
const database = requireContributionByName(options.packageByName, options.databasePreparation.databasePackageName, "Database Preparation");
|
|
1365
|
-
const databaseTurbo = readRepositoryJsonRecord({
|
|
1366
|
-
repositoryRoot: options.repositoryRoot,
|
|
1367
|
-
relativePath: `${database.definition.path}/turbo.json`,
|
|
1368
|
-
label: `${database.definition.name} Turbo Truth`,
|
|
1369
|
-
});
|
|
1370
|
-
assertTurboTaskTruth({
|
|
1371
|
-
config: databaseTurbo,
|
|
1372
|
-
expectedTasks: { build: { outputs: ["dist/**"] } },
|
|
1373
|
-
label: `Package Addition ${database.definition.name} Turbo Truth`,
|
|
1374
|
-
});
|
|
1375
|
-
assertCapabilityConsumerTurboTruth({
|
|
1376
|
-
repositoryRoot: options.repositoryRoot,
|
|
1377
|
-
preparation: options.databasePreparation,
|
|
1378
|
-
buildConsumerPackageNames: [
|
|
1379
|
-
options.databasePreparation.migrationPackageName,
|
|
1380
|
-
...new Set(Object.values(options.databasePreparation.consumers)),
|
|
1381
|
-
],
|
|
1382
|
-
packageByName: options.packageByName,
|
|
1383
|
-
});
|
|
1384
|
-
}
|
|
1385
|
-
function unwrapTypeScriptExpression(expression) {
|
|
1386
|
-
return ts.isParenthesizedExpression(expression) ||
|
|
1387
|
-
ts.isAsExpression(expression) ||
|
|
1388
|
-
ts.isSatisfiesExpression(expression) ||
|
|
1389
|
-
ts.isTypeAssertionExpression(expression)
|
|
1390
|
-
? unwrapTypeScriptExpression(expression.expression)
|
|
1391
|
-
: expression;
|
|
1392
|
-
}
|
|
1393
|
-
function typeScriptPropertyName(name) {
|
|
1394
|
-
return ts.isIdentifier(name) || ts.isStringLiteralLike(name)
|
|
1395
|
-
? name.text
|
|
1396
|
-
: undefined;
|
|
1397
|
-
}
|
|
1398
|
-
function finalObjectLiteralPropertyValue(expression, propertyName) {
|
|
1399
|
-
let hasUnverifiableOverride = false;
|
|
1400
|
-
for (const property of [...expression.properties].reverse()) {
|
|
1401
|
-
if (ts.isSpreadAssignment(property)) {
|
|
1402
|
-
hasUnverifiableOverride = true;
|
|
1403
|
-
continue;
|
|
1404
|
-
}
|
|
1405
|
-
const name = typeScriptPropertyName(property.name);
|
|
1406
|
-
if (name === propertyName) {
|
|
1407
|
-
if (!ts.isPropertyAssignment(property) || hasUnverifiableOverride) {
|
|
1408
|
-
return undefined;
|
|
1409
|
-
}
|
|
1410
|
-
return property.initializer;
|
|
1411
|
-
}
|
|
1412
|
-
if (name === undefined) {
|
|
1413
|
-
hasUnverifiableOverride = true;
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
return undefined;
|
|
1417
|
-
}
|
|
1418
|
-
function assertDatabaseViteRuntimeTruth(options) {
|
|
1419
|
-
if (options.deploymentCheck === undefined)
|
|
1420
|
-
return;
|
|
1421
|
-
const application = requireContributionByName(options.packageByName, options.deploymentCheck.applicationPackageName, "Deployment Check");
|
|
1422
|
-
const configPath = `${application.definition.path}/vite.config.ts`;
|
|
1423
|
-
let sourceText;
|
|
1424
|
-
try {
|
|
1425
|
-
sourceText = readFileSync(path.join(options.repositoryRoot, configPath), "utf8");
|
|
1426
|
-
}
|
|
1427
|
-
catch (error) {
|
|
1428
|
-
throw new Error(`Package Addition requires Vite runtime truth in ${configPath}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
1429
|
-
}
|
|
1430
|
-
const sourceFile = ts.createSourceFile(configPath, sourceText, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
|
|
1431
|
-
if ((sourceFile.parseDiagnostics ?? []).length > 0) {
|
|
1432
|
-
throw new Error(`Package Addition requires valid Vite runtime truth in ${configPath}`);
|
|
1433
|
-
}
|
|
1434
|
-
const exportAssignment = sourceFile.statements.find((statement) => ts.isExportAssignment(statement) && !statement.isExportEquals);
|
|
1435
|
-
const exported = exportAssignment === undefined
|
|
1436
|
-
? undefined
|
|
1437
|
-
: unwrapTypeScriptExpression(exportAssignment.expression);
|
|
1438
|
-
const configCall = exported !== undefined &&
|
|
1439
|
-
ts.isCallExpression(exported) &&
|
|
1440
|
-
ts.isIdentifier(exported.expression) &&
|
|
1441
|
-
exported.expression.text === "defineConfig"
|
|
1442
|
-
? exported
|
|
1443
|
-
: undefined;
|
|
1444
|
-
const configArgument = configCall?.arguments[0];
|
|
1445
|
-
const config = configArgument === undefined
|
|
1446
|
-
? undefined
|
|
1447
|
-
: unwrapTypeScriptExpression(configArgument);
|
|
1448
|
-
const ssrValue = config !== undefined && ts.isObjectLiteralExpression(config)
|
|
1449
|
-
? finalObjectLiteralPropertyValue(config, "ssr")
|
|
1450
|
-
: undefined;
|
|
1451
|
-
const ssr = ssrValue === undefined ? undefined : unwrapTypeScriptExpression(ssrValue);
|
|
1452
|
-
const externalValue = ssr !== undefined && ts.isObjectLiteralExpression(ssr)
|
|
1453
|
-
? finalObjectLiteralPropertyValue(ssr, "external")
|
|
1454
|
-
: undefined;
|
|
1455
|
-
const external = externalValue === undefined
|
|
1456
|
-
? undefined
|
|
1457
|
-
: unwrapTypeScriptExpression(externalValue);
|
|
1458
|
-
const expectedPackageName = options.deploymentCheck.databasePackageName;
|
|
1459
|
-
const externalPackageNames = external !== undefined && ts.isArrayLiteralExpression(external)
|
|
1460
|
-
? external.elements.flatMap((element) => ts.isStringLiteralLike(element) ? [element.text] : [])
|
|
1461
|
-
: external !== undefined && ts.isStringLiteralLike(external)
|
|
1462
|
-
? [external.text]
|
|
1463
|
-
: [];
|
|
1464
|
-
if (!externalPackageNames.includes(expectedPackageName)) {
|
|
1465
|
-
throw new Error(`Package Addition requires ${configPath} to externalize ${expectedPackageName} through Vite SSR`);
|
|
1466
|
-
}
|
|
1467
|
-
}
|
|
1468
|
-
function assertVueHonoJointE2ePlaywrightTruth(options) {
|
|
1469
|
-
if (options.e2e === undefined)
|
|
1470
|
-
return;
|
|
1471
|
-
const configPath = "playwright.config.ts";
|
|
1472
|
-
let sourceText;
|
|
1473
|
-
try {
|
|
1474
|
-
sourceText = readFileSync(path.join(options.repositoryRoot, configPath), "utf8");
|
|
1475
|
-
}
|
|
1476
|
-
catch (error) {
|
|
1477
|
-
throw new Error(`Package Addition requires Vue-Hono joint E2E root Playwright truth in ${configPath}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
1478
|
-
}
|
|
1479
|
-
const sourceFile = ts.createSourceFile(configPath, sourceText, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
|
|
1480
|
-
if ((sourceFile.parseDiagnostics ?? []).length > 0) {
|
|
1481
|
-
throw new Error(`Package Addition requires valid Vue-Hono joint E2E root Playwright truth in ${configPath}`);
|
|
1482
|
-
}
|
|
1483
|
-
const exportAssignment = sourceFile.statements.find((statement) => ts.isExportAssignment(statement) && !statement.isExportEquals);
|
|
1484
|
-
const exported = exportAssignment === undefined
|
|
1485
|
-
? undefined
|
|
1486
|
-
: unwrapTypeScriptExpression(exportAssignment.expression);
|
|
1487
|
-
const configCall = exported !== undefined &&
|
|
1488
|
-
ts.isCallExpression(exported) &&
|
|
1489
|
-
ts.isIdentifier(exported.expression) &&
|
|
1490
|
-
exported.expression.text === "defineConfig"
|
|
1491
|
-
? exported
|
|
1492
|
-
: undefined;
|
|
1493
|
-
const configArgument = configCall?.arguments[0];
|
|
1494
|
-
const config = configArgument === undefined
|
|
1495
|
-
? undefined
|
|
1496
|
-
: unwrapTypeScriptExpression(configArgument);
|
|
1497
|
-
const webServerValue = config !== undefined && ts.isObjectLiteralExpression(config)
|
|
1498
|
-
? finalObjectLiteralPropertyValue(config, "webServer")
|
|
1499
|
-
: undefined;
|
|
1500
|
-
const webServers = webServerValue === undefined
|
|
1501
|
-
? undefined
|
|
1502
|
-
: unwrapTypeScriptExpression(webServerValue);
|
|
1503
|
-
if (webServers === undefined ||
|
|
1504
|
-
!ts.isArrayLiteralExpression(webServers) ||
|
|
1505
|
-
webServers.elements.length !== 2) {
|
|
1506
|
-
throw new Error(`Package Addition requires two static Vue-Hono joint E2E web servers in ${configPath}`);
|
|
1507
|
-
}
|
|
1508
|
-
const expectedServers = [
|
|
1509
|
-
{
|
|
1510
|
-
command: `pnpm --filter ${options.e2e.apiPackageName} --fail-if-no-match run start`,
|
|
1511
|
-
portEnvironment: "PORT",
|
|
1512
|
-
portVariable: "apiPort",
|
|
1513
|
-
portInput: "PLAYWRIGHT_API_PORT",
|
|
1514
|
-
stdout: "/Hono API listening on (?<VITE_API_BASE_URL>http:\\/\\/localhost:\\d+)/",
|
|
1515
|
-
},
|
|
1516
|
-
{
|
|
1517
|
-
command: `pnpm --filter ${options.e2e.webPackageName} --fail-if-no-match run preview --host 127.0.0.1 --strictPort`,
|
|
1518
|
-
portEnvironment: "PLAYWRIGHT_WEB_PORT",
|
|
1519
|
-
portVariable: "webPort",
|
|
1520
|
-
portInput: "PLAYWRIGHT_WEB_PORT",
|
|
1521
|
-
stdout: "/Local:\\s+(?<PLAYWRIGHT_WEB_URL>http:\\/\\/127\\.0\\.0\\.1:\\d+)/",
|
|
1522
|
-
},
|
|
1523
|
-
];
|
|
1524
|
-
for (const [index, expected] of expectedServers.entries()) {
|
|
1525
|
-
const server = unwrapTypeScriptExpression(webServers.elements[index]);
|
|
1526
|
-
if (!ts.isObjectLiteralExpression(server)) {
|
|
1527
|
-
throw new Error(`Package Addition requires static Vue-Hono joint E2E web server ${index + 1} in ${configPath}`);
|
|
1528
|
-
}
|
|
1529
|
-
const command = finalObjectLiteralPropertyValue(server, "command");
|
|
1530
|
-
if (command === undefined ||
|
|
1531
|
-
!ts.isStringLiteralLike(command) ||
|
|
1532
|
-
command.text !== expected.command) {
|
|
1533
|
-
throw new Error(`Package Addition requires exact Vue-Hono joint E2E web server ${index + 1} command in ${configPath}`);
|
|
1534
|
-
}
|
|
1535
|
-
const environmentValue = finalObjectLiteralPropertyValue(server, "env");
|
|
1536
|
-
const environment = environmentValue === undefined
|
|
1537
|
-
? undefined
|
|
1538
|
-
: unwrapTypeScriptExpression(environmentValue);
|
|
1539
|
-
const environmentProperty = environment !== undefined && ts.isObjectLiteralExpression(environment)
|
|
1540
|
-
? environment.properties[0]
|
|
1541
|
-
: undefined;
|
|
1542
|
-
const portValue = environmentProperty !== undefined &&
|
|
1543
|
-
ts.isPropertyAssignment(environmentProperty) &&
|
|
1544
|
-
!ts.isComputedPropertyName(environmentProperty.name) &&
|
|
1545
|
-
(ts.isIdentifier(environmentProperty.name) ||
|
|
1546
|
-
ts.isStringLiteral(environmentProperty.name)) &&
|
|
1547
|
-
environmentProperty.name.text === expected.portEnvironment
|
|
1548
|
-
? unwrapTypeScriptExpression(environmentProperty.initializer)
|
|
1549
|
-
: undefined;
|
|
1550
|
-
if (environment === undefined ||
|
|
1551
|
-
!ts.isObjectLiteralExpression(environment) ||
|
|
1552
|
-
environment.properties.length !== 1 ||
|
|
1553
|
-
portValue === undefined ||
|
|
1554
|
-
!ts.isIdentifier(portValue) ||
|
|
1555
|
-
portValue.text !== expected.portVariable) {
|
|
1556
|
-
throw new Error(`Package Addition requires Vue-Hono joint E2E web server ${index + 1} ${expected.portEnvironment} environment in ${configPath}`);
|
|
1557
|
-
}
|
|
1558
|
-
const waitValue = finalObjectLiteralPropertyValue(server, "wait");
|
|
1559
|
-
const wait = waitValue === undefined
|
|
1560
|
-
? undefined
|
|
1561
|
-
: unwrapTypeScriptExpression(waitValue);
|
|
1562
|
-
const stdout = wait !== undefined && ts.isObjectLiteralExpression(wait)
|
|
1563
|
-
? finalObjectLiteralPropertyValue(wait, "stdout")
|
|
1564
|
-
: undefined;
|
|
1565
|
-
if (stdout === undefined ||
|
|
1566
|
-
!ts.isRegularExpressionLiteral(stdout) ||
|
|
1567
|
-
stdout.text !== expected.stdout) {
|
|
1568
|
-
throw new Error(`Package Addition requires static Vue-Hono joint E2E web server ${index + 1} stdout capture in ${configPath}`);
|
|
1569
|
-
}
|
|
1570
|
-
const reuseExistingServer = finalObjectLiteralPropertyValue(server, "reuseExistingServer");
|
|
1571
|
-
if (reuseExistingServer?.kind !== ts.SyntaxKind.FalseKeyword) {
|
|
1572
|
-
throw new Error(`Package Addition requires Vue-Hono joint E2E web server ${index + 1} native cleanup in ${configPath}`);
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
|
-
const expectedPortInputs = expectedServers.map(({ portVariable, portInput }) => ({ portVariable, portInput }));
|
|
1576
|
-
for (const expected of expectedPortInputs) {
|
|
1577
|
-
const declarations = sourceFile.statements
|
|
1578
|
-
.filter(ts.isVariableStatement)
|
|
1579
|
-
.flatMap((statement) => statement.declarationList.declarations.map((declaration) => ({
|
|
1580
|
-
declaration,
|
|
1581
|
-
declarationList: statement.declarationList,
|
|
1582
|
-
})))
|
|
1583
|
-
.filter(({ declaration }) => ts.isIdentifier(declaration.name) &&
|
|
1584
|
-
declaration.name.text === expected.portVariable);
|
|
1585
|
-
const declaration = declarations[0];
|
|
1586
|
-
if (declarations.length !== 1 ||
|
|
1587
|
-
declaration === undefined ||
|
|
1588
|
-
(declaration.declarationList.flags & ts.NodeFlags.Const) === 0) {
|
|
1589
|
-
throw new Error(`Package Addition requires one top-level const Vue-Hono joint E2E ${expected.portVariable} in ${configPath}`);
|
|
1590
|
-
}
|
|
1591
|
-
const initializer = declaration.declaration.initializer;
|
|
1592
|
-
const left = initializer !== undefined &&
|
|
1593
|
-
ts.isBinaryExpression(initializer) &&
|
|
1594
|
-
initializer.operatorToken.kind === ts.SyntaxKind.QuestionQuestionToken
|
|
1595
|
-
? initializer.left
|
|
1596
|
-
: undefined;
|
|
1597
|
-
const right = initializer !== undefined &&
|
|
1598
|
-
ts.isBinaryExpression(initializer) &&
|
|
1599
|
-
initializer.operatorToken.kind === ts.SyntaxKind.QuestionQuestionToken
|
|
1600
|
-
? initializer.right
|
|
1601
|
-
: undefined;
|
|
1602
|
-
const environmentInput = left !== undefined &&
|
|
1603
|
-
ts.isPropertyAccessExpression(left) &&
|
|
1604
|
-
ts.isPropertyAccessExpression(left.expression) &&
|
|
1605
|
-
ts.isIdentifier(left.expression.expression) &&
|
|
1606
|
-
left.expression.expression.text === "process" &&
|
|
1607
|
-
left.expression.name.text === "env"
|
|
1608
|
-
? left.name.text
|
|
1609
|
-
: undefined;
|
|
1610
|
-
if (environmentInput !== expected.portInput ||
|
|
1611
|
-
right === undefined ||
|
|
1612
|
-
!ts.isStringLiteralLike(right) ||
|
|
1613
|
-
right.text !== "0") {
|
|
1614
|
-
throw new Error(`Package Addition requires Vue-Hono joint E2E ${expected.portVariable} to read ${expected.portInput} or static port 0 in ${configPath}`);
|
|
1615
|
-
}
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
function assertCapabilityRepositoryTruth(options) {
|
|
1619
|
-
assertDatabasePreparationManifestTruth({
|
|
1620
|
-
preparation: options.databasePreparation,
|
|
1621
|
-
packageByName: options.packageByName,
|
|
1622
|
-
manifestTruthByPackagePath: options.manifestTruthByPackagePath,
|
|
1623
|
-
});
|
|
1624
|
-
assertDatabaseArtifactManifestTruth({
|
|
1625
|
-
preparation: options.databasePreparation,
|
|
1626
|
-
packageByName: options.packageByName,
|
|
1627
|
-
manifestTruthByPackagePath: options.manifestTruthByPackagePath,
|
|
1628
|
-
});
|
|
1629
|
-
assertDatabaseProjectLinkManifestTruth({
|
|
1630
|
-
blueprint: options.blueprint,
|
|
1631
|
-
contributions: options.contributions,
|
|
1632
|
-
preparation: options.databasePreparation,
|
|
1633
|
-
packageByName: options.packageByName,
|
|
1634
|
-
manifestTruthByPackagePath: options.manifestTruthByPackagePath,
|
|
1635
|
-
});
|
|
1636
|
-
assertDeploymentBuildManifestTruth({
|
|
1637
|
-
deploymentCheck: options.deploymentCheck,
|
|
1638
|
-
packageByName: options.packageByName,
|
|
1639
|
-
manifestTruthByPackagePath: options.manifestTruthByPackagePath,
|
|
1640
|
-
});
|
|
1641
|
-
assertVueHonoJointE2eManifestTruth({
|
|
1642
|
-
e2e: options.vueHonoJointE2e,
|
|
1643
|
-
packageByName: options.packageByName,
|
|
1644
|
-
manifestTruthByPackagePath: options.manifestTruthByPackagePath,
|
|
1645
|
-
});
|
|
1646
|
-
assertVueHonoJointE2ePlaywrightTruth({
|
|
1647
|
-
repositoryRoot: options.repositoryRoot,
|
|
1648
|
-
e2e: options.vueHonoJointE2e,
|
|
1649
|
-
});
|
|
1650
|
-
assertRootCapabilityManifestTruth(options);
|
|
1651
|
-
assertCapabilityTurboTruth(options);
|
|
1652
|
-
assertDatabaseViteRuntimeTruth(options);
|
|
1653
|
-
}
|
|
1654
|
-
function foundationCheckEnvironmentNeeds(contributions, deploymentCheck, vueHonoJointE2e) {
|
|
1655
|
-
return [
|
|
1656
|
-
...contributions.flatMap((contribution) => contribution.environmentNeeds),
|
|
1657
|
-
...(vueHonoJointE2e === undefined
|
|
1658
|
-
? []
|
|
1659
|
-
: [
|
|
1660
|
-
playwrightBrowserAssetsEnvironmentNeed({
|
|
1661
|
-
browser: "chromium",
|
|
1662
|
-
owner: { kind: "workspace-orchestration", path: "." },
|
|
1663
|
-
}),
|
|
1664
|
-
]),
|
|
1665
|
-
...(deploymentCheck === undefined
|
|
1666
|
-
? []
|
|
1667
|
-
: [
|
|
1668
|
-
shellCheckEnvironmentNeed({
|
|
1669
|
-
kind: "workspace-orchestration",
|
|
1670
|
-
path: ".",
|
|
1671
|
-
}),
|
|
1672
|
-
]),
|
|
1673
|
-
];
|
|
1674
|
-
}
|
|
1675
|
-
function deploymentCheckDevelopmentContainerToolLayers(deploymentCheck) {
|
|
1676
|
-
if (deploymentCheck === undefined)
|
|
1677
|
-
return [];
|
|
1678
|
-
return [
|
|
1679
|
-
{
|
|
1680
|
-
identity: "shellcheck",
|
|
1681
|
-
dockerfile: deploymentCheck.sources.shellCheckDockerfile,
|
|
1682
|
-
requires: ["node-pnpm"],
|
|
1683
|
-
probes: [
|
|
1684
|
-
{
|
|
1685
|
-
identity: "shellcheck",
|
|
1686
|
-
command: "shellcheck",
|
|
1687
|
-
args: ["--version"],
|
|
1688
|
-
},
|
|
1689
|
-
],
|
|
1690
|
-
},
|
|
1691
|
-
];
|
|
1692
|
-
}
|
|
1693
|
-
function normalizeRustToolchain(contributions) {
|
|
1694
|
-
const declarations = contributions.flatMap((contribution) => {
|
|
1695
|
-
const rust = contribution.foundation.toolchains.rust;
|
|
1696
|
-
return rust === undefined
|
|
1697
|
-
? []
|
|
1698
|
-
: [
|
|
1699
|
-
{
|
|
1700
|
-
...rust,
|
|
1701
|
-
components: [...new Set(rust.components)].toSorted(),
|
|
1702
|
-
},
|
|
1703
|
-
];
|
|
1704
|
-
});
|
|
1705
|
-
const fingerprints = declarations.map((rust) => JSON.stringify({
|
|
1706
|
-
toolchain: rust.toolchain,
|
|
1707
|
-
components: rust.components,
|
|
1708
|
-
configurationSource: resolveTemplateSource(rust.configurationSource.source, rust.configurationSource.from),
|
|
1709
|
-
}));
|
|
1710
|
-
if (new Set(fingerprints).size > 1) {
|
|
1711
|
-
throw new Error("Foundation requires compatible Rust toolchain facts");
|
|
1712
|
-
}
|
|
1713
|
-
return declarations.at(0);
|
|
1714
|
-
}
|
|
1715
|
-
function composeDependencyMaintenancePolicy(contributions, deploymentCheck) {
|
|
1716
|
-
const ecosystems = [
|
|
1717
|
-
...new Set([
|
|
1718
|
-
"devcontainers",
|
|
1719
|
-
...contributions.flatMap((contribution) => contribution.foundation.dependencyMaintenance.ecosystems),
|
|
1720
|
-
...(deploymentCheck === undefined ? [] : ["docker"]),
|
|
1721
|
-
]),
|
|
1722
|
-
];
|
|
1723
|
-
const directories = {};
|
|
1724
|
-
const extraDirectories = {};
|
|
1725
|
-
for (const ecosystem of ecosystems) {
|
|
1726
|
-
const candidates = [
|
|
1727
|
-
...new Set([
|
|
1728
|
-
...contributions.flatMap((contribution) => {
|
|
1729
|
-
const policy = contribution.foundation.dependencyMaintenance;
|
|
1730
|
-
const primary = policy.directories?.[ecosystem];
|
|
1731
|
-
return [
|
|
1732
|
-
...(primary === undefined ? [] : [primary]),
|
|
1733
|
-
...(policy.extraDirectories?.[ecosystem] ?? []),
|
|
1734
|
-
];
|
|
1735
|
-
}),
|
|
1736
|
-
...(ecosystem === "docker" && deploymentCheck !== undefined
|
|
1737
|
-
? ["/"]
|
|
1738
|
-
: []),
|
|
1739
|
-
]),
|
|
1740
|
-
];
|
|
1741
|
-
const [primary, ...extra] = candidates;
|
|
1742
|
-
if (primary !== undefined)
|
|
1743
|
-
directories[ecosystem] = primary;
|
|
1744
|
-
if (extra.length > 0)
|
|
1745
|
-
extraDirectories[ecosystem] = extra;
|
|
1746
|
-
}
|
|
1747
|
-
return {
|
|
1748
|
-
ecosystems,
|
|
1749
|
-
...(Object.keys(directories).length === 0 ? {} : { directories }),
|
|
1750
|
-
...(Object.keys(extraDirectories).length === 0 ? {} : { extraDirectories }),
|
|
1751
|
-
interval: "weekly",
|
|
1752
|
-
};
|
|
1753
|
-
}
|
|
1754
|
-
function localTypescriptConfigurationSpecifier(options) {
|
|
1755
|
-
const relativePackagePath = path.posix.relative(options.consumerPackagePath, options.configurationPackagePath);
|
|
1756
|
-
if (relativePackagePath.length === 0) {
|
|
1757
|
-
throw new Error("TypeScript Configuration Package must have a distinct Package Path");
|
|
1758
|
-
}
|
|
1759
|
-
return `link:${relativePackagePath}`;
|
|
1760
|
-
}
|
|
1761
|
-
function publicCliCandidate(contributions) {
|
|
1762
|
-
const candidates = contributions.filter((contribution) => contribution.foundation.npmPublication?.kind === "public-cli-candidate");
|
|
1763
|
-
if (candidates.length > 1) {
|
|
1764
|
-
throw new Error(`Generated Repository Plan supports at most one public CLI candidate; found ${candidates.map((candidate) => `${candidate.definition.name} at ${candidate.definition.path}`).join(", ")}`);
|
|
1765
|
-
}
|
|
1766
|
-
const candidate = candidates[0];
|
|
1767
|
-
if (candidate !== undefined && candidate.definition.role !== "cli-tool") {
|
|
1768
|
-
throw new Error(`Public CLI candidate ${candidate.definition.name} must use the cli-tool Package role`);
|
|
1769
|
-
}
|
|
1770
|
-
return candidate;
|
|
1771
|
-
}
|
|
1772
|
-
/**
|
|
1773
|
-
* 票 26 清单单源:把 plan 声明的镜像槽位集合投影成生成检查器携带的清单文本。
|
|
1774
|
-
* 转义 `$` 是必要的:清单文本注入模板字面量,未转义的 `$` 会被当成 TypeScript 插值。
|
|
1775
|
-
*/
|
|
1776
|
-
function renderToolchainMirrorSlotManifest(reconciliation) {
|
|
1777
|
-
const slots = reconciliation.flatMap((policy) => policy.driver === "canonical"
|
|
1778
|
-
? []
|
|
1779
|
-
: (policy.mirrorSlots ?? []).map((slot) => ({
|
|
1780
|
-
id: slot.id,
|
|
1781
|
-
path: policy.path,
|
|
1782
|
-
location: slot.location,
|
|
1783
|
-
})));
|
|
1784
|
-
return JSON.stringify(slots, null, 2).replaceAll("$", String.raw `\$`);
|
|
1785
|
-
}
|
|
1786
|
-
function foundationPlan(options) {
|
|
1787
|
-
assertProjectBlueprint(options.blueprint);
|
|
1788
|
-
const configContribution = options.foundationContribution;
|
|
1789
|
-
const configDefinition = configContribution.definition;
|
|
1790
|
-
if (!options.blueprint.packages.some((definition) => packageDefinitionsEqual(definition, configDefinition))) {
|
|
1791
|
-
throw new Error("Project Blueprint must contain the Foundation TypeScript configuration Package Definition");
|
|
1792
|
-
}
|
|
1793
|
-
const initialProjectLinkPlan = planExplicitProjectLinks({
|
|
1794
|
-
blueprint: options.blueprint,
|
|
1795
|
-
contributions: options.contributions,
|
|
1796
|
-
...(options.manifestTruthByPackagePath === undefined
|
|
1797
|
-
? {}
|
|
1798
|
-
: {
|
|
1799
|
-
manifestTruthByPackagePath: options.manifestTruthByPackagePath,
|
|
1800
|
-
}),
|
|
1801
|
-
});
|
|
1802
|
-
const injectedProviderNames = new Set([...initialProjectLinkPlan.manifestPatchesByPackagePath.values()].flatMap((patch) => Object.entries(patch.dependenciesMeta ?? {})
|
|
1803
|
-
.filter(([, metadata]) => metadata.injected)
|
|
1804
|
-
.map(([name]) => name)));
|
|
1805
|
-
const configPackageName = options.context.foundationPackages.typescriptConfiguration.name;
|
|
1806
|
-
if (configDefinition.name !== configPackageName) {
|
|
1807
|
-
throw new Error(`Generation Context TypeScript Configuration Package ${configPackageName} conflicts with Blueprint Package Definition ${configDefinition.name}`);
|
|
1808
|
-
}
|
|
1809
|
-
const publicationCandidate = publicCliCandidate(options.contributions);
|
|
1810
|
-
const packageContributions = options.contributions.map((contribution) => {
|
|
1811
|
-
if (contribution.foundation.typescriptConfigurationPackage === undefined) {
|
|
1812
|
-
return contribution;
|
|
1813
|
-
}
|
|
1814
|
-
const dependencyField = injectedProviderNames.has(contribution.definition.name)
|
|
1815
|
-
? "dependencies"
|
|
1816
|
-
: "devDependencies";
|
|
1817
|
-
const dependencySpecifier = dependencyField === "devDependencies" &&
|
|
1818
|
-
(contribution.manifest.private !== true ||
|
|
1819
|
-
publicationCandidate?.definition.path === contribution.definition.path)
|
|
1820
|
-
? localTypescriptConfigurationSpecifier({
|
|
1821
|
-
consumerPackagePath: contribution.definition.path,
|
|
1822
|
-
configurationPackagePath: configDefinition.path,
|
|
1823
|
-
})
|
|
1824
|
-
: "workspace:*";
|
|
1825
|
-
const existingDependencies = contribution.manifest[dependencyField];
|
|
1826
|
-
return {
|
|
1827
|
-
...contribution,
|
|
1828
|
-
manifest: {
|
|
1829
|
-
...contribution.manifest,
|
|
1830
|
-
[dependencyField]: {
|
|
1831
|
-
...(isRecord(existingDependencies) ? existingDependencies : {}),
|
|
1832
|
-
[configPackageName]: dependencySpecifier,
|
|
1833
|
-
},
|
|
1834
|
-
},
|
|
1835
|
-
};
|
|
1836
|
-
});
|
|
1837
|
-
const requiresPackingHook = packageContributions.some((contribution) => {
|
|
1838
|
-
const developmentDependencies = contribution.manifest.devDependencies;
|
|
1839
|
-
return (isRecord(developmentDependencies) &&
|
|
1840
|
-
typeof developmentDependencies[configPackageName] === "string" &&
|
|
1841
|
-
developmentDependencies[configPackageName].startsWith("link:"));
|
|
1842
|
-
});
|
|
1843
|
-
const contributions = [configContribution, ...packageContributions];
|
|
1844
|
-
assertPackageContributionCommandNames(contributions.map((contribution) => {
|
|
1845
|
-
const manifest = options.manifestTruthByPackagePath?.get(contribution.definition.path);
|
|
1846
|
-
return manifest === undefined
|
|
1847
|
-
? contribution
|
|
1848
|
-
: { ...contribution, manifest };
|
|
1849
|
-
}));
|
|
1850
|
-
const candidateRecord = options.generationRecord ?? {
|
|
1851
|
-
schemaVersion: 2,
|
|
1852
|
-
repositoryName: options.context.repositoryName,
|
|
1853
|
-
defaultPackageScope: options.context.defaultPackageScope,
|
|
1854
|
-
preset: options.definition.metadata.name,
|
|
1855
|
-
templateVersion: "0.0.0",
|
|
1856
|
-
// 显式只投影 v2 的两个历史字段,上下文里的精确 Node 事实不得进入持久记录。
|
|
1857
|
-
toolchain: {
|
|
1858
|
-
nodeLtsMajor: options.context.toolchain.nodeLtsMajor,
|
|
1859
|
-
packageManagerPin: options.context.toolchain.packageManagerPin,
|
|
1860
|
-
},
|
|
1861
|
-
packages: [
|
|
1862
|
-
...options.contributions.map((contribution) => {
|
|
1863
|
-
const planningContribution = options.mode === "initialization"
|
|
1864
|
-
? "planInitialization"
|
|
1865
|
-
: "planPackageAddition";
|
|
1866
|
-
return {
|
|
1867
|
-
packageDefinitionId: requirePersistedPackageDefinition(options.blueprint, contribution.definition).packageDefinitionId,
|
|
1868
|
-
path: contribution.definition.path,
|
|
1869
|
-
definitionName: options.definition.metadata.name,
|
|
1870
|
-
planningContribution,
|
|
1871
|
-
contributionIdentity: requireReplayAdapter({
|
|
1872
|
-
owner: options.definition.metadata.name,
|
|
1873
|
-
adapters: options.definition.packageContributionReplayAdapters,
|
|
1874
|
-
identity: contribution.planningIdentity,
|
|
1875
|
-
}).identity,
|
|
1876
|
-
};
|
|
1877
|
-
}),
|
|
1878
|
-
{
|
|
1879
|
-
packageDefinitionId: requirePersistedPackageDefinition(options.blueprint, configDefinition).packageDefinitionId,
|
|
1880
|
-
path: configDefinition.path,
|
|
1881
|
-
definitionName: "foundation",
|
|
1882
|
-
planningContribution: "foundationPlan",
|
|
1883
|
-
contributionIdentity: typescriptConfigReplayAdapter.identity,
|
|
1884
|
-
},
|
|
1885
|
-
],
|
|
1886
|
-
};
|
|
1887
|
-
const generationRecord = parseGenerationRecord(candidateRecord);
|
|
1888
|
-
const deploymentCheck = normalizeDeploymentCheck(contributions);
|
|
1889
|
-
const vueHonoJointE2e = normalizeVueHonoJointE2e(contributions);
|
|
1890
|
-
const databasePreparation = normalizeDatabasePreparation(contributions);
|
|
1891
|
-
const rustToolchain = normalizeRustToolchain(contributions);
|
|
1892
|
-
const packageByName = new Map(contributions.map((contribution) => [
|
|
1893
|
-
contribution.definition.name,
|
|
1894
|
-
contribution,
|
|
1895
|
-
]));
|
|
1896
|
-
const deploymentPackages = deploymentCheck === undefined
|
|
1897
|
-
? undefined
|
|
1898
|
-
: {
|
|
1899
|
-
application: requireContributionByName(packageByName, deploymentCheck.applicationPackageName, "Deployment Check"),
|
|
1900
|
-
database: requireContributionByName(packageByName, deploymentCheck.databasePackageName, "Deployment Check"),
|
|
1901
|
-
migration: requireContributionByName(packageByName, deploymentCheck.migrationPackageName, "Deployment Check"),
|
|
1902
|
-
};
|
|
1903
|
-
if (databasePreparation !== undefined) {
|
|
1904
|
-
const migration = packageByName.get(databasePreparation.migrationPackageName);
|
|
1905
|
-
if (migration === undefined) {
|
|
1906
|
-
throw new Error("Database Preparation references an unknown migration Package");
|
|
1907
|
-
}
|
|
1908
|
-
for (const packageName of Object.values(databasePreparation.consumers)) {
|
|
1909
|
-
if (!packageByName.has(packageName)) {
|
|
1910
|
-
throw new Error("Database Preparation references an unknown consumer Package");
|
|
1911
|
-
}
|
|
1912
|
-
}
|
|
1913
|
-
if (databasePreparation.consumers["database-test"] !==
|
|
1914
|
-
databasePreparation.databasePackageName) {
|
|
1915
|
-
throw new Error("Database Preparation database-test consumer must be its owner");
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
assertDatabasePreparationManifestTruth({
|
|
1919
|
-
preparation: databasePreparation,
|
|
1920
|
-
packageByName,
|
|
1921
|
-
manifestTruthByPackagePath: options.manifestTruthByPackagePath,
|
|
1922
|
-
});
|
|
1923
|
-
if (deploymentCheck !== undefined) {
|
|
1924
|
-
const deploymentPackageNames = [
|
|
1925
|
-
deploymentCheck.applicationPackageName,
|
|
1926
|
-
deploymentCheck.databasePackageName,
|
|
1927
|
-
deploymentCheck.migrationPackageName,
|
|
1928
|
-
];
|
|
1929
|
-
if (new Set(deploymentPackageNames).size !== 3) {
|
|
1930
|
-
throw new Error("Deployment Check requires three distinct Packages");
|
|
1931
|
-
}
|
|
1932
|
-
if (deploymentPackages?.application.definition.path !==
|
|
1933
|
-
deploymentCheck.declaringPackagePath) {
|
|
1934
|
-
throw new Error("Deployment Check must be declared by its application Package");
|
|
1935
|
-
}
|
|
1936
|
-
if (databasePreparation !== undefined &&
|
|
1937
|
-
(databasePreparation.databasePackageName !==
|
|
1938
|
-
deploymentCheck.databasePackageName ||
|
|
1939
|
-
databasePreparation.migrationPackageName !==
|
|
1940
|
-
deploymentCheck.migrationPackageName)) {
|
|
1941
|
-
throw new Error("Deployment Check must use the Database Preparation Packages");
|
|
1942
|
-
}
|
|
1943
|
-
for (const packageName of deploymentPackageNames) {
|
|
1944
|
-
const contribution = requireContributionByName(packageByName, packageName, "Deployment Check");
|
|
1945
|
-
const manifest = options.manifestTruthByPackagePath?.get(contribution.definition.path) ??
|
|
1946
|
-
contribution.manifest;
|
|
1947
|
-
const expectedBuild = isRecord(contribution.manifest.scripts)
|
|
1948
|
-
? contribution.manifest.scripts.build
|
|
1949
|
-
: undefined;
|
|
1950
|
-
const actualBuild = isRecord(manifest.scripts)
|
|
1951
|
-
? manifest.scripts.build
|
|
1952
|
-
: undefined;
|
|
1953
|
-
if (typeof expectedBuild !== "string" || actualBuild !== expectedBuild) {
|
|
1954
|
-
throw new Error(`Deployment Check requires exact ${packageName} manifest script build`);
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
}
|
|
1958
|
-
const persistedEnvironmentNeeds = normalizeEnvironmentNeeds({
|
|
1959
|
-
check: foundationCheckEnvironmentNeeds(contributions, deploymentCheck, vueHonoJointE2e),
|
|
1960
|
-
deployment: deploymentCheck?.environmentNeeds ?? [],
|
|
1961
|
-
});
|
|
1962
|
-
const environmentNeeds = persistedEnvironmentNeeds.check;
|
|
1963
|
-
const deploymentEnvironmentNeeds = persistedEnvironmentNeeds.deployment;
|
|
1964
|
-
const contributionPackagePaths = contributions.map((contribution) => contribution.definition.path);
|
|
1965
|
-
if (new Set(contributionPackagePaths).size !== contributionPackagePaths.length)
|
|
1966
|
-
throw new Error("Package Contributions must have unique Package Paths");
|
|
1967
|
-
const blueprintPackagePaths = options.blueprint.packages.map((definition) => definition.path);
|
|
1968
|
-
if (contributionPackagePaths.length !== blueprintPackagePaths.length ||
|
|
1969
|
-
contributionPackagePaths.some((packagePath) => !blueprintPackagePaths.includes(packagePath))) {
|
|
1970
|
-
throw new Error("Package Contributions must exactly match Project Blueprint Package Paths");
|
|
1971
|
-
}
|
|
1972
|
-
const packageNames = contributions.map((contribution) => contribution.definition.name);
|
|
1973
|
-
if (new Set(packageNames).size !== packageNames.length)
|
|
1974
|
-
throw new Error("Package Contributions must have unique package names");
|
|
1975
|
-
const ciDiagnosticArtifactDeclarations = contributions.flatMap((contribution) => contribution.ciDiagnosticArtifacts ?? []);
|
|
1976
|
-
const ciDiagnosticArtifacts = composeCiDiagnosticArtifacts({
|
|
1977
|
-
packagePaths: blueprintPackagePaths,
|
|
1978
|
-
declarations: [
|
|
1979
|
-
...ciDiagnosticArtifactDeclarations,
|
|
1980
|
-
...(vueHonoJointE2e === undefined
|
|
1981
|
-
? []
|
|
1982
|
-
: [
|
|
1983
|
-
{
|
|
1984
|
-
kind: "playwright",
|
|
1985
|
-
owner: { kind: "workspace-orchestration", path: "." },
|
|
1986
|
-
},
|
|
1987
|
-
]),
|
|
1988
|
-
],
|
|
1989
|
-
});
|
|
1990
|
-
const contributedToolLayers = contributions.flatMap((contribution) => contribution.foundation.developmentContainerToolLayers ?? []);
|
|
1991
|
-
const developmentContainer = contributedDevcontainerComposition({
|
|
1992
|
-
context: options.context,
|
|
1993
|
-
rootNodeDeclaration: options.rootNodeDeclaration,
|
|
1994
|
-
layers: [
|
|
1995
|
-
...contributedToolLayers,
|
|
1996
|
-
...deploymentCheckDevelopmentContainerToolLayers(deploymentCheck),
|
|
1997
|
-
],
|
|
1998
|
-
});
|
|
1999
|
-
const workspacePackageGlobs = [
|
|
2000
|
-
"apps/*",
|
|
2001
|
-
"packages/*",
|
|
2002
|
-
...new Set([
|
|
2003
|
-
...options.blueprint.packages
|
|
2004
|
-
.map((definition) => `${definition.path.split("/")[0]}/*`)
|
|
2005
|
-
.filter((glob) => glob !== "apps/*" && glob !== "packages/*"),
|
|
2006
|
-
...contributions
|
|
2007
|
-
.flatMap((contribution) => contribution.foundation.workspacePackageGlobs ?? [])
|
|
2008
|
-
.filter((glob) => glob !== "apps/*" && glob !== "packages/*"),
|
|
2009
|
-
]),
|
|
2010
|
-
];
|
|
2011
|
-
const editorCustomization = editorCustomizationForCapabilities(contributions.flatMap((contribution) => contribution.foundation.editorCapabilities), loadEditorCustomizationDeclarations(resolveTemplateSource(templateSources.editorCustomization, "capabilities.json")));
|
|
2012
|
-
const dependencyMaintenancePolicy = composeDependencyMaintenancePolicy(contributions, deploymentCheck);
|
|
2013
|
-
const rootOwnedE2e = vueHonoJointE2e !== undefined;
|
|
2014
|
-
const rootAutomationPaths = rootOwnedE2e ? "scripts test" : "scripts";
|
|
2015
|
-
const rootManifest = {
|
|
2016
|
-
name: options.context.repositoryName,
|
|
2017
|
-
private: true,
|
|
2018
|
-
type: "module",
|
|
2019
|
-
...(publicationCandidate === undefined
|
|
2020
|
-
? {}
|
|
2021
|
-
: {
|
|
2022
|
-
imports: {
|
|
2023
|
-
"#npm-publication/*": "./scripts/npm-publication/*.ts",
|
|
2024
|
-
},
|
|
2025
|
-
}),
|
|
2026
|
-
scripts: {
|
|
2027
|
-
check: "node --conditions=source scripts/task-gates.ts check",
|
|
2028
|
-
"check:heavy": "node --conditions=source scripts/task-gates.ts check:heavy",
|
|
2029
|
-
"check:full": "node --conditions=source scripts/task-gates.ts check:full",
|
|
2030
|
-
// Cargo 会在首次代理调用时按根 rust-toolchain.toml 安装版本与组件;先经唯一根任务完成解析,再并行运行各 Rust 包的 Cargo 检查。
|
|
2031
|
-
...(rustToolchain === undefined
|
|
2032
|
-
? {}
|
|
2033
|
-
: { "toolchain:prepare": "cargo --version" }),
|
|
2034
|
-
boundaries: "node --conditions=source scripts/run-turbo-boundaries.ts && node --conditions=source scripts/check-toolchain-versions.ts",
|
|
2035
|
-
...(databasePreparation === undefined
|
|
2036
|
-
? {}
|
|
2037
|
-
: databasePreparationCommands(databasePreparation)),
|
|
2038
|
-
...(publicationCandidate === undefined
|
|
2039
|
-
? {}
|
|
2040
|
-
: {
|
|
2041
|
-
"publication:readiness": "node --conditions=source scripts/npm-publication/check-readiness.ts",
|
|
2042
|
-
"publication:artifact": "node --conditions=source scripts/npm-publication/check-artifact.ts",
|
|
2043
|
-
}),
|
|
2044
|
-
...(deploymentCheck === undefined
|
|
2045
|
-
? {}
|
|
2046
|
-
: {
|
|
2047
|
-
deployment: "node --conditions=source scripts/check-standalone-deployment.ts",
|
|
2048
|
-
}),
|
|
2049
|
-
...(rootOwnedE2e ? { "test:e2e": "playwright test" } : {}),
|
|
2050
|
-
fix: "node --conditions=source scripts/task-gates.ts fix",
|
|
2051
|
-
"format:check": `oxfmt --list-different --no-error-on-unmatched-pattern package.json pnpm-workspace.yaml pnpm-lock.yaml turbo.json tsconfig.json tsconfig.config.json *.config.ts .pnpmfile.mjs .gitignore .dockerignore Dockerfile TODO.md rust-toolchain.toml .vscode .github .devcontainer ${rootAutomationPaths}`,
|
|
2052
|
-
"format:write": `oxfmt --write --no-error-on-unmatched-pattern package.json pnpm-workspace.yaml pnpm-lock.yaml turbo.json tsconfig.json tsconfig.config.json *.config.ts .pnpmfile.mjs .gitignore .dockerignore Dockerfile TODO.md rust-toolchain.toml .vscode .github .devcontainer ${rootAutomationPaths}`,
|
|
2053
|
-
lint: deploymentCheck === undefined
|
|
2054
|
-
? `oxlint --quiet --format=unix --no-error-on-unmatched-pattern *.config.ts .pnpmfile.mjs ${rootAutomationPaths}`
|
|
2055
|
-
: `shellcheck scripts/container-entrypoint.sh && oxlint --quiet --format=unix --no-error-on-unmatched-pattern *.config.ts .pnpmfile.mjs ${rootAutomationPaths}`,
|
|
2056
|
-
"lint:fix": `oxlint --format=unix --no-error-on-unmatched-pattern *.config.ts .pnpmfile.mjs ${rootAutomationPaths} --fix`,
|
|
2057
|
-
typecheck: "tsc -p tsconfig.json --noEmit --pretty false",
|
|
2058
|
-
},
|
|
2059
|
-
devDependencies: {
|
|
2060
|
-
"@types/node": "catalog:",
|
|
2061
|
-
...(rootOwnedE2e ? { "@playwright/test": "catalog:" } : {}),
|
|
2062
|
-
...(publicationCandidate === undefined
|
|
2063
|
-
? {}
|
|
2064
|
-
: {
|
|
2065
|
-
"@types/semver": "catalog:",
|
|
2066
|
-
"@types/spdx-expression-parse": "catalog:",
|
|
2067
|
-
}),
|
|
2068
|
-
oxfmt: "catalog:",
|
|
2069
|
-
oxlint: "catalog:",
|
|
2070
|
-
"oxlint-tsgolint": "catalog:",
|
|
2071
|
-
"smol-toml": "catalog:",
|
|
2072
|
-
...(publicationCandidate === undefined
|
|
2073
|
-
? {}
|
|
2074
|
-
: {
|
|
2075
|
-
semver: "catalog:",
|
|
2076
|
-
"spdx-expression-parse": "catalog:",
|
|
2077
|
-
npm: "catalog:",
|
|
2078
|
-
tar: "catalog:",
|
|
2079
|
-
}),
|
|
2080
|
-
turbo: "catalog:",
|
|
2081
|
-
"typescript-7": "catalog:",
|
|
2082
|
-
},
|
|
2083
|
-
engines: { node: options.rootNodeDeclaration },
|
|
2084
|
-
packageManager: options.context.toolchain.packageManagerPin,
|
|
2085
|
-
};
|
|
2086
|
-
const dependencyCatalog = selectTemplateDependencyCatalogEntries(collectGeneratedManifestCatalogReferences([
|
|
2087
|
-
...contributions.map((contribution) => contribution.manifest),
|
|
2088
|
-
rootManifest,
|
|
2089
|
-
]));
|
|
2090
|
-
const dependencyOverrides = {
|
|
2091
|
-
...(Object.hasOwn(dependencyCatalog, "vue") ||
|
|
2092
|
-
Object.hasOwn(dependencyCatalog, "pinia")
|
|
2093
|
-
? vuePnpmDependencyOverrides
|
|
2094
|
-
: {}),
|
|
2095
|
-
};
|
|
2096
|
-
const workspaceOperation = {
|
|
2097
|
-
kind: "writeTextTemplate",
|
|
2098
|
-
source: templateSources.foundation,
|
|
2099
|
-
from: "pnpm-workspace.dynamic.txt",
|
|
2100
|
-
to: "pnpm-workspace.yaml",
|
|
2101
|
-
replacements: {
|
|
2102
|
-
WORKSPACE_PACKAGE_GLOBS: workspacePackageGlobs
|
|
2103
|
-
.map((glob) => ` - ${glob}`)
|
|
2104
|
-
.join("\n"),
|
|
2105
|
-
DEPENDENCY_CATALOG: Object.entries(dependencyCatalog)
|
|
2106
|
-
.toSorted(([left], [right]) => left.localeCompare(right))
|
|
2107
|
-
.map(([name, version]) => ` ${JSON.stringify(name)}: ${String(version)}`)
|
|
2108
|
-
.join("\n"),
|
|
2109
|
-
DEPENDENCY_OVERRIDES_SECTION: Object.keys(dependencyOverrides).length === 0
|
|
2110
|
-
? ""
|
|
2111
|
-
: [
|
|
2112
|
-
"",
|
|
2113
|
-
"overrides:",
|
|
2114
|
-
...Object.entries(dependencyOverrides)
|
|
2115
|
-
.toSorted(([left], [right]) => left.localeCompare(right))
|
|
2116
|
-
.map(([dependency, version]) => ` ${JSON.stringify(dependency)}: ${JSON.stringify(version)}`),
|
|
2117
|
-
"",
|
|
2118
|
-
].join("\n"),
|
|
2119
|
-
},
|
|
2120
|
-
};
|
|
2121
|
-
const workflowTemplateSource = projectCheckWorkflowTemplateSource({
|
|
2122
|
-
packagePaths: blueprintPackagePaths,
|
|
2123
|
-
deploymentCheck,
|
|
2124
|
-
diagnosticArtifacts: ciDiagnosticArtifacts,
|
|
2125
|
-
});
|
|
2126
|
-
const workflowOperation = ciDiagnosticArtifacts.length === 0
|
|
2127
|
-
? {
|
|
2128
|
-
kind: "copyFile",
|
|
2129
|
-
source: templateSources.foundation,
|
|
2130
|
-
from: workflowTemplateSource,
|
|
2131
|
-
to: ".github/workflows/check.yml",
|
|
2132
|
-
}
|
|
2133
|
-
: {
|
|
2134
|
-
kind: "writeTextTemplate",
|
|
2135
|
-
source: templateSources.foundation,
|
|
2136
|
-
from: workflowTemplateSource,
|
|
2137
|
-
to: ".github/workflows/check.yml",
|
|
2138
|
-
replacements: projectCheckWorkflowTemplateReplacements({
|
|
2139
|
-
packagePaths: blueprintPackagePaths,
|
|
2140
|
-
diagnosticArtifacts: ciDiagnosticArtifacts,
|
|
2141
|
-
}),
|
|
2142
|
-
};
|
|
2143
|
-
const workflowOperations = [
|
|
2144
|
-
workflowOperation,
|
|
2145
|
-
...(publicationCandidate === undefined
|
|
2146
|
-
? []
|
|
2147
|
-
: [
|
|
2148
|
-
{
|
|
2149
|
-
kind: "copyFile",
|
|
2150
|
-
source: templateSources.tsCli,
|
|
2151
|
-
from: "publication/release.yml",
|
|
2152
|
-
to: ".github/workflows/release.yml",
|
|
2153
|
-
},
|
|
2154
|
-
]),
|
|
2155
|
-
{
|
|
2156
|
-
kind: "writeTextTemplate",
|
|
2157
|
-
source: templateSources.foundation,
|
|
2158
|
-
from: ".github/dependabot.dynamic.template",
|
|
2159
|
-
to: ".github/dependabot.yml",
|
|
2160
|
-
replacements: projectDependabotTemplateReplacements(dependencyMaintenancePolicy),
|
|
2161
|
-
},
|
|
2162
|
-
];
|
|
2163
|
-
const projectLinkPlan = initialProjectLinkPlan;
|
|
2164
|
-
const turboBoundaryTags = turboBoundaryTagsForContributions(contributions);
|
|
2165
|
-
const reconciliation = [
|
|
2166
|
-
{ path: "tsconfig.json", driver: "structured" },
|
|
2167
|
-
{ path: "turbo.json", driver: "structured" },
|
|
2168
|
-
{
|
|
2169
|
-
path: ".devcontainer/devcontainer.json",
|
|
2170
|
-
driver: "structured",
|
|
2171
|
-
identitySets: [developmentContainer.mountIdentitySet],
|
|
2172
|
-
// M1:根 engines.node 原文拥有的静态镜像槽位;Core 只见位置,不见文件语义。
|
|
2173
|
-
// 设计写作 /build.args/NODE_VERSION;RFC 6901 下点号不是分隔符,取同位置的标准形。
|
|
2174
|
-
mirrorSlots: [
|
|
2175
|
-
{
|
|
2176
|
-
id: "node-version-build-arg",
|
|
2177
|
-
location: {
|
|
2178
|
-
kind: "json-pointer",
|
|
2179
|
-
pointer: "/build/args/NODE_VERSION",
|
|
2180
|
-
},
|
|
2181
|
-
},
|
|
2182
|
-
// M5:仅当本 plan 选用 Rust 时接入同一机制,值由根 rust-toolchain.toml channel 拥有。
|
|
2183
|
-
// 声明只给位置、不含版本值,故已含 Rust 的目标在加包时 Before/After 清单逐字节相同,
|
|
2184
|
-
// reconciliationPoliciesCompatible 不因 M5 扩展把合法加包变成策略不兼容。
|
|
2185
|
-
...(rustToolchain === undefined
|
|
2186
|
-
? []
|
|
2187
|
-
: [
|
|
2188
|
-
{
|
|
2189
|
-
id: "rust-toolchain-build-arg",
|
|
2190
|
-
location: {
|
|
2191
|
-
kind: "json-pointer",
|
|
2192
|
-
pointer: "/build/args/RUST_TOOLCHAIN",
|
|
2193
|
-
},
|
|
2194
|
-
},
|
|
2195
|
-
]),
|
|
2196
|
-
],
|
|
2197
|
-
},
|
|
2198
|
-
...(deploymentCheck === undefined || deploymentPackages === undefined
|
|
2199
|
-
? []
|
|
2200
|
-
: [
|
|
2201
|
-
{
|
|
2202
|
-
path: "Dockerfile",
|
|
2203
|
-
driver: "text",
|
|
2204
|
-
// M2:同一 rootNodeDeclaration 投影的锚定 ARG 默认值。
|
|
2205
|
-
mirrorSlots: [
|
|
2206
|
-
{
|
|
2207
|
-
id: "node-version-deployment-arg",
|
|
2208
|
-
location: { kind: "text-anchor", name: "NODE_VERSION" },
|
|
2209
|
-
},
|
|
2210
|
-
],
|
|
2211
|
-
},
|
|
2212
|
-
]),
|
|
2213
|
-
{
|
|
2214
|
-
path: ".vscode/extensions.json",
|
|
2215
|
-
driver: "structured",
|
|
2216
|
-
identitySets: [
|
|
2217
|
-
{
|
|
2218
|
-
location: "/recommendations",
|
|
2219
|
-
identity: { kind: "self" },
|
|
2220
|
-
},
|
|
2221
|
-
],
|
|
2222
|
-
},
|
|
2223
|
-
{ path: ".template/blueprint.json", driver: "canonical" },
|
|
2224
|
-
{ path: environmentNeedsPath, driver: "canonical" },
|
|
2225
|
-
{ path: ".template/generation.json", driver: "canonical" },
|
|
2226
|
-
];
|
|
2227
|
-
// 票 26 清单单源:生成检查器携带的槽位清单是上面声明的投影,不是第二份真源。
|
|
2228
|
-
const toolchainMirrorSlotManifest = renderToolchainMirrorSlotManifest(reconciliation);
|
|
2229
|
-
const initializationFoundationOperations = [
|
|
2230
|
-
{
|
|
2231
|
-
kind: "writeJson",
|
|
2232
|
-
to: "package.json",
|
|
2233
|
-
value: rootManifest,
|
|
2234
|
-
keyOrder: packageManifestKeyOrder,
|
|
2235
|
-
nestedKeyOrder: packageConditionKeyOrder,
|
|
2236
|
-
},
|
|
2237
|
-
workspaceOperation,
|
|
2238
|
-
...(requiresPackingHook
|
|
2239
|
-
? [
|
|
2240
|
-
{
|
|
2241
|
-
kind: "copyFile",
|
|
2242
|
-
source: templateSources.foundation,
|
|
2243
|
-
from: ".pnpmfile.mjs",
|
|
2244
|
-
to: ".pnpmfile.mjs",
|
|
2245
|
-
},
|
|
2246
|
-
]
|
|
2247
|
-
: []),
|
|
2248
|
-
{
|
|
2249
|
-
kind: "copyFile",
|
|
2250
|
-
source: templateSources.foundation,
|
|
2251
|
-
from: "gitignore",
|
|
2252
|
-
to: ".gitignore",
|
|
2253
|
-
},
|
|
2254
|
-
{
|
|
2255
|
-
kind: "copyFile",
|
|
2256
|
-
source: templateSources.foundation,
|
|
2257
|
-
from: "AGENTS.md.template",
|
|
2258
|
-
to: "AGENTS.md",
|
|
2259
|
-
},
|
|
2260
|
-
{
|
|
2261
|
-
kind: "copyFile",
|
|
2262
|
-
source: templateSources.foundation,
|
|
2263
|
-
from: "turbo.json",
|
|
2264
|
-
to: "turbo.json",
|
|
2265
|
-
},
|
|
2266
|
-
...(vueHonoJointE2e === undefined
|
|
2267
|
-
? []
|
|
2268
|
-
: [
|
|
2269
|
-
{
|
|
2270
|
-
kind: "mergeJsonTemplate",
|
|
2271
|
-
source: templateSources.foundation,
|
|
2272
|
-
from: "turbo-projections/vue-hono-joint-e2e.json",
|
|
2273
|
-
to: "turbo.json",
|
|
2274
|
-
replacements: {
|
|
2275
|
-
API_PACKAGE: vueHonoJointE2e.apiPackageName,
|
|
2276
|
-
WEB_PACKAGE: vueHonoJointE2e.webPackageName,
|
|
2277
|
-
},
|
|
2278
|
-
multilineArrays: ["tasks.//#test:e2e.dependsOn"],
|
|
2279
|
-
},
|
|
2280
|
-
]),
|
|
2281
|
-
...(deploymentCheck === undefined
|
|
2282
|
-
? []
|
|
2283
|
-
: [
|
|
2284
|
-
{
|
|
2285
|
-
kind: "mergeJsonTemplate",
|
|
2286
|
-
source: templateSources.foundation,
|
|
2287
|
-
from: "turbo-projections/deployment.json",
|
|
2288
|
-
to: "turbo.json",
|
|
2289
|
-
replacements: {
|
|
2290
|
-
APPLICATION_PACKAGE: deploymentCheck.applicationPackageName,
|
|
2291
|
-
DATABASE_PACKAGE: deploymentCheck.databasePackageName,
|
|
2292
|
-
MIGRATION_PACKAGE: deploymentCheck.migrationPackageName,
|
|
2293
|
-
},
|
|
2294
|
-
multilineArrays: ["tasks.//#deployment.dependsOn"],
|
|
2295
|
-
},
|
|
2296
|
-
]),
|
|
2297
|
-
...(databasePreparation === undefined
|
|
2298
|
-
? []
|
|
2299
|
-
: [
|
|
2300
|
-
{
|
|
2301
|
-
kind: "mergeJsonTemplate",
|
|
2302
|
-
source: templateSources.foundation,
|
|
2303
|
-
from: "turbo-projections/database-preparation.json",
|
|
2304
|
-
to: "turbo.json",
|
|
2305
|
-
},
|
|
2306
|
-
]),
|
|
2307
|
-
...(rustToolchain === undefined
|
|
2308
|
-
? []
|
|
2309
|
-
: [
|
|
2310
|
-
{
|
|
2311
|
-
kind: "mergeJsonTemplate",
|
|
2312
|
-
source: templateSources.foundation,
|
|
2313
|
-
from: "turbo-projections/rust-toolchain.json",
|
|
2314
|
-
to: "turbo.json",
|
|
2315
|
-
},
|
|
2316
|
-
]),
|
|
2317
|
-
...(publicationCandidate === undefined
|
|
2318
|
-
? []
|
|
2319
|
-
: [
|
|
2320
|
-
{
|
|
2321
|
-
kind: "mergeJsonTemplate",
|
|
2322
|
-
source: templateSources.tsCli,
|
|
2323
|
-
from: "publication/turbo.json",
|
|
2324
|
-
to: "turbo.json",
|
|
2325
|
-
},
|
|
2326
|
-
]),
|
|
2327
|
-
...turboBoundaryTags.map((tag) => ({
|
|
2328
|
-
kind: "mergeJsonTemplate",
|
|
2329
|
-
source: templateSources.foundation,
|
|
2330
|
-
from: `turbo-boundary-tags/${tag}.json`,
|
|
2331
|
-
to: "turbo.json",
|
|
2332
|
-
multilineArrays: [
|
|
2333
|
-
...(deploymentCheck === undefined
|
|
2334
|
-
? []
|
|
2335
|
-
: ["tasks.//#deployment.dependsOn"]),
|
|
2336
|
-
...(vueHonoJointE2e === undefined
|
|
2337
|
-
? []
|
|
2338
|
-
: ["tasks.//#test:e2e.dependsOn"]),
|
|
2339
|
-
],
|
|
2340
|
-
})),
|
|
2341
|
-
{
|
|
2342
|
-
kind: "writeTextTemplate",
|
|
2343
|
-
source: templateSources.foundation,
|
|
2344
|
-
from: "scripts/check-toolchain-versions.ts",
|
|
2345
|
-
to: "scripts/check-toolchain-versions.ts",
|
|
2346
|
-
replacements: {
|
|
2347
|
-
TOOLCHAIN_MIRROR_SLOT_MANIFEST: toolchainMirrorSlotManifest,
|
|
2348
|
-
},
|
|
2349
|
-
},
|
|
2350
|
-
{
|
|
2351
|
-
kind: "copyFile",
|
|
2352
|
-
source: templateSources.foundation,
|
|
2353
|
-
from: "scripts/task-gates.ts",
|
|
2354
|
-
to: "scripts/task-gates.ts",
|
|
2355
|
-
},
|
|
2356
|
-
{
|
|
2357
|
-
kind: "copyFile",
|
|
2358
|
-
source: templateSources.foundation,
|
|
2359
|
-
from: "scripts/run-turbo-boundaries.ts",
|
|
2360
|
-
to: "scripts/run-turbo-boundaries.ts",
|
|
2361
|
-
},
|
|
2362
|
-
{
|
|
2363
|
-
kind: "copyFile",
|
|
2364
|
-
source: templateSources.foundation,
|
|
2365
|
-
from: "tsconfig.json",
|
|
2366
|
-
to: "tsconfig.json",
|
|
2367
|
-
},
|
|
2368
|
-
...(vueHonoJointE2e === undefined
|
|
2369
|
-
? []
|
|
2370
|
-
: [
|
|
2371
|
-
{
|
|
2372
|
-
kind: "mergeJsonTemplate",
|
|
2373
|
-
source: templateSources.vueHonoApp,
|
|
2374
|
-
from: "root/tsconfig.json",
|
|
2375
|
-
to: "tsconfig.json",
|
|
2376
|
-
},
|
|
2377
|
-
{
|
|
2378
|
-
kind: "writeTextTemplate",
|
|
2379
|
-
source: templateSources.vueHonoApp,
|
|
2380
|
-
from: "root/playwright.config.ts",
|
|
2381
|
-
to: "playwright.config.ts",
|
|
2382
|
-
replacements: {
|
|
2383
|
-
API_PACKAGE_NAME: vueHonoJointE2e.apiPackageName,
|
|
2384
|
-
WEB_PACKAGE_NAME: vueHonoJointE2e.webPackageName,
|
|
2385
|
-
},
|
|
2386
|
-
},
|
|
2387
|
-
{
|
|
2388
|
-
kind: "copyFile",
|
|
2389
|
-
source: templateSources.vueHonoApp,
|
|
2390
|
-
from: "root/test/e2e/fixtures.ts",
|
|
2391
|
-
to: "test/e2e/fixtures.ts",
|
|
2392
|
-
},
|
|
2393
|
-
{
|
|
2394
|
-
kind: "copyFile",
|
|
2395
|
-
source: templateSources.vueHonoApp,
|
|
2396
|
-
from: "root/test/e2e/app.spec.ts",
|
|
2397
|
-
to: "test/e2e/app.spec.ts",
|
|
2398
|
-
},
|
|
2399
|
-
]),
|
|
2400
|
-
...(publicationCandidate === undefined
|
|
2401
|
-
? []
|
|
2402
|
-
: [
|
|
2403
|
-
{
|
|
2404
|
-
kind: "mergeJsonTemplate",
|
|
2405
|
-
source: templateSources.tsCli,
|
|
2406
|
-
from: "publication/root-tsconfig.json",
|
|
2407
|
-
to: "tsconfig.json",
|
|
2408
|
-
},
|
|
2409
|
-
]),
|
|
2410
|
-
...(requiresPackingHook && publicationCandidate === undefined
|
|
2411
|
-
? [
|
|
2412
|
-
{
|
|
2413
|
-
kind: "mergeJsonTemplate",
|
|
2414
|
-
source: templateSources.foundation,
|
|
2415
|
-
from: "tsconfig.packing-hook.json",
|
|
2416
|
-
to: "tsconfig.json",
|
|
2417
|
-
},
|
|
2418
|
-
]
|
|
2419
|
-
: []),
|
|
2420
|
-
{
|
|
2421
|
-
kind: "copyFile",
|
|
2422
|
-
source: templateSources.sharedOxc,
|
|
2423
|
-
from: "tsconfig.config.json",
|
|
2424
|
-
to: "tsconfig.config.json",
|
|
2425
|
-
},
|
|
2426
|
-
{
|
|
2427
|
-
kind: "copyFile",
|
|
2428
|
-
source: templateSources.sharedOxc,
|
|
2429
|
-
from: "node/oxlint.config.ts",
|
|
2430
|
-
to: "oxlint.config.ts",
|
|
2431
|
-
},
|
|
2432
|
-
{
|
|
2433
|
-
kind: "copyFile",
|
|
2434
|
-
source: templateSources.sharedOxc,
|
|
2435
|
-
from: "oxfmt.config.ts",
|
|
2436
|
-
to: "oxfmt.config.ts",
|
|
2437
|
-
},
|
|
2438
|
-
...(publicationCandidate === undefined
|
|
2439
|
-
? []
|
|
2440
|
-
: [
|
|
2441
|
-
{
|
|
2442
|
-
kind: "copyFile",
|
|
2443
|
-
source: templateSources.tsCli,
|
|
2444
|
-
from: "publication/readiness.ts",
|
|
2445
|
-
to: "scripts/npm-publication/readiness.ts",
|
|
2446
|
-
},
|
|
2447
|
-
{
|
|
2448
|
-
kind: "copyFile",
|
|
2449
|
-
source: templateSources.tsCli,
|
|
2450
|
-
from: "publication/artifact.ts",
|
|
2451
|
-
to: "scripts/npm-publication/artifact.ts",
|
|
2452
|
-
},
|
|
2453
|
-
{
|
|
2454
|
-
kind: "copyFile",
|
|
2455
|
-
source: templateSources.tsCli,
|
|
2456
|
-
from: "publication/handoff.ts",
|
|
2457
|
-
to: "scripts/npm-publication/handoff.ts",
|
|
2458
|
-
},
|
|
2459
|
-
{
|
|
2460
|
-
kind: "writeTextTemplate",
|
|
2461
|
-
source: templateSources.tsCli,
|
|
2462
|
-
from: "publication/check-artifact.ts",
|
|
2463
|
-
to: "scripts/npm-publication/check-artifact.ts",
|
|
2464
|
-
replacements: {
|
|
2465
|
-
PUBLIC_CLI_PACKAGE_PATH: publicationCandidate.definition.path,
|
|
2466
|
-
},
|
|
2467
|
-
},
|
|
2468
|
-
{
|
|
2469
|
-
kind: "writeTextTemplate",
|
|
2470
|
-
source: templateSources.tsCli,
|
|
2471
|
-
from: "publication/publish.ts",
|
|
2472
|
-
to: "scripts/npm-publication/publish.ts",
|
|
2473
|
-
replacements: {
|
|
2474
|
-
PUBLIC_CLI_PACKAGE_PATH: publicationCandidate.definition.path,
|
|
2475
|
-
},
|
|
2476
|
-
},
|
|
2477
|
-
{
|
|
2478
|
-
kind: "writeTextTemplate",
|
|
2479
|
-
source: templateSources.tsCli,
|
|
2480
|
-
from: "publication/release.ts",
|
|
2481
|
-
to: "scripts/npm-publication/release.ts",
|
|
2482
|
-
replacements: {
|
|
2483
|
-
PUBLIC_CLI_PACKAGE_PATH: publicationCandidate.definition.path,
|
|
2484
|
-
},
|
|
2485
|
-
},
|
|
2486
|
-
{
|
|
2487
|
-
kind: "writeTextTemplate",
|
|
2488
|
-
source: templateSources.tsCli,
|
|
2489
|
-
from: "publication/check-readiness.ts",
|
|
2490
|
-
to: "scripts/npm-publication/check-readiness.ts",
|
|
2491
|
-
replacements: {
|
|
2492
|
-
PUBLIC_CLI_PACKAGE_PATH: publicationCandidate.definition.path,
|
|
2493
|
-
},
|
|
2494
|
-
},
|
|
2495
|
-
{
|
|
2496
|
-
kind: "copyFile",
|
|
2497
|
-
source: templateSources.tsCli,
|
|
2498
|
-
from: "publication/changelog.ts",
|
|
2499
|
-
to: "scripts/npm-publication/changelog.ts",
|
|
2500
|
-
},
|
|
2501
|
-
{
|
|
2502
|
-
kind: "copyFile",
|
|
2503
|
-
source: templateSources.tsCli,
|
|
2504
|
-
from: "publication/RELEASING.md",
|
|
2505
|
-
to: "RELEASING.md",
|
|
2506
|
-
},
|
|
2507
|
-
{
|
|
2508
|
-
kind: "copyFile",
|
|
2509
|
-
source: templateSources.tsCli,
|
|
2510
|
-
from: "src/cli-command-identity.ts",
|
|
2511
|
-
to: "scripts/npm-publication/cli-command-identity.ts",
|
|
2512
|
-
},
|
|
2513
|
-
{
|
|
2514
|
-
kind: "writeTextTemplate",
|
|
2515
|
-
source: templateSources.tsCli,
|
|
2516
|
-
from: "publication-setup/setup.sh",
|
|
2517
|
-
to: "scripts/npm-publication-setup/setup.sh",
|
|
2518
|
-
replacements: {
|
|
2519
|
-
PUBLIC_CLI_PACKAGE_PATH: publicationCandidate.definition.path,
|
|
2520
|
-
},
|
|
2521
|
-
},
|
|
2522
|
-
{
|
|
2523
|
-
kind: "setExecutable",
|
|
2524
|
-
path: "scripts/npm-publication-setup/setup.sh",
|
|
2525
|
-
executable: true,
|
|
2526
|
-
},
|
|
2527
|
-
{
|
|
2528
|
-
kind: "copyFile",
|
|
2529
|
-
source: templateSources.tsCli,
|
|
2530
|
-
from: "publication-setup/README.md",
|
|
2531
|
-
to: "scripts/npm-publication-setup/README.md",
|
|
2532
|
-
},
|
|
2533
|
-
{
|
|
2534
|
-
kind: "writeTextTemplate",
|
|
2535
|
-
source: templateSources.tsCli,
|
|
2536
|
-
from: "publication-setup/bridge.ts",
|
|
2537
|
-
to: "scripts/npm-publication-setup/bridge.ts",
|
|
2538
|
-
replacements: {
|
|
2539
|
-
PUBLIC_CLI_PACKAGE_PATH: publicationCandidate.definition.path,
|
|
2540
|
-
},
|
|
2541
|
-
},
|
|
2542
|
-
{
|
|
2543
|
-
kind: "copyFile",
|
|
2544
|
-
source: templateSources.tsCli,
|
|
2545
|
-
from: "publication-setup/assets/LICENSE-MIT.txt",
|
|
2546
|
-
to: "scripts/npm-publication-setup/assets/LICENSE-MIT.txt",
|
|
2547
|
-
},
|
|
2548
|
-
{
|
|
2549
|
-
kind: "copyFile",
|
|
2550
|
-
source: templateSources.tsCli,
|
|
2551
|
-
from: "publication-setup/assets/LICENSE-APACHE-2.0.txt",
|
|
2552
|
-
to: "scripts/npm-publication-setup/assets/LICENSE-APACHE-2.0.txt",
|
|
2553
|
-
},
|
|
2554
|
-
{
|
|
2555
|
-
kind: "copyFile",
|
|
2556
|
-
source: templateSources.tsCli,
|
|
2557
|
-
from: "publication-setup/assets/README.md.template",
|
|
2558
|
-
to: "scripts/npm-publication-setup/assets/README.md.template",
|
|
2559
|
-
},
|
|
2560
|
-
{
|
|
2561
|
-
kind: "copyFile",
|
|
2562
|
-
source: templateSources.tsCli,
|
|
2563
|
-
from: "publication-setup/assets/CHANGELOG.md.template",
|
|
2564
|
-
to: "scripts/npm-publication-setup/assets/CHANGELOG.md.template",
|
|
2565
|
-
},
|
|
2566
|
-
]),
|
|
2567
|
-
{
|
|
2568
|
-
kind: "writeJson",
|
|
2569
|
-
to: ".vscode/extensions.json",
|
|
2570
|
-
value: { recommendations: editorCustomization.extensions },
|
|
2571
|
-
...(editorCustomization.extensions.length > 2
|
|
2572
|
-
? { multilineArrays: ["recommendations"] }
|
|
2573
|
-
: {}),
|
|
2574
|
-
},
|
|
2575
|
-
{
|
|
2576
|
-
kind: "writeJson",
|
|
2577
|
-
to: ".vscode/settings.json",
|
|
2578
|
-
value: editorCustomization.settings,
|
|
2579
|
-
},
|
|
2580
|
-
...developmentContainer.operations,
|
|
2581
|
-
...(rustToolchain === undefined
|
|
2582
|
-
? []
|
|
2583
|
-
: [
|
|
2584
|
-
{
|
|
2585
|
-
kind: "writeTextTemplate",
|
|
2586
|
-
source: rustToolchain.configurationSource.source,
|
|
2587
|
-
from: rustToolchain.configurationSource.from,
|
|
2588
|
-
to: "rust-toolchain.toml",
|
|
2589
|
-
replacements: { RUST_TOOLCHAIN: rustToolchain.toolchain },
|
|
2590
|
-
},
|
|
2591
|
-
]),
|
|
2592
|
-
...(deploymentCheck === undefined || deploymentPackages === undefined
|
|
2593
|
-
? []
|
|
2594
|
-
: [
|
|
2595
|
-
{
|
|
2596
|
-
kind: "writeTextTemplate",
|
|
2597
|
-
source: deploymentCheck.sources.dockerfile.source,
|
|
2598
|
-
from: deploymentCheck.sources.dockerfile.from,
|
|
2599
|
-
to: "Dockerfile",
|
|
2600
|
-
replacements: {
|
|
2601
|
-
NODE_VERSION: options.rootNodeDeclaration,
|
|
2602
|
-
APPLICATION_PACKAGE_NAME: deploymentPackages.application.definition.name,
|
|
2603
|
-
APPLICATION_PACKAGE_PATH: deploymentPackages.application.definition.path,
|
|
2604
|
-
DATABASE_PACKAGE_NAME: deploymentPackages.database.definition.name,
|
|
2605
|
-
DATABASE_PACKAGE_PATH: deploymentPackages.database.definition.path,
|
|
2606
|
-
MIGRATION_PACKAGE_NAME: deploymentPackages.migration.definition.name,
|
|
2607
|
-
MIGRATION_PACKAGE_PATH: deploymentPackages.migration.definition.path,
|
|
2608
|
-
TYPESCRIPT_CONFIG_PACKAGE_PATH: configDefinition.path,
|
|
2609
|
-
},
|
|
2610
|
-
},
|
|
2611
|
-
{
|
|
2612
|
-
kind: "writeTextTemplate",
|
|
2613
|
-
source: deploymentCheck.sources.dockerIgnore.source,
|
|
2614
|
-
from: deploymentCheck.sources.dockerIgnore.from,
|
|
2615
|
-
to: ".dockerignore",
|
|
2616
|
-
replacements: {
|
|
2617
|
-
APPLICATION_PACKAGE_PATH: deploymentPackages.application.definition.path,
|
|
2618
|
-
DATABASE_PACKAGE_PATH: deploymentPackages.database.definition.path,
|
|
2619
|
-
},
|
|
2620
|
-
},
|
|
2621
|
-
{
|
|
2622
|
-
kind: "writeTextTemplate",
|
|
2623
|
-
source: deploymentCheck.sources.checker.source,
|
|
2624
|
-
from: deploymentCheck.sources.checker.from,
|
|
2625
|
-
to: "scripts/check-standalone-deployment.ts",
|
|
2626
|
-
replacements: {
|
|
2627
|
-
APPLICATION_PACKAGE_NAME: deploymentPackages.application.definition.name,
|
|
2628
|
-
},
|
|
2629
|
-
},
|
|
2630
|
-
{
|
|
2631
|
-
kind: "copyFile",
|
|
2632
|
-
source: deploymentCheck.sources.controlScript.source,
|
|
2633
|
-
from: deploymentCheck.sources.controlScript.from,
|
|
2634
|
-
to: "scripts/container-entrypoint.sh",
|
|
2635
|
-
},
|
|
2636
|
-
{
|
|
2637
|
-
kind: "setExecutable",
|
|
2638
|
-
path: "scripts/container-entrypoint.sh",
|
|
2639
|
-
executable: true,
|
|
2640
|
-
},
|
|
2641
|
-
]),
|
|
2642
|
-
...workflowOperations,
|
|
2643
|
-
{
|
|
2644
|
-
kind: "writeJson",
|
|
2645
|
-
to: ".template/blueprint.json",
|
|
2646
|
-
value: options.blueprint,
|
|
2647
|
-
},
|
|
2648
|
-
{
|
|
2649
|
-
kind: "writeJson",
|
|
2650
|
-
to: environmentNeedsPath,
|
|
2651
|
-
value: persistedEnvironmentNeeds,
|
|
2652
|
-
},
|
|
2653
|
-
{
|
|
2654
|
-
kind: "writeJson",
|
|
2655
|
-
to: ".template/generation.json",
|
|
2656
|
-
value: generationRecord,
|
|
2657
|
-
},
|
|
2658
|
-
];
|
|
2659
|
-
const plannedFoundationOperations = initializationFoundationOperations;
|
|
2660
|
-
const linkOperations = [
|
|
2661
|
-
...projectLinkPlan.manifestPatchesByPackagePath,
|
|
2662
|
-
].map(([packagePath, manifestPatch]) => ({
|
|
2663
|
-
kind: "mergeJson",
|
|
2664
|
-
to: `${packagePath}/package.json`,
|
|
2665
|
-
value: manifestPatch,
|
|
2666
|
-
multilineArrays: ["files"],
|
|
2667
|
-
keyOrder: packageManifestKeyOrder,
|
|
2668
|
-
nestedKeyOrder: packageConditionKeyOrder,
|
|
2669
|
-
}));
|
|
2670
|
-
const contributionProvenance = {
|
|
2671
|
-
definitionName: options.definition.metadata.name,
|
|
2672
|
-
plannerSourceFile: options.definition.plannerSourceFile,
|
|
2673
|
-
planningContribution: options.mode === "addition"
|
|
2674
|
-
? "planPackageAddition"
|
|
2675
|
-
: "planInitialization",
|
|
2676
|
-
ownershipRule: "Package Contribution may write only its owned Package Boundary",
|
|
2677
|
-
};
|
|
2678
|
-
const foundationProvenance = {
|
|
2679
|
-
definitionName: options.definition.metadata.name,
|
|
2680
|
-
plannerSourceFile: fileURLToPath(import.meta.url),
|
|
2681
|
-
planningContribution: "foundationPlan",
|
|
2682
|
-
ownershipRule: "Foundation owns coordinated root outputs",
|
|
2683
|
-
};
|
|
2684
|
-
const withProvenance = (operation, provenance) => ({ ...operation, provenance });
|
|
2685
|
-
const operations = [
|
|
2686
|
-
...(options.renderContributions === undefined
|
|
2687
|
-
? contributions
|
|
2688
|
-
: options.renderContributions.map((renderContribution) => {
|
|
2689
|
-
const enriched = packageContributions.find((candidate) => candidate.definition.path === renderContribution.definition.path);
|
|
2690
|
-
if (enriched === undefined) {
|
|
2691
|
-
throw new Error(`Foundation cannot render unknown Package Contribution ${renderContribution.definition.path}`);
|
|
2692
|
-
}
|
|
2693
|
-
return enriched;
|
|
2694
|
-
}))
|
|
2695
|
-
.map((item) => assertPackageContribution(item, {
|
|
2696
|
-
definitionName: options.definition.metadata.name,
|
|
2697
|
-
planner: options.mode === "addition"
|
|
2698
|
-
? "planPackageAddition"
|
|
2699
|
-
: "planInitialization",
|
|
2700
|
-
}))
|
|
2701
|
-
.flatMap((item) => item.operations.map((operation) => operation.kind === "writeJson" &&
|
|
2702
|
-
operation.to.endsWith("/package.json")
|
|
2703
|
-
? {
|
|
2704
|
-
...operation,
|
|
2705
|
-
value: item.manifest,
|
|
2706
|
-
keyOrder: packageManifestKeyOrder,
|
|
2707
|
-
nestedKeyOrder: packageConditionKeyOrder,
|
|
2708
|
-
}
|
|
2709
|
-
: operation))
|
|
2710
|
-
.map((operation) => withProvenance(operation, contributionProvenance)),
|
|
2711
|
-
...plannedFoundationOperations.map((operation) => withProvenance(operation, foundationProvenance)),
|
|
2712
|
-
...linkOperations.map((operation) => withProvenance(operation, foundationProvenance)),
|
|
2713
|
-
];
|
|
2714
|
-
return {
|
|
2715
|
-
definitionName: options.definition.metadata.name,
|
|
2716
|
-
plannerSourceFile: options.definition.plannerSourceFile,
|
|
2717
|
-
planningContribution: options.mode === "addition"
|
|
2718
|
-
? "planPackageAddition"
|
|
2719
|
-
: "planInitialization",
|
|
2720
|
-
blueprint: options.blueprint,
|
|
2721
|
-
generationRecord,
|
|
2722
|
-
packageContributions,
|
|
2723
|
-
operations,
|
|
2724
|
-
reconciliation,
|
|
2725
|
-
developmentContainer: {
|
|
2726
|
-
toolLayers: developmentContainer.toolLayers,
|
|
2727
|
-
buildArguments: developmentContainer.buildArguments,
|
|
2728
|
-
mounts: developmentContainer.mounts,
|
|
2729
|
-
probes: developmentContainer.probes,
|
|
2730
|
-
},
|
|
2731
|
-
environmentNeeds,
|
|
2732
|
-
deploymentCheck: deploymentCheck === undefined
|
|
2733
|
-
? undefined
|
|
2734
|
-
: {
|
|
2735
|
-
kind: deploymentCheck.kind,
|
|
2736
|
-
applicationPackageName: deploymentCheck.applicationPackageName,
|
|
2737
|
-
databasePackageName: deploymentCheck.databasePackageName,
|
|
2738
|
-
migrationPackageName: deploymentCheck.migrationPackageName,
|
|
2739
|
-
environmentNeeds: deploymentCheck.environmentNeeds,
|
|
2740
|
-
},
|
|
2741
|
-
vueHonoJointE2e: vueHonoJointE2e === undefined
|
|
2742
|
-
? undefined
|
|
2743
|
-
: {
|
|
2744
|
-
kind: vueHonoJointE2e.kind,
|
|
2745
|
-
apiPackageName: vueHonoJointE2e.apiPackageName,
|
|
2746
|
-
},
|
|
2747
|
-
deploymentEnvironmentNeeds,
|
|
2748
|
-
ciDiagnosticArtifacts,
|
|
2749
|
-
manifests: [...contributions.map((item) => item.manifest), rootManifest],
|
|
2750
|
-
dependencyCatalog,
|
|
2751
|
-
dependencyMaintenancePolicy,
|
|
2752
|
-
nextStepInstructions: [
|
|
2753
|
-
{ display: "pnpm install" },
|
|
2754
|
-
{ display: "pnpm run fix" },
|
|
2755
|
-
{ display: "pnpm run check" },
|
|
2756
|
-
],
|
|
2757
|
-
};
|
|
2758
|
-
}
|
|
2759
|
-
function hasConfigurablePrimaryPackage(definition) {
|
|
2760
|
-
return definition.initialPrimaryPackage !== undefined;
|
|
2761
|
-
}
|
|
2762
|
-
function deduplicateInitializationInputIssues(issues) {
|
|
2763
|
-
return issues.filter((issue, index) => issues.findIndex((candidate) => candidate.code === issue.code) === index);
|
|
2764
|
-
}
|
|
2765
|
-
function collectInitializationInput(options) {
|
|
2766
|
-
const issues = [];
|
|
2767
|
-
const definition = options.definition ??
|
|
2768
|
-
(options.preset === undefined
|
|
2769
|
-
? undefined
|
|
2770
|
-
: builtInPresetRegistry
|
|
2771
|
-
.all()
|
|
2772
|
-
.find((candidate) => candidate.metadata.name === options.preset));
|
|
2773
|
-
if (definition === undefined) {
|
|
2774
|
-
return {
|
|
2775
|
-
status: "input-invalid",
|
|
2776
|
-
issues: [{ code: "PRESET_UNKNOWN" }],
|
|
2777
|
-
};
|
|
2778
|
-
}
|
|
2779
|
-
const scopeOverride = options.overrides?.scope;
|
|
2780
|
-
const normalizedScope = scopeOverride?.startsWith("@") === true
|
|
2781
|
-
? scopeOverride.slice(1)
|
|
2782
|
-
: scopeOverride;
|
|
2783
|
-
const nameOverride = options.overrides?.name;
|
|
2784
|
-
const pathOverride = options.overrides?.path;
|
|
2785
|
-
const repositoryName = path.basename(path.resolve(options.targetDir));
|
|
2786
|
-
const configurablePrimaryPackage = definition.initialPrimaryPackage !== undefined;
|
|
2787
|
-
if (!configurablePrimaryPackage &&
|
|
2788
|
-
(nameOverride !== undefined || pathOverride !== undefined)) {
|
|
2789
|
-
issues.push({ code: "FIXED_TOPOLOGY_OVERRIDE" });
|
|
2790
|
-
}
|
|
2791
|
-
let validNameOverride = nameOverride !== undefined &&
|
|
2792
|
-
isValidNewNpmPackageName(`@x/${nameOverride}`);
|
|
2793
|
-
if (nameOverride !== undefined && !validNameOverride) {
|
|
2794
|
-
issues.push({ code: "INVALID_PACKAGE_NAME" });
|
|
2795
|
-
}
|
|
2796
|
-
if (pathOverride !== undefined) {
|
|
2797
|
-
const pathValidation = validateNewPackagePath(pathOverride);
|
|
2798
|
-
if (!pathValidation.hasValidShape) {
|
|
2799
|
-
issues.push({ code: "INVALID_PACKAGE_PATH" });
|
|
2800
|
-
}
|
|
2801
|
-
if (pathValidation.reservedWorkspaceCollection !== undefined) {
|
|
2802
|
-
issues.push({ code: "RESERVED_PACKAGE_PATH" });
|
|
2803
|
-
}
|
|
2804
|
-
}
|
|
2805
|
-
let validScopeOverride = normalizedScope !== undefined &&
|
|
2806
|
-
scopeOverride === scopeOverride?.trim() &&
|
|
2807
|
-
isValidDefaultPackageScope(normalizedScope) &&
|
|
2808
|
-
isValidNewNpmPackageName(`@${normalizedScope}/typescript-config`);
|
|
2809
|
-
if (normalizedScope !== undefined && !validScopeOverride) {
|
|
2810
|
-
issues.push({ code: "INVALID_PACKAGE_SCOPE" });
|
|
2811
|
-
}
|
|
2812
|
-
let validRepositoryScope = isValidDefaultPackageScope(repositoryName) &&
|
|
2813
|
-
isValidNewNpmPackageName(`@${repositoryName}/typescript-config`);
|
|
2814
|
-
if (normalizedScope === undefined && !validRepositoryScope) {
|
|
2815
|
-
issues.push({ code: "INVALID_REPOSITORY_SCOPE" });
|
|
2816
|
-
}
|
|
2817
|
-
const resolvedScope = validScopeOverride
|
|
2818
|
-
? (normalizedScope ?? "repository")
|
|
2819
|
-
: validRepositoryScope
|
|
2820
|
-
? repositoryName
|
|
2821
|
-
: "repository";
|
|
2822
|
-
const resolvedLeaf = configurablePrimaryPackage &&
|
|
2823
|
-
nameOverride !== undefined &&
|
|
2824
|
-
validNameOverride
|
|
2825
|
-
? nameOverride
|
|
2826
|
-
: configurablePrimaryPackage
|
|
2827
|
-
? definition.initialPrimaryPackage?.defaultLeafName
|
|
2828
|
-
: undefined;
|
|
2829
|
-
if (resolvedLeaf !== undefined &&
|
|
2830
|
-
!isValidNewNpmPackageName(`@${resolvedScope}/${resolvedLeaf}`)) {
|
|
2831
|
-
if (nameOverride !== undefined) {
|
|
2832
|
-
validNameOverride = false;
|
|
2833
|
-
issues.push({ code: "INVALID_PACKAGE_NAME" });
|
|
2834
|
-
}
|
|
2835
|
-
else if (scopeOverride !== undefined) {
|
|
2836
|
-
validScopeOverride = false;
|
|
2837
|
-
issues.push({ code: "INVALID_PACKAGE_SCOPE" });
|
|
2838
|
-
}
|
|
2839
|
-
else {
|
|
2840
|
-
validRepositoryScope = false;
|
|
2841
|
-
issues.push({ code: "INVALID_REPOSITORY_SCOPE" });
|
|
2842
|
-
}
|
|
2843
|
-
}
|
|
2844
|
-
const initialPrimaryPackage = definition.initialPrimaryPackage;
|
|
2845
|
-
const foundationDefinition = typescriptConfigPackageDefinition({
|
|
2846
|
-
foundationPackages: {
|
|
2847
|
-
typescriptConfiguration: {
|
|
2848
|
-
name: `@${resolvedScope}/typescript-config`,
|
|
2849
|
-
},
|
|
2850
|
-
},
|
|
2851
|
-
});
|
|
2852
|
-
if ((nameOverride !== undefined &&
|
|
2853
|
-
`@${resolvedScope}/${nameOverride}` === foundationDefinition.name) ||
|
|
2854
|
-
pathOverride === foundationDefinition.path) {
|
|
2855
|
-
issues.push({ code: "CONFLICTING_PACKAGE_IDENTITY" });
|
|
2856
|
-
}
|
|
2857
|
-
if (issues.length > 0) {
|
|
2858
|
-
return {
|
|
2859
|
-
status: "input-invalid",
|
|
2860
|
-
issues: deduplicateInitializationInputIssues(issues),
|
|
2861
|
-
};
|
|
2862
|
-
}
|
|
2863
|
-
return {
|
|
2864
|
-
status: "valid",
|
|
2865
|
-
definition,
|
|
2866
|
-
normalizedScope,
|
|
2867
|
-
nameOverride,
|
|
2868
|
-
pathOverride,
|
|
2869
|
-
repositoryName,
|
|
2870
|
-
configurablePrimaryPackage,
|
|
2871
|
-
validScopeOverride,
|
|
2872
|
-
validRepositoryScope,
|
|
2873
|
-
resolvedScope,
|
|
2874
|
-
initialPrimaryPackage,
|
|
2875
|
-
foundationDefinition,
|
|
2876
|
-
};
|
|
2877
|
-
}
|
|
2878
|
-
export function validateGeneratedRepositoryInitializationInput(options) {
|
|
2879
|
-
const input = collectInitializationInput(options);
|
|
2880
|
-
return input.status === "input-invalid" ? input : { status: "valid" };
|
|
2881
|
-
}
|
|
2882
|
-
function errorDiagnostics(error) {
|
|
2883
|
-
return (error instanceof Error ? error.message : String(error))
|
|
2884
|
-
.split("\n")
|
|
2885
|
-
.filter((diagnostic) => diagnostic.length > 0);
|
|
2886
|
-
}
|
|
2887
|
-
function preparePresetInitialization(options) {
|
|
2888
|
-
if (!hasConfigurablePrimaryPackage(options.definition)) {
|
|
2889
|
-
const diagnostics = [];
|
|
2890
|
-
let presetBlueprint;
|
|
2891
|
-
let contributions;
|
|
2892
|
-
try {
|
|
2893
|
-
presetBlueprint = assertProjectBlueprintDraft(options.definition.blueprint(options.context));
|
|
2894
|
-
}
|
|
2895
|
-
catch (error) {
|
|
2896
|
-
diagnostics.push(...errorDiagnostics(error));
|
|
2897
|
-
}
|
|
2898
|
-
try {
|
|
2899
|
-
contributions = options.definition.planInitializationContributions?.(options.context) ?? [options.definition.planInitialization(options.context)];
|
|
2900
|
-
}
|
|
2901
|
-
catch (error) {
|
|
2902
|
-
diagnostics.push(...errorDiagnostics(error));
|
|
2903
|
-
}
|
|
2904
|
-
if (diagnostics.length > 0)
|
|
2905
|
-
throw new Error(diagnostics.join("\n"));
|
|
2906
|
-
return {
|
|
2907
|
-
presetBlueprint: presetBlueprint,
|
|
2908
|
-
contributions: contributions,
|
|
2909
|
-
};
|
|
2910
|
-
}
|
|
2911
|
-
const capability = options.definition.initialPrimaryPackage;
|
|
2912
|
-
const leafName = options.overrides?.name ?? capability.defaultLeafName;
|
|
2913
|
-
const resolvedPackageIdentity = {
|
|
2914
|
-
leafName,
|
|
2915
|
-
definition: {
|
|
2916
|
-
name: `@${options.context.defaultPackageScope}/${leafName}`,
|
|
2917
|
-
path: options.overrides?.path ??
|
|
2918
|
-
capability.defaultPackagePath({ packageLeafName: leafName }),
|
|
2919
|
-
role: capability.role,
|
|
2920
|
-
},
|
|
2921
|
-
};
|
|
2922
|
-
const diagnostics = [];
|
|
2923
|
-
let presetBlueprint;
|
|
2924
|
-
let contribution;
|
|
2925
|
-
try {
|
|
2926
|
-
presetBlueprint = assertProjectBlueprintDraft({
|
|
2927
|
-
schemaVersion: 3,
|
|
2928
|
-
packages: [resolvedPackageIdentity.definition],
|
|
2929
|
-
});
|
|
2930
|
-
}
|
|
2931
|
-
catch (error) {
|
|
2932
|
-
diagnostics.push(...errorDiagnostics(error));
|
|
2933
|
-
}
|
|
2934
|
-
try {
|
|
2935
|
-
contribution = capability.planInitialContribution({
|
|
2936
|
-
context: options.context,
|
|
2937
|
-
resolvedPackageIdentity,
|
|
2938
|
-
});
|
|
2939
|
-
}
|
|
2940
|
-
catch (error) {
|
|
2941
|
-
diagnostics.push(...errorDiagnostics(error));
|
|
2942
|
-
}
|
|
2943
|
-
if (diagnostics.length > 0)
|
|
2944
|
-
throw new Error(diagnostics.join("\n"));
|
|
2945
|
-
return {
|
|
2946
|
-
presetBlueprint: presetBlueprint,
|
|
2947
|
-
contributions: [contribution],
|
|
2948
|
-
resolvedPackageIdentity,
|
|
2949
|
-
};
|
|
2950
|
-
}
|
|
2951
|
-
function planPreparedRepositoryInitialization(options) {
|
|
2952
|
-
const { presetBlueprint, contributions } = options;
|
|
2953
|
-
const configDefinition = typescriptConfigPackageDefinition(options.context);
|
|
2954
|
-
const foundationIdentityDiagnostics = presetBlueprint.packages.flatMap((definition) => [
|
|
2955
|
-
...(definition.name === configDefinition.name
|
|
2956
|
-
? [
|
|
2957
|
-
`Initial package name ${definition.name} conflicts with Foundation package ${configDefinition.name}`,
|
|
2958
|
-
]
|
|
2959
|
-
: []),
|
|
2960
|
-
...(definition.path === configDefinition.path
|
|
2961
|
-
? [
|
|
2962
|
-
`Initial Package Path ${definition.path} conflicts with Foundation Package Path ${configDefinition.path}`,
|
|
2963
|
-
]
|
|
2964
|
-
: []),
|
|
2965
|
-
]);
|
|
2966
|
-
if (foundationIdentityDiagnostics.length > 0) {
|
|
2967
|
-
throw new Error(foundationIdentityDiagnostics.join("\n"));
|
|
2968
|
-
}
|
|
2969
|
-
const occupiedIds = new Set();
|
|
2970
|
-
const blueprint = {
|
|
2971
|
-
...presetBlueprint,
|
|
2972
|
-
packages: [
|
|
2973
|
-
...presetBlueprint.packages.map((definition) => {
|
|
2974
|
-
const contribution = contributions.find((candidate) => packageDefinitionsEqual(candidate.definition, definition));
|
|
2975
|
-
if (contribution === undefined) {
|
|
2976
|
-
throw new Error(`Preset Blueprint Package Definition ${definition.path} has no initialization Package Contribution`);
|
|
2977
|
-
}
|
|
2978
|
-
return persistPackageDefinition({
|
|
2979
|
-
definition,
|
|
2980
|
-
provenance: {
|
|
2981
|
-
definitionName: options.definition.metadata.name,
|
|
2982
|
-
planningContribution: "planInitialization",
|
|
2983
|
-
contributionIdentity: requireReplayAdapter({
|
|
2984
|
-
owner: options.definition.metadata.name,
|
|
2985
|
-
adapters: options.definition.packageContributionReplayAdapters,
|
|
2986
|
-
identity: contribution.planningIdentity,
|
|
2987
|
-
}).identity,
|
|
2988
|
-
},
|
|
2989
|
-
occupiedIds,
|
|
2990
|
-
});
|
|
2991
|
-
}),
|
|
2992
|
-
persistPackageDefinition({
|
|
2993
|
-
definition: configDefinition,
|
|
2994
|
-
provenance: {
|
|
2995
|
-
definitionName: "foundation",
|
|
2996
|
-
planningContribution: "foundationPlan",
|
|
2997
|
-
contributionIdentity: typescriptConfigReplayAdapter.identity,
|
|
2998
|
-
},
|
|
2999
|
-
occupiedIds,
|
|
3000
|
-
}),
|
|
3001
|
-
],
|
|
3002
|
-
};
|
|
3003
|
-
return foundationPlan({
|
|
3004
|
-
definition: options.definition,
|
|
3005
|
-
context: options.context,
|
|
3006
|
-
blueprint,
|
|
3007
|
-
foundationContribution: typescriptConfigReplayAdapter.identify(typescriptConfigContribution(options.context, configDefinition)),
|
|
3008
|
-
contributions,
|
|
3009
|
-
mode: "initialization",
|
|
3010
|
-
rootNodeDeclaration: options.rootNodeDeclaration,
|
|
3011
|
-
});
|
|
3012
|
-
}
|
|
3013
|
-
function assertPreflightedInitializationPlan(plan) {
|
|
3014
|
-
const projectionDiagnostics = validateProjectProjectionPlan({
|
|
3015
|
-
operations: plan.operations,
|
|
3016
|
-
reconciliation: plan.reconciliation,
|
|
3017
|
-
});
|
|
3018
|
-
if (projectionDiagnostics.length > 0) {
|
|
3019
|
-
throw new Error(projectionDiagnostics.join("\n"));
|
|
3020
|
-
}
|
|
3021
|
-
return plan;
|
|
3022
|
-
}
|
|
3023
|
-
/** 精确 Node 事实必须是有三段补丁号的版本,不接受纯大版本或两段形式。 */
|
|
3024
|
-
const exactNodeVersionPattern = /^\d+\.\d+\.\d+$/u;
|
|
3025
|
-
/**
|
|
3026
|
-
* 私有根的 Node 声明:上下文带已知精确值时沿用该精确值,并校验其大版本与 nodeLtsMajor 一致;
|
|
3027
|
-
* 缺省时沿用原有大版本声明。这条缺省路径不作为新生成公开包范围的推导来源。
|
|
3028
|
-
*/
|
|
3029
|
-
function resolvePrivateRootNodeDeclaration(toolchain) {
|
|
3030
|
-
const { nodeLtsMajor, nodeVersion } = toolchain;
|
|
3031
|
-
if (nodeVersion === undefined)
|
|
3032
|
-
return nodeLtsMajor;
|
|
3033
|
-
if (!exactNodeVersionPattern.test(nodeVersion)) {
|
|
3034
|
-
throw new Error(`Generation Context 的 toolchain.nodeVersion 必须是精确三段 Node 版本("24.16.0"),实际收到 ${JSON.stringify(nodeVersion)}。`);
|
|
3035
|
-
}
|
|
3036
|
-
if (nodeVersion.slice(0, nodeVersion.indexOf(".")) !== nodeLtsMajor) {
|
|
3037
|
-
throw new Error(`Generation Context 的 toolchain.nodeVersion ${nodeVersion} 与 nodeLtsMajor ${nodeLtsMajor} 大版本不一致。`);
|
|
3038
|
-
}
|
|
3039
|
-
return nodeVersion;
|
|
3040
|
-
}
|
|
3041
|
-
/**
|
|
3042
|
-
* 直接规划接缝:调用方自带 Generation Context,私有根沿用其 Node 声明;上下文带精确事实时
|
|
3043
|
-
* 私有根得到精确版本。生产初始化由 prepareGeneratedRepositoryInitialization 投影 CLI 发版快照。
|
|
3044
|
-
*/
|
|
3045
|
-
export function planGeneratedRepositoryInitialization(options) {
|
|
3046
|
-
const prepared = preparePresetInitialization(options);
|
|
3047
|
-
return assertPreflightedInitializationPlan(planPreparedRepositoryInitialization({
|
|
3048
|
-
definition: options.definition,
|
|
3049
|
-
context: options.context,
|
|
3050
|
-
presetBlueprint: prepared.presetBlueprint,
|
|
3051
|
-
contributions: prepared.contributions,
|
|
3052
|
-
rootNodeDeclaration: resolvePrivateRootNodeDeclaration(options.context.toolchain),
|
|
3053
|
-
}));
|
|
3054
|
-
}
|
|
3055
|
-
/**
|
|
3056
|
-
* 初始化只消费随 CLI 发版的不可变工具链快照:私有根得到精确 Node 与 pnpm pin,
|
|
3057
|
-
* 选用 Rust 的仓库根 toolchain 声明得到快照的精确 Rust 版本,Generation Record 与容器等
|
|
3058
|
-
* 消费者继续得到派生的大版本。不读在线版本源,也不接受调用方版本。
|
|
3059
|
-
*/
|
|
3060
|
-
const initializationSnapshotToolchain = {
|
|
3061
|
-
nodeLtsMajor: releaseToolchainSnapshot.nodeVersion.slice(0, releaseToolchainSnapshot.nodeVersion.indexOf(".")),
|
|
3062
|
-
packageManagerPin: releaseToolchainSnapshot.packageManagerPin,
|
|
3063
|
-
nodeVersion: releaseToolchainSnapshot.nodeVersion,
|
|
3064
|
-
rustVersion: releaseToolchainSnapshot.rustVersion,
|
|
3065
|
-
};
|
|
3066
|
-
export function prepareGeneratedRepositoryInitialization(options) {
|
|
3067
|
-
const input = collectInitializationInput(options);
|
|
3068
|
-
if (input.status === "input-invalid")
|
|
3069
|
-
return input;
|
|
3070
|
-
const { definition, normalizedScope, nameOverride, pathOverride, repositoryName, configurablePrimaryPackage, validScopeOverride, validRepositoryScope, resolvedScope, initialPrimaryPackage, foundationDefinition, } = input;
|
|
3071
|
-
let derivedPackagePath;
|
|
3072
|
-
if (initialPrimaryPackage !== undefined) {
|
|
3073
|
-
try {
|
|
3074
|
-
derivedPackagePath = initialPrimaryPackage.defaultPackagePath({
|
|
3075
|
-
packageLeafName: nameOverride ?? initialPrimaryPackage.defaultLeafName,
|
|
3076
|
-
});
|
|
3077
|
-
}
|
|
3078
|
-
catch {
|
|
3079
|
-
return { status: "operation-failure", phase: "preset" };
|
|
3080
|
-
}
|
|
3081
|
-
const derivedPathValidation = validateNewPackagePath(derivedPackagePath);
|
|
3082
|
-
if (!derivedPathValidation.hasValidShape ||
|
|
3083
|
-
derivedPathValidation.reservedWorkspaceCollection !== undefined) {
|
|
3084
|
-
return { status: "operation-failure", phase: "preset" };
|
|
3085
|
-
}
|
|
3086
|
-
if ((nameOverride === undefined &&
|
|
3087
|
-
`@${resolvedScope}/${initialPrimaryPackage.defaultLeafName}` ===
|
|
3088
|
-
foundationDefinition.name) ||
|
|
3089
|
-
(pathOverride === undefined &&
|
|
3090
|
-
derivedPackagePath === foundationDefinition.path)) {
|
|
3091
|
-
return { status: "operation-failure", phase: "preset" };
|
|
3092
|
-
}
|
|
3093
|
-
}
|
|
3094
|
-
const context = createGenerationContext({
|
|
3095
|
-
targetDir: options.targetDir,
|
|
3096
|
-
defaultPackageScope: validScopeOverride
|
|
3097
|
-
? (normalizedScope ?? "repository")
|
|
3098
|
-
: validRepositoryScope
|
|
3099
|
-
? repositoryName
|
|
3100
|
-
: "repository",
|
|
3101
|
-
toolchain: initializationSnapshotToolchain,
|
|
3102
|
-
});
|
|
3103
|
-
const safeIdentityOverrides = {
|
|
3104
|
-
...(configurablePrimaryPackage && nameOverride !== undefined
|
|
3105
|
-
? { name: nameOverride }
|
|
3106
|
-
: {}),
|
|
3107
|
-
...(configurablePrimaryPackage && pathOverride !== undefined
|
|
3108
|
-
? { path: pathOverride }
|
|
3109
|
-
: derivedPackagePath === undefined
|
|
3110
|
-
? {}
|
|
3111
|
-
: { path: derivedPackagePath }),
|
|
3112
|
-
};
|
|
3113
|
-
let prepared;
|
|
3114
|
-
try {
|
|
3115
|
-
prepared = preparePresetInitialization({
|
|
3116
|
-
definition,
|
|
3117
|
-
context,
|
|
3118
|
-
...(Object.keys(safeIdentityOverrides).length === 0
|
|
3119
|
-
? {}
|
|
3120
|
-
: { overrides: safeIdentityOverrides }),
|
|
3121
|
-
});
|
|
3122
|
-
}
|
|
3123
|
-
catch {
|
|
3124
|
-
return { status: "operation-failure", phase: "preset" };
|
|
3125
|
-
}
|
|
3126
|
-
let plan;
|
|
3127
|
-
try {
|
|
3128
|
-
plan = planPreparedRepositoryInitialization({
|
|
3129
|
-
definition,
|
|
3130
|
-
context,
|
|
3131
|
-
presetBlueprint: prepared.presetBlueprint,
|
|
3132
|
-
contributions: prepared.contributions,
|
|
3133
|
-
// 私有根与上下文共用同一精确 Node 事实的推导点,避免根声明与上下文出现两个来源。
|
|
3134
|
-
rootNodeDeclaration: resolvePrivateRootNodeDeclaration(context.toolchain),
|
|
3135
|
-
});
|
|
3136
|
-
if (validateProjectProjectionPlan({
|
|
3137
|
-
operations: plan.operations,
|
|
3138
|
-
reconciliation: plan.reconciliation,
|
|
3139
|
-
}).length > 0) {
|
|
3140
|
-
return { status: "operation-failure", phase: "preflight" };
|
|
3141
|
-
}
|
|
3142
|
-
}
|
|
3143
|
-
catch {
|
|
3144
|
-
return { status: "operation-failure", phase: "planning" };
|
|
3145
|
-
}
|
|
3146
|
-
return {
|
|
3147
|
-
status: "ready",
|
|
3148
|
-
context,
|
|
3149
|
-
resolved: {
|
|
3150
|
-
preset: definition.metadata.name,
|
|
3151
|
-
topology: prepared.resolvedPackageIdentity === undefined
|
|
3152
|
-
? "fixed"
|
|
3153
|
-
: "configurable-primary-package",
|
|
3154
|
-
packages: prepared.presetBlueprint.packages.map(({ name, path }) => ({
|
|
3155
|
-
name,
|
|
3156
|
-
path,
|
|
3157
|
-
})),
|
|
3158
|
-
scope: context.defaultPackageScope,
|
|
3159
|
-
},
|
|
3160
|
-
...(prepared.resolvedPackageIdentity === undefined
|
|
3161
|
-
? {}
|
|
3162
|
-
: { resolvedPackageIdentity: prepared.resolvedPackageIdentity }),
|
|
3163
|
-
plan,
|
|
3164
|
-
publicationSetup: publicCliCandidate(prepared.contributions) === undefined
|
|
3165
|
-
? null
|
|
3166
|
-
: { command: "./scripts/npm-publication-setup/setup.sh" },
|
|
3167
|
-
};
|
|
3168
|
-
}
|
|
3169
|
-
function planGeneratedRepositoryPackageAdditionFromPreparedContribution(options) {
|
|
3170
|
-
const { blueprint: persistedBlueprint, context } = options.localTemplateMetadata;
|
|
3171
|
-
const { rootNodeDeclaration } = options.localTemplateMetadata[localTemplateMetadataStateKey];
|
|
3172
|
-
assertProjectBlueprint(persistedBlueprint);
|
|
3173
|
-
const contribution = options.contribution;
|
|
3174
|
-
const requestedPackageLinkIntents = [...new Set(options.linkFrom ?? [])].map((consumerPackagePath) => ({
|
|
3175
|
-
consumerPackagePath,
|
|
3176
|
-
providerPackagePath: contribution.definition.path,
|
|
3177
|
-
}));
|
|
3178
|
-
const conflictingPackage = persistedBlueprint.packages.find((existing) => existing.name === contribution.definition.name ||
|
|
3179
|
-
existing.path === contribution.definition.path);
|
|
3180
|
-
if (conflictingPackage !== undefined) {
|
|
3181
|
-
const isExactPackageDefinition = packageDefinitionsEqual(conflictingPackage, contribution.definition);
|
|
3182
|
-
const existingPackageLinkIntents = persistedBlueprint.packageLinkIntents ?? [];
|
|
3183
|
-
const missingPackageLinkIntent = requestedPackageLinkIntents.find((requested) => !existingPackageLinkIntents.some((existing) => packageLinkIntentsEqual(existing, requested)));
|
|
3184
|
-
if (isExactPackageDefinition && missingPackageLinkIntent === undefined) {
|
|
3185
|
-
const existing = readExistingPackageAdditionState(options);
|
|
3186
|
-
const plan = foundationPlan({
|
|
3187
|
-
definition: options.definition,
|
|
3188
|
-
context,
|
|
3189
|
-
blueprint: persistedBlueprint,
|
|
3190
|
-
foundationContribution: existing.foundationContribution,
|
|
3191
|
-
contributions: existing.contributions,
|
|
3192
|
-
renderContributions: [],
|
|
3193
|
-
manifestTruthByPackagePath: existing.manifestTruthByPackagePath,
|
|
3194
|
-
generationRecord: existing.generationRecord,
|
|
3195
|
-
mode: "addition",
|
|
3196
|
-
rootNodeDeclaration,
|
|
3197
|
-
});
|
|
3198
|
-
const currentProjection = foundationPlan({
|
|
3199
|
-
definition: options.definition,
|
|
3200
|
-
context,
|
|
3201
|
-
blueprint: persistedBlueprint,
|
|
3202
|
-
foundationContribution: existing.foundationContribution,
|
|
3203
|
-
contributions: existing.contributions,
|
|
3204
|
-
generationRecord: existing.generationRecord,
|
|
3205
|
-
mode: "initialization",
|
|
3206
|
-
rootNodeDeclaration,
|
|
3207
|
-
});
|
|
3208
|
-
return {
|
|
3209
|
-
...plan,
|
|
3210
|
-
operations: [],
|
|
3211
|
-
projectProjections: {
|
|
3212
|
-
before: {
|
|
3213
|
-
operations: currentProjection.operations,
|
|
3214
|
-
reconciliation: currentProjection.reconciliation,
|
|
3215
|
-
},
|
|
3216
|
-
after: {
|
|
3217
|
-
operations: currentProjection.operations,
|
|
3218
|
-
reconciliation: currentProjection.reconciliation,
|
|
3219
|
-
},
|
|
3220
|
-
preconditions: [],
|
|
3221
|
-
},
|
|
3222
|
-
};
|
|
3223
|
-
}
|
|
3224
|
-
if (isExactPackageDefinition) {
|
|
3225
|
-
throw new PackageAdditionBusinessConflict("missing-link", conflictingPackage, contribution.definition, missingPackageLinkIntent);
|
|
3226
|
-
}
|
|
3227
|
-
throw new PackageAdditionBusinessConflict("identity", conflictingPackage, contribution.definition);
|
|
3228
|
-
}
|
|
3229
|
-
const contributionIdentity = requireReplayAdapter({
|
|
3230
|
-
owner: options.definition.metadata.name,
|
|
3231
|
-
adapters: options.definition.packageContributionReplayAdapters,
|
|
3232
|
-
identity: contribution.planningIdentity,
|
|
3233
|
-
}).identity;
|
|
3234
|
-
const persistedContributionDefinition = persistPackageDefinition({
|
|
3235
|
-
definition: contribution.definition,
|
|
3236
|
-
provenance: {
|
|
3237
|
-
definitionName: options.definition.metadata.name,
|
|
3238
|
-
planningContribution: "planPackageAddition",
|
|
3239
|
-
contributionIdentity,
|
|
3240
|
-
},
|
|
3241
|
-
occupiedIds: new Set(persistedBlueprint.packages.map((definition) => definition.packageDefinitionId)),
|
|
3242
|
-
});
|
|
3243
|
-
const blueprint = {
|
|
3244
|
-
...persistedBlueprint,
|
|
3245
|
-
packages: [...persistedBlueprint.packages, persistedContributionDefinition],
|
|
3246
|
-
...(requestedPackageLinkIntents.length > 0
|
|
3247
|
-
? {
|
|
3248
|
-
packageLinkIntents: [
|
|
3249
|
-
...(persistedBlueprint.packageLinkIntents ?? []),
|
|
3250
|
-
...requestedPackageLinkIntents,
|
|
3251
|
-
],
|
|
3252
|
-
}
|
|
3253
|
-
: {}),
|
|
3254
|
-
};
|
|
3255
|
-
assertProjectBlueprint(blueprint);
|
|
3256
|
-
const requiredManifestTruthPackagePaths = requestedPackageLinkIntents.length === 0
|
|
3257
|
-
? []
|
|
3258
|
-
: [
|
|
3259
|
-
...(persistedBlueprint.packageLinkIntents ?? []).flatMap((intent) => [
|
|
3260
|
-
intent.consumerPackagePath,
|
|
3261
|
-
intent.providerPackagePath,
|
|
3262
|
-
]),
|
|
3263
|
-
...requestedPackageLinkIntents.map((intent) => intent.consumerPackagePath),
|
|
3264
|
-
];
|
|
3265
|
-
const existing = readExistingPackageAdditionState({
|
|
3266
|
-
localTemplateMetadata: options.localTemplateMetadata,
|
|
3267
|
-
requiredManifestTruthPackagePaths,
|
|
3268
|
-
});
|
|
3269
|
-
const generationRecord = {
|
|
3270
|
-
...existing.generationRecord,
|
|
3271
|
-
packages: [
|
|
3272
|
-
...existing.generationRecord.packages,
|
|
3273
|
-
{
|
|
3274
|
-
packageDefinitionId: persistedContributionDefinition.packageDefinitionId,
|
|
3275
|
-
path: contribution.definition.path,
|
|
3276
|
-
definitionName: options.definition.metadata.name,
|
|
3277
|
-
planningContribution: "planPackageAddition",
|
|
3278
|
-
contributionIdentity,
|
|
3279
|
-
},
|
|
3280
|
-
],
|
|
3281
|
-
};
|
|
3282
|
-
const beforeProjection = foundationPlan({
|
|
3283
|
-
definition: options.definition,
|
|
3284
|
-
context,
|
|
3285
|
-
blueprint: persistedBlueprint,
|
|
3286
|
-
foundationContribution: existing.foundationContribution,
|
|
3287
|
-
contributions: existing.contributions,
|
|
3288
|
-
generationRecord: existing.generationRecord,
|
|
3289
|
-
mode: "initialization",
|
|
3290
|
-
rootNodeDeclaration,
|
|
3291
|
-
});
|
|
3292
|
-
const afterProjection = foundationPlan({
|
|
3293
|
-
definition: options.definition,
|
|
3294
|
-
context,
|
|
3295
|
-
blueprint,
|
|
3296
|
-
foundationContribution: existing.foundationContribution,
|
|
3297
|
-
contributions: [...existing.contributions, contribution],
|
|
3298
|
-
manifestTruthByPackagePath: existing.manifestTruthByPackagePath,
|
|
3299
|
-
generationRecord,
|
|
3300
|
-
mode: "initialization",
|
|
3301
|
-
rootNodeDeclaration,
|
|
3302
|
-
});
|
|
3303
|
-
const plan = foundationPlan({
|
|
3304
|
-
definition: options.definition,
|
|
3305
|
-
context,
|
|
3306
|
-
blueprint,
|
|
3307
|
-
foundationContribution: existing.foundationContribution,
|
|
3308
|
-
contributions: [...existing.contributions, contribution],
|
|
3309
|
-
renderContributions: [contribution],
|
|
3310
|
-
manifestTruthByPackagePath: existing.manifestTruthByPackagePath,
|
|
3311
|
-
generationRecord,
|
|
3312
|
-
mode: "addition",
|
|
3313
|
-
rootNodeDeclaration,
|
|
3314
|
-
});
|
|
3315
|
-
let beforeOperations = beforeProjection.operations;
|
|
3316
|
-
let afterOperations = afterProjection.operations;
|
|
3317
|
-
if (options.existingRootRustDeclaration !== undefined) {
|
|
3318
|
-
const preserveOperation = {
|
|
3319
|
-
kind: "writeText",
|
|
3320
|
-
to: rootRustDeclarationFileName,
|
|
3321
|
-
text: options.existingRootRustDeclaration,
|
|
3322
|
-
};
|
|
3323
|
-
beforeOperations = [...beforeProjection.operations, preserveOperation];
|
|
3324
|
-
afterOperations = afterProjection.operations.map((operation) => operation.kind === "writeTextTemplate" &&
|
|
3325
|
-
"to" in operation &&
|
|
3326
|
-
operation.to === rootRustDeclarationFileName
|
|
3327
|
-
? preserveOperation
|
|
3328
|
-
: operation);
|
|
3329
|
-
}
|
|
3330
|
-
return {
|
|
3331
|
-
...plan,
|
|
3332
|
-
projectProjections: {
|
|
3333
|
-
before: {
|
|
3334
|
-
operations: beforeOperations,
|
|
3335
|
-
reconciliation: beforeProjection.reconciliation,
|
|
3336
|
-
},
|
|
3337
|
-
after: {
|
|
3338
|
-
operations: afterOperations,
|
|
3339
|
-
reconciliation: afterProjection.reconciliation,
|
|
3340
|
-
},
|
|
3341
|
-
preconditions: [
|
|
3342
|
-
{
|
|
3343
|
-
path: contribution.definition.path,
|
|
3344
|
-
kind: "must-not-exist",
|
|
3345
|
-
reason: `Package Path ${contribution.definition.path} already exists and cannot be used for a new Package Addition`,
|
|
3346
|
-
},
|
|
3347
|
-
],
|
|
3348
|
-
},
|
|
3349
|
-
};
|
|
3350
|
-
}
|
|
3351
|
-
export function planGeneratedRepositoryPackageAddition(options) {
|
|
3352
|
-
const { context } = options.localTemplateMetadata;
|
|
3353
|
-
if (options.definition.planPackageAddition === undefined) {
|
|
3354
|
-
throw new Error(`Built-in Preset ${options.definition.metadata.name} does not support Package Addition`);
|
|
3355
|
-
}
|
|
3356
|
-
const packagePath = options.packagePath ??
|
|
3357
|
-
options.definition.defaultPackagePath?.({
|
|
3358
|
-
context,
|
|
3359
|
-
packageLeafName: options.packageLeafName,
|
|
3360
|
-
});
|
|
3361
|
-
if (packagePath === undefined) {
|
|
3362
|
-
throw new Error(`Built-in Preset ${options.definition.metadata.name} must own a default Package Path or receive an explicit Package Path`);
|
|
3363
|
-
}
|
|
3364
|
-
const contribution = options.definition.planPackageAddition({
|
|
3365
|
-
context,
|
|
3366
|
-
packageLeafName: options.packageLeafName,
|
|
3367
|
-
packagePath,
|
|
3368
|
-
});
|
|
3369
|
-
return planGeneratedRepositoryPackageAdditionFromPreparedContribution({
|
|
3370
|
-
...options,
|
|
3371
|
-
packagePath,
|
|
3372
|
-
contribution,
|
|
3373
|
-
});
|
|
3374
|
-
}
|
|
3375
|
-
function collectPackageAdditionInput(options) {
|
|
3376
|
-
const issues = [];
|
|
3377
|
-
const definition = builtInPresetRegistry
|
|
3378
|
-
.all()
|
|
3379
|
-
.find((candidate) => candidate.metadata.name === options.preset);
|
|
3380
|
-
if (definition === undefined)
|
|
3381
|
-
issues.push({ code: "PRESET_UNKNOWN" });
|
|
3382
|
-
else if (definition.planPackageAddition === undefined)
|
|
3383
|
-
issues.push({ code: "PRESET_NOT_ADDABLE" });
|
|
3384
|
-
if (!isValidNewNpmPackageName(`@x/${options.packageLeafName}`)) {
|
|
3385
|
-
issues.push({ code: "INVALID_PACKAGE_NAME" });
|
|
3386
|
-
}
|
|
3387
|
-
if (options.packagePath !== undefined) {
|
|
3388
|
-
const validation = validateNewPackagePath(options.packagePath);
|
|
3389
|
-
if (!validation.hasValidShape)
|
|
3390
|
-
issues.push({ code: "INVALID_PACKAGE_PATH" });
|
|
3391
|
-
if (validation.reservedWorkspaceCollection !== undefined) {
|
|
3392
|
-
issues.push({ code: "RESERVED_PACKAGE_PATH" });
|
|
3393
|
-
}
|
|
3394
|
-
}
|
|
3395
|
-
const linkFrom = [...new Set(options.linkFrom ?? [])];
|
|
3396
|
-
for (const consumerPackagePath of linkFrom) {
|
|
3397
|
-
const validation = validateNewPackagePath(consumerPackagePath);
|
|
3398
|
-
if (!validation.hasValidShape) {
|
|
3399
|
-
issues.push({ code: "INVALID_LINK_FROM" });
|
|
3400
|
-
}
|
|
3401
|
-
if (validation.reservedWorkspaceCollection !== undefined)
|
|
3402
|
-
issues.push({ code: "RESERVED_LINK_FROM" });
|
|
3403
|
-
}
|
|
3404
|
-
if (issues.length > 0 || definition === undefined) {
|
|
3405
|
-
return { status: "input-invalid", issues };
|
|
3406
|
-
}
|
|
3407
|
-
return { status: "valid", definition, linkFrom };
|
|
3408
|
-
}
|
|
3409
|
-
/** 在读取仓库元数据前校验新增包调用参数,供 CLI 输入契约复用。 */
|
|
3410
|
-
export function validateGeneratedRepositoryPackageAdditionInput(options) {
|
|
3411
|
-
const result = collectPackageAdditionInput(options);
|
|
3412
|
-
return result.status === "input-invalid" ? result : { status: "valid" };
|
|
3413
|
-
}
|
|
3414
|
-
/**
|
|
3415
|
-
* Command-owned preparation: user input is checked before local metadata or any
|
|
3416
|
-
* Preset default/planner work; all remaining failures are deliberately bounded.
|
|
3417
|
-
*/
|
|
3418
|
-
export function prepareGeneratedRepositoryPackageAddition(options) {
|
|
3419
|
-
const input = collectPackageAdditionInput(options);
|
|
3420
|
-
if (input.status === "input-invalid")
|
|
3421
|
-
return input;
|
|
3422
|
-
let localTemplateMetadata;
|
|
3423
|
-
try {
|
|
3424
|
-
localTemplateMetadata = loadLocalTemplateMetadata(options.repositoryRoot);
|
|
3425
|
-
}
|
|
3426
|
-
catch (error) {
|
|
3427
|
-
if (error instanceof PackageAdditionTargetDeclarationFailure) {
|
|
3428
|
-
return {
|
|
3429
|
-
status: "operation-failure",
|
|
3430
|
-
phase: "metadata",
|
|
3431
|
-
diagnostic: { message: error.message, suggestion: error.suggestion },
|
|
3432
|
-
};
|
|
3433
|
-
}
|
|
3434
|
-
return { status: "operation-failure", phase: "metadata" };
|
|
3435
|
-
}
|
|
3436
|
-
if (input.linkFrom.some((consumerPackagePath) => !localTemplateMetadata.blueprint.packages.some((candidate) => candidate.path === consumerPackagePath))) {
|
|
3437
|
-
return {
|
|
3438
|
-
status: "input-invalid",
|
|
3439
|
-
issues: [{ code: "UNKNOWN_LINK_FROM" }],
|
|
3440
|
-
};
|
|
3441
|
-
}
|
|
3442
|
-
let packagePath = options.packagePath;
|
|
3443
|
-
if (packagePath === undefined) {
|
|
3444
|
-
try {
|
|
3445
|
-
packagePath = input.definition.defaultPackagePath?.({
|
|
3446
|
-
context: localTemplateMetadata.context,
|
|
3447
|
-
packageLeafName: options.packageLeafName,
|
|
3448
|
-
});
|
|
3449
|
-
}
|
|
3450
|
-
catch {
|
|
3451
|
-
return { status: "operation-failure", phase: "default" };
|
|
3452
|
-
}
|
|
3453
|
-
const defaultPathValidation = packagePath === undefined
|
|
3454
|
-
? undefined
|
|
3455
|
-
: validateNewPackagePath(packagePath);
|
|
3456
|
-
if (defaultPathValidation === undefined ||
|
|
3457
|
-
!defaultPathValidation.hasValidShape ||
|
|
3458
|
-
defaultPathValidation.reservedWorkspaceCollection !== undefined) {
|
|
3459
|
-
return { status: "operation-failure", phase: "default" };
|
|
3460
|
-
}
|
|
3461
|
-
}
|
|
3462
|
-
if (packagePath === undefined) {
|
|
3463
|
-
return { status: "operation-failure", phase: "default" };
|
|
3464
|
-
}
|
|
3465
|
-
let provider;
|
|
3466
|
-
try {
|
|
3467
|
-
provider = input.definition.planPackageAddition({
|
|
3468
|
-
context: localTemplateMetadata.context,
|
|
3469
|
-
packageLeafName: options.packageLeafName,
|
|
3470
|
-
packagePath,
|
|
3471
|
-
});
|
|
3472
|
-
}
|
|
3473
|
-
catch {
|
|
3474
|
-
return { status: "operation-failure", phase: "planning" };
|
|
3475
|
-
}
|
|
3476
|
-
// 首次引入 Rust 的加包按目标事实二选一:已有合法根声明由该声明拥有版本并原正文保留;
|
|
3477
|
-
// 没有根声明才以当前 CLI 已验证快照建源。已有 Rust 能力的仓库在 loadLocalTemplateMetadata
|
|
3478
|
-
// 已由根 channel 重放(缺真源在那里失败),不进入这条路径;不可解释的声明在此可行动失败,
|
|
3479
|
-
// 不用快照掩盖。非 Rust 加包不读无关根文件。
|
|
3480
|
-
let additionMetadata = localTemplateMetadata;
|
|
3481
|
-
let preservedRootRustDeclaration;
|
|
3482
|
-
if (provider.foundation.toolchains.rust !== undefined &&
|
|
3483
|
-
localTemplateMetadata.context.toolchain.rustVersion === undefined) {
|
|
3484
|
-
const repositoryRoot = localTemplateMetadata.context.targetDir;
|
|
3485
|
-
const rootDeclarationPath = path.join(repositoryRoot, rootRustDeclarationFileName);
|
|
3486
|
-
const existingDeclaration = existsSync(rootDeclarationPath)
|
|
3487
|
-
? readFileSync(rootDeclarationPath, "utf8")
|
|
3488
|
-
: undefined;
|
|
3489
|
-
let rustVersion;
|
|
3490
|
-
try {
|
|
3491
|
-
if (existingDeclaration === undefined) {
|
|
3492
|
-
rustVersion = releaseToolchainSnapshot.rustVersion;
|
|
3493
|
-
}
|
|
3494
|
-
else {
|
|
3495
|
-
rustVersion = readPackageAdditionTargetRustChannel(repositoryRoot);
|
|
3496
|
-
preservedRootRustDeclaration = existingDeclaration;
|
|
3497
|
-
}
|
|
3498
|
-
}
|
|
3499
|
-
catch (error) {
|
|
3500
|
-
if (error instanceof PackageAdditionTargetDeclarationFailure) {
|
|
3501
|
-
return {
|
|
3502
|
-
status: "operation-failure",
|
|
3503
|
-
phase: "metadata",
|
|
3504
|
-
diagnostic: { message: error.message, suggestion: error.suggestion },
|
|
3505
|
-
};
|
|
3506
|
-
}
|
|
3507
|
-
return { status: "operation-failure", phase: "metadata" };
|
|
3508
|
-
}
|
|
3509
|
-
additionMetadata = {
|
|
3510
|
-
...localTemplateMetadata,
|
|
3511
|
-
context: {
|
|
3512
|
-
...localTemplateMetadata.context,
|
|
3513
|
-
toolchain: {
|
|
3514
|
-
...localTemplateMetadata.context.toolchain,
|
|
3515
|
-
rustVersion,
|
|
3516
|
-
},
|
|
3517
|
-
},
|
|
3518
|
-
};
|
|
3519
|
-
try {
|
|
3520
|
-
provider = input.definition.planPackageAddition({
|
|
3521
|
-
context: additionMetadata.context,
|
|
3522
|
-
packageLeafName: options.packageLeafName,
|
|
3523
|
-
packagePath,
|
|
3524
|
-
});
|
|
3525
|
-
}
|
|
3526
|
-
catch {
|
|
3527
|
-
return { status: "operation-failure", phase: "planning" };
|
|
3528
|
-
}
|
|
3529
|
-
}
|
|
3530
|
-
const contributionsByPath = new Map(localTemplateMetadata[localTemplateMetadataStateKey].packageContributions.map((contribution) => [
|
|
3531
|
-
contribution.definition.path,
|
|
3532
|
-
contribution,
|
|
3533
|
-
]));
|
|
3534
|
-
if (input.linkFrom.length > 0 &&
|
|
3535
|
-
(!canProvideSourceConditionPackageNameImport(provider) ||
|
|
3536
|
-
input.linkFrom.some((consumerPackagePath) => {
|
|
3537
|
-
const consumer = contributionsByPath.get(consumerPackagePath);
|
|
3538
|
-
return (consumer === undefined ||
|
|
3539
|
-
!canConsumeNodePackageNameImport(consumer) ||
|
|
3540
|
-
!canLinkNodePackageRoles(consumer.definition.role, provider.definition.role));
|
|
3541
|
-
}))) {
|
|
3542
|
-
return { status: "input-invalid", issues: [{ code: "UNSUPPORTED_LINK" }] };
|
|
3543
|
-
}
|
|
3544
|
-
try {
|
|
3545
|
-
return {
|
|
3546
|
-
status: "ready",
|
|
3547
|
-
definition: input.definition,
|
|
3548
|
-
plan: planGeneratedRepositoryPackageAdditionFromPreparedContribution({
|
|
3549
|
-
definition: input.definition,
|
|
3550
|
-
localTemplateMetadata: additionMetadata,
|
|
3551
|
-
packageLeafName: options.packageLeafName,
|
|
3552
|
-
packagePath,
|
|
3553
|
-
contribution: provider,
|
|
3554
|
-
...(input.linkFrom.length === 0 ? {} : { linkFrom: input.linkFrom }),
|
|
3555
|
-
...(preservedRootRustDeclaration === undefined
|
|
3556
|
-
? {}
|
|
3557
|
-
: { existingRootRustDeclaration: preservedRootRustDeclaration }),
|
|
3558
|
-
}),
|
|
3559
|
-
};
|
|
3560
|
-
}
|
|
3561
|
-
catch (error) {
|
|
3562
|
-
if (error instanceof PackageAdditionBusinessConflict) {
|
|
3563
|
-
return { status: "conflict", conflict: error };
|
|
3564
|
-
}
|
|
3565
|
-
return { status: "operation-failure", phase: "planning" };
|
|
3566
|
-
}
|
|
3567
|
-
}
|