@launch77/cli 1.2.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 (398) hide show
  1. package/.eslintrc.json +6 -0
  2. package/dist/app-templates/webapp/.env.ci +6 -0
  3. package/dist/app-templates/webapp/.env.example +9 -0
  4. package/dist/app-templates/webapp/.eslintrc.json +6 -0
  5. package/dist/app-templates/webapp/README.md.hbs +80 -0
  6. package/dist/app-templates/webapp/app/about/page.tsx.hbs +41 -0
  7. package/dist/app-templates/webapp/app/dashboard/page.tsx.hbs +51 -0
  8. package/dist/app-templates/webapp/app/globals.css +31 -0
  9. package/dist/app-templates/webapp/app/layout.tsx.hbs +26 -0
  10. package/dist/app-templates/webapp/app/page.tsx.hbs +30 -0
  11. package/dist/app-templates/webapp/next.config.js +99 -0
  12. package/dist/app-templates/webapp/package.json.hbs +30 -0
  13. package/dist/app-templates/webapp/postcss.config.js +6 -0
  14. package/dist/app-templates/webapp/tailwind.config.ts +24 -0
  15. package/dist/app-templates/webapp/tsconfig.json +29 -0
  16. package/dist/app-templates/webapp/vercel.json.hbs +7 -0
  17. package/dist/cli.d.ts +3 -0
  18. package/dist/cli.d.ts.map +1 -0
  19. package/dist/cli.js +29 -0
  20. package/dist/cli.js.map +1 -0
  21. package/dist/infrastructure/filesystem.d.ts +41 -0
  22. package/dist/infrastructure/filesystem.d.ts.map +1 -0
  23. package/dist/infrastructure/filesystem.js +61 -0
  24. package/dist/infrastructure/filesystem.js.map +1 -0
  25. package/dist/infrastructure/npm.d.ts +9 -0
  26. package/dist/infrastructure/npm.d.ts.map +1 -0
  27. package/dist/infrastructure/npm.js +17 -0
  28. package/dist/infrastructure/npm.js.map +1 -0
  29. package/dist/infrastructure/template-engine.d.ts +12 -0
  30. package/dist/infrastructure/template-engine.d.ts.map +1 -0
  31. package/dist/infrastructure/template-engine.js +40 -0
  32. package/dist/infrastructure/template-engine.js.map +1 -0
  33. package/dist/infrastructure/template-generator.d.ts +9 -0
  34. package/dist/infrastructure/template-generator.d.ts.map +1 -0
  35. package/dist/infrastructure/template-generator.js +19 -0
  36. package/dist/infrastructure/template-generator.js.map +1 -0
  37. package/dist/infrastructure/template.d.ts +20 -0
  38. package/dist/infrastructure/template.d.ts.map +1 -0
  39. package/dist/infrastructure/template.js +53 -0
  40. package/dist/infrastructure/template.js.map +1 -0
  41. package/dist/modules/app/commands/create-app.d.ts +3 -0
  42. package/dist/modules/app/commands/create-app.d.ts.map +1 -0
  43. package/dist/modules/app/commands/create-app.js +51 -0
  44. package/dist/modules/app/commands/create-app.js.map +1 -0
  45. package/dist/modules/app/commands/delete-app.d.ts +3 -0
  46. package/dist/modules/app/commands/delete-app.d.ts.map +1 -0
  47. package/dist/modules/app/commands/delete-app.js +109 -0
  48. package/dist/modules/app/commands/delete-app.js.map +1 -0
  49. package/dist/modules/app/commands/generate-manifest.d.ts +3 -0
  50. package/dist/modules/app/commands/generate-manifest.d.ts.map +1 -0
  51. package/dist/modules/app/commands/generate-manifest.js +62 -0
  52. package/dist/modules/app/commands/generate-manifest.js.map +1 -0
  53. package/dist/modules/app/commands/validate-manifest.d.ts +3 -0
  54. package/dist/modules/app/commands/validate-manifest.d.ts.map +1 -0
  55. package/dist/modules/app/commands/validate-manifest.js +68 -0
  56. package/dist/modules/app/commands/validate-manifest.js.map +1 -0
  57. package/dist/modules/app/errors/app-errors.d.ts +19 -0
  58. package/dist/modules/app/errors/app-errors.d.ts.map +1 -0
  59. package/dist/modules/app/errors/app-errors.js +37 -0
  60. package/dist/modules/app/errors/app-errors.js.map +1 -0
  61. package/dist/modules/app/index.d.ts +10 -0
  62. package/dist/modules/app/index.d.ts.map +1 -0
  63. package/dist/modules/app/index.js +11 -0
  64. package/dist/modules/app/index.js.map +1 -0
  65. package/dist/modules/app/lib/manifest-schema.d.ts +39 -0
  66. package/dist/modules/app/lib/manifest-schema.d.ts.map +1 -0
  67. package/dist/modules/app/lib/manifest-schema.js +44 -0
  68. package/dist/modules/app/lib/manifest-schema.js.map +1 -0
  69. package/dist/modules/app/services/app-svc.d.ts +15 -0
  70. package/dist/modules/app/services/app-svc.d.ts.map +1 -0
  71. package/dist/modules/app/services/app-svc.js +90 -0
  72. package/dist/modules/app/services/app-svc.js.map +1 -0
  73. package/dist/modules/app/services/manifest-svc.d.ts +28 -0
  74. package/dist/modules/app/services/manifest-svc.d.ts.map +1 -0
  75. package/dist/modules/app/services/manifest-svc.js +119 -0
  76. package/dist/modules/app/services/manifest-svc.js.map +1 -0
  77. package/dist/modules/app/types/app-types.d.ts +21 -0
  78. package/dist/modules/app/types/app-types.d.ts.map +1 -0
  79. package/dist/modules/app/types/app-types.js +5 -0
  80. package/dist/modules/app/types/app-types.js.map +1 -0
  81. package/dist/modules/catalog/commands/generate.d.ts +9 -0
  82. package/dist/modules/catalog/commands/generate.d.ts.map +1 -0
  83. package/dist/modules/catalog/commands/generate.js +94 -0
  84. package/dist/modules/catalog/commands/generate.js.map +1 -0
  85. package/dist/modules/catalog/commands/scan.d.ts +9 -0
  86. package/dist/modules/catalog/commands/scan.d.ts.map +1 -0
  87. package/dist/modules/catalog/commands/scan.js +43 -0
  88. package/dist/modules/catalog/commands/scan.js.map +1 -0
  89. package/dist/modules/catalog/config/catalog-config.d.ts +49 -0
  90. package/dist/modules/catalog/config/catalog-config.d.ts.map +1 -0
  91. package/dist/modules/catalog/config/catalog-config.js +116 -0
  92. package/dist/modules/catalog/config/catalog-config.js.map +1 -0
  93. package/dist/modules/catalog/config/catalog-config.test.d.ts +2 -0
  94. package/dist/modules/catalog/config/catalog-config.test.d.ts.map +1 -0
  95. package/dist/modules/catalog/config/catalog-config.test.js +362 -0
  96. package/dist/modules/catalog/config/catalog-config.test.js.map +1 -0
  97. package/dist/modules/catalog/index.d.ts +9 -0
  98. package/dist/modules/catalog/index.d.ts.map +1 -0
  99. package/dist/modules/catalog/index.js +9 -0
  100. package/dist/modules/catalog/index.js.map +1 -0
  101. package/dist/modules/catalog/parsers/typescript-parser.d.ts +15 -0
  102. package/dist/modules/catalog/parsers/typescript-parser.d.ts.map +1 -0
  103. package/dist/modules/catalog/parsers/typescript-parser.js +82 -0
  104. package/dist/modules/catalog/parsers/typescript-parser.js.map +1 -0
  105. package/dist/modules/catalog/scanners/metadata-extractor.d.ts +10 -0
  106. package/dist/modules/catalog/scanners/metadata-extractor.d.ts.map +1 -0
  107. package/dist/modules/catalog/scanners/metadata-extractor.js +122 -0
  108. package/dist/modules/catalog/scanners/metadata-extractor.js.map +1 -0
  109. package/dist/modules/catalog/scanners/metadata-validator.d.ts +6 -0
  110. package/dist/modules/catalog/scanners/metadata-validator.d.ts.map +1 -0
  111. package/dist/modules/catalog/scanners/metadata-validator.js +57 -0
  112. package/dist/modules/catalog/scanners/metadata-validator.js.map +1 -0
  113. package/dist/modules/catalog/scanners/ui-component-scanner.d.ts +11 -0
  114. package/dist/modules/catalog/scanners/ui-component-scanner.d.ts.map +1 -0
  115. package/dist/modules/catalog/scanners/ui-component-scanner.js +147 -0
  116. package/dist/modules/catalog/scanners/ui-component-scanner.js.map +1 -0
  117. package/dist/modules/catalog/schemas/catalog-ui-components.schema.json +161 -0
  118. package/dist/modules/catalog/schemas/schemas/catalog-ui-components.schema.json +145 -0
  119. package/dist/modules/catalog/services/catalog-generator-svc.d.ts +27 -0
  120. package/dist/modules/catalog/services/catalog-generator-svc.d.ts.map +1 -0
  121. package/dist/modules/catalog/services/catalog-generator-svc.js +100 -0
  122. package/dist/modules/catalog/services/catalog-generator-svc.js.map +1 -0
  123. package/dist/modules/catalog/services/catalog-generator-svc.test.d.ts +2 -0
  124. package/dist/modules/catalog/services/catalog-generator-svc.test.d.ts.map +1 -0
  125. package/dist/modules/catalog/services/catalog-generator-svc.test.js +201 -0
  126. package/dist/modules/catalog/services/catalog-generator-svc.test.js.map +1 -0
  127. package/dist/modules/catalog/services/catalog-svc.d.ts +39 -0
  128. package/dist/modules/catalog/services/catalog-svc.d.ts.map +1 -0
  129. package/dist/modules/catalog/services/catalog-svc.js +163 -0
  130. package/dist/modules/catalog/services/catalog-svc.js.map +1 -0
  131. package/dist/modules/catalog/types/catalog-types.d.ts +120 -0
  132. package/dist/modules/catalog/types/catalog-types.d.ts.map +1 -0
  133. package/dist/modules/catalog/types/catalog-types.js +5 -0
  134. package/dist/modules/catalog/types/catalog-types.js.map +1 -0
  135. package/dist/modules/catalog/utils/examples-generator.d.ts +6 -0
  136. package/dist/modules/catalog/utils/examples-generator.d.ts.map +1 -0
  137. package/dist/modules/catalog/utils/examples-generator.js +55 -0
  138. package/dist/modules/catalog/utils/examples-generator.js.map +1 -0
  139. package/dist/modules/catalog/utils/quality-reporter.d.ts +13 -0
  140. package/dist/modules/catalog/utils/quality-reporter.d.ts.map +1 -0
  141. package/dist/modules/catalog/utils/quality-reporter.js +64 -0
  142. package/dist/modules/catalog/utils/quality-reporter.js.map +1 -0
  143. package/dist/modules/catalog/validators/component-name-validator.d.ts +20 -0
  144. package/dist/modules/catalog/validators/component-name-validator.d.ts.map +1 -0
  145. package/dist/modules/catalog/validators/component-name-validator.js +33 -0
  146. package/dist/modules/catalog/validators/component-name-validator.js.map +1 -0
  147. package/dist/modules/catalog/validators/component-name-validator.test.d.ts +2 -0
  148. package/dist/modules/catalog/validators/component-name-validator.test.d.ts.map +1 -0
  149. package/dist/modules/catalog/validators/component-name-validator.test.js +196 -0
  150. package/dist/modules/catalog/validators/component-name-validator.test.js.map +1 -0
  151. package/dist/modules/deploy/commands/deploy-init-action.d.ts +12 -0
  152. package/dist/modules/deploy/commands/deploy-init-action.d.ts.map +1 -0
  153. package/dist/modules/deploy/commands/deploy-init-action.js +220 -0
  154. package/dist/modules/deploy/commands/deploy-init-action.js.map +1 -0
  155. package/dist/modules/deploy/commands/deploy-init.d.ts +6 -0
  156. package/dist/modules/deploy/commands/deploy-init.d.ts.map +1 -0
  157. package/dist/modules/deploy/commands/deploy-init.js +16 -0
  158. package/dist/modules/deploy/commands/deploy-init.js.map +1 -0
  159. package/dist/modules/deploy/commands/deploy-logs-action.d.ts +12 -0
  160. package/dist/modules/deploy/commands/deploy-logs-action.d.ts.map +1 -0
  161. package/dist/modules/deploy/commands/deploy-logs-action.js +113 -0
  162. package/dist/modules/deploy/commands/deploy-logs-action.js.map +1 -0
  163. package/dist/modules/deploy/commands/deploy-logs.d.ts +6 -0
  164. package/dist/modules/deploy/commands/deploy-logs.d.ts.map +1 -0
  165. package/dist/modules/deploy/commands/deploy-logs.js +17 -0
  166. package/dist/modules/deploy/commands/deploy-logs.js.map +1 -0
  167. package/dist/modules/deploy/commands/deploy-status-action.d.ts +8 -0
  168. package/dist/modules/deploy/commands/deploy-status-action.d.ts.map +1 -0
  169. package/dist/modules/deploy/commands/deploy-status-action.js +153 -0
  170. package/dist/modules/deploy/commands/deploy-status-action.js.map +1 -0
  171. package/dist/modules/deploy/commands/deploy-status.d.ts +6 -0
  172. package/dist/modules/deploy/commands/deploy-status.d.ts.map +1 -0
  173. package/dist/modules/deploy/commands/deploy-status.js +13 -0
  174. package/dist/modules/deploy/commands/deploy-status.js.map +1 -0
  175. package/dist/modules/deploy/index.d.ts +7 -0
  176. package/dist/modules/deploy/index.d.ts.map +1 -0
  177. package/dist/modules/deploy/index.js +7 -0
  178. package/dist/modules/deploy/index.js.map +1 -0
  179. package/dist/modules/deploy/services/deploy-svc.d.ts +17 -0
  180. package/dist/modules/deploy/services/deploy-svc.d.ts.map +1 -0
  181. package/dist/modules/deploy/services/deploy-svc.js +25 -0
  182. package/dist/modules/deploy/services/deploy-svc.js.map +1 -0
  183. package/dist/modules/deploy/utils/vercel-extended.d.ts +63 -0
  184. package/dist/modules/deploy/utils/vercel-extended.d.ts.map +1 -0
  185. package/dist/modules/deploy/utils/vercel-extended.js +238 -0
  186. package/dist/modules/deploy/utils/vercel-extended.js.map +1 -0
  187. package/dist/modules/plugin/commands/plugin-install.d.ts +3 -0
  188. package/dist/modules/plugin/commands/plugin-install.d.ts.map +1 -0
  189. package/dist/modules/plugin/commands/plugin-install.js +45 -0
  190. package/dist/modules/plugin/commands/plugin-install.js.map +1 -0
  191. package/dist/modules/plugin/errors/plugin-errors.d.ts +16 -0
  192. package/dist/modules/plugin/errors/plugin-errors.d.ts.map +1 -0
  193. package/dist/modules/plugin/errors/plugin-errors.js +39 -0
  194. package/dist/modules/plugin/errors/plugin-errors.js.map +1 -0
  195. package/dist/modules/plugin/index.d.ts +6 -0
  196. package/dist/modules/plugin/index.d.ts.map +1 -0
  197. package/dist/modules/plugin/index.js +9 -0
  198. package/dist/modules/plugin/index.js.map +1 -0
  199. package/dist/modules/plugin/lib/plugin-registry.d.ts +15 -0
  200. package/dist/modules/plugin/lib/plugin-registry.d.ts.map +1 -0
  201. package/dist/modules/plugin/lib/plugin-registry.js +47 -0
  202. package/dist/modules/plugin/lib/plugin-registry.js.map +1 -0
  203. package/dist/modules/plugin/services/plugin-svc.d.ts +10 -0
  204. package/dist/modules/plugin/services/plugin-svc.d.ts.map +1 -0
  205. package/dist/modules/plugin/services/plugin-svc.js +44 -0
  206. package/dist/modules/plugin/services/plugin-svc.js.map +1 -0
  207. package/dist/modules/plugin/types/plugin-types.d.ts +19 -0
  208. package/dist/modules/plugin/types/plugin-types.d.ts.map +1 -0
  209. package/dist/modules/plugin/types/plugin-types.js +2 -0
  210. package/dist/modules/plugin/types/plugin-types.js.map +1 -0
  211. package/dist/modules/startup/commands/create-startup.d.ts +3 -0
  212. package/dist/modules/startup/commands/create-startup.d.ts.map +1 -0
  213. package/dist/modules/startup/commands/create-startup.js +43 -0
  214. package/dist/modules/startup/commands/create-startup.js.map +1 -0
  215. package/dist/modules/startup/errors/startup-errors.d.ts +13 -0
  216. package/dist/modules/startup/errors/startup-errors.d.ts.map +1 -0
  217. package/dist/modules/startup/errors/startup-errors.js +25 -0
  218. package/dist/modules/startup/errors/startup-errors.js.map +1 -0
  219. package/dist/modules/startup/index.d.ts +5 -0
  220. package/dist/modules/startup/index.d.ts.map +1 -0
  221. package/dist/modules/startup/index.js +7 -0
  222. package/dist/modules/startup/index.js.map +1 -0
  223. package/dist/modules/startup/services/startup-service.d.ts +7 -0
  224. package/dist/modules/startup/services/startup-service.d.ts.map +1 -0
  225. package/dist/modules/startup/services/startup-service.js +43 -0
  226. package/dist/modules/startup/services/startup-service.js.map +1 -0
  227. package/dist/modules/startup/types/startup-types.d.ts +8 -0
  228. package/dist/modules/startup/types/startup-types.d.ts.map +1 -0
  229. package/dist/modules/startup/types/startup-types.js +2 -0
  230. package/dist/modules/startup/types/startup-types.js.map +1 -0
  231. package/dist/modules/startup/utils/startup-validators.d.ts +8 -0
  232. package/dist/modules/startup/utils/startup-validators.d.ts.map +1 -0
  233. package/dist/modules/startup/utils/startup-validators.js +17 -0
  234. package/dist/modules/startup/utils/startup-validators.js.map +1 -0
  235. package/dist/modules/workspace/commands/init-workspace.d.ts +3 -0
  236. package/dist/modules/workspace/commands/init-workspace.d.ts.map +1 -0
  237. package/dist/modules/workspace/commands/init-workspace.js +54 -0
  238. package/dist/modules/workspace/commands/init-workspace.js.map +1 -0
  239. package/dist/modules/workspace/errors/workspace-errors.d.ts +10 -0
  240. package/dist/modules/workspace/errors/workspace-errors.d.ts.map +1 -0
  241. package/dist/modules/workspace/errors/workspace-errors.js +19 -0
  242. package/dist/modules/workspace/errors/workspace-errors.js.map +1 -0
  243. package/dist/modules/workspace/index.d.ts +5 -0
  244. package/dist/modules/workspace/index.d.ts.map +1 -0
  245. package/dist/modules/workspace/index.js +7 -0
  246. package/dist/modules/workspace/index.js.map +1 -0
  247. package/dist/modules/workspace/services/workspace-service.d.ts +6 -0
  248. package/dist/modules/workspace/services/workspace-service.d.ts.map +1 -0
  249. package/dist/modules/workspace/services/workspace-service.js +46 -0
  250. package/dist/modules/workspace/services/workspace-service.js.map +1 -0
  251. package/dist/modules/workspace/types/workspace-types.d.ts +8 -0
  252. package/dist/modules/workspace/types/workspace-types.d.ts.map +1 -0
  253. package/dist/modules/workspace/types/workspace-types.js +2 -0
  254. package/dist/modules/workspace/types/workspace-types.js.map +1 -0
  255. package/dist/modules/workspace/utils/workspace-validators.d.ts +8 -0
  256. package/dist/modules/workspace/utils/workspace-validators.d.ts.map +1 -0
  257. package/dist/modules/workspace/utils/workspace-validators.js +17 -0
  258. package/dist/modules/workspace/utils/workspace-validators.js.map +1 -0
  259. package/dist/plugins/theme/package.json +32 -0
  260. package/dist/plugins/theme/plugin.json +9 -0
  261. package/dist/plugins/theme/src/generator.ts +92 -0
  262. package/dist/plugins/theme/src/utils/config-modifier.ts +142 -0
  263. package/dist/plugins/theme/src/utils/css-modifier.ts +89 -0
  264. package/dist/plugins/theme/templates/app/theme-test/page.tsx +156 -0
  265. package/dist/plugins/theme/templates/src/modules/theme/README.md +209 -0
  266. package/dist/plugins/theme/templates/src/modules/theme/config/brand.css +23 -0
  267. package/dist/plugins/theme/tsconfig.json +14 -0
  268. package/dist/plugins/theme/tsup.config.ts +10 -0
  269. package/dist/templates/startup/apps/.gitkeep +8 -0
  270. package/dist/templates/templates/startup/apps/.gitkeep +8 -0
  271. package/dist/templates/templates/workspace/.eslintignore +7 -0
  272. package/dist/templates/templates/workspace/.eslintrc.js +38 -0
  273. package/dist/templates/templates/workspace/.husky/pre-push +24 -0
  274. package/dist/templates/templates/workspace/.launch77/workspace.json +3 -0
  275. package/dist/templates/templates/workspace/.lintstagedrc.json +4 -0
  276. package/dist/templates/templates/workspace/.prettierrc +9 -0
  277. package/dist/templates/templates/workspace/README.md +62 -0
  278. package/dist/templates/templates/workspace/app-templates/.gitkeep +1 -0
  279. package/dist/templates/templates/workspace/apps/.gitkeep +1 -0
  280. package/dist/templates/templates/workspace/libraries/.gitkeep +1 -0
  281. package/dist/templates/templates/workspace/package.json +31 -0
  282. package/dist/templates/templates/workspace/plugins/.gitkeep +1 -0
  283. package/dist/templates/templates/workspace/tsconfig.json +22 -0
  284. package/dist/templates/templates/workspace/turbo.json +25 -0
  285. package/dist/templates/workspace/.launch77/workspace.json +3 -0
  286. package/dist/templates/workspace/README.md +62 -0
  287. package/dist/templates/workspace/app-templates/.gitkeep +1 -0
  288. package/dist/templates/workspace/apps/.gitkeep +1 -0
  289. package/dist/templates/workspace/libraries/.gitkeep +1 -0
  290. package/dist/templates/workspace/package.json +21 -0
  291. package/dist/templates/workspace/plugins/.gitkeep +1 -0
  292. package/dist/templates/workspace/tsconfig.json +22 -0
  293. package/dist/templates/workspace/turbo.json +25 -0
  294. package/dist/utils/launch77-context.d.ts +16 -0
  295. package/dist/utils/launch77-context.d.ts.map +1 -0
  296. package/dist/utils/launch77-context.js +111 -0
  297. package/dist/utils/launch77-context.js.map +1 -0
  298. package/dist/utils/launch77-validation.d.ts +17 -0
  299. package/dist/utils/launch77-validation.d.ts.map +1 -0
  300. package/dist/utils/launch77-validation.js +44 -0
  301. package/dist/utils/launch77-validation.js.map +1 -0
  302. package/dist/utils/monorepo.d.ts +19 -0
  303. package/dist/utils/monorepo.d.ts.map +1 -0
  304. package/dist/utils/monorepo.js +100 -0
  305. package/dist/utils/monorepo.js.map +1 -0
  306. package/dist/utils/validation.d.ts +32 -0
  307. package/dist/utils/validation.d.ts.map +1 -0
  308. package/dist/utils/validation.js +92 -0
  309. package/dist/utils/validation.js.map +1 -0
  310. package/dist/utils/version.d.ts +7 -0
  311. package/dist/utils/version.d.ts.map +1 -0
  312. package/dist/utils/version.js +16 -0
  313. package/dist/utils/version.js.map +1 -0
  314. package/launch77-cli-1.2.0.tgz +0 -0
  315. package/package.json +48 -0
  316. package/src/cli.ts +34 -0
  317. package/src/infrastructure/filesystem.ts +69 -0
  318. package/src/infrastructure/npm.ts +18 -0
  319. package/src/infrastructure/template-engine.ts +48 -0
  320. package/src/infrastructure/template-generator.ts +26 -0
  321. package/src/infrastructure/template.ts +66 -0
  322. package/src/modules/app/commands/create-app.ts +60 -0
  323. package/src/modules/app/commands/delete-app.ts +123 -0
  324. package/src/modules/app/commands/generate-manifest.ts +75 -0
  325. package/src/modules/app/commands/validate-manifest.ts +78 -0
  326. package/src/modules/app/errors/app-errors.ts +41 -0
  327. package/src/modules/app/index.ts +16 -0
  328. package/src/modules/app/lib/manifest-schema.ts +65 -0
  329. package/src/modules/app/services/app-svc.ts +115 -0
  330. package/src/modules/app/services/manifest-svc.ts +144 -0
  331. package/src/modules/app/types/app-types.ts +27 -0
  332. package/src/modules/catalog/commands/generate.ts +115 -0
  333. package/src/modules/catalog/commands/scan.ts +48 -0
  334. package/src/modules/catalog/config/catalog-config.test.ts +404 -0
  335. package/src/modules/catalog/config/catalog-config.ts +130 -0
  336. package/src/modules/catalog/index.ts +9 -0
  337. package/src/modules/catalog/parsers/typescript-parser.ts +93 -0
  338. package/src/modules/catalog/scanners/metadata-extractor.ts +134 -0
  339. package/src/modules/catalog/scanners/metadata-validator.ts +67 -0
  340. package/src/modules/catalog/scanners/ui-component-scanner.ts +185 -0
  341. package/src/modules/catalog/schemas/catalog-ui-components.schema.json +145 -0
  342. package/src/modules/catalog/services/catalog-generator-svc.test.ts +233 -0
  343. package/src/modules/catalog/services/catalog-generator-svc.ts +124 -0
  344. package/src/modules/catalog/services/catalog-svc.ts +222 -0
  345. package/src/modules/catalog/types/catalog-types.ts +149 -0
  346. package/src/modules/catalog/utils/examples-generator.ts +68 -0
  347. package/src/modules/catalog/utils/quality-reporter.ts +76 -0
  348. package/src/modules/catalog/validators/component-name-validator.test.ts +233 -0
  349. package/src/modules/catalog/validators/component-name-validator.ts +43 -0
  350. package/src/modules/deploy/commands/deploy-init-action.ts +247 -0
  351. package/src/modules/deploy/commands/deploy-init.ts +19 -0
  352. package/src/modules/deploy/commands/deploy-logs-action.ts +135 -0
  353. package/src/modules/deploy/commands/deploy-logs.ts +20 -0
  354. package/src/modules/deploy/commands/deploy-status-action.ts +175 -0
  355. package/src/modules/deploy/commands/deploy-status.ts +16 -0
  356. package/src/modules/deploy/index.ts +7 -0
  357. package/src/modules/deploy/services/deploy-svc.ts +31 -0
  358. package/src/modules/deploy/utils/vercel-extended.ts +286 -0
  359. package/src/modules/plugin/commands/plugin-install.ts +51 -0
  360. package/src/modules/plugin/errors/plugin-errors.ts +44 -0
  361. package/src/modules/plugin/index.ts +14 -0
  362. package/src/modules/plugin/lib/launch77-workspace.code-workspace +14 -0
  363. package/src/modules/plugin/lib/plugin-registry.ts +59 -0
  364. package/src/modules/plugin/services/plugin-svc.ts +53 -0
  365. package/src/modules/plugin/types/plugin-types.ts +21 -0
  366. package/src/modules/startup/commands/create-startup.ts +53 -0
  367. package/src/modules/startup/errors/startup-errors.ts +23 -0
  368. package/src/modules/startup/index.ts +11 -0
  369. package/src/modules/startup/services/startup-service.ts +57 -0
  370. package/src/modules/startup/types/startup-types.ts +8 -0
  371. package/src/modules/startup/utils/startup-validators.ts +19 -0
  372. package/src/modules/workspace/commands/init-workspace.ts +63 -0
  373. package/src/modules/workspace/errors/workspace-errors.ts +16 -0
  374. package/src/modules/workspace/index.ts +11 -0
  375. package/src/modules/workspace/services/workspace-service.ts +59 -0
  376. package/src/modules/workspace/types/workspace-types.ts +8 -0
  377. package/src/modules/workspace/utils/workspace-validators.ts +19 -0
  378. package/src/utils/launch77-context.ts +152 -0
  379. package/src/utils/launch77-validation.ts +59 -0
  380. package/src/utils/monorepo.ts +137 -0
  381. package/src/utils/validation.ts +117 -0
  382. package/src/utils/version.ts +16 -0
  383. package/templates/startup/apps/.gitkeep +8 -0
  384. package/templates/workspace/.eslintignore +7 -0
  385. package/templates/workspace/.eslintrc.js +38 -0
  386. package/templates/workspace/.husky/pre-push +24 -0
  387. package/templates/workspace/.launch77/workspace.json +3 -0
  388. package/templates/workspace/.lintstagedrc.json +4 -0
  389. package/templates/workspace/.prettierrc +9 -0
  390. package/templates/workspace/README.md +62 -0
  391. package/templates/workspace/app-templates/.gitkeep +1 -0
  392. package/templates/workspace/apps/.gitkeep +1 -0
  393. package/templates/workspace/libraries/.gitkeep +1 -0
  394. package/templates/workspace/package.json +31 -0
  395. package/templates/workspace/plugins/.gitkeep +1 -0
  396. package/templates/workspace/tsconfig.json +22 -0
  397. package/templates/workspace/turbo.json +25 -0
  398. package/tsconfig.json +23 -0
@@ -0,0 +1,145 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://launch77.io/schemas/catalog-ui-components.schema.json",
4
+ "title": "Launch77 UI Components Catalog",
5
+ "description": "Catalog metadata for UI component libraries. Generated during library build and consumed by Launch77 platform for component discovery.",
6
+ "type": "object",
7
+ "required": ["catalogType", "catalogVersion", "packageName", "packageVersion", "generatedAt", "components"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "catalogType": {
11
+ "type": "string",
12
+ "const": "ui-components",
13
+ "description": "Type of catalog - identifies this as a UI components catalog"
14
+ },
15
+ "catalogVersion": {
16
+ "type": "string",
17
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
18
+ "description": "Semantic version of the catalog schema (e.g., 0.1.0)"
19
+ },
20
+ "packageName": {
21
+ "type": "string",
22
+ "pattern": "^@[a-z0-9-]+/[a-z0-9-]+$",
23
+ "description": "NPM package name (e.g., @launch77/ui)"
24
+ },
25
+ "packageVersion": {
26
+ "type": "string",
27
+ "description": "Version of the package containing these components"
28
+ },
29
+ "generatedAt": {
30
+ "type": "string",
31
+ "format": "date-time",
32
+ "description": "ISO 8601 timestamp when catalog was generated"
33
+ },
34
+ "components": {
35
+ "type": "array",
36
+ "description": "Array of UI component metadata",
37
+ "items": {
38
+ "$ref": "#/definitions/UiComponent"
39
+ }
40
+ }
41
+ },
42
+ "definitions": {
43
+ "UiComponent": {
44
+ "type": "object",
45
+ "description": "Metadata for a single UI component",
46
+ "required": ["id", "kind", "name", "packageName", "category", "description", "tags"],
47
+ "additionalProperties": false,
48
+ "properties": {
49
+ "id": {
50
+ "type": "string",
51
+ "pattern": "^@[a-z0-9-]+/[a-z0-9-]+#[A-Z][a-zA-Z0-9]*$",
52
+ "description": "Unique identifier: packageName#ComponentName (e.g., @launch77/ui#Button)"
53
+ },
54
+ "kind": {
55
+ "type": "string",
56
+ "const": "ui_component",
57
+ "description": "Component kind - always 'ui_component' for UI components"
58
+ },
59
+ "name": {
60
+ "type": "string",
61
+ "pattern": "^[A-Z][a-zA-Z0-9]*$",
62
+ "description": "Component name in PascalCase (e.g., Button, AlertDialog)"
63
+ },
64
+ "packageName": {
65
+ "type": "string",
66
+ "pattern": "^@[a-z0-9-]+/[a-z0-9-]+$",
67
+ "description": "NPM package containing this component"
68
+ },
69
+ "category": {
70
+ "type": "string",
71
+ "enum": ["actions", "forms", "feedback", "layout", "marketing", "typography", "infrastructure", "compliance"],
72
+ "description": "Component category for organization and discovery"
73
+ },
74
+ "description": {
75
+ "type": "string",
76
+ "minLength": 1,
77
+ "description": "Human-readable description of the component"
78
+ },
79
+ "tags": {
80
+ "type": "array",
81
+ "description": "Search tags for component discovery",
82
+ "items": {
83
+ "type": "string",
84
+ "minLength": 1
85
+ },
86
+ "minItems": 1
87
+ },
88
+ "props": {
89
+ "type": "array",
90
+ "description": "Component props (optional - extracted from TypeScript)",
91
+ "items": {
92
+ "type": "string"
93
+ }
94
+ },
95
+ "sourcePath": {
96
+ "type": "string",
97
+ "description": "Relative path to component source file from repository root (optional)"
98
+ },
99
+ "library": {
100
+ "type": "string",
101
+ "description": "Parent library package name (optional - typically same as packageName)"
102
+ },
103
+ "guidance": {
104
+ "type": "object",
105
+ "description": "Usage guidance for the component (optional)",
106
+ "additionalProperties": false,
107
+ "properties": {
108
+ "whenToUse": {
109
+ "type": "string",
110
+ "description": "When to use this component"
111
+ },
112
+ "whenNotToUse": {
113
+ "type": "string",
114
+ "description": "When NOT to use this component (anti-patterns)"
115
+ }
116
+ }
117
+ },
118
+ "example": {
119
+ "type": "string",
120
+ "description": "Code example showing component usage (optional)"
121
+ },
122
+ "examples": {
123
+ "type": "object",
124
+ "description": "Reference to examples module (optional)",
125
+ "required": ["module", "export", "sourcePath"],
126
+ "additionalProperties": false,
127
+ "properties": {
128
+ "module": {
129
+ "type": "string",
130
+ "description": "Module path to import examples (e.g., @launch77/ui/examples)"
131
+ },
132
+ "export": {
133
+ "type": "string",
134
+ "description": "Export name for examples (e.g., ButtonExamples)"
135
+ },
136
+ "sourcePath": {
137
+ "type": "string",
138
+ "description": "Relative path to examples source file from repository root"
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Service for generating catalog metadata files for component libraries
3
+ */
4
+ import type { CatalogConfig, GenerationResult } from '../types/catalog-types.js';
5
+ export declare class CatalogGeneratorService {
6
+ /**
7
+ * Generate catalog metadata for a component library
8
+ *
9
+ * @param libraryPath - Absolute path to the library directory
10
+ * @param config - Validated catalog configuration
11
+ * @returns Generation result with success status and quality report
12
+ */
13
+ generateForLibrary(libraryPath: string, config: CatalogConfig): Promise<GenerationResult>;
14
+ /**
15
+ * Filter components that passed validation
16
+ */
17
+ private filterValidComponents;
18
+ /**
19
+ * Categorize validations into errors and warnings
20
+ */
21
+ private categorizeValidations;
22
+ /**
23
+ * Read package.json from library directory
24
+ */
25
+ private readPackageJson;
26
+ }
27
+ //# sourceMappingURL=catalog-generator-svc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog-generator-svc.d.ts","sourceRoot":"","sources":["../../../../src/modules/catalog/services/catalog-generator-svc.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,OAAO,KAAK,EAAE,aAAa,EAAsB,gBAAgB,EAAiC,MAAM,2BAA2B,CAAA;AAEnI,qBAAa,uBAAuB;IAClC;;;;;;OAMG;IACG,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAuD/F;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAa7B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAU7B;;OAEG;YACW,eAAe;CAe9B"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Service for generating catalog metadata files for component libraries
3
+ */
4
+ import path from 'path';
5
+ import fs from 'fs-extra';
6
+ import { scanUILibrary } from '../scanners/ui-component-scanner.js';
7
+ import { generateQualityReport } from '../utils/quality-reporter.js';
8
+ export class CatalogGeneratorService {
9
+ /**
10
+ * Generate catalog metadata for a component library
11
+ *
12
+ * @param libraryPath - Absolute path to the library directory
13
+ * @param config - Validated catalog configuration
14
+ * @returns Generation result with success status and quality report
15
+ */
16
+ async generateForLibrary(libraryPath, config) {
17
+ try {
18
+ // 1. Scan library components
19
+ const scanResult = await scanUILibrary(libraryPath, config.packageName);
20
+ // 2. Validate components
21
+ const validatedComponents = this.filterValidComponents(scanResult.components, config);
22
+ // 3. Extract validation results
23
+ const { errors, warnings } = this.categorizeValidations(scanResult.validations);
24
+ // 4. Generate quality report
25
+ const qualityReport = generateQualityReport(scanResult.components.length, scanResult.excluded, scanResult.validations);
26
+ // 5. Check if generation should fail (strict mode with errors)
27
+ if (config.validation.strict && errors.length > 0) {
28
+ return {
29
+ success: false,
30
+ catalogFile: '',
31
+ qualityReport,
32
+ errors,
33
+ warnings,
34
+ };
35
+ }
36
+ // 6. Read package version
37
+ const packageJson = await this.readPackageJson(libraryPath);
38
+ // 7. Create catalog
39
+ const catalog = {
40
+ $schema: 'https://launch77.io/schemas/catalog-ui-components.schema.json',
41
+ catalogType: 'ui-components',
42
+ catalogVersion: config.catalogVersion,
43
+ packageName: config.packageName,
44
+ packageVersion: packageJson.version,
45
+ generatedAt: new Date().toISOString(),
46
+ components: validatedComponents,
47
+ };
48
+ // 8. Write catalog file
49
+ const outputPath = path.join(libraryPath, config.outputFile);
50
+ await fs.writeJson(outputPath, catalog, { spaces: 2 });
51
+ return {
52
+ success: true,
53
+ catalogFile: outputPath,
54
+ qualityReport,
55
+ errors,
56
+ warnings,
57
+ };
58
+ }
59
+ catch (error) {
60
+ throw new Error(`Failed to generate catalog: ${error instanceof Error ? error.message : String(error)}`);
61
+ }
62
+ }
63
+ /**
64
+ * Filter components that passed validation
65
+ */
66
+ filterValidComponents(components, config) {
67
+ // In strict mode, only include components with valid metadata
68
+ if (config.validation.strict) {
69
+ return components.filter((component) => {
70
+ // Component is valid if it has required fields
71
+ return component.description && component.category;
72
+ });
73
+ }
74
+ // In non-strict mode, include all components
75
+ return components;
76
+ }
77
+ /**
78
+ * Categorize validations into errors and warnings
79
+ */
80
+ categorizeValidations(validations) {
81
+ const errors = validations.filter((v) => !v.valid && v.errors.length > 0);
82
+ const warnings = validations.filter((v) => v.warnings.length > 0);
83
+ return { errors, warnings };
84
+ }
85
+ /**
86
+ * Read package.json from library directory
87
+ */
88
+ async readPackageJson(libraryPath) {
89
+ const packageJsonPath = path.join(libraryPath, 'package.json');
90
+ if (!(await fs.pathExists(packageJsonPath))) {
91
+ throw new Error(`package.json not found in ${libraryPath}`);
92
+ }
93
+ const packageJson = await fs.readJson(packageJsonPath);
94
+ if (!packageJson.version) {
95
+ throw new Error(`package.json in ${libraryPath} does not have a version field`);
96
+ }
97
+ return packageJson;
98
+ }
99
+ }
100
+ //# sourceMappingURL=catalog-generator-svc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog-generator-svc.js","sourceRoot":"","sources":["../../../../src/modules/catalog/services/catalog-generator-svc.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,OAAO,EAAE,MAAM,UAAU,CAAA;AAEzB,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAIpE,MAAM,OAAO,uBAAuB;IAClC;;;;;;OAMG;IACH,KAAK,CAAC,kBAAkB,CAAC,WAAmB,EAAE,MAAqB;QACjE,IAAI,CAAC;YACH,6BAA6B;YAC7B,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAA;YAEvE,yBAAyB;YACzB,MAAM,mBAAmB,GAAG,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;YAErF,gCAAgC;YAChC,MAAM,EAAE,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AAC,QAAQ,CAAC,eAAe,CAAC,CAAA;QAEtD,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,mBAAmB,WAAW,gCAAgC,CAAC,CAAA;QACjF,CAAC;QAED,OAAO,WAAW,CAAA;IACpB,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=catalog-generator-svc.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog-generator-svc.test.d.ts","sourceRoot":"","sources":["../../../../src/modules/catalog/services/catalog-generator-svc.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,201 @@
1
+ import path from 'path';
2
+ import fs from 'fs-extra';
3
+ import { describe, test, expect, beforeEach, afterEach } from 'vitest';
4
+ import { CatalogGeneratorService } from './catalog-generator-svc.js';
5
+ describe('CatalogGeneratorService', () => {
6
+ const service = new CatalogGeneratorService();
7
+ const testDir = path.join(process.cwd(), '.test-temp', 'catalog-generator');
8
+ beforeEach(async () => {
9
+ // Create test directory
10
+ await fs.ensureDir(testDir);
11
+ });
12
+ afterEach(async () => {
13
+ // Clean up test directory
14
+ await fs.remove(testDir);
15
+ });
16
+ describe('generateForLibrary', () => {
17
+ test('throws error if package.json not found', async () => {
18
+ const emptyDir = path.join(testDir, 'empty-lib');
19
+ await fs.ensureDir(emptyDir);
20
+ const config = {
21
+ type: 'ui-components',
22
+ packageName: '@test/lib',
23
+ sourceDir: './src',
24
+ componentsDir: './src/components',
25
+ exportsFile: './src/index.ts',
26
+ outputFile: 'catalog-ui-components.json',
27
+ catalogVersion: '0.1.0',
28
+ validation: {
29
+ strict: true,
30
+ requireCategory: true,
31
+ requireDescription: true,
32
+ minDescriptionLength: 20,
33
+ requireWhenToUse: true,
34
+ requireWhenNotToUse: true,
35
+ minTags: 3,
36
+ },
37
+ };
38
+ await expect(service.generateForLibrary(emptyDir, config)).rejects.toThrow('package.json not found');
39
+ });
40
+ test('throws error if package.json has no version', async () => {
41
+ const libDir = path.join(testDir, 'no-version-lib');
42
+ await fs.ensureDir(libDir);
43
+ await fs.writeJson(path.join(libDir, 'package.json'), { name: '@test/lib' });
44
+ const config = {
45
+ type: 'ui-components',
46
+ packageName: '@test/lib',
47
+ sourceDir: './src',
48
+ componentsDir: './src/components',
49
+ exportsFile: './src/index.ts',
50
+ outputFile: 'catalog-ui-components.json',
51
+ catalogVersion: '0.1.0',
52
+ validation: {
53
+ strict: true,
54
+ requireCategory: true,
55
+ requireDescription: true,
56
+ minDescriptionLength: 20,
57
+ requireWhenToUse: true,
58
+ requireWhenNotToUse: true,
59
+ minTags: 3,
60
+ },
61
+ };
62
+ await expect(service.generateForLibrary(libDir, config)).rejects.toThrow('does not have a version field');
63
+ });
64
+ test('generates empty catalog for library with no components', async () => {
65
+ const libDir = path.join(testDir, 'empty-components-lib');
66
+ await fs.ensureDir(path.join(libDir, 'src'));
67
+ await fs.writeJson(path.join(libDir, 'package.json'), {
68
+ name: '@test/lib',
69
+ version: '1.0.0',
70
+ });
71
+ await fs.writeFile(path.join(libDir, 'src', 'index.ts'), '// No exports');
72
+ const config = {
73
+ type: 'ui-components',
74
+ packageName: '@test/lib',
75
+ sourceDir: './src',
76
+ componentsDir: './src/components',
77
+ exportsFile: './src/index.ts',
78
+ outputFile: 'catalog-ui-components.json',
79
+ catalogVersion: '0.1.0',
80
+ validation: {
81
+ strict: false, // Non-strict to allow empty catalog
82
+ requireCategory: true,
83
+ requireDescription: true,
84
+ minDescriptionLength: 20,
85
+ requireWhenToUse: true,
86
+ requireWhenNotToUse: true,
87
+ minTags: 3,
88
+ },
89
+ };
90
+ const result = await service.generateForLibrary(libDir, config);
91
+ expect(result.success).toBe(true);
92
+ expect(result.qualityReport.totalComponents).toBe(0);
93
+ expect(await fs.pathExists(path.join(libDir, 'catalog-ui-components.json'))).toBe(true);
94
+ const catalog = await fs.readJson(path.join(libDir, 'catalog-ui-components.json'));
95
+ expect(catalog.catalogType).toBe('ui-components');
96
+ expect(catalog.catalogVersion).toBe('0.1.0');
97
+ expect(catalog.packageName).toBe('@test/lib');
98
+ expect(catalog.packageVersion).toBe('1.0.0');
99
+ expect(catalog.components).toEqual([]);
100
+ expect(catalog.generatedAt).toBeTruthy();
101
+ });
102
+ test('writes catalog to configured output file', async () => {
103
+ const libDir = path.join(testDir, 'custom-output-lib');
104
+ await fs.ensureDir(path.join(libDir, 'src'));
105
+ await fs.writeJson(path.join(libDir, 'package.json'), {
106
+ name: '@test/lib',
107
+ version: '2.0.0',
108
+ });
109
+ await fs.writeFile(path.join(libDir, 'src', 'index.ts'), '// No exports');
110
+ const config = {
111
+ type: 'ui-components',
112
+ packageName: '@test/lib',
113
+ sourceDir: './src',
114
+ componentsDir: './src/components',
115
+ exportsFile: './src/index.ts',
116
+ outputFile: 'custom-catalog.json', // Custom output file
117
+ catalogVersion: '1.2.3',
118
+ validation: {
119
+ strict: false,
120
+ requireCategory: true,
121
+ requireDescription: true,
122
+ minDescriptionLength: 20,
123
+ requireWhenToUse: true,
124
+ requireWhenNotToUse: true,
125
+ minTags: 3,
126
+ },
127
+ };
128
+ const result = await service.generateForLibrary(libDir, config);
129
+ expect(result.success).toBe(true);
130
+ expect(result.catalogFile).toBe(path.join(libDir, 'custom-catalog.json'));
131
+ expect(await fs.pathExists(path.join(libDir, 'custom-catalog.json'))).toBe(true);
132
+ const catalog = await fs.readJson(path.join(libDir, 'custom-catalog.json'));
133
+ expect(catalog.catalogVersion).toBe('1.2.3');
134
+ expect(catalog.packageVersion).toBe('2.0.0');
135
+ });
136
+ test('catalog includes correct metadata structure', async () => {
137
+ const libDir = path.join(testDir, 'metadata-lib');
138
+ await fs.ensureDir(path.join(libDir, 'src'));
139
+ await fs.writeJson(path.join(libDir, 'package.json'), {
140
+ name: '@test/meta-lib',
141
+ version: '3.1.4',
142
+ });
143
+ await fs.writeFile(path.join(libDir, 'src', 'index.ts'), '');
144
+ const config = {
145
+ type: 'ui-components',
146
+ packageName: '@test/meta-lib',
147
+ sourceDir: './src',
148
+ componentsDir: './src/components',
149
+ exportsFile: './src/index.ts',
150
+ outputFile: 'catalog-ui-components.json',
151
+ catalogVersion: '2.0.0',
152
+ validation: {
153
+ strict: false,
154
+ requireCategory: true,
155
+ requireDescription: true,
156
+ minDescriptionLength: 20,
157
+ requireWhenToUse: true,
158
+ requireWhenNotToUse: true,
159
+ minTags: 3,
160
+ },
161
+ };
162
+ const result = await service.generateForLibrary(libDir, config);
163
+ expect(result.success).toBe(true);
164
+ const catalog = await fs.readJson(path.join(libDir, 'catalog-ui-components.json'));
165
+ // Verify required fields
166
+ expect(catalog).toHaveProperty('catalogType', 'ui-components');
167
+ expect(catalog).toHaveProperty('catalogVersion', '2.0.0');
168
+ expect(catalog).toHaveProperty('packageName', '@test/meta-lib');
169
+ expect(catalog).toHaveProperty('packageVersion', '3.1.4');
170
+ expect(catalog).toHaveProperty('generatedAt');
171
+ expect(catalog).toHaveProperty('components');
172
+ // Verify generatedAt is valid ISO date
173
+ expect(() => new Date(catalog.generatedAt)).not.toThrow();
174
+ });
175
+ });
176
+ describe('error handling', () => {
177
+ test('provides helpful error message on failure', async () => {
178
+ const nonExistentDir = path.join(testDir, 'does-not-exist');
179
+ const config = {
180
+ type: 'ui-components',
181
+ packageName: '@test/lib',
182
+ sourceDir: './src',
183
+ componentsDir: './src/components',
184
+ exportsFile: './src/index.ts',
185
+ outputFile: 'catalog-ui-components.json',
186
+ catalogVersion: '0.1.0',
187
+ validation: {
188
+ strict: true,
189
+ requireCategory: true,
190
+ requireDescription: true,
191
+ minDescriptionLength: 20,
192
+ requireWhenToUse: true,
193
+ requireWhenNotToUse: true,
194
+ minTags: 3,
195
+ },
196
+ };
197
+ await expect(service.generateForLibrary(nonExistentDir, config)).rejects.toThrow('Failed to generate catalog');
198
+ });
199
+ });
200
+ });
201
+ //# sourceMappingURL=catalog-generator-svc.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog-generator-svc.test.js","sourceRoot":"","sources":["../../../../src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;YAED,MAAM,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAA;QAChH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,39 @@
1
+ import type { MonorepoContext } from '../../../utils/monorepo.js';
2
+ export interface ScanCatalogOptions {
3
+ strict?: boolean;
4
+ quiet?: boolean;
5
+ }
6
+ export interface ScanCatalogResult {
7
+ catalogPath: string;
8
+ version: string;
9
+ totalArtifacts: number;
10
+ }
11
+ /**
12
+ * Catalog Service
13
+ *
14
+ * Scans Launch77 artifacts and generates catalog.json
15
+ */
16
+ export declare class CatalogService {
17
+ /**
18
+ * Scan Launch77 codebase and generate catalog.json
19
+ */
20
+ scanCatalog(context: MonorepoContext, options?: ScanCatalogOptions): Promise<ScanCatalogResult>;
21
+ /**
22
+ * Scan all UI components from @launch77/ui and @launch/marketing-ui
23
+ */
24
+ private scanAllUIComponents;
25
+ /**
26
+ * Check if catalog content has changed (excluding version field)
27
+ */
28
+ private catalogHasChanges;
29
+ /**
30
+ * Get current version from existing catalog
31
+ */
32
+ private getCurrentVersion;
33
+ /**
34
+ * Get the next version by incrementing the patch version of existing catalog
35
+ * If no catalog exists, start at 1.0.0
36
+ */
37
+ private getNextVersion;
38
+ }
39
+ //# sourceMappingURL=catalog-svc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog-svc.d.ts","sourceRoot":"","sources":["../../../../src/modules/catalog/services/catalog-svc.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;CACvB;AAED;;;;GAIG;AACH,qBAAa,cAAc;IACzB;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA+FzG;;OAEG;YACW,mBAAmB;IA0BjC;;OAEG;YACW,iBAAiB;IAwB/B;;OAEG;YACW,iBAAiB;IAa/B;;;OAGG;YACW,cAAc;CAgB7B"}