@outfitter/tooling 0.2.2 → 0.2.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.
Files changed (40) hide show
  1. package/README.md +23 -0
  2. package/dist/cli/check-boundary-invocations.d.ts +34 -0
  3. package/dist/cli/check-boundary-invocations.js +14 -0
  4. package/dist/cli/check-bunup-registry.d.ts +36 -0
  5. package/dist/cli/check-bunup-registry.js +12 -0
  6. package/dist/cli/check-changeset.d.ts +64 -0
  7. package/dist/cli/check-changeset.js +14 -0
  8. package/dist/cli/check-clean-tree.d.ts +36 -0
  9. package/dist/cli/check-clean-tree.js +14 -0
  10. package/dist/cli/check-exports.d.ts +2 -0
  11. package/dist/cli/check-exports.js +12 -0
  12. package/dist/cli/check-readme-imports.d.ts +60 -0
  13. package/dist/cli/check-readme-imports.js +194 -0
  14. package/dist/cli/check.js +1 -0
  15. package/dist/cli/fix.js +1 -0
  16. package/dist/cli/index.js +598 -18
  17. package/dist/cli/init.js +1 -0
  18. package/dist/cli/pre-push.js +1 -0
  19. package/dist/cli/upgrade-bun.js +1 -0
  20. package/dist/index.d.ts +2 -33
  21. package/dist/index.js +5 -2
  22. package/dist/registry/build.js +1 -0
  23. package/dist/registry/index.js +1 -0
  24. package/dist/registry/schema.js +1 -0
  25. package/dist/shared/@outfitter/tooling-1y8w5ahg.js +70 -0
  26. package/dist/shared/@outfitter/tooling-3w8vr2w3.js +94 -0
  27. package/dist/shared/@outfitter/tooling-9vs606gq.d.ts +3 -0
  28. package/dist/shared/@outfitter/tooling-ctmgnap5.js +19 -0
  29. package/dist/shared/@outfitter/tooling-dvwh9qve.js +4 -0
  30. package/dist/shared/@outfitter/tooling-q0d60xb3.d.ts +58 -0
  31. package/dist/shared/@outfitter/tooling-r9976n43.js +100 -0
  32. package/dist/shared/@outfitter/tooling-t17gnh9b.js +78 -0
  33. package/dist/shared/@outfitter/tooling-tf22zt9p.js +226 -0
  34. package/dist/shared/chunk-3s189drz.js +4 -0
  35. package/dist/shared/chunk-6a7tjcgm.js +193 -0
  36. package/dist/shared/chunk-8aenrm6f.js +18 -0
  37. package/dist/version.d.ts +2 -0
  38. package/dist/version.js +8 -0
  39. package/package.json +22 -21
  40. package/registry/registry.json +1 -1
package/README.md CHANGED
@@ -87,6 +87,17 @@ bunx @outfitter/tooling pre-push
87
87
  bunx @outfitter/tooling pre-push --force
88
88
  ```
89
89
 
90
+ ### `tooling check-boundary-invocations`
91
+
92
+ Validate that root/app scripts do not execute `packages/*/src/*` directly.
93
+
94
+ ```bash
95
+ bunx @outfitter/tooling check-boundary-invocations
96
+ ```
97
+
98
+ When this fails, replace direct source execution with canonical command surfaces
99
+ (`outfitter repo ...` in monorepo scripts, or package bins for standalone use).
100
+
90
101
  ## Configuration Presets
91
102
 
92
103
  ### Biome
@@ -151,6 +162,18 @@ Available blocks:
151
162
  - `bootstrap` — Project bootstrap script
152
163
  - `scaffolding` — Full starter kit (combines all above)
153
164
 
165
+ ## Monorepo Command Mapping
166
+
167
+ Within this monorepo, maintenance checks are routed via `outfitter repo`:
168
+
169
+ ```bash
170
+ bun run apps/outfitter/src/cli.ts repo check exports --cwd .
171
+ bun run apps/outfitter/src/cli.ts repo check readme --cwd .
172
+ bun run apps/outfitter/src/cli.ts repo check registry --cwd .
173
+ bun run apps/outfitter/src/cli.ts repo check tree --cwd .
174
+ bun run apps/outfitter/src/cli.ts repo check boundary-invocations --cwd .
175
+ ```
176
+
154
177
  ## Exports
155
178
 
156
179
  | Export | Description |
@@ -0,0 +1,34 @@
1
+ interface ScriptLocation {
2
+ readonly file: string;
3
+ readonly scriptName: string;
4
+ readonly command: string;
5
+ }
6
+ interface BoundaryViolation extends ScriptLocation {
7
+ readonly rule: "root-runs-package-src" | "cd-package-then-runs-src";
8
+ }
9
+ interface ReadScriptEntriesOptions {
10
+ readonly appManifestRelativePaths?: readonly string[];
11
+ readonly readPackageJson?: (filePath: string) => Promise<{
12
+ scripts?: Record<string, string>;
13
+ }>;
14
+ }
15
+ /**
16
+ * Detect whether a single script command violates boundary invocation rules.
17
+ */
18
+ declare function detectBoundaryViolation(location: ScriptLocation): BoundaryViolation | null;
19
+ /**
20
+ * Find all boundary violations across package/app script maps.
21
+ */
22
+ declare function findBoundaryViolations(entries: readonly {
23
+ file: string;
24
+ scripts: Readonly<Record<string, string>>;
25
+ }[]): BoundaryViolation[];
26
+ declare function readScriptEntries(cwd: string, options?: ReadScriptEntriesOptions): Promise<{
27
+ file: string;
28
+ scripts: Record<string, string>;
29
+ }[]>;
30
+ /**
31
+ * Run boundary invocation checks against root/apps package scripts.
32
+ */
33
+ declare function runCheckBoundaryInvocations(): Promise<void>;
34
+ export { runCheckBoundaryInvocations, readScriptEntries, findBoundaryViolations, detectBoundaryViolation, ScriptLocation, BoundaryViolation };
@@ -0,0 +1,14 @@
1
+ // @bun
2
+ import {
3
+ detectBoundaryViolation,
4
+ findBoundaryViolations,
5
+ readScriptEntries,
6
+ runCheckBoundaryInvocations
7
+ } from "../shared/@outfitter/tooling-r9976n43.js";
8
+ import"../shared/@outfitter/tooling-dvwh9qve.js";
9
+ export {
10
+ runCheckBoundaryInvocations,
11
+ readScriptEntries,
12
+ findBoundaryViolations,
13
+ detectBoundaryViolation
14
+ };
@@ -0,0 +1,36 @@
1
+ /** Result of checking bunup workspace registration */
2
+ interface RegistryCheckResult {
3
+ readonly ok: boolean;
4
+ readonly missing: string[];
5
+ }
6
+ /**
7
+ * Extract the package name from a build script containing `bunup --filter`.
8
+ *
9
+ * @example
10
+ * extractBunupFilterName("bunup --filter @outfitter/logging")
11
+ * // => "@outfitter/logging"
12
+ *
13
+ * extractBunupFilterName("cd ../.. && bunup --filter @outfitter/types")
14
+ * // => "@outfitter/types"
15
+ *
16
+ * extractBunupFilterName("tsc --noEmit")
17
+ * // => null
18
+ */
19
+ declare function extractBunupFilterName(script: string): string | null;
20
+ /**
21
+ * Find packages that have `bunup --filter` build scripts but are not
22
+ * registered in the bunup workspace config.
23
+ *
24
+ * @param packagesWithFilter - Package names that have `bunup --filter` in their build script
25
+ * @param registeredNames - Package names registered in bunup.config.ts
26
+ * @returns Result with sorted list of missing packages
27
+ */
28
+ declare function findUnregisteredPackages(packagesWithFilter: string[], registeredNames: string[]): RegistryCheckResult;
29
+ /**
30
+ * Run bunup registry check across all workspace packages.
31
+ *
32
+ * Scans packages/&#42;/package.json for build scripts containing `bunup --filter`,
33
+ * then verifies each is registered in bunup.config.ts.
34
+ */
35
+ declare function runCheckBunupRegistry(): Promise<void>;
36
+ export { runCheckBunupRegistry, findUnregisteredPackages, extractBunupFilterName, RegistryCheckResult };
@@ -0,0 +1,12 @@
1
+ // @bun
2
+ import {
3
+ extractBunupFilterName,
4
+ findUnregisteredPackages,
5
+ runCheckBunupRegistry
6
+ } from "../shared/@outfitter/tooling-t17gnh9b.js";
7
+ import"../shared/@outfitter/tooling-dvwh9qve.js";
8
+ export {
9
+ runCheckBunupRegistry,
10
+ findUnregisteredPackages,
11
+ extractBunupFilterName
12
+ };
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Check-changeset command — validates PRs touching package source include a changeset.
3
+ *
4
+ * Pure core functions for detecting changed packages and verifying changeset
5
+ * presence. The CLI runner in {@link runCheckChangeset} handles git discovery
6
+ * and output.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ /** Result of checking whether changesets are required */
11
+ interface ChangesetCheckResult {
12
+ readonly ok: boolean;
13
+ readonly missingFor: string[];
14
+ }
15
+ /**
16
+ * Extract unique package names from changed file paths.
17
+ *
18
+ * Only considers files matching the pattern "packages/NAME/src/..." and
19
+ * ignores apps/, root files, and package-level config.
20
+ *
21
+ * @param files - List of changed file paths relative to repo root
22
+ * @returns Sorted array of unique package names
23
+ */
24
+ declare function getChangedPackagePaths(files: string[]): string[];
25
+ /**
26
+ * Extract changeset filenames from changed file paths.
27
+ *
28
+ * Only considers files matching `.changeset/*.md`, excluding README.md.
29
+ * This checks the git diff rather than disk, ensuring only changesets added
30
+ * in the current PR are counted.
31
+ *
32
+ * @param files - List of changed file paths relative to repo root
33
+ * @returns Array of changeset filenames (e.g. `["happy-turtle.md"]`)
34
+ */
35
+ declare function getChangedChangesetFiles(files: string[]): string[];
36
+ /**
37
+ * Determine whether a changeset is required and present.
38
+ *
39
+ * Returns `ok: true` when either no packages were changed or at least one
40
+ * changeset file exists. Returns `ok: false` with the list of changed
41
+ * packages when changesets are missing.
42
+ *
43
+ * @param changedPackages - Package names with source changes
44
+ * @param changesetFiles - Changeset filenames found in `.changeset/`
45
+ */
46
+ declare function checkChangesetRequired(changedPackages: string[], changesetFiles: string[]): ChangesetCheckResult;
47
+ interface CheckChangesetOptions {
48
+ readonly skip?: boolean;
49
+ }
50
+ /**
51
+ * Run check-changeset to verify PRs include changeset files.
52
+ *
53
+ * Uses `git diff --name-only origin/main...HEAD` to detect changed files,
54
+ * then checks for changeset presence when package source files are modified.
55
+ *
56
+ * Skips silently when:
57
+ * - `NO_CHANGESET=1` env var is set
58
+ * - `--skip` flag is passed
59
+ * - `GITHUB_EVENT_NAME=push` (post-merge on main)
60
+ * - No packages have source changes
61
+ * - Git diff fails (local dev without origin)
62
+ */
63
+ declare function runCheckChangeset(options?: CheckChangesetOptions): Promise<void>;
64
+ export { runCheckChangeset, getChangedPackagePaths, getChangedChangesetFiles, checkChangesetRequired, CheckChangesetOptions, ChangesetCheckResult };
@@ -0,0 +1,14 @@
1
+ // @bun
2
+ import {
3
+ checkChangesetRequired,
4
+ getChangedChangesetFiles,
5
+ getChangedPackagePaths,
6
+ runCheckChangeset
7
+ } from "../shared/@outfitter/tooling-3w8vr2w3.js";
8
+ import"../shared/@outfitter/tooling-dvwh9qve.js";
9
+ export {
10
+ runCheckChangeset,
11
+ getChangedPackagePaths,
12
+ getChangedChangesetFiles,
13
+ checkChangesetRequired
14
+ };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Check-clean-tree command — asserts the working tree has no modified or untracked files.
3
+ *
4
+ * Pure core functions for parsing git output and determining tree cleanliness.
5
+ * The CLI runner in {@link runCheckCleanTree} handles git invocation and output.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ /** Status of the working tree after verification steps */
10
+ interface TreeStatus {
11
+ readonly clean: boolean;
12
+ readonly modified: string[];
13
+ readonly untracked: string[];
14
+ }
15
+ /**
16
+ * Parse `git diff --name-only` output into a list of modified file paths.
17
+ */
18
+ declare function parseGitDiff(diffOutput: string): string[];
19
+ /**
20
+ * Parse `git ls-files --others --exclude-standard` output into a list of untracked file paths.
21
+ */
22
+ declare function parseUntrackedFiles(lsOutput: string): string[];
23
+ /**
24
+ * Determine if the tree status represents a clean working tree.
25
+ */
26
+ declare function isCleanTree(status: TreeStatus): boolean;
27
+ interface CheckCleanTreeOptions {
28
+ readonly paths?: string[];
29
+ }
30
+ /**
31
+ * Run clean-tree check against the current working directory.
32
+ *
33
+ * Exits 0 if clean, 1 if dirty files are found.
34
+ */
35
+ declare function runCheckCleanTree(options?: CheckCleanTreeOptions): Promise<void>;
36
+ export { runCheckCleanTree, parseUntrackedFiles, parseGitDiff, isCleanTree, TreeStatus, CheckCleanTreeOptions };
@@ -0,0 +1,14 @@
1
+ // @bun
2
+ import {
3
+ isCleanTree,
4
+ parseGitDiff,
5
+ parseUntrackedFiles,
6
+ runCheckCleanTree
7
+ } from "../shared/@outfitter/tooling-1y8w5ahg.js";
8
+ import"../shared/@outfitter/tooling-dvwh9qve.js";
9
+ export {
10
+ runCheckCleanTree,
11
+ parseUntrackedFiles,
12
+ parseGitDiff,
13
+ isCleanTree
14
+ };
@@ -0,0 +1,2 @@
1
+ import { CheckExportsOptions, CheckResult, CompareInput, ExportDrift, ExportMap, PackageResult, compareExports, entryToSubpath, runCheckExports } from "../shared/@outfitter/tooling-q0d60xb3";
2
+ export { runCheckExports, entryToSubpath, compareExports, PackageResult, ExportMap, ExportDrift, CompareInput, CheckResult, CheckExportsOptions };
@@ -0,0 +1,12 @@
1
+ // @bun
2
+ import {
3
+ compareExports,
4
+ entryToSubpath,
5
+ runCheckExports
6
+ } from "../shared/@outfitter/tooling-tf22zt9p.js";
7
+ import"../shared/@outfitter/tooling-dvwh9qve.js";
8
+ export {
9
+ runCheckExports,
10
+ entryToSubpath,
11
+ compareExports
12
+ };
@@ -0,0 +1,60 @@
1
+ import { ExportMap } from "../shared/@outfitter/tooling-q0d60xb3";
2
+ /** An import example extracted from a markdown code block */
3
+ interface ImportExample {
4
+ /** Package name, e.g. "@outfitter/cli" */
5
+ readonly packageName: string;
6
+ /** Export subpath, e.g. "./output" or "." */
7
+ readonly subpath: string;
8
+ /** Full import specifier, e.g. "@outfitter/cli/output" */
9
+ readonly fullSpecifier: string;
10
+ /** File where the import was found */
11
+ readonly file: string;
12
+ /** 1-based line number */
13
+ readonly line: number;
14
+ }
15
+ /** Result of checking imports in a single file */
16
+ interface ImportCheckResult {
17
+ readonly file: string;
18
+ readonly valid: ImportExample[];
19
+ readonly invalid: ImportExample[];
20
+ }
21
+ /**
22
+ * Parse a full import specifier into package name and subpath.
23
+ *
24
+ * Only recognizes `@outfitter/*` scoped packages.
25
+ *
26
+ * @example
27
+ * parseSpecifier("@outfitter/cli/output")
28
+ * // { packageName: "@outfitter/cli", subpath: "./output" }
29
+ *
30
+ * parseSpecifier("@outfitter/contracts")
31
+ * // { packageName: "@outfitter/contracts", subpath: "." }
32
+ */
33
+ declare function parseSpecifier(specifier: string): {
34
+ packageName: string;
35
+ subpath: string;
36
+ } | null;
37
+ /**
38
+ * Extract import specifiers from markdown content.
39
+ *
40
+ * Only extracts imports from fenced code blocks (typescript, ts,
41
+ * javascript, js). Skips blocks preceded by a non-contractual HTML comment.
42
+ * Deduplicates by full specifier within a single file.
43
+ */
44
+ declare function extractImports(content: string, file: string): ImportExample[];
45
+ /**
46
+ * Check whether a subpath exists in a package.json map.
47
+ */
48
+ declare function isExportedSubpath(subpath: string, exports: ExportMap): boolean;
49
+ interface CheckReadmeImportsOptions {
50
+ readonly json?: boolean;
51
+ }
52
+ /**
53
+ * Run check-readme-imports across all workspace packages.
54
+ *
55
+ * Finds README.md files in `packages/` and `docs/packages/`, extracts
56
+ * import examples, and validates each subpath against the corresponding
57
+ * package.json exports.
58
+ */
59
+ declare function runCheckReadmeImports(options?: CheckReadmeImportsOptions): Promise<void>;
60
+ export { runCheckReadmeImports, parseSpecifier, isExportedSubpath, extractImports, ImportExample, ImportCheckResult, ExportMap, CheckReadmeImportsOptions };
@@ -0,0 +1,194 @@
1
+ // @bun
2
+ import"../shared/@outfitter/tooling-dvwh9qve.js";
3
+
4
+ // packages/tooling/src/cli/check-readme-imports.ts
5
+ import { resolve } from "path";
6
+ function parseSpecifier(specifier) {
7
+ if (!specifier.startsWith("@outfitter/")) {
8
+ return null;
9
+ }
10
+ const parts = specifier.split("/");
11
+ if (parts.length < 2) {
12
+ return null;
13
+ }
14
+ const packageName = `${parts[0]}/${parts[1]}`;
15
+ const rest = parts.slice(2);
16
+ if (rest.length === 0) {
17
+ return { packageName, subpath: "." };
18
+ }
19
+ return { packageName, subpath: `./${rest.join("/")}` };
20
+ }
21
+ function extractImports(content, file) {
22
+ const lines = content.split(`
23
+ `);
24
+ const results = [];
25
+ const seen = new Set;
26
+ const CODE_FENCE_OPEN = /^```(?:typescript|ts|javascript|js)\s*$/;
27
+ const CODE_FENCE_CLOSE = /^```\s*$/;
28
+ const IMPORT_RE = /from\s+["'](@outfitter\/[^"']+)["']/;
29
+ const NON_CONTRACTUAL = /<!--\s*non-contractual\s*-->/;
30
+ let inCodeBlock = false;
31
+ let skipBlock = false;
32
+ for (let i = 0;i < lines.length; i++) {
33
+ const line = lines[i];
34
+ if (!inCodeBlock) {
35
+ if (CODE_FENCE_OPEN.test(line)) {
36
+ inCodeBlock = true;
37
+ skipBlock = false;
38
+ for (let j = i - 1;j >= 0; j--) {
39
+ const prev = lines[j].trim();
40
+ if (prev === "")
41
+ continue;
42
+ if (NON_CONTRACTUAL.test(prev)) {
43
+ skipBlock = true;
44
+ }
45
+ break;
46
+ }
47
+ }
48
+ continue;
49
+ }
50
+ if (CODE_FENCE_CLOSE.test(line) && !CODE_FENCE_OPEN.test(line)) {
51
+ inCodeBlock = false;
52
+ skipBlock = false;
53
+ continue;
54
+ }
55
+ if (skipBlock)
56
+ continue;
57
+ const match = IMPORT_RE.exec(line);
58
+ if (!match?.[1])
59
+ continue;
60
+ const fullSpecifier = match[1];
61
+ if (seen.has(fullSpecifier))
62
+ continue;
63
+ seen.add(fullSpecifier);
64
+ const parsed = parseSpecifier(fullSpecifier);
65
+ if (!parsed)
66
+ continue;
67
+ results.push({
68
+ packageName: parsed.packageName,
69
+ subpath: parsed.subpath,
70
+ fullSpecifier,
71
+ file,
72
+ line: i + 1
73
+ });
74
+ }
75
+ return results;
76
+ }
77
+ function isExportedSubpath(subpath, exports) {
78
+ return subpath in exports;
79
+ }
80
+ var COLORS = {
81
+ reset: "\x1B[0m",
82
+ red: "\x1B[31m",
83
+ green: "\x1B[32m",
84
+ yellow: "\x1B[33m",
85
+ blue: "\x1B[34m",
86
+ dim: "\x1B[2m"
87
+ };
88
+ async function runCheckReadmeImports(options = {}) {
89
+ const cwd = process.cwd();
90
+ const readmeGlob = new Bun.Glob("**/README.md");
91
+ const readmeDirs = ["packages", "docs/packages"];
92
+ const readmePaths = [];
93
+ for (const dir of readmeDirs) {
94
+ const fullDir = resolve(cwd, dir);
95
+ try {
96
+ for (const match of readmeGlob.scanSync({ cwd: fullDir, dot: false })) {
97
+ const segments = match.split("/");
98
+ if (segments.length === 2 && segments[1] === "README.md") {
99
+ readmePaths.push(resolve(fullDir, match));
100
+ }
101
+ }
102
+ } catch {}
103
+ }
104
+ if (readmePaths.length === 0) {
105
+ process.stdout.write(`No README.md files found.
106
+ `);
107
+ return;
108
+ }
109
+ const exportsCache = new Map;
110
+ async function getExportsForPackage(packageName) {
111
+ if (exportsCache.has(packageName)) {
112
+ return exportsCache.get(packageName) ?? null;
113
+ }
114
+ const shortName = packageName.replace("@outfitter/", "");
115
+ const pkgPath = resolve(cwd, "packages", shortName, "package.json");
116
+ try {
117
+ const pkg = await Bun.file(pkgPath).json();
118
+ const exports = typeof pkg.exports === "object" && pkg.exports !== null ? pkg.exports : {};
119
+ exportsCache.set(packageName, exports);
120
+ return exports;
121
+ } catch {
122
+ return null;
123
+ }
124
+ }
125
+ const results = [];
126
+ let hasInvalid = false;
127
+ for (const readmePath of readmePaths.sort()) {
128
+ const content = await Bun.file(readmePath).text();
129
+ const relativePath = readmePath.replace(`${cwd}/`, "");
130
+ const imports = extractImports(content, relativePath);
131
+ if (imports.length === 0)
132
+ continue;
133
+ const valid = [];
134
+ const invalid = [];
135
+ for (const imp of imports) {
136
+ const exports = await getExportsForPackage(imp.packageName);
137
+ if (exports === null) {
138
+ invalid.push(imp);
139
+ continue;
140
+ }
141
+ if (isExportedSubpath(imp.subpath, exports)) {
142
+ valid.push(imp);
143
+ } else {
144
+ invalid.push(imp);
145
+ }
146
+ }
147
+ if (valid.length > 0 || invalid.length > 0) {
148
+ results.push({ file: relativePath, valid, invalid });
149
+ }
150
+ if (invalid.length > 0) {
151
+ hasInvalid = true;
152
+ }
153
+ }
154
+ if (options.json) {
155
+ const output = {
156
+ ok: !hasInvalid,
157
+ files: results
158
+ };
159
+ process.stdout.write(`${JSON.stringify(output, null, 2)}
160
+ `);
161
+ } else {
162
+ const totalValid = results.reduce((n, r) => n + r.valid.length, 0);
163
+ const totalInvalid = results.reduce((n, r) => n + r.invalid.length, 0);
164
+ if (!hasInvalid) {
165
+ process.stdout.write(`${COLORS.green}All ${totalValid} README import examples match package exports.${COLORS.reset}
166
+ `);
167
+ } else {
168
+ process.stderr.write(`${COLORS.red}Invalid README import examples found:${COLORS.reset}
169
+
170
+ `);
171
+ for (const result of results) {
172
+ if (result.invalid.length === 0)
173
+ continue;
174
+ process.stderr.write(` ${COLORS.yellow}${result.file}${COLORS.reset}
175
+ `);
176
+ for (const imp of result.invalid) {
177
+ process.stderr.write(` ${COLORS.red}line ${imp.line}:${COLORS.reset} ${imp.fullSpecifier} ${COLORS.dim}(subpath ${imp.subpath} not in ${imp.packageName} exports)${COLORS.reset}
178
+ `);
179
+ }
180
+ process.stderr.write(`
181
+ `);
182
+ }
183
+ process.stderr.write(`${totalInvalid} invalid, ${totalValid} valid across ${results.length} file(s).
184
+ `);
185
+ }
186
+ }
187
+ process.exit(hasInvalid ? 1 : 0);
188
+ }
189
+ export {
190
+ runCheckReadmeImports,
191
+ parseSpecifier,
192
+ isExportedSubpath,
193
+ extractImports
194
+ };
package/dist/cli/check.js CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  buildCheckCommand,
4
4
  runCheck
5
5
  } from "../shared/@outfitter/tooling-0x5q15ec.js";
6
+ import"../shared/@outfitter/tooling-dvwh9qve.js";
6
7
  export {
7
8
  runCheck,
8
9
  buildCheckCommand
package/dist/cli/fix.js CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  buildFixCommand,
4
4
  runFix
5
5
  } from "../shared/@outfitter/tooling-9errkcvk.js";
6
+ import"../shared/@outfitter/tooling-dvwh9qve.js";
6
7
  export {
7
8
  runFix,
8
9
  buildFixCommand