@supacloud/compiler 0.51.0 → 0.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +326 -262
- package/dist/delivery-bundle-worker.js +292 -228
- package/dist/index.js +326 -262
- package/dist/migration-app-version.d.ts +1 -1
- package/dist/migration-elysia-version.d.ts +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -5195,90 +5195,72 @@ var init_settings2 = __esm(() => {
|
|
|
5195
5195
|
init_settings();
|
|
5196
5196
|
});
|
|
5197
5197
|
|
|
5198
|
-
// node_modules/typebox/build/system/memory/
|
|
5199
|
-
function
|
|
5200
|
-
return
|
|
5198
|
+
// node_modules/typebox/build/system/memory/keys.mjs
|
|
5199
|
+
function Keys2(value) {
|
|
5200
|
+
return [...Keys(value), ...Symbols(value)];
|
|
5201
5201
|
}
|
|
5202
|
-
var
|
|
5202
|
+
var init_keys = __esm(() => {
|
|
5203
|
+
init_guard2();
|
|
5204
|
+
});
|
|
5205
|
+
|
|
5206
|
+
// node_modules/typebox/build/system/memory/finalize.mjs
|
|
5207
|
+
function Freeze(value, seen) {
|
|
5208
|
+
if (seen.has(value))
|
|
5209
|
+
return;
|
|
5210
|
+
seen.add(value);
|
|
5211
|
+
for (const key of Keys2(value)) {
|
|
5212
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
5213
|
+
if (!descriptor || !("value" in descriptor))
|
|
5214
|
+
continue;
|
|
5215
|
+
if (IsObject(descriptor.value))
|
|
5216
|
+
Freeze(descriptor.value, seen);
|
|
5217
|
+
}
|
|
5218
|
+
Object.freeze(value);
|
|
5219
|
+
}
|
|
5220
|
+
function Finalize(value) {
|
|
5221
|
+
if (!Get().immutableTypes)
|
|
5222
|
+
return value;
|
|
5223
|
+
Freeze(value, new WeakSet);
|
|
5224
|
+
return value;
|
|
5225
|
+
}
|
|
5226
|
+
var init_finalize = __esm(() => {
|
|
5227
|
+
init_guard2();
|
|
5203
5228
|
init_settings2();
|
|
5229
|
+
init_keys();
|
|
5204
5230
|
});
|
|
5205
5231
|
|
|
5206
5232
|
// node_modules/typebox/build/system/memory/assign.mjs
|
|
5207
5233
|
function Assign(left, right) {
|
|
5208
5234
|
Metrics.assign += 1;
|
|
5209
|
-
|
|
5235
|
+
const result = {}, rightKeys = Keys2(right), leftKeys = Keys2(left);
|
|
5236
|
+
for (const key of leftKeys) {
|
|
5237
|
+
if (rightKeys.includes(key))
|
|
5238
|
+
continue;
|
|
5239
|
+
Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(left, key));
|
|
5240
|
+
}
|
|
5241
|
+
for (const key of rightKeys) {
|
|
5242
|
+
Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(right, key));
|
|
5243
|
+
}
|
|
5244
|
+
return Finalize(result);
|
|
5210
5245
|
}
|
|
5211
5246
|
var init_assign = __esm(() => {
|
|
5212
5247
|
init_metrics();
|
|
5213
|
-
|
|
5248
|
+
init_finalize();
|
|
5249
|
+
init_keys();
|
|
5214
5250
|
});
|
|
5215
5251
|
|
|
5216
5252
|
// node_modules/typebox/build/system/memory/clone.mjs
|
|
5217
|
-
function FromClassInstance(value) {
|
|
5218
|
-
return value;
|
|
5219
|
-
}
|
|
5220
|
-
function IsSchemaObject(value) {
|
|
5221
|
-
return HasPropertyKey(value, "~kind") || HasPropertyKey(value, "~unsafe");
|
|
5222
|
-
}
|
|
5223
|
-
function FromSchemaObject(value) {
|
|
5224
|
-
const result = {};
|
|
5225
|
-
for (const key of Keys(value)) {
|
|
5226
|
-
if (IsUnsafePropertyKey(key))
|
|
5227
|
-
continue;
|
|
5228
|
-
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
5229
|
-
descriptor.value = FromValue(descriptor.value);
|
|
5230
|
-
if (IsEqual(descriptor.enumerable, true)) {
|
|
5231
|
-
result[key] = descriptor.value;
|
|
5232
|
-
} else {
|
|
5233
|
-
Object.defineProperty(result, key, descriptor);
|
|
5234
|
-
}
|
|
5235
|
-
}
|
|
5236
|
-
return result;
|
|
5237
|
-
}
|
|
5238
|
-
function FromPlainObject(value) {
|
|
5239
|
-
const result = {};
|
|
5240
|
-
for (const key of Keys(value)) {
|
|
5241
|
-
if (IsUnsafePropertyKey(key))
|
|
5242
|
-
continue;
|
|
5243
|
-
result[key] = FromValue(value[key]);
|
|
5244
|
-
}
|
|
5245
|
-
for (const key of Symbols(value)) {
|
|
5246
|
-
result[key] = FromValue(value[key]);
|
|
5247
|
-
}
|
|
5248
|
-
return result;
|
|
5249
|
-
}
|
|
5250
|
-
function FromObject(value) {
|
|
5251
|
-
return IsClassInstance(value) ? FromClassInstance(value) : IsSchemaObject(value) ? FromSchemaObject(value) : FromPlainObject(value);
|
|
5252
|
-
}
|
|
5253
|
-
function FromArray(value) {
|
|
5254
|
-
return value.map((element) => FromValue(element));
|
|
5255
|
-
}
|
|
5256
|
-
function FromTypedArray(value) {
|
|
5257
|
-
return value.slice();
|
|
5258
|
-
}
|
|
5259
|
-
function FromRegExp(value) {
|
|
5260
|
-
return new RegExp(value.source, value.flags);
|
|
5261
|
-
}
|
|
5262
|
-
function FromMap(value) {
|
|
5263
|
-
return new Map(FromValue([...value.entries()]));
|
|
5264
|
-
}
|
|
5265
|
-
function FromSet(value) {
|
|
5266
|
-
return new Set(FromValue([...value.values()]));
|
|
5267
|
-
}
|
|
5268
|
-
function FromValue(value) {
|
|
5269
|
-
return IsTypeArray(value) ? FromTypedArray(value) : IsRegExp(value) ? FromRegExp(value) : IsMap(value) ? FromMap(value) : IsSet(value) ? FromSet(value) : IsArray(value) ? FromArray(value) : IsObject(value) ? FromObject(value) : value;
|
|
5270
|
-
}
|
|
5271
|
-
function Clone(value) {
|
|
5272
|
-
Metrics.clone += 1;
|
|
5273
|
-
return FromValue(value);
|
|
5274
|
-
}
|
|
5275
5253
|
var init_clone = __esm(() => {
|
|
5276
5254
|
init_guard2();
|
|
5277
5255
|
init_metrics();
|
|
5256
|
+
init_keys();
|
|
5278
5257
|
});
|
|
5279
5258
|
|
|
5280
5259
|
// node_modules/typebox/build/system/memory/create.mjs
|
|
5281
|
-
function
|
|
5260
|
+
function WithEnumerable(left, right) {
|
|
5261
|
+
return { ...left, ...right };
|
|
5262
|
+
}
|
|
5263
|
+
function WithHidden(left, right) {
|
|
5282
5264
|
for (const key of Object.keys(right)) {
|
|
5283
5265
|
Object.defineProperty(left, key, {
|
|
5284
5266
|
configurable: true,
|
|
@@ -5289,55 +5271,62 @@ function MergeHidden(left, right) {
|
|
|
5289
5271
|
}
|
|
5290
5272
|
return left;
|
|
5291
5273
|
}
|
|
5292
|
-
function Merge(left, right) {
|
|
5293
|
-
return { ...left, ...right };
|
|
5294
|
-
}
|
|
5295
5274
|
function Create(hidden, enumerable, options = {}) {
|
|
5296
5275
|
Metrics.create += 1;
|
|
5297
|
-
const
|
|
5298
|
-
const withHidden = Get().enumerableKind ?
|
|
5299
|
-
return
|
|
5276
|
+
const withEnumerable = WithEnumerable(enumerable, options);
|
|
5277
|
+
const withHidden = Get().enumerableKind ? WithEnumerable(withEnumerable, hidden) : WithHidden(withEnumerable, hidden);
|
|
5278
|
+
return Finalize(withHidden);
|
|
5300
5279
|
}
|
|
5301
5280
|
var init_create = __esm(() => {
|
|
5302
5281
|
init_settings2();
|
|
5303
5282
|
init_metrics();
|
|
5304
|
-
|
|
5283
|
+
init_finalize();
|
|
5305
5284
|
});
|
|
5306
5285
|
|
|
5307
5286
|
// node_modules/typebox/build/system/memory/discard.mjs
|
|
5308
5287
|
function Discard(value, propertyKeys) {
|
|
5309
5288
|
Metrics.discard += 1;
|
|
5310
5289
|
const result = {};
|
|
5311
|
-
for (const key of
|
|
5290
|
+
for (const key of Keys2(value)) {
|
|
5312
5291
|
if (propertyKeys.includes(key))
|
|
5313
5292
|
continue;
|
|
5314
5293
|
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
5315
|
-
descriptor.value = Clone(descriptor.value);
|
|
5316
5294
|
Object.defineProperty(result, key, descriptor);
|
|
5317
5295
|
}
|
|
5318
|
-
return
|
|
5296
|
+
return Finalize(result);
|
|
5319
5297
|
}
|
|
5320
5298
|
var init_discard = __esm(() => {
|
|
5321
|
-
init_guard2();
|
|
5322
5299
|
init_metrics();
|
|
5323
|
-
|
|
5324
|
-
|
|
5300
|
+
init_finalize();
|
|
5301
|
+
init_keys();
|
|
5325
5302
|
});
|
|
5326
5303
|
|
|
5327
5304
|
// node_modules/typebox/build/system/memory/update.mjs
|
|
5328
|
-
function
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5305
|
+
function WithCurrent(current, hiddenKeys, enumerableKeys, result) {
|
|
5306
|
+
for (const key of Keys2(current)) {
|
|
5307
|
+
if (IsUnsafePropertyKey(key) || hiddenKeys.includes(key) || enumerableKeys.includes(key))
|
|
5308
|
+
continue;
|
|
5309
|
+
const descriptor = Object.getOwnPropertyDescriptor(current, key);
|
|
5310
|
+
Object.defineProperty(result, key, descriptor);
|
|
5311
|
+
}
|
|
5312
|
+
}
|
|
5313
|
+
function WithHidden2(hidden, keys, result) {
|
|
5314
|
+
const enumerableKind = Get().enumerableKind;
|
|
5315
|
+
for (const key of keys) {
|
|
5316
|
+
if (IsUnsafePropertyKey(key))
|
|
5317
|
+
continue;
|
|
5333
5318
|
Object.defineProperty(result, key, {
|
|
5334
5319
|
configurable: true,
|
|
5335
5320
|
writable: true,
|
|
5336
|
-
enumerable:
|
|
5321
|
+
enumerable: enumerableKind,
|
|
5337
5322
|
value: hidden[key]
|
|
5338
5323
|
});
|
|
5339
5324
|
}
|
|
5340
|
-
|
|
5325
|
+
}
|
|
5326
|
+
function WithEnumerable2(enumerable, keys, result) {
|
|
5327
|
+
for (const key of keys) {
|
|
5328
|
+
if (IsUnsafePropertyKey(key))
|
|
5329
|
+
continue;
|
|
5341
5330
|
Object.defineProperty(result, key, {
|
|
5342
5331
|
configurable: true,
|
|
5343
5332
|
enumerable: true,
|
|
@@ -5345,13 +5334,21 @@ function Update(current, hidden, enumerable) {
|
|
|
5345
5334
|
value: enumerable[key]
|
|
5346
5335
|
});
|
|
5347
5336
|
}
|
|
5348
|
-
|
|
5337
|
+
}
|
|
5338
|
+
function Update(current, hidden, enumerable) {
|
|
5339
|
+
Metrics.update += 1;
|
|
5340
|
+
const result = {}, hiddenKeys = Keys2(hidden), enumerableKeys = Keys2(enumerable);
|
|
5341
|
+
WithCurrent(current, hiddenKeys, enumerableKeys, result);
|
|
5342
|
+
WithHidden2(hidden, hiddenKeys, result);
|
|
5343
|
+
WithEnumerable2(enumerable, enumerableKeys, result);
|
|
5344
|
+
return Finalize(result);
|
|
5349
5345
|
}
|
|
5350
5346
|
var init_update = __esm(() => {
|
|
5347
|
+
init_guard2();
|
|
5351
5348
|
init_settings2();
|
|
5352
5349
|
init_metrics();
|
|
5353
|
-
|
|
5354
|
-
|
|
5350
|
+
init_finalize();
|
|
5351
|
+
init_keys();
|
|
5355
5352
|
});
|
|
5356
5353
|
|
|
5357
5354
|
// node_modules/typebox/build/system/memory/memory.mjs
|
|
@@ -5393,11 +5390,8 @@ var init_deferred = __esm(() => {
|
|
|
5393
5390
|
});
|
|
5394
5391
|
|
|
5395
5392
|
// node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs
|
|
5396
|
-
function AddReadonlyOperation(type) {
|
|
5397
|
-
return Update(type, { "~readonly": true }, {});
|
|
5398
|
-
}
|
|
5399
5393
|
function AddReadonlyAction(type, options) {
|
|
5400
|
-
const result = Update(
|
|
5394
|
+
const result = Update(type, { "~readonly": true }, options);
|
|
5401
5395
|
return result;
|
|
5402
5396
|
}
|
|
5403
5397
|
function AddReadonlyInstantiate(context, state, type, options) {
|
|
@@ -5410,11 +5404,8 @@ var init_instantiate_add = __esm(() => {
|
|
|
5410
5404
|
});
|
|
5411
5405
|
|
|
5412
5406
|
// node_modules/typebox/build/type/engine/optional/instantiate_add.mjs
|
|
5413
|
-
function AddOptionalOperation(type) {
|
|
5414
|
-
return Update(type, { "~optional": true }, {});
|
|
5415
|
-
}
|
|
5416
5407
|
function AddOptionalAction(type, options) {
|
|
5417
|
-
const result = Update(
|
|
5408
|
+
const result = Update(type, { "~optional": true }, options);
|
|
5418
5409
|
return result;
|
|
5419
5410
|
}
|
|
5420
5411
|
function AddOptionalInstantiate(context, state, type, options) {
|
|
@@ -5732,13 +5723,20 @@ function IsIEEE754(value) {
|
|
|
5732
5723
|
return typeof value === "number";
|
|
5733
5724
|
}
|
|
5734
5725
|
function FNV1A64_OP(byte) {
|
|
5735
|
-
|
|
5736
|
-
|
|
5726
|
+
const L0 = A0 ^ byte;
|
|
5727
|
+
const T0 = L0 * 435;
|
|
5728
|
+
const T1 = A1 * 435 + (T0 >>> 16);
|
|
5729
|
+
const T2 = A2 * 435 + (T1 >>> 16) + (L0 << 8);
|
|
5730
|
+
const T3 = A3 * 435 + (T2 >>> 16) + (A1 << 8);
|
|
5731
|
+
A0 = T0 & 65535;
|
|
5732
|
+
A1 = T1 & 65535;
|
|
5733
|
+
A2 = T2 & 65535;
|
|
5734
|
+
A3 = T3 & 65535;
|
|
5737
5735
|
}
|
|
5738
|
-
function
|
|
5736
|
+
function FromArray(value) {
|
|
5739
5737
|
FNV1A64_OP(ByteMarker.Array);
|
|
5740
5738
|
for (const item of value) {
|
|
5741
|
-
|
|
5739
|
+
FromValue(item);
|
|
5742
5740
|
}
|
|
5743
5741
|
}
|
|
5744
5742
|
function FromBigInt(value) {
|
|
@@ -5754,15 +5752,15 @@ function FromBoolean(value) {
|
|
|
5754
5752
|
}
|
|
5755
5753
|
function FromConstructor(value) {
|
|
5756
5754
|
FNV1A64_OP(ByteMarker.Constructor);
|
|
5757
|
-
|
|
5755
|
+
FromValue(value.toString());
|
|
5758
5756
|
}
|
|
5759
5757
|
function FromDate(value) {
|
|
5760
5758
|
FNV1A64_OP(ByteMarker.Date);
|
|
5761
|
-
|
|
5759
|
+
FromValue(value.getTime());
|
|
5762
5760
|
}
|
|
5763
5761
|
function FromFunction(value) {
|
|
5764
5762
|
FNV1A64_OP(ByteMarker.Function);
|
|
5765
|
-
|
|
5763
|
+
FromValue(value.toString());
|
|
5766
5764
|
}
|
|
5767
5765
|
function FromNull(_value) {
|
|
5768
5766
|
FNV1A64_OP(ByteMarker.Null);
|
|
@@ -5774,26 +5772,33 @@ function FromNumber(value) {
|
|
|
5774
5772
|
FNV1A64_OP(byte);
|
|
5775
5773
|
}
|
|
5776
5774
|
}
|
|
5777
|
-
function
|
|
5775
|
+
function FromObject(value) {
|
|
5778
5776
|
FNV1A64_OP(ByteMarker.Object);
|
|
5779
5777
|
for (const key of InstanceKeys(value).sort()) {
|
|
5780
|
-
|
|
5781
|
-
|
|
5778
|
+
FromValue(key);
|
|
5779
|
+
FromValue(value[key]);
|
|
5782
5780
|
}
|
|
5783
5781
|
}
|
|
5784
|
-
function
|
|
5782
|
+
function FromRegExp(value) {
|
|
5785
5783
|
FNV1A64_OP(ByteMarker.RegExp);
|
|
5786
5784
|
FromString(value.toString());
|
|
5787
5785
|
}
|
|
5788
5786
|
function FromString(value) {
|
|
5789
5787
|
FNV1A64_OP(ByteMarker.String);
|
|
5790
|
-
for (
|
|
5791
|
-
|
|
5788
|
+
for (let i = 0;i < value.length; i++) {
|
|
5789
|
+
const code = value.charCodeAt(i);
|
|
5790
|
+
if (code > 127) {
|
|
5791
|
+
for (const byte of encoder.encode(value.slice(i))) {
|
|
5792
|
+
FNV1A64_OP(byte);
|
|
5793
|
+
}
|
|
5794
|
+
return;
|
|
5795
|
+
}
|
|
5796
|
+
FNV1A64_OP(code);
|
|
5792
5797
|
}
|
|
5793
5798
|
}
|
|
5794
5799
|
function FromSymbol(value) {
|
|
5795
5800
|
FNV1A64_OP(ByteMarker.Symbol);
|
|
5796
|
-
|
|
5801
|
+
FromValue(value.toString());
|
|
5797
5802
|
}
|
|
5798
5803
|
function FromTypeArray(value) {
|
|
5799
5804
|
FNV1A64_OP(ByteMarker.TypeArray);
|
|
@@ -5805,18 +5810,18 @@ function FromTypeArray(value) {
|
|
|
5805
5810
|
function FromUndefined(_value) {
|
|
5806
5811
|
return FNV1A64_OP(ByteMarker.Undefined);
|
|
5807
5812
|
}
|
|
5808
|
-
function
|
|
5809
|
-
return IsTypeArray(value) ? FromTypeArray(value) : IsDate(value) ? FromDate(value) : IsRegExp(value) ?
|
|
5813
|
+
function FromValue(value) {
|
|
5814
|
+
return IsTypeArray(value) ? FromTypeArray(value) : IsDate(value) ? FromDate(value) : IsRegExp(value) ? FromRegExp(value) : IsBoolean2(value) ? FromBoolean(value.valueOf()) : IsString2(value) ? FromString(value.valueOf()) : IsNumber2(value) ? FromNumber(value.valueOf()) : IsIEEE754(value) ? FromNumber(value) : IsArray(value) ? FromArray(value) : IsBoolean(value) ? FromBoolean(value) : IsBigInt(value) ? FromBigInt(value) : IsConstructor(value) ? FromConstructor(value) : IsNull(value) ? FromNull(value) : IsObject(value) ? FromObject(value) : IsString(value) ? FromString(value) : IsSymbol(value) ? FromSymbol(value) : IsUndefined(value) ? FromUndefined(value) : IsFunction(value) ? FromFunction(value) : Unreachable();
|
|
5810
5815
|
}
|
|
5811
|
-
function
|
|
5812
|
-
|
|
5813
|
-
FromValue2(value);
|
|
5814
|
-
return Accumulator;
|
|
5816
|
+
function Hex(limb) {
|
|
5817
|
+
return limb.toString(16).padStart(4, "0");
|
|
5815
5818
|
}
|
|
5816
5819
|
function Hash(value) {
|
|
5817
|
-
|
|
5820
|
+
A0 = 8997, A1 = 33826, A2 = 40164, A3 = 52210;
|
|
5821
|
+
FromValue(value);
|
|
5822
|
+
return `${Hex(A3)}${Hex(A2)}${Hex(A1)}${Hex(A0)}`;
|
|
5818
5823
|
}
|
|
5819
|
-
var ByteMarker,
|
|
5824
|
+
var ByteMarker, A0 = 8997, A1 = 33826, A2 = 40164, A3 = 52210, F64, F64In, F64Out, encoder;
|
|
5820
5825
|
var init_hash = __esm(() => {
|
|
5821
5826
|
init_unreachable();
|
|
5822
5827
|
init_guard2();
|
|
@@ -5836,9 +5841,6 @@ var init_hash = __esm(() => {
|
|
|
5836
5841
|
TypeArray: 12,
|
|
5837
5842
|
Undefined: 13
|
|
5838
5843
|
};
|
|
5839
|
-
Accumulator = BigInt("14695981039346656037");
|
|
5840
|
-
[Prime, Size] = [BigInt("1099511628211"), BigInt("18446744073709551616")];
|
|
5841
|
-
Bytes = Array.from({ length: 256 }).map((_, i) => BigInt(i));
|
|
5842
5844
|
F64 = new Float64Array(1);
|
|
5843
5845
|
F64In = new DataView(F64.buffer);
|
|
5844
5846
|
F64Out = new Uint8Array(F64.buffer);
|
|
@@ -6301,30 +6303,20 @@ var init_tuple = __esm(() => {
|
|
|
6301
6303
|
init_schema();
|
|
6302
6304
|
});
|
|
6303
6305
|
|
|
6304
|
-
// node_modules/typebox/build/type/engine/
|
|
6305
|
-
function
|
|
6306
|
-
|
|
6307
|
-
}
|
|
6308
|
-
|
|
6309
|
-
const result = Update(RemoveReadonlyOperation(type), {}, options);
|
|
6306
|
+
// node_modules/typebox/build/type/engine/tuple/to_object.mjs
|
|
6307
|
+
function TupleElementsToProperties(types) {
|
|
6308
|
+
const result = types.reduceRight((result, right, index) => {
|
|
6309
|
+
return { [index]: right, ...result };
|
|
6310
|
+
}, {});
|
|
6310
6311
|
return result;
|
|
6311
6312
|
}
|
|
6312
|
-
function
|
|
6313
|
-
const
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
var init_instantiate_remove = __esm(() => {
|
|
6317
|
-
init_memory2();
|
|
6318
|
-
init_instantiate27();
|
|
6319
|
-
});
|
|
6320
|
-
|
|
6321
|
-
// node_modules/typebox/build/type/action/_remove_readonly.mjs
|
|
6322
|
-
function RemoveReadonly(type, options = {}) {
|
|
6323
|
-
return RemoveReadonlyAction(type, options);
|
|
6313
|
+
function TupleToObject(type) {
|
|
6314
|
+
const properties = TupleElementsToProperties(type.items);
|
|
6315
|
+
const result = _Object_(properties);
|
|
6316
|
+
return result;
|
|
6324
6317
|
}
|
|
6325
|
-
var
|
|
6326
|
-
|
|
6327
|
-
init_instantiate_remove();
|
|
6318
|
+
var init_to_object = __esm(() => {
|
|
6319
|
+
init_object();
|
|
6328
6320
|
});
|
|
6329
6321
|
|
|
6330
6322
|
// node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs
|
|
@@ -6339,55 +6331,57 @@ function RemoveOptionalInstantiate(context, state, type, options) {
|
|
|
6339
6331
|
const instantiatedType = InstantiateType(context, state, type);
|
|
6340
6332
|
return RemoveOptionalAction(instantiatedType, options);
|
|
6341
6333
|
}
|
|
6342
|
-
var
|
|
6334
|
+
var init_instantiate_remove = __esm(() => {
|
|
6343
6335
|
init_memory2();
|
|
6344
6336
|
init_instantiate27();
|
|
6345
6337
|
});
|
|
6346
6338
|
|
|
6347
|
-
// node_modules/typebox/build/type/
|
|
6348
|
-
function
|
|
6349
|
-
return
|
|
6339
|
+
// node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs
|
|
6340
|
+
function RemoveReadonlyOperation(type) {
|
|
6341
|
+
return Discard(type, ["~readonly"]);
|
|
6350
6342
|
}
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
init_instantiate_remove2();
|
|
6354
|
-
});
|
|
6355
|
-
|
|
6356
|
-
// node_modules/typebox/build/type/engine/tuple/to_object.mjs
|
|
6357
|
-
function TupleElementsToProperties(types) {
|
|
6358
|
-
const result = types.reduceRight((result, right, index) => {
|
|
6359
|
-
return { [index]: right, ...result };
|
|
6360
|
-
}, {});
|
|
6343
|
+
function RemoveReadonlyAction(type, options) {
|
|
6344
|
+
const result = Update(RemoveReadonlyOperation(type), {}, options);
|
|
6361
6345
|
return result;
|
|
6362
6346
|
}
|
|
6363
|
-
function
|
|
6364
|
-
const
|
|
6365
|
-
|
|
6366
|
-
return result;
|
|
6347
|
+
function RemoveReadonlyInstantiate(context, state, type, options) {
|
|
6348
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
6349
|
+
return RemoveReadonlyAction(instantiatedType, options);
|
|
6367
6350
|
}
|
|
6368
|
-
var
|
|
6369
|
-
|
|
6351
|
+
var init_instantiate_remove2 = __esm(() => {
|
|
6352
|
+
init_memory2();
|
|
6353
|
+
init_instantiate27();
|
|
6370
6354
|
});
|
|
6371
6355
|
|
|
6372
|
-
// node_modules/typebox/build/type/engine/evaluate/
|
|
6373
|
-
function
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
function IsReadonlyProperty(left, right) {
|
|
6377
|
-
return IsReadonly(left) ? IsReadonly(right) ? true : false : false;
|
|
6378
|
-
}
|
|
6379
|
-
function IsOptionalProperty(left, right) {
|
|
6380
|
-
return IsOptional(left) ? IsOptional(right) ? true : false : false;
|
|
6381
|
-
}
|
|
6382
|
-
function CompositeProperty(left, right) {
|
|
6383
|
-
const isReadonly = IsReadonlyProperty(left, right);
|
|
6384
|
-
const isOptional = IsOptionalProperty(left, right);
|
|
6356
|
+
// node_modules/typebox/build/type/engine/evaluate/property.mjs
|
|
6357
|
+
function EvaluatePropertyIntersect(left, right) {
|
|
6358
|
+
const isReadonly = IsReadonly(left) && IsReadonly(right);
|
|
6359
|
+
const isOptional = IsOptional(left) && IsOptional(right);
|
|
6385
6360
|
const evaluated = EvaluateIntersect([left, right]);
|
|
6386
|
-
const property =
|
|
6387
|
-
return isReadonly && isOptional ?
|
|
6388
|
-
}
|
|
6361
|
+
const property = RemoveReadonlyAction(RemoveOptionalAction(evaluated, {}), {});
|
|
6362
|
+
return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
|
|
6363
|
+
}
|
|
6364
|
+
function EvaluatePropertyUnion(left, right) {
|
|
6365
|
+
const isReadonly = IsReadonly(left) || IsReadonly(right);
|
|
6366
|
+
const isOptional = IsOptional(left) || IsOptional(right);
|
|
6367
|
+
const leftProperty = RemoveReadonlyAction(RemoveOptionalAction(left, {}), {});
|
|
6368
|
+
const rightProperty = RemoveReadonlyAction(RemoveOptionalAction(right, {}), {});
|
|
6369
|
+
const property = EvaluateUnion([leftProperty, rightProperty]);
|
|
6370
|
+
return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
|
|
6371
|
+
}
|
|
6372
|
+
var init_property = __esm(() => {
|
|
6373
|
+
init__optional();
|
|
6374
|
+
init__readonly();
|
|
6375
|
+
init_instantiate_add2();
|
|
6376
|
+
init_instantiate_add();
|
|
6377
|
+
init_instantiate_remove();
|
|
6378
|
+
init_instantiate_remove2();
|
|
6379
|
+
init_evaluate2();
|
|
6380
|
+
});
|
|
6381
|
+
|
|
6382
|
+
// node_modules/typebox/build/type/engine/evaluate/composite.mjs
|
|
6389
6383
|
function CompositePropertyKey(left, right, key) {
|
|
6390
|
-
return key in left ? key in right ?
|
|
6384
|
+
return key in left ? key in right ? EvaluatePropertyIntersect(left[key], right[key]) : left[key] : (key in right) ? right[key] : Never();
|
|
6391
6385
|
}
|
|
6392
6386
|
function CompositeProperties(left, right) {
|
|
6393
6387
|
const keys = new Set([...Keys(left), ...Keys(right)]);
|
|
@@ -6409,17 +6403,11 @@ function Composite(left, right) {
|
|
|
6409
6403
|
}
|
|
6410
6404
|
var init_composite = __esm(() => {
|
|
6411
6405
|
init_guard2();
|
|
6412
|
-
init__readonly();
|
|
6413
|
-
init__optional();
|
|
6414
6406
|
init_object();
|
|
6415
6407
|
init_never();
|
|
6416
6408
|
init_tuple();
|
|
6417
|
-
init__add_readonly();
|
|
6418
|
-
init__add_optional();
|
|
6419
|
-
init__remove_readonly();
|
|
6420
|
-
init__remove_optional();
|
|
6421
6409
|
init_to_object();
|
|
6422
|
-
|
|
6410
|
+
init_property();
|
|
6423
6411
|
});
|
|
6424
6412
|
|
|
6425
6413
|
// node_modules/typebox/build/type/engine/evaluate/narrow.mjs
|
|
@@ -6427,6 +6415,9 @@ function NarrowCompareRule(left, right) {
|
|
|
6427
6415
|
const result = Compare(left, right);
|
|
6428
6416
|
return IsEqual(result, CompareResultLeftInside) ? left : IsEqual(result, CompareResultRightInside) ? right : IsEqual(result, CompareResultEqual) ? right : Never();
|
|
6429
6417
|
}
|
|
6418
|
+
function CanComposite(type) {
|
|
6419
|
+
return IsObject2(type) || IsTuple(type);
|
|
6420
|
+
}
|
|
6430
6421
|
function NarrowCompositeRule(left, right) {
|
|
6431
6422
|
const canCompositeLeft = CanComposite(left);
|
|
6432
6423
|
const canCompositeRight = CanComposite(right);
|
|
@@ -6437,8 +6428,10 @@ function Narrow(left, right) {
|
|
|
6437
6428
|
}
|
|
6438
6429
|
var init_narrow = __esm(() => {
|
|
6439
6430
|
init_guard2();
|
|
6431
|
+
init_object();
|
|
6440
6432
|
init_any();
|
|
6441
6433
|
init_never();
|
|
6434
|
+
init_tuple();
|
|
6442
6435
|
init_unknown();
|
|
6443
6436
|
init_compare();
|
|
6444
6437
|
init_composite();
|
|
@@ -7603,14 +7596,14 @@ var init_object2 = __esm(() => {
|
|
|
7603
7596
|
});
|
|
7604
7597
|
|
|
7605
7598
|
// node_modules/typebox/build/type/extends/record.mjs
|
|
7606
|
-
function
|
|
7599
|
+
function FromObject2(inferred, properties) {
|
|
7607
7600
|
return IsEqual(Keys(properties).length, 0) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
7608
7601
|
}
|
|
7609
7602
|
function FromRecord(inferred, _leftKey, leftValue, _rightKey, rightValue) {
|
|
7610
7603
|
return ExtendsLeft(inferred, leftValue, rightValue);
|
|
7611
7604
|
}
|
|
7612
7605
|
function ExtendsRecord(inferred, leftPattern, leftValue, right) {
|
|
7613
|
-
return IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) : IsObject2(right) ?
|
|
7606
|
+
return IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) : IsObject2(right) ? FromObject2(inferred, right.properties) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
7614
7607
|
}
|
|
7615
7608
|
var init_record2 = __esm(() => {
|
|
7616
7609
|
init_guard2();
|
|
@@ -8168,6 +8161,7 @@ var init_evaluate3 = __esm(() => {
|
|
|
8168
8161
|
init_flatten();
|
|
8169
8162
|
init_instantiate5();
|
|
8170
8163
|
init_narrow();
|
|
8164
|
+
init_property();
|
|
8171
8165
|
});
|
|
8172
8166
|
|
|
8173
8167
|
// node_modules/typebox/build/type/engine/call/distribute_arguments.mjs
|
|
@@ -8696,7 +8690,7 @@ function CollapseIntersectProperties(left, right) {
|
|
|
8696
8690
|
const sharedKeys = Keys(left).filter((key) => HasPropertyKey(right, key));
|
|
8697
8691
|
const leftProperties = leftKeys.reduce((result, key) => ({ ...result, [key]: left[key] }), {});
|
|
8698
8692
|
const rightProperties = rightKeys.reduce((result, key) => ({ ...result, [key]: right[key] }), {});
|
|
8699
|
-
const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]:
|
|
8693
|
+
const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]: EvaluatePropertyIntersect(left[key], right[key]) }), {});
|
|
8700
8694
|
const unique = Assign(leftProperties, rightProperties);
|
|
8701
8695
|
const shared = Assign(unique, sharedProperties);
|
|
8702
8696
|
return shared;
|
|
@@ -8710,11 +8704,11 @@ var init_from_intersect = __esm(() => {
|
|
|
8710
8704
|
init_memory2();
|
|
8711
8705
|
init_guard2();
|
|
8712
8706
|
init_from_type2();
|
|
8713
|
-
|
|
8707
|
+
init_property();
|
|
8714
8708
|
});
|
|
8715
8709
|
|
|
8716
8710
|
// node_modules/typebox/build/type/engine/object/from_object.mjs
|
|
8717
|
-
function
|
|
8711
|
+
function FromObject3(properties) {
|
|
8718
8712
|
return properties;
|
|
8719
8713
|
}
|
|
8720
8714
|
|
|
@@ -8734,7 +8728,7 @@ var init_from_tuple = __esm(() => {
|
|
|
8734
8728
|
function CollapseUnionProperties(left, right) {
|
|
8735
8729
|
const sharedKeys = Keys(left).filter((key) => (key in right));
|
|
8736
8730
|
const result = sharedKeys.reduce((result, key) => {
|
|
8737
|
-
return { ...result, [key]:
|
|
8731
|
+
return { ...result, [key]: EvaluatePropertyUnion(left[key], right[key]) };
|
|
8738
8732
|
}, {});
|
|
8739
8733
|
return result;
|
|
8740
8734
|
}
|
|
@@ -8747,13 +8741,13 @@ function FromUnion3(types) {
|
|
|
8747
8741
|
var init_from_union2 = __esm(() => {
|
|
8748
8742
|
init_guard2();
|
|
8749
8743
|
init_unreachable();
|
|
8750
|
-
|
|
8744
|
+
init_property();
|
|
8751
8745
|
init_from_type2();
|
|
8752
8746
|
});
|
|
8753
8747
|
|
|
8754
8748
|
// node_modules/typebox/build/type/engine/object/from_type.mjs
|
|
8755
8749
|
function FromType8(type) {
|
|
8756
|
-
return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsDependent(type) ? FromDependent(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject2(type) ?
|
|
8750
|
+
return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsDependent(type) ? FromDependent(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject2(type) ? FromObject3(type.properties) : {};
|
|
8757
8751
|
}
|
|
8758
8752
|
var init_from_type2 = __esm(() => {
|
|
8759
8753
|
init_cyclic();
|
|
@@ -8791,7 +8785,7 @@ function ConvertToIntegerKey(value) {
|
|
|
8791
8785
|
return integerKeyPattern.test(normal) ? parseInt(normal) : value;
|
|
8792
8786
|
}
|
|
8793
8787
|
var integerKeyPattern;
|
|
8794
|
-
var
|
|
8788
|
+
var init_keys2 = __esm(() => {
|
|
8795
8789
|
integerKeyPattern = new RegExp("^(?:0|[1-9][0-9]*)$");
|
|
8796
8790
|
});
|
|
8797
8791
|
|
|
@@ -8805,7 +8799,7 @@ function NormalizeIndexerTypes(types) {
|
|
|
8805
8799
|
function NormalizeIndexer(type) {
|
|
8806
8800
|
return IsIntersect(type) ? Intersect(NormalizeIndexerTypes(type.allOf)) : IsUnion(type) ? Union(NormalizeIndexerTypes(type.anyOf)) : IsLiteral(type) ? NormalizeLiteral(type.const) : type;
|
|
8807
8801
|
}
|
|
8808
|
-
function
|
|
8802
|
+
function FromArray2(type, indexer) {
|
|
8809
8803
|
const normalizedIndexer = NormalizeIndexer(indexer);
|
|
8810
8804
|
const check = Extends({}, normalizedIndexer, Number2());
|
|
8811
8805
|
const result = IsExtendsTrueLike(check) ? type : IsLiteral(indexer) && IsEqual(indexer.const, "length") ? Number2() : Never();
|
|
@@ -8819,7 +8813,7 @@ var init_from_array = __esm(() => {
|
|
|
8819
8813
|
init_number();
|
|
8820
8814
|
init_never();
|
|
8821
8815
|
init_extends3();
|
|
8822
|
-
|
|
8816
|
+
init_keys2();
|
|
8823
8817
|
});
|
|
8824
8818
|
|
|
8825
8819
|
// node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs
|
|
@@ -8972,7 +8966,7 @@ function FromIndexerNumber(properties) {
|
|
|
8972
8966
|
const result = EvaluateUnion(variants);
|
|
8973
8967
|
return result;
|
|
8974
8968
|
}
|
|
8975
|
-
function
|
|
8969
|
+
function FromObject4(properties, indexer) {
|
|
8976
8970
|
const result = IsNumber3(indexer) ? FromIndexerNumber(properties) : FromIndexer(properties, indexer);
|
|
8977
8971
|
return result;
|
|
8978
8972
|
}
|
|
@@ -9002,7 +8996,7 @@ var init_array_indexer = __esm(() => {
|
|
|
9002
8996
|
init_union();
|
|
9003
8997
|
init_intersect();
|
|
9004
8998
|
init_literal();
|
|
9005
|
-
|
|
8999
|
+
init_keys2();
|
|
9006
9000
|
});
|
|
9007
9001
|
|
|
9008
9002
|
// node_modules/typebox/build/type/engine/indexed/from_tuple.mjs
|
|
@@ -9035,7 +9029,7 @@ var init_from_tuple2 = __esm(() => {
|
|
|
9035
9029
|
|
|
9036
9030
|
// node_modules/typebox/build/type/engine/indexed/from_type.mjs
|
|
9037
9031
|
function FromType11(type, indexer) {
|
|
9038
|
-
return IsArray2(type) ?
|
|
9032
|
+
return IsArray2(type) ? FromArray2(type.items, indexer) : IsObject2(type) ? FromObject4(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
|
|
9039
9033
|
}
|
|
9040
9034
|
var init_from_type4 = __esm(() => {
|
|
9041
9035
|
init_array();
|
|
@@ -9123,7 +9117,7 @@ var init_from_any = __esm(() => {
|
|
|
9123
9117
|
});
|
|
9124
9118
|
|
|
9125
9119
|
// node_modules/typebox/build/type/engine/keyof/from_array.mjs
|
|
9126
|
-
function
|
|
9120
|
+
function FromArray3(_type) {
|
|
9127
9121
|
return Number2();
|
|
9128
9122
|
}
|
|
9129
9123
|
var init_from_array2 = __esm(() => {
|
|
@@ -9137,7 +9131,7 @@ function FromPropertyKeys(keys) {
|
|
|
9137
9131
|
}, []);
|
|
9138
9132
|
return result;
|
|
9139
9133
|
}
|
|
9140
|
-
function
|
|
9134
|
+
function FromObject5(properties) {
|
|
9141
9135
|
const propertyKeys = Keys(properties);
|
|
9142
9136
|
const variants = FromPropertyKeys(propertyKeys);
|
|
9143
9137
|
const result = EvaluateUnionFast(variants);
|
|
@@ -9147,7 +9141,7 @@ var init_from_object2 = __esm(() => {
|
|
|
9147
9141
|
init_unreachable();
|
|
9148
9142
|
init_guard2();
|
|
9149
9143
|
init_literal();
|
|
9150
|
-
|
|
9144
|
+
init_keys2();
|
|
9151
9145
|
init_evaluate2();
|
|
9152
9146
|
});
|
|
9153
9147
|
|
|
@@ -9171,7 +9165,7 @@ var init_from_tuple3 = __esm(() => {
|
|
|
9171
9165
|
|
|
9172
9166
|
// node_modules/typebox/build/type/engine/keyof/from_type.mjs
|
|
9173
9167
|
function FromType12(type) {
|
|
9174
|
-
return IsAny(type) ? FromAny() : IsArray2(type) ?
|
|
9168
|
+
return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray3(type.items) : IsObject2(type) ? FromObject5(type.properties) : IsRecord(type) ? FromRecord2(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
|
|
9175
9169
|
}
|
|
9176
9170
|
var init_from_type5 = __esm(() => {
|
|
9177
9171
|
init_any();
|
|
@@ -9533,7 +9527,7 @@ var init_from_union4 = __esm(() => {
|
|
|
9533
9527
|
});
|
|
9534
9528
|
|
|
9535
9529
|
// node_modules/typebox/build/type/engine/partial/from_object.mjs
|
|
9536
|
-
function
|
|
9530
|
+
function FromObject6(properties) {
|
|
9537
9531
|
const mapped = Keys(properties).reduce((result, left) => {
|
|
9538
9532
|
return { ...result, [left]: AddOptional(properties[left]) };
|
|
9539
9533
|
}, {});
|
|
@@ -9548,7 +9542,7 @@ var init_from_object3 = __esm(() => {
|
|
|
9548
9542
|
|
|
9549
9543
|
// node_modules/typebox/build/type/engine/partial/from_type.mjs
|
|
9550
9544
|
function FromType15(type) {
|
|
9551
|
-
return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsDependent(type) ? FromDependent3(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject2(type) ?
|
|
9545
|
+
return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsDependent(type) ? FromDependent3(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject2(type) ? FromObject6(type.properties) : _Object_({});
|
|
9552
9546
|
}
|
|
9553
9547
|
var init_from_type7 = __esm(() => {
|
|
9554
9548
|
init_cyclic();
|
|
@@ -9639,7 +9633,7 @@ var init_readonly_object = __esm(() => {
|
|
|
9639
9633
|
});
|
|
9640
9634
|
|
|
9641
9635
|
// node_modules/typebox/build/type/engine/readonly_object/from_array.mjs
|
|
9642
|
-
function
|
|
9636
|
+
function FromArray4(type) {
|
|
9643
9637
|
const result = AddImmutable(_Array_(type));
|
|
9644
9638
|
return result;
|
|
9645
9639
|
}
|
|
@@ -9685,7 +9679,7 @@ var init_from_intersect4 = __esm(() => {
|
|
|
9685
9679
|
});
|
|
9686
9680
|
|
|
9687
9681
|
// node_modules/typebox/build/type/engine/readonly_object/from_object.mjs
|
|
9688
|
-
function
|
|
9682
|
+
function FromObject7(properties) {
|
|
9689
9683
|
const mapped = Keys(properties).reduce((result, left) => {
|
|
9690
9684
|
return { ...result, [left]: AddReadonly(properties[left]) };
|
|
9691
9685
|
}, {});
|
|
@@ -9720,7 +9714,7 @@ var init_from_union5 = __esm(() => {
|
|
|
9720
9714
|
|
|
9721
9715
|
// node_modules/typebox/build/type/engine/readonly_object/from_type.mjs
|
|
9722
9716
|
function FromType17(type) {
|
|
9723
|
-
return IsArray2(type) ?
|
|
9717
|
+
return IsArray2(type) ? FromArray4(type.items) : IsCyclic(type) ? FromCyclic4(type.$defs, type.$ref) : IsDependent(type) ? FromDependent4(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect4(type.allOf) : IsObject2(type) ? FromObject7(type.properties) : IsTuple(type) ? FromTuple4(type.items) : IsUnion(type) ? FromUnion7(type.anyOf) : type;
|
|
9724
9718
|
}
|
|
9725
9719
|
var init_from_type9 = __esm(() => {
|
|
9726
9720
|
init_array();
|
|
@@ -9810,8 +9804,17 @@ var init_from_union6 = __esm(() => {
|
|
|
9810
9804
|
init_from_type10();
|
|
9811
9805
|
});
|
|
9812
9806
|
|
|
9807
|
+
// node_modules/typebox/build/type/action/_remove_optional.mjs
|
|
9808
|
+
function RemoveOptional(type, options = {}) {
|
|
9809
|
+
return RemoveOptionalAction(type, options);
|
|
9810
|
+
}
|
|
9811
|
+
var init__remove_optional = __esm(() => {
|
|
9812
|
+
init_deferred();
|
|
9813
|
+
init_instantiate_remove();
|
|
9814
|
+
});
|
|
9815
|
+
|
|
9813
9816
|
// node_modules/typebox/build/type/engine/required/from_object.mjs
|
|
9814
|
-
function
|
|
9817
|
+
function FromObject8(properties) {
|
|
9815
9818
|
const mapped = Keys(properties).reduce((result, left) => {
|
|
9816
9819
|
return { ...result, [left]: RemoveOptional(properties[left]) };
|
|
9817
9820
|
}, {});
|
|
@@ -9826,7 +9829,7 @@ var init_from_object5 = __esm(() => {
|
|
|
9826
9829
|
|
|
9827
9830
|
// node_modules/typebox/build/type/engine/required/from_type.mjs
|
|
9828
9831
|
function FromType18(type) {
|
|
9829
|
-
return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsDependent(type) ? FromDependent5(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject2(type) ?
|
|
9832
|
+
return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsDependent(type) ? FromDependent5(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject2(type) ? FromObject8(type.properties) : _Object_({});
|
|
9830
9833
|
}
|
|
9831
9834
|
var init_from_type10 = __esm(() => {
|
|
9832
9835
|
init_cyclic();
|
|
@@ -10008,9 +10011,9 @@ var init_instantiate27 = __esm(() => {
|
|
|
10008
10011
|
init_instantiate_add3();
|
|
10009
10012
|
init_instantiate_remove3();
|
|
10010
10013
|
init_instantiate_add();
|
|
10011
|
-
init_instantiate_remove();
|
|
10012
|
-
init_instantiate_add2();
|
|
10013
10014
|
init_instantiate_remove2();
|
|
10015
|
+
init_instantiate_add2();
|
|
10016
|
+
init_instantiate_remove();
|
|
10014
10017
|
init__optional();
|
|
10015
10018
|
init__immutable();
|
|
10016
10019
|
init__readonly();
|
|
@@ -10046,11 +10049,8 @@ var init_instantiate27 = __esm(() => {
|
|
|
10046
10049
|
});
|
|
10047
10050
|
|
|
10048
10051
|
// node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs
|
|
10049
|
-
function AddImmutableOperation(type) {
|
|
10050
|
-
return Update(type, { "~immutable": true }, {});
|
|
10051
|
-
}
|
|
10052
10052
|
function AddImmutableAction(type, options) {
|
|
10053
|
-
const result = Update(
|
|
10053
|
+
const result = Update(type, { "~immutable": true }, options);
|
|
10054
10054
|
return result;
|
|
10055
10055
|
}
|
|
10056
10056
|
function AddImmutableInstantiate(context, state, type, options) {
|
|
@@ -10077,6 +10077,12 @@ var init__remove_immutable = __esm(() => {
|
|
|
10077
10077
|
init_instantiate_remove3();
|
|
10078
10078
|
});
|
|
10079
10079
|
|
|
10080
|
+
// node_modules/typebox/build/type/action/_remove_readonly.mjs
|
|
10081
|
+
var init__remove_readonly = __esm(() => {
|
|
10082
|
+
init_deferred();
|
|
10083
|
+
init_instantiate_remove2();
|
|
10084
|
+
});
|
|
10085
|
+
|
|
10080
10086
|
// node_modules/typebox/build/type/action/evaluate.mjs
|
|
10081
10087
|
function Evaluate(type, options = {}) {
|
|
10082
10088
|
return EvaluateAction(type, options);
|
|
@@ -10153,7 +10159,7 @@ var init_union3 = () => {};
|
|
|
10153
10159
|
// node_modules/typebox/build/type/engine/helpers/index.mjs
|
|
10154
10160
|
var init_helpers = __esm(() => {
|
|
10155
10161
|
init_keys_to_indexer();
|
|
10156
|
-
|
|
10162
|
+
init_keys2();
|
|
10157
10163
|
init_union3();
|
|
10158
10164
|
});
|
|
10159
10165
|
|
|
@@ -10439,14 +10445,14 @@ var init__refine2 = __esm(() => {
|
|
|
10439
10445
|
});
|
|
10440
10446
|
|
|
10441
10447
|
// node_modules/typebox/build/schema/types/schema.mjs
|
|
10442
|
-
function
|
|
10448
|
+
function IsSchemaObject(value) {
|
|
10443
10449
|
return IsObject(value) && !IsArray(value);
|
|
10444
10450
|
}
|
|
10445
10451
|
function IsSchemaBoolean(value) {
|
|
10446
10452
|
return IsBoolean(value);
|
|
10447
10453
|
}
|
|
10448
10454
|
function IsSchema2(value) {
|
|
10449
|
-
return
|
|
10455
|
+
return IsSchemaObject(value) || IsSchemaBoolean(value);
|
|
10450
10456
|
}
|
|
10451
10457
|
var init_schema2 = __esm(() => {
|
|
10452
10458
|
init_guard2();
|
|
@@ -11018,7 +11024,7 @@ function NextUri(ref, base) {
|
|
|
11018
11024
|
return URL.canParse(ref, base) ? new URL(ref, base) : IsEqual(base, DefaultUri) ? new URL(`${base}:${ref}`) : new URL(`${base.slice(0, base.lastIndexOf(":"))}:${ref}`);
|
|
11019
11025
|
}
|
|
11020
11026
|
function Stack(context, schema) {
|
|
11021
|
-
const base =
|
|
11027
|
+
const base = IsSchemaObject(schema) && IsId(schema) ? NextUri(schema.$id, DefaultUri).href : DefaultUri;
|
|
11022
11028
|
return {
|
|
11023
11029
|
context,
|
|
11024
11030
|
schema,
|
|
@@ -11040,7 +11046,7 @@ function RegisterResourceAnchors(anchors, schema, isRoot = true) {
|
|
|
11040
11046
|
return anchors;
|
|
11041
11047
|
if (Array.isArray(schema))
|
|
11042
11048
|
return schema.reduce((result, item) => RegisterResourceAnchors(result, item, false), anchors);
|
|
11043
|
-
if (!
|
|
11049
|
+
if (!IsSchemaObject(schema))
|
|
11044
11050
|
return anchors;
|
|
11045
11051
|
if (!isRoot && IsId(schema))
|
|
11046
11052
|
return anchors;
|
|
@@ -11096,7 +11102,7 @@ function NextLexicalSchema(stack, schema) {
|
|
|
11096
11102
|
return IsId(schema) ? schema : stack.lexicalSchema;
|
|
11097
11103
|
}
|
|
11098
11104
|
function HasStackKeywords(stack, schema) {
|
|
11099
|
-
return
|
|
11105
|
+
return IsSchemaObject(schema) && (IsId(schema) || IsDynamicAnchor(schema) || IsUndefined(stack.recursiveAnchor) && IsRecursiveAnchorTrue(schema) || !IsUndefined(ResourceEntry(stack, schema)));
|
|
11100
11106
|
}
|
|
11101
11107
|
function NextStack(stack, schema) {
|
|
11102
11108
|
return HasStackKeywords(stack, schema) ? {
|
|
@@ -11395,7 +11401,7 @@ var init_pointer2 = __esm(() => {
|
|
|
11395
11401
|
|
|
11396
11402
|
// node_modules/typebox/build/schema/resolve/resolve.mjs
|
|
11397
11403
|
function RelativeBase(schema, base) {
|
|
11398
|
-
return
|
|
11404
|
+
return IsSchemaObject(schema) && IsId(schema) ? NextUri(schema.$id, base.href) : base;
|
|
11399
11405
|
}
|
|
11400
11406
|
function AbsoluteBase(base) {
|
|
11401
11407
|
return NextUri(base, DefaultUri);
|
|
@@ -11480,7 +11486,7 @@ function MatchWithDynamicAnchor(schema, base, ref) {
|
|
|
11480
11486
|
return isMatch ? schema : undefined;
|
|
11481
11487
|
}
|
|
11482
11488
|
function MatchSchemaObject(schema, base, ref) {
|
|
11483
|
-
if (!
|
|
11489
|
+
if (!IsSchemaObject(schema))
|
|
11484
11490
|
return;
|
|
11485
11491
|
return MatchWithId(schema, base, ref) ?? MatchWithAnchor(schema, base, ref) ?? MatchWithDynamicAnchor(schema, base, ref) ?? MatchWithHash(schema, ref);
|
|
11486
11492
|
}
|
|
@@ -11508,12 +11514,12 @@ function Match4(schema, base, ref) {
|
|
|
11508
11514
|
}
|
|
11509
11515
|
function Resource(context, schema, base, ref) {
|
|
11510
11516
|
const result = RefInternal(context, schema, base, ref);
|
|
11511
|
-
return
|
|
11517
|
+
return IsSchemaObject(result) && IsId(result) ? result : undefined;
|
|
11512
11518
|
}
|
|
11513
11519
|
function FindDeferredResourceLegacy(stack, ref, schema) {
|
|
11514
11520
|
if (!ref.$ref.startsWith("#"))
|
|
11515
11521
|
return;
|
|
11516
|
-
if (!
|
|
11522
|
+
if (!IsSchemaObject(stack.schema) || HasPropertyKey(stack.schema, "$schema"))
|
|
11517
11523
|
return;
|
|
11518
11524
|
const targetBase = Base(stack.lexicalSchema, stack.referenceBase, schema);
|
|
11519
11525
|
if (IsUndefined(targetBase) || IsEqual(targetBase, stack.referenceBase))
|
|
@@ -11522,7 +11528,7 @@ function FindDeferredResourceLegacy(stack, ref, schema) {
|
|
|
11522
11528
|
}
|
|
11523
11529
|
function FindDeferredResourceModern(stack, canonical, schema) {
|
|
11524
11530
|
const remoteRoot = stack.context[canonical];
|
|
11525
|
-
if (!
|
|
11531
|
+
if (!IsSchemaObject(remoteRoot))
|
|
11526
11532
|
return;
|
|
11527
11533
|
return { target: schema, base: canonical, root: remoteRoot };
|
|
11528
11534
|
}
|
|
@@ -11584,10 +11590,10 @@ function RefResultNotFound(stack, schema) {
|
|
|
11584
11590
|
}
|
|
11585
11591
|
function Ref2(stack, ref) {
|
|
11586
11592
|
const schema = RefInternal(stack.context, RefRoot(stack, ref), stack.referenceBase, ref.$ref);
|
|
11587
|
-
return
|
|
11593
|
+
return IsSchemaObject(schema) ? RefResultFound(stack, ref, schema) : RefResultNotFound(stack, schema);
|
|
11588
11594
|
}
|
|
11589
11595
|
function IsRecursiveAnchorInScope(stack) {
|
|
11590
|
-
return
|
|
11596
|
+
return IsSchemaObject(stack.lexicalSchema) && IsRecursiveAnchorTrue(stack.lexicalSchema);
|
|
11591
11597
|
}
|
|
11592
11598
|
function RecursiveRef(stack, recursiveRef) {
|
|
11593
11599
|
const schema = IsRecursiveAnchorInScope(stack) ? stack.recursiveAnchor : stack.lexicalSchema;
|
|
@@ -11600,7 +11606,7 @@ function FindScopedDynamicAnchor(stack, name) {
|
|
|
11600
11606
|
return stack.dynamicAnchors.find((anchor) => IsEqual(anchor.$dynamicAnchor, name)) ?? SearchDynamicAnchor(stack.schema, name);
|
|
11601
11607
|
}
|
|
11602
11608
|
function DynamicRefWhenFound(stack, dynamicRef, fragmentTarget) {
|
|
11603
|
-
if (!
|
|
11609
|
+
if (!IsSchemaObject(fragmentTarget) || !IsDynamicAnchor(fragmentTarget))
|
|
11604
11610
|
return fragmentTarget;
|
|
11605
11611
|
const fragment = DynamicRefFragment(stack, dynamicRef);
|
|
11606
11612
|
return IsPointerFragment(fragment) ? fragmentTarget : FindScopedDynamicAnchor(stack, fragmentTarget.$dynamicAnchor);
|
|
@@ -13244,7 +13250,7 @@ var init_type3 = __esm(() => {
|
|
|
13244
13250
|
});
|
|
13245
13251
|
|
|
13246
13252
|
// node_modules/typebox/build/value/clean/from_array.mjs
|
|
13247
|
-
function
|
|
13253
|
+
function FromArray5(context, type, value) {
|
|
13248
13254
|
if (!IsArray(value))
|
|
13249
13255
|
return value;
|
|
13250
13256
|
return value.map((value) => FromType19(context, type.items, value));
|
|
@@ -13290,7 +13296,7 @@ var init_additional = __esm(() => {
|
|
|
13290
13296
|
});
|
|
13291
13297
|
|
|
13292
13298
|
// node_modules/typebox/build/value/clean/from_object.mjs
|
|
13293
|
-
function
|
|
13299
|
+
function FromObject9(context, type, value) {
|
|
13294
13300
|
if (!IsObject(value) || IsArray(value))
|
|
13295
13301
|
return value;
|
|
13296
13302
|
const additionalProperties = GetAdditionalProperties(type);
|
|
@@ -13368,12 +13374,74 @@ var init_from_tuple5 = __esm(() => {
|
|
|
13368
13374
|
init_from_type11();
|
|
13369
13375
|
});
|
|
13370
13376
|
|
|
13377
|
+
// node_modules/typebox/build/system/memory/deep.mjs
|
|
13378
|
+
function FromClassInstance(value) {
|
|
13379
|
+
return value;
|
|
13380
|
+
}
|
|
13381
|
+
function IsSchemaObject2(value) {
|
|
13382
|
+
return HasPropertyKey(value, "~kind") || HasPropertyKey(value, "~unsafe");
|
|
13383
|
+
}
|
|
13384
|
+
function FromSchemaObject(value) {
|
|
13385
|
+
const result = {};
|
|
13386
|
+
for (const key of Keys(value)) {
|
|
13387
|
+
if (IsUnsafePropertyKey(key))
|
|
13388
|
+
continue;
|
|
13389
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
13390
|
+
descriptor.value = FromValue2(descriptor.value);
|
|
13391
|
+
if (IsEqual(descriptor.enumerable, true)) {
|
|
13392
|
+
result[key] = descriptor.value;
|
|
13393
|
+
} else {
|
|
13394
|
+
Object.defineProperty(result, key, descriptor);
|
|
13395
|
+
}
|
|
13396
|
+
}
|
|
13397
|
+
return result;
|
|
13398
|
+
}
|
|
13399
|
+
function FromPlainObject(value) {
|
|
13400
|
+
const result = {};
|
|
13401
|
+
for (const key of Keys(value)) {
|
|
13402
|
+
if (IsUnsafePropertyKey(key))
|
|
13403
|
+
continue;
|
|
13404
|
+
result[key] = FromValue2(value[key]);
|
|
13405
|
+
}
|
|
13406
|
+
for (const key of Symbols(value)) {
|
|
13407
|
+
result[key] = FromValue2(value[key]);
|
|
13408
|
+
}
|
|
13409
|
+
return result;
|
|
13410
|
+
}
|
|
13411
|
+
function FromObject10(value) {
|
|
13412
|
+
return IsClassInstance(value) ? FromClassInstance(value) : IsSchemaObject2(value) ? FromSchemaObject(value) : FromPlainObject(value);
|
|
13413
|
+
}
|
|
13414
|
+
function FromArray6(value) {
|
|
13415
|
+
return value.map((element) => FromValue2(element));
|
|
13416
|
+
}
|
|
13417
|
+
function FromTypedArray(value) {
|
|
13418
|
+
return value.slice();
|
|
13419
|
+
}
|
|
13420
|
+
function FromRegExp2(value) {
|
|
13421
|
+
return new RegExp(value.source, value.flags);
|
|
13422
|
+
}
|
|
13423
|
+
function FromMap(value) {
|
|
13424
|
+
return new Map(FromValue2([...value.entries()]));
|
|
13425
|
+
}
|
|
13426
|
+
function FromSet(value) {
|
|
13427
|
+
return new Set(FromValue2([...value.values()]));
|
|
13428
|
+
}
|
|
13429
|
+
function FromValue2(value) {
|
|
13430
|
+
return IsTypeArray(value) ? FromTypedArray(value) : IsRegExp(value) ? FromRegExp2(value) : IsMap(value) ? FromMap(value) : IsSet(value) ? FromSet(value) : IsArray(value) ? FromArray6(value) : IsObject(value) ? FromObject10(value) : value;
|
|
13431
|
+
}
|
|
13432
|
+
function Deep(value) {
|
|
13433
|
+
return FromValue2(value);
|
|
13434
|
+
}
|
|
13435
|
+
var init_deep = __esm(() => {
|
|
13436
|
+
init_guard2();
|
|
13437
|
+
});
|
|
13438
|
+
|
|
13371
13439
|
// node_modules/typebox/build/value/clone/clone.mjs
|
|
13372
|
-
function
|
|
13373
|
-
return
|
|
13440
|
+
function Clone(value) {
|
|
13441
|
+
return Deep(value);
|
|
13374
13442
|
}
|
|
13375
13443
|
var init_clone2 = __esm(() => {
|
|
13376
|
-
|
|
13444
|
+
init_deep();
|
|
13377
13445
|
});
|
|
13378
13446
|
|
|
13379
13447
|
// node_modules/typebox/build/value/clone/index.mjs
|
|
@@ -13384,7 +13452,7 @@ var init_clone3 = __esm(() => {
|
|
|
13384
13452
|
// node_modules/typebox/build/value/clean/from_union.mjs
|
|
13385
13453
|
function FromUnion9(context, type, value) {
|
|
13386
13454
|
for (const schema of type.anyOf) {
|
|
13387
|
-
const clean = FromType19(context, schema,
|
|
13455
|
+
const clean = FromType19(context, schema, Clone(value));
|
|
13388
13456
|
if (Check2(context, schema, clean))
|
|
13389
13457
|
return clean;
|
|
13390
13458
|
}
|
|
@@ -13398,7 +13466,7 @@ var init_from_union7 = __esm(() => {
|
|
|
13398
13466
|
|
|
13399
13467
|
// node_modules/typebox/build/value/clean/from_type.mjs
|
|
13400
13468
|
function FromType19(context, type, value) {
|
|
13401
|
-
return IsArray2(type) ?
|
|
13469
|
+
return IsArray2(type) ? FromArray5(context, type, value) : IsCyclic(type) ? FromCyclic6(context, type, value) : IsIntersect(type) ? FromIntersect6(context, type, value) : IsObject2(type) ? FromObject9(context, type, value) : IsRecord(type) ? FromRecord3(context, type, value) : IsRef(type) ? FromRef5(context, type, value) : IsTuple(type) ? FromTuple5(context, type, value) : IsUnion(type) ? FromUnion9(context, type, value) : value;
|
|
13402
13470
|
}
|
|
13403
13471
|
var init_from_type11 = __esm(() => {
|
|
13404
13472
|
init_type3();
|
|
@@ -13414,12 +13482,7 @@ var init_from_type11 = __esm(() => {
|
|
|
13414
13482
|
|
|
13415
13483
|
// node_modules/typebox/build/value/shared/union_priority_sort.mjs
|
|
13416
13484
|
function Modifiers(type, next) {
|
|
13417
|
-
|
|
13418
|
-
if (HasPropertyKey(next, key))
|
|
13419
|
-
continue;
|
|
13420
|
-
next[key] = type[key];
|
|
13421
|
-
}
|
|
13422
|
-
return next;
|
|
13485
|
+
return Assign(type, next);
|
|
13423
13486
|
}
|
|
13424
13487
|
function FromProperties4(properties) {
|
|
13425
13488
|
const result = {};
|
|
@@ -13446,6 +13509,7 @@ function UnionPrioritySort(type) {
|
|
|
13446
13509
|
}
|
|
13447
13510
|
var init_union_priority_sort = __esm(() => {
|
|
13448
13511
|
init_guard2();
|
|
13512
|
+
init_memory2();
|
|
13449
13513
|
init_type3();
|
|
13450
13514
|
init_type3();
|
|
13451
13515
|
init_type3();
|
|
@@ -13890,7 +13954,7 @@ function FromUnion10(context, type, value) {
|
|
|
13890
13954
|
const matched = type.anyOf.some((type) => Check2(context, type, value));
|
|
13891
13955
|
if (matched)
|
|
13892
13956
|
return value;
|
|
13893
|
-
const candidates = type.anyOf.map((type) => FromType21(context, type,
|
|
13957
|
+
const candidates = type.anyOf.map((type) => FromType21(context, type, Clone(value)));
|
|
13894
13958
|
const selected = candidates.find((value) => Check2(context, type, value));
|
|
13895
13959
|
return IsUndefined(selected) ? value : selected;
|
|
13896
13960
|
}
|
|
@@ -13982,7 +14046,7 @@ var init_from_cyclic8 = __esm(() => {
|
|
|
13982
14046
|
function FromDefault(type, value) {
|
|
13983
14047
|
if (!IsUndefined(value))
|
|
13984
14048
|
return value;
|
|
13985
|
-
return IsFunction(type.default) ? type.default() :
|
|
14049
|
+
return IsFunction(type.default) ? type.default() : Clone(type.default);
|
|
13986
14050
|
}
|
|
13987
14051
|
var init_from_default = __esm(() => {
|
|
13988
14052
|
init_guard2();
|
|
@@ -14082,7 +14146,7 @@ var init_from_tuple7 = __esm(() => {
|
|
|
14082
14146
|
// node_modules/typebox/build/value/default/from_union.mjs
|
|
14083
14147
|
function FromUnion11(context, schema, value) {
|
|
14084
14148
|
for (const inner of schema.anyOf) {
|
|
14085
|
-
const result = FromType22(context, inner,
|
|
14149
|
+
const result = FromType22(context, inner, Clone(value));
|
|
14086
14150
|
if (Check2(context, inner, result)) {
|
|
14087
14151
|
return result;
|
|
14088
14152
|
}
|
|
@@ -14219,7 +14283,7 @@ function NonMatchingInterior(value, interiors) {
|
|
|
14219
14283
|
function Decode5(direction, context, type, value) {
|
|
14220
14284
|
if (IsEqual(type.allOf.length, 0))
|
|
14221
14285
|
return Callback(direction, context, type, value);
|
|
14222
|
-
const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema,
|
|
14286
|
+
const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema, Clone(value))));
|
|
14223
14287
|
const structural = interiors.every((result) => IsObject(result));
|
|
14224
14288
|
const exterior = structural ? MergeInteriors(interiors) : NonMatchingInterior(value, interiors);
|
|
14225
14289
|
return Callback(direction, context, type, exterior);
|
|
@@ -14228,7 +14292,7 @@ function Encode5(direction, context, type, value) {
|
|
|
14228
14292
|
if (IsEqual(type.allOf.length, 0))
|
|
14229
14293
|
return Callback(direction, context, type, value);
|
|
14230
14294
|
const exterior = Callback(direction, context, type, value);
|
|
14231
|
-
const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema,
|
|
14295
|
+
const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema, Clone(exterior))));
|
|
14232
14296
|
const structural = interiors.every((result) => IsObject(result));
|
|
14233
14297
|
if (structural)
|
|
14234
14298
|
return MergeInteriors(interiors);
|
|
@@ -14364,7 +14428,7 @@ function Decode9(direction, context, type, value) {
|
|
|
14364
14428
|
function Encode9(direction, context, type, value) {
|
|
14365
14429
|
const exterior = Callback(direction, context, type, value);
|
|
14366
14430
|
for (const schema of type.anyOf) {
|
|
14367
|
-
const variant = FromType23(direction, context, schema,
|
|
14431
|
+
const variant = FromType23(direction, context, schema, Clone(exterior));
|
|
14368
14432
|
if (!Check2(context, schema, variant))
|
|
14369
14433
|
continue;
|
|
14370
14434
|
return variant;
|
|
@@ -14428,7 +14492,7 @@ var init_decode2 = __esm(() => {
|
|
|
14428
14492
|
}
|
|
14429
14493
|
};
|
|
14430
14494
|
Decoder = Pipeline([
|
|
14431
|
-
(_context, _type, value) =>
|
|
14495
|
+
(_context, _type, value) => Clone(value),
|
|
14432
14496
|
(context, type, value) => Default(context, type, value),
|
|
14433
14497
|
(context, type, value) => Convert(context, type, value),
|
|
14434
14498
|
(context, type, value) => Clean(context, type, value),
|
|
@@ -14466,7 +14530,7 @@ var init_encode2 = __esm(() => {
|
|
|
14466
14530
|
}
|
|
14467
14531
|
};
|
|
14468
14532
|
Encoder = Pipeline([
|
|
14469
|
-
(_context, _type, value) =>
|
|
14533
|
+
(_context, _type, value) => Clone(value),
|
|
14470
14534
|
(context, type, value) => EncodeUnsafe(context, type, value),
|
|
14471
14535
|
(context, type, value) => Default(context, type, value),
|
|
14472
14536
|
(context, type, value) => Convert(context, type, value),
|
|
@@ -14685,7 +14749,7 @@ var init_parse2 = __esm(() => {
|
|
|
14685
14749
|
}
|
|
14686
14750
|
};
|
|
14687
14751
|
Parser = Pipeline([
|
|
14688
|
-
(_context, _type, value) =>
|
|
14752
|
+
(_context, _type, value) => Clone(value),
|
|
14689
14753
|
(context, type, value) => Default(context, type, value),
|
|
14690
14754
|
(context, type, value) => Convert(context, type, value),
|
|
14691
14755
|
(context, type, value) => Clean(context, type, value),
|
|
@@ -17343,7 +17407,7 @@ async function applyDiagnosticFix(fix, options = {}) {
|
|
|
17343
17407
|
throw new Error("Command mode fix requires an explicit property and policy value");
|
|
17344
17408
|
}
|
|
17345
17409
|
const object = decoratorObject(findClass(source, fix.command), "Command");
|
|
17346
|
-
const current =
|
|
17410
|
+
const current = property2(object, fix.property);
|
|
17347
17411
|
if (!current || current.initializer.getText(source) !== fix.expectedExpression) {
|
|
17348
17412
|
throw new Error("Command mode changed since diagnosis; analyze the project again");
|
|
17349
17413
|
}
|
|
@@ -17357,7 +17421,7 @@ async function applyDiagnosticFix(fix, options = {}) {
|
|
|
17357
17421
|
const withImport = importSymbol(source, fix.importPath, fix.symbol);
|
|
17358
17422
|
source = parse5(file, withImport);
|
|
17359
17423
|
const object = unique(moduleObjects(source).filter((candidate) => !fix.targetModule || stringProperty(candidate, "name") === fix.targetModule), "target module");
|
|
17360
|
-
const imports =
|
|
17424
|
+
const imports = property2(object, "imports");
|
|
17361
17425
|
if (imports && !ts16.isArrayLiteralExpression(imports.initializer)) {
|
|
17362
17426
|
throw new Error("Module imports must be a static array");
|
|
17363
17427
|
}
|
|
@@ -17377,7 +17441,7 @@ async function applyDiagnosticFix(fix, options = {}) {
|
|
|
17377
17441
|
}
|
|
17378
17442
|
const command = findClass(source, fix.command);
|
|
17379
17443
|
const object = decoratorObject(command, "Command");
|
|
17380
|
-
const current =
|
|
17444
|
+
const current = property2(object, "permission");
|
|
17381
17445
|
if (current && (!ts16.isStringLiteral(current.initializer) || current.initializer.text !== permission)) {
|
|
17382
17446
|
throw new Error("Command permission already exists with a different value");
|
|
17383
17447
|
}
|
|
@@ -17447,7 +17511,7 @@ function nameOf(name) {
|
|
|
17447
17511
|
return "";
|
|
17448
17512
|
return ts16.isIdentifier(name) || ts16.isStringLiteral(name) || ts16.isNumericLiteral(name) ? name.text : "";
|
|
17449
17513
|
}
|
|
17450
|
-
function
|
|
17514
|
+
function property2(object, key) {
|
|
17451
17515
|
if (object.properties.some((item) => !ts16.isPropertyAssignment(item) || ts16.isComputedPropertyName(item.name))) {
|
|
17452
17516
|
throw new Error("Fix requires explicit static object properties");
|
|
17453
17517
|
}
|
|
@@ -17457,11 +17521,11 @@ function property(object, key) {
|
|
|
17457
17521
|
return values[0];
|
|
17458
17522
|
}
|
|
17459
17523
|
function stringProperty(object, key) {
|
|
17460
|
-
const value =
|
|
17524
|
+
const value = property2(object, key)?.initializer;
|
|
17461
17525
|
return value && ts16.isStringLiteral(value) ? value.text : undefined;
|
|
17462
17526
|
}
|
|
17463
17527
|
function replaceProperty(source, object, key, value) {
|
|
17464
|
-
const previous =
|
|
17528
|
+
const previous = property2(object, key);
|
|
17465
17529
|
const replacement = ts16.factory.createPropertyAssignment(key, value);
|
|
17466
17530
|
const properties = object.properties.map((item) => item === previous ? replacement : item);
|
|
17467
17531
|
if (!previous)
|
|
@@ -24775,10 +24839,10 @@ import { readFileSync as readFileSync4 } from "node:fs";
|
|
|
24775
24839
|
import { resolve as resolve17 } from "node:path";
|
|
24776
24840
|
|
|
24777
24841
|
// src/migration-app-version.ts
|
|
24778
|
-
var MIGRATION_APP_VERSION = "0.
|
|
24842
|
+
var MIGRATION_APP_VERSION = "0.33.0";
|
|
24779
24843
|
|
|
24780
24844
|
// src/migration-elysia-version.ts
|
|
24781
|
-
var MIGRATION_ELYSIA_VERSION = "0.36.
|
|
24845
|
+
var MIGRATION_ELYSIA_VERSION = "0.36.1";
|
|
24782
24846
|
|
|
24783
24847
|
// src/migration-policy.ts
|
|
24784
24848
|
var cachedCompilerVersion;
|
|
@@ -24797,7 +24861,7 @@ function migrationDependencies() {
|
|
|
24797
24861
|
"@supacloud/app": MIGRATION_APP_VERSION,
|
|
24798
24862
|
"@supacloud/compiler": compilerVersion(),
|
|
24799
24863
|
"@supacloud/elysia": MIGRATION_ELYSIA_VERSION,
|
|
24800
|
-
elysia: "2.0.0-
|
|
24864
|
+
elysia: "2.0.0-rc.0",
|
|
24801
24865
|
typescript: "7.0.2"
|
|
24802
24866
|
};
|
|
24803
24867
|
}
|