skuba 13.0.2 → 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 +19 -58
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +3 -3
- 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
|
@@ -1,42 +1,14 @@
|
|
|
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 nodeVersion_exports = {};
|
|
30
|
-
__export(nodeVersion_exports, {
|
|
31
|
-
nodeVersionMigration: () => nodeVersionMigration
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(nodeVersion_exports);
|
|
34
|
-
var import_util = require("util");
|
|
35
|
-
var import_fast_glob = require("fast-glob");
|
|
36
|
-
var import_fs_extra = __toESM(require("fs-extra"));
|
|
37
|
-
var import_logging = require("../../../utils/logging.js");
|
|
38
|
-
var import_project = require("../../configure/analysis/project.js");
|
|
39
|
-
var import_checks = require("./checks.js");
|
|
2
|
+
import { inspect } from "util";
|
|
3
|
+
import { glob } from "fast-glob";
|
|
4
|
+
import fs from "fs-extra";
|
|
5
|
+
import { log } from "../../../utils/logging.js";
|
|
6
|
+
import { createDestinationFileReader } from "../../configure/analysis/project.js";
|
|
7
|
+
import {
|
|
8
|
+
isPatchableNodeVersion,
|
|
9
|
+
isPatchableServerlessVersion,
|
|
10
|
+
isPatchableSkubaType
|
|
11
|
+
} from "./checks.js";
|
|
40
12
|
const subPatches = ({
|
|
41
13
|
nodeVersion,
|
|
42
14
|
ECMAScriptVersion
|
|
@@ -56,13 +28,13 @@ const subPatches = ({
|
|
|
56
28
|
{
|
|
57
29
|
files: "**/serverless*.y*ml",
|
|
58
30
|
regex: () => /\bnodejs\d+.x\b/gm,
|
|
59
|
-
tests: [
|
|
31
|
+
tests: [isPatchableServerlessVersion],
|
|
60
32
|
replace: `nodejs${nodeVersion}.x`
|
|
61
33
|
},
|
|
62
34
|
{
|
|
63
35
|
files: "**/serverless*.y*ml",
|
|
64
36
|
regex: () => /\bnode\d+\b/gm,
|
|
65
|
-
tests: [
|
|
37
|
+
tests: [isPatchableServerlessVersion],
|
|
66
38
|
replace: `node${nodeVersion}`
|
|
67
39
|
},
|
|
68
40
|
{
|
|
@@ -88,19 +60,19 @@ const subPatches = ({
|
|
|
88
60
|
{
|
|
89
61
|
files: "**/package.json",
|
|
90
62
|
regex: () => /(["']engines["']:\s*{[\s\S]*?["']node["']:\s*["']>=)(\d+(?:\.\d+)*)(['"]\s*})/gm,
|
|
91
|
-
tests: [
|
|
63
|
+
tests: [isPatchableServerlessVersion, isPatchableSkubaType],
|
|
92
64
|
replace: `$1${nodeVersion}$3`
|
|
93
65
|
},
|
|
94
66
|
{
|
|
95
67
|
files: "**/tsconfig*.json",
|
|
96
68
|
regex: () => /("target":\s*")(ES\d+)"/gim,
|
|
97
|
-
tests: [
|
|
69
|
+
tests: [isPatchableServerlessVersion, isPatchableSkubaType],
|
|
98
70
|
replace: `$1${ECMAScriptVersion}"`
|
|
99
71
|
},
|
|
100
72
|
{
|
|
101
73
|
files: "**/tsconfig*.json",
|
|
102
74
|
regex: () => /("lib":\s*\[)([\S\s]*?)(ES\d+)([\S\s]*?)(\])/gim,
|
|
103
|
-
tests: [
|
|
75
|
+
tests: [isPatchableServerlessVersion, isPatchableSkubaType],
|
|
104
76
|
replace: `$1$2${ECMAScriptVersion}$4$5`
|
|
105
77
|
},
|
|
106
78
|
{
|
|
@@ -110,8 +82,8 @@ const subPatches = ({
|
|
|
110
82
|
}
|
|
111
83
|
];
|
|
112
84
|
const runSubPatch = async (dir, patch) => {
|
|
113
|
-
const readFile =
|
|
114
|
-
const paths = patch.file ? [patch.file] : await
|
|
85
|
+
const readFile = createDestinationFileReader(dir);
|
|
86
|
+
const paths = patch.file ? [patch.file] : await glob(patch.files ?? [], {
|
|
115
87
|
cwd: dir,
|
|
116
88
|
ignore: ["**/node_modules/**"]
|
|
117
89
|
});
|
|
@@ -146,7 +118,7 @@ const writePatchedContents = async ({
|
|
|
146
118
|
contents,
|
|
147
119
|
templated,
|
|
148
120
|
regex
|
|
149
|
-
}) => await
|
|
121
|
+
}) => await fs.promises.writeFile(
|
|
150
122
|
path,
|
|
151
123
|
regex ? contents.replaceAll(regex(), templated) : templated
|
|
152
124
|
);
|
|
@@ -155,25 +127,21 @@ const upgrade = async (versions, dir) => {
|
|
|
155
127
|
await runSubPatch(dir, subPatch);
|
|
156
128
|
}
|
|
157
129
|
};
|
|
158
|
-
const nodeVersionMigration = async ({
|
|
130
|
+
export const nodeVersionMigration = async ({
|
|
159
131
|
nodeVersion,
|
|
160
132
|
ECMAScriptVersion
|
|
161
133
|
}, dir = process.cwd()) => {
|
|
162
|
-
|
|
134
|
+
log.ok(`Upgrading to Node.js ${nodeVersion}`);
|
|
163
135
|
try {
|
|
164
|
-
if (!await
|
|
136
|
+
if (!await isPatchableNodeVersion(nodeVersion, dir)) {
|
|
165
137
|
throw new Error("Node.js version is not patchable");
|
|
166
138
|
}
|
|
167
139
|
await upgrade({ nodeVersion, ECMAScriptVersion }, dir);
|
|
168
|
-
|
|
140
|
+
log.ok("Upgraded to Node.js", nodeVersion);
|
|
169
141
|
} catch (error) {
|
|
170
|
-
|
|
171
|
-
|
|
142
|
+
log.err("Failed to upgrade");
|
|
143
|
+
log.subtle(inspect(error));
|
|
172
144
|
process.exitCode = 1;
|
|
173
145
|
}
|
|
174
146
|
};
|
|
175
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
176
|
-
0 && (module.exports = {
|
|
177
|
-
nodeVersionMigration
|
|
178
|
-
});
|
|
179
147
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/migrate/nodeVersion/index.ts"],
|
|
4
4
|
"sourcesContent": ["import { inspect } from 'util';\n\nimport { glob } from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../utils/logging.js';\nimport { createDestinationFileReader } from '../../configure/analysis/project.js';\n\nimport {\n isPatchableNodeVersion,\n isPatchableServerlessVersion,\n isPatchableSkubaType,\n} from './checks.js';\n\ntype FileSelector =\n | { files: string; file?: never }\n | { file: string; files?: never };\n\ntype SubPatch = FileSelector & {\n tests?: Array<(path: string) => Promise<boolean>>;\n regex?: () => RegExp;\n replace: string;\n};\n\nconst subPatches = ({\n nodeVersion,\n ECMAScriptVersion,\n}: Versions): SubPatch[] => [\n { file: '.nvmrc', replace: `${nodeVersion}\\n` },\n {\n files: '**/Dockerfile*',\n\n regex: () =>\n /^FROM(.*) (public.ecr.aws\\/docker\\/library\\/)?node:([0-9]+(?:\\.[0-9]+(?:\\.[0-9]+)?)?)(-[a-z0-9]+)?(@sha256:[a-f0-9]{64})?( .*)?$/gm,\n replace: `FROM$1 $2node:${nodeVersion}$4$6`,\n },\n {\n files: '**/Dockerfile*',\n regex: () =>\n /^FROM(.*) gcr.io\\/distroless\\/nodejs\\d+-debian(\\d+)(@sha256:[a-f0-9]{64})?(\\.[^- \\n]+)?(-[^ \\n]+)?( .+|)$/gm,\n replace: `FROM$1 gcr.io/distroless/nodejs${nodeVersion}-debian$2$4$5$6`,\n },\n\n {\n files: '**/serverless*.y*ml',\n regex: () => /\\bnodejs\\d+.x\\b/gm,\n tests: [isPatchableServerlessVersion],\n replace: `nodejs${nodeVersion}.x`,\n },\n {\n files: '**/serverless*.y*ml',\n regex: () => /\\bnode\\d+\\b/gm,\n tests: [isPatchableServerlessVersion],\n replace: `node${nodeVersion}`,\n },\n\n {\n files: '**/infra/**/*.ts',\n regex: () => /NODEJS_\\d+_X/g,\n replace: `NODEJS_${nodeVersion}_X`,\n },\n {\n files: '**/infra/**/*.ts',\n regex: () => /(target:\\s*'node)(\\d+)(.+)$/gm,\n replace: `$1${nodeVersion}$3`,\n },\n\n {\n files: '**/.buildkite/*',\n regex: () =>\n /(image: )(public.ecr.aws\\/docker\\/library\\/)?(node:)[0-9.]+(\\.[^- \\n]+)?(-[^ \\n]+)?$/gm,\n replace: `$1$2$3${nodeVersion}$5`,\n },\n {\n files: '.node-version*',\n regex: () => /(\\d+(?:\\.\\d+)*)/g,\n replace: `${nodeVersion}`,\n },\n\n {\n files: '**/package.json',\n regex: () =>\n /([\"']engines[\"']:\\s*{[\\s\\S]*?[\"']node[\"']:\\s*[\"']>=)(\\d+(?:\\.\\d+)*)(['\"]\\s*})/gm,\n tests: [isPatchableServerlessVersion, isPatchableSkubaType],\n replace: `$1${nodeVersion}$3`,\n },\n\n {\n files: '**/tsconfig*.json',\n regex: () => /(\"target\":\\s*\")(ES\\d+)\"/gim,\n tests: [isPatchableServerlessVersion, isPatchableSkubaType],\n replace: `$1${ECMAScriptVersion}\"`,\n },\n {\n files: '**/tsconfig*.json',\n regex: () => /(\"lib\":\\s*\\[)([\\S\\s]*?)(ES\\d+)([\\S\\s]*?)(\\])/gim,\n tests: [isPatchableServerlessVersion, isPatchableSkubaType],\n replace: `$1$2${ECMAScriptVersion}$4$5`,\n },\n\n {\n files: '**/docker-compose*.y*ml',\n regex: () =>\n /(image: )(public.ecr.aws\\/docker\\/library\\/)?(node:)[0-9.]+(\\.[^- \\n]+)?(-[^ \\n]+)?$/gm,\n\n replace: `$1$2$3${nodeVersion}$5`,\n },\n];\n\ntype Versions = {\n nodeVersion: number;\n ECMAScriptVersion: string;\n};\n\nconst runSubPatch = async (dir: string, patch: SubPatch) => {\n const readFile = createDestinationFileReader(dir);\n const paths = patch.file\n ? [patch.file]\n : await glob(patch.files ?? [], {\n cwd: dir,\n ignore: ['**/node_modules/**'],\n });\n\n await Promise.all(\n paths.map(async (path) => {\n const contents = await readFile(path);\n if (!contents) {\n return;\n }\n\n if (patch.regex && !patch.regex().test(contents)) {\n return;\n }\n\n if (patch.tests) {\n const results = await Promise.all(\n patch.tests.map((test) => test(path)),\n );\n if (!results.every(Boolean)) {\n return;\n }\n }\n\n await writePatchedContents({\n path,\n contents,\n templated: patch.replace,\n regex: patch.regex,\n });\n }),\n );\n};\n\nconst writePatchedContents = async ({\n path,\n contents,\n templated,\n regex,\n}: {\n path: string;\n contents: string;\n templated: string;\n regex?: () => RegExp;\n}) =>\n await fs.promises.writeFile(\n path,\n regex ? contents.replaceAll(regex(), templated) : templated,\n );\n\nconst upgrade = async (versions: Versions, dir: string) => {\n for (const subPatch of subPatches(versions)) {\n await runSubPatch(dir, subPatch);\n }\n};\n\nexport const nodeVersionMigration = async (\n {\n nodeVersion,\n ECMAScriptVersion,\n }: {\n nodeVersion: number;\n ECMAScriptVersion: string;\n },\n dir = process.cwd(),\n) => {\n log.ok(`Upgrading to Node.js ${nodeVersion}`);\n try {\n if (!(await isPatchableNodeVersion(nodeVersion, dir))) {\n throw new Error('Node.js version is not patchable');\n }\n\n await upgrade({ nodeVersion, ECMAScriptVersion }, dir);\n\n log.ok('Upgraded to Node.js', nodeVersion);\n } catch (error) {\n log.err('Failed to upgrade');\n log.subtle(inspect(error));\n process.exitCode = 1;\n }\n};\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";AAAA,SAAS,eAAe;AAExB,SAAS,YAAY;AACrB,OAAO,QAAQ;AAEf,SAAS,WAAW;AACpB,SAAS,mCAAmC;AAE5C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAYP,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AACF,MAA4B;AAAA,EAC1B,EAAE,MAAM,UAAU,SAAS,GAAG,WAAW;AAAA,EAAK;AAAA,EAC9C;AAAA,IACE,OAAO;AAAA,IAEP,OAAO,MACL;AAAA,IACF,SAAS,iBAAiB,WAAW;AAAA,EACvC;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,MACL;AAAA,IACF,SAAS,kCAAkC,WAAW;AAAA,EACxD;AAAA,EAEA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,MAAM;AAAA,IACb,OAAO,CAAC,4BAA4B;AAAA,IACpC,SAAS,SAAS,WAAW;AAAA,EAC/B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,MAAM;AAAA,IACb,OAAO,CAAC,4BAA4B;AAAA,IACpC,SAAS,OAAO,WAAW;AAAA,EAC7B;AAAA,EAEA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,MAAM;AAAA,IACb,SAAS,UAAU,WAAW;AAAA,EAChC;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,MAAM;AAAA,IACb,SAAS,KAAK,WAAW;AAAA,EAC3B;AAAA,EAEA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,MACL;AAAA,IACF,SAAS,SAAS,WAAW;AAAA,EAC/B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,MAAM;AAAA,IACb,SAAS,GAAG,WAAW;AAAA,EACzB;AAAA,EAEA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,MACL;AAAA,IACF,OAAO,CAAC,8BAA8B,oBAAoB;AAAA,IAC1D,SAAS,KAAK,WAAW;AAAA,EAC3B;AAAA,EAEA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,MAAM;AAAA,IACb,OAAO,CAAC,8BAA8B,oBAAoB;AAAA,IAC1D,SAAS,KAAK,iBAAiB;AAAA,EACjC;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,MAAM;AAAA,IACb,OAAO,CAAC,8BAA8B,oBAAoB;AAAA,IAC1D,SAAS,OAAO,iBAAiB;AAAA,EACnC;AAAA,EAEA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,MACL;AAAA,IAEF,SAAS,SAAS,WAAW;AAAA,EAC/B;AACF;AAOA,MAAM,cAAc,OAAO,KAAa,UAAoB;AAC1D,QAAM,WAAW,4BAA4B,GAAG;AAChD,QAAM,QAAQ,MAAM,OAChB,CAAC,MAAM,IAAI,IACX,MAAM,KAAK,MAAM,SAAS,CAAC,GAAG;AAAA,IAC5B,KAAK;AAAA,IACL,QAAQ,CAAC,oBAAoB;AAAA,EAC/B,CAAC;AAEL,QAAM,QAAQ;AAAA,IACZ,MAAM,IAAI,OAAO,SAAS;AACxB,YAAM,WAAW,MAAM,SAAS,IAAI;AACpC,UAAI,CAAC,UAAU;AACb;AAAA,MACF;AAEA,UAAI,MAAM,SAAS,CAAC,MAAM,MAAM,EAAE,KAAK,QAAQ,GAAG;AAChD;AAAA,MACF;AAEA,UAAI,MAAM,OAAO;AACf,cAAM,UAAU,MAAM,QAAQ;AAAA,UAC5B,MAAM,MAAM,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC;AAAA,QACtC;AACA,YAAI,CAAC,QAAQ,MAAM,OAAO,GAAG;AAC3B;AAAA,QACF;AAAA,MACF;AAEA,YAAM,qBAAqB;AAAA,QACzB;AAAA,QACA;AAAA,QACA,WAAW,MAAM;AAAA,QACjB,OAAO,MAAM;AAAA,MACf,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;AAEA,MAAM,uBAAuB,OAAO;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAME,MAAM,GAAG,SAAS;AAAA,EAChB;AAAA,EACA,QAAQ,SAAS,WAAW,MAAM,GAAG,SAAS,IAAI;AACpD;AAEF,MAAM,UAAU,OAAO,UAAoB,QAAgB;AACzD,aAAW,YAAY,WAAW,QAAQ,GAAG;AAC3C,UAAM,YAAY,KAAK,QAAQ;AAAA,EACjC;AACF;AAEO,aAAM,uBAAuB,OAClC;AAAA,EACE;AAAA,EACA;AACF,GAIA,MAAM,QAAQ,IAAI,MACf;AACH,MAAI,GAAG,wBAAwB,WAAW,EAAE;AAC5C,MAAI;AACF,QAAI,CAAE,MAAM,uBAAuB,aAAa,GAAG,GAAI;AACrD,YAAM,IAAI,MAAM,kCAAkC;AAAA,IACpD;AAEA,UAAM,QAAQ,EAAE,aAAa,kBAAkB,GAAG,GAAG;AAErD,QAAI,GAAG,uBAAuB,WAAW;AAAA,EAC3C,SAAS,OAAO;AACd,QAAI,IAAI,mBAAmB;AAC3B,QAAI,OAAO,QAAQ,KAAK,CAAC;AACzB,YAAQ,WAAW;AAAA,EACrB;AACF;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/lib/cli/node/index.js
CHANGED
|
@@ -1,91 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 node_exports = {};
|
|
30
|
-
__export(node_exports, {
|
|
31
|
-
longRunning: () => longRunning,
|
|
32
|
-
node: () => node
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(node_exports);
|
|
35
|
-
var import_path = __toESM(require("path"));
|
|
36
|
-
var import_execa = __toESM(require("execa"));
|
|
37
|
-
var import_get_port = __toESM(require("get-port"));
|
|
38
|
-
var import_args = require("../../utils/args.js");
|
|
39
|
-
var import_exec = require("../../utils/exec.js");
|
|
40
|
-
var import_validation = require("../../utils/validation.js");
|
|
41
|
-
var import_tsc = require("../build/tsc.js");
|
|
42
|
-
const longRunning = true;
|
|
43
|
-
const node = async () => {
|
|
44
|
-
const args = (0, import_args.parseRunArgs)(process.argv.slice(2));
|
|
45
|
-
const customConditions = (0, import_tsc.getCustomConditions)();
|
|
2
|
+
import path from "path";
|
|
3
|
+
import execa from "execa";
|
|
4
|
+
import getPort from "get-port";
|
|
5
|
+
import { parseRunArgs } from "../../utils/args.js";
|
|
6
|
+
import { createExec } from "../../utils/exec.js";
|
|
7
|
+
import { isIpPort } from "../../utils/validation.js";
|
|
8
|
+
import { getCustomConditions } from "../build/tsc.js";
|
|
9
|
+
export const longRunning = true;
|
|
10
|
+
export const node = async () => {
|
|
11
|
+
const args = parseRunArgs(process.argv.slice(2));
|
|
12
|
+
const customConditions = getCustomConditions();
|
|
46
13
|
const uniqueConditions = [
|
|
47
14
|
.../* @__PURE__ */ new Set([...args.conditions ?? [], ...customConditions])
|
|
48
15
|
];
|
|
49
|
-
const availablePort = await (
|
|
16
|
+
const availablePort = await getPort();
|
|
50
17
|
const commonArgs = [
|
|
51
18
|
...args.node,
|
|
52
19
|
...uniqueConditions.map((condition) => `--conditions=${condition}`),
|
|
53
20
|
"--env-file-if-exists",
|
|
54
|
-
".env"
|
|
55
|
-
"--require",
|
|
56
|
-
require.resolve("tsconfig-paths/register")
|
|
21
|
+
".env"
|
|
57
22
|
];
|
|
58
23
|
if (args.entryPoint) {
|
|
59
|
-
const exec =
|
|
24
|
+
const exec = createExec({
|
|
60
25
|
env: {
|
|
61
26
|
__SKUBA_ENTRY_POINT: args.entryPoint,
|
|
62
|
-
__SKUBA_PORT: String(
|
|
27
|
+
__SKUBA_PORT: String(isIpPort(args.port) ? args.port : availablePort)
|
|
63
28
|
}
|
|
64
29
|
});
|
|
65
30
|
return exec(
|
|
66
31
|
"tsx",
|
|
67
32
|
...commonArgs,
|
|
68
|
-
|
|
33
|
+
path.join(import.meta.dirname, "..", "..", "wrapper", "index.js"),
|
|
69
34
|
...args.script
|
|
70
35
|
);
|
|
71
36
|
}
|
|
72
|
-
return (
|
|
73
|
-
|
|
37
|
+
return execa(
|
|
38
|
+
new URL(import.meta.resolve("tsx/cli")).pathname,
|
|
74
39
|
[
|
|
75
40
|
...commonArgs,
|
|
76
|
-
"--
|
|
41
|
+
"--import",
|
|
77
42
|
// Unsure if bug or feature that this is needed, but tsx appears to not do anything typescript in the REPL without this!
|
|
78
43
|
// Doesn't occur when just running the tsx binary directly 🧐
|
|
79
|
-
|
|
44
|
+
new URL(import.meta.resolve("tsx/patch-repl")).pathname
|
|
80
45
|
],
|
|
81
46
|
{
|
|
82
47
|
stdio: "inherit"
|
|
83
48
|
}
|
|
84
49
|
);
|
|
85
50
|
};
|
|
86
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
87
|
-
0 && (module.exports = {
|
|
88
|
-
longRunning,
|
|
89
|
-
node
|
|
90
|
-
});
|
|
91
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/node/index.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\n\nimport execa from 'execa';\nimport getPort from 'get-port';\n\nimport { parseRunArgs } from '../../utils/args.js';\nimport { createExec } from '../../utils/exec.js';\nimport { isIpPort } from '../../utils/validation.js';\nimport { getCustomConditions } from '../build/tsc.js';\n\nexport const longRunning = true;\n\nexport const node = async () => {\n const args = parseRunArgs(process.argv.slice(2));\n const customConditions = getCustomConditions();\n\n const uniqueConditions = [\n ...new Set([...(args.conditions ?? []), ...customConditions]),\n ];\n\n const availablePort = await getPort();\n\n const commonArgs = [\n ...args.node,\n ...uniqueConditions.map((condition) => `--conditions=${condition}`),\n '--env-file-if-exists',\n '.env',\n
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import path from 'path';\n\nimport execa from 'execa';\nimport getPort from 'get-port';\n\nimport { parseRunArgs } from '../../utils/args.js';\nimport { createExec } from '../../utils/exec.js';\nimport { isIpPort } from '../../utils/validation.js';\nimport { getCustomConditions } from '../build/tsc.js';\n\nexport const longRunning = true;\n\nexport const node = async () => {\n const args = parseRunArgs(process.argv.slice(2));\n const customConditions = getCustomConditions();\n\n const uniqueConditions = [\n ...new Set([...(args.conditions ?? []), ...customConditions]),\n ];\n\n const availablePort = await getPort();\n\n const commonArgs = [\n ...args.node,\n ...uniqueConditions.map((condition) => `--conditions=${condition}`),\n '--env-file-if-exists',\n '.env',\n ];\n\n if (args.entryPoint) {\n const exec = createExec({\n env: {\n __SKUBA_ENTRY_POINT: args.entryPoint,\n __SKUBA_PORT: String(isIpPort(args.port) ? args.port : availablePort),\n },\n });\n\n return exec(\n 'tsx',\n ...commonArgs,\n path.join(import.meta.dirname, '..', '..', 'wrapper', 'index.js'),\n ...args.script,\n );\n }\n\n return execa(\n new URL(import.meta.resolve('tsx/cli')).pathname,\n [\n ...commonArgs,\n '--import',\n // Unsure if bug or feature that this is needed, but tsx appears to not do anything typescript in the REPL without this!\n // Doesn't occur when just running the tsx binary directly \uD83E\uDDD0\n new URL(import.meta.resolve('tsx/patch-repl')).pathname,\n ],\n {\n stdio: 'inherit',\n },\n );\n};\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAO,UAAU;AAEjB,OAAO,WAAW;AAClB,OAAO,aAAa;AAEpB,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,2BAA2B;AAE7B,aAAM,cAAc;AAEpB,aAAM,OAAO,YAAY;AAC9B,QAAM,OAAO,aAAa,QAAQ,KAAK,MAAM,CAAC,CAAC;AAC/C,QAAM,mBAAmB,oBAAoB;AAE7C,QAAM,mBAAmB;AAAA,IACvB,GAAG,oBAAI,IAAI,CAAC,GAAI,KAAK,cAAc,CAAC,GAAI,GAAG,gBAAgB,CAAC;AAAA,EAC9D;AAEA,QAAM,gBAAgB,MAAM,QAAQ;AAEpC,QAAM,aAAa;AAAA,IACjB,GAAG,KAAK;AAAA,IACR,GAAG,iBAAiB,IAAI,CAAC,cAAc,gBAAgB,SAAS,EAAE;AAAA,IAClE;AAAA,IACA;AAAA,EACF;AAEA,MAAI,KAAK,YAAY;AACnB,UAAM,OAAO,WAAW;AAAA,MACtB,KAAK;AAAA,QACH,qBAAqB,KAAK;AAAA,QAC1B,cAAc,OAAO,SAAS,KAAK,IAAI,IAAI,KAAK,OAAO,aAAa;AAAA,MACtE;AAAA,IACF,CAAC;AAED,WAAO;AAAA,MACL;AAAA,MACA,GAAG;AAAA,MACH,KAAK,KAAK,YAAY,SAAS,MAAM,MAAM,WAAW,UAAU;AAAA,MAChE,GAAG,KAAK;AAAA,IACV;AAAA,EACF;AAEA,SAAO;AAAA,IACL,IAAI,IAAI,YAAY,QAAQ,SAAS,CAAC,EAAE;AAAA,IACxC;AAAA,MACE,GAAG;AAAA,MACH;AAAA;AAAA;AAAA,MAGA,IAAI,IAAI,YAAY,QAAQ,gBAAgB,CAAC,EAAE;AAAA,IACjD;AAAA,IACA;AAAA,MACE,OAAO;AAAA,IACT;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/lib/cli/release/index.js
CHANGED
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 });
|
|
2
|
+
import { exec } from "../../utils/exec.js";
|
|
3
|
+
export const release = async () => {
|
|
4
|
+
await exec("semantic-release", "--success", "false");
|
|
9
5
|
};
|
|
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 release_exports = {};
|
|
20
|
-
__export(release_exports, {
|
|
21
|
-
release: () => release
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(release_exports);
|
|
24
|
-
var import_exec = require("../../utils/exec.js");
|
|
25
|
-
const release = async () => {
|
|
26
|
-
await (0, import_exec.exec)("semantic-release", "--success", "false");
|
|
27
|
-
};
|
|
28
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
-
0 && (module.exports = {
|
|
30
|
-
release
|
|
31
|
-
});
|
|
32
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/release/index.ts"],
|
|
4
4
|
"sourcesContent": ["import { exec } from '../../utils/exec.js';\n\nexport const release = async () => {\n await exec('semantic-release', '--success', 'false');\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA,SAAS,YAAY;AAEd,aAAM,UAAU,YAAY;AACjC,QAAM,KAAK,oBAAoB,aAAa,OAAO;AACrD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/lib/cli/start/index.js
CHANGED
|
@@ -1,55 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 start_exports = {};
|
|
30
|
-
__export(start_exports, {
|
|
31
|
-
start: () => start
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(start_exports);
|
|
34
|
-
var import_path = __toESM(require("path"));
|
|
35
|
-
var import_get_port = __toESM(require("get-port"));
|
|
36
|
-
var import_args = require("../../utils/args.js");
|
|
37
|
-
var import_exec = require("../../utils/exec.js");
|
|
38
|
-
var import_manifest = require("../../utils/manifest.js");
|
|
39
|
-
var import_validation = require("../../utils/validation.js");
|
|
40
|
-
var import_tsc = require("../build/tsc.js");
|
|
41
|
-
const start = async () => {
|
|
42
|
-
const customConditions = (0, import_tsc.getCustomConditions)();
|
|
43
|
-
const args = (0, import_args.parseRunArgs)(process.argv.slice(2));
|
|
44
|
-
const availablePort = await (0, import_get_port.default)();
|
|
2
|
+
import path from "path";
|
|
3
|
+
import getPort from "get-port";
|
|
4
|
+
import { parseRunArgs } from "../../utils/args.js";
|
|
5
|
+
import { createExec } from "../../utils/exec.js";
|
|
6
|
+
import { getEntryPointFromManifest } from "../../utils/manifest.js";
|
|
7
|
+
import { isIpPort } from "../../utils/validation.js";
|
|
8
|
+
import { getCustomConditions } from "../build/tsc.js";
|
|
9
|
+
export const start = async () => {
|
|
10
|
+
const customConditions = getCustomConditions();
|
|
11
|
+
const args = parseRunArgs(process.argv.slice(2));
|
|
12
|
+
const availablePort = await getPort();
|
|
45
13
|
const uniqueConditions = [
|
|
46
14
|
.../* @__PURE__ */ new Set([...args.conditions ?? [], ...customConditions])
|
|
47
15
|
];
|
|
48
|
-
args.entryPoint ??= await
|
|
49
|
-
const execProcess =
|
|
16
|
+
args.entryPoint ??= await getEntryPointFromManifest();
|
|
17
|
+
const execProcess = createExec({
|
|
50
18
|
env: {
|
|
51
19
|
__SKUBA_ENTRY_POINT: args.entryPoint,
|
|
52
|
-
__SKUBA_PORT: String(
|
|
20
|
+
__SKUBA_PORT: String(isIpPort(args.port) ? args.port : availablePort)
|
|
53
21
|
}
|
|
54
22
|
});
|
|
55
23
|
return execProcess(
|
|
@@ -62,12 +30,8 @@ const start = async () => {
|
|
|
62
30
|
".env",
|
|
63
31
|
"--require",
|
|
64
32
|
"tsconfig-paths/register",
|
|
65
|
-
|
|
33
|
+
path.join(import.meta.dirname, "..", "..", "wrapper", "index.js"),
|
|
66
34
|
...args.script
|
|
67
35
|
);
|
|
68
36
|
};
|
|
69
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
70
|
-
0 && (module.exports = {
|
|
71
|
-
start
|
|
72
|
-
});
|
|
73
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/start/index.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\n\nimport getPort from 'get-port';\n\nimport { parseRunArgs } from '../../utils/args.js';\nimport { createExec } from '../../utils/exec.js';\nimport { getEntryPointFromManifest } from '../../utils/manifest.js';\nimport { isIpPort } from '../../utils/validation.js';\nimport { getCustomConditions } from '../build/tsc.js';\n\nexport const start = async () => {\n const customConditions = getCustomConditions();\n const args = parseRunArgs(process.argv.slice(2));\n const availablePort = await getPort();\n\n const uniqueConditions = [\n ...new Set([...(args.conditions ?? []), ...customConditions]),\n ];\n\n args.entryPoint ??= await getEntryPointFromManifest();\n\n const execProcess = createExec({\n env: {\n __SKUBA_ENTRY_POINT: args.entryPoint,\n __SKUBA_PORT: String(isIpPort(args.port) ? args.port : availablePort),\n },\n });\n\n return execProcess(\n 'tsx',\n 'watch',\n '--clear-screen=false',\n ...args.node,\n ...uniqueConditions.map((condition) => `--conditions=${condition}`),\n '--env-file-if-exists',\n '.env',\n '--require',\n 'tsconfig-paths/register',\n path.join(
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import path from 'path';\n\nimport getPort from 'get-port';\n\nimport { parseRunArgs } from '../../utils/args.js';\nimport { createExec } from '../../utils/exec.js';\nimport { getEntryPointFromManifest } from '../../utils/manifest.js';\nimport { isIpPort } from '../../utils/validation.js';\nimport { getCustomConditions } from '../build/tsc.js';\n\nexport const start = async () => {\n const customConditions = getCustomConditions();\n const args = parseRunArgs(process.argv.slice(2));\n const availablePort = await getPort();\n\n const uniqueConditions = [\n ...new Set([...(args.conditions ?? []), ...customConditions]),\n ];\n\n args.entryPoint ??= await getEntryPointFromManifest();\n\n const execProcess = createExec({\n env: {\n __SKUBA_ENTRY_POINT: args.entryPoint,\n __SKUBA_PORT: String(isIpPort(args.port) ? args.port : availablePort),\n },\n });\n\n return execProcess(\n 'tsx',\n 'watch',\n '--clear-screen=false',\n ...args.node,\n ...uniqueConditions.map((condition) => `--conditions=${condition}`),\n '--env-file-if-exists',\n '.env',\n '--require',\n 'tsconfig-paths/register',\n path.join(import.meta.dirname, '..', '..', 'wrapper', 'index.js'),\n ...args.script,\n );\n};\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAO,UAAU;AAEjB,OAAO,aAAa;AAEpB,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,iCAAiC;AAC1C,SAAS,gBAAgB;AACzB,SAAS,2BAA2B;AAE7B,aAAM,QAAQ,YAAY;AAC/B,QAAM,mBAAmB,oBAAoB;AAC7C,QAAM,OAAO,aAAa,QAAQ,KAAK,MAAM,CAAC,CAAC;AAC/C,QAAM,gBAAgB,MAAM,QAAQ;AAEpC,QAAM,mBAAmB;AAAA,IACvB,GAAG,oBAAI,IAAI,CAAC,GAAI,KAAK,cAAc,CAAC,GAAI,GAAG,gBAAgB,CAAC;AAAA,EAC9D;AAEA,OAAK,eAAe,MAAM,0BAA0B;AAEpD,QAAM,cAAc,WAAW;AAAA,IAC7B,KAAK;AAAA,MACH,qBAAqB,KAAK;AAAA,MAC1B,cAAc,OAAO,SAAS,KAAK,IAAI,IAAI,KAAK,OAAO,aAAa;AAAA,IACtE;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG,KAAK;AAAA,IACR,GAAG,iBAAiB,IAAI,CAAC,cAAc,gBAAgB,SAAS,EAAE;AAAA,IAClE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,KAAK,KAAK,YAAY,SAAS,MAAM,MAAM,WAAW,UAAU;AAAA,IAChE,GAAG,KAAK;AAAA,EACV;AACF;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/lib/cli/test/index.js
CHANGED
|
@@ -1,49 +1,7 @@
|
|
|
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 test_exports = {};
|
|
30
|
-
__export(test_exports, {
|
|
31
|
-
test: () => test
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(test_exports);
|
|
34
|
-
var import_exec = require("../../utils/exec.js");
|
|
35
|
-
const test = async () => {
|
|
2
|
+
import { exec } from "../../utils/exec.js";
|
|
3
|
+
export const test = async () => {
|
|
36
4
|
const argv = process.argv.slice(2);
|
|
37
|
-
|
|
38
|
-
const execWithEnv = (0, import_exec.createExec)({
|
|
39
|
-
env: {
|
|
40
|
-
NODE_OPTIONS: !nodeOptions.includes("--experimental-vm-modules") ? `${nodeOptions} --experimental-vm-modules --no-warnings=ExperimentalWarning` : nodeOptions
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
return execWithEnv(require.resolve("jest/bin/jest"), ...argv);
|
|
5
|
+
return exec("vitest", ...argv);
|
|
44
6
|
};
|
|
45
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
-
0 && (module.exports = {
|
|
47
|
-
test
|
|
48
|
-
});
|
|
49
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/test/index.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { exec } from '../../utils/exec.js';\n\nexport const test = async () => {\n const argv = process.argv.slice(2);\n\n return exec('vitest', ...argv);\n};\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,YAAY;AAEd,aAAM,OAAO,YAAY;AAC9B,QAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AAEjC,SAAO,KAAK,UAAU,GAAG,IAAI;AAC/B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/lib/cli/version/index.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 { log } from "../../utils/logging.js";
|
|
3
|
+
import { getSkubaVersion } from "../../utils/version.js";
|
|
4
|
+
export const version = async () => {
|
|
5
|
+
const skubaVersion = await getSkubaVersion();
|
|
6
|
+
log.plain(skubaVersion);
|
|
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 version_exports = {};
|
|
20
|
-
__export(version_exports, {
|
|
21
|
-
version: () => version
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(version_exports);
|
|
24
|
-
var import_logging = require("../../utils/logging.js");
|
|
25
|
-
var import_version = require("../../utils/version.js");
|
|
26
|
-
const version = async () => {
|
|
27
|
-
const skubaVersion = await (0, import_version.getSkubaVersion)();
|
|
28
|
-
import_logging.log.plain(skubaVersion);
|
|
29
|
-
};
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
version
|
|
33
|
-
});
|
|
34
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/version/index.ts"],
|
|
4
4
|
"sourcesContent": ["import { log } from '../../utils/logging.js';\nimport { getSkubaVersion } from '../../utils/version.js';\n\nexport const version = async () => {\n const skubaVersion = await getSkubaVersion();\n\n log.plain(skubaVersion);\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW;AACpB,SAAS,uBAAuB;AAEzB,aAAM,UAAU,YAAY;AACjC,QAAM,eAAe,MAAM,gBAAgB;AAE3C,MAAI,MAAM,YAAY;AACxB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|