@rightkit/release 0.2.125 → 0.2.127

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 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.3.0";
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 key = `${matchers.digest}:${file.cacheKey ?? inputDigest(file)}`;
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
- for (const [i, line] of text.split(/\r?\n/).entries()) if (!commentOnly(line)) for (const { c, f, re } of matchers.sources) {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightkit/release",
3
- "version": "0.2.125",
3
+ "version": "0.2.127",
4
4
  "description": "Portable release CLI/SDK with fail-closed public GitHub Releases and private R2 + RightApps distribution.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "type": "module",
@@ -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
  },
@@ -29,7 +29,7 @@
29
29
  "@rightkit/platform-ui": "0.1.2",
30
30
  "@rightkit/qa": "0.3.0",
31
31
  "@rightkit/qa-chrome": "0.1.3",
32
- "@rightkit/release": "0.2.125",
32
+ "@rightkit/release": "0.2.127",
33
33
  "@rightkit/settings-ui": "0.2.7",
34
34
  "@rightkit/shell": "0.1.0",
35
35
  "@rightkit/tauri": "0.1.1",
@@ -148,7 +148,8 @@
148
148
  "0.2.121",
149
149
  "0.2.122",
150
150
  "0.2.123",
151
- "0.2.124"
151
+ "0.2.124",
152
+ "0.2.125"
152
153
  ],
153
154
  "@rightkit/qa": [
154
155
  "0.1.0",
@@ -226,42 +227,42 @@
226
227
  "rightkit-tauri": "0.1.0"
227
228
  },
228
229
  "stagedCargo": {
229
- "rightkit-audio": "0.1.0",
230
+ "rightkit-audio": "0.1.1",
230
231
  "rightkit-automation": "0.1.0",
231
- "rightkit-browser": "0.2.1",
232
+ "rightkit-browser": "0.2.2",
232
233
  "rightkit-cache": "0.1.0",
233
234
  "rightkit-control": "0.1.6",
234
235
  "rightkit-crash": "0.1.0",
235
- "rightkit-db": "0.2.1",
236
- "rightkit-embed": "0.2.1",
236
+ "rightkit-db": "0.3.0",
237
+ "rightkit-embed": "0.2.2",
237
238
  "rightkit-framed-sidecar": "0.1.0",
238
239
  "rightkit-fs": "0.1.0",
239
240
  "rightkit-http": "0.1.0",
240
- "rightkit-jobs": "0.2.1",
241
+ "rightkit-jobs": "0.2.2",
241
242
  "rightkit-license": "0.1.3",
242
243
  "rightkit-logs": "0.2.0",
243
- "rightkit-mcp": "0.1.1",
244
- "rightkit-media": "0.2.2",
244
+ "rightkit-mcp": "0.2.0",
245
+ "rightkit-media": "0.2.3",
245
246
  "rightkit-models": "0.2.2",
246
- "rightkit-oauth": "0.2.0",
247
- "rightkit-ort": "0.1.4",
247
+ "rightkit-oauth": "0.2.1",
248
+ "rightkit-ort": "0.2.0",
248
249
  "rightkit-pdf": "0.1.0",
249
- "rightkit-playback": "0.1.0",
250
- "rightkit-process": "0.2.1",
251
- "rightkit-qa": "0.2.7",
252
- "rightkit-qts": "0.2.0",
250
+ "rightkit-playback": "0.1.1",
251
+ "rightkit-process": "0.3.0",
252
+ "rightkit-qa": "0.2.8",
253
+ "rightkit-qts": "0.2.1",
253
254
  "rightkit-qts-ggml": "0.1.0",
254
255
  "rightkit-qts-ggml-sys": "0.1.0",
255
- "rightkit-sandbox": "0.1.0",
256
+ "rightkit-sandbox": "0.2.0",
256
257
  "rightkit-search": "0.1.0",
257
258
  "rightkit-secrets": "0.1.0",
258
259
  "rightkit-service": "0.1.0",
259
260
  "rightkit-settings": "0.1.0",
260
- "rightkit-shell": "0.1.0",
261
+ "rightkit-shell": "0.1.1",
261
262
  "rightkit-speech-client": "0.3.0",
262
263
  "rightkit-sync": "0.1.0",
263
264
  "rightkit-tauri": "0.1.1",
264
- "rightkit-watch": "0.1.0"
265
+ "rightkit-watch": "0.2.0"
265
266
  },
266
267
  "swift": {
267
268
  "rightkit-swift": {
@@ -277,40 +278,40 @@
277
278
  },
278
279
  "registry": {
279
280
  "cargo": {
280
- "rightkit-audio": "0.1.0",
281
- "rightkit-browser": "0.2.1",
281
+ "rightkit-audio": "0.1.1",
282
+ "rightkit-browser": "0.2.2",
282
283
  "rightkit-cache": "0.1.0",
283
284
  "rightkit-control": "0.1.6",
284
285
  "rightkit-crash": "0.1.0",
285
- "rightkit-db": "0.2.1",
286
- "rightkit-embed": "0.2.1",
286
+ "rightkit-db": "0.3.0",
287
+ "rightkit-embed": "0.2.2",
287
288
  "rightkit-framed-sidecar": "0.1.0",
288
289
  "rightkit-fs": "0.1.0",
289
290
  "rightkit-http": "0.1.0",
290
- "rightkit-jobs": "0.2.1",
291
+ "rightkit-jobs": "0.2.2",
291
292
  "rightkit-license": "0.1.3",
292
293
  "rightkit-logs": "0.2.0",
293
- "rightkit-mcp": "0.1.1",
294
- "rightkit-media": "0.2.2",
294
+ "rightkit-mcp": "0.2.0",
295
+ "rightkit-media": "0.2.3",
295
296
  "rightkit-models": "0.2.2",
296
- "rightkit-oauth": "0.2.0",
297
- "rightkit-ort": "0.1.4",
297
+ "rightkit-oauth": "0.2.1",
298
+ "rightkit-ort": "0.2.0",
298
299
  "rightkit-pdf": "0.1.0",
299
- "rightkit-playback": "0.1.0",
300
- "rightkit-process": "0.2.1",
301
- "rightkit-qa": "0.2.7",
302
- "rightkit-qts": "0.2.0",
300
+ "rightkit-playback": "0.1.1",
301
+ "rightkit-process": "0.3.0",
302
+ "rightkit-qa": "0.2.8",
303
+ "rightkit-qts": "0.2.1",
303
304
  "rightkit-qts-ggml": "0.1.0",
304
305
  "rightkit-qts-ggml-sys": "0.1.0",
305
- "rightkit-sandbox": "0.1.0",
306
+ "rightkit-sandbox": "0.2.0",
306
307
  "rightkit-search": "0.1.0",
307
308
  "rightkit-secrets": "0.1.0",
308
309
  "rightkit-service": "0.1.0",
309
310
  "rightkit-settings": "0.1.0",
310
- "rightkit-shell": "0.1.0",
311
+ "rightkit-shell": "0.1.1",
311
312
  "rightkit-speech-client": "0.3.0",
312
313
  "rightkit-tauri": "0.1.1",
313
- "rightkit-watch": "0.1.0"
314
+ "rightkit-watch": "0.2.0"
314
315
  },
315
316
  "npm": {
316
317
  "@rightkit/app-shell": "0.2.1",
@@ -329,7 +330,7 @@
329
330
  "@rightkit/platform-ui": "0.1.2",
330
331
  "@rightkit/qa": "0.3.0",
331
332
  "@rightkit/qa-chrome": "0.1.3",
332
- "@rightkit/release": "0.2.124",
333
+ "@rightkit/release": "0.2.126",
333
334
  "@rightkit/settings-ui": "0.2.7",
334
335
  "@rightkit/shell": "0.1.0",
335
336
  "@rightkit/tauri": "0.1.1",
@@ -339,10 +340,56 @@
339
340
  },
340
341
  "legacyCargo": {
341
342
  "rightkit-browser": [
342
- "0.2.0"
343
+ "0.2.0",
344
+ "0.2.1"
343
345
  ],
344
346
  "rightkit-models": [
345
347
  "0.2.1"
348
+ ],
349
+ "rightkit-audio": [
350
+ "0.1.0"
351
+ ],
352
+ "rightkit-db": [
353
+ "0.2.1"
354
+ ],
355
+ "rightkit-embed": [
356
+ "0.2.1"
357
+ ],
358
+ "rightkit-jobs": [
359
+ "0.2.1"
360
+ ],
361
+ "rightkit-mcp": [
362
+ "0.1.1"
363
+ ],
364
+ "rightkit-media": [
365
+ "0.2.2"
366
+ ],
367
+ "rightkit-oauth": [
368
+ "0.2.0"
369
+ ],
370
+ "rightkit-ort": [
371
+ "0.1.4"
372
+ ],
373
+ "rightkit-playback": [
374
+ "0.1.0"
375
+ ],
376
+ "rightkit-process": [
377
+ "0.2.1"
378
+ ],
379
+ "rightkit-qa": [
380
+ "0.2.7"
381
+ ],
382
+ "rightkit-sandbox": [
383
+ "0.1.0"
384
+ ],
385
+ "rightkit-shell": [
386
+ "0.1.0"
387
+ ],
388
+ "rightkit-watch": [
389
+ "0.1.0"
390
+ ],
391
+ "rightkit-qts": [
392
+ "0.2.0"
346
393
  ]
347
394
  }
348
395
  }