@cratis/pi 7.167.0 → 7.167.2

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.
@@ -263,7 +263,10 @@ function stem_units(t, m, start, stem) {
263
263
  delete SM
264
264
  return stem_match(t, stem, start, 1, 0, 0)
265
265
  }
266
- function stem_scan(text, mode, nonliteral, t, k, stem, pos, offset, first, found, end, p, candidate) {
266
+ function test_filter_option(w) {
267
+ return w ~ /^(-method|-class|-namespace|-trait|--filter|--filter-method|--filter-class|--filter-namespace|--treenode-filter)$/
268
+ }
269
+ function stem_scan(text, mode, nonliteral, test_filter, t, k, stem, pos, offset, first, found, end, p, candidate) {
267
270
  t = tolower(text)
268
271
  for (k = 1; k <= nstem; k++) {
269
272
  stem = STEM[k]; offset = 0
@@ -283,6 +286,8 @@ function stem_scan(text, mode, nonliteral, t, k, stem, pos, offset, first, fo
283
286
  for (k = 1; k <= nstem; k++) {
284
287
  stem = STEM[k]
285
288
  if (candidate != substr(stem, 1, 1) && candidate !~ /[*?[(@+!~^]/) continue
289
+ # Test-filter values are data; other programs can match globs across path separators.
290
+ if (stem == "run/secrets" && test_filter && nonliteral != "expanding" && !index(t, "/")) continue
286
291
  end = stem_units(t, mode, p, stem)
287
292
  if (end && stem_boundary(t, p, end, stem, nonliteral)) { first = p; found = stem; break }
288
293
  }
@@ -649,7 +654,7 @@ function nonreader(A, M, n, i, w, first, read) {
649
654
  }
650
655
  return 1
651
656
  }
652
- function end_cmd( k, m, w, j, hit, exempt, path_git, paths_only) {
657
+ function end_cmd( k, m, w, j, hit, exempt, path_git, paths_only, test_filter) {
653
658
  flush_word()
654
659
  if (nw > 0) {
655
660
  commands++
@@ -667,7 +672,8 @@ function end_cmd( k, m, w, j, hit, exempt, path_git, paths_only) {
667
672
  exempt = (k in RP) && !WU[k]
668
673
  if (exempt && RP[k] < 0) continue
669
674
  w = exempt ? substr(W[k], 1, RP[k]) : W[k]
670
- hit = stem_scan(w, "raw", expands(w, WM[k]) ? "expanding" : 0); if (TAINT == "") TAINT = hit
675
+ test_filter = test_filter_option(W[k - 1]) || (w ~ /^--[^=]+=/ && test_filter_option(substr(w, 1, index(w, "=") - 1)))
676
+ hit = stem_scan(w, "raw", expands(w, WM[k]) ? "expanding" : 0, test_filter); if (TAINT == "") TAINT = hit
671
677
  # Command output may supply any text, including several names: judge it as an unresolved wildcard.
672
678
  if (!exempt && index(WM[k], "c") + index(WM[k], "C") > 0) {
673
679
  hit = stem_scan(output_wild(W[k], WM[k]), "raw", "expanding"); if (TAINT == "") TAINT = hit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.167.0",
3
+ "version": "7.167.2",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [