@socketsecurity/lib 5.26.1 → 5.28.0

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.
Files changed (59) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +1 -1
  3. package/dist/bin/check-primordials.d.ts +18 -0
  4. package/dist/bin/check-primordials.js +229 -0
  5. package/dist/bin/check.d.ts +15 -0
  6. package/dist/bin/check.js +73 -0
  7. package/dist/bin/socket-lib.d.ts +17 -0
  8. package/dist/bin/socket-lib.js +64 -0
  9. package/dist/checks/primordials.d.ts +110 -0
  10. package/dist/checks/primordials.js +244 -0
  11. package/dist/compression.d.ts +218 -0
  12. package/dist/compression.js +275 -0
  13. package/dist/constants/socket.js +1 -1
  14. package/dist/crypto.js +3 -10
  15. package/dist/dlx/package.d.ts +30 -0
  16. package/dist/dlx/package.js +5 -3
  17. package/dist/external/adm-zip.js +2 -2
  18. package/dist/external/tar-fs.js +2 -2
  19. package/dist/fs.js +31 -45
  20. package/dist/node/async-hooks.d.ts +6 -0
  21. package/dist/node/async-hooks.js +34 -0
  22. package/dist/node/child-process.d.ts +11 -0
  23. package/dist/node/child-process.js +34 -0
  24. package/dist/node/crypto.d.ts +6 -0
  25. package/dist/node/crypto.js +34 -0
  26. package/dist/node/events.d.ts +6 -0
  27. package/dist/node/events.js +34 -0
  28. package/dist/node/fs-promises.d.ts +6 -0
  29. package/dist/node/fs-promises.js +34 -0
  30. package/dist/node/fs.d.ts +14 -0
  31. package/dist/node/fs.js +34 -0
  32. package/dist/node/http.d.ts +6 -0
  33. package/dist/node/http.js +34 -0
  34. package/dist/node/https.d.ts +6 -0
  35. package/dist/node/https.js +34 -0
  36. package/dist/node/os.d.ts +6 -0
  37. package/dist/node/os.js +34 -0
  38. package/dist/node/path.d.ts +6 -0
  39. package/dist/node/path.js +34 -0
  40. package/dist/node/timers-promises.d.ts +6 -0
  41. package/dist/node/timers-promises.js +34 -0
  42. package/dist/node/url.d.ts +6 -0
  43. package/dist/node/url.js +34 -0
  44. package/dist/node/util.d.ts +6 -0
  45. package/dist/node/util.js +34 -0
  46. package/dist/primordials.d.ts +76 -2
  47. package/dist/primordials.js +294 -23
  48. package/dist/sea/util.d.ts +43 -0
  49. package/dist/{sea.js → sea/util.js} +7 -7
  50. package/dist/smol/primordial.d.ts +80 -0
  51. package/dist/smol/primordial.js +46 -0
  52. package/dist/smol/util.d.ts +87 -0
  53. package/dist/smol/util.js +59 -0
  54. package/dist/smol/versions.d.ts +46 -0
  55. package/dist/smol/versions.js +46 -0
  56. package/dist/spawn.js +13 -28
  57. package/dist/versions.js +27 -22
  58. package/package.json +102 -9
  59. package/dist/sea.d.ts +0 -30
@@ -60,9 +60,12 @@ __export(primordials_exports, {
60
60
  ArrayPrototypeSplice: () => ArrayPrototypeSplice,
61
61
  ArrayPrototypeToReversed: () => ArrayPrototypeToReversed,
62
62
  ArrayPrototypeToSorted: () => ArrayPrototypeToSorted,
63
+ ArrayPrototypeToSpliced: () => ArrayPrototypeToSpliced,
63
64
  ArrayPrototypeUnshift: () => ArrayPrototypeUnshift,
64
65
  ArrayPrototypeValues: () => ArrayPrototypeValues,
66
+ ArrayPrototypeWith: () => ArrayPrototypeWith,
65
67
  AtomicsWait: () => AtomicsWait,
68
+ BigIntCtor: () => BigIntCtor,
66
69
  BooleanCtor: () => BooleanCtor,
67
70
  BufferAlloc: () => BufferAlloc,
68
71
  BufferAllocUnsafe: () => BufferAllocUnsafe,
@@ -84,14 +87,19 @@ __export(primordials_exports, {
84
87
  DatePrototypeToLocaleString: () => DatePrototypeToLocaleString,
85
88
  DatePrototypeValueOf: () => DatePrototypeValueOf,
86
89
  DateUTC: () => DateUTC,
90
+ ErrorCaptureStackTrace: () => ErrorCaptureStackTrace,
87
91
  ErrorCtor: () => ErrorCtor,
88
92
  ErrorIsError: () => ErrorIsError,
93
+ ErrorPrepareStackTrace: () => ErrorPrepareStackTrace,
94
+ ErrorStackTraceLimit: () => ErrorStackTraceLimit,
89
95
  EvalErrorCtor: () => EvalErrorCtor,
90
96
  Float32ArrayCtor: () => Float32ArrayCtor,
91
97
  Float64ArrayCtor: () => Float64ArrayCtor,
92
98
  FunctionPrototypeApply: () => FunctionPrototypeApply,
93
99
  FunctionPrototypeBind: () => FunctionPrototypeBind,
94
100
  FunctionPrototypeCall: () => FunctionPrototypeCall,
101
+ FunctionPrototypeToString: () => FunctionPrototypeToString,
102
+ InfinityValue: () => InfinityValue,
95
103
  Int16ArrayCtor: () => Int16ArrayCtor,
96
104
  Int32ArrayCtor: () => Int32ArrayCtor,
97
105
  Int8ArrayCtor: () => Int8ArrayCtor,
@@ -110,21 +118,62 @@ __export(primordials_exports, {
110
118
  MapPrototypeSet: () => MapPrototypeSet,
111
119
  MapPrototypeValues: () => MapPrototypeValues,
112
120
  MathAbs: () => MathAbs,
121
+ MathAcos: () => MathAcos,
122
+ MathAcosh: () => MathAcosh,
123
+ MathAsin: () => MathAsin,
124
+ MathAsinh: () => MathAsinh,
125
+ MathAtan: () => MathAtan,
126
+ MathAtan2: () => MathAtan2,
127
+ MathAtanh: () => MathAtanh,
128
+ MathCbrt: () => MathCbrt,
113
129
  MathCeil: () => MathCeil,
130
+ MathClz32: () => MathClz32,
131
+ MathCos: () => MathCos,
132
+ MathCosh: () => MathCosh,
133
+ MathE: () => MathE,
134
+ MathExp: () => MathExp,
135
+ MathExpm1: () => MathExpm1,
136
+ MathF16round: () => MathF16round,
114
137
  MathFloor: () => MathFloor,
138
+ MathFround: () => MathFround,
139
+ MathHypot: () => MathHypot,
140
+ MathImul: () => MathImul,
141
+ MathLN10: () => MathLN10,
142
+ MathLN2: () => MathLN2,
143
+ MathLOG10E: () => MathLOG10E,
144
+ MathLOG2E: () => MathLOG2E,
145
+ MathLog: () => MathLog,
146
+ MathLog10: () => MathLog10,
147
+ MathLog1p: () => MathLog1p,
148
+ MathLog2: () => MathLog2,
115
149
  MathMax: () => MathMax,
116
150
  MathMin: () => MathMin,
151
+ MathPI: () => MathPI,
117
152
  MathPow: () => MathPow,
118
153
  MathRandom: () => MathRandom,
119
154
  MathRound: () => MathRound,
155
+ MathSQRT1_2: () => MathSQRT1_2,
156
+ MathSQRT2: () => MathSQRT2,
120
157
  MathSign: () => MathSign,
158
+ MathSin: () => MathSin,
159
+ MathSinh: () => MathSinh,
121
160
  MathSqrt: () => MathSqrt,
161
+ MathTan: () => MathTan,
162
+ MathTanh: () => MathTanh,
122
163
  MathTrunc: () => MathTrunc,
164
+ NaNValue: () => NaNValue,
123
165
  NumberCtor: () => NumberCtor,
166
+ NumberEPSILON: () => NumberEPSILON,
124
167
  NumberIsFinite: () => NumberIsFinite,
125
168
  NumberIsInteger: () => NumberIsInteger,
126
169
  NumberIsNaN: () => NumberIsNaN,
127
170
  NumberIsSafeInteger: () => NumberIsSafeInteger,
171
+ NumberMAX_SAFE_INTEGER: () => NumberMAX_SAFE_INTEGER,
172
+ NumberMAX_VALUE: () => NumberMAX_VALUE,
173
+ NumberMIN_SAFE_INTEGER: () => NumberMIN_SAFE_INTEGER,
174
+ NumberMIN_VALUE: () => NumberMIN_VALUE,
175
+ NumberNEGATIVE_INFINITY: () => NumberNEGATIVE_INFINITY,
176
+ NumberPOSITIVE_INFINITY: () => NumberPOSITIVE_INFINITY,
128
177
  NumberParseFloat: () => NumberParseFloat,
129
178
  NumberParseInt: () => NumberParseInt,
130
179
  NumberPrototypeToFixed: () => NumberPrototypeToFixed,
@@ -150,8 +199,12 @@ __export(primordials_exports, {
150
199
  ObjectKeys: () => ObjectKeys,
151
200
  ObjectPreventExtensions: () => ObjectPreventExtensions,
152
201
  ObjectPrototype: () => ObjectPrototype,
202
+ ObjectPrototypeDefineGetter: () => ObjectPrototypeDefineGetter,
203
+ ObjectPrototypeDefineSetter: () => ObjectPrototypeDefineSetter,
153
204
  ObjectPrototypeHasOwnProperty: () => ObjectPrototypeHasOwnProperty,
154
205
  ObjectPrototypeIsPrototypeOf: () => ObjectPrototypeIsPrototypeOf,
206
+ ObjectPrototypeLookupGetter: () => ObjectPrototypeLookupGetter,
207
+ ObjectPrototypeLookupSetter: () => ObjectPrototypeLookupSetter,
155
208
  ObjectPrototypePropertyIsEnumerable: () => ObjectPrototypePropertyIsEnumerable,
156
209
  ObjectPrototypeToString: () => ObjectPrototypeToString,
157
210
  ObjectPrototypeValueOf: () => ObjectPrototypeValueOf,
@@ -235,12 +288,27 @@ __export(primordials_exports, {
235
288
  StringPrototypeTrimEnd: () => StringPrototypeTrimEnd,
236
289
  StringPrototypeTrimStart: () => StringPrototypeTrimStart,
237
290
  StringRaw: () => StringRaw,
291
+ SymbolAsyncDispose: () => SymbolAsyncDispose,
238
292
  SymbolAsyncIterator: () => SymbolAsyncIterator,
239
293
  SymbolCtor: () => SymbolCtor,
294
+ SymbolDispose: () => SymbolDispose,
240
295
  SymbolFor: () => SymbolFor,
296
+ SymbolHasInstance: () => SymbolHasInstance,
297
+ SymbolIsConcatSpreadable: () => SymbolIsConcatSpreadable,
241
298
  SymbolIterator: () => SymbolIterator,
299
+ SymbolKeyFor: () => SymbolKeyFor,
300
+ SymbolMatch: () => SymbolMatch,
301
+ SymbolMatchAll: () => SymbolMatchAll,
302
+ SymbolPrototypeDescription: () => SymbolPrototypeDescription,
303
+ SymbolPrototypeToString: () => SymbolPrototypeToString,
304
+ SymbolPrototypeValueOf: () => SymbolPrototypeValueOf,
305
+ SymbolReplace: () => SymbolReplace,
306
+ SymbolSearch: () => SymbolSearch,
307
+ SymbolSpecies: () => SymbolSpecies,
308
+ SymbolSplit: () => SymbolSplit,
242
309
  SymbolToPrimitive: () => SymbolToPrimitive,
243
310
  SymbolToStringTag: () => SymbolToStringTag,
311
+ SymbolUnscopables: () => SymbolUnscopables,
244
312
  SyntaxErrorCtor: () => SyntaxErrorCtor,
245
313
  TypeErrorCtor: () => TypeErrorCtor,
246
314
  URIErrorCtor: () => URIErrorCtor,
@@ -268,16 +336,48 @@ __export(primordials_exports, {
268
336
  WeakSetPrototypeDelete: () => WeakSetPrototypeDelete,
269
337
  WeakSetPrototypeHas: () => WeakSetPrototypeHas,
270
338
  applyBind: () => applyBind,
339
+ applySafe: () => applySafe,
340
+ bindCall: () => bindCall,
271
341
  decodeComponent: () => decodeComponent,
272
342
  encodeComponent: () => encodeComponent,
273
- uncurryThis: () => uncurryThis
343
+ globalThisRef: () => globalThisRef,
344
+ uncurryThis: () => uncurryThis,
345
+ weakRefSafe: () => weakRefSafe
274
346
  });
275
347
  module.exports = __toCommonJS(primordials_exports);
348
+ var import_primordial = require("./smol/primordial");
349
+ var import_util = require("./smol/util");
350
+ const _smolUtil = (0, import_util.getSmolUtil)();
351
+ const _smolPrimordial = (0, import_primordial.getSmolPrimordial)();
276
352
  const { apply, bind, call } = Function.prototype;
277
- const uncurryThis = bind.bind(call);
278
- const applyBind = bind.bind(apply);
353
+ const uncurryThis = _smolUtil?.uncurryThis ?? bind.bind(call);
354
+ const applyBind = _smolUtil?.applyBind ?? bind.bind(apply);
355
+ const _applyBoundForSafe = applyBind;
356
+ const applySafe = _smolUtil?.applySafe ?? ((fn) => {
357
+ const apply2 = _applyBoundForSafe(fn);
358
+ return (self, args) => {
359
+ try {
360
+ return apply2(self, args);
361
+ } catch {
362
+ return void 0;
363
+ }
364
+ };
365
+ });
366
+ const _bindCallFallback = ((fn, thisArg, ...presetArgs) => Function.prototype.bind.apply(fn, [
367
+ thisArg,
368
+ ...presetArgs
369
+ ]));
370
+ const bindCall = _smolUtil?.bindCall ?? _bindCallFallback;
371
+ const weakRefSafe = _smolUtil?.weakRefSafe ?? ((target) => {
372
+ try {
373
+ return new WeakRef(target);
374
+ } catch {
375
+ return void 0;
376
+ }
377
+ });
279
378
  const ArrayCtor = Array;
280
379
  const ArrayBufferCtor = ArrayBuffer;
380
+ const BigIntCtor = BigInt;
281
381
  const BooleanCtor = Boolean;
282
382
  const BufferCtor = globalThis.Buffer;
283
383
  const DataViewCtor = DataView;
@@ -314,13 +414,16 @@ const URLSearchParamsCtor = URLSearchParams;
314
414
  const WeakMapCtor = WeakMap;
315
415
  const WeakRefCtor = WeakRef;
316
416
  const WeakSetCtor = WeakSet;
417
+ const InfinityValue = Infinity;
418
+ const NaNValue = NaN;
419
+ const globalThisRef = globalThis;
317
420
  const decodeComponent = globalThis.decodeURIComponent;
318
421
  const encodeComponent = globalThis.encodeURIComponent;
319
422
  const JSONParse = JSON.parse;
320
423
  const JSONStringify = JSON.stringify;
321
424
  const ArrayFrom = Array.from;
322
425
  const ArrayFromAsync = Array.fromAsync;
323
- const ArrayIsArray = Array.isArray;
426
+ const ArrayIsArray = _smolPrimordial?.arrayIsArray ?? Array.isArray;
324
427
  const ArrayOf = Array.of;
325
428
  const ArrayBufferIsView = ArrayBuffer.isView;
326
429
  const AtomicsWait = Atomics.wait;
@@ -362,8 +465,12 @@ const ArrayPrototypeSort = uncurryThis(Array.prototype.sort);
362
465
  const ArrayPrototypeSplice = uncurryThis(Array.prototype.splice);
363
466
  const ArrayPrototypeToReversed = uncurryThis(Array.prototype.toReversed);
364
467
  const ArrayPrototypeToSorted = uncurryThis(Array.prototype.toSorted);
468
+ const ArrayPrototypeToSpliced = uncurryThis(
469
+ Array.prototype.toSpliced
470
+ );
365
471
  const ArrayPrototypeUnshift = uncurryThis(Array.prototype.unshift);
366
472
  const ArrayPrototypeValues = uncurryThis(Array.prototype.values);
473
+ const ArrayPrototypeWith = uncurryThis(Array.prototype.with);
367
474
  const BufferAlloc = BufferCtor?.alloc;
368
475
  const BufferAllocUnsafe = BufferCtor?.allocUnsafe;
369
476
  const BufferAllocUnsafeSlow = BufferCtor?.allocUnsafeSlow;
@@ -374,7 +481,7 @@ const BufferIsBuffer = BufferCtor?.isBuffer;
374
481
  const BufferIsEncoding = BufferCtor?.isEncoding;
375
482
  const BufferPrototypeSlice = BufferCtor ? uncurryThis(BufferCtor.prototype.slice) : void 0;
376
483
  const BufferPrototypeToString = BufferCtor ? uncurryThis(BufferCtor.prototype.toString) : void 0;
377
- const DateNow = Date.now;
484
+ const DateNow = _smolPrimordial?.dateNow ?? Date.now;
378
485
  const DateParse = Date.parse;
379
486
  const DateUTC = Date.UTC;
380
487
  const DatePrototypeGetTime = uncurryThis(Date.prototype.getTime);
@@ -384,9 +491,27 @@ const DatePrototypeToLocaleString = uncurryThis(
384
491
  );
385
492
  const DatePrototypeValueOf = uncurryThis(Date.prototype.valueOf);
386
493
  const ErrorIsError = Error.isError;
494
+ const ErrorCaptureStackTrace = Error.captureStackTrace;
495
+ const ErrorPrepareStackTrace = Error.prepareStackTrace;
496
+ const _stackTraceLimitGetter = (() => {
497
+ const getter = Error.__lookupGetter__?.("stackTraceLimit");
498
+ if (typeof getter === "function") {
499
+ return () => getter.call(Error);
500
+ }
501
+ return void 0;
502
+ })();
503
+ function ErrorStackTraceLimit() {
504
+ if (_stackTraceLimitGetter) {
505
+ return _stackTraceLimitGetter();
506
+ }
507
+ return Error.stackTraceLimit;
508
+ }
387
509
  const FunctionPrototypeApply = uncurryThis(Function.prototype.apply);
388
510
  const FunctionPrototypeBind = uncurryThis(Function.prototype.bind);
389
511
  const FunctionPrototypeCall = uncurryThis(Function.prototype.call);
512
+ const FunctionPrototypeToString = uncurryThis(
513
+ Function.prototype.toString
514
+ );
390
515
  const _anyIterator = (/* @__PURE__ */ new Map()).keys();
391
516
  let _iteratorLookup = Object.getPrototypeOf(_anyIterator);
392
517
  while (_iteratorLookup && typeof _iteratorLookup.next !== "function") {
@@ -404,23 +529,64 @@ const MapPrototypeHas = uncurryThis(Map.prototype.has);
404
529
  const MapPrototypeKeys = uncurryThis(Map.prototype.keys);
405
530
  const MapPrototypeSet = uncurryThis(Map.prototype.set);
406
531
  const MapPrototypeValues = uncurryThis(Map.prototype.values);
407
- const MathAbs = Math.abs;
408
- const MathCeil = Math.ceil;
409
- const MathFloor = Math.floor;
532
+ const MathE = Math.E;
533
+ const MathLN2 = Math.LN2;
534
+ const MathLN10 = Math.LN10;
535
+ const MathLOG2E = Math.LOG2E;
536
+ const MathLOG10E = Math.LOG10E;
537
+ const MathPI = Math.PI;
538
+ const MathSQRT1_2 = Math.SQRT1_2;
539
+ const MathSQRT2 = Math.SQRT2;
540
+ const MathAbs = _smolPrimordial?.mathAbs ?? Math.abs;
541
+ const MathAcos = _smolPrimordial?.mathAcos ?? Math.acos;
542
+ const MathAcosh = _smolPrimordial?.mathAcosh ?? Math.acosh;
543
+ const MathAsin = _smolPrimordial?.mathAsin ?? Math.asin;
544
+ const MathAsinh = _smolPrimordial?.mathAsinh ?? Math.asinh;
545
+ const MathAtan = _smolPrimordial?.mathAtan ?? Math.atan;
546
+ const MathAtan2 = _smolPrimordial?.mathAtan2 ?? Math.atan2;
547
+ const MathAtanh = _smolPrimordial?.mathAtanh ?? Math.atanh;
548
+ const MathCbrt = _smolPrimordial?.mathCbrt ?? Math.cbrt;
549
+ const MathCeil = _smolPrimordial?.mathCeil ?? Math.ceil;
550
+ const MathClz32 = _smolPrimordial?.mathClz32 ?? Math.clz32;
551
+ const MathCos = _smolPrimordial?.mathCos ?? Math.cos;
552
+ const MathCosh = _smolPrimordial?.mathCosh ?? Math.cosh;
553
+ const MathExp = _smolPrimordial?.mathExp ?? Math.exp;
554
+ const MathExpm1 = _smolPrimordial?.mathExpm1 ?? Math.expm1;
555
+ const MathF16round = Math.f16round;
556
+ const MathFloor = _smolPrimordial?.mathFloor ?? Math.floor;
557
+ const MathFround = _smolPrimordial?.mathFround ?? Math.fround;
558
+ const MathHypot = _smolPrimordial?.mathHypot ?? Math.hypot;
559
+ const MathImul = _smolPrimordial?.mathImul ?? Math.imul;
560
+ const MathLog = _smolPrimordial?.mathLog ?? Math.log;
561
+ const MathLog1p = _smolPrimordial?.mathLog1p ?? Math.log1p;
562
+ const MathLog2 = _smolPrimordial?.mathLog2 ?? Math.log2;
563
+ const MathLog10 = _smolPrimordial?.mathLog10 ?? Math.log10;
410
564
  const MathMax = Math.max;
411
565
  const MathMin = Math.min;
412
- const MathPow = Math.pow;
566
+ const MathPow = _smolPrimordial?.mathPow ?? Math.pow;
413
567
  const MathRandom = Math.random;
414
- const MathRound = Math.round;
415
- const MathSign = Math.sign;
416
- const MathSqrt = Math.sqrt;
417
- const MathTrunc = Math.trunc;
418
- const NumberIsFinite = Number.isFinite;
419
- const NumberIsInteger = Number.isInteger;
420
- const NumberIsNaN = Number.isNaN;
421
- const NumberIsSafeInteger = Number.isSafeInteger;
422
- const NumberParseFloat = Number.parseFloat;
423
- const NumberParseInt = Number.parseInt;
568
+ const MathRound = _smolPrimordial?.mathRound ?? Math.round;
569
+ const MathSign = _smolPrimordial?.mathSign ?? Math.sign;
570
+ const MathSin = _smolPrimordial?.mathSin ?? Math.sin;
571
+ const MathSinh = _smolPrimordial?.mathSinh ?? Math.sinh;
572
+ const MathSqrt = _smolPrimordial?.mathSqrt ?? Math.sqrt;
573
+ const MathTan = _smolPrimordial?.mathTan ?? Math.tan;
574
+ const MathTanh = _smolPrimordial?.mathTanh ?? Math.tanh;
575
+ const MathTrunc = _smolPrimordial?.mathTrunc ?? Math.trunc;
576
+ const NumberEPSILON = Number.EPSILON;
577
+ const NumberMAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
578
+ const NumberMAX_VALUE = Number.MAX_VALUE;
579
+ const NumberMIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER;
580
+ const NumberMIN_VALUE = Number.MIN_VALUE;
581
+ const NumberNEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;
582
+ const NumberPOSITIVE_INFINITY = Number.POSITIVE_INFINITY;
583
+ const NumberIsFinite = _smolPrimordial?.numberIsFinite ?? Number.isFinite;
584
+ const NumberIsInteger = _smolPrimordial?.numberIsInteger ?? Number.isInteger;
585
+ const NumberIsNaN = _smolPrimordial?.numberIsNaN ?? Number.isNaN;
586
+ const NumberIsSafeInteger = _smolPrimordial?.numberIsSafeInteger ?? Number.isSafeInteger;
587
+ const NumberParseFloat = _smolPrimordial?.numberParseFloat ?? Number.parseFloat;
588
+ const _smolParseInt10 = _smolPrimordial?.numberParseInt10;
589
+ const NumberParseInt = _smolParseInt10 ? (s, radix) => radix === void 0 || radix === 10 ? _smolParseInt10(s) : Number.parseInt(s, radix) : Number.parseInt;
424
590
  const NumberPrototypeToFixed = uncurryThis(Number.prototype.toFixed);
425
591
  const NumberPrototypeToString = uncurryThis(Number.prototype.toString);
426
592
  const ObjectAssign = Object.assign;
@@ -457,6 +623,19 @@ const ObjectPrototypePropertyIsEnumerable = uncurryThis(
457
623
  );
458
624
  const ObjectPrototypeToString = uncurryThis(Object.prototype.toString);
459
625
  const ObjectPrototypeValueOf = uncurryThis(Object.prototype.valueOf);
626
+ const _objectProto = Object.prototype;
627
+ const ObjectPrototypeDefineGetter = uncurryThis(
628
+ _objectProto.__defineGetter__
629
+ );
630
+ const ObjectPrototypeDefineSetter = uncurryThis(
631
+ _objectProto.__defineSetter__
632
+ );
633
+ const ObjectPrototypeLookupGetter = uncurryThis(
634
+ _objectProto.__lookupGetter__
635
+ );
636
+ const ObjectPrototypeLookupSetter = uncurryThis(
637
+ _objectProto.__lookupSetter__
638
+ );
460
639
  const PromiseAll = Promise.all.bind(Promise);
461
640
  const PromiseAllSettled = Promise.allSettled.bind(Promise);
462
641
  const PromiseAny = Promise.any.bind(Promise);
@@ -502,9 +681,11 @@ const StringFromCodePoint = String.fromCodePoint;
502
681
  const StringRaw = String.raw;
503
682
  const StringPrototypeAt = uncurryThis(String.prototype.at);
504
683
  const StringPrototypeCharAt = uncurryThis(String.prototype.charAt);
505
- const StringPrototypeCharCodeAt = uncurryThis(
506
- String.prototype.charCodeAt
507
- );
684
+ const _smolCharCodeAt = _smolPrimordial?.stringCharCodeAt;
685
+ const StringPrototypeCharCodeAt = _smolCharCodeAt ? (s, i) => {
686
+ const code = _smolCharCodeAt(s, i);
687
+ return code === -1 ? NaN : code;
688
+ } : uncurryThis(String.prototype.charCodeAt);
508
689
  const StringPrototypeCodePointAt = uncurryThis(
509
690
  String.prototype.codePointAt
510
691
  );
@@ -556,11 +737,29 @@ const StringPrototypeToUpperCase = uncurryThis(
556
737
  const StringPrototypeTrim = uncurryThis(String.prototype.trim);
557
738
  const StringPrototypeTrimEnd = uncurryThis(String.prototype.trimEnd);
558
739
  const StringPrototypeTrimStart = uncurryThis(String.prototype.trimStart);
740
+ const SymbolAsyncDispose = Symbol.asyncDispose;
559
741
  const SymbolAsyncIterator = Symbol.asyncIterator;
742
+ const SymbolDispose = Symbol.dispose;
560
743
  const SymbolFor = Symbol.for;
744
+ const SymbolHasInstance = Symbol.hasInstance;
745
+ const SymbolIsConcatSpreadable = Symbol.isConcatSpreadable;
561
746
  const SymbolIterator = Symbol.iterator;
747
+ const SymbolKeyFor = Symbol.keyFor;
748
+ const SymbolMatch = Symbol.match;
749
+ const SymbolMatchAll = Symbol.matchAll;
750
+ const SymbolReplace = Symbol.replace;
751
+ const SymbolSearch = Symbol.search;
752
+ const SymbolSpecies = Symbol.species;
753
+ const SymbolSplit = Symbol.split;
562
754
  const SymbolToPrimitive = Symbol.toPrimitive;
563
755
  const SymbolToStringTag = Symbol.toStringTag;
756
+ const SymbolUnscopables = Symbol.unscopables;
757
+ const _symbolDescriptionGetter = Symbol.prototype.__lookupGetter__("description");
758
+ function SymbolPrototypeDescription(self) {
759
+ return _symbolDescriptionGetter ? _symbolDescriptionGetter.call(self) : self.description;
760
+ }
761
+ const SymbolPrototypeToString = uncurryThis(Symbol.prototype.toString);
762
+ const SymbolPrototypeValueOf = uncurryThis(Symbol.prototype.valueOf);
564
763
  const URLSearchParamsPrototypeAppend = uncurryThis(
565
764
  URLSearchParams.prototype.append
566
765
  );
@@ -631,9 +830,12 @@ const WeakSetPrototypeHas = uncurryThis(WeakSet.prototype.has);
631
830
  ArrayPrototypeSplice,
632
831
  ArrayPrototypeToReversed,
633
832
  ArrayPrototypeToSorted,
833
+ ArrayPrototypeToSpliced,
634
834
  ArrayPrototypeUnshift,
635
835
  ArrayPrototypeValues,
836
+ ArrayPrototypeWith,
636
837
  AtomicsWait,
838
+ BigIntCtor,
637
839
  BooleanCtor,
638
840
  BufferAlloc,
639
841
  BufferAllocUnsafe,
@@ -655,14 +857,19 @@ const WeakSetPrototypeHas = uncurryThis(WeakSet.prototype.has);
655
857
  DatePrototypeToLocaleString,
656
858
  DatePrototypeValueOf,
657
859
  DateUTC,
860
+ ErrorCaptureStackTrace,
658
861
  ErrorCtor,
659
862
  ErrorIsError,
863
+ ErrorPrepareStackTrace,
864
+ ErrorStackTraceLimit,
660
865
  EvalErrorCtor,
661
866
  Float32ArrayCtor,
662
867
  Float64ArrayCtor,
663
868
  FunctionPrototypeApply,
664
869
  FunctionPrototypeBind,
665
870
  FunctionPrototypeCall,
871
+ FunctionPrototypeToString,
872
+ InfinityValue,
666
873
  Int16ArrayCtor,
667
874
  Int32ArrayCtor,
668
875
  Int8ArrayCtor,
@@ -681,21 +888,62 @@ const WeakSetPrototypeHas = uncurryThis(WeakSet.prototype.has);
681
888
  MapPrototypeSet,
682
889
  MapPrototypeValues,
683
890
  MathAbs,
891
+ MathAcos,
892
+ MathAcosh,
893
+ MathAsin,
894
+ MathAsinh,
895
+ MathAtan,
896
+ MathAtan2,
897
+ MathAtanh,
898
+ MathCbrt,
684
899
  MathCeil,
900
+ MathClz32,
901
+ MathCos,
902
+ MathCosh,
903
+ MathE,
904
+ MathExp,
905
+ MathExpm1,
906
+ MathF16round,
685
907
  MathFloor,
908
+ MathFround,
909
+ MathHypot,
910
+ MathImul,
911
+ MathLN10,
912
+ MathLN2,
913
+ MathLOG10E,
914
+ MathLOG2E,
915
+ MathLog,
916
+ MathLog10,
917
+ MathLog1p,
918
+ MathLog2,
686
919
  MathMax,
687
920
  MathMin,
921
+ MathPI,
688
922
  MathPow,
689
923
  MathRandom,
690
924
  MathRound,
925
+ MathSQRT1_2,
926
+ MathSQRT2,
691
927
  MathSign,
928
+ MathSin,
929
+ MathSinh,
692
930
  MathSqrt,
931
+ MathTan,
932
+ MathTanh,
693
933
  MathTrunc,
934
+ NaNValue,
694
935
  NumberCtor,
936
+ NumberEPSILON,
695
937
  NumberIsFinite,
696
938
  NumberIsInteger,
697
939
  NumberIsNaN,
698
940
  NumberIsSafeInteger,
941
+ NumberMAX_SAFE_INTEGER,
942
+ NumberMAX_VALUE,
943
+ NumberMIN_SAFE_INTEGER,
944
+ NumberMIN_VALUE,
945
+ NumberNEGATIVE_INFINITY,
946
+ NumberPOSITIVE_INFINITY,
699
947
  NumberParseFloat,
700
948
  NumberParseInt,
701
949
  NumberPrototypeToFixed,
@@ -721,8 +969,12 @@ const WeakSetPrototypeHas = uncurryThis(WeakSet.prototype.has);
721
969
  ObjectKeys,
722
970
  ObjectPreventExtensions,
723
971
  ObjectPrototype,
972
+ ObjectPrototypeDefineGetter,
973
+ ObjectPrototypeDefineSetter,
724
974
  ObjectPrototypeHasOwnProperty,
725
975
  ObjectPrototypeIsPrototypeOf,
976
+ ObjectPrototypeLookupGetter,
977
+ ObjectPrototypeLookupSetter,
726
978
  ObjectPrototypePropertyIsEnumerable,
727
979
  ObjectPrototypeToString,
728
980
  ObjectPrototypeValueOf,
@@ -806,12 +1058,27 @@ const WeakSetPrototypeHas = uncurryThis(WeakSet.prototype.has);
806
1058
  StringPrototypeTrimEnd,
807
1059
  StringPrototypeTrimStart,
808
1060
  StringRaw,
1061
+ SymbolAsyncDispose,
809
1062
  SymbolAsyncIterator,
810
1063
  SymbolCtor,
1064
+ SymbolDispose,
811
1065
  SymbolFor,
1066
+ SymbolHasInstance,
1067
+ SymbolIsConcatSpreadable,
812
1068
  SymbolIterator,
1069
+ SymbolKeyFor,
1070
+ SymbolMatch,
1071
+ SymbolMatchAll,
1072
+ SymbolPrototypeDescription,
1073
+ SymbolPrototypeToString,
1074
+ SymbolPrototypeValueOf,
1075
+ SymbolReplace,
1076
+ SymbolSearch,
1077
+ SymbolSpecies,
1078
+ SymbolSplit,
813
1079
  SymbolToPrimitive,
814
1080
  SymbolToStringTag,
1081
+ SymbolUnscopables,
815
1082
  SyntaxErrorCtor,
816
1083
  TypeErrorCtor,
817
1084
  URIErrorCtor,
@@ -839,7 +1106,11 @@ const WeakSetPrototypeHas = uncurryThis(WeakSet.prototype.has);
839
1106
  WeakSetPrototypeDelete,
840
1107
  WeakSetPrototypeHas,
841
1108
  applyBind,
1109
+ applySafe,
1110
+ bindCall,
842
1111
  decodeComponent,
843
1112
  encodeComponent,
844
- uncurryThis
1113
+ globalThisRef,
1114
+ uncurryThis,
1115
+ weakRefSafe
845
1116
  });
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @fileoverview SEA (Single Executable Application) binary detection +
3
+ * path accessor.
4
+ *
5
+ * Two responsibilities (mirror of `src/smol/util.ts` shape):
6
+ *
7
+ * 1. `isSeaBinary()` — memoized boolean detector for whether the
8
+ * current process is running as a Node.js Single Executable
9
+ * Application. Probes via Node 24+'s `node:sea.isSea()` native
10
+ * API; falls back to `false` on older runtimes.
11
+ *
12
+ * 2. `getSeaBinaryPath()` — returns the path of the SEA binary
13
+ * (`process.argv[0]` normalized) when running as SEA, otherwise
14
+ * `undefined`.
15
+ *
16
+ * Defensive across runtimes: returns `false` / `undefined` cleanly on
17
+ * stock Node < 24, browsers, Deno, Bun.
18
+ */
19
+ /**
20
+ * Detect if the current process is running as a SEA binary.
21
+ * Uses Node.js 24+ native API with caching for performance.
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * if (isSeaBinary()) {
26
+ * console.log('Running as a Single Executable Application')
27
+ * }
28
+ * ```
29
+ */
30
+ export declare function isSeaBinary(): boolean;
31
+ /**
32
+ * Get the current SEA binary path.
33
+ * Only valid when running as a SEA binary.
34
+ *
35
+ * @example
36
+ * ```typescript
37
+ * const binPath = getSeaBinaryPath()
38
+ * if (binPath) {
39
+ * console.log(`Running as SEA binary: ${binPath}`)
40
+ * }
41
+ * ```
42
+ */
43
+ export declare function getSeaBinaryPath(): string | undefined;
@@ -28,18 +28,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  mod
29
29
  ));
30
30
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
- var sea_exports = {};
32
- __export(sea_exports, {
31
+ var util_exports = {};
32
+ __export(util_exports, {
33
33
  getSeaBinaryPath: () => getSeaBinaryPath,
34
34
  isSeaBinary: () => isSeaBinary
35
35
  });
36
- module.exports = __toCommonJS(sea_exports);
36
+ module.exports = __toCommonJS(util_exports);
37
37
  var import_node_process = __toESM(require("node:process"));
38
- var import_normalize = require("./paths/normalize");
38
+ var import_normalize = require("../paths/normalize");
39
39
  let _isSea;
40
- function getSeaBinaryPath() {
41
- return isSeaBinary() && import_node_process.default.argv[0] ? (0, import_normalize.normalizePath)(import_node_process.default.argv[0]) : void 0;
42
- }
43
40
  function isSeaBinary() {
44
41
  if (_isSea === void 0) {
45
42
  try {
@@ -51,6 +48,9 @@ function isSeaBinary() {
51
48
  }
52
49
  return _isSea ?? false;
53
50
  }
51
+ function getSeaBinaryPath() {
52
+ return isSeaBinary() && import_node_process.default.argv[0] ? (0, import_normalize.normalizePath)(import_node_process.default.argv[0]) : void 0;
53
+ }
54
54
  // Annotate the CommonJS export names for ESM import in node:
55
55
  0 && (module.exports = {
56
56
  getSeaBinaryPath,