@component-compass/cli 0.0.2 → 0.0.3
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/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/no-deps-diagnostic.d.ts +15 -0
- package/dist/commands/no-deps-diagnostic.js +23 -0
- package/dist/commands/no-deps-diagnostic.js.map +1 -0
- package/dist/commands/scan.d.ts +1 -0
- package/dist/commands/scan.js +69 -52
- package/dist/commands/scan.js.map +1 -1
- package/dist/composition-rollup.d.ts +16 -14
- package/dist/composition-rollup.js +33 -43
- package/dist/composition-rollup.js.map +1 -1
- package/dist/identity.d.ts +9 -3
- package/dist/identity.js +15 -3
- package/dist/identity.js.map +1 -1
- package/dist/local-index/detect-react.js +224 -47
- package/dist/local-index/detect-react.js.map +1 -1
- package/dist/local-index/index.d.ts +4 -1
- package/dist/local-index/index.js +30 -13
- package/dist/local-index/index.js.map +1 -1
- package/dist/manifest/derived-manifest-stub.d.ts +2 -2
- package/dist/manifest/diagnostic-filter.d.ts +4 -3
- package/dist/manifest/diagnostic-filter.js +15 -2
- package/dist/manifest/diagnostic-filter.js.map +1 -1
- package/dist/manifest/lazy-resolver.d.ts +17 -25
- package/dist/manifest/lazy-resolver.js +175 -48
- package/dist/manifest/lazy-resolver.js.map +1 -1
- package/dist/occurrences.d.ts +4 -4
- package/dist/occurrences.js +29 -5
- package/dist/occurrences.js.map +1 -1
- package/dist/reporter/index.d.ts +27 -12
- package/dist/reporter/index.js +105 -18
- package/dist/reporter/index.js.map +1 -1
- package/dist/rollup.d.ts +8 -2
- package/dist/rollup.js +2 -2
- package/dist/rollup.js.map +1 -1
- package/dist/seeds.d.ts +3 -2
- package/dist/seeds.js +61 -30
- package/dist/seeds.js.map +1 -1
- package/dist/workspace/build-graph.d.ts +2 -0
- package/dist/workspace/build-graph.js +117 -0
- package/dist/workspace/build-graph.js.map +1 -0
- package/dist/workspace/declared-deps.d.ts +5 -0
- package/dist/workspace/declared-deps.js +42 -0
- package/dist/workspace/declared-deps.js.map +1 -0
- package/dist/workspace/find-owning-package.d.ts +2 -0
- package/dist/workspace/find-owning-package.js +49 -0
- package/dist/workspace/find-owning-package.js.map +1 -0
- package/dist/workspace/index.d.ts +4 -0
- package/dist/workspace/index.js +4 -0
- package/dist/workspace/index.js.map +1 -0
- package/dist/workspace/types.d.ts +46 -0
- package/dist/workspace/types.js +13 -0
- package/dist/workspace/types.js.map +1 -0
- package/package.json +9 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-owning-package.js","sourceRoot":"","sources":["../../src/workspace/find-owning-package.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,MAAM,UAAU,iBAAiB,CAC/B,KAAqB,EACrB,QAAgB;IAEhB,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7C,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC3C,IAAI,IAAI,GAA4B,IAAI,CAAC;IACzC,IAAI,aAAa,GAAG,CAAC,CAAC,CAAC;IACvB,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjC,kEAAkE;QAClE,2EAA2E;QAC3E,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAClD,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC;YAAE,SAAS;QAC/C,mEAAmE;QACnE,oEAAoE;QACpE,yEAAyE;QACzE,yEAAyE;QACzE,IAAI,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YAAE,SAAS;QACxE,IAAI,OAAO,CAAC,MAAM,GAAG,aAAa,EAAE,CAAC;YACnC,IAAI,GAAG,GAAG,CAAC;YACX,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;QACjC,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,eAAe,CAAC,QAAgB;IACvC,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,QAAQ,CAAC;IAClB,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,MAAc,EAAE,SAAiB;IACrD,IAAI,SAAS,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC;IAC7D,OAAO,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workspace/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace graph shape. Built once per scan at scan-start, threaded into the
|
|
3
|
+
* resolver (for workspace-locality classification) and the identity layer
|
|
4
|
+
* (for `OutputIdentity.packageName` enrichment).
|
|
5
|
+
*
|
|
6
|
+
* Two independent axes:
|
|
7
|
+
* - `packageManager` — yarn / npm / pnpm, sniffed from lockfile. Always set.
|
|
8
|
+
* Returns "unknown" when no lockfile is detected (explicit "no signal").
|
|
9
|
+
* - `packages` — workspace packages from pnpm-workspace.yaml or
|
|
10
|
+
* package.json#workspaces. Empty array for single-package repos.
|
|
11
|
+
*/
|
|
12
|
+
export type PackageManager = "yarn" | "npm" | "pnpm" | "unknown";
|
|
13
|
+
export type WorkspacePackage = {
|
|
14
|
+
/** Workspace package name from its `package.json#name`. */
|
|
15
|
+
name: string;
|
|
16
|
+
/** Absolute path to the package directory. */
|
|
17
|
+
absolutePath: string;
|
|
18
|
+
/** Parsed `package.json` contents. Cached for `declaredDeps`. */
|
|
19
|
+
packageJson: {
|
|
20
|
+
name?: string;
|
|
21
|
+
dependencies?: Record<string, string>;
|
|
22
|
+
devDependencies?: Record<string, string>;
|
|
23
|
+
peerDependencies?: Record<string, string>;
|
|
24
|
+
optionalDependencies?: Record<string, string>;
|
|
25
|
+
workspaces?: string[] | {
|
|
26
|
+
packages?: string[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export type WorkspaceGraph = {
|
|
31
|
+
/**
|
|
32
|
+
* Detected package manager (lockfile-based). `"unknown"` when no lockfile
|
|
33
|
+
* is present — explicit about not knowing. Independent of workspace
|
|
34
|
+
* detection — set even for single-package repos.
|
|
35
|
+
*/
|
|
36
|
+
packageManager: PackageManager;
|
|
37
|
+
/** Absolute path to the scan's configDir (the workspace root). */
|
|
38
|
+
rootPath: string;
|
|
39
|
+
/** Root package name; "<unnamed>" if missing. */
|
|
40
|
+
rootPackageName: string;
|
|
41
|
+
/**
|
|
42
|
+
* Detected workspace packages from pnpm-workspace.yaml or
|
|
43
|
+
* package.json#workspaces. Empty array for single-package repos.
|
|
44
|
+
*/
|
|
45
|
+
packages: WorkspacePackage[];
|
|
46
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace graph shape. Built once per scan at scan-start, threaded into the
|
|
3
|
+
* resolver (for workspace-locality classification) and the identity layer
|
|
4
|
+
* (for `OutputIdentity.packageName` enrichment).
|
|
5
|
+
*
|
|
6
|
+
* Two independent axes:
|
|
7
|
+
* - `packageManager` — yarn / npm / pnpm, sniffed from lockfile. Always set.
|
|
8
|
+
* Returns "unknown" when no lockfile is detected (explicit "no signal").
|
|
9
|
+
* - `packages` — workspace packages from pnpm-workspace.yaml or
|
|
10
|
+
* package.json#workspaces. Empty array for single-package repos.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/workspace/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@component-compass/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Open-source CLI for measuring design-system component usage across multi-framework consumer repos.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -35,20 +35,22 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/parser": "^7.29.3",
|
|
37
37
|
"@babel/types": "^7.29.0",
|
|
38
|
-
"@component-compass/ast-utils": "^0.0.
|
|
39
|
-
"@component-compass/parser-html": "^0.0.
|
|
40
|
-
"@component-compass/parser-lit": "^0.0.
|
|
41
|
-
"@component-compass/parser-react": "^0.0.
|
|
42
|
-
"@component-compass/parser-vue": "^0.0.
|
|
43
|
-
"@component-compass/plugin-core": "^0.0.
|
|
38
|
+
"@component-compass/ast-utils": "^0.0.3",
|
|
39
|
+
"@component-compass/parser-html": "^0.0.3",
|
|
40
|
+
"@component-compass/parser-lit": "^0.0.3",
|
|
41
|
+
"@component-compass/parser-react": "^0.0.3",
|
|
42
|
+
"@component-compass/parser-vue": "^0.0.3",
|
|
43
|
+
"@component-compass/plugin-core": "^0.0.3",
|
|
44
44
|
"@vue/compiler-sfc": "^3.5.33",
|
|
45
45
|
"ajv": "^8.20.0",
|
|
46
46
|
"glob": "^13.0.0",
|
|
47
47
|
"globby": "^16.2.0",
|
|
48
|
+
"js-yaml": "^4",
|
|
48
49
|
"picomatch": "^4.0.4",
|
|
49
50
|
"ulid": "^3.0.2"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
53
|
+
"@types/js-yaml": "^4",
|
|
52
54
|
"@types/node": "^24.0.0",
|
|
53
55
|
"@types/picomatch": "^4.0.3",
|
|
54
56
|
"typescript": "^5.9.0",
|