@cbnventures/nova 0.13.0 → 0.14.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/build/package.json +12 -16
- package/build/src/api/node-releases.d.ts +1 -1
- package/build/src/api/spdx-licenses.d.ts +1 -1
- package/build/src/cli/index.js +155 -39
- package/build/src/cli/index.js.map +1 -1
- package/build/src/cli/recipe/index.d.ts +3 -0
- package/build/src/cli/recipe/index.d.ts.map +1 -0
- package/build/src/cli/recipe/index.js +57 -0
- package/build/src/cli/recipe/index.js.map +1 -0
- package/build/src/cli/recipe/package-json/cleanup.d.ts +8 -0
- package/build/src/cli/recipe/package-json/cleanup.d.ts.map +1 -0
- package/build/src/cli/recipe/package-json/cleanup.js +174 -0
- package/build/src/cli/recipe/package-json/cleanup.js.map +1 -0
- package/build/src/cli/recipe/package-json/normalize-artifacts.d.ts +8 -0
- package/build/src/cli/recipe/package-json/normalize-artifacts.d.ts.map +1 -0
- package/build/src/cli/recipe/package-json/normalize-artifacts.js +242 -0
- package/build/src/cli/recipe/package-json/normalize-artifacts.js.map +1 -0
- package/build/src/cli/recipe/package-json/normalize-bundler.d.ts +6 -0
- package/build/src/cli/recipe/package-json/normalize-bundler.d.ts.map +1 -0
- package/build/src/cli/recipe/package-json/normalize-bundler.js +145 -0
- package/build/src/cli/recipe/package-json/normalize-bundler.js.map +1 -0
- package/build/src/cli/recipe/package-json/normalize-dependencies.d.ts +9 -0
- package/build/src/cli/recipe/package-json/normalize-dependencies.d.ts.map +1 -0
- package/build/src/cli/recipe/package-json/normalize-dependencies.js +262 -0
- package/build/src/cli/recipe/package-json/normalize-dependencies.js.map +1 -0
- package/build/src/cli/recipe/package-json/normalize-modules.d.ts +6 -0
- package/build/src/cli/recipe/package-json/normalize-modules.d.ts.map +1 -0
- package/build/src/cli/recipe/package-json/normalize-modules.js +249 -0
- package/build/src/cli/recipe/package-json/normalize-modules.js.map +1 -0
- package/build/src/cli/recipe/package-json/normalize-tooling.d.ts +7 -0
- package/build/src/cli/recipe/package-json/normalize-tooling.d.ts.map +1 -0
- package/build/src/cli/recipe/package-json/normalize-tooling.js +168 -0
- package/build/src/cli/recipe/package-json/normalize-tooling.js.map +1 -0
- package/build/src/cli/recipe/package-json/sync-environment.d.ts +9 -0
- package/build/src/cli/recipe/package-json/sync-environment.d.ts.map +1 -0
- package/build/src/cli/recipe/package-json/sync-environment.js +286 -0
- package/build/src/cli/recipe/package-json/sync-environment.js.map +1 -0
- package/build/src/cli/recipe/package-json/sync-identity.d.ts +6 -0
- package/build/src/cli/recipe/package-json/sync-identity.d.ts.map +1 -0
- package/build/src/cli/recipe/package-json/sync-identity.js +219 -0
- package/build/src/cli/recipe/package-json/sync-identity.js.map +1 -0
- package/build/src/cli/recipe/package-json/sync-ownership.d.ts +6 -0
- package/build/src/cli/recipe/package-json/sync-ownership.d.ts.map +1 -0
- package/build/src/cli/recipe/package-json/sync-ownership.js +349 -0
- package/build/src/cli/recipe/package-json/sync-ownership.js.map +1 -0
- package/build/src/cli/utility/changelog.d.ts +1 -1
- package/build/src/cli/utility/changelog.d.ts.map +1 -1
- package/build/src/cli/utility/changelog.js +10 -10
- package/build/src/cli/utility/changelog.js.map +1 -1
- package/build/src/cli/utility/initialize.d.ts +1 -1
- package/build/src/cli/utility/initialize.d.ts.map +1 -1
- package/build/src/cli/utility/initialize.js +259 -74
- package/build/src/cli/utility/initialize.js.map +1 -1
- package/build/src/cli/utility/run-recipes.d.ts +5 -0
- package/build/src/cli/utility/run-recipes.d.ts.map +1 -0
- package/build/src/cli/utility/run-recipes.js +42 -0
- package/build/src/cli/utility/run-recipes.js.map +1 -0
- package/build/src/cli/utility/run-scripts.d.ts +10 -0
- package/build/src/cli/utility/run-scripts.d.ts.map +1 -0
- package/build/src/cli/utility/run-scripts.js +160 -0
- package/build/src/cli/utility/run-scripts.js.map +1 -0
- package/build/src/cli/utility/transpile.d.ts +9 -0
- package/build/src/cli/utility/transpile.d.ts.map +1 -0
- package/build/src/cli/utility/transpile.js +59 -0
- package/build/src/cli/utility/transpile.js.map +1 -0
- package/build/src/cli/utility/type-check.d.ts +1 -1
- package/build/src/cli/utility/type-check.d.ts.map +1 -1
- package/build/src/cli/utility/type-check.js +3 -3
- package/build/src/cli/utility/type-check.js.map +1 -1
- package/build/src/cli/utility/version.d.ts +1 -1
- package/build/src/cli/utility/version.d.ts.map +1 -1
- package/build/src/cli/utility/version.js.map +1 -1
- package/build/src/lib/item.d.ts +7 -2
- package/build/src/lib/item.d.ts.map +1 -1
- package/build/src/lib/item.js +37 -10
- package/build/src/lib/item.js.map +1 -1
- package/build/src/lib/nova-config.d.ts +2 -2
- package/build/src/lib/nova-config.d.ts.map +1 -1
- package/build/src/lib/nova-config.js +46 -21
- package/build/src/lib/nova-config.js.map +1 -1
- package/build/src/lib/utility.d.ts +1 -1
- package/build/src/lib/utility.d.ts.map +1 -1
- package/build/src/lib/utility.js +9 -6
- package/build/src/lib/utility.js.map +1 -1
- package/build/src/presets/eslint/dx-code-style.d.mts +1 -1
- package/build/src/presets/eslint/dx-ignore.d.mts +1 -1
- package/build/src/presets/eslint/env-browser.d.mts +1 -1
- package/build/src/presets/eslint/env-edge.d.mts +1 -1
- package/build/src/presets/eslint/env-node.d.mts +1 -1
- package/build/src/presets/eslint/env-service-worker.d.mts +1 -1
- package/build/src/presets/eslint/env-web-worker.d.mts +1 -1
- package/build/src/presets/eslint/fw-docusaurus.d.mts +1 -1
- package/build/src/presets/eslint/fw-expressjs.d.mts +1 -1
- package/build/src/presets/eslint/fw-nextjs.d.mts +1 -1
- package/build/src/presets/eslint/lang-javascript.d.mts +1 -1
- package/build/src/presets/eslint/lang-mdx.d.mts +1 -1
- package/build/src/presets/eslint/lang-typescript.d.mts +1 -1
- package/build/src/presets/eslint/platform-cloudflare-workers.d.mts +1 -1
- package/build/src/presets/eslint/tool-vite.d.mts +1 -1
- package/build/src/rules/eslint/formatting/no-raw-text-in-code.d.ts.map +1 -0
- package/build/src/rules/eslint/{no-raw-text-in-code.js → formatting/no-raw-text-in-code.js} +1 -1
- package/build/src/rules/eslint/formatting/no-raw-text-in-code.js.map +1 -0
- package/build/src/rules/eslint/formatting/require-padding-lines.d.ts +13 -0
- package/build/src/rules/eslint/formatting/require-padding-lines.d.ts.map +1 -0
- package/build/src/rules/eslint/formatting/require-padding-lines.js +173 -0
- package/build/src/rules/eslint/formatting/require-padding-lines.js.map +1 -0
- package/build/src/rules/eslint/index.d.ts +14 -5
- package/build/src/rules/eslint/index.d.ts.map +1 -1
- package/build/src/rules/eslint/index.js +14 -5
- package/build/src/rules/eslint/index.js.map +1 -1
- package/build/src/rules/eslint/nova/no-logger-dev.d.ts.map +1 -0
- package/build/src/rules/eslint/{no-logger-dev.js → nova/no-logger-dev.js} +6 -4
- package/build/src/rules/eslint/nova/no-logger-dev.js.map +1 -0
- package/build/src/rules/eslint/patterns/no-assign-then-return.d.ts +6 -0
- package/build/src/rules/eslint/patterns/no-assign-then-return.d.ts.map +1 -0
- package/build/src/rules/eslint/patterns/no-assign-then-return.js +55 -0
- package/build/src/rules/eslint/patterns/no-assign-then-return.js.map +1 -0
- package/build/src/rules/eslint/patterns/no-bracket-assignment.d.ts +6 -0
- package/build/src/rules/eslint/patterns/no-bracket-assignment.d.ts.map +1 -0
- package/build/src/rules/eslint/patterns/no-bracket-assignment.js +31 -0
- package/build/src/rules/eslint/patterns/no-bracket-assignment.js.map +1 -0
- package/build/src/rules/eslint/patterns/no-destructuring.d.ts +13 -0
- package/build/src/rules/eslint/patterns/no-destructuring.d.ts.map +1 -0
- package/build/src/rules/eslint/patterns/no-destructuring.js +177 -0
- package/build/src/rules/eslint/patterns/no-destructuring.js.map +1 -0
- package/build/src/rules/eslint/patterns/no-implicit-boolean.d.ts +6 -0
- package/build/src/rules/eslint/patterns/no-implicit-boolean.d.ts.map +1 -0
- package/build/src/rules/eslint/patterns/no-implicit-boolean.js +62 -0
- package/build/src/rules/eslint/patterns/no-implicit-boolean.js.map +1 -0
- package/build/src/rules/eslint/patterns/no-ternary-in-template-literal.d.ts +6 -0
- package/build/src/rules/eslint/patterns/no-ternary-in-template-literal.d.ts.map +1 -0
- package/build/src/rules/eslint/patterns/no-ternary-in-template-literal.js +32 -0
- package/build/src/rules/eslint/patterns/no-ternary-in-template-literal.js.map +1 -0
- package/build/src/rules/eslint/patterns/switch-case-blocks.d.ts.map +1 -0
- package/build/src/rules/eslint/{switch-case-blocks.js → patterns/switch-case-blocks.js} +2 -2
- package/build/src/rules/eslint/patterns/switch-case-blocks.js.map +1 -0
- package/build/src/rules/eslint/regex/no-regex-literal-flags.d.ts.map +1 -0
- package/build/src/rules/eslint/regex/no-regex-literal-flags.js.map +1 -0
- package/build/src/rules/eslint/{no-regex-literals.d.ts → regex/no-regex-literals.d.ts} +1 -1
- package/build/src/rules/eslint/regex/no-regex-literals.d.ts.map +1 -0
- package/build/src/rules/eslint/{no-regex-literals.js → regex/no-regex-literals.js} +4 -4
- package/build/src/rules/eslint/regex/no-regex-literals.js.map +1 -0
- package/build/src/rules/eslint/typescript/no-catch-unknown-annotation.d.ts +6 -0
- package/build/src/rules/eslint/typescript/no-catch-unknown-annotation.d.ts.map +1 -0
- package/build/src/rules/eslint/typescript/no-catch-unknown-annotation.js +38 -0
- package/build/src/rules/eslint/typescript/no-catch-unknown-annotation.js.map +1 -0
- package/build/src/rules/eslint/typescript/no-inline-type-annotation.d.ts +6 -0
- package/build/src/rules/eslint/typescript/no-inline-type-annotation.d.ts.map +1 -0
- package/build/src/rules/eslint/typescript/no-inline-type-annotation.js +36 -0
- package/build/src/rules/eslint/typescript/no-inline-type-annotation.js.map +1 -0
- package/build/src/rules/eslint/typescript/no-shared-type-import.d.ts +9 -0
- package/build/src/rules/eslint/typescript/no-shared-type-import.d.ts.map +1 -0
- package/build/src/rules/eslint/typescript/no-shared-type-import.js +57 -0
- package/build/src/rules/eslint/typescript/no-shared-type-import.js.map +1 -0
- package/build/src/tests/cli/recipe/package-json/cleanup.test.d.ts +2 -0
- package/build/src/tests/cli/recipe/package-json/cleanup.test.d.ts.map +1 -0
- package/build/src/tests/cli/recipe/package-json/cleanup.test.js +240 -0
- package/build/src/tests/cli/recipe/package-json/cleanup.test.js.map +1 -0
- package/build/src/tests/cli/recipe/package-json/normalize-artifacts.test.d.ts +2 -0
- package/build/src/tests/cli/recipe/package-json/normalize-artifacts.test.d.ts.map +1 -0
- package/build/src/tests/cli/recipe/package-json/normalize-artifacts.test.js +161 -0
- package/build/src/tests/cli/recipe/package-json/normalize-artifacts.test.js.map +1 -0
- package/build/src/tests/cli/recipe/package-json/normalize-bundler.test.d.ts +2 -0
- package/build/src/tests/cli/recipe/package-json/normalize-bundler.test.d.ts.map +1 -0
- package/build/src/tests/cli/recipe/package-json/normalize-bundler.test.js +161 -0
- package/build/src/tests/cli/recipe/package-json/normalize-bundler.test.js.map +1 -0
- package/build/src/tests/cli/recipe/package-json/normalize-dependencies.test.d.ts +2 -0
- package/build/src/tests/cli/recipe/package-json/normalize-dependencies.test.d.ts.map +1 -0
- package/build/src/tests/cli/recipe/package-json/normalize-dependencies.test.js +175 -0
- package/build/src/tests/cli/recipe/package-json/normalize-dependencies.test.js.map +1 -0
- package/build/src/tests/cli/recipe/package-json/normalize-modules.test.d.ts +2 -0
- package/build/src/tests/cli/recipe/package-json/normalize-modules.test.d.ts.map +1 -0
- package/build/src/tests/cli/recipe/package-json/normalize-modules.test.js +164 -0
- package/build/src/tests/cli/recipe/package-json/normalize-modules.test.js.map +1 -0
- package/build/src/tests/cli/recipe/package-json/normalize-tooling.test.d.ts +2 -0
- package/build/src/tests/cli/recipe/package-json/normalize-tooling.test.d.ts.map +1 -0
- package/build/src/tests/cli/recipe/package-json/normalize-tooling.test.js +193 -0
- package/build/src/tests/cli/recipe/package-json/normalize-tooling.test.js.map +1 -0
- package/build/src/tests/cli/recipe/package-json/sync-environment.test.d.ts +2 -0
- package/build/src/tests/cli/recipe/package-json/sync-environment.test.d.ts.map +1 -0
- package/build/src/tests/cli/recipe/package-json/sync-environment.test.js +158 -0
- package/build/src/tests/cli/recipe/package-json/sync-environment.test.js.map +1 -0
- package/build/src/tests/cli/recipe/package-json/sync-identity.test.d.ts +2 -0
- package/build/src/tests/cli/recipe/package-json/sync-identity.test.d.ts.map +1 -0
- package/build/src/tests/cli/recipe/package-json/sync-identity.test.js +156 -0
- package/build/src/tests/cli/recipe/package-json/sync-identity.test.js.map +1 -0
- package/build/src/tests/cli/recipe/package-json/sync-ownership.test.d.ts +2 -0
- package/build/src/tests/cli/recipe/package-json/sync-ownership.test.d.ts.map +1 -0
- package/build/src/tests/cli/recipe/package-json/sync-ownership.test.js +164 -0
- package/build/src/tests/cli/recipe/package-json/sync-ownership.test.js.map +1 -0
- package/build/src/tests/cli/utility/changelog.test.d.ts +2 -0
- package/build/src/tests/cli/utility/changelog.test.d.ts.map +1 -0
- package/build/src/tests/cli/utility/changelog.test.js +274 -0
- package/build/src/tests/cli/utility/changelog.test.js.map +1 -0
- package/build/src/tests/cli/utility/initialize.test.d.ts +2 -0
- package/build/src/tests/cli/utility/initialize.test.d.ts.map +1 -0
- package/build/src/tests/cli/utility/initialize.test.js +27 -0
- package/build/src/tests/cli/utility/initialize.test.js.map +1 -0
- package/build/src/tests/cli/utility/run-recipes.test.d.ts +2 -0
- package/build/src/tests/cli/utility/run-recipes.test.d.ts.map +1 -0
- package/build/src/tests/cli/utility/run-recipes.test.js +41 -0
- package/build/src/tests/cli/utility/run-recipes.test.js.map +1 -0
- package/build/src/tests/cli/utility/run-scripts.test.d.ts +2 -0
- package/build/src/tests/cli/utility/run-scripts.test.d.ts.map +1 -0
- package/build/src/tests/cli/utility/run-scripts.test.js +153 -0
- package/build/src/tests/cli/utility/run-scripts.test.js.map +1 -0
- package/build/src/tests/cli/utility/transpile.test.d.ts +2 -0
- package/build/src/tests/cli/utility/transpile.test.d.ts.map +1 -0
- package/build/src/tests/cli/utility/transpile.test.js +65 -0
- package/build/src/tests/cli/utility/transpile.test.js.map +1 -0
- package/build/src/tests/cli/utility/type-check.test.d.ts +2 -0
- package/build/src/tests/cli/utility/type-check.test.d.ts.map +1 -0
- package/build/src/tests/cli/utility/type-check.test.js +63 -0
- package/build/src/tests/cli/utility/type-check.test.js.map +1 -0
- package/build/src/tests/cli/utility/version.test.d.ts +2 -0
- package/build/src/tests/cli/utility/version.test.d.ts.map +1 -0
- package/build/src/tests/cli/utility/version.test.js +38 -0
- package/build/src/tests/cli/utility/version.test.js.map +1 -0
- package/build/src/tests/lib/item.test.js +8 -8
- package/build/src/tests/lib/item.test.js.map +1 -1
- package/build/src/tests/lib/nova-config.test.js +53 -26
- package/build/src/tests/lib/nova-config.test.js.map +1 -1
- package/build/src/tests/rules/eslint/formatting/no-raw-text-in-code.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/{no-raw-text-in-code.test.js → formatting/no-raw-text-in-code.test.js} +1 -1
- package/build/src/tests/rules/eslint/formatting/no-raw-text-in-code.test.js.map +1 -0
- package/build/src/tests/rules/eslint/formatting/require-padding-lines.test.d.ts +2 -0
- package/build/src/tests/rules/eslint/formatting/require-padding-lines.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/formatting/require-padding-lines.test.js +131 -0
- package/build/src/tests/rules/eslint/formatting/require-padding-lines.test.js.map +1 -0
- package/build/src/tests/rules/eslint/nova/no-logger-dev.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/{no-logger-dev.test.js → nova/no-logger-dev.test.js} +1 -1
- package/build/src/tests/rules/eslint/nova/no-logger-dev.test.js.map +1 -0
- package/build/src/tests/rules/eslint/patterns/no-assign-then-return.test.d.ts +2 -0
- package/build/src/tests/rules/eslint/patterns/no-assign-then-return.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/patterns/no-assign-then-return.test.js +39 -0
- package/build/src/tests/rules/eslint/patterns/no-assign-then-return.test.js.map +1 -0
- package/build/src/tests/rules/eslint/patterns/no-bracket-assignment.test.d.ts +2 -0
- package/build/src/tests/rules/eslint/patterns/no-bracket-assignment.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/patterns/no-bracket-assignment.test.js +40 -0
- package/build/src/tests/rules/eslint/patterns/no-bracket-assignment.test.js.map +1 -0
- package/build/src/tests/rules/eslint/patterns/no-destructuring.test.d.ts +2 -0
- package/build/src/tests/rules/eslint/patterns/no-destructuring.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/patterns/no-destructuring.test.js +86 -0
- package/build/src/tests/rules/eslint/patterns/no-destructuring.test.js.map +1 -0
- package/build/src/tests/rules/eslint/patterns/no-implicit-boolean.test.d.ts +2 -0
- package/build/src/tests/rules/eslint/patterns/no-implicit-boolean.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/patterns/no-implicit-boolean.test.js +76 -0
- package/build/src/tests/rules/eslint/patterns/no-implicit-boolean.test.js.map +1 -0
- package/build/src/tests/rules/eslint/patterns/no-ternary-in-template-literal.test.d.ts +2 -0
- package/build/src/tests/rules/eslint/patterns/no-ternary-in-template-literal.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/patterns/no-ternary-in-template-literal.test.js +42 -0
- package/build/src/tests/rules/eslint/patterns/no-ternary-in-template-literal.test.js.map +1 -0
- package/build/src/tests/rules/eslint/patterns/switch-case-blocks.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/{switch-case-blocks.test.js → patterns/switch-case-blocks.test.js} +1 -1
- package/build/src/tests/rules/eslint/patterns/switch-case-blocks.test.js.map +1 -0
- package/build/src/tests/rules/eslint/regex/no-regex-literal-flags.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/{no-regex-literal-flags.test.js → regex/no-regex-literal-flags.test.js} +1 -1
- package/build/src/tests/rules/eslint/regex/no-regex-literal-flags.test.js.map +1 -0
- package/build/src/tests/rules/eslint/regex/no-regex-literals.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/{no-regex-literals.test.js → regex/no-regex-literals.test.js} +1 -1
- package/build/src/tests/rules/eslint/regex/no-regex-literals.test.js.map +1 -0
- package/build/src/tests/rules/eslint/typescript/no-catch-unknown-annotation.test.d.ts +2 -0
- package/build/src/tests/rules/eslint/typescript/no-catch-unknown-annotation.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/typescript/no-catch-unknown-annotation.test.js +34 -0
- package/build/src/tests/rules/eslint/typescript/no-catch-unknown-annotation.test.js.map +1 -0
- package/build/src/tests/rules/eslint/typescript/no-inline-type-annotation.test.d.ts +2 -0
- package/build/src/tests/rules/eslint/typescript/no-inline-type-annotation.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/typescript/no-inline-type-annotation.test.js +55 -0
- package/build/src/tests/rules/eslint/typescript/no-inline-type-annotation.test.js.map +1 -0
- package/build/src/tests/rules/eslint/typescript/no-shared-type-import.test.d.ts +2 -0
- package/build/src/tests/rules/eslint/typescript/no-shared-type-import.test.d.ts.map +1 -0
- package/build/src/tests/rules/eslint/typescript/no-shared-type-import.test.js +51 -0
- package/build/src/tests/rules/eslint/typescript/no-shared-type-import.test.js.map +1 -0
- package/build/src/toolkit/cli-header.d.ts +1 -1
- package/build/src/toolkit/cli-header.js +1 -1
- package/build/src/toolkit/logger.d.ts +1 -1
- package/build/src/toolkit/markdown-table.d.ts +1 -1
- package/package.json +12 -16
- package/build/eslint.config.d.ts +0 -34
- package/build/eslint.config.d.ts.map +0 -1
- package/build/eslint.config.js +0 -40
- package/build/eslint.config.js.map +0 -1
- package/build/src/cli/recipe/pin-versions.d.ts +0 -7
- package/build/src/cli/recipe/pin-versions.d.ts.map +0 -1
- package/build/src/cli/recipe/pin-versions.js +0 -145
- package/build/src/cli/recipe/pin-versions.js.map +0 -1
- package/build/src/cli/recipe/sync-lts-engines.d.ts +0 -6
- package/build/src/cli/recipe/sync-lts-engines.d.ts.map +0 -1
- package/build/src/cli/recipe/sync-lts-engines.js +0 -118
- package/build/src/cli/recipe/sync-lts-engines.js.map +0 -1
- package/build/src/cli/recipe/sync-packages.d.ts +0 -18
- package/build/src/cli/recipe/sync-packages.d.ts.map +0 -1
- package/build/src/cli/recipe/sync-packages.js +0 -1212
- package/build/src/cli/recipe/sync-packages.js.map +0 -1
- package/build/src/rules/eslint/no-logger-dev.d.ts.map +0 -1
- package/build/src/rules/eslint/no-logger-dev.js.map +0 -1
- package/build/src/rules/eslint/no-raw-text-in-code.d.ts.map +0 -1
- package/build/src/rules/eslint/no-raw-text-in-code.js.map +0 -1
- package/build/src/rules/eslint/no-regex-literal-flags.d.ts.map +0 -1
- package/build/src/rules/eslint/no-regex-literal-flags.js.map +0 -1
- package/build/src/rules/eslint/no-regex-literals.d.ts.map +0 -1
- package/build/src/rules/eslint/no-regex-literals.js.map +0 -1
- package/build/src/rules/eslint/switch-case-blocks.d.ts.map +0 -1
- package/build/src/rules/eslint/switch-case-blocks.js.map +0 -1
- package/build/src/tests/cli/recipe/pin-versions.test.d.ts +0 -2
- package/build/src/tests/cli/recipe/pin-versions.test.d.ts.map +0 -1
- package/build/src/tests/cli/recipe/pin-versions.test.js +0 -197
- package/build/src/tests/cli/recipe/pin-versions.test.js.map +0 -1
- package/build/src/tests/cli/recipe/sync-lts-engines.test.d.ts +0 -2
- package/build/src/tests/cli/recipe/sync-lts-engines.test.d.ts.map +0 -1
- package/build/src/tests/cli/recipe/sync-lts-engines.test.js +0 -131
- package/build/src/tests/cli/recipe/sync-lts-engines.test.js.map +0 -1
- package/build/src/tests/rules/eslint/no-logger-dev.test.d.ts.map +0 -1
- package/build/src/tests/rules/eslint/no-logger-dev.test.js.map +0 -1
- package/build/src/tests/rules/eslint/no-raw-text-in-code.test.d.ts.map +0 -1
- package/build/src/tests/rules/eslint/no-raw-text-in-code.test.js.map +0 -1
- package/build/src/tests/rules/eslint/no-regex-literal-flags.test.d.ts.map +0 -1
- package/build/src/tests/rules/eslint/no-regex-literal-flags.test.js.map +0 -1
- package/build/src/tests/rules/eslint/no-regex-literals.test.d.ts.map +0 -1
- package/build/src/tests/rules/eslint/no-regex-literals.test.js.map +0 -1
- package/build/src/tests/rules/eslint/switch-case-blocks.test.d.ts.map +0 -1
- package/build/src/tests/rules/eslint/switch-case-blocks.test.js.map +0 -1
- /package/build/src/rules/eslint/{no-raw-text-in-code.d.ts → formatting/no-raw-text-in-code.d.ts} +0 -0
- /package/build/src/rules/eslint/{no-logger-dev.d.ts → nova/no-logger-dev.d.ts} +0 -0
- /package/build/src/rules/eslint/{switch-case-blocks.d.ts → patterns/switch-case-blocks.d.ts} +0 -0
- /package/build/src/rules/eslint/{no-regex-literal-flags.d.ts → regex/no-regex-literal-flags.d.ts} +0 -0
- /package/build/src/rules/eslint/{no-regex-literal-flags.js → regex/no-regex-literal-flags.js} +0 -0
- /package/build/src/tests/rules/eslint/{no-raw-text-in-code.test.d.ts → formatting/no-raw-text-in-code.test.d.ts} +0 -0
- /package/build/src/tests/rules/eslint/{no-logger-dev.test.d.ts → nova/no-logger-dev.test.d.ts} +0 -0
- /package/build/src/tests/rules/eslint/{switch-case-blocks.test.d.ts → patterns/switch-case-blocks.test.d.ts} +0 -0
- /package/build/src/tests/rules/eslint/{no-regex-literal-flags.test.d.ts → regex/no-regex-literal-flags.test.d.ts} +0 -0
- /package/build/src/tests/rules/eslint/{no-regex-literals.test.d.ts → regex/no-regex-literals.test.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { relative, sep } from 'path';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import prompts from 'prompts';
|
|
4
|
-
import { itemAllowedPoliciesByRole,
|
|
4
|
+
import { itemAllowedPoliciesByRole, itemAllowedRecipes, itemInitializeRolesToSync, itemInitializeValidEntityRoles, } from '../../lib/item.js';
|
|
5
5
|
import { NovaConfig } from '../../lib/nova-config.js';
|
|
6
6
|
import { PATTERN_EMAIL_SIMPLE, PATTERN_SLUG_SCOPED, PATTERN_SLUG_SIMPLE } from '../../lib/regex.js';
|
|
7
7
|
import { discoverPathsWithFile } from '../../lib/utility.js';
|
|
@@ -223,7 +223,7 @@ export class CLIUtilityInitialize {
|
|
|
223
223
|
const currentSlug = (config.project !== undefined && config.project.name !== undefined) ? config.project.name.slug ?? '' : '';
|
|
224
224
|
const slugChanged = previousSlug !== currentSlug;
|
|
225
225
|
if (slugChanged && config.workspaces !== undefined) {
|
|
226
|
-
const rolesToSync = [
|
|
226
|
+
const rolesToSync = [...itemInitializeRolesToSync];
|
|
227
227
|
const slugPrefix = new RegExp(`^${previousSlug}-`);
|
|
228
228
|
Logger.customize({
|
|
229
229
|
name: 'CLIUtilityInitialize.promptProject',
|
|
@@ -231,10 +231,10 @@ export class CLIUtilityInitialize {
|
|
|
231
231
|
padTop: 1,
|
|
232
232
|
}).info(`Project slug updated from "${previousSlug || '(unset)'}" to "${currentSlug || '(unset)'}".`);
|
|
233
233
|
for (const workspace of Object.values(config.workspaces)) {
|
|
234
|
-
if (
|
|
234
|
+
if (rolesToSync.includes(workspace.role) === false) {
|
|
235
235
|
continue;
|
|
236
236
|
}
|
|
237
|
-
const
|
|
237
|
+
const name = workspace.name;
|
|
238
238
|
if (previousSlug === '' && currentSlug !== '') {
|
|
239
239
|
workspace.name = `${currentSlug}-${name}`;
|
|
240
240
|
}
|
|
@@ -292,11 +292,15 @@ export class CLIUtilityInitialize {
|
|
|
292
292
|
};
|
|
293
293
|
while (true) {
|
|
294
294
|
const choices = [];
|
|
295
|
-
entities.
|
|
295
|
+
for (let i = 0; i < entities.length; i += 1) {
|
|
296
|
+
const entity = entities[i];
|
|
297
|
+
if (entity === undefined) {
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
296
300
|
const entityName = (entity.name !== undefined) ? entity.name.trim() : '';
|
|
297
301
|
const entityEmail = (entity.email !== undefined) ? entity.email.trim() : '';
|
|
298
302
|
const entityRoles = (Array.isArray(entity.roles)) ? entity.roles.filter((role) => role.trim() !== '') : [];
|
|
299
|
-
const label = entityName || entityEmail || `Entity ${
|
|
303
|
+
const label = entityName || entityEmail || `Entity ${i + 1}`;
|
|
300
304
|
const descriptionParts = [];
|
|
301
305
|
if (entityEmail !== '') {
|
|
302
306
|
descriptionParts.push(entityEmail);
|
|
@@ -306,7 +310,7 @@ export class CLIUtilityInitialize {
|
|
|
306
310
|
.map((entityRole) => entityRole.trim())
|
|
307
311
|
.filter((entityRole) => entityRole.length > 0)
|
|
308
312
|
.reduce((unique, entityRole) => {
|
|
309
|
-
if (
|
|
313
|
+
if (unique.includes(entityRole) === false) {
|
|
310
314
|
unique.push(entityRole);
|
|
311
315
|
}
|
|
312
316
|
return unique;
|
|
@@ -321,7 +325,7 @@ export class CLIUtilityInitialize {
|
|
|
321
325
|
description: (description !== '') ? description : 'Update this entity.',
|
|
322
326
|
value: {
|
|
323
327
|
kind: 'edit',
|
|
324
|
-
index,
|
|
328
|
+
index: i,
|
|
325
329
|
},
|
|
326
330
|
});
|
|
327
331
|
choices.push({
|
|
@@ -329,10 +333,10 @@ export class CLIUtilityInitialize {
|
|
|
329
333
|
description: 'Delete this entity.',
|
|
330
334
|
value: {
|
|
331
335
|
kind: 'remove',
|
|
332
|
-
index,
|
|
336
|
+
index: i,
|
|
333
337
|
},
|
|
334
338
|
});
|
|
335
|
-
}
|
|
339
|
+
}
|
|
336
340
|
choices.push({
|
|
337
341
|
title: 'Add new entity',
|
|
338
342
|
description: 'Create a new entity.',
|
|
@@ -387,7 +391,7 @@ export class CLIUtilityInitialize {
|
|
|
387
391
|
if (entityResult.action === 'back') {
|
|
388
392
|
continue;
|
|
389
393
|
}
|
|
390
|
-
entities
|
|
394
|
+
Reflect.set(entities, entityIndex, entityResult.entity);
|
|
391
395
|
sync();
|
|
392
396
|
Logger.customize({
|
|
393
397
|
name: 'CLIUtilityInitialize.promptEntities',
|
|
@@ -425,7 +429,7 @@ export class CLIUtilityInitialize {
|
|
|
425
429
|
}
|
|
426
430
|
}
|
|
427
431
|
static async promptEntitiesForm(entity, mode) {
|
|
428
|
-
const validRoles = [
|
|
432
|
+
const validRoles = [...itemInitializeValidEntityRoles];
|
|
429
433
|
const existingName = (entity !== undefined && typeof entity.name === 'string') ? entity.name : '';
|
|
430
434
|
const existingEmail = (entity !== undefined && typeof entity.email === 'string') ? entity.email : '';
|
|
431
435
|
const existingUrl = (entity !== undefined && typeof entity.url === 'string') ? entity.url : '';
|
|
@@ -699,7 +703,7 @@ export class CLIUtilityInitialize {
|
|
|
699
703
|
return 'back';
|
|
700
704
|
}
|
|
701
705
|
static async promptWorkspaces(config) {
|
|
702
|
-
const workspaces = (config.workspaces) ? { ...(config.workspaces) } : {};
|
|
706
|
+
const workspaces = (config.workspaces !== undefined) ? { ...(config.workspaces) } : {};
|
|
703
707
|
const rawWorkspacePaths = await discoverPathsWithFile('package.json', 'forward');
|
|
704
708
|
const workspacePaths = rawWorkspacePaths.map((rawWorkspacePath) => {
|
|
705
709
|
const relativePath = relative(process.cwd(), rawWorkspacePath);
|
|
@@ -845,11 +849,13 @@ export class CLIUtilityInitialize {
|
|
|
845
849
|
type: 'select',
|
|
846
850
|
name: 'workspaceRole',
|
|
847
851
|
message: `Select a role for "${options.workspacePath}"`,
|
|
848
|
-
choices: allowedRoles.map((
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
852
|
+
choices: allowedRoles.map((allowedRole) => {
|
|
853
|
+
return {
|
|
854
|
+
title: allowedRole.title,
|
|
855
|
+
description: allowedRole.description,
|
|
856
|
+
value: allowedRole.value,
|
|
857
|
+
};
|
|
858
|
+
}),
|
|
853
859
|
initial: Math.max(0, allowedRoles.findIndex((role) => options.existingWorkspace !== undefined && role.value === options.existingWorkspace.role)),
|
|
854
860
|
});
|
|
855
861
|
if (rolePrompt.cancelled) {
|
|
@@ -863,12 +869,15 @@ export class CLIUtilityInitialize {
|
|
|
863
869
|
type: 'select',
|
|
864
870
|
name: 'workspacePolicy',
|
|
865
871
|
message: 'Select a policy',
|
|
866
|
-
choices: allowedPolicies.map((allowedPolicy) =>
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
+
choices: allowedPolicies.map((allowedPolicy) => {
|
|
873
|
+
const policyEntry = Reflect.get(policy, allowedPolicy);
|
|
874
|
+
return {
|
|
875
|
+
title: policyEntry.label,
|
|
876
|
+
description: policyEntry.description,
|
|
877
|
+
value: allowedPolicy,
|
|
878
|
+
};
|
|
879
|
+
}),
|
|
880
|
+
initial: Math.max(0, allowedPolicies.findIndex((allowedPolicy) => options.existingWorkspace !== undefined && allowedPolicy === options.existingWorkspace.policy)),
|
|
872
881
|
});
|
|
873
882
|
if (policyPrompt.cancelled) {
|
|
874
883
|
return {
|
|
@@ -882,61 +891,233 @@ export class CLIUtilityInitialize {
|
|
|
882
891
|
action: 'back',
|
|
883
892
|
};
|
|
884
893
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
value: property,
|
|
894
|
-
selected: (options.existingWorkspace !== undefined && options.existingWorkspace.syncProperties !== undefined) ? options.existingWorkspace.syncProperties.includes(property) : false,
|
|
895
|
-
})),
|
|
896
|
-
});
|
|
897
|
-
if (syncPropertiesPrompt.cancelled) {
|
|
894
|
+
const existingRecipes = (options.existingWorkspace !== undefined && options.existingWorkspace.recipes !== undefined) ? options.existingWorkspace.recipes : undefined;
|
|
895
|
+
const recipesPrompt = await CLIUtilityInitialize.promptWithCancel({
|
|
896
|
+
type: 'multiselect',
|
|
897
|
+
name: 'workspaceRecipes',
|
|
898
|
+
message: 'Select recipes to enable',
|
|
899
|
+
choices: itemAllowedRecipes.map((recipe) => {
|
|
900
|
+
const recipeTuple = (existingRecipes !== undefined) ? Reflect.get(existingRecipes, recipe) : undefined;
|
|
901
|
+
const recipeSelected = (Array.isArray(recipeTuple) && recipeTuple.length > 0 && recipeTuple[0] === true);
|
|
898
902
|
return {
|
|
899
|
-
|
|
903
|
+
title: recipe,
|
|
904
|
+
value: recipe,
|
|
905
|
+
selected: recipeSelected,
|
|
900
906
|
};
|
|
901
|
-
}
|
|
902
|
-
const selectedSyncProperties = syncPropertiesPrompt.result.workspaceSyncProperties;
|
|
903
|
-
if (selectedSyncProperties.length > 0) {
|
|
904
|
-
syncProperties = selectedSyncProperties;
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
const pinVersionsPrompt = await CLIUtilityInitialize.promptWithCancel({
|
|
908
|
-
type: 'confirm',
|
|
909
|
-
name: 'workspacePinVersions',
|
|
910
|
-
message: 'Pin dependency versions?',
|
|
911
|
-
initial: options.existingWorkspace !== undefined && options.existingWorkspace.pinVersions === true,
|
|
907
|
+
}),
|
|
912
908
|
});
|
|
913
|
-
if (
|
|
909
|
+
if (recipesPrompt.cancelled) {
|
|
914
910
|
return {
|
|
915
911
|
action: 'back',
|
|
916
912
|
};
|
|
917
913
|
}
|
|
918
|
-
const
|
|
919
|
-
const
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
914
|
+
const selectedRecipes = recipesPrompt.result.workspaceRecipes;
|
|
915
|
+
const recipes = {};
|
|
916
|
+
for (const recipe of selectedRecipes) {
|
|
917
|
+
const existingTupleRaw = (existingRecipes !== undefined) ? Reflect.get(existingRecipes, recipe) : undefined;
|
|
918
|
+
const existingTuple = (Array.isArray(existingTupleRaw)) ? existingTupleRaw : undefined;
|
|
919
|
+
const existingSettings = (existingTuple !== undefined && existingTuple.length > 1) ? existingTuple[1] : undefined;
|
|
920
|
+
if (recipe === 'sync-identity' && selectedPolicy === 'distributable') {
|
|
921
|
+
const settingsPrompt = await CLIUtilityInitialize.promptWithCancel({
|
|
922
|
+
type: 'multiselect',
|
|
923
|
+
name: 'workspaceRecipeSettings',
|
|
924
|
+
message: 'sync-identity: Select properties to sync',
|
|
925
|
+
choices: [
|
|
926
|
+
{
|
|
927
|
+
title: 'description',
|
|
928
|
+
value: 'description',
|
|
929
|
+
selected: existingSettings !== undefined && existingSettings['description'] === true,
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
title: 'keywords',
|
|
933
|
+
value: 'keywords',
|
|
934
|
+
selected: existingSettings !== undefined && existingSettings['keywords'] === true,
|
|
935
|
+
},
|
|
936
|
+
],
|
|
937
|
+
});
|
|
938
|
+
if (settingsPrompt.cancelled) {
|
|
939
|
+
return {
|
|
940
|
+
action: 'back',
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
const selectedSettings = settingsPrompt.result.workspaceRecipeSettings;
|
|
944
|
+
if (selectedSettings.length > 0) {
|
|
945
|
+
const settings = {};
|
|
946
|
+
for (const setting of selectedSettings) {
|
|
947
|
+
Reflect.set(settings, setting, true);
|
|
948
|
+
}
|
|
949
|
+
Reflect.set(recipes, recipe, [true, settings]);
|
|
950
|
+
}
|
|
951
|
+
else {
|
|
952
|
+
Reflect.set(recipes, recipe, [true]);
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
else if (recipe === 'sync-ownership' && selectedPolicy === 'distributable') {
|
|
956
|
+
const settingsPrompt = await CLIUtilityInitialize.promptWithCancel({
|
|
957
|
+
type: 'multiselect',
|
|
958
|
+
name: 'workspaceRecipeSettings',
|
|
959
|
+
message: 'sync-ownership: Select properties to sync',
|
|
960
|
+
choices: [
|
|
961
|
+
{
|
|
962
|
+
title: 'homepage',
|
|
963
|
+
value: 'homepage',
|
|
964
|
+
selected: existingSettings !== undefined && existingSettings['homepage'] === true,
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
title: 'bugs',
|
|
968
|
+
value: 'bugs',
|
|
969
|
+
selected: existingSettings !== undefined && existingSettings['bugs'] === true,
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
title: 'author',
|
|
973
|
+
value: 'author',
|
|
974
|
+
selected: existingSettings !== undefined && existingSettings['author'] === true,
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
title: 'contributors',
|
|
978
|
+
value: 'contributors',
|
|
979
|
+
selected: existingSettings !== undefined && existingSettings['contributors'] === true,
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
title: 'funding',
|
|
983
|
+
value: 'funding',
|
|
984
|
+
selected: existingSettings !== undefined && existingSettings['funding'] === true,
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
title: 'repository',
|
|
988
|
+
value: 'repository',
|
|
989
|
+
selected: existingSettings !== undefined && existingSettings['repository'] === true,
|
|
990
|
+
},
|
|
991
|
+
],
|
|
992
|
+
});
|
|
993
|
+
if (settingsPrompt.cancelled) {
|
|
994
|
+
return {
|
|
995
|
+
action: 'back',
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
const selectedSettings = settingsPrompt.result.workspaceRecipeSettings;
|
|
999
|
+
if (selectedSettings.length > 0) {
|
|
1000
|
+
const settings = {};
|
|
1001
|
+
for (const setting of selectedSettings) {
|
|
1002
|
+
Reflect.set(settings, setting, true);
|
|
1003
|
+
}
|
|
1004
|
+
Reflect.set(recipes, recipe, [true, settings]);
|
|
1005
|
+
}
|
|
1006
|
+
else {
|
|
1007
|
+
Reflect.set(recipes, recipe, [true]);
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
else if (recipe === 'sync-environment') {
|
|
1011
|
+
const settingsPrompt = await CLIUtilityInitialize.promptWithCancel({
|
|
1012
|
+
type: 'multiselect',
|
|
1013
|
+
name: 'workspaceRecipeSettings',
|
|
1014
|
+
message: 'sync-environment: Select settings',
|
|
1015
|
+
choices: [
|
|
1016
|
+
{
|
|
1017
|
+
title: 'trackNodeLtsVersions',
|
|
1018
|
+
value: 'trackNodeLtsVersions',
|
|
1019
|
+
selected: existingSettings !== undefined && existingSettings['trackNodeLtsVersions'] === true,
|
|
1020
|
+
},
|
|
1021
|
+
],
|
|
1022
|
+
});
|
|
1023
|
+
if (settingsPrompt.cancelled) {
|
|
1024
|
+
return {
|
|
1025
|
+
action: 'back',
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
const selectedSettings = settingsPrompt.result.workspaceRecipeSettings;
|
|
1029
|
+
if (selectedSettings.length > 0) {
|
|
1030
|
+
const settings = {};
|
|
1031
|
+
for (const setting of selectedSettings) {
|
|
1032
|
+
Reflect.set(settings, setting, true);
|
|
1033
|
+
}
|
|
1034
|
+
Reflect.set(recipes, recipe, [true, settings]);
|
|
1035
|
+
}
|
|
1036
|
+
else {
|
|
1037
|
+
Reflect.set(recipes, recipe, [true]);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
else if (recipe === 'cleanup') {
|
|
1041
|
+
const settingsPrompt = await CLIUtilityInitialize.promptWithCancel({
|
|
1042
|
+
type: 'multiselect',
|
|
1043
|
+
name: 'workspaceRecipeSettings',
|
|
1044
|
+
message: 'cleanup: Select settings',
|
|
1045
|
+
choices: [
|
|
1046
|
+
{
|
|
1047
|
+
title: 'removeUnknownKeys',
|
|
1048
|
+
value: 'removeUnknownKeys',
|
|
1049
|
+
selected: existingSettings !== undefined && existingSettings['removeUnknownKeys'] === true,
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
title: 'reorderKeys',
|
|
1053
|
+
value: 'reorderKeys',
|
|
1054
|
+
selected: existingSettings !== undefined && existingSettings['reorderKeys'] === true,
|
|
1055
|
+
},
|
|
1056
|
+
],
|
|
1057
|
+
});
|
|
1058
|
+
if (settingsPrompt.cancelled) {
|
|
1059
|
+
return {
|
|
1060
|
+
action: 'back',
|
|
1061
|
+
};
|
|
1062
|
+
}
|
|
1063
|
+
const selectedSettings = settingsPrompt.result.workspaceRecipeSettings;
|
|
1064
|
+
if (selectedSettings.length > 0) {
|
|
1065
|
+
const settings = {};
|
|
1066
|
+
for (const setting of selectedSettings) {
|
|
1067
|
+
Reflect.set(settings, setting, true);
|
|
1068
|
+
}
|
|
1069
|
+
Reflect.set(recipes, recipe, [true, settings]);
|
|
1070
|
+
}
|
|
1071
|
+
else {
|
|
1072
|
+
Reflect.set(recipes, recipe, [true]);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
else if (recipe === 'normalize-dependencies') {
|
|
1076
|
+
const settingsPrompt = await CLIUtilityInitialize.promptWithCancel({
|
|
1077
|
+
type: 'multiselect',
|
|
1078
|
+
name: 'workspaceRecipeSettings',
|
|
1079
|
+
message: 'normalize-dependencies: Select settings',
|
|
1080
|
+
choices: [
|
|
1081
|
+
{
|
|
1082
|
+
title: 'pinDependencyVersions',
|
|
1083
|
+
value: 'pinDependencyVersions',
|
|
1084
|
+
selected: existingSettings !== undefined && existingSettings['pinDependencyVersions'] === true,
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
title: 'pinDevDependencyVersions',
|
|
1088
|
+
value: 'pinDevDependencyVersions',
|
|
1089
|
+
selected: existingSettings !== undefined && existingSettings['pinDevDependencyVersions'] === true,
|
|
1090
|
+
},
|
|
1091
|
+
],
|
|
1092
|
+
});
|
|
1093
|
+
if (settingsPrompt.cancelled) {
|
|
1094
|
+
return {
|
|
1095
|
+
action: 'back',
|
|
1096
|
+
};
|
|
1097
|
+
}
|
|
1098
|
+
const selectedSettings = settingsPrompt.result.workspaceRecipeSettings;
|
|
1099
|
+
if (selectedSettings.length > 0) {
|
|
1100
|
+
const settings = {};
|
|
1101
|
+
for (const setting of selectedSettings) {
|
|
1102
|
+
Reflect.set(settings, setting, true);
|
|
1103
|
+
}
|
|
1104
|
+
Reflect.set(recipes, recipe, [true, settings]);
|
|
1105
|
+
}
|
|
1106
|
+
else {
|
|
1107
|
+
Reflect.set(recipes, recipe, [true]);
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
else {
|
|
1111
|
+
Reflect.set(recipes, recipe, [true]);
|
|
1112
|
+
}
|
|
929
1113
|
}
|
|
930
|
-
const selectedSyncLtsEngines = syncLtsEnginesPrompt.result.workspaceSyncLtsEngines;
|
|
931
1114
|
return {
|
|
932
1115
|
action: 'apply',
|
|
933
1116
|
workspace: {
|
|
934
1117
|
name: resolvedName,
|
|
935
1118
|
role: selectedRole,
|
|
936
1119
|
policy: selectedPolicy,
|
|
937
|
-
...(
|
|
938
|
-
...(selectedPinVersions === true) ? { pinVersions: selectedPinVersions } : {},
|
|
939
|
-
...(selectedSyncLtsEngines === true) ? { syncLtsEngines: selectedSyncLtsEngines } : {},
|
|
1120
|
+
...(Object.keys(recipes).length > 0) ? { recipes } : {},
|
|
940
1121
|
},
|
|
941
1122
|
};
|
|
942
1123
|
}
|
|
@@ -1010,7 +1191,7 @@ export class CLIUtilityInitialize {
|
|
|
1010
1191
|
sanitized: undefined,
|
|
1011
1192
|
};
|
|
1012
1193
|
}
|
|
1013
|
-
if (
|
|
1194
|
+
if (PATTERN_EMAIL_SIMPLE.test(trimmedValue) === false) {
|
|
1014
1195
|
return {
|
|
1015
1196
|
result: 'Enter a valid email address or leave blank.',
|
|
1016
1197
|
sanitized: undefined,
|
|
@@ -1036,7 +1217,7 @@ export class CLIUtilityInitialize {
|
|
|
1036
1217
|
};
|
|
1037
1218
|
}
|
|
1038
1219
|
if (trimmedValue.length > 214
|
|
1039
|
-
||
|
|
1220
|
+
|| new RegExp(PATTERN_SLUG_SIMPLE, 'i').test(trimmedValue) === false) {
|
|
1040
1221
|
return {
|
|
1041
1222
|
result: 'Use only letters, numbers, hyphens, or underscores, and keep it at 214 characters or fewer.',
|
|
1042
1223
|
sanitized: undefined,
|
|
@@ -1091,7 +1272,9 @@ export class CLIUtilityInitialize {
|
|
|
1091
1272
|
.map((item) => item.trim())
|
|
1092
1273
|
.filter((item) => item !== '');
|
|
1093
1274
|
for (let i = 0; i < items.length; i += 1) {
|
|
1094
|
-
const
|
|
1275
|
+
const normalizedText = CLIUtilityInitialize.normalizeText(items[i], maxLengthPerItem);
|
|
1276
|
+
const result = normalizedText.result;
|
|
1277
|
+
const sanitized = normalizedText.sanitized;
|
|
1095
1278
|
if (result !== true) {
|
|
1096
1279
|
return {
|
|
1097
1280
|
result: `Invalid entry "${items[i]}": Input a value under ${maxLengthPerItem} character(s) or remove entry.`,
|
|
@@ -1099,7 +1282,7 @@ export class CLIUtilityInitialize {
|
|
|
1099
1282
|
};
|
|
1100
1283
|
}
|
|
1101
1284
|
if (sanitized !== undefined) {
|
|
1102
|
-
items
|
|
1285
|
+
Reflect.set(items, i, sanitized);
|
|
1103
1286
|
}
|
|
1104
1287
|
}
|
|
1105
1288
|
return {
|
|
@@ -1168,7 +1351,9 @@ export class CLIUtilityInitialize {
|
|
|
1168
1351
|
.map((item) => item.trim())
|
|
1169
1352
|
.filter((item) => item !== '');
|
|
1170
1353
|
for (let i = 0; i < items.length; i += 1) {
|
|
1171
|
-
const
|
|
1354
|
+
const normalizedUrl = CLIUtilityInitialize.normalizeUrl(items[i], protocol);
|
|
1355
|
+
const result = normalizedUrl.result;
|
|
1356
|
+
const sanitized = normalizedUrl.sanitized;
|
|
1172
1357
|
if (result !== true) {
|
|
1173
1358
|
const errorMessages = {
|
|
1174
1359
|
generic: 'Enter a valid generic URL (e.g., https://) or remove entry.',
|
|
@@ -1181,7 +1366,7 @@ export class CLIUtilityInitialize {
|
|
|
1181
1366
|
};
|
|
1182
1367
|
}
|
|
1183
1368
|
if (sanitized !== undefined) {
|
|
1184
|
-
items
|
|
1369
|
+
Reflect.set(items, i, sanitized);
|
|
1185
1370
|
}
|
|
1186
1371
|
}
|
|
1187
1372
|
return {
|
|
@@ -1208,7 +1393,7 @@ export class CLIUtilityInitialize {
|
|
|
1208
1393
|
case 'app':
|
|
1209
1394
|
case 'tool': {
|
|
1210
1395
|
const expectedPrefix = `${base}-`;
|
|
1211
|
-
if (
|
|
1396
|
+
if (trimmedValue.startsWith(expectedPrefix) === false) {
|
|
1212
1397
|
return {
|
|
1213
1398
|
result: `Begin with "${expectedPrefix}" and add a descriptor slug.`,
|
|
1214
1399
|
sanitized: undefined,
|
|
@@ -1221,7 +1406,7 @@ export class CLIUtilityInitialize {
|
|
|
1221
1406
|
sanitized: undefined,
|
|
1222
1407
|
};
|
|
1223
1408
|
}
|
|
1224
|
-
if (
|
|
1409
|
+
if (PATTERN_SLUG_SIMPLE.test(descriptor) === false) {
|
|
1225
1410
|
return {
|
|
1226
1411
|
result: 'Descriptor must match the slug pattern (lowercase letters, numbers, hyphens, underscores).',
|
|
1227
1412
|
sanitized: undefined,
|
|
@@ -1235,7 +1420,7 @@ export class CLIUtilityInitialize {
|
|
|
1235
1420
|
case 'template':
|
|
1236
1421
|
case 'package':
|
|
1237
1422
|
default: {
|
|
1238
|
-
if (PATTERN_SLUG_SIMPLE.test(trimmedValue) || PATTERN_SLUG_SCOPED.test(trimmedValue)) {
|
|
1423
|
+
if (PATTERN_SLUG_SIMPLE.test(trimmedValue) === true || PATTERN_SLUG_SCOPED.test(trimmedValue) === true) {
|
|
1239
1424
|
return {
|
|
1240
1425
|
result: true,
|
|
1241
1426
|
sanitized: trimmedValue,
|