@opensip-cli/dashboard 0.1.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/LICENSE +202 -0
- package/NOTICE +8 -0
- package/README.md +31 -0
- package/dist/__tests__/catalog-provenance.test.d.ts +11 -0
- package/dist/__tests__/catalog-provenance.test.d.ts.map +1 -0
- package/dist/__tests__/catalog-provenance.test.js +130 -0
- package/dist/__tests__/catalog-provenance.test.js.map +1 -0
- package/dist/__tests__/coupling-attribution.test.d.ts +9 -0
- package/dist/__tests__/coupling-attribution.test.d.ts.map +1 -0
- package/dist/__tests__/coupling-attribution.test.js +99 -0
- package/dist/__tests__/coupling-attribution.test.js.map +1 -0
- package/dist/__tests__/dashboard-bundle-weight.test.d.ts +16 -0
- package/dist/__tests__/dashboard-bundle-weight.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-bundle-weight.test.js +73 -0
- package/dist/__tests__/dashboard-bundle-weight.test.js.map +1 -0
- package/dist/__tests__/dashboard-cell-containment.test.d.ts +2 -0
- package/dist/__tests__/dashboard-cell-containment.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-cell-containment.test.js +49 -0
- package/dist/__tests__/dashboard-cell-containment.test.js.map +1 -0
- package/dist/__tests__/dashboard-cytoscape-vendor.test.d.ts +10 -0
- package/dist/__tests__/dashboard-cytoscape-vendor.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-cytoscape-vendor.test.js +40 -0
- package/dist/__tests__/dashboard-cytoscape-vendor.test.js.map +1 -0
- package/dist/__tests__/dashboard-editor-link.test.d.ts +5 -0
- package/dist/__tests__/dashboard-editor-link.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-editor-link.test.js +36 -0
- package/dist/__tests__/dashboard-editor-link.test.js.map +1 -0
- package/dist/__tests__/dashboard-filters.test.d.ts +9 -0
- package/dist/__tests__/dashboard-filters.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-filters.test.js +95 -0
- package/dist/__tests__/dashboard-filters.test.js.map +1 -0
- package/dist/__tests__/dashboard-function-card-singleton.test.d.ts +9 -0
- package/dist/__tests__/dashboard-function-card-singleton.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-function-card-singleton.test.js +87 -0
- package/dist/__tests__/dashboard-function-card-singleton.test.js.map +1 -0
- package/dist/__tests__/dashboard-function-card.test.d.ts +10 -0
- package/dist/__tests__/dashboard-function-card.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-function-card.test.js +403 -0
- package/dist/__tests__/dashboard-function-card.test.js.map +1 -0
- package/dist/__tests__/dashboard-function-row.test.d.ts +11 -0
- package/dist/__tests__/dashboard-function-row.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-function-row.test.js +101 -0
- package/dist/__tests__/dashboard-function-row.test.js.map +1 -0
- package/dist/__tests__/dashboard-generator-graph-catalog.test.d.ts +9 -0
- package/dist/__tests__/dashboard-generator-graph-catalog.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-generator-graph-catalog.test.js +75 -0
- package/dist/__tests__/dashboard-generator-graph-catalog.test.js.map +1 -0
- package/dist/__tests__/dashboard-graph-offline.integration.test.d.ts +13 -0
- package/dist/__tests__/dashboard-graph-offline.integration.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-graph-offline.integration.test.js +55 -0
- package/dist/__tests__/dashboard-graph-offline.integration.test.js.map +1 -0
- package/dist/__tests__/dashboard-graph-scc.test.d.ts +17 -0
- package/dist/__tests__/dashboard-graph-scc.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-graph-scc.test.js +89 -0
- package/dist/__tests__/dashboard-graph-scc.test.js.map +1 -0
- package/dist/__tests__/dashboard-graph-view-model.test.d.ts +12 -0
- package/dist/__tests__/dashboard-graph-view-model.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-graph-view-model.test.js +331 -0
- package/dist/__tests__/dashboard-graph-view-model.test.js.map +1 -0
- package/dist/__tests__/dashboard-help-drawer.test.d.ts +9 -0
- package/dist/__tests__/dashboard-help-drawer.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-help-drawer.test.js +101 -0
- package/dist/__tests__/dashboard-help-drawer.test.js.map +1 -0
- package/dist/__tests__/dashboard-html.test.d.ts +2 -0
- package/dist/__tests__/dashboard-html.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-html.test.js +169 -0
- package/dist/__tests__/dashboard-html.test.js.map +1 -0
- package/dist/__tests__/dashboard-indexes.test.d.ts +9 -0
- package/dist/__tests__/dashboard-indexes.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-indexes.test.js +211 -0
- package/dist/__tests__/dashboard-indexes.test.js.map +1 -0
- package/dist/__tests__/dashboard-path-utils.test.d.ts +6 -0
- package/dist/__tests__/dashboard-path-utils.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-path-utils.test.js +54 -0
- package/dist/__tests__/dashboard-path-utils.test.js.map +1 -0
- package/dist/__tests__/dashboard-search.test.d.ts +5 -0
- package/dist/__tests__/dashboard-search.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-search.test.js +46 -0
- package/dist/__tests__/dashboard-search.test.js.map +1 -0
- package/dist/__tests__/dashboard-sessions.test.d.ts +14 -0
- package/dist/__tests__/dashboard-sessions.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-sessions.test.js +330 -0
- package/dist/__tests__/dashboard-sessions.test.js.map +1 -0
- package/dist/__tests__/dashboard-trace.test.d.ts +5 -0
- package/dist/__tests__/dashboard-trace.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-trace.test.js +147 -0
- package/dist/__tests__/dashboard-trace.test.js.map +1 -0
- package/dist/__tests__/dashboard-validation.integration.test.d.ts +14 -0
- package/dist/__tests__/dashboard-validation.integration.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-validation.integration.test.js +221 -0
- package/dist/__tests__/dashboard-validation.integration.test.js.map +1 -0
- package/dist/__tests__/dashboard-view-conformance.test.d.ts +12 -0
- package/dist/__tests__/dashboard-view-conformance.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-view-conformance.test.js +58 -0
- package/dist/__tests__/dashboard-view-conformance.test.js.map +1 -0
- package/dist/__tests__/dashboard-view-coupling.test.d.ts +7 -0
- package/dist/__tests__/dashboard-view-coupling.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-view-coupling.test.js +381 -0
- package/dist/__tests__/dashboard-view-coupling.test.js.map +1 -0
- package/dist/__tests__/dashboard-view-distribution.test.d.ts +10 -0
- package/dist/__tests__/dashboard-view-distribution.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-view-distribution.test.js +272 -0
- package/dist/__tests__/dashboard-view-distribution.test.js.map +1 -0
- package/dist/__tests__/dashboard-view-graph.test.d.ts +13 -0
- package/dist/__tests__/dashboard-view-graph.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-view-graph.test.js +332 -0
- package/dist/__tests__/dashboard-view-graph.test.js.map +1 -0
- package/dist/__tests__/dashboard-view-template.test.d.ts +21 -0
- package/dist/__tests__/dashboard-view-template.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard-view-template.test.js +153 -0
- package/dist/__tests__/dashboard-view-template.test.js.map +1 -0
- package/dist/__tests__/dashboard.test.d.ts +2 -0
- package/dist/__tests__/dashboard.test.d.ts.map +1 -0
- package/dist/__tests__/dashboard.test.js +129 -0
- package/dist/__tests__/dashboard.test.js.map +1 -0
- package/dist/__tests__/graph-tab.test.d.ts +10 -0
- package/dist/__tests__/graph-tab.test.d.ts.map +1 -0
- package/dist/__tests__/graph-tab.test.js +76 -0
- package/dist/__tests__/graph-tab.test.js.map +1 -0
- package/dist/checks.d.ts +7 -0
- package/dist/checks.d.ts.map +1 -0
- package/dist/checks.js +283 -0
- package/dist/checks.js.map +1 -0
- package/dist/code-paths/__tests__/views-registry.test.d.ts +13 -0
- package/dist/code-paths/__tests__/views-registry.test.d.ts.map +1 -0
- package/dist/code-paths/__tests__/views-registry.test.js +39 -0
- package/dist/code-paths/__tests__/views-registry.test.js.map +1 -0
- package/dist/code-paths/catalog-provenance.d.ts +22 -0
- package/dist/code-paths/catalog-provenance.d.ts.map +1 -0
- package/dist/code-paths/catalog-provenance.js +108 -0
- package/dist/code-paths/catalog-provenance.js.map +1 -0
- package/dist/code-paths/catalog-recipes-tables.d.ts +11 -0
- package/dist/code-paths/catalog-recipes-tables.d.ts.map +1 -0
- package/dist/code-paths/catalog-recipes-tables.js +86 -0
- package/dist/code-paths/catalog-recipes-tables.js.map +1 -0
- package/dist/code-paths/cytoscape-vendor.d.ts +27 -0
- package/dist/code-paths/cytoscape-vendor.d.ts.map +1 -0
- package/dist/code-paths/cytoscape-vendor.js +68 -0
- package/dist/code-paths/cytoscape-vendor.js.map +1 -0
- package/dist/code-paths/editor-link.d.ts +10 -0
- package/dist/code-paths/editor-link.d.ts.map +1 -0
- package/dist/code-paths/editor-link.js +20 -0
- package/dist/code-paths/editor-link.js.map +1 -0
- package/dist/code-paths/filters.d.ts +19 -0
- package/dist/code-paths/filters.d.ts.map +1 -0
- package/dist/code-paths/filters.js +47 -0
- package/dist/code-paths/filters.js.map +1 -0
- package/dist/code-paths/function-card.d.ts +15 -0
- package/dist/code-paths/function-card.d.ts.map +1 -0
- package/dist/code-paths/function-card.js +169 -0
- package/dist/code-paths/function-card.js.map +1 -0
- package/dist/code-paths/function-row.d.ts +17 -0
- package/dist/code-paths/function-row.d.ts.map +1 -0
- package/dist/code-paths/function-row.js +77 -0
- package/dist/code-paths/function-row.js.map +1 -0
- package/dist/code-paths/graph-controls.d.ts +27 -0
- package/dist/code-paths/graph-controls.d.ts.map +1 -0
- package/dist/code-paths/graph-controls.js +257 -0
- package/dist/code-paths/graph-controls.js.map +1 -0
- package/dist/code-paths/graph-scc.d.ts +32 -0
- package/dist/code-paths/graph-scc.d.ts.map +1 -0
- package/dist/code-paths/graph-scc.js +136 -0
- package/dist/code-paths/graph-scc.js.map +1 -0
- package/dist/code-paths/graph-stylesheet.d.ts +22 -0
- package/dist/code-paths/graph-stylesheet.d.ts.map +1 -0
- package/dist/code-paths/graph-stylesheet.js +121 -0
- package/dist/code-paths/graph-stylesheet.js.map +1 -0
- package/dist/code-paths/graph-view-model.d.ts +120 -0
- package/dist/code-paths/graph-view-model.d.ts.map +1 -0
- package/dist/code-paths/graph-view-model.js +199 -0
- package/dist/code-paths/graph-view-model.js.map +1 -0
- package/dist/code-paths/help-drawer.d.ts +18 -0
- package/dist/code-paths/help-drawer.d.ts.map +1 -0
- package/dist/code-paths/help-drawer.js +54 -0
- package/dist/code-paths/help-drawer.js.map +1 -0
- package/dist/code-paths/indexes.d.ts +28 -0
- package/dist/code-paths/indexes.d.ts.map +1 -0
- package/dist/code-paths/indexes.js +97 -0
- package/dist/code-paths/indexes.js.map +1 -0
- package/dist/code-paths/path-utils.d.ts +15 -0
- package/dist/code-paths/path-utils.d.ts.map +1 -0
- package/dist/code-paths/path-utils.js +47 -0
- package/dist/code-paths/path-utils.js.map +1 -0
- package/dist/code-paths/search.d.ts +14 -0
- package/dist/code-paths/search.d.ts.map +1 -0
- package/dist/code-paths/search.js +54 -0
- package/dist/code-paths/search.js.map +1 -0
- package/dist/code-paths/trace.d.ts +11 -0
- package/dist/code-paths/trace.d.ts.map +1 -0
- package/dist/code-paths/trace.js +60 -0
- package/dist/code-paths/trace.js.map +1 -0
- package/dist/code-paths/view-coupling.d.ts +22 -0
- package/dist/code-paths/view-coupling.d.ts.map +1 -0
- package/dist/code-paths/view-coupling.js +218 -0
- package/dist/code-paths/view-coupling.js.map +1 -0
- package/dist/code-paths/view-distribution.d.ts +20 -0
- package/dist/code-paths/view-distribution.d.ts.map +1 -0
- package/dist/code-paths/view-distribution.js +82 -0
- package/dist/code-paths/view-distribution.js.map +1 -0
- package/dist/code-paths/view-graph.d.ts +35 -0
- package/dist/code-paths/view-graph.d.ts.map +1 -0
- package/dist/code-paths/view-graph.js +379 -0
- package/dist/code-paths/view-graph.js.map +1 -0
- package/dist/code-paths/view-template.d.ts +154 -0
- package/dist/code-paths/view-template.d.ts.map +1 -0
- package/dist/code-paths/view-template.js +218 -0
- package/dist/code-paths/view-template.js.map +1 -0
- package/dist/code-paths/views-registry.d.ts +13 -0
- package/dist/code-paths/views-registry.d.ts.map +1 -0
- package/dist/code-paths/views-registry.js +53 -0
- package/dist/code-paths/views-registry.js.map +1 -0
- package/dist/code-paths.d.ts +69 -0
- package/dist/code-paths.d.ts.map +1 -0
- package/dist/code-paths.js +356 -0
- package/dist/code-paths.js.map +1 -0
- package/dist/css/cards.d.ts +9 -0
- package/dist/css/cards.d.ts.map +1 -0
- package/dist/css/cards.js +36 -0
- package/dist/css/cards.js.map +1 -0
- package/dist/css/code-paths.d.ts +9 -0
- package/dist/css/code-paths.d.ts.map +1 -0
- package/dist/css/code-paths.js +111 -0
- package/dist/css/code-paths.js.map +1 -0
- package/dist/css/data-table.d.ts +12 -0
- package/dist/css/data-table.d.ts.map +1 -0
- package/dist/css/data-table.js +103 -0
- package/dist/css/data-table.js.map +1 -0
- package/dist/css/function-card.d.ts +6 -0
- package/dist/css/function-card.d.ts.map +1 -0
- package/dist/css/function-card.js +26 -0
- package/dist/css/function-card.js.map +1 -0
- package/dist/css/help-drawer.d.ts +6 -0
- package/dist/css/help-drawer.d.ts.map +1 -0
- package/dist/css/help-drawer.js +22 -0
- package/dist/css/help-drawer.js.map +1 -0
- package/dist/css/tabs.d.ts +9 -0
- package/dist/css/tabs.d.ts.map +1 -0
- package/dist/css/tabs.js +28 -0
- package/dist/css/tabs.js.map +1 -0
- package/dist/css/theme.d.ts +8 -0
- package/dist/css/theme.d.ts.map +1 -0
- package/dist/css/theme.js +34 -0
- package/dist/css/theme.js.map +1 -0
- package/dist/css.d.ts +13 -0
- package/dist/css.d.ts.map +1 -0
- package/dist/css.js +30 -0
- package/dist/css.js.map +1 -0
- package/dist/generator.d.ts +33 -0
- package/dist/generator.d.ts.map +1 -0
- package/dist/generator.js +161 -0
- package/dist/generator.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/overview.d.ts +13 -0
- package/dist/overview.d.ts.map +1 -0
- package/dist/overview.js +91 -0
- package/dist/overview.js.map +1 -0
- package/dist/recipes.d.ts +6 -0
- package/dist/recipes.d.ts.map +1 -0
- package/dist/recipes.js +68 -0
- package/dist/recipes.js.map +1 -0
- package/dist/sessions.d.ts +6 -0
- package/dist/sessions.d.ts.map +1 -0
- package/dist/sessions.js +288 -0
- package/dist/sessions.js.map +1 -0
- package/dist/shared/el.d.ts +13 -0
- package/dist/shared/el.d.ts.map +1 -0
- package/dist/shared/el.js +27 -0
- package/dist/shared/el.js.map +1 -0
- package/dist/shared/pagination.d.ts +15 -0
- package/dist/shared/pagination.d.ts.map +1 -0
- package/dist/shared/pagination.js +113 -0
- package/dist/shared/pagination.js.map +1 -0
- package/dist/shared/sortable.d.ts +14 -0
- package/dist/shared/sortable.d.ts.map +1 -0
- package/dist/shared/sortable.js +101 -0
- package/dist/shared/sortable.js.map +1 -0
- package/dist/shared/tab-activators.d.ts +16 -0
- package/dist/shared/tab-activators.d.ts.map +1 -0
- package/dist/shared/tab-activators.js +33 -0
- package/dist/shared/tab-activators.js.map +1 -0
- package/dist/shared/tab-bar.d.ts +8 -0
- package/dist/shared/tab-bar.d.ts.map +1 -0
- package/dist/shared/tab-bar.js +20 -0
- package/dist/shared/tab-bar.js.map +1 -0
- package/dist/shared.d.ts +26 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +39 -0
- package/dist/shared.js.map +1 -0
- package/dist/subtab-bar.d.ts +23 -0
- package/dist/subtab-bar.d.ts.map +1 -0
- package/dist/subtab-bar.js +77 -0
- package/dist/subtab-bar.js.map +1 -0
- package/dist/tool-tab-registry.d.ts +76 -0
- package/dist/tool-tab-registry.d.ts.map +1 -0
- package/dist/tool-tab-registry.js +44 -0
- package/dist/tool-tab-registry.js.map +1 -0
- package/dist/tool-tabs-registrations.d.ts +19 -0
- package/dist/tool-tabs-registrations.d.ts.map +1 -0
- package/dist/tool-tabs-registrations.js +46 -0
- package/dist/tool-tabs-registrations.js.map +1 -0
- package/dist/tool-tabs.d.ts +12 -0
- package/dist/tool-tabs.d.ts.map +1 -0
- package/dist/tool-tabs.js +80 -0
- package/dist/tool-tabs.js.map +1 -0
- package/dist/vendor/cytoscape-bundle.js +600 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
OpenSIP CLI
|
|
2
|
+
Copyright 2026 opensip-ai
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
5
|
+
this software except in compliance with the License. A copy of the License is
|
|
6
|
+
included in the LICENSE file and is also available at:
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-package-readmes.mjs — do not edit by hand.
|
|
2
|
+
Change the package's "description" (or the generator template) and run
|
|
3
|
+
`pnpm docs:readmes`. CI enforces sync via `pnpm docs:readmes:check`. -->
|
|
4
|
+
|
|
5
|
+
# @opensip-cli/dashboard
|
|
6
|
+
|
|
7
|
+
> Self-contained HTML dashboard generator for OpenSIP CLI — renders the fit/sim/graph report from session data and graph catalogs
|
|
8
|
+
|
|
9
|
+
This is an **internal library** of the opensip-cli toolkit. It is published so the CLI and tools can depend on it; most users will not install it directly.
|
|
10
|
+
|
|
11
|
+
Part of [**opensip-cli**](https://github.com/opensip-ai/opensip-cli) — an open-source codebase-analysis toolkit: fitness checks (`fit`), static call-graph analysis (`graph`), and simulation (`sim`).
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
Most users install the CLI, which bundles the first-party tools:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
curl -fsSL https://opensip.ai/cli/install.sh | bash
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
This package is published for the CLI and advanced plugin authors; most users should not install `@opensip-cli/dashboard` directly.
|
|
22
|
+
|
|
23
|
+
## Documentation
|
|
24
|
+
|
|
25
|
+
- 📚 Project docs: https://opensip.ai/docs/opensip-cli/
|
|
26
|
+
- 🧭 Package catalog (what every package does): https://github.com/opensip-ai/opensip-cli/blob/v0.1.0/docs/public/70-reference/02-package-catalog.md
|
|
27
|
+
- 📦 Source: https://github.com/opensip-ai/opensip-cli/tree/v0.1.0/packages/dashboard
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
Apache-2.0 © opensip-ai
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vitest-environment jsdom
|
|
3
|
+
*
|
|
4
|
+
* Explore-tab catalog provenance bar. The Explore views render from the single
|
|
5
|
+
* cached catalog (the latest `graph` build, whatever its scope); this bar tells
|
|
6
|
+
* the reader what that catalog covers, so a scoped/stale build (the
|
|
7
|
+
* `graph packages/contracts` footgun) reads as "1 package" instead of looking
|
|
8
|
+
* broken. Values are derived from the embedded catalog itself (ground truth).
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=catalog-provenance.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-provenance.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/catalog-provenance.test.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/// <reference lib="dom" />
|
|
2
|
+
/**
|
|
3
|
+
* @vitest-environment jsdom
|
|
4
|
+
*
|
|
5
|
+
* Explore-tab catalog provenance bar. The Explore views render from the single
|
|
6
|
+
* cached catalog (the latest `graph` build, whatever its scope); this bar tells
|
|
7
|
+
* the reader what that catalog covers, so a scoped/stale build (the
|
|
8
|
+
* `graph packages/contracts` footgun) reads as "1 package" instead of looking
|
|
9
|
+
* broken. Values are derived from the embedded catalog itself (ground truth).
|
|
10
|
+
*/
|
|
11
|
+
import { describe, expect, it, beforeEach } from 'vitest';
|
|
12
|
+
import { dashboardCatalogProvenanceJs } from '../code-paths/catalog-provenance.js';
|
|
13
|
+
import { dashboardFiltersJs } from '../code-paths/filters.js';
|
|
14
|
+
import { dashboardIndexesJs } from '../code-paths/indexes.js';
|
|
15
|
+
import { dashboardPathUtilsJs } from '../code-paths/path-utils.js';
|
|
16
|
+
function loadEnv() {
|
|
17
|
+
const elSrc = `
|
|
18
|
+
function el(tag, attrs, children) {
|
|
19
|
+
const e = document.createElement(tag);
|
|
20
|
+
if (attrs) Object.entries(attrs).forEach(([k,v]) => {
|
|
21
|
+
if (k === 'text') e.textContent = v;
|
|
22
|
+
else if (k === 'class') e.className = v;
|
|
23
|
+
else if (k.startsWith('on')) e.addEventListener(k.slice(2), v);
|
|
24
|
+
else e.setAttribute(k, v);
|
|
25
|
+
});
|
|
26
|
+
if (children) children.forEach(c => { if (typeof c === 'string') e.appendChild(document.createTextNode(c)); else if (c) e.appendChild(c); });
|
|
27
|
+
return e;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
const tail = `return { renderCatalogProvenance };`;
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-implied-eval, sonarjs/code-eval -- Trusted source (our own emitted JS).
|
|
32
|
+
const factory = new Function(elSrc +
|
|
33
|
+
dashboardPathUtilsJs() +
|
|
34
|
+
dashboardIndexesJs() +
|
|
35
|
+
dashboardFiltersJs() +
|
|
36
|
+
dashboardCatalogProvenanceJs() +
|
|
37
|
+
tail);
|
|
38
|
+
return factory();
|
|
39
|
+
}
|
|
40
|
+
function occ(pkg, name) {
|
|
41
|
+
return {
|
|
42
|
+
qualifiedName: name,
|
|
43
|
+
simpleName: name,
|
|
44
|
+
bodyHash: pkg + ':' + name,
|
|
45
|
+
filePath: 'packages/' + pkg + '/src/' + name + '.ts',
|
|
46
|
+
package: '@opensip-cli/' + pkg,
|
|
47
|
+
line: 1,
|
|
48
|
+
column: 0,
|
|
49
|
+
endLine: 5,
|
|
50
|
+
kind: 'function-declaration',
|
|
51
|
+
params: [],
|
|
52
|
+
returnType: null,
|
|
53
|
+
enclosingClass: null,
|
|
54
|
+
decorators: [],
|
|
55
|
+
visibility: 'exported',
|
|
56
|
+
inTestFile: false,
|
|
57
|
+
definedInGenerated: false,
|
|
58
|
+
calls: [],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function catalog(over) {
|
|
62
|
+
return {
|
|
63
|
+
version: '3.0',
|
|
64
|
+
tool: 'graph',
|
|
65
|
+
language: 'typescript',
|
|
66
|
+
builtAt: new Date().toISOString(),
|
|
67
|
+
functions: {},
|
|
68
|
+
...over,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
beforeEach(() => {
|
|
72
|
+
document.body.innerHTML = '';
|
|
73
|
+
});
|
|
74
|
+
describe('catalog provenance bar', () => {
|
|
75
|
+
it('shows a single-package scope (the scoped-run footgun) with the package name inline', () => {
|
|
76
|
+
const env = loadEnv();
|
|
77
|
+
const host = document.createElement('div');
|
|
78
|
+
env.renderCatalogProvenance(host, catalog({
|
|
79
|
+
cacheKey: 'eng=0.1.0|mode=exact|ts-x',
|
|
80
|
+
functions: { a: [occ('contracts', 'a')], b: [occ('contracts', 'b')] },
|
|
81
|
+
}));
|
|
82
|
+
const bar = host.querySelector('.catalog-provenance');
|
|
83
|
+
expect(bar).not.toBeNull();
|
|
84
|
+
const text = bar?.textContent ?? '';
|
|
85
|
+
expect(text).toContain('1 package');
|
|
86
|
+
expect(text).toContain('contracts');
|
|
87
|
+
// 2 occurrences across the single package.
|
|
88
|
+
expect(text).toContain('2');
|
|
89
|
+
// engine parsed from the cache key.
|
|
90
|
+
expect(text.toLowerCase()).toContain('exact');
|
|
91
|
+
});
|
|
92
|
+
it('shows the full multi-package scope as a count (not an inline list)', () => {
|
|
93
|
+
const env = loadEnv();
|
|
94
|
+
const host = document.createElement('div');
|
|
95
|
+
const functions = {};
|
|
96
|
+
for (const p of ['core', 'cli', 'contracts', 'datastore', 'output', 'targeting']) {
|
|
97
|
+
functions[p] = [occ(p, p + 'Fn')];
|
|
98
|
+
}
|
|
99
|
+
env.renderCatalogProvenance(host, catalog({ cacheKey: 'eng=0.1.0|mode=sharded|s-34', functions }));
|
|
100
|
+
const text = host.querySelector('.catalog-provenance')?.textContent ?? '';
|
|
101
|
+
expect(text).toContain('6 packages');
|
|
102
|
+
// Names are NOT inlined past the small-set threshold (kept compact).
|
|
103
|
+
expect(text).not.toContain(': core,');
|
|
104
|
+
expect(text.toLowerCase()).toContain('sharded');
|
|
105
|
+
});
|
|
106
|
+
it('flags fast (approximate) resolution and omits the flag for exact', () => {
|
|
107
|
+
const env = loadEnv();
|
|
108
|
+
const fastHost = document.createElement('div');
|
|
109
|
+
env.renderCatalogProvenance(fastHost, catalog({
|
|
110
|
+
cacheKey: 'eng=0.1.0|mode=exact|x',
|
|
111
|
+
resolutionMode: 'fast',
|
|
112
|
+
functions: { a: [occ('core', 'a')] },
|
|
113
|
+
}));
|
|
114
|
+
expect(fastHost.querySelector('.catalog-provenance')?.textContent ?? '').toContain('approximate');
|
|
115
|
+
const exactHost = document.createElement('div');
|
|
116
|
+
env.renderCatalogProvenance(exactHost, catalog({
|
|
117
|
+
cacheKey: 'eng=0.1.0|mode=exact|x',
|
|
118
|
+
resolutionMode: 'exact',
|
|
119
|
+
functions: { a: [occ('core', 'a')] },
|
|
120
|
+
}));
|
|
121
|
+
expect(exactHost.querySelector('.catalog-provenance')?.textContent ?? '').not.toContain('approximate');
|
|
122
|
+
});
|
|
123
|
+
it('no-ops when there is no catalog', () => {
|
|
124
|
+
const env = loadEnv();
|
|
125
|
+
const host = document.createElement('div');
|
|
126
|
+
env.renderCatalogProvenance(host, null);
|
|
127
|
+
expect(host.querySelector('.catalog-provenance')).toBeNull();
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
//# sourceMappingURL=catalog-provenance.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-provenance.test.js","sourceRoot":"","sources":["../../src/__tests__/catalog-provenance.test.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAQnE,SAAS,OAAO;IACd,MAAM,KAAK,GAAG;;;;;;;;;;;;CAYf,CAAC;IACA,MAAM,IAAI,GAAG,qCAAqC,CAAC;IACnD,yHAAyH;IACzH,MAAM,OAAO,GAAG,IAAI,QAAQ,CAC1B,KAAK;QACH,oBAAoB,EAAE;QACtB,kBAAkB,EAAE;QACpB,kBAAkB,EAAE;QACpB,4BAA4B,EAAE;QAC9B,IAAI,CACP,CAAC;IACF,OAAO,OAAO,EAAS,CAAC;AAC1B,CAAC;AAED,SAAS,GAAG,CAAC,GAAW,EAAE,IAAY;IACpC,OAAO;QACL,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI;QAC1B,QAAQ,EAAE,WAAW,GAA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QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3C,GAAG,CAAC,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACxC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vitest-environment jsdom
|
|
3
|
+
*
|
|
4
|
+
* Coupling-grid attribution: a callee whose body is duplicated across
|
|
5
|
+
* packages must be attributed to the caller's own package, not the
|
|
6
|
+
* byBodyHash collision winner.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=coupling-attribution.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coupling-attribution.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/coupling-attribution.test.ts"],"names":[],"mappings":"AACA;;;;;;GAMG"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/// <reference lib="dom" />
|
|
2
|
+
/**
|
|
3
|
+
* @vitest-environment jsdom
|
|
4
|
+
*
|
|
5
|
+
* Coupling-grid attribution: a callee whose body is duplicated across
|
|
6
|
+
* packages must be attributed to the caller's own package, not the
|
|
7
|
+
* byBodyHash collision winner.
|
|
8
|
+
*/
|
|
9
|
+
import { describe, expect, it } from 'vitest';
|
|
10
|
+
import { dashboardIndexesJs } from '../code-paths/indexes.js';
|
|
11
|
+
import { dashboardPathUtilsJs } from '../code-paths/path-utils.js';
|
|
12
|
+
import { dashboardViewCouplingJs } from '../code-paths/view-coupling.js';
|
|
13
|
+
function loadCouplingEnv() {
|
|
14
|
+
// The coupling template runs `views.push(...)` at eval time and references
|
|
15
|
+
// a handful of dashboard globals; stub the ones it touches at load.
|
|
16
|
+
const stubs = `
|
|
17
|
+
function el() { return { appendChild() {}, addEventListener() {}, removeChild() {}, firstChild: null }; }
|
|
18
|
+
const views = [];
|
|
19
|
+
function makeSectionHeading() { return el(); }
|
|
20
|
+
function openFunctionCard() {}
|
|
21
|
+
function closeFunctionCard() {}
|
|
22
|
+
function passesFilter() { return true; }
|
|
23
|
+
`;
|
|
24
|
+
const tail = `return { buildIndexes, resolveCalleeOcc };`;
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-implied-eval, sonarjs/code-eval -- Trusted, in-repo emitted source.
|
|
26
|
+
const factory = new Function(stubs + dashboardPathUtilsJs() + dashboardIndexesJs() + dashboardViewCouplingJs() + tail);
|
|
27
|
+
return factory();
|
|
28
|
+
}
|
|
29
|
+
function occ(over) {
|
|
30
|
+
return {
|
|
31
|
+
simpleName: 'f',
|
|
32
|
+
line: 1,
|
|
33
|
+
column: 0,
|
|
34
|
+
endLine: 2,
|
|
35
|
+
kind: 'function-declaration',
|
|
36
|
+
params: [],
|
|
37
|
+
returnType: null,
|
|
38
|
+
enclosingClass: null,
|
|
39
|
+
decorators: [],
|
|
40
|
+
visibility: 'exported',
|
|
41
|
+
inTestFile: false,
|
|
42
|
+
definedInGenerated: false,
|
|
43
|
+
calls: [],
|
|
44
|
+
...over,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
describe('coupling callee attribution', () => {
|
|
48
|
+
it('attributes a duplicated-body callee to the caller’s own package', () => {
|
|
49
|
+
const env = loadCouplingEnv();
|
|
50
|
+
// Same body 'H' in pkg-a and pkg-b; caller is in pkg-a.
|
|
51
|
+
const aF = occ({
|
|
52
|
+
bodyHash: 'H',
|
|
53
|
+
filePath: 'packages/pkg-a/src/f.ts',
|
|
54
|
+
qualifiedName: 'packages/pkg-a/src/f.f',
|
|
55
|
+
});
|
|
56
|
+
const bF = occ({
|
|
57
|
+
bodyHash: 'H',
|
|
58
|
+
filePath: 'packages/pkg-b/src/f.ts',
|
|
59
|
+
qualifiedName: 'packages/pkg-b/src/f.f',
|
|
60
|
+
});
|
|
61
|
+
const caller = occ({
|
|
62
|
+
bodyHash: 'C',
|
|
63
|
+
filePath: 'packages/pkg-a/src/call.ts',
|
|
64
|
+
qualifiedName: 'packages/pkg-a/src/call.caller',
|
|
65
|
+
simpleName: 'caller',
|
|
66
|
+
calls: [
|
|
67
|
+
{ to: ['H'], line: 1, column: 0, resolution: 'static', confidence: 'high', text: 'f()' },
|
|
68
|
+
],
|
|
69
|
+
});
|
|
70
|
+
const catalog = { functions: { f: [aF, bF], caller: [caller] } };
|
|
71
|
+
const indexes = env.buildIndexes(catalog);
|
|
72
|
+
const resolved = env.resolveCalleeOcc('H', caller, indexes);
|
|
73
|
+
expect(resolved?.filePath).toBe('packages/pkg-a/src/f.ts'); // caller's package, not the collision winner
|
|
74
|
+
});
|
|
75
|
+
it('falls back deterministically (lowest qualifiedName) when no same-package candidate', () => {
|
|
76
|
+
const env = loadCouplingEnv();
|
|
77
|
+
const aF = occ({
|
|
78
|
+
bodyHash: 'H',
|
|
79
|
+
filePath: 'packages/pkg-a/src/f.ts',
|
|
80
|
+
qualifiedName: 'packages/pkg-a/src/f.f',
|
|
81
|
+
});
|
|
82
|
+
const bF = occ({
|
|
83
|
+
bodyHash: 'H',
|
|
84
|
+
filePath: 'packages/pkg-b/src/f.ts',
|
|
85
|
+
qualifiedName: 'packages/pkg-b/src/f.f',
|
|
86
|
+
});
|
|
87
|
+
const caller = occ({
|
|
88
|
+
bodyHash: 'C',
|
|
89
|
+
filePath: 'packages/pkg-z/src/call.ts',
|
|
90
|
+
qualifiedName: 'packages/pkg-z/src/call.caller',
|
|
91
|
+
simpleName: 'caller',
|
|
92
|
+
});
|
|
93
|
+
const catalog = { functions: { f: [bF, aF], caller: [caller] } };
|
|
94
|
+
const indexes = env.buildIndexes(catalog);
|
|
95
|
+
const resolved = env.resolveCalleeOcc('H', caller, indexes);
|
|
96
|
+
expect(resolved?.qualifiedName).toBe('packages/pkg-a/src/f.f'); // deterministic lowest
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
//# sourceMappingURL=coupling-attribution.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coupling-attribution.test.js","sourceRoot":"","sources":["../../src/__tests__/coupling-attribution.test.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAgBzE,SAAS,eAAe;IACtB,2EAA2E;IAC3E,oEAAoE;IACpE,MAAM,KAAK,GAAG;;;;;;;CAOf,CAAC;IACA,MAAM,IAAI,GAAG,4CAA4C,CAAC;IAC1D,qHAAqH;IACrH,MAAM,OAAO,GAAG,IAAI,QAAQ,CAC1B,KAAK,GAAG,oBAAoB,EAAE,GAAG,kBAAkB,EAAE,GAAG,uBAAuB,EAAE,GAAG,IAAI,CACzF,CAAC;IACF,OAAO,OAAO,EAAiB,CAAC;AAClC,CAAC;AAED,SAAS,GAAG,CACV,IAIC;IAED,OAAO;QACL,UAAU,EAAE,GAAG;QACf,IAAI,EAAE,CAAC;QACP,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,sBAAsB;QAC5B,MAAM,EAAE,EAAE;QACV,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,IAAI;QACpB,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,KAAK,EAAE,EAAE;QACT,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,EAAE,CAAC,iEAAiE,EAAE,GAAG,EAAE;QACzE,MA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E,GAAG;YACb,QAAQ,EAAE,yBAAyB;YACnC,aAAa,EAAE,wBAAwB;SACxC,CAAC,CAAC;QACH,MAAM,EAAE,GAAG,GAAG,CAAC;YACb,QAAQ,EAAE,GAAG;YACb,QAAQ,EAAE,yBAAyB;YACnC,aAAa,EAAE,wBAAwB;SACxC,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,GAAG,CAAC;YACjB,QAAQ,EAAE,GAAG;YACb,QAAQ,EAAE,4BAA4B;YACtC,aAAa,EAAE,gCAAgC;YAC/C,UAAU,EAAE,QAAQ;SACrB,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,EAA6B,CAAC;QAC5F,MAAM,OAAO,GAAG,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC1C,MAAM,QAAQ,GAAG,GAAG,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5D,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,uBAAuB;IACzF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle-weight CI gate.
|
|
3
|
+
*
|
|
4
|
+
* The Graph view ships a vendored Cytoscape renderer (~482 KB) plus a
|
|
5
|
+
* per-report view-model JSON blob. These assertions fail CI if either
|
|
6
|
+
* grows past the Phase 0 budget, so a careless dependency bump or schema
|
|
7
|
+
* bloat is caught before it lands in every generated report.
|
|
8
|
+
*
|
|
9
|
+
* Budgets (Phase 0 §1 / §4.5):
|
|
10
|
+
* - vendor bundle raw: <= 600 KB
|
|
11
|
+
* - vendor + view emitter JS: <= 650 KB (BUDGET_KB + 50, accounts for
|
|
12
|
+
* view-graph.ts's own emitted JS string)
|
|
13
|
+
* - view-model JSON per element: within the §4.5 per-node/edge estimates
|
|
14
|
+
*/
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=dashboard-bundle-weight.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-bundle-weight.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/dashboard-bundle-weight.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle-weight CI gate.
|
|
3
|
+
*
|
|
4
|
+
* The Graph view ships a vendored Cytoscape renderer (~482 KB) plus a
|
|
5
|
+
* per-report view-model JSON blob. These assertions fail CI if either
|
|
6
|
+
* grows past the Phase 0 budget, so a careless dependency bump or schema
|
|
7
|
+
* bloat is caught before it lands in every generated report.
|
|
8
|
+
*
|
|
9
|
+
* Budgets (Phase 0 §1 / §4.5):
|
|
10
|
+
* - vendor bundle raw: <= 600 KB
|
|
11
|
+
* - vendor + view emitter JS: <= 650 KB (BUDGET_KB + 50, accounts for
|
|
12
|
+
* view-graph.ts's own emitted JS string)
|
|
13
|
+
* - view-model JSON per element: within the §4.5 per-node/edge estimates
|
|
14
|
+
*/
|
|
15
|
+
import { readFileSync } from 'node:fs';
|
|
16
|
+
import { dirname, join } from 'node:path';
|
|
17
|
+
import { fileURLToPath } from 'node:url';
|
|
18
|
+
import { describe, expect, it } from 'vitest';
|
|
19
|
+
import { dashboardCytoscapeVendorJs } from '../code-paths/cytoscape-vendor.js';
|
|
20
|
+
import { projectCatalogToGraphViewModel } from '../code-paths/graph-view-model.js';
|
|
21
|
+
import { dashboardViewGraphJs } from '../code-paths/view-graph.js';
|
|
22
|
+
/** Phase 0 §1 raw-byte budget for the vendor bundle. */
|
|
23
|
+
const BUDGET_KB = 600;
|
|
24
|
+
const KB = 1024;
|
|
25
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
26
|
+
function loadFixture() {
|
|
27
|
+
const candidates = [
|
|
28
|
+
join(HERE, 'fixtures', 'catalog-small.json'),
|
|
29
|
+
join(HERE, '..', '..', 'src', '__tests__', 'fixtures', 'catalog-small.json'),
|
|
30
|
+
];
|
|
31
|
+
for (const p of candidates) {
|
|
32
|
+
try {
|
|
33
|
+
return JSON.parse(readFileSync(p, 'utf8'));
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
// next
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
throw new Error('catalog-small.json fixture not found');
|
|
40
|
+
}
|
|
41
|
+
function size(s) {
|
|
42
|
+
return Buffer.byteLength(s, 'utf8');
|
|
43
|
+
}
|
|
44
|
+
describe('bundle weight gate', () => {
|
|
45
|
+
it('vendor bundle stays within the raw-byte budget', () => {
|
|
46
|
+
const bytes = size(dashboardCytoscapeVendorJs());
|
|
47
|
+
const kb = Math.round(bytes / KB);
|
|
48
|
+
expect(bytes, `vendor bundle ${kb} KB exceeds ${BUDGET_KB} KB budget`).toBeLessThanOrEqual(BUDGET_KB * KB);
|
|
49
|
+
});
|
|
50
|
+
it('vendor + Graph view emitter together stay within budget + 50 KB', () => {
|
|
51
|
+
const bytes = size(dashboardCytoscapeVendorJs()) + size(dashboardViewGraphJs());
|
|
52
|
+
const kb = Math.round(bytes / KB);
|
|
53
|
+
const limit = (BUDGET_KB + 50) * KB;
|
|
54
|
+
expect(bytes, `vendor + view JS ${kb} KB exceeds ${BUDGET_KB + 50} KB budget`).toBeLessThanOrEqual(limit);
|
|
55
|
+
});
|
|
56
|
+
it('the Graph view emitter JS is a small fraction of the bundle', () => {
|
|
57
|
+
// Guard against the view emitter itself ballooning (e.g. an accidental
|
|
58
|
+
// inlined data blob). It is hand-written JS; tens of KB, not hundreds.
|
|
59
|
+
const viewKb = size(dashboardViewGraphJs()) / KB;
|
|
60
|
+
expect(viewKb).toBeLessThan(50);
|
|
61
|
+
});
|
|
62
|
+
it('projected (package-level) view-model JSON stays within the per-node/edge byte budget', () => {
|
|
63
|
+
const vm = projectCatalogToGraphViewModel(loadFixture());
|
|
64
|
+
const bytes = size(JSON.stringify(vm));
|
|
65
|
+
// Package nodes are slim ({id,label,totalCoupling,sccId}) and there are
|
|
66
|
+
// few of them — fixed JSON overhead dominates at this scale, so the
|
|
67
|
+
// per-element estimate carries a generous constant floor.
|
|
68
|
+
const budget = Math.round((vm.nodes.length * 160 + vm.edges.length * 100) * 1.5) + 1024;
|
|
69
|
+
const perNode = vm.nodes.length > 0 ? bytes / vm.nodes.length : 0;
|
|
70
|
+
expect(bytes, `view-model ${bytes} B (~${Math.round(perNode)} B/node) exceeds ${budget} B budget`).toBeLessThan(budget);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=dashboard-bundle-weight.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-bundle-weight.test.js","sourceRoot":"","sources":["../../src/__tests__/dashboard-bundle-weight.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAInE,wDAAwD;AACxD,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,EAAE,GAAG,IAAI,CAAC;AAEhB,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,G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+1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-cell-containment.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/dashboard-cell-containment.test.ts"],"names":[],"mappings":""}
|