@supacloud/admin 0.22.3 → 0.23.1
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/LICENSE +661 -0
- package/LICENSE-APACHE-2.0.txt +202 -0
- package/NOTICE +22 -0
- package/dist/index.js +2847 -380
- package/package.json +5 -3
package/dist/index.js
CHANGED
|
@@ -18838,7 +18838,7 @@ import { resolve as resolve4 } from "node:path";
|
|
|
18838
18838
|
import { fileURLToPath } from "node:url";
|
|
18839
18839
|
import { realpathSync } from "node:fs";
|
|
18840
18840
|
|
|
18841
|
-
// node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
|
|
18841
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
|
|
18842
18842
|
function IsAsyncIterator(value) {
|
|
18843
18843
|
return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.asyncIterator in value;
|
|
18844
18844
|
}
|
|
@@ -18885,7 +18885,7 @@ function IsUndefined(value) {
|
|
|
18885
18885
|
return value === undefined;
|
|
18886
18886
|
}
|
|
18887
18887
|
|
|
18888
|
-
// node_modules/@sinclair/typebox/build/esm/type/clone/value.mjs
|
|
18888
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/clone/value.mjs
|
|
18889
18889
|
function ArrayType(value) {
|
|
18890
18890
|
return value.map((value) => Visit(value));
|
|
18891
18891
|
}
|
|
@@ -18915,12 +18915,12 @@ function Clone(value) {
|
|
|
18915
18915
|
return Visit(value);
|
|
18916
18916
|
}
|
|
18917
18917
|
|
|
18918
|
-
// node_modules/@sinclair/typebox/build/esm/type/clone/type.mjs
|
|
18918
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/clone/type.mjs
|
|
18919
18919
|
function CloneType(schema, options) {
|
|
18920
18920
|
return options === undefined ? Clone(schema) : Clone({ ...options, ...schema });
|
|
18921
18921
|
}
|
|
18922
18922
|
|
|
18923
|
-
// node_modules/@sinclair/typebox/build/esm/value/guard/guard.mjs
|
|
18923
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/value/guard/guard.mjs
|
|
18924
18924
|
function IsAsyncIterator2(value) {
|
|
18925
18925
|
return IsObject2(value) && globalThis.Symbol.asyncIterator in value;
|
|
18926
18926
|
}
|
|
@@ -18976,7 +18976,7 @@ function IsValueType(value) {
|
|
|
18976
18976
|
return IsBigInt2(value) || IsBoolean2(value) || IsNull2(value) || IsNumber2(value) || IsString2(value) || IsSymbol2(value) || IsUndefined2(value);
|
|
18977
18977
|
}
|
|
18978
18978
|
|
|
18979
|
-
// node_modules/@sinclair/typebox/build/esm/system/policy.mjs
|
|
18979
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/system/policy.mjs
|
|
18980
18980
|
var TypeSystemPolicy;
|
|
18981
18981
|
(function(TypeSystemPolicy) {
|
|
18982
18982
|
TypeSystemPolicy.InstanceMode = "default";
|
|
@@ -19008,7 +19008,7 @@ var TypeSystemPolicy;
|
|
|
19008
19008
|
TypeSystemPolicy.IsVoidLike = IsVoidLike;
|
|
19009
19009
|
})(TypeSystemPolicy || (TypeSystemPolicy = {}));
|
|
19010
19010
|
|
|
19011
|
-
// node_modules/@sinclair/typebox/build/esm/type/create/immutable.mjs
|
|
19011
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/create/immutable.mjs
|
|
19012
19012
|
function ImmutableArray(value) {
|
|
19013
19013
|
return globalThis.Object.freeze(value).map((value) => Immutable(value));
|
|
19014
19014
|
}
|
|
@@ -19035,7 +19035,7 @@ function Immutable(value) {
|
|
|
19035
19035
|
return IsArray(value) ? ImmutableArray(value) : IsDate(value) ? ImmutableDate(value) : IsUint8Array(value) ? ImmutableUint8Array(value) : IsRegExp(value) ? ImmutableRegExp(value) : IsObject(value) ? ImmutableObject(value) : value;
|
|
19036
19036
|
}
|
|
19037
19037
|
|
|
19038
|
-
// node_modules/@sinclair/typebox/build/esm/type/create/type.mjs
|
|
19038
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/create/type.mjs
|
|
19039
19039
|
function CreateType(schema, options) {
|
|
19040
19040
|
const result = options !== undefined ? { ...options, ...schema } : schema;
|
|
19041
19041
|
switch (TypeSystemPolicy.InstanceMode) {
|
|
@@ -19048,21 +19048,21 @@ function CreateType(schema, options) {
|
|
|
19048
19048
|
}
|
|
19049
19049
|
}
|
|
19050
19050
|
|
|
19051
|
-
// node_modules/@sinclair/typebox/build/esm/type/error/error.mjs
|
|
19051
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/error/error.mjs
|
|
19052
19052
|
class TypeBoxError extends Error {
|
|
19053
19053
|
constructor(message) {
|
|
19054
19054
|
super(message);
|
|
19055
19055
|
}
|
|
19056
19056
|
}
|
|
19057
19057
|
|
|
19058
|
-
// node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs
|
|
19058
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs
|
|
19059
19059
|
var TransformKind = Symbol.for("TypeBox.Transform");
|
|
19060
19060
|
var ReadonlyKind = Symbol.for("TypeBox.Readonly");
|
|
19061
19061
|
var OptionalKind = Symbol.for("TypeBox.Optional");
|
|
19062
19062
|
var Hint = Symbol.for("TypeBox.Hint");
|
|
19063
19063
|
var Kind = Symbol.for("TypeBox.Kind");
|
|
19064
19064
|
|
|
19065
|
-
// node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
|
|
19065
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
|
|
19066
19066
|
function IsReadonly(value) {
|
|
19067
19067
|
return IsObject(value) && value[ReadonlyKind] === "Readonly";
|
|
19068
19068
|
}
|
|
@@ -19192,7 +19192,7 @@ function IsKind(value) {
|
|
|
19192
19192
|
function IsSchema(value) {
|
|
19193
19193
|
return IsAny(value) || IsArgument(value) || IsArray3(value) || IsBoolean3(value) || IsBigInt3(value) || IsAsyncIterator3(value) || IsComputed(value) || IsConstructor(value) || IsDate3(value) || IsFunction3(value) || IsInteger2(value) || IsIntersect(value) || IsIterator3(value) || IsLiteral(value) || IsMappedKey(value) || IsMappedResult(value) || IsNever(value) || IsNot(value) || IsNull3(value) || IsNumber3(value) || IsObject3(value) || IsPromise2(value) || IsRecord(value) || IsRef(value) || IsRegExp2(value) || IsString3(value) || IsSymbol3(value) || IsTemplateLiteral(value) || IsThis(value) || IsTuple(value) || IsUndefined3(value) || IsUnion(value) || IsUint8Array3(value) || IsUnknown(value) || IsUnsafe(value) || IsVoid(value) || IsKind(value);
|
|
19194
19194
|
}
|
|
19195
|
-
// node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
|
|
19195
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
|
|
19196
19196
|
var KnownTypes = [
|
|
19197
19197
|
"Argument",
|
|
19198
19198
|
"Any",
|
|
@@ -19414,7 +19414,7 @@ function IsKind2(value) {
|
|
|
19414
19414
|
function IsSchema2(value) {
|
|
19415
19415
|
return IsObject(value) && (IsAny2(value) || IsArgument2(value) || IsArray4(value) || IsBoolean4(value) || IsBigInt4(value) || IsAsyncIterator4(value) || IsComputed2(value) || IsConstructor2(value) || IsDate4(value) || IsFunction4(value) || IsInteger3(value) || IsIntersect2(value) || IsIterator4(value) || IsLiteral2(value) || IsMappedKey2(value) || IsMappedResult2(value) || IsNever2(value) || IsNot2(value) || IsNull4(value) || IsNumber4(value) || IsObject4(value) || IsPromise3(value) || IsRecord2(value) || IsRef2(value) || IsRegExp3(value) || IsString4(value) || IsSymbol4(value) || IsTemplateLiteral2(value) || IsThis2(value) || IsTuple2(value) || IsUndefined4(value) || IsUnion2(value) || IsUint8Array4(value) || IsUnknown2(value) || IsUnsafe2(value) || IsVoid2(value) || IsKind2(value));
|
|
19416
19416
|
}
|
|
19417
|
-
// node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.mjs
|
|
19417
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.mjs
|
|
19418
19418
|
var PatternBoolean = "(true|false)";
|
|
19419
19419
|
var PatternNumber = "(0|[1-9][0-9]*)";
|
|
19420
19420
|
var PatternString = "(.*)";
|
|
@@ -19424,7 +19424,7 @@ var PatternNumberExact = `^${PatternNumber}$`;
|
|
|
19424
19424
|
var PatternStringExact = `^${PatternString}$`;
|
|
19425
19425
|
var PatternNeverExact = `^${PatternNever}$`;
|
|
19426
19426
|
|
|
19427
|
-
// node_modules/@sinclair/typebox/build/esm/type/registry/format.mjs
|
|
19427
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/registry/format.mjs
|
|
19428
19428
|
var map = new Map;
|
|
19429
19429
|
function Has(format) {
|
|
19430
19430
|
return map.has(format);
|
|
@@ -19432,7 +19432,7 @@ function Has(format) {
|
|
|
19432
19432
|
function Get(format) {
|
|
19433
19433
|
return map.get(format);
|
|
19434
19434
|
}
|
|
19435
|
-
// node_modules/@sinclair/typebox/build/esm/type/registry/type.mjs
|
|
19435
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/registry/type.mjs
|
|
19436
19436
|
var map2 = new Map;
|
|
19437
19437
|
function Has2(kind) {
|
|
19438
19438
|
return map2.has(kind);
|
|
@@ -19440,7 +19440,7 @@ function Has2(kind) {
|
|
|
19440
19440
|
function Get2(kind) {
|
|
19441
19441
|
return map2.get(kind);
|
|
19442
19442
|
}
|
|
19443
|
-
// node_modules/@sinclair/typebox/build/esm/type/sets/set.mjs
|
|
19443
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/sets/set.mjs
|
|
19444
19444
|
function SetIncludes(T, S) {
|
|
19445
19445
|
return T.includes(S);
|
|
19446
19446
|
}
|
|
@@ -19465,32 +19465,32 @@ function SetUnionMany(T) {
|
|
|
19465
19465
|
return Acc;
|
|
19466
19466
|
}
|
|
19467
19467
|
|
|
19468
|
-
// node_modules/@sinclair/typebox/build/esm/type/any/any.mjs
|
|
19468
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/any/any.mjs
|
|
19469
19469
|
function Any(options) {
|
|
19470
19470
|
return CreateType({ [Kind]: "Any" }, options);
|
|
19471
19471
|
}
|
|
19472
19472
|
|
|
19473
|
-
// node_modules/@sinclair/typebox/build/esm/type/array/array.mjs
|
|
19473
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/array/array.mjs
|
|
19474
19474
|
function Array2(items, options) {
|
|
19475
19475
|
return CreateType({ [Kind]: "Array", type: "array", items }, options);
|
|
19476
19476
|
}
|
|
19477
19477
|
|
|
19478
|
-
// node_modules/@sinclair/typebox/build/esm/type/argument/argument.mjs
|
|
19478
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/argument/argument.mjs
|
|
19479
19479
|
function Argument(index) {
|
|
19480
19480
|
return CreateType({ [Kind]: "Argument", index });
|
|
19481
19481
|
}
|
|
19482
19482
|
|
|
19483
|
-
// node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs
|
|
19483
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs
|
|
19484
19484
|
function AsyncIterator(items, options) {
|
|
19485
19485
|
return CreateType({ [Kind]: "AsyncIterator", type: "AsyncIterator", items }, options);
|
|
19486
19486
|
}
|
|
19487
19487
|
|
|
19488
|
-
// node_modules/@sinclair/typebox/build/esm/type/computed/computed.mjs
|
|
19488
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/computed/computed.mjs
|
|
19489
19489
|
function Computed(target, parameters, options) {
|
|
19490
19490
|
return CreateType({ [Kind]: "Computed", target, parameters }, options);
|
|
19491
19491
|
}
|
|
19492
19492
|
|
|
19493
|
-
// node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs
|
|
19493
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs
|
|
19494
19494
|
function DiscardKey(value, key) {
|
|
19495
19495
|
const { [key]: _, ...rest } = value;
|
|
19496
19496
|
return rest;
|
|
@@ -19499,12 +19499,12 @@ function Discard(value, keys) {
|
|
|
19499
19499
|
return keys.reduce((acc, key) => DiscardKey(acc, key), value);
|
|
19500
19500
|
}
|
|
19501
19501
|
|
|
19502
|
-
// node_modules/@sinclair/typebox/build/esm/type/never/never.mjs
|
|
19502
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/never/never.mjs
|
|
19503
19503
|
function Never(options) {
|
|
19504
19504
|
return CreateType({ [Kind]: "Never", not: {} }, options);
|
|
19505
19505
|
}
|
|
19506
19506
|
|
|
19507
|
-
// node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs
|
|
19507
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs
|
|
19508
19508
|
function MappedResult(properties) {
|
|
19509
19509
|
return CreateType({
|
|
19510
19510
|
[Kind]: "MappedResult",
|
|
@@ -19512,22 +19512,22 @@ function MappedResult(properties) {
|
|
|
19512
19512
|
});
|
|
19513
19513
|
}
|
|
19514
19514
|
|
|
19515
|
-
// node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.mjs
|
|
19515
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.mjs
|
|
19516
19516
|
function Constructor(parameters, returns, options) {
|
|
19517
19517
|
return CreateType({ [Kind]: "Constructor", type: "Constructor", parameters, returns }, options);
|
|
19518
19518
|
}
|
|
19519
19519
|
|
|
19520
|
-
// node_modules/@sinclair/typebox/build/esm/type/function/function.mjs
|
|
19520
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/function/function.mjs
|
|
19521
19521
|
function Function2(parameters, returns, options) {
|
|
19522
19522
|
return CreateType({ [Kind]: "Function", type: "Function", parameters, returns }, options);
|
|
19523
19523
|
}
|
|
19524
19524
|
|
|
19525
|
-
// node_modules/@sinclair/typebox/build/esm/type/union/union-create.mjs
|
|
19525
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/union/union-create.mjs
|
|
19526
19526
|
function UnionCreate(T, options) {
|
|
19527
19527
|
return CreateType({ [Kind]: "Union", anyOf: T }, options);
|
|
19528
19528
|
}
|
|
19529
19529
|
|
|
19530
|
-
// node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs
|
|
19530
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs
|
|
19531
19531
|
function IsUnionOptional(types) {
|
|
19532
19532
|
return types.some((type) => IsOptional(type));
|
|
19533
19533
|
}
|
|
@@ -19545,12 +19545,12 @@ function UnionEvaluated(T, options) {
|
|
|
19545
19545
|
return T.length === 1 ? CreateType(T[0], options) : T.length === 0 ? Never(options) : ResolveUnion(T, options);
|
|
19546
19546
|
}
|
|
19547
19547
|
|
|
19548
|
-
// node_modules/@sinclair/typebox/build/esm/type/union/union.mjs
|
|
19548
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/union/union.mjs
|
|
19549
19549
|
function Union(types, options) {
|
|
19550
19550
|
return types.length === 0 ? Never(options) : types.length === 1 ? CreateType(types[0], options) : UnionCreate(types, options);
|
|
19551
19551
|
}
|
|
19552
19552
|
|
|
19553
|
-
// node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.mjs
|
|
19553
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.mjs
|
|
19554
19554
|
class TemplateLiteralParserError extends TypeBoxError {
|
|
19555
19555
|
}
|
|
19556
19556
|
function Unescape(pattern) {
|
|
@@ -19674,7 +19674,7 @@ function TemplateLiteralParseExact(pattern) {
|
|
|
19674
19674
|
return TemplateLiteralParse(pattern.slice(1, pattern.length - 1));
|
|
19675
19675
|
}
|
|
19676
19676
|
|
|
19677
|
-
// node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.mjs
|
|
19677
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.mjs
|
|
19678
19678
|
class TemplateLiteralFiniteError extends TypeBoxError {
|
|
19679
19679
|
}
|
|
19680
19680
|
function IsNumberExpression(expression) {
|
|
@@ -19696,7 +19696,7 @@ function IsTemplateLiteralFinite(schema) {
|
|
|
19696
19696
|
return IsTemplateLiteralExpressionFinite(expression);
|
|
19697
19697
|
}
|
|
19698
19698
|
|
|
19699
|
-
// node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.mjs
|
|
19699
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.mjs
|
|
19700
19700
|
class TemplateLiteralGenerateError extends TypeBoxError {
|
|
19701
19701
|
}
|
|
19702
19702
|
function* GenerateReduce(buffer) {
|
|
@@ -19728,7 +19728,7 @@ function TemplateLiteralGenerate(schema) {
|
|
|
19728
19728
|
return IsTemplateLiteralExpressionFinite(expression) ? [...TemplateLiteralExpressionGenerate(expression)] : [];
|
|
19729
19729
|
}
|
|
19730
19730
|
|
|
19731
|
-
// node_modules/@sinclair/typebox/build/esm/type/literal/literal.mjs
|
|
19731
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/literal/literal.mjs
|
|
19732
19732
|
function Literal(value, options) {
|
|
19733
19733
|
return CreateType({
|
|
19734
19734
|
[Kind]: "Literal",
|
|
@@ -19737,27 +19737,27 @@ function Literal(value, options) {
|
|
|
19737
19737
|
}, options);
|
|
19738
19738
|
}
|
|
19739
19739
|
|
|
19740
|
-
// node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs
|
|
19740
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs
|
|
19741
19741
|
function Boolean2(options) {
|
|
19742
19742
|
return CreateType({ [Kind]: "Boolean", type: "boolean" }, options);
|
|
19743
19743
|
}
|
|
19744
19744
|
|
|
19745
|
-
// node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.mjs
|
|
19745
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.mjs
|
|
19746
19746
|
function BigInt2(options) {
|
|
19747
19747
|
return CreateType({ [Kind]: "BigInt", type: "bigint" }, options);
|
|
19748
19748
|
}
|
|
19749
19749
|
|
|
19750
|
-
// node_modules/@sinclair/typebox/build/esm/type/number/number.mjs
|
|
19750
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/number/number.mjs
|
|
19751
19751
|
function Number2(options) {
|
|
19752
19752
|
return CreateType({ [Kind]: "Number", type: "number" }, options);
|
|
19753
19753
|
}
|
|
19754
19754
|
|
|
19755
|
-
// node_modules/@sinclair/typebox/build/esm/type/string/string.mjs
|
|
19755
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/string/string.mjs
|
|
19756
19756
|
function String2(options) {
|
|
19757
19757
|
return CreateType({ [Kind]: "String", type: "string" }, options);
|
|
19758
19758
|
}
|
|
19759
19759
|
|
|
19760
|
-
// node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
|
|
19760
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
|
|
19761
19761
|
function* FromUnion(syntax) {
|
|
19762
19762
|
const trim = syntax.trim().replace(/"|'/g, "");
|
|
19763
19763
|
return trim === "boolean" ? yield Boolean2() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt2() : trim === "string" ? yield String2() : yield (() => {
|
|
@@ -19794,7 +19794,7 @@ function TemplateLiteralSyntax(syntax) {
|
|
|
19794
19794
|
return [...FromSyntax(syntax)];
|
|
19795
19795
|
}
|
|
19796
19796
|
|
|
19797
|
-
// node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs
|
|
19797
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs
|
|
19798
19798
|
class TemplateLiteralPatternError extends TypeBoxError {
|
|
19799
19799
|
}
|
|
19800
19800
|
function Escape(value) {
|
|
@@ -19809,20 +19809,20 @@ function TemplateLiteralPattern(kinds) {
|
|
|
19809
19809
|
return `^${kinds.map((schema) => Visit2(schema, "")).join("")}$`;
|
|
19810
19810
|
}
|
|
19811
19811
|
|
|
19812
|
-
// node_modules/@sinclair/typebox/build/esm/type/template-literal/union.mjs
|
|
19812
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/template-literal/union.mjs
|
|
19813
19813
|
function TemplateLiteralToUnion(schema) {
|
|
19814
19814
|
const R = TemplateLiteralGenerate(schema);
|
|
19815
19815
|
const L = R.map((S) => Literal(S));
|
|
19816
19816
|
return UnionEvaluated(L);
|
|
19817
19817
|
}
|
|
19818
19818
|
|
|
19819
|
-
// node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs
|
|
19819
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs
|
|
19820
19820
|
function TemplateLiteral(unresolved, options) {
|
|
19821
19821
|
const pattern = IsString(unresolved) ? TemplateLiteralPattern(TemplateLiteralSyntax(unresolved)) : TemplateLiteralPattern(unresolved);
|
|
19822
19822
|
return CreateType({ [Kind]: "TemplateLiteral", type: "string", pattern }, options);
|
|
19823
19823
|
}
|
|
19824
19824
|
|
|
19825
|
-
// node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs
|
|
19825
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs
|
|
19826
19826
|
function FromTemplateLiteral(templateLiteral) {
|
|
19827
19827
|
const keys = TemplateLiteralGenerate(templateLiteral);
|
|
19828
19828
|
return keys.map((key) => key.toString());
|
|
@@ -19840,7 +19840,7 @@ function IndexPropertyKeys(type) {
|
|
|
19840
19840
|
return [...new Set(IsTemplateLiteral(type) ? FromTemplateLiteral(type) : IsUnion(type) ? FromUnion2(type.anyOf) : IsLiteral(type) ? FromLiteral(type.const) : IsNumber3(type) ? ["[number]"] : IsInteger2(type) ? ["[number]"] : [])];
|
|
19841
19841
|
}
|
|
19842
19842
|
|
|
19843
|
-
// node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs
|
|
19843
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs
|
|
19844
19844
|
function FromProperties(type, properties, options) {
|
|
19845
19845
|
const result = {};
|
|
19846
19846
|
for (const K2 of Object.getOwnPropertyNames(properties)) {
|
|
@@ -19856,7 +19856,7 @@ function IndexFromMappedResult(type, mappedResult, options) {
|
|
|
19856
19856
|
return MappedResult(properties);
|
|
19857
19857
|
}
|
|
19858
19858
|
|
|
19859
|
-
// node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs
|
|
19859
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs
|
|
19860
19860
|
function FromRest(types, key) {
|
|
19861
19861
|
return types.map((type) => IndexFromPropertyKey(type, key));
|
|
19862
19862
|
}
|
|
@@ -19904,7 +19904,7 @@ function Index(type, key, options) {
|
|
|
19904
19904
|
return CreateType(IsSchema(key) ? FromSchema(type, IndexPropertyKeys(key)) : FromSchema(type, key), options);
|
|
19905
19905
|
}
|
|
19906
19906
|
|
|
19907
|
-
// node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs
|
|
19907
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs
|
|
19908
19908
|
function MappedIndexPropertyKey(type, key, options) {
|
|
19909
19909
|
return { [key]: Index(type, [key], Clone(options)) };
|
|
19910
19910
|
}
|
|
@@ -19921,12 +19921,12 @@ function IndexFromMappedKey(type, mappedKey, options) {
|
|
|
19921
19921
|
return MappedResult(properties);
|
|
19922
19922
|
}
|
|
19923
19923
|
|
|
19924
|
-
// node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.mjs
|
|
19924
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.mjs
|
|
19925
19925
|
function Iterator(items, options) {
|
|
19926
19926
|
return CreateType({ [Kind]: "Iterator", type: "Iterator", items }, options);
|
|
19927
19927
|
}
|
|
19928
19928
|
|
|
19929
|
-
// node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
|
|
19929
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
|
|
19930
19930
|
function RequiredArray(properties) {
|
|
19931
19931
|
return globalThis.Object.keys(properties).filter((key) => !IsOptional(properties[key]));
|
|
19932
19932
|
}
|
|
@@ -19937,12 +19937,12 @@ function _Object_(properties, options) {
|
|
|
19937
19937
|
}
|
|
19938
19938
|
var Object2 = _Object_;
|
|
19939
19939
|
|
|
19940
|
-
// node_modules/@sinclair/typebox/build/esm/type/promise/promise.mjs
|
|
19940
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/promise/promise.mjs
|
|
19941
19941
|
function Promise2(item, options) {
|
|
19942
19942
|
return CreateType({ [Kind]: "Promise", type: "Promise", item }, options);
|
|
19943
19943
|
}
|
|
19944
19944
|
|
|
19945
|
-
// node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.mjs
|
|
19945
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.mjs
|
|
19946
19946
|
function RemoveReadonly(schema) {
|
|
19947
19947
|
return CreateType(Discard(schema, [ReadonlyKind]));
|
|
19948
19948
|
}
|
|
@@ -19957,7 +19957,7 @@ function Readonly(schema, enable) {
|
|
|
19957
19957
|
return IsMappedResult(schema) ? ReadonlyFromMappedResult(schema, F) : ReadonlyWithFlag(schema, F);
|
|
19958
19958
|
}
|
|
19959
19959
|
|
|
19960
|
-
// node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs
|
|
19960
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs
|
|
19961
19961
|
function FromProperties2(K, F) {
|
|
19962
19962
|
const Acc = {};
|
|
19963
19963
|
for (const K2 of globalThis.Object.getOwnPropertyNames(K))
|
|
@@ -19972,12 +19972,12 @@ function ReadonlyFromMappedResult(R, F) {
|
|
|
19972
19972
|
return MappedResult(P);
|
|
19973
19973
|
}
|
|
19974
19974
|
|
|
19975
|
-
// node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.mjs
|
|
19975
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.mjs
|
|
19976
19976
|
function Tuple(types, options) {
|
|
19977
19977
|
return CreateType(types.length > 0 ? { [Kind]: "Tuple", type: "array", items: types, additionalItems: false, minItems: types.length, maxItems: types.length } : { [Kind]: "Tuple", type: "array", minItems: types.length, maxItems: types.length }, options);
|
|
19978
19978
|
}
|
|
19979
19979
|
|
|
19980
|
-
// node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.mjs
|
|
19980
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.mjs
|
|
19981
19981
|
function FromMappedResult3(K, P) {
|
|
19982
19982
|
return K in P ? FromSchemaType(K, P[K]) : MappedResult(P);
|
|
19983
19983
|
}
|
|
@@ -20023,7 +20023,7 @@ function Mapped(key, map, options) {
|
|
|
20023
20023
|
return Object2(R, options);
|
|
20024
20024
|
}
|
|
20025
20025
|
|
|
20026
|
-
// node_modules/@sinclair/typebox/build/esm/type/optional/optional.mjs
|
|
20026
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/optional/optional.mjs
|
|
20027
20027
|
function RemoveOptional(schema) {
|
|
20028
20028
|
return CreateType(Discard(schema, [OptionalKind]));
|
|
20029
20029
|
}
|
|
@@ -20038,7 +20038,7 @@ function Optional(schema, enable) {
|
|
|
20038
20038
|
return IsMappedResult(schema) ? OptionalFromMappedResult(schema, F) : OptionalWithFlag(schema, F);
|
|
20039
20039
|
}
|
|
20040
20040
|
|
|
20041
|
-
// node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs
|
|
20041
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs
|
|
20042
20042
|
function FromProperties4(P, F) {
|
|
20043
20043
|
const Acc = {};
|
|
20044
20044
|
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
@@ -20053,14 +20053,14 @@ function OptionalFromMappedResult(R, F) {
|
|
|
20053
20053
|
return MappedResult(P);
|
|
20054
20054
|
}
|
|
20055
20055
|
|
|
20056
|
-
// node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs
|
|
20056
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs
|
|
20057
20057
|
function IntersectCreate(T, options = {}) {
|
|
20058
20058
|
const allObjects = T.every((schema) => IsObject3(schema));
|
|
20059
20059
|
const clonedUnevaluatedProperties = IsSchema(options.unevaluatedProperties) ? { unevaluatedProperties: options.unevaluatedProperties } : {};
|
|
20060
20060
|
return CreateType(options.unevaluatedProperties === false || IsSchema(options.unevaluatedProperties) || allObjects ? { ...clonedUnevaluatedProperties, [Kind]: "Intersect", type: "object", allOf: T } : { ...clonedUnevaluatedProperties, [Kind]: "Intersect", allOf: T }, options);
|
|
20061
20061
|
}
|
|
20062
20062
|
|
|
20063
|
-
// node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs
|
|
20063
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs
|
|
20064
20064
|
function IsIntersectOptional(types) {
|
|
20065
20065
|
return types.every((left) => IsOptional(left));
|
|
20066
20066
|
}
|
|
@@ -20083,7 +20083,7 @@ function IntersectEvaluated(types, options = {}) {
|
|
|
20083
20083
|
return ResolveIntersect(types, options);
|
|
20084
20084
|
}
|
|
20085
20085
|
|
|
20086
|
-
// node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.mjs
|
|
20086
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.mjs
|
|
20087
20087
|
function Intersect(types, options) {
|
|
20088
20088
|
if (types.length === 1)
|
|
20089
20089
|
return CreateType(types[0], options);
|
|
@@ -20094,7 +20094,7 @@ function Intersect(types, options) {
|
|
|
20094
20094
|
return IntersectCreate(types, options);
|
|
20095
20095
|
}
|
|
20096
20096
|
|
|
20097
|
-
// node_modules/@sinclair/typebox/build/esm/type/ref/ref.mjs
|
|
20097
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/ref/ref.mjs
|
|
20098
20098
|
function Ref(...args) {
|
|
20099
20099
|
const [$ref, options] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].$id, args[1]];
|
|
20100
20100
|
if (typeof $ref !== "string")
|
|
@@ -20102,7 +20102,7 @@ function Ref(...args) {
|
|
|
20102
20102
|
return CreateType({ [Kind]: "Ref", $ref }, options);
|
|
20103
20103
|
}
|
|
20104
20104
|
|
|
20105
|
-
// node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.mjs
|
|
20105
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.mjs
|
|
20106
20106
|
function FromComputed(target, parameters) {
|
|
20107
20107
|
return Computed("Awaited", [Computed(target, parameters)]);
|
|
20108
20108
|
}
|
|
@@ -20125,7 +20125,7 @@ function Awaited(type, options) {
|
|
|
20125
20125
|
return CreateType(IsComputed(type) ? FromComputed(type.target, type.parameters) : IsIntersect(type) ? FromIntersect2(type.allOf) : IsUnion(type) ? FromUnion4(type.anyOf) : IsPromise2(type) ? FromPromise(type.item) : IsRef(type) ? FromRef(type.$ref) : type, options);
|
|
20126
20126
|
}
|
|
20127
20127
|
|
|
20128
|
-
// node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs
|
|
20128
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs
|
|
20129
20129
|
function FromRest4(types) {
|
|
20130
20130
|
const result = [];
|
|
20131
20131
|
for (const L of types)
|
|
@@ -20171,7 +20171,7 @@ function KeyOfPattern(schema) {
|
|
|
20171
20171
|
return `^(${pattern.join("|")})$`;
|
|
20172
20172
|
}
|
|
20173
20173
|
|
|
20174
|
-
// node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.mjs
|
|
20174
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.mjs
|
|
20175
20175
|
function FromComputed2(target, parameters) {
|
|
20176
20176
|
return Computed("KeyOf", [Computed(target, parameters)]);
|
|
20177
20177
|
}
|
|
@@ -20191,7 +20191,7 @@ function KeyOf(type, options) {
|
|
|
20191
20191
|
return IsComputed(type) ? FromComputed2(type.target, type.parameters) : IsRef(type) ? FromRef2(type.$ref) : IsMappedResult(type) ? KeyOfFromMappedResult(type, options) : KeyOfFromType(type, options);
|
|
20192
20192
|
}
|
|
20193
20193
|
|
|
20194
|
-
// node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs
|
|
20194
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs
|
|
20195
20195
|
function FromProperties6(properties, options) {
|
|
20196
20196
|
const result = {};
|
|
20197
20197
|
for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
|
|
@@ -20206,14 +20206,14 @@ function KeyOfFromMappedResult(mappedResult, options) {
|
|
|
20206
20206
|
return MappedResult(properties);
|
|
20207
20207
|
}
|
|
20208
20208
|
|
|
20209
|
-
// node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-entries.mjs
|
|
20209
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-entries.mjs
|
|
20210
20210
|
function KeyOfPropertyEntries(schema) {
|
|
20211
20211
|
const keys = KeyOfPropertyKeys(schema);
|
|
20212
20212
|
const schemas = IndexFromPropertyKeys(schema, keys);
|
|
20213
20213
|
return keys.map((_, index) => [keys[index], schemas[index]]);
|
|
20214
20214
|
}
|
|
20215
20215
|
|
|
20216
|
-
// node_modules/@sinclair/typebox/build/esm/type/composite/composite.mjs
|
|
20216
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/composite/composite.mjs
|
|
20217
20217
|
function CompositeKeys(T) {
|
|
20218
20218
|
const Acc = [];
|
|
20219
20219
|
for (const L of T)
|
|
@@ -20243,37 +20243,37 @@ function Composite(T, options) {
|
|
|
20243
20243
|
return R;
|
|
20244
20244
|
}
|
|
20245
20245
|
|
|
20246
|
-
// node_modules/@sinclair/typebox/build/esm/type/date/date.mjs
|
|
20246
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/date/date.mjs
|
|
20247
20247
|
function Date2(options) {
|
|
20248
20248
|
return CreateType({ [Kind]: "Date", type: "Date" }, options);
|
|
20249
20249
|
}
|
|
20250
20250
|
|
|
20251
|
-
// node_modules/@sinclair/typebox/build/esm/type/null/null.mjs
|
|
20251
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/null/null.mjs
|
|
20252
20252
|
function Null(options) {
|
|
20253
20253
|
return CreateType({ [Kind]: "Null", type: "null" }, options);
|
|
20254
20254
|
}
|
|
20255
20255
|
|
|
20256
|
-
// node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.mjs
|
|
20256
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.mjs
|
|
20257
20257
|
function Symbol2(options) {
|
|
20258
20258
|
return CreateType({ [Kind]: "Symbol", type: "symbol" }, options);
|
|
20259
20259
|
}
|
|
20260
20260
|
|
|
20261
|
-
// node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.mjs
|
|
20261
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.mjs
|
|
20262
20262
|
function Undefined(options) {
|
|
20263
20263
|
return CreateType({ [Kind]: "Undefined", type: "undefined" }, options);
|
|
20264
20264
|
}
|
|
20265
20265
|
|
|
20266
|
-
// node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs
|
|
20266
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs
|
|
20267
20267
|
function Uint8Array2(options) {
|
|
20268
20268
|
return CreateType({ [Kind]: "Uint8Array", type: "Uint8Array" }, options);
|
|
20269
20269
|
}
|
|
20270
20270
|
|
|
20271
|
-
// node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.mjs
|
|
20271
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.mjs
|
|
20272
20272
|
function Unknown(options) {
|
|
20273
20273
|
return CreateType({ [Kind]: "Unknown" }, options);
|
|
20274
20274
|
}
|
|
20275
20275
|
|
|
20276
|
-
// node_modules/@sinclair/typebox/build/esm/type/const/const.mjs
|
|
20276
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/const/const.mjs
|
|
20277
20277
|
function FromArray3(T) {
|
|
20278
20278
|
return T.map((L) => FromValue(L, false));
|
|
20279
20279
|
}
|
|
@@ -20293,12 +20293,12 @@ function Const(T, options) {
|
|
|
20293
20293
|
return CreateType(FromValue(T, true), options);
|
|
20294
20294
|
}
|
|
20295
20295
|
|
|
20296
|
-
// node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs
|
|
20296
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs
|
|
20297
20297
|
function ConstructorParameters(schema, options) {
|
|
20298
20298
|
return IsConstructor(schema) ? Tuple(schema.parameters, options) : Never(options);
|
|
20299
20299
|
}
|
|
20300
20300
|
|
|
20301
|
-
// node_modules/@sinclair/typebox/build/esm/type/enum/enum.mjs
|
|
20301
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/enum/enum.mjs
|
|
20302
20302
|
function Enum(item, options) {
|
|
20303
20303
|
if (IsUndefined(item))
|
|
20304
20304
|
throw new Error("Enum undefined or empty");
|
|
@@ -20308,7 +20308,7 @@ function Enum(item, options) {
|
|
|
20308
20308
|
return Union(anyOf, { ...options, [Hint]: "Enum" });
|
|
20309
20309
|
}
|
|
20310
20310
|
|
|
20311
|
-
// node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.mjs
|
|
20311
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.mjs
|
|
20312
20312
|
class ExtendsResolverError extends TypeBoxError {
|
|
20313
20313
|
}
|
|
20314
20314
|
var ExtendsResult;
|
|
@@ -20553,7 +20553,7 @@ function ExtendsCheck(left, right) {
|
|
|
20553
20553
|
return Visit3(left, right);
|
|
20554
20554
|
}
|
|
20555
20555
|
|
|
20556
|
-
// node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs
|
|
20556
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs
|
|
20557
20557
|
function FromProperties8(P, Right, True, False, options) {
|
|
20558
20558
|
const Acc = {};
|
|
20559
20559
|
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
@@ -20568,7 +20568,7 @@ function ExtendsFromMappedResult(Left, Right, True, False, options) {
|
|
|
20568
20568
|
return MappedResult(P);
|
|
20569
20569
|
}
|
|
20570
20570
|
|
|
20571
|
-
// node_modules/@sinclair/typebox/build/esm/type/extends/extends.mjs
|
|
20571
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/extends/extends.mjs
|
|
20572
20572
|
function ExtendsResolve(left, right, trueType, falseType) {
|
|
20573
20573
|
const R = ExtendsCheck(left, right);
|
|
20574
20574
|
return R === ExtendsResult.Union ? Union([trueType, falseType]) : R === ExtendsResult.True ? trueType : falseType;
|
|
@@ -20577,7 +20577,7 @@ function Extends(L, R, T, F, options) {
|
|
|
20577
20577
|
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);
|
|
20578
20578
|
}
|
|
20579
20579
|
|
|
20580
|
-
// node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs
|
|
20580
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs
|
|
20581
20581
|
function FromPropertyKey(K, U, L, R, options) {
|
|
20582
20582
|
return {
|
|
20583
20583
|
[K]: Extends(Literal(K), U, L, R, Clone(options))
|
|
@@ -20596,7 +20596,7 @@ function ExtendsFromMappedKey(T, U, L, R, options) {
|
|
|
20596
20596
|
return MappedResult(P);
|
|
20597
20597
|
}
|
|
20598
20598
|
|
|
20599
|
-
// node_modules/@sinclair/typebox/build/esm/type/extends/extends-undefined.mjs
|
|
20599
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/extends/extends-undefined.mjs
|
|
20600
20600
|
function Intersect2(schema) {
|
|
20601
20601
|
return schema.allOf.every((schema) => ExtendsUndefinedCheck(schema));
|
|
20602
20602
|
}
|
|
@@ -20610,12 +20610,12 @@ function ExtendsUndefinedCheck(schema) {
|
|
|
20610
20610
|
return schema[Kind] === "Intersect" ? Intersect2(schema) : schema[Kind] === "Union" ? Union2(schema) : schema[Kind] === "Not" ? Not(schema) : schema[Kind] === "Undefined" ? true : false;
|
|
20611
20611
|
}
|
|
20612
20612
|
|
|
20613
|
-
// node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs
|
|
20613
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs
|
|
20614
20614
|
function ExcludeFromTemplateLiteral(L, R) {
|
|
20615
20615
|
return Exclude(TemplateLiteralToUnion(L), R);
|
|
20616
20616
|
}
|
|
20617
20617
|
|
|
20618
|
-
// node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.mjs
|
|
20618
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.mjs
|
|
20619
20619
|
function ExcludeRest(L, R) {
|
|
20620
20620
|
const excluded = L.filter((inner) => ExtendsCheck(inner, R) === ExtendsResult.False);
|
|
20621
20621
|
return excluded.length === 1 ? excluded[0] : Union(excluded);
|
|
@@ -20628,7 +20628,7 @@ function Exclude(L, R, options = {}) {
|
|
|
20628
20628
|
return CreateType(IsUnion(L) ? ExcludeRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? Never() : L, options);
|
|
20629
20629
|
}
|
|
20630
20630
|
|
|
20631
|
-
// node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs
|
|
20631
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs
|
|
20632
20632
|
function FromProperties9(P, U) {
|
|
20633
20633
|
const Acc = {};
|
|
20634
20634
|
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
@@ -20643,12 +20643,12 @@ function ExcludeFromMappedResult(R, T) {
|
|
|
20643
20643
|
return MappedResult(P);
|
|
20644
20644
|
}
|
|
20645
20645
|
|
|
20646
|
-
// node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs
|
|
20646
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs
|
|
20647
20647
|
function ExtractFromTemplateLiteral(L, R) {
|
|
20648
20648
|
return Extract(TemplateLiteralToUnion(L), R);
|
|
20649
20649
|
}
|
|
20650
20650
|
|
|
20651
|
-
// node_modules/@sinclair/typebox/build/esm/type/extract/extract.mjs
|
|
20651
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/extract/extract.mjs
|
|
20652
20652
|
function ExtractRest(L, R) {
|
|
20653
20653
|
const extracted = L.filter((inner) => ExtendsCheck(inner, R) !== ExtendsResult.False);
|
|
20654
20654
|
return extracted.length === 1 ? extracted[0] : Union(extracted);
|
|
@@ -20661,7 +20661,7 @@ function Extract(L, R, options) {
|
|
|
20661
20661
|
return CreateType(IsUnion(L) ? ExtractRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? L : Never(), options);
|
|
20662
20662
|
}
|
|
20663
20663
|
|
|
20664
|
-
// node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs
|
|
20664
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs
|
|
20665
20665
|
function FromProperties10(P, T) {
|
|
20666
20666
|
const Acc = {};
|
|
20667
20667
|
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
@@ -20676,17 +20676,17 @@ function ExtractFromMappedResult(R, T) {
|
|
|
20676
20676
|
return MappedResult(P);
|
|
20677
20677
|
}
|
|
20678
20678
|
|
|
20679
|
-
// node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs
|
|
20679
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs
|
|
20680
20680
|
function InstanceType(schema, options) {
|
|
20681
20681
|
return IsConstructor(schema) ? CreateType(schema.returns, options) : Never(options);
|
|
20682
20682
|
}
|
|
20683
20683
|
|
|
20684
|
-
// node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs
|
|
20684
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs
|
|
20685
20685
|
function ReadonlyOptional(schema) {
|
|
20686
20686
|
return Readonly(Optional(schema));
|
|
20687
20687
|
}
|
|
20688
20688
|
|
|
20689
|
-
// node_modules/@sinclair/typebox/build/esm/type/record/record.mjs
|
|
20689
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/record/record.mjs
|
|
20690
20690
|
function RecordCreateFromPattern(pattern, T, options) {
|
|
20691
20691
|
return CreateType({ [Kind]: "Record", type: "object", patternProperties: { [pattern]: T } }, options);
|
|
20692
20692
|
}
|
|
@@ -20741,7 +20741,7 @@ function RecordValue2(type) {
|
|
|
20741
20741
|
return type.patternProperties[RecordPattern(type)];
|
|
20742
20742
|
}
|
|
20743
20743
|
|
|
20744
|
-
// node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs
|
|
20744
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs
|
|
20745
20745
|
function FromConstructor2(args, type) {
|
|
20746
20746
|
type.parameters = FromTypes(args, type.parameters);
|
|
20747
20747
|
type.returns = FromType(args, type.returns);
|
|
@@ -20816,12 +20816,12 @@ function Instantiate(type, args) {
|
|
|
20816
20816
|
return FromType(args, CloneType(type));
|
|
20817
20817
|
}
|
|
20818
20818
|
|
|
20819
|
-
// node_modules/@sinclair/typebox/build/esm/type/integer/integer.mjs
|
|
20819
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/integer/integer.mjs
|
|
20820
20820
|
function Integer(options) {
|
|
20821
20821
|
return CreateType({ [Kind]: "Integer", type: "integer" }, options);
|
|
20822
20822
|
}
|
|
20823
20823
|
|
|
20824
|
-
// node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs
|
|
20824
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs
|
|
20825
20825
|
function MappedIntrinsicPropertyKey(K, M, options) {
|
|
20826
20826
|
return {
|
|
20827
20827
|
[K]: Intrinsic(Literal(K), M, Clone(options))
|
|
@@ -20841,7 +20841,7 @@ function IntrinsicFromMappedKey(T, M, options) {
|
|
|
20841
20841
|
return MappedResult(P);
|
|
20842
20842
|
}
|
|
20843
20843
|
|
|
20844
|
-
// node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs
|
|
20844
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs
|
|
20845
20845
|
function ApplyUncapitalize(value) {
|
|
20846
20846
|
const [first, rest] = [value.slice(0, 1), value.slice(1)];
|
|
20847
20847
|
return [first.toLowerCase(), rest].join("");
|
|
@@ -20877,27 +20877,27 @@ function Intrinsic(schema, mode, options = {}) {
|
|
|
20877
20877
|
return IsMappedKey(schema) ? IntrinsicFromMappedKey(schema, mode, options) : IsTemplateLiteral(schema) ? FromTemplateLiteral3(schema, mode, options) : IsUnion(schema) ? Union(FromRest5(schema.anyOf, mode), options) : IsLiteral(schema) ? Literal(FromLiteralValue(schema.const, mode), options) : CreateType(schema, options);
|
|
20878
20878
|
}
|
|
20879
20879
|
|
|
20880
|
-
// node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs
|
|
20880
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs
|
|
20881
20881
|
function Capitalize(T, options = {}) {
|
|
20882
20882
|
return Intrinsic(T, "Capitalize", options);
|
|
20883
20883
|
}
|
|
20884
20884
|
|
|
20885
|
-
// node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs
|
|
20885
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs
|
|
20886
20886
|
function Lowercase(T, options = {}) {
|
|
20887
20887
|
return Intrinsic(T, "Lowercase", options);
|
|
20888
20888
|
}
|
|
20889
20889
|
|
|
20890
|
-
// node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs
|
|
20890
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs
|
|
20891
20891
|
function Uncapitalize(T, options = {}) {
|
|
20892
20892
|
return Intrinsic(T, "Uncapitalize", options);
|
|
20893
20893
|
}
|
|
20894
20894
|
|
|
20895
|
-
// node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs
|
|
20895
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs
|
|
20896
20896
|
function Uppercase(T, options = {}) {
|
|
20897
20897
|
return Intrinsic(T, "Uppercase", options);
|
|
20898
20898
|
}
|
|
20899
20899
|
|
|
20900
|
-
// node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs
|
|
20900
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs
|
|
20901
20901
|
function FromProperties12(properties, propertyKeys, options) {
|
|
20902
20902
|
const result = {};
|
|
20903
20903
|
for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
|
|
@@ -20912,7 +20912,7 @@ function OmitFromMappedResult(mappedResult, propertyKeys, options) {
|
|
|
20912
20912
|
return MappedResult(properties);
|
|
20913
20913
|
}
|
|
20914
20914
|
|
|
20915
|
-
// node_modules/@sinclair/typebox/build/esm/type/omit/omit.mjs
|
|
20915
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/omit/omit.mjs
|
|
20916
20916
|
function FromIntersect6(types, propertyKeys) {
|
|
20917
20917
|
return types.map((type) => OmitResolve(type, propertyKeys));
|
|
20918
20918
|
}
|
|
@@ -20946,7 +20946,7 @@ function Omit(type, key, options) {
|
|
|
20946
20946
|
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({ ...OmitResolve(type, propertyKeys), ...options });
|
|
20947
20947
|
}
|
|
20948
20948
|
|
|
20949
|
-
// node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs
|
|
20949
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs
|
|
20950
20950
|
function FromPropertyKey2(type, key, options) {
|
|
20951
20951
|
return { [key]: Omit(type, [key], Clone(options)) };
|
|
20952
20952
|
}
|
|
@@ -20963,7 +20963,7 @@ function OmitFromMappedKey(type, mappedKey, options) {
|
|
|
20963
20963
|
return MappedResult(properties);
|
|
20964
20964
|
}
|
|
20965
20965
|
|
|
20966
|
-
// node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs
|
|
20966
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs
|
|
20967
20967
|
function FromProperties14(properties, propertyKeys, options) {
|
|
20968
20968
|
const result = {};
|
|
20969
20969
|
for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
|
|
@@ -20978,7 +20978,7 @@ function PickFromMappedResult(mappedResult, propertyKeys, options) {
|
|
|
20978
20978
|
return MappedResult(properties);
|
|
20979
20979
|
}
|
|
20980
20980
|
|
|
20981
|
-
// node_modules/@sinclair/typebox/build/esm/type/pick/pick.mjs
|
|
20981
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/pick/pick.mjs
|
|
20982
20982
|
function FromIntersect7(types, propertyKeys) {
|
|
20983
20983
|
return types.map((type) => PickResolve(type, propertyKeys));
|
|
20984
20984
|
}
|
|
@@ -21012,7 +21012,7 @@ function Pick(type, key, options) {
|
|
|
21012
21012
|
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({ ...PickResolve(type, propertyKeys), ...options });
|
|
21013
21013
|
}
|
|
21014
21014
|
|
|
21015
|
-
// node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs
|
|
21015
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs
|
|
21016
21016
|
function FromPropertyKey3(type, key, options) {
|
|
21017
21017
|
return {
|
|
21018
21018
|
[key]: Pick(type, [key], Clone(options))
|
|
@@ -21031,7 +21031,7 @@ function PickFromMappedKey(type, mappedKey, options) {
|
|
|
21031
21031
|
return MappedResult(properties);
|
|
21032
21032
|
}
|
|
21033
21033
|
|
|
21034
|
-
// node_modules/@sinclair/typebox/build/esm/type/partial/partial.mjs
|
|
21034
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/partial/partial.mjs
|
|
21035
21035
|
function FromComputed3(target, parameters) {
|
|
21036
21036
|
return Computed("Partial", [Computed(target, parameters)]);
|
|
21037
21037
|
}
|
|
@@ -21063,7 +21063,7 @@ function Partial(type, options) {
|
|
|
21063
21063
|
}
|
|
21064
21064
|
}
|
|
21065
21065
|
|
|
21066
|
-
// node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs
|
|
21066
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs
|
|
21067
21067
|
function FromProperties17(K, options) {
|
|
21068
21068
|
const Acc = {};
|
|
21069
21069
|
for (const K2 of globalThis.Object.getOwnPropertyNames(K))
|
|
@@ -21078,7 +21078,7 @@ function PartialFromMappedResult(R, options) {
|
|
|
21078
21078
|
return MappedResult(P);
|
|
21079
21079
|
}
|
|
21080
21080
|
|
|
21081
|
-
// node_modules/@sinclair/typebox/build/esm/type/required/required.mjs
|
|
21081
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/required/required.mjs
|
|
21082
21082
|
function FromComputed4(target, parameters) {
|
|
21083
21083
|
return Computed("Required", [Computed(target, parameters)]);
|
|
21084
21084
|
}
|
|
@@ -21110,7 +21110,7 @@ function Required(type, options) {
|
|
|
21110
21110
|
}
|
|
21111
21111
|
}
|
|
21112
21112
|
|
|
21113
|
-
// node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs
|
|
21113
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs
|
|
21114
21114
|
function FromProperties19(P, options) {
|
|
21115
21115
|
const Acc = {};
|
|
21116
21116
|
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
@@ -21125,7 +21125,7 @@ function RequiredFromMappedResult(R, options) {
|
|
|
21125
21125
|
return MappedResult(P);
|
|
21126
21126
|
}
|
|
21127
21127
|
|
|
21128
|
-
// node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs
|
|
21128
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs
|
|
21129
21129
|
function DereferenceParameters(moduleProperties, types) {
|
|
21130
21130
|
return types.map((type) => {
|
|
21131
21131
|
return IsRef(type) ? Dereference(moduleProperties, type.$ref) : FromType2(moduleProperties, type);
|
|
@@ -21212,7 +21212,7 @@ function ComputeModuleProperties(moduleProperties) {
|
|
|
21212
21212
|
}, {});
|
|
21213
21213
|
}
|
|
21214
21214
|
|
|
21215
|
-
// node_modules/@sinclair/typebox/build/esm/type/module/module.mjs
|
|
21215
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/module/module.mjs
|
|
21216
21216
|
class TModule {
|
|
21217
21217
|
constructor($defs) {
|
|
21218
21218
|
const computed = ComputeModuleProperties($defs);
|
|
@@ -21233,17 +21233,17 @@ function Module(properties) {
|
|
|
21233
21233
|
return new TModule(properties);
|
|
21234
21234
|
}
|
|
21235
21235
|
|
|
21236
|
-
// node_modules/@sinclair/typebox/build/esm/type/not/not.mjs
|
|
21236
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/not/not.mjs
|
|
21237
21237
|
function Not2(type, options) {
|
|
21238
21238
|
return CreateType({ [Kind]: "Not", not: type }, options);
|
|
21239
21239
|
}
|
|
21240
21240
|
|
|
21241
|
-
// node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs
|
|
21241
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs
|
|
21242
21242
|
function Parameters(schema, options) {
|
|
21243
21243
|
return IsFunction3(schema) ? Tuple(schema.parameters, options) : Never();
|
|
21244
21244
|
}
|
|
21245
21245
|
|
|
21246
|
-
// node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.mjs
|
|
21246
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.mjs
|
|
21247
21247
|
var Ordinal = 0;
|
|
21248
21248
|
function Recursive(callback, options = {}) {
|
|
21249
21249
|
if (IsUndefined(options.$id))
|
|
@@ -21253,13 +21253,13 @@ function Recursive(callback, options = {}) {
|
|
|
21253
21253
|
return CreateType({ [Hint]: "Recursive", ...thisType }, options);
|
|
21254
21254
|
}
|
|
21255
21255
|
|
|
21256
|
-
// node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.mjs
|
|
21256
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.mjs
|
|
21257
21257
|
function RegExp2(unresolved, options) {
|
|
21258
21258
|
const expr = IsString(unresolved) ? new globalThis.RegExp(unresolved) : unresolved;
|
|
21259
21259
|
return CreateType({ [Kind]: "RegExp", type: "RegExp", source: expr.source, flags: expr.flags }, options);
|
|
21260
21260
|
}
|
|
21261
21261
|
|
|
21262
|
-
// node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs
|
|
21262
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs
|
|
21263
21263
|
function RestResolve(T) {
|
|
21264
21264
|
return IsIntersect(T) ? T.allOf : IsUnion(T) ? T.anyOf : IsTuple(T) ? T.items ?? [] : [];
|
|
21265
21265
|
}
|
|
@@ -21267,12 +21267,12 @@ function Rest(T) {
|
|
|
21267
21267
|
return RestResolve(T);
|
|
21268
21268
|
}
|
|
21269
21269
|
|
|
21270
|
-
// node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs
|
|
21270
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs
|
|
21271
21271
|
function ReturnType(schema, options) {
|
|
21272
21272
|
return IsFunction3(schema) ? CreateType(schema.returns, options) : Never(options);
|
|
21273
21273
|
}
|
|
21274
21274
|
|
|
21275
|
-
// node_modules/@sinclair/typebox/build/esm/type/transform/transform.mjs
|
|
21275
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/transform/transform.mjs
|
|
21276
21276
|
class TransformDecodeBuilder {
|
|
21277
21277
|
constructor(schema) {
|
|
21278
21278
|
this.schema = schema;
|
|
@@ -21305,17 +21305,17 @@ function Transform(schema) {
|
|
|
21305
21305
|
return new TransformDecodeBuilder(schema);
|
|
21306
21306
|
}
|
|
21307
21307
|
|
|
21308
|
-
// node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs
|
|
21308
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs
|
|
21309
21309
|
function Unsafe(options = {}) {
|
|
21310
21310
|
return CreateType({ [Kind]: options[Kind] ?? "Unsafe" }, options);
|
|
21311
21311
|
}
|
|
21312
21312
|
|
|
21313
|
-
// node_modules/@sinclair/typebox/build/esm/type/void/void.mjs
|
|
21313
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/void/void.mjs
|
|
21314
21314
|
function Void(options) {
|
|
21315
21315
|
return CreateType({ [Kind]: "Void", type: "void" }, options);
|
|
21316
21316
|
}
|
|
21317
21317
|
|
|
21318
|
-
// node_modules/@sinclair/typebox/build/esm/type/type/type.mjs
|
|
21318
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/type/type.mjs
|
|
21319
21319
|
var exports_type3 = {};
|
|
21320
21320
|
__export(exports_type3, {
|
|
21321
21321
|
Any: () => Any,
|
|
@@ -21382,10 +21382,10 @@ __export(exports_type3, {
|
|
|
21382
21382
|
Void: () => Void
|
|
21383
21383
|
});
|
|
21384
21384
|
|
|
21385
|
-
// node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
|
|
21385
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
|
|
21386
21386
|
var Type = exports_type3;
|
|
21387
21387
|
|
|
21388
|
-
// node_modules/@sinclair/typebox/build/esm/errors/function.mjs
|
|
21388
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/errors/function.mjs
|
|
21389
21389
|
function DefaultErrorFunction(error) {
|
|
21390
21390
|
switch (error.errorType) {
|
|
21391
21391
|
case ValueErrorType.ArrayContains:
|
|
@@ -21525,7 +21525,7 @@ function GetErrorFunction() {
|
|
|
21525
21525
|
return errorFunction;
|
|
21526
21526
|
}
|
|
21527
21527
|
|
|
21528
|
-
// node_modules/@sinclair/typebox/build/esm/value/deref/deref.mjs
|
|
21528
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/value/deref/deref.mjs
|
|
21529
21529
|
class TypeDereferenceError extends TypeBoxError {
|
|
21530
21530
|
constructor(schema) {
|
|
21531
21531
|
super(`Unable to dereference schema with $id '${schema.$ref}'`);
|
|
@@ -21548,7 +21548,7 @@ function Deref(schema, references) {
|
|
|
21548
21548
|
return schema[Kind] === "This" || schema[Kind] === "Ref" ? Resolve(schema, references) : schema;
|
|
21549
21549
|
}
|
|
21550
21550
|
|
|
21551
|
-
// node_modules/@sinclair/typebox/build/esm/value/hash/hash.mjs
|
|
21551
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/value/hash/hash.mjs
|
|
21552
21552
|
class ValueHashError extends TypeBoxError {
|
|
21553
21553
|
constructor(value) {
|
|
21554
21554
|
super(`Unable to hash value`);
|
|
@@ -21675,7 +21675,7 @@ function Hash(value) {
|
|
|
21675
21675
|
return Accumulator;
|
|
21676
21676
|
}
|
|
21677
21677
|
|
|
21678
|
-
// node_modules/@sinclair/typebox/build/esm/value/check/check.mjs
|
|
21678
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/value/check/check.mjs
|
|
21679
21679
|
class ValueCheckUnknownTypeError extends TypeBoxError {
|
|
21680
21680
|
constructor(schema) {
|
|
21681
21681
|
super(`Unknown type`);
|
|
@@ -22107,7 +22107,7 @@ function Check(...args) {
|
|
|
22107
22107
|
return args.length === 3 ? Visit5(args[0], args[1], args[2]) : Visit5(args[0], [], args[1]);
|
|
22108
22108
|
}
|
|
22109
22109
|
|
|
22110
|
-
// node_modules/@sinclair/typebox/build/esm/errors/errors.mjs
|
|
22110
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/errors/errors.mjs
|
|
22111
22111
|
var ValueErrorType;
|
|
22112
22112
|
(function(ValueErrorType) {
|
|
22113
22113
|
ValueErrorType[ValueErrorType["ArrayContains"] = 0] = "ArrayContains";
|
|
@@ -22662,7 +22662,7 @@ function Errors(...args) {
|
|
|
22662
22662
|
const iterator = args.length === 3 ? Visit6(args[0], args[1], "", args[2]) : Visit6(args[0], [], "", args[1]);
|
|
22663
22663
|
return new ValueErrorIterator(iterator);
|
|
22664
22664
|
}
|
|
22665
|
-
// node_modules/@sinclair/typebox/build/esm/value/transform/decode.mjs
|
|
22665
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/value/transform/decode.mjs
|
|
22666
22666
|
class TransformDecodeCheckError extends TypeBoxError {
|
|
22667
22667
|
constructor(schema, value, error) {
|
|
22668
22668
|
super(`Unable to decode value as it does not match the expected schema`);
|
|
@@ -22822,7 +22822,7 @@ function TransformDecode(schema, references, value) {
|
|
|
22822
22822
|
return Visit7(schema, references, "", value);
|
|
22823
22823
|
}
|
|
22824
22824
|
|
|
22825
|
-
// node_modules/@sinclair/typebox/build/esm/value/transform/has.mjs
|
|
22825
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/value/transform/has.mjs
|
|
22826
22826
|
function FromArray10(schema, references) {
|
|
22827
22827
|
return IsTransform(schema) || Visit8(schema.items, references);
|
|
22828
22828
|
}
|
|
@@ -22924,14 +22924,14 @@ function HasTransform(schema, references) {
|
|
|
22924
22924
|
return Visit8(schema, references);
|
|
22925
22925
|
}
|
|
22926
22926
|
|
|
22927
|
-
// node_modules/@sinclair/typebox/build/esm/value/decode/decode.mjs
|
|
22927
|
+
// ../cli/node_modules/@sinclair/typebox/build/esm/value/decode/decode.mjs
|
|
22928
22928
|
function Decode(...args) {
|
|
22929
22929
|
const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]];
|
|
22930
22930
|
if (!Check(schema, references, value))
|
|
22931
22931
|
throw new TransformDecodeCheckError(schema, value, Errors(schema, references, value).First());
|
|
22932
22932
|
return HasTransform(schema, references) ? TransformDecode(schema, references, value) : value;
|
|
22933
22933
|
}
|
|
22934
|
-
// src/shared/schema.ts
|
|
22934
|
+
// ../cli/src/shared/schema.ts
|
|
22935
22935
|
function schemaErrorPath(path) {
|
|
22936
22936
|
return path.replace(/^\//, "").replaceAll("/", ".") || "args";
|
|
22937
22937
|
}
|
|
@@ -23000,7 +23000,6 @@ function schemaProperties(schema) {
|
|
|
23000
23000
|
}
|
|
23001
23001
|
return schema;
|
|
23002
23002
|
}
|
|
23003
|
-
|
|
23004
23003
|
// src/shared/transports/ssh.ts
|
|
23005
23004
|
var import_ssh2 = __toESM(require_lib2(), 1);
|
|
23006
23005
|
import { randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -24307,210 +24306,2671 @@ async function strictBoundedResponseJson(response, maxBytes, responseTimeoutMs)
|
|
|
24307
24306
|
const responseText = new TextDecoder("utf-8", { fatal: true }).decode(responseBytes);
|
|
24308
24307
|
return JSON.parse(responseText);
|
|
24309
24308
|
}
|
|
24310
|
-
async function fetchWithTimeout(url, options, timeoutMs = DEFAULT_TIMEOUT) {
|
|
24311
|
-
const controller = new AbortController;
|
|
24312
|
-
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
24313
|
-
try {
|
|
24314
|
-
return await fetch(url, {
|
|
24315
|
-
...options,
|
|
24316
|
-
redirect: "error",
|
|
24317
|
-
signal: controller.signal
|
|
24318
|
-
});
|
|
24319
|
-
} finally {
|
|
24320
|
-
clearTimeout(timeout);
|
|
24321
|
-
}
|
|
24309
|
+
async function fetchWithTimeout(url, options, timeoutMs = DEFAULT_TIMEOUT) {
|
|
24310
|
+
const controller = new AbortController;
|
|
24311
|
+
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
24312
|
+
try {
|
|
24313
|
+
return await fetch(url, {
|
|
24314
|
+
...options,
|
|
24315
|
+
redirect: "error",
|
|
24316
|
+
signal: controller.signal
|
|
24317
|
+
});
|
|
24318
|
+
} finally {
|
|
24319
|
+
clearTimeout(timeout);
|
|
24320
|
+
}
|
|
24321
|
+
}
|
|
24322
|
+
async function fetchWithRetry(url, options, timeoutMs = DEFAULT_TIMEOUT) {
|
|
24323
|
+
const retries = isRetryableMethod(options.method) ? MAX_RETRIES : 0;
|
|
24324
|
+
for (let attempt = 0;attempt <= retries; attempt++) {
|
|
24325
|
+
try {
|
|
24326
|
+
const res = await fetchWithTimeout(url, options, timeoutMs);
|
|
24327
|
+
if (res.status >= 500 && res.status < 600 && attempt < retries) {
|
|
24328
|
+
const delay = RETRY_BASE_DELAY * Math.pow(2, attempt);
|
|
24329
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
24330
|
+
continue;
|
|
24331
|
+
}
|
|
24332
|
+
return res;
|
|
24333
|
+
} catch (error) {
|
|
24334
|
+
if (attempt < retries && isRetryableError(error)) {
|
|
24335
|
+
const delay = RETRY_BASE_DELAY * Math.pow(2, attempt);
|
|
24336
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
24337
|
+
continue;
|
|
24338
|
+
}
|
|
24339
|
+
throw error;
|
|
24340
|
+
}
|
|
24341
|
+
}
|
|
24342
|
+
throw new Error("Unreachable");
|
|
24343
|
+
}
|
|
24344
|
+
|
|
24345
|
+
class HttpTransport {
|
|
24346
|
+
baseUrl;
|
|
24347
|
+
token;
|
|
24348
|
+
constructor(config) {
|
|
24349
|
+
this.baseUrl = config.baseUrl.replace(/\/$/, "");
|
|
24350
|
+
this.token = config.token;
|
|
24351
|
+
}
|
|
24352
|
+
headers() {
|
|
24353
|
+
return {
|
|
24354
|
+
Authorization: `Bearer ${this.token}`,
|
|
24355
|
+
"Content-Type": "application/json"
|
|
24356
|
+
};
|
|
24357
|
+
}
|
|
24358
|
+
async get(path, options = {}) {
|
|
24359
|
+
const maxResponseBytes = validatedGetResponseLimit(options);
|
|
24360
|
+
const maxJsonBytes = validatedStrictJsonLimit(options);
|
|
24361
|
+
if (maxResponseBytes !== undefined && maxJsonBytes !== undefined) {
|
|
24362
|
+
throw new RangeError("HTTP response limit options are mutually exclusive");
|
|
24363
|
+
}
|
|
24364
|
+
let response;
|
|
24365
|
+
try {
|
|
24366
|
+
response = await fetchWithRetry(`${this.baseUrl}${path}`, {
|
|
24367
|
+
method: "GET",
|
|
24368
|
+
headers: this.headers()
|
|
24369
|
+
});
|
|
24370
|
+
} catch (error) {
|
|
24371
|
+
return transportFailure(error);
|
|
24372
|
+
}
|
|
24373
|
+
if (maxJsonBytes !== undefined) {
|
|
24374
|
+
try {
|
|
24375
|
+
const data = await strictBoundedResponseJson(response, maxJsonBytes);
|
|
24376
|
+
return { ok: response.ok, status: response.status, data };
|
|
24377
|
+
} catch {
|
|
24378
|
+
return responseBodyFailure(response.status);
|
|
24379
|
+
}
|
|
24380
|
+
}
|
|
24381
|
+
if (maxResponseBytes !== undefined) {
|
|
24382
|
+
const data = await boundedResponseJson(response, maxResponseBytes);
|
|
24383
|
+
return { ok: response.ok, status: response.status, data };
|
|
24384
|
+
}
|
|
24385
|
+
const data = await response.json().catch(() => null);
|
|
24386
|
+
return { ok: response.ok, status: response.status, data };
|
|
24387
|
+
}
|
|
24388
|
+
async post(path, body, options) {
|
|
24389
|
+
const timeoutMs = validatedPostTimeout(options);
|
|
24390
|
+
const maxJsonBytes = validatedStrictJsonLimit({ maxJsonBytes: options?.maxJsonBytes });
|
|
24391
|
+
const responseTimeoutMs = validatedResponseTimeout(options?.responseTimeoutMs);
|
|
24392
|
+
let response;
|
|
24393
|
+
try {
|
|
24394
|
+
response = await fetchWithRetry(`${this.baseUrl}${path}`, {
|
|
24395
|
+
method: "POST",
|
|
24396
|
+
headers: this.headers(),
|
|
24397
|
+
body: body ? JSON.stringify(body) : undefined
|
|
24398
|
+
}, timeoutMs);
|
|
24399
|
+
} catch (error) {
|
|
24400
|
+
return transportFailure(error);
|
|
24401
|
+
}
|
|
24402
|
+
if (maxJsonBytes !== undefined) {
|
|
24403
|
+
try {
|
|
24404
|
+
const data = await strictBoundedResponseJson(response, maxJsonBytes, responseTimeoutMs);
|
|
24405
|
+
return { ok: response.ok, status: response.status, data };
|
|
24406
|
+
} catch {
|
|
24407
|
+
return responseBodyFailure(response.status);
|
|
24408
|
+
}
|
|
24409
|
+
}
|
|
24410
|
+
const data = await response.json().catch(() => null);
|
|
24411
|
+
return { ok: response.ok, status: response.status, data };
|
|
24412
|
+
}
|
|
24413
|
+
async postBinary(path, body, options) {
|
|
24414
|
+
if (options.contentType !== "application/zip") {
|
|
24415
|
+
throw new Error("Binary HTTP content type is invalid");
|
|
24416
|
+
}
|
|
24417
|
+
if (!Number.isSafeInteger(options.contentLength) || options.contentLength < 1 || options.contentLength !== body.byteLength) {
|
|
24418
|
+
throw new RangeError("Binary HTTP body length is invalid");
|
|
24419
|
+
}
|
|
24420
|
+
if (!/^[0-9a-f]{64}$/u.test(options.contentSha256)) {
|
|
24421
|
+
throw new Error("Binary HTTP body SHA-256 is invalid");
|
|
24422
|
+
}
|
|
24423
|
+
const maxJsonBytes = validatedStrictJsonLimit({ maxJsonBytes: options.maxJsonBytes });
|
|
24424
|
+
const timeoutMs = validatedPostTimeout(options.timeoutMs === undefined ? undefined : { timeoutMs: options.timeoutMs });
|
|
24425
|
+
const responseTimeoutMs = validatedResponseTimeout(options.responseTimeoutMs);
|
|
24426
|
+
try {
|
|
24427
|
+
const request = {
|
|
24428
|
+
method: "POST",
|
|
24429
|
+
headers: {
|
|
24430
|
+
Authorization: `Bearer ${this.token}`,
|
|
24431
|
+
"Content-Type": options.contentType,
|
|
24432
|
+
"Content-Length": String(options.contentLength),
|
|
24433
|
+
"x-supacloud-content-sha256": options.contentSha256
|
|
24434
|
+
},
|
|
24435
|
+
body: body.stream,
|
|
24436
|
+
duplex: "half"
|
|
24437
|
+
};
|
|
24438
|
+
const response = await fetchWithRetry(`${this.baseUrl}${path}`, request, timeoutMs);
|
|
24439
|
+
try {
|
|
24440
|
+
const data = await strictBoundedResponseJson(response, maxJsonBytes, responseTimeoutMs);
|
|
24441
|
+
return { ok: response.ok, status: response.status, data };
|
|
24442
|
+
} catch {
|
|
24443
|
+
return responseBodyFailure(response.status);
|
|
24444
|
+
}
|
|
24445
|
+
} catch (error) {
|
|
24446
|
+
return transportFailure(error);
|
|
24447
|
+
}
|
|
24448
|
+
}
|
|
24449
|
+
async postMultipart(path, formData, options) {
|
|
24450
|
+
const timeoutMs = validatedPostTimeout(options);
|
|
24451
|
+
try {
|
|
24452
|
+
const headers = { Authorization: `Bearer ${this.token}` };
|
|
24453
|
+
const res = await fetchWithRetry(`${this.baseUrl}${path}`, {
|
|
24454
|
+
method: "POST",
|
|
24455
|
+
headers,
|
|
24456
|
+
body: formData
|
|
24457
|
+
}, timeoutMs);
|
|
24458
|
+
const data = await res.json().catch(() => null);
|
|
24459
|
+
return { ok: res.ok, status: res.status, data };
|
|
24460
|
+
} catch (error) {
|
|
24461
|
+
return transportFailure(error);
|
|
24462
|
+
}
|
|
24463
|
+
}
|
|
24464
|
+
async patch(path, body) {
|
|
24465
|
+
try {
|
|
24466
|
+
const res = await fetchWithRetry(`${this.baseUrl}${path}`, {
|
|
24467
|
+
method: "PATCH",
|
|
24468
|
+
headers: this.headers(),
|
|
24469
|
+
body: body ? JSON.stringify(body) : undefined
|
|
24470
|
+
});
|
|
24471
|
+
const data = await res.json().catch(() => null);
|
|
24472
|
+
return { ok: res.ok, status: res.status, data };
|
|
24473
|
+
} catch (error) {
|
|
24474
|
+
return transportFailure(error);
|
|
24475
|
+
}
|
|
24476
|
+
}
|
|
24477
|
+
async put(path, body) {
|
|
24478
|
+
try {
|
|
24479
|
+
const res = await fetchWithRetry(`${this.baseUrl}${path}`, {
|
|
24480
|
+
method: "PUT",
|
|
24481
|
+
headers: this.headers(),
|
|
24482
|
+
body: body ? JSON.stringify(body) : undefined
|
|
24483
|
+
});
|
|
24484
|
+
const data = await res.json().catch(() => null);
|
|
24485
|
+
return { ok: res.ok, status: res.status, data };
|
|
24486
|
+
} catch (error) {
|
|
24487
|
+
return transportFailure(error);
|
|
24488
|
+
}
|
|
24489
|
+
}
|
|
24490
|
+
async delete(path) {
|
|
24491
|
+
try {
|
|
24492
|
+
const res = await fetchWithRetry(`${this.baseUrl}${path}`, {
|
|
24493
|
+
method: "DELETE",
|
|
24494
|
+
headers: this.headers()
|
|
24495
|
+
});
|
|
24496
|
+
const data = await res.json().catch(() => null);
|
|
24497
|
+
return { ok: res.ok, status: res.status, data };
|
|
24498
|
+
} catch (error) {
|
|
24499
|
+
return transportFailure(error);
|
|
24500
|
+
}
|
|
24501
|
+
}
|
|
24502
|
+
async ping() {
|
|
24503
|
+
const res = await this.get("/v1/projects").catch(() => null);
|
|
24504
|
+
return res?.ok ?? false;
|
|
24505
|
+
}
|
|
24506
|
+
}
|
|
24507
|
+
|
|
24508
|
+
// src/shared/tools/ssh-tools.ts
|
|
24509
|
+
import { Buffer as Buffer2 } from "node:buffer";
|
|
24510
|
+
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
24511
|
+
import { basename as basename3, dirname, join as join2 } from "node:path";
|
|
24512
|
+
import { TextDecoder as TextDecoder2 } from "node:util";
|
|
24513
|
+
|
|
24514
|
+
// node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
|
|
24515
|
+
function IsAsyncIterator5(value) {
|
|
24516
|
+
return IsObject5(value) && !IsArray5(value) && !IsUint8Array5(value) && Symbol.asyncIterator in value;
|
|
24517
|
+
}
|
|
24518
|
+
function IsArray5(value) {
|
|
24519
|
+
return Array.isArray(value);
|
|
24520
|
+
}
|
|
24521
|
+
function IsBigInt5(value) {
|
|
24522
|
+
return typeof value === "bigint";
|
|
24523
|
+
}
|
|
24524
|
+
function IsBoolean5(value) {
|
|
24525
|
+
return typeof value === "boolean";
|
|
24526
|
+
}
|
|
24527
|
+
function IsDate5(value) {
|
|
24528
|
+
return value instanceof globalThis.Date;
|
|
24529
|
+
}
|
|
24530
|
+
function IsFunction5(value) {
|
|
24531
|
+
return typeof value === "function";
|
|
24532
|
+
}
|
|
24533
|
+
function IsIterator5(value) {
|
|
24534
|
+
return IsObject5(value) && !IsArray5(value) && !IsUint8Array5(value) && Symbol.iterator in value;
|
|
24535
|
+
}
|
|
24536
|
+
function IsNull5(value) {
|
|
24537
|
+
return value === null;
|
|
24538
|
+
}
|
|
24539
|
+
function IsNumber5(value) {
|
|
24540
|
+
return typeof value === "number";
|
|
24541
|
+
}
|
|
24542
|
+
function IsObject5(value) {
|
|
24543
|
+
return typeof value === "object" && value !== null;
|
|
24544
|
+
}
|
|
24545
|
+
function IsRegExp4(value) {
|
|
24546
|
+
return value instanceof globalThis.RegExp;
|
|
24547
|
+
}
|
|
24548
|
+
function IsString5(value) {
|
|
24549
|
+
return typeof value === "string";
|
|
24550
|
+
}
|
|
24551
|
+
function IsSymbol5(value) {
|
|
24552
|
+
return typeof value === "symbol";
|
|
24553
|
+
}
|
|
24554
|
+
function IsUint8Array5(value) {
|
|
24555
|
+
return value instanceof globalThis.Uint8Array;
|
|
24556
|
+
}
|
|
24557
|
+
function IsUndefined5(value) {
|
|
24558
|
+
return value === undefined;
|
|
24559
|
+
}
|
|
24560
|
+
|
|
24561
|
+
// node_modules/@sinclair/typebox/build/esm/type/clone/value.mjs
|
|
24562
|
+
function ArrayType3(value) {
|
|
24563
|
+
return value.map((value) => Visit9(value));
|
|
24564
|
+
}
|
|
24565
|
+
function DateType3(value) {
|
|
24566
|
+
return new Date(value.getTime());
|
|
24567
|
+
}
|
|
24568
|
+
function Uint8ArrayType3(value) {
|
|
24569
|
+
return new Uint8Array(value);
|
|
24570
|
+
}
|
|
24571
|
+
function RegExpType2(value) {
|
|
24572
|
+
return new RegExp(value.source, value.flags);
|
|
24573
|
+
}
|
|
24574
|
+
function ObjectType3(value) {
|
|
24575
|
+
const result = {};
|
|
24576
|
+
for (const key of Object.getOwnPropertyNames(value)) {
|
|
24577
|
+
result[key] = Visit9(value[key]);
|
|
24578
|
+
}
|
|
24579
|
+
for (const key of Object.getOwnPropertySymbols(value)) {
|
|
24580
|
+
result[key] = Visit9(value[key]);
|
|
24581
|
+
}
|
|
24582
|
+
return result;
|
|
24583
|
+
}
|
|
24584
|
+
function Visit9(value) {
|
|
24585
|
+
return IsArray5(value) ? ArrayType3(value) : IsDate5(value) ? DateType3(value) : IsUint8Array5(value) ? Uint8ArrayType3(value) : IsRegExp4(value) ? RegExpType2(value) : IsObject5(value) ? ObjectType3(value) : value;
|
|
24586
|
+
}
|
|
24587
|
+
function Clone2(value) {
|
|
24588
|
+
return Visit9(value);
|
|
24589
|
+
}
|
|
24590
|
+
|
|
24591
|
+
// node_modules/@sinclair/typebox/build/esm/type/clone/type.mjs
|
|
24592
|
+
function CloneType2(schema, options) {
|
|
24593
|
+
return options === undefined ? Clone2(schema) : Clone2({ ...options, ...schema });
|
|
24594
|
+
}
|
|
24595
|
+
|
|
24596
|
+
// node_modules/@sinclair/typebox/build/esm/value/guard/guard.mjs
|
|
24597
|
+
function IsObject6(value) {
|
|
24598
|
+
return value !== null && typeof value === "object";
|
|
24599
|
+
}
|
|
24600
|
+
function IsArray6(value) {
|
|
24601
|
+
return globalThis.Array.isArray(value) && !globalThis.ArrayBuffer.isView(value);
|
|
24602
|
+
}
|
|
24603
|
+
function IsUndefined6(value) {
|
|
24604
|
+
return value === undefined;
|
|
24605
|
+
}
|
|
24606
|
+
function IsNumber6(value) {
|
|
24607
|
+
return typeof value === "number";
|
|
24608
|
+
}
|
|
24609
|
+
|
|
24610
|
+
// node_modules/@sinclair/typebox/build/esm/system/policy.mjs
|
|
24611
|
+
var TypeSystemPolicy2;
|
|
24612
|
+
(function(TypeSystemPolicy) {
|
|
24613
|
+
TypeSystemPolicy.InstanceMode = "default";
|
|
24614
|
+
TypeSystemPolicy.ExactOptionalPropertyTypes = false;
|
|
24615
|
+
TypeSystemPolicy.AllowArrayObject = false;
|
|
24616
|
+
TypeSystemPolicy.AllowNaN = false;
|
|
24617
|
+
TypeSystemPolicy.AllowNullVoid = false;
|
|
24618
|
+
function IsExactOptionalProperty(value, key) {
|
|
24619
|
+
return TypeSystemPolicy.ExactOptionalPropertyTypes ? key in value : value[key] !== undefined;
|
|
24620
|
+
}
|
|
24621
|
+
TypeSystemPolicy.IsExactOptionalProperty = IsExactOptionalProperty;
|
|
24622
|
+
function IsObjectLike(value) {
|
|
24623
|
+
const isObject = IsObject6(value);
|
|
24624
|
+
return TypeSystemPolicy.AllowArrayObject ? isObject : isObject && !IsArray6(value);
|
|
24625
|
+
}
|
|
24626
|
+
TypeSystemPolicy.IsObjectLike = IsObjectLike;
|
|
24627
|
+
function IsRecordLike(value) {
|
|
24628
|
+
return IsObjectLike(value) && !(value instanceof Date) && !(value instanceof Uint8Array);
|
|
24629
|
+
}
|
|
24630
|
+
TypeSystemPolicy.IsRecordLike = IsRecordLike;
|
|
24631
|
+
function IsNumberLike(value) {
|
|
24632
|
+
return TypeSystemPolicy.AllowNaN ? IsNumber6(value) : Number.isFinite(value);
|
|
24633
|
+
}
|
|
24634
|
+
TypeSystemPolicy.IsNumberLike = IsNumberLike;
|
|
24635
|
+
function IsVoidLike(value) {
|
|
24636
|
+
const isUndefined = IsUndefined6(value);
|
|
24637
|
+
return TypeSystemPolicy.AllowNullVoid ? isUndefined || value === null : isUndefined;
|
|
24638
|
+
}
|
|
24639
|
+
TypeSystemPolicy.IsVoidLike = IsVoidLike;
|
|
24640
|
+
})(TypeSystemPolicy2 || (TypeSystemPolicy2 = {}));
|
|
24641
|
+
|
|
24642
|
+
// node_modules/@sinclair/typebox/build/esm/type/create/immutable.mjs
|
|
24643
|
+
function ImmutableArray2(value) {
|
|
24644
|
+
return globalThis.Object.freeze(value).map((value) => Immutable2(value));
|
|
24645
|
+
}
|
|
24646
|
+
function ImmutableDate2(value) {
|
|
24647
|
+
return value;
|
|
24648
|
+
}
|
|
24649
|
+
function ImmutableUint8Array2(value) {
|
|
24650
|
+
return value;
|
|
24651
|
+
}
|
|
24652
|
+
function ImmutableRegExp2(value) {
|
|
24653
|
+
return value;
|
|
24654
|
+
}
|
|
24655
|
+
function ImmutableObject2(value) {
|
|
24656
|
+
const result = {};
|
|
24657
|
+
for (const key of Object.getOwnPropertyNames(value)) {
|
|
24658
|
+
result[key] = Immutable2(value[key]);
|
|
24659
|
+
}
|
|
24660
|
+
for (const key of Object.getOwnPropertySymbols(value)) {
|
|
24661
|
+
result[key] = Immutable2(value[key]);
|
|
24662
|
+
}
|
|
24663
|
+
return globalThis.Object.freeze(result);
|
|
24664
|
+
}
|
|
24665
|
+
function Immutable2(value) {
|
|
24666
|
+
return IsArray5(value) ? ImmutableArray2(value) : IsDate5(value) ? ImmutableDate2(value) : IsUint8Array5(value) ? ImmutableUint8Array2(value) : IsRegExp4(value) ? ImmutableRegExp2(value) : IsObject5(value) ? ImmutableObject2(value) : value;
|
|
24667
|
+
}
|
|
24668
|
+
|
|
24669
|
+
// node_modules/@sinclair/typebox/build/esm/type/create/type.mjs
|
|
24670
|
+
function CreateType2(schema, options) {
|
|
24671
|
+
const result = options !== undefined ? { ...options, ...schema } : schema;
|
|
24672
|
+
switch (TypeSystemPolicy2.InstanceMode) {
|
|
24673
|
+
case "freeze":
|
|
24674
|
+
return Immutable2(result);
|
|
24675
|
+
case "clone":
|
|
24676
|
+
return Clone2(result);
|
|
24677
|
+
default:
|
|
24678
|
+
return result;
|
|
24679
|
+
}
|
|
24680
|
+
}
|
|
24681
|
+
|
|
24682
|
+
// node_modules/@sinclair/typebox/build/esm/type/error/error.mjs
|
|
24683
|
+
class TypeBoxError2 extends Error {
|
|
24684
|
+
constructor(message) {
|
|
24685
|
+
super(message);
|
|
24686
|
+
}
|
|
24687
|
+
}
|
|
24688
|
+
|
|
24689
|
+
// node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs
|
|
24690
|
+
var TransformKind2 = Symbol.for("TypeBox.Transform");
|
|
24691
|
+
var ReadonlyKind2 = Symbol.for("TypeBox.Readonly");
|
|
24692
|
+
var OptionalKind2 = Symbol.for("TypeBox.Optional");
|
|
24693
|
+
var Hint2 = Symbol.for("TypeBox.Hint");
|
|
24694
|
+
var Kind2 = Symbol.for("TypeBox.Kind");
|
|
24695
|
+
|
|
24696
|
+
// node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
|
|
24697
|
+
function IsReadonly2(value) {
|
|
24698
|
+
return IsObject5(value) && value[ReadonlyKind2] === "Readonly";
|
|
24699
|
+
}
|
|
24700
|
+
function IsOptional3(value) {
|
|
24701
|
+
return IsObject5(value) && value[OptionalKind2] === "Optional";
|
|
24702
|
+
}
|
|
24703
|
+
function IsAny3(value) {
|
|
24704
|
+
return IsKindOf3(value, "Any");
|
|
24705
|
+
}
|
|
24706
|
+
function IsArgument3(value) {
|
|
24707
|
+
return IsKindOf3(value, "Argument");
|
|
24708
|
+
}
|
|
24709
|
+
function IsArray7(value) {
|
|
24710
|
+
return IsKindOf3(value, "Array");
|
|
24711
|
+
}
|
|
24712
|
+
function IsAsyncIterator6(value) {
|
|
24713
|
+
return IsKindOf3(value, "AsyncIterator");
|
|
24714
|
+
}
|
|
24715
|
+
function IsBigInt6(value) {
|
|
24716
|
+
return IsKindOf3(value, "BigInt");
|
|
24717
|
+
}
|
|
24718
|
+
function IsBoolean6(value) {
|
|
24719
|
+
return IsKindOf3(value, "Boolean");
|
|
24720
|
+
}
|
|
24721
|
+
function IsComputed3(value) {
|
|
24722
|
+
return IsKindOf3(value, "Computed");
|
|
24723
|
+
}
|
|
24724
|
+
function IsConstructor3(value) {
|
|
24725
|
+
return IsKindOf3(value, "Constructor");
|
|
24726
|
+
}
|
|
24727
|
+
function IsDate6(value) {
|
|
24728
|
+
return IsKindOf3(value, "Date");
|
|
24729
|
+
}
|
|
24730
|
+
function IsFunction6(value) {
|
|
24731
|
+
return IsKindOf3(value, "Function");
|
|
24732
|
+
}
|
|
24733
|
+
function IsInteger4(value) {
|
|
24734
|
+
return IsKindOf3(value, "Integer");
|
|
24735
|
+
}
|
|
24736
|
+
function IsIntersect3(value) {
|
|
24737
|
+
return IsKindOf3(value, "Intersect");
|
|
24738
|
+
}
|
|
24739
|
+
function IsIterator6(value) {
|
|
24740
|
+
return IsKindOf3(value, "Iterator");
|
|
24741
|
+
}
|
|
24742
|
+
function IsKindOf3(value, kind) {
|
|
24743
|
+
return IsObject5(value) && Kind2 in value && value[Kind2] === kind;
|
|
24744
|
+
}
|
|
24745
|
+
function IsLiteralValue3(value) {
|
|
24746
|
+
return IsBoolean5(value) || IsNumber5(value) || IsString5(value);
|
|
24747
|
+
}
|
|
24748
|
+
function IsLiteral3(value) {
|
|
24749
|
+
return IsKindOf3(value, "Literal");
|
|
24750
|
+
}
|
|
24751
|
+
function IsMappedKey3(value) {
|
|
24752
|
+
return IsKindOf3(value, "MappedKey");
|
|
24753
|
+
}
|
|
24754
|
+
function IsMappedResult3(value) {
|
|
24755
|
+
return IsKindOf3(value, "MappedResult");
|
|
24756
|
+
}
|
|
24757
|
+
function IsNever3(value) {
|
|
24758
|
+
return IsKindOf3(value, "Never");
|
|
24759
|
+
}
|
|
24760
|
+
function IsNot3(value) {
|
|
24761
|
+
return IsKindOf3(value, "Not");
|
|
24762
|
+
}
|
|
24763
|
+
function IsNull6(value) {
|
|
24764
|
+
return IsKindOf3(value, "Null");
|
|
24765
|
+
}
|
|
24766
|
+
function IsNumber7(value) {
|
|
24767
|
+
return IsKindOf3(value, "Number");
|
|
24768
|
+
}
|
|
24769
|
+
function IsObject7(value) {
|
|
24770
|
+
return IsKindOf3(value, "Object");
|
|
24771
|
+
}
|
|
24772
|
+
function IsPromise4(value) {
|
|
24773
|
+
return IsKindOf3(value, "Promise");
|
|
24774
|
+
}
|
|
24775
|
+
function IsRecord3(value) {
|
|
24776
|
+
return IsKindOf3(value, "Record");
|
|
24777
|
+
}
|
|
24778
|
+
function IsRef3(value) {
|
|
24779
|
+
return IsKindOf3(value, "Ref");
|
|
24780
|
+
}
|
|
24781
|
+
function IsRegExp5(value) {
|
|
24782
|
+
return IsKindOf3(value, "RegExp");
|
|
24783
|
+
}
|
|
24784
|
+
function IsString6(value) {
|
|
24785
|
+
return IsKindOf3(value, "String");
|
|
24786
|
+
}
|
|
24787
|
+
function IsSymbol6(value) {
|
|
24788
|
+
return IsKindOf3(value, "Symbol");
|
|
24789
|
+
}
|
|
24790
|
+
function IsTemplateLiteral3(value) {
|
|
24791
|
+
return IsKindOf3(value, "TemplateLiteral");
|
|
24792
|
+
}
|
|
24793
|
+
function IsThis3(value) {
|
|
24794
|
+
return IsKindOf3(value, "This");
|
|
24795
|
+
}
|
|
24796
|
+
function IsTransform3(value) {
|
|
24797
|
+
return IsObject5(value) && TransformKind2 in value;
|
|
24798
|
+
}
|
|
24799
|
+
function IsTuple3(value) {
|
|
24800
|
+
return IsKindOf3(value, "Tuple");
|
|
24801
|
+
}
|
|
24802
|
+
function IsUndefined7(value) {
|
|
24803
|
+
return IsKindOf3(value, "Undefined");
|
|
24804
|
+
}
|
|
24805
|
+
function IsUnion3(value) {
|
|
24806
|
+
return IsKindOf3(value, "Union");
|
|
24807
|
+
}
|
|
24808
|
+
function IsUint8Array6(value) {
|
|
24809
|
+
return IsKindOf3(value, "Uint8Array");
|
|
24810
|
+
}
|
|
24811
|
+
function IsUnknown3(value) {
|
|
24812
|
+
return IsKindOf3(value, "Unknown");
|
|
24813
|
+
}
|
|
24814
|
+
function IsUnsafe3(value) {
|
|
24815
|
+
return IsKindOf3(value, "Unsafe");
|
|
24816
|
+
}
|
|
24817
|
+
function IsVoid3(value) {
|
|
24818
|
+
return IsKindOf3(value, "Void");
|
|
24819
|
+
}
|
|
24820
|
+
function IsKind3(value) {
|
|
24821
|
+
return IsObject5(value) && Kind2 in value && IsString5(value[Kind2]);
|
|
24822
|
+
}
|
|
24823
|
+
function IsSchema3(value) {
|
|
24824
|
+
return IsAny3(value) || IsArgument3(value) || IsArray7(value) || IsBoolean6(value) || IsBigInt6(value) || IsAsyncIterator6(value) || IsComputed3(value) || IsConstructor3(value) || IsDate6(value) || IsFunction6(value) || IsInteger4(value) || IsIntersect3(value) || IsIterator6(value) || IsLiteral3(value) || IsMappedKey3(value) || IsMappedResult3(value) || IsNever3(value) || IsNot3(value) || IsNull6(value) || IsNumber7(value) || IsObject7(value) || IsPromise4(value) || IsRecord3(value) || IsRef3(value) || IsRegExp5(value) || IsString6(value) || IsSymbol6(value) || IsTemplateLiteral3(value) || IsThis3(value) || IsTuple3(value) || IsUndefined7(value) || IsUnion3(value) || IsUint8Array6(value) || IsUnknown3(value) || IsUnsafe3(value) || IsVoid3(value) || IsKind3(value);
|
|
24825
|
+
}
|
|
24826
|
+
// node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
|
|
24827
|
+
var KnownTypes2 = [
|
|
24828
|
+
"Argument",
|
|
24829
|
+
"Any",
|
|
24830
|
+
"Array",
|
|
24831
|
+
"AsyncIterator",
|
|
24832
|
+
"BigInt",
|
|
24833
|
+
"Boolean",
|
|
24834
|
+
"Computed",
|
|
24835
|
+
"Constructor",
|
|
24836
|
+
"Date",
|
|
24837
|
+
"Enum",
|
|
24838
|
+
"Function",
|
|
24839
|
+
"Integer",
|
|
24840
|
+
"Intersect",
|
|
24841
|
+
"Iterator",
|
|
24842
|
+
"Literal",
|
|
24843
|
+
"MappedKey",
|
|
24844
|
+
"MappedResult",
|
|
24845
|
+
"Not",
|
|
24846
|
+
"Null",
|
|
24847
|
+
"Number",
|
|
24848
|
+
"Object",
|
|
24849
|
+
"Promise",
|
|
24850
|
+
"Record",
|
|
24851
|
+
"Ref",
|
|
24852
|
+
"RegExp",
|
|
24853
|
+
"String",
|
|
24854
|
+
"Symbol",
|
|
24855
|
+
"TemplateLiteral",
|
|
24856
|
+
"This",
|
|
24857
|
+
"Tuple",
|
|
24858
|
+
"Undefined",
|
|
24859
|
+
"Union",
|
|
24860
|
+
"Uint8Array",
|
|
24861
|
+
"Unknown",
|
|
24862
|
+
"Void"
|
|
24863
|
+
];
|
|
24864
|
+
function IsPattern2(value) {
|
|
24865
|
+
try {
|
|
24866
|
+
new RegExp(value);
|
|
24867
|
+
return true;
|
|
24868
|
+
} catch {
|
|
24869
|
+
return false;
|
|
24870
|
+
}
|
|
24871
|
+
}
|
|
24872
|
+
function IsControlCharacterFree2(value) {
|
|
24873
|
+
if (!IsString5(value))
|
|
24874
|
+
return false;
|
|
24875
|
+
for (let i = 0;i < value.length; i++) {
|
|
24876
|
+
const code = value.charCodeAt(i);
|
|
24877
|
+
if (code >= 7 && code <= 13 || code === 27 || code === 127) {
|
|
24878
|
+
return false;
|
|
24879
|
+
}
|
|
24880
|
+
}
|
|
24881
|
+
return true;
|
|
24882
|
+
}
|
|
24883
|
+
function IsAdditionalProperties2(value) {
|
|
24884
|
+
return IsOptionalBoolean2(value) || IsSchema4(value);
|
|
24885
|
+
}
|
|
24886
|
+
function IsOptionalBigInt2(value) {
|
|
24887
|
+
return IsUndefined5(value) || IsBigInt5(value);
|
|
24888
|
+
}
|
|
24889
|
+
function IsOptionalNumber2(value) {
|
|
24890
|
+
return IsUndefined5(value) || IsNumber5(value);
|
|
24891
|
+
}
|
|
24892
|
+
function IsOptionalBoolean2(value) {
|
|
24893
|
+
return IsUndefined5(value) || IsBoolean5(value);
|
|
24894
|
+
}
|
|
24895
|
+
function IsOptionalString2(value) {
|
|
24896
|
+
return IsUndefined5(value) || IsString5(value);
|
|
24897
|
+
}
|
|
24898
|
+
function IsOptionalPattern2(value) {
|
|
24899
|
+
return IsUndefined5(value) || IsString5(value) && IsControlCharacterFree2(value) && IsPattern2(value);
|
|
24900
|
+
}
|
|
24901
|
+
function IsOptionalFormat2(value) {
|
|
24902
|
+
return IsUndefined5(value) || IsString5(value) && IsControlCharacterFree2(value);
|
|
24903
|
+
}
|
|
24904
|
+
function IsOptionalSchema2(value) {
|
|
24905
|
+
return IsUndefined5(value) || IsSchema4(value);
|
|
24906
|
+
}
|
|
24907
|
+
function IsOptional4(value) {
|
|
24908
|
+
return IsObject5(value) && value[OptionalKind2] === "Optional";
|
|
24909
|
+
}
|
|
24910
|
+
function IsAny4(value) {
|
|
24911
|
+
return IsKindOf4(value, "Any") && IsOptionalString2(value.$id);
|
|
24912
|
+
}
|
|
24913
|
+
function IsArgument4(value) {
|
|
24914
|
+
return IsKindOf4(value, "Argument") && IsNumber5(value.index);
|
|
24915
|
+
}
|
|
24916
|
+
function IsArray8(value) {
|
|
24917
|
+
return IsKindOf4(value, "Array") && value.type === "array" && IsOptionalString2(value.$id) && IsSchema4(value.items) && IsOptionalNumber2(value.minItems) && IsOptionalNumber2(value.maxItems) && IsOptionalBoolean2(value.uniqueItems) && IsOptionalSchema2(value.contains) && IsOptionalNumber2(value.minContains) && IsOptionalNumber2(value.maxContains);
|
|
24918
|
+
}
|
|
24919
|
+
function IsAsyncIterator7(value) {
|
|
24920
|
+
return IsKindOf4(value, "AsyncIterator") && value.type === "AsyncIterator" && IsOptionalString2(value.$id) && IsSchema4(value.items);
|
|
24921
|
+
}
|
|
24922
|
+
function IsBigInt7(value) {
|
|
24923
|
+
return IsKindOf4(value, "BigInt") && value.type === "bigint" && IsOptionalString2(value.$id) && IsOptionalBigInt2(value.exclusiveMaximum) && IsOptionalBigInt2(value.exclusiveMinimum) && IsOptionalBigInt2(value.maximum) && IsOptionalBigInt2(value.minimum) && IsOptionalBigInt2(value.multipleOf);
|
|
24924
|
+
}
|
|
24925
|
+
function IsBoolean7(value) {
|
|
24926
|
+
return IsKindOf4(value, "Boolean") && value.type === "boolean" && IsOptionalString2(value.$id);
|
|
24927
|
+
}
|
|
24928
|
+
function IsComputed4(value) {
|
|
24929
|
+
return IsKindOf4(value, "Computed") && IsString5(value.target) && IsArray5(value.parameters) && value.parameters.every((schema) => IsSchema4(schema));
|
|
24930
|
+
}
|
|
24931
|
+
function IsConstructor4(value) {
|
|
24932
|
+
return IsKindOf4(value, "Constructor") && value.type === "Constructor" && IsOptionalString2(value.$id) && IsArray5(value.parameters) && value.parameters.every((schema) => IsSchema4(schema)) && IsSchema4(value.returns);
|
|
24933
|
+
}
|
|
24934
|
+
function IsDate7(value) {
|
|
24935
|
+
return IsKindOf4(value, "Date") && value.type === "Date" && IsOptionalString2(value.$id) && IsOptionalNumber2(value.exclusiveMaximumTimestamp) && IsOptionalNumber2(value.exclusiveMinimumTimestamp) && IsOptionalNumber2(value.maximumTimestamp) && IsOptionalNumber2(value.minimumTimestamp) && IsOptionalNumber2(value.multipleOfTimestamp);
|
|
24936
|
+
}
|
|
24937
|
+
function IsFunction7(value) {
|
|
24938
|
+
return IsKindOf4(value, "Function") && value.type === "Function" && IsOptionalString2(value.$id) && IsArray5(value.parameters) && value.parameters.every((schema) => IsSchema4(schema)) && IsSchema4(value.returns);
|
|
24939
|
+
}
|
|
24940
|
+
function IsInteger5(value) {
|
|
24941
|
+
return IsKindOf4(value, "Integer") && value.type === "integer" && IsOptionalString2(value.$id) && IsOptionalNumber2(value.exclusiveMaximum) && IsOptionalNumber2(value.exclusiveMinimum) && IsOptionalNumber2(value.maximum) && IsOptionalNumber2(value.minimum) && IsOptionalNumber2(value.multipleOf);
|
|
24942
|
+
}
|
|
24943
|
+
function IsProperties2(value) {
|
|
24944
|
+
return IsObject5(value) && Object.entries(value).every(([key, schema]) => IsControlCharacterFree2(key) && IsSchema4(schema));
|
|
24945
|
+
}
|
|
24946
|
+
function IsIntersect4(value) {
|
|
24947
|
+
return IsKindOf4(value, "Intersect") && (IsString5(value.type) && value.type !== "object" ? false : true) && IsArray5(value.allOf) && value.allOf.every((schema) => IsSchema4(schema) && !IsTransform4(schema)) && IsOptionalString2(value.type) && (IsOptionalBoolean2(value.unevaluatedProperties) || IsOptionalSchema2(value.unevaluatedProperties)) && IsOptionalString2(value.$id);
|
|
24948
|
+
}
|
|
24949
|
+
function IsIterator7(value) {
|
|
24950
|
+
return IsKindOf4(value, "Iterator") && value.type === "Iterator" && IsOptionalString2(value.$id) && IsSchema4(value.items);
|
|
24951
|
+
}
|
|
24952
|
+
function IsKindOf4(value, kind) {
|
|
24953
|
+
return IsObject5(value) && Kind2 in value && value[Kind2] === kind;
|
|
24954
|
+
}
|
|
24955
|
+
function IsLiteralString2(value) {
|
|
24956
|
+
return IsLiteral4(value) && IsString5(value.const);
|
|
24957
|
+
}
|
|
24958
|
+
function IsLiteralNumber2(value) {
|
|
24959
|
+
return IsLiteral4(value) && IsNumber5(value.const);
|
|
24960
|
+
}
|
|
24961
|
+
function IsLiteralBoolean2(value) {
|
|
24962
|
+
return IsLiteral4(value) && IsBoolean5(value.const);
|
|
24963
|
+
}
|
|
24964
|
+
function IsLiteral4(value) {
|
|
24965
|
+
return IsKindOf4(value, "Literal") && IsOptionalString2(value.$id) && IsLiteralValue4(value.const);
|
|
24966
|
+
}
|
|
24967
|
+
function IsLiteralValue4(value) {
|
|
24968
|
+
return IsBoolean5(value) || IsNumber5(value) || IsString5(value);
|
|
24969
|
+
}
|
|
24970
|
+
function IsMappedKey4(value) {
|
|
24971
|
+
return IsKindOf4(value, "MappedKey") && IsArray5(value.keys) && value.keys.every((key) => IsNumber5(key) || IsString5(key));
|
|
24972
|
+
}
|
|
24973
|
+
function IsMappedResult4(value) {
|
|
24974
|
+
return IsKindOf4(value, "MappedResult") && IsProperties2(value.properties);
|
|
24975
|
+
}
|
|
24976
|
+
function IsNever4(value) {
|
|
24977
|
+
return IsKindOf4(value, "Never") && IsObject5(value.not) && Object.getOwnPropertyNames(value.not).length === 0;
|
|
24978
|
+
}
|
|
24979
|
+
function IsNot4(value) {
|
|
24980
|
+
return IsKindOf4(value, "Not") && IsSchema4(value.not);
|
|
24981
|
+
}
|
|
24982
|
+
function IsNull7(value) {
|
|
24983
|
+
return IsKindOf4(value, "Null") && value.type === "null" && IsOptionalString2(value.$id);
|
|
24984
|
+
}
|
|
24985
|
+
function IsNumber8(value) {
|
|
24986
|
+
return IsKindOf4(value, "Number") && value.type === "number" && IsOptionalString2(value.$id) && IsOptionalNumber2(value.exclusiveMaximum) && IsOptionalNumber2(value.exclusiveMinimum) && IsOptionalNumber2(value.maximum) && IsOptionalNumber2(value.minimum) && IsOptionalNumber2(value.multipleOf);
|
|
24987
|
+
}
|
|
24988
|
+
function IsObject8(value) {
|
|
24989
|
+
return IsKindOf4(value, "Object") && value.type === "object" && IsOptionalString2(value.$id) && IsProperties2(value.properties) && IsAdditionalProperties2(value.additionalProperties) && IsOptionalNumber2(value.minProperties) && IsOptionalNumber2(value.maxProperties);
|
|
24990
|
+
}
|
|
24991
|
+
function IsPromise5(value) {
|
|
24992
|
+
return IsKindOf4(value, "Promise") && value.type === "Promise" && IsOptionalString2(value.$id) && IsSchema4(value.item);
|
|
24993
|
+
}
|
|
24994
|
+
function IsRecord4(value) {
|
|
24995
|
+
return IsKindOf4(value, "Record") && value.type === "object" && IsOptionalString2(value.$id) && IsAdditionalProperties2(value.additionalProperties) && IsObject5(value.patternProperties) && ((schema) => {
|
|
24996
|
+
const keys = Object.getOwnPropertyNames(schema.patternProperties);
|
|
24997
|
+
return keys.length === 1 && IsPattern2(keys[0]) && IsObject5(schema.patternProperties) && IsSchema4(schema.patternProperties[keys[0]]);
|
|
24998
|
+
})(value);
|
|
24999
|
+
}
|
|
25000
|
+
function IsRef4(value) {
|
|
25001
|
+
return IsKindOf4(value, "Ref") && IsOptionalString2(value.$id) && IsString5(value.$ref);
|
|
25002
|
+
}
|
|
25003
|
+
function IsRegExp6(value) {
|
|
25004
|
+
return IsKindOf4(value, "RegExp") && IsOptionalString2(value.$id) && IsString5(value.source) && IsString5(value.flags) && IsOptionalNumber2(value.maxLength) && IsOptionalNumber2(value.minLength);
|
|
25005
|
+
}
|
|
25006
|
+
function IsString7(value) {
|
|
25007
|
+
return IsKindOf4(value, "String") && value.type === "string" && IsOptionalString2(value.$id) && IsOptionalNumber2(value.minLength) && IsOptionalNumber2(value.maxLength) && IsOptionalPattern2(value.pattern) && IsOptionalFormat2(value.format);
|
|
25008
|
+
}
|
|
25009
|
+
function IsSymbol7(value) {
|
|
25010
|
+
return IsKindOf4(value, "Symbol") && value.type === "symbol" && IsOptionalString2(value.$id);
|
|
25011
|
+
}
|
|
25012
|
+
function IsTemplateLiteral4(value) {
|
|
25013
|
+
return IsKindOf4(value, "TemplateLiteral") && value.type === "string" && IsString5(value.pattern) && value.pattern[0] === "^" && value.pattern[value.pattern.length - 1] === "$";
|
|
25014
|
+
}
|
|
25015
|
+
function IsThis4(value) {
|
|
25016
|
+
return IsKindOf4(value, "This") && IsOptionalString2(value.$id) && IsString5(value.$ref);
|
|
25017
|
+
}
|
|
25018
|
+
function IsTransform4(value) {
|
|
25019
|
+
return IsObject5(value) && TransformKind2 in value;
|
|
25020
|
+
}
|
|
25021
|
+
function IsTuple4(value) {
|
|
25022
|
+
return IsKindOf4(value, "Tuple") && value.type === "array" && IsOptionalString2(value.$id) && IsNumber5(value.minItems) && IsNumber5(value.maxItems) && value.minItems === value.maxItems && (IsUndefined5(value.items) && IsUndefined5(value.additionalItems) && value.minItems === 0 || IsArray5(value.items) && value.items.every((schema) => IsSchema4(schema)));
|
|
25023
|
+
}
|
|
25024
|
+
function IsUndefined8(value) {
|
|
25025
|
+
return IsKindOf4(value, "Undefined") && value.type === "undefined" && IsOptionalString2(value.$id);
|
|
25026
|
+
}
|
|
25027
|
+
function IsUnion4(value) {
|
|
25028
|
+
return IsKindOf4(value, "Union") && IsOptionalString2(value.$id) && IsObject5(value) && IsArray5(value.anyOf) && value.anyOf.every((schema) => IsSchema4(schema));
|
|
25029
|
+
}
|
|
25030
|
+
function IsUint8Array7(value) {
|
|
25031
|
+
return IsKindOf4(value, "Uint8Array") && value.type === "Uint8Array" && IsOptionalString2(value.$id) && IsOptionalNumber2(value.minByteLength) && IsOptionalNumber2(value.maxByteLength);
|
|
25032
|
+
}
|
|
25033
|
+
function IsUnknown4(value) {
|
|
25034
|
+
return IsKindOf4(value, "Unknown") && IsOptionalString2(value.$id);
|
|
25035
|
+
}
|
|
25036
|
+
function IsUnsafe4(value) {
|
|
25037
|
+
return IsKindOf4(value, "Unsafe");
|
|
25038
|
+
}
|
|
25039
|
+
function IsVoid4(value) {
|
|
25040
|
+
return IsKindOf4(value, "Void") && value.type === "void" && IsOptionalString2(value.$id);
|
|
25041
|
+
}
|
|
25042
|
+
function IsKind4(value) {
|
|
25043
|
+
return IsObject5(value) && Kind2 in value && IsString5(value[Kind2]) && !KnownTypes2.includes(value[Kind2]);
|
|
25044
|
+
}
|
|
25045
|
+
function IsSchema4(value) {
|
|
25046
|
+
return IsObject5(value) && (IsAny4(value) || IsArgument4(value) || IsArray8(value) || IsBoolean7(value) || IsBigInt7(value) || IsAsyncIterator7(value) || IsComputed4(value) || IsConstructor4(value) || IsDate7(value) || IsFunction7(value) || IsInteger5(value) || IsIntersect4(value) || IsIterator7(value) || IsLiteral4(value) || IsMappedKey4(value) || IsMappedResult4(value) || IsNever4(value) || IsNot4(value) || IsNull7(value) || IsNumber8(value) || IsObject8(value) || IsPromise5(value) || IsRecord4(value) || IsRef4(value) || IsRegExp6(value) || IsString7(value) || IsSymbol7(value) || IsTemplateLiteral4(value) || IsThis4(value) || IsTuple4(value) || IsUndefined8(value) || IsUnion4(value) || IsUint8Array7(value) || IsUnknown4(value) || IsUnsafe4(value) || IsVoid4(value) || IsKind4(value));
|
|
25047
|
+
}
|
|
25048
|
+
// node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.mjs
|
|
25049
|
+
var PatternBoolean2 = "(true|false)";
|
|
25050
|
+
var PatternNumber2 = "(0|[1-9][0-9]*)";
|
|
25051
|
+
var PatternString2 = "(.*)";
|
|
25052
|
+
var PatternNever2 = "(?!.*)";
|
|
25053
|
+
var PatternBooleanExact2 = `^${PatternBoolean2}$`;
|
|
25054
|
+
var PatternNumberExact2 = `^${PatternNumber2}$`;
|
|
25055
|
+
var PatternStringExact2 = `^${PatternString2}$`;
|
|
25056
|
+
var PatternNeverExact2 = `^${PatternNever2}$`;
|
|
25057
|
+
|
|
25058
|
+
// node_modules/@sinclair/typebox/build/esm/type/sets/set.mjs
|
|
25059
|
+
function SetIncludes2(T, S) {
|
|
25060
|
+
return T.includes(S);
|
|
25061
|
+
}
|
|
25062
|
+
function SetDistinct2(T) {
|
|
25063
|
+
return [...new Set(T)];
|
|
25064
|
+
}
|
|
25065
|
+
function SetIntersect2(T, S) {
|
|
25066
|
+
return T.filter((L) => S.includes(L));
|
|
25067
|
+
}
|
|
25068
|
+
function SetIntersectManyResolve2(T, Init) {
|
|
25069
|
+
return T.reduce((Acc, L) => {
|
|
25070
|
+
return SetIntersect2(Acc, L);
|
|
25071
|
+
}, Init);
|
|
25072
|
+
}
|
|
25073
|
+
function SetIntersectMany2(T) {
|
|
25074
|
+
return T.length === 1 ? T[0] : T.length > 1 ? SetIntersectManyResolve2(T.slice(1), T[0]) : [];
|
|
25075
|
+
}
|
|
25076
|
+
function SetUnionMany2(T) {
|
|
25077
|
+
const Acc = [];
|
|
25078
|
+
for (const L of T)
|
|
25079
|
+
Acc.push(...L);
|
|
25080
|
+
return Acc;
|
|
25081
|
+
}
|
|
25082
|
+
|
|
25083
|
+
// node_modules/@sinclair/typebox/build/esm/type/any/any.mjs
|
|
25084
|
+
function Any2(options) {
|
|
25085
|
+
return CreateType2({ [Kind2]: "Any" }, options);
|
|
25086
|
+
}
|
|
25087
|
+
|
|
25088
|
+
// node_modules/@sinclair/typebox/build/esm/type/array/array.mjs
|
|
25089
|
+
function Array3(items, options) {
|
|
25090
|
+
return CreateType2({ [Kind2]: "Array", type: "array", items }, options);
|
|
25091
|
+
}
|
|
25092
|
+
|
|
25093
|
+
// node_modules/@sinclair/typebox/build/esm/type/argument/argument.mjs
|
|
25094
|
+
function Argument2(index) {
|
|
25095
|
+
return CreateType2({ [Kind2]: "Argument", index });
|
|
25096
|
+
}
|
|
25097
|
+
|
|
25098
|
+
// node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs
|
|
25099
|
+
function AsyncIterator2(items, options) {
|
|
25100
|
+
return CreateType2({ [Kind2]: "AsyncIterator", type: "AsyncIterator", items }, options);
|
|
25101
|
+
}
|
|
25102
|
+
|
|
25103
|
+
// node_modules/@sinclair/typebox/build/esm/type/computed/computed.mjs
|
|
25104
|
+
function Computed2(target, parameters, options) {
|
|
25105
|
+
return CreateType2({ [Kind2]: "Computed", target, parameters }, options);
|
|
25106
|
+
}
|
|
25107
|
+
|
|
25108
|
+
// node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs
|
|
25109
|
+
function DiscardKey2(value, key) {
|
|
25110
|
+
const { [key]: _, ...rest } = value;
|
|
25111
|
+
return rest;
|
|
25112
|
+
}
|
|
25113
|
+
function Discard2(value, keys) {
|
|
25114
|
+
return keys.reduce((acc, key) => DiscardKey2(acc, key), value);
|
|
25115
|
+
}
|
|
25116
|
+
|
|
25117
|
+
// node_modules/@sinclair/typebox/build/esm/type/never/never.mjs
|
|
25118
|
+
function Never2(options) {
|
|
25119
|
+
return CreateType2({ [Kind2]: "Never", not: {} }, options);
|
|
25120
|
+
}
|
|
25121
|
+
|
|
25122
|
+
// node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs
|
|
25123
|
+
function MappedResult2(properties) {
|
|
25124
|
+
return CreateType2({
|
|
25125
|
+
[Kind2]: "MappedResult",
|
|
25126
|
+
properties
|
|
25127
|
+
});
|
|
25128
|
+
}
|
|
25129
|
+
|
|
25130
|
+
// node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.mjs
|
|
25131
|
+
function Constructor2(parameters, returns, options) {
|
|
25132
|
+
return CreateType2({ [Kind2]: "Constructor", type: "Constructor", parameters, returns }, options);
|
|
25133
|
+
}
|
|
25134
|
+
|
|
25135
|
+
// node_modules/@sinclair/typebox/build/esm/type/function/function.mjs
|
|
25136
|
+
function Function3(parameters, returns, options) {
|
|
25137
|
+
return CreateType2({ [Kind2]: "Function", type: "Function", parameters, returns }, options);
|
|
25138
|
+
}
|
|
25139
|
+
|
|
25140
|
+
// node_modules/@sinclair/typebox/build/esm/type/union/union-create.mjs
|
|
25141
|
+
function UnionCreate2(T, options) {
|
|
25142
|
+
return CreateType2({ [Kind2]: "Union", anyOf: T }, options);
|
|
25143
|
+
}
|
|
25144
|
+
|
|
25145
|
+
// node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs
|
|
25146
|
+
function IsUnionOptional2(types) {
|
|
25147
|
+
return types.some((type) => IsOptional3(type));
|
|
25148
|
+
}
|
|
25149
|
+
function RemoveOptionalFromRest3(types) {
|
|
25150
|
+
return types.map((left) => IsOptional3(left) ? RemoveOptionalFromType3(left) : left);
|
|
25151
|
+
}
|
|
25152
|
+
function RemoveOptionalFromType3(T) {
|
|
25153
|
+
return Discard2(T, [OptionalKind2]);
|
|
25154
|
+
}
|
|
25155
|
+
function ResolveUnion2(types, options) {
|
|
25156
|
+
const isOptional = IsUnionOptional2(types);
|
|
25157
|
+
return isOptional ? Optional2(UnionCreate2(RemoveOptionalFromRest3(types), options)) : UnionCreate2(RemoveOptionalFromRest3(types), options);
|
|
25158
|
+
}
|
|
25159
|
+
function UnionEvaluated2(T, options) {
|
|
25160
|
+
return T.length === 1 ? CreateType2(T[0], options) : T.length === 0 ? Never2(options) : ResolveUnion2(T, options);
|
|
25161
|
+
}
|
|
25162
|
+
|
|
25163
|
+
// node_modules/@sinclair/typebox/build/esm/type/union/union.mjs
|
|
25164
|
+
function Union3(types, options) {
|
|
25165
|
+
return types.length === 0 ? Never2(options) : types.length === 1 ? CreateType2(types[0], options) : UnionCreate2(types, options);
|
|
25166
|
+
}
|
|
25167
|
+
|
|
25168
|
+
// node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.mjs
|
|
25169
|
+
class TemplateLiteralParserError2 extends TypeBoxError2 {
|
|
25170
|
+
}
|
|
25171
|
+
function Unescape2(pattern) {
|
|
25172
|
+
return pattern.replace(/\\\$/g, "$").replace(/\\\*/g, "*").replace(/\\\^/g, "^").replace(/\\\|/g, "|").replace(/\\\(/g, "(").replace(/\\\)/g, ")");
|
|
25173
|
+
}
|
|
25174
|
+
function IsNonEscaped2(pattern, index, char) {
|
|
25175
|
+
return pattern[index] === char && pattern.charCodeAt(index - 1) !== 92;
|
|
25176
|
+
}
|
|
25177
|
+
function IsOpenParen2(pattern, index) {
|
|
25178
|
+
return IsNonEscaped2(pattern, index, "(");
|
|
25179
|
+
}
|
|
25180
|
+
function IsCloseParen2(pattern, index) {
|
|
25181
|
+
return IsNonEscaped2(pattern, index, ")");
|
|
25182
|
+
}
|
|
25183
|
+
function IsSeparator2(pattern, index) {
|
|
25184
|
+
return IsNonEscaped2(pattern, index, "|");
|
|
25185
|
+
}
|
|
25186
|
+
function IsGroup2(pattern) {
|
|
25187
|
+
if (!(IsOpenParen2(pattern, 0) && IsCloseParen2(pattern, pattern.length - 1)))
|
|
25188
|
+
return false;
|
|
25189
|
+
let count = 0;
|
|
25190
|
+
for (let index = 0;index < pattern.length; index++) {
|
|
25191
|
+
if (IsOpenParen2(pattern, index))
|
|
25192
|
+
count += 1;
|
|
25193
|
+
if (IsCloseParen2(pattern, index))
|
|
25194
|
+
count -= 1;
|
|
25195
|
+
if (count === 0 && index !== pattern.length - 1)
|
|
25196
|
+
return false;
|
|
25197
|
+
}
|
|
25198
|
+
return true;
|
|
25199
|
+
}
|
|
25200
|
+
function InGroup2(pattern) {
|
|
25201
|
+
return pattern.slice(1, pattern.length - 1);
|
|
25202
|
+
}
|
|
25203
|
+
function IsPrecedenceOr2(pattern) {
|
|
25204
|
+
let count = 0;
|
|
25205
|
+
for (let index = 0;index < pattern.length; index++) {
|
|
25206
|
+
if (IsOpenParen2(pattern, index))
|
|
25207
|
+
count += 1;
|
|
25208
|
+
if (IsCloseParen2(pattern, index))
|
|
25209
|
+
count -= 1;
|
|
25210
|
+
if (IsSeparator2(pattern, index) && count === 0)
|
|
25211
|
+
return true;
|
|
25212
|
+
}
|
|
25213
|
+
return false;
|
|
25214
|
+
}
|
|
25215
|
+
function IsPrecedenceAnd2(pattern) {
|
|
25216
|
+
for (let index = 0;index < pattern.length; index++) {
|
|
25217
|
+
if (IsOpenParen2(pattern, index))
|
|
25218
|
+
return true;
|
|
25219
|
+
}
|
|
25220
|
+
return false;
|
|
25221
|
+
}
|
|
25222
|
+
function Or2(pattern) {
|
|
25223
|
+
let [count, start] = [0, 0];
|
|
25224
|
+
const expressions = [];
|
|
25225
|
+
for (let index = 0;index < pattern.length; index++) {
|
|
25226
|
+
if (IsOpenParen2(pattern, index))
|
|
25227
|
+
count += 1;
|
|
25228
|
+
if (IsCloseParen2(pattern, index))
|
|
25229
|
+
count -= 1;
|
|
25230
|
+
if (IsSeparator2(pattern, index) && count === 0) {
|
|
25231
|
+
const range = pattern.slice(start, index);
|
|
25232
|
+
if (range.length > 0)
|
|
25233
|
+
expressions.push(TemplateLiteralParse2(range));
|
|
25234
|
+
start = index + 1;
|
|
25235
|
+
}
|
|
25236
|
+
}
|
|
25237
|
+
const range = pattern.slice(start);
|
|
25238
|
+
if (range.length > 0)
|
|
25239
|
+
expressions.push(TemplateLiteralParse2(range));
|
|
25240
|
+
if (expressions.length === 0)
|
|
25241
|
+
return { type: "const", const: "" };
|
|
25242
|
+
if (expressions.length === 1)
|
|
25243
|
+
return expressions[0];
|
|
25244
|
+
return { type: "or", expr: expressions };
|
|
25245
|
+
}
|
|
25246
|
+
function And2(pattern) {
|
|
25247
|
+
function Group(value, index) {
|
|
25248
|
+
if (!IsOpenParen2(value, index))
|
|
25249
|
+
throw new TemplateLiteralParserError2(`TemplateLiteralParser: Index must point to open parens`);
|
|
25250
|
+
let count = 0;
|
|
25251
|
+
for (let scan = index;scan < value.length; scan++) {
|
|
25252
|
+
if (IsOpenParen2(value, scan))
|
|
25253
|
+
count += 1;
|
|
25254
|
+
if (IsCloseParen2(value, scan))
|
|
25255
|
+
count -= 1;
|
|
25256
|
+
if (count === 0)
|
|
25257
|
+
return [index, scan];
|
|
25258
|
+
}
|
|
25259
|
+
throw new TemplateLiteralParserError2(`TemplateLiteralParser: Unclosed group parens in expression`);
|
|
25260
|
+
}
|
|
25261
|
+
function Range(pattern, index) {
|
|
25262
|
+
for (let scan = index;scan < pattern.length; scan++) {
|
|
25263
|
+
if (IsOpenParen2(pattern, scan))
|
|
25264
|
+
return [index, scan];
|
|
25265
|
+
}
|
|
25266
|
+
return [index, pattern.length];
|
|
25267
|
+
}
|
|
25268
|
+
const expressions = [];
|
|
25269
|
+
for (let index = 0;index < pattern.length; index++) {
|
|
25270
|
+
if (IsOpenParen2(pattern, index)) {
|
|
25271
|
+
const [start, end] = Group(pattern, index);
|
|
25272
|
+
const range = pattern.slice(start, end + 1);
|
|
25273
|
+
expressions.push(TemplateLiteralParse2(range));
|
|
25274
|
+
index = end;
|
|
25275
|
+
} else {
|
|
25276
|
+
const [start, end] = Range(pattern, index);
|
|
25277
|
+
const range = pattern.slice(start, end);
|
|
25278
|
+
if (range.length > 0)
|
|
25279
|
+
expressions.push(TemplateLiteralParse2(range));
|
|
25280
|
+
index = end - 1;
|
|
25281
|
+
}
|
|
25282
|
+
}
|
|
25283
|
+
return expressions.length === 0 ? { type: "const", const: "" } : expressions.length === 1 ? expressions[0] : { type: "and", expr: expressions };
|
|
25284
|
+
}
|
|
25285
|
+
function TemplateLiteralParse2(pattern) {
|
|
25286
|
+
return IsGroup2(pattern) ? TemplateLiteralParse2(InGroup2(pattern)) : IsPrecedenceOr2(pattern) ? Or2(pattern) : IsPrecedenceAnd2(pattern) ? And2(pattern) : { type: "const", const: Unescape2(pattern) };
|
|
25287
|
+
}
|
|
25288
|
+
function TemplateLiteralParseExact2(pattern) {
|
|
25289
|
+
return TemplateLiteralParse2(pattern.slice(1, pattern.length - 1));
|
|
25290
|
+
}
|
|
25291
|
+
|
|
25292
|
+
// node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.mjs
|
|
25293
|
+
class TemplateLiteralFiniteError2 extends TypeBoxError2 {
|
|
25294
|
+
}
|
|
25295
|
+
function IsNumberExpression2(expression) {
|
|
25296
|
+
return expression.type === "or" && expression.expr.length === 2 && expression.expr[0].type === "const" && expression.expr[0].const === "0" && expression.expr[1].type === "const" && expression.expr[1].const === "[1-9][0-9]*";
|
|
25297
|
+
}
|
|
25298
|
+
function IsBooleanExpression2(expression) {
|
|
25299
|
+
return expression.type === "or" && expression.expr.length === 2 && expression.expr[0].type === "const" && expression.expr[0].const === "true" && expression.expr[1].type === "const" && expression.expr[1].const === "false";
|
|
25300
|
+
}
|
|
25301
|
+
function IsStringExpression2(expression) {
|
|
25302
|
+
return expression.type === "const" && expression.const === ".*";
|
|
25303
|
+
}
|
|
25304
|
+
function IsTemplateLiteralExpressionFinite2(expression) {
|
|
25305
|
+
return IsNumberExpression2(expression) || IsStringExpression2(expression) ? false : IsBooleanExpression2(expression) ? true : expression.type === "and" ? expression.expr.every((expr) => IsTemplateLiteralExpressionFinite2(expr)) : expression.type === "or" ? expression.expr.every((expr) => IsTemplateLiteralExpressionFinite2(expr)) : expression.type === "const" ? true : (() => {
|
|
25306
|
+
throw new TemplateLiteralFiniteError2(`Unknown expression type`);
|
|
25307
|
+
})();
|
|
25308
|
+
}
|
|
25309
|
+
function IsTemplateLiteralFinite2(schema) {
|
|
25310
|
+
const expression = TemplateLiteralParseExact2(schema.pattern);
|
|
25311
|
+
return IsTemplateLiteralExpressionFinite2(expression);
|
|
25312
|
+
}
|
|
25313
|
+
|
|
25314
|
+
// node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.mjs
|
|
25315
|
+
class TemplateLiteralGenerateError2 extends TypeBoxError2 {
|
|
25316
|
+
}
|
|
25317
|
+
function* GenerateReduce2(buffer) {
|
|
25318
|
+
if (buffer.length === 1)
|
|
25319
|
+
return yield* buffer[0];
|
|
25320
|
+
for (const left of buffer[0]) {
|
|
25321
|
+
for (const right of GenerateReduce2(buffer.slice(1))) {
|
|
25322
|
+
yield `${left}${right}`;
|
|
25323
|
+
}
|
|
25324
|
+
}
|
|
25325
|
+
}
|
|
25326
|
+
function* GenerateAnd2(expression) {
|
|
25327
|
+
return yield* GenerateReduce2(expression.expr.map((expr) => [...TemplateLiteralExpressionGenerate2(expr)]));
|
|
25328
|
+
}
|
|
25329
|
+
function* GenerateOr2(expression) {
|
|
25330
|
+
for (const expr of expression.expr)
|
|
25331
|
+
yield* TemplateLiteralExpressionGenerate2(expr);
|
|
25332
|
+
}
|
|
25333
|
+
function* GenerateConst2(expression) {
|
|
25334
|
+
return yield expression.const;
|
|
25335
|
+
}
|
|
25336
|
+
function* TemplateLiteralExpressionGenerate2(expression) {
|
|
25337
|
+
return expression.type === "and" ? yield* GenerateAnd2(expression) : expression.type === "or" ? yield* GenerateOr2(expression) : expression.type === "const" ? yield* GenerateConst2(expression) : (() => {
|
|
25338
|
+
throw new TemplateLiteralGenerateError2("Unknown expression");
|
|
25339
|
+
})();
|
|
25340
|
+
}
|
|
25341
|
+
function TemplateLiteralGenerate2(schema) {
|
|
25342
|
+
const expression = TemplateLiteralParseExact2(schema.pattern);
|
|
25343
|
+
return IsTemplateLiteralExpressionFinite2(expression) ? [...TemplateLiteralExpressionGenerate2(expression)] : [];
|
|
25344
|
+
}
|
|
25345
|
+
|
|
25346
|
+
// node_modules/@sinclair/typebox/build/esm/type/literal/literal.mjs
|
|
25347
|
+
function Literal2(value, options) {
|
|
25348
|
+
return CreateType2({
|
|
25349
|
+
[Kind2]: "Literal",
|
|
25350
|
+
const: value,
|
|
25351
|
+
type: typeof value
|
|
25352
|
+
}, options);
|
|
25353
|
+
}
|
|
25354
|
+
|
|
25355
|
+
// node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs
|
|
25356
|
+
function Boolean3(options) {
|
|
25357
|
+
return CreateType2({ [Kind2]: "Boolean", type: "boolean" }, options);
|
|
25358
|
+
}
|
|
25359
|
+
|
|
25360
|
+
// node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.mjs
|
|
25361
|
+
function BigInt3(options) {
|
|
25362
|
+
return CreateType2({ [Kind2]: "BigInt", type: "bigint" }, options);
|
|
25363
|
+
}
|
|
25364
|
+
|
|
25365
|
+
// node_modules/@sinclair/typebox/build/esm/type/number/number.mjs
|
|
25366
|
+
function Number3(options) {
|
|
25367
|
+
return CreateType2({ [Kind2]: "Number", type: "number" }, options);
|
|
25368
|
+
}
|
|
25369
|
+
|
|
25370
|
+
// node_modules/@sinclair/typebox/build/esm/type/string/string.mjs
|
|
25371
|
+
function String3(options) {
|
|
25372
|
+
return CreateType2({ [Kind2]: "String", type: "string" }, options);
|
|
25373
|
+
}
|
|
25374
|
+
|
|
25375
|
+
// node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
|
|
25376
|
+
function* FromUnion15(syntax) {
|
|
25377
|
+
const trim = syntax.trim().replace(/"|'/g, "");
|
|
25378
|
+
return trim === "boolean" ? yield Boolean3() : trim === "number" ? yield Number3() : trim === "bigint" ? yield BigInt3() : trim === "string" ? yield String3() : yield (() => {
|
|
25379
|
+
const literals = trim.split("|").map((literal) => Literal2(literal.trim()));
|
|
25380
|
+
return literals.length === 0 ? Never2() : literals.length === 1 ? literals[0] : UnionEvaluated2(literals);
|
|
25381
|
+
})();
|
|
25382
|
+
}
|
|
25383
|
+
function* FromTerminal2(syntax) {
|
|
25384
|
+
if (syntax[1] !== "{") {
|
|
25385
|
+
const L = Literal2("$");
|
|
25386
|
+
const R = FromSyntax2(syntax.slice(1));
|
|
25387
|
+
return yield* [L, ...R];
|
|
25388
|
+
}
|
|
25389
|
+
for (let i = 2;i < syntax.length; i++) {
|
|
25390
|
+
if (syntax[i] === "}") {
|
|
25391
|
+
const L = FromUnion15(syntax.slice(2, i));
|
|
25392
|
+
const R = FromSyntax2(syntax.slice(i + 1));
|
|
25393
|
+
return yield* [...L, ...R];
|
|
25394
|
+
}
|
|
25395
|
+
}
|
|
25396
|
+
yield Literal2(syntax);
|
|
25397
|
+
}
|
|
25398
|
+
function* FromSyntax2(syntax) {
|
|
25399
|
+
for (let i = 0;i < syntax.length; i++) {
|
|
25400
|
+
if (syntax[i] === "$") {
|
|
25401
|
+
const L = Literal2(syntax.slice(0, i));
|
|
25402
|
+
const R = FromTerminal2(syntax.slice(i));
|
|
25403
|
+
return yield* [L, ...R];
|
|
25404
|
+
}
|
|
25405
|
+
}
|
|
25406
|
+
yield Literal2(syntax);
|
|
25407
|
+
}
|
|
25408
|
+
function TemplateLiteralSyntax2(syntax) {
|
|
25409
|
+
return [...FromSyntax2(syntax)];
|
|
25410
|
+
}
|
|
25411
|
+
|
|
25412
|
+
// node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs
|
|
25413
|
+
class TemplateLiteralPatternError2 extends TypeBoxError2 {
|
|
25414
|
+
}
|
|
25415
|
+
function Escape2(value) {
|
|
25416
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
25417
|
+
}
|
|
25418
|
+
function Visit10(schema, acc) {
|
|
25419
|
+
return IsTemplateLiteral3(schema) ? schema.pattern.slice(1, schema.pattern.length - 1) : IsUnion3(schema) ? `(${schema.anyOf.map((schema) => Visit10(schema, acc)).join("|")})` : IsNumber7(schema) ? `${acc}${PatternNumber2}` : IsInteger4(schema) ? `${acc}${PatternNumber2}` : IsBigInt6(schema) ? `${acc}${PatternNumber2}` : IsString6(schema) ? `${acc}${PatternString2}` : IsLiteral3(schema) ? `${acc}${Escape2(schema.const.toString())}` : IsBoolean6(schema) ? `${acc}${PatternBoolean2}` : (() => {
|
|
25420
|
+
throw new TemplateLiteralPatternError2(`Unexpected Kind '${schema[Kind2]}'`);
|
|
25421
|
+
})();
|
|
25422
|
+
}
|
|
25423
|
+
function TemplateLiteralPattern2(kinds) {
|
|
25424
|
+
return `^${kinds.map((schema) => Visit10(schema, "")).join("")}$`;
|
|
25425
|
+
}
|
|
25426
|
+
|
|
25427
|
+
// node_modules/@sinclair/typebox/build/esm/type/template-literal/union.mjs
|
|
25428
|
+
function TemplateLiteralToUnion2(schema) {
|
|
25429
|
+
const R = TemplateLiteralGenerate2(schema);
|
|
25430
|
+
const L = R.map((S) => Literal2(S));
|
|
25431
|
+
return UnionEvaluated2(L);
|
|
25432
|
+
}
|
|
25433
|
+
|
|
25434
|
+
// node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs
|
|
25435
|
+
function TemplateLiteral2(unresolved, options) {
|
|
25436
|
+
const pattern = IsString5(unresolved) ? TemplateLiteralPattern2(TemplateLiteralSyntax2(unresolved)) : TemplateLiteralPattern2(unresolved);
|
|
25437
|
+
return CreateType2({ [Kind2]: "TemplateLiteral", type: "string", pattern }, options);
|
|
25438
|
+
}
|
|
25439
|
+
|
|
25440
|
+
// node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs
|
|
25441
|
+
function FromTemplateLiteral6(templateLiteral) {
|
|
25442
|
+
const keys = TemplateLiteralGenerate2(templateLiteral);
|
|
25443
|
+
return keys.map((key) => key.toString());
|
|
25444
|
+
}
|
|
25445
|
+
function FromUnion16(types) {
|
|
25446
|
+
const result = [];
|
|
25447
|
+
for (const type of types)
|
|
25448
|
+
result.push(...IndexPropertyKeys2(type));
|
|
25449
|
+
return result;
|
|
25450
|
+
}
|
|
25451
|
+
function FromLiteral5(literalValue) {
|
|
25452
|
+
return [literalValue.toString()];
|
|
25453
|
+
}
|
|
25454
|
+
function IndexPropertyKeys2(type) {
|
|
25455
|
+
return [...new Set(IsTemplateLiteral3(type) ? FromTemplateLiteral6(type) : IsUnion3(type) ? FromUnion16(type.anyOf) : IsLiteral3(type) ? FromLiteral5(type.const) : IsNumber7(type) ? ["[number]"] : IsInteger4(type) ? ["[number]"] : [])];
|
|
25456
|
+
}
|
|
25457
|
+
|
|
25458
|
+
// node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs
|
|
25459
|
+
function FromProperties20(type, properties, options) {
|
|
25460
|
+
const result = {};
|
|
25461
|
+
for (const K2 of Object.getOwnPropertyNames(properties)) {
|
|
25462
|
+
result[K2] = Index2(type, IndexPropertyKeys2(properties[K2]), options);
|
|
25463
|
+
}
|
|
25464
|
+
return result;
|
|
25465
|
+
}
|
|
25466
|
+
function FromMappedResult13(type, mappedResult, options) {
|
|
25467
|
+
return FromProperties20(type, mappedResult.properties, options);
|
|
25468
|
+
}
|
|
25469
|
+
function IndexFromMappedResult2(type, mappedResult, options) {
|
|
25470
|
+
const properties = FromMappedResult13(type, mappedResult, options);
|
|
25471
|
+
return MappedResult2(properties);
|
|
25472
|
+
}
|
|
25473
|
+
|
|
25474
|
+
// node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs
|
|
25475
|
+
function FromRest8(types, key) {
|
|
25476
|
+
return types.map((type) => IndexFromPropertyKey2(type, key));
|
|
25477
|
+
}
|
|
25478
|
+
function FromIntersectRest2(types) {
|
|
25479
|
+
return types.filter((type) => !IsNever3(type));
|
|
25480
|
+
}
|
|
25481
|
+
function FromIntersect13(types, key) {
|
|
25482
|
+
return IntersectEvaluated2(FromIntersectRest2(FromRest8(types, key)));
|
|
25483
|
+
}
|
|
25484
|
+
function FromUnionRest2(types) {
|
|
25485
|
+
return types.some((L) => IsNever3(L)) ? [] : types;
|
|
25486
|
+
}
|
|
25487
|
+
function FromUnion17(types, key) {
|
|
25488
|
+
return UnionEvaluated2(FromUnionRest2(FromRest8(types, key)));
|
|
25489
|
+
}
|
|
25490
|
+
function FromTuple10(types, key) {
|
|
25491
|
+
return key in types ? types[key] : key === "[number]" ? UnionEvaluated2(types) : Never2();
|
|
25492
|
+
}
|
|
25493
|
+
function FromArray11(type, key) {
|
|
25494
|
+
return key === "[number]" ? type : Never2();
|
|
25495
|
+
}
|
|
25496
|
+
function FromProperty4(properties, propertyKey) {
|
|
25497
|
+
return propertyKey in properties ? properties[propertyKey] : Never2();
|
|
25498
|
+
}
|
|
25499
|
+
function IndexFromPropertyKey2(type, propertyKey) {
|
|
25500
|
+
return IsIntersect3(type) ? FromIntersect13(type.allOf, propertyKey) : IsUnion3(type) ? FromUnion17(type.anyOf, propertyKey) : IsTuple3(type) ? FromTuple10(type.items ?? [], propertyKey) : IsArray7(type) ? FromArray11(type.items, propertyKey) : IsObject7(type) ? FromProperty4(type.properties, propertyKey) : Never2();
|
|
25501
|
+
}
|
|
25502
|
+
function IndexFromPropertyKeys2(type, propertyKeys) {
|
|
25503
|
+
return propertyKeys.map((propertyKey) => IndexFromPropertyKey2(type, propertyKey));
|
|
25504
|
+
}
|
|
25505
|
+
function FromSchema2(type, propertyKeys) {
|
|
25506
|
+
return UnionEvaluated2(IndexFromPropertyKeys2(type, propertyKeys));
|
|
25507
|
+
}
|
|
25508
|
+
function Index2(type, key, options) {
|
|
25509
|
+
if (IsRef3(type) || IsRef3(key)) {
|
|
25510
|
+
const error = `Index types using Ref parameters require both Type and Key to be of TSchema`;
|
|
25511
|
+
if (!IsSchema3(type) || !IsSchema3(key))
|
|
25512
|
+
throw new TypeBoxError2(error);
|
|
25513
|
+
return Computed2("Index", [type, key]);
|
|
25514
|
+
}
|
|
25515
|
+
if (IsMappedResult3(key))
|
|
25516
|
+
return IndexFromMappedResult2(type, key, options);
|
|
25517
|
+
if (IsMappedKey3(key))
|
|
25518
|
+
return IndexFromMappedKey2(type, key, options);
|
|
25519
|
+
return CreateType2(IsSchema3(key) ? FromSchema2(type, IndexPropertyKeys2(key)) : FromSchema2(type, key), options);
|
|
25520
|
+
}
|
|
25521
|
+
|
|
25522
|
+
// node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs
|
|
25523
|
+
function MappedIndexPropertyKey2(type, key, options) {
|
|
25524
|
+
return { [key]: Index2(type, [key], Clone2(options)) };
|
|
25525
|
+
}
|
|
25526
|
+
function MappedIndexPropertyKeys2(type, propertyKeys, options) {
|
|
25527
|
+
return propertyKeys.reduce((result, left) => {
|
|
25528
|
+
return { ...result, ...MappedIndexPropertyKey2(type, left, options) };
|
|
25529
|
+
}, {});
|
|
25530
|
+
}
|
|
25531
|
+
function MappedIndexProperties2(type, mappedKey, options) {
|
|
25532
|
+
return MappedIndexPropertyKeys2(type, mappedKey.keys, options);
|
|
25533
|
+
}
|
|
25534
|
+
function IndexFromMappedKey2(type, mappedKey, options) {
|
|
25535
|
+
const properties = MappedIndexProperties2(type, mappedKey, options);
|
|
25536
|
+
return MappedResult2(properties);
|
|
25537
|
+
}
|
|
25538
|
+
|
|
25539
|
+
// node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.mjs
|
|
25540
|
+
function Iterator2(items, options) {
|
|
25541
|
+
return CreateType2({ [Kind2]: "Iterator", type: "Iterator", items }, options);
|
|
25542
|
+
}
|
|
25543
|
+
|
|
25544
|
+
// node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
|
|
25545
|
+
function RequiredArray2(properties) {
|
|
25546
|
+
return globalThis.Object.keys(properties).filter((key) => !IsOptional3(properties[key]));
|
|
25547
|
+
}
|
|
25548
|
+
function _Object_2(properties, options) {
|
|
25549
|
+
const required = RequiredArray2(properties);
|
|
25550
|
+
const schema = required.length > 0 ? { [Kind2]: "Object", type: "object", required, properties } : { [Kind2]: "Object", type: "object", properties };
|
|
25551
|
+
return CreateType2(schema, options);
|
|
25552
|
+
}
|
|
25553
|
+
var Object3 = _Object_2;
|
|
25554
|
+
|
|
25555
|
+
// node_modules/@sinclair/typebox/build/esm/type/promise/promise.mjs
|
|
25556
|
+
function Promise3(item, options) {
|
|
25557
|
+
return CreateType2({ [Kind2]: "Promise", type: "Promise", item }, options);
|
|
25558
|
+
}
|
|
25559
|
+
|
|
25560
|
+
// node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.mjs
|
|
25561
|
+
function RemoveReadonly2(schema) {
|
|
25562
|
+
return CreateType2(Discard2(schema, [ReadonlyKind2]));
|
|
25563
|
+
}
|
|
25564
|
+
function AddReadonly2(schema) {
|
|
25565
|
+
return CreateType2({ ...schema, [ReadonlyKind2]: "Readonly" });
|
|
25566
|
+
}
|
|
25567
|
+
function ReadonlyWithFlag2(schema, F) {
|
|
25568
|
+
return F === false ? RemoveReadonly2(schema) : AddReadonly2(schema);
|
|
25569
|
+
}
|
|
25570
|
+
function Readonly2(schema, enable) {
|
|
25571
|
+
const F = enable ?? true;
|
|
25572
|
+
return IsMappedResult3(schema) ? ReadonlyFromMappedResult2(schema, F) : ReadonlyWithFlag2(schema, F);
|
|
25573
|
+
}
|
|
25574
|
+
|
|
25575
|
+
// node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs
|
|
25576
|
+
function FromProperties21(K, F) {
|
|
25577
|
+
const Acc = {};
|
|
25578
|
+
for (const K2 of globalThis.Object.getOwnPropertyNames(K))
|
|
25579
|
+
Acc[K2] = Readonly2(K[K2], F);
|
|
25580
|
+
return Acc;
|
|
25581
|
+
}
|
|
25582
|
+
function FromMappedResult14(R, F) {
|
|
25583
|
+
return FromProperties21(R.properties, F);
|
|
25584
|
+
}
|
|
25585
|
+
function ReadonlyFromMappedResult2(R, F) {
|
|
25586
|
+
const P = FromMappedResult14(R, F);
|
|
25587
|
+
return MappedResult2(P);
|
|
25588
|
+
}
|
|
25589
|
+
|
|
25590
|
+
// node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.mjs
|
|
25591
|
+
function Tuple2(types, options) {
|
|
25592
|
+
return CreateType2(types.length > 0 ? { [Kind2]: "Tuple", type: "array", items: types, additionalItems: false, minItems: types.length, maxItems: types.length } : { [Kind2]: "Tuple", type: "array", minItems: types.length, maxItems: types.length }, options);
|
|
25593
|
+
}
|
|
25594
|
+
|
|
25595
|
+
// node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.mjs
|
|
25596
|
+
function FromMappedResult15(K, P) {
|
|
25597
|
+
return K in P ? FromSchemaType2(K, P[K]) : MappedResult2(P);
|
|
25598
|
+
}
|
|
25599
|
+
function MappedKeyToKnownMappedResultProperties2(K) {
|
|
25600
|
+
return { [K]: Literal2(K) };
|
|
25601
|
+
}
|
|
25602
|
+
function MappedKeyToUnknownMappedResultProperties2(P) {
|
|
25603
|
+
const Acc = {};
|
|
25604
|
+
for (const L of P)
|
|
25605
|
+
Acc[L] = Literal2(L);
|
|
25606
|
+
return Acc;
|
|
25607
|
+
}
|
|
25608
|
+
function MappedKeyToMappedResultProperties2(K, P) {
|
|
25609
|
+
return SetIncludes2(P, K) ? MappedKeyToKnownMappedResultProperties2(K) : MappedKeyToUnknownMappedResultProperties2(P);
|
|
25610
|
+
}
|
|
25611
|
+
function FromMappedKey5(K, P) {
|
|
25612
|
+
const R = MappedKeyToMappedResultProperties2(K, P);
|
|
25613
|
+
return FromMappedResult15(K, R);
|
|
25614
|
+
}
|
|
25615
|
+
function FromRest9(K, T) {
|
|
25616
|
+
return T.map((L) => FromSchemaType2(K, L));
|
|
25617
|
+
}
|
|
25618
|
+
function FromProperties22(K, T) {
|
|
25619
|
+
const Acc = {};
|
|
25620
|
+
for (const K2 of globalThis.Object.getOwnPropertyNames(T))
|
|
25621
|
+
Acc[K2] = FromSchemaType2(K, T[K2]);
|
|
25622
|
+
return Acc;
|
|
25623
|
+
}
|
|
25624
|
+
function FromSchemaType2(K, T) {
|
|
25625
|
+
const options = { ...T };
|
|
25626
|
+
return IsOptional3(T) ? Optional2(FromSchemaType2(K, Discard2(T, [OptionalKind2]))) : IsReadonly2(T) ? Readonly2(FromSchemaType2(K, Discard2(T, [ReadonlyKind2]))) : IsMappedResult3(T) ? FromMappedResult15(K, T.properties) : IsMappedKey3(T) ? FromMappedKey5(K, T.keys) : IsConstructor3(T) ? Constructor2(FromRest9(K, T.parameters), FromSchemaType2(K, T.returns), options) : IsFunction6(T) ? Function3(FromRest9(K, T.parameters), FromSchemaType2(K, T.returns), options) : IsAsyncIterator6(T) ? AsyncIterator2(FromSchemaType2(K, T.items), options) : IsIterator6(T) ? Iterator2(FromSchemaType2(K, T.items), options) : IsIntersect3(T) ? Intersect3(FromRest9(K, T.allOf), options) : IsUnion3(T) ? Union3(FromRest9(K, T.anyOf), options) : IsTuple3(T) ? Tuple2(FromRest9(K, T.items ?? []), options) : IsObject7(T) ? Object3(FromProperties22(K, T.properties), options) : IsArray7(T) ? Array3(FromSchemaType2(K, T.items), options) : IsPromise4(T) ? Promise3(FromSchemaType2(K, T.item), options) : T;
|
|
25627
|
+
}
|
|
25628
|
+
function MappedFunctionReturnType2(K, T) {
|
|
25629
|
+
const Acc = {};
|
|
25630
|
+
for (const L of K)
|
|
25631
|
+
Acc[L] = FromSchemaType2(L, T);
|
|
25632
|
+
return Acc;
|
|
25633
|
+
}
|
|
25634
|
+
function Mapped2(key, map, options) {
|
|
25635
|
+
const K = IsSchema3(key) ? IndexPropertyKeys2(key) : key;
|
|
25636
|
+
const RT = map({ [Kind2]: "MappedKey", keys: K });
|
|
25637
|
+
const R = MappedFunctionReturnType2(K, RT);
|
|
25638
|
+
return Object3(R, options);
|
|
25639
|
+
}
|
|
25640
|
+
|
|
25641
|
+
// node_modules/@sinclair/typebox/build/esm/type/optional/optional.mjs
|
|
25642
|
+
function RemoveOptional2(schema) {
|
|
25643
|
+
return CreateType2(Discard2(schema, [OptionalKind2]));
|
|
25644
|
+
}
|
|
25645
|
+
function AddOptional2(schema) {
|
|
25646
|
+
return CreateType2({ ...schema, [OptionalKind2]: "Optional" });
|
|
25647
|
+
}
|
|
25648
|
+
function OptionalWithFlag2(schema, F) {
|
|
25649
|
+
return F === false ? RemoveOptional2(schema) : AddOptional2(schema);
|
|
25650
|
+
}
|
|
25651
|
+
function Optional2(schema, enable) {
|
|
25652
|
+
const F = enable ?? true;
|
|
25653
|
+
return IsMappedResult3(schema) ? OptionalFromMappedResult2(schema, F) : OptionalWithFlag2(schema, F);
|
|
25654
|
+
}
|
|
25655
|
+
|
|
25656
|
+
// node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs
|
|
25657
|
+
function FromProperties23(P, F) {
|
|
25658
|
+
const Acc = {};
|
|
25659
|
+
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
25660
|
+
Acc[K2] = Optional2(P[K2], F);
|
|
25661
|
+
return Acc;
|
|
25662
|
+
}
|
|
25663
|
+
function FromMappedResult16(R, F) {
|
|
25664
|
+
return FromProperties23(R.properties, F);
|
|
25665
|
+
}
|
|
25666
|
+
function OptionalFromMappedResult2(R, F) {
|
|
25667
|
+
const P = FromMappedResult16(R, F);
|
|
25668
|
+
return MappedResult2(P);
|
|
25669
|
+
}
|
|
25670
|
+
|
|
25671
|
+
// node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs
|
|
25672
|
+
function IntersectCreate2(T, options = {}) {
|
|
25673
|
+
const allObjects = T.every((schema) => IsObject7(schema));
|
|
25674
|
+
const clonedUnevaluatedProperties = IsSchema3(options.unevaluatedProperties) ? { unevaluatedProperties: options.unevaluatedProperties } : {};
|
|
25675
|
+
return CreateType2(options.unevaluatedProperties === false || IsSchema3(options.unevaluatedProperties) || allObjects ? { ...clonedUnevaluatedProperties, [Kind2]: "Intersect", type: "object", allOf: T } : { ...clonedUnevaluatedProperties, [Kind2]: "Intersect", allOf: T }, options);
|
|
25676
|
+
}
|
|
25677
|
+
|
|
25678
|
+
// node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs
|
|
25679
|
+
function IsIntersectOptional2(types) {
|
|
25680
|
+
return types.every((left) => IsOptional3(left));
|
|
25681
|
+
}
|
|
25682
|
+
function RemoveOptionalFromType4(type) {
|
|
25683
|
+
return Discard2(type, [OptionalKind2]);
|
|
25684
|
+
}
|
|
25685
|
+
function RemoveOptionalFromRest4(types) {
|
|
25686
|
+
return types.map((left) => IsOptional3(left) ? RemoveOptionalFromType4(left) : left);
|
|
25687
|
+
}
|
|
25688
|
+
function ResolveIntersect2(types, options) {
|
|
25689
|
+
return IsIntersectOptional2(types) ? Optional2(IntersectCreate2(RemoveOptionalFromRest4(types), options)) : IntersectCreate2(RemoveOptionalFromRest4(types), options);
|
|
25690
|
+
}
|
|
25691
|
+
function IntersectEvaluated2(types, options = {}) {
|
|
25692
|
+
if (types.length === 1)
|
|
25693
|
+
return CreateType2(types[0], options);
|
|
25694
|
+
if (types.length === 0)
|
|
25695
|
+
return Never2(options);
|
|
25696
|
+
if (types.some((schema) => IsTransform3(schema)))
|
|
25697
|
+
throw new Error("Cannot intersect transform types");
|
|
25698
|
+
return ResolveIntersect2(types, options);
|
|
25699
|
+
}
|
|
25700
|
+
|
|
25701
|
+
// node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.mjs
|
|
25702
|
+
function Intersect3(types, options) {
|
|
25703
|
+
if (types.length === 1)
|
|
25704
|
+
return CreateType2(types[0], options);
|
|
25705
|
+
if (types.length === 0)
|
|
25706
|
+
return Never2(options);
|
|
25707
|
+
if (types.some((schema) => IsTransform3(schema)))
|
|
25708
|
+
throw new Error("Cannot intersect transform types");
|
|
25709
|
+
return IntersectCreate2(types, options);
|
|
25710
|
+
}
|
|
25711
|
+
|
|
25712
|
+
// node_modules/@sinclair/typebox/build/esm/type/ref/ref.mjs
|
|
25713
|
+
function Ref2(...args) {
|
|
25714
|
+
const [$ref, options] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].$id, args[1]];
|
|
25715
|
+
if (typeof $ref !== "string")
|
|
25716
|
+
throw new TypeBoxError2("Ref: $ref must be a string");
|
|
25717
|
+
return CreateType2({ [Kind2]: "Ref", $ref }, options);
|
|
25718
|
+
}
|
|
25719
|
+
|
|
25720
|
+
// node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.mjs
|
|
25721
|
+
function FromComputed6(target, parameters) {
|
|
25722
|
+
return Computed2("Awaited", [Computed2(target, parameters)]);
|
|
25723
|
+
}
|
|
25724
|
+
function FromRef9($ref) {
|
|
25725
|
+
return Computed2("Awaited", [Ref2($ref)]);
|
|
25726
|
+
}
|
|
25727
|
+
function FromIntersect14(types) {
|
|
25728
|
+
return Intersect3(FromRest10(types));
|
|
25729
|
+
}
|
|
25730
|
+
function FromUnion18(types) {
|
|
25731
|
+
return Union3(FromRest10(types));
|
|
25732
|
+
}
|
|
25733
|
+
function FromPromise7(type) {
|
|
25734
|
+
return Awaited2(type);
|
|
25735
|
+
}
|
|
25736
|
+
function FromRest10(types) {
|
|
25737
|
+
return types.map((type) => Awaited2(type));
|
|
25738
|
+
}
|
|
25739
|
+
function Awaited2(type, options) {
|
|
25740
|
+
return CreateType2(IsComputed3(type) ? FromComputed6(type.target, type.parameters) : IsIntersect3(type) ? FromIntersect14(type.allOf) : IsUnion3(type) ? FromUnion18(type.anyOf) : IsPromise4(type) ? FromPromise7(type.item) : IsRef3(type) ? FromRef9(type.$ref) : type, options);
|
|
25741
|
+
}
|
|
25742
|
+
|
|
25743
|
+
// node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs
|
|
25744
|
+
function FromRest11(types) {
|
|
25745
|
+
const result = [];
|
|
25746
|
+
for (const L of types)
|
|
25747
|
+
result.push(KeyOfPropertyKeys2(L));
|
|
25748
|
+
return result;
|
|
25749
|
+
}
|
|
25750
|
+
function FromIntersect15(types) {
|
|
25751
|
+
const propertyKeysArray = FromRest11(types);
|
|
25752
|
+
const propertyKeys = SetUnionMany2(propertyKeysArray);
|
|
25753
|
+
return propertyKeys;
|
|
25754
|
+
}
|
|
25755
|
+
function FromUnion19(types) {
|
|
25756
|
+
const propertyKeysArray = FromRest11(types);
|
|
25757
|
+
const propertyKeys = SetIntersectMany2(propertyKeysArray);
|
|
25758
|
+
return propertyKeys;
|
|
25759
|
+
}
|
|
25760
|
+
function FromTuple11(types) {
|
|
25761
|
+
return types.map((_, indexer) => indexer.toString());
|
|
25762
|
+
}
|
|
25763
|
+
function FromArray12(_) {
|
|
25764
|
+
return ["[number]"];
|
|
25765
|
+
}
|
|
25766
|
+
function FromProperties24(T) {
|
|
25767
|
+
return globalThis.Object.getOwnPropertyNames(T);
|
|
25768
|
+
}
|
|
25769
|
+
function FromPatternProperties2(patternProperties) {
|
|
25770
|
+
if (!includePatternProperties2)
|
|
25771
|
+
return [];
|
|
25772
|
+
const patternPropertyKeys = globalThis.Object.getOwnPropertyNames(patternProperties);
|
|
25773
|
+
return patternPropertyKeys.map((key) => {
|
|
25774
|
+
return key[0] === "^" && key[key.length - 1] === "$" ? key.slice(1, key.length - 1) : key;
|
|
25775
|
+
});
|
|
25776
|
+
}
|
|
25777
|
+
function KeyOfPropertyKeys2(type) {
|
|
25778
|
+
return IsIntersect3(type) ? FromIntersect15(type.allOf) : IsUnion3(type) ? FromUnion19(type.anyOf) : IsTuple3(type) ? FromTuple11(type.items ?? []) : IsArray7(type) ? FromArray12(type.items) : IsObject7(type) ? FromProperties24(type.properties) : IsRecord3(type) ? FromPatternProperties2(type.patternProperties) : [];
|
|
25779
|
+
}
|
|
25780
|
+
var includePatternProperties2 = false;
|
|
25781
|
+
|
|
25782
|
+
// node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.mjs
|
|
25783
|
+
function FromComputed7(target, parameters) {
|
|
25784
|
+
return Computed2("KeyOf", [Computed2(target, parameters)]);
|
|
25785
|
+
}
|
|
25786
|
+
function FromRef10($ref) {
|
|
25787
|
+
return Computed2("KeyOf", [Ref2($ref)]);
|
|
25788
|
+
}
|
|
25789
|
+
function KeyOfFromType2(type, options) {
|
|
25790
|
+
const propertyKeys = KeyOfPropertyKeys2(type);
|
|
25791
|
+
const propertyKeyTypes = KeyOfPropertyKeysToRest2(propertyKeys);
|
|
25792
|
+
const result = UnionEvaluated2(propertyKeyTypes);
|
|
25793
|
+
return CreateType2(result, options);
|
|
25794
|
+
}
|
|
25795
|
+
function KeyOfPropertyKeysToRest2(propertyKeys) {
|
|
25796
|
+
return propertyKeys.map((L) => L === "[number]" ? Number3() : Literal2(L));
|
|
25797
|
+
}
|
|
25798
|
+
function KeyOf2(type, options) {
|
|
25799
|
+
return IsComputed3(type) ? FromComputed7(type.target, type.parameters) : IsRef3(type) ? FromRef10(type.$ref) : IsMappedResult3(type) ? KeyOfFromMappedResult2(type, options) : KeyOfFromType2(type, options);
|
|
25800
|
+
}
|
|
25801
|
+
|
|
25802
|
+
// node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs
|
|
25803
|
+
function FromProperties25(properties, options) {
|
|
25804
|
+
const result = {};
|
|
25805
|
+
for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
|
|
25806
|
+
result[K2] = KeyOf2(properties[K2], Clone2(options));
|
|
25807
|
+
return result;
|
|
25808
|
+
}
|
|
25809
|
+
function FromMappedResult17(mappedResult, options) {
|
|
25810
|
+
return FromProperties25(mappedResult.properties, options);
|
|
25811
|
+
}
|
|
25812
|
+
function KeyOfFromMappedResult2(mappedResult, options) {
|
|
25813
|
+
const properties = FromMappedResult17(mappedResult, options);
|
|
25814
|
+
return MappedResult2(properties);
|
|
25815
|
+
}
|
|
25816
|
+
|
|
25817
|
+
// node_modules/@sinclair/typebox/build/esm/type/composite/composite.mjs
|
|
25818
|
+
function CompositeKeys2(T) {
|
|
25819
|
+
const Acc = [];
|
|
25820
|
+
for (const L of T)
|
|
25821
|
+
Acc.push(...KeyOfPropertyKeys2(L));
|
|
25822
|
+
return SetDistinct2(Acc);
|
|
25823
|
+
}
|
|
25824
|
+
function FilterNever2(T) {
|
|
25825
|
+
return T.filter((L) => !IsNever3(L));
|
|
25826
|
+
}
|
|
25827
|
+
function CompositeProperty2(T, K) {
|
|
25828
|
+
const Acc = [];
|
|
25829
|
+
for (const L of T)
|
|
25830
|
+
Acc.push(...IndexFromPropertyKeys2(L, [K]));
|
|
25831
|
+
return FilterNever2(Acc);
|
|
25832
|
+
}
|
|
25833
|
+
function CompositeProperties2(T, K) {
|
|
25834
|
+
const Acc = {};
|
|
25835
|
+
for (const L of K) {
|
|
25836
|
+
Acc[L] = IntersectEvaluated2(CompositeProperty2(T, L));
|
|
25837
|
+
}
|
|
25838
|
+
return Acc;
|
|
25839
|
+
}
|
|
25840
|
+
function Composite2(T, options) {
|
|
25841
|
+
const K = CompositeKeys2(T);
|
|
25842
|
+
const P = CompositeProperties2(T, K);
|
|
25843
|
+
const R = Object3(P, options);
|
|
25844
|
+
return R;
|
|
25845
|
+
}
|
|
25846
|
+
|
|
25847
|
+
// node_modules/@sinclair/typebox/build/esm/type/date/date.mjs
|
|
25848
|
+
function Date3(options) {
|
|
25849
|
+
return CreateType2({ [Kind2]: "Date", type: "Date" }, options);
|
|
25850
|
+
}
|
|
25851
|
+
|
|
25852
|
+
// node_modules/@sinclair/typebox/build/esm/type/null/null.mjs
|
|
25853
|
+
function Null2(options) {
|
|
25854
|
+
return CreateType2({ [Kind2]: "Null", type: "null" }, options);
|
|
25855
|
+
}
|
|
25856
|
+
|
|
25857
|
+
// node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.mjs
|
|
25858
|
+
function Symbol3(options) {
|
|
25859
|
+
return CreateType2({ [Kind2]: "Symbol", type: "symbol" }, options);
|
|
25860
|
+
}
|
|
25861
|
+
|
|
25862
|
+
// node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.mjs
|
|
25863
|
+
function Undefined2(options) {
|
|
25864
|
+
return CreateType2({ [Kind2]: "Undefined", type: "undefined" }, options);
|
|
25865
|
+
}
|
|
25866
|
+
|
|
25867
|
+
// node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs
|
|
25868
|
+
function Uint8Array3(options) {
|
|
25869
|
+
return CreateType2({ [Kind2]: "Uint8Array", type: "Uint8Array" }, options);
|
|
25870
|
+
}
|
|
25871
|
+
|
|
25872
|
+
// node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.mjs
|
|
25873
|
+
function Unknown2(options) {
|
|
25874
|
+
return CreateType2({ [Kind2]: "Unknown" }, options);
|
|
25875
|
+
}
|
|
25876
|
+
|
|
25877
|
+
// node_modules/@sinclair/typebox/build/esm/type/const/const.mjs
|
|
25878
|
+
function FromArray13(T) {
|
|
25879
|
+
return T.map((L) => FromValue2(L, false));
|
|
25880
|
+
}
|
|
25881
|
+
function FromProperties26(value) {
|
|
25882
|
+
const Acc = {};
|
|
25883
|
+
for (const K of globalThis.Object.getOwnPropertyNames(value))
|
|
25884
|
+
Acc[K] = Readonly2(FromValue2(value[K], false));
|
|
25885
|
+
return Acc;
|
|
25886
|
+
}
|
|
25887
|
+
function ConditionalReadonly2(T, root) {
|
|
25888
|
+
return root === true ? T : Readonly2(T);
|
|
25889
|
+
}
|
|
25890
|
+
function FromValue2(value, root) {
|
|
25891
|
+
return IsAsyncIterator5(value) ? ConditionalReadonly2(Any2(), root) : IsIterator5(value) ? ConditionalReadonly2(Any2(), root) : IsArray5(value) ? Readonly2(Tuple2(FromArray13(value))) : IsUint8Array5(value) ? Uint8Array3() : IsDate5(value) ? Date3() : IsObject5(value) ? ConditionalReadonly2(Object3(FromProperties26(value)), root) : IsFunction5(value) ? ConditionalReadonly2(Function3([], Unknown2()), root) : IsUndefined5(value) ? Undefined2() : IsNull5(value) ? Null2() : IsSymbol5(value) ? Symbol3() : IsBigInt5(value) ? BigInt3() : IsNumber5(value) ? Literal2(value) : IsBoolean5(value) ? Literal2(value) : IsString5(value) ? Literal2(value) : Object3({});
|
|
25892
|
+
}
|
|
25893
|
+
function Const2(T, options) {
|
|
25894
|
+
return CreateType2(FromValue2(T, true), options);
|
|
25895
|
+
}
|
|
25896
|
+
|
|
25897
|
+
// node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs
|
|
25898
|
+
function ConstructorParameters2(schema, options) {
|
|
25899
|
+
return IsConstructor3(schema) ? Tuple2(schema.parameters, options) : Never2(options);
|
|
25900
|
+
}
|
|
25901
|
+
|
|
25902
|
+
// node_modules/@sinclair/typebox/build/esm/type/enum/enum.mjs
|
|
25903
|
+
function Enum2(item, options) {
|
|
25904
|
+
if (IsUndefined5(item))
|
|
25905
|
+
throw new Error("Enum undefined or empty");
|
|
25906
|
+
const values1 = globalThis.Object.getOwnPropertyNames(item).filter((key) => isNaN(key)).map((key) => item[key]);
|
|
25907
|
+
const values2 = [...new Set(values1)];
|
|
25908
|
+
const anyOf = values2.map((value) => Literal2(value));
|
|
25909
|
+
return Union3(anyOf, { ...options, [Hint2]: "Enum" });
|
|
25910
|
+
}
|
|
25911
|
+
|
|
25912
|
+
// node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.mjs
|
|
25913
|
+
class ExtendsResolverError2 extends TypeBoxError2 {
|
|
25914
|
+
}
|
|
25915
|
+
var ExtendsResult2;
|
|
25916
|
+
(function(ExtendsResult) {
|
|
25917
|
+
ExtendsResult[ExtendsResult["Union"] = 0] = "Union";
|
|
25918
|
+
ExtendsResult[ExtendsResult["True"] = 1] = "True";
|
|
25919
|
+
ExtendsResult[ExtendsResult["False"] = 2] = "False";
|
|
25920
|
+
})(ExtendsResult2 || (ExtendsResult2 = {}));
|
|
25921
|
+
function IntoBooleanResult2(result) {
|
|
25922
|
+
return result === ExtendsResult2.False ? result : ExtendsResult2.True;
|
|
25923
|
+
}
|
|
25924
|
+
function Throw2(message) {
|
|
25925
|
+
throw new ExtendsResolverError2(message);
|
|
25926
|
+
}
|
|
25927
|
+
function IsStructuralRight2(right) {
|
|
25928
|
+
return IsNever4(right) || IsIntersect4(right) || IsUnion4(right) || IsUnknown4(right) || IsAny4(right);
|
|
25929
|
+
}
|
|
25930
|
+
function StructuralRight2(left, right) {
|
|
25931
|
+
return IsNever4(right) ? FromNeverRight2(left, right) : IsIntersect4(right) ? FromIntersectRight2(left, right) : IsUnion4(right) ? FromUnionRight2(left, right) : IsUnknown4(right) ? FromUnknownRight2(left, right) : IsAny4(right) ? FromAnyRight2(left, right) : Throw2("StructuralRight");
|
|
25932
|
+
}
|
|
25933
|
+
function FromAnyRight2(left, right) {
|
|
25934
|
+
return ExtendsResult2.True;
|
|
25935
|
+
}
|
|
25936
|
+
function FromAny4(left, right) {
|
|
25937
|
+
return IsIntersect4(right) ? FromIntersectRight2(left, right) : IsUnion4(right) && right.anyOf.some((schema) => IsAny4(schema) || IsUnknown4(schema)) ? ExtendsResult2.True : IsUnion4(right) ? ExtendsResult2.Union : IsUnknown4(right) ? ExtendsResult2.True : IsAny4(right) ? ExtendsResult2.True : ExtendsResult2.Union;
|
|
25938
|
+
}
|
|
25939
|
+
function FromArrayRight2(left, right) {
|
|
25940
|
+
return IsUnknown4(left) ? ExtendsResult2.False : IsAny4(left) ? ExtendsResult2.Union : IsNever4(left) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
25941
|
+
}
|
|
25942
|
+
function FromArray14(left, right) {
|
|
25943
|
+
return IsObject8(right) && IsObjectArrayLike2(right) ? ExtendsResult2.True : IsStructuralRight2(right) ? StructuralRight2(left, right) : !IsArray8(right) ? ExtendsResult2.False : IntoBooleanResult2(Visit11(left.items, right.items));
|
|
25944
|
+
}
|
|
25945
|
+
function FromAsyncIterator7(left, right) {
|
|
25946
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : !IsAsyncIterator7(right) ? ExtendsResult2.False : IntoBooleanResult2(Visit11(left.items, right.items));
|
|
25947
|
+
}
|
|
25948
|
+
function FromBigInt4(left, right) {
|
|
25949
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsRecord4(right) ? FromRecordRight2(left, right) : IsBigInt7(right) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
25950
|
+
}
|
|
25951
|
+
function FromBooleanRight2(left, right) {
|
|
25952
|
+
return IsLiteralBoolean2(left) ? ExtendsResult2.True : IsBoolean7(left) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
25953
|
+
}
|
|
25954
|
+
function FromBoolean4(left, right) {
|
|
25955
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsRecord4(right) ? FromRecordRight2(left, right) : IsBoolean7(right) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
25956
|
+
}
|
|
25957
|
+
function FromConstructor7(left, right) {
|
|
25958
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : !IsConstructor4(right) ? ExtendsResult2.False : left.parameters.length > right.parameters.length ? ExtendsResult2.False : !left.parameters.every((schema, index) => IntoBooleanResult2(Visit11(right.parameters[index], schema)) === ExtendsResult2.True) ? ExtendsResult2.False : IntoBooleanResult2(Visit11(left.returns, right.returns));
|
|
25959
|
+
}
|
|
25960
|
+
function FromDate4(left, right) {
|
|
25961
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsRecord4(right) ? FromRecordRight2(left, right) : IsDate7(right) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
25962
|
+
}
|
|
25963
|
+
function FromFunction7(left, right) {
|
|
25964
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : !IsFunction7(right) ? ExtendsResult2.False : left.parameters.length > right.parameters.length ? ExtendsResult2.False : !left.parameters.every((schema, index) => IntoBooleanResult2(Visit11(right.parameters[index], schema)) === ExtendsResult2.True) ? ExtendsResult2.False : IntoBooleanResult2(Visit11(left.returns, right.returns));
|
|
25965
|
+
}
|
|
25966
|
+
function FromIntegerRight2(left, right) {
|
|
25967
|
+
return IsLiteral4(left) && IsNumber5(left.const) ? ExtendsResult2.True : IsNumber8(left) || IsInteger5(left) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
25968
|
+
}
|
|
25969
|
+
function FromInteger4(left, right) {
|
|
25970
|
+
return IsInteger5(right) || IsNumber8(right) ? ExtendsResult2.True : IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsRecord4(right) ? FromRecordRight2(left, right) : ExtendsResult2.False;
|
|
25971
|
+
}
|
|
25972
|
+
function FromIntersectRight2(left, right) {
|
|
25973
|
+
return right.allOf.every((schema) => Visit11(left, schema) === ExtendsResult2.True) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
25974
|
+
}
|
|
25975
|
+
function FromIntersect16(left, right) {
|
|
25976
|
+
return left.allOf.some((schema) => Visit11(schema, right) === ExtendsResult2.True) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
25977
|
+
}
|
|
25978
|
+
function FromIterator7(left, right) {
|
|
25979
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : !IsIterator7(right) ? ExtendsResult2.False : IntoBooleanResult2(Visit11(left.items, right.items));
|
|
25980
|
+
}
|
|
25981
|
+
function FromLiteral6(left, right) {
|
|
25982
|
+
return IsLiteral4(right) && right.const === left.const ? ExtendsResult2.True : IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsRecord4(right) ? FromRecordRight2(left, right) : IsString7(right) ? FromStringRight2(left, right) : IsNumber8(right) ? FromNumberRight2(left, right) : IsInteger5(right) ? FromIntegerRight2(left, right) : IsBoolean7(right) ? FromBooleanRight2(left, right) : ExtendsResult2.False;
|
|
25983
|
+
}
|
|
25984
|
+
function FromNeverRight2(left, right) {
|
|
25985
|
+
return ExtendsResult2.False;
|
|
25986
|
+
}
|
|
25987
|
+
function FromNever4(left, right) {
|
|
25988
|
+
return ExtendsResult2.True;
|
|
25989
|
+
}
|
|
25990
|
+
function UnwrapTNot2(schema) {
|
|
25991
|
+
let [current, depth] = [schema, 0];
|
|
25992
|
+
while (true) {
|
|
25993
|
+
if (!IsNot4(current))
|
|
25994
|
+
break;
|
|
25995
|
+
current = current.not;
|
|
25996
|
+
depth += 1;
|
|
25997
|
+
}
|
|
25998
|
+
return depth % 2 === 0 ? current : Unknown2();
|
|
25999
|
+
}
|
|
26000
|
+
function FromNot6(left, right) {
|
|
26001
|
+
return IsNot4(left) ? Visit11(UnwrapTNot2(left), right) : IsNot4(right) ? Visit11(left, UnwrapTNot2(right)) : Throw2("Invalid fallthrough for Not");
|
|
26002
|
+
}
|
|
26003
|
+
function FromNull4(left, right) {
|
|
26004
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsRecord4(right) ? FromRecordRight2(left, right) : IsNull7(right) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26005
|
+
}
|
|
26006
|
+
function FromNumberRight2(left, right) {
|
|
26007
|
+
return IsLiteralNumber2(left) ? ExtendsResult2.True : IsNumber8(left) || IsInteger5(left) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26008
|
+
}
|
|
26009
|
+
function FromNumber4(left, right) {
|
|
26010
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsRecord4(right) ? FromRecordRight2(left, right) : IsInteger5(right) || IsNumber8(right) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26011
|
+
}
|
|
26012
|
+
function IsObjectPropertyCount2(schema, count) {
|
|
26013
|
+
return Object.getOwnPropertyNames(schema.properties).length === count;
|
|
26014
|
+
}
|
|
26015
|
+
function IsObjectStringLike2(schema) {
|
|
26016
|
+
return IsObjectArrayLike2(schema);
|
|
26017
|
+
}
|
|
26018
|
+
function IsObjectSymbolLike2(schema) {
|
|
26019
|
+
return IsObjectPropertyCount2(schema, 0) || IsObjectPropertyCount2(schema, 1) && "description" in schema.properties && IsUnion4(schema.properties.description) && schema.properties.description.anyOf.length === 2 && (IsString7(schema.properties.description.anyOf[0]) && IsUndefined8(schema.properties.description.anyOf[1]) || IsString7(schema.properties.description.anyOf[1]) && IsUndefined8(schema.properties.description.anyOf[0]));
|
|
26020
|
+
}
|
|
26021
|
+
function IsObjectNumberLike2(schema) {
|
|
26022
|
+
return IsObjectPropertyCount2(schema, 0);
|
|
26023
|
+
}
|
|
26024
|
+
function IsObjectBooleanLike2(schema) {
|
|
26025
|
+
return IsObjectPropertyCount2(schema, 0);
|
|
26026
|
+
}
|
|
26027
|
+
function IsObjectBigIntLike2(schema) {
|
|
26028
|
+
return IsObjectPropertyCount2(schema, 0);
|
|
26029
|
+
}
|
|
26030
|
+
function IsObjectDateLike2(schema) {
|
|
26031
|
+
return IsObjectPropertyCount2(schema, 0);
|
|
26032
|
+
}
|
|
26033
|
+
function IsObjectUint8ArrayLike2(schema) {
|
|
26034
|
+
return IsObjectArrayLike2(schema);
|
|
26035
|
+
}
|
|
26036
|
+
function IsObjectFunctionLike2(schema) {
|
|
26037
|
+
const length = Number3();
|
|
26038
|
+
return IsObjectPropertyCount2(schema, 0) || IsObjectPropertyCount2(schema, 1) && "length" in schema.properties && IntoBooleanResult2(Visit11(schema.properties["length"], length)) === ExtendsResult2.True;
|
|
26039
|
+
}
|
|
26040
|
+
function IsObjectConstructorLike2(schema) {
|
|
26041
|
+
return IsObjectPropertyCount2(schema, 0);
|
|
26042
|
+
}
|
|
26043
|
+
function IsObjectArrayLike2(schema) {
|
|
26044
|
+
const length = Number3();
|
|
26045
|
+
return IsObjectPropertyCount2(schema, 0) || IsObjectPropertyCount2(schema, 1) && "length" in schema.properties && IntoBooleanResult2(Visit11(schema.properties["length"], length)) === ExtendsResult2.True;
|
|
26046
|
+
}
|
|
26047
|
+
function IsObjectPromiseLike2(schema) {
|
|
26048
|
+
const then = Function3([Any2()], Any2());
|
|
26049
|
+
return IsObjectPropertyCount2(schema, 0) || IsObjectPropertyCount2(schema, 1) && "then" in schema.properties && IntoBooleanResult2(Visit11(schema.properties["then"], then)) === ExtendsResult2.True;
|
|
26050
|
+
}
|
|
26051
|
+
function Property2(left, right) {
|
|
26052
|
+
return Visit11(left, right) === ExtendsResult2.False ? ExtendsResult2.False : IsOptional4(left) && !IsOptional4(right) ? ExtendsResult2.False : ExtendsResult2.True;
|
|
26053
|
+
}
|
|
26054
|
+
function FromObjectRight2(left, right) {
|
|
26055
|
+
return IsUnknown4(left) ? ExtendsResult2.False : IsAny4(left) ? ExtendsResult2.Union : IsNever4(left) || IsLiteralString2(left) && IsObjectStringLike2(right) || IsLiteralNumber2(left) && IsObjectNumberLike2(right) || IsLiteralBoolean2(left) && IsObjectBooleanLike2(right) || IsSymbol7(left) && IsObjectSymbolLike2(right) || IsBigInt7(left) && IsObjectBigIntLike2(right) || IsString7(left) && IsObjectStringLike2(right) || IsSymbol7(left) && IsObjectSymbolLike2(right) || IsNumber8(left) && IsObjectNumberLike2(right) || IsInteger5(left) && IsObjectNumberLike2(right) || IsBoolean7(left) && IsObjectBooleanLike2(right) || IsUint8Array7(left) && IsObjectUint8ArrayLike2(right) || IsDate7(left) && IsObjectDateLike2(right) || IsConstructor4(left) && IsObjectConstructorLike2(right) || IsFunction7(left) && IsObjectFunctionLike2(right) ? ExtendsResult2.True : IsRecord4(left) && IsString7(RecordKey3(left)) ? (() => {
|
|
26056
|
+
return right[Hint2] === "Record" ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26057
|
+
})() : IsRecord4(left) && IsNumber8(RecordKey3(left)) ? (() => {
|
|
26058
|
+
return IsObjectPropertyCount2(right, 0) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26059
|
+
})() : ExtendsResult2.False;
|
|
26060
|
+
}
|
|
26061
|
+
function FromObject12(left, right) {
|
|
26062
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsRecord4(right) ? FromRecordRight2(left, right) : !IsObject8(right) ? ExtendsResult2.False : (() => {
|
|
26063
|
+
for (const key of Object.getOwnPropertyNames(right.properties)) {
|
|
26064
|
+
if (!(key in left.properties) && !IsOptional4(right.properties[key])) {
|
|
26065
|
+
return ExtendsResult2.False;
|
|
26066
|
+
}
|
|
26067
|
+
if (IsOptional4(right.properties[key])) {
|
|
26068
|
+
return ExtendsResult2.True;
|
|
26069
|
+
}
|
|
26070
|
+
if (Property2(left.properties[key], right.properties[key]) === ExtendsResult2.False) {
|
|
26071
|
+
return ExtendsResult2.False;
|
|
26072
|
+
}
|
|
26073
|
+
}
|
|
26074
|
+
return ExtendsResult2.True;
|
|
26075
|
+
})();
|
|
26076
|
+
}
|
|
26077
|
+
function FromPromise8(left, right) {
|
|
26078
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) && IsObjectPromiseLike2(right) ? ExtendsResult2.True : !IsPromise5(right) ? ExtendsResult2.False : IntoBooleanResult2(Visit11(left.item, right.item));
|
|
26079
|
+
}
|
|
26080
|
+
function RecordKey3(schema) {
|
|
26081
|
+
return PatternNumberExact2 in schema.patternProperties ? Number3() : (PatternStringExact2 in schema.patternProperties) ? String3() : Throw2("Unknown record key pattern");
|
|
26082
|
+
}
|
|
26083
|
+
function RecordValue3(schema) {
|
|
26084
|
+
return PatternNumberExact2 in schema.patternProperties ? schema.patternProperties[PatternNumberExact2] : (PatternStringExact2 in schema.patternProperties) ? schema.patternProperties[PatternStringExact2] : Throw2("Unable to get record value schema");
|
|
26085
|
+
}
|
|
26086
|
+
function FromRecordRight2(left, right) {
|
|
26087
|
+
const [Key, Value] = [RecordKey3(right), RecordValue3(right)];
|
|
26088
|
+
return IsLiteralString2(left) && IsNumber8(Key) && IntoBooleanResult2(Visit11(left, Value)) === ExtendsResult2.True ? ExtendsResult2.True : IsUint8Array7(left) && IsNumber8(Key) ? Visit11(left, Value) : IsString7(left) && IsNumber8(Key) ? Visit11(left, Value) : IsArray8(left) && IsNumber8(Key) ? Visit11(left, Value) : IsObject8(left) ? (() => {
|
|
26089
|
+
for (const key of Object.getOwnPropertyNames(left.properties)) {
|
|
26090
|
+
if (Property2(Value, left.properties[key]) === ExtendsResult2.False) {
|
|
26091
|
+
return ExtendsResult2.False;
|
|
26092
|
+
}
|
|
26093
|
+
}
|
|
26094
|
+
return ExtendsResult2.True;
|
|
26095
|
+
})() : ExtendsResult2.False;
|
|
26096
|
+
}
|
|
26097
|
+
function FromRecord8(left, right) {
|
|
26098
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : !IsRecord4(right) ? ExtendsResult2.False : Visit11(RecordValue3(left), RecordValue3(right));
|
|
26099
|
+
}
|
|
26100
|
+
function FromRegExp4(left, right) {
|
|
26101
|
+
const L = IsRegExp6(left) ? String3() : left;
|
|
26102
|
+
const R = IsRegExp6(right) ? String3() : right;
|
|
26103
|
+
return Visit11(L, R);
|
|
26104
|
+
}
|
|
26105
|
+
function FromStringRight2(left, right) {
|
|
26106
|
+
return IsLiteral4(left) && IsString5(left.const) ? ExtendsResult2.True : IsString7(left) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26107
|
+
}
|
|
26108
|
+
function FromString4(left, right) {
|
|
26109
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsRecord4(right) ? FromRecordRight2(left, right) : IsString7(right) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26110
|
+
}
|
|
26111
|
+
function FromSymbol4(left, right) {
|
|
26112
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsRecord4(right) ? FromRecordRight2(left, right) : IsSymbol7(right) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26113
|
+
}
|
|
26114
|
+
function FromTemplateLiteral7(left, right) {
|
|
26115
|
+
return IsTemplateLiteral4(left) ? Visit11(TemplateLiteralToUnion2(left), right) : IsTemplateLiteral4(right) ? Visit11(left, TemplateLiteralToUnion2(right)) : Throw2("Invalid fallthrough for TemplateLiteral");
|
|
26116
|
+
}
|
|
26117
|
+
function IsArrayOfTuple2(left, right) {
|
|
26118
|
+
return IsArray8(right) && left.items !== undefined && left.items.every((schema) => Visit11(schema, right.items) === ExtendsResult2.True);
|
|
26119
|
+
}
|
|
26120
|
+
function FromTupleRight2(left, right) {
|
|
26121
|
+
return IsNever4(left) ? ExtendsResult2.True : IsUnknown4(left) ? ExtendsResult2.False : IsAny4(left) ? ExtendsResult2.Union : ExtendsResult2.False;
|
|
26122
|
+
}
|
|
26123
|
+
function FromTuple12(left, right) {
|
|
26124
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) && IsObjectArrayLike2(right) ? ExtendsResult2.True : IsArray8(right) && IsArrayOfTuple2(left, right) ? ExtendsResult2.True : !IsTuple4(right) ? ExtendsResult2.False : IsUndefined5(left.items) && !IsUndefined5(right.items) || !IsUndefined5(left.items) && IsUndefined5(right.items) ? ExtendsResult2.False : IsUndefined5(left.items) && !IsUndefined5(right.items) ? ExtendsResult2.True : left.items.every((schema, index) => Visit11(schema, right.items[index]) === ExtendsResult2.True) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26125
|
+
}
|
|
26126
|
+
function FromUint8Array4(left, right) {
|
|
26127
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsRecord4(right) ? FromRecordRight2(left, right) : IsUint8Array7(right) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26128
|
+
}
|
|
26129
|
+
function FromUndefined4(left, right) {
|
|
26130
|
+
return IsStructuralRight2(right) ? StructuralRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsRecord4(right) ? FromRecordRight2(left, right) : IsVoid4(right) ? FromVoidRight2(left, right) : IsUndefined8(right) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26131
|
+
}
|
|
26132
|
+
function FromUnionRight2(left, right) {
|
|
26133
|
+
return right.anyOf.some((schema) => Visit11(left, schema) === ExtendsResult2.True) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26134
|
+
}
|
|
26135
|
+
function FromUnion20(left, right) {
|
|
26136
|
+
return left.anyOf.every((schema) => Visit11(schema, right) === ExtendsResult2.True) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26137
|
+
}
|
|
26138
|
+
function FromUnknownRight2(left, right) {
|
|
26139
|
+
return ExtendsResult2.True;
|
|
26140
|
+
}
|
|
26141
|
+
function FromUnknown4(left, right) {
|
|
26142
|
+
return IsNever4(right) ? FromNeverRight2(left, right) : IsIntersect4(right) ? FromIntersectRight2(left, right) : IsUnion4(right) ? FromUnionRight2(left, right) : IsAny4(right) ? FromAnyRight2(left, right) : IsString7(right) ? FromStringRight2(left, right) : IsNumber8(right) ? FromNumberRight2(left, right) : IsInteger5(right) ? FromIntegerRight2(left, right) : IsBoolean7(right) ? FromBooleanRight2(left, right) : IsArray8(right) ? FromArrayRight2(left, right) : IsTuple4(right) ? FromTupleRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsUnknown4(right) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26143
|
+
}
|
|
26144
|
+
function FromVoidRight2(left, right) {
|
|
26145
|
+
return IsUndefined8(left) ? ExtendsResult2.True : IsUndefined8(left) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26146
|
+
}
|
|
26147
|
+
function FromVoid4(left, right) {
|
|
26148
|
+
return IsIntersect4(right) ? FromIntersectRight2(left, right) : IsUnion4(right) ? FromUnionRight2(left, right) : IsUnknown4(right) ? FromUnknownRight2(left, right) : IsAny4(right) ? FromAnyRight2(left, right) : IsObject8(right) ? FromObjectRight2(left, right) : IsVoid4(right) ? ExtendsResult2.True : ExtendsResult2.False;
|
|
26149
|
+
}
|
|
26150
|
+
function Visit11(left, right) {
|
|
26151
|
+
return IsTemplateLiteral4(left) || IsTemplateLiteral4(right) ? FromTemplateLiteral7(left, right) : IsRegExp6(left) || IsRegExp6(right) ? FromRegExp4(left, right) : IsNot4(left) || IsNot4(right) ? FromNot6(left, right) : IsAny4(left) ? FromAny4(left, right) : IsArray8(left) ? FromArray14(left, right) : IsBigInt7(left) ? FromBigInt4(left, right) : IsBoolean7(left) ? FromBoolean4(left, right) : IsAsyncIterator7(left) ? FromAsyncIterator7(left, right) : IsConstructor4(left) ? FromConstructor7(left, right) : IsDate7(left) ? FromDate4(left, right) : IsFunction7(left) ? FromFunction7(left, right) : IsInteger5(left) ? FromInteger4(left, right) : IsIntersect4(left) ? FromIntersect16(left, right) : IsIterator7(left) ? FromIterator7(left, right) : IsLiteral4(left) ? FromLiteral6(left, right) : IsNever4(left) ? FromNever4(left, right) : IsNull7(left) ? FromNull4(left, right) : IsNumber8(left) ? FromNumber4(left, right) : IsObject8(left) ? FromObject12(left, right) : IsRecord4(left) ? FromRecord8(left, right) : IsString7(left) ? FromString4(left, right) : IsSymbol7(left) ? FromSymbol4(left, right) : IsTuple4(left) ? FromTuple12(left, right) : IsPromise5(left) ? FromPromise8(left, right) : IsUint8Array7(left) ? FromUint8Array4(left, right) : IsUndefined8(left) ? FromUndefined4(left, right) : IsUnion4(left) ? FromUnion20(left, right) : IsUnknown4(left) ? FromUnknown4(left, right) : IsVoid4(left) ? FromVoid4(left, right) : Throw2(`Unknown left type operand '${left[Kind2]}'`);
|
|
26152
|
+
}
|
|
26153
|
+
function ExtendsCheck2(left, right) {
|
|
26154
|
+
return Visit11(left, right);
|
|
26155
|
+
}
|
|
26156
|
+
|
|
26157
|
+
// node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs
|
|
26158
|
+
function FromProperties27(P, Right, True, False, options) {
|
|
26159
|
+
const Acc = {};
|
|
26160
|
+
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
26161
|
+
Acc[K2] = Extends2(P[K2], Right, True, False, Clone2(options));
|
|
26162
|
+
return Acc;
|
|
26163
|
+
}
|
|
26164
|
+
function FromMappedResult18(Left, Right, True, False, options) {
|
|
26165
|
+
return FromProperties27(Left.properties, Right, True, False, options);
|
|
26166
|
+
}
|
|
26167
|
+
function ExtendsFromMappedResult2(Left, Right, True, False, options) {
|
|
26168
|
+
const P = FromMappedResult18(Left, Right, True, False, options);
|
|
26169
|
+
return MappedResult2(P);
|
|
26170
|
+
}
|
|
26171
|
+
|
|
26172
|
+
// node_modules/@sinclair/typebox/build/esm/type/extends/extends.mjs
|
|
26173
|
+
function ExtendsResolve2(left, right, trueType, falseType) {
|
|
26174
|
+
const R = ExtendsCheck2(left, right);
|
|
26175
|
+
return R === ExtendsResult2.Union ? Union3([trueType, falseType]) : R === ExtendsResult2.True ? trueType : falseType;
|
|
26176
|
+
}
|
|
26177
|
+
function Extends2(L, R, T, F, options) {
|
|
26178
|
+
return IsMappedResult3(L) ? ExtendsFromMappedResult2(L, R, T, F, options) : IsMappedKey3(L) ? CreateType2(ExtendsFromMappedKey2(L, R, T, F, options)) : CreateType2(ExtendsResolve2(L, R, T, F), options);
|
|
26179
|
+
}
|
|
26180
|
+
|
|
26181
|
+
// node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs
|
|
26182
|
+
function FromPropertyKey4(K, U, L, R, options) {
|
|
26183
|
+
return {
|
|
26184
|
+
[K]: Extends2(Literal2(K), U, L, R, Clone2(options))
|
|
26185
|
+
};
|
|
26186
|
+
}
|
|
26187
|
+
function FromPropertyKeys4(K, U, L, R, options) {
|
|
26188
|
+
return K.reduce((Acc, LK) => {
|
|
26189
|
+
return { ...Acc, ...FromPropertyKey4(LK, U, L, R, options) };
|
|
26190
|
+
}, {});
|
|
26191
|
+
}
|
|
26192
|
+
function FromMappedKey6(K, U, L, R, options) {
|
|
26193
|
+
return FromPropertyKeys4(K.keys, U, L, R, options);
|
|
26194
|
+
}
|
|
26195
|
+
function ExtendsFromMappedKey2(T, U, L, R, options) {
|
|
26196
|
+
const P = FromMappedKey6(T, U, L, R, options);
|
|
26197
|
+
return MappedResult2(P);
|
|
26198
|
+
}
|
|
26199
|
+
|
|
26200
|
+
// node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs
|
|
26201
|
+
function ExcludeFromTemplateLiteral2(L, R) {
|
|
26202
|
+
return Exclude2(TemplateLiteralToUnion2(L), R);
|
|
26203
|
+
}
|
|
26204
|
+
|
|
26205
|
+
// node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.mjs
|
|
26206
|
+
function ExcludeRest2(L, R) {
|
|
26207
|
+
const excluded = L.filter((inner) => ExtendsCheck2(inner, R) === ExtendsResult2.False);
|
|
26208
|
+
return excluded.length === 1 ? excluded[0] : Union3(excluded);
|
|
26209
|
+
}
|
|
26210
|
+
function Exclude2(L, R, options = {}) {
|
|
26211
|
+
if (IsTemplateLiteral3(L))
|
|
26212
|
+
return CreateType2(ExcludeFromTemplateLiteral2(L, R), options);
|
|
26213
|
+
if (IsMappedResult3(L))
|
|
26214
|
+
return CreateType2(ExcludeFromMappedResult2(L, R), options);
|
|
26215
|
+
return CreateType2(IsUnion3(L) ? ExcludeRest2(L.anyOf, R) : ExtendsCheck2(L, R) !== ExtendsResult2.False ? Never2() : L, options);
|
|
26216
|
+
}
|
|
26217
|
+
|
|
26218
|
+
// node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs
|
|
26219
|
+
function FromProperties28(P, U) {
|
|
26220
|
+
const Acc = {};
|
|
26221
|
+
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
26222
|
+
Acc[K2] = Exclude2(P[K2], U);
|
|
26223
|
+
return Acc;
|
|
26224
|
+
}
|
|
26225
|
+
function FromMappedResult19(R, T) {
|
|
26226
|
+
return FromProperties28(R.properties, T);
|
|
26227
|
+
}
|
|
26228
|
+
function ExcludeFromMappedResult2(R, T) {
|
|
26229
|
+
const P = FromMappedResult19(R, T);
|
|
26230
|
+
return MappedResult2(P);
|
|
26231
|
+
}
|
|
26232
|
+
|
|
26233
|
+
// node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs
|
|
26234
|
+
function ExtractFromTemplateLiteral2(L, R) {
|
|
26235
|
+
return Extract2(TemplateLiteralToUnion2(L), R);
|
|
26236
|
+
}
|
|
26237
|
+
|
|
26238
|
+
// node_modules/@sinclair/typebox/build/esm/type/extract/extract.mjs
|
|
26239
|
+
function ExtractRest2(L, R) {
|
|
26240
|
+
const extracted = L.filter((inner) => ExtendsCheck2(inner, R) !== ExtendsResult2.False);
|
|
26241
|
+
return extracted.length === 1 ? extracted[0] : Union3(extracted);
|
|
26242
|
+
}
|
|
26243
|
+
function Extract2(L, R, options) {
|
|
26244
|
+
if (IsTemplateLiteral3(L))
|
|
26245
|
+
return CreateType2(ExtractFromTemplateLiteral2(L, R), options);
|
|
26246
|
+
if (IsMappedResult3(L))
|
|
26247
|
+
return CreateType2(ExtractFromMappedResult2(L, R), options);
|
|
26248
|
+
return CreateType2(IsUnion3(L) ? ExtractRest2(L.anyOf, R) : ExtendsCheck2(L, R) !== ExtendsResult2.False ? L : Never2(), options);
|
|
26249
|
+
}
|
|
26250
|
+
|
|
26251
|
+
// node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs
|
|
26252
|
+
function FromProperties29(P, T) {
|
|
26253
|
+
const Acc = {};
|
|
26254
|
+
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
26255
|
+
Acc[K2] = Extract2(P[K2], T);
|
|
26256
|
+
return Acc;
|
|
26257
|
+
}
|
|
26258
|
+
function FromMappedResult20(R, T) {
|
|
26259
|
+
return FromProperties29(R.properties, T);
|
|
26260
|
+
}
|
|
26261
|
+
function ExtractFromMappedResult2(R, T) {
|
|
26262
|
+
const P = FromMappedResult20(R, T);
|
|
26263
|
+
return MappedResult2(P);
|
|
26264
|
+
}
|
|
26265
|
+
|
|
26266
|
+
// node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs
|
|
26267
|
+
function InstanceType2(schema, options) {
|
|
26268
|
+
return IsConstructor3(schema) ? CreateType2(schema.returns, options) : Never2(options);
|
|
26269
|
+
}
|
|
26270
|
+
|
|
26271
|
+
// node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs
|
|
26272
|
+
function ReadonlyOptional2(schema) {
|
|
26273
|
+
return Readonly2(Optional2(schema));
|
|
26274
|
+
}
|
|
26275
|
+
|
|
26276
|
+
// node_modules/@sinclair/typebox/build/esm/type/record/record.mjs
|
|
26277
|
+
function RecordCreateFromPattern2(pattern, T, options) {
|
|
26278
|
+
return CreateType2({ [Kind2]: "Record", type: "object", patternProperties: { [pattern]: T } }, options);
|
|
26279
|
+
}
|
|
26280
|
+
function RecordCreateFromKeys2(K, T, options) {
|
|
26281
|
+
const result = {};
|
|
26282
|
+
for (const K2 of K)
|
|
26283
|
+
result[K2] = T;
|
|
26284
|
+
return Object3(result, { ...options, [Hint2]: "Record" });
|
|
26285
|
+
}
|
|
26286
|
+
function FromTemplateLiteralKey2(K, T, options) {
|
|
26287
|
+
return IsTemplateLiteralFinite2(K) ? RecordCreateFromKeys2(IndexPropertyKeys2(K), T, options) : RecordCreateFromPattern2(K.pattern, T, options);
|
|
26288
|
+
}
|
|
26289
|
+
function FromUnionKey2(key, type, options) {
|
|
26290
|
+
return RecordCreateFromKeys2(IndexPropertyKeys2(Union3(key)), type, options);
|
|
26291
|
+
}
|
|
26292
|
+
function FromLiteralKey2(key, type, options) {
|
|
26293
|
+
return RecordCreateFromKeys2([key.toString()], type, options);
|
|
26294
|
+
}
|
|
26295
|
+
function FromRegExpKey2(key, type, options) {
|
|
26296
|
+
return RecordCreateFromPattern2(key.source, type, options);
|
|
26297
|
+
}
|
|
26298
|
+
function FromStringKey2(key, type, options) {
|
|
26299
|
+
const pattern = IsUndefined5(key.pattern) ? PatternStringExact2 : key.pattern;
|
|
26300
|
+
return RecordCreateFromPattern2(pattern, type, options);
|
|
26301
|
+
}
|
|
26302
|
+
function FromAnyKey2(_, type, options) {
|
|
26303
|
+
return RecordCreateFromPattern2(PatternStringExact2, type, options);
|
|
26304
|
+
}
|
|
26305
|
+
function FromNeverKey2(_key, type, options) {
|
|
26306
|
+
return RecordCreateFromPattern2(PatternNeverExact2, type, options);
|
|
26307
|
+
}
|
|
26308
|
+
function FromBooleanKey2(_key, type, options) {
|
|
26309
|
+
return Object3({ true: type, false: type }, options);
|
|
26310
|
+
}
|
|
26311
|
+
function FromIntegerKey2(_key, type, options) {
|
|
26312
|
+
return RecordCreateFromPattern2(PatternNumberExact2, type, options);
|
|
26313
|
+
}
|
|
26314
|
+
function FromNumberKey2(_, type, options) {
|
|
26315
|
+
return RecordCreateFromPattern2(PatternNumberExact2, type, options);
|
|
26316
|
+
}
|
|
26317
|
+
function Record2(key, type, options = {}) {
|
|
26318
|
+
return IsUnion3(key) ? FromUnionKey2(key.anyOf, type, options) : IsTemplateLiteral3(key) ? FromTemplateLiteralKey2(key, type, options) : IsLiteral3(key) ? FromLiteralKey2(key.const, type, options) : IsBoolean6(key) ? FromBooleanKey2(key, type, options) : IsInteger4(key) ? FromIntegerKey2(key, type, options) : IsNumber7(key) ? FromNumberKey2(key, type, options) : IsRegExp5(key) ? FromRegExpKey2(key, type, options) : IsString6(key) ? FromStringKey2(key, type, options) : IsAny3(key) ? FromAnyKey2(key, type, options) : IsNever3(key) ? FromNeverKey2(key, type, options) : Never2(options);
|
|
26319
|
+
}
|
|
26320
|
+
function RecordPattern2(record) {
|
|
26321
|
+
return globalThis.Object.getOwnPropertyNames(record.patternProperties)[0];
|
|
26322
|
+
}
|
|
26323
|
+
function RecordKey4(type) {
|
|
26324
|
+
const pattern = RecordPattern2(type);
|
|
26325
|
+
return pattern === PatternStringExact2 ? String3() : pattern === PatternNumberExact2 ? Number3() : String3({ pattern });
|
|
26326
|
+
}
|
|
26327
|
+
function RecordValue4(type) {
|
|
26328
|
+
return type.patternProperties[RecordPattern2(type)];
|
|
26329
|
+
}
|
|
26330
|
+
|
|
26331
|
+
// node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs
|
|
26332
|
+
function FromConstructor8(args, type) {
|
|
26333
|
+
type.parameters = FromTypes3(args, type.parameters);
|
|
26334
|
+
type.returns = FromType3(args, type.returns);
|
|
26335
|
+
return type;
|
|
26336
|
+
}
|
|
26337
|
+
function FromFunction8(args, type) {
|
|
26338
|
+
type.parameters = FromTypes3(args, type.parameters);
|
|
26339
|
+
type.returns = FromType3(args, type.returns);
|
|
26340
|
+
return type;
|
|
26341
|
+
}
|
|
26342
|
+
function FromIntersect17(args, type) {
|
|
26343
|
+
type.allOf = FromTypes3(args, type.allOf);
|
|
26344
|
+
return type;
|
|
26345
|
+
}
|
|
26346
|
+
function FromUnion21(args, type) {
|
|
26347
|
+
type.anyOf = FromTypes3(args, type.anyOf);
|
|
26348
|
+
return type;
|
|
26349
|
+
}
|
|
26350
|
+
function FromTuple13(args, type) {
|
|
26351
|
+
if (IsUndefined5(type.items))
|
|
26352
|
+
return type;
|
|
26353
|
+
type.items = FromTypes3(args, type.items);
|
|
26354
|
+
return type;
|
|
26355
|
+
}
|
|
26356
|
+
function FromArray15(args, type) {
|
|
26357
|
+
type.items = FromType3(args, type.items);
|
|
26358
|
+
return type;
|
|
26359
|
+
}
|
|
26360
|
+
function FromAsyncIterator8(args, type) {
|
|
26361
|
+
type.items = FromType3(args, type.items);
|
|
26362
|
+
return type;
|
|
26363
|
+
}
|
|
26364
|
+
function FromIterator8(args, type) {
|
|
26365
|
+
type.items = FromType3(args, type.items);
|
|
26366
|
+
return type;
|
|
26367
|
+
}
|
|
26368
|
+
function FromPromise9(args, type) {
|
|
26369
|
+
type.item = FromType3(args, type.item);
|
|
26370
|
+
return type;
|
|
26371
|
+
}
|
|
26372
|
+
function FromObject13(args, type) {
|
|
26373
|
+
const mappedProperties = FromProperties30(args, type.properties);
|
|
26374
|
+
return { ...type, ...Object3(mappedProperties) };
|
|
26375
|
+
}
|
|
26376
|
+
function FromRecord9(args, type) {
|
|
26377
|
+
const mappedKey = FromType3(args, RecordKey4(type));
|
|
26378
|
+
const mappedValue = FromType3(args, RecordValue4(type));
|
|
26379
|
+
const result = Record2(mappedKey, mappedValue);
|
|
26380
|
+
return { ...type, ...result };
|
|
26381
|
+
}
|
|
26382
|
+
function FromArgument4(args, argument) {
|
|
26383
|
+
return argument.index in args ? args[argument.index] : Unknown2();
|
|
26384
|
+
}
|
|
26385
|
+
function FromProperty5(args, type) {
|
|
26386
|
+
const isReadonly = IsReadonly2(type);
|
|
26387
|
+
const isOptional = IsOptional3(type);
|
|
26388
|
+
const mapped = FromType3(args, type);
|
|
26389
|
+
return isReadonly && isOptional ? ReadonlyOptional2(mapped) : isReadonly && !isOptional ? Readonly2(mapped) : !isReadonly && isOptional ? Optional2(mapped) : mapped;
|
|
26390
|
+
}
|
|
26391
|
+
function FromProperties30(args, properties) {
|
|
26392
|
+
return globalThis.Object.getOwnPropertyNames(properties).reduce((result, key) => {
|
|
26393
|
+
return { ...result, [key]: FromProperty5(args, properties[key]) };
|
|
26394
|
+
}, {});
|
|
26395
|
+
}
|
|
26396
|
+
function FromTypes3(args, types) {
|
|
26397
|
+
return types.map((type) => FromType3(args, type));
|
|
26398
|
+
}
|
|
26399
|
+
function FromType3(args, type) {
|
|
26400
|
+
return IsConstructor3(type) ? FromConstructor8(args, type) : IsFunction6(type) ? FromFunction8(args, type) : IsIntersect3(type) ? FromIntersect17(args, type) : IsUnion3(type) ? FromUnion21(args, type) : IsTuple3(type) ? FromTuple13(args, type) : IsArray7(type) ? FromArray15(args, type) : IsAsyncIterator6(type) ? FromAsyncIterator8(args, type) : IsIterator6(type) ? FromIterator8(args, type) : IsPromise4(type) ? FromPromise9(args, type) : IsObject7(type) ? FromObject13(args, type) : IsRecord3(type) ? FromRecord9(args, type) : IsArgument3(type) ? FromArgument4(args, type) : type;
|
|
26401
|
+
}
|
|
26402
|
+
function Instantiate2(type, args) {
|
|
26403
|
+
return FromType3(args, CloneType2(type));
|
|
26404
|
+
}
|
|
26405
|
+
|
|
26406
|
+
// node_modules/@sinclair/typebox/build/esm/type/integer/integer.mjs
|
|
26407
|
+
function Integer2(options) {
|
|
26408
|
+
return CreateType2({ [Kind2]: "Integer", type: "integer" }, options);
|
|
26409
|
+
}
|
|
26410
|
+
|
|
26411
|
+
// node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs
|
|
26412
|
+
function MappedIntrinsicPropertyKey2(K, M, options) {
|
|
26413
|
+
return {
|
|
26414
|
+
[K]: Intrinsic2(Literal2(K), M, Clone2(options))
|
|
26415
|
+
};
|
|
26416
|
+
}
|
|
26417
|
+
function MappedIntrinsicPropertyKeys2(K, M, options) {
|
|
26418
|
+
const result = K.reduce((Acc, L) => {
|
|
26419
|
+
return { ...Acc, ...MappedIntrinsicPropertyKey2(L, M, options) };
|
|
26420
|
+
}, {});
|
|
26421
|
+
return result;
|
|
26422
|
+
}
|
|
26423
|
+
function MappedIntrinsicProperties2(T, M, options) {
|
|
26424
|
+
return MappedIntrinsicPropertyKeys2(T["keys"], M, options);
|
|
26425
|
+
}
|
|
26426
|
+
function IntrinsicFromMappedKey2(T, M, options) {
|
|
26427
|
+
const P = MappedIntrinsicProperties2(T, M, options);
|
|
26428
|
+
return MappedResult2(P);
|
|
26429
|
+
}
|
|
26430
|
+
|
|
26431
|
+
// node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs
|
|
26432
|
+
function ApplyUncapitalize2(value) {
|
|
26433
|
+
const [first, rest] = [value.slice(0, 1), value.slice(1)];
|
|
26434
|
+
return [first.toLowerCase(), rest].join("");
|
|
26435
|
+
}
|
|
26436
|
+
function ApplyCapitalize2(value) {
|
|
26437
|
+
const [first, rest] = [value.slice(0, 1), value.slice(1)];
|
|
26438
|
+
return [first.toUpperCase(), rest].join("");
|
|
26439
|
+
}
|
|
26440
|
+
function ApplyUppercase2(value) {
|
|
26441
|
+
return value.toUpperCase();
|
|
26442
|
+
}
|
|
26443
|
+
function ApplyLowercase2(value) {
|
|
26444
|
+
return value.toLowerCase();
|
|
26445
|
+
}
|
|
26446
|
+
function FromTemplateLiteral8(schema, mode, options) {
|
|
26447
|
+
const expression = TemplateLiteralParseExact2(schema.pattern);
|
|
26448
|
+
const finite = IsTemplateLiteralExpressionFinite2(expression);
|
|
26449
|
+
if (!finite)
|
|
26450
|
+
return { ...schema, pattern: FromLiteralValue2(schema.pattern, mode) };
|
|
26451
|
+
const strings = [...TemplateLiteralExpressionGenerate2(expression)];
|
|
26452
|
+
const literals = strings.map((value) => Literal2(value));
|
|
26453
|
+
const mapped = FromRest12(literals, mode);
|
|
26454
|
+
const union = Union3(mapped);
|
|
26455
|
+
return TemplateLiteral2([union], options);
|
|
26456
|
+
}
|
|
26457
|
+
function FromLiteralValue2(value, mode) {
|
|
26458
|
+
return typeof value === "string" ? mode === "Uncapitalize" ? ApplyUncapitalize2(value) : mode === "Capitalize" ? ApplyCapitalize2(value) : mode === "Uppercase" ? ApplyUppercase2(value) : mode === "Lowercase" ? ApplyLowercase2(value) : value : value.toString();
|
|
26459
|
+
}
|
|
26460
|
+
function FromRest12(T, M) {
|
|
26461
|
+
return T.map((L) => Intrinsic2(L, M));
|
|
26462
|
+
}
|
|
26463
|
+
function Intrinsic2(schema, mode, options = {}) {
|
|
26464
|
+
return IsMappedKey3(schema) ? IntrinsicFromMappedKey2(schema, mode, options) : IsTemplateLiteral3(schema) ? FromTemplateLiteral8(schema, mode, options) : IsUnion3(schema) ? Union3(FromRest12(schema.anyOf, mode), options) : IsLiteral3(schema) ? Literal2(FromLiteralValue2(schema.const, mode), options) : CreateType2(schema, options);
|
|
26465
|
+
}
|
|
26466
|
+
|
|
26467
|
+
// node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs
|
|
26468
|
+
function Capitalize2(T, options = {}) {
|
|
26469
|
+
return Intrinsic2(T, "Capitalize", options);
|
|
26470
|
+
}
|
|
26471
|
+
|
|
26472
|
+
// node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs
|
|
26473
|
+
function Lowercase2(T, options = {}) {
|
|
26474
|
+
return Intrinsic2(T, "Lowercase", options);
|
|
26475
|
+
}
|
|
26476
|
+
|
|
26477
|
+
// node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs
|
|
26478
|
+
function Uncapitalize2(T, options = {}) {
|
|
26479
|
+
return Intrinsic2(T, "Uncapitalize", options);
|
|
26480
|
+
}
|
|
26481
|
+
|
|
26482
|
+
// node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs
|
|
26483
|
+
function Uppercase2(T, options = {}) {
|
|
26484
|
+
return Intrinsic2(T, "Uppercase", options);
|
|
26485
|
+
}
|
|
26486
|
+
|
|
26487
|
+
// node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs
|
|
26488
|
+
function FromProperties31(properties, propertyKeys, options) {
|
|
26489
|
+
const result = {};
|
|
26490
|
+
for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
|
|
26491
|
+
result[K2] = Omit2(properties[K2], propertyKeys, Clone2(options));
|
|
26492
|
+
return result;
|
|
26493
|
+
}
|
|
26494
|
+
function FromMappedResult21(mappedResult, propertyKeys, options) {
|
|
26495
|
+
return FromProperties31(mappedResult.properties, propertyKeys, options);
|
|
26496
|
+
}
|
|
26497
|
+
function OmitFromMappedResult2(mappedResult, propertyKeys, options) {
|
|
26498
|
+
const properties = FromMappedResult21(mappedResult, propertyKeys, options);
|
|
26499
|
+
return MappedResult2(properties);
|
|
26500
|
+
}
|
|
26501
|
+
|
|
26502
|
+
// node_modules/@sinclair/typebox/build/esm/type/omit/omit.mjs
|
|
26503
|
+
function FromIntersect18(types, propertyKeys) {
|
|
26504
|
+
return types.map((type) => OmitResolve2(type, propertyKeys));
|
|
26505
|
+
}
|
|
26506
|
+
function FromUnion22(types, propertyKeys) {
|
|
26507
|
+
return types.map((type) => OmitResolve2(type, propertyKeys));
|
|
26508
|
+
}
|
|
26509
|
+
function FromProperty6(properties, key) {
|
|
26510
|
+
const { [key]: _, ...R } = properties;
|
|
26511
|
+
return R;
|
|
26512
|
+
}
|
|
26513
|
+
function FromProperties32(properties, propertyKeys) {
|
|
26514
|
+
return propertyKeys.reduce((T, K2) => FromProperty6(T, K2), properties);
|
|
26515
|
+
}
|
|
26516
|
+
function FromObject14(type, propertyKeys, properties) {
|
|
26517
|
+
const options = Discard2(type, [TransformKind2, "$id", "required", "properties"]);
|
|
26518
|
+
const mappedProperties = FromProperties32(properties, propertyKeys);
|
|
26519
|
+
return Object3(mappedProperties, options);
|
|
26520
|
+
}
|
|
26521
|
+
function UnionFromPropertyKeys3(propertyKeys) {
|
|
26522
|
+
const result = propertyKeys.reduce((result, key) => IsLiteralValue3(key) ? [...result, Literal2(key)] : result, []);
|
|
26523
|
+
return Union3(result);
|
|
26524
|
+
}
|
|
26525
|
+
function OmitResolve2(type, propertyKeys) {
|
|
26526
|
+
return IsIntersect3(type) ? Intersect3(FromIntersect18(type.allOf, propertyKeys)) : IsUnion3(type) ? Union3(FromUnion22(type.anyOf, propertyKeys)) : IsObject7(type) ? FromObject14(type, propertyKeys, type.properties) : Object3({});
|
|
26527
|
+
}
|
|
26528
|
+
function Omit2(type, key, options) {
|
|
26529
|
+
const typeKey = IsArray5(key) ? UnionFromPropertyKeys3(key) : key;
|
|
26530
|
+
const propertyKeys = IsSchema3(key) ? IndexPropertyKeys2(key) : key;
|
|
26531
|
+
const isTypeRef = IsRef3(type);
|
|
26532
|
+
const isKeyRef = IsRef3(key);
|
|
26533
|
+
return IsMappedResult3(type) ? OmitFromMappedResult2(type, propertyKeys, options) : IsMappedKey3(key) ? OmitFromMappedKey2(type, key, options) : isTypeRef && isKeyRef ? Computed2("Omit", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed2("Omit", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed2("Omit", [type, typeKey], options) : CreateType2({ ...OmitResolve2(type, propertyKeys), ...options });
|
|
26534
|
+
}
|
|
26535
|
+
|
|
26536
|
+
// node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs
|
|
26537
|
+
function FromPropertyKey5(type, key, options) {
|
|
26538
|
+
return { [key]: Omit2(type, [key], Clone2(options)) };
|
|
26539
|
+
}
|
|
26540
|
+
function FromPropertyKeys5(type, propertyKeys, options) {
|
|
26541
|
+
return propertyKeys.reduce((Acc, LK) => {
|
|
26542
|
+
return { ...Acc, ...FromPropertyKey5(type, LK, options) };
|
|
26543
|
+
}, {});
|
|
26544
|
+
}
|
|
26545
|
+
function FromMappedKey7(type, mappedKey, options) {
|
|
26546
|
+
return FromPropertyKeys5(type, mappedKey.keys, options);
|
|
26547
|
+
}
|
|
26548
|
+
function OmitFromMappedKey2(type, mappedKey, options) {
|
|
26549
|
+
const properties = FromMappedKey7(type, mappedKey, options);
|
|
26550
|
+
return MappedResult2(properties);
|
|
26551
|
+
}
|
|
26552
|
+
|
|
26553
|
+
// node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs
|
|
26554
|
+
function FromProperties33(properties, propertyKeys, options) {
|
|
26555
|
+
const result = {};
|
|
26556
|
+
for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
|
|
26557
|
+
result[K2] = Pick2(properties[K2], propertyKeys, Clone2(options));
|
|
26558
|
+
return result;
|
|
26559
|
+
}
|
|
26560
|
+
function FromMappedResult22(mappedResult, propertyKeys, options) {
|
|
26561
|
+
return FromProperties33(mappedResult.properties, propertyKeys, options);
|
|
26562
|
+
}
|
|
26563
|
+
function PickFromMappedResult2(mappedResult, propertyKeys, options) {
|
|
26564
|
+
const properties = FromMappedResult22(mappedResult, propertyKeys, options);
|
|
26565
|
+
return MappedResult2(properties);
|
|
26566
|
+
}
|
|
26567
|
+
|
|
26568
|
+
// node_modules/@sinclair/typebox/build/esm/type/pick/pick.mjs
|
|
26569
|
+
function FromIntersect19(types, propertyKeys) {
|
|
26570
|
+
return types.map((type) => PickResolve2(type, propertyKeys));
|
|
26571
|
+
}
|
|
26572
|
+
function FromUnion23(types, propertyKeys) {
|
|
26573
|
+
return types.map((type) => PickResolve2(type, propertyKeys));
|
|
26574
|
+
}
|
|
26575
|
+
function FromProperties34(properties, propertyKeys) {
|
|
26576
|
+
const result = {};
|
|
26577
|
+
for (const K2 of propertyKeys)
|
|
26578
|
+
if (K2 in properties)
|
|
26579
|
+
result[K2] = properties[K2];
|
|
26580
|
+
return result;
|
|
26581
|
+
}
|
|
26582
|
+
function FromObject15(Type, keys, properties) {
|
|
26583
|
+
const options = Discard2(Type, [TransformKind2, "$id", "required", "properties"]);
|
|
26584
|
+
const mappedProperties = FromProperties34(properties, keys);
|
|
26585
|
+
return Object3(mappedProperties, options);
|
|
26586
|
+
}
|
|
26587
|
+
function UnionFromPropertyKeys4(propertyKeys) {
|
|
26588
|
+
const result = propertyKeys.reduce((result, key) => IsLiteralValue3(key) ? [...result, Literal2(key)] : result, []);
|
|
26589
|
+
return Union3(result);
|
|
26590
|
+
}
|
|
26591
|
+
function PickResolve2(type, propertyKeys) {
|
|
26592
|
+
return IsIntersect3(type) ? Intersect3(FromIntersect19(type.allOf, propertyKeys)) : IsUnion3(type) ? Union3(FromUnion23(type.anyOf, propertyKeys)) : IsObject7(type) ? FromObject15(type, propertyKeys, type.properties) : Object3({});
|
|
26593
|
+
}
|
|
26594
|
+
function Pick2(type, key, options) {
|
|
26595
|
+
const typeKey = IsArray5(key) ? UnionFromPropertyKeys4(key) : key;
|
|
26596
|
+
const propertyKeys = IsSchema3(key) ? IndexPropertyKeys2(key) : key;
|
|
26597
|
+
const isTypeRef = IsRef3(type);
|
|
26598
|
+
const isKeyRef = IsRef3(key);
|
|
26599
|
+
return IsMappedResult3(type) ? PickFromMappedResult2(type, propertyKeys, options) : IsMappedKey3(key) ? PickFromMappedKey2(type, key, options) : isTypeRef && isKeyRef ? Computed2("Pick", [type, typeKey], options) : !isTypeRef && isKeyRef ? Computed2("Pick", [type, typeKey], options) : isTypeRef && !isKeyRef ? Computed2("Pick", [type, typeKey], options) : CreateType2({ ...PickResolve2(type, propertyKeys), ...options });
|
|
26600
|
+
}
|
|
26601
|
+
|
|
26602
|
+
// node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs
|
|
26603
|
+
function FromPropertyKey6(type, key, options) {
|
|
26604
|
+
return {
|
|
26605
|
+
[key]: Pick2(type, [key], Clone2(options))
|
|
26606
|
+
};
|
|
26607
|
+
}
|
|
26608
|
+
function FromPropertyKeys6(type, propertyKeys, options) {
|
|
26609
|
+
return propertyKeys.reduce((result, leftKey) => {
|
|
26610
|
+
return { ...result, ...FromPropertyKey6(type, leftKey, options) };
|
|
26611
|
+
}, {});
|
|
26612
|
+
}
|
|
26613
|
+
function FromMappedKey8(type, mappedKey, options) {
|
|
26614
|
+
return FromPropertyKeys6(type, mappedKey.keys, options);
|
|
26615
|
+
}
|
|
26616
|
+
function PickFromMappedKey2(type, mappedKey, options) {
|
|
26617
|
+
const properties = FromMappedKey8(type, mappedKey, options);
|
|
26618
|
+
return MappedResult2(properties);
|
|
26619
|
+
}
|
|
26620
|
+
|
|
26621
|
+
// node_modules/@sinclair/typebox/build/esm/type/partial/partial.mjs
|
|
26622
|
+
function FromComputed8(target, parameters) {
|
|
26623
|
+
return Computed2("Partial", [Computed2(target, parameters)]);
|
|
26624
|
+
}
|
|
26625
|
+
function FromRef11($ref) {
|
|
26626
|
+
return Computed2("Partial", [Ref2($ref)]);
|
|
26627
|
+
}
|
|
26628
|
+
function FromProperties35(properties) {
|
|
26629
|
+
const partialProperties = {};
|
|
26630
|
+
for (const K of globalThis.Object.getOwnPropertyNames(properties))
|
|
26631
|
+
partialProperties[K] = Optional2(properties[K]);
|
|
26632
|
+
return partialProperties;
|
|
26633
|
+
}
|
|
26634
|
+
function FromObject16(type, properties) {
|
|
26635
|
+
const options = Discard2(type, [TransformKind2, "$id", "required", "properties"]);
|
|
26636
|
+
const mappedProperties = FromProperties35(properties);
|
|
26637
|
+
return Object3(mappedProperties, options);
|
|
26638
|
+
}
|
|
26639
|
+
function FromRest13(types) {
|
|
26640
|
+
return types.map((type) => PartialResolve2(type));
|
|
26641
|
+
}
|
|
26642
|
+
function PartialResolve2(type) {
|
|
26643
|
+
return IsComputed3(type) ? FromComputed8(type.target, type.parameters) : IsRef3(type) ? FromRef11(type.$ref) : IsIntersect3(type) ? Intersect3(FromRest13(type.allOf)) : IsUnion3(type) ? Union3(FromRest13(type.anyOf)) : IsObject7(type) ? FromObject16(type, type.properties) : IsBigInt6(type) ? type : IsBoolean6(type) ? type : IsInteger4(type) ? type : IsLiteral3(type) ? type : IsNull6(type) ? type : IsNumber7(type) ? type : IsString6(type) ? type : IsSymbol6(type) ? type : IsUndefined7(type) ? type : Object3({});
|
|
26644
|
+
}
|
|
26645
|
+
function Partial2(type, options) {
|
|
26646
|
+
if (IsMappedResult3(type)) {
|
|
26647
|
+
return PartialFromMappedResult2(type, options);
|
|
26648
|
+
} else {
|
|
26649
|
+
return CreateType2({ ...PartialResolve2(type), ...options });
|
|
26650
|
+
}
|
|
26651
|
+
}
|
|
26652
|
+
|
|
26653
|
+
// node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs
|
|
26654
|
+
function FromProperties36(K, options) {
|
|
26655
|
+
const Acc = {};
|
|
26656
|
+
for (const K2 of globalThis.Object.getOwnPropertyNames(K))
|
|
26657
|
+
Acc[K2] = Partial2(K[K2], Clone2(options));
|
|
26658
|
+
return Acc;
|
|
26659
|
+
}
|
|
26660
|
+
function FromMappedResult23(R, options) {
|
|
26661
|
+
return FromProperties36(R.properties, options);
|
|
26662
|
+
}
|
|
26663
|
+
function PartialFromMappedResult2(R, options) {
|
|
26664
|
+
const P = FromMappedResult23(R, options);
|
|
26665
|
+
return MappedResult2(P);
|
|
26666
|
+
}
|
|
26667
|
+
|
|
26668
|
+
// node_modules/@sinclair/typebox/build/esm/type/required/required.mjs
|
|
26669
|
+
function FromComputed9(target, parameters) {
|
|
26670
|
+
return Computed2("Required", [Computed2(target, parameters)]);
|
|
26671
|
+
}
|
|
26672
|
+
function FromRef12($ref) {
|
|
26673
|
+
return Computed2("Required", [Ref2($ref)]);
|
|
26674
|
+
}
|
|
26675
|
+
function FromProperties37(properties) {
|
|
26676
|
+
const requiredProperties = {};
|
|
26677
|
+
for (const K of globalThis.Object.getOwnPropertyNames(properties))
|
|
26678
|
+
requiredProperties[K] = Discard2(properties[K], [OptionalKind2]);
|
|
26679
|
+
return requiredProperties;
|
|
26680
|
+
}
|
|
26681
|
+
function FromObject17(type, properties) {
|
|
26682
|
+
const options = Discard2(type, [TransformKind2, "$id", "required", "properties"]);
|
|
26683
|
+
const mappedProperties = FromProperties37(properties);
|
|
26684
|
+
return Object3(mappedProperties, options);
|
|
26685
|
+
}
|
|
26686
|
+
function FromRest14(types) {
|
|
26687
|
+
return types.map((type) => RequiredResolve2(type));
|
|
26688
|
+
}
|
|
26689
|
+
function RequiredResolve2(type) {
|
|
26690
|
+
return IsComputed3(type) ? FromComputed9(type.target, type.parameters) : IsRef3(type) ? FromRef12(type.$ref) : IsIntersect3(type) ? Intersect3(FromRest14(type.allOf)) : IsUnion3(type) ? Union3(FromRest14(type.anyOf)) : IsObject7(type) ? FromObject17(type, type.properties) : IsBigInt6(type) ? type : IsBoolean6(type) ? type : IsInteger4(type) ? type : IsLiteral3(type) ? type : IsNull6(type) ? type : IsNumber7(type) ? type : IsString6(type) ? type : IsSymbol6(type) ? type : IsUndefined7(type) ? type : Object3({});
|
|
26691
|
+
}
|
|
26692
|
+
function Required2(type, options) {
|
|
26693
|
+
if (IsMappedResult3(type)) {
|
|
26694
|
+
return RequiredFromMappedResult2(type, options);
|
|
26695
|
+
} else {
|
|
26696
|
+
return CreateType2({ ...RequiredResolve2(type), ...options });
|
|
26697
|
+
}
|
|
26698
|
+
}
|
|
26699
|
+
|
|
26700
|
+
// node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs
|
|
26701
|
+
function FromProperties38(P, options) {
|
|
26702
|
+
const Acc = {};
|
|
26703
|
+
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
26704
|
+
Acc[K2] = Required2(P[K2], options);
|
|
26705
|
+
return Acc;
|
|
26706
|
+
}
|
|
26707
|
+
function FromMappedResult24(R, options) {
|
|
26708
|
+
return FromProperties38(R.properties, options);
|
|
26709
|
+
}
|
|
26710
|
+
function RequiredFromMappedResult2(R, options) {
|
|
26711
|
+
const P = FromMappedResult24(R, options);
|
|
26712
|
+
return MappedResult2(P);
|
|
26713
|
+
}
|
|
26714
|
+
|
|
26715
|
+
// node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs
|
|
26716
|
+
function DereferenceParameters2(moduleProperties, types) {
|
|
26717
|
+
return types.map((type) => {
|
|
26718
|
+
return IsRef3(type) ? Dereference2(moduleProperties, type.$ref) : FromType4(moduleProperties, type);
|
|
26719
|
+
});
|
|
26720
|
+
}
|
|
26721
|
+
function Dereference2(moduleProperties, ref) {
|
|
26722
|
+
return ref in moduleProperties ? IsRef3(moduleProperties[ref]) ? Dereference2(moduleProperties, moduleProperties[ref].$ref) : FromType4(moduleProperties, moduleProperties[ref]) : Never2();
|
|
26723
|
+
}
|
|
26724
|
+
function FromAwaited2(parameters) {
|
|
26725
|
+
return Awaited2(parameters[0]);
|
|
26726
|
+
}
|
|
26727
|
+
function FromIndex2(parameters) {
|
|
26728
|
+
return Index2(parameters[0], parameters[1]);
|
|
26729
|
+
}
|
|
26730
|
+
function FromKeyOf2(parameters) {
|
|
26731
|
+
return KeyOf2(parameters[0]);
|
|
26732
|
+
}
|
|
26733
|
+
function FromPartial2(parameters) {
|
|
26734
|
+
return Partial2(parameters[0]);
|
|
26735
|
+
}
|
|
26736
|
+
function FromOmit2(parameters) {
|
|
26737
|
+
return Omit2(parameters[0], parameters[1]);
|
|
26738
|
+
}
|
|
26739
|
+
function FromPick2(parameters) {
|
|
26740
|
+
return Pick2(parameters[0], parameters[1]);
|
|
26741
|
+
}
|
|
26742
|
+
function FromRequired2(parameters) {
|
|
26743
|
+
return Required2(parameters[0]);
|
|
26744
|
+
}
|
|
26745
|
+
function FromComputed10(moduleProperties, target, parameters) {
|
|
26746
|
+
const dereferenced = DereferenceParameters2(moduleProperties, parameters);
|
|
26747
|
+
return target === "Awaited" ? FromAwaited2(dereferenced) : target === "Index" ? FromIndex2(dereferenced) : target === "KeyOf" ? FromKeyOf2(dereferenced) : target === "Partial" ? FromPartial2(dereferenced) : target === "Omit" ? FromOmit2(dereferenced) : target === "Pick" ? FromPick2(dereferenced) : target === "Required" ? FromRequired2(dereferenced) : Never2();
|
|
26748
|
+
}
|
|
26749
|
+
function FromArray16(moduleProperties, type) {
|
|
26750
|
+
return Array3(FromType4(moduleProperties, type));
|
|
26751
|
+
}
|
|
26752
|
+
function FromAsyncIterator9(moduleProperties, type) {
|
|
26753
|
+
return AsyncIterator2(FromType4(moduleProperties, type));
|
|
26754
|
+
}
|
|
26755
|
+
function FromConstructor9(moduleProperties, parameters, instanceType) {
|
|
26756
|
+
return Constructor2(FromTypes4(moduleProperties, parameters), FromType4(moduleProperties, instanceType));
|
|
26757
|
+
}
|
|
26758
|
+
function FromFunction9(moduleProperties, parameters, returnType) {
|
|
26759
|
+
return Function3(FromTypes4(moduleProperties, parameters), FromType4(moduleProperties, returnType));
|
|
26760
|
+
}
|
|
26761
|
+
function FromIntersect20(moduleProperties, types) {
|
|
26762
|
+
return Intersect3(FromTypes4(moduleProperties, types));
|
|
26763
|
+
}
|
|
26764
|
+
function FromIterator9(moduleProperties, type) {
|
|
26765
|
+
return Iterator2(FromType4(moduleProperties, type));
|
|
26766
|
+
}
|
|
26767
|
+
function FromObject18(moduleProperties, properties) {
|
|
26768
|
+
return Object3(globalThis.Object.keys(properties).reduce((result, key) => {
|
|
26769
|
+
return { ...result, [key]: FromType4(moduleProperties, properties[key]) };
|
|
26770
|
+
}, {}));
|
|
26771
|
+
}
|
|
26772
|
+
function FromRecord10(moduleProperties, type) {
|
|
26773
|
+
const [value, pattern] = [FromType4(moduleProperties, RecordValue4(type)), RecordPattern2(type)];
|
|
26774
|
+
const result = CloneType2(type);
|
|
26775
|
+
result.patternProperties[pattern] = value;
|
|
26776
|
+
return result;
|
|
26777
|
+
}
|
|
26778
|
+
function FromTransform2(moduleProperties, transform) {
|
|
26779
|
+
return IsRef3(transform) ? { ...Dereference2(moduleProperties, transform.$ref), [TransformKind2]: transform[TransformKind2] } : transform;
|
|
26780
|
+
}
|
|
26781
|
+
function FromTuple14(moduleProperties, types) {
|
|
26782
|
+
return Tuple2(FromTypes4(moduleProperties, types));
|
|
26783
|
+
}
|
|
26784
|
+
function FromUnion24(moduleProperties, types) {
|
|
26785
|
+
return Union3(FromTypes4(moduleProperties, types));
|
|
24322
26786
|
}
|
|
24323
|
-
|
|
24324
|
-
|
|
24325
|
-
|
|
24326
|
-
|
|
24327
|
-
|
|
24328
|
-
|
|
24329
|
-
|
|
24330
|
-
|
|
24331
|
-
|
|
24332
|
-
|
|
24333
|
-
|
|
24334
|
-
|
|
24335
|
-
|
|
24336
|
-
const delay = RETRY_BASE_DELAY * Math.pow(2, attempt);
|
|
24337
|
-
await new Promise((r) => setTimeout(r, delay));
|
|
24338
|
-
continue;
|
|
24339
|
-
}
|
|
24340
|
-
throw error;
|
|
24341
|
-
}
|
|
24342
|
-
}
|
|
24343
|
-
throw new Error("Unreachable");
|
|
26787
|
+
function FromTypes4(moduleProperties, types) {
|
|
26788
|
+
return types.map((type) => FromType4(moduleProperties, type));
|
|
26789
|
+
}
|
|
26790
|
+
function FromType4(moduleProperties, type) {
|
|
26791
|
+
return IsOptional3(type) ? CreateType2(FromType4(moduleProperties, Discard2(type, [OptionalKind2])), type) : IsReadonly2(type) ? CreateType2(FromType4(moduleProperties, Discard2(type, [ReadonlyKind2])), type) : IsTransform3(type) ? CreateType2(FromTransform2(moduleProperties, type), type) : IsArray7(type) ? CreateType2(FromArray16(moduleProperties, type.items), type) : IsAsyncIterator6(type) ? CreateType2(FromAsyncIterator9(moduleProperties, type.items), type) : IsComputed3(type) ? CreateType2(FromComputed10(moduleProperties, type.target, type.parameters)) : IsConstructor3(type) ? CreateType2(FromConstructor9(moduleProperties, type.parameters, type.returns), type) : IsFunction6(type) ? CreateType2(FromFunction9(moduleProperties, type.parameters, type.returns), type) : IsIntersect3(type) ? CreateType2(FromIntersect20(moduleProperties, type.allOf), type) : IsIterator6(type) ? CreateType2(FromIterator9(moduleProperties, type.items), type) : IsObject7(type) ? CreateType2(FromObject18(moduleProperties, type.properties), type) : IsRecord3(type) ? CreateType2(FromRecord10(moduleProperties, type)) : IsTuple3(type) ? CreateType2(FromTuple14(moduleProperties, type.items || []), type) : IsUnion3(type) ? CreateType2(FromUnion24(moduleProperties, type.anyOf), type) : type;
|
|
26792
|
+
}
|
|
26793
|
+
function ComputeType2(moduleProperties, key) {
|
|
26794
|
+
return key in moduleProperties ? FromType4(moduleProperties, moduleProperties[key]) : Never2();
|
|
26795
|
+
}
|
|
26796
|
+
function ComputeModuleProperties2(moduleProperties) {
|
|
26797
|
+
return globalThis.Object.getOwnPropertyNames(moduleProperties).reduce((result, key) => {
|
|
26798
|
+
return { ...result, [key]: ComputeType2(moduleProperties, key) };
|
|
26799
|
+
}, {});
|
|
24344
26800
|
}
|
|
24345
26801
|
|
|
24346
|
-
|
|
24347
|
-
|
|
24348
|
-
|
|
24349
|
-
|
|
24350
|
-
|
|
24351
|
-
this
|
|
24352
|
-
}
|
|
24353
|
-
headers() {
|
|
24354
|
-
return {
|
|
24355
|
-
Authorization: `Bearer ${this.token}`,
|
|
24356
|
-
"Content-Type": "application/json"
|
|
24357
|
-
};
|
|
26802
|
+
// node_modules/@sinclair/typebox/build/esm/type/module/module.mjs
|
|
26803
|
+
class TModule2 {
|
|
26804
|
+
constructor($defs) {
|
|
26805
|
+
const computed = ComputeModuleProperties2($defs);
|
|
26806
|
+
const identified = this.WithIdentifiers(computed);
|
|
26807
|
+
this.$defs = identified;
|
|
24358
26808
|
}
|
|
24359
|
-
|
|
24360
|
-
const
|
|
24361
|
-
|
|
24362
|
-
if (maxResponseBytes !== undefined && maxJsonBytes !== undefined) {
|
|
24363
|
-
throw new RangeError("HTTP response limit options are mutually exclusive");
|
|
24364
|
-
}
|
|
24365
|
-
let response;
|
|
24366
|
-
try {
|
|
24367
|
-
response = await fetchWithRetry(`${this.baseUrl}${path}`, {
|
|
24368
|
-
method: "GET",
|
|
24369
|
-
headers: this.headers()
|
|
24370
|
-
});
|
|
24371
|
-
} catch (error) {
|
|
24372
|
-
return transportFailure(error);
|
|
24373
|
-
}
|
|
24374
|
-
if (maxJsonBytes !== undefined) {
|
|
24375
|
-
try {
|
|
24376
|
-
const data = await strictBoundedResponseJson(response, maxJsonBytes);
|
|
24377
|
-
return { ok: response.ok, status: response.status, data };
|
|
24378
|
-
} catch {
|
|
24379
|
-
return responseBodyFailure(response.status);
|
|
24380
|
-
}
|
|
24381
|
-
}
|
|
24382
|
-
if (maxResponseBytes !== undefined) {
|
|
24383
|
-
const data = await boundedResponseJson(response, maxResponseBytes);
|
|
24384
|
-
return { ok: response.ok, status: response.status, data };
|
|
24385
|
-
}
|
|
24386
|
-
const data = await response.json().catch(() => null);
|
|
24387
|
-
return { ok: response.ok, status: response.status, data };
|
|
26809
|
+
Import(key, options) {
|
|
26810
|
+
const $defs = { ...this.$defs, [key]: CreateType2(this.$defs[key], options) };
|
|
26811
|
+
return CreateType2({ [Kind2]: "Import", $defs, $ref: key });
|
|
24388
26812
|
}
|
|
24389
|
-
|
|
24390
|
-
|
|
24391
|
-
|
|
24392
|
-
|
|
24393
|
-
let response;
|
|
24394
|
-
try {
|
|
24395
|
-
response = await fetchWithRetry(`${this.baseUrl}${path}`, {
|
|
24396
|
-
method: "POST",
|
|
24397
|
-
headers: this.headers(),
|
|
24398
|
-
body: body ? JSON.stringify(body) : undefined
|
|
24399
|
-
}, timeoutMs);
|
|
24400
|
-
} catch (error) {
|
|
24401
|
-
return transportFailure(error);
|
|
24402
|
-
}
|
|
24403
|
-
if (maxJsonBytes !== undefined) {
|
|
24404
|
-
try {
|
|
24405
|
-
const data = await strictBoundedResponseJson(response, maxJsonBytes, responseTimeoutMs);
|
|
24406
|
-
return { ok: response.ok, status: response.status, data };
|
|
24407
|
-
} catch {
|
|
24408
|
-
return responseBodyFailure(response.status);
|
|
24409
|
-
}
|
|
24410
|
-
}
|
|
24411
|
-
const data = await response.json().catch(() => null);
|
|
24412
|
-
return { ok: response.ok, status: response.status, data };
|
|
26813
|
+
WithIdentifiers($defs) {
|
|
26814
|
+
return globalThis.Object.getOwnPropertyNames($defs).reduce((result, key) => {
|
|
26815
|
+
return { ...result, [key]: { ...$defs[key], $id: key } };
|
|
26816
|
+
}, {});
|
|
24413
26817
|
}
|
|
24414
|
-
|
|
24415
|
-
|
|
24416
|
-
|
|
24417
|
-
|
|
24418
|
-
|
|
24419
|
-
|
|
24420
|
-
|
|
24421
|
-
|
|
24422
|
-
|
|
24423
|
-
|
|
24424
|
-
|
|
24425
|
-
|
|
24426
|
-
|
|
24427
|
-
|
|
24428
|
-
|
|
24429
|
-
|
|
24430
|
-
|
|
24431
|
-
|
|
24432
|
-
|
|
24433
|
-
|
|
24434
|
-
|
|
24435
|
-
|
|
24436
|
-
|
|
24437
|
-
|
|
24438
|
-
|
|
24439
|
-
|
|
24440
|
-
|
|
24441
|
-
|
|
24442
|
-
|
|
24443
|
-
|
|
24444
|
-
|
|
24445
|
-
|
|
24446
|
-
|
|
24447
|
-
|
|
24448
|
-
|
|
26818
|
+
}
|
|
26819
|
+
function Module2(properties) {
|
|
26820
|
+
return new TModule2(properties);
|
|
26821
|
+
}
|
|
26822
|
+
|
|
26823
|
+
// node_modules/@sinclair/typebox/build/esm/type/not/not.mjs
|
|
26824
|
+
function Not3(type, options) {
|
|
26825
|
+
return CreateType2({ [Kind2]: "Not", not: type }, options);
|
|
26826
|
+
}
|
|
26827
|
+
|
|
26828
|
+
// node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs
|
|
26829
|
+
function Parameters2(schema, options) {
|
|
26830
|
+
return IsFunction6(schema) ? Tuple2(schema.parameters, options) : Never2();
|
|
26831
|
+
}
|
|
26832
|
+
|
|
26833
|
+
// node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.mjs
|
|
26834
|
+
var Ordinal2 = 0;
|
|
26835
|
+
function Recursive2(callback, options = {}) {
|
|
26836
|
+
if (IsUndefined5(options.$id))
|
|
26837
|
+
options.$id = `T${Ordinal2++}`;
|
|
26838
|
+
const thisType = CloneType2(callback({ [Kind2]: "This", $ref: `${options.$id}` }));
|
|
26839
|
+
thisType.$id = options.$id;
|
|
26840
|
+
return CreateType2({ [Hint2]: "Recursive", ...thisType }, options);
|
|
26841
|
+
}
|
|
26842
|
+
|
|
26843
|
+
// node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.mjs
|
|
26844
|
+
function RegExp3(unresolved, options) {
|
|
26845
|
+
const expr = IsString5(unresolved) ? new globalThis.RegExp(unresolved) : unresolved;
|
|
26846
|
+
return CreateType2({ [Kind2]: "RegExp", type: "RegExp", source: expr.source, flags: expr.flags }, options);
|
|
26847
|
+
}
|
|
26848
|
+
|
|
26849
|
+
// node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs
|
|
26850
|
+
function RestResolve2(T) {
|
|
26851
|
+
return IsIntersect3(T) ? T.allOf : IsUnion3(T) ? T.anyOf : IsTuple3(T) ? T.items ?? [] : [];
|
|
26852
|
+
}
|
|
26853
|
+
function Rest2(T) {
|
|
26854
|
+
return RestResolve2(T);
|
|
26855
|
+
}
|
|
26856
|
+
|
|
26857
|
+
// node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs
|
|
26858
|
+
function ReturnType2(schema, options) {
|
|
26859
|
+
return IsFunction6(schema) ? CreateType2(schema.returns, options) : Never2(options);
|
|
26860
|
+
}
|
|
26861
|
+
|
|
26862
|
+
// node_modules/@sinclair/typebox/build/esm/type/transform/transform.mjs
|
|
26863
|
+
class TransformDecodeBuilder2 {
|
|
26864
|
+
constructor(schema) {
|
|
26865
|
+
this.schema = schema;
|
|
24449
26866
|
}
|
|
24450
|
-
|
|
24451
|
-
|
|
24452
|
-
try {
|
|
24453
|
-
const headers = { Authorization: `Bearer ${this.token}` };
|
|
24454
|
-
const res = await fetchWithRetry(`${this.baseUrl}${path}`, {
|
|
24455
|
-
method: "POST",
|
|
24456
|
-
headers,
|
|
24457
|
-
body: formData
|
|
24458
|
-
}, timeoutMs);
|
|
24459
|
-
const data = await res.json().catch(() => null);
|
|
24460
|
-
return { ok: res.ok, status: res.status, data };
|
|
24461
|
-
} catch (error) {
|
|
24462
|
-
return transportFailure(error);
|
|
24463
|
-
}
|
|
26867
|
+
Decode(decode) {
|
|
26868
|
+
return new TransformEncodeBuilder2(this.schema, decode);
|
|
24464
26869
|
}
|
|
24465
|
-
|
|
24466
|
-
|
|
24467
|
-
|
|
24468
|
-
|
|
24469
|
-
|
|
24470
|
-
|
|
24471
|
-
});
|
|
24472
|
-
const data = await res.json().catch(() => null);
|
|
24473
|
-
return { ok: res.ok, status: res.status, data };
|
|
24474
|
-
} catch (error) {
|
|
24475
|
-
return transportFailure(error);
|
|
24476
|
-
}
|
|
26870
|
+
}
|
|
26871
|
+
|
|
26872
|
+
class TransformEncodeBuilder2 {
|
|
26873
|
+
constructor(schema, decode) {
|
|
26874
|
+
this.schema = schema;
|
|
26875
|
+
this.decode = decode;
|
|
24477
26876
|
}
|
|
24478
|
-
|
|
24479
|
-
|
|
24480
|
-
|
|
24481
|
-
|
|
24482
|
-
|
|
24483
|
-
body: body ? JSON.stringify(body) : undefined
|
|
24484
|
-
});
|
|
24485
|
-
const data = await res.json().catch(() => null);
|
|
24486
|
-
return { ok: res.ok, status: res.status, data };
|
|
24487
|
-
} catch (error) {
|
|
24488
|
-
return transportFailure(error);
|
|
24489
|
-
}
|
|
26877
|
+
EncodeTransform(encode, schema) {
|
|
26878
|
+
const Encode = (value) => schema[TransformKind2].Encode(encode(value));
|
|
26879
|
+
const Decode = (value) => this.decode(schema[TransformKind2].Decode(value));
|
|
26880
|
+
const Codec = { Encode, Decode };
|
|
26881
|
+
return { ...schema, [TransformKind2]: Codec };
|
|
24490
26882
|
}
|
|
24491
|
-
|
|
24492
|
-
|
|
24493
|
-
|
|
24494
|
-
method: "DELETE",
|
|
24495
|
-
headers: this.headers()
|
|
24496
|
-
});
|
|
24497
|
-
const data = await res.json().catch(() => null);
|
|
24498
|
-
return { ok: res.ok, status: res.status, data };
|
|
24499
|
-
} catch (error) {
|
|
24500
|
-
return transportFailure(error);
|
|
24501
|
-
}
|
|
26883
|
+
EncodeSchema(encode, schema) {
|
|
26884
|
+
const Codec = { Decode: this.decode, Encode: encode };
|
|
26885
|
+
return { ...schema, [TransformKind2]: Codec };
|
|
24502
26886
|
}
|
|
24503
|
-
|
|
24504
|
-
|
|
24505
|
-
return res?.ok ?? false;
|
|
26887
|
+
Encode(encode) {
|
|
26888
|
+
return IsTransform3(this.schema) ? this.EncodeTransform(encode, this.schema) : this.EncodeSchema(encode, this.schema);
|
|
24506
26889
|
}
|
|
24507
26890
|
}
|
|
26891
|
+
function Transform2(schema) {
|
|
26892
|
+
return new TransformDecodeBuilder2(schema);
|
|
26893
|
+
}
|
|
24508
26894
|
|
|
24509
|
-
//
|
|
24510
|
-
|
|
24511
|
-
|
|
24512
|
-
|
|
24513
|
-
|
|
26895
|
+
// node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs
|
|
26896
|
+
function Unsafe2(options = {}) {
|
|
26897
|
+
return CreateType2({ [Kind2]: options[Kind2] ?? "Unsafe" }, options);
|
|
26898
|
+
}
|
|
26899
|
+
|
|
26900
|
+
// node_modules/@sinclair/typebox/build/esm/type/void/void.mjs
|
|
26901
|
+
function Void2(options) {
|
|
26902
|
+
return CreateType2({ [Kind2]: "Void", type: "void" }, options);
|
|
26903
|
+
}
|
|
26904
|
+
|
|
26905
|
+
// node_modules/@sinclair/typebox/build/esm/type/type/type.mjs
|
|
26906
|
+
var exports_type5 = {};
|
|
26907
|
+
__export(exports_type5, {
|
|
26908
|
+
Any: () => Any2,
|
|
26909
|
+
Argument: () => Argument2,
|
|
26910
|
+
Array: () => Array3,
|
|
26911
|
+
AsyncIterator: () => AsyncIterator2,
|
|
26912
|
+
Awaited: () => Awaited2,
|
|
26913
|
+
BigInt: () => BigInt3,
|
|
26914
|
+
Boolean: () => Boolean3,
|
|
26915
|
+
Capitalize: () => Capitalize2,
|
|
26916
|
+
Composite: () => Composite2,
|
|
26917
|
+
Const: () => Const2,
|
|
26918
|
+
Constructor: () => Constructor2,
|
|
26919
|
+
ConstructorParameters: () => ConstructorParameters2,
|
|
26920
|
+
Date: () => Date3,
|
|
26921
|
+
Enum: () => Enum2,
|
|
26922
|
+
Exclude: () => Exclude2,
|
|
26923
|
+
Extends: () => Extends2,
|
|
26924
|
+
Extract: () => Extract2,
|
|
26925
|
+
Function: () => Function3,
|
|
26926
|
+
Index: () => Index2,
|
|
26927
|
+
InstanceType: () => InstanceType2,
|
|
26928
|
+
Instantiate: () => Instantiate2,
|
|
26929
|
+
Integer: () => Integer2,
|
|
26930
|
+
Intersect: () => Intersect3,
|
|
26931
|
+
Iterator: () => Iterator2,
|
|
26932
|
+
KeyOf: () => KeyOf2,
|
|
26933
|
+
Literal: () => Literal2,
|
|
26934
|
+
Lowercase: () => Lowercase2,
|
|
26935
|
+
Mapped: () => Mapped2,
|
|
26936
|
+
Module: () => Module2,
|
|
26937
|
+
Never: () => Never2,
|
|
26938
|
+
Not: () => Not3,
|
|
26939
|
+
Null: () => Null2,
|
|
26940
|
+
Number: () => Number3,
|
|
26941
|
+
Object: () => Object3,
|
|
26942
|
+
Omit: () => Omit2,
|
|
26943
|
+
Optional: () => Optional2,
|
|
26944
|
+
Parameters: () => Parameters2,
|
|
26945
|
+
Partial: () => Partial2,
|
|
26946
|
+
Pick: () => Pick2,
|
|
26947
|
+
Promise: () => Promise3,
|
|
26948
|
+
Readonly: () => Readonly2,
|
|
26949
|
+
ReadonlyOptional: () => ReadonlyOptional2,
|
|
26950
|
+
Record: () => Record2,
|
|
26951
|
+
Recursive: () => Recursive2,
|
|
26952
|
+
Ref: () => Ref2,
|
|
26953
|
+
RegExp: () => RegExp3,
|
|
26954
|
+
Required: () => Required2,
|
|
26955
|
+
Rest: () => Rest2,
|
|
26956
|
+
ReturnType: () => ReturnType2,
|
|
26957
|
+
String: () => String3,
|
|
26958
|
+
Symbol: () => Symbol3,
|
|
26959
|
+
TemplateLiteral: () => TemplateLiteral2,
|
|
26960
|
+
Transform: () => Transform2,
|
|
26961
|
+
Tuple: () => Tuple2,
|
|
26962
|
+
Uint8Array: () => Uint8Array3,
|
|
26963
|
+
Uncapitalize: () => Uncapitalize2,
|
|
26964
|
+
Undefined: () => Undefined2,
|
|
26965
|
+
Union: () => Union3,
|
|
26966
|
+
Unknown: () => Unknown2,
|
|
26967
|
+
Unsafe: () => Unsafe2,
|
|
26968
|
+
Uppercase: () => Uppercase2,
|
|
26969
|
+
Void: () => Void2
|
|
26970
|
+
});
|
|
26971
|
+
|
|
26972
|
+
// node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
|
|
26973
|
+
var Type2 = exports_type5;
|
|
24514
26974
|
|
|
24515
26975
|
// src/shared/releases/local-upgrade-transfer.ts
|
|
24516
26976
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
@@ -24548,7 +27008,7 @@ import { get } from "node:https";
|
|
|
24548
27008
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
24549
27009
|
import { basename, delimiter, isAbsolute, join } from "node:path";
|
|
24550
27010
|
import { pipeline } from "node:stream/promises";
|
|
24551
|
-
import { Transform as
|
|
27011
|
+
import { Transform as Transform3 } from "node:stream";
|
|
24552
27012
|
|
|
24553
27013
|
// ../management-api/src/release-manifest.ts
|
|
24554
27014
|
var RELEASE_MANIFEST_NAME = "SUPACLOUD-RELEASE.json";
|
|
@@ -24953,7 +27413,7 @@ function assertOfficialDownloadUrl(url) {
|
|
|
24953
27413
|
}
|
|
24954
27414
|
function boundedWriter(maxBytes) {
|
|
24955
27415
|
let receivedBytes = 0;
|
|
24956
|
-
return new
|
|
27416
|
+
return new Transform3({
|
|
24957
27417
|
transform(chunk, _encoding, callback) {
|
|
24958
27418
|
receivedBytes += chunk.length;
|
|
24959
27419
|
if (receivedBytes > maxBytes)
|
|
@@ -26687,7 +29147,7 @@ var BINARY_PROBES = {
|
|
|
26687
29147
|
}
|
|
26688
29148
|
};
|
|
26689
29149
|
function hostnameSchema(fieldName) {
|
|
26690
|
-
return decodedSchema(
|
|
29150
|
+
return decodedSchema(Type2.String(), Type2.String({ minLength: 1, maxLength: 253 }), (value) => {
|
|
26691
29151
|
const normalized = value.trim();
|
|
26692
29152
|
if (!SAFE_HOSTNAME.test(normalized))
|
|
26693
29153
|
throw new Error(`Invalid ${fieldName}`);
|
|
@@ -26695,7 +29155,7 @@ function hostnameSchema(fieldName) {
|
|
|
26695
29155
|
});
|
|
26696
29156
|
}
|
|
26697
29157
|
function secretSchema(fieldName) {
|
|
26698
|
-
return decodedSchema(
|
|
29158
|
+
return decodedSchema(Type2.String(), Type2.String({ minLength: 12, maxLength: 256 }), (value) => {
|
|
26699
29159
|
if (value.length < 12)
|
|
26700
29160
|
throw new Error(`${fieldName} must contain at least 12 characters`);
|
|
26701
29161
|
if (value.length > 256)
|
|
@@ -27554,32 +30014,32 @@ Actions: ping, setup, install, upgrade, upgrade_status, versions, diagnose, exec
|
|
|
27554
30014
|
"tenant_diagnose",
|
|
27555
30015
|
"tenant_migrate"
|
|
27556
30016
|
]), "Action to perform"),
|
|
27557
|
-
command: optional(
|
|
27558
|
-
timeout_seconds: optional(
|
|
30017
|
+
command: optional(Type2.String(), "[exec] Restricted shell command to execute"),
|
|
30018
|
+
timeout_seconds: optional(Type2.Number(), "[exec] Timeout in seconds (default: 60)"),
|
|
27559
30019
|
public_domain: optional(hostnameSchema("public_domain"), "[install] API domain, e.g. api.example.com"),
|
|
27560
30020
|
studio_domain: optional(hostnameSchema("studio_domain"), "[install] Studio domain"),
|
|
27561
30021
|
postgres_password: optional(secretSchema("postgres_password"), "[install] DB password (auto-generated if empty)"),
|
|
27562
30022
|
dashboard_password: optional(secretSchema("dashboard_password"), "[install] Console password"),
|
|
27563
30023
|
edge_runtime: optional(stringEnum(["bun"]), "[install] Runtime (default: bun)"),
|
|
27564
|
-
edge_max_body_size_mb: optional(
|
|
30024
|
+
edge_max_body_size_mb: optional(Type2.Integer({ minimum: 1, maximum: 10240 }), "[install] Max Edge Runtime upload / request body size in MB (default: 30)"),
|
|
27565
30025
|
storage_type: optional(stringEnum(["juicefs", "minio"]), "[install] Storage backend configurable through Admin"),
|
|
27566
|
-
transaction_id: optional(
|
|
27567
|
-
version: optional(
|
|
27568
|
-
edge_runtime_version: optional(
|
|
30026
|
+
transaction_id: optional(Type2.String(), "[upgrade_status] UUID v4 transaction ID of a retained local-artifact upgrade"),
|
|
30027
|
+
version: optional(Type2.String(), "[upgrade] Specific version"),
|
|
30028
|
+
edge_runtime_version: optional(Type2.String(), "[upgrade] Exact independent Edge Runtime version"),
|
|
27569
30029
|
artifact_transport: optional(stringEnum(["local", "remote"]), "[upgrade] Download verified release assets locally or on the server (default: remote)"),
|
|
27570
|
-
github_proxy: optional(
|
|
30030
|
+
github_proxy: optional(Type2.String(), "[install/upgrade] Explicit GitHub proxy prefix, or direct/none"),
|
|
27571
30031
|
focus: optional(stringEnum(["all", "containers", "database", "network", "disk", "logs"]), "[troubleshoot] Focus area"),
|
|
27572
|
-
before: optional(
|
|
27573
|
-
keep_latest: optional(
|
|
27574
|
-
plan_sha256: optional(
|
|
27575
|
-
container: optional(
|
|
27576
|
-
lines: optional(
|
|
27577
|
-
project_ref: optional(
|
|
30032
|
+
before: optional(Type2.String(), "[backup_cleanup_*] Delete only completed rollback directories finished before YYYY-MM-DD"),
|
|
30033
|
+
keep_latest: optional(Type2.Number(), "[backup_cleanup_*] Keep this many newest completed rollback directories (default: 2)"),
|
|
30034
|
+
plan_sha256: optional(Type2.String(), "[backup_cleanup_apply] Exact plan_sha256 returned by backup_cleanup_plan"),
|
|
30035
|
+
container: optional(Type2.String(), "[container_logs] Container name"),
|
|
30036
|
+
lines: optional(Type2.Number(), "[container_logs] Number of log lines (default: 100)"),
|
|
30037
|
+
project_ref: optional(Type2.String(), "[tenant_*] Project reference ID"),
|
|
27578
30038
|
tenant_action: optional(stringEnum(["start", "stop", "restart", "status"]), "[tenant_manage] Action"),
|
|
27579
|
-
source_ref: optional(
|
|
27580
|
-
target_ref: optional(
|
|
27581
|
-
schemas: optional(
|
|
27582
|
-
data_only: optional(
|
|
30039
|
+
source_ref: optional(Type2.String(), "[tenant_migrate] Source tenant"),
|
|
30040
|
+
target_ref: optional(Type2.String(), "[tenant_migrate] Target tenant"),
|
|
30041
|
+
schemas: optional(Type2.String(), "[tenant_migrate] Schemas (default: public,auth,storage)"),
|
|
30042
|
+
data_only: optional(Type2.Boolean(), "[tenant_migrate] Data only, no structure")
|
|
27583
30043
|
}, async (args) => {
|
|
27584
30044
|
const { action } = args;
|
|
27585
30045
|
let text;
|
|
@@ -28298,13 +30758,13 @@ function registerAdvancedTools(server, http) {
|
|
|
28298
30758
|
server.tool("edge_functions", `Edge Function management (Deno/Bun serverless). Server auto-bundles dependencies.
|
|
28299
30759
|
Actions: list, deploy, deploy_bundle, source, delete, check`, {
|
|
28300
30760
|
action: withDescription(stringEnum(["list", "deploy", "deploy_bundle", "source", "delete", "check"]), "Action"),
|
|
28301
|
-
ref: withDescription(
|
|
28302
|
-
slug: optional(
|
|
28303
|
-
code: optional(
|
|
28304
|
-
path: optional(
|
|
28305
|
-
files: optional(
|
|
28306
|
-
entrypoint: optional(
|
|
28307
|
-
minify: optional(
|
|
30761
|
+
ref: withDescription(Type2.String(), "Project ref"),
|
|
30762
|
+
slug: optional(Type2.String(), "[deploy/deploy_bundle/source/delete/check] Function name"),
|
|
30763
|
+
code: optional(Type2.String(), "[deploy/check] Function source code (TypeScript)"),
|
|
30764
|
+
path: optional(Type2.String(), "[deploy/check] Local file path to read code from (alternative to code)"),
|
|
30765
|
+
files: optional(Type2.Record(Type2.String(), Type2.String()), "[deploy_bundle] File map: { 'index.ts': '...', '_shared/x.ts': '...' }"),
|
|
30766
|
+
entrypoint: optional(Type2.String(), "[deploy_bundle] Entrypoint file (default: index.ts)"),
|
|
30767
|
+
minify: optional(Type2.Boolean(), "[deploy/deploy_bundle] Minify bundle")
|
|
28308
30768
|
}, async (args) => {
|
|
28309
30769
|
const { action, ref, slug, path: pathArg, files, entrypoint, minify } = args;
|
|
28310
30770
|
let code = args.code;
|
|
@@ -28410,9 +30870,9 @@ ${deployCheck.err}`;
|
|
|
28410
30870
|
server.tool("secrets", `Project secrets (environment variables for Edge Functions).
|
|
28411
30871
|
Actions: list, upsert, delete`, {
|
|
28412
30872
|
action: withDescription(stringEnum(["list", "upsert", "delete"]), "Action"),
|
|
28413
|
-
ref: withDescription(
|
|
28414
|
-
secrets: optional(
|
|
28415
|
-
name: optional(
|
|
30873
|
+
ref: withDescription(Type2.String(), "Project ref"),
|
|
30874
|
+
secrets: optional(Type2.Array(Type2.Object({ name: Type2.String(), value: Type2.String() })), "[upsert] Secret list: [{name:'KEY', value:'...'}]"),
|
|
30875
|
+
name: optional(Type2.String(), "[delete] Secret name to delete")
|
|
28416
30876
|
}, async (args) => {
|
|
28417
30877
|
const { action, ref, secrets, name } = args;
|
|
28418
30878
|
let text;
|
|
@@ -28449,13 +30909,13 @@ Actions: metrics, list_backups, create_backup, list_logical_backups, create_logi
|
|
|
28449
30909
|
"list_orgs",
|
|
28450
30910
|
"get_org"
|
|
28451
30911
|
]), "Action"),
|
|
28452
|
-
ref: optional(
|
|
30912
|
+
ref: optional(Type2.String(), "[*] Project ref for project-scoped platform actions"),
|
|
28453
30913
|
backup_type: optional(stringEnum(["full"]), "[create_backup] Explicit physical backup type"),
|
|
28454
|
-
backup_id: optional(
|
|
28455
|
-
expected_sha256: optional(
|
|
28456
|
-
confirmation: optional(
|
|
28457
|
-
slug: optional(
|
|
28458
|
-
allowed_cidrs: optional(
|
|
30914
|
+
backup_id: optional(Type2.String(), "[restore_logical_backup] Verified logical backup ID"),
|
|
30915
|
+
expected_sha256: optional(Type2.String(), "[restore_logical_backup] Exact lowercase backup SHA-256"),
|
|
30916
|
+
confirmation: optional(Type2.String(), "[restore_logical_backup] Exact RESTORE_PROJECT:<ref>:<backup_id>:<sha256> confirmation"),
|
|
30917
|
+
slug: optional(Type2.String(), "[get_org] Organization slug"),
|
|
30918
|
+
allowed_cidrs: optional(Type2.Array(Type2.String()), "[update_network] Allowed CIDRs")
|
|
28459
30919
|
}, async (args) => {
|
|
28460
30920
|
const {
|
|
28461
30921
|
action,
|
|
@@ -29801,17 +32261,17 @@ function registerAdminProjectCliTools(server, http, options = {}) {
|
|
|
29801
32261
|
"runtime_snapshot",
|
|
29802
32262
|
"service_control"
|
|
29803
32263
|
]), "Action to perform"),
|
|
29804
|
-
ref: optional(
|
|
29805
|
-
name: optional(
|
|
29806
|
-
region: optional(
|
|
29807
|
-
organization_id: optional(
|
|
29808
|
-
domain: optional(
|
|
29809
|
-
api_domain: optional(
|
|
29810
|
-
auth_domain: optional(
|
|
29811
|
-
studio_domain: optional(
|
|
29812
|
-
env_file: optional(
|
|
32264
|
+
ref: optional(Type2.String(), "[*] Project ref (required for most actions except 'list', 'list_endpoints', and 'create')"),
|
|
32265
|
+
name: optional(Type2.String(), "[create] Project name"),
|
|
32266
|
+
region: optional(Type2.String(), "[create] Region (default: local)"),
|
|
32267
|
+
organization_id: optional(Type2.String(), "[create] Organization ID"),
|
|
32268
|
+
domain: optional(Type2.String(), "[create] Base custom domain"),
|
|
32269
|
+
api_domain: optional(Type2.String(), "[create] Explicit API domain"),
|
|
32270
|
+
auth_domain: optional(Type2.String(), "[create] Explicit Auth/OIDC domain"),
|
|
32271
|
+
studio_domain: optional(Type2.String(), "[create] Explicit Studio domain"),
|
|
32272
|
+
env_file: optional(Type2.String(), "[create] Linux-only absolute new application env path for parent-bound service-role delivery (0600)"),
|
|
29813
32273
|
environment: optional(stringEnum(PROJECT_ENVIRONMENTS), "[create] Required with env_file; application credential environment"),
|
|
29814
|
-
settings: optional(
|
|
32274
|
+
settings: optional(Type2.Record(Type2.String(), Type2.Unknown()), "[update_settings] Config fields to update"),
|
|
29815
32275
|
log_type: optional(stringEnum(["all", "auth", "database", "api"]), "[logs] Filter by service"),
|
|
29816
32276
|
service: optional(stringEnum(PROJECT_SERVICE_NAMES), "[service_control] Canonical service name"),
|
|
29817
32277
|
service_action: optional(stringEnum(PROJECT_SERVICE_CONTROL_ACTIONS), "[service_control] Supported action for the selected service")
|
|
@@ -29967,7 +32427,7 @@ function registerAdminProjectCliTools(server, http, options = {}) {
|
|
|
29967
32427
|
});
|
|
29968
32428
|
}
|
|
29969
32429
|
|
|
29970
|
-
// src/shared/tools/gateway-tools.ts
|
|
32430
|
+
// ../cli/src/shared/tools/gateway-tools.ts
|
|
29971
32431
|
function parseCliStringArray(value) {
|
|
29972
32432
|
if (Array.isArray(value))
|
|
29973
32433
|
return value;
|
|
@@ -30075,7 +32535,7 @@ Actions: routes, upsert_route, update_route, delete_route, config, get_certifica
|
|
|
30075
32535
|
custom_hostname: optional(Type.String(), "[set_custom_hostname] 自定义域名")
|
|
30076
32536
|
}, async (args) => {
|
|
30077
32537
|
const resolveRef = (override) => {
|
|
30078
|
-
const ref = projectRef || override;
|
|
32538
|
+
const ref = options.refPriority === "project" ? projectRef || override : override || projectRef;
|
|
30079
32539
|
if (!ref)
|
|
30080
32540
|
throw new Error("'ref' is required for this action");
|
|
30081
32541
|
return ref;
|
|
@@ -30302,6 +32762,11 @@ Actions: routes, upsert_route, update_route, delete_route, config, get_certifica
|
|
|
30302
32762
|
});
|
|
30303
32763
|
}
|
|
30304
32764
|
|
|
32765
|
+
// src/shared/tools/gateway-tools.ts
|
|
32766
|
+
function registerGatewayTools2(server, http, options = {}) {
|
|
32767
|
+
registerGatewayTools(server, http, { ...options, refPriority: "project" });
|
|
32768
|
+
}
|
|
32769
|
+
|
|
30305
32770
|
// ../cli/src/shared/tools/frontend-release-control.ts
|
|
30306
32771
|
import { createHash as createHash3 } from "node:crypto";
|
|
30307
32772
|
import { constants as fsConstants2 } from "node:fs";
|
|
@@ -30718,15 +33183,15 @@ Actions: list_releases, get_release, upload_release, activate_release`, {
|
|
|
30718
33183
|
"upload_release",
|
|
30719
33184
|
"activate_release"
|
|
30720
33185
|
]), "Action"),
|
|
30721
|
-
ref: optional(
|
|
30722
|
-
id: optional(
|
|
30723
|
-
zip_path: optional(
|
|
30724
|
-
release_id: optional(
|
|
30725
|
-
expected_active_release_id: optional(
|
|
30726
|
-
expected_activation_id: optional(
|
|
30727
|
-
mutation_id: optional(
|
|
30728
|
-
cursor: optional(
|
|
30729
|
-
limit: optional(
|
|
33186
|
+
ref: optional(Type2.String(), "Project ref"),
|
|
33187
|
+
id: optional(Type2.String(), "Deployment ID"),
|
|
33188
|
+
zip_path: optional(Type2.String(), "[upload_release] Local ZIP file path"),
|
|
33189
|
+
release_id: optional(Type2.String(), "[get_release/activate_release] SHA-256 release ID"),
|
|
33190
|
+
expected_active_release_id: optional(Type2.String(), "[activate_release] Current release SHA-256 or absent"),
|
|
33191
|
+
expected_activation_id: optional(Type2.String(), "[activate_release] Current activation UUIDv4 or absent"),
|
|
33192
|
+
mutation_id: optional(Type2.String(), "[activate_release] Required retry-stable UUIDv4"),
|
|
33193
|
+
cursor: optional(Type2.String(), "[list_releases] Last release SHA-256 cursor"),
|
|
33194
|
+
limit: optional(Type2.Number(), "[list_releases] Page size, 1-100 (default 50)")
|
|
30730
33195
|
}, async (args) => {
|
|
30731
33196
|
const {
|
|
30732
33197
|
action,
|
|
@@ -30782,7 +33247,7 @@ Actions: list_releases, get_release, upload_release, activate_release`, {
|
|
|
30782
33247
|
// package.json
|
|
30783
33248
|
var package_default = {
|
|
30784
33249
|
name: "@supacloud/admin",
|
|
30785
|
-
version: "0.
|
|
33250
|
+
version: "0.23.1",
|
|
30786
33251
|
description: "Platform administration CLI for SupaCloud operators",
|
|
30787
33252
|
type: "module",
|
|
30788
33253
|
main: "./dist/index.js",
|
|
@@ -30790,6 +33255,8 @@ var package_default = {
|
|
|
30790
33255
|
"supacloud-admin": "dist/index.js"
|
|
30791
33256
|
},
|
|
30792
33257
|
files: [
|
|
33258
|
+
"NOTICE",
|
|
33259
|
+
"LICENSE-APACHE-2.0.txt",
|
|
30793
33260
|
"dist",
|
|
30794
33261
|
"README.md"
|
|
30795
33262
|
],
|
|
@@ -30805,7 +33272,7 @@ var package_default = {
|
|
|
30805
33272
|
"ssh",
|
|
30806
33273
|
"ops"
|
|
30807
33274
|
],
|
|
30808
|
-
license: "
|
|
33275
|
+
license: "AGPL-3.0-only",
|
|
30809
33276
|
repository: {
|
|
30810
33277
|
type: "git",
|
|
30811
33278
|
url: "https://github.com/vibeunion/supacloud.git",
|
|
@@ -30813,7 +33280,7 @@ var package_default = {
|
|
|
30813
33280
|
},
|
|
30814
33281
|
dependencies: {
|
|
30815
33282
|
"@sinclair/typebox": "^0.34.52",
|
|
30816
|
-
"@supacloud/cli": "0.
|
|
33283
|
+
"@supacloud/cli": "0.58.4",
|
|
30817
33284
|
ssh2: "^1.17.0"
|
|
30818
33285
|
},
|
|
30819
33286
|
devDependencies: {
|
|
@@ -30852,7 +33319,7 @@ function unavailableAdminSchemas() {
|
|
|
30852
33319
|
return {
|
|
30853
33320
|
project: captureTools((server) => registerAdminProjectCliTools(server, schemaOnlyHttp)).project.schema,
|
|
30854
33321
|
platform: captureTools((server) => registerAdvancedTools(server, schemaOnlyHttp)).platform.schema,
|
|
30855
|
-
gateway: captureTools((server) =>
|
|
33322
|
+
gateway: captureTools((server) => registerGatewayTools2(server, schemaOnlyHttp)).gateway.schema,
|
|
30856
33323
|
frontend: captureTools((server) => registerFrontendTools(server, schemaOnlyHttp)).frontend.schema,
|
|
30857
33324
|
ssh: captureTools((server) => registerSshTools(server, {})).ssh.schema
|
|
30858
33325
|
};
|
|
@@ -31016,7 +33483,7 @@ function createAdminTools(context = resolveSupaCloudContext(), confirmProduction
|
|
|
31016
33483
|
token: context.apiToken
|
|
31017
33484
|
});
|
|
31018
33485
|
Object.assign(tools, captureTools((server) => registerAdminProjectCliTools(server, http)));
|
|
31019
|
-
Object.assign(tools, captureTools((server) =>
|
|
33486
|
+
Object.assign(tools, captureTools((server) => registerGatewayTools2(server, http)));
|
|
31020
33487
|
Object.assign(tools, captureTools((server) => registerFrontendTools(server, http)));
|
|
31021
33488
|
const advancedTools = captureTools((server) => registerAdvancedTools(server, http));
|
|
31022
33489
|
if (advancedTools.platform) {
|