@specdest/devkit 0.4.5 → 0.4.6
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 +1 -1
- package/package.json +1 -1
- package/src/canonical-project-operations.js +10 -5
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ npx @specdest/devkit fuzz
|
|
|
24
24
|
- `doctor` reports project-stack/cache setup problems.
|
|
25
25
|
- `fuzz` dynamically exercises Zod boundary contracts with `fast-check` plus Specdest semantic amplifiers for nullish, blank-string, numeric/boolean, and array edge cases. It is separate from static `check` and from Stryker mutation testing.
|
|
26
26
|
|
|
27
|
-
The CLI
|
|
27
|
+
The CLI resolves a project stack from supported Expo/Vite + Convex/Supabase package dependencies when possible; otherwise it uses the single committed requested `stack-*` root in `.specdest/installed.json`. Optional `.specdest/rules.json` adds the project type/capabilities plus explicit rule includes/exclusions; every exclusion requires a reason. `.specdest/installed.json` and `.specdest/state.json` remain the committed project status used by the Base rules matrix.
|
|
28
28
|
|
|
29
29
|
See [`docs/operations.md`](docs/operations.md) for cache, dashboard, CI, and release behavior.
|
|
30
30
|
|
package/package.json
CHANGED
|
@@ -74,12 +74,17 @@ async function cachedManifest(source, entry, canonicalCheckRoot, checkerRuntimeR
|
|
|
74
74
|
return await prepareCachedManifest(entry, root, canonicalCheckRoot, checkerRuntimeRoot);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
async function
|
|
78
|
-
const catalog = await source.catalog({ refresh: options.refresh ?? false });
|
|
77
|
+
async function resolveCanonicalStack(projectRoot) {
|
|
79
78
|
const detectedStack = await detectProjectStack(projectRoot);
|
|
79
|
+
if (detectedStack) return detectedStack;
|
|
80
80
|
const installedState = await readInstalledState(projectRoot);
|
|
81
81
|
const requestedStacks = (installedState.requested ?? []).filter((id) => id.startsWith('stack-'));
|
|
82
|
-
|
|
82
|
+
return requestedStacks.length === 1 ? requestedStacks[0] : null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async function canonicalContext(projectRoot, source, options = {}) {
|
|
86
|
+
const catalog = await source.catalog({ refresh: options.refresh ?? false });
|
|
87
|
+
const stack = await resolveCanonicalStack(projectRoot);
|
|
83
88
|
const profile = await readRuleProfile(projectRoot);
|
|
84
89
|
assertKnownRuleOverrides(catalog.entries ?? [], profile);
|
|
85
90
|
const projectType = resolveProjectType(stack, profile);
|
|
@@ -373,8 +378,8 @@ export async function canonicalRules(projectRoot, source, options = {}) {
|
|
|
373
378
|
|
|
374
379
|
export async function canonicalDoctor(projectRoot, source) {
|
|
375
380
|
const issues = [];
|
|
376
|
-
const stack = await
|
|
377
|
-
if (!stack) issues.push('Unable to
|
|
381
|
+
const stack = await resolveCanonicalStack(projectRoot);
|
|
382
|
+
if (!stack) issues.push('Unable to resolve a supported project stack.');
|
|
378
383
|
try { await source.catalog(); } catch (error) { issues.push(`Catalog unavailable: ${error.message}`); }
|
|
379
384
|
return { ok: issues.length === 0, stack, cacheRoot: source.cacheRoot, issues };
|
|
380
385
|
}
|