@socketsecurity/mcp 0.0.18 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +125 -9
- package/dist/index.cjs +963 -867
- package/hooks/socket-gate/index.mts +16 -9
- package/hooks/socket-gate/socket-gate.cjs +94 -94
- package/package.json +18 -13
- package/dist/index.d.ts +0 -4
package/dist/index.cjs
CHANGED
|
@@ -48,12 +48,12 @@ node_process = __toESM(node_process, 1);
|
|
|
48
48
|
let node_fs = require("node:fs");
|
|
49
49
|
let node_path = require("node:path");
|
|
50
50
|
node_path = __toESM(node_path, 1);
|
|
51
|
-
let node_http = require("node:http");
|
|
52
51
|
let node_readline = require("node:readline");
|
|
53
52
|
node_readline = __toESM(node_readline, 1);
|
|
54
53
|
let stream = require("stream");
|
|
55
54
|
let node_crypto = require("node:crypto");
|
|
56
55
|
node_crypto = __toESM(node_crypto, 1);
|
|
56
|
+
let node_http = require("node:http");
|
|
57
57
|
let http2 = require("http2");
|
|
58
58
|
let crypto$1 = require("crypto");
|
|
59
59
|
crypto$1 = __toESM(crypto$1, 1);
|
|
@@ -5212,7 +5212,7 @@ var StdioServerTransport = class {
|
|
|
5212
5212
|
};
|
|
5213
5213
|
|
|
5214
5214
|
//#endregion
|
|
5215
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
5215
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/constants/sentinels.js
|
|
5216
5216
|
var require_sentinels = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5217
5217
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5218
5218
|
/**
|
|
@@ -5246,7 +5246,7 @@ var require_sentinels = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5246
5246
|
}));
|
|
5247
5247
|
|
|
5248
5248
|
//#endregion
|
|
5249
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
5249
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/constants/runtime.js
|
|
5250
5250
|
var require_runtime$11 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5251
5251
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5252
5252
|
/**
|
|
@@ -5277,14 +5277,14 @@ var require_runtime$11 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5277
5277
|
}));
|
|
5278
5278
|
|
|
5279
5279
|
//#endregion
|
|
5280
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
5280
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/node/module.js
|
|
5281
5281
|
var require_module = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5282
5282
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5283
5283
|
const require_constants_runtime = require_runtime$11();
|
|
5284
5284
|
let cachedModule;
|
|
5285
5285
|
function getNodeModule() {
|
|
5286
5286
|
if (!require_constants_runtime.IS_NODE) return;
|
|
5287
|
-
return cachedModule ??= /*@__PURE__*/ require("
|
|
5287
|
+
return cachedModule ??= /*@__PURE__*/ require("module");
|
|
5288
5288
|
}
|
|
5289
5289
|
/**
|
|
5290
5290
|
* Lazy + cached reference to `node:module`'s `isBuiltin(name)`. First call
|
|
@@ -5307,7 +5307,7 @@ var require_module = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5307
5307
|
}));
|
|
5308
5308
|
|
|
5309
5309
|
//#endregion
|
|
5310
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
5310
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/smol/detect.js
|
|
5311
5311
|
var require_detect = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5312
5312
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5313
5313
|
const require_node_module = require_module();
|
|
@@ -5380,7 +5380,7 @@ var require_detect = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5380
5380
|
}));
|
|
5381
5381
|
|
|
5382
5382
|
//#endregion
|
|
5383
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
5383
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/uncurry.js
|
|
5384
5384
|
var require_uncurry = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5385
5385
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5386
5386
|
/**
|
|
@@ -5426,7 +5426,88 @@ var require_uncurry = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5426
5426
|
}));
|
|
5427
5427
|
|
|
5428
5428
|
//#endregion
|
|
5429
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
5429
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/object.js
|
|
5430
|
+
var require_object = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5431
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5432
|
+
const require_primordials_uncurry = require_uncurry();
|
|
5433
|
+
/**
|
|
5434
|
+
* @file Safe references to `Object` static methods and prototype methods. Annex
|
|
5435
|
+
* B legacy accessor methods (`__defineGetter__`, `__lookupGetter__`, etc.)
|
|
5436
|
+
* are exposed alongside the canonical static methods — implementations exist
|
|
5437
|
+
* in V8, SpiderMonkey, and JavaScriptCore even though the spec calls them
|
|
5438
|
+
* "normative optional".
|
|
5439
|
+
*/
|
|
5440
|
+
const ObjectCtor = Object;
|
|
5441
|
+
const ObjectAssign = Object.assign;
|
|
5442
|
+
const ObjectCreate = Object.create;
|
|
5443
|
+
const ObjectDefineProperties = Object.defineProperties;
|
|
5444
|
+
const ObjectDefineProperty = Object.defineProperty;
|
|
5445
|
+
const ObjectEntries = Object.entries;
|
|
5446
|
+
const ObjectFreeze = Object.freeze;
|
|
5447
|
+
const ObjectFromEntries = Object.fromEntries;
|
|
5448
|
+
const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
5449
|
+
const ObjectGetOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
|
|
5450
|
+
const ObjectGetOwnPropertyNames = Object.getOwnPropertyNames;
|
|
5451
|
+
const ObjectGetOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
5452
|
+
const ObjectGetPrototypeOf = Object.getPrototypeOf;
|
|
5453
|
+
const ObjectHasOwn = Object.hasOwn;
|
|
5454
|
+
const ObjectIs = Object.is;
|
|
5455
|
+
const ObjectIsExtensible = Object.isExtensible;
|
|
5456
|
+
const ObjectIsFrozen = Object.isFrozen;
|
|
5457
|
+
const ObjectIsSealed = Object.isSealed;
|
|
5458
|
+
const ObjectKeys = Object.keys;
|
|
5459
|
+
const ObjectPreventExtensions = Object.preventExtensions;
|
|
5460
|
+
const ObjectSeal = Object.seal;
|
|
5461
|
+
const ObjectSetPrototypeOf = Object.setPrototypeOf;
|
|
5462
|
+
const ObjectValues = Object.values;
|
|
5463
|
+
const ObjectPrototype = Object.prototype;
|
|
5464
|
+
const ObjectPrototypeHasOwnProperty = require_primordials_uncurry.uncurryThis(Object.prototype.hasOwnProperty);
|
|
5465
|
+
const ObjectPrototypeIsPrototypeOf = require_primordials_uncurry.uncurryThis(Object.prototype.isPrototypeOf);
|
|
5466
|
+
const ObjectPrototypePropertyIsEnumerable = require_primordials_uncurry.uncurryThis(Object.prototype.propertyIsEnumerable);
|
|
5467
|
+
const ObjectPrototypeToString = require_primordials_uncurry.uncurryThis(Object.prototype.toString);
|
|
5468
|
+
const ObjectPrototypeValueOf = require_primordials_uncurry.uncurryThis(Object.prototype.valueOf);
|
|
5469
|
+
const objectProto = Object.prototype;
|
|
5470
|
+
const ObjectPrototypeDefineGetter = require_primordials_uncurry.uncurryThis(objectProto.__defineGetter__);
|
|
5471
|
+
const ObjectPrototypeDefineSetter = require_primordials_uncurry.uncurryThis(objectProto.__defineSetter__);
|
|
5472
|
+
const ObjectPrototypeLookupGetter = require_primordials_uncurry.uncurryThis(objectProto.__lookupGetter__);
|
|
5473
|
+
const ObjectPrototypeLookupSetter = require_primordials_uncurry.uncurryThis(objectProto.__lookupSetter__);
|
|
5474
|
+
exports.ObjectAssign = ObjectAssign;
|
|
5475
|
+
exports.ObjectCreate = ObjectCreate;
|
|
5476
|
+
exports.ObjectCtor = ObjectCtor;
|
|
5477
|
+
exports.ObjectDefineProperties = ObjectDefineProperties;
|
|
5478
|
+
exports.ObjectDefineProperty = ObjectDefineProperty;
|
|
5479
|
+
exports.ObjectEntries = ObjectEntries;
|
|
5480
|
+
exports.ObjectFreeze = ObjectFreeze;
|
|
5481
|
+
exports.ObjectFromEntries = ObjectFromEntries;
|
|
5482
|
+
exports.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;
|
|
5483
|
+
exports.ObjectGetOwnPropertyDescriptors = ObjectGetOwnPropertyDescriptors;
|
|
5484
|
+
exports.ObjectGetOwnPropertyNames = ObjectGetOwnPropertyNames;
|
|
5485
|
+
exports.ObjectGetOwnPropertySymbols = ObjectGetOwnPropertySymbols;
|
|
5486
|
+
exports.ObjectGetPrototypeOf = ObjectGetPrototypeOf;
|
|
5487
|
+
exports.ObjectHasOwn = ObjectHasOwn;
|
|
5488
|
+
exports.ObjectIs = ObjectIs;
|
|
5489
|
+
exports.ObjectIsExtensible = ObjectIsExtensible;
|
|
5490
|
+
exports.ObjectIsFrozen = ObjectIsFrozen;
|
|
5491
|
+
exports.ObjectIsSealed = ObjectIsSealed;
|
|
5492
|
+
exports.ObjectKeys = ObjectKeys;
|
|
5493
|
+
exports.ObjectPreventExtensions = ObjectPreventExtensions;
|
|
5494
|
+
exports.ObjectPrototype = ObjectPrototype;
|
|
5495
|
+
exports.ObjectPrototypeDefineGetter = ObjectPrototypeDefineGetter;
|
|
5496
|
+
exports.ObjectPrototypeDefineSetter = ObjectPrototypeDefineSetter;
|
|
5497
|
+
exports.ObjectPrototypeHasOwnProperty = ObjectPrototypeHasOwnProperty;
|
|
5498
|
+
exports.ObjectPrototypeIsPrototypeOf = ObjectPrototypeIsPrototypeOf;
|
|
5499
|
+
exports.ObjectPrototypeLookupGetter = ObjectPrototypeLookupGetter;
|
|
5500
|
+
exports.ObjectPrototypeLookupSetter = ObjectPrototypeLookupSetter;
|
|
5501
|
+
exports.ObjectPrototypePropertyIsEnumerable = ObjectPrototypePropertyIsEnumerable;
|
|
5502
|
+
exports.ObjectPrototypeToString = ObjectPrototypeToString;
|
|
5503
|
+
exports.ObjectPrototypeValueOf = ObjectPrototypeValueOf;
|
|
5504
|
+
exports.ObjectSeal = ObjectSeal;
|
|
5505
|
+
exports.ObjectSetPrototypeOf = ObjectSetPrototypeOf;
|
|
5506
|
+
exports.ObjectValues = ObjectValues;
|
|
5507
|
+
}));
|
|
5508
|
+
|
|
5509
|
+
//#endregion
|
|
5510
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/smol/primordial.js
|
|
5430
5511
|
var require_primordial = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5431
5512
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5432
5513
|
const require_node_module = require_module();
|
|
@@ -5464,7 +5545,7 @@ var require_primordial = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5464
5545
|
}));
|
|
5465
5546
|
|
|
5466
5547
|
//#endregion
|
|
5467
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
5548
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/string.js
|
|
5468
5549
|
var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5469
5550
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5470
5551
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -5583,92 +5664,11 @@ var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5583
5664
|
}));
|
|
5584
5665
|
|
|
5585
5666
|
//#endregion
|
|
5586
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
5587
|
-
var require_object = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5588
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5589
|
-
const require_primordials_uncurry = require_uncurry();
|
|
5590
|
-
/**
|
|
5591
|
-
* @file Safe references to `Object` static methods and prototype methods. Annex
|
|
5592
|
-
* B legacy accessor methods (`__defineGetter__`, `__lookupGetter__`, etc.)
|
|
5593
|
-
* are exposed alongside the canonical static methods — implementations exist
|
|
5594
|
-
* in V8, SpiderMonkey, and JavaScriptCore even though the spec calls them
|
|
5595
|
-
* "normative optional".
|
|
5596
|
-
*/
|
|
5597
|
-
const ObjectCtor = Object;
|
|
5598
|
-
const ObjectAssign = Object.assign;
|
|
5599
|
-
const ObjectCreate = Object.create;
|
|
5600
|
-
const ObjectDefineProperties = Object.defineProperties;
|
|
5601
|
-
const ObjectDefineProperty = Object.defineProperty;
|
|
5602
|
-
const ObjectEntries = Object.entries;
|
|
5603
|
-
const ObjectFreeze = Object.freeze;
|
|
5604
|
-
const ObjectFromEntries = Object.fromEntries;
|
|
5605
|
-
const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
5606
|
-
const ObjectGetOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
|
|
5607
|
-
const ObjectGetOwnPropertyNames = Object.getOwnPropertyNames;
|
|
5608
|
-
const ObjectGetOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
5609
|
-
const ObjectGetPrototypeOf = Object.getPrototypeOf;
|
|
5610
|
-
const ObjectHasOwn = Object.hasOwn;
|
|
5611
|
-
const ObjectIs = Object.is;
|
|
5612
|
-
const ObjectIsExtensible = Object.isExtensible;
|
|
5613
|
-
const ObjectIsFrozen = Object.isFrozen;
|
|
5614
|
-
const ObjectIsSealed = Object.isSealed;
|
|
5615
|
-
const ObjectKeys = Object.keys;
|
|
5616
|
-
const ObjectPreventExtensions = Object.preventExtensions;
|
|
5617
|
-
const ObjectSeal = Object.seal;
|
|
5618
|
-
const ObjectSetPrototypeOf = Object.setPrototypeOf;
|
|
5619
|
-
const ObjectValues = Object.values;
|
|
5620
|
-
const ObjectPrototype = Object.prototype;
|
|
5621
|
-
const ObjectPrototypeHasOwnProperty = require_primordials_uncurry.uncurryThis(Object.prototype.hasOwnProperty);
|
|
5622
|
-
const ObjectPrototypeIsPrototypeOf = require_primordials_uncurry.uncurryThis(Object.prototype.isPrototypeOf);
|
|
5623
|
-
const ObjectPrototypePropertyIsEnumerable = require_primordials_uncurry.uncurryThis(Object.prototype.propertyIsEnumerable);
|
|
5624
|
-
const ObjectPrototypeToString = require_primordials_uncurry.uncurryThis(Object.prototype.toString);
|
|
5625
|
-
const ObjectPrototypeValueOf = require_primordials_uncurry.uncurryThis(Object.prototype.valueOf);
|
|
5626
|
-
const objectProto = Object.prototype;
|
|
5627
|
-
const ObjectPrototypeDefineGetter = require_primordials_uncurry.uncurryThis(objectProto.__defineGetter__);
|
|
5628
|
-
const ObjectPrototypeDefineSetter = require_primordials_uncurry.uncurryThis(objectProto.__defineSetter__);
|
|
5629
|
-
const ObjectPrototypeLookupGetter = require_primordials_uncurry.uncurryThis(objectProto.__lookupGetter__);
|
|
5630
|
-
const ObjectPrototypeLookupSetter = require_primordials_uncurry.uncurryThis(objectProto.__lookupSetter__);
|
|
5631
|
-
exports.ObjectAssign = ObjectAssign;
|
|
5632
|
-
exports.ObjectCreate = ObjectCreate;
|
|
5633
|
-
exports.ObjectCtor = ObjectCtor;
|
|
5634
|
-
exports.ObjectDefineProperties = ObjectDefineProperties;
|
|
5635
|
-
exports.ObjectDefineProperty = ObjectDefineProperty;
|
|
5636
|
-
exports.ObjectEntries = ObjectEntries;
|
|
5637
|
-
exports.ObjectFreeze = ObjectFreeze;
|
|
5638
|
-
exports.ObjectFromEntries = ObjectFromEntries;
|
|
5639
|
-
exports.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;
|
|
5640
|
-
exports.ObjectGetOwnPropertyDescriptors = ObjectGetOwnPropertyDescriptors;
|
|
5641
|
-
exports.ObjectGetOwnPropertyNames = ObjectGetOwnPropertyNames;
|
|
5642
|
-
exports.ObjectGetOwnPropertySymbols = ObjectGetOwnPropertySymbols;
|
|
5643
|
-
exports.ObjectGetPrototypeOf = ObjectGetPrototypeOf;
|
|
5644
|
-
exports.ObjectHasOwn = ObjectHasOwn;
|
|
5645
|
-
exports.ObjectIs = ObjectIs;
|
|
5646
|
-
exports.ObjectIsExtensible = ObjectIsExtensible;
|
|
5647
|
-
exports.ObjectIsFrozen = ObjectIsFrozen;
|
|
5648
|
-
exports.ObjectIsSealed = ObjectIsSealed;
|
|
5649
|
-
exports.ObjectKeys = ObjectKeys;
|
|
5650
|
-
exports.ObjectPreventExtensions = ObjectPreventExtensions;
|
|
5651
|
-
exports.ObjectPrototype = ObjectPrototype;
|
|
5652
|
-
exports.ObjectPrototypeDefineGetter = ObjectPrototypeDefineGetter;
|
|
5653
|
-
exports.ObjectPrototypeDefineSetter = ObjectPrototypeDefineSetter;
|
|
5654
|
-
exports.ObjectPrototypeHasOwnProperty = ObjectPrototypeHasOwnProperty;
|
|
5655
|
-
exports.ObjectPrototypeIsPrototypeOf = ObjectPrototypeIsPrototypeOf;
|
|
5656
|
-
exports.ObjectPrototypeLookupGetter = ObjectPrototypeLookupGetter;
|
|
5657
|
-
exports.ObjectPrototypeLookupSetter = ObjectPrototypeLookupSetter;
|
|
5658
|
-
exports.ObjectPrototypePropertyIsEnumerable = ObjectPrototypePropertyIsEnumerable;
|
|
5659
|
-
exports.ObjectPrototypeToString = ObjectPrototypeToString;
|
|
5660
|
-
exports.ObjectPrototypeValueOf = ObjectPrototypeValueOf;
|
|
5661
|
-
exports.ObjectSeal = ObjectSeal;
|
|
5662
|
-
exports.ObjectSetPrototypeOf = ObjectSetPrototypeOf;
|
|
5663
|
-
exports.ObjectValues = ObjectValues;
|
|
5664
|
-
}));
|
|
5665
|
-
|
|
5666
|
-
//#endregion
|
|
5667
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.7/node_modules/@socketsecurity/lib/dist/errors/predicates.js
|
|
5667
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/errors/predicates.js
|
|
5668
5668
|
var require_predicates$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5669
5669
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5670
|
-
const require_primordials_string = require_string();
|
|
5671
5670
|
const require_primordials_object = require_object();
|
|
5671
|
+
const require_primordials_string = require_string();
|
|
5672
5672
|
/**
|
|
5673
5673
|
* @file Error type-guard predicates — `isError` (with the `isErrorBuiltin` /
|
|
5674
5674
|
* `isErrorShim` building blocks) and the libuv errno-code narrower
|
|
@@ -5731,7 +5731,7 @@ var require_predicates$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5731
5731
|
}));
|
|
5732
5732
|
|
|
5733
5733
|
//#endregion
|
|
5734
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
5734
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/map-set.js
|
|
5735
5735
|
var require_map_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5736
5736
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5737
5737
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -5824,7 +5824,7 @@ var require_map_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5824
5824
|
}));
|
|
5825
5825
|
|
|
5826
5826
|
//#endregion
|
|
5827
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
5827
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/external/pony-cause.js
|
|
5828
5828
|
var require_pony_cause$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5829
5829
|
const { SetCtor: _p_SetCtor } = require_map_set();
|
|
5830
5830
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
@@ -5953,7 +5953,7 @@ var require_pony_cause$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5953
5953
|
}));
|
|
5954
5954
|
|
|
5955
5955
|
//#endregion
|
|
5956
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
5956
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/errors/message.js
|
|
5957
5957
|
var require_message = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5958
5958
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5959
5959
|
const require_constants_sentinels = require_sentinels();
|
|
@@ -5995,7 +5995,7 @@ var require_message = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5995
5995
|
}));
|
|
5996
5996
|
|
|
5997
5997
|
//#endregion
|
|
5998
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
5998
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/env/boolean.js
|
|
5999
5999
|
var require_boolean = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6000
6000
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6001
6001
|
/**
|
|
@@ -6038,7 +6038,7 @@ var require_boolean = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6038
6038
|
}));
|
|
6039
6039
|
|
|
6040
6040
|
//#endregion
|
|
6041
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
6041
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/_virtual/_rolldown/runtime.js
|
|
6042
6042
|
var require_runtime$10 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6043
6043
|
var __create = Object.create;
|
|
6044
6044
|
var __defProp = Object.defineProperty;
|
|
@@ -6074,7 +6074,7 @@ var require_runtime$10 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6074
6074
|
}));
|
|
6075
6075
|
|
|
6076
6076
|
//#endregion
|
|
6077
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
6077
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/arrays/predicates.js
|
|
6078
6078
|
var require_predicates$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6079
6079
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6080
6080
|
/**
|
|
@@ -6121,11 +6121,11 @@ var require_predicates$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6121
6121
|
}));
|
|
6122
6122
|
|
|
6123
6123
|
//#endregion
|
|
6124
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
6124
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/objects/predicates.js
|
|
6125
6125
|
var require_predicates$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6126
6126
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6127
|
-
const require_primordials_object = require_object();
|
|
6128
6127
|
const require_arrays_predicates = require_predicates$3();
|
|
6128
|
+
const require_primordials_object = require_object();
|
|
6129
6129
|
/**
|
|
6130
6130
|
* @file Object type guards: `hasKeys`, `hasOwn`, `isObject`, `isPlainObject`.
|
|
6131
6131
|
* All four narrow `unknown` to a typed shape and tolerate `null` /
|
|
@@ -6237,14 +6237,14 @@ var require_predicates$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6237
6237
|
}));
|
|
6238
6238
|
|
|
6239
6239
|
//#endregion
|
|
6240
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
6240
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/env/rewire.js
|
|
6241
6241
|
var require_rewire$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6242
6242
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6243
6243
|
const require_runtime$9 = require_runtime$10();
|
|
6244
|
-
const require_primordials_map_set = require_map_set();
|
|
6245
6244
|
const require_primordials_object = require_object();
|
|
6246
6245
|
const require_objects_predicates = require_predicates$2();
|
|
6247
6246
|
const require_env_boolean = require_boolean();
|
|
6247
|
+
const require_primordials_map_set = require_map_set();
|
|
6248
6248
|
let node_process$4 = require("node:process");
|
|
6249
6249
|
node_process$4 = require_runtime$9.__toESM(node_process$4);
|
|
6250
6250
|
/**
|
|
@@ -6463,7 +6463,7 @@ var require_rewire$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6463
6463
|
}));
|
|
6464
6464
|
|
|
6465
6465
|
//#endregion
|
|
6466
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
6466
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/number.js
|
|
6467
6467
|
var require_number$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6468
6468
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6469
6469
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -6518,7 +6518,7 @@ var require_number$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6518
6518
|
}));
|
|
6519
6519
|
|
|
6520
6520
|
//#endregion
|
|
6521
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
6521
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/env/number.js
|
|
6522
6522
|
var require_number = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6523
6523
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6524
6524
|
const require_primordials_number = require_number$1();
|
|
@@ -6569,7 +6569,7 @@ var require_number = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6569
6569
|
}));
|
|
6570
6570
|
|
|
6571
6571
|
//#endregion
|
|
6572
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
6572
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/env/socket-mcp.js
|
|
6573
6573
|
var require_socket_mcp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6574
6574
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6575
6575
|
const require_primordials_number = require_number$1();
|
|
@@ -6714,7 +6714,7 @@ var require_socket_mcp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6714
6714
|
}));
|
|
6715
6715
|
|
|
6716
6716
|
//#endregion
|
|
6717
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
6717
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/env/socket.js
|
|
6718
6718
|
var require_socket$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6719
6719
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6720
6720
|
const require_env_boolean = require_boolean();
|
|
@@ -7091,6 +7091,15 @@ var require_socket$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7091
7091
|
return require_env_rewire.getEnvValue("SOCKET_REPOSITORY_NAME") || require_env_rewire.getEnvValue("SOCKET_REPO_NAME");
|
|
7092
7092
|
}
|
|
7093
7093
|
/**
|
|
7094
|
+
* SOCKET_STATE_DIR environment variable getter. Overrides the default Socket
|
|
7095
|
+
* state directory (~/.socket/_state) location.
|
|
7096
|
+
*
|
|
7097
|
+
* @returns The state directory path, or `undefined` if not set
|
|
7098
|
+
*/
|
|
7099
|
+
function getSocketStateDirEnv() {
|
|
7100
|
+
return require_env_rewire.getEnvValue("SOCKET_STATE_DIR");
|
|
7101
|
+
}
|
|
7102
|
+
/**
|
|
7094
7103
|
* SOCKET_VIEW_ALL_RISKS environment variable getter. Whether to view all Socket
|
|
7095
7104
|
* Security risks.
|
|
7096
7105
|
*
|
|
@@ -7137,6 +7146,7 @@ var require_socket$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7137
7146
|
exports.getSocketOrgSlug = getSocketOrgSlug;
|
|
7138
7147
|
exports.getSocketRegistryUrl = getSocketRegistryUrl;
|
|
7139
7148
|
exports.getSocketRepositoryName = getSocketRepositoryName;
|
|
7149
|
+
exports.getSocketStateDirEnv = getSocketStateDirEnv;
|
|
7140
7150
|
exports.getSocketViewAllRisks = getSocketViewAllRisks;
|
|
7141
7151
|
exports.getTrustProxy = require_env_socket_mcp.getTrustProxy;
|
|
7142
7152
|
}));
|
|
@@ -15263,181 +15273,6 @@ const Hint = Symbol.for("TypeBox.Hint");
|
|
|
15263
15273
|
/** Symbol key applied to types */
|
|
15264
15274
|
const Kind = Symbol.for("TypeBox.Kind");
|
|
15265
15275
|
|
|
15266
|
-
//#endregion
|
|
15267
|
-
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
|
|
15268
|
-
/** `[Kind-Only]` Returns true if this value has a Readonly symbol */
|
|
15269
|
-
function IsReadonly(value) {
|
|
15270
|
-
return IsObject$3(value) && value[ReadonlyKind] === "Readonly";
|
|
15271
|
-
}
|
|
15272
|
-
/** `[Kind-Only]` Returns true if this value has a Optional symbol */
|
|
15273
|
-
function IsOptional$1(value) {
|
|
15274
|
-
return IsObject$3(value) && value[OptionalKind] === "Optional";
|
|
15275
|
-
}
|
|
15276
|
-
/** `[Kind-Only]` Returns true if the given value is TAny */
|
|
15277
|
-
function IsAny$1(value) {
|
|
15278
|
-
return IsKindOf$1(value, "Any");
|
|
15279
|
-
}
|
|
15280
|
-
/** `[Kind-Only]` Returns true if the given value is TArgument */
|
|
15281
|
-
function IsArgument$1(value) {
|
|
15282
|
-
return IsKindOf$1(value, "Argument");
|
|
15283
|
-
}
|
|
15284
|
-
/** `[Kind-Only]` Returns true if the given value is TArray */
|
|
15285
|
-
function IsArray$1(value) {
|
|
15286
|
-
return IsKindOf$1(value, "Array");
|
|
15287
|
-
}
|
|
15288
|
-
/** `[Kind-Only]` Returns true if the given value is TAsyncIterator */
|
|
15289
|
-
function IsAsyncIterator$1(value) {
|
|
15290
|
-
return IsKindOf$1(value, "AsyncIterator");
|
|
15291
|
-
}
|
|
15292
|
-
/** `[Kind-Only]` Returns true if the given value is TBigInt */
|
|
15293
|
-
function IsBigInt$1(value) {
|
|
15294
|
-
return IsKindOf$1(value, "BigInt");
|
|
15295
|
-
}
|
|
15296
|
-
/** `[Kind-Only]` Returns true if the given value is TBoolean */
|
|
15297
|
-
function IsBoolean$1(value) {
|
|
15298
|
-
return IsKindOf$1(value, "Boolean");
|
|
15299
|
-
}
|
|
15300
|
-
/** `[Kind-Only]` Returns true if the given value is TComputed */
|
|
15301
|
-
function IsComputed$1(value) {
|
|
15302
|
-
return IsKindOf$1(value, "Computed");
|
|
15303
|
-
}
|
|
15304
|
-
/** `[Kind-Only]` Returns true if the given value is TConstructor */
|
|
15305
|
-
function IsConstructor$1(value) {
|
|
15306
|
-
return IsKindOf$1(value, "Constructor");
|
|
15307
|
-
}
|
|
15308
|
-
/** `[Kind-Only]` Returns true if the given value is TDate */
|
|
15309
|
-
function IsDate$1(value) {
|
|
15310
|
-
return IsKindOf$1(value, "Date");
|
|
15311
|
-
}
|
|
15312
|
-
/** `[Kind-Only]` Returns true if the given value is TFunction */
|
|
15313
|
-
function IsFunction$1(value) {
|
|
15314
|
-
return IsKindOf$1(value, "Function");
|
|
15315
|
-
}
|
|
15316
|
-
/** `[Kind-Only]` Returns true if the given value is TInteger */
|
|
15317
|
-
function IsInteger$1(value) {
|
|
15318
|
-
return IsKindOf$1(value, "Integer");
|
|
15319
|
-
}
|
|
15320
|
-
/** `[Kind-Only]` Returns true if the given value is TIntersect */
|
|
15321
|
-
function IsIntersect$1(value) {
|
|
15322
|
-
return IsKindOf$1(value, "Intersect");
|
|
15323
|
-
}
|
|
15324
|
-
/** `[Kind-Only]` Returns true if the given value is TIterator */
|
|
15325
|
-
function IsIterator$1(value) {
|
|
15326
|
-
return IsKindOf$1(value, "Iterator");
|
|
15327
|
-
}
|
|
15328
|
-
/** `[Kind-Only]` Returns true if the given value is a TKind with the given name. */
|
|
15329
|
-
function IsKindOf$1(value, kind) {
|
|
15330
|
-
return IsObject$3(value) && Kind in value && value[Kind] === kind;
|
|
15331
|
-
}
|
|
15332
|
-
/** `[Kind-Only]` Returns true if the given value is TLiteralValue */
|
|
15333
|
-
function IsLiteralValue$1(value) {
|
|
15334
|
-
return IsBoolean$2(value) || IsNumber$3(value) || IsString$2(value);
|
|
15335
|
-
}
|
|
15336
|
-
/** `[Kind-Only]` Returns true if the given value is TLiteral */
|
|
15337
|
-
function IsLiteral$1(value) {
|
|
15338
|
-
return IsKindOf$1(value, "Literal");
|
|
15339
|
-
}
|
|
15340
|
-
/** `[Kind-Only]` Returns true if the given value is a TMappedKey */
|
|
15341
|
-
function IsMappedKey$1(value) {
|
|
15342
|
-
return IsKindOf$1(value, "MappedKey");
|
|
15343
|
-
}
|
|
15344
|
-
/** `[Kind-Only]` Returns true if the given value is TMappedResult */
|
|
15345
|
-
function IsMappedResult$1(value) {
|
|
15346
|
-
return IsKindOf$1(value, "MappedResult");
|
|
15347
|
-
}
|
|
15348
|
-
/** `[Kind-Only]` Returns true if the given value is TNever */
|
|
15349
|
-
function IsNever$1(value) {
|
|
15350
|
-
return IsKindOf$1(value, "Never");
|
|
15351
|
-
}
|
|
15352
|
-
/** `[Kind-Only]` Returns true if the given value is TNot */
|
|
15353
|
-
function IsNot$1(value) {
|
|
15354
|
-
return IsKindOf$1(value, "Not");
|
|
15355
|
-
}
|
|
15356
|
-
/** `[Kind-Only]` Returns true if the given value is TNull */
|
|
15357
|
-
function IsNull$1(value) {
|
|
15358
|
-
return IsKindOf$1(value, "Null");
|
|
15359
|
-
}
|
|
15360
|
-
/** `[Kind-Only]` Returns true if the given value is TNumber */
|
|
15361
|
-
function IsNumber$1(value) {
|
|
15362
|
-
return IsKindOf$1(value, "Number");
|
|
15363
|
-
}
|
|
15364
|
-
/** `[Kind-Only]` Returns true if the given value is TObject */
|
|
15365
|
-
function IsObject$1(value) {
|
|
15366
|
-
return IsKindOf$1(value, "Object");
|
|
15367
|
-
}
|
|
15368
|
-
/** `[Kind-Only]` Returns true if the given value is TPromise */
|
|
15369
|
-
function IsPromise$1(value) {
|
|
15370
|
-
return IsKindOf$1(value, "Promise");
|
|
15371
|
-
}
|
|
15372
|
-
/** `[Kind-Only]` Returns true if the given value is TRecord */
|
|
15373
|
-
function IsRecord$1(value) {
|
|
15374
|
-
return IsKindOf$1(value, "Record");
|
|
15375
|
-
}
|
|
15376
|
-
/** `[Kind-Only]` Returns true if the given value is TRef */
|
|
15377
|
-
function IsRef$1(value) {
|
|
15378
|
-
return IsKindOf$1(value, "Ref");
|
|
15379
|
-
}
|
|
15380
|
-
/** `[Kind-Only]` Returns true if the given value is TRegExp */
|
|
15381
|
-
function IsRegExp$1(value) {
|
|
15382
|
-
return IsKindOf$1(value, "RegExp");
|
|
15383
|
-
}
|
|
15384
|
-
/** `[Kind-Only]` Returns true if the given value is TString */
|
|
15385
|
-
function IsString$1(value) {
|
|
15386
|
-
return IsKindOf$1(value, "String");
|
|
15387
|
-
}
|
|
15388
|
-
/** `[Kind-Only]` Returns true if the given value is TSymbol */
|
|
15389
|
-
function IsSymbol$1(value) {
|
|
15390
|
-
return IsKindOf$1(value, "Symbol");
|
|
15391
|
-
}
|
|
15392
|
-
/** `[Kind-Only]` Returns true if the given value is TTemplateLiteral */
|
|
15393
|
-
function IsTemplateLiteral$1(value) {
|
|
15394
|
-
return IsKindOf$1(value, "TemplateLiteral");
|
|
15395
|
-
}
|
|
15396
|
-
/** `[Kind-Only]` Returns true if the given value is TThis */
|
|
15397
|
-
function IsThis$1(value) {
|
|
15398
|
-
return IsKindOf$1(value, "This");
|
|
15399
|
-
}
|
|
15400
|
-
/** `[Kind-Only]` Returns true of this value is TTransform */
|
|
15401
|
-
function IsTransform$1(value) {
|
|
15402
|
-
return IsObject$3(value) && TransformKind in value;
|
|
15403
|
-
}
|
|
15404
|
-
/** `[Kind-Only]` Returns true if the given value is TTuple */
|
|
15405
|
-
function IsTuple$1(value) {
|
|
15406
|
-
return IsKindOf$1(value, "Tuple");
|
|
15407
|
-
}
|
|
15408
|
-
/** `[Kind-Only]` Returns true if the given value is TUndefined */
|
|
15409
|
-
function IsUndefined$1(value) {
|
|
15410
|
-
return IsKindOf$1(value, "Undefined");
|
|
15411
|
-
}
|
|
15412
|
-
/** `[Kind-Only]` Returns true if the given value is TUnion */
|
|
15413
|
-
function IsUnion$1(value) {
|
|
15414
|
-
return IsKindOf$1(value, "Union");
|
|
15415
|
-
}
|
|
15416
|
-
/** `[Kind-Only]` Returns true if the given value is TUint8Array */
|
|
15417
|
-
function IsUint8Array$1(value) {
|
|
15418
|
-
return IsKindOf$1(value, "Uint8Array");
|
|
15419
|
-
}
|
|
15420
|
-
/** `[Kind-Only]` Returns true if the given value is TUnknown */
|
|
15421
|
-
function IsUnknown$1(value) {
|
|
15422
|
-
return IsKindOf$1(value, "Unknown");
|
|
15423
|
-
}
|
|
15424
|
-
/** `[Kind-Only]` Returns true if the given value is a raw TUnsafe */
|
|
15425
|
-
function IsUnsafe$1(value) {
|
|
15426
|
-
return IsKindOf$1(value, "Unsafe");
|
|
15427
|
-
}
|
|
15428
|
-
/** `[Kind-Only]` Returns true if the given value is TVoid */
|
|
15429
|
-
function IsVoid$1(value) {
|
|
15430
|
-
return IsKindOf$1(value, "Void");
|
|
15431
|
-
}
|
|
15432
|
-
/** `[Kind-Only]` Returns true if the given value is TKind */
|
|
15433
|
-
function IsKind$1(value) {
|
|
15434
|
-
return IsObject$3(value) && Kind in value && IsString$2(value[Kind]);
|
|
15435
|
-
}
|
|
15436
|
-
/** `[Kind-Only]` Returns true if the given value is TSchema */
|
|
15437
|
-
function IsSchema$1(value) {
|
|
15438
|
-
return IsAny$1(value) || IsArgument$1(value) || IsArray$1(value) || IsBoolean$1(value) || IsBigInt$1(value) || IsAsyncIterator$1(value) || IsComputed$1(value) || IsConstructor$1(value) || IsDate$1(value) || IsFunction$1(value) || IsInteger$1(value) || IsIntersect$1(value) || IsIterator$1(value) || IsLiteral$1(value) || IsMappedKey$1(value) || IsMappedResult$1(value) || IsNever$1(value) || IsNot$1(value) || IsNull$1(value) || IsNumber$1(value) || IsObject$1(value) || IsPromise$1(value) || IsRecord$1(value) || IsRef$1(value) || IsRegExp$1(value) || IsString$1(value) || IsSymbol$1(value) || IsTemplateLiteral$1(value) || IsThis$1(value) || IsTuple$1(value) || IsUndefined$1(value) || IsUnion$1(value) || IsUint8Array$1(value) || IsUnknown$1(value) || IsUnsafe$1(value) || IsVoid$1(value) || IsKind$1(value);
|
|
15439
|
-
}
|
|
15440
|
-
|
|
15441
15276
|
//#endregion
|
|
15442
15277
|
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
|
|
15443
15278
|
const KnownTypes = [
|
|
@@ -15494,7 +15329,7 @@ function IsControlCharacterFree(value) {
|
|
|
15494
15329
|
return true;
|
|
15495
15330
|
}
|
|
15496
15331
|
function IsAdditionalProperties(value) {
|
|
15497
|
-
return IsOptionalBoolean(value) || IsSchema(value);
|
|
15332
|
+
return IsOptionalBoolean(value) || IsSchema$1(value);
|
|
15498
15333
|
}
|
|
15499
15334
|
function IsOptionalBigInt(value) {
|
|
15500
15335
|
return IsUndefined$3(value) || IsBigInt$2(value);
|
|
@@ -15515,194 +15350,194 @@ function IsOptionalFormat(value) {
|
|
|
15515
15350
|
return IsUndefined$3(value) || IsString$2(value) && IsControlCharacterFree(value);
|
|
15516
15351
|
}
|
|
15517
15352
|
function IsOptionalSchema(value) {
|
|
15518
|
-
return IsUndefined$3(value) || IsSchema(value);
|
|
15353
|
+
return IsUndefined$3(value) || IsSchema$1(value);
|
|
15519
15354
|
}
|
|
15520
15355
|
/** Returns true if this value has a Optional symbol */
|
|
15521
|
-
function IsOptional(value) {
|
|
15356
|
+
function IsOptional$1(value) {
|
|
15522
15357
|
return IsObject$3(value) && value[OptionalKind] === "Optional";
|
|
15523
15358
|
}
|
|
15524
15359
|
/** Returns true if the given value is TAny */
|
|
15525
|
-
function IsAny(value) {
|
|
15526
|
-
return IsKindOf(value, "Any") && IsOptionalString(value.$id);
|
|
15360
|
+
function IsAny$1(value) {
|
|
15361
|
+
return IsKindOf$1(value, "Any") && IsOptionalString(value.$id);
|
|
15527
15362
|
}
|
|
15528
15363
|
/** Returns true if the given value is TArgument */
|
|
15529
|
-
function IsArgument(value) {
|
|
15530
|
-
return IsKindOf(value, "Argument") && IsNumber$3(value.index);
|
|
15364
|
+
function IsArgument$1(value) {
|
|
15365
|
+
return IsKindOf$1(value, "Argument") && IsNumber$3(value.index);
|
|
15531
15366
|
}
|
|
15532
15367
|
/** Returns true if the given value is TArray */
|
|
15533
|
-
function IsArray(value) {
|
|
15534
|
-
return IsKindOf(value, "Array") && value.type === "array" && IsOptionalString(value.$id) && IsSchema(value.items) && IsOptionalNumber(value.minItems) && IsOptionalNumber(value.maxItems) && IsOptionalBoolean(value.uniqueItems) && IsOptionalSchema(value.contains) && IsOptionalNumber(value.minContains) && IsOptionalNumber(value.maxContains);
|
|
15368
|
+
function IsArray$1(value) {
|
|
15369
|
+
return IsKindOf$1(value, "Array") && value.type === "array" && IsOptionalString(value.$id) && IsSchema$1(value.items) && IsOptionalNumber(value.minItems) && IsOptionalNumber(value.maxItems) && IsOptionalBoolean(value.uniqueItems) && IsOptionalSchema(value.contains) && IsOptionalNumber(value.minContains) && IsOptionalNumber(value.maxContains);
|
|
15535
15370
|
}
|
|
15536
15371
|
/** Returns true if the given value is TAsyncIterator */
|
|
15537
|
-
function IsAsyncIterator(value) {
|
|
15538
|
-
return IsKindOf(value, "AsyncIterator") && value.type === "AsyncIterator" && IsOptionalString(value.$id) && IsSchema(value.items);
|
|
15372
|
+
function IsAsyncIterator$1(value) {
|
|
15373
|
+
return IsKindOf$1(value, "AsyncIterator") && value.type === "AsyncIterator" && IsOptionalString(value.$id) && IsSchema$1(value.items);
|
|
15539
15374
|
}
|
|
15540
15375
|
/** Returns true if the given value is TBigInt */
|
|
15541
|
-
function IsBigInt(value) {
|
|
15542
|
-
return IsKindOf(value, "BigInt") && value.type === "bigint" && IsOptionalString(value.$id) && IsOptionalBigInt(value.exclusiveMaximum) && IsOptionalBigInt(value.exclusiveMinimum) && IsOptionalBigInt(value.maximum) && IsOptionalBigInt(value.minimum) && IsOptionalBigInt(value.multipleOf);
|
|
15376
|
+
function IsBigInt$1(value) {
|
|
15377
|
+
return IsKindOf$1(value, "BigInt") && value.type === "bigint" && IsOptionalString(value.$id) && IsOptionalBigInt(value.exclusiveMaximum) && IsOptionalBigInt(value.exclusiveMinimum) && IsOptionalBigInt(value.maximum) && IsOptionalBigInt(value.minimum) && IsOptionalBigInt(value.multipleOf);
|
|
15543
15378
|
}
|
|
15544
15379
|
/** Returns true if the given value is TBoolean */
|
|
15545
|
-
function IsBoolean(value) {
|
|
15546
|
-
return IsKindOf(value, "Boolean") && value.type === "boolean" && IsOptionalString(value.$id);
|
|
15380
|
+
function IsBoolean$1(value) {
|
|
15381
|
+
return IsKindOf$1(value, "Boolean") && value.type === "boolean" && IsOptionalString(value.$id);
|
|
15547
15382
|
}
|
|
15548
15383
|
/** Returns true if the given value is TComputed */
|
|
15549
|
-
function IsComputed(value) {
|
|
15550
|
-
return IsKindOf(value, "Computed") && IsString$2(value.target) && IsArray$3(value.parameters) && value.parameters.every((schema) => IsSchema(schema));
|
|
15384
|
+
function IsComputed$1(value) {
|
|
15385
|
+
return IsKindOf$1(value, "Computed") && IsString$2(value.target) && IsArray$3(value.parameters) && value.parameters.every((schema) => IsSchema$1(schema));
|
|
15551
15386
|
}
|
|
15552
15387
|
/** Returns true if the given value is TConstructor */
|
|
15553
|
-
function IsConstructor(value) {
|
|
15554
|
-
return IsKindOf(value, "Constructor") && value.type === "Constructor" && IsOptionalString(value.$id) && IsArray$3(value.parameters) && value.parameters.every((schema) => IsSchema(schema)) && IsSchema(value.returns);
|
|
15388
|
+
function IsConstructor$1(value) {
|
|
15389
|
+
return IsKindOf$1(value, "Constructor") && value.type === "Constructor" && IsOptionalString(value.$id) && IsArray$3(value.parameters) && value.parameters.every((schema) => IsSchema$1(schema)) && IsSchema$1(value.returns);
|
|
15555
15390
|
}
|
|
15556
15391
|
/** Returns true if the given value is TDate */
|
|
15557
|
-
function IsDate(value) {
|
|
15558
|
-
return IsKindOf(value, "Date") && value.type === "Date" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximumTimestamp) && IsOptionalNumber(value.exclusiveMinimumTimestamp) && IsOptionalNumber(value.maximumTimestamp) && IsOptionalNumber(value.minimumTimestamp) && IsOptionalNumber(value.multipleOfTimestamp);
|
|
15392
|
+
function IsDate$1(value) {
|
|
15393
|
+
return IsKindOf$1(value, "Date") && value.type === "Date" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximumTimestamp) && IsOptionalNumber(value.exclusiveMinimumTimestamp) && IsOptionalNumber(value.maximumTimestamp) && IsOptionalNumber(value.minimumTimestamp) && IsOptionalNumber(value.multipleOfTimestamp);
|
|
15559
15394
|
}
|
|
15560
15395
|
/** Returns true if the given value is TFunction */
|
|
15561
|
-
function IsFunction(value) {
|
|
15562
|
-
return IsKindOf(value, "Function") && value.type === "Function" && IsOptionalString(value.$id) && IsArray$3(value.parameters) && value.parameters.every((schema) => IsSchema(schema)) && IsSchema(value.returns);
|
|
15396
|
+
function IsFunction$1(value) {
|
|
15397
|
+
return IsKindOf$1(value, "Function") && value.type === "Function" && IsOptionalString(value.$id) && IsArray$3(value.parameters) && value.parameters.every((schema) => IsSchema$1(schema)) && IsSchema$1(value.returns);
|
|
15563
15398
|
}
|
|
15564
15399
|
/** Returns true if the given value is TInteger */
|
|
15565
|
-
function IsInteger(value) {
|
|
15566
|
-
return IsKindOf(value, "Integer") && value.type === "integer" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximum) && IsOptionalNumber(value.exclusiveMinimum) && IsOptionalNumber(value.maximum) && IsOptionalNumber(value.minimum) && IsOptionalNumber(value.multipleOf);
|
|
15400
|
+
function IsInteger$1(value) {
|
|
15401
|
+
return IsKindOf$1(value, "Integer") && value.type === "integer" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximum) && IsOptionalNumber(value.exclusiveMinimum) && IsOptionalNumber(value.maximum) && IsOptionalNumber(value.minimum) && IsOptionalNumber(value.multipleOf);
|
|
15567
15402
|
}
|
|
15568
15403
|
/** Returns true if the given schema is TProperties */
|
|
15569
15404
|
function IsProperties(value) {
|
|
15570
|
-
return IsObject$3(value) && Object.entries(value).every(([key, schema]) => IsControlCharacterFree(key) && IsSchema(schema));
|
|
15405
|
+
return IsObject$3(value) && Object.entries(value).every(([key, schema]) => IsControlCharacterFree(key) && IsSchema$1(schema));
|
|
15571
15406
|
}
|
|
15572
15407
|
/** Returns true if the given value is TIntersect */
|
|
15573
|
-
function IsIntersect(value) {
|
|
15574
|
-
return IsKindOf(value, "Intersect") && (IsString$2(value.type) && value.type !== "object" ? false : true) && IsArray$3(value.allOf) && value.allOf.every((schema) => IsSchema(schema) && !IsTransform(schema)) && IsOptionalString(value.type) && (IsOptionalBoolean(value.unevaluatedProperties) || IsOptionalSchema(value.unevaluatedProperties)) && IsOptionalString(value.$id);
|
|
15408
|
+
function IsIntersect$1(value) {
|
|
15409
|
+
return IsKindOf$1(value, "Intersect") && (IsString$2(value.type) && value.type !== "object" ? false : true) && IsArray$3(value.allOf) && value.allOf.every((schema) => IsSchema$1(schema) && !IsTransform$1(schema)) && IsOptionalString(value.type) && (IsOptionalBoolean(value.unevaluatedProperties) || IsOptionalSchema(value.unevaluatedProperties)) && IsOptionalString(value.$id);
|
|
15575
15410
|
}
|
|
15576
15411
|
/** Returns true if the given value is TIterator */
|
|
15577
|
-
function IsIterator(value) {
|
|
15578
|
-
return IsKindOf(value, "Iterator") && value.type === "Iterator" && IsOptionalString(value.$id) && IsSchema(value.items);
|
|
15412
|
+
function IsIterator$1(value) {
|
|
15413
|
+
return IsKindOf$1(value, "Iterator") && value.type === "Iterator" && IsOptionalString(value.$id) && IsSchema$1(value.items);
|
|
15579
15414
|
}
|
|
15580
15415
|
/** Returns true if the given value is a TKind with the given name. */
|
|
15581
|
-
function IsKindOf(value, kind) {
|
|
15416
|
+
function IsKindOf$1(value, kind) {
|
|
15582
15417
|
return IsObject$3(value) && Kind in value && value[Kind] === kind;
|
|
15583
15418
|
}
|
|
15584
15419
|
/** Returns true if the given value is TLiteral<string> */
|
|
15585
15420
|
function IsLiteralString(value) {
|
|
15586
|
-
return IsLiteral(value) && IsString$2(value.const);
|
|
15421
|
+
return IsLiteral$1(value) && IsString$2(value.const);
|
|
15587
15422
|
}
|
|
15588
15423
|
/** Returns true if the given value is TLiteral<number> */
|
|
15589
15424
|
function IsLiteralNumber(value) {
|
|
15590
|
-
return IsLiteral(value) && IsNumber$3(value.const);
|
|
15425
|
+
return IsLiteral$1(value) && IsNumber$3(value.const);
|
|
15591
15426
|
}
|
|
15592
15427
|
/** Returns true if the given value is TLiteral<boolean> */
|
|
15593
15428
|
function IsLiteralBoolean(value) {
|
|
15594
|
-
return IsLiteral(value) && IsBoolean$2(value.const);
|
|
15429
|
+
return IsLiteral$1(value) && IsBoolean$2(value.const);
|
|
15595
15430
|
}
|
|
15596
15431
|
/** Returns true if the given value is TLiteral */
|
|
15597
|
-
function IsLiteral(value) {
|
|
15598
|
-
return IsKindOf(value, "Literal") && IsOptionalString(value.$id) && IsLiteralValue(value.const);
|
|
15432
|
+
function IsLiteral$1(value) {
|
|
15433
|
+
return IsKindOf$1(value, "Literal") && IsOptionalString(value.$id) && IsLiteralValue$1(value.const);
|
|
15599
15434
|
}
|
|
15600
15435
|
/** Returns true if the given value is a TLiteralValue */
|
|
15601
|
-
function IsLiteralValue(value) {
|
|
15436
|
+
function IsLiteralValue$1(value) {
|
|
15602
15437
|
return IsBoolean$2(value) || IsNumber$3(value) || IsString$2(value);
|
|
15603
15438
|
}
|
|
15604
15439
|
/** Returns true if the given value is a TMappedKey */
|
|
15605
|
-
function IsMappedKey(value) {
|
|
15606
|
-
return IsKindOf(value, "MappedKey") && IsArray$3(value.keys) && value.keys.every((key) => IsNumber$3(key) || IsString$2(key));
|
|
15440
|
+
function IsMappedKey$1(value) {
|
|
15441
|
+
return IsKindOf$1(value, "MappedKey") && IsArray$3(value.keys) && value.keys.every((key) => IsNumber$3(key) || IsString$2(key));
|
|
15607
15442
|
}
|
|
15608
15443
|
/** Returns true if the given value is TMappedResult */
|
|
15609
|
-
function IsMappedResult(value) {
|
|
15610
|
-
return IsKindOf(value, "MappedResult") && IsProperties(value.properties);
|
|
15444
|
+
function IsMappedResult$1(value) {
|
|
15445
|
+
return IsKindOf$1(value, "MappedResult") && IsProperties(value.properties);
|
|
15611
15446
|
}
|
|
15612
15447
|
/** Returns true if the given value is TNever */
|
|
15613
|
-
function IsNever(value) {
|
|
15614
|
-
return IsKindOf(value, "Never") && IsObject$3(value.not) && Object.getOwnPropertyNames(value.not).length === 0;
|
|
15448
|
+
function IsNever$1(value) {
|
|
15449
|
+
return IsKindOf$1(value, "Never") && IsObject$3(value.not) && Object.getOwnPropertyNames(value.not).length === 0;
|
|
15615
15450
|
}
|
|
15616
15451
|
/** Returns true if the given value is TNot */
|
|
15617
|
-
function IsNot(value) {
|
|
15618
|
-
return IsKindOf(value, "Not") && IsSchema(value.not);
|
|
15452
|
+
function IsNot$1(value) {
|
|
15453
|
+
return IsKindOf$1(value, "Not") && IsSchema$1(value.not);
|
|
15619
15454
|
}
|
|
15620
15455
|
/** Returns true if the given value is TNull */
|
|
15621
|
-
function IsNull(value) {
|
|
15622
|
-
return IsKindOf(value, "Null") && value.type === "null" && IsOptionalString(value.$id);
|
|
15456
|
+
function IsNull$1(value) {
|
|
15457
|
+
return IsKindOf$1(value, "Null") && value.type === "null" && IsOptionalString(value.$id);
|
|
15623
15458
|
}
|
|
15624
15459
|
/** Returns true if the given value is TNumber */
|
|
15625
|
-
function IsNumber(value) {
|
|
15626
|
-
return IsKindOf(value, "Number") && value.type === "number" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximum) && IsOptionalNumber(value.exclusiveMinimum) && IsOptionalNumber(value.maximum) && IsOptionalNumber(value.minimum) && IsOptionalNumber(value.multipleOf);
|
|
15460
|
+
function IsNumber$1(value) {
|
|
15461
|
+
return IsKindOf$1(value, "Number") && value.type === "number" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximum) && IsOptionalNumber(value.exclusiveMinimum) && IsOptionalNumber(value.maximum) && IsOptionalNumber(value.minimum) && IsOptionalNumber(value.multipleOf);
|
|
15627
15462
|
}
|
|
15628
15463
|
/** Returns true if the given value is TObject */
|
|
15629
|
-
function IsObject(value) {
|
|
15630
|
-
return IsKindOf(value, "Object") && value.type === "object" && IsOptionalString(value.$id) && IsProperties(value.properties) && IsAdditionalProperties(value.additionalProperties) && IsOptionalNumber(value.minProperties) && IsOptionalNumber(value.maxProperties);
|
|
15464
|
+
function IsObject$1(value) {
|
|
15465
|
+
return IsKindOf$1(value, "Object") && value.type === "object" && IsOptionalString(value.$id) && IsProperties(value.properties) && IsAdditionalProperties(value.additionalProperties) && IsOptionalNumber(value.minProperties) && IsOptionalNumber(value.maxProperties);
|
|
15631
15466
|
}
|
|
15632
15467
|
/** Returns true if the given value is TPromise */
|
|
15633
|
-
function IsPromise(value) {
|
|
15634
|
-
return IsKindOf(value, "Promise") && value.type === "Promise" && IsOptionalString(value.$id) && IsSchema(value.item);
|
|
15468
|
+
function IsPromise$1(value) {
|
|
15469
|
+
return IsKindOf$1(value, "Promise") && value.type === "Promise" && IsOptionalString(value.$id) && IsSchema$1(value.item);
|
|
15635
15470
|
}
|
|
15636
15471
|
/** Returns true if the given value is TRecord */
|
|
15637
|
-
function IsRecord(value) {
|
|
15638
|
-
return IsKindOf(value, "Record") && value.type === "object" && IsOptionalString(value.$id) && IsAdditionalProperties(value.additionalProperties) && IsObject$3(value.patternProperties) && ((schema) => {
|
|
15472
|
+
function IsRecord$1(value) {
|
|
15473
|
+
return IsKindOf$1(value, "Record") && value.type === "object" && IsOptionalString(value.$id) && IsAdditionalProperties(value.additionalProperties) && IsObject$3(value.patternProperties) && ((schema) => {
|
|
15639
15474
|
const keys = Object.getOwnPropertyNames(schema.patternProperties);
|
|
15640
|
-
return keys.length === 1 && IsPattern(keys[0]) && IsObject$3(schema.patternProperties) && IsSchema(schema.patternProperties[keys[0]]);
|
|
15475
|
+
return keys.length === 1 && IsPattern(keys[0]) && IsObject$3(schema.patternProperties) && IsSchema$1(schema.patternProperties[keys[0]]);
|
|
15641
15476
|
})(value);
|
|
15642
15477
|
}
|
|
15643
15478
|
/** Returns true if the given value is TRef */
|
|
15644
|
-
function IsRef(value) {
|
|
15645
|
-
return IsKindOf(value, "Ref") && IsOptionalString(value.$id) && IsString$2(value.$ref);
|
|
15479
|
+
function IsRef$1(value) {
|
|
15480
|
+
return IsKindOf$1(value, "Ref") && IsOptionalString(value.$id) && IsString$2(value.$ref);
|
|
15646
15481
|
}
|
|
15647
15482
|
/** Returns true if the given value is TRegExp */
|
|
15648
|
-
function IsRegExp(value) {
|
|
15649
|
-
return IsKindOf(value, "RegExp") && IsOptionalString(value.$id) && IsString$2(value.source) && IsString$2(value.flags) && IsOptionalNumber(value.maxLength) && IsOptionalNumber(value.minLength);
|
|
15483
|
+
function IsRegExp$1(value) {
|
|
15484
|
+
return IsKindOf$1(value, "RegExp") && IsOptionalString(value.$id) && IsString$2(value.source) && IsString$2(value.flags) && IsOptionalNumber(value.maxLength) && IsOptionalNumber(value.minLength);
|
|
15650
15485
|
}
|
|
15651
15486
|
/** Returns true if the given value is TString */
|
|
15652
|
-
function IsString(value) {
|
|
15653
|
-
return IsKindOf(value, "String") && value.type === "string" && IsOptionalString(value.$id) && IsOptionalNumber(value.minLength) && IsOptionalNumber(value.maxLength) && IsOptionalPattern(value.pattern) && IsOptionalFormat(value.format);
|
|
15487
|
+
function IsString$1(value) {
|
|
15488
|
+
return IsKindOf$1(value, "String") && value.type === "string" && IsOptionalString(value.$id) && IsOptionalNumber(value.minLength) && IsOptionalNumber(value.maxLength) && IsOptionalPattern(value.pattern) && IsOptionalFormat(value.format);
|
|
15654
15489
|
}
|
|
15655
15490
|
/** Returns true if the given value is TSymbol */
|
|
15656
|
-
function IsSymbol(value) {
|
|
15657
|
-
return IsKindOf(value, "Symbol") && value.type === "symbol" && IsOptionalString(value.$id);
|
|
15491
|
+
function IsSymbol$1(value) {
|
|
15492
|
+
return IsKindOf$1(value, "Symbol") && value.type === "symbol" && IsOptionalString(value.$id);
|
|
15658
15493
|
}
|
|
15659
15494
|
/** Returns true if the given value is TTemplateLiteral */
|
|
15660
|
-
function IsTemplateLiteral(value) {
|
|
15661
|
-
return IsKindOf(value, "TemplateLiteral") && value.type === "string" && IsString$2(value.pattern) && value.pattern[0] === "^" && value.pattern[value.pattern.length - 1] === "$";
|
|
15495
|
+
function IsTemplateLiteral$1(value) {
|
|
15496
|
+
return IsKindOf$1(value, "TemplateLiteral") && value.type === "string" && IsString$2(value.pattern) && value.pattern[0] === "^" && value.pattern[value.pattern.length - 1] === "$";
|
|
15662
15497
|
}
|
|
15663
15498
|
/** Returns true if the given value is TThis */
|
|
15664
|
-
function IsThis(value) {
|
|
15665
|
-
return IsKindOf(value, "This") && IsOptionalString(value.$id) && IsString$2(value.$ref);
|
|
15499
|
+
function IsThis$1(value) {
|
|
15500
|
+
return IsKindOf$1(value, "This") && IsOptionalString(value.$id) && IsString$2(value.$ref);
|
|
15666
15501
|
}
|
|
15667
15502
|
/** Returns true of this value is TTransform */
|
|
15668
|
-
function IsTransform(value) {
|
|
15503
|
+
function IsTransform$1(value) {
|
|
15669
15504
|
return IsObject$3(value) && TransformKind in value;
|
|
15670
15505
|
}
|
|
15671
15506
|
/** Returns true if the given value is TTuple */
|
|
15672
|
-
function IsTuple(value) {
|
|
15673
|
-
return IsKindOf(value, "Tuple") && value.type === "array" && IsOptionalString(value.$id) && IsNumber$3(value.minItems) && IsNumber$3(value.maxItems) && value.minItems === value.maxItems && (IsUndefined$3(value.items) && IsUndefined$3(value.additionalItems) && value.minItems === 0 || IsArray$3(value.items) && value.items.every((schema) => IsSchema(schema)));
|
|
15507
|
+
function IsTuple$1(value) {
|
|
15508
|
+
return IsKindOf$1(value, "Tuple") && value.type === "array" && IsOptionalString(value.$id) && IsNumber$3(value.minItems) && IsNumber$3(value.maxItems) && value.minItems === value.maxItems && (IsUndefined$3(value.items) && IsUndefined$3(value.additionalItems) && value.minItems === 0 || IsArray$3(value.items) && value.items.every((schema) => IsSchema$1(schema)));
|
|
15674
15509
|
}
|
|
15675
15510
|
/** Returns true if the given value is TUndefined */
|
|
15676
|
-
function IsUndefined(value) {
|
|
15677
|
-
return IsKindOf(value, "Undefined") && value.type === "undefined" && IsOptionalString(value.$id);
|
|
15511
|
+
function IsUndefined$1(value) {
|
|
15512
|
+
return IsKindOf$1(value, "Undefined") && value.type === "undefined" && IsOptionalString(value.$id);
|
|
15678
15513
|
}
|
|
15679
15514
|
/** Returns true if the given value is TUnion */
|
|
15680
|
-
function IsUnion(value) {
|
|
15681
|
-
return IsKindOf(value, "Union") && IsOptionalString(value.$id) && IsObject$3(value) && IsArray$3(value.anyOf) && value.anyOf.every((schema) => IsSchema(schema));
|
|
15515
|
+
function IsUnion$1(value) {
|
|
15516
|
+
return IsKindOf$1(value, "Union") && IsOptionalString(value.$id) && IsObject$3(value) && IsArray$3(value.anyOf) && value.anyOf.every((schema) => IsSchema$1(schema));
|
|
15682
15517
|
}
|
|
15683
15518
|
/** Returns true if the given value is TUint8Array */
|
|
15684
|
-
function IsUint8Array(value) {
|
|
15685
|
-
return IsKindOf(value, "Uint8Array") && value.type === "Uint8Array" && IsOptionalString(value.$id) && IsOptionalNumber(value.minByteLength) && IsOptionalNumber(value.maxByteLength);
|
|
15519
|
+
function IsUint8Array$1(value) {
|
|
15520
|
+
return IsKindOf$1(value, "Uint8Array") && value.type === "Uint8Array" && IsOptionalString(value.$id) && IsOptionalNumber(value.minByteLength) && IsOptionalNumber(value.maxByteLength);
|
|
15686
15521
|
}
|
|
15687
15522
|
/** Returns true if the given value is TUnknown */
|
|
15688
|
-
function IsUnknown(value) {
|
|
15689
|
-
return IsKindOf(value, "Unknown") && IsOptionalString(value.$id);
|
|
15523
|
+
function IsUnknown$1(value) {
|
|
15524
|
+
return IsKindOf$1(value, "Unknown") && IsOptionalString(value.$id);
|
|
15690
15525
|
}
|
|
15691
15526
|
/** Returns true if the given value is a raw TUnsafe */
|
|
15692
|
-
function IsUnsafe(value) {
|
|
15693
|
-
return IsKindOf(value, "Unsafe");
|
|
15527
|
+
function IsUnsafe$1(value) {
|
|
15528
|
+
return IsKindOf$1(value, "Unsafe");
|
|
15694
15529
|
}
|
|
15695
15530
|
/** Returns true if the given value is TVoid */
|
|
15696
|
-
function IsVoid(value) {
|
|
15697
|
-
return IsKindOf(value, "Void") && value.type === "void" && IsOptionalString(value.$id);
|
|
15531
|
+
function IsVoid$1(value) {
|
|
15532
|
+
return IsKindOf$1(value, "Void") && value.type === "void" && IsOptionalString(value.$id);
|
|
15698
15533
|
}
|
|
15699
15534
|
/** Returns true if the given value is TKind */
|
|
15700
|
-
function IsKind(value) {
|
|
15535
|
+
function IsKind$1(value) {
|
|
15701
15536
|
return IsObject$3(value) && Kind in value && IsString$2(value[Kind]) && !KnownTypes.includes(value[Kind]);
|
|
15702
15537
|
}
|
|
15703
15538
|
/** Returns true if the given value is TSchema */
|
|
15704
|
-
function IsSchema(value) {
|
|
15705
|
-
return IsObject$3(value) && (IsAny(value) || IsArgument(value) || IsArray(value) || IsBoolean(value) || IsBigInt(value) || IsAsyncIterator(value) || IsComputed(value) || IsConstructor(value) || IsDate(value) || IsFunction(value) || IsInteger(value) || IsIntersect(value) || IsIterator(value) || IsLiteral(value) || IsMappedKey(value) || IsMappedResult(value) || IsNever(value) || IsNot(value) || IsNull(value) || IsNumber(value) || IsObject(value) || IsPromise(value) || IsRecord(value) || IsRef(value) || IsRegExp(value) || IsString(value) || IsSymbol(value) || IsTemplateLiteral(value) || IsThis(value) || IsTuple(value) || IsUndefined(value) || IsUnion(value) || IsUint8Array(value) || IsUnknown(value) || IsUnsafe(value) || IsVoid(value) || IsKind(value));
|
|
15539
|
+
function IsSchema$1(value) {
|
|
15540
|
+
return IsObject$3(value) && (IsAny$1(value) || IsArgument$1(value) || IsArray$1(value) || IsBoolean$1(value) || IsBigInt$1(value) || IsAsyncIterator$1(value) || IsComputed$1(value) || IsConstructor$1(value) || IsDate$1(value) || IsFunction$1(value) || IsInteger$1(value) || IsIntersect$1(value) || IsIterator$1(value) || IsLiteral$1(value) || IsMappedKey$1(value) || IsMappedResult$1(value) || IsNever$1(value) || IsNot$1(value) || IsNull$1(value) || IsNumber$1(value) || IsObject$1(value) || IsPromise$1(value) || IsRecord$1(value) || IsRef$1(value) || IsRegExp$1(value) || IsString$1(value) || IsSymbol$1(value) || IsTemplateLiteral$1(value) || IsThis$1(value) || IsTuple$1(value) || IsUndefined$1(value) || IsUnion$1(value) || IsUint8Array$1(value) || IsUnknown$1(value) || IsUnsafe$1(value) || IsVoid$1(value) || IsKind$1(value));
|
|
15706
15541
|
}
|
|
15707
15542
|
|
|
15708
15543
|
//#endregion
|
|
@@ -15858,13 +15693,188 @@ function UnionCreate(T, options) {
|
|
|
15858
15693
|
}, options);
|
|
15859
15694
|
}
|
|
15860
15695
|
|
|
15696
|
+
//#endregion
|
|
15697
|
+
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
|
|
15698
|
+
/** `[Kind-Only]` Returns true if this value has a Readonly symbol */
|
|
15699
|
+
function IsReadonly(value) {
|
|
15700
|
+
return IsObject$3(value) && value[ReadonlyKind] === "Readonly";
|
|
15701
|
+
}
|
|
15702
|
+
/** `[Kind-Only]` Returns true if this value has a Optional symbol */
|
|
15703
|
+
function IsOptional(value) {
|
|
15704
|
+
return IsObject$3(value) && value[OptionalKind] === "Optional";
|
|
15705
|
+
}
|
|
15706
|
+
/** `[Kind-Only]` Returns true if the given value is TAny */
|
|
15707
|
+
function IsAny(value) {
|
|
15708
|
+
return IsKindOf(value, "Any");
|
|
15709
|
+
}
|
|
15710
|
+
/** `[Kind-Only]` Returns true if the given value is TArgument */
|
|
15711
|
+
function IsArgument(value) {
|
|
15712
|
+
return IsKindOf(value, "Argument");
|
|
15713
|
+
}
|
|
15714
|
+
/** `[Kind-Only]` Returns true if the given value is TArray */
|
|
15715
|
+
function IsArray(value) {
|
|
15716
|
+
return IsKindOf(value, "Array");
|
|
15717
|
+
}
|
|
15718
|
+
/** `[Kind-Only]` Returns true if the given value is TAsyncIterator */
|
|
15719
|
+
function IsAsyncIterator(value) {
|
|
15720
|
+
return IsKindOf(value, "AsyncIterator");
|
|
15721
|
+
}
|
|
15722
|
+
/** `[Kind-Only]` Returns true if the given value is TBigInt */
|
|
15723
|
+
function IsBigInt(value) {
|
|
15724
|
+
return IsKindOf(value, "BigInt");
|
|
15725
|
+
}
|
|
15726
|
+
/** `[Kind-Only]` Returns true if the given value is TBoolean */
|
|
15727
|
+
function IsBoolean(value) {
|
|
15728
|
+
return IsKindOf(value, "Boolean");
|
|
15729
|
+
}
|
|
15730
|
+
/** `[Kind-Only]` Returns true if the given value is TComputed */
|
|
15731
|
+
function IsComputed(value) {
|
|
15732
|
+
return IsKindOf(value, "Computed");
|
|
15733
|
+
}
|
|
15734
|
+
/** `[Kind-Only]` Returns true if the given value is TConstructor */
|
|
15735
|
+
function IsConstructor(value) {
|
|
15736
|
+
return IsKindOf(value, "Constructor");
|
|
15737
|
+
}
|
|
15738
|
+
/** `[Kind-Only]` Returns true if the given value is TDate */
|
|
15739
|
+
function IsDate(value) {
|
|
15740
|
+
return IsKindOf(value, "Date");
|
|
15741
|
+
}
|
|
15742
|
+
/** `[Kind-Only]` Returns true if the given value is TFunction */
|
|
15743
|
+
function IsFunction(value) {
|
|
15744
|
+
return IsKindOf(value, "Function");
|
|
15745
|
+
}
|
|
15746
|
+
/** `[Kind-Only]` Returns true if the given value is TInteger */
|
|
15747
|
+
function IsInteger(value) {
|
|
15748
|
+
return IsKindOf(value, "Integer");
|
|
15749
|
+
}
|
|
15750
|
+
/** `[Kind-Only]` Returns true if the given value is TIntersect */
|
|
15751
|
+
function IsIntersect(value) {
|
|
15752
|
+
return IsKindOf(value, "Intersect");
|
|
15753
|
+
}
|
|
15754
|
+
/** `[Kind-Only]` Returns true if the given value is TIterator */
|
|
15755
|
+
function IsIterator(value) {
|
|
15756
|
+
return IsKindOf(value, "Iterator");
|
|
15757
|
+
}
|
|
15758
|
+
/** `[Kind-Only]` Returns true if the given value is a TKind with the given name. */
|
|
15759
|
+
function IsKindOf(value, kind) {
|
|
15760
|
+
return IsObject$3(value) && Kind in value && value[Kind] === kind;
|
|
15761
|
+
}
|
|
15762
|
+
/** `[Kind-Only]` Returns true if the given value is TLiteralValue */
|
|
15763
|
+
function IsLiteralValue(value) {
|
|
15764
|
+
return IsBoolean$2(value) || IsNumber$3(value) || IsString$2(value);
|
|
15765
|
+
}
|
|
15766
|
+
/** `[Kind-Only]` Returns true if the given value is TLiteral */
|
|
15767
|
+
function IsLiteral(value) {
|
|
15768
|
+
return IsKindOf(value, "Literal");
|
|
15769
|
+
}
|
|
15770
|
+
/** `[Kind-Only]` Returns true if the given value is a TMappedKey */
|
|
15771
|
+
function IsMappedKey(value) {
|
|
15772
|
+
return IsKindOf(value, "MappedKey");
|
|
15773
|
+
}
|
|
15774
|
+
/** `[Kind-Only]` Returns true if the given value is TMappedResult */
|
|
15775
|
+
function IsMappedResult(value) {
|
|
15776
|
+
return IsKindOf(value, "MappedResult");
|
|
15777
|
+
}
|
|
15778
|
+
/** `[Kind-Only]` Returns true if the given value is TNever */
|
|
15779
|
+
function IsNever(value) {
|
|
15780
|
+
return IsKindOf(value, "Never");
|
|
15781
|
+
}
|
|
15782
|
+
/** `[Kind-Only]` Returns true if the given value is TNot */
|
|
15783
|
+
function IsNot(value) {
|
|
15784
|
+
return IsKindOf(value, "Not");
|
|
15785
|
+
}
|
|
15786
|
+
/** `[Kind-Only]` Returns true if the given value is TNull */
|
|
15787
|
+
function IsNull(value) {
|
|
15788
|
+
return IsKindOf(value, "Null");
|
|
15789
|
+
}
|
|
15790
|
+
/** `[Kind-Only]` Returns true if the given value is TNumber */
|
|
15791
|
+
function IsNumber(value) {
|
|
15792
|
+
return IsKindOf(value, "Number");
|
|
15793
|
+
}
|
|
15794
|
+
/** `[Kind-Only]` Returns true if the given value is TObject */
|
|
15795
|
+
function IsObject(value) {
|
|
15796
|
+
return IsKindOf(value, "Object");
|
|
15797
|
+
}
|
|
15798
|
+
/** `[Kind-Only]` Returns true if the given value is TPromise */
|
|
15799
|
+
function IsPromise(value) {
|
|
15800
|
+
return IsKindOf(value, "Promise");
|
|
15801
|
+
}
|
|
15802
|
+
/** `[Kind-Only]` Returns true if the given value is TRecord */
|
|
15803
|
+
function IsRecord(value) {
|
|
15804
|
+
return IsKindOf(value, "Record");
|
|
15805
|
+
}
|
|
15806
|
+
/** `[Kind-Only]` Returns true if the given value is TRef */
|
|
15807
|
+
function IsRef(value) {
|
|
15808
|
+
return IsKindOf(value, "Ref");
|
|
15809
|
+
}
|
|
15810
|
+
/** `[Kind-Only]` Returns true if the given value is TRegExp */
|
|
15811
|
+
function IsRegExp(value) {
|
|
15812
|
+
return IsKindOf(value, "RegExp");
|
|
15813
|
+
}
|
|
15814
|
+
/** `[Kind-Only]` Returns true if the given value is TString */
|
|
15815
|
+
function IsString(value) {
|
|
15816
|
+
return IsKindOf(value, "String");
|
|
15817
|
+
}
|
|
15818
|
+
/** `[Kind-Only]` Returns true if the given value is TSymbol */
|
|
15819
|
+
function IsSymbol(value) {
|
|
15820
|
+
return IsKindOf(value, "Symbol");
|
|
15821
|
+
}
|
|
15822
|
+
/** `[Kind-Only]` Returns true if the given value is TTemplateLiteral */
|
|
15823
|
+
function IsTemplateLiteral(value) {
|
|
15824
|
+
return IsKindOf(value, "TemplateLiteral");
|
|
15825
|
+
}
|
|
15826
|
+
/** `[Kind-Only]` Returns true if the given value is TThis */
|
|
15827
|
+
function IsThis(value) {
|
|
15828
|
+
return IsKindOf(value, "This");
|
|
15829
|
+
}
|
|
15830
|
+
/** `[Kind-Only]` Returns true of this value is TTransform */
|
|
15831
|
+
function IsTransform(value) {
|
|
15832
|
+
return IsObject$3(value) && TransformKind in value;
|
|
15833
|
+
}
|
|
15834
|
+
/** `[Kind-Only]` Returns true if the given value is TTuple */
|
|
15835
|
+
function IsTuple(value) {
|
|
15836
|
+
return IsKindOf(value, "Tuple");
|
|
15837
|
+
}
|
|
15838
|
+
/** `[Kind-Only]` Returns true if the given value is TUndefined */
|
|
15839
|
+
function IsUndefined(value) {
|
|
15840
|
+
return IsKindOf(value, "Undefined");
|
|
15841
|
+
}
|
|
15842
|
+
/** `[Kind-Only]` Returns true if the given value is TUnion */
|
|
15843
|
+
function IsUnion(value) {
|
|
15844
|
+
return IsKindOf(value, "Union");
|
|
15845
|
+
}
|
|
15846
|
+
/** `[Kind-Only]` Returns true if the given value is TUint8Array */
|
|
15847
|
+
function IsUint8Array(value) {
|
|
15848
|
+
return IsKindOf(value, "Uint8Array");
|
|
15849
|
+
}
|
|
15850
|
+
/** `[Kind-Only]` Returns true if the given value is TUnknown */
|
|
15851
|
+
function IsUnknown(value) {
|
|
15852
|
+
return IsKindOf(value, "Unknown");
|
|
15853
|
+
}
|
|
15854
|
+
/** `[Kind-Only]` Returns true if the given value is a raw TUnsafe */
|
|
15855
|
+
function IsUnsafe(value) {
|
|
15856
|
+
return IsKindOf(value, "Unsafe");
|
|
15857
|
+
}
|
|
15858
|
+
/** `[Kind-Only]` Returns true if the given value is TVoid */
|
|
15859
|
+
function IsVoid(value) {
|
|
15860
|
+
return IsKindOf(value, "Void");
|
|
15861
|
+
}
|
|
15862
|
+
/** `[Kind-Only]` Returns true if the given value is TKind */
|
|
15863
|
+
function IsKind(value) {
|
|
15864
|
+
return IsObject$3(value) && Kind in value && IsString$2(value[Kind]);
|
|
15865
|
+
}
|
|
15866
|
+
/** `[Kind-Only]` Returns true if the given value is TSchema */
|
|
15867
|
+
function IsSchema(value) {
|
|
15868
|
+
return IsAny(value) || IsArgument(value) || IsArray(value) || IsBoolean(value) || IsBigInt(value) || IsAsyncIterator(value) || IsComputed(value) || IsConstructor(value) || IsDate(value) || IsFunction(value) || IsInteger(value) || IsIntersect(value) || IsIterator(value) || IsLiteral(value) || IsMappedKey(value) || IsMappedResult(value) || IsNever(value) || IsNot(value) || IsNull(value) || IsNumber(value) || IsObject(value) || IsPromise(value) || IsRecord(value) || IsRef(value) || IsRegExp(value) || IsString(value) || IsSymbol(value) || IsTemplateLiteral(value) || IsThis(value) || IsTuple(value) || IsUndefined(value) || IsUnion(value) || IsUint8Array(value) || IsUnknown(value) || IsUnsafe(value) || IsVoid(value) || IsKind(value);
|
|
15869
|
+
}
|
|
15870
|
+
|
|
15861
15871
|
//#endregion
|
|
15862
15872
|
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs
|
|
15863
15873
|
function IsUnionOptional(types) {
|
|
15864
|
-
return types.some((type) => IsOptional
|
|
15874
|
+
return types.some((type) => IsOptional(type));
|
|
15865
15875
|
}
|
|
15866
15876
|
function RemoveOptionalFromRest$1(types) {
|
|
15867
|
-
return types.map((left) => IsOptional
|
|
15877
|
+
return types.map((left) => IsOptional(left) ? RemoveOptionalFromType$1(left) : left);
|
|
15868
15878
|
}
|
|
15869
15879
|
function RemoveOptionalFromType$1(T) {
|
|
15870
15880
|
return Discard(T, [OptionalKind]);
|
|
@@ -16133,7 +16143,7 @@ function Escape(value) {
|
|
|
16133
16143
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
16134
16144
|
}
|
|
16135
16145
|
function Visit$1(schema, acc) {
|
|
16136
|
-
return IsTemplateLiteral
|
|
16146
|
+
return IsTemplateLiteral(schema) ? schema.pattern.slice(1, schema.pattern.length - 1) : IsUnion(schema) ? `(${schema.anyOf.map((schema) => Visit$1(schema, acc)).join("|")})` : IsNumber(schema) ? `${acc}${PatternNumber}` : IsInteger(schema) ? `${acc}${PatternNumber}` : IsBigInt(schema) ? `${acc}${PatternNumber}` : IsString(schema) ? `${acc}${PatternString}` : IsLiteral(schema) ? `${acc}${Escape(schema.const.toString())}` : IsBoolean(schema) ? `${acc}${PatternBoolean}` : (() => {
|
|
16137
16147
|
throw new TemplateLiteralPatternError(`Unexpected Kind '${schema[Kind]}'`);
|
|
16138
16148
|
})();
|
|
16139
16149
|
}
|
|
@@ -16175,7 +16185,7 @@ function FromLiteral$1(literalValue) {
|
|
|
16175
16185
|
}
|
|
16176
16186
|
/** Returns a tuple of PropertyKeys derived from the given TSchema */
|
|
16177
16187
|
function IndexPropertyKeys(type) {
|
|
16178
|
-
return [...new Set(IsTemplateLiteral
|
|
16188
|
+
return [...new Set(IsTemplateLiteral(type) ? FromTemplateLiteral$2(type) : IsUnion(type) ? FromUnion$8(type.anyOf) : IsLiteral(type) ? FromLiteral$1(type.const) : IsNumber(type) ? ["[number]"] : IsInteger(type) ? ["[number]"] : [])];
|
|
16179
16189
|
}
|
|
16180
16190
|
|
|
16181
16191
|
//#endregion
|
|
@@ -16198,13 +16208,13 @@ function FromRest$6(types, key) {
|
|
|
16198
16208
|
return types.map((type) => IndexFromPropertyKey(type, key));
|
|
16199
16209
|
}
|
|
16200
16210
|
function FromIntersectRest(types) {
|
|
16201
|
-
return types.filter((type) => !IsNever
|
|
16211
|
+
return types.filter((type) => !IsNever(type));
|
|
16202
16212
|
}
|
|
16203
16213
|
function FromIntersect$7(types, key) {
|
|
16204
16214
|
return IntersectEvaluated(FromIntersectRest(FromRest$6(types, key)));
|
|
16205
16215
|
}
|
|
16206
16216
|
function FromUnionRest(types) {
|
|
16207
|
-
return types.some((L) => IsNever
|
|
16217
|
+
return types.some((L) => IsNever(L)) ? [] : types;
|
|
16208
16218
|
}
|
|
16209
16219
|
function FromUnion$7(types, key) {
|
|
16210
16220
|
return UnionEvaluated(FromUnionRest(FromRest$6(types, key)));
|
|
@@ -16219,7 +16229,7 @@ function FromProperty$2(properties, propertyKey) {
|
|
|
16219
16229
|
return propertyKey in properties ? properties[propertyKey] : Never();
|
|
16220
16230
|
}
|
|
16221
16231
|
function IndexFromPropertyKey(type, propertyKey) {
|
|
16222
|
-
return IsIntersect
|
|
16232
|
+
return IsIntersect(type) ? FromIntersect$7(type.allOf, propertyKey) : IsUnion(type) ? FromUnion$7(type.anyOf, propertyKey) : IsTuple(type) ? FromTuple$4(type.items ?? [], propertyKey) : IsArray(type) ? FromArray$5(type.items, propertyKey) : IsObject(type) ? FromProperty$2(type.properties, propertyKey) : Never();
|
|
16223
16233
|
}
|
|
16224
16234
|
function IndexFromPropertyKeys(type, propertyKeys) {
|
|
16225
16235
|
return propertyKeys.map((propertyKey) => IndexFromPropertyKey(type, propertyKey));
|
|
@@ -16229,14 +16239,14 @@ function FromSchema(type, propertyKeys) {
|
|
|
16229
16239
|
}
|
|
16230
16240
|
/** `[Json]` Returns an Indexed property type for the given keys */
|
|
16231
16241
|
function Index(type, key, options) {
|
|
16232
|
-
if (IsRef
|
|
16242
|
+
if (IsRef(type) || IsRef(key)) {
|
|
16233
16243
|
const error = `Index types using Ref parameters require both Type and Key to be of TSchema`;
|
|
16234
|
-
if (!IsSchema
|
|
16244
|
+
if (!IsSchema(type) || !IsSchema(key)) throw new TypeBoxError(error);
|
|
16235
16245
|
return Computed("Index", [type, key]);
|
|
16236
16246
|
}
|
|
16237
|
-
if (IsMappedResult
|
|
16238
|
-
if (IsMappedKey
|
|
16239
|
-
return CreateType(IsSchema
|
|
16247
|
+
if (IsMappedResult(key)) return IndexFromMappedResult(type, key, options);
|
|
16248
|
+
if (IsMappedKey(key)) return IndexFromMappedKey(type, key, options);
|
|
16249
|
+
return CreateType(IsSchema(key) ? FromSchema(type, IndexPropertyKeys(key)) : FromSchema(type, key), options);
|
|
16240
16250
|
}
|
|
16241
16251
|
|
|
16242
16252
|
//#endregion
|
|
@@ -16274,7 +16284,7 @@ function Iterator(items, options) {
|
|
|
16274
16284
|
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
|
|
16275
16285
|
/** Creates a RequiredArray derived from the given TProperties value. */
|
|
16276
16286
|
function RequiredArray(properties) {
|
|
16277
|
-
return globalThis.Object.keys(properties).filter((key) => !IsOptional
|
|
16287
|
+
return globalThis.Object.keys(properties).filter((key) => !IsOptional(properties[key]));
|
|
16278
16288
|
}
|
|
16279
16289
|
/** `[Json]` Creates an Object type */
|
|
16280
16290
|
function _Object(properties, options) {
|
|
@@ -16321,7 +16331,7 @@ function ReadonlyWithFlag(schema, F) {
|
|
|
16321
16331
|
/** `[Json]` Creates a Readonly property */
|
|
16322
16332
|
function Readonly(schema, enable) {
|
|
16323
16333
|
const F = enable ?? true;
|
|
16324
|
-
return IsMappedResult
|
|
16334
|
+
return IsMappedResult(schema) ? ReadonlyFromMappedResult(schema, F) : ReadonlyWithFlag(schema, F);
|
|
16325
16335
|
}
|
|
16326
16336
|
|
|
16327
16337
|
//#endregion
|
|
@@ -16386,7 +16396,7 @@ function FromProperties$16(K, T) {
|
|
|
16386
16396
|
}
|
|
16387
16397
|
function FromSchemaType(K, T) {
|
|
16388
16398
|
const options = { ...T };
|
|
16389
|
-
return IsOptional
|
|
16399
|
+
return IsOptional(T) ? Optional(FromSchemaType(K, Discard(T, [OptionalKind]))) : IsReadonly(T) ? Readonly(FromSchemaType(K, Discard(T, [ReadonlyKind]))) : IsMappedResult(T) ? FromMappedResult$9(K, T.properties) : IsMappedKey(T) ? FromMappedKey$3(K, T.keys) : IsConstructor(T) ? Constructor(FromRest$5(K, T.parameters), FromSchemaType(K, T.returns), options) : IsFunction(T) ? Function$1(FromRest$5(K, T.parameters), FromSchemaType(K, T.returns), options) : IsAsyncIterator(T) ? AsyncIterator(FromSchemaType(K, T.items), options) : IsIterator(T) ? Iterator(FromSchemaType(K, T.items), options) : IsIntersect(T) ? Intersect(FromRest$5(K, T.allOf), options) : IsUnion(T) ? Union(FromRest$5(K, T.anyOf), options) : IsTuple(T) ? Tuple(FromRest$5(K, T.items ?? []), options) : IsObject(T) ? Object$1(FromProperties$16(K, T.properties), options) : IsArray(T) ? Array$1(FromSchemaType(K, T.items), options) : IsPromise(T) ? Promise$1(FromSchemaType(K, T.item), options) : T;
|
|
16390
16400
|
}
|
|
16391
16401
|
function MappedFunctionReturnType(K, T) {
|
|
16392
16402
|
const Acc = {};
|
|
@@ -16395,7 +16405,7 @@ function MappedFunctionReturnType(K, T) {
|
|
|
16395
16405
|
}
|
|
16396
16406
|
/** `[Json]` Creates a Mapped object type */
|
|
16397
16407
|
function Mapped(key, map, options) {
|
|
16398
|
-
const K = IsSchema
|
|
16408
|
+
const K = IsSchema(key) ? IndexPropertyKeys(key) : key;
|
|
16399
16409
|
return Object$1(MappedFunctionReturnType(K, map({
|
|
16400
16410
|
[Kind]: "MappedKey",
|
|
16401
16411
|
keys: K
|
|
@@ -16419,7 +16429,7 @@ function OptionalWithFlag(schema, F) {
|
|
|
16419
16429
|
/** `[Json]` Creates a Optional property */
|
|
16420
16430
|
function Optional(schema, enable) {
|
|
16421
16431
|
const F = enable ?? true;
|
|
16422
|
-
return IsMappedResult
|
|
16432
|
+
return IsMappedResult(schema) ? OptionalFromMappedResult(schema, F) : OptionalWithFlag(schema, F);
|
|
16423
16433
|
}
|
|
16424
16434
|
|
|
16425
16435
|
//#endregion
|
|
@@ -16439,9 +16449,9 @@ function OptionalFromMappedResult(R, F) {
|
|
|
16439
16449
|
//#endregion
|
|
16440
16450
|
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs
|
|
16441
16451
|
function IntersectCreate(T, options = {}) {
|
|
16442
|
-
const allObjects = T.every((schema) => IsObject
|
|
16443
|
-
const clonedUnevaluatedProperties = IsSchema
|
|
16444
|
-
return CreateType(options.unevaluatedProperties === false || IsSchema
|
|
16452
|
+
const allObjects = T.every((schema) => IsObject(schema));
|
|
16453
|
+
const clonedUnevaluatedProperties = IsSchema(options.unevaluatedProperties) ? { unevaluatedProperties: options.unevaluatedProperties } : {};
|
|
16454
|
+
return CreateType(options.unevaluatedProperties === false || IsSchema(options.unevaluatedProperties) || allObjects ? {
|
|
16445
16455
|
...clonedUnevaluatedProperties,
|
|
16446
16456
|
[Kind]: "Intersect",
|
|
16447
16457
|
type: "object",
|
|
@@ -16456,13 +16466,13 @@ function IntersectCreate(T, options = {}) {
|
|
|
16456
16466
|
//#endregion
|
|
16457
16467
|
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs
|
|
16458
16468
|
function IsIntersectOptional(types) {
|
|
16459
|
-
return types.every((left) => IsOptional
|
|
16469
|
+
return types.every((left) => IsOptional(left));
|
|
16460
16470
|
}
|
|
16461
16471
|
function RemoveOptionalFromType(type) {
|
|
16462
16472
|
return Discard(type, [OptionalKind]);
|
|
16463
16473
|
}
|
|
16464
16474
|
function RemoveOptionalFromRest(types) {
|
|
16465
|
-
return types.map((left) => IsOptional
|
|
16475
|
+
return types.map((left) => IsOptional(left) ? RemoveOptionalFromType(left) : left);
|
|
16466
16476
|
}
|
|
16467
16477
|
function ResolveIntersect(types, options) {
|
|
16468
16478
|
return IsIntersectOptional(types) ? Optional(IntersectCreate(RemoveOptionalFromRest(types), options)) : IntersectCreate(RemoveOptionalFromRest(types), options);
|
|
@@ -16471,7 +16481,7 @@ function ResolveIntersect(types, options) {
|
|
|
16471
16481
|
function IntersectEvaluated(types, options = {}) {
|
|
16472
16482
|
if (types.length === 1) return CreateType(types[0], options);
|
|
16473
16483
|
if (types.length === 0) return Never(options);
|
|
16474
|
-
if (types.some((schema) => IsTransform
|
|
16484
|
+
if (types.some((schema) => IsTransform(schema))) throw new Error("Cannot intersect transform types");
|
|
16475
16485
|
return ResolveIntersect(types, options);
|
|
16476
16486
|
}
|
|
16477
16487
|
|
|
@@ -16481,7 +16491,7 @@ function IntersectEvaluated(types, options = {}) {
|
|
|
16481
16491
|
function Intersect(types, options) {
|
|
16482
16492
|
if (types.length === 1) return CreateType(types[0], options);
|
|
16483
16493
|
if (types.length === 0) return Never(options);
|
|
16484
|
-
if (types.some((schema) => IsTransform
|
|
16494
|
+
if (types.some((schema) => IsTransform(schema))) throw new Error("Cannot intersect transform types");
|
|
16485
16495
|
return IntersectCreate(types, options);
|
|
16486
16496
|
}
|
|
16487
16497
|
|
|
@@ -16519,7 +16529,7 @@ function FromRest$4(types) {
|
|
|
16519
16529
|
}
|
|
16520
16530
|
/** `[JavaScript]` Constructs a type by recursively unwrapping Promise types */
|
|
16521
16531
|
function Awaited(type, options) {
|
|
16522
|
-
return CreateType(IsComputed
|
|
16532
|
+
return CreateType(IsComputed(type) ? FromComputed$4(type.target, type.parameters) : IsIntersect(type) ? FromIntersect$6(type.allOf) : IsUnion(type) ? FromUnion$6(type.anyOf) : IsPromise(type) ? FromPromise$2(type.item) : IsRef(type) ? FromRef$3(type.$ref) : type, options);
|
|
16523
16533
|
}
|
|
16524
16534
|
|
|
16525
16535
|
//#endregion
|
|
@@ -16552,7 +16562,7 @@ function FromPatternProperties(patternProperties) {
|
|
|
16552
16562
|
}
|
|
16553
16563
|
/** Returns a tuple of PropertyKeys derived from the given TSchema. */
|
|
16554
16564
|
function KeyOfPropertyKeys(type) {
|
|
16555
|
-
return IsIntersect
|
|
16565
|
+
return IsIntersect(type) ? FromIntersect$5(type.allOf) : IsUnion(type) ? FromUnion$5(type.anyOf) : IsTuple(type) ? FromTuple$3(type.items ?? []) : IsArray(type) ? FromArray$4(type.items) : IsObject(type) ? FromProperties$14(type.properties) : IsRecord(type) ? FromPatternProperties(type.patternProperties) : [];
|
|
16556
16566
|
}
|
|
16557
16567
|
let includePatternProperties = false;
|
|
16558
16568
|
|
|
@@ -16572,7 +16582,7 @@ function KeyOfPropertyKeysToRest(propertyKeys) {
|
|
|
16572
16582
|
}
|
|
16573
16583
|
/** `[Json]` Creates a KeyOf type */
|
|
16574
16584
|
function KeyOf(type, options) {
|
|
16575
|
-
return IsComputed
|
|
16585
|
+
return IsComputed(type) ? FromComputed$3(type.target, type.parameters) : IsRef(type) ? FromRef$2(type.$ref) : IsMappedResult(type) ? KeyOfFromMappedResult(type, options) : KeyOfFromType(type, options);
|
|
16576
16586
|
}
|
|
16577
16587
|
|
|
16578
16588
|
//#endregion
|
|
@@ -16597,7 +16607,7 @@ function CompositeKeys(T) {
|
|
|
16597
16607
|
return SetDistinct(Acc);
|
|
16598
16608
|
}
|
|
16599
16609
|
function FilterNever(T) {
|
|
16600
|
-
return T.filter((L) => !IsNever
|
|
16610
|
+
return T.filter((L) => !IsNever(L));
|
|
16601
16611
|
}
|
|
16602
16612
|
function CompositeProperty(T, K) {
|
|
16603
16613
|
const Acc = [];
|
|
@@ -16695,7 +16705,7 @@ function Const(T, options) {
|
|
|
16695
16705
|
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs
|
|
16696
16706
|
/** `[JavaScript]` Extracts the ConstructorParameters from the given Constructor type */
|
|
16697
16707
|
function ConstructorParameters(schema, options) {
|
|
16698
|
-
return IsConstructor
|
|
16708
|
+
return IsConstructor(schema) ? Tuple(schema.parameters, options) : Never(options);
|
|
16699
16709
|
}
|
|
16700
16710
|
|
|
16701
16711
|
//#endregion
|
|
@@ -16726,49 +16736,49 @@ function Throw(message) {
|
|
|
16726
16736
|
throw new ExtendsResolverError(message);
|
|
16727
16737
|
}
|
|
16728
16738
|
function IsStructuralRight(right) {
|
|
16729
|
-
return IsNever(right) || IsIntersect(right) || IsUnion(right) || IsUnknown(right) || IsAny(right);
|
|
16739
|
+
return IsNever$1(right) || IsIntersect$1(right) || IsUnion$1(right) || IsUnknown$1(right) || IsAny$1(right);
|
|
16730
16740
|
}
|
|
16731
16741
|
function StructuralRight(left, right) {
|
|
16732
|
-
return IsNever(right) ? FromNeverRight(left, right) : IsIntersect(right) ? FromIntersectRight(left, right) : IsUnion(right) ? FromUnionRight(left, right) : IsUnknown(right) ? FromUnknownRight(left, right) : IsAny(right) ? FromAnyRight(left, right) : Throw("StructuralRight");
|
|
16742
|
+
return IsNever$1(right) ? FromNeverRight(left, right) : IsIntersect$1(right) ? FromIntersectRight(left, right) : IsUnion$1(right) ? FromUnionRight(left, right) : IsUnknown$1(right) ? FromUnknownRight(left, right) : IsAny$1(right) ? FromAnyRight(left, right) : Throw("StructuralRight");
|
|
16733
16743
|
}
|
|
16734
16744
|
function FromAnyRight(left, right) {
|
|
16735
16745
|
return ExtendsResult.True;
|
|
16736
16746
|
}
|
|
16737
16747
|
function FromAny(left, right) {
|
|
16738
|
-
return IsIntersect(right) ? FromIntersectRight(left, right) : IsUnion(right) && right.anyOf.some((schema) => IsAny(schema) || IsUnknown(schema)) ? ExtendsResult.True : IsUnion(right) ? ExtendsResult.Union : IsUnknown(right) ? ExtendsResult.True : IsAny(right) ? ExtendsResult.True : ExtendsResult.Union;
|
|
16748
|
+
return IsIntersect$1(right) ? FromIntersectRight(left, right) : IsUnion$1(right) && right.anyOf.some((schema) => IsAny$1(schema) || IsUnknown$1(schema)) ? ExtendsResult.True : IsUnion$1(right) ? ExtendsResult.Union : IsUnknown$1(right) ? ExtendsResult.True : IsAny$1(right) ? ExtendsResult.True : ExtendsResult.Union;
|
|
16739
16749
|
}
|
|
16740
16750
|
function FromArrayRight(left, right) {
|
|
16741
|
-
return IsUnknown(left) ? ExtendsResult.False : IsAny(left) ? ExtendsResult.Union : IsNever(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
16751
|
+
return IsUnknown$1(left) ? ExtendsResult.False : IsAny$1(left) ? ExtendsResult.Union : IsNever$1(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
16742
16752
|
}
|
|
16743
16753
|
function FromArray$2(left, right) {
|
|
16744
|
-
return IsObject(right) && IsObjectArrayLike(right) ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : !IsArray(right) ? ExtendsResult.False : IntoBooleanResult(Visit(left.items, right.items));
|
|
16754
|
+
return IsObject$1(right) && IsObjectArrayLike(right) ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : !IsArray$1(right) ? ExtendsResult.False : IntoBooleanResult(Visit(left.items, right.items));
|
|
16745
16755
|
}
|
|
16746
16756
|
function FromAsyncIterator$2(left, right) {
|
|
16747
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : !IsAsyncIterator(right) ? ExtendsResult.False : IntoBooleanResult(Visit(left.items, right.items));
|
|
16757
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : !IsAsyncIterator$1(right) ? ExtendsResult.False : IntoBooleanResult(Visit(left.items, right.items));
|
|
16748
16758
|
}
|
|
16749
16759
|
function FromBigInt(left, right) {
|
|
16750
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsRecord(right) ? FromRecordRight(left, right) : IsBigInt(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16760
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsBigInt$1(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16751
16761
|
}
|
|
16752
16762
|
function FromBooleanRight(left, right) {
|
|
16753
|
-
return IsLiteralBoolean(left) ? ExtendsResult.True : IsBoolean(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
16763
|
+
return IsLiteralBoolean(left) ? ExtendsResult.True : IsBoolean$1(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
16754
16764
|
}
|
|
16755
16765
|
function FromBoolean(left, right) {
|
|
16756
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsRecord(right) ? FromRecordRight(left, right) : IsBoolean(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16766
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsBoolean$1(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16757
16767
|
}
|
|
16758
16768
|
function FromConstructor$2(left, right) {
|
|
16759
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : !IsConstructor(right) ? ExtendsResult.False : left.parameters.length > right.parameters.length ? ExtendsResult.False : !left.parameters.every((schema, index) => IntoBooleanResult(Visit(right.parameters[index], schema)) === ExtendsResult.True) ? ExtendsResult.False : IntoBooleanResult(Visit(left.returns, right.returns));
|
|
16769
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : !IsConstructor$1(right) ? ExtendsResult.False : left.parameters.length > right.parameters.length ? ExtendsResult.False : !left.parameters.every((schema, index) => IntoBooleanResult(Visit(right.parameters[index], schema)) === ExtendsResult.True) ? ExtendsResult.False : IntoBooleanResult(Visit(left.returns, right.returns));
|
|
16760
16770
|
}
|
|
16761
16771
|
function FromDate(left, right) {
|
|
16762
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsRecord(right) ? FromRecordRight(left, right) : IsDate(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16772
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsDate$1(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16763
16773
|
}
|
|
16764
16774
|
function FromFunction$2(left, right) {
|
|
16765
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : !IsFunction(right) ? ExtendsResult.False : left.parameters.length > right.parameters.length ? ExtendsResult.False : !left.parameters.every((schema, index) => IntoBooleanResult(Visit(right.parameters[index], schema)) === ExtendsResult.True) ? ExtendsResult.False : IntoBooleanResult(Visit(left.returns, right.returns));
|
|
16775
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : !IsFunction$1(right) ? ExtendsResult.False : left.parameters.length > right.parameters.length ? ExtendsResult.False : !left.parameters.every((schema, index) => IntoBooleanResult(Visit(right.parameters[index], schema)) === ExtendsResult.True) ? ExtendsResult.False : IntoBooleanResult(Visit(left.returns, right.returns));
|
|
16766
16776
|
}
|
|
16767
16777
|
function FromIntegerRight(left, right) {
|
|
16768
|
-
return IsLiteral(left) && IsNumber$3(left.const) ? ExtendsResult.True : IsNumber(left) || IsInteger(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
16778
|
+
return IsLiteral$1(left) && IsNumber$3(left.const) ? ExtendsResult.True : IsNumber$1(left) || IsInteger$1(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
16769
16779
|
}
|
|
16770
16780
|
function FromInteger(left, right) {
|
|
16771
|
-
return IsInteger(right) || IsNumber(right) ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsRecord(right) ? FromRecordRight(left, right) : ExtendsResult.False;
|
|
16781
|
+
return IsInteger$1(right) || IsNumber$1(right) ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : ExtendsResult.False;
|
|
16772
16782
|
}
|
|
16773
16783
|
function FromIntersectRight(left, right) {
|
|
16774
16784
|
return right.allOf.every((schema) => Visit(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
|
|
@@ -16777,10 +16787,10 @@ function FromIntersect$4(left, right) {
|
|
|
16777
16787
|
return left.allOf.some((schema) => Visit(schema, right) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
|
|
16778
16788
|
}
|
|
16779
16789
|
function FromIterator$2(left, right) {
|
|
16780
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : !IsIterator(right) ? ExtendsResult.False : IntoBooleanResult(Visit(left.items, right.items));
|
|
16790
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : !IsIterator$1(right) ? ExtendsResult.False : IntoBooleanResult(Visit(left.items, right.items));
|
|
16781
16791
|
}
|
|
16782
16792
|
function FromLiteral(left, right) {
|
|
16783
|
-
return IsLiteral(right) && right.const === left.const ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsRecord(right) ? FromRecordRight(left, right) : IsString(right) ? FromStringRight(left, right) : IsNumber(right) ? FromNumberRight(left, right) : IsInteger(right) ? FromIntegerRight(left, right) : IsBoolean(right) ? FromBooleanRight(left, right) : ExtendsResult.False;
|
|
16793
|
+
return IsLiteral$1(right) && right.const === left.const ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsString$1(right) ? FromStringRight(left, right) : IsNumber$1(right) ? FromNumberRight(left, right) : IsInteger$1(right) ? FromIntegerRight(left, right) : IsBoolean$1(right) ? FromBooleanRight(left, right) : ExtendsResult.False;
|
|
16784
16794
|
}
|
|
16785
16795
|
function FromNeverRight(left, right) {
|
|
16786
16796
|
return ExtendsResult.False;
|
|
@@ -16791,23 +16801,23 @@ function FromNever(left, right) {
|
|
|
16791
16801
|
function UnwrapTNot(schema) {
|
|
16792
16802
|
let [current, depth] = [schema, 0];
|
|
16793
16803
|
while (true) {
|
|
16794
|
-
if (!IsNot(current)) break;
|
|
16804
|
+
if (!IsNot$1(current)) break;
|
|
16795
16805
|
current = current.not;
|
|
16796
16806
|
depth += 1;
|
|
16797
16807
|
}
|
|
16798
16808
|
return depth % 2 === 0 ? current : Unknown();
|
|
16799
16809
|
}
|
|
16800
16810
|
function FromNot(left, right) {
|
|
16801
|
-
return IsNot(left) ? Visit(UnwrapTNot(left), right) : IsNot(right) ? Visit(left, UnwrapTNot(right)) : Throw("Invalid fallthrough for Not");
|
|
16811
|
+
return IsNot$1(left) ? Visit(UnwrapTNot(left), right) : IsNot$1(right) ? Visit(left, UnwrapTNot(right)) : Throw("Invalid fallthrough for Not");
|
|
16802
16812
|
}
|
|
16803
16813
|
function FromNull(left, right) {
|
|
16804
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsRecord(right) ? FromRecordRight(left, right) : IsNull(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16814
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsNull$1(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16805
16815
|
}
|
|
16806
16816
|
function FromNumberRight(left, right) {
|
|
16807
|
-
return IsLiteralNumber(left) ? ExtendsResult.True : IsNumber(left) || IsInteger(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
16817
|
+
return IsLiteralNumber(left) ? ExtendsResult.True : IsNumber$1(left) || IsInteger$1(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
16808
16818
|
}
|
|
16809
16819
|
function FromNumber(left, right) {
|
|
16810
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsRecord(right) ? FromRecordRight(left, right) : IsInteger(right) || IsNumber(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16820
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsInteger$1(right) || IsNumber$1(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16811
16821
|
}
|
|
16812
16822
|
function IsObjectPropertyCount(schema, count) {
|
|
16813
16823
|
return Object.getOwnPropertyNames(schema.properties).length === count;
|
|
@@ -16816,7 +16826,7 @@ function IsObjectStringLike(schema) {
|
|
|
16816
16826
|
return IsObjectArrayLike(schema);
|
|
16817
16827
|
}
|
|
16818
16828
|
function IsObjectSymbolLike(schema) {
|
|
16819
|
-
return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "description" in schema.properties && IsUnion(schema.properties.description) && schema.properties.description.anyOf.length === 2 && (IsString(schema.properties.description.anyOf[0]) && IsUndefined(schema.properties.description.anyOf[1]) || IsString(schema.properties.description.anyOf[1]) && IsUndefined(schema.properties.description.anyOf[0]));
|
|
16829
|
+
return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "description" in schema.properties && IsUnion$1(schema.properties.description) && schema.properties.description.anyOf.length === 2 && (IsString$1(schema.properties.description.anyOf[0]) && IsUndefined$1(schema.properties.description.anyOf[1]) || IsString$1(schema.properties.description.anyOf[1]) && IsUndefined$1(schema.properties.description.anyOf[0]));
|
|
16820
16830
|
}
|
|
16821
16831
|
function IsObjectNumberLike(schema) {
|
|
16822
16832
|
return IsObjectPropertyCount(schema, 0);
|
|
@@ -16849,27 +16859,27 @@ function IsObjectPromiseLike(schema) {
|
|
|
16849
16859
|
return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "then" in schema.properties && IntoBooleanResult(Visit(schema.properties["then"], then)) === ExtendsResult.True;
|
|
16850
16860
|
}
|
|
16851
16861
|
function Property(left, right) {
|
|
16852
|
-
return Visit(left, right) === ExtendsResult.False ? ExtendsResult.False : IsOptional(left) && !IsOptional(right) ? ExtendsResult.False : ExtendsResult.True;
|
|
16862
|
+
return Visit(left, right) === ExtendsResult.False ? ExtendsResult.False : IsOptional$1(left) && !IsOptional$1(right) ? ExtendsResult.False : ExtendsResult.True;
|
|
16853
16863
|
}
|
|
16854
16864
|
function FromObjectRight(left, right) {
|
|
16855
|
-
return IsUnknown(left) ? ExtendsResult.False : IsAny(left) ? ExtendsResult.Union : IsNever(left) || IsLiteralString(left) && IsObjectStringLike(right) || IsLiteralNumber(left) && IsObjectNumberLike(right) || IsLiteralBoolean(left) && IsObjectBooleanLike(right) || IsSymbol(left) && IsObjectSymbolLike(right) || IsBigInt(left) && IsObjectBigIntLike(right) || IsString(left) && IsObjectStringLike(right) || IsSymbol(left) && IsObjectSymbolLike(right) || IsNumber(left) && IsObjectNumberLike(right) || IsInteger(left) && IsObjectNumberLike(right) || IsBoolean(left) && IsObjectBooleanLike(right) || IsUint8Array(left) && IsObjectUint8ArrayLike(right) || IsDate(left) && IsObjectDateLike(right) || IsConstructor(left) && IsObjectConstructorLike(right) || IsFunction(left) && IsObjectFunctionLike(right) ? ExtendsResult.True : IsRecord(left) && IsString(RecordKey$1(left)) ? (() => {
|
|
16865
|
+
return IsUnknown$1(left) ? ExtendsResult.False : IsAny$1(left) ? ExtendsResult.Union : IsNever$1(left) || IsLiteralString(left) && IsObjectStringLike(right) || IsLiteralNumber(left) && IsObjectNumberLike(right) || IsLiteralBoolean(left) && IsObjectBooleanLike(right) || IsSymbol$1(left) && IsObjectSymbolLike(right) || IsBigInt$1(left) && IsObjectBigIntLike(right) || IsString$1(left) && IsObjectStringLike(right) || IsSymbol$1(left) && IsObjectSymbolLike(right) || IsNumber$1(left) && IsObjectNumberLike(right) || IsInteger$1(left) && IsObjectNumberLike(right) || IsBoolean$1(left) && IsObjectBooleanLike(right) || IsUint8Array$1(left) && IsObjectUint8ArrayLike(right) || IsDate$1(left) && IsObjectDateLike(right) || IsConstructor$1(left) && IsObjectConstructorLike(right) || IsFunction$1(left) && IsObjectFunctionLike(right) ? ExtendsResult.True : IsRecord$1(left) && IsString$1(RecordKey$1(left)) ? (() => {
|
|
16856
16866
|
return right[Hint] === "Record" ? ExtendsResult.True : ExtendsResult.False;
|
|
16857
|
-
})() : IsRecord(left) && IsNumber(RecordKey$1(left)) ? (() => {
|
|
16867
|
+
})() : IsRecord$1(left) && IsNumber$1(RecordKey$1(left)) ? (() => {
|
|
16858
16868
|
return IsObjectPropertyCount(right, 0) ? ExtendsResult.True : ExtendsResult.False;
|
|
16859
16869
|
})() : ExtendsResult.False;
|
|
16860
16870
|
}
|
|
16861
16871
|
function FromObject$6(left, right) {
|
|
16862
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsRecord(right) ? FromRecordRight(left, right) : !IsObject(right) ? ExtendsResult.False : (() => {
|
|
16872
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : !IsObject$1(right) ? ExtendsResult.False : (() => {
|
|
16863
16873
|
for (const key of Object.getOwnPropertyNames(right.properties)) {
|
|
16864
|
-
if (!(key in left.properties) && !IsOptional(right.properties[key])) return ExtendsResult.False;
|
|
16865
|
-
if (IsOptional(right.properties[key])) return ExtendsResult.True;
|
|
16874
|
+
if (!(key in left.properties) && !IsOptional$1(right.properties[key])) return ExtendsResult.False;
|
|
16875
|
+
if (IsOptional$1(right.properties[key])) return ExtendsResult.True;
|
|
16866
16876
|
if (Property(left.properties[key], right.properties[key]) === ExtendsResult.False) return ExtendsResult.False;
|
|
16867
16877
|
}
|
|
16868
16878
|
return ExtendsResult.True;
|
|
16869
16879
|
})();
|
|
16870
16880
|
}
|
|
16871
16881
|
function FromPromise$1(left, right) {
|
|
16872
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) && IsObjectPromiseLike(right) ? ExtendsResult.True : !IsPromise(right) ? ExtendsResult.False : IntoBooleanResult(Visit(left.item, right.item));
|
|
16882
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) && IsObjectPromiseLike(right) ? ExtendsResult.True : !IsPromise$1(right) ? ExtendsResult.False : IntoBooleanResult(Visit(left.item, right.item));
|
|
16873
16883
|
}
|
|
16874
16884
|
function RecordKey$1(schema) {
|
|
16875
16885
|
return PatternNumberExact in schema.patternProperties ? Number$1() : PatternStringExact in schema.patternProperties ? String$1() : Throw("Unknown record key pattern");
|
|
@@ -16879,43 +16889,43 @@ function RecordValue$1(schema) {
|
|
|
16879
16889
|
}
|
|
16880
16890
|
function FromRecordRight(left, right) {
|
|
16881
16891
|
const [Key, Value] = [RecordKey$1(right), RecordValue$1(right)];
|
|
16882
|
-
return IsLiteralString(left) && IsNumber(Key) && IntoBooleanResult(Visit(left, Value)) === ExtendsResult.True ? ExtendsResult.True : IsUint8Array(left) && IsNumber(Key) ? Visit(left, Value) : IsString(left) && IsNumber(Key) ? Visit(left, Value) : IsArray(left) && IsNumber(Key) ? Visit(left, Value) : IsObject(left) ? (() => {
|
|
16892
|
+
return IsLiteralString(left) && IsNumber$1(Key) && IntoBooleanResult(Visit(left, Value)) === ExtendsResult.True ? ExtendsResult.True : IsUint8Array$1(left) && IsNumber$1(Key) ? Visit(left, Value) : IsString$1(left) && IsNumber$1(Key) ? Visit(left, Value) : IsArray$1(left) && IsNumber$1(Key) ? Visit(left, Value) : IsObject$1(left) ? (() => {
|
|
16883
16893
|
for (const key of Object.getOwnPropertyNames(left.properties)) if (Property(Value, left.properties[key]) === ExtendsResult.False) return ExtendsResult.False;
|
|
16884
16894
|
return ExtendsResult.True;
|
|
16885
16895
|
})() : ExtendsResult.False;
|
|
16886
16896
|
}
|
|
16887
16897
|
function FromRecord$2(left, right) {
|
|
16888
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : !IsRecord(right) ? ExtendsResult.False : Visit(RecordValue$1(left), RecordValue$1(right));
|
|
16898
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : !IsRecord$1(right) ? ExtendsResult.False : Visit(RecordValue$1(left), RecordValue$1(right));
|
|
16889
16899
|
}
|
|
16890
16900
|
function FromRegExp(left, right) {
|
|
16891
|
-
return Visit(IsRegExp(left) ? String$1() : left, IsRegExp(right) ? String$1() : right);
|
|
16901
|
+
return Visit(IsRegExp$1(left) ? String$1() : left, IsRegExp$1(right) ? String$1() : right);
|
|
16892
16902
|
}
|
|
16893
16903
|
function FromStringRight(left, right) {
|
|
16894
|
-
return IsLiteral(left) && IsString$2(left.const) ? ExtendsResult.True : IsString(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
16904
|
+
return IsLiteral$1(left) && IsString$2(left.const) ? ExtendsResult.True : IsString$1(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
16895
16905
|
}
|
|
16896
16906
|
function FromString(left, right) {
|
|
16897
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsRecord(right) ? FromRecordRight(left, right) : IsString(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16907
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsString$1(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16898
16908
|
}
|
|
16899
16909
|
function FromSymbol(left, right) {
|
|
16900
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsRecord(right) ? FromRecordRight(left, right) : IsSymbol(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16910
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsSymbol$1(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16901
16911
|
}
|
|
16902
16912
|
function FromTemplateLiteral$1(left, right) {
|
|
16903
|
-
return IsTemplateLiteral(left) ? Visit(TemplateLiteralToUnion(left), right) : IsTemplateLiteral(right) ? Visit(left, TemplateLiteralToUnion(right)) : Throw("Invalid fallthrough for TemplateLiteral");
|
|
16913
|
+
return IsTemplateLiteral$1(left) ? Visit(TemplateLiteralToUnion(left), right) : IsTemplateLiteral$1(right) ? Visit(left, TemplateLiteralToUnion(right)) : Throw("Invalid fallthrough for TemplateLiteral");
|
|
16904
16914
|
}
|
|
16905
16915
|
function IsArrayOfTuple(left, right) {
|
|
16906
|
-
return IsArray(right) && left.items !== void 0 && left.items.every((schema) => Visit(schema, right.items) === ExtendsResult.True);
|
|
16916
|
+
return IsArray$1(right) && left.items !== void 0 && left.items.every((schema) => Visit(schema, right.items) === ExtendsResult.True);
|
|
16907
16917
|
}
|
|
16908
16918
|
function FromTupleRight(left, right) {
|
|
16909
|
-
return IsNever(left) ? ExtendsResult.True : IsUnknown(left) ? ExtendsResult.False : IsAny(left) ? ExtendsResult.Union : ExtendsResult.False;
|
|
16919
|
+
return IsNever$1(left) ? ExtendsResult.True : IsUnknown$1(left) ? ExtendsResult.False : IsAny$1(left) ? ExtendsResult.Union : ExtendsResult.False;
|
|
16910
16920
|
}
|
|
16911
16921
|
function FromTuple$2(left, right) {
|
|
16912
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) && IsObjectArrayLike(right) ? ExtendsResult.True : IsArray(right) && IsArrayOfTuple(left, right) ? ExtendsResult.True : !IsTuple(right) ? ExtendsResult.False : IsUndefined$3(left.items) && !IsUndefined$3(right.items) || !IsUndefined$3(left.items) && IsUndefined$3(right.items) ? ExtendsResult.False : IsUndefined$3(left.items) && !IsUndefined$3(right.items) ? ExtendsResult.True : left.items.every((schema, index) => Visit(schema, right.items[index]) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
|
|
16922
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) && IsObjectArrayLike(right) ? ExtendsResult.True : IsArray$1(right) && IsArrayOfTuple(left, right) ? ExtendsResult.True : !IsTuple$1(right) ? ExtendsResult.False : IsUndefined$3(left.items) && !IsUndefined$3(right.items) || !IsUndefined$3(left.items) && IsUndefined$3(right.items) ? ExtendsResult.False : IsUndefined$3(left.items) && !IsUndefined$3(right.items) ? ExtendsResult.True : left.items.every((schema, index) => Visit(schema, right.items[index]) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
|
|
16913
16923
|
}
|
|
16914
16924
|
function FromUint8Array(left, right) {
|
|
16915
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsRecord(right) ? FromRecordRight(left, right) : IsUint8Array(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16925
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsUint8Array$1(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16916
16926
|
}
|
|
16917
16927
|
function FromUndefined(left, right) {
|
|
16918
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsRecord(right) ? FromRecordRight(left, right) : IsVoid(right) ? FromVoidRight(left, right) : IsUndefined(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16928
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsRecord$1(right) ? FromRecordRight(left, right) : IsVoid$1(right) ? FromVoidRight(left, right) : IsUndefined$1(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16919
16929
|
}
|
|
16920
16930
|
function FromUnionRight(left, right) {
|
|
16921
16931
|
return right.anyOf.some((schema) => Visit(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
|
|
@@ -16927,16 +16937,16 @@ function FromUnknownRight(left, right) {
|
|
|
16927
16937
|
return ExtendsResult.True;
|
|
16928
16938
|
}
|
|
16929
16939
|
function FromUnknown(left, right) {
|
|
16930
|
-
return IsNever(right) ? FromNeverRight(left, right) : IsIntersect(right) ? FromIntersectRight(left, right) : IsUnion(right) ? FromUnionRight(left, right) : IsAny(right) ? FromAnyRight(left, right) : IsString(right) ? FromStringRight(left, right) : IsNumber(right) ? FromNumberRight(left, right) : IsInteger(right) ? FromIntegerRight(left, right) : IsBoolean(right) ? FromBooleanRight(left, right) : IsArray(right) ? FromArrayRight(left, right) : IsTuple(right) ? FromTupleRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsUnknown(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16940
|
+
return IsNever$1(right) ? FromNeverRight(left, right) : IsIntersect$1(right) ? FromIntersectRight(left, right) : IsUnion$1(right) ? FromUnionRight(left, right) : IsAny$1(right) ? FromAnyRight(left, right) : IsString$1(right) ? FromStringRight(left, right) : IsNumber$1(right) ? FromNumberRight(left, right) : IsInteger$1(right) ? FromIntegerRight(left, right) : IsBoolean$1(right) ? FromBooleanRight(left, right) : IsArray$1(right) ? FromArrayRight(left, right) : IsTuple$1(right) ? FromTupleRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsUnknown$1(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16931
16941
|
}
|
|
16932
16942
|
function FromVoidRight(left, right) {
|
|
16933
|
-
return IsUndefined(left) ? ExtendsResult.True : IsUndefined(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
16943
|
+
return IsUndefined$1(left) ? ExtendsResult.True : IsUndefined$1(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
16934
16944
|
}
|
|
16935
16945
|
function FromVoid(left, right) {
|
|
16936
|
-
return IsIntersect(right) ? FromIntersectRight(left, right) : IsUnion(right) ? FromUnionRight(left, right) : IsUnknown(right) ? FromUnknownRight(left, right) : IsAny(right) ? FromAnyRight(left, right) : IsObject(right) ? FromObjectRight(left, right) : IsVoid(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16946
|
+
return IsIntersect$1(right) ? FromIntersectRight(left, right) : IsUnion$1(right) ? FromUnionRight(left, right) : IsUnknown$1(right) ? FromUnknownRight(left, right) : IsAny$1(right) ? FromAnyRight(left, right) : IsObject$1(right) ? FromObjectRight(left, right) : IsVoid$1(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
16937
16947
|
}
|
|
16938
16948
|
function Visit(left, right) {
|
|
16939
|
-
return IsTemplateLiteral(left) || IsTemplateLiteral(right) ? FromTemplateLiteral$1(left, right) : IsRegExp(left) || IsRegExp(right) ? FromRegExp(left, right) : IsNot(left) || IsNot(right) ? FromNot(left, right) : IsAny(left) ? FromAny(left, right) : IsArray(left) ? FromArray$2(left, right) : IsBigInt(left) ? FromBigInt(left, right) : IsBoolean(left) ? FromBoolean(left, right) : IsAsyncIterator(left) ? FromAsyncIterator$2(left, right) : IsConstructor(left) ? FromConstructor$2(left, right) : IsDate(left) ? FromDate(left, right) : IsFunction(left) ? FromFunction$2(left, right) : IsInteger(left) ? FromInteger(left, right) : IsIntersect(left) ? FromIntersect$4(left, right) : IsIterator(left) ? FromIterator$2(left, right) : IsLiteral(left) ? FromLiteral(left, right) : IsNever(left) ? FromNever(left, right) : IsNull(left) ? FromNull(left, right) : IsNumber(left) ? FromNumber(left, right) : IsObject(left) ? FromObject$6(left, right) : IsRecord(left) ? FromRecord$2(left, right) : IsString(left) ? FromString(left, right) : IsSymbol(left) ? FromSymbol(left, right) : IsTuple(left) ? FromTuple$2(left, right) : IsPromise(left) ? FromPromise$1(left, right) : IsUint8Array(left) ? FromUint8Array(left, right) : IsUndefined(left) ? FromUndefined(left, right) : IsUnion(left) ? FromUnion$4(left, right) : IsUnknown(left) ? FromUnknown(left, right) : IsVoid(left) ? FromVoid(left, right) : Throw(`Unknown left type operand '${left[Kind]}'`);
|
|
16949
|
+
return IsTemplateLiteral$1(left) || IsTemplateLiteral$1(right) ? FromTemplateLiteral$1(left, right) : IsRegExp$1(left) || IsRegExp$1(right) ? FromRegExp(left, right) : IsNot$1(left) || IsNot$1(right) ? FromNot(left, right) : IsAny$1(left) ? FromAny(left, right) : IsArray$1(left) ? FromArray$2(left, right) : IsBigInt$1(left) ? FromBigInt(left, right) : IsBoolean$1(left) ? FromBoolean(left, right) : IsAsyncIterator$1(left) ? FromAsyncIterator$2(left, right) : IsConstructor$1(left) ? FromConstructor$2(left, right) : IsDate$1(left) ? FromDate(left, right) : IsFunction$1(left) ? FromFunction$2(left, right) : IsInteger$1(left) ? FromInteger(left, right) : IsIntersect$1(left) ? FromIntersect$4(left, right) : IsIterator$1(left) ? FromIterator$2(left, right) : IsLiteral$1(left) ? FromLiteral(left, right) : IsNever$1(left) ? FromNever(left, right) : IsNull$1(left) ? FromNull(left, right) : IsNumber$1(left) ? FromNumber(left, right) : IsObject$1(left) ? FromObject$6(left, right) : IsRecord$1(left) ? FromRecord$2(left, right) : IsString$1(left) ? FromString(left, right) : IsSymbol$1(left) ? FromSymbol(left, right) : IsTuple$1(left) ? FromTuple$2(left, right) : IsPromise$1(left) ? FromPromise$1(left, right) : IsUint8Array$1(left) ? FromUint8Array(left, right) : IsUndefined$1(left) ? FromUndefined(left, right) : IsUnion$1(left) ? FromUnion$4(left, right) : IsUnknown$1(left) ? FromUnknown(left, right) : IsVoid$1(left) ? FromVoid(left, right) : Throw(`Unknown left type operand '${left[Kind]}'`);
|
|
16940
16950
|
}
|
|
16941
16951
|
function ExtendsCheck(left, right) {
|
|
16942
16952
|
return Visit(left, right);
|
|
@@ -16964,7 +16974,7 @@ function ExtendsResolve(left, right, trueType, falseType) {
|
|
|
16964
16974
|
}
|
|
16965
16975
|
/** `[Json]` Creates a Conditional type */
|
|
16966
16976
|
function Extends(L, R, T, F, options) {
|
|
16967
|
-
return IsMappedResult
|
|
16977
|
+
return IsMappedResult(L) ? ExtendsFromMappedResult(L, R, T, F, options) : IsMappedKey(L) ? CreateType(ExtendsFromMappedKey(L, R, T, F, options)) : CreateType(ExtendsResolve(L, R, T, F), options);
|
|
16968
16978
|
}
|
|
16969
16979
|
|
|
16970
16980
|
//#endregion
|
|
@@ -17001,9 +17011,9 @@ function ExcludeRest(L, R) {
|
|
|
17001
17011
|
}
|
|
17002
17012
|
/** `[Json]` Constructs a type by excluding from unionType all union members that are assignable to excludedMembers */
|
|
17003
17013
|
function Exclude(L, R, options = {}) {
|
|
17004
|
-
if (IsTemplateLiteral
|
|
17005
|
-
if (IsMappedResult
|
|
17006
|
-
return CreateType(IsUnion
|
|
17014
|
+
if (IsTemplateLiteral(L)) return CreateType(ExcludeFromTemplateLiteral(L, R), options);
|
|
17015
|
+
if (IsMappedResult(L)) return CreateType(ExcludeFromMappedResult(L, R), options);
|
|
17016
|
+
return CreateType(IsUnion(L) ? ExcludeRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? Never() : L, options);
|
|
17007
17017
|
}
|
|
17008
17018
|
|
|
17009
17019
|
//#endregion
|
|
@@ -17034,9 +17044,9 @@ function ExtractRest(L, R) {
|
|
|
17034
17044
|
}
|
|
17035
17045
|
/** `[Json]` Constructs a type by extracting from type all union members that are assignable to union */
|
|
17036
17046
|
function Extract(L, R, options) {
|
|
17037
|
-
if (IsTemplateLiteral
|
|
17038
|
-
if (IsMappedResult
|
|
17039
|
-
return CreateType(IsUnion
|
|
17047
|
+
if (IsTemplateLiteral(L)) return CreateType(ExtractFromTemplateLiteral(L, R), options);
|
|
17048
|
+
if (IsMappedResult(L)) return CreateType(ExtractFromMappedResult(L, R), options);
|
|
17049
|
+
return CreateType(IsUnion(L) ? ExtractRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? L : Never(), options);
|
|
17040
17050
|
}
|
|
17041
17051
|
|
|
17042
17052
|
//#endregion
|
|
@@ -17057,7 +17067,7 @@ function ExtractFromMappedResult(R, T) {
|
|
|
17057
17067
|
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs
|
|
17058
17068
|
/** `[JavaScript]` Extracts the InstanceType from the given Constructor type */
|
|
17059
17069
|
function InstanceType(schema, options) {
|
|
17060
|
-
return IsConstructor
|
|
17070
|
+
return IsConstructor(schema) ? CreateType(schema.returns, options) : Never(options);
|
|
17061
17071
|
}
|
|
17062
17072
|
|
|
17063
17073
|
//#endregion
|
|
@@ -17119,7 +17129,7 @@ function FromNumberKey(_, type, options) {
|
|
|
17119
17129
|
}
|
|
17120
17130
|
/** `[Json]` Creates a Record type */
|
|
17121
17131
|
function Record(key, type, options = {}) {
|
|
17122
|
-
return IsUnion
|
|
17132
|
+
return IsUnion(key) ? FromUnionKey(key.anyOf, type, options) : IsTemplateLiteral(key) ? FromTemplateLiteralKey(key, type, options) : IsLiteral(key) ? FromLiteralKey(key.const, type, options) : IsBoolean(key) ? FromBooleanKey(key, type, options) : IsInteger(key) ? FromIntegerKey(key, type, options) : IsNumber(key) ? FromNumberKey(key, type, options) : IsRegExp(key) ? FromRegExpKey(key, type, options) : IsString(key) ? FromStringKey(key, type, options) : IsAny(key) ? FromAnyKey(key, type, options) : IsNever(key) ? FromNeverKey(key, type, options) : Never(options);
|
|
17123
17133
|
}
|
|
17124
17134
|
/** Gets the Records Pattern */
|
|
17125
17135
|
function RecordPattern(record) {
|
|
@@ -17195,7 +17205,7 @@ function FromArgument(args, argument) {
|
|
|
17195
17205
|
}
|
|
17196
17206
|
function FromProperty$1(args, type) {
|
|
17197
17207
|
const isReadonly = IsReadonly(type);
|
|
17198
|
-
const isOptional = IsOptional
|
|
17208
|
+
const isOptional = IsOptional(type);
|
|
17199
17209
|
const mapped = FromType$1(args, type);
|
|
17200
17210
|
return isReadonly && isOptional ? ReadonlyOptional(mapped) : isReadonly && !isOptional ? Readonly(mapped) : !isReadonly && isOptional ? Optional(mapped) : mapped;
|
|
17201
17211
|
}
|
|
@@ -17211,7 +17221,7 @@ function FromTypes$1(args, types) {
|
|
|
17211
17221
|
return types.map((type) => FromType$1(args, type));
|
|
17212
17222
|
}
|
|
17213
17223
|
function FromType$1(args, type) {
|
|
17214
|
-
return IsConstructor
|
|
17224
|
+
return IsConstructor(type) ? FromConstructor$1(args, type) : IsFunction(type) ? FromFunction$1(args, type) : IsIntersect(type) ? FromIntersect$3(args, type) : IsUnion(type) ? FromUnion$3(args, type) : IsTuple(type) ? FromTuple$1(args, type) : IsArray(type) ? FromArray$1(args, type) : IsAsyncIterator(type) ? FromAsyncIterator$1(args, type) : IsIterator(type) ? FromIterator$1(args, type) : IsPromise(type) ? FromPromise(args, type) : IsObject(type) ? FromObject$5(args, type) : IsRecord(type) ? FromRecord$1(args, type) : IsArgument(type) ? FromArgument(args, type) : type;
|
|
17215
17225
|
}
|
|
17216
17226
|
/** `[JavaScript]` Instantiates a type with the given parameters */
|
|
17217
17227
|
function Instantiate(type, args) {
|
|
@@ -17280,7 +17290,7 @@ function FromRest$2(T, M) {
|
|
|
17280
17290
|
}
|
|
17281
17291
|
/** Applies an intrinsic string manipulation to the given type. */
|
|
17282
17292
|
function Intrinsic(schema, mode, options = {}) {
|
|
17283
|
-
return IsMappedKey
|
|
17293
|
+
return IsMappedKey(schema) ? IntrinsicFromMappedKey(schema, mode, options) : IsTemplateLiteral(schema) ? FromTemplateLiteral(schema, mode, options) : IsUnion(schema) ? Union(FromRest$2(schema.anyOf, mode), options) : IsLiteral(schema) ? Literal(FromLiteralValue(schema.const, mode), options) : CreateType(schema, options);
|
|
17284
17294
|
}
|
|
17285
17295
|
|
|
17286
17296
|
//#endregion
|
|
@@ -17350,18 +17360,18 @@ function FromObject$4(type, propertyKeys, properties) {
|
|
|
17350
17360
|
return Object$1(FromProperties$6(properties, propertyKeys), options);
|
|
17351
17361
|
}
|
|
17352
17362
|
function UnionFromPropertyKeys$1(propertyKeys) {
|
|
17353
|
-
return Union(propertyKeys.reduce((result, key) => IsLiteralValue
|
|
17363
|
+
return Union(propertyKeys.reduce((result, key) => IsLiteralValue(key) ? [...result, Literal(key)] : result, []));
|
|
17354
17364
|
}
|
|
17355
17365
|
function OmitResolve(type, propertyKeys) {
|
|
17356
|
-
return IsIntersect
|
|
17366
|
+
return IsIntersect(type) ? Intersect(FromIntersect$2(type.allOf, propertyKeys)) : IsUnion(type) ? Union(FromUnion$2(type.anyOf, propertyKeys)) : IsObject(type) ? FromObject$4(type, propertyKeys, type.properties) : Object$1({});
|
|
17357
17367
|
}
|
|
17358
17368
|
/** `[Json]` Constructs a type whose keys are picked from the given type */
|
|
17359
17369
|
function Omit(type, key, options) {
|
|
17360
17370
|
const typeKey = IsArray$3(key) ? UnionFromPropertyKeys$1(key) : key;
|
|
17361
|
-
const propertyKeys = IsSchema
|
|
17362
|
-
const isTypeRef = IsRef
|
|
17363
|
-
const isKeyRef = IsRef
|
|
17364
|
-
return IsMappedResult
|
|
17371
|
+
const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
|
|
17372
|
+
const isTypeRef = IsRef(type);
|
|
17373
|
+
const isKeyRef = IsRef(key);
|
|
17374
|
+
return IsMappedResult(type) ? OmitFromMappedResult(type, propertyKeys, options) : IsMappedKey(key) ? OmitFromMappedKey(type, key, options) : isTypeRef && isKeyRef ? Computed("Omit", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed("Omit", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed("Omit", [type, typeKey], options) : CreateType({
|
|
17365
17375
|
...OmitResolve(type, propertyKeys),
|
|
17366
17376
|
...options
|
|
17367
17377
|
});
|
|
@@ -17424,18 +17434,18 @@ function FromObject$3(Type, keys, properties) {
|
|
|
17424
17434
|
return Object$1(FromProperties$4(properties, keys), options);
|
|
17425
17435
|
}
|
|
17426
17436
|
function UnionFromPropertyKeys(propertyKeys) {
|
|
17427
|
-
return Union(propertyKeys.reduce((result, key) => IsLiteralValue
|
|
17437
|
+
return Union(propertyKeys.reduce((result, key) => IsLiteralValue(key) ? [...result, Literal(key)] : result, []));
|
|
17428
17438
|
}
|
|
17429
17439
|
function PickResolve(type, propertyKeys) {
|
|
17430
|
-
return IsIntersect
|
|
17440
|
+
return IsIntersect(type) ? Intersect(FromIntersect$1(type.allOf, propertyKeys)) : IsUnion(type) ? Union(FromUnion$1(type.anyOf, propertyKeys)) : IsObject(type) ? FromObject$3(type, propertyKeys, type.properties) : Object$1({});
|
|
17431
17441
|
}
|
|
17432
17442
|
/** `[Json]` Constructs a type whose keys are picked from the given type */
|
|
17433
17443
|
function Pick(type, key, options) {
|
|
17434
17444
|
const typeKey = IsArray$3(key) ? UnionFromPropertyKeys(key) : key;
|
|
17435
|
-
const propertyKeys = IsSchema
|
|
17436
|
-
const isTypeRef = IsRef
|
|
17437
|
-
const isKeyRef = IsRef
|
|
17438
|
-
return IsMappedResult
|
|
17445
|
+
const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
|
|
17446
|
+
const isTypeRef = IsRef(type);
|
|
17447
|
+
const isKeyRef = IsRef(key);
|
|
17448
|
+
return IsMappedResult(type) ? PickFromMappedResult(type, propertyKeys, options) : IsMappedKey(key) ? PickFromMappedKey(type, key, options) : isTypeRef && isKeyRef ? Computed("Pick", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed("Pick", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed("Pick", [type, typeKey], options) : CreateType({
|
|
17439
17449
|
...PickResolve(type, propertyKeys),
|
|
17440
17450
|
...options
|
|
17441
17451
|
});
|
|
@@ -17487,11 +17497,11 @@ function FromRest$1(types) {
|
|
|
17487
17497
|
return types.map((type) => PartialResolve(type));
|
|
17488
17498
|
}
|
|
17489
17499
|
function PartialResolve(type) {
|
|
17490
|
-
return IsComputed
|
|
17500
|
+
return IsComputed(type) ? FromComputed$2(type.target, type.parameters) : IsRef(type) ? FromRef$1(type.$ref) : IsIntersect(type) ? Intersect(FromRest$1(type.allOf)) : IsUnion(type) ? Union(FromRest$1(type.anyOf)) : IsObject(type) ? FromObject$2(type, type.properties) : IsBigInt(type) ? type : IsBoolean(type) ? type : IsInteger(type) ? type : IsLiteral(type) ? type : IsNull(type) ? type : IsNumber(type) ? type : IsString(type) ? type : IsSymbol(type) ? type : IsUndefined(type) ? type : Object$1({});
|
|
17491
17501
|
}
|
|
17492
17502
|
/** `[Json]` Constructs a type where all properties are optional */
|
|
17493
17503
|
function Partial(type, options) {
|
|
17494
|
-
if (IsMappedResult
|
|
17504
|
+
if (IsMappedResult(type)) return PartialFromMappedResult(type, options);
|
|
17495
17505
|
else return CreateType({
|
|
17496
17506
|
...PartialResolve(type),
|
|
17497
17507
|
...options
|
|
@@ -17538,11 +17548,11 @@ function FromRest(types) {
|
|
|
17538
17548
|
return types.map((type) => RequiredResolve(type));
|
|
17539
17549
|
}
|
|
17540
17550
|
function RequiredResolve(type) {
|
|
17541
|
-
return IsComputed
|
|
17551
|
+
return IsComputed(type) ? FromComputed$1(type.target, type.parameters) : IsRef(type) ? FromRef(type.$ref) : IsIntersect(type) ? Intersect(FromRest(type.allOf)) : IsUnion(type) ? Union(FromRest(type.anyOf)) : IsObject(type) ? FromObject$1(type, type.properties) : IsBigInt(type) ? type : IsBoolean(type) ? type : IsInteger(type) ? type : IsLiteral(type) ? type : IsNull(type) ? type : IsNumber(type) ? type : IsString(type) ? type : IsSymbol(type) ? type : IsUndefined(type) ? type : Object$1({});
|
|
17542
17552
|
}
|
|
17543
17553
|
/** `[Json]` Constructs a type where all properties are required */
|
|
17544
17554
|
function Required(type, options) {
|
|
17545
|
-
if (IsMappedResult
|
|
17555
|
+
if (IsMappedResult(type)) return RequiredFromMappedResult(type, options);
|
|
17546
17556
|
else return CreateType({
|
|
17547
17557
|
...RequiredResolve(type),
|
|
17548
17558
|
...options
|
|
@@ -17567,11 +17577,11 @@ function RequiredFromMappedResult(R, options) {
|
|
|
17567
17577
|
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs
|
|
17568
17578
|
function DereferenceParameters(moduleProperties, types) {
|
|
17569
17579
|
return types.map((type) => {
|
|
17570
|
-
return IsRef
|
|
17580
|
+
return IsRef(type) ? Dereference(moduleProperties, type.$ref) : FromType(moduleProperties, type);
|
|
17571
17581
|
});
|
|
17572
17582
|
}
|
|
17573
17583
|
function Dereference(moduleProperties, ref) {
|
|
17574
|
-
return ref in moduleProperties ? IsRef
|
|
17584
|
+
return ref in moduleProperties ? IsRef(moduleProperties[ref]) ? Dereference(moduleProperties, moduleProperties[ref].$ref) : FromType(moduleProperties, moduleProperties[ref]) : Never();
|
|
17575
17585
|
}
|
|
17576
17586
|
function FromAwaited(parameters) {
|
|
17577
17587
|
return Awaited(parameters[0]);
|
|
@@ -17631,7 +17641,7 @@ function FromRecord(moduleProperties, type) {
|
|
|
17631
17641
|
return result;
|
|
17632
17642
|
}
|
|
17633
17643
|
function FromTransform(moduleProperties, transform) {
|
|
17634
|
-
return IsRef
|
|
17644
|
+
return IsRef(transform) ? {
|
|
17635
17645
|
...Dereference(moduleProperties, transform.$ref),
|
|
17636
17646
|
[TransformKind]: transform[TransformKind]
|
|
17637
17647
|
} : transform;
|
|
@@ -17646,7 +17656,7 @@ function FromTypes(moduleProperties, types) {
|
|
|
17646
17656
|
return types.map((type) => FromType(moduleProperties, type));
|
|
17647
17657
|
}
|
|
17648
17658
|
function FromType(moduleProperties, type) {
|
|
17649
|
-
return IsOptional
|
|
17659
|
+
return IsOptional(type) ? CreateType(FromType(moduleProperties, Discard(type, [OptionalKind])), type) : IsReadonly(type) ? CreateType(FromType(moduleProperties, Discard(type, [ReadonlyKind])), type) : IsTransform(type) ? CreateType(FromTransform(moduleProperties, type), type) : IsArray(type) ? CreateType(FromArray(moduleProperties, type.items), type) : IsAsyncIterator(type) ? CreateType(FromAsyncIterator(moduleProperties, type.items), type) : IsComputed(type) ? CreateType(FromComputed(moduleProperties, type.target, type.parameters)) : IsConstructor(type) ? CreateType(FromConstructor(moduleProperties, type.parameters, type.returns), type) : IsFunction(type) ? CreateType(FromFunction(moduleProperties, type.parameters, type.returns), type) : IsIntersect(type) ? CreateType(FromIntersect(moduleProperties, type.allOf), type) : IsIterator(type) ? CreateType(FromIterator(moduleProperties, type.items), type) : IsObject(type) ? CreateType(FromObject(moduleProperties, type.properties), type) : IsRecord(type) ? CreateType(FromRecord(moduleProperties, type)) : IsTuple(type) ? CreateType(FromTuple(moduleProperties, type.items || []), type) : IsUnion(type) ? CreateType(FromUnion(moduleProperties, type.anyOf), type) : type;
|
|
17650
17660
|
}
|
|
17651
17661
|
function ComputeType(moduleProperties, key) {
|
|
17652
17662
|
return key in moduleProperties ? FromType(moduleProperties, moduleProperties[key]) : Never();
|
|
@@ -17711,7 +17721,7 @@ function Not(type, options) {
|
|
|
17711
17721
|
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs
|
|
17712
17722
|
/** `[JavaScript]` Extracts the Parameters from the given Function type */
|
|
17713
17723
|
function Parameters(schema, options) {
|
|
17714
|
-
return IsFunction
|
|
17724
|
+
return IsFunction(schema) ? Tuple(schema.parameters, options) : Never();
|
|
17715
17725
|
}
|
|
17716
17726
|
|
|
17717
17727
|
//#endregion
|
|
@@ -17747,7 +17757,7 @@ function RegExp$1(unresolved, options) {
|
|
|
17747
17757
|
//#endregion
|
|
17748
17758
|
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs
|
|
17749
17759
|
function RestResolve(T) {
|
|
17750
|
-
return IsIntersect
|
|
17760
|
+
return IsIntersect(T) ? T.allOf : IsUnion(T) ? T.anyOf : IsTuple(T) ? T.items ?? [] : [];
|
|
17751
17761
|
}
|
|
17752
17762
|
/** `[Json]` Extracts interior Rest elements from Tuple, Intersect and Union types */
|
|
17753
17763
|
function Rest(T) {
|
|
@@ -17758,7 +17768,7 @@ function Rest(T) {
|
|
|
17758
17768
|
//#region node_modules/.pnpm/@sinclair+typebox@0.34.49/node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs
|
|
17759
17769
|
/** `[JavaScript]` Extracts the ReturnType from the given Function type */
|
|
17760
17770
|
function ReturnType(schema, options) {
|
|
17761
|
-
return IsFunction
|
|
17771
|
+
return IsFunction(schema) ? CreateType(schema.returns, options) : Never(options);
|
|
17762
17772
|
}
|
|
17763
17773
|
|
|
17764
17774
|
//#endregion
|
|
@@ -17799,7 +17809,7 @@ var TransformEncodeBuilder = class {
|
|
|
17799
17809
|
};
|
|
17800
17810
|
}
|
|
17801
17811
|
Encode(encode) {
|
|
17802
|
-
return IsTransform
|
|
17812
|
+
return IsTransform(this.schema) ? this.EncodeTransform(encode, this.schema) : this.EncodeSchema(encode, this.schema);
|
|
17803
17813
|
}
|
|
17804
17814
|
};
|
|
17805
17815
|
/** `[Json]` Creates a Transform type */
|
|
@@ -17897,7 +17907,7 @@ var type_exports = /* @__PURE__ */ __exportAll({
|
|
|
17897
17907
|
const Type = type_exports;
|
|
17898
17908
|
|
|
17899
17909
|
//#endregion
|
|
17900
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
17910
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/error.js
|
|
17901
17911
|
var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17902
17912
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
17903
17913
|
/**
|
|
@@ -17945,7 +17955,7 @@ var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17945
17955
|
}));
|
|
17946
17956
|
|
|
17947
17957
|
//#endregion
|
|
17948
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
17958
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/math.js
|
|
17949
17959
|
var require_math = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
17950
17960
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
17951
17961
|
/**
|
|
@@ -18047,7 +18057,7 @@ var require_math = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18047
18057
|
}));
|
|
18048
18058
|
|
|
18049
18059
|
//#endregion
|
|
18050
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18060
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/buffer.js
|
|
18051
18061
|
var require_buffer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18052
18062
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18053
18063
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -18084,7 +18094,7 @@ var require_buffer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18084
18094
|
}));
|
|
18085
18095
|
|
|
18086
18096
|
//#endregion
|
|
18087
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18097
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/json.js
|
|
18088
18098
|
var require_json = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18089
18099
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18090
18100
|
/**
|
|
@@ -18100,20 +18110,26 @@ var require_json = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18100
18110
|
}));
|
|
18101
18111
|
|
|
18102
18112
|
//#endregion
|
|
18103
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18113
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/node/os.js
|
|
18104
18114
|
var require_os = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18105
18115
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18106
|
-
const
|
|
18107
|
-
let cachedOs;
|
|
18116
|
+
const nodeOs = require_runtime$11().IS_NODE ? /*@__PURE__*/ require("os") : void 0;
|
|
18108
18117
|
function getNodeOs() {
|
|
18109
|
-
|
|
18110
|
-
return cachedOs ??= /*@__PURE__*/ require("node:os");
|
|
18118
|
+
return nodeOs;
|
|
18111
18119
|
}
|
|
18120
|
+
const osArch = nodeOs?.arch;
|
|
18121
|
+
const osHomedir = nodeOs?.homedir;
|
|
18122
|
+
const osPlatform = nodeOs?.platform;
|
|
18123
|
+
const osTmpdir = nodeOs?.tmpdir;
|
|
18112
18124
|
exports.getNodeOs = getNodeOs;
|
|
18125
|
+
exports.osArch = osArch;
|
|
18126
|
+
exports.osHomedir = osHomedir;
|
|
18127
|
+
exports.osPlatform = osPlatform;
|
|
18128
|
+
exports.osTmpdir = osTmpdir;
|
|
18113
18129
|
}));
|
|
18114
18130
|
|
|
18115
18131
|
//#endregion
|
|
18116
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18132
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/constants/platform.js
|
|
18117
18133
|
var require_platform$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18118
18134
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18119
18135
|
const require_node_os = require_os();
|
|
@@ -18211,7 +18227,7 @@ var require_platform$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18211
18227
|
}));
|
|
18212
18228
|
|
|
18213
18229
|
//#endregion
|
|
18214
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18230
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/paths/_internal.js
|
|
18215
18231
|
var require__internal$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18216
18232
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18217
18233
|
const require_primordials_buffer = require_buffer();
|
|
@@ -18296,7 +18312,7 @@ var require__internal$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18296
18312
|
}));
|
|
18297
18313
|
|
|
18298
18314
|
//#endregion
|
|
18299
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18315
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/array.js
|
|
18300
18316
|
var require_array = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18301
18317
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18302
18318
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -18436,33 +18452,57 @@ var require_array = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18436
18452
|
}));
|
|
18437
18453
|
|
|
18438
18454
|
//#endregion
|
|
18439
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18455
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/node/fs.js
|
|
18440
18456
|
var require_fs$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18441
18457
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18442
|
-
const
|
|
18443
|
-
let cachedFs;
|
|
18458
|
+
const nodeFs = require_runtime$11().IS_NODE ? /*@__PURE__*/ require("fs") : void 0;
|
|
18444
18459
|
function getNodeFs() {
|
|
18445
|
-
|
|
18446
|
-
|
|
18447
|
-
|
|
18460
|
+
return nodeFs;
|
|
18461
|
+
}
|
|
18462
|
+
const fsAccessSync = nodeFs?.accessSync;
|
|
18463
|
+
const fsExistsSync = nodeFs?.existsSync;
|
|
18464
|
+
const fsMkdirSync = nodeFs?.mkdirSync;
|
|
18465
|
+
const fsReadFileSync = nodeFs?.readFileSync;
|
|
18466
|
+
const fsRealpathSync = nodeFs?.realpathSync;
|
|
18467
|
+
const fsStatSync = nodeFs?.statSync;
|
|
18468
|
+
const fsWriteFileSync = nodeFs?.writeFileSync;
|
|
18469
|
+
exports.fsAccessSync = fsAccessSync;
|
|
18470
|
+
exports.fsExistsSync = fsExistsSync;
|
|
18471
|
+
exports.fsMkdirSync = fsMkdirSync;
|
|
18472
|
+
exports.fsReadFileSync = fsReadFileSync;
|
|
18473
|
+
exports.fsRealpathSync = fsRealpathSync;
|
|
18474
|
+
exports.fsStatSync = fsStatSync;
|
|
18475
|
+
exports.fsWriteFileSync = fsWriteFileSync;
|
|
18448
18476
|
exports.getNodeFs = getNodeFs;
|
|
18449
18477
|
}));
|
|
18450
18478
|
|
|
18451
18479
|
//#endregion
|
|
18452
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18480
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/node/path.js
|
|
18453
18481
|
var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18454
18482
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18455
|
-
const
|
|
18456
|
-
let cachedPath;
|
|
18483
|
+
const nodePath = require_runtime$11().IS_NODE ? /*@__PURE__*/ require("path") : void 0;
|
|
18457
18484
|
function getNodePath() {
|
|
18458
|
-
|
|
18459
|
-
|
|
18460
|
-
|
|
18485
|
+
return nodePath;
|
|
18486
|
+
}
|
|
18487
|
+
const pathBasename = nodePath?.basename;
|
|
18488
|
+
const pathDirname = nodePath?.dirname;
|
|
18489
|
+
const pathExtname = nodePath?.extname;
|
|
18490
|
+
const pathIsAbsolute = nodePath?.isAbsolute;
|
|
18491
|
+
const pathJoin = nodePath?.join;
|
|
18492
|
+
const pathRelative = nodePath?.relative;
|
|
18493
|
+
const pathResolve = nodePath?.resolve;
|
|
18461
18494
|
exports.getNodePath = getNodePath;
|
|
18495
|
+
exports.pathBasename = pathBasename;
|
|
18496
|
+
exports.pathDirname = pathDirname;
|
|
18497
|
+
exports.pathExtname = pathExtname;
|
|
18498
|
+
exports.pathIsAbsolute = pathIsAbsolute;
|
|
18499
|
+
exports.pathJoin = pathJoin;
|
|
18500
|
+
exports.pathRelative = pathRelative;
|
|
18501
|
+
exports.pathResolve = pathResolve;
|
|
18462
18502
|
}));
|
|
18463
18503
|
|
|
18464
18504
|
//#endregion
|
|
18465
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18505
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/globals.js
|
|
18466
18506
|
var require_globals = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18467
18507
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18468
18508
|
/**
|
|
@@ -18498,7 +18538,7 @@ var require_globals = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18498
18538
|
}));
|
|
18499
18539
|
|
|
18500
18540
|
//#endregion
|
|
18501
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18541
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/reflect.js
|
|
18502
18542
|
var require_reflect = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18503
18543
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18504
18544
|
/**
|
|
@@ -18535,14 +18575,14 @@ var require_reflect = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18535
18575
|
}));
|
|
18536
18576
|
|
|
18537
18577
|
//#endregion
|
|
18538
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18578
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/objects/mutate.js
|
|
18539
18579
|
var require_mutate = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18540
18580
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18541
18581
|
const require_primordials_error = require_error();
|
|
18542
|
-
require_sentinels();
|
|
18543
|
-
const require_primordials_reflect = require_reflect();
|
|
18544
18582
|
const require_arrays_predicates = require_predicates$3();
|
|
18545
18583
|
const require_objects_predicates = require_predicates$2();
|
|
18584
|
+
require_sentinels();
|
|
18585
|
+
const require_primordials_reflect = require_reflect();
|
|
18546
18586
|
/**
|
|
18547
18587
|
* @file Object mutation helpers — `merge` (deep recursive), `objectAssign`
|
|
18548
18588
|
* (alias for native), `objectFreeze` (alias for native). `merge` includes
|
|
@@ -18634,7 +18674,7 @@ var require_mutate = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18634
18674
|
}));
|
|
18635
18675
|
|
|
18636
18676
|
//#endregion
|
|
18637
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18677
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/process/abort.js
|
|
18638
18678
|
var require_abort$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18639
18679
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18640
18680
|
/**
|
|
@@ -18668,7 +18708,7 @@ var require_abort$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18668
18708
|
}));
|
|
18669
18709
|
|
|
18670
18710
|
//#endregion
|
|
18671
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18711
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/promises/_internal.js
|
|
18672
18712
|
var require__internal$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18673
18713
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18674
18714
|
const require_constants_runtime = require_runtime$11();
|
|
@@ -18696,7 +18736,7 @@ var require__internal$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18696
18736
|
}));
|
|
18697
18737
|
|
|
18698
18738
|
//#endregion
|
|
18699
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18739
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/promises/options.js
|
|
18700
18740
|
var require_options$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18701
18741
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18702
18742
|
const require_primordials_math = require_math();
|
|
@@ -18822,7 +18862,7 @@ var require_options$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18822
18862
|
}));
|
|
18823
18863
|
|
|
18824
18864
|
//#endregion
|
|
18825
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
18865
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/promises/retry.js
|
|
18826
18866
|
var require_retry = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18827
18867
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18828
18868
|
const require_primordials_math = require_math();
|
|
@@ -18979,7 +19019,46 @@ var require_retry = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18979
19019
|
}));
|
|
18980
19020
|
|
|
18981
19021
|
//#endregion
|
|
18982
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
19022
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/env/home.js
|
|
19023
|
+
var require_home$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19024
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19025
|
+
const require_env_rewire = require_rewire$2();
|
|
19026
|
+
/**
|
|
19027
|
+
* @file HOME environment variable getter with Windows fallback. Returns the
|
|
19028
|
+
* user's home directory. On Windows, HOME is typically unset — fall back to
|
|
19029
|
+
* USERPROFILE before giving up, matching the resolution order used by npm,
|
|
19030
|
+
* git, and Node's os.homedir().
|
|
19031
|
+
*/
|
|
19032
|
+
/**
|
|
19033
|
+
* Returns the user's home directory path.
|
|
19034
|
+
*
|
|
19035
|
+
* Resolution order:
|
|
19036
|
+
*
|
|
19037
|
+
* 1. `$HOME` (POSIX, and sometimes set on Windows by shells like Git Bash)
|
|
19038
|
+
* 2. `$USERPROFILE` (Windows default, e.g. `C:\Users\alice`)
|
|
19039
|
+
*
|
|
19040
|
+
* Returns `undefined` only when neither is set, which on modern systems is
|
|
19041
|
+
* exceedingly rare outside of sandboxed or minimal-env test harnesses.
|
|
19042
|
+
*
|
|
19043
|
+
* @example
|
|
19044
|
+
* ;```typescript
|
|
19045
|
+
* import { getHome } from '@socketsecurity/lib/env/home'
|
|
19046
|
+
*
|
|
19047
|
+
* const home = getHome()
|
|
19048
|
+
* // POSIX: '/Users/alice'
|
|
19049
|
+
* // Windows: 'C:\\Users\\alice'
|
|
19050
|
+
* ```
|
|
19051
|
+
*
|
|
19052
|
+
* @returns The user's home directory path, or `undefined` if not resolvable
|
|
19053
|
+
*/
|
|
19054
|
+
function getHome() {
|
|
19055
|
+
return require_env_rewire.getEnvValue("HOME") ?? require_env_rewire.getEnvValue("USERPROFILE");
|
|
19056
|
+
}
|
|
19057
|
+
exports.getHome = getHome;
|
|
19058
|
+
}));
|
|
19059
|
+
|
|
19060
|
+
//#endregion
|
|
19061
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/strings/search.js
|
|
18983
19062
|
var require_search = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
18984
19063
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
18985
19064
|
const require_primordials_math = require_math();
|
|
@@ -19032,7 +19111,7 @@ var require_search = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19032
19111
|
}));
|
|
19033
19112
|
|
|
19034
19113
|
//#endregion
|
|
19035
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
19114
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/paths/conversion.js
|
|
19036
19115
|
var require_conversion = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19037
19116
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19038
19117
|
const require_constants_platform = require_platform$1();
|
|
@@ -19148,7 +19227,7 @@ var require_conversion = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19148
19227
|
}));
|
|
19149
19228
|
|
|
19150
19229
|
//#endregion
|
|
19151
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
19230
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/regexp.js
|
|
19152
19231
|
var require_regexp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19153
19232
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19154
19233
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -19175,7 +19254,7 @@ var require_regexp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19175
19254
|
}));
|
|
19176
19255
|
|
|
19177
19256
|
//#endregion
|
|
19178
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
19257
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/paths/predicates.js
|
|
19179
19258
|
var require_predicates$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19180
19259
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19181
19260
|
const require_constants_platform = require_platform$1();
|
|
@@ -19366,14 +19445,9 @@ var require_predicates$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19366
19445
|
}));
|
|
19367
19446
|
|
|
19368
19447
|
//#endregion
|
|
19369
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
19448
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/paths/resolve.js
|
|
19370
19449
|
var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19371
19450
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19372
|
-
const require_constants_platform = require_platform$1();
|
|
19373
|
-
const require_primordials_string = require_string();
|
|
19374
|
-
require__internal$4();
|
|
19375
|
-
const require_paths_predicates = require_predicates$1();
|
|
19376
|
-
const require_paths_normalize = require_normalize$1();
|
|
19377
19451
|
/**
|
|
19378
19452
|
* @file Path resolution utilities — `resolve`, `relative`, `relativeResolve`.
|
|
19379
19453
|
* Split out of `paths/normalize.ts` for size hygiene.
|
|
@@ -19410,7 +19484,7 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19410
19484
|
const actualTo = resolve(to);
|
|
19411
19485
|
if (actualFrom === actualTo) return "";
|
|
19412
19486
|
/* c8 ignore start - Windows-only case-insensitive comparison. */
|
|
19413
|
-
if (
|
|
19487
|
+
if (WIN32) {
|
|
19414
19488
|
if (actualFrom.toLowerCase() === actualTo.toLowerCase()) return "";
|
|
19415
19489
|
}
|
|
19416
19490
|
/* c8 ignore stop */
|
|
@@ -19423,32 +19497,32 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19423
19497
|
let lastCommonSep = -1;
|
|
19424
19498
|
let i = 0;
|
|
19425
19499
|
for (; i < length; i += 1) {
|
|
19426
|
-
let fromCode =
|
|
19427
|
-
let toCode =
|
|
19500
|
+
let fromCode = StringPrototypeCharCodeAt(actualFrom, fromStart + i);
|
|
19501
|
+
let toCode = StringPrototypeCharCodeAt(actualTo, toStart + i);
|
|
19428
19502
|
/* c8 ignore start - Windows-only case folding. */
|
|
19429
|
-
if (
|
|
19430
|
-
if (fromCode >=
|
|
19431
|
-
if (toCode >=
|
|
19503
|
+
if (WIN32) {
|
|
19504
|
+
if (fromCode >= CHAR_UPPERCASE_A && fromCode <= CHAR_UPPERCASE_Z) fromCode += 32;
|
|
19505
|
+
if (toCode >= CHAR_UPPERCASE_A && toCode <= CHAR_UPPERCASE_Z) toCode += 32;
|
|
19432
19506
|
}
|
|
19433
19507
|
/* c8 ignore stop */
|
|
19434
19508
|
if (fromCode !== toCode) break;
|
|
19435
|
-
if (
|
|
19509
|
+
if (isPathSeparator(StringPrototypeCharCodeAt(actualFrom, fromStart + i))) lastCommonSep = i;
|
|
19436
19510
|
}
|
|
19437
19511
|
/* c8 ignore start */
|
|
19438
19512
|
if (i === length) {
|
|
19439
19513
|
if (toLen > length) {
|
|
19440
|
-
if (
|
|
19514
|
+
if (isPathSeparator(StringPrototypeCharCodeAt(actualTo, toStart + i))) return actualTo.slice(toStart + i + 1);
|
|
19441
19515
|
if (i === 0) return actualTo.slice(toStart + i);
|
|
19442
19516
|
} else if (fromLen > length) {
|
|
19443
|
-
if (
|
|
19517
|
+
if (isPathSeparator(StringPrototypeCharCodeAt(actualFrom, fromStart + i))) lastCommonSep = i;
|
|
19444
19518
|
else if (i === 0) lastCommonSep = 0;
|
|
19445
19519
|
}
|
|
19446
19520
|
}
|
|
19447
19521
|
/* c8 ignore stop */
|
|
19448
19522
|
let out = "";
|
|
19449
19523
|
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; i += 1) {
|
|
19450
|
-
const code =
|
|
19451
|
-
if (i === fromEnd ||
|
|
19524
|
+
const code = StringPrototypeCharCodeAt(actualFrom, i);
|
|
19525
|
+
if (i === fromEnd || isPathSeparator(code)) out += out.length === 0 ? ".." : "/..";
|
|
19452
19526
|
}
|
|
19453
19527
|
return out + actualTo.slice(toStart + lastCommonSep);
|
|
19454
19528
|
}
|
|
@@ -19474,7 +19548,7 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19474
19548
|
function relativeResolve(from, to) {
|
|
19475
19549
|
const rel = relative(from, to);
|
|
19476
19550
|
if (rel === "") return "";
|
|
19477
|
-
return
|
|
19551
|
+
return normalizePath(rel);
|
|
19478
19552
|
}
|
|
19479
19553
|
/**
|
|
19480
19554
|
* Resolve an absolute path from path segments.
|
|
@@ -19503,11 +19577,11 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19503
19577
|
/* c8 ignore start */
|
|
19504
19578
|
if (typeof segment !== "string" || segment.length === 0) continue;
|
|
19505
19579
|
resolvedPath = segment + (resolvedPath.length === 0 ? "" : `/${resolvedPath}`);
|
|
19506
|
-
resolvedAbsolute =
|
|
19580
|
+
resolvedAbsolute = isAbsolute(segment);
|
|
19507
19581
|
}
|
|
19508
19582
|
if (!resolvedAbsolute) resolvedPath = /* @__PURE__ */ require("node:process").cwd() + (resolvedPath.length === 0 ? "" : `/${resolvedPath}`);
|
|
19509
19583
|
/* c8 ignore stop */
|
|
19510
|
-
return
|
|
19584
|
+
return normalizePath(resolvedPath);
|
|
19511
19585
|
}
|
|
19512
19586
|
exports.relative = relative;
|
|
19513
19587
|
exports.relativeResolve = relativeResolve;
|
|
@@ -19515,7 +19589,7 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19515
19589
|
}));
|
|
19516
19590
|
|
|
19517
19591
|
//#endregion
|
|
19518
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
19592
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/paths/normalize.js
|
|
19519
19593
|
var require_normalize$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19520
19594
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19521
19595
|
const require_constants_platform = require_platform$1();
|
|
@@ -19735,21 +19809,7 @@ var require_normalize$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19735
19809
|
}));
|
|
19736
19810
|
|
|
19737
19811
|
//#endregion
|
|
19738
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
19739
|
-
var require_github$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19740
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19741
|
-
/**
|
|
19742
|
-
* @file GitHub API and cache constants. Provides the GitHub REST API base URL
|
|
19743
|
-
* and the cache subdirectory name used for persisting GitHub responses.
|
|
19744
|
-
*/
|
|
19745
|
-
const GITHUB_API_BASE_URL = "https://api.github.com";
|
|
19746
|
-
const CACHE_GITHUB_DIR = "github";
|
|
19747
|
-
exports.CACHE_GITHUB_DIR = CACHE_GITHUB_DIR;
|
|
19748
|
-
exports.GITHUB_API_BASE_URL = GITHUB_API_BASE_URL;
|
|
19749
|
-
}));
|
|
19750
|
-
|
|
19751
|
-
//#endregion
|
|
19752
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.7/node_modules/@socketsecurity/lib/dist/constants/socket.js
|
|
19812
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/constants/socket.js
|
|
19753
19813
|
var require_socket$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19754
19814
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19755
19815
|
/**
|
|
@@ -19775,14 +19835,16 @@ var require_socket$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19775
19835
|
const SOCKET_REGISTRY_REPO_NAME = "socket-registry";
|
|
19776
19836
|
const SOCKET_REGISTRY_PACKAGE_NAME = "@socketsecurity/registry";
|
|
19777
19837
|
const SOCKET_REGISTRY_NPM_ORG = "socketregistry";
|
|
19778
|
-
const
|
|
19779
|
-
const
|
|
19780
|
-
|
|
19781
|
-
|
|
19782
|
-
|
|
19783
|
-
|
|
19838
|
+
const SOCKET_DIR_PREFIX = "_";
|
|
19839
|
+
const SOCKET_DIR = {
|
|
19840
|
+
__proto__: null,
|
|
19841
|
+
cacache: `_cacache`,
|
|
19842
|
+
dlx: `_dlx`,
|
|
19843
|
+
state: `_state`,
|
|
19844
|
+
wheelhouse: `_wheelhouse`
|
|
19845
|
+
};
|
|
19784
19846
|
const SOCKET_LIB_NAME = "@socketsecurity/lib";
|
|
19785
|
-
const SOCKET_LIB_VERSION = "6.0.
|
|
19847
|
+
const SOCKET_LIB_VERSION = "6.0.8";
|
|
19786
19848
|
const SOCKET_IPC_HANDSHAKE = "SOCKET_IPC_HANDSHAKE";
|
|
19787
19849
|
const CACHE_SOCKET_API_DIR = "socket-api";
|
|
19788
19850
|
const REGISTRY = "registry";
|
|
@@ -19792,14 +19854,12 @@ var require_socket$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19792
19854
|
exports.REGISTRY_SCOPE_DELIMITER = REGISTRY_SCOPE_DELIMITER;
|
|
19793
19855
|
exports.SOCKET_API_BASE_URL = SOCKET_API_BASE_URL;
|
|
19794
19856
|
exports.SOCKET_API_TOKENS_URL = SOCKET_API_TOKENS_URL;
|
|
19795
|
-
exports.SOCKET_APP_PREFIX = SOCKET_APP_PREFIX;
|
|
19796
|
-
exports.SOCKET_CLI_APP_NAME = SOCKET_CLI_APP_NAME;
|
|
19797
19857
|
exports.SOCKET_CONTACT_URL = SOCKET_CONTACT_URL;
|
|
19798
19858
|
exports.SOCKET_DASHBOARD_URL = SOCKET_DASHBOARD_URL;
|
|
19799
|
-
exports.
|
|
19859
|
+
exports.SOCKET_DIR = SOCKET_DIR;
|
|
19860
|
+
exports.SOCKET_DIR_PREFIX = SOCKET_DIR_PREFIX;
|
|
19800
19861
|
exports.SOCKET_DOCS_CONTACT_URL = SOCKET_DOCS_CONTACT_URL;
|
|
19801
19862
|
exports.SOCKET_DOCS_URL = SOCKET_DOCS_URL;
|
|
19802
|
-
exports.SOCKET_FIREWALL_APP_NAME = SOCKET_FIREWALL_APP_NAME;
|
|
19803
19863
|
exports.SOCKET_GITHUB_ORG = SOCKET_GITHUB_ORG;
|
|
19804
19864
|
exports.SOCKET_IPC_HANDSHAKE = SOCKET_IPC_HANDSHAKE;
|
|
19805
19865
|
exports.SOCKET_LIB_NAME = SOCKET_LIB_NAME;
|
|
@@ -19808,7 +19868,6 @@ var require_socket$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19808
19868
|
exports.SOCKET_PRICING_URL = SOCKET_PRICING_URL;
|
|
19809
19869
|
exports.SOCKET_PUBLIC_API_KEY = SOCKET_PUBLIC_API_KEY;
|
|
19810
19870
|
exports.SOCKET_PUBLIC_API_TOKEN = SOCKET_PUBLIC_API_TOKEN;
|
|
19811
|
-
exports.SOCKET_REGISTRY_APP_NAME = SOCKET_REGISTRY_APP_NAME;
|
|
19812
19871
|
exports.SOCKET_REGISTRY_NPM_ORG = SOCKET_REGISTRY_NPM_ORG;
|
|
19813
19872
|
exports.SOCKET_REGISTRY_PACKAGE_NAME = SOCKET_REGISTRY_PACKAGE_NAME;
|
|
19814
19873
|
exports.SOCKET_REGISTRY_REPO_NAME = SOCKET_REGISTRY_REPO_NAME;
|
|
@@ -19816,50 +19875,10 @@ var require_socket$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19816
19875
|
exports.SOCKET_SECURITY_SCOPE = SOCKET_SECURITY_SCOPE;
|
|
19817
19876
|
exports.SOCKET_STATUS_URL = SOCKET_STATUS_URL;
|
|
19818
19877
|
exports.SOCKET_WEBSITE_URL = SOCKET_WEBSITE_URL;
|
|
19819
|
-
exports.SOCKET_WHEELHOUSE_APP_NAME = SOCKET_WHEELHOUSE_APP_NAME;
|
|
19820
19878
|
}));
|
|
19821
19879
|
|
|
19822
19880
|
//#endregion
|
|
19823
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
19824
|
-
var require_home$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19825
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19826
|
-
const require_env_rewire = require_rewire$2();
|
|
19827
|
-
/**
|
|
19828
|
-
* @file HOME environment variable getter with Windows fallback. Returns the
|
|
19829
|
-
* user's home directory. On Windows, HOME is typically unset — fall back to
|
|
19830
|
-
* USERPROFILE before giving up, matching the resolution order used by npm,
|
|
19831
|
-
* git, and Node's os.homedir().
|
|
19832
|
-
*/
|
|
19833
|
-
/**
|
|
19834
|
-
* Returns the user's home directory path.
|
|
19835
|
-
*
|
|
19836
|
-
* Resolution order:
|
|
19837
|
-
*
|
|
19838
|
-
* 1. `$HOME` (POSIX, and sometimes set on Windows by shells like Git Bash)
|
|
19839
|
-
* 2. `$USERPROFILE` (Windows default, e.g. `C:\Users\alice`)
|
|
19840
|
-
*
|
|
19841
|
-
* Returns `undefined` only when neither is set, which on modern systems is
|
|
19842
|
-
* exceedingly rare outside of sandboxed or minimal-env test harnesses.
|
|
19843
|
-
*
|
|
19844
|
-
* @example
|
|
19845
|
-
* ;```typescript
|
|
19846
|
-
* import { getHome } from '@socketsecurity/lib/env/home'
|
|
19847
|
-
*
|
|
19848
|
-
* const home = getHome()
|
|
19849
|
-
* // POSIX: '/Users/alice'
|
|
19850
|
-
* // Windows: 'C:\\Users\\alice'
|
|
19851
|
-
* ```
|
|
19852
|
-
*
|
|
19853
|
-
* @returns The user's home directory path, or `undefined` if not resolvable
|
|
19854
|
-
*/
|
|
19855
|
-
function getHome() {
|
|
19856
|
-
return require_env_rewire.getEnvValue("HOME") ?? require_env_rewire.getEnvValue("USERPROFILE");
|
|
19857
|
-
}
|
|
19858
|
-
exports.getHome = getHome;
|
|
19859
|
-
}));
|
|
19860
|
-
|
|
19861
|
-
//#endregion
|
|
19862
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.7/node_modules/@socketsecurity/lib/dist/env/windows.js
|
|
19881
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/env/windows.js
|
|
19863
19882
|
var require_windows$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19864
19883
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19865
19884
|
const require_env_rewire = require_rewire$2();
|
|
@@ -19941,7 +19960,7 @@ var require_windows$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19941
19960
|
}));
|
|
19942
19961
|
|
|
19943
19962
|
//#endregion
|
|
19944
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
19963
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/paths/dirnames.js
|
|
19945
19964
|
var require_dirnames$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19946
19965
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19947
19966
|
/**
|
|
@@ -19953,6 +19972,7 @@ var require_dirnames$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19953
19972
|
const DOT_SOCKET_DIR = ".socket";
|
|
19954
19973
|
const CACHE_DIR = "cache";
|
|
19955
19974
|
const CACHE_TTL_DIR = "ttl";
|
|
19975
|
+
const RUN_DIR = "run";
|
|
19956
19976
|
const NODE_MODULES_GLOB_RECURSIVE = "**/node_modules";
|
|
19957
19977
|
const SLASH_NODE_MODULES_SLASH = "/node_modules/";
|
|
19958
19978
|
exports.CACHE_DIR = CACHE_DIR;
|
|
@@ -19962,11 +19982,12 @@ var require_dirnames$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19962
19982
|
exports.DOT_SOCKET_DIR = DOT_SOCKET_DIR;
|
|
19963
19983
|
exports.NODE_MODULES = NODE_MODULES;
|
|
19964
19984
|
exports.NODE_MODULES_GLOB_RECURSIVE = NODE_MODULES_GLOB_RECURSIVE;
|
|
19985
|
+
exports.RUN_DIR = RUN_DIR;
|
|
19965
19986
|
exports.SLASH_NODE_MODULES_SLASH = SLASH_NODE_MODULES_SLASH;
|
|
19966
19987
|
}));
|
|
19967
19988
|
|
|
19968
19989
|
//#endregion
|
|
19969
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
19990
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/paths/rewire.js
|
|
19970
19991
|
var require_rewire$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
19971
19992
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
19972
19993
|
const require_primordials_map_set = require_map_set();
|
|
@@ -20094,35 +20115,36 @@ var require_rewire$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20094
20115
|
}));
|
|
20095
20116
|
|
|
20096
20117
|
//#endregion
|
|
20097
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
20118
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/paths/socket.js
|
|
20098
20119
|
var require_socket$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20099
20120
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
20100
20121
|
const require_node_os = require_os();
|
|
20122
|
+
const require_env_home = require_home$1();
|
|
20101
20123
|
const require_paths_normalize = require_normalize$1();
|
|
20102
20124
|
const require_node_path = require_path();
|
|
20103
20125
|
const require_env_socket = require_socket$3();
|
|
20104
|
-
const require_constants_github = require_github$1();
|
|
20105
20126
|
const require_constants_socket = require_socket$2();
|
|
20106
|
-
const require_env_home = require_home$1();
|
|
20107
20127
|
const require_env_windows = require_windows$1();
|
|
20108
20128
|
const require_paths_dirnames = require_dirnames$1();
|
|
20109
20129
|
const require_paths_rewire = require_rewire$1();
|
|
20110
20130
|
/**
|
|
20111
|
-
* @file Path utilities for Socket ecosystem directories.
|
|
20112
|
-
*
|
|
20113
|
-
*
|
|
20114
|
-
*
|
|
20115
|
-
*
|
|
20116
|
-
*
|
|
20117
|
-
*
|
|
20118
|
-
*
|
|
20131
|
+
* @file Path utilities for Socket ecosystem directories. Platform-aware
|
|
20132
|
+
* resolution for the shared ~/.socket/ layout. The `_`-prefixed entries are
|
|
20133
|
+
* Socket-managed DIRS (not apps): `_cacache` content-addressable cache;
|
|
20134
|
+
* `_dlx/<hash>/` name+version binary store (node, jre, python, sfw, …);
|
|
20135
|
+
* `_state/<app>/` version-LESS persistent app state (daemon socket + lock +
|
|
20136
|
+
* OAuth refresh; mirrors pnpm `state-dir` / XDG_STATE_HOME), with
|
|
20137
|
+
* `_state/<app>/run/` for a daemon's socket/lock/pid; `_wheelhouse`
|
|
20138
|
+
* cross-fleet shared bin. Generic per-app dirs (`getSocketAppDir('<name>')`)
|
|
20139
|
+
* nest under the same `_`-prefix.
|
|
20119
20140
|
*/
|
|
20120
20141
|
/**
|
|
20121
20142
|
* Get the OS home directory. Can be overridden in tests using
|
|
20122
20143
|
* setPath('homedir', ...) from paths/rewire.
|
|
20123
20144
|
*/
|
|
20124
20145
|
function getOsHomeDir() {
|
|
20125
|
-
|
|
20146
|
+
const os = require_node_os.getNodeOs();
|
|
20147
|
+
return require_paths_rewire.getPathValue("homedir", () => os.homedir());
|
|
20126
20148
|
}
|
|
20127
20149
|
/**
|
|
20128
20150
|
* Get the OS temporary directory. Can be overridden in tests using
|
|
@@ -20133,7 +20155,8 @@ var require_socket$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20133
20155
|
* setPath('tmpdir', ...) from paths/rewire.
|
|
20134
20156
|
*/
|
|
20135
20157
|
function getOsTmpDir() {
|
|
20136
|
-
|
|
20158
|
+
const os = require_node_os.getNodeOs();
|
|
20159
|
+
return require_paths_rewire.getPathValue("tmpdir", () => os.tmpdir());
|
|
20137
20160
|
}
|
|
20138
20161
|
/**
|
|
20139
20162
|
* Get a Socket app cache directory (~/.socket/_<appName>/cache).
|
|
@@ -20154,81 +20177,72 @@ var require_socket$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20154
20177
|
return require_paths_normalize.normalizePath(require_node_path.getNodePath().join(getSocketAppCacheDir(appName), "ttl"));
|
|
20155
20178
|
}
|
|
20156
20179
|
/**
|
|
20157
|
-
* Get a Socket app directory (~/.socket/_<appName>).
|
|
20180
|
+
* Get a Socket app directory (~/.socket/_<appName>). The `_` prefix is applied
|
|
20181
|
+
* here; pass the bare app name (e.g. 'socket', 'registry').
|
|
20158
20182
|
*/
|
|
20159
20183
|
/**
|
|
20160
|
-
* Get a Socket app directory (~/.socket/_<appName>).
|
|
20184
|
+
* Get a Socket app directory (~/.socket/_<appName>). The `_` prefix is applied
|
|
20185
|
+
* here; pass the bare app name (e.g. 'socket', 'registry').
|
|
20161
20186
|
*/
|
|
20162
20187
|
function getSocketAppDir(appName) {
|
|
20163
20188
|
return require_paths_normalize.normalizePath(require_node_path.getNodePath().join(getSocketUserDir(), `_${appName}`));
|
|
20164
20189
|
}
|
|
20165
20190
|
/**
|
|
20166
|
-
* Get the Socket cacache directory (~/.socket/_cacache).
|
|
20167
|
-
*
|
|
20168
|
-
*
|
|
20169
|
-
*
|
|
20170
|
-
* Priority order:
|
|
20171
|
-
*
|
|
20172
|
-
* 1. Test override via setPath('socket-cacache-dir', ...)
|
|
20173
|
-
* 2. SOCKET_CACACHE_DIR - Full override of cacache directory
|
|
20174
|
-
* 3. Default: $SOCKET_HOME/_cacache or $HOME/.socket/_cacache
|
|
20191
|
+
* Get the Socket cacache directory (~/.socket/_cacache). Override precedence:
|
|
20192
|
+
* setPath('socket-cacache-dir', …) → SOCKET_CACACHE_DIR env →
|
|
20193
|
+
* $SOCKET_HOME/_cacache → $HOME/.socket/_cacache.
|
|
20175
20194
|
*/
|
|
20176
20195
|
/**
|
|
20177
|
-
* Get
|
|
20178
|
-
*
|
|
20179
|
-
* is
|
|
20180
|
-
*
|
|
20181
|
-
* Priority order:
|
|
20182
|
-
*
|
|
20183
|
-
* 1. Test override via setPath('socket-cacache-dir', ...)
|
|
20184
|
-
* 2. SOCKET_CACACHE_DIR - Full override of cacache directory
|
|
20185
|
-
* 3. Default: $SOCKET_HOME/_cacache or $HOME/.socket/_cacache
|
|
20196
|
+
* Get an app's runtime directory (~/.socket/_state/<app>/run/) — the home for a
|
|
20197
|
+
* daemon's Unix socket + `concurrency.lock` + `<socket>.pid`. Version-less so
|
|
20198
|
+
* the socket path is stable across binary upgrades.
|
|
20186
20199
|
*/
|
|
20187
|
-
function
|
|
20188
|
-
return
|
|
20189
|
-
if (require_env_socket.getSocketCacacheDirEnv()) return require_paths_normalize.normalizePath(require_env_socket.getSocketCacacheDirEnv());
|
|
20190
|
-
return require_paths_normalize.normalizePath(require_node_path.getNodePath().join(getSocketUserDir(), `_cacache`));
|
|
20191
|
-
});
|
|
20200
|
+
function getSocketAppRuntimeDir(appName) {
|
|
20201
|
+
return require_paths_normalize.normalizePath(require_node_path.getNodePath().join(getSocketAppStateDir(appName), "run"));
|
|
20192
20202
|
}
|
|
20193
20203
|
/**
|
|
20194
|
-
* Get the Socket
|
|
20204
|
+
* Get the Socket user directory (~/.socket). Override precedence:
|
|
20205
|
+
* setPath('socket-user-dir', …) → SOCKET_HOME env → $HOME/.socket →
|
|
20206
|
+
* /tmp/.socket (Unix) or %TEMP%.socket (Windows).
|
|
20195
20207
|
*/
|
|
20196
20208
|
/**
|
|
20197
|
-
* Get
|
|
20209
|
+
* Get an app's persistent state directory (~/.socket/_state/<app>/). The
|
|
20210
|
+
* `<app>` is a real app (proteus, acorn) nesting its version-less state inside
|
|
20211
|
+
* the `_state` infra dir.
|
|
20198
20212
|
*/
|
|
20199
|
-
function
|
|
20200
|
-
return
|
|
20213
|
+
function getSocketAppStateDir(appName) {
|
|
20214
|
+
return require_paths_normalize.normalizePath(require_node_path.getNodePath().join(getSocketStateDir(), appName));
|
|
20201
20215
|
}
|
|
20202
20216
|
/**
|
|
20203
|
-
* Get
|
|
20204
|
-
*
|
|
20205
|
-
*
|
|
20206
|
-
*
|
|
20207
|
-
* Priority order:
|
|
20208
|
-
*
|
|
20209
|
-
* 1. Test override via setPath('socket-dlx-dir', ...)
|
|
20210
|
-
* 2. SOCKET_DLX_DIR - Full override of DLX cache directory
|
|
20211
|
-
* 3. SOCKET_HOME/_dlx - Base directory override (inherits from getSocketUserDir)
|
|
20212
|
-
* 4. Default: $HOME/.socket/_dlx
|
|
20213
|
-
* 5. Fallback: /tmp/.socket/_dlx (Unix) or %TEMP%.socket_dlx (Windows)
|
|
20217
|
+
* Get an app's runtime directory (~/.socket/_state/<app>/run/) — the home for a
|
|
20218
|
+
* daemon's Unix socket + `concurrency.lock` + `<socket>.pid`. Version-less so
|
|
20219
|
+
* the socket path is stable across binary upgrades.
|
|
20214
20220
|
*/
|
|
20215
20221
|
/**
|
|
20216
|
-
* Get the Socket
|
|
20217
|
-
*
|
|
20218
|
-
*
|
|
20219
|
-
|
|
20220
|
-
|
|
20221
|
-
|
|
20222
|
-
|
|
20223
|
-
|
|
20224
|
-
|
|
20225
|
-
|
|
20226
|
-
|
|
20222
|
+
* Get the Socket cacache directory (~/.socket/_cacache). Override precedence:
|
|
20223
|
+
* setPath('socket-cacache-dir', …) → SOCKET_CACACHE_DIR env →
|
|
20224
|
+
* $SOCKET_HOME/_cacache → $HOME/.socket/_cacache.
|
|
20225
|
+
*/
|
|
20226
|
+
function getSocketCacacheDir() {
|
|
20227
|
+
return require_paths_rewire.getPathValue("socket-cacache-dir", () => {
|
|
20228
|
+
if (require_env_socket.getSocketCacacheDirEnv()) return require_paths_normalize.normalizePath(require_env_socket.getSocketCacacheDirEnv());
|
|
20229
|
+
return require_paths_normalize.normalizePath(require_node_path.getNodePath().join(getSocketUserDir(), require_constants_socket.SOCKET_DIR.cacache));
|
|
20230
|
+
});
|
|
20231
|
+
}
|
|
20232
|
+
/**
|
|
20233
|
+
* Get the Socket DLX directory (~/.socket/_dlx) — the name+version binary store
|
|
20234
|
+
* (node, jre, python, sfw, …). Override precedence: setPath('socket-dlx-dir',
|
|
20235
|
+
* …) → SOCKET_DLX_DIR env → $SOCKET_HOME/_dlx → $HOME/.socket/_dlx.
|
|
20236
|
+
*/
|
|
20237
|
+
/**
|
|
20238
|
+
* Get the Socket DLX directory (~/.socket/_dlx) — the name+version binary store
|
|
20239
|
+
* (node, jre, python, sfw, …). Override precedence: setPath('socket-dlx-dir',
|
|
20240
|
+
* …) → SOCKET_DLX_DIR env → $SOCKET_HOME/_dlx → $HOME/.socket/_dlx.
|
|
20227
20241
|
*/
|
|
20228
20242
|
function getSocketDlxDir() {
|
|
20229
20243
|
return require_paths_rewire.getPathValue("socket-dlx-dir", () => {
|
|
20230
20244
|
if (require_env_socket.getSocketDlxDirEnv()) return require_paths_normalize.normalizePath(require_env_socket.getSocketDlxDirEnv());
|
|
20231
|
-
return require_paths_normalize.normalizePath(require_node_path.getNodePath().join(getSocketUserDir(),
|
|
20245
|
+
return require_paths_normalize.normalizePath(require_node_path.getNodePath().join(getSocketUserDir(), require_constants_socket.SOCKET_DIR.dlx));
|
|
20232
20246
|
});
|
|
20233
20247
|
}
|
|
20234
20248
|
/**
|
|
@@ -20243,51 +20257,34 @@ var require_socket$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20243
20257
|
return getSocketUserDir();
|
|
20244
20258
|
}
|
|
20245
20259
|
/**
|
|
20246
|
-
* Get the Socket
|
|
20260
|
+
* Get the Socket state directory (~/.socket/_state) — version-LESS persistent
|
|
20261
|
+
* app state (the home for daemon sockets, locks, OAuth refresh, durable caches
|
|
20262
|
+
* that survive version bumps; mirrors pnpm `state-dir` / XDG_STATE_HOME).
|
|
20263
|
+
* Override precedence: setPath('socket-state-dir', …) → SOCKET_STATE_DIR env →
|
|
20264
|
+
* $SOCKET_HOME/_state → $HOME/.socket/_state.
|
|
20247
20265
|
*/
|
|
20248
20266
|
/**
|
|
20249
|
-
* Get the Socket
|
|
20267
|
+
* Get the Socket state directory (~/.socket/_state) — version-LESS persistent
|
|
20268
|
+
* app state (the home for daemon sockets, locks, OAuth refresh, durable caches
|
|
20269
|
+
* that survive version bumps; mirrors pnpm `state-dir` / XDG_STATE_HOME).
|
|
20270
|
+
* Override precedence: setPath('socket-state-dir', …) → SOCKET_STATE_DIR env →
|
|
20271
|
+
* $SOCKET_HOME/_state → $HOME/.socket/_state.
|
|
20250
20272
|
*/
|
|
20251
|
-
function
|
|
20252
|
-
return
|
|
20273
|
+
function getSocketStateDir() {
|
|
20274
|
+
return require_paths_rewire.getPathValue("socket-state-dir", () => {
|
|
20275
|
+
if (require_env_socket.getSocketStateDirEnv()) return require_paths_normalize.normalizePath(require_env_socket.getSocketStateDirEnv());
|
|
20276
|
+
return require_paths_normalize.normalizePath(require_node_path.getNodePath().join(getSocketUserDir(), require_constants_socket.SOCKET_DIR.state));
|
|
20277
|
+
});
|
|
20253
20278
|
}
|
|
20254
20279
|
/**
|
|
20255
|
-
* Get
|
|
20256
|
-
* (
|
|
20280
|
+
* Get an app's persistent state directory (~/.socket/_state/<app>/). The
|
|
20281
|
+
* `<app>` is a real app (proteus, acorn) nesting its version-less state inside
|
|
20282
|
+
* the `_state` infra dir.
|
|
20257
20283
|
*/
|
|
20258
20284
|
/**
|
|
20259
|
-
* Get the Socket
|
|
20260
|
-
* (
|
|
20261
|
-
|
|
20262
|
-
function getSocketRegistryGithubCacheDir() {
|
|
20263
|
-
return require_paths_normalize.normalizePath(require_node_path.getNodePath().join(getSocketAppCacheTtlDir(require_constants_socket.SOCKET_REGISTRY_APP_NAME), require_constants_github.CACHE_GITHUB_DIR));
|
|
20264
|
-
}
|
|
20265
|
-
/**
|
|
20266
|
-
* Get the Socket Wheelhouse directory (~/.socket/_wheelhouse). Shared
|
|
20267
|
-
* cross-fleet location for binaries that every fleet member can reach without
|
|
20268
|
-
* each one re-downloading and re-extracting per-repo. Tool installers (janus,
|
|
20269
|
-
* sfw, etc.) drop their resolved executables under
|
|
20270
|
-
* `<wheelhouse>/<tool>/<version>/<platform-arch>/`; consumers add the
|
|
20271
|
-
* appropriate `bin/` to PATH or invoke the binary by absolute path.
|
|
20272
|
-
*
|
|
20273
|
-
* Priority order:
|
|
20274
|
-
*
|
|
20275
|
-
* 1. Test override via setPath('socket-wheelhouse-dir', ...)
|
|
20276
|
-
* 2. SOCKET_HOME/_wheelhouse - Base directory override (inherits from
|
|
20277
|
-
* getSocketUserDir)
|
|
20278
|
-
* 3. Default: $HOME/.socket/_wheelhouse
|
|
20279
|
-
*/
|
|
20280
|
-
/**
|
|
20281
|
-
* Get the Socket user directory (~/.socket). Can be overridden with SOCKET_HOME
|
|
20282
|
-
* environment variable or via setPath() for testing. Result is cached via
|
|
20283
|
-
* getPathValue for performance.
|
|
20284
|
-
*
|
|
20285
|
-
* Priority order:
|
|
20286
|
-
*
|
|
20287
|
-
* 1. Test override via setPath('socket-user-dir', ...)
|
|
20288
|
-
* 2. SOCKET_HOME - Base directory override
|
|
20289
|
-
* 3. Default: $HOME/.socket
|
|
20290
|
-
* 4. Fallback: /tmp/.socket (Unix) or %TEMP%.socket (Windows)
|
|
20285
|
+
* Get the Socket user directory (~/.socket). Override precedence:
|
|
20286
|
+
* setPath('socket-user-dir', …) → SOCKET_HOME env → $HOME/.socket →
|
|
20287
|
+
* /tmp/.socket (Unix) or %TEMP%.socket (Windows).
|
|
20291
20288
|
*/
|
|
20292
20289
|
function getSocketUserDir() {
|
|
20293
20290
|
return require_paths_rewire.getPathValue("socket-user-dir", () => {
|
|
@@ -20297,12 +20294,14 @@ var require_socket$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20297
20294
|
});
|
|
20298
20295
|
}
|
|
20299
20296
|
/**
|
|
20300
|
-
* Get the
|
|
20301
|
-
*
|
|
20302
|
-
*
|
|
20303
|
-
*
|
|
20304
|
-
*
|
|
20305
|
-
*
|
|
20297
|
+
* Get the Socket Wheelhouse directory (~/.socket/_wheelhouse). Shared
|
|
20298
|
+
* cross-fleet location for binaries that every fleet member can reach without
|
|
20299
|
+
* each one re-downloading and re-extracting per-repo. Tool installers (janus,
|
|
20300
|
+
* sfw, etc.) drop their resolved executables under
|
|
20301
|
+
* `<wheelhouse>/<tool>/<version>/<platform-arch>/`; consumers add the
|
|
20302
|
+
* appropriate `bin/` to PATH or invoke the binary by absolute path. Override
|
|
20303
|
+
* precedence: setPath('socket-wheelhouse-dir', …) → $SOCKET_HOME/_wheelhouse →
|
|
20304
|
+
* $HOME/.socket/_wheelhouse.
|
|
20306
20305
|
*/
|
|
20307
20306
|
/**
|
|
20308
20307
|
* Get the Socket Wheelhouse directory (~/.socket/_wheelhouse). Shared
|
|
@@ -20310,39 +20309,28 @@ var require_socket$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20310
20309
|
* each one re-downloading and re-extracting per-repo. Tool installers (janus,
|
|
20311
20310
|
* sfw, etc.) drop their resolved executables under
|
|
20312
20311
|
* `<wheelhouse>/<tool>/<version>/<platform-arch>/`; consumers add the
|
|
20313
|
-
* appropriate `bin/` to PATH or invoke the binary by absolute path.
|
|
20314
|
-
*
|
|
20315
|
-
*
|
|
20316
|
-
*
|
|
20317
|
-
* 1. Test override via setPath('socket-wheelhouse-dir', ...)
|
|
20318
|
-
* 2. SOCKET_HOME/_wheelhouse - Base directory override (inherits from
|
|
20319
|
-
* getSocketUserDir)
|
|
20320
|
-
* 3. Default: $HOME/.socket/_wheelhouse
|
|
20312
|
+
* appropriate `bin/` to PATH or invoke the binary by absolute path. Override
|
|
20313
|
+
* precedence: setPath('socket-wheelhouse-dir', …) → $SOCKET_HOME/_wheelhouse →
|
|
20314
|
+
* $HOME/.socket/_wheelhouse.
|
|
20321
20315
|
*/
|
|
20322
20316
|
function getSocketWheelhouseDir() {
|
|
20323
20317
|
return require_paths_rewire.getPathValue("socket-wheelhouse-dir", () => {
|
|
20324
|
-
return require_paths_normalize.normalizePath(require_node_path.getNodePath().join(getSocketUserDir(),
|
|
20318
|
+
return require_paths_normalize.normalizePath(require_node_path.getNodePath().join(getSocketUserDir(), require_constants_socket.SOCKET_DIR.wheelhouse));
|
|
20325
20319
|
});
|
|
20326
20320
|
}
|
|
20327
20321
|
/**
|
|
20328
|
-
* Get the
|
|
20329
|
-
*
|
|
20330
|
-
* getPathValue for performance.
|
|
20331
|
-
*
|
|
20332
|
-
* Priority order:
|
|
20322
|
+
* Get the user's home directory. Uses environment variables directly to support
|
|
20323
|
+
* test mocking. Falls back to temporary directory if home is not available.
|
|
20333
20324
|
*
|
|
20334
|
-
* 1.
|
|
20335
|
-
*
|
|
20336
|
-
* 3. Default: $HOME/.socket
|
|
20337
|
-
* 4. Fallback: /tmp/.socket (Unix) or %TEMP%.socket (Windows)
|
|
20325
|
+
* Priority order: 1. HOME (Unix) 2. USERPROFILE (Windows) 3.
|
|
20326
|
+
* getNodeOs().homedir() 4. Fallback: getNodeOs().tmpdir() (restricted envs).
|
|
20338
20327
|
*/
|
|
20339
20328
|
/**
|
|
20340
20329
|
* Get the user's home directory. Uses environment variables directly to support
|
|
20341
20330
|
* test mocking. Falls back to temporary directory if home is not available.
|
|
20342
20331
|
*
|
|
20343
|
-
* Priority order: 1. HOME
|
|
20344
|
-
*
|
|
20345
|
-
* getNodeOs().tmpdir() (rarely used, for restricted environments)
|
|
20332
|
+
* Priority order: 1. HOME (Unix) 2. USERPROFILE (Windows) 3.
|
|
20333
|
+
* getNodeOs().homedir() 4. Fallback: getNodeOs().tmpdir() (restricted envs).
|
|
20346
20334
|
*/
|
|
20347
20335
|
function getUserHomeDir() {
|
|
20348
20336
|
const home = require_env_home.getHome();
|
|
@@ -20362,19 +20350,19 @@ var require_socket$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20362
20350
|
exports.getSocketAppCacheDir = getSocketAppCacheDir;
|
|
20363
20351
|
exports.getSocketAppCacheTtlDir = getSocketAppCacheTtlDir;
|
|
20364
20352
|
exports.getSocketAppDir = getSocketAppDir;
|
|
20353
|
+
exports.getSocketAppRuntimeDir = getSocketAppRuntimeDir;
|
|
20354
|
+
exports.getSocketAppStateDir = getSocketAppStateDir;
|
|
20365
20355
|
exports.getSocketCacacheDir = getSocketCacacheDir;
|
|
20366
|
-
exports.getSocketCliDir = getSocketCliDir;
|
|
20367
20356
|
exports.getSocketDlxDir = getSocketDlxDir;
|
|
20368
20357
|
exports.getSocketHomePath = getSocketHomePath;
|
|
20369
|
-
exports.
|
|
20370
|
-
exports.getSocketRegistryGithubCacheDir = getSocketRegistryGithubCacheDir;
|
|
20358
|
+
exports.getSocketStateDir = getSocketStateDir;
|
|
20371
20359
|
exports.getSocketUserDir = getSocketUserDir;
|
|
20372
20360
|
exports.getSocketWheelhouseDir = getSocketWheelhouseDir;
|
|
20373
20361
|
exports.getUserHomeDir = getUserHomeDir;
|
|
20374
20362
|
}));
|
|
20375
20363
|
|
|
20376
20364
|
//#endregion
|
|
20377
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
20365
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/fs/_internal.js
|
|
20378
20366
|
var require__internal$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20379
20367
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
20380
20368
|
const require_node_path = require_path();
|
|
@@ -20419,15 +20407,16 @@ var require__internal$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20419
20407
|
}));
|
|
20420
20408
|
|
|
20421
20409
|
//#endregion
|
|
20422
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
20410
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/external/del.js
|
|
20423
20411
|
var require_del$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
20424
20412
|
module.exports = {};
|
|
20425
20413
|
}));
|
|
20426
20414
|
|
|
20427
20415
|
//#endregion
|
|
20428
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
20416
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/fs/safe.js
|
|
20429
20417
|
var require_safe = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20430
20418
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
20419
|
+
const require_arrays_predicates = require_predicates$3();
|
|
20431
20420
|
const require_primordials_string = require_string();
|
|
20432
20421
|
const require_paths__internal = require__internal$4();
|
|
20433
20422
|
const require_primordials_array = require_array();
|
|
@@ -20435,7 +20424,6 @@ var require_safe = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20435
20424
|
const require_node_path = require_path();
|
|
20436
20425
|
const require_errors_predicates = require_predicates$4();
|
|
20437
20426
|
const require_primordials_globals = require_globals();
|
|
20438
|
-
const require_arrays_predicates = require_predicates$3();
|
|
20439
20427
|
const require_objects_mutate = require_mutate();
|
|
20440
20428
|
const require_promises_retry = require_retry();
|
|
20441
20429
|
const require_fs__internal = require__internal$2();
|
|
@@ -20714,13 +20702,13 @@ var require_safe = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20714
20702
|
}));
|
|
20715
20703
|
|
|
20716
20704
|
//#endregion
|
|
20717
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
20705
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/compression/_internal.js
|
|
20718
20706
|
var require__internal$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20719
20707
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
20720
20708
|
const require_runtime$8 = require_runtime$10();
|
|
20721
20709
|
const require_primordials_error = require_error();
|
|
20722
|
-
const require_primordials_string = require_string();
|
|
20723
20710
|
const require_primordials_object = require_object();
|
|
20711
|
+
const require_primordials_string = require_string();
|
|
20724
20712
|
let node_path$4 = require("node:path");
|
|
20725
20713
|
node_path$4 = require_runtime$8.__toESM(node_path$4);
|
|
20726
20714
|
/**
|
|
@@ -20776,21 +20764,21 @@ var require__internal$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20776
20764
|
}));
|
|
20777
20765
|
|
|
20778
20766
|
//#endregion
|
|
20779
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
20767
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/compression/brotli.js
|
|
20780
20768
|
var require_brotli = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20781
20769
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
20782
20770
|
const require_runtime$7 = require_runtime$10();
|
|
20783
20771
|
const require_primordials_buffer = require_buffer();
|
|
20784
20772
|
const require_primordials_error = require_error();
|
|
20785
|
-
const require_primordials_string = require_string();
|
|
20786
20773
|
const require_primordials_map_set = require_map_set();
|
|
20774
|
+
const require_primordials_string = require_string();
|
|
20787
20775
|
const require_fs_safe = require_safe();
|
|
20788
20776
|
const require_compression__internal = require__internal$1();
|
|
20789
20777
|
let node_fs$2 = require("node:fs");
|
|
20790
20778
|
let node_path$3 = require("node:path");
|
|
20791
20779
|
node_path$3 = require_runtime$7.__toESM(node_path$3);
|
|
20792
|
-
let node_util$2 = require("node:util");
|
|
20793
20780
|
let node_stream_promises$1 = require("node:stream/promises");
|
|
20781
|
+
let node_util$2 = require("node:util");
|
|
20794
20782
|
let node_zlib$1 = require("node:zlib");
|
|
20795
20783
|
const brotliCompressAsync = (0, node_util$2.promisify)(node_zlib$1.brotliCompress);
|
|
20796
20784
|
const brotliDecompressAsync = (0, node_util$2.promisify)(node_zlib$1.brotliDecompress);
|
|
@@ -20864,6 +20852,10 @@ var require_brotli = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20864
20852
|
* coverage.
|
|
20865
20853
|
*/
|
|
20866
20854
|
function resolveBrotliOptions(options) {
|
|
20855
|
+
options = {
|
|
20856
|
+
__proto__: null,
|
|
20857
|
+
...options
|
|
20858
|
+
};
|
|
20867
20859
|
const level = options?.level ?? 11;
|
|
20868
20860
|
const params = { [node_zlib$1.constants.BROTLI_PARAM_QUALITY]: level };
|
|
20869
20861
|
if (options?.size !== void 0 && options.size > 0) params[node_zlib$1.constants.BROTLI_PARAM_SIZE_HINT] = options.size;
|
|
@@ -20882,21 +20874,21 @@ var require_brotli = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20882
20874
|
}));
|
|
20883
20875
|
|
|
20884
20876
|
//#endregion
|
|
20885
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
20877
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/compression/gzip.js
|
|
20886
20878
|
var require_gzip = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20887
20879
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
20888
20880
|
const require_runtime$6 = require_runtime$10();
|
|
20889
20881
|
const require_primordials_buffer = require_buffer();
|
|
20890
20882
|
const require_primordials_error = require_error();
|
|
20891
|
-
const require_primordials_string = require_string();
|
|
20892
20883
|
const require_primordials_map_set = require_map_set();
|
|
20884
|
+
const require_primordials_string = require_string();
|
|
20893
20885
|
const require_fs_safe = require_safe();
|
|
20894
20886
|
const require_compression__internal = require__internal$1();
|
|
20895
20887
|
let node_fs$1 = require("node:fs");
|
|
20896
20888
|
let node_path$2 = require("node:path");
|
|
20897
20889
|
node_path$2 = require_runtime$6.__toESM(node_path$2);
|
|
20898
|
-
let node_util$1 = require("node:util");
|
|
20899
20890
|
let node_stream_promises = require("node:stream/promises");
|
|
20891
|
+
let node_util$1 = require("node:util");
|
|
20900
20892
|
let node_zlib = require("node:zlib");
|
|
20901
20893
|
const gzipAsync = (0, node_util$1.promisify)(node_zlib.gzip);
|
|
20902
20894
|
const gunzipAsync = (0, node_util$1.promisify)(node_zlib.gunzip);
|
|
@@ -20969,6 +20961,10 @@ var require_gzip = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20969
20961
|
* coverage.
|
|
20970
20962
|
*/
|
|
20971
20963
|
function resolveGzipOptions(options) {
|
|
20964
|
+
options = {
|
|
20965
|
+
__proto__: null,
|
|
20966
|
+
...options
|
|
20967
|
+
};
|
|
20972
20968
|
const level = options?.level;
|
|
20973
20969
|
if (level === void 0) return { __proto__: null };
|
|
20974
20970
|
return {
|
|
@@ -20989,7 +20985,7 @@ var require_gzip = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
20989
20985
|
}));
|
|
20990
20986
|
|
|
20991
20987
|
//#endregion
|
|
20992
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
20988
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/http-request/response-reader.js
|
|
20993
20989
|
var require_response_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
20994
20990
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
20995
20991
|
const require_primordials_buffer = require_buffer();
|
|
@@ -21058,7 +21054,7 @@ var require_response_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
21058
21054
|
}));
|
|
21059
21055
|
|
|
21060
21056
|
//#endregion
|
|
21061
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
21057
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/date.js
|
|
21062
21058
|
var require_date = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21063
21059
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
21064
21060
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -21087,7 +21083,7 @@ var require_date = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
21087
21083
|
}));
|
|
21088
21084
|
|
|
21089
21085
|
//#endregion
|
|
21090
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
21086
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/promise.js
|
|
21091
21087
|
var require_promise = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21092
21088
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
21093
21089
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -21123,33 +21119,7 @@ var require_promise = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
21123
21119
|
}));
|
|
21124
21120
|
|
|
21125
21121
|
//#endregion
|
|
21126
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
21127
|
-
var require_http = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21128
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
21129
|
-
const require_constants_runtime = require_runtime$11();
|
|
21130
|
-
let cachedHttp;
|
|
21131
|
-
function getNodeHttp() {
|
|
21132
|
-
if (!require_constants_runtime.IS_NODE) return;
|
|
21133
|
-
return cachedHttp ??= /*@__PURE__*/ require("node:http");
|
|
21134
|
-
}
|
|
21135
|
-
exports.getNodeHttp = getNodeHttp;
|
|
21136
|
-
}));
|
|
21137
|
-
|
|
21138
|
-
//#endregion
|
|
21139
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.7/node_modules/@socketsecurity/lib/dist/node/https.js
|
|
21140
|
-
var require_https = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21141
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
21142
|
-
const require_constants_runtime = require_runtime$11();
|
|
21143
|
-
let cachedHttps;
|
|
21144
|
-
function getNodeHttps() {
|
|
21145
|
-
if (!require_constants_runtime.IS_NODE) return;
|
|
21146
|
-
return cachedHttps ??= /*@__PURE__*/ require("node:https");
|
|
21147
|
-
}
|
|
21148
|
-
exports.getNodeHttps = getNodeHttps;
|
|
21149
|
-
}));
|
|
21150
|
-
|
|
21151
|
-
//#endregion
|
|
21152
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.7/node_modules/@socketsecurity/lib/dist/primordials/url.js
|
|
21122
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/primordials/url.js
|
|
21153
21123
|
var require_url$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21154
21124
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
21155
21125
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -21178,7 +21148,33 @@ var require_url$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
21178
21148
|
}));
|
|
21179
21149
|
|
|
21180
21150
|
//#endregion
|
|
21181
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
21151
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/node/http.js
|
|
21152
|
+
var require_http = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21153
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
21154
|
+
const require_constants_runtime = require_runtime$11();
|
|
21155
|
+
let cachedHttp;
|
|
21156
|
+
function getNodeHttp() {
|
|
21157
|
+
if (!require_constants_runtime.IS_NODE) return;
|
|
21158
|
+
return cachedHttp ??= /*@__PURE__*/ require("http");
|
|
21159
|
+
}
|
|
21160
|
+
exports.getNodeHttp = getNodeHttp;
|
|
21161
|
+
}));
|
|
21162
|
+
|
|
21163
|
+
//#endregion
|
|
21164
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/node/https.js
|
|
21165
|
+
var require_https = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21166
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
21167
|
+
const require_constants_runtime = require_runtime$11();
|
|
21168
|
+
let cachedHttps;
|
|
21169
|
+
function getNodeHttps() {
|
|
21170
|
+
if (!require_constants_runtime.IS_NODE) return;
|
|
21171
|
+
return cachedHttps ??= /*@__PURE__*/ require("https");
|
|
21172
|
+
}
|
|
21173
|
+
exports.getNodeHttps = getNodeHttps;
|
|
21174
|
+
}));
|
|
21175
|
+
|
|
21176
|
+
//#endregion
|
|
21177
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/http-request/errors.js
|
|
21182
21178
|
var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21183
21179
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
21184
21180
|
/**
|
|
@@ -21219,7 +21215,7 @@ var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
21219
21215
|
}));
|
|
21220
21216
|
|
|
21221
21217
|
//#endregion
|
|
21222
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
21218
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/strings/predicates.js
|
|
21223
21219
|
var require_predicates = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21224
21220
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
21225
21221
|
/**
|
|
@@ -21277,7 +21273,7 @@ var require_predicates = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
21277
21273
|
}));
|
|
21278
21274
|
|
|
21279
21275
|
//#endregion
|
|
21280
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
21276
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/smol/purl.js
|
|
21281
21277
|
var require_purl = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
21282
21278
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
21283
21279
|
const require_node_module = require_module();
|
|
@@ -21314,7 +21310,7 @@ var require_purl = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
21314
21310
|
}));
|
|
21315
21311
|
|
|
21316
21312
|
//#endregion
|
|
21317
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
21313
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/external/@socketregistry/packageurl-js.js
|
|
21318
21314
|
var require_packageurl_js = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
21319
21315
|
const { BufferByteLength: _p_BufferByteLength } = require_buffer();
|
|
21320
21316
|
const { ErrorCtor: _p_ErrorCtor, SyntaxErrorCtor: _p_SyntaxErrorCtor } = require_error();
|
|
@@ -27463,26 +27459,26 @@ var require_packageurl_js = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
27463
27459
|
}));
|
|
27464
27460
|
|
|
27465
27461
|
//#endregion
|
|
27466
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
27462
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/external/npm-pack.js
|
|
27467
27463
|
var require_npm_pack$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
27468
27464
|
module.exports = {};
|
|
27469
27465
|
}));
|
|
27470
27466
|
|
|
27471
27467
|
//#endregion
|
|
27472
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
27468
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/external/npm-package-arg.js
|
|
27473
27469
|
var require_npm_package_arg = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
27474
27470
|
const { npmPackageArg } = require_npm_pack$1();
|
|
27475
27471
|
module.exports = npmPackageArg;
|
|
27476
27472
|
}));
|
|
27477
27473
|
|
|
27478
27474
|
//#endregion
|
|
27479
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
27475
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/packages/specs.js
|
|
27480
27476
|
var require_specs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
27481
27477
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
27482
27478
|
const require_runtime$5 = require_runtime$10();
|
|
27479
|
+
const require_objects_predicates = require_predicates$2();
|
|
27483
27480
|
const require_primordials_string = require_string();
|
|
27484
27481
|
const require_strings_predicates = require_predicates();
|
|
27485
|
-
const require_objects_predicates = require_predicates$2();
|
|
27486
27482
|
require_socket$2();
|
|
27487
27483
|
const require_smol_purl = require_purl();
|
|
27488
27484
|
let src_external__socketregistry_packageurl_js = require_packageurl_js();
|
|
@@ -27643,7 +27639,7 @@ var require_specs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
27643
27639
|
}));
|
|
27644
27640
|
|
|
27645
27641
|
//#endregion
|
|
27646
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
27642
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/http-request/user-agent.js
|
|
27647
27643
|
var require_user_agent = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
27648
27644
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
27649
27645
|
const require_runtime$4 = require_runtime$10();
|
|
@@ -27713,25 +27709,25 @@ var require_user_agent = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
27713
27709
|
version: require_constants_socket.SOCKET_LIB_VERSION
|
|
27714
27710
|
});
|
|
27715
27711
|
const caller = require_env_rewire.getEnvValue("SOCKET_CALLER_USER_AGENT");
|
|
27716
|
-
return caller
|
|
27712
|
+
return caller?.trim() ? `${cachedBaseUserAgent} ${caller}` : cachedBaseUserAgent;
|
|
27717
27713
|
}
|
|
27718
27714
|
exports.buildUserAgent = buildUserAgent;
|
|
27719
27715
|
exports.getSocketCallerUserAgent = getSocketCallerUserAgent;
|
|
27720
27716
|
}));
|
|
27721
27717
|
|
|
27722
27718
|
//#endregion
|
|
27723
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
27719
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/http-request/request-attempt.js
|
|
27724
27720
|
var require_request_attempt = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
27725
27721
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
27726
27722
|
const require_primordials_buffer = require_buffer();
|
|
27727
27723
|
const require_primordials_error = require_error();
|
|
27724
|
+
const require_primordials_object = require_object();
|
|
27728
27725
|
const require_primordials_date = require_date();
|
|
27729
27726
|
const require_primordials_json = require_json();
|
|
27730
|
-
const require_primordials_object = require_object();
|
|
27731
27727
|
const require_primordials_promise = require_promise();
|
|
27728
|
+
const require_primordials_url = require_url$1();
|
|
27732
27729
|
const require_node_http = require_http();
|
|
27733
27730
|
const require_node_https = require_https();
|
|
27734
|
-
const require_primordials_url = require_url$1();
|
|
27735
27731
|
const require_http_request_errors = require_errors();
|
|
27736
27732
|
const require_http_request_response_reader = require_response_reader();
|
|
27737
27733
|
const require_http_request_user_agent = require_user_agent();
|
|
@@ -27959,7 +27955,7 @@ var require_request_attempt = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
27959
27955
|
}));
|
|
27960
27956
|
|
|
27961
27957
|
//#endregion
|
|
27962
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
27958
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/http-request/response-types.js
|
|
27963
27959
|
var require_response_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
27964
27960
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
27965
27961
|
/**
|
|
@@ -27982,7 +27978,7 @@ var require_response_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
27982
27978
|
}));
|
|
27983
27979
|
|
|
27984
27980
|
//#endregion
|
|
27985
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
27981
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/http-request/request.js
|
|
27986
27982
|
var require_request = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
27987
27983
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
27988
27984
|
const require_primordials_error = require_error();
|
|
@@ -28107,7 +28103,7 @@ var require_request = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
28107
28103
|
}));
|
|
28108
28104
|
|
|
28109
28105
|
//#endregion
|
|
28110
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
28106
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/themes/themes.js
|
|
28111
28107
|
var require_themes$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
28112
28108
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
28113
28109
|
/**
|
|
@@ -28344,7 +28340,7 @@ var require_themes$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
28344
28340
|
}));
|
|
28345
28341
|
|
|
28346
28342
|
//#endregion
|
|
28347
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
28343
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/themes/context.js
|
|
28348
28344
|
var require_context$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
28349
28345
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
28350
28346
|
const require_primordials_map_set = require_map_set();
|
|
@@ -28491,7 +28487,7 @@ var require_context$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
28491
28487
|
}));
|
|
28492
28488
|
|
|
28493
28489
|
//#endregion
|
|
28494
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
28490
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/_internal.js
|
|
28495
28491
|
var require__internal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
28496
28492
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
28497
28493
|
const require_primordials_map_set = require_map_set();
|
|
@@ -28606,7 +28602,7 @@ var require__internal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
28606
28602
|
}));
|
|
28607
28603
|
|
|
28608
28604
|
//#endregion
|
|
28609
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
28605
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/external/external-pack.js
|
|
28610
28606
|
/**
|
|
28611
28607
|
* Bundled from external-pack
|
|
28612
28608
|
* This is a zero-dependency bundle created by rolldown.
|
|
@@ -31269,7 +31265,7 @@ var require_external_pack$1 = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
31269
31265
|
}));
|
|
31270
31266
|
|
|
31271
31267
|
//#endregion
|
|
31272
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
31268
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/external/yoctocolors-cjs.js
|
|
31273
31269
|
var require_yoctocolors_cjs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
31274
31270
|
const { yoctocolorsCjs } = require_external_pack$1();
|
|
31275
31271
|
module.exports = yoctocolorsCjs;
|
|
@@ -31277,7 +31273,7 @@ var require_yoctocolors_cjs$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
31277
31273
|
}));
|
|
31278
31274
|
|
|
31279
31275
|
//#endregion
|
|
31280
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
31276
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/colors.js
|
|
31281
31277
|
var require_colors$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
31282
31278
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
31283
31279
|
const require_runtime$3 = require_runtime$10();
|
|
@@ -31313,7 +31309,7 @@ var require_colors$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
31313
31309
|
}));
|
|
31314
31310
|
|
|
31315
31311
|
//#endregion
|
|
31316
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
31312
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/external/@socketregistry/is-unicode-supported.js
|
|
31317
31313
|
/**
|
|
31318
31314
|
* Bundled from @socketregistry/is-unicode-supported
|
|
31319
31315
|
* This is a zero-dependency bundle created by rolldown.
|
|
@@ -31339,7 +31335,7 @@ var require_is_unicode_supported$2 = /* @__PURE__ */ __commonJSMin(((exports, mo
|
|
|
31339
31335
|
}));
|
|
31340
31336
|
|
|
31341
31337
|
//#endregion
|
|
31342
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
31338
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/symbols-builder.js
|
|
31343
31339
|
var require_symbols_builder = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
31344
31340
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
31345
31341
|
const require_runtime$2 = require_runtime$10();
|
|
@@ -31397,7 +31393,7 @@ var require_symbols_builder = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
31397
31393
|
}));
|
|
31398
31394
|
|
|
31399
31395
|
//#endregion
|
|
31400
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
31396
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/symbols.js
|
|
31401
31397
|
var require_symbols = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
31402
31398
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
31403
31399
|
const require_runtime$1 = require_runtime$10();
|
|
@@ -31521,7 +31517,7 @@ var require_symbols = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
31521
31517
|
}));
|
|
31522
31518
|
|
|
31523
31519
|
//#endregion
|
|
31524
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
31520
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/console.js
|
|
31525
31521
|
var require_console = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
31526
31522
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
31527
31523
|
const require_runtime = require_runtime$10();
|
|
@@ -31647,7 +31643,7 @@ var require_console = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
31647
31643
|
}));
|
|
31648
31644
|
|
|
31649
31645
|
//#endregion
|
|
31650
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
31646
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/console-methods.js
|
|
31651
31647
|
var require_console_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
31652
31648
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
31653
31649
|
const require_logger_symbols = require_symbols();
|
|
@@ -31815,7 +31811,7 @@ var require_console_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
31815
31811
|
}));
|
|
31816
31812
|
|
|
31817
31813
|
//#endregion
|
|
31818
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
31814
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/indentation-methods.js
|
|
31819
31815
|
var require_indentation_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
31820
31816
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
31821
31817
|
const require_primordials_math = require_math();
|
|
@@ -31935,7 +31931,7 @@ var require_indentation_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
31935
31931
|
}));
|
|
31936
31932
|
|
|
31937
31933
|
//#endregion
|
|
31938
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
31934
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/options.js
|
|
31939
31935
|
var require_options = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
31940
31936
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
31941
31937
|
const require_themes_themes = require_themes$1();
|
|
@@ -31981,7 +31977,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
31981
31977
|
}));
|
|
31982
31978
|
|
|
31983
31979
|
//#endregion
|
|
31984
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
31980
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/ansi/strip.js
|
|
31985
31981
|
var require_strip = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
31986
31982
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
31987
31983
|
const require_primordials_string = require_string();
|
|
@@ -32028,7 +32024,7 @@ var require_strip = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
32028
32024
|
}));
|
|
32029
32025
|
|
|
32030
32026
|
//#endregion
|
|
32031
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
32027
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/strings/format.js
|
|
32032
32028
|
var require_format = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
32033
32029
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
32034
32030
|
const require_primordials_math = require_math();
|
|
@@ -32178,7 +32174,7 @@ var require_format = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
32178
32174
|
}));
|
|
32179
32175
|
|
|
32180
32176
|
//#endregion
|
|
32181
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
32177
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/semantic-methods.js
|
|
32182
32178
|
var require_semantic_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
32183
32179
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
32184
32180
|
const require_primordials_array = require_array();
|
|
@@ -32285,7 +32281,7 @@ var require_semantic_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
32285
32281
|
}));
|
|
32286
32282
|
|
|
32287
32283
|
//#endregion
|
|
32288
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
32284
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/stream.js
|
|
32289
32285
|
var require_stream = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
32290
32286
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
32291
32287
|
/**
|
|
@@ -32326,7 +32322,7 @@ var require_stream = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
32326
32322
|
}));
|
|
32327
32323
|
|
|
32328
32324
|
//#endregion
|
|
32329
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
32325
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/stream-methods.js
|
|
32330
32326
|
var require_stream_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
32331
32327
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
32332
32328
|
const require_primordials_error = require_error();
|
|
@@ -32426,7 +32422,7 @@ var require_stream_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
32426
32422
|
}));
|
|
32427
32423
|
|
|
32428
32424
|
//#endregion
|
|
32429
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
32425
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/node.js
|
|
32430
32426
|
var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
32431
32427
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
32432
32428
|
const require_primordials_reflect = require_reflect();
|
|
@@ -32687,7 +32683,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
32687
32683
|
}));
|
|
32688
32684
|
|
|
32689
32685
|
//#endregion
|
|
32690
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
32686
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8/node_modules/@socketsecurity/lib/dist/logger/default.js
|
|
32691
32687
|
var require_default = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
32692
32688
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
32693
32689
|
const require_logger_node = require_node();
|
|
@@ -32745,12 +32741,16 @@ function assertSafeHttpUrl(rawUrl, label, allowLocalhost = false) {
|
|
|
32745
32741
|
}
|
|
32746
32742
|
if (url.protocol !== "http:" && url.protocol !== "https:") throw new Error(`${label} must be http(s): ${rawUrl}`);
|
|
32747
32743
|
const host = url.hostname.toLowerCase();
|
|
32748
|
-
const isLocal = host === "
|
|
32744
|
+
const isLocal = host === "::1" || host === "127.0.0.1" || host === "localhost";
|
|
32749
32745
|
if (isLocal && allowLocalhost) return url;
|
|
32750
32746
|
if (PRIVATE_HOST_RE.test(host) || isLocal) throw new Error(`${label} resolves to a private/loopback host and is refused: ${rawUrl}`);
|
|
32751
32747
|
return url;
|
|
32752
32748
|
}
|
|
32753
32749
|
function buildJsonApiHeaders(options) {
|
|
32750
|
+
options = {
|
|
32751
|
+
__proto__: null,
|
|
32752
|
+
...options
|
|
32753
|
+
};
|
|
32754
32754
|
const headers = { accept: "application/json" };
|
|
32755
32755
|
if (options.userAgent) headers["user-agent"] = options.userAgent;
|
|
32756
32756
|
if (options.authToken) headers["authorization"] = `Bearer ${options.authToken}`;
|
|
@@ -32847,6 +32847,10 @@ function buildAlertsQuery(filters, perPageFallback) {
|
|
|
32847
32847
|
* /v0/orgs/{org_slug}/alerts`. Returns the parsed JSON body untouched.
|
|
32848
32848
|
*/
|
|
32849
32849
|
async function fetchAlerts(options) {
|
|
32850
|
+
options = {
|
|
32851
|
+
__proto__: null,
|
|
32852
|
+
...options
|
|
32853
|
+
};
|
|
32850
32854
|
const baseUrl = options.baseUrl.replace(/\/$/u, "");
|
|
32851
32855
|
const qs = buildAlertsQuery(options.filters).toString();
|
|
32852
32856
|
const res = await (0, import_request.httpRequest)(`${baseUrl}/v0/orgs/${encodeURIComponent(options.orgSlug)}/alerts${qs ? `?${qs}` : ""}`, { headers: buildJsonApiHeaders(options) });
|
|
@@ -32892,7 +32896,7 @@ function defineAlertsTool() {
|
|
|
32892
32896
|
alert_type: args.alert_type
|
|
32893
32897
|
}
|
|
32894
32898
|
}, "tool invoked");
|
|
32895
|
-
const accessToken =
|
|
32899
|
+
const accessToken = resolveScopedAuthToken(extra.authInfo?.token);
|
|
32896
32900
|
if (!accessToken) {
|
|
32897
32901
|
logger.error("alerts: " + AUTH_REQUIRED_MSG);
|
|
32898
32902
|
return authRequiredResult();
|
|
@@ -39153,7 +39157,8 @@ var import_dist$1 = require_dist$1();
|
|
|
39153
39157
|
* `pkg:vscode/meta/pyrefly@1.0.0?repository_url=...`).
|
|
39154
39158
|
*/
|
|
39155
39159
|
function buildPurl(ecosystem, depname, version, qualifiers) {
|
|
39156
|
-
const
|
|
39160
|
+
const rawEcoLower = ecosystem.toLowerCase();
|
|
39161
|
+
const ecoLower = rawEcoLower === "packagist" ? "composer" : rawEcoLower;
|
|
39157
39162
|
const type = ecoLower === "openvsx" ? "vscode" : ecoLower;
|
|
39158
39163
|
let namespace;
|
|
39159
39164
|
let name;
|
|
@@ -39174,6 +39179,10 @@ function buildPurl(ecosystem, depname, version, qualifiers) {
|
|
|
39174
39179
|
const slash = depname.indexOf("/");
|
|
39175
39180
|
namespace = depname.slice(0, slash);
|
|
39176
39181
|
name = depname.slice(slash + 1);
|
|
39182
|
+
} else if (ecoLower === "composer" && depname.includes("/")) {
|
|
39183
|
+
const slash = depname.indexOf("/");
|
|
39184
|
+
namespace = depname.slice(0, slash);
|
|
39185
|
+
name = depname.slice(slash + 1);
|
|
39177
39186
|
} else name = depname;
|
|
39178
39187
|
const merged = { ...qualifiers ?? {} };
|
|
39179
39188
|
if (ecoLower === "openvsx" && !merged["repository_url"]) merged["repository_url"] = "https://open-vsx.org";
|
|
@@ -39212,7 +39221,7 @@ const SOCKET_API_URL = getSocketApiUrl() || DEFAULT_SOCKET_API_URL;
|
|
|
39212
39221
|
const depscoreInputSchema = Type.Object({
|
|
39213
39222
|
packages: Type.Array(Type.Object({
|
|
39214
39223
|
ecosystem: Type.String({
|
|
39215
|
-
description: "Package ecosystem (PURL type): npm (JS/TS), pypi (Python), golang (Go), maven (Java/Scala/Kotlin), gem (Ruby), nuget (.NET), cargo (Rust), composer (PHP). See https://docs.socket.dev/docs/language-support",
|
|
39224
|
+
description: "Package ecosystem (PURL type): npm (JS/TS), pypi (Python), golang (Go), maven (Java/Scala/Kotlin), gem (Ruby), nuget (.NET), cargo (Rust), composer (PHP; \"packagist\" also accepted). See https://docs.socket.dev/docs/language-support",
|
|
39216
39225
|
default: "npm"
|
|
39217
39226
|
}),
|
|
39218
39227
|
depname: Type.String({ description: "The name of the dependency" }),
|
|
@@ -39248,6 +39257,7 @@ function defineDepscoreTool() {
|
|
|
39248
39257
|
function formatScoreEntries(score) {
|
|
39249
39258
|
return Object.entries(score).filter(([key]) => key !== "overall" && key !== "uuid").map(([key, value]) => {
|
|
39250
39259
|
const numValue = Number(value);
|
|
39260
|
+
if (!Number.isFinite(numValue)) return `${key}: ${value}`;
|
|
39251
39261
|
return `${key}: ${numValue <= 1 ? Math.round(numValue * 100) : numValue}`;
|
|
39252
39262
|
}).join(", ");
|
|
39253
39263
|
}
|
|
@@ -39353,6 +39363,11 @@ const DEFAULT_MAX_BYTES = 1024 * 1024;
|
|
|
39353
39363
|
* dropped.
|
|
39354
39364
|
*/
|
|
39355
39365
|
async function fetchBlob(hash, options) {
|
|
39366
|
+
options = {
|
|
39367
|
+
__proto__: null,
|
|
39368
|
+
...options
|
|
39369
|
+
};
|
|
39370
|
+
if (!hash) throw new Error("fetchBlob requires a non-empty blob hash");
|
|
39356
39371
|
const maxBytes = options.maxBytes ?? DEFAULT_MAX_BYTES;
|
|
39357
39372
|
let buf;
|
|
39358
39373
|
let contentType;
|
|
@@ -39421,6 +39436,10 @@ async function fetchChunkedBytes(sHash, options, maxBytes) {
|
|
|
39421
39436
|
};
|
|
39422
39437
|
}
|
|
39423
39438
|
async function fetchRawBytes(hash, options) {
|
|
39439
|
+
options = {
|
|
39440
|
+
__proto__: null,
|
|
39441
|
+
...options
|
|
39442
|
+
};
|
|
39424
39443
|
const url = `${options.baseUrl.replace(/\/$/u, "")}/blob/${encodeURIComponent(hash)}`;
|
|
39425
39444
|
const headers = {};
|
|
39426
39445
|
if (options.userAgent) headers["user-agent"] = options.userAgent;
|
|
@@ -39577,6 +39596,10 @@ function extractFileList(response, options = {}) {
|
|
|
39577
39596
|
* text.
|
|
39578
39597
|
*/
|
|
39579
39598
|
async function fetchFileList(purlStr, options) {
|
|
39599
|
+
options = {
|
|
39600
|
+
__proto__: null,
|
|
39601
|
+
...options
|
|
39602
|
+
};
|
|
39580
39603
|
const url = `${options.baseUrl.replace(/\/$/u, "")}/v0/purl/file-list/${encodeURIComponent(purlStr)}`;
|
|
39581
39604
|
const headers = buildJsonApiHeaders(options);
|
|
39582
39605
|
options.onRequest?.(url);
|
|
@@ -39826,7 +39849,7 @@ function definePackageFilesTool() {
|
|
|
39826
39849
|
platform,
|
|
39827
39850
|
purl: purlWithQualifiers
|
|
39828
39851
|
}, "tool invoked");
|
|
39829
|
-
const accessToken =
|
|
39852
|
+
const accessToken = resolveScopedAuthToken(extra.authInfo?.token);
|
|
39830
39853
|
if (!accessToken) {
|
|
39831
39854
|
logger.error("package_files: " + AUTH_REQUIRED_MSG);
|
|
39832
39855
|
return authRequiredResult();
|
|
@@ -56241,6 +56264,10 @@ var import_dist = require_dist();
|
|
|
56241
56264
|
* `baseUrl` (the bare API origin) gets `/v0/` appended.
|
|
56242
56265
|
*/
|
|
56243
56266
|
async function fetchOrganizations(options) {
|
|
56267
|
+
options = {
|
|
56268
|
+
__proto__: null,
|
|
56269
|
+
...options
|
|
56270
|
+
};
|
|
56244
56271
|
const baseUrl = `${options.baseUrl.replace(/\/$/u, "")}/v0/`;
|
|
56245
56272
|
const result = await new import_dist.SocketSdk(options.authToken ?? "", {
|
|
56246
56273
|
baseUrl,
|
|
@@ -56261,7 +56288,7 @@ function defineOrganizationsTool() {
|
|
|
56261
56288
|
annotations: { readOnlyHint: true },
|
|
56262
56289
|
async handler(_args, extra) {
|
|
56263
56290
|
logger.info({ tool: "organizations" }, "tool invoked");
|
|
56264
|
-
const accessToken =
|
|
56291
|
+
const accessToken = resolveScopedAuthToken(extra.authInfo?.token);
|
|
56265
56292
|
if (!accessToken) {
|
|
56266
56293
|
logger.error("organizations: " + AUTH_REQUIRED_MSG);
|
|
56267
56294
|
return authRequiredResult();
|
|
@@ -56318,6 +56345,10 @@ function buildThreatFeedQuery(filters) {
|
|
|
56318
56345
|
* /v0/orgs/{org_slug}/threat-feed`. Returns the parsed JSON body untouched.
|
|
56319
56346
|
*/
|
|
56320
56347
|
async function fetchThreatFeed(options) {
|
|
56348
|
+
options = {
|
|
56349
|
+
__proto__: null,
|
|
56350
|
+
...options
|
|
56351
|
+
};
|
|
56321
56352
|
const baseUrl = options.baseUrl.replace(/\/$/u, "");
|
|
56322
56353
|
const qs = buildThreatFeedQuery(options.filters).toString();
|
|
56323
56354
|
const res = await (0, import_request.httpRequest)(`${baseUrl}/v0/orgs/${encodeURIComponent(options.orgSlug)}/threat-feed${qs ? `?${qs}` : ""}`, { headers: buildJsonApiHeaders(options) });
|
|
@@ -56368,7 +56399,7 @@ function defineThreatFeedTool() {
|
|
|
56368
56399
|
version: args.version
|
|
56369
56400
|
}
|
|
56370
56401
|
}, "tool invoked");
|
|
56371
|
-
const accessToken =
|
|
56402
|
+
const accessToken = resolveScopedAuthToken(extra.authInfo?.token);
|
|
56372
56403
|
if (!accessToken) {
|
|
56373
56404
|
logger.error("threat_feed: " + AUTH_REQUIRED_MSG);
|
|
56374
56405
|
return authRequiredResult();
|
|
@@ -56444,8 +56475,9 @@ function withToolLogging(name, handler) {
|
|
|
56444
56475
|
//#endregion
|
|
56445
56476
|
//#region lib/server.ts
|
|
56446
56477
|
const SOCKET_API_BASE_URL = getSocketApiUrl() || "https://api.socket.dev";
|
|
56447
|
-
const AUTH_REQUIRED_MSG = "Authentication is required.
|
|
56478
|
+
const AUTH_REQUIRED_MSG = "Authentication is required. Set SOCKET_API_TOKEN for stdio mode, or send your Socket API token as an `Authorization: Bearer <token>` header (or connect through OAuth) in HTTP mode.";
|
|
56448
56479
|
let staticApiKey = "";
|
|
56480
|
+
let staticApiKeyShared = false;
|
|
56449
56481
|
function authRequiredResult() {
|
|
56450
56482
|
return errorResult(AUTH_REQUIRED_MSG);
|
|
56451
56483
|
}
|
|
@@ -56515,8 +56547,17 @@ function errorResult(text) {
|
|
|
56515
56547
|
function resolveAuthToken(authInfoToken) {
|
|
56516
56548
|
return authInfoToken || staticApiKey || void 0;
|
|
56517
56549
|
}
|
|
56518
|
-
function
|
|
56550
|
+
function resolveScopedAuthToken(authInfoToken) {
|
|
56551
|
+
if (authInfoToken) return authInfoToken;
|
|
56552
|
+
if (!staticApiKeyShared && staticApiKey) return staticApiKey;
|
|
56553
|
+
}
|
|
56554
|
+
function setStaticApiKey(value, options) {
|
|
56555
|
+
const opts = {
|
|
56556
|
+
__proto__: null,
|
|
56557
|
+
...options
|
|
56558
|
+
};
|
|
56519
56559
|
staticApiKey = value;
|
|
56560
|
+
staticApiKeyShared = opts.shared ?? false;
|
|
56520
56561
|
}
|
|
56521
56562
|
|
|
56522
56563
|
//#endregion
|
|
@@ -57640,6 +57681,39 @@ var StreamableHTTPServerTransport = class {
|
|
|
57640
57681
|
}
|
|
57641
57682
|
};
|
|
57642
57683
|
|
|
57684
|
+
//#endregion
|
|
57685
|
+
//#region lib/http-origin.ts
|
|
57686
|
+
const ALLOWED_ORIGINS = ["https://mcp.socket.dev", "https://mcp.socket-staging.dev"];
|
|
57687
|
+
function isLocalhostOrigin(originUrl) {
|
|
57688
|
+
try {
|
|
57689
|
+
const originValue = new URL(originUrl);
|
|
57690
|
+
return originValue.hostname === "127.0.0.1" || originValue.hostname === "localhost";
|
|
57691
|
+
} catch {
|
|
57692
|
+
return false;
|
|
57693
|
+
}
|
|
57694
|
+
}
|
|
57695
|
+
function patchAcceptHeader(req) {
|
|
57696
|
+
const accept = req.headers.accept || "";
|
|
57697
|
+
if (accept.includes("application/json") && accept.includes("text/event-stream")) return;
|
|
57698
|
+
const requiredAccept = "application/json, text/event-stream";
|
|
57699
|
+
req.headers.accept = requiredAccept;
|
|
57700
|
+
const idx = req.rawHeaders.findIndex((h) => h.toLowerCase() === "accept");
|
|
57701
|
+
if (idx !== -1) req.rawHeaders[idx + 1] = requiredAccept;
|
|
57702
|
+
else req.rawHeaders.push("Accept", requiredAccept);
|
|
57703
|
+
}
|
|
57704
|
+
function validateOriginAndHost(origin, host, port) {
|
|
57705
|
+
const allowedHosts = ALLOWED_ORIGINS.map((o) => new URL(o).hostname);
|
|
57706
|
+
const isAllowedHost = host === `localhost:${port}` || host === `127.0.0.1:${port}` || host === "localhost" || host === "127.0.0.1" || allowedHosts.includes(host);
|
|
57707
|
+
return origin ? isLocalhostOrigin(origin) || ALLOWED_ORIGINS.includes(origin) : isAllowedHost;
|
|
57708
|
+
}
|
|
57709
|
+
function writeCorsHeaders(res, origin) {
|
|
57710
|
+
if (!origin) return;
|
|
57711
|
+
res.setHeader("Access-Control-Allow-Origin", origin);
|
|
57712
|
+
res.setHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, OPTIONS");
|
|
57713
|
+
res.setHeader("Access-Control-Allow-Headers", "Authorization, Content-Type, Accept, Mcp-Session-Id");
|
|
57714
|
+
res.setHeader("Access-Control-Expose-Headers", "Mcp-Session-Id, WWW-Authenticate");
|
|
57715
|
+
}
|
|
57716
|
+
|
|
57643
57717
|
//#endregion
|
|
57644
57718
|
//#region lib/oauth.ts
|
|
57645
57719
|
const ALLOW_LOCAL_OAUTH = (0, import_boolean.envAsBoolean)((0, import_socket.getSocketDebug)());
|
|
@@ -57770,12 +57844,18 @@ async function verifyAccessToken(token, config = defaultConfig) {
|
|
|
57770
57844
|
if (!response.ok) throw new Error(`Token introspection failed with status ${response.status}: ${responseText}`);
|
|
57771
57845
|
const introspection = parseJsonObject(responseText, "Token introspection");
|
|
57772
57846
|
if (!introspection["active"]) return;
|
|
57773
|
-
const
|
|
57847
|
+
const rawExp = introspection["exp"];
|
|
57848
|
+
let expiresAt;
|
|
57849
|
+
if (rawExp !== void 0 && rawExp !== null) {
|
|
57850
|
+
const parsed = typeof rawExp === "number" ? rawExp : Number(rawExp);
|
|
57851
|
+
if (!Number.isFinite(parsed)) return;
|
|
57852
|
+
expiresAt = parsed;
|
|
57853
|
+
}
|
|
57774
57854
|
return {
|
|
57775
57855
|
token,
|
|
57776
57856
|
clientId: typeof introspection["client_id"] === "string" ? introspection["client_id"] : "unknown",
|
|
57777
57857
|
scopes: splitScopes(introspection["scope"]),
|
|
57778
|
-
...
|
|
57858
|
+
...expiresAt !== void 0 ? { expiresAt } : {},
|
|
57779
57859
|
extra: introspection
|
|
57780
57860
|
};
|
|
57781
57861
|
}
|
|
@@ -57784,7 +57864,35 @@ async function verifyAccessToken(token, config = defaultConfig) {
|
|
|
57784
57864
|
//#region lib/http-server.ts
|
|
57785
57865
|
const SESSION_TTL_MS = 1800 * 1e3;
|
|
57786
57866
|
const REAP_INTERVAL_MS = 6e4;
|
|
57787
|
-
const
|
|
57867
|
+
const MAX_POST_BODY_BYTES = 4 * 1024 * 1024;
|
|
57868
|
+
var PayloadTooLargeError = class extends Error {
|
|
57869
|
+
constructor(limitBytes) {
|
|
57870
|
+
super(`Request body exceeds the ${limitBytes}-byte limit`);
|
|
57871
|
+
this.name = "PayloadTooLargeError";
|
|
57872
|
+
}
|
|
57873
|
+
};
|
|
57874
|
+
function applyClientApiKey(req) {
|
|
57875
|
+
const authHeader = getRequestHeaderValue(req.headers.authorization).trim();
|
|
57876
|
+
if (!authHeader) return;
|
|
57877
|
+
const [type, token] = authHeader.split(/\s+/u);
|
|
57878
|
+
if ((type || "").toLowerCase() !== "bearer" || !token) return;
|
|
57879
|
+
req.auth = {
|
|
57880
|
+
token,
|
|
57881
|
+
clientId: "socket-api-key",
|
|
57882
|
+
scopes: []
|
|
57883
|
+
};
|
|
57884
|
+
}
|
|
57885
|
+
const SOCKET_API_KEY_PREFIX = "sktsec_";
|
|
57886
|
+
function applySocketApiKey(req) {
|
|
57887
|
+
const [type, token] = getRequestHeaderValue(req.headers.authorization).trim().split(/\s+/u);
|
|
57888
|
+
if ((type || "").toLowerCase() !== "bearer" || !token || !token.startsWith(SOCKET_API_KEY_PREFIX)) return false;
|
|
57889
|
+
req.auth = {
|
|
57890
|
+
token,
|
|
57891
|
+
clientId: "socket-api-key",
|
|
57892
|
+
scopes: []
|
|
57893
|
+
};
|
|
57894
|
+
return true;
|
|
57895
|
+
}
|
|
57788
57896
|
function destroySession(sessions, id) {
|
|
57789
57897
|
const s = sessions.get(id);
|
|
57790
57898
|
if (!s) return;
|
|
@@ -57857,6 +57965,18 @@ async function handlePost(sessions, req, res, origin, host) {
|
|
|
57857
57965
|
try {
|
|
57858
57966
|
body = await readPostBody(req);
|
|
57859
57967
|
} catch (error) {
|
|
57968
|
+
if (error instanceof PayloadTooLargeError) {
|
|
57969
|
+
logger.error(error.message);
|
|
57970
|
+
if (!res.headersSent) writeJson(res, 413, {
|
|
57971
|
+
jsonrpc: "2.0",
|
|
57972
|
+
error: {
|
|
57973
|
+
code: -32600,
|
|
57974
|
+
message: "Request body too large"
|
|
57975
|
+
},
|
|
57976
|
+
id: void 0
|
|
57977
|
+
});
|
|
57978
|
+
return;
|
|
57979
|
+
}
|
|
57860
57980
|
logger.error(`Error reading POST body: ${error}`);
|
|
57861
57981
|
if (!res.headersSent) writeJson(res, 500, {
|
|
57862
57982
|
jsonrpc: "2.0",
|
|
@@ -57925,37 +58045,24 @@ async function handlePost(sessions, req, res, origin, host) {
|
|
|
57925
58045
|
});
|
|
57926
58046
|
}
|
|
57927
58047
|
}
|
|
57928
|
-
function isLocalhostOrigin(originUrl) {
|
|
57929
|
-
try {
|
|
57930
|
-
const originValue = new URL(originUrl);
|
|
57931
|
-
return originValue.hostname === "127.0.0.1" || originValue.hostname === "localhost";
|
|
57932
|
-
} catch {
|
|
57933
|
-
return false;
|
|
57934
|
-
}
|
|
57935
|
-
}
|
|
57936
|
-
function patchAcceptHeader(req) {
|
|
57937
|
-
const accept = req.headers.accept || "";
|
|
57938
|
-
if (accept.includes("application/json") && accept.includes("text/event-stream")) return;
|
|
57939
|
-
const requiredAccept = "application/json, text/event-stream";
|
|
57940
|
-
req.headers.accept = requiredAccept;
|
|
57941
|
-
const idx = req.rawHeaders.findIndex((h) => h.toLowerCase() === "accept");
|
|
57942
|
-
if (idx !== -1) req.rawHeaders[idx + 1] = requiredAccept;
|
|
57943
|
-
else req.rawHeaders.push("Accept", requiredAccept);
|
|
57944
|
-
}
|
|
57945
58048
|
async function readPostBody(req) {
|
|
57946
58049
|
let body = "";
|
|
57947
|
-
|
|
58050
|
+
let bytes = 0;
|
|
58051
|
+
for await (const chunk of req) {
|
|
58052
|
+
bytes += typeof chunk === "string" ? Buffer.byteLength(chunk) : chunk.length;
|
|
58053
|
+
if (bytes > MAX_POST_BODY_BYTES) {
|
|
58054
|
+
req.destroy();
|
|
58055
|
+
throw new PayloadTooLargeError(MAX_POST_BODY_BYTES);
|
|
58056
|
+
}
|
|
58057
|
+
body += typeof chunk === "string" ? chunk : chunk.toString();
|
|
58058
|
+
}
|
|
57948
58059
|
return body;
|
|
57949
58060
|
}
|
|
57950
58061
|
function reapIdleSessions(sessions) {
|
|
57951
58062
|
const now = Date.now();
|
|
57952
|
-
const
|
|
57953
|
-
|
|
57954
|
-
|
|
57955
|
-
if (now - session.lastActivity > SESSION_TTL_MS) {
|
|
57956
|
-
logger.info(`Reaping idle session ${id}`);
|
|
57957
|
-
destroySession(sessions, id);
|
|
57958
|
-
}
|
|
58063
|
+
for (const [id, session] of Array.from(sessions.entries())) if (now - session.lastActivity > SESSION_TTL_MS) {
|
|
58064
|
+
logger.info(`Reaping idle session ${id}`);
|
|
58065
|
+
destroySession(sessions, id);
|
|
57959
58066
|
}
|
|
57960
58067
|
}
|
|
57961
58068
|
async function routeRequest(sessions, req, res, port) {
|
|
@@ -58022,9 +58129,10 @@ async function routeRequest(sessions, req, res, port) {
|
|
|
58022
58129
|
return;
|
|
58023
58130
|
}
|
|
58024
58131
|
patchAcceptHeader(req);
|
|
58025
|
-
|
|
58132
|
+
const hasApiKey = applySocketApiKey(req);
|
|
58133
|
+
if (!hasApiKey && isOauthEnabled()) {
|
|
58026
58134
|
if (!(await authenticateRequest(req, res, getProtectedResourceMetadataUrl(baseUrl))).ok) return;
|
|
58027
|
-
}
|
|
58135
|
+
} else if (!hasApiKey) applyClientApiKey(req);
|
|
58028
58136
|
if (req.method === "POST") await handlePost(sessions, req, res, origin, host);
|
|
58029
58137
|
else if (req.method === "GET") await handleGet(sessions, req, res);
|
|
58030
58138
|
else if (req.method === "DELETE") await handleDelete(sessions, req, res);
|
|
@@ -58046,18 +58154,6 @@ function startHttpServer(port) {
|
|
|
58046
58154
|
logger.info(`Connect to: http://localhost:${port}/`);
|
|
58047
58155
|
});
|
|
58048
58156
|
}
|
|
58049
|
-
function validateOriginAndHost(origin, host, port) {
|
|
58050
|
-
const allowedHosts = ALLOWED_ORIGINS.map((o) => new URL(o).hostname);
|
|
58051
|
-
const isAllowedHost = host === `localhost:${port}` || host === `127.0.0.1:${port}` || host === "localhost" || host === "127.0.0.1" || allowedHosts.includes(host);
|
|
58052
|
-
return origin ? isLocalhostOrigin(origin) || ALLOWED_ORIGINS.includes(origin) : isAllowedHost;
|
|
58053
|
-
}
|
|
58054
|
-
function writeCorsHeaders(res, origin) {
|
|
58055
|
-
if (!origin) return;
|
|
58056
|
-
res.setHeader("Access-Control-Allow-Origin", origin);
|
|
58057
|
-
res.setHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, OPTIONS");
|
|
58058
|
-
res.setHeader("Access-Control-Allow-Headers", "Authorization, Content-Type, Accept, Mcp-Session-Id");
|
|
58059
|
-
res.setHeader("Access-Control-Expose-Headers", "Mcp-Session-Id, WWW-Authenticate");
|
|
58060
|
-
}
|
|
58061
58157
|
|
|
58062
58158
|
//#endregion
|
|
58063
58159
|
//#region index.ts
|
|
@@ -58081,7 +58177,7 @@ async function main() {
|
|
|
58081
58177
|
process.exitCode = 1;
|
|
58082
58178
|
return;
|
|
58083
58179
|
}
|
|
58084
|
-
setStaticApiKey(apiKey);
|
|
58180
|
+
setStaticApiKey(apiKey, { shared: useHttp });
|
|
58085
58181
|
if (oauthEnabled && oauthEnabledResult) try {
|
|
58086
58182
|
await loadOAuthMetadata();
|
|
58087
58183
|
logger.info(`Enabled OAuth-backed MCP auth with issuer ${oauthEnabledResult.issuer}`);
|