@ykdz/template 0.0.23 → 0.0.24
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/cli.js +4 -575
- package/dist/main.d.ts +1 -0
- package/dist/main.js +370 -0
- package/node_modules/@typescript/old/LICENSE.txt +55 -0
- package/node_modules/@typescript/old/README.md +50 -0
- package/node_modules/@typescript/old/SECURITY.md +39 -0
- package/node_modules/@typescript/old/ThirdPartyNoticeText.txt +193 -0
- package/node_modules/@typescript/old/bin/tsc +2 -0
- package/node_modules/@typescript/old/bin/tsserver +2 -0
- package/node_modules/@typescript/old/lib/_tsc.js +134465 -0
- package/node_modules/@typescript/old/lib/_tsserver.js +659 -0
- package/node_modules/@typescript/old/lib/_typingsInstaller.js +222 -0
- package/node_modules/@typescript/old/lib/cs/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/de/diagnosticMessages.generated.json +2125 -0
- package/node_modules/@typescript/old/lib/es/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/fr/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/it/diagnosticMessages.generated.json +2125 -0
- package/node_modules/@typescript/old/lib/ja/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/ko/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/lib.d.ts +20 -0
- package/node_modules/@typescript/old/lib/lib.decorators.d.ts +382 -0
- package/node_modules/@typescript/old/lib/lib.decorators.legacy.d.ts +20 -0
- package/node_modules/@typescript/old/lib/lib.dom.asynciterable.d.ts +18 -0
- package/node_modules/@typescript/old/lib/lib.dom.d.ts +45125 -0
- package/node_modules/@typescript/old/lib/lib.dom.iterable.d.ts +18 -0
- package/node_modules/@typescript/old/lib/lib.es2015.collection.d.ts +150 -0
- package/node_modules/@typescript/old/lib/lib.es2015.core.d.ts +595 -0
- package/node_modules/@typescript/old/lib/lib.es2015.d.ts +26 -0
- package/node_modules/@typescript/old/lib/lib.es2015.generator.d.ts +75 -0
- package/node_modules/@typescript/old/lib/lib.es2015.iterable.d.ts +603 -0
- package/node_modules/@typescript/old/lib/lib.es2015.promise.d.ts +79 -0
- package/node_modules/@typescript/old/lib/lib.es2015.proxy.d.ts +126 -0
- package/node_modules/@typescript/old/lib/lib.es2015.reflect.d.ts +142 -0
- package/node_modules/@typescript/old/lib/lib.es2015.symbol.d.ts +44 -0
- package/node_modules/@typescript/old/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
- package/node_modules/@typescript/old/lib/lib.es2016.array.include.d.ts +114 -0
- package/node_modules/@typescript/old/lib/lib.es2016.d.ts +19 -0
- package/node_modules/@typescript/old/lib/lib.es2016.full.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.es2016.intl.d.ts +29 -0
- package/node_modules/@typescript/old/lib/lib.es2017.arraybuffer.d.ts +19 -0
- package/node_modules/@typescript/old/lib/lib.es2017.d.ts +24 -0
- package/node_modules/@typescript/old/lib/lib.es2017.date.d.ts +29 -0
- package/node_modules/@typescript/old/lib/lib.es2017.full.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.es2017.intl.d.ts +42 -0
- package/node_modules/@typescript/old/lib/lib.es2017.object.d.ts +47 -0
- package/node_modules/@typescript/old/lib/lib.es2017.sharedmemory.d.ts +133 -0
- package/node_modules/@typescript/old/lib/lib.es2017.string.d.ts +43 -0
- package/node_modules/@typescript/old/lib/lib.es2017.typedarrays.d.ts +51 -0
- package/node_modules/@typescript/old/lib/lib.es2018.asyncgenerator.d.ts +75 -0
- package/node_modules/@typescript/old/lib/lib.es2018.asynciterable.d.ts +51 -0
- package/node_modules/@typescript/old/lib/lib.es2018.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2018.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2018.intl.d.ts +81 -0
- package/node_modules/@typescript/old/lib/lib.es2018.promise.d.ts +28 -0
- package/node_modules/@typescript/old/lib/lib.es2018.regexp.d.ts +35 -0
- package/node_modules/@typescript/old/lib/lib.es2019.array.d.ts +77 -0
- package/node_modules/@typescript/old/lib/lib.es2019.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2019.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2019.intl.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.es2019.object.d.ts +31 -0
- package/node_modules/@typescript/old/lib/lib.es2019.string.d.ts +35 -0
- package/node_modules/@typescript/old/lib/lib.es2019.symbol.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2020.bigint.d.ts +763 -0
- package/node_modules/@typescript/old/lib/lib.es2020.d.ts +25 -0
- package/node_modules/@typescript/old/lib/lib.es2020.date.d.ts +40 -0
- package/node_modules/@typescript/old/lib/lib.es2020.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2020.intl.d.ts +472 -0
- package/node_modules/@typescript/old/lib/lib.es2020.number.d.ts +26 -0
- package/node_modules/@typescript/old/lib/lib.es2020.promise.d.ts +45 -0
- package/node_modules/@typescript/old/lib/lib.es2020.sharedmemory.d.ts +97 -0
- package/node_modules/@typescript/old/lib/lib.es2020.string.d.ts +42 -0
- package/node_modules/@typescript/old/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
- package/node_modules/@typescript/old/lib/lib.es2021.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.es2021.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2021.intl.d.ts +164 -0
- package/node_modules/@typescript/old/lib/lib.es2021.promise.d.ts +46 -0
- package/node_modules/@typescript/old/lib/lib.es2021.string.d.ts +31 -0
- package/node_modules/@typescript/old/lib/lib.es2021.weakref.d.ts +76 -0
- package/node_modules/@typescript/old/lib/lib.es2022.array.d.ts +119 -0
- package/node_modules/@typescript/old/lib/lib.es2022.d.ts +23 -0
- package/node_modules/@typescript/old/lib/lib.es2022.error.d.ts +73 -0
- package/node_modules/@typescript/old/lib/lib.es2022.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2022.intl.d.ts +143 -0
- package/node_modules/@typescript/old/lib/lib.es2022.object.d.ts +24 -0
- package/node_modules/@typescript/old/lib/lib.es2022.regexp.d.ts +37 -0
- package/node_modules/@typescript/old/lib/lib.es2022.string.d.ts +23 -0
- package/node_modules/@typescript/old/lib/lib.es2023.array.d.ts +922 -0
- package/node_modules/@typescript/old/lib/lib.es2023.collection.d.ts +19 -0
- package/node_modules/@typescript/old/lib/lib.es2023.d.ts +20 -0
- package/node_modules/@typescript/old/lib/lib.es2023.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2023.intl.d.ts +62 -0
- package/node_modules/@typescript/old/lib/lib.es2024.arraybuffer.d.ts +63 -0
- package/node_modules/@typescript/old/lib/lib.es2024.collection.d.ts +27 -0
- package/node_modules/@typescript/old/lib/lib.es2024.d.ts +24 -0
- package/node_modules/@typescript/old/lib/lib.es2024.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2024.object.d.ts +27 -0
- package/node_modules/@typescript/old/lib/lib.es2024.promise.d.ts +33 -0
- package/node_modules/@typescript/old/lib/lib.es2024.regexp.d.ts +23 -0
- package/node_modules/@typescript/old/lib/lib.es2024.sharedmemory.d.ts +66 -0
- package/node_modules/@typescript/old/lib/lib.es2024.string.d.ts +27 -0
- package/node_modules/@typescript/old/lib/lib.es2025.collection.d.ts +94 -0
- package/node_modules/@typescript/old/lib/lib.es2025.d.ts +23 -0
- package/node_modules/@typescript/old/lib/lib.es2025.float16.d.ts +443 -0
- package/node_modules/@typescript/old/lib/lib.es2025.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.es2025.intl.d.ts +200 -0
- package/node_modules/@typescript/old/lib/lib.es2025.iterator.d.ts +146 -0
- package/node_modules/@typescript/old/lib/lib.es2025.promise.d.ts +32 -0
- package/node_modules/@typescript/old/lib/lib.es2025.regexp.d.ts +30 -0
- package/node_modules/@typescript/old/lib/lib.es5.d.ts +4599 -0
- package/node_modules/@typescript/old/lib/lib.es6.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.esnext.array.d.ts +33 -0
- package/node_modules/@typescript/old/lib/lib.esnext.collection.d.ts +47 -0
- package/node_modules/@typescript/old/lib/lib.esnext.d.ts +27 -0
- package/node_modules/@typescript/old/lib/lib.esnext.date.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.esnext.decorators.d.ts +26 -0
- package/node_modules/@typescript/old/lib/lib.esnext.disposable.d.ts +191 -0
- package/node_modules/@typescript/old/lib/lib.esnext.error.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.esnext.full.d.ts +22 -0
- package/node_modules/@typescript/old/lib/lib.esnext.intl.d.ts +107 -0
- package/node_modules/@typescript/old/lib/lib.esnext.sharedmemory.d.ts +23 -0
- package/node_modules/@typescript/old/lib/lib.esnext.temporal.d.ts +485 -0
- package/node_modules/@typescript/old/lib/lib.esnext.typedarrays.d.ts +90 -0
- package/node_modules/@typescript/old/lib/lib.scripthost.d.ts +320 -0
- package/node_modules/@typescript/old/lib/lib.webworker.asynciterable.d.ts +18 -0
- package/node_modules/@typescript/old/lib/lib.webworker.d.ts +15606 -0
- package/node_modules/@typescript/old/lib/lib.webworker.importscripts.d.ts +21 -0
- package/node_modules/@typescript/old/lib/lib.webworker.iterable.d.ts +18 -0
- package/node_modules/@typescript/old/lib/pl/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/pt-br/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/ru/diagnosticMessages.generated.json +2125 -0
- package/node_modules/@typescript/old/lib/tr/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/tsc.js +8 -0
- package/node_modules/@typescript/old/lib/tsserver.js +8 -0
- package/node_modules/@typescript/old/lib/tsserverlibrary.d.ts +17 -0
- package/node_modules/@typescript/old/lib/tsserverlibrary.js +21 -0
- package/node_modules/@typescript/old/lib/typesMap.json +497 -0
- package/node_modules/@typescript/old/lib/typescript.d.ts +11448 -0
- package/node_modules/@typescript/old/lib/typescript.js +201039 -0
- package/node_modules/@typescript/old/lib/typingsInstaller.js +8 -0
- package/node_modules/@typescript/old/lib/watchGuard.js +53 -0
- package/node_modules/@typescript/old/lib/zh-cn/diagnosticMessages.generated.json +2129 -0
- package/node_modules/@typescript/old/lib/zh-tw/diagnosticMessages.generated.json +2125 -0
- package/node_modules/@typescript/old/package.json +118 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.d.ts +85 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.js +797 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/index.d.ts +3 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/index.js +2 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/rust-bin/definition.d.ts +2 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/rust-bin/definition.js +134 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.d.ts +36 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.js +106 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/template-sources.d.ts +14 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/template-sources.js +26 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-lib/definition.d.ts +2 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-lib/definition.js +138 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vike-app/definition.d.ts +2 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vike-app/definition.js +408 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-app/definition.d.ts +2 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-app/definition.js +94 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-hono-app/definition.d.ts +2 -0
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-hono-app/definition.js +179 -0
- package/node_modules/@ykdz/template-builtin-presets/package.json +67 -0
- package/node_modules/@ykdz/{template-builtin-source/templates/vue-app/.github/dependabot.yml → template-builtin-presets/templates/foundation/.github/dependabot-rust.yml} +13 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/dependabot.dynamic.template +4 -0
- package/node_modules/@ykdz/{template-builtin-source/templates/ts-lib → template-builtin-presets/templates/foundation}/.github/dependabot.yml +5 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check.dynamic.template +19 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.pnpmfile.cts +14 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/TODO.md.template +5 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/devcontainer.json +16 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/gitignore +8 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.dynamic.txt +23 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.yaml +29 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/rust/.vscode/extensions.json +3 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/rust/.vscode/settings.json +5 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/rust/devcontainer/devcontainer.json +21 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/tsconfig.json +4 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo.json +18 -0
- package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/rust-bin/.github/dependabot.yml +5 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/.github/workflows/check.yml +23 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/.vscode/extensions.json +3 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/.vscode/settings.json +5 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/Cargo.lock +16 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/Cargo.toml +27 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/devcontainer/devcontainer.json +21 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/devcontainer/rust.Dockerfile +16 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/rust-toolchain.toml +3 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/devcontainer/node-pnpm.Dockerfile +12 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/devcontainer/shellcheck.Dockerfile +3 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/editor-customization/capabilities.json +38 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/oxc/node/oxlint.config.ts +6 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/oxc/oxfmt.config.ts +3 -0
- package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/shared/oxc/tsconfig.config.json +2 -2
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.app.json +25 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.json +8 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.node.json +30 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.test.json +9 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/typescript/run-vue-tsc.ts +12 -0
- package/node_modules/@ykdz/{template-builtin-source/templates/vue-hono-app → template-builtin-presets/templates/ts-lib}/.github/dependabot.yml +5 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/.github/workflows/check.yml +19 -0
- package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/ts-lib/src/index.ts +1 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/tsconfig.json +13 -0
- package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/src/readiness.ts +2 -2
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/src/types.d.ts +1 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/tsconfig.json +26 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/drizzle.config.ts +17 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/scripts/prepare-database.ts +45 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/tsconfig.json +22 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/turbo.json +10 -0
- package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/Dockerfile +21 -30
- package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/pages/index/+Page.telefunc.ts +0 -2
- package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/pages/index/+Page.vue +2 -1
- package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/playwright.config.ts +1 -1
- package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/scripts/check-standalone-deployment.ts +83 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/scripts/container-entrypoint.sh +33 -0
- package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/test/e2e/app.spec.ts +3 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.app.json +34 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.json +9 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.node.json +31 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.test.json +11 -0
- package/node_modules/@ykdz/{template-builtin-source/templates/vue-app → template-builtin-presets/templates/vike-app/web}/turbo.json +1 -0
- package/node_modules/@ykdz/{template-builtin-source/templates/vike-app → template-builtin-presets/templates/vue-app}/.github/dependabot.yml +5 -4
- package/node_modules/@ykdz/{template-builtin-source/templates/vue-hono-app/web → template-builtin-presets/templates/vue-app}/turbo.json +2 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-app/typescript/tsconfig.json +8 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/src/index.ts +3 -0
- package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/api/src/server.ts +1 -1
- package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/api/test/app.test.ts +1 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/tsconfig.build.json +9 -0
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/tsconfig.json +25 -0
- package/node_modules/@ykdz/template-core/dist/Cargo.toml +1 -1
- package/node_modules/@ykdz/template-core/dist/dependency-catalog.d.ts +9 -0
- package/node_modules/@ykdz/template-core/dist/dependency-catalog.js +54 -12
- package/node_modules/@ykdz/template-core/dist/devcontainer.d.ts +11 -3
- package/node_modules/@ykdz/template-core/dist/devcontainer.js +17 -3
- package/node_modules/@ykdz/template-core/dist/editor-customization.d.ts +5 -9
- package/node_modules/@ykdz/template-core/dist/editor-customization.js +8 -46
- package/node_modules/@ykdz/template-core/dist/module-graph.d.ts +31 -2
- package/node_modules/@ykdz/template-core/dist/module-graph.js +40 -0
- package/node_modules/@ykdz/template-core/dist/package-contribution.d.ts +43 -0
- package/node_modules/@ykdz/template-core/dist/package-contribution.js +24 -0
- package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +24 -8
- package/node_modules/@ykdz/template-core/dist/preset-definition.d.ts +42 -0
- package/node_modules/@ykdz/template-core/dist/preset-definition.js +1 -0
- package/node_modules/@ykdz/template-core/dist/project-blueprint-v2.d.ts +33 -0
- package/node_modules/@ykdz/template-core/dist/project-blueprint-v2.js +161 -0
- package/node_modules/@ykdz/template-core/dist/project-github.d.ts +8 -1
- package/node_modules/@ykdz/template-core/dist/project-github.js +86 -8
- package/node_modules/@ykdz/template-core/dist/project-linking-v2.d.ts +20 -0
- package/node_modules/@ykdz/template-core/dist/project-linking-v2.js +37 -0
- package/node_modules/@ykdz/template-core/dist/renderer.d.ts +40 -5
- package/node_modules/@ykdz/template-core/dist/renderer.js +115 -30
- package/node_modules/@ykdz/template-core/dist/template-boundary-check.d.ts +21 -15
- package/node_modules/@ykdz/template-core/dist/template-boundary-check.js +100 -50
- package/node_modules/@ykdz/template-core/dist/toolchain-baseline-update.d.ts +45 -0
- package/node_modules/@ykdz/template-core/dist/toolchain-baseline-update.js +27 -0
- package/node_modules/@ykdz/template-core/dist/toolchain-resolution.d.ts +1 -0
- package/node_modules/@ykdz/template-core/dist/toolchain-resolution.js +50 -52
- package/node_modules/@ykdz/template-core/package.json +10 -8
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +680 -0
- package/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +577 -0
- package/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +93 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +17 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/typescript/LICENSE.txt +55 -0
- package/node_modules/typescript/README.md +9 -0
- package/node_modules/typescript/bin/tsc6 +2 -0
- package/node_modules/typescript/lib/tsc.js +1 -0
- package/node_modules/typescript/lib/tsserverlibrary.d.ts +2 -0
- package/node_modules/typescript/lib/tsserverlibrary.js +1 -0
- package/node_modules/typescript/lib/typescript.d.ts +2 -0
- package/node_modules/typescript/lib/typescript.js +1 -0
- package/node_modules/typescript/package.json +39 -0
- package/node_modules/valibot/LICENSE.md +9 -0
- package/node_modules/valibot/README.md +94 -0
- package/node_modules/valibot/dist/index.cjs +7974 -0
- package/node_modules/valibot/dist/index.d.cts +16184 -0
- package/node_modules/valibot/dist/index.d.mts +16184 -0
- package/node_modules/valibot/dist/index.min.cjs +2 -0
- package/node_modules/valibot/dist/index.min.mjs +2 -0
- package/node_modules/valibot/dist/index.mjs +7663 -0
- package/node_modules/valibot/package.json +79 -0
- package/package.json +18 -12
- package/LICENSE +0 -21
- package/node_modules/@ykdz/template-builtin-source/dist/src/index.d.ts +0 -22
- package/node_modules/@ykdz/template-builtin-source/dist/src/index.js +0 -103
- package/node_modules/@ykdz/template-builtin-source/dist/templates/projection-plans.d.ts +0 -7
- package/node_modules/@ykdz/template-builtin-source/dist/templates/projection-plans.js +0 -98
- package/node_modules/@ykdz/template-builtin-source/dist/templates/registry.d.ts +0 -2
- package/node_modules/@ykdz/template-builtin-source/dist/templates/registry.js +0 -15
- package/node_modules/@ykdz/template-builtin-source/dist/templates/rust-bin/projection.d.ts +0 -9
- package/node_modules/@ykdz/template-builtin-source/dist/templates/rust-bin/projection.js +0 -105
- package/node_modules/@ykdz/template-builtin-source/dist/templates/ts-lib/projection.d.ts +0 -6
- package/node_modules/@ykdz/template-builtin-source/dist/templates/ts-lib/projection.js +0 -197
- package/node_modules/@ykdz/template-builtin-source/dist/templates/vike-app/projection.d.ts +0 -5
- package/node_modules/@ykdz/template-builtin-source/dist/templates/vike-app/projection.js +0 -71
- package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-app/projection.d.ts +0 -6
- package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-app/projection.js +0 -281
- package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-hono-app/projection.d.ts +0 -8
- package/node_modules/@ykdz/template-builtin-source/dist/templates/vue-hono-app/projection.js +0 -154
- package/node_modules/@ykdz/template-builtin-source/package.json +0 -93
- package/node_modules/@ykdz/template-builtin-source/templates/preset-source.json +0 -524
- package/node_modules/@ykdz/template-builtin-source/templates/shared/devcontainer/node-pnpm.Dockerfile +0 -6
- package/node_modules/@ykdz/template-builtin-source/templates/shared/editor-customization/capabilities.json +0 -56
- package/node_modules/@ykdz/template-builtin-source/templates/shared/oxc/node/oxlint.config.ts +0 -34
- package/node_modules/@ykdz/template-builtin-source/templates/shared/oxc/oxfmt.config.ts +0 -8
- package/node_modules/@ykdz/template-builtin-source/templates/shared/oxc/vue/oxlint.config.ts +0 -36
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/.github/workflows/check.yml +0 -22
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/db/drizzle.config.ts +0 -10
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/scripts/container-entrypoint.sh +0 -52
- package/node_modules/@ykdz/template-builtin-source/templates/vike-app/web/scripts/prepare-database.sh +0 -6
- package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/api/src/index.ts +0 -3
- package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/src/main.ts +0 -8
- package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/src/stores/counter.ts +0 -12
- package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/src/style.css +0 -1
- package/node_modules/@ykdz/template-builtin-source/templates/vue-hono-app/web/test/app.test.ts +0 -14
- package/node_modules/@ykdz/template-core/dist/declarations.d.ts +0 -2
- package/node_modules/@ykdz/template-core/dist/declarations.js +0 -1
- package/node_modules/@ykdz/template-core/dist/generated-scenarios.d.ts +0 -76
- package/node_modules/@ykdz/template-core/dist/generated-scenarios.js +0 -658
- package/node_modules/@ykdz/template-core/dist/generation-context.d.ts +0 -23
- package/node_modules/@ykdz/template-core/dist/generation-context.js +0 -20
- package/node_modules/@ykdz/template-core/dist/next-step-instructions.d.ts +0 -30
- package/node_modules/@ykdz/template-core/dist/next-step-instructions.js +0 -181
- package/node_modules/@ykdz/template-core/dist/package-addition-support.d.ts +0 -6
- package/node_modules/@ykdz/template-core/dist/package-addition-support.js +0 -2
- package/node_modules/@ykdz/template-core/dist/package-addition.d.ts +0 -12
- package/node_modules/@ykdz/template-core/dist/package-addition.js +0 -665
- package/node_modules/@ykdz/template-core/dist/package-linking.d.ts +0 -75
- package/node_modules/@ykdz/template-core/dist/package-linking.js +0 -157
- package/node_modules/@ykdz/template-core/dist/preset-projection.d.ts +0 -68
- package/node_modules/@ykdz/template-core/dist/preset-projection.js +0 -8
- package/node_modules/@ykdz/template-core/dist/preset-source.d.ts +0 -14
- package/node_modules/@ykdz/template-core/dist/preset-source.js +0 -294
- package/node_modules/@ykdz/template-core/dist/projection-capabilities.d.ts +0 -31
- package/node_modules/@ykdz/template-core/dist/projection-capabilities.js +0 -2170
- package/node_modules/@ykdz/template-core/dist/runtime-paths.d.ts +0 -1
- package/node_modules/@ykdz/template-core/dist/runtime-paths.js +0 -13
- package/node_modules/@ykdz/template-shared/dist/index.d.ts +0 -645
- package/node_modules/@ykdz/template-shared/dist/index.js +0 -1408
- package/node_modules/@ykdz/template-shared/package.json +0 -37
- /package/node_modules/@ykdz/{template-builtin-source/templates/vue-app/.github/workflows/check.yml → template-builtin-presets/templates/foundation/.github/workflows/check-playwright.yml} +0 -0
- /package/node_modules/@ykdz/{template-builtin-source/templates/rust-bin/.github/workflows/check.yml → template-builtin-presets/templates/foundation/.github/workflows/check-rust.yml} +0 -0
- /package/node_modules/@ykdz/{template-builtin-source/templates/ts-lib → template-builtin-presets/templates/foundation}/.github/workflows/check.yml +0 -0
- /package/node_modules/@ykdz/{template-builtin-source/templates/shared → template-builtin-presets/templates/foundation/rust}/devcontainer/rust.Dockerfile +0 -0
- /package/node_modules/@ykdz/{template-builtin-source/templates/rust-bin → template-builtin-presets/templates/foundation/rust}/rust-toolchain.toml +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/rust-bin/rustfmt.toml +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/rust-bin/src/main.rs +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/rust-bin/turbo.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/shared/devcontainer/browser-test.Dockerfile +0 -0
- /package/node_modules/@ykdz/{template-builtin-source/templates/vue-app → template-builtin-presets/templates/shared/vue}/src/main.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source/templates/vue-app → template-builtin-presets/templates/shared/vue}/src/stores/counter.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source/templates/vue-app → template-builtin-presets/templates/shared/vue}/src/style.css +0 -0
- /package/node_modules/@ykdz/{template-builtin-source/templates/vue-app → template-builtin-presets/templates/shared/vue}/test/app.test.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/ts-lib/src/name-schema.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/ts-lib/turbo.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/scripts/seed-example.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/src/db.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/src/index.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/src/queries/todos.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/src/schema.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/src/seed/example.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/test/todos.test.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/db/turbo.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-source/templates/vike-app/db → template-builtin-presets/templates/vike-app/db-migrations}/drizzle/migrations/20260709120325_old_captain_flint/migration.sql +0 -0
- /package/node_modules/@ykdz/{template-builtin-source/templates/vike-app/db → template-builtin-presets/templates/vike-app/db-migrations}/drizzle/migrations/20260709120325_old_captain_flint/snapshot.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/+server.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/.env.example +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/Dockerfile.dockerignore +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/assets/logo.svg +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/components/CounterButton.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/components/PageShell.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/pages/+Head.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/pages/+Layout.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/pages/+config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/pages/tailwind.css +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/scripts/run-playwright.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/server/api.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/server/app.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/types/env.d.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/types/global.d.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/vite.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vike-app/web/vitest.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source/templates/vue-hono-app → template-builtin-presets/templates/vue-app}/.github/workflows/check.yml +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/env.d.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/index.html +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/playwright.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/scripts/run-playwright.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/src/App.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/test/e2e/app.spec.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/vite.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-app/vitest.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/api/src/runtime.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/api/turbo.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/api/vitest.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/env.d.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/index.html +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/playwright.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/scripts/run-playwright.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/src/App.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/src/api.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/test/e2e/app.spec.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source/templates/vike-app → template-builtin-presets/templates/vue-hono-app}/web/turbo.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/vite.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-source → template-builtin-presets}/templates/vue-hono-app/web/vitest.config.ts +0 -0
|
@@ -0,0 +1,797 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { collectGeneratedManifestCatalogReferences, selectTemplateDependencyCatalogEntries, } from "@ykdz/template-core/dependency-catalog";
|
|
5
|
+
import { browserTestToolLayer } from "@ykdz/template-core/devcontainer";
|
|
6
|
+
import { editorCustomizationForCapabilities, loadEditorCustomizationDeclarations, } from "@ykdz/template-core/editor-customization";
|
|
7
|
+
import { checkComponentTaskName, fixComponentTaskName, playwrightBrowserAssetsEnvironmentNeed, renderTurboRunCommand, rustToolchainEnvironmentNeed, shellCheckEnvironmentNeed, } from "@ykdz/template-core/module-graph";
|
|
8
|
+
import { assertPackageContribution, } from "@ykdz/template-core/package-contribution";
|
|
9
|
+
import { assertProjectBlueprintV2, validateProjectBlueprintV2 as validateCoreProjectBlueprintV2, } from "@ykdz/template-core/project-blueprint-v2";
|
|
10
|
+
import { projectCheckWorkflowTemplateReplacements, projectDependabotTemplateReplacements, } from "@ykdz/template-core/project-github";
|
|
11
|
+
import { planExplicitProjectLinks } from "@ykdz/template-core/project-linking-v2";
|
|
12
|
+
import { resolveTemplateSource, } from "@ykdz/template-core/renderer";
|
|
13
|
+
import { rustBinDefinition } from "./rust-bin/definition.js";
|
|
14
|
+
import { vuePnpmDependencyOverrides } from "./shared/vue.js";
|
|
15
|
+
import { templateSources } from "./template-sources.js";
|
|
16
|
+
import { tsLibDefinition } from "./ts-lib/definition.js";
|
|
17
|
+
import { vikeAppDefinition } from "./vike-app/definition.js";
|
|
18
|
+
import { vueAppDefinition } from "./vue-app/definition.js";
|
|
19
|
+
import { vueHonoAppDefinition } from "./vue-hono-app/definition.js";
|
|
20
|
+
/**
|
|
21
|
+
* The Foundation persists the non-rendering half of every Package
|
|
22
|
+
* Contribution with the Generated Repository. Package Addition cannot infer
|
|
23
|
+
* check, fix, deployment, or maintenance semantics from a package name (or
|
|
24
|
+
* from a lossy subset of scripts), so this is the durable topology it reads.
|
|
25
|
+
*/
|
|
26
|
+
/** Resolve an owned source handle for diagnostics and source checks. */
|
|
27
|
+
export function resolveBuiltInTemplateSource(source, relativePath) {
|
|
28
|
+
return resolveTemplateSource(source, relativePath);
|
|
29
|
+
}
|
|
30
|
+
export function validateProjectBlueprintV2(value) {
|
|
31
|
+
return validateCoreProjectBlueprintV2(value);
|
|
32
|
+
}
|
|
33
|
+
class PresetRegistry {
|
|
34
|
+
#definitions;
|
|
35
|
+
constructor(definitions) {
|
|
36
|
+
const names = definitions.map((definition) => definition.metadata.name);
|
|
37
|
+
if (names.some((name) => name.length === 0) ||
|
|
38
|
+
new Set(names).size !== names.length) {
|
|
39
|
+
throw new Error("Preset Registry requires unique non-empty Definition names");
|
|
40
|
+
}
|
|
41
|
+
this.#definitions = [...definitions].toSorted((left, right) => left.metadata.name.localeCompare(right.metadata.name));
|
|
42
|
+
}
|
|
43
|
+
all() {
|
|
44
|
+
return this.#definitions;
|
|
45
|
+
}
|
|
46
|
+
require(name) {
|
|
47
|
+
const definition = this.#definitions.find((item) => item.metadata.name === name);
|
|
48
|
+
if (!definition)
|
|
49
|
+
throw new Error(`Unknown Built-in Preset: ${name}`);
|
|
50
|
+
return definition;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export const builtInPresetRegistry = new PresetRegistry([
|
|
54
|
+
tsLibDefinition,
|
|
55
|
+
rustBinDefinition,
|
|
56
|
+
vueAppDefinition,
|
|
57
|
+
vueHonoAppDefinition,
|
|
58
|
+
vikeAppDefinition,
|
|
59
|
+
]);
|
|
60
|
+
/** Registry-derived Template Source roots checked independently of render plans. */
|
|
61
|
+
export function builtInPresetTemplateSourceContexts() {
|
|
62
|
+
return [
|
|
63
|
+
...builtInPresetRegistry.all().map((definition) => ({
|
|
64
|
+
name: definition.metadata.name,
|
|
65
|
+
root: resolveBuiltInTemplateSource(definition.source, "."),
|
|
66
|
+
})),
|
|
67
|
+
{
|
|
68
|
+
name: "foundation",
|
|
69
|
+
root: resolveBuiltInTemplateSource(templateSources.foundation, "."),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "shared-devcontainer",
|
|
73
|
+
root: resolveBuiltInTemplateSource(templateSources.sharedDevcontainer, "."),
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "shared-oxc",
|
|
77
|
+
root: resolveBuiltInTemplateSource(templateSources.sharedOxc, "."),
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "shared-vue",
|
|
81
|
+
root: resolveBuiltInTemplateSource(templateSources.vue, "."),
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Derives direct Template Source checks from every registered Definition's
|
|
87
|
+
* actual initial contributions, without maintaining a second Preset catalog.
|
|
88
|
+
*/
|
|
89
|
+
export function builtInPresetTemplateSourceCheckContexts() {
|
|
90
|
+
return builtInPresetRegistry.all().flatMap((definition) => {
|
|
91
|
+
const context = createGenerationContext({
|
|
92
|
+
targetDir: path.join("generated-repository", "template-source", definition.metadata.name),
|
|
93
|
+
toolchain: { nodeLtsMajor: "24", packageManagerPin: "pnpm@11.11.0" },
|
|
94
|
+
});
|
|
95
|
+
const plan = planGeneratedRepositoryInitialization({ definition, context });
|
|
96
|
+
const contributions = definition.planInitializationContributions?.(context) ?? [definition.planInitialization(context)];
|
|
97
|
+
return contributions.map((contribution) => ({
|
|
98
|
+
definition,
|
|
99
|
+
contribution,
|
|
100
|
+
plan,
|
|
101
|
+
}));
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
export function createGenerationContext(options) {
|
|
105
|
+
const projectName = path.basename(path.resolve(options.targetDir));
|
|
106
|
+
return {
|
|
107
|
+
targetDir: options.targetDir,
|
|
108
|
+
projectName,
|
|
109
|
+
scope: options.scope ?? projectName,
|
|
110
|
+
toolchain: options.toolchain,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Package Addition reconstructs generic current facts from the Blueprint
|
|
115
|
+
* topology and each package's real manifest/configuration. A second durable
|
|
116
|
+
* Contribution database would drift from the generated repository.
|
|
117
|
+
*/
|
|
118
|
+
function existingPackageContribution(options) {
|
|
119
|
+
const packageRoot = path.join(options.context.targetDir, options.definition.path);
|
|
120
|
+
const manifestPath = path.join(packageRoot, "package.json");
|
|
121
|
+
if (!existsSync(manifestPath)) {
|
|
122
|
+
throw new Error(`Package Addition requires manifest truth for ${options.definition.path}: package.json is missing`);
|
|
123
|
+
}
|
|
124
|
+
const manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
125
|
+
if (typeof manifest !== "object" ||
|
|
126
|
+
manifest === null ||
|
|
127
|
+
Array.isArray(manifest) ||
|
|
128
|
+
manifest.name !== options.definition.name) {
|
|
129
|
+
throw new Error(`Package Addition requires manifest truth for ${options.definition.path}: expected name ${options.definition.name}`);
|
|
130
|
+
}
|
|
131
|
+
const record = manifest;
|
|
132
|
+
const scripts = typeof record.scripts === "object" && record.scripts !== null
|
|
133
|
+
? record.scripts
|
|
134
|
+
: {};
|
|
135
|
+
const owner = {
|
|
136
|
+
kind: "package-boundary",
|
|
137
|
+
path: options.definition.path,
|
|
138
|
+
};
|
|
139
|
+
const dependencyMaintenance = existingDependencyMaintenancePolicy(options.context.targetDir);
|
|
140
|
+
const rust = existsSync(path.join(packageRoot, "Cargo.toml"));
|
|
141
|
+
const editorRecommendationsPath = path.join(options.context.targetDir, ".vscode/extensions.json");
|
|
142
|
+
const editorRecommendations = existsSync(editorRecommendationsPath)
|
|
143
|
+
? JSON.parse(readFileSync(editorRecommendationsPath, "utf8")).recommendations
|
|
144
|
+
: [];
|
|
145
|
+
const existingExtensions = Array.isArray(editorRecommendations)
|
|
146
|
+
? new Set(editorRecommendations.filter((item) => typeof item === "string"))
|
|
147
|
+
: new Set();
|
|
148
|
+
const editorCapabilities = rust
|
|
149
|
+
? ["rust-tooling"]
|
|
150
|
+
: [
|
|
151
|
+
"oxc-format-lint",
|
|
152
|
+
...(existingExtensions.has("Vue.volar") ? ["vue"] : []),
|
|
153
|
+
...(existingExtensions.has("bradlc.vscode-tailwindcss")
|
|
154
|
+
? ["tailwind"]
|
|
155
|
+
: []),
|
|
156
|
+
...(existingExtensions.has("vitest.explorer")
|
|
157
|
+
? ["vitest"]
|
|
158
|
+
: []),
|
|
159
|
+
];
|
|
160
|
+
const checks = rust
|
|
161
|
+
? [
|
|
162
|
+
{ kind: "rustfmt-check", owner },
|
|
163
|
+
{ kind: "cargo-clippy", owner },
|
|
164
|
+
{ kind: "cargo-test", owner },
|
|
165
|
+
]
|
|
166
|
+
: [
|
|
167
|
+
...(scripts["typecheck:run"] === undefined
|
|
168
|
+
? []
|
|
169
|
+
: [{ kind: "typescript-typecheck", owner }]),
|
|
170
|
+
...(scripts["lint:run"] === undefined
|
|
171
|
+
? []
|
|
172
|
+
: [{ kind: "oxc-lint", owner }]),
|
|
173
|
+
...(scripts["format:check:run"] === undefined
|
|
174
|
+
? []
|
|
175
|
+
: [{ kind: "oxc-format-check", owner }]),
|
|
176
|
+
...(scripts["build:run"] === undefined
|
|
177
|
+
? []
|
|
178
|
+
: [{ kind: "build", owner }]),
|
|
179
|
+
...(scripts["test:run"] === undefined
|
|
180
|
+
? []
|
|
181
|
+
: [{ kind: "unit-test", owner }]),
|
|
182
|
+
...(scripts["test:e2e:run"] === undefined
|
|
183
|
+
? []
|
|
184
|
+
: [{ kind: "e2e-test", owner }]),
|
|
185
|
+
];
|
|
186
|
+
return {
|
|
187
|
+
definition: options.definition,
|
|
188
|
+
manifest: record,
|
|
189
|
+
exposure: {
|
|
190
|
+
exports: typeof record.exports === "object" && record.exports !== null
|
|
191
|
+
? record.exports
|
|
192
|
+
: {},
|
|
193
|
+
imports: typeof record.imports === "object" && record.imports !== null
|
|
194
|
+
? record.imports
|
|
195
|
+
: {},
|
|
196
|
+
},
|
|
197
|
+
operations: [],
|
|
198
|
+
checks,
|
|
199
|
+
fixes: rust
|
|
200
|
+
? [{ kind: "rustfmt-write", owner }]
|
|
201
|
+
: [
|
|
202
|
+
...(scripts["format:write:run"] === undefined
|
|
203
|
+
? []
|
|
204
|
+
: [{ kind: "oxc-format-write", owner }]),
|
|
205
|
+
...(scripts["lint:fix:run"] === undefined
|
|
206
|
+
? []
|
|
207
|
+
: [{ kind: "oxc-lint-fix", owner }]),
|
|
208
|
+
],
|
|
209
|
+
environmentNeeds: [
|
|
210
|
+
...(rust ? [rustToolchainEnvironmentNeed(owner)] : []),
|
|
211
|
+
...(scripts["test:e2e:run"] === undefined
|
|
212
|
+
? []
|
|
213
|
+
: [
|
|
214
|
+
playwrightBrowserAssetsEnvironmentNeed({
|
|
215
|
+
browser: "chromium",
|
|
216
|
+
owner,
|
|
217
|
+
}),
|
|
218
|
+
]),
|
|
219
|
+
...(Object.values(scripts).some((script) => typeof script === "string" && script.includes("shellcheck"))
|
|
220
|
+
? [shellCheckEnvironmentNeed(owner)]
|
|
221
|
+
: []),
|
|
222
|
+
],
|
|
223
|
+
...(scripts["check:deployment"] === undefined
|
|
224
|
+
? {}
|
|
225
|
+
: { deploymentChecks: [{ kind: "deployment-image", owner }] }),
|
|
226
|
+
foundation: {
|
|
227
|
+
toolchains: rust
|
|
228
|
+
? { rust: { toolchain: "stable", components: ["rustfmt", "clippy"] } }
|
|
229
|
+
: {},
|
|
230
|
+
editorCapabilities,
|
|
231
|
+
dependencyMaintenance: {
|
|
232
|
+
...dependencyMaintenance,
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Dependabot is the Foundation-owned durable declaration of maintenance
|
|
239
|
+
* coverage. Package Addition reads it back so rebuilding root policy cannot
|
|
240
|
+
* silently discard a base repository's non-default directories.
|
|
241
|
+
*/
|
|
242
|
+
function existingDependencyMaintenancePolicy(targetDir) {
|
|
243
|
+
const dependabotPath = path.join(targetDir, ".github/dependabot.yml");
|
|
244
|
+
if (!existsSync(dependabotPath)) {
|
|
245
|
+
throw new Error("Package Addition requires maintenance truth: .github/dependabot.yml is missing");
|
|
246
|
+
}
|
|
247
|
+
const ecosystems = [];
|
|
248
|
+
const directories = {};
|
|
249
|
+
const extraDirectories = {};
|
|
250
|
+
const supportedEcosystems = new Set([
|
|
251
|
+
"npm",
|
|
252
|
+
"cargo",
|
|
253
|
+
"github-actions",
|
|
254
|
+
"docker",
|
|
255
|
+
"rust-toolchain",
|
|
256
|
+
]);
|
|
257
|
+
let ecosystem;
|
|
258
|
+
for (const line of readFileSync(dependabotPath, "utf8").split("\n")) {
|
|
259
|
+
const ecosystemMatch = /^\s*- package-ecosystem: (\S+)\s*$/u.exec(line);
|
|
260
|
+
if (ecosystemMatch) {
|
|
261
|
+
if (!supportedEcosystems.has(ecosystemMatch[1])) {
|
|
262
|
+
throw new Error(`Package Addition requires supported Dependabot ecosystems: ${ecosystemMatch[1]}`);
|
|
263
|
+
}
|
|
264
|
+
ecosystem = ecosystemMatch[1];
|
|
265
|
+
if (!ecosystems.includes(ecosystem))
|
|
266
|
+
ecosystems.push(ecosystem);
|
|
267
|
+
continue;
|
|
268
|
+
}
|
|
269
|
+
const directoryMatch = /^\s+directory: "?(\/[^"\s]*)"?\s*$/u.exec(line);
|
|
270
|
+
if (!directoryMatch || ecosystem === undefined)
|
|
271
|
+
continue;
|
|
272
|
+
const directory = directoryMatch[1];
|
|
273
|
+
if (directories[ecosystem] === undefined) {
|
|
274
|
+
directories[ecosystem] = directory;
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
(extraDirectories[ecosystem] ??= []).push(directory);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
if (ecosystems.length === 0) {
|
|
281
|
+
throw new Error("Package Addition requires maintenance truth: .github/dependabot.yml has no update entries");
|
|
282
|
+
}
|
|
283
|
+
return {
|
|
284
|
+
ecosystems,
|
|
285
|
+
directories,
|
|
286
|
+
...(Object.keys(extraDirectories).length === 0 ? {} : { extraDirectories }),
|
|
287
|
+
interval: "weekly",
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
function unique(values) {
|
|
291
|
+
return [...new Set(values)];
|
|
292
|
+
}
|
|
293
|
+
function rootCheckCommand(checks) {
|
|
294
|
+
const rootTasks = unique(checks
|
|
295
|
+
.filter((check) => check.owner.kind === "workspace-orchestration")
|
|
296
|
+
.map(checkComponentTaskName));
|
|
297
|
+
const packageChecks = checks.filter((check) => check.owner.kind === "package-boundary");
|
|
298
|
+
const packageTasks = unique(packageChecks.map(checkComponentTaskName));
|
|
299
|
+
const packageFilters = unique(packageChecks.map((check) => `--filter './${check.owner.path}'`));
|
|
300
|
+
return [
|
|
301
|
+
"pnpm run check:boundaries",
|
|
302
|
+
...rootTasks.map((task) => `pnpm run ${task}`),
|
|
303
|
+
...(packageTasks.length === 0
|
|
304
|
+
? []
|
|
305
|
+
: [renderTurboRunCommand(packageTasks, packageFilters)]),
|
|
306
|
+
].join(" && ");
|
|
307
|
+
}
|
|
308
|
+
function rootFixCommand(fixes) {
|
|
309
|
+
const rootTasks = unique(fixes
|
|
310
|
+
.filter((fix) => fix.owner.kind === "workspace-orchestration")
|
|
311
|
+
.map(fixComponentTaskName));
|
|
312
|
+
const packageFixes = fixes.filter((fix) => fix.owner.kind === "package-boundary");
|
|
313
|
+
const packageTasks = unique(packageFixes.map(fixComponentTaskName));
|
|
314
|
+
const packageFilters = unique(packageFixes.map((fix) => `--filter './${fix.owner.path}'`));
|
|
315
|
+
return [
|
|
316
|
+
...rootTasks.map((task) => `pnpm run ${task}`),
|
|
317
|
+
...(packageTasks.length === 0
|
|
318
|
+
? []
|
|
319
|
+
: [renderTurboRunCommand(packageTasks, packageFilters)]),
|
|
320
|
+
].join(" && ");
|
|
321
|
+
}
|
|
322
|
+
function devcontainerDockerfileOperations(options) {
|
|
323
|
+
const hasBrowserTests = options.environmentNeeds.some((need) => need.kind === "playwright-browser-assets");
|
|
324
|
+
const hasShellChecks = options.environmentNeeds.some((need) => need.kind === "shellcheck-command");
|
|
325
|
+
const browserLayer = hasBrowserTests ? browserTestToolLayer() : undefined;
|
|
326
|
+
return [
|
|
327
|
+
{
|
|
328
|
+
kind: "writeTextTemplate",
|
|
329
|
+
source: templateSources.foundation,
|
|
330
|
+
from: "devcontainer.json",
|
|
331
|
+
to: ".devcontainer/devcontainer.json",
|
|
332
|
+
replacements: {
|
|
333
|
+
PROJECT_NAME: options.context.projectName,
|
|
334
|
+
NODE_LTS_MAJOR: options.context.toolchain.nodeLtsMajor,
|
|
335
|
+
PACKAGE_MANAGER_PIN: options.context.toolchain.packageManagerPin,
|
|
336
|
+
PLAYWRIGHT_CLI_PACKAGE: browserLayer?.playwrightCliPackage ?? "unused",
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
kind: "writeTextFromFragments",
|
|
341
|
+
to: ".devcontainer/Dockerfile",
|
|
342
|
+
fragments: [
|
|
343
|
+
{
|
|
344
|
+
source: templateSources.sharedDevcontainer,
|
|
345
|
+
from: "node-pnpm.Dockerfile",
|
|
346
|
+
},
|
|
347
|
+
...(browserLayer === undefined
|
|
348
|
+
? []
|
|
349
|
+
: [
|
|
350
|
+
{
|
|
351
|
+
source: templateSources.sharedDevcontainer,
|
|
352
|
+
from: "browser-test.Dockerfile",
|
|
353
|
+
},
|
|
354
|
+
]),
|
|
355
|
+
...(hasShellChecks
|
|
356
|
+
? [
|
|
357
|
+
{
|
|
358
|
+
source: templateSources.sharedDevcontainer,
|
|
359
|
+
from: "shellcheck.Dockerfile",
|
|
360
|
+
},
|
|
361
|
+
]
|
|
362
|
+
: []),
|
|
363
|
+
],
|
|
364
|
+
},
|
|
365
|
+
];
|
|
366
|
+
}
|
|
367
|
+
function foundationPlan(options) {
|
|
368
|
+
assertProjectBlueprintV2(options.blueprint);
|
|
369
|
+
const foundationChecks = [
|
|
370
|
+
{
|
|
371
|
+
kind: "oxc-format-check",
|
|
372
|
+
owner: { kind: "workspace-orchestration", path: "." },
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
kind: "oxc-lint",
|
|
376
|
+
owner: { kind: "workspace-orchestration", path: "." },
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
kind: "typescript-typecheck",
|
|
380
|
+
owner: { kind: "workspace-orchestration", path: "." },
|
|
381
|
+
},
|
|
382
|
+
];
|
|
383
|
+
const foundationFixes = [
|
|
384
|
+
{
|
|
385
|
+
kind: "oxc-format-write",
|
|
386
|
+
owner: { kind: "workspace-orchestration", path: "." },
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
kind: "oxc-lint-fix",
|
|
390
|
+
owner: { kind: "workspace-orchestration", path: "." },
|
|
391
|
+
},
|
|
392
|
+
];
|
|
393
|
+
const checks = [
|
|
394
|
+
...foundationChecks,
|
|
395
|
+
...options.contributions.flatMap((item) => item.checks),
|
|
396
|
+
];
|
|
397
|
+
const fixes = [
|
|
398
|
+
...foundationFixes,
|
|
399
|
+
...options.contributions.flatMap((item) => item.fixes),
|
|
400
|
+
];
|
|
401
|
+
const environmentNeeds = options.contributions.flatMap((item) => item.environmentNeeds);
|
|
402
|
+
const deploymentChecks = options.contributions.flatMap((item) => item.deploymentChecks ?? []);
|
|
403
|
+
const packagePaths = options.contributions.map((contribution) => contribution.definition.path);
|
|
404
|
+
if (new Set(packagePaths).size !== packagePaths.length)
|
|
405
|
+
throw new Error("Package Contributions must have unique Package Paths");
|
|
406
|
+
const packageNames = options.contributions.map((contribution) => contribution.definition.name);
|
|
407
|
+
if (new Set(packageNames).size !== packageNames.length)
|
|
408
|
+
throw new Error("Package Contributions must have unique package names");
|
|
409
|
+
const rustToolchain = options.contributions
|
|
410
|
+
.map((contribution) => contribution.foundation.toolchains.rust)
|
|
411
|
+
.find((toolchain) => toolchain !== undefined);
|
|
412
|
+
if (options.contributions.some((contribution) => contribution.foundation.toolchains.rust !== undefined &&
|
|
413
|
+
contribution.foundation.toolchains.rust !== rustToolchain)) {
|
|
414
|
+
throw new Error("Foundation requires one coordinated Rust toolchain");
|
|
415
|
+
}
|
|
416
|
+
const workspacePackageGlobs = [
|
|
417
|
+
...new Set([
|
|
418
|
+
...options.blueprint.packages.map((definition) => `${definition.path.split("/")[0]}/*`),
|
|
419
|
+
...options.contributions.flatMap((contribution) => contribution.foundation.workspacePackageGlobs ?? []),
|
|
420
|
+
]),
|
|
421
|
+
];
|
|
422
|
+
const editorCustomization = editorCustomizationForCapabilities(options.contributions.flatMap((contribution) => contribution.foundation.editorCapabilities), loadEditorCustomizationDeclarations(resolveTemplateSource(templateSources.editorCustomization, "capabilities.json")));
|
|
423
|
+
const dependencyMaintenancePolicy = {
|
|
424
|
+
ecosystems: [
|
|
425
|
+
...new Set(options.contributions.flatMap((contribution) => contribution.foundation.dependencyMaintenance.ecosystems)),
|
|
426
|
+
],
|
|
427
|
+
directories: Object.assign({}, ...options.contributions.map((contribution) => contribution.foundation.dependencyMaintenance.directories ?? {})),
|
|
428
|
+
extraDirectories: Object.assign({}, ...options.contributions.map((contribution) => contribution.foundation.dependencyMaintenance.extraDirectories ?? {})),
|
|
429
|
+
interval: "weekly",
|
|
430
|
+
};
|
|
431
|
+
const rootManifest = {
|
|
432
|
+
name: options.context.projectName,
|
|
433
|
+
version: "0.0.0",
|
|
434
|
+
private: true,
|
|
435
|
+
type: "module",
|
|
436
|
+
scripts: {
|
|
437
|
+
check: rootCheckCommand(checks),
|
|
438
|
+
"check:boundaries": "turbo boundaries --no-color",
|
|
439
|
+
...(deploymentChecks.length === 0
|
|
440
|
+
? {}
|
|
441
|
+
: {
|
|
442
|
+
"check:deployment": deploymentChecks
|
|
443
|
+
.map((check) => `pnpm --filter './${check.owner.path}' run check:deployment`)
|
|
444
|
+
.join(" && "),
|
|
445
|
+
}),
|
|
446
|
+
fix: rootFixCommand(fixes),
|
|
447
|
+
"format:check:run": "oxfmt --list-different --config oxfmt.config.ts .",
|
|
448
|
+
"format:write:run": "oxfmt --write --config oxfmt.config.ts .",
|
|
449
|
+
"lint:run": "oxlint --quiet --format=unix --config oxlint.config.ts .",
|
|
450
|
+
"lint:fix:run": "oxlint --format=unix --config oxlint.config.ts . --fix",
|
|
451
|
+
typecheck: "pnpm run typecheck:run",
|
|
452
|
+
"typecheck:run": "tsc -p tsconfig.json --noEmit --pretty false",
|
|
453
|
+
},
|
|
454
|
+
devDependencies: {
|
|
455
|
+
"@types/node": "catalog:",
|
|
456
|
+
oxfmt: "catalog:",
|
|
457
|
+
oxlint: "catalog:",
|
|
458
|
+
"oxlint-tsgolint": "catalog:",
|
|
459
|
+
turbo: "catalog:",
|
|
460
|
+
"typescript-7": "catalog:",
|
|
461
|
+
},
|
|
462
|
+
engines: { node: options.context.toolchain.nodeLtsMajor },
|
|
463
|
+
packageManager: options.context.toolchain.packageManagerPin,
|
|
464
|
+
};
|
|
465
|
+
const dependencyCatalog = selectTemplateDependencyCatalogEntries(collectGeneratedManifestCatalogReferences([
|
|
466
|
+
...options.contributions.map((contribution) => contribution.manifest),
|
|
467
|
+
rootManifest,
|
|
468
|
+
]));
|
|
469
|
+
const dependencyOverrides = {
|
|
470
|
+
"valibot>typescript": "-",
|
|
471
|
+
...(Object.hasOwn(dependencyCatalog, "vue") ||
|
|
472
|
+
Object.hasOwn(dependencyCatalog, "pinia")
|
|
473
|
+
? vuePnpmDependencyOverrides
|
|
474
|
+
: {}),
|
|
475
|
+
};
|
|
476
|
+
const requiresCoordinatedWorkspaceRefresh = true;
|
|
477
|
+
const workspaceOperation = requiresCoordinatedWorkspaceRefresh
|
|
478
|
+
? {
|
|
479
|
+
kind: "writeTextTemplate",
|
|
480
|
+
source: templateSources.foundation,
|
|
481
|
+
from: "pnpm-workspace.dynamic.txt",
|
|
482
|
+
to: "pnpm-workspace.yaml",
|
|
483
|
+
replacements: {
|
|
484
|
+
WORKSPACE_PACKAGE_GLOBS: workspacePackageGlobs
|
|
485
|
+
.map((glob) => ` - ${glob}`)
|
|
486
|
+
.join("\n"),
|
|
487
|
+
DEPENDENCY_CATALOG: Object.entries(dependencyCatalog)
|
|
488
|
+
.toSorted(([left], [right]) => left.localeCompare(right))
|
|
489
|
+
.map(([name, version]) => ` ${JSON.stringify(name)}: ${String(version)}`)
|
|
490
|
+
.join("\n"),
|
|
491
|
+
DEPENDENCY_OVERRIDES: Object.entries(dependencyOverrides)
|
|
492
|
+
.toSorted(([left], [right]) => left.localeCompare(right))
|
|
493
|
+
.map(([dependency, version]) => ` ${JSON.stringify(dependency)}: ${JSON.stringify(version)}`)
|
|
494
|
+
.join("\n"),
|
|
495
|
+
},
|
|
496
|
+
...(options.mode === "addition" ? { overwrite: true } : {}),
|
|
497
|
+
}
|
|
498
|
+
: {
|
|
499
|
+
kind: "copyFile",
|
|
500
|
+
source: templateSources.foundation,
|
|
501
|
+
from: "pnpm-workspace.yaml",
|
|
502
|
+
to: "pnpm-workspace.yaml",
|
|
503
|
+
};
|
|
504
|
+
const workflowOperation = {
|
|
505
|
+
kind: "writeTextTemplate",
|
|
506
|
+
source: templateSources.foundation,
|
|
507
|
+
from: ".github/workflows/check.dynamic.template",
|
|
508
|
+
to: ".github/workflows/check.yml",
|
|
509
|
+
replacements: projectCheckWorkflowTemplateReplacements({
|
|
510
|
+
checkPlan: { components: checks, environmentNeeds, deploymentChecks },
|
|
511
|
+
}),
|
|
512
|
+
...(options.mode === "addition" ? { overwrite: true } : {}),
|
|
513
|
+
};
|
|
514
|
+
const workflowOperations = [
|
|
515
|
+
workflowOperation,
|
|
516
|
+
{
|
|
517
|
+
kind: "writeTextTemplate",
|
|
518
|
+
source: templateSources.foundation,
|
|
519
|
+
from: ".github/dependabot.dynamic.template",
|
|
520
|
+
to: ".github/dependabot.yml",
|
|
521
|
+
replacements: projectDependabotTemplateReplacements(dependencyMaintenancePolicy),
|
|
522
|
+
...(options.mode === "addition" ? { overwrite: true } : {}),
|
|
523
|
+
},
|
|
524
|
+
];
|
|
525
|
+
const projectLinkPlan = planExplicitProjectLinks({
|
|
526
|
+
blueprint: options.blueprint,
|
|
527
|
+
contributions: options.contributions,
|
|
528
|
+
});
|
|
529
|
+
const initializationFoundationOperations = [
|
|
530
|
+
{ kind: "writeJson", to: "package.json", value: rootManifest },
|
|
531
|
+
workspaceOperation,
|
|
532
|
+
{
|
|
533
|
+
kind: "copyFile",
|
|
534
|
+
source: templateSources.foundation,
|
|
535
|
+
from: "gitignore",
|
|
536
|
+
to: ".gitignore",
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
kind: "copyFile",
|
|
540
|
+
source: templateSources.foundation,
|
|
541
|
+
from: ".pnpmfile.cts",
|
|
542
|
+
to: ".pnpmfile.cts",
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
kind: "copyFile",
|
|
546
|
+
source: templateSources.foundation,
|
|
547
|
+
from: "turbo.json",
|
|
548
|
+
to: "turbo.json",
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
kind: "copyFile",
|
|
552
|
+
source: templateSources.foundation,
|
|
553
|
+
from: "tsconfig.json",
|
|
554
|
+
to: "tsconfig.json",
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
kind: "copyFile",
|
|
558
|
+
source: templateSources.sharedOxc,
|
|
559
|
+
from: "tsconfig.config.json",
|
|
560
|
+
to: "tsconfig.config.json",
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
kind: "copyFile",
|
|
564
|
+
source: templateSources.sharedOxc,
|
|
565
|
+
from: "node/oxlint.config.ts",
|
|
566
|
+
to: "oxlint.config.ts",
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
kind: "copyFile",
|
|
570
|
+
source: templateSources.sharedOxc,
|
|
571
|
+
from: "oxfmt.config.ts",
|
|
572
|
+
to: "oxfmt.config.ts",
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
kind: "writeJson",
|
|
576
|
+
to: ".vscode/extensions.json",
|
|
577
|
+
value: { recommendations: editorCustomization.extensions },
|
|
578
|
+
...(editorCustomization.extensions.length > 2
|
|
579
|
+
? { multilineArrays: ["recommendations"] }
|
|
580
|
+
: {}),
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
kind: "writeJson",
|
|
584
|
+
to: ".vscode/settings.json",
|
|
585
|
+
value: editorCustomization.settings,
|
|
586
|
+
},
|
|
587
|
+
...(rustToolchain === undefined
|
|
588
|
+
? [
|
|
589
|
+
...devcontainerDockerfileOperations({
|
|
590
|
+
context: options.context,
|
|
591
|
+
environmentNeeds,
|
|
592
|
+
}),
|
|
593
|
+
]
|
|
594
|
+
: [
|
|
595
|
+
{
|
|
596
|
+
kind: "writeTextTemplate",
|
|
597
|
+
source: templateSources.foundation,
|
|
598
|
+
from: "rust/rust-toolchain.toml",
|
|
599
|
+
to: "rust-toolchain.toml",
|
|
600
|
+
replacements: { RUST_TOOLCHAIN: rustToolchain.toolchain },
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
kind: "writeTextTemplate",
|
|
604
|
+
source: templateSources.foundation,
|
|
605
|
+
from: "rust/devcontainer/devcontainer.json",
|
|
606
|
+
to: ".devcontainer/devcontainer.json",
|
|
607
|
+
replacements: {
|
|
608
|
+
PROJECT_NAME: options.context.projectName,
|
|
609
|
+
NODE_LTS_MAJOR: options.context.toolchain.nodeLtsMajor,
|
|
610
|
+
PACKAGE_MANAGER_PIN: options.context.toolchain.packageManagerPin,
|
|
611
|
+
RUST_TOOLCHAIN: rustToolchain.toolchain,
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
kind: "writeTextFromFragments",
|
|
616
|
+
to: ".devcontainer/Dockerfile",
|
|
617
|
+
fragments: [
|
|
618
|
+
{
|
|
619
|
+
source: templateSources.sharedDevcontainer,
|
|
620
|
+
from: "node-pnpm.Dockerfile",
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
source: templateSources.foundation,
|
|
624
|
+
from: "rust/devcontainer/rust.Dockerfile",
|
|
625
|
+
},
|
|
626
|
+
],
|
|
627
|
+
},
|
|
628
|
+
]),
|
|
629
|
+
...workflowOperations,
|
|
630
|
+
{
|
|
631
|
+
kind: "writeJson",
|
|
632
|
+
to: ".template/blueprint.json",
|
|
633
|
+
value: options.blueprint,
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
kind: "writeJson",
|
|
637
|
+
to: ".template/generation.json",
|
|
638
|
+
value: {
|
|
639
|
+
preset: options.definition.metadata.name,
|
|
640
|
+
templateVersion: "0.0.0",
|
|
641
|
+
toolchain: options.context.toolchain,
|
|
642
|
+
},
|
|
643
|
+
},
|
|
644
|
+
];
|
|
645
|
+
const refreshFoundationOperation = (operation) => {
|
|
646
|
+
switch (operation.kind) {
|
|
647
|
+
case "copyFile":
|
|
648
|
+
case "writeTextTemplate":
|
|
649
|
+
case "writeTextFromFragments":
|
|
650
|
+
case "writeJson":
|
|
651
|
+
return { ...operation, overwrite: true };
|
|
652
|
+
case "mergeJson":
|
|
653
|
+
case "replaceAnchors":
|
|
654
|
+
case "setExecutable":
|
|
655
|
+
case "writeText":
|
|
656
|
+
return operation;
|
|
657
|
+
}
|
|
658
|
+
};
|
|
659
|
+
const plannedFoundationOperations = options.mode === "addition"
|
|
660
|
+
? initializationFoundationOperations
|
|
661
|
+
.filter((operation) => !("to" in operation &&
|
|
662
|
+
operation.to === ".template/generation.json"))
|
|
663
|
+
.map(refreshFoundationOperation)
|
|
664
|
+
: initializationFoundationOperations;
|
|
665
|
+
const linkOperations = [
|
|
666
|
+
...projectLinkPlan.manifestDependenciesByPackagePath,
|
|
667
|
+
].map(([packagePath, dependencies]) => ({
|
|
668
|
+
kind: "mergeJson",
|
|
669
|
+
to: `${packagePath}/package.json`,
|
|
670
|
+
value: { dependencies },
|
|
671
|
+
multilineArrays: ["files"],
|
|
672
|
+
}));
|
|
673
|
+
const contributionProvenance = {
|
|
674
|
+
definitionName: options.definition.metadata.name,
|
|
675
|
+
plannerSourceFile: options.definition.plannerSourceFile,
|
|
676
|
+
planningContribution: options.mode === "addition"
|
|
677
|
+
? "planPackageAddition"
|
|
678
|
+
: "planInitialization",
|
|
679
|
+
ownershipRule: "Package Contribution may write only its owned Package Boundary",
|
|
680
|
+
};
|
|
681
|
+
const foundationProvenance = {
|
|
682
|
+
definitionName: options.definition.metadata.name,
|
|
683
|
+
plannerSourceFile: fileURLToPath(import.meta.url),
|
|
684
|
+
planningContribution: "foundationPlan",
|
|
685
|
+
ownershipRule: "Foundation owns coordinated root outputs",
|
|
686
|
+
};
|
|
687
|
+
const withProvenance = (operation, provenance) => ({ ...operation, provenance });
|
|
688
|
+
const operations = [
|
|
689
|
+
...(options.renderContributions ?? options.contributions)
|
|
690
|
+
.map((item) => assertPackageContribution(item, {
|
|
691
|
+
definitionName: options.definition.metadata.name,
|
|
692
|
+
planner: options.mode === "addition"
|
|
693
|
+
? "planPackageAddition"
|
|
694
|
+
: "planInitialization",
|
|
695
|
+
}))
|
|
696
|
+
.flatMap((item) => item.operations.map((operation) => operation.kind === "writeJson" &&
|
|
697
|
+
operation.to.endsWith("/package.json")
|
|
698
|
+
? { ...operation, value: item.manifest }
|
|
699
|
+
: operation))
|
|
700
|
+
.map((operation) => withProvenance(operation, contributionProvenance)),
|
|
701
|
+
...plannedFoundationOperations.map((operation) => withProvenance(operation, foundationProvenance)),
|
|
702
|
+
...linkOperations.map((operation) => withProvenance(operation, foundationProvenance)),
|
|
703
|
+
];
|
|
704
|
+
return {
|
|
705
|
+
definitionName: options.definition.metadata.name,
|
|
706
|
+
plannerSourceFile: options.definition.plannerSourceFile,
|
|
707
|
+
planningContribution: options.mode === "addition"
|
|
708
|
+
? "planPackageAddition"
|
|
709
|
+
: "planInitialization",
|
|
710
|
+
blueprint: options.blueprint,
|
|
711
|
+
generationRecord: {
|
|
712
|
+
preset: options.definition.metadata.name,
|
|
713
|
+
templateVersion: "0.0.0",
|
|
714
|
+
toolchain: options.context.toolchain,
|
|
715
|
+
},
|
|
716
|
+
operations,
|
|
717
|
+
checks,
|
|
718
|
+
fixes,
|
|
719
|
+
environmentNeeds,
|
|
720
|
+
deploymentChecks,
|
|
721
|
+
manifests: [
|
|
722
|
+
...options.contributions.map((item) => item.manifest),
|
|
723
|
+
rootManifest,
|
|
724
|
+
],
|
|
725
|
+
dependencyCatalog,
|
|
726
|
+
dependencyMaintenancePolicy,
|
|
727
|
+
nextStepInstructions: [
|
|
728
|
+
{ display: "pnpm install" },
|
|
729
|
+
...environmentNeeds.map((need) => ({ display: need.nextStep.display })),
|
|
730
|
+
{ display: "pnpm run fix" },
|
|
731
|
+
{ display: "pnpm run check" },
|
|
732
|
+
],
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
export function planGeneratedRepositoryInitialization(options) {
|
|
736
|
+
const blueprint = options.definition.blueprint(options.context);
|
|
737
|
+
return foundationPlan({
|
|
738
|
+
definition: options.definition,
|
|
739
|
+
context: options.context,
|
|
740
|
+
blueprint,
|
|
741
|
+
contributions: options.definition.planInitializationContributions?.(options.context) ?? [options.definition.planInitialization(options.context)],
|
|
742
|
+
mode: "initialization",
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
export function planGeneratedRepositoryPackageAddition(options) {
|
|
746
|
+
assertProjectBlueprintV2(options.blueprint);
|
|
747
|
+
if (!options.definition.planPackageAddition)
|
|
748
|
+
throw new Error(`Built-in Preset ${options.definition.metadata.name} does not support Package Addition`);
|
|
749
|
+
const packagePath = options.packagePath ??
|
|
750
|
+
options.definition.defaultPackagePath?.({
|
|
751
|
+
context: options.context,
|
|
752
|
+
packageLeafName: options.packageLeafName,
|
|
753
|
+
});
|
|
754
|
+
if (packagePath === undefined) {
|
|
755
|
+
throw new Error(`Built-in Preset ${options.definition.metadata.name} must own a default Package Path or receive an explicit Package Path`);
|
|
756
|
+
}
|
|
757
|
+
const contribution = options.definition.planPackageAddition({
|
|
758
|
+
context: options.context,
|
|
759
|
+
packageLeafName: options.packageLeafName,
|
|
760
|
+
packagePath,
|
|
761
|
+
});
|
|
762
|
+
const conflictingPackage = options.blueprint.packages.find((existing) => existing.name === contribution.definition.name ||
|
|
763
|
+
existing.path === contribution.definition.path);
|
|
764
|
+
if (conflictingPackage !== undefined) {
|
|
765
|
+
throw new Error(`Package Addition conflicts with existing Package Definition ${conflictingPackage.name} at ${conflictingPackage.path}`);
|
|
766
|
+
}
|
|
767
|
+
const blueprint = {
|
|
768
|
+
...options.blueprint,
|
|
769
|
+
packages: [...options.blueprint.packages, contribution.definition],
|
|
770
|
+
...(options.linkFrom && options.linkFrom.length > 0
|
|
771
|
+
? {
|
|
772
|
+
packageLinkIntents: [
|
|
773
|
+
...(options.blueprint.packageLinkIntents ?? []),
|
|
774
|
+
...[...new Set(options.linkFrom)].map((consumerPackagePath) => ({
|
|
775
|
+
consumerPackagePath,
|
|
776
|
+
providerPackagePath: contribution.definition.path,
|
|
777
|
+
})),
|
|
778
|
+
],
|
|
779
|
+
}
|
|
780
|
+
: {}),
|
|
781
|
+
};
|
|
782
|
+
assertProjectBlueprintV2(blueprint);
|
|
783
|
+
const existingContributions = options.blueprint.packages.map((definition) => existingPackageContribution({ context: options.context, definition }));
|
|
784
|
+
if (existingContributions.length !== options.blueprint.packages.length ||
|
|
785
|
+
existingContributions.some((existing) => !options.blueprint.packages.some((definition) => definition.path === existing.definition.path &&
|
|
786
|
+
definition.name === existing.definition.name))) {
|
|
787
|
+
throw new Error("Migration Package Addition check Contributions must match the current Project Blueprint");
|
|
788
|
+
}
|
|
789
|
+
return foundationPlan({
|
|
790
|
+
definition: options.definition,
|
|
791
|
+
context: options.context,
|
|
792
|
+
blueprint,
|
|
793
|
+
contributions: [...existingContributions, contribution],
|
|
794
|
+
renderContributions: [contribution],
|
|
795
|
+
mode: "addition",
|
|
796
|
+
});
|
|
797
|
+
}
|