@breadstone-tools/cem-plugins-expand-types 0.0.12-beta.1

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.
@@ -0,0 +1,16 @@
1
+ import { IPlugin } from '@breadstone-tools/cem-plugin';
2
+ export interface IOptions {
3
+ /** Determines the name of the property used in the manifest to store the expanded type */
4
+ propertyName?: string;
5
+ /** Hides logs produced by the plugin */
6
+ hideLogs?: boolean;
7
+ /** Prevents plugin from executing */
8
+ skip?: boolean;
9
+ }
10
+ /**
11
+ * CEM Analyzer plugin to expand types in component metadata
12
+ *
13
+ * @returns
14
+ */
15
+ export declare function expandTypesPlugin(options?: IOptions): IPlugin;
16
+ //# sourceMappingURL=ExpandTypesPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpandTypesPlugin.d.ts","sourceRoot":"","sources":["../src/ExpandTypesPlugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAA4C,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAMjG,MAAM,WAAW,QAAQ;IAErB,0FAA0F;IAC1F,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAUD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,QAA0C,GAAG,OAAO,CA2D9F"}
@@ -0,0 +1,194 @@
1
+ "use strict";
2
+ //#region Imports
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.expandTypesPlugin = expandTypesPlugin;
8
+ const utilities_1 = require("@breadstone-infrastructure/utilities");
9
+ const path_1 = __importDefault(require("path"));
10
+ const aliasTypes = {};
11
+ const groupedTypes = {};
12
+ const primitives = ['string', 'number', 'boolean', 'any', 'null', 'undefined', 'unknown', 'never', 'void', 'object', 'symbol', 'bigint', 'true', 'false'];
13
+ let currentFilename = '';
14
+ /**
15
+ * CEM Analyzer plugin to expand types in component metadata
16
+ *
17
+ * @returns
18
+ */
19
+ function expandTypesPlugin(options = { propertyName: 'parsedType', }) {
20
+ return {
21
+ name: 'EXPAND-TYPES-PLUGIN',
22
+ onAnalyze: (params) => {
23
+ // @ts-ignore
24
+ params.moduleDoc.path = params.moduleDoc.path.replace(`${process.cwd()}/`, "");
25
+ if (params.node.kind === params.ts.SyntaxKind.SourceFile) {
26
+ // @ts-ignore
27
+ currentFilename = path_1.default.resolve(params.node.fileName);
28
+ }
29
+ if (params.node.kind !== params.ts.SyntaxKind.ClassDeclaration) {
30
+ return;
31
+ }
32
+ // @ts-ignore
33
+ const className = params.node.name.getText();
34
+ const component = params.moduleDoc.declarations?.find((dec) => dec.name === className);
35
+ const typedMembers = [
36
+ // @ts-ignore
37
+ ...(component?.attributes || []),
38
+ // @ts-ignore
39
+ ...(component?.members || []),
40
+ // @ts-ignore
41
+ ...(component?.events || []),
42
+ ].filter((item) => item?.type);
43
+ const propName = options.propertyName || "parsedType";
44
+ // @ts-ignore
45
+ typedMembers.forEach(member => {
46
+ // @ts-ignore
47
+ const importedType = params.context.imports?.find((i) => i.name === member.type?.text);
48
+ if (!importedType) {
49
+ return getExpandedType(currentFilename, member.type.text);
50
+ }
51
+ const resolvedPath = getResolvedImportPath(currentFilename, importedType, params.ts, params.context.program, params.context.typeChecker);
52
+ const typeValue = getExpandedType(resolvedPath, importedType.name);
53
+ if (typeValue !== member.type.text) {
54
+ member[propName] = {
55
+ text: typeValue,
56
+ };
57
+ }
58
+ });
59
+ // logBlue(
60
+ // "[cem-expanded-types] - Custom Elements Manifest updated.",
61
+ // options.hideLogs
62
+ // );
63
+ },
64
+ onCollect: (params) => {
65
+ parseFileTypes(params.node, params.ts, params.context.typeChecker);
66
+ }
67
+ };
68
+ }
69
+ /**
70
+ * Expands the type name based on the provided file name
71
+ * @param fileName The current file name
72
+ * @param typeName The type name to expand
73
+ * @returns The expanded type name
74
+ */
75
+ const getExpandedType = (fileName, typeName) => {
76
+ if (typeName.includes('|')) {
77
+ return typeName
78
+ .split('|')
79
+ .map(part => part.trim())
80
+ .filter(part => part.length > 0)
81
+ .map(part => getExpandedType(fileName, part))
82
+ .join(' | ') || '';
83
+ }
84
+ if (typeName.startsWith('{') && typeName.endsWith('}')) {
85
+ const parts = [
86
+ ...new Set(typeName
87
+ .split(/[:{}]/)
88
+ .map(part => part.trim())
89
+ .filter(part => part.length > 0)),
90
+ ];
91
+ parts.forEach(part => {
92
+ // remove comments from object
93
+ const cleanPart = part.replace(/\/\*[\s\S]*?\*\/|(?<=[^:])\/\/.*|^\/\/.*/g, '');
94
+ typeName = typeName.replace(new RegExp(cleanPart, 'g'), getExpandedType(fileName, cleanPart));
95
+ });
96
+ return typeName;
97
+ }
98
+ if (primitives.includes(typeName) || typeof groupedTypes[typeName] === 'undefined') {
99
+ return typeName;
100
+ }
101
+ if (typeof groupedTypes[typeName][fileName] !== 'undefined') {
102
+ return groupedTypes[typeName][fileName];
103
+ }
104
+ if (Object.entries(groupedTypes[typeName]).length === 1) {
105
+ return Object.values(groupedTypes[typeName])[0];
106
+ }
107
+ return typeName;
108
+ };
109
+ function getResolvedImportPath(importPath, importedType, ts, program, typeChecker) {
110
+ let resolvedPath = path_1.default.resolve(path_1.default.dirname(currentFilename), importedType.importPath);
111
+ if (aliasTypes[resolvedPath]) {
112
+ return resolvedPath;
113
+ }
114
+ if (aliasTypes[`${resolvedPath}.ts`]) {
115
+ resolvedPath += ".ts";
116
+ }
117
+ else if (resolvedPath.endsWith(".js")) {
118
+ resolvedPath = resolvedPath.replace(".js", ".ts");
119
+ }
120
+ else if (resolvedPath.endsWith(".d.ts")) {
121
+ parseTypeDefinitionTypes(resolvedPath, ts, program, typeChecker);
122
+ resolvedPath = currentFilename;
123
+ }
124
+ else if (utilities_1.File.exists(`${resolvedPath}.d.ts`)) {
125
+ parseTypeDefinitionTypes(`${resolvedPath}.d.ts`, ts, program, typeChecker);
126
+ resolvedPath = currentFilename;
127
+ }
128
+ return resolvedPath;
129
+ }
130
+ function parseTypeDefinitionTypes(source, ts, program, typeChecker) {
131
+ if (!source) {
132
+ return;
133
+ }
134
+ const p = ts.createProgram([source], program.getCompilerOptions());
135
+ const sourceFile = p.getSourceFile(source);
136
+ ts.forEachChild(sourceFile, (node) => parseFileTypes(node, ts, typeChecker));
137
+ }
138
+ function parseFileTypes(node, ts, typeChecker) {
139
+ // @ts-ignore
140
+ if (node.fileName?.includes('node_modules')) {
141
+ return;
142
+ }
143
+ if (node.kind === ts.SyntaxKind.SourceFile) {
144
+ // @ts-ignore
145
+ currentFilename = path_1.default.resolve(node.fileName);
146
+ aliasTypes[currentFilename] = {};
147
+ }
148
+ else if (node.kind === ts.SyntaxKind.EnumDeclaration) {
149
+ // @ts-ignore
150
+ const name = params.node.name?.escapedText;
151
+ // @ts-ignore
152
+ const shortText = node.members?.map(mem => `'${mem.initializer?.text}'`).join(' | ') || '';
153
+ aliasTypes[currentFilename][name] = shortText;
154
+ }
155
+ else if (node.kind === ts.SyntaxKind.TypeAliasDeclaration) {
156
+ // @ts-ignore
157
+ if (node.type.kind === ts.SyntaxKind.UnionType) {
158
+ // @ts-ignore
159
+ const name = node.name?.escapedText;
160
+ // @ts-ignore
161
+ const unionTypes = node.type?.types?.map(type => {
162
+ let value = type?.literal?.text;
163
+ if (!value && type?.typeName?.escapedText) {
164
+ value = getExpandedType(currentFilename, type.typeName?.escapedText);
165
+ return value;
166
+ }
167
+ return typeof value === 'string' ? `'${value}'` : value;
168
+ })
169
+ .join(' | ') || '';
170
+ aliasTypes[currentFilename][name] = unionTypes;
171
+ // @ts-ignore
172
+ }
173
+ else if (node.type.kind === typeScript.SyntaxKind.TypeOperator || node.type.kind === typeScript.SyntaxKind.IndexedAccessType) {
174
+ // @ts-ignore
175
+ const name = node.name?.escapedText;
176
+ const resolvedTypes = typeChecker.getDeclaredTypeOfSymbol(
177
+ // @ts-ignore
178
+ typeChecker.getSymbolAtLocation(node.name));
179
+ // @ts-ignore
180
+ const unionTypes = resolvedTypes.types?.map(type => (typeof type.value === 'string' ? `'${type.value}'` : type.value))
181
+ .join(' | ') || '';
182
+ aliasTypes[currentFilename][name] = unionTypes;
183
+ }
184
+ }
185
+ for (const alias in aliasTypes) {
186
+ for (const type in aliasTypes[alias]) {
187
+ if (!groupedTypes[type]) {
188
+ groupedTypes[type] = {};
189
+ }
190
+ groupedTypes[type][alias] = aliasTypes[alias][type];
191
+ }
192
+ }
193
+ }
194
+ //# sourceMappingURL=ExpandTypesPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpandTypesPlugin.js","sourceRoot":"","sources":["../src/ExpandTypesPlugin.ts"],"names":[],"mappings":";AAAA,iBAAiB;;;;;AAkCjB,8CA2DC;AA3FD,oEAA4D;AAE5D,gDAAwB;AAmBxB,MAAM,UAAU,GAAgB,EAAE,CAAC;AACnC,MAAM,YAAY,GAAgB,EAAE,CAAC;AACrC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1J,IAAI,eAAe,GAAG,EAAE,CAAC;AAEzB;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,UAAoB,EAAE,YAAY,EAAE,YAAY,GAAG;IACjF,OAAO;QACH,IAAI,EAAE,qBAAqB;QAC3B,SAAS,EAAE,CAAC,MAA2B,EAAQ,EAAE;YAC7C,aAAa;YACb,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAA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AC,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACjH,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAEvB,UAAU,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;QACnD,CAAC;IACL,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE,CAAC;QAC7B,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;gBACtB,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;YAC5B,CAAC;YACD,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;QACxD,CAAC;IACL,CAAC;AACL,CAAC"}
package/Index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export type { IOptions } from './ExpandTypesPlugin.js';
2
+ export { expandTypesPlugin } from './ExpandTypesPlugin.js';
3
+ //# sourceMappingURL=Index.d.ts.map
package/Index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Index.d.ts","sourceRoot":"","sources":["../src/Index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
package/Index.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.expandTypesPlugin = void 0;
4
+ var ExpandTypesPlugin_js_1 = require("./ExpandTypesPlugin.js");
5
+ Object.defineProperty(exports, "expandTypesPlugin", { enumerable: true, get: function () { return ExpandTypesPlugin_js_1.expandTypesPlugin; } });
6
+ //# sourceMappingURL=Index.js.map
package/Index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Index.js","sourceRoot":"","sources":["../src/Index.ts"],"names":[],"mappings":";;;AACA,+DAA2D;AAAlD,yHAAA,iBAAiB,OAAA"}
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Breadstone
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@breadstone-tools/cem-plugins-expand-types",
3
+ "description": "Custom Elements Manifest Plugin to expand types",
4
+ "version": "0.0.12-beta.1",
5
+ "license": "MIT",
6
+ "author": "andre.wehlert <awehlert@breadstone.de> (https://www.breadstone.de)",
7
+ "repository": {
8
+ "url": "git+ssh://git@github.com/RueDeRennes/mosaik.git"
9
+ },
10
+ "type": "commonjs",
11
+ "main": "./Index.js",
12
+ "commonjs": "./Index.js",
13
+ "module": "./Index.js",
14
+ "types": "./Index.d.ts",
15
+ "dependencies": {
16
+ "@breadstone-infrastructure/utilities": "^0.0.12-beta.1",
17
+ "@breadstone-tools/cem-infrastructure": "^0.0.12-beta.1",
18
+ "@breadstone-tools/cem-plugin": "^0.0.12-beta.1",
19
+ "comment-parser": "^1.4.1",
20
+ "typescript": "^5.8.3"
21
+ }
22
+ }