skuba 14.0.0-replace-global-vars-20251121010036 → 14.0.0-test-private-templates-20260103062459
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.js +39 -3
- package/lib/cli/configure/processing/configFile.js.map +1 -1
- package/lib/cli/configure/processing/deleteFiles.js +26 -2
- package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
- package/lib/cli/configure/processing/javascript.js +27 -2
- package/lib/cli/configure/processing/javascript.js.map +1 -1
- package/lib/cli/configure/processing/json.js +31 -6
- package/lib/cli/configure/processing/json.js.map +1 -1
- package/lib/cli/configure/processing/loadFiles.js +26 -2
- package/lib/cli/configure/processing/loadFiles.js.map +1 -1
- package/lib/cli/configure/processing/module.js +28 -4
- package/lib/cli/configure/processing/module.js.map +1 -1
- package/lib/cli/configure/processing/package.d.ts +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 +111 -76
- package/lib/cli/init/getConfig.js.map +3 -3
- package/lib/cli/init/git.d.ts +1 -0
- package/lib/cli/init/git.js +88 -16
- package/lib/cli/init/git.js.map +3 -3
- package/lib/cli/init/index.js +98 -67
- package/lib/cli/init/index.js.map +2 -2
- package/lib/cli/init/prompts.d.ts +6 -5
- package/lib/cli/init/prompts.js +54 -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.js +63 -32
- package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +2 -2
- 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 +40 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.d.ts +3 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js +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.d.ts +1 -1
- package/lib/utils/template.js +60 -19
- 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 +42 -43
- package/template/base/_.prettierrc.js +1 -1
- package/template/base/_eslint.config.js +1 -1
- package/template/base/_pnpm-workspace.yaml +4 -3
- package/template/base/jest.config.ts +19 -0
- package/template/base/jest.setup.ts +3 -0
- package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/express-rest-api/.nvmrc +1 -1
- package/template/express-rest-api/package.json +8 -9
- package/template/express-rest-api/skuba.template.js +1 -1
- package/template/express-rest-api/src/app.test.ts +0 -1
- package/template/greeter/.buildkite/pipeline.yml +1 -1
- package/template/greeter/.nvmrc +1 -1
- package/template/greeter/package.json +4 -5
- package/template/greeter/skuba.template.js +1 -1
- package/template/greeter/src/app.test.ts +1 -3
- package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/koa-rest-api/.nvmrc +1 -1
- package/template/koa-rest-api/package.json +9 -11
- package/template/koa-rest-api/skuba.template.js +1 -1
- package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +0 -2
- package/template/koa-rest-api/src/api/jobs/postJob.test.ts +0 -2
- package/template/koa-rest-api/src/app.test.ts +0 -2
- package/template/koa-rest-api/src/framework/server.test.ts +2 -2
- package/template/koa-rest-api/src/framework/validation.test.ts +0 -2
- package/template/koa-rest-api/src/testing/metrics.ts +0 -2
- package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
- package/template/lambda-sqs-worker-cdk/.nvmrc +1 -1
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +7 -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 +0 -1
- package/template/oss-npm-package/skuba.template.js +1 -1
- package/template/oss-npm-package/src/index.test.ts +0 -2
- package/template/private-npm-package/.nvmrc +1 -1
- package/template/private-npm-package/_package.json +1 -2
- package/template/private-npm-package/skuba.template.js +2 -2
- package/template/private-npm-package/src/index.test.ts +0 -2
- package/lib/cli/lint/internalLints/upgrade/patches/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
package/lib/utils/exec.js
CHANGED
|
@@ -1,13 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 exec_exports = {};
|
|
30
|
+
__export(exec_exports, {
|
|
31
|
+
createExec: () => createExec,
|
|
32
|
+
ensureCommands: () => ensureCommands,
|
|
33
|
+
exec: () => exec,
|
|
34
|
+
execConcurrently: () => execConcurrently,
|
|
35
|
+
hasCommand: () => hasCommand
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(exec_exports);
|
|
38
|
+
var import_os = require("os");
|
|
39
|
+
var import_stream = __toESM(require("stream"));
|
|
40
|
+
var import_util = __toESM(require("util"));
|
|
41
|
+
var import_concurrently = __toESM(require("concurrently"));
|
|
42
|
+
var import_execa = __toESM(require("execa"));
|
|
43
|
+
var import_npm_run_path = __toESM(require("npm-run-path"));
|
|
44
|
+
var import_npm_which = __toESM(require("npm-which"));
|
|
45
|
+
var import_error = require("./error.js");
|
|
46
|
+
var import_logging = require("./logging.js");
|
|
47
|
+
class YarnSpamFilter extends import_stream.default.Transform {
|
|
11
48
|
silenced = false;
|
|
12
49
|
_transform(chunk, _encoding, callback) {
|
|
13
50
|
const str = Buffer.from(chunk).toString();
|
|
@@ -21,7 +58,7 @@ class YarnSpamFilter extends stream.Transform {
|
|
|
21
58
|
callback();
|
|
22
59
|
}
|
|
23
60
|
}
|
|
24
|
-
class YarnWarningFilter extends
|
|
61
|
+
class YarnWarningFilter extends import_stream.default.Transform {
|
|
25
62
|
_transform(chunk, _encoding, callback) {
|
|
26
63
|
const str = Buffer.from(chunk).toString();
|
|
27
64
|
if (!str.startsWith("warning skuba >")) {
|
|
@@ -31,11 +68,11 @@ class YarnWarningFilter extends stream.Transform {
|
|
|
31
68
|
}
|
|
32
69
|
}
|
|
33
70
|
const envWithPath = {
|
|
34
|
-
PATH:
|
|
71
|
+
PATH: (0, import_npm_run_path.default)({ cwd: __dirname })
|
|
35
72
|
};
|
|
36
73
|
const runCommand = (command, args, opts) => {
|
|
37
|
-
const subprocess =
|
|
38
|
-
localDir:
|
|
74
|
+
const subprocess = (0, import_execa.default)(command, args, {
|
|
75
|
+
localDir: __dirname,
|
|
39
76
|
preferLocal: true,
|
|
40
77
|
stdio: "inherit",
|
|
41
78
|
...opts
|
|
@@ -55,8 +92,8 @@ const runCommand = (command, args, opts) => {
|
|
|
55
92
|
}
|
|
56
93
|
return subprocess;
|
|
57
94
|
};
|
|
58
|
-
const whichCallback =
|
|
59
|
-
const which =
|
|
95
|
+
const whichCallback = (0, import_npm_which.default)(__dirname);
|
|
96
|
+
const which = import_util.default.promisify(whichCallback);
|
|
60
97
|
const createExec = (opts) => (command, ...args) => runCommand(command, args, opts);
|
|
61
98
|
const exec = (command, ...args) => runCommand(command, args);
|
|
62
99
|
const execConcurrently = async (commands, { maxProcesses, nameLength, outputStream } = {}) => {
|
|
@@ -65,7 +102,7 @@ const execConcurrently = async (commands, { maxProcesses, nameLength, outputStre
|
|
|
65
102
|
0
|
|
66
103
|
);
|
|
67
104
|
try {
|
|
68
|
-
await
|
|
105
|
+
await (0, import_concurrently.default)(
|
|
69
106
|
commands.map(({ command, name, prefixColor }) => ({
|
|
70
107
|
command,
|
|
71
108
|
env: envWithPath,
|
|
@@ -73,14 +110,14 @@ const execConcurrently = async (commands, { maxProcesses, nameLength, outputStre
|
|
|
73
110
|
prefixColor: Array.isArray(prefixColor) ? prefixColor[0] : prefixColor
|
|
74
111
|
})),
|
|
75
112
|
{
|
|
76
|
-
maxProcesses: maxProcesses ?? cpus().length,
|
|
113
|
+
maxProcesses: maxProcesses ?? (0, import_os.cpus)().length,
|
|
77
114
|
outputStream,
|
|
78
115
|
// Use a minimalist logging prefix.
|
|
79
116
|
prefix: "{name} \u2502"
|
|
80
117
|
}
|
|
81
118
|
).result;
|
|
82
119
|
} catch (err) {
|
|
83
|
-
const result = concurrentlyErrorsSchema.safeParse(err);
|
|
120
|
+
const result = import_error.concurrentlyErrorsSchema.safeParse(err);
|
|
84
121
|
if (!result.success) {
|
|
85
122
|
throw err;
|
|
86
123
|
}
|
|
@@ -97,7 +134,7 @@ const ensureCommands = async (...names) => {
|
|
|
97
134
|
const result = await hasCommand(name);
|
|
98
135
|
if (!result) {
|
|
99
136
|
success = false;
|
|
100
|
-
log.err(log.bold(name), "needs to be installed.");
|
|
137
|
+
import_logging.log.err(import_logging.log.bold(name), "needs to be installed.");
|
|
101
138
|
}
|
|
102
139
|
})
|
|
103
140
|
);
|
|
@@ -110,17 +147,18 @@ const hasCommand = async (name) => {
|
|
|
110
147
|
await which(name);
|
|
111
148
|
return true;
|
|
112
149
|
} catch (err) {
|
|
113
|
-
if (isErrorWithCode(err, "ENOENT")) {
|
|
150
|
+
if ((0, import_error.isErrorWithCode)(err, "ENOENT")) {
|
|
114
151
|
return false;
|
|
115
152
|
}
|
|
116
153
|
throw err;
|
|
117
154
|
}
|
|
118
155
|
};
|
|
119
|
-
export
|
|
156
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
157
|
+
0 && (module.exports = {
|
|
120
158
|
createExec,
|
|
121
159
|
ensureCommands,
|
|
122
160
|
exec,
|
|
123
161
|
execConcurrently,
|
|
124
162
|
hasCommand
|
|
125
|
-
};
|
|
163
|
+
});
|
|
126
164
|
//# sourceMappingURL=exec.js.map
|
package/lib/utils/exec.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/exec.ts"],
|
|
4
|
-
"sourcesContent": ["import type { styleText } from 'node:util';\nimport { cpus } from 'os';\nimport stream from 'stream';\nimport util from 'util';\n\nimport concurrently from 'concurrently';\nimport execa, { type ExecaChildProcess } from 'execa';\nimport npmRunPath from 'npm-run-path';\nimport npmWhich from 'npm-which';\n\nimport { concurrentlyErrorsSchema, isErrorWithCode } from './error.js';\nimport { log } from './logging.js';\nimport type { PackageManager } from './packageManager.js';\n\ntype StyleColor = Parameters<typeof styleText>[0];\n\nclass YarnSpamFilter extends stream.Transform {\n silenced = false;\n\n _transform(\n chunk: Uint8Array,\n _encoding: BufferEncoding,\n callback: stream.TransformCallback,\n ) {\n const str = Buffer.from(chunk).toString();\n\n // Yarn spews the entire installed dependency tree after this message\n if (str.startsWith('info Direct dependencies')) {\n this.silenced = true;\n }\n\n if (\n !this.silenced &&\n // This isn't very useful given the command generates a lockfile\n !str.startsWith('info No lockfile found')\n ) {\n this.push(chunk);\n }\n\n callback();\n }\n}\n\nclass YarnWarningFilter extends stream.Transform {\n _transform(\n chunk: Uint8Array,\n _encoding: BufferEncoding,\n callback: stream.TransformCallback,\n ) {\n const str = Buffer.from(chunk).toString();\n\n // Filter out annoying deprecation warnings that users can do little about\n if (!str.startsWith('warning skuba >')) {\n this.push(chunk);\n }\n\n callback();\n }\n}\n\nexport type Exec = (\n command: string,\n ...args: string[]\n) => ExecaChildProcess<string>;\n\ninterface ExecConcurrentlyCommand {\n command: string;\n name: string;\n prefixColor?: StyleColor;\n}\n\ninterface ExecConcurrentlyOptions {\n /**\n * The maximum number of processes that can execute concurrently.\n *\n * Defaults to the CPU core count.\n */\n maxProcesses?: number;\n\n /**\n * A set length to pad names to.\n *\n * Defaults to the length of the longest command name.\n */\n nameLength?: number;\n\n /**\n * The stream that logging output will be written to.\n *\n * Defaults to `process.stdout`.\n */\n outputStream?: stream.Writable;\n}\n\ntype ExecOptions = execa.Options & { streamStdio?: true | PackageManager };\n\nconst envWithPath = {\n PATH: npmRunPath({ cwd:
|
|
5
|
-
"mappings": "AACA,
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import type { styleText } from 'node:util';\nimport { cpus } from 'os';\nimport stream from 'stream';\nimport util from 'util';\n\nimport concurrently from 'concurrently';\nimport execa, { type ExecaChildProcess } from 'execa';\nimport npmRunPath from 'npm-run-path';\nimport npmWhich from 'npm-which';\n\nimport { concurrentlyErrorsSchema, isErrorWithCode } from './error.js';\nimport { log } from './logging.js';\nimport type { PackageManager } from './packageManager.js';\n\ntype StyleColor = Parameters<typeof styleText>[0];\n\nclass YarnSpamFilter extends stream.Transform {\n silenced = false;\n\n _transform(\n chunk: Uint8Array,\n _encoding: BufferEncoding,\n callback: stream.TransformCallback,\n ) {\n const str = Buffer.from(chunk).toString();\n\n // Yarn spews the entire installed dependency tree after this message\n if (str.startsWith('info Direct dependencies')) {\n this.silenced = true;\n }\n\n if (\n !this.silenced &&\n // This isn't very useful given the command generates a lockfile\n !str.startsWith('info No lockfile found')\n ) {\n this.push(chunk);\n }\n\n callback();\n }\n}\n\nclass YarnWarningFilter extends stream.Transform {\n _transform(\n chunk: Uint8Array,\n _encoding: BufferEncoding,\n callback: stream.TransformCallback,\n ) {\n const str = Buffer.from(chunk).toString();\n\n // Filter out annoying deprecation warnings that users can do little about\n if (!str.startsWith('warning skuba >')) {\n this.push(chunk);\n }\n\n callback();\n }\n}\n\nexport type Exec = (\n command: string,\n ...args: string[]\n) => ExecaChildProcess<string>;\n\ninterface ExecConcurrentlyCommand {\n command: string;\n name: string;\n prefixColor?: StyleColor;\n}\n\ninterface ExecConcurrentlyOptions {\n /**\n * The maximum number of processes that can execute concurrently.\n *\n * Defaults to the CPU core count.\n */\n maxProcesses?: number;\n\n /**\n * A set length to pad names to.\n *\n * Defaults to the length of the longest command name.\n */\n nameLength?: number;\n\n /**\n * The stream that logging output will be written to.\n *\n * Defaults to `process.stdout`.\n */\n outputStream?: stream.Writable;\n}\n\ntype ExecOptions = execa.Options & { streamStdio?: true | PackageManager };\n\nconst envWithPath = {\n PATH: npmRunPath({ cwd: __dirname }),\n};\n\nconst runCommand = (command: string, args: string[], opts?: ExecOptions) => {\n const subprocess = execa(command, args, {\n localDir: __dirname,\n preferLocal: true,\n stdio: 'inherit',\n ...opts,\n });\n\n switch (opts?.streamStdio) {\n case 'yarn':\n const stderrFilter = new YarnWarningFilter();\n const stdoutFilter = new YarnSpamFilter();\n\n subprocess.stderr?.pipe(stderrFilter).pipe(process.stderr);\n subprocess.stdout?.pipe(stdoutFilter).pipe(process.stdout);\n\n break;\n\n case 'pnpm':\n case true:\n subprocess.stderr?.pipe(process.stderr);\n subprocess.stdout?.pipe(process.stdout);\n\n break;\n }\n\n return subprocess;\n};\n\nconst whichCallback = npmWhich(__dirname);\n\nconst which = util.promisify<string, string>(whichCallback);\n\nexport const createExec =\n (opts: ExecOptions): Exec =>\n (command, ...args) =>\n runCommand(command, args, opts);\n\nexport const exec: Exec = (command, ...args) => runCommand(command, args);\n\nexport const execConcurrently = async (\n commands: ExecConcurrentlyCommand[],\n { maxProcesses, nameLength, outputStream }: ExecConcurrentlyOptions = {},\n) => {\n const maxNameLength =\n nameLength ??\n commands.reduce(\n (length, command) => Math.max(length, command.name.length),\n 0,\n );\n\n try {\n await concurrently(\n commands.map(({ command, name, prefixColor }) => ({\n command,\n env: envWithPath,\n name: name.padEnd(maxNameLength),\n prefixColor: Array.isArray(prefixColor) ? prefixColor[0] : prefixColor,\n })),\n {\n maxProcesses: maxProcesses ?? cpus().length,\n\n outputStream,\n\n // Use a minimalist logging prefix.\n prefix: '{name} \u2502',\n },\n ).result;\n } catch (err) {\n const result = concurrentlyErrorsSchema.safeParse(err);\n\n if (!result.success) {\n throw err;\n }\n\n const failed = result.data\n .filter(({ exitCode }) => exitCode !== 0)\n .sort(({ index: indexA }, { index: indexB }) => indexA - indexB)\n .map((subprocess) => subprocess.command.name);\n\n throw Error(\n `${failed.join(', ')} subprocess${\n failed.length === 1 ? '' : 'es'\n } failed.`,\n );\n }\n};\n\nexport const ensureCommands = async (...names: string[]) => {\n let success = true;\n\n await Promise.all(\n names.map(async (name) => {\n const result = await hasCommand(name);\n\n if (!result) {\n success = false;\n\n log.err(log.bold(name), 'needs to be installed.');\n }\n }),\n );\n\n if (!success) {\n process.exit(1);\n }\n};\n\nexport const hasCommand = async (name: string) => {\n try {\n await which(name);\n\n return true;\n } catch (err) {\n if (isErrorWithCode(err, 'ENOENT')) {\n return false;\n }\n\n throw err;\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,gBAAqB;AACrB,oBAAmB;AACnB,kBAAiB;AAEjB,0BAAyB;AACzB,mBAA8C;AAC9C,0BAAuB;AACvB,uBAAqB;AAErB,mBAA0D;AAC1D,qBAAoB;AAKpB,MAAM,uBAAuB,cAAAA,QAAO,UAAU;AAAA,EAC5C,WAAW;AAAA,EAEX,WACE,OACA,WACA,UACA;AACA,UAAM,MAAM,OAAO,KAAK,KAAK,EAAE,SAAS;AAGxC,QAAI,IAAI,WAAW,0BAA0B,GAAG;AAC9C,WAAK,WAAW;AAAA,IAClB;AAEA,QACE,CAAC,KAAK;AAAA,IAEN,CAAC,IAAI,WAAW,wBAAwB,GACxC;AACA,WAAK,KAAK,KAAK;AAAA,IACjB;AAEA,aAAS;AAAA,EACX;AACF;AAEA,MAAM,0BAA0B,cAAAA,QAAO,UAAU;AAAA,EAC/C,WACE,OACA,WACA,UACA;AACA,UAAM,MAAM,OAAO,KAAK,KAAK,EAAE,SAAS;AAGxC,QAAI,CAAC,IAAI,WAAW,iBAAiB,GAAG;AACtC,WAAK,KAAK,KAAK;AAAA,IACjB;AAEA,aAAS;AAAA,EACX;AACF;AAsCA,MAAM,cAAc;AAAA,EAClB,UAAM,oBAAAC,SAAW,EAAE,KAAK,UAAU,CAAC;AACrC;AAEA,MAAM,aAAa,CAAC,SAAiB,MAAgB,SAAuB;AAC1E,QAAM,iBAAa,aAAAC,SAAM,SAAS,MAAM;AAAA,IACtC,UAAU;AAAA,IACV,aAAa;AAAA,IACb,OAAO;AAAA,IACP,GAAG;AAAA,EACL,CAAC;AAED,UAAQ,MAAM,aAAa;AAAA,IACzB,KAAK;AACH,YAAM,eAAe,IAAI,kBAAkB;AAC3C,YAAM,eAAe,IAAI,eAAe;AAExC,iBAAW,QAAQ,KAAK,YAAY,EAAE,KAAK,QAAQ,MAAM;AACzD,iBAAW,QAAQ,KAAK,YAAY,EAAE,KAAK,QAAQ,MAAM;AAEzD;AAAA,IAEF,KAAK;AAAA,IACL,KAAK;AACH,iBAAW,QAAQ,KAAK,QAAQ,MAAM;AACtC,iBAAW,QAAQ,KAAK,QAAQ,MAAM;AAEtC;AAAA,EACJ;AAEA,SAAO;AACT;AAEA,MAAM,oBAAgB,iBAAAC,SAAS,SAAS;AAExC,MAAM,QAAQ,YAAAC,QAAK,UAA0B,aAAa;AAEnD,MAAM,aACX,CAAC,SACD,CAAC,YAAY,SACX,WAAW,SAAS,MAAM,IAAI;AAE3B,MAAM,OAAa,CAAC,YAAY,SAAS,WAAW,SAAS,IAAI;AAEjE,MAAM,mBAAmB,OAC9B,UACA,EAAE,cAAc,YAAY,aAAa,IAA6B,CAAC,MACpE;AACH,QAAM,gBACJ,cACA,SAAS;AAAA,IACP,CAAC,QAAQ,YAAY,KAAK,IAAI,QAAQ,QAAQ,KAAK,MAAM;AAAA,IACzD;AAAA,EACF;AAEF,MAAI;AACF,cAAM,oBAAAC;AAAA,MACJ,SAAS,IAAI,CAAC,EAAE,SAAS,MAAM,YAAY,OAAO;AAAA,QAChD;AAAA,QACA,KAAK;AAAA,QACL,MAAM,KAAK,OAAO,aAAa;AAAA,QAC/B,aAAa,MAAM,QAAQ,WAAW,IAAI,YAAY,CAAC,IAAI;AAAA,MAC7D,EAAE;AAAA,MACF;AAAA,QACE,cAAc,oBAAgB,gBAAK,EAAE;AAAA,QAErC;AAAA;AAAA,QAGA,QAAQ;AAAA,MACV;AAAA,IACF,EAAE;AAAA,EACJ,SAAS,KAAK;AACZ,UAAM,SAAS,sCAAyB,UAAU,GAAG;AAErD,QAAI,CAAC,OAAO,SAAS;AACnB,YAAM;AAAA,IACR;AAEA,UAAM,SAAS,OAAO,KACnB,OAAO,CAAC,EAAE,SAAS,MAAM,aAAa,CAAC,EACvC,KAAK,CAAC,EAAE,OAAO,OAAO,GAAG,EAAE,OAAO,OAAO,MAAM,SAAS,MAAM,EAC9D,IAAI,CAAC,eAAe,WAAW,QAAQ,IAAI;AAE9C,UAAM;AAAA,MACJ,GAAG,OAAO,KAAK,IAAI,CAAC,cAClB,OAAO,WAAW,IAAI,KAAK,IAC7B;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,iBAAiB,UAAU,UAAoB;AAC1D,MAAI,UAAU;AAEd,QAAM,QAAQ;AAAA,IACZ,MAAM,IAAI,OAAO,SAAS;AACxB,YAAM,SAAS,MAAM,WAAW,IAAI;AAEpC,UAAI,CAAC,QAAQ;AACX,kBAAU;AAEV,2BAAI,IAAI,mBAAI,KAAK,IAAI,GAAG,wBAAwB;AAAA,MAClD;AAAA,IACF,CAAC;AAAA,EACH;AAEA,MAAI,CAAC,SAAS;AACZ,YAAQ,KAAK,CAAC;AAAA,EAChB;AACF;AAEO,MAAM,aAAa,OAAO,SAAiB;AAChD,MAAI;AACF,UAAM,MAAM,IAAI;AAEhB,WAAO;AAAA,EACT,SAAS,KAAK;AACZ,YAAI,8BAAgB,KAAK,QAAQ,GAAG;AAClC,aAAO;AAAA,IACT;AAEA,UAAM;AAAA,EACR;AACF;",
|
|
6
|
+
"names": ["stream", "npmRunPath", "execa", "npmWhich", "util", "concurrently"]
|
|
7
7
|
}
|
package/lib/utils/fs.js
CHANGED
|
@@ -1,17 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 fs_exports = {};
|
|
30
|
+
__export(fs_exports, {
|
|
31
|
+
pathExists: () => pathExists
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(fs_exports);
|
|
34
|
+
var import_fs_extra = __toESM(require("fs-extra"));
|
|
35
|
+
var import_error = require("./error.js");
|
|
3
36
|
const pathExists = async (filePath) => {
|
|
4
37
|
try {
|
|
5
|
-
await
|
|
38
|
+
await import_fs_extra.default.promises.access(filePath);
|
|
6
39
|
return true;
|
|
7
40
|
} catch (error) {
|
|
8
|
-
if (isErrorWithCode(error, "ENOENT")) {
|
|
41
|
+
if ((0, import_error.isErrorWithCode)(error, "ENOENT")) {
|
|
9
42
|
return false;
|
|
10
43
|
}
|
|
11
44
|
throw error;
|
|
12
45
|
}
|
|
13
46
|
};
|
|
14
|
-
export
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
15
49
|
pathExists
|
|
16
|
-
};
|
|
50
|
+
});
|
|
17
51
|
//# sourceMappingURL=fs.js.map
|
package/lib/utils/fs.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/fs.ts"],
|
|
4
4
|
"sourcesContent": ["import fs from 'fs-extra';\n\nimport { isErrorWithCode } from './error.js';\n\nexport const pathExists = async (filePath: string): Promise<boolean> => {\n try {\n await fs.promises.access(filePath);\n\n return true; // Path exists and is accessible\n } catch (error: unknown) {\n if (isErrorWithCode(error, 'ENOENT')) {\n return false; // Path does not exist\n }\n\n throw error; // Other errors (include permission issues)\n }\n};\n"],
|
|
5
|
-
"mappings": "AAAA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAe;AAEf,mBAAgC;AAEzB,MAAM,aAAa,OAAO,aAAuC;AACtE,MAAI;AACF,UAAM,gBAAAA,QAAG,SAAS,OAAO,QAAQ;AAEjC,WAAO;AAAA,EACT,SAAS,OAAgB;AACvB,YAAI,8BAAgB,OAAO,QAAQ,GAAG;AACpC,aAAO;AAAA,IACT;AAEA,UAAM;AAAA,EACR;AACF;",
|
|
6
|
+
"names": ["fs"]
|
|
7
7
|
}
|
package/lib/utils/help.js
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var help_exports = {};
|
|
20
|
+
__export(help_exports, {
|
|
21
|
+
showHelp: () => showHelp
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(help_exports);
|
|
24
|
+
var import_command = require("./command.js");
|
|
25
|
+
var import_logging = require("./logging.js");
|
|
3
26
|
const showHelp = () => {
|
|
4
|
-
log.plain(log.bold("Available commands:"));
|
|
5
|
-
COMMAND_LIST.forEach((item) => log.plain(item));
|
|
27
|
+
import_logging.log.plain(import_logging.log.bold("Available commands:"));
|
|
28
|
+
import_command.COMMAND_LIST.forEach((item) => import_logging.log.plain(item));
|
|
6
29
|
};
|
|
7
|
-
export
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
8
32
|
showHelp
|
|
9
|
-
};
|
|
33
|
+
});
|
|
10
34
|
//# sourceMappingURL=help.js.map
|
package/lib/utils/help.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/help.ts"],
|
|
4
4
|
"sourcesContent": ["import { COMMAND_LIST } from './command.js';\nimport { log } from './logging.js';\n\nexport const showHelp = () => {\n log.plain(log.bold('Available commands:'));\n\n COMMAND_LIST.forEach((item) => log.plain(item));\n};\n"],
|
|
5
|
-
"mappings": "AAAA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA6B;AAC7B,qBAAoB;AAEb,MAAM,WAAW,MAAM;AAC5B,qBAAI,MAAM,mBAAI,KAAK,qBAAqB,CAAC;AAEzC,8BAAa,QAAQ,CAAC,SAAS,mBAAI,MAAM,IAAI,CAAC;AAChD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/lib/utils/logging.js
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
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 logging_exports = {};
|
|
20
|
+
__export(logging_exports, {
|
|
21
|
+
childLogger: () => childLogger,
|
|
22
|
+
createLogger: () => createLogger,
|
|
23
|
+
log: () => log,
|
|
24
|
+
pluralise: () => pluralise
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(logging_exports);
|
|
27
|
+
var import_node_util = require("node:util");
|
|
2
28
|
const createLogger = ({
|
|
3
29
|
debug,
|
|
4
30
|
prefixes = [],
|
|
@@ -8,17 +34,17 @@ const createLogger = ({
|
|
|
8
34
|
const log2 = (...message) => logWithoutSuffixes(...message, ...suffixes);
|
|
9
35
|
return {
|
|
10
36
|
settings: { debug, prefixes, suffixes },
|
|
11
|
-
bold: (text) => styleText("bold", text),
|
|
12
|
-
dim: (text) => styleText("dim", text),
|
|
13
|
-
formatSubtle: (text) => styleText("gray", text),
|
|
37
|
+
bold: (text) => (0, import_node_util.styleText)("bold", text),
|
|
38
|
+
dim: (text) => (0, import_node_util.styleText)("dim", text),
|
|
39
|
+
formatSubtle: (text) => (0, import_node_util.styleText)("gray", text),
|
|
14
40
|
timing: (start, end) => `${Number((end - start) / BigInt(1e7)) / 100}s`,
|
|
15
|
-
debug: (...message) => debug ? log2(...message.map((m) => styleText("gray", String(m)))) : void 0,
|
|
16
|
-
subtle: (...message) => log2(...message.map((m) => styleText("gray", String(m)))),
|
|
17
|
-
err: (...message) => log2(...message.map((m) => styleText("red", String(m)))),
|
|
41
|
+
debug: (...message) => debug ? log2(...message.map((m) => (0, import_node_util.styleText)("gray", String(m)))) : void 0,
|
|
42
|
+
subtle: (...message) => log2(...message.map((m) => (0, import_node_util.styleText)("gray", String(m)))),
|
|
43
|
+
err: (...message) => log2(...message.map((m) => (0, import_node_util.styleText)("red", String(m)))),
|
|
18
44
|
newline: () => logWithoutSuffixes(),
|
|
19
|
-
ok: (...message) => log2(...message.map((m) => styleText("green", String(m)))),
|
|
45
|
+
ok: (...message) => log2(...message.map((m) => (0, import_node_util.styleText)("green", String(m)))),
|
|
20
46
|
plain: (...message) => log2(...message),
|
|
21
|
-
warn: (...message) => log2(...message.map((m) => styleText("yellow", String(m))))
|
|
47
|
+
warn: (...message) => log2(...message.map((m) => (0, import_node_util.styleText)("yellow", String(m))))
|
|
22
48
|
};
|
|
23
49
|
};
|
|
24
50
|
const log = createLogger({ debug: false });
|
|
@@ -28,10 +54,11 @@ const childLogger = (logger, settings) => createLogger({
|
|
|
28
54
|
suffixes: [...logger.settings.suffixes, ...settings.suffixes ?? []]
|
|
29
55
|
});
|
|
30
56
|
const pluralise = (count, subject) => `${count} ${subject}${count === 1 ? "" : "s"}`;
|
|
31
|
-
export
|
|
57
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
58
|
+
0 && (module.exports = {
|
|
32
59
|
childLogger,
|
|
33
60
|
createLogger,
|
|
34
61
|
log,
|
|
35
62
|
pluralise
|
|
36
|
-
};
|
|
63
|
+
});
|
|
37
64
|
//# sourceMappingURL=logging.js.map
|
package/lib/utils/logging.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/logging.ts"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable no-console */\n\nimport { styleText } from 'node:util';\n\nexport type Logger = typeof log;\n\nexport const createLogger = ({\n debug,\n prefixes = [],\n suffixes = [],\n}: {\n debug: boolean;\n prefixes?: unknown[];\n suffixes?: unknown[];\n}) => {\n const logWithoutSuffixes = (...message: unknown[]) =>\n console.log(...prefixes, ...message);\n\n const log = (...message: unknown[]) =>\n logWithoutSuffixes(...message, ...suffixes);\n\n return {\n settings: { debug, prefixes, suffixes },\n\n bold: (text: string) => styleText('bold', text),\n dim: (text: string) => styleText('dim', text),\n formatSubtle: (text: string) => styleText('gray', text),\n\n timing: (start: bigint, end: bigint) =>\n `${Number((end - start) / BigInt(10_000_000)) / 100}s`,\n\n debug: (...message: unknown[]) =>\n debug\n ? log(...message.map((m) => styleText('gray', String(m))))\n : undefined,\n subtle: (...message: unknown[]) =>\n log(...message.map((m) => styleText('gray', String(m)))),\n err: (...message: unknown[]) =>\n log(...message.map((m) => styleText('red', String(m)))),\n newline: () => logWithoutSuffixes(),\n ok: (...message: unknown[]) =>\n log(...message.map((m) => styleText('green', String(m)))),\n plain: (...message: unknown[]) => log(...message),\n warn: (...message: unknown[]) =>\n log(...message.map((m) => styleText('yellow', String(m)))),\n };\n};\n\nexport const log = createLogger({ debug: false });\n\nexport const childLogger = (\n logger: Logger,\n settings: Partial<Logger['settings']>,\n) =>\n createLogger({\n debug: settings.debug ?? logger.settings.debug,\n prefixes: [...(settings.prefixes ?? []), ...logger.settings.prefixes],\n suffixes: [...logger.settings.suffixes, ...(settings.suffixes ?? [])],\n });\n\nexport const pluralise = (count: number, subject: string) =>\n `${count} ${subject}${count === 1 ? '' : 's'}`;\n"],
|
|
5
|
-
"mappings": "AAEA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,uBAA0B;AAInB,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA,WAAW,CAAC;AAAA,EACZ,WAAW,CAAC;AACd,MAIM;AACJ,QAAM,qBAAqB,IAAI,YAC7B,QAAQ,IAAI,GAAG,UAAU,GAAG,OAAO;AAErC,QAAMA,OAAM,IAAI,YACd,mBAAmB,GAAG,SAAS,GAAG,QAAQ;AAE5C,SAAO;AAAA,IACL,UAAU,EAAE,OAAO,UAAU,SAAS;AAAA,IAEtC,MAAM,CAAC,aAAiB,4BAAU,QAAQ,IAAI;AAAA,IAC9C,KAAK,CAAC,aAAiB,4BAAU,OAAO,IAAI;AAAA,IAC5C,cAAc,CAAC,aAAiB,4BAAU,QAAQ,IAAI;AAAA,IAEtD,QAAQ,CAAC,OAAe,QACtB,GAAG,QAAQ,MAAM,SAAS,OAAO,GAAU,CAAC,IAAI,GAAG;AAAA,IAErD,OAAO,IAAI,YACT,QACIA,KAAI,GAAG,QAAQ,IAAI,CAAC,UAAM,4BAAU,QAAQ,OAAO,CAAC,CAAC,CAAC,CAAC,IACvD;AAAA,IACN,QAAQ,IAAI,YACVA,KAAI,GAAG,QAAQ,IAAI,CAAC,UAAM,4BAAU,QAAQ,OAAO,CAAC,CAAC,CAAC,CAAC;AAAA,IACzD,KAAK,IAAI,YACPA,KAAI,GAAG,QAAQ,IAAI,CAAC,UAAM,4BAAU,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;AAAA,IACxD,SAAS,MAAM,mBAAmB;AAAA,IAClC,IAAI,IAAI,YACNA,KAAI,GAAG,QAAQ,IAAI,CAAC,UAAM,4BAAU,SAAS,OAAO,CAAC,CAAC,CAAC,CAAC;AAAA,IAC1D,OAAO,IAAI,YAAuBA,KAAI,GAAG,OAAO;AAAA,IAChD,MAAM,IAAI,YACRA,KAAI,GAAG,QAAQ,IAAI,CAAC,UAAM,4BAAU,UAAU,OAAO,CAAC,CAAC,CAAC,CAAC;AAAA,EAC7D;AACF;AAEO,MAAM,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC;AAEzC,MAAM,cAAc,CACzB,QACA,aAEA,aAAa;AAAA,EACX,OAAO,SAAS,SAAS,OAAO,SAAS;AAAA,EACzC,UAAU,CAAC,GAAI,SAAS,YAAY,CAAC,GAAI,GAAG,OAAO,SAAS,QAAQ;AAAA,EACpE,UAAU,CAAC,GAAG,OAAO,SAAS,UAAU,GAAI,SAAS,YAAY,CAAC,CAAE;AACtE,CAAC;AAEI,MAAM,YAAY,CAAC,OAAe,YACvC,GAAG,KAAK,IAAI,OAAO,GAAG,UAAU,IAAI,KAAK,GAAG;",
|
|
6
6
|
"names": ["log"]
|
|
7
7
|
}
|
package/lib/utils/logo.js
CHANGED
|
@@ -1,41 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var logo_exports = {};
|
|
20
|
+
__export(logo_exports, {
|
|
21
|
+
showLogoAndVersionInfo: () => showLogoAndVersionInfo
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(logo_exports);
|
|
24
|
+
var import_node_util = require("node:util");
|
|
25
|
+
var import_logging = require("./logging.js");
|
|
26
|
+
var import_packageManager = require("./packageManager.js");
|
|
27
|
+
var import_version = require("./version.js");
|
|
28
|
+
const LOGO = (0, import_node_util.styleText)(
|
|
6
29
|
"blueBright",
|
|
7
30
|
`
|
|
8
|
-
\u256D\u2500\u256E ${styleText("magentaBright", " ")}\u256D\u2500\u256E
|
|
9
|
-
\u256D\u2500\u2500\u2500\u2502 \u2570\u2500${styleText("magentaBright", "\u256D\u2500\u252C\u2500\u256E")} \u2570\u2500\u256E\u2500\u2500\u2500\u256E
|
|
10
|
-
\u2502_ \u2500\u2524 <${styleText("magentaBright", "\u2502 \u2575 \u2502")} \u2022 \u2502 \u2022 \u2502
|
|
11
|
-
\u2570\u2500\u2500\u2500\u2570\u2500\u2534\u2500${styleText("magentaBright", "\u2570\u2500\u2500\u2500\u256F")}\u2500\u2500\u2500\u256F\u2500\u2500 \u2570
|
|
31
|
+
\u256D\u2500\u256E ${(0, import_node_util.styleText)("magentaBright", " ")}\u256D\u2500\u256E
|
|
32
|
+
\u256D\u2500\u2500\u2500\u2502 \u2570\u2500${(0, import_node_util.styleText)("magentaBright", "\u256D\u2500\u252C\u2500\u256E")} \u2570\u2500\u256E\u2500\u2500\u2500\u256E
|
|
33
|
+
\u2502_ \u2500\u2524 <${(0, import_node_util.styleText)("magentaBright", "\u2502 \u2575 \u2502")} \u2022 \u2502 \u2022 \u2502
|
|
34
|
+
\u2570\u2500\u2500\u2500\u2570\u2500\u2534\u2500${(0, import_node_util.styleText)("magentaBright", "\u2570\u2500\u2500\u2500\u256F")}\u2500\u2500\u2500\u256F\u2500\u2500 \u2570
|
|
12
35
|
`
|
|
13
36
|
);
|
|
14
37
|
const showLogoAndVersionInfo = async () => {
|
|
15
38
|
const [versionInfo, packageManager] = await Promise.all([
|
|
16
|
-
getSkubaVersionInfo(),
|
|
17
|
-
detectPackageManager()
|
|
39
|
+
(0, import_version.getSkubaVersionInfo)(),
|
|
40
|
+
(0, import_packageManager.detectPackageManager)()
|
|
18
41
|
]);
|
|
19
|
-
log.plain(LOGO);
|
|
20
|
-
log.subtle(
|
|
21
|
-
log.bold(versionInfo.local),
|
|
42
|
+
import_logging.log.plain(LOGO);
|
|
43
|
+
import_logging.log.subtle(
|
|
44
|
+
import_logging.log.bold(versionInfo.local),
|
|
22
45
|
"|",
|
|
23
46
|
"latest",
|
|
24
|
-
log.bold(versionInfo.latest ?? "offline \u2708")
|
|
47
|
+
import_logging.log.bold(versionInfo.latest ?? "offline \u2708")
|
|
25
48
|
);
|
|
26
|
-
log.newline();
|
|
49
|
+
import_logging.log.newline();
|
|
27
50
|
if (versionInfo.isStale) {
|
|
28
|
-
log.warn("Your skuba installation is out of date.");
|
|
29
|
-
log.warn("Consider upgrading:");
|
|
30
|
-
log.newline();
|
|
31
|
-
log.warn(
|
|
32
|
-
log.bold(`${packageManager.print.update} skuba@${versionInfo.latest}`)
|
|
51
|
+
import_logging.log.warn("Your skuba installation is out of date.");
|
|
52
|
+
import_logging.log.warn("Consider upgrading:");
|
|
53
|
+
import_logging.log.newline();
|
|
54
|
+
import_logging.log.warn(
|
|
55
|
+
import_logging.log.bold(`${packageManager.print.update} skuba@${versionInfo.latest}`)
|
|
33
56
|
);
|
|
34
|
-
log.newline();
|
|
57
|
+
import_logging.log.newline();
|
|
35
58
|
}
|
|
36
59
|
return versionInfo;
|
|
37
60
|
};
|
|
38
|
-
export
|
|
61
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
+
0 && (module.exports = {
|
|
39
63
|
showLogoAndVersionInfo
|
|
40
|
-
};
|
|
64
|
+
});
|
|
41
65
|
//# sourceMappingURL=logo.js.map
|
package/lib/utils/logo.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/logo.ts"],
|
|
4
4
|
"sourcesContent": ["import { styleText } from 'node:util';\n\nimport { log } from './logging.js';\nimport { detectPackageManager } from './packageManager.js';\nimport { getSkubaVersionInfo } from './version.js';\n\nconst LOGO = styleText(\n 'blueBright',\n `\n \u256D\u2500\u256E ${styleText('magentaBright', ' ')}\u256D\u2500\u256E\n\u256D\u2500\u2500\u2500\u2502 \u2570\u2500${styleText('magentaBright', '\u256D\u2500\u252C\u2500\u256E')} \u2570\u2500\u256E\u2500\u2500\u2500\u256E\n\u2502_ \u2500\u2524 <${styleText('magentaBright', '\u2502 \u2575 \u2502')} \u2022 \u2502 \u2022 \u2502\n\u2570\u2500\u2500\u2500\u2570\u2500\u2534\u2500${styleText('magentaBright', '\u2570\u2500\u2500\u2500\u256F')}\u2500\u2500\u2500\u256F\u2500\u2500 \u2570\n`,\n);\n\nexport const showLogoAndVersionInfo = async () => {\n const [versionInfo, packageManager] = await Promise.all([\n getSkubaVersionInfo(),\n detectPackageManager(),\n ]);\n\n log.plain(LOGO);\n log.subtle(\n log.bold(versionInfo.local),\n '|',\n 'latest',\n log.bold(versionInfo.latest ?? 'offline \u2708'),\n );\n log.newline();\n\n if (versionInfo.isStale) {\n log.warn('Your skuba installation is out of date.');\n log.warn('Consider upgrading:');\n log.newline();\n log.warn(\n log.bold(`${packageManager.print.update} skuba@${versionInfo.latest}`),\n );\n log.newline();\n }\n\n return versionInfo;\n};\n"],
|
|
5
|
-
"mappings": "AAAA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0B;AAE1B,qBAAoB;AACpB,4BAAqC;AACrC,qBAAoC;AAEpC,MAAM,WAAO;AAAA,EACX;AAAA,EACA;AAAA,6BACQ,4BAAU,iBAAiB,MAAM,CAAC;AAAA,iDAClC,4BAAU,iBAAiB,gCAAO,CAAC;AAAA,6BACnC,4BAAU,iBAAiB,sBAAO,CAAC;AAAA,sDACnC,4BAAU,iBAAiB,gCAAO,CAAC;AAAA;AAE7C;AAEO,MAAM,yBAAyB,YAAY;AAChD,QAAM,CAAC,aAAa,cAAc,IAAI,MAAM,QAAQ,IAAI;AAAA,QACtD,oCAAoB;AAAA,QACpB,4CAAqB;AAAA,EACvB,CAAC;AAED,qBAAI,MAAM,IAAI;AACd,qBAAI;AAAA,IACF,mBAAI,KAAK,YAAY,KAAK;AAAA,IAC1B;AAAA,IACA;AAAA,IACA,mBAAI,KAAK,YAAY,UAAU,gBAAW;AAAA,EAC5C;AACA,qBAAI,QAAQ;AAEZ,MAAI,YAAY,SAAS;AACvB,uBAAI,KAAK,yCAAyC;AAClD,uBAAI,KAAK,qBAAqB;AAC9B,uBAAI,QAAQ;AACZ,uBAAI;AAAA,MACF,mBAAI,KAAK,GAAG,eAAe,MAAM,MAAM,UAAU,YAAY,MAAM,EAAE;AAAA,IACvE;AACA,uBAAI,QAAQ;AAAA,EACd;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/lib/utils/manifest.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { type NormalizedPackageJson } from 'read-
|
|
1
|
+
import readPkgUp, { type NormalizedPackageJson } from 'read-pkg-up';
|
|
2
2
|
import * as z from 'zod/v4';
|
|
3
|
-
import type { ReadResult } from '../cli/configure/types.js';
|
|
4
3
|
export type ProjectType = z.infer<typeof projectTypeSchema>;
|
|
5
4
|
export declare const projectTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"application">, z.ZodLiteral<"package">]>;
|
|
6
5
|
export declare const PROJECT_TYPES: readonly ["application", "package"];
|
|
7
6
|
export declare const getSkubaManifest: () => Promise<NormalizedPackageJson>;
|
|
8
|
-
export declare const getConsumerManifest: (cwd?: string) => Promise<ReadResult | undefined>;
|
|
7
|
+
export declare const getConsumerManifest: (cwd?: string) => Promise<readPkgUp.ReadResult | undefined>;
|
|
9
8
|
export declare const getManifestProperties: <T extends string, V = unknown>(prop: T) => Promise<{
|
|
10
9
|
value: V | undefined;
|
|
11
10
|
type: string | undefined;
|
package/lib/utils/manifest.js
CHANGED
|
@@ -1,6 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 manifest_exports = {};
|
|
30
|
+
__export(manifest_exports, {
|
|
31
|
+
PROJECT_TYPES: () => PROJECT_TYPES,
|
|
32
|
+
getConsumerManifest: () => getConsumerManifest,
|
|
33
|
+
getEntryPointFromManifest: () => getEntryPointFromManifest,
|
|
34
|
+
getManifestProperties: () => getManifestProperties,
|
|
35
|
+
getSkubaManifest: () => getSkubaManifest,
|
|
36
|
+
getStringPropFromConsumerManifest: () => getStringPropFromConsumerManifest,
|
|
37
|
+
projectTypeSchema: () => projectTypeSchema
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(manifest_exports);
|
|
40
|
+
var import_read_pkg_up = __toESM(require("read-pkg-up"));
|
|
41
|
+
var z = __toESM(require("zod/v4"));
|
|
42
|
+
var import_validation = require("./validation.js");
|
|
4
43
|
const projectTypeSchema = z.union([
|
|
5
44
|
z.literal("application"),
|
|
6
45
|
z.literal("package")
|
|
@@ -12,19 +51,19 @@ const getSkubaManifest = async () => {
|
|
|
12
51
|
if (skubaManifest !== void 0) {
|
|
13
52
|
return skubaManifest;
|
|
14
53
|
}
|
|
15
|
-
const result = await
|
|
54
|
+
const result = await (0, import_read_pkg_up.default)({ cwd: __dirname });
|
|
16
55
|
if (result === void 0) {
|
|
17
56
|
throw Error("skuba could not find its own manifest");
|
|
18
57
|
}
|
|
19
58
|
return skubaManifest = result.packageJson;
|
|
20
59
|
};
|
|
21
|
-
const getConsumerManifest = (cwd) =>
|
|
60
|
+
const getConsumerManifest = (cwd) => (0, import_read_pkg_up.default)({ cwd, normalize: false });
|
|
22
61
|
const getManifestProperties = async (prop) => {
|
|
23
62
|
const manifest = await getConsumerManifest();
|
|
24
63
|
if (!manifest) {
|
|
25
64
|
return void 0;
|
|
26
65
|
}
|
|
27
|
-
const value = hasProp(manifest.packageJson.skuba, prop) ? manifest.packageJson.skuba[prop] : void 0;
|
|
66
|
+
const value = (0, import_validation.hasProp)(manifest.packageJson.skuba, prop) ? manifest.packageJson.skuba[prop] : void 0;
|
|
28
67
|
const type = typeof manifest.packageJson.type === "string" ? manifest.packageJson.type : void 0;
|
|
29
68
|
return {
|
|
30
69
|
value,
|
|
@@ -40,7 +79,8 @@ const getEntryPointFromManifest = async () => {
|
|
|
40
79
|
const entryPoint = await getStringPropFromConsumerManifest("entryPoint");
|
|
41
80
|
return entryPoint ?? DEFAULT_ENTRY_POINT;
|
|
42
81
|
};
|
|
43
|
-
export
|
|
82
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
+
0 && (module.exports = {
|
|
44
84
|
PROJECT_TYPES,
|
|
45
85
|
getConsumerManifest,
|
|
46
86
|
getEntryPointFromManifest,
|
|
@@ -48,5 +88,5 @@ export {
|
|
|
48
88
|
getSkubaManifest,
|
|
49
89
|
getStringPropFromConsumerManifest,
|
|
50
90
|
projectTypeSchema
|
|
51
|
-
};
|
|
91
|
+
});
|
|
52
92
|
//# sourceMappingURL=manifest.js.map
|