@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.
- package/.eslintrc.json +6 -0
- package/dist/app-templates/webapp/.env.ci +6 -0
- package/dist/app-templates/webapp/.env.example +9 -0
- package/dist/app-templates/webapp/.eslintrc.json +6 -0
- package/dist/app-templates/webapp/README.md.hbs +80 -0
- package/dist/app-templates/webapp/app/about/page.tsx.hbs +41 -0
- package/dist/app-templates/webapp/app/dashboard/page.tsx.hbs +51 -0
- package/dist/app-templates/webapp/app/globals.css +31 -0
- package/dist/app-templates/webapp/app/layout.tsx.hbs +26 -0
- package/dist/app-templates/webapp/app/page.tsx.hbs +30 -0
- package/dist/app-templates/webapp/next.config.js +99 -0
- package/dist/app-templates/webapp/package.json.hbs +30 -0
- package/dist/app-templates/webapp/postcss.config.js +6 -0
- package/dist/app-templates/webapp/tailwind.config.ts +24 -0
- package/dist/app-templates/webapp/tsconfig.json +29 -0
- package/dist/app-templates/webapp/vercel.json.hbs +7 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +29 -0
- package/dist/cli.js.map +1 -0
- package/dist/infrastructure/filesystem.d.ts +41 -0
- package/dist/infrastructure/filesystem.d.ts.map +1 -0
- package/dist/infrastructure/filesystem.js +61 -0
- package/dist/infrastructure/filesystem.js.map +1 -0
- package/dist/infrastructure/npm.d.ts +9 -0
- package/dist/infrastructure/npm.d.ts.map +1 -0
- package/dist/infrastructure/npm.js +17 -0
- package/dist/infrastructure/npm.js.map +1 -0
- package/dist/infrastructure/template-engine.d.ts +12 -0
- package/dist/infrastructure/template-engine.d.ts.map +1 -0
- package/dist/infrastructure/template-engine.js +40 -0
- package/dist/infrastructure/template-engine.js.map +1 -0
- package/dist/infrastructure/template-generator.d.ts +9 -0
- package/dist/infrastructure/template-generator.d.ts.map +1 -0
- package/dist/infrastructure/template-generator.js +19 -0
- package/dist/infrastructure/template-generator.js.map +1 -0
- package/dist/infrastructure/template.d.ts +20 -0
- package/dist/infrastructure/template.d.ts.map +1 -0
- package/dist/infrastructure/template.js +53 -0
- package/dist/infrastructure/template.js.map +1 -0
- package/dist/modules/app/commands/create-app.d.ts +3 -0
- package/dist/modules/app/commands/create-app.d.ts.map +1 -0
- package/dist/modules/app/commands/create-app.js +51 -0
- package/dist/modules/app/commands/create-app.js.map +1 -0
- package/dist/modules/app/commands/delete-app.d.ts +3 -0
- package/dist/modules/app/commands/delete-app.d.ts.map +1 -0
- package/dist/modules/app/commands/delete-app.js +109 -0
- package/dist/modules/app/commands/delete-app.js.map +1 -0
- package/dist/modules/app/commands/generate-manifest.d.ts +3 -0
- package/dist/modules/app/commands/generate-manifest.d.ts.map +1 -0
- package/dist/modules/app/commands/generate-manifest.js +62 -0
- package/dist/modules/app/commands/generate-manifest.js.map +1 -0
- package/dist/modules/app/commands/validate-manifest.d.ts +3 -0
- package/dist/modules/app/commands/validate-manifest.d.ts.map +1 -0
- package/dist/modules/app/commands/validate-manifest.js +68 -0
- package/dist/modules/app/commands/validate-manifest.js.map +1 -0
- package/dist/modules/app/errors/app-errors.d.ts +19 -0
- package/dist/modules/app/errors/app-errors.d.ts.map +1 -0
- package/dist/modules/app/errors/app-errors.js +37 -0
- package/dist/modules/app/errors/app-errors.js.map +1 -0
- package/dist/modules/app/index.d.ts +10 -0
- package/dist/modules/app/index.d.ts.map +1 -0
- package/dist/modules/app/index.js +11 -0
- package/dist/modules/app/index.js.map +1 -0
- package/dist/modules/app/lib/manifest-schema.d.ts +39 -0
- package/dist/modules/app/lib/manifest-schema.d.ts.map +1 -0
- package/dist/modules/app/lib/manifest-schema.js +44 -0
- package/dist/modules/app/lib/manifest-schema.js.map +1 -0
- package/dist/modules/app/services/app-svc.d.ts +15 -0
- package/dist/modules/app/services/app-svc.d.ts.map +1 -0
- package/dist/modules/app/services/app-svc.js +90 -0
- package/dist/modules/app/services/app-svc.js.map +1 -0
- package/dist/modules/app/services/manifest-svc.d.ts +28 -0
- package/dist/modules/app/services/manifest-svc.d.ts.map +1 -0
- package/dist/modules/app/services/manifest-svc.js +119 -0
- package/dist/modules/app/services/manifest-svc.js.map +1 -0
- package/dist/modules/app/types/app-types.d.ts +21 -0
- package/dist/modules/app/types/app-types.d.ts.map +1 -0
- package/dist/modules/app/types/app-types.js +5 -0
- package/dist/modules/app/types/app-types.js.map +1 -0
- package/dist/modules/catalog/commands/generate.d.ts +9 -0
- package/dist/modules/catalog/commands/generate.d.ts.map +1 -0
- package/dist/modules/catalog/commands/generate.js +94 -0
- package/dist/modules/catalog/commands/generate.js.map +1 -0
- package/dist/modules/catalog/commands/scan.d.ts +9 -0
- package/dist/modules/catalog/commands/scan.d.ts.map +1 -0
- package/dist/modules/catalog/commands/scan.js +43 -0
- package/dist/modules/catalog/commands/scan.js.map +1 -0
- package/dist/modules/catalog/config/catalog-config.d.ts +49 -0
- package/dist/modules/catalog/config/catalog-config.d.ts.map +1 -0
- package/dist/modules/catalog/config/catalog-config.js +116 -0
- package/dist/modules/catalog/config/catalog-config.js.map +1 -0
- package/dist/modules/catalog/config/catalog-config.test.d.ts +2 -0
- package/dist/modules/catalog/config/catalog-config.test.d.ts.map +1 -0
- package/dist/modules/catalog/config/catalog-config.test.js +362 -0
- package/dist/modules/catalog/config/catalog-config.test.js.map +1 -0
- package/dist/modules/catalog/index.d.ts +9 -0
- package/dist/modules/catalog/index.d.ts.map +1 -0
- package/dist/modules/catalog/index.js +9 -0
- package/dist/modules/catalog/index.js.map +1 -0
- package/dist/modules/catalog/parsers/typescript-parser.d.ts +15 -0
- package/dist/modules/catalog/parsers/typescript-parser.d.ts.map +1 -0
- package/dist/modules/catalog/parsers/typescript-parser.js +82 -0
- package/dist/modules/catalog/parsers/typescript-parser.js.map +1 -0
- package/dist/modules/catalog/scanners/metadata-extractor.d.ts +10 -0
- package/dist/modules/catalog/scanners/metadata-extractor.d.ts.map +1 -0
- package/dist/modules/catalog/scanners/metadata-extractor.js +122 -0
- package/dist/modules/catalog/scanners/metadata-extractor.js.map +1 -0
- package/dist/modules/catalog/scanners/metadata-validator.d.ts +6 -0
- package/dist/modules/catalog/scanners/metadata-validator.d.ts.map +1 -0
- package/dist/modules/catalog/scanners/metadata-validator.js +57 -0
- package/dist/modules/catalog/scanners/metadata-validator.js.map +1 -0
- package/dist/modules/catalog/scanners/ui-component-scanner.d.ts +11 -0
- package/dist/modules/catalog/scanners/ui-component-scanner.d.ts.map +1 -0
- package/dist/modules/catalog/scanners/ui-component-scanner.js +147 -0
- package/dist/modules/catalog/scanners/ui-component-scanner.js.map +1 -0
- package/dist/modules/catalog/schemas/catalog-ui-components.schema.json +161 -0
- package/dist/modules/catalog/schemas/schemas/catalog-ui-components.schema.json +145 -0
- package/dist/modules/catalog/services/catalog-generator-svc.d.ts +27 -0
- package/dist/modules/catalog/services/catalog-generator-svc.d.ts.map +1 -0
- package/dist/modules/catalog/services/catalog-generator-svc.js +100 -0
- package/dist/modules/catalog/services/catalog-generator-svc.js.map +1 -0
- package/dist/modules/catalog/services/catalog-generator-svc.test.d.ts +2 -0
- package/dist/modules/catalog/services/catalog-generator-svc.test.d.ts.map +1 -0
- package/dist/modules/catalog/services/catalog-generator-svc.test.js +201 -0
- package/dist/modules/catalog/services/catalog-generator-svc.test.js.map +1 -0
- package/dist/modules/catalog/services/catalog-svc.d.ts +39 -0
- package/dist/modules/catalog/services/catalog-svc.d.ts.map +1 -0
- package/dist/modules/catalog/services/catalog-svc.js +163 -0
- package/dist/modules/catalog/services/catalog-svc.js.map +1 -0
- package/dist/modules/catalog/types/catalog-types.d.ts +120 -0
- package/dist/modules/catalog/types/catalog-types.d.ts.map +1 -0
- package/dist/modules/catalog/types/catalog-types.js +5 -0
- package/dist/modules/catalog/types/catalog-types.js.map +1 -0
- package/dist/modules/catalog/utils/examples-generator.d.ts +6 -0
- package/dist/modules/catalog/utils/examples-generator.d.ts.map +1 -0
- package/dist/modules/catalog/utils/examples-generator.js +55 -0
- package/dist/modules/catalog/utils/examples-generator.js.map +1 -0
- package/dist/modules/catalog/utils/quality-reporter.d.ts +13 -0
- package/dist/modules/catalog/utils/quality-reporter.d.ts.map +1 -0
- package/dist/modules/catalog/utils/quality-reporter.js +64 -0
- package/dist/modules/catalog/utils/quality-reporter.js.map +1 -0
- package/dist/modules/catalog/validators/component-name-validator.d.ts +20 -0
- package/dist/modules/catalog/validators/component-name-validator.d.ts.map +1 -0
- package/dist/modules/catalog/validators/component-name-validator.js +33 -0
- package/dist/modules/catalog/validators/component-name-validator.js.map +1 -0
- package/dist/modules/catalog/validators/component-name-validator.test.d.ts +2 -0
- package/dist/modules/catalog/validators/component-name-validator.test.d.ts.map +1 -0
- package/dist/modules/catalog/validators/component-name-validator.test.js +196 -0
- package/dist/modules/catalog/validators/component-name-validator.test.js.map +1 -0
- package/dist/modules/deploy/commands/deploy-init-action.d.ts +12 -0
- package/dist/modules/deploy/commands/deploy-init-action.d.ts.map +1 -0
- package/dist/modules/deploy/commands/deploy-init-action.js +220 -0
- package/dist/modules/deploy/commands/deploy-init-action.js.map +1 -0
- package/dist/modules/deploy/commands/deploy-init.d.ts +6 -0
- package/dist/modules/deploy/commands/deploy-init.d.ts.map +1 -0
- package/dist/modules/deploy/commands/deploy-init.js +16 -0
- package/dist/modules/deploy/commands/deploy-init.js.map +1 -0
- package/dist/modules/deploy/commands/deploy-logs-action.d.ts +12 -0
- package/dist/modules/deploy/commands/deploy-logs-action.d.ts.map +1 -0
- package/dist/modules/deploy/commands/deploy-logs-action.js +113 -0
- package/dist/modules/deploy/commands/deploy-logs-action.js.map +1 -0
- package/dist/modules/deploy/commands/deploy-logs.d.ts +6 -0
- package/dist/modules/deploy/commands/deploy-logs.d.ts.map +1 -0
- package/dist/modules/deploy/commands/deploy-logs.js +17 -0
- package/dist/modules/deploy/commands/deploy-logs.js.map +1 -0
- package/dist/modules/deploy/commands/deploy-status-action.d.ts +8 -0
- package/dist/modules/deploy/commands/deploy-status-action.d.ts.map +1 -0
- package/dist/modules/deploy/commands/deploy-status-action.js +153 -0
- package/dist/modules/deploy/commands/deploy-status-action.js.map +1 -0
- package/dist/modules/deploy/commands/deploy-status.d.ts +6 -0
- package/dist/modules/deploy/commands/deploy-status.d.ts.map +1 -0
- package/dist/modules/deploy/commands/deploy-status.js +13 -0
- package/dist/modules/deploy/commands/deploy-status.js.map +1 -0
- package/dist/modules/deploy/index.d.ts +7 -0
- package/dist/modules/deploy/index.d.ts.map +1 -0
- package/dist/modules/deploy/index.js +7 -0
- package/dist/modules/deploy/index.js.map +1 -0
- package/dist/modules/deploy/services/deploy-svc.d.ts +17 -0
- package/dist/modules/deploy/services/deploy-svc.d.ts.map +1 -0
- package/dist/modules/deploy/services/deploy-svc.js +25 -0
- package/dist/modules/deploy/services/deploy-svc.js.map +1 -0
- package/dist/modules/deploy/utils/vercel-extended.d.ts +63 -0
- package/dist/modules/deploy/utils/vercel-extended.d.ts.map +1 -0
- package/dist/modules/deploy/utils/vercel-extended.js +238 -0
- package/dist/modules/deploy/utils/vercel-extended.js.map +1 -0
- package/dist/modules/plugin/commands/plugin-install.d.ts +3 -0
- package/dist/modules/plugin/commands/plugin-install.d.ts.map +1 -0
- package/dist/modules/plugin/commands/plugin-install.js +45 -0
- package/dist/modules/plugin/commands/plugin-install.js.map +1 -0
- package/dist/modules/plugin/errors/plugin-errors.d.ts +16 -0
- package/dist/modules/plugin/errors/plugin-errors.d.ts.map +1 -0
- package/dist/modules/plugin/errors/plugin-errors.js +39 -0
- package/dist/modules/plugin/errors/plugin-errors.js.map +1 -0
- package/dist/modules/plugin/index.d.ts +6 -0
- package/dist/modules/plugin/index.d.ts.map +1 -0
- package/dist/modules/plugin/index.js +9 -0
- package/dist/modules/plugin/index.js.map +1 -0
- package/dist/modules/plugin/lib/plugin-registry.d.ts +15 -0
- package/dist/modules/plugin/lib/plugin-registry.d.ts.map +1 -0
- package/dist/modules/plugin/lib/plugin-registry.js +47 -0
- package/dist/modules/plugin/lib/plugin-registry.js.map +1 -0
- package/dist/modules/plugin/services/plugin-svc.d.ts +10 -0
- package/dist/modules/plugin/services/plugin-svc.d.ts.map +1 -0
- package/dist/modules/plugin/services/plugin-svc.js +44 -0
- package/dist/modules/plugin/services/plugin-svc.js.map +1 -0
- package/dist/modules/plugin/types/plugin-types.d.ts +19 -0
- package/dist/modules/plugin/types/plugin-types.d.ts.map +1 -0
- package/dist/modules/plugin/types/plugin-types.js +2 -0
- package/dist/modules/plugin/types/plugin-types.js.map +1 -0
- package/dist/modules/startup/commands/create-startup.d.ts +3 -0
- package/dist/modules/startup/commands/create-startup.d.ts.map +1 -0
- package/dist/modules/startup/commands/create-startup.js +43 -0
- package/dist/modules/startup/commands/create-startup.js.map +1 -0
- package/dist/modules/startup/errors/startup-errors.d.ts +13 -0
- package/dist/modules/startup/errors/startup-errors.d.ts.map +1 -0
- package/dist/modules/startup/errors/startup-errors.js +25 -0
- package/dist/modules/startup/errors/startup-errors.js.map +1 -0
- package/dist/modules/startup/index.d.ts +5 -0
- package/dist/modules/startup/index.d.ts.map +1 -0
- package/dist/modules/startup/index.js +7 -0
- package/dist/modules/startup/index.js.map +1 -0
- package/dist/modules/startup/services/startup-service.d.ts +7 -0
- package/dist/modules/startup/services/startup-service.d.ts.map +1 -0
- package/dist/modules/startup/services/startup-service.js +43 -0
- package/dist/modules/startup/services/startup-service.js.map +1 -0
- package/dist/modules/startup/types/startup-types.d.ts +8 -0
- package/dist/modules/startup/types/startup-types.d.ts.map +1 -0
- package/dist/modules/startup/types/startup-types.js +2 -0
- package/dist/modules/startup/types/startup-types.js.map +1 -0
- package/dist/modules/startup/utils/startup-validators.d.ts +8 -0
- package/dist/modules/startup/utils/startup-validators.d.ts.map +1 -0
- package/dist/modules/startup/utils/startup-validators.js +17 -0
- package/dist/modules/startup/utils/startup-validators.js.map +1 -0
- package/dist/modules/workspace/commands/init-workspace.d.ts +3 -0
- package/dist/modules/workspace/commands/init-workspace.d.ts.map +1 -0
- package/dist/modules/workspace/commands/init-workspace.js +54 -0
- package/dist/modules/workspace/commands/init-workspace.js.map +1 -0
- package/dist/modules/workspace/errors/workspace-errors.d.ts +10 -0
- package/dist/modules/workspace/errors/workspace-errors.d.ts.map +1 -0
- package/dist/modules/workspace/errors/workspace-errors.js +19 -0
- package/dist/modules/workspace/errors/workspace-errors.js.map +1 -0
- package/dist/modules/workspace/index.d.ts +5 -0
- package/dist/modules/workspace/index.d.ts.map +1 -0
- package/dist/modules/workspace/index.js +7 -0
- package/dist/modules/workspace/index.js.map +1 -0
- package/dist/modules/workspace/services/workspace-service.d.ts +6 -0
- package/dist/modules/workspace/services/workspace-service.d.ts.map +1 -0
- package/dist/modules/workspace/services/workspace-service.js +46 -0
- package/dist/modules/workspace/services/workspace-service.js.map +1 -0
- package/dist/modules/workspace/types/workspace-types.d.ts +8 -0
- package/dist/modules/workspace/types/workspace-types.d.ts.map +1 -0
- package/dist/modules/workspace/types/workspace-types.js +2 -0
- package/dist/modules/workspace/types/workspace-types.js.map +1 -0
- package/dist/modules/workspace/utils/workspace-validators.d.ts +8 -0
- package/dist/modules/workspace/utils/workspace-validators.d.ts.map +1 -0
- package/dist/modules/workspace/utils/workspace-validators.js +17 -0
- package/dist/modules/workspace/utils/workspace-validators.js.map +1 -0
- package/dist/plugins/theme/package.json +32 -0
- package/dist/plugins/theme/plugin.json +9 -0
- package/dist/plugins/theme/src/generator.ts +92 -0
- package/dist/plugins/theme/src/utils/config-modifier.ts +142 -0
- package/dist/plugins/theme/src/utils/css-modifier.ts +89 -0
- package/dist/plugins/theme/templates/app/theme-test/page.tsx +156 -0
- package/dist/plugins/theme/templates/src/modules/theme/README.md +209 -0
- package/dist/plugins/theme/templates/src/modules/theme/config/brand.css +23 -0
- package/dist/plugins/theme/tsconfig.json +14 -0
- package/dist/plugins/theme/tsup.config.ts +10 -0
- package/dist/templates/startup/apps/.gitkeep +8 -0
- package/dist/templates/templates/startup/apps/.gitkeep +8 -0
- package/dist/templates/templates/workspace/.eslintignore +7 -0
- package/dist/templates/templates/workspace/.eslintrc.js +38 -0
- package/dist/templates/templates/workspace/.husky/pre-push +24 -0
- package/dist/templates/templates/workspace/.launch77/workspace.json +3 -0
- package/dist/templates/templates/workspace/.lintstagedrc.json +4 -0
- package/dist/templates/templates/workspace/.prettierrc +9 -0
- package/dist/templates/templates/workspace/README.md +62 -0
- package/dist/templates/templates/workspace/app-templates/.gitkeep +1 -0
- package/dist/templates/templates/workspace/apps/.gitkeep +1 -0
- package/dist/templates/templates/workspace/libraries/.gitkeep +1 -0
- package/dist/templates/templates/workspace/package.json +31 -0
- package/dist/templates/templates/workspace/plugins/.gitkeep +1 -0
- package/dist/templates/templates/workspace/tsconfig.json +22 -0
- package/dist/templates/templates/workspace/turbo.json +25 -0
- package/dist/templates/workspace/.launch77/workspace.json +3 -0
- package/dist/templates/workspace/README.md +62 -0
- package/dist/templates/workspace/app-templates/.gitkeep +1 -0
- package/dist/templates/workspace/apps/.gitkeep +1 -0
- package/dist/templates/workspace/libraries/.gitkeep +1 -0
- package/dist/templates/workspace/package.json +21 -0
- package/dist/templates/workspace/plugins/.gitkeep +1 -0
- package/dist/templates/workspace/tsconfig.json +22 -0
- package/dist/templates/workspace/turbo.json +25 -0
- package/dist/utils/launch77-context.d.ts +16 -0
- package/dist/utils/launch77-context.d.ts.map +1 -0
- package/dist/utils/launch77-context.js +111 -0
- package/dist/utils/launch77-context.js.map +1 -0
- package/dist/utils/launch77-validation.d.ts +17 -0
- package/dist/utils/launch77-validation.d.ts.map +1 -0
- package/dist/utils/launch77-validation.js +44 -0
- package/dist/utils/launch77-validation.js.map +1 -0
- package/dist/utils/monorepo.d.ts +19 -0
- package/dist/utils/monorepo.d.ts.map +1 -0
- package/dist/utils/monorepo.js +100 -0
- package/dist/utils/monorepo.js.map +1 -0
- package/dist/utils/validation.d.ts +32 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +92 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/utils/version.d.ts +7 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +16 -0
- package/dist/utils/version.js.map +1 -0
- package/launch77-cli-1.2.0.tgz +0 -0
- package/package.json +48 -0
- package/src/cli.ts +34 -0
- package/src/infrastructure/filesystem.ts +69 -0
- package/src/infrastructure/npm.ts +18 -0
- package/src/infrastructure/template-engine.ts +48 -0
- package/src/infrastructure/template-generator.ts +26 -0
- package/src/infrastructure/template.ts +66 -0
- package/src/modules/app/commands/create-app.ts +60 -0
- package/src/modules/app/commands/delete-app.ts +123 -0
- package/src/modules/app/commands/generate-manifest.ts +75 -0
- package/src/modules/app/commands/validate-manifest.ts +78 -0
- package/src/modules/app/errors/app-errors.ts +41 -0
- package/src/modules/app/index.ts +16 -0
- package/src/modules/app/lib/manifest-schema.ts +65 -0
- package/src/modules/app/services/app-svc.ts +115 -0
- package/src/modules/app/services/manifest-svc.ts +144 -0
- package/src/modules/app/types/app-types.ts +27 -0
- package/src/modules/catalog/commands/generate.ts +115 -0
- package/src/modules/catalog/commands/scan.ts +48 -0
- package/src/modules/catalog/config/catalog-config.test.ts +404 -0
- package/src/modules/catalog/config/catalog-config.ts +130 -0
- package/src/modules/catalog/index.ts +9 -0
- package/src/modules/catalog/parsers/typescript-parser.ts +93 -0
- package/src/modules/catalog/scanners/metadata-extractor.ts +134 -0
- package/src/modules/catalog/scanners/metadata-validator.ts +67 -0
- package/src/modules/catalog/scanners/ui-component-scanner.ts +185 -0
- package/src/modules/catalog/schemas/catalog-ui-components.schema.json +145 -0
- package/src/modules/catalog/services/catalog-generator-svc.test.ts +233 -0
- package/src/modules/catalog/services/catalog-generator-svc.ts +124 -0
- package/src/modules/catalog/services/catalog-svc.ts +222 -0
- package/src/modules/catalog/types/catalog-types.ts +149 -0
- package/src/modules/catalog/utils/examples-generator.ts +68 -0
- package/src/modules/catalog/utils/quality-reporter.ts +76 -0
- package/src/modules/catalog/validators/component-name-validator.test.ts +233 -0
- package/src/modules/catalog/validators/component-name-validator.ts +43 -0
- package/src/modules/deploy/commands/deploy-init-action.ts +247 -0
- package/src/modules/deploy/commands/deploy-init.ts +19 -0
- package/src/modules/deploy/commands/deploy-logs-action.ts +135 -0
- package/src/modules/deploy/commands/deploy-logs.ts +20 -0
- package/src/modules/deploy/commands/deploy-status-action.ts +175 -0
- package/src/modules/deploy/commands/deploy-status.ts +16 -0
- package/src/modules/deploy/index.ts +7 -0
- package/src/modules/deploy/services/deploy-svc.ts +31 -0
- package/src/modules/deploy/utils/vercel-extended.ts +286 -0
- package/src/modules/plugin/commands/plugin-install.ts +51 -0
- package/src/modules/plugin/errors/plugin-errors.ts +44 -0
- package/src/modules/plugin/index.ts +14 -0
- package/src/modules/plugin/lib/launch77-workspace.code-workspace +14 -0
- package/src/modules/plugin/lib/plugin-registry.ts +59 -0
- package/src/modules/plugin/services/plugin-svc.ts +53 -0
- package/src/modules/plugin/types/plugin-types.ts +21 -0
- package/src/modules/startup/commands/create-startup.ts +53 -0
- package/src/modules/startup/errors/startup-errors.ts +23 -0
- package/src/modules/startup/index.ts +11 -0
- package/src/modules/startup/services/startup-service.ts +57 -0
- package/src/modules/startup/types/startup-types.ts +8 -0
- package/src/modules/startup/utils/startup-validators.ts +19 -0
- package/src/modules/workspace/commands/init-workspace.ts +63 -0
- package/src/modules/workspace/errors/workspace-errors.ts +16 -0
- package/src/modules/workspace/index.ts +11 -0
- package/src/modules/workspace/services/workspace-service.ts +59 -0
- package/src/modules/workspace/types/workspace-types.ts +8 -0
- package/src/modules/workspace/utils/workspace-validators.ts +19 -0
- package/src/utils/launch77-context.ts +152 -0
- package/src/utils/launch77-validation.ts +59 -0
- package/src/utils/monorepo.ts +137 -0
- package/src/utils/validation.ts +117 -0
- package/src/utils/version.ts +16 -0
- package/templates/startup/apps/.gitkeep +8 -0
- package/templates/workspace/.eslintignore +7 -0
- package/templates/workspace/.eslintrc.js +38 -0
- package/templates/workspace/.husky/pre-push +24 -0
- package/templates/workspace/.launch77/workspace.json +3 -0
- package/templates/workspace/.lintstagedrc.json +4 -0
- package/templates/workspace/.prettierrc +9 -0
- package/templates/workspace/README.md +62 -0
- package/templates/workspace/app-templates/.gitkeep +1 -0
- package/templates/workspace/apps/.gitkeep +1 -0
- package/templates/workspace/libraries/.gitkeep +1 -0
- package/templates/workspace/package.json +31 -0
- package/templates/workspace/plugins/.gitkeep +1 -0
- package/templates/workspace/tsconfig.json +22 -0
- package/templates/workspace/turbo.json +25 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract Launch77 metadata from JSDoc comments in source files
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import fs from 'fs-extra'
|
|
6
|
+
|
|
7
|
+
import type { ComponentMetadata } from '../types/catalog-types.js'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Extract metadata from a component source file
|
|
11
|
+
* Looks for @launch77-component JSDoc tag and extracts metadata fields
|
|
12
|
+
*/
|
|
13
|
+
export async function extractComponentMetadata(filePath: string): Promise<ComponentMetadata> {
|
|
14
|
+
try {
|
|
15
|
+
const content = await fs.readFile(filePath, 'utf-8')
|
|
16
|
+
|
|
17
|
+
// Check for @launch77-ignore tag first
|
|
18
|
+
const ignoreRegex = /\/\*\*[\s\S]*?@launch77-ignore[\s\S]*?\*\//
|
|
19
|
+
const ignoreMatch = content.match(ignoreRegex)
|
|
20
|
+
|
|
21
|
+
if (ignoreMatch) {
|
|
22
|
+
const reason = extractField(ignoreMatch[0], 'reason')
|
|
23
|
+
return {
|
|
24
|
+
description: '',
|
|
25
|
+
category: '',
|
|
26
|
+
whenToUse: '',
|
|
27
|
+
whenNotToUse: '',
|
|
28
|
+
tags: [],
|
|
29
|
+
example: '',
|
|
30
|
+
ignored: true,
|
|
31
|
+
ignoreReason: reason || 'Excluded from catalog',
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Look for JSDoc comment with @launch77-component marker
|
|
36
|
+
const jsdocRegex = /\/\*\*[\s\S]*?@launch77-component[\s\S]*?\*\//
|
|
37
|
+
|
|
38
|
+
const match = content.match(jsdocRegex)
|
|
39
|
+
if (!match) {
|
|
40
|
+
// No Launch77 metadata found - return empty
|
|
41
|
+
return {
|
|
42
|
+
description: '',
|
|
43
|
+
category: '',
|
|
44
|
+
whenToUse: '',
|
|
45
|
+
whenNotToUse: '',
|
|
46
|
+
tags: [],
|
|
47
|
+
example: '',
|
|
48
|
+
ignored: false,
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const jsdoc = match[0]
|
|
53
|
+
|
|
54
|
+
// Extract individual fields
|
|
55
|
+
const description = extractField(jsdoc, 'description')
|
|
56
|
+
const category = extractField(jsdoc, 'category')
|
|
57
|
+
const whenToUse = extractField(jsdoc, 'whenToUse')
|
|
58
|
+
const whenNotToUse = extractField(jsdoc, 'whenNotToUse')
|
|
59
|
+
const tags = extractTags(jsdoc)
|
|
60
|
+
const example = extractExample(jsdoc)
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
description,
|
|
64
|
+
category,
|
|
65
|
+
whenToUse,
|
|
66
|
+
whenNotToUse,
|
|
67
|
+
tags,
|
|
68
|
+
example,
|
|
69
|
+
ignored: false,
|
|
70
|
+
}
|
|
71
|
+
} catch (error) {
|
|
72
|
+
// If we can't read the file or parse fails, return empty metadata
|
|
73
|
+
// This ensures the scan doesn't fail if metadata is missing
|
|
74
|
+
return {
|
|
75
|
+
description: '',
|
|
76
|
+
category: '',
|
|
77
|
+
whenToUse: '',
|
|
78
|
+
whenNotToUse: '',
|
|
79
|
+
tags: [],
|
|
80
|
+
example: '',
|
|
81
|
+
ignored: false,
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Extract a single-line field from JSDoc
|
|
88
|
+
* Format: @fieldName value here until end of line
|
|
89
|
+
*/
|
|
90
|
+
function extractField(jsdoc: string, fieldName: string): string {
|
|
91
|
+
const regex = new RegExp(`@${fieldName}\\s+(.+?)(?=\\n|\\*\\/|@)`, 's')
|
|
92
|
+
const match = jsdoc.match(regex)
|
|
93
|
+
if (!match) return ''
|
|
94
|
+
|
|
95
|
+
// Clean up the value: remove extra whitespace, asterisks from line breaks
|
|
96
|
+
return match[1]
|
|
97
|
+
.split('\n')
|
|
98
|
+
.map((line) => line.replace(/^\s*\*\s?/, '').trim())
|
|
99
|
+
.filter((line) => line.length > 0)
|
|
100
|
+
.join(' ')
|
|
101
|
+
.trim()
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Extract tags (comma or space separated)
|
|
106
|
+
* Format: @tags tag1, tag2, tag3
|
|
107
|
+
*/
|
|
108
|
+
function extractTags(jsdoc: string): string[] {
|
|
109
|
+
const tagsString = extractField(jsdoc, 'tags')
|
|
110
|
+
if (!tagsString) return []
|
|
111
|
+
|
|
112
|
+
// Split by comma or whitespace, clean up
|
|
113
|
+
return tagsString
|
|
114
|
+
.split(/[,\s]+/)
|
|
115
|
+
.map((tag) => tag.trim())
|
|
116
|
+
.filter((tag) => tag.length > 0)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Extract example code block
|
|
121
|
+
* Format: @example followed by code until next @ tag or end of comment
|
|
122
|
+
*/
|
|
123
|
+
function extractExample(jsdoc: string): string {
|
|
124
|
+
const regex = /@example\s+([\s\S]+?)(?=@|\*\/)/
|
|
125
|
+
const match = jsdoc.match(regex)
|
|
126
|
+
if (!match) return ''
|
|
127
|
+
|
|
128
|
+
// Clean up the example: remove leading asterisks and extra whitespace
|
|
129
|
+
return match[1]
|
|
130
|
+
.split('\n')
|
|
131
|
+
.map((line) => line.replace(/^\s*\*\s?/, ''))
|
|
132
|
+
.join('\n')
|
|
133
|
+
.trim()
|
|
134
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validate Launch77 component metadata for quality and completeness
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { ComponentMetadata, ValidationResult } from '../types/catalog-types.js'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Validate component metadata against Launch77 quality standards
|
|
9
|
+
*/
|
|
10
|
+
// Valid category values for UI components
|
|
11
|
+
const VALID_CATEGORIES: readonly string[] = ['actions', 'forms', 'feedback', 'layout', 'marketing', 'typography', 'infrastructure', 'compliance']
|
|
12
|
+
|
|
13
|
+
export function validateMetadata(metadata: ComponentMetadata, componentName: string, filePath: string): ValidationResult {
|
|
14
|
+
const errors: string[] = []
|
|
15
|
+
const warnings: string[] = []
|
|
16
|
+
|
|
17
|
+
// REQUIRED: @launch77-component tag (indicated by non-empty description)
|
|
18
|
+
if (!metadata.description) {
|
|
19
|
+
errors.push('Missing @launch77-component tag')
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// REQUIRED: @category tag
|
|
23
|
+
if (!metadata.category) {
|
|
24
|
+
errors.push('Missing @category tag (required)')
|
|
25
|
+
} else if (!VALID_CATEGORIES.includes(metadata.category)) {
|
|
26
|
+
errors.push(`Invalid category "${metadata.category}". Must be one of: ${VALID_CATEGORIES.join(', ')}`)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Check description quality
|
|
30
|
+
if (metadata.description && metadata.description.length < 20) {
|
|
31
|
+
warnings.push('Description is too short (< 20 characters)')
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Check for generic descriptions
|
|
35
|
+
if (metadata.description && /^[A-Z][a-z]+ component$/.test(metadata.description)) {
|
|
36
|
+
warnings.push(`Generic description detected: "${metadata.description}"`)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// RECOMMENDED: Guidance fields
|
|
40
|
+
if (!metadata.whenToUse) {
|
|
41
|
+
warnings.push('Missing @whenToUse guidance')
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (!metadata.whenNotToUse) {
|
|
45
|
+
warnings.push('Missing @whenNotToUse guidance')
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// RECOMMENDED: Tags
|
|
49
|
+
if (metadata.tags.length === 0) {
|
|
50
|
+
warnings.push('Missing @tags')
|
|
51
|
+
} else if (metadata.tags.length < 3) {
|
|
52
|
+
warnings.push('Too few tags (< 3 recommended)')
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// RECOMMENDED: Example code
|
|
56
|
+
if (!metadata.example) {
|
|
57
|
+
warnings.push('Missing @example code')
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
valid: errors.length === 0,
|
|
62
|
+
errors,
|
|
63
|
+
warnings,
|
|
64
|
+
componentName,
|
|
65
|
+
filePath,
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import * as path from 'path'
|
|
2
|
+
|
|
3
|
+
import fs from 'fs-extra'
|
|
4
|
+
|
|
5
|
+
import { extractComponentMetadata } from './metadata-extractor.js'
|
|
6
|
+
import { validateMetadata } from './metadata-validator.js'
|
|
7
|
+
import { extractProps, isReactComponent } from '../parsers/typescript-parser.js'
|
|
8
|
+
import { validateComponentName } from '../validators/component-name-validator.js'
|
|
9
|
+
|
|
10
|
+
import type { UiComponent, ValidationResult } from '../types/catalog-types.js'
|
|
11
|
+
|
|
12
|
+
export interface ScanResult {
|
|
13
|
+
components: UiComponent[]
|
|
14
|
+
validations: ValidationResult[]
|
|
15
|
+
excluded: number
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Scan a UI library package for components
|
|
20
|
+
*/
|
|
21
|
+
export async function scanUILibrary(libraryPath: string, packageName: string): Promise<ScanResult> {
|
|
22
|
+
const components: UiComponent[] = []
|
|
23
|
+
const validations: ValidationResult[] = []
|
|
24
|
+
let excluded = 0
|
|
25
|
+
|
|
26
|
+
// Read the main index file to find exports
|
|
27
|
+
const indexPath = path.join(libraryPath, 'src/index.ts')
|
|
28
|
+
if (!(await fs.pathExists(indexPath))) {
|
|
29
|
+
return { components, validations, excluded }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const indexContent = await fs.readFile(indexPath, 'utf-8')
|
|
33
|
+
|
|
34
|
+
// Parse exports: export * from './components/Button'
|
|
35
|
+
const exportRegex = /export\s+\*\s+from\s+['"](\.\/[^'"]+)['"]/g
|
|
36
|
+
const exports: string[] = []
|
|
37
|
+
|
|
38
|
+
let match
|
|
39
|
+
while ((match = exportRegex.exec(indexContent)) !== null) {
|
|
40
|
+
exports.push(match[1])
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Also parse: export { Button } from './components/Button'
|
|
44
|
+
const namedExportRegex = /export\s+\{([^}]+)\}\s+from\s+['"](\.\/[^'"]+)['"]/g
|
|
45
|
+
while ((match = namedExportRegex.exec(indexContent)) !== null) {
|
|
46
|
+
exports.push(match[2])
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Scan each export path
|
|
50
|
+
for (const exportPath of exports) {
|
|
51
|
+
const fullPath = path.join(libraryPath, 'src', exportPath.replace('./', ''))
|
|
52
|
+
|
|
53
|
+
// Check if it's a directory with index.ts or a .tsx file
|
|
54
|
+
let componentFile: string | undefined
|
|
55
|
+
|
|
56
|
+
if (await fs.pathExists(fullPath + '.tsx')) {
|
|
57
|
+
componentFile = fullPath + '.tsx'
|
|
58
|
+
} else if (await fs.pathExists(fullPath + '.ts')) {
|
|
59
|
+
componentFile = fullPath + '.ts'
|
|
60
|
+
} else if (await fs.pathExists(path.join(fullPath, 'index.ts'))) {
|
|
61
|
+
// It's a directory, find the main component file
|
|
62
|
+
const files = await fs.readdir(fullPath)
|
|
63
|
+
const mainFile = files.find((f) => f.endsWith('.tsx') && !f.includes('.test.') && !f.includes('.stories.') && !f.includes('.examples.'))
|
|
64
|
+
if (mainFile) {
|
|
65
|
+
componentFile = path.join(fullPath, mainFile)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (componentFile && (await isReactComponent(componentFile))) {
|
|
70
|
+
const result = await scanComponent(componentFile, packageName, libraryPath)
|
|
71
|
+
if (result) {
|
|
72
|
+
if (result.excluded) {
|
|
73
|
+
excluded++
|
|
74
|
+
} else {
|
|
75
|
+
components.push(result.component)
|
|
76
|
+
validations.push(result.validation)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return { components, validations, excluded }
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface ComponentScanResult {
|
|
86
|
+
component: UiComponent
|
|
87
|
+
validation: ValidationResult
|
|
88
|
+
excluded: boolean
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
async function scanComponent(filePath: string, packageName: string, libraryRoot: string): Promise<ComponentScanResult | null> {
|
|
92
|
+
try {
|
|
93
|
+
// Extract component name from filename
|
|
94
|
+
const fileName = path.basename(filePath, path.extname(filePath))
|
|
95
|
+
const componentName = fileName
|
|
96
|
+
|
|
97
|
+
// Validate component name
|
|
98
|
+
const nameValidation = validateComponentName(componentName)
|
|
99
|
+
if (!nameValidation.valid) {
|
|
100
|
+
console.warn(`Skipping ${filePath}: Invalid component name - ${nameValidation.errors.join(', ')}`)
|
|
101
|
+
return null
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Calculate source path relative to repo root for validation
|
|
105
|
+
const sourcePath = path.relative(path.join(libraryRoot, '../../..'), filePath)
|
|
106
|
+
|
|
107
|
+
// Extract metadata from JSDoc (Launch77-specific)
|
|
108
|
+
const metadata = await extractComponentMetadata(filePath)
|
|
109
|
+
|
|
110
|
+
// Check if component is excluded via @launch77-ignore
|
|
111
|
+
if (metadata.ignored) {
|
|
112
|
+
// Return excluded marker - no validation needed for ignored components
|
|
113
|
+
return {
|
|
114
|
+
component: {} as UiComponent, // Won't be used, but satisfies type
|
|
115
|
+
validation: { valid: true, errors: [], warnings: [], componentName: '', filePath: '' },
|
|
116
|
+
excluded: true,
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Validate metadata (all non-ignored components must have @launch77-component and @category)
|
|
121
|
+
const validation = validateMetadata(metadata, componentName, sourcePath)
|
|
122
|
+
|
|
123
|
+
// Use category from metadata - validation ensures it exists and is valid
|
|
124
|
+
const category = metadata.category
|
|
125
|
+
|
|
126
|
+
// Extract props
|
|
127
|
+
const props = await extractProps(filePath)
|
|
128
|
+
|
|
129
|
+
// Use metadata description - validation ensures it exists
|
|
130
|
+
const description: string = metadata.description
|
|
131
|
+
|
|
132
|
+
// Generate ID
|
|
133
|
+
const id = `${packageName}#${componentName}`
|
|
134
|
+
|
|
135
|
+
// Use explicit tags from metadata only (no auto-generation)
|
|
136
|
+
const tags = metadata.tags
|
|
137
|
+
|
|
138
|
+
// Build guidance object if we have both fields
|
|
139
|
+
const guidance =
|
|
140
|
+
metadata.whenToUse && metadata.whenNotToUse
|
|
141
|
+
? {
|
|
142
|
+
whenToUse: metadata.whenToUse,
|
|
143
|
+
whenNotToUse: metadata.whenNotToUse,
|
|
144
|
+
}
|
|
145
|
+
: undefined
|
|
146
|
+
|
|
147
|
+
// Check for examples file
|
|
148
|
+
let examples: UiComponent['examples'] | undefined
|
|
149
|
+
const examplesPath = filePath.replace(/\.tsx?$/, '.examples.tsx')
|
|
150
|
+
if (await fs.pathExists(examplesPath)) {
|
|
151
|
+
// Calculate examples source path relative to repo root
|
|
152
|
+
const examplesSourcePath = path.relative(path.join(libraryRoot, '../../..'), examplesPath)
|
|
153
|
+
examples = {
|
|
154
|
+
module: `${packageName}/examples`,
|
|
155
|
+
export: `${componentName}Examples`,
|
|
156
|
+
sourcePath: examplesSourcePath,
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const component: UiComponent = {
|
|
161
|
+
id,
|
|
162
|
+
kind: 'ui_component',
|
|
163
|
+
name: componentName,
|
|
164
|
+
packageName,
|
|
165
|
+
category,
|
|
166
|
+
description,
|
|
167
|
+
tags,
|
|
168
|
+
props: props.length > 0 ? props : undefined,
|
|
169
|
+
sourcePath,
|
|
170
|
+
library: packageName, // Link component to its library
|
|
171
|
+
guidance,
|
|
172
|
+
example: metadata.example || undefined,
|
|
173
|
+
examples,
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
component,
|
|
178
|
+
validation,
|
|
179
|
+
excluded: false,
|
|
180
|
+
}
|
|
181
|
+
} catch (error) {
|
|
182
|
+
console.error(`Error scanning component ${filePath}:`, error)
|
|
183
|
+
return null
|
|
184
|
+
}
|
|
185
|
+
}
|
|
@@ -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
|
+
}
|