skuba 11.1.0-jest30-20250620003740 → 12.0.0-enable-js-extensions-20250704134302
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/jest/moduleNameMapper.js +4 -1
- package/lib/api/buildkite/annotate.js +2 -2
- package/lib/api/buildkite/annotate.js.map +1 -1
- package/lib/api/buildkite/index.d.ts +3 -3
- package/lib/api/buildkite/index.js +2 -2
- package/lib/api/buildkite/index.js.map +1 -1
- package/lib/api/git/commitAllChanges.d.ts +2 -2
- package/lib/api/git/commitAllChanges.js +3 -3
- package/lib/api/git/commitAllChanges.js.map +1 -1
- package/lib/api/git/getChangedFiles.js +1 -1
- package/lib/api/git/getChangedFiles.js.map +1 -1
- package/lib/api/git/index.d.ts +12 -12
- package/lib/api/git/index.js +11 -11
- package/lib/api/git/index.js.map +1 -1
- package/lib/api/git/pull.js +2 -2
- package/lib/api/git/pull.js.map +1 -1
- package/lib/api/git/push.js +2 -2
- package/lib/api/git/push.js.map +1 -1
- package/lib/api/git/reset.js +1 -1
- package/lib/api/git/reset.js.map +1 -1
- package/lib/api/github/checkRun.js +4 -4
- package/lib/api/github/checkRun.js.map +1 -1
- package/lib/api/github/environment.js +1 -1
- package/lib/api/github/environment.js.map +1 -1
- package/lib/api/github/index.d.ts +7 -7
- package/lib/api/github/index.js +6 -6
- package/lib/api/github/index.js.map +1 -1
- package/lib/api/github/issueComment.js +4 -4
- package/lib/api/github/issueComment.js.map +1 -1
- package/lib/api/github/pullRequest.js +3 -3
- package/lib/api/github/pullRequest.js.map +1 -1
- package/lib/api/github/push.d.ts +1 -1
- package/lib/api/github/push.js +3 -3
- package/lib/api/github/push.js.map +1 -1
- package/lib/api/jest/index.js +2 -2
- package/lib/api/jest/index.js.map +1 -1
- package/lib/api/net/compose.js +1 -1
- package/lib/api/net/compose.js.map +1 -1
- package/lib/api/net/index.d.ts +1 -1
- package/lib/api/net/index.js +1 -1
- package/lib/api/net/index.js.map +1 -1
- package/lib/api/net/waitFor.d.ts +1 -1
- package/lib/api/net/waitFor.js +2 -2
- package/lib/api/net/waitFor.js.map +1 -1
- package/lib/cli/adapter/eslint.d.ts +1 -1
- package/lib/cli/adapter/eslint.js +1 -1
- package/lib/cli/adapter/eslint.js.map +1 -1
- package/lib/cli/adapter/prettier.d.ts +1 -1
- package/lib/cli/adapter/prettier.js +4 -4
- package/lib/cli/adapter/prettier.js.map +2 -2
- package/lib/cli/build/assets.d.ts +1 -1
- package/lib/cli/build/assets.js +4 -4
- package/lib/cli/build/assets.js.map +1 -1
- package/lib/cli/build/esbuild.js +3 -3
- package/lib/cli/build/esbuild.js.map +1 -1
- package/lib/cli/build/index.js +6 -6
- package/lib/cli/build/index.js.map +1 -1
- package/lib/cli/build/tsc.d.ts +1 -1
- package/lib/cli/build/tsc.js +2 -2
- package/lib/cli/build/tsc.js.map +1 -1
- package/lib/cli/buildPackage/index.js +3 -3
- package/lib/cli/buildPackage/index.js.map +1 -1
- package/lib/cli/configure/analyseConfiguration.d.ts +2 -2
- package/lib/cli/configure/analyseConfiguration.js +2 -2
- package/lib/cli/configure/analyseConfiguration.js.map +1 -1
- package/lib/cli/configure/analyseDependencies.d.ts +1 -1
- package/lib/cli/configure/analyseDependencies.js +6 -6
- package/lib/cli/configure/analyseDependencies.js.map +1 -1
- package/lib/cli/configure/analysis/files.js +1 -1
- package/lib/cli/configure/analysis/files.js.map +1 -1
- package/lib/cli/configure/analysis/git.js +2 -2
- package/lib/cli/configure/analysis/git.js.map +1 -1
- package/lib/cli/configure/analysis/package.d.ts +1 -1
- package/lib/cli/configure/analysis/package.js +2 -2
- package/lib/cli/configure/analysis/package.js.map +1 -1
- package/lib/cli/configure/analysis/project.d.ts +1 -1
- package/lib/cli/configure/analysis/project.js +4 -4
- package/lib/cli/configure/analysis/project.js.map +2 -2
- package/lib/cli/configure/dependencies/index.d.ts +5 -5
- package/lib/cli/configure/dependencies/index.js +5 -5
- package/lib/cli/configure/dependencies/index.js.map +1 -1
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.d.ts +2 -2
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +1 -1
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +1 -1
- package/lib/cli/configure/dependencies/seekKoala.d.ts +2 -2
- package/lib/cli/configure/dependencies/seekKoala.js +1 -1
- package/lib/cli/configure/dependencies/seekKoala.js.map +1 -1
- package/lib/cli/configure/dependencies/skuba.d.ts +2 -2
- package/lib/cli/configure/dependencies/skuba.js +1 -1
- package/lib/cli/configure/dependencies/skuba.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDeps.d.ts +1 -1
- package/lib/cli/configure/dependencies/skubaDeps.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDive.d.ts +2 -2
- package/lib/cli/configure/dependencies/skubaDive.js +1 -1
- package/lib/cli/configure/dependencies/skubaDive.js.map +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.d.ts +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.js +6 -6
- package/lib/cli/configure/ensureTemplateCompletion.js.map +1 -1
- package/lib/cli/configure/getEntryPoint.d.ts +2 -2
- package/lib/cli/configure/getEntryPoint.js +3 -3
- package/lib/cli/configure/getEntryPoint.js.map +1 -1
- package/lib/cli/configure/getProjectType.d.ts +2 -2
- package/lib/cli/configure/getProjectType.js +3 -3
- package/lib/cli/configure/getProjectType.js.map +1 -1
- package/lib/cli/configure/index.js +14 -14
- package/lib/cli/configure/index.js.map +1 -1
- package/lib/cli/configure/modules/eslint.d.ts +1 -1
- package/lib/cli/configure/modules/eslint.js +4 -4
- package/lib/cli/configure/modules/eslint.js.map +1 -1
- package/lib/cli/configure/modules/ignore.d.ts +1 -1
- package/lib/cli/configure/modules/ignore.js +2 -2
- package/lib/cli/configure/modules/ignore.js.map +1 -1
- package/lib/cli/configure/modules/index.d.ts +1 -1
- package/lib/cli/configure/modules/index.js +10 -10
- package/lib/cli/configure/modules/index.js.map +1 -1
- package/lib/cli/configure/modules/jest.d.ts +1 -1
- package/lib/cli/configure/modules/jest.js +4 -4
- package/lib/cli/configure/modules/jest.js.map +1 -1
- package/lib/cli/configure/modules/nodemon.d.ts +1 -1
- package/lib/cli/configure/modules/nodemon.js +1 -1
- package/lib/cli/configure/modules/nodemon.js.map +1 -1
- package/lib/cli/configure/modules/package.d.ts +1 -1
- package/lib/cli/configure/modules/package.js +4 -4
- package/lib/cli/configure/modules/package.js.map +1 -1
- package/lib/cli/configure/modules/prettier.d.ts +1 -1
- package/lib/cli/configure/modules/prettier.js +4 -4
- package/lib/cli/configure/modules/prettier.js.map +1 -1
- package/lib/cli/configure/modules/renovate.d.ts +1 -1
- package/lib/cli/configure/modules/renovate.js +5 -5
- package/lib/cli/configure/modules/renovate.js.map +1 -1
- package/lib/cli/configure/modules/serverless.d.ts +1 -1
- package/lib/cli/configure/modules/serverless.js.map +1 -1
- package/lib/cli/configure/modules/skubaDive.d.ts +1 -1
- package/lib/cli/configure/modules/skubaDive.js +4 -4
- package/lib/cli/configure/modules/skubaDive.js.map +1 -1
- package/lib/cli/configure/modules/tslint.d.ts +1 -1
- package/lib/cli/configure/modules/tslint.js +1 -1
- package/lib/cli/configure/modules/tslint.js.map +1 -1
- package/lib/cli/configure/processing/deleteFiles.d.ts +1 -1
- package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
- package/lib/cli/configure/processing/json.js +2 -2
- package/lib/cli/configure/processing/json.js.map +1 -1
- package/lib/cli/configure/processing/loadFiles.d.ts +1 -1
- package/lib/cli/configure/processing/loadFiles.js.map +1 -1
- package/lib/cli/configure/processing/module.d.ts +1 -1
- package/lib/cli/configure/processing/module.js +1 -1
- package/lib/cli/configure/processing/module.js.map +1 -1
- package/lib/cli/configure/processing/package.d.ts +1 -1
- package/lib/cli/configure/processing/package.js +2 -2
- package/lib/cli/configure/processing/package.js.map +1 -1
- package/lib/cli/configure/processing/prettier.js +1 -1
- package/lib/cli/configure/processing/prettier.js.map +1 -1
- package/lib/cli/configure/processing/typescript.js +1 -1
- package/lib/cli/configure/processing/typescript.js.map +1 -1
- package/lib/cli/configure/types.d.ts +2 -2
- package/lib/cli/configure/types.js.map +1 -1
- package/lib/cli/format/index.js +5 -5
- package/lib/cli/format/index.js.map +1 -1
- package/lib/cli/help/index.js +2 -2
- package/lib/cli/help/index.js.map +1 -1
- package/lib/cli/init/getConfig.d.ts +3 -3
- package/lib/cli/init/getConfig.js +9 -9
- package/lib/cli/init/getConfig.js.map +1 -1
- package/lib/cli/init/git.js +2 -2
- package/lib/cli/init/git.js.map +1 -1
- package/lib/cli/init/index.js +15 -15
- package/lib/cli/init/index.js.map +1 -1
- package/lib/cli/init/prompts.d.ts +1 -1
- package/lib/cli/init/prompts.js +2 -2
- package/lib/cli/init/prompts.js.map +1 -1
- package/lib/cli/init/types.js +2 -2
- package/lib/cli/init/types.js.map +1 -1
- package/lib/cli/init/writePackageJson.d.ts +1 -1
- package/lib/cli/init/writePackageJson.js +2 -2
- package/lib/cli/init/writePackageJson.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/eslint.d.ts +1 -1
- package/lib/cli/lint/annotate/buildkite/eslint.js +1 -1
- package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/index.d.ts +4 -4
- package/lib/cli/lint/annotate/buildkite/index.js +5 -5
- package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/internal.d.ts +1 -1
- package/lib/cli/lint/annotate/buildkite/internal.js +1 -1
- package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/prettier.d.ts +1 -1
- package/lib/cli/lint/annotate/buildkite/prettier.js +1 -1
- package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/tsc.d.ts +1 -1
- package/lib/cli/lint/annotate/buildkite/tsc.js +1 -1
- package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
- package/lib/cli/lint/annotate/github/eslint.d.ts +2 -2
- package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/github/index.d.ts +4 -4
- package/lib/cli/lint/annotate/github/index.js +6 -6
- package/lib/cli/lint/annotate/github/index.js.map +2 -2
- package/lib/cli/lint/annotate/github/internal.d.ts +2 -2
- package/lib/cli/lint/annotate/github/internal.js.map +1 -1
- package/lib/cli/lint/annotate/github/prettier.d.ts +2 -2
- package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/github/tsc.d.ts +2 -2
- package/lib/cli/lint/annotate/github/tsc.js.map +1 -1
- package/lib/cli/lint/annotate/index.d.ts +4 -4
- package/lib/cli/lint/annotate/index.js +2 -2
- package/lib/cli/lint/annotate/index.js.map +1 -1
- package/lib/cli/lint/autofix.d.ts +2 -2
- package/lib/cli/lint/autofix.js +11 -11
- package/lib/cli/lint/autofix.js.map +1 -1
- package/lib/cli/lint/eslint.d.ts +2 -2
- package/lib/cli/lint/eslint.js +3 -3
- package/lib/cli/lint/eslint.js.map +1 -1
- package/lib/cli/lint/external.d.ts +3 -3
- package/lib/cli/lint/external.js +3 -3
- package/lib/cli/lint/external.js.map +1 -1
- package/lib/cli/lint/index.js +8 -8
- package/lib/cli/lint/index.js.map +1 -1
- package/lib/cli/lint/internal.d.ts +1 -1
- package/lib/cli/lint/internal.js +5 -5
- package/lib/cli/lint/internal.js.map +1 -1
- package/lib/cli/lint/internalLints/detectBadCodeowners.d.ts +2 -2
- package/lib/cli/lint/internalLints/detectBadCodeowners.js +2 -2
- package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.d.ts +2 -2
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +2 -2
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +1 -1
- package/lib/cli/lint/internalLints/patchRenovateConfig.d.ts +2 -2
- package/lib/cli/lint/internalLints/patchRenovateConfig.js +5 -5
- package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +1 -1
- package/lib/cli/lint/internalLints/refreshConfigFiles.d.ts +3 -3
- package/lib/cli/lint/internalLints/refreshConfigFiles.js +7 -7
- package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/index.d.ts +3 -3
- package/lib/cli/lint/internalLints/upgrade/index.js +4 -4
- package/lib/cli/lint/internalLints/upgrade/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +4 -4
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +4 -4
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +4 -4
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +5 -5
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js +5 -5
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +2 -2
- package/lib/cli/lint/prettier.d.ts +2 -2
- package/lib/cli/lint/prettier.js +3 -3
- package/lib/cli/lint/prettier.js.map +1 -1
- package/lib/cli/lint/tsc.d.ts +1 -1
- package/lib/cli/lint/tsc.js +1 -1
- package/lib/cli/lint/tsc.js.map +1 -1
- package/lib/cli/migrate/index.js +2 -2
- package/lib/cli/migrate/index.js.map +1 -1
- package/lib/cli/migrate/nodeVersion/checks.js +1 -1
- package/lib/cli/migrate/nodeVersion/checks.js.map +1 -1
- package/lib/cli/migrate/nodeVersion/index.js +21 -21
- package/lib/cli/migrate/nodeVersion/index.js.map +2 -2
- package/lib/cli/node/index.js +3 -3
- package/lib/cli/node/index.js.map +1 -1
- package/lib/cli/release/index.js +1 -1
- package/lib/cli/release/index.js.map +1 -1
- package/lib/cli/start/index.js +4 -4
- package/lib/cli/start/index.js.map +1 -1
- package/lib/cli/test/reporters/github/annotations.d.ts +1 -1
- package/lib/cli/test/reporters/github/annotations.js.map +1 -1
- package/lib/cli/test/reporters/github/index.js +5 -5
- package/lib/cli/test/reporters/github/index.js.map +2 -2
- package/lib/cli/version/index.js +2 -2
- package/lib/cli/version/index.js.map +1 -1
- package/lib/index.d.ts +5 -5
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/lib/skuba.js +8 -8
- package/lib/skuba.js.map +1 -1
- package/lib/utils/args.js +1 -1
- package/lib/utils/args.js.map +1 -1
- package/lib/utils/copy.js +2 -2
- package/lib/utils/copy.js.map +1 -1
- package/lib/utils/dir.js +2 -2
- package/lib/utils/dir.js.map +1 -1
- package/lib/utils/error.js +2 -2
- package/lib/utils/error.js.map +1 -1
- package/lib/utils/exec.d.ts +1 -1
- package/lib/utils/exec.js +2 -2
- package/lib/utils/exec.js.map +1 -1
- package/lib/utils/help.js +2 -2
- package/lib/utils/help.js.map +1 -1
- package/lib/utils/logo.js +3 -3
- package/lib/utils/logo.js.map +1 -1
- package/lib/utils/manifest.js +1 -1
- package/lib/utils/manifest.js.map +1 -1
- package/lib/utils/packageManager.js +1 -1
- package/lib/utils/packageManager.js.map +1 -1
- package/lib/utils/template.js +2 -2
- package/lib/utils/template.js.map +1 -1
- package/lib/utils/version.js +2 -2
- package/lib/utils/version.js.map +1 -1
- package/lib/utils/wait.js +2 -2
- package/lib/utils/wait.js.map +1 -1
- package/lib/utils/worker.d.ts +3 -3
- package/lib/utils/worker.js +1 -1
- package/lib/utils/worker.js.map +1 -1
- package/lib/wrapper/functionHandler.js +3 -3
- package/lib/wrapper/functionHandler.js.map +1 -1
- package/lib/wrapper/http.js +1 -1
- package/lib/wrapper/http.js.map +1 -1
- package/lib/wrapper/index.js +3 -3
- package/lib/wrapper/index.js.map +1 -1
- package/lib/wrapper/main.js +2 -2
- package/lib/wrapper/main.js.map +1 -1
- package/lib/wrapper/requestListener.js +2 -2
- package/lib/wrapper/requestListener.js.map +1 -1
- package/package.json +15 -15
- package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/express-rest-api/Dockerfile.dev-deps +1 -1
- package/template/express-rest-api/package.json +1 -1
- package/template/express-rest-api/src/app.test.ts +1 -1
- package/template/express-rest-api/src/app.ts +3 -3
- package/template/express-rest-api/src/framework/logging.ts +1 -1
- package/template/express-rest-api/src/framework/metrics.ts +2 -2
- package/template/express-rest-api/src/listen.ts +4 -4
- package/template/greeter/.buildkite/pipeline.yml +1 -1
- package/template/greeter/Dockerfile +1 -1
- package/template/greeter/package.json +2 -2
- package/template/greeter/src/app.test.ts +1 -1
- package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/koa-rest-api/Dockerfile.dev-deps +1 -1
- package/template/koa-rest-api/package.json +7 -7
- package/template/koa-rest-api/src/api/healthCheck.ts +1 -1
- package/template/koa-rest-api/src/api/index.ts +3 -3
- package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +2 -2
- package/template/koa-rest-api/src/api/jobs/getJobs.ts +4 -4
- package/template/koa-rest-api/src/api/jobs/index.ts +3 -3
- package/template/koa-rest-api/src/api/jobs/postJob.test.ts +4 -4
- package/template/koa-rest-api/src/api/jobs/postJob.ts +6 -6
- package/template/koa-rest-api/src/api/smokeTest.ts +2 -2
- package/template/koa-rest-api/src/app.test.ts +2 -2
- package/template/koa-rest-api/src/app.ts +3 -3
- package/template/koa-rest-api/src/config.ts +1 -1
- package/template/koa-rest-api/src/framework/logging.ts +22 -13
- package/template/koa-rest-api/src/framework/metrics.ts +2 -2
- package/template/koa-rest-api/src/framework/server.test.ts +95 -64
- package/template/koa-rest-api/src/framework/server.ts +3 -3
- package/template/koa-rest-api/src/framework/validation.test.ts +35 -35
- package/template/koa-rest-api/src/framework/validation.ts +15 -22
- package/template/koa-rest-api/src/listen.ts +4 -4
- package/template/koa-rest-api/src/storage/jobs.ts +1 -1
- package/template/koa-rest-api/src/testing/metrics.ts +1 -1
- package/template/koa-rest-api/src/testing/server.ts +1 -1
- package/template/koa-rest-api/src/testing/types.ts +2 -2
- package/template/koa-rest-api/src/types/jobs.ts +1 -1
- package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
- package/template/lambda-sqs-worker-cdk/Dockerfile +1 -1
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +6 -0
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +1 -1
- package/template/lambda-sqs-worker-cdk/infra/index.ts +2 -2
- package/template/lambda-sqs-worker-cdk/package.json +5 -5
- package/template/lambda-sqs-worker-cdk/src/app.test.ts +81 -22
- package/template/lambda-sqs-worker-cdk/src/app.ts +10 -7
- package/template/lambda-sqs-worker-cdk/src/config.ts +1 -1
- package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +38 -18
- package/template/lambda-sqs-worker-cdk/src/framework/handler.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/framework/logging.ts +23 -12
- package/template/lambda-sqs-worker-cdk/src/framework/metrics.ts +1 -1
- package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +8 -11
- package/template/lambda-sqs-worker-cdk/src/framework/validation.ts +3 -7
- package/template/lambda-sqs-worker-cdk/src/mapping/jobScorer.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +3 -3
- package/template/lambda-sqs-worker-cdk/src/services/jobScorer.ts +3 -3
- package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +3 -3
- package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/testing/handler.ts +1 -1
- package/template/lambda-sqs-worker-cdk/src/testing/services.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/testing/types.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/types/jobScorer.ts +1 -1
- package/template/lambda-sqs-worker-cdk/src/types/pipelineEvents.ts +1 -1
- package/template/oss-npm-package/src/index.test.ts +1 -1
- package/template/private-npm-package/src/index.test.ts +1 -1
- package/template/koa-rest-api/src/testing/logging.ts +0 -16
- package/template/lambda-sqs-worker-cdk/src/testing/logging.ts +0 -19
|
@@ -21,16 +21,16 @@ __export(modules_exports, {
|
|
|
21
21
|
loadModules: () => loadModules
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(modules_exports);
|
|
24
|
-
var import_eslint = require("./eslint");
|
|
25
|
-
var import_ignore = require("./ignore");
|
|
26
|
-
var import_jest = require("./jest");
|
|
27
|
-
var import_nodemon = require("./nodemon");
|
|
28
|
-
var import_package = require("./package");
|
|
29
|
-
var import_prettier = require("./prettier");
|
|
30
|
-
var import_renovate = require("./renovate");
|
|
31
|
-
var import_serverless = require("./serverless");
|
|
32
|
-
var import_skubaDive = require("./skubaDive");
|
|
33
|
-
var import_tslint = require("./tslint");
|
|
24
|
+
var import_eslint = require("./eslint.js");
|
|
25
|
+
var import_ignore = require("./ignore.js");
|
|
26
|
+
var import_jest = require("./jest.js");
|
|
27
|
+
var import_nodemon = require("./nodemon.js");
|
|
28
|
+
var import_package = require("./package.js");
|
|
29
|
+
var import_prettier = require("./prettier.js");
|
|
30
|
+
var import_renovate = require("./renovate.js");
|
|
31
|
+
var import_serverless = require("./serverless.js");
|
|
32
|
+
var import_skubaDive = require("./skubaDive.js");
|
|
33
|
+
var import_tslint = require("./tslint.js");
|
|
34
34
|
const loadModules = (opts) => Promise.all(
|
|
35
35
|
[
|
|
36
36
|
import_eslint.eslintModule,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/index.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Module, Options } from '../types';\n\nimport { eslintModule } from './eslint';\nimport { ignoreModule } from './ignore';\nimport { jestModule } from './jest';\nimport { nodemonModule } from './nodemon';\nimport { packageModule } from './package';\nimport { prettierModule } from './prettier';\nimport { renovateModule } from './renovate';\nimport { serverlessModule } from './serverless';\nimport { skubaDiveModule } from './skubaDive';\nimport { tslintModule } from './tslint';\n\nexport const loadModules = (opts: Options): Promise<Module[]> =>\n Promise.all(\n [\n eslintModule,\n ignoreModule,\n jestModule,\n nodemonModule,\n packageModule,\n prettierModule,\n renovateModule,\n serverlessModule,\n skubaDiveModule,\n tslintModule,\n ].map((createModule) => createModule(opts)),\n );\n"],
|
|
4
|
+
"sourcesContent": ["import type { Module, Options } from '../types.js';\n\nimport { eslintModule } from './eslint.js';\nimport { ignoreModule } from './ignore.js';\nimport { jestModule } from './jest.js';\nimport { nodemonModule } from './nodemon.js';\nimport { packageModule } from './package.js';\nimport { prettierModule } from './prettier.js';\nimport { renovateModule } from './renovate.js';\nimport { serverlessModule } from './serverless.js';\nimport { skubaDiveModule } from './skubaDive.js';\nimport { tslintModule } from './tslint.js';\n\nexport const loadModules = (opts: Options): Promise<Module[]> =>\n Promise.all(\n [\n eslintModule,\n ignoreModule,\n jestModule,\n nodemonModule,\n packageModule,\n prettierModule,\n renovateModule,\n serverlessModule,\n skubaDiveModule,\n tslintModule,\n ].map((createModule) => createModule(opts)),\n );\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA6B;AAC7B,oBAA6B;AAC7B,kBAA2B;AAC3B,qBAA8B;AAC9B,qBAA8B;AAC9B,sBAA+B;AAC/B,sBAA+B;AAC/B,wBAAiC;AACjC,uBAAgC;AAChC,oBAA6B;AAEtB,MAAM,cAAc,CAAC,SAC1B,QAAQ;AAAA,EACN;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,IAAI,CAAC,iBAAiB,aAAa,IAAI,CAAC;AAC5C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module } from '../types';
|
|
1
|
+
import type { Module } from '../types.js';
|
|
2
2
|
export declare const jestModule: () => Promise<Module>;
|
|
@@ -21,10 +21,10 @@ __export(jest_exports, {
|
|
|
21
21
|
jestModule: () => jestModule
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(jest_exports);
|
|
24
|
-
var import_template = require("../../../utils/template");
|
|
25
|
-
var import_deleteFiles = require("../processing/deleteFiles");
|
|
26
|
-
var import_package = require("../processing/package");
|
|
27
|
-
var import_typescript = require("../processing/typescript");
|
|
24
|
+
var import_template = require("../../../utils/template.js");
|
|
25
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
26
|
+
var import_package = require("../processing/package.js");
|
|
27
|
+
var import_typescript = require("../processing/typescript.js");
|
|
28
28
|
const OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS = [
|
|
29
29
|
`
|
|
30
30
|
globals: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/jest.ts"],
|
|
4
|
-
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template';\nimport { deleteFiles } from '../processing/deleteFiles';\nimport { withPackage } from '../processing/package';\nimport {\n createPropAppender,\n createPropFilter,\n readModuleExports,\n transformModuleImportsAndExports,\n} from '../processing/typescript';\nimport type { Module } from '../types';\n\nconst OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS = [\n `\n globals: {\n 'ts-jest': {\n // seek-oss/skuba#626\n isolatedModules: true,\n },\n },`,\n `\n globals: {\n 'ts-jest': {\n isolatedModules: true,\n },\n },`,\n];\n\n// Jest options to preserve during migration\nconst filterProps = createPropFilter([\n 'collectCoverageFrom',\n 'coverageThreshold',\n 'globalSetup',\n 'globalTeardown',\n 'setupFiles',\n 'setupFilesAfterEnv',\n]);\n\nexport const jestModule = async (): Promise<Module> => {\n const [configFile, setupFile] = await Promise.all([\n readBaseTemplateFile('jest.config.ts'),\n readBaseTemplateFile('jest.setup.ts'),\n ]);\n\n return {\n ...deleteFiles('jest.config.js', 'jest.setup.js'),\n\n 'jest.config.ts': async (tsFile, currentFiles, initialFiles) => {\n // Allow customised TS Jest config that extends skuba\n if (tsFile?.includes('skuba')) {\n return OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS.reduce(\n (acc, snippet) => acc.replace(snippet, ''),\n tsFile,\n );\n }\n\n const jsFile = initialFiles['jest.config.js'];\n\n // Migrate a JS config that extends skuba, retaining all existing props\n if (jsFile?.includes('skuba')) {\n return transformModuleImportsAndExports(jsFile, (_, p) => p);\n }\n\n currentFiles['jest.setup.ts'] ??=\n initialFiles['jest.setup.js'] ?? setupFile;\n\n const inputFile = tsFile ?? jsFile;\n\n const props =\n inputFile === undefined\n ? undefined\n : await readModuleExports(inputFile);\n\n if (props === undefined) {\n return configFile;\n }\n\n const filteredProps = filterProps(null, props);\n\n const appendProps = createPropAppender(filteredProps);\n\n // Append a subset of custom props to our base `jest.config.ts`\n return transformModuleImportsAndExports(configFile, appendProps);\n },\n\n 'package.json': withPackage(({ jest, ...data }) => data),\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport {\n createPropAppender,\n createPropFilter,\n readModuleExports,\n transformModuleImportsAndExports,\n} from '../processing/typescript.js';\nimport type { Module } from '../types.js';\n\nconst OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS = [\n `\n globals: {\n 'ts-jest': {\n // seek-oss/skuba#626\n isolatedModules: true,\n },\n },`,\n `\n globals: {\n 'ts-jest': {\n isolatedModules: true,\n },\n },`,\n];\n\n// Jest options to preserve during migration\nconst filterProps = createPropFilter([\n 'collectCoverageFrom',\n 'coverageThreshold',\n 'globalSetup',\n 'globalTeardown',\n 'setupFiles',\n 'setupFilesAfterEnv',\n]);\n\nexport const jestModule = async (): Promise<Module> => {\n const [configFile, setupFile] = await Promise.all([\n readBaseTemplateFile('jest.config.ts'),\n readBaseTemplateFile('jest.setup.ts'),\n ]);\n\n return {\n ...deleteFiles('jest.config.js', 'jest.setup.js'),\n\n 'jest.config.ts': async (tsFile, currentFiles, initialFiles) => {\n // Allow customised TS Jest config that extends skuba\n if (tsFile?.includes('skuba')) {\n return OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS.reduce(\n (acc, snippet) => acc.replace(snippet, ''),\n tsFile,\n );\n }\n\n const jsFile = initialFiles['jest.config.js'];\n\n // Migrate a JS config that extends skuba, retaining all existing props\n if (jsFile?.includes('skuba')) {\n return transformModuleImportsAndExports(jsFile, (_, p) => p);\n }\n\n currentFiles['jest.setup.ts'] ??=\n initialFiles['jest.setup.js'] ?? setupFile;\n\n const inputFile = tsFile ?? jsFile;\n\n const props =\n inputFile === undefined\n ? undefined\n : await readModuleExports(inputFile);\n\n if (props === undefined) {\n return configFile;\n }\n\n const filteredProps = filterProps(null, props);\n\n const appendProps = createPropAppender(filteredProps);\n\n // Append a subset of custom props to our base `jest.config.ts`\n return transformModuleImportsAndExports(configFile, appendProps);\n },\n\n 'package.json': withPackage(({ jest, ...data }) => data),\n };\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqC;AACrC,yBAA4B;AAC5B,qBAA4B;AAC5B,wBAKO;AAGP,MAAM,4CAA4C;AAAA,EAChD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMF;AAGA,MAAM,kBAAc,oCAAiB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,MAAM,aAAa,YAA6B;AACrD,QAAM,CAAC,YAAY,SAAS,IAAI,MAAM,QAAQ,IAAI;AAAA,QAChD,sCAAqB,gBAAgB;AAAA,QACrC,sCAAqB,eAAe;AAAA,EACtC,CAAC;AAED,SAAO;AAAA,IACL,OAAG,gCAAY,kBAAkB,eAAe;AAAA,IAEhD,kBAAkB,OAAO,QAAQ,cAAc,iBAAiB;AAE9D,UAAI,QAAQ,SAAS,OAAO,GAAG;AAC7B,eAAO,0CAA0C;AAAA,UAC/C,CAAC,KAAK,YAAY,IAAI,QAAQ,SAAS,EAAE;AAAA,UACzC;AAAA,QACF;AAAA,MACF;AAEA,YAAM,SAAS,aAAa,gBAAgB;AAG5C,UAAI,QAAQ,SAAS,OAAO,GAAG;AAC7B,mBAAO,oDAAiC,QAAQ,CAAC,GAAG,MAAM,CAAC;AAAA,MAC7D;AAEA,mBAAa,eAAe,MAC1B,aAAa,eAAe,KAAK;AAEnC,YAAM,YAAY,UAAU;AAE5B,YAAM,QACJ,cAAc,SACV,SACA,UAAM,qCAAkB,SAAS;AAEvC,UAAI,UAAU,QAAW;AACvB,eAAO;AAAA,MACT;AAEA,YAAM,gBAAgB,YAAY,MAAM,KAAK;AAE7C,YAAM,kBAAc,sCAAmB,aAAa;AAGpD,iBAAO,oDAAiC,YAAY,WAAW;AAAA,IACjE;AAAA,IAEA,oBAAgB,4BAAY,CAAC,EAAE,MAAM,GAAG,KAAK,MAAM,IAAI;AAAA,EACzD;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module } from '../types';
|
|
1
|
+
import type { Module } from '../types.js';
|
|
2
2
|
export declare const nodemonModule: () => Module;
|
|
@@ -21,7 +21,7 @@ __export(nodemon_exports, {
|
|
|
21
21
|
nodemonModule: () => nodemonModule
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(nodemon_exports);
|
|
24
|
-
var import_deleteFiles = require("../processing/deleteFiles");
|
|
24
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
25
25
|
const nodemonModule = () => (0, import_deleteFiles.deleteFiles)("nodemon.json");
|
|
26
26
|
// Annotate the CommonJS export names for ESM import in node:
|
|
27
27
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/nodemon.ts"],
|
|
4
|
-
"sourcesContent": ["import { deleteFiles } from '../processing/deleteFiles';\nimport type { Module } from '../types';\n\nexport const nodemonModule = (): Module => deleteFiles('nodemon.json');\n"],
|
|
4
|
+
"sourcesContent": ["import { deleteFiles } from '../processing/deleteFiles.js';\nimport type { Module } from '../types.js';\n\nexport const nodemonModule = (): Module => deleteFiles('nodemon.json');\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAGrB,MAAM,gBAAgB,UAAc,gCAAY,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module, Options } from '../types';
|
|
1
|
+
import type { Module, Options } from '../types.js';
|
|
2
2
|
export declare const packageModule: ({ entryPoint, packageManager, type, }: Options) => Promise<Module>;
|
|
@@ -21,10 +21,10 @@ __export(package_exports, {
|
|
|
21
21
|
packageModule: () => packageModule
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(package_exports);
|
|
24
|
-
var import_version = require("../../../utils/version");
|
|
25
|
-
var import_deleteFiles = require("../processing/deleteFiles");
|
|
26
|
-
var import_package = require("../processing/package");
|
|
27
|
-
var import_record = require("../processing/record");
|
|
24
|
+
var import_version = require("../../../utils/version.js");
|
|
25
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
26
|
+
var import_package = require("../processing/package.js");
|
|
27
|
+
var import_record = require("../processing/record.js");
|
|
28
28
|
const DEFAULT_PACKAGE_FILES = [
|
|
29
29
|
"lib*/**/*.d.ts",
|
|
30
30
|
"lib*/**/*.js",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/package.ts"],
|
|
4
|
-
"sourcesContent": ["import { getSkubaVersion } from '../../../utils/version';\nimport { deleteFiles } from '../processing/deleteFiles';\nimport { withPackage } from '../processing/package';\nimport { merge } from '../processing/record';\nimport type { Module, Options } from '../types';\n\nconst DEFAULT_PACKAGE_FILES = [\n 'lib*/**/*.d.ts',\n 'lib*/**/*.js',\n 'lib*/**/*.js.map',\n 'lib*/**/*.json',\n];\n\nexport const packageModule = async ({\n entryPoint,\n packageManager,\n type,\n}: Options): Promise<Module> => {\n const version = await getSkubaVersion();\n\n const initialData = {\n private: type !== 'package',\n\n scripts: {\n build: type === 'package' ? 'skuba build-package' : 'skuba build',\n format: 'skuba format',\n lint: 'skuba lint',\n ...(type === 'package' ? {} : { start: 'skuba start' }),\n test: 'skuba test --coverage',\n 'test:watch': 'skuba test --watch',\n },\n skuba: {\n entryPoint,\n template: null,\n type,\n version,\n },\n };\n\n const recurringData = {\n skuba: {\n entryPoint,\n type,\n version,\n },\n };\n\n return {\n ...deleteFiles('.npmignore', 'package-lock.json'),\n\n 'package.json': (inputFile) =>\n withPackage((inputData) => {\n const outputData = merge(\n inputData,\n 'skuba' in inputData ? recurringData : initialData,\n );\n\n outputData.license ??= 'UNLICENSED';\n outputData.scripts ??= {};\n\n // Workspaces can only be enabled in private projects\n if (outputData.workspaces && !outputData.private) {\n outputData.private = true;\n }\n\n delete outputData.scripts.commit;\n delete outputData.scripts['format:check'];\n delete outputData.scripts['lint:build'];\n delete outputData.scripts['lint:compile'];\n delete outputData.scripts['lint:eslint'];\n delete outputData.scripts['lint:prettier'];\n delete outputData.scripts['lint:tslint'];\n delete outputData.scripts['test:build'];\n delete outputData.scripts['test:jest'];\n delete outputData.typings;\n\n if (type === 'package') {\n outputData.files = (\n outputData.files ?? DEFAULT_PACKAGE_FILES\n ).flatMap((filePattern) =>\n filePattern === 'lib' ? DEFAULT_PACKAGE_FILES : [filePattern],\n );\n\n outputData.version ??= '0.0.0-semantically-released';\n\n // User-defined pre- and post-scripts are confusing and dropped by e.g.\n // Yarn 2.\n outputData.scripts.release = [\n outputData.scripts.prepublish,\n outputData.scripts.prerelease,\n outputData.scripts.release ?? 'skuba release',\n ]\n .filter((script): script is string => typeof script === 'string')\n .map((script) =>\n script\n .replace(\n /^smt build$/,\n `${packageManager.print.runSilent} build`,\n )\n .replace(/^smt /, 'skuba ')\n .trim(),\n )\n .filter(Boolean)\n .join(' && ');\n\n // Align with the required syntax for package.json#/paths\n if (outputData.scripts.build === 'skuba build-package') {\n outputData.main = './lib-commonjs/index.js';\n outputData.module = './lib-es2015/index.js';\n outputData.types = './lib-types/index.d.ts';\n } else {\n outputData.main = './lib/index.js';\n outputData.module = './lib/index.js';\n outputData.types = './lib/index.d.ts';\n }\n\n delete outputData.scripts.prepublish;\n delete outputData.scripts.prerelease;\n }\n\n return outputData;\n })(inputFile),\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { getSkubaVersion } from '../../../utils/version.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport { merge } from '../processing/record.js';\nimport type { Module, Options } from '../types.js';\n\nconst DEFAULT_PACKAGE_FILES = [\n 'lib*/**/*.d.ts',\n 'lib*/**/*.js',\n 'lib*/**/*.js.map',\n 'lib*/**/*.json',\n];\n\nexport const packageModule = async ({\n entryPoint,\n packageManager,\n type,\n}: Options): Promise<Module> => {\n const version = await getSkubaVersion();\n\n const initialData = {\n private: type !== 'package',\n\n scripts: {\n build: type === 'package' ? 'skuba build-package' : 'skuba build',\n format: 'skuba format',\n lint: 'skuba lint',\n ...(type === 'package' ? {} : { start: 'skuba start' }),\n test: 'skuba test --coverage',\n 'test:watch': 'skuba test --watch',\n },\n skuba: {\n entryPoint,\n template: null,\n type,\n version,\n },\n };\n\n const recurringData = {\n skuba: {\n entryPoint,\n type,\n version,\n },\n };\n\n return {\n ...deleteFiles('.npmignore', 'package-lock.json'),\n\n 'package.json': (inputFile) =>\n withPackage((inputData) => {\n const outputData = merge(\n inputData,\n 'skuba' in inputData ? recurringData : initialData,\n );\n\n outputData.license ??= 'UNLICENSED';\n outputData.scripts ??= {};\n\n // Workspaces can only be enabled in private projects\n if (outputData.workspaces && !outputData.private) {\n outputData.private = true;\n }\n\n delete outputData.scripts.commit;\n delete outputData.scripts['format:check'];\n delete outputData.scripts['lint:build'];\n delete outputData.scripts['lint:compile'];\n delete outputData.scripts['lint:eslint'];\n delete outputData.scripts['lint:prettier'];\n delete outputData.scripts['lint:tslint'];\n delete outputData.scripts['test:build'];\n delete outputData.scripts['test:jest'];\n delete outputData.typings;\n\n if (type === 'package') {\n outputData.files = (\n outputData.files ?? DEFAULT_PACKAGE_FILES\n ).flatMap((filePattern) =>\n filePattern === 'lib' ? DEFAULT_PACKAGE_FILES : [filePattern],\n );\n\n outputData.version ??= '0.0.0-semantically-released';\n\n // User-defined pre- and post-scripts are confusing and dropped by e.g.\n // Yarn 2.\n outputData.scripts.release = [\n outputData.scripts.prepublish,\n outputData.scripts.prerelease,\n outputData.scripts.release ?? 'skuba release',\n ]\n .filter((script): script is string => typeof script === 'string')\n .map((script) =>\n script\n .replace(\n /^smt build$/,\n `${packageManager.print.runSilent} build`,\n )\n .replace(/^smt /, 'skuba ')\n .trim(),\n )\n .filter(Boolean)\n .join(' && ');\n\n // Align with the required syntax for package.json#/paths\n if (outputData.scripts.build === 'skuba build-package') {\n outputData.main = './lib-commonjs/index.js';\n outputData.module = './lib-es2015/index.js';\n outputData.types = './lib-types/index.d.ts';\n } else {\n outputData.main = './lib/index.js';\n outputData.module = './lib/index.js';\n outputData.types = './lib/index.d.ts';\n }\n\n delete outputData.scripts.prepublish;\n delete outputData.scripts.prerelease;\n }\n\n return outputData;\n })(inputFile),\n };\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAgC;AAChC,yBAA4B;AAC5B,qBAA4B;AAC5B,oBAAsB;AAGtB,MAAM,wBAAwB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,gBAAgB,OAAO;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF,MAAgC;AAC9B,QAAM,UAAU,UAAM,gCAAgB;AAEtC,QAAM,cAAc;AAAA,IAClB,SAAS,SAAS;AAAA,IAElB,SAAS;AAAA,MACP,OAAO,SAAS,YAAY,wBAAwB;AAAA,MACpD,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,GAAI,SAAS,YAAY,CAAC,IAAI,EAAE,OAAO,cAAc;AAAA,MACrD,MAAM;AAAA,MACN,cAAc;AAAA,IAChB;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,gBAAgB;AAAA,IACpB,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAG,gCAAY,cAAc,mBAAmB;AAAA,IAEhD,gBAAgB,CAAC,kBACf,4BAAY,CAAC,cAAc;AACzB,YAAM,iBAAa;AAAA,QACjB;AAAA,QACA,WAAW,YAAY,gBAAgB;AAAA,MACzC;AAEA,iBAAW,YAAY;AACvB,iBAAW,YAAY,CAAC;AAGxB,UAAI,WAAW,cAAc,CAAC,WAAW,SAAS;AAChD,mBAAW,UAAU;AAAA,MACvB;AAEA,aAAO,WAAW,QAAQ;AAC1B,aAAO,WAAW,QAAQ,cAAc;AACxC,aAAO,WAAW,QAAQ,YAAY;AACtC,aAAO,WAAW,QAAQ,cAAc;AACxC,aAAO,WAAW,QAAQ,aAAa;AACvC,aAAO,WAAW,QAAQ,eAAe;AACzC,aAAO,WAAW,QAAQ,aAAa;AACvC,aAAO,WAAW,QAAQ,YAAY;AACtC,aAAO,WAAW,QAAQ,WAAW;AACrC,aAAO,WAAW;AAElB,UAAI,SAAS,WAAW;AACtB,mBAAW,SACT,WAAW,SAAS,uBACpB;AAAA,UAAQ,CAAC,gBACT,gBAAgB,QAAQ,wBAAwB,CAAC,WAAW;AAAA,QAC9D;AAEA,mBAAW,YAAY;AAIvB,mBAAW,QAAQ,UAAU;AAAA,UAC3B,WAAW,QAAQ;AAAA,UACnB,WAAW,QAAQ;AAAA,UACnB,WAAW,QAAQ,WAAW;AAAA,QAChC,EACG,OAAO,CAAC,WAA6B,OAAO,WAAW,QAAQ,EAC/D;AAAA,UAAI,CAAC,WACJ,OACG;AAAA,YACC;AAAA,YACA,GAAG,eAAe,MAAM,SAAS;AAAA,UACnC,EACC,QAAQ,SAAS,QAAQ,EACzB,KAAK;AAAA,QACV,EACC,OAAO,OAAO,EACd,KAAK,MAAM;AAGd,YAAI,WAAW,QAAQ,UAAU,uBAAuB;AACtD,qBAAW,OAAO;AAClB,qBAAW,SAAS;AACpB,qBAAW,QAAQ;AAAA,QACrB,OAAO;AACL,qBAAW,OAAO;AAClB,qBAAW,SAAS;AACpB,qBAAW,QAAQ;AAAA,QACrB;AAEA,eAAO,WAAW,QAAQ;AAC1B,eAAO,WAAW,QAAQ;AAAA,MAC5B;AAEA,aAAO;AAAA,IACT,CAAC,EAAE,SAAS;AAAA,EAChB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module } from '../types';
|
|
1
|
+
import type { Module } from '../types.js';
|
|
2
2
|
export declare const prettierModule: () => Promise<Module>;
|
|
@@ -21,10 +21,10 @@ __export(prettier_exports, {
|
|
|
21
21
|
prettierModule: () => prettierModule
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(prettier_exports);
|
|
24
|
-
var import_template = require("../../../utils/template");
|
|
25
|
-
var import_configFile = require("../processing/configFile");
|
|
26
|
-
var import_deleteFiles = require("../processing/deleteFiles");
|
|
27
|
-
var import_package = require("../processing/package");
|
|
24
|
+
var import_template = require("../../../utils/template.js");
|
|
25
|
+
var import_configFile = require("../processing/configFile.js");
|
|
26
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
27
|
+
var import_package = require("../processing/package.js");
|
|
28
28
|
const prettierModule = async () => {
|
|
29
29
|
const [configFile, ignoreFile] = await Promise.all([
|
|
30
30
|
(0, import_template.readBaseTemplateFile)("_.prettierrc.js"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/prettier.ts"],
|
|
4
|
-
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template';\nimport { mergeWithConfigFile } from '../processing/configFile';\nimport { deleteFiles } from '../processing/deleteFiles';\nimport { withPackage } from '../processing/package';\nimport type { Module } from '../types';\n\nexport const prettierModule = async (): Promise<Module> => {\n const [configFile, ignoreFile] = await Promise.all([\n readBaseTemplateFile('_.prettierrc.js'),\n readBaseTemplateFile('_.prettierignore'),\n ]);\n\n return {\n ...deleteFiles(\n '.prettierrc',\n '.prettierrc.json',\n '.prettierrc.toml',\n '.prettierrc.yaml',\n '.prettierrc.yml',\n 'prettier.config.js',\n ),\n\n '.prettierignore': mergeWithConfigFile(ignoreFile),\n\n // enforce skuba opinions as there's no value in customising Prettier configs\n '.prettierrc.js': () => configFile,\n\n 'package.json': withPackage(({ prettier, ...data }) => data),\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { mergeWithConfigFile } from '../processing/configFile.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport type { Module } from '../types.js';\n\nexport const prettierModule = async (): Promise<Module> => {\n const [configFile, ignoreFile] = await Promise.all([\n readBaseTemplateFile('_.prettierrc.js'),\n readBaseTemplateFile('_.prettierignore'),\n ]);\n\n return {\n ...deleteFiles(\n '.prettierrc',\n '.prettierrc.json',\n '.prettierrc.toml',\n '.prettierrc.yaml',\n '.prettierrc.yml',\n 'prettier.config.js',\n ),\n\n '.prettierignore': mergeWithConfigFile(ignoreFile),\n\n // enforce skuba opinions as there's no value in customising Prettier configs\n '.prettierrc.js': () => configFile,\n\n 'package.json': withPackage(({ prettier, ...data }) => data),\n };\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqC;AACrC,wBAAoC;AACpC,yBAA4B;AAC5B,qBAA4B;AAGrB,MAAM,iBAAiB,YAA6B;AACzD,QAAM,CAAC,YAAY,UAAU,IAAI,MAAM,QAAQ,IAAI;AAAA,QACjD,sCAAqB,iBAAiB;AAAA,QACtC,sCAAqB,kBAAkB;AAAA,EACzC,CAAC;AAED,SAAO;AAAA,IACL,OAAG;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IAEA,uBAAmB,uCAAoB,UAAU;AAAA;AAAA,IAGjD,kBAAkB,MAAM;AAAA,IAExB,oBAAgB,4BAAY,CAAC,EAAE,UAAU,GAAG,KAAK,MAAM,IAAI;AAAA,EAC7D;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,11 +22,11 @@ __export(renovate_exports, {
|
|
|
22
22
|
renovateModule: () => renovateModule
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(renovate_exports);
|
|
25
|
-
var import_template = require("../../../utils/template");
|
|
26
|
-
var import_deleteFiles = require("../processing/deleteFiles");
|
|
27
|
-
var import_package = require("../processing/package");
|
|
28
|
-
var import_prettier = require("../processing/prettier");
|
|
29
|
-
var import_record = require("../processing/record");
|
|
25
|
+
var import_template = require("../../../utils/template.js");
|
|
26
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
27
|
+
var import_package = require("../processing/package.js");
|
|
28
|
+
var import_prettier = require("../processing/prettier.js");
|
|
29
|
+
var import_record = require("../processing/record.js");
|
|
30
30
|
const OTHER_CONFIG_FILENAMES = [
|
|
31
31
|
".github/renovate.json",
|
|
32
32
|
".renovaterc",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/renovate.ts"],
|
|
4
|
-
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template';\nimport { deleteFiles } from '../processing/deleteFiles';\nimport { withPackage } from '../processing/package';\nimport { formatPrettier } from '../processing/prettier';\nimport { getFirstDefined } from '../processing/record';\nimport type { Module, Options } from '../types';\n\nconst OTHER_CONFIG_FILENAMES = [\n '.github/renovate.json',\n '.renovaterc',\n '.renovaterc.json',\n 'renovate.json',\n 'renovate.json5',\n];\n\nexport const RENOVATE_CONFIG_FILENAMES = [\n '.github/renovate.json5',\n ...OTHER_CONFIG_FILENAMES,\n];\n\nexport const renovateModule = async ({ type }: Options): Promise<Module> => {\n const configFile = await readBaseTemplateFile('.github/renovate.json5');\n\n return {\n ...deleteFiles(...OTHER_CONFIG_FILENAMES),\n\n '.github/renovate.json5': (_inputFile, _files, initialFiles) => {\n // allow migration from other Renovate config files\n const inputFile = getFirstDefined(initialFiles, [\n '.github/renovate.json5',\n ...OTHER_CONFIG_FILENAMES,\n ]);\n\n // allow customised Renovate configs that extend a SEEK configuration\n return inputFile?.includes('seek')\n ? formatPrettier(inputFile, { parser: 'json5' })\n : configFile;\n },\n\n /**\n * Ensure Renovate correctly detects the project as an application/library.\n *\n * @see {@link https://docs.renovatebot.com/configuration-options/#rangestrategy }\n * @see {@link https://github.com/renovatebot/renovate/blob/8c361082842bb157d85ca39ecf4f6075730e74bb/lib/manager/npm/extract/type.ts#L3 }\n */\n 'package.json': withPackage(({ private: _, renovate, ...data }) => ({\n ...data,\n private: type !== 'package',\n })),\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport { formatPrettier } from '../processing/prettier.js';\nimport { getFirstDefined } from '../processing/record.js';\nimport type { Module, Options } from '../types.js';\n\nconst OTHER_CONFIG_FILENAMES = [\n '.github/renovate.json',\n '.renovaterc',\n '.renovaterc.json',\n 'renovate.json',\n 'renovate.json5',\n];\n\nexport const RENOVATE_CONFIG_FILENAMES = [\n '.github/renovate.json5',\n ...OTHER_CONFIG_FILENAMES,\n];\n\nexport const renovateModule = async ({ type }: Options): Promise<Module> => {\n const configFile = await readBaseTemplateFile('.github/renovate.json5');\n\n return {\n ...deleteFiles(...OTHER_CONFIG_FILENAMES),\n\n '.github/renovate.json5': (_inputFile, _files, initialFiles) => {\n // allow migration from other Renovate config files\n const inputFile = getFirstDefined(initialFiles, [\n '.github/renovate.json5',\n ...OTHER_CONFIG_FILENAMES,\n ]);\n\n // allow customised Renovate configs that extend a SEEK configuration\n return inputFile?.includes('seek')\n ? formatPrettier(inputFile, { parser: 'json5' })\n : configFile;\n },\n\n /**\n * Ensure Renovate correctly detects the project as an application/library.\n *\n * @see {@link https://docs.renovatebot.com/configuration-options/#rangestrategy }\n * @see {@link https://github.com/renovatebot/renovate/blob/8c361082842bb157d85ca39ecf4f6075730e74bb/lib/manager/npm/extract/type.ts#L3 }\n */\n 'package.json': withPackage(({ private: _, renovate, ...data }) => ({\n ...data,\n private: type !== 'package',\n })),\n };\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqC;AACrC,yBAA4B;AAC5B,qBAA4B;AAC5B,sBAA+B;AAC/B,oBAAgC;AAGhC,MAAM,yBAAyB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA,GAAG;AACL;AAEO,MAAM,iBAAiB,OAAO,EAAE,KAAK,MAAgC;AAC1E,QAAM,aAAa,UAAM,sCAAqB,wBAAwB;AAEtE,SAAO;AAAA,IACL,OAAG,gCAAY,GAAG,sBAAsB;AAAA,IAExC,0BAA0B,CAAC,YAAY,QAAQ,iBAAiB;AAE9D,YAAM,gBAAY,+BAAgB,cAAc;AAAA,QAC9C;AAAA,QACA,GAAG;AAAA,MACL,CAAC;AAGD,aAAO,WAAW,SAAS,MAAM,QAC7B,gCAAe,WAAW,EAAE,QAAQ,QAAQ,CAAC,IAC7C;AAAA,IACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,oBAAgB,4BAAY,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,KAAK,OAAO;AAAA,MAClE,GAAG;AAAA,MACH,SAAS,SAAS;AAAA,IACpB,EAAE;AAAA,EACJ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module, Options } from '../types';
|
|
1
|
+
import type { Module, Options } from '../types.js';
|
|
2
2
|
export declare const serverlessModule: ({}: Options) => Module;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/serverless.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Module, Options } from '../types';\n\nexport const serverlessModule = ({}: Options): Module => ({\n '**/serverless*.yml': (inputFile, _files, _initialFiles) => {\n if (!inputFile) {\n // Only configure files that exist.\n return;\n }\n\n return (\n inputFile\n // Rewire packaging patterns.\n .replace(/- (\\.?\\/)?dist\\//g, '- lib/')\n // Rewire handler paths.\n .replace(/handler: (\\.?\\/)?dist\\//g, 'handler: lib/')\n );\n },\n});\n"],
|
|
4
|
+
"sourcesContent": ["import type { Module, Options } from '../types.js';\n\nexport const serverlessModule = ({}: Options): Module => ({\n '**/serverless*.yml': (inputFile, _files, _initialFiles) => {\n if (!inputFile) {\n // Only configure files that exist.\n return;\n }\n\n return (\n inputFile\n // Rewire packaging patterns.\n .replace(/- (\\.?\\/)?dist\\//g, '- lib/')\n // Rewire handler paths.\n .replace(/handler: (\\.?\\/)?dist\\//g, 'handler: lib/')\n );\n },\n});\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,mBAAmB,CAAC,CAAC,OAAwB;AAAA,EACxD,sBAAsB,CAAC,WAAW,QAAQ,kBAAkB;AAC1D,QAAI,CAAC,WAAW;AAEd;AAAA,IACF;AAEA,WACE,UAEG,QAAQ,qBAAqB,QAAQ,EAErC,QAAQ,4BAA4B,eAAe;AAAA,EAE1D;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module, Options } from '../types';
|
|
1
|
+
import type { Module, Options } from '../types.js';
|
|
2
2
|
export declare const skubaDiveModule: ({ entryPoint, type }: Options) => Module;
|
|
@@ -32,10 +32,10 @@ __export(skubaDive_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(skubaDive_exports);
|
|
34
34
|
var import_path = __toESM(require("path"));
|
|
35
|
-
var import_skubaDive = require("../dependencies/skubaDive");
|
|
36
|
-
var import_javascript = require("../processing/javascript");
|
|
37
|
-
var import_loadFiles = require("../processing/loadFiles");
|
|
38
|
-
var import_package = require("../processing/package");
|
|
35
|
+
var import_skubaDive = require("../dependencies/skubaDive.js");
|
|
36
|
+
var import_javascript = require("../processing/javascript.js");
|
|
37
|
+
var import_loadFiles = require("../processing/loadFiles.js");
|
|
38
|
+
var import_package = require("../processing/package.js");
|
|
39
39
|
const DEFAULT_FILENAME = "src/register.ts";
|
|
40
40
|
const skubaDiveModule = ({ entryPoint, type }) => {
|
|
41
41
|
if (type === "package") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/skubaDive.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\n\nimport { SKUBA_DIVE_HOOKS } from '../dependencies/skubaDive';\nimport { prependImport, stripImports } from '../processing/javascript';\nimport { loadFiles } from '../processing/loadFiles';\nimport { parsePackage } from '../processing/package';\nimport type { Module, Options } from '../types';\n\nconst DEFAULT_FILENAME = 'src/register.ts';\n\nexport const skubaDiveModule = ({ entryPoint, type }: Options): Module => {\n // skuba-dive is a runtime component; it's not appropriate for packages\n if (type === 'package') {\n return {};\n }\n\n return {\n ...loadFiles(DEFAULT_FILENAME, 'package.json'),\n\n [entryPoint]: (inputFile, files) => {\n const packageJson = parsePackage(files['package.json']);\n\n const registerFile = files[DEFAULT_FILENAME];\n\n if (\n !packageJson?.dependencies?.['skuba-dive'] ||\n inputFile === undefined ||\n inputFile.includes('skuba-dive/register') ||\n registerFile?.includes('skuba-dive/register')\n ) {\n return inputFile;\n }\n\n const outputFile = stripImports(SKUBA_DIVE_HOOKS, inputFile);\n\n const relativeToSrc = path.posix.relative(\n path.join(entryPoint, '..'),\n 'src',\n );\n\n // import skuba-dive directly from the entry point\n if (relativeToSrc === '') {\n return prependImport('skuba-dive/register', outputFile);\n }\n\n // import skuba-dive via src/register.ts\n files[DEFAULT_FILENAME] = prependImport(\n 'skuba-dive/register',\n registerFile,\n );\n\n return prependImport(`${relativeToSrc}/register`, outputFile);\n },\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import path from 'path';\n\nimport { SKUBA_DIVE_HOOKS } from '../dependencies/skubaDive.js';\nimport { prependImport, stripImports } from '../processing/javascript.js';\nimport { loadFiles } from '../processing/loadFiles.js';\nimport { parsePackage } from '../processing/package.js';\nimport type { Module, Options } from '../types.js';\n\nconst DEFAULT_FILENAME = 'src/register.ts';\n\nexport const skubaDiveModule = ({ entryPoint, type }: Options): Module => {\n // skuba-dive is a runtime component; it's not appropriate for packages\n if (type === 'package') {\n return {};\n }\n\n return {\n ...loadFiles(DEFAULT_FILENAME, 'package.json'),\n\n [entryPoint]: (inputFile, files) => {\n const packageJson = parsePackage(files['package.json']);\n\n const registerFile = files[DEFAULT_FILENAME];\n\n if (\n !packageJson?.dependencies?.['skuba-dive'] ||\n inputFile === undefined ||\n inputFile.includes('skuba-dive/register') ||\n registerFile?.includes('skuba-dive/register')\n ) {\n return inputFile;\n }\n\n const outputFile = stripImports(SKUBA_DIVE_HOOKS, inputFile);\n\n const relativeToSrc = path.posix.relative(\n path.join(entryPoint, '..'),\n 'src',\n );\n\n // import skuba-dive directly from the entry point\n if (relativeToSrc === '') {\n return prependImport('skuba-dive/register', outputFile);\n }\n\n // import skuba-dive via src/register.ts\n files[DEFAULT_FILENAME] = prependImport(\n 'skuba-dive/register',\n registerFile,\n );\n\n return prependImport(`${relativeToSrc}/register`, outputFile);\n },\n };\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,uBAAiC;AACjC,wBAA4C;AAC5C,uBAA0B;AAC1B,qBAA6B;AAG7B,MAAM,mBAAmB;AAElB,MAAM,kBAAkB,CAAC,EAAE,YAAY,KAAK,MAAuB;AAExE,MAAI,SAAS,WAAW;AACtB,WAAO,CAAC;AAAA,EACV;AAEA,SAAO;AAAA,IACL,OAAG,4BAAU,kBAAkB,cAAc;AAAA,IAE7C,CAAC,UAAU,GAAG,CAAC,WAAW,UAAU;AAClC,YAAM,kBAAc,6BAAa,MAAM,cAAc,CAAC;AAEtD,YAAM,eAAe,MAAM,gBAAgB;AAE3C,UACE,CAAC,aAAa,eAAe,YAAY,KACzC,cAAc,UACd,UAAU,SAAS,qBAAqB,KACxC,cAAc,SAAS,qBAAqB,GAC5C;AACA,eAAO;AAAA,MACT;AAEA,YAAM,iBAAa,gCAAa,mCAAkB,SAAS;AAE3D,YAAM,gBAAgB,YAAAA,QAAK,MAAM;AAAA,QAC/B,YAAAA,QAAK,KAAK,YAAY,IAAI;AAAA,QAC1B;AAAA,MACF;AAGA,UAAI,kBAAkB,IAAI;AACxB,mBAAO,iCAAc,uBAAuB,UAAU;AAAA,MACxD;AAGA,YAAM,gBAAgB,QAAI;AAAA,QACxB;AAAA,QACA;AAAA,MACF;AAEA,iBAAO,iCAAc,GAAG,aAAa,aAAa,UAAU;AAAA,IAC9D;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["path"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module } from '../types';
|
|
1
|
+
import type { Module } from '../types.js';
|
|
2
2
|
export declare const tslintModule: () => Module;
|
|
@@ -21,7 +21,7 @@ __export(tslint_exports, {
|
|
|
21
21
|
tslintModule: () => tslintModule
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(tslint_exports);
|
|
24
|
-
var import_deleteFiles = require("../processing/deleteFiles");
|
|
24
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
25
25
|
const tslintModule = () => (0, import_deleteFiles.deleteFiles)("tslint.json", "tslint.yaml");
|
|
26
26
|
// Annotate the CommonJS export names for ESM import in node:
|
|
27
27
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/tslint.ts"],
|
|
4
|
-
"sourcesContent": ["import { deleteFiles } from '../processing/deleteFiles';\nimport type { Module } from '../types';\n\nexport const tslintModule = (): Module =>\n deleteFiles('tslint.json', 'tslint.yaml');\n"],
|
|
4
|
+
"sourcesContent": ["import { deleteFiles } from '../processing/deleteFiles.js';\nimport type { Module } from '../types.js';\n\nexport const tslintModule = (): Module =>\n deleteFiles('tslint.json', 'tslint.yaml');\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAGrB,MAAM,eAAe,UAC1B,gCAAY,eAAe,aAAa;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/deleteFiles.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Module } from '../types';\n\n/**\n * Load files into cache and schedule them for deletion.\n */\nexport const deleteFiles = (...filenames: string[]): Module =>\n Object.fromEntries(\n filenames.map((filename) => [filename, () => undefined] as const),\n );\n"],
|
|
4
|
+
"sourcesContent": ["import type { Module } from '../types.js';\n\n/**\n * Load files into cache and schedule them for deletion.\n */\nexport const deleteFiles = (...filenames: string[]): Module =>\n Object.fromEntries(\n filenames.map((filename) => [filename, () => undefined] as const),\n );\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,MAAM,cAAc,IAAI,cAC7B,OAAO;AAAA,EACL,UAAU,IAAI,CAAC,aAAa,CAAC,UAAU,MAAM,MAAS,CAAU;AAClE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,8 +22,8 @@ __export(json_exports, {
|
|
|
22
22
|
parseObject: () => parseObject
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(json_exports);
|
|
25
|
-
var import_validation = require("../../../utils/validation");
|
|
26
|
-
var import_prettier = require("./prettier");
|
|
25
|
+
var import_validation = require("../../../utils/validation.js");
|
|
26
|
+
var import_prettier = require("./prettier.js");
|
|
27
27
|
const formatObject = (data, filepath) => {
|
|
28
28
|
const sortedData = Object.fromEntries(
|
|
29
29
|
Object.entries(data).sort(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/json.ts"],
|
|
4
|
-
"sourcesContent": ["import { isObject } from '../../../utils/validation';\n\nimport { formatPrettier } from './prettier';\n\nexport const formatObject = (\n data: Record<Exclude<PropertyKey, symbol>, unknown>,\n filepath?: string,\n) => {\n const sortedData = Object.fromEntries(\n Object.entries(data).sort(([keyA], [keyB]) =>\n String(keyA).localeCompare(String(keyB)),\n ),\n );\n\n const output = JSON.stringify(sortedData, null, 2);\n\n return formatPrettier(\n output,\n filepath === undefined ? { parser: 'json' } : { filepath },\n );\n};\n\nexport const parseObject = (\n input: string | undefined,\n): Record<Exclude<PropertyKey, symbol>, unknown> | undefined => {\n if (input === undefined) {\n return;\n }\n\n try {\n const data = JSON.parse(input) as unknown;\n\n if (isObject(data)) {\n return data;\n }\n } catch {}\n\n return;\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { isObject } from '../../../utils/validation.js';\n\nimport { formatPrettier } from './prettier.js';\n\nexport const formatObject = (\n data: Record<Exclude<PropertyKey, symbol>, unknown>,\n filepath?: string,\n) => {\n const sortedData = Object.fromEntries(\n Object.entries(data).sort(([keyA], [keyB]) =>\n String(keyA).localeCompare(String(keyB)),\n ),\n );\n\n const output = JSON.stringify(sortedData, null, 2);\n\n return formatPrettier(\n output,\n filepath === undefined ? { parser: 'json' } : { filepath },\n );\n};\n\nexport const parseObject = (\n input: string | undefined,\n): Record<Exclude<PropertyKey, symbol>, unknown> | undefined => {\n if (input === undefined) {\n return;\n }\n\n try {\n const data = JSON.parse(input) as unknown;\n\n if (isObject(data)) {\n return data;\n }\n } catch {}\n\n return;\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAyB;AAEzB,sBAA+B;AAExB,MAAM,eAAe,CAC1B,MACA,aACG;AACH,QAAM,aAAa,OAAO;AAAA,IACxB,OAAO,QAAQ,IAAI,EAAE;AAAA,MAAK,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,MACtC,OAAO,IAAI,EAAE,cAAc,OAAO,IAAI,CAAC;AAAA,IACzC;AAAA,EACF;AAEA,QAAM,SAAS,KAAK,UAAU,YAAY,MAAM,CAAC;AAEjD,aAAO;AAAA,IACL;AAAA,IACA,aAAa,SAAY,EAAE,QAAQ,OAAO,IAAI,EAAE,SAAS;AAAA,EAC3D;AACF;AAEO,MAAM,cAAc,CACzB,UAC8D;AAC9D,MAAI,UAAU,QAAW;AACvB;AAAA,EACF;AAEA,MAAI;AACF,UAAM,OAAO,KAAK,MAAM,KAAK;AAE7B,YAAI,4BAAS,IAAI,GAAG;AAClB,aAAO;AAAA,IACT;AAAA,EACF,QAAQ;AAAA,EAAC;AAET;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/loadFiles.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Module } from '../types';\n\n/**\n * Load files into cache to perform side effects in another module.\n */\nexport const loadFiles = (...filenames: string[]): Module =>\n Object.fromEntries(\n filenames.map((filename) => [filename, (file?: string) => file] as const),\n );\n"],
|
|
4
|
+
"sourcesContent": ["import type { Module } from '../types.js';\n\n/**\n * Load files into cache to perform side effects in another module.\n */\nexport const loadFiles = (...filenames: string[]): Module =>\n Object.fromEntries(\n filenames.map((filename) => [filename, (file?: string) => file] as const),\n );\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,MAAM,YAAY,IAAI,cAC3B,OAAO;AAAA,EACL,UAAU,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,SAAkB,IAAI,CAAU;AAC1E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -21,7 +21,7 @@ __export(module_exports, {
|
|
|
21
21
|
replacePackageReferences: () => replacePackageReferences
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(module_exports);
|
|
24
|
-
var import_copy = require("../../../utils/copy");
|
|
24
|
+
var import_copy = require("../../../utils/copy.js");
|
|
25
25
|
const replacePackageReferences = (props) => (0, import_copy.createStringReplacer)([
|
|
26
26
|
{
|
|
27
27
|
input: new RegExp(`(['"])${props.old.packageName}(['"/])`, "g"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/module.ts"],
|
|
4
|
-
"sourcesContent": ["import { createStringReplacer } from '../../../utils/copy';\n\nexport const replacePackageReferences = (props: {\n old: {\n packageName: string;\n repoSlug: string;\n };\n new: {\n packageName: string;\n repoSlug: string;\n };\n}) =>\n createStringReplacer([\n {\n input: new RegExp(`(['\"])${props.old.packageName}(['\"/])`, 'g'),\n output: `$1${props.new.packageName}$2`,\n },\n {\n input: new RegExp(props.old.repoSlug, 'ig'),\n output: props.new.repoSlug,\n },\n ]);\n"],
|
|
4
|
+
"sourcesContent": ["import { createStringReplacer } from '../../../utils/copy.js';\n\nexport const replacePackageReferences = (props: {\n old: {\n packageName: string;\n repoSlug: string;\n };\n new: {\n packageName: string;\n repoSlug: string;\n };\n}) =>\n createStringReplacer([\n {\n input: new RegExp(`(['\"])${props.old.packageName}(['\"/])`, 'g'),\n output: `$1${props.new.packageName}$2`,\n },\n {\n input: new RegExp(props.old.repoSlug, 'ig'),\n output: props.new.repoSlug,\n },\n ]);\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqC;AAE9B,MAAM,2BAA2B,CAAC,cAUvC,kCAAqB;AAAA,EACnB;AAAA,IACE,OAAO,IAAI,OAAO,SAAS,MAAM,IAAI,WAAW,WAAW,GAAG;AAAA,IAC9D,QAAQ,KAAK,MAAM,IAAI,WAAW;AAAA,EACpC;AAAA,EACA;AAAA,IACE,OAAO,IAAI,OAAO,MAAM,IAAI,UAAU,IAAI;AAAA,IAC1C,QAAQ,MAAM,IAAI;AAAA,EACpB;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PackageJson } from '../types';
|
|
1
|
+
import type { PackageJson } from '../types.js';
|
|
2
2
|
export declare const formatPackage: (rawData: PackageJson) => Promise<string>;
|
|
3
3
|
export declare const parsePackage: (input: string | undefined) => PackageJson | undefined;
|
|
4
4
|
export declare const createDependencyFilter: (names: readonly string[], type: "dependencies" | "devDependencies") => (data: PackageJson) => {
|
|
@@ -35,8 +35,8 @@ __export(package_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(package_exports);
|
|
37
37
|
var import_normalize_package_data = __toESM(require("normalize-package-data"));
|
|
38
|
-
var import_json = require("./json");
|
|
39
|
-
var import_prettier = require("./prettier");
|
|
38
|
+
var import_json = require("./json.js");
|
|
39
|
+
var import_prettier = require("./prettier.js");
|
|
40
40
|
const formatPackage = async (rawData) => {
|
|
41
41
|
(0, import_normalize_package_data.default)(rawData);
|
|
42
42
|
delete rawData._id;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/package.ts"],
|
|
4
|
-
"sourcesContent": ["import normalizeData from 'normalize-package-data';\n\nimport type { PackageJson } from '../types';\n\nimport { parseObject } from './json';\nimport { formatPrettier } from './prettier';\n\nexport const formatPackage = async (rawData: PackageJson) => {\n normalizeData(rawData);\n\n // normalize-package-data fields that aren't useful for applications\n\n delete rawData._id;\n\n if (rawData.name === '') {\n delete rawData.name;\n }\n\n if (rawData.readme === 'ERROR: No README data found!') {\n delete rawData.readme;\n }\n\n if (rawData.version === '') {\n delete rawData.version;\n }\n\n return formatPrettier(JSON.stringify(rawData), {\n filepath: 'package.json',\n });\n};\n\nexport const parsePackage = (\n input: string | undefined,\n): PackageJson | undefined => {\n const data = parseObject(input);\n\n if (data === undefined) {\n return;\n }\n\n normalizeData(data);\n\n return data;\n};\n\nexport const createDependencyFilter = (\n names: readonly string[],\n type: 'dependencies' | 'devDependencies',\n) => {\n const set = new Set(names);\n\n return (data: PackageJson) => ({\n ...data,\n [type]: Object.fromEntries(\n Object.entries(data[type] ?? {}).filter(([name]) => !set.has(name)),\n ),\n });\n};\n\nexport const withPackage =\n (fn: (data: PackageJson) => PackageJson) => (input: string | undefined) => {\n const inputObject = parsePackage(input);\n\n const outputObject = fn(inputObject ?? {});\n\n return formatPackage(outputObject);\n };\n"],
|
|
4
|
+
"sourcesContent": ["import normalizeData from 'normalize-package-data';\n\nimport type { PackageJson } from '../types.js';\n\nimport { parseObject } from './json.js';\nimport { formatPrettier } from './prettier.js';\n\nexport const formatPackage = async (rawData: PackageJson) => {\n normalizeData(rawData);\n\n // normalize-package-data fields that aren't useful for applications\n\n delete rawData._id;\n\n if (rawData.name === '') {\n delete rawData.name;\n }\n\n if (rawData.readme === 'ERROR: No README data found!') {\n delete rawData.readme;\n }\n\n if (rawData.version === '') {\n delete rawData.version;\n }\n\n return formatPrettier(JSON.stringify(rawData), {\n filepath: 'package.json',\n });\n};\n\nexport const parsePackage = (\n input: string | undefined,\n): PackageJson | undefined => {\n const data = parseObject(input);\n\n if (data === undefined) {\n return;\n }\n\n normalizeData(data);\n\n return data;\n};\n\nexport const createDependencyFilter = (\n names: readonly string[],\n type: 'dependencies' | 'devDependencies',\n) => {\n const set = new Set(names);\n\n return (data: PackageJson) => ({\n ...data,\n [type]: Object.fromEntries(\n Object.entries(data[type] ?? {}).filter(([name]) => !set.has(name)),\n ),\n });\n};\n\nexport const withPackage =\n (fn: (data: PackageJson) => PackageJson) => (input: string | undefined) => {\n const inputObject = parsePackage(input);\n\n const outputObject = fn(inputObject ?? {});\n\n return formatPackage(outputObject);\n };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oCAA0B;AAI1B,kBAA4B;AAC5B,sBAA+B;AAExB,MAAM,gBAAgB,OAAO,YAAyB;AAC3D,oCAAAA,SAAc,OAAO;AAIrB,SAAO,QAAQ;AAEf,MAAI,QAAQ,SAAS,IAAI;AACvB,WAAO,QAAQ;AAAA,EACjB;AAEA,MAAI,QAAQ,WAAW,gCAAgC;AACrD,WAAO,QAAQ;AAAA,EACjB;AAEA,MAAI,QAAQ,YAAY,IAAI;AAC1B,WAAO,QAAQ;AAAA,EACjB;AAEA,aAAO,gCAAe,KAAK,UAAU,OAAO,GAAG;AAAA,IAC7C,UAAU;AAAA,EACZ,CAAC;AACH;AAEO,MAAM,eAAe,CAC1B,UAC4B;AAC5B,QAAM,WAAO,yBAAY,KAAK;AAE9B,MAAI,SAAS,QAAW;AACtB;AAAA,EACF;AAEA,oCAAAA,SAAc,IAAI;AAElB,SAAO;AACT;AAEO,MAAM,yBAAyB,CACpC,OACA,SACG;AACH,QAAM,MAAM,IAAI,IAAI,KAAK;AAEzB,SAAO,CAAC,UAAuB;AAAA,IAC7B,GAAG;AAAA,IACH,CAAC,IAAI,GAAG,OAAO;AAAA,MACb,OAAO,QAAQ,KAAK,IAAI,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC;AAAA,IACpE;AAAA,EACF;AACF;AAEO,MAAM,cACX,CAAC,OAA2C,CAAC,UAA8B;AACzE,QAAM,cAAc,aAAa,KAAK;AAEtC,QAAM,eAAe,GAAG,eAAe,CAAC,CAAC;AAEzC,SAAO,cAAc,YAAY;AACnC;",
|
|
6
6
|
"names": ["normalizeData"]
|
|
7
7
|
}
|
|
@@ -31,7 +31,7 @@ __export(prettier_exports, {
|
|
|
31
31
|
formatPrettier: () => formatPrettier
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(prettier_exports);
|
|
34
|
-
var import_prettier = __toESM(require("../../../../config/prettier"));
|
|
34
|
+
var import_prettier = __toESM(require("../../../../config/prettier.js"));
|
|
35
35
|
const formatPrettier = async (source, options) => {
|
|
36
36
|
const prettier = await import("prettier");
|
|
37
37
|
return prettier.format(source, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/prettier.ts"],
|
|
4
|
-
"sourcesContent": ["import type prettier from 'prettier';\n\nimport prettierConfig from '../../../../config/prettier';\n\ntype Options = Pick<prettier.Options, 'filepath' | 'parser'>;\n\nexport const formatPrettier = async (source: string, options: Options) => {\n const prettier = await import('prettier');\n return prettier.format(source, {\n ...options,\n ...prettierConfig,\n });\n};\n"],
|
|
4
|
+
"sourcesContent": ["import type prettier from 'prettier';\n\nimport prettierConfig from '../../../../config/prettier.js';\n\ntype Options = Pick<prettier.Options, 'filepath' | 'parser'>;\n\nexport const formatPrettier = async (source: string, options: Options) => {\n const prettier = await import('prettier');\n return prettier.format(source, {\n ...options,\n ...prettierConfig,\n });\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,sBAA2B;AAIpB,MAAM,iBAAiB,OAAO,QAAgB,YAAqB;AACxE,QAAM,WAAW,MAAM,OAAO,UAAU;AACxC,SAAO,SAAS,OAAO,QAAQ;AAAA,IAC7B,GAAG;AAAA,IACH,GAAG,gBAAAA;AAAA,EACL,CAAC;AACH;",
|
|
6
6
|
"names": ["prettierConfig"]
|
|
7
7
|
}
|
|
@@ -35,7 +35,7 @@ __export(typescript_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(typescript_exports);
|
|
37
37
|
var import_typescript = __toESM(require("typescript"));
|
|
38
|
-
var import_prettier = require("./prettier");
|
|
38
|
+
var import_prettier = require("./prettier.js");
|
|
39
39
|
const BLANK_LINE_PLACEHOLDER = " __BLANK_LINE_PLACEHOLDER__";
|
|
40
40
|
const BLANK_LINE_REGEXP = new RegExp(`//${BLANK_LINE_PLACEHOLDER}`, "g");
|
|
41
41
|
const withLeadingBlankLinePlaceholder = (node) => import_typescript.default.addSyntheticLeadingComment(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/typescript.ts"],
|
|
4
|
-
"sourcesContent": ["import ts from 'typescript';\n\nimport { formatPrettier } from './prettier';\n\ntype Props = ts.NodeArray<ts.ObjectLiteralElementLike>;\n\ntype Transformer<T> = (context: ts.TransformationContext | null, props: T) => T;\n\nconst BLANK_LINE_PLACEHOLDER = ' __BLANK_LINE_PLACEHOLDER__';\nconst BLANK_LINE_REGEXP = new RegExp(`//${BLANK_LINE_PLACEHOLDER}`, 'g');\n\n/**\n * Append a placeholder comment to the start of a node.\n *\n * Blank lines can be annotated and preserved through the TypeScript printer\n * when this is paired with a dodgy `String.prototype.replace` post-processor.\n */\nconst withLeadingBlankLinePlaceholder = <T extends ts.Node>(node: T) =>\n ts.addSyntheticLeadingComment(\n node,\n ts.SyntaxKind.SingleLineCommentTrivia,\n BLANK_LINE_PLACEHOLDER,\n true,\n );\n\n/**\n * Create the following expression:\n *\n * ```javascript\n * export default {};\n * ```\n */\nconst createExportDefaultObjectLiteralExpression = (\n factory: ts.NodeFactory,\n props: Props,\n callExpression?: ts.Expression,\n): ts.ExportAssignment =>\n factory.createExportAssignment(\n undefined,\n undefined,\n callExpression === undefined\n ? factory.createObjectLiteralExpression(props, true)\n : factory.createCallExpression(callExpression, undefined, [\n factory.createObjectLiteralExpression(props, true),\n ]),\n );\n\nconst createImportFromExpression = (\n factory: ts.NodeFactory,\n moduleName: string,\n importNames: string | string[],\n) => {\n const importClause =\n typeof importNames === 'string'\n ? factory.createImportClause(\n false,\n factory.createIdentifier(importNames),\n undefined,\n )\n : factory.createImportClause(\n false,\n undefined,\n factory.createNamedImports(\n importNames.map((importName) =>\n factory.createImportSpecifier(\n false,\n undefined,\n factory.createIdentifier(importName),\n ),\n ),\n ),\n );\n\n return factory.createImportDeclaration(\n undefined,\n importClause,\n factory.createStringLiteral(moduleName),\n );\n};\n\nconst getPropName = (prop: ts.ObjectLiteralElementLike) =>\n ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)\n ? prop.name.escapedText.toString()\n : undefined;\n\nconst expressionAsDefaultExport = (\n context: ts.TransformationContext,\n transformProps: Transformer<Props>,\n expression: ts.Expression,\n): ts.ExportAssignment | null =>\n withLeadingBlankLinePlaceholder(\n (() => {\n // {}\n if (ts.isObjectLiteralExpression(expression)) {\n const props = transformProps(context, expression.properties);\n\n return createExportDefaultObjectLiteralExpression(\n context.factory,\n props,\n );\n }\n\n // fn({})\n if (\n ts.isCallExpression(expression) &&\n expression.arguments.length === 1 &&\n expression.arguments[0]\n ) {\n const [firstArgument] = expression.arguments;\n\n if (ts.isObjectLiteralExpression(firstArgument)) {\n const props = transformProps(context, firstArgument.properties);\n\n return createExportDefaultObjectLiteralExpression(\n context.factory,\n props,\n expression.expression,\n );\n }\n }\n\n // Anything else\n return context.factory.createExportAssignment(\n undefined,\n undefined,\n expression,\n );\n })(),\n );\n\n/**\n * Mutate `const x = require('')` into `import x from ''`:\n *\n * ```javascript\n * const x = require('');\n *\n * const { x } = require('');\n * ```\n *\n * There's no recursion needed here as we expect the import statement to be a\n * top-level node and therefore an immediate child of the source file.\n */\nconst requireImportsTransformer: ts.TransformerFactory<ts.Node> =\n (context) => (rootNode) =>\n ts.visitEachChild(\n rootNode,\n (node) => {\n let declaration, moduleName;\n\n if (\n ts.isVariableStatement(node) &&\n node.declarationList.declarations.length === 1 &&\n node.declarationList.declarations[0] &&\n ts.isVariableDeclaration(\n (declaration = node.declarationList.declarations[0]),\n ) &&\n declaration.initializer &&\n ts.isCallExpression(declaration.initializer) &&\n declaration.initializer.arguments.length === 1 &&\n declaration.initializer.arguments[0] &&\n ts.isStringLiteral(\n (moduleName = declaration.initializer.arguments[0]),\n ) &&\n ts.isIdentifier(declaration.initializer.expression) &&\n declaration.initializer.expression.text === 'require'\n ) {\n // const x\n if (ts.isIdentifier(declaration.name)) {\n return createImportFromExpression(\n context.factory,\n moduleName.text,\n declaration.name.text,\n );\n }\n\n // const { x }\n if (ts.isObjectBindingPattern(declaration.name)) {\n return createImportFromExpression(\n context.factory,\n moduleName.text,\n declaration.name.elements.flatMap((element) =>\n ts.isIdentifier(element.name) ? [element.name.text] : [],\n ),\n );\n }\n }\n\n return node;\n },\n context,\n );\n\n/**\n * Create a transformer to mutate `module.exports` and `export default`:\n *\n * ```javascript\n * export default {};\n *\n * module.exports = {};\n * ```\n *\n * If the export is a call expression with a single argument, it will try to\n * transform the props of that argument.\n *\n * ```javascript\n * module.exports = fn({});\n * ```\n *\n * There's no recursion needed here as we expect the export statement to be a\n * top-level node and therefore an immediate child of the source file.\n */\nconst createModuleExportsTransformer =\n (transformProps: Transformer<Props>): ts.TransformerFactory<ts.Node> =>\n (context) =>\n (rootNode) =>\n ts.visitEachChild(\n rootNode,\n (node) => {\n // module.exports =\n if (\n ts.isExpressionStatement(node) &&\n ts.isBinaryExpression(node.expression) &&\n ts.isPropertyAccessExpression(node.expression.left) &&\n ts.isIdentifier(node.expression.left.expression) &&\n node.expression.left.expression.escapedText.toString() === 'module' &&\n node.expression.left.name.text === 'exports' &&\n node.expression.operatorToken.kind === ts.SyntaxKind.EqualsToken\n ) {\n return (\n expressionAsDefaultExport(\n context,\n transformProps,\n node.expression.right,\n ) ?? node\n );\n }\n\n // export default\n if (ts.isExportAssignment(node)) {\n return (\n expressionAsDefaultExport(\n context,\n transformProps,\n node.expression,\n ) ?? node\n );\n }\n\n return node;\n },\n context,\n );\n\n/**\n * Create a transformer to filter out unspecified props from an object literal.\n */\nexport const createPropFilter =\n (names: string[]): Transformer<Props> =>\n (context, props) => {\n const nameSet = new Set<unknown>(names);\n\n const factory = context?.factory ?? ts.factory;\n\n return factory.createNodeArray(\n props.filter((prop) => nameSet.has(getPropName(prop))),\n );\n };\n\nexport const createPropAppender =\n (appendingProps: Props): Transformer<Props> =>\n (context, props) => {\n const nameSet = new Set<unknown>(\n props.map(getPropName).filter((prop) => typeof prop === 'string'),\n );\n\n const factory = context?.factory ?? ts.factory;\n\n return factory.createNodeArray([\n ...props,\n ...appendingProps.filter((prop) => !nameSet.has(getPropName(prop))),\n ]);\n };\n\n/**\n * Read out `export default` or `module.exports` props from a source file.\n *\n * The props can then be used when transforming another source file.\n */\nexport const readModuleExports = async (\n inputFile: string,\n): Promise<Props | undefined> => {\n let result: Props | undefined;\n\n await transformModuleImportsAndExports(\n inputFile,\n (_, props) => (result = props),\n );\n\n return result;\n};\n\n/**\n * Mutate imports and exports in a source file:\n *\n * - Convert `const x = require('')` into `import x from ''`\n * - Convert `module.exports =` into `export default`\n * - Run a transformer over the exported props\n */\nexport const transformModuleImportsAndExports = async (\n inputFile: string,\n transformProps: Transformer<Props>,\n): Promise<string> => {\n const sourceFile = ts.createSourceFile('', inputFile, ts.ScriptTarget.Latest);\n\n const moduleExportsTransformer =\n createModuleExportsTransformer(transformProps);\n\n const result = ts.transform(sourceFile, [\n requireImportsTransformer,\n moduleExportsTransformer,\n ]);\n\n const [transformedFile] = result.transformed;\n\n if (!transformedFile) {\n throw new Error(\n `Could not get transformed result for ${JSON.stringify(result)}`,\n );\n }\n\n const text = ts\n .createPrinter()\n .printNode(ts.EmitHint.SourceFile, transformedFile, sourceFile)\n .replace(BLANK_LINE_REGEXP, '');\n\n return formatPrettier(text, { parser: 'typescript' });\n};\n"],
|
|
4
|
+
"sourcesContent": ["import ts from 'typescript';\n\nimport { formatPrettier } from './prettier.js';\n\ntype Props = ts.NodeArray<ts.ObjectLiteralElementLike>;\n\ntype Transformer<T> = (context: ts.TransformationContext | null, props: T) => T;\n\nconst BLANK_LINE_PLACEHOLDER = ' __BLANK_LINE_PLACEHOLDER__';\nconst BLANK_LINE_REGEXP = new RegExp(`//${BLANK_LINE_PLACEHOLDER}`, 'g');\n\n/**\n * Append a placeholder comment to the start of a node.\n *\n * Blank lines can be annotated and preserved through the TypeScript printer\n * when this is paired with a dodgy `String.prototype.replace` post-processor.\n */\nconst withLeadingBlankLinePlaceholder = <T extends ts.Node>(node: T) =>\n ts.addSyntheticLeadingComment(\n node,\n ts.SyntaxKind.SingleLineCommentTrivia,\n BLANK_LINE_PLACEHOLDER,\n true,\n );\n\n/**\n * Create the following expression:\n *\n * ```javascript\n * export default {};\n * ```\n */\nconst createExportDefaultObjectLiteralExpression = (\n factory: ts.NodeFactory,\n props: Props,\n callExpression?: ts.Expression,\n): ts.ExportAssignment =>\n factory.createExportAssignment(\n undefined,\n undefined,\n callExpression === undefined\n ? factory.createObjectLiteralExpression(props, true)\n : factory.createCallExpression(callExpression, undefined, [\n factory.createObjectLiteralExpression(props, true),\n ]),\n );\n\nconst createImportFromExpression = (\n factory: ts.NodeFactory,\n moduleName: string,\n importNames: string | string[],\n) => {\n const importClause =\n typeof importNames === 'string'\n ? factory.createImportClause(\n false,\n factory.createIdentifier(importNames),\n undefined,\n )\n : factory.createImportClause(\n false,\n undefined,\n factory.createNamedImports(\n importNames.map((importName) =>\n factory.createImportSpecifier(\n false,\n undefined,\n factory.createIdentifier(importName),\n ),\n ),\n ),\n );\n\n return factory.createImportDeclaration(\n undefined,\n importClause,\n factory.createStringLiteral(moduleName),\n );\n};\n\nconst getPropName = (prop: ts.ObjectLiteralElementLike) =>\n ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)\n ? prop.name.escapedText.toString()\n : undefined;\n\nconst expressionAsDefaultExport = (\n context: ts.TransformationContext,\n transformProps: Transformer<Props>,\n expression: ts.Expression,\n): ts.ExportAssignment | null =>\n withLeadingBlankLinePlaceholder(\n (() => {\n // {}\n if (ts.isObjectLiteralExpression(expression)) {\n const props = transformProps(context, expression.properties);\n\n return createExportDefaultObjectLiteralExpression(\n context.factory,\n props,\n );\n }\n\n // fn({})\n if (\n ts.isCallExpression(expression) &&\n expression.arguments.length === 1 &&\n expression.arguments[0]\n ) {\n const [firstArgument] = expression.arguments;\n\n if (ts.isObjectLiteralExpression(firstArgument)) {\n const props = transformProps(context, firstArgument.properties);\n\n return createExportDefaultObjectLiteralExpression(\n context.factory,\n props,\n expression.expression,\n );\n }\n }\n\n // Anything else\n return context.factory.createExportAssignment(\n undefined,\n undefined,\n expression,\n );\n })(),\n );\n\n/**\n * Mutate `const x = require('')` into `import x from ''`:\n *\n * ```javascript\n * const x = require('');\n *\n * const { x } = require('');\n * ```\n *\n * There's no recursion needed here as we expect the import statement to be a\n * top-level node and therefore an immediate child of the source file.\n */\nconst requireImportsTransformer: ts.TransformerFactory<ts.Node> =\n (context) => (rootNode) =>\n ts.visitEachChild(\n rootNode,\n (node) => {\n let declaration, moduleName;\n\n if (\n ts.isVariableStatement(node) &&\n node.declarationList.declarations.length === 1 &&\n node.declarationList.declarations[0] &&\n ts.isVariableDeclaration(\n (declaration = node.declarationList.declarations[0]),\n ) &&\n declaration.initializer &&\n ts.isCallExpression(declaration.initializer) &&\n declaration.initializer.arguments.length === 1 &&\n declaration.initializer.arguments[0] &&\n ts.isStringLiteral(\n (moduleName = declaration.initializer.arguments[0]),\n ) &&\n ts.isIdentifier(declaration.initializer.expression) &&\n declaration.initializer.expression.text === 'require'\n ) {\n // const x\n if (ts.isIdentifier(declaration.name)) {\n return createImportFromExpression(\n context.factory,\n moduleName.text,\n declaration.name.text,\n );\n }\n\n // const { x }\n if (ts.isObjectBindingPattern(declaration.name)) {\n return createImportFromExpression(\n context.factory,\n moduleName.text,\n declaration.name.elements.flatMap((element) =>\n ts.isIdentifier(element.name) ? [element.name.text] : [],\n ),\n );\n }\n }\n\n return node;\n },\n context,\n );\n\n/**\n * Create a transformer to mutate `module.exports` and `export default`:\n *\n * ```javascript\n * export default {};\n *\n * module.exports = {};\n * ```\n *\n * If the export is a call expression with a single argument, it will try to\n * transform the props of that argument.\n *\n * ```javascript\n * module.exports = fn({});\n * ```\n *\n * There's no recursion needed here as we expect the export statement to be a\n * top-level node and therefore an immediate child of the source file.\n */\nconst createModuleExportsTransformer =\n (transformProps: Transformer<Props>): ts.TransformerFactory<ts.Node> =>\n (context) =>\n (rootNode) =>\n ts.visitEachChild(\n rootNode,\n (node) => {\n // module.exports =\n if (\n ts.isExpressionStatement(node) &&\n ts.isBinaryExpression(node.expression) &&\n ts.isPropertyAccessExpression(node.expression.left) &&\n ts.isIdentifier(node.expression.left.expression) &&\n node.expression.left.expression.escapedText.toString() === 'module' &&\n node.expression.left.name.text === 'exports' &&\n node.expression.operatorToken.kind === ts.SyntaxKind.EqualsToken\n ) {\n return (\n expressionAsDefaultExport(\n context,\n transformProps,\n node.expression.right,\n ) ?? node\n );\n }\n\n // export default\n if (ts.isExportAssignment(node)) {\n return (\n expressionAsDefaultExport(\n context,\n transformProps,\n node.expression,\n ) ?? node\n );\n }\n\n return node;\n },\n context,\n );\n\n/**\n * Create a transformer to filter out unspecified props from an object literal.\n */\nexport const createPropFilter =\n (names: string[]): Transformer<Props> =>\n (context, props) => {\n const nameSet = new Set<unknown>(names);\n\n const factory = context?.factory ?? ts.factory;\n\n return factory.createNodeArray(\n props.filter((prop) => nameSet.has(getPropName(prop))),\n );\n };\n\nexport const createPropAppender =\n (appendingProps: Props): Transformer<Props> =>\n (context, props) => {\n const nameSet = new Set<unknown>(\n props.map(getPropName).filter((prop) => typeof prop === 'string'),\n );\n\n const factory = context?.factory ?? ts.factory;\n\n return factory.createNodeArray([\n ...props,\n ...appendingProps.filter((prop) => !nameSet.has(getPropName(prop))),\n ]);\n };\n\n/**\n * Read out `export default` or `module.exports` props from a source file.\n *\n * The props can then be used when transforming another source file.\n */\nexport const readModuleExports = async (\n inputFile: string,\n): Promise<Props | undefined> => {\n let result: Props | undefined;\n\n await transformModuleImportsAndExports(\n inputFile,\n (_, props) => (result = props),\n );\n\n return result;\n};\n\n/**\n * Mutate imports and exports in a source file:\n *\n * - Convert `const x = require('')` into `import x from ''`\n * - Convert `module.exports =` into `export default`\n * - Run a transformer over the exported props\n */\nexport const transformModuleImportsAndExports = async (\n inputFile: string,\n transformProps: Transformer<Props>,\n): Promise<string> => {\n const sourceFile = ts.createSourceFile('', inputFile, ts.ScriptTarget.Latest);\n\n const moduleExportsTransformer =\n createModuleExportsTransformer(transformProps);\n\n const result = ts.transform(sourceFile, [\n requireImportsTransformer,\n moduleExportsTransformer,\n ]);\n\n const [transformedFile] = result.transformed;\n\n if (!transformedFile) {\n throw new Error(\n `Could not get transformed result for ${JSON.stringify(result)}`,\n );\n }\n\n const text = ts\n .createPrinter()\n .printNode(ts.EmitHint.SourceFile, transformedFile, sourceFile)\n .replace(BLANK_LINE_REGEXP, '');\n\n return formatPrettier(text, { parser: 'typescript' });\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAe;AAEf,sBAA+B;AAM/B,MAAM,yBAAyB;AAC/B,MAAM,oBAAoB,IAAI,OAAO,KAAK,sBAAsB,IAAI,GAAG;AAQvE,MAAM,kCAAkC,CAAoB,SAC1D,kBAAAA,QAAG;AAAA,EACD;AAAA,EACA,kBAAAA,QAAG,WAAW;AAAA,EACd;AAAA,EACA;AACF;AASF,MAAM,6CAA6C,CACjD,SACA,OACA,mBAEA,QAAQ;AAAA,EACN;AAAA,EACA;AAAA,EACA,mBAAmB,SACf,QAAQ,8BAA8B,OAAO,IAAI,IACjD,QAAQ,qBAAqB,gBAAgB,QAAW;AAAA,IACtD,QAAQ,8BAA8B,OAAO,IAAI;AAAA,EACnD,CAAC;AACP;AAEF,MAAM,6BAA6B,CACjC,SACA,YACA,gBACG;AACH,QAAM,eACJ,OAAO,gBAAgB,WACnB,QAAQ;AAAA,IACN;AAAA,IACA,QAAQ,iBAAiB,WAAW;AAAA,IACpC;AAAA,EACF,IACA,QAAQ;AAAA,IACN;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,MACN,YAAY;AAAA,QAAI,CAAC,eACf,QAAQ;AAAA,UACN;AAAA,UACA;AAAA,UACA,QAAQ,iBAAiB,UAAU;AAAA,QACrC;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEN,SAAO,QAAQ;AAAA,IACb;AAAA,IACA;AAAA,IACA,QAAQ,oBAAoB,UAAU;AAAA,EACxC;AACF;AAEA,MAAM,cAAc,CAAC,SACnB,kBAAAA,QAAG,qBAAqB,IAAI,KAAK,kBAAAA,QAAG,aAAa,KAAK,IAAI,IACtD,KAAK,KAAK,YAAY,SAAS,IAC/B;AAEN,MAAM,4BAA4B,CAChC,SACA,gBACA,eAEA;AAAA,GACG,MAAM;AAEL,QAAI,kBAAAA,QAAG,0BAA0B,UAAU,GAAG;AAC5C,YAAM,QAAQ,eAAe,SAAS,WAAW,UAAU;AAE3D,aAAO;AAAA,QACL,QAAQ;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAGA,QACE,kBAAAA,QAAG,iBAAiB,UAAU,KAC9B,WAAW,UAAU,WAAW,KAChC,WAAW,UAAU,CAAC,GACtB;AACA,YAAM,CAAC,aAAa,IAAI,WAAW;AAEnC,UAAI,kBAAAA,QAAG,0BAA0B,aAAa,GAAG;AAC/C,cAAM,QAAQ,eAAe,SAAS,cAAc,UAAU;AAE9D,eAAO;AAAA,UACL,QAAQ;AAAA,UACR;AAAA,UACA,WAAW;AAAA,QACb;AAAA,MACF;AAAA,IACF;AAGA,WAAO,QAAQ,QAAQ;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,GAAG;AACL;AAcF,MAAM,4BACJ,CAAC,YAAY,CAAC,aACZ,kBAAAA,QAAG;AAAA,EACD;AAAA,EACA,CAAC,SAAS;AACR,QAAI,aAAa;AAEjB,QACE,kBAAAA,QAAG,oBAAoB,IAAI,KAC3B,KAAK,gBAAgB,aAAa,WAAW,KAC7C,KAAK,gBAAgB,aAAa,CAAC,KACnC,kBAAAA,QAAG;AAAA,MACA,cAAc,KAAK,gBAAgB,aAAa,CAAC;AAAA,IACpD,KACA,YAAY,eACZ,kBAAAA,QAAG,iBAAiB,YAAY,WAAW,KAC3C,YAAY,YAAY,UAAU,WAAW,KAC7C,YAAY,YAAY,UAAU,CAAC,KACnC,kBAAAA,QAAG;AAAA,MACA,aAAa,YAAY,YAAY,UAAU,CAAC;AAAA,IACnD,KACA,kBAAAA,QAAG,aAAa,YAAY,YAAY,UAAU,KAClD,YAAY,YAAY,WAAW,SAAS,WAC5C;AAEA,UAAI,kBAAAA,QAAG,aAAa,YAAY,IAAI,GAAG;AACrC,eAAO;AAAA,UACL,QAAQ;AAAA,UACR,WAAW;AAAA,UACX,YAAY,KAAK;AAAA,QACnB;AAAA,MACF;AAGA,UAAI,kBAAAA,QAAG,uBAAuB,YAAY,IAAI,GAAG;AAC/C,eAAO;AAAA,UACL,QAAQ;AAAA,UACR,WAAW;AAAA,UACX,YAAY,KAAK,SAAS;AAAA,YAAQ,CAAC,YACjC,kBAAAA,QAAG,aAAa,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,CAAC;AAAA,UACzD;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAAA,EACA;AACF;AAqBJ,MAAM,iCACJ,CAAC,mBACD,CAAC,YACD,CAAC,aACC,kBAAAA,QAAG;AAAA,EACD;AAAA,EACA,CAAC,SAAS;AAER,QACE,kBAAAA,QAAG,sBAAsB,IAAI,KAC7B,kBAAAA,QAAG,mBAAmB,KAAK,UAAU,KACrC,kBAAAA,QAAG,2BAA2B,KAAK,WAAW,IAAI,KAClD,kBAAAA,QAAG,aAAa,KAAK,WAAW,KAAK,UAAU,KAC/C,KAAK,WAAW,KAAK,WAAW,YAAY,SAAS,MAAM,YAC3D,KAAK,WAAW,KAAK,KAAK,SAAS,aACnC,KAAK,WAAW,cAAc,SAAS,kBAAAA,QAAG,WAAW,aACrD;AACA,aACE;AAAA,QACE;AAAA,QACA;AAAA,QACA,KAAK,WAAW;AAAA,MAClB,KAAK;AAAA,IAET;AAGA,QAAI,kBAAAA,QAAG,mBAAmB,IAAI,GAAG;AAC/B,aACE;AAAA,QACE;AAAA,QACA;AAAA,QACA,KAAK;AAAA,MACP,KAAK;AAAA,IAET;AAEA,WAAO;AAAA,EACT;AAAA,EACA;AACF;AAKG,MAAM,mBACX,CAAC,UACD,CAAC,SAAS,UAAU;AAClB,QAAM,UAAU,IAAI,IAAa,KAAK;AAEtC,QAAM,UAAU,SAAS,WAAW,kBAAAA,QAAG;AAEvC,SAAO,QAAQ;AAAA,IACb,MAAM,OAAO,CAAC,SAAS,QAAQ,IAAI,YAAY,IAAI,CAAC,CAAC;AAAA,EACvD;AACF;AAEK,MAAM,qBACX,CAAC,mBACD,CAAC,SAAS,UAAU;AAClB,QAAM,UAAU,IAAI;AAAA,IAClB,MAAM,IAAI,WAAW,EAAE,OAAO,CAAC,SAAS,OAAO,SAAS,QAAQ;AAAA,EAClE;AAEA,QAAM,UAAU,SAAS,WAAW,kBAAAA,QAAG;AAEvC,SAAO,QAAQ,gBAAgB;AAAA,IAC7B,GAAG;AAAA,IACH,GAAG,eAAe,OAAO,CAAC,SAAS,CAAC,QAAQ,IAAI,YAAY,IAAI,CAAC,CAAC;AAAA,EACpE,CAAC;AACH;AAOK,MAAM,oBAAoB,OAC/B,cAC+B;AAC/B,MAAI;AAEJ,QAAM;AAAA,IACJ;AAAA,IACA,CAAC,GAAG,UAAW,SAAS;AAAA,EAC1B;AAEA,SAAO;AACT;AASO,MAAM,mCAAmC,OAC9C,WACA,mBACoB;AACpB,QAAM,aAAa,kBAAAA,QAAG,iBAAiB,IAAI,WAAW,kBAAAA,QAAG,aAAa,MAAM;AAE5E,QAAM,2BACJ,+BAA+B,cAAc;AAE/C,QAAM,SAAS,kBAAAA,QAAG,UAAU,YAAY;AAAA,IACtC;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,CAAC,eAAe,IAAI,OAAO;AAEjC,MAAI,CAAC,iBAAiB;AACpB,UAAM,IAAI;AAAA,MACR,wCAAwC,KAAK,UAAU,MAAM,CAAC;AAAA,IAChE;AAAA,EACF;AAEA,QAAM,OAAO,kBAAAA,QACV,cAAc,EACd,UAAU,kBAAAA,QAAG,SAAS,YAAY,iBAAiB,UAAU,EAC7D,QAAQ,mBAAmB,EAAE;AAEhC,aAAO,gCAAe,MAAM,EAAE,QAAQ,aAAa,CAAC;AACtD;",
|
|
6
6
|
"names": ["ts"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PackageJson as TypeFestPackageJson } from 'type-fest';
|
|
2
|
-
import type { ProjectType } from '../../utils/manifest';
|
|
3
|
-
import type { PackageManagerConfig } from '../../utils/packageManager';
|
|
2
|
+
import type { ProjectType } from '../../utils/manifest.js';
|
|
3
|
+
import type { PackageManagerConfig } from '../../utils/packageManager.js';
|
|
4
4
|
export type { TsConfigJson } from 'type-fest';
|
|
5
5
|
export type PackageJson = TypeFestPackageJson & Record<string, unknown>;
|
|
6
6
|
export interface DependencySet {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/configure/types.ts"],
|
|
4
|
-
"sourcesContent": ["import type { PackageJson as TypeFestPackageJson } from 'type-fest';\n\nimport type { ProjectType } from '../../utils/manifest';\nimport type { PackageManagerConfig } from '../../utils/packageManager';\n\nexport type { TsConfigJson } from 'type-fest';\n\nexport type PackageJson = TypeFestPackageJson & Record<string, unknown>;\n\nexport interface DependencySet {\n dependencies: Record<string, string>;\n devDependencies: Record<string, string>;\n type: ProjectType;\n}\n\nexport type DependencyDiff = Record<\n string,\n { operation: string; version: string }\n>;\n\ntype FileProcessor = (\n file: string | undefined,\n files: Files,\n initialFiles: Readonly<Files>,\n) => Promise<string | undefined> | string | undefined;\n\nexport type FileDiff = Record<\n string,\n { data: string | undefined; operation: string }\n>;\n\nexport type Files = Record<string, string | undefined>;\n\nexport type Module = Record<string, FileProcessor>;\n\nexport interface Options {\n destinationRoot: string;\n entryPoint: string;\n firstRun: boolean;\n packageManager: PackageManagerConfig;\n type: ProjectType;\n}\n"],
|
|
4
|
+
"sourcesContent": ["import type { PackageJson as TypeFestPackageJson } from 'type-fest';\n\nimport type { ProjectType } from '../../utils/manifest.js';\nimport type { PackageManagerConfig } from '../../utils/packageManager.js';\n\nexport type { TsConfigJson } from 'type-fest';\n\nexport type PackageJson = TypeFestPackageJson & Record<string, unknown>;\n\nexport interface DependencySet {\n dependencies: Record<string, string>;\n devDependencies: Record<string, string>;\n type: ProjectType;\n}\n\nexport type DependencyDiff = Record<\n string,\n { operation: string; version: string }\n>;\n\ntype FileProcessor = (\n file: string | undefined,\n files: Files,\n initialFiles: Readonly<Files>,\n) => Promise<string | undefined> | string | undefined;\n\nexport type FileDiff = Record<\n string,\n { data: string | undefined; operation: string }\n>;\n\nexport type Files = Record<string, string | undefined>;\n\nexport type Module = Record<string, FileProcessor>;\n\nexport interface Options {\n destinationRoot: string;\n entryPoint: string;\n firstRun: boolean;\n packageManager: PackageManagerConfig;\n type: ProjectType;\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|