skuba 13.0.3 → 14.0.0-esmify-skuba-20251031135439
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/prettier.js +10 -2
- package/lib/cli/adapter/eslint.js +10 -46
- package/lib/cli/adapter/eslint.js.map +2 -2
- package/lib/cli/adapter/prettier.js +40 -72
- package/lib/cli/adapter/prettier.js.map +2 -2
- package/lib/cli/build/args.js +7 -43
- package/lib/cli/build/args.js.map +2 -2
- package/lib/cli/build/assets.js +27 -62
- package/lib/cli/build/assets.js.map +2 -2
- package/lib/cli/build/esbuild.js +20 -55
- package/lib/cli/build/esbuild.js.map +3 -3
- package/lib/cli/build/index.js +20 -56
- package/lib/cli/build/index.js.map +2 -2
- package/lib/cli/build/tsc.js +24 -66
- package/lib/cli/build/tsc.js.map +2 -2
- package/lib/cli/buildPackage/index.js +7 -33
- package/lib/cli/buildPackage/index.js.map +1 -1
- package/lib/cli/configure/analyseConfiguration.js +15 -51
- package/lib/cli/configure/analyseConfiguration.js.map +2 -2
- package/lib/cli/configure/analyseDependencies.js +24 -60
- package/lib/cli/configure/analyseDependencies.js.map +3 -3
- package/lib/cli/configure/analysis/diff.js +4 -40
- package/lib/cli/configure/analysis/diff.js.map +2 -2
- package/lib/cli/configure/analysis/files.js +7 -43
- package/lib/cli/configure/analysis/files.js.map +2 -2
- package/lib/cli/configure/analysis/git.js +11 -47
- package/lib/cli/configure/analysis/git.js.map +2 -2
- package/lib/cli/configure/analysis/package.js +10 -48
- package/lib/cli/configure/analysis/package.js.map +3 -3
- package/lib/cli/configure/analysis/project.js +18 -53
- package/lib/cli/configure/analysis/project.js.map +2 -2
- package/lib/cli/configure/dependencies/index.js +5 -39
- package/lib/cli/configure/dependencies/index.js.map +1 -1
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +3 -29
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +1 -1
- package/lib/cli/configure/dependencies/seekKoala.js +3 -29
- package/lib/cli/configure/dependencies/seekKoala.js.map +1 -1
- package/lib/cli/configure/dependencies/skuba.js +3 -29
- package/lib/cli/configure/dependencies/skuba.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDeps.js +1 -27
- package/lib/cli/configure/dependencies/skubaDeps.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDive.js +4 -32
- package/lib/cli/configure/dependencies/skubaDive.js.map +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.js +31 -61
- package/lib/cli/configure/ensureTemplateCompletion.js.map +3 -3
- package/lib/cli/configure/getEntryPoint.js +13 -49
- package/lib/cli/configure/getEntryPoint.js.map +3 -3
- package/lib/cli/configure/getProjectType.js +13 -36
- package/lib/cli/configure/getProjectType.js.map +2 -2
- package/lib/cli/configure/index.js +49 -85
- package/lib/cli/configure/index.js.map +3 -3
- package/lib/cli/configure/modules/eslint.js +9 -35
- package/lib/cli/configure/modules/eslint.js.map +1 -1
- package/lib/cli/configure/modules/ignore.js +7 -33
- package/lib/cli/configure/modules/ignore.js.map +1 -1
- package/lib/cli/configure/modules/index.js +17 -45
- package/lib/cli/configure/modules/index.js.map +2 -2
- package/lib/cli/configure/modules/nodemon.js +2 -28
- package/lib/cli/configure/modules/nodemon.js.map +1 -1
- package/lib/cli/configure/modules/package.js +9 -35
- package/lib/cli/configure/modules/package.js.map +1 -1
- package/lib/cli/configure/modules/prettier.js +10 -36
- package/lib/cli/configure/modules/prettier.js.map +1 -1
- package/lib/cli/configure/modules/renovate.js +17 -43
- package/lib/cli/configure/modules/renovate.js.map +2 -2
- package/lib/cli/configure/modules/serverless.js +1 -27
- package/lib/cli/configure/modules/serverless.js.map +1 -1
- package/lib/cli/configure/modules/tslint.js +2 -28
- package/lib/cli/configure/modules/tslint.js.map +1 -1
- package/lib/cli/configure/processing/configFile.js +4 -44
- package/lib/cli/configure/processing/configFile.js.map +1 -1
- package/lib/cli/configure/processing/deleteFiles.js +1 -27
- package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
- package/lib/cli/configure/processing/javascript.js +2 -30
- package/lib/cli/configure/processing/javascript.js.map +1 -1
- package/lib/cli/configure/processing/json.js +6 -34
- package/lib/cli/configure/processing/json.js.map +1 -1
- package/lib/cli/configure/processing/loadFiles.js +1 -27
- package/lib/cli/configure/processing/loadFiles.js.map +1 -1
- package/lib/cli/configure/processing/module.js +2 -28
- package/lib/cli/configure/processing/module.js.map +1 -1
- package/lib/cli/configure/processing/package.js +10 -52
- package/lib/cli/configure/processing/package.js.map +3 -3
- package/lib/cli/configure/processing/prettier.js +3 -39
- package/lib/cli/configure/processing/prettier.js.map +2 -2
- package/lib/cli/configure/processing/record.js +4 -44
- package/lib/cli/configure/processing/record.js.map +2 -2
- package/lib/cli/configure/processing/typescript.js +28 -70
- package/lib/cli/configure/processing/typescript.js.map +2 -2
- package/lib/cli/configure/types.js +0 -15
- package/lib/cli/configure/types.js.map +3 -3
- package/lib/cli/format/index.js +19 -55
- package/lib/cli/format/index.js.map +2 -2
- package/lib/cli/help/index.js +5 -31
- package/lib/cli/help/index.js.map +1 -1
- package/lib/cli/init/getConfig.js +75 -107
- package/lib/cli/init/getConfig.js.map +3 -3
- package/lib/cli/init/git.js +16 -54
- package/lib/cli/init/git.js.map +3 -3
- package/lib/cli/init/index.js +66 -99
- package/lib/cli/init/index.js.map +2 -2
- package/lib/cli/init/prompts.js +20 -56
- package/lib/cli/init/prompts.js.map +3 -3
- package/lib/cli/init/types.js +6 -42
- package/lib/cli/init/types.js.map +1 -1
- package/lib/cli/init/validation.js +5 -39
- package/lib/cli/init/validation.js.map +1 -1
- package/lib/cli/init/writePackageJson.js +7 -43
- package/lib/cli/init/writePackageJson.js.map +2 -2
- package/lib/cli/lint/annotate/buildkite/eslint.js +2 -38
- package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/index.js +10 -46
- package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/internal.js +2 -38
- package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/prettier.js +2 -38
- package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/tsc.js +2 -38
- package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
- package/lib/cli/lint/annotate/github/eslint.js +1 -27
- package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/github/index.js +10 -46
- package/lib/cli/lint/annotate/github/index.js.map +1 -1
- package/lib/cli/lint/annotate/github/internal.js +1 -27
- package/lib/cli/lint/annotate/github/internal.js.map +1 -1
- package/lib/cli/lint/annotate/github/prettier.js +1 -27
- package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/github/tsc.js +3 -29
- package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
- package/lib/cli/lint/annotate/index.js +5 -31
- package/lib/cli/lint/annotate/index.js.map +1 -1
- package/lib/cli/lint/autofix.js +38 -78
- package/lib/cli/lint/autofix.js.map +3 -3
- package/lib/cli/lint/eslint.js +14 -52
- package/lib/cli/lint/eslint.js.map +3 -3
- package/lib/cli/lint/external.js +18 -53
- package/lib/cli/lint/external.js.map +2 -2
- package/lib/cli/lint/index.js +24 -50
- package/lib/cli/lint/index.js.map +1 -1
- package/lib/cli/lint/internal.js +17 -53
- package/lib/cli/lint/internal.js.map +2 -2
- package/lib/cli/lint/internalLints/detectBadCodeowners.js +8 -36
- package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +10 -46
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +3 -3
- package/lib/cli/lint/internalLints/patchRenovateConfig.js +20 -56
- package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
- package/lib/cli/lint/internalLints/refreshConfigFiles.js +33 -68
- package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/index.js +21 -54
- package/lib/cli/lint/internalLints/upgrade/index.js.map +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +3 -29
- 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 +10 -46
- 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 +5 -31
- 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 +36 -73
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +11 -49
- 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 +3 -29
- 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 +24 -64
- 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 +3 -29
- 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 +11 -49
- 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 +5 -31
- 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 +11 -49
- 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 +11 -49
- 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 +3 -29
- 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 +11 -49
- 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 +32 -76
- 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 +9 -35
- 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 +10 -46
- 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 +28 -88
- 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 +15 -53
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +16 -52
- 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 +9 -35
- 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 +9 -45
- 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 +11 -47
- 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 +3 -29
- 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 +14 -50
- 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 +10 -46
- 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 +9 -40
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +10 -46
- 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 +10 -46
- 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 +12 -48
- 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 +3 -29
- 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 +10 -46
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +3 -29
- 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 +7 -33
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +1 -1
- package/lib/cli/lint/prettier.js +13 -51
- package/lib/cli/lint/prettier.js.map +3 -3
- package/lib/cli/lint/tsc.js +3 -29
- package/lib/cli/lint/tsc.js.map +1 -1
- package/lib/cli/lint/types.js +0 -15
- package/lib/cli/lint/types.js.map +3 -3
- package/lib/cli/migrate/index.js +9 -35
- package/lib/cli/migrate/index.js.map +1 -1
- package/lib/cli/migrate/nodeVersion/checks.js +26 -68
- package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
- package/lib/cli/migrate/nodeVersion/index.js +24 -56
- package/lib/cli/migrate/nodeVersion/index.js.map +2 -2
- package/lib/cli/node/index.js +20 -60
- package/lib/cli/node/index.js.map +3 -3
- package/lib/cli/release/index.js +3 -29
- package/lib/cli/release/index.js.map +1 -1
- package/lib/cli/start/index.js +15 -51
- package/lib/cli/start/index.js.map +3 -3
- package/lib/cli/test/index.js +3 -45
- package/lib/cli/test/index.js.map +2 -2
- package/lib/cli/version/index.js +5 -31
- package/lib/cli/version/index.js.map +1 -1
- package/lib/config/prettier.d.ts +7 -0
- package/lib/index.js +4 -49
- package/lib/index.js.map +2 -2
- package/lib/skuba.js +26 -44
- package/lib/skuba.js.map +3 -3
- package/lib/{cli → src/cli}/configure/analyseDependencies.d.ts +1 -1
- package/lib/{cli → src/cli}/configure/analysis/package.d.ts +2 -3
- package/lib/{cli → src/cli}/configure/ensureTemplateCompletion.d.ts +1 -1
- package/lib/{cli → src/cli}/configure/getEntryPoint.d.ts +1 -1
- package/lib/{cli → src/cli}/configure/getProjectType.d.ts +1 -1
- package/lib/src/cli/configure/processing/package.d.ts +5 -0
- package/lib/{cli → src/cli}/configure/types.d.ts +15 -4
- package/lib/{cli → src/cli}/init/getConfig.d.ts +1 -1
- package/lib/{cli → src/cli}/init/prompts.d.ts +4 -4
- package/lib/{cli → src/cli}/lint/internalLints/upgrade/index.d.ts +1 -1
- package/lib/{index.d.ts → src/index.d.ts} +0 -1
- package/lib/src/utils/fs.d.ts +1 -0
- package/lib/{utils → src/utils}/manifest.d.ts +3 -2
- package/lib/src/utils/sleep.d.ts +5 -0
- package/lib/{utils → src/utils}/wait.d.ts +0 -4
- package/lib/{wrapper → src/wrapper}/http.d.ts +0 -6
- package/lib/src/wrapper/server.d.ts +7 -0
- package/lib/utils/args.js +8 -50
- package/lib/utils/args.js.map +2 -2
- package/lib/utils/command.js +6 -50
- package/lib/utils/command.js.map +3 -3
- package/lib/utils/copy.js +22 -64
- package/lib/utils/copy.js.map +2 -2
- package/lib/utils/dir.js +37 -84
- package/lib/utils/dir.js.map +3 -3
- package/lib/utils/env.js +1 -27
- package/lib/utils/env.js.map +1 -1
- package/lib/utils/error.js +11 -53
- package/lib/utils/error.js.map +1 -1
- package/lib/utils/exec.js +26 -70
- package/lib/utils/exec.js.map +3 -3
- package/lib/utils/fs.js +15 -0
- package/lib/utils/fs.js.map +7 -0
- package/lib/utils/help.js +5 -31
- package/lib/utils/help.js.map +1 -1
- package/lib/utils/logging.js +13 -55
- package/lib/utils/logging.js.map +2 -2
- package/lib/utils/logo.js +23 -59
- package/lib/utils/logo.js.map +2 -2
- package/lib/utils/manifest.js +12 -60
- package/lib/utils/manifest.js.map +3 -3
- package/lib/utils/npmrc.js +1 -27
- package/lib/utils/npmrc.js.map +1 -1
- package/lib/utils/packageManager.js +14 -56
- package/lib/utils/packageManager.js.map +2 -2
- package/lib/utils/port.js +4 -42
- package/lib/utils/port.js.map +2 -2
- package/lib/utils/sleep.js +9 -0
- package/lib/utils/sleep.js.map +7 -0
- package/lib/utils/template.js +21 -68
- package/lib/utils/template.js.map +3 -3
- package/lib/utils/validation.js +6 -42
- package/lib/utils/validation.js.map +1 -1
- package/lib/utils/version.js +11 -53
- package/lib/utils/version.js.map +2 -2
- package/lib/utils/wait.js +6 -42
- package/lib/utils/wait.js.map +2 -2
- package/lib/utils/worker.js +9 -37
- package/lib/utils/worker.js.map +1 -1
- package/lib/wrapper/functionHandler.js +17 -50
- package/lib/wrapper/functionHandler.js.map +2 -2
- package/lib/wrapper/http.js +7 -53
- package/lib/wrapper/http.js.map +3 -3
- package/lib/wrapper/index.js +6 -6
- package/lib/wrapper/index.js.map +1 -1
- package/lib/wrapper/main.js +7 -43
- package/lib/wrapper/main.js.map +3 -3
- package/lib/wrapper/requestListener.js +12 -47
- package/lib/wrapper/requestListener.js.map +3 -3
- package/lib/wrapper/server.js +9 -0
- package/lib/wrapper/server.js.map +7 -0
- package/package.json +19 -24
- package/template/base/_.prettierrc.js +1 -1
- package/template/base/_eslint.config.js +1 -1
- package/template/base/_pnpm-workspace.yaml +3 -2
- package/template/base/vitest.config.ts +25 -0
- package/template/express-rest-api/.gantry/dev.yml +2 -2
- package/template/express-rest-api/.gantry/prod.yml +2 -2
- package/template/express-rest-api/package.json +6 -5
- package/template/express-rest-api/skuba.template.js +1 -1
- package/template/express-rest-api/src/app.test.ts +1 -0
- package/template/greeter/package.json +4 -3
- package/template/greeter/skuba.template.js +1 -1
- package/template/greeter/src/app.test.ts +3 -1
- package/template/koa-rest-api/.gantry/dev.yml +2 -2
- package/template/koa-rest-api/.gantry/prod.yml +2 -2
- package/template/koa-rest-api/package.json +6 -5
- package/template/koa-rest-api/skuba.template.js +1 -1
- package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +2 -0
- package/template/koa-rest-api/src/api/jobs/postJob.test.ts +2 -0
- package/template/koa-rest-api/src/app.test.ts +2 -0
- package/template/koa-rest-api/src/framework/server.test.ts +2 -2
- package/template/koa-rest-api/src/framework/validation.test.ts +2 -0
- package/template/koa-rest-api/src/testing/metrics.ts +2 -0
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +15 -3
- package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +11 -9
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +1 -1
- package/template/lambda-sqs-worker-cdk/package.json +6 -5
- package/template/lambda-sqs-worker-cdk/skuba.template.js +1 -1
- package/template/lambda-sqs-worker-cdk/src/app.test.ts +22 -13
- package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +1 -0
- package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +33 -31
- package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +8 -2
- package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +3 -2
- package/template/lambda-sqs-worker-cdk/src/testing/services.ts +4 -3
- 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/_package.json +1 -0
- package/template/oss-npm-package/skuba.template.js +1 -1
- package/template/oss-npm-package/src/index.test.ts +2 -0
- package/template/private-npm-package/_package.json +1 -0
- package/template/private-npm-package/skuba.template.js +1 -1
- package/template/private-npm-package/src/index.test.ts +2 -0
- package/config/jest.js +0 -1
- package/config/prettier.d.ts +0 -4
- package/jest/moduleNameMapper.js +0 -64
- package/jest/transform.js +0 -62
- package/jest/tsConfig.js +0 -26
- package/jest-preset.js +0 -37
- package/lib/api/jest/index.d.ts +0 -15
- package/lib/api/jest/index.js +0 -59
- package/lib/api/jest/index.js.map +0 -7
- package/lib/cli/configure/modules/jest.d.ts +0 -2
- package/lib/cli/configure/modules/jest.js +0 -86
- package/lib/cli/configure/modules/jest.js.map +0 -7
- package/lib/cli/configure/processing/package.d.ts +0 -71
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.d.ts +0 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js +0 -144
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js.map +0 -7
- package/lib/cli/test/reporters/github/annotations.d.ts +0 -9
- package/lib/cli/test/reporters/github/annotations.js +0 -102
- package/lib/cli/test/reporters/github/annotations.js.map +0 -7
- package/lib/cli/test/reporters/github/index.d.ts +0 -5
- package/lib/cli/test/reporters/github/index.js +0 -74
- package/lib/cli/test/reporters/github/index.js.map +0 -7
- package/template/base/jest.config.ts +0 -19
- package/template/base/jest.setup.ts +0 -3
- /package/lib/{cli → src/cli}/adapter/eslint.d.ts +0 -0
- /package/lib/{cli → src/cli}/adapter/prettier.d.ts +0 -0
- /package/lib/{cli → src/cli}/build/args.d.ts +0 -0
- /package/lib/{cli → src/cli}/build/assets.d.ts +0 -0
- /package/lib/{cli → src/cli}/build/esbuild.d.ts +0 -0
- /package/lib/{cli → src/cli}/build/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/build/tsc.d.ts +0 -0
- /package/lib/{cli → src/cli}/buildPackage/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/analyseConfiguration.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/analysis/diff.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/analysis/files.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/analysis/git.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/analysis/project.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/dependencies/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/dependencies/seekDatadogCustomMetrics.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/dependencies/seekKoala.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/dependencies/skuba.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/dependencies/skubaDeps.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/dependencies/skubaDive.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/modules/eslint.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/modules/ignore.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/modules/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/modules/nodemon.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/modules/package.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/modules/prettier.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/modules/renovate.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/modules/serverless.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/modules/tslint.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/processing/configFile.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/processing/deleteFiles.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/processing/javascript.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/processing/json.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/processing/loadFiles.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/processing/module.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/processing/prettier.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/processing/record.d.ts +0 -0
- /package/lib/{cli → src/cli}/configure/processing/typescript.d.ts +0 -0
- /package/lib/{cli → src/cli}/format/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/help/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/init/git.d.ts +0 -0
- /package/lib/{cli → src/cli}/init/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/init/types.d.ts +0 -0
- /package/lib/{cli → src/cli}/init/validation.d.ts +0 -0
- /package/lib/{cli → src/cli}/init/writePackageJson.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/annotate/buildkite/eslint.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/annotate/buildkite/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/annotate/buildkite/internal.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/annotate/buildkite/prettier.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/annotate/buildkite/tsc.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/annotate/github/eslint.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/annotate/github/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/annotate/github/internal.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/annotate/github/prettier.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/annotate/github/tsc.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/annotate/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/autofix.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/eslint.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/external.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internal.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/detectBadCodeowners.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/noSkubaTemplateJs.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/patchRenovateConfig.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/refreshConfigFiles.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/10.0.4/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/10.1.0/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.0.2/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.1.1/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.3.0/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.0/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.1/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/7.3.1/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.0.0/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.2.1/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/9.0.1/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/9.1.0/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/prettier.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/tsc.d.ts +0 -0
- /package/lib/{cli → src/cli}/lint/types.d.ts +0 -0
- /package/lib/{cli → src/cli}/migrate/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/migrate/nodeVersion/checks.d.ts +0 -0
- /package/lib/{cli → src/cli}/migrate/nodeVersion/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/node/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/release/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/start/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/test/index.d.ts +0 -0
- /package/lib/{cli → src/cli}/version/index.d.ts +0 -0
- /package/lib/{skuba.d.ts → src/skuba.d.ts} +0 -0
- /package/lib/{utils → src/utils}/args.d.ts +0 -0
- /package/lib/{utils → src/utils}/command.d.ts +0 -0
- /package/lib/{utils → src/utils}/copy.d.ts +0 -0
- /package/lib/{utils → src/utils}/dir.d.ts +0 -0
- /package/lib/{utils → src/utils}/env.d.ts +0 -0
- /package/lib/{utils → src/utils}/error.d.ts +0 -0
- /package/lib/{utils → src/utils}/exec.d.ts +0 -0
- /package/lib/{utils → src/utils}/help.d.ts +0 -0
- /package/lib/{utils → src/utils}/logging.d.ts +0 -0
- /package/lib/{utils → src/utils}/logo.d.ts +0 -0
- /package/lib/{utils → src/utils}/npmrc.d.ts +0 -0
- /package/lib/{utils → src/utils}/packageManager.d.ts +0 -0
- /package/lib/{utils → src/utils}/port.d.ts +0 -0
- /package/lib/{utils → src/utils}/template.d.ts +0 -0
- /package/lib/{utils → src/utils}/validation.d.ts +0 -0
- /package/lib/{utils → src/utils}/version.d.ts +0 -0
- /package/lib/{utils → src/utils}/worker.d.ts +0 -0
- /package/lib/{wrapper → src/wrapper}/functionHandler.d.ts +0 -0
- /package/lib/{wrapper → src/wrapper}/index.d.ts +0 -0
- /package/lib/{wrapper → src/wrapper}/main.d.ts +0 -0
- /package/lib/{wrapper → src/wrapper}/requestListener.d.ts +0 -0
package/lib/utils/help.js
CHANGED
|
@@ -1,34 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
2
|
+
import { COMMAND_LIST } from "./command.js";
|
|
3
|
+
import { log } from "./logging.js";
|
|
4
|
+
export const showHelp = () => {
|
|
5
|
+
log.plain(log.bold("Available commands:"));
|
|
6
|
+
COMMAND_LIST.forEach((item) => log.plain(item));
|
|
9
7
|
};
|
|
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 help_exports = {};
|
|
20
|
-
__export(help_exports, {
|
|
21
|
-
showHelp: () => showHelp
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(help_exports);
|
|
24
|
-
var import_command = require("./command.js");
|
|
25
|
-
var import_logging = require("./logging.js");
|
|
26
|
-
const showHelp = () => {
|
|
27
|
-
import_logging.log.plain(import_logging.log.bold("Available commands:"));
|
|
28
|
-
import_command.COMMAND_LIST.forEach((item) => import_logging.log.plain(item));
|
|
29
|
-
};
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
showHelp
|
|
33
|
-
});
|
|
34
8
|
//# sourceMappingURL=help.js.map
|
package/lib/utils/help.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/help.ts"],
|
|
4
4
|
"sourcesContent": ["import { COMMAND_LIST } from './command.js';\nimport { log } from './logging.js';\n\nexport const showHelp = () => {\n log.plain(log.bold('Available commands:'));\n\n COMMAND_LIST.forEach((item) => log.plain(item));\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA,SAAS,oBAAoB;AAC7B,SAAS,WAAW;AAEb,aAAM,WAAW,MAAM;AAC5B,MAAI,MAAM,IAAI,KAAK,qBAAqB,CAAC;AAEzC,eAAa,QAAQ,CAAC,SAAS,IAAI,MAAM,IAAI,CAAC;AAChD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/lib/utils/logging.js
CHANGED
|
@@ -1,41 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
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 logging_exports = {};
|
|
30
|
-
__export(logging_exports, {
|
|
31
|
-
childLogger: () => childLogger,
|
|
32
|
-
createLogger: () => createLogger,
|
|
33
|
-
log: () => log,
|
|
34
|
-
pluralise: () => pluralise
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(logging_exports);
|
|
37
|
-
var import_chalk = __toESM(require("chalk"));
|
|
38
|
-
const createLogger = ({
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
export const createLogger = ({
|
|
39
4
|
debug,
|
|
40
5
|
prefixes = [],
|
|
41
6
|
suffixes = []
|
|
@@ -44,31 +9,24 @@ const createLogger = ({
|
|
|
44
9
|
const log2 = (...message) => logWithoutSuffixes(...message, ...suffixes);
|
|
45
10
|
return {
|
|
46
11
|
settings: { debug, prefixes, suffixes },
|
|
47
|
-
bold:
|
|
48
|
-
dim:
|
|
49
|
-
formatSubtle:
|
|
12
|
+
bold: chalk.bold,
|
|
13
|
+
dim: chalk.dim,
|
|
14
|
+
formatSubtle: chalk.grey,
|
|
50
15
|
timing: (start, end) => `${Number((end - start) / BigInt(1e7)) / 100}s`,
|
|
51
|
-
debug: (...message) => debug ? log2(
|
|
52
|
-
subtle: (...message) => log2(
|
|
53
|
-
err: (...message) => log2(
|
|
16
|
+
debug: (...message) => debug ? log2(chalk.grey(...message)) : void 0,
|
|
17
|
+
subtle: (...message) => log2(chalk.grey(...message)),
|
|
18
|
+
err: (...message) => log2(chalk.red(...message)),
|
|
54
19
|
newline: () => logWithoutSuffixes(),
|
|
55
|
-
ok: (...message) => log2(
|
|
20
|
+
ok: (...message) => log2(chalk.green(...message)),
|
|
56
21
|
plain: (...message) => log2(...message),
|
|
57
|
-
warn: (...message) => log2(
|
|
22
|
+
warn: (...message) => log2(chalk.yellow(...message))
|
|
58
23
|
};
|
|
59
24
|
};
|
|
60
|
-
const log = createLogger({ debug: false });
|
|
61
|
-
const childLogger = (logger, settings) => createLogger({
|
|
25
|
+
export const log = createLogger({ debug: false });
|
|
26
|
+
export const childLogger = (logger, settings) => createLogger({
|
|
62
27
|
debug: settings.debug ?? logger.settings.debug,
|
|
63
28
|
prefixes: [...settings.prefixes ?? [], ...logger.settings.prefixes],
|
|
64
29
|
suffixes: [...logger.settings.suffixes, ...settings.suffixes ?? []]
|
|
65
30
|
});
|
|
66
|
-
const pluralise = (count, subject) => `${count} ${subject}${count === 1 ? "" : "s"}`;
|
|
67
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
-
0 && (module.exports = {
|
|
69
|
-
childLogger,
|
|
70
|
-
createLogger,
|
|
71
|
-
log,
|
|
72
|
-
pluralise
|
|
73
|
-
});
|
|
31
|
+
export const pluralise = (count, subject) => `${count} ${subject}${count === 1 ? "" : "s"}`;
|
|
74
32
|
//# sourceMappingURL=logging.js.map
|
package/lib/utils/logging.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/logging.ts"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable no-console */\n\nimport chalk from 'chalk';\n\nexport type Logger = typeof log;\n\nexport const createLogger = ({\n debug,\n prefixes = [],\n suffixes = [],\n}: {\n debug: boolean;\n prefixes?: unknown[];\n suffixes?: unknown[];\n}) => {\n const logWithoutSuffixes = (...message: unknown[]) =>\n console.log(...prefixes, ...message);\n\n const log = (...message: unknown[]) =>\n logWithoutSuffixes(...message, ...suffixes);\n\n return {\n settings: { debug, prefixes, suffixes },\n\n bold: chalk.bold,\n dim: chalk.dim,\n formatSubtle: chalk.grey,\n\n timing: (start: bigint, end: bigint) =>\n `${Number((end - start) / BigInt(10_000_000)) / 100}s`,\n\n debug: (...message: unknown[]) =>\n debug ? log(chalk.grey(...message)) : undefined,\n subtle: (...message: unknown[]) => log(chalk.grey(...message)),\n err: (...message: unknown[]) => log(chalk.red(...message)),\n newline: () => logWithoutSuffixes(),\n ok: (...message: unknown[]) => log(chalk.green(...message)),\n plain: (...message: unknown[]) => log(...message),\n warn: (...message: unknown[]) => log(chalk.yellow(...message)),\n };\n};\n\nexport const log = createLogger({ debug: false });\n\nexport const childLogger = (\n logger: Logger,\n settings: Partial<Logger['settings']>,\n) =>\n createLogger({\n debug: settings.debug ?? logger.settings.debug,\n prefixes: [...(settings.prefixes ?? []), ...logger.settings.prefixes],\n suffixes: [...logger.settings.suffixes, ...(settings.suffixes ?? [])],\n });\n\nexport const pluralise = (count: number, subject: string) =>\n `${count} ${subject}${count === 1 ? '' : 's'}`;\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["log"
|
|
5
|
+
"mappings": ";AAEA,OAAO,WAAW;AAIX,aAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA,WAAW,CAAC;AAAA,EACZ,WAAW,CAAC;AACd,MAIM;AACJ,QAAM,qBAAqB,IAAI,YAC7B,QAAQ,IAAI,GAAG,UAAU,GAAG,OAAO;AAErC,QAAMA,OAAM,IAAI,YACd,mBAAmB,GAAG,SAAS,GAAG,QAAQ;AAE5C,SAAO;AAAA,IACL,UAAU,EAAE,OAAO,UAAU,SAAS;AAAA,IAEtC,MAAM,MAAM;AAAA,IACZ,KAAK,MAAM;AAAA,IACX,cAAc,MAAM;AAAA,IAEpB,QAAQ,CAAC,OAAe,QACtB,GAAG,QAAQ,MAAM,SAAS,OAAO,GAAU,CAAC,IAAI,GAAG;AAAA,IAErD,OAAO,IAAI,YACT,QAAQA,KAAI,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI;AAAA,IACxC,QAAQ,IAAI,YAAuBA,KAAI,MAAM,KAAK,GAAG,OAAO,CAAC;AAAA,IAC7D,KAAK,IAAI,YAAuBA,KAAI,MAAM,IAAI,GAAG,OAAO,CAAC;AAAA,IACzD,SAAS,MAAM,mBAAmB;AAAA,IAClC,IAAI,IAAI,YAAuBA,KAAI,MAAM,MAAM,GAAG,OAAO,CAAC;AAAA,IAC1D,OAAO,IAAI,YAAuBA,KAAI,GAAG,OAAO;AAAA,IAChD,MAAM,IAAI,YAAuBA,KAAI,MAAM,OAAO,GAAG,OAAO,CAAC;AAAA,EAC/D;AACF;AAEO,aAAM,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC;AAEzC,aAAM,cAAc,CACzB,QACA,aAEA,aAAa;AAAA,EACX,OAAO,SAAS,SAAS,OAAO,SAAS;AAAA,EACzC,UAAU,CAAC,GAAI,SAAS,YAAY,CAAC,GAAI,GAAG,OAAO,SAAS,QAAQ;AAAA,EACpE,UAAU,CAAC,GAAG,OAAO,SAAS,UAAU,GAAI,SAAS,YAAY,CAAC,CAAE;AACtE,CAAC;AAEI,aAAM,YAAY,CAAC,OAAe,YACvC,GAAG,KAAK,IAAI,OAAO,GAAG,UAAU,IAAI,KAAK,GAAG;",
|
|
6
|
+
"names": ["log"]
|
|
7
7
|
}
|
package/lib/utils/logo.js
CHANGED
|
@@ -1,72 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 logo_exports = {};
|
|
30
|
-
__export(logo_exports, {
|
|
31
|
-
showLogoAndVersionInfo: () => showLogoAndVersionInfo
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(logo_exports);
|
|
34
|
-
var import_chalk = __toESM(require("chalk"));
|
|
35
|
-
var import_logging = require("./logging.js");
|
|
36
|
-
var import_packageManager = require("./packageManager.js");
|
|
37
|
-
var import_version = require("./version.js");
|
|
38
|
-
const LOGO = import_chalk.default.blueBright(`
|
|
39
|
-
\u256D\u2500\u256E ${import_chalk.default.magentaBright(" ")}\u256D\u2500\u256E
|
|
40
|
-
\u256D\u2500\u2500\u2500\u2502 \u2570\u2500${import_chalk.default.magentaBright("\u256D\u2500\u252C\u2500\u256E")} \u2570\u2500\u256E\u2500\u2500\u2500\u256E
|
|
41
|
-
\u2502_ \u2500\u2524 <${import_chalk.default.magentaBright("\u2502 \u2575 \u2502")} \u2022 \u2502 \u2022 \u2502
|
|
42
|
-
\u2570\u2500\u2500\u2500\u2570\u2500\u2534\u2500${import_chalk.default.magentaBright("\u2570\u2500\u2500\u2500\u256F")}\u2500\u2500\u2500\u256F\u2500\u2500 \u2570
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { log } from "./logging.js";
|
|
4
|
+
import { detectPackageManager } from "./packageManager.js";
|
|
5
|
+
import { getSkubaVersionInfo } from "./version.js";
|
|
6
|
+
const LOGO = chalk.blueBright(`
|
|
7
|
+
\u256D\u2500\u256E ${chalk.magentaBright(" ")}\u256D\u2500\u256E
|
|
8
|
+
\u256D\u2500\u2500\u2500\u2502 \u2570\u2500${chalk.magentaBright("\u256D\u2500\u252C\u2500\u256E")} \u2570\u2500\u256E\u2500\u2500\u2500\u256E
|
|
9
|
+
\u2502_ \u2500\u2524 <${chalk.magentaBright("\u2502 \u2575 \u2502")} \u2022 \u2502 \u2022 \u2502
|
|
10
|
+
\u2570\u2500\u2500\u2500\u2570\u2500\u2534\u2500${chalk.magentaBright("\u2570\u2500\u2500\u2500\u256F")}\u2500\u2500\u2500\u256F\u2500\u2500 \u2570
|
|
43
11
|
`);
|
|
44
|
-
const showLogoAndVersionInfo = async () => {
|
|
12
|
+
export const showLogoAndVersionInfo = async () => {
|
|
45
13
|
const [versionInfo, packageManager] = await Promise.all([
|
|
46
|
-
|
|
47
|
-
|
|
14
|
+
getSkubaVersionInfo(),
|
|
15
|
+
detectPackageManager()
|
|
48
16
|
]);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
17
|
+
log.plain(LOGO);
|
|
18
|
+
log.subtle(
|
|
19
|
+
log.bold(versionInfo.local),
|
|
52
20
|
"|",
|
|
53
21
|
"latest",
|
|
54
|
-
|
|
22
|
+
log.bold(versionInfo.latest ?? "offline \u2708")
|
|
55
23
|
);
|
|
56
|
-
|
|
24
|
+
log.newline();
|
|
57
25
|
if (versionInfo.isStale) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
26
|
+
log.warn("Your skuba installation is out of date.");
|
|
27
|
+
log.warn("Consider upgrading:");
|
|
28
|
+
log.newline();
|
|
29
|
+
log.warn(
|
|
30
|
+
log.bold(packageManager.print.update, `skuba@${versionInfo.latest}`)
|
|
63
31
|
);
|
|
64
|
-
|
|
32
|
+
log.newline();
|
|
65
33
|
}
|
|
66
34
|
return versionInfo;
|
|
67
35
|
};
|
|
68
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
-
0 && (module.exports = {
|
|
70
|
-
showLogoAndVersionInfo
|
|
71
|
-
});
|
|
72
36
|
//# sourceMappingURL=logo.js.map
|
package/lib/utils/logo.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/logo.ts"],
|
|
4
4
|
"sourcesContent": ["import chalk from 'chalk';\n\nimport { log } from './logging.js';\nimport { detectPackageManager } from './packageManager.js';\nimport { getSkubaVersionInfo } from './version.js';\n\nconst LOGO = chalk.blueBright(`\n \u256D\u2500\u256E ${chalk.magentaBright(' ')}\u256D\u2500\u256E\n\u256D\u2500\u2500\u2500\u2502 \u2570\u2500${chalk.magentaBright('\u256D\u2500\u252C\u2500\u256E')} \u2570\u2500\u256E\u2500\u2500\u2500\u256E\n\u2502_ \u2500\u2524 <${chalk.magentaBright('\u2502 \u2575 \u2502')} \u2022 \u2502 \u2022 \u2502\n\u2570\u2500\u2500\u2500\u2570\u2500\u2534\u2500${chalk.magentaBright('\u2570\u2500\u2500\u2500\u256F')}\u2500\u2500\u2500\u256F\u2500\u2500 \u2570\n`);\n\nexport const showLogoAndVersionInfo = async () => {\n const [versionInfo, packageManager] = await Promise.all([\n getSkubaVersionInfo(),\n detectPackageManager(),\n ]);\n\n log.plain(LOGO);\n log.subtle(\n log.bold(versionInfo.local),\n '|',\n 'latest',\n log.bold(versionInfo.latest ?? 'offline \u2708'),\n );\n log.newline();\n\n if (versionInfo.isStale) {\n log.warn('Your skuba installation is out of date.');\n log.warn('Consider upgrading:');\n log.newline();\n log.warn(\n log.bold(packageManager.print.update, `skuba@${versionInfo.latest}`),\n );\n log.newline();\n }\n\n return versionInfo;\n};\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";AAAA,OAAO,WAAW;AAElB,SAAS,WAAW;AACpB,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AAEpC,MAAM,OAAO,MAAM,WAAW;AAAA,yBACpB,MAAM,cAAc,MAAM,CAAC;AAAA,6CAC3B,MAAM,cAAc,gCAAO,CAAC;AAAA,yBAC5B,MAAM,cAAc,sBAAO,CAAC;AAAA,kDAC5B,MAAM,cAAc,gCAAO,CAAC;AAAA,CACrC;AAEM,aAAM,yBAAyB,YAAY;AAChD,QAAM,CAAC,aAAa,cAAc,IAAI,MAAM,QAAQ,IAAI;AAAA,IACtD,oBAAoB;AAAA,IACpB,qBAAqB;AAAA,EACvB,CAAC;AAED,MAAI,MAAM,IAAI;AACd,MAAI;AAAA,IACF,IAAI,KAAK,YAAY,KAAK;AAAA,IAC1B;AAAA,IACA;AAAA,IACA,IAAI,KAAK,YAAY,UAAU,gBAAW;AAAA,EAC5C;AACA,MAAI,QAAQ;AAEZ,MAAI,YAAY,SAAS;AACvB,QAAI,KAAK,yCAAyC;AAClD,QAAI,KAAK,qBAAqB;AAC9B,QAAI,QAAQ;AACZ,QAAI;AAAA,MACF,IAAI,KAAK,eAAe,MAAM,QAAQ,SAAS,YAAY,MAAM,EAAE;AAAA,IACrE;AACA,QAAI,QAAQ;AAAA,EACd;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/lib/utils/manifest.js
CHANGED
|
@@ -1,69 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 manifest_exports = {};
|
|
30
|
-
__export(manifest_exports, {
|
|
31
|
-
PROJECT_TYPES: () => PROJECT_TYPES,
|
|
32
|
-
getConsumerManifest: () => getConsumerManifest,
|
|
33
|
-
getEntryPointFromManifest: () => getEntryPointFromManifest,
|
|
34
|
-
getManifestProperties: () => getManifestProperties,
|
|
35
|
-
getSkubaManifest: () => getSkubaManifest,
|
|
36
|
-
getStringPropFromConsumerManifest: () => getStringPropFromConsumerManifest,
|
|
37
|
-
projectTypeSchema: () => projectTypeSchema
|
|
38
|
-
});
|
|
39
|
-
module.exports = __toCommonJS(manifest_exports);
|
|
40
|
-
var import_read_pkg_up = __toESM(require("read-pkg-up"));
|
|
41
|
-
var z = __toESM(require("zod/v4"));
|
|
42
|
-
var import_validation = require("./validation.js");
|
|
43
|
-
const projectTypeSchema = z.union([
|
|
2
|
+
import { readPackageUp } from "read-package-up";
|
|
3
|
+
import * as z from "zod/v4";
|
|
4
|
+
import { hasProp } from "./validation.js";
|
|
5
|
+
export const projectTypeSchema = z.union([
|
|
44
6
|
z.literal("application"),
|
|
45
7
|
z.literal("package")
|
|
46
8
|
]);
|
|
47
|
-
const PROJECT_TYPES = ["application", "package"];
|
|
9
|
+
export const PROJECT_TYPES = ["application", "package"];
|
|
48
10
|
const DEFAULT_ENTRY_POINT = "src/app.ts";
|
|
49
11
|
let skubaManifest;
|
|
50
|
-
const getSkubaManifest = async () => {
|
|
12
|
+
export const getSkubaManifest = async () => {
|
|
51
13
|
if (skubaManifest !== void 0) {
|
|
52
14
|
return skubaManifest;
|
|
53
15
|
}
|
|
54
|
-
const result = await (
|
|
16
|
+
const result = await readPackageUp({ cwd: import.meta.dirname });
|
|
55
17
|
if (result === void 0) {
|
|
56
18
|
throw Error("skuba could not find its own manifest");
|
|
57
19
|
}
|
|
58
20
|
return skubaManifest = result.packageJson;
|
|
59
21
|
};
|
|
60
|
-
const getConsumerManifest = (cwd) => (
|
|
61
|
-
const getManifestProperties = async (prop) => {
|
|
22
|
+
export const getConsumerManifest = (cwd) => readPackageUp({ cwd, normalize: false });
|
|
23
|
+
export const getManifestProperties = async (prop) => {
|
|
62
24
|
const manifest = await getConsumerManifest();
|
|
63
25
|
if (!manifest) {
|
|
64
26
|
return void 0;
|
|
65
27
|
}
|
|
66
|
-
const value =
|
|
28
|
+
const value = hasProp(manifest.packageJson.skuba, prop) ? manifest.packageJson.skuba[prop] : void 0;
|
|
67
29
|
const type = typeof manifest.packageJson.type === "string" ? manifest.packageJson.type : void 0;
|
|
68
30
|
return {
|
|
69
31
|
value,
|
|
@@ -71,22 +33,12 @@ const getManifestProperties = async (prop) => {
|
|
|
71
33
|
path: manifest.path
|
|
72
34
|
};
|
|
73
35
|
};
|
|
74
|
-
const getStringPropFromConsumerManifest = async (prop) => {
|
|
36
|
+
export const getStringPropFromConsumerManifest = async (prop) => {
|
|
75
37
|
const manifest = await getManifestProperties(prop);
|
|
76
38
|
return typeof manifest?.value === "string" ? manifest.value : void 0;
|
|
77
39
|
};
|
|
78
|
-
const getEntryPointFromManifest = async () => {
|
|
40
|
+
export const getEntryPointFromManifest = async () => {
|
|
79
41
|
const entryPoint = await getStringPropFromConsumerManifest("entryPoint");
|
|
80
42
|
return entryPoint ?? DEFAULT_ENTRY_POINT;
|
|
81
43
|
};
|
|
82
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
-
0 && (module.exports = {
|
|
84
|
-
PROJECT_TYPES,
|
|
85
|
-
getConsumerManifest,
|
|
86
|
-
getEntryPointFromManifest,
|
|
87
|
-
getManifestProperties,
|
|
88
|
-
getSkubaManifest,
|
|
89
|
-
getStringPropFromConsumerManifest,
|
|
90
|
-
projectTypeSchema
|
|
91
|
-
});
|
|
92
44
|
//# sourceMappingURL=manifest.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/manifest.ts"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import { type NormalizedPackageJson, readPackageUp } from 'read-package-up';\nimport * as z from 'zod/v4';\n\nimport type { ReadResult } from '../cli/configure/types.js';\n\nimport { hasProp } from './validation.js';\n\nexport type ProjectType = z.infer<typeof projectTypeSchema>;\n\nexport const projectTypeSchema = z.union([\n z.literal('application'),\n z.literal('package'),\n]);\n\nexport const PROJECT_TYPES = ['application', 'package'] as const;\n\nconst DEFAULT_ENTRY_POINT = 'src/app.ts';\n\nlet skubaManifest: NormalizedPackageJson | undefined;\n\nexport const getSkubaManifest = async (): Promise<NormalizedPackageJson> => {\n if (skubaManifest !== undefined) {\n return skubaManifest;\n }\n\n const result = await readPackageUp({ cwd: import.meta.dirname });\n\n if (result === undefined) {\n throw Error('skuba could not find its own manifest');\n }\n\n return (skubaManifest = result.packageJson);\n};\n\nexport const getConsumerManifest = (\n cwd?: string,\n): Promise<ReadResult | undefined> => readPackageUp({ cwd, normalize: false });\n\nexport const getManifestProperties = async <T extends string, V = unknown>(\n prop: T,\n): Promise<\n | {\n value: V | undefined;\n type: string | undefined;\n path: string;\n }\n | undefined\n> => {\n const manifest = await getConsumerManifest();\n\n if (!manifest) {\n return undefined;\n }\n\n const value = hasProp<T, V>(manifest.packageJson.skuba, prop)\n ? manifest.packageJson.skuba[prop]\n : undefined;\n\n const type =\n typeof manifest.packageJson.type === 'string'\n ? manifest.packageJson.type\n : undefined;\n\n return {\n value,\n type,\n path: manifest.path,\n };\n};\n\nexport const getStringPropFromConsumerManifest = async <T extends string>(\n prop: T,\n): Promise<string | undefined> => {\n const manifest = await getManifestProperties(prop);\n\n return typeof manifest?.value === 'string' ? manifest.value : undefined;\n};\n\nexport const getEntryPointFromManifest = async (): Promise<string> => {\n const entryPoint = await getStringPropFromConsumerManifest('entryPoint');\n\n return entryPoint ?? DEFAULT_ENTRY_POINT;\n};\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAqC,qBAAqB;AAC1D,YAAY,OAAO;AAInB,SAAS,eAAe;AAIjB,aAAM,oBAAoB,EAAE,MAAM;AAAA,EACvC,EAAE,QAAQ,aAAa;AAAA,EACvB,EAAE,QAAQ,SAAS;AACrB,CAAC;AAEM,aAAM,gBAAgB,CAAC,eAAe,SAAS;AAEtD,MAAM,sBAAsB;AAE5B,IAAI;AAEG,aAAM,mBAAmB,YAA4C;AAC1E,MAAI,kBAAkB,QAAW;AAC/B,WAAO;AAAA,EACT;AAEA,QAAM,SAAS,MAAM,cAAc,EAAE,KAAK,YAAY,QAAQ,CAAC;AAE/D,MAAI,WAAW,QAAW;AACxB,UAAM,MAAM,uCAAuC;AAAA,EACrD;AAEA,SAAQ,gBAAgB,OAAO;AACjC;AAEO,aAAM,sBAAsB,CACjC,QACoC,cAAc,EAAE,KAAK,WAAW,MAAM,CAAC;AAEtE,aAAM,wBAAwB,OACnC,SAQG;AACH,QAAM,WAAW,MAAM,oBAAoB;AAE3C,MAAI,CAAC,UAAU;AACb,WAAO;AAAA,EACT;AAEA,QAAM,QAAQ,QAAc,SAAS,YAAY,OAAO,IAAI,IACxD,SAAS,YAAY,MAAM,IAAI,IAC/B;AAEJ,QAAM,OACJ,OAAO,SAAS,YAAY,SAAS,WACjC,SAAS,YAAY,OACrB;AAEN,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,MAAM,SAAS;AAAA,EACjB;AACF;AAEO,aAAM,oCAAoC,OAC/C,SACgC;AAChC,QAAM,WAAW,MAAM,sBAAsB,IAAI;AAEjD,SAAO,OAAO,UAAU,UAAU,WAAW,SAAS,QAAQ;AAChE;AAEO,aAAM,4BAA4B,YAA6B;AACpE,QAAM,aAAa,MAAM,kCAAkC,YAAY;AAEvE,SAAO,cAAc;AACvB;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/lib/utils/npmrc.js
CHANGED
|
@@ -1,29 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
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 npmrc_exports = {};
|
|
20
|
-
__export(npmrc_exports, {
|
|
21
|
-
hasNpmrcSecret: () => hasNpmrcSecret
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(npmrc_exports);
|
|
24
|
-
const hasNpmrcSecret = (lineOrFullFileContents) => lineOrFullFileContents.includes("_auth") || lineOrFullFileContents.includes("_password");
|
|
25
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
-
0 && (module.exports = {
|
|
27
|
-
hasNpmrcSecret
|
|
28
|
-
});
|
|
2
|
+
export const hasNpmrcSecret = (lineOrFullFileContents) => lineOrFullFileContents.includes("_auth") || lineOrFullFileContents.includes("_password");
|
|
29
3
|
//# sourceMappingURL=npmrc.js.map
|
package/lib/utils/npmrc.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/npmrc.ts"],
|
|
4
4
|
"sourcesContent": ["// Preventing against _auth, _authToken, _password\n// https://docs.npmjs.com/cli/v10/configuring-npm/npmrc#auth-related-configuration\nexport const hasNpmrcSecret = (lineOrFullFileContents: string): boolean =>\n lineOrFullFileContents.includes('_auth') ||\n lineOrFullFileContents.includes('_password');\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAEO,aAAM,iBAAiB,CAAC,2BAC7B,uBAAuB,SAAS,OAAO,KACvC,uBAAuB,SAAS,WAAW;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,65 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 packageManager_exports = {};
|
|
30
|
-
__export(packageManager_exports, {
|
|
31
|
-
DEFAULT_PACKAGE_MANAGER: () => DEFAULT_PACKAGE_MANAGER,
|
|
32
|
-
configForPackageManager: () => configForPackageManager,
|
|
33
|
-
detectPackageManager: () => detectPackageManager,
|
|
34
|
-
packageManagerSchema: () => packageManagerSchema
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(packageManager_exports);
|
|
37
|
-
var import_find_up = __toESM(require("find-up"));
|
|
38
|
-
var import_is_installed_globally = __toESM(require("is-installed-globally"));
|
|
39
|
-
var z = __toESM(require("zod/v4"));
|
|
40
|
-
var import_logging = require("./logging.js");
|
|
41
|
-
const DEFAULT_PACKAGE_MANAGER = "pnpm";
|
|
2
|
+
import findUp from "find-up";
|
|
3
|
+
import isInstalledGlobally from "is-installed-globally";
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { log } from "./logging.js";
|
|
6
|
+
export const DEFAULT_PACKAGE_MANAGER = "pnpm";
|
|
42
7
|
const PACKAGE_MANAGERS = {
|
|
43
8
|
pnpm: {
|
|
44
9
|
print: {
|
|
45
10
|
exec: "pnpm exec",
|
|
46
11
|
runSilent: "pnpm --silent run",
|
|
47
|
-
update:
|
|
12
|
+
update: isInstalledGlobally ? "pnpm update --global" : "pnpm update"
|
|
48
13
|
}
|
|
49
14
|
},
|
|
50
15
|
yarn: {
|
|
51
16
|
print: {
|
|
52
17
|
exec: "yarn",
|
|
53
18
|
runSilent: "yarn -s",
|
|
54
|
-
update:
|
|
19
|
+
update: isInstalledGlobally ? "yarn global upgrade" : "yarn upgrade"
|
|
55
20
|
}
|
|
56
21
|
}
|
|
57
22
|
};
|
|
58
|
-
const configForPackageManager = (packageManager) => ({
|
|
23
|
+
export const configForPackageManager = (packageManager) => ({
|
|
59
24
|
...PACKAGE_MANAGERS[packageManager],
|
|
60
25
|
command: packageManager
|
|
61
26
|
});
|
|
62
|
-
const detectPackageManager = async (cwd) => {
|
|
27
|
+
export const detectPackageManager = async (cwd) => {
|
|
63
28
|
let packageManager = DEFAULT_PACKAGE_MANAGER;
|
|
64
29
|
try {
|
|
65
30
|
const [yarnDepth, pnpmDepth] = await Promise.all([
|
|
@@ -71,12 +36,12 @@ const detectPackageManager = async (cwd) => {
|
|
|
71
36
|
}
|
|
72
37
|
packageManager = (pnpmDepth ?? -1) > (yarnDepth ?? -1) ? "pnpm" : "yarn";
|
|
73
38
|
} catch (err) {
|
|
74
|
-
|
|
75
|
-
`Failed to detect package manager; defaulting to ${
|
|
39
|
+
log.warn(
|
|
40
|
+
`Failed to detect package manager; defaulting to ${log.bold(
|
|
76
41
|
DEFAULT_PACKAGE_MANAGER
|
|
77
42
|
)}.`
|
|
78
43
|
);
|
|
79
|
-
|
|
44
|
+
log.subtle(
|
|
80
45
|
(() => {
|
|
81
46
|
switch (true) {
|
|
82
47
|
case err instanceof Error:
|
|
@@ -90,15 +55,8 @@ const detectPackageManager = async (cwd) => {
|
|
|
90
55
|
return configForPackageManager(packageManager);
|
|
91
56
|
};
|
|
92
57
|
const findDepth = async (filename, cwd) => {
|
|
93
|
-
const path = await (
|
|
58
|
+
const path = await findUp(filename, { cwd });
|
|
94
59
|
return path ? path.split("/").length : void 0;
|
|
95
60
|
};
|
|
96
|
-
const packageManagerSchema = z.enum(["pnpm", "yarn"]).default(DEFAULT_PACKAGE_MANAGER);
|
|
97
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
98
|
-
0 && (module.exports = {
|
|
99
|
-
DEFAULT_PACKAGE_MANAGER,
|
|
100
|
-
configForPackageManager,
|
|
101
|
-
detectPackageManager,
|
|
102
|
-
packageManagerSchema
|
|
103
|
-
});
|
|
61
|
+
export const packageManagerSchema = z.enum(["pnpm", "yarn"]).default(DEFAULT_PACKAGE_MANAGER);
|
|
104
62
|
//# sourceMappingURL=packageManager.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/packageManager.ts"],
|
|
4
4
|
"sourcesContent": ["import findUp from 'find-up';\nimport isInstalledGlobally from 'is-installed-globally';\nimport * as z from 'zod/v4';\n\nimport { log } from './logging.js';\n\nexport const DEFAULT_PACKAGE_MANAGER = 'pnpm';\n\nexport type PackageManagerConfig =\n (typeof PACKAGE_MANAGERS)[keyof typeof PACKAGE_MANAGERS] & {\n command: PackageManager;\n };\n\nconst PACKAGE_MANAGERS = {\n pnpm: {\n print: {\n exec: 'pnpm exec',\n runSilent: 'pnpm --silent run',\n update: isInstalledGlobally ? 'pnpm update --global' : 'pnpm update',\n },\n },\n yarn: {\n print: {\n exec: 'yarn',\n runSilent: 'yarn -s',\n update: isInstalledGlobally ? 'yarn global upgrade' : 'yarn upgrade',\n },\n },\n};\n\nexport const configForPackageManager = (\n packageManager: PackageManager,\n): PackageManagerConfig => ({\n ...PACKAGE_MANAGERS[packageManager],\n command: packageManager,\n});\n\nexport const detectPackageManager = async (\n cwd?: string,\n): Promise<PackageManagerConfig> => {\n let packageManager: PackageManager = DEFAULT_PACKAGE_MANAGER;\n\n try {\n const [yarnDepth, pnpmDepth] = await Promise.all([\n findDepth('yarn.lock', cwd),\n findDepth('pnpm-lock.yaml', cwd),\n ]);\n\n if (yarnDepth === undefined && pnpmDepth === undefined) {\n throw new Error('No package manager lockfile found.');\n }\n\n packageManager = (pnpmDepth ?? -1) > (yarnDepth ?? -1) ? 'pnpm' : 'yarn';\n } catch (err) {\n log.warn(\n `Failed to detect package manager; defaulting to ${log.bold(\n DEFAULT_PACKAGE_MANAGER,\n )}.`,\n );\n log.subtle(\n (() => {\n switch (true) {\n case err instanceof Error:\n return err.message;\n\n default:\n return String(err);\n }\n })(),\n );\n }\n\n return configForPackageManager(packageManager);\n};\n\nconst findDepth = async (filename: string, cwd?: string) => {\n const path = await findUp(filename, { cwd });\n return path ? path.split('/').length : undefined;\n};\n\nexport type PackageManager = z.infer<typeof packageManagerSchema>;\n\nexport const packageManagerSchema = z\n .enum(['pnpm', 'yarn'])\n .default(DEFAULT_PACKAGE_MANAGER);\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";AAAA,OAAO,YAAY;AACnB,OAAO,yBAAyB;AAChC,YAAY,OAAO;AAEnB,SAAS,WAAW;AAEb,aAAM,0BAA0B;AAOvC,MAAM,mBAAmB;AAAA,EACvB,MAAM;AAAA,IACJ,OAAO;AAAA,MACL,MAAM;AAAA,MACN,WAAW;AAAA,MACX,QAAQ,sBAAsB,yBAAyB;AAAA,IACzD;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,MACL,MAAM;AAAA,MACN,WAAW;AAAA,MACX,QAAQ,sBAAsB,wBAAwB;AAAA,IACxD;AAAA,EACF;AACF;AAEO,aAAM,0BAA0B,CACrC,oBAC0B;AAAA,EAC1B,GAAG,iBAAiB,cAAc;AAAA,EAClC,SAAS;AACX;AAEO,aAAM,uBAAuB,OAClC,QACkC;AAClC,MAAI,iBAAiC;AAErC,MAAI;AACF,UAAM,CAAC,WAAW,SAAS,IAAI,MAAM,QAAQ,IAAI;AAAA,MAC/C,UAAU,aAAa,GAAG;AAAA,MAC1B,UAAU,kBAAkB,GAAG;AAAA,IACjC,CAAC;AAED,QAAI,cAAc,UAAa,cAAc,QAAW;AACtD,YAAM,IAAI,MAAM,oCAAoC;AAAA,IACtD;AAEA,sBAAkB,aAAa,OAAO,aAAa,MAAM,SAAS;AAAA,EACpE,SAAS,KAAK;AACZ,QAAI;AAAA,MACF,mDAAmD,IAAI;AAAA,QACrD;AAAA,MACF,CAAC;AAAA,IACH;AACA,QAAI;AAAA,OACD,MAAM;AACL,gBAAQ,MAAM;AAAA,UACZ,KAAK,eAAe;AAClB,mBAAO,IAAI;AAAA,UAEb;AACE,mBAAO,OAAO,GAAG;AAAA,QACrB;AAAA,MACF,GAAG;AAAA,IACL;AAAA,EACF;AAEA,SAAO,wBAAwB,cAAc;AAC/C;AAEA,MAAM,YAAY,OAAO,UAAkB,QAAiB;AAC1D,QAAM,OAAO,MAAM,OAAO,UAAU,EAAE,IAAI,CAAC;AAC3C,SAAO,OAAO,KAAK,MAAM,GAAG,EAAE,SAAS;AACzC;AAIO,aAAM,uBAAuB,EACjC,KAAK,CAAC,QAAQ,MAAM,CAAC,EACrB,QAAQ,uBAAuB;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/lib/utils/port.js
CHANGED
|
@@ -1,48 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
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 port_exports = {};
|
|
30
|
-
__export(port_exports, {
|
|
31
|
-
getRandomPort: () => getRandomPort,
|
|
32
|
-
randomIntBetween: () => randomIntBetween
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(port_exports);
|
|
35
|
-
var import_get_port = __toESM(require("get-port"));
|
|
2
|
+
import getPort from "get-port";
|
|
36
3
|
const MIN_PORT = 1e4;
|
|
37
4
|
const MAX_PORT = 49151;
|
|
38
|
-
const randomIntBetween = (min, max) => min + Math.floor(Math.random() * (1 + max - min));
|
|
39
|
-
const getRandomPort = () => {
|
|
5
|
+
export const randomIntBetween = (min, max) => min + Math.floor(Math.random() * (1 + max - min));
|
|
6
|
+
export const getRandomPort = () => {
|
|
40
7
|
const preferredPorts = new Array(10).fill(null).map(() => randomIntBetween(MIN_PORT, MAX_PORT));
|
|
41
|
-
return (
|
|
8
|
+
return getPort({ port: preferredPorts });
|
|
42
9
|
};
|
|
43
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
-
0 && (module.exports = {
|
|
45
|
-
getRandomPort,
|
|
46
|
-
randomIntBetween
|
|
47
|
-
});
|
|
48
10
|
//# sourceMappingURL=port.js.map
|
package/lib/utils/port.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/port.ts"],
|
|
4
4
|
"sourcesContent": ["import getPort from 'get-port';\n\n/* Smallest 5-digit port; these are less common than 4-digit ports. */\nconst MIN_PORT = 10000;\n\n/** Largest port in the IANA user port range. */\nconst MAX_PORT = 49151;\n\nexport const randomIntBetween = (min: number, max: number) =>\n min + Math.floor(Math.random() * (1 + max - min));\n\nexport const getRandomPort = () => {\n // Seed some random ports to use, if available.\n // get-port falls back to the private port range.\n const preferredPorts = new Array(10)\n .fill(null)\n .map(() => randomIntBetween(MIN_PORT, MAX_PORT));\n\n return getPort({ port: preferredPorts });\n};\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";AAAA,OAAO,aAAa;AAGpB,MAAM,WAAW;AAGjB,MAAM,WAAW;AAEV,aAAM,mBAAmB,CAAC,KAAa,QAC5C,MAAM,KAAK,MAAM,KAAK,OAAO,KAAK,IAAI,MAAM,IAAI;AAE3C,aAAM,gBAAgB,MAAM;AAGjC,QAAM,iBAAiB,IAAI,MAAM,EAAE,EAChC,KAAK,IAAI,EACT,IAAI,MAAM,iBAAiB,UAAU,QAAQ,CAAC;AAEjD,SAAO,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|