skuba 14.0.0-esmify-skuba-20251105032119 → 14.0.0-hacky-hack-lang-json-20260108235938
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/config/eslint.js +1 -1
- package/config/jest.js +1 -0
- package/config/prettier.d.ts +4 -0
- package/config/prettier.js +2 -10
- package/jest/moduleNameMapper.js +64 -0
- package/jest/transform.js +62 -0
- package/jest/tsConfig.js +26 -0
- package/jest-preset.js +37 -0
- package/lib/api/jest/index.d.ts +15 -0
- package/lib/api/jest/index.js +59 -0
- package/lib/api/jest/index.js.map +7 -0
- package/lib/cli/adapter/eslint.js +45 -11
- package/lib/cli/adapter/eslint.js.map +3 -3
- package/lib/cli/adapter/prettier.js +67 -39
- package/lib/cli/adapter/prettier.js.map +2 -2
- package/lib/cli/build/args.js +42 -8
- package/lib/cli/build/args.js.map +2 -2
- package/lib/{src/cli → cli}/build/assets.d.ts +3 -2
- package/lib/cli/build/assets.js +60 -28
- package/lib/cli/build/assets.js.map +3 -3
- package/lib/cli/build/esbuild.d.ts +8 -0
- package/lib/cli/build/esbuild.js +64 -23
- package/lib/cli/build/esbuild.js.map +2 -2
- package/lib/cli/build/index.js +53 -21
- package/lib/cli/build/index.js.map +2 -2
- package/lib/cli/build/tsc.js +60 -24
- package/lib/cli/build/tsc.js.map +3 -3
- package/lib/cli/buildPackage/index.js +32 -8
- package/lib/cli/buildPackage/index.js.map +1 -1
- package/lib/cli/configure/analyseConfiguration.js +50 -16
- package/lib/cli/configure/analyseConfiguration.js.map +2 -2
- package/lib/{src/cli → cli}/configure/analyseDependencies.d.ts +1 -1
- package/lib/cli/configure/analyseDependencies.js +59 -25
- package/lib/cli/configure/analyseDependencies.js.map +3 -3
- package/lib/cli/configure/analysis/diff.js +29 -5
- package/lib/cli/configure/analysis/diff.js.map +2 -2
- package/lib/cli/configure/analysis/files.js +42 -8
- package/lib/cli/configure/analysis/files.js.map +2 -2
- package/lib/cli/configure/analysis/git.js +46 -12
- package/lib/cli/configure/analysis/git.js.map +2 -2
- package/lib/{src/cli → cli}/configure/analysis/package.d.ts +3 -2
- package/lib/cli/configure/analysis/package.js +45 -10
- package/lib/cli/configure/analysis/package.js.map +3 -3
- package/lib/cli/configure/analysis/project.js +50 -18
- package/lib/cli/configure/analysis/project.js.map +2 -2
- package/lib/cli/configure/dependencies/index.js +35 -7
- package/lib/cli/configure/dependencies/index.js.map +1 -1
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +28 -4
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +1 -1
- package/lib/cli/configure/dependencies/seekKoala.js +28 -4
- package/lib/cli/configure/dependencies/seekKoala.js.map +1 -1
- package/lib/cli/configure/dependencies/skuba.js +28 -4
- package/lib/cli/configure/dependencies/skuba.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDeps.js +26 -2
- package/lib/cli/configure/dependencies/skubaDeps.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDive.js +29 -4
- package/lib/cli/configure/dependencies/skubaDive.js.map +1 -1
- package/lib/{src/cli → cli}/configure/ensureTemplateCompletion.d.ts +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.js +63 -32
- package/lib/cli/configure/ensureTemplateCompletion.js.map +3 -3
- package/lib/{src/cli → cli}/configure/getEntryPoint.d.ts +2 -2
- package/lib/cli/configure/getEntryPoint.js +51 -19
- package/lib/cli/configure/getEntryPoint.js.map +3 -3
- package/lib/{src/cli → cli}/configure/getProjectType.d.ts +1 -1
- package/lib/cli/configure/getProjectType.js +36 -17
- package/lib/cli/configure/getProjectType.js.map +2 -2
- package/lib/cli/configure/index.js +91 -56
- package/lib/cli/configure/index.js.map +3 -3
- package/lib/cli/configure/modules/eslint.js +34 -10
- package/lib/cli/configure/modules/eslint.js.map +1 -1
- package/lib/cli/configure/modules/ignore.js +32 -8
- package/lib/cli/configure/modules/ignore.js.map +1 -1
- package/lib/cli/configure/modules/index.js +44 -18
- package/lib/cli/configure/modules/index.js.map +2 -2
- package/lib/cli/configure/modules/jest.d.ts +2 -0
- package/lib/cli/configure/modules/jest.js +86 -0
- package/lib/cli/configure/modules/jest.js.map +7 -0
- package/lib/cli/configure/modules/nodemon.js +28 -4
- package/lib/cli/configure/modules/nodemon.js.map +1 -1
- package/lib/cli/configure/modules/package.js +34 -10
- package/lib/cli/configure/modules/package.js.map +1 -1
- package/lib/cli/configure/modules/prettier.js +35 -11
- package/lib/cli/configure/modules/prettier.js.map +1 -1
- package/lib/cli/configure/modules/renovate.js +40 -17
- package/lib/cli/configure/modules/renovate.js.map +2 -2
- package/lib/cli/configure/modules/serverless.js +26 -2
- package/lib/cli/configure/modules/serverless.js.map +1 -1
- package/lib/cli/configure/modules/tslint.js +28 -4
- package/lib/cli/configure/modules/tslint.js.map +1 -1
- package/lib/cli/configure/processing/configFile.js +39 -3
- package/lib/cli/configure/processing/configFile.js.map +1 -1
- package/lib/cli/configure/processing/deleteFiles.js +26 -2
- package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
- package/lib/cli/configure/processing/javascript.js +27 -2
- package/lib/cli/configure/processing/javascript.js.map +1 -1
- package/lib/cli/configure/processing/json.js +31 -6
- package/lib/cli/configure/processing/json.js.map +1 -1
- package/lib/cli/configure/processing/loadFiles.js +26 -2
- package/lib/cli/configure/processing/loadFiles.js.map +1 -1
- package/lib/cli/configure/processing/module.js +28 -4
- package/lib/cli/configure/processing/module.js.map +1 -1
- package/lib/cli/configure/processing/package.d.ts +71 -0
- package/lib/cli/configure/processing/package.js +45 -8
- package/lib/cli/configure/processing/package.js.map +3 -3
- package/lib/cli/configure/processing/prettier.js +38 -4
- package/lib/cli/configure/processing/prettier.js.map +2 -2
- package/lib/cli/configure/processing/record.js +41 -5
- package/lib/cli/configure/processing/record.js.map +2 -2
- package/lib/cli/configure/processing/typescript.js +63 -26
- package/lib/cli/configure/processing/typescript.js.map +2 -2
- package/lib/{src/cli → cli}/configure/types.d.ts +4 -15
- package/lib/cli/configure/types.js +16 -0
- package/lib/cli/configure/types.js.map +3 -3
- package/lib/cli/format/index.js +44 -20
- package/lib/cli/format/index.js.map +2 -2
- package/lib/cli/help/index.js +30 -6
- package/lib/cli/help/index.js.map +1 -1
- package/lib/{src/cli → cli}/init/getConfig.d.ts +2 -2
- package/lib/cli/init/getConfig.js +121 -102
- package/lib/cli/init/getConfig.js.map +3 -3
- package/lib/cli/init/git.js +51 -16
- package/lib/cli/init/git.js.map +2 -2
- package/lib/cli/init/index.js +98 -67
- package/lib/cli/init/index.js.map +2 -2
- package/lib/{src/cli → cli}/init/prompts.d.ts +13 -10
- package/lib/cli/init/prompts.js +56 -35
- package/lib/cli/init/prompts.js.map +2 -2
- package/lib/cli/init/types.js +41 -7
- package/lib/cli/init/types.js.map +1 -1
- package/lib/cli/init/validation.js +30 -2
- package/lib/cli/init/validation.js.map +1 -1
- package/lib/cli/init/writePackageJson.js +42 -8
- package/lib/cli/init/writePackageJson.js.map +2 -2
- package/lib/cli/lint/annotate/buildkite/eslint.js +37 -3
- package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/index.js +45 -11
- package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/internal.js +37 -3
- package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/prettier.js +37 -3
- package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/tsc.js +37 -3
- package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
- package/lib/cli/lint/annotate/github/eslint.js +26 -2
- package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/github/index.js +45 -11
- package/lib/cli/lint/annotate/github/index.js.map +1 -1
- package/lib/cli/lint/annotate/github/internal.js +26 -2
- package/lib/cli/lint/annotate/github/internal.js.map +1 -1
- package/lib/cli/lint/annotate/github/prettier.js +26 -2
- package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/github/tsc.js +28 -4
- package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
- package/lib/cli/lint/annotate/index.js +30 -6
- package/lib/cli/lint/annotate/index.js.map +1 -1
- package/lib/{src/cli → cli}/lint/autofix.d.ts +5 -0
- package/lib/cli/lint/autofix.js +80 -40
- package/lib/cli/lint/autofix.js.map +2 -2
- package/lib/cli/lint/eslint.js +51 -16
- package/lib/cli/lint/eslint.js.map +3 -3
- package/lib/cli/lint/external.js +51 -19
- package/lib/cli/lint/external.js.map +2 -2
- package/lib/cli/lint/index.js +50 -28
- package/lib/cli/lint/index.js.map +2 -2
- package/lib/cli/lint/internal.js +44 -18
- package/lib/cli/lint/internal.js.map +2 -2
- package/lib/cli/lint/internalLints/detectBadCodeowners.js +33 -8
- package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +46 -14
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +3 -3
- package/lib/cli/lint/internalLints/patchRenovateConfig.js +55 -21
- package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
- package/lib/cli/lint/internalLints/refreshConfigFiles.js +64 -35
- package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +3 -3
- package/lib/{src/cli → cli}/lint/internalLints/upgrade/index.d.ts +2 -2
- package/lib/cli/lint/internalLints/upgrade/index.js +105 -41
- package/lib/cli/lint/internalLints/upgrade/index.js.map +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +28 -4
- 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 +45 -11
- 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.js +30 -6
- 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 +65 -34
- 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.js +46 -11
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js +28 -4
- 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 +59 -23
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js +28 -4
- 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 +46 -11
- package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js +30 -6
- 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 +46 -11
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +46 -11
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js +28 -4
- 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 +46 -11
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js +67 -29
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js +34 -10
- 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 +45 -11
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js +63 -17
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js +50 -15
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js +40 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.d.ts +3 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js +149 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js +55 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +51 -17
- 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.js +34 -10
- 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 +44 -10
- 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.js +46 -12
- 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.js +28 -4
- 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 +49 -15
- 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.js +45 -11
- 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.js +34 -10
- 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 +45 -11
- 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.js +45 -11
- 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.js +47 -13
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +28 -4
- 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 +45 -11
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
- package/lib/cli/lint/prettier.js +50 -15
- package/lib/cli/lint/prettier.js.map +3 -3
- package/lib/cli/lint/tsc.js +28 -4
- package/lib/cli/lint/tsc.js.map +1 -1
- package/lib/cli/lint/types.js +16 -0
- package/lib/cli/lint/types.js.map +3 -3
- package/lib/cli/migrate/index.d.ts +6 -0
- package/lib/cli/migrate/index.js +79 -15
- package/lib/cli/migrate/index.js.map +2 -2
- package/lib/cli/migrate/nodeVersion/checks.d.ts +1 -0
- package/lib/cli/migrate/nodeVersion/checks.js +51 -120
- package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
- package/lib/cli/migrate/nodeVersion/index.d.ts +10 -0
- package/lib/cli/migrate/nodeVersion/index.js +239 -65
- package/lib/cli/migrate/nodeVersion/index.js.map +3 -3
- package/lib/cli/migrate/nodeVersion/upgrade.d.ts +8 -0
- package/lib/cli/migrate/nodeVersion/upgrade.js +179 -0
- package/lib/cli/migrate/nodeVersion/upgrade.js.map +7 -0
- package/lib/cli/node/index.js +57 -20
- package/lib/cli/node/index.js.map +3 -3
- package/lib/cli/release/index.js +28 -4
- package/lib/cli/release/index.js.map +1 -1
- package/lib/cli/start/index.js +50 -16
- package/lib/cli/start/index.js.map +3 -3
- package/lib/cli/test/index.js +44 -4
- package/lib/cli/test/index.js.map +2 -2
- package/lib/cli/test/reporters/github/annotations.d.ts +9 -0
- package/lib/cli/test/reporters/github/annotations.js +102 -0
- package/lib/cli/test/reporters/github/annotations.js.map +7 -0
- package/lib/cli/test/reporters/github/index.d.ts +5 -0
- package/lib/cli/test/reporters/github/index.js +74 -0
- package/lib/cli/test/reporters/github/index.js.map +7 -0
- package/lib/cli/version/index.js +30 -6
- package/lib/cli/version/index.js.map +1 -1
- package/lib/{src/index.d.ts → index.d.ts} +1 -0
- package/lib/index.js +46 -6
- package/lib/index.js.map +2 -2
- package/lib/skuba.js +45 -26
- package/lib/skuba.js.map +3 -3
- package/lib/utils/args.js +43 -6
- package/lib/utils/args.js.map +2 -2
- package/lib/utils/command.js +42 -4
- package/lib/utils/command.js.map +3 -3
- package/lib/utils/copy.js +57 -20
- package/lib/utils/copy.js.map +2 -2
- package/lib/utils/dir.js +72 -32
- package/lib/utils/dir.js.map +2 -2
- package/lib/utils/env.js +26 -2
- package/lib/utils/env.js.map +1 -1
- package/lib/utils/error.js +47 -10
- package/lib/utils/error.js.map +1 -1
- package/lib/{src/utils → utils}/exec.d.ts +3 -2
- package/lib/utils/exec.js +62 -24
- package/lib/utils/exec.js.map +3 -3
- package/lib/utils/fs.js +40 -6
- package/lib/utils/fs.js.map +2 -2
- package/lib/utils/help.js +30 -6
- package/lib/utils/help.js.map +1 -1
- package/lib/{src/utils → utils}/logging.d.ts +9 -10
- package/lib/utils/logging.js +38 -11
- package/lib/utils/logging.js.map +2 -2
- package/lib/utils/logo.js +52 -25
- package/lib/utils/logo.js.map +2 -2
- package/lib/{src/utils → utils}/manifest.d.ts +2 -3
- package/lib/utils/manifest.js +48 -8
- package/lib/utils/manifest.js.map +3 -3
- package/lib/utils/npmrc.js +26 -2
- package/lib/utils/npmrc.js.map +1 -1
- package/lib/utils/packageManager.js +49 -12
- package/lib/utils/packageManager.js.map +2 -2
- package/lib/utils/port.js +39 -4
- package/lib/utils/port.js.map +2 -2
- package/lib/utils/sleep.js +26 -2
- package/lib/utils/sleep.js.map +1 -1
- package/lib/utils/template.js +55 -18
- package/lib/utils/template.js.map +3 -3
- package/lib/utils/validation.js +31 -2
- package/lib/utils/validation.js.map +1 -1
- package/lib/utils/version.js +46 -9
- package/lib/utils/version.js.map +2 -2
- package/lib/utils/wait.js +32 -7
- package/lib/utils/wait.js.map +1 -1
- package/lib/{src/utils → utils}/worker.d.ts +3 -3
- package/lib/utils/worker.js +35 -10
- package/lib/utils/worker.js.map +1 -1
- package/lib/wrapper/function-arguments.d.js +1 -0
- package/lib/wrapper/functionHandler.js +49 -18
- package/lib/wrapper/functionHandler.js.map +2 -2
- package/lib/wrapper/http.js +43 -8
- package/lib/wrapper/http.js.map +2 -2
- package/lib/wrapper/index.js +7 -6
- package/lib/wrapper/index.js.map +1 -1
- package/lib/wrapper/main.js +42 -8
- package/lib/wrapper/main.js.map +3 -3
- package/lib/wrapper/requestListener.js +47 -13
- package/lib/wrapper/requestListener.js.map +2 -2
- package/lib/wrapper/server.js +28 -4
- package/lib/wrapper/server.js.map +2 -2
- package/package.json +43 -45
- package/template/base/_.prettierrc.js +1 -1
- package/template/base/_eslint.config.js +1 -1
- package/template/base/_pnpm-workspace.yaml +4 -3
- package/template/base/jest.config.ts +19 -0
- package/template/base/jest.setup.ts +3 -0
- package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/express-rest-api/.nvmrc +1 -1
- package/template/express-rest-api/package.json +8 -9
- package/template/express-rest-api/skuba.template.js +1 -1
- package/template/express-rest-api/src/app.test.ts +0 -1
- package/template/greeter/.buildkite/pipeline.yml +1 -1
- package/template/greeter/.nvmrc +1 -1
- package/template/greeter/package.json +4 -5
- package/template/greeter/skuba.template.js +1 -1
- package/template/greeter/src/app.test.ts +1 -3
- package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/koa-rest-api/.nvmrc +1 -1
- package/template/koa-rest-api/package.json +9 -11
- package/template/koa-rest-api/skuba.template.js +1 -1
- package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +0 -2
- package/template/koa-rest-api/src/api/jobs/postJob.test.ts +0 -2
- package/template/koa-rest-api/src/app.test.ts +0 -2
- package/template/koa-rest-api/src/framework/server.test.ts +2 -2
- package/template/koa-rest-api/src/framework/validation.test.ts +0 -2
- package/template/koa-rest-api/src/testing/metrics.ts +0 -2
- package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
- package/template/lambda-sqs-worker-cdk/.nvmrc +1 -1
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +7 -21
- package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +9 -11
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +3 -3
- package/template/lambda-sqs-worker-cdk/infra/config.ts +2 -4
- package/template/lambda-sqs-worker-cdk/package.json +9 -9
- package/template/lambda-sqs-worker-cdk/skuba.template.js +13 -1
- package/template/lambda-sqs-worker-cdk/src/app.test.ts +13 -22
- package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +0 -1
- package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +31 -33
- package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +2 -8
- package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +2 -3
- package/template/lambda-sqs-worker-cdk/src/testing/services.ts +3 -4
- package/template/oss-npm-package/.github/workflows/release.yml +1 -1
- package/template/oss-npm-package/.github/workflows/validate.yml +1 -1
- package/template/oss-npm-package/.nvmrc +1 -1
- package/template/oss-npm-package/_package.json +0 -1
- package/template/oss-npm-package/skuba.template.js +1 -1
- package/template/oss-npm-package/src/index.test.ts +0 -2
- package/template/private-npm-package/.nvmrc +1 -1
- package/template/private-npm-package/_package.json +1 -2
- package/template/private-npm-package/skuba.template.js +2 -2
- package/template/private-npm-package/src/index.test.ts +0 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +0 -11
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +0 -7
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +0 -34
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +0 -7
- package/lib/config/prettier.d.ts +0 -7
- package/lib/enquirer.d.js +0 -1
- package/lib/enquirer.d.js.map +0 -7
- package/lib/eslint.d.js +0 -1
- package/lib/eslint.d.js.map +0 -7
- package/lib/src/cli/build/esbuild.d.ts +0 -6
- package/lib/src/cli/configure/processing/package.d.ts +0 -5
- package/lib/src/cli/migrate/index.d.ts +0 -1
- package/lib/src/cli/migrate/nodeVersion/checks.d.ts +0 -14
- package/lib/src/cli/migrate/nodeVersion/index.d.ts +0 -4
- package/template/base/vitest.config.ts +0 -25
- package/lib/{src/cli → cli}/adapter/eslint.d.ts +0 -0
- package/lib/{src/cli → cli}/adapter/prettier.d.ts +0 -0
- package/lib/{src/cli → cli}/build/args.d.ts +0 -0
- package/lib/{src/cli → cli}/build/index.d.ts +0 -0
- package/lib/{src/cli → cli}/build/tsc.d.ts +0 -0
- package/lib/{src/cli → cli}/buildPackage/index.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/analyseConfiguration.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/analysis/diff.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/analysis/files.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/analysis/git.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/analysis/project.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/dependencies/index.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/dependencies/seekDatadogCustomMetrics.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/dependencies/seekKoala.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/dependencies/skuba.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/dependencies/skubaDeps.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/dependencies/skubaDive.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/index.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/modules/eslint.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/modules/ignore.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/modules/index.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/modules/nodemon.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/modules/package.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/modules/prettier.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/modules/renovate.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/modules/serverless.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/modules/tslint.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/processing/configFile.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/processing/deleteFiles.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/processing/javascript.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/processing/json.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/processing/loadFiles.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/processing/module.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/processing/prettier.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/processing/record.d.ts +0 -0
- package/lib/{src/cli → cli}/configure/processing/typescript.d.ts +0 -0
- package/lib/{src/cli → cli}/format/index.d.ts +0 -0
- package/lib/{src/cli → cli}/help/index.d.ts +0 -0
- package/lib/{src/cli → cli}/init/git.d.ts +0 -0
- package/lib/{src/cli → cli}/init/index.d.ts +0 -0
- package/lib/{src/cli → cli}/init/types.d.ts +1 -1
- /package/lib/{src/cli → cli}/init/validation.d.ts +0 -0
- /package/lib/{src/cli → cli}/init/writePackageJson.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/annotate/buildkite/eslint.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/annotate/buildkite/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/annotate/buildkite/internal.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/annotate/buildkite/prettier.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/annotate/buildkite/tsc.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/annotate/github/eslint.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/annotate/github/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/annotate/github/internal.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/annotate/github/prettier.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/annotate/github/tsc.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/annotate/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/eslint.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/external.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internal.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/detectBadCodeowners.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/noSkubaTemplateJs.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/patchRenovateConfig.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/refreshConfigFiles.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/10.0.4/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/10.1.0/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.0.2/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.1.1/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.3.0/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.4.0/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.4.1/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.d.ts +0 -0
- /package/lib/{src/cli/lint/internalLints/upgrade/patches/7.3.1 → cli/lint/internalLints/upgrade/patches/13.1.1}/index.d.ts +0 -0
- /package/lib/{src/cli/lint/internalLints/upgrade/patches/9.1.0 → cli/lint/internalLints/upgrade/patches/13.1.1}/upgradeNode.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.d.ts +0 -0
- /package/lib/{src/cli/lint/internalLints/upgrade/patches/8.0.0 → cli/lint/internalLints/upgrade/patches/7.3.1}/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.d.ts +0 -0
- /package/lib/{src/cli/lint/internalLints/upgrade/patches/8.2.1 → cli/lint/internalLints/upgrade/patches/8.0.0}/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.d.ts +0 -0
- /package/lib/{src/cli/lint/internalLints/upgrade/patches/9.0.1 → cli/lint/internalLints/upgrade/patches/8.2.1}/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.d.ts +0 -0
- /package/lib/{src/cli/lint/internalLints/upgrade/patches/9.1.0 → cli/lint/internalLints/upgrade/patches/9.0.1}/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/prettier.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/tsc.d.ts +0 -0
- /package/lib/{src/cli → cli}/lint/types.d.ts +0 -0
- /package/lib/{src/cli → cli}/node/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/release/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/start/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/test/index.d.ts +0 -0
- /package/lib/{src/cli → cli}/version/index.d.ts +0 -0
- /package/lib/{src/skuba.d.ts → skuba.d.ts} +0 -0
- /package/lib/{src/utils → utils}/args.d.ts +0 -0
- /package/lib/{src/utils → utils}/command.d.ts +0 -0
- /package/lib/{src/utils → utils}/copy.d.ts +0 -0
- /package/lib/{src/utils → utils}/dir.d.ts +0 -0
- /package/lib/{src/utils → utils}/env.d.ts +0 -0
- /package/lib/{src/utils → utils}/error.d.ts +0 -0
- /package/lib/{src/utils → utils}/fs.d.ts +0 -0
- /package/lib/{src/utils → utils}/help.d.ts +0 -0
- /package/lib/{src/utils → utils}/logo.d.ts +0 -0
- /package/lib/{src/utils → utils}/npmrc.d.ts +0 -0
- /package/lib/{src/utils → utils}/packageManager.d.ts +0 -0
- /package/lib/{src/utils → utils}/port.d.ts +0 -0
- /package/lib/{src/utils → utils}/sleep.d.ts +0 -0
- /package/lib/{src/utils → utils}/template.d.ts +0 -0
- /package/lib/{src/utils → utils}/validation.d.ts +0 -0
- /package/lib/{src/utils → utils}/version.d.ts +0 -0
- /package/lib/{src/utils → utils}/wait.d.ts +0 -0
- /package/lib/{src/wrapper → wrapper}/functionHandler.d.ts +0 -0
- /package/lib/{src/wrapper → wrapper}/http.d.ts +0 -0
- /package/lib/{src/wrapper → wrapper}/index.d.ts +0 -0
- /package/lib/{src/wrapper → wrapper}/main.d.ts +0 -0
- /package/lib/{src/wrapper → wrapper}/requestListener.d.ts +0 -0
- /package/lib/{src/wrapper → wrapper}/server.d.ts +0 -0
|
@@ -1,7 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var package_exports = {};
|
|
20
|
+
__export(package_exports, {
|
|
21
|
+
packageModule: () => packageModule
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(package_exports);
|
|
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");
|
|
5
28
|
const DEFAULT_PACKAGE_FILES = [
|
|
6
29
|
"lib*/**/*.d.ts",
|
|
7
30
|
"lib*/**/*.js",
|
|
@@ -13,7 +36,7 @@ const packageModule = async ({
|
|
|
13
36
|
packageManager,
|
|
14
37
|
type
|
|
15
38
|
}) => {
|
|
16
|
-
const version = await getSkubaVersion();
|
|
39
|
+
const version = await (0, import_version.getSkubaVersion)();
|
|
17
40
|
const initialData = {
|
|
18
41
|
private: type !== "package",
|
|
19
42
|
scripts: {
|
|
@@ -39,9 +62,9 @@ const packageModule = async ({
|
|
|
39
62
|
}
|
|
40
63
|
};
|
|
41
64
|
return {
|
|
42
|
-
...deleteFiles(".npmignore", "package-lock.json"),
|
|
43
|
-
"package.json": (inputFile) => withPackage((inputData) => {
|
|
44
|
-
const outputData = merge(
|
|
65
|
+
...(0, import_deleteFiles.deleteFiles)(".npmignore", "package-lock.json"),
|
|
66
|
+
"package.json": (inputFile) => (0, import_package.withPackage)((inputData) => {
|
|
67
|
+
const outputData = (0, import_record.merge)(
|
|
45
68
|
inputData,
|
|
46
69
|
"skuba" in inputData ? recurringData : initialData
|
|
47
70
|
);
|
|
@@ -91,7 +114,8 @@ const packageModule = async ({
|
|
|
91
114
|
})(inputFile)
|
|
92
115
|
};
|
|
93
116
|
};
|
|
94
|
-
export
|
|
117
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
118
|
+
0 && (module.exports = {
|
|
95
119
|
packageModule
|
|
96
|
-
};
|
|
120
|
+
});
|
|
97
121
|
//# 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": "AAAA,
|
|
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,14 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var prettier_exports = {};
|
|
20
|
+
__export(prettier_exports, {
|
|
21
|
+
prettierModule: () => prettierModule
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(prettier_exports);
|
|
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");
|
|
5
28
|
const prettierModule = async () => {
|
|
6
29
|
const [configFile, ignoreFile] = await Promise.all([
|
|
7
|
-
readBaseTemplateFile("_.prettierrc.js"),
|
|
8
|
-
readBaseTemplateFile("_.prettierignore")
|
|
30
|
+
(0, import_template.readBaseTemplateFile)("_.prettierrc.js"),
|
|
31
|
+
(0, import_template.readBaseTemplateFile)("_.prettierignore")
|
|
9
32
|
]);
|
|
10
33
|
return {
|
|
11
|
-
...deleteFiles(
|
|
34
|
+
...(0, import_deleteFiles.deleteFiles)(
|
|
12
35
|
".prettierrc",
|
|
13
36
|
".prettierrc.json",
|
|
14
37
|
".prettierrc.toml",
|
|
@@ -16,13 +39,14 @@ const prettierModule = async () => {
|
|
|
16
39
|
".prettierrc.yml",
|
|
17
40
|
"prettier.config.js"
|
|
18
41
|
),
|
|
19
|
-
".prettierignore": mergeWithConfigFile(ignoreFile),
|
|
42
|
+
".prettierignore": (0, import_configFile.mergeWithConfigFile)(ignoreFile),
|
|
20
43
|
// enforce skuba opinions as there's no value in customising Prettier configs
|
|
21
44
|
".prettierrc.js": () => configFile,
|
|
22
|
-
"package.json": withPackage(({ prettier, ...data }) => data)
|
|
45
|
+
"package.json": (0, import_package.withPackage)(({ prettier, ...data }) => data)
|
|
23
46
|
};
|
|
24
47
|
};
|
|
25
|
-
export
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
26
50
|
prettierModule
|
|
27
|
-
};
|
|
51
|
+
});
|
|
28
52
|
//# sourceMappingURL=prettier.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/prettier.ts"],
|
|
4
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
|
-
"mappings": "AAAA,
|
|
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
|
}
|
|
@@ -1,8 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var renovate_exports = {};
|
|
20
|
+
__export(renovate_exports, {
|
|
21
|
+
RENOVATE_CONFIG_FILENAMES: () => RENOVATE_CONFIG_FILENAMES,
|
|
22
|
+
renovateModule: () => renovateModule
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(renovate_exports);
|
|
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");
|
|
6
30
|
const OTHER_CONFIG_FILENAMES = [
|
|
7
31
|
".github/renovate.json",
|
|
8
32
|
".renovaterc",
|
|
@@ -15,15 +39,15 @@ const RENOVATE_CONFIG_FILENAMES = [
|
|
|
15
39
|
...OTHER_CONFIG_FILENAMES
|
|
16
40
|
];
|
|
17
41
|
const renovateModule = async ({ type }) => {
|
|
18
|
-
const configFile = await readBaseTemplateFile(".github/renovate.json5");
|
|
42
|
+
const configFile = await (0, import_template.readBaseTemplateFile)(".github/renovate.json5");
|
|
19
43
|
return {
|
|
20
|
-
...deleteFiles(...OTHER_CONFIG_FILENAMES),
|
|
44
|
+
...(0, import_deleteFiles.deleteFiles)(...OTHER_CONFIG_FILENAMES),
|
|
21
45
|
".github/renovate.json5": (_inputFile, _files, initialFiles) => {
|
|
22
|
-
const inputFile = getFirstDefined(initialFiles, [
|
|
46
|
+
const inputFile = (0, import_record.getFirstDefined)(initialFiles, [
|
|
23
47
|
".github/renovate.json5",
|
|
24
48
|
...OTHER_CONFIG_FILENAMES
|
|
25
49
|
]);
|
|
26
|
-
return inputFile?.includes("seek") ? formatPrettier(inputFile, { parser: "json5" }) : configFile;
|
|
50
|
+
return inputFile?.includes("seek") ? (0, import_prettier.formatPrettier)(inputFile, { parser: "json5" }) : configFile;
|
|
27
51
|
},
|
|
28
52
|
/**
|
|
29
53
|
* Ensure Renovate correctly detects the project as an application/library.
|
|
@@ -31,16 +55,15 @@ const renovateModule = async ({ type }) => {
|
|
|
31
55
|
* @see {@link https://docs.renovatebot.com/configuration-options/#rangestrategy }
|
|
32
56
|
* @see {@link https://github.com/renovatebot/renovate/blob/8c361082842bb157d85ca39ecf4f6075730e74bb/lib/manager/npm/extract/type.ts#L3 }
|
|
33
57
|
*/
|
|
34
|
-
"package.json": withPackage(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
})
|
|
39
|
-
)
|
|
58
|
+
"package.json": (0, import_package.withPackage)(({ private: _, renovate, ...data }) => ({
|
|
59
|
+
...data,
|
|
60
|
+
private: type !== "package"
|
|
61
|
+
}))
|
|
40
62
|
};
|
|
41
63
|
};
|
|
42
|
-
export
|
|
64
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
+
0 && (module.exports = {
|
|
43
66
|
RENOVATE_CONFIG_FILENAMES,
|
|
44
67
|
renovateModule
|
|
45
|
-
};
|
|
68
|
+
});
|
|
46
69
|
//# sourceMappingURL=renovate.js.map
|
|
@@ -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.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
|
|
5
|
-
"mappings": "AAAA,
|
|
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
|
+
"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,3 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var serverless_exports = {};
|
|
20
|
+
__export(serverless_exports, {
|
|
21
|
+
serverlessModule: () => serverlessModule
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(serverless_exports);
|
|
1
24
|
const serverlessModule = ({}) => ({
|
|
2
25
|
"**/serverless*.yml": (inputFile, _files, _initialFiles) => {
|
|
3
26
|
if (!inputFile) {
|
|
@@ -6,7 +29,8 @@ const serverlessModule = ({}) => ({
|
|
|
6
29
|
return inputFile.replace(/- (\.?\/)?dist\//g, "- lib/").replace(/handler: (\.?\/)?dist\//g, "handler: lib/");
|
|
7
30
|
}
|
|
8
31
|
});
|
|
9
|
-
export
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
10
34
|
serverlessModule
|
|
11
|
-
};
|
|
35
|
+
});
|
|
12
36
|
//# sourceMappingURL=serverless.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/serverless.ts"],
|
|
4
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
|
-
"mappings": "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;",
|
|
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,6 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
5
17
|
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var tslint_exports = {};
|
|
20
|
+
__export(tslint_exports, {
|
|
21
|
+
tslintModule: () => tslintModule
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(tslint_exports);
|
|
24
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
25
|
+
const tslintModule = () => (0, import_deleteFiles.deleteFiles)("tslint.json", "tslint.yaml");
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
tslintModule
|
|
29
|
+
});
|
|
6
30
|
//# sourceMappingURL=tslint.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/tslint.ts"],
|
|
4
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
|
-
"mappings": "AAAA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAGrB,MAAM,eAAe,UAC1B,gCAAY,eAAe,aAAa;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var configFile_exports = {};
|
|
30
|
+
__export(configFile_exports, {
|
|
31
|
+
generateIgnoreFileSimpleVariants: () => generateIgnoreFileSimpleVariants,
|
|
32
|
+
mergeWithConfigFile: () => mergeWithConfigFile,
|
|
33
|
+
replaceManagedSection: () => replaceManagedSection
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(configFile_exports);
|
|
36
|
+
var z = __toESM(require("zod"));
|
|
2
37
|
const OUTDATED_PATTERNS = ["node_modules_bak/", "tmp-*/"];
|
|
3
38
|
const ASTERISKS = /\*/g;
|
|
4
39
|
const LEADING_SLASH = /^\//;
|
|
@@ -87,9 +122,10 @@ const mergeWithConfigFile = (rawTemplateFile, fileType = "ignore", packageJson)
|
|
|
87
122
|
`;
|
|
88
123
|
};
|
|
89
124
|
};
|
|
90
|
-
export
|
|
125
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
126
|
+
0 && (module.exports = {
|
|
91
127
|
generateIgnoreFileSimpleVariants,
|
|
92
128
|
mergeWithConfigFile,
|
|
93
129
|
replaceManagedSection
|
|
94
|
-
};
|
|
130
|
+
});
|
|
95
131
|
//# sourceMappingURL=configFile.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/configFile.ts"],
|
|
4
4
|
"sourcesContent": ["import * as z from 'zod';\n\n/**\n * Patterns that are superseded by skuba's bundled ignore file patterns and are\n * non-trivial to derive using e.g. `generateSimpleVariants`.\n */\nconst OUTDATED_PATTERNS = ['node_modules_bak/', 'tmp-*/'];\n\nconst ASTERISKS = /\\*/g;\nconst LEADING_SLASH = /^\\//;\nconst TRAILING_SLASH = /\\/$/;\n\n/**\n * Generate simple variants of an ignore pattern for exact matching purposes.\n *\n * Note that these patterns are not actually equivalent (e.g. `lib` matches more\n * than `lib/`) but they generally represent the same _intent_.\n */\nexport const generateIgnoreFileSimpleVariants = (patterns: string[]) => {\n const set = new Set<string>();\n\n for (const pattern of patterns) {\n const deAsterisked = pattern.replace(ASTERISKS, '');\n const stripped = deAsterisked\n .replace(LEADING_SLASH, '')\n .replace(TRAILING_SLASH, '');\n\n set.add(pattern);\n set.add(deAsterisked);\n set.add(deAsterisked.replace(LEADING_SLASH, ''));\n set.add(deAsterisked.replace(TRAILING_SLASH, ''));\n set.add(stripped);\n\n if (stripped !== '') {\n set.add(`/${stripped}`);\n set.add(`${stripped}/`);\n set.add(`/${stripped}/`);\n }\n }\n\n set.delete('');\n\n return set;\n};\n\nconst amendPnpmWorkspaceTemplate = (\n templateFile: string,\n packageJson?: string,\n) => {\n if (!packageJson) {\n return templateFile;\n }\n let rawJSON;\n try {\n rawJSON = JSON.parse(packageJson) as unknown;\n } catch {\n throw new Error('package.json is not valid JSON');\n }\n const parsed = z\n .object({\n minimumReleaseAgeExcludeOverload: z.array(z.string()).optional(),\n })\n .safeParse(rawJSON);\n\n const excludes = parsed.data?.minimumReleaseAgeExcludeOverload;\n if (\n !excludes ||\n Array.isArray(excludes) === false ||\n excludes.some((e) => typeof e !== 'string')\n ) {\n return templateFile;\n }\n\n const targetKey = 'minimumReleaseAgeExclude:';\n const index = templateFile.indexOf(targetKey);\n\n if (index === -1) {\n return templateFile;\n }\n\n const beforeKey = templateFile.substring(0, index);\n const afterKey = templateFile.substring(index + targetKey.length);\n const excludeLines = excludes.map((exclude) => ` - '${exclude}'`).join('\\n');\n\n return `${beforeKey + targetKey}\\n${excludeLines}${afterKey}`;\n};\n\nexport const replaceManagedSection = (input: string, template: string) =>\n input.replace(/# managed by skuba[\\s\\S]*# end managed by skuba/, template);\n\nexport const mergeWithConfigFile = (\n rawTemplateFile: string,\n fileType: 'ignore' | 'pnpm-workspace' = 'ignore',\n packageJson?: string,\n) => {\n const templateFile =\n fileType === 'pnpm-workspace'\n ? amendPnpmWorkspaceTemplate(rawTemplateFile.trim(), packageJson)\n : rawTemplateFile.trim();\n\n let generator: (s: string[], packageJson?: string) => Set<string>;\n\n switch (fileType) {\n case 'ignore':\n generator = generateIgnoreFileSimpleVariants;\n break;\n case 'pnpm-workspace':\n generator = () => new Set<string>();\n break;\n }\n\n const templatePatterns = generator(\n [\n ...OUTDATED_PATTERNS,\n ...templateFile.split('\\n').map((line) => line.trim()),\n ],\n packageJson,\n );\n\n return (rawInputFile?: string) => {\n if (rawInputFile === undefined) {\n return `${templateFile}\\n`;\n }\n\n const replacedFile = replaceManagedSection(\n rawInputFile.replace(/\\r?\\n/g, '\\n'),\n templateFile,\n );\n\n if (replacedFile.includes(templateFile)) {\n return replacedFile;\n }\n\n // Crunch the existing lines of a non-skuba config.\n const migratedFile = replacedFile\n .split('\\n')\n .filter((line) => !templatePatterns.has(line))\n .join('\\n')\n .replace(/\\n{3,}/g, '\\n\\n')\n .trim();\n\n const outputFile = [templateFile, migratedFile].join('\\n\\n').trim();\n\n return `${outputFile}\\n`;\n };\n};\n"],
|
|
5
|
-
"mappings": "AAAA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAAmB;AAMnB,MAAM,oBAAoB,CAAC,qBAAqB,QAAQ;AAExD,MAAM,YAAY;AAClB,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;AAQhB,MAAM,mCAAmC,CAAC,aAAuB;AACtE,QAAM,MAAM,oBAAI,IAAY;AAE5B,aAAW,WAAW,UAAU;AAC9B,UAAM,eAAe,QAAQ,QAAQ,WAAW,EAAE;AAClD,UAAM,WAAW,aACd,QAAQ,eAAe,EAAE,EACzB,QAAQ,gBAAgB,EAAE;AAE7B,QAAI,IAAI,OAAO;AACf,QAAI,IAAI,YAAY;AACpB,QAAI,IAAI,aAAa,QAAQ,eAAe,EAAE,CAAC;AAC/C,QAAI,IAAI,aAAa,QAAQ,gBAAgB,EAAE,CAAC;AAChD,QAAI,IAAI,QAAQ;AAEhB,QAAI,aAAa,IAAI;AACnB,UAAI,IAAI,IAAI,QAAQ,EAAE;AACtB,UAAI,IAAI,GAAG,QAAQ,GAAG;AACtB,UAAI,IAAI,IAAI,QAAQ,GAAG;AAAA,IACzB;AAAA,EACF;AAEA,MAAI,OAAO,EAAE;AAEb,SAAO;AACT;AAEA,MAAM,6BAA6B,CACjC,cACA,gBACG;AACH,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACT;AACA,MAAI;AACJ,MAAI;AACF,cAAU,KAAK,MAAM,WAAW;AAAA,EAClC,QAAQ;AACN,UAAM,IAAI,MAAM,gCAAgC;AAAA,EAClD;AACA,QAAM,SAAS,EACZ,OAAO;AAAA,IACN,kCAAkC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA,EACjE,CAAC,EACA,UAAU,OAAO;AAEpB,QAAM,WAAW,OAAO,MAAM;AAC9B,MACE,CAAC,YACD,MAAM,QAAQ,QAAQ,MAAM,SAC5B,SAAS,KAAK,CAAC,MAAM,OAAO,MAAM,QAAQ,GAC1C;AACA,WAAO;AAAA,EACT;AAEA,QAAM,YAAY;AAClB,QAAM,QAAQ,aAAa,QAAQ,SAAS;AAE5C,MAAI,UAAU,IAAI;AAChB,WAAO;AAAA,EACT;AAEA,QAAM,YAAY,aAAa,UAAU,GAAG,KAAK;AACjD,QAAM,WAAW,aAAa,UAAU,QAAQ,UAAU,MAAM;AAChE,QAAM,eAAe,SAAS,IAAI,CAAC,YAAY,QAAQ,OAAO,GAAG,EAAE,KAAK,IAAI;AAE5E,SAAO,GAAG,YAAY,SAAS;AAAA,EAAK,YAAY,GAAG,QAAQ;AAC7D;AAEO,MAAM,wBAAwB,CAAC,OAAe,aACnD,MAAM,QAAQ,mDAAmD,QAAQ;AAEpE,MAAM,sBAAsB,CACjC,iBACA,WAAwC,UACxC,gBACG;AACH,QAAM,eACJ,aAAa,mBACT,2BAA2B,gBAAgB,KAAK,GAAG,WAAW,IAC9D,gBAAgB,KAAK;AAE3B,MAAI;AAEJ,UAAQ,UAAU;AAAA,IAChB,KAAK;AACH,kBAAY;AACZ;AAAA,IACF,KAAK;AACH,kBAAY,MAAM,oBAAI,IAAY;AAClC;AAAA,EACJ;AAEA,QAAM,mBAAmB;AAAA,IACvB;AAAA,MACE,GAAG;AAAA,MACH,GAAG,aAAa,MAAM,IAAI,EAAE,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC;AAAA,IACvD;AAAA,IACA;AAAA,EACF;AAEA,SAAO,CAAC,iBAA0B;AAChC,QAAI,iBAAiB,QAAW;AAC9B,aAAO,GAAG,YAAY;AAAA;AAAA,IACxB;AAEA,UAAM,eAAe;AAAA,MACnB,aAAa,QAAQ,UAAU,IAAI;AAAA,MACnC;AAAA,IACF;AAEA,QAAI,aAAa,SAAS,YAAY,GAAG;AACvC,aAAO;AAAA,IACT;AAGA,UAAM,eAAe,aAClB,MAAM,IAAI,EACV,OAAO,CAAC,SAAS,CAAC,iBAAiB,IAAI,IAAI,CAAC,EAC5C,KAAK,IAAI,EACT,QAAQ,WAAW,MAAM,EACzB,KAAK;AAER,UAAM,aAAa,CAAC,cAAc,YAAY,EAAE,KAAK,MAAM,EAAE,KAAK;AAElE,WAAO,GAAG,UAAU;AAAA;AAAA,EACtB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var deleteFiles_exports = {};
|
|
20
|
+
__export(deleteFiles_exports, {
|
|
21
|
+
deleteFiles: () => deleteFiles
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(deleteFiles_exports);
|
|
1
24
|
const deleteFiles = (...filenames) => Object.fromEntries(
|
|
2
25
|
filenames.map((filename) => [filename, () => void 0])
|
|
3
26
|
);
|
|
4
|
-
export
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
5
29
|
deleteFiles
|
|
6
|
-
};
|
|
30
|
+
});
|
|
7
31
|
//# sourceMappingURL=deleteFiles.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/deleteFiles.ts"],
|
|
4
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
|
-
"mappings": "AAKO,MAAM,cAAc,IAAI,cAC7B,OAAO;AAAA,EACL,UAAU,IAAI,CAAC,aAAa,CAAC,UAAU,MAAM,MAAS,CAAU;AAClE;",
|
|
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
|
}
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var javascript_exports = {};
|
|
20
|
+
__export(javascript_exports, {
|
|
21
|
+
prependImport: () => prependImport,
|
|
22
|
+
stripImports: () => stripImports
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(javascript_exports);
|
|
1
25
|
const prependImport = (name, file) => [`import '${name}';
|
|
2
26
|
`, file].filter((value) => value !== void 0).join("\n");
|
|
3
27
|
const stripImports = (names, inputFile) => {
|
|
@@ -6,8 +30,9 @@ const stripImports = (names, inputFile) => {
|
|
|
6
30
|
return `${outputFile}
|
|
7
31
|
`;
|
|
8
32
|
};
|
|
9
|
-
export
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
10
35
|
prependImport,
|
|
11
36
|
stripImports
|
|
12
|
-
};
|
|
37
|
+
});
|
|
13
38
|
//# sourceMappingURL=javascript.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/javascript.ts"],
|
|
4
4
|
"sourcesContent": ["export const prependImport = (name: string, file?: string) =>\n [`import '${name}';\\n`, file]\n .filter((value) => value !== undefined)\n .join('\\n');\n\nexport const stripImports = (names: readonly string[], inputFile: string) => {\n const searchStrings = names.flatMap((name) => [`'${name}'`, `\"${name}\"`]);\n\n const outputFile = inputFile\n .split(/\\r?\\n/)\n .filter((line) => !searchStrings.some((str) => line.includes(str)))\n .join('\\n')\n .trim();\n\n return `${outputFile}\\n`;\n};\n"],
|
|
5
|
-
"mappings": "AAAO,MAAM,gBAAgB,CAAC,MAAc,SAC1C,CAAC,WAAW,IAAI;AAAA,GAAQ,IAAI,EACzB,OAAO,CAAC,UAAU,UAAU,MAAS,EACrC,KAAK,IAAI;AAEP,MAAM,eAAe,CAAC,OAA0B,cAAsB;AAC3E,QAAM,gBAAgB,MAAM,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC;AAExE,QAAM,aAAa,UAChB,MAAM,OAAO,EACb,OAAO,CAAC,SAAS,CAAC,cAAc,KAAK,CAAC,QAAQ,KAAK,SAAS,GAAG,CAAC,CAAC,EACjE,KAAK,IAAI,EACT,KAAK;AAER,SAAO,GAAG,UAAU;AAAA;AACtB;",
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,gBAAgB,CAAC,MAAc,SAC1C,CAAC,WAAW,IAAI;AAAA,GAAQ,IAAI,EACzB,OAAO,CAAC,UAAU,UAAU,MAAS,EACrC,KAAK,IAAI;AAEP,MAAM,eAAe,CAAC,OAA0B,cAAsB;AAC3E,QAAM,gBAAgB,MAAM,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC;AAExE,QAAM,aAAa,UAChB,MAAM,OAAO,EACb,OAAO,CAAC,SAAS,CAAC,cAAc,KAAK,CAAC,QAAQ,KAAK,SAAS,GAAG,CAAC,CAAC,EACjE,KAAK,IAAI,EACT,KAAK;AAER,SAAO,GAAG,UAAU;AAAA;AACtB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var json_exports = {};
|
|
20
|
+
__export(json_exports, {
|
|
21
|
+
formatObject: () => formatObject,
|
|
22
|
+
parseObject: () => parseObject
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(json_exports);
|
|
25
|
+
var import_validation = require("../../../utils/validation.js");
|
|
26
|
+
var import_prettier = require("./prettier.js");
|
|
3
27
|
const formatObject = (data, filepath) => {
|
|
4
28
|
const sortedData = Object.fromEntries(
|
|
5
29
|
Object.entries(data).sort(
|
|
@@ -7,7 +31,7 @@ const formatObject = (data, filepath) => {
|
|
|
7
31
|
)
|
|
8
32
|
);
|
|
9
33
|
const output = JSON.stringify(sortedData, null, 2);
|
|
10
|
-
return formatPrettier(
|
|
34
|
+
return (0, import_prettier.formatPrettier)(
|
|
11
35
|
output,
|
|
12
36
|
filepath === void 0 ? { parser: "json" } : { filepath }
|
|
13
37
|
);
|
|
@@ -18,15 +42,16 @@ const parseObject = (input) => {
|
|
|
18
42
|
}
|
|
19
43
|
try {
|
|
20
44
|
const data = JSON.parse(input);
|
|
21
|
-
if (isObject(data)) {
|
|
45
|
+
if ((0, import_validation.isObject)(data)) {
|
|
22
46
|
return data;
|
|
23
47
|
}
|
|
24
48
|
} catch {
|
|
25
49
|
}
|
|
26
50
|
return;
|
|
27
51
|
};
|
|
28
|
-
export
|
|
52
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
+
0 && (module.exports = {
|
|
29
54
|
formatObject,
|
|
30
55
|
parseObject
|
|
31
|
-
};
|
|
56
|
+
});
|
|
32
57
|
//# sourceMappingURL=json.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/json.ts"],
|
|
4
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
|
-
"mappings": "AAAA,
|
|
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
|
}
|