@breadstone-infrastructure/nx-tasks 0.0.12-beta.13 → 0.0.12-beta.5
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/Index.d.ts +24 -21
- package/Index.d.ts.map +1 -1
- package/Index.js +39 -43
- package/Index.js.map +1 -1
- package/executors/alias-replace/executor.d.ts +3 -3
- package/executors/alias-replace/executor.d.ts.map +1 -1
- package/executors/alias-replace/executor.js +2 -25
- package/executors/alias-replace/executor.js.map +1 -1
- package/executors/clean/executor.d.ts +3 -3
- package/executors/clean/executor.d.ts.map +1 -1
- package/executors/clean/executor.js +2 -25
- package/executors/clean/executor.js.map +1 -1
- package/executors/copy/executor.d.ts +3 -3
- package/executors/copy/executor.d.ts.map +1 -1
- package/executors/copy/executor.js +2 -25
- package/executors/copy/executor.js.map +1 -1
- package/executors/docs/executor.d.ts +1 -1
- package/executors/docs/executor.d.ts.map +1 -1
- package/executors/docs/executor.js +2 -25
- package/executors/docs/executor.js.map +1 -1
- package/executors/doppler-config-sync/executor.d.ts +1 -1
- package/executors/doppler-config-sync/executor.d.ts.map +1 -1
- package/executors/doppler-config-sync/executor.js +2 -25
- package/executors/doppler-config-sync/executor.js.map +1 -1
- package/executors/icon-collection-builder/executor.d.ts +1 -1
- package/executors/icon-collection-builder/executor.d.ts.map +1 -1
- package/executors/icon-collection-builder/executor.js +2 -25
- package/executors/icon-collection-builder/executor.js.map +1 -1
- package/executors/icon-collection-downloader/executor.d.ts +2 -2
- package/executors/icon-collection-downloader/executor.d.ts.map +1 -1
- package/executors/icon-collection-downloader/executor.js +2 -25
- package/executors/icon-collection-downloader/executor.js.map +1 -1
- package/executors/lit-docs/executor.d.ts +3 -3
- package/executors/lit-docs/executor.d.ts.map +1 -1
- package/executors/lit-docs/executor.js +3 -28
- package/executors/lit-docs/executor.js.map +1 -1
- package/executors/lit-style-transform/executor.d.ts +2 -2
- package/executors/lit-style-transform/executor.d.ts.map +1 -1
- package/executors/lit-style-transform/executor.js +7 -30
- package/executors/lit-style-transform/executor.js.map +1 -1
- package/executors/localizator/executor.d.ts +1 -1
- package/executors/localizator/executor.d.ts.map +1 -1
- package/executors/localizator/executor.js +5 -26
- package/executors/localizator/executor.js.map +1 -1
- package/executors/markdown-to-typescript-transform/executor.d.ts +1 -1
- package/executors/markdown-to-typescript-transform/executor.d.ts.map +1 -1
- package/executors/markdown-to-typescript-transform/executor.js +2 -25
- package/executors/markdown-to-typescript-transform/executor.js.map +1 -1
- package/executors/ng-packagr-build/executor.d.ts +3 -3
- package/executors/ng-packagr-build/executor.d.ts.map +1 -1
- package/executors/ng-packagr-build/executor.js +2 -25
- package/executors/ng-packagr-build/executor.js.map +1 -1
- package/executors/ng-proxy-transform/executor.d.ts +3 -3
- package/executors/ng-proxy-transform/executor.d.ts.map +1 -1
- package/executors/ng-proxy-transform/executor.js +2 -25
- package/executors/ng-proxy-transform/executor.js.map +1 -1
- package/executors/openapi-generator/executor.d.ts +1 -1
- package/executors/openapi-generator/executor.d.ts.map +1 -1
- package/executors/openapi-generator/executor.js +2 -25
- package/executors/openapi-generator/executor.js.map +1 -1
- package/executors/react-proxy-transform/executor.d.ts +3 -3
- package/executors/react-proxy-transform/executor.d.ts.map +1 -1
- package/executors/react-proxy-transform/executor.js +2 -25
- package/executors/react-proxy-transform/executor.js.map +1 -1
- package/executors/release-package/executor.d.ts +3 -3
- package/executors/release-package/executor.d.ts.map +1 -1
- package/executors/release-package/executor.js +2 -25
- package/executors/release-package/executor.js.map +1 -1
- package/executors/release-package-json/executor.d.ts +3 -3
- package/executors/release-package-json/executor.d.ts.map +1 -1
- package/executors/release-package-json/executor.js +2 -25
- package/executors/release-package-json/executor.js.map +1 -1
- package/executors/styles-bundle/executor.d.ts +3 -3
- package/executors/styles-bundle/executor.d.ts.map +1 -1
- package/executors/styles-bundle/executor.js +2 -25
- package/executors/styles-bundle/executor.js.map +1 -1
- package/executors/unrelease-package/executor.d.ts +3 -3
- package/executors/unrelease-package/executor.d.ts.map +1 -1
- package/executors/unrelease-package/executor.js +2 -25
- package/executors/unrelease-package/executor.js.map +1 -1
- package/executors/vercel-edge-config-sync/executor.d.ts +1 -1
- package/executors/vercel-edge-config-sync/executor.d.ts.map +1 -1
- package/executors/vercel-edge-config-sync/executor.js +2 -25
- package/executors/vercel-edge-config-sync/executor.js.map +1 -1
- package/executors/vue-proxy-transform/executor.d.ts +3 -3
- package/executors/vue-proxy-transform/executor.d.ts.map +1 -1
- package/executors/vue-proxy-transform/executor.js +2 -25
- package/executors/vue-proxy-transform/executor.js.map +1 -1
- package/package.json +5 -24
- package/executors/alias-replace/executor.task.d.ts +0 -74
- package/executors/alias-replace/executor.task.d.ts.map +0 -1
- package/executors/alias-replace/executor.task.js +0 -256
- package/executors/alias-replace/executor.task.js.map +0 -1
- package/executors/clean/executor.task.d.ts +0 -17
- package/executors/clean/executor.task.d.ts.map +0 -1
- package/executors/clean/executor.task.js +0 -41
- package/executors/clean/executor.task.js.map +0 -1
- package/executors/copy/executor.task.d.ts +0 -36
- package/executors/copy/executor.task.d.ts.map +0 -1
- package/executors/copy/executor.task.js +0 -53
- package/executors/copy/executor.task.js.map +0 -1
- package/executors/docs/executor.task.d.ts +0 -23
- package/executors/docs/executor.task.d.ts.map +0 -1
- package/executors/docs/executor.task.js +0 -74
- package/executors/docs/executor.task.js.map +0 -1
- package/executors/doppler-config-sync/executor.task.d.ts +0 -23
- package/executors/doppler-config-sync/executor.task.d.ts.map +0 -1
- package/executors/doppler-config-sync/executor.task.js +0 -163
- package/executors/doppler-config-sync/executor.task.js.map +0 -1
- package/executors/icon-collection-builder/executor.task.d.ts +0 -14
- package/executors/icon-collection-builder/executor.task.d.ts.map +0 -1
- package/executors/icon-collection-builder/executor.task.js +0 -69
- package/executors/icon-collection-builder/executor.task.js.map +0 -1
- package/executors/icon-collection-downloader/executor.task.d.ts +0 -10
- package/executors/icon-collection-downloader/executor.task.d.ts.map +0 -1
- package/executors/icon-collection-downloader/executor.task.js +0 -122
- package/executors/icon-collection-downloader/executor.task.js.map +0 -1
- package/executors/lit-docs/JSDocChecker.d.ts +0 -104
- package/executors/lit-docs/JSDocChecker.d.ts.map +0 -1
- package/executors/lit-docs/JSDocChecker.js +0 -240
- package/executors/lit-docs/JSDocChecker.js.map +0 -1
- package/executors/lit-docs/executor.task.d.ts +0 -12
- package/executors/lit-docs/executor.task.d.ts.map +0 -1
- package/executors/lit-docs/executor.task.js +0 -233
- package/executors/lit-docs/executor.task.js.map +0 -1
- package/executors/lit-style-transform/executor.task.d.ts +0 -37
- package/executors/lit-style-transform/executor.task.d.ts.map +0 -1
- package/executors/lit-style-transform/executor.task.js +0 -351
- package/executors/lit-style-transform/executor.task.js.map +0 -1
- package/executors/localizator/executor.task.d.ts +0 -8
- package/executors/localizator/executor.task.d.ts.map +0 -1
- package/executors/localizator/executor.task.js +0 -153
- package/executors/localizator/executor.task.js.map +0 -1
- package/executors/markdown-to-typescript-transform/MarkdownRenderer.d.ts +0 -20
- package/executors/markdown-to-typescript-transform/MarkdownRenderer.d.ts.map +0 -1
- package/executors/markdown-to-typescript-transform/MarkdownRenderer.js +0 -74
- package/executors/markdown-to-typescript-transform/MarkdownRenderer.js.map +0 -1
- package/executors/markdown-to-typescript-transform/executor.task.d.ts +0 -25
- package/executors/markdown-to-typescript-transform/executor.task.d.ts.map +0 -1
- package/executors/markdown-to-typescript-transform/executor.task.js +0 -97
- package/executors/markdown-to-typescript-transform/executor.task.js.map +0 -1
- package/executors/ng-packagr-build/executor.task.d.ts +0 -11
- package/executors/ng-packagr-build/executor.task.d.ts.map +0 -1
- package/executors/ng-packagr-build/executor.task.js +0 -43
- package/executors/ng-packagr-build/executor.task.js.map +0 -1
- package/executors/ng-proxy-transform/executor.task.d.ts +0 -49
- package/executors/ng-proxy-transform/executor.task.d.ts.map +0 -1
- package/executors/ng-proxy-transform/executor.task.js +0 -386
- package/executors/ng-proxy-transform/executor.task.js.map +0 -1
- package/executors/openapi-generator/executor.task.d.ts +0 -20
- package/executors/openapi-generator/executor.task.d.ts.map +0 -1
- package/executors/openapi-generator/executor.task.js +0 -29
- package/executors/openapi-generator/executor.task.js.map +0 -1
- package/executors/react-proxy-transform/executor.task.d.ts +0 -44
- package/executors/react-proxy-transform/executor.task.d.ts.map +0 -1
- package/executors/react-proxy-transform/executor.task.js +0 -217
- package/executors/react-proxy-transform/executor.task.js.map +0 -1
- package/executors/release-package/executor.task.d.ts +0 -17
- package/executors/release-package/executor.task.d.ts.map +0 -1
- package/executors/release-package/executor.task.js +0 -177
- package/executors/release-package/executor.task.js.map +0 -1
- package/executors/release-package-json/executor.task.d.ts +0 -29
- package/executors/release-package-json/executor.task.d.ts.map +0 -1
- package/executors/release-package-json/executor.task.js +0 -167
- package/executors/release-package-json/executor.task.js.map +0 -1
- package/executors/styles-bundle/executor.task.d.ts +0 -20
- package/executors/styles-bundle/executor.task.d.ts.map +0 -1
- package/executors/styles-bundle/executor.task.js +0 -78
- package/executors/styles-bundle/executor.task.js.map +0 -1
- package/executors/unrelease-package/executor.task.d.ts +0 -13
- package/executors/unrelease-package/executor.task.d.ts.map +0 -1
- package/executors/unrelease-package/executor.task.js +0 -101
- package/executors/unrelease-package/executor.task.js.map +0 -1
- package/executors/vercel-edge-config-sync/executor.task.d.ts +0 -7
- package/executors/vercel-edge-config-sync/executor.task.d.ts.map +0 -1
- package/executors/vercel-edge-config-sync/executor.task.js +0 -46
- package/executors/vercel-edge-config-sync/executor.task.js.map +0 -1
- package/executors/vue-proxy-transform/executor.task.d.ts +0 -43
- package/executors/vue-proxy-transform/executor.task.d.ts.map +0 -1
- package/executors/vue-proxy-transform/executor.task.js +0 -201
- package/executors/vue-proxy-transform/executor.task.js.map +0 -1
- package/utils/TaskBase.d.ts +0 -13
- package/utils/TaskBase.d.ts.map +0 -1
- package/utils/TaskBase.js +0 -27
- package/utils/TaskBase.js.map +0 -1
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable complexity */
|
|
3
|
-
// #region Imports
|
|
4
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
-
if (k2 === undefined) k2 = k;
|
|
6
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
-
}
|
|
10
|
-
Object.defineProperty(o, k2, desc);
|
|
11
|
-
}) : (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
o[k2] = m[k];
|
|
14
|
-
}));
|
|
15
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
-
}) : function(o, v) {
|
|
18
|
-
o["default"] = v;
|
|
19
|
-
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
-
if (mod && mod.__esModule) return mod;
|
|
22
|
-
var result = {};
|
|
23
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
-
__setModuleDefault(result, mod);
|
|
25
|
-
return result;
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.JSDocChecker = void 0;
|
|
29
|
-
const utilities_1 = require("@breadstone-infrastructure/utilities");
|
|
30
|
-
const ts = __importStar(require("typescript"));
|
|
31
|
-
/**
|
|
32
|
-
* JSDocChecker is responsible for verifying the completeness of JSDoc comments
|
|
33
|
-
* on TypeScript classes decorated with @Component.
|
|
34
|
-
*/
|
|
35
|
-
class JSDocChecker {
|
|
36
|
-
_correctOrder;
|
|
37
|
-
_filePath;
|
|
38
|
-
/**
|
|
39
|
-
* Initializes a new instance of the JSDocChecker class.
|
|
40
|
-
* @param filePath The path to the TypeScript file to be checked.
|
|
41
|
-
*/
|
|
42
|
-
constructor(filePath) {
|
|
43
|
-
this._correctOrder = ['description', 'name', 'element', 'category', 'slot', 'csspart', 'cssprop', 'fires', 'dependency', 'example', 'public'];
|
|
44
|
-
this._filePath = filePath;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Validates the JSDoc comments in the TypeScript file against the specified schema.
|
|
48
|
-
* Ensures that all required tags are present and optional tags are checked if relevant arrays are provided.
|
|
49
|
-
* @param slots Optional array of slot names to check for.
|
|
50
|
-
* @param parts Optional array of part names to check for.
|
|
51
|
-
* @param events Optional array of event names to check for.
|
|
52
|
-
* @param props Optional array of CSS properties to check for.
|
|
53
|
-
* @param dependencies Optional array of dependencies to check for.
|
|
54
|
-
* @returns An array of IJSDocCheckerResult containing class names and missing JSDoc tags.
|
|
55
|
-
*/
|
|
56
|
-
validate(slots, parts, events, props, dependencies) {
|
|
57
|
-
const fileContent = utilities_1.File.readAllText(this._filePath, 'utf8');
|
|
58
|
-
const sourceFile = ts.createSourceFile(this._filePath, fileContent, ts.ScriptTarget.Latest, true);
|
|
59
|
-
const results = [];
|
|
60
|
-
const visit = (node) => {
|
|
61
|
-
if (ts.isClassDeclaration(node)) {
|
|
62
|
-
const className = node.name?.getText() ?? 'UnnamedClass';
|
|
63
|
-
const jsDocTags = this.extractJSDocTags(node);
|
|
64
|
-
const tagKeys = jsDocTags.map((tag) => tag.key);
|
|
65
|
-
// Required tags to check
|
|
66
|
-
const requiredTags = ['description', 'name', 'element', 'category', 'example', 'public'];
|
|
67
|
-
const missingRequiredTags = requiredTags.filter((tag) => !tagKeys.includes(tag));
|
|
68
|
-
// Optional tags
|
|
69
|
-
const missingSlots = slots?.filter((slot) => !jsDocTags.some((tag) => tag.key === 'slot' && tag.value.includes(slot))) ?? [];
|
|
70
|
-
const missingParts = parts?.filter((part) => !jsDocTags.some((tag) => tag.key === 'csspart' && tag.value.includes(part))) ?? [];
|
|
71
|
-
const missingEvents = events?.filter((event) => !jsDocTags.some((tag) => tag.key === 'fires' && tag.value.includes(event))) ?? [];
|
|
72
|
-
const missingProps = props?.filter((prop) => !jsDocTags.some((tag) => tag.key === 'cssprop' && tag.value.includes(prop))) ?? [];
|
|
73
|
-
const missingDependencies = dependencies?.filter((dep) => !jsDocTags.some((tag) => tag.key === 'dependency' && tag.value.includes(dep))) ?? [];
|
|
74
|
-
const missingTags = [
|
|
75
|
-
...missingRequiredTags,
|
|
76
|
-
...missingSlots.length > 0 ? ['slot'] : [],
|
|
77
|
-
...missingParts.length > 0 ? ['csspart'] : [],
|
|
78
|
-
...missingEvents.length > 0 ? ['fires'] : [],
|
|
79
|
-
...missingProps.length > 0 ? ['cssprop'] : [],
|
|
80
|
-
...missingDependencies.length > 0 ? ['dependency'] : []
|
|
81
|
-
];
|
|
82
|
-
const missingDetails = {
|
|
83
|
-
slot: missingSlots.length > 0 ? missingSlots : undefined,
|
|
84
|
-
csspart: missingParts.length > 0 ? missingParts : undefined,
|
|
85
|
-
fires: missingEvents.length > 0 ? missingEvents : undefined,
|
|
86
|
-
cssprop: missingProps.length > 0 ? missingProps : undefined,
|
|
87
|
-
dependency: missingDependencies.length > 0 ? missingDependencies : undefined
|
|
88
|
-
};
|
|
89
|
-
// Check the order of tags
|
|
90
|
-
const currentOrder = tagKeys;
|
|
91
|
-
const expectedOrder = this._correctOrder.filter((tag) => currentOrder.includes(tag));
|
|
92
|
-
const orderDetails = {
|
|
93
|
-
currentOrder: Array.from(new Set(currentOrder)),
|
|
94
|
-
correctOrder: this._correctOrder,
|
|
95
|
-
missingTags: new Array()
|
|
96
|
-
};
|
|
97
|
-
// Check if the order of tags is correct
|
|
98
|
-
if (expectedOrder.length > 1) {
|
|
99
|
-
for (let i = 0; i < expectedOrder.length - 1; i++) {
|
|
100
|
-
const currentTag = expectedOrder[i];
|
|
101
|
-
const nextTag = expectedOrder[i + 1];
|
|
102
|
-
if (currentOrder.indexOf(currentTag) > currentOrder.indexOf(nextTag)) {
|
|
103
|
-
orderDetails.missingTags = expectedOrder;
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
if (missingTags.length > 0 || orderDetails.missingTags.length > 0) {
|
|
109
|
-
results.push({
|
|
110
|
-
className,
|
|
111
|
-
missingTags,
|
|
112
|
-
missingDetails,
|
|
113
|
-
orderDetails
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
ts.forEachChild(node, visit);
|
|
118
|
-
};
|
|
119
|
-
visit(sourceFile);
|
|
120
|
-
return results;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Fixes the JSDoc comment of a class declaration node to match the specified schema.
|
|
124
|
-
*
|
|
125
|
-
* @param name - The name to use in the JSDoc.
|
|
126
|
-
* @param element - The element name to use in the JSDoc.
|
|
127
|
-
* @param category - The category to use in the JSDoc.
|
|
128
|
-
* @param dependencies - An array of dependencies with their descriptions to be included in the JSDoc.
|
|
129
|
-
* @param description - The description to use in the JSDoc.
|
|
130
|
-
* @param slots - An array of slots with their descriptions to be included in the JSDoc.
|
|
131
|
-
* @param cssparts - An array of cssparts with their descriptions to be included in the JSDoc.
|
|
132
|
-
* @param cssprops - An array of cssprops with their descriptions to be included in the JSDoc.
|
|
133
|
-
* @param events - An array of events with their descriptions to be included in the JSDoc.
|
|
134
|
-
*/
|
|
135
|
-
fix(name, element, category, dependencies = [], description = 'TBD', slots = [], cssparts = [], cssprops = [], events = []) {
|
|
136
|
-
const fileContent = utilities_1.File.readAllText(this._filePath, 'utf8');
|
|
137
|
-
const sourceFile = ts.createSourceFile(this._filePath, fileContent, ts.ScriptTarget.Latest, true);
|
|
138
|
-
const updatedContent = [];
|
|
139
|
-
const originalContentLines = fileContent.split('\n');
|
|
140
|
-
const visit = (node) => {
|
|
141
|
-
if (ts.isClassDeclaration(node)) {
|
|
142
|
-
const correctJSDoc = this.generateCorrectJSDoc(name, element, category, dependencies, description, slots, cssparts, cssprops, events);
|
|
143
|
-
const className = node.name?.getText() ?? 'UnnamedClass';
|
|
144
|
-
console.log(`Updating JSDoc for class: ${className}`);
|
|
145
|
-
// Insert JSDoc comment right before the class declaration
|
|
146
|
-
const start = node.getStart(sourceFile);
|
|
147
|
-
const preClassContent = originalContentLines.slice(0, start).join('\n');
|
|
148
|
-
const postClassContent = originalContentLines.slice(start).join('\n');
|
|
149
|
-
// Construct updated content
|
|
150
|
-
updatedContent.push(preClassContent, correctJSDoc, postClassContent);
|
|
151
|
-
}
|
|
152
|
-
ts.forEachChild(node, visit);
|
|
153
|
-
};
|
|
154
|
-
visit(sourceFile);
|
|
155
|
-
// This writes the updated content back to the file
|
|
156
|
-
utilities_1.File.writeAllText(this._filePath, updatedContent.join('\n'), 'utf8');
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Validates if the tag comment matches a specific format using a regex pattern.
|
|
160
|
-
*
|
|
161
|
-
* @param comment - The tag comment to validate.
|
|
162
|
-
* @param pattern - The regex pattern to match against.
|
|
163
|
-
* @returns True if the comment matches the pattern, false otherwise.
|
|
164
|
-
*/
|
|
165
|
-
validateTagWithSpecificFormat(comment, pattern) {
|
|
166
|
-
if (!comment) {
|
|
167
|
-
return false;
|
|
168
|
-
}
|
|
169
|
-
return pattern.test(comment);
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Extracts JSDoc tags from the class declaration node.
|
|
173
|
-
* @param node The class declaration node.
|
|
174
|
-
* @returns An array of JSDoc tags found in the node.
|
|
175
|
-
*/
|
|
176
|
-
extractJSDocTags(node) {
|
|
177
|
-
const jsDocTags = [];
|
|
178
|
-
const jsDocs = node.jsDoc;
|
|
179
|
-
jsDocs?.forEach((jsDoc) => {
|
|
180
|
-
jsDoc.tags?.forEach((tag) => {
|
|
181
|
-
jsDocTags.push({
|
|
182
|
-
key: tag.tagName.text,
|
|
183
|
-
value: tag.comment?.toString() ?? ''
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
return jsDocTags;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Generates a correct JSDoc comment with the right order of attributes, including dynamic parts.
|
|
191
|
-
*
|
|
192
|
-
* @param name - The name to use in the JSDoc.
|
|
193
|
-
* @param element - The element name to use in the JSDoc.
|
|
194
|
-
* @param category - The category to use in the JSDoc.
|
|
195
|
-
* @param dependencies - An array of dependencies with their descriptions to be included in the JSDoc.
|
|
196
|
-
* @param description - The description to use in the JSDoc. Defaults to "TBD" if not provided.
|
|
197
|
-
* @param slots - An array of slots with their descriptions to be included in the JSDoc.
|
|
198
|
-
* @param cssparts - An array of cssparts with their descriptions to be included in the JSDoc.
|
|
199
|
-
* @param cssprops - An array of cssprops with their descriptions to be included in the JSDoc.
|
|
200
|
-
* @param events - An array of events with their descriptions to be included in the JSDoc.
|
|
201
|
-
* @returns A string containing the formatted JSDoc comment.
|
|
202
|
-
*/
|
|
203
|
-
generateCorrectJSDoc(name, element, category, dependencies = [], description = 'TBD', slots = [], cssparts = [], cssprops = [], events = []) {
|
|
204
|
-
// Generate the dynamic parts for slots, cssparts, cssprops, events, and dependencies
|
|
205
|
-
const slotsSection = slots.map((slot) => ` * @slot ${slot.name} - ${slot.description}`).join('\n');
|
|
206
|
-
const csspartsSection = cssparts.map((part) => ` * @csspart ${part.name} - ${part.description}`).join('\n');
|
|
207
|
-
const csspropsSection = cssprops.map((prop) => ` * @cssprop {${prop.type}} ${prop.name} - ${prop.description}`).join('\n');
|
|
208
|
-
const eventsSection = events.map((event) => ` * @fires ${event.name} - ${event.description}`).join('\n');
|
|
209
|
-
const dependenciesSection = dependencies.map((dep) => ` * @dependency {${dep.type}} ${dep.name} - ${dep.description}`).join('\n');
|
|
210
|
-
return `
|
|
211
|
-
/**
|
|
212
|
-
* ${name} - An interactive UI element typically used to trigger actions or user interactions.
|
|
213
|
-
*
|
|
214
|
-
* @description
|
|
215
|
-
* ${description}
|
|
216
|
-
*
|
|
217
|
-
* @name ${name}
|
|
218
|
-
* @element ${element}
|
|
219
|
-
* @category ${category}
|
|
220
|
-
*
|
|
221
|
-
${slotsSection}
|
|
222
|
-
*
|
|
223
|
-
${csspartsSection}
|
|
224
|
-
*
|
|
225
|
-
${csspropsSection}
|
|
226
|
-
*
|
|
227
|
-
${eventsSection}
|
|
228
|
-
*
|
|
229
|
-
${dependenciesSection}
|
|
230
|
-
*
|
|
231
|
-
* @example
|
|
232
|
-
* <${element} label="Button"></${element}>
|
|
233
|
-
*
|
|
234
|
-
* @public
|
|
235
|
-
*/
|
|
236
|
-
`.trim();
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
exports.JSDocChecker = JSDocChecker;
|
|
240
|
-
//# sourceMappingURL=JSDocChecker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"JSDocChecker.js","sourceRoot":"","sources":["../../../src/executors/lit-docs/JSDocChecker.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;AAElB,oEAA4D;AAC5D,+CAAiC;AAwBjC;;;GAGG;AACH,MAAa,YAAY;IAEJ,aAAa,CAAgB;IAC7B,SAAS,CAAS;IAEnC;;;OAGG;IACH,YAAmB,QAAgB;QAC/B,IAAI,CAAC,aAAa,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC9I,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAED;;;;;;;;;OASG;IACI,QAAQ,CACX,KAAqB,EACrB,KAAqB,EACrB,MAAsB,EACtB,KAAqB,EACrB,YAA4B;QAE5B,MAAM,WAAW,GAAG,gBAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAC7D,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,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IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3H,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,KAAK,CAAC,IAAI,MAAM,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzG,MAAM,mBAAmB,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,mBAAmB,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAElI,OAAO;;KAEV,IAAI;;;KAGJ,WAAW;;WAEL,IAAI;cACD,OAAO;eACN,QAAQ;;EAErB,YAAY;;EAEZ,eAAe;;EAEf,eAAe;;EAEf,aAAa;;EAEb,mBAAmB;;;MAGf,OAAO,qBAAqB,OAAO;;;;CAIxC,CAAC,IAAI,EAAE,CAAC;IACL,CAAC;CAEJ;AAhUD,oCAgUC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare namespace LitDocsTask {
|
|
2
|
-
interface ILitDocsTaskOptions {
|
|
3
|
-
cwd: string;
|
|
4
|
-
files: string | Array<string>;
|
|
5
|
-
ignore?: Array<string>;
|
|
6
|
-
verbose?: boolean;
|
|
7
|
-
validateOrder?: boolean;
|
|
8
|
-
validateTags?: boolean;
|
|
9
|
-
}
|
|
10
|
-
function run(options: ILitDocsTaskOptions): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=executor.task.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executor.task.d.ts","sourceRoot":"","sources":["../../../src/executors/lit-docs/executor.task.ts"],"names":[],"mappings":"AAQA,yBAAiB,WAAW,CAAC;IAEzB,UAAiB,mBAAmB;QAChC,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;QAC9B,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QACvB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,YAAY,CAAC,EAAE,OAAO,CAAC;KAC1B;IAED,SAAsB,GAAG,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkJrE;CACJ"}
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// #region Imports
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.LitDocsTask = void 0;
|
|
5
|
-
const utilities_1 = require("@breadstone-infrastructure/utilities");
|
|
6
|
-
const JSDocChecker_1 = require("./JSDocChecker");
|
|
7
|
-
const diff_1 = require("diff");
|
|
8
|
-
// #endregion
|
|
9
|
-
var LitDocsTask;
|
|
10
|
-
(function (LitDocsTask) {
|
|
11
|
-
async function run(options) {
|
|
12
|
-
const logger = new utilities_1.ConsoleLogger();
|
|
13
|
-
(0, utilities_1.logSeparator)(logger, 'Analyzing component documentation (Lit)');
|
|
14
|
-
const elementPath = Array.isArray(options.files)
|
|
15
|
-
? options.files.map((file) => utilities_1.Path.combine(options.cwd, file))
|
|
16
|
-
: utilities_1.Path.combine(options.cwd, options.files);
|
|
17
|
-
if (options.verbose) {
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-misused-spread
|
|
19
|
-
[...elementPath].forEach((p) => {
|
|
20
|
-
logger.log(` Search elements in ${p}`, { color: 'gray' });
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return new Promise((resolve) => {
|
|
24
|
-
const allResults = new Array();
|
|
25
|
-
const files = utilities_1.File.glob(elementPath);
|
|
26
|
-
files.forEach((file) => {
|
|
27
|
-
if (options.ignore?.includes(utilities_1.Path.getFileNameWithoutExtension(file))) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (options.verbose) {
|
|
31
|
-
logger.log((0, utilities_1.gray)(` Analyzing ${utilities_1.Path.getFileName(file)}`));
|
|
32
|
-
}
|
|
33
|
-
const elementFile = file;
|
|
34
|
-
const templateFile = utilities_1.Path.combine(utilities_1.Path.getDirectoryName(elementFile), utilities_1.Path.getFileNameWithoutExtension(elementFile).concat('Template.ts'));
|
|
35
|
-
const styleFile = utilities_1.Path.combine(utilities_1.Path.getDirectoryName(elementFile), utilities_1.Path.getFileNameWithoutExtension(elementFile).concat('Style.ts'));
|
|
36
|
-
const parts = TemplateExtractor.extractParts(templateFile)
|
|
37
|
-
.filter((part) => !part.startsWith('_')); // we want to ignore internal parts;
|
|
38
|
-
const slots = TemplateExtractor.extractSlots(templateFile)
|
|
39
|
-
.filter((slot) => !slot.startsWith('_')); // we want to ignore internal slots;
|
|
40
|
-
const cssVars = (utilities_1.File.exists(styleFile) ? TemplateExtractor.extractCSSVars(styleFile) : [])
|
|
41
|
-
.filter((cssVar) => !cssVar.startsWith('--_')); // we want to ignore internal CSS variables;
|
|
42
|
-
const dependencies = TemplateExtractor.extractDependencies(elementFile);
|
|
43
|
-
// Usage example
|
|
44
|
-
const jsDocChecker = new JSDocChecker_1.JSDocChecker(elementFile);
|
|
45
|
-
const results = jsDocChecker.validate(slots, parts, undefined, cssVars, dependencies);
|
|
46
|
-
if (results.length > 0) {
|
|
47
|
-
results.forEach((result) => {
|
|
48
|
-
logger.error(` ${(0, utilities_1.red)('[ERROR]')}: ${(0, utilities_1.bold)(utilities_1.Path.getFileName(file))} has missing doc tags:`);
|
|
49
|
-
result.missingTags.forEach((tag) => {
|
|
50
|
-
logger.warn(` - ${(0, utilities_1.bold)(`@${tag}`)}`);
|
|
51
|
-
switch (tag) {
|
|
52
|
-
case 'slot':
|
|
53
|
-
logger.log(' To fix this issue, add the following slots to the class:');
|
|
54
|
-
logger.log((0, utilities_1.green)(` * ${(0, utilities_1.bold)('@slot')} ${result.missingDetails.slot?.join('\n * @slot ')}`));
|
|
55
|
-
break;
|
|
56
|
-
case 'csspart':
|
|
57
|
-
logger.log(' To fix this issue, add the following parts to the class:');
|
|
58
|
-
logger.log((0, utilities_1.green)(` * ${(0, utilities_1.bold)('@csspart')} ${result.missingDetails.csspart?.join('\n * @csspart ')}`));
|
|
59
|
-
break;
|
|
60
|
-
case 'fires':
|
|
61
|
-
logger.log(' To fix this issue, add the following events to the class:');
|
|
62
|
-
logger.log((0, utilities_1.green)(` * ${(0, utilities_1.bold)('@fires')} ${result.missingDetails.fires?.join('\n * @fires ')}`));
|
|
63
|
-
break;
|
|
64
|
-
case 'cssprop':
|
|
65
|
-
logger.log(' To fix this issue, add the following CSS properties to the class:');
|
|
66
|
-
logger.log((0, utilities_1.green)(` * ${(0, utilities_1.bold)('@cssprop')} {unknown} ${result.missingDetails.cssprop?.join('\n * @cssprop {unknown} ')}`));
|
|
67
|
-
break;
|
|
68
|
-
case 'dependency':
|
|
69
|
-
const formattedDependencies = dependencies
|
|
70
|
-
.map((dep) => `${(0, utilities_1.bold)('@dependency')} {${dep}} - The ${utilities_1.StringExtensions.humanize(dep.replace('Element', ''))} element.`)
|
|
71
|
-
.join('\n * ');
|
|
72
|
-
logger.log(' To fix this issue, add the following dependencies to the class:');
|
|
73
|
-
logger.log((0, utilities_1.green)(` * ${formattedDependencies}`));
|
|
74
|
-
break;
|
|
75
|
-
case 'description':
|
|
76
|
-
case 'name':
|
|
77
|
-
case 'element':
|
|
78
|
-
case 'category':
|
|
79
|
-
case 'example':
|
|
80
|
-
case 'public':
|
|
81
|
-
default:
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
logger.log(' There are some differences between the correct order and the your current order');
|
|
86
|
-
logger.log(' Correct order:', result.orderDetails.correctOrder.join(' | '));
|
|
87
|
-
const diff = (0, diff_1.diffWords)(result.orderDetails.correctOrder.join(' '), result.orderDetails.currentOrder.join(' '));
|
|
88
|
-
const output = diff.map((part) => {
|
|
89
|
-
const color = part.added ? '\x1b[32m' : part.removed ? '\x1b[31m' : '\x1b[0m';
|
|
90
|
-
return `${color + part.value}\x1b[0m`;
|
|
91
|
-
}).join(' | ');
|
|
92
|
-
console.log(' Current order:', output);
|
|
93
|
-
// logger.log(green(' Correct order:'), result.orderDetails.correctOrder.join(', '));
|
|
94
|
-
// logger.log(red(' Current order:'), result.orderDetails.currentOrder.join(', '));
|
|
95
|
-
// logger.log('Missing tags:', result.orderDetails.missingTags.join(', '));
|
|
96
|
-
// Logger.instance().logWarning(` - ${result.missingTags.join(' | ')}`);
|
|
97
|
-
// if (result.missingTags.includes('slot') || result.missingTags.includes('csspart') || result.missingTags.includes('fires') || result.missingTags.includes('cssprop')) {
|
|
98
|
-
// Logger.instance().logWarning(` - details: ${result.missingDetails?.slot?.join(', ')}`);
|
|
99
|
-
// }
|
|
100
|
-
logger.log('');
|
|
101
|
-
});
|
|
102
|
-
allResults.push({
|
|
103
|
-
file: elementFile,
|
|
104
|
-
results: results
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
// Logger.instance().logInfo(` Class ${Path.getFileName(file)} is okay.`, { color: 'green' });
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
// count all errors
|
|
112
|
-
const count = allResults.reduce((total, x) => {
|
|
113
|
-
// For each x.results, we reduce to sum up the lengths of missingTags
|
|
114
|
-
const missingTagsCount = x.results.reduce((sum, y) => sum + y.missingTags.length, 0);
|
|
115
|
-
return total + missingTagsCount;
|
|
116
|
-
}, 0);
|
|
117
|
-
(0, utilities_1.logSummary)(logger, {
|
|
118
|
-
error: [`\tFound ${count} errors in ${allResults.length}/${files.length} files.`, count > 0],
|
|
119
|
-
success: [`\t${files.length - allResults.length} file are okay.`, true]
|
|
120
|
-
});
|
|
121
|
-
resolve();
|
|
122
|
-
}).catch((error) => {
|
|
123
|
-
logger.error('Error during analysis:', error);
|
|
124
|
-
throw error;
|
|
125
|
-
})
|
|
126
|
-
.finally(() => {
|
|
127
|
-
(0, utilities_1.logSeparator)(logger);
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
LitDocsTask.run = run;
|
|
131
|
-
})(LitDocsTask || (exports.LitDocsTask = LitDocsTask = {}));
|
|
132
|
-
/**
|
|
133
|
-
* TemplateExtractor is responsible for extracting slot elements or `part` attributes from Lit HTML templates.
|
|
134
|
-
*/
|
|
135
|
-
var TemplateExtractor;
|
|
136
|
-
(function (TemplateExtractor) {
|
|
137
|
-
/**
|
|
138
|
-
* Reads the file and processes its contents to extract `part` attributes.
|
|
139
|
-
*/
|
|
140
|
-
function extractParts(filePath) {
|
|
141
|
-
const fileContent = utilities_1.File.readAllText(filePath, 'utf8');
|
|
142
|
-
return _extractParts(fileContent);
|
|
143
|
-
}
|
|
144
|
-
TemplateExtractor.extractParts = extractParts;
|
|
145
|
-
/**
|
|
146
|
-
* Reads the file and processes its contents to extract slot elements.
|
|
147
|
-
*/
|
|
148
|
-
function extractSlots(filePath) {
|
|
149
|
-
const fileContent = utilities_1.File.readAllText(filePath, 'utf8');
|
|
150
|
-
return _extractSlots(fileContent);
|
|
151
|
-
}
|
|
152
|
-
TemplateExtractor.extractSlots = extractSlots;
|
|
153
|
-
/**
|
|
154
|
-
* Reads the file and processes its contents to extract CSS variables.
|
|
155
|
-
*/
|
|
156
|
-
function extractCSSVars(filePath) {
|
|
157
|
-
const fileContent = utilities_1.File.readAllText(filePath, 'utf8');
|
|
158
|
-
return _extractCSSVars(fileContent);
|
|
159
|
-
}
|
|
160
|
-
TemplateExtractor.extractCSSVars = extractCSSVars;
|
|
161
|
-
/**
|
|
162
|
-
* Reads the file and processes its contents to extract dependencies from the @Component decorator.
|
|
163
|
-
*/
|
|
164
|
-
function extractDependencies(filePath) {
|
|
165
|
-
const fileContent = utilities_1.File.readAllText(filePath, 'utf8');
|
|
166
|
-
return _extractDependencies(fileContent);
|
|
167
|
-
}
|
|
168
|
-
TemplateExtractor.extractDependencies = extractDependencies;
|
|
169
|
-
/**
|
|
170
|
-
* Extracts `part` attributes from the provided content.
|
|
171
|
-
* @param content The content of the TypeScript file to be processed.
|
|
172
|
-
* @returns An array of extracted part names.
|
|
173
|
-
*/
|
|
174
|
-
function _extractParts(content) {
|
|
175
|
-
const partRegex = /part="([^"]+)"/g;
|
|
176
|
-
const parts = new Set();
|
|
177
|
-
let match = null;
|
|
178
|
-
while ((match = partRegex.exec(content)) !== null) {
|
|
179
|
-
parts.add(match[1]);
|
|
180
|
-
}
|
|
181
|
-
return Array.from(parts);
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Extracts slot elements from the provided content.
|
|
185
|
-
* @param content The content of the TypeScript file to be processed.
|
|
186
|
-
* @returns An array of extracted slot names.
|
|
187
|
-
*/
|
|
188
|
-
function _extractSlots(content) {
|
|
189
|
-
const slotRegex = /<slot(?:\s+name="([^"]+)")?\s*>/g;
|
|
190
|
-
const slots = new Set();
|
|
191
|
-
let match = null;
|
|
192
|
-
while ((match = slotRegex.exec(content)) !== null) {
|
|
193
|
-
const slotName = match[1] || 'default';
|
|
194
|
-
slots.add(slotName);
|
|
195
|
-
}
|
|
196
|
-
return Array.from(slots);
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Extracts CSS variables from the provided content.
|
|
200
|
-
* @param content The content of the TypeScript file to be processed.
|
|
201
|
-
* @returns An array of extracted CSS variable names.
|
|
202
|
-
*/
|
|
203
|
-
function _extractCSSVars(content) {
|
|
204
|
-
const cssVarRegex = /--[\w-]+(?=\s*:)/g;
|
|
205
|
-
const cssVars = new Set();
|
|
206
|
-
let match = null;
|
|
207
|
-
while ((match = cssVarRegex.exec(content)) !== null) {
|
|
208
|
-
cssVars.add(match[0]);
|
|
209
|
-
}
|
|
210
|
-
return Array.from(cssVars);
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Extracts dependencies from the @Component decorator within the provided content.
|
|
214
|
-
* @param content The content of the TypeScript file to be processed.
|
|
215
|
-
* @returns An array of extracted dependency names.
|
|
216
|
-
*/
|
|
217
|
-
function _extractDependencies(content) {
|
|
218
|
-
// Regex to match the imports section within @Component decorator
|
|
219
|
-
const importsRegex = /@Component\([\s\S]*?imports:\s*\[([\s\S]*?)\][\s\S]*?\)/g;
|
|
220
|
-
const match = importsRegex.exec(content);
|
|
221
|
-
const dependencies = new Set();
|
|
222
|
-
if (match?.[1]) {
|
|
223
|
-
// Match individual elements within the imports array
|
|
224
|
-
const dependencyRegex = /\b(\w+Element)\b/g;
|
|
225
|
-
let dependencyMatch = null;
|
|
226
|
-
while ((dependencyMatch = dependencyRegex.exec(match[1])) !== null) {
|
|
227
|
-
dependencies.add(dependencyMatch[1]);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
return Array.from(dependencies);
|
|
231
|
-
}
|
|
232
|
-
})(TemplateExtractor || (TemplateExtractor = {}));
|
|
233
|
-
//# sourceMappingURL=executor.task.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executor.task.js","sourceRoot":"","sources":["../../../src/executors/lit-docs/executor.task.ts"],"names":[],"mappings":";AAAA,kBAAkB;;;AAElB,oEAAqJ;AACrJ,iDAAwE;AACxE,+BAAiC;AAEjC,aAAa;AAEb,IAAiB,WAAW,CA8J3B;AA9JD,WAAiB,WAAW;IAWjB,KAAK,UAAU,GAAG,CAAC,OAA4B;QAClD,MAAM,MAAM,GAAG,IAAI,yBAAa,EAAE,CAAC;QAEnC,IAAA,wBAAY,EAAC,MAAM,EAAE,yCAAyC,CAAC,CAAC;QAEhE,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC;YAC5C,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAC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,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACH,SAAS,oBAAoB,CAAC,OAAe;QACzC,iEAAiE;QACjE,MAAM,YAAY,GAAG,0DAA0D,CAAC;QAChF,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU,CAAC;QAEvC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACb,qDAAqD;YACrD,MAAM,eAAe,GAAG,mBAAmB,CAAC;YAC5C,IAAI,eAAe,GAA2B,IAAI,CAAC;YAEnD,OAAO,CAAC,eAAe,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;gBACjE,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;YACzC,CAAC;QACL,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC;AAEL,CAAC,EA9GS,iBAAiB,KAAjB,iBAAiB,QA8G1B"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { type IFileCacheOptions } from '@breadstone-infrastructure/utilities';
|
|
2
|
-
import { type OutputStyle } from 'sass';
|
|
3
|
-
import type { PackageJson, TsConfigJson } from 'type-fest';
|
|
4
|
-
/**
|
|
5
|
-
* @description Task to generate ts from scss styles.
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
export declare namespace LitStyleTransformTask {
|
|
9
|
-
const DEFAULT_OPTIONS: {
|
|
10
|
-
nodeModulesPath: string;
|
|
11
|
-
templateFile: string;
|
|
12
|
-
outputStyle: OutputStyle;
|
|
13
|
-
excludes: string[];
|
|
14
|
-
verbose: boolean;
|
|
15
|
-
autoprefix: boolean;
|
|
16
|
-
force: boolean;
|
|
17
|
-
themes: string[];
|
|
18
|
-
};
|
|
19
|
-
interface ILitStyleTransformTaskOptions {
|
|
20
|
-
cwd: string;
|
|
21
|
-
packageJson: PackageJson;
|
|
22
|
-
tsConfigJson: TsConfigJson;
|
|
23
|
-
nodeModulesPath: string;
|
|
24
|
-
templateFile: string;
|
|
25
|
-
outputStyle: OutputStyle;
|
|
26
|
-
includes?: Array<string>;
|
|
27
|
-
excludes?: Array<string>;
|
|
28
|
-
verbose?: boolean;
|
|
29
|
-
autoprefix?: boolean;
|
|
30
|
-
force?: boolean;
|
|
31
|
-
dryRun?: boolean;
|
|
32
|
-
cache: IFileCacheOptions;
|
|
33
|
-
themes?: Array<string>;
|
|
34
|
-
}
|
|
35
|
-
function run(options: ILitStyleTransformTaskOptions): Promise<void>;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=executor.task.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executor.task.d.ts","sourceRoot":"","sources":["../../../src/executors/lit-style-transform/executor.task.ts"],"names":[],"mappings":"AAKA,OAAO,EAAqF,KAAK,iBAAiB,EAAqF,MAAM,sCAAsC,CAAC;AAGpP,OAAO,EAAqC,KAAK,WAAW,EAAE,MAAM,MAAM,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAK3D;;;GAGG;AACH,yBAAiB,qBAAqB,CAAC;IAE5B,MAAM,eAAe;;;qBAGG,WAAW;;;;;;KAyCzC,CAAC;IAEF,UAAiB,6BAA6B;QAC1C,GAAG,EAAE,MAAM,CAAC;QACZ,WAAW,EAAE,WAAW,CAAC;QACzB,YAAY,EAAE,YAAY,CAAC;QAC3B,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,WAAW,CAAC;QACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QACzB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,KAAK,EAAE,iBAAiB,CAAC;QACzB,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;KAC1B;IAED,SAAsB,GAAG,CAAC,OAAO,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC,CA6J/E;CACJ"}
|