@mimir-labs/core 0.1.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 (225) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -0
  3. package/dist/implementation/adapters/agents-md/adapter.d.ts +2 -0
  4. package/dist/implementation/adapters/agents-md/adapter.js +35 -0
  5. package/dist/implementation/adapters/agents-md/adapter.js.map +1 -0
  6. package/dist/implementation/adapters/copilot/adapter.d.ts +2 -0
  7. package/dist/implementation/adapters/copilot/adapter.js +34 -0
  8. package/dist/implementation/adapters/copilot/adapter.js.map +1 -0
  9. package/dist/implementation/adapters/cursor/adapter.d.ts +2 -0
  10. package/dist/implementation/adapters/cursor/adapter.js +33 -0
  11. package/dist/implementation/adapters/cursor/adapter.js.map +1 -0
  12. package/dist/implementation/adapters/index.d.ts +5 -0
  13. package/dist/implementation/adapters/index.js +23 -0
  14. package/dist/implementation/adapters/index.js.map +1 -0
  15. package/dist/implementation/adapters/managed-section.d.ts +5 -0
  16. package/dist/implementation/adapters/managed-section.js +37 -0
  17. package/dist/implementation/adapters/managed-section.js.map +1 -0
  18. package/dist/implementation/adapters/registry.d.ts +11 -0
  19. package/dist/implementation/adapters/registry.js +50 -0
  20. package/dist/implementation/adapters/registry.js.map +1 -0
  21. package/dist/implementation/adapters/types.d.ts +19 -0
  22. package/dist/implementation/adapters/types.js +3 -0
  23. package/dist/implementation/adapters/types.js.map +1 -0
  24. package/dist/implementation/configuration/manifest-loader.d.ts +16 -0
  25. package/dist/implementation/configuration/manifest-loader.js +64 -0
  26. package/dist/implementation/configuration/manifest-loader.js.map +1 -0
  27. package/dist/implementation/configuration/package-config.d.ts +12 -0
  28. package/dist/implementation/configuration/package-config.js +33 -0
  29. package/dist/implementation/configuration/package-config.js.map +1 -0
  30. package/dist/implementation/dependency-discovery/discover-providers.d.ts +6 -0
  31. package/dist/implementation/dependency-discovery/discover-providers.js +39 -0
  32. package/dist/implementation/dependency-discovery/discover-providers.js.map +1 -0
  33. package/dist/implementation/doctor/evaluator.d.ts +16 -0
  34. package/dist/implementation/doctor/evaluator.js +269 -0
  35. package/dist/implementation/doctor/evaluator.js.map +1 -0
  36. package/dist/implementation/generation/examples/existing-aps/src/Modal.d.ts +4 -0
  37. package/dist/implementation/generation/examples/existing-aps/src/Modal.js +7 -0
  38. package/dist/implementation/generation/examples/existing-aps/src/Modal.js.map +1 -0
  39. package/dist/implementation/generation/examples/existing-aps/src/index.d.ts +1 -0
  40. package/dist/implementation/generation/examples/existing-aps/src/index.js +6 -0
  41. package/dist/implementation/generation/examples/existing-aps/src/index.js.map +1 -0
  42. package/dist/implementation/generation/examples/missing-metadata/src/Input.d.ts +6 -0
  43. package/dist/implementation/generation/examples/missing-metadata/src/Input.js +6 -0
  44. package/dist/implementation/generation/examples/missing-metadata/src/Input.js.map +1 -0
  45. package/dist/implementation/generation/examples/missing-metadata/src/index.d.ts +1 -0
  46. package/dist/implementation/generation/examples/missing-metadata/src/index.js +6 -0
  47. package/dist/implementation/generation/examples/missing-metadata/src/index.js.map +1 -0
  48. package/dist/implementation/generation/examples/react-exports/src/Button.d.ts +5 -0
  49. package/dist/implementation/generation/examples/react-exports/src/Button.js +7 -0
  50. package/dist/implementation/generation/examples/react-exports/src/Button.js.map +1 -0
  51. package/dist/implementation/generation/examples/react-exports/src/Button.stories.d.ts +16 -0
  52. package/dist/implementation/generation/examples/react-exports/src/Button.stories.js +20 -0
  53. package/dist/implementation/generation/examples/react-exports/src/Button.stories.js.map +1 -0
  54. package/dist/implementation/generation/examples/react-exports/src/index.d.ts +1 -0
  55. package/dist/implementation/generation/examples/react-exports/src/index.js +6 -0
  56. package/dist/implementation/generation/examples/react-exports/src/index.js.map +1 -0
  57. package/dist/implementation/generation/extractors/readme-extractor.d.ts +2 -0
  58. package/dist/implementation/generation/extractors/readme-extractor.js +58 -0
  59. package/dist/implementation/generation/extractors/readme-extractor.js.map +1 -0
  60. package/dist/implementation/generation/extractors/storybook-extractor.d.ts +2 -0
  61. package/dist/implementation/generation/extractors/storybook-extractor.js +64 -0
  62. package/dist/implementation/generation/extractors/storybook-extractor.js.map +1 -0
  63. package/dist/implementation/generation/extractors/typescript-extractor.d.ts +2 -0
  64. package/dist/implementation/generation/extractors/typescript-extractor.js +138 -0
  65. package/dist/implementation/generation/extractors/typescript-extractor.js.map +1 -0
  66. package/dist/implementation/generation/generate-service.d.ts +6 -0
  67. package/dist/implementation/generation/generate-service.js +121 -0
  68. package/dist/implementation/generation/generate-service.js.map +1 -0
  69. package/dist/implementation/generation/provenance/provenance-builder.d.ts +6 -0
  70. package/dist/implementation/generation/provenance/provenance-builder.js +44 -0
  71. package/dist/implementation/generation/provenance/provenance-builder.js.map +1 -0
  72. package/dist/implementation/generation/resource-builders/component-builder.d.ts +2 -0
  73. package/dist/implementation/generation/resource-builders/component-builder.js +68 -0
  74. package/dist/implementation/generation/resource-builders/component-builder.js.map +1 -0
  75. package/dist/implementation/generation/resource-builders/example-builder.d.ts +5 -0
  76. package/dist/implementation/generation/resource-builders/example-builder.js +10 -0
  77. package/dist/implementation/generation/resource-builders/example-builder.js.map +1 -0
  78. package/dist/implementation/generation/types.d.ts +80 -0
  79. package/dist/implementation/generation/types.js +3 -0
  80. package/dist/implementation/generation/types.js.map +1 -0
  81. package/dist/implementation/generators/aps-generator.d.ts +7 -0
  82. package/dist/implementation/generators/aps-generator.js +11 -0
  83. package/dist/implementation/generators/aps-generator.js.map +1 -0
  84. package/dist/implementation/generators/index.d.ts +4 -0
  85. package/dist/implementation/generators/index.js +15 -0
  86. package/dist/implementation/generators/index.js.map +1 -0
  87. package/dist/implementation/generators/registry.d.ts +8 -0
  88. package/dist/implementation/generators/registry.js +30 -0
  89. package/dist/implementation/generators/registry.js.map +1 -0
  90. package/dist/implementation/generators/types.d.ts +4 -0
  91. package/dist/implementation/generators/types.js +3 -0
  92. package/dist/implementation/generators/types.js.map +1 -0
  93. package/dist/implementation/io/fs.d.ts +6 -0
  94. package/dist/implementation/io/fs.js +47 -0
  95. package/dist/implementation/io/fs.js.map +1 -0
  96. package/dist/implementation/io/json.d.ts +1 -0
  97. package/dist/implementation/io/json.js +7 -0
  98. package/dist/implementation/io/json.js.map +1 -0
  99. package/dist/implementation/query/resource-summary.d.ts +4 -0
  100. package/dist/implementation/query/resource-summary.js +32 -0
  101. package/dist/implementation/query/resource-summary.js.map +1 -0
  102. package/dist/implementation/services/context-service.d.ts +4 -0
  103. package/dist/implementation/services/context-service.js +22 -0
  104. package/dist/implementation/services/context-service.js.map +1 -0
  105. package/dist/implementation/services/discovery-service.d.ts +1 -0
  106. package/dist/implementation/services/discovery-service.js +8 -0
  107. package/dist/implementation/services/discovery-service.js.map +1 -0
  108. package/dist/implementation/services/doctor-service.d.ts +1 -0
  109. package/dist/implementation/services/doctor-service.js +8 -0
  110. package/dist/implementation/services/doctor-service.js.map +1 -0
  111. package/dist/implementation/services/generate-service.d.ts +7 -0
  112. package/dist/implementation/services/generate-service.js +10 -0
  113. package/dist/implementation/services/generate-service.js.map +1 -0
  114. package/dist/implementation/services/governance-service.d.ts +1 -0
  115. package/dist/implementation/services/governance-service.js +28 -0
  116. package/dist/implementation/services/governance-service.js.map +1 -0
  117. package/dist/implementation/services/init-service.d.ts +6 -0
  118. package/dist/implementation/services/init-service.js +49 -0
  119. package/dist/implementation/services/init-service.js.map +1 -0
  120. package/dist/implementation/services/sync-service.d.ts +8 -0
  121. package/dist/implementation/services/sync-service.js +35 -0
  122. package/dist/implementation/services/sync-service.js.map +1 -0
  123. package/dist/implementation/services/validate-service.d.ts +1 -0
  124. package/dist/implementation/services/validate-service.js +8 -0
  125. package/dist/implementation/services/validate-service.js.map +1 -0
  126. package/dist/implementation/synchronization/agents-md.d.ts +2 -0
  127. package/dist/implementation/synchronization/agents-md.js +46 -0
  128. package/dist/implementation/synchronization/agents-md.js.map +1 -0
  129. package/dist/implementation/synchronization/context-generator.d.ts +7 -0
  130. package/dist/implementation/synchronization/context-generator.js +110 -0
  131. package/dist/implementation/synchronization/context-generator.js.map +1 -0
  132. package/dist/implementation/validation-engine/validate-package.d.ts +10 -0
  133. package/dist/implementation/validation-engine/validate-package.js +123 -0
  134. package/dist/implementation/validation-engine/validate-package.js.map +1 -0
  135. package/dist/index.d.ts +15 -0
  136. package/dist/index.js +31 -0
  137. package/dist/index.js.map +1 -0
  138. package/dist/protocol/compatibility/aps-component-schema.d.ts +17 -0
  139. package/dist/protocol/compatibility/aps-component-schema.js +85 -0
  140. package/dist/protocol/compatibility/aps-component-schema.js.map +1 -0
  141. package/dist/protocol/compatibility/aps-example-schema.d.ts +14 -0
  142. package/dist/protocol/compatibility/aps-example-schema.js +63 -0
  143. package/dist/protocol/compatibility/aps-example-schema.js.map +1 -0
  144. package/dist/protocol/compatibility/aps-manifest-schema.d.ts +15 -0
  145. package/dist/protocol/compatibility/aps-manifest-schema.js +115 -0
  146. package/dist/protocol/compatibility/aps-manifest-schema.js.map +1 -0
  147. package/dist/protocol/compatibility/aps-migration-schema.d.ts +14 -0
  148. package/dist/protocol/compatibility/aps-migration-schema.js +65 -0
  149. package/dist/protocol/compatibility/aps-migration-schema.js.map +1 -0
  150. package/dist/protocol/compatibility/aps-pattern-schema.d.ts +15 -0
  151. package/dist/protocol/compatibility/aps-pattern-schema.js +67 -0
  152. package/dist/protocol/compatibility/aps-pattern-schema.js.map +1 -0
  153. package/dist/protocol/compatibility/aps-rule-schema.d.ts +13 -0
  154. package/dist/protocol/compatibility/aps-rule-schema.js +55 -0
  155. package/dist/protocol/compatibility/aps-rule-schema.js.map +1 -0
  156. package/dist/protocol/compatibility/index.d.ts +14 -0
  157. package/dist/protocol/compatibility/index.js +6 -0
  158. package/dist/protocol/compatibility/index.js.map +1 -0
  159. package/dist/protocol/governance/applicability-validator.d.ts +2 -0
  160. package/dist/protocol/governance/applicability-validator.js +108 -0
  161. package/dist/protocol/governance/applicability-validator.js.map +1 -0
  162. package/dist/protocol/governance/conflict-validator.d.ts +2 -0
  163. package/dist/protocol/governance/conflict-validator.js +129 -0
  164. package/dist/protocol/governance/conflict-validator.js.map +1 -0
  165. package/dist/protocol/governance/evidence-validator.d.ts +2 -0
  166. package/dist/protocol/governance/evidence-validator.js +97 -0
  167. package/dist/protocol/governance/evidence-validator.js.map +1 -0
  168. package/dist/protocol/governance/identity-validator.d.ts +2 -0
  169. package/dist/protocol/governance/identity-validator.js +79 -0
  170. package/dist/protocol/governance/identity-validator.js.map +1 -0
  171. package/dist/protocol/governance/index.d.ts +79 -0
  172. package/dist/protocol/governance/index.js +115 -0
  173. package/dist/protocol/governance/index.js.map +1 -0
  174. package/dist/protocol/governance/lifecycle-validator.d.ts +2 -0
  175. package/dist/protocol/governance/lifecycle-validator.js +93 -0
  176. package/dist/protocol/governance/lifecycle-validator.js.map +1 -0
  177. package/dist/protocol/governance/provenance-validator.d.ts +2 -0
  178. package/dist/protocol/governance/provenance-validator.js +170 -0
  179. package/dist/protocol/governance/provenance-validator.js.map +1 -0
  180. package/dist/protocol/manifest/api-resource.d.ts +26 -0
  181. package/dist/protocol/manifest/api-resource.js +3 -0
  182. package/dist/protocol/manifest/api-resource.js.map +1 -0
  183. package/dist/protocol/manifest/common.d.ts +44 -0
  184. package/dist/protocol/manifest/common.js +3 -0
  185. package/dist/protocol/manifest/common.js.map +1 -0
  186. package/dist/protocol/manifest/component-resource.d.ts +48 -0
  187. package/dist/protocol/manifest/component-resource.js +3 -0
  188. package/dist/protocol/manifest/component-resource.js.map +1 -0
  189. package/dist/protocol/manifest/event-resource.d.ts +16 -0
  190. package/dist/protocol/manifest/event-resource.js +3 -0
  191. package/dist/protocol/manifest/event-resource.js.map +1 -0
  192. package/dist/protocol/manifest/example-resource.d.ts +17 -0
  193. package/dist/protocol/manifest/example-resource.js +3 -0
  194. package/dist/protocol/manifest/example-resource.js.map +1 -0
  195. package/dist/protocol/manifest/index.d.ts +13 -0
  196. package/dist/protocol/manifest/index.js +3 -0
  197. package/dist/protocol/manifest/index.js.map +1 -0
  198. package/dist/protocol/manifest/legacy-v1.d.ts +47 -0
  199. package/dist/protocol/manifest/legacy-v1.js +3 -0
  200. package/dist/protocol/manifest/legacy-v1.js.map +1 -0
  201. package/dist/protocol/manifest/manifest.d.ts +28 -0
  202. package/dist/protocol/manifest/manifest.js +3 -0
  203. package/dist/protocol/manifest/manifest.js.map +1 -0
  204. package/dist/protocol/manifest/migration-resource.d.ts +22 -0
  205. package/dist/protocol/manifest/migration-resource.js +3 -0
  206. package/dist/protocol/manifest/migration-resource.js.map +1 -0
  207. package/dist/protocol/manifest/model-resource.d.ts +21 -0
  208. package/dist/protocol/manifest/model-resource.js +3 -0
  209. package/dist/protocol/manifest/model-resource.js.map +1 -0
  210. package/dist/protocol/manifest/pattern-resource.d.ts +14 -0
  211. package/dist/protocol/manifest/pattern-resource.js +3 -0
  212. package/dist/protocol/manifest/pattern-resource.js.map +1 -0
  213. package/dist/protocol/manifest/resource.d.ts +24 -0
  214. package/dist/protocol/manifest/resource.js +3 -0
  215. package/dist/protocol/manifest/resource.js.map +1 -0
  216. package/dist/protocol/manifest/rule-resource.d.ts +27 -0
  217. package/dist/protocol/manifest/rule-resource.js +3 -0
  218. package/dist/protocol/manifest/rule-resource.js.map +1 -0
  219. package/dist/protocol/manifest/service-resource.d.ts +14 -0
  220. package/dist/protocol/manifest/service-resource.js +3 -0
  221. package/dist/protocol/manifest/service-resource.js.map +1 -0
  222. package/dist/shared/json.d.ts +2 -0
  223. package/dist/shared/json.js +14 -0
  224. package/dist/shared/json.js.map +1 -0
  225. package/package.json +46 -0
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.extractTypeScriptComponents = extractTypeScriptComponents;
7
+ const node_path_1 = __importDefault(require("node:path"));
8
+ const promises_1 = require("node:fs/promises");
9
+ const fs_1 = require("../../io/fs");
10
+ const TS_EXTENSIONS = new Set([".ts", ".tsx"]);
11
+ function isPascalCase(name) {
12
+ return /^[A-Z][A-Za-z0-9]*$/.test(name);
13
+ }
14
+ function normalizeSlashes(value) {
15
+ return value.split(node_path_1.default.sep).join("/");
16
+ }
17
+ async function collectFiles(dir) {
18
+ const entries = await (0, promises_1.readdir)(dir, { withFileTypes: true });
19
+ const files = [];
20
+ for (const entry of entries) {
21
+ const absolutePath = node_path_1.default.join(dir, entry.name);
22
+ if (entry.isDirectory()) {
23
+ if (entry.name === "node_modules" || entry.name === "dist" || entry.name.startsWith(".")) {
24
+ continue;
25
+ }
26
+ files.push(...(await collectFiles(absolutePath)));
27
+ continue;
28
+ }
29
+ if (entry.isFile() &&
30
+ TS_EXTENSIONS.has(node_path_1.default.extname(entry.name)) &&
31
+ !entry.name.includes(".stories.")) {
32
+ files.push(absolutePath);
33
+ }
34
+ }
35
+ return files;
36
+ }
37
+ function extractExportedNames(content) {
38
+ const names = new Set();
39
+ const patterns = [
40
+ /export\s+function\s+([A-Z][A-Za-z0-9_]*)\s*\(/g,
41
+ /export\s+const\s+([A-Z][A-Za-z0-9_]*)\s*[:=]/g,
42
+ /export\s+class\s+([A-Z][A-Za-z0-9_]*)\s+/g,
43
+ /export\s+\{\s*([^}]+)\s*\}/g
44
+ ];
45
+ for (const pattern of patterns) {
46
+ let match;
47
+ while ((match = pattern.exec(content)) !== null) {
48
+ if (pattern.source.includes("[^}]+")) {
49
+ const tokens = match[1].split(",").map((item) => item.trim());
50
+ for (const token of tokens) {
51
+ const aliasParts = token.split(/\s+as\s+/i).map((part) => part.trim());
52
+ const candidate = aliasParts[aliasParts.length - 1];
53
+ if (isPascalCase(candidate)) {
54
+ names.add(candidate);
55
+ }
56
+ }
57
+ }
58
+ else {
59
+ const candidate = match[1];
60
+ if (isPascalCase(candidate)) {
61
+ names.add(candidate);
62
+ }
63
+ }
64
+ }
65
+ }
66
+ return [...names].sort((a, b) => a.localeCompare(b));
67
+ }
68
+ function parsePropsBlock(block) {
69
+ const result = {};
70
+ const lines = block.split("\n");
71
+ for (const line of lines) {
72
+ const trimmed = line.trim();
73
+ const match = /^([A-Za-z_][A-Za-z0-9_]*)\??:\s*([^;]+);?$/.exec(trimmed);
74
+ if (!match) {
75
+ continue;
76
+ }
77
+ const propName = match[1];
78
+ const propType = match[2].trim();
79
+ const optional = trimmed.includes("?:");
80
+ result[propName] = {
81
+ name: propName,
82
+ type: propType,
83
+ required: !optional
84
+ };
85
+ }
86
+ return result;
87
+ }
88
+ function extractProps(content, componentName) {
89
+ const interfacePattern = new RegExp(`interface\\s+${componentName}Props\\s*\\{([\\s\\S]*?)\\}`, "m");
90
+ const typePattern = new RegExp(`type\\s+${componentName}Props\\s*=\\s*\\{([\\s\\S]*?)\\}`, "m");
91
+ const interfaceMatch = interfacePattern.exec(content);
92
+ if (interfaceMatch) {
93
+ return parsePropsBlock(interfaceMatch[1]);
94
+ }
95
+ const typeMatch = typePattern.exec(content);
96
+ if (typeMatch) {
97
+ return parsePropsBlock(typeMatch[1]);
98
+ }
99
+ return {};
100
+ }
101
+ async function extractTypeScriptComponents(cwd, packageName) {
102
+ const sourceDir = node_path_1.default.join(cwd, "src");
103
+ const files = await collectFiles(sourceDir);
104
+ const components = [];
105
+ for (const filePath of files) {
106
+ const content = await (0, fs_1.readText)(filePath);
107
+ const exportedNames = extractExportedNames(content);
108
+ if (exportedNames.length === 0) {
109
+ continue;
110
+ }
111
+ const relativeFilePath = normalizeSlashes(node_path_1.default.relative(cwd, filePath));
112
+ for (const exportedName of exportedNames) {
113
+ components.push({
114
+ name: exportedName,
115
+ filePath: relativeFilePath,
116
+ importName: exportedName,
117
+ packageName,
118
+ props: extractProps(content, exportedName)
119
+ });
120
+ }
121
+ }
122
+ const unique = new Map();
123
+ for (const component of components) {
124
+ const key = component.name;
125
+ const previous = unique.get(key);
126
+ if (!previous) {
127
+ unique.set(key, component);
128
+ continue;
129
+ }
130
+ const previousScore = Object.keys(previous.props).length + (previous.filePath.endsWith("/index.ts") ? 0 : 1);
131
+ const candidateScore = Object.keys(component.props).length + (component.filePath.endsWith("/index.ts") ? 0 : 1);
132
+ if (candidateScore > previousScore) {
133
+ unique.set(key, component);
134
+ }
135
+ }
136
+ return [...unique.values()].sort((a, b) => a.name.localeCompare(b.name));
137
+ }
138
+ //# sourceMappingURL=typescript-extractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript-extractor.js","sourceRoot":"","sources":["../../../../src/implementation/generation/extractors/typescript-extractor.ts"],"names":[],"mappings":";;;;;AAyHA,kEAgDC;AAzKD,0DAA6B;AAC7B,+CAA2C;AAC3C,oCAAuC;AAGvC,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAE/C,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,OAAO,KAAK,CAAC,KAAK,CAAC,mBAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzC,CAAC;AAED,KAAK,UAAU,YAAY,CAAC,GAAW;IACrC,MAAM,OAAO,GAAG,MAAM,IAAA,kBAAO,EAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,YAAY,GAAG,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;gBACzF,SAAS;YACX,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CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3E,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { GenerateReport } from "./types";
2
+ type GenerateOptions = {
3
+ force?: boolean;
4
+ };
5
+ export declare function generateApsFromEvidence(cwd: string, options?: GenerateOptions): Promise<GenerateReport>;
6
+ export {};
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.generateApsFromEvidence = generateApsFromEvidence;
7
+ const node_path_1 = __importDefault(require("node:path"));
8
+ const fs_1 = require("../io/fs");
9
+ const json_1 = require("../io/json");
10
+ const compatibility_1 = require("../../protocol/compatibility");
11
+ const governance_1 = require("../../protocol/governance");
12
+ const readme_extractor_1 = require("./extractors/readme-extractor");
13
+ const storybook_extractor_1 = require("./extractors/storybook-extractor");
14
+ const typescript_extractor_1 = require("./extractors/typescript-extractor");
15
+ const component_builder_1 = require("./resource-builders/component-builder");
16
+ const example_builder_1 = require("./resource-builders/example-builder");
17
+ const APS_MANIFEST_RELATIVE_PATH = "./dist/aps/manifest.json";
18
+ function hasHumanMetadata(component) {
19
+ return component.description.trim() !== "" && component.whenToUse.length > 0 && component.whenNotToUse.length > 0;
20
+ }
21
+ function toUniqueSorted(values) {
22
+ return [...new Set(values)].sort((a, b) => a.localeCompare(b));
23
+ }
24
+ async function readPackageName(cwd) {
25
+ const packageJsonPath = node_path_1.default.join(cwd, "package.json");
26
+ const packageJson = await (0, fs_1.readJson)(packageJsonPath);
27
+ if (typeof packageJson.name !== "string" || packageJson.name.trim() === "") {
28
+ throw new Error("package.json name is required for generation");
29
+ }
30
+ return packageJson.name;
31
+ }
32
+ async function ensureProviderDiscoverability(cwd) {
33
+ const warnings = [];
34
+ const packageJsonPath = node_path_1.default.join(cwd, "package.json");
35
+ const packageJson = await (0, fs_1.readJson)(packageJsonPath);
36
+ let changed = false;
37
+ if (!(0, json_1.isObject)(packageJson.aps)) {
38
+ packageJson.aps = {};
39
+ changed = true;
40
+ }
41
+ const aps = packageJson.aps;
42
+ if (aps.version === undefined) {
43
+ aps.version = 1;
44
+ changed = true;
45
+ warnings.push("APS config version was missing and has been set to 1.");
46
+ }
47
+ if (aps.manifest !== APS_MANIFEST_RELATIVE_PATH) {
48
+ const previous = typeof aps.manifest === "string" ? aps.manifest : "(not set)";
49
+ aps.manifest = APS_MANIFEST_RELATIVE_PATH;
50
+ changed = true;
51
+ warnings.push(`APS manifest path updated from '${previous}' to '${APS_MANIFEST_RELATIVE_PATH}' for consistency with generated resources.`);
52
+ }
53
+ if ((0, json_1.isObject)(packageJson.exports)) {
54
+ const exportsMap = packageJson.exports;
55
+ if (exportsMap["./package.json"] !== "./package.json") {
56
+ exportsMap["./package.json"] = "./package.json";
57
+ changed = true;
58
+ warnings.push("Added exports['./package.json'] for provider discovery compatibility.");
59
+ }
60
+ }
61
+ else if (packageJson.exports !== undefined) {
62
+ warnings.push("Package exports is not an object. Could not add exports['./package.json']; configure it manually for discovery compatibility.");
63
+ }
64
+ if (changed) {
65
+ await (0, fs_1.writeJson)(packageJsonPath, packageJson);
66
+ }
67
+ return warnings;
68
+ }
69
+ async function generateApsFromEvidence(cwd, options = {}) {
70
+ const packageName = await readPackageName(cwd);
71
+ const outputDir = node_path_1.default.join(cwd, "dist", "aps");
72
+ const manifestPath = node_path_1.default.join(outputDir, "manifest.json");
73
+ const componentsPath = node_path_1.default.join(outputDir, "components.json");
74
+ const alreadyExists = (await (0, fs_1.fileExists)(manifestPath)) || (await (0, fs_1.fileExists)(componentsPath));
75
+ if (alreadyExists && !options.force) {
76
+ throw new Error("APS resources already exist in dist/aps. Re-run with --force to replace existing generated resources.");
77
+ }
78
+ const discoverabilityWarnings = await ensureProviderDiscoverability(cwd);
79
+ await (0, fs_1.ensureDir)(outputDir);
80
+ const [typescriptComponents, storybookFacts, readmeFacts] = await Promise.all([
81
+ (0, typescript_extractor_1.extractTypeScriptComponents)(cwd, packageName),
82
+ (0, storybook_extractor_1.extractStorybookFacts)(cwd),
83
+ (0, readme_extractor_1.extractReadmeFacts)(cwd)
84
+ ]);
85
+ const components = typescriptComponents.map((component) => (0, component_builder_1.buildComponentResource)(component, storybookFacts, readmeFacts));
86
+ const exampleResult = (0, example_builder_1.buildExamplesNotImplemented)();
87
+ const output = {
88
+ components,
89
+ warnings: [...exampleResult.warnings, ...discoverabilityWarnings],
90
+ missingHumanMetadata: toUniqueSorted(components
91
+ .filter((component) => !hasHumanMetadata(component))
92
+ .map((component) => component.name))
93
+ };
94
+ const manifest = {
95
+ version: 1,
96
+ components
97
+ };
98
+ await (0, fs_1.writeJson)(componentsPath, {
99
+ components
100
+ });
101
+ await (0, fs_1.writeJson)(manifestPath, manifest);
102
+ const validateResult = (0, compatibility_1.validateApsManifest)(manifest);
103
+ const governanceResult = (0, governance_1.validateGovernance)(manifest);
104
+ return {
105
+ outputDir,
106
+ generatedResources: output.components.length,
107
+ warnings: output.warnings,
108
+ missingHumanMetadata: output.missingHumanMetadata,
109
+ validate: {
110
+ valid: validateResult.valid,
111
+ errors: validateResult.errors,
112
+ warnings: validateResult.warnings
113
+ },
114
+ governance: {
115
+ valid: governanceResult.valid,
116
+ errors: governanceResult.errors,
117
+ warnings: governanceResult.warnings
118
+ }
119
+ };
120
+ }
121
+ //# sourceMappingURL=generate-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-service.js","sourceRoot":"","sources":["../../../src/implementation/generation/generate-service.ts"],"names":[],"mappings":";;;;;AAyFA,0DAuEC;AAhKD,0DAA6B;AAC7B,iCAAsE;AACtE,qCAAsC;AACtC,gEAAmE;AACnE,0DAA+D;AAC/D,oEAAmE;AACnE,0EAAyE;AACzE,4EAAgF;AAChF,6EAA+E;AAC/E,yEAAkF;AAWlF,MAAM,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;QACV,QAAQ,EAAE,CAAC,GAAG,aAAa,CAAC,QAAQ,EAAE,GAAG,uBAAuB,CAAC;QACjE,oBAAoB,EAAE,cAAc,CAClC,UAAU;aACP,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;aACnD,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CACtC;KACF,CAAC;IAEF,MAAM,QAAQ,GAAG;QACf,OAAO,EAAE,CAAC;QACV,UAAU;KACX,CAAC;IAEF,MAAM,IAAA,cAAS,EAAC,cAAc,EAAE;QAC9B,UAAU;KACX,CAAC,CAAC;IACH,MAAM,IAAA,cAAS,EAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAExC,MAAM,cAAc,GAAG,IAAA,mCAAmB,EAAC,QAAQ,CAAC,CAAC;IACrD,MAAM,gBAAgB,GAAG,IAAA,+BAAkB,EAAC,QAAQ,CAAC,CAAC;IAEtD,OAAO;QACL,SAAS;QACT,kBAAkB,EAAE,MAAM,CAAC,UAAU,CAAC,MAAM;QAC5C,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,oBAAoB,EAAE,MAAM,CAAC,oBAAoB;QACjD,QAAQ,EAAE;YACR,KAAK,EAAE,cAAc,CAAC,KAAK;YAC3B,MAAM,EAAE,cAAc,CAAC,MAAM;YAC7B,QAAQ,EAAE,cAAc,CAAC,QAAQ;SAClC;QACD,UAAU,EAAE;YACV,KAAK,EAAE,gBAAgB,CAAC,KAAK;YAC7B,MAAM,EAAE,gBAAgB,CAAC,MAAM;YAC/B,QAAQ,EAAE,gBAAgB,CAAC,QAAQ;SACpC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { FieldEvidence } from "../types";
2
+ export declare function fromTypeScript(sourceRef: string): FieldEvidence;
3
+ export declare function fromPackageJson(): FieldEvidence;
4
+ export declare function fromStorybook(sourceRef: string): FieldEvidence;
5
+ export declare function fromReadme(sourceRef: string): FieldEvidence;
6
+ export declare function missingHumanSource(fieldName: string): FieldEvidence;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fromTypeScript = fromTypeScript;
4
+ exports.fromPackageJson = fromPackageJson;
5
+ exports.fromStorybook = fromStorybook;
6
+ exports.fromReadme = fromReadme;
7
+ exports.missingHumanSource = missingHumanSource;
8
+ function fromTypeScript(sourceRef) {
9
+ return {
10
+ sourceType: "typescript",
11
+ sourceRef,
12
+ confidence: "high"
13
+ };
14
+ }
15
+ function fromPackageJson() {
16
+ return {
17
+ sourceType: "package",
18
+ sourceRef: "package.json",
19
+ confidence: "high"
20
+ };
21
+ }
22
+ function fromStorybook(sourceRef) {
23
+ return {
24
+ sourceType: "storybook",
25
+ sourceRef,
26
+ confidence: "medium"
27
+ };
28
+ }
29
+ function fromReadme(sourceRef) {
30
+ return {
31
+ sourceType: "readme",
32
+ sourceRef,
33
+ confidence: "medium"
34
+ };
35
+ }
36
+ function missingHumanSource(fieldName) {
37
+ return {
38
+ sourceType: "human",
39
+ sourceRef: "missing",
40
+ confidence: "low",
41
+ note: `Missing human-authored source for '${fieldName}'`
42
+ };
43
+ }
44
+ //# sourceMappingURL=provenance-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provenance-builder.js","sourceRoot":"","sources":["../../../../src/implementation/generation/provenance/provenance-builder.ts"],"names":[],"mappings":";;AAEA,wCAMC;AAED,0CAMC;AAED,sCAMC;AAED,gCAMC;AAED,gDAOC;AAvCD,SAAgB,cAAc,CAAC,SAAiB;IAC9C,OAAO;QACL,UAAU,EAAE,YAAY;QACxB,SAAS;QACT,UAAU,EAAE,MAAM;KACnB,CAAC;AACJ,CAAC;AAED,SAAgB,eAAe;IAC7B,OAAO;QACL,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,cAAc;QACzB,UAAU,EAAE,MAAM;KACnB,CAAC;AACJ,CAAC;AAED,SAAgB,aAAa,CAAC,SAAiB;IAC7C,OAAO;QACL,UAAU,EAAE,WAAW;QACvB,SAAS;QACT,UAAU,EAAE,QAAQ;KACrB,CAAC;AACJ,CAAC;AAED,SAAgB,UAAU,CAAC,SAAiB;IAC1C,OAAO;QACL,UAAU,EAAE,QAAQ;QACpB,SAAS;QACT,UAAU,EAAE,QAAQ;KACrB,CAAC;AACJ,CAAC;AAED,SAAgB,kBAAkB,CAAC,SAAiB;IAClD,OAAO;QACL,UAAU,EAAE,OAAO;QACnB,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,sCAAsC,SAAS,GAAG;KACzD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { ExtractedComponentFact, GeneratedComponentResource, ReadmeFacts, StorybookFacts } from "../types";
2
+ export declare function buildComponentResource(component: ExtractedComponentFact, storybook: StorybookFacts, readme: ReadmeFacts): GeneratedComponentResource;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildComponentResource = buildComponentResource;
4
+ const provenance_builder_1 = require("../provenance/provenance-builder");
5
+ function sanitizeSegment(value) {
6
+ return value
7
+ .toLowerCase()
8
+ .replace(/^@/, "")
9
+ .replace(/[^a-z0-9]+/g, "")
10
+ .trim();
11
+ }
12
+ function splitPackageName(packageName) {
13
+ if (packageName.startsWith("@")) {
14
+ const parts = packageName.split("/");
15
+ const org = sanitizeSegment(parts[0] ?? "local");
16
+ const pkg = sanitizeSegment(parts[1] ?? "package");
17
+ return { org: org || "local", pkg: pkg || "package" };
18
+ }
19
+ return {
20
+ org: "local",
21
+ pkg: sanitizeSegment(packageName) || "package"
22
+ };
23
+ }
24
+ function createDeterministicId(packageName, componentName) {
25
+ const { org, pkg } = splitPackageName(packageName);
26
+ const name = sanitizeSegment(componentName) || "component";
27
+ return `${org}.${pkg}.component.${name}`;
28
+ }
29
+ function buildComponentResource(component, storybook, readme) {
30
+ const description = readme.descriptionsByComponent[component.name] ?? "";
31
+ const variants = storybook.variantsByComponent[component.name] ?? [];
32
+ const storyFiles = storybook.storyFilesByComponent[component.name] ?? [];
33
+ const evidenceByField = {
34
+ id: { evidence: [(0, provenance_builder_1.fromPackageJson)()] },
35
+ name: { evidence: [(0, provenance_builder_1.fromTypeScript)(component.filePath)] },
36
+ package: { evidence: [(0, provenance_builder_1.fromPackageJson)()] },
37
+ import: { evidence: [(0, provenance_builder_1.fromTypeScript)(component.filePath)] },
38
+ description: {
39
+ evidence: description !== ""
40
+ ? [(0, provenance_builder_1.fromReadme)("README.md")]
41
+ : [(0, provenance_builder_1.missingHumanSource)("description")]
42
+ },
43
+ props: { evidence: [(0, provenance_builder_1.fromTypeScript)(component.filePath)] },
44
+ variants: {
45
+ evidence: variants.length > 0 && storyFiles.length > 0
46
+ ? storyFiles.map((file) => (0, provenance_builder_1.fromStorybook)(file))
47
+ : [(0, provenance_builder_1.missingHumanSource)("variants")]
48
+ },
49
+ whenToUse: { evidence: [(0, provenance_builder_1.missingHumanSource)("whenToUse")] },
50
+ whenNotToUse: { evidence: [(0, provenance_builder_1.missingHumanSource)("whenNotToUse")] }
51
+ };
52
+ return {
53
+ type: "component",
54
+ id: createDeterministicId(component.packageName, component.name),
55
+ name: component.name,
56
+ package: component.packageName,
57
+ import: component.importName,
58
+ description,
59
+ props: component.props,
60
+ variants,
61
+ whenToUse: [],
62
+ whenNotToUse: [],
63
+ governance: {
64
+ fields: evidenceByField
65
+ }
66
+ };
67
+ }
68
+ //# sourceMappingURL=component-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-builder.js","sourceRoot":"","sources":["../../../../src/implementation/generation/resource-builders/component-builder.ts"],"names":[],"mappings":";;AA0CA,wDA8CC;AAxFD,yEAM0C;AAQ1C,SAAS,eAAe,CAAC,KAAa;IACpC,OAAO,KAAK;SACT,WAAW,EAAE;SACb,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;SACjB,O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S,CAAC,IAAI,CAAC;QAChE,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,OAAO,EAAE,SAAS,CAAC,WAAW;QAC9B,MAAM,EAAE,SAAS,CAAC,UAAU;QAC5B,WAAW;QACX,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,QAAQ;QACR,SAAS,EAAE,EAAE;QACb,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE;YACV,MAAM,EAAE,eAAe;SACxB;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ export type ExampleBuilderResult = {
2
+ generated: 0;
3
+ warnings: string[];
4
+ };
5
+ export declare function buildExamplesNotImplemented(): ExampleBuilderResult;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildExamplesNotImplemented = buildExamplesNotImplemented;
4
+ function buildExamplesNotImplemented() {
5
+ return {
6
+ generated: 0,
7
+ warnings: ["Example generation is intentionally not implemented in v1."]
8
+ };
9
+ }
10
+ //# sourceMappingURL=example-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example-builder.js","sourceRoot":"","sources":["../../../../src/implementation/generation/resource-builders/example-builder.ts"],"names":[],"mappings":";;AAKA,kEAKC;AALD,SAAgB,2BAA2B;IACzC,OAAO;QACL,SAAS,EAAE,CAAC;QACZ,QAAQ,EAAE,CAAC,4DAA4D,CAAC;KACzE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,80 @@
1
+ export type EvidenceConfidence = "high" | "medium" | "low";
2
+ export type FieldEvidence = {
3
+ sourceType: string;
4
+ sourceRef: string;
5
+ confidence: EvidenceConfidence;
6
+ note?: string;
7
+ };
8
+ export type GeneratedField<T> = {
9
+ value: T;
10
+ evidence: FieldEvidence[];
11
+ };
12
+ export type ExtractedProp = {
13
+ name: string;
14
+ type?: string;
15
+ required?: boolean;
16
+ };
17
+ export type ExtractedComponentFact = {
18
+ name: string;
19
+ filePath: string;
20
+ importName: string;
21
+ packageName: string;
22
+ props: Record<string, ExtractedProp>;
23
+ };
24
+ export type StorybookFacts = {
25
+ variantsByComponent: Record<string, string[]>;
26
+ storyFilesByComponent: Record<string, string[]>;
27
+ };
28
+ export type ReadmeFacts = {
29
+ descriptionsByComponent: Record<string, string>;
30
+ };
31
+ export type GeneratedComponentResource = {
32
+ type: "component";
33
+ id: string;
34
+ name: string;
35
+ package: string;
36
+ import: string;
37
+ description: string;
38
+ props: Record<string, ExtractedProp>;
39
+ variants: string[];
40
+ whenToUse: string[];
41
+ whenNotToUse: string[];
42
+ governance: {
43
+ fields: Record<string, {
44
+ evidence: FieldEvidence[];
45
+ }>;
46
+ };
47
+ };
48
+ export type GenerateOutput = {
49
+ components: GeneratedComponentResource[];
50
+ warnings: string[];
51
+ missingHumanMetadata: string[];
52
+ };
53
+ export type GenerateReport = {
54
+ outputDir: string;
55
+ generatedResources: number;
56
+ warnings: string[];
57
+ missingHumanMetadata: string[];
58
+ validate: {
59
+ valid: boolean;
60
+ errors: Array<{
61
+ code: string;
62
+ path: string;
63
+ message: string;
64
+ }>;
65
+ warnings: string[];
66
+ };
67
+ governance?: {
68
+ valid: boolean;
69
+ errors: Array<{
70
+ code: string;
71
+ path: string;
72
+ message: string;
73
+ }>;
74
+ warnings: Array<{
75
+ code: string;
76
+ path: string;
77
+ message: string;
78
+ }>;
79
+ };
80
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/implementation/generation/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import type { GenerateReport } from "../generation/types";
2
+ import type { MimirGenerator } from "./types";
3
+ type ApsGenerateOptions = {
4
+ force?: boolean;
5
+ };
6
+ export declare const apsGenerator: MimirGenerator<ApsGenerateOptions, GenerateReport>;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.apsGenerator = void 0;
4
+ const generate_service_1 = require("../generation/generate-service");
5
+ exports.apsGenerator = {
6
+ name: "aps",
7
+ async generate(cwd, options) {
8
+ return (0, generate_service_1.generateApsFromEvidence)(cwd, options ?? {});
9
+ }
10
+ };
11
+ //# sourceMappingURL=aps-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aps-generator.js","sourceRoot":"","sources":["../../../src/implementation/generators/aps-generator.ts"],"names":[],"mappings":";;;AAAA,qEAAyE;AAQ5D,QAAA,YAAY,GAAuD;IAC9E,IAAI,EAAE,KAAK;IACX,KAAK,CAAC,QAAQ,CAAC,GAAW,EAAE,OAA4B;QACtD,OAAO,IAAA,0CAAuB,EAAC,GAAG,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;IACrD,CAAC;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { MimirGenerator } from "./types";
2
+ export type { MimirGenerator } from "./types";
3
+ export declare function registerGenerator(generator: MimirGenerator, makeDefault?: boolean): void;
4
+ export declare function resolveGenerator(name?: string): MimirGenerator;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerGenerator = registerGenerator;
4
+ exports.resolveGenerator = resolveGenerator;
5
+ const aps_generator_1 = require("./aps-generator");
6
+ const registry_1 = require("./registry");
7
+ const generatorRegistry = new registry_1.GeneratorRegistry();
8
+ generatorRegistry.register(aps_generator_1.apsGenerator, true);
9
+ function registerGenerator(generator, makeDefault = false) {
10
+ generatorRegistry.register(generator, makeDefault);
11
+ }
12
+ function resolveGenerator(name) {
13
+ return generatorRegistry.resolve(name);
14
+ }
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/implementation/generators/index.ts"],"names":[],"mappings":";;AASA,8CAEC;AAED,4CAEC;AAfD,mDAA+C;AAC/C,yCAA+C;AAG/C,MAAM,iBAAiB,GAAG,IAAI,4BAAiB,EAAE,CAAC;AAClD,iBAAiB,CAAC,QAAQ,CAAC,4BAAY,EAAE,IAAI,CAAC,CAAC;AAI/C,SAAgB,iBAAiB,CAAC,SAAyB,EAAE,WAAW,GAAG,KAAK;IAC9E,iBAAiB,CAAC,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACrD,CAAC;AAED,SAAgB,gBAAgB,CAAC,IAAa;IAC5C,OAAO,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { MimirGenerator } from "./types";
2
+ export declare class GeneratorRegistry {
3
+ private readonly generatorsByName;
4
+ private defaultName?;
5
+ register(generator: MimirGenerator, makeDefault?: boolean): void;
6
+ resolve(name?: string): MimirGenerator;
7
+ private normalize;
8
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeneratorRegistry = void 0;
4
+ class GeneratorRegistry {
5
+ generatorsByName = new Map();
6
+ defaultName;
7
+ register(generator, makeDefault = false) {
8
+ const normalized = this.normalize(generator.name);
9
+ this.generatorsByName.set(normalized, generator);
10
+ if (!this.defaultName || makeDefault) {
11
+ this.defaultName = normalized;
12
+ }
13
+ }
14
+ resolve(name) {
15
+ const requested = typeof name === "string" && name.trim() !== "" ? this.normalize(name) : this.defaultName;
16
+ if (!requested) {
17
+ throw new Error("No generators registered.");
18
+ }
19
+ const generator = this.generatorsByName.get(requested);
20
+ if (!generator) {
21
+ throw new Error(`Unknown generator '${name}'.`);
22
+ }
23
+ return generator;
24
+ }
25
+ normalize(value) {
26
+ return value.trim().toLowerCase();
27
+ }
28
+ }
29
+ exports.GeneratorRegistry = GeneratorRegistry;
30
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/implementation/generators/registry.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IACX,gBAAgB,GAAG,IAAI,GAAG,EAA0B,CAAC;IAC9D,WAAW,CAAU;IAE7B,QAAQ,CAAC,SAAyB,EAAE,WAAW,GAAG,KAAK;QACrD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAEjD,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,WAAW,EAAE,CAAC;YACrC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAChC,CAAC;IACH,CAAC;IAED,OAAO,CAAC,IAAa;QACnB,MAAM,SAAS,GAAG,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;QAE3G,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACvD,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,IAAI,IAAI,CAAC,CAAC;QAClD,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,SAAS,CAAC,KAAa;QAC7B,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACpC,CAAC;CACF;AA/BD,8CA+BC"}
@@ -0,0 +1,4 @@
1
+ export interface MimirGenerator<TOptions = unknown, TResult = unknown> {
2
+ name: string;
3
+ generate(cwd: string, options?: TOptions): Promise<TResult>;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/implementation/generators/types.ts"],"names":[],"mappings":""}