@socketsecurity/lib 5.11.2 → 5.11.3

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.
@@ -0,0 +1,240 @@
1
+ "use strict";
2
+ /**
3
+ * Bundled from p-map
4
+ * This is a zero-dependency bundle created by esbuild.
5
+ */
6
+ "use strict";
7
+ var __defProp = Object.defineProperty;
8
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
+ var __getOwnPropNames = Object.getOwnPropertyNames;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
12
+ var __esm = (fn, res) => function __init() {
13
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
14
+ };
15
+ var __export = (target, all) => {
16
+ for (var name in all)
17
+ __defProp(target, name, { get: all[name], enumerable: true });
18
+ };
19
+ var __copyProps = (to, from, except, desc) => {
20
+ if (from && typeof from === "object" || typeof from === "function") {
21
+ for (let key of __getOwnPropNames(from))
22
+ if (!__hasOwnProp.call(to, key) && key !== except)
23
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
24
+ }
25
+ return to;
26
+ };
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // node_modules/.pnpm/p-map@7.0.4/node_modules/p-map/index.js
30
+ var p_map_exports = {};
31
+ __export(p_map_exports, {
32
+ default: () => pMap,
33
+ pMapIterable: () => pMapIterable,
34
+ pMapSkip: () => pMapSkip
35
+ });
36
+ async function pMap(iterable, mapper, {
37
+ concurrency = Number.POSITIVE_INFINITY,
38
+ stopOnError = true,
39
+ signal
40
+ } = {}) {
41
+ return new Promise((resolve_, reject_) => {
42
+ if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) {
43
+ throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
44
+ }
45
+ if (typeof mapper !== "function") {
46
+ throw new TypeError("Mapper function is required");
47
+ }
48
+ if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) {
49
+ throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
50
+ }
51
+ const result = [];
52
+ const errors = [];
53
+ const skippedIndexesMap = /* @__PURE__ */ new Map();
54
+ let isRejected = false;
55
+ let isResolved = false;
56
+ let isIterableDone = false;
57
+ let resolvingCount = 0;
58
+ let currentIndex = 0;
59
+ const iterator = iterable[Symbol.iterator] === void 0 ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
60
+ const signalListener = /* @__PURE__ */ __name(() => {
61
+ reject(signal.reason);
62
+ }, "signalListener");
63
+ const cleanup = /* @__PURE__ */ __name(() => {
64
+ signal?.removeEventListener("abort", signalListener);
65
+ }, "cleanup");
66
+ const resolve = /* @__PURE__ */ __name((value) => {
67
+ resolve_(value);
68
+ cleanup();
69
+ }, "resolve");
70
+ const reject = /* @__PURE__ */ __name((reason) => {
71
+ isRejected = true;
72
+ isResolved = true;
73
+ reject_(reason);
74
+ cleanup();
75
+ }, "reject");
76
+ if (signal) {
77
+ if (signal.aborted) {
78
+ reject(signal.reason);
79
+ }
80
+ signal.addEventListener("abort", signalListener, { once: true });
81
+ }
82
+ const next = /* @__PURE__ */ __name(async () => {
83
+ if (isResolved) {
84
+ return;
85
+ }
86
+ const nextItem = await iterator.next();
87
+ const index = currentIndex;
88
+ currentIndex++;
89
+ if (nextItem.done) {
90
+ isIterableDone = true;
91
+ if (resolvingCount === 0 && !isResolved) {
92
+ if (!stopOnError && errors.length > 0) {
93
+ reject(new AggregateError(errors));
94
+ return;
95
+ }
96
+ isResolved = true;
97
+ if (skippedIndexesMap.size === 0) {
98
+ resolve(result);
99
+ return;
100
+ }
101
+ const pureResult = [];
102
+ for (const [index2, value] of result.entries()) {
103
+ if (skippedIndexesMap.get(index2) === pMapSkip) {
104
+ continue;
105
+ }
106
+ pureResult.push(value);
107
+ }
108
+ resolve(pureResult);
109
+ }
110
+ return;
111
+ }
112
+ resolvingCount++;
113
+ (async () => {
114
+ try {
115
+ const element = await nextItem.value;
116
+ if (isResolved) {
117
+ return;
118
+ }
119
+ const value = await mapper(element, index);
120
+ if (value === pMapSkip) {
121
+ skippedIndexesMap.set(index, value);
122
+ }
123
+ result[index] = value;
124
+ resolvingCount--;
125
+ await next();
126
+ } catch (error) {
127
+ if (stopOnError) {
128
+ reject(error);
129
+ } else {
130
+ errors.push(error);
131
+ resolvingCount--;
132
+ try {
133
+ await next();
134
+ } catch (error2) {
135
+ reject(error2);
136
+ }
137
+ }
138
+ }
139
+ })();
140
+ }, "next");
141
+ (async () => {
142
+ for (let index = 0; index < concurrency; index++) {
143
+ try {
144
+ await next();
145
+ } catch (error) {
146
+ reject(error);
147
+ break;
148
+ }
149
+ if (isIterableDone || isRejected) {
150
+ break;
151
+ }
152
+ }
153
+ })();
154
+ });
155
+ }
156
+ function pMapIterable(iterable, mapper, {
157
+ concurrency = Number.POSITIVE_INFINITY,
158
+ backpressure = concurrency
159
+ } = {}) {
160
+ if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) {
161
+ throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
162
+ }
163
+ if (typeof mapper !== "function") {
164
+ throw new TypeError("Mapper function is required");
165
+ }
166
+ if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) {
167
+ throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
168
+ }
169
+ if (!(Number.isSafeInteger(backpressure) && backpressure >= concurrency || backpressure === Number.POSITIVE_INFINITY)) {
170
+ throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${concurrency}) and up or \`Infinity\`, got \`${backpressure}\` (${typeof backpressure})`);
171
+ }
172
+ return {
173
+ async *[Symbol.asyncIterator]() {
174
+ const iterator = iterable[Symbol.asyncIterator] === void 0 ? iterable[Symbol.iterator]() : iterable[Symbol.asyncIterator]();
175
+ const promises = [];
176
+ let pendingPromisesCount = 0;
177
+ let isDone = false;
178
+ let index = 0;
179
+ function trySpawn() {
180
+ if (isDone || !(pendingPromisesCount < concurrency && promises.length < backpressure)) {
181
+ return;
182
+ }
183
+ pendingPromisesCount++;
184
+ const promise = (async () => {
185
+ const { done, value } = await iterator.next();
186
+ if (done) {
187
+ pendingPromisesCount--;
188
+ return { done: true };
189
+ }
190
+ trySpawn();
191
+ try {
192
+ const returnValue = await mapper(await value, index++);
193
+ pendingPromisesCount--;
194
+ if (returnValue === pMapSkip) {
195
+ const index2 = promises.indexOf(promise);
196
+ if (index2 > 0) {
197
+ promises.splice(index2, 1);
198
+ }
199
+ }
200
+ trySpawn();
201
+ return { done: false, value: returnValue };
202
+ } catch (error) {
203
+ pendingPromisesCount--;
204
+ isDone = true;
205
+ return { error };
206
+ }
207
+ })();
208
+ promises.push(promise);
209
+ }
210
+ __name(trySpawn, "trySpawn");
211
+ trySpawn();
212
+ while (promises.length > 0) {
213
+ const { error, done, value } = await promises[0];
214
+ promises.shift();
215
+ if (error) {
216
+ throw error;
217
+ }
218
+ if (done) {
219
+ return;
220
+ }
221
+ trySpawn();
222
+ if (value === pMapSkip) {
223
+ continue;
224
+ }
225
+ yield value;
226
+ }
227
+ }
228
+ };
229
+ }
230
+ var pMapSkip;
231
+ var init_p_map = __esm({
232
+ "node_modules/.pnpm/p-map@7.0.4/node_modules/p-map/index.js"() {
233
+ __name(pMap, "pMap");
234
+ __name(pMapIterable, "pMapIterable");
235
+ pMapSkip = Symbol("skip");
236
+ }
237
+ });
238
+
239
+ // src/external/p-map.js
240
+ module.exports = (init_p_map(), __toCommonJS(p_map_exports));
@@ -39,12 +39,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  ));
40
40
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
41
41
 
42
- // node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js
42
+ // node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js
43
43
  var require_constants = __commonJS({
44
- "node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js"(exports2, module2) {
44
+ "node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js"(exports2, module2) {
45
45
  "use strict";
46
46
  var WIN_SLASH = "\\\\/";
47
47
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
48
+ var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
48
49
  var DOT_LITERAL = "\\.";
49
50
  var PLUS_LITERAL = "\\+";
50
51
  var QMARK_LITERAL = "\\?";
@@ -95,6 +96,7 @@ var require_constants = __commonJS({
95
96
  SEP: "\\"
96
97
  };
97
98
  var POSIX_REGEX_SOURCE = {
99
+ __proto__: null,
98
100
  alnum: "a-zA-Z0-9",
99
101
  alpha: "a-zA-Z",
100
102
  ascii: "\\x00-\\x7F",
@@ -111,6 +113,7 @@ var require_constants = __commonJS({
111
113
  xdigit: "A-Fa-f0-9"
112
114
  };
113
115
  module2.exports = {
116
+ DEFAULT_MAX_EXTGLOB_RECURSION,
114
117
  MAX_LENGTH: 1024 * 64,
115
118
  POSIX_REGEX_SOURCE,
116
119
  // regular expressions
@@ -238,9 +241,9 @@ var require_constants = __commonJS({
238
241
  }
239
242
  });
240
243
 
241
- // node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js
244
+ // node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/utils.js
242
245
  var require_utils = __commonJS({
243
- "node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js"(exports2) {
246
+ "node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/utils.js"(exports2) {
244
247
  "use strict";
245
248
  var {
246
249
  REGEX_BACKSLASH,
@@ -302,9 +305,9 @@ var require_utils = __commonJS({
302
305
  }
303
306
  });
304
307
 
305
- // node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js
308
+ // node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/scan.js
306
309
  var require_scan = __commonJS({
307
- "node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js"(exports2, module2) {
310
+ "node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/scan.js"(exports2, module2) {
308
311
  "use strict";
309
312
  var utils = require_utils();
310
313
  var {
@@ -632,9 +635,9 @@ var require_scan = __commonJS({
632
635
  }
633
636
  });
634
637
 
635
- // node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js
638
+ // node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/parse.js
636
639
  var require_parse = __commonJS({
637
- "node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js"(exports2, module2) {
640
+ "node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/parse.js"(exports2, module2) {
638
641
  "use strict";
639
642
  var constants = require_constants();
640
643
  var utils = require_utils();
@@ -661,6 +664,213 @@ var require_parse = __commonJS({
661
664
  var syntaxError = /* @__PURE__ */ __name((type, char) => {
662
665
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
663
666
  }, "syntaxError");
667
+ var splitTopLevel = /* @__PURE__ */ __name((input) => {
668
+ const parts = [];
669
+ let bracket = 0;
670
+ let paren = 0;
671
+ let quote = 0;
672
+ let value = "";
673
+ let escaped = false;
674
+ for (const ch of input) {
675
+ if (escaped === true) {
676
+ value += ch;
677
+ escaped = false;
678
+ continue;
679
+ }
680
+ if (ch === "\\") {
681
+ value += ch;
682
+ escaped = true;
683
+ continue;
684
+ }
685
+ if (ch === '"') {
686
+ quote = quote === 1 ? 0 : 1;
687
+ value += ch;
688
+ continue;
689
+ }
690
+ if (quote === 0) {
691
+ if (ch === "[") {
692
+ bracket++;
693
+ } else if (ch === "]" && bracket > 0) {
694
+ bracket--;
695
+ } else if (bracket === 0) {
696
+ if (ch === "(") {
697
+ paren++;
698
+ } else if (ch === ")" && paren > 0) {
699
+ paren--;
700
+ } else if (ch === "|" && paren === 0) {
701
+ parts.push(value);
702
+ value = "";
703
+ continue;
704
+ }
705
+ }
706
+ }
707
+ value += ch;
708
+ }
709
+ parts.push(value);
710
+ return parts;
711
+ }, "splitTopLevel");
712
+ var isPlainBranch = /* @__PURE__ */ __name((branch) => {
713
+ let escaped = false;
714
+ for (const ch of branch) {
715
+ if (escaped === true) {
716
+ escaped = false;
717
+ continue;
718
+ }
719
+ if (ch === "\\") {
720
+ escaped = true;
721
+ continue;
722
+ }
723
+ if (/[?*+@!()[\]{}]/.test(ch)) {
724
+ return false;
725
+ }
726
+ }
727
+ return true;
728
+ }, "isPlainBranch");
729
+ var normalizeSimpleBranch = /* @__PURE__ */ __name((branch) => {
730
+ let value = branch.trim();
731
+ let changed = true;
732
+ while (changed === true) {
733
+ changed = false;
734
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
735
+ value = value.slice(2, -1);
736
+ changed = true;
737
+ }
738
+ }
739
+ if (!isPlainBranch(value)) {
740
+ return;
741
+ }
742
+ return value.replace(/\\(.)/g, "$1");
743
+ }, "normalizeSimpleBranch");
744
+ var hasRepeatedCharPrefixOverlap = /* @__PURE__ */ __name((branches) => {
745
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
746
+ for (let i = 0; i < values.length; i++) {
747
+ for (let j = i + 1; j < values.length; j++) {
748
+ const a = values[i];
749
+ const b = values[j];
750
+ const char = a[0];
751
+ if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
752
+ continue;
753
+ }
754
+ if (a === b || a.startsWith(b) || b.startsWith(a)) {
755
+ return true;
756
+ }
757
+ }
758
+ }
759
+ return false;
760
+ }, "hasRepeatedCharPrefixOverlap");
761
+ var parseRepeatedExtglob = /* @__PURE__ */ __name((pattern, requireEnd = true) => {
762
+ if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
763
+ return;
764
+ }
765
+ let bracket = 0;
766
+ let paren = 0;
767
+ let quote = 0;
768
+ let escaped = false;
769
+ for (let i = 1; i < pattern.length; i++) {
770
+ const ch = pattern[i];
771
+ if (escaped === true) {
772
+ escaped = false;
773
+ continue;
774
+ }
775
+ if (ch === "\\") {
776
+ escaped = true;
777
+ continue;
778
+ }
779
+ if (ch === '"') {
780
+ quote = quote === 1 ? 0 : 1;
781
+ continue;
782
+ }
783
+ if (quote === 1) {
784
+ continue;
785
+ }
786
+ if (ch === "[") {
787
+ bracket++;
788
+ continue;
789
+ }
790
+ if (ch === "]" && bracket > 0) {
791
+ bracket--;
792
+ continue;
793
+ }
794
+ if (bracket > 0) {
795
+ continue;
796
+ }
797
+ if (ch === "(") {
798
+ paren++;
799
+ continue;
800
+ }
801
+ if (ch === ")") {
802
+ paren--;
803
+ if (paren === 0) {
804
+ if (requireEnd === true && i !== pattern.length - 1) {
805
+ return;
806
+ }
807
+ return {
808
+ type: pattern[0],
809
+ body: pattern.slice(2, i),
810
+ end: i
811
+ };
812
+ }
813
+ }
814
+ }
815
+ }, "parseRepeatedExtglob");
816
+ var getStarExtglobSequenceOutput = /* @__PURE__ */ __name((pattern) => {
817
+ let index = 0;
818
+ const chars = [];
819
+ while (index < pattern.length) {
820
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
821
+ if (!match || match.type !== "*") {
822
+ return;
823
+ }
824
+ const branches = splitTopLevel(match.body).map((branch2) => branch2.trim());
825
+ if (branches.length !== 1) {
826
+ return;
827
+ }
828
+ const branch = normalizeSimpleBranch(branches[0]);
829
+ if (!branch || branch.length !== 1) {
830
+ return;
831
+ }
832
+ chars.push(branch);
833
+ index += match.end + 1;
834
+ }
835
+ if (chars.length < 1) {
836
+ return;
837
+ }
838
+ const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
839
+ return `${source}*`;
840
+ }, "getStarExtglobSequenceOutput");
841
+ var repeatedExtglobRecursion = /* @__PURE__ */ __name((pattern) => {
842
+ let depth = 0;
843
+ let value = pattern.trim();
844
+ let match = parseRepeatedExtglob(value);
845
+ while (match) {
846
+ depth++;
847
+ value = match.body.trim();
848
+ match = parseRepeatedExtglob(value);
849
+ }
850
+ return depth;
851
+ }, "repeatedExtglobRecursion");
852
+ var analyzeRepeatedExtglob = /* @__PURE__ */ __name((body, options) => {
853
+ if (options.maxExtglobRecursion === false) {
854
+ return { risky: false };
855
+ }
856
+ const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
857
+ const branches = splitTopLevel(body).map((branch) => branch.trim());
858
+ if (branches.length > 1) {
859
+ if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
860
+ return { risky: true };
861
+ }
862
+ }
863
+ for (const branch of branches) {
864
+ const safeOutput = getStarExtglobSequenceOutput(branch);
865
+ if (safeOutput) {
866
+ return { risky: true, safeOutput };
867
+ }
868
+ if (repeatedExtglobRecursion(branch) > max) {
869
+ return { risky: true };
870
+ }
871
+ }
872
+ return { risky: false };
873
+ }, "analyzeRepeatedExtglob");
664
874
  var parse = /* @__PURE__ */ __name((input, options) => {
665
875
  if (typeof input !== "string") {
666
876
  throw new TypeError("Expected a string");
@@ -791,6 +1001,8 @@ var require_parse = __commonJS({
791
1001
  token.prev = prev;
792
1002
  token.parens = state.parens;
793
1003
  token.output = state.output;
1004
+ token.startIndex = state.index;
1005
+ token.tokensIndex = tokens.length;
794
1006
  const output = (opts.capture ? "(" : "") + token.open;
795
1007
  increment("parens");
796
1008
  push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
@@ -798,6 +1010,26 @@ var require_parse = __commonJS({
798
1010
  extglobs.push(token);
799
1011
  }, "extglobOpen");
800
1012
  const extglobClose = /* @__PURE__ */ __name((token) => {
1013
+ const literal = input.slice(token.startIndex, state.index + 1);
1014
+ const body = input.slice(token.startIndex + 2, state.index);
1015
+ const analysis = analyzeRepeatedExtglob(body, opts);
1016
+ if ((token.type === "plus" || token.type === "star") && analysis.risky) {
1017
+ const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
1018
+ const open = tokens[token.tokensIndex];
1019
+ open.type = "text";
1020
+ open.value = literal;
1021
+ open.output = safeOutput || utils.escapeRegex(literal);
1022
+ for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
1023
+ tokens[i].value = "";
1024
+ tokens[i].output = "";
1025
+ delete tokens[i].suffix;
1026
+ }
1027
+ state.output = token.output + open.output;
1028
+ state.backtrack = true;
1029
+ push({ type: "paren", extglob: true, value, output: "" });
1030
+ decrement("parens");
1031
+ return;
1032
+ }
801
1033
  let output = token.close + (opts.capture ? ")" : "");
802
1034
  let rest;
803
1035
  if (token.type === "negate") {
@@ -1400,9 +1632,9 @@ var require_parse = __commonJS({
1400
1632
  }
1401
1633
  });
1402
1634
 
1403
- // node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js
1635
+ // node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/picomatch.js
1404
1636
  var require_picomatch = __commonJS({
1405
- "node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
1637
+ "node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
1406
1638
  "use strict";
1407
1639
  var scan = require_scan();
1408
1640
  var parse = require_parse();
@@ -1540,9 +1772,9 @@ var require_picomatch = __commonJS({
1540
1772
  }
1541
1773
  });
1542
1774
 
1543
- // node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js
1775
+ // node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/index.js
1544
1776
  var require_picomatch2 = __commonJS({
1545
- "node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js"(exports2, module2) {
1777
+ "node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/index.js"(exports2, module2) {
1546
1778
  "use strict";
1547
1779
  var pico = require_picomatch();
1548
1780
  var utils = require_utils();
@@ -2618,6 +2850,7 @@ var require_compile = __commonJS({
2618
2850
  return prefix + node.value;
2619
2851
  }
2620
2852
  if (node.isClose === true) {
2853
+ /* @__PURE__ */ console.log("node.isClose", prefix, node.value);
2621
2854
  return prefix + node.value;
2622
2855
  }
2623
2856
  if (node.type === "open") {
@@ -13207,6 +13207,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13207
13207
  result.$schema = "http://json-schema.org/draft-04/schema#";
13208
13208
  } else if (this.target === "openapi-3.0") {
13209
13209
  } else {
13210
+ /* @__PURE__ */ console.warn(`Invalid target: ${this.target}`);
13210
13211
  }
13211
13212
  if (params.external?.uri) {
13212
13213
  const id = params.external.registry.get(schema)?.id;
package/dist/github.js CHANGED
@@ -203,11 +203,9 @@ async function cacheFetchGhsa(ghsaId, options) {
203
203
  if (import_node_process.default.env["DISABLE_GITHUB_CACHE"]) {
204
204
  return await fetchGhsaDetails(ghsaId, options);
205
205
  }
206
- const cached = await cache.getOrFetch(key, async () => {
207
- const data = await fetchGhsaDetails(ghsaId, options);
208
- return JSON.stringify(data);
206
+ return await cache.getOrFetch(key, async () => {
207
+ return await fetchGhsaDetails(ghsaId, options);
209
208
  });
210
- return JSON.parse(cached);
211
209
  }
212
210
  // Annotate the CommonJS export names for ESM import in node:
213
211
  0 && (module.exports = {
@@ -311,6 +311,9 @@ async function httpRequestAttempt(url, options) {
311
311
  };
312
312
  resolve(response);
313
313
  });
314
+ res.on("error", (error) => {
315
+ reject(error);
316
+ });
314
317
  }
315
318
  );
316
319
  request.on("error", (error) => {
package/dist/ipc.js CHANGED
@@ -239,6 +239,7 @@ function waitForIpc(messageType, options = {}) {
239
239
  cleanup = onIpc(handleMessage);
240
240
  if (timeout > 0) {
241
241
  timeoutId = setTimeout(handleTimeout, timeout);
242
+ timeoutId.unref();
242
243
  }
243
244
  });
244
245
  }