skuba 14.0.0-migrate-to-inquirer-20251031060542 → 14.0.0-replace-global-vars-20251117052457
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/eslint.js +1 -1
- package/config/prettier.d.ts +8 -4
- package/config/prettier.js +10 -2
- package/lib/cli/adapter/eslint.js +11 -45
- package/lib/cli/adapter/eslint.js.map +3 -3
- package/lib/cli/adapter/prettier.js +39 -67
- package/lib/cli/adapter/prettier.js.map +2 -2
- package/lib/cli/build/args.js +8 -42
- package/lib/cli/build/args.js.map +2 -2
- package/lib/cli/build/assets.d.ts +3 -2
- package/lib/cli/build/assets.js +28 -60
- package/lib/cli/build/assets.js.map +3 -3
- package/lib/cli/build/esbuild.js +21 -45
- package/lib/cli/build/esbuild.js.map +2 -2
- package/lib/cli/build/index.js +21 -55
- package/lib/cli/build/index.js.map +3 -3
- package/lib/cli/build/tsc.js +23 -61
- package/lib/cli/build/tsc.js.map +3 -3
- package/lib/cli/buildPackage/index.js +8 -32
- package/lib/cli/buildPackage/index.js.map +1 -1
- package/lib/cli/configure/analyseConfiguration.js +16 -50
- package/lib/cli/configure/analyseConfiguration.js.map +2 -2
- package/lib/cli/configure/analyseDependencies.d.ts +1 -1
- package/lib/cli/configure/analyseDependencies.js +25 -59
- package/lib/cli/configure/analyseDependencies.js.map +3 -3
- package/lib/cli/configure/analysis/diff.js +5 -39
- package/lib/cli/configure/analysis/diff.js.map +3 -3
- package/lib/cli/configure/analysis/files.js +8 -42
- package/lib/cli/configure/analysis/files.js.map +2 -2
- package/lib/cli/configure/analysis/git.js +12 -46
- package/lib/cli/configure/analysis/git.js.map +2 -2
- package/lib/cli/configure/analysis/package.d.ts +2 -3
- package/lib/cli/configure/analysis/package.js +10 -45
- package/lib/cli/configure/analysis/package.js.map +3 -3
- package/lib/cli/configure/analysis/project.js +18 -50
- package/lib/cli/configure/analysis/project.js.map +2 -2
- package/lib/cli/configure/dependencies/index.js +7 -35
- package/lib/cli/configure/dependencies/index.js.map +1 -1
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +4 -28
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +1 -1
- package/lib/cli/configure/dependencies/seekKoala.js +4 -28
- package/lib/cli/configure/dependencies/seekKoala.js.map +1 -1
- package/lib/cli/configure/dependencies/skuba.js +4 -28
- package/lib/cli/configure/dependencies/skuba.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDeps.js +2 -26
- package/lib/cli/configure/dependencies/skubaDeps.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDive.js +4 -29
- 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 +35 -60
- package/lib/cli/configure/ensureTemplateCompletion.js.map +3 -3
- package/lib/cli/configure/getEntryPoint.d.ts +1 -1
- package/lib/cli/configure/getEntryPoint.js +14 -48
- package/lib/cli/configure/getEntryPoint.js.map +3 -3
- package/lib/cli/configure/getProjectType.d.ts +1 -1
- package/lib/cli/configure/getProjectType.js +14 -35
- package/lib/cli/configure/getProjectType.js.map +2 -2
- package/lib/cli/configure/index.js +50 -84
- package/lib/cli/configure/index.js.map +3 -3
- package/lib/cli/configure/modules/eslint.js +10 -34
- package/lib/cli/configure/modules/eslint.js.map +1 -1
- package/lib/cli/configure/modules/ignore.js +8 -32
- package/lib/cli/configure/modules/ignore.js.map +1 -1
- package/lib/cli/configure/modules/index.js +18 -44
- package/lib/cli/configure/modules/index.js.map +2 -2
- package/lib/cli/configure/modules/nodemon.js +4 -28
- package/lib/cli/configure/modules/nodemon.js.map +1 -1
- package/lib/cli/configure/modules/package.js +10 -34
- package/lib/cli/configure/modules/package.js.map +1 -1
- package/lib/cli/configure/modules/prettier.js +11 -35
- package/lib/cli/configure/modules/prettier.js.map +1 -1
- package/lib/cli/configure/modules/renovate.js +17 -40
- package/lib/cli/configure/modules/renovate.js.map +2 -2
- package/lib/cli/configure/modules/serverless.js +2 -26
- package/lib/cli/configure/modules/serverless.js.map +1 -1
- package/lib/cli/configure/modules/tslint.js +4 -28
- package/lib/cli/configure/modules/tslint.js.map +1 -1
- package/lib/cli/configure/processing/configFile.js +3 -39
- package/lib/cli/configure/processing/configFile.js.map +1 -1
- package/lib/cli/configure/processing/deleteFiles.js +2 -26
- package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
- package/lib/cli/configure/processing/javascript.js +2 -27
- package/lib/cli/configure/processing/javascript.js.map +1 -1
- package/lib/cli/configure/processing/json.js +6 -31
- package/lib/cli/configure/processing/json.js.map +1 -1
- package/lib/cli/configure/processing/loadFiles.js +2 -26
- package/lib/cli/configure/processing/loadFiles.js.map +1 -1
- package/lib/cli/configure/processing/module.js +4 -28
- package/lib/cli/configure/processing/module.js.map +1 -1
- package/lib/cli/configure/processing/package.d.ts +1 -67
- package/lib/cli/configure/processing/package.js +8 -45
- package/lib/cli/configure/processing/package.js.map +3 -3
- package/lib/cli/configure/processing/prettier.js +4 -38
- package/lib/cli/configure/processing/prettier.js.map +2 -2
- package/lib/cli/configure/processing/record.js +5 -41
- package/lib/cli/configure/processing/record.js.map +2 -2
- package/lib/cli/configure/processing/typescript.js +26 -63
- package/lib/cli/configure/processing/typescript.js.map +2 -2
- package/lib/cli/configure/types.d.ts +15 -4
- package/lib/cli/configure/types.js +0 -16
- package/lib/cli/configure/types.js.map +3 -3
- package/lib/cli/format/index.js +20 -54
- package/lib/cli/format/index.js.map +3 -3
- package/lib/cli/help/index.js +6 -30
- package/lib/cli/help/index.js.map +1 -1
- package/lib/cli/init/getConfig.d.ts +1 -1
- package/lib/cli/init/getConfig.js +76 -104
- package/lib/cli/init/getConfig.js.map +3 -3
- package/lib/cli/init/git.js +16 -51
- package/lib/cli/init/git.js.map +2 -2
- package/lib/cli/init/index.js +67 -98
- package/lib/cli/init/index.js.map +2 -2
- package/lib/cli/init/prompts.js +21 -42
- package/lib/cli/init/prompts.js.map +1 -1
- package/lib/cli/init/types.js +7 -41
- package/lib/cli/init/types.js.map +1 -1
- package/lib/cli/init/validation.js +2 -30
- package/lib/cli/init/validation.js.map +1 -1
- package/lib/cli/init/writePackageJson.js +8 -42
- package/lib/cli/init/writePackageJson.js.map +2 -2
- package/lib/cli/lint/annotate/buildkite/eslint.js +3 -37
- package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/index.js +11 -45
- package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/internal.js +3 -37
- package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/prettier.js +3 -37
- package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/tsc.js +3 -37
- package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
- package/lib/cli/lint/annotate/github/eslint.js +2 -26
- package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/github/index.js +11 -45
- package/lib/cli/lint/annotate/github/index.js.map +1 -1
- package/lib/cli/lint/annotate/github/internal.js +2 -26
- package/lib/cli/lint/annotate/github/internal.js.map +1 -1
- package/lib/cli/lint/annotate/github/prettier.js +2 -26
- package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/github/tsc.js +4 -28
- package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
- package/lib/cli/lint/annotate/index.js +6 -30
- package/lib/cli/lint/annotate/index.js.map +1 -1
- package/lib/cli/lint/autofix.js +37 -73
- package/lib/cli/lint/autofix.js.map +1 -1
- package/lib/cli/lint/eslint.js +16 -51
- package/lib/cli/lint/eslint.js.map +3 -3
- package/lib/cli/lint/external.js +19 -51
- package/lib/cli/lint/external.js.map +2 -2
- package/lib/cli/lint/index.js +26 -52
- package/lib/cli/lint/index.js.map +2 -2
- package/lib/cli/lint/internal.js +20 -52
- package/lib/cli/lint/internal.js.map +3 -3
- package/lib/cli/lint/internalLints/detectBadCodeowners.js +8 -33
- package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +12 -48
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +3 -3
- package/lib/cli/lint/internalLints/patchRenovateConfig.js +21 -55
- package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
- package/lib/cli/lint/internalLints/refreshConfigFiles.js +33 -66
- 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 +23 -56
- package/lib/cli/lint/internalLints/upgrade/index.js.map +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +4 -28
- 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 +11 -45
- 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 +6 -30
- 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 +37 -65
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +11 -46
- 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 +4 -28
- 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 +23 -59
- 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 +4 -28
- package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js +11 -46
- 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 +6 -30
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +11 -46
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +11 -46
- 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 +4 -28
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +11 -46
- 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 +29 -67
- 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 +10 -34
- 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 +11 -45
- 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 +4 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js +18 -63
- 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 +15 -50
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.d.ts +2 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js +11 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.d.ts +5 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js +72 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +17 -51
- 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 +10 -34
- 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 +10 -44
- 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 +12 -46
- 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 +4 -28
- 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 +15 -49
- 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 +11 -45
- 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 +10 -39
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +11 -45
- 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 +11 -45
- 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 +13 -47
- 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 +4 -28
- 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 +11 -45
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +4 -28
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +8 -32
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +1 -1
- package/lib/cli/lint/prettier.js +15 -50
- package/lib/cli/lint/prettier.js.map +3 -3
- package/lib/cli/lint/tsc.js +4 -28
- package/lib/cli/lint/tsc.js.map +1 -1
- package/lib/cli/lint/types.js +0 -16
- package/lib/cli/lint/types.js.map +3 -3
- package/lib/cli/migrate/index.js +10 -34
- package/lib/cli/migrate/index.js.map +1 -1
- package/lib/cli/migrate/nodeVersion/checks.js +24 -61
- package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
- package/lib/cli/migrate/nodeVersion/index.js +25 -55
- package/lib/cli/migrate/nodeVersion/index.js.map +2 -2
- package/lib/cli/node/index.js +20 -57
- package/lib/cli/node/index.js.map +3 -3
- package/lib/cli/release/index.js +4 -28
- package/lib/cli/release/index.js.map +1 -1
- package/lib/cli/start/index.js +16 -50
- package/lib/cli/start/index.js.map +3 -3
- package/lib/cli/test/index.js +4 -44
- package/lib/cli/test/index.js.map +2 -2
- package/lib/cli/version/index.js +6 -30
- package/lib/cli/version/index.js.map +1 -1
- package/lib/eslint.d.js +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +6 -46
- package/lib/index.js.map +2 -2
- package/lib/skuba.js +26 -45
- package/lib/skuba.js.map +3 -3
- package/lib/utils/args.js +6 -43
- package/lib/utils/args.js.map +2 -2
- package/lib/utils/command.js +4 -42
- package/lib/utils/command.js.map +3 -3
- package/lib/utils/copy.js +20 -57
- package/lib/utils/copy.js.map +2 -2
- package/lib/utils/dir.js +32 -72
- package/lib/utils/dir.js.map +2 -2
- package/lib/utils/env.js +2 -26
- package/lib/utils/env.js.map +1 -1
- package/lib/utils/error.js +10 -47
- package/lib/utils/error.js.map +1 -1
- package/lib/utils/exec.d.ts +3 -2
- package/lib/utils/exec.js +24 -62
- package/lib/utils/exec.js.map +3 -3
- package/lib/utils/fs.js +6 -40
- package/lib/utils/fs.js.map +3 -3
- package/lib/utils/help.js +6 -30
- package/lib/utils/help.js.map +1 -1
- package/lib/utils/logging.d.ts +9 -10
- package/lib/utils/logging.js +11 -48
- package/lib/utils/logging.js.map +3 -3
- package/lib/utils/logo.js +28 -59
- package/lib/utils/logo.js.map +3 -3
- package/lib/utils/manifest.d.ts +3 -2
- package/lib/utils/manifest.js +8 -48
- package/lib/utils/manifest.js.map +3 -3
- package/lib/utils/npmrc.js +2 -26
- package/lib/utils/npmrc.js.map +1 -1
- package/lib/utils/packageManager.js +12 -49
- package/lib/utils/packageManager.js.map +2 -2
- package/lib/utils/port.js +4 -39
- package/lib/utils/port.js.map +2 -2
- package/lib/utils/sleep.js +2 -26
- package/lib/utils/sleep.js.map +1 -1
- package/lib/utils/template.js +18 -55
- package/lib/utils/template.js.map +3 -3
- package/lib/utils/validation.js +2 -31
- package/lib/utils/validation.js.map +1 -1
- package/lib/utils/version.js +9 -46
- package/lib/utils/version.js.map +2 -2
- package/lib/utils/wait.js +7 -32
- package/lib/utils/wait.js.map +1 -1
- package/lib/utils/worker.d.ts +3 -3
- package/lib/utils/worker.js +10 -35
- package/lib/utils/worker.js.map +1 -1
- package/lib/wrapper/function-arguments.d.js +0 -1
- package/lib/wrapper/functionHandler.js +18 -49
- package/lib/wrapper/functionHandler.js.map +2 -2
- package/lib/wrapper/http.d.ts +0 -6
- package/lib/wrapper/http.js +8 -51
- package/lib/wrapper/http.js.map +3 -3
- package/lib/wrapper/index.js +6 -7
- package/lib/wrapper/index.js.map +1 -1
- package/lib/wrapper/main.js +8 -42
- package/lib/wrapper/main.js.map +3 -3
- package/lib/wrapper/requestListener.js +13 -46
- package/lib/wrapper/requestListener.js.map +3 -3
- package/lib/wrapper/server.d.ts +7 -0
- package/lib/wrapper/server.js +11 -0
- package/lib/wrapper/server.js.map +7 -0
- package/package.json +17 -24
- package/template/base/_.prettierrc.js +1 -1
- package/template/base/_eslint.config.js +1 -1
- package/template/base/_pnpm-workspace.yaml +3 -2
- package/template/base/vitest.config.ts +25 -0
- package/template/express-rest-api/package.json +2 -1
- package/template/express-rest-api/skuba.template.js +1 -1
- package/template/express-rest-api/src/app.test.ts +1 -0
- package/template/greeter/package.json +4 -3
- package/template/greeter/skuba.template.js +1 -1
- package/template/greeter/src/app.test.ts +3 -1
- package/template/koa-rest-api/package.json +2 -1
- package/template/koa-rest-api/skuba.template.js +1 -1
- package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +2 -0
- package/template/koa-rest-api/src/api/jobs/postJob.test.ts +2 -0
- package/template/koa-rest-api/src/app.test.ts +2 -0
- package/template/koa-rest-api/src/framework/server.test.ts +2 -2
- package/template/koa-rest-api/src/framework/validation.test.ts +2 -0
- package/template/koa-rest-api/src/testing/metrics.ts +2 -0
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +15 -3
- package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +11 -9
- package/template/lambda-sqs-worker-cdk/package.json +6 -5
- package/template/lambda-sqs-worker-cdk/skuba.template.js +1 -1
- package/template/lambda-sqs-worker-cdk/src/app.test.ts +22 -13
- package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +1 -0
- package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +33 -31
- package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +8 -2
- package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +3 -2
- package/template/lambda-sqs-worker-cdk/src/testing/services.ts +4 -3
- package/template/oss-npm-package/_package.json +1 -0
- package/template/oss-npm-package/skuba.template.js +1 -1
- package/template/oss-npm-package/src/index.test.ts +2 -0
- package/template/private-npm-package/_package.json +1 -0
- package/template/private-npm-package/skuba.template.js +1 -1
- package/template/private-npm-package/src/index.test.ts +2 -0
- package/config/jest.js +0 -1
- package/jest/moduleNameMapper.js +0 -64
- package/jest/transform.js +0 -62
- package/jest/tsConfig.js +0 -26
- package/jest-preset.js +0 -37
- package/lib/api/jest/index.d.ts +0 -15
- package/lib/api/jest/index.js +0 -59
- package/lib/api/jest/index.js.map +0 -7
- package/lib/cli/configure/modules/jest.d.ts +0 -2
- package/lib/cli/configure/modules/jest.js +0 -86
- package/lib/cli/configure/modules/jest.js.map +0 -7
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.d.ts +0 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js +0 -144
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js.map +0 -7
- package/lib/cli/test/reporters/github/annotations.d.ts +0 -9
- package/lib/cli/test/reporters/github/annotations.js +0 -102
- package/lib/cli/test/reporters/github/annotations.js.map +0 -7
- package/lib/cli/test/reporters/github/index.d.ts +0 -5
- package/lib/cli/test/reporters/github/index.js +0 -74
- package/lib/cli/test/reporters/github/index.js.map +0 -7
- package/template/base/jest.config.ts +0 -19
- package/template/base/jest.setup.ts +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/build/assets.ts"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import { styleText } from 'node:util';\nimport path from 'path';\n\nimport fs from 'fs-extra';\n\nimport { copyFile } from '../../utils/copy.js';\nimport { buildPatternToFilepathMap, crawlDirectory } from '../../utils/dir.js';\nimport { type Logger, createLogger, log } from '../../utils/logging.js';\nimport {\n getEntryPointFromManifest,\n getManifestProperties,\n} from '../../utils/manifest.js';\n\ntype StyleColor = Parameters<typeof styleText>[0];\n\nexport const copyAssets = async (\n destinationDir: string,\n logger: Logger = log,\n) => {\n const manifest = await getManifestProperties<string, string[]>('assets');\n\n if (!manifest?.value) {\n return;\n }\n\n const entryPoint = await getEntryPointFromManifest();\n if (!entryPoint) {\n return;\n }\n\n const pathSegments = entryPoint.split(path.sep);\n const srcDir = (pathSegments.length > 1 && pathSegments[0]) || '';\n const resolvedSrcDir = path.resolve(path.dirname(manifest.path), srcDir);\n const resolvedDestinationDir = path.resolve(\n path.dirname(manifest.path),\n destinationDir,\n );\n\n const allFiles = await crawlDirectory(resolvedSrcDir);\n const filesByPattern = buildPatternToFilepathMap(manifest.value, allFiles, {\n cwd: resolvedSrcDir,\n dot: true,\n });\n const matchedFiles = Array.from(\n new Set(Object.values(filesByPattern).flat()),\n );\n\n await Promise.all(\n matchedFiles.map(async (filename) => {\n logger.subtle(`Copying ${filename}`);\n\n await fs.promises.mkdir(\n path.dirname(path.join(resolvedDestinationDir, filename)),\n { recursive: true },\n );\n await copyFile(\n path.join(resolvedSrcDir, filename),\n path.join(resolvedDestinationDir, filename),\n { processors: [] },\n );\n }),\n );\n};\n\ninterface CopyAssetsConfig {\n outDir: string;\n name: string;\n prefixColor: StyleColor;\n}\n\nexport const copyAssetsConcurrently = async (configs: CopyAssetsConfig[]) => {\n const maxNameLength = configs.reduce(\n (length, command) => Math.max(length, command.name.length),\n 0,\n );\n\n await Promise.all(\n configs.map(async ({ outDir, name, prefixColor }) =>\n copyAssets(\n outDir,\n createLogger({\n debug: false,\n prefixes: [styleText(prefixColor, `${name.padEnd(maxNameLength)} \u2502`)],\n }),\n ),\n ),\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,iBAAiB;AAC1B,OAAO,UAAU;AAEjB,OAAO,QAAQ;AAEf,SAAS,gBAAgB;AACzB,SAAS,2BAA2B,sBAAsB;AAC1D,SAAsB,cAAc,WAAW;AAC/C;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAIA,MAAM,aAAa,OACxB,gBACA,SAAiB,QACd;AACH,QAAM,WAAW,MAAM,sBAAwC,QAAQ;AAEvE,MAAI,CAAC,UAAU,OAAO;AACpB;AAAA,EACF;AAEA,QAAM,aAAa,MAAM,0BAA0B;AACnD,MAAI,CAAC,YAAY;AACf;AAAA,EACF;AAEA,QAAM,eAAe,WAAW,MAAM,KAAK,GAAG;AAC9C,QAAM,SAAU,aAAa,SAAS,KAAK,aAAa,CAAC,KAAM;AAC/D,QAAM,iBAAiB,KAAK,QAAQ,KAAK,QAAQ,SAAS,IAAI,GAAG,MAAM;AACvE,QAAM,yBAAyB,KAAK;AAAA,IAClC,KAAK,QAAQ,SAAS,IAAI;AAAA,IAC1B;AAAA,EACF;AAEA,QAAM,WAAW,MAAM,eAAe,cAAc;AACpD,QAAM,iBAAiB,0BAA0B,SAAS,OAAO,UAAU;AAAA,IACzE,KAAK;AAAA,IACL,KAAK;AAAA,EACP,CAAC;AACD,QAAM,eAAe,MAAM;AAAA,IACzB,IAAI,IAAI,OAAO,OAAO,cAAc,EAAE,KAAK,CAAC;AAAA,EAC9C;AAEA,QAAM,QAAQ;AAAA,IACZ,aAAa,IAAI,OAAO,aAAa;AACnC,aAAO,OAAO,WAAW,QAAQ,EAAE;AAEnC,YAAM,GAAG,SAAS;AAAA,QAChB,KAAK,QAAQ,KAAK,KAAK,wBAAwB,QAAQ,CAAC;AAAA,QACxD,EAAE,WAAW,KAAK;AAAA,MACpB;AACA,YAAM;AAAA,QACJ,KAAK,KAAK,gBAAgB,QAAQ;AAAA,QAClC,KAAK,KAAK,wBAAwB,QAAQ;AAAA,QAC1C,EAAE,YAAY,CAAC,EAAE;AAAA,MACnB;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAQO,MAAM,yBAAyB,OAAO,YAAgC;AAC3E,QAAM,gBAAgB,QAAQ;AAAA,IAC5B,CAAC,QAAQ,YAAY,KAAK,IAAI,QAAQ,QAAQ,KAAK,MAAM;AAAA,IACzD;AAAA,EACF;AAEA,QAAM,QAAQ;AAAA,IACZ,QAAQ;AAAA,MAAI,OAAO,EAAE,QAAQ,MAAM,YAAY,MAC7C;AAAA,QACE;AAAA,QACA,aAAa;AAAA,UACX,OAAO;AAAA,UACP,UAAU,CAAC,UAAU,aAAa,GAAG,KAAK,OAAO,aAAa,CAAC,SAAI,CAAC;AAAA,QACtE,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/lib/cli/build/esbuild.js
CHANGED
|
@@ -1,37 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 esbuild_exports = {};
|
|
20
|
-
__export(esbuild_exports, {
|
|
21
|
-
esbuild: () => esbuild
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(esbuild_exports);
|
|
24
|
-
var import_util = require("util");
|
|
25
|
-
var import_tsconfig_paths = require("@esbuild-plugins/tsconfig-paths");
|
|
26
|
-
var import_esbuild = require("esbuild");
|
|
27
|
-
var import_typescript = require("typescript");
|
|
28
|
-
var import_logging = require("../../utils/logging.js");
|
|
29
|
-
var import_args = require("./args.js");
|
|
30
|
-
var import_tsc = require("./tsc.js");
|
|
1
|
+
import { inspect } from "util";
|
|
2
|
+
import { TsconfigPathsPlugin } from "@esbuild-plugins/tsconfig-paths";
|
|
3
|
+
import { build } from "esbuild";
|
|
4
|
+
import { ModuleKind, ModuleResolutionKind, ScriptTarget } from "typescript";
|
|
5
|
+
import { createLogger } from "../../utils/logging.js";
|
|
6
|
+
import { parseTscArgs } from "./args.js";
|
|
7
|
+
import { getCustomConditions, readTsBuildConfig, tsc } from "./tsc.js";
|
|
31
8
|
const esbuild = async ({ debug, type }, args = process.argv.slice(2)) => {
|
|
32
|
-
const log =
|
|
33
|
-
const tscArgs =
|
|
34
|
-
const customConditions =
|
|
9
|
+
const log = createLogger({ debug });
|
|
10
|
+
const tscArgs = parseTscArgs(args);
|
|
11
|
+
const customConditions = getCustomConditions();
|
|
35
12
|
if (tscArgs.build) {
|
|
36
13
|
log.err(
|
|
37
14
|
"skuba does not currently support the tsc --build flag with esbuild"
|
|
@@ -39,7 +16,7 @@ const esbuild = async ({ debug, type }, args = process.argv.slice(2)) => {
|
|
|
39
16
|
process.exitCode = 1;
|
|
40
17
|
return;
|
|
41
18
|
}
|
|
42
|
-
const parsedCommandLine =
|
|
19
|
+
const parsedCommandLine = readTsBuildConfig(args, log);
|
|
43
20
|
if (!parsedCommandLine || process.exitCode) {
|
|
44
21
|
return;
|
|
45
22
|
}
|
|
@@ -47,22 +24,22 @@ const esbuild = async ({ debug, type }, args = process.argv.slice(2)) => {
|
|
|
47
24
|
log.debug(log.bold("Files"));
|
|
48
25
|
entryPoints.forEach((filepath) => log.debug(filepath));
|
|
49
26
|
log.debug(log.bold("Compiler options"));
|
|
50
|
-
log.debug(
|
|
27
|
+
log.debug(inspect(compilerOptions));
|
|
51
28
|
const start = process.hrtime.bigint();
|
|
52
29
|
const bundle = false;
|
|
53
|
-
const isEsm = compilerOptions.module !==
|
|
54
|
-
await
|
|
30
|
+
const isEsm = compilerOptions.module !== ModuleKind.CommonJS && type === "module";
|
|
31
|
+
await build({
|
|
55
32
|
bundle,
|
|
56
33
|
entryPoints,
|
|
57
|
-
format:
|
|
34
|
+
format: isEsm ? "esm" : "cjs",
|
|
58
35
|
outdir: compilerOptions.outDir,
|
|
59
36
|
logLevel: debug ? "debug" : "info",
|
|
60
37
|
logLimit: 0,
|
|
61
|
-
platform: compilerOptions.moduleResolution ===
|
|
38
|
+
platform: compilerOptions.moduleResolution === ModuleResolutionKind.NodeJs || compilerOptions.moduleResolution === ModuleResolutionKind.Node16 ? "node" : void 0,
|
|
62
39
|
plugins: bundle ? [] : [
|
|
63
40
|
// evanw/esbuild#394
|
|
64
41
|
// eslint-disable-next-line new-cap
|
|
65
|
-
|
|
42
|
+
TsconfigPathsPlugin({
|
|
66
43
|
tsconfig: { baseUrl: compilerOptions.baseUrl, compilerOptions }
|
|
67
44
|
})
|
|
68
45
|
],
|
|
@@ -71,22 +48,21 @@ const esbuild = async ({ debug, type }, args = process.argv.slice(2)) => {
|
|
|
71
48
|
// avoid ambiguity where multiple `tsconfig.json`s are involved in a build.
|
|
72
49
|
// This would be unusual for a typical SEEK project but we can still explore
|
|
73
50
|
// an explicit setting once we implement `skuba.config.ts` (#1167).
|
|
74
|
-
target: compilerOptions.target ?
|
|
51
|
+
target: compilerOptions.target ? ScriptTarget[compilerOptions.target].toLocaleLowerCase() : void 0,
|
|
75
52
|
tsconfig: tscArgs.pathname,
|
|
76
53
|
conditions: customConditions?.length ? customConditions : void 0
|
|
77
54
|
});
|
|
78
55
|
const end = process.hrtime.bigint();
|
|
79
56
|
log.plain(`Built in ${log.timing(start, end)}.`);
|
|
80
57
|
if (compilerOptions.declaration) {
|
|
81
|
-
await
|
|
58
|
+
await tsc([
|
|
82
59
|
"--declaration",
|
|
83
60
|
"--emitDeclarationOnly",
|
|
84
61
|
...tscArgs.project ? ["--project", tscArgs.project] : []
|
|
85
62
|
]);
|
|
86
63
|
}
|
|
87
64
|
};
|
|
88
|
-
|
|
89
|
-
0 && (module.exports = {
|
|
65
|
+
export {
|
|
90
66
|
esbuild
|
|
91
|
-
}
|
|
67
|
+
};
|
|
92
68
|
//# sourceMappingURL=esbuild.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/build/esbuild.ts"],
|
|
4
|
-
"sourcesContent": ["import { inspect } from 'util';\n\nimport { TsconfigPathsPlugin } from '@esbuild-plugins/tsconfig-paths';\nimport { build } from 'esbuild';\nimport { ModuleKind, ModuleResolutionKind, ScriptTarget } from 'typescript';\n\nimport { createLogger } from '../../utils/logging.js';\n\nimport { parseTscArgs } from './args.js';\nimport { getCustomConditions, readTsBuildConfig, tsc } from './tsc.js';\n\ninterface EsbuildParameters {\n debug: boolean;\n type: string | undefined;\n}\n\nexport const esbuild = async (\n { debug, type }: EsbuildParameters,\n args = process.argv.slice(2),\n) => {\n const log = createLogger({ debug });\n\n const tscArgs = parseTscArgs(args);\n\n const customConditions = getCustomConditions();\n\n if (tscArgs.build) {\n log.err(\n 'skuba does not currently support the tsc --build flag with esbuild',\n );\n process.exitCode = 1;\n return;\n }\n\n const parsedCommandLine = readTsBuildConfig(args, log);\n\n if (!parsedCommandLine || process.exitCode) {\n return;\n }\n\n const { fileNames: entryPoints, options: compilerOptions } =\n parsedCommandLine;\n\n log.debug(log.bold('Files'));\n entryPoints.forEach((filepath) => log.debug(filepath));\n\n log.debug(log.bold('Compiler options'));\n log.debug(inspect(compilerOptions));\n\n const start = process.hrtime.bigint();\n\n // TODO: support `bundle`, `minify`, `splitting`, `treeShaking`\n const bundle = false;\n\n const isEsm =\n compilerOptions.module !== ModuleKind.CommonJS && type === 'module';\n\n await build({\n bundle,\n entryPoints,\n format:
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { inspect } from 'util';\n\nimport { TsconfigPathsPlugin } from '@esbuild-plugins/tsconfig-paths';\nimport { build } from 'esbuild';\nimport { ModuleKind, ModuleResolutionKind, ScriptTarget } from 'typescript';\n\nimport { createLogger } from '../../utils/logging.js';\n\nimport { parseTscArgs } from './args.js';\nimport { getCustomConditions, readTsBuildConfig, tsc } from './tsc.js';\n\ninterface EsbuildParameters {\n debug: boolean;\n type: string | undefined;\n}\n\nexport const esbuild = async (\n { debug, type }: EsbuildParameters,\n args = process.argv.slice(2),\n) => {\n const log = createLogger({ debug });\n\n const tscArgs = parseTscArgs(args);\n\n const customConditions = getCustomConditions();\n\n if (tscArgs.build) {\n log.err(\n 'skuba does not currently support the tsc --build flag with esbuild',\n );\n process.exitCode = 1;\n return;\n }\n\n const parsedCommandLine = readTsBuildConfig(args, log);\n\n if (!parsedCommandLine || process.exitCode) {\n return;\n }\n\n const { fileNames: entryPoints, options: compilerOptions } =\n parsedCommandLine;\n\n log.debug(log.bold('Files'));\n entryPoints.forEach((filepath) => log.debug(filepath));\n\n log.debug(log.bold('Compiler options'));\n log.debug(inspect(compilerOptions));\n\n const start = process.hrtime.bigint();\n\n // TODO: support `bundle`, `minify`, `splitting`, `treeShaking`\n const bundle = false;\n\n const isEsm =\n compilerOptions.module !== ModuleKind.CommonJS && type === 'module';\n\n await build({\n bundle,\n entryPoints,\n format: isEsm ? 'esm' : 'cjs',\n outdir: compilerOptions.outDir,\n logLevel: debug ? 'debug' : 'info',\n logLimit: 0,\n platform:\n compilerOptions.moduleResolution === ModuleResolutionKind.NodeJs ||\n compilerOptions.moduleResolution === ModuleResolutionKind.Node16\n ? 'node'\n : undefined,\n plugins: bundle\n ? []\n : [\n // evanw/esbuild#394\n // eslint-disable-next-line new-cap\n TsconfigPathsPlugin({\n tsconfig: { baseUrl: compilerOptions.baseUrl, compilerOptions },\n }),\n ],\n sourcemap: compilerOptions.sourceMap,\n // TODO: as of 0.18, the esbuild CLI no longer infers the target property to\n // avoid ambiguity where multiple `tsconfig.json`s are involved in a build.\n // This would be unusual for a typical SEEK project but we can still explore\n // an explicit setting once we implement `skuba.config.ts` (#1167).\n target: compilerOptions.target\n ? ScriptTarget[compilerOptions.target].toLocaleLowerCase()\n : undefined,\n tsconfig: tscArgs.pathname,\n conditions: customConditions?.length ? customConditions : undefined,\n });\n\n const end = process.hrtime.bigint();\n\n log.plain(`Built in ${log.timing(start, end)}.`);\n\n if (compilerOptions.declaration) {\n await tsc([\n '--declaration',\n '--emitDeclarationOnly',\n ...(tscArgs.project ? ['--project', tscArgs.project] : []),\n ]);\n }\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,eAAe;AAExB,SAAS,2BAA2B;AACpC,SAAS,aAAa;AACtB,SAAS,YAAY,sBAAsB,oBAAoB;AAE/D,SAAS,oBAAoB;AAE7B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB,mBAAmB,WAAW;AAOrD,MAAM,UAAU,OACrB,EAAE,OAAO,KAAK,GACd,OAAO,QAAQ,KAAK,MAAM,CAAC,MACxB;AACH,QAAM,MAAM,aAAa,EAAE,MAAM,CAAC;AAElC,QAAM,UAAU,aAAa,IAAI;AAEjC,QAAM,mBAAmB,oBAAoB;AAE7C,MAAI,QAAQ,OAAO;AACjB,QAAI;AAAA,MACF;AAAA,IACF;AACA,YAAQ,WAAW;AACnB;AAAA,EACF;AAEA,QAAM,oBAAoB,kBAAkB,MAAM,GAAG;AAErD,MAAI,CAAC,qBAAqB,QAAQ,UAAU;AAC1C;AAAA,EACF;AAEA,QAAM,EAAE,WAAW,aAAa,SAAS,gBAAgB,IACvD;AAEF,MAAI,MAAM,IAAI,KAAK,OAAO,CAAC;AAC3B,cAAY,QAAQ,CAAC,aAAa,IAAI,MAAM,QAAQ,CAAC;AAErD,MAAI,MAAM,IAAI,KAAK,kBAAkB,CAAC;AACtC,MAAI,MAAM,QAAQ,eAAe,CAAC;AAElC,QAAM,QAAQ,QAAQ,OAAO,OAAO;AAGpC,QAAM,SAAS;AAEf,QAAM,QACJ,gBAAgB,WAAW,WAAW,YAAY,SAAS;AAE7D,QAAM,MAAM;AAAA,IACV;AAAA,IACA;AAAA,IACA,QAAQ,QAAQ,QAAQ;AAAA,IACxB,QAAQ,gBAAgB;AAAA,IACxB,UAAU,QAAQ,UAAU;AAAA,IAC5B,UAAU;AAAA,IACV,UACE,gBAAgB,qBAAqB,qBAAqB,UAC1D,gBAAgB,qBAAqB,qBAAqB,SACtD,SACA;AAAA,IACN,SAAS,SACL,CAAC,IACD;AAAA;AAAA;AAAA,MAGE,oBAAoB;AAAA,QAClB,UAAU,EAAE,SAAS,gBAAgB,SAAS,gBAAgB;AAAA,MAChE,CAAC;AAAA,IACH;AAAA,IACJ,WAAW,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,IAK3B,QAAQ,gBAAgB,SACpB,aAAa,gBAAgB,MAAM,EAAE,kBAAkB,IACvD;AAAA,IACJ,UAAU,QAAQ;AAAA,IAClB,YAAY,kBAAkB,SAAS,mBAAmB;AAAA,EAC5D,CAAC;AAED,QAAM,MAAM,QAAQ,OAAO,OAAO;AAElC,MAAI,MAAM,YAAY,IAAI,OAAO,OAAO,GAAG,CAAC,GAAG;AAE/C,MAAI,gBAAgB,aAAa;AAC/B,UAAM,IAAI;AAAA,MACR;AAAA,MACA;AAAA,MACA,GAAI,QAAQ,UAAU,CAAC,aAAa,QAAQ,OAAO,IAAI,CAAC;AAAA,IAC1D,CAAC;AAAA,EACH;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/lib/cli/build/index.js
CHANGED
|
@@ -1,67 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 build_exports = {};
|
|
30
|
-
__export(build_exports, {
|
|
31
|
-
build: () => build
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(build_exports);
|
|
34
|
-
var import_chalk = __toESM(require("chalk"));
|
|
35
|
-
var import_args = require("../../utils/args.js");
|
|
36
|
-
var import_logging = require("../../utils/logging.js");
|
|
37
|
-
var import_manifest = require("../../utils/manifest.js");
|
|
38
|
-
var import_assets = require("./assets.js");
|
|
39
|
-
var import_esbuild = require("./esbuild.js");
|
|
40
|
-
var import_tsc = require("./tsc.js");
|
|
1
|
+
import { styleText } from "node:util";
|
|
2
|
+
import { hasDebugFlag } from "../../utils/args.js";
|
|
3
|
+
import { log } from "../../utils/logging.js";
|
|
4
|
+
import { getManifestProperties } from "../../utils/manifest.js";
|
|
5
|
+
import { copyAssets } from "./assets.js";
|
|
6
|
+
import { esbuild } from "./esbuild.js";
|
|
7
|
+
import { readTsBuildConfig, tsc } from "./tsc.js";
|
|
41
8
|
const build = async (args = process.argv.slice(2)) => {
|
|
42
|
-
const manifest = await
|
|
9
|
+
const manifest = await getManifestProperties("build");
|
|
43
10
|
switch (manifest?.value) {
|
|
44
11
|
case "esbuild": {
|
|
45
|
-
const debug =
|
|
46
|
-
|
|
47
|
-
await
|
|
12
|
+
const debug = hasDebugFlag(args);
|
|
13
|
+
log.plain(styleText("yellow", "esbuild"));
|
|
14
|
+
await esbuild({ debug, type: manifest.type }, args);
|
|
48
15
|
break;
|
|
49
16
|
}
|
|
50
17
|
// TODO: flip the default case over to `esbuild` in skuba vNext.
|
|
51
18
|
case void 0:
|
|
52
19
|
case "tsc": {
|
|
53
|
-
|
|
54
|
-
await
|
|
20
|
+
log.plain(styleText("blue", "tsc"));
|
|
21
|
+
await tsc(args);
|
|
55
22
|
break;
|
|
56
23
|
}
|
|
57
24
|
default: {
|
|
58
|
-
|
|
25
|
+
log.err(
|
|
59
26
|
"We don\u2019t support the build tool specified in your",
|
|
60
|
-
|
|
27
|
+
log.bold("package.json"),
|
|
61
28
|
"yet:"
|
|
62
29
|
);
|
|
63
|
-
|
|
64
|
-
|
|
30
|
+
log.err(
|
|
31
|
+
log.subtle(
|
|
65
32
|
JSON.stringify({ skuba: { build: manifest?.value } }, null, 2)
|
|
66
33
|
)
|
|
67
34
|
);
|
|
@@ -69,7 +36,7 @@ const build = async (args = process.argv.slice(2)) => {
|
|
|
69
36
|
return;
|
|
70
37
|
}
|
|
71
38
|
}
|
|
72
|
-
const parsedCommandLine =
|
|
39
|
+
const parsedCommandLine = readTsBuildConfig(args, log);
|
|
73
40
|
if (!parsedCommandLine || process.exitCode) {
|
|
74
41
|
return;
|
|
75
42
|
}
|
|
@@ -77,10 +44,9 @@ const build = async (args = process.argv.slice(2)) => {
|
|
|
77
44
|
if (!compilerOptions.outDir) {
|
|
78
45
|
return;
|
|
79
46
|
}
|
|
80
|
-
await
|
|
47
|
+
await copyAssets(compilerOptions.outDir);
|
|
81
48
|
};
|
|
82
|
-
|
|
83
|
-
0 && (module.exports = {
|
|
49
|
+
export {
|
|
84
50
|
build
|
|
85
|
-
}
|
|
51
|
+
};
|
|
86
52
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/build/index.ts"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import { styleText } from 'node:util';\n\nimport { hasDebugFlag } from '../../utils/args.js';\nimport { log } from '../../utils/logging.js';\nimport { getManifestProperties } from '../../utils/manifest.js';\n\nimport { copyAssets } from './assets.js';\nimport { esbuild } from './esbuild.js';\nimport { readTsBuildConfig, tsc } from './tsc.js';\n\nexport const build = async (args = process.argv.slice(2)) => {\n // TODO: define a unified `package.json#/skuba` schema and parser so we don't\n // need all these messy lookups.\n const manifest = await getManifestProperties('build');\n\n switch (manifest?.value) {\n case 'esbuild': {\n const debug = hasDebugFlag(args);\n\n log.plain(styleText('yellow', 'esbuild'));\n await esbuild({ debug, type: manifest.type }, args);\n break;\n }\n\n // TODO: flip the default case over to `esbuild` in skuba vNext.\n case undefined:\n case 'tsc': {\n log.plain(styleText('blue', 'tsc'));\n await tsc(args);\n break;\n }\n\n default: {\n log.err(\n 'We don\u2019t support the build tool specified in your',\n log.bold('package.json'),\n 'yet:',\n );\n log.err(\n log.subtle(\n JSON.stringify({ skuba: { build: manifest?.value } }, null, 2),\n ),\n );\n process.exitCode = 1;\n return;\n }\n }\n\n const parsedCommandLine = readTsBuildConfig(args, log);\n\n if (!parsedCommandLine || process.exitCode) {\n return;\n }\n\n const { options: compilerOptions } = parsedCommandLine;\n\n if (!compilerOptions.outDir) {\n return;\n }\n\n await copyAssets(compilerOptions.outDir);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,iBAAiB;AAE1B,SAAS,oBAAoB;AAC7B,SAAS,WAAW;AACpB,SAAS,6BAA6B;AAEtC,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AACxB,SAAS,mBAAmB,WAAW;AAEhC,MAAM,QAAQ,OAAO,OAAO,QAAQ,KAAK,MAAM,CAAC,MAAM;AAG3D,QAAM,WAAW,MAAM,sBAAsB,OAAO;AAEpD,UAAQ,UAAU,OAAO;AAAA,IACvB,KAAK,WAAW;AACd,YAAM,QAAQ,aAAa,IAAI;AAE/B,UAAI,MAAM,UAAU,UAAU,SAAS,CAAC;AACxC,YAAM,QAAQ,EAAE,OAAO,MAAM,SAAS,KAAK,GAAG,IAAI;AAClD;AAAA,IACF;AAAA;AAAA,IAGA,KAAK;AAAA,IACL,KAAK,OAAO;AACV,UAAI,MAAM,UAAU,QAAQ,KAAK,CAAC;AAClC,YAAM,IAAI,IAAI;AACd;AAAA,IACF;AAAA,IAEA,SAAS;AACP,UAAI;AAAA,QACF;AAAA,QACA,IAAI,KAAK,cAAc;AAAA,QACvB;AAAA,MACF;AACA,UAAI;AAAA,QACF,IAAI;AAAA,UACF,KAAK,UAAU,EAAE,OAAO,EAAE,OAAO,UAAU,MAAM,EAAE,GAAG,MAAM,CAAC;AAAA,QAC/D;AAAA,MACF;AACA,cAAQ,WAAW;AACnB;AAAA,IACF;AAAA,EACF;AAEA,QAAM,oBAAoB,kBAAkB,MAAM,GAAG;AAErD,MAAI,CAAC,qBAAqB,QAAQ,UAAU;AAC1C;AAAA,EACF;AAEA,QAAM,EAAE,SAAS,gBAAgB,IAAI;AAErC,MAAI,CAAC,gBAAgB,QAAQ;AAC3B;AAAA,EACF;AAEA,QAAM,WAAW,gBAAgB,MAAM;AACzC;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/lib/cli/build/tsc.js
CHANGED
|
@@ -1,62 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var tsc_exports = {};
|
|
30
|
-
__export(tsc_exports, {
|
|
31
|
-
getCustomConditions: () => getCustomConditions,
|
|
32
|
-
readTsBuildConfig: () => readTsBuildConfig,
|
|
33
|
-
readTsConfig: () => readTsConfig,
|
|
34
|
-
tsc: () => tsc
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(tsc_exports);
|
|
37
|
-
var import_path = __toESM(require("path"));
|
|
38
|
-
var import_typescript = __toESM(require("typescript"));
|
|
39
|
-
var import_exec = require("../../utils/exec.js");
|
|
40
|
-
var import_logging = require("../../utils/logging.js");
|
|
41
|
-
var import_args = require("./args.js");
|
|
1
|
+
import path from "path";
|
|
2
|
+
import ts from "typescript";
|
|
3
|
+
import { exec } from "../../utils/exec.js";
|
|
4
|
+
import { log as logger } from "../../utils/logging.js";
|
|
5
|
+
import { parseTscArgs } from "./args.js";
|
|
42
6
|
const DEFAULT_ARGS = ["--project", "tsconfig.build.json"];
|
|
43
7
|
const formatHost = {
|
|
44
8
|
getCanonicalFileName: (fileName) => fileName,
|
|
45
|
-
getCurrentDirectory:
|
|
46
|
-
getNewLine: () =>
|
|
9
|
+
getCurrentDirectory: ts.sys.getCurrentDirectory.bind(void 0),
|
|
10
|
+
getNewLine: () => ts.sys.newLine
|
|
47
11
|
};
|
|
48
12
|
const tsconfigCache = /* @__PURE__ */ new Map();
|
|
49
13
|
const tsc = async (args = process.argv.slice(2)) => {
|
|
50
|
-
const tscArgs =
|
|
14
|
+
const tscArgs = parseTscArgs(args);
|
|
51
15
|
const defaultArgs = tscArgs.build || tscArgs.project ? [] : DEFAULT_ARGS;
|
|
52
|
-
return
|
|
16
|
+
return exec("tsc", ...defaultArgs, ...args);
|
|
53
17
|
};
|
|
54
18
|
const readTsBuildConfig = (args = process.argv.slice(2), log) => {
|
|
55
|
-
const tscArgs =
|
|
19
|
+
const tscArgs = parseTscArgs(args);
|
|
56
20
|
log.debug(
|
|
57
21
|
log.bold(
|
|
58
|
-
|
|
59
|
-
...tscArgs.project ? ["--project", tscArgs.project] : []
|
|
22
|
+
`tsconfig${tscArgs.project ? ` --project ${tscArgs.project}` : ""}`
|
|
60
23
|
)
|
|
61
24
|
);
|
|
62
25
|
log.debug(tscArgs.pathname);
|
|
@@ -67,7 +30,7 @@ const readTsBuildConfig = (args = process.argv.slice(2), log) => {
|
|
|
67
30
|
});
|
|
68
31
|
if (parsedConfig?.errors.length) {
|
|
69
32
|
log.err(`Could not parse ${tscArgs.basename}.`);
|
|
70
|
-
log.subtle(
|
|
33
|
+
log.subtle(ts.formatDiagnostics(parsedConfig.errors, formatHost));
|
|
71
34
|
process.exitCode = 1;
|
|
72
35
|
return;
|
|
73
36
|
}
|
|
@@ -79,14 +42,14 @@ const readTsConfig = ({
|
|
|
79
42
|
log,
|
|
80
43
|
silentlyFail = false
|
|
81
44
|
}) => {
|
|
82
|
-
const pathName =
|
|
45
|
+
const pathName = path.join(dir, fileName);
|
|
83
46
|
const cachedConfig = tsconfigCache.get(pathName);
|
|
84
47
|
if (cachedConfig) {
|
|
85
48
|
return cachedConfig;
|
|
86
49
|
}
|
|
87
|
-
const tsconfigFile =
|
|
50
|
+
const tsconfigFile = ts.findConfigFile(
|
|
88
51
|
dir,
|
|
89
|
-
|
|
52
|
+
ts.sys.fileExists.bind(void 0),
|
|
90
53
|
fileName
|
|
91
54
|
);
|
|
92
55
|
if (!tsconfigFile) {
|
|
@@ -96,21 +59,21 @@ const readTsConfig = ({
|
|
|
96
59
|
}
|
|
97
60
|
return;
|
|
98
61
|
}
|
|
99
|
-
const readConfigFile =
|
|
62
|
+
const readConfigFile = ts.readConfigFile(
|
|
100
63
|
tsconfigFile,
|
|
101
|
-
|
|
64
|
+
ts.sys.readFile.bind(void 0)
|
|
102
65
|
);
|
|
103
66
|
if (readConfigFile.error) {
|
|
104
67
|
if (!silentlyFail) {
|
|
105
68
|
log.err(`Could not read ${pathName}.`);
|
|
106
|
-
log.subtle(
|
|
69
|
+
log.subtle(ts.formatDiagnostic(readConfigFile.error, formatHost));
|
|
107
70
|
process.exitCode = 1;
|
|
108
71
|
}
|
|
109
72
|
return;
|
|
110
73
|
}
|
|
111
|
-
const parsedConfig =
|
|
74
|
+
const parsedConfig = ts.parseJsonConfigFileContent(
|
|
112
75
|
readConfigFile.config,
|
|
113
|
-
|
|
76
|
+
ts.sys,
|
|
114
77
|
dir
|
|
115
78
|
);
|
|
116
79
|
tsconfigCache.set(pathName, parsedConfig);
|
|
@@ -120,7 +83,7 @@ const getCustomConditions = () => {
|
|
|
120
83
|
const parsedConfig = readTsConfig({
|
|
121
84
|
dir: process.cwd(),
|
|
122
85
|
fileName: "tsconfig.json",
|
|
123
|
-
log:
|
|
86
|
+
log: logger,
|
|
124
87
|
silentlyFail: true
|
|
125
88
|
});
|
|
126
89
|
if (!parsedConfig) {
|
|
@@ -128,11 +91,10 @@ const getCustomConditions = () => {
|
|
|
128
91
|
}
|
|
129
92
|
return parsedConfig.options.customConditions ?? [];
|
|
130
93
|
};
|
|
131
|
-
|
|
132
|
-
0 && (module.exports = {
|
|
94
|
+
export {
|
|
133
95
|
getCustomConditions,
|
|
134
96
|
readTsBuildConfig,
|
|
135
97
|
readTsConfig,
|
|
136
98
|
tsc
|
|
137
|
-
}
|
|
99
|
+
};
|
|
138
100
|
//# sourceMappingURL=tsc.js.map
|
package/lib/cli/build/tsc.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/build/tsc.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\n\nimport ts from 'typescript';\n\nimport { exec } from '../../utils/exec.js';\nimport { type Logger, log as logger } from '../../utils/logging.js';\n\nimport { parseTscArgs } from './args.js';\n\nconst DEFAULT_ARGS = ['--project', 'tsconfig.build.json'] as const;\n\nconst formatHost: ts.FormatDiagnosticsHost = {\n getCanonicalFileName: (fileName) => fileName,\n getCurrentDirectory: ts.sys.getCurrentDirectory.bind(undefined),\n getNewLine: () => ts.sys.newLine,\n};\n\nconst tsconfigCache = new Map<string, ts.ParsedCommandLine>();\n\nexport const tsc = async (args = process.argv.slice(2)) => {\n const tscArgs = parseTscArgs(args);\n\n // Build flag is incompatible with project flag.\n const defaultArgs = tscArgs.build || tscArgs.project ? [] : DEFAULT_ARGS;\n\n return exec('tsc', ...defaultArgs, ...args);\n};\n\nexport const readTsBuildConfig = (\n args = process.argv.slice(2),\n log: Logger,\n) => {\n const tscArgs = parseTscArgs(args);\n\n log.debug(\n log.bold(\n
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import path from 'path';\n\nimport ts from 'typescript';\n\nimport { exec } from '../../utils/exec.js';\nimport { type Logger, log as logger } from '../../utils/logging.js';\n\nimport { parseTscArgs } from './args.js';\n\nconst DEFAULT_ARGS = ['--project', 'tsconfig.build.json'] as const;\n\nconst formatHost: ts.FormatDiagnosticsHost = {\n getCanonicalFileName: (fileName) => fileName,\n getCurrentDirectory: ts.sys.getCurrentDirectory.bind(undefined),\n getNewLine: () => ts.sys.newLine,\n};\n\nconst tsconfigCache = new Map<string, ts.ParsedCommandLine>();\n\nexport const tsc = async (args = process.argv.slice(2)) => {\n const tscArgs = parseTscArgs(args);\n\n // Build flag is incompatible with project flag.\n const defaultArgs = tscArgs.build || tscArgs.project ? [] : DEFAULT_ARGS;\n\n return exec('tsc', ...defaultArgs, ...args);\n};\n\nexport const readTsBuildConfig = (\n args = process.argv.slice(2),\n log: Logger,\n) => {\n const tscArgs = parseTscArgs(args);\n\n log.debug(\n log.bold(\n `tsconfig${tscArgs.project ? ` --project ${tscArgs.project}` : ''}`,\n ),\n );\n log.debug(tscArgs.pathname);\n\n const parsedConfig = readTsConfig({\n dir: tscArgs.dirname,\n fileName: tscArgs.basename,\n log,\n });\n\n if (parsedConfig?.errors.length) {\n log.err(`Could not parse ${tscArgs.basename}.`);\n log.subtle(ts.formatDiagnostics(parsedConfig.errors, formatHost));\n process.exitCode = 1;\n return;\n }\n\n return parsedConfig;\n};\n\nexport const readTsConfig = ({\n dir,\n fileName,\n log,\n silentlyFail = false,\n}: {\n dir: string;\n fileName: string;\n log: Logger;\n silentlyFail?: boolean;\n}) => {\n const pathName = path.join(dir, fileName);\n\n const cachedConfig = tsconfigCache.get(pathName);\n\n if (cachedConfig) {\n return cachedConfig;\n }\n\n const tsconfigFile = ts.findConfigFile(\n dir,\n ts.sys.fileExists.bind(undefined),\n fileName,\n );\n if (!tsconfigFile) {\n if (!silentlyFail) {\n log.err(`Could not find ${pathName}.`);\n process.exitCode = 1;\n }\n return;\n }\n\n const readConfigFile = ts.readConfigFile(\n tsconfigFile,\n ts.sys.readFile.bind(undefined),\n );\n if (readConfigFile.error) {\n if (!silentlyFail) {\n log.err(`Could not read ${pathName}.`);\n log.subtle(ts.formatDiagnostic(readConfigFile.error, formatHost));\n process.exitCode = 1;\n }\n return;\n }\n\n const parsedConfig = ts.parseJsonConfigFileContent(\n readConfigFile.config,\n ts.sys,\n dir,\n );\n\n tsconfigCache.set(pathName, parsedConfig);\n\n return parsedConfig;\n};\n\nexport const getCustomConditions = () => {\n const parsedConfig = readTsConfig({\n dir: process.cwd(),\n fileName: 'tsconfig.json',\n log: logger,\n silentlyFail: true,\n });\n\n if (!parsedConfig) {\n return [];\n }\n\n return parsedConfig.options.customConditions ?? [];\n};\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,UAAU;AAEjB,OAAO,QAAQ;AAEf,SAAS,YAAY;AACrB,SAAsB,OAAO,cAAc;AAE3C,SAAS,oBAAoB;AAE7B,MAAM,eAAe,CAAC,aAAa,qBAAqB;AAExD,MAAM,aAAuC;AAAA,EAC3C,sBAAsB,CAAC,aAAa;AAAA,EACpC,qBAAqB,GAAG,IAAI,oBAAoB,KAAK,MAAS;AAAA,EAC9D,YAAY,MAAM,GAAG,IAAI;AAC3B;AAEA,MAAM,gBAAgB,oBAAI,IAAkC;AAErD,MAAM,MAAM,OAAO,OAAO,QAAQ,KAAK,MAAM,CAAC,MAAM;AACzD,QAAM,UAAU,aAAa,IAAI;AAGjC,QAAM,cAAc,QAAQ,SAAS,QAAQ,UAAU,CAAC,IAAI;AAE5D,SAAO,KAAK,OAAO,GAAG,aAAa,GAAG,IAAI;AAC5C;AAEO,MAAM,oBAAoB,CAC/B,OAAO,QAAQ,KAAK,MAAM,CAAC,GAC3B,QACG;AACH,QAAM,UAAU,aAAa,IAAI;AAEjC,MAAI;AAAA,IACF,IAAI;AAAA,MACF,WAAW,QAAQ,UAAU,cAAc,QAAQ,OAAO,KAAK,EAAE;AAAA,IACnE;AAAA,EACF;AACA,MAAI,MAAM,QAAQ,QAAQ;AAE1B,QAAM,eAAe,aAAa;AAAA,IAChC,KAAK,QAAQ;AAAA,IACb,UAAU,QAAQ;AAAA,IAClB;AAAA,EACF,CAAC;AAED,MAAI,cAAc,OAAO,QAAQ;AAC/B,QAAI,IAAI,mBAAmB,QAAQ,QAAQ,GAAG;AAC9C,QAAI,OAAO,GAAG,kBAAkB,aAAa,QAAQ,UAAU,CAAC;AAChE,YAAQ,WAAW;AACnB;AAAA,EACF;AAEA,SAAO;AACT;AAEO,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AACjB,MAKM;AACJ,QAAM,WAAW,KAAK,KAAK,KAAK,QAAQ;AAExC,QAAM,eAAe,cAAc,IAAI,QAAQ;AAE/C,MAAI,cAAc;AAChB,WAAO;AAAA,EACT;AAEA,QAAM,eAAe,GAAG;AAAA,IACtB;AAAA,IACA,GAAG,IAAI,WAAW,KAAK,MAAS;AAAA,IAChC;AAAA,EACF;AACA,MAAI,CAAC,cAAc;AACjB,QAAI,CAAC,cAAc;AACjB,UAAI,IAAI,kBAAkB,QAAQ,GAAG;AACrC,cAAQ,WAAW;AAAA,IACrB;AACA;AAAA,EACF;AAEA,QAAM,iBAAiB,GAAG;AAAA,IACxB;AAAA,IACA,GAAG,IAAI,SAAS,KAAK,MAAS;AAAA,EAChC;AACA,MAAI,eAAe,OAAO;AACxB,QAAI,CAAC,cAAc;AACjB,UAAI,IAAI,kBAAkB,QAAQ,GAAG;AACrC,UAAI,OAAO,GAAG,iBAAiB,eAAe,OAAO,UAAU,CAAC;AAChE,cAAQ,WAAW;AAAA,IACrB;AACA;AAAA,EACF;AAEA,QAAM,eAAe,GAAG;AAAA,IACtB,eAAe;AAAA,IACf,GAAG;AAAA,IACH;AAAA,EACF;AAEA,gBAAc,IAAI,UAAU,YAAY;AAExC,SAAO;AACT;AAEO,MAAM,sBAAsB,MAAM;AACvC,QAAM,eAAe,aAAa;AAAA,IAChC,KAAK,QAAQ,IAAI;AAAA,IACjB,UAAU;AAAA,IACV,KAAK;AAAA,IACL,cAAc;AAAA,EAChB,CAAC;AAED,MAAI,CAAC,cAAc;AACjB,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,aAAa,QAAQ,oBAAoB,CAAC;AACnD;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,31 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var buildPackage_exports = {};
|
|
20
|
-
__export(buildPackage_exports, {
|
|
21
|
-
buildPackage: () => buildPackage
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(buildPackage_exports);
|
|
24
|
-
var import_args = require("../../utils/args.js");
|
|
25
|
-
var import_exec = require("../../utils/exec.js");
|
|
26
|
-
var import_assets = require("../build/assets.js");
|
|
1
|
+
import { hasSerialFlag } from "../../utils/args.js";
|
|
2
|
+
import { execConcurrently } from "../../utils/exec.js";
|
|
3
|
+
import { copyAssetsConcurrently } from "../build/assets.js";
|
|
27
4
|
const buildPackage = async (args = process.argv.slice(2)) => {
|
|
28
|
-
await
|
|
5
|
+
await execConcurrently(
|
|
29
6
|
[
|
|
30
7
|
{
|
|
31
8
|
command: "tsc --module CommonJS --outDir lib-commonjs --project tsconfig.build.json --moduleResolution node",
|
|
@@ -44,10 +21,10 @@ const buildPackage = async (args = process.argv.slice(2)) => {
|
|
|
44
21
|
}
|
|
45
22
|
],
|
|
46
23
|
{
|
|
47
|
-
maxProcesses:
|
|
24
|
+
maxProcesses: hasSerialFlag(args) ? 1 : void 0
|
|
48
25
|
}
|
|
49
26
|
);
|
|
50
|
-
await
|
|
27
|
+
await copyAssetsConcurrently([
|
|
51
28
|
{
|
|
52
29
|
outDir: "lib-commonjs",
|
|
53
30
|
name: "commonjs",
|
|
@@ -60,8 +37,7 @@ const buildPackage = async (args = process.argv.slice(2)) => {
|
|
|
60
37
|
}
|
|
61
38
|
]);
|
|
62
39
|
};
|
|
63
|
-
|
|
64
|
-
0 && (module.exports = {
|
|
40
|
+
export {
|
|
65
41
|
buildPackage
|
|
66
|
-
}
|
|
42
|
+
};
|
|
67
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/buildPackage/index.ts"],
|
|
4
4
|
"sourcesContent": ["import { hasSerialFlag } from '../../utils/args.js';\nimport { execConcurrently } from '../../utils/exec.js';\nimport { copyAssetsConcurrently } from '../build/assets.js';\n\nexport const buildPackage = async (args = process.argv.slice(2)) => {\n await execConcurrently(\n [\n {\n command:\n 'tsc --module CommonJS --outDir lib-commonjs --project tsconfig.build.json --moduleResolution node',\n name: 'commonjs',\n prefixColor: 'green',\n },\n {\n command:\n 'tsc --module ES2015 --outDir lib-es2015 --project tsconfig.build.json --moduleResolution node',\n name: 'es2015',\n prefixColor: 'yellow',\n },\n {\n command:\n 'tsc --allowJS false --declaration --emitDeclarationOnly --outDir lib-types --project tsconfig.build.json',\n name: 'types',\n prefixColor: 'blue',\n },\n ],\n {\n maxProcesses: hasSerialFlag(args) ? 1 : undefined,\n },\n );\n\n await copyAssetsConcurrently([\n {\n outDir: 'lib-commonjs',\n name: 'commonjs',\n prefixColor: 'green',\n },\n {\n outDir: 'lib-es2015',\n name: 'es2015',\n prefixColor: 'yellow',\n },\n ]);\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "AAAA,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AACjC,SAAS,8BAA8B;AAEhC,MAAM,eAAe,OAAO,OAAO,QAAQ,KAAK,MAAM,CAAC,MAAM;AAClE,QAAM;AAAA,IACJ;AAAA,MACE;AAAA,QACE,SACE;AAAA,QACF,MAAM;AAAA,QACN,aAAa;AAAA,MACf;AAAA,MACA;AAAA,QACE,SACE;AAAA,QACF,MAAM;AAAA,QACN,aAAa;AAAA,MACf;AAAA,MACA;AAAA,QACE,SACE;AAAA,QACF,MAAM;AAAA,QACN,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IACA;AAAA,MACE,cAAc,cAAc,IAAI,IAAI,IAAI;AAAA,IAC1C;AAAA,EACF;AAEA,QAAM,uBAAuB;AAAA,IAC3B;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,EACF,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|