@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 @@
1
+ {"version":3,"file":"typescript-parser.d.ts","sourceRoot":"","sources":["../../../../src/modules/catalog/parsers/typescript-parser.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA2BtE;AAuCD;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQzE"}
@@ -0,0 +1,82 @@
1
+ import * as path from 'path';
2
+ import fs from 'fs-extra';
3
+ import * as ts from 'typescript';
4
+ /**
5
+ * Extract prop names from a React component TypeScript file
6
+ * Looks for Props interfaces/types and exports
7
+ */
8
+ export async function extractProps(filePath) {
9
+ try {
10
+ const content = await fs.readFile(filePath, 'utf-8');
11
+ const sourceFile = ts.createSourceFile(path.basename(filePath), content, ts.ScriptTarget.Latest, true);
12
+ const props = new Set();
13
+ // Visit all nodes in the AST
14
+ const visitor = (node) => {
15
+ // Look for type/interface definitions with "Props" in the name
16
+ if (ts.isInterfaceDeclaration(node) || ts.isTypeAliasDeclaration(node)) {
17
+ const name = node.name.text;
18
+ if (name.includes('Props')) {
19
+ extractPropsFromType(node, props);
20
+ }
21
+ }
22
+ ts.forEachChild(node, visitor);
23
+ };
24
+ visitor(sourceFile);
25
+ return Array.from(props);
26
+ }
27
+ catch (error) {
28
+ // If parsing fails, return empty array
29
+ return [];
30
+ }
31
+ }
32
+ function extractPropsFromType(node, props) {
33
+ if (ts.isInterfaceDeclaration(node)) {
34
+ // Extract from interface members
35
+ node.members.forEach((member) => {
36
+ if (ts.isPropertySignature(member) && member.name && ts.isIdentifier(member.name)) {
37
+ props.add(member.name.text);
38
+ }
39
+ });
40
+ }
41
+ else if (ts.isTypeAliasDeclaration(node)) {
42
+ // Extract from type alias
43
+ const typeNode = node.type;
44
+ if (ts.isIntersectionTypeNode(typeNode)) {
45
+ // Handle intersection types (e.g., A & B & C)
46
+ typeNode.types.forEach((type) => {
47
+ if (ts.isTypeLiteralNode(type)) {
48
+ type.members.forEach((member) => {
49
+ if (ts.isPropertySignature(member) && member.name && ts.isIdentifier(member.name)) {
50
+ props.add(member.name.text);
51
+ }
52
+ });
53
+ }
54
+ });
55
+ }
56
+ else if (ts.isTypeLiteralNode(typeNode)) {
57
+ // Handle type literal (e.g., { prop1: string })
58
+ typeNode.members.forEach((member) => {
59
+ if (ts.isPropertySignature(member) && member.name && ts.isIdentifier(member.name)) {
60
+ props.add(member.name.text);
61
+ }
62
+ });
63
+ }
64
+ }
65
+ // Add common HTML attributes that are usually inherited
66
+ const commonProps = ['className', 'style', 'children', 'onClick', 'onChange'];
67
+ commonProps.forEach((prop) => props.add(prop));
68
+ }
69
+ /**
70
+ * Detect if a file is a React component
71
+ */
72
+ export async function isReactComponent(filePath) {
73
+ try {
74
+ const content = await fs.readFile(filePath, 'utf-8');
75
+ // Simple heuristic: contains React import and JSX/TSX
76
+ return content.includes('import') && (content.includes('React') || content.includes("from 'react'")) && (filePath.endsWith('.tsx') || filePath.endsWith('.jsx'));
77
+ }
78
+ catch {
79
+ return false;
80
+ }
81
+ }
82
+ //# sourceMappingURL=typescript-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript-parser.js","sourceRoot":"","sources":["../../../../src/modules/catalog/parsers/typescript-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAQhC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,QAAgB;IACjD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,E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CAAC;YACH,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IAED,wDAAwD;IACxD,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;IAC7E,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAA;AAChD,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,QAAgB;IACrD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QACpD,sDAAsD;QACtD,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAA;IAClK,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Extract Launch77 metadata from JSDoc comments in source files
3
+ */
4
+ import type { ComponentMetadata } from '../types/catalog-types.js';
5
+ /**
6
+ * Extract metadata from a component source file
7
+ * Looks for @launch77-component JSDoc tag and extracts metadata fields
8
+ */
9
+ export declare function extractComponentMetadata(filePath: string): Promise<ComponentMetadata>;
10
+ //# sourceMappingURL=metadata-extractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata-extractor.d.ts","sourceRoot":"","sources":["../../../../src/modules/catalog/scanners/metadata-extractor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAElE;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAuE3F"}
@@ -0,0 +1,122 @@
1
+ /**
2
+ * Extract Launch77 metadata from JSDoc comments in source files
3
+ */
4
+ import fs from 'fs-extra';
5
+ /**
6
+ * Extract metadata from a component source file
7
+ * Looks for @launch77-component JSDoc tag and extracts metadata fields
8
+ */
9
+ export async function extractComponentMetadata(filePath) {
10
+ try {
11
+ const content = await fs.readFile(filePath, 'utf-8');
12
+ // Check for @launch77-ignore tag first
13
+ const ignoreRegex = /\/\*\*[\s\S]*?@launch77-ignore[\s\S]*?\*\//;
14
+ const ignoreMatch = content.match(ignoreRegex);
15
+ if (ignoreMatch) {
16
+ const reason = extractField(ignoreMatch[0], 'reason');
17
+ return {
18
+ description: '',
19
+ category: '',
20
+ whenToUse: '',
21
+ whenNotToUse: '',
22
+ tags: [],
23
+ example: '',
24
+ ignored: true,
25
+ ignoreReason: reason || 'Excluded from catalog',
26
+ };
27
+ }
28
+ // Look for JSDoc comment with @launch77-component marker
29
+ const jsdocRegex = /\/\*\*[\s\S]*?@launch77-component[\s\S]*?\*\//;
30
+ const match = content.match(jsdocRegex);
31
+ if (!match) {
32
+ // No Launch77 metadata found - return empty
33
+ return {
34
+ description: '',
35
+ category: '',
36
+ whenToUse: '',
37
+ whenNotToUse: '',
38
+ tags: [],
39
+ example: '',
40
+ ignored: false,
41
+ };
42
+ }
43
+ const jsdoc = match[0];
44
+ // Extract individual fields
45
+ const description = extractField(jsdoc, 'description');
46
+ const category = extractField(jsdoc, 'category');
47
+ const whenToUse = extractField(jsdoc, 'whenToUse');
48
+ const whenNotToUse = extractField(jsdoc, 'whenNotToUse');
49
+ const tags = extractTags(jsdoc);
50
+ const example = extractExample(jsdoc);
51
+ return {
52
+ description,
53
+ category,
54
+ whenToUse,
55
+ whenNotToUse,
56
+ tags,
57
+ example,
58
+ ignored: false,
59
+ };
60
+ }
61
+ catch (error) {
62
+ // If we can't read the file or parse fails, return empty metadata
63
+ // This ensures the scan doesn't fail if metadata is missing
64
+ return {
65
+ description: '',
66
+ category: '',
67
+ whenToUse: '',
68
+ whenNotToUse: '',
69
+ tags: [],
70
+ example: '',
71
+ ignored: false,
72
+ };
73
+ }
74
+ }
75
+ /**
76
+ * Extract a single-line field from JSDoc
77
+ * Format: @fieldName value here until end of line
78
+ */
79
+ function extractField(jsdoc, fieldName) {
80
+ const regex = new RegExp(`@${fieldName}\\s+(.+?)(?=\\n|\\*\\/|@)`, 's');
81
+ const match = jsdoc.match(regex);
82
+ if (!match)
83
+ return '';
84
+ // Clean up the value: remove extra whitespace, asterisks from line breaks
85
+ return match[1]
86
+ .split('\n')
87
+ .map((line) => line.replace(/^\s*\*\s?/, '').trim())
88
+ .filter((line) => line.length > 0)
89
+ .join(' ')
90
+ .trim();
91
+ }
92
+ /**
93
+ * Extract tags (comma or space separated)
94
+ * Format: @tags tag1, tag2, tag3
95
+ */
96
+ function extractTags(jsdoc) {
97
+ const tagsString = extractField(jsdoc, 'tags');
98
+ if (!tagsString)
99
+ return [];
100
+ // Split by comma or whitespace, clean up
101
+ return tagsString
102
+ .split(/[,\s]+/)
103
+ .map((tag) => tag.trim())
104
+ .filter((tag) => tag.length > 0);
105
+ }
106
+ /**
107
+ * Extract example code block
108
+ * Format: @example followed by code until next @ tag or end of comment
109
+ */
110
+ function extractExample(jsdoc) {
111
+ const regex = /@example\s+([\s\S]+?)(?=@|\*\/)/;
112
+ const match = jsdoc.match(regex);
113
+ if (!match)
114
+ return '';
115
+ // Clean up the example: remove leading asterisks and extra whitespace
116
+ return match[1]
117
+ .split('\n')
118
+ .map((line) => line.replace(/^\s*\*\s?/, ''))
119
+ .join('\n')
120
+ .trim();
121
+ }
122
+ //# sourceMappingURL=metadata-extractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata-extractor.js","sourceRoot":"","sources":["../../../../src/modules/catalog/scanners/metadata-extract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CAAC,CAAC;SACjC,IAAI,CAAC,GAAG,CAAC;SACT,IAAI,EAAE,CAAA;AACX,CAAC;AAED;;;GAGG;AACH,SAAS,WAAW,CAAC,KAAa;IAChC,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IAC9C,IAAI,CAAC,UAAU;QAAE,OAAO,EAAE,CAAA;IAE1B,yCAAyC;IACzC,OAAO,UAAU;SACd,KAAK,CAAC,QAAQ,CAAC;SACf,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;SACxB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AACpC,CAAC;AAED;;;GAGG;AACH,SAAS,cAAc,CAAC,KAAa;IACnC,MAAM,KAAK,GAAG,iCAAiC,CAAA;IAC/C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAChC,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAA;IAErB,sEAAsE;IACtE,OAAO,KAAK,CAAC,CAAC,CAAC;SACZ,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;SAC5C,IAAI,CAAC,IAAI,CAAC;SACV,IAAI,EAAE,CAAA;AACX,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Validate Launch77 component metadata for quality and completeness
3
+ */
4
+ import type { ComponentMetadata, ValidationResult } from '../types/catalog-types.js';
5
+ export declare function validateMetadata(metadata: ComponentMetadata, componentName: string, filePath: string): ValidationResult;
6
+ //# sourceMappingURL=metadata-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata-validator.d.ts","sourceRoot":"","sources":["../../../../src/modules/catalog/scanners/metadata-validator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAQpF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAsDvH"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Validate Launch77 component metadata for quality and completeness
3
+ */
4
+ /**
5
+ * Validate component metadata against Launch77 quality standards
6
+ */
7
+ // Valid category values for UI components
8
+ const VALID_CATEGORIES = ['actions', 'forms', 'feedback', 'layout', 'marketing', 'typography', 'infrastructure', 'compliance'];
9
+ export function validateMetadata(metadata, componentName, filePath) {
10
+ const errors = [];
11
+ const warnings = [];
12
+ // REQUIRED: @launch77-component tag (indicated by non-empty description)
13
+ if (!metadata.description) {
14
+ errors.push('Missing @launch77-component tag');
15
+ }
16
+ // REQUIRED: @category tag
17
+ if (!metadata.category) {
18
+ errors.push('Missing @category tag (required)');
19
+ }
20
+ else if (!VALID_CATEGORIES.includes(metadata.category)) {
21
+ errors.push(`Invalid category "${metadata.category}". Must be one of: ${VALID_CATEGORIES.join(', ')}`);
22
+ }
23
+ // Check description quality
24
+ if (metadata.description && metadata.description.length < 20) {
25
+ warnings.push('Description is too short (< 20 characters)');
26
+ }
27
+ // Check for generic descriptions
28
+ if (metadata.description && /^[A-Z][a-z]+ component$/.test(metadata.description)) {
29
+ warnings.push(`Generic description detected: "${metadata.description}"`);
30
+ }
31
+ // RECOMMENDED: Guidance fields
32
+ if (!metadata.whenToUse) {
33
+ warnings.push('Missing @whenToUse guidance');
34
+ }
35
+ if (!metadata.whenNotToUse) {
36
+ warnings.push('Missing @whenNotToUse guidance');
37
+ }
38
+ // RECOMMENDED: Tags
39
+ if (metadata.tags.length === 0) {
40
+ warnings.push('Missing @tags');
41
+ }
42
+ else if (metadata.tags.length < 3) {
43
+ warnings.push('Too few tags (< 3 recommended)');
44
+ }
45
+ // RECOMMENDED: Example code
46
+ if (!metadata.example) {
47
+ warnings.push('Missing @example code');
48
+ }
49
+ return {
50
+ valid: errors.length === 0,
51
+ errors,
52
+ warnings,
53
+ componentName,
54
+ filePath,
55
+ };
56
+ }
57
+ //# sourceMappingURL=metadata-validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata-validator.js","sourceRoot":"","sources":["../../../../src/modules/catalog/scanners/metadata-validator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,0CAA0C;AAC1C,MAAM,gBAAgB,GAAsB,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAA;AAEjJ,MAAM,UAAU,gBAAgB,CAAC,QAA2B,EAAE,aAAqB,EAAE,QAAgB;IACnG,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,MAAM,QAAQ,GAAa,EAAE,CAAA;IAE7B,yEAAyE;IACzE,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;QAC1B,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAA;IAChD,CAAC;IAED,0BAA0B;IAC1B,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACvB,MAAM,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAA;IACjD,CAAC;SAAM,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzD,MAAM,CAAC,IAAI,CAAC,qBAAqB,QAAQ,CAAC,QAAQ,sBAAsB,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACxG,CAAC;IAED,4BAA4B;IAC5B,IAAI,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,WAAW,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QAC7D,QAAQ,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAA;IAC7D,CAAC;IAED,iCAAiC;IACjC,IAAI,QAAQ,CAAC,WAAW,IAAI,yBAAyB,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QACjF,QAAQ,CAAC,IAAI,CAAC,kCAAkC,QAAQ,CAAC,WAAW,GAAG,CAAC,CAAA;IAC1E,CAAC;IAED,+BAA+B;IAC/B,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;QACxB,QAAQ,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAA;IAC9C,CAAC;IAED,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;QAC3B,QAAQ,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAA;IACjD,CAAC;IAED,oBAAoB;IACpB,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;IAChC,CAAC;SAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,QAAQ,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAA;IACjD,CAAC;IAED,4BAA4B;IAC5B,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACtB,QAAQ,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA;IACxC,CAAC;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QAC1B,MAAM;QACN,QAAQ;QACR,aAAa;QACb,QAAQ;KACT,CAAA;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { UiComponent, ValidationResult } from '../types/catalog-types.js';
2
+ export interface ScanResult {
3
+ components: UiComponent[];
4
+ validations: ValidationResult[];
5
+ excluded: number;
6
+ }
7
+ /**
8
+ * Scan a UI library package for components
9
+ */
10
+ export declare function scanUILibrary(libraryPath: string, packageName: string): Promise<ScanResult>;
11
+ //# sourceMappingURL=ui-component-scanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-component-scanner.d.ts","sourceRoot":"","sources":["../../../../src/modules/catalog/scanners/ui-component-scanner.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAE9E,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,WAAW,EAAE,CAAA;IACzB,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC/B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CA8DjG"}
@@ -0,0 +1,147 @@
1
+ import * as path from 'path';
2
+ import fs from 'fs-extra';
3
+ import { extractComponentMetadata } from './metadata-extractor.js';
4
+ import { validateMetadata } from './metadata-validator.js';
5
+ import { extractProps, isReactComponent } from '../parsers/typescript-parser.js';
6
+ import { validateComponentName } from '../validators/component-name-validator.js';
7
+ /**
8
+ * Scan a UI library package for components
9
+ */
10
+ export async function scanUILibrary(libraryPath, packageName) {
11
+ const components = [];
12
+ const validations = [];
13
+ let excluded = 0;
14
+ // Read the main index file to find exports
15
+ const indexPath = path.join(libraryPath, 'src/index.ts');
16
+ if (!(await fs.pathExists(indexPath))) {
17
+ return { components, validations, excluded };
18
+ }
19
+ const indexContent = await fs.readFile(indexPath, 'utf-8');
20
+ // Parse exports: export * from './components/Button'
21
+ const exportRegex = /export\s+\*\s+from\s+['"](\.\/[^'"]+)['"]/g;
22
+ const exports = [];
23
+ let match;
24
+ while ((match = exportRegex.exec(indexContent)) !== null) {
25
+ exports.push(match[1]);
26
+ }
27
+ // Also parse: export { Button } from './components/Button'
28
+ const namedExportRegex = /export\s+\{([^}]+)\}\s+from\s+['"](\.\/[^'"]+)['"]/g;
29
+ while ((match = namedExportRegex.exec(indexContent)) !== null) {
30
+ exports.push(match[2]);
31
+ }
32
+ // Scan each export path
33
+ for (const exportPath of exports) {
34
+ const fullPath = path.join(libraryPath, 'src', exportPath.replace('./', ''));
35
+ // Check if it's a directory with index.ts or a .tsx file
36
+ let componentFile;
37
+ if (await fs.pathExists(fullPath + '.tsx')) {
38
+ componentFile = fullPath + '.tsx';
39
+ }
40
+ else if (await fs.pathExists(fullPath + '.ts')) {
41
+ componentFile = fullPath + '.ts';
42
+ }
43
+ else if (await fs.pathExists(path.join(fullPath, 'index.ts'))) {
44
+ // It's a directory, find the main component file
45
+ const files = await fs.readdir(fullPath);
46
+ const mainFile = files.find((f) => f.endsWith('.tsx') && !f.includes('.test.') && !f.includes('.stories.') && !f.includes('.examples.'));
47
+ if (mainFile) {
48
+ componentFile = path.join(fullPath, mainFile);
49
+ }
50
+ }
51
+ if (componentFile && (await isReactComponent(componentFile))) {
52
+ const result = await scanComponent(componentFile, packageName, libraryPath);
53
+ if (result) {
54
+ if (result.excluded) {
55
+ excluded++;
56
+ }
57
+ else {
58
+ components.push(result.component);
59
+ validations.push(result.validation);
60
+ }
61
+ }
62
+ }
63
+ }
64
+ return { components, validations, excluded };
65
+ }
66
+ async function scanComponent(filePath, packageName, libraryRoot) {
67
+ try {
68
+ // Extract component name from filename
69
+ const fileName = path.basename(filePath, path.extname(filePath));
70
+ const componentName = fileName;
71
+ // Validate component name
72
+ const nameValidation = validateComponentName(componentName);
73
+ if (!nameValidation.valid) {
74
+ console.warn(`Skipping ${filePath}: Invalid component name - ${nameValidation.errors.join(', ')}`);
75
+ return null;
76
+ }
77
+ // Calculate source path relative to repo root for validation
78
+ const sourcePath = path.relative(path.join(libraryRoot, '../../..'), filePath);
79
+ // Extract metadata from JSDoc (Launch77-specific)
80
+ const metadata = await extractComponentMetadata(filePath);
81
+ // Check if component is excluded via @launch77-ignore
82
+ if (metadata.ignored) {
83
+ // Return excluded marker - no validation needed for ignored components
84
+ return {
85
+ component: {}, // Won't be used, but satisfies type
86
+ validation: { valid: true, errors: [], warnings: [], componentName: '', filePath: '' },
87
+ excluded: true,
88
+ };
89
+ }
90
+ // Validate metadata (all non-ignored components must have @launch77-component and @category)
91
+ const validation = validateMetadata(metadata, componentName, sourcePath);
92
+ // Use category from metadata - validation ensures it exists and is valid
93
+ const category = metadata.category;
94
+ // Extract props
95
+ const props = await extractProps(filePath);
96
+ // Use metadata description - validation ensures it exists
97
+ const description = metadata.description;
98
+ // Generate ID
99
+ const id = `${packageName}#${componentName}`;
100
+ // Use explicit tags from metadata only (no auto-generation)
101
+ const tags = metadata.tags;
102
+ // Build guidance object if we have both fields
103
+ const guidance = metadata.whenToUse && metadata.whenNotToUse
104
+ ? {
105
+ whenToUse: metadata.whenToUse,
106
+ whenNotToUse: metadata.whenNotToUse,
107
+ }
108
+ : undefined;
109
+ // Check for examples file
110
+ let examples;
111
+ const examplesPath = filePath.replace(/\.tsx?$/, '.examples.tsx');
112
+ if (await fs.pathExists(examplesPath)) {
113
+ // Calculate examples source path relative to repo root
114
+ const examplesSourcePath = path.relative(path.join(libraryRoot, '../../..'), examplesPath);
115
+ examples = {
116
+ module: `${packageName}/examples`,
117
+ export: `${componentName}Examples`,
118
+ sourcePath: examplesSourcePath,
119
+ };
120
+ }
121
+ const component = {
122
+ id,
123
+ kind: 'ui_component',
124
+ name: componentName,
125
+ packageName,
126
+ category,
127
+ description,
128
+ tags,
129
+ props: props.length > 0 ? props : undefined,
130
+ sourcePath,
131
+ library: packageName, // Link component to its library
132
+ guidance,
133
+ example: metadata.example || undefined,
134
+ examples,
135
+ };
136
+ return {
137
+ component,
138
+ validation,
139
+ excluded: false,
140
+ };
141
+ }
142
+ catch (error) {
143
+ console.error(`Error scanning component ${filePath}:`, error);
144
+ return null;
145
+ }
146
+ }
147
+ //# sourceMappingURL=ui-component-scanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-component-scanner.js","sourceRoot":"","sources":["../../../../src/modules/catalog/scanners/ui-component-scanner.ts"],"names":[],"mappings":"AAAA,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,kBAAkB,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,YAAY,CAAC,CAAA;YAC1F,QAAQ,GAAG;gBACT,MAAM,EAAE,GAAG,WAAW,WAAW;gBACjC,MAAM,EAAE,GAAG,aAAa,UAAU;gBAClC,UAAU,EAAE,kBAAkB;aAC/B,CAAA;QACH,CAAC;QAED,MAAM,SAAS,GAAgB;YAC7B,EAAE;YACF,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,aAAa;YACnB,WAAW;YACX,QAAQ;YACR,WAAW;YACX,IAAI;YACJ,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;YAC3C,UAAU;YACV,OAAO,EAAE,WAAW,EAAE,gCAAgC;YACtD,QAAQ;YACR,OAAO,EAAE,QAAQ,CAAC,OAAO,IAAI,SAAS;YACtC,QAAQ;SACT,CAAA;QAED,OAAO;YACL,SAAS;YACT,UAAU;YACV,QAAQ,EAAE,KAAK;SAChB,CAAA;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,QAAQ,GAAG,EAAE,KAAK,CAAC,CAAA;QAC7D,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
@@ -0,0 +1,161 @@
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": [
8
+ "catalogType",
9
+ "catalogVersion",
10
+ "packageName",
11
+ "packageVersion",
12
+ "generatedAt",
13
+ "components"
14
+ ],
15
+ "additionalProperties": false,
16
+ "properties": {
17
+ "catalogType": {
18
+ "type": "string",
19
+ "const": "ui-components",
20
+ "description": "Type of catalog - identifies this as a UI components catalog"
21
+ },
22
+ "catalogVersion": {
23
+ "type": "string",
24
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
25
+ "description": "Semantic version of the catalog schema (e.g., 0.1.0)"
26
+ },
27
+ "packageName": {
28
+ "type": "string",
29
+ "pattern": "^@[a-z0-9-]+/[a-z0-9-]+$",
30
+ "description": "NPM package name (e.g., @launch77/ui)"
31
+ },
32
+ "packageVersion": {
33
+ "type": "string",
34
+ "description": "Version of the package containing these components"
35
+ },
36
+ "generatedAt": {
37
+ "type": "string",
38
+ "format": "date-time",
39
+ "description": "ISO 8601 timestamp when catalog was generated"
40
+ },
41
+ "components": {
42
+ "type": "array",
43
+ "description": "Array of UI component metadata",
44
+ "items": {
45
+ "$ref": "#/definitions/UiComponent"
46
+ }
47
+ }
48
+ },
49
+ "definitions": {
50
+ "UiComponent": {
51
+ "type": "object",
52
+ "description": "Metadata for a single UI component",
53
+ "required": ["id", "kind", "name", "packageName", "category", "description", "tags"],
54
+ "additionalProperties": false,
55
+ "properties": {
56
+ "id": {
57
+ "type": "string",
58
+ "pattern": "^@[a-z0-9-]+/[a-z0-9-]+#[A-Z][a-zA-Z0-9]*$",
59
+ "description": "Unique identifier: packageName#ComponentName (e.g., @launch77/ui#Button)"
60
+ },
61
+ "kind": {
62
+ "type": "string",
63
+ "const": "ui_component",
64
+ "description": "Component kind - always 'ui_component' for UI components"
65
+ },
66
+ "name": {
67
+ "type": "string",
68
+ "pattern": "^[A-Z][a-zA-Z0-9]*$",
69
+ "description": "Component name in PascalCase (e.g., Button, AlertDialog)"
70
+ },
71
+ "packageName": {
72
+ "type": "string",
73
+ "pattern": "^@[a-z0-9-]+/[a-z0-9-]+$",
74
+ "description": "NPM package containing this component"
75
+ },
76
+ "category": {
77
+ "type": "string",
78
+ "enum": [
79
+ "actions",
80
+ "forms",
81
+ "feedback",
82
+ "layout",
83
+ "marketing",
84
+ "typography",
85
+ "infrastructure",
86
+ "compliance"
87
+ ],
88
+ "description": "Component category for organization and discovery"
89
+ },
90
+ "description": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "description": "Human-readable description of the component"
94
+ },
95
+ "tags": {
96
+ "type": "array",
97
+ "description": "Search tags for component discovery",
98
+ "items": {
99
+ "type": "string",
100
+ "minLength": 1
101
+ },
102
+ "minItems": 1
103
+ },
104
+ "props": {
105
+ "type": "array",
106
+ "description": "Component props (optional - extracted from TypeScript)",
107
+ "items": {
108
+ "type": "string"
109
+ }
110
+ },
111
+ "sourcePath": {
112
+ "type": "string",
113
+ "description": "Relative path to component source file from repository root (optional)"
114
+ },
115
+ "library": {
116
+ "type": "string",
117
+ "description": "Parent library package name (optional - typically same as packageName)"
118
+ },
119
+ "guidance": {
120
+ "type": "object",
121
+ "description": "Usage guidance for the component (optional)",
122
+ "additionalProperties": false,
123
+ "properties": {
124
+ "whenToUse": {
125
+ "type": "string",
126
+ "description": "When to use this component"
127
+ },
128
+ "whenNotToUse": {
129
+ "type": "string",
130
+ "description": "When NOT to use this component (anti-patterns)"
131
+ }
132
+ }
133
+ },
134
+ "example": {
135
+ "type": "string",
136
+ "description": "Code example showing component usage (optional)"
137
+ },
138
+ "examples": {
139
+ "type": "object",
140
+ "description": "Reference to examples module (optional)",
141
+ "required": ["module", "export", "sourcePath"],
142
+ "additionalProperties": false,
143
+ "properties": {
144
+ "module": {
145
+ "type": "string",
146
+ "description": "Module path to import examples (e.g., @launch77/ui/examples)"
147
+ },
148
+ "export": {
149
+ "type": "string",
150
+ "description": "Export name for examples (e.g., ButtonExamples)"
151
+ },
152
+ "sourcePath": {
153
+ "type": "string",
154
+ "description": "Relative path to examples source file from repository root"
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }