@inerrata-corporation/errata 2.0.6-dev.2592 → 2.0.6-dev.2602
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/errata.mjs +25 -4
- package/package.json +1 -1
- package/pass-worker.mjs +24 -3
package/errata.mjs
CHANGED
|
@@ -33879,8 +33879,11 @@ async function scan(root, current, ignores, providers, out2) {
|
|
|
33879
33879
|
const provider = providers.find((p) => p.fileExtensions.includes(ext)) ?? null;
|
|
33880
33880
|
const rel = relative2(root, abs).split(sep).join("/");
|
|
33881
33881
|
let size = 0;
|
|
33882
|
+
let mtimeMs;
|
|
33882
33883
|
try {
|
|
33883
|
-
|
|
33884
|
+
const st = statSync3(abs);
|
|
33885
|
+
size = st.size;
|
|
33886
|
+
mtimeMs = st.mtimeMs;
|
|
33884
33887
|
} catch {
|
|
33885
33888
|
continue;
|
|
33886
33889
|
}
|
|
@@ -33888,6 +33891,7 @@ async function scan(root, current, ignores, providers, out2) {
|
|
|
33888
33891
|
absPath: abs,
|
|
33889
33892
|
relPath: rel,
|
|
33890
33893
|
size,
|
|
33894
|
+
mtimeMs,
|
|
33891
33895
|
language: provider?.id ?? null,
|
|
33892
33896
|
provider
|
|
33893
33897
|
});
|
|
@@ -33928,8 +33932,11 @@ function gitListFiles(root, ignores, providers) {
|
|
|
33928
33932
|
for (const rel of rels) {
|
|
33929
33933
|
const abs = join12(root, rel);
|
|
33930
33934
|
let size;
|
|
33935
|
+
let mtimeMs;
|
|
33931
33936
|
try {
|
|
33932
|
-
|
|
33937
|
+
const st = statSync3(abs);
|
|
33938
|
+
size = st.size;
|
|
33939
|
+
mtimeMs = st.mtimeMs;
|
|
33933
33940
|
} catch {
|
|
33934
33941
|
continue;
|
|
33935
33942
|
}
|
|
@@ -33939,6 +33946,7 @@ function gitListFiles(root, ignores, providers) {
|
|
|
33939
33946
|
absPath: abs,
|
|
33940
33947
|
relPath: rel,
|
|
33941
33948
|
size,
|
|
33949
|
+
mtimeMs,
|
|
33942
33950
|
language: provider?.id ?? null,
|
|
33943
33951
|
provider
|
|
33944
33952
|
});
|
|
@@ -33947,12 +33955,14 @@ function gitListFiles(root, ignores, providers) {
|
|
|
33947
33955
|
}
|
|
33948
33956
|
function upsertFile(store, id, f, workspaceId2, skip) {
|
|
33949
33957
|
const now = nowTs();
|
|
33958
|
+
const existing = store.getNode(id);
|
|
33959
|
+
if (existing && fileUnchanged(existing.attrs, f, skip)) return;
|
|
33950
33960
|
let contentHash;
|
|
33951
33961
|
try {
|
|
33952
33962
|
contentHash = createHash5("sha256").update(readFileSync11(f.absPath)).digest("hex");
|
|
33953
33963
|
} catch {
|
|
33954
33964
|
}
|
|
33955
|
-
const carried = { ...
|
|
33965
|
+
const carried = { ...existing?.attrs ?? {} };
|
|
33956
33966
|
for (const owned of ["contentHash", "indexSkipped", "symbolCount"]) delete carried[owned];
|
|
33957
33967
|
const node2 = {
|
|
33958
33968
|
id,
|
|
@@ -33976,6 +33986,7 @@ function upsertFile(store, id, f, workspaceId2, skip) {
|
|
|
33976
33986
|
absPath: f.absPath,
|
|
33977
33987
|
relPath: f.relPath,
|
|
33978
33988
|
size: f.size,
|
|
33989
|
+
...f.mtimeMs !== void 0 ? { mtimeMs: f.mtimeMs } : {},
|
|
33979
33990
|
language: f.language ?? null,
|
|
33980
33991
|
workspaceId: workspaceId2,
|
|
33981
33992
|
...contentHash ? { contentHash } : {},
|
|
@@ -33984,6 +33995,15 @@ function upsertFile(store, id, f, workspaceId2, skip) {
|
|
|
33984
33995
|
};
|
|
33985
33996
|
store.mergeNode(node2);
|
|
33986
33997
|
}
|
|
33998
|
+
function fileUnchanged(attrs, f, skip) {
|
|
33999
|
+
if (f.mtimeMs === void 0 || attrs["mtimeMs"] !== f.mtimeMs) return false;
|
|
34000
|
+
if (attrs["size"] !== f.size || typeof attrs["contentHash"] !== "string") return false;
|
|
34001
|
+
if (attrs["relPath"] !== f.relPath || attrs["absPath"] !== f.absPath) return false;
|
|
34002
|
+
if ((attrs["language"] ?? null) !== (f.language ?? null)) return false;
|
|
34003
|
+
const stored = attrs["indexSkipped"];
|
|
34004
|
+
const scanOwned = stored === "no-provider" || stored === "oversize" ? stored : void 0;
|
|
34005
|
+
return scanOwned === skip;
|
|
34006
|
+
}
|
|
33987
34007
|
function stampIndexOutcome(store, fileId, outcome) {
|
|
33988
34008
|
const fnode = store.getNode(fileId);
|
|
33989
34009
|
if (!fnode) return;
|
|
@@ -41289,6 +41309,7 @@ __export(src_exports5, {
|
|
|
41289
41309
|
defaultProviders: () => defaultProviders,
|
|
41290
41310
|
edgeId: () => edgeId,
|
|
41291
41311
|
fileNodeId: () => fileNodeId,
|
|
41312
|
+
fileUnchanged: () => fileUnchanged,
|
|
41292
41313
|
findInnermostScope: () => findInnermostScope,
|
|
41293
41314
|
folderNodeId: () => folderNodeId,
|
|
41294
41315
|
fromHex: () => fromHex,
|
|
@@ -78396,7 +78417,7 @@ function createWatchBreaker(deps) {
|
|
|
78396
78417
|
}
|
|
78397
78418
|
|
|
78398
78419
|
// src/engine.ts
|
|
78399
|
-
var DAEMON_VERSION = true ? "2.0.6-dev.
|
|
78420
|
+
var DAEMON_VERSION = true ? "2.0.6-dev.2602" : "2.0.0-alpha.0";
|
|
78400
78421
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
78401
78422
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
78402
78423
|
var GIT_OP_MUTE_MS = 4e3;
|
package/package.json
CHANGED
package/pass-worker.mjs
CHANGED
|
@@ -16895,8 +16895,11 @@ async function scan(root, current, ignores, providers, out2) {
|
|
|
16895
16895
|
const provider = providers.find((p) => p.fileExtensions.includes(ext)) ?? null;
|
|
16896
16896
|
const rel = relative(root, abs).split(sep).join("/");
|
|
16897
16897
|
let size = 0;
|
|
16898
|
+
let mtimeMs;
|
|
16898
16899
|
try {
|
|
16899
|
-
|
|
16900
|
+
const st = statSync2(abs);
|
|
16901
|
+
size = st.size;
|
|
16902
|
+
mtimeMs = st.mtimeMs;
|
|
16900
16903
|
} catch {
|
|
16901
16904
|
continue;
|
|
16902
16905
|
}
|
|
@@ -16904,6 +16907,7 @@ async function scan(root, current, ignores, providers, out2) {
|
|
|
16904
16907
|
absPath: abs,
|
|
16905
16908
|
relPath: rel,
|
|
16906
16909
|
size,
|
|
16910
|
+
mtimeMs,
|
|
16907
16911
|
language: provider?.id ?? null,
|
|
16908
16912
|
provider
|
|
16909
16913
|
});
|
|
@@ -16944,8 +16948,11 @@ function gitListFiles(root, ignores, providers) {
|
|
|
16944
16948
|
for (const rel of rels) {
|
|
16945
16949
|
const abs = join2(root, rel);
|
|
16946
16950
|
let size;
|
|
16951
|
+
let mtimeMs;
|
|
16947
16952
|
try {
|
|
16948
|
-
|
|
16953
|
+
const st = statSync2(abs);
|
|
16954
|
+
size = st.size;
|
|
16955
|
+
mtimeMs = st.mtimeMs;
|
|
16949
16956
|
} catch {
|
|
16950
16957
|
continue;
|
|
16951
16958
|
}
|
|
@@ -16955,6 +16962,7 @@ function gitListFiles(root, ignores, providers) {
|
|
|
16955
16962
|
absPath: abs,
|
|
16956
16963
|
relPath: rel,
|
|
16957
16964
|
size,
|
|
16965
|
+
mtimeMs,
|
|
16958
16966
|
language: provider?.id ?? null,
|
|
16959
16967
|
provider
|
|
16960
16968
|
});
|
|
@@ -16963,12 +16971,14 @@ function gitListFiles(root, ignores, providers) {
|
|
|
16963
16971
|
}
|
|
16964
16972
|
function upsertFile(store2, id, f, workspaceId, skip) {
|
|
16965
16973
|
const now = nowTs();
|
|
16974
|
+
const existing = store2.getNode(id);
|
|
16975
|
+
if (existing && fileUnchanged(existing.attrs, f, skip)) return;
|
|
16966
16976
|
let contentHash;
|
|
16967
16977
|
try {
|
|
16968
16978
|
contentHash = createHash3("sha256").update(readFileSync2(f.absPath)).digest("hex");
|
|
16969
16979
|
} catch {
|
|
16970
16980
|
}
|
|
16971
|
-
const carried = { ...
|
|
16981
|
+
const carried = { ...existing?.attrs ?? {} };
|
|
16972
16982
|
for (const owned of ["contentHash", "indexSkipped", "symbolCount"]) delete carried[owned];
|
|
16973
16983
|
const node = {
|
|
16974
16984
|
id,
|
|
@@ -16992,6 +17002,7 @@ function upsertFile(store2, id, f, workspaceId, skip) {
|
|
|
16992
17002
|
absPath: f.absPath,
|
|
16993
17003
|
relPath: f.relPath,
|
|
16994
17004
|
size: f.size,
|
|
17005
|
+
...f.mtimeMs !== void 0 ? { mtimeMs: f.mtimeMs } : {},
|
|
16995
17006
|
language: f.language ?? null,
|
|
16996
17007
|
workspaceId,
|
|
16997
17008
|
...contentHash ? { contentHash } : {},
|
|
@@ -17000,6 +17011,15 @@ function upsertFile(store2, id, f, workspaceId, skip) {
|
|
|
17000
17011
|
};
|
|
17001
17012
|
store2.mergeNode(node);
|
|
17002
17013
|
}
|
|
17014
|
+
function fileUnchanged(attrs, f, skip) {
|
|
17015
|
+
if (f.mtimeMs === void 0 || attrs["mtimeMs"] !== f.mtimeMs) return false;
|
|
17016
|
+
if (attrs["size"] !== f.size || typeof attrs["contentHash"] !== "string") return false;
|
|
17017
|
+
if (attrs["relPath"] !== f.relPath || attrs["absPath"] !== f.absPath) return false;
|
|
17018
|
+
if ((attrs["language"] ?? null) !== (f.language ?? null)) return false;
|
|
17019
|
+
const stored = attrs["indexSkipped"];
|
|
17020
|
+
const scanOwned = stored === "no-provider" || stored === "oversize" ? stored : void 0;
|
|
17021
|
+
return scanOwned === skip;
|
|
17022
|
+
}
|
|
17003
17023
|
function stampIndexOutcome(store2, fileId, outcome) {
|
|
17004
17024
|
const fnode = store2.getNode(fileId);
|
|
17005
17025
|
if (!fnode) return;
|
|
@@ -24305,6 +24325,7 @@ __export(src_exports, {
|
|
|
24305
24325
|
defaultProviders: () => defaultProviders,
|
|
24306
24326
|
edgeId: () => edgeId,
|
|
24307
24327
|
fileNodeId: () => fileNodeId,
|
|
24328
|
+
fileUnchanged: () => fileUnchanged,
|
|
24308
24329
|
findInnermostScope: () => findInnermostScope,
|
|
24309
24330
|
folderNodeId: () => folderNodeId,
|
|
24310
24331
|
fromHex: () => fromHex,
|