@component-compass/cli 0.1.22 → 0.1.24
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 +103503 -104
- package/package.json +21 -25
- package/dist/auth/browser.d.ts +0 -13
- package/dist/auth/browser.js +0 -21
- package/dist/auth/browser.js.map +0 -1
- package/dist/auth/client.d.ts +0 -48
- package/dist/auth/client.js +0 -89
- package/dist/auth/client.js.map +0 -1
- package/dist/auth/paths.d.ts +0 -2
- package/dist/auth/paths.js +0 -14
- package/dist/auth/paths.js.map +0 -1
- package/dist/auth/session.d.ts +0 -38
- package/dist/auth/session.js +0 -88
- package/dist/auth/session.js.map +0 -1
- package/dist/auth/store.d.ts +0 -16
- package/dist/auth/store.js +0 -37
- package/dist/auth/store.js.map +0 -1
- package/dist/auth/upload-auth.d.ts +0 -22
- package/dist/auth/upload-auth.js +0 -51
- package/dist/auth/upload-auth.js.map +0 -1
- package/dist/cli/help.d.ts +0 -4
- package/dist/cli/help.js +0 -52
- package/dist/cli/help.js.map +0 -1
- package/dist/cli/parse.d.ts +0 -14
- package/dist/cli/parse.js +0 -75
- package/dist/cli/parse.js.map +0 -1
- package/dist/cli/suggest.d.ts +0 -4
- package/dist/cli/suggest.js +0 -38
- package/dist/cli/suggest.js.map +0 -1
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js.map +0 -1
- package/dist/commands/auth.d.ts +0 -33
- package/dist/commands/auth.js +0 -248
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/init.d.ts +0 -11
- package/dist/commands/init.js +0 -112
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/scan.d.ts +0 -33
- package/dist/commands/scan.js +0 -745
- package/dist/commands/scan.js.map +0 -1
- package/dist/composition-rollup.d.ts +0 -23
- package/dist/composition-rollup.js +0 -64
- package/dist/composition-rollup.js.map +0 -1
- package/dist/config/loader.d.ts +0 -6
- package/dist/config/loader.js +0 -71
- package/dist/config/loader.js.map +0 -1
- package/dist/config/schema.d.ts +0 -18
- package/dist/config/schema.js +0 -15
- package/dist/config/schema.js.map +0 -1
- package/dist/dispatcher.d.ts +0 -8
- package/dist/dispatcher.js +0 -22
- package/dist/dispatcher.js.map +0 -1
- package/dist/envelope/git.d.ts +0 -13
- package/dist/envelope/git.js +0 -69
- package/dist/envelope/git.js.map +0 -1
- package/dist/envelope/index.d.ts +0 -1
- package/dist/envelope/index.js +0 -12
- package/dist/envelope/index.js.map +0 -1
- package/dist/envelope/repo-id.d.ts +0 -16
- package/dist/envelope/repo-id.js +0 -40
- package/dist/envelope/repo-id.js.map +0 -1
- package/dist/identity.d.ts +0 -56
- package/dist/identity.js +0 -115
- package/dist/identity.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -1
- package/dist/local-index/declared-props.d.ts +0 -15
- package/dist/local-index/declared-props.js +0 -101
- package/dist/local-index/declared-props.js.map +0 -1
- package/dist/local-index/detect-react.d.ts +0 -3
- package/dist/local-index/detect-react.js +0 -378
- package/dist/local-index/detect-react.js.map +0 -1
- package/dist/local-index/detect-vue.d.ts +0 -16
- package/dist/local-index/detect-vue.js +0 -284
- package/dist/local-index/detect-vue.js.map +0 -1
- package/dist/local-index/detect-wc.d.ts +0 -8
- package/dist/local-index/detect-wc.js +0 -70
- package/dist/local-index/detect-wc.js.map +0 -1
- package/dist/local-index/index.d.ts +0 -14
- package/dist/local-index/index.js +0 -46
- package/dist/local-index/index.js.map +0 -1
- package/dist/local-index/types.d.ts +0 -2
- package/dist/local-index/types.js +0 -2
- package/dist/local-index/types.js.map +0 -1
- package/dist/manifest/barrel-parser.d.ts +0 -35
- package/dist/manifest/barrel-parser.js +0 -76
- package/dist/manifest/barrel-parser.js.map +0 -1
- package/dist/manifest/lazy-resolver.d.ts +0 -123
- package/dist/manifest/lazy-resolver.js +0 -712
- package/dist/manifest/lazy-resolver.js.map +0 -1
- package/dist/occurrences.d.ts +0 -15
- package/dist/occurrences.js +0 -101
- package/dist/occurrences.js.map +0 -1
- package/dist/parse-by-ext.d.ts +0 -21
- package/dist/parse-by-ext.js +0 -53
- package/dist/parse-by-ext.js.map +0 -1
- package/dist/prompts/adapter.d.ts +0 -43
- package/dist/prompts/adapter.js +0 -32
- package/dist/prompts/adapter.js.map +0 -1
- package/dist/reporter/index.d.ts +0 -39
- package/dist/reporter/index.js +0 -144
- package/dist/reporter/index.js.map +0 -1
- package/dist/reporter/json.d.ts +0 -6
- package/dist/reporter/json.js +0 -11
- package/dist/reporter/json.js.map +0 -1
- package/dist/reporter/stdout.d.ts +0 -3
- package/dist/reporter/stdout.js +0 -41
- package/dist/reporter/stdout.js.map +0 -1
- package/dist/rollup.d.ts +0 -26
- package/dist/rollup.js +0 -135
- package/dist/rollup.js.map +0 -1
- package/dist/scan/cem-index.d.ts +0 -38
- package/dist/scan/cem-index.js +0 -139
- package/dist/scan/cem-index.js.map +0 -1
- package/dist/scan/entry-packages.d.ts +0 -42
- package/dist/scan/entry-packages.js +0 -87
- package/dist/scan/entry-packages.js.map +0 -1
- package/dist/scan/framework-root.d.ts +0 -1
- package/dist/scan/framework-root.js +0 -22
- package/dist/scan/framework-root.js.map +0 -1
- package/dist/scan/git-mtime.d.ts +0 -2
- package/dist/scan/git-mtime.js +0 -22
- package/dist/scan/git-mtime.js.map +0 -1
- package/dist/scan/global-components.d.ts +0 -37
- package/dist/scan/global-components.js +0 -228
- package/dist/scan/global-components.js.map +0 -1
- package/dist/scan/meta.d.ts +0 -5
- package/dist/scan/meta.js +0 -58
- package/dist/scan/meta.js.map +0 -1
- package/dist/scan/stamp-version.d.ts +0 -18
- package/dist/scan/stamp-version.js +0 -94
- package/dist/scan/stamp-version.js.map +0 -1
- package/dist/scan/wrap-relationships.d.ts +0 -12
- package/dist/scan/wrap-relationships.js +0 -38
- package/dist/scan/wrap-relationships.js.map +0 -1
- package/dist/seeds.d.ts +0 -81
- package/dist/seeds.js +0 -258
- package/dist/seeds.js.map +0 -1
- package/dist/types/brand.d.ts +0 -11
- package/dist/types/brand.js +0 -5
- package/dist/types/brand.js.map +0 -1
- package/dist/types/component-id.d.ts +0 -2
- package/dist/types/component-id.js +0 -2
- package/dist/types/component-id.js.map +0 -1
- package/dist/types.d.ts +0 -13
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/upload.d.ts +0 -18
- package/dist/upload.js +0 -34
- package/dist/upload.js.map +0 -1
- package/dist/util/color.d.ts +0 -24
- package/dist/util/color.js +0 -45
- package/dist/util/color.js.map +0 -1
- package/dist/util/git.d.ts +0 -10
- package/dist/util/git.js +0 -95
- package/dist/util/git.js.map +0 -1
- package/dist/util/interactive.d.ts +0 -17
- package/dist/util/interactive.js +0 -19
- package/dist/util/interactive.js.map +0 -1
- package/dist/util/log.d.ts +0 -9
- package/dist/util/log.js +0 -20
- package/dist/util/log.js.map +0 -1
- package/dist/util/pkg.d.ts +0 -1
- package/dist/util/pkg.js +0 -13
- package/dist/util/pkg.js.map +0 -1
- package/dist/util/pnp-check.d.ts +0 -1
- package/dist/util/pnp-check.js +0 -6
- package/dist/util/pnp-check.js.map +0 -1
- package/dist/util/posix.d.ts +0 -2
- package/dist/util/posix.js +0 -15
- package/dist/util/posix.js.map +0 -1
- package/dist/util/progress.d.ts +0 -21
- package/dist/util/progress.js +0 -54
- package/dist/util/progress.js.map +0 -1
- package/dist/util/version.d.ts +0 -7
- package/dist/util/version.js +0 -13
- package/dist/util/version.js.map +0 -1
- package/dist/walker/bounded-definition-resolver.d.ts +0 -9
- package/dist/walker/bounded-definition-resolver.js +0 -125
- package/dist/walker/bounded-definition-resolver.js.map +0 -1
- package/dist/walker/files.d.ts +0 -7
- package/dist/walker/files.js +0 -24
- package/dist/walker/files.js.map +0 -1
- package/dist/walker/package-alias-layers.d.ts +0 -7
- package/dist/walker/package-alias-layers.js +0 -40
- package/dist/walker/package-alias-layers.js.map +0 -1
- package/dist/walker/resolve-import.d.ts +0 -25
- package/dist/walker/resolve-import.js +0 -243
- package/dist/walker/resolve-import.js.map +0 -1
- package/dist/walker/tsconfig-discovery.d.ts +0 -36
- package/dist/walker/tsconfig-discovery.js +0 -52
- package/dist/walker/tsconfig-discovery.js.map +0 -1
- package/dist/walker/tsconfig-loader.d.ts +0 -35
- package/dist/walker/tsconfig-loader.js +0 -138
- package/dist/walker/tsconfig-loader.js.map +0 -1
- package/dist/walker/workspace-exports.d.ts +0 -3
- package/dist/walker/workspace-exports.js +0 -120
- package/dist/walker/workspace-exports.js.map +0 -1
- package/dist/workspace/build-graph.d.ts +0 -15
- package/dist/workspace/build-graph.js +0 -120
- package/dist/workspace/build-graph.js.map +0 -1
- package/dist/workspace/declared-deps.d.ts +0 -5
- package/dist/workspace/declared-deps.js +0 -42
- package/dist/workspace/declared-deps.js.map +0 -1
- package/dist/workspace/find-owning-package.d.ts +0 -8
- package/dist/workspace/find-owning-package.js +0 -69
- package/dist/workspace/find-owning-package.js.map +0 -1
- package/dist/workspace/find-workspace-root.d.ts +0 -1
- package/dist/workspace/find-workspace-root.js +0 -60
- package/dist/workspace/find-workspace-root.js.map +0 -1
- package/dist/workspace/index.d.ts +0 -4
- package/dist/workspace/index.js +0 -4
- package/dist/workspace/index.js.map +0 -1
- package/dist/workspace/types.d.ts +0 -49
- package/dist/workspace/types.js +0 -13
- package/dist/workspace/types.js.map +0 -1
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { type IndexedComponent, type LazyResolverHit, type ManifestRef, type Diagnostic, type DiagnosticCollector } from "@component-compass/plugin-core";
|
|
2
|
-
import type { ResolveImport } from "../walker/resolve-import.js";
|
|
3
|
-
import type { EntryPackageTarget } from "../scan/entry-packages.js";
|
|
4
|
-
export type CreateLazyResolverOptions = {
|
|
5
|
-
resolveImport: ResolveImport;
|
|
6
|
-
/**
|
|
7
|
-
* Anchor for eager loads via `.warm()`. Optional — `resolveLazyManifest`
|
|
8
|
-
* itself never reads it (resolution is anchored on the calling file). When
|
|
9
|
-
* absent, `.warm()` falls back to `process.cwd()`.
|
|
10
|
-
*/
|
|
11
|
-
repoRoot?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Optional shared diagnostic collector. If absent, the resolver creates
|
|
14
|
-
* its own internal collector accessible via `diagnostics()`.
|
|
15
|
-
*/
|
|
16
|
-
collector?: DiagnosticCollector;
|
|
17
|
-
/**
|
|
18
|
-
* Glob patterns identifying packages whose manifests should be loaded.
|
|
19
|
-
* When set, the resolver loads manifests only for matching packages —
|
|
20
|
-
* non-matching packages still get identity resolution (`leafPackage` +
|
|
21
|
-
* `modulePath`) but `matched` is always null. When omitted or empty,
|
|
22
|
-
* manifest enrichment is fully disabled; identity resolution still runs.
|
|
23
|
-
* Use `["**"]` to enrich every package the resolver reaches (the
|
|
24
|
-
* single-star pattern `*` won't match scoped names like `@scope/pkg`
|
|
25
|
-
* because picomatch's `*` doesn't cross `/`).
|
|
26
|
-
*/
|
|
27
|
-
manifestPatterns?: readonly string[];
|
|
28
|
-
/**
|
|
29
|
-
* Entry-package provenance capture. Fired once per cached
|
|
30
|
-
* resolution whose walk crossed from the specifier's package (`entry`,
|
|
31
|
-
* as found on disk at the resolved specifier target) to a different
|
|
32
|
-
* terminal leaf package. `target.modulePath` is the terminal file
|
|
33
|
-
* relative to the leaf root, extension intact.
|
|
34
|
-
*/
|
|
35
|
-
onEntryPackage?: (entry: {
|
|
36
|
-
name: string;
|
|
37
|
-
dir: string;
|
|
38
|
-
}, target: EntryPackageTarget) => void;
|
|
39
|
-
};
|
|
40
|
-
export interface LazyResolver {
|
|
41
|
-
resolveLazyManifest(fromFile: string, specifier: string, exportName: string): LazyResolverHit | null;
|
|
42
|
-
/**
|
|
43
|
-
* Identical walk/cache/return to `resolveLazyManifest`, but any leaf
|
|
44
|
-
* manifest it loads (or upgrades on a cache hit — see the internal
|
|
45
|
-
* `hitCache` early-return) is marked snapshot-INELIGIBLE. For
|
|
46
|
-
* engine-adapter callers (e.g. `resolveExternalLeaf`) that need leaf
|
|
47
|
-
* identity + `lookupReactWrapper` hits without broadcasting an undeclared
|
|
48
|
-
* package's full CEM catalog into `snapshotComponents()` /
|
|
49
|
-
* `snapshotManifestRefs()`.
|
|
50
|
-
*/
|
|
51
|
-
lookupExternalLeaf(fromFile: string, specifier: string, exportName: string): LazyResolverHit | null;
|
|
52
|
-
/**
|
|
53
|
-
* File-path-anchored local barrel walk. Given a known-local file and an
|
|
54
|
-
* export name, follows `export { X } from "./Y"` / `export * from "./Y"`
|
|
55
|
-
* chains to a terminal file (one with no matching re-export). Returns the
|
|
56
|
-
* `{ filePath, exportName }` pair the chain ended at; caller does the
|
|
57
|
-
* final byPath lookup to verify the file actually exports that name.
|
|
58
|
-
*
|
|
59
|
-
* Returns null when:
|
|
60
|
-
* - the chain crosses out of the entry file's package (cross-package
|
|
61
|
-
* boundary — caller emits unresolved-import)
|
|
62
|
-
* - a cycle is detected (`cycle-detected` diagnostic emitted)
|
|
63
|
-
* - MAX_REEXPORT_HOPS exceeded (`chain-too-deep` emitted)
|
|
64
|
-
* - a re-export's `from` specifier fails to resolve
|
|
65
|
-
*
|
|
66
|
-
* Reuses the shared `parsedBarrel` AST cache. See ADR 0001 for why this
|
|
67
|
-
* lives on LazyResolver vs. a separate type.
|
|
68
|
-
*/
|
|
69
|
-
resolveLocalExport(filePath: string, exportName: string): {
|
|
70
|
-
filePath: string;
|
|
71
|
-
exportName: string;
|
|
72
|
-
} | null;
|
|
73
|
-
snapshotComponents(): IndexedComponent[];
|
|
74
|
-
snapshotManifestRefs(): ManifestRef[];
|
|
75
|
-
diagnostics(): Diagnostic[];
|
|
76
|
-
/**
|
|
77
|
-
* Eagerly load each named package's root CEM/CCM (if present) so the
|
|
78
|
-
* `byTag` cache covers tag-only consumers (HTML / Vue templates with no
|
|
79
|
-
* JS-side import to prime the resolver). Returns a `WarmedResolver` that
|
|
80
|
-
* adds `lookupByTag` — the only way to obtain it. No barrel walking; just
|
|
81
|
-
* one leaf-load per package, mirroring the resolver's terminal-load step.
|
|
82
|
-
*/
|
|
83
|
-
warm(packageNames: string[]): WarmedResolver;
|
|
84
|
-
/**
|
|
85
|
-
* Test-only hook: number of times the named barrel path was passed through
|
|
86
|
-
* the parse step. The resolver caches parsed barrel ASTs per absolute path,
|
|
87
|
-
* so on the happy path this is 1 regardless of how many import resolutions
|
|
88
|
-
* traverse the same barrel. Underscore-prefixed because production callers
|
|
89
|
-
* shouldn't depend on it.
|
|
90
|
-
*/
|
|
91
|
-
_barrelParseCount(absPath: string): number;
|
|
92
|
-
}
|
|
93
|
-
export interface WarmedResolver extends LazyResolver {
|
|
94
|
-
/**
|
|
95
|
-
* Tag-only lookup against the CEM index loaded during `warm(...)` (and any
|
|
96
|
-
* subsequent `resolveLazyManifest` calls that walked into eligible
|
|
97
|
-
* packages). Returns null when no matching custom-element has been indexed,
|
|
98
|
-
* including for resolvers constructed without any `manifestPatterns`
|
|
99
|
-
* (identity-only mode — `warm(...)` is then a structural no-op).
|
|
100
|
-
*/
|
|
101
|
-
lookupByTag(tagName: string): Extract<IndexedComponent, {
|
|
102
|
-
kind: "custom-element";
|
|
103
|
-
}> | null;
|
|
104
|
-
/**
|
|
105
|
-
* Look up the custom-element a React wrapper export maps to.
|
|
106
|
-
*
|
|
107
|
-
* **Direct CEM className match.**
|
|
108
|
-
* When `packageName` has a loaded CEM, scan its `components[]` for a
|
|
109
|
-
* custom-element whose `className === exportName`. Returns
|
|
110
|
-
* `{ tagName, packageName }` on match. This mirrors the className-equality
|
|
111
|
-
* second pass of `matchInLeaf`.
|
|
112
|
-
*
|
|
113
|
-
* Returns null when:
|
|
114
|
-
* - `packageName` is not manifest-eligible (excluded by `manifestPatterns`)
|
|
115
|
-
* - the package has no loaded CEM
|
|
116
|
-
* - the package has a loaded CEM but no className match
|
|
117
|
-
*/
|
|
118
|
-
lookupReactWrapper(packageName: string, exportName: string): {
|
|
119
|
-
tagName: string;
|
|
120
|
-
packageName: string;
|
|
121
|
-
} | null;
|
|
122
|
-
}
|
|
123
|
-
export declare function createLazyResolver(opts: CreateLazyResolverOptions): LazyResolver;
|