@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
|
@@ -20,76 +20,80 @@ Quotes: Single. Indentation: 2-space. File naming: kebab-case (e.g., `markdown-t
|
|
|
20
20
|
```ts
|
|
21
21
|
// GOOD — param names aligned, dashes aligned
|
|
22
22
|
/**
|
|
23
|
-
* @param {
|
|
24
|
-
* @param {
|
|
25
|
-
* @param {
|
|
26
|
-
* @param {
|
|
23
|
+
* @param {Cli_Changelog_Write_PackageDir} packageDir - Package dir.
|
|
24
|
+
* @param {Cli_Changelog_Write_PackageName} packageName - Package name.
|
|
25
|
+
* @param {Cli_Changelog_Write_Version} version - Version.
|
|
26
|
+
* @param {Cli_Changelog_Write_Entries} entries - Entries.
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
// GOOD — same-length types, 1 space after } suffices
|
|
30
30
|
/**
|
|
31
|
-
* @param {
|
|
32
|
-
* @param {
|
|
31
|
+
* @param {Task_Runner_Constructor_Headers} headers - Headers.
|
|
32
|
+
* @param {Task_Runner_Constructor_Options} [options] - Options.
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
// BAD — no alignment
|
|
36
36
|
/**
|
|
37
|
-
* @param {
|
|
38
|
-
* @param {
|
|
39
|
-
* @param {
|
|
37
|
+
* @param {Cli_Changelog_Write_PackageDir} packageDir - Package dir.
|
|
38
|
+
* @param {Cli_Changelog_Write_PackageName} packageName - Package name.
|
|
39
|
+
* @param {Cli_Changelog_Write_Version} version - Version.
|
|
40
40
|
*/
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
### Doc Comment Hierarchy
|
|
44
44
|
|
|
45
|
-
Class doc uses pretty name derived from
|
|
45
|
+
Class doc uses pretty name derived from the file's path segments (directories AND filename) joined with ` - `. Every segment is included verbatim. The single exception: when the filename is `index`, only the directories are used — the directory IS the identity (e.g., `src/toolkit/index.ts` → `Toolkit`, not `Toolkit - Index`). Member docs chain from the class pretty name. Known names (brands, abbreviations, compounds) are preserved: e.g., `eslint` → `ESLint`, `package-json` → `package.json`, `nextjs` → `Next.js`.
|
|
46
|
+
|
|
47
|
+
Note on JSDoc vs type-name divergence on `index`: JSDoc display names strip `index`; type-name prefixes do NOT (`src/cli/index.ts` → JSDoc `CLI`, type prefix `Cli_Index`). The type-naming system treats the path as identity verbatim — see "Named Type Naming" below.
|
|
46
48
|
|
|
47
49
|
### Full Documentation Example
|
|
48
50
|
|
|
51
|
+
The example below is for the file `src/cli/utility/changelog.ts`. The class is named `Runner` (per the "Class Name Is `Runner`" rule below), but type-name prefixes still derive from the file path — every type name starts with `Cli_Utility_Changelog_Runner_*`.
|
|
52
|
+
|
|
49
53
|
```ts
|
|
50
54
|
/**
|
|
51
|
-
* CLI - Utility -
|
|
55
|
+
* CLI - Utility - Changelog.
|
|
52
56
|
*
|
|
53
57
|
* @since 1.0.0
|
|
54
58
|
*/
|
|
55
|
-
export class
|
|
59
|
+
export class Runner {
|
|
56
60
|
/**
|
|
57
|
-
* CLI - Utility -
|
|
61
|
+
* CLI - Utility - Changelog - Run.
|
|
58
62
|
*
|
|
59
|
-
* @param {
|
|
63
|
+
* @param {Cli_Utility_Changelog_Runner_Run_Options} options - Options.
|
|
60
64
|
*
|
|
61
|
-
* @returns {
|
|
65
|
+
* @returns {Cli_Utility_Changelog_Runner_Run_Returns}
|
|
62
66
|
*
|
|
63
67
|
* @since 1.0.0
|
|
64
68
|
*/
|
|
65
|
-
public static async run(options:
|
|
69
|
+
public static async run(options: Cli_Utility_Changelog_Runner_Run_Options): Cli_Utility_Changelog_Runner_Run_Returns {
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
/**
|
|
69
|
-
* CLI - Utility -
|
|
73
|
+
* CLI - Utility - Changelog - Fetch Data.
|
|
70
74
|
*
|
|
71
75
|
* @private
|
|
72
76
|
*
|
|
73
|
-
* @returns {
|
|
77
|
+
* @returns {Cli_Utility_Changelog_Runner_FetchData_Returns}
|
|
74
78
|
*
|
|
75
79
|
* @since 1.0.0
|
|
76
80
|
*/
|
|
77
|
-
private static async fetchData():
|
|
81
|
+
private static async fetchData(): Cli_Utility_Changelog_Runner_FetchData_Returns {
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
/**
|
|
81
|
-
* CLI - Utility -
|
|
85
|
+
* CLI - Utility - Changelog - Format Line.
|
|
82
86
|
*
|
|
83
|
-
* @param {
|
|
84
|
-
* @param {
|
|
87
|
+
* @param {Cli_Utility_Changelog_Runner_FormatLine_Prefix} prefix - Prefix.
|
|
88
|
+
* @param {Cli_Utility_Changelog_Runner_FormatLine_Message} message - Message.
|
|
85
89
|
*
|
|
86
90
|
* @private
|
|
87
91
|
*
|
|
88
|
-
* @returns {
|
|
92
|
+
* @returns {Cli_Utility_Changelog_Runner_FormatLine_Returns}
|
|
89
93
|
*
|
|
90
94
|
* @since 1.0.0
|
|
91
95
|
*/
|
|
92
|
-
private static formatLine(prefix:
|
|
96
|
+
private static formatLine(prefix: Cli_Utility_Changelog_Runner_FormatLine_Prefix, message: Cli_Utility_Changelog_Runner_FormatLine_Message): Cli_Utility_Changelog_Runner_FormatLine_Returns {
|
|
93
97
|
}
|
|
94
98
|
}
|
|
95
99
|
```
|
|
@@ -98,6 +102,8 @@ export class CliUtilityRunner {
|
|
|
98
102
|
|
|
99
103
|
### No Inline Types in Code Files
|
|
100
104
|
|
|
105
|
+
> Inline examples in this section (and elsewhere in this doc) use a short prefix like `Runner_*`, `Validator_*`, `Syncer_*`, `MarkdownTable_*`, `Fetcher_*` for brevity — read it as the full form `{PathPrefix}_Runner_*` (e.g., `Cli_Utility_Foo_Runner_*` for `cli/utility/foo.ts`). Real `.d.ts` files always include the full path prefix. The "Named Type Naming" section below covers the full pattern.
|
|
106
|
+
|
|
101
107
|
Every `const`/`let` declaration in a method body uses a named alias from a `.d.ts` file. No exceptions — even when TypeScript can infer the type, the explicit named annotation is required for traceability. This applies to all forms: array literals, Sets, Records, Maps, union types, generics, and inferred primitives.
|
|
102
108
|
|
|
103
109
|
**Excluded from this rule** (rely on TypeScript inference):
|
|
@@ -119,15 +125,15 @@ const header = this.formatRow(this.#headers, columnWidths);
|
|
|
119
125
|
const directory = path.dirname(filePath);
|
|
120
126
|
|
|
121
127
|
// GOOD — named types from .d.ts
|
|
122
|
-
const entries:
|
|
123
|
-
const files:
|
|
124
|
-
let selectedPackage:
|
|
125
|
-
const allowedKeys:
|
|
126
|
-
const reordered:
|
|
128
|
+
const entries: Runner_Parse_Entries = [];
|
|
129
|
+
const files: Runner_Parse_Files = [];
|
|
130
|
+
let selectedPackage: Runner_Run_SelectedPackage;
|
|
131
|
+
const allowedKeys: Validator_Check_AllowedKeys = new Set([...]);
|
|
132
|
+
const reordered: Syncer_HandleReorder_Reordered = {};
|
|
127
133
|
|
|
128
134
|
// GOOD — named types even for inferred primitives
|
|
129
|
-
const header:
|
|
130
|
-
const directory:
|
|
135
|
+
const header: MarkdownTable_Render_Header = this.formatRow(this.#headers, columnWidths);
|
|
136
|
+
const directory: Runner_SaveFile_Directory = path.dirname(filePath);
|
|
131
137
|
|
|
132
138
|
// GOOD — inference OK for these (excluded from rule)
|
|
133
139
|
items.filter((item) => item.length > 0);
|
|
@@ -165,101 +171,215 @@ export type EntryCategory = 'added' | 'updated' | 'fixed' | 'removed';
|
|
|
165
171
|
|
|
166
172
|
// types/cli/runner.d.ts — imports from shared.d.ts
|
|
167
173
|
import type { EntryCategory } from '@/types/shared.d.ts';
|
|
168
|
-
export type
|
|
174
|
+
export type Cli_Runner_Record_SelectedCategory = EntryCategory;
|
|
169
175
|
|
|
170
176
|
// cli/runner.ts — imports from runner.d.ts, NEVER from shared.d.ts
|
|
171
|
-
import type {
|
|
177
|
+
import type { Cli_Runner_Record_SelectedCategory } from '@/types/cli/runner.d.ts';
|
|
172
178
|
```
|
|
173
179
|
|
|
174
180
|
### Type Ordering in `.d.ts` Files
|
|
175
181
|
|
|
176
|
-
**Sections** are in alphabetical order by method
|
|
182
|
+
**Sections** are in alphabetical order by their full section prefix (path + class + method/function/(string, fn) chunks). **Within each section**, types are ordered by first-use, first-listed (first come, first serve): parameters first (used first in the signature), then return/typeguard (used next in the signature), then body variable types in the sequential order they appear in the method body. This is strictly code-order, NOT alphabetical.
|
|
177
183
|
|
|
178
184
|
The reason for first-come-first-serve ordering: the `.d.ts` file reads as a parallel of the `.ts` file. When reading the implementation top to bottom and encountering a type, it appears at the same relative position in the `.d.ts`. The `.d.ts` is a table of contents for the implementation — same order, same flow, no hunting.
|
|
179
185
|
|
|
180
|
-
The **only** valid forward
|
|
186
|
+
The **only** valid forward references: return-position type aliases — `Returns`, `TypeGuard`, and the singular `Return` — referencing a type defined later in the same section. The return-position alias still comes first because it's used first (in the signature). This covers two patterns: the alias referencing a body variable the method returns, and the alias referencing a return object type whose properties are defined after it. All other types must be defined before use.
|
|
187
|
+
|
|
188
|
+
(Reminder: examples use `Runner_*` shorthand — see the note at the top of "No Inline Types in Code Files" for the full `{PathPrefix}_Runner_*` form.)
|
|
181
189
|
|
|
182
190
|
```ts
|
|
183
191
|
/** Runner - Execute. */
|
|
184
|
-
export type
|
|
185
|
-
export type
|
|
186
|
-
export type
|
|
192
|
+
export type Runner_Execute_Options = { ... }; // param (used first)
|
|
193
|
+
export type Runner_Execute_Returns = Promise<void>; // return (used next)
|
|
194
|
+
export type Runner_Execute_Config = Record<...>; // body variable (used later, sequential order)
|
|
187
195
|
|
|
188
196
|
/** Runner - Group items. */
|
|
189
|
-
export type
|
|
190
|
-
export type
|
|
191
|
-
export type
|
|
192
|
-
export type
|
|
197
|
+
export type Runner_GroupItems_Items = ...; // param (used first)
|
|
198
|
+
export type Runner_GroupItems_Returns = Runner_GroupItems_Grouped; // return (used next, forward ref OK)
|
|
199
|
+
export type Runner_GroupItems_Grouped = Map<...>; // body variable (used later, owns the definition)
|
|
200
|
+
export type Runner_GroupItems_Processed = Set<...>; // body variable (used later, sequential order)
|
|
193
201
|
|
|
194
202
|
/** Runner - Detect platform. */
|
|
195
|
-
export type
|
|
196
|
-
export type
|
|
197
|
-
export type
|
|
198
|
-
export type
|
|
199
|
-
export type
|
|
200
|
-
id:
|
|
201
|
-
url:
|
|
203
|
+
export type Runner_DetectPlatform_Url = string; // param (used first)
|
|
204
|
+
export type Runner_DetectPlatform_Returns = Runner_DetectPlatform_Platform; // return (forward ref OK)
|
|
205
|
+
export type Runner_DetectPlatform_Platform_Id = 'a' | 'b'; // return object property
|
|
206
|
+
export type Runner_DetectPlatform_Platform_Url = string; // return object property
|
|
207
|
+
export type Runner_DetectPlatform_Platform = { // return object (owns the definition)
|
|
208
|
+
id: Runner_DetectPlatform_Platform_Id;
|
|
209
|
+
url: Runner_DetectPlatform_Platform_Url;
|
|
202
210
|
};
|
|
203
211
|
```
|
|
204
212
|
|
|
205
213
|
### Named Type Naming
|
|
206
214
|
|
|
207
|
-
Pattern: `{PathPrefix}{MethodName}{VariableName}
|
|
215
|
+
Pattern: `{PathPrefix}_{ClassName}_{MethodName}_{VariableName}` — chunks joined by underscores, each chunk PascalCase. The path prefix is derived from the file path: every path segment becomes one chunk (PascalCase, with hyphenated names like `package-json` flattened to `PackageJson` within the chunk). No segments are stripped — the path is the identity verbatim. The type naming system does NOT use brand casing (e.g., `Cli` not `CLI`, `Api` not `API`, `Eslint` not `ESLint`). Brand casing is reserved for JSDoc hierarchy display only.
|
|
216
|
+
|
|
217
|
+
**Pattern slots are conditional, not always present.** Each of the four slots is only filled when applicable to the source file:
|
|
218
|
+
|
|
219
|
+
- `{PathPrefix}` — **always present** (derived from the file path).
|
|
220
|
+
- `{ClassName}` — present only when the source file has a class declaration. Uniformly the literal `Runner` (see "Class Name Is `Runner`" below).
|
|
221
|
+
- `{MethodName}` — present only when the source has methods, functions, or function-typed `const`s. Top-level types defined outside any function/method skip this slot.
|
|
222
|
+
- `{VariableName}` — present only when the type names a specific variable, parameter, property, or return value. Types that describe the section itself (not a specific identifier within it) skip this slot.
|
|
223
|
+
|
|
224
|
+
Examples spanning the slot combinations:
|
|
208
225
|
|
|
209
|
-
|
|
226
|
+
```
|
|
227
|
+
// All four slots — class + method + body variable
|
|
228
|
+
src/api/node-releases.ts → Api_NodeReleases_Runner_FetchLtsVersions_ResponseData
|
|
229
|
+
|
|
230
|
+
// No class slot — file has functions only, no class declaration
|
|
231
|
+
src/tests/type-declarations.ts → Tests_TypeDeclarations_ExtractObjectTypes_ObjectType
|
|
232
|
+
|
|
233
|
+
// Only path prefix + variable — top-level type, no class, no method
|
|
234
|
+
src/lib/constants.ts → Lib_Constants_DocsBaseUrl
|
|
235
|
+
```
|
|
210
236
|
|
|
211
237
|
```
|
|
212
|
-
src/cli/
|
|
213
|
-
src/cli/
|
|
214
|
-
src/cli/
|
|
215
|
-
src/cli/
|
|
216
|
-
src/
|
|
217
|
-
src/cli/index.ts → Cli (index skipped)
|
|
238
|
+
src/cli/utility/changelog.ts → Cli_Utility_Changelog
|
|
239
|
+
src/cli/generate/must-haves/dotenv.ts → Cli_Generate_MustHaves_Dotenv
|
|
240
|
+
src/cli/recipe/package-json/cleanup.ts → Cli_Recipe_PackageJson_Cleanup
|
|
241
|
+
src/cli/index.ts → Cli_Index
|
|
242
|
+
src/toolkit/index.ts → Toolkit_Index
|
|
218
243
|
```
|
|
219
244
|
|
|
220
|
-
|
|
245
|
+
Type prefixes are built from the source mechanically. Each level adds a chunk:
|
|
246
|
+
|
|
247
|
+
| Source | Adds a chunk | Chunk content |
|
|
248
|
+
|---|---|---|
|
|
249
|
+
| File path segment | yes | segment PascalCased (verbatim, no segments stripped) |
|
|
250
|
+
| Class declaration | yes | class name PascalCased |
|
|
251
|
+
| Constructor | yes | literal `Constructor` |
|
|
252
|
+
| Method declaration | yes | method name PascalCased (incl. private `#name`) |
|
|
253
|
+
| Top-level function declaration | yes | function name PascalCased |
|
|
254
|
+
| Top-level function-typed `const` | yes | const name PascalCased |
|
|
255
|
+
| Nested function declaration / function-typed `const` | yes | name PascalCased |
|
|
256
|
+
| `(string, fn)` call expression | yes | string parsed (split on non-word, PascalCase each part, concatenate) |
|
|
257
|
+
| Body variable / parameter | yes | title-cased var/param name (the leaf) |
|
|
258
|
+
| Object property | yes | property key PascalCased (chained on the parent object's type name) |
|
|
221
259
|
|
|
222
260
|
```
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
Release →
|
|
226
|
-
|
|
227
|
-
|
|
261
|
+
Cli_Utility_Changelog → file path
|
|
262
|
+
Runner → class chunk
|
|
263
|
+
Release → method
|
|
264
|
+
Release → object variable
|
|
265
|
+
PackageName → property
|
|
266
|
+
= Cli_Utility_Changelog_Runner_Release_Release_PackageName
|
|
228
267
|
```
|
|
229
268
|
|
|
230
|
-
Repetition
|
|
269
|
+
Repetition (e.g., `Release_Release`) is expected when a method name matches the variable name — the `release()` method produces `release` objects. The convention does not deduplicate — each chunk maps to one level, keeping the namespace unambiguous, and the underscore makes the boundary visible.
|
|
231
270
|
|
|
232
271
|
The variable name must match the actual parameter/variable name in the code. The method name must match the method where the type is used — don't reuse a type from another method even if the underlying type is the same.
|
|
233
272
|
|
|
234
273
|
```ts
|
|
235
274
|
// BAD — type name references filter, but used in categorize
|
|
236
|
-
private static categorize(items:
|
|
275
|
+
private static categorize(items: Cli_Foo_Runner_Filter_Items): ...
|
|
237
276
|
|
|
238
277
|
// GOOD — type name matches the method it's used in
|
|
239
|
-
private static categorize(items:
|
|
278
|
+
private static categorize(items: Cli_Foo_Runner_Categorize_Items): ...
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**Generic `(string, fn)` call expressions.** Any call where the first argument is a string literal AND a later argument is a function expression adds a chunk dynamically — the string parsed via `parseDescribeString` (split on non-alphanumeric, PascalCase each piece, concatenate). This applies recursively at any depth and is not limited to test framework calls. Examples that match: `describe('Db', ...)`, `it('does X', ...)`, `app.get('/users', handler)`, `db.transaction('init', tx => ...)`, `button.addEventListener('click', () => ...)`. Template strings with interpolation (`` `test ${i}` ``) and variable arguments do NOT match — only string literals.
|
|
282
|
+
|
|
283
|
+
**Source-identifier-based section detection.** The section a type belongs to is derived from source-code identifiers (class/method/function names, `(string, fn)` call arguments), NOT from JSDoc summary comments. JSDoc remains as documentation but plays no role in section computation — comments drift, identifiers can't. The meta-test parses the source file's AST to determine which section each line belongs to; types in `.d.ts` must use the corresponding section prefix.
|
|
284
|
+
|
|
285
|
+
### Class Name Is `Runner`
|
|
286
|
+
|
|
287
|
+
Files that declare a single primary class use the literal name `Runner` for that class. The class name is purely a placeholder slot in the type-naming pattern — its semantic meaning comes from the file path, not from the identifier.
|
|
288
|
+
|
|
289
|
+
Why generic? Three reasons:
|
|
290
|
+
|
|
291
|
+
1. **The path already carries the meaning.** A file at `src/api/node-releases.ts` is unambiguously about Node releases. Naming the class `ApiNodeReleases` doubles the information already present in the import path — and bloats every type name with `Api_NodeReleases_ApiNodeReleases_*`.
|
|
292
|
+
2. **Type names stay short and consistent.** With `Runner` as a fixed slot, the pattern reads as `{PathPrefix}_Runner_{MethodName}_{VariableName}` for every class file. No surprises, no per-file naming negotiation.
|
|
293
|
+
3. **Refactoring is cheaper.** Renaming the file (or moving it) updates the path prefix mechanically; the class identifier never has to change.
|
|
294
|
+
|
|
295
|
+
```ts
|
|
296
|
+
// src/api/node-releases.ts
|
|
297
|
+
// BAD — class name duplicates the file path
|
|
298
|
+
export class ApiNodeReleases {
|
|
299
|
+
public static async fetchLtsVersions(...): ... { }
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// GOOD — class is `Runner`, path conveys meaning
|
|
303
|
+
export class Runner {
|
|
304
|
+
public static async fetchLtsVersions(...): ... { }
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Consumers import the generic name and rely on the path for context:
|
|
309
|
+
|
|
310
|
+
```ts
|
|
311
|
+
// some-consumer.ts
|
|
312
|
+
import { Runner } from '../api/node-releases.js';
|
|
313
|
+
|
|
314
|
+
const versions = await Runner.fetchLtsVersions();
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
If a consumer wants to import the class under a domain-specific local name, use an import alias or a barrel re-export:
|
|
318
|
+
|
|
319
|
+
```ts
|
|
320
|
+
// Option A — import alias at the call site
|
|
321
|
+
import { Runner as NodeReleases } from '@/api/node-releases.js';
|
|
322
|
+
|
|
323
|
+
// Option B — barrel re-export
|
|
324
|
+
// src/api/index.ts
|
|
325
|
+
export { Runner as NodeReleases } from './node-releases.js';
|
|
326
|
+
// consumer
|
|
327
|
+
import { NodeReleases } from '@/api/index.js';
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
This also satisfies the older "Identifier Names Cannot Equal File Name" rule (no `Changelog` class in `changelog.ts`) — `Runner` never equals a file name, so type-name doubling like `Cli_Utility_Changelog_Changelog_*` cannot occur.
|
|
331
|
+
|
|
332
|
+
### Function and Const Names Cannot Equal File Name (C2, C3)
|
|
333
|
+
|
|
334
|
+
Top-level function and function-typed `const` names must NOT equal the file name (PascalCased, with hyphens flattened). Forces meaningful identifiers and prevents type-name doubling like `Lib_Utility_Utility_*`.
|
|
335
|
+
|
|
336
|
+
```ts
|
|
337
|
+
// lib/utility.ts — file name "utility" → "Utility"
|
|
338
|
+
export function utility(): ... {} // BAD — function name == file name
|
|
339
|
+
export function getCurrentTimestamp(): ... {} // GOOD
|
|
340
|
+
|
|
341
|
+
const utility: ... = () => {}; // BAD — const name == file name
|
|
342
|
+
const formatRow: ... = () => {}; // GOOD
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Filename and Path Segment Rules (EC19, EC20, EC21)
|
|
346
|
+
|
|
347
|
+
Path segments (each directory and the file basename) must match `/^[a-z][a-z0-9-]*$/` after stripping the recognized suffixes (`.d.ts`, `.tsx`, `.ts`, `.test`). The strip-list is fixed and minimal — no other dotted suffixes are recognized.
|
|
348
|
+
|
|
349
|
+
```
|
|
350
|
+
foo.ts → GOOD
|
|
351
|
+
foo-bar.ts → GOOD (hyphens flatten in PascalCasing)
|
|
352
|
+
foo123.ts → GOOD (digits OK, just not as the first character)
|
|
353
|
+
foo.test.ts → GOOD (`.test` recognized and stripped)
|
|
354
|
+
foo.bar.ts → BAD (`.bar` not recognized; rename to foo-bar.ts)
|
|
355
|
+
foo.spec.ts → BAD (`.spec` not recognized; use `.test` or `-spec`)
|
|
356
|
+
123foo.ts → BAD (starts with a digit)
|
|
357
|
+
foo_bar.ts → BAD (underscore)
|
|
358
|
+
foo$bar.ts → BAD (special char)
|
|
359
|
+
foo bar.ts → BAD (space)
|
|
240
360
|
```
|
|
241
361
|
|
|
242
362
|
### Named Type Alias per Param and Return
|
|
243
363
|
|
|
244
|
-
Each function parameter and return value gets its own named type alias.
|
|
364
|
+
Each function parameter and return value gets its own named type alias. The full type-name prefix includes the `Runner` class slot when the source file declares a class (see "Class Name Is `Runner`").
|
|
245
365
|
|
|
246
366
|
```ts
|
|
247
367
|
// types/toolkit/markdown-table.d.ts
|
|
248
|
-
export type
|
|
249
|
-
export type
|
|
250
|
-
export type
|
|
368
|
+
export type Toolkit_MarkdownTable_Runner_Constructor_Headers = string[];
|
|
369
|
+
export type Toolkit_MarkdownTable_Runner_AddRow_Row = string[];
|
|
370
|
+
export type Toolkit_MarkdownTable_Runner_AddRow_Returns = void;
|
|
251
371
|
|
|
252
372
|
// toolkit/markdown-table.ts
|
|
253
373
|
/**
|
|
254
|
-
* Markdown Table - Add row.
|
|
374
|
+
* Toolkit - Markdown Table - Add row.
|
|
255
375
|
*
|
|
256
|
-
* @param {
|
|
376
|
+
* @param {Toolkit_MarkdownTable_Runner_AddRow_Row} row - Row.
|
|
257
377
|
*
|
|
258
|
-
* @returns {
|
|
378
|
+
* @returns {Toolkit_MarkdownTable_Runner_AddRow_Returns}
|
|
259
379
|
*
|
|
260
380
|
* @since 1.0.0
|
|
261
381
|
*/
|
|
262
|
-
public addRow(row:
|
|
382
|
+
public addRow(row: Toolkit_MarkdownTable_Runner_AddRow_Row): Toolkit_MarkdownTable_Runner_AddRow_Returns { ... }
|
|
263
383
|
```
|
|
264
384
|
|
|
265
385
|
### `satisfies` vs `:` Type Annotation
|
|
@@ -291,11 +411,11 @@ Type guard methods/functions use `TypeGuard` instead of `Returns` for the narrow
|
|
|
291
411
|
|
|
292
412
|
```ts
|
|
293
413
|
// .d.ts
|
|
294
|
-
export type
|
|
295
|
-
export type
|
|
414
|
+
export type Runner_IsErrorResponse_Value = unknown;
|
|
415
|
+
export type Runner_IsErrorResponse_TypeGuard = ErrorResponse;
|
|
296
416
|
|
|
297
417
|
// .ts
|
|
298
|
-
private static isErrorResponse(value:
|
|
418
|
+
private static isErrorResponse(value: Runner_IsErrorResponse_Value): value is Runner_IsErrorResponse_TypeGuard {
|
|
299
419
|
return (
|
|
300
420
|
typeof value === 'object'
|
|
301
421
|
&& value !== null
|
|
@@ -303,9 +423,147 @@ private static isErrorResponse(value: RunnerIsErrorResponseValue): value is Runn
|
|
|
303
423
|
&& 'message' in value
|
|
304
424
|
);
|
|
305
425
|
}
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
`TypeGuard` (and `Returns` and the singular `Return`) are reserved for return positions only — they MUST NOT appear at body-variable or parameter positions. The meta-test enforces this.
|
|
429
|
+
|
|
430
|
+
### Variable Type Symmetry
|
|
431
|
+
|
|
432
|
+
Every typed declaration in source code must follow rules 7.1–7.8. The meta-test (`packages/nova/src/tests/type-declarations.test.ts`) walks every `.ts` source file and enforces these mechanically — there is no "common sense" exception.
|
|
433
|
+
|
|
434
|
+
**7.1 Leaf must equal title-cased var name.** A typed body variable / parameter named `xxx` must use a type whose leaf chunk is `Xxx` (title-cased), and whose preceding chunks match the surrounding source section (class + method / function / `describe` string).
|
|
435
|
+
|
|
436
|
+
```ts
|
|
437
|
+
// GOOD — leaf 'Items' matches var name 'items'
|
|
438
|
+
const items: Cli_Utility_DoThing_Items = ...;
|
|
439
|
+
|
|
440
|
+
// GOOD — class-prefix passthrough (skips the method chunk) is also valid
|
|
441
|
+
const items: Cli_Utility_Items = ...;
|
|
306
442
|
|
|
307
|
-
//
|
|
308
|
-
|
|
443
|
+
// BAD — leaf 'Things' does not match var name 'items'
|
|
444
|
+
const items: Cli_Utility_DoThing_Things = ...;
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
**7.2 Cross-module body-variable types are forbidden — no alias loophole.** A `.ts` body variable's type must be defined in the corresponding `.d.ts` (the same module) AND must NOT be a direct alias to a foreign type. Three escape hatches:
|
|
448
|
+
|
|
449
|
+
```ts
|
|
450
|
+
// BAD — local definition but only an alias to a foreign type
|
|
451
|
+
import type { Lib_Utility_FetchData_Returns } from '@/types/lib/utility.d.ts';
|
|
452
|
+
export type Cli_Foo_Run_Data = Lib_Utility_FetchData_Returns;
|
|
453
|
+
|
|
454
|
+
// (a) Promote the shape to shared.d.ts
|
|
455
|
+
// types/shared.d.ts
|
|
456
|
+
export type FetchedConfigData = { name: string; version: string };
|
|
457
|
+
// types/cli/foo.d.ts
|
|
458
|
+
import type { FetchedConfigData } from '@/types/shared.d.ts';
|
|
459
|
+
export type Cli_Foo_Run_Data = FetchedConfigData;
|
|
460
|
+
|
|
461
|
+
// (b) Redefine the concrete shape locally
|
|
462
|
+
export type Cli_Foo_Run_Data = { name: string; version: string };
|
|
463
|
+
|
|
464
|
+
// (c) Don't store in a typed body var — let inference work
|
|
465
|
+
const result = await fetchData();
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
**7.3 Return-position-only suffixes (`Returns`, `TypeGuard`, `Return`) are banned at body/param positions.** These suffixes are reserved for function return type aliases.
|
|
469
|
+
|
|
470
|
+
**7.4 Inline typed callbacks are forbidden.** Anonymous arrow callbacks with typed parameters must be extracted to a named `const` so they follow rule 7.1 like any other function-typed `const`. Untyped inline callbacks (relying on TypeScript inference) remain allowed.
|
|
471
|
+
|
|
472
|
+
```ts
|
|
473
|
+
// BAD — inline anonymous typed callback
|
|
474
|
+
items.filter((value: Runner_Foo_Item): boolean => value.active);
|
|
475
|
+
|
|
476
|
+
// GOOD — extracted to named const, which then follows rule 7.1
|
|
477
|
+
const isActive: Runner_Foo_IsActive = (value: Runner_Foo_IsActive_Value): boolean => value.active;
|
|
478
|
+
items.filter(isActive);
|
|
479
|
+
|
|
480
|
+
// GOOD — untyped inline callback is fine (inference)
|
|
481
|
+
items.filter((value) => value.active);
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
**7.5 Function returns must end in `Returns` (plural).** Regular (non-type-guard) function return type aliases use the plural form.
|
|
485
|
+
|
|
486
|
+
**7.6 Singular `Return` is banned at return positions.** Use `Returns` instead.
|
|
487
|
+
|
|
488
|
+
**7.7 `TypeGuard` only at type-guard return positions.** A return type ending in `TypeGuard` must be on a function written as `value is T`. Conversely, `value is T` return positions must use a `TypeGuard`-suffixed type.
|
|
489
|
+
|
|
490
|
+
**7.8 Two declarations in the same `.ts` file may not produce the same expected type name.** The most common trigger is two `describe(string, ...)` blocks with identical strings, or two extracted typed callbacks with the same chosen const name in the same enclosing method. The meta-test catches this before the duplicate `export type` lands in the `.d.ts`, with a clearer error than TypeScript's "duplicate identifier" message.
|
|
491
|
+
|
|
492
|
+
### Standalone Type Files (S1, S2, S3, S4)
|
|
493
|
+
|
|
494
|
+
Files listed in the meta-test's `testConfig.standaloneTypeFiles` (typically `shared.d.ts`, `fetch-response.d.ts`) follow a separate rule set. They contain domain concepts that are imported by multiple modules; they are NOT mirrors of source files.
|
|
495
|
+
|
|
496
|
+
**S1. PascalCase identifiers, no brand casing.** Top-level type names are PascalCase glued; nested property types use `Parent_Property` form. Brand casing (3+ consecutive uppercase letters) is forbidden — `Url` not `URL`, `Api` not `API`.
|
|
497
|
+
|
|
498
|
+
**S2. Path prefix is kept like every other file.** Standalone files are NOT exempt from the path-prefix rule — `shared.d.ts` types start with `Shared_`, `fetch-response.d.ts` types start with `FetchResponse_`, and so on. The path is the identity verbatim, the same as for domain `.d.ts` files. (The earlier rule that stripped the prefix for standalone files has been removed.)
|
|
499
|
+
|
|
500
|
+
```ts
|
|
501
|
+
// shared.d.ts
|
|
502
|
+
// BAD (old behavior) — prefix stripped
|
|
503
|
+
export type BorderCharacters = { ... };
|
|
504
|
+
|
|
505
|
+
// GOOD — prefix kept, same as every other file
|
|
506
|
+
export type Shared_BorderCharacters = { ... };
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
**S3. Object property types follow `Parent_Property` form, composed with the path prefix.** When a property uses a local type, the property type name must start with the parent object's name plus an underscore. The `Parent_Property` form **composes with** the path prefix rather than replacing it — the prefix stays in front, the `Parent_Property` chain extends behind it. Add an intermediate alias if needed.
|
|
510
|
+
|
|
511
|
+
```ts
|
|
512
|
+
// shared.d.ts
|
|
513
|
+
// BAD (old behavior) — standalone file stripped the prefix
|
|
514
|
+
export type BorderCharacters_TopLeft = string;
|
|
515
|
+
export type BorderCharacters = {
|
|
516
|
+
topLeft: BorderCharacters_TopLeft;
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
// GOOD — prefix kept, Parent_Property chains behind it
|
|
520
|
+
export type Shared_BorderCharacters_TopLeft = string;
|
|
521
|
+
export type Shared_BorderCharacters = {
|
|
522
|
+
topLeft: Shared_BorderCharacters_TopLeft;
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
// Deeper chains compose the same way
|
|
526
|
+
export type Shared_ApiFormResponse_Info_Message = string;
|
|
527
|
+
export type Shared_ApiFormResponse_Info = {
|
|
528
|
+
message: Shared_ApiFormResponse_Info_Message;
|
|
529
|
+
};
|
|
530
|
+
export type Shared_ApiFormResponse = {
|
|
531
|
+
info: Shared_ApiFormResponse_Info;
|
|
532
|
+
};
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
External API payloads commonly use snake_case or kebab-case keys. The property type name PascalCases the key — underscores and hyphens flatten, exactly like file paths. The literal key in the object type stays quoted in its original form so it serializes correctly:
|
|
536
|
+
|
|
537
|
+
```ts
|
|
538
|
+
// shared.d.ts — external API response (e.g., Cloudflare Turnstile)
|
|
539
|
+
export type Shared_TurnstileResponse_ChallengeTs = string; // snake_case key 'challenge_ts'
|
|
540
|
+
export type Shared_TurnstileResponse_ErrorCodes = string[]; // kebab-case key 'error-codes'
|
|
541
|
+
export type Shared_TurnstileResponse = {
|
|
542
|
+
'challenge_ts': Shared_TurnstileResponse_ChallengeTs;
|
|
543
|
+
'error-codes': Shared_TurnstileResponse_ErrorCodes;
|
|
544
|
+
};
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
Top-level enum-like aliases also keep the prefix:
|
|
548
|
+
|
|
549
|
+
```ts
|
|
550
|
+
// shared.d.ts
|
|
551
|
+
export type Shared_EntryCategory = 'added' | 'updated' | 'fixed' | 'removed';
|
|
552
|
+
export type Shared_EntryBump = 'major' | 'minor' | 'patch';
|
|
553
|
+
|
|
554
|
+
export type Shared_EntryItem_Category = Shared_EntryCategory;
|
|
555
|
+
export type Shared_EntryItem_PackageName = string;
|
|
556
|
+
export type Shared_EntryItem = {
|
|
557
|
+
category: Shared_EntryItem_Category;
|
|
558
|
+
packageName: Shared_EntryItem_PackageName;
|
|
559
|
+
};
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
**S4. Array element types defined before the array.** Same as E3 in domain `.d.ts` files.
|
|
563
|
+
|
|
564
|
+
```ts
|
|
565
|
+
export type Shared_EntryItem_Tag = string;
|
|
566
|
+
export type Shared_EntryItem_Tags = Shared_EntryItem_Tag[];
|
|
309
567
|
```
|
|
310
568
|
|
|
311
569
|
### No Redundant Intermediate Type Aliases
|
|
@@ -314,24 +572,24 @@ Don't create a type alias that only exists to be referenced by one other type. B
|
|
|
314
572
|
|
|
315
573
|
```ts
|
|
316
574
|
// BAD — Filtered only exists to be referenced by Returns
|
|
317
|
-
export type
|
|
318
|
-
export type
|
|
319
|
-
export type
|
|
575
|
+
export type Runner_Filter_Items = Item[];
|
|
576
|
+
export type Runner_Filter_Filtered = Item[];
|
|
577
|
+
export type Runner_Filter_Returns = Runner_Filter_Filtered;
|
|
320
578
|
|
|
321
579
|
// BAD — Returns references Items (input ≠ output semantically)
|
|
322
|
-
export type
|
|
323
|
-
export type
|
|
580
|
+
export type Runner_Filter_Items = Item[];
|
|
581
|
+
export type Runner_Filter_Returns = Runner_Filter_Items;
|
|
324
582
|
|
|
325
583
|
// GOOD — same underlying type, but defined independently
|
|
326
|
-
export type
|
|
327
|
-
export type
|
|
584
|
+
export type Runner_Filter_Items = Item[];
|
|
585
|
+
export type Runner_Filter_Returns = Item[];
|
|
328
586
|
|
|
329
587
|
// BAD — Response only exists to be referenced by Returns
|
|
330
|
-
export type
|
|
331
|
-
export type
|
|
588
|
+
export type Fetcher_GetData_Response = z.infer<typeof FetcherResponseSchema>;
|
|
589
|
+
export type Fetcher_GetData_Returns = Promise<Fetcher_GetData_Response | undefined>;
|
|
332
590
|
|
|
333
591
|
// GOOD — z.infer inlined directly into Returns
|
|
334
|
-
export type
|
|
592
|
+
export type Fetcher_GetData_Returns = Promise<z.infer<typeof FetcherResponseSchema> | undefined>;
|
|
335
593
|
```
|
|
336
594
|
|
|
337
595
|
### Never Flatten Types in `.d.ts` Files
|
|
@@ -344,19 +602,19 @@ export type EntryPackage = string;
|
|
|
344
602
|
export type EntryMessage = string;
|
|
345
603
|
|
|
346
604
|
// BAD — flattened to primitive, loses the type path
|
|
347
|
-
export type
|
|
348
|
-
export type
|
|
605
|
+
export type Runner_Parse_EntryPackage = string | undefined;
|
|
606
|
+
export type Runner_Write_ByCategory = Map<EntryCategory, string[]>;
|
|
349
607
|
|
|
350
608
|
// GOOD — references the shared type
|
|
351
|
-
export type
|
|
352
|
-
export type
|
|
609
|
+
export type Runner_Parse_EntryPackage = EntryPackage | undefined;
|
|
610
|
+
export type Runner_Write_ByCategory = Map<EntryCategory, EntryMessage[]>;
|
|
353
611
|
|
|
354
612
|
// BAD — nested array, loses the type path
|
|
355
|
-
export type
|
|
613
|
+
export type Runner_Group_Rows = string[][];
|
|
356
614
|
|
|
357
615
|
// GOOD — singular references primitive, plural references singular
|
|
358
|
-
export type
|
|
359
|
-
export type
|
|
616
|
+
export type Runner_Group_Row = string[];
|
|
617
|
+
export type Runner_Group_Rows = Runner_Group_Row[];
|
|
360
618
|
```
|
|
361
619
|
|
|
362
620
|
When creating a `= string` type, check if it represents a domain concept that has a shared type. If so, reference it. Genuinely `string` types include: generated file names, directory paths, version strings, CLI formatting strings, generic utility returns, external API data, prompt output keys, test setup paths.
|
|
@@ -373,14 +631,16 @@ Both prevent fragile cross-references where removing one type silently breaks ot
|
|
|
373
631
|
```ts
|
|
374
632
|
// GOOD — shared type in shared.d.ts, imported once by domain .d.ts
|
|
375
633
|
import type { EntryBump } from '@/types/shared.d.ts';
|
|
376
|
-
export type
|
|
377
|
-
export type
|
|
378
|
-
export type
|
|
634
|
+
export type Runner_Record_SelectedBump = EntryBump;
|
|
635
|
+
export type Runner_Release_HighestBump = EntryBump;
|
|
636
|
+
export type Runner_Parse_EntryBump = EntryBump | undefined;
|
|
379
637
|
```
|
|
380
638
|
|
|
381
639
|
### Object Property Types Form a Hierarchy
|
|
382
640
|
|
|
383
|
-
Object property types belong to their parent object — they are scoped to that specific context. Each property gets its own named type
|
|
641
|
+
Object property types belong to their parent object — they are scoped to that specific context. Each property gets its own named type whose name literally starts with the parent object's name (e.g., property `packageName` of `Runner_Release_Release` uses type `Runner_Release_Release_PackageName`). The property type must be defined on a line *before* the object type that references it.
|
|
642
|
+
|
|
643
|
+
**Array element types follow the same rule.** When `Items = Item[]`, the element type `Item` must be defined in the same file (or imported) and on a line *before* `Items`. The exception: when the array type's name ends in `Returns`, `TypeGuard`, or the singular `Return` (return positions are exempt). The meta-test enforces both rules.
|
|
384
644
|
|
|
385
645
|
If a variable in a different method needs the same underlying type, it must NOT import from another method's object hierarchy. That creates cross-dependencies between unrelated methods. Instead, the common base type goes into `shared.d.ts`. Both the object property type and the unrelated variable type reference `shared.d.ts` independently — no lateral dependencies.
|
|
386
646
|
|
|
@@ -389,27 +649,27 @@ If a variable in a different method needs the same underlying type, it must NOT
|
|
|
389
649
|
export type ChangelogEntryPackage = string;
|
|
390
650
|
|
|
391
651
|
// GOOD — release method's object hierarchy references shared.d.ts
|
|
392
|
-
export type
|
|
393
|
-
export type
|
|
394
|
-
packageName:
|
|
652
|
+
export type Runner_Release_Release_PackageName = ChangelogEntryPackage;
|
|
653
|
+
export type Runner_Release_Release = {
|
|
654
|
+
packageName: Runner_Release_Release_PackageName;
|
|
395
655
|
};
|
|
396
656
|
|
|
397
657
|
// GOOD — record method also references shared.d.ts independently
|
|
398
|
-
export type
|
|
658
|
+
export type Runner_Record_SelectedPackage = ChangelogEntryPackage | undefined;
|
|
399
659
|
|
|
400
660
|
// BAD — record method reaching into release method's object hierarchy
|
|
401
|
-
export type
|
|
661
|
+
export type Runner_Record_SelectedPackage = Runner_Release_Release_PackageName | undefined;
|
|
402
662
|
```
|
|
403
663
|
|
|
404
664
|
Within the same method, a standalone variable and an object property that share the same domain concept also define their types independently — both reference the base type, neither references the other.
|
|
405
665
|
|
|
406
666
|
```ts
|
|
407
667
|
// GOOD — both reference shared.d.ts, neither references the other
|
|
408
|
-
export type
|
|
409
|
-
export type
|
|
410
|
-
highestBump:
|
|
668
|
+
export type Runner_Release_Release_HighestBump = ChangelogEntryBump;
|
|
669
|
+
export type Runner_Release_Release = {
|
|
670
|
+
highestBump: Runner_Release_Release_HighestBump;
|
|
411
671
|
};
|
|
412
|
-
export type
|
|
672
|
+
export type Runner_Release_HighestBump = ChangelogEntryBump;
|
|
413
673
|
```
|
|
414
674
|
|
|
415
675
|
### Tight Types over Loose Types
|
|
@@ -418,16 +678,16 @@ Define the exact shape. No `Record<string, string>` when fields are known.
|
|
|
418
678
|
|
|
419
679
|
```ts
|
|
420
680
|
// BAD — frontmatter has known fields
|
|
421
|
-
export type
|
|
681
|
+
export type Runner_Parse_FrontMatter = Record<string, string>;
|
|
422
682
|
|
|
423
683
|
// GOOD — define exact shape with named field types
|
|
424
|
-
export type
|
|
425
|
-
export type
|
|
426
|
-
export type
|
|
427
|
-
export type
|
|
428
|
-
package:
|
|
429
|
-
category:
|
|
430
|
-
bump:
|
|
684
|
+
export type Runner_Parse_FrontMatter_Package = string;
|
|
685
|
+
export type Runner_Parse_FrontMatter_Category = EntryCategory;
|
|
686
|
+
export type Runner_Parse_FrontMatter_Bump = EntryBump;
|
|
687
|
+
export type Runner_Parse_FrontMatter = {
|
|
688
|
+
package: Runner_Parse_FrontMatter_Package;
|
|
689
|
+
category: Runner_Parse_FrontMatter_Category;
|
|
690
|
+
bump: Runner_Parse_FrontMatter_Bump;
|
|
431
691
|
};
|
|
432
692
|
```
|
|
433
693
|
|
|
@@ -451,7 +711,7 @@ Type guard internals do NOT need `as` — use `in` narrowing instead after `null
|
|
|
451
711
|
|
|
452
712
|
```ts
|
|
453
713
|
// BAD — as cast when .find() can replace it
|
|
454
|
-
selectedCategory = options.category as
|
|
714
|
+
selectedCategory = options.category as Runner_Record_SelectedCategory;
|
|
455
715
|
|
|
456
716
|
// GOOD — .find() validates AND narrows
|
|
457
717
|
const validCategory = validCategories.find(
|
|
@@ -467,10 +727,10 @@ selectedCategory = validCategory;
|
|
|
467
727
|
```ts
|
|
468
728
|
// GOOD — Zod runtime validation
|
|
469
729
|
const responseData = await response.json();
|
|
470
|
-
const data:
|
|
730
|
+
const data: Fetcher_GetData_Response = FetcherResponseSchema.parse(responseData);
|
|
471
731
|
|
|
472
732
|
// BAD — blind cast, no runtime validation
|
|
473
|
-
const data:
|
|
733
|
+
const data: Fetcher_GetData_Response = await response.json() as Fetcher_GetData_Response;
|
|
474
734
|
```
|
|
475
735
|
|
|
476
736
|
This applies to all external API boundaries (`fetch`, webhook payloads, etc.). Internal typed data (e.g., `Object.fromEntries`, `Object.keys`) still uses `as` casts where compiler-forced.
|
|
@@ -480,8 +740,8 @@ This applies to all external API boundaries (`fetch`, webhook payloads, etc.). I
|
|
|
480
740
|
Files like `package.json` have too many optional/third-party fields to define a Zod schema. Use the absorb-into-typed-container pattern with `Record<string, unknown>` and `as` casts for bracket access.
|
|
481
741
|
|
|
482
742
|
```ts
|
|
483
|
-
const config:
|
|
484
|
-
const configItems = config['items'] as
|
|
743
|
+
const config: Runner_Run_Config = JSON.parse(configRaw);
|
|
744
|
+
const configItems = config['items'] as Runner_Filter_Items;
|
|
485
745
|
```
|
|
486
746
|
|
|
487
747
|
### `JSON.parse` — Type the Result Immediately
|
|
@@ -490,8 +750,8 @@ const configItems = config['items'] as RunnerFilterItems;
|
|
|
490
750
|
|
|
491
751
|
```ts
|
|
492
752
|
// GOOD — typed directly
|
|
493
|
-
const config:
|
|
494
|
-
const configItems = config['items'] as
|
|
753
|
+
const config: Runner_Run_Config = JSON.parse(configRaw);
|
|
754
|
+
const configItems = config['items'] as Runner_Filter_Items;
|
|
495
755
|
|
|
496
756
|
// GOOD — absorbed into existing structure
|
|
497
757
|
const parsedFile = JSON.parse(rawFile);
|
|
@@ -507,7 +767,7 @@ const config = JSON.parse(configRaw);
|
|
|
507
767
|
const items = config.items ?? []; // any propagates
|
|
508
768
|
|
|
509
769
|
// BAD — unnecessary wrapping object
|
|
510
|
-
const config:
|
|
770
|
+
const config: Runner_Run_Config = {
|
|
511
771
|
fileContents: JSON.parse(configRaw),
|
|
512
772
|
};
|
|
513
773
|
```
|
|
@@ -521,7 +781,7 @@ When accessing a field from a `Record<string, unknown>` container (e.g., from `J
|
|
|
521
781
|
const configItems = config.fileContents['items'];
|
|
522
782
|
|
|
523
783
|
// GOOD — explicit type annotation
|
|
524
|
-
const configItems:
|
|
784
|
+
const configItems: Runner_Filter_Items = config.fileContents['items'];
|
|
525
785
|
```
|
|
526
786
|
|
|
527
787
|
### `as const` Is Acceptable
|
|
@@ -574,8 +834,8 @@ import { validCategories } from '@/lib/item.js';
|
|
|
574
834
|
import { Logger } from '@/toolkit/index.js';
|
|
575
835
|
|
|
576
836
|
import type {
|
|
577
|
-
|
|
578
|
-
|
|
837
|
+
Runner_Record_Options,
|
|
838
|
+
Runner_Record_Returns,
|
|
579
839
|
} from '@/types/cli/runner.d.ts';
|
|
580
840
|
```
|
|
581
841
|
|
|
@@ -672,20 +932,22 @@ Two shapes, chosen by whether the module holds per-instance state:
|
|
|
672
932
|
| **Static-only** | Stateless utilities, API clients | None | `static #field` | `public static` / `private static` |
|
|
673
933
|
| **Instance** | Per-caller isolated state | `public constructor()` | `readonly #field` | `public` / `private` instance |
|
|
674
934
|
|
|
675
|
-
Static-only (stateless utilities)
|
|
935
|
+
Static-only (stateless utilities) — file `src/cli/utility/changelog.ts`:
|
|
676
936
|
```ts
|
|
677
|
-
export class
|
|
937
|
+
export class Runner {
|
|
678
938
|
public static async run(options: ...): ... { }
|
|
679
939
|
private static async record(options: ...): ... { }
|
|
680
940
|
private static generateFileName(): ... { }
|
|
681
941
|
}
|
|
682
|
-
// Called as
|
|
942
|
+
// Called as (consumer aliases at import site for a domain-specific local name):
|
|
943
|
+
// import { Runner as CliUtilityChangelog } from '@/cli/utility/changelog.js';
|
|
944
|
+
// CliUtilityChangelog.run(options);
|
|
683
945
|
```
|
|
684
946
|
|
|
685
|
-
Instance (per-caller state)
|
|
947
|
+
Instance (per-caller state) — file `src/toolkit/markdown-table.ts`:
|
|
686
948
|
```ts
|
|
687
|
-
export default class
|
|
688
|
-
readonly #headers:
|
|
949
|
+
export default class Runner {
|
|
950
|
+
readonly #headers: Toolkit_MarkdownTable_Runner_Constructor_Headers;
|
|
689
951
|
|
|
690
952
|
public constructor(headers: ..., options?: ...) {
|
|
691
953
|
this.#headers = headers;
|
|
@@ -693,7 +955,9 @@ export default class MarkdownTable {
|
|
|
693
955
|
|
|
694
956
|
public addRow(row: ...): ... { }
|
|
695
957
|
}
|
|
696
|
-
// Called as
|
|
958
|
+
// Called as (consumer aliases the default import to a domain-specific local name):
|
|
959
|
+
// import MarkdownTable from '@/toolkit/markdown-table.js';
|
|
960
|
+
// new MarkdownTable(headers).addRow(row);
|
|
697
961
|
```
|
|
698
962
|
|
|
699
963
|
### `#` Private Fields over `private` Keyword
|
|
@@ -703,7 +967,7 @@ Use `#` (runtime-enforced) for private class **fields only**. Methods stay as `p
|
|
|
703
967
|
```ts
|
|
704
968
|
// GOOD — field uses #hash
|
|
705
969
|
static #cache: SomeType;
|
|
706
|
-
readonly #headers:
|
|
970
|
+
readonly #headers: MarkdownTable_Constructor_Headers;
|
|
707
971
|
|
|
708
972
|
// GOOD — method uses private keyword
|
|
709
973
|
private static async fetchData(): FetcherFetchDataReturns { }
|
|
@@ -722,7 +986,7 @@ static #fetchData(): FetcherFetchDataReturns { }
|
|
|
722
986
|
|
|
723
987
|
```ts
|
|
724
988
|
// Private fields use #hash notation
|
|
725
|
-
readonly #headers:
|
|
989
|
+
readonly #headers: MarkdownTable_Constructor_Headers;
|
|
726
990
|
|
|
727
991
|
// Static caching pattern
|
|
728
992
|
static #cache: SomeType;
|
|
@@ -769,8 +1033,8 @@ const configPath = resolve(process.cwd(), 'config.json');
|
|
|
769
1033
|
const configRaw = await fs.readFile(configPath, 'utf-8');
|
|
770
1034
|
|
|
771
1035
|
// Parse the configuration file.
|
|
772
|
-
const config:
|
|
773
|
-
const configItems = config['items'] as
|
|
1036
|
+
const config: Runner_Run_Config = JSON.parse(configRaw);
|
|
1037
|
+
const configItems = config['items'] as Runner_Run_ConfigItems;
|
|
774
1038
|
|
|
775
1039
|
// Filter and group items by category.
|
|
776
1040
|
const filtered = Runner.filterItems(configItems);
|
|
@@ -865,7 +1129,7 @@ arr.push(item);
|
|
|
865
1129
|
obj[methodName]();
|
|
866
1130
|
|
|
867
1131
|
// OK — bracket notation for property reads on Record/plain objects
|
|
868
|
-
const configItems = config['items'] as
|
|
1132
|
+
const configItems = config['items'] as Runner_Filter_Items;
|
|
869
1133
|
```
|
|
870
1134
|
|
|
871
1135
|
### No Exponentiation Operator
|
|
@@ -1030,7 +1294,7 @@ if (
|
|
|
1030
1294
|
|
|
1031
1295
|
```ts
|
|
1032
1296
|
// Both .d.ts tuple types and .ts constant arrays
|
|
1033
|
-
const categoryOrder:
|
|
1297
|
+
const categoryOrder: Runner_Release_CategoryOrder = [
|
|
1034
1298
|
'updated',
|
|
1035
1299
|
'fixed',
|
|
1036
1300
|
'added',
|
|
@@ -1166,13 +1430,13 @@ await Runner.writeOutput({
|
|
|
1166
1430
|
await Runner.runParallel();
|
|
1167
1431
|
|
|
1168
1432
|
// BAD — declarations and loop stuck together
|
|
1169
|
-
const grouped:
|
|
1170
|
-
const processed:
|
|
1433
|
+
const grouped: Runner_GroupItems_Grouped = new Map();
|
|
1434
|
+
const processed: Runner_GroupItems_Processed = new Set();
|
|
1171
1435
|
for (const category of validPolicies) {
|
|
1172
1436
|
|
|
1173
1437
|
// GOOD — blank line before loop
|
|
1174
|
-
const grouped:
|
|
1175
|
-
const processed:
|
|
1438
|
+
const grouped: Runner_GroupItems_Grouped = new Map();
|
|
1439
|
+
const processed: Runner_GroupItems_Processed = new Set();
|
|
1176
1440
|
|
|
1177
1441
|
for (const category of validPolicies) {
|
|
1178
1442
|
|
|
@@ -1303,7 +1567,7 @@ Use `undefined` for optional/missing values (params not passed, uninitialized).
|
|
|
1303
1567
|
let selectedPackage;
|
|
1304
1568
|
|
|
1305
1569
|
// GOOD — explicit undefined
|
|
1306
|
-
let selectedPackage:
|
|
1570
|
+
let selectedPackage: Runner_Run_SelectedPackage = undefined;
|
|
1307
1571
|
```
|
|
1308
1572
|
|
|
1309
1573
|
### Error Handling
|
|
@@ -1479,8 +1743,8 @@ function parse(input: any): any { ... }
|
|
|
1479
1743
|
const data = response.json() as any;
|
|
1480
1744
|
|
|
1481
1745
|
// GOOD — named type aliases (defined as unknown in .d.ts)
|
|
1482
|
-
function parse(input:
|
|
1483
|
-
const data:
|
|
1746
|
+
function parse(input: Runner_Parse_Input): Runner_Parse_Returns { ... }
|
|
1747
|
+
const data: Fetcher_GetData_Response = FetcherResponseSchema.parse(response.json());
|
|
1484
1748
|
```
|
|
1485
1749
|
|
|
1486
1750
|
## Regex Patterns
|