@socketsecurity/lib 5.23.0 → 5.25.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 (44) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/archives.js +4 -4
  3. package/dist/constants/socket.js +1 -1
  4. package/dist/debug.js +5 -5
  5. package/dist/dlx/manifest.js +18 -20
  6. package/dist/errors.js +2 -3
  7. package/dist/external/@npmcli/package-json/lib/read-package.js +3 -2
  8. package/dist/external/@npmcli/package-json.js +4125 -165
  9. package/dist/external/@npmcli/promise-spawn.js +3 -2
  10. package/dist/external/adm-zip.js +3 -2
  11. package/dist/external/debug.js +2 -1
  12. package/dist/external/external-pack.js +4 -3
  13. package/dist/external/fast-sort.js +2 -1
  14. package/dist/external/get-east-asian-width.js +3 -2
  15. package/dist/external/npm-pack.js +6965 -4075
  16. package/dist/external/p-map.js +6 -5
  17. package/dist/external/pico-pack.js +24 -23
  18. package/dist/external/supports-color.js +3 -1
  19. package/dist/external/tar-fs.js +9 -8
  20. package/dist/external/which.js +3 -2
  21. package/dist/external/yargs-parser.js +3 -2
  22. package/dist/fs.js +5 -4
  23. package/dist/git.js +3 -3
  24. package/dist/github.d.ts +3 -3
  25. package/dist/github.js +3 -3
  26. package/dist/http-request.d.ts +2 -2
  27. package/dist/json/edit.js +9 -9
  28. package/dist/json/parse.d.ts +2 -2
  29. package/dist/json/parse.js +2 -2
  30. package/dist/logger.js +5 -6
  31. package/dist/objects.js +28 -39
  32. package/dist/packages/edit.js +3 -3
  33. package/dist/packages/isolation.js +3 -3
  34. package/dist/primordials.d.ts +337 -0
  35. package/dist/primordials.js +828 -0
  36. package/dist/process-lock.js +11 -11
  37. package/dist/releases/github.js +4 -4
  38. package/dist/signal-exit.js +4 -4
  39. package/dist/spawn.d.ts +13 -13
  40. package/dist/stdio/stderr.d.ts +2 -2
  41. package/dist/suppress-warnings.js +2 -2
  42. package/package.json +12 -8
  43. package/dist/env/socket-cli-shadow.d.ts +0 -77
  44. package/dist/env/socket-cli-shadow.js +0 -59
package/dist/objects.js CHANGED
@@ -43,46 +43,35 @@ __export(objects_exports, {
43
43
  module.exports = __toCommonJS(objects_exports);
44
44
  var import_core = require("./constants/core");
45
45
  var import_arrays = require("./arrays");
46
+ var import_primordials = require("./primordials");
46
47
  var import_sorts = require("./sorts");
47
- const ObjectDefineProperties = Object.defineProperties;
48
- const ObjectDefineProperty = Object.defineProperty;
49
- const ObjectFreeze = Object.freeze;
50
- const ObjectFromEntries = Object.fromEntries;
51
- const ObjectGetOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
52
- const ObjectGetOwnPropertyNames = Object.getOwnPropertyNames;
53
- const ObjectGetPrototypeOf = Object.getPrototypeOf;
54
- const ObjectHasOwn = Object.hasOwn;
55
- const ObjectKeys = Object.keys;
56
- const ObjectPrototype = Object.prototype;
57
- const ObjectSetPrototypeOf = Object.setPrototypeOf;
58
- const ReflectOwnKeys = Reflect.ownKeys;
59
48
  // @__NO_SIDE_EFFECTS__
60
49
  function createConstantsObject(props, options_) {
61
50
  const options = { __proto__: null, ...options_ };
62
- const attributes = ObjectFreeze({
51
+ const attributes = (0, import_primordials.ObjectFreeze)({
63
52
  __proto__: null,
64
- getters: options.getters ? ObjectFreeze(
65
- ObjectSetPrototypeOf(/* @__PURE__ */ toSortedObject(options.getters), null)
53
+ getters: options.getters ? (0, import_primordials.ObjectFreeze)(
54
+ (0, import_primordials.ObjectSetPrototypeOf)(/* @__PURE__ */ toSortedObject(options.getters), null)
66
55
  ) : void 0,
67
- internals: options.internals ? ObjectFreeze(
68
- ObjectSetPrototypeOf(/* @__PURE__ */ toSortedObject(options.internals), null)
56
+ internals: options.internals ? (0, import_primordials.ObjectFreeze)(
57
+ (0, import_primordials.ObjectSetPrototypeOf)(/* @__PURE__ */ toSortedObject(options.internals), null)
69
58
  ) : void 0,
70
- mixin: options.mixin ? ObjectFreeze(
71
- ObjectDefineProperties(
59
+ mixin: options.mixin ? (0, import_primordials.ObjectFreeze)(
60
+ (0, import_primordials.ObjectDefineProperties)(
72
61
  { __proto__: null },
73
- ObjectGetOwnPropertyDescriptors(options.mixin)
62
+ (0, import_primordials.ObjectGetOwnPropertyDescriptors)(options.mixin)
74
63
  )
75
64
  ) : void 0,
76
- props: props ? ObjectFreeze(ObjectSetPrototypeOf(/* @__PURE__ */ toSortedObject(props), null)) : void 0
65
+ props: props ? (0, import_primordials.ObjectFreeze)((0, import_primordials.ObjectSetPrototypeOf)(/* @__PURE__ */ toSortedObject(props), null)) : void 0
77
66
  });
78
- const lazyGetterStats = ObjectFreeze({
67
+ const lazyGetterStats = (0, import_primordials.ObjectFreeze)({
79
68
  __proto__: null,
80
69
  initialized: /* @__PURE__ */ new Set()
81
70
  });
82
71
  const object = defineLazyGetters(
83
72
  {
84
73
  __proto__: null,
85
- [import_core.kInternalsSymbol]: ObjectFreeze({
74
+ [import_core.kInternalsSymbol]: (0, import_primordials.ObjectFreeze)({
86
75
  __proto__: null,
87
76
  get attributes() {
88
77
  return attributes;
@@ -99,16 +88,16 @@ function createConstantsObject(props, options_) {
99
88
  lazyGetterStats
100
89
  );
101
90
  if (attributes.mixin) {
102
- ObjectDefineProperties(
91
+ (0, import_primordials.ObjectDefineProperties)(
103
92
  object,
104
93
  /* @__PURE__ */ toSortedObjectFromEntries(
105
- (/* @__PURE__ */ objectEntries(ObjectGetOwnPropertyDescriptors(attributes.mixin))).filter(
106
- (p) => !ObjectHasOwn(object, p[0])
94
+ (/* @__PURE__ */ objectEntries((0, import_primordials.ObjectGetOwnPropertyDescriptors)(attributes.mixin))).filter(
95
+ (p) => !(0, import_primordials.ObjectHasOwn)(object, p[0])
107
96
  )
108
97
  )
109
98
  );
110
99
  }
111
- return ObjectFreeze(object);
100
+ return (0, import_primordials.ObjectFreeze)(object);
112
101
  }
113
102
  // @__NO_SIDE_EFFECTS__
114
103
  function createLazyGetter(name, getter, stats) {
@@ -125,7 +114,7 @@ function createLazyGetter(name, getter, stats) {
125
114
  return lazyGetter;
126
115
  }
127
116
  function defineGetter(object, propKey, getter) {
128
- ObjectDefineProperty(object, propKey, {
117
+ (0, import_primordials.ObjectDefineProperty)(object, propKey, {
129
118
  get: getter,
130
119
  enumerable: false,
131
120
  configurable: true
@@ -137,7 +126,7 @@ function defineLazyGetter(object, propKey, getter, stats) {
137
126
  }
138
127
  function defineLazyGetters(object, getterDefObj, stats) {
139
128
  if (getterDefObj !== null && typeof getterDefObj === "object") {
140
- const keys = ReflectOwnKeys(getterDefObj);
129
+ const keys = (0, import_primordials.ReflectOwnKeys)(getterDefObj);
141
130
  for (let i = 0, { length } = keys; i < length; i += 1) {
142
131
  const key = keys[i];
143
132
  defineLazyGetter(object, key, getterDefObj[key], stats);
@@ -155,21 +144,21 @@ function entryKeyComparator(a, b) {
155
144
  }
156
145
  // @__NO_SIDE_EFFECTS__
157
146
  function getKeys(obj) {
158
- return /* @__PURE__ */ isObject(obj) ? ObjectKeys(obj) : [];
147
+ return /* @__PURE__ */ isObject(obj) ? (0, import_primordials.ObjectKeys)(obj) : [];
159
148
  }
160
149
  // @__NO_SIDE_EFFECTS__
161
150
  function getOwn(obj, propKey) {
162
151
  if (obj === null || obj === void 0) {
163
152
  return void 0;
164
153
  }
165
- return ObjectHasOwn(obj, propKey) ? obj[propKey] : void 0;
154
+ return (0, import_primordials.ObjectHasOwn)(obj, propKey) ? obj[propKey] : void 0;
166
155
  }
167
156
  // @__NO_SIDE_EFFECTS__
168
157
  function getOwnPropertyValues(obj) {
169
158
  if (obj === null || obj === void 0) {
170
159
  return [];
171
160
  }
172
- const keys = ObjectGetOwnPropertyNames(obj);
161
+ const keys = (0, import_primordials.ObjectGetOwnPropertyNames)(obj);
173
162
  const { length } = keys;
174
163
  const values = Array(length);
175
164
  for (let i = 0; i < length; i += 1) {
@@ -183,7 +172,7 @@ function hasKeys(obj) {
183
172
  return false;
184
173
  }
185
174
  for (const key in obj) {
186
- if (ObjectHasOwn(obj, key)) {
175
+ if ((0, import_primordials.ObjectHasOwn)(obj, key)) {
187
176
  return true;
188
177
  }
189
178
  }
@@ -194,7 +183,7 @@ function hasOwn(obj, propKey) {
194
183
  if (obj === null || obj === void 0) {
195
184
  return false;
196
185
  }
197
- return ObjectHasOwn(obj, propKey);
186
+ return (0, import_primordials.ObjectHasOwn)(obj, propKey);
198
187
  }
199
188
  // @__NO_SIDE_EFFECTS__
200
189
  function isObject(value) {
@@ -205,8 +194,8 @@ function isObjectObject(value) {
205
194
  if (value === null || typeof value !== "object" || (0, import_arrays.isArray)(value)) {
206
195
  return false;
207
196
  }
208
- const proto = ObjectGetPrototypeOf(value);
209
- return proto === null || proto === ObjectPrototype;
197
+ const proto = (0, import_primordials.ObjectGetPrototypeOf)(value);
198
+ return proto === null || proto === import_primordials.ObjectPrototype;
210
199
  }
211
200
  // @__NO_SIDE_EFFECTS__
212
201
  function merge(target, source) {
@@ -229,7 +218,7 @@ function merge(target, source) {
229
218
  if (isSourceArray || isTargetArray) {
230
219
  continue;
231
220
  }
232
- const keys = ReflectOwnKeys(currentSource);
221
+ const keys = (0, import_primordials.ReflectOwnKeys)(currentSource);
233
222
  for (let i = 0, { length } = keys; i < length; i += 1) {
234
223
  const key = keys[i];
235
224
  const srcVal = currentSource[key];
@@ -255,7 +244,7 @@ function objectEntries(obj) {
255
244
  if (obj === null || obj === void 0) {
256
245
  return [];
257
246
  }
258
- const keys = ReflectOwnKeys(obj);
247
+ const keys = (0, import_primordials.ReflectOwnKeys)(obj);
259
248
  const { length } = keys;
260
249
  const entries = Array(length);
261
250
  const record = obj;
@@ -284,7 +273,7 @@ function toSortedObjectFromEntries(entries) {
284
273
  if (!otherEntries.length && !symbolEntries.length) {
285
274
  return {};
286
275
  }
287
- return ObjectFromEntries([
276
+ return (0, import_primordials.ObjectFromEntries)([
288
277
  // The String constructor is safe to use with symbols.
289
278
  ...symbolEntries.sort(entryKeyComparator),
290
279
  ...otherEntries.sort(entryKeyComparator)
@@ -151,11 +151,11 @@ function getEditablePackageJsonClass() {
151
151
  let parseErr;
152
152
  try {
153
153
  this._readFileContent = await (0, import_read_package.read)(this.filename);
154
- } catch (err) {
154
+ } catch (e) {
155
155
  if (!create) {
156
- throw err;
156
+ throw e;
157
157
  }
158
- parseErr = err;
158
+ parseErr = e;
159
159
  }
160
160
  if (parseErr) {
161
161
  const nodePath = /* @__PURE__ */ getPath();
@@ -69,9 +69,9 @@ async function mergePackageJson(pkgJsonPath, originalPkgJson) {
69
69
  let pkgJson;
70
70
  try {
71
71
  pkgJson = JSON.parse(await fs.promises.readFile(pkgJsonPath, "utf8"));
72
- } catch (error) {
73
- throw new Error(`Failed to parse ${pkgJsonPath}: ${(0, import_errors.errorMessage)(error)}`, {
74
- cause: error
72
+ } catch (e) {
73
+ throw new Error(`Failed to parse ${pkgJsonPath}: ${(0, import_errors.errorMessage)(e)}`, {
74
+ cause: e
75
75
  });
76
76
  }
77
77
  const mergedPkgJson = originalPkgJson ? { ...originalPkgJson, ...pkgJson } : pkgJson;
@@ -0,0 +1,337 @@
1
+ /**
2
+ * @fileoverview Safe references to built-in functions and constructors.
3
+ *
4
+ * Captures references to JavaScript built-ins at module load time, before
5
+ * user code can tamper with prototypes or globals. Consumers that process
6
+ * adversarial input (PURL parsers, manifest readers, config validators,
7
+ * anything that ingests untrusted strings or JSON) should import from here
8
+ * instead of using globals directly, so prototype-pollution attacks on the
9
+ * caller realm can't silently redirect library internals.
10
+ *
11
+ * Convention follows Node.js's internal primordials module:
12
+ *
13
+ * - **Static methods** retain their original name: `ObjectKeys`,
14
+ * `ArrayIsArray`, `JSONParse`.
15
+ * - **Prototype methods** are uncurried via `uncurryThis`, so you call
16
+ * `StringPrototypeSlice(str, 0, 3)` instead of `str.slice(0, 3)`.
17
+ * - **Constructors** get a `Ctor` suffix to avoid shadowing the capital-
18
+ * case global: `MapCtor`, `SetCtor`.
19
+ *
20
+ * **IMPORTANT**: do not use destructuring on `globalThis` or `Reflect`
21
+ * here. tsgo has a bug that mis-transpiles destructured exports.
22
+ * See: https://github.com/SocketDev/socket-packageurl-js/issues/3
23
+ *
24
+ * @see https://github.com/nicolo-ribaudo/tc39-proposal-primordials
25
+ * @see https://github.com/nodejs/node/blob/main/lib/internal/per_context/primordials.js
26
+ */
27
+ export declare const uncurryThis: <T, A extends readonly unknown[], R>(fn: (this: T, ...args: A) => R) => (self: T, ...args: A) => R;
28
+ export declare const applyBind: <T, A extends readonly unknown[], R>(fn: (this: T, ...args: A) => R) => (self: T, args: A) => R;
29
+ export declare const ArrayCtor: ArrayConstructor;
30
+ export declare const ArrayBufferCtor: ArrayBufferConstructor;
31
+ export declare const BooleanCtor: BooleanConstructor;
32
+ export declare const BufferCtor: typeof globalThis.Buffer | undefined;
33
+ export declare const DataViewCtor: DataViewConstructor;
34
+ export declare const DateCtor: DateConstructor;
35
+ export declare const ErrorCtor: ErrorConstructor;
36
+ export declare const AggregateErrorCtor: AggregateErrorConstructor;
37
+ export declare const EvalErrorCtor: EvalErrorConstructor;
38
+ export declare const RangeErrorCtor: RangeErrorConstructor;
39
+ export declare const ReferenceErrorCtor: ReferenceErrorConstructor;
40
+ export declare const SyntaxErrorCtor: SyntaxErrorConstructor;
41
+ export declare const TypeErrorCtor: TypeErrorConstructor;
42
+ export declare const URIErrorCtor: URIErrorConstructor;
43
+ export declare const MapCtor: MapConstructor;
44
+ export declare const NumberCtor: NumberConstructor;
45
+ export declare const ObjectCtor: ObjectConstructor;
46
+ export declare const PromiseCtor: PromiseConstructor;
47
+ export declare const RegExpCtor: RegExpConstructor;
48
+ export declare const SetCtor: SetConstructor;
49
+ export declare const StringCtor: StringConstructor;
50
+ export declare const SymbolCtor: SymbolConstructor;
51
+ export declare const Float32ArrayCtor: Float32ArrayConstructor;
52
+ export declare const Float64ArrayCtor: Float64ArrayConstructor;
53
+ export declare const Int8ArrayCtor: Int8ArrayConstructor;
54
+ export declare const Int16ArrayCtor: Int16ArrayConstructor;
55
+ export declare const Int32ArrayCtor: Int32ArrayConstructor;
56
+ export declare const Uint8ArrayCtor: Uint8ArrayConstructor;
57
+ export declare const Uint8ClampedArrayCtor: Uint8ClampedArrayConstructor;
58
+ export declare const Uint16ArrayCtor: Uint16ArrayConstructor;
59
+ export declare const Uint32ArrayCtor: Uint32ArrayConstructor;
60
+ export declare const URLCtor: typeof URL;
61
+ export declare const URLSearchParamsCtor: typeof URLSearchParams;
62
+ export declare const WeakMapCtor: WeakMapConstructor;
63
+ export declare const WeakRefCtor: WeakRefConstructor;
64
+ export declare const WeakSetCtor: WeakSetConstructor;
65
+ export declare const decodeComponent: typeof decodeURIComponent;
66
+ export declare const encodeComponent: typeof encodeURIComponent;
67
+ export declare const JSONParse: (text: string, reviver?: (this: any, key: string, value: any) => any) => any;
68
+ export declare const JSONStringify: {
69
+ (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
70
+ (value: any, replacer?: (number | string)[] | null, space?: string | number): string;
71
+ };
72
+ export declare const ArrayFrom: {
73
+ <T>(arrayLike: ArrayLike<T>): T[];
74
+ <T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
75
+ <T>(iterable: Iterable<T> | ArrayLike<T>): T[];
76
+ <T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
77
+ };
78
+ export declare const ArrayIsArray: (arg: any) => arg is any[];
79
+ export declare const ArrayOf: <T>(...items: T[]) => T[];
80
+ export declare const ArrayBufferIsView: (arg: any) => arg is ArrayBufferView;
81
+ export declare const ArrayPrototypeAt: (self: unknown, index: number) => any;
82
+ export declare const ArrayPrototypeConcat: <T>(self: T[], ...items: Array<T | readonly T[]>) => T[];
83
+ export declare const ArrayPrototypeCopyWithin: (self: unknown, target: number, start: number, end?: number | undefined) => any[];
84
+ export declare const ArrayPrototypeEntries: (self: unknown) => ArrayIterator<[number, any]>;
85
+ export declare const ArrayPrototypeEvery: (self: unknown, predicate: (value: any, index: number, array: any[]) => unknown, thisArg?: any) => boolean;
86
+ export declare const ArrayPrototypeFill: (self: unknown, value: any, start?: number | undefined, end?: number | undefined) => any[];
87
+ export declare const ArrayPrototypeFilter: (self: unknown, predicate: (value: any, index: number, array: any[]) => unknown, thisArg?: any) => any[];
88
+ export declare const ArrayPrototypeFind: (self: unknown, predicate: (value: any, index: number, obj: any[]) => unknown, thisArg?: any) => any;
89
+ export declare const ArrayPrototypeFindIndex: (self: unknown, predicate: (value: any, index: number, obj: any[]) => unknown, thisArg?: any) => number;
90
+ export declare const ArrayPrototypeFindLast: (self: unknown, predicate: (value: any, index: number, array: any[]) => unknown, thisArg?: any) => any;
91
+ export declare const ArrayPrototypeFindLastIndex: (self: unknown, predicate: (value: any, index: number, array: any[]) => unknown, thisArg?: any) => number;
92
+ export declare const ArrayPrototypeFlat: <A, D extends number = 1>(self: A, depth?: D | undefined) => FlatArray<A, D>[];
93
+ export declare const ArrayPrototypeFlatMap: <U, This = undefined>(self: unknown, callback: (this: This, value: any, index: number, array: any[]) => U | readonly U[], thisArg?: This | undefined) => U[];
94
+ export declare const ArrayPrototypeForEach: (self: unknown, callbackfn: (value: any, index: number, array: any[]) => void, thisArg?: any) => void;
95
+ export declare const ArrayPrototypeIncludes: (self: unknown, searchElement: any, fromIndex?: number | undefined) => boolean;
96
+ export declare const ArrayPrototypeIndexOf: (self: unknown, searchElement: any, fromIndex?: number | undefined) => number;
97
+ export declare const ArrayPrototypeJoin: (self: unknown, separator?: string | undefined) => string;
98
+ export declare const ArrayPrototypeKeys: (self: unknown) => ArrayIterator<number>;
99
+ export declare const ArrayPrototypeLastIndexOf: (self: unknown, searchElement: any, fromIndex?: number | undefined) => number;
100
+ export declare const ArrayPrototypeMap: <U>(self: unknown, callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[];
101
+ export declare const ArrayPrototypePop: (self: unknown) => any;
102
+ export declare const ArrayPrototypePush: <T>(self: T[], ...items: T[]) => number;
103
+ export declare const ArrayPrototypeReduce: (self: unknown, callbackfn: (previousValue: unknown, currentValue: any, currentIndex: number, array: any[]) => unknown, initialValue: unknown) => unknown;
104
+ export declare const ArrayPrototypeReduceRight: (self: unknown, callbackfn: (previousValue: unknown, currentValue: any, currentIndex: number, array: any[]) => unknown, initialValue: unknown) => unknown;
105
+ export declare const ArrayPrototypeReverse: (self: unknown) => any[];
106
+ export declare const ArrayPrototypeShift: (self: unknown) => any;
107
+ export declare const ArrayPrototypeSlice: (self: unknown, start?: number | undefined, end?: number | undefined) => any[];
108
+ export declare const ArrayPrototypeSome: (self: unknown, predicate: (value: any, index: number, array: any[]) => unknown, thisArg?: any) => boolean;
109
+ export declare const ArrayPrototypeSort: (self: unknown, compareFn?: ((a: any, b: any) => number) | undefined) => any[];
110
+ export declare const ArrayPrototypeSplice: <T>(self: T[], start: number, deleteCount?: number, ...items: T[]) => T[];
111
+ export declare const ArrayPrototypeToReversed: (self: unknown) => any[];
112
+ export declare const ArrayPrototypeToSorted: (self: unknown, compareFn?: ((a: any, b: any) => number) | undefined) => any[];
113
+ export declare const ArrayPrototypeUnshift: <T>(self: T[], ...items: T[]) => number;
114
+ export declare const ArrayPrototypeValues: (self: unknown) => ArrayIterator<any>;
115
+ export declare const BufferAlloc: typeof Buffer.alloc | undefined;
116
+ export declare const BufferAllocUnsafe: typeof Buffer.allocUnsafe | undefined;
117
+ export declare const BufferAllocUnsafeSlow: typeof Buffer.allocUnsafeSlow | undefined;
118
+ export declare const BufferByteLength: typeof Buffer.byteLength | undefined;
119
+ export declare const BufferConcat: typeof Buffer.concat | undefined;
120
+ export declare const BufferFrom: typeof Buffer.from | undefined;
121
+ export declare const BufferIsBuffer: typeof Buffer.isBuffer | undefined;
122
+ export declare const BufferIsEncoding: typeof Buffer.isEncoding | undefined;
123
+ export declare const BufferPrototypeSlice: ((buf: Buffer, start?: number, end?: number) => Buffer) | undefined;
124
+ export declare const BufferPrototypeToString: ((buf: Buffer, encoding?: BufferEncoding, start?: number, end?: number) => string) | undefined;
125
+ export declare const DateNow: () => number;
126
+ export declare const DateParse: (s: string) => number;
127
+ export declare const DateUTC: {
128
+ (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
129
+ (year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
130
+ };
131
+ export declare const DatePrototypeGetTime: (self: unknown) => number;
132
+ export declare const DatePrototypeToISOString: (self: unknown) => string;
133
+ export declare const DatePrototypeValueOf: (self: unknown) => number;
134
+ export declare const ErrorIsError: ((value: unknown) => value is Error) | undefined;
135
+ export declare const FunctionPrototypeApply: (self: (...args: unknown[]) => unknown, thisArg: unknown, args: unknown[]) => unknown;
136
+ export declare const FunctionPrototypeBind: (self: (...args: unknown[]) => unknown, thisArg: unknown, ...args: unknown[]) => (...args: unknown[]) => unknown;
137
+ export declare const FunctionPrototypeCall: (self: (...args: unknown[]) => unknown, thisArg: unknown, ...args: unknown[]) => unknown;
138
+ export declare const IteratorPrototypeNext: (self: Iterator<unknown, any, any>) => IteratorResult<unknown, any>;
139
+ export declare const IteratorPrototypeReturn: ((self: Iterator<unknown, any, any>, value?: unknown) => IteratorResult<unknown, any>) | undefined;
140
+ export declare const MapPrototypeClear: (self: unknown) => void;
141
+ export declare const MapPrototypeDelete: (self: unknown, key: any) => boolean;
142
+ export declare const MapPrototypeEntries: (self: unknown) => MapIterator<[any, any]>;
143
+ export declare const MapPrototypeForEach: (self: unknown, callbackfn: (value: any, key: any, map: Map<any, any>) => void, thisArg?: any) => void;
144
+ export declare const MapPrototypeGet: (self: unknown, key: any) => any;
145
+ export declare const MapPrototypeHas: (self: unknown, key: any) => boolean;
146
+ export declare const MapPrototypeKeys: (self: unknown) => MapIterator<any>;
147
+ export declare const MapPrototypeSet: (self: unknown, key: any, value: any) => Map<any, any>;
148
+ export declare const MapPrototypeValues: (self: unknown) => MapIterator<any>;
149
+ export declare const MathAbs: (x: number) => number;
150
+ export declare const MathCeil: (x: number) => number;
151
+ export declare const MathFloor: (x: number) => number;
152
+ export declare const MathMax: (...values: number[]) => number;
153
+ export declare const MathMin: (...values: number[]) => number;
154
+ export declare const MathPow: (x: number, y: number) => number;
155
+ export declare const MathRandom: () => number;
156
+ export declare const MathRound: (x: number) => number;
157
+ export declare const MathSign: (x: number) => number;
158
+ export declare const MathSqrt: (x: number) => number;
159
+ export declare const MathTrunc: (x: number) => number;
160
+ export declare const NumberIsFinite: (number: unknown) => boolean;
161
+ export declare const NumberIsInteger: (number: unknown) => boolean;
162
+ export declare const NumberIsNaN: (number: unknown) => boolean;
163
+ export declare const NumberIsSafeInteger: (number: unknown) => boolean;
164
+ export declare const NumberParseFloat: (string: string) => number;
165
+ export declare const NumberParseInt: (string: string, radix?: number) => number;
166
+ export declare const NumberPrototypeToFixed: (self: unknown, fractionDigits?: number | undefined) => string;
167
+ export declare const NumberPrototypeToString: (self: unknown, radix?: number | undefined) => string;
168
+ export declare const ObjectAssign: {
169
+ <T extends {}, U>(target: T, source: U): T & U;
170
+ <T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;
171
+ <T extends {}, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
172
+ (target: object, ...sources: any[]): any;
173
+ };
174
+ export declare const ObjectCreate: {
175
+ (o: object | null): any;
176
+ (o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
177
+ };
178
+ export declare const ObjectDefineProperties: <T>(o: T, properties: PropertyDescriptorMap & ThisType<any>) => T;
179
+ export declare const ObjectDefineProperty: <T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>) => T;
180
+ export declare const ObjectEntries: {
181
+ <T>(o: {
182
+ [s: string]: T;
183
+ } | ArrayLike<T>): [string, T][];
184
+ (o: {}): [string, any][];
185
+ };
186
+ export declare const ObjectFreeze: {
187
+ <T extends Function>(f: T): T;
188
+ <T extends {
189
+ [idx: string]: U | null | undefined | object;
190
+ }, U extends string | bigint | number | boolean | symbol>(o: T): Readonly<T>;
191
+ <T>(o: T): Readonly<T>;
192
+ };
193
+ export declare const ObjectFromEntries: {
194
+ <T = any>(entries: Iterable<readonly [PropertyKey, T]>): {
195
+ [k: string]: T;
196
+ };
197
+ (entries: Iterable<readonly any[]>): any;
198
+ };
199
+ export declare const ObjectGetOwnPropertyDescriptor: (o: any, p: PropertyKey) => PropertyDescriptor | undefined;
200
+ export declare const ObjectGetOwnPropertyDescriptors: <T>(o: T) => { [P in keyof T]: TypedPropertyDescriptor<T[P]>; } & {
201
+ [x: string]: PropertyDescriptor;
202
+ };
203
+ export declare const ObjectGetOwnPropertyNames: (o: any) => string[];
204
+ export declare const ObjectGetOwnPropertySymbols: (o: any) => symbol[];
205
+ export declare const ObjectGetPrototypeOf: (o: any) => any;
206
+ export declare const ObjectHasOwn: (o: object, v: PropertyKey) => boolean;
207
+ export declare const ObjectIs: (value1: any, value2: any) => boolean;
208
+ export declare const ObjectIsExtensible: (o: any) => boolean;
209
+ export declare const ObjectIsFrozen: (o: any) => boolean;
210
+ export declare const ObjectIsSealed: (o: any) => boolean;
211
+ export declare const ObjectKeys: {
212
+ (o: object): string[];
213
+ (o: {}): string[];
214
+ };
215
+ export declare const ObjectPreventExtensions: <T>(o: T) => T;
216
+ export declare const ObjectSeal: <T>(o: T) => T;
217
+ export declare const ObjectSetPrototypeOf: (o: any, proto: object | null) => any;
218
+ export declare const ObjectValues: {
219
+ <T>(o: {
220
+ [s: string]: T;
221
+ } | ArrayLike<T>): T[];
222
+ (o: {}): any[];
223
+ };
224
+ export declare const ObjectPrototype: Object;
225
+ export declare const ObjectPrototypeHasOwnProperty: (self: unknown, v: PropertyKey) => boolean;
226
+ export declare const ObjectPrototypeIsPrototypeOf: (self: unknown, v: Object) => boolean;
227
+ export declare const ObjectPrototypePropertyIsEnumerable: (self: unknown, v: PropertyKey) => boolean;
228
+ export declare const ObjectPrototypeToString: (self: unknown) => string;
229
+ export declare const ObjectPrototypeValueOf: (self: unknown) => Object;
230
+ export declare const PromiseAll: {
231
+ <T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
232
+ <T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
233
+ };
234
+ export declare const PromiseAllSettled: {
235
+ <T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
236
+ <T>(values: Iterable<T | PromiseLike<T>>): Promise<PromiseSettledResult<Awaited<T>>[]>;
237
+ };
238
+ export declare const PromiseAny: {
239
+ <T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
240
+ <T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
241
+ };
242
+ export declare const PromiseRace: {
243
+ <T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
244
+ <T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
245
+ };
246
+ export declare const PromiseReject: <T = never>(reason?: any) => Promise<T>;
247
+ export declare const PromiseResolve: {
248
+ (): Promise<void>;
249
+ <T>(value: T): Promise<Awaited<T>>;
250
+ <T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
251
+ };
252
+ export declare const PromiseWithResolvers: typeof Promise.withResolvers | undefined;
253
+ export declare const PromisePrototypeCatch: <TResult = never>(self: unknown, onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<any>;
254
+ export declare const PromisePrototypeFinally: (self: unknown, onfinally?: (() => void) | null | undefined) => Promise<any>;
255
+ export declare const PromisePrototypeThen: <TResult1 = any, TResult2 = never>(self: unknown, onfulfilled?: ((value: any) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
256
+ export declare const ReflectApply: typeof Reflect.apply;
257
+ export declare const ReflectConstruct: typeof Reflect.construct;
258
+ export declare const ReflectDefineProperty: typeof Reflect.defineProperty;
259
+ export declare const ReflectDeleteProperty: typeof Reflect.deleteProperty;
260
+ export declare const ReflectGet: typeof Reflect.get;
261
+ export declare const ReflectGetOwnPropertyDescriptor: typeof Reflect.getOwnPropertyDescriptor;
262
+ export declare const ReflectGetPrototypeOf: typeof Reflect.getPrototypeOf;
263
+ export declare const ReflectHas: typeof Reflect.has;
264
+ export declare const ReflectIsExtensible: typeof Reflect.isExtensible;
265
+ export declare const ReflectOwnKeys: typeof Reflect.ownKeys;
266
+ export declare const ReflectPreventExtensions: typeof Reflect.preventExtensions;
267
+ export declare const ReflectSet: typeof Reflect.set;
268
+ export declare const ReflectSetPrototypeOf: typeof Reflect.setPrototypeOf;
269
+ export declare const RegExpEscape: ((s: string) => string) | undefined;
270
+ export declare const RegExpPrototypeExec: (self: unknown, string: string) => RegExpExecArray | null;
271
+ export declare const RegExpPrototypeTest: (self: unknown, string: string) => boolean;
272
+ export declare const RegExpPrototypeSymbolMatch: (self: RegExp, str: string) => unknown;
273
+ export declare const RegExpPrototypeSymbolReplace: (self: RegExp, str: string, replaceValue: string) => string;
274
+ export declare const SetPrototypeAdd: (self: unknown, value: any) => Set<any>;
275
+ export declare const SetPrototypeClear: (self: unknown) => void;
276
+ export declare const SetPrototypeDelete: (self: unknown, value: any) => boolean;
277
+ export declare const SetPrototypeEntries: (self: unknown) => SetIterator<[any, any]>;
278
+ export declare const SetPrototypeForEach: (self: unknown, callbackfn: (value: any, value2: any, set: Set<any>) => void, thisArg?: any) => void;
279
+ export declare const SetPrototypeHas: (self: unknown, value: any) => boolean;
280
+ export declare const SetPrototypeKeys: (self: unknown) => SetIterator<any>;
281
+ export declare const SetPrototypeValues: (self: unknown) => SetIterator<any>;
282
+ export declare const StringFromCharCode: (...codes: number[]) => string;
283
+ export declare const StringFromCodePoint: (...codePoints: number[]) => string;
284
+ export declare const StringRaw: (template: {
285
+ raw: readonly string[] | ArrayLike<string>;
286
+ }, ...substitutions: any[]) => string;
287
+ export declare const StringPrototypeAt: (self: unknown, index: number) => string | undefined;
288
+ export declare const StringPrototypeCharAt: (self: unknown, pos: number) => string;
289
+ export declare const StringPrototypeCharCodeAt: (self: unknown, index: number) => number;
290
+ export declare const StringPrototypeCodePointAt: (self: unknown, pos: number) => number | undefined;
291
+ export declare const StringPrototypeConcat: (self: string, ...strs: string[]) => string;
292
+ export declare const StringPrototypeEndsWith: (self: unknown, searchString: string, endPosition?: number | undefined) => boolean;
293
+ export declare const StringPrototypeIncludes: (self: unknown, searchString: string, position?: number | undefined) => boolean;
294
+ export declare const StringPrototypeIndexOf: (self: unknown, searchString: string, position?: number | undefined) => number;
295
+ export declare const StringPrototypeLastIndexOf: (self: unknown, searchString: string, position?: number | undefined) => number;
296
+ export declare const StringPrototypeLocaleCompare: (self: unknown, that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions | undefined) => number;
297
+ export declare const StringPrototypeMatch: (self: string, matcher: string | RegExp) => RegExpMatchArray | null;
298
+ export declare const StringPrototypeMatchAll: (self: string, matcher: string | RegExp) => IterableIterator<RegExpMatchArray>;
299
+ export declare const StringPrototypeNormalize: (self: unknown, form?: string | undefined) => string;
300
+ export declare const StringPrototypePadEnd: (self: unknown, maxLength: number, fillString?: string | undefined) => string;
301
+ export declare const StringPrototypePadStart: (self: unknown, maxLength: number, fillString?: string | undefined) => string;
302
+ export declare const StringPrototypeRepeat: (self: unknown, count: number) => string;
303
+ export declare const StringPrototypeReplace: (self: string, searchValue: string | RegExp, replaceValue: string) => string;
304
+ export declare const StringPrototypeReplaceAll: (self: string, searchValue: string, replaceValue: string) => string;
305
+ export declare const StringPrototypeSearch: (self: unknown, searcher: {
306
+ [Symbol.search](string: string): number;
307
+ }) => number;
308
+ export declare const StringPrototypeSlice: (self: unknown, start?: number | undefined, end?: number | undefined) => string;
309
+ export declare const StringPrototypeSplit: (self: string, separator: string | RegExp, limit?: number) => string[];
310
+ export declare const StringPrototypeStartsWith: (self: unknown, searchString: string, position?: number | undefined) => boolean;
311
+ export declare const StringPrototypeSubstring: (self: unknown, start: number, end?: number | undefined) => string;
312
+ export declare const StringPrototypeToLocaleLowerCase: (self: unknown, locales?: Intl.LocalesArgument) => string;
313
+ export declare const StringPrototypeToLocaleUpperCase: (self: unknown, locales?: Intl.LocalesArgument) => string;
314
+ export declare const StringPrototypeToLowerCase: (self: unknown) => string;
315
+ export declare const StringPrototypeToUpperCase: (self: unknown) => string;
316
+ export declare const StringPrototypeTrim: (self: unknown) => string;
317
+ export declare const StringPrototypeTrimEnd: (self: unknown) => string;
318
+ export declare const StringPrototypeTrimStart: (self: unknown) => string;
319
+ export declare const SymbolAsyncIterator: symbol;
320
+ export declare const SymbolFor: (key: string) => symbol;
321
+ export declare const SymbolIterator: symbol;
322
+ export declare const SymbolToPrimitive: symbol;
323
+ export declare const SymbolToStringTag: symbol;
324
+ export declare const URLSearchParamsPrototypeAppend: (self: unknown, name: string, value: string) => void;
325
+ export declare const URLSearchParamsPrototypeDelete: (self: unknown, name: string, value?: string | undefined) => void;
326
+ export declare const URLSearchParamsPrototypeForEach: <TThis = import("url").URLSearchParams>(self: unknown, fn: (this: TThis, value: string, name: string, searchParams: import("url").URLSearchParams) => void, thisArg?: TThis | undefined) => void;
327
+ export declare const URLSearchParamsPrototypeGet: (self: unknown, name: string) => string | null;
328
+ export declare const URLSearchParamsPrototypeGetAll: (self: unknown, name: string) => string[];
329
+ export declare const URLSearchParamsPrototypeHas: (self: unknown, name: string, value?: string | undefined) => boolean;
330
+ export declare const URLSearchParamsPrototypeSet: (self: unknown, name: string, value: string) => void;
331
+ export declare const WeakMapPrototypeDelete: (self: unknown, key: WeakKey) => boolean;
332
+ export declare const WeakMapPrototypeGet: (self: unknown, key: WeakKey) => any;
333
+ export declare const WeakMapPrototypeHas: (self: unknown, key: WeakKey) => boolean;
334
+ export declare const WeakMapPrototypeSet: (self: unknown, key: WeakKey, value: any) => WeakMap<WeakKey, any>;
335
+ export declare const WeakSetPrototypeAdd: (self: unknown, value: WeakKey) => WeakSet<WeakKey>;
336
+ export declare const WeakSetPrototypeDelete: (self: unknown, value: WeakKey) => boolean;
337
+ export declare const WeakSetPrototypeHas: (self: unknown, value: WeakKey) => boolean;