@pb33f/cowboy-components 0.3.5 → 0.5.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/README.md +1 -1
- package/dist/assets/css.worker-CTSQecos.js +84 -0
- package/dist/assets/editor.worker-CYC0jP-p.js +12 -0
- package/dist/assets/equalizer.worker-CdIiiqfH.js +1 -0
- package/dist/assets/html.worker-C1BIaUKh.js +461 -0
- package/dist/assets/json.worker-BCyBlh8h.js +49 -0
- package/dist/assets/rule-documentation.worker-B7xOWY5M.js +1 -0
- package/dist/components/credit-ticker/credit-ticker.css.d.ts +2 -0
- package/dist/components/credit-ticker/credit-ticker.css.js +36 -0
- package/dist/components/credit-ticker/credit-ticker.d.ts +14 -0
- package/dist/components/credit-ticker/credit-ticker.js +88 -0
- package/dist/components/editor/editor-breadcrumb.css.d.ts +2 -0
- package/dist/components/editor/editor-breadcrumb.css.js +49 -0
- package/dist/components/editor/editor-breadcrumb.d.ts +9 -0
- package/dist/components/editor/editor-breadcrumb.js +60 -0
- package/dist/components/editor/editor.css.d.ts +2 -0
- package/dist/components/editor/editor.css.js +62 -0
- package/dist/components/editor/editor.d.ts +25 -4
- package/dist/components/editor/editor.js +412 -76
- package/dist/components/manage-ruleset/manage-ruleset.css.js +5 -0
- package/dist/components/manage-ruleset/manage-ruleset.js +8 -6
- package/dist/components/model-icon/model-icon.d.ts +7 -0
- package/dist/components/model-icon/model-icon.js +56 -7
- package/dist/components/model-renderer/clickable-ref.d.ts +2 -2
- package/dist/components/model-renderer/clickable-ref.js +5 -4
- package/dist/components/model-renderer/header.js +10 -10
- package/dist/components/model-renderer/operation.js +2 -2
- package/dist/components/model-renderer/rendered-node.css.js +1 -1
- package/dist/components/model-renderer/schema.js +1 -1
- package/dist/components/model-tree/tree.css.js +1 -0
- package/dist/components/model-tree/tree.d.ts +8 -0
- package/dist/components/model-tree/tree.js +232 -24
- package/dist/components/paginator/paginator.css.js +6 -2
- package/dist/components/paginator/paginator.d.ts +1 -0
- package/dist/components/paginator/paginator.js +8 -4
- package/dist/components/problem-list/details-drawer.css.js +1 -1
- package/dist/components/problem-list/problem-item.js +6 -3
- package/dist/components/problem-list/problem-label-view-filter.d.ts +2 -1
- package/dist/components/problem-list/problem-label-view-filter.js +1 -0
- package/dist/components/problem-list/problem-list.d.ts +1 -0
- package/dist/components/problem-list/problem-list.js +19 -1
- package/dist/components/problem-list/problem-mainview.css.js +1 -1
- package/dist/components/problem-list/problem-mainview.js +6 -0
- package/dist/components/problem-list/problem-sort-filter.d.ts +2 -1
- package/dist/components/problem-list/problem-sort-filter.js +1 -0
- package/dist/components/problems-overview/diagnostic-evaluation.css.js +14 -4
- package/dist/components/problems-overview/diagnostic-evaluation.js +42 -1
- package/dist/components/problems-overview/problems-overview.css.js +1 -0
- package/dist/components/the-doctor/nuke-workspace.d.ts +13 -0
- package/dist/components/the-doctor/nuke-workspace.js +70 -0
- package/dist/components/the-doctor/sparks.d.ts +1 -0
- package/dist/components/the-doctor/sparks.js +11 -2
- package/dist/components/the-doctor/status-bar.css.js +6 -5
- package/dist/components/the-doctor/the-doctor.css.js +117 -16
- package/dist/components/the-doctor/the-doctor.d.ts +70 -21
- package/dist/components/the-doctor/the-doctor.js +1023 -166
- package/dist/components/the-doctor/upload-archive.css.d.ts +2 -0
- package/dist/components/the-doctor/upload-archive.css.js +98 -0
- package/dist/components/the-doctor/upload-archive.d.ts +33 -0
- package/dist/components/the-doctor/upload-archive.js +281 -0
- package/dist/components/visualizer/equalizer.d.ts +3 -1
- package/dist/components/visualizer/equalizer.js +55 -31
- package/dist/components/visualizer/explorer.js +9 -5
- package/dist/cowboy-components.umd.cjs +1846 -1273
- package/dist/css/hr.css.d.ts +2 -0
- package/dist/css/hr.css.js +12 -0
- package/dist/css/pb33f-theme.css +1 -0
- package/dist/events/doctor.d.ts +19 -1
- package/dist/events/doctor.js +5 -0
- package/dist/model/channels.d.ts +1 -0
- package/dist/model/channels.js +1 -0
- package/dist/model/graph.d.ts +17 -0
- package/dist/model/graph.js +17 -1
- package/dist/model/link.d.ts +8 -0
- package/dist/model/node_type.d.ts +22 -1
- package/dist/model/node_type.js +22 -0
- package/dist/model/panel-state.d.ts +5 -0
- package/dist/model/panel-state.js +1 -0
- package/dist/model/problem.d.ts +3 -1
- package/dist/model/problem.js +4 -2
- package/dist/model/rolodex.d.ts +34 -0
- package/dist/model/rolodex.js +1 -0
- package/dist/services/linting-service.d.ts +1 -1
- package/dist/services/linting-service.js +23 -11
- package/dist/services/model-service.d.ts +8 -1
- package/dist/services/model-service.js +127 -0
- package/dist/style.css +1 -1
- package/dist/workers/equalizer.worker.js +4 -3
- package/dist/workers/rule-documentation.worker.d.ts +2 -2
- package/dist/workers/rule-documentation.worker.js +26 -15
- package/package.json +3 -3
- package/dist/assets/css.worker-B_qZXUzt.js +0 -84
- package/dist/assets/editor.worker-HEmB0D7P.js +0 -11
- package/dist/assets/equalizer.worker-icLzyXQ7.js +0 -1
- package/dist/assets/html.worker-D3WUrk8Q.js +0 -458
- package/dist/assets/json.worker-CAhUaBo4.js +0 -42
- package/dist/assets/rule-documentation.worker-D39NS8Lx.js +0 -1
|
@@ -85,13 +85,13 @@ export default onmessage = function (e) {
|
|
|
85
85
|
postMessage(filteredGraphResponse);
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
|
-
graphResponse.nodes
|
|
88
|
+
graphResponse.nodes?.forEach(node => {
|
|
89
89
|
if (Object.keys(objects).includes(node.type)) {
|
|
90
90
|
filteredNodes.set(node.id, node);
|
|
91
91
|
}
|
|
92
92
|
extractedNodes.set(node.id, node);
|
|
93
93
|
});
|
|
94
|
-
graphResponse.nodesRendered
|
|
94
|
+
graphResponse.nodesRendered?.forEach(node => {
|
|
95
95
|
extractedRenderedNodes.set(node.id, node);
|
|
96
96
|
});
|
|
97
97
|
const filterResponseNode = (code, node, filters) => {
|
|
@@ -137,7 +137,7 @@ export default onmessage = function (e) {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
|
-
graphResponse.edges
|
|
140
|
+
graphResponse.edges?.forEach(edge => {
|
|
141
141
|
if (references && !references.renderRefs) {
|
|
142
142
|
if (edge.ref && edge.ref != '') {
|
|
143
143
|
return;
|
|
@@ -203,6 +203,7 @@ export default onmessage = function (e) {
|
|
|
203
203
|
if (!found)
|
|
204
204
|
filteredGraphResponse.edges.push(edge);
|
|
205
205
|
});
|
|
206
|
+
filteredGraphResponse.rebuild = e.data.rebuild;
|
|
206
207
|
postMessage(filteredGraphResponse);
|
|
207
208
|
}
|
|
208
209
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DoctorDocumentation } from "../model/rule_documentation.js";
|
|
2
2
|
declare const _default: (this: Window, e: MessageEvent<any>) => void;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare function buildRuleDocs(endpoint: string): Promise<DoctorDocumentation[]>;
|
|
5
|
-
export declare function buildFunctionDocs(endpoint: string): Promise<DoctorDocumentation[]>;
|
|
4
|
+
export declare function buildRuleDocs(endpoint: string, existingDocs: string[]): Promise<DoctorDocumentation[]>;
|
|
5
|
+
export declare function buildFunctionDocs(endpoint: string, existingDocs: string[]): Promise<DoctorDocumentation[]>;
|
|
6
6
|
export declare function fetchAllRuleDocumentation(endpoint: string): Promise<DoctorDocumentation[]>;
|
|
7
7
|
export declare function fetchAllFunctionDocumentation(endpoint: string): Promise<DoctorDocumentation[]>;
|
|
8
8
|
export declare function fetchRuleDocumentation(ruleId: string, endpoint: string): Promise<DoctorDocumentation>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DocumentationType } from "../model/rule_documentation.js";
|
|
2
2
|
export default onmessage = function (e) {
|
|
3
3
|
if (e.data.start) {
|
|
4
|
-
const promises = [buildRuleDocs(e.data.endpoint
|
|
4
|
+
const promises = [buildRuleDocs(e.data.endpoint, e.data.existingRules),
|
|
5
|
+
buildFunctionDocs(e.data.endpoint, e.data.existingFunctions)];
|
|
5
6
|
Promise.all(promises).then((docs) => {
|
|
6
7
|
postMessage(docs.flat());
|
|
7
8
|
}).catch(() => {
|
|
@@ -9,17 +10,22 @@ export default onmessage = function (e) {
|
|
|
9
10
|
});
|
|
10
11
|
}
|
|
11
12
|
};
|
|
12
|
-
export async function buildRuleDocs(endpoint) {
|
|
13
|
+
export async function buildRuleDocs(endpoint, existingDocs) {
|
|
13
14
|
return new Promise(async (resolve, reject) => {
|
|
14
15
|
try {
|
|
15
16
|
const docs = await fetchAllRuleDocumentation(endpoint);
|
|
16
|
-
const fetchPromises = docs.map(doc =>
|
|
17
|
-
if (
|
|
18
|
-
doc.
|
|
17
|
+
const fetchPromises = docs.map(doc => {
|
|
18
|
+
if (doc.ruleId && !existingDocs.includes(doc.ruleId)) {
|
|
19
|
+
return fetchRuleDocumentation(doc.ruleId, endpoint).then(fullDoc => {
|
|
20
|
+
if (fullDoc.body) {
|
|
21
|
+
doc.body = fullDoc.body;
|
|
22
|
+
}
|
|
23
|
+
doc.type = DocumentationType.RULE;
|
|
24
|
+
return doc;
|
|
25
|
+
});
|
|
19
26
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}));
|
|
27
|
+
return Promise.resolve(doc);
|
|
28
|
+
});
|
|
23
29
|
const updatedDocs = await Promise.all(fetchPromises);
|
|
24
30
|
resolve(updatedDocs);
|
|
25
31
|
}
|
|
@@ -29,17 +35,22 @@ export async function buildRuleDocs(endpoint) {
|
|
|
29
35
|
}
|
|
30
36
|
});
|
|
31
37
|
}
|
|
32
|
-
export async function buildFunctionDocs(endpoint) {
|
|
38
|
+
export async function buildFunctionDocs(endpoint, existingDocs) {
|
|
33
39
|
return new Promise(async (resolve, reject) => {
|
|
34
40
|
try {
|
|
35
41
|
const docs = await fetchAllFunctionDocumentation(endpoint);
|
|
36
|
-
const fetchPromises = docs.map(doc =>
|
|
37
|
-
if (
|
|
38
|
-
doc.
|
|
42
|
+
const fetchPromises = docs.map(doc => {
|
|
43
|
+
if (doc.functionId && !existingDocs.includes(doc.functionId)) {
|
|
44
|
+
return fetchFunctionDocumentation(doc.functionId, endpoint).then(fullDoc => {
|
|
45
|
+
if (fullDoc.body) {
|
|
46
|
+
doc.body = fullDoc.body;
|
|
47
|
+
}
|
|
48
|
+
doc.type = DocumentationType.FUNCTION;
|
|
49
|
+
return doc;
|
|
50
|
+
});
|
|
39
51
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}));
|
|
52
|
+
return Promise.resolve(doc);
|
|
53
|
+
});
|
|
43
54
|
const updatedDocs = await Promise.all(fetchPromises);
|
|
44
55
|
resolve(updatedDocs);
|
|
45
56
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Princess Beef Heavy Industries Cowboy Components",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.5.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/cowboy-components.umd.cjs",
|
|
9
9
|
"module": "./dist/cowboy-components.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"d3-shape": "^3.2.0",
|
|
39
39
|
"elkjs": "^0.9.3",
|
|
40
40
|
"marked": "^11.1.1",
|
|
41
|
-
"monaco-editor": "^0.
|
|
41
|
+
"monaco-editor": "^0.52.0",
|
|
42
42
|
"prismjs": "^1.29.0",
|
|
43
43
|
"web-worker": "^1.3.0"
|
|
44
44
|
},
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@types/prismjs": "^1.26.3",
|
|
50
50
|
"rollup-plugin-copy": "^3.5.0",
|
|
51
51
|
"typescript": "^5.3.3",
|
|
52
|
-
"vite": "
|
|
52
|
+
"vite": "5.4.6",
|
|
53
53
|
"vite-plugin-dts": "^3.7.0",
|
|
54
54
|
"vite-plugin-mkcert": "^1.17.5",
|
|
55
55
|
"vite-tsconfig-paths": "^4.2.3"
|