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,55 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 __exports = {};
|
|
20
|
-
__export(__exports, {
|
|
21
|
-
patches: () => patches
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(__exports);
|
|
24
|
-
var import_collapseDuplicateMergeKeys = require("./collapseDuplicateMergeKeys.js");
|
|
25
|
-
var import_moveNpmrcMounts = require("./moveNpmrcMounts.js");
|
|
26
|
-
var import_patchDockerCompose = require("./patchDockerCompose.js");
|
|
27
|
-
var import_patchDockerImages = require("./patchDockerImages.js");
|
|
28
|
-
var import_upgradeESLint = require("./upgradeESLint.js");
|
|
29
|
-
const patches = [
|
|
2
|
+
import { tryCollapseDuplicateMergeKeys } from "./collapseDuplicateMergeKeys.js";
|
|
3
|
+
import { tryMoveNpmrcMounts } from "./moveNpmrcMounts.js";
|
|
4
|
+
import { tryPatchDockerComposeFiles } from "./patchDockerCompose.js";
|
|
5
|
+
import { tryPatchDockerImages } from "./patchDockerImages.js";
|
|
6
|
+
export const patches = [
|
|
30
7
|
{
|
|
31
|
-
apply:
|
|
8
|
+
apply: tryCollapseDuplicateMergeKeys,
|
|
32
9
|
description: "Collapse duplicate merge keys in .buildkite files"
|
|
33
10
|
},
|
|
34
11
|
{
|
|
35
|
-
apply:
|
|
36
|
-
description: "Upgrade to ESLint flat config"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
apply: import_patchDockerCompose.tryPatchDockerComposeFiles,
|
|
12
|
+
apply: tryPatchDockerComposeFiles,
|
|
40
13
|
description: "Remove version field from docker-compose files"
|
|
41
14
|
},
|
|
42
15
|
{
|
|
43
|
-
apply:
|
|
16
|
+
apply: tryPatchDockerImages,
|
|
44
17
|
description: "Update docker image references to use public.ecr.aws and remove --platform flag"
|
|
45
18
|
},
|
|
46
19
|
{
|
|
47
|
-
apply:
|
|
20
|
+
apply: tryMoveNpmrcMounts,
|
|
48
21
|
description: "Move .npmrc mounts from tmp/.npmrc to /tmp/.npmrc"
|
|
49
22
|
}
|
|
50
23
|
];
|
|
51
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
-
0 && (module.exports = {
|
|
53
|
-
patches
|
|
54
|
-
});
|
|
55
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/index.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Patches } from '../../index.js';\n\nimport { tryCollapseDuplicateMergeKeys } from './collapseDuplicateMergeKeys.js';\nimport { tryMoveNpmrcMounts } from './moveNpmrcMounts.js';\nimport { tryPatchDockerComposeFiles } from './patchDockerCompose.js';\nimport { tryPatchDockerImages } from './patchDockerImages.js';\
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type { Patches } from '../../index.js';\n\nimport { tryCollapseDuplicateMergeKeys } from './collapseDuplicateMergeKeys.js';\nimport { tryMoveNpmrcMounts } from './moveNpmrcMounts.js';\nimport { tryPatchDockerComposeFiles } from './patchDockerCompose.js';\nimport { tryPatchDockerImages } from './patchDockerImages.js';\n\nexport const patches: Patches = [\n {\n apply: tryCollapseDuplicateMergeKeys,\n description: 'Collapse duplicate merge keys in .buildkite files',\n },\n {\n apply: tryPatchDockerComposeFiles,\n description: 'Remove version field from docker-compose files',\n },\n {\n apply: tryPatchDockerImages,\n description:\n 'Update docker image references to use public.ecr.aws and remove --platform flag',\n },\n {\n apply: tryMoveNpmrcMounts,\n description: 'Move .npmrc mounts from tmp/.npmrc to /tmp/.npmrc',\n },\n];\n"],
|
|
5
|
+
"mappings": ";AAEA,SAAS,qCAAqC;AAC9C,SAAS,0BAA0B;AACnC,SAAS,kCAAkC;AAC3C,SAAS,4BAA4B;AAE9B,aAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aACE;AAAA,EACJ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,44 +1,12 @@
|
|
|
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 moveNpmrcMounts_exports = {};
|
|
30
|
-
__export(moveNpmrcMounts_exports, {
|
|
31
|
-
tryMoveNpmrcMounts: () => tryMoveNpmrcMounts
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(moveNpmrcMounts_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");
|
|
2
|
+
import { inspect } from "util";
|
|
3
|
+
import { glob } from "fast-glob";
|
|
4
|
+
import fs from "fs-extra";
|
|
5
|
+
import { log } from "../../../../../../utils/logging.js";
|
|
38
6
|
const moveNpmrcMounts = async ({
|
|
39
7
|
mode
|
|
40
8
|
}) => {
|
|
41
|
-
const buildkiteFiles = await
|
|
9
|
+
const buildkiteFiles = await glob(
|
|
42
10
|
["{apps/*/,packages/*/,./}.buildkite/**/*.y*ml"],
|
|
43
11
|
{ onlyFiles: true }
|
|
44
12
|
);
|
|
@@ -46,7 +14,7 @@ const moveNpmrcMounts = async ({
|
|
|
46
14
|
return { result: "skip", reason: "no Buildkite files found" };
|
|
47
15
|
}
|
|
48
16
|
const input = await Promise.all(
|
|
49
|
-
buildkiteFiles.map((name) =>
|
|
17
|
+
buildkiteFiles.map((name) => fs.promises.readFile(name, "utf-8"))
|
|
50
18
|
);
|
|
51
19
|
const replaced = input.map(moveNpmrcMountsInFile);
|
|
52
20
|
if (replaced.every((r, i) => r === input[i])) {
|
|
@@ -62,7 +30,7 @@ const moveNpmrcMounts = async ({
|
|
|
62
30
|
buildkiteFiles.flatMap(
|
|
63
31
|
(name, i) => replaced[i] !== input[i] ? (
|
|
64
32
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
65
|
-
[
|
|
33
|
+
[fs.promises.writeFile(name, replaced[i])]
|
|
66
34
|
) : []
|
|
67
35
|
)
|
|
68
36
|
);
|
|
@@ -76,17 +44,13 @@ const moveNpmrcMountsInFile = (input) => {
|
|
|
76
44
|
}
|
|
77
45
|
return input.replaceAll(secret, "$1secrets: id=npm,src=/tmp/.npmrc$2").replaceAll(outputPath, "$1output-path: /tmp/$2");
|
|
78
46
|
};
|
|
79
|
-
const tryMoveNpmrcMounts = async (config) => {
|
|
47
|
+
export const tryMoveNpmrcMounts = async (config) => {
|
|
80
48
|
try {
|
|
81
49
|
return await moveNpmrcMounts(config);
|
|
82
50
|
} catch (err) {
|
|
83
|
-
|
|
84
|
-
|
|
51
|
+
log.warn("Failed to move .npmrc mounts");
|
|
52
|
+
log.subtle(inspect(err));
|
|
85
53
|
return { result: "skip", reason: "due to an error" };
|
|
86
54
|
}
|
|
87
55
|
};
|
|
88
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
89
|
-
0 && (module.exports = {
|
|
90
|
-
tryMoveNpmrcMounts
|
|
91
|
-
});
|
|
92
56
|
//# sourceMappingURL=moveNpmrcMounts.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.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 type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst moveNpmrcMounts: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n const buildkiteFiles = await glob(\n ['{apps/*/,packages/*/,./}.buildkite/**/*.y*ml'],\n { onlyFiles: true },\n );\n\n if (buildkiteFiles.length === 0) {\n return { result: 'skip', reason: 'no Buildkite files found' };\n }\n\n const input = await Promise.all(\n buildkiteFiles.map((name) => fs.promises.readFile(name, 'utf-8')),\n );\n\n const replaced = input.map(moveNpmrcMountsInFile);\n\n if (replaced.every((r, i) => r === input[i])) {\n return {\n result: 'skip',\n reason: 'no .npmrc mounts found need to be updated',\n };\n }\n\n if (mode === 'lint') {\n return { result: 'apply' };\n }\n\n await Promise.all(\n buildkiteFiles.flatMap((name, i) =>\n replaced[i] !== input[i]\n ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n [fs.promises.writeFile(name, replaced[i]!)]\n : [],\n ),\n );\n\n return { result: 'apply' };\n};\n\nconst secret = /^(\\s*)secrets: id=npm,src=tmp\\/\\.npmrc(\\s*#?.*)$/gm;\nconst outputPath = /^(\\s*)output-path: tmp\\/(\\s*#?.*)$/gm;\n\nconst moveNpmrcMountsInFile = (input: string) => {\n if (!secret.test(input) || !outputPath.test(input)) {\n return input;\n }\n\n return input\n .replaceAll(secret, '$1secrets: id=npm,src=/tmp/.npmrc$2')\n .replaceAll(outputPath, '$1output-path: /tmp/$2');\n};\n\nexport const tryMoveNpmrcMounts: PatchFunction = async (config) => {\n try {\n return await moveNpmrcMounts(config);\n } catch (err) {\n log.warn('Failed to move .npmrc mounts');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";AAAA,SAAS,eAAe;AAExB,SAAS,YAAY;AACrB,OAAO,QAAQ;AAEf,SAAS,WAAW;AAGpB,MAAM,kBAAiC,OAAO;AAAA,EAC5C;AACF,MAAgC;AAC9B,QAAM,iBAAiB,MAAM;AAAA,IAC3B,CAAC,8CAA8C;AAAA,IAC/C,EAAE,WAAW,KAAK;AAAA,EACpB;AAEA,MAAI,eAAe,WAAW,GAAG;AAC/B,WAAO,EAAE,QAAQ,QAAQ,QAAQ,2BAA2B;AAAA,EAC9D;AAEA,QAAM,QAAQ,MAAM,QAAQ;AAAA,IAC1B,eAAe,IAAI,CAAC,SAAS,GAAG,SAAS,SAAS,MAAM,OAAO,CAAC;AAAA,EAClE;AAEA,QAAM,WAAW,MAAM,IAAI,qBAAqB;AAEhD,MAAI,SAAS,MAAM,CAAC,GAAG,MAAM,MAAM,MAAM,CAAC,CAAC,GAAG;AAC5C,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,MAAI,SAAS,QAAQ;AACnB,WAAO,EAAE,QAAQ,QAAQ;AAAA,EAC3B;AAEA,QAAM,QAAQ;AAAA,IACZ,eAAe;AAAA,MAAQ,CAAC,MAAM,MAC5B,SAAS,CAAC,MAAM,MAAM,CAAC;AAAA;AAAA,QAEnB,CAAC,GAAG,SAAS,UAAU,MAAM,SAAS,CAAC,CAAE,CAAC;AAAA,UAC1C,CAAC;AAAA,IACP;AAAA,EACF;AAEA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEA,MAAM,SAAS;AACf,MAAM,aAAa;AAEnB,MAAM,wBAAwB,CAAC,UAAkB;AAC/C,MAAI,CAAC,OAAO,KAAK,KAAK,KAAK,CAAC,WAAW,KAAK,KAAK,GAAG;AAClD,WAAO;AAAA,EACT;AAEA,SAAO,MACJ,WAAW,QAAQ,qCAAqC,EACxD,WAAW,YAAY,wBAAwB;AACpD;AAEO,aAAM,qBAAoC,OAAO,WAAW;AACjE,MAAI;AACF,WAAO,MAAM,gBAAgB,MAAM;AAAA,EACrC,SAAS,KAAK;AACZ,QAAI,KAAK,8BAA8B;AACvC,QAAI,OAAO,QAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,44 +1,12 @@
|
|
|
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 patchDockerCompose_exports = {};
|
|
30
|
-
__export(patchDockerCompose_exports, {
|
|
31
|
-
tryPatchDockerComposeFiles: () => tryPatchDockerComposeFiles
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(patchDockerCompose_exports);
|
|
34
|
-
var import_util = require("util");
|
|
35
|
-
var import_fast_glob = __toESM(require("fast-glob"));
|
|
36
|
-
var import_fs_extra = __toESM(require("fs-extra"));
|
|
37
|
-
var import_logging = require("../../../../../../utils/logging.js");
|
|
2
|
+
import { inspect } from "util";
|
|
3
|
+
import fg from "fast-glob";
|
|
4
|
+
import fs from "fs-extra";
|
|
5
|
+
import { log } from "../../../../../../utils/logging.js";
|
|
38
6
|
const DOCKER_COMPOSE_VERSION_REGEX = /^version: ['"]?\d+(\.\d+)*['"]?\n*/m;
|
|
39
7
|
const fetchFiles = async (files) => Promise.all(
|
|
40
8
|
files.map(async (file) => {
|
|
41
|
-
const contents = await
|
|
9
|
+
const contents = await fs.readFile(file, "utf8");
|
|
42
10
|
return {
|
|
43
11
|
file,
|
|
44
12
|
contents
|
|
@@ -48,7 +16,7 @@ const fetchFiles = async (files) => Promise.all(
|
|
|
48
16
|
const patchDockerComposeFiles = async ({
|
|
49
17
|
mode
|
|
50
18
|
}) => {
|
|
51
|
-
const maybeDockerComposeFiles = await (
|
|
19
|
+
const maybeDockerComposeFiles = await fg(["docker-compose*.yml"]);
|
|
52
20
|
if (!maybeDockerComposeFiles.length) {
|
|
53
21
|
return {
|
|
54
22
|
result: "skip",
|
|
@@ -76,22 +44,18 @@ const patchDockerComposeFiles = async ({
|
|
|
76
44
|
DOCKER_COMPOSE_VERSION_REGEX,
|
|
77
45
|
""
|
|
78
46
|
);
|
|
79
|
-
await
|
|
47
|
+
await fs.writeFile(file, patchedContents);
|
|
80
48
|
})
|
|
81
49
|
);
|
|
82
50
|
return { result: "apply" };
|
|
83
51
|
};
|
|
84
|
-
const tryPatchDockerComposeFiles = async (config) => {
|
|
52
|
+
export const tryPatchDockerComposeFiles = async (config) => {
|
|
85
53
|
try {
|
|
86
54
|
return await patchDockerComposeFiles(config);
|
|
87
55
|
} catch (err) {
|
|
88
|
-
|
|
89
|
-
|
|
56
|
+
log.warn("Failed to patch pnpm packageManager CI configuration.");
|
|
57
|
+
log.subtle(inspect(err));
|
|
90
58
|
return { result: "skip", reason: "due to an error" };
|
|
91
59
|
}
|
|
92
60
|
};
|
|
93
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
94
|
-
0 && (module.exports = {
|
|
95
|
-
tryPatchDockerComposeFiles
|
|
96
|
-
});
|
|
97
61
|
//# sourceMappingURL=patchDockerCompose.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.ts"],
|
|
4
4
|
"sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst DOCKER_COMPOSE_VERSION_REGEX = /^version: ['\"]?\\d+(\\.\\d+)*['\"]?\\n*/m;\n\nconst fetchFiles = async (files: string[]) =>\n Promise.all(\n files.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n );\n\nconst patchDockerComposeFiles: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n const maybeDockerComposeFiles = await fg(['docker-compose*.yml']);\n\n if (!maybeDockerComposeFiles.length) {\n return {\n result: 'skip',\n reason: 'no docker-compose files found',\n };\n }\n\n const dockerComposeFiles = await fetchFiles(maybeDockerComposeFiles);\n\n const dockerComposeFilesToPatch = dockerComposeFiles.filter(({ contents }) =>\n DOCKER_COMPOSE_VERSION_REGEX.exec(contents),\n );\n\n if (!dockerComposeFilesToPatch.length) {\n return {\n result: 'skip',\n reason: 'no docker-compose files to patch',\n };\n }\n\n if (mode === 'lint') {\n return {\n result: 'apply',\n };\n }\n\n await Promise.all(\n dockerComposeFilesToPatch.map(async ({ file, contents }) => {\n const patchedContents = contents.replace(\n DOCKER_COMPOSE_VERSION_REGEX,\n '',\n );\n await fs.writeFile(file, patchedContents);\n }),\n );\n\n return { result: 'apply' };\n};\n\nexport const tryPatchDockerComposeFiles: PatchFunction = async (config) => {\n try {\n return await patchDockerComposeFiles(config);\n } catch (err) {\n log.warn('Failed to patch pnpm packageManager CI configuration.');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";AAAA,SAAS,eAAe;AAExB,OAAO,QAAQ;AACf,OAAO,QAAQ;AAEf,SAAS,WAAW;AAGpB,MAAM,+BAA+B;AAErC,MAAM,aAAa,OAAO,UACxB,QAAQ;AAAA,EACN,MAAM,IAAI,OAAO,SAAS;AACxB,UAAM,WAAW,MAAM,GAAG,SAAS,MAAM,MAAM;AAE/C,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEF,MAAM,0BAAyC,OAAO;AAAA,EACpD;AACF,MAAgC;AAC9B,QAAM,0BAA0B,MAAM,GAAG,CAAC,qBAAqB,CAAC;AAEhE,MAAI,CAAC,wBAAwB,QAAQ;AACnC,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,qBAAqB,MAAM,WAAW,uBAAuB;AAEnE,QAAM,4BAA4B,mBAAmB;AAAA,IAAO,CAAC,EAAE,SAAS,MACtE,6BAA6B,KAAK,QAAQ;AAAA,EAC5C;AAEA,MAAI,CAAC,0BAA0B,QAAQ;AACrC,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,MAAI,SAAS,QAAQ;AACnB,WAAO;AAAA,MACL,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,QAAQ;AAAA,IACZ,0BAA0B,IAAI,OAAO,EAAE,MAAM,SAAS,MAAM;AAC1D,YAAM,kBAAkB,SAAS;AAAA,QAC/B;AAAA,QACA;AAAA,MACF;AACA,YAAM,GAAG,UAAU,MAAM,eAAe;AAAA,IAC1C,CAAC;AAAA,EACH;AAEA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,aAAM,6BAA4C,OAAO,WAAW;AACzE,MAAI;AACF,WAAO,MAAM,wBAAwB,MAAM;AAAA,EAC7C,SAAS,KAAK;AACZ,QAAI,KAAK,uDAAuD;AAChE,QAAI,OAAO,QAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,47 +1,15 @@
|
|
|
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 patchDockerImages_exports = {};
|
|
30
|
-
__export(patchDockerImages_exports, {
|
|
31
|
-
tryPatchDockerImages: () => tryPatchDockerImages
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(patchDockerImages_exports);
|
|
34
|
-
var import_util = require("util");
|
|
35
|
-
var import_fast_glob = __toESM(require("fast-glob"));
|
|
36
|
-
var import_fs_extra = __toESM(require("fs-extra"));
|
|
37
|
-
var import_logging = require("../../../../../../utils/logging.js");
|
|
2
|
+
import { inspect } from "util";
|
|
3
|
+
import fg from "fast-glob";
|
|
4
|
+
import fs from "fs-extra";
|
|
5
|
+
import { log } from "../../../../../../utils/logging.js";
|
|
38
6
|
const DOCKER_IMAGE_REGEX = /^(FROM\s?.*)(\s)(node|python)(:.*)/gm;
|
|
39
7
|
const DOCKER_IMAGE_PLATFORM_REGEX = /^(FROM\s?.*)(--platform=[^\s]+) /gm;
|
|
40
8
|
const DOCKER_COMPOSE_IMAGE_REGEX = /^(\s+image:\s)(node|python)(:.*)/gm;
|
|
41
9
|
const PUBLIC_ECR = "public.ecr.aws/docker/library/";
|
|
42
10
|
const fetchFiles = async (files) => Promise.all(
|
|
43
11
|
files.map(async (file) => {
|
|
44
|
-
const contents = await
|
|
12
|
+
const contents = await fs.readFile(file, "utf8");
|
|
45
13
|
return {
|
|
46
14
|
file,
|
|
47
15
|
contents
|
|
@@ -68,8 +36,8 @@ const patchDockerImages = async ({
|
|
|
68
36
|
mode
|
|
69
37
|
}) => {
|
|
70
38
|
const [maybeDockerFilesPaths, maybeDockerComposePaths] = await Promise.all([
|
|
71
|
-
(
|
|
72
|
-
(
|
|
39
|
+
fg(["Dockerfile*"]),
|
|
40
|
+
fg(["docker-compose*.y*ml"])
|
|
73
41
|
]);
|
|
74
42
|
if (!maybeDockerFilesPaths.length && !maybeDockerComposePaths.length) {
|
|
75
43
|
return {
|
|
@@ -110,7 +78,7 @@ const patchDockerImages = async ({
|
|
|
110
78
|
"$1"
|
|
111
79
|
);
|
|
112
80
|
}
|
|
113
|
-
await
|
|
81
|
+
await fs.writeFile(file, patchedContents);
|
|
114
82
|
}
|
|
115
83
|
);
|
|
116
84
|
const dockerComposeFilePatches = dockerComposeFilesToPatch.map(
|
|
@@ -119,23 +87,19 @@ const patchDockerImages = async ({
|
|
|
119
87
|
DOCKER_COMPOSE_IMAGE_REGEX,
|
|
120
88
|
`$1${PUBLIC_ECR}$2$3`
|
|
121
89
|
);
|
|
122
|
-
await
|
|
90
|
+
await fs.writeFile(file, patchedContents);
|
|
123
91
|
}
|
|
124
92
|
);
|
|
125
93
|
await Promise.all([...dockerFilePatches, ...dockerComposeFilePatches]);
|
|
126
94
|
return { result: "apply" };
|
|
127
95
|
};
|
|
128
|
-
const tryPatchDockerImages = async (config) => {
|
|
96
|
+
export const tryPatchDockerImages = async (config) => {
|
|
129
97
|
try {
|
|
130
98
|
return await patchDockerImages(config);
|
|
131
99
|
} catch (err) {
|
|
132
|
-
|
|
133
|
-
|
|
100
|
+
log.warn("Failed to patch Docker images");
|
|
101
|
+
log.subtle(inspect(err));
|
|
134
102
|
return { result: "skip", reason: "due to an error" };
|
|
135
103
|
}
|
|
136
104
|
};
|
|
137
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
138
|
-
0 && (module.exports = {
|
|
139
|
-
tryPatchDockerImages
|
|
140
|
-
});
|
|
141
105
|
//# sourceMappingURL=patchDockerImages.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.ts"],
|
|
4
4
|
"sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst DOCKER_IMAGE_REGEX = /^(FROM\\s?.*)(\\s)(node|python)(:.*)/gm;\nconst DOCKER_IMAGE_PLATFORM_REGEX = /^(FROM\\s?.*)(--platform=[^\\s]+) /gm;\nconst DOCKER_COMPOSE_IMAGE_REGEX = /^(\\s+image:\\s)(node|python)(:.*)/gm;\nconst PUBLIC_ECR = 'public.ecr.aws/docker/library/';\n\nconst fetchFiles = async (files: string[]) =>\n Promise.all(\n files.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n );\n\nconst isInvalidPlatformFlagUsage = (contents: string) => {\n const matches = [...contents.matchAll(DOCKER_IMAGE_PLATFORM_REGEX)];\n\n if (!matches.length) {\n return false;\n }\n\n const uniquePlatforms = [\n ...new Set(matches.map(([, , platform]) => platform as string)),\n ];\n\n // Multiple --platform flags are used which may indicate a multi arch build\n if (uniquePlatforms.length > 1) {\n return false;\n }\n\n // Avoid patching as they may be using args to set the platform\n if (uniquePlatforms[0]?.startsWith('--platform=$')) {\n return false;\n }\n\n return true;\n};\n\nconst patchDockerImages: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n const [maybeDockerFilesPaths, maybeDockerComposePaths] = await Promise.all([\n fg(['Dockerfile*']),\n fg(['docker-compose*.y*ml']),\n ]);\n\n if (!maybeDockerFilesPaths.length && !maybeDockerComposePaths.length) {\n return {\n result: 'skip',\n reason: 'no Dockerfile or docker-compose files found',\n };\n }\n\n const [dockerFiles, dockerComposeFiles] = await Promise.all([\n fetchFiles(maybeDockerFilesPaths),\n fetchFiles(maybeDockerComposePaths),\n ]);\n\n const dockerFilesToPatch = dockerFiles.filter(\n ({ contents }) =>\n DOCKER_IMAGE_REGEX.exec(contents) ?? isInvalidPlatformFlagUsage(contents),\n );\n\n const dockerComposeFilesToPatch = dockerComposeFiles.filter(({ contents }) =>\n DOCKER_COMPOSE_IMAGE_REGEX.exec(contents),\n );\n\n if (!dockerFilesToPatch.length && !dockerComposeFilesToPatch.length) {\n return {\n result: 'skip',\n reason: 'no Dockerfile or docker-compose files to patch',\n };\n }\n\n if (mode === 'lint') {\n return {\n result: 'apply',\n };\n }\n\n const dockerFilePatches = dockerFilesToPatch.map(\n async ({ file, contents }) => {\n let patchedContents = contents.replace(\n DOCKER_IMAGE_REGEX,\n `$1$2${PUBLIC_ECR}$3$4`,\n );\n\n if (isInvalidPlatformFlagUsage(contents)) {\n patchedContents = patchedContents.replace(\n DOCKER_IMAGE_PLATFORM_REGEX,\n '$1',\n );\n }\n\n await fs.writeFile(file, patchedContents);\n },\n );\n\n const dockerComposeFilePatches = dockerComposeFilesToPatch.map(\n async ({ file, contents }) => {\n const patchedContents = contents.replace(\n DOCKER_COMPOSE_IMAGE_REGEX,\n `$1${PUBLIC_ECR}$2$3`,\n );\n await fs.writeFile(file, patchedContents);\n },\n );\n\n await Promise.all([...dockerFilePatches, ...dockerComposeFilePatches]);\n\n return { result: 'apply' };\n};\n\nexport const tryPatchDockerImages: PatchFunction = async (config) => {\n try {\n return await patchDockerImages(config);\n } catch (err) {\n log.warn('Failed to patch Docker images');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";AAAA,SAAS,eAAe;AAExB,OAAO,QAAQ;AACf,OAAO,QAAQ;AAEf,SAAS,WAAW;AAGpB,MAAM,qBAAqB;AAC3B,MAAM,8BAA8B;AACpC,MAAM,6BAA6B;AACnC,MAAM,aAAa;AAEnB,MAAM,aAAa,OAAO,UACxB,QAAQ;AAAA,EACN,MAAM,IAAI,OAAO,SAAS;AACxB,UAAM,WAAW,MAAM,GAAG,SAAS,MAAM,MAAM;AAE/C,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEF,MAAM,6BAA6B,CAAC,aAAqB;AACvD,QAAM,UAAU,CAAC,GAAG,SAAS,SAAS,2BAA2B,CAAC;AAElE,MAAI,CAAC,QAAQ,QAAQ;AACnB,WAAO;AAAA,EACT;AAEA,QAAM,kBAAkB;AAAA,IACtB,GAAG,IAAI,IAAI,QAAQ,IAAI,CAAC,CAAC,EAAE,EAAE,QAAQ,MAAM,QAAkB,CAAC;AAAA,EAChE;AAGA,MAAI,gBAAgB,SAAS,GAAG;AAC9B,WAAO;AAAA,EACT;AAGA,MAAI,gBAAgB,CAAC,GAAG,WAAW,cAAc,GAAG;AAClD,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAEA,MAAM,oBAAmC,OAAO;AAAA,EAC9C;AACF,MAAgC;AAC9B,QAAM,CAAC,uBAAuB,uBAAuB,IAAI,MAAM,QAAQ,IAAI;AAAA,IACzE,GAAG,CAAC,aAAa,CAAC;AAAA,IAClB,GAAG,CAAC,sBAAsB,CAAC;AAAA,EAC7B,CAAC;AAED,MAAI,CAAC,sBAAsB,UAAU,CAAC,wBAAwB,QAAQ;AACpE,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,CAAC,aAAa,kBAAkB,IAAI,MAAM,QAAQ,IAAI;AAAA,IAC1D,WAAW,qBAAqB;AAAA,IAChC,WAAW,uBAAuB;AAAA,EACpC,CAAC;AAED,QAAM,qBAAqB,YAAY;AAAA,IACrC,CAAC,EAAE,SAAS,MACV,mBAAmB,KAAK,QAAQ,KAAK,2BAA2B,QAAQ;AAAA,EAC5E;AAEA,QAAM,4BAA4B,mBAAmB;AAAA,IAAO,CAAC,EAAE,SAAS,MACtE,2BAA2B,KAAK,QAAQ;AAAA,EAC1C;AAEA,MAAI,CAAC,mBAAmB,UAAU,CAAC,0BAA0B,QAAQ;AACnE,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,MAAI,SAAS,QAAQ;AACnB,WAAO;AAAA,MACL,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,oBAAoB,mBAAmB;AAAA,IAC3C,OAAO,EAAE,MAAM,SAAS,MAAM;AAC5B,UAAI,kBAAkB,SAAS;AAAA,QAC7B;AAAA,QACA,OAAO,UAAU;AAAA,MACnB;AAEA,UAAI,2BAA2B,QAAQ,GAAG;AACxC,0BAAkB,gBAAgB;AAAA,UAChC;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAEA,YAAM,GAAG,UAAU,MAAM,eAAe;AAAA,IAC1C;AAAA,EACF;AAEA,QAAM,2BAA2B,0BAA0B;AAAA,IACzD,OAAO,EAAE,MAAM,SAAS,MAAM;AAC5B,YAAM,kBAAkB,SAAS;AAAA,QAC/B;AAAA,QACA,KAAK,UAAU;AAAA,MACjB;AACA,YAAM,GAAG,UAAU,MAAM,eAAe;AAAA,IAC1C;AAAA,EACF;AAEA,QAAM,QAAQ,IAAI,CAAC,GAAG,mBAAmB,GAAG,wBAAwB,CAAC;AAErE,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,aAAM,uBAAsC,OAAO,WAAW;AACnE,MAAI;AACF,WAAO,MAAM,kBAAkB,MAAM;AAAA,EACvC,SAAS,KAAK;AACZ,QAAI,KAAK,+BAA+B;AACxC,QAAI,OAAO,QAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,35 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
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 __exports = {};
|
|
20
|
-
__export(__exports, {
|
|
21
|
-
patches: () => patches
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(__exports);
|
|
24
|
-
var import_patchPnpmDockerImages = require("./patchPnpmDockerImages.js");
|
|
25
|
-
const patches = [
|
|
2
|
+
import { tryPatchPnpmDockerImages } from "./patchPnpmDockerImages.js";
|
|
3
|
+
export const patches = [
|
|
26
4
|
{
|
|
27
|
-
apply:
|
|
5
|
+
apply: tryPatchPnpmDockerImages,
|
|
28
6
|
description: "Use pinned pnpm version in Dockerfiles"
|
|
29
7
|
}
|
|
30
8
|
];
|
|
31
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
patches
|
|
34
|
-
});
|
|
35
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/9.0.1/index.ts"],
|
|
4
4
|
"sourcesContent": ["import type { Patches } from '../../index.js';\n\nimport { tryPatchPnpmDockerImages } from './patchPnpmDockerImages.js';\n\nexport const patches: Patches = [\n {\n apply: tryPatchPnpmDockerImages,\n description: 'Use pinned pnpm version in Dockerfiles',\n },\n];\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAEA,SAAS,gCAAgC;AAElC,aAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,46 +1,14 @@
|
|
|
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 patchPnpmDockerImages_exports = {};
|
|
30
|
-
__export(patchPnpmDockerImages_exports, {
|
|
31
|
-
tryPatchPnpmDockerImages: () => tryPatchPnpmDockerImages
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(patchPnpmDockerImages_exports);
|
|
34
|
-
var import_util = require("util");
|
|
35
|
-
var import_fast_glob = __toESM(require("fast-glob"));
|
|
36
|
-
var import_fs_extra = __toESM(require("fs-extra"));
|
|
37
|
-
var import_logging = require("../../../../../../utils/logging.js");
|
|
2
|
+
import { inspect } from "util";
|
|
3
|
+
import fg from "fast-glob";
|
|
4
|
+
import fs from "fs-extra";
|
|
5
|
+
import { log } from "../../../../../../utils/logging.js";
|
|
38
6
|
const DOCKER_IMAGE_CONFIG_REGEX = /^(RUN --mount=type=bind,source=package.json,target=package.json \\\n(\s+)corepack enable pnpm && corepack install(?:.|\n)+?RUN )(pnpm config set store-dir \/root\/.pnpm-store)/gm;
|
|
39
7
|
const DOCKER_IMAGE_FETCH_REGEX = /^(RUN --mount=type=bind,source=.npmrc,target=.npmrc \\\n)((?:(?!--mount=type=bind,source=package\.json,target=package\.json)[\s\S])+?\n(\s+)pnpm (fetch|install))/gm;
|
|
40
8
|
const PACKAGE_JSON_MOUNT = "--mount=type=bind,source=package.json,target=package.json \\\n";
|
|
41
9
|
const fetchFiles = async (files) => Promise.all(
|
|
42
10
|
files.map(async (file) => {
|
|
43
|
-
const contents = await
|
|
11
|
+
const contents = await fs.readFile(file, "utf8");
|
|
44
12
|
return {
|
|
45
13
|
file,
|
|
46
14
|
contents
|
|
@@ -50,7 +18,7 @@ const fetchFiles = async (files) => Promise.all(
|
|
|
50
18
|
const patchPnpmDockerImages = async ({
|
|
51
19
|
mode
|
|
52
20
|
}) => {
|
|
53
|
-
const maybeDockerFilesPaths = await (
|
|
21
|
+
const maybeDockerFilesPaths = await fg(["Dockerfile*"]);
|
|
54
22
|
if (!maybeDockerFilesPaths.length) {
|
|
55
23
|
return {
|
|
56
24
|
result: "skip",
|
|
@@ -81,22 +49,18 @@ const patchPnpmDockerImages = async ({
|
|
|
81
49
|
DOCKER_IMAGE_FETCH_REGEX,
|
|
82
50
|
(_, npmrcLine, rest, whitespace) => `${npmrcLine}${whitespace}${PACKAGE_JSON_MOUNT}${rest}`
|
|
83
51
|
);
|
|
84
|
-
await
|
|
52
|
+
await fs.writeFile(file, patchedContents);
|
|
85
53
|
})
|
|
86
54
|
);
|
|
87
55
|
return { result: "apply" };
|
|
88
56
|
};
|
|
89
|
-
const tryPatchPnpmDockerImages = async (config) => {
|
|
57
|
+
export const tryPatchPnpmDockerImages = async (config) => {
|
|
90
58
|
try {
|
|
91
59
|
return await patchPnpmDockerImages(config);
|
|
92
60
|
} catch (err) {
|
|
93
|
-
|
|
94
|
-
|
|
61
|
+
log.warn("Failed to patch Docker images");
|
|
62
|
+
log.subtle(inspect(err));
|
|
95
63
|
return { result: "skip", reason: "due to an error" };
|
|
96
64
|
}
|
|
97
65
|
};
|
|
98
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
-
0 && (module.exports = {
|
|
100
|
-
tryPatchPnpmDockerImages
|
|
101
|
-
});
|
|
102
66
|
//# sourceMappingURL=patchPnpmDockerImages.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.ts"],
|
|
4
4
|
"sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst DOCKER_IMAGE_CONFIG_REGEX =\n /^(RUN --mount=type=bind,source=package.json,target=package.json \\\\\\n(\\s+)corepack enable pnpm && corepack install(?:.|\\n)+?RUN )(pnpm config set store-dir \\/root\\/.pnpm-store)/gm;\nconst DOCKER_IMAGE_FETCH_REGEX =\n /^(RUN --mount=type=bind,source=.npmrc,target=.npmrc \\\\\\n)((?:(?!--mount=type=bind,source=package\\.json,target=package\\.json)[\\s\\S])+?\\n(\\s+)pnpm (fetch|install))/gm;\n\nconst PACKAGE_JSON_MOUNT =\n '--mount=type=bind,source=package.json,target=package.json \\\\\\n';\n\nconst fetchFiles = async (files: string[]) =>\n Promise.all(\n files.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n );\n\nconst patchPnpmDockerImages: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n const maybeDockerFilesPaths = await fg(['Dockerfile*']);\n\n if (!maybeDockerFilesPaths.length) {\n return {\n result: 'skip',\n reason: 'no Dockerfiles found',\n };\n }\n\n const dockerFiles = await fetchFiles(maybeDockerFilesPaths);\n\n const dockerFilesToPatch = dockerFiles.filter(\n ({ contents }) =>\n DOCKER_IMAGE_CONFIG_REGEX.exec(contents) ??\n DOCKER_IMAGE_FETCH_REGEX.exec(contents),\n );\n\n if (!dockerFilesToPatch.length) {\n return {\n result: 'skip',\n reason: 'no Dockerfiles to patch',\n };\n }\n\n if (mode === 'lint') {\n return {\n result: 'apply',\n };\n }\n\n await Promise.all(\n dockerFilesToPatch.map(async ({ file, contents }) => {\n const patchedContents = contents\n .replace(\n DOCKER_IMAGE_CONFIG_REGEX,\n (_, earlyCommands, whitespace, pnpmSetConfigLine) =>\n `${earlyCommands}${PACKAGE_JSON_MOUNT}${whitespace}${pnpmSetConfigLine}`,\n )\n .replace(\n DOCKER_IMAGE_FETCH_REGEX,\n (_, npmrcLine, rest, whitespace) =>\n `${npmrcLine}${whitespace}${PACKAGE_JSON_MOUNT}${rest}`,\n );\n\n await fs.writeFile(file, patchedContents);\n }),\n );\n\n return { result: 'apply' };\n};\n\nexport const tryPatchPnpmDockerImages: PatchFunction = async (config) => {\n try {\n return await patchPnpmDockerImages(config);\n } catch (err) {\n log.warn('Failed to patch Docker images');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";AAAA,SAAS,eAAe;AAExB,OAAO,QAAQ;AACf,OAAO,QAAQ;AAEf,SAAS,WAAW;AAGpB,MAAM,4BACJ;AACF,MAAM,2BACJ;AAEF,MAAM,qBACJ;AAEF,MAAM,aAAa,OAAO,UACxB,QAAQ;AAAA,EACN,MAAM,IAAI,OAAO,SAAS;AACxB,UAAM,WAAW,MAAM,GAAG,SAAS,MAAM,MAAM;AAE/C,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEF,MAAM,wBAAuC,OAAO;AAAA,EAClD;AACF,MAAgC;AAC9B,QAAM,wBAAwB,MAAM,GAAG,CAAC,aAAa,CAAC;AAEtD,MAAI,CAAC,sBAAsB,QAAQ;AACjC,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,cAAc,MAAM,WAAW,qBAAqB;AAE1D,QAAM,qBAAqB,YAAY;AAAA,IACrC,CAAC,EAAE,SAAS,MACV,0BAA0B,KAAK,QAAQ,KACvC,yBAAyB,KAAK,QAAQ;AAAA,EAC1C;AAEA,MAAI,CAAC,mBAAmB,QAAQ;AAC9B,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,MAAI,SAAS,QAAQ;AACnB,WAAO;AAAA,MACL,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,QAAQ;AAAA,IACZ,mBAAmB,IAAI,OAAO,EAAE,MAAM,SAAS,MAAM;AACnD,YAAM,kBAAkB,SACrB;AAAA,QACC;AAAA,QACA,CAAC,GAAG,eAAe,YAAY,sBAC7B,GAAG,aAAa,GAAG,kBAAkB,GAAG,UAAU,GAAG,iBAAiB;AAAA,MAC1E,EACC;AAAA,QACC;AAAA,QACA,CAAC,GAAG,WAAW,MAAM,eACnB,GAAG,SAAS,GAAG,UAAU,GAAG,kBAAkB,GAAG,IAAI;AAAA,MACzD;AAEF,YAAM,GAAG,UAAU,MAAM,eAAe;AAAA,IAC1C,CAAC;AAAA,EACH;AAEA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,aAAM,2BAA0C,OAAO,WAAW;AACvE,MAAI;AACF,WAAO,MAAM,sBAAsB,MAAM;AAAA,EAC3C,SAAS,KAAK;AACZ,QAAI,KAAK,+BAA+B;AACxC,QAAI,OAAO,QAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,35 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
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 __exports = {};
|
|
20
|
-
__export(__exports, {
|
|
21
|
-
patches: () => patches
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(__exports);
|
|
24
|
-
var import_upgradeNode = require("./upgradeNode.js");
|
|
25
|
-
const patches = [
|
|
2
|
+
import { tryUpgradeNode } from "./upgradeNode.js";
|
|
3
|
+
export const patches = [
|
|
26
4
|
{
|
|
27
|
-
apply:
|
|
5
|
+
apply: tryUpgradeNode,
|
|
28
6
|
description: "Upgrade Node.js to version 22"
|
|
29
7
|
}
|
|
30
8
|
];
|
|
31
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
patches
|
|
34
|
-
});
|
|
35
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/9.1.0/index.ts"],
|
|
4
4
|
"sourcesContent": ["import type { Patches } from '../../index.js';\n\nimport { tryUpgradeNode } from './upgradeNode.js';\n\nexport const patches: Patches = [\n {\n apply: tryUpgradeNode,\n description: 'Upgrade Node.js to version 22',\n },\n];\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAEA,SAAS,sBAAsB;AAExB,aAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|