@decantr/cli 3.5.0 → 3.5.1
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/bin.js +3 -3
- package/dist/{chunk-T45GFC6F.js → chunk-EUEQMXN5.js} +5 -3
- package/dist/{chunk-RJ6PT7WP.js → chunk-MDQSTAP5.js} +1 -1
- package/dist/{chunk-LTNGAAV4.js → chunk-S3ZDXBRM.js} +27 -13
- package/dist/{health-RKUKPG72.js → health-5S2L44SX.js} +1 -1
- package/dist/index.js +3 -3
- package/dist/{studio-C2F72QL6.js → studio-EN347SLA.js} +2 -2
- package/dist/{workspace-RJCFPVBL.js → workspace-UIKTIWUN.js} +2 -2
- package/package.json +2 -2
package/dist/bin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-S3ZDXBRM.js";
|
|
3
3
|
import "./chunk-SIDKK73N.js";
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
import "./chunk-MDQSTAP5.js";
|
|
5
|
+
import "./chunk-EUEQMXN5.js";
|
|
6
6
|
import "./chunk-PM7DKABI.js";
|
|
@@ -2733,18 +2733,20 @@ function buildGraphArtifacts(projectRoot, options = {}) {
|
|
|
2733
2733
|
const sources = sourceArtifacts(projectRoot, componentReuseAudit);
|
|
2734
2734
|
const combinedSourceHash = sourceHash(sources);
|
|
2735
2735
|
const previousSnapshot = readJsonFile3(paths.snapshot);
|
|
2736
|
-
const
|
|
2736
|
+
const previousDiff = readJsonFile3(paths.diff);
|
|
2737
|
+
const sourceUnchanged = previousSnapshot?.source_hash === combinedSourceHash;
|
|
2738
|
+
const createdAt = sourceUnchanged ? previousSnapshot.created_at : (/* @__PURE__ */ new Date()).toISOString();
|
|
2737
2739
|
const snapshotId = `graph:${combinedSourceHash.replace(/^sha256:/, "").slice(0, 12)}`;
|
|
2738
2740
|
paths = withSnapshotHistoryPath(paths, snapshotId);
|
|
2739
2741
|
const baseSnapshot = buildGraphSnapshotFromEssence(essence, {
|
|
2740
2742
|
snapshotId,
|
|
2741
|
-
parentId:
|
|
2743
|
+
parentId: sourceUnchanged ? previousSnapshot.parent_id : previousSnapshot ? previousSnapshot.id : void 0,
|
|
2742
2744
|
sourceHash: combinedSourceHash,
|
|
2743
2745
|
createdAt,
|
|
2744
2746
|
sourceArtifact: sources[0]
|
|
2745
2747
|
});
|
|
2746
2748
|
const snapshot = augmentProjectGraph(baseSnapshot, projectRoot, sources, componentReuseAudit);
|
|
2747
|
-
const diff = previousSnapshot ? diffGraphSnapshots(previousSnapshot, snapshot) : {
|
|
2749
|
+
const diff = sourceUnchanged && previousDiff?.to === snapshot.id ? previousDiff : previousSnapshot ? diffGraphSnapshots(previousSnapshot, snapshot) : {
|
|
2748
2750
|
$schema: GRAPH_DIFF_SCHEMA_URL,
|
|
2749
2751
|
id: `diff:${snapshot.id}:${snapshot.id}`,
|
|
2750
2752
|
from: snapshot.id,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
listWorkspaceCandidates,
|
|
23
23
|
listWorkspaceProjects,
|
|
24
24
|
shouldFailWorkspaceHealth
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MDQSTAP5.js";
|
|
26
26
|
import {
|
|
27
27
|
acceptBrownfieldLocalLaw,
|
|
28
28
|
acceptStyleBridge,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
writeBrownfieldCodifyProposal,
|
|
53
53
|
writeHostedPatternMappingProposal,
|
|
54
54
|
writeStyleBridgeProposal
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-EUEQMXN5.js";
|
|
56
56
|
import {
|
|
57
57
|
buildGuardRegistryContext,
|
|
58
58
|
createDoctrineMap,
|
|
@@ -4178,7 +4178,7 @@ function cmdCreate(type, name, projectRoot = process.cwd()) {
|
|
|
4178
4178
|
}
|
|
4179
4179
|
|
|
4180
4180
|
// src/commands/doctor.ts
|
|
4181
|
-
import { existsSync as existsSync15, readdirSync as readdirSync5, readFileSync as readFileSync12 } from "fs";
|
|
4181
|
+
import { existsSync as existsSync15, readdirSync as readdirSync5, readFileSync as readFileSync12, statSync as statSync5 } from "fs";
|
|
4182
4182
|
import { dirname as dirname4, join as join17, relative as relative4 } from "path";
|
|
4183
4183
|
import { fileURLToPath } from "url";
|
|
4184
4184
|
import { isV4 as isV43 } from "@decantr/essence-spec";
|
|
@@ -4302,7 +4302,7 @@ function detectDesignAuthority(workspaceRoot, appRoot) {
|
|
|
4302
4302
|
function findCiFiles(root) {
|
|
4303
4303
|
const files = [];
|
|
4304
4304
|
const workflows = join17(root, ".github", "workflows");
|
|
4305
|
-
if (
|
|
4305
|
+
if (pathIsDirectory(workflows)) {
|
|
4306
4306
|
for (const entry of readdirSync5(workflows, { withFileTypes: true })) {
|
|
4307
4307
|
if (!entry.isFile()) continue;
|
|
4308
4308
|
const path = join17(workflows, entry.name);
|
|
@@ -4312,12 +4312,26 @@ function findCiFiles(root) {
|
|
|
4312
4312
|
}
|
|
4313
4313
|
for (const candidate of ["Jenkinsfile", ".gitlab-ci.yml", "azure-pipelines.yml", "BUILD"]) {
|
|
4314
4314
|
const path = join17(root, candidate);
|
|
4315
|
-
if (
|
|
4315
|
+
if (pathIsFile(path) && readFileSync12(path, "utf-8").includes("decantr")) {
|
|
4316
4316
|
files.push(candidate);
|
|
4317
4317
|
}
|
|
4318
4318
|
}
|
|
4319
4319
|
return files.sort();
|
|
4320
4320
|
}
|
|
4321
|
+
function pathIsFile(path) {
|
|
4322
|
+
try {
|
|
4323
|
+
return statSync5(path).isFile();
|
|
4324
|
+
} catch {
|
|
4325
|
+
return false;
|
|
4326
|
+
}
|
|
4327
|
+
}
|
|
4328
|
+
function pathIsDirectory(path) {
|
|
4329
|
+
try {
|
|
4330
|
+
return statSync5(path).isDirectory();
|
|
4331
|
+
} catch {
|
|
4332
|
+
return false;
|
|
4333
|
+
}
|
|
4334
|
+
}
|
|
4321
4335
|
function statusFromIssues(issues, essenceVersion) {
|
|
4322
4336
|
if (!essenceVersion) return "needs-setup";
|
|
4323
4337
|
if (essenceVersion && essenceVersion !== "4.0.0") return "needs-migration";
|
|
@@ -6166,7 +6180,7 @@ async function cmdPublish(type, name, projectRoot = process.cwd()) {
|
|
|
6166
6180
|
|
|
6167
6181
|
// src/commands/refresh.ts
|
|
6168
6182
|
import { createHash } from "crypto";
|
|
6169
|
-
import { existsSync as existsSync22, readdirSync as readdirSync6, readFileSync as readFileSync16, statSync as
|
|
6183
|
+
import { existsSync as existsSync22, readdirSync as readdirSync6, readFileSync as readFileSync16, statSync as statSync6 } from "fs";
|
|
6170
6184
|
import { isAbsolute as isAbsolute2, join as join24, relative as relative5 } from "path";
|
|
6171
6185
|
import { isV4 as isV45 } from "@decantr/essence-spec";
|
|
6172
6186
|
import { collectMissingPackManifestFiles as collectMissingPackManifestFiles2 } from "@decantr/verifier";
|
|
@@ -6211,7 +6225,7 @@ function snapshotGeneratedFiles(projectRoot) {
|
|
|
6211
6225
|
}
|
|
6212
6226
|
function fileMtimeMs(path) {
|
|
6213
6227
|
try {
|
|
6214
|
-
return
|
|
6228
|
+
return statSync6(path).mtimeMs;
|
|
6215
6229
|
} catch {
|
|
6216
6230
|
return 0;
|
|
6217
6231
|
}
|
|
@@ -11044,7 +11058,7 @@ async function cmdAdoptWorkflow(args) {
|
|
|
11044
11058
|
await cmdGraph(projectRoot, { displayRoot: process.cwd() });
|
|
11045
11059
|
if (process.exitCode && process.exitCode !== 0) return;
|
|
11046
11060
|
if (runVerify) {
|
|
11047
|
-
const { cmdHealth } = await import("./health-
|
|
11061
|
+
const { cmdHealth } = await import("./health-5S2L44SX.js");
|
|
11048
11062
|
await cmdHealth(projectRoot, {
|
|
11049
11063
|
browser: runBrowser,
|
|
11050
11064
|
browserBaseUrl: baseUrl,
|
|
@@ -11118,7 +11132,7 @@ async function cmdVerifyWorkflow(args) {
|
|
|
11118
11132
|
return;
|
|
11119
11133
|
}
|
|
11120
11134
|
if (workspaceMode) {
|
|
11121
|
-
const { cmdWorkspace } = await import("./workspace-
|
|
11135
|
+
const { cmdWorkspace } = await import("./workspace-UIKTIWUN.js");
|
|
11122
11136
|
await cmdWorkspace(process.cwd(), ["workspace", "health", ...withoutWorkflowOnlyFlags(args)]);
|
|
11123
11137
|
return;
|
|
11124
11138
|
}
|
|
@@ -11161,7 +11175,7 @@ async function cmdVerifyWorkflow(args) {
|
|
|
11161
11175
|
process.exitCode = void 0;
|
|
11162
11176
|
}
|
|
11163
11177
|
}
|
|
11164
|
-
const { cmdHealth, parseHealthArgs } = await import("./health-
|
|
11178
|
+
const { cmdHealth, parseHealthArgs } = await import("./health-5S2L44SX.js");
|
|
11165
11179
|
await cmdHealth(workspaceInfo.appRoot, parseHealthArgs(healthArgs));
|
|
11166
11180
|
if (localPatterns) {
|
|
11167
11181
|
const validation = validateLocalLaw(workspaceInfo.appRoot);
|
|
@@ -12823,7 +12837,7 @@ async function main() {
|
|
|
12823
12837
|
const { flags } = parseLooseArgs(args);
|
|
12824
12838
|
const workspaceInfo = resolveWorkflowProject(flags, "health");
|
|
12825
12839
|
if (!workspaceInfo) break;
|
|
12826
|
-
const { cmdHealth, parseHealthArgs } = await import("./health-
|
|
12840
|
+
const { cmdHealth, parseHealthArgs } = await import("./health-5S2L44SX.js");
|
|
12827
12841
|
await cmdHealth(workspaceInfo.appRoot, parseHealthArgs(stripProjectArgs(args)));
|
|
12828
12842
|
} catch (e) {
|
|
12829
12843
|
console.error(error2(e.message));
|
|
@@ -12851,7 +12865,7 @@ async function main() {
|
|
|
12851
12865
|
cmdStudioHelp();
|
|
12852
12866
|
break;
|
|
12853
12867
|
}
|
|
12854
|
-
const { cmdStudio, parseStudioArgs } = await import("./studio-
|
|
12868
|
+
const { cmdStudio, parseStudioArgs } = await import("./studio-EN347SLA.js");
|
|
12855
12869
|
await cmdStudio(process.cwd(), parseStudioArgs(args));
|
|
12856
12870
|
} catch (e) {
|
|
12857
12871
|
console.error(error2(e.message));
|
|
@@ -12865,7 +12879,7 @@ async function main() {
|
|
|
12865
12879
|
cmdWorkspaceHelp();
|
|
12866
12880
|
break;
|
|
12867
12881
|
}
|
|
12868
|
-
const { cmdWorkspace } = await import("./workspace-
|
|
12882
|
+
const { cmdWorkspace } = await import("./workspace-UIKTIWUN.js");
|
|
12869
12883
|
await cmdWorkspace(process.cwd(), args);
|
|
12870
12884
|
} catch (e) {
|
|
12871
12885
|
console.error(error2(e.message));
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWorkspaceHealthReport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MDQSTAP5.js";
|
|
4
4
|
import {
|
|
5
5
|
createProjectHealthReport
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EUEQMXN5.js";
|
|
7
7
|
import {
|
|
8
8
|
sendStudioHealthRefreshedTelemetry,
|
|
9
9
|
sendStudioStartedTelemetry
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
listWorkspaceProjects,
|
|
8
8
|
parseWorkspaceArgs,
|
|
9
9
|
shouldFailWorkspaceHealth
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-MDQSTAP5.js";
|
|
11
|
+
import "./chunk-EUEQMXN5.js";
|
|
12
12
|
import "./chunk-PM7DKABI.js";
|
|
13
13
|
export {
|
|
14
14
|
cmdWorkspace,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decantr/cli",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "Decantr CLI - adopt, verify, graph, and govern frontend codebases touched by AI agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"decantr",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"ajv": "^8.20.0",
|
|
52
52
|
"@decantr/core": "3.5.0",
|
|
53
53
|
"@decantr/registry": "3.4.0",
|
|
54
|
-
"@decantr/verifier": "3.5.0",
|
|
55
54
|
"@decantr/telemetry": "3.4.0",
|
|
55
|
+
"@decantr/verifier": "3.5.0",
|
|
56
56
|
"@decantr/essence-spec": "3.4.0"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|