@absolutejs/sync-loro 0.0.4 → 0.0.5
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/dist/index.js +3 -18
- package/dist/index.js.map +2 -2
- package/dist/manifest.js +339 -347
- package/dist/manifest.js.map +15 -15
- package/package.json +5 -15
package/dist/manifest.js
CHANGED
|
@@ -14,7 +14,7 @@ var __export = (target, all) => {
|
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
17
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/value/guard/guard.mjs
|
|
18
18
|
function IsObject(value) {
|
|
19
19
|
return value !== null && typeof value === "object";
|
|
20
20
|
}
|
|
@@ -28,61 +28,39 @@ function IsNumber(value) {
|
|
|
28
28
|
return typeof value === "number";
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
31
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/system/policy.mjs
|
|
32
32
|
var TypeSystemPolicy;
|
|
33
|
-
(function(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
(function(TypeSystemPolicy) {
|
|
34
|
+
TypeSystemPolicy.InstanceMode = "default";
|
|
35
|
+
TypeSystemPolicy.ExactOptionalPropertyTypes = false;
|
|
36
|
+
TypeSystemPolicy.AllowArrayObject = false;
|
|
37
|
+
TypeSystemPolicy.AllowNaN = false;
|
|
38
|
+
TypeSystemPolicy.AllowNullVoid = false;
|
|
39
39
|
function IsExactOptionalProperty(value, key) {
|
|
40
|
-
return
|
|
40
|
+
return TypeSystemPolicy.ExactOptionalPropertyTypes ? key in value : value[key] !== undefined;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
TypeSystemPolicy.IsExactOptionalProperty = IsExactOptionalProperty;
|
|
43
43
|
function IsObjectLike(value) {
|
|
44
44
|
const isObject = IsObject(value);
|
|
45
|
-
return
|
|
45
|
+
return TypeSystemPolicy.AllowArrayObject ? isObject : isObject && !IsArray(value);
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
TypeSystemPolicy.IsObjectLike = IsObjectLike;
|
|
48
48
|
function IsRecordLike(value) {
|
|
49
49
|
return IsObjectLike(value) && !(value instanceof Date) && !(value instanceof Uint8Array);
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
TypeSystemPolicy.IsRecordLike = IsRecordLike;
|
|
52
52
|
function IsNumberLike(value) {
|
|
53
|
-
return
|
|
53
|
+
return TypeSystemPolicy.AllowNaN ? IsNumber(value) : Number.isFinite(value);
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
TypeSystemPolicy.IsNumberLike = IsNumberLike;
|
|
56
56
|
function IsVoidLike(value) {
|
|
57
57
|
const isUndefined = IsUndefined(value);
|
|
58
|
-
return
|
|
58
|
+
return TypeSystemPolicy.AllowNullVoid ? isUndefined || value === null : isUndefined;
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
TypeSystemPolicy.IsVoidLike = IsVoidLike;
|
|
61
61
|
})(TypeSystemPolicy || (TypeSystemPolicy = {}));
|
|
62
62
|
|
|
63
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
64
|
-
var exports_value = {};
|
|
65
|
-
__export(exports_value, {
|
|
66
|
-
IsUndefined: () => IsUndefined2,
|
|
67
|
-
IsUint8Array: () => IsUint8Array,
|
|
68
|
-
IsSymbol: () => IsSymbol,
|
|
69
|
-
IsString: () => IsString,
|
|
70
|
-
IsRegExp: () => IsRegExp,
|
|
71
|
-
IsObject: () => IsObject2,
|
|
72
|
-
IsNumber: () => IsNumber2,
|
|
73
|
-
IsNull: () => IsNull,
|
|
74
|
-
IsIterator: () => IsIterator,
|
|
75
|
-
IsFunction: () => IsFunction,
|
|
76
|
-
IsDate: () => IsDate,
|
|
77
|
-
IsBoolean: () => IsBoolean,
|
|
78
|
-
IsBigInt: () => IsBigInt,
|
|
79
|
-
IsAsyncIterator: () => IsAsyncIterator,
|
|
80
|
-
IsArray: () => IsArray2,
|
|
81
|
-
HasPropertyKey: () => HasPropertyKey
|
|
82
|
-
});
|
|
83
|
-
function HasPropertyKey(value, key) {
|
|
84
|
-
return key in value;
|
|
85
|
-
}
|
|
63
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
|
|
86
64
|
function IsAsyncIterator(value) {
|
|
87
65
|
return IsObject2(value) && !IsArray2(value) && !IsUint8Array(value) && Symbol.asyncIterator in value;
|
|
88
66
|
}
|
|
@@ -129,9 +107,9 @@ function IsUndefined2(value) {
|
|
|
129
107
|
return value === undefined;
|
|
130
108
|
}
|
|
131
109
|
|
|
132
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
110
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/create/immutable.mjs
|
|
133
111
|
function ImmutableArray(value) {
|
|
134
|
-
return globalThis.Object.freeze(value).map((
|
|
112
|
+
return globalThis.Object.freeze(value).map((value) => Immutable(value));
|
|
135
113
|
}
|
|
136
114
|
function ImmutableDate(value) {
|
|
137
115
|
return value;
|
|
@@ -156,9 +134,9 @@ function Immutable(value) {
|
|
|
156
134
|
return IsArray2(value) ? ImmutableArray(value) : IsDate(value) ? ImmutableDate(value) : IsUint8Array(value) ? ImmutableUint8Array(value) : IsRegExp(value) ? ImmutableRegExp(value) : IsObject2(value) ? ImmutableObject(value) : value;
|
|
157
135
|
}
|
|
158
136
|
|
|
159
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
137
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/clone/value.mjs
|
|
160
138
|
function ArrayType(value) {
|
|
161
|
-
return value.map((
|
|
139
|
+
return value.map((value) => Visit(value));
|
|
162
140
|
}
|
|
163
141
|
function DateType(value) {
|
|
164
142
|
return new Date(value.getTime());
|
|
@@ -186,7 +164,7 @@ function Clone(value) {
|
|
|
186
164
|
return Visit(value);
|
|
187
165
|
}
|
|
188
166
|
|
|
189
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
167
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/create/type.mjs
|
|
190
168
|
function CreateType(schema, options) {
|
|
191
169
|
const result = options !== undefined ? { ...options, ...schema } : schema;
|
|
192
170
|
switch (TypeSystemPolicy.InstanceMode) {
|
|
@@ -199,26 +177,26 @@ function CreateType(schema, options) {
|
|
|
199
177
|
}
|
|
200
178
|
}
|
|
201
179
|
|
|
202
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
180
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs
|
|
203
181
|
var TransformKind = Symbol.for("TypeBox.Transform");
|
|
204
182
|
var ReadonlyKind = Symbol.for("TypeBox.Readonly");
|
|
205
183
|
var OptionalKind = Symbol.for("TypeBox.Optional");
|
|
206
184
|
var Hint = Symbol.for("TypeBox.Hint");
|
|
207
185
|
var Kind = Symbol.for("TypeBox.Kind");
|
|
208
186
|
|
|
209
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
187
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.mjs
|
|
210
188
|
function Unsafe(options = {}) {
|
|
211
189
|
return CreateType({ [Kind]: options[Kind] ?? "Unsafe" }, options);
|
|
212
190
|
}
|
|
213
191
|
|
|
214
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
192
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/error/error.mjs
|
|
215
193
|
class TypeBoxError extends Error {
|
|
216
194
|
constructor(message) {
|
|
217
195
|
super(message);
|
|
218
196
|
}
|
|
219
197
|
}
|
|
220
198
|
|
|
221
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
199
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.mjs
|
|
222
200
|
function MappedResult(properties) {
|
|
223
201
|
return CreateType({
|
|
224
202
|
[Kind]: "MappedResult",
|
|
@@ -226,7 +204,7 @@ function MappedResult(properties) {
|
|
|
226
204
|
});
|
|
227
205
|
}
|
|
228
206
|
|
|
229
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
207
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/discard/discard.mjs
|
|
230
208
|
function DiscardKey(value, key) {
|
|
231
209
|
const { [key]: _, ...rest } = value;
|
|
232
210
|
return rest;
|
|
@@ -235,37 +213,37 @@ function Discard(value, keys) {
|
|
|
235
213
|
return keys.reduce((acc, key) => DiscardKey(acc, key), value);
|
|
236
214
|
}
|
|
237
215
|
|
|
238
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
216
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/array/array.mjs
|
|
239
217
|
function Array2(items, options) {
|
|
240
218
|
return CreateType({ [Kind]: "Array", type: "array", items }, options);
|
|
241
219
|
}
|
|
242
220
|
|
|
243
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
221
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.mjs
|
|
244
222
|
function AsyncIterator(items, options) {
|
|
245
223
|
return CreateType({ [Kind]: "AsyncIterator", type: "AsyncIterator", items }, options);
|
|
246
224
|
}
|
|
247
225
|
|
|
248
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
226
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.mjs
|
|
249
227
|
function Constructor(parameters, returns, options) {
|
|
250
228
|
return CreateType({ [Kind]: "Constructor", type: "Constructor", parameters, returns }, options);
|
|
251
229
|
}
|
|
252
230
|
|
|
253
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
231
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/function/function.mjs
|
|
254
232
|
function Function(parameters, returns, options) {
|
|
255
233
|
return CreateType({ [Kind]: "Function", type: "Function", parameters, returns }, options);
|
|
256
234
|
}
|
|
257
235
|
|
|
258
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
236
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/computed/computed.mjs
|
|
259
237
|
function Computed(target, parameters, options) {
|
|
260
238
|
return CreateType({ [Kind]: "Computed", target, parameters }, options);
|
|
261
239
|
}
|
|
262
240
|
|
|
263
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
241
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/never/never.mjs
|
|
264
242
|
function Never(options) {
|
|
265
243
|
return CreateType({ [Kind]: "Never", not: {} }, options);
|
|
266
244
|
}
|
|
267
245
|
|
|
268
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
246
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/guard/kind.mjs
|
|
269
247
|
function IsReadonly(value) {
|
|
270
248
|
return IsObject2(value) && value[ReadonlyKind] === "Readonly";
|
|
271
249
|
}
|
|
@@ -396,7 +374,7 @@ function IsSchema(value) {
|
|
|
396
374
|
return IsAny(value) || IsArgument(value) || IsArray3(value) || IsBoolean2(value) || IsBigInt2(value) || IsAsyncIterator2(value) || IsComputed(value) || IsConstructor(value) || IsDate2(value) || IsFunction2(value) || IsInteger(value) || IsIntersect(value) || IsIterator2(value) || IsLiteral(value) || IsMappedKey(value) || IsMappedResult(value) || IsNever(value) || IsNot(value) || IsNull2(value) || IsNumber3(value) || IsObject3(value) || IsPromise(value) || IsRecord(value) || IsRef(value) || IsRegExp2(value) || IsString2(value) || IsSymbol2(value) || IsTemplateLiteral(value) || IsThis(value) || IsTuple(value) || IsUndefined3(value) || IsUnion(value) || IsUint8Array2(value) || IsUnknown(value) || IsUnsafe(value) || IsVoid(value) || IsKind(value);
|
|
397
375
|
}
|
|
398
376
|
|
|
399
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
377
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/optional/optional.mjs
|
|
400
378
|
function RemoveOptional(schema) {
|
|
401
379
|
return CreateType(Discard(schema, [OptionalKind]));
|
|
402
380
|
}
|
|
@@ -411,7 +389,7 @@ function Optional(schema, enable) {
|
|
|
411
389
|
return IsMappedResult(schema) ? OptionalFromMappedResult(schema, F) : OptionalWithFlag(schema, F);
|
|
412
390
|
}
|
|
413
391
|
|
|
414
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
392
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.mjs
|
|
415
393
|
function FromProperties(P, F) {
|
|
416
394
|
const Acc = {};
|
|
417
395
|
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
@@ -426,14 +404,14 @@ function OptionalFromMappedResult(R, F) {
|
|
|
426
404
|
return MappedResult(P);
|
|
427
405
|
}
|
|
428
406
|
|
|
429
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
407
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.mjs
|
|
430
408
|
function IntersectCreate(T, options = {}) {
|
|
431
409
|
const allObjects = T.every((schema) => IsObject3(schema));
|
|
432
410
|
const clonedUnevaluatedProperties = IsSchema(options.unevaluatedProperties) ? { unevaluatedProperties: options.unevaluatedProperties } : {};
|
|
433
411
|
return CreateType(options.unevaluatedProperties === false || IsSchema(options.unevaluatedProperties) || allObjects ? { ...clonedUnevaluatedProperties, [Kind]: "Intersect", type: "object", allOf: T } : { ...clonedUnevaluatedProperties, [Kind]: "Intersect", allOf: T }, options);
|
|
434
412
|
}
|
|
435
413
|
|
|
436
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
414
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.mjs
|
|
437
415
|
function IsIntersectOptional(types) {
|
|
438
416
|
return types.every((left) => IsOptional(left));
|
|
439
417
|
}
|
|
@@ -456,7 +434,7 @@ function IntersectEvaluated(types, options = {}) {
|
|
|
456
434
|
return ResolveIntersect(types, options);
|
|
457
435
|
}
|
|
458
436
|
|
|
459
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
437
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.mjs
|
|
460
438
|
function Intersect(types, options) {
|
|
461
439
|
if (types.length === 1)
|
|
462
440
|
return CreateType(types[0], options);
|
|
@@ -467,12 +445,12 @@ function Intersect(types, options) {
|
|
|
467
445
|
return IntersectCreate(types, options);
|
|
468
446
|
}
|
|
469
447
|
|
|
470
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
448
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/union/union-create.mjs
|
|
471
449
|
function UnionCreate(T, options) {
|
|
472
450
|
return CreateType({ [Kind]: "Union", anyOf: T }, options);
|
|
473
451
|
}
|
|
474
452
|
|
|
475
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
453
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.mjs
|
|
476
454
|
function IsUnionOptional(types) {
|
|
477
455
|
return types.some((type) => IsOptional(type));
|
|
478
456
|
}
|
|
@@ -490,12 +468,12 @@ function UnionEvaluated(T, options) {
|
|
|
490
468
|
return T.length === 1 ? CreateType(T[0], options) : T.length === 0 ? Never(options) : ResolveUnion(T, options);
|
|
491
469
|
}
|
|
492
470
|
|
|
493
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
471
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/union/union.mjs
|
|
494
472
|
function Union(types, options) {
|
|
495
473
|
return types.length === 0 ? Never(options) : types.length === 1 ? CreateType(types[0], options) : UnionCreate(types, options);
|
|
496
474
|
}
|
|
497
475
|
|
|
498
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
476
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.mjs
|
|
499
477
|
class TemplateLiteralParserError extends TypeBoxError {
|
|
500
478
|
}
|
|
501
479
|
function Unescape(pattern) {
|
|
@@ -558,9 +536,9 @@ function Or(pattern) {
|
|
|
558
536
|
if (IsCloseParen(pattern, index))
|
|
559
537
|
count -= 1;
|
|
560
538
|
if (IsSeparator(pattern, index) && count === 0) {
|
|
561
|
-
const
|
|
562
|
-
if (
|
|
563
|
-
expressions.push(TemplateLiteralParse(
|
|
539
|
+
const range = pattern.slice(start, index);
|
|
540
|
+
if (range.length > 0)
|
|
541
|
+
expressions.push(TemplateLiteralParse(range));
|
|
564
542
|
start = index + 1;
|
|
565
543
|
}
|
|
566
544
|
}
|
|
@@ -588,12 +566,12 @@ function And(pattern) {
|
|
|
588
566
|
}
|
|
589
567
|
throw new TemplateLiteralParserError(`TemplateLiteralParser: Unclosed group parens in expression`);
|
|
590
568
|
}
|
|
591
|
-
function Range(
|
|
592
|
-
for (let scan = index;scan <
|
|
593
|
-
if (IsOpenParen(
|
|
569
|
+
function Range(pattern, index) {
|
|
570
|
+
for (let scan = index;scan < pattern.length; scan++) {
|
|
571
|
+
if (IsOpenParen(pattern, scan))
|
|
594
572
|
return [index, scan];
|
|
595
573
|
}
|
|
596
|
-
return [index,
|
|
574
|
+
return [index, pattern.length];
|
|
597
575
|
}
|
|
598
576
|
const expressions = [];
|
|
599
577
|
for (let index = 0;index < pattern.length; index++) {
|
|
@@ -619,7 +597,7 @@ function TemplateLiteralParseExact(pattern) {
|
|
|
619
597
|
return TemplateLiteralParse(pattern.slice(1, pattern.length - 1));
|
|
620
598
|
}
|
|
621
599
|
|
|
622
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
600
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.mjs
|
|
623
601
|
class TemplateLiteralFiniteError extends TypeBoxError {
|
|
624
602
|
}
|
|
625
603
|
function IsNumberExpression(expression) {
|
|
@@ -641,7 +619,7 @@ function IsTemplateLiteralFinite(schema) {
|
|
|
641
619
|
return IsTemplateLiteralExpressionFinite(expression);
|
|
642
620
|
}
|
|
643
621
|
|
|
644
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
622
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.mjs
|
|
645
623
|
class TemplateLiteralGenerateError extends TypeBoxError {
|
|
646
624
|
}
|
|
647
625
|
function* GenerateReduce(buffer) {
|
|
@@ -673,7 +651,7 @@ function TemplateLiteralGenerate(schema) {
|
|
|
673
651
|
return IsTemplateLiteralExpressionFinite(expression) ? [...TemplateLiteralExpressionGenerate(expression)] : [];
|
|
674
652
|
}
|
|
675
653
|
|
|
676
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
654
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/literal/literal.mjs
|
|
677
655
|
function Literal(value, options) {
|
|
678
656
|
return CreateType({
|
|
679
657
|
[Kind]: "Literal",
|
|
@@ -682,30 +660,30 @@ function Literal(value, options) {
|
|
|
682
660
|
}, options);
|
|
683
661
|
}
|
|
684
662
|
|
|
685
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
686
|
-
function
|
|
663
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.mjs
|
|
664
|
+
function Boolean2(options) {
|
|
687
665
|
return CreateType({ [Kind]: "Boolean", type: "boolean" }, options);
|
|
688
666
|
}
|
|
689
667
|
|
|
690
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
668
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.mjs
|
|
691
669
|
function BigInt(options) {
|
|
692
670
|
return CreateType({ [Kind]: "BigInt", type: "bigint" }, options);
|
|
693
671
|
}
|
|
694
672
|
|
|
695
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
673
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/number/number.mjs
|
|
696
674
|
function Number2(options) {
|
|
697
675
|
return CreateType({ [Kind]: "Number", type: "number" }, options);
|
|
698
676
|
}
|
|
699
677
|
|
|
700
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
678
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/string/string.mjs
|
|
701
679
|
function String2(options) {
|
|
702
680
|
return CreateType({ [Kind]: "String", type: "string" }, options);
|
|
703
681
|
}
|
|
704
682
|
|
|
705
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
683
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.mjs
|
|
706
684
|
function* FromUnion(syntax) {
|
|
707
685
|
const trim = syntax.trim().replace(/"|'/g, "");
|
|
708
|
-
return trim === "boolean" ? yield
|
|
686
|
+
return trim === "boolean" ? yield Boolean2() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt() : trim === "string" ? yield String2() : yield (() => {
|
|
709
687
|
const literals = trim.split("|").map((literal) => Literal(literal.trim()));
|
|
710
688
|
return literals.length === 0 ? Never() : literals.length === 1 ? literals[0] : UnionEvaluated(literals);
|
|
711
689
|
})();
|
|
@@ -739,7 +717,7 @@ function TemplateLiteralSyntax(syntax) {
|
|
|
739
717
|
return [...FromSyntax(syntax)];
|
|
740
718
|
}
|
|
741
719
|
|
|
742
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
720
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.mjs
|
|
743
721
|
var PatternBoolean = "(true|false)";
|
|
744
722
|
var PatternNumber = "(0|[1-9][0-9]*)";
|
|
745
723
|
var PatternString = "(.*)";
|
|
@@ -749,14 +727,14 @@ var PatternNumberExact = `^${PatternNumber}$`;
|
|
|
749
727
|
var PatternStringExact = `^${PatternString}$`;
|
|
750
728
|
var PatternNeverExact = `^${PatternNever}$`;
|
|
751
729
|
|
|
752
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
730
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.mjs
|
|
753
731
|
class TemplateLiteralPatternError extends TypeBoxError {
|
|
754
732
|
}
|
|
755
733
|
function Escape(value) {
|
|
756
734
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
757
735
|
}
|
|
758
736
|
function Visit2(schema, acc) {
|
|
759
|
-
return IsTemplateLiteral(schema) ? schema.pattern.slice(1, schema.pattern.length - 1) : IsUnion(schema) ? `(${schema.anyOf.map((
|
|
737
|
+
return IsTemplateLiteral(schema) ? schema.pattern.slice(1, schema.pattern.length - 1) : IsUnion(schema) ? `(${schema.anyOf.map((schema) => Visit2(schema, acc)).join("|")})` : IsNumber3(schema) ? `${acc}${PatternNumber}` : IsInteger(schema) ? `${acc}${PatternNumber}` : IsBigInt2(schema) ? `${acc}${PatternNumber}` : IsString2(schema) ? `${acc}${PatternString}` : IsLiteral(schema) ? `${acc}${Escape(schema.const.toString())}` : IsBoolean2(schema) ? `${acc}${PatternBoolean}` : (() => {
|
|
760
738
|
throw new TemplateLiteralPatternError(`Unexpected Kind '${schema[Kind]}'`);
|
|
761
739
|
})();
|
|
762
740
|
}
|
|
@@ -764,20 +742,20 @@ function TemplateLiteralPattern(kinds) {
|
|
|
764
742
|
return `^${kinds.map((schema) => Visit2(schema, "")).join("")}$`;
|
|
765
743
|
}
|
|
766
744
|
|
|
767
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
745
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/template-literal/union.mjs
|
|
768
746
|
function TemplateLiteralToUnion(schema) {
|
|
769
747
|
const R = TemplateLiteralGenerate(schema);
|
|
770
748
|
const L = R.map((S) => Literal(S));
|
|
771
749
|
return UnionEvaluated(L);
|
|
772
750
|
}
|
|
773
751
|
|
|
774
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
752
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.mjs
|
|
775
753
|
function TemplateLiteral(unresolved, options) {
|
|
776
754
|
const pattern = IsString(unresolved) ? TemplateLiteralPattern(TemplateLiteralSyntax(unresolved)) : TemplateLiteralPattern(unresolved);
|
|
777
755
|
return CreateType({ [Kind]: "TemplateLiteral", type: "string", pattern }, options);
|
|
778
756
|
}
|
|
779
757
|
|
|
780
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
758
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.mjs
|
|
781
759
|
function FromTemplateLiteral(templateLiteral) {
|
|
782
760
|
const keys = TemplateLiteralGenerate(templateLiteral);
|
|
783
761
|
return keys.map((key) => key.toString());
|
|
@@ -795,7 +773,7 @@ function IndexPropertyKeys(type) {
|
|
|
795
773
|
return [...new Set(IsTemplateLiteral(type) ? FromTemplateLiteral(type) : IsUnion(type) ? FromUnion2(type.anyOf) : IsLiteral(type) ? FromLiteral(type.const) : IsNumber3(type) ? ["[number]"] : IsInteger(type) ? ["[number]"] : [])];
|
|
796
774
|
}
|
|
797
775
|
|
|
798
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
776
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.mjs
|
|
799
777
|
function FromProperties2(type, properties, options) {
|
|
800
778
|
const result = {};
|
|
801
779
|
for (const K2 of Object.getOwnPropertyNames(properties)) {
|
|
@@ -811,7 +789,7 @@ function IndexFromMappedResult(type, mappedResult, options) {
|
|
|
811
789
|
return MappedResult(properties);
|
|
812
790
|
}
|
|
813
791
|
|
|
814
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
792
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.mjs
|
|
815
793
|
function FromRest(types, key) {
|
|
816
794
|
return types.map((type) => IndexFromPropertyKey(type, key));
|
|
817
795
|
}
|
|
@@ -859,7 +837,7 @@ function Index(type, key, options) {
|
|
|
859
837
|
return CreateType(IsSchema(key) ? FromSchema(type, IndexPropertyKeys(key)) : FromSchema(type, key), options);
|
|
860
838
|
}
|
|
861
839
|
|
|
862
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
840
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.mjs
|
|
863
841
|
function MappedIndexPropertyKey(type, key, options) {
|
|
864
842
|
return { [key]: Index(type, [key], Clone(options)) };
|
|
865
843
|
}
|
|
@@ -876,28 +854,28 @@ function IndexFromMappedKey(type, mappedKey, options) {
|
|
|
876
854
|
return MappedResult(properties);
|
|
877
855
|
}
|
|
878
856
|
|
|
879
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
857
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.mjs
|
|
880
858
|
function Iterator(items, options) {
|
|
881
859
|
return CreateType({ [Kind]: "Iterator", type: "Iterator", items }, options);
|
|
882
860
|
}
|
|
883
861
|
|
|
884
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
862
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/object/object.mjs
|
|
885
863
|
function RequiredArray(properties) {
|
|
886
864
|
return globalThis.Object.keys(properties).filter((key) => !IsOptional(properties[key]));
|
|
887
865
|
}
|
|
888
|
-
function
|
|
866
|
+
function _Object_(properties, options) {
|
|
889
867
|
const required = RequiredArray(properties);
|
|
890
868
|
const schema = required.length > 0 ? { [Kind]: "Object", type: "object", required, properties } : { [Kind]: "Object", type: "object", properties };
|
|
891
869
|
return CreateType(schema, options);
|
|
892
870
|
}
|
|
893
|
-
var Object2 =
|
|
871
|
+
var Object2 = _Object_;
|
|
894
872
|
|
|
895
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
873
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/promise/promise.mjs
|
|
896
874
|
function Promise2(item, options) {
|
|
897
875
|
return CreateType({ [Kind]: "Promise", type: "Promise", item }, options);
|
|
898
876
|
}
|
|
899
877
|
|
|
900
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
878
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.mjs
|
|
901
879
|
function RemoveReadonly(schema) {
|
|
902
880
|
return CreateType(Discard(schema, [ReadonlyKind]));
|
|
903
881
|
}
|
|
@@ -912,7 +890,7 @@ function Readonly(schema, enable) {
|
|
|
912
890
|
return IsMappedResult(schema) ? ReadonlyFromMappedResult(schema, F) : ReadonlyWithFlag(schema, F);
|
|
913
891
|
}
|
|
914
892
|
|
|
915
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
893
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.mjs
|
|
916
894
|
function FromProperties3(K, F) {
|
|
917
895
|
const Acc = {};
|
|
918
896
|
for (const K2 of globalThis.Object.getOwnPropertyNames(K))
|
|
@@ -927,12 +905,12 @@ function ReadonlyFromMappedResult(R, F) {
|
|
|
927
905
|
return MappedResult(P);
|
|
928
906
|
}
|
|
929
907
|
|
|
930
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
908
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.mjs
|
|
931
909
|
function Tuple(types, options) {
|
|
932
910
|
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);
|
|
933
911
|
}
|
|
934
912
|
|
|
935
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
913
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/sets/set.mjs
|
|
936
914
|
function SetIncludes(T, S) {
|
|
937
915
|
return T.includes(S);
|
|
938
916
|
}
|
|
@@ -957,7 +935,7 @@ function SetUnionMany(T) {
|
|
|
957
935
|
return Acc;
|
|
958
936
|
}
|
|
959
937
|
|
|
960
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
938
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.mjs
|
|
961
939
|
function FromMappedResult4(K, P) {
|
|
962
940
|
return K in P ? FromSchemaType(K, P[K]) : MappedResult(P);
|
|
963
941
|
}
|
|
@@ -1003,7 +981,7 @@ function Mapped(key, map, options) {
|
|
|
1003
981
|
return Object2(R, options);
|
|
1004
982
|
}
|
|
1005
983
|
|
|
1006
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
984
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/ref/ref.mjs
|
|
1007
985
|
function Ref(...args) {
|
|
1008
986
|
const [$ref, options] = typeof args[0] === "string" ? [args[0], args[1]] : [args[0].$id, args[1]];
|
|
1009
987
|
if (typeof $ref !== "string")
|
|
@@ -1011,7 +989,7 @@ function Ref(...args) {
|
|
|
1011
989
|
return CreateType({ [Kind]: "Ref", $ref }, options);
|
|
1012
990
|
}
|
|
1013
991
|
|
|
1014
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
992
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.mjs
|
|
1015
993
|
function FromRest3(types) {
|
|
1016
994
|
const result = [];
|
|
1017
995
|
for (const L of types)
|
|
@@ -1050,7 +1028,7 @@ function KeyOfPropertyKeys(type) {
|
|
|
1050
1028
|
}
|
|
1051
1029
|
var includePatternProperties = false;
|
|
1052
1030
|
|
|
1053
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1031
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.mjs
|
|
1054
1032
|
function FromComputed(target, parameters) {
|
|
1055
1033
|
return Computed("KeyOf", [Computed(target, parameters)]);
|
|
1056
1034
|
}
|
|
@@ -1070,7 +1048,7 @@ function KeyOf(type, options) {
|
|
|
1070
1048
|
return IsComputed(type) ? FromComputed(type.target, type.parameters) : IsRef(type) ? FromRef(type.$ref) : IsMappedResult(type) ? KeyOfFromMappedResult(type, options) : KeyOfFromType(type, options);
|
|
1071
1049
|
}
|
|
1072
1050
|
|
|
1073
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1051
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.mjs
|
|
1074
1052
|
function FromProperties6(properties, options) {
|
|
1075
1053
|
const result = {};
|
|
1076
1054
|
for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
|
|
@@ -1085,72 +1063,16 @@ function KeyOfFromMappedResult(mappedResult, options) {
|
|
|
1085
1063
|
return MappedResult(properties);
|
|
1086
1064
|
}
|
|
1087
1065
|
|
|
1088
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1066
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/any/any.mjs
|
|
1089
1067
|
function Any(options) {
|
|
1090
1068
|
return CreateType({ [Kind]: "Any" }, options);
|
|
1091
1069
|
}
|
|
1092
1070
|
|
|
1093
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1071
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.mjs
|
|
1094
1072
|
function Unknown(options) {
|
|
1095
1073
|
return CreateType({ [Kind]: "Unknown" }, options);
|
|
1096
1074
|
}
|
|
1097
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1098
|
-
var exports_type = {};
|
|
1099
|
-
__export(exports_type, {
|
|
1100
|
-
TypeGuardUnknownTypeError: () => TypeGuardUnknownTypeError,
|
|
1101
|
-
IsVoid: () => IsVoid2,
|
|
1102
|
-
IsUnsafe: () => IsUnsafe2,
|
|
1103
|
-
IsUnknown: () => IsUnknown2,
|
|
1104
|
-
IsUnionLiteral: () => IsUnionLiteral,
|
|
1105
|
-
IsUnion: () => IsUnion2,
|
|
1106
|
-
IsUndefined: () => IsUndefined4,
|
|
1107
|
-
IsUint8Array: () => IsUint8Array3,
|
|
1108
|
-
IsTuple: () => IsTuple2,
|
|
1109
|
-
IsTransform: () => IsTransform2,
|
|
1110
|
-
IsThis: () => IsThis2,
|
|
1111
|
-
IsTemplateLiteral: () => IsTemplateLiteral2,
|
|
1112
|
-
IsSymbol: () => IsSymbol3,
|
|
1113
|
-
IsString: () => IsString3,
|
|
1114
|
-
IsSchema: () => IsSchema2,
|
|
1115
|
-
IsRegExp: () => IsRegExp3,
|
|
1116
|
-
IsRef: () => IsRef2,
|
|
1117
|
-
IsRecursive: () => IsRecursive,
|
|
1118
|
-
IsRecord: () => IsRecord2,
|
|
1119
|
-
IsReadonly: () => IsReadonly2,
|
|
1120
|
-
IsProperties: () => IsProperties,
|
|
1121
|
-
IsPromise: () => IsPromise2,
|
|
1122
|
-
IsOptional: () => IsOptional2,
|
|
1123
|
-
IsObject: () => IsObject4,
|
|
1124
|
-
IsNumber: () => IsNumber4,
|
|
1125
|
-
IsNull: () => IsNull3,
|
|
1126
|
-
IsNot: () => IsNot2,
|
|
1127
|
-
IsNever: () => IsNever2,
|
|
1128
|
-
IsMappedResult: () => IsMappedResult2,
|
|
1129
|
-
IsMappedKey: () => IsMappedKey2,
|
|
1130
|
-
IsLiteralValue: () => IsLiteralValue2,
|
|
1131
|
-
IsLiteralString: () => IsLiteralString,
|
|
1132
|
-
IsLiteralNumber: () => IsLiteralNumber,
|
|
1133
|
-
IsLiteralBoolean: () => IsLiteralBoolean,
|
|
1134
|
-
IsLiteral: () => IsLiteral2,
|
|
1135
|
-
IsKindOf: () => IsKindOf2,
|
|
1136
|
-
IsKind: () => IsKind2,
|
|
1137
|
-
IsIterator: () => IsIterator3,
|
|
1138
|
-
IsIntersect: () => IsIntersect2,
|
|
1139
|
-
IsInteger: () => IsInteger2,
|
|
1140
|
-
IsImport: () => IsImport,
|
|
1141
|
-
IsFunction: () => IsFunction3,
|
|
1142
|
-
IsDate: () => IsDate3,
|
|
1143
|
-
IsConstructor: () => IsConstructor2,
|
|
1144
|
-
IsComputed: () => IsComputed2,
|
|
1145
|
-
IsBoolean: () => IsBoolean3,
|
|
1146
|
-
IsBigInt: () => IsBigInt3,
|
|
1147
|
-
IsAsyncIterator: () => IsAsyncIterator3,
|
|
1148
|
-
IsArray: () => IsArray4,
|
|
1149
|
-
IsArgument: () => IsArgument2,
|
|
1150
|
-
IsAny: () => IsAny2
|
|
1151
|
-
});
|
|
1152
|
-
class TypeGuardUnknownTypeError extends TypeBoxError {
|
|
1153
|
-
}
|
|
1075
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/guard/type.mjs
|
|
1154
1076
|
var KnownTypes = [
|
|
1155
1077
|
"Argument",
|
|
1156
1078
|
"Any",
|
|
@@ -1231,9 +1153,6 @@ function IsOptionalFormat(value) {
|
|
|
1231
1153
|
function IsOptionalSchema(value) {
|
|
1232
1154
|
return IsUndefined2(value) || IsSchema2(value);
|
|
1233
1155
|
}
|
|
1234
|
-
function IsReadonly2(value) {
|
|
1235
|
-
return IsObject2(value) && value[ReadonlyKind] === "Readonly";
|
|
1236
|
-
}
|
|
1237
1156
|
function IsOptional2(value) {
|
|
1238
1157
|
return IsObject2(value) && value[OptionalKind] === "Optional";
|
|
1239
1158
|
}
|
|
@@ -1267,9 +1186,6 @@ function IsDate3(value) {
|
|
|
1267
1186
|
function IsFunction3(value) {
|
|
1268
1187
|
return IsKindOf2(value, "Function") && value.type === "Function" && IsOptionalString(value.$id) && IsArray2(value.parameters) && value.parameters.every((schema) => IsSchema2(schema)) && IsSchema2(value.returns);
|
|
1269
1188
|
}
|
|
1270
|
-
function IsImport(value) {
|
|
1271
|
-
return IsKindOf2(value, "Import") && HasPropertyKey(value, "$defs") && IsObject2(value.$defs) && IsProperties(value.$defs) && HasPropertyKey(value, "$ref") && IsString(value.$ref) && value.$ref in value.$defs;
|
|
1272
|
-
}
|
|
1273
1189
|
function IsInteger2(value) {
|
|
1274
1190
|
return IsKindOf2(value, "Integer") && value.type === "integer" && IsOptionalString(value.$id) && IsOptionalNumber(value.exclusiveMaximum) && IsOptionalNumber(value.exclusiveMinimum) && IsOptionalNumber(value.maximum) && IsOptionalNumber(value.minimum) && IsOptionalNumber(value.multipleOf);
|
|
1275
1191
|
}
|
|
@@ -1330,9 +1246,6 @@ function IsRecord2(value) {
|
|
|
1330
1246
|
return keys.length === 1 && IsPattern(keys[0]) && IsObject2(schema.patternProperties) && IsSchema2(schema.patternProperties[keys[0]]);
|
|
1331
1247
|
})(value);
|
|
1332
1248
|
}
|
|
1333
|
-
function IsRecursive(value) {
|
|
1334
|
-
return IsObject2(value) && Hint in value && value[Hint] === "Recursive";
|
|
1335
|
-
}
|
|
1336
1249
|
function IsRef2(value) {
|
|
1337
1250
|
return IsKindOf2(value, "Ref") && IsOptionalString(value.$id) && IsString(value.$ref);
|
|
1338
1251
|
}
|
|
@@ -1360,9 +1273,6 @@ function IsTuple2(value) {
|
|
|
1360
1273
|
function IsUndefined4(value) {
|
|
1361
1274
|
return IsKindOf2(value, "Undefined") && value.type === "undefined" && IsOptionalString(value.$id);
|
|
1362
1275
|
}
|
|
1363
|
-
function IsUnionLiteral(value) {
|
|
1364
|
-
return IsUnion2(value) && value.anyOf.every((schema) => IsLiteralString(schema) || IsLiteralNumber(schema));
|
|
1365
|
-
}
|
|
1366
1276
|
function IsUnion2(value) {
|
|
1367
1277
|
return IsKindOf2(value, "Union") && IsOptionalString(value.$id) && IsObject2(value) && IsArray2(value.anyOf) && value.anyOf.every((schema) => IsSchema2(schema));
|
|
1368
1278
|
}
|
|
@@ -1384,14 +1294,14 @@ function IsKind2(value) {
|
|
|
1384
1294
|
function IsSchema2(value) {
|
|
1385
1295
|
return IsObject2(value) && (IsAny2(value) || IsArgument2(value) || IsArray4(value) || IsBoolean3(value) || IsBigInt3(value) || IsAsyncIterator3(value) || IsComputed2(value) || IsConstructor2(value) || IsDate3(value) || IsFunction3(value) || IsInteger2(value) || IsIntersect2(value) || IsIterator3(value) || IsLiteral2(value) || IsMappedKey2(value) || IsMappedResult2(value) || IsNever2(value) || IsNot2(value) || IsNull3(value) || IsNumber4(value) || IsObject4(value) || IsPromise2(value) || IsRecord2(value) || IsRef2(value) || IsRegExp3(value) || IsString3(value) || IsSymbol3(value) || IsTemplateLiteral2(value) || IsThis2(value) || IsTuple2(value) || IsUndefined4(value) || IsUnion2(value) || IsUint8Array3(value) || IsUnknown2(value) || IsUnsafe2(value) || IsVoid2(value) || IsKind2(value));
|
|
1386
1296
|
}
|
|
1387
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1297
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.mjs
|
|
1388
1298
|
class ExtendsResolverError extends TypeBoxError {
|
|
1389
1299
|
}
|
|
1390
1300
|
var ExtendsResult;
|
|
1391
|
-
(function(
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1301
|
+
(function(ExtendsResult) {
|
|
1302
|
+
ExtendsResult[ExtendsResult["Union"] = 0] = "Union";
|
|
1303
|
+
ExtendsResult[ExtendsResult["True"] = 1] = "True";
|
|
1304
|
+
ExtendsResult[ExtendsResult["False"] = 2] = "False";
|
|
1395
1305
|
})(ExtendsResult || (ExtendsResult = {}));
|
|
1396
1306
|
function IntoBooleanResult(result) {
|
|
1397
1307
|
return result === ExtendsResult.False ? result : ExtendsResult.True;
|
|
@@ -1400,49 +1310,49 @@ function Throw(message) {
|
|
|
1400
1310
|
throw new ExtendsResolverError(message);
|
|
1401
1311
|
}
|
|
1402
1312
|
function IsStructuralRight(right) {
|
|
1403
|
-
return
|
|
1313
|
+
return IsNever2(right) || IsIntersect2(right) || IsUnion2(right) || IsUnknown2(right) || IsAny2(right);
|
|
1404
1314
|
}
|
|
1405
1315
|
function StructuralRight(left, right) {
|
|
1406
|
-
return
|
|
1316
|
+
return IsNever2(right) ? FromNeverRight(left, right) : IsIntersect2(right) ? FromIntersectRight(left, right) : IsUnion2(right) ? FromUnionRight(left, right) : IsUnknown2(right) ? FromUnknownRight(left, right) : IsAny2(right) ? FromAnyRight(left, right) : Throw("StructuralRight");
|
|
1407
1317
|
}
|
|
1408
1318
|
function FromAnyRight(left, right) {
|
|
1409
1319
|
return ExtendsResult.True;
|
|
1410
1320
|
}
|
|
1411
1321
|
function FromAny(left, right) {
|
|
1412
|
-
return
|
|
1322
|
+
return IsIntersect2(right) ? FromIntersectRight(left, right) : IsUnion2(right) && right.anyOf.some((schema) => IsAny2(schema) || IsUnknown2(schema)) ? ExtendsResult.True : IsUnion2(right) ? ExtendsResult.Union : IsUnknown2(right) ? ExtendsResult.True : IsAny2(right) ? ExtendsResult.True : ExtendsResult.Union;
|
|
1413
1323
|
}
|
|
1414
1324
|
function FromArrayRight(left, right) {
|
|
1415
|
-
return
|
|
1325
|
+
return IsUnknown2(left) ? ExtendsResult.False : IsAny2(left) ? ExtendsResult.Union : IsNever2(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
1416
1326
|
}
|
|
1417
1327
|
function FromArray3(left, right) {
|
|
1418
|
-
return
|
|
1328
|
+
return IsObject4(right) && IsObjectArrayLike(right) ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : !IsArray4(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.items, right.items));
|
|
1419
1329
|
}
|
|
1420
1330
|
function FromAsyncIterator(left, right) {
|
|
1421
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : !
|
|
1331
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : !IsAsyncIterator3(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.items, right.items));
|
|
1422
1332
|
}
|
|
1423
1333
|
function FromBigInt(left, right) {
|
|
1424
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1334
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsRecord2(right) ? FromRecordRight(left, right) : IsBigInt3(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
1425
1335
|
}
|
|
1426
1336
|
function FromBooleanRight(left, right) {
|
|
1427
|
-
return
|
|
1337
|
+
return IsLiteralBoolean(left) ? ExtendsResult.True : IsBoolean3(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
1428
1338
|
}
|
|
1429
1339
|
function FromBoolean(left, right) {
|
|
1430
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1340
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsRecord2(right) ? FromRecordRight(left, right) : IsBoolean3(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
1431
1341
|
}
|
|
1432
1342
|
function FromConstructor(left, right) {
|
|
1433
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1343
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : !IsConstructor2(right) ? ExtendsResult.False : left.parameters.length > right.parameters.length ? ExtendsResult.False : !left.parameters.every((schema, index) => IntoBooleanResult(Visit3(right.parameters[index], schema)) === ExtendsResult.True) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.returns, right.returns));
|
|
1434
1344
|
}
|
|
1435
1345
|
function FromDate(left, right) {
|
|
1436
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1346
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsRecord2(right) ? FromRecordRight(left, right) : IsDate3(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
1437
1347
|
}
|
|
1438
1348
|
function FromFunction(left, right) {
|
|
1439
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1349
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : !IsFunction3(right) ? ExtendsResult.False : left.parameters.length > right.parameters.length ? ExtendsResult.False : !left.parameters.every((schema, index) => IntoBooleanResult(Visit3(right.parameters[index], schema)) === ExtendsResult.True) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.returns, right.returns));
|
|
1440
1350
|
}
|
|
1441
1351
|
function FromIntegerRight(left, right) {
|
|
1442
|
-
return
|
|
1352
|
+
return IsLiteral2(left) && IsNumber2(left.const) ? ExtendsResult.True : IsNumber4(left) || IsInteger2(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
1443
1353
|
}
|
|
1444
1354
|
function FromInteger(left, right) {
|
|
1445
|
-
return
|
|
1355
|
+
return IsInteger2(right) || IsNumber4(right) ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsRecord2(right) ? FromRecordRight(left, right) : ExtendsResult.False;
|
|
1446
1356
|
}
|
|
1447
1357
|
function FromIntersectRight(left, right) {
|
|
1448
1358
|
return right.allOf.every((schema) => Visit3(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
|
|
@@ -1451,10 +1361,10 @@ function FromIntersect3(left, right) {
|
|
|
1451
1361
|
return left.allOf.some((schema) => Visit3(schema, right) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
|
|
1452
1362
|
}
|
|
1453
1363
|
function FromIterator(left, right) {
|
|
1454
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) : !
|
|
1364
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : !IsIterator3(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.items, right.items));
|
|
1455
1365
|
}
|
|
1456
1366
|
function FromLiteral2(left, right) {
|
|
1457
|
-
return
|
|
1367
|
+
return IsLiteral2(right) && right.const === left.const ? ExtendsResult.True : IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsRecord2(right) ? FromRecordRight(left, right) : IsString3(right) ? FromStringRight(left, right) : IsNumber4(right) ? FromNumberRight(left, right) : IsInteger2(right) ? FromIntegerRight(left, right) : IsBoolean3(right) ? FromBooleanRight(left, right) : ExtendsResult.False;
|
|
1458
1368
|
}
|
|
1459
1369
|
function FromNeverRight(left, right) {
|
|
1460
1370
|
return ExtendsResult.False;
|
|
@@ -1465,7 +1375,7 @@ function FromNever(left, right) {
|
|
|
1465
1375
|
function UnwrapTNot(schema) {
|
|
1466
1376
|
let [current, depth] = [schema, 0];
|
|
1467
1377
|
while (true) {
|
|
1468
|
-
if (!
|
|
1378
|
+
if (!IsNot2(current))
|
|
1469
1379
|
break;
|
|
1470
1380
|
current = current.not;
|
|
1471
1381
|
depth += 1;
|
|
@@ -1473,16 +1383,16 @@ function UnwrapTNot(schema) {
|
|
|
1473
1383
|
return depth % 2 === 0 ? current : Unknown();
|
|
1474
1384
|
}
|
|
1475
1385
|
function FromNot(left, right) {
|
|
1476
|
-
return
|
|
1386
|
+
return IsNot2(left) ? Visit3(UnwrapTNot(left), right) : IsNot2(right) ? Visit3(left, UnwrapTNot(right)) : Throw("Invalid fallthrough for Not");
|
|
1477
1387
|
}
|
|
1478
1388
|
function FromNull(left, right) {
|
|
1479
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1389
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsRecord2(right) ? FromRecordRight(left, right) : IsNull3(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
1480
1390
|
}
|
|
1481
1391
|
function FromNumberRight(left, right) {
|
|
1482
|
-
return
|
|
1392
|
+
return IsLiteralNumber(left) ? ExtendsResult.True : IsNumber4(left) || IsInteger2(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
1483
1393
|
}
|
|
1484
1394
|
function FromNumber(left, right) {
|
|
1485
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1395
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsRecord2(right) ? FromRecordRight(left, right) : IsInteger2(right) || IsNumber4(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
1486
1396
|
}
|
|
1487
1397
|
function IsObjectPropertyCount(schema, count) {
|
|
1488
1398
|
return Object.getOwnPropertyNames(schema.properties).length === count;
|
|
@@ -1491,7 +1401,7 @@ function IsObjectStringLike(schema) {
|
|
|
1491
1401
|
return IsObjectArrayLike(schema);
|
|
1492
1402
|
}
|
|
1493
1403
|
function IsObjectSymbolLike(schema) {
|
|
1494
|
-
return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "description" in schema.properties &&
|
|
1404
|
+
return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "description" in schema.properties && IsUnion2(schema.properties.description) && schema.properties.description.anyOf.length === 2 && (IsString3(schema.properties.description.anyOf[0]) && IsUndefined4(schema.properties.description.anyOf[1]) || IsString3(schema.properties.description.anyOf[1]) && IsUndefined4(schema.properties.description.anyOf[0]));
|
|
1495
1405
|
}
|
|
1496
1406
|
function IsObjectNumberLike(schema) {
|
|
1497
1407
|
return IsObjectPropertyCount(schema, 0);
|
|
@@ -1524,22 +1434,22 @@ function IsObjectPromiseLike(schema) {
|
|
|
1524
1434
|
return IsObjectPropertyCount(schema, 0) || IsObjectPropertyCount(schema, 1) && "then" in schema.properties && IntoBooleanResult(Visit3(schema.properties["then"], then)) === ExtendsResult.True;
|
|
1525
1435
|
}
|
|
1526
1436
|
function Property(left, right) {
|
|
1527
|
-
return Visit3(left, right) === ExtendsResult.False ? ExtendsResult.False :
|
|
1437
|
+
return Visit3(left, right) === ExtendsResult.False ? ExtendsResult.False : IsOptional2(left) && !IsOptional2(right) ? ExtendsResult.False : ExtendsResult.True;
|
|
1528
1438
|
}
|
|
1529
1439
|
function FromObjectRight(left, right) {
|
|
1530
|
-
return
|
|
1440
|
+
return IsUnknown2(left) ? ExtendsResult.False : IsAny2(left) ? ExtendsResult.Union : IsNever2(left) || IsLiteralString(left) && IsObjectStringLike(right) || IsLiteralNumber(left) && IsObjectNumberLike(right) || IsLiteralBoolean(left) && IsObjectBooleanLike(right) || IsSymbol3(left) && IsObjectSymbolLike(right) || IsBigInt3(left) && IsObjectBigIntLike(right) || IsString3(left) && IsObjectStringLike(right) || IsSymbol3(left) && IsObjectSymbolLike(right) || IsNumber4(left) && IsObjectNumberLike(right) || IsInteger2(left) && IsObjectNumberLike(right) || IsBoolean3(left) && IsObjectBooleanLike(right) || IsUint8Array3(left) && IsObjectUint8ArrayLike(right) || IsDate3(left) && IsObjectDateLike(right) || IsConstructor2(left) && IsObjectConstructorLike(right) || IsFunction3(left) && IsObjectFunctionLike(right) ? ExtendsResult.True : IsRecord2(left) && IsString3(RecordKey(left)) ? (() => {
|
|
1531
1441
|
return right[Hint] === "Record" ? ExtendsResult.True : ExtendsResult.False;
|
|
1532
|
-
})() :
|
|
1442
|
+
})() : IsRecord2(left) && IsNumber4(RecordKey(left)) ? (() => {
|
|
1533
1443
|
return IsObjectPropertyCount(right, 0) ? ExtendsResult.True : ExtendsResult.False;
|
|
1534
1444
|
})() : ExtendsResult.False;
|
|
1535
1445
|
}
|
|
1536
1446
|
function FromObject(left, right) {
|
|
1537
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1447
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsRecord2(right) ? FromRecordRight(left, right) : !IsObject4(right) ? ExtendsResult.False : (() => {
|
|
1538
1448
|
for (const key of Object.getOwnPropertyNames(right.properties)) {
|
|
1539
|
-
if (!(key in left.properties) && !
|
|
1449
|
+
if (!(key in left.properties) && !IsOptional2(right.properties[key])) {
|
|
1540
1450
|
return ExtendsResult.False;
|
|
1541
1451
|
}
|
|
1542
|
-
if (
|
|
1452
|
+
if (IsOptional2(right.properties[key])) {
|
|
1543
1453
|
return ExtendsResult.True;
|
|
1544
1454
|
}
|
|
1545
1455
|
if (Property(left.properties[key], right.properties[key]) === ExtendsResult.False) {
|
|
@@ -1550,7 +1460,7 @@ function FromObject(left, right) {
|
|
|
1550
1460
|
})();
|
|
1551
1461
|
}
|
|
1552
1462
|
function FromPromise(left, right) {
|
|
1553
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1463
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) && IsObjectPromiseLike(right) ? ExtendsResult.True : !IsPromise2(right) ? ExtendsResult.False : IntoBooleanResult(Visit3(left.item, right.item));
|
|
1554
1464
|
}
|
|
1555
1465
|
function RecordKey(schema) {
|
|
1556
1466
|
return PatternNumberExact in schema.patternProperties ? Number2() : (PatternStringExact in schema.patternProperties) ? String2() : Throw("Unknown record key pattern");
|
|
@@ -1560,7 +1470,7 @@ function RecordValue(schema) {
|
|
|
1560
1470
|
}
|
|
1561
1471
|
function FromRecordRight(left, right) {
|
|
1562
1472
|
const [Key, Value] = [RecordKey(right), RecordValue(right)];
|
|
1563
|
-
return
|
|
1473
|
+
return IsLiteralString(left) && IsNumber4(Key) && IntoBooleanResult(Visit3(left, Value)) === ExtendsResult.True ? ExtendsResult.True : IsUint8Array3(left) && IsNumber4(Key) ? Visit3(left, Value) : IsString3(left) && IsNumber4(Key) ? Visit3(left, Value) : IsArray4(left) && IsNumber4(Key) ? Visit3(left, Value) : IsObject4(left) ? (() => {
|
|
1564
1474
|
for (const key of Object.getOwnPropertyNames(left.properties)) {
|
|
1565
1475
|
if (Property(Value, left.properties[key]) === ExtendsResult.False) {
|
|
1566
1476
|
return ExtendsResult.False;
|
|
@@ -1570,39 +1480,39 @@ function FromRecordRight(left, right) {
|
|
|
1570
1480
|
})() : ExtendsResult.False;
|
|
1571
1481
|
}
|
|
1572
1482
|
function FromRecord(left, right) {
|
|
1573
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1483
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : !IsRecord2(right) ? ExtendsResult.False : Visit3(RecordValue(left), RecordValue(right));
|
|
1574
1484
|
}
|
|
1575
1485
|
function FromRegExp(left, right) {
|
|
1576
|
-
const L =
|
|
1577
|
-
const R =
|
|
1486
|
+
const L = IsRegExp3(left) ? String2() : left;
|
|
1487
|
+
const R = IsRegExp3(right) ? String2() : right;
|
|
1578
1488
|
return Visit3(L, R);
|
|
1579
1489
|
}
|
|
1580
1490
|
function FromStringRight(left, right) {
|
|
1581
|
-
return
|
|
1491
|
+
return IsLiteral2(left) && IsString(left.const) ? ExtendsResult.True : IsString3(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
1582
1492
|
}
|
|
1583
1493
|
function FromString(left, right) {
|
|
1584
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1494
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsRecord2(right) ? FromRecordRight(left, right) : IsString3(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
1585
1495
|
}
|
|
1586
1496
|
function FromSymbol(left, right) {
|
|
1587
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1497
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsRecord2(right) ? FromRecordRight(left, right) : IsSymbol3(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
1588
1498
|
}
|
|
1589
1499
|
function FromTemplateLiteral2(left, right) {
|
|
1590
|
-
return
|
|
1500
|
+
return IsTemplateLiteral2(left) ? Visit3(TemplateLiteralToUnion(left), right) : IsTemplateLiteral2(right) ? Visit3(left, TemplateLiteralToUnion(right)) : Throw("Invalid fallthrough for TemplateLiteral");
|
|
1591
1501
|
}
|
|
1592
1502
|
function IsArrayOfTuple(left, right) {
|
|
1593
|
-
return
|
|
1503
|
+
return IsArray4(right) && left.items !== undefined && left.items.every((schema) => Visit3(schema, right.items) === ExtendsResult.True);
|
|
1594
1504
|
}
|
|
1595
1505
|
function FromTupleRight(left, right) {
|
|
1596
|
-
return
|
|
1506
|
+
return IsNever2(left) ? ExtendsResult.True : IsUnknown2(left) ? ExtendsResult.False : IsAny2(left) ? ExtendsResult.Union : ExtendsResult.False;
|
|
1597
1507
|
}
|
|
1598
1508
|
function FromTuple3(left, right) {
|
|
1599
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1509
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) && IsObjectArrayLike(right) ? ExtendsResult.True : IsArray4(right) && IsArrayOfTuple(left, right) ? ExtendsResult.True : !IsTuple2(right) ? ExtendsResult.False : IsUndefined2(left.items) && !IsUndefined2(right.items) || !IsUndefined2(left.items) && IsUndefined2(right.items) ? ExtendsResult.False : IsUndefined2(left.items) && !IsUndefined2(right.items) ? ExtendsResult.True : left.items.every((schema, index) => Visit3(schema, right.items[index]) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
|
|
1600
1510
|
}
|
|
1601
1511
|
function FromUint8Array(left, right) {
|
|
1602
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1512
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsRecord2(right) ? FromRecordRight(left, right) : IsUint8Array3(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
1603
1513
|
}
|
|
1604
1514
|
function FromUndefined(left, right) {
|
|
1605
|
-
return IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
1515
|
+
return IsStructuralRight(right) ? StructuralRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsRecord2(right) ? FromRecordRight(left, right) : IsVoid2(right) ? FromVoidRight(left, right) : IsUndefined4(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
1606
1516
|
}
|
|
1607
1517
|
function FromUnionRight(left, right) {
|
|
1608
1518
|
return right.anyOf.some((schema) => Visit3(left, schema) === ExtendsResult.True) ? ExtendsResult.True : ExtendsResult.False;
|
|
@@ -1614,22 +1524,22 @@ function FromUnknownRight(left, right) {
|
|
|
1614
1524
|
return ExtendsResult.True;
|
|
1615
1525
|
}
|
|
1616
1526
|
function FromUnknown(left, right) {
|
|
1617
|
-
return
|
|
1527
|
+
return IsNever2(right) ? FromNeverRight(left, right) : IsIntersect2(right) ? FromIntersectRight(left, right) : IsUnion2(right) ? FromUnionRight(left, right) : IsAny2(right) ? FromAnyRight(left, right) : IsString3(right) ? FromStringRight(left, right) : IsNumber4(right) ? FromNumberRight(left, right) : IsInteger2(right) ? FromIntegerRight(left, right) : IsBoolean3(right) ? FromBooleanRight(left, right) : IsArray4(right) ? FromArrayRight(left, right) : IsTuple2(right) ? FromTupleRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsUnknown2(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
1618
1528
|
}
|
|
1619
1529
|
function FromVoidRight(left, right) {
|
|
1620
|
-
return
|
|
1530
|
+
return IsUndefined4(left) ? ExtendsResult.True : IsUndefined4(left) ? ExtendsResult.True : ExtendsResult.False;
|
|
1621
1531
|
}
|
|
1622
1532
|
function FromVoid(left, right) {
|
|
1623
|
-
return
|
|
1533
|
+
return IsIntersect2(right) ? FromIntersectRight(left, right) : IsUnion2(right) ? FromUnionRight(left, right) : IsUnknown2(right) ? FromUnknownRight(left, right) : IsAny2(right) ? FromAnyRight(left, right) : IsObject4(right) ? FromObjectRight(left, right) : IsVoid2(right) ? ExtendsResult.True : ExtendsResult.False;
|
|
1624
1534
|
}
|
|
1625
1535
|
function Visit3(left, right) {
|
|
1626
|
-
return
|
|
1536
|
+
return IsTemplateLiteral2(left) || IsTemplateLiteral2(right) ? FromTemplateLiteral2(left, right) : IsRegExp3(left) || IsRegExp3(right) ? FromRegExp(left, right) : IsNot2(left) || IsNot2(right) ? FromNot(left, right) : IsAny2(left) ? FromAny(left, right) : IsArray4(left) ? FromArray3(left, right) : IsBigInt3(left) ? FromBigInt(left, right) : IsBoolean3(left) ? FromBoolean(left, right) : IsAsyncIterator3(left) ? FromAsyncIterator(left, right) : IsConstructor2(left) ? FromConstructor(left, right) : IsDate3(left) ? FromDate(left, right) : IsFunction3(left) ? FromFunction(left, right) : IsInteger2(left) ? FromInteger(left, right) : IsIntersect2(left) ? FromIntersect3(left, right) : IsIterator3(left) ? FromIterator(left, right) : IsLiteral2(left) ? FromLiteral2(left, right) : IsNever2(left) ? FromNever(left, right) : IsNull3(left) ? FromNull(left, right) : IsNumber4(left) ? FromNumber(left, right) : IsObject4(left) ? FromObject(left, right) : IsRecord2(left) ? FromRecord(left, right) : IsString3(left) ? FromString(left, right) : IsSymbol3(left) ? FromSymbol(left, right) : IsTuple2(left) ? FromTuple3(left, right) : IsPromise2(left) ? FromPromise(left, right) : IsUint8Array3(left) ? FromUint8Array(left, right) : IsUndefined4(left) ? FromUndefined(left, right) : IsUnion2(left) ? FromUnion5(left, right) : IsUnknown2(left) ? FromUnknown(left, right) : IsVoid2(left) ? FromVoid(left, right) : Throw(`Unknown left type operand '${left[Kind]}'`);
|
|
1627
1537
|
}
|
|
1628
1538
|
function ExtendsCheck(left, right) {
|
|
1629
1539
|
return Visit3(left, right);
|
|
1630
1540
|
}
|
|
1631
1541
|
|
|
1632
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1542
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.mjs
|
|
1633
1543
|
function FromProperties7(P, Right, True, False, options) {
|
|
1634
1544
|
const Acc = {};
|
|
1635
1545
|
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
@@ -1644,7 +1554,7 @@ function ExtendsFromMappedResult(Left, Right, True, False, options) {
|
|
|
1644
1554
|
return MappedResult(P);
|
|
1645
1555
|
}
|
|
1646
1556
|
|
|
1647
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1557
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/extends/extends.mjs
|
|
1648
1558
|
function ExtendsResolve(left, right, trueType, falseType) {
|
|
1649
1559
|
const R = ExtendsCheck(left, right);
|
|
1650
1560
|
return R === ExtendsResult.Union ? Union([trueType, falseType]) : R === ExtendsResult.True ? trueType : falseType;
|
|
@@ -1653,7 +1563,7 @@ function Extends(L, R, T, F, options) {
|
|
|
1653
1563
|
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);
|
|
1654
1564
|
}
|
|
1655
1565
|
|
|
1656
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1566
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.mjs
|
|
1657
1567
|
function FromPropertyKey(K, U, L, R, options) {
|
|
1658
1568
|
return {
|
|
1659
1569
|
[K]: Extends(Literal(K), U, L, R, Clone(options))
|
|
@@ -1672,17 +1582,17 @@ function ExtendsFromMappedKey(T, U, L, R, options) {
|
|
|
1672
1582
|
return MappedResult(P);
|
|
1673
1583
|
}
|
|
1674
1584
|
|
|
1675
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1585
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/clone/type.mjs
|
|
1676
1586
|
function CloneType(schema, options) {
|
|
1677
1587
|
return options === undefined ? Clone(schema) : Clone({ ...options, ...schema });
|
|
1678
1588
|
}
|
|
1679
1589
|
|
|
1680
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1590
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/argument/argument.mjs
|
|
1681
1591
|
function Argument(index) {
|
|
1682
1592
|
return CreateType({ [Kind]: "Argument", index });
|
|
1683
1593
|
}
|
|
1684
1594
|
|
|
1685
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1595
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.mjs
|
|
1686
1596
|
function FromComputed2(target, parameters) {
|
|
1687
1597
|
return Computed("Awaited", [Computed(target, parameters)]);
|
|
1688
1598
|
}
|
|
@@ -1705,7 +1615,7 @@ function Awaited(type, options) {
|
|
|
1705
1615
|
return CreateType(IsComputed(type) ? FromComputed2(type.target, type.parameters) : IsIntersect(type) ? FromIntersect4(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsPromise(type) ? FromPromise2(type.item) : IsRef(type) ? FromRef2(type.$ref) : type, options);
|
|
1706
1616
|
}
|
|
1707
1617
|
|
|
1708
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1618
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/composite/composite.mjs
|
|
1709
1619
|
function CompositeKeys(T) {
|
|
1710
1620
|
const Acc = [];
|
|
1711
1621
|
for (const L of T)
|
|
@@ -1735,32 +1645,32 @@ function Composite(T, options) {
|
|
|
1735
1645
|
return R;
|
|
1736
1646
|
}
|
|
1737
1647
|
|
|
1738
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1648
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/date/date.mjs
|
|
1739
1649
|
function Date2(options) {
|
|
1740
1650
|
return CreateType({ [Kind]: "Date", type: "Date" }, options);
|
|
1741
1651
|
}
|
|
1742
1652
|
|
|
1743
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1653
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/null/null.mjs
|
|
1744
1654
|
function Null(options) {
|
|
1745
1655
|
return CreateType({ [Kind]: "Null", type: "null" }, options);
|
|
1746
1656
|
}
|
|
1747
1657
|
|
|
1748
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1658
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.mjs
|
|
1749
1659
|
function Symbol2(options) {
|
|
1750
1660
|
return CreateType({ [Kind]: "Symbol", type: "symbol" }, options);
|
|
1751
1661
|
}
|
|
1752
1662
|
|
|
1753
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1663
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.mjs
|
|
1754
1664
|
function Undefined(options) {
|
|
1755
1665
|
return CreateType({ [Kind]: "Undefined", type: "undefined" }, options);
|
|
1756
1666
|
}
|
|
1757
1667
|
|
|
1758
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1668
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.mjs
|
|
1759
1669
|
function Uint8Array2(options) {
|
|
1760
1670
|
return CreateType({ [Kind]: "Uint8Array", type: "Uint8Array" }, options);
|
|
1761
1671
|
}
|
|
1762
1672
|
|
|
1763
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1673
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/const/const.mjs
|
|
1764
1674
|
function FromArray4(T) {
|
|
1765
1675
|
return T.map((L) => FromValue(L, false));
|
|
1766
1676
|
}
|
|
@@ -1780,12 +1690,12 @@ function Const(T, options) {
|
|
|
1780
1690
|
return CreateType(FromValue(T, true), options);
|
|
1781
1691
|
}
|
|
1782
1692
|
|
|
1783
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1693
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.mjs
|
|
1784
1694
|
function ConstructorParameters(schema, options) {
|
|
1785
1695
|
return IsConstructor(schema) ? Tuple(schema.parameters, options) : Never(options);
|
|
1786
1696
|
}
|
|
1787
1697
|
|
|
1788
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1698
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/enum/enum.mjs
|
|
1789
1699
|
function Enum(item, options) {
|
|
1790
1700
|
if (IsUndefined2(item))
|
|
1791
1701
|
throw new Error("Enum undefined or empty");
|
|
@@ -1795,12 +1705,12 @@ function Enum(item, options) {
|
|
|
1795
1705
|
return Union(anyOf, { ...options, [Hint]: "Enum" });
|
|
1796
1706
|
}
|
|
1797
1707
|
|
|
1798
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1708
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.mjs
|
|
1799
1709
|
function ExcludeFromTemplateLiteral(L, R) {
|
|
1800
1710
|
return Exclude(TemplateLiteralToUnion(L), R);
|
|
1801
1711
|
}
|
|
1802
1712
|
|
|
1803
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1713
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.mjs
|
|
1804
1714
|
function ExcludeRest(L, R) {
|
|
1805
1715
|
const excluded = L.filter((inner) => ExtendsCheck(inner, R) === ExtendsResult.False);
|
|
1806
1716
|
return excluded.length === 1 ? excluded[0] : Union(excluded);
|
|
@@ -1813,7 +1723,7 @@ function Exclude(L, R, options = {}) {
|
|
|
1813
1723
|
return CreateType(IsUnion(L) ? ExcludeRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? Never() : L, options);
|
|
1814
1724
|
}
|
|
1815
1725
|
|
|
1816
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1726
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.mjs
|
|
1817
1727
|
function FromProperties9(P, U) {
|
|
1818
1728
|
const Acc = {};
|
|
1819
1729
|
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
@@ -1828,12 +1738,12 @@ function ExcludeFromMappedResult(R, T) {
|
|
|
1828
1738
|
return MappedResult(P);
|
|
1829
1739
|
}
|
|
1830
1740
|
|
|
1831
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1741
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.mjs
|
|
1832
1742
|
function ExtractFromTemplateLiteral(L, R) {
|
|
1833
1743
|
return Extract(TemplateLiteralToUnion(L), R);
|
|
1834
1744
|
}
|
|
1835
1745
|
|
|
1836
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1746
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/extract/extract.mjs
|
|
1837
1747
|
function ExtractRest(L, R) {
|
|
1838
1748
|
const extracted = L.filter((inner) => ExtendsCheck(inner, R) !== ExtendsResult.False);
|
|
1839
1749
|
return extracted.length === 1 ? extracted[0] : Union(extracted);
|
|
@@ -1846,7 +1756,7 @@ function Extract(L, R, options) {
|
|
|
1846
1756
|
return CreateType(IsUnion(L) ? ExtractRest(L.anyOf, R) : ExtendsCheck(L, R) !== ExtendsResult.False ? L : Never(), options);
|
|
1847
1757
|
}
|
|
1848
1758
|
|
|
1849
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1759
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.mjs
|
|
1850
1760
|
function FromProperties10(P, T) {
|
|
1851
1761
|
const Acc = {};
|
|
1852
1762
|
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
@@ -1861,17 +1771,17 @@ function ExtractFromMappedResult(R, T) {
|
|
|
1861
1771
|
return MappedResult(P);
|
|
1862
1772
|
}
|
|
1863
1773
|
|
|
1864
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1774
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.mjs
|
|
1865
1775
|
function InstanceType(schema, options) {
|
|
1866
1776
|
return IsConstructor(schema) ? CreateType(schema.returns, options) : Never(options);
|
|
1867
1777
|
}
|
|
1868
1778
|
|
|
1869
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1779
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.mjs
|
|
1870
1780
|
function ReadonlyOptional(schema) {
|
|
1871
1781
|
return Readonly(Optional(schema));
|
|
1872
1782
|
}
|
|
1873
1783
|
|
|
1874
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1784
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/record/record.mjs
|
|
1875
1785
|
function RecordCreateFromPattern(pattern, T, options) {
|
|
1876
1786
|
return CreateType({ [Kind]: "Record", type: "object", patternProperties: { [pattern]: T } }, options);
|
|
1877
1787
|
}
|
|
@@ -1926,7 +1836,7 @@ function RecordValue2(type) {
|
|
|
1926
1836
|
return type.patternProperties[RecordPattern(type)];
|
|
1927
1837
|
}
|
|
1928
1838
|
|
|
1929
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1839
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.mjs
|
|
1930
1840
|
function FromConstructor2(args, type) {
|
|
1931
1841
|
type.parameters = FromTypes(args, type.parameters);
|
|
1932
1842
|
type.returns = FromType(args, type.returns);
|
|
@@ -2001,12 +1911,12 @@ function Instantiate(type, args) {
|
|
|
2001
1911
|
return FromType(args, CloneType(type));
|
|
2002
1912
|
}
|
|
2003
1913
|
|
|
2004
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1914
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/integer/integer.mjs
|
|
2005
1915
|
function Integer(options) {
|
|
2006
1916
|
return CreateType({ [Kind]: "Integer", type: "integer" }, options);
|
|
2007
1917
|
}
|
|
2008
1918
|
|
|
2009
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1919
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs
|
|
2010
1920
|
function MappedIntrinsicPropertyKey(K, M, options) {
|
|
2011
1921
|
return {
|
|
2012
1922
|
[K]: Intrinsic(Literal(K), M, Clone(options))
|
|
@@ -2026,7 +1936,7 @@ function IntrinsicFromMappedKey(T, M, options) {
|
|
|
2026
1936
|
return MappedResult(P);
|
|
2027
1937
|
}
|
|
2028
1938
|
|
|
2029
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1939
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.mjs
|
|
2030
1940
|
function ApplyUncapitalize(value) {
|
|
2031
1941
|
const [first, rest] = [value.slice(0, 1), value.slice(1)];
|
|
2032
1942
|
return [first.toLowerCase(), rest].join("");
|
|
@@ -2062,27 +1972,27 @@ function Intrinsic(schema, mode, options = {}) {
|
|
|
2062
1972
|
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);
|
|
2063
1973
|
}
|
|
2064
1974
|
|
|
2065
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1975
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.mjs
|
|
2066
1976
|
function Capitalize(T, options = {}) {
|
|
2067
1977
|
return Intrinsic(T, "Capitalize", options);
|
|
2068
1978
|
}
|
|
2069
1979
|
|
|
2070
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1980
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.mjs
|
|
2071
1981
|
function Lowercase(T, options = {}) {
|
|
2072
1982
|
return Intrinsic(T, "Lowercase", options);
|
|
2073
1983
|
}
|
|
2074
1984
|
|
|
2075
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1985
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.mjs
|
|
2076
1986
|
function Uncapitalize(T, options = {}) {
|
|
2077
1987
|
return Intrinsic(T, "Uncapitalize", options);
|
|
2078
1988
|
}
|
|
2079
1989
|
|
|
2080
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1990
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.mjs
|
|
2081
1991
|
function Uppercase(T, options = {}) {
|
|
2082
1992
|
return Intrinsic(T, "Uppercase", options);
|
|
2083
1993
|
}
|
|
2084
1994
|
|
|
2085
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
1995
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.mjs
|
|
2086
1996
|
function FromProperties12(properties, propertyKeys, options) {
|
|
2087
1997
|
const result = {};
|
|
2088
1998
|
for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
|
|
@@ -2097,7 +2007,7 @@ function OmitFromMappedResult(mappedResult, propertyKeys, options) {
|
|
|
2097
2007
|
return MappedResult(properties);
|
|
2098
2008
|
}
|
|
2099
2009
|
|
|
2100
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2010
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/omit/omit.mjs
|
|
2101
2011
|
function FromIntersect6(types, propertyKeys) {
|
|
2102
2012
|
return types.map((type) => OmitResolve(type, propertyKeys));
|
|
2103
2013
|
}
|
|
@@ -2117,7 +2027,7 @@ function FromObject3(type, propertyKeys, properties) {
|
|
|
2117
2027
|
return Object2(mappedProperties, options);
|
|
2118
2028
|
}
|
|
2119
2029
|
function UnionFromPropertyKeys(propertyKeys) {
|
|
2120
|
-
const result = propertyKeys.reduce((
|
|
2030
|
+
const result = propertyKeys.reduce((result, key) => IsLiteralValue(key) ? [...result, Literal(key)] : result, []);
|
|
2121
2031
|
return Union(result);
|
|
2122
2032
|
}
|
|
2123
2033
|
function OmitResolve(type, propertyKeys) {
|
|
@@ -2131,7 +2041,7 @@ function Omit(type, key, options) {
|
|
|
2131
2041
|
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 });
|
|
2132
2042
|
}
|
|
2133
2043
|
|
|
2134
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2044
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.mjs
|
|
2135
2045
|
function FromPropertyKey2(type, key, options) {
|
|
2136
2046
|
return { [key]: Omit(type, [key], Clone(options)) };
|
|
2137
2047
|
}
|
|
@@ -2148,7 +2058,7 @@ function OmitFromMappedKey(type, mappedKey, options) {
|
|
|
2148
2058
|
return MappedResult(properties);
|
|
2149
2059
|
}
|
|
2150
2060
|
|
|
2151
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2061
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.mjs
|
|
2152
2062
|
function FromProperties14(properties, propertyKeys, options) {
|
|
2153
2063
|
const result = {};
|
|
2154
2064
|
for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
|
|
@@ -2163,7 +2073,7 @@ function PickFromMappedResult(mappedResult, propertyKeys, options) {
|
|
|
2163
2073
|
return MappedResult(properties);
|
|
2164
2074
|
}
|
|
2165
2075
|
|
|
2166
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2076
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/pick/pick.mjs
|
|
2167
2077
|
function FromIntersect7(types, propertyKeys) {
|
|
2168
2078
|
return types.map((type) => PickResolve(type, propertyKeys));
|
|
2169
2079
|
}
|
|
@@ -2183,7 +2093,7 @@ function FromObject4(Type, keys, properties) {
|
|
|
2183
2093
|
return Object2(mappedProperties, options);
|
|
2184
2094
|
}
|
|
2185
2095
|
function UnionFromPropertyKeys2(propertyKeys) {
|
|
2186
|
-
const result = propertyKeys.reduce((
|
|
2096
|
+
const result = propertyKeys.reduce((result, key) => IsLiteralValue(key) ? [...result, Literal(key)] : result, []);
|
|
2187
2097
|
return Union(result);
|
|
2188
2098
|
}
|
|
2189
2099
|
function PickResolve(type, propertyKeys) {
|
|
@@ -2197,7 +2107,7 @@ function Pick(type, key, options) {
|
|
|
2197
2107
|
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 });
|
|
2198
2108
|
}
|
|
2199
2109
|
|
|
2200
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2110
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.mjs
|
|
2201
2111
|
function FromPropertyKey3(type, key, options) {
|
|
2202
2112
|
return {
|
|
2203
2113
|
[key]: Pick(type, [key], Clone(options))
|
|
@@ -2216,7 +2126,7 @@ function PickFromMappedKey(type, mappedKey, options) {
|
|
|
2216
2126
|
return MappedResult(properties);
|
|
2217
2127
|
}
|
|
2218
2128
|
|
|
2219
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2129
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/partial/partial.mjs
|
|
2220
2130
|
function FromComputed3(target, parameters) {
|
|
2221
2131
|
return Computed("Partial", [Computed(target, parameters)]);
|
|
2222
2132
|
}
|
|
@@ -2248,7 +2158,7 @@ function Partial(type, options) {
|
|
|
2248
2158
|
}
|
|
2249
2159
|
}
|
|
2250
2160
|
|
|
2251
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2161
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.mjs
|
|
2252
2162
|
function FromProperties17(K, options) {
|
|
2253
2163
|
const Acc = {};
|
|
2254
2164
|
for (const K2 of globalThis.Object.getOwnPropertyNames(K))
|
|
@@ -2263,7 +2173,7 @@ function PartialFromMappedResult(R, options) {
|
|
|
2263
2173
|
return MappedResult(P);
|
|
2264
2174
|
}
|
|
2265
2175
|
|
|
2266
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2176
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/required/required.mjs
|
|
2267
2177
|
function FromComputed4(target, parameters) {
|
|
2268
2178
|
return Computed("Required", [Computed(target, parameters)]);
|
|
2269
2179
|
}
|
|
@@ -2295,7 +2205,7 @@ function Required(type, options) {
|
|
|
2295
2205
|
}
|
|
2296
2206
|
}
|
|
2297
2207
|
|
|
2298
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2208
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.mjs
|
|
2299
2209
|
function FromProperties19(P, options) {
|
|
2300
2210
|
const Acc = {};
|
|
2301
2211
|
for (const K2 of globalThis.Object.getOwnPropertyNames(P))
|
|
@@ -2310,7 +2220,7 @@ function RequiredFromMappedResult(R, options) {
|
|
|
2310
2220
|
return MappedResult(P);
|
|
2311
2221
|
}
|
|
2312
2222
|
|
|
2313
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2223
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/module/compute.mjs
|
|
2314
2224
|
function DereferenceParameters(moduleProperties, types) {
|
|
2315
2225
|
return types.map((type) => {
|
|
2316
2226
|
return IsRef(type) ? Dereference(moduleProperties, type.$ref) : FromType2(moduleProperties, type);
|
|
@@ -2397,7 +2307,7 @@ function ComputeModuleProperties(moduleProperties) {
|
|
|
2397
2307
|
}, {});
|
|
2398
2308
|
}
|
|
2399
2309
|
|
|
2400
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2310
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/module/module.mjs
|
|
2401
2311
|
class TModule {
|
|
2402
2312
|
constructor($defs) {
|
|
2403
2313
|
const computed = ComputeModuleProperties($defs);
|
|
@@ -2418,17 +2328,17 @@ function Module(properties) {
|
|
|
2418
2328
|
return new TModule(properties);
|
|
2419
2329
|
}
|
|
2420
2330
|
|
|
2421
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2331
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/not/not.mjs
|
|
2422
2332
|
function Not(type, options) {
|
|
2423
2333
|
return CreateType({ [Kind]: "Not", not: type }, options);
|
|
2424
2334
|
}
|
|
2425
2335
|
|
|
2426
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2336
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.mjs
|
|
2427
2337
|
function Parameters(schema, options) {
|
|
2428
2338
|
return IsFunction2(schema) ? Tuple(schema.parameters, options) : Never();
|
|
2429
2339
|
}
|
|
2430
2340
|
|
|
2431
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2341
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.mjs
|
|
2432
2342
|
var Ordinal = 0;
|
|
2433
2343
|
function Recursive(callback, options = {}) {
|
|
2434
2344
|
if (IsUndefined2(options.$id))
|
|
@@ -2438,13 +2348,13 @@ function Recursive(callback, options = {}) {
|
|
|
2438
2348
|
return CreateType({ [Hint]: "Recursive", ...thisType }, options);
|
|
2439
2349
|
}
|
|
2440
2350
|
|
|
2441
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2351
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.mjs
|
|
2442
2352
|
function RegExp2(unresolved, options) {
|
|
2443
2353
|
const expr = IsString(unresolved) ? new globalThis.RegExp(unresolved) : unresolved;
|
|
2444
2354
|
return CreateType({ [Kind]: "RegExp", type: "RegExp", source: expr.source, flags: expr.flags }, options);
|
|
2445
2355
|
}
|
|
2446
2356
|
|
|
2447
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2357
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/rest/rest.mjs
|
|
2448
2358
|
function RestResolve(T) {
|
|
2449
2359
|
return IsIntersect(T) ? T.allOf : IsUnion(T) ? T.anyOf : IsTuple(T) ? T.items ?? [] : [];
|
|
2450
2360
|
}
|
|
@@ -2452,12 +2362,12 @@ function Rest(T) {
|
|
|
2452
2362
|
return RestResolve(T);
|
|
2453
2363
|
}
|
|
2454
2364
|
|
|
2455
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2365
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.mjs
|
|
2456
2366
|
function ReturnType(schema, options) {
|
|
2457
2367
|
return IsFunction2(schema) ? CreateType(schema.returns, options) : Never(options);
|
|
2458
2368
|
}
|
|
2459
2369
|
|
|
2460
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2370
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/transform/transform.mjs
|
|
2461
2371
|
class TransformDecodeBuilder {
|
|
2462
2372
|
constructor(schema) {
|
|
2463
2373
|
this.schema = schema;
|
|
@@ -2490,82 +2400,82 @@ function Transform(schema) {
|
|
|
2490
2400
|
return new TransformDecodeBuilder(schema);
|
|
2491
2401
|
}
|
|
2492
2402
|
|
|
2493
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2403
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/void/void.mjs
|
|
2494
2404
|
function Void(options) {
|
|
2495
2405
|
return CreateType({ [Kind]: "Void", type: "void" }, options);
|
|
2496
2406
|
}
|
|
2497
2407
|
|
|
2498
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2408
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/type/type.mjs
|
|
2499
2409
|
var exports_type2 = {};
|
|
2500
2410
|
__export(exports_type2, {
|
|
2501
|
-
|
|
2502
|
-
Uppercase: () => Uppercase,
|
|
2503
|
-
Unsafe: () => Unsafe,
|
|
2504
|
-
Unknown: () => Unknown,
|
|
2505
|
-
Union: () => Union,
|
|
2506
|
-
Undefined: () => Undefined,
|
|
2507
|
-
Uncapitalize: () => Uncapitalize,
|
|
2508
|
-
Uint8Array: () => Uint8Array2,
|
|
2509
|
-
Tuple: () => Tuple,
|
|
2510
|
-
Transform: () => Transform,
|
|
2511
|
-
TemplateLiteral: () => TemplateLiteral,
|
|
2512
|
-
Symbol: () => Symbol2,
|
|
2513
|
-
String: () => String2,
|
|
2514
|
-
ReturnType: () => ReturnType,
|
|
2515
|
-
Rest: () => Rest,
|
|
2516
|
-
Required: () => Required,
|
|
2517
|
-
RegExp: () => RegExp2,
|
|
2518
|
-
Ref: () => Ref,
|
|
2519
|
-
Recursive: () => Recursive,
|
|
2520
|
-
Record: () => Record,
|
|
2521
|
-
ReadonlyOptional: () => ReadonlyOptional,
|
|
2522
|
-
Readonly: () => Readonly,
|
|
2523
|
-
Promise: () => Promise2,
|
|
2524
|
-
Pick: () => Pick,
|
|
2525
|
-
Partial: () => Partial,
|
|
2526
|
-
Parameters: () => Parameters,
|
|
2527
|
-
Optional: () => Optional,
|
|
2528
|
-
Omit: () => Omit,
|
|
2529
|
-
Object: () => Object2,
|
|
2530
|
-
Number: () => Number2,
|
|
2531
|
-
Null: () => Null,
|
|
2532
|
-
Not: () => Not,
|
|
2533
|
-
Never: () => Never,
|
|
2534
|
-
Module: () => Module,
|
|
2535
|
-
Mapped: () => Mapped,
|
|
2536
|
-
Lowercase: () => Lowercase,
|
|
2537
|
-
Literal: () => Literal,
|
|
2538
|
-
KeyOf: () => KeyOf,
|
|
2539
|
-
Iterator: () => Iterator,
|
|
2540
|
-
Intersect: () => Intersect,
|
|
2541
|
-
Integer: () => Integer,
|
|
2542
|
-
Instantiate: () => Instantiate,
|
|
2543
|
-
InstanceType: () => InstanceType,
|
|
2544
|
-
Index: () => Index,
|
|
2545
|
-
Function: () => Function,
|
|
2546
|
-
Extract: () => Extract,
|
|
2547
|
-
Extends: () => Extends,
|
|
2548
|
-
Exclude: () => Exclude,
|
|
2549
|
-
Enum: () => Enum,
|
|
2550
|
-
Date: () => Date2,
|
|
2551
|
-
ConstructorParameters: () => ConstructorParameters,
|
|
2552
|
-
Constructor: () => Constructor,
|
|
2553
|
-
Const: () => Const,
|
|
2554
|
-
Composite: () => Composite,
|
|
2555
|
-
Capitalize: () => Capitalize,
|
|
2556
|
-
Boolean: () => Boolean,
|
|
2557
|
-
BigInt: () => BigInt,
|
|
2558
|
-
Awaited: () => Awaited,
|
|
2559
|
-
AsyncIterator: () => AsyncIterator,
|
|
2560
|
-
Array: () => Array2,
|
|
2411
|
+
Any: () => Any,
|
|
2561
2412
|
Argument: () => Argument,
|
|
2562
|
-
|
|
2413
|
+
Array: () => Array2,
|
|
2414
|
+
AsyncIterator: () => AsyncIterator,
|
|
2415
|
+
Awaited: () => Awaited,
|
|
2416
|
+
BigInt: () => BigInt,
|
|
2417
|
+
Boolean: () => Boolean2,
|
|
2418
|
+
Capitalize: () => Capitalize,
|
|
2419
|
+
Composite: () => Composite,
|
|
2420
|
+
Const: () => Const,
|
|
2421
|
+
Constructor: () => Constructor,
|
|
2422
|
+
ConstructorParameters: () => ConstructorParameters,
|
|
2423
|
+
Date: () => Date2,
|
|
2424
|
+
Enum: () => Enum,
|
|
2425
|
+
Exclude: () => Exclude,
|
|
2426
|
+
Extends: () => Extends,
|
|
2427
|
+
Extract: () => Extract,
|
|
2428
|
+
Function: () => Function,
|
|
2429
|
+
Index: () => Index,
|
|
2430
|
+
InstanceType: () => InstanceType,
|
|
2431
|
+
Instantiate: () => Instantiate,
|
|
2432
|
+
Integer: () => Integer,
|
|
2433
|
+
Intersect: () => Intersect,
|
|
2434
|
+
Iterator: () => Iterator,
|
|
2435
|
+
KeyOf: () => KeyOf,
|
|
2436
|
+
Literal: () => Literal,
|
|
2437
|
+
Lowercase: () => Lowercase,
|
|
2438
|
+
Mapped: () => Mapped,
|
|
2439
|
+
Module: () => Module,
|
|
2440
|
+
Never: () => Never,
|
|
2441
|
+
Not: () => Not,
|
|
2442
|
+
Null: () => Null,
|
|
2443
|
+
Number: () => Number2,
|
|
2444
|
+
Object: () => Object2,
|
|
2445
|
+
Omit: () => Omit,
|
|
2446
|
+
Optional: () => Optional,
|
|
2447
|
+
Parameters: () => Parameters,
|
|
2448
|
+
Partial: () => Partial,
|
|
2449
|
+
Pick: () => Pick,
|
|
2450
|
+
Promise: () => Promise2,
|
|
2451
|
+
Readonly: () => Readonly,
|
|
2452
|
+
ReadonlyOptional: () => ReadonlyOptional,
|
|
2453
|
+
Record: () => Record,
|
|
2454
|
+
Recursive: () => Recursive,
|
|
2455
|
+
Ref: () => Ref,
|
|
2456
|
+
RegExp: () => RegExp2,
|
|
2457
|
+
Required: () => Required,
|
|
2458
|
+
Rest: () => Rest,
|
|
2459
|
+
ReturnType: () => ReturnType,
|
|
2460
|
+
String: () => String2,
|
|
2461
|
+
Symbol: () => Symbol2,
|
|
2462
|
+
TemplateLiteral: () => TemplateLiteral,
|
|
2463
|
+
Transform: () => Transform,
|
|
2464
|
+
Tuple: () => Tuple,
|
|
2465
|
+
Uint8Array: () => Uint8Array2,
|
|
2466
|
+
Uncapitalize: () => Uncapitalize,
|
|
2467
|
+
Undefined: () => Undefined,
|
|
2468
|
+
Union: () => Union,
|
|
2469
|
+
Unknown: () => Unknown,
|
|
2470
|
+
Unsafe: () => Unsafe,
|
|
2471
|
+
Uppercase: () => Uppercase,
|
|
2472
|
+
Void: () => Void
|
|
2563
2473
|
});
|
|
2564
2474
|
|
|
2565
|
-
// ../node_modules/.bun/@sinclair+typebox@0.34.
|
|
2475
|
+
// ../node_modules/.bun/@sinclair+typebox@0.34.52/node_modules/@sinclair/typebox/build/esm/type/type/index.mjs
|
|
2566
2476
|
var Type = exports_type2;
|
|
2567
2477
|
|
|
2568
|
-
// ../node_modules/.bun/@absolutejs+manifest@0.
|
|
2478
|
+
// ../node_modules/.bun/@absolutejs+manifest@0.9.0+78c06a479861f4f9/node_modules/@absolutejs/manifest/dist/index.js
|
|
2569
2479
|
var defineImplementation = () => (implementation) => {
|
|
2570
2480
|
const defined = implementation;
|
|
2571
2481
|
return defined;
|
|
@@ -2722,6 +2632,79 @@ var serializedTool = Type.Object({
|
|
|
2722
2632
|
input: jsonSchemaObject,
|
|
2723
2633
|
kind: Type.Union([Type.Literal("runtime"), Type.Literal("workspace")])
|
|
2724
2634
|
});
|
|
2635
|
+
var productId = Type.String({ pattern: "^[a-z][a-z0-9_-]{0,63}$" });
|
|
2636
|
+
var productCopy = {
|
|
2637
|
+
description: Type.String({ minLength: 1 }),
|
|
2638
|
+
id: productId,
|
|
2639
|
+
title: Type.String({ minLength: 1 })
|
|
2640
|
+
};
|
|
2641
|
+
var productOperation = Type.Union([
|
|
2642
|
+
Type.Literal("aggregate"),
|
|
2643
|
+
Type.Literal("create"),
|
|
2644
|
+
Type.Literal("delete"),
|
|
2645
|
+
Type.Literal("detail"),
|
|
2646
|
+
Type.Literal("list"),
|
|
2647
|
+
Type.Literal("update")
|
|
2648
|
+
]);
|
|
2649
|
+
var productProjection = Type.Object({
|
|
2650
|
+
blocks: Type.Optional(Type.Array(Type.Object({
|
|
2651
|
+
...productCopy,
|
|
2652
|
+
category: Type.String({ minLength: 1 }),
|
|
2653
|
+
componentExport: Type.String({ minLength: 1 }),
|
|
2654
|
+
frameworks: Type.Optional(Type.Array(Type.Union(clientFrameworks.map((framework) => Type.Literal(framework))))),
|
|
2655
|
+
props: jsonSchemaObject
|
|
2656
|
+
}))),
|
|
2657
|
+
connections: Type.Optional(Type.Array(Type.Object({
|
|
2658
|
+
...productCopy,
|
|
2659
|
+
envKeys: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
|
|
2660
|
+
kind: Type.Union([
|
|
2661
|
+
Type.Literal("none"),
|
|
2662
|
+
Type.Literal("oauth"),
|
|
2663
|
+
Type.Literal("secret")
|
|
2664
|
+
]),
|
|
2665
|
+
setupTool: Type.Optional(Type.String({ pattern: TOOL_NAME_PATTERN.source })),
|
|
2666
|
+
testTool: Type.Optional(Type.String({ pattern: TOOL_NAME_PATTERN.source }))
|
|
2667
|
+
}))),
|
|
2668
|
+
dataSources: Type.Optional(Type.Array(Type.Object({
|
|
2669
|
+
...productCopy,
|
|
2670
|
+
operations: Type.Array(productOperation, { minItems: 1 }),
|
|
2671
|
+
schema: jsonSchemaObject,
|
|
2672
|
+
tools: Type.Optional(Type.Partial(Type.Object({
|
|
2673
|
+
aggregate: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
|
|
2674
|
+
create: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
|
|
2675
|
+
delete: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
|
|
2676
|
+
detail: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
|
|
2677
|
+
list: Type.String({ pattern: TOOL_NAME_PATTERN.source }),
|
|
2678
|
+
update: Type.String({ pattern: TOOL_NAME_PATTERN.source })
|
|
2679
|
+
})))
|
|
2680
|
+
}))),
|
|
2681
|
+
events: Type.Optional(Type.Array(Type.Object({
|
|
2682
|
+
...productCopy,
|
|
2683
|
+
schema: jsonSchemaObject,
|
|
2684
|
+
source: Type.Union([
|
|
2685
|
+
Type.Literal("data"),
|
|
2686
|
+
Type.Literal("package"),
|
|
2687
|
+
Type.Literal("ui"),
|
|
2688
|
+
Type.Literal("webhook")
|
|
2689
|
+
])
|
|
2690
|
+
}))),
|
|
2691
|
+
healthChecks: Type.Optional(Type.Array(Type.Object({
|
|
2692
|
+
...productCopy,
|
|
2693
|
+
tool: Type.String({ pattern: TOOL_NAME_PATTERN.source })
|
|
2694
|
+
}))),
|
|
2695
|
+
releaseChecks: Type.Optional(Type.Array(Type.Object({
|
|
2696
|
+
...productCopy,
|
|
2697
|
+
healthCheckIds: Type.Optional(Type.Array(productId)),
|
|
2698
|
+
severity: Type.Union([
|
|
2699
|
+
Type.Literal("blocking"),
|
|
2700
|
+
Type.Literal("warning")
|
|
2701
|
+
])
|
|
2702
|
+
}))),
|
|
2703
|
+
workflowActions: Type.Optional(Type.Array(Type.Object({
|
|
2704
|
+
...productCopy,
|
|
2705
|
+
tool: Type.String({ pattern: TOOL_NAME_PATTERN.source })
|
|
2706
|
+
})))
|
|
2707
|
+
});
|
|
2725
2708
|
var manifestSchema = Type.Object({
|
|
2726
2709
|
contract: Type.Union([Type.Literal(1), Type.Literal(2)]),
|
|
2727
2710
|
discovery: Type.Optional(Type.Object({
|
|
@@ -2747,6 +2730,14 @@ var manifestSchema = Type.Object({
|
|
|
2747
2730
|
tagline: Type.String({ minLength: 1 })
|
|
2748
2731
|
}),
|
|
2749
2732
|
implements: Type.Optional(Type.Array(adapterImplementation)),
|
|
2733
|
+
integration: Type.Optional(Type.Object({
|
|
2734
|
+
description: Type.Optional(Type.String({ minLength: 1 })),
|
|
2735
|
+
mode: Type.Union([
|
|
2736
|
+
Type.Literal("adapter"),
|
|
2737
|
+
Type.Literal("code-first"),
|
|
2738
|
+
Type.Literal("recipe")
|
|
2739
|
+
])
|
|
2740
|
+
})),
|
|
2750
2741
|
lifecycle: Type.Optional(Type.Array(lifecycleStep)),
|
|
2751
2742
|
presets: Type.Optional(Type.Array(Type.Object({
|
|
2752
2743
|
description: Type.Optional(Type.String()),
|
|
@@ -2754,6 +2745,7 @@ var manifestSchema = Type.Object({
|
|
|
2754
2745
|
title: Type.String(),
|
|
2755
2746
|
values: Type.Record(Type.String(), Type.Unknown())
|
|
2756
2747
|
}))),
|
|
2748
|
+
product: Type.Optional(productProjection),
|
|
2757
2749
|
requires: Type.Optional(manifestRequirements),
|
|
2758
2750
|
settings: jsonSchemaObject,
|
|
2759
2751
|
slots: Type.Optional(Type.Record(Type.String(), adapterSlot)),
|
|
@@ -2793,5 +2785,5 @@ export {
|
|
|
2793
2785
|
manifest
|
|
2794
2786
|
};
|
|
2795
2787
|
|
|
2796
|
-
//# debugId=
|
|
2788
|
+
//# debugId=B3A8D9B92513B5DB64756E2164756E21
|
|
2797
2789
|
//# sourceMappingURL=manifest.js.map
|