skuba 4.4.1 → 5.0.0-beta.0

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.
Files changed (313) hide show
  1. package/config/tsconfig.json +1 -0
  2. package/jest/moduleNameMapper.js +50 -78
  3. package/jest/moduleNameMapper.test.ts +4 -14
  4. package/jest/transform.js +10 -1
  5. package/jest/tsConfig.js +26 -0
  6. package/lib/api/buildkite/annotate.js +46 -33
  7. package/lib/api/buildkite/annotate.js.map +7 -1
  8. package/lib/api/buildkite/index.js +31 -7
  9. package/lib/api/buildkite/index.js.map +7 -1
  10. package/lib/api/buildkite/md.js +31 -8
  11. package/lib/api/buildkite/md.js.map +7 -1
  12. package/lib/api/git/commit.js +45 -17
  13. package/lib/api/git/commit.js.map +7 -1
  14. package/lib/api/git/commitAllChanges.js +57 -27
  15. package/lib/api/git/commitAllChanges.js.map +7 -1
  16. package/lib/api/git/currentBranch.js +50 -28
  17. package/lib/api/git/currentBranch.js.map +7 -1
  18. package/lib/api/git/getChangedFiles.js +49 -27
  19. package/lib/api/git/getChangedFiles.js.map +7 -1
  20. package/lib/api/git/index.js +54 -22
  21. package/lib/api/git/index.js.map +7 -1
  22. package/lib/api/git/log.js +63 -42
  23. package/lib/api/git/log.js.map +7 -1
  24. package/lib/api/git/pull.js +62 -31
  25. package/lib/api/git/pull.js.map +7 -1
  26. package/lib/api/git/push.js +63 -31
  27. package/lib/api/git/push.js.map +7 -1
  28. package/lib/api/git/remote.js +59 -56
  29. package/lib/api/git/remote.js.map +7 -1
  30. package/lib/api/git/reset.js +55 -27
  31. package/lib/api/git/reset.js.map +7 -1
  32. package/lib/api/git/statusMatrix.js +46 -13
  33. package/lib/api/git/statusMatrix.js.map +7 -1
  34. package/lib/api/github/checkRun.js +70 -79
  35. package/lib/api/github/checkRun.js.map +7 -1
  36. package/lib/api/github/environment.js +40 -33
  37. package/lib/api/github/environment.js.map +7 -1
  38. package/lib/api/github/index.js +47 -17
  39. package/lib/api/github/index.js.map +7 -1
  40. package/lib/api/github/issueComment.js +73 -81
  41. package/lib/api/github/issueComment.js.map +7 -1
  42. package/lib/api/github/pullRequest.js +60 -61
  43. package/lib/api/github/pullRequest.js.map +7 -1
  44. package/lib/api/github/push.js +138 -133
  45. package/lib/api/github/push.js.map +7 -1
  46. package/lib/api/jest/index.d.ts +2 -1
  47. package/lib/api/jest/index.js +35 -14
  48. package/lib/api/jest/index.js.map +7 -1
  49. package/lib/api/net/compose.js +45 -17
  50. package/lib/api/net/compose.js.map +7 -1
  51. package/lib/api/net/index.js +28 -5
  52. package/lib/api/net/index.js.map +7 -1
  53. package/lib/api/net/socket.js +58 -36
  54. package/lib/api/net/socket.js.map +7 -1
  55. package/lib/api/net/waitFor.js +38 -18
  56. package/lib/api/net/waitFor.js.map +7 -1
  57. package/lib/cli/adapter/eslint.js +95 -72
  58. package/lib/cli/adapter/eslint.js.map +7 -1
  59. package/lib/cli/adapter/prettier.js +126 -124
  60. package/lib/cli/adapter/prettier.js.map +7 -1
  61. package/lib/cli/build/args.d.ts +7 -0
  62. package/lib/cli/build/args.js +69 -0
  63. package/lib/cli/build/args.js.map +7 -0
  64. package/lib/cli/build/esbuild.d.ts +5 -0
  65. package/lib/cli/build/esbuild.js +128 -0
  66. package/lib/cli/build/esbuild.js.map +7 -0
  67. package/lib/cli/build/index.d.ts +1 -1
  68. package/lib/cli/build/index.js +68 -5
  69. package/lib/cli/build/index.js.map +7 -1
  70. package/lib/cli/build/tsc.d.ts +1 -1
  71. package/lib/cli/build/tsc.js +34 -23
  72. package/lib/cli/build/tsc.js.map +7 -1
  73. package/lib/cli/buildPackage.js +53 -23
  74. package/lib/cli/buildPackage.js.map +7 -1
  75. package/lib/cli/configure/addEmptyExports.d.ts +5 -0
  76. package/lib/cli/configure/addEmptyExports.js +67 -0
  77. package/lib/cli/configure/addEmptyExports.js.map +7 -0
  78. package/lib/cli/configure/analyseConfiguration.js +61 -31
  79. package/lib/cli/configure/analyseConfiguration.js.map +7 -1
  80. package/lib/cli/configure/analyseDependencies.js +122 -113
  81. package/lib/cli/configure/analyseDependencies.js.map +7 -1
  82. package/lib/cli/configure/analysis/diff.js +37 -11
  83. package/lib/cli/configure/analysis/diff.js.map +7 -1
  84. package/lib/cli/configure/analysis/files.js +49 -22
  85. package/lib/cli/configure/analysis/files.js.map +7 -1
  86. package/lib/cli/configure/analysis/git.js +46 -16
  87. package/lib/cli/configure/analysis/git.js.map +7 -1
  88. package/lib/cli/configure/analysis/package.js +99 -52
  89. package/lib/cli/configure/analysis/package.js.map +7 -1
  90. package/lib/cli/configure/analysis/project.js +90 -54
  91. package/lib/cli/configure/analysis/project.js.map +7 -1
  92. package/lib/cli/configure/dependencies/index.js +40 -13
  93. package/lib/cli/configure/dependencies/index.js.map +7 -1
  94. package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +57 -32
  95. package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +7 -1
  96. package/lib/cli/configure/dependencies/seekKoala.js +53 -31
  97. package/lib/cli/configure/dependencies/seekKoala.js.map +7 -1
  98. package/lib/cli/configure/dependencies/skuba.js +49 -27
  99. package/lib/cli/configure/dependencies/skuba.js.map +7 -1
  100. package/lib/cli/configure/dependencies/skubaDeps.js +49 -28
  101. package/lib/cli/configure/dependencies/skubaDeps.js.map +7 -1
  102. package/lib/cli/configure/dependencies/skubaDive.js +65 -38
  103. package/lib/cli/configure/dependencies/skubaDive.js.map +7 -1
  104. package/lib/cli/configure/ensureTemplateCompletion.js +69 -41
  105. package/lib/cli/configure/ensureTemplateCompletion.js.map +7 -1
  106. package/lib/cli/configure/getEntryPoint.js +62 -32
  107. package/lib/cli/configure/getEntryPoint.js.map +7 -1
  108. package/lib/cli/configure/getProjectType.js +50 -28
  109. package/lib/cli/configure/getProjectType.js.map +7 -1
  110. package/lib/cli/configure/index.js +134 -109
  111. package/lib/cli/configure/index.js.map +7 -1
  112. package/lib/cli/configure/modules/eslint.js +57 -26
  113. package/lib/cli/configure/modules/eslint.js.map +7 -1
  114. package/lib/cli/configure/modules/ignore.js +37 -14
  115. package/lib/cli/configure/modules/ignore.js.map +7 -1
  116. package/lib/cli/configure/modules/index.js +53 -28
  117. package/lib/cli/configure/modules/index.js.map +7 -1
  118. package/lib/cli/configure/modules/jest.js +84 -47
  119. package/lib/cli/configure/modules/jest.js.map +7 -1
  120. package/lib/cli/configure/modules/nodemon.js +29 -6
  121. package/lib/cli/configure/modules/nodemon.js.map +7 -1
  122. package/lib/cli/configure/modules/package.js +113 -92
  123. package/lib/cli/configure/modules/package.js.map +7 -1
  124. package/lib/cli/configure/modules/prettier.js +48 -19
  125. package/lib/cli/configure/modules/prettier.js.map +7 -1
  126. package/lib/cli/configure/modules/renovate.js +52 -39
  127. package/lib/cli/configure/modules/renovate.js.map +7 -1
  128. package/lib/cli/configure/modules/serverless.js +33 -15
  129. package/lib/cli/configure/modules/serverless.js.map +7 -1
  130. package/lib/cli/configure/modules/skubaDive.js +63 -37
  131. package/lib/cli/configure/modules/skubaDive.js.map +7 -1
  132. package/lib/cli/configure/modules/tsconfig.js +79 -63
  133. package/lib/cli/configure/modules/tsconfig.js.map +7 -1
  134. package/lib/cli/configure/modules/tslint.js +29 -6
  135. package/lib/cli/configure/modules/tslint.js.map +7 -1
  136. package/lib/cli/configure/processing/deleteFiles.js +30 -8
  137. package/lib/cli/configure/processing/deleteFiles.js.map +7 -1
  138. package/lib/cli/configure/processing/ignoreFile.js +65 -59
  139. package/lib/cli/configure/processing/ignoreFile.js.map +7 -1
  140. package/lib/cli/configure/processing/javascript.js +35 -15
  141. package/lib/cli/configure/processing/javascript.js.map +7 -1
  142. package/lib/cli/configure/processing/json.js +51 -20
  143. package/lib/cli/configure/processing/json.js.map +7 -1
  144. package/lib/cli/configure/processing/loadFiles.js +30 -8
  145. package/lib/cli/configure/processing/loadFiles.js.map +7 -1
  146. package/lib/cli/configure/processing/module.js +37 -14
  147. package/lib/cli/configure/processing/module.js.map +7 -1
  148. package/lib/cli/configure/processing/package.js +73 -43
  149. package/lib/cli/configure/processing/package.js.map +7 -1
  150. package/lib/cli/configure/processing/prettier.js +37 -11
  151. package/lib/cli/configure/processing/prettier.js.map +7 -1
  152. package/lib/cli/configure/processing/record.js +54 -31
  153. package/lib/cli/configure/processing/record.js.map +7 -1
  154. package/lib/cli/configure/processing/typescript.js +176 -158
  155. package/lib/cli/configure/processing/typescript.js.map +7 -1
  156. package/lib/cli/configure/refreshIgnoreFiles.js +64 -40
  157. package/lib/cli/configure/refreshIgnoreFiles.js.map +7 -1
  158. package/lib/cli/configure/types.js +16 -2
  159. package/lib/cli/configure/types.js.map +7 -1
  160. package/lib/cli/format.js +58 -31
  161. package/lib/cli/format.js.map +7 -1
  162. package/lib/cli/help.js +31 -8
  163. package/lib/cli/help.js.map +7 -1
  164. package/lib/cli/init/getConfig.js +238 -207
  165. package/lib/cli/init/getConfig.js.map +7 -1
  166. package/lib/cli/init/git.js +70 -63
  167. package/lib/cli/init/git.js.map +7 -1
  168. package/lib/cli/init/index.js +133 -100
  169. package/lib/cli/init/index.js.map +7 -1
  170. package/lib/cli/init/prompts.js +84 -54
  171. package/lib/cli/init/prompts.js.map +7 -1
  172. package/lib/cli/init/types.js +52 -52
  173. package/lib/cli/init/types.js.map +7 -1
  174. package/lib/cli/init/validation.js +34 -12
  175. package/lib/cli/init/validation.js.map +7 -1
  176. package/lib/cli/init/writePackageJson.js +51 -22
  177. package/lib/cli/init/writePackageJson.js.map +7 -1
  178. package/lib/cli/lint/annotate/buildkite/eslint.js +34 -28
  179. package/lib/cli/lint/annotate/buildkite/eslint.js.map +7 -1
  180. package/lib/cli/lint/annotate/buildkite/index.js +50 -44
  181. package/lib/cli/lint/annotate/buildkite/index.js.map +7 -1
  182. package/lib/cli/lint/annotate/buildkite/prettier.js +41 -35
  183. package/lib/cli/lint/annotate/buildkite/prettier.js.map +7 -1
  184. package/lib/cli/lint/annotate/buildkite/tsc.js +39 -39
  185. package/lib/cli/lint/annotate/buildkite/tsc.js.map +7 -1
  186. package/lib/cli/lint/annotate/github/eslint.js +40 -16
  187. package/lib/cli/lint/annotate/github/eslint.js.map +7 -1
  188. package/lib/cli/lint/annotate/github/index.js +55 -51
  189. package/lib/cli/lint/annotate/github/index.js.map +7 -1
  190. package/lib/cli/lint/annotate/github/prettier.js +36 -13
  191. package/lib/cli/lint/annotate/github/prettier.js.map +7 -1
  192. package/lib/cli/lint/annotate/github/tsc.js +52 -52
  193. package/lib/cli/lint/annotate/github/tsc.js.map +7 -1
  194. package/lib/cli/lint/annotate/index.js +33 -10
  195. package/lib/cli/lint/annotate/index.js.map +7 -1
  196. package/lib/cli/lint/autofix.js +122 -117
  197. package/lib/cli/lint/autofix.js.map +7 -1
  198. package/lib/cli/lint/eslint.js +48 -18
  199. package/lib/cli/lint/eslint.js.map +7 -1
  200. package/lib/cli/lint/external.js +102 -81
  201. package/lib/cli/lint/external.js.map +7 -1
  202. package/lib/cli/lint/index.js +42 -18
  203. package/lib/cli/lint/index.js.map +7 -1
  204. package/lib/cli/lint/internal.js +54 -21
  205. package/lib/cli/lint/internal.js.map +7 -1
  206. package/lib/cli/lint/prettier.js +48 -18
  207. package/lib/cli/lint/prettier.js.map +7 -1
  208. package/lib/cli/lint/tsc.js +56 -32
  209. package/lib/cli/lint/tsc.js.map +7 -1
  210. package/lib/cli/lint/types.js +16 -2
  211. package/lib/cli/lint/types.js.map +7 -1
  212. package/lib/cli/node.js +65 -58
  213. package/lib/cli/node.js.map +7 -1
  214. package/lib/cli/release.js +29 -6
  215. package/lib/cli/release.js.map +7 -1
  216. package/lib/cli/start.js +61 -24
  217. package/lib/cli/start.js.map +7 -1
  218. package/lib/cli/test/index.js +35 -11
  219. package/lib/cli/test/index.js.map +7 -1
  220. package/lib/cli/test/reporters/github/annotations.js +89 -92
  221. package/lib/cli/test/reporters/github/annotations.js.map +7 -1
  222. package/lib/cli/test/reporters/github/index.js +68 -68
  223. package/lib/cli/test/reporters/github/index.js.map +7 -1
  224. package/lib/cli/version.js +31 -8
  225. package/lib/cli/version.js.map +7 -1
  226. package/lib/enquirer.d.js +2 -0
  227. package/lib/enquirer.d.js.map +7 -0
  228. package/lib/index.d.ts +6 -0
  229. package/lib/index.js +45 -41
  230. package/lib/index.js.map +7 -1
  231. package/lib/skuba.js +45 -38
  232. package/lib/skuba.js.map +7 -1
  233. package/lib/utils/args.js +97 -96
  234. package/lib/utils/args.js.map +7 -1
  235. package/lib/utils/command.js +64 -33
  236. package/lib/utils/command.js.map +7 -1
  237. package/lib/utils/copy.js +88 -51
  238. package/lib/utils/copy.js.map +7 -1
  239. package/lib/utils/dir.js +79 -67
  240. package/lib/utils/dir.js.map +7 -1
  241. package/lib/utils/env.js +27 -7
  242. package/lib/utils/env.js.map +7 -1
  243. package/lib/utils/error.js +58 -56
  244. package/lib/utils/error.js.map +7 -1
  245. package/lib/utils/exec.js +139 -110
  246. package/lib/utils/exec.js.map +7 -1
  247. package/lib/utils/help.js +31 -8
  248. package/lib/utils/help.js.map +7 -1
  249. package/lib/utils/logging.js +52 -24
  250. package/lib/utils/logging.js.map +7 -1
  251. package/lib/utils/logo.js +65 -27
  252. package/lib/utils/logo.js.map +7 -1
  253. package/lib/utils/manifest.d.ts +1 -0
  254. package/lib/utils/manifest.js +65 -51
  255. package/lib/utils/manifest.js.map +7 -1
  256. package/lib/utils/port.js +38 -17
  257. package/lib/utils/port.js.map +7 -1
  258. package/lib/utils/template.js +106 -87
  259. package/lib/utils/template.js.map +7 -1
  260. package/lib/utils/validation.js +43 -18
  261. package/lib/utils/validation.js.map +7 -1
  262. package/lib/utils/version.js +72 -82
  263. package/lib/utils/version.js.map +7 -1
  264. package/lib/utils/wait.js +52 -25
  265. package/lib/utils/wait.js.map +7 -1
  266. package/lib/utils/worker.js +59 -44
  267. package/lib/utils/worker.js.map +7 -1
  268. package/lib/wrapper/function-arguments.d.js +2 -0
  269. package/lib/wrapper/function-arguments.d.js.map +7 -0
  270. package/lib/wrapper/functionHandler.js +56 -29
  271. package/lib/wrapper/functionHandler.js.map +7 -1
  272. package/lib/wrapper/http.js +66 -56
  273. package/lib/wrapper/http.js.map +7 -1
  274. package/lib/wrapper/index.js +9 -21
  275. package/lib/wrapper/index.js.map +7 -1
  276. package/lib/wrapper/main.js +39 -20
  277. package/lib/wrapper/main.js.map +7 -1
  278. package/lib/wrapper/requestListener.js +50 -35
  279. package/lib/wrapper/requestListener.js.map +7 -1
  280. package/package.json +19 -13
  281. package/template/base/jest.config.ts +0 -6
  282. package/template/base/jest.setup.ts +2 -0
  283. package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
  284. package/template/express-rest-api/package.json +1 -1
  285. package/template/greeter/.buildkite/pipeline.yml +1 -1
  286. package/template/greeter/package.json +1 -1
  287. package/template/greeter/src/app.test.ts +3 -1
  288. package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
  289. package/template/koa-rest-api/package.json +6 -7
  290. package/template/koa-rest-api/src/api/jobs/postJob.test.ts +3 -7
  291. package/template/koa-rest-api/src/api/jobs/postJob.ts +2 -2
  292. package/template/koa-rest-api/src/framework/validation.test.ts +17 -15
  293. package/template/koa-rest-api/src/framework/validation.ts +50 -9
  294. package/template/koa-rest-api/src/testing/types.ts +5 -10
  295. package/template/koa-rest-api/src/types/jobs.ts +5 -10
  296. package/template/lambda-sqs-worker/.buildkite/pipeline.yml +3 -3
  297. package/template/lambda-sqs-worker/package.json +2 -6
  298. package/template/lambda-sqs-worker/src/app.ts +2 -2
  299. package/template/lambda-sqs-worker/src/framework/validation.test.ts +37 -17
  300. package/template/lambda-sqs-worker/src/framework/validation.ts +4 -2
  301. package/template/lambda-sqs-worker/src/services/jobScorer.ts +2 -2
  302. package/template/lambda-sqs-worker/src/testing/types.ts +5 -10
  303. package/template/lambda-sqs-worker/src/types/jobScorer.ts +9 -16
  304. package/template/lambda-sqs-worker/src/types/pipelineEvents.ts +13 -20
  305. package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +3 -3
  306. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +6 -0
  307. package/template/lambda-sqs-worker-cdk/infra/appStack.ts +3 -3
  308. package/template/lambda-sqs-worker-cdk/infra/index.ts +2 -2
  309. package/template/lambda-sqs-worker-cdk/package.json +2 -2
  310. package/template/lambda-sqs-worker-cdk/shared/context-types.ts +16 -25
  311. package/template/oss-npm-package/_package.json +1 -1
  312. package/template/private-npm-package/_package.json +1 -1
  313. package/jest/resolver.js +0 -24
@@ -1,20 +1,44 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lint = void 0;
4
- const args_1 = require("../../utils/args");
5
- const refreshIgnoreFiles_1 = require("../configure/refreshIgnoreFiles");
6
- const external_1 = require("./external");
7
- const internal_1 = require("./internal");
8
- const lint = async (args = process.argv, tscOutputStream = undefined, workerThreads = true) => {
9
- await (0, refreshIgnoreFiles_1.tryRefreshIgnoreFiles)();
10
- const opts = {
11
- debug: (0, args_1.hasDebugFlag)(args),
12
- serial: (0, args_1.hasSerialFlag)(args),
13
- tscOutputStream,
14
- workerThreads,
15
- };
16
- await (0, external_1.externalLint)(opts);
17
- await (0, internal_1.internalLint)();
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 });
18
9
  };
19
- exports.lint = lint;
20
- //# sourceMappingURL=index.js.map
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 lint_exports = {};
20
+ __export(lint_exports, {
21
+ lint: () => lint
22
+ });
23
+ module.exports = __toCommonJS(lint_exports);
24
+ var import_args = require("../../utils/args");
25
+ var import_addEmptyExports = require("../configure/addEmptyExports");
26
+ var import_refreshIgnoreFiles = require("../configure/refreshIgnoreFiles");
27
+ var import_external = require("./external");
28
+ var import_internal = require("./internal");
29
+ const lint = async (args = process.argv.slice(2), tscOutputStream = void 0, workerThreads = true) => {
30
+ await Promise.all([(0, import_addEmptyExports.tryAddEmptyExports)(), (0, import_refreshIgnoreFiles.tryRefreshIgnoreFiles)()]);
31
+ const opts = {
32
+ debug: (0, import_args.hasDebugFlag)(args),
33
+ serial: (0, import_args.hasSerialFlag)(args),
34
+ tscOutputStream,
35
+ workerThreads
36
+ };
37
+ await (0, import_external.externalLint)(opts);
38
+ await (0, import_internal.internalLint)();
39
+ };
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ lint
43
+ });
44
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/lint/index.ts"],"names":[],"mappings":";;;AAEA,2CAA+D;AAC/D,wEAAwE;AAExE,yCAA0C;AAC1C,yCAA0C;AAGnC,MAAM,IAAI,GAAG,KAAK,EACvB,IAAI,GAAG,OAAO,CAAC,IAAI,EACnB,kBAAwC,SAAS,EACjD,aAAa,GAAG,IAAI,EACpB,EAAE;IACF,MAAM,IAAA,0CAAqB,GAAE,CAAC;IAE9B,MAAM,IAAI,GAAU;QAClB,KAAK,EAAE,IAAA,mBAAY,EAAC,IAAI,CAAC;QACzB,MAAM,EAAE,IAAA,oBAAa,EAAC,IAAI,CAAC;QAC3B,eAAe;QACf,aAAa;KACd,CAAC;IAEF,MAAM,IAAA,uBAAY,EAAC,IAAI,CAAC,CAAC;IAEzB,MAAM,IAAA,uBAAY,GAAE,CAAC;AACvB,CAAC,CAAC;AAjBW,QAAA,IAAI,QAiBf"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/cli/lint/index.ts"],
4
+ "sourcesContent": ["import type { Writable } from 'stream';\n\nimport { hasDebugFlag, hasSerialFlag } from '../../utils/args';\nimport { tryAddEmptyExports } from '../configure/addEmptyExports';\nimport { tryRefreshIgnoreFiles } from '../configure/refreshIgnoreFiles';\n\nimport { externalLint } from './external';\nimport { internalLint } from './internal';\nimport type { Input } from './types';\n\nexport const lint = async (\n args = process.argv.slice(2),\n tscOutputStream: Writable | undefined = undefined,\n workerThreads = true,\n) => {\n await Promise.all([tryAddEmptyExports(), tryRefreshIgnoreFiles()]);\n\n const opts: Input = {\n debug: hasDebugFlag(args),\n serial: hasSerialFlag(args),\n tscOutputStream,\n workerThreads,\n };\n\n await externalLint(opts);\n\n await internalLint();\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,kBAA4C;AAC5C,6BAAmC;AACnC,gCAAsC;AAEtC,sBAA6B;AAC7B,sBAA6B;AAGtB,MAAM,OAAO,OAClB,OAAO,QAAQ,KAAK,MAAM,CAAC,GAC3B,kBAAwC,QACxC,gBAAgB,SACb;AACH,QAAM,QAAQ,IAAI,KAAC,2CAAmB,OAAG,iDAAsB,CAAC,CAAC;AAEjE,QAAM,OAAc;AAAA,IAClB,WAAO,0BAAa,IAAI;AAAA,IACxB,YAAQ,2BAAc,IAAI;AAAA,IAC1B;AAAA,IACA;AAAA,EACF;AAEA,YAAM,8BAAa,IAAI;AAEvB,YAAM,8BAAa;AACrB;",
6
+ "names": []
7
+ }
@@ -1,27 +1,60 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
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 });
4
11
  };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.internalLint = void 0;
7
- const path_1 = __importDefault(require("path"));
8
- const chalk_1 = __importDefault(require("chalk"));
9
- const fs_extra_1 = require("fs-extra");
10
- const logging_1 = require("../../utils/logging");
11
- const manifest_1 = require("../../utils/manifest");
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
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var internal_exports = {};
26
+ __export(internal_exports, {
27
+ internalLint: () => internalLint
28
+ });
29
+ module.exports = __toCommonJS(internal_exports);
30
+ var import_path = __toESM(require("path"));
31
+ var import_chalk = __toESM(require("chalk"));
32
+ var import_fs_extra = require("fs-extra");
33
+ var import_logging = require("../../utils/logging");
34
+ var import_manifest = require("../../utils/manifest");
12
35
  const noSkubaTemplateJs = async () => {
13
- const manifest = await (0, manifest_1.getConsumerManifest)();
14
- if (!manifest) {
15
- return;
16
- }
17
- const templateConfigPath = path_1.default.join(path_1.default.dirname(manifest.path), 'skuba.template.js');
18
- if (await (0, fs_extra_1.pathExists)(templateConfigPath)) {
19
- logging_1.log.err(`Template is incomplete; run ${chalk_1.default.bold('yarn skuba configure')}. ${chalk_1.default.dim('no-skuba-template-js')}`);
20
- process.exitCode = 1;
21
- }
36
+ const manifest = await (0, import_manifest.getConsumerManifest)();
37
+ if (!manifest) {
38
+ return;
39
+ }
40
+ const templateConfigPath = import_path.default.join(
41
+ import_path.default.dirname(manifest.path),
42
+ "skuba.template.js"
43
+ );
44
+ if (await (0, import_fs_extra.pathExists)(templateConfigPath)) {
45
+ import_logging.log.err(
46
+ `Template is incomplete; run ${import_chalk.default.bold(
47
+ "yarn skuba configure"
48
+ )}. ${import_chalk.default.dim("no-skuba-template-js")}`
49
+ );
50
+ process.exitCode = 1;
51
+ }
22
52
  };
23
53
  const internalLint = async () => {
24
- await noSkubaTemplateJs();
54
+ await noSkubaTemplateJs();
25
55
  };
26
- exports.internalLint = internalLint;
27
- //# sourceMappingURL=internal.js.map
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {
58
+ internalLint
59
+ });
60
+ //# sourceMappingURL=internal.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/cli/lint/internal.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,kDAA0B;AAC1B,uCAAsC;AAEtC,iDAA0C;AAC1C,mDAA2D;AAE3D,MAAM,iBAAiB,GAAG,KAAK,IAAI,EAAE;IACnC,MAAM,QAAQ,GAAG,MAAM,IAAA,8BAAmB,GAAE,CAAC;IAE7C,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO;KACR;IAED,MAAM,kBAAkB,GAAG,cAAI,CAAC,IAAI,CAClC,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC3B,mBAAmB,CACpB,CAAC;IAEF,IAAI,MAAM,IAAA,qBAAU,EAAC,kBAAkB,CAAC,EAAE;QACxC,aAAG,CAAC,GAAG,CACL,+BAA+B,eAAK,CAAC,IAAI,CACvC,sBAAsB,CACvB,KAAK,eAAK,CAAC,GAAG,CAAC,sBAAsB,CAAC,EAAE,CAC1C,CAAC;QAEF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;KACtB;AACH,CAAC,CAAC;AAEK,MAAM,YAAY,GAAG,KAAK,IAAI,EAAE;IACrC,MAAM,iBAAiB,EAAE,CAAC;AAC5B,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/cli/lint/internal.ts"],
4
+ "sourcesContent": ["import path from 'path';\n\nimport chalk from 'chalk';\nimport { pathExists } from 'fs-extra';\n\nimport { log } from '../../utils/logging';\nimport { getConsumerManifest } from '../../utils/manifest';\n\nconst noSkubaTemplateJs = async () => {\n const manifest = await getConsumerManifest();\n\n if (!manifest) {\n return;\n }\n\n const templateConfigPath = path.join(\n path.dirname(manifest.path),\n 'skuba.template.js',\n );\n\n if (await pathExists(templateConfigPath)) {\n log.err(\n `Template is incomplete; run ${chalk.bold(\n 'yarn skuba configure',\n )}. ${chalk.dim('no-skuba-template-js')}`,\n );\n\n process.exitCode = 1;\n }\n};\n\nexport const internalLint = async () => {\n await noSkubaTemplateJs();\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,mBAAkB;AAClB,sBAA2B;AAE3B,qBAAoB;AACpB,sBAAoC;AAEpC,MAAM,oBAAoB,YAAY;AACpC,QAAM,WAAW,UAAM,qCAAoB;AAE3C,MAAI,CAAC,UAAU;AACb;AAAA,EACF;AAEA,QAAM,qBAAqB,YAAAA,QAAK;AAAA,IAC9B,YAAAA,QAAK,QAAQ,SAAS,IAAI;AAAA,IAC1B;AAAA,EACF;AAEA,MAAI,UAAM,4BAAW,kBAAkB,GAAG;AACxC,uBAAI;AAAA,MACF,+BAA+B,aAAAC,QAAM;AAAA,QACnC;AAAA,MACF,MAAM,aAAAA,QAAM,IAAI,sBAAsB;AAAA,IACxC;AAEA,YAAQ,WAAW;AAAA,EACrB;AACF;AAEO,MAAM,eAAe,YAAY;AACtC,QAAM,kBAAkB;AAC1B;",
6
+ "names": ["path", "chalk"]
7
+ }
@@ -1,21 +1,51 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
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 });
4
11
  };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.runPrettierInWorkerThread = exports.runPrettierInCurrentThread = void 0;
7
- const path_1 = __importDefault(require("path"));
8
- const worker_threads_1 = require("worker_threads");
9
- const chalk_1 = __importDefault(require("chalk"));
10
- const logging_1 = require("../../utils/logging");
11
- const worker_1 = require("../../utils/worker");
12
- const prettier_1 = require("../adapter/prettier");
13
- const LOG_PREFIX = chalk_1.default.cyan('Prettier │');
14
- const runPrettierInCurrentThread = ({ debug }) => (0, prettier_1.runPrettier)('lint', (0, logging_1.createLogger)(debug, LOG_PREFIX));
15
- exports.runPrettierInCurrentThread = runPrettierInCurrentThread;
16
- const runPrettierInWorkerThread = (input) => (0, worker_1.execWorkerThread)(path_1.default.posix.join(__dirname, 'prettier.js'), input);
17
- exports.runPrettierInWorkerThread = runPrettierInWorkerThread;
18
- if (!worker_threads_1.isMainThread) {
19
- (0, worker_1.postWorkerOutput)(exports.runPrettierInCurrentThread, (0, logging_1.createLogger)(false, LOG_PREFIX));
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
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var prettier_exports = {};
26
+ __export(prettier_exports, {
27
+ runPrettierInCurrentThread: () => runPrettierInCurrentThread,
28
+ runPrettierInWorkerThread: () => runPrettierInWorkerThread
29
+ });
30
+ module.exports = __toCommonJS(prettier_exports);
31
+ var import_path = __toESM(require("path"));
32
+ var import_worker_threads = require("worker_threads");
33
+ var import_chalk = __toESM(require("chalk"));
34
+ var import_logging = require("../../utils/logging");
35
+ var import_worker = require("../../utils/worker");
36
+ var import_prettier = require("../adapter/prettier");
37
+ const LOG_PREFIX = import_chalk.default.cyan("Prettier \u2502");
38
+ const runPrettierInCurrentThread = ({ debug }) => (0, import_prettier.runPrettier)("lint", (0, import_logging.createLogger)(debug, LOG_PREFIX));
39
+ const runPrettierInWorkerThread = (input) => (0, import_worker.execWorkerThread)(
40
+ import_path.default.posix.join(__dirname, "prettier.js"),
41
+ input
42
+ );
43
+ if (!import_worker_threads.isMainThread) {
44
+ (0, import_worker.postWorkerOutput)(runPrettierInCurrentThread, (0, import_logging.createLogger)(false, LOG_PREFIX));
20
45
  }
21
- //# sourceMappingURL=prettier.js.map
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {
48
+ runPrettierInCurrentThread,
49
+ runPrettierInWorkerThread
50
+ });
51
+ //# sourceMappingURL=prettier.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"prettier.js","sourceRoot":"","sources":["../../../src/cli/lint/prettier.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,mDAA8C;AAE9C,kDAA0B;AAE1B,iDAAmD;AACnD,+CAAwE;AAExE,kDAAkD;AAIlD,MAAM,UAAU,GAAG,eAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAErC,MAAM,0BAA0B,GAAG,CAAC,EAAE,KAAK,EAAS,EAAE,EAAE,CAC7D,IAAA,sBAAW,EAAC,MAAM,EAAE,IAAA,sBAAY,EAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AAD1C,QAAA,0BAA0B,8BACgB;AAEhD,MAAM,yBAAyB,GAAG,CAAC,KAAY,EAAE,EAAE,CACxD,IAAA,yBAAgB,EACd,cAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,EACzC,KAAK,CACN,CAAC;AAJS,QAAA,yBAAyB,6BAIlC;AAEJ,IAAI,CAAC,6BAAY,EAAE;IACjB,IAAA,yBAAgB,EAAC,kCAA0B,EAAE,IAAA,sBAAY,EAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;CAC/E"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/cli/lint/prettier.ts"],
4
+ "sourcesContent": ["import path from 'path';\nimport { isMainThread } from 'worker_threads';\n\nimport chalk from 'chalk';\n\nimport { createLogger } from '../../utils/logging';\nimport { execWorkerThread, postWorkerOutput } from '../../utils/worker';\nimport type { PrettierOutput } from '../adapter/prettier';\nimport { runPrettier } from '../adapter/prettier';\n\nimport type { Input } from './types';\n\nconst LOG_PREFIX = chalk.cyan('Prettier \u2502');\n\nexport const runPrettierInCurrentThread = ({ debug }: Input) =>\n runPrettier('lint', createLogger(debug, LOG_PREFIX));\n\nexport const runPrettierInWorkerThread = (input: Input) =>\n execWorkerThread<Input, PrettierOutput>(\n path.posix.join(__dirname, 'prettier.js'),\n input,\n );\n\nif (!isMainThread) {\n postWorkerOutput(runPrettierInCurrentThread, createLogger(false, LOG_PREFIX));\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,4BAA6B;AAE7B,mBAAkB;AAElB,qBAA6B;AAC7B,oBAAmD;AAEnD,sBAA4B;AAI5B,MAAM,aAAa,aAAAA,QAAM,KAAK,iBAAY;AAEnC,MAAM,6BAA6B,CAAC,EAAE,MAAM,UACjD,6BAAY,YAAQ,6BAAa,OAAO,UAAU,CAAC;AAE9C,MAAM,4BAA4B,CAAC,cACxC;AAAA,EACE,YAAAC,QAAK,MAAM,KAAK,WAAW,aAAa;AAAA,EACxC;AACF;AAEF,IAAI,CAAC,oCAAc;AACjB,sCAAiB,gCAA4B,6BAAa,OAAO,UAAU,CAAC;AAC9E;",
6
+ "names": ["chalk", "path"]
7
+ }
@@ -1,34 +1,58 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runTscInNewProcess = void 0;
4
- const exec_1 = require("../../utils/exec");
5
- const runTscInNewProcess = async ({ debug, tscOutputStream, }) => {
6
- const command = [
7
- 'tsc',
8
- ...(debug ? ['--extendedDiagnostics'] : []),
9
- '--noEmit',
10
- ].join(' ');
11
- try {
12
- // Misappropriate `concurrently` as a stdio prefixer.
13
- // We can use our regular console logger once we decide on an approach for
14
- // compiling in-process, whether by interacting with the TypeScript Compiler
15
- // API directly or using a higher-level tool like esbuild.
16
- await (0, exec_1.execConcurrently)([
17
- {
18
- command,
19
- name: 'tsc',
20
- prefixColor: 'blue',
21
- },
22
- ], {
23
- maxProcesses: 1,
24
- nameLength: 'Prettier'.length,
25
- outputStream: tscOutputStream,
26
- });
27
- return true;
28
- }
29
- catch {
30
- return false;
31
- }
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 });
32
9
  };
33
- exports.runTscInNewProcess = runTscInNewProcess;
34
- //# sourceMappingURL=tsc.js.map
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 tsc_exports = {};
20
+ __export(tsc_exports, {
21
+ runTscInNewProcess: () => runTscInNewProcess
22
+ });
23
+ module.exports = __toCommonJS(tsc_exports);
24
+ var import_exec = require("../../utils/exec");
25
+ const runTscInNewProcess = async ({
26
+ debug,
27
+ tscOutputStream
28
+ }) => {
29
+ const command = [
30
+ "tsc",
31
+ ...debug ? ["--extendedDiagnostics"] : [],
32
+ "--noEmit"
33
+ ].join(" ");
34
+ try {
35
+ await (0, import_exec.execConcurrently)(
36
+ [
37
+ {
38
+ command,
39
+ name: "tsc",
40
+ prefixColor: "blue"
41
+ }
42
+ ],
43
+ {
44
+ maxProcesses: 1,
45
+ nameLength: "Prettier".length,
46
+ outputStream: tscOutputStream
47
+ }
48
+ );
49
+ return true;
50
+ } catch {
51
+ return false;
52
+ }
53
+ };
54
+ // Annotate the CommonJS export names for ESM import in node:
55
+ 0 && (module.exports = {
56
+ runTscInNewProcess
57
+ });
58
+ //# sourceMappingURL=tsc.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"tsc.js","sourceRoot":"","sources":["../../../src/cli/lint/tsc.ts"],"names":[],"mappings":";;;AAAA,2CAAoD;AAI7C,MAAM,kBAAkB,GAAG,KAAK,EAAE,EACvC,KAAK,EACL,eAAe,GACT,EAAoB,EAAE;IAC5B,MAAM,OAAO,GAAG;QACd,KAAK;QACL,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,UAAU;KACX,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEZ,IAAI;QACF,qDAAqD;QACrD,0EAA0E;QAC1E,4EAA4E;QAC5E,0DAA0D;QAC1D,MAAM,IAAA,uBAAgB,EACpB;YACE;gBACE,OAAO;gBACP,IAAI,EAAE,KAAK;gBACX,WAAW,EAAE,MAAM;aACpB;SACF,EACD;YACE,YAAY,EAAE,CAAC;YACf,UAAU,EAAE,UAAU,CAAC,MAAM;YAC7B,YAAY,EAAE,eAAe;SAC9B,CACF,CAAC;QAEF,OAAO,IAAI,CAAC;KACb;IAAC,MAAM;QACN,OAAO,KAAK,CAAC;KACd;AACH,CAAC,CAAC;AAlCW,QAAA,kBAAkB,sBAkC7B"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/cli/lint/tsc.ts"],
4
+ "sourcesContent": ["import { execConcurrently } from '../../utils/exec';\n\nimport type { Input } from './types';\n\nexport const runTscInNewProcess = async ({\n debug,\n tscOutputStream,\n}: Input): Promise<boolean> => {\n const command = [\n 'tsc',\n ...(debug ? ['--extendedDiagnostics'] : []),\n '--noEmit',\n ].join(' ');\n\n try {\n // Misappropriate `concurrently` as a stdio prefixer.\n // We can use our regular console logger once we decide on an approach for\n // compiling in-process, whether by interacting with the TypeScript Compiler\n // API directly or using a higher-level tool like esbuild.\n await execConcurrently(\n [\n {\n command,\n name: 'tsc',\n prefixColor: 'blue',\n },\n ],\n {\n maxProcesses: 1,\n nameLength: 'Prettier'.length,\n outputStream: tscOutputStream,\n },\n );\n\n return true;\n } catch {\n return false;\n }\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AAI1B,MAAM,qBAAqB,OAAO;AAAA,EACvC;AAAA,EACA;AACF,MAA+B;AAC7B,QAAM,UAAU;AAAA,IACd;AAAA,IACA,GAAI,QAAQ,CAAC,uBAAuB,IAAI,CAAC;AAAA,IACzC;AAAA,EACF,EAAE,KAAK,GAAG;AAEV,MAAI;AAKF,cAAM;AAAA,MACJ;AAAA,QACE;AAAA,UACE;AAAA,UACA,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,MACF;AAAA,MACA;AAAA,QACE,cAAc;AAAA,QACd,YAAY,WAAW;AAAA,QACvB,cAAc;AAAA,MAChB;AAAA,IACF;AAEA,WAAO;AAAA,EACT,QAAE;AACA,WAAO;AAAA,EACT;AACF;",
6
+ "names": []
7
+ }
@@ -1,3 +1,17 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var types_exports = {};
16
+ module.exports = __toCommonJS(types_exports);
17
+ //# sourceMappingURL=types.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/cli/lint/types.ts"],"names":[],"mappings":""}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/cli/lint/types.ts"],
4
+ "sourcesContent": ["import type { Writable } from 'stream';\n\nexport interface Input {\n /**\n * Whether to enable verbose debug logging.\n *\n * Defaults to `false`.\n */\n debug: boolean;\n\n /**\n * Whether to disable parallelism to run linting operations serially.\n *\n * This can be useful for executing in resource-constrained environments and\n * snapshotting deterministic output in tests.\n *\n * Defaults to `false`.\n */\n serial: boolean;\n\n /**\n * An override output stream that can be supplied to test `tsc` logging.\n *\n * Defaults to `process.stdout`.\n */\n tscOutputStream?: Writable;\n\n /**\n * Whether to allow usage of Node.js worker threads.\n *\n * This may be set to `false` when there is a worker thread incompatibility,\n * such as calling in from a TypeScript context in our Jest tests.\n *\n * Defaults to `true`.\n */\n workerThreads?: boolean;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
package/lib/cli/node.js CHANGED
@@ -1,64 +1,71 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
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 });
24
11
  };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
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;
27
19
  };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.node = void 0;
30
- const path_1 = __importDefault(require("path"));
31
- const get_port_1 = __importDefault(require("get-port"));
32
- const tsNode = __importStar(require("ts-node"));
33
- const args_1 = require("../utils/args");
34
- const exec_1 = require("../utils/exec");
35
- const validation_1 = require("../utils/validation");
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var node_exports = {};
26
+ __export(node_exports, {
27
+ node: () => node
28
+ });
29
+ module.exports = __toCommonJS(node_exports);
30
+ var import_path = __toESM(require("path"));
31
+ var import_get_port = __toESM(require("get-port"));
32
+ var tsNode = __toESM(require("ts-node"));
33
+ var import_args = require("../utils/args");
34
+ var import_exec = require("../utils/exec");
35
+ var import_validation = require("../utils/validation");
36
36
  const node = async () => {
37
- const args = (0, args_1.parseRunArgs)(process.argv.slice(2));
38
- const availablePort = await (0, get_port_1.default)();
39
- if (args.entryPoint) {
40
- const exec = (0, exec_1.createExec)({
41
- env: {
42
- __SKUBA_ENTRY_POINT: args.entryPoint,
43
- __SKUBA_PORT: String((0, validation_1.isIpPort)(args.port) ? args.port : availablePort),
44
- },
45
- });
46
- // Run a script with plain `node` to support inspector options.
47
- // https://github.com/TypeStrong/ts-node#programmatic
48
- return exec('node', ...args.node, '--require', 'dotenv/config', '--require', 'tsconfig-paths/register', '--require', 'ts-node/register/transpile-only',
49
- // Override dangerously warn-only default on Node.js <15 so that we
50
- // predictably return a non-zero exit code on an unhandled rejection.
51
- '--unhandled-rejections=throw', path_1.default.join(__dirname, '..', 'wrapper'), ...args.script);
52
- }
53
- // REPL with `ts-node` to support import statements.
54
- return tsNode
55
- .createRepl({
56
- service: tsNode.register({
57
- require: ['dotenv/config', 'tsconfig-paths/register'],
58
- transpileOnly: true,
59
- }),
37
+ const args = (0, import_args.parseRunArgs)(process.argv.slice(2));
38
+ const availablePort = await (0, import_get_port.default)();
39
+ if (args.entryPoint) {
40
+ const exec = (0, import_exec.createExec)({
41
+ env: {
42
+ __SKUBA_ENTRY_POINT: args.entryPoint,
43
+ __SKUBA_PORT: String((0, import_validation.isIpPort)(args.port) ? args.port : availablePort)
44
+ }
45
+ });
46
+ return exec(
47
+ "node",
48
+ ...args.node,
49
+ "--require",
50
+ "dotenv/config",
51
+ "--require",
52
+ "tsconfig-paths/register",
53
+ "--require",
54
+ "ts-node/register/transpile-only",
55
+ "--unhandled-rejections=throw",
56
+ import_path.default.join(__dirname, "..", "wrapper"),
57
+ ...args.script
58
+ );
59
+ }
60
+ return tsNode.createRepl({
61
+ service: tsNode.register({
62
+ require: ["dotenv/config", "tsconfig-paths/register"],
63
+ transpileOnly: true
60
64
  })
61
- .start();
65
+ }).start();
62
66
  };
63
- exports.node = node;
64
- //# sourceMappingURL=node.js.map
67
+ // Annotate the CommonJS export names for ESM import in node:
68
+ 0 && (module.exports = {
69
+ node
70
+ });
71
+ //# sourceMappingURL=node.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/cli/node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AAExB,wDAA+B;AAC/B,gDAAkC;AAElC,wCAA6C;AAC7C,wCAA2C;AAC3C,oDAA+C;AAExC,MAAM,IAAI,GAAG,KAAK,IAAI,EAAE;IAC7B,MAAM,IAAI,GAAG,IAAA,mBAAY,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAEjD,MAAM,aAAa,GAAG,MAAM,IAAA,kBAAO,GAAE,CAAC;IAEtC,IAAI,IAAI,CAAC,UAAU,EAAE;QACnB,MAAM,IAAI,GAAG,IAAA,iBAAU,EAAC;YACtB,GAAG,EAAE;gBACH,mBAAmB,EAAE,IAAI,CAAC,UAAU;gBACpC,YAAY,EAAE,MAAM,CAAC,IAAA,qBAAQ,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC;aACtE;SACF,CAAC,CAAC;QAEH,+DAA+D;QAC/D,qDAAqD;QACrD,OAAO,IAAI,CACT,MAAM,EACN,GAAG,IAAI,CAAC,IAAI,EACZ,WAAW,EACX,eAAe,EACf,WAAW,EACX,yBAAyB,EACzB,WAAW,EACX,iCAAiC;QACjC,mEAAmE;QACnE,qEAAqE;QACrE,8BAA8B,EAC9B,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,EACrC,GAAG,IAAI,CAAC,MAAM,CACf,CAAC;KACH;IAED,oDAAoD;IACpD,OAAO,MAAM;SACV,UAAU,CAAC;QACV,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC;YACvB,OAAO,EAAE,CAAC,eAAe,EAAE,yBAAyB,CAAC;YACrD,aAAa,EAAE,IAAI;SACpB,CAAC;KACH,CAAC;SACD,KAAK,EAAE,CAAC;AACb,CAAC,CAAC;AAzCW,QAAA,IAAI,QAyCf"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/cli/node.ts"],
4
+ "sourcesContent": ["import path from 'path';\n\nimport getPort from 'get-port';\nimport * as tsNode from 'ts-node';\n\nimport { parseRunArgs } from '../utils/args';\nimport { createExec } from '../utils/exec';\nimport { isIpPort } from '../utils/validation';\n\nexport const node = async () => {\n const args = parseRunArgs(process.argv.slice(2));\n\n const availablePort = await getPort();\n\n if (args.entryPoint) {\n const exec = createExec({\n env: {\n __SKUBA_ENTRY_POINT: args.entryPoint,\n __SKUBA_PORT: String(isIpPort(args.port) ? args.port : availablePort),\n },\n });\n\n // Run a script with plain `node` to support inspector options.\n // https://github.com/TypeStrong/ts-node#programmatic\n return exec(\n 'node',\n ...args.node,\n '--require',\n 'dotenv/config',\n '--require',\n 'tsconfig-paths/register',\n '--require',\n 'ts-node/register/transpile-only',\n // Override dangerously warn-only default on Node.js <15 so that we\n // predictably return a non-zero exit code on an unhandled rejection.\n '--unhandled-rejections=throw',\n path.join(__dirname, '..', 'wrapper'),\n ...args.script,\n );\n }\n\n // REPL with `ts-node` to support import statements.\n return tsNode\n .createRepl({\n service: tsNode.register({\n require: ['dotenv/config', 'tsconfig-paths/register'],\n transpileOnly: true,\n }),\n })\n .start();\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,sBAAoB;AACpB,aAAwB;AAExB,kBAA6B;AAC7B,kBAA2B;AAC3B,wBAAyB;AAElB,MAAM,OAAO,YAAY;AAC9B,QAAM,WAAO,0BAAa,QAAQ,KAAK,MAAM,CAAC,CAAC;AAE/C,QAAM,gBAAgB,UAAM,gBAAAA,SAAQ;AAEpC,MAAI,KAAK,YAAY;AACnB,UAAM,WAAO,wBAAW;AAAA,MACtB,KAAK;AAAA,QACH,qBAAqB,KAAK;AAAA,QAC1B,cAAc,WAAO,4BAAS,KAAK,IAAI,IAAI,KAAK,OAAO,aAAa;AAAA,MACtE;AAAA,IACF,CAAC;AAID,WAAO;AAAA,MACL;AAAA,MACA,GAAG,KAAK;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAGA;AAAA,MACA,YAAAC,QAAK,KAAK,WAAW,MAAM,SAAS;AAAA,MACpC,GAAG,KAAK;AAAA,IACV;AAAA,EACF;AAGA,SAAO,OACJ,WAAW;AAAA,IACV,SAAS,OAAO,SAAS;AAAA,MACvB,SAAS,CAAC,iBAAiB,yBAAyB;AAAA,MACpD,eAAe;AAAA,IACjB,CAAC;AAAA,EACH,CAAC,EACA,MAAM;AACX;",
6
+ "names": ["getPort", "path"]
7
+ }
@@ -1,9 +1,32 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.release = void 0;
4
- const exec_1 = require("../utils/exec");
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 release_exports = {};
20
+ __export(release_exports, {
21
+ release: () => release
22
+ });
23
+ module.exports = __toCommonJS(release_exports);
24
+ var import_exec = require("../utils/exec");
5
25
  const release = async () => {
6
- await (0, exec_1.exec)('semantic-release', '--success', 'false');
26
+ await (0, import_exec.exec)("semantic-release", "--success", "false");
7
27
  };
8
- exports.release = release;
9
- //# sourceMappingURL=release.js.map
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ release
31
+ });
32
+ //# sourceMappingURL=release.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"release.js","sourceRoot":"","sources":["../../src/cli/release.ts"],"names":[],"mappings":";;;AAAA,wCAAqC;AAE9B,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE;IAChC,MAAM,IAAA,WAAI,EAAC,kBAAkB,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;AACvD,CAAC,CAAC;AAFW,QAAA,OAAO,WAElB"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/cli/release.ts"],
4
+ "sourcesContent": ["import { exec } from '../utils/exec';\n\nexport const release = async () => {\n await exec('semantic-release', '--success', 'false');\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB;AAEd,MAAM,UAAU,YAAY;AACjC,YAAM,kBAAK,oBAAoB,aAAa,OAAO;AACrD;",
6
+ "names": []
7
+ }