skuba 14.0.0-replace-global-vars-20251121010036 → 14.0.0-rfc-pnpm-config-skuba-20260106120954
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/eslint.js +1 -1
- package/config/jest.js +1 -0
- package/config/prettier.d.ts +4 -8
- package/config/prettier.js +2 -10
- package/jest/moduleNameMapper.js +64 -0
- package/jest/transform.js +62 -0
- package/jest/tsConfig.js +26 -0
- package/jest-preset.js +37 -0
- package/lib/api/jest/index.d.ts +15 -0
- package/lib/api/jest/index.js +59 -0
- package/lib/api/jest/index.js.map +7 -0
- package/lib/cli/adapter/eslint.js +45 -11
- package/lib/cli/adapter/eslint.js.map +2 -2
- package/lib/cli/adapter/prettier.js +67 -39
- package/lib/cli/adapter/prettier.js.map +2 -2
- package/lib/cli/build/args.js +42 -8
- package/lib/cli/build/args.js.map +2 -2
- package/lib/cli/build/assets.js +60 -28
- package/lib/cli/build/assets.js.map +2 -2
- package/lib/cli/build/esbuild.js +45 -21
- package/lib/cli/build/esbuild.js.map +2 -2
- package/lib/cli/build/index.js +45 -21
- package/lib/cli/build/index.js.map +1 -1
- package/lib/cli/build/tsc.js +59 -22
- package/lib/cli/build/tsc.js.map +2 -2
- package/lib/cli/buildPackage/index.js +32 -8
- package/lib/cli/buildPackage/index.js.map +1 -1
- package/lib/cli/configure/analyseConfiguration.js +50 -16
- package/lib/cli/configure/analyseConfiguration.js.map +2 -2
- package/lib/cli/configure/analyseDependencies.d.ts +1 -1
- package/lib/cli/configure/analyseDependencies.js +59 -25
- package/lib/cli/configure/analyseDependencies.js.map +3 -3
- package/lib/cli/configure/analysis/diff.js +29 -5
- package/lib/cli/configure/analysis/diff.js.map +1 -1
- package/lib/cli/configure/analysis/files.js +42 -8
- package/lib/cli/configure/analysis/files.js.map +2 -2
- package/lib/cli/configure/analysis/git.js +46 -12
- package/lib/cli/configure/analysis/git.js.map +2 -2
- package/lib/cli/configure/analysis/package.d.ts +3 -2
- package/lib/cli/configure/analysis/package.js +45 -10
- package/lib/cli/configure/analysis/package.js.map +3 -3
- package/lib/cli/configure/analysis/project.js +50 -18
- package/lib/cli/configure/analysis/project.js.map +2 -2
- package/lib/cli/configure/dependencies/index.js +35 -7
- package/lib/cli/configure/dependencies/index.js.map +1 -1
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +28 -4
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +1 -1
- package/lib/cli/configure/dependencies/seekKoala.js +28 -4
- package/lib/cli/configure/dependencies/seekKoala.js.map +1 -1
- package/lib/cli/configure/dependencies/skuba.js +28 -4
- package/lib/cli/configure/dependencies/skuba.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDeps.js +26 -2
- package/lib/cli/configure/dependencies/skubaDeps.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDive.js +29 -4
- package/lib/cli/configure/dependencies/skubaDive.js.map +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.d.ts +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.js +61 -33
- package/lib/cli/configure/ensureTemplateCompletion.js.map +3 -3
- package/lib/cli/configure/getEntryPoint.d.ts +1 -1
- package/lib/cli/configure/getEntryPoint.js +48 -14
- package/lib/cli/configure/getEntryPoint.js.map +3 -3
- package/lib/cli/configure/getProjectType.d.ts +1 -1
- package/lib/cli/configure/getProjectType.js +35 -14
- package/lib/cli/configure/getProjectType.js.map +2 -2
- package/lib/cli/configure/index.js +84 -50
- package/lib/cli/configure/index.js.map +2 -2
- package/lib/cli/configure/modules/eslint.js +34 -10
- package/lib/cli/configure/modules/eslint.js.map +1 -1
- package/lib/cli/configure/modules/ignore.js +32 -8
- package/lib/cli/configure/modules/ignore.js.map +1 -1
- package/lib/cli/configure/modules/index.js +44 -18
- package/lib/cli/configure/modules/index.js.map +2 -2
- package/lib/cli/configure/modules/jest.d.ts +2 -0
- package/lib/cli/configure/modules/jest.js +86 -0
- package/lib/cli/configure/modules/jest.js.map +7 -0
- package/lib/cli/configure/modules/nodemon.js +28 -4
- package/lib/cli/configure/modules/nodemon.js.map +1 -1
- package/lib/cli/configure/modules/package.js +34 -10
- package/lib/cli/configure/modules/package.js.map +1 -1
- package/lib/cli/configure/modules/prettier.js +35 -11
- package/lib/cli/configure/modules/prettier.js.map +1 -1
- package/lib/cli/configure/modules/renovate.js +40 -17
- package/lib/cli/configure/modules/renovate.js.map +2 -2
- package/lib/cli/configure/modules/serverless.js +26 -2
- package/lib/cli/configure/modules/serverless.js.map +1 -1
- package/lib/cli/configure/modules/tslint.js +28 -4
- package/lib/cli/configure/modules/tslint.js.map +1 -1
- package/lib/cli/configure/processing/configFile.d.ts +1 -1
- package/lib/cli/configure/processing/configFile.js +34 -43
- package/lib/cli/configure/processing/configFile.js.map +2 -2
- package/lib/cli/configure/processing/deleteFiles.js +26 -2
- package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
- package/lib/cli/configure/processing/javascript.js +27 -2
- package/lib/cli/configure/processing/javascript.js.map +1 -1
- package/lib/cli/configure/processing/json.js +31 -6
- package/lib/cli/configure/processing/json.js.map +1 -1
- package/lib/cli/configure/processing/loadFiles.js +26 -2
- package/lib/cli/configure/processing/loadFiles.js.map +1 -1
- package/lib/cli/configure/processing/module.js +28 -4
- package/lib/cli/configure/processing/module.js.map +1 -1
- package/lib/cli/configure/processing/package.d.ts +67 -1
- package/lib/cli/configure/processing/package.js +45 -8
- package/lib/cli/configure/processing/package.js.map +3 -3
- package/lib/cli/configure/processing/prettier.js +38 -4
- package/lib/cli/configure/processing/prettier.js.map +2 -2
- package/lib/cli/configure/processing/record.js +41 -5
- package/lib/cli/configure/processing/record.js.map +2 -2
- package/lib/cli/configure/processing/typescript.js +63 -26
- package/lib/cli/configure/processing/typescript.js.map +2 -2
- package/lib/cli/configure/types.d.ts +4 -15
- package/lib/cli/configure/types.js +16 -0
- package/lib/cli/configure/types.js.map +3 -3
- package/lib/cli/format/index.js +44 -20
- package/lib/cli/format/index.js.map +1 -1
- package/lib/cli/help/index.js +30 -6
- package/lib/cli/help/index.js.map +1 -1
- package/lib/cli/init/getConfig.d.ts +1 -1
- package/lib/cli/init/getConfig.js +100 -74
- package/lib/cli/init/getConfig.js.map +3 -3
- package/lib/cli/init/git.js +51 -16
- package/lib/cli/init/git.js.map +2 -2
- package/lib/cli/init/index.js +117 -68
- package/lib/cli/init/index.js.map +3 -3
- package/lib/cli/init/prompts.d.ts +4 -4
- package/lib/cli/init/prompts.js +48 -27
- package/lib/cli/init/prompts.js.map +2 -2
- package/lib/cli/init/types.js +41 -7
- package/lib/cli/init/types.js.map +1 -1
- package/lib/cli/init/validation.js +30 -2
- package/lib/cli/init/validation.js.map +1 -1
- package/lib/cli/init/writePackageJson.js +42 -8
- package/lib/cli/init/writePackageJson.js.map +2 -2
- package/lib/cli/lint/annotate/buildkite/eslint.js +37 -3
- package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/index.js +45 -11
- package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/internal.js +37 -3
- package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/prettier.js +37 -3
- package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/tsc.js +37 -3
- package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
- package/lib/cli/lint/annotate/github/eslint.js +26 -2
- package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/github/index.js +45 -11
- package/lib/cli/lint/annotate/github/index.js.map +1 -1
- package/lib/cli/lint/annotate/github/internal.js +26 -2
- package/lib/cli/lint/annotate/github/internal.js.map +1 -1
- package/lib/cli/lint/annotate/github/prettier.js +26 -2
- package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/github/tsc.js +28 -4
- package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
- package/lib/cli/lint/annotate/index.js +30 -6
- package/lib/cli/lint/annotate/index.js.map +1 -1
- package/lib/cli/lint/autofix.js +73 -37
- package/lib/cli/lint/autofix.js.map +1 -1
- package/lib/cli/lint/eslint.js +51 -16
- package/lib/cli/lint/eslint.js.map +3 -3
- package/lib/cli/lint/external.js +51 -19
- package/lib/cli/lint/external.js.map +2 -2
- package/lib/cli/lint/index.js +49 -25
- package/lib/cli/lint/index.js.map +1 -1
- package/lib/cli/lint/internal.js +42 -18
- package/lib/cli/lint/internal.js.map +1 -1
- package/lib/cli/lint/internalLints/detectBadCodeowners.js +33 -8
- package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +45 -11
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +2 -2
- package/lib/cli/lint/internalLints/patchRenovateConfig.js +55 -21
- package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
- package/lib/cli/lint/internalLints/refreshConfigFiles.d.ts +1 -1
- package/lib/cli/lint/internalLints/refreshConfigFiles.js +65 -42
- package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +3 -3
- package/lib/cli/lint/internalLints/upgrade/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/index.js +53 -22
- package/lib/cli/lint/internalLints/upgrade/index.js.map +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +28 -4
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js +45 -11
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +30 -6
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +65 -34
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +46 -11
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js +28 -4
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js +59 -23
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js +28 -4
- package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js +46 -11
- package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js +30 -6
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +46 -11
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +46 -11
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js +28 -4
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +46 -11
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js +67 -29
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js +34 -10
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js +45 -11
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.d.ts +0 -4
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js +63 -18
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js.map +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js +50 -15
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js +45 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/migrateToPnpmConfig.d.ts +3 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/migrateToPnpmConfig.js +139 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/migrateToPnpmConfig.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.d.ts +3 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js +133 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js +55 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +51 -17
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +34 -10
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js +44 -10
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js +46 -12
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js +28 -4
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js +49 -15
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +45 -11
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +34 -10
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +45 -11
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +45 -11
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +47 -13
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +28 -4
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js +45 -11
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
- package/lib/cli/lint/prettier.js +50 -15
- package/lib/cli/lint/prettier.js.map +3 -3
- package/lib/cli/lint/tsc.js +28 -4
- package/lib/cli/lint/tsc.js.map +1 -1
- package/lib/cli/lint/types.js +16 -0
- package/lib/cli/lint/types.js.map +3 -3
- package/lib/cli/migrate/index.d.ts +5 -0
- package/lib/cli/migrate/index.js +79 -15
- package/lib/cli/migrate/index.js.map +2 -2
- package/lib/cli/migrate/nodeVersion/checks.d.ts +1 -14
- package/lib/cli/migrate/nodeVersion/checks.js +51 -120
- package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
- package/lib/cli/migrate/nodeVersion/index.d.ts +8 -2
- package/lib/cli/migrate/nodeVersion/index.js +239 -65
- package/lib/cli/migrate/nodeVersion/index.js.map +3 -3
- package/lib/cli/migrate/nodeVersion/upgrade.d.ts +8 -0
- package/lib/cli/migrate/nodeVersion/upgrade.js +179 -0
- package/lib/cli/migrate/nodeVersion/upgrade.js.map +7 -0
- package/lib/cli/node/index.js +57 -20
- package/lib/cli/node/index.js.map +3 -3
- package/lib/cli/release/index.js +28 -4
- package/lib/cli/release/index.js.map +1 -1
- package/lib/cli/start/index.js +50 -16
- package/lib/cli/start/index.js.map +3 -3
- package/lib/cli/test/index.js +44 -4
- package/lib/cli/test/index.js.map +2 -2
- package/lib/cli/test/reporters/github/annotations.d.ts +9 -0
- package/lib/cli/test/reporters/github/annotations.js +102 -0
- package/lib/cli/test/reporters/github/annotations.js.map +7 -0
- package/lib/cli/test/reporters/github/index.d.ts +5 -0
- package/lib/cli/test/reporters/github/index.js +74 -0
- package/lib/cli/test/reporters/github/index.js.map +7 -0
- package/lib/cli/version/index.js +30 -6
- package/lib/cli/version/index.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +46 -6
- package/lib/index.js.map +2 -2
- package/lib/skuba.js +45 -26
- package/lib/skuba.js.map +3 -3
- package/lib/utils/args.js +43 -6
- package/lib/utils/args.js.map +2 -2
- package/lib/utils/command.js +42 -4
- package/lib/utils/command.js.map +3 -3
- package/lib/utils/copy.js +57 -20
- package/lib/utils/copy.js.map +2 -2
- package/lib/utils/dir.js +72 -32
- package/lib/utils/dir.js.map +2 -2
- package/lib/utils/env.js +26 -2
- package/lib/utils/env.js.map +1 -1
- package/lib/utils/error.js +47 -10
- package/lib/utils/error.js.map +1 -1
- package/lib/utils/exec.js +61 -23
- package/lib/utils/exec.js.map +3 -3
- package/lib/utils/fs.js +40 -6
- package/lib/utils/fs.js.map +2 -2
- package/lib/utils/help.js +30 -6
- package/lib/utils/help.js.map +1 -1
- package/lib/utils/logging.js +38 -11
- package/lib/utils/logging.js.map +1 -1
- package/lib/utils/logo.js +48 -24
- package/lib/utils/logo.js.map +1 -1
- package/lib/utils/manifest.d.ts +2 -3
- package/lib/utils/manifest.js +48 -8
- package/lib/utils/manifest.js.map +3 -3
- package/lib/utils/npmrc.js +26 -2
- package/lib/utils/npmrc.js.map +1 -1
- package/lib/utils/packageManager.js +49 -12
- package/lib/utils/packageManager.js.map +2 -2
- package/lib/utils/port.js +39 -4
- package/lib/utils/port.js.map +2 -2
- package/lib/utils/sleep.js +26 -2
- package/lib/utils/sleep.js.map +1 -1
- package/lib/utils/template.js +55 -18
- package/lib/utils/template.js.map +3 -3
- package/lib/utils/validation.js +31 -2
- package/lib/utils/validation.js.map +1 -1
- package/lib/utils/version.js +46 -9
- package/lib/utils/version.js.map +2 -2
- package/lib/utils/wait.js +32 -7
- package/lib/utils/wait.js.map +1 -1
- package/lib/utils/worker.js +35 -10
- package/lib/utils/worker.js.map +1 -1
- package/lib/wrapper/function-arguments.d.js +1 -0
- package/lib/wrapper/functionHandler.js +49 -18
- package/lib/wrapper/functionHandler.js.map +2 -2
- package/lib/wrapper/http.js +43 -8
- package/lib/wrapper/http.js.map +2 -2
- package/lib/wrapper/index.js +7 -6
- package/lib/wrapper/index.js.map +1 -1
- package/lib/wrapper/main.js +42 -8
- package/lib/wrapper/main.js.map +3 -3
- package/lib/wrapper/requestListener.js +47 -13
- package/lib/wrapper/requestListener.js.map +2 -2
- package/lib/wrapper/server.js +28 -4
- package/lib/wrapper/server.js.map +1 -1
- package/package.json +45 -45
- package/template/base/_.prettierrc.js +1 -1
- package/template/base/_eslint.config.js +1 -1
- package/template/base/_pnpm-workspace.yaml +0 -23
- package/template/base/jest.config.ts +19 -0
- package/template/base/jest.setup.ts +3 -0
- package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/express-rest-api/.nvmrc +1 -1
- package/template/express-rest-api/package.json +8 -9
- package/template/express-rest-api/skuba.template.js +1 -1
- package/template/express-rest-api/src/app.test.ts +0 -1
- package/template/greeter/.buildkite/pipeline.yml +1 -1
- package/template/greeter/.nvmrc +1 -1
- package/template/greeter/package.json +4 -5
- package/template/greeter/skuba.template.js +1 -1
- package/template/greeter/src/app.test.ts +1 -3
- package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/koa-rest-api/.nvmrc +1 -1
- package/template/koa-rest-api/package.json +9 -11
- package/template/koa-rest-api/skuba.template.js +1 -1
- package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +0 -2
- package/template/koa-rest-api/src/api/jobs/postJob.test.ts +0 -2
- package/template/koa-rest-api/src/app.test.ts +0 -2
- package/template/koa-rest-api/src/framework/server.test.ts +2 -2
- package/template/koa-rest-api/src/framework/validation.test.ts +0 -2
- package/template/koa-rest-api/src/testing/metrics.ts +0 -2
- package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
- package/template/lambda-sqs-worker-cdk/.nvmrc +1 -1
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +7 -19
- package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +9 -11
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +3 -3
- package/template/lambda-sqs-worker-cdk/infra/config.ts +2 -4
- package/template/lambda-sqs-worker-cdk/package.json +9 -9
- package/template/lambda-sqs-worker-cdk/skuba.template.js +13 -1
- package/template/lambda-sqs-worker-cdk/src/app.test.ts +13 -22
- package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +0 -1
- package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +31 -33
- package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +2 -8
- package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +2 -3
- package/template/lambda-sqs-worker-cdk/src/testing/services.ts +3 -4
- package/template/oss-npm-package/.github/workflows/release.yml +1 -1
- package/template/oss-npm-package/.github/workflows/validate.yml +1 -1
- package/template/oss-npm-package/.nvmrc +1 -1
- package/template/oss-npm-package/_package.json +1 -2
- package/template/oss-npm-package/skuba.template.js +1 -1
- package/template/oss-npm-package/src/index.test.ts +0 -2
- package/template/private-npm-package/.nvmrc +1 -1
- package/template/private-npm-package/_package.json +2 -3
- package/template/private-npm-package/skuba.template.js +2 -2
- package/template/private-npm-package/src/index.test.ts +0 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.d.ts +0 -6
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.js +0 -86
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.js.map +0 -7
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js +0 -16
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js.map +0 -7
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.d.ts +0 -7
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js +0 -76
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js.map +0 -7
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.d.ts +0 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +0 -11
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +0 -7
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +0 -34
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +0 -7
- package/lib/eslint.d.js +0 -1
- package/lib/eslint.d.js.map +0 -7
- package/template/base/vitest.config.ts +0 -25
- /package/lib/cli/lint/internalLints/upgrade/patches/{12.5.0 → 13.1.1}/index.d.ts +0 -0
- /package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/upgradeNode.d.ts +0 -0
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.ts"],
|
|
4
4
|
"sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\nimport { lt } from 'semver';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst DOCKERFILE_COREPACK_COMMAND = 'RUN corepack enable pnpm';\nconst PACKAGE_JSON_MOUNT = `RUN --mount=type=bind,source=package.json,target=package.json \\\\\n corepack enable pnpm && corepack install`;\nconst PACKAGE_JSON_CACHE = '- package.json#.packageManager';\n\nconst BEFORE_PIPELINE_REGEX =\n /(\\s*cache-on:\\s*\\n\\s*-\\s*\\.npmrc\\s*\\n)((\\s*)-\\s*pnpm-lock\\.yaml)/gm;\nconst ECR_REGEX = /seek-oss\\/docker-ecr-cache#v([\\d\\.]+)/gm;\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 patchPnpmPackageManager: PatchFunction = async ({\n mode,\n manifest,\n packageManager,\n}): Promise<PatchReturnType> => {\n if (packageManager.command !== 'pnpm') {\n return {\n result: 'skip',\n reason: 'not using pnpm',\n };\n }\n\n if (\n !(\n manifest.packageJson as { packageManager?: string }\n ).packageManager?.includes('pnpm')\n ) {\n return {\n result: 'skip',\n reason: 'no packageManager declaration in package.json found',\n };\n }\n\n const [maybeDockerfiles, maybePipelines] = await Promise.all([\n fg(['Dockerfile*']),\n fg(['.buildkite/*.yml']),\n ]);\n\n if (!maybeDockerfiles.length || !maybePipelines.length) {\n return {\n result: 'skip',\n reason: 'Either dockerfiles or pipelines were not found',\n };\n }\n\n const [dockerfiles, pipelines] = await Promise.all([\n fetchFiles(maybeDockerfiles),\n fetchFiles(maybePipelines),\n ]);\n\n const dockerFilesToPatch = dockerfiles.filter(\n ({ contents }) =>\n contents.includes(DOCKERFILE_COREPACK_COMMAND) &&\n !contents.includes('target=package.json'),\n );\n\n const pipelinesToPatch = pipelines.filter(({ contents }) =>\n Boolean(BEFORE_PIPELINE_REGEX.exec(contents)),\n );\n\n if (!dockerFilesToPatch.length && !pipelinesToPatch.length) {\n return {\n result: 'skip',\n reason: 'no pipeline or dockerfiles to patch',\n };\n }\n\n if (mode === 'lint') {\n return { result: 'apply' };\n }\n\n if (dockerFilesToPatch.length) {\n await Promise.all(\n dockerFilesToPatch.map(async ({ file, contents }) => {\n const patchedContent = contents.replace(\n DOCKERFILE_COREPACK_COMMAND,\n PACKAGE_JSON_MOUNT,\n );\n await fs.writeFile(file, patchedContent);\n }),\n );\n }\n\n if (pipelinesToPatch.length) {\n await Promise.all(\n pipelinesToPatch.map(async ({ file, contents }) => {\n const patchedContent = contents.replace(\n BEFORE_PIPELINE_REGEX,\n `$1$3${PACKAGE_JSON_CACHE}\\n$2`,\n );\n\n const patchedEcrContent = patchedContent.replace(\n ECR_REGEX,\n (match, version) => {\n if (typeof version === 'string' && lt(version, '2.2.0')) {\n return 'seek-oss/docker-ecr-cache#v2.2.0';\n }\n return match;\n },\n );\n\n await fs.writeFile(file, patchedEcrContent);\n }),\n );\n }\n\n return { result: 'apply' };\n};\n\nexport const tryPatchPnpmPackageManager: PatchFunction = async (config) => {\n try {\n return await patchPnpmPackageManager(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": "AAAA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["fs", "fg"]
|
|
7
7
|
}
|
|
@@ -1,11 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var collapseDuplicateMergeKeys_exports = {};
|
|
30
|
+
__export(collapseDuplicateMergeKeys_exports, {
|
|
31
|
+
tryCollapseDuplicateMergeKeys: () => tryCollapseDuplicateMergeKeys
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(collapseDuplicateMergeKeys_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");
|
|
5
38
|
const collapseDuplicateMergeKeys = async ({
|
|
6
39
|
mode
|
|
7
40
|
}) => {
|
|
8
|
-
const buildkiteFiles = await glob(
|
|
41
|
+
const buildkiteFiles = await (0, import_fast_glob.glob)(
|
|
9
42
|
["{apps/*/,packages/*/,./}.buildkite/**/*.y*ml"],
|
|
10
43
|
{ onlyFiles: true }
|
|
11
44
|
);
|
|
@@ -13,7 +46,7 @@ const collapseDuplicateMergeKeys = async ({
|
|
|
13
46
|
return { result: "skip", reason: "no Buildkite files found" };
|
|
14
47
|
}
|
|
15
48
|
const input = await Promise.all(
|
|
16
|
-
buildkiteFiles.map((name) =>
|
|
49
|
+
buildkiteFiles.map((name) => import_fs_extra.default.promises.readFile(name, "utf-8"))
|
|
17
50
|
);
|
|
18
51
|
const replaced = input.map(collapseDuplicateMergeKeysInFile);
|
|
19
52
|
if (replaced.every((r, i) => r === input[i])) {
|
|
@@ -26,7 +59,7 @@ const collapseDuplicateMergeKeys = async ({
|
|
|
26
59
|
buildkiteFiles.flatMap(
|
|
27
60
|
(name, i) => replaced[i] !== input[i] ? (
|
|
28
61
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
29
|
-
[
|
|
62
|
+
[import_fs_extra.default.promises.writeFile(name, replaced[i])]
|
|
30
63
|
) : []
|
|
31
64
|
)
|
|
32
65
|
);
|
|
@@ -59,12 +92,13 @@ const tryCollapseDuplicateMergeKeys = async (config) => {
|
|
|
59
92
|
try {
|
|
60
93
|
return await collapseDuplicateMergeKeys(config);
|
|
61
94
|
} catch (err) {
|
|
62
|
-
log.warn("Failed to collapse duplicate merge keys.");
|
|
63
|
-
log.subtle(inspect(err));
|
|
95
|
+
import_logging.log.warn("Failed to collapse duplicate merge keys.");
|
|
96
|
+
import_logging.log.subtle((0, import_util.inspect)(err));
|
|
64
97
|
return { result: "skip", reason: "due to an error" };
|
|
65
98
|
}
|
|
66
99
|
};
|
|
67
|
-
export
|
|
100
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
101
|
+
0 && (module.exports = {
|
|
68
102
|
tryCollapseDuplicateMergeKeys
|
|
69
|
-
};
|
|
103
|
+
});
|
|
70
104
|
//# sourceMappingURL=collapseDuplicateMergeKeys.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.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 collapseDuplicateMergeKeys: 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(collapseDuplicateMergeKeysInFile);\n\n if (replaced.every((r, i) => r === input[i])) {\n return { result: 'skip', reason: 'no duplicate merge keys found' };\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 collapseDuplicateMergeKeysInFile = (input: string) =>\n replaceAllUntilStable(\n input,\n /^([ \\-]*)<<: \\[?(\\*[^\\n#\\]]+)\\]?(\\s*#.*)?$\\n^( *)<<: \\[?(\\*[^\\n#\\]]+)\\]?(\\s*#.*)?$/gm,\n (match, prefixA, keyA, commentA, prefixB, keyB, commentB) => {\n if (prefixA.length === prefixB.length) {\n return [\n ...(commentA\n ? [`${' '.repeat(prefixA.length)}${commentA.trim()}`]\n : []),\n ...(commentB\n ? [`${' '.repeat(prefixA.length)}${commentB.trim()}`]\n : []),\n `${prefixA}<<: [${keyA.trim()}, ${keyB.trim()}]`,\n ].join('\\n');\n }\n return match;\n },\n );\n\nconst replaceAllUntilStable = (\n input: string,\n searchValue: RegExp,\n replacer: (substring: string, ...args: string[]) => string,\n): string => {\n let output = input;\n let previousOutput;\n\n do {\n previousOutput = output;\n output = output.replace(searchValue, replacer);\n } while (output !== previousOutput);\n\n return output;\n};\n\nexport const tryCollapseDuplicateMergeKeys: PatchFunction = async (config) => {\n try {\n return await collapseDuplicateMergeKeys(config);\n } catch (err) {\n log.warn('Failed to collapse duplicate merge keys.');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
-
"mappings": "AAAA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAqB;AACrB,sBAAe;AAEf,qBAAoB;AAGpB,MAAM,6BAA4C,OAAO;AAAA,EACvD;AACF,MAAgC;AAC9B,QAAM,iBAAiB,UAAM;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,gBAAAA,QAAG,SAAS,SAAS,MAAM,OAAO,CAAC;AAAA,EAClE;AAEA,QAAM,WAAW,MAAM,IAAI,gCAAgC;AAE3D,MAAI,SAAS,MAAM,CAAC,GAAG,MAAM,MAAM,MAAM,CAAC,CAAC,GAAG;AAC5C,WAAO,EAAE,QAAQ,QAAQ,QAAQ,gCAAgC;AAAA,EACnE;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,gBAAAA,QAAG,SAAS,UAAU,MAAM,SAAS,CAAC,CAAE,CAAC;AAAA,UAC1C,CAAC;AAAA,IACP;AAAA,EACF;AAEA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEA,MAAM,mCAAmC,CAAC,UACxC;AAAA,EACE;AAAA,EACA;AAAA,EACA,CAAC,OAAO,SAAS,MAAM,UAAU,SAAS,MAAM,aAAa;AAC3D,QAAI,QAAQ,WAAW,QAAQ,QAAQ;AACrC,aAAO;AAAA,QACL,GAAI,WACA,CAAC,GAAG,IAAI,OAAO,QAAQ,MAAM,CAAC,GAAG,SAAS,KAAK,CAAC,EAAE,IAClD,CAAC;AAAA,QACL,GAAI,WACA,CAAC,GAAG,IAAI,OAAO,QAAQ,MAAM,CAAC,GAAG,SAAS,KAAK,CAAC,EAAE,IAClD,CAAC;AAAA,QACL,GAAG,OAAO,QAAQ,KAAK,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC;AAAA,MAC/C,EAAE,KAAK,IAAI;AAAA,IACb;AACA,WAAO;AAAA,EACT;AACF;AAEF,MAAM,wBAAwB,CAC5B,OACA,aACA,aACW;AACX,MAAI,SAAS;AACb,MAAI;AAEJ,KAAG;AACD,qBAAiB;AACjB,aAAS,OAAO,QAAQ,aAAa,QAAQ;AAAA,EAC/C,SAAS,WAAW;AAEpB,SAAO;AACT;AAEO,MAAM,gCAA+C,OAAO,WAAW;AAC5E,MAAI;AACF,WAAO,MAAM,2BAA2B,MAAM;AAAA,EAChD,SAAS,KAAK;AACZ,uBAAI,KAAK,0CAA0C;AACnD,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
|
+
"names": ["fs"]
|
|
7
7
|
}
|
|
@@ -1,26 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __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");
|
|
5
28
|
const patches = [
|
|
6
29
|
{
|
|
7
|
-
apply: tryCollapseDuplicateMergeKeys,
|
|
30
|
+
apply: import_collapseDuplicateMergeKeys.tryCollapseDuplicateMergeKeys,
|
|
8
31
|
description: "Collapse duplicate merge keys in .buildkite files"
|
|
9
32
|
},
|
|
10
33
|
{
|
|
11
|
-
apply: tryPatchDockerComposeFiles,
|
|
34
|
+
apply: import_patchDockerCompose.tryPatchDockerComposeFiles,
|
|
12
35
|
description: "Remove version field from docker-compose files"
|
|
13
36
|
},
|
|
14
37
|
{
|
|
15
|
-
apply: tryPatchDockerImages,
|
|
38
|
+
apply: import_patchDockerImages.tryPatchDockerImages,
|
|
16
39
|
description: "Update docker image references to use public.ecr.aws and remove --platform flag"
|
|
17
40
|
},
|
|
18
41
|
{
|
|
19
|
-
apply: tryMoveNpmrcMounts,
|
|
42
|
+
apply: import_moveNpmrcMounts.tryMoveNpmrcMounts,
|
|
20
43
|
description: "Move .npmrc mounts from tmp/.npmrc to /tmp/.npmrc"
|
|
21
44
|
}
|
|
22
45
|
];
|
|
23
|
-
export
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
24
48
|
patches
|
|
25
|
-
};
|
|
49
|
+
});
|
|
26
50
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/index.ts"],
|
|
4
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,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,wCAA8C;AAC9C,6BAAmC;AACnC,gCAA2C;AAC3C,+BAAqC;AAE9B,MAAM,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,11 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var 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");
|
|
5
38
|
const moveNpmrcMounts = async ({
|
|
6
39
|
mode
|
|
7
40
|
}) => {
|
|
8
|
-
const buildkiteFiles = await glob(
|
|
41
|
+
const buildkiteFiles = await (0, import_fast_glob.glob)(
|
|
9
42
|
["{apps/*/,packages/*/,./}.buildkite/**/*.y*ml"],
|
|
10
43
|
{ onlyFiles: true }
|
|
11
44
|
);
|
|
@@ -13,7 +46,7 @@ const moveNpmrcMounts = async ({
|
|
|
13
46
|
return { result: "skip", reason: "no Buildkite files found" };
|
|
14
47
|
}
|
|
15
48
|
const input = await Promise.all(
|
|
16
|
-
buildkiteFiles.map((name) =>
|
|
49
|
+
buildkiteFiles.map((name) => import_fs_extra.default.promises.readFile(name, "utf-8"))
|
|
17
50
|
);
|
|
18
51
|
const replaced = input.map(moveNpmrcMountsInFile);
|
|
19
52
|
if (replaced.every((r, i) => r === input[i])) {
|
|
@@ -29,7 +62,7 @@ const moveNpmrcMounts = async ({
|
|
|
29
62
|
buildkiteFiles.flatMap(
|
|
30
63
|
(name, i) => replaced[i] !== input[i] ? (
|
|
31
64
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
32
|
-
[
|
|
65
|
+
[import_fs_extra.default.promises.writeFile(name, replaced[i])]
|
|
33
66
|
) : []
|
|
34
67
|
)
|
|
35
68
|
);
|
|
@@ -47,12 +80,13 @@ const tryMoveNpmrcMounts = async (config) => {
|
|
|
47
80
|
try {
|
|
48
81
|
return await moveNpmrcMounts(config);
|
|
49
82
|
} catch (err) {
|
|
50
|
-
log.warn("Failed to move .npmrc mounts");
|
|
51
|
-
log.subtle(inspect(err));
|
|
83
|
+
import_logging.log.warn("Failed to move .npmrc mounts");
|
|
84
|
+
import_logging.log.subtle((0, import_util.inspect)(err));
|
|
52
85
|
return { result: "skip", reason: "due to an error" };
|
|
53
86
|
}
|
|
54
87
|
};
|
|
55
|
-
export
|
|
88
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
89
|
+
0 && (module.exports = {
|
|
56
90
|
tryMoveNpmrcMounts
|
|
57
|
-
};
|
|
91
|
+
});
|
|
58
92
|
//# 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": "AAAA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAqB;AACrB,sBAAe;AAEf,qBAAoB;AAGpB,MAAM,kBAAiC,OAAO;AAAA,EAC5C;AACF,MAAgC;AAC9B,QAAM,iBAAiB,UAAM;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,gBAAAA,QAAG,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,gBAAAA,QAAG,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,MAAM,qBAAoC,OAAO,WAAW;AACjE,MAAI;AACF,WAAO,MAAM,gBAAgB,MAAM;AAAA,EACrC,SAAS,KAAK;AACZ,uBAAI,KAAK,8BAA8B;AACvC,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
|
+
"names": ["fs"]
|
|
7
7
|
}
|
|
@@ -1,11 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var 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");
|
|
5
38
|
const DOCKER_COMPOSE_VERSION_REGEX = /^version: ['"]?\d+(\.\d+)*['"]?\n*/m;
|
|
6
39
|
const fetchFiles = async (files) => Promise.all(
|
|
7
40
|
files.map(async (file) => {
|
|
8
|
-
const contents = await
|
|
41
|
+
const contents = await import_fs_extra.default.readFile(file, "utf8");
|
|
9
42
|
return {
|
|
10
43
|
file,
|
|
11
44
|
contents
|
|
@@ -15,7 +48,7 @@ const fetchFiles = async (files) => Promise.all(
|
|
|
15
48
|
const patchDockerComposeFiles = async ({
|
|
16
49
|
mode
|
|
17
50
|
}) => {
|
|
18
|
-
const maybeDockerComposeFiles = await
|
|
51
|
+
const maybeDockerComposeFiles = await (0, import_fast_glob.default)(["docker-compose*.yml"]);
|
|
19
52
|
if (!maybeDockerComposeFiles.length) {
|
|
20
53
|
return {
|
|
21
54
|
result: "skip",
|
|
@@ -43,7 +76,7 @@ const patchDockerComposeFiles = async ({
|
|
|
43
76
|
DOCKER_COMPOSE_VERSION_REGEX,
|
|
44
77
|
""
|
|
45
78
|
);
|
|
46
|
-
await
|
|
79
|
+
await import_fs_extra.default.writeFile(file, patchedContents);
|
|
47
80
|
})
|
|
48
81
|
);
|
|
49
82
|
return { result: "apply" };
|
|
@@ -52,12 +85,13 @@ const tryPatchDockerComposeFiles = async (config) => {
|
|
|
52
85
|
try {
|
|
53
86
|
return await patchDockerComposeFiles(config);
|
|
54
87
|
} catch (err) {
|
|
55
|
-
log.warn("Failed to patch pnpm packageManager CI configuration.");
|
|
56
|
-
log.subtle(inspect(err));
|
|
88
|
+
import_logging.log.warn("Failed to patch pnpm packageManager CI configuration.");
|
|
89
|
+
import_logging.log.subtle((0, import_util.inspect)(err));
|
|
57
90
|
return { result: "skip", reason: "due to an error" };
|
|
58
91
|
}
|
|
59
92
|
};
|
|
60
|
-
export
|
|
93
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
94
|
+
0 && (module.exports = {
|
|
61
95
|
tryPatchDockerComposeFiles
|
|
62
|
-
};
|
|
96
|
+
});
|
|
63
97
|
//# 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": "AAAA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAe;AACf,sBAAe;AAEf,qBAAoB;AAGpB,MAAM,+BAA+B;AAErC,MAAM,aAAa,OAAO,UACxB,QAAQ;AAAA,EACN,MAAM,IAAI,OAAO,SAAS;AACxB,UAAM,WAAW,MAAM,gBAAAA,QAAG,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,UAAM,iBAAAC,SAAG,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,gBAAAD,QAAG,UAAU,MAAM,eAAe;AAAA,IAC1C,CAAC;AAAA,EACH;AAEA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,MAAM,6BAA4C,OAAO,WAAW;AACzE,MAAI;AACF,WAAO,MAAM,wBAAwB,MAAM;AAAA,EAC7C,SAAS,KAAK;AACZ,uBAAI,KAAK,uDAAuD;AAChE,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
|
+
"names": ["fs", "fg"]
|
|
7
7
|
}
|
|
@@ -1,14 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var 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");
|
|
5
38
|
const DOCKER_IMAGE_REGEX = /^(FROM\s?.*)(\s)(node|python)(:.*)/gm;
|
|
6
39
|
const DOCKER_IMAGE_PLATFORM_REGEX = /^(FROM\s?.*)(--platform=[^\s]+) /gm;
|
|
7
40
|
const DOCKER_COMPOSE_IMAGE_REGEX = /^(\s+image:\s)(node|python)(:.*)/gm;
|
|
8
41
|
const PUBLIC_ECR = "public.ecr.aws/docker/library/";
|
|
9
42
|
const fetchFiles = async (files) => Promise.all(
|
|
10
43
|
files.map(async (file) => {
|
|
11
|
-
const contents = await
|
|
44
|
+
const contents = await import_fs_extra.default.readFile(file, "utf8");
|
|
12
45
|
return {
|
|
13
46
|
file,
|
|
14
47
|
contents
|
|
@@ -35,8 +68,8 @@ const patchDockerImages = async ({
|
|
|
35
68
|
mode
|
|
36
69
|
}) => {
|
|
37
70
|
const [maybeDockerFilesPaths, maybeDockerComposePaths] = await Promise.all([
|
|
38
|
-
|
|
39
|
-
|
|
71
|
+
(0, import_fast_glob.default)(["Dockerfile*"]),
|
|
72
|
+
(0, import_fast_glob.default)(["docker-compose*.y*ml"])
|
|
40
73
|
]);
|
|
41
74
|
if (!maybeDockerFilesPaths.length && !maybeDockerComposePaths.length) {
|
|
42
75
|
return {
|
|
@@ -77,7 +110,7 @@ const patchDockerImages = async ({
|
|
|
77
110
|
"$1"
|
|
78
111
|
);
|
|
79
112
|
}
|
|
80
|
-
await
|
|
113
|
+
await import_fs_extra.default.writeFile(file, patchedContents);
|
|
81
114
|
}
|
|
82
115
|
);
|
|
83
116
|
const dockerComposeFilePatches = dockerComposeFilesToPatch.map(
|
|
@@ -86,7 +119,7 @@ const patchDockerImages = async ({
|
|
|
86
119
|
DOCKER_COMPOSE_IMAGE_REGEX,
|
|
87
120
|
`$1${PUBLIC_ECR}$2$3`
|
|
88
121
|
);
|
|
89
|
-
await
|
|
122
|
+
await import_fs_extra.default.writeFile(file, patchedContents);
|
|
90
123
|
}
|
|
91
124
|
);
|
|
92
125
|
await Promise.all([...dockerFilePatches, ...dockerComposeFilePatches]);
|
|
@@ -96,12 +129,13 @@ const tryPatchDockerImages = async (config) => {
|
|
|
96
129
|
try {
|
|
97
130
|
return await patchDockerImages(config);
|
|
98
131
|
} catch (err) {
|
|
99
|
-
log.warn("Failed to patch Docker images");
|
|
100
|
-
log.subtle(inspect(err));
|
|
132
|
+
import_logging.log.warn("Failed to patch Docker images");
|
|
133
|
+
import_logging.log.subtle((0, import_util.inspect)(err));
|
|
101
134
|
return { result: "skip", reason: "due to an error" };
|
|
102
135
|
}
|
|
103
136
|
};
|
|
104
|
-
export
|
|
137
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
138
|
+
0 && (module.exports = {
|
|
105
139
|
tryPatchDockerImages
|
|
106
|
-
};
|
|
140
|
+
});
|
|
107
141
|
//# 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": "AAAA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["fs", "fg"]
|
|
7
7
|
}
|
|
@@ -1,11 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __exports = {};
|
|
20
|
+
__export(__exports, {
|
|
21
|
+
patches: () => patches
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(__exports);
|
|
24
|
+
var import_patchPnpmDockerImages = require("./patchPnpmDockerImages.js");
|
|
2
25
|
const patches = [
|
|
3
26
|
{
|
|
4
|
-
apply: tryPatchPnpmDockerImages,
|
|
27
|
+
apply: import_patchPnpmDockerImages.tryPatchPnpmDockerImages,
|
|
5
28
|
description: "Use pinned pnpm version in Dockerfiles"
|
|
6
29
|
}
|
|
7
30
|
];
|
|
8
|
-
export
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
9
33
|
patches
|
|
10
|
-
};
|
|
34
|
+
});
|
|
11
35
|
//# 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": "AAEA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mCAAyC;AAElC,MAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|