@pristine-ts/cli 1.0.440 → 2.0.2

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 (220) hide show
  1. package/dist/bin/pristine.cjs +7 -0
  2. package/dist/lib/cjs/bin.js +15 -1
  3. package/dist/lib/cjs/bin.js.map +1 -1
  4. package/dist/lib/cjs/bootstrap/app-module-loader.js +321 -0
  5. package/dist/lib/cjs/bootstrap/app-module-loader.js.map +1 -0
  6. package/dist/lib/cjs/bootstrap/bootstrap.js +31 -0
  7. package/dist/lib/cjs/bootstrap/bootstrap.js.map +1 -0
  8. package/dist/lib/cjs/bootstrap/build-manifest-checker.js +67 -0
  9. package/dist/lib/cjs/bootstrap/build-manifest-checker.js.map +1 -0
  10. package/dist/lib/cjs/bootstrap/build-manifest-reader.js +44 -0
  11. package/dist/lib/cjs/bootstrap/build-manifest-reader.js.map +1 -0
  12. package/dist/lib/cjs/bootstrap/build-manifest-staleness.enum.js +23 -0
  13. package/dist/lib/cjs/bootstrap/build-manifest-staleness.enum.js.map +1 -0
  14. package/dist/lib/cjs/bootstrap/build-manifest-writer.js +55 -0
  15. package/dist/lib/cjs/bootstrap/build-manifest-writer.js.map +1 -0
  16. package/dist/lib/cjs/bootstrap/build-manifest.js +31 -0
  17. package/dist/lib/cjs/bootstrap/build-manifest.js.map +1 -0
  18. package/dist/lib/cjs/bootstrap/build-runner.js +44 -0
  19. package/dist/lib/cjs/bootstrap/build-runner.js.map +1 -0
  20. package/dist/lib/cjs/bootstrap/build-staleness-prompt.js +90 -0
  21. package/dist/lib/cjs/bootstrap/build-staleness-prompt.js.map +1 -0
  22. package/dist/lib/cjs/bootstrap/dynamic-importer.js +43 -0
  23. package/dist/lib/cjs/bootstrap/dynamic-importer.js.map +1 -0
  24. package/dist/lib/cjs/bootstrap/init-prompt.js +127 -0
  25. package/dist/lib/cjs/bootstrap/init-prompt.js.map +1 -0
  26. package/dist/lib/cjs/bootstrap/loaded-app-module.js +29 -0
  27. package/dist/lib/cjs/bootstrap/loaded-app-module.js.map +1 -0
  28. package/dist/lib/cjs/bootstrap/loaded-plugin.js +22 -0
  29. package/dist/lib/cjs/bootstrap/loaded-plugin.js.map +1 -0
  30. package/dist/lib/cjs/bootstrap/plugin-loader.js +149 -0
  31. package/dist/lib/cjs/bootstrap/plugin-loader.js.map +1 -0
  32. package/dist/lib/cjs/bootstrap/source-hasher.js +41 -0
  33. package/dist/lib/cjs/bootstrap/source-hasher.js.map +1 -0
  34. package/dist/lib/cjs/cli.js +94 -111
  35. package/dist/lib/cjs/cli.js.map +1 -1
  36. package/dist/lib/cjs/cli.module.js +9 -1
  37. package/dist/lib/cjs/cli.module.js.map +1 -1
  38. package/dist/lib/cjs/commands/build-alias.command.js +50 -0
  39. package/dist/lib/cjs/commands/build-alias.command.js.map +1 -0
  40. package/dist/lib/cjs/commands/build.command.js +173 -0
  41. package/dist/lib/cjs/commands/build.command.js.map +1 -0
  42. package/dist/lib/cjs/commands/commands.js +15 -0
  43. package/dist/lib/cjs/commands/commands.js.map +1 -1
  44. package/dist/lib/cjs/commands/config-print.command.js +75 -0
  45. package/dist/lib/cjs/commands/config-print.command.js.map +1 -0
  46. package/dist/lib/cjs/commands/help-alias.command.js +52 -0
  47. package/dist/lib/cjs/commands/help-alias.command.js.map +1 -0
  48. package/dist/lib/cjs/commands/help.command.js +44 -10
  49. package/dist/lib/cjs/commands/help.command.js.map +1 -1
  50. package/dist/lib/cjs/commands/info-alias.command.js +50 -0
  51. package/dist/lib/cjs/commands/info-alias.command.js.map +1 -0
  52. package/dist/lib/cjs/commands/info.command.js +162 -0
  53. package/dist/lib/cjs/commands/info.command.js.map +1 -0
  54. package/dist/lib/cjs/commands/init-alias.command.js +51 -0
  55. package/dist/lib/cjs/commands/init-alias.command.js.map +1 -0
  56. package/dist/lib/cjs/commands/init.command-options.js +53 -0
  57. package/dist/lib/cjs/commands/init.command-options.js.map +1 -0
  58. package/dist/lib/cjs/commands/init.command.js +249 -0
  59. package/dist/lib/cjs/commands/init.command.js.map +1 -0
  60. package/dist/lib/cjs/commands/list-alias.command.js +50 -0
  61. package/dist/lib/cjs/commands/list-alias.command.js.map +1 -0
  62. package/dist/lib/cjs/commands/list.command.js +7 -1
  63. package/dist/lib/cjs/commands/list.command.js.map +1 -1
  64. package/dist/lib/cjs/commands/start-alias.command.js +51 -0
  65. package/dist/lib/cjs/commands/start-alias.command.js.map +1 -0
  66. package/dist/lib/cjs/commands/start.command-options.js +34 -0
  67. package/dist/lib/cjs/commands/start.command-options.js.map +1 -0
  68. package/dist/lib/cjs/commands/start.command.js +169 -0
  69. package/dist/lib/cjs/commands/start.command.js.map +1 -0
  70. package/dist/lib/cjs/commands/verify-alias.command.js +50 -0
  71. package/dist/lib/cjs/commands/verify-alias.command.js.map +1 -0
  72. package/dist/lib/cjs/commands/verify.command.js +71 -0
  73. package/dist/lib/cjs/commands/verify.command.js.map +1 -0
  74. package/dist/lib/cjs/config/config-loader.js +136 -0
  75. package/dist/lib/cjs/config/config-loader.js.map +1 -0
  76. package/dist/lib/cjs/config/config-provenance.enum.js +15 -0
  77. package/dist/lib/cjs/config/config-provenance.enum.js.map +1 -0
  78. package/dist/lib/cjs/config/config.js +22 -0
  79. package/dist/lib/cjs/config/config.js.map +1 -0
  80. package/dist/lib/cjs/config/define-config.js +18 -0
  81. package/dist/lib/cjs/config/define-config.js.map +1 -0
  82. package/dist/lib/cjs/config/pristine-config.interface.js +3 -0
  83. package/dist/lib/cjs/config/pristine-config.interface.js.map +1 -0
  84. package/dist/lib/cjs/config/resolved-pristine-config.js +25 -0
  85. package/dist/lib/cjs/config/resolved-pristine-config.js.map +1 -0
  86. package/dist/lib/cjs/event-handlers/cli.event-handler.js +69 -48
  87. package/dist/lib/cjs/event-handlers/cli.event-handler.js.map +1 -1
  88. package/dist/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -0
  89. package/dist/lib/esm/bin.js +15 -1
  90. package/dist/lib/esm/bin.js.map +1 -1
  91. package/dist/lib/esm/bootstrap/app-module-loader.js +315 -0
  92. package/dist/lib/esm/bootstrap/app-module-loader.js.map +1 -0
  93. package/dist/lib/esm/bootstrap/bootstrap.js +15 -0
  94. package/dist/lib/esm/bootstrap/bootstrap.js.map +1 -0
  95. package/dist/lib/esm/bootstrap/build-manifest-checker.js +61 -0
  96. package/dist/lib/esm/bootstrap/build-manifest-checker.js.map +1 -0
  97. package/dist/lib/esm/bootstrap/build-manifest-reader.js +38 -0
  98. package/dist/lib/esm/bootstrap/build-manifest-reader.js.map +1 -0
  99. package/dist/lib/esm/bootstrap/build-manifest-staleness.enum.js +20 -0
  100. package/dist/lib/esm/bootstrap/build-manifest-staleness.enum.js.map +1 -0
  101. package/dist/lib/esm/bootstrap/build-manifest-writer.js +49 -0
  102. package/dist/lib/esm/bootstrap/build-manifest-writer.js.map +1 -0
  103. package/dist/lib/esm/bootstrap/build-manifest.js +27 -0
  104. package/dist/lib/esm/bootstrap/build-manifest.js.map +1 -0
  105. package/dist/lib/esm/bootstrap/build-runner.js +41 -0
  106. package/dist/lib/esm/bootstrap/build-runner.js.map +1 -0
  107. package/dist/lib/esm/bootstrap/build-staleness-prompt.js +87 -0
  108. package/dist/lib/esm/bootstrap/build-staleness-prompt.js.map +1 -0
  109. package/dist/lib/esm/bootstrap/dynamic-importer.js +40 -0
  110. package/dist/lib/esm/bootstrap/dynamic-importer.js.map +1 -0
  111. package/dist/lib/esm/bootstrap/init-prompt.js +124 -0
  112. package/dist/lib/esm/bootstrap/init-prompt.js.map +1 -0
  113. package/dist/lib/esm/bootstrap/loaded-app-module.js +25 -0
  114. package/dist/lib/esm/bootstrap/loaded-app-module.js.map +1 -0
  115. package/dist/lib/esm/bootstrap/loaded-plugin.js +18 -0
  116. package/dist/lib/esm/bootstrap/loaded-plugin.js.map +1 -0
  117. package/dist/lib/esm/bootstrap/plugin-loader.js +143 -0
  118. package/dist/lib/esm/bootstrap/plugin-loader.js.map +1 -0
  119. package/dist/lib/esm/bootstrap/source-hasher.js +35 -0
  120. package/dist/lib/esm/bootstrap/source-hasher.js.map +1 -0
  121. package/dist/lib/esm/cli.js +109 -0
  122. package/dist/lib/esm/cli.js.map +1 -0
  123. package/dist/lib/esm/cli.module.js +7 -0
  124. package/dist/lib/esm/cli.module.js.map +1 -1
  125. package/dist/lib/esm/commands/build-alias.command.js +47 -0
  126. package/dist/lib/esm/commands/build-alias.command.js.map +1 -0
  127. package/dist/lib/esm/commands/build.command.js +167 -0
  128. package/dist/lib/esm/commands/build.command.js.map +1 -0
  129. package/dist/lib/esm/commands/commands.js +15 -0
  130. package/dist/lib/esm/commands/commands.js.map +1 -1
  131. package/dist/lib/esm/commands/config-print.command.js +69 -0
  132. package/dist/lib/esm/commands/config-print.command.js.map +1 -0
  133. package/dist/lib/esm/commands/help-alias.command.js +49 -0
  134. package/dist/lib/esm/commands/help-alias.command.js.map +1 -0
  135. package/dist/lib/esm/commands/help.command.js +44 -10
  136. package/dist/lib/esm/commands/help.command.js.map +1 -1
  137. package/dist/lib/esm/commands/info-alias.command.js +47 -0
  138. package/dist/lib/esm/commands/info-alias.command.js.map +1 -0
  139. package/dist/lib/esm/commands/info.command.js +156 -0
  140. package/dist/lib/esm/commands/info.command.js.map +1 -0
  141. package/dist/lib/esm/commands/init-alias.command.js +48 -0
  142. package/dist/lib/esm/commands/init-alias.command.js.map +1 -0
  143. package/dist/lib/esm/commands/init.command-options.js +49 -0
  144. package/dist/lib/esm/commands/init.command-options.js.map +1 -0
  145. package/dist/lib/esm/commands/init.command.js +243 -0
  146. package/dist/lib/esm/commands/init.command.js.map +1 -0
  147. package/dist/lib/esm/commands/list-alias.command.js +47 -0
  148. package/dist/lib/esm/commands/list-alias.command.js.map +1 -0
  149. package/dist/lib/esm/commands/list.command.js +8 -2
  150. package/dist/lib/esm/commands/list.command.js.map +1 -1
  151. package/dist/lib/esm/commands/start-alias.command.js +48 -0
  152. package/dist/lib/esm/commands/start-alias.command.js.map +1 -0
  153. package/dist/lib/esm/commands/start.command-options.js +30 -0
  154. package/dist/lib/esm/commands/start.command-options.js.map +1 -0
  155. package/dist/lib/esm/commands/start.command.js +166 -0
  156. package/dist/lib/esm/commands/start.command.js.map +1 -0
  157. package/dist/lib/esm/commands/verify-alias.command.js +47 -0
  158. package/dist/lib/esm/commands/verify-alias.command.js.map +1 -0
  159. package/dist/lib/esm/commands/verify.command.js +68 -0
  160. package/dist/lib/esm/commands/verify.command.js.map +1 -0
  161. package/dist/lib/esm/config/config-loader.js +130 -0
  162. package/dist/lib/esm/config/config-loader.js.map +1 -0
  163. package/dist/lib/esm/config/config-provenance.enum.js +12 -0
  164. package/dist/lib/esm/config/config-provenance.enum.js.map +1 -0
  165. package/dist/lib/esm/config/config.js +6 -0
  166. package/dist/lib/esm/config/config.js.map +1 -0
  167. package/dist/lib/esm/config/define-config.js +14 -0
  168. package/dist/lib/esm/config/define-config.js.map +1 -0
  169. package/dist/lib/esm/config/pristine-config.interface.js +2 -0
  170. package/dist/lib/esm/config/pristine-config.interface.js.map +1 -0
  171. package/dist/lib/esm/config/resolved-pristine-config.js +21 -0
  172. package/dist/lib/esm/config/resolved-pristine-config.js.map +1 -0
  173. package/dist/lib/esm/event-handlers/cli.event-handler.js +69 -48
  174. package/dist/lib/esm/event-handlers/cli.event-handler.js.map +1 -1
  175. package/dist/lib/esm/tsconfig.tsbuildinfo +1 -0
  176. package/dist/types/bootstrap/app-module-loader.d.ts +83 -0
  177. package/dist/types/bootstrap/bootstrap.d.ts +14 -0
  178. package/dist/types/bootstrap/build-manifest-checker.d.ts +19 -0
  179. package/dist/types/bootstrap/build-manifest-reader.d.ts +14 -0
  180. package/dist/types/bootstrap/build-manifest-staleness.enum.d.ts +18 -0
  181. package/dist/types/bootstrap/build-manifest-writer.d.ts +19 -0
  182. package/dist/types/bootstrap/build-manifest.d.ts +29 -0
  183. package/dist/types/bootstrap/build-runner.d.ts +16 -0
  184. package/dist/types/bootstrap/build-staleness-prompt.d.ts +27 -0
  185. package/dist/types/bootstrap/dynamic-importer.d.ts +13 -0
  186. package/dist/types/bootstrap/init-prompt.d.ts +38 -0
  187. package/dist/types/bootstrap/loaded-app-module.d.ts +40 -0
  188. package/dist/types/bootstrap/loaded-plugin.d.ts +20 -0
  189. package/dist/types/bootstrap/plugin-loader.d.ts +35 -0
  190. package/dist/types/bootstrap/source-hasher.d.ts +15 -0
  191. package/dist/types/cli.d.ts +12 -0
  192. package/dist/types/cli.module.d.ts +3 -0
  193. package/dist/types/commands/build-alias.command.d.ts +15 -0
  194. package/dist/types/commands/build.command.d.ts +47 -0
  195. package/dist/types/commands/commands.d.ts +15 -0
  196. package/dist/types/commands/config-print.command.d.ts +18 -0
  197. package/dist/types/commands/help-alias.command.d.ts +17 -0
  198. package/dist/types/commands/help.command.d.ts +19 -1
  199. package/dist/types/commands/info-alias.command.d.ts +15 -0
  200. package/dist/types/commands/info.command.d.ts +41 -0
  201. package/dist/types/commands/init-alias.command.d.ts +16 -0
  202. package/dist/types/commands/init.command-options.d.ts +22 -0
  203. package/dist/types/commands/init.command.d.ts +60 -0
  204. package/dist/types/commands/list-alias.command.d.ts +15 -0
  205. package/dist/types/commands/list.command.d.ts +6 -0
  206. package/dist/types/commands/start-alias.command.d.ts +16 -0
  207. package/dist/types/commands/start.command-options.d.ts +11 -0
  208. package/dist/types/commands/start.command.d.ts +47 -0
  209. package/dist/types/commands/verify-alias.command.d.ts +15 -0
  210. package/dist/types/commands/verify.command.d.ts +24 -0
  211. package/dist/types/config/config-loader.d.ts +40 -0
  212. package/dist/types/config/config-provenance.enum.d.ts +10 -0
  213. package/dist/types/config/config.d.ts +5 -0
  214. package/dist/types/config/define-config.d.ts +14 -0
  215. package/dist/types/config/pristine-config.interface.d.ts +67 -0
  216. package/dist/types/config/resolved-pristine-config.d.ts +28 -0
  217. package/dist/types/event-handlers/cli.event-handler.d.ts +30 -3
  218. package/dist/types/interfaces/command.interface.d.ts +31 -3
  219. package/package.json +16 -13
  220. package/readme.md +1023 -17
@@ -3,7 +3,9 @@ import { CoreModule } from "@pristine-ts/core";
3
3
  import { ValidationModule } from "@pristine-ts/validation";
4
4
  import { LoggingModule } from "@pristine-ts/logging";
5
5
  import { DataMappingModule } from "@pristine-ts/data-mapping";
6
+ export * from "./bootstrap/bootstrap";
6
7
  export * from "./commands/commands";
8
+ export * from "./config/config";
7
9
  export * from "./enums/enums";
8
10
  export * from "./errors/errors";
9
11
  export * from "./event-handlers/event-handlers";
@@ -13,6 +15,11 @@ export * from "./managers/managers";
13
15
  export * from "./mappers/mappers";
14
16
  export * from "./options/options";
15
17
  export * from "./types/types";
18
+ // Re-export the bootstrap entrypoint so `bin.ts` (and any other downstream entry script)
19
+ // can invoke `require('@pristine-ts/cli').bootstrap()` to load the same physical CLI
20
+ // classes the consumer's AppModule references — avoiding cross-realm decorator metadata
21
+ // mismatches that occur when bin and consumer end up with separate copies.
22
+ export { bootstrap } from "./cli";
16
23
  export const CliModule = {
17
24
  keyname: CliModuleKeyname,
18
25
  configurationDefinitions: [],
@@ -1 +1 @@
1
- {"version":3,"file":"cli.module.js","sourceRoot":"","sources":["../../../src/cli.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAA;AAE3D,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAE9B,MAAM,CAAC,MAAM,SAAS,GAAoB;IACxC,OAAO,EAAE,gBAAgB;IACzB,wBAAwB,EAAE,EAAE;IAC5B,aAAa,EAAE;QACb,UAAU;QACV,iBAAiB;QACjB,aAAa;QACb,gBAAgB;KACjB;CACF,CAAA"}
1
+ {"version":3,"file":"cli.module.js","sourceRoot":"","sources":["../../../src/cli.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAA;AAE3D,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAE9B,yFAAyF;AACzF,qFAAqF;AACrF,wFAAwF;AACxF,2EAA2E;AAC3E,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAEhC,MAAM,CAAC,MAAM,SAAS,GAAoB;IACxC,OAAO,EAAE,gBAAgB;IACzB,wBAAwB,EAAE,EAAE;IAC5B,aAAa,EAAE;QACb,UAAU;QACV,iBAAiB;QACjB,aAAa;QACb,gBAAgB;KACjB;CACF,CAAA"}
@@ -0,0 +1,47 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
11
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12
+ return new (P || (P = Promise))(function (resolve, reject) {
13
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
14
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
15
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
16
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
17
+ });
18
+ };
19
+ import { moduleScoped, ServiceDefinitionTagEnum, tag } from "@pristine-ts/common";
20
+ import { injectable } from "tsyringe";
21
+ import { CliModuleKeyname } from "../cli.module.keyname";
22
+ import { BuildCommand } from "./build.command";
23
+ /**
24
+ * Top-level alias for the framework-reserved `p:build` command. Injects the delegate
25
+ * directly via standard DI.
26
+ */
27
+ let BuildAliasCommand = class BuildAliasCommand {
28
+ constructor(delegate) {
29
+ this.delegate = delegate;
30
+ this.optionsType = null;
31
+ this.name = "build";
32
+ this.description = "Alias for p:build.";
33
+ }
34
+ run(args) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ return this.delegate.run(args);
37
+ });
38
+ }
39
+ };
40
+ BuildAliasCommand = __decorate([
41
+ tag(ServiceDefinitionTagEnum.Command),
42
+ moduleScoped(CliModuleKeyname),
43
+ injectable(),
44
+ __metadata("design:paramtypes", [BuildCommand])
45
+ ], BuildAliasCommand);
46
+ export { BuildAliasCommand };
47
+ //# sourceMappingURL=build-alias.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-alias.command.js","sourceRoot":"","sources":["../../../../src/commands/build-alias.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,GAAG,EAAC,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAGpC,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AAII,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAK5B,YAA6B,QAAsB;QAAtB,aAAQ,GAAR,QAAQ,CAAc;QAJnD,gBAAW,GAAG,IAAI,CAAC;QACnB,SAAI,GAAG,OAAO,CAAC;QACf,gBAAW,GAAG,oBAAoB,CAAC;IAGnC,CAAC;IAEK,GAAG,CAAC,IAAS;;YACjB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;KAAA;CACF,CAAA;AAXY,iBAAiB;IAH7B,GAAG,CAAC,wBAAwB,CAAC,OAAO,CAAC;IACrC,YAAY,CAAC,gBAAgB,CAAC;IAC9B,UAAU,EAAE;qCAM4B,YAAY;GALxC,iBAAiB,CAW7B"}
@@ -0,0 +1,167 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
11
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12
+ return new (P || (P = Promise))(function (resolve, reject) {
13
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
14
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
15
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
16
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
17
+ });
18
+ };
19
+ import fs from "fs";
20
+ import path from "path";
21
+ import { moduleScoped, ServiceDefinitionTagEnum, tag } from "@pristine-ts/common";
22
+ import { injectable } from "tsyringe";
23
+ import { ConsoleManager } from "../managers/console.manager";
24
+ import { ShellManager } from "../managers/shell.manager";
25
+ import { ExitCodeEnum } from "../enums/exit-code.enum";
26
+ import { CliModuleKeyname } from "../cli.module.keyname";
27
+ import { ConfigLoader } from "../config/config-loader";
28
+ import { BuildManifestWriter } from "../bootstrap/build-manifest-writer";
29
+ /**
30
+ * Compiles the consumer's TypeScript project. Reads `build.{outDir,tsconfig,format,clean}`
31
+ * and `appModule.{sourcePath,outputPath}` from `pristine.config.ts`. After a successful
32
+ * compile, writes a build manifest at `<projectRoot>/.pristine/build-manifest.json` so
33
+ * downstream commands (`pristine start`, `pristine verify`) can detect when the build is
34
+ * stale (source edited, output deleted, paths reconfigured).
35
+ *
36
+ * The manifest is only written when both `appModule.sourcePath` and `appModule.outputPath`
37
+ * are configured. Without both, there's nothing to fingerprint and downstream commands fall
38
+ * through to the next layer of the loader cascade.
39
+ *
40
+ * Defaults (when not configured):
41
+ * - tsconfig: "tsconfig.json"
42
+ * - format: "esm" (single tsc invocation)
43
+ * - format: "cjs" (looks for tsconfig.cjs.json automatically)
44
+ * - format: "both" (runs both invocations sequentially)
45
+ * - outDir: not set; tsc writes to whatever the tsconfig declares
46
+ * - clean: false (set true to wipe outDir before building)
47
+ */
48
+ let BuildCommand = class BuildCommand {
49
+ constructor(consoleManager, shellManager, configLoader, buildManifestWriter) {
50
+ this.consoleManager = consoleManager;
51
+ this.shellManager = shellManager;
52
+ this.configLoader = configLoader;
53
+ this.buildManifestWriter = buildManifestWriter;
54
+ this.optionsType = null;
55
+ this.name = "p:build";
56
+ this.description = "Compile the project's TypeScript using tsc.";
57
+ this.defaultTsconfig = "tsconfig.json";
58
+ this.defaultFormat = "esm";
59
+ }
60
+ run(args) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ var _a, _b, _c, _d;
63
+ const projectRoot = process.cwd();
64
+ const resolvedConfig = yield this.configLoader.load({ startDir: projectRoot });
65
+ const buildConfig = (_a = resolvedConfig.config.build) !== null && _a !== void 0 ? _a : {};
66
+ const tsconfig = (_b = buildConfig.tsconfig) !== null && _b !== void 0 ? _b : this.defaultTsconfig;
67
+ const format = (_c = buildConfig.format) !== null && _c !== void 0 ? _c : this.defaultFormat;
68
+ const clean = (_d = buildConfig.clean) !== null && _d !== void 0 ? _d : false;
69
+ const outDir = buildConfig.outDir;
70
+ if (clean && outDir !== undefined) {
71
+ const absOut = path.resolve(projectRoot, outDir);
72
+ if (fs.existsSync(absOut)) {
73
+ this.consoleManager.writeInfo(`Cleaning ${outDir}/`);
74
+ fs.rmSync(absOut, { recursive: true, force: true });
75
+ }
76
+ }
77
+ const invocations = this.resolveTscInvocations(projectRoot, tsconfig, format);
78
+ if (invocations.length === 0) {
79
+ this.consoleManager.writeError(`No tsconfig found. Looked for: ${this.expectedTsconfigsForFormat(tsconfig, format).join(", ")}`);
80
+ return ExitCodeEnum.Error;
81
+ }
82
+ for (const tsconfigPath of invocations) {
83
+ const relTsconfig = path.relative(projectRoot, tsconfigPath);
84
+ this.consoleManager.writeInfo(`Compiling with ${relTsconfig}`);
85
+ try {
86
+ // The shell command runs in the current process's CWD, which is already projectRoot.
87
+ // Don't pass `directory` here — ShellManager's PathManager resolution would double
88
+ // the absolute path back onto itself producing /private/tmp/.../private/tmp/...
89
+ yield this.shellManager.execute(`npx tsc -p ${relTsconfig}`, {
90
+ streamStdout: true,
91
+ outputDuration: false,
92
+ outputTimeBeforeExecutingCommand: false,
93
+ });
94
+ }
95
+ catch (error) {
96
+ this.consoleManager.writeError(`tsc failed for ${relTsconfig}`);
97
+ return ExitCodeEnum.Error;
98
+ }
99
+ }
100
+ this.writeManifestIfConfigured(projectRoot, resolvedConfig.config.appModule);
101
+ this.consoleManager.writeSuccess(`Build complete (${invocations.length} tsconfig${invocations.length > 1 ? "s" : ""}).`);
102
+ return ExitCodeEnum.Success;
103
+ });
104
+ }
105
+ writeManifestIfConfigured(projectRoot, appModule) {
106
+ if ((appModule === null || appModule === void 0 ? void 0 : appModule.sourcePath) === undefined || (appModule === null || appModule === void 0 ? void 0 : appModule.outputPath) === undefined) {
107
+ // No `appModule` block in the config — nothing to fingerprint. The manifest layer
108
+ // is a no-op until the user runs `pristine init`.
109
+ return;
110
+ }
111
+ const absoluteSource = path.resolve(projectRoot, appModule.sourcePath);
112
+ const absoluteOutput = path.resolve(projectRoot, appModule.outputPath);
113
+ if (fs.existsSync(absoluteSource) === false) {
114
+ this.consoleManager.writeWarning(`Build succeeded but appModule.sourcePath '${appModule.sourcePath}' does not exist; skipping manifest.`);
115
+ return;
116
+ }
117
+ if (fs.existsSync(absoluteOutput) === false) {
118
+ this.consoleManager.writeWarning(`Build succeeded but appModule.outputPath '${appModule.outputPath}' was not produced; skipping manifest. ` +
119
+ `Check your tsconfig outDir / file layout.`);
120
+ return;
121
+ }
122
+ const manifest = this.buildManifestWriter.write(projectRoot, appModule.sourcePath, appModule.outputPath);
123
+ this.consoleManager.writeInfo(`Manifest written: .pristine/build-manifest.json (built at ${manifest.builtAt})`);
124
+ }
125
+ /**
126
+ * For `format: "both"`, we run two passes: the primary tsconfig (assumed ESM-ish), then
127
+ * the `.cjs.json` sibling. For `cjs`/`esm`, we run only the matching one. Returns the
128
+ * absolute tsconfig paths in the order they should run.
129
+ * @private
130
+ */
131
+ resolveTscInvocations(projectRoot, primary, format) {
132
+ const primaryAbs = path.resolve(projectRoot, primary);
133
+ if (format === "esm") {
134
+ return fs.existsSync(primaryAbs) ? [primaryAbs] : [];
135
+ }
136
+ const cjsAbs = primaryAbs.replace(/\.json$/, ".cjs.json");
137
+ if (format === "cjs") {
138
+ return fs.existsSync(cjsAbs) ? [cjsAbs] : (fs.existsSync(primaryAbs) ? [primaryAbs] : []);
139
+ }
140
+ // both
141
+ const result = [];
142
+ if (fs.existsSync(primaryAbs))
143
+ result.push(primaryAbs);
144
+ if (fs.existsSync(cjsAbs))
145
+ result.push(cjsAbs);
146
+ return result;
147
+ }
148
+ expectedTsconfigsForFormat(primary, format) {
149
+ if (format === "esm")
150
+ return [primary];
151
+ const cjs = primary.replace(/\.json$/, ".cjs.json");
152
+ if (format === "cjs")
153
+ return [cjs, primary];
154
+ return [primary, cjs];
155
+ }
156
+ };
157
+ BuildCommand = __decorate([
158
+ tag(ServiceDefinitionTagEnum.Command),
159
+ moduleScoped(CliModuleKeyname),
160
+ injectable(),
161
+ __metadata("design:paramtypes", [ConsoleManager,
162
+ ShellManager,
163
+ ConfigLoader,
164
+ BuildManifestWriter])
165
+ ], BuildCommand);
166
+ export { BuildCommand };
167
+ //# sourceMappingURL=build.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.command.js","sourceRoot":"","sources":["../../../../src/commands/build.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,GAAG,EAAC,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAEpC,OAAO,EAAC,cAAc,EAAC,MAAM,6BA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,CAAC;IAChB,CAAC;IAEO,0BAA0B,CAAC,OAAe,EAAE,MAA8B;QAChF,IAAI,MAAM,KAAK,KAAK;YAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACvC,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QACpD,IAAI,MAAM,KAAK,KAAK;YAAE,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAC5C,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IACxB,CAAC;CACF,CAAA;AA9HY,YAAY;IAHxB,GAAG,CAAC,wBAAwB,CAAC,OAAO,CAAC;IACrC,YAAY,CAAC,gBAAgB,CAAC;IAC9B,UAAU,EAAE;qCAUwB,cAAc;QAChB,YAAY;QACZ,YAAY;QACL,mBAAmB;GAZhD,YAAY,CA8HxB"}
@@ -1,3 +1,18 @@
1
+ export * from "./build-alias.command";
2
+ export * from "./build.command";
3
+ export * from "./config-print.command";
4
+ export * from "./help-alias.command";
1
5
  export * from "./help.command";
6
+ export * from "./info-alias.command";
7
+ export * from "./info.command";
8
+ export * from "./init-alias.command";
9
+ export * from "./init.command";
10
+ export * from "./init.command-options";
11
+ export * from "./list-alias.command";
2
12
  export * from "./list.command";
13
+ export * from "./start-alias.command";
14
+ export * from "./start.command";
15
+ export * from "./start.command-options";
16
+ export * from "./verify-alias.command";
17
+ export * from "./verify.command";
3
18
  //# sourceMappingURL=commands.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../src/commands/commands.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../src/commands/commands.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,69 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
11
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12
+ return new (P || (P = Promise))(function (resolve, reject) {
13
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
14
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
15
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
16
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
17
+ });
18
+ };
19
+ import path from "path";
20
+ import { moduleScoped, ServiceDefinitionTagEnum, tag } from "@pristine-ts/common";
21
+ import { injectable } from "tsyringe";
22
+ import { ConsoleManager } from "../managers/console.manager";
23
+ import { ExitCodeEnum } from "../enums/exit-code.enum";
24
+ import { CliModuleKeyname } from "../cli.module.keyname";
25
+ import { ConfigLoader } from "../config/config-loader";
26
+ /**
27
+ * Prints the resolved Pristine configuration plus where it was loaded from. Useful for
28
+ * debugging discovery — when `pristine` is doing something unexpected, the first question is
29
+ * always "which config file did it actually pick up?"
30
+ */
31
+ let ConfigPrintCommand = class ConfigPrintCommand {
32
+ constructor(consoleManager, configLoader) {
33
+ this.consoleManager = consoleManager;
34
+ this.configLoader = configLoader;
35
+ this.optionsType = null;
36
+ this.name = "p:config:print";
37
+ this.description = "Print the resolved Pristine configuration plus where it was loaded from.";
38
+ }
39
+ run(args) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ const resolved = yield this.configLoader.load({ startDir: process.cwd() });
42
+ if (resolved.configFilePath !== undefined) {
43
+ this.consoleManager.writeInfo(`Config file: ${path.relative(process.cwd(), resolved.configFilePath)}`);
44
+ }
45
+ else {
46
+ this.consoleManager.writeInfo("No config file found — running with defaults.");
47
+ }
48
+ this.consoleManager.writeLine("");
49
+ this.consoleManager.writeLine(JSON.stringify(resolved.config, null, 2));
50
+ if (Object.keys(resolved.provenance).length > 0) {
51
+ this.consoleManager.writeLine("");
52
+ this.consoleManager.writeInfo("Provenance:");
53
+ for (const [field, source] of Object.entries(resolved.provenance)) {
54
+ this.consoleManager.writeLine(` ${field}: ${source}`);
55
+ }
56
+ }
57
+ return ExitCodeEnum.Success;
58
+ });
59
+ }
60
+ };
61
+ ConfigPrintCommand = __decorate([
62
+ tag(ServiceDefinitionTagEnum.Command),
63
+ moduleScoped(CliModuleKeyname),
64
+ injectable(),
65
+ __metadata("design:paramtypes", [ConsoleManager,
66
+ ConfigLoader])
67
+ ], ConfigPrintCommand);
68
+ export { ConfigPrintCommand };
69
+ //# sourceMappingURL=config-print.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-print.command.js","sourceRoot":"","sources":["../../../../src/comm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CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAExE,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAChD,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;gBAClC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;gBAC7C,KAAK,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;oBAClE,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,KAAK,KAAK,KAAK,MAAM,EAAE,CAAC,CAAC;gBACzD,CAAC;YACH,CAAC;YAED,OAAO,YAAY,CAAC,OAAO,CAAC;QAC9B,CAAC;KAAA;CACF,CAAA;AAjCY,kBAAkB;IAH9B,GAAG,CAAC,wBAAwB,CAAC,OAAO,CAAC;IACrC,YAAY,CAAC,gBAAgB,CAAC;IAC9B,UAAU,EAAE;qCAOwB,cAAc;QAChB,YAAY;GAPlC,kBAAkB,CAiC9B"}
@@ -0,0 +1,49 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
11
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12
+ return new (P || (P = Promise))(function (resolve, reject) {
13
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
14
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
15
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
16
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
17
+ });
18
+ };
19
+ import { moduleScoped, ServiceDefinitionTagEnum, tag } from "@pristine-ts/common";
20
+ import { injectable } from "tsyringe";
21
+ import { CliModuleKeyname } from "../cli.module.keyname";
22
+ import { HelpCommand } from "./help.command";
23
+ /**
24
+ * Top-level alias for the framework-reserved `p:help` command. Injects the delegate
25
+ * directly via standard DI — `HelpCommand` is `@injectable()` and tsyringe resolves it
26
+ * recursively when this alias is constructed. The two share state via DI, not via a
27
+ * service-locator handle to the kernel container.
28
+ */
29
+ let HelpAliasCommand = class HelpAliasCommand {
30
+ constructor(delegate) {
31
+ this.delegate = delegate;
32
+ this.optionsType = null;
33
+ this.name = "help";
34
+ this.description = "Alias for p:help.";
35
+ }
36
+ run(args) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ return this.delegate.run(args);
39
+ });
40
+ }
41
+ };
42
+ HelpAliasCommand = __decorate([
43
+ tag(ServiceDefinitionTagEnum.Command),
44
+ moduleScoped(CliModuleKeyname),
45
+ injectable(),
46
+ __metadata("design:paramtypes", [HelpCommand])
47
+ ], HelpAliasCommand);
48
+ export { HelpAliasCommand };
49
+ //# sourceMappingURL=help-alias.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-alias.command.js","sourceRoot":"","sources":["../../../../src/commands/help-alias.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,GAAG,EAAC,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAGpC,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C;;;;;GAKG;AAII,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAK3B,YAA6B,QAAqB;QAArB,aAAQ,GAAR,QAAQ,CAAa;QAJlD,gBAAW,GAAG,IAAI,CAAC;QACnB,SAAI,GAAG,MAAM,CAAC;QACd,gBAAW,GAAG,mBAAmB,CAAC;IAGlC,CAAC;IAEK,GAAG,CAAC,IAAS;;YACjB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;KAAA;CACF,CAAA;AAXY,gBAAgB;IAH5B,GAAG,CAAC,wBAAwB,CAAC,OAAO,CAAC;IACrC,YAAY,CAAC,gBAAgB,CAAC;IAC9B,UAAU,EAAE;qCAM4B,WAAW;GALvC,gBAAgB,CAW5B"}
@@ -7,6 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
10
13
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
11
14
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12
15
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -16,27 +19,57 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
16
19
  step((generator = generator.apply(thisArg, _arguments || [])).next());
17
20
  });
18
21
  };
22
+ import { inject, injectable } from "tsyringe";
19
23
  import { moduleScoped, ServiceDefinitionTagEnum, tag } from "@pristine-ts/common";
20
- import { injectable } from "tsyringe";
21
24
  import { ConsoleManager } from "../managers/console.manager";
22
25
  import { ExitCodeEnum } from "../enums/exit-code.enum";
23
26
  import { CliModuleKeyname } from "../cli.module.keyname";
27
+ /**
28
+ * Prints a usage banner plus a one-line summary for every registered command. The output is
29
+ * generated from the actual `CommandInterface[]` resolved from the current DI container, so
30
+ * newly registered (built-in or custom) commands show up automatically.
31
+ *
32
+ * The first column is sized to the longest command name in the set, so the second-column
33
+ * descriptions stay aligned even when commands have wildly different name lengths.
34
+ *
35
+ * **Lazy command resolution.** This command is itself `@tag(Command)`, so a constructor-time
36
+ * `@injectAll(ServiceDefinitionTagEnum.Command)` would create an infinite cycle: tsyringe
37
+ * tries to construct HelpCommand → must inject all Commands → must construct HelpCommand →
38
+ * recursion. We instead inject the current child container (registered by the kernel under
39
+ * `ServiceDefinitionTagEnum.CurrentChildContainer`) and call `resolveAll` from inside `run()`,
40
+ * by which point every Command-tagged class is fully constructed and cached.
41
+ */
24
42
  let HelpCommand = class HelpCommand {
25
- constructor(consoleManager) {
43
+ constructor(consoleManager, container) {
26
44
  this.consoleManager = consoleManager;
45
+ this.container = container;
27
46
  this.optionsType = null;
28
47
  this.name = "p:help";
48
+ this.description = "Show this help message and list all registered commands.";
29
49
  }
30
50
  run(args) {
31
51
  return __awaiter(this, void 0, void 0, function* () {
32
- this.consoleManager.writeLine("Pristine CLI Module (help)");
52
+ var _a;
53
+ const commands = this.container.resolveAll(ServiceDefinitionTagEnum.Command);
54
+ this.consoleManager.writeLine("Pristine CLI");
55
+ this.consoleManager.writeLine("");
56
+ this.consoleManager.writeLine("Usage:");
57
+ this.consoleManager.writeLine(" pristine <command> [--option=value ...]");
58
+ this.consoleManager.writeLine("");
59
+ this.consoleManager.writeLine("Commands:");
60
+ const sorted = [...commands].sort((a, b) => a.name.localeCompare(b.name));
61
+ const longestName = sorted.reduce((max, c) => Math.max(max, c.name.length), 0);
62
+ for (const command of sorted) {
63
+ const padded = command.name.padEnd(longestName + 2, " ");
64
+ const description = (_a = command.description) !== null && _a !== void 0 ? _a : "";
65
+ this.consoleManager.writeLine(` ${padded}${description}`);
66
+ }
33
67
  this.consoleManager.writeLine("");
34
- this.consoleManager.writeLine("To implement your own command:");
35
- this.consoleManager.writeLine(" 1- Implement the 'CommandInterface' from '@pristine-ts/cli'");
36
- this.consoleManager.writeLine(" 2- Tag it with the `@tag(ServiceDefinitionTagEnum.Command)` decorator");
37
- this.consoleManager.writeLine(" 3- Modify your package.json file to include the path to your COMPILED js module: `{'pristine': { 'appModule': { 'cjsPath': 'RELATIVE_PATH_TO_YOUR_MODULE_COMPILE_FOR_CJS'}}}`");
38
- this.consoleManager.writeLine(" 4- Add your command to the `package.json` such as `'scripts': { 'my_command': 'pristine YOUR_COMMAND_HERE YOUR_ARGUMENTS_HERE'}`");
39
- this.consoleManager.writeLine(" 5- Execute your command.");
68
+ this.consoleManager.writeLine("Adding your own command:");
69
+ this.consoleManager.writeLine(" 1. Implement CommandInterface from '@pristine-ts/cli'");
70
+ this.consoleManager.writeLine(" 2. Decorate with @tag(ServiceDefinitionTagEnum.Command) @injectable()");
71
+ this.consoleManager.writeLine(" 3. Make sure your AppModule's import graph reaches the file");
72
+ this.consoleManager.writeLine(" 4. Invoke as: pristine <your-command-name>");
40
73
  return ExitCodeEnum.Success;
41
74
  });
42
75
  }
@@ -45,7 +78,8 @@ HelpCommand = __decorate([
45
78
  tag(ServiceDefinitionTagEnum.Command),
46
79
  moduleScoped(CliModuleKeyname),
47
80
  injectable(),
48
- __metadata("design:paramtypes", [ConsoleManager])
81
+ __param(1, inject(ServiceDefinitionTagEnum.CurrentChildContainer)),
82
+ __metadata("design:paramtypes", [ConsoleManager, Object])
49
83
  ], HelpCommand);
50
84
  export { HelpCommand };
51
85
  //# sourceMappingURL=help.command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"help.command.js","sourceRoot":"","sources":["../../../../src/commands/help.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,E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1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
11
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12
+ return new (P || (P = Promise))(function (resolve, reject) {
13
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
14
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
15
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
16
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
17
+ });
18
+ };
19
+ import { moduleScoped, ServiceDefinitionTagEnum, tag } from "@pristine-ts/common";
20
+ import { injectable } from "tsyringe";
21
+ import { CliModuleKeyname } from "../cli.module.keyname";
22
+ import { InfoCommand } from "./info.command";
23
+ /**
24
+ * Top-level alias for the framework-reserved `p:info` command. Injects the delegate
25
+ * directly via standard DI.
26
+ */
27
+ let InfoAliasCommand = class InfoAliasCommand {
28
+ constructor(delegate) {
29
+ this.delegate = delegate;
30
+ this.optionsType = null;
31
+ this.name = "info";
32
+ this.description = "Alias for p:info.";
33
+ }
34
+ run(args) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ return this.delegate.run(args);
37
+ });
38
+ }
39
+ };
40
+ InfoAliasCommand = __decorate([
41
+ tag(ServiceDefinitionTagEnum.Command),
42
+ moduleScoped(CliModuleKeyname),
43
+ injectable(),
44
+ __metadata("design:paramtypes", [InfoCommand])
45
+ ], InfoAliasCommand);
46
+ export { InfoAliasCommand };
47
+ //# sourceMappingURL=info-alias.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info-alias.command.js","sourceRoot":"","sources":["../../../../src/commands/info-alias.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAC,YAAY,EAAE,wBAAwB,EAAE,GAAG,EAAC,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAGpC,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C;;;GAGG;AAII,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAK3B,YAA6B,QAAqB;QAArB,aAAQ,GAAR,QAAQ,CAAa;QAJlD,gBAAW,GAAG,IAAI,CAAC;QACnB,SAAI,GAAG,MAAM,CAAC;QACd,gBAAW,GAAG,mBAAmB,CAAC;IAGlC,CAAC;IAEK,GAAG,CAAC,IAAS;;YACjB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;KAAA;CACF,CAAA;AAXY,gBAAgB;IAH5B,GAAG,CAAC,wBAAwB,CAAC,OAAO,CAAC;IACrC,YAAY,CAAC,gBAAgB,CAAC;IAC9B,UAAU,EAAE;qCAM4B,WAAW;GALvC,gBAAgB,CAW5B"}