@brad-frost-web/eddie-reporter 0.69.0 → 0.71.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 +25 -1
- package/dist/catalog.d.ts +34 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +38 -0
- package/dist/catalog.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/known-tags.json +187 -0
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +7 -1
- package/dist/report.js.map +1 -1
- package/dist/scanner.d.ts +18 -0
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +29 -6
- package/dist/scanner.js.map +1 -1
- package/dist/types.d.ts +13 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -146,13 +146,37 @@ await sendReport(report, { endpoint: process.env.EDDIE_REPORT_ENDPOINT });
|
|
|
146
146
|
"recipes": { "ed-r-site-header": 1 },
|
|
147
147
|
"pages": { "ed-p-app-dashboard": 1 },
|
|
148
148
|
"tokens": { "--ed-theme-color-content-default": 63 },
|
|
149
|
+
"unknownPrefixed": { "ed-slide": 12 },
|
|
149
150
|
"filesScanned": 210,
|
|
150
151
|
"filesMatched": 47
|
|
151
152
|
},
|
|
152
|
-
"totals": { "distinctComponents": 2, "distinctRecipes": 1, "distinctPages": 1, "distinctTokens": 1, "occurrences": 107 }
|
|
153
|
+
"totals": { "distinctComponents": 2, "distinctRecipes": 1, "distinctPages": 1, "distinctTokens": 1, "occurrences": 107, "distinctUnknownPrefixed": 1 }
|
|
153
154
|
}
|
|
154
155
|
```
|
|
155
156
|
|
|
157
|
+
### A product's own `ed-*` elements are not Eddie usage
|
|
158
|
+
|
|
159
|
+
The `ed-` prefix means "in Eddie's catalog". A product that defines its own
|
|
160
|
+
custom elements under it — Eddie Slides shipped fourteen, `ed-slide`,
|
|
161
|
+
`ed-robot`, `ed-r-site-frame` among them — used to have them counted as Eddie
|
|
162
|
+
components, and the Brain could not tell them from the real thing
|
|
163
|
+
([#2192](https://github.com/Brad-Frost-Web/eddie-design-system/issues/2192)).
|
|
164
|
+
|
|
165
|
+
The reporter now ships a snapshot of the catalog (`dist/known-tags.json`,
|
|
166
|
+
generated at build time from the Brain's graph for the Eddie release it was
|
|
167
|
+
published with). An `ed-*` / `ed-r-*` / `ed-p-*` tag outside it goes to
|
|
168
|
+
`usage.unknownPrefixed` instead of a usage bucket, counts as zero Eddie usage,
|
|
169
|
+
and is left out of `totals.occurrences`. The Brain surfaces the bucket on the
|
|
170
|
+
product's roll-up and in `eddie_get_activity`'s `unrecognised` stats, and
|
|
171
|
+
`eddie_validate_file` warns on the same tags in source.
|
|
172
|
+
|
|
173
|
+
Two readings of an entry, and the fix for each: it is the product's element,
|
|
174
|
+
so give it the product's own prefix (`es-` for Eddie Slides) — or it is
|
|
175
|
+
Eddie's and newer than the installed reporter, so update the reporter. A
|
|
176
|
+
catalog of your own can be passed as `knownTags` to `scanUsage` /
|
|
177
|
+
`buildReport`; a reporter running from source without a built snapshot omits
|
|
178
|
+
the field, and the Brain partitions that report by its own catalog instead.
|
|
179
|
+
|
|
156
180
|
## The bigger picture
|
|
157
181
|
|
|
158
182
|
This reporter is the first leg of a two-way system↔product relationship. See
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* catalog — the tags Eddie actually ships, so the scanner can tell a product's
|
|
3
|
+
* own `ed-*` element from Eddie's (#2192).
|
|
4
|
+
*
|
|
5
|
+
* The reporter is zero-dependency and runs inside downstream products, so it
|
|
6
|
+
* cannot ask the Brain. Instead the build step (`scripts/build-known-tags.mjs`)
|
|
7
|
+
* snapshots every tag in the Brain's committed graph (`.eddie-brain/
|
|
8
|
+
* components.json` — components, recipes and page templates alike) into
|
|
9
|
+
* `dist/known-tags.json`, which ships with the package. A reporter therefore
|
|
10
|
+
* knows the catalog of the Eddie release it was published with: the fleet
|
|
11
|
+
* keeps the two in lockstep, and a product running a newer Eddie than its
|
|
12
|
+
* reporter sees that release's new tags in `unknownPrefixed` until it updates
|
|
13
|
+
* — a visible nudge, not a silent miscount.
|
|
14
|
+
*
|
|
15
|
+
* Nothing here throws. When the snapshot is missing (running from source, a
|
|
16
|
+
* build that skipped the step) the loader returns `undefined` and the scanner
|
|
17
|
+
* counts every tag at face value, exactly as it did before the catalog existed.
|
|
18
|
+
*/
|
|
19
|
+
/** The shape `scripts/build-known-tags.mjs` writes. */
|
|
20
|
+
export interface KnownTagsSnapshot {
|
|
21
|
+
/** Where the tags came from, for a reader of the JSON. */
|
|
22
|
+
source: string;
|
|
23
|
+
/** The Eddie release whose catalog this is (the reporter's own version). */
|
|
24
|
+
eddieVersion: string;
|
|
25
|
+
/** Every catalog tag, lowercased and sorted. */
|
|
26
|
+
tags: string[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Load the bundled catalog as a Set of lowercased tags, or `undefined` when
|
|
30
|
+
* there is none to load. `from` is injectable for tests and for products that
|
|
31
|
+
* want to point the reporter at a catalog of their own.
|
|
32
|
+
*/
|
|
33
|
+
export declare function loadKnownTags(from?: string | URL): Set<string> | undefined;
|
|
34
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,uDAAuD;AACvD,MAAM,WAAW,iBAAiB;IAChC,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAKD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,GAAE,MAAM,GAAG,GAAsB,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,SAAS,CAS5F"}
|
package/dist/catalog.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* catalog — the tags Eddie actually ships, so the scanner can tell a product's
|
|
3
|
+
* own `ed-*` element from Eddie's (#2192).
|
|
4
|
+
*
|
|
5
|
+
* The reporter is zero-dependency and runs inside downstream products, so it
|
|
6
|
+
* cannot ask the Brain. Instead the build step (`scripts/build-known-tags.mjs`)
|
|
7
|
+
* snapshots every tag in the Brain's committed graph (`.eddie-brain/
|
|
8
|
+
* components.json` — components, recipes and page templates alike) into
|
|
9
|
+
* `dist/known-tags.json`, which ships with the package. A reporter therefore
|
|
10
|
+
* knows the catalog of the Eddie release it was published with: the fleet
|
|
11
|
+
* keeps the two in lockstep, and a product running a newer Eddie than its
|
|
12
|
+
* reporter sees that release's new tags in `unknownPrefixed` until it updates
|
|
13
|
+
* — a visible nudge, not a silent miscount.
|
|
14
|
+
*
|
|
15
|
+
* Nothing here throws. When the snapshot is missing (running from source, a
|
|
16
|
+
* build that skipped the step) the loader returns `undefined` and the scanner
|
|
17
|
+
* counts every tag at face value, exactly as it did before the catalog existed.
|
|
18
|
+
*/
|
|
19
|
+
import { readFileSync } from 'node:fs';
|
|
20
|
+
/** Where the build step puts the snapshot, relative to the compiled module. */
|
|
21
|
+
const BUNDLED_SNAPSHOT = new URL('./known-tags.json', import.meta.url);
|
|
22
|
+
/**
|
|
23
|
+
* Load the bundled catalog as a Set of lowercased tags, or `undefined` when
|
|
24
|
+
* there is none to load. `from` is injectable for tests and for products that
|
|
25
|
+
* want to point the reporter at a catalog of their own.
|
|
26
|
+
*/
|
|
27
|
+
export function loadKnownTags(from = BUNDLED_SNAPSHOT) {
|
|
28
|
+
try {
|
|
29
|
+
const parsed = JSON.parse(readFileSync(from, 'utf-8'));
|
|
30
|
+
if (!Array.isArray(parsed.tags))
|
|
31
|
+
return undefined;
|
|
32
|
+
return new Set(parsed.tags.filter((t) => typeof t === 'string').map((t) => t.toLowerCase()));
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAYvC,+EAA+E;AAC/E,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEvE;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAqB,gBAAgB;IACjE,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAA+B,CAAC;QACrF,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;YAAE,OAAO,SAAS,CAAC;QAElD,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAC5G,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export { scanUsage } from './scanner.js';
|
|
12
12
|
export type { ScanOptions, ScanResult } from './scanner.js';
|
|
13
|
+
export { loadKnownTags } from './catalog.js';
|
|
14
|
+
export type { KnownTagsSnapshot } from './catalog.js';
|
|
13
15
|
export { resolveProductIdentity, resolveEddieDependencies } from './product.js';
|
|
14
16
|
export { buildReport, REPORTER_VERSION } from './report.js';
|
|
15
17
|
export type { BuildReportOptions } from './report.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE5D,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,YAAY,EACV,WAAW,EACX,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,YAAY,EACV,WAAW,EACX,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* exported for programmatic use inside a product's own build tooling.
|
|
10
10
|
*/
|
|
11
11
|
export { scanUsage } from './scanner.js';
|
|
12
|
+
export { loadKnownTags } from './catalog.js';
|
|
12
13
|
export { resolveProductIdentity, resolveEddieDependencies } from './product.js';
|
|
13
14
|
export { buildReport, REPORTER_VERSION } from './report.js';
|
|
14
15
|
export { sendReport } from './transport.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG5D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG5D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": ".eddie-brain/components.json",
|
|
3
|
+
"eddieVersion": "0.71.0",
|
|
4
|
+
"tags": [
|
|
5
|
+
"ed-accordion",
|
|
6
|
+
"ed-accordion-panel",
|
|
7
|
+
"ed-alert",
|
|
8
|
+
"ed-avatar",
|
|
9
|
+
"ed-badge",
|
|
10
|
+
"ed-band",
|
|
11
|
+
"ed-black-friday-banner",
|
|
12
|
+
"ed-black-friday-modal",
|
|
13
|
+
"ed-box",
|
|
14
|
+
"ed-breadcrumbs",
|
|
15
|
+
"ed-breadcrumbs-item",
|
|
16
|
+
"ed-button",
|
|
17
|
+
"ed-button-group",
|
|
18
|
+
"ed-card",
|
|
19
|
+
"ed-checkbox-field",
|
|
20
|
+
"ed-checkbox-field-item",
|
|
21
|
+
"ed-cluster",
|
|
22
|
+
"ed-code",
|
|
23
|
+
"ed-color-picker",
|
|
24
|
+
"ed-combobox",
|
|
25
|
+
"ed-counter",
|
|
26
|
+
"ed-datepicker-calendar",
|
|
27
|
+
"ed-datepicker-field",
|
|
28
|
+
"ed-datepicker-mark",
|
|
29
|
+
"ed-datepicker-range",
|
|
30
|
+
"ed-dot",
|
|
31
|
+
"ed-drawer",
|
|
32
|
+
"ed-feature",
|
|
33
|
+
"ed-field-note",
|
|
34
|
+
"ed-figure",
|
|
35
|
+
"ed-file-upload",
|
|
36
|
+
"ed-footer",
|
|
37
|
+
"ed-global-nav",
|
|
38
|
+
"ed-global-nav-item",
|
|
39
|
+
"ed-grid",
|
|
40
|
+
"ed-grid-item",
|
|
41
|
+
"ed-header",
|
|
42
|
+
"ed-heading",
|
|
43
|
+
"ed-hero",
|
|
44
|
+
"ed-hr",
|
|
45
|
+
"ed-icon",
|
|
46
|
+
"ed-icon-link-list",
|
|
47
|
+
"ed-icon-link-list-item",
|
|
48
|
+
"ed-image",
|
|
49
|
+
"ed-inline-checkbox",
|
|
50
|
+
"ed-kbd",
|
|
51
|
+
"ed-key-value-table",
|
|
52
|
+
"ed-key-value-table-row",
|
|
53
|
+
"ed-layout",
|
|
54
|
+
"ed-layout-container",
|
|
55
|
+
"ed-layout-section",
|
|
56
|
+
"ed-linelength-container",
|
|
57
|
+
"ed-link-list",
|
|
58
|
+
"ed-link-list-item",
|
|
59
|
+
"ed-list",
|
|
60
|
+
"ed-list-item",
|
|
61
|
+
"ed-loading-indicator",
|
|
62
|
+
"ed-logo",
|
|
63
|
+
"ed-main",
|
|
64
|
+
"ed-media-block",
|
|
65
|
+
"ed-media-scrubber",
|
|
66
|
+
"ed-menu",
|
|
67
|
+
"ed-menu-separator",
|
|
68
|
+
"ed-modal",
|
|
69
|
+
"ed-nav-container",
|
|
70
|
+
"ed-p-app-dashboard",
|
|
71
|
+
"ed-p-article",
|
|
72
|
+
"ed-p-authentication",
|
|
73
|
+
"ed-p-chat",
|
|
74
|
+
"ed-p-dashboard",
|
|
75
|
+
"ed-p-detail",
|
|
76
|
+
"ed-p-form",
|
|
77
|
+
"ed-p-grid",
|
|
78
|
+
"ed-p-homepage",
|
|
79
|
+
"ed-p-job",
|
|
80
|
+
"ed-p-pricing",
|
|
81
|
+
"ed-p-reference",
|
|
82
|
+
"ed-p-settings",
|
|
83
|
+
"ed-p-visualzzz-background",
|
|
84
|
+
"ed-p-wizard",
|
|
85
|
+
"ed-p-workspace",
|
|
86
|
+
"ed-page",
|
|
87
|
+
"ed-page-header",
|
|
88
|
+
"ed-pagination",
|
|
89
|
+
"ed-pagination-item",
|
|
90
|
+
"ed-popover",
|
|
91
|
+
"ed-primary-nav",
|
|
92
|
+
"ed-primary-nav-item",
|
|
93
|
+
"ed-progress",
|
|
94
|
+
"ed-quote",
|
|
95
|
+
"ed-r-ad",
|
|
96
|
+
"ed-r-article-card",
|
|
97
|
+
"ed-r-audio-player",
|
|
98
|
+
"ed-r-avatar-block",
|
|
99
|
+
"ed-r-bar-chart",
|
|
100
|
+
"ed-r-bento",
|
|
101
|
+
"ed-r-bento-item",
|
|
102
|
+
"ed-r-chunky-checkbox",
|
|
103
|
+
"ed-r-doughnut",
|
|
104
|
+
"ed-r-example-form",
|
|
105
|
+
"ed-r-icon-card",
|
|
106
|
+
"ed-r-line-chart",
|
|
107
|
+
"ed-r-newsletter-signup",
|
|
108
|
+
"ed-r-page-banner",
|
|
109
|
+
"ed-r-project-card",
|
|
110
|
+
"ed-r-projection",
|
|
111
|
+
"ed-r-promo-block",
|
|
112
|
+
"ed-r-search-form",
|
|
113
|
+
"ed-r-site-footer",
|
|
114
|
+
"ed-r-site-header",
|
|
115
|
+
"ed-r-slide-template-card",
|
|
116
|
+
"ed-r-speaking-card",
|
|
117
|
+
"ed-r-stat-card",
|
|
118
|
+
"ed-r-theme-customizer",
|
|
119
|
+
"ed-r-theme-switcher",
|
|
120
|
+
"ed-r-thumbnail",
|
|
121
|
+
"ed-r-timeline-node",
|
|
122
|
+
"ed-r-timeline-node-art",
|
|
123
|
+
"ed-r-timeline-node-blog",
|
|
124
|
+
"ed-r-timeline-node-book",
|
|
125
|
+
"ed-r-timeline-node-client",
|
|
126
|
+
"ed-r-timeline-node-concert",
|
|
127
|
+
"ed-r-timeline-node-course",
|
|
128
|
+
"ed-r-timeline-node-link",
|
|
129
|
+
"ed-r-timeline-node-location",
|
|
130
|
+
"ed-r-timeline-node-milestone",
|
|
131
|
+
"ed-r-timeline-node-newsletter",
|
|
132
|
+
"ed-r-timeline-node-note",
|
|
133
|
+
"ed-r-timeline-node-playlist",
|
|
134
|
+
"ed-r-timeline-node-podcast",
|
|
135
|
+
"ed-r-timeline-node-song",
|
|
136
|
+
"ed-r-timeline-node-speaking",
|
|
137
|
+
"ed-r-timeline-node-video",
|
|
138
|
+
"ed-r-todo-list",
|
|
139
|
+
"ed-r-transport-button",
|
|
140
|
+
"ed-r-vertical-site-header",
|
|
141
|
+
"ed-r-video-card",
|
|
142
|
+
"ed-r-video-embed",
|
|
143
|
+
"ed-r-visualzzz",
|
|
144
|
+
"ed-r-viz-controls",
|
|
145
|
+
"ed-r-wah-link-list",
|
|
146
|
+
"ed-r-wah-logo",
|
|
147
|
+
"ed-r-wah-site-footer",
|
|
148
|
+
"ed-r-wah-site-header",
|
|
149
|
+
"ed-r-wheel-of-life",
|
|
150
|
+
"ed-radio-field",
|
|
151
|
+
"ed-radio-field-item",
|
|
152
|
+
"ed-range",
|
|
153
|
+
"ed-scroller",
|
|
154
|
+
"ed-search-form",
|
|
155
|
+
"ed-section",
|
|
156
|
+
"ed-select-field",
|
|
157
|
+
"ed-show-hide",
|
|
158
|
+
"ed-show-more",
|
|
159
|
+
"ed-single-field-form",
|
|
160
|
+
"ed-skeleton",
|
|
161
|
+
"ed-stack",
|
|
162
|
+
"ed-tab",
|
|
163
|
+
"ed-table",
|
|
164
|
+
"ed-table-body",
|
|
165
|
+
"ed-table-cell",
|
|
166
|
+
"ed-table-header",
|
|
167
|
+
"ed-table-header-cell",
|
|
168
|
+
"ed-table-object",
|
|
169
|
+
"ed-table-row",
|
|
170
|
+
"ed-tabs",
|
|
171
|
+
"ed-tag",
|
|
172
|
+
"ed-tag-list",
|
|
173
|
+
"ed-text-field",
|
|
174
|
+
"ed-text-link",
|
|
175
|
+
"ed-text-passage",
|
|
176
|
+
"ed-textarea-field",
|
|
177
|
+
"ed-timeline",
|
|
178
|
+
"ed-timeline-node",
|
|
179
|
+
"ed-toast",
|
|
180
|
+
"ed-toggle",
|
|
181
|
+
"ed-toolbar",
|
|
182
|
+
"ed-tooltip",
|
|
183
|
+
"ed-tooltip-trigger",
|
|
184
|
+
"ed-utility-nav",
|
|
185
|
+
"ed-utility-nav-item"
|
|
186
|
+
]
|
|
187
|
+
}
|
package/dist/report.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3D,OAAO,EAAiB,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,uDAAuD;IACvD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAMD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,WAAW,CAiCzE"}
|
package/dist/report.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* resolved product identity and declared Eddie dependencies.
|
|
4
4
|
*/
|
|
5
5
|
import { scanUsage } from './scanner.js';
|
|
6
|
+
import { loadKnownTags } from './catalog.js';
|
|
6
7
|
import { resolveEddieDependencies, resolveProductIdentity } from './product.js';
|
|
7
8
|
import { REPORT_SCHEMA } from './types.js';
|
|
8
9
|
import { REPORTER_VERSION } from './version.js';
|
|
@@ -18,9 +19,13 @@ export function buildReport(options = {}) {
|
|
|
18
19
|
const dir = options.dir ?? process.cwd();
|
|
19
20
|
const event = options.event ?? 'manual';
|
|
20
21
|
const generatedAt = options.now ?? new Date().toISOString();
|
|
21
|
-
|
|
22
|
+
// The catalog bundled with this release, unless the caller brought one
|
|
23
|
+
// (#2192). With none to be had, every tag counts — the pre-catalog report.
|
|
24
|
+
const knownTags = options.knownTags ?? loadKnownTags();
|
|
25
|
+
const usage = scanUsage(dir, { ...options, knownTags });
|
|
22
26
|
const product = resolveProductIdentity(dir);
|
|
23
27
|
const eddie = resolveEddieDependencies(dir);
|
|
28
|
+
// A product's own ed-* elements are not Eddie usage and are not in here.
|
|
24
29
|
const occurrences = sum(usage.components) + sum(usage.recipes) + sum(usage.pages) + sum(usage.tokens);
|
|
25
30
|
return {
|
|
26
31
|
schema: REPORT_SCHEMA,
|
|
@@ -36,6 +41,7 @@ export function buildReport(options = {}) {
|
|
|
36
41
|
distinctPages: distinct(usage.pages),
|
|
37
42
|
distinctTokens: distinct(usage.tokens),
|
|
38
43
|
occurrences,
|
|
44
|
+
...(usage.unknownPrefixed ? { distinctUnknownPrefixed: distinct(usage.unknownPrefixed) } : {}),
|
|
39
45
|
},
|
|
40
46
|
};
|
|
41
47
|
}
|
package/dist/report.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAoB,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,aAAa,EAAsC,MAAM,YAAY,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAc5B,MAAM,QAAQ,GAAG,CAAC,CAAyB,EAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAC9E,MAAM,GAAG,GAAG,CAAC,CAAyB,EAAU,EAAE,CAChD,MAAM,CAAC,MAAM,CAAC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AC,CAAC,CAAC,EAAE,CAAC;SAC/F;KACF,CAAC;AACJ,CAAC"}
|
package/dist/scanner.d.ts
CHANGED
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
* ed-r-* → recipes, ed-p-* → pages, everything else ed-* → components.
|
|
14
14
|
* - `--ed-*` custom-property references (token usage).
|
|
15
15
|
* Both are counted by occurrence, across every scanned file.
|
|
16
|
+
*
|
|
17
|
+
* WHAT IT SETS ASIDE (#2192): given the catalog (`knownTags`), an `ed-*` tag
|
|
18
|
+
* Eddie does not ship — a product's own element under Eddie's prefix, like
|
|
19
|
+
* Eddie Slides' `ed-slide` and `ed-robot` — is filed in `unknownPrefixed`
|
|
20
|
+
* instead of a usage bucket, so it counts as zero Eddie usage. Without a
|
|
21
|
+
* catalog every tag is taken at face value, as before.
|
|
16
22
|
*/
|
|
17
23
|
export interface ScanOptions {
|
|
18
24
|
/** Skip files larger than this many bytes (default 2 MiB). Guards against minified bundles. */
|
|
@@ -36,12 +42,24 @@ export interface ScanOptions {
|
|
|
36
42
|
* dropped. Matching is case-sensitive, like the filesystems CI runs on.
|
|
37
43
|
*/
|
|
38
44
|
ignorePaths?: string[];
|
|
45
|
+
/**
|
|
46
|
+
* The tags Eddie ships (any case). When given, an `ed-*` tag outside this
|
|
47
|
+
* set is a consumer-local element under Eddie's prefix (#2192): it goes to
|
|
48
|
+
* `unknownPrefixed`, not to a usage bucket. `buildReport` supplies the
|
|
49
|
+
* catalog bundled with the package; omit it here and every tag counts.
|
|
50
|
+
*/
|
|
51
|
+
knownTags?: Iterable<string>;
|
|
39
52
|
}
|
|
40
53
|
export interface ScanResult {
|
|
41
54
|
components: Record<string, number>;
|
|
42
55
|
recipes: Record<string, number>;
|
|
43
56
|
pages: Record<string, number>;
|
|
44
57
|
tokens: Record<string, number>;
|
|
58
|
+
/**
|
|
59
|
+
* `ed-*` tags that are not in the catalog → occurrence count (#2192).
|
|
60
|
+
* Present only when the scan had a catalog to check against.
|
|
61
|
+
*/
|
|
62
|
+
unknownPrefixed?: Record<string, number>;
|
|
45
63
|
filesScanned: number;
|
|
46
64
|
filesMatched: number;
|
|
47
65
|
}
|
package/dist/scanner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAkCH,MAAM,WAAW,WAAW;IAC1B,+FAA+F;IAC/F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;;;;;;;;;;;OAaG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAoDD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,UAAU,CAwE5E"}
|
package/dist/scanner.js
CHANGED
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
* ed-r-* → recipes, ed-p-* → pages, everything else ed-* → components.
|
|
14
14
|
* - `--ed-*` custom-property references (token usage).
|
|
15
15
|
* Both are counted by occurrence, across every scanned file.
|
|
16
|
+
*
|
|
17
|
+
* WHAT IT SETS ASIDE (#2192): given the catalog (`knownTags`), an `ed-*` tag
|
|
18
|
+
* Eddie does not ship — a product's own element under Eddie's prefix, like
|
|
19
|
+
* Eddie Slides' `ed-slide` and `ed-robot` — is filed in `unknownPrefixed`
|
|
20
|
+
* instead of a usage bucket, so it counts as zero Eddie usage. Without a
|
|
21
|
+
* catalog every tag is taken at face value, as before.
|
|
16
22
|
*/
|
|
17
23
|
import { readdirSync, readFileSync, statSync } from 'node:fs';
|
|
18
24
|
import { join, extname, isAbsolute, relative, resolve, sep } from 'node:path';
|
|
@@ -45,9 +51,16 @@ const TOKEN_RE = /(--ed-[a-z0-9]+(?:-[a-z0-9]+)*)/gi;
|
|
|
45
51
|
function bump(map, key, by) {
|
|
46
52
|
map[key] = (map[key] ?? 0) + by;
|
|
47
53
|
}
|
|
48
|
-
/**
|
|
49
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Bucket a tag by Eddie's taxonomy prefix and record its occurrences — or,
|
|
56
|
+
* when the scan has a catalog and the tag is not in it, set it aside.
|
|
57
|
+
*/
|
|
58
|
+
function recordTag(result, tag, count, known) {
|
|
50
59
|
const t = tag.toLowerCase();
|
|
60
|
+
if (known !== undefined && !known.has(t)) {
|
|
61
|
+
bump((result.unknownPrefixed ??= {}), t, count);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
51
64
|
if (t.startsWith('ed-r-'))
|
|
52
65
|
bump(result.recipes, t, count);
|
|
53
66
|
else if (t.startsWith('ed-p-'))
|
|
@@ -55,8 +68,12 @@ function recordTag(result, tag, count) {
|
|
|
55
68
|
else
|
|
56
69
|
bump(result.components, t, count);
|
|
57
70
|
}
|
|
58
|
-
/**
|
|
59
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Count all Eddie tag + token occurrences in one file's text. A file whose
|
|
73
|
+
* only `ed-*` tags are unknown still counts as matched: the product wrote
|
|
74
|
+
* Eddie-shaped markup there, which is what `filesMatched` measures.
|
|
75
|
+
*/
|
|
76
|
+
function scanText(result, text, known) {
|
|
60
77
|
let matched = false;
|
|
61
78
|
// Tally tags. We count by tag name so `<ed-button>...<ed-button>` → 2.
|
|
62
79
|
const tagCounts = new Map();
|
|
@@ -66,7 +83,7 @@ function scanText(result, text) {
|
|
|
66
83
|
tagCounts.set(m[1], (tagCounts.get(m[1]) ?? 0) + 1);
|
|
67
84
|
}
|
|
68
85
|
for (const [tag, count] of tagCounts) {
|
|
69
|
-
recordTag(result, tag, count);
|
|
86
|
+
recordTag(result, tag, count, known);
|
|
70
87
|
matched = true;
|
|
71
88
|
}
|
|
72
89
|
// Tally token references.
|
|
@@ -102,11 +119,17 @@ export function scanUsage(dir, options = {}) {
|
|
|
102
119
|
const rel = relative(root, full).split(sep).join('/');
|
|
103
120
|
return ignorePaths.some((p) => rel === p || rel.startsWith(`${p}/`));
|
|
104
121
|
};
|
|
122
|
+
// `undefined` means "no catalog, count everything"; an empty catalog really
|
|
123
|
+
// does make every tag unknown, so the two are kept distinct.
|
|
124
|
+
const known = options.knownTags === undefined
|
|
125
|
+
? undefined
|
|
126
|
+
: new Set([...options.knownTags].filter((t) => typeof t === 'string').map((t) => t.toLowerCase()));
|
|
105
127
|
const result = {
|
|
106
128
|
components: {},
|
|
107
129
|
recipes: {},
|
|
108
130
|
pages: {},
|
|
109
131
|
tokens: {},
|
|
132
|
+
...(known !== undefined ? { unknownPrefixed: {} } : {}),
|
|
110
133
|
filesScanned: 0,
|
|
111
134
|
filesMatched: 0,
|
|
112
135
|
};
|
|
@@ -144,7 +167,7 @@ export function scanUsage(dir, options = {}) {
|
|
|
144
167
|
continue;
|
|
145
168
|
result.filesScanned++;
|
|
146
169
|
const text = readFileSync(full, 'utf-8');
|
|
147
|
-
if (scanText(result, text))
|
|
170
|
+
if (scanText(result, text, known))
|
|
148
171
|
result.filesMatched++;
|
|
149
172
|
}
|
|
150
173
|
catch {
|
package/dist/scanner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAE9E,4EAA4E;AAC5E,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,OAAO,EAAE,MAAM;IACf,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAC5C,MAAM,EAAE,SAAS,EAAE,QAAQ;IAC3B,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO;IACzE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;CAClC,CAAC,CAAC;AAEH,yEAAyE;AACzE,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC3B,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS;IAC3E,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU;IACpE,kBAAkB,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ;IACvD,2EAA2E;IAC3E,6EAA6E;IAC7E,4EAA4E;IAC5E,8EAA8E;IAC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EAAE,CAAC;gBACxB,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC;oBAAE,SAAS;gBAC1F,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACjB,SAAS;YACX,CAAC;YACD,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBAAE,SAAS;YAC9B,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;gBAAE,SAAS;YACzE,IAAI,aAAa,CAAC,IAAI,CAAC;gBAAE,SAAS;YAClC,IAAI,MAAM,CAAC,YAAY,IAAI,QAAQ;gBAAE,MAAM;YAE3C,IAAI,CAAC;gBACH,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;gBAChC,IAAI,IAAI,GAAG,YAAY;oBAAE,SAAS;gBAClC,MAAM,CAAC,YAAY,EAAE,CAAC;gBACtB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;gBACzC,IAAI,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC;oBAAE,MAAM,CAAC,YAAY,EAAE,CAAC;YAC3D,CAAC;YAAC,MAAM,CAAC;gBACP,SAAS;YACX,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -57,6 +57,16 @@ export interface UsageBreakdown {
|
|
|
57
57
|
pages: Record<string, number>;
|
|
58
58
|
/** `--ed-*` custom-property references → occurrence count. */
|
|
59
59
|
tokens: Record<string, number>;
|
|
60
|
+
/**
|
|
61
|
+
* `ed-*` tags that are not in Eddie's catalog → occurrence count (#2192):
|
|
62
|
+
* a product's own custom elements under Eddie's prefix (Eddie Slides'
|
|
63
|
+
* `ed-slide`, `ed-robot`), a typo, or a tag newer than this reporter.
|
|
64
|
+
* They are not Eddie usage and are in no bucket above and no total.
|
|
65
|
+
* Present only when the reporter had a catalog to check against — a
|
|
66
|
+
* reporter built from source without one omits the field, and the brain
|
|
67
|
+
* partitions those reports by its own catalog instead.
|
|
68
|
+
*/
|
|
69
|
+
unknownPrefixed?: Record<string, number>;
|
|
60
70
|
/** Source files walked. */
|
|
61
71
|
filesScanned: number;
|
|
62
72
|
/** Source files that contained at least one Eddie asset. */
|
|
@@ -82,8 +92,10 @@ export interface UsageReport {
|
|
|
82
92
|
distinctPages: number;
|
|
83
93
|
/** Distinct tokens referenced. */
|
|
84
94
|
distinctTokens: number;
|
|
85
|
-
/** Total Eddie asset occurrences across all buckets. */
|
|
95
|
+
/** Total Eddie asset occurrences across all buckets. Excludes `unknownPrefixed`. */
|
|
86
96
|
occurrences: number;
|
|
97
|
+
/** Distinct `ed-*` tags not in the catalog. Present with `usage.unknownPrefixed`. */
|
|
98
|
+
distinctUnknownPrefixed?: number;
|
|
87
99
|
};
|
|
88
100
|
}
|
|
89
101
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,aAAa,EAAG,sBAA+B,CAAC;AAE7D,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEnF,4BAA4B;AAC5B,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,OAAO,GAAG,SAAS,CAAC;AAE3D,wDAAwD;AACxD,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,+DAA+D;IAC/D,I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AC/B;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,2BAA2B;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,aAAa,CAAC;IAC7B,yDAAyD;IACzD,eAAe,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;IACzB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,cAAc,CAAC;IACtB,2EAA2E;IAC3E,MAAM,EAAE;QACN,oCAAoC;QACpC,kBAAkB,EAAE,MAAM,CAAC;QAC3B,iCAAiC;QACjC,eAAe,EAAE,MAAM,CAAC;QACxB,oCAAoC;QACpC,aAAa,EAAE,MAAM,CAAC;QACtB,kCAAkC;QAClC,cAAc,EAAE,MAAM,CAAC;QACvB,oFAAoF;QACpF,WAAW,EAAE,MAAM,CAAC;QACpB,qFAAqF;QACrF,uBAAuB,CAAC,EAAE,MAAM,CAAC;KAClC,CAAC;CACH"}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brad-frost-web/eddie-reporter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.71.0",
|
|
4
4
|
"description": "The Eddie-reporter \u2014 a zero-dependency usage reporter installed on downstream Eddie products. It statically scans a product for Eddie asset usage (components, recipes, pages, tokens) and reports the activity back to Eddie's Brain, so adoption and activity of the design system can be tracked as a living feedback loop.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
|
-
"build": "tsc",
|
|
26
|
+
"build": "tsc && node scripts/build-known-tags.mjs",
|
|
27
27
|
"dev": "tsc --watch",
|
|
28
28
|
"test": "vitest run",
|
|
29
29
|
"test:watch": "vitest",
|