@auto-engineer/component-parser 1.104.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 (60) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/LICENSE +10 -0
  3. package/dist/src/build-html-prop-set.d.ts +4 -0
  4. package/dist/src/build-html-prop-set.d.ts.map +1 -0
  5. package/dist/src/build-html-prop-set.js +19 -0
  6. package/dist/src/build-html-prop-set.js.map +1 -0
  7. package/dist/src/build-html-prop-set.specs.d.ts +2 -0
  8. package/dist/src/build-html-prop-set.specs.d.ts.map +1 -0
  9. package/dist/src/build-html-prop-set.specs.js +28 -0
  10. package/dist/src/build-html-prop-set.specs.js.map +1 -0
  11. package/dist/src/create-project.d.ts +4 -0
  12. package/dist/src/create-project.d.ts.map +1 -0
  13. package/dist/src/create-project.js +6 -0
  14. package/dist/src/create-project.js.map +1 -0
  15. package/dist/src/create-project.specs.d.ts +2 -0
  16. package/dist/src/create-project.specs.d.ts.map +1 -0
  17. package/dist/src/create-project.specs.js +21 -0
  18. package/dist/src/create-project.specs.js.map +1 -0
  19. package/dist/src/extract-defaults.d.ts +4 -0
  20. package/dist/src/extract-defaults.d.ts.map +1 -0
  21. package/dist/src/extract-defaults.js +20 -0
  22. package/dist/src/extract-defaults.js.map +1 -0
  23. package/dist/src/extract-defaults.specs.d.ts +2 -0
  24. package/dist/src/extract-defaults.specs.d.ts.map +1 -0
  25. package/dist/src/extract-defaults.specs.js +22 -0
  26. package/dist/src/extract-defaults.specs.js.map +1 -0
  27. package/dist/src/index.d.ts +9 -0
  28. package/dist/src/index.d.ts.map +1 -0
  29. package/dist/src/index.js +7 -0
  30. package/dist/src/index.js.map +1 -0
  31. package/dist/src/parse-component-file.d.ts +12 -0
  32. package/dist/src/parse-component-file.d.ts.map +1 -0
  33. package/dist/src/parse-component-file.js +34 -0
  34. package/dist/src/parse-component-file.js.map +1 -0
  35. package/dist/src/parse-component-file.specs.d.ts +2 -0
  36. package/dist/src/parse-component-file.specs.d.ts.map +1 -0
  37. package/dist/src/parse-component-file.specs.js +181 -0
  38. package/dist/src/parse-component-file.specs.js.map +1 -0
  39. package/dist/src/parse-manifest.d.ts +5 -0
  40. package/dist/src/parse-manifest.d.ts.map +1 -0
  41. package/dist/src/parse-manifest.js +16 -0
  42. package/dist/src/parse-manifest.js.map +1 -0
  43. package/dist/src/parse-manifest.specs.d.ts +2 -0
  44. package/dist/src/parse-manifest.specs.d.ts.map +1 -0
  45. package/dist/src/parse-manifest.specs.js +35 -0
  46. package/dist/src/parse-manifest.specs.js.map +1 -0
  47. package/dist/src/resolve-props.d.ts +12 -0
  48. package/dist/src/resolve-props.d.ts.map +1 -0
  49. package/dist/src/resolve-props.js +35 -0
  50. package/dist/src/resolve-props.js.map +1 -0
  51. package/dist/src/resolve-props.specs.d.ts +2 -0
  52. package/dist/src/resolve-props.specs.d.ts.map +1 -0
  53. package/dist/src/resolve-props.specs.js +46 -0
  54. package/dist/src/resolve-props.specs.js.map +1 -0
  55. package/dist/src/test-project.d.ts +4 -0
  56. package/dist/src/test-project.d.ts.map +1 -0
  57. package/dist/src/test-project.js +12 -0
  58. package/dist/src/test-project.js.map +1 -0
  59. package/dist/tsconfig.tsbuildinfo +1 -0
  60. package/package.json +35 -0
@@ -0,0 +1,35 @@
1
+ import { resolve } from 'node:path';
2
+ import { describe, expect, it } from 'vitest';
3
+ import { parseManifestComponents } from './parse-manifest.js';
4
+ import { getTestProject, STARTER_TSCONFIG } from './test-project.js';
5
+ const PROJECT_ROOT = resolve(STARTER_TSCONFIG, '..');
6
+ describe('parseManifestComponents', () => {
7
+ it('parses components from a list of relative paths', () => {
8
+ const project = getTestProject();
9
+ const paths = ['./Button.tsx'];
10
+ const result = parseManifestComponents(project, paths, PROJECT_ROOT);
11
+ const names = result.map((c) => c.name);
12
+ expect(names).toContain('Button');
13
+ });
14
+ it('deduplicates when the same path appears multiple times', () => {
15
+ const project = getTestProject();
16
+ const paths = ['./Button.tsx', './Button.tsx'];
17
+ const result = parseManifestComponents(project, paths, PROJECT_ROOT);
18
+ const buttonCount = result.filter((c) => c.name === 'Button').length;
19
+ expect(buttonCount).toBe(1);
20
+ });
21
+ it('parses multiple different component files', () => {
22
+ const project = getTestProject();
23
+ const paths = ['./Button.tsx', './Card.tsx'];
24
+ const result = parseManifestComponents(project, paths, PROJECT_ROOT);
25
+ const names = result.map((c) => c.name);
26
+ expect(names).toContain('Button');
27
+ expect(names).toContain('Card');
28
+ });
29
+ it('returns empty array for empty input', () => {
30
+ const project = getTestProject();
31
+ const result = parseManifestComponents(project, [], PROJECT_ROOT);
32
+ expect(result).toEqual([]);
33
+ });
34
+ });
35
+ //# sourceMappingURL=parse-manifest.specs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-manifest.specs.js","sourceRoot":"","sources":["../../src/parse-manifest.specs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElE,MAAM,YAAY,GAAG,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;AAErD,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,CAAC;QAE/B,MAAM,MAAM,GAAG,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;QAErE,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAA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AM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Type } from 'ts-morph';
2
+ type PropInfo = {
3
+ name: string;
4
+ type: string;
5
+ required: boolean;
6
+ defaultValue?: string;
7
+ description?: string;
8
+ };
9
+ declare function resolveCustomProps(type: Type, htmlProps: Set<string>, defaults: Map<string, string>): PropInfo[];
10
+ export { resolveCustomProps };
11
+ export type { PropInfo };
12
+ //# sourceMappingURL=resolve-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-props.d.ts","sourceRoot":"","sources":["../../src/resolve-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,iBAAS,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,QAAQ,EAAE,CAkCzG;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,35 @@
1
+ function resolveCustomProps(type, htmlProps, defaults) {
2
+ const props = [];
3
+ for (const prop of type.getProperties()) {
4
+ const name = prop.getName();
5
+ if (htmlProps.has(name))
6
+ continue;
7
+ const declarations = prop.getDeclarations();
8
+ const declaration = declarations[0];
9
+ const propType = declaration ? prop.getTypeAtLocation(declaration) : prop.getDeclaredType();
10
+ const isOptional = prop.isOptional();
11
+ const defaultValue = defaults.get(name);
12
+ const info = {
13
+ name,
14
+ type: propType.getText(),
15
+ required: !isOptional && defaultValue === undefined,
16
+ };
17
+ if (defaultValue !== undefined)
18
+ info.defaultValue = defaultValue;
19
+ const jsDocs = declarations
20
+ .flatMap((d) => {
21
+ if ('getJsDocs' in d && typeof d.getJsDocs === 'function') {
22
+ return d.getJsDocs();
23
+ }
24
+ return [];
25
+ })
26
+ .map((doc) => doc.getDescription().trim())
27
+ .filter(Boolean);
28
+ if (jsDocs.length > 0)
29
+ info.description = jsDocs[0];
30
+ props.push(info);
31
+ }
32
+ return props;
33
+ }
34
+ export { resolveCustomProps };
35
+ //# sourceMappingURL=resolve-props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-props.js","sourceRoot":"","sources":["../../src/resolve-props.ts"],"names":[],"mappings":"AAUA,SAAS,kBAAkB,CAAC,IAAU,EAAE,SAAsB,EAAE,QAA6B;IAC3F,MAAM,KAAK,GAAe,EAAE,CAAC;IAC7B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;QACxC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAI,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,SAAS;QAElC,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAC5C,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QACpC,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;QAE5F,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QACrC,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAExC,MAAM,IAAI,GAAa;YACrB,IAAI;YACJ,IAAI,EAAE,QAAQ,CAAC,OAAO,EAAE;YACxB,QAAQ,EAAE,CAAC,UAAU,IAAI,YAAY,KAAK,SAAS;SACpD,CAAC;QACF,IAAI,YAAY,KAAK,SAAS;YAAE,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QAEjE,MAAM,MAAM,GAAG,YAAY;aACxB,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACb,IAAI,WAAW,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,SAAS,KAAK,UAAU,EAAE,CAAC;gBAC1D,OAAO,CAAC,CAAC,SAAS,EAA6C,CAAC;YAClE,CAAC;YACD,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;aACD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,CAAC;aACzC,MAAM,CAAC,OAAO,CAAC,CAAC;QACnB,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAEpD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=resolve-props.specs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-props.specs.d.ts","sourceRoot":"","sources":["../../src/resolve-props.specs.ts"],"names":[],"mappings":""}
@@ -0,0 +1,46 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { buildHtmlPropSet } from './build-html-prop-set.js';
3
+ import { extractDefaults } from './extract-defaults.js';
4
+ import { resolveCustomProps } from './resolve-props.js';
5
+ import { getTestProject } from './test-project.js';
6
+ describe('resolveCustomProps', () => {
7
+ it('returns only non-HTML props with their types for Button', () => {
8
+ const project = getTestProject();
9
+ const htmlProps = buildHtmlPropSet(project);
10
+ const buttonFile = project.getSourceFiles().find((sf) => sf.getFilePath().endsWith('Button.tsx'));
11
+ const buttonFn = buttonFile.getFunction('Button');
12
+ const defaults = extractDefaults(buttonFn);
13
+ const paramType = buttonFn.getParameters()[0].getType();
14
+ const result = resolveCustomProps(paramType, htmlProps, defaults);
15
+ const names = result.map((p) => p.name);
16
+ expect(names).toContain('variant');
17
+ expect(names).toContain('size');
18
+ expect(names).toContain('asChild');
19
+ expect(names).not.toContain('className');
20
+ expect(names).not.toContain('onClick');
21
+ expect(names).not.toContain('children');
22
+ });
23
+ it('includes default values from destructuring', () => {
24
+ const project = getTestProject();
25
+ const htmlProps = buildHtmlPropSet(project);
26
+ const buttonFile = project.getSourceFiles().find((sf) => sf.getFilePath().endsWith('Button.tsx'));
27
+ const buttonFn = buttonFile.getFunction('Button');
28
+ const defaults = extractDefaults(buttonFn);
29
+ const paramType = buttonFn.getParameters()[0].getType();
30
+ const result = resolveCustomProps(paramType, htmlProps, defaults);
31
+ const variantProp = result.find((p) => p.name === 'variant');
32
+ expect(variantProp.defaultValue).toBe("'default'");
33
+ expect(variantProp.required).toBe(false);
34
+ });
35
+ it('returns empty array when component has no custom props', () => {
36
+ const project = getTestProject();
37
+ const htmlProps = buildHtmlPropSet(project);
38
+ const cardFile = project.getSourceFiles().find((sf) => sf.getFilePath().endsWith('Card.tsx'));
39
+ const cardFn = cardFile.getFunction('Card');
40
+ const defaults = extractDefaults(cardFn);
41
+ const paramType = cardFn.getParameters()[0].getType();
42
+ const result = resolveCustomProps(paramType, htmlProps, defaults);
43
+ expect(result).toEqual([]);
44
+ });
45
+ });
46
+ //# sourceMappingURL=resolve-props.specs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-props.specs.js","sourceRoot":"","sources":["../../src/resolve-props.specs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EA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E,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAE,CAAC;QAC/F,MAAM,MAAM,GAAG,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAE,CAAC;QAC7C,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QAEzC,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAE,CAAC,OAAO,EAAE,CAAC;QACvD,MAAM,MAAM,GAAG,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;QAElE,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ declare const STARTER_TSCONFIG: string;
2
+ declare function getTestProject(): import("ts-morph").Project;
3
+ export { STARTER_TSCONFIG, getTestProject };
4
+ //# sourceMappingURL=test-project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-project.d.ts","sourceRoot":"","sources":["../../src/test-project.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,gBAAgB,QAA6D,CAAC;AAIpF,iBAAS,cAAc,+BAKtB;AAED,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { resolve } from 'node:path';
2
+ import { createProject } from './create-project.js';
3
+ const STARTER_TSCONFIG = resolve(import.meta.dirname, '__fixtures__/tsconfig.json');
4
+ let cachedProject;
5
+ function getTestProject() {
6
+ if (!cachedProject) {
7
+ cachedProject = createProject(STARTER_TSCONFIG);
8
+ }
9
+ return cachedProject;
10
+ }
11
+ export { STARTER_TSCONFIG, getTestProject };
12
+ //# sourceMappingURL=test-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-project.js","sourceRoot":"","sources":["../../src/test-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,4BAA4B,CAAC,CAAC;AAEpF,IAAI,aAA2D,CAAC;AAEhE,SAAS,cAAc;IACrB,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,aAAa,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC"}