@cbnventures/nova 0.16.2 → 0.18.0
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/LICENSE +22 -0
- package/README.md +8 -0
- package/build/package.json +1 -1
- package/build/src/api/node-releases.d.ts +4 -4
- package/build/src/api/node-releases.d.ts.map +1 -1
- package/build/src/api/node-releases.js +14 -14
- package/build/src/api/node-releases.js.map +1 -1
- package/build/src/api/spdx-licenses.d.ts +4 -4
- package/build/src/api/spdx-licenses.d.ts.map +1 -1
- package/build/src/api/spdx-licenses.js +12 -12
- package/build/src/api/spdx-licenses.js.map +1 -1
- package/build/src/cli/generate/github/funding.d.ts +3 -3
- package/build/src/cli/generate/github/funding.d.ts.map +1 -1
- package/build/src/cli/generate/github/funding.js +10 -6
- package/build/src/cli/generate/github/funding.js.map +1 -1
- package/build/src/cli/generate/github/issue-template.d.ts +3 -3
- package/build/src/cli/generate/github/issue-template.d.ts.map +1 -1
- package/build/src/cli/generate/github/issue-template.js +20 -13
- package/build/src/cli/generate/github/issue-template.js.map +1 -1
- package/build/src/cli/generate/github/workflows.d.ts +10 -9
- package/build/src/cli/generate/github/workflows.d.ts.map +1 -1
- package/build/src/cli/generate/github/workflows.js +249 -129
- package/build/src/cli/generate/github/workflows.js.map +1 -1
- package/build/src/cli/generate/must-haves/agent-conventions.d.ts +3 -3
- package/build/src/cli/generate/must-haves/agent-conventions.d.ts.map +1 -1
- package/build/src/cli/generate/must-haves/agent-conventions.js +16 -13
- package/build/src/cli/generate/must-haves/agent-conventions.js.map +1 -1
- package/build/src/cli/generate/must-haves/dotenv.d.ts +3 -3
- package/build/src/cli/generate/must-haves/dotenv.d.ts.map +1 -1
- package/build/src/cli/generate/must-haves/dotenv.js +90 -77
- package/build/src/cli/generate/must-haves/dotenv.js.map +1 -1
- package/build/src/cli/generate/must-haves/editorconfig.d.ts +3 -3
- package/build/src/cli/generate/must-haves/editorconfig.d.ts.map +1 -1
- package/build/src/cli/generate/must-haves/editorconfig.js +9 -5
- package/build/src/cli/generate/must-haves/editorconfig.js.map +1 -1
- package/build/src/cli/generate/must-haves/gitignore.d.ts +3 -3
- package/build/src/cli/generate/must-haves/gitignore.d.ts.map +1 -1
- package/build/src/cli/generate/must-haves/gitignore.js +81 -71
- package/build/src/cli/generate/must-haves/gitignore.js.map +1 -1
- package/build/src/cli/generate/must-haves/license.d.ts +3 -3
- package/build/src/cli/generate/must-haves/license.d.ts.map +1 -1
- package/build/src/cli/generate/must-haves/license.js +19 -86
- package/build/src/cli/generate/must-haves/license.js.map +1 -1
- package/build/src/cli/generate/must-haves/read-me.d.ts +3 -3
- package/build/src/cli/generate/must-haves/read-me.d.ts.map +1 -1
- package/build/src/cli/generate/must-haves/read-me.js +26 -28
- package/build/src/cli/generate/must-haves/read-me.js.map +1 -1
- package/build/src/cli/index.js +81 -34
- package/build/src/cli/index.js.map +1 -1
- package/build/src/cli/recipe/github/handle-gh-failure.d.ts +3 -0
- package/build/src/cli/recipe/github/handle-gh-failure.d.ts.map +1 -0
- package/build/src/cli/recipe/github/handle-gh-failure.js +22 -0
- package/build/src/cli/recipe/github/handle-gh-failure.js.map +1 -0
- package/build/src/cli/recipe/github/sync-features.d.ts +5 -0
- package/build/src/cli/recipe/github/sync-features.d.ts.map +1 -0
- package/build/src/cli/recipe/github/sync-features.js +145 -0
- package/build/src/cli/recipe/github/sync-features.js.map +1 -0
- package/build/src/cli/recipe/github/sync-identity.d.ts +6 -0
- package/build/src/cli/recipe/github/sync-identity.d.ts.map +1 -0
- package/build/src/cli/recipe/github/sync-identity.js +191 -0
- package/build/src/cli/recipe/github/sync-identity.js.map +1 -0
- package/build/src/cli/recipe/github/sync-policies.d.ts +5 -0
- package/build/src/cli/recipe/github/sync-policies.d.ts.map +1 -0
- package/build/src/cli/recipe/github/sync-policies.js +154 -0
- package/build/src/cli/recipe/github/sync-policies.js.map +1 -0
- package/build/src/cli/recipe/index.d.ts +2 -2
- package/build/src/cli/recipe/index.d.ts.map +1 -1
- package/build/src/cli/recipe/index.js +66 -56
- package/build/src/cli/recipe/index.js.map +1 -1
- package/build/src/cli/recipe/package-json/cleanup.d.ts +3 -3
- package/build/src/cli/recipe/package-json/cleanup.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/cleanup.js +27 -25
- package/build/src/cli/recipe/package-json/cleanup.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-artifacts.d.ts +3 -3
- package/build/src/cli/recipe/package-json/normalize-artifacts.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-artifacts.js +35 -35
- package/build/src/cli/recipe/package-json/normalize-artifacts.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-bundler.d.ts +3 -3
- package/build/src/cli/recipe/package-json/normalize-bundler.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-bundler.js +22 -22
- package/build/src/cli/recipe/package-json/normalize-bundler.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-dependencies.d.ts +3 -3
- package/build/src/cli/recipe/package-json/normalize-dependencies.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-dependencies.js +37 -37
- package/build/src/cli/recipe/package-json/normalize-dependencies.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-modules.d.ts +3 -3
- package/build/src/cli/recipe/package-json/normalize-modules.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-modules.js +47 -47
- package/build/src/cli/recipe/package-json/normalize-modules.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-tooling.d.ts +3 -3
- package/build/src/cli/recipe/package-json/normalize-tooling.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-tooling.js +23 -23
- package/build/src/cli/recipe/package-json/normalize-tooling.js.map +1 -1
- package/build/src/cli/recipe/package-json/sync-environment.d.ts +3 -3
- package/build/src/cli/recipe/package-json/sync-environment.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/sync-environment.js +37 -37
- package/build/src/cli/recipe/package-json/sync-environment.js.map +1 -1
- package/build/src/cli/recipe/package-json/sync-identity.d.ts +3 -3
- package/build/src/cli/recipe/package-json/sync-identity.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/sync-identity.js +20 -20
- package/build/src/cli/recipe/package-json/sync-identity.js.map +1 -1
- package/build/src/cli/recipe/package-json/sync-ownership.d.ts +3 -3
- package/build/src/cli/recipe/package-json/sync-ownership.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/sync-ownership.js +28 -28
- package/build/src/cli/recipe/package-json/sync-ownership.js.map +1 -1
- package/build/src/cli/scaffold/app/expressjs.d.ts +3 -3
- package/build/src/cli/scaffold/app/expressjs.d.ts.map +1 -1
- package/build/src/cli/scaffold/app/expressjs.js +1 -1
- package/build/src/cli/scaffold/app/expressjs.js.map +1 -1
- package/build/src/cli/scaffold/app/nextjs.d.ts +3 -3
- package/build/src/cli/scaffold/app/nextjs.d.ts.map +1 -1
- package/build/src/cli/scaffold/app/nextjs.js +1 -1
- package/build/src/cli/scaffold/app/nextjs.js.map +1 -1
- package/build/src/cli/scaffold/app/vite.d.ts +3 -3
- package/build/src/cli/scaffold/app/vite.d.ts.map +1 -1
- package/build/src/cli/scaffold/app/vite.js +1 -1
- package/build/src/cli/scaffold/app/vite.js.map +1 -1
- package/build/src/cli/scaffold/app/workers.d.ts +3 -3
- package/build/src/cli/scaffold/app/workers.d.ts.map +1 -1
- package/build/src/cli/scaffold/app/workers.js +1 -1
- package/build/src/cli/scaffold/app/workers.js.map +1 -1
- package/build/src/cli/scaffold/docs/docusaurus.d.ts +3 -3
- package/build/src/cli/scaffold/docs/docusaurus.d.ts.map +1 -1
- package/build/src/cli/scaffold/docs/docusaurus.js +1 -1
- package/build/src/cli/scaffold/docs/docusaurus.js.map +1 -1
- package/build/src/cli/scaffold/starter/base.d.ts +3 -3
- package/build/src/cli/scaffold/starter/base.d.ts.map +1 -1
- package/build/src/cli/scaffold/starter/base.js +7 -7
- package/build/src/cli/scaffold/starter/base.js.map +1 -1
- package/build/src/cli/utility/changelog.d.ts +4 -3
- package/build/src/cli/utility/changelog.d.ts.map +1 -1
- package/build/src/cli/utility/changelog.js +86 -84
- package/build/src/cli/utility/changelog.js.map +1 -1
- package/build/src/cli/utility/initialize.d.ts +5 -3
- package/build/src/cli/utility/initialize.d.ts.map +1 -1
- package/build/src/cli/utility/initialize.js +805 -244
- package/build/src/cli/utility/initialize.js.map +1 -1
- package/build/src/cli/utility/run-recipes.d.ts +3 -3
- package/build/src/cli/utility/run-recipes.d.ts.map +1 -1
- package/build/src/cli/utility/run-recipes.js +43 -12
- package/build/src/cli/utility/run-recipes.js.map +1 -1
- package/build/src/cli/utility/run-scripts.d.ts +3 -3
- package/build/src/cli/utility/run-scripts.d.ts.map +1 -1
- package/build/src/cli/utility/run-scripts.js +9 -8
- package/build/src/cli/utility/run-scripts.js.map +1 -1
- package/build/src/cli/utility/transpile.d.ts +3 -3
- package/build/src/cli/utility/transpile.d.ts.map +1 -1
- package/build/src/cli/utility/transpile.js +4 -4
- package/build/src/cli/utility/transpile.js.map +1 -1
- package/build/src/cli/utility/type-check.d.ts +3 -3
- package/build/src/cli/utility/type-check.d.ts.map +1 -1
- package/build/src/cli/utility/type-check.js +4 -4
- package/build/src/cli/utility/type-check.js.map +1 -1
- package/build/src/cli/utility/version.d.ts +3 -3
- package/build/src/cli/utility/version.d.ts.map +1 -1
- package/build/src/cli/utility/version.js +102 -102
- package/build/src/cli/utility/version.js.map +1 -1
- package/build/src/lib/constants.d.ts +4 -0
- package/build/src/lib/constants.d.ts.map +1 -0
- package/build/src/lib/constants.js +3 -0
- package/build/src/lib/constants.js.map +1 -0
- package/build/src/lib/item.d.ts +32 -31
- package/build/src/lib/item.d.ts.map +1 -1
- package/build/src/lib/item.js +3 -1
- package/build/src/lib/item.js.map +1 -1
- package/build/src/lib/nova-config.d.ts +11 -5
- package/build/src/lib/nova-config.d.ts.map +1 -1
- package/build/src/lib/nova-config.js +143 -8
- package/build/src/lib/nova-config.js.map +1 -1
- package/build/src/lib/regex.d.ts +15 -1
- package/build/src/lib/regex.d.ts.map +1 -1
- package/build/src/lib/regex.js +15 -1
- package/build/src/lib/regex.js.map +1 -1
- package/build/src/lib/scaffold.d.ts +9 -9
- package/build/src/lib/scaffold.d.ts.map +1 -1
- package/build/src/lib/scaffold.js +45 -44
- package/build/src/lib/scaffold.js.map +1 -1
- package/build/src/lib/utility.d.ts +26 -21
- package/build/src/lib/utility.d.ts.map +1 -1
- package/build/src/lib/utility.js +139 -19
- package/build/src/lib/utility.js.map +1 -1
- package/build/src/lib/workflow-templates.d.ts +2 -2
- package/build/src/lib/workflow-templates.d.ts.map +1 -1
- package/build/src/lib/workflow-templates.js +44 -2
- package/build/src/lib/workflow-templates.js.map +1 -1
- package/build/src/presets/eslint/dx-code-style.d.ts +2 -2
- package/build/src/presets/eslint/dx-code-style.d.ts.map +1 -1
- package/build/src/presets/eslint/dx-code-style.js.map +1 -1
- package/build/src/presets/eslint/dx-ignore.d.ts +2 -2
- package/build/src/presets/eslint/dx-ignore.d.ts.map +1 -1
- package/build/src/presets/eslint/dx-ignore.js +7 -0
- package/build/src/presets/eslint/dx-ignore.js.map +1 -1
- package/build/src/presets/eslint/fw-docusaurus.d.ts +2 -2
- package/build/src/presets/eslint/fw-docusaurus.d.ts.map +1 -1
- package/build/src/presets/eslint/fw-docusaurus.js.map +1 -1
- package/build/src/presets/eslint/fw-expressjs.d.ts +2 -2
- package/build/src/presets/eslint/fw-expressjs.d.ts.map +1 -1
- package/build/src/presets/eslint/fw-expressjs.js.map +1 -1
- package/build/src/presets/eslint/fw-nextjs.d.ts +2 -2
- package/build/src/presets/eslint/fw-nextjs.d.ts.map +1 -1
- package/build/src/presets/eslint/fw-nextjs.js.map +1 -1
- package/build/src/presets/eslint/lang-javascript.d.ts +2 -2
- package/build/src/presets/eslint/lang-javascript.d.ts.map +1 -1
- package/build/src/presets/eslint/lang-javascript.js.map +1 -1
- package/build/src/presets/eslint/lang-mdx.d.ts +2 -2
- package/build/src/presets/eslint/lang-mdx.d.ts.map +1 -1
- package/build/src/presets/eslint/lang-mdx.js.map +1 -1
- package/build/src/presets/eslint/lang-typescript.d.ts +2 -2
- package/build/src/presets/eslint/lang-typescript.d.ts.map +1 -1
- package/build/src/presets/eslint/lang-typescript.js.map +1 -1
- package/build/src/presets/eslint/runtime-browser.d.ts +2 -2
- package/build/src/presets/eslint/runtime-browser.d.ts.map +1 -1
- package/build/src/presets/eslint/runtime-browser.js.map +1 -1
- package/build/src/presets/eslint/runtime-cloudflare-workers.d.ts +2 -2
- package/build/src/presets/eslint/runtime-cloudflare-workers.d.ts.map +1 -1
- package/build/src/presets/eslint/runtime-cloudflare-workers.js.map +1 -1
- package/build/src/presets/eslint/runtime-edge.d.ts +2 -2
- package/build/src/presets/eslint/runtime-edge.d.ts.map +1 -1
- package/build/src/presets/eslint/runtime-edge.js.map +1 -1
- package/build/src/presets/eslint/runtime-node.d.ts +2 -2
- package/build/src/presets/eslint/runtime-node.d.ts.map +1 -1
- package/build/src/presets/eslint/runtime-node.js.map +1 -1
- package/build/src/presets/eslint/runtime-service-worker.d.ts +2 -2
- package/build/src/presets/eslint/runtime-service-worker.d.ts.map +1 -1
- package/build/src/presets/eslint/runtime-service-worker.js.map +1 -1
- package/build/src/presets/eslint/runtime-web-worker.d.ts +2 -2
- package/build/src/presets/eslint/runtime-web-worker.d.ts.map +1 -1
- package/build/src/presets/eslint/runtime-web-worker.js.map +1 -1
- package/build/src/presets/eslint/tool-vite.d.ts +2 -2
- package/build/src/presets/eslint/tool-vite.d.ts.map +1 -1
- package/build/src/presets/eslint/tool-vite.js.map +1 -1
- package/build/src/rules/eslint/conventions/no-default-export-declaration.d.ts +3 -3
- package/build/src/rules/eslint/conventions/no-default-export-declaration.d.ts.map +1 -1
- package/build/src/rules/eslint/conventions/no-default-export-declaration.js +2 -2
- package/build/src/rules/eslint/conventions/no-default-export-declaration.js.map +1 -1
- package/build/src/rules/eslint/conventions/no-implicit-boolean.d.ts +3 -3
- package/build/src/rules/eslint/conventions/no-implicit-boolean.d.ts.map +1 -1
- package/build/src/rules/eslint/conventions/no-implicit-boolean.js +14 -14
- package/build/src/rules/eslint/conventions/no-implicit-boolean.js.map +1 -1
- package/build/src/rules/eslint/conventions/require-explicit-return.d.ts +6 -6
- package/build/src/rules/eslint/conventions/require-explicit-return.d.ts.map +1 -1
- package/build/src/rules/eslint/conventions/require-explicit-return.js +14 -14
- package/build/src/rules/eslint/conventions/require-explicit-return.js.map +1 -1
- package/build/src/rules/eslint/conventions/require-hash-private.d.ts +4 -4
- package/build/src/rules/eslint/conventions/require-hash-private.d.ts.map +1 -1
- package/build/src/rules/eslint/conventions/require-hash-private.js +3 -3
- package/build/src/rules/eslint/conventions/require-hash-private.js.map +1 -1
- package/build/src/rules/eslint/conventions/require-kebab-case-filename.d.ts +4 -4
- package/build/src/rules/eslint/conventions/require-kebab-case-filename.d.ts.map +1 -1
- package/build/src/rules/eslint/conventions/require-kebab-case-filename.js +4 -4
- package/build/src/rules/eslint/conventions/require-kebab-case-filename.js.map +1 -1
- package/build/src/rules/eslint/conventions/require-naming-convention.d.ts +16 -16
- package/build/src/rules/eslint/conventions/require-naming-convention.d.ts.map +1 -1
- package/build/src/rules/eslint/conventions/require-naming-convention.js +34 -31
- package/build/src/rules/eslint/conventions/require-naming-convention.js.map +1 -1
- package/build/src/rules/eslint/conventions/require-undefined-init.d.ts +3 -3
- package/build/src/rules/eslint/conventions/require-undefined-init.d.ts.map +1 -1
- package/build/src/rules/eslint/conventions/require-undefined-init.js +2 -2
- package/build/src/rules/eslint/conventions/require-undefined-init.js.map +1 -1
- package/build/src/rules/eslint/conventions/switch-case-blocks.d.ts +4 -4
- package/build/src/rules/eslint/conventions/switch-case-blocks.d.ts.map +1 -1
- package/build/src/rules/eslint/conventions/switch-case-blocks.js +3 -3
- package/build/src/rules/eslint/conventions/switch-case-blocks.js.map +1 -1
- package/build/src/rules/eslint/formatting/no-complex-arrow-concise.d.ts +5 -5
- package/build/src/rules/eslint/formatting/no-complex-arrow-concise.d.ts.map +1 -1
- package/build/src/rules/eslint/formatting/no-complex-arrow-concise.js +16 -16
- package/build/src/rules/eslint/formatting/no-complex-arrow-concise.js.map +1 -1
- package/build/src/rules/eslint/formatting/no-multiline-strings.d.ts +4 -4
- package/build/src/rules/eslint/formatting/no-multiline-strings.d.ts.map +1 -1
- package/build/src/rules/eslint/formatting/no-multiline-strings.js +19 -19
- package/build/src/rules/eslint/formatting/no-multiline-strings.js.map +1 -1
- package/build/src/rules/eslint/formatting/no-raw-text-in-code.d.ts +3 -3
- package/build/src/rules/eslint/formatting/no-raw-text-in-code.d.ts.map +1 -1
- package/build/src/rules/eslint/formatting/no-raw-text-in-code.js +2 -2
- package/build/src/rules/eslint/formatting/no-raw-text-in-code.js.map +1 -1
- package/build/src/rules/eslint/formatting/no-ternary-in-template-literal.d.ts +3 -3
- package/build/src/rules/eslint/formatting/no-ternary-in-template-literal.d.ts.map +1 -1
- package/build/src/rules/eslint/formatting/no-ternary-in-template-literal.js +2 -2
- package/build/src/rules/eslint/formatting/no-ternary-in-template-literal.js.map +1 -1
- package/build/src/rules/eslint/formatting/require-import-order.d.ts +3 -3
- package/build/src/rules/eslint/formatting/require-import-order.d.ts.map +1 -1
- package/build/src/rules/eslint/formatting/require-import-order.js +6 -6
- package/build/src/rules/eslint/formatting/require-import-order.js.map +1 -1
- package/build/src/rules/eslint/formatting/require-multiline-condition-groups.d.ts +4 -4
- package/build/src/rules/eslint/formatting/require-multiline-condition-groups.d.ts.map +1 -1
- package/build/src/rules/eslint/formatting/require-multiline-condition-groups.js +5 -5
- package/build/src/rules/eslint/formatting/require-multiline-condition-groups.js.map +1 -1
- package/build/src/rules/eslint/formatting/require-multiline-conditions.d.ts +4 -4
- package/build/src/rules/eslint/formatting/require-multiline-conditions.d.ts.map +1 -1
- package/build/src/rules/eslint/formatting/require-multiline-conditions.js +5 -5
- package/build/src/rules/eslint/formatting/require-multiline-conditions.js.map +1 -1
- package/build/src/rules/eslint/formatting/require-padding-lines.d.ts +9 -9
- package/build/src/rules/eslint/formatting/require-padding-lines.d.ts.map +1 -1
- package/build/src/rules/eslint/formatting/require-padding-lines.js +20 -20
- package/build/src/rules/eslint/formatting/require-padding-lines.js.map +1 -1
- package/build/src/rules/eslint/formatting/require-ternary-parens.d.ts +3 -3
- package/build/src/rules/eslint/formatting/require-ternary-parens.d.ts.map +1 -1
- package/build/src/rules/eslint/formatting/require-ternary-parens.js +2 -2
- package/build/src/rules/eslint/formatting/require-ternary-parens.js.map +1 -1
- package/build/src/rules/eslint/index.d.ts +44 -44
- package/build/src/rules/eslint/index.d.ts.map +1 -1
- package/build/src/rules/eslint/index.js +44 -44
- package/build/src/rules/eslint/index.js.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-body.d.ts +7 -7
- package/build/src/rules/eslint/jsdoc/require-jsdoc-body.d.ts.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-body.js +7 -7
- package/build/src/rules/eslint/jsdoc/require-jsdoc-body.js.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.d.ts +9 -7
- package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.d.ts.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.js +115 -61
- package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.js.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-param-alignment.d.ts +3 -3
- package/build/src/rules/eslint/jsdoc/require-jsdoc-param-alignment.d.ts.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-param-alignment.js +6 -6
- package/build/src/rules/eslint/jsdoc/require-jsdoc-param-alignment.js.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.d.ts +3 -3
- package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.d.ts.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.js +3 -3
- package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.js.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-private.d.ts +3 -3
- package/build/src/rules/eslint/jsdoc/require-jsdoc-private.d.ts.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-private.js +3 -3
- package/build/src/rules/eslint/jsdoc/require-jsdoc-private.js.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-since.d.ts +3 -3
- package/build/src/rules/eslint/jsdoc/require-jsdoc-since.d.ts.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-since.js +8 -8
- package/build/src/rules/eslint/jsdoc/require-jsdoc-since.js.map +1 -1
- package/build/src/rules/eslint/nova/no-logger-dev.d.ts +3 -3
- package/build/src/rules/eslint/nova/no-logger-dev.d.ts.map +1 -1
- package/build/src/rules/eslint/nova/no-logger-dev.js +5 -5
- package/build/src/rules/eslint/nova/no-logger-dev.js.map +1 -1
- package/build/src/rules/eslint/patterns/no-assign-then-return.d.ts +3 -3
- package/build/src/rules/eslint/patterns/no-assign-then-return.d.ts.map +1 -1
- package/build/src/rules/eslint/patterns/no-assign-then-return.js +2 -2
- package/build/src/rules/eslint/patterns/no-assign-then-return.js.map +1 -1
- package/build/src/rules/eslint/patterns/no-await-in-loop.d.ts +7 -7
- package/build/src/rules/eslint/patterns/no-await-in-loop.d.ts.map +1 -1
- package/build/src/rules/eslint/patterns/no-await-in-loop.js +4 -4
- package/build/src/rules/eslint/patterns/no-await-in-loop.js.map +1 -1
- package/build/src/rules/eslint/patterns/no-boolean-var-for-if.d.ts +3 -3
- package/build/src/rules/eslint/patterns/no-boolean-var-for-if.d.ts.map +1 -1
- package/build/src/rules/eslint/patterns/no-boolean-var-for-if.js +2 -2
- package/build/src/rules/eslint/patterns/no-boolean-var-for-if.js.map +1 -1
- package/build/src/rules/eslint/patterns/no-bracket-assignment.d.ts +3 -3
- package/build/src/rules/eslint/patterns/no-bracket-assignment.d.ts.map +1 -1
- package/build/src/rules/eslint/patterns/no-bracket-assignment.js +2 -2
- package/build/src/rules/eslint/patterns/no-bracket-assignment.js.map +1 -1
- package/build/src/rules/eslint/patterns/no-bracket-method-call.d.ts +4 -4
- package/build/src/rules/eslint/patterns/no-bracket-method-call.d.ts.map +1 -1
- package/build/src/rules/eslint/patterns/no-bracket-method-call.js +2 -2
- package/build/src/rules/eslint/patterns/no-bracket-method-call.js.map +1 -1
- package/build/src/rules/eslint/patterns/no-template-curly-in-string.d.ts +3 -3
- package/build/src/rules/eslint/patterns/no-template-curly-in-string.d.ts.map +1 -1
- package/build/src/rules/eslint/patterns/no-template-curly-in-string.js +2 -2
- package/build/src/rules/eslint/patterns/no-template-curly-in-string.js.map +1 -1
- package/build/src/rules/eslint/patterns/no-use-before-define.d.ts +7 -7
- package/build/src/rules/eslint/patterns/no-use-before-define.d.ts.map +1 -1
- package/build/src/rules/eslint/patterns/no-use-before-define.js +2 -2
- package/build/src/rules/eslint/patterns/no-use-before-define.js.map +1 -1
- package/build/src/rules/eslint/regex/no-regex-literal-flags.d.ts +3 -3
- package/build/src/rules/eslint/regex/no-regex-literal-flags.d.ts.map +1 -1
- package/build/src/rules/eslint/regex/no-regex-literal-flags.js +2 -2
- package/build/src/rules/eslint/regex/no-regex-literal-flags.js.map +1 -1
- package/build/src/rules/eslint/regex/no-regex-literals.d.ts +4 -4
- package/build/src/rules/eslint/regex/no-regex-literals.d.ts.map +1 -1
- package/build/src/rules/eslint/regex/no-regex-literals.js +2 -2
- package/build/src/rules/eslint/regex/no-regex-literals.js.map +1 -1
- package/build/src/rules/eslint/safety/no-script-url.d.ts +4 -4
- package/build/src/rules/eslint/safety/no-script-url.d.ts.map +1 -1
- package/build/src/rules/eslint/safety/no-script-url.js +2 -2
- package/build/src/rules/eslint/safety/no-script-url.js.map +1 -1
- package/build/src/rules/eslint/syntax/no-destructuring.d.ts +8 -8
- package/build/src/rules/eslint/syntax/no-destructuring.d.ts.map +1 -1
- package/build/src/rules/eslint/syntax/no-destructuring.js +10 -10
- package/build/src/rules/eslint/syntax/no-destructuring.js.map +1 -1
- package/build/src/rules/eslint/syntax/no-numeric-literals.d.ts +6 -6
- package/build/src/rules/eslint/syntax/no-numeric-literals.d.ts.map +1 -1
- package/build/src/rules/eslint/syntax/no-numeric-literals.js +2 -2
- package/build/src/rules/eslint/syntax/no-numeric-literals.js.map +1 -1
- package/build/src/rules/eslint/syntax/no-optional-chaining.d.ts +3 -3
- package/build/src/rules/eslint/syntax/no-optional-chaining.d.ts.map +1 -1
- package/build/src/rules/eslint/syntax/no-optional-chaining.js +2 -2
- package/build/src/rules/eslint/syntax/no-optional-chaining.js.map +1 -1
- package/build/src/rules/eslint/syntax/no-rest-params.d.ts +4 -4
- package/build/src/rules/eslint/syntax/no-rest-params.d.ts.map +1 -1
- package/build/src/rules/eslint/syntax/no-rest-params.js +8 -8
- package/build/src/rules/eslint/syntax/no-rest-params.js.map +1 -1
- package/build/src/rules/eslint/typescript/no-catch-unknown-annotation.d.ts +3 -3
- package/build/src/rules/eslint/typescript/no-catch-unknown-annotation.d.ts.map +1 -1
- package/build/src/rules/eslint/typescript/no-catch-unknown-annotation.js +2 -2
- package/build/src/rules/eslint/typescript/no-catch-unknown-annotation.js.map +1 -1
- package/build/src/rules/eslint/typescript/no-explicit-any.d.ts +3 -3
- package/build/src/rules/eslint/typescript/no-explicit-any.d.ts.map +1 -1
- package/build/src/rules/eslint/typescript/no-explicit-any.js +2 -2
- package/build/src/rules/eslint/typescript/no-explicit-any.js.map +1 -1
- package/build/src/rules/eslint/typescript/no-inline-type-annotation.d.ts +3 -3
- package/build/src/rules/eslint/typescript/no-inline-type-annotation.d.ts.map +1 -1
- package/build/src/rules/eslint/typescript/no-inline-type-annotation.js +9 -9
- package/build/src/rules/eslint/typescript/no-inline-type-annotation.js.map +1 -1
- package/build/src/rules/eslint/typescript/no-shared-type-import.d.ts +4 -4
- package/build/src/rules/eslint/typescript/no-shared-type-import.d.ts.map +1 -1
- package/build/src/rules/eslint/typescript/no-shared-type-import.js +2 -2
- package/build/src/rules/eslint/typescript/no-shared-type-import.js.map +1 -1
- package/build/src/rules/eslint/typescript/require-bracket-property-access.d.ts +4 -4
- package/build/src/rules/eslint/typescript/require-bracket-property-access.d.ts.map +1 -1
- package/build/src/rules/eslint/typescript/require-bracket-property-access.js +2 -2
- package/build/src/rules/eslint/typescript/require-bracket-property-access.js.map +1 -1
- package/build/src/rules/eslint/typescript/require-type-naming.d.ts +6 -4
- package/build/src/rules/eslint/typescript/require-type-naming.d.ts.map +1 -1
- package/build/src/rules/eslint/typescript/require-type-naming.js +54 -8
- package/build/src/rules/eslint/typescript/require-type-naming.js.map +1 -1
- package/build/src/toolkit/bootstrap.d.ts +10 -10
- package/build/src/toolkit/bootstrap.d.ts.map +1 -1
- package/build/src/toolkit/bootstrap.js +33 -33
- package/build/src/toolkit/bootstrap.js.map +1 -1
- package/build/src/toolkit/cli-header.d.ts +4 -4
- package/build/src/toolkit/cli-header.d.ts.map +1 -1
- package/build/src/toolkit/cli-header.js +22 -22
- package/build/src/toolkit/cli-header.js.map +1 -1
- package/build/src/toolkit/logger.d.ts +9 -9
- package/build/src/toolkit/logger.d.ts.map +1 -1
- package/build/src/toolkit/logger.js +16 -16
- package/build/src/toolkit/logger.js.map +1 -1
- package/build/src/toolkit/markdown-table.d.ts +6 -6
- package/build/src/toolkit/markdown-table.d.ts.map +1 -1
- package/build/src/toolkit/markdown-table.js +2 -2
- package/build/src/toolkit/markdown-table.js.map +1 -1
- package/build/src/types/api/node-releases.d.ts +14 -14
- package/build/src/types/api/spdx-licenses.d.ts +17 -17
- package/build/src/types/cli/generate/github/funding.d.ts +28 -28
- package/build/src/types/cli/generate/github/issue-template.d.ts +87 -71
- package/build/src/types/cli/generate/github/workflows.d.ts +365 -302
- package/build/src/types/cli/generate/must-haves/agent-conventions.d.ts +29 -21
- package/build/src/types/cli/generate/must-haves/dotenv.d.ts +209 -205
- package/build/src/types/cli/generate/must-haves/editorconfig.d.ts +16 -16
- package/build/src/types/cli/generate/must-haves/gitignore.d.ts +188 -156
- package/build/src/types/cli/generate/must-haves/license.d.ts +27 -42
- package/build/src/types/cli/generate/must-haves/read-me.d.ts +105 -95
- package/build/src/types/cli/index.d.ts +73 -84
- package/build/src/types/cli/recipe/github/handle-gh-failure.d.ts +18 -0
- package/build/src/types/cli/recipe/github/sync-features.d.ts +67 -0
- package/build/src/types/cli/recipe/github/sync-identity.d.ts +107 -0
- package/build/src/types/cli/recipe/github/sync-policies.d.ts +70 -0
- package/build/src/types/cli/recipe/index.d.ts +21 -16
- package/build/src/types/cli/recipe/package-json/cleanup.d.ts +57 -55
- package/build/src/types/cli/recipe/package-json/normalize-artifacts.d.ts +44 -44
- package/build/src/types/cli/recipe/package-json/normalize-bundler.d.ts +36 -36
- package/build/src/types/cli/recipe/package-json/normalize-dependencies.d.ts +65 -65
- package/build/src/types/cli/recipe/package-json/normalize-modules.d.ts +37 -35
- package/build/src/types/cli/recipe/package-json/normalize-tooling.d.ts +39 -39
- package/build/src/types/cli/recipe/package-json/sync-environment.d.ts +60 -60
- package/build/src/types/cli/recipe/package-json/sync-identity.d.ts +51 -51
- package/build/src/types/cli/recipe/package-json/sync-ownership.d.ts +78 -78
- package/build/src/types/cli/scaffold/app/expressjs.d.ts +10 -10
- package/build/src/types/cli/scaffold/app/nextjs.d.ts +10 -10
- package/build/src/types/cli/scaffold/app/vite.d.ts +10 -10
- package/build/src/types/cli/scaffold/app/workers.d.ts +10 -10
- package/build/src/types/cli/scaffold/docs/docusaurus.d.ts +10 -10
- package/build/src/types/cli/scaffold/starter/base.d.ts +27 -27
- package/build/src/types/cli/utility/changelog.d.ts +189 -180
- package/build/src/types/cli/utility/initialize.d.ts +1135 -690
- package/build/src/types/cli/utility/run-recipes.d.ts +32 -11
- package/build/src/types/cli/utility/run-scripts.d.ts +126 -52
- package/build/src/types/cli/utility/transpile.d.ts +30 -30
- package/build/src/types/cli/utility/type-check.d.ts +30 -30
- package/build/src/types/cli/utility/version.d.ts +130 -130
- package/build/src/types/lib/constants.d.ts +13 -0
- package/build/src/types/lib/item.d.ts +158 -149
- package/build/src/types/lib/nova-config.d.ts +379 -191
- package/build/src/types/lib/regex.d.ts +762 -0
- package/build/src/types/lib/scaffold.d.ts +176 -149
- package/build/src/types/lib/utility.d.ts +395 -194
- package/build/src/types/lib/workflow-templates.d.ts +61 -56
- package/build/src/types/presets/eslint/dx-code-style.d.ts +1 -1
- package/build/src/types/presets/eslint/dx-ignore.d.ts +1 -1
- package/build/src/types/presets/eslint/fw-docusaurus.d.ts +1 -1
- package/build/src/types/presets/eslint/fw-expressjs.d.ts +1 -1
- package/build/src/types/presets/eslint/fw-nextjs.d.ts +1 -1
- package/build/src/types/presets/eslint/lang-javascript.d.ts +1 -1
- package/build/src/types/presets/eslint/lang-mdx.d.ts +1 -1
- package/build/src/types/presets/eslint/lang-typescript.d.ts +1 -1
- package/build/src/types/presets/eslint/runtime-browser.d.ts +1 -1
- package/build/src/types/presets/eslint/runtime-cloudflare-workers.d.ts +1 -1
- package/build/src/types/presets/eslint/runtime-edge.d.ts +1 -1
- package/build/src/types/presets/eslint/runtime-node.d.ts +1 -1
- package/build/src/types/presets/eslint/runtime-service-worker.d.ts +1 -1
- package/build/src/types/presets/eslint/runtime-web-worker.d.ts +1 -1
- package/build/src/types/presets/eslint/tool-vite.d.ts +1 -1
- package/build/src/types/rules/eslint/conventions/no-default-export-declaration.d.ts +30 -13
- package/build/src/types/rules/eslint/conventions/no-implicit-boolean.d.ts +84 -25
- package/build/src/types/rules/eslint/conventions/require-explicit-return.d.ts +47 -42
- package/build/src/types/rules/eslint/conventions/require-hash-private.d.ts +35 -12
- package/build/src/types/rules/eslint/conventions/require-kebab-case-filename.d.ts +35 -29
- package/build/src/types/rules/eslint/conventions/require-naming-convention.d.ts +212 -115
- package/build/src/types/rules/eslint/conventions/require-undefined-init.d.ts +34 -11
- package/build/src/types/rules/eslint/conventions/switch-case-blocks.d.ts +41 -18
- package/build/src/types/rules/eslint/formatting/no-complex-arrow-concise.d.ts +44 -30
- package/build/src/types/rules/eslint/formatting/no-multiline-strings.d.ts +67 -44
- package/build/src/types/rules/eslint/formatting/no-raw-text-in-code.d.ts +24 -10
- package/build/src/types/rules/eslint/formatting/no-ternary-in-template-literal.d.ts +23 -9
- package/build/src/types/rules/eslint/formatting/require-import-order.d.ts +51 -39
- package/build/src/types/rules/eslint/formatting/require-multiline-condition-groups.d.ts +42 -26
- package/build/src/types/rules/eslint/formatting/require-multiline-conditions.d.ts +36 -20
- package/build/src/types/rules/eslint/formatting/require-padding-lines.d.ts +144 -103
- package/build/src/types/rules/eslint/formatting/require-ternary-parens.d.ts +35 -12
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-body.d.ts +65 -29
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-hierarchy.d.ts +308 -134
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-param-alignment.d.ts +59 -52
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-param-name.d.ts +41 -26
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-private.d.ts +49 -17
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-since.d.ts +79 -11
- package/build/src/types/rules/eslint/nova/no-logger-dev.d.ts +35 -25
- package/build/src/types/rules/eslint/patterns/no-assign-then-return.d.ts +40 -17
- package/build/src/types/rules/eslint/patterns/no-await-in-loop.d.ts +53 -45
- package/build/src/types/rules/eslint/patterns/no-boolean-var-for-if.d.ts +34 -20
- package/build/src/types/rules/eslint/patterns/no-bracket-assignment.d.ts +36 -13
- package/build/src/types/rules/eslint/patterns/no-bracket-method-call.d.ts +43 -20
- package/build/src/types/rules/eslint/patterns/no-template-curly-in-string.d.ts +26 -12
- package/build/src/types/rules/eslint/patterns/no-use-before-define.d.ts +59 -45
- package/build/src/types/rules/eslint/regex/no-regex-literal-flags.d.ts +23 -9
- package/build/src/types/rules/eslint/regex/no-regex-literals.d.ts +31 -17
- package/build/src/types/rules/eslint/safety/no-script-url.d.ts +29 -15
- package/build/src/types/rules/eslint/syntax/no-destructuring.d.ts +61 -58
- package/build/src/types/rules/eslint/syntax/no-numeric-literals.d.ts +43 -29
- package/build/src/types/rules/eslint/syntax/no-optional-chaining.d.ts +23 -9
- package/build/src/types/rules/eslint/syntax/no-rest-params.d.ts +63 -31
- package/build/src/types/rules/eslint/typescript/no-catch-unknown-annotation.d.ts +34 -11
- package/build/src/types/rules/eslint/typescript/no-explicit-any.d.ts +23 -9
- package/build/src/types/rules/eslint/typescript/no-inline-type-annotation.d.ts +58 -32
- package/build/src/types/rules/eslint/typescript/no-shared-type-import.d.ts +32 -18
- package/build/src/types/rules/eslint/typescript/require-bracket-property-access.d.ts +50 -22
- package/build/src/types/rules/eslint/typescript/require-type-naming.d.ts +87 -20
- package/build/src/types/shared.d.ts +410 -365
- package/build/src/types/tests/api/node-releases.test.d.ts +87 -6
- package/build/src/types/tests/api/spdx-licenses.test.d.ts +48 -8
- package/build/src/types/tests/cli/generate/github/funding.test.d.ts +21 -13
- package/build/src/types/tests/cli/generate/github/issue-template.test.d.ts +26 -6
- package/build/src/types/tests/cli/generate/github/workflows-helpers.test.d.ts +206 -21
- package/build/src/types/tests/cli/generate/github/workflows.test.d.ts +556 -29
- package/build/src/types/tests/cli/generate/must-haves/agent-conventions.test.d.ts +39 -14
- package/build/src/types/tests/cli/generate/must-haves/dotenv.test.d.ts +28 -6
- package/build/src/types/tests/cli/generate/must-haves/editorconfig.test.d.ts +19 -11
- package/build/src/types/tests/cli/generate/must-haves/gitignore.test.d.ts +24 -6
- package/build/src/types/tests/cli/generate/must-haves/license.test.d.ts +151 -11
- package/build/src/types/tests/cli/generate/must-haves/read-me.test.d.ts +216 -18
- package/build/src/types/tests/cli/recipe/github/handle-gh-failure.test.d.ts +96 -0
- package/build/src/types/tests/cli/recipe/github/sync-features.test.d.ts +357 -0
- package/build/src/types/tests/cli/recipe/github/sync-identity.test.d.ts +475 -0
- package/build/src/types/tests/cli/recipe/github/sync-policies.test.d.ts +408 -0
- package/build/src/types/tests/cli/recipe/package-json/cleanup.test.d.ts +159 -20
- package/build/src/types/tests/cli/recipe/package-json/normalize-artifacts.test.d.ts +102 -15
- package/build/src/types/tests/cli/recipe/package-json/normalize-bundler.test.d.ts +102 -15
- package/build/src/types/tests/cli/recipe/package-json/normalize-dependencies.test.d.ts +106 -19
- package/build/src/types/tests/cli/recipe/package-json/normalize-modules.test.d.ts +101 -14
- package/build/src/types/tests/cli/recipe/package-json/normalize-tooling.test.d.ts +126 -14
- package/build/src/types/tests/cli/recipe/package-json/sync-environment.test.d.ts +101 -14
- package/build/src/types/tests/cli/recipe/package-json/sync-identity.test.d.ts +101 -14
- package/build/src/types/tests/cli/recipe/package-json/sync-ownership.test.d.ts +101 -14
- package/build/src/types/tests/cli/scaffold/app/expressjs.test.d.ts +59 -18
- package/build/src/types/tests/cli/scaffold/app/nextjs.test.d.ts +62 -19
- package/build/src/types/tests/cli/scaffold/app/vite.test.d.ts +60 -19
- package/build/src/types/tests/cli/scaffold/app/workers.test.d.ts +59 -18
- package/build/src/types/tests/cli/scaffold/docs/docusaurus.test.d.ts +59 -18
- package/build/src/types/tests/cli/scaffold/starter/base.test.d.ts +55 -18
- package/build/src/types/tests/cli/utility/changelog.test.d.ts +161 -32
- package/build/src/types/tests/cli/utility/initialize.test.d.ts +211 -5
- package/build/src/types/tests/cli/utility/run-recipes.test.d.ts +87 -9
- package/build/src/types/tests/cli/utility/run-scripts.test.d.ts +124 -24
- package/build/src/types/tests/cli/utility/transpile.test.d.ts +23 -11
- package/build/src/types/tests/cli/utility/type-check.test.d.ts +34 -9
- package/build/src/types/tests/cli/utility/version.test.d.ts +33 -4
- package/build/src/types/tests/lib/item.test.d.ts +191 -37
- package/build/src/types/tests/lib/nova-config.test.d.ts +1032 -69
- package/build/src/types/tests/lib/regex.test.d.ts +453 -27
- package/build/src/types/tests/lib/scaffold.test.d.ts +55 -12
- package/build/src/types/tests/lib/schema.test.d.ts +171 -16
- package/build/src/types/tests/lib/utility.test.d.ts +1151 -142
- package/build/src/types/tests/lib/workflow-templates.test.d.ts +17 -17
- package/build/src/types/tests/rules/eslint/conventions/no-default-export-declaration.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/conventions/no-implicit-boolean.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/conventions/require-explicit-return.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/conventions/require-hash-private.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/conventions/require-kebab-case-filename.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/conventions/require-naming-convention.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/conventions/require-undefined-init.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/conventions/switch-case-blocks.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/formatting/no-complex-arrow-concise.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/formatting/no-multiline-strings.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/formatting/no-raw-text-in-code.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/formatting/no-ternary-in-template-literal.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/formatting/require-import-order.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/formatting/require-multiline-condition-groups.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/formatting/require-multiline-conditions.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/formatting/require-padding-lines.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/formatting/require-ternary-parens.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-body.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-hierarchy.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-param-alignment.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-param-name.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-private.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-since.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/nova/no-logger-dev.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/patterns/no-assign-then-return.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/patterns/no-await-in-loop.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/patterns/no-boolean-var-for-if.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/patterns/no-bracket-assignment.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/patterns/no-bracket-method-call.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/patterns/no-template-curly-in-string.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/patterns/no-use-before-define.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/regex/no-regex-literal-flags.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/regex/no-regex-literals.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/safety/no-script-url.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/syntax/no-destructuring.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/syntax/no-numeric-literals.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/syntax/no-optional-chaining.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/syntax/no-rest-params.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/typescript/no-catch-unknown-annotation.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/typescript/no-explicit-any.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/typescript/no-inline-type-annotation.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/typescript/no-shared-type-import.test.d.ts +1 -1
- package/build/src/types/tests/rules/eslint/typescript/require-bracket-property-access.test.d.ts +3 -3
- package/build/src/types/tests/rules/eslint/typescript/require-type-naming.test.d.ts +1 -1
- package/build/src/types/tests/toolkit/bootstrap.test.d.ts +155 -40
- package/build/src/types/tests/toolkit/cli-header.test.d.ts +135 -22
- package/build/src/types/tests/toolkit/logger.test.d.ts +113 -5
- package/build/src/types/tests/toolkit/markdown-table.test.d.ts +150 -27
- package/build/src/types/tests/type-declarations.test.d.ts +4683 -300
- package/build/src/types/toolkit/bootstrap.d.ts +71 -47
- package/build/src/types/toolkit/cli-header.d.ts +98 -88
- package/build/src/types/toolkit/logger.d.ts +98 -53
- package/build/src/types/toolkit/markdown-table.d.ts +74 -72
- package/build/templates/generators/github/workflows/publish/targets/aws-amplify-nextjs.yml +2 -2
- package/build/templates/generators/github/workflows/publish/targets/cloudflare-pages-docusaurus.yml +2 -2
- package/build/templates/generators/github/workflows/publish/targets/github-action.yml +121 -0
- package/build/templates/generators/github/workflows/publish/targets/github-packages.yml +3 -2
- package/build/templates/generators/github/workflows/publish/targets/github-pages-docusaurus.yml +2 -2
- package/build/templates/generators/github/workflows/publish/targets/npm.yml +3 -2
- package/build/templates/generators/github/workflows/publish/targets/vercel-nextjs.yml +2 -2
- package/build/templates/generators/must-haves/agent-conventions/AGENTS.md +1 -0
- package/build/templates/generators/must-haves/agent-conventions/CLAUDE.md +1 -0
- package/build/templates/generators/must-haves/agent-conventions/PROJECT_RULES.md +1 -1
- package/build/templates/generators/must-haves/agent-conventions/conventions/typescript.md +412 -148
- package/build/templates/generators/must-haves/agent-conventions/conventions/universal.md +27 -3
- package/build/templates/generators/must-haves/agent-conventions/cursorrules +55 -0
- package/build/templates/generators/must-haves/dotenv/env +14 -0
- package/build/templates/generators/must-haves/dotenv/env.sample +14 -0
- package/build/templates/generators/must-haves/editorconfig/editorconfig +212 -0
- package/build/templates/generators/must-haves/gitignore/gitignore +179 -0
- package/build/templates/scaffold/app/nextjs/next.config.mjs +3 -1
- package/package.json +1 -1
|
@@ -2,12 +2,12 @@ import { promises as fs } from 'fs';
|
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import { parse as parseYaml, stringify as stringifyYaml, } from 'yaml';
|
|
5
|
-
import { LibNovaConfig } from '../../../lib/nova-config.js';
|
|
5
|
+
import { Runner as LibNovaConfig } from '../../../lib/nova-config.js';
|
|
6
6
|
import { LIB_REGEX_PATTERN_LEADING_DOT_SLASH, LIB_REGEX_PATTERN_TRAILING_NEWLINES, LIB_REGEX_PATTERN_TRAILING_NEWLINES_OR_NONE, LIB_REGEX_PATTERN_TRAILING_SLASH, LIB_REGEX_PATTERN_WORKFLOW_CONTEXT_EXPRESSION, LIB_REGEX_PATTERN_WORKFLOW_CONTEXT_SEPARATOR, LIB_REGEX_PATTERN_WORKFLOW_CONTEXT_WRAPPER_END, LIB_REGEX_PATTERN_WORKFLOW_CONTEXT_WRAPPER_START, LIB_REGEX_PATTERN_WORKFLOW_NAME, LIB_REGEX_PATTERN_WORKFLOW_RUN_NAME_CAPTURE, } from '../../../lib/regex.js';
|
|
7
7
|
import { isProjectRoot, pathExists, renameFileWithDate, resolveTemplatePath, saveGeneratedFile, } from '../../../lib/utility.js';
|
|
8
8
|
import { libWorkflowTemplatesMetadata } from '../../../lib/workflow-templates.js';
|
|
9
9
|
import { Logger } from '../../../toolkit/index.js';
|
|
10
|
-
export class
|
|
10
|
+
export class Runner {
|
|
11
11
|
static async run(options) {
|
|
12
12
|
const currentDirectory = process.cwd();
|
|
13
13
|
const isAtProjectRoot = await isProjectRoot(currentDirectory);
|
|
@@ -19,14 +19,14 @@ export class CliGenerateGithubWorkflows {
|
|
|
19
19
|
const isReplaceFile = options['replaceFile'] === true;
|
|
20
20
|
if (isDryRun === true) {
|
|
21
21
|
Logger.customize({
|
|
22
|
-
name: '
|
|
22
|
+
name: 'Runner.run',
|
|
23
23
|
purpose: 'options',
|
|
24
24
|
}).warn('Dry run enabled. File changes will not be made in this session.');
|
|
25
25
|
}
|
|
26
26
|
if (isReplaceFile === true) {
|
|
27
27
|
const replaceFileNotice = (isDryRun === true) ? 'This option has no effect during a dry run session.' : 'Backup file will not be created.';
|
|
28
28
|
Logger.customize({
|
|
29
|
-
name: '
|
|
29
|
+
name: 'Runner.run',
|
|
30
30
|
purpose: 'options',
|
|
31
31
|
}).warn(`Replace file enabled. ${replaceFileNotice}`);
|
|
32
32
|
}
|
|
@@ -34,7 +34,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
34
34
|
const workflows = config['workflows'];
|
|
35
35
|
if (workflows === undefined || workflows.length === 0) {
|
|
36
36
|
Logger.customize({
|
|
37
|
-
name: '
|
|
37
|
+
name: 'Runner.run',
|
|
38
38
|
purpose: 'skip',
|
|
39
39
|
}).info('No workflows configured.');
|
|
40
40
|
return 'completed';
|
|
@@ -47,7 +47,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
47
47
|
const duplicateKey = (entry['suffix'] !== undefined) ? `${entry['template']}-${entry['suffix']}` : entry['template'];
|
|
48
48
|
if (duplicateSet.has(duplicateKey) === true) {
|
|
49
49
|
Logger.customize({
|
|
50
|
-
name: '
|
|
50
|
+
name: 'Runner.run',
|
|
51
51
|
purpose: 'validate',
|
|
52
52
|
}).error(`Duplicate workflow ${chalk.cyan(`"${duplicateKey}"`)}. Each template must have a unique suffix when used multiple times.`);
|
|
53
53
|
hasDuplicateError = true;
|
|
@@ -58,24 +58,160 @@ export class CliGenerateGithubWorkflows {
|
|
|
58
58
|
process.exitCode = 1;
|
|
59
59
|
return 'cancelled';
|
|
60
60
|
}
|
|
61
|
-
if (
|
|
61
|
+
if (Runner.detectCircularDependsOn(workflows) === true) {
|
|
62
62
|
Logger.customize({
|
|
63
|
-
name: '
|
|
63
|
+
name: 'Runner.run',
|
|
64
64
|
purpose: 'validate',
|
|
65
65
|
}).error('Circular depends-on references detected. Aborting.');
|
|
66
66
|
process.exitCode = 1;
|
|
67
67
|
return 'cancelled';
|
|
68
68
|
}
|
|
69
|
+
const skippedWorkflowKeys = new Set();
|
|
70
|
+
for (const literalWorkflowEntry of workflows) {
|
|
71
|
+
const literalEntry = literalWorkflowEntry;
|
|
72
|
+
const literalTemplateName = literalEntry['template'];
|
|
73
|
+
const literalSuffix = literalEntry['suffix'];
|
|
74
|
+
const literalWorkflowKey = (literalSuffix !== undefined) ? `${literalTemplateName}-${literalSuffix}` : literalTemplateName;
|
|
75
|
+
const literalMetadataEntry = libWorkflowTemplatesMetadata.find((m) => m['name'] === literalTemplateName);
|
|
76
|
+
if (literalMetadataEntry === undefined) {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
const missingLiterals = [];
|
|
80
|
+
for (const variableEntry of Object.entries(literalMetadataEntry['variables'])) {
|
|
81
|
+
const templateVariableName = variableEntry[0];
|
|
82
|
+
const templateVariableMeta = variableEntry[1];
|
|
83
|
+
if (templateVariableMeta['format'] === 'literal') {
|
|
84
|
+
const templateLiteralValue = (literalEntry['settings'] !== undefined) ? literalEntry['settings'][templateVariableName] : undefined;
|
|
85
|
+
if (typeof templateLiteralValue !== 'string' || templateLiteralValue.trim() === '') {
|
|
86
|
+
missingLiterals.push(templateVariableName);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const targetsMetadataForValidation = literalMetadataEntry['targets'] ?? {};
|
|
91
|
+
const entryTargetsForValidation = literalEntry['targets'] ?? [];
|
|
92
|
+
for (const entryTargetForValidation of entryTargetsForValidation) {
|
|
93
|
+
const targetTypeForValidation = entryTargetForValidation['type'];
|
|
94
|
+
const targetMetadataForValidation = targetsMetadataForValidation[targetTypeForValidation];
|
|
95
|
+
if (targetMetadataForValidation === undefined) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
for (const variableEntry of Object.entries(targetMetadataForValidation['variables'])) {
|
|
99
|
+
const validationVariableName = variableEntry[0];
|
|
100
|
+
const validationVariableMeta = variableEntry[1];
|
|
101
|
+
if (validationVariableMeta['format'] === 'literal') {
|
|
102
|
+
const validationLiteralValue = (literalEntry['settings'] !== undefined) ? literalEntry['settings'][validationVariableName] : undefined;
|
|
103
|
+
if (typeof validationLiteralValue !== 'string' || validationLiteralValue.trim() === '') {
|
|
104
|
+
if (missingLiterals.includes(validationVariableName) === false) {
|
|
105
|
+
missingLiterals.push(validationVariableName);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (missingLiterals.length > 0) {
|
|
112
|
+
Logger.customize({
|
|
113
|
+
name: 'Runner.run',
|
|
114
|
+
purpose: 'validate',
|
|
115
|
+
}).error(`Workflow ${chalk.cyan(`"${literalWorkflowKey}"`)} is missing required literal settings: ${missingLiterals.join(', ')}. Skipping.`);
|
|
116
|
+
skippedWorkflowKeys.add(literalWorkflowKey);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
const globalUniquenessMap = new Map();
|
|
120
|
+
const uniquenessErrors = [];
|
|
121
|
+
for (const uniquenessWorkflowEntry of workflows) {
|
|
122
|
+
const uniquenessEntry = uniquenessWorkflowEntry;
|
|
123
|
+
const uniquenessTemplateName = uniquenessEntry['template'];
|
|
124
|
+
const uniquenessSuffix = uniquenessEntry['suffix'];
|
|
125
|
+
const uniquenessWorkflowKey = (uniquenessSuffix !== undefined) ? `${uniquenessTemplateName}-${uniquenessSuffix}` : uniquenessTemplateName;
|
|
126
|
+
if (skippedWorkflowKeys.has(uniquenessWorkflowKey) === true) {
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
const uniquenessMetadataEntry = libWorkflowTemplatesMetadata.find((m) => m['name'] === uniquenessTemplateName);
|
|
130
|
+
if (uniquenessMetadataEntry === undefined) {
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
const uniquenessTargetsMetadata = uniquenessMetadataEntry['targets'] ?? {};
|
|
134
|
+
const uniquenessEntryTargets = uniquenessEntry['targets'] ?? [];
|
|
135
|
+
for (const uniquenessTarget of uniquenessEntryTargets) {
|
|
136
|
+
const entryTargetForUniqueness = uniquenessTarget;
|
|
137
|
+
const targetTypeForUniqueness = entryTargetForUniqueness['type'];
|
|
138
|
+
const targetMetadataForUniqueness = uniquenessTargetsMetadata[targetTypeForUniqueness];
|
|
139
|
+
if (targetMetadataForUniqueness === undefined) {
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
const uniquenessKeyForTarget = targetMetadataForUniqueness['uniquenessKey'];
|
|
143
|
+
if (uniquenessKeyForTarget === undefined) {
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
const uniquenessKeyResolvedValues = [];
|
|
147
|
+
const uniquenessKeyDetailEntries = [];
|
|
148
|
+
for (const uniquenessKeyVariableName of uniquenessKeyForTarget) {
|
|
149
|
+
const variableName = uniquenessKeyVariableName;
|
|
150
|
+
const variableMeta = targetMetadataForUniqueness['variables'][variableName];
|
|
151
|
+
const settingValue = (uniquenessEntry['settings'] !== undefined) ? uniquenessEntry['settings'][variableName] : undefined;
|
|
152
|
+
const resolvedValue = settingValue
|
|
153
|
+
?? (variableMeta !== undefined ? variableMeta['default'] : undefined)
|
|
154
|
+
?? variableName;
|
|
155
|
+
const uniquenessKeyDetailEntry = `${variableName}=${resolvedValue}`;
|
|
156
|
+
uniquenessKeyResolvedValues.push(resolvedValue);
|
|
157
|
+
uniquenessKeyDetailEntries.push(uniquenessKeyDetailEntry);
|
|
158
|
+
}
|
|
159
|
+
const uniquenessKeyComposite = [
|
|
160
|
+
targetTypeForUniqueness,
|
|
161
|
+
...uniquenessKeyResolvedValues,
|
|
162
|
+
].join('::');
|
|
163
|
+
const uniquenessKeyExisting = globalUniquenessMap.get(uniquenessKeyComposite);
|
|
164
|
+
if (uniquenessKeyExisting !== undefined) {
|
|
165
|
+
skippedWorkflowKeys.add(uniquenessKeyExisting['workflowKey']);
|
|
166
|
+
skippedWorkflowKeys.add(uniquenessWorkflowKey);
|
|
167
|
+
const isSameWorkflow = uniquenessKeyExisting['workflowKey'] === uniquenessWorkflowKey;
|
|
168
|
+
if (uniquenessKeyDetailEntries.length === 0) {
|
|
169
|
+
if (isSameWorkflow === true) {
|
|
170
|
+
uniquenessErrors.push(`Singleton target violation: workflow "${uniquenessWorkflowKey}" declares multiple "${targetTypeForUniqueness}" targets, but only one is allowed.`);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
uniquenessErrors.push(`Singleton target collision: only one "${targetTypeForUniqueness}" target may be declared across all workflows. Found in workflow "${uniquenessKeyExisting['workflowKey']}" and again in workflow "${uniquenessWorkflowKey}".`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
else if (isSameWorkflow === true) {
|
|
177
|
+
uniquenessErrors.push(`Destination collision in workflow "${uniquenessWorkflowKey}": multiple "${targetTypeForUniqueness}" targets declare the same destination (${uniquenessKeyDetailEntries.join(', ')}). Each destination must be declared in only one target.`);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
uniquenessErrors.push(`Cross-workflow destination collision: target "${targetTypeForUniqueness}" with destination (${uniquenessKeyDetailEntries.join(', ')}) is declared in workflow "${uniquenessKeyExisting['workflowKey']}" and again in workflow "${uniquenessWorkflowKey}". Each destination must be declared in only one workflow.`);
|
|
181
|
+
}
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
const uniquenessKeyMapValue = {
|
|
185
|
+
workflowKey: uniquenessWorkflowKey,
|
|
186
|
+
targetType: targetTypeForUniqueness,
|
|
187
|
+
detailEntries: uniquenessKeyDetailEntries,
|
|
188
|
+
};
|
|
189
|
+
globalUniquenessMap.set(uniquenessKeyComposite, uniquenessKeyMapValue);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (uniquenessErrors.length > 0) {
|
|
193
|
+
for (const uniquenessError of uniquenessErrors) {
|
|
194
|
+
Logger.customize({
|
|
195
|
+
name: 'Runner.run',
|
|
196
|
+
purpose: 'validate',
|
|
197
|
+
}).error(uniquenessError);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
69
200
|
const generatedSet = new Set();
|
|
70
201
|
const outputFileNames = new Set();
|
|
71
202
|
const setupLines = [];
|
|
72
203
|
for (const workflowEntry of workflows) {
|
|
73
204
|
const entry = workflowEntry;
|
|
74
205
|
const templateName = entry['template'];
|
|
206
|
+
const workflowSuffix = entry['suffix'];
|
|
207
|
+
const entryWorkflowKey = (workflowSuffix !== undefined) ? `${templateName}-${workflowSuffix}` : templateName;
|
|
208
|
+
if (skippedWorkflowKeys.has(entryWorkflowKey) === true) {
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
75
211
|
const metadataEntry = libWorkflowTemplatesMetadata.find((m) => m['name'] === templateName);
|
|
76
212
|
if (metadataEntry === undefined) {
|
|
77
213
|
Logger.customize({
|
|
78
|
-
name: '
|
|
214
|
+
name: 'Runner.run',
|
|
79
215
|
purpose: 'validate',
|
|
80
216
|
}).error(`Unknown template ${chalk.cyan(`"${templateName}"`)}. Skipping.`);
|
|
81
217
|
continue;
|
|
@@ -84,33 +220,15 @@ export class CliGenerateGithubWorkflows {
|
|
|
84
220
|
const templateDirExists = await pathExists(templateDirPath);
|
|
85
221
|
if (templateDirExists !== true) {
|
|
86
222
|
Logger.customize({
|
|
87
|
-
name: '
|
|
223
|
+
name: 'Runner.run',
|
|
88
224
|
purpose: 'validate',
|
|
89
225
|
}).error(`Template directory ${chalk.cyan(`"${templateName}"`)} not found. Skipping.`);
|
|
90
226
|
continue;
|
|
91
227
|
}
|
|
92
|
-
const missingLiterals = [];
|
|
93
|
-
for (const variableEntry of Object.entries(metadataEntry['variables'])) {
|
|
94
|
-
const variableName = variableEntry[0];
|
|
95
|
-
const variableMeta = variableEntry[1];
|
|
96
|
-
if (variableMeta['format'] === 'literal') {
|
|
97
|
-
if (entry['settings'] === undefined || entry['settings'][variableName] === undefined) {
|
|
98
|
-
missingLiterals.push(variableName);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (missingLiterals.length > 0) {
|
|
103
|
-
Logger.customize({
|
|
104
|
-
name: 'CliGenerateGithubWorkflows.run',
|
|
105
|
-
purpose: 'validate',
|
|
106
|
-
}).error(`Template ${chalk.cyan(`"${templateName}"`)} is missing required literal settings: ${missingLiterals.join(', ')}. Skipping.`);
|
|
107
|
-
continue;
|
|
108
|
-
}
|
|
109
|
-
const workflowSuffix = entry['suffix'];
|
|
110
228
|
const outputFileName = (workflowSuffix !== undefined) ? `nova-${templateName}-${workflowSuffix}.yml` : `nova-${templateName}.yml`;
|
|
111
229
|
if (outputFileNames.has(outputFileName) === true) {
|
|
112
230
|
Logger.customize({
|
|
113
|
-
name: '
|
|
231
|
+
name: 'Runner.run',
|
|
114
232
|
purpose: 'validate',
|
|
115
233
|
}).error(`Duplicate output filename ${chalk.cyan(`"${outputFileName}"`)}. Skipping.`);
|
|
116
234
|
continue;
|
|
@@ -123,7 +241,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
123
241
|
}
|
|
124
242
|
catch {
|
|
125
243
|
Logger.customize({
|
|
126
|
-
name: '
|
|
244
|
+
name: 'Runner.run',
|
|
127
245
|
purpose: 'read',
|
|
128
246
|
}).error(`Failed to read base template ${chalk.cyan(`"${templateName}/base.yml"`)}. Skipping.`);
|
|
129
247
|
continue;
|
|
@@ -140,7 +258,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
140
258
|
const triggerFileExists = await pathExists(triggerFilePath);
|
|
141
259
|
if (triggerFileExists !== true) {
|
|
142
260
|
Logger.customize({
|
|
143
|
-
name: '
|
|
261
|
+
name: 'Runner.run',
|
|
144
262
|
purpose: 'validate',
|
|
145
263
|
}).error(`Trigger file ${chalk.cyan(`"${triggerFileName}"`)} not found for template ${chalk.cyan(`"${templateName}"`)}. Skipping workflow.`);
|
|
146
264
|
hasTriggerError = true;
|
|
@@ -152,7 +270,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
152
270
|
}
|
|
153
271
|
catch {
|
|
154
272
|
Logger.customize({
|
|
155
|
-
name: '
|
|
273
|
+
name: 'Runner.run',
|
|
156
274
|
purpose: 'read',
|
|
157
275
|
}).error(`Failed to read trigger file ${chalk.cyan(`"${triggerFileName}"`)}. Skipping workflow.`);
|
|
158
276
|
hasTriggerError = true;
|
|
@@ -182,7 +300,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
182
300
|
const entryLabel = (workflowSuffix !== undefined) ? `${templateName}-${workflowSuffix}` : templateName;
|
|
183
301
|
if (dependsOnEntries.length === 0) {
|
|
184
302
|
Logger.customize({
|
|
185
|
-
name: '
|
|
303
|
+
name: 'Runner.run',
|
|
186
304
|
purpose: 'validate',
|
|
187
305
|
}).error(`Workflow ${chalk.cyan(`"${entryLabel}"`)} uses a trigger that requires depends-on, but no depends-on value is configured. Skipping.`);
|
|
188
306
|
continue;
|
|
@@ -197,7 +315,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
197
315
|
});
|
|
198
316
|
if (dependsOnTarget === undefined) {
|
|
199
317
|
Logger.customize({
|
|
200
|
-
name: '
|
|
318
|
+
name: 'Runner.run',
|
|
201
319
|
purpose: 'validate',
|
|
202
320
|
}).error(`Workflow ${chalk.cyan(`"${entryLabel}"`)} depends on ${chalk.cyan(`"${entry2}"`)} which does not exist. Skipping.`);
|
|
203
321
|
hasDependsOnError = true;
|
|
@@ -216,7 +334,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
216
334
|
}
|
|
217
335
|
catch {
|
|
218
336
|
Logger.customize({
|
|
219
|
-
name: '
|
|
337
|
+
name: 'Runner.run',
|
|
220
338
|
purpose: 'read',
|
|
221
339
|
}).error(`Failed to resolve depends-on workflow name for ${chalk.cyan(`"${entry2}"`)}. Skipping.`);
|
|
222
340
|
hasDependsOnError = true;
|
|
@@ -250,9 +368,9 @@ export class CliGenerateGithubWorkflows {
|
|
|
250
368
|
const indentedTriggerLines = triggerYaml.split('\n').map((line) => (line.trim() === '') ? '' : ` ${line}`);
|
|
251
369
|
const indentedTriggerYaml = indentedTriggerLines.join('\n').replace(LIB_REGEX_PATTERN_TRAILING_NEWLINES, '');
|
|
252
370
|
const needsManuallyFallback = metadataEntry['needsManuallyFallback'] ?? true;
|
|
253
|
-
const mergedRunName =
|
|
254
|
-
const mergedPublishCondition =
|
|
255
|
-
const mergedJobsCondition =
|
|
371
|
+
const mergedRunName = Runner.buildMergedRunName(triggerDataList, needsManuallyFallback);
|
|
372
|
+
const mergedPublishCondition = Runner.buildMergedPublishCondition(triggerDataList);
|
|
373
|
+
const mergedJobsCondition = Runner.buildMergedJobsCondition(triggerDataList);
|
|
256
374
|
const jobsConditionLine = (mergedJobsCondition !== '') ? ` if: "${mergedJobsCondition}"\n` : '';
|
|
257
375
|
content = content.replace('[__RUN_NAME__]', mergedRunName);
|
|
258
376
|
content = content.replace('[__TRIGGERS__]', indentedTriggerYaml);
|
|
@@ -265,14 +383,14 @@ export class CliGenerateGithubWorkflows {
|
|
|
265
383
|
let hasPublishValidationError = false;
|
|
266
384
|
if (supportsTargets !== true && entryTargets.length > 0) {
|
|
267
385
|
Logger.customize({
|
|
268
|
-
name: '
|
|
386
|
+
name: 'Runner.run',
|
|
269
387
|
purpose: 'validate',
|
|
270
388
|
}).error(`Template ${chalk.cyan(`"${templateName}"`)} does not support targets but the workflow entry declares targets. Skipping.`);
|
|
271
389
|
hasPublishValidationError = true;
|
|
272
390
|
}
|
|
273
391
|
if (supportsScopes !== true && entryScopes.length > 0) {
|
|
274
392
|
Logger.customize({
|
|
275
|
-
name: '
|
|
393
|
+
name: 'Runner.run',
|
|
276
394
|
purpose: 'validate',
|
|
277
395
|
}).error(`Template ${chalk.cyan(`"${templateName}"`)} does not support scopes but the workflow entry declares scopes. Skipping.`);
|
|
278
396
|
hasPublishValidationError = true;
|
|
@@ -289,7 +407,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
289
407
|
const targetWorkingDir = entryTarget['workingDir'];
|
|
290
408
|
if (targetsMetadata[targetType] === undefined) {
|
|
291
409
|
Logger.customize({
|
|
292
|
-
name: '
|
|
410
|
+
name: 'Runner.run',
|
|
293
411
|
purpose: 'validate',
|
|
294
412
|
}).error(`Target type ${chalk.cyan(`"${targetType}"`)} is not supported by template ${chalk.cyan(`"${templateName}"`)}. Skipping.`);
|
|
295
413
|
hasPublishValidationError = true;
|
|
@@ -298,7 +416,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
298
416
|
const targetTupleKey = `${targetType}::${targetWorkingDir}`;
|
|
299
417
|
if (targetTupleSet.has(targetTupleKey) === true) {
|
|
300
418
|
Logger.customize({
|
|
301
|
-
name: '
|
|
419
|
+
name: 'Runner.run',
|
|
302
420
|
purpose: 'validate',
|
|
303
421
|
}).error(`Duplicate target ${chalk.cyan(`"${targetType}"`)} at ${chalk.cyan(`"${targetWorkingDir}"`)}. Each target type and working directory pair must be unique. Skipping.`);
|
|
304
422
|
hasPublishValidationError = true;
|
|
@@ -307,7 +425,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
307
425
|
targetTupleSet.add(targetTupleKey);
|
|
308
426
|
if (configWorkspaces[targetWorkingDir] === undefined) {
|
|
309
427
|
Logger.customize({
|
|
310
|
-
name: '
|
|
428
|
+
name: 'Runner.run',
|
|
311
429
|
purpose: 'validate',
|
|
312
430
|
}).error(`Target working directory ${chalk.cyan(`"${targetWorkingDir}"`)} is not a registered workspace. Skipping.`);
|
|
313
431
|
hasPublishValidationError = true;
|
|
@@ -322,10 +440,10 @@ export class CliGenerateGithubWorkflows {
|
|
|
322
440
|
if (supportsScopes === true && entryScopes.length > 0) {
|
|
323
441
|
for (const entryScope of entryScopes) {
|
|
324
442
|
const scopePath = entryScope;
|
|
325
|
-
const resolvedWorkspaceName =
|
|
443
|
+
const resolvedWorkspaceName = Runner.resolveWorkspaceName(configWorkspaces, scopePath);
|
|
326
444
|
if (resolvedWorkspaceName === undefined) {
|
|
327
445
|
Logger.customize({
|
|
328
|
-
name: '
|
|
446
|
+
name: 'Runner.run',
|
|
329
447
|
purpose: 'validate',
|
|
330
448
|
}).error(`Scope ${chalk.cyan(`"${scopePath}"`)} is not a registered workspace. Skipping.`);
|
|
331
449
|
hasPublishValidationError = true;
|
|
@@ -339,39 +457,26 @@ export class CliGenerateGithubWorkflows {
|
|
|
339
457
|
continue;
|
|
340
458
|
}
|
|
341
459
|
if (supportsTargets === true) {
|
|
342
|
-
const useTurbo = await
|
|
343
|
-
const checkCommand =
|
|
344
|
-
const buildCommand =
|
|
460
|
+
const useTurbo = await Runner.detectTurbo(currentDirectory);
|
|
461
|
+
const checkCommand = Runner.buildCommand('check', resolvedWorkspaceNames, useTurbo);
|
|
462
|
+
const buildCommand = Runner.buildCommand('build', resolvedWorkspaceNames, useTurbo);
|
|
345
463
|
content = content.replace('[__CHECK_COMMAND__]', checkCommand);
|
|
346
464
|
content = content.replace('[__BUILD_COMMAND__]', buildCommand);
|
|
347
|
-
const
|
|
348
|
-
let uploadArtifactStep = '';
|
|
349
|
-
if (artifactPathsBlock !== '') {
|
|
350
|
-
const uploadArtifactStepLines = [
|
|
351
|
-
' - name: "Upload build artifacts"',
|
|
352
|
-
' uses: "actions/upload-artifact@v4"',
|
|
353
|
-
' with:',
|
|
354
|
-
' name: "build-output"',
|
|
355
|
-
' retention-days: 1',
|
|
356
|
-
' path: |',
|
|
357
|
-
artifactPathsBlock,
|
|
358
|
-
];
|
|
359
|
-
uploadArtifactStep = uploadArtifactStepLines.join('\n');
|
|
360
|
-
}
|
|
465
|
+
const uploadArtifactStep = Runner.renderUploadArtifactSteps(entryTargets, targetsMetadata);
|
|
361
466
|
content = content.replace('[__UPLOAD_ARTIFACT_STEP__]', uploadArtifactStep);
|
|
362
467
|
const resolvedTargetFragments = [];
|
|
363
468
|
let hasTargetFragmentError = false;
|
|
364
469
|
for (const entryTarget of entryTargets) {
|
|
365
470
|
const currentEntryTarget = entryTarget;
|
|
366
|
-
const
|
|
367
|
-
const
|
|
368
|
-
const targetFragmentPath = join(templateDirPath, 'targets', `${
|
|
471
|
+
const fragmentTargetType = currentEntryTarget['type'];
|
|
472
|
+
const fragmentTargetWorkingDir = currentEntryTarget['workingDir'];
|
|
473
|
+
const targetFragmentPath = join(templateDirPath, 'targets', `${fragmentTargetType}.yml`);
|
|
369
474
|
const targetFragmentExists = await pathExists(targetFragmentPath);
|
|
370
475
|
if (targetFragmentExists !== true) {
|
|
371
476
|
Logger.customize({
|
|
372
|
-
name: '
|
|
477
|
+
name: 'Runner.run',
|
|
373
478
|
purpose: 'validate',
|
|
374
|
-
}).error(`Target fragment ${chalk.cyan(`"${
|
|
479
|
+
}).error(`Target fragment ${chalk.cyan(`"${fragmentTargetType}.yml"`)} not found for template ${chalk.cyan(`"${templateName}"`)}. Skipping.`);
|
|
375
480
|
hasTargetFragmentError = true;
|
|
376
481
|
break;
|
|
377
482
|
}
|
|
@@ -381,36 +486,38 @@ export class CliGenerateGithubWorkflows {
|
|
|
381
486
|
}
|
|
382
487
|
catch {
|
|
383
488
|
Logger.customize({
|
|
384
|
-
name: '
|
|
489
|
+
name: 'Runner.run',
|
|
385
490
|
purpose: 'read',
|
|
386
|
-
}).error(`Failed to read target fragment ${chalk.cyan(`"${
|
|
491
|
+
}).error(`Failed to read target fragment ${chalk.cyan(`"${fragmentTargetType}.yml"`)}. Skipping.`);
|
|
387
492
|
hasTargetFragmentError = true;
|
|
388
493
|
break;
|
|
389
494
|
}
|
|
390
|
-
const targetId =
|
|
495
|
+
const targetId = Runner.slugifyWorkingDir(fragmentTargetWorkingDir);
|
|
391
496
|
let targetFragmentResolvedContent = targetFragmentRawContent;
|
|
392
497
|
targetFragmentResolvedContent = targetFragmentResolvedContent.replaceAll('[__TARGET_ID__]', targetId);
|
|
393
|
-
targetFragmentResolvedContent = targetFragmentResolvedContent.replaceAll('[__WORKING_DIR__]',
|
|
498
|
+
targetFragmentResolvedContent = targetFragmentResolvedContent.replaceAll('[__WORKING_DIR__]', fragmentTargetWorkingDir);
|
|
499
|
+
const artifactName = Runner.buildArtifactName(fragmentTargetType, targetId);
|
|
500
|
+
targetFragmentResolvedContent = targetFragmentResolvedContent.replaceAll('[__ARTIFACT_NAME__]', artifactName);
|
|
394
501
|
const targetNeeds = currentEntryTarget['needs'] ?? [];
|
|
395
|
-
const targetNeedsJobIds = targetNeeds.map((targetNeedWorkingDir) => `publish-${
|
|
502
|
+
const targetNeedsJobIds = targetNeeds.map((targetNeedWorkingDir) => `publish-${fragmentTargetType}-${Runner.slugifyWorkingDir(targetNeedWorkingDir)}`);
|
|
396
503
|
const targetNeedsValue = (targetNeedsJobIds.length === 0) ? '"build"' : `["build", ${targetNeedsJobIds.map((targetNeedsJobId) => `"${targetNeedsJobId}"`).join(', ')}]`;
|
|
397
504
|
targetFragmentResolvedContent = targetFragmentResolvedContent.replace('[__NEEDS__]', targetNeedsValue);
|
|
398
505
|
const targetJobsConditionLine = (mergedJobsCondition !== '') ? ` if: "${mergedJobsCondition}"\n` : '';
|
|
399
506
|
targetFragmentResolvedContent = targetFragmentResolvedContent.replace('[__JOBS_CONDITION__]\n', targetJobsConditionLine);
|
|
400
|
-
const targetMetadata = targetsMetadata[
|
|
507
|
+
const targetMetadata = targetsMetadata[fragmentTargetType];
|
|
401
508
|
const mergedVariables = {
|
|
402
509
|
...metadataEntry['variables'],
|
|
403
510
|
...(targetMetadata !== undefined) ? targetMetadata['variables'] : {},
|
|
404
511
|
};
|
|
405
|
-
targetFragmentResolvedContent =
|
|
512
|
+
targetFragmentResolvedContent = Runner.substituteVariables(targetFragmentResolvedContent, mergedVariables, entry['settings']);
|
|
406
513
|
try {
|
|
407
514
|
parseYaml(targetFragmentResolvedContent);
|
|
408
515
|
}
|
|
409
516
|
catch {
|
|
410
517
|
Logger.customize({
|
|
411
|
-
name: '
|
|
518
|
+
name: 'Runner.run',
|
|
412
519
|
purpose: 'validate',
|
|
413
|
-
}).error(`Target fragment ${chalk.cyan(`"${
|
|
520
|
+
}).error(`Target fragment ${chalk.cyan(`"${fragmentTargetType}.yml"`)} produced invalid YAML. Skipping.`);
|
|
414
521
|
hasTargetFragmentError = true;
|
|
415
522
|
break;
|
|
416
523
|
}
|
|
@@ -433,7 +540,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
433
540
|
}
|
|
434
541
|
catch {
|
|
435
542
|
Logger.customize({
|
|
436
|
-
name: '
|
|
543
|
+
name: 'Runner.run',
|
|
437
544
|
purpose: 'validate',
|
|
438
545
|
}).error(`Base template for ${chalk.cyan(`"${templateName}"`)} produced invalid YAML after target injection. Skipping.`);
|
|
439
546
|
continue;
|
|
@@ -442,30 +549,34 @@ export class CliGenerateGithubWorkflows {
|
|
|
442
549
|
}
|
|
443
550
|
}
|
|
444
551
|
content = content.replaceAll('[__WORKFLOW_ID__]', (workflowSuffix !== undefined) ? ` (${workflowSuffix})` : '');
|
|
445
|
-
const substituted =
|
|
552
|
+
const substituted = Runner.substituteVariables(content, metadataEntry['variables'], entry['settings']);
|
|
446
553
|
try {
|
|
447
554
|
parseYaml(substituted);
|
|
448
555
|
}
|
|
449
556
|
catch {
|
|
450
557
|
Logger.customize({
|
|
451
|
-
name: '
|
|
558
|
+
name: 'Runner.run',
|
|
452
559
|
purpose: 'validate',
|
|
453
560
|
}).error(`Generated YAML for ${chalk.cyan(`"${outputFileName}"`)} is invalid. Skipping.`);
|
|
454
561
|
continue;
|
|
455
562
|
}
|
|
456
563
|
generatedSet.add(outputFileName);
|
|
457
|
-
const entrySetupLines =
|
|
564
|
+
const entrySetupLines = Runner.buildEntrySetupLines(entry, metadataEntry, outputFileName);
|
|
458
565
|
setupLines.push(...entrySetupLines);
|
|
459
566
|
if (isDryRun === true) {
|
|
460
567
|
const displayPath = `.github/workflows/${outputFileName}`;
|
|
461
568
|
Logger.customize({
|
|
462
|
-
name: '
|
|
569
|
+
name: 'Runner.run',
|
|
463
570
|
purpose: 'dry-run',
|
|
464
571
|
}).info(`Would generate ${chalk.cyan(`"${displayPath}"`)}.`);
|
|
465
572
|
continue;
|
|
466
573
|
}
|
|
467
574
|
const targetPath = join(workflowsDirectory, outputFileName);
|
|
468
|
-
await saveGeneratedFile(targetPath, substituted, isReplaceFile
|
|
575
|
+
await saveGeneratedFile(targetPath, substituted, isReplaceFile, {
|
|
576
|
+
command: 'nova generate github workflows',
|
|
577
|
+
docsSlug: 'cli/generators/github/workflows',
|
|
578
|
+
mode: 'strict',
|
|
579
|
+
});
|
|
469
580
|
}
|
|
470
581
|
if (isDryRun !== true && await pathExists(workflowsDirectory) === true) {
|
|
471
582
|
let existingEntries = [];
|
|
@@ -475,31 +586,31 @@ export class CliGenerateGithubWorkflows {
|
|
|
475
586
|
catch {
|
|
476
587
|
}
|
|
477
588
|
for (const existingEntry of existingEntries) {
|
|
478
|
-
const
|
|
479
|
-
if (
|
|
589
|
+
const existingDirent = existingEntry;
|
|
590
|
+
if (existingDirent.isFile() !== true) {
|
|
480
591
|
continue;
|
|
481
592
|
}
|
|
482
|
-
const isOrphan =
|
|
483
|
-
&&
|
|
484
|
-
&& generatedSet.has(
|
|
485
|
-
const isBackup =
|
|
593
|
+
const isOrphan = existingDirent.name.startsWith('nova-') === true
|
|
594
|
+
&& existingDirent.name.endsWith('.yml') === true
|
|
595
|
+
&& generatedSet.has(existingDirent.name) === false;
|
|
596
|
+
const isBackup = existingDirent.name.includes('.nova-backup.') === true;
|
|
486
597
|
if (isOrphan !== true || isBackup === true) {
|
|
487
598
|
continue;
|
|
488
599
|
}
|
|
489
|
-
const orphanPath = join(workflowsDirectory,
|
|
600
|
+
const orphanPath = join(workflowsDirectory, existingDirent.name);
|
|
490
601
|
if (isReplaceFile === true) {
|
|
491
602
|
await fs.unlink(orphanPath);
|
|
492
603
|
Logger.customize({
|
|
493
|
-
name: '
|
|
604
|
+
name: 'Runner.run',
|
|
494
605
|
purpose: 'cleanup',
|
|
495
|
-
}).info(`Deleted orphan ${chalk.cyan(`"${
|
|
606
|
+
}).info(`Deleted orphan ${chalk.cyan(`"${existingDirent.name}"`)}.`);
|
|
496
607
|
}
|
|
497
608
|
else {
|
|
498
609
|
await renameFileWithDate(orphanPath);
|
|
499
610
|
Logger.customize({
|
|
500
|
-
name: '
|
|
611
|
+
name: 'Runner.run',
|
|
501
612
|
purpose: 'cleanup',
|
|
502
|
-
}).info(`Backed up orphan ${chalk.cyan(`"${
|
|
613
|
+
}).info(`Backed up orphan ${chalk.cyan(`"${existingDirent.name}"`)}.`);
|
|
503
614
|
}
|
|
504
615
|
}
|
|
505
616
|
}
|
|
@@ -509,7 +620,7 @@ export class CliGenerateGithubWorkflows {
|
|
|
509
620
|
setupLines.join('\n'),
|
|
510
621
|
].join('\n');
|
|
511
622
|
Logger.customize({
|
|
512
|
-
name: '
|
|
623
|
+
name: 'Runner.run',
|
|
513
624
|
purpose: 'setup',
|
|
514
625
|
padTop: 1,
|
|
515
626
|
}).info(setupMessage);
|
|
@@ -617,12 +728,12 @@ export class CliGenerateGithubWorkflows {
|
|
|
617
728
|
continue;
|
|
618
729
|
}
|
|
619
730
|
if (variableMeta['format'] === 'secret') {
|
|
620
|
-
const
|
|
621
|
-
lines.push(` - ${chalk.cyan(outputFileName)}: Secret ${chalk.yellow(
|
|
731
|
+
const secretResolvedName = (entry['settings'] !== undefined && entry['settings'][variableName] !== undefined) ? entry['settings'][variableName] : (variableMeta['default'] ?? variableName);
|
|
732
|
+
lines.push(` - ${chalk.cyan(outputFileName)}: Secret ${chalk.yellow(secretResolvedName)}`);
|
|
622
733
|
}
|
|
623
734
|
if (variableMeta['format'] === 'var') {
|
|
624
|
-
const
|
|
625
|
-
lines.push(` - ${chalk.cyan(outputFileName)}: Variable ${chalk.yellow(
|
|
735
|
+
const varResolvedName = (entry['settings'] !== undefined && entry['settings'][variableName] !== undefined) ? entry['settings'][variableName] : (variableMeta['default'] ?? variableName);
|
|
736
|
+
lines.push(` - ${chalk.cyan(outputFileName)}: Variable ${chalk.yellow(varResolvedName)}`);
|
|
626
737
|
}
|
|
627
738
|
}
|
|
628
739
|
if (entry['targets'] !== undefined && metadataEntry['targets'] !== undefined) {
|
|
@@ -640,12 +751,12 @@ export class CliGenerateGithubWorkflows {
|
|
|
640
751
|
continue;
|
|
641
752
|
}
|
|
642
753
|
if (targetVariableMeta['format'] === 'secret') {
|
|
643
|
-
const
|
|
644
|
-
lines.push(` - ${chalk.cyan(outputFileName)}: Secret ${chalk.yellow(
|
|
754
|
+
const targetSecretResolvedName = (entry['settings'] !== undefined && entry['settings'][targetVariableName] !== undefined) ? entry['settings'][targetVariableName] : (targetVariableMeta['default'] ?? targetVariableName);
|
|
755
|
+
lines.push(` - ${chalk.cyan(outputFileName)}: Secret ${chalk.yellow(targetSecretResolvedName)}`);
|
|
645
756
|
}
|
|
646
757
|
if (targetVariableMeta['format'] === 'var') {
|
|
647
|
-
const
|
|
648
|
-
lines.push(` - ${chalk.cyan(outputFileName)}: Variable ${chalk.yellow(
|
|
758
|
+
const targetVarResolvedName = (entry['settings'] !== undefined && entry['settings'][targetVariableName] !== undefined) ? entry['settings'][targetVariableName] : (targetVariableMeta['default'] ?? targetVariableName);
|
|
759
|
+
lines.push(` - ${chalk.cyan(outputFileName)}: Variable ${chalk.yellow(targetVarResolvedName)}`);
|
|
649
760
|
}
|
|
650
761
|
}
|
|
651
762
|
}
|
|
@@ -660,26 +771,29 @@ export class CliGenerateGithubWorkflows {
|
|
|
660
771
|
const regex = new RegExp(`\\$\\{\\{\\s*(?:secrets|vars)\\.${variableName}\\s*\\}\\}`, 'g');
|
|
661
772
|
const settingValue = (settings !== undefined && settings[variableName] !== undefined) ? settings[variableName] : undefined;
|
|
662
773
|
if (variableMeta['format'] === 'secret') {
|
|
663
|
-
const
|
|
774
|
+
const secretResolvedName = settingValue
|
|
664
775
|
?? variableMeta['default']
|
|
665
776
|
?? variableName;
|
|
666
|
-
const
|
|
667
|
-
result = result.replace(regex,
|
|
777
|
+
const secretReplacement = `\${{ secrets.${secretResolvedName} }}`;
|
|
778
|
+
result = result.replace(regex, secretReplacement);
|
|
668
779
|
}
|
|
669
780
|
if (variableMeta['format'] === 'var') {
|
|
670
|
-
const
|
|
781
|
+
const varResolvedName = settingValue
|
|
671
782
|
?? variableMeta['default']
|
|
672
783
|
?? variableName;
|
|
673
|
-
const
|
|
674
|
-
result = result.replace(regex,
|
|
784
|
+
const varReplacement = `\${{ vars.${varResolvedName} }}`;
|
|
785
|
+
result = result.replace(regex, varReplacement);
|
|
675
786
|
}
|
|
676
787
|
if (variableMeta['format'] === 'literal') {
|
|
677
|
-
const
|
|
678
|
-
result = result.replace(regex,
|
|
788
|
+
const literalReplacement = (settingValue ?? '').replaceAll('\n', '\\n');
|
|
789
|
+
result = result.replace(regex, () => literalReplacement);
|
|
679
790
|
}
|
|
680
791
|
}
|
|
681
792
|
return result;
|
|
682
793
|
}
|
|
794
|
+
static buildArtifactName(targetType, targetId) {
|
|
795
|
+
return `build-${targetType}-${targetId}`;
|
|
796
|
+
}
|
|
683
797
|
static slugifyWorkingDir(input) {
|
|
684
798
|
const trimmed = input
|
|
685
799
|
.replace(LIB_REGEX_PATTERN_LEADING_DOT_SLASH, '')
|
|
@@ -702,35 +816,41 @@ export class CliGenerateGithubWorkflows {
|
|
|
702
816
|
}
|
|
703
817
|
static buildCommand(scriptName, workspaceNames, useTurbo) {
|
|
704
818
|
if (useTurbo === true) {
|
|
705
|
-
const
|
|
706
|
-
return `npx turbo run ${scriptName} ${
|
|
819
|
+
const turboFlags = workspaceNames.map((name) => `--filter=${name}`);
|
|
820
|
+
return `npx turbo run ${scriptName} ${turboFlags.join(' ')} --concurrency=2`;
|
|
707
821
|
}
|
|
708
|
-
const
|
|
709
|
-
return `npm run ${scriptName} ${
|
|
822
|
+
const npmFlags = workspaceNames.map((name) => `-w ${name}`);
|
|
823
|
+
return `npm run ${scriptName} ${npmFlags.join(' ')}`;
|
|
710
824
|
}
|
|
711
|
-
static
|
|
712
|
-
const
|
|
713
|
-
const paths = [];
|
|
825
|
+
static renderUploadArtifactSteps(targets, targetsMetadata) {
|
|
826
|
+
const steps = [];
|
|
714
827
|
for (const target of targets) {
|
|
715
|
-
const
|
|
716
|
-
const metadata = targetsMetadata[targetEntry['type']];
|
|
828
|
+
const metadata = targetsMetadata[target['type']];
|
|
717
829
|
if (metadata === undefined) {
|
|
718
830
|
continue;
|
|
719
831
|
}
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
const resolved = template.replaceAll('{workingDir}', strippedDir);
|
|
723
|
-
if (seen.has(resolved) === false) {
|
|
724
|
-
seen.add(resolved);
|
|
725
|
-
paths.push(resolved);
|
|
726
|
-
}
|
|
832
|
+
if (metadata['artifactPaths'].length === 0) {
|
|
833
|
+
continue;
|
|
727
834
|
}
|
|
835
|
+
const strippedDir = target['workingDir'].replace(LIB_REGEX_PATTERN_LEADING_DOT_SLASH, '');
|
|
836
|
+
const targetId = Runner.slugifyWorkingDir(target['workingDir']);
|
|
837
|
+
const artifactName = Runner.buildArtifactName(target['type'], targetId);
|
|
838
|
+
const pathLines = metadata['artifactPaths'].map((template) => ` ${template.replaceAll('{workingDir}', strippedDir)}`);
|
|
839
|
+
const stepLines = [
|
|
840
|
+
` - name: "Upload build artifacts (${target['type']}/${targetId})"`,
|
|
841
|
+
' uses: "actions/upload-artifact@v7"',
|
|
842
|
+
' with:',
|
|
843
|
+
` name: "${artifactName}"`,
|
|
844
|
+
' retention-days: 1',
|
|
845
|
+
' path: |',
|
|
846
|
+
...pathLines,
|
|
847
|
+
];
|
|
848
|
+
steps.push(stepLines.join('\n'));
|
|
728
849
|
}
|
|
729
|
-
if (
|
|
850
|
+
if (steps.length === 0) {
|
|
730
851
|
return '';
|
|
731
852
|
}
|
|
732
|
-
|
|
733
|
-
return lines.join('\n');
|
|
853
|
+
return steps.join('\n\n');
|
|
734
854
|
}
|
|
735
855
|
}
|
|
736
856
|
//# sourceMappingURL=workflows.js.map
|