@breadstone-tools/cem-core 0.0.12-beta.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/Ast/Ast.d.ts +224 -0
- package/Ast/Ast.d.ts.map +1 -0
- package/Ast/Ast.js +557 -0
- package/Ast/Ast.js.map +1 -0
- package/Ast/Builder/BuildArrowFunction.d.ts +14 -0
- package/Ast/Builder/BuildArrowFunction.d.ts.map +1 -0
- package/Ast/Builder/BuildArrowFunction.js +29 -0
- package/Ast/Builder/BuildArrowFunction.js.map +1 -0
- package/Ast/Builder/BuildAttribute.d.ts +16 -0
- package/Ast/Builder/BuildAttribute.d.ts.map +1 -0
- package/Ast/Builder/BuildAttribute.js +36 -0
- package/Ast/Builder/BuildAttribute.js.map +1 -0
- package/Ast/Builder/BuildClass.d.ts +24 -0
- package/Ast/Builder/BuildClass.d.ts.map +1 -0
- package/Ast/Builder/BuildClass.js +251 -0
- package/Ast/Builder/BuildClass.js.map +1 -0
- package/Ast/Builder/BuildClassField.d.ts +14 -0
- package/Ast/Builder/BuildClassField.d.ts.map +1 -0
- package/Ast/Builder/BuildClassField.js +34 -0
- package/Ast/Builder/BuildClassField.js.map +1 -0
- package/Ast/Builder/BuildFunctionLike.d.ts +41 -0
- package/Ast/Builder/BuildFunctionLike.d.ts.map +1 -0
- package/Ast/Builder/BuildFunctionLike.js +80 -0
- package/Ast/Builder/BuildFunctionLike.js.map +1 -0
- package/Ast/Builder/BuildMixin.d.ts +19 -0
- package/Ast/Builder/BuildMixin.d.ts.map +1 -0
- package/Ast/Builder/BuildMixin.js +50 -0
- package/Ast/Builder/BuildMixin.js.map +1 -0
- package/Ast/Builder/BuildVariable.d.ts +15 -0
- package/Ast/Builder/BuildVariable.d.ts.map +1 -0
- package/Ast/Builder/BuildVariable.js +29 -0
- package/Ast/Builder/BuildVariable.js.map +1 -0
- package/Ast/Handler/HandleAttrJsDoc.d.ts +10 -0
- package/Ast/Handler/HandleAttrJsDoc.d.ts.map +1 -0
- package/Ast/Handler/HandleAttrJsDoc.js +43 -0
- package/Ast/Handler/HandleAttrJsDoc.js.map +1 -0
- package/Ast/Handler/HandleCollectMixins.d.ts +10 -0
- package/Ast/Handler/HandleCollectMixins.d.ts.map +1 -0
- package/Ast/Handler/HandleCollectMixins.js +27 -0
- package/Ast/Handler/HandleCollectMixins.js.map +1 -0
- package/Ast/Handler/HandleCreateClassDeclarationMixin.d.ts +9 -0
- package/Ast/Handler/HandleCreateClassDeclarationMixin.d.ts.map +1 -0
- package/Ast/Handler/HandleCreateClassDeclarationMixin.js +38 -0
- package/Ast/Handler/HandleCreateClassDeclarationMixin.js.map +1 -0
- package/Ast/Handler/HandleCustomJsDocTags.d.ts +8 -0
- package/Ast/Handler/HandleCustomJsDocTags.d.ts.map +1 -0
- package/Ast/Handler/HandleCustomJsDocTags.js +31 -0
- package/Ast/Handler/HandleCustomJsDocTags.js.map +1 -0
- package/Ast/Handler/HandleDefaultValue.d.ts +10 -0
- package/Ast/Handler/HandleDefaultValue.d.ts.map +1 -0
- package/Ast/Handler/HandleDefaultValue.js +48 -0
- package/Ast/Handler/HandleDefaultValue.js.map +1 -0
- package/Ast/Handler/HandleExplicitType.d.ts +10 -0
- package/Ast/Handler/HandleExplicitType.d.ts.map +1 -0
- package/Ast/Handler/HandleExplicitType.js +28 -0
- package/Ast/Handler/HandleExplicitType.js.map +1 -0
- package/Ast/Handler/HandleHeritage.d.ts +11 -0
- package/Ast/Handler/HandleHeritage.d.ts.map +1 -0
- package/Ast/Handler/HandleHeritage.js +67 -0
- package/Ast/Handler/HandleHeritage.js.map +1 -0
- package/Ast/Handler/HandleJsDoc.d.ts +9 -0
- package/Ast/Handler/HandleJsDoc.d.ts.map +1 -0
- package/Ast/Handler/HandleJsDoc.js +90 -0
- package/Ast/Handler/HandleJsDoc.js.map +1 -0
- package/Ast/Handler/HandleJsDocParameterTag.d.ts +8 -0
- package/Ast/Handler/HandleJsDocParameterTag.d.ts.map +1 -0
- package/Ast/Handler/HandleJsDocParameterTag.js +59 -0
- package/Ast/Handler/HandleJsDocParameterTag.js.map +1 -0
- package/Ast/Handler/HandleModifiers.d.ts +13 -0
- package/Ast/Handler/HandleModifiers.d.ts.map +1 -0
- package/Ast/Handler/HandleModifiers.js +49 -0
- package/Ast/Handler/HandleModifiers.js.map +1 -0
- package/Ast/Handler/HandlePrivateMember.d.ts +10 -0
- package/Ast/Handler/HandlePrivateMember.d.ts.map +1 -0
- package/Ast/Handler/HandlePrivateMember.js +25 -0
- package/Ast/Handler/HandlePrivateMember.js.map +1 -0
- package/Ast/Handler/HandleTypeInference.d.ts +9 -0
- package/Ast/Handler/HandleTypeInference.d.ts.map +1 -0
- package/Ast/Handler/HandleTypeInference.js +46 -0
- package/Ast/Handler/HandleTypeInference.js.map +1 -0
- package/Ast/Handler/HandleWellKnownTypes.d.ts +11 -0
- package/Ast/Handler/HandleWellKnownTypes.d.ts.map +1 -0
- package/Ast/Handler/HandleWellKnownTypes.js +28 -0
- package/Ast/Handler/HandleWellKnownTypes.js.map +1 -0
- package/Ast/Manifest.d.ts +47 -0
- package/Ast/Manifest.d.ts.map +1 -0
- package/Ast/Manifest.js +209 -0
- package/Ast/Manifest.js.map +1 -0
- package/Index.d.ts +9 -0
- package/Index.d.ts.map +1 -0
- package/Index.js +8 -0
- package/Index.js.map +1 -0
- package/LICENSE +21 -0
- package/Plugins/Analyse/ArrowFunctionPlugin.d.ts +13 -0
- package/Plugins/Analyse/ArrowFunctionPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/ArrowFunctionPlugin.js +37 -0
- package/Plugins/Analyse/ArrowFunctionPlugin.js.map +1 -0
- package/Plugins/Analyse/ClassJsDocPlugin.d.ts +25 -0
- package/Plugins/Analyse/ClassJsDocPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/ClassJsDocPlugin.js +200 -0
- package/Plugins/Analyse/ClassJsDocPlugin.js.map +1 -0
- package/Plugins/Analyse/ClassPlugin.d.ts +13 -0
- package/Plugins/Analyse/ClassPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/ClassPlugin.js +32 -0
- package/Plugins/Analyse/ClassPlugin.js.map +1 -0
- package/Plugins/Analyse/CustomElementsDefineCallsPlugin.d.ts +15 -0
- package/Plugins/Analyse/CustomElementsDefineCallsPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/CustomElementsDefineCallsPlugin.js +112 -0
- package/Plugins/Analyse/CustomElementsDefineCallsPlugin.js.map +1 -0
- package/Plugins/Analyse/ExportsPlugin.d.ts +18 -0
- package/Plugins/Analyse/ExportsPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/ExportsPlugin.js +154 -0
- package/Plugins/Analyse/ExportsPlugin.js.map +1 -0
- package/Plugins/Analyse/FunctionLikePlugin.d.ts +14 -0
- package/Plugins/Analyse/FunctionLikePlugin.d.ts.map +1 -0
- package/Plugins/Analyse/FunctionLikePlugin.js +36 -0
- package/Plugins/Analyse/FunctionLikePlugin.js.map +1 -0
- package/Plugins/Analyse/MixinPlugin.d.ts +13 -0
- package/Plugins/Analyse/MixinPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/MixinPlugin.js +36 -0
- package/Plugins/Analyse/MixinPlugin.js.map +1 -0
- package/Plugins/Analyse/ReexportedWrappedMixinExportsPlugin.d.ts +15 -0
- package/Plugins/Analyse/ReexportedWrappedMixinExportsPlugin.d.ts.map +1 -0
- package/Plugins/Analyse/ReexportedWrappedMixinExportsPlugin.js +56 -0
- package/Plugins/Analyse/ReexportedWrappedMixinExportsPlugin.js.map +1 -0
- package/Plugins/Analyse/VariablePlugin.d.ts +13 -0
- package/Plugins/Analyse/VariablePlugin.d.ts.map +1 -0
- package/Plugins/Analyse/VariablePlugin.js +40 -0
- package/Plugins/Analyse/VariablePlugin.js.map +1 -0
- package/Plugins/Collect/CollectImportsPlugin.d.ts +6 -0
- package/Plugins/Collect/CollectImportsPlugin.d.ts.map +1 -0
- package/Plugins/Collect/CollectImportsPlugin.js +100 -0
- package/Plugins/Collect/CollectImportsPlugin.js.map +1 -0
- package/Plugins/Framework/Catalyst/Catalyst.d.ts +3 -0
- package/Plugins/Framework/Catalyst/Catalyst.d.ts.map +1 -0
- package/Plugins/Framework/Catalyst/Catalyst.js +9 -0
- package/Plugins/Framework/Catalyst/Catalyst.js.map +1 -0
- package/Plugins/Framework/Fast/Fast.d.ts +3 -0
- package/Plugins/Framework/Fast/Fast.d.ts.map +1 -0
- package/Plugins/Framework/Fast/Fast.js +9 -0
- package/Plugins/Framework/Fast/Fast.js.map +1 -0
- package/Plugins/Framework/Lit/Lit.d.ts +8 -0
- package/Plugins/Framework/Lit/Lit.d.ts.map +1 -0
- package/Plugins/Framework/Lit/Lit.js +25 -0
- package/Plugins/Framework/Lit/Lit.js.map +1 -0
- package/Plugins/Framework/Lit/MemberDenyListPlugin.d.ts +16 -0
- package/Plugins/Framework/Lit/MemberDenyListPlugin.d.ts.map +1 -0
- package/Plugins/Framework/Lit/MemberDenyListPlugin.js +37 -0
- package/Plugins/Framework/Lit/MemberDenyListPlugin.js.map +1 -0
- package/Plugins/Framework/Lit/MethodDenyListPlugin.d.ts +24 -0
- package/Plugins/Framework/Lit/MethodDenyListPlugin.d.ts.map +1 -0
- package/Plugins/Framework/Lit/MethodDenyListPlugin.js +51 -0
- package/Plugins/Framework/Lit/MethodDenyListPlugin.js.map +1 -0
- package/Plugins/Framework/Lit/PropertyDecoratorPlugin.d.ts +16 -0
- package/Plugins/Framework/Lit/PropertyDecoratorPlugin.d.ts.map +1 -0
- package/Plugins/Framework/Lit/PropertyDecoratorPlugin.js +100 -0
- package/Plugins/Framework/Lit/PropertyDecoratorPlugin.js.map +1 -0
- package/Plugins/Framework/Lit/StaticPropertiesPlugin.d.ts +17 -0
- package/Plugins/Framework/Lit/StaticPropertiesPlugin.d.ts.map +1 -0
- package/Plugins/Framework/Lit/StaticPropertiesPlugin.js +126 -0
- package/Plugins/Framework/Lit/StaticPropertiesPlugin.js.map +1 -0
- package/Plugins/Framework/Lwc/Lwc.d.ts +3 -0
- package/Plugins/Framework/Lwc/Lwc.d.ts.map +1 -0
- package/Plugins/Framework/Lwc/Lwc.js +9 -0
- package/Plugins/Framework/Lwc/Lwc.js.map +1 -0
- package/Plugins/Framework/Shared/AttrDecoratorPlugin.d.ts +18 -0
- package/Plugins/Framework/Shared/AttrDecoratorPlugin.d.ts.map +1 -0
- package/Plugins/Framework/Shared/AttrDecoratorPlugin.js +80 -0
- package/Plugins/Framework/Shared/AttrDecoratorPlugin.js.map +1 -0
- package/Plugins/Framework/Shared/CustomElementDecoratorPlugin.d.ts +14 -0
- package/Plugins/Framework/Shared/CustomElementDecoratorPlugin.d.ts.map +1 -0
- package/Plugins/Framework/Shared/CustomElementDecoratorPlugin.js +67 -0
- package/Plugins/Framework/Shared/CustomElementDecoratorPlugin.js.map +1 -0
- package/Plugins/Framework/Stencil/Stencil.d.ts +3 -0
- package/Plugins/Framework/Stencil/Stencil.d.ts.map +1 -0
- package/Plugins/Framework/Stencil/Stencil.js +9 -0
- package/Plugins/Framework/Stencil/Stencil.js.map +1 -0
- package/Plugins/Link/CleanupClassesPlugin.d.ts +6 -0
- package/Plugins/Link/CleanupClassesPlugin.d.ts.map +1 -0
- package/Plugins/Link/CleanupClassesPlugin.js +24 -0
- package/Plugins/Link/CleanupClassesPlugin.js.map +1 -0
- package/Plugins/Link/FieldDenyListPlugin.d.ts +6 -0
- package/Plugins/Link/FieldDenyListPlugin.d.ts.map +1 -0
- package/Plugins/Link/FieldDenyListPlugin.js +23 -0
- package/Plugins/Link/FieldDenyListPlugin.js.map +1 -0
- package/Plugins/Link/MethodDenyListPlugin.d.ts +6 -0
- package/Plugins/Link/MethodDenyListPlugin.d.ts.map +1 -0
- package/Plugins/Link/MethodDenyListPlugin.js +26 -0
- package/Plugins/Link/MethodDenyListPlugin.js.map +1 -0
- package/Plugins/PostProcessing/ApplyInheritancePlugin.d.ts +6 -0
- package/Plugins/PostProcessing/ApplyInheritancePlugin.d.ts.map +1 -0
- package/Plugins/PostProcessing/ApplyInheritancePlugin.js +87 -0
- package/Plugins/PostProcessing/ApplyInheritancePlugin.js.map +1 -0
- package/Plugins/PostProcessing/IsCustomElementPlugin.d.ts +6 -0
- package/Plugins/PostProcessing/IsCustomElementPlugin.d.ts.map +1 -0
- package/Plugins/PostProcessing/IsCustomElementPlugin.js +35 -0
- package/Plugins/PostProcessing/IsCustomElementPlugin.js.map +1 -0
- package/Plugins/PostProcessing/LinkClassToTagnamePlugin.d.ts +6 -0
- package/Plugins/PostProcessing/LinkClassToTagnamePlugin.d.ts.map +1 -0
- package/Plugins/PostProcessing/LinkClassToTagnamePlugin.js +28 -0
- package/Plugins/PostProcessing/LinkClassToTagnamePlugin.js.map +1 -0
- package/Plugins/PostProcessing/RemoveUnexportedDeclarationsPlugin.d.ts +6 -0
- package/Plugins/PostProcessing/RemoveUnexportedDeclarationsPlugin.d.ts.map +1 -0
- package/Plugins/PostProcessing/RemoveUnexportedDeclarationsPlugin.js +21 -0
- package/Plugins/PostProcessing/RemoveUnexportedDeclarationsPlugin.js.map +1 -0
- package/Plugins/PostProcessing/ResolveInitializersPlugin.d.ts +6 -0
- package/Plugins/PostProcessing/ResolveInitializersPlugin.d.ts.map +1 -0
- package/Plugins/PostProcessing/ResolveInitializersPlugin.js +59 -0
- package/Plugins/PostProcessing/ResolveInitializersPlugin.js.map +1 -0
- package/Services/DependencyService.d.ts +1 -0
- package/Services/DependencyService.d.ts.map +1 -0
- package/Services/DependencyService.js +112 -0
- package/Services/DependencyService.js.map +1 -0
- package/Services/Interfaces/IDependencyService.d.ts +12 -0
- package/Services/Interfaces/IDependencyService.d.ts.map +1 -0
- package/Services/Interfaces/IDependencyService.js +4 -0
- package/Services/Interfaces/IDependencyService.js.map +1 -0
- package/Services/Interfaces/IManifestBuilder.d.ts +16 -0
- package/Services/Interfaces/IManifestBuilder.d.ts.map +1 -0
- package/Services/Interfaces/IManifestBuilder.js +4 -0
- package/Services/Interfaces/IManifestBuilder.js.map +1 -0
- package/Services/Interfaces/IManifestEngine.d.ts +16 -0
- package/Services/Interfaces/IManifestEngine.d.ts.map +1 -0
- package/Services/Interfaces/IManifestEngine.js +4 -0
- package/Services/Interfaces/IManifestEngine.js.map +1 -0
- package/Services/ManifestBuilder.d.ts +47 -0
- package/Services/ManifestBuilder.d.ts.map +1 -0
- package/Services/ManifestBuilder.js +49 -0
- package/Services/ManifestBuilder.js.map +1 -0
- package/Services/ManifestEngine.d.ts +62 -0
- package/Services/ManifestEngine.d.ts.map +1 -0
- package/Services/ManifestEngine.js +283 -0
- package/Services/ManifestEngine.js.map +1 -0
- package/Types/Framework.d.ts +2 -0
- package/Types/Framework.d.ts.map +1 -0
- package/Types/Framework.js +3 -0
- package/Types/Framework.js.map +1 -0
- package/Types.d.ts +1 -0
- package/Types.d.ts.map +1 -0
- package/Types.js +45 -0
- package/Types.js.map +1 -0
- package/Utils.d.ts +50 -0
- package/Utils.d.ts.map +1 -0
- package/Utils.js +147 -0
- package/Utils.js.map +1 -0
- package/package.json +23 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//#region Imports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.handleJsDocParameterTag = handleJsDocParameterTag;
|
|
5
|
+
//#endregion
|
|
6
|
+
/**
|
|
7
|
+
* Handles JsDoc parameter tags.
|
|
8
|
+
* @param doc - The documentation object to update.
|
|
9
|
+
* @param tag - The JsDoc parameter tag to handle.
|
|
10
|
+
*/
|
|
11
|
+
function handleJsDocParameterTag(doc, tag) {
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
const parameter = doc?.parameters?.find((parameter) => parameter.name === tag.name.text);
|
|
15
|
+
const isExistingParameter = !!parameter;
|
|
16
|
+
const parameterTemplate = parameter || {};
|
|
17
|
+
if (tag.comment) {
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
parameterTemplate.description = normalizeDescription(tag.comment);
|
|
21
|
+
}
|
|
22
|
+
if (tag.name) {
|
|
23
|
+
parameterTemplate.name = tag.name.getText();
|
|
24
|
+
}
|
|
25
|
+
if (tag.isBracketed) {
|
|
26
|
+
parameterTemplate.optional = true;
|
|
27
|
+
}
|
|
28
|
+
if (tag.typeExpression) {
|
|
29
|
+
parameterTemplate.type = {
|
|
30
|
+
text: handleJsDocType(tag.typeExpression.type.getText())
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
if (!isExistingParameter) {
|
|
34
|
+
doc.parameters = [...(doc?.parameters || []), parameterTemplate];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Handles the JSDoc type by removing import statements.
|
|
39
|
+
* @param type - The JSDoc type string.
|
|
40
|
+
* @returns The cleaned type string.
|
|
41
|
+
*/
|
|
42
|
+
function handleJsDocType(type) {
|
|
43
|
+
return type.replace(/(import\(.+?\).)/g, '') || '';
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Normalizes a JSDoc description.
|
|
47
|
+
* @param desc - The description to normalize.
|
|
48
|
+
* @returns The normalized description.
|
|
49
|
+
*/
|
|
50
|
+
function normalizeDescription(desc) {
|
|
51
|
+
if (Array.isArray(desc)) {
|
|
52
|
+
desc = desc.reduce((prev, curr) => prev += (curr).getText(), '');
|
|
53
|
+
}
|
|
54
|
+
if (typeof desc === 'string' && desc.startsWith('- ')) {
|
|
55
|
+
desc = desc.slice(2);
|
|
56
|
+
}
|
|
57
|
+
return desc;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=HandleJsDocParameterTag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HandleJsDocParameterTag.js","sourceRoot":"","sources":["../../../src/Ast/Handler/HandleJsDocParameterTag.ts"],"names":[],"mappings":";AAAA,iBAAiB;;AAWjB,0DA8BC;AArCD,YAAY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IG;AACH,SAAS,oBAAoB,CAAC,IAA6B;IACvD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACpD,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
/**
|
|
3
|
+
* Handles modifiers for a given node.
|
|
4
|
+
* @param doc - The documentation object to update.
|
|
5
|
+
* @param node - The node to check for modifiers.
|
|
6
|
+
* @returns The updated documentation object.
|
|
7
|
+
* @example static foo;
|
|
8
|
+
* @example public foo;
|
|
9
|
+
* @example private foo;
|
|
10
|
+
* @example protected foo;
|
|
11
|
+
*/
|
|
12
|
+
export declare function handleModifiers(doc: any, node: ts.Node): any;
|
|
13
|
+
//# sourceMappingURL=HandleModifiers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HandleModifiers.d.ts","sourceRoot":"","sources":["../../../src/Ast/Handler/HandleModifiers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,YAAY,CAAC;AAI5B;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,GAAG,CAgC5D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.handleModifiers = handleModifiers;
|
|
8
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
9
|
+
//#endregion
|
|
10
|
+
/**
|
|
11
|
+
* Handles modifiers for a given node.
|
|
12
|
+
* @param doc - The documentation object to update.
|
|
13
|
+
* @param node - The node to check for modifiers.
|
|
14
|
+
* @returns The updated documentation object.
|
|
15
|
+
* @example static foo;
|
|
16
|
+
* @example public foo;
|
|
17
|
+
* @example private foo;
|
|
18
|
+
* @example protected foo;
|
|
19
|
+
*/
|
|
20
|
+
function handleModifiers(doc, node) {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
node.modifiers?.forEach(modifier => {
|
|
24
|
+
if (modifier?.kind === typescript_1.default.SyntaxKind.StaticKeyword) {
|
|
25
|
+
doc.static = true;
|
|
26
|
+
}
|
|
27
|
+
if (modifier?.kind === typescript_1.default.SyntaxKind.ReadonlyKeyword) {
|
|
28
|
+
doc.readonly = true;
|
|
29
|
+
}
|
|
30
|
+
switch (modifier.kind) {
|
|
31
|
+
case typescript_1.default.SyntaxKind.PublicKeyword:
|
|
32
|
+
doc.privacy = 'public';
|
|
33
|
+
break;
|
|
34
|
+
case typescript_1.default.SyntaxKind.PrivateKeyword:
|
|
35
|
+
doc.privacy = 'private';
|
|
36
|
+
break;
|
|
37
|
+
case typescript_1.default.SyntaxKind.ProtectedKeyword:
|
|
38
|
+
doc.privacy = 'protected';
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
if (node.name?.getText().startsWith('#')) {
|
|
45
|
+
doc.privacy = 'private';
|
|
46
|
+
}
|
|
47
|
+
return doc;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=HandleModifiers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HandleModifiers.js","sourceRoot":"","sources":["../../../src/Ast/Handler/HandleModifiers.ts"],"names":[],"mappings":";AAAA,iBAAiB;;;;;AAgBjB,0CAgCC;AA9CD,4DAA4B;AAE5B,YAAY;AAEZ;;;;;;;;;GASG;AACH,SAAgB,eAAe,CAAC,GAAQ,EAAE,IAAa;IACnD,6DAA6D;IAC7D,aAAa;IACb,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE;QAC/B,IAAI,QAAQ,EAAE,IAAI,KAAK,oBAAE,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;YACjD,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC;QACtB,CAAC;QAED,IAAI,QAAQ,EAAE,IAAI,KAAK,oBAAE,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;YACnD,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC;QACxB,CAAC;QAED,QAAQ,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,KAAK,oBAAE,CAAC,UAAU,CAAC,aAAa;gBAC5B,GAAG,CAAC,OAAO,GAAG,QAAQ,CAAC;gBACvB,MAAM;YACV,KAAK,oBAAE,CAAC,UAAU,CAAC,cAAc;gBAC7B,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC;gBACxB,MAAM;YACV,KAAK,oBAAE,CAAC,UAAU,CAAC,gBAAgB;gBAC/B,GAAG,CAAC,OAAO,GAAG,WAAW,CAAC;gBAC1B,MAAM;QACd,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,6DAA6D;IAC7D,aAAa;IACb,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC;IAC5B,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
/**
|
|
3
|
+
* Handles private members.
|
|
4
|
+
* @param doc - The documentation object to update.
|
|
5
|
+
* @param node - The node to check for private member.
|
|
6
|
+
* @returns The updated documentation object.
|
|
7
|
+
* @example class Foo { #bar = ''; }
|
|
8
|
+
*/
|
|
9
|
+
export declare function handlePrivateMember(doc: any, node: ts.Node): any;
|
|
10
|
+
//# sourceMappingURL=HandlePrivateMember.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HandlePrivateMember.d.ts","sourceRoot":"","sources":["../../../src/Ast/Handler/HandlePrivateMember.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,YAAY,CAAC;AAI5B;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,GAAG,CAOhE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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.handlePrivateMember = handlePrivateMember;
|
|
8
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
9
|
+
//#endregion
|
|
10
|
+
/**
|
|
11
|
+
* Handles private members.
|
|
12
|
+
* @param doc - The documentation object to update.
|
|
13
|
+
* @param node - The node to check for private member.
|
|
14
|
+
* @returns The updated documentation object.
|
|
15
|
+
* @example class Foo { #bar = ''; }
|
|
16
|
+
*/
|
|
17
|
+
function handlePrivateMember(doc, node) {
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
if (typescript_1.default.isPrivateIdentifier(node.name)) {
|
|
21
|
+
doc.privacy = 'private';
|
|
22
|
+
}
|
|
23
|
+
return doc;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=HandlePrivateMember.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HandlePrivateMember.js","sourceRoot":"","sources":["../../../src/Ast/Handler/HandlePrivateMember.ts"],"names":[],"mappings":";AAAA,iBAAiB;;;;;AAajB,kDAOC;AAlBD,4DAA4B;AAE5B,YAAY;AAEZ;;;;;;GAMG;AACH,SAAgB,mBAAmB,CAAC,GAAQ,EAAE,IAAa;IACvD,6DAA6D;IAC7D,aAAa;IACb,IAAI,oBAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC;IAC5B,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
/**
|
|
3
|
+
* Handles type inference for a given node.
|
|
4
|
+
* @param doc - The documentation object to update.
|
|
5
|
+
* @param node - The node to infer the type from.
|
|
6
|
+
* @returns The updated documentation object.
|
|
7
|
+
*/
|
|
8
|
+
export declare function handleTypeInference(doc: any, node: ts.Node): any;
|
|
9
|
+
//# sourceMappingURL=HandleTypeInference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HandleTypeInference.d.ts","sourceRoot":"","sources":["../../../src/Ast/Handler/HandleTypeInference.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,YAAY,CAAC;AAI5B;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,GAAG,CA8BhE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
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.handleTypeInference = handleTypeInference;
|
|
8
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
9
|
+
//#endregion
|
|
10
|
+
/**
|
|
11
|
+
* Handles type inference for a given node.
|
|
12
|
+
* @param doc - The documentation object to update.
|
|
13
|
+
* @param node - The node to infer the type from.
|
|
14
|
+
* @returns The updated documentation object.
|
|
15
|
+
*/
|
|
16
|
+
function handleTypeInference(doc, node) {
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
const n = node.initializer || node;
|
|
20
|
+
switch (n?.kind) {
|
|
21
|
+
case typescript_1.default.SyntaxKind.TrueKeyword:
|
|
22
|
+
case typescript_1.default.SyntaxKind.FalseKeyword:
|
|
23
|
+
doc.type = { text: 'boolean' };
|
|
24
|
+
break;
|
|
25
|
+
case typescript_1.default.SyntaxKind.StringLiteral:
|
|
26
|
+
doc.type = { text: 'string' };
|
|
27
|
+
break;
|
|
28
|
+
case typescript_1.default.SyntaxKind.PrefixUnaryExpression:
|
|
29
|
+
doc.type = n?.operator === typescript_1.default.SyntaxKind.ExclamationToken ? { text: 'boolean' } : { text: 'number' };
|
|
30
|
+
break;
|
|
31
|
+
case typescript_1.default.SyntaxKind.NumericLiteral:
|
|
32
|
+
doc.type = { text: 'number' };
|
|
33
|
+
break;
|
|
34
|
+
case typescript_1.default.SyntaxKind.NullKeyword:
|
|
35
|
+
doc.type = { text: 'null' };
|
|
36
|
+
break;
|
|
37
|
+
case typescript_1.default.SyntaxKind.ArrayLiteralExpression:
|
|
38
|
+
doc.type = { text: 'array' };
|
|
39
|
+
break;
|
|
40
|
+
case typescript_1.default.SyntaxKind.ObjectLiteralExpression:
|
|
41
|
+
doc.type = { text: 'object' };
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
return doc;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=HandleTypeInference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HandleTypeInference.js","sourceRoot":"","sources":["../../../src/Ast/Handler/HandleTypeInference.ts"],"names":[],"mappings":";AAAA,iBAAiB;;;;;AAYjB,kDA8BC;AAxCD,4DAA4B;AAE5B,YAAY;AAEZ;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,GAAQ,EAAE,IAAa;IACvD,6DAA6D;IAC7D,aAAa;IACb,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC;IAEnC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC;QACd,KAAK,oBAAE,CAAC,UAAU,CAAC,WAAW,CAAC;QAC/B,KAAK,oBAAE,CAAC,UAAU,CAAC,YAAY;YAC3B,GAAG,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;YAC/B,MAAM;QACV,KAAK,oBAAE,CAAC,UAAU,CAAC,aAAa;YAC5B,GAAG,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;YAC9B,MAAM;QACV,KAAK,oBAAE,CAAC,UAAU,CAAC,qBAAqB;YACpC,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,QAAQ,KAAK,oBAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;YACrG,MAAM;QACV,KAAK,oBAAE,CAAC,UAAU,CAAC,cAAc;YAC7B,GAAG,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;YAC9B,MAAM;QACV,KAAK,oBAAE,CAAC,UAAU,CAAC,WAAW;YAC1B,GAAG,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;YAC5B,MAAM;QACV,KAAK,oBAAE,CAAC,UAAU,CAAC,sBAAsB;YACrC,GAAG,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;YAC7B,MAAM;QACV,KAAK,oBAAE,CAAC,UAAU,CAAC,uBAAuB;YACtC,GAAG,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;YAC9B,MAAM;IACd,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type ts from 'typescript';
|
|
2
|
+
/**
|
|
3
|
+
* Handles well-known types such as `as const` and namespace/enum types.
|
|
4
|
+
* @param doc - The documentation object to update.
|
|
5
|
+
* @param node - The node to check for well-known types.
|
|
6
|
+
* @returns The updated documentation object.
|
|
7
|
+
* @example class A { b = 'b' as const }
|
|
8
|
+
* @example class A { b = B.b }
|
|
9
|
+
*/
|
|
10
|
+
export declare function handleWellKnownTypes(doc: any, node: ts.Node): any;
|
|
11
|
+
//# sourceMappingURL=HandleWellKnownTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HandleWellKnownTypes.d.ts","sourceRoot":"","sources":["../../../src/Ast/Handler/HandleWellKnownTypes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAKjC;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,GAAG,CAYjE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//#region Imports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.handleWellKnownTypes = handleWellKnownTypes;
|
|
5
|
+
const Ast_js_1 = require("../Ast.js");
|
|
6
|
+
//#endregion
|
|
7
|
+
/**
|
|
8
|
+
* Handles well-known types such as `as const` and namespace/enum types.
|
|
9
|
+
* @param doc - The documentation object to update.
|
|
10
|
+
* @param node - The node to check for well-known types.
|
|
11
|
+
* @returns The updated documentation object.
|
|
12
|
+
* @example class A { b = 'b' as const }
|
|
13
|
+
* @example class A { b = B.b }
|
|
14
|
+
*/
|
|
15
|
+
function handleWellKnownTypes(doc, node) {
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
if (node.initializer?.expression) {
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
const text = node.initializer?.expression?.getText();
|
|
22
|
+
if ((0, Ast_js_1.isWellKnownType)(node)) {
|
|
23
|
+
doc.type = { text };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return doc;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=HandleWellKnownTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HandleWellKnownTypes.js","sourceRoot":"","sources":["../../../src/Ast/Handler/HandleWellKnownTypes.ts"],"names":[],"mappings":";AAAA,iBAAiB;;AAejB,oDAYC;AAxBD,sCAA4C;AAE5C,YAAY;AAEZ;;;;;;;GAOG;AACH,SAAgB,oBAAoB,CAAC,GAAQ,EAAE,IAAa;IACxD,6DAA6D;IAC7D,aAAa;IACb,IAAI,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE,CAAC;QAC/B,6DAA6D;QAC7D,aAAa;QACb,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;QACrD,IAAI,IAAA,wBAAe,EAAC,IAAI,CAAC,EAAE,CAAC;YACxB,GAAG,CAAC,IAAI,GAAG,EAAE,IAAI,EAAE,CAAC;QACxB,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ClassMember, Declaration, Module, Package } from '@breadstone-tools/cem-infrastructure';
|
|
2
|
+
/**
|
|
3
|
+
* Loops through all modules' exports and returns the kind provided by the user.
|
|
4
|
+
* @param manifest - The custom elements manifest.
|
|
5
|
+
* @param kind - The kind of export to return.
|
|
6
|
+
* @returns An array of exports of the specified kind.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAllExportsOfKind(manifest: Package, kind: string): Array<any>;
|
|
9
|
+
/**
|
|
10
|
+
* Loops through all modules' declarations and returns the kind provided by the user.
|
|
11
|
+
* @param manifest - The custom elements manifest.
|
|
12
|
+
* @param kind - The kind of declaration to return.
|
|
13
|
+
* @returns An array of declarations of the specified kind.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getAllDeclarationsOfKind(manifest: Package, kind: string): Array<Declaration>;
|
|
16
|
+
/**
|
|
17
|
+
* Gets the inheritance tree from a manifest given a className.
|
|
18
|
+
* Returns an array of a class's mixins/superclasses all the way up the chain.
|
|
19
|
+
* @param {Package[]} manifests - The manifests to search.
|
|
20
|
+
* @param {string} className - The class name to search for.
|
|
21
|
+
* @returns {Declaration[]} An array representing the inheritance tree.
|
|
22
|
+
*/
|
|
23
|
+
export declare const getInheritanceTree: (manifests: Array<Package>, className: string) => Array<Declaration>;
|
|
24
|
+
/**
|
|
25
|
+
* Gets the module from the manifests given a modulePath.
|
|
26
|
+
* @param {Package[]} manifests - The manifests to search.
|
|
27
|
+
* @param {string} modulePath - The path of the module to find.
|
|
28
|
+
* @returns {Module | undefined} The found module, or undefined if not found.
|
|
29
|
+
*/
|
|
30
|
+
export declare const getModuleFromManifests: (manifests: Array<Package>, modulePath: string) => Module | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the module for a class-like declaration from the manifests given a className.
|
|
33
|
+
* @param {Package[]} manifests - The manifests to search.
|
|
34
|
+
* @param {string} className - The class name to search for.
|
|
35
|
+
* @returns {string | undefined} The path of the found module, or undefined if not found.
|
|
36
|
+
*/
|
|
37
|
+
export declare const getModuleForClassLike: (manifests: Array<Package>, className: string) => string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Given a manifest module, a class name, and a class member name, gets the manifest doc for the module's class' member.
|
|
40
|
+
* @param {Partial<Module>} moduleDoc - The manifest module.
|
|
41
|
+
* @param {string} className - The class to get the member of.
|
|
42
|
+
* @param {string} memberName - The class member to get.
|
|
43
|
+
* @param {boolean} isStatic - Is it a static member?
|
|
44
|
+
* @returns {ClassMember | void} The requested class member, or void if not found.
|
|
45
|
+
*/
|
|
46
|
+
export declare const getClassMemberDoc: (moduleDoc: Partial<Module>, className: string, memberName: string, isStatic?: boolean) => ClassMember | void;
|
|
47
|
+
//# sourceMappingURL=Manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Manifest.d.ts","sourceRoot":"","sources":["../../src/Ast/Manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAwBxH;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAQ/E;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC,CAQ5F;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,cAAe,KAAK,CAAC,OAAO,CAAC,aAAa,MAAM,KAAG,KAAK,CAAC,WAAW,CA0FlG,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,cAAe,KAAK,CAAC,OAAO,CAAC,cAAc,MAAM,KAAG,MAAM,GAAG,SAY/F,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,cAAe,KAAK,CAAC,OAAO,CAAC,aAAa,MAAM,KAAG,MAAM,GAAG,SAc7F,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,cAAe,OAAO,CAAC,MAAM,CAAC,aAAa,MAAM,cAAc,MAAM,yBAAqB,WAAW,GAAG,IAerI,CAAC"}
|
package/Ast/Manifest.js
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getClassMemberDoc = exports.getModuleForClassLike = exports.getModuleFromManifests = exports.getInheritanceTree = void 0;
|
|
4
|
+
exports.getAllExportsOfKind = getAllExportsOfKind;
|
|
5
|
+
exports.getAllDeclarationsOfKind = getAllDeclarationsOfKind;
|
|
6
|
+
/**
|
|
7
|
+
* Loops through all modules' declarations and applies a predicate function.
|
|
8
|
+
* @param manifest - The custom elements manifest.
|
|
9
|
+
* @param predicate - The predicate function to apply.
|
|
10
|
+
*/
|
|
11
|
+
function loopThroughDeclarations(manifest, predicate) {
|
|
12
|
+
manifest.modules.forEach(_module => {
|
|
13
|
+
_module.declarations?.forEach(predicate);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Loops through all modules' exports and applies a predicate function.
|
|
18
|
+
* @param manifest - The custom elements manifest.
|
|
19
|
+
* @param predicate - The predicate function to apply.
|
|
20
|
+
*/
|
|
21
|
+
function loopThroughExports(manifest, predicate) {
|
|
22
|
+
manifest.modules.forEach(_module => {
|
|
23
|
+
_module.exports?.forEach(predicate);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Loops through all modules' exports and returns the kind provided by the user.
|
|
28
|
+
* @param manifest - The custom elements manifest.
|
|
29
|
+
* @param kind - The kind of export to return.
|
|
30
|
+
* @returns An array of exports of the specified kind.
|
|
31
|
+
*/
|
|
32
|
+
function getAllExportsOfKind(manifest, kind) {
|
|
33
|
+
const result = [];
|
|
34
|
+
loopThroughExports(manifest, _export => {
|
|
35
|
+
if (_export.kind === kind) {
|
|
36
|
+
result.push(_export);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Loops through all modules' declarations and returns the kind provided by the user.
|
|
43
|
+
* @param manifest - The custom elements manifest.
|
|
44
|
+
* @param kind - The kind of declaration to return.
|
|
45
|
+
* @returns An array of declarations of the specified kind.
|
|
46
|
+
*/
|
|
47
|
+
function getAllDeclarationsOfKind(manifest, kind) {
|
|
48
|
+
const result = [];
|
|
49
|
+
loopThroughDeclarations(manifest, declaration => {
|
|
50
|
+
if (declaration.kind === kind) {
|
|
51
|
+
result.push(declaration);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Gets the inheritance tree from a manifest given a className.
|
|
58
|
+
* Returns an array of a class's mixins/superclasses all the way up the chain.
|
|
59
|
+
* @param {Package[]} manifests - The manifests to search.
|
|
60
|
+
* @param {string} className - The class name to search for.
|
|
61
|
+
* @returns {Declaration[]} An array representing the inheritance tree.
|
|
62
|
+
*/
|
|
63
|
+
const getInheritanceTree = (manifests, className) => {
|
|
64
|
+
const tree = [];
|
|
65
|
+
const allClassLikes = new Map();
|
|
66
|
+
const cls = [];
|
|
67
|
+
const mix = [];
|
|
68
|
+
manifests.forEach(cem => {
|
|
69
|
+
cls.push(...getAllDeclarationsOfKind(cem, 'class'));
|
|
70
|
+
mix.push(...getAllDeclarationsOfKind(cem, 'mixin'));
|
|
71
|
+
});
|
|
72
|
+
[...mix, ...cls].forEach(klass => {
|
|
73
|
+
allClassLikes.set(klass.name, klass);
|
|
74
|
+
});
|
|
75
|
+
let klass = allClassLikes.get(className);
|
|
76
|
+
if (klass) {
|
|
77
|
+
tree.push(klass);
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
79
|
+
// @ts-ignore
|
|
80
|
+
klass.mixins?.forEach(mixin => {
|
|
81
|
+
let foundMixin = mix.find(m => m.name === mixin.name);
|
|
82
|
+
if (foundMixin) {
|
|
83
|
+
tree.push(foundMixin);
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
while (has(foundMixin.mixins)) {
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
88
|
+
// @ts-ignore
|
|
89
|
+
foundMixin.mixins?.forEach(mixin => {
|
|
90
|
+
foundMixin = mix.find(m => m.name === mixin.name);
|
|
91
|
+
if (foundMixin) {
|
|
92
|
+
tree.push(foundMixin);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
while (allClassLikes.has(klass.superclass?.name)) {
|
|
101
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
102
|
+
// @ts-ignore
|
|
103
|
+
const newKlass = allClassLikes.get(klass.superclass.name);
|
|
104
|
+
let allMixins = [];
|
|
105
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
106
|
+
// @ts-ignore
|
|
107
|
+
if (klass?.mixins) {
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
allMixins = [...klass.mixins];
|
|
111
|
+
}
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
113
|
+
// @ts-ignore
|
|
114
|
+
if (newKlass?.mixins) {
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
116
|
+
// @ts-ignore
|
|
117
|
+
allMixins = [...allMixins, ...newKlass.mixins];
|
|
118
|
+
}
|
|
119
|
+
allMixins.forEach(mixin => {
|
|
120
|
+
let foundMixin = mix.find(m => m.name === mixin.name);
|
|
121
|
+
if (foundMixin) {
|
|
122
|
+
tree.push(foundMixin);
|
|
123
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
124
|
+
// @ts-ignore
|
|
125
|
+
while (has(foundMixin.mixins)) {
|
|
126
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
127
|
+
// @ts-ignore
|
|
128
|
+
foundMixin.mixins?.forEach(mixin => {
|
|
129
|
+
foundMixin = mix.find(m => m.name === mixin.name);
|
|
130
|
+
if (foundMixin) {
|
|
131
|
+
tree.push(foundMixin);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
138
|
+
// @ts-ignore
|
|
139
|
+
tree.push(newKlass);
|
|
140
|
+
klass = newKlass;
|
|
141
|
+
}
|
|
142
|
+
return tree;
|
|
143
|
+
}
|
|
144
|
+
return [];
|
|
145
|
+
};
|
|
146
|
+
exports.getInheritanceTree = getInheritanceTree;
|
|
147
|
+
/**
|
|
148
|
+
* Gets the module from the manifests given a modulePath.
|
|
149
|
+
* @param {Package[]} manifests - The manifests to search.
|
|
150
|
+
* @param {string} modulePath - The path of the module to find.
|
|
151
|
+
* @returns {Module | undefined} The found module, or undefined if not found.
|
|
152
|
+
*/
|
|
153
|
+
const getModuleFromManifests = (manifests, modulePath) => {
|
|
154
|
+
let result;
|
|
155
|
+
manifests.forEach(cem => {
|
|
156
|
+
cem.modules.forEach(_module => {
|
|
157
|
+
if (_module.path === modulePath) {
|
|
158
|
+
result = _module;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
return result;
|
|
163
|
+
};
|
|
164
|
+
exports.getModuleFromManifests = getModuleFromManifests;
|
|
165
|
+
/**
|
|
166
|
+
* Gets the module for a class-like declaration from the manifests given a className.
|
|
167
|
+
* @param {Package[]} manifests - The manifests to search.
|
|
168
|
+
* @param {string} className - The class name to search for.
|
|
169
|
+
* @returns {string | undefined} The path of the found module, or undefined if not found.
|
|
170
|
+
*/
|
|
171
|
+
const getModuleForClassLike = (manifests, className) => {
|
|
172
|
+
let result;
|
|
173
|
+
manifests.forEach(cem => {
|
|
174
|
+
cem.modules.forEach(_module => {
|
|
175
|
+
_module.declarations?.forEach(declaration => {
|
|
176
|
+
if ((declaration.kind === 'class' || declaration.kind === 'mixin') && declaration.name === className) {
|
|
177
|
+
result = _module.path;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
return result;
|
|
183
|
+
};
|
|
184
|
+
exports.getModuleForClassLike = getModuleForClassLike;
|
|
185
|
+
/**
|
|
186
|
+
* Given a manifest module, a class name, and a class member name, gets the manifest doc for the module's class' member.
|
|
187
|
+
* @param {Partial<Module>} moduleDoc - The manifest module.
|
|
188
|
+
* @param {string} className - The class to get the member of.
|
|
189
|
+
* @param {string} memberName - The class member to get.
|
|
190
|
+
* @param {boolean} isStatic - Is it a static member?
|
|
191
|
+
* @returns {ClassMember | void} The requested class member, or void if not found.
|
|
192
|
+
*/
|
|
193
|
+
const getClassMemberDoc = (moduleDoc, className, memberName, isStatic = false) => {
|
|
194
|
+
const classDoc = moduleDoc.declarations?.find(x => x.name === className);
|
|
195
|
+
if (!classDoc || !has(classDoc.members)) {
|
|
196
|
+
return undefined;
|
|
197
|
+
}
|
|
198
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
199
|
+
// @ts-ignore
|
|
200
|
+
const memberDoc = classDoc.members.find(x => x.name === memberName &&
|
|
201
|
+
(x.static ?? false) === isStatic);
|
|
202
|
+
return memberDoc;
|
|
203
|
+
};
|
|
204
|
+
exports.getClassMemberDoc = getClassMemberDoc;
|
|
205
|
+
/**
|
|
206
|
+
* @private
|
|
207
|
+
*/
|
|
208
|
+
const has = (arr) => Array.isArray(arr) && arr.length > 0;
|
|
209
|
+
//# sourceMappingURL=Manifest.js.map
|
|
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OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC"}
|
package/Index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { IDependencyService } from './Services/Interfaces/IDependencyService.js';
|
|
2
|
+
export type { IManifestBuilder, IManifestBuilderCreateResult } from './Services/Interfaces/IManifestBuilder.js';
|
|
3
|
+
export type { IManifestEngine, IManifestEngineRunResult } from './Services/Interfaces/IManifestEngine.js';
|
|
4
|
+
export type { IManifestBuilderConfig } from './Services/ManifestBuilder.js';
|
|
5
|
+
export { ManifestBuilder } from './Services/ManifestBuilder.js';
|
|
6
|
+
export type { IManifestEngineConfig } from './Services/ManifestEngine.js';
|
|
7
|
+
export { ManifestEngine } from './Services/ManifestEngine.js';
|
|
8
|
+
export type { Framework } from './Types/Framework.js';
|
|
9
|
+
//# 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":"AAEA,YAAY,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACtF,YAAY,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAChH,YAAY,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAC1G,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,YAAY,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC"}
|
package/Index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ManifestEngine = exports.ManifestBuilder = void 0;
|
|
4
|
+
var ManifestBuilder_js_1 = require("./Services/ManifestBuilder.js");
|
|
5
|
+
Object.defineProperty(exports, "ManifestBuilder", { enumerable: true, get: function () { return ManifestBuilder_js_1.ManifestBuilder; } });
|
|
6
|
+
var ManifestEngine_js_1 = require("./Services/ManifestEngine.js");
|
|
7
|
+
Object.defineProperty(exports, "ManifestEngine", { enumerable: true, get: function () { return ManifestEngine_js_1.ManifestEngine; } });
|
|
8
|
+
//# 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":";;;AAMA,oEAAgE;AAAvD,qHAAA,eAAe,OAAA;AAExB,kEAA8D;AAArD,mHAAA,cAAc,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.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IPlugin } from '@breadstone-tools/cem-plugin';
|
|
2
|
+
/**
|
|
3
|
+
* Arrow Function Plugin - Handles arrow functions.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* const myFunction = () => {};
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare function arrowFunctionPlugin(): IPlugin;
|
|
13
|
+
//# sourceMappingURL=ArrowFunctionPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrowFunctionPlugin.d.ts","sourceRoot":"","sources":["../../../src/Plugins/Analyse/ArrowFunctionPlugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAuB,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAOjF;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAmB7C"}
|