@rightkit/release 0.2.124 → 0.2.126
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/ownership.mjs +63 -4
- package/package.json +1 -1
- package/rightkit-ownership.json +10 -1
- package/rightkit-versions.json +27 -15
package/ownership.mjs
CHANGED
|
@@ -15,7 +15,7 @@ export const EXCEPTIONS_FILE = path.join(".rightkit", "ownership-exceptions.json
|
|
|
15
15
|
const CODE_EXT = new Set([".rs", ".ts", ".tsx", ".js", ".mjs", ".cjs", ".jsx", ".swift", ".m", ".mm", ".c", ".cc", ".cpp", ".h", ".py", ".go", ".kt", ".java", ".cs"]);
|
|
16
16
|
// Listed installed/build inputs retain explicit coverage diagnostics.
|
|
17
17
|
const OPAQUE_DIRS = new Set(["target", ".build", "DerivedData", "Pods"]);
|
|
18
|
-
export const SCANNER_VERSION = "2.
|
|
18
|
+
export const SCANNER_VERSION = "2.4.0";
|
|
19
19
|
export const catalogDigest = (manifest) => sha256(manifest);
|
|
20
20
|
const byteDigest = (bytes) => createHash("sha256").update(bytes).digest("hex");
|
|
21
21
|
const inputDigest = (file) => file.digest ?? byteDigest(file.bytes);
|
|
@@ -25,7 +25,7 @@ const catalogCache = new Map();
|
|
|
25
25
|
function sourceMatchers(manifest) {
|
|
26
26
|
const digest = catalogDigest(manifest);
|
|
27
27
|
if (catalogCache.has(digest)) return catalogCache.get(digest);
|
|
28
|
-
const sources = manifest.capabilities.flatMap((c) => c.fingerprints.filter((f) => f.type === "source").map((f) => ({ c, f, re: new RegExp(f.pattern, f.flags ?? "") })));
|
|
28
|
+
const sources = manifest.capabilities.flatMap((c) => c.fingerprints.filter((f) => f.type === "source").map((f) => ({ c, f, re: new RegExp(f.pattern, f.codeOnly ? `${(f.flags ?? "").replace(/[gy]/g, "")}g` : f.flags ?? "") })));
|
|
29
29
|
let prefilter;
|
|
30
30
|
try {
|
|
31
31
|
// Backreferences cannot be relocated safely inside one alternation. In that
|
|
@@ -40,15 +40,74 @@ function sourceMatchers(manifest) {
|
|
|
40
40
|
return matchers;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
// Code-only patterns may consume string arguments, but must start outside
|
|
44
|
+
// literals/comments. Keep offsets/newlines intact for multiline call reporting.
|
|
45
|
+
function sourceNonCode(text, rust) {
|
|
46
|
+
const nonCode = new Uint8Array(text.length);
|
|
47
|
+
for (let i = 0; i < text.length;) {
|
|
48
|
+
const start = i;
|
|
49
|
+
if (text.startsWith("//", i) || text.startsWith("/*", i)) {
|
|
50
|
+
if (text[i + 1] === "/") {
|
|
51
|
+
i = text.indexOf("\n", i + 2);
|
|
52
|
+
if (i === -1) i = text.length;
|
|
53
|
+
} else {
|
|
54
|
+
i += 2;
|
|
55
|
+
let depth = 1;
|
|
56
|
+
while (i < text.length && depth) {
|
|
57
|
+
if (rust && text.startsWith("/*", i)) { depth++; i += 2; }
|
|
58
|
+
else if (text.startsWith("*/", i)) { depth--; i += 2; }
|
|
59
|
+
else i++;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
nonCode.fill(1, start, i);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const raw = rust && (i === 0 || !/[\w]/.test(text[i - 1])) && /^(?:br|cr|r)(#*)"/.exec(text.slice(i));
|
|
66
|
+
if (raw) {
|
|
67
|
+
const closing = `"${raw[1]}`, end = text.indexOf(closing, i + raw[0].length);
|
|
68
|
+
i = end === -1 ? text.length : end + closing.length;
|
|
69
|
+
} else if (text[i] === '"' || (!rust && (text[i] === "'" || text[i] === "`")) ||
|
|
70
|
+
(rust && text[i] === "'" && /^'(?:\\(?:u\{[\da-fA-F]+\}|x[\da-fA-F]{2}|[^\r\n])|[^'\\\r\n])'/.test(text.slice(i)))) {
|
|
71
|
+
const quote = text[i++];
|
|
72
|
+
while (i < text.length) {
|
|
73
|
+
if (text[i] === "\\") i = Math.min(i + 2, text.length);
|
|
74
|
+
else if (text[i++] === quote) break;
|
|
75
|
+
}
|
|
76
|
+
} else { i++; continue; }
|
|
77
|
+
nonCode.fill(1, start, i);
|
|
78
|
+
}
|
|
79
|
+
return nonCode;
|
|
80
|
+
}
|
|
81
|
+
|
|
43
82
|
function sourceFindings(file, matchers) {
|
|
44
|
-
const
|
|
83
|
+
const ext = path.posix.extname(file.rel).toLowerCase();
|
|
84
|
+
const key = `${matchers.digest}:${ext}:${file.cacheKey ?? inputDigest(file)}`;
|
|
45
85
|
if (sourceCache.has(key)) return sourceCache.get(key);
|
|
46
86
|
const text = file.bytes.toString("utf8"), findings = [];
|
|
47
87
|
if (matchers.prefilter.test(text)) {
|
|
48
|
-
|
|
88
|
+
const lines = text.split(/\r?\n/);
|
|
89
|
+
const applicable = matchers.sources.filter(({ f }) => !f.extensions || f.extensions.includes(ext));
|
|
90
|
+
const lineMatchers = applicable.filter(({ f }) => !f.codeOnly);
|
|
91
|
+
for (const [i, line] of lines.entries()) if (!commentOnly(line)) for (const { c, f, re } of lineMatchers) {
|
|
49
92
|
re.lastIndex = 0;
|
|
50
93
|
if (re.test(line)) findings.push({ fingerprint: f.id, capability: c.capability, package: c.package, line: i + 1, text: line.trim().slice(0, 160) });
|
|
51
94
|
}
|
|
95
|
+
const codeMatchers = applicable.filter(({ f }) => f.codeOnly);
|
|
96
|
+
if (codeMatchers.length) {
|
|
97
|
+
const nonCode = sourceNonCode(text, ext === ".rs");
|
|
98
|
+
for (const { c, f, re } of codeMatchers) {
|
|
99
|
+
re.lastIndex = 0;
|
|
100
|
+
const reported = new Set();
|
|
101
|
+
let line = 1, offset = 0;
|
|
102
|
+
for (const match of text.matchAll(re)) {
|
|
103
|
+
if (!match[0] || nonCode[match.index]) continue;
|
|
104
|
+
for (; offset < match.index; offset++) if (text[offset] === "\n") line++;
|
|
105
|
+
if (reported.has(line)) continue;
|
|
106
|
+
reported.add(line);
|
|
107
|
+
findings.push({ fingerprint: f.id, capability: c.capability, package: c.package, line, text: lines[line - 1].trim().slice(0, 160) });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
52
111
|
}
|
|
53
112
|
sourceCache.set(key, findings);
|
|
54
113
|
if (sourceCache.size > 16384) sourceCache.delete(sourceCache.keys().next().value);
|
package/package.json
CHANGED
package/rightkit-ownership.json
CHANGED
|
@@ -287,7 +287,16 @@
|
|
|
287
287
|
{
|
|
288
288
|
"id": "ort.env.dylib",
|
|
289
289
|
"type": "source",
|
|
290
|
-
"pattern": "ORT_DYLIB_PATH"
|
|
290
|
+
"pattern": "\\b(?:set_var|remove_var)\\s*\\(\\s*(?:\"ORT_DYLIB_PATH\"|ORT_DYLIB_PATH)\\s*(?=[,)])|\\bprocess\\s*\\.\\s*env\\s*\\.\\s*ORT_DYLIB_PATH\\s*=(?!=|>)|\\bdelete\\s+process\\s*\\.\\s*env\\s*\\.\\s*ORT_DYLIB_PATH\\b",
|
|
291
|
+
"codeOnly": true,
|
|
292
|
+
"extensions": [".rs", ".ts", ".tsx", ".js", ".mjs", ".cjs", ".jsx"]
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"id": "ort.api.init",
|
|
296
|
+
"type": "source",
|
|
297
|
+
"pattern": "\\bort\\s*::\\s*init(?:_from)?\\s*\\(",
|
|
298
|
+
"codeOnly": true,
|
|
299
|
+
"extensions": [".rs"]
|
|
291
300
|
}
|
|
292
301
|
]
|
|
293
302
|
},
|
package/rightkit-versions.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@rightkit/app-shell": "0.2.1",
|
|
17
17
|
"@rightkit/ax": "0.2.4",
|
|
18
18
|
"@rightkit/doc-render": "0.1.3",
|
|
19
|
-
"@rightkit/git": "0.2.
|
|
19
|
+
"@rightkit/git": "0.2.26",
|
|
20
20
|
"@rightkit/hooks": "0.1.1",
|
|
21
21
|
"@rightkit/i18n": "0.1.0",
|
|
22
22
|
"@rightkit/legal": "0.3.1",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@rightkit/pdf-ui": "0.1.2",
|
|
29
29
|
"@rightkit/platform-ui": "0.1.2",
|
|
30
30
|
"@rightkit/qa": "0.3.0",
|
|
31
|
-
"@rightkit/qa-chrome": "0.1.
|
|
32
|
-
"@rightkit/release": "0.2.
|
|
31
|
+
"@rightkit/qa-chrome": "0.1.3",
|
|
32
|
+
"@rightkit/release": "0.2.126",
|
|
33
33
|
"@rightkit/settings-ui": "0.2.7",
|
|
34
34
|
"@rightkit/shell": "0.1.0",
|
|
35
35
|
"@rightkit/tauri": "0.1.1",
|
|
@@ -66,7 +66,8 @@
|
|
|
66
66
|
"0.2.21",
|
|
67
67
|
"0.2.22",
|
|
68
68
|
"0.2.23",
|
|
69
|
-
"0.2.24"
|
|
69
|
+
"0.2.24",
|
|
70
|
+
"0.2.25"
|
|
70
71
|
],
|
|
71
72
|
"@rightkit/legal-ui": [
|
|
72
73
|
"0.1.0",
|
|
@@ -146,7 +147,9 @@
|
|
|
146
147
|
"0.2.120",
|
|
147
148
|
"0.2.121",
|
|
148
149
|
"0.2.122",
|
|
149
|
-
"0.2.123"
|
|
150
|
+
"0.2.123",
|
|
151
|
+
"0.2.124",
|
|
152
|
+
"0.2.125"
|
|
150
153
|
],
|
|
151
154
|
"@rightkit/qa": [
|
|
152
155
|
"0.1.0",
|
|
@@ -202,7 +205,8 @@
|
|
|
202
205
|
],
|
|
203
206
|
"@rightkit/qa-chrome": [
|
|
204
207
|
"0.1.0",
|
|
205
|
-
"0.1.1"
|
|
208
|
+
"0.1.1",
|
|
209
|
+
"0.1.2"
|
|
206
210
|
]
|
|
207
211
|
},
|
|
208
212
|
"cargo": {
|
|
@@ -225,7 +229,7 @@
|
|
|
225
229
|
"stagedCargo": {
|
|
226
230
|
"rightkit-audio": "0.1.0",
|
|
227
231
|
"rightkit-automation": "0.1.0",
|
|
228
|
-
"rightkit-browser": "0.2.
|
|
232
|
+
"rightkit-browser": "0.2.1",
|
|
229
233
|
"rightkit-cache": "0.1.0",
|
|
230
234
|
"rightkit-control": "0.1.6",
|
|
231
235
|
"rightkit-crash": "0.1.0",
|
|
@@ -239,14 +243,14 @@
|
|
|
239
243
|
"rightkit-logs": "0.2.0",
|
|
240
244
|
"rightkit-mcp": "0.1.1",
|
|
241
245
|
"rightkit-media": "0.2.2",
|
|
242
|
-
"rightkit-models": "0.2.
|
|
246
|
+
"rightkit-models": "0.2.2",
|
|
243
247
|
"rightkit-oauth": "0.2.0",
|
|
244
248
|
"rightkit-ort": "0.1.4",
|
|
245
249
|
"rightkit-pdf": "0.1.0",
|
|
246
250
|
"rightkit-playback": "0.1.0",
|
|
247
251
|
"rightkit-process": "0.2.1",
|
|
248
252
|
"rightkit-qa": "0.2.7",
|
|
249
|
-
"rightkit-qts": "0.
|
|
253
|
+
"rightkit-qts": "0.2.0",
|
|
250
254
|
"rightkit-qts-ggml": "0.1.0",
|
|
251
255
|
"rightkit-qts-ggml-sys": "0.1.0",
|
|
252
256
|
"rightkit-sandbox": "0.1.0",
|
|
@@ -275,7 +279,7 @@
|
|
|
275
279
|
"registry": {
|
|
276
280
|
"cargo": {
|
|
277
281
|
"rightkit-audio": "0.1.0",
|
|
278
|
-
"rightkit-browser": "0.2.
|
|
282
|
+
"rightkit-browser": "0.2.1",
|
|
279
283
|
"rightkit-cache": "0.1.0",
|
|
280
284
|
"rightkit-control": "0.1.6",
|
|
281
285
|
"rightkit-crash": "0.1.0",
|
|
@@ -289,14 +293,14 @@
|
|
|
289
293
|
"rightkit-logs": "0.2.0",
|
|
290
294
|
"rightkit-mcp": "0.1.1",
|
|
291
295
|
"rightkit-media": "0.2.2",
|
|
292
|
-
"rightkit-models": "0.2.
|
|
296
|
+
"rightkit-models": "0.2.2",
|
|
293
297
|
"rightkit-oauth": "0.2.0",
|
|
294
298
|
"rightkit-ort": "0.1.4",
|
|
295
299
|
"rightkit-pdf": "0.1.0",
|
|
296
300
|
"rightkit-playback": "0.1.0",
|
|
297
301
|
"rightkit-process": "0.2.1",
|
|
298
302
|
"rightkit-qa": "0.2.7",
|
|
299
|
-
"rightkit-qts": "0.
|
|
303
|
+
"rightkit-qts": "0.2.0",
|
|
300
304
|
"rightkit-qts-ggml": "0.1.0",
|
|
301
305
|
"rightkit-qts-ggml-sys": "0.1.0",
|
|
302
306
|
"rightkit-sandbox": "0.1.0",
|
|
@@ -313,7 +317,7 @@
|
|
|
313
317
|
"@rightkit/app-shell": "0.2.1",
|
|
314
318
|
"@rightkit/ax": "0.2.4",
|
|
315
319
|
"@rightkit/doc-render": "0.1.3",
|
|
316
|
-
"@rightkit/git": "0.2.
|
|
320
|
+
"@rightkit/git": "0.2.26",
|
|
317
321
|
"@rightkit/hooks": "0.1.1",
|
|
318
322
|
"@rightkit/i18n": "0.1.0",
|
|
319
323
|
"@rightkit/legal": "0.3.1",
|
|
@@ -325,13 +329,21 @@
|
|
|
325
329
|
"@rightkit/pdf-ui": "0.1.2",
|
|
326
330
|
"@rightkit/platform-ui": "0.1.2",
|
|
327
331
|
"@rightkit/qa": "0.3.0",
|
|
328
|
-
"@rightkit/qa-chrome": "0.1.
|
|
329
|
-
"@rightkit/release": "0.2.
|
|
332
|
+
"@rightkit/qa-chrome": "0.1.3",
|
|
333
|
+
"@rightkit/release": "0.2.125",
|
|
330
334
|
"@rightkit/settings-ui": "0.2.7",
|
|
331
335
|
"@rightkit/shell": "0.1.0",
|
|
332
336
|
"@rightkit/tauri": "0.1.1",
|
|
333
337
|
"@rightkit/theme": "0.2.1",
|
|
334
338
|
"@rightkit/updates": "0.2.4"
|
|
335
339
|
}
|
|
340
|
+
},
|
|
341
|
+
"legacyCargo": {
|
|
342
|
+
"rightkit-browser": [
|
|
343
|
+
"0.2.0"
|
|
344
|
+
],
|
|
345
|
+
"rightkit-models": [
|
|
346
|
+
"0.2.1"
|
|
347
|
+
]
|
|
336
348
|
}
|
|
337
349
|
}
|