skuba 0.0.0-master-20230318044948
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/LICENSE +21 -0
- package/README.md +67 -0
- package/config/eslint.js +3 -0
- package/config/jest.js +1 -0
- package/config/prettier.d.ts +3 -0
- package/config/prettier.js +5 -0
- package/config/tsconfig.json +9 -0
- package/jest/moduleNameMapper.js +58 -0
- package/jest/moduleNameMapper.test.ts +64 -0
- package/jest/transform.js +50 -0
- package/jest/transform.test.ts +11 -0
- package/jest/tsConfig.js +26 -0
- package/jest-preset.js +34 -0
- package/lib/api/buildkite/annotate.d.ts +26 -0
- package/lib/api/buildkite/annotate.js +49 -0
- package/lib/api/buildkite/annotate.js.map +7 -0
- package/lib/api/buildkite/index.d.ts +3 -0
- package/lib/api/buildkite/index.js +32 -0
- package/lib/api/buildkite/index.js.map +7 -0
- package/lib/api/buildkite/md.d.ts +6 -0
- package/lib/api/buildkite/md.js +33 -0
- package/lib/api/buildkite/md.js.map +7 -0
- package/lib/api/git/commit.d.ts +15 -0
- package/lib/api/git/commit.js +52 -0
- package/lib/api/git/commit.js.map +7 -0
- package/lib/api/git/commitAllChanges.d.ts +19 -0
- package/lib/api/git/commitAllChanges.js +65 -0
- package/lib/api/git/commitAllChanges.js.map +7 -0
- package/lib/api/git/currentBranch.d.ts +10 -0
- package/lib/api/git/currentBranch.js +58 -0
- package/lib/api/git/currentBranch.js.map +7 -0
- package/lib/api/git/getChangedFiles.d.ts +20 -0
- package/lib/api/git/getChangedFiles.js +63 -0
- package/lib/api/git/getChangedFiles.js.map +7 -0
- package/lib/api/git/index.d.ts +10 -0
- package/lib/api/git/index.js +55 -0
- package/lib/api/git/index.js.map +7 -0
- package/lib/api/git/log.d.ts +19 -0
- package/lib/api/git/log.js +71 -0
- package/lib/api/git/log.js.map +7 -0
- package/lib/api/git/pull.d.ts +35 -0
- package/lib/api/git/pull.js +69 -0
- package/lib/api/git/pull.js.map +7 -0
- package/lib/api/git/push.d.ts +43 -0
- package/lib/api/git/push.js +70 -0
- package/lib/api/git/push.js.map +7 -0
- package/lib/api/git/remote.d.ts +20 -0
- package/lib/api/git/remote.js +72 -0
- package/lib/api/git/remote.js.map +7 -0
- package/lib/api/git/reset.d.ts +12 -0
- package/lib/api/git/reset.js +62 -0
- package/lib/api/git/reset.js.map +7 -0
- package/lib/api/git/statusMatrix.d.ts +7 -0
- package/lib/api/git/statusMatrix.js +47 -0
- package/lib/api/git/statusMatrix.js.map +7 -0
- package/lib/api/github/checkRun.d.ts +44 -0
- package/lib/api/github/checkRun.js +81 -0
- package/lib/api/github/checkRun.js.map +7 -0
- package/lib/api/github/environment.d.ts +18 -0
- package/lib/api/github/environment.js +48 -0
- package/lib/api/github/environment.js.map +7 -0
- package/lib/api/github/index.d.ts +7 -0
- package/lib/api/github/index.js +48 -0
- package/lib/api/github/index.js.map +7 -0
- package/lib/api/github/issueComment.d.ts +59 -0
- package/lib/api/github/issueComment.js +83 -0
- package/lib/api/github/issueComment.js.map +7 -0
- package/lib/api/github/pullRequest.d.ts +21 -0
- package/lib/api/github/pullRequest.js +68 -0
- package/lib/api/github/pullRequest.js.map +7 -0
- package/lib/api/github/push.d.ts +79 -0
- package/lib/api/github/push.js +158 -0
- package/lib/api/github/push.js.map +7 -0
- package/lib/api/jest/index.d.ts +144 -0
- package/lib/api/jest/index.js +41 -0
- package/lib/api/jest/index.js.map +7 -0
- package/lib/api/net/compose.d.ts +4 -0
- package/lib/api/net/compose.js +50 -0
- package/lib/api/net/compose.js.map +7 -0
- package/lib/api/net/index.d.ts +1 -0
- package/lib/api/net/index.js +29 -0
- package/lib/api/net/index.js.map +7 -0
- package/lib/api/net/socket.d.ts +5 -0
- package/lib/api/net/socket.js +68 -0
- package/lib/api/net/socket.js.map +7 -0
- package/lib/api/net/waitFor.d.ts +22 -0
- package/lib/api/net/waitFor.js +40 -0
- package/lib/api/net/waitFor.js.map +7 -0
- package/lib/cli/adapter/eslint.d.ts +14 -0
- package/lib/cli/adapter/eslint.js +112 -0
- package/lib/cli/adapter/eslint.js.map +7 -0
- package/lib/cli/adapter/prettier.d.ts +45 -0
- package/lib/cli/adapter/prettier.js +171 -0
- package/lib/cli/adapter/prettier.js.map +7 -0
- package/lib/cli/build/args.d.ts +7 -0
- package/lib/cli/build/args.js +73 -0
- package/lib/cli/build/args.js.map +7 -0
- package/lib/cli/build/esbuild.d.ts +5 -0
- package/lib/cli/build/esbuild.js +133 -0
- package/lib/cli/build/esbuild.js.map +7 -0
- package/lib/cli/build/index.d.ts +1 -0
- package/lib/cli/build/index.js +73 -0
- package/lib/cli/build/index.js.map +7 -0
- package/lib/cli/build/tsc.d.ts +1 -0
- package/lib/cli/build/tsc.js +36 -0
- package/lib/cli/build/tsc.js.map +7 -0
- package/lib/cli/buildPackage.d.ts +1 -0
- package/lib/cli/buildPackage.js +56 -0
- package/lib/cli/buildPackage.js.map +7 -0
- package/lib/cli/configure/addEmptyExports.d.ts +6 -0
- package/lib/cli/configure/addEmptyExports.js +76 -0
- package/lib/cli/configure/addEmptyExports.js.map +7 -0
- package/lib/cli/configure/analyseConfiguration.d.ts +9 -0
- package/lib/cli/configure/analyseConfiguration.js +69 -0
- package/lib/cli/configure/analyseConfiguration.js.map +7 -0
- package/lib/cli/configure/analyseDependencies.d.ts +10 -0
- package/lib/cli/configure/analyseDependencies.js +136 -0
- package/lib/cli/configure/analyseDependencies.js.map +7 -0
- package/lib/cli/configure/analysis/diff.d.ts +1 -0
- package/lib/cli/configure/analysis/diff.js +45 -0
- package/lib/cli/configure/analysis/diff.js.map +7 -0
- package/lib/cli/configure/analysis/files.d.ts +1 -0
- package/lib/cli/configure/analysis/files.js +58 -0
- package/lib/cli/configure/analysis/files.js.map +7 -0
- package/lib/cli/configure/analysis/git.d.ts +1 -0
- package/lib/cli/configure/analysis/git.js +54 -0
- package/lib/cli/configure/analysis/git.js.map +7 -0
- package/lib/cli/configure/analysis/package.d.ts +13 -0
- package/lib/cli/configure/analysis/package.js +110 -0
- package/lib/cli/configure/analysis/package.js.map +7 -0
- package/lib/cli/configure/analysis/project.d.ts +3 -0
- package/lib/cli/configure/analysis/project.js +105 -0
- package/lib/cli/configure/analysis/project.js.map +7 -0
- package/lib/cli/configure/dependencies/index.d.ts +5 -0
- package/lib/cli/configure/dependencies/index.js +41 -0
- package/lib/cli/configure/dependencies/index.js.map +7 -0
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.d.ts +2 -0
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +59 -0
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +7 -0
- package/lib/cli/configure/dependencies/seekKoala.d.ts +2 -0
- package/lib/cli/configure/dependencies/seekKoala.js +56 -0
- package/lib/cli/configure/dependencies/seekKoala.js.map +7 -0
- package/lib/cli/configure/dependencies/skuba.d.ts +2 -0
- package/lib/cli/configure/dependencies/skuba.js +52 -0
- package/lib/cli/configure/dependencies/skuba.js.map +7 -0
- package/lib/cli/configure/dependencies/skubaDeps.d.ts +2 -0
- package/lib/cli/configure/dependencies/skubaDeps.js +56 -0
- package/lib/cli/configure/dependencies/skubaDeps.js.map +7 -0
- package/lib/cli/configure/dependencies/skubaDive.d.ts +3 -0
- package/lib/cli/configure/dependencies/skubaDive.js +70 -0
- package/lib/cli/configure/dependencies/skubaDive.js.map +7 -0
- package/lib/cli/configure/ensureTemplateCompletion.d.ts +9 -0
- package/lib/cli/configure/ensureTemplateCompletion.js +77 -0
- package/lib/cli/configure/ensureTemplateCompletion.js.map +7 -0
- package/lib/cli/configure/getEntryPoint.d.ts +11 -0
- package/lib/cli/configure/getEntryPoint.js +70 -0
- package/lib/cli/configure/getEntryPoint.js.map +7 -0
- package/lib/cli/configure/getProjectType.d.ts +9 -0
- package/lib/cli/configure/getProjectType.js +52 -0
- package/lib/cli/configure/getProjectType.js.map +7 -0
- package/lib/cli/configure/index.d.ts +1 -0
- package/lib/cli/configure/index.js +148 -0
- package/lib/cli/configure/index.js.map +7 -0
- package/lib/cli/configure/modules/eslint.d.ts +2 -0
- package/lib/cli/configure/modules/eslint.js +61 -0
- package/lib/cli/configure/modules/eslint.js.map +7 -0
- package/lib/cli/configure/modules/ignore.d.ts +2 -0
- package/lib/cli/configure/modules/ignore.js +40 -0
- package/lib/cli/configure/modules/ignore.js.map +7 -0
- package/lib/cli/configure/modules/index.d.ts +2 -0
- package/lib/cli/configure/modules/index.js +54 -0
- package/lib/cli/configure/modules/index.js.map +7 -0
- 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.d.ts +2 -0
- package/lib/cli/configure/modules/nodemon.js +30 -0
- package/lib/cli/configure/modules/nodemon.js.map +7 -0
- package/lib/cli/configure/modules/package.d.ts +2 -0
- package/lib/cli/configure/modules/package.js +117 -0
- package/lib/cli/configure/modules/package.js.map +7 -0
- package/lib/cli/configure/modules/prettier.d.ts +2 -0
- package/lib/cli/configure/modules/prettier.js +52 -0
- package/lib/cli/configure/modules/prettier.js.map +7 -0
- package/lib/cli/configure/modules/renovate.d.ts +3 -0
- package/lib/cli/configure/modules/renovate.js +69 -0
- package/lib/cli/configure/modules/renovate.js.map +7 -0
- package/lib/cli/configure/modules/serverless.d.ts +2 -0
- package/lib/cli/configure/modules/serverless.js +36 -0
- package/lib/cli/configure/modules/serverless.js.map +7 -0
- package/lib/cli/configure/modules/skubaDive.d.ts +2 -0
- package/lib/cli/configure/modules/skubaDive.js +72 -0
- package/lib/cli/configure/modules/skubaDive.js.map +7 -0
- package/lib/cli/configure/modules/tsconfig.d.ts +2 -0
- package/lib/cli/configure/modules/tsconfig.js +87 -0
- package/lib/cli/configure/modules/tsconfig.js.map +7 -0
- package/lib/cli/configure/modules/tslint.d.ts +2 -0
- package/lib/cli/configure/modules/tslint.js +30 -0
- package/lib/cli/configure/modules/tslint.js.map +7 -0
- package/lib/cli/configure/patchRenovateConfig.d.ts +1 -0
- package/lib/cli/configure/patchRenovateConfig.js +132 -0
- package/lib/cli/configure/patchRenovateConfig.js.map +7 -0
- package/lib/cli/configure/processing/deleteFiles.d.ts +5 -0
- package/lib/cli/configure/processing/deleteFiles.js +31 -0
- package/lib/cli/configure/processing/deleteFiles.js.map +7 -0
- package/lib/cli/configure/processing/ignoreFile.d.ts +8 -0
- package/lib/cli/configure/processing/ignoreFile.js +74 -0
- package/lib/cli/configure/processing/ignoreFile.js.map +7 -0
- package/lib/cli/configure/processing/javascript.d.ts +2 -0
- package/lib/cli/configure/processing/javascript.js +38 -0
- package/lib/cli/configure/processing/javascript.js.map +7 -0
- package/lib/cli/configure/processing/json.d.ts +2 -0
- package/lib/cli/configure/processing/json.js +57 -0
- package/lib/cli/configure/processing/json.js.map +7 -0
- package/lib/cli/configure/processing/loadFiles.d.ts +5 -0
- package/lib/cli/configure/processing/loadFiles.js +31 -0
- package/lib/cli/configure/processing/loadFiles.js.map +7 -0
- package/lib/cli/configure/processing/module.d.ts +10 -0
- package/lib/cli/configure/processing/module.js +39 -0
- package/lib/cli/configure/processing/module.js.map +7 -0
- package/lib/cli/configure/processing/package.d.ts +73 -0
- package/lib/cli/configure/processing/package.js +87 -0
- package/lib/cli/configure/processing/package.js.map +7 -0
- package/lib/cli/configure/processing/prettier.d.ts +4 -0
- package/lib/cli/configure/processing/prettier.js +44 -0
- package/lib/cli/configure/processing/prettier.js.map +7 -0
- package/lib/cli/configure/processing/record.d.ts +11 -0
- package/lib/cli/configure/processing/record.js +65 -0
- package/lib/cli/configure/processing/record.js.map +7 -0
- package/lib/cli/configure/processing/typescript.d.ts +23 -0
- package/lib/cli/configure/processing/typescript.js +197 -0
- package/lib/cli/configure/processing/typescript.js.map +7 -0
- package/lib/cli/configure/refreshIgnoreFiles.d.ts +3 -0
- package/lib/cli/configure/refreshIgnoreFiles.js +78 -0
- package/lib/cli/configure/refreshIgnoreFiles.js.map +7 -0
- package/lib/cli/configure/types.d.ts +26 -0
- package/lib/cli/configure/types.js +17 -0
- package/lib/cli/configure/types.js.map +7 -0
- package/lib/cli/format.d.ts +1 -0
- package/lib/cli/format.js +70 -0
- package/lib/cli/format.js.map +7 -0
- package/lib/cli/help.d.ts +1 -0
- package/lib/cli/help.js +34 -0
- package/lib/cli/help.js.map +7 -0
- package/lib/cli/init/getConfig.d.ts +26 -0
- package/lib/cli/init/getConfig.js +285 -0
- package/lib/cli/init/getConfig.js.map +7 -0
- package/lib/cli/init/git.d.ts +7 -0
- package/lib/cli/init/git.js +82 -0
- package/lib/cli/init/git.js.map +7 -0
- package/lib/cli/init/index.d.ts +1 -0
- package/lib/cli/init/index.js +146 -0
- package/lib/cli/init/index.js.map +7 -0
- package/lib/cli/init/prompts.d.ts +45 -0
- package/lib/cli/init/prompts.js +97 -0
- package/lib/cli/init/prompts.js.map +7 -0
- package/lib/cli/init/types.d.ts +28 -0
- package/lib/cli/init/types.js +65 -0
- package/lib/cli/init/types.js.map +7 -0
- package/lib/cli/init/validation.d.ts +8 -0
- package/lib/cli/init/validation.js +43 -0
- package/lib/cli/init/validation.js.map +7 -0
- package/lib/cli/init/writePackageJson.d.ts +13 -0
- package/lib/cli/init/writePackageJson.js +58 -0
- package/lib/cli/init/writePackageJson.js.map +7 -0
- package/lib/cli/lint/annotate/buildkite/eslint.d.ts +2 -0
- package/lib/cli/lint/annotate/buildkite/eslint.js +40 -0
- package/lib/cli/lint/annotate/buildkite/eslint.js.map +7 -0
- package/lib/cli/lint/annotate/buildkite/index.d.ts +4 -0
- package/lib/cli/lint/annotate/buildkite/index.js +58 -0
- package/lib/cli/lint/annotate/buildkite/index.js.map +7 -0
- package/lib/cli/lint/annotate/buildkite/prettier.d.ts +2 -0
- package/lib/cli/lint/annotate/buildkite/prettier.js +47 -0
- package/lib/cli/lint/annotate/buildkite/prettier.js.map +7 -0
- package/lib/cli/lint/annotate/buildkite/tsc.d.ts +2 -0
- package/lib/cli/lint/annotate/buildkite/tsc.js +45 -0
- package/lib/cli/lint/annotate/buildkite/tsc.js.map +7 -0
- package/lib/cli/lint/annotate/github/eslint.d.ts +3 -0
- package/lib/cli/lint/annotate/github/eslint.js +45 -0
- package/lib/cli/lint/annotate/github/eslint.js.map +7 -0
- package/lib/cli/lint/annotate/github/index.d.ts +4 -0
- package/lib/cli/lint/annotate/github/index.js +63 -0
- package/lib/cli/lint/annotate/github/index.js.map +7 -0
- package/lib/cli/lint/annotate/github/prettier.d.ts +3 -0
- package/lib/cli/lint/annotate/github/prettier.js +39 -0
- package/lib/cli/lint/annotate/github/prettier.js.map +7 -0
- package/lib/cli/lint/annotate/github/tsc.d.ts +3 -0
- package/lib/cli/lint/annotate/github/tsc.js +63 -0
- package/lib/cli/lint/annotate/github/tsc.js.map +7 -0
- package/lib/cli/lint/annotate/index.d.ts +4 -0
- package/lib/cli/lint/annotate/index.js +36 -0
- package/lib/cli/lint/annotate/index.js.map +7 -0
- package/lib/cli/lint/autofix.d.ts +10 -0
- package/lib/cli/lint/autofix.js +189 -0
- package/lib/cli/lint/autofix.js.map +7 -0
- package/lib/cli/lint/eslint.d.ts +4 -0
- package/lib/cli/lint/eslint.js +55 -0
- package/lib/cli/lint/eslint.js.map +7 -0
- package/lib/cli/lint/external.d.ts +10 -0
- package/lib/cli/lint/external.js +120 -0
- package/lib/cli/lint/external.js.map +7 -0
- package/lib/cli/lint/index.d.ts +2 -0
- package/lib/cli/lint/index.js +49 -0
- package/lib/cli/lint/index.js.map +7 -0
- package/lib/cli/lint/internal.d.ts +1 -0
- package/lib/cli/lint/internal.js +64 -0
- package/lib/cli/lint/internal.js.map +7 -0
- package/lib/cli/lint/prettier.d.ts +4 -0
- package/lib/cli/lint/prettier.js +55 -0
- package/lib/cli/lint/prettier.js.map +7 -0
- package/lib/cli/lint/tsc.d.ts +2 -0
- package/lib/cli/lint/tsc.js +58 -0
- package/lib/cli/lint/tsc.js.map +7 -0
- package/lib/cli/lint/types.d.ts +34 -0
- package/lib/cli/lint/types.js +17 -0
- package/lib/cli/lint/types.js.map +7 -0
- package/lib/cli/node.d.ts +1 -0
- package/lib/cli/node.js +77 -0
- package/lib/cli/node.js.map +7 -0
- package/lib/cli/release.d.ts +1 -0
- package/lib/cli/release.js +32 -0
- package/lib/cli/release.js.map +7 -0
- package/lib/cli/start.d.ts +1 -0
- package/lib/cli/start.js +69 -0
- package/lib/cli/start.js.map +7 -0
- package/lib/cli/test/index.d.ts +1 -0
- package/lib/cli/test/index.js +37 -0
- package/lib/cli/test/index.js.map +7 -0
- 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 +77 -0
- package/lib/cli/test/reporters/github/index.js.map +7 -0
- package/lib/cli/version.d.ts +1 -0
- package/lib/cli/version.js +34 -0
- package/lib/cli/version.js.map +7 -0
- package/lib/enquirer.d.js +2 -0
- package/lib/enquirer.d.js.map +7 -0
- package/lib/index.d.ts +22 -0
- package/lib/index.js +51 -0
- package/lib/index.js.map +7 -0
- package/lib/skuba.d.ts +11 -0
- package/lib/skuba.js +55 -0
- package/lib/skuba.js.map +7 -0
- package/lib/utils/args.d.ts +43 -0
- package/lib/utils/args.js +114 -0
- package/lib/utils/args.js.map +7 -0
- package/lib/utils/command.d.ts +6 -0
- package/lib/utils/command.js +72 -0
- package/lib/utils/command.js.map +7 -0
- package/lib/utils/copy.d.ts +16 -0
- package/lib/utils/copy.js +100 -0
- package/lib/utils/copy.js.map +7 -0
- package/lib/utils/dir.d.ts +21 -0
- package/lib/utils/dir.js +91 -0
- package/lib/utils/dir.js.map +7 -0
- package/lib/utils/env.d.ts +5 -0
- package/lib/utils/env.js +29 -0
- package/lib/utils/env.js.map +7 -0
- package/lib/utils/error.d.ts +28 -0
- package/lib/utils/error.js +72 -0
- package/lib/utils/error.js.map +7 -0
- package/lib/utils/exec.d.ts +40 -0
- package/lib/utils/exec.js +166 -0
- package/lib/utils/exec.js.map +7 -0
- package/lib/utils/help.d.ts +1 -0
- package/lib/utils/help.js +34 -0
- package/lib/utils/help.js.map +7 -0
- package/lib/utils/logging.d.ts +27 -0
- package/lib/utils/logging.js +60 -0
- package/lib/utils/logging.js.map +7 -0
- package/lib/utils/logo.d.ts +9 -0
- package/lib/utils/logo.js +74 -0
- package/lib/utils/logo.js.map +7 -0
- package/lib/utils/manifest.d.ts +10 -0
- package/lib/utils/manifest.js +77 -0
- package/lib/utils/manifest.js.map +7 -0
- package/lib/utils/port.d.ts +2 -0
- package/lib/utils/port.js +48 -0
- package/lib/utils/port.js.map +7 -0
- package/lib/utils/template.d.ts +37 -0
- package/lib/utils/template.js +116 -0
- package/lib/utils/template.js.map +7 -0
- package/lib/utils/validation.d.ts +6 -0
- package/lib/utils/validation.js +44 -0
- package/lib/utils/validation.js.map +7 -0
- package/lib/utils/version.d.ts +13 -0
- package/lib/utils/version.js +89 -0
- package/lib/utils/version.js.map +7 -0
- package/lib/utils/wait.d.ts +17 -0
- package/lib/utils/wait.js +59 -0
- package/lib/utils/wait.js.map +7 -0
- package/lib/utils/worker.d.ts +20 -0
- package/lib/utils/worker.js +63 -0
- package/lib/utils/worker.js.map +7 -0
- package/lib/wrapper/function-arguments.d.js +2 -0
- package/lib/wrapper/function-arguments.d.js.map +7 -0
- package/lib/wrapper/functionHandler.d.ts +10 -0
- package/lib/wrapper/functionHandler.js +63 -0
- package/lib/wrapper/functionHandler.js.map +7 -0
- package/lib/wrapper/http.d.ts +20 -0
- package/lib/wrapper/http.js +79 -0
- package/lib/wrapper/http.js.map +7 -0
- package/lib/wrapper/index.d.ts +12 -0
- package/lib/wrapper/index.js +16 -0
- package/lib/wrapper/index.js.map +7 -0
- package/lib/wrapper/main.d.ts +1 -0
- package/lib/wrapper/main.js +47 -0
- package/lib/wrapper/main.js.map +7 -0
- package/lib/wrapper/requestListener.d.ts +11 -0
- package/lib/wrapper/requestListener.js +66 -0
- package/lib/wrapper/requestListener.js.map +7 -0
- package/package.json +167 -0
- package/template/base/.github/CODEOWNERS +5 -0
- package/template/base/.github/renovate.json5 +3 -0
- package/template/base/_.dockerignore +18 -0
- package/template/base/_.eslintignore +14 -0
- package/template/base/_.eslintrc.js +3 -0
- package/template/base/_.gitignore +23 -0
- package/template/base/_.prettierignore +20 -0
- package/template/base/_.prettierrc.js +1 -0
- package/template/base/jest.config.ts +15 -0
- package/template/base/jest.setup.ts +3 -0
- package/template/base/tsconfig.build.json +5 -0
- package/template/base/tsconfig.json +13 -0
- package/template/express-rest-api/.buildkite/pipeline.yml +103 -0
- package/template/express-rest-api/.env +1 -0
- package/template/express-rest-api/.gantry/common.yml +20 -0
- package/template/express-rest-api/.gantry/dev.yml +8 -0
- package/template/express-rest-api/.gantry/prod.yml +8 -0
- package/template/express-rest-api/.nvmrc +1 -0
- package/template/express-rest-api/Dockerfile +37 -0
- package/template/express-rest-api/Dockerfile.dev-deps +11 -0
- package/template/express-rest-api/README.md +106 -0
- package/template/express-rest-api/docker-compose.yml +22 -0
- package/template/express-rest-api/gantry.apply.yml +122 -0
- package/template/express-rest-api/gantry.build.yml +15 -0
- package/template/express-rest-api/package.json +30 -0
- package/template/express-rest-api/skuba.template.js +49 -0
- package/template/express-rest-api/src/api/healthCheck.ts +11 -0
- package/template/express-rest-api/src/api/smokeTest.ts +8 -0
- package/template/express-rest-api/src/app.test.ts +9 -0
- package/template/express-rest-api/src/app.ts +14 -0
- package/template/express-rest-api/src/config.ts +57 -0
- package/template/express-rest-api/src/framework/logging.ts +17 -0
- package/template/express-rest-api/src/listen.ts +23 -0
- package/template/express-rest-api/src/register.ts +1 -0
- package/template/greeter/.buildkite/pipeline.yml +37 -0
- package/template/greeter/.nvmrc +1 -0
- package/template/greeter/Dockerfile +11 -0
- package/template/greeter/README.md +96 -0
- package/template/greeter/docker-compose.yml +22 -0
- package/template/greeter/package.json +24 -0
- package/template/greeter/skuba.template.js +16 -0
- package/template/greeter/src/app.test.ts +5 -0
- package/template/greeter/src/app.ts +4 -0
- package/template/koa-rest-api/.buildkite/pipeline.yml +103 -0
- package/template/koa-rest-api/.env +1 -0
- package/template/koa-rest-api/.gantry/common.yml +20 -0
- package/template/koa-rest-api/.gantry/dev.yml +11 -0
- package/template/koa-rest-api/.gantry/prod.yml +11 -0
- package/template/koa-rest-api/.nvmrc +1 -0
- package/template/koa-rest-api/Dockerfile +37 -0
- package/template/koa-rest-api/Dockerfile.dev-deps +11 -0
- package/template/koa-rest-api/README.md +111 -0
- package/template/koa-rest-api/docker-compose.yml +22 -0
- package/template/koa-rest-api/gantry.apply.yml +129 -0
- package/template/koa-rest-api/gantry.build.yml +15 -0
- package/template/koa-rest-api/package.json +47 -0
- package/template/koa-rest-api/skuba.template.js +49 -0
- package/template/koa-rest-api/src/api/healthCheck.ts +13 -0
- package/template/koa-rest-api/src/api/index.ts +10 -0
- package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +9 -0
- package/template/koa-rest-api/src/api/jobs/getJobs.ts +15 -0
- package/template/koa-rest-api/src/api/jobs/index.ts +10 -0
- package/template/koa-rest-api/src/api/jobs/postJob.test.ts +34 -0
- package/template/koa-rest-api/src/api/jobs/postJob.ts +19 -0
- package/template/koa-rest-api/src/api/smokeTest.ts +11 -0
- package/template/koa-rest-api/src/app.test.ts +21 -0
- package/template/koa-rest-api/src/app.ts +8 -0
- package/template/koa-rest-api/src/config.ts +57 -0
- package/template/koa-rest-api/src/framework/logging.ts +25 -0
- package/template/koa-rest-api/src/framework/metrics.ts +11 -0
- package/template/koa-rest-api/src/framework/middleware.ts +3 -0
- package/template/koa-rest-api/src/framework/server.test.ts +260 -0
- package/template/koa-rest-api/src/framework/server.ts +51 -0
- package/template/koa-rest-api/src/framework/validation.test.ts +72 -0
- package/template/koa-rest-api/src/framework/validation.ts +77 -0
- package/template/koa-rest-api/src/listen.ts +24 -0
- package/template/koa-rest-api/src/register.ts +1 -0
- package/template/koa-rest-api/src/storage/jobs.ts +28 -0
- package/template/koa-rest-api/src/testing/logging.ts +16 -0
- package/template/koa-rest-api/src/testing/metrics.ts +29 -0
- package/template/koa-rest-api/src/testing/server.ts +31 -0
- package/template/koa-rest-api/src/testing/types.ts +24 -0
- package/template/koa-rest-api/src/tracing.ts +61 -0
- package/template/koa-rest-api/src/types/jobs.ts +17 -0
- package/template/koa-rest-api/src/types/koa.ts +8 -0
- package/template/lambda-sqs-worker/.buildkite/pipeline.yml +96 -0
- package/template/lambda-sqs-worker/.env +1 -0
- package/template/lambda-sqs-worker/.nvmrc +1 -0
- package/template/lambda-sqs-worker/Dockerfile +12 -0
- package/template/lambda-sqs-worker/README.md +132 -0
- package/template/lambda-sqs-worker/docker-compose.yml +27 -0
- package/template/lambda-sqs-worker/package.json +44 -0
- package/template/lambda-sqs-worker/serverless.yml +202 -0
- package/template/lambda-sqs-worker/skuba.template.js +32 -0
- package/template/lambda-sqs-worker/src/app.test.ts +116 -0
- package/template/lambda-sqs-worker/src/app.ts +52 -0
- package/template/lambda-sqs-worker/src/config.ts +57 -0
- package/template/lambda-sqs-worker/src/framework/handler.test.ts +61 -0
- package/template/lambda-sqs-worker/src/framework/handler.ts +43 -0
- package/template/lambda-sqs-worker/src/framework/logging.ts +27 -0
- package/template/lambda-sqs-worker/src/framework/metrics.ts +14 -0
- package/template/lambda-sqs-worker/src/framework/validation.test.ts +84 -0
- package/template/lambda-sqs-worker/src/framework/validation.ts +10 -0
- package/template/lambda-sqs-worker/src/hooks.ts +96 -0
- package/template/lambda-sqs-worker/src/mapping/jobScorer.ts +19 -0
- package/template/lambda-sqs-worker/src/services/aws.ts +5 -0
- package/template/lambda-sqs-worker/src/services/jobScorer.test.ts +44 -0
- package/template/lambda-sqs-worker/src/services/jobScorer.ts +56 -0
- package/template/lambda-sqs-worker/src/services/pipelineEventSender.test.ts +40 -0
- package/template/lambda-sqs-worker/src/services/pipelineEventSender.ts +33 -0
- package/template/lambda-sqs-worker/src/testing/handler.ts +13 -0
- package/template/lambda-sqs-worker/src/testing/logging.ts +16 -0
- package/template/lambda-sqs-worker/src/testing/services.ts +28 -0
- package/template/lambda-sqs-worker/src/testing/types.ts +33 -0
- package/template/lambda-sqs-worker/src/types/jobScorer.ts +15 -0
- package/template/lambda-sqs-worker/src/types/pipelineEvents.ts +21 -0
- package/template/lambda-sqs-worker/tsconfig.json +13 -0
- package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +93 -0
- package/template/lambda-sqs-worker-cdk/.nvmrc +1 -0
- package/template/lambda-sqs-worker-cdk/Dockerfile +13 -0
- package/template/lambda-sqs-worker-cdk/cdk.json +25 -0
- package/template/lambda-sqs-worker-cdk/docker-compose.yml +28 -0
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +723 -0
- package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +34 -0
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +74 -0
- package/template/lambda-sqs-worker-cdk/infra/index.ts +14 -0
- package/template/lambda-sqs-worker-cdk/package.json +30 -0
- package/template/lambda-sqs-worker-cdk/shared/context-types.ts +21 -0
- package/template/lambda-sqs-worker-cdk/skuba.template.js +27 -0
- package/template/lambda-sqs-worker-cdk/src/app.ts +10 -0
- package/template/lambda-sqs-worker-cdk/tsconfig.json +13 -0
- package/template/oss-npm-package/.github/workflows/release.yml +35 -0
- package/template/oss-npm-package/.github/workflows/validate.yml +31 -0
- package/template/oss-npm-package/.nvmrc +1 -0
- package/template/oss-npm-package/LICENSE +21 -0
- package/template/oss-npm-package/README.md +128 -0
- package/template/oss-npm-package/_package.json +41 -0
- package/template/oss-npm-package/skuba.template.js +22 -0
- package/template/oss-npm-package/src/index.test.ts +5 -0
- package/template/oss-npm-package/src/index.ts +7 -0
- package/template/oss-npm-package/tsconfig.json +10 -0
- package/template/private-npm-package/.buildkite/pipeline.yml +5 -0
- package/template/private-npm-package/.nvmrc +1 -0
- package/template/private-npm-package/README.md +109 -0
- package/template/private-npm-package/_package.json +41 -0
- package/template/private-npm-package/skuba.template.js +24 -0
- package/template/private-npm-package/src/index.test.ts +5 -0
- package/template/private-npm-package/src/index.ts +7 -0
- package/template/private-npm-package/tsconfig.json +10 -0
|
@@ -0,0 +1,97 @@
|
|
|
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 prompts_exports = {};
|
|
20
|
+
__export(prompts_exports, {
|
|
21
|
+
BASE_PROMPT_PROPS: () => BASE_PROMPT_PROPS,
|
|
22
|
+
GIT_PATH_PROMPT: () => GIT_PATH_PROMPT,
|
|
23
|
+
SHOULD_CONTINUE_PROMPT: () => SHOULD_CONTINUE_PROMPT,
|
|
24
|
+
TEMPLATE_PROMPT: () => TEMPLATE_PROMPT
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(prompts_exports);
|
|
27
|
+
var import_fs_extra = require("fs-extra");
|
|
28
|
+
var import_template = require("../../utils/template");
|
|
29
|
+
var import_validation = require("./validation");
|
|
30
|
+
var import_enquirer = require("enquirer");
|
|
31
|
+
const BASE_CHOICES = [
|
|
32
|
+
{
|
|
33
|
+
name: "ownerName",
|
|
34
|
+
message: "Owner",
|
|
35
|
+
initial: "SEEK-Jobs/my-team",
|
|
36
|
+
validate: (value) => {
|
|
37
|
+
if (typeof value !== "string") {
|
|
38
|
+
return "required";
|
|
39
|
+
}
|
|
40
|
+
const [org, team] = value.split("/");
|
|
41
|
+
if (!(0, import_validation.isGitHubOrg)(org)) {
|
|
42
|
+
return "fails GitHub validation";
|
|
43
|
+
}
|
|
44
|
+
return team === void 0 || (0, import_validation.isGitHubTeam)(team) || "fails GitHub validation";
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "repoName",
|
|
49
|
+
message: "Repo",
|
|
50
|
+
initial: "my-repo",
|
|
51
|
+
validate: async (value) => {
|
|
52
|
+
if (typeof value !== "string") {
|
|
53
|
+
return "required";
|
|
54
|
+
}
|
|
55
|
+
if (!(0, import_validation.isGitHubRepo)(value)) {
|
|
56
|
+
return "fails GitHub validation";
|
|
57
|
+
}
|
|
58
|
+
const exists = await (0, import_fs_extra.pathExists)(value);
|
|
59
|
+
return !exists || `'${value}' is an existing directory`;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "platformName",
|
|
64
|
+
message: "Platform",
|
|
65
|
+
initial: import_validation.PLATFORM_OPTIONS,
|
|
66
|
+
validate: (value) => (0, import_validation.isPlatform)(value) || `must be ${import_validation.PLATFORM_OPTIONS}`
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
const BASE_PROMPT_PROPS = {
|
|
70
|
+
choices: BASE_CHOICES,
|
|
71
|
+
message: "For starters, some project details:",
|
|
72
|
+
name: "baseAnswers"
|
|
73
|
+
};
|
|
74
|
+
const SHOULD_CONTINUE_PROMPT = new import_enquirer.Select({
|
|
75
|
+
choices: ["yes", "no"],
|
|
76
|
+
message: "Fill this in now?",
|
|
77
|
+
name: "shouldContinue"
|
|
78
|
+
});
|
|
79
|
+
const GIT_PATH_PROMPT = new import_enquirer.Input({
|
|
80
|
+
message: "Git path",
|
|
81
|
+
name: "gitPath",
|
|
82
|
+
initial: "seek-oss/skuba",
|
|
83
|
+
validate: (value) => /[^/]+\/[^/]+/.test(value) || "Path is not valid"
|
|
84
|
+
});
|
|
85
|
+
const TEMPLATE_PROMPT = new import_enquirer.Select({
|
|
86
|
+
choices: import_template.TEMPLATE_NAMES_WITH_BYO,
|
|
87
|
+
message: "Select a template:",
|
|
88
|
+
name: "templateName"
|
|
89
|
+
});
|
|
90
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
+
0 && (module.exports = {
|
|
92
|
+
BASE_PROMPT_PROPS,
|
|
93
|
+
GIT_PATH_PROMPT,
|
|
94
|
+
SHOULD_CONTINUE_PROMPT,
|
|
95
|
+
TEMPLATE_PROMPT
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/cli/init/prompts.ts"],
|
|
4
|
+
"sourcesContent": ["import { pathExists } from 'fs-extra';\n\nimport { TEMPLATE_NAMES_WITH_BYO } from '../../utils/template';\n\nimport type { Platform } from './validation';\nimport {\n PLATFORM_OPTIONS,\n isGitHubOrg,\n isGitHubRepo,\n isGitHubTeam,\n isPlatform,\n} from './validation';\n\nimport { Input, Select } from 'enquirer';\n\nexport type BaseFields = Record<\n (typeof BASE_CHOICES)[number]['name'],\n string\n> & {\n platformName: Platform;\n};\n\nconst BASE_CHOICES = [\n {\n name: 'ownerName',\n message: 'Owner',\n initial: 'SEEK-Jobs/my-team',\n validate: (value: unknown) => {\n if (typeof value !== 'string') {\n return 'required';\n }\n\n const [org, team] = value.split('/');\n\n if (!isGitHubOrg(org)) {\n return 'fails GitHub validation';\n }\n\n return (\n team === undefined || isGitHubTeam(team) || 'fails GitHub validation'\n );\n },\n },\n {\n name: 'repoName',\n message: 'Repo',\n initial: 'my-repo',\n validate: async (value: unknown) => {\n if (typeof value !== 'string') {\n return 'required';\n }\n\n if (!isGitHubRepo(value)) {\n return 'fails GitHub validation';\n }\n\n const exists = await pathExists(value);\n\n return !exists || `'${value}' is an existing directory`;\n },\n },\n {\n name: 'platformName',\n message: 'Platform',\n initial: PLATFORM_OPTIONS,\n validate: (value: unknown) =>\n isPlatform(value) || `must be ${PLATFORM_OPTIONS}`,\n },\n] as const;\n\nexport const BASE_PROMPT_PROPS = {\n choices: BASE_CHOICES,\n message: 'For starters, some project details:',\n name: 'baseAnswers',\n};\n\nexport const SHOULD_CONTINUE_PROMPT = new Select({\n choices: ['yes', 'no'] as const,\n message: 'Fill this in now?',\n name: 'shouldContinue',\n});\n\nexport const GIT_PATH_PROMPT = new Input({\n message: 'Git path',\n name: 'gitPath',\n initial: 'seek-oss/skuba',\n validate: (value) => /[^/]+\\/[^/]+/.test(value) || 'Path is not valid',\n});\n\nexport const TEMPLATE_PROMPT = new Select({\n choices: TEMPLATE_NAMES_WITH_BYO,\n message: 'Select a template:',\n name: 'templateName',\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA2B;AAE3B,sBAAwC;AAGxC,wBAMO;AAEP,sBAA8B;AAS9B,MAAM,eAAe;AAAA,EACnB;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU,CAAC,UAAmB;AAC5B,UAAI,OAAO,UAAU,UAAU;AAC7B,eAAO;AAAA,MACT;AAEA,YAAM,CAAC,KAAK,IAAI,IAAI,MAAM,MAAM,GAAG;AAEnC,UAAI,KAAC,+BAAY,GAAG,GAAG;AACrB,eAAO;AAAA,MACT;AAEA,aACE,SAAS,cAAa,gCAAa,IAAI,KAAK;AAAA,IAEhD;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU,OAAO,UAAmB;AAClC,UAAI,OAAO,UAAU,UAAU;AAC7B,eAAO;AAAA,MACT;AAEA,UAAI,KAAC,gCAAa,KAAK,GAAG;AACxB,eAAO;AAAA,MACT;AAEA,YAAM,SAAS,UAAM,4BAAW,KAAK;AAErC,aAAO,CAAC,UAAU,IAAI;AAAA,IACxB;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU,CAAC,cACT,8BAAW,KAAK,KAAK,WAAW;AAAA,EACpC;AACF;AAEO,MAAM,oBAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,SAAS;AAAA,EACT,MAAM;AACR;AAEO,MAAM,yBAAyB,IAAI,uBAAO;AAAA,EAC/C,SAAS,CAAC,OAAO,IAAI;AAAA,EACrB,SAAS;AAAA,EACT,MAAM;AACR,CAAC;AAEM,MAAM,kBAAkB,IAAI,sBAAM;AAAA,EACvC,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,UAAU,CAAC,UAAU,eAAe,KAAK,KAAK,KAAK;AACrD,CAAC;AAEM,MAAM,kBAAkB,IAAI,uBAAO;AAAA,EACxC,SAAS;AAAA,EACT,SAAS;AAAA,EACT,MAAM;AACR,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as t from 'runtypes';
|
|
2
|
+
export type InitConfigInput = t.Static<typeof InitConfigInput>;
|
|
3
|
+
export declare const InitConfigInput: t.Record<{
|
|
4
|
+
destinationDir: t.String;
|
|
5
|
+
templateComplete: t.Boolean;
|
|
6
|
+
templateData: t.Intersect<[t.Record<{
|
|
7
|
+
ownerName: t.String;
|
|
8
|
+
repoName: t.String;
|
|
9
|
+
platformName: t.Union<[t.Literal<"amd64">, t.Literal<"arm64">]>;
|
|
10
|
+
}, false>, t.Dictionary<t.String, string>]>;
|
|
11
|
+
templateName: t.String;
|
|
12
|
+
}, false>;
|
|
13
|
+
export type InitConfig = t.Static<typeof InitConfig>;
|
|
14
|
+
declare const InitConfig: t.Record<{
|
|
15
|
+
templateData: t.Intersect<[t.Record<{
|
|
16
|
+
ownerName: t.String;
|
|
17
|
+
repoName: t.String;
|
|
18
|
+
orgName: t.String;
|
|
19
|
+
teamName: t.String;
|
|
20
|
+
port: t.String;
|
|
21
|
+
}, false>, t.Dictionary<t.String, string>]>;
|
|
22
|
+
entryPoint: t.Optional<t.String>;
|
|
23
|
+
type: t.Optional<t.Union<[t.Literal<"application">, t.Literal<"package">]>>;
|
|
24
|
+
destinationDir: t.String;
|
|
25
|
+
templateComplete: t.Boolean;
|
|
26
|
+
templateName: t.String;
|
|
27
|
+
}, false>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
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 types_exports = {};
|
|
30
|
+
__export(types_exports, {
|
|
31
|
+
InitConfigInput: () => InitConfigInput
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(types_exports);
|
|
34
|
+
var t = __toESM(require("runtypes"));
|
|
35
|
+
var import_manifest = require("../../utils/manifest");
|
|
36
|
+
const INIT_CONFIG_INPUT_FIELDS = {
|
|
37
|
+
destinationDir: t.String,
|
|
38
|
+
templateComplete: t.Boolean,
|
|
39
|
+
templateData: t.Record({
|
|
40
|
+
ownerName: t.String,
|
|
41
|
+
repoName: t.String,
|
|
42
|
+
platformName: t.Union(t.Literal("amd64"), t.Literal("arm64"))
|
|
43
|
+
}).And(t.Dictionary(t.String, t.String)),
|
|
44
|
+
templateName: t.String
|
|
45
|
+
};
|
|
46
|
+
const InitConfigInput = t.Record(INIT_CONFIG_INPUT_FIELDS);
|
|
47
|
+
const InitConfig = t.Record({
|
|
48
|
+
...INIT_CONFIG_INPUT_FIELDS,
|
|
49
|
+
templateData: t.Record({
|
|
50
|
+
ownerName: t.String,
|
|
51
|
+
repoName: t.String,
|
|
52
|
+
// Derived from ownerName
|
|
53
|
+
orgName: t.String,
|
|
54
|
+
teamName: t.String,
|
|
55
|
+
// Generated by init command
|
|
56
|
+
port: t.String
|
|
57
|
+
}).And(t.Dictionary(t.String, t.String)),
|
|
58
|
+
entryPoint: t.String.optional(),
|
|
59
|
+
type: import_manifest.ProjectType.optional()
|
|
60
|
+
});
|
|
61
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
+
0 && (module.exports = {
|
|
63
|
+
InitConfigInput
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/cli/init/types.ts"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable new-cap */\n\nimport * as t from 'runtypes';\n\nimport { ProjectType } from '../../utils/manifest';\n\nconst INIT_CONFIG_INPUT_FIELDS = {\n destinationDir: t.String,\n templateComplete: t.Boolean,\n templateData: t\n .Record({\n ownerName: t.String,\n repoName: t.String,\n platformName: t.Union(t.Literal('amd64'), t.Literal('arm64')),\n })\n .And(t.Dictionary(t.String, t.String)),\n templateName: t.String,\n};\n\nexport type InitConfigInput = t.Static<typeof InitConfigInput>;\n\nexport const InitConfigInput = t.Record(INIT_CONFIG_INPUT_FIELDS);\n\nexport type InitConfig = t.Static<typeof InitConfig>;\n\nconst InitConfig = t.Record({\n ...INIT_CONFIG_INPUT_FIELDS,\n\n templateData: t\n .Record({\n ownerName: t.String,\n repoName: t.String,\n\n // Derived from ownerName\n orgName: t.String,\n teamName: t.String,\n\n // Generated by init command\n port: t.String,\n })\n .And(t.Dictionary(t.String, t.String)),\n\n entryPoint: t.String.optional(),\n type: ProjectType.optional(),\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,QAAmB;AAEnB,sBAA4B;AAE5B,MAAM,2BAA2B;AAAA,EAC/B,gBAAgB,EAAE;AAAA,EAClB,kBAAkB,EAAE;AAAA,EACpB,cAAc,EACX,OAAO;AAAA,IACN,WAAW,EAAE;AAAA,IACb,UAAU,EAAE;AAAA,IACZ,cAAc,EAAE,MAAM,EAAE,QAAQ,OAAO,GAAG,EAAE,QAAQ,OAAO,CAAC;AAAA,EAC9D,CAAC,EACA,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC;AAAA,EACvC,cAAc,EAAE;AAClB;AAIO,MAAM,kBAAkB,EAAE,OAAO,wBAAwB;AAIhE,MAAM,aAAa,EAAE,OAAO;AAAA,EAC1B,GAAG;AAAA,EAEH,cAAc,EACX,OAAO;AAAA,IACN,WAAW,EAAE;AAAA,IACb,UAAU,EAAE;AAAA;AAAA,IAGZ,SAAS,EAAE;AAAA,IACX,UAAU,EAAE;AAAA;AAAA,IAGZ,MAAM,EAAE;AAAA,EACV,CAAC,EACA,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC;AAAA,EAEvC,YAAY,EAAE,OAAO,SAAS;AAAA,EAC9B,MAAM,4BAAY,SAAS;AAC7B,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const isGitHubOrg: (value: string) => boolean;
|
|
2
|
+
export declare const isGitHubRepo: (value: string) => boolean;
|
|
3
|
+
export declare const isGitHubTeam: (value: string) => boolean;
|
|
4
|
+
declare const PLATFORMS: readonly ["amd64", "arm64"];
|
|
5
|
+
export type Platform = (typeof PLATFORMS)[number];
|
|
6
|
+
export declare const PLATFORM_OPTIONS: string;
|
|
7
|
+
export declare const isPlatform: (value: unknown) => boolean;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
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 validation_exports = {};
|
|
20
|
+
__export(validation_exports, {
|
|
21
|
+
PLATFORM_OPTIONS: () => PLATFORM_OPTIONS,
|
|
22
|
+
isGitHubOrg: () => isGitHubOrg,
|
|
23
|
+
isGitHubRepo: () => isGitHubRepo,
|
|
24
|
+
isGitHubTeam: () => isGitHubTeam,
|
|
25
|
+
isPlatform: () => isPlatform
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(validation_exports);
|
|
28
|
+
const isGitHubOrg = (value) => /^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/.test(value) && !value.includes("--");
|
|
29
|
+
const isGitHubRepo = (value) => /^[A-Za-z0-9_.-]+$/.test(value) && value !== "." && value !== "..";
|
|
30
|
+
const isGitHubTeam = (value) => /^[A-Za-z0-9_](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?$/.test(value) && !value.endsWith("-") && !value.includes("--");
|
|
31
|
+
const PLATFORMS = ["amd64", "arm64"];
|
|
32
|
+
const PLATFORM_OPTIONS = PLATFORMS.join(" | ");
|
|
33
|
+
const platformSet = new Set(PLATFORMS);
|
|
34
|
+
const isPlatform = (value) => platformSet.has(value);
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
PLATFORM_OPTIONS,
|
|
38
|
+
isGitHubOrg,
|
|
39
|
+
isGitHubRepo,
|
|
40
|
+
isGitHubTeam,
|
|
41
|
+
isPlatform
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/cli/init/validation.ts"],
|
|
4
|
+
"sourcesContent": ["export const isGitHubOrg = (value: string) =>\n /^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/.test(value) &&\n !value.includes('--');\n\nexport const isGitHubRepo = (value: string) =>\n /^[A-Za-z0-9_.-]+$/.test(value) && value !== '.' && value !== '..';\n\nexport const isGitHubTeam = (value: string) =>\n /^[A-Za-z0-9_](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?$/.test(value) &&\n !value.endsWith('-') &&\n !value.includes('--');\n\nconst PLATFORMS = ['amd64', 'arm64'] as const;\n\nexport type Platform = (typeof PLATFORMS)[number];\n\nexport const PLATFORM_OPTIONS = PLATFORMS.join(' | ');\n\nconst platformSet = new Set<unknown>(PLATFORMS);\n\nexport const isPlatform = (value: unknown) => platformSet.has(value);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc,CAAC,UAC1B,6CAA6C,KAAK,KAAK,KACvD,CAAC,MAAM,SAAS,IAAI;AAEf,MAAM,eAAe,CAAC,UAC3B,oBAAoB,KAAK,KAAK,KAAK,UAAU,OAAO,UAAU;AAEzD,MAAM,eAAe,CAAC,UAC3B,gDAAgD,KAAK,KAAK,KAC1D,CAAC,MAAM,SAAS,GAAG,KACnB,CAAC,MAAM,SAAS,IAAI;AAEtB,MAAM,YAAY,CAAC,SAAS,OAAO;AAI5B,MAAM,mBAAmB,UAAU,KAAK,KAAK;AAEpD,MAAM,cAAc,IAAI,IAAa,SAAS;AAEvC,MAAM,aAAa,CAAC,UAAmB,YAAY,IAAI,KAAK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ProjectType } from '../../utils/manifest';
|
|
2
|
+
interface WritePackageJsonProps {
|
|
3
|
+
cwd: string;
|
|
4
|
+
entryPoint?: string;
|
|
5
|
+
template: string;
|
|
6
|
+
type?: ProjectType;
|
|
7
|
+
version: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Write a `skuba` section into the destination `package.json`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const writePackageJson: ({ cwd, entryPoint, template, type, version, }: WritePackageJsonProps) => Promise<void>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
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 writePackageJson_exports = {};
|
|
30
|
+
__export(writePackageJson_exports, {
|
|
31
|
+
writePackageJson: () => writePackageJson
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(writePackageJson_exports);
|
|
34
|
+
var import_fs_extra = __toESM(require("fs-extra"));
|
|
35
|
+
var import_package = require("../configure/analysis/package");
|
|
36
|
+
var import_package2 = require("../configure/processing/package");
|
|
37
|
+
const writePackageJson = async ({
|
|
38
|
+
cwd,
|
|
39
|
+
entryPoint,
|
|
40
|
+
template,
|
|
41
|
+
type,
|
|
42
|
+
version
|
|
43
|
+
}) => {
|
|
44
|
+
const manifest = await (0, import_package.getDestinationManifest)({ cwd });
|
|
45
|
+
manifest.packageJson.skuba = {
|
|
46
|
+
entryPoint: entryPoint ?? null,
|
|
47
|
+
template,
|
|
48
|
+
type,
|
|
49
|
+
version
|
|
50
|
+
};
|
|
51
|
+
const updatedPackageJson = (0, import_package2.formatPackage)(manifest.packageJson);
|
|
52
|
+
await import_fs_extra.default.promises.writeFile(manifest.path, updatedPackageJson);
|
|
53
|
+
};
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
writePackageJson
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=writePackageJson.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/cli/init/writePackageJson.ts"],
|
|
4
|
+
"sourcesContent": ["import fs from 'fs-extra';\n\nimport type { ProjectType } from '../../utils/manifest';\nimport { getDestinationManifest } from '../configure/analysis/package';\nimport { formatPackage } from '../configure/processing/package';\n\ninterface WritePackageJsonProps {\n cwd: string;\n entryPoint?: string;\n template: string;\n type?: ProjectType;\n version: string;\n}\n\n/**\n * Write a `skuba` section into the destination `package.json`.\n */\nexport const writePackageJson = async ({\n cwd,\n entryPoint,\n template,\n type,\n version,\n}: WritePackageJsonProps) => {\n const manifest = await getDestinationManifest({ cwd });\n\n manifest.packageJson.skuba = {\n entryPoint: entryPoint ?? null,\n template,\n type,\n version,\n };\n\n const updatedPackageJson = formatPackage(manifest.packageJson);\n\n await fs.promises.writeFile(manifest.path, updatedPackageJson);\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAe;AAGf,qBAAuC;AACvC,IAAAA,kBAA8B;AAavB,MAAM,mBAAmB,OAAO;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA6B;AAC3B,QAAM,WAAW,UAAM,uCAAuB,EAAE,IAAI,CAAC;AAErD,WAAS,YAAY,QAAQ;AAAA,IAC3B,YAAY,cAAc;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,yBAAqB,+BAAc,SAAS,WAAW;AAE7D,QAAM,gBAAAC,QAAG,SAAS,UAAU,SAAS,MAAM,kBAAkB;AAC/D;",
|
|
6
|
+
"names": ["import_package", "fs"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 eslint_exports = {};
|
|
30
|
+
__export(eslint_exports, {
|
|
31
|
+
createEslintAnnotations: () => createEslintAnnotations
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(eslint_exports);
|
|
34
|
+
var Buildkite = __toESM(require("../../../../api/buildkite"));
|
|
35
|
+
const createEslintAnnotations = (eslint) => !eslint.ok ? ["**ESLint**", Buildkite.md.terminal(eslint.output.trim())] : [];
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
createEslintAnnotations
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=eslint.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/cli/lint/annotate/buildkite/eslint.ts"],
|
|
4
|
+
"sourcesContent": ["import * as Buildkite from '../../../../api/buildkite';\nimport type { ESLintOutput } from '../../../adapter/eslint';\n\nexport const createEslintAnnotations = (eslint: ESLintOutput): string[] =>\n !eslint.ok ? ['**ESLint**', Buildkite.md.terminal(eslint.output.trim())] : [];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAA2B;AAGpB,MAAM,0BAA0B,CAAC,WACtC,CAAC,OAAO,KAAK,CAAC,cAAc,UAAU,GAAG,SAAS,OAAO,OAAO,KAAK,CAAC,CAAC,IAAI,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ESLintOutput } from '../../../adapter/eslint';
|
|
2
|
+
import type { PrettierOutput } from '../../../adapter/prettier';
|
|
3
|
+
import type { StreamInterceptor } from '../../../lint/external';
|
|
4
|
+
export declare const createBuildkiteAnnotations: (eslint: ESLintOutput, prettier: PrettierOutput, tscOk: boolean, tscOutputStream: StreamInterceptor) => Promise<void>;
|
|
@@ -0,0 +1,58 @@
|
|
|
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 buildkite_exports = {};
|
|
30
|
+
__export(buildkite_exports, {
|
|
31
|
+
createBuildkiteAnnotations: () => createBuildkiteAnnotations
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(buildkite_exports);
|
|
34
|
+
var Buildkite = __toESM(require("../../../../api/buildkite"));
|
|
35
|
+
var import_eslint = require("./eslint");
|
|
36
|
+
var import_prettier = require("./prettier");
|
|
37
|
+
var import_tsc = require("./tsc");
|
|
38
|
+
const createBuildkiteAnnotations = async (eslint, prettier, tscOk, tscOutputStream) => {
|
|
39
|
+
if (eslint.ok && prettier.ok && tscOk) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const buildkiteOutput = [
|
|
43
|
+
"`skuba lint` found issues that require triage:",
|
|
44
|
+
...(0, import_eslint.createEslintAnnotations)(eslint),
|
|
45
|
+
...(0, import_prettier.createPrettierAnnotations)(prettier),
|
|
46
|
+
...(0, import_tsc.createTscAnnotations)(tscOk, tscOutputStream)
|
|
47
|
+
].join("\n\n");
|
|
48
|
+
await Buildkite.annotate(buildkiteOutput, {
|
|
49
|
+
context: "skuba-lint-external",
|
|
50
|
+
scopeContextToStep: true,
|
|
51
|
+
style: "error"
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
createBuildkiteAnnotations
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/cli/lint/annotate/buildkite/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as Buildkite from '../../../../api/buildkite';\nimport type { ESLintOutput } from '../../../adapter/eslint';\nimport type { PrettierOutput } from '../../../adapter/prettier';\nimport type { StreamInterceptor } from '../../../lint/external';\n\nimport { createEslintAnnotations } from './eslint';\nimport { createPrettierAnnotations } from './prettier';\nimport { createTscAnnotations } from './tsc';\n\nexport const createBuildkiteAnnotations = async (\n eslint: ESLintOutput,\n prettier: PrettierOutput,\n tscOk: boolean,\n tscOutputStream: StreamInterceptor,\n): Promise<void> => {\n if (eslint.ok && prettier.ok && tscOk) {\n return;\n }\n\n const buildkiteOutput = [\n '`skuba lint` found issues that require triage:',\n ...createEslintAnnotations(eslint),\n ...createPrettierAnnotations(prettier),\n ...createTscAnnotations(tscOk, tscOutputStream),\n ].join('\\n\\n');\n\n await Buildkite.annotate(buildkiteOutput, {\n context: 'skuba-lint-external',\n scopeContextToStep: true,\n style: 'error',\n });\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAA2B;AAK3B,oBAAwC;AACxC,sBAA0C;AAC1C,iBAAqC;AAE9B,MAAM,6BAA6B,OACxC,QACA,UACA,OACA,oBACkB;AAClB,MAAI,OAAO,MAAM,SAAS,MAAM,OAAO;AACrC;AAAA,EACF;AAEA,QAAM,kBAAkB;AAAA,IACtB;AAAA,IACA,OAAG,uCAAwB,MAAM;AAAA,IACjC,OAAG,2CAA0B,QAAQ;AAAA,IACrC,OAAG,iCAAqB,OAAO,eAAe;AAAA,EAChD,EAAE,KAAK,MAAM;AAEb,QAAM,UAAU,SAAS,iBAAiB;AAAA,IACxC,SAAS;AAAA,IACT,oBAAoB;AAAA,IACpB,OAAO;AAAA,EACT,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 prettier_exports = {};
|
|
30
|
+
__export(prettier_exports, {
|
|
31
|
+
createPrettierAnnotations: () => createPrettierAnnotations
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(prettier_exports);
|
|
34
|
+
var Buildkite = __toESM(require("../../../../api/buildkite"));
|
|
35
|
+
const createPrettierAnnotations = (prettier) => !prettier.ok ? [
|
|
36
|
+
"**Prettier**",
|
|
37
|
+
Buildkite.md.terminal(
|
|
38
|
+
prettier.result.errored.map(
|
|
39
|
+
({ err, filepath }) => [filepath, ...err ? [String(err)] : []].join(" ")
|
|
40
|
+
).join("\n")
|
|
41
|
+
)
|
|
42
|
+
] : [];
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
createPrettierAnnotations
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=prettier.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/cli/lint/annotate/buildkite/prettier.ts"],
|
|
4
|
+
"sourcesContent": ["import * as Buildkite from '../../../../api/buildkite';\nimport type { PrettierOutput } from '../../../adapter/prettier';\n\nexport const createPrettierAnnotations = (prettier: PrettierOutput): string[] =>\n !prettier.ok\n ? [\n '**Prettier**',\n Buildkite.md.terminal(\n prettier.result.errored\n .map(({ err, filepath }) =>\n [filepath, ...(err ? [String(err)] : [])].join(' '),\n )\n .join('\\n'),\n ),\n ]\n : [];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAA2B;AAGpB,MAAM,4BAA4B,CAAC,aACxC,CAAC,SAAS,KACN;AAAA,EACE;AAAA,EACA,UAAU,GAAG;AAAA,IACX,SAAS,OAAO,QACb;AAAA,MAAI,CAAC,EAAE,KAAK,SAAS,MACpB,CAAC,UAAU,GAAI,MAAM,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,CAAE,EAAE,KAAK,GAAG;AAAA,IACpD,EACC,KAAK,IAAI;AAAA,EACd;AACF,IACA,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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 tsc_exports = {};
|
|
30
|
+
__export(tsc_exports, {
|
|
31
|
+
createTscAnnotations: () => createTscAnnotations
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(tsc_exports);
|
|
34
|
+
var Buildkite = __toESM(require("../../../../api/buildkite"));
|
|
35
|
+
const createTscAnnotations = (tscOk, tscOutputStream) => !tscOk ? [
|
|
36
|
+
"**tsc**",
|
|
37
|
+
Buildkite.md.terminal(
|
|
38
|
+
tscOutputStream.output().split("\n").filter(Boolean).filter((line) => !line.startsWith("TSFILE: ")).join("\n").trim()
|
|
39
|
+
)
|
|
40
|
+
] : [];
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
createTscAnnotations
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=tsc.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/cli/lint/annotate/buildkite/tsc.ts"],
|
|
4
|
+
"sourcesContent": ["import * as Buildkite from '../../../../api/buildkite';\nimport type { StreamInterceptor } from '../../../lint/external';\n\nexport const createTscAnnotations = (\n tscOk: boolean,\n tscOutputStream: StreamInterceptor,\n): string[] =>\n !tscOk\n ? [\n '**tsc**',\n Buildkite.md.terminal(\n tscOutputStream\n .output()\n .split('\\n')\n .filter(Boolean)\n .filter((line) => !line.startsWith('TSFILE: '))\n .join('\\n')\n .trim(),\n ),\n ]\n : [];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAA2B;AAGpB,MAAM,uBAAuB,CAClC,OACA,oBAEA,CAAC,QACG;AAAA,EACE;AAAA,EACA,UAAU,GAAG;AAAA,IACX,gBACG,OAAO,EACP,MAAM,IAAI,EACV,OAAO,OAAO,EACd,OAAO,CAAC,SAAS,CAAC,KAAK,WAAW,UAAU,CAAC,EAC7C,KAAK,IAAI,EACT,KAAK;AAAA,EACV;AACF,IACA,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|