@inerrata-corporation/errata 2.0.6-dev.2278 → 2.0.6-dev.2282
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 +27 -5
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -16353,6 +16353,9 @@ function parsePackageJson(path2, text) {
|
|
|
16353
16353
|
}
|
|
16354
16354
|
return deps;
|
|
16355
16355
|
}
|
|
16356
|
+
function isPep508DirectRef(spec) {
|
|
16357
|
+
return /^[A-Za-z0-9][A-Za-z0-9._-]*(?:\[[^\]]*\])?\s*@\s*\S/.test(spec.trim());
|
|
16358
|
+
}
|
|
16356
16359
|
function parseRequirements(path2, text) {
|
|
16357
16360
|
const deps = [];
|
|
16358
16361
|
for (const raw2 of text.split(/\r?\n/)) {
|
|
@@ -16360,7 +16363,14 @@ function parseRequirements(path2, text) {
|
|
|
16360
16363
|
if (!line || line.startsWith("-") || line.startsWith("git+") || line.startsWith("http")) continue;
|
|
16361
16364
|
const m = /^([A-Za-z0-9][A-Za-z0-9._-]*)(?:\[[^\]]*\])?\s*(?:([=<>!~]+)\s*([^\s;]+))?/.exec(line);
|
|
16362
16365
|
if (m) {
|
|
16363
|
-
deps.push({
|
|
16366
|
+
deps.push({
|
|
16367
|
+
ecosystem: "pypi",
|
|
16368
|
+
name: m[1] ?? "",
|
|
16369
|
+
version: m[2] ? m[3] ?? null : null,
|
|
16370
|
+
kind: "package",
|
|
16371
|
+
manifest: path2,
|
|
16372
|
+
...isPep508DirectRef(line) ? { directRef: true } : {}
|
|
16373
|
+
});
|
|
16364
16374
|
}
|
|
16365
16375
|
}
|
|
16366
16376
|
return deps;
|
|
@@ -16372,7 +16382,16 @@ function parsePyproject(path2, text) {
|
|
|
16372
16382
|
for (const s of (m[1] ?? "").matchAll(/"([^"]+)"|'([^']+)'/g)) {
|
|
16373
16383
|
const spec = s[1] || s[2] || "";
|
|
16374
16384
|
const mm = /^([A-Za-z0-9][A-Za-z0-9._-]*)/.exec(spec);
|
|
16375
|
-
if (mm)
|
|
16385
|
+
if (mm) {
|
|
16386
|
+
deps.push({
|
|
16387
|
+
ecosystem: "pypi",
|
|
16388
|
+
name: mm[1] ?? "",
|
|
16389
|
+
version: null,
|
|
16390
|
+
kind: "package",
|
|
16391
|
+
manifest: path2,
|
|
16392
|
+
...isPep508DirectRef(spec) ? { directRef: true } : {}
|
|
16393
|
+
});
|
|
16394
|
+
}
|
|
16376
16395
|
}
|
|
16377
16396
|
return deps;
|
|
16378
16397
|
}
|
|
@@ -76512,10 +76531,13 @@ function isRuntimeToken(token) {
|
|
|
76512
76531
|
function rankCandidates(cs) {
|
|
76513
76532
|
return [...cs].sort((a, b) => b.weight - a.weight || a.name.localeCompare(b.name));
|
|
76514
76533
|
}
|
|
76534
|
+
var VCS_HOST_SHORTHAND = /^(?:github|gitlab|bitbucket|gist):/;
|
|
76535
|
+
var SCP_STYLE_REMOTE = /^[\w.-]+@[\w.-]+:/;
|
|
76536
|
+
var BARE_REPO_SHORTHAND = /^[a-z0-9_.-]+\/[a-z0-9_.-]+(?:#.*)?$/;
|
|
76515
76537
|
function isLocalSpec(version2) {
|
|
76516
76538
|
if (!version2) return false;
|
|
76517
76539
|
const v = version2.trim().toLowerCase();
|
|
76518
|
-
return v.startsWith("workspace:") || v.startsWith("link:") || v.startsWith("file:") || v.startsWith("portal:") || v.startsWith("path:") || v.startsWith("git:") || v.startsWith("git+") || v.includes("://");
|
|
76540
|
+
return v.startsWith("workspace:") || v.startsWith("link:") || v.startsWith("file:") || v.startsWith("portal:") || v.startsWith("path:") || v.startsWith("git:") || v.startsWith("git+") || v.includes("://") || VCS_HOST_SHORTHAND.test(v) || SCP_STYLE_REMOTE.test(v) || BARE_REPO_SHORTHAND.test(v);
|
|
76519
76541
|
}
|
|
76520
76542
|
function retrievalStackTokens(input) {
|
|
76521
76543
|
const cap = input.cap ?? RETRIEVAL_STACK_CAP;
|
|
@@ -76564,7 +76586,7 @@ function retrievalStackTokens(input) {
|
|
|
76564
76586
|
if (RUNTIME_KINDS.has(d.kind)) continue;
|
|
76565
76587
|
const ecosystem = d.ecosystem.toLowerCase();
|
|
76566
76588
|
if (lockfileKeys.has(ecoKey(ecosystem, d.name))) continue;
|
|
76567
|
-
if (isLocalSpec(d.version)) continue;
|
|
76589
|
+
if (d.directRef || isLocalSpec(d.version)) continue;
|
|
76568
76590
|
if (!isPublicDep({ ecosystem, name: d.name }, registry2)) continue;
|
|
76569
76591
|
const key = ecoKey(ecosystem, d.name);
|
|
76570
76592
|
const prev = counted.get(key);
|
|
@@ -78093,7 +78115,7 @@ function createWatchBreaker(deps) {
|
|
|
78093
78115
|
}
|
|
78094
78116
|
|
|
78095
78117
|
// src/engine.ts
|
|
78096
|
-
var DAEMON_VERSION = true ? "2.0.6-dev.
|
|
78118
|
+
var DAEMON_VERSION = true ? "2.0.6-dev.2282" : "2.0.0-alpha.0";
|
|
78097
78119
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
78098
78120
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
78099
78121
|
var GIT_OP_MUTE_MS = 4e3;
|