skuba 14.0.0-esmify-skuba-20251031141102 → 14.0.0-esmify-skuba-20251105032119
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/lib/cli/adapter/eslint.js +4 -2
- package/lib/cli/adapter/eslint.js.map +1 -1
- package/lib/cli/adapter/prettier.js +8 -4
- package/lib/cli/adapter/prettier.js.map +1 -1
- package/lib/cli/build/args.js +4 -2
- package/lib/cli/build/args.js.map +1 -1
- package/lib/cli/build/assets.js +6 -3
- package/lib/cli/build/assets.js.map +1 -1
- package/lib/cli/build/esbuild.js +5 -3
- package/lib/cli/build/esbuild.js.map +2 -2
- package/lib/cli/build/index.js +4 -2
- package/lib/cli/build/index.js.map +1 -1
- package/lib/cli/build/tsc.js +10 -5
- package/lib/cli/build/tsc.js.map +1 -1
- package/lib/cli/buildPackage/index.js +4 -2
- package/lib/cli/buildPackage/index.js.map +1 -1
- package/lib/cli/configure/analyseConfiguration.js +4 -2
- package/lib/cli/configure/analyseConfiguration.js.map +1 -1
- package/lib/cli/configure/analyseDependencies.js +4 -2
- package/lib/cli/configure/analyseDependencies.js.map +1 -1
- package/lib/cli/configure/analysis/diff.js +4 -2
- package/lib/cli/configure/analysis/diff.js.map +1 -1
- package/lib/cli/configure/analysis/files.js +4 -2
- package/lib/cli/configure/analysis/files.js.map +1 -1
- package/lib/cli/configure/analysis/git.js +4 -2
- package/lib/cli/configure/analysis/git.js.map +1 -1
- package/lib/cli/configure/analysis/package.js +6 -3
- package/lib/cli/configure/analysis/package.js.map +1 -1
- package/lib/cli/configure/analysis/project.js +6 -3
- package/lib/cli/configure/analysis/project.js.map +1 -1
- package/lib/cli/configure/dependencies/index.js +12 -6
- package/lib/cli/configure/dependencies/index.js.map +1 -1
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +4 -2
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +1 -1
- package/lib/cli/configure/dependencies/seekKoala.js +4 -2
- package/lib/cli/configure/dependencies/seekKoala.js.map +1 -1
- package/lib/cli/configure/dependencies/skuba.js +4 -2
- package/lib/cli/configure/dependencies/skuba.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDeps.js +4 -2
- package/lib/cli/configure/dependencies/skubaDeps.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDive.js +6 -3
- package/lib/cli/configure/dependencies/skubaDive.js.map +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.js +4 -2
- package/lib/cli/configure/ensureTemplateCompletion.js.map +1 -1
- package/lib/cli/configure/getEntryPoint.js +4 -2
- package/lib/cli/configure/getEntryPoint.js.map +1 -1
- package/lib/cli/configure/getProjectType.js +4 -2
- package/lib/cli/configure/getProjectType.js.map +1 -1
- package/lib/cli/configure/index.js +4 -2
- package/lib/cli/configure/index.js.map +1 -1
- package/lib/cli/configure/modules/eslint.js +4 -2
- package/lib/cli/configure/modules/eslint.js.map +1 -1
- package/lib/cli/configure/modules/ignore.js +4 -2
- package/lib/cli/configure/modules/ignore.js.map +1 -1
- package/lib/cli/configure/modules/index.js +4 -2
- package/lib/cli/configure/modules/index.js.map +1 -1
- package/lib/cli/configure/modules/nodemon.js +4 -2
- package/lib/cli/configure/modules/nodemon.js.map +1 -1
- package/lib/cli/configure/modules/package.js +4 -2
- package/lib/cli/configure/modules/package.js.map +1 -1
- package/lib/cli/configure/modules/prettier.js +4 -2
- package/lib/cli/configure/modules/prettier.js.map +1 -1
- package/lib/cli/configure/modules/renovate.js +6 -3
- package/lib/cli/configure/modules/renovate.js.map +1 -1
- package/lib/cli/configure/modules/serverless.js +4 -2
- package/lib/cli/configure/modules/serverless.js.map +1 -1
- package/lib/cli/configure/modules/tslint.js +4 -2
- package/lib/cli/configure/modules/tslint.js.map +1 -1
- package/lib/cli/configure/processing/configFile.js +8 -4
- package/lib/cli/configure/processing/configFile.js.map +1 -1
- package/lib/cli/configure/processing/deleteFiles.js +4 -2
- package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
- package/lib/cli/configure/processing/javascript.js +6 -3
- package/lib/cli/configure/processing/javascript.js.map +1 -1
- package/lib/cli/configure/processing/json.js +6 -3
- package/lib/cli/configure/processing/json.js.map +1 -1
- package/lib/cli/configure/processing/loadFiles.js +4 -2
- package/lib/cli/configure/processing/loadFiles.js.map +1 -1
- package/lib/cli/configure/processing/module.js +4 -2
- package/lib/cli/configure/processing/module.js.map +1 -1
- package/lib/cli/configure/processing/package.js +10 -5
- package/lib/cli/configure/processing/package.js.map +1 -1
- package/lib/cli/configure/processing/prettier.js +4 -2
- package/lib/cli/configure/processing/prettier.js.map +1 -1
- package/lib/cli/configure/processing/record.js +8 -4
- package/lib/cli/configure/processing/record.js.map +1 -1
- package/lib/cli/configure/processing/typescript.js +10 -5
- package/lib/cli/configure/processing/typescript.js.map +1 -1
- package/lib/cli/configure/types.js +0 -1
- package/lib/cli/format/index.js +4 -2
- package/lib/cli/format/index.js.map +1 -1
- package/lib/cli/help/index.js +4 -2
- package/lib/cli/help/index.js.map +1 -1
- package/lib/cli/init/getConfig.js +12 -6
- package/lib/cli/init/getConfig.js.map +1 -1
- package/lib/cli/init/git.js +6 -3
- package/lib/cli/init/git.js.map +1 -1
- package/lib/cli/init/index.js +4 -2
- package/lib/cli/init/index.js.map +1 -1
- package/lib/cli/init/prompts.js +10 -5
- package/lib/cli/init/prompts.js.map +1 -1
- package/lib/cli/init/types.js +4 -2
- package/lib/cli/init/types.js.map +1 -1
- package/lib/cli/init/validation.js +12 -6
- package/lib/cli/init/validation.js.map +1 -1
- package/lib/cli/init/writePackageJson.js +4 -2
- package/lib/cli/init/writePackageJson.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/eslint.js +4 -2
- package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/index.js +4 -2
- package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/internal.js +4 -2
- package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/prettier.js +4 -2
- package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/tsc.js +4 -2
- package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
- package/lib/cli/lint/annotate/github/eslint.js +4 -2
- package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/github/index.js +4 -2
- package/lib/cli/lint/annotate/github/index.js.map +1 -1
- package/lib/cli/lint/annotate/github/internal.js +4 -2
- package/lib/cli/lint/annotate/github/internal.js.map +1 -1
- package/lib/cli/lint/annotate/github/prettier.js +4 -2
- package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/github/tsc.js +4 -2
- package/lib/cli/lint/annotate/github/tsc.js.map +1 -1
- package/lib/cli/lint/annotate/index.js +4 -2
- package/lib/cli/lint/annotate/index.js.map +1 -1
- package/lib/cli/lint/autofix.js +8 -4
- package/lib/cli/lint/autofix.js.map +1 -1
- package/lib/cli/lint/eslint.js +6 -3
- package/lib/cli/lint/eslint.js.map +1 -1
- package/lib/cli/lint/external.js +6 -3
- package/lib/cli/lint/external.js.map +1 -1
- package/lib/cli/lint/index.js +4 -2
- package/lib/cli/lint/index.js.map +1 -1
- package/lib/cli/lint/internal.js +4 -2
- package/lib/cli/lint/internal.js.map +1 -1
- package/lib/cli/lint/internalLints/detectBadCodeowners.js +6 -3
- package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +4 -2
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +1 -1
- package/lib/cli/lint/internalLints/patchRenovateConfig.js +4 -2
- package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +1 -1
- package/lib/cli/lint/internalLints/refreshConfigFiles.js +8 -4
- package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/index.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +4 -2
- 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.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +4 -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.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +6 -3
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js +8 -4
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js +6 -3
- package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +6 -3
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +6 -3
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +6 -3
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js +12 -6
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js +28 -14
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js +6 -3
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js +4 -2
- 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.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +4 -2
- 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.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +4 -2
- 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.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +4 -2
- 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.js +4 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +1 -1
- package/lib/cli/lint/prettier.js +6 -3
- package/lib/cli/lint/prettier.js.map +1 -1
- package/lib/cli/lint/tsc.js +4 -2
- package/lib/cli/lint/tsc.js.map +1 -1
- package/lib/cli/lint/types.js +0 -1
- package/lib/cli/migrate/index.js +4 -2
- package/lib/cli/migrate/index.js.map +1 -1
- package/lib/cli/migrate/nodeVersion/checks.js +10 -5
- package/lib/cli/migrate/nodeVersion/checks.js.map +1 -1
- package/lib/cli/migrate/nodeVersion/index.js +4 -2
- package/lib/cli/migrate/nodeVersion/index.js.map +1 -1
- package/lib/cli/node/index.js +6 -3
- package/lib/cli/node/index.js.map +1 -1
- package/lib/cli/release/index.js +4 -2
- package/lib/cli/release/index.js.map +1 -1
- package/lib/cli/start/index.js +4 -2
- package/lib/cli/start/index.js.map +1 -1
- package/lib/cli/test/index.js +4 -2
- package/lib/cli/test/index.js.map +1 -1
- package/lib/cli/version/index.js +4 -2
- package/lib/cli/version/index.js.map +1 -1
- package/lib/enquirer.d.js +0 -1
- package/lib/eslint.d.js +0 -1
- package/lib/index.js +10 -5
- package/lib/index.js.map +1 -1
- package/lib/skuba.js +0 -1
- package/lib/skuba.js.map +1 -1
- package/lib/utils/args.js +10 -5
- package/lib/utils/args.js.map +1 -1
- package/lib/utils/command.js +12 -6
- package/lib/utils/command.js.map +1 -1
- package/lib/utils/copy.js +10 -5
- package/lib/utils/copy.js.map +1 -1
- package/lib/utils/dir.js +16 -8
- package/lib/utils/dir.js.map +1 -1
- package/lib/utils/env.js +4 -2
- package/lib/utils/env.js.map +1 -1
- package/lib/utils/error.js +10 -5
- package/lib/utils/error.js.map +1 -1
- package/lib/utils/exec.js +12 -6
- package/lib/utils/exec.js.map +1 -1
- package/lib/utils/fs.js +4 -2
- package/lib/utils/fs.js.map +1 -1
- package/lib/utils/help.js +4 -2
- package/lib/utils/help.js.map +1 -1
- package/lib/utils/logging.js +10 -5
- package/lib/utils/logging.js.map +1 -1
- package/lib/utils/logo.js +4 -2
- package/lib/utils/logo.js.map +1 -1
- package/lib/utils/manifest.js +16 -8
- package/lib/utils/manifest.js.map +1 -1
- package/lib/utils/npmrc.js +4 -2
- package/lib/utils/npmrc.js.map +1 -1
- package/lib/utils/packageManager.js +10 -5
- package/lib/utils/packageManager.js.map +1 -1
- package/lib/utils/port.js +6 -3
- package/lib/utils/port.js.map +1 -1
- package/lib/utils/sleep.js +4 -2
- package/lib/utils/sleep.js.map +1 -1
- package/lib/utils/template.js +20 -10
- package/lib/utils/template.js.map +1 -1
- package/lib/utils/validation.js +14 -7
- package/lib/utils/validation.js.map +1 -1
- package/lib/utils/version.js +10 -5
- package/lib/utils/version.js.map +1 -1
- package/lib/utils/wait.js +6 -3
- package/lib/utils/wait.js.map +1 -1
- package/lib/utils/worker.js +6 -3
- package/lib/utils/worker.js.map +1 -1
- package/lib/wrapper/function-arguments.d.js +0 -1
- package/lib/wrapper/functionHandler.js +4 -2
- package/lib/wrapper/functionHandler.js.map +1 -1
- package/lib/wrapper/http.js +6 -3
- package/lib/wrapper/http.js.map +1 -1
- package/lib/wrapper/index.js +0 -1
- package/lib/wrapper/index.js.map +1 -1
- package/lib/wrapper/main.js +4 -2
- package/lib/wrapper/main.js.map +1 -1
- package/lib/wrapper/requestListener.js +4 -2
- package/lib/wrapper/requestListener.js.map +1 -1
- package/lib/wrapper/server.js +4 -2
- package/lib/wrapper/server.js.map +1 -1
- package/package.json +4 -4
- package/template/greeter/package.json +2 -2
- package/template/lambda-sqs-worker-cdk/package.json +2 -2
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/analysis/package.ts"],
|
|
4
4
|
"sourcesContent": ["import { readPackageUp } from 'read-package-up';\n\nimport { log } from '../../../utils/logging.js';\nimport type { DependencyDiff, ReadResult } from '../types.js';\n\nimport { determineOperation } from './diff.js';\n\ninterface GetDestinationManifestProps {\n cwd?: string;\n}\n\nexport const getDestinationManifest = async (\n props?: GetDestinationManifestProps,\n): Promise<ReadResult> => {\n const result = await readPackageUp({ ...props, normalize: false });\n\n if (result === undefined) {\n log.err(\n 'Could not find a',\n log.bold('package.json'),\n 'in your working directory.',\n );\n process.exit(1);\n }\n\n return result;\n};\n\nconst joinVersions = (a: string | undefined, b: string | undefined) =>\n [a, b].filter((v) => v !== undefined).join(' -> ');\n\ninterface DiffDependenciesProps {\n old: Record<string, string | undefined>;\n new: Record<string, string | undefined>;\n}\n\nexport const diffDependencies = (\n props: DiffDependenciesProps,\n): DependencyDiff => {\n const deletionsAndModifications = Object.fromEntries(\n Object.entries(props.old).flatMap(([name, oldVersion]) => {\n if (oldVersion === props.new[name] || oldVersion === undefined) {\n return [];\n }\n\n const newVersion = props.new[name];\n\n const operation = determineOperation(oldVersion, newVersion);\n const version = joinVersions(oldVersion, newVersion);\n\n return [[name, { operation, version }]] as const;\n }),\n );\n\n const additions = Object.fromEntries(\n Object.entries(props.new).flatMap(([name, version]) => {\n if (name in props.old || version === undefined) {\n return [];\n }\n\n const oldVersion = props.old[name];\n\n const operation = determineOperation(oldVersion, version);\n\n return [[name, { operation, version }]] as const;\n }),\n );\n\n return {\n ...deletionsAndModifications,\n ...additions,\n };\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,SAAS,qBAAqB;AAE9B,SAAS,WAAW;AAGpB,SAAS,0BAA0B;AAM5B,MAAM,yBAAyB,OACpC,UACwB;AACxB,QAAM,SAAS,MAAM,cAAc,EAAE,GAAG,OAAO,WAAW,MAAM,CAAC;AAEjE,MAAI,WAAW,QAAW;AACxB,QAAI;AAAA,MACF;AAAA,MACA,IAAI,KAAK,cAAc;AAAA,MACvB;AAAA,IACF;AACA,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,SAAO;AACT;AAEA,MAAM,eAAe,CAAC,GAAuB,MAC3C,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,MAAM,MAAM,MAAS,EAAE,KAAK,MAAM;AAO5C,MAAM,mBAAmB,CAC9B,UACmB;AACnB,QAAM,4BAA4B,OAAO;AAAA,IACvC,OAAO,QAAQ,MAAM,GAAG,EAAE,QAAQ,CAAC,CAAC,MAAM,UAAU,MAAM;AACxD,UAAI,eAAe,MAAM,IAAI,IAAI,KAAK,eAAe,QAAW;AAC9D,eAAO,CAAC;AAAA,MACV;AAEA,YAAM,aAAa,MAAM,IAAI,IAAI;AAEjC,YAAM,YAAY,mBAAmB,YAAY,UAAU;AAC3D,YAAM,UAAU,aAAa,YAAY,UAAU;AAEnD,aAAO,CAAC,CAAC,MAAM,EAAE,WAAW,QAAQ,CAAC,CAAC;AAAA,IACxC,CAAC;AAAA,EACH;AAEA,QAAM,YAAY,OAAO;AAAA,IACvB,OAAO,QAAQ,MAAM,GAAG,EAAE,QAAQ,CAAC,CAAC,MAAM,OAAO,MAAM;AACrD,UAAI,QAAQ,MAAM,OAAO,YAAY,QAAW;AAC9C,eAAO,CAAC;AAAA,MACV;AAEA,YAAM,aAAa,MAAM,IAAI,IAAI;AAEjC,YAAM,YAAY,mBAAmB,YAAY,OAAO;AAExD,aAAO,CAAC,CAAC,MAAM,EAAE,WAAW,QAAQ,CAAC,CAAC;AAAA,IACxC,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import path from "path";
|
|
3
2
|
import fs from "fs-extra";
|
|
4
3
|
import {
|
|
@@ -8,7 +7,7 @@ import {
|
|
|
8
7
|
import { isErrorWithCode } from "../../../utils/error.js";
|
|
9
8
|
import { loadModules } from "../modules/index.js";
|
|
10
9
|
import { determineOperation } from "./diff.js";
|
|
11
|
-
|
|
10
|
+
const createDestinationFileReader = (root) => async (filename) => {
|
|
12
11
|
try {
|
|
13
12
|
return await fs.promises.readFile(path.join(root, filename), "utf8");
|
|
14
13
|
} catch (err) {
|
|
@@ -55,7 +54,7 @@ const processTextFiles = async (modules, inputFiles, patternToFilepaths) => {
|
|
|
55
54
|
}
|
|
56
55
|
return outputFiles;
|
|
57
56
|
};
|
|
58
|
-
|
|
57
|
+
const diffFiles = async (opts) => {
|
|
59
58
|
const modules = await loadModules(opts);
|
|
60
59
|
const { inputFiles, patternToFilepaths } = Object.freeze(
|
|
61
60
|
await loadModuleFiles(modules, opts.destinationRoot)
|
|
@@ -71,4 +70,8 @@ export const diffFiles = async (opts) => {
|
|
|
71
70
|
});
|
|
72
71
|
return Object.fromEntries(diffEntries);
|
|
73
72
|
};
|
|
73
|
+
export {
|
|
74
|
+
createDestinationFileReader,
|
|
75
|
+
diffFiles
|
|
76
|
+
};
|
|
74
77
|
//# sourceMappingURL=project.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/analysis/project.ts"],
|
|
4
4
|
"sourcesContent": ["import path from 'path';\n\nimport fs from 'fs-extra';\n\nimport {\n buildPatternToFilepathMap,\n crawlDirectory,\n} from '../../../utils/dir.js';\nimport { isErrorWithCode } from '../../../utils/error.js';\nimport { loadModules } from '../modules/index.js';\nimport type { FileDiff, Files, Module, Options } from '../types.js';\n\nimport { determineOperation } from './diff.js';\n\nexport const createDestinationFileReader =\n (root: string) =>\n async (filename: string): Promise<string | undefined> => {\n try {\n return await fs.promises.readFile(path.join(root, filename), 'utf8');\n } catch (err) {\n if (isErrorWithCode(err, 'ENOENT')) {\n return;\n }\n\n throw err;\n }\n };\n\nconst loadModuleFiles = async (modules: Module[], destinationRoot: string) => {\n const readDestinationFile = createDestinationFileReader(destinationRoot);\n\n const allFilepaths = await crawlDirectory(destinationRoot);\n\n const patterns = [...new Set(modules.flatMap((m) => Object.keys(m)))];\n\n const patternToFilepaths = buildPatternToFilepathMap(patterns, allFilepaths);\n\n const matchedFilepaths = [\n ...new Set(Object.values(patternToFilepaths).flat()),\n ];\n\n const fileEntries = await Promise.all(\n matchedFilepaths.map(\n async (filepath) =>\n [filepath, await readDestinationFile(filepath)] as const,\n ),\n );\n\n return {\n inputFiles: Object.fromEntries(fileEntries),\n patternToFilepaths,\n };\n};\n\nconst processTextFiles = async (\n modules: Module[],\n inputFiles: Readonly<Files>,\n patternToFilepaths: Record<string, string[]>,\n) => {\n const outputFiles = { ...inputFiles };\n\n const textProcessorEntries = modules.flatMap((module) =>\n Object.entries(module).flatMap(([pattern, processText]) => {\n // Include the raw pattern along with any matched filepaths.\n // Some modules create a new file at the specified pattern.\n const filepaths = [pattern, ...(patternToFilepaths[pattern] ?? [])];\n\n return [...new Set(filepaths)].map(\n (filepath) => [filepath, processText] as const,\n );\n }),\n );\n\n for (const [filepath, processText] of textProcessorEntries) {\n outputFiles[filepath] = await processText(\n outputFiles[filepath],\n outputFiles,\n inputFiles,\n );\n }\n\n return outputFiles;\n};\n\nexport const diffFiles = async (opts: Options): Promise<FileDiff> => {\n const modules = await loadModules(opts);\n\n const { inputFiles, patternToFilepaths } = Object.freeze(\n await loadModuleFiles(modules, opts.destinationRoot),\n );\n\n const outputFiles = await processTextFiles(\n modules,\n inputFiles,\n patternToFilepaths,\n );\n\n const diffEntries = Object.entries(outputFiles)\n .filter(([filepath, data]) => inputFiles[filepath] !== data)\n .map(([filepath, data]) => {\n const operation = determineOperation(inputFiles[filepath], data);\n\n return [filepath, { data, operation }] as const;\n });\n\n return Object.fromEntries(diffEntries);\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,OAAO,UAAU;AAEjB,OAAO,QAAQ;AAEf;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAG5B,SAAS,0BAA0B;AAE5B,MAAM,8BACX,CAAC,SACD,OAAO,aAAkD;AACvD,MAAI;AACF,WAAO,MAAM,GAAG,SAAS,SAAS,KAAK,KAAK,MAAM,QAAQ,GAAG,MAAM;AAAA,EACrE,SAAS,KAAK;AACZ,QAAI,gBAAgB,KAAK,QAAQ,GAAG;AAClC;AAAA,IACF;AAEA,UAAM;AAAA,EACR;AACF;AAEF,MAAM,kBAAkB,OAAO,SAAmB,oBAA4B;AAC5E,QAAM,sBAAsB,4BAA4B,eAAe;AAEvE,QAAM,eAAe,MAAM,eAAe,eAAe;AAEzD,QAAM,WAAW,CAAC,GAAG,IAAI,IAAI,QAAQ,QAAQ,CAAC,MAAM,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;AAEpE,QAAM,qBAAqB,0BAA0B,UAAU,YAAY;AAE3E,QAAM,mBAAmB;AAAA,IACvB,GAAG,IAAI,IAAI,OAAO,OAAO,kBAAkB,EAAE,KAAK,CAAC;AAAA,EACrD;AAEA,QAAM,cAAc,MAAM,QAAQ;AAAA,IAChC,iBAAiB;AAAA,MACf,OAAO,aACL,CAAC,UAAU,MAAM,oBAAoB,QAAQ,CAAC;AAAA,IAClD;AAAA,EACF;AAEA,SAAO;AAAA,IACL,YAAY,OAAO,YAAY,WAAW;AAAA,IAC1C;AAAA,EACF;AACF;AAEA,MAAM,mBAAmB,OACvB,SACA,YACA,uBACG;AACH,QAAM,cAAc,EAAE,GAAG,WAAW;AAEpC,QAAM,uBAAuB,QAAQ;AAAA,IAAQ,CAAC,WAC5C,OAAO,QAAQ,MAAM,EAAE,QAAQ,CAAC,CAAC,SAAS,WAAW,MAAM;AAGzD,YAAM,YAAY,CAAC,SAAS,GAAI,mBAAmB,OAAO,KAAK,CAAC,CAAE;AAElE,aAAO,CAAC,GAAG,IAAI,IAAI,SAAS,CAAC,EAAE;AAAA,QAC7B,CAAC,aAAa,CAAC,UAAU,WAAW;AAAA,MACtC;AAAA,IACF,CAAC;AAAA,EACH;AAEA,aAAW,CAAC,UAAU,WAAW,KAAK,sBAAsB;AAC1D,gBAAY,QAAQ,IAAI,MAAM;AAAA,MAC5B,YAAY,QAAQ;AAAA,MACpB;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEO,MAAM,YAAY,OAAO,SAAqC;AACnE,QAAM,UAAU,MAAM,YAAY,IAAI;AAEtC,QAAM,EAAE,YAAY,mBAAmB,IAAI,OAAO;AAAA,IAChD,MAAM,gBAAgB,SAAS,KAAK,eAAe;AAAA,EACrD;AAEA,QAAM,cAAc,MAAM;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,cAAc,OAAO,QAAQ,WAAW,EAC3C,OAAO,CAAC,CAAC,UAAU,IAAI,MAAM,WAAW,QAAQ,MAAM,IAAI,EAC1D,IAAI,CAAC,CAAC,UAAU,IAAI,MAAM;AACzB,UAAM,YAAY,mBAAmB,WAAW,QAAQ,GAAG,IAAI;AAE/D,WAAO,CAAC,UAAU,EAAE,MAAM,UAAU,CAAC;AAAA,EACvC,CAAC;AAEH,SAAO,OAAO,YAAY,WAAW;AACvC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export {
|
|
1
|
+
import { seekDatadogCustomMetrics } from "./seekDatadogCustomMetrics.js";
|
|
2
|
+
import { seekKoala } from "./seekKoala.js";
|
|
3
|
+
import { skuba } from "./skuba.js";
|
|
4
|
+
import { skubaDeps } from "./skubaDeps.js";
|
|
5
|
+
import { skubaDive } from "./skubaDive.js";
|
|
6
|
+
export {
|
|
7
|
+
seekDatadogCustomMetrics,
|
|
8
|
+
seekKoala,
|
|
9
|
+
skuba,
|
|
10
|
+
skubaDeps,
|
|
11
|
+
skubaDive
|
|
12
|
+
};
|
|
7
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/dependencies/index.ts"],
|
|
4
4
|
"sourcesContent": ["export { seekDatadogCustomMetrics } from './seekDatadogCustomMetrics.js';\nexport { seekKoala } from './seekKoala.js';\nexport { skuba } from './skuba.js';\nexport { skubaDeps } from './skubaDeps.js';\nexport { skubaDive } from './skubaDive.js';\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,SAAS,gCAAgC;AACzC,SAAS,iBAAiB;AAC1B,SAAS,aAAa;AACtB,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { replacePackageReferences } from "../processing/module.js";
|
|
3
2
|
const OLD_NAME = "@seek/node-datadog-custom-metrics";
|
|
4
3
|
const NEW_NAME = "seek-datadog-custom-metrics";
|
|
5
|
-
|
|
4
|
+
const seekDatadogCustomMetrics = ({
|
|
6
5
|
dependencies,
|
|
7
6
|
devDependencies
|
|
8
7
|
}) => {
|
|
@@ -30,4 +29,7 @@ export const seekDatadogCustomMetrics = ({
|
|
|
30
29
|
})
|
|
31
30
|
];
|
|
32
31
|
};
|
|
32
|
+
export {
|
|
33
|
+
seekDatadogCustomMetrics
|
|
34
|
+
};
|
|
33
35
|
//# sourceMappingURL=seekDatadogCustomMetrics.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/dependencies/seekDatadogCustomMetrics.ts"],
|
|
4
4
|
"sourcesContent": ["import { replacePackageReferences } from '../processing/module.js';\nimport type { DependencySet } from '../types.js';\n\nconst OLD_NAME = '@seek/node-datadog-custom-metrics';\nconst NEW_NAME = 'seek-datadog-custom-metrics';\n\nexport const seekDatadogCustomMetrics = ({\n dependencies,\n devDependencies,\n}: DependencySet) => {\n if (!dependencies[OLD_NAME] && !devDependencies[OLD_NAME]) {\n return [];\n }\n\n // lazily upgrade to latest version of the new package\n if (dependencies[OLD_NAME]) {\n dependencies[NEW_NAME] = '*';\n delete dependencies[OLD_NAME];\n }\n if (devDependencies[OLD_NAME]) {\n devDependencies[NEW_NAME] = '*';\n delete devDependencies[OLD_NAME];\n }\n\n return [\n replacePackageReferences({\n old: {\n packageName: OLD_NAME,\n repoSlug: 'seek-jobs/node-datadog-custom-metrics',\n },\n new: {\n packageName: NEW_NAME,\n repoSlug: 'seek-oss/datadog-custom-metrics',\n },\n }),\n ];\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,SAAS,gCAAgC;AAGzC,MAAM,WAAW;AACjB,MAAM,WAAW;AAEV,MAAM,2BAA2B,CAAC;AAAA,EACvC;AAAA,EACA;AACF,MAAqB;AACnB,MAAI,CAAC,aAAa,QAAQ,KAAK,CAAC,gBAAgB,QAAQ,GAAG;AACzD,WAAO,CAAC;AAAA,EACV;AAGA,MAAI,aAAa,QAAQ,GAAG;AAC1B,iBAAa,QAAQ,IAAI;AACzB,WAAO,aAAa,QAAQ;AAAA,EAC9B;AACA,MAAI,gBAAgB,QAAQ,GAAG;AAC7B,oBAAgB,QAAQ,IAAI;AAC5B,WAAO,gBAAgB,QAAQ;AAAA,EACjC;AAEA,SAAO;AAAA,IACL,yBAAyB;AAAA,MACvB,KAAK;AAAA,QACH,aAAa;AAAA,QACb,UAAU;AAAA,MACZ;AAAA,MACA,KAAK;AAAA,QACH,aAAa;AAAA,QACb,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,EACH;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { replacePackageReferences } from "../processing/module.js";
|
|
3
2
|
const OLD_NAME = "@seek/koala";
|
|
4
3
|
const NEW_NAME = "seek-koala";
|
|
5
|
-
|
|
4
|
+
const seekKoala = ({ dependencies, devDependencies }) => {
|
|
6
5
|
if (!dependencies[OLD_NAME] && !devDependencies[OLD_NAME]) {
|
|
7
6
|
return [];
|
|
8
7
|
}
|
|
@@ -27,4 +26,7 @@ export const seekKoala = ({ dependencies, devDependencies }) => {
|
|
|
27
26
|
})
|
|
28
27
|
];
|
|
29
28
|
};
|
|
29
|
+
export {
|
|
30
|
+
seekKoala
|
|
31
|
+
};
|
|
30
32
|
//# sourceMappingURL=seekKoala.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/dependencies/seekKoala.ts"],
|
|
4
4
|
"sourcesContent": ["import { replacePackageReferences } from '../processing/module.js';\nimport type { DependencySet } from '../types.js';\n\nconst OLD_NAME = '@seek/koala';\nconst NEW_NAME = 'seek-koala';\n\nexport const seekKoala = ({ dependencies, devDependencies }: DependencySet) => {\n if (!dependencies[OLD_NAME] && !devDependencies[OLD_NAME]) {\n return [];\n }\n\n // lazily upgrade to latest version of the new package\n if (dependencies[OLD_NAME]) {\n dependencies[NEW_NAME] = '*';\n delete dependencies[OLD_NAME];\n }\n if (devDependencies[OLD_NAME]) {\n devDependencies[NEW_NAME] = '*';\n delete devDependencies[OLD_NAME];\n }\n\n return [\n replacePackageReferences({\n old: {\n packageName: OLD_NAME,\n repoSlug: 'seek-jobs/koala',\n },\n new: {\n packageName: NEW_NAME,\n repoSlug: 'seek-oss/koala',\n },\n }),\n ];\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,SAAS,gCAAgC;AAGzC,MAAM,WAAW;AACjB,MAAM,WAAW;AAEV,MAAM,YAAY,CAAC,EAAE,cAAc,gBAAgB,MAAqB;AAC7E,MAAI,CAAC,aAAa,QAAQ,KAAK,CAAC,gBAAgB,QAAQ,GAAG;AACzD,WAAO,CAAC;AAAA,EACV;AAGA,MAAI,aAAa,QAAQ,GAAG;AAC1B,iBAAa,QAAQ,IAAI;AACzB,WAAO,aAAa,QAAQ;AAAA,EAC9B;AACA,MAAI,gBAAgB,QAAQ,GAAG;AAC7B,oBAAgB,QAAQ,IAAI;AAC5B,WAAO,gBAAgB,QAAQ;AAAA,EACjC;AAEA,SAAO;AAAA,IACL,yBAAyB;AAAA,MACvB,KAAK;AAAA,QACH,aAAa;AAAA,QACb,UAAU;AAAA,MACZ;AAAA,MACA,KAAK;AAAA,QACH,aAAa;AAAA,QACb,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,EACH;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { replacePackageReferences } from "../processing/module.js";
|
|
3
2
|
const OLD_NAME = "@seek/skuba";
|
|
4
3
|
const NEW_NAME = "skuba";
|
|
5
|
-
|
|
4
|
+
const skuba = ({ dependencies, devDependencies }) => {
|
|
6
5
|
devDependencies[NEW_NAME] = "*";
|
|
7
6
|
delete dependencies[NEW_NAME];
|
|
8
7
|
if (!dependencies[OLD_NAME] && !devDependencies[OLD_NAME]) {
|
|
@@ -23,4 +22,7 @@ export const skuba = ({ dependencies, devDependencies }) => {
|
|
|
23
22
|
})
|
|
24
23
|
];
|
|
25
24
|
};
|
|
25
|
+
export {
|
|
26
|
+
skuba
|
|
27
|
+
};
|
|
26
28
|
//# sourceMappingURL=skuba.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/dependencies/skuba.ts"],
|
|
4
4
|
"sourcesContent": ["import { replacePackageReferences } from '../processing/module.js';\nimport type { DependencySet } from '../types.js';\n\nconst OLD_NAME = '@seek/skuba';\nconst NEW_NAME = 'skuba';\n\nexport const skuba = ({ dependencies, devDependencies }: DependencySet) => {\n // force latest dev dependency\n devDependencies[NEW_NAME] = '*';\n delete dependencies[NEW_NAME];\n\n if (!dependencies[OLD_NAME] && !devDependencies[OLD_NAME]) {\n return [];\n }\n\n delete dependencies[OLD_NAME];\n delete devDependencies[OLD_NAME];\n\n return [\n replacePackageReferences({\n old: {\n packageName: OLD_NAME,\n repoSlug: 'seek-jobs/skuba',\n },\n new: {\n packageName: NEW_NAME,\n repoSlug: 'seek-oss/skuba',\n },\n }),\n ];\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,SAAS,gCAAgC;AAGzC,MAAM,WAAW;AACjB,MAAM,WAAW;AAEV,MAAM,QAAQ,CAAC,EAAE,cAAc,gBAAgB,MAAqB;AAEzE,kBAAgB,QAAQ,IAAI;AAC5B,SAAO,aAAa,QAAQ;AAE5B,MAAI,CAAC,aAAa,QAAQ,KAAK,CAAC,gBAAgB,QAAQ,GAAG;AACzD,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,aAAa,QAAQ;AAC5B,SAAO,gBAAgB,QAAQ;AAE/B,SAAO;AAAA,IACL,yBAAyB;AAAA,MACvB,KAAK;AAAA,QACH,aAAa;AAAA,QACb,UAAU;AAAA,MACZ;AAAA,MACA,KAAK;AAAA,QACH,aAAa;AAAA,QACb,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,EACH;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
const DEV_DEPENDENCIES = [
|
|
3
2
|
// replaced
|
|
4
3
|
"@seek/seek-module-toolkit",
|
|
@@ -21,11 +20,14 @@ const DEV_DEPENDENCIES = [
|
|
|
21
20
|
"tsx",
|
|
22
21
|
"typescript"
|
|
23
22
|
];
|
|
24
|
-
|
|
23
|
+
const skubaDeps = ({ dependencies, devDependencies }) => {
|
|
25
24
|
DEV_DEPENDENCIES.forEach((dep) => {
|
|
26
25
|
delete dependencies[dep];
|
|
27
26
|
delete devDependencies[dep];
|
|
28
27
|
});
|
|
29
28
|
return [];
|
|
30
29
|
};
|
|
30
|
+
export {
|
|
31
|
+
skubaDeps
|
|
32
|
+
};
|
|
31
33
|
//# sourceMappingURL=skubaDeps.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/dependencies/skubaDeps.ts"],
|
|
4
4
|
"sourcesContent": ["import type { DependencySet } from '../types.js';\n\nconst DEV_DEPENDENCIES = [\n // replaced\n '@seek/seek-module-toolkit',\n 'eslint-config-seek',\n 'nodemon',\n 'ts-node-dev',\n 'tslint-config-seek',\n 'tslint',\n\n // bundled\n '@types/jest',\n 'concurrently',\n 'eslint-config-skuba',\n 'eslint',\n 'jest',\n 'prettier',\n 'semantic-release',\n 'ts-jest',\n 'ts-node',\n 'tsconfig-seek',\n 'tsx',\n 'typescript',\n] as const;\n\nexport const skubaDeps = ({ dependencies, devDependencies }: DependencySet) => {\n DEV_DEPENDENCIES.forEach((dep) => {\n delete dependencies[dep];\n delete devDependencies[dep];\n });\n\n return [];\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAEA,MAAM,mBAAmB;AAAA;AAAA,EAEvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,YAAY,CAAC,EAAE,cAAc,gBAAgB,MAAqB;AAC7E,mBAAiB,QAAQ,CAAC,QAAQ;AAChC,WAAO,aAAa,GAAG;AACvB,WAAO,gBAAgB,GAAG;AAAA,EAC5B,CAAC;AAED,SAAO,CAAC;AACV;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { replacePackageReferences } from "../processing/module.js";
|
|
3
2
|
const OLD_NAME = "@seek/skuba-dive";
|
|
4
3
|
const NEW_NAME = "skuba-dive";
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const SKUBA_DIVE_HOOKS = ["module-alias", "source-map-support"];
|
|
5
|
+
const skubaDive = ({
|
|
7
6
|
dependencies,
|
|
8
7
|
devDependencies,
|
|
9
8
|
type
|
|
@@ -39,4 +38,8 @@ export const skubaDive = ({
|
|
|
39
38
|
})
|
|
40
39
|
];
|
|
41
40
|
};
|
|
41
|
+
export {
|
|
42
|
+
SKUBA_DIVE_HOOKS,
|
|
43
|
+
skubaDive
|
|
44
|
+
};
|
|
42
45
|
//# sourceMappingURL=skubaDive.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/dependencies/skubaDive.ts"],
|
|
4
4
|
"sourcesContent": ["import { replacePackageReferences } from '../processing/module.js';\nimport type { DependencySet } from '../types.js';\n\nconst OLD_NAME = '@seek/skuba-dive';\nconst NEW_NAME = 'skuba-dive';\n\nexport const SKUBA_DIVE_HOOKS = ['module-alias', 'source-map-support'] as const;\n\nexport const skubaDive = ({\n dependencies,\n devDependencies,\n type,\n}: DependencySet) => {\n SKUBA_DIVE_HOOKS.forEach((hook) => {\n delete dependencies[hook];\n delete devDependencies[hook];\n });\n\n // skuba-dive is a runtime component; it's not appropriate for packages\n if (type === 'package') {\n delete dependencies[NEW_NAME];\n delete devDependencies[NEW_NAME];\n delete dependencies[OLD_NAME];\n delete devDependencies[OLD_NAME];\n\n return [];\n }\n\n dependencies[NEW_NAME] =\n dependencies[NEW_NAME] || devDependencies[NEW_NAME] || '*';\n delete devDependencies[NEW_NAME];\n\n if (!dependencies[OLD_NAME] && !devDependencies[OLD_NAME]) {\n return [];\n }\n\n delete dependencies[OLD_NAME];\n delete devDependencies[OLD_NAME];\n\n return [\n replacePackageReferences({\n old: {\n packageName: OLD_NAME,\n repoSlug: 'seek-jobs/skuba-dive',\n },\n new: {\n packageName: NEW_NAME,\n repoSlug: 'seek-oss/skuba-dive',\n },\n }),\n ];\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,SAAS,gCAAgC;AAGzC,MAAM,WAAW;AACjB,MAAM,WAAW;AAEV,MAAM,mBAAmB,CAAC,gBAAgB,oBAAoB;AAE9D,MAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AACF,MAAqB;AACnB,mBAAiB,QAAQ,CAAC,SAAS;AACjC,WAAO,aAAa,IAAI;AACxB,WAAO,gBAAgB,IAAI;AAAA,EAC7B,CAAC;AAGD,MAAI,SAAS,WAAW;AACtB,WAAO,aAAa,QAAQ;AAC5B,WAAO,gBAAgB,QAAQ;AAC/B,WAAO,aAAa,QAAQ;AAC5B,WAAO,gBAAgB,QAAQ;AAE/B,WAAO,CAAC;AAAA,EACV;AAEA,eAAa,QAAQ,IACnB,aAAa,QAAQ,KAAK,gBAAgB,QAAQ,KAAK;AACzD,SAAO,gBAAgB,QAAQ;AAE/B,MAAI,CAAC,aAAa,QAAQ,KAAK,CAAC,gBAAgB,QAAQ,GAAG;AACzD,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,aAAa,QAAQ;AAC5B,SAAO,gBAAgB,QAAQ;AAE/B,SAAO;AAAA,IACL,yBAAyB;AAAA,MACvB,KAAK;AAAA,QACH,aAAa;AAAA,QACb,UAAU;AAAA,MACZ;AAAA,MACA,KAAK;AAAA,QACH,aAAa;AAAA,QACb,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,EACH;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import path from "path";
|
|
3
2
|
import chalk from "chalk";
|
|
4
3
|
import fs from "fs-extra";
|
|
@@ -32,7 +31,7 @@ const getTemplateDataFromStdIn = async (templateConfig) => {
|
|
|
32
31
|
});
|
|
33
32
|
return data.templateData;
|
|
34
33
|
};
|
|
35
|
-
|
|
34
|
+
const ensureTemplateCompletion = async ({
|
|
36
35
|
destinationRoot,
|
|
37
36
|
include,
|
|
38
37
|
manifest
|
|
@@ -62,4 +61,7 @@ export const ensureTemplateCompletion = async ({
|
|
|
62
61
|
log.ok("Templating complete!");
|
|
63
62
|
return templateConfig;
|
|
64
63
|
};
|
|
64
|
+
export {
|
|
65
|
+
ensureTemplateCompletion
|
|
66
|
+
};
|
|
65
67
|
//# sourceMappingURL=ensureTemplateCompletion.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/configure/ensureTemplateCompletion.ts"],
|
|
4
4
|
"sourcesContent": ["import path from 'path';\n\nimport chalk from 'chalk';\nimport fs from 'fs-extra';\nimport * as z from 'zod/v4';\n\nimport { copyFiles, createEjsRenderer } from '../../utils/copy.js';\nimport { log } from '../../utils/logging.js';\nimport {\n type TemplateConfig,\n ensureTemplateConfigDeletion,\n} from '../../utils/template.js';\nimport { hasStringProp } from '../../utils/validation.js';\nimport {\n getTemplateConfig,\n readJSONFromStdIn,\n runForm,\n} from '../init/getConfig.js';\n\nimport { formatPackage } from './processing/package.js';\nimport type { ReadResult } from './types.js';\n\ninterface Props {\n destinationRoot: string;\n include: (pathname: string) => boolean;\n manifest: ReadResult;\n}\n\nconst templateDataSchema = z.object({\n templateData: z.record(z.string(), z.string()),\n});\n\nconst getTemplateDataFromStdIn = async (\n templateConfig: TemplateConfig,\n): Promise<Record<string, string>> => {\n const config = await readJSONFromStdIn();\n const data = templateDataSchema.parse(config);\n\n templateConfig.fields.forEach((field) => {\n const value = data.templateData[field.name];\n if (value === undefined) {\n throw new Error(`Missing field: ${field.name}`);\n }\n\n if (field.validate && !field.validate(value)) {\n throw new Error(`Invalid value for field: ${field.name}`);\n }\n });\n\n return data.templateData;\n};\n\nexport const ensureTemplateCompletion = async ({\n destinationRoot,\n include,\n manifest,\n}: Props): Promise<TemplateConfig> => {\n const templateConfig = await getTemplateConfig(destinationRoot);\n\n if (templateConfig.fields.length === 0) {\n return templateConfig;\n }\n\n const templateName = hasStringProp(manifest.packageJson.skuba, 'template')\n ? manifest.packageJson.skuba.template\n : 'template';\n\n log.newline();\n const templateData = process.stdin.isTTY\n ? await runForm({\n choices: templateConfig.fields,\n message: chalk.bold(`Complete ${chalk.cyan(templateName)}:`),\n name: 'customAnswers',\n })\n : await getTemplateDataFromStdIn(templateConfig);\n\n const updatedPackageJson = await formatPackage(manifest.packageJson);\n const packageJsonFilepath = path.join(destinationRoot, 'package.json');\n await fs.promises.writeFile(packageJsonFilepath, updatedPackageJson);\n\n await copyFiles({\n sourceRoot: destinationRoot,\n destinationRoot,\n include,\n processors: [createEjsRenderer(templateData)],\n });\n\n await ensureTemplateConfigDeletion(destinationRoot);\n\n log.newline();\n log.ok('Templating complete!');\n\n return templateConfig;\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,OAAO,UAAU;AAEjB,OAAO,WAAW;AAClB,OAAO,QAAQ;AACf,YAAY,OAAO;AAEnB,SAAS,WAAW,yBAAyB;AAC7C,SAAS,WAAW;AACpB;AAAA,EAEE;AAAA,OACK;AACP,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,qBAAqB;AAS9B,MAAM,qBAAqB,EAAE,OAAO;AAAA,EAClC,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC;AAC/C,CAAC;AAED,MAAM,2BAA2B,OAC/B,mBACoC;AACpC,QAAM,SAAS,MAAM,kBAAkB;AACvC,QAAM,OAAO,mBAAmB,MAAM,MAAM;AAE5C,iBAAe,OAAO,QAAQ,CAAC,UAAU;AACvC,UAAM,QAAQ,KAAK,aAAa,MAAM,IAAI;AAC1C,QAAI,UAAU,QAAW;AACvB,YAAM,IAAI,MAAM,kBAAkB,MAAM,IAAI,EAAE;AAAA,IAChD;AAEA,QAAI,MAAM,YAAY,CAAC,MAAM,SAAS,KAAK,GAAG;AAC5C,YAAM,IAAI,MAAM,4BAA4B,MAAM,IAAI,EAAE;AAAA,IAC1D;AAAA,EACF,CAAC;AAED,SAAO,KAAK;AACd;AAEO,MAAM,2BAA2B,OAAO;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AACF,MAAsC;AACpC,QAAM,iBAAiB,MAAM,kBAAkB,eAAe;AAE9D,MAAI,eAAe,OAAO,WAAW,GAAG;AACtC,WAAO;AAAA,EACT;AAEA,QAAM,eAAe,cAAc,SAAS,YAAY,OAAO,UAAU,IACrE,SAAS,YAAY,MAAM,WAC3B;AAEJ,MAAI,QAAQ;AACZ,QAAM,eAAe,QAAQ,MAAM,QAC/B,MAAM,QAAQ;AAAA,IACZ,SAAS,eAAe;AAAA,IACxB,SAAS,MAAM,KAAK,YAAY,MAAM,KAAK,YAAY,CAAC,GAAG;AAAA,IAC3D,MAAM;AAAA,EACR,CAAC,IACD,MAAM,yBAAyB,cAAc;AAEjD,QAAM,qBAAqB,MAAM,cAAc,SAAS,WAAW;AACnE,QAAM,sBAAsB,KAAK,KAAK,iBAAiB,cAAc;AACrE,QAAM,GAAG,SAAS,UAAU,qBAAqB,kBAAkB;AAEnE,QAAM,UAAU;AAAA,IACd,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA,YAAY,CAAC,kBAAkB,YAAY,CAAC;AAAA,EAC9C,CAAC;AAED,QAAM,6BAA6B,eAAe;AAElD,MAAI,QAAQ;AACZ,MAAI,GAAG,sBAAsB;AAE7B,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import path from "path";
|
|
3
2
|
import chalk from "chalk";
|
|
4
3
|
import enquirer from "enquirer";
|
|
5
4
|
import { log } from "../../utils/logging.js";
|
|
6
5
|
import { hasStringProp } from "../../utils/validation.js";
|
|
7
6
|
import { tsFileExists } from "./analysis/files.js";
|
|
8
|
-
|
|
7
|
+
const getEntryPoint = ({
|
|
9
8
|
destinationRoot,
|
|
10
9
|
manifest,
|
|
11
10
|
templateConfig,
|
|
@@ -34,4 +33,7 @@ export const getEntryPoint = ({
|
|
|
34
33
|
});
|
|
35
34
|
return entryPointPrompt.run();
|
|
36
35
|
};
|
|
36
|
+
export {
|
|
37
|
+
getEntryPoint
|
|
38
|
+
};
|
|
37
39
|
//# sourceMappingURL=getEntryPoint.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/configure/getEntryPoint.ts"],
|
|
4
4
|
"sourcesContent": ["import path from 'path';\n\nimport chalk from 'chalk';\nimport enquirer from 'enquirer';\n\nimport { log } from '../../utils/logging.js';\nimport type { ProjectType } from '../../utils/manifest.js';\nimport type { TemplateConfig } from '../../utils/template.js';\nimport { hasStringProp } from '../../utils/validation.js';\n\nimport { tsFileExists } from './analysis/files.js';\nimport type { ReadResult } from './types.js';\n\ninterface Props {\n destinationRoot: string;\n manifest: ReadResult;\n templateConfig: TemplateConfig;\n type: ProjectType;\n}\nexport const getEntryPoint = ({\n destinationRoot,\n manifest,\n templateConfig,\n type,\n}: Props) => {\n if (hasStringProp(manifest.packageJson.skuba, 'entryPoint')) {\n return manifest.packageJson.skuba.entryPoint;\n }\n\n if (templateConfig.entryPoint !== undefined) {\n return templateConfig.entryPoint;\n }\n\n log.newline();\n const entryPointPrompt = new enquirer.Input({\n initial: type === 'package' ? 'src/index.ts' : 'src/app.ts',\n message: 'Entry point:',\n name: 'entryPoint',\n result: (value) => (value.endsWith('.ts') ? value : `${value}.ts`),\n validate: async (value) => {\n // Support exported function targeting, e.g. `src/module.ts#callMeMaybe`\n const [modulePath] = value.split('#', 2);\n\n if (!modulePath) {\n return `${chalk.bold(value)} is an invalid module path`;\n }\n\n const exists = await tsFileExists(path.join(destinationRoot, modulePath));\n\n return exists || `${chalk.bold(value)} is not a TypeScript file.`;\n },\n });\n\n return entryPointPrompt.run();\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,OAAO,UAAU;AAEjB,OAAO,WAAW;AAClB,OAAO,cAAc;AAErB,SAAS,WAAW;AAGpB,SAAS,qBAAqB;AAE9B,SAAS,oBAAoB;AAStB,MAAM,gBAAgB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAa;AACX,MAAI,cAAc,SAAS,YAAY,OAAO,YAAY,GAAG;AAC3D,WAAO,SAAS,YAAY,MAAM;AAAA,EACpC;AAEA,MAAI,eAAe,eAAe,QAAW;AAC3C,WAAO,eAAe;AAAA,EACxB;AAEA,MAAI,QAAQ;AACZ,QAAM,mBAAmB,IAAI,SAAS,MAAM;AAAA,IAC1C,SAAS,SAAS,YAAY,iBAAiB;AAAA,IAC/C,SAAS;AAAA,IACT,MAAM;AAAA,IACN,QAAQ,CAAC,UAAW,MAAM,SAAS,KAAK,IAAI,QAAQ,GAAG,KAAK;AAAA,IAC5D,UAAU,OAAO,UAAU;AAEzB,YAAM,CAAC,UAAU,IAAI,MAAM,MAAM,KAAK,CAAC;AAEvC,UAAI,CAAC,YAAY;AACf,eAAO,GAAG,MAAM,KAAK,KAAK,CAAC;AAAA,MAC7B;AAEA,YAAM,SAAS,MAAM,aAAa,KAAK,KAAK,iBAAiB,UAAU,CAAC;AAExE,aAAO,UAAU,GAAG,MAAM,KAAK,KAAK,CAAC;AAAA,IACvC;AAAA,EACF,CAAC;AAED,SAAO,iBAAiB,IAAI;AAC9B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import enquirer from "enquirer";
|
|
3
2
|
import { log } from "../../utils/logging.js";
|
|
4
3
|
import {
|
|
@@ -6,7 +5,7 @@ import {
|
|
|
6
5
|
projectTypeSchema
|
|
7
6
|
} from "../../utils/manifest.js";
|
|
8
7
|
import { hasProp } from "../../utils/validation.js";
|
|
9
|
-
|
|
8
|
+
const getProjectType = async ({
|
|
10
9
|
manifest,
|
|
11
10
|
templateConfig
|
|
12
11
|
}) => {
|
|
@@ -29,4 +28,7 @@ export const getProjectType = async ({
|
|
|
29
28
|
});
|
|
30
29
|
return projectTypePrompt.run();
|
|
31
30
|
};
|
|
31
|
+
export {
|
|
32
|
+
getProjectType
|
|
33
|
+
};
|
|
32
34
|
//# sourceMappingURL=getProjectType.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/configure/getProjectType.ts"],
|
|
4
4
|
"sourcesContent": ["import enquirer from 'enquirer';\n\nimport { log } from '../../utils/logging.js';\nimport {\n PROJECT_TYPES,\n type ProjectType,\n projectTypeSchema,\n} from '../../utils/manifest.js';\nimport type { TemplateConfig } from '../../utils/template.js';\nimport { hasProp } from '../../utils/validation.js';\n\nimport type { ReadResult } from './types.js';\n\ninterface Props {\n manifest: ReadResult;\n templateConfig: TemplateConfig;\n}\n\nexport const getProjectType = async ({\n manifest,\n templateConfig,\n}: Props): Promise<ProjectType> => {\n const projectType = projectTypeSchema.safeParse(\n hasProp(manifest.packageJson.skuba, 'type')\n ? manifest.packageJson.skuba.type\n : null,\n );\n\n if (projectType.success) {\n return projectType.data;\n }\n\n if (templateConfig.type !== undefined) {\n return templateConfig.type;\n }\n\n const initial: ProjectType =\n manifest.packageJson.devDependencies?.['@seek/seek-module-toolkit'] ||\n manifest.packageJson.files\n ? 'package'\n : 'application';\n\n log.newline();\n const projectTypePrompt = new enquirer.Select({\n choices: PROJECT_TYPES,\n message: 'Project type:',\n name: 'projectType',\n initial,\n });\n\n return projectTypePrompt.run();\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,OAAO,cAAc;AAErB,SAAS,WAAW;AACpB;AAAA,EACE;AAAA,EAEA;AAAA,OACK;AAEP,SAAS,eAAe;AASjB,MAAM,iBAAiB,OAAO;AAAA,EACnC;AAAA,EACA;AACF,MAAmC;AACjC,QAAM,cAAc,kBAAkB;AAAA,IACpC,QAAQ,SAAS,YAAY,OAAO,MAAM,IACtC,SAAS,YAAY,MAAM,OAC3B;AAAA,EACN;AAEA,MAAI,YAAY,SAAS;AACvB,WAAO,YAAY;AAAA,EACrB;AAEA,MAAI,eAAe,SAAS,QAAW;AACrC,WAAO,eAAe;AAAA,EACxB;AAEA,QAAM,UACJ,SAAS,YAAY,kBAAkB,2BAA2B,KAClE,SAAS,YAAY,QACjB,YACA;AAEN,MAAI,QAAQ;AACZ,QAAM,oBAAoB,IAAI,SAAS,OAAO;AAAA,IAC5C,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,IACN;AAAA,EACF,CAAC;AAED,SAAO,kBAAkB,IAAI;AAC/B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import path from "path";
|
|
3
2
|
import enquirer from "enquirer";
|
|
4
3
|
import { createInclusionFilter } from "../../utils/dir.js";
|
|
@@ -27,7 +26,7 @@ const shouldApply = async (name) => {
|
|
|
27
26
|
const result = await prompt.run();
|
|
28
27
|
return result === "yes";
|
|
29
28
|
};
|
|
30
|
-
|
|
29
|
+
const configure = async () => {
|
|
31
30
|
await showLogoAndVersionInfo();
|
|
32
31
|
const [manifest, packageManager] = await Promise.all([
|
|
33
32
|
getDestinationManifest(),
|
|
@@ -111,4 +110,7 @@ export const configure = async () => {
|
|
|
111
110
|
}
|
|
112
111
|
log.newline();
|
|
113
112
|
};
|
|
113
|
+
export {
|
|
114
|
+
configure
|
|
115
|
+
};
|
|
114
116
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/configure/index.ts"],
|
|
4
4
|
"sourcesContent": ["import path from 'path';\n\nimport enquirer from 'enquirer';\n\nimport { createInclusionFilter } from '../../utils/dir.js';\nimport { createExec, ensureCommands } from '../../utils/exec.js';\nimport { log } from '../../utils/logging.js';\nimport { showLogoAndVersionInfo } from '../../utils/logo.js';\nimport { detectPackageManager } from '../../utils/packageManager.js';\nimport { BASE_TEMPLATE_DIR } from '../../utils/template.js';\nimport { hasProp } from '../../utils/validation.js';\n\nimport { analyseConfiguration } from './analyseConfiguration.js';\nimport { analyseDependencies } from './analyseDependencies.js';\nimport { auditWorkingTree } from './analysis/git.js';\nimport { getDestinationManifest } from './analysis/package.js';\nimport { ensureTemplateCompletion } from './ensureTemplateCompletion.js';\nimport { getEntryPoint } from './getEntryPoint.js';\nimport { getProjectType } from './getProjectType.js';\n\nconst shouldApply = async (name: string) => {\n if (!process.stdin.isTTY) {\n return 'yes';\n }\n const prompt = new enquirer.Select({\n choices: ['yes', 'no'] as const,\n message: 'Apply changes?',\n name,\n });\n\n const result = await prompt.run();\n\n return result === 'yes';\n};\n\nexport const configure = async () => {\n await showLogoAndVersionInfo();\n\n const [manifest, packageManager] = await Promise.all([\n getDestinationManifest(),\n detectPackageManager(),\n ]);\n\n await ensureCommands(packageManager.command);\n\n const destinationRoot = path.dirname(manifest.path);\n\n log.plain('Detected project root:', log.bold(destinationRoot));\n\n const [include] = await Promise.all([\n createInclusionFilter([\n path.join(destinationRoot, '.gitignore'),\n path.join(BASE_TEMPLATE_DIR, '_.gitignore'),\n ]),\n\n auditWorkingTree(destinationRoot),\n ]);\n\n const templateConfig = await ensureTemplateCompletion({\n destinationRoot,\n include,\n manifest,\n });\n\n const type = await getProjectType({\n manifest,\n templateConfig,\n });\n\n const entryPoint = await getEntryPoint({\n destinationRoot,\n manifest,\n templateConfig,\n type,\n });\n\n const fixDependencies = await analyseDependencies({\n destinationRoot,\n include,\n manifest,\n type,\n });\n\n if (fixDependencies) {\n log.newline();\n\n if (await shouldApply('fixDependencies')) {\n await fixDependencies();\n }\n }\n\n const firstRun = hasProp(manifest.packageJson, 'skuba');\n\n const fixConfiguration = await analyseConfiguration({\n destinationRoot,\n entryPoint,\n firstRun,\n packageManager,\n type,\n });\n\n if (fixConfiguration) {\n log.newline();\n\n if (await shouldApply('fixConfiguration')) {\n await fixConfiguration();\n }\n }\n\n if (fixDependencies) {\n const exec = createExec({\n stdio: 'pipe',\n streamStdio: packageManager.command,\n });\n\n log.newline();\n try {\n await exec(packageManager.command, 'install');\n } catch {\n log.newline();\n log.warn(log.bold('\u2717 Failed to install dependencies. Resume with:'));\n\n log.newline();\n log.plain(log.bold(packageManager.command, 'install'));\n log.plain(log.bold(packageManager.command, 'format'));\n\n log.newline();\n process.exitCode = 1;\n return;\n }\n }\n\n if (fixConfiguration ?? fixDependencies) {\n log.newline();\n log.ok(log.bold('\u2714 All done! Try running:'));\n\n log.newline();\n log.plain(log.bold(packageManager.command, 'format'));\n }\n\n log.newline();\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,OAAO,UAAU;AAEjB,OAAO,cAAc;AAErB,SAAS,6BAA6B;AACtC,SAAS,YAAY,sBAAsB;AAC3C,SAAS,WAAW;AACpB,SAAS,8BAA8B;AACvC,SAAS,4BAA4B;AACrC,SAAS,yBAAyB;AAClC,SAAS,eAAe;AAExB,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,SAAS,8BAA8B;AACvC,SAAS,gCAAgC;AACzC,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAE/B,MAAM,cAAc,OAAO,SAAiB;AAC1C,MAAI,CAAC,QAAQ,MAAM,OAAO;AACxB,WAAO;AAAA,EACT;AACA,QAAM,SAAS,IAAI,SAAS,OAAO;AAAA,IACjC,SAAS,CAAC,OAAO,IAAI;AAAA,IACrB,SAAS;AAAA,IACT;AAAA,EACF,CAAC;AAED,QAAM,SAAS,MAAM,OAAO,IAAI;AAEhC,SAAO,WAAW;AACpB;AAEO,MAAM,YAAY,YAAY;AACnC,QAAM,uBAAuB;AAE7B,QAAM,CAAC,UAAU,cAAc,IAAI,MAAM,QAAQ,IAAI;AAAA,IACnD,uBAAuB;AAAA,IACvB,qBAAqB;AAAA,EACvB,CAAC;AAED,QAAM,eAAe,eAAe,OAAO;AAE3C,QAAM,kBAAkB,KAAK,QAAQ,SAAS,IAAI;AAElD,MAAI,MAAM,0BAA0B,IAAI,KAAK,eAAe,CAAC;AAE7D,QAAM,CAAC,OAAO,IAAI,MAAM,QAAQ,IAAI;AAAA,IAClC,sBAAsB;AAAA,MACpB,KAAK,KAAK,iBAAiB,YAAY;AAAA,MACvC,KAAK,KAAK,mBAAmB,aAAa;AAAA,IAC5C,CAAC;AAAA,IAED,iBAAiB,eAAe;AAAA,EAClC,CAAC;AAED,QAAM,iBAAiB,MAAM,yBAAyB;AAAA,IACpD;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,OAAO,MAAM,eAAe;AAAA,IAChC;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,aAAa,MAAM,cAAc;AAAA,IACrC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,kBAAkB,MAAM,oBAAoB;AAAA,IAChD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,MAAI,iBAAiB;AACnB,QAAI,QAAQ;AAEZ,QAAI,MAAM,YAAY,iBAAiB,GAAG;AACxC,YAAM,gBAAgB;AAAA,IACxB;AAAA,EACF;AAEA,QAAM,WAAW,QAAQ,SAAS,aAAa,OAAO;AAEtD,QAAM,mBAAmB,MAAM,qBAAqB;AAAA,IAClD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,MAAI,kBAAkB;AACpB,QAAI,QAAQ;AAEZ,QAAI,MAAM,YAAY,kBAAkB,GAAG;AACzC,YAAM,iBAAiB;AAAA,IACzB;AAAA,EACF;AAEA,MAAI,iBAAiB;AACnB,UAAM,OAAO,WAAW;AAAA,MACtB,OAAO;AAAA,MACP,aAAa,eAAe;AAAA,IAC9B,CAAC;AAED,QAAI,QAAQ;AACZ,QAAI;AACF,YAAM,KAAK,eAAe,SAAS,SAAS;AAAA,IAC9C,QAAQ;AACN,UAAI,QAAQ;AACZ,UAAI,KAAK,IAAI,KAAK,qDAAgD,CAAC;AAEnE,UAAI,QAAQ;AACZ,UAAI,MAAM,IAAI,KAAK,eAAe,SAAS,SAAS,CAAC;AACrD,UAAI,MAAM,IAAI,KAAK,eAAe,SAAS,QAAQ,CAAC;AAEpD,UAAI,QAAQ;AACZ,cAAQ,WAAW;AACnB;AAAA,IACF;AAAA,EACF;AAEA,MAAI,oBAAoB,iBAAiB;AACvC,QAAI,QAAQ;AACZ,QAAI,GAAG,IAAI,KAAK,+BAA0B,CAAC;AAE3C,QAAI,QAAQ;AACZ,QAAI,MAAM,IAAI,KAAK,eAAe,SAAS,QAAQ,CAAC;AAAA,EACtD;AAEA,MAAI,QAAQ;AACd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { readBaseTemplateFile } from "../../../utils/template.js";
|
|
3
2
|
import { deleteFiles } from "../processing/deleteFiles.js";
|
|
4
3
|
import { withPackage } from "../processing/package.js";
|
|
5
4
|
import { formatPrettier } from "../processing/prettier.js";
|
|
6
|
-
|
|
5
|
+
const eslintModule = async () => {
|
|
7
6
|
const configFile = await readBaseTemplateFile("_eslint.config.js");
|
|
8
7
|
return {
|
|
9
8
|
...deleteFiles(
|
|
@@ -28,4 +27,7 @@ export const eslintModule = async () => {
|
|
|
28
27
|
"package.json": withPackage(({ eslintConfig, ...data }) => data)
|
|
29
28
|
};
|
|
30
29
|
};
|
|
30
|
+
export {
|
|
31
|
+
eslintModule
|
|
32
|
+
};
|
|
31
33
|
//# sourceMappingURL=eslint.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/eslint.ts"],
|
|
4
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 type { Module } from '../types.js';\n\nexport const eslintModule = async (): Promise<Module> => {\n const configFile = await readBaseTemplateFile('_eslint.config.js');\n\n return {\n ...deleteFiles(\n '.eslintrc.cjs',\n '.eslintrc.yaml',\n '.eslintrc.yml',\n '.eslintrc.json',\n '.eslintrc',\n '.eslintignore',\n ),\n\n // allow customised ESLint configs that extend skuba\n 'eslint.config.js': (inputFile) => {\n if (inputFile?.includes('skuba')) {\n const processedFile = inputFile.replace(\n /require.resolve\\(['\"](@seek\\/)?skuba\\/config\\/eslint['\"]\\)/,\n \"'skuba'\",\n );\n\n return formatPrettier(processedFile, { parser: 'typescript' });\n }\n\n return configFile;\n },\n\n 'package.json': withPackage(({ eslintConfig, ...data }) => data),\n };\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAGxB,MAAM,eAAe,YAA6B;AACvD,QAAM,aAAa,MAAM,qBAAqB,mBAAmB;AAEjE,SAAO;AAAA,IACL,GAAG;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA;AAAA,IAGA,oBAAoB,CAAC,cAAc;AACjC,UAAI,WAAW,SAAS,OAAO,GAAG;AAChC,cAAM,gBAAgB,UAAU;AAAA,UAC9B;AAAA,UACA;AAAA,QACF;AAEA,eAAO,eAAe,eAAe,EAAE,QAAQ,aAAa,CAAC;AAAA,MAC/D;AAEA,aAAO;AAAA,IACT;AAAA,IAEA,gBAAgB,YAAY,CAAC,EAAE,cAAc,GAAG,KAAK,MAAM,IAAI;AAAA,EACjE;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { readBaseTemplateFile } from "../../../utils/template.js";
|
|
3
2
|
import { mergeWithConfigFile } from "../processing/configFile.js";
|
|
4
|
-
|
|
3
|
+
const ignoreModule = async () => {
|
|
5
4
|
const [dockerFile, gitFile] = await Promise.all([
|
|
6
5
|
readBaseTemplateFile("_.dockerignore"),
|
|
7
6
|
readBaseTemplateFile("_.gitignore")
|
|
@@ -11,4 +10,7 @@ export const ignoreModule = async () => {
|
|
|
11
10
|
".gitignore": mergeWithConfigFile(gitFile)
|
|
12
11
|
};
|
|
13
12
|
};
|
|
13
|
+
export {
|
|
14
|
+
ignoreModule
|
|
15
|
+
};
|
|
14
16
|
//# sourceMappingURL=ignore.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/ignore.ts"],
|
|
4
4
|
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { mergeWithConfigFile } from '../processing/configFile.js';\nimport type { Module } from '../types.js';\n\nexport const ignoreModule = async (): Promise<Module> => {\n const [dockerFile, gitFile] = await Promise.all([\n readBaseTemplateFile('_.dockerignore'),\n readBaseTemplateFile('_.gitignore'),\n ]);\n\n return {\n '.dockerignore': mergeWithConfigFile(dockerFile),\n\n '.gitignore': mergeWithConfigFile(gitFile),\n };\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AAG7B,MAAM,eAAe,YAA6B;AACvD,QAAM,CAAC,YAAY,OAAO,IAAI,MAAM,QAAQ,IAAI;AAAA,IAC9C,qBAAqB,gBAAgB;AAAA,IACrC,qBAAqB,aAAa;AAAA,EACpC,CAAC;AAED,SAAO;AAAA,IACL,iBAAiB,oBAAoB,UAAU;AAAA,IAE/C,cAAc,oBAAoB,OAAO;AAAA,EAC3C;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { eslintModule } from "./eslint.js";
|
|
3
2
|
import { ignoreModule } from "./ignore.js";
|
|
4
3
|
import { nodemonModule } from "./nodemon.js";
|
|
@@ -7,7 +6,7 @@ import { prettierModule } from "./prettier.js";
|
|
|
7
6
|
import { renovateModule } from "./renovate.js";
|
|
8
7
|
import { serverlessModule } from "./serverless.js";
|
|
9
8
|
import { tslintModule } from "./tslint.js";
|
|
10
|
-
|
|
9
|
+
const loadModules = (opts) => Promise.all(
|
|
11
10
|
[
|
|
12
11
|
eslintModule,
|
|
13
12
|
ignoreModule,
|
|
@@ -19,4 +18,7 @@ export const loadModules = (opts) => Promise.all(
|
|
|
19
18
|
tslintModule
|
|
20
19
|
].map(async (createModule) => createModule(opts))
|
|
21
20
|
);
|
|
21
|
+
export {
|
|
22
|
+
loadModules
|
|
23
|
+
};
|
|
22
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/index.ts"],
|
|
4
4
|
"sourcesContent": ["import type { Module, Options } from '../types.js';\n\nimport { eslintModule } from './eslint.js';\nimport { ignoreModule } from './ignore.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 { tslintModule } from './tslint.js';\n\nexport const loadModules = (opts: Options): Promise<Module[]> =>\n Promise.all(\n [\n eslintModule,\n ignoreModule,\n nodemonModule,\n packageModule,\n prettierModule,\n renovateModule,\n serverlessModule,\n tslintModule,\n ].map(async (createModule) => createModule(opts)),\n );\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAEA,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AACjC,SAAS,oBAAoB;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,EACF,EAAE,IAAI,OAAO,iBAAiB,aAAa,IAAI,CAAC;AAClD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { deleteFiles } from "../processing/deleteFiles.js";
|
|
3
|
-
|
|
2
|
+
const nodemonModule = () => deleteFiles("nodemon.json");
|
|
3
|
+
export {
|
|
4
|
+
nodemonModule
|
|
5
|
+
};
|
|
4
6
|
//# sourceMappingURL=nodemon.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/nodemon.ts"],
|
|
4
4
|
"sourcesContent": ["import { deleteFiles } from '../processing/deleteFiles.js';\nimport type { Module } from '../types.js';\n\nexport const nodemonModule = (): Module => deleteFiles('nodemon.json');\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,SAAS,mBAAmB;AAGrB,MAAM,gBAAgB,MAAc,YAAY,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { getSkubaVersion } from "../../../utils/version.js";
|
|
3
2
|
import { deleteFiles } from "../processing/deleteFiles.js";
|
|
4
3
|
import { withPackage } from "../processing/package.js";
|
|
@@ -9,7 +8,7 @@ const DEFAULT_PACKAGE_FILES = [
|
|
|
9
8
|
"lib*/**/*.js.map",
|
|
10
9
|
"lib*/**/*.json"
|
|
11
10
|
];
|
|
12
|
-
|
|
11
|
+
const packageModule = async ({
|
|
13
12
|
entryPoint,
|
|
14
13
|
packageManager,
|
|
15
14
|
type
|
|
@@ -92,4 +91,7 @@ export const packageModule = async ({
|
|
|
92
91
|
})(inputFile)
|
|
93
92
|
};
|
|
94
93
|
};
|
|
94
|
+
export {
|
|
95
|
+
packageModule
|
|
96
|
+
};
|
|
95
97
|
//# sourceMappingURL=package.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/package.ts"],
|
|
4
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
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,aAAa;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,MAAM,gBAAgB;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,GAAG,YAAY,cAAc,mBAAmB;AAAA,IAEhD,gBAAgB,CAAC,cACf,YAAY,CAAC,cAAc;AACzB,YAAM,aAAa;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,9 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
import { readBaseTemplateFile } from "../../../utils/template.js";
|
|
3
2
|
import { mergeWithConfigFile } from "../processing/configFile.js";
|
|
4
3
|
import { deleteFiles } from "../processing/deleteFiles.js";
|
|
5
4
|
import { withPackage } from "../processing/package.js";
|
|
6
|
-
|
|
5
|
+
const prettierModule = async () => {
|
|
7
6
|
const [configFile, ignoreFile] = await Promise.all([
|
|
8
7
|
readBaseTemplateFile("_.prettierrc.js"),
|
|
9
8
|
readBaseTemplateFile("_.prettierignore")
|
|
@@ -23,4 +22,7 @@ export const prettierModule = async () => {
|
|
|
23
22
|
"package.json": withPackage(({ prettier, ...data }) => data)
|
|
24
23
|
};
|
|
25
24
|
};
|
|
25
|
+
export {
|
|
26
|
+
prettierModule
|
|
27
|
+
};
|
|
26
28
|
//# sourceMappingURL=prettier.js.map
|