@cbnventures/nova 0.19.0 → 0.21.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/README.md +10 -0
- package/bin/nova.mjs +3 -3
- package/build/package.json +14 -10
- package/build/src/cli/generate/github/funding.js +2 -2
- package/build/src/cli/generate/github/funding.js.map +1 -1
- package/build/src/cli/generate/github/issue-template.d.ts.map +1 -1
- package/build/src/cli/generate/github/issue-template.js +6 -95
- package/build/src/cli/generate/github/issue-template.js.map +1 -1
- package/build/src/cli/generate/github/workflows-blueprint-validate.d.ts +12 -0
- package/build/src/cli/generate/github/workflows-blueprint-validate.d.ts.map +1 -0
- package/build/src/cli/generate/github/workflows-blueprint-validate.js +535 -0
- package/build/src/cli/generate/github/workflows-blueprint-validate.js.map +1 -0
- package/build/src/cli/generate/github/workflows-blueprint-variables.d.ts +9 -0
- package/build/src/cli/generate/github/workflows-blueprint-variables.d.ts.map +1 -0
- package/build/src/cli/generate/github/workflows-blueprint-variables.js +117 -0
- package/build/src/cli/generate/github/workflows-blueprint-variables.js.map +1 -0
- package/build/src/cli/generate/github/workflows-blueprint.d.ts +60 -0
- package/build/src/cli/generate/github/workflows-blueprint.d.ts.map +1 -0
- package/build/src/cli/generate/github/workflows-blueprint.js +2251 -0
- package/build/src/cli/generate/github/workflows-blueprint.js.map +1 -0
- package/build/src/cli/generate/must-haves/agent-conventions.d.ts.map +1 -1
- package/build/src/cli/generate/must-haves/agent-conventions.js +14 -5
- package/build/src/cli/generate/must-haves/agent-conventions.js.map +1 -1
- package/build/src/cli/generate/must-haves/dotenv.d.ts +5 -7
- package/build/src/cli/generate/must-haves/dotenv.d.ts.map +1 -1
- package/build/src/cli/generate/must-haves/dotenv.js +146 -417
- package/build/src/cli/generate/must-haves/dotenv.js.map +1 -1
- package/build/src/cli/generate/must-haves/editorconfig.js +2 -2
- package/build/src/cli/generate/must-haves/editorconfig.js.map +1 -1
- package/build/src/cli/generate/must-haves/gitignore.d.ts +0 -8
- package/build/src/cli/generate/must-haves/gitignore.d.ts.map +1 -1
- package/build/src/cli/generate/must-haves/gitignore.js +9 -397
- package/build/src/cli/generate/must-haves/gitignore.js.map +1 -1
- package/build/src/cli/generate/must-haves/license.d.ts.map +1 -1
- package/build/src/cli/generate/must-haves/license.js +4 -4
- package/build/src/cli/generate/must-haves/license.js.map +1 -1
- package/build/src/cli/generate/must-haves/read-me.d.ts +6 -2
- package/build/src/cli/generate/must-haves/read-me.d.ts.map +1 -1
- package/build/src/cli/generate/must-haves/read-me.js +103 -63
- package/build/src/cli/generate/must-haves/read-me.js.map +1 -1
- package/build/src/cli/index.js +108 -2
- package/build/src/cli/index.js.map +1 -1
- package/build/src/cli/recipe/github/sync-features.d.ts.map +1 -1
- package/build/src/cli/recipe/github/sync-features.js +5 -3
- package/build/src/cli/recipe/github/sync-features.js.map +1 -1
- package/build/src/cli/recipe/github/sync-identity.d.ts.map +1 -1
- package/build/src/cli/recipe/github/sync-identity.js +6 -4
- package/build/src/cli/recipe/github/sync-identity.js.map +1 -1
- package/build/src/cli/recipe/github/sync-policies.d.ts.map +1 -1
- package/build/src/cli/recipe/github/sync-policies.js +13 -4
- package/build/src/cli/recipe/github/sync-policies.js.map +1 -1
- package/build/src/cli/recipe/index.d.ts.map +1 -1
- package/build/src/cli/recipe/index.js +32 -0
- package/build/src/cli/recipe/index.js.map +1 -1
- package/build/src/cli/recipe/license/update-copyright.d.ts +7 -0
- package/build/src/cli/recipe/license/update-copyright.d.ts.map +1 -0
- package/build/src/cli/recipe/license/update-copyright.js +191 -0
- package/build/src/cli/recipe/license/update-copyright.js.map +1 -0
- package/build/src/cli/recipe/package-json/cleanup.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/cleanup.js +14 -13
- package/build/src/cli/recipe/package-json/cleanup.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-artifacts.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-artifacts.js +11 -6
- package/build/src/cli/recipe/package-json/normalize-artifacts.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-bundler.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-bundler.js +11 -6
- package/build/src/cli/recipe/package-json/normalize-bundler.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-dependencies.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-dependencies.js +18 -10
- package/build/src/cli/recipe/package-json/normalize-dependencies.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-modules.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-modules.js +11 -6
- package/build/src/cli/recipe/package-json/normalize-modules.js.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-tooling.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-tooling.js +12 -7
- package/build/src/cli/recipe/package-json/normalize-tooling.js.map +1 -1
- package/build/src/cli/recipe/package-json/sync-environment.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/sync-environment.js +46 -14
- package/build/src/cli/recipe/package-json/sync-environment.js.map +1 -1
- package/build/src/cli/recipe/package-json/sync-identity.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/sync-identity.js +29 -16
- package/build/src/cli/recipe/package-json/sync-identity.js.map +1 -1
- package/build/src/cli/recipe/package-json/sync-ownership.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/sync-ownership.js +18 -11
- package/build/src/cli/recipe/package-json/sync-ownership.js.map +1 -1
- package/build/src/cli/recipe/read-me/update-badges.d.ts +6 -0
- package/build/src/cli/recipe/read-me/update-badges.d.ts.map +1 -0
- package/build/src/cli/recipe/read-me/update-badges.js +115 -0
- package/build/src/cli/recipe/read-me/update-badges.js.map +1 -0
- package/build/src/cli/recipe/read-me/update-credits.d.ts +6 -0
- package/build/src/cli/recipe/read-me/update-credits.d.ts.map +1 -0
- package/build/src/cli/recipe/read-me/update-credits.js +115 -0
- package/build/src/cli/recipe/read-me/update-credits.js.map +1 -0
- package/build/src/cli/recipe/read-me/update-documentation.d.ts +6 -0
- package/build/src/cli/recipe/read-me/update-documentation.d.ts.map +1 -0
- package/build/src/cli/recipe/read-me/update-documentation.js +115 -0
- package/build/src/cli/recipe/read-me/update-documentation.js.map +1 -0
- package/build/src/cli/recipe/read-me/update-header.d.ts +6 -0
- package/build/src/cli/recipe/read-me/update-header.d.ts.map +1 -0
- package/build/src/cli/recipe/read-me/update-header.js +115 -0
- package/build/src/cli/recipe/read-me/update-header.js.map +1 -0
- package/build/src/cli/recipe/read-me/update-introduction.d.ts +6 -0
- package/build/src/cli/recipe/read-me/update-introduction.d.ts.map +1 -0
- package/build/src/cli/recipe/read-me/update-introduction.js +115 -0
- package/build/src/cli/recipe/read-me/update-introduction.js.map +1 -0
- package/build/src/cli/scaffold/starter/base.js +1 -1
- package/build/src/cli/scaffold/starter/base.js.map +1 -1
- package/build/src/cli/utility/changelog.d.ts +2 -0
- package/build/src/cli/utility/changelog.d.ts.map +1 -1
- package/build/src/cli/utility/changelog.js +159 -3
- package/build/src/cli/utility/changelog.js.map +1 -1
- package/build/src/cli/utility/initialize.d.ts +9 -0
- package/build/src/cli/utility/initialize.d.ts.map +1 -1
- package/build/src/cli/utility/initialize.js +978 -111
- package/build/src/cli/utility/initialize.js.map +1 -1
- package/build/src/cli/utility/run-scripts.d.ts.map +1 -1
- package/build/src/cli/utility/run-scripts.js +4 -4
- package/build/src/cli/utility/run-scripts.js.map +1 -1
- package/build/src/cli/utility/transpile.js +1 -1
- package/build/src/cli/utility/transpile.js.map +1 -1
- package/build/src/cli/utility/type-check.js +1 -1
- package/build/src/cli/utility/type-check.js.map +1 -1
- package/build/src/cli/utility/version.js +1 -1
- package/build/src/cli/utility/version.js.map +1 -1
- package/build/src/lib/dotenv.d.ts +3 -0
- package/build/src/lib/dotenv.d.ts.map +1 -0
- package/build/src/lib/dotenv.js +66 -0
- package/build/src/lib/dotenv.js.map +1 -0
- package/build/src/lib/env-github.d.ts +4 -0
- package/build/src/lib/env-github.d.ts.map +1 -0
- package/build/src/lib/env-github.js +57 -0
- package/build/src/lib/env-github.js.map +1 -0
- package/build/src/lib/env-managed-set.d.ts +3 -0
- package/build/src/lib/env-managed-set.d.ts.map +1 -0
- package/build/src/lib/env-managed-set.js +102 -0
- package/build/src/lib/env-managed-set.js.map +1 -0
- package/build/src/lib/env-namespace.d.ts +3 -0
- package/build/src/lib/env-namespace.d.ts.map +1 -0
- package/build/src/lib/env-namespace.js +11 -0
- package/build/src/lib/env-namespace.js.map +1 -0
- package/build/src/lib/env-reconcile.d.ts +3 -0
- package/build/src/lib/env-reconcile.d.ts.map +1 -0
- package/build/src/lib/env-reconcile.js +109 -0
- package/build/src/lib/env-reconcile.js.map +1 -0
- package/build/src/lib/env-status.d.ts +3 -0
- package/build/src/lib/env-status.d.ts.map +1 -0
- package/build/src/lib/env-status.js +113 -0
- package/build/src/lib/env-status.js.map +1 -0
- package/build/src/lib/file-discovery.d.ts +3 -0
- package/build/src/lib/file-discovery.d.ts.map +1 -0
- package/build/src/lib/file-discovery.js +32 -0
- package/build/src/lib/file-discovery.js.map +1 -0
- package/build/src/lib/item.d.ts +4 -1
- package/build/src/lib/item.d.ts.map +1 -1
- package/build/src/lib/item.js +35 -0
- package/build/src/lib/item.js.map +1 -1
- package/build/src/lib/markdown-slug.d.ts +4 -0
- package/build/src/lib/markdown-slug.d.ts.map +1 -0
- package/build/src/lib/markdown-slug.js +25 -0
- package/build/src/lib/markdown-slug.js.map +1 -0
- package/build/src/lib/nova-config.d.ts +14 -2
- package/build/src/lib/nova-config.d.ts.map +1 -1
- package/build/src/lib/nova-config.js +507 -78
- package/build/src/lib/nova-config.js.map +1 -1
- package/build/src/lib/read-me-regions.d.ts +4 -0
- package/build/src/lib/read-me-regions.d.ts.map +1 -0
- package/build/src/lib/read-me-regions.js +33 -0
- package/build/src/lib/read-me-regions.js.map +1 -0
- package/build/src/lib/regex.d.ts +73 -0
- package/build/src/lib/regex.d.ts.map +1 -1
- package/build/src/lib/regex.js +75 -2
- package/build/src/lib/regex.js.map +1 -1
- package/build/src/lib/scaffold.d.ts.map +1 -1
- package/build/src/lib/scaffold.js +33 -14
- package/build/src/lib/scaffold.js.map +1 -1
- package/build/src/lib/type-declaration-engine.d.ts +32 -0
- package/build/src/lib/type-declaration-engine.d.ts.map +1 -0
- package/build/src/lib/type-declaration-engine.js +796 -0
- package/build/src/lib/type-declaration-engine.js.map +1 -0
- package/build/src/lib/utility.d.ts +2 -1
- package/build/src/lib/utility.d.ts.map +1 -1
- package/build/src/lib/utility.js +47 -15
- package/build/src/lib/utility.js.map +1 -1
- package/build/src/lib/workflow-templates.d.ts.map +1 -1
- package/build/src/lib/workflow-templates.js +86 -60
- package/build/src/lib/workflow-templates.js.map +1 -1
- package/build/src/presets/eslint/dx-code-style.d.ts.map +1 -1
- package/build/src/presets/eslint/dx-code-style.js +6 -0
- package/build/src/presets/eslint/dx-code-style.js.map +1 -1
- package/build/src/presets/eslint/fw-astro.d.ts +4 -0
- package/build/src/presets/eslint/fw-astro.d.ts.map +1 -0
- package/build/src/presets/eslint/fw-astro.js +13 -0
- package/build/src/presets/eslint/fw-astro.js.map +1 -0
- package/build/src/presets/eslint/index.d.ts +1 -0
- package/build/src/presets/eslint/index.d.ts.map +1 -1
- package/build/src/presets/eslint/index.js +1 -0
- package/build/src/presets/eslint/index.js.map +1 -1
- package/build/src/presets/tsconfig/fw-astro.json +15 -0
- package/build/src/rules/eslint/conventions/no-implicit-boolean.d.ts.map +1 -1
- package/build/src/rules/eslint/conventions/no-implicit-boolean.js +3 -2
- package/build/src/rules/eslint/conventions/no-implicit-boolean.js.map +1 -1
- package/build/src/rules/eslint/conventions/require-hash-private.js +1 -1
- 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.map +1 -1
- package/build/src/rules/eslint/conventions/require-kebab-case-filename.js +4 -1
- package/build/src/rules/eslint/conventions/require-kebab-case-filename.js.map +1 -1
- package/build/src/rules/eslint/conventions/require-node-protocol.d.ts +11 -0
- package/build/src/rules/eslint/conventions/require-node-protocol.d.ts.map +1 -0
- package/build/src/rules/eslint/conventions/require-node-protocol.js +76 -0
- package/build/src/rules/eslint/conventions/require-node-protocol.js.map +1 -0
- 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 -1
- package/build/src/rules/eslint/formatting/no-raw-text-in-code.js.map +1 -1
- package/build/src/rules/eslint/formatting/require-padding-lines.d.ts.map +1 -1
- package/build/src/rules/eslint/formatting/require-padding-lines.js +7 -3
- package/build/src/rules/eslint/formatting/require-padding-lines.js.map +1 -1
- package/build/src/rules/eslint/formatting/require-ternary-parens.d.ts.map +1 -1
- package/build/src/rules/eslint/formatting/require-ternary-parens.js +7 -17
- package/build/src/rules/eslint/formatting/require-ternary-parens.js.map +1 -1
- package/build/src/rules/eslint/index.d.ts +4 -0
- package/build/src/rules/eslint/index.d.ts.map +1 -1
- package/build/src/rules/eslint/index.js +4 -0
- package/build/src/rules/eslint/index.js.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-body.d.ts +3 -2
- package/build/src/rules/eslint/jsdoc/require-jsdoc-body.d.ts.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-body.js +22 -0
- package/build/src/rules/eslint/jsdoc/require-jsdoc-body.js.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.d.ts +2 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.d.ts.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-hierarchy.js +19 -4
- 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.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-param-alignment.js +3 -2
- 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.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.js +10 -6
- package/build/src/rules/eslint/jsdoc/require-jsdoc-param-name.js.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-presence.d.ts +12 -0
- package/build/src/rules/eslint/jsdoc/require-jsdoc-presence.d.ts.map +1 -0
- package/build/src/rules/eslint/jsdoc/require-jsdoc-presence.js +169 -0
- package/build/src/rules/eslint/jsdoc/require-jsdoc-presence.js.map +1 -0
- package/build/src/rules/eslint/jsdoc/require-jsdoc-returns.d.ts +11 -0
- package/build/src/rules/eslint/jsdoc/require-jsdoc-returns.d.ts.map +1 -0
- package/build/src/rules/eslint/jsdoc/require-jsdoc-returns.js +80 -0
- package/build/src/rules/eslint/jsdoc/require-jsdoc-returns.js.map +1 -0
- package/build/src/rules/eslint/jsdoc/require-jsdoc-since.d.ts +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-since.d.ts.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-since.js +102 -6
- package/build/src/rules/eslint/jsdoc/require-jsdoc-since.js.map +1 -1
- package/build/src/rules/eslint/jsdoc/require-jsdoc-tag-order.d.ts +15 -0
- package/build/src/rules/eslint/jsdoc/require-jsdoc-tag-order.d.ts.map +1 -0
- package/build/src/rules/eslint/jsdoc/require-jsdoc-tag-order.js +290 -0
- package/build/src/rules/eslint/jsdoc/require-jsdoc-tag-order.js.map +1 -0
- package/build/src/rules/eslint/patterns/no-await-in-loop.js +1 -1
- package/build/src/rules/eslint/patterns/no-await-in-loop.js.map +1 -1
- 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 +4 -0
- package/build/src/rules/eslint/patterns/no-bracket-method-call.js.map +1 -1
- package/build/src/rules/eslint/regex/no-regex-literals.d.ts +1 -0
- package/build/src/rules/eslint/regex/no-regex-literals.d.ts.map +1 -1
- package/build/src/rules/eslint/regex/no-regex-literals.js +39 -1
- package/build/src/rules/eslint/regex/no-regex-literals.js.map +1 -1
- 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 +4 -1
- package/build/src/rules/eslint/typescript/no-inline-type-annotation.js.map +1 -1
- 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 +8 -1
- package/build/src/rules/eslint/typescript/require-bracket-property-access.js.map +1 -1
- package/build/src/rules/eslint/typescript/require-type-naming.js +2 -2
- package/build/src/rules/eslint/typescript/require-type-naming.js.map +1 -1
- package/build/src/rules/vitest/active-vitest.d.ts +5 -0
- package/build/src/rules/vitest/active-vitest.d.ts.map +1 -0
- package/build/src/rules/vitest/active-vitest.js +19 -0
- package/build/src/rules/vitest/active-vitest.js.map +1 -0
- package/build/src/rules/vitest/dotenv/register.d.ts +3 -0
- package/build/src/rules/vitest/dotenv/register.d.ts.map +1 -0
- package/build/src/rules/vitest/dotenv/register.js +22 -0
- package/build/src/rules/vitest/dotenv/register.js.map +1 -0
- package/build/src/rules/vitest/dotenv/rules.d.ts +3 -0
- package/build/src/rules/vitest/dotenv/rules.d.ts.map +1 -0
- package/build/src/rules/vitest/dotenv/rules.js +32 -0
- package/build/src/rules/vitest/dotenv/rules.js.map +1 -0
- package/build/src/rules/vitest/enable.d.ts +3 -0
- package/build/src/rules/vitest/enable.d.ts.map +1 -0
- package/build/src/rules/vitest/enable.js +7 -0
- package/build/src/rules/vitest/enable.js.map +1 -0
- package/build/src/rules/vitest/frontmatter/register.d.ts +3 -0
- package/build/src/rules/vitest/frontmatter/register.d.ts.map +1 -0
- package/build/src/rules/vitest/frontmatter/register.js +52 -0
- package/build/src/rules/vitest/frontmatter/register.js.map +1 -0
- package/build/src/rules/vitest/frontmatter/rules.d.ts +15 -0
- package/build/src/rules/vitest/frontmatter/rules.d.ts.map +1 -0
- package/build/src/rules/vitest/frontmatter/rules.js +498 -0
- package/build/src/rules/vitest/frontmatter/rules.js.map +1 -0
- package/build/src/rules/vitest/index.d.ts +8 -0
- package/build/src/rules/vitest/index.d.ts.map +1 -0
- package/build/src/rules/vitest/index.js +7 -0
- package/build/src/rules/vitest/index.js.map +1 -0
- package/build/src/rules/vitest/link/register.d.ts +3 -0
- package/build/src/rules/vitest/link/register.d.ts.map +1 -0
- package/build/src/rules/vitest/link/register.js +44 -0
- package/build/src/rules/vitest/link/register.js.map +1 -0
- package/build/src/rules/vitest/link/rules.d.ts +12 -0
- package/build/src/rules/vitest/link/rules.d.ts.map +1 -0
- package/build/src/rules/vitest/link/rules.js +313 -0
- package/build/src/rules/vitest/link/rules.js.map +1 -0
- package/build/src/rules/vitest/markdown-table/register.d.ts +3 -0
- package/build/src/rules/vitest/markdown-table/register.d.ts.map +1 -0
- package/build/src/rules/vitest/markdown-table/register.js +26 -0
- package/build/src/rules/vitest/markdown-table/register.js.map +1 -0
- package/build/src/rules/vitest/markdown-table/rules.d.ts +3 -0
- package/build/src/rules/vitest/markdown-table/rules.d.ts.map +1 -0
- package/build/src/rules/vitest/markdown-table/rules.js +99 -0
- package/build/src/rules/vitest/markdown-table/rules.js.map +1 -0
- package/build/src/rules/vitest/terminology/register.d.ts +3 -0
- package/build/src/rules/vitest/terminology/register.d.ts.map +1 -0
- package/build/src/rules/vitest/terminology/register.js +39 -0
- package/build/src/rules/vitest/terminology/register.js.map +1 -0
- package/build/src/rules/vitest/terminology/rules.d.ts +10 -0
- package/build/src/rules/vitest/terminology/rules.d.ts.map +1 -0
- package/build/src/rules/vitest/terminology/rules.js +202 -0
- package/build/src/rules/vitest/terminology/rules.js.map +1 -0
- package/build/src/rules/vitest/type-declarations/register.d.ts +3 -0
- package/build/src/rules/vitest/type-declarations/register.d.ts.map +1 -0
- package/build/src/rules/vitest/type-declarations/register.js +33 -0
- package/build/src/rules/vitest/type-declarations/register.js.map +1 -0
- package/build/src/rules/vitest/type-declarations/rules.d.ts +13 -0
- package/build/src/rules/vitest/type-declarations/rules.d.ts.map +1 -0
- package/build/src/rules/vitest/type-declarations/rules.js +736 -0
- package/build/src/rules/vitest/type-declarations/rules.js.map +1 -0
- package/build/src/toolkit/index.d.ts +1 -0
- package/build/src/toolkit/index.d.ts.map +1 -1
- package/build/src/toolkit/index.js +1 -0
- package/build/src/toolkit/index.js.map +1 -1
- package/build/src/toolkit/logger.d.ts.map +1 -1
- package/build/src/toolkit/logger.js +3 -1
- package/build/src/toolkit/logger.js.map +1 -1
- package/build/src/toolkit/markdown-table.js +1 -1
- package/build/src/toolkit/markdown-table.js.map +1 -1
- package/build/src/toolkit/nova-identity.d.ts +19 -0
- package/build/src/toolkit/nova-identity.d.ts.map +1 -0
- package/build/src/toolkit/nova-identity.js +141 -0
- package/build/src/toolkit/nova-identity.js.map +1 -0
- package/build/src/types/cli/generate/github/funding.d.ts +4 -4
- package/build/src/types/cli/generate/github/issue-template.d.ts +15 -35
- package/build/src/types/cli/generate/github/workflows-blueprint-validate.d.ts +351 -0
- package/build/src/types/cli/generate/github/workflows-blueprint-variables.d.ts +131 -0
- package/build/src/types/cli/generate/github/workflows-blueprint.d.ts +1180 -0
- package/build/src/types/cli/generate/must-haves/agent-conventions.d.ts +9 -2
- package/build/src/types/cli/generate/must-haves/dotenv.d.ts +101 -314
- package/build/src/types/cli/generate/must-haves/editorconfig.d.ts +2 -2
- package/build/src/types/cli/generate/must-haves/gitignore.d.ts +13 -343
- package/build/src/types/cli/generate/must-haves/license.d.ts +5 -5
- package/build/src/types/cli/generate/must-haves/read-me.d.ts +136 -88
- package/build/src/types/cli/index.d.ts +14 -0
- package/build/src/types/cli/recipe/github/handle-gh-failure.d.ts +2 -2
- package/build/src/types/cli/recipe/github/sync-features.d.ts +20 -13
- package/build/src/types/cli/recipe/github/sync-identity.d.ts +20 -13
- package/build/src/types/cli/recipe/github/sync-policies.d.ts +24 -15
- package/build/src/types/cli/recipe/index.d.ts +7 -3
- package/build/src/types/cli/recipe/license/update-copyright.d.ts +142 -0
- package/build/src/types/cli/recipe/package-json/cleanup.d.ts +26 -22
- package/build/src/types/cli/recipe/package-json/normalize-artifacts.d.ts +22 -16
- package/build/src/types/cli/recipe/package-json/normalize-bundler.d.ts +20 -14
- package/build/src/types/cli/recipe/package-json/normalize-dependencies.d.ts +31 -19
- package/build/src/types/cli/recipe/package-json/normalize-modules.d.ts +20 -14
- package/build/src/types/cli/recipe/package-json/normalize-tooling.d.ts +20 -14
- package/build/src/types/cli/recipe/package-json/sync-environment.d.ts +46 -22
- package/build/src/types/cli/recipe/package-json/sync-identity.d.ts +36 -19
- package/build/src/types/cli/recipe/package-json/sync-ownership.d.ts +33 -23
- package/build/src/types/cli/recipe/read-me/update-badges.d.ts +77 -0
- package/build/src/types/cli/recipe/read-me/update-credits.d.ts +77 -0
- package/build/src/types/cli/recipe/read-me/update-documentation.d.ts +77 -0
- package/build/src/types/cli/recipe/read-me/update-header.d.ts +77 -0
- package/build/src/types/cli/recipe/read-me/update-introduction.d.ts +77 -0
- package/build/src/types/cli/scaffold/starter/base.d.ts +2 -2
- package/build/src/types/cli/utility/changelog.d.ts +165 -73
- package/build/src/types/cli/utility/initialize.d.ts +1007 -350
- package/build/src/types/cli/utility/run-scripts.d.ts +1 -1
- package/build/src/types/cli/utility/transpile.d.ts +8 -3
- package/build/src/types/cli/utility/type-check.d.ts +9 -3
- package/build/src/types/cli/utility/version.d.ts +32 -32
- package/build/src/types/lib/constants.d.ts +1 -1
- package/build/src/types/lib/dotenv.d.ts +67 -0
- package/build/src/types/lib/env-github.d.ts +67 -0
- package/build/src/types/lib/env-managed-set.d.ts +90 -0
- package/build/src/types/lib/env-namespace.d.ts +22 -0
- package/build/src/types/lib/env-reconcile.d.ts +71 -0
- package/build/src/types/lib/env-status.d.ts +102 -0
- package/build/src/types/lib/file-discovery.d.ts +40 -0
- package/build/src/types/lib/item.d.ts +42 -0
- package/build/src/types/lib/markdown-slug.d.ts +25 -0
- package/build/src/types/lib/nova-config.d.ts +455 -68
- package/build/src/types/lib/read-me-regions.d.ts +51 -0
- package/build/src/types/lib/regex.d.ts +193 -18
- package/build/src/types/lib/scaffold.d.ts +43 -23
- package/build/src/types/lib/type-declaration-engine.d.ts +1052 -0
- package/build/src/types/lib/utility.d.ts +40 -6
- package/build/src/types/lib/workflow-templates.d.ts +11 -75
- package/build/src/types/presets/eslint/fw-astro.d.ts +8 -0
- package/build/src/types/rules/eslint/conventions/no-implicit-boolean.d.ts +7 -0
- package/build/src/types/rules/eslint/conventions/require-naming-convention.d.ts +8 -4
- package/build/src/types/rules/eslint/conventions/require-node-protocol.d.ts +56 -0
- package/build/src/types/rules/eslint/formatting/require-padding-lines.d.ts +2 -0
- package/build/src/types/rules/eslint/formatting/require-ternary-parens.d.ts +8 -3
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-body.d.ts +16 -0
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-hierarchy.d.ts +19 -15
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-param-name.d.ts +3 -1
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-presence.d.ts +125 -0
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-returns.d.ts +48 -0
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-since.d.ts +71 -1
- package/build/src/types/rules/eslint/jsdoc/require-jsdoc-tag-order.d.ts +204 -0
- package/build/src/types/rules/eslint/patterns/no-await-in-loop.d.ts +1 -1
- package/build/src/types/rules/eslint/patterns/no-bracket-method-call.d.ts +1 -1
- package/build/src/types/rules/eslint/regex/no-regex-literals.d.ts +44 -0
- package/build/src/types/rules/eslint/typescript/require-bracket-property-access.d.ts +19 -7
- package/build/src/types/rules/eslint/typescript/require-type-naming.d.ts +3 -3
- package/build/src/types/rules/vitest/active-vitest.d.ts +31 -0
- package/build/src/types/rules/vitest/dotenv/register.d.ts +31 -0
- package/build/src/types/rules/vitest/dotenv/rules.d.ts +29 -0
- package/build/src/types/rules/vitest/enable.d.ts +12 -0
- package/build/src/types/rules/vitest/frontmatter/register.d.ts +63 -0
- package/build/src/types/rules/vitest/frontmatter/rules.d.ts +430 -0
- package/build/src/types/rules/vitest/index.d.ts +419 -0
- package/build/src/types/rules/vitest/link/register.d.ts +79 -0
- package/build/src/types/rules/vitest/link/rules.d.ts +368 -0
- package/build/src/types/rules/vitest/markdown-table/register.d.ts +33 -0
- package/build/src/types/rules/vitest/markdown-table/rules.d.ts +55 -0
- package/build/src/types/rules/vitest/terminology/register.d.ts +48 -0
- package/build/src/types/rules/vitest/terminology/rules.d.ts +190 -0
- package/build/src/types/rules/vitest/type-declarations/register.d.ts +46 -0
- package/build/src/types/rules/vitest/type-declarations/rules.d.ts +894 -0
- package/build/src/types/shared.d.ts +727 -26
- package/build/src/types/tests/cli/generate/github/funding.test.d.ts +14 -10
- package/build/src/types/tests/cli/generate/github/issue-template.test.d.ts +38 -17
- package/build/src/types/tests/cli/generate/github/workflows-blueprint-generate.test.d.ts +199 -0
- package/build/src/types/tests/cli/generate/github/workflows-blueprint-parity.test.d.ts +75 -0
- package/build/src/types/tests/cli/generate/github/workflows-blueprint-publish-parity.test.d.ts +295 -0
- package/build/src/types/tests/cli/generate/github/workflows-blueprint-validate.test.d.ts +901 -0
- package/build/src/types/tests/cli/generate/github/workflows-blueprint-variables.test.d.ts +144 -0
- package/build/src/types/tests/cli/generate/github/workflows-blueprint.test.d.ts +332 -0
- package/build/src/types/tests/cli/generate/must-haves/agent-conventions.test.d.ts +83 -11
- package/build/src/types/tests/cli/generate/must-haves/dotenv.test.d.ts +142 -12
- package/build/src/types/tests/cli/generate/must-haves/editorconfig.test.d.ts +12 -8
- package/build/src/types/tests/cli/generate/must-haves/gitignore.test.d.ts +14 -19
- package/build/src/types/tests/cli/generate/must-haves/read-me.test.d.ts +33 -10
- package/build/src/types/tests/cli/recipe/github/handle-gh-failure.test.d.ts +28 -24
- package/build/src/types/tests/cli/recipe/github/sync-features.test.d.ts +115 -111
- package/build/src/types/tests/cli/recipe/github/sync-identity.test.d.ts +192 -142
- package/build/src/types/tests/cli/recipe/github/sync-policies.test.d.ts +199 -126
- package/build/src/types/tests/cli/recipe/license/update-copyright.test.d.ts +617 -0
- package/build/src/types/tests/cli/recipe/package-json/normalize-dependencies.test.d.ts +27 -0
- package/build/src/types/tests/cli/recipe/package-json/sync-environment.test.d.ts +21 -0
- package/build/src/types/tests/cli/recipe/package-json/sync-identity.test.d.ts +52 -0
- package/build/src/types/tests/cli/recipe/read-me/update-badges.test.d.ts +258 -0
- package/build/src/types/tests/cli/recipe/read-me/update-credits.test.d.ts +258 -0
- package/build/src/types/tests/cli/recipe/read-me/update-documentation.test.d.ts +258 -0
- package/build/src/types/tests/cli/recipe/read-me/update-header.test.d.ts +258 -0
- package/build/src/types/tests/cli/recipe/read-me/update-introduction.test.d.ts +258 -0
- package/build/src/types/tests/cli/scaffold/docs/docusaurus.test.d.ts +4 -0
- package/build/src/types/tests/cli/utility/changelog.test.d.ts +293 -0
- package/build/src/types/tests/cli/utility/initialize.test.d.ts +148 -1
- package/build/src/types/tests/lib/dotenv.test.d.ts +95 -0
- package/build/src/types/tests/lib/file-discovery.test.d.ts +37 -0
- package/build/src/types/tests/lib/item.test.d.ts +21 -0
- package/build/src/types/tests/lib/markdown-slug.test.d.ts +24 -0
- package/build/src/types/tests/lib/nova-config.test.d.ts +503 -83
- package/build/src/types/tests/lib/read-me-regions.test.d.ts +43 -0
- package/build/src/types/tests/lib/regex.test.d.ts +252 -0
- package/build/src/types/tests/lib/utility.test.d.ts +35 -0
- package/build/src/types/tests/lib/workflow-templates.test.d.ts +18 -2
- package/build/src/types/tests/rules/eslint/conventions/require-node-protocol.test.d.ts +8 -0
- package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-presence.test.d.ts +8 -0
- package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-returns.test.d.ts +8 -0
- package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-since.test.d.ts +18 -0
- package/build/src/types/tests/rules/eslint/jsdoc/require-jsdoc-tag-order.test.d.ts +8 -0
- package/build/src/types/tests/rules/vitest/active-vitest.test.d.ts +56 -0
- package/build/src/types/tests/rules/vitest/dotenv.test.d.ts +19 -0
- package/build/src/types/tests/rules/vitest/enable.test.d.ts +27 -0
- package/build/src/types/tests/rules/vitest/frontmatter.test.d.ts +22 -0
- package/build/src/types/tests/rules/vitest/link.test.d.ts +74 -0
- package/build/src/types/tests/rules/vitest/markdown-table.test.d.ts +28 -0
- package/build/src/types/tests/rules/vitest/terminology.test.d.ts +43 -0
- package/build/src/types/tests/rules/vitest/type-declarations.test.d.ts +10 -0
- package/build/src/types/tests/scaffold-version-drift.test.d.ts +42 -0
- package/build/src/types/tests/since-version.test.d.ts +137 -0
- package/build/src/types/tests/toolkit/logger.test.d.ts +70 -5
- package/build/src/types/tests/toolkit/nova-identity.test.d.ts +118 -0
- package/build/src/types/tests/type-declarations.test.d.ts +40 -1813
- package/build/src/types/toolkit/logger.d.ts +4 -0
- package/build/src/types/toolkit/nova-identity.d.ts +313 -0
- package/build/templates/generators/github/workflows/check-sponsor-gated-issues/base.yml +1 -1
- package/build/templates/generators/github/workflows/publish/base.yml +3 -1
- package/build/templates/generators/github/workflows/publish/targets/cloudflare-pages-docusaurus.yml +1 -1
- package/build/templates/generators/github/workflows/publish/targets/cloudflare-workers.yml +36 -0
- package/build/templates/generators/github/workflows/publish/targets/docker-hub.yml +1 -1
- package/build/templates/generators/github/workflows/publish/targets/ghcr.yml +1 -1
- package/build/templates/generators/github/workflows/publish/targets/github-action.yml +1 -1
- package/build/templates/generators/github/workflows/publish/targets/github-packages.yml +1 -1
- package/build/templates/generators/github/workflows/publish/targets/github-pages-docusaurus.yml +4 -4
- package/build/templates/generators/github/workflows/publish/targets/npm.yml +1 -1
- package/build/templates/generators/github/workflows/publish/targets/vercel-nextjs.yml +1 -1
- package/build/templates/generators/must-haves/agent-conventions/AGENTS.md +1 -2
- package/build/templates/generators/must-haves/agent-conventions/CLAUDE.md +1 -2
- package/build/templates/generators/must-haves/agent-conventions/conventions/java.md +5 -5
- package/build/templates/generators/must-haves/agent-conventions/conventions/kotlin.md +4 -4
- package/build/templates/generators/must-haves/agent-conventions/conventions/php.md +2 -2
- package/build/templates/generators/must-haves/agent-conventions/conventions/typescript.md +6 -6
- package/build/templates/generators/must-haves/agent-conventions/conventions/universal.md +2 -0
- package/build/templates/generators/must-haves/dotenv/env +5 -2
- package/build/templates/generators/must-haves/dotenv/env.sample +6 -3
- package/build/templates/generators/must-haves/gitignore/gitignore +6 -0
- package/build/templates/scaffold/app/express/package.json +5 -5
- package/build/templates/scaffold/app/nextjs/package.json +7 -7
- package/build/templates/scaffold/app/vite/package.json +3 -3
- package/build/templates/scaffold/app/workers/package.json +3 -3
- package/build/templates/scaffold/docs/docusaurus/docs/intro.md +6 -0
- package/build/templates/scaffold/docs/docusaurus/docusaurus.config.ts +9 -3
- package/build/templates/scaffold/docs/docusaurus/package.json +14 -7
- package/build/templates/scaffold/docs/docusaurus/src/tests/frontmatter.test.ts +25 -0
- package/build/templates/scaffold/docs/docusaurus/src/tests/link.test.ts +16 -0
- package/build/templates/scaffold/docs/docusaurus/src/tests/markdown-table.test.ts +16 -0
- package/build/templates/scaffold/docs/docusaurus/src/tests/terminology.test.ts +16 -0
- package/build/templates/scaffold/docs/docusaurus/src/tests/type-declarations.test.ts +17 -0
- package/build/templates/scaffold/docs/docusaurus/vitest.config.ts +22 -0
- package/build/templates/scaffold/docs/docusaurus/vitest.setup.ts +26 -0
- package/package.json +14 -10
- package/build/src/cli/generate/github/workflows.d.ts +0 -17
- package/build/src/cli/generate/github/workflows.d.ts.map +0 -1
- package/build/src/cli/generate/github/workflows.js +0 -856
- package/build/src/cli/generate/github/workflows.js.map +0 -1
- package/build/src/types/cli/generate/github/workflows.d.ts +0 -596
- package/build/src/types/tests/cli/generate/github/workflows-helpers.test.d.ts +0 -239
- package/build/src/types/tests/cli/generate/github/workflows.test.d.ts +0 -587
- package/build/templates/generators/github/workflows/publish/targets/aws-amplify-nextjs.yml +0 -32
- package/build/templates/generators/must-haves/agent-conventions/cursorrules +0 -55
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { promises as fs } from 'fs';
|
|
2
|
-
import { join } from 'path';
|
|
1
|
+
import { promises as fs } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
3
|
import prompts from 'prompts';
|
|
4
|
-
import {
|
|
4
|
+
import { Runner as LibNovaConfig } from '../../../lib/nova-config.js';
|
|
5
|
+
import { LIB_REGEX_LINEBREAK_CRLF_OR_LF, LIB_REGEX_PATTERN_ENV_VAR_KEY, LIB_REGEX_PATTERN_LEADING_DOT } from '../../../lib/regex.js';
|
|
5
6
|
import { isProjectRoot, resolveTemplatePath, saveGeneratedFile, } from '../../../lib/utility.js';
|
|
6
7
|
import { Logger } from '../../../toolkit/index.js';
|
|
7
8
|
export class Runner {
|
|
@@ -14,6 +15,7 @@ export class Runner {
|
|
|
14
15
|
}
|
|
15
16
|
const isDryRun = options['dryRun'] === true;
|
|
16
17
|
const isReplaceFile = options['replaceFile'] === true;
|
|
18
|
+
const isPrune = options['prune'] === true;
|
|
17
19
|
if (isDryRun === true) {
|
|
18
20
|
Logger.customize({
|
|
19
21
|
name: 'Runner.run',
|
|
@@ -27,168 +29,79 @@ export class Runner {
|
|
|
27
29
|
purpose: 'options',
|
|
28
30
|
}).warn(`Replace file enabled. ${replaceFileNotice}`);
|
|
29
31
|
}
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
const workingFile = await new LibNovaConfig().load();
|
|
33
|
+
const environment = workingFile['environment'] ?? {};
|
|
34
|
+
const apps = environment['apps'] ?? {};
|
|
35
|
+
let generatedCount = 0;
|
|
36
|
+
for (const appEntry of Object.entries(apps)) {
|
|
37
|
+
const appPath = appEntry[0];
|
|
38
|
+
const app = appEntry[1];
|
|
39
|
+
const variables = app['variables'] ?? [];
|
|
40
|
+
generatedCount += 1;
|
|
41
|
+
await Runner.generateForTarget({
|
|
42
|
+
targetDirectory: join(currentDirectory, appPath),
|
|
43
|
+
variables,
|
|
44
|
+
isDryRun,
|
|
45
|
+
isReplaceFile,
|
|
46
|
+
isPrune,
|
|
47
|
+
});
|
|
46
48
|
}
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
value: 'manage',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
title: 'Regenerate from template',
|
|
56
|
-
value: 'regenerate',
|
|
57
|
-
},
|
|
58
|
-
];
|
|
59
|
-
const modeOutput = await Runner.promptWithCancel({
|
|
60
|
-
type: 'select',
|
|
61
|
-
name: 'mode',
|
|
62
|
-
message: 'Existing .env file(s) found. What would you like to do?',
|
|
63
|
-
choices: modeChoices,
|
|
64
|
-
initial: 0,
|
|
65
|
-
});
|
|
66
|
-
if (modeOutput['cancelled'] === true) {
|
|
67
|
-
return 'cancelled';
|
|
68
|
-
}
|
|
69
|
-
const modeOutputResult = modeOutput['result'];
|
|
70
|
-
const selectedMode = modeOutputResult.mode;
|
|
71
|
-
if (selectedMode === undefined) {
|
|
72
|
-
return 'cancelled';
|
|
73
|
-
}
|
|
74
|
-
if (selectedMode === 'manage') {
|
|
75
|
-
const manageResult = await Runner.promptManageMenu({
|
|
76
|
-
templateDirectory,
|
|
77
|
-
envPath,
|
|
78
|
-
envSamplePath,
|
|
79
|
-
isDryRun,
|
|
80
|
-
isReplaceFile,
|
|
81
|
-
});
|
|
82
|
-
if (manageResult === 'exit') {
|
|
83
|
-
return 'completed';
|
|
84
|
-
}
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
const loopResult = await Runner.promptRegenerate({
|
|
88
|
-
templateDirectory,
|
|
89
|
-
currentDirectory,
|
|
90
|
-
isDryRun,
|
|
91
|
-
isReplaceFile,
|
|
92
|
-
});
|
|
93
|
-
if (loopResult === 'cancelled') {
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
return 'completed';
|
|
97
|
-
}
|
|
49
|
+
if (generatedCount === 0) {
|
|
50
|
+
Logger.customize({
|
|
51
|
+
name: 'Runner.run',
|
|
52
|
+
purpose: 'environment',
|
|
53
|
+
}).warn('No apps declare environment variables. Nothing to generate.');
|
|
98
54
|
}
|
|
99
|
-
|
|
100
|
-
templateDirectory,
|
|
101
|
-
currentDirectory,
|
|
102
|
-
isDryRun,
|
|
103
|
-
isReplaceFile,
|
|
104
|
-
});
|
|
105
|
-
return (result === 'cancelled') ? 'cancelled' : 'completed';
|
|
55
|
+
return 'completed';
|
|
106
56
|
}
|
|
107
|
-
static async
|
|
108
|
-
const
|
|
109
|
-
const
|
|
57
|
+
static async generateForTarget(options) {
|
|
58
|
+
const targetDirectory = options['targetDirectory'];
|
|
59
|
+
const variables = options['variables'];
|
|
110
60
|
const isDryRun = options['isDryRun'];
|
|
111
61
|
const isReplaceFile = options['isReplaceFile'];
|
|
62
|
+
const isPrune = options['isPrune'];
|
|
63
|
+
const templateDirectory = resolveTemplatePath(import.meta.url, 'generators/must-haves/dotenv');
|
|
112
64
|
const files = [
|
|
113
65
|
'.env',
|
|
114
66
|
'.env.sample',
|
|
115
67
|
];
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if (typeof value !== 'string' || value.trim() === '') {
|
|
126
|
-
return true;
|
|
127
|
-
}
|
|
128
|
-
const trimmedValue = value.trim();
|
|
129
|
-
if (LIB_REGEX_PATTERN_ENV_VAR_KEY_SCREAMING_SNAKE.test(trimmedValue) !== true) {
|
|
130
|
-
return 'Use SCREAMING_SNAKE_CASE (e.g. API_KEY).';
|
|
131
|
-
}
|
|
132
|
-
return true;
|
|
133
|
-
},
|
|
134
|
-
});
|
|
135
|
-
if (keyOutput['cancelled'] === true) {
|
|
136
|
-
cancelled = true;
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
const keyOutputResult = keyOutput['result'];
|
|
140
|
-
if (keyOutputResult.key === undefined || keyOutputResult.key.trim() === '') {
|
|
141
|
-
addMore = false;
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
|
-
const defaultValueOutput = await Runner.promptWithCancel({
|
|
145
|
-
type: 'text',
|
|
146
|
-
name: 'defaultValue',
|
|
147
|
-
message: 'Default value (leave empty for none):',
|
|
148
|
-
initial: '',
|
|
149
|
-
});
|
|
150
|
-
if (defaultValueOutput['cancelled'] === true) {
|
|
151
|
-
cancelled = true;
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
const defaultValueOutputResult = defaultValueOutput['result'];
|
|
155
|
-
if (defaultValueOutputResult.defaultValue === undefined) {
|
|
156
|
-
cancelled = true;
|
|
157
|
-
break;
|
|
68
|
+
const baselineKeys = new Set();
|
|
69
|
+
try {
|
|
70
|
+
const baselineTemplate = await fs.readFile(join(templateDirectory, 'env'), 'utf-8');
|
|
71
|
+
const baselineTemplateLines = baselineTemplate.split(LIB_REGEX_LINEBREAK_CRLF_OR_LF);
|
|
72
|
+
for (const baselineTemplateLine of baselineTemplateLines) {
|
|
73
|
+
const baselineKeyMatch = baselineTemplateLine.match(LIB_REGEX_PATTERN_ENV_VAR_KEY);
|
|
74
|
+
if (baselineKeyMatch !== null) {
|
|
75
|
+
baselineKeys.add(baselineKeyMatch[1] ?? '');
|
|
76
|
+
}
|
|
158
77
|
}
|
|
159
|
-
envVars.push({
|
|
160
|
-
key: keyOutputResult.key.trim(),
|
|
161
|
-
defaultValue: defaultValueOutputResult.defaultValue.trim(),
|
|
162
|
-
});
|
|
163
78
|
}
|
|
164
|
-
|
|
165
|
-
return 'cancelled';
|
|
79
|
+
catch {
|
|
166
80
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
envLines.push(`${envVar['key']}=""`);
|
|
173
|
-
}
|
|
174
|
-
customSection = envLines.join('\n');
|
|
175
|
-
const sampleLines = [];
|
|
176
|
-
for (const envVar of envVars) {
|
|
177
|
-
sampleLines.push(`${envVar['key']}="${envVar['defaultValue']}"`);
|
|
81
|
+
const envLines = [];
|
|
82
|
+
const sampleLines = [];
|
|
83
|
+
for (const variable of variables) {
|
|
84
|
+
if (baselineKeys.has(variable['key']) === true) {
|
|
85
|
+
continue;
|
|
178
86
|
}
|
|
179
|
-
|
|
87
|
+
envLines.push(`${variable['key']}=""`);
|
|
88
|
+
sampleLines.push(`${variable['key']}="${Runner.escapeSampleValue(variable['defaultValue'] ?? '')}"`);
|
|
180
89
|
}
|
|
90
|
+
const customSection = envLines.join('\n');
|
|
91
|
+
const customSectionSample = sampleLines.join('\n');
|
|
92
|
+
const existingEnvPath = join(targetDirectory, '.env');
|
|
93
|
+
const existingEnv = await Runner.parseExistingEnv(existingEnvPath);
|
|
181
94
|
for (const fileName of files) {
|
|
182
95
|
const templateFileName = fileName.replace(LIB_REGEX_PATTERN_LEADING_DOT, '');
|
|
183
96
|
const templatePath = join(templateDirectory, templateFileName);
|
|
184
|
-
const targetPath = join(
|
|
97
|
+
const targetPath = join(targetDirectory, fileName);
|
|
185
98
|
let content = undefined;
|
|
186
99
|
try {
|
|
187
100
|
content = await fs.readFile(templatePath, 'utf-8');
|
|
188
101
|
}
|
|
189
102
|
catch {
|
|
190
103
|
Logger.customize({
|
|
191
|
-
name: 'Runner.
|
|
104
|
+
name: 'Runner.generateForTarget',
|
|
192
105
|
purpose: 'read',
|
|
193
106
|
}).error(`Failed to read template "${templatePath}". Skipping ...`);
|
|
194
107
|
continue;
|
|
@@ -197,6 +110,35 @@ export class Runner {
|
|
|
197
110
|
if (appendSection !== '') {
|
|
198
111
|
content = `${content}${appendSection}\n`;
|
|
199
112
|
}
|
|
113
|
+
if (fileName === '.env' && existingEnv.size > 0) {
|
|
114
|
+
const contentLines = content.split('\n');
|
|
115
|
+
const seenKeys = new Set();
|
|
116
|
+
const preservedLines = contentLines.map((contentLine) => {
|
|
117
|
+
const keyMatch = contentLine.match(LIB_REGEX_PATTERN_ENV_VAR_KEY);
|
|
118
|
+
if (keyMatch === null) {
|
|
119
|
+
return contentLine;
|
|
120
|
+
}
|
|
121
|
+
const contentLineKey = keyMatch[1] ?? '';
|
|
122
|
+
seenKeys.add(contentLineKey);
|
|
123
|
+
const originalLine = existingEnv.get(contentLineKey);
|
|
124
|
+
if (originalLine === undefined) {
|
|
125
|
+
return contentLine;
|
|
126
|
+
}
|
|
127
|
+
return originalLine;
|
|
128
|
+
});
|
|
129
|
+
content = preservedLines.join('\n');
|
|
130
|
+
const orphanKeys = [...existingEnv.keys()].filter((existingKey) => seenKeys.has(existingKey) === false);
|
|
131
|
+
if (orphanKeys.length > 0) {
|
|
132
|
+
let isPruneConfirmed = false;
|
|
133
|
+
if (isPrune === true && isDryRun === false) {
|
|
134
|
+
isPruneConfirmed = await Runner.confirmPrune(existingEnvPath, orphanKeys);
|
|
135
|
+
}
|
|
136
|
+
if (isPruneConfirmed === false) {
|
|
137
|
+
const orphanLines = orphanKeys.map((orphanKey) => existingEnv.get(orphanKey) ?? '');
|
|
138
|
+
content = `${content}${orphanLines.join('\n')}\n`;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
200
142
|
if (isDryRun === true) {
|
|
201
143
|
continue;
|
|
202
144
|
}
|
|
@@ -206,298 +148,85 @@ export class Runner {
|
|
|
206
148
|
mode: (fileName === '.env') ? 'fillable' : 'strict',
|
|
207
149
|
});
|
|
208
150
|
}
|
|
209
|
-
return
|
|
210
|
-
}
|
|
211
|
-
static parseEnvFile(content) {
|
|
212
|
-
const entries = [];
|
|
213
|
-
for (const line of content.split('\n')) {
|
|
214
|
-
const match = line.match(LIB_REGEX_PATTERN_ENV_VAR_KEY);
|
|
215
|
-
if (match !== null && match[1] !== undefined) {
|
|
216
|
-
const key = match[1];
|
|
217
|
-
const rawValue = line.slice(line.indexOf('=') + 1);
|
|
218
|
-
const value = rawValue.replace(LIB_REGEX_PATTERN_DOUBLE_QUOTED_STRING_CAPTURE, '$1');
|
|
219
|
-
entries.push({
|
|
220
|
-
key,
|
|
221
|
-
value,
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
return entries;
|
|
226
|
-
}
|
|
227
|
-
static updateEnvLine(content, key, newValue) {
|
|
228
|
-
const lines = content.split('\n');
|
|
229
|
-
return lines.map((line) => {
|
|
230
|
-
const match = line.match(LIB_REGEX_PATTERN_ENV_VAR_KEY);
|
|
231
|
-
if (match !== null && match[1] === key) {
|
|
232
|
-
return `${key}="${newValue}"`;
|
|
233
|
-
}
|
|
234
|
-
return line;
|
|
235
|
-
}).join('\n');
|
|
236
|
-
}
|
|
237
|
-
static deleteEnvLine(content, key) {
|
|
238
|
-
const lines = content.split('\n');
|
|
239
|
-
return lines.filter((line) => {
|
|
240
|
-
const match = line.match(LIB_REGEX_PATTERN_ENV_VAR_KEY);
|
|
241
|
-
return !(match !== null && match[1] === key);
|
|
242
|
-
}).join('\n');
|
|
151
|
+
return;
|
|
243
152
|
}
|
|
244
|
-
static
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
153
|
+
static async confirmPrune(filePath, keys) {
|
|
154
|
+
const response = await prompts({
|
|
155
|
+
type: 'confirm',
|
|
156
|
+
name: 'confirm',
|
|
157
|
+
message: `Remove undeclared keys from "${filePath}"? ${keys.join(', ')}`,
|
|
158
|
+
initial: false,
|
|
159
|
+
}, {
|
|
160
|
+
onCancel: () => false,
|
|
161
|
+
});
|
|
162
|
+
return response['confirm'] === true;
|
|
251
163
|
}
|
|
252
|
-
static async
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
const envSamplePath = options['envSamplePath'];
|
|
256
|
-
const isDryRun = options['isDryRun'];
|
|
257
|
-
const isReplaceFile = options['isReplaceFile'];
|
|
258
|
-
const templateFilePath = join(templateDirectory, 'env');
|
|
259
|
-
const templateContent = await fs.readFile(templateFilePath, 'utf-8');
|
|
260
|
-
const reservedKeys = new Set(Runner.parseEnvFile(templateContent).map((entry) => entry['key']));
|
|
261
|
-
let bufferEnv = '';
|
|
262
|
-
let bufferEnvSample = '';
|
|
164
|
+
static async parseExistingEnv(filePath) {
|
|
165
|
+
const existing = new Map();
|
|
166
|
+
let raw = '';
|
|
263
167
|
try {
|
|
264
|
-
|
|
168
|
+
raw = await fs.readFile(filePath, 'utf-8');
|
|
265
169
|
}
|
|
266
170
|
catch {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
try {
|
|
278
|
-
bufferEnvSample = await fs.readFile(join(templateDirectory, 'env.sample'), 'utf-8');
|
|
171
|
+
return existing;
|
|
172
|
+
}
|
|
173
|
+
const lines = raw.split(LIB_REGEX_LINEBREAK_CRLF_OR_LF);
|
|
174
|
+
let lineIndex = 0;
|
|
175
|
+
while (lineIndex < lines.length) {
|
|
176
|
+
const line = lines[lineIndex] ?? '';
|
|
177
|
+
const keyMatch = line.match(LIB_REGEX_PATTERN_ENV_VAR_KEY);
|
|
178
|
+
if (keyMatch === null) {
|
|
179
|
+
lineIndex += 1;
|
|
180
|
+
continue;
|
|
279
181
|
}
|
|
280
|
-
|
|
182
|
+
const lineKey = keyMatch[1] ?? '';
|
|
183
|
+
const valuePortion = line.slice(keyMatch[0].length);
|
|
184
|
+
const blockLines = [line];
|
|
185
|
+
let isValueOpen = Runner.isQuoteOpen(valuePortion, false);
|
|
186
|
+
while (isValueOpen === true && lineIndex + 1 < lines.length) {
|
|
187
|
+
lineIndex += 1;
|
|
188
|
+
const continuationLine = lines[lineIndex] ?? '';
|
|
189
|
+
blockLines.push(continuationLine);
|
|
190
|
+
isValueOpen = Runner.isQuoteOpen(continuationLine, true);
|
|
281
191
|
}
|
|
192
|
+
existing.set(lineKey, blockLines.join('\n'));
|
|
193
|
+
lineIndex += 1;
|
|
282
194
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
title: 'Add a variable',
|
|
292
|
-
description: 'Add a new environment variable to both files',
|
|
293
|
-
value: 'add',
|
|
294
|
-
}];
|
|
295
|
-
if (envEntries.length > 0) {
|
|
296
|
-
choices.push({
|
|
297
|
-
title: 'Edit a variable',
|
|
298
|
-
description: 'Update the value of an existing variable',
|
|
299
|
-
value: 'edit',
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
if (deletableEntries.length > 0) {
|
|
303
|
-
choices.push({
|
|
304
|
-
title: 'Delete a variable',
|
|
305
|
-
description: 'Remove a variable from both files',
|
|
306
|
-
value: 'delete',
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
choices.push({
|
|
310
|
-
title: 'Save & Exit',
|
|
311
|
-
description: 'Save changes and exit',
|
|
312
|
-
value: 'exit',
|
|
313
|
-
});
|
|
314
|
-
choices.push({
|
|
315
|
-
title: 'Back',
|
|
316
|
-
description: 'Return to the previous menu',
|
|
317
|
-
value: 'back',
|
|
318
|
-
});
|
|
319
|
-
const menuOutput = await Runner.promptWithCancel({
|
|
320
|
-
type: 'select',
|
|
321
|
-
name: 'action',
|
|
322
|
-
message: 'Select an action.',
|
|
323
|
-
choices,
|
|
324
|
-
});
|
|
325
|
-
if (menuOutput['cancelled'] === true) {
|
|
326
|
-
return 'back';
|
|
327
|
-
}
|
|
328
|
-
const action = menuOutput['result'].action;
|
|
329
|
-
if (action === undefined || action === 'back') {
|
|
330
|
-
return 'back';
|
|
331
|
-
}
|
|
332
|
-
if (action === 'exit') {
|
|
333
|
-
if (hasPendingChanges === true && isDryRun !== true) {
|
|
334
|
-
await saveGeneratedFile(envPath, bufferEnv, isReplaceFile, {
|
|
335
|
-
command: 'nova generate must-haves dotenv',
|
|
336
|
-
docsSlug: 'cli/generators/must-haves/dotenv',
|
|
337
|
-
mode: 'fillable',
|
|
338
|
-
});
|
|
339
|
-
await saveGeneratedFile(envSamplePath, bufferEnvSample, isReplaceFile, {
|
|
340
|
-
command: 'nova generate must-haves dotenv',
|
|
341
|
-
docsSlug: 'cli/generators/must-haves/dotenv',
|
|
342
|
-
mode: 'strict',
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
return 'exit';
|
|
346
|
-
}
|
|
347
|
-
if (action === 'add') {
|
|
348
|
-
const addExistingKeys = new Set(envEntries.map((entry) => entry['key']));
|
|
349
|
-
const addKeyOutput = await Runner.promptWithCancel({
|
|
350
|
-
type: 'text',
|
|
351
|
-
name: 'key',
|
|
352
|
-
message: 'Variable name (e.g. API_KEY):',
|
|
353
|
-
validate: (value) => {
|
|
354
|
-
if (typeof value !== 'string' || value.trim() === '') {
|
|
355
|
-
return 'Enter a variable name.';
|
|
356
|
-
}
|
|
357
|
-
const addTrimmedValue = value.trim();
|
|
358
|
-
if (LIB_REGEX_PATTERN_ENV_VAR_KEY_SCREAMING_SNAKE.test(addTrimmedValue) !== true) {
|
|
359
|
-
return 'Use SCREAMING_SNAKE_CASE (e.g. API_KEY).';
|
|
360
|
-
}
|
|
361
|
-
if (addExistingKeys.has(addTrimmedValue) === true) {
|
|
362
|
-
return `"${addTrimmedValue}" already exists.`;
|
|
363
|
-
}
|
|
364
|
-
if (reservedKeys.has(addTrimmedValue) === true) {
|
|
365
|
-
return `"${addTrimmedValue}" is a reserved variable and cannot be added.`;
|
|
366
|
-
}
|
|
367
|
-
return true;
|
|
368
|
-
},
|
|
369
|
-
});
|
|
370
|
-
if (addKeyOutput['cancelled'] === true) {
|
|
371
|
-
continue;
|
|
372
|
-
}
|
|
373
|
-
const addKeyName = addKeyOutput['result'].key;
|
|
374
|
-
if (addKeyName === undefined) {
|
|
375
|
-
continue;
|
|
376
|
-
}
|
|
377
|
-
const addDefaultValueOutput = await Runner.promptWithCancel({
|
|
378
|
-
type: 'text',
|
|
379
|
-
name: 'defaultValue',
|
|
380
|
-
message: 'Default value for .env.sample (leave empty for none):',
|
|
381
|
-
initial: '',
|
|
382
|
-
});
|
|
383
|
-
if (addDefaultValueOutput['cancelled'] === true) {
|
|
384
|
-
continue;
|
|
385
|
-
}
|
|
386
|
-
const addDefaultValue = addDefaultValueOutput['result'].defaultValue ?? '';
|
|
387
|
-
const addTrimmedKeyName = addKeyName.trim();
|
|
388
|
-
const addTrimmedDefaultValue = addDefaultValue.trim();
|
|
389
|
-
const addUpdatedEnv = Runner.addEnvLine(envContent, addTrimmedKeyName, '');
|
|
390
|
-
const addUpdatedSample = Runner.addEnvLine(envSampleContent, addTrimmedKeyName, addTrimmedDefaultValue);
|
|
391
|
-
bufferEnv = addUpdatedEnv;
|
|
392
|
-
bufferEnvSample = addUpdatedSample;
|
|
393
|
-
hasPendingChanges = true;
|
|
394
|
-
Logger.customize({
|
|
395
|
-
name: 'Runner.promptManageMenu',
|
|
396
|
-
purpose: 'add',
|
|
397
|
-
}).info(`Added "${addKeyName.trim()}" to both files.`);
|
|
195
|
+
return existing;
|
|
196
|
+
}
|
|
197
|
+
static isQuoteOpen(text, startOpen) {
|
|
198
|
+
let inQuote = startOpen;
|
|
199
|
+
let escaped = false;
|
|
200
|
+
for (const character of text) {
|
|
201
|
+
if (escaped === true) {
|
|
202
|
+
escaped = false;
|
|
398
203
|
continue;
|
|
399
204
|
}
|
|
400
|
-
if (
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
description: `Current value: "${entry['value']}"`,
|
|
404
|
-
value: entry['key'],
|
|
405
|
-
}));
|
|
406
|
-
const editSelectOutput = await Runner.promptWithCancel({
|
|
407
|
-
type: 'select',
|
|
408
|
-
name: 'variable',
|
|
409
|
-
message: 'Select a variable to edit.',
|
|
410
|
-
choices: editChoices,
|
|
411
|
-
});
|
|
412
|
-
if (editSelectOutput['cancelled'] === true) {
|
|
413
|
-
continue;
|
|
414
|
-
}
|
|
415
|
-
const editSelectedKey = editSelectOutput['result'].variable;
|
|
416
|
-
if (editSelectedKey === undefined) {
|
|
417
|
-
continue;
|
|
418
|
-
}
|
|
419
|
-
const editCurrentEnvEntry = envEntries.find((entry) => entry['key'] === editSelectedKey);
|
|
420
|
-
const editCurrentSampleEntry = envSampleEntries.find((entry) => entry['key'] === editSelectedKey);
|
|
421
|
-
const editEnvValueOutput = await Runner.promptWithCancel({
|
|
422
|
-
type: 'text',
|
|
423
|
-
name: 'value',
|
|
424
|
-
message: `New value for .env (${editSelectedKey}):`,
|
|
425
|
-
initial: (editCurrentEnvEntry !== undefined) ? editCurrentEnvEntry['value'] : '',
|
|
426
|
-
});
|
|
427
|
-
if (editEnvValueOutput['cancelled'] === true) {
|
|
428
|
-
continue;
|
|
429
|
-
}
|
|
430
|
-
const editNewEnvValue = editEnvValueOutput['result'].value ?? '';
|
|
431
|
-
const editSampleValueOutput = await Runner.promptWithCancel({
|
|
432
|
-
type: 'text',
|
|
433
|
-
name: 'defaultValue',
|
|
434
|
-
message: `New default value for .env.sample (${editSelectedKey}):`,
|
|
435
|
-
initial: (editCurrentSampleEntry !== undefined) ? editCurrentSampleEntry['value'] : '',
|
|
436
|
-
});
|
|
437
|
-
if (editSampleValueOutput['cancelled'] === true) {
|
|
438
|
-
continue;
|
|
205
|
+
if (character === '\\') {
|
|
206
|
+
if (inQuote === true) {
|
|
207
|
+
escaped = true;
|
|
439
208
|
}
|
|
440
|
-
const editNewSampleValue = editSampleValueOutput['result'].defaultValue ?? '';
|
|
441
|
-
const editUpdatedEnv = Runner.updateEnvLine(envContent, editSelectedKey, editNewEnvValue);
|
|
442
|
-
const editUpdatedSample = Runner.updateEnvLine(envSampleContent, editSelectedKey, editNewSampleValue);
|
|
443
|
-
bufferEnv = editUpdatedEnv;
|
|
444
|
-
bufferEnvSample = editUpdatedSample;
|
|
445
|
-
hasPendingChanges = true;
|
|
446
|
-
Logger.customize({
|
|
447
|
-
name: 'Runner.promptManageMenu',
|
|
448
|
-
purpose: 'edit',
|
|
449
|
-
}).info(`Updated "${editSelectedKey}" in both files.`);
|
|
450
209
|
continue;
|
|
451
210
|
}
|
|
452
|
-
if (
|
|
453
|
-
|
|
454
|
-
title: entry['key'],
|
|
455
|
-
description: `Current value: "${entry['value']}"`,
|
|
456
|
-
value: entry['key'],
|
|
457
|
-
}));
|
|
458
|
-
const deleteSelectOutput = await Runner.promptWithCancel({
|
|
459
|
-
type: 'select',
|
|
460
|
-
name: 'variable',
|
|
461
|
-
message: 'Select a variable to delete.',
|
|
462
|
-
choices: deleteChoices,
|
|
463
|
-
});
|
|
464
|
-
if (deleteSelectOutput['cancelled'] === true) {
|
|
465
|
-
continue;
|
|
466
|
-
}
|
|
467
|
-
const deleteSelectedKey = deleteSelectOutput['result'].variable;
|
|
468
|
-
if (deleteSelectedKey === undefined) {
|
|
469
|
-
continue;
|
|
470
|
-
}
|
|
471
|
-
const deleteUpdatedEnv = Runner.deleteEnvLine(envContent, deleteSelectedKey);
|
|
472
|
-
const deleteUpdatedSample = Runner.deleteEnvLine(envSampleContent, deleteSelectedKey);
|
|
473
|
-
bufferEnv = deleteUpdatedEnv;
|
|
474
|
-
bufferEnvSample = deleteUpdatedSample;
|
|
475
|
-
hasPendingChanges = true;
|
|
476
|
-
Logger.customize({
|
|
477
|
-
name: 'Runner.promptManageMenu',
|
|
478
|
-
purpose: 'delete',
|
|
479
|
-
}).info(`Deleted "${deleteSelectedKey}" from both files.`);
|
|
480
|
-
continue;
|
|
211
|
+
if (character === '"') {
|
|
212
|
+
inQuote = inQuote === false;
|
|
481
213
|
}
|
|
482
214
|
}
|
|
215
|
+
return inQuote;
|
|
483
216
|
}
|
|
484
|
-
static
|
|
485
|
-
let
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
};
|
|
217
|
+
static escapeSampleValue(value) {
|
|
218
|
+
let result = '';
|
|
219
|
+
for (const character of value) {
|
|
220
|
+
if (character < ' ' || character === '\x7f') {
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
if (character === '"') {
|
|
224
|
+
result += '\\"';
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
result += character;
|
|
496
228
|
}
|
|
497
|
-
return
|
|
498
|
-
cancelled: false,
|
|
499
|
-
result,
|
|
500
|
-
};
|
|
229
|
+
return result;
|
|
501
230
|
}
|
|
502
231
|
}
|
|
503
232
|
//# sourceMappingURL=dotenv.js.map
|