mason-context 0.17.4 → 0.19.0
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/CHANGELOG.md +19 -0
- package/README.md +2 -0
- package/dist/mason-audit.js +132 -68
- package/dist/mason-audit.js.map +1 -1
- package/dist/mason-auto.js +165 -45
- package/dist/mason-auto.js.map +1 -1
- package/dist/mason-drift.js +10 -4
- package/dist/mason-drift.js.map +1 -1
- package/dist/mason-hook.js +15 -9
- package/dist/mason-hook.js.map +1 -1
- package/dist/mason-mcp.js +1177 -348
- package/dist/mason-mcp.js.map +1 -1
- package/dist/mason-review.js +11 -5
- package/dist/mason-review.js.map +1 -1
- package/dist/mason-runtime.js +337 -0
- package/dist/mason-runtime.js.map +1 -0
- package/dist/mason.js +964 -238
- package/dist/mason.js.map +1 -1
- package/package.json +2 -1
package/dist/mason-review.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
if (!import.meta.url.endsWith("/mason-runtime.js")) await import("./mason-runtime.js").then(m => m.registerRuntime());
|
|
2
3
|
|
|
3
4
|
// src/review/cli.ts
|
|
4
5
|
import path12 from "path";
|
|
5
6
|
import { stripVTControlCharacters } from "util";
|
|
6
7
|
|
|
7
8
|
// src/review/review.ts
|
|
8
|
-
import
|
|
9
|
+
import fs6 from "fs/promises";
|
|
9
10
|
import path11 from "path";
|
|
10
11
|
import { execFile as execFile3 } from "child_process";
|
|
11
12
|
import { promisify as promisify3 } from "util";
|
|
@@ -48,7 +49,7 @@ function execGit(args, options) {
|
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
// src/drift/drift.ts
|
|
51
|
-
import
|
|
52
|
+
import fs4 from "fs/promises";
|
|
52
53
|
import path6 from "path";
|
|
53
54
|
|
|
54
55
|
// src/snapshot/snapshot.ts
|
|
@@ -256,6 +257,10 @@ async function readStoreJson(root, relative) {
|
|
|
256
257
|
// src/snapshot/snapshot.ts
|
|
257
258
|
import { z } from "zod";
|
|
258
259
|
|
|
260
|
+
// src/utils/store-lock.ts
|
|
261
|
+
import fs3 from "fs/promises";
|
|
262
|
+
import os from "os";
|
|
263
|
+
|
|
259
264
|
// src/test-map.ts
|
|
260
265
|
import path4 from "path";
|
|
261
266
|
async function buildTestMap(dir) {
|
|
@@ -332,6 +337,7 @@ var verificationFields = {
|
|
|
332
337
|
refreshedHash: z.string().optional(),
|
|
333
338
|
verifiedAt: z.string().optional(),
|
|
334
339
|
verifiedHash: z.string().optional(),
|
|
340
|
+
verificationToken: z.string().optional(),
|
|
335
341
|
verificationFailed: z.boolean().optional(),
|
|
336
342
|
verificationNote: z.string().optional()
|
|
337
343
|
};
|
|
@@ -567,7 +573,7 @@ function decisionKnowledge(record, freshness = "unknown", proposalFreshness = "u
|
|
|
567
573
|
}
|
|
568
574
|
|
|
569
575
|
// src/decisions/decisions.ts
|
|
570
|
-
import
|
|
576
|
+
import fs5 from "fs/promises";
|
|
571
577
|
import path8 from "path";
|
|
572
578
|
import { createHash } from "crypto";
|
|
573
579
|
import { z as z3 } from "zod";
|
|
@@ -593,7 +599,7 @@ async function loadDecisionStore(rootDir) {
|
|
|
593
599
|
const diagnostics = [];
|
|
594
600
|
let entries;
|
|
595
601
|
try {
|
|
596
|
-
entries = await
|
|
602
|
+
entries = await fs5.readdir(await storePath(rootDir, ".mason/decisions"));
|
|
597
603
|
} catch (error) {
|
|
598
604
|
if (error.code !== "ENOENT") diagnostics.push({ path: ".mason/decisions", message: String(error) });
|
|
599
605
|
return { records, diagnostics };
|
|
@@ -1235,7 +1241,7 @@ async function computeReview(rootDir, base, options = {}) {
|
|
|
1235
1241
|
analyzed,
|
|
1236
1242
|
async (relPath) => {
|
|
1237
1243
|
try {
|
|
1238
|
-
await
|
|
1244
|
+
await fs6.access(path11.join(resolvedRoot, relPath));
|
|
1239
1245
|
return true;
|
|
1240
1246
|
} catch {
|
|
1241
1247
|
return false;
|