@supacloud/compiler 0.51.0 → 0.51.2
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/cli.js
CHANGED
|
@@ -5543,90 +5543,72 @@ var init_settings2 = __esm(() => {
|
|
|
5543
5543
|
init_settings();
|
|
5544
5544
|
});
|
|
5545
5545
|
|
|
5546
|
-
// node_modules/typebox/build/system/memory/
|
|
5547
|
-
function
|
|
5548
|
-
return
|
|
5546
|
+
// node_modules/typebox/build/system/memory/keys.mjs
|
|
5547
|
+
function Keys2(value) {
|
|
5548
|
+
return [...Keys(value), ...Symbols(value)];
|
|
5549
5549
|
}
|
|
5550
|
-
var
|
|
5550
|
+
var init_keys = __esm(() => {
|
|
5551
|
+
init_guard2();
|
|
5552
|
+
});
|
|
5553
|
+
|
|
5554
|
+
// node_modules/typebox/build/system/memory/finalize.mjs
|
|
5555
|
+
function Freeze(value, seen) {
|
|
5556
|
+
if (seen.has(value))
|
|
5557
|
+
return;
|
|
5558
|
+
seen.add(value);
|
|
5559
|
+
for (const key of Keys2(value)) {
|
|
5560
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
5561
|
+
if (!descriptor || !("value" in descriptor))
|
|
5562
|
+
continue;
|
|
5563
|
+
if (IsObject(descriptor.value))
|
|
5564
|
+
Freeze(descriptor.value, seen);
|
|
5565
|
+
}
|
|
5566
|
+
Object.freeze(value);
|
|
5567
|
+
}
|
|
5568
|
+
function Finalize(value) {
|
|
5569
|
+
if (!Get().immutableTypes)
|
|
5570
|
+
return value;
|
|
5571
|
+
Freeze(value, new WeakSet);
|
|
5572
|
+
return value;
|
|
5573
|
+
}
|
|
5574
|
+
var init_finalize = __esm(() => {
|
|
5575
|
+
init_guard2();
|
|
5551
5576
|
init_settings2();
|
|
5577
|
+
init_keys();
|
|
5552
5578
|
});
|
|
5553
5579
|
|
|
5554
5580
|
// node_modules/typebox/build/system/memory/assign.mjs
|
|
5555
5581
|
function Assign(left, right) {
|
|
5556
5582
|
Metrics.assign += 1;
|
|
5557
|
-
|
|
5583
|
+
const result = {}, rightKeys = Keys2(right), leftKeys = Keys2(left);
|
|
5584
|
+
for (const key of leftKeys) {
|
|
5585
|
+
if (rightKeys.includes(key))
|
|
5586
|
+
continue;
|
|
5587
|
+
Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(left, key));
|
|
5588
|
+
}
|
|
5589
|
+
for (const key of rightKeys) {
|
|
5590
|
+
Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(right, key));
|
|
5591
|
+
}
|
|
5592
|
+
return Finalize(result);
|
|
5558
5593
|
}
|
|
5559
5594
|
var init_assign = __esm(() => {
|
|
5560
5595
|
init_metrics();
|
|
5561
|
-
|
|
5596
|
+
init_finalize();
|
|
5597
|
+
init_keys();
|
|
5562
5598
|
});
|
|
5563
5599
|
|
|
5564
5600
|
// node_modules/typebox/build/system/memory/clone.mjs
|
|
5565
|
-
function FromClassInstance(value) {
|
|
5566
|
-
return value;
|
|
5567
|
-
}
|
|
5568
|
-
function IsSchemaObject(value) {
|
|
5569
|
-
return HasPropertyKey(value, "~kind") || HasPropertyKey(value, "~unsafe");
|
|
5570
|
-
}
|
|
5571
|
-
function FromSchemaObject(value) {
|
|
5572
|
-
const result = {};
|
|
5573
|
-
for (const key of Keys(value)) {
|
|
5574
|
-
if (IsUnsafePropertyKey(key))
|
|
5575
|
-
continue;
|
|
5576
|
-
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
5577
|
-
descriptor.value = FromValue(descriptor.value);
|
|
5578
|
-
if (IsEqual(descriptor.enumerable, true)) {
|
|
5579
|
-
result[key] = descriptor.value;
|
|
5580
|
-
} else {
|
|
5581
|
-
Object.defineProperty(result, key, descriptor);
|
|
5582
|
-
}
|
|
5583
|
-
}
|
|
5584
|
-
return result;
|
|
5585
|
-
}
|
|
5586
|
-
function FromPlainObject(value) {
|
|
5587
|
-
const result = {};
|
|
5588
|
-
for (const key of Keys(value)) {
|
|
5589
|
-
if (IsUnsafePropertyKey(key))
|
|
5590
|
-
continue;
|
|
5591
|
-
result[key] = FromValue(value[key]);
|
|
5592
|
-
}
|
|
5593
|
-
for (const key of Symbols(value)) {
|
|
5594
|
-
result[key] = FromValue(value[key]);
|
|
5595
|
-
}
|
|
5596
|
-
return result;
|
|
5597
|
-
}
|
|
5598
|
-
function FromObject(value) {
|
|
5599
|
-
return IsClassInstance(value) ? FromClassInstance(value) : IsSchemaObject(value) ? FromSchemaObject(value) : FromPlainObject(value);
|
|
5600
|
-
}
|
|
5601
|
-
function FromArray(value) {
|
|
5602
|
-
return value.map((element) => FromValue(element));
|
|
5603
|
-
}
|
|
5604
|
-
function FromTypedArray(value) {
|
|
5605
|
-
return value.slice();
|
|
5606
|
-
}
|
|
5607
|
-
function FromRegExp(value) {
|
|
5608
|
-
return new RegExp(value.source, value.flags);
|
|
5609
|
-
}
|
|
5610
|
-
function FromMap(value) {
|
|
5611
|
-
return new Map(FromValue([...value.entries()]));
|
|
5612
|
-
}
|
|
5613
|
-
function FromSet(value) {
|
|
5614
|
-
return new Set(FromValue([...value.values()]));
|
|
5615
|
-
}
|
|
5616
|
-
function FromValue(value) {
|
|
5617
|
-
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;
|
|
5618
|
-
}
|
|
5619
|
-
function Clone(value) {
|
|
5620
|
-
Metrics.clone += 1;
|
|
5621
|
-
return FromValue(value);
|
|
5622
|
-
}
|
|
5623
5601
|
var init_clone = __esm(() => {
|
|
5624
5602
|
init_guard2();
|
|
5625
5603
|
init_metrics();
|
|
5604
|
+
init_keys();
|
|
5626
5605
|
});
|
|
5627
5606
|
|
|
5628
5607
|
// node_modules/typebox/build/system/memory/create.mjs
|
|
5629
|
-
function
|
|
5608
|
+
function WithEnumerable(left, right) {
|
|
5609
|
+
return { ...left, ...right };
|
|
5610
|
+
}
|
|
5611
|
+
function WithHidden(left, right) {
|
|
5630
5612
|
for (const key of Object.keys(right)) {
|
|
5631
5613
|
Object.defineProperty(left, key, {
|
|
5632
5614
|
configurable: true,
|
|
@@ -5637,55 +5619,62 @@ function MergeHidden(left, right) {
|
|
|
5637
5619
|
}
|
|
5638
5620
|
return left;
|
|
5639
5621
|
}
|
|
5640
|
-
function Merge(left, right) {
|
|
5641
|
-
return { ...left, ...right };
|
|
5642
|
-
}
|
|
5643
5622
|
function Create(hidden, enumerable, options = {}) {
|
|
5644
5623
|
Metrics.create += 1;
|
|
5645
|
-
const
|
|
5646
|
-
const withHidden = Get().enumerableKind ?
|
|
5647
|
-
return
|
|
5624
|
+
const withEnumerable = WithEnumerable(enumerable, options);
|
|
5625
|
+
const withHidden = Get().enumerableKind ? WithEnumerable(withEnumerable, hidden) : WithHidden(withEnumerable, hidden);
|
|
5626
|
+
return Finalize(withHidden);
|
|
5648
5627
|
}
|
|
5649
5628
|
var init_create = __esm(() => {
|
|
5650
5629
|
init_settings2();
|
|
5651
5630
|
init_metrics();
|
|
5652
|
-
|
|
5631
|
+
init_finalize();
|
|
5653
5632
|
});
|
|
5654
5633
|
|
|
5655
5634
|
// node_modules/typebox/build/system/memory/discard.mjs
|
|
5656
5635
|
function Discard(value, propertyKeys) {
|
|
5657
5636
|
Metrics.discard += 1;
|
|
5658
5637
|
const result = {};
|
|
5659
|
-
for (const key of
|
|
5638
|
+
for (const key of Keys2(value)) {
|
|
5660
5639
|
if (propertyKeys.includes(key))
|
|
5661
5640
|
continue;
|
|
5662
5641
|
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
5663
|
-
descriptor.value = Clone(descriptor.value);
|
|
5664
5642
|
Object.defineProperty(result, key, descriptor);
|
|
5665
5643
|
}
|
|
5666
|
-
return
|
|
5644
|
+
return Finalize(result);
|
|
5667
5645
|
}
|
|
5668
5646
|
var init_discard = __esm(() => {
|
|
5669
|
-
init_guard2();
|
|
5670
5647
|
init_metrics();
|
|
5671
|
-
|
|
5672
|
-
|
|
5648
|
+
init_finalize();
|
|
5649
|
+
init_keys();
|
|
5673
5650
|
});
|
|
5674
5651
|
|
|
5675
5652
|
// node_modules/typebox/build/system/memory/update.mjs
|
|
5676
|
-
function
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5653
|
+
function WithCurrent(current, hiddenKeys, enumerableKeys, result) {
|
|
5654
|
+
for (const key of Keys2(current)) {
|
|
5655
|
+
if (IsUnsafePropertyKey(key) || hiddenKeys.includes(key) || enumerableKeys.includes(key))
|
|
5656
|
+
continue;
|
|
5657
|
+
const descriptor = Object.getOwnPropertyDescriptor(current, key);
|
|
5658
|
+
Object.defineProperty(result, key, descriptor);
|
|
5659
|
+
}
|
|
5660
|
+
}
|
|
5661
|
+
function WithHidden2(hidden, keys, result) {
|
|
5662
|
+
const enumerableKind = Get().enumerableKind;
|
|
5663
|
+
for (const key of keys) {
|
|
5664
|
+
if (IsUnsafePropertyKey(key))
|
|
5665
|
+
continue;
|
|
5681
5666
|
Object.defineProperty(result, key, {
|
|
5682
5667
|
configurable: true,
|
|
5683
5668
|
writable: true,
|
|
5684
|
-
enumerable:
|
|
5669
|
+
enumerable: enumerableKind,
|
|
5685
5670
|
value: hidden[key]
|
|
5686
5671
|
});
|
|
5687
5672
|
}
|
|
5688
|
-
|
|
5673
|
+
}
|
|
5674
|
+
function WithEnumerable2(enumerable, keys, result) {
|
|
5675
|
+
for (const key of keys) {
|
|
5676
|
+
if (IsUnsafePropertyKey(key))
|
|
5677
|
+
continue;
|
|
5689
5678
|
Object.defineProperty(result, key, {
|
|
5690
5679
|
configurable: true,
|
|
5691
5680
|
enumerable: true,
|
|
@@ -5693,13 +5682,21 @@ function Update(current, hidden, enumerable) {
|
|
|
5693
5682
|
value: enumerable[key]
|
|
5694
5683
|
});
|
|
5695
5684
|
}
|
|
5696
|
-
|
|
5685
|
+
}
|
|
5686
|
+
function Update(current, hidden, enumerable) {
|
|
5687
|
+
Metrics.update += 1;
|
|
5688
|
+
const result = {}, hiddenKeys = Keys2(hidden), enumerableKeys = Keys2(enumerable);
|
|
5689
|
+
WithCurrent(current, hiddenKeys, enumerableKeys, result);
|
|
5690
|
+
WithHidden2(hidden, hiddenKeys, result);
|
|
5691
|
+
WithEnumerable2(enumerable, enumerableKeys, result);
|
|
5692
|
+
return Finalize(result);
|
|
5697
5693
|
}
|
|
5698
5694
|
var init_update = __esm(() => {
|
|
5695
|
+
init_guard2();
|
|
5699
5696
|
init_settings2();
|
|
5700
5697
|
init_metrics();
|
|
5701
|
-
|
|
5702
|
-
|
|
5698
|
+
init_finalize();
|
|
5699
|
+
init_keys();
|
|
5703
5700
|
});
|
|
5704
5701
|
|
|
5705
5702
|
// node_modules/typebox/build/system/memory/memory.mjs
|
|
@@ -5741,11 +5738,8 @@ var init_deferred = __esm(() => {
|
|
|
5741
5738
|
});
|
|
5742
5739
|
|
|
5743
5740
|
// node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs
|
|
5744
|
-
function AddReadonlyOperation(type) {
|
|
5745
|
-
return Update(type, { "~readonly": true }, {});
|
|
5746
|
-
}
|
|
5747
5741
|
function AddReadonlyAction(type, options) {
|
|
5748
|
-
const result = Update(
|
|
5742
|
+
const result = Update(type, { "~readonly": true }, options);
|
|
5749
5743
|
return result;
|
|
5750
5744
|
}
|
|
5751
5745
|
function AddReadonlyInstantiate(context, state, type, options) {
|
|
@@ -5758,11 +5752,8 @@ var init_instantiate_add = __esm(() => {
|
|
|
5758
5752
|
});
|
|
5759
5753
|
|
|
5760
5754
|
// node_modules/typebox/build/type/engine/optional/instantiate_add.mjs
|
|
5761
|
-
function AddOptionalOperation(type) {
|
|
5762
|
-
return Update(type, { "~optional": true }, {});
|
|
5763
|
-
}
|
|
5764
5755
|
function AddOptionalAction(type, options) {
|
|
5765
|
-
const result = Update(
|
|
5756
|
+
const result = Update(type, { "~optional": true }, options);
|
|
5766
5757
|
return result;
|
|
5767
5758
|
}
|
|
5768
5759
|
function AddOptionalInstantiate(context, state, type, options) {
|
|
@@ -6080,13 +6071,20 @@ function IsIEEE754(value) {
|
|
|
6080
6071
|
return typeof value === "number";
|
|
6081
6072
|
}
|
|
6082
6073
|
function FNV1A64_OP(byte) {
|
|
6083
|
-
|
|
6084
|
-
|
|
6074
|
+
const L0 = A0 ^ byte;
|
|
6075
|
+
const T0 = L0 * 435;
|
|
6076
|
+
const T1 = A1 * 435 + (T0 >>> 16);
|
|
6077
|
+
const T2 = A2 * 435 + (T1 >>> 16) + (L0 << 8);
|
|
6078
|
+
const T3 = A3 * 435 + (T2 >>> 16) + (A1 << 8);
|
|
6079
|
+
A0 = T0 & 65535;
|
|
6080
|
+
A1 = T1 & 65535;
|
|
6081
|
+
A2 = T2 & 65535;
|
|
6082
|
+
A3 = T3 & 65535;
|
|
6085
6083
|
}
|
|
6086
|
-
function
|
|
6084
|
+
function FromArray(value) {
|
|
6087
6085
|
FNV1A64_OP(ByteMarker.Array);
|
|
6088
6086
|
for (const item of value) {
|
|
6089
|
-
|
|
6087
|
+
FromValue(item);
|
|
6090
6088
|
}
|
|
6091
6089
|
}
|
|
6092
6090
|
function FromBigInt(value) {
|
|
@@ -6102,15 +6100,15 @@ function FromBoolean(value) {
|
|
|
6102
6100
|
}
|
|
6103
6101
|
function FromConstructor(value) {
|
|
6104
6102
|
FNV1A64_OP(ByteMarker.Constructor);
|
|
6105
|
-
|
|
6103
|
+
FromValue(value.toString());
|
|
6106
6104
|
}
|
|
6107
6105
|
function FromDate(value) {
|
|
6108
6106
|
FNV1A64_OP(ByteMarker.Date);
|
|
6109
|
-
|
|
6107
|
+
FromValue(value.getTime());
|
|
6110
6108
|
}
|
|
6111
6109
|
function FromFunction(value) {
|
|
6112
6110
|
FNV1A64_OP(ByteMarker.Function);
|
|
6113
|
-
|
|
6111
|
+
FromValue(value.toString());
|
|
6114
6112
|
}
|
|
6115
6113
|
function FromNull(_value) {
|
|
6116
6114
|
FNV1A64_OP(ByteMarker.Null);
|
|
@@ -6122,26 +6120,33 @@ function FromNumber(value) {
|
|
|
6122
6120
|
FNV1A64_OP(byte);
|
|
6123
6121
|
}
|
|
6124
6122
|
}
|
|
6125
|
-
function
|
|
6123
|
+
function FromObject(value) {
|
|
6126
6124
|
FNV1A64_OP(ByteMarker.Object);
|
|
6127
6125
|
for (const key of InstanceKeys(value).sort()) {
|
|
6128
|
-
|
|
6129
|
-
|
|
6126
|
+
FromValue(key);
|
|
6127
|
+
FromValue(value[key]);
|
|
6130
6128
|
}
|
|
6131
6129
|
}
|
|
6132
|
-
function
|
|
6130
|
+
function FromRegExp(value) {
|
|
6133
6131
|
FNV1A64_OP(ByteMarker.RegExp);
|
|
6134
6132
|
FromString(value.toString());
|
|
6135
6133
|
}
|
|
6136
6134
|
function FromString(value) {
|
|
6137
6135
|
FNV1A64_OP(ByteMarker.String);
|
|
6138
|
-
for (
|
|
6139
|
-
|
|
6136
|
+
for (let i = 0;i < value.length; i++) {
|
|
6137
|
+
const code = value.charCodeAt(i);
|
|
6138
|
+
if (code > 127) {
|
|
6139
|
+
for (const byte of encoder.encode(value.slice(i))) {
|
|
6140
|
+
FNV1A64_OP(byte);
|
|
6141
|
+
}
|
|
6142
|
+
return;
|
|
6143
|
+
}
|
|
6144
|
+
FNV1A64_OP(code);
|
|
6140
6145
|
}
|
|
6141
6146
|
}
|
|
6142
6147
|
function FromSymbol(value) {
|
|
6143
6148
|
FNV1A64_OP(ByteMarker.Symbol);
|
|
6144
|
-
|
|
6149
|
+
FromValue(value.toString());
|
|
6145
6150
|
}
|
|
6146
6151
|
function FromTypeArray(value) {
|
|
6147
6152
|
FNV1A64_OP(ByteMarker.TypeArray);
|
|
@@ -6153,18 +6158,18 @@ function FromTypeArray(value) {
|
|
|
6153
6158
|
function FromUndefined(_value) {
|
|
6154
6159
|
return FNV1A64_OP(ByteMarker.Undefined);
|
|
6155
6160
|
}
|
|
6156
|
-
function
|
|
6157
|
-
return IsTypeArray(value) ? FromTypeArray(value) : IsDate(value) ? FromDate(value) : IsRegExp(value) ?
|
|
6161
|
+
function FromValue(value) {
|
|
6162
|
+
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();
|
|
6158
6163
|
}
|
|
6159
|
-
function
|
|
6160
|
-
|
|
6161
|
-
FromValue2(value);
|
|
6162
|
-
return Accumulator;
|
|
6164
|
+
function Hex(limb) {
|
|
6165
|
+
return limb.toString(16).padStart(4, "0");
|
|
6163
6166
|
}
|
|
6164
6167
|
function Hash(value) {
|
|
6165
|
-
|
|
6168
|
+
A0 = 8997, A1 = 33826, A2 = 40164, A3 = 52210;
|
|
6169
|
+
FromValue(value);
|
|
6170
|
+
return `${Hex(A3)}${Hex(A2)}${Hex(A1)}${Hex(A0)}`;
|
|
6166
6171
|
}
|
|
6167
|
-
var ByteMarker,
|
|
6172
|
+
var ByteMarker, A0 = 8997, A1 = 33826, A2 = 40164, A3 = 52210, F64, F64In, F64Out, encoder;
|
|
6168
6173
|
var init_hash = __esm(() => {
|
|
6169
6174
|
init_unreachable();
|
|
6170
6175
|
init_guard2();
|
|
@@ -6184,9 +6189,6 @@ var init_hash = __esm(() => {
|
|
|
6184
6189
|
TypeArray: 12,
|
|
6185
6190
|
Undefined: 13
|
|
6186
6191
|
};
|
|
6187
|
-
Accumulator = BigInt("14695981039346656037");
|
|
6188
|
-
[Prime, Size] = [BigInt("1099511628211"), BigInt("18446744073709551616")];
|
|
6189
|
-
Bytes = Array.from({ length: 256 }).map((_, i) => BigInt(i));
|
|
6190
6192
|
F64 = new Float64Array(1);
|
|
6191
6193
|
F64In = new DataView(F64.buffer);
|
|
6192
6194
|
F64Out = new Uint8Array(F64.buffer);
|
|
@@ -6649,30 +6651,20 @@ var init_tuple = __esm(() => {
|
|
|
6649
6651
|
init_schema();
|
|
6650
6652
|
});
|
|
6651
6653
|
|
|
6652
|
-
// node_modules/typebox/build/type/engine/
|
|
6653
|
-
function
|
|
6654
|
-
|
|
6655
|
-
}
|
|
6656
|
-
|
|
6657
|
-
const result = Update(RemoveReadonlyOperation(type), {}, options);
|
|
6654
|
+
// node_modules/typebox/build/type/engine/tuple/to_object.mjs
|
|
6655
|
+
function TupleElementsToProperties(types) {
|
|
6656
|
+
const result = types.reduceRight((result, right, index) => {
|
|
6657
|
+
return { [index]: right, ...result };
|
|
6658
|
+
}, {});
|
|
6658
6659
|
return result;
|
|
6659
6660
|
}
|
|
6660
|
-
function
|
|
6661
|
-
const
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
var init_instantiate_remove = __esm(() => {
|
|
6665
|
-
init_memory2();
|
|
6666
|
-
init_instantiate27();
|
|
6667
|
-
});
|
|
6668
|
-
|
|
6669
|
-
// node_modules/typebox/build/type/action/_remove_readonly.mjs
|
|
6670
|
-
function RemoveReadonly(type, options = {}) {
|
|
6671
|
-
return RemoveReadonlyAction(type, options);
|
|
6661
|
+
function TupleToObject(type) {
|
|
6662
|
+
const properties = TupleElementsToProperties(type.items);
|
|
6663
|
+
const result = _Object_(properties);
|
|
6664
|
+
return result;
|
|
6672
6665
|
}
|
|
6673
|
-
var
|
|
6674
|
-
|
|
6675
|
-
init_instantiate_remove();
|
|
6666
|
+
var init_to_object = __esm(() => {
|
|
6667
|
+
init_object();
|
|
6676
6668
|
});
|
|
6677
6669
|
|
|
6678
6670
|
// node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs
|
|
@@ -6687,55 +6679,57 @@ function RemoveOptionalInstantiate(context, state, type, options) {
|
|
|
6687
6679
|
const instantiatedType = InstantiateType(context, state, type);
|
|
6688
6680
|
return RemoveOptionalAction(instantiatedType, options);
|
|
6689
6681
|
}
|
|
6690
|
-
var
|
|
6682
|
+
var init_instantiate_remove = __esm(() => {
|
|
6691
6683
|
init_memory2();
|
|
6692
6684
|
init_instantiate27();
|
|
6693
6685
|
});
|
|
6694
6686
|
|
|
6695
|
-
// node_modules/typebox/build/type/
|
|
6696
|
-
function
|
|
6697
|
-
return
|
|
6687
|
+
// node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs
|
|
6688
|
+
function RemoveReadonlyOperation(type) {
|
|
6689
|
+
return Discard(type, ["~readonly"]);
|
|
6698
6690
|
}
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
init_instantiate_remove2();
|
|
6702
|
-
});
|
|
6703
|
-
|
|
6704
|
-
// node_modules/typebox/build/type/engine/tuple/to_object.mjs
|
|
6705
|
-
function TupleElementsToProperties(types) {
|
|
6706
|
-
const result = types.reduceRight((result, right, index) => {
|
|
6707
|
-
return { [index]: right, ...result };
|
|
6708
|
-
}, {});
|
|
6691
|
+
function RemoveReadonlyAction(type, options) {
|
|
6692
|
+
const result = Update(RemoveReadonlyOperation(type), {}, options);
|
|
6709
6693
|
return result;
|
|
6710
6694
|
}
|
|
6711
|
-
function
|
|
6712
|
-
const
|
|
6713
|
-
|
|
6714
|
-
return result;
|
|
6695
|
+
function RemoveReadonlyInstantiate(context, state, type, options) {
|
|
6696
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
6697
|
+
return RemoveReadonlyAction(instantiatedType, options);
|
|
6715
6698
|
}
|
|
6716
|
-
var
|
|
6717
|
-
|
|
6699
|
+
var init_instantiate_remove2 = __esm(() => {
|
|
6700
|
+
init_memory2();
|
|
6701
|
+
init_instantiate27();
|
|
6718
6702
|
});
|
|
6719
6703
|
|
|
6720
|
-
// node_modules/typebox/build/type/engine/evaluate/
|
|
6721
|
-
function
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
function IsReadonlyProperty(left, right) {
|
|
6725
|
-
return IsReadonly(left) ? IsReadonly(right) ? true : false : false;
|
|
6726
|
-
}
|
|
6727
|
-
function IsOptionalProperty(left, right) {
|
|
6728
|
-
return IsOptional(left) ? IsOptional(right) ? true : false : false;
|
|
6729
|
-
}
|
|
6730
|
-
function CompositeProperty(left, right) {
|
|
6731
|
-
const isReadonly = IsReadonlyProperty(left, right);
|
|
6732
|
-
const isOptional = IsOptionalProperty(left, right);
|
|
6704
|
+
// node_modules/typebox/build/type/engine/evaluate/property.mjs
|
|
6705
|
+
function EvaluatePropertyIntersect(left, right) {
|
|
6706
|
+
const isReadonly = IsReadonly(left) && IsReadonly(right);
|
|
6707
|
+
const isOptional = IsOptional(left) && IsOptional(right);
|
|
6733
6708
|
const evaluated = EvaluateIntersect([left, right]);
|
|
6734
|
-
const property =
|
|
6735
|
-
return isReadonly && isOptional ?
|
|
6736
|
-
}
|
|
6709
|
+
const property = RemoveReadonlyAction(RemoveOptionalAction(evaluated, {}), {});
|
|
6710
|
+
return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
|
|
6711
|
+
}
|
|
6712
|
+
function EvaluatePropertyUnion(left, right) {
|
|
6713
|
+
const isReadonly = IsReadonly(left) || IsReadonly(right);
|
|
6714
|
+
const isOptional = IsOptional(left) || IsOptional(right);
|
|
6715
|
+
const leftProperty = RemoveReadonlyAction(RemoveOptionalAction(left, {}), {});
|
|
6716
|
+
const rightProperty = RemoveReadonlyAction(RemoveOptionalAction(right, {}), {});
|
|
6717
|
+
const property = EvaluateUnion([leftProperty, rightProperty]);
|
|
6718
|
+
return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
|
|
6719
|
+
}
|
|
6720
|
+
var init_property = __esm(() => {
|
|
6721
|
+
init__optional();
|
|
6722
|
+
init__readonly();
|
|
6723
|
+
init_instantiate_add2();
|
|
6724
|
+
init_instantiate_add();
|
|
6725
|
+
init_instantiate_remove();
|
|
6726
|
+
init_instantiate_remove2();
|
|
6727
|
+
init_evaluate2();
|
|
6728
|
+
});
|
|
6729
|
+
|
|
6730
|
+
// node_modules/typebox/build/type/engine/evaluate/composite.mjs
|
|
6737
6731
|
function CompositePropertyKey(left, right, key) {
|
|
6738
|
-
return key in left ? key in right ?
|
|
6732
|
+
return key in left ? key in right ? EvaluatePropertyIntersect(left[key], right[key]) : left[key] : (key in right) ? right[key] : Never();
|
|
6739
6733
|
}
|
|
6740
6734
|
function CompositeProperties(left, right) {
|
|
6741
6735
|
const keys = new Set([...Keys(left), ...Keys(right)]);
|
|
@@ -6757,17 +6751,11 @@ function Composite(left, right) {
|
|
|
6757
6751
|
}
|
|
6758
6752
|
var init_composite = __esm(() => {
|
|
6759
6753
|
init_guard2();
|
|
6760
|
-
init__readonly();
|
|
6761
|
-
init__optional();
|
|
6762
6754
|
init_object();
|
|
6763
6755
|
init_never();
|
|
6764
6756
|
init_tuple();
|
|
6765
|
-
init__add_readonly();
|
|
6766
|
-
init__add_optional();
|
|
6767
|
-
init__remove_readonly();
|
|
6768
|
-
init__remove_optional();
|
|
6769
6757
|
init_to_object();
|
|
6770
|
-
|
|
6758
|
+
init_property();
|
|
6771
6759
|
});
|
|
6772
6760
|
|
|
6773
6761
|
// node_modules/typebox/build/type/engine/evaluate/narrow.mjs
|
|
@@ -6775,6 +6763,9 @@ function NarrowCompareRule(left, right) {
|
|
|
6775
6763
|
const result = Compare(left, right);
|
|
6776
6764
|
return IsEqual(result, CompareResultLeftInside) ? left : IsEqual(result, CompareResultRightInside) ? right : IsEqual(result, CompareResultEqual) ? right : Never();
|
|
6777
6765
|
}
|
|
6766
|
+
function CanComposite(type) {
|
|
6767
|
+
return IsObject2(type) || IsTuple(type);
|
|
6768
|
+
}
|
|
6778
6769
|
function NarrowCompositeRule(left, right) {
|
|
6779
6770
|
const canCompositeLeft = CanComposite(left);
|
|
6780
6771
|
const canCompositeRight = CanComposite(right);
|
|
@@ -6785,8 +6776,10 @@ function Narrow(left, right) {
|
|
|
6785
6776
|
}
|
|
6786
6777
|
var init_narrow = __esm(() => {
|
|
6787
6778
|
init_guard2();
|
|
6779
|
+
init_object();
|
|
6788
6780
|
init_any();
|
|
6789
6781
|
init_never();
|
|
6782
|
+
init_tuple();
|
|
6790
6783
|
init_unknown();
|
|
6791
6784
|
init_compare();
|
|
6792
6785
|
init_composite();
|
|
@@ -7951,14 +7944,14 @@ var init_object2 = __esm(() => {
|
|
|
7951
7944
|
});
|
|
7952
7945
|
|
|
7953
7946
|
// node_modules/typebox/build/type/extends/record.mjs
|
|
7954
|
-
function
|
|
7947
|
+
function FromObject2(inferred, properties) {
|
|
7955
7948
|
return IsEqual(Keys(properties).length, 0) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
7956
7949
|
}
|
|
7957
7950
|
function FromRecord(inferred, _leftKey, leftValue, _rightKey, rightValue) {
|
|
7958
7951
|
return ExtendsLeft(inferred, leftValue, rightValue);
|
|
7959
7952
|
}
|
|
7960
7953
|
function ExtendsRecord(inferred, leftPattern, leftValue, right) {
|
|
7961
|
-
return IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) : IsObject2(right) ?
|
|
7954
|
+
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();
|
|
7962
7955
|
}
|
|
7963
7956
|
var init_record2 = __esm(() => {
|
|
7964
7957
|
init_guard2();
|
|
@@ -8516,6 +8509,7 @@ var init_evaluate3 = __esm(() => {
|
|
|
8516
8509
|
init_flatten();
|
|
8517
8510
|
init_instantiate5();
|
|
8518
8511
|
init_narrow();
|
|
8512
|
+
init_property();
|
|
8519
8513
|
});
|
|
8520
8514
|
|
|
8521
8515
|
// node_modules/typebox/build/type/engine/call/distribute_arguments.mjs
|
|
@@ -9044,7 +9038,7 @@ function CollapseIntersectProperties(left, right) {
|
|
|
9044
9038
|
const sharedKeys = Keys(left).filter((key) => HasPropertyKey(right, key));
|
|
9045
9039
|
const leftProperties = leftKeys.reduce((result, key) => ({ ...result, [key]: left[key] }), {});
|
|
9046
9040
|
const rightProperties = rightKeys.reduce((result, key) => ({ ...result, [key]: right[key] }), {});
|
|
9047
|
-
const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]:
|
|
9041
|
+
const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]: EvaluatePropertyIntersect(left[key], right[key]) }), {});
|
|
9048
9042
|
const unique = Assign(leftProperties, rightProperties);
|
|
9049
9043
|
const shared = Assign(unique, sharedProperties);
|
|
9050
9044
|
return shared;
|
|
@@ -9058,11 +9052,11 @@ var init_from_intersect = __esm(() => {
|
|
|
9058
9052
|
init_memory2();
|
|
9059
9053
|
init_guard2();
|
|
9060
9054
|
init_from_type2();
|
|
9061
|
-
|
|
9055
|
+
init_property();
|
|
9062
9056
|
});
|
|
9063
9057
|
|
|
9064
9058
|
// node_modules/typebox/build/type/engine/object/from_object.mjs
|
|
9065
|
-
function
|
|
9059
|
+
function FromObject3(properties) {
|
|
9066
9060
|
return properties;
|
|
9067
9061
|
}
|
|
9068
9062
|
|
|
@@ -9082,7 +9076,7 @@ var init_from_tuple = __esm(() => {
|
|
|
9082
9076
|
function CollapseUnionProperties(left, right) {
|
|
9083
9077
|
const sharedKeys = Keys(left).filter((key) => (key in right));
|
|
9084
9078
|
const result = sharedKeys.reduce((result, key) => {
|
|
9085
|
-
return { ...result, [key]:
|
|
9079
|
+
return { ...result, [key]: EvaluatePropertyUnion(left[key], right[key]) };
|
|
9086
9080
|
}, {});
|
|
9087
9081
|
return result;
|
|
9088
9082
|
}
|
|
@@ -9095,13 +9089,13 @@ function FromUnion3(types) {
|
|
|
9095
9089
|
var init_from_union2 = __esm(() => {
|
|
9096
9090
|
init_guard2();
|
|
9097
9091
|
init_unreachable();
|
|
9098
|
-
|
|
9092
|
+
init_property();
|
|
9099
9093
|
init_from_type2();
|
|
9100
9094
|
});
|
|
9101
9095
|
|
|
9102
9096
|
// node_modules/typebox/build/type/engine/object/from_type.mjs
|
|
9103
9097
|
function FromType8(type) {
|
|
9104
|
-
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) ?
|
|
9098
|
+
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) : {};
|
|
9105
9099
|
}
|
|
9106
9100
|
var init_from_type2 = __esm(() => {
|
|
9107
9101
|
init_cyclic();
|
|
@@ -9139,7 +9133,7 @@ function ConvertToIntegerKey(value) {
|
|
|
9139
9133
|
return integerKeyPattern.test(normal) ? parseInt(normal) : value;
|
|
9140
9134
|
}
|
|
9141
9135
|
var integerKeyPattern;
|
|
9142
|
-
var
|
|
9136
|
+
var init_keys2 = __esm(() => {
|
|
9143
9137
|
integerKeyPattern = new RegExp("^(?:0|[1-9][0-9]*)$");
|
|
9144
9138
|
});
|
|
9145
9139
|
|
|
@@ -9153,7 +9147,7 @@ function NormalizeIndexerTypes(types) {
|
|
|
9153
9147
|
function NormalizeIndexer(type) {
|
|
9154
9148
|
return IsIntersect(type) ? Intersect(NormalizeIndexerTypes(type.allOf)) : IsUnion(type) ? Union(NormalizeIndexerTypes(type.anyOf)) : IsLiteral(type) ? NormalizeLiteral(type.const) : type;
|
|
9155
9149
|
}
|
|
9156
|
-
function
|
|
9150
|
+
function FromArray2(type, indexer) {
|
|
9157
9151
|
const normalizedIndexer = NormalizeIndexer(indexer);
|
|
9158
9152
|
const check = Extends({}, normalizedIndexer, Number2());
|
|
9159
9153
|
const result = IsExtendsTrueLike(check) ? type : IsLiteral(indexer) && IsEqual(indexer.const, "length") ? Number2() : Never();
|
|
@@ -9167,7 +9161,7 @@ var init_from_array = __esm(() => {
|
|
|
9167
9161
|
init_number();
|
|
9168
9162
|
init_never();
|
|
9169
9163
|
init_extends3();
|
|
9170
|
-
|
|
9164
|
+
init_keys2();
|
|
9171
9165
|
});
|
|
9172
9166
|
|
|
9173
9167
|
// node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs
|
|
@@ -9320,7 +9314,7 @@ function FromIndexerNumber(properties) {
|
|
|
9320
9314
|
const result = EvaluateUnion(variants);
|
|
9321
9315
|
return result;
|
|
9322
9316
|
}
|
|
9323
|
-
function
|
|
9317
|
+
function FromObject4(properties, indexer) {
|
|
9324
9318
|
const result = IsNumber3(indexer) ? FromIndexerNumber(properties) : FromIndexer(properties, indexer);
|
|
9325
9319
|
return result;
|
|
9326
9320
|
}
|
|
@@ -9350,7 +9344,7 @@ var init_array_indexer = __esm(() => {
|
|
|
9350
9344
|
init_union();
|
|
9351
9345
|
init_intersect();
|
|
9352
9346
|
init_literal();
|
|
9353
|
-
|
|
9347
|
+
init_keys2();
|
|
9354
9348
|
});
|
|
9355
9349
|
|
|
9356
9350
|
// node_modules/typebox/build/type/engine/indexed/from_tuple.mjs
|
|
@@ -9383,7 +9377,7 @@ var init_from_tuple2 = __esm(() => {
|
|
|
9383
9377
|
|
|
9384
9378
|
// node_modules/typebox/build/type/engine/indexed/from_type.mjs
|
|
9385
9379
|
function FromType11(type, indexer) {
|
|
9386
|
-
return IsArray2(type) ?
|
|
9380
|
+
return IsArray2(type) ? FromArray2(type.items, indexer) : IsObject2(type) ? FromObject4(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
|
|
9387
9381
|
}
|
|
9388
9382
|
var init_from_type4 = __esm(() => {
|
|
9389
9383
|
init_array();
|
|
@@ -9471,7 +9465,7 @@ var init_from_any = __esm(() => {
|
|
|
9471
9465
|
});
|
|
9472
9466
|
|
|
9473
9467
|
// node_modules/typebox/build/type/engine/keyof/from_array.mjs
|
|
9474
|
-
function
|
|
9468
|
+
function FromArray3(_type) {
|
|
9475
9469
|
return Number2();
|
|
9476
9470
|
}
|
|
9477
9471
|
var init_from_array2 = __esm(() => {
|
|
@@ -9485,7 +9479,7 @@ function FromPropertyKeys(keys) {
|
|
|
9485
9479
|
}, []);
|
|
9486
9480
|
return result;
|
|
9487
9481
|
}
|
|
9488
|
-
function
|
|
9482
|
+
function FromObject5(properties) {
|
|
9489
9483
|
const propertyKeys = Keys(properties);
|
|
9490
9484
|
const variants = FromPropertyKeys(propertyKeys);
|
|
9491
9485
|
const result = EvaluateUnionFast(variants);
|
|
@@ -9495,7 +9489,7 @@ var init_from_object2 = __esm(() => {
|
|
|
9495
9489
|
init_unreachable();
|
|
9496
9490
|
init_guard2();
|
|
9497
9491
|
init_literal();
|
|
9498
|
-
|
|
9492
|
+
init_keys2();
|
|
9499
9493
|
init_evaluate2();
|
|
9500
9494
|
});
|
|
9501
9495
|
|
|
@@ -9519,7 +9513,7 @@ var init_from_tuple3 = __esm(() => {
|
|
|
9519
9513
|
|
|
9520
9514
|
// node_modules/typebox/build/type/engine/keyof/from_type.mjs
|
|
9521
9515
|
function FromType12(type) {
|
|
9522
|
-
return IsAny(type) ? FromAny() : IsArray2(type) ?
|
|
9516
|
+
return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray3(type.items) : IsObject2(type) ? FromObject5(type.properties) : IsRecord(type) ? FromRecord2(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
|
|
9523
9517
|
}
|
|
9524
9518
|
var init_from_type5 = __esm(() => {
|
|
9525
9519
|
init_any();
|
|
@@ -9881,7 +9875,7 @@ var init_from_union4 = __esm(() => {
|
|
|
9881
9875
|
});
|
|
9882
9876
|
|
|
9883
9877
|
// node_modules/typebox/build/type/engine/partial/from_object.mjs
|
|
9884
|
-
function
|
|
9878
|
+
function FromObject6(properties) {
|
|
9885
9879
|
const mapped = Keys(properties).reduce((result, left) => {
|
|
9886
9880
|
return { ...result, [left]: AddOptional(properties[left]) };
|
|
9887
9881
|
}, {});
|
|
@@ -9896,7 +9890,7 @@ var init_from_object3 = __esm(() => {
|
|
|
9896
9890
|
|
|
9897
9891
|
// node_modules/typebox/build/type/engine/partial/from_type.mjs
|
|
9898
9892
|
function FromType15(type) {
|
|
9899
|
-
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) ?
|
|
9893
|
+
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_({});
|
|
9900
9894
|
}
|
|
9901
9895
|
var init_from_type7 = __esm(() => {
|
|
9902
9896
|
init_cyclic();
|
|
@@ -9987,7 +9981,7 @@ var init_readonly_object = __esm(() => {
|
|
|
9987
9981
|
});
|
|
9988
9982
|
|
|
9989
9983
|
// node_modules/typebox/build/type/engine/readonly_object/from_array.mjs
|
|
9990
|
-
function
|
|
9984
|
+
function FromArray4(type) {
|
|
9991
9985
|
const result = AddImmutable(_Array_(type));
|
|
9992
9986
|
return result;
|
|
9993
9987
|
}
|
|
@@ -10033,7 +10027,7 @@ var init_from_intersect4 = __esm(() => {
|
|
|
10033
10027
|
});
|
|
10034
10028
|
|
|
10035
10029
|
// node_modules/typebox/build/type/engine/readonly_object/from_object.mjs
|
|
10036
|
-
function
|
|
10030
|
+
function FromObject7(properties) {
|
|
10037
10031
|
const mapped = Keys(properties).reduce((result, left) => {
|
|
10038
10032
|
return { ...result, [left]: AddReadonly(properties[left]) };
|
|
10039
10033
|
}, {});
|
|
@@ -10068,7 +10062,7 @@ var init_from_union5 = __esm(() => {
|
|
|
10068
10062
|
|
|
10069
10063
|
// node_modules/typebox/build/type/engine/readonly_object/from_type.mjs
|
|
10070
10064
|
function FromType17(type) {
|
|
10071
|
-
return IsArray2(type) ?
|
|
10065
|
+
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;
|
|
10072
10066
|
}
|
|
10073
10067
|
var init_from_type9 = __esm(() => {
|
|
10074
10068
|
init_array();
|
|
@@ -10158,8 +10152,17 @@ var init_from_union6 = __esm(() => {
|
|
|
10158
10152
|
init_from_type10();
|
|
10159
10153
|
});
|
|
10160
10154
|
|
|
10155
|
+
// node_modules/typebox/build/type/action/_remove_optional.mjs
|
|
10156
|
+
function RemoveOptional(type, options = {}) {
|
|
10157
|
+
return RemoveOptionalAction(type, options);
|
|
10158
|
+
}
|
|
10159
|
+
var init__remove_optional = __esm(() => {
|
|
10160
|
+
init_deferred();
|
|
10161
|
+
init_instantiate_remove();
|
|
10162
|
+
});
|
|
10163
|
+
|
|
10161
10164
|
// node_modules/typebox/build/type/engine/required/from_object.mjs
|
|
10162
|
-
function
|
|
10165
|
+
function FromObject8(properties) {
|
|
10163
10166
|
const mapped = Keys(properties).reduce((result, left) => {
|
|
10164
10167
|
return { ...result, [left]: RemoveOptional(properties[left]) };
|
|
10165
10168
|
}, {});
|
|
@@ -10174,7 +10177,7 @@ var init_from_object5 = __esm(() => {
|
|
|
10174
10177
|
|
|
10175
10178
|
// node_modules/typebox/build/type/engine/required/from_type.mjs
|
|
10176
10179
|
function FromType18(type) {
|
|
10177
|
-
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) ?
|
|
10180
|
+
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_({});
|
|
10178
10181
|
}
|
|
10179
10182
|
var init_from_type10 = __esm(() => {
|
|
10180
10183
|
init_cyclic();
|
|
@@ -10356,9 +10359,9 @@ var init_instantiate27 = __esm(() => {
|
|
|
10356
10359
|
init_instantiate_add3();
|
|
10357
10360
|
init_instantiate_remove3();
|
|
10358
10361
|
init_instantiate_add();
|
|
10359
|
-
init_instantiate_remove();
|
|
10360
|
-
init_instantiate_add2();
|
|
10361
10362
|
init_instantiate_remove2();
|
|
10363
|
+
init_instantiate_add2();
|
|
10364
|
+
init_instantiate_remove();
|
|
10362
10365
|
init__optional();
|
|
10363
10366
|
init__immutable();
|
|
10364
10367
|
init__readonly();
|
|
@@ -10394,11 +10397,8 @@ var init_instantiate27 = __esm(() => {
|
|
|
10394
10397
|
});
|
|
10395
10398
|
|
|
10396
10399
|
// node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs
|
|
10397
|
-
function AddImmutableOperation(type) {
|
|
10398
|
-
return Update(type, { "~immutable": true }, {});
|
|
10399
|
-
}
|
|
10400
10400
|
function AddImmutableAction(type, options) {
|
|
10401
|
-
const result = Update(
|
|
10401
|
+
const result = Update(type, { "~immutable": true }, options);
|
|
10402
10402
|
return result;
|
|
10403
10403
|
}
|
|
10404
10404
|
function AddImmutableInstantiate(context, state, type, options) {
|
|
@@ -10425,6 +10425,12 @@ var init__remove_immutable = __esm(() => {
|
|
|
10425
10425
|
init_instantiate_remove3();
|
|
10426
10426
|
});
|
|
10427
10427
|
|
|
10428
|
+
// node_modules/typebox/build/type/action/_remove_readonly.mjs
|
|
10429
|
+
var init__remove_readonly = __esm(() => {
|
|
10430
|
+
init_deferred();
|
|
10431
|
+
init_instantiate_remove2();
|
|
10432
|
+
});
|
|
10433
|
+
|
|
10428
10434
|
// node_modules/typebox/build/type/action/evaluate.mjs
|
|
10429
10435
|
function Evaluate(type, options = {}) {
|
|
10430
10436
|
return EvaluateAction(type, options);
|
|
@@ -10501,7 +10507,7 @@ var init_union3 = () => {};
|
|
|
10501
10507
|
// node_modules/typebox/build/type/engine/helpers/index.mjs
|
|
10502
10508
|
var init_helpers = __esm(() => {
|
|
10503
10509
|
init_keys_to_indexer();
|
|
10504
|
-
|
|
10510
|
+
init_keys2();
|
|
10505
10511
|
init_union3();
|
|
10506
10512
|
});
|
|
10507
10513
|
|
|
@@ -10787,14 +10793,14 @@ var init__refine2 = __esm(() => {
|
|
|
10787
10793
|
});
|
|
10788
10794
|
|
|
10789
10795
|
// node_modules/typebox/build/schema/types/schema.mjs
|
|
10790
|
-
function
|
|
10796
|
+
function IsSchemaObject(value) {
|
|
10791
10797
|
return IsObject(value) && !IsArray(value);
|
|
10792
10798
|
}
|
|
10793
10799
|
function IsSchemaBoolean(value) {
|
|
10794
10800
|
return IsBoolean(value);
|
|
10795
10801
|
}
|
|
10796
10802
|
function IsSchema2(value) {
|
|
10797
|
-
return
|
|
10803
|
+
return IsSchemaObject(value) || IsSchemaBoolean(value);
|
|
10798
10804
|
}
|
|
10799
10805
|
var init_schema2 = __esm(() => {
|
|
10800
10806
|
init_guard2();
|
|
@@ -11366,7 +11372,7 @@ function NextUri(ref, base) {
|
|
|
11366
11372
|
return URL.canParse(ref, base) ? new URL(ref, base) : IsEqual(base, DefaultUri) ? new URL(`${base}:${ref}`) : new URL(`${base.slice(0, base.lastIndexOf(":"))}:${ref}`);
|
|
11367
11373
|
}
|
|
11368
11374
|
function Stack(context, schema) {
|
|
11369
|
-
const base =
|
|
11375
|
+
const base = IsSchemaObject(schema) && IsId(schema) ? NextUri(schema.$id, DefaultUri).href : DefaultUri;
|
|
11370
11376
|
return {
|
|
11371
11377
|
context,
|
|
11372
11378
|
schema,
|
|
@@ -11388,7 +11394,7 @@ function RegisterResourceAnchors(anchors, schema, isRoot = true) {
|
|
|
11388
11394
|
return anchors;
|
|
11389
11395
|
if (Array.isArray(schema))
|
|
11390
11396
|
return schema.reduce((result, item) => RegisterResourceAnchors(result, item, false), anchors);
|
|
11391
|
-
if (!
|
|
11397
|
+
if (!IsSchemaObject(schema))
|
|
11392
11398
|
return anchors;
|
|
11393
11399
|
if (!isRoot && IsId(schema))
|
|
11394
11400
|
return anchors;
|
|
@@ -11444,7 +11450,7 @@ function NextLexicalSchema(stack, schema) {
|
|
|
11444
11450
|
return IsId(schema) ? schema : stack.lexicalSchema;
|
|
11445
11451
|
}
|
|
11446
11452
|
function HasStackKeywords(stack, schema) {
|
|
11447
|
-
return
|
|
11453
|
+
return IsSchemaObject(schema) && (IsId(schema) || IsDynamicAnchor(schema) || IsUndefined(stack.recursiveAnchor) && IsRecursiveAnchorTrue(schema) || !IsUndefined(ResourceEntry(stack, schema)));
|
|
11448
11454
|
}
|
|
11449
11455
|
function NextStack(stack, schema) {
|
|
11450
11456
|
return HasStackKeywords(stack, schema) ? {
|
|
@@ -11743,7 +11749,7 @@ var init_pointer2 = __esm(() => {
|
|
|
11743
11749
|
|
|
11744
11750
|
// node_modules/typebox/build/schema/resolve/resolve.mjs
|
|
11745
11751
|
function RelativeBase(schema, base) {
|
|
11746
|
-
return
|
|
11752
|
+
return IsSchemaObject(schema) && IsId(schema) ? NextUri(schema.$id, base.href) : base;
|
|
11747
11753
|
}
|
|
11748
11754
|
function AbsoluteBase(base) {
|
|
11749
11755
|
return NextUri(base, DefaultUri);
|
|
@@ -11828,7 +11834,7 @@ function MatchWithDynamicAnchor(schema, base, ref) {
|
|
|
11828
11834
|
return isMatch ? schema : undefined;
|
|
11829
11835
|
}
|
|
11830
11836
|
function MatchSchemaObject(schema, base, ref) {
|
|
11831
|
-
if (!
|
|
11837
|
+
if (!IsSchemaObject(schema))
|
|
11832
11838
|
return;
|
|
11833
11839
|
return MatchWithId(schema, base, ref) ?? MatchWithAnchor(schema, base, ref) ?? MatchWithDynamicAnchor(schema, base, ref) ?? MatchWithHash(schema, ref);
|
|
11834
11840
|
}
|
|
@@ -11856,12 +11862,12 @@ function Match4(schema, base, ref) {
|
|
|
11856
11862
|
}
|
|
11857
11863
|
function Resource(context, schema, base, ref) {
|
|
11858
11864
|
const result = RefInternal(context, schema, base, ref);
|
|
11859
|
-
return
|
|
11865
|
+
return IsSchemaObject(result) && IsId(result) ? result : undefined;
|
|
11860
11866
|
}
|
|
11861
11867
|
function FindDeferredResourceLegacy(stack, ref, schema) {
|
|
11862
11868
|
if (!ref.$ref.startsWith("#"))
|
|
11863
11869
|
return;
|
|
11864
|
-
if (!
|
|
11870
|
+
if (!IsSchemaObject(stack.schema) || HasPropertyKey(stack.schema, "$schema"))
|
|
11865
11871
|
return;
|
|
11866
11872
|
const targetBase = Base(stack.lexicalSchema, stack.referenceBase, schema);
|
|
11867
11873
|
if (IsUndefined(targetBase) || IsEqual(targetBase, stack.referenceBase))
|
|
@@ -11870,7 +11876,7 @@ function FindDeferredResourceLegacy(stack, ref, schema) {
|
|
|
11870
11876
|
}
|
|
11871
11877
|
function FindDeferredResourceModern(stack, canonical, schema) {
|
|
11872
11878
|
const remoteRoot = stack.context[canonical];
|
|
11873
|
-
if (!
|
|
11879
|
+
if (!IsSchemaObject(remoteRoot))
|
|
11874
11880
|
return;
|
|
11875
11881
|
return { target: schema, base: canonical, root: remoteRoot };
|
|
11876
11882
|
}
|
|
@@ -11932,10 +11938,10 @@ function RefResultNotFound(stack, schema) {
|
|
|
11932
11938
|
}
|
|
11933
11939
|
function Ref2(stack, ref) {
|
|
11934
11940
|
const schema = RefInternal(stack.context, RefRoot(stack, ref), stack.referenceBase, ref.$ref);
|
|
11935
|
-
return
|
|
11941
|
+
return IsSchemaObject(schema) ? RefResultFound(stack, ref, schema) : RefResultNotFound(stack, schema);
|
|
11936
11942
|
}
|
|
11937
11943
|
function IsRecursiveAnchorInScope(stack) {
|
|
11938
|
-
return
|
|
11944
|
+
return IsSchemaObject(stack.lexicalSchema) && IsRecursiveAnchorTrue(stack.lexicalSchema);
|
|
11939
11945
|
}
|
|
11940
11946
|
function RecursiveRef(stack, recursiveRef) {
|
|
11941
11947
|
const schema = IsRecursiveAnchorInScope(stack) ? stack.recursiveAnchor : stack.lexicalSchema;
|
|
@@ -11948,7 +11954,7 @@ function FindScopedDynamicAnchor(stack, name) {
|
|
|
11948
11954
|
return stack.dynamicAnchors.find((anchor) => IsEqual(anchor.$dynamicAnchor, name)) ?? SearchDynamicAnchor(stack.schema, name);
|
|
11949
11955
|
}
|
|
11950
11956
|
function DynamicRefWhenFound(stack, dynamicRef, fragmentTarget) {
|
|
11951
|
-
if (!
|
|
11957
|
+
if (!IsSchemaObject(fragmentTarget) || !IsDynamicAnchor(fragmentTarget))
|
|
11952
11958
|
return fragmentTarget;
|
|
11953
11959
|
const fragment = DynamicRefFragment(stack, dynamicRef);
|
|
11954
11960
|
return IsPointerFragment(fragment) ? fragmentTarget : FindScopedDynamicAnchor(stack, fragmentTarget.$dynamicAnchor);
|
|
@@ -13592,7 +13598,7 @@ var init_type3 = __esm(() => {
|
|
|
13592
13598
|
});
|
|
13593
13599
|
|
|
13594
13600
|
// node_modules/typebox/build/value/clean/from_array.mjs
|
|
13595
|
-
function
|
|
13601
|
+
function FromArray5(context, type, value) {
|
|
13596
13602
|
if (!IsArray(value))
|
|
13597
13603
|
return value;
|
|
13598
13604
|
return value.map((value) => FromType19(context, type.items, value));
|
|
@@ -13638,7 +13644,7 @@ var init_additional = __esm(() => {
|
|
|
13638
13644
|
});
|
|
13639
13645
|
|
|
13640
13646
|
// node_modules/typebox/build/value/clean/from_object.mjs
|
|
13641
|
-
function
|
|
13647
|
+
function FromObject9(context, type, value) {
|
|
13642
13648
|
if (!IsObject(value) || IsArray(value))
|
|
13643
13649
|
return value;
|
|
13644
13650
|
const additionalProperties = GetAdditionalProperties(type);
|
|
@@ -13716,12 +13722,74 @@ var init_from_tuple5 = __esm(() => {
|
|
|
13716
13722
|
init_from_type11();
|
|
13717
13723
|
});
|
|
13718
13724
|
|
|
13725
|
+
// node_modules/typebox/build/system/memory/deep.mjs
|
|
13726
|
+
function FromClassInstance(value) {
|
|
13727
|
+
return value;
|
|
13728
|
+
}
|
|
13729
|
+
function IsSchemaObject2(value) {
|
|
13730
|
+
return HasPropertyKey(value, "~kind") || HasPropertyKey(value, "~unsafe");
|
|
13731
|
+
}
|
|
13732
|
+
function FromSchemaObject(value) {
|
|
13733
|
+
const result = {};
|
|
13734
|
+
for (const key of Keys(value)) {
|
|
13735
|
+
if (IsUnsafePropertyKey(key))
|
|
13736
|
+
continue;
|
|
13737
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
13738
|
+
descriptor.value = FromValue2(descriptor.value);
|
|
13739
|
+
if (IsEqual(descriptor.enumerable, true)) {
|
|
13740
|
+
result[key] = descriptor.value;
|
|
13741
|
+
} else {
|
|
13742
|
+
Object.defineProperty(result, key, descriptor);
|
|
13743
|
+
}
|
|
13744
|
+
}
|
|
13745
|
+
return result;
|
|
13746
|
+
}
|
|
13747
|
+
function FromPlainObject(value) {
|
|
13748
|
+
const result = {};
|
|
13749
|
+
for (const key of Keys(value)) {
|
|
13750
|
+
if (IsUnsafePropertyKey(key))
|
|
13751
|
+
continue;
|
|
13752
|
+
result[key] = FromValue2(value[key]);
|
|
13753
|
+
}
|
|
13754
|
+
for (const key of Symbols(value)) {
|
|
13755
|
+
result[key] = FromValue2(value[key]);
|
|
13756
|
+
}
|
|
13757
|
+
return result;
|
|
13758
|
+
}
|
|
13759
|
+
function FromObject10(value) {
|
|
13760
|
+
return IsClassInstance(value) ? FromClassInstance(value) : IsSchemaObject2(value) ? FromSchemaObject(value) : FromPlainObject(value);
|
|
13761
|
+
}
|
|
13762
|
+
function FromArray6(value) {
|
|
13763
|
+
return value.map((element) => FromValue2(element));
|
|
13764
|
+
}
|
|
13765
|
+
function FromTypedArray(value) {
|
|
13766
|
+
return value.slice();
|
|
13767
|
+
}
|
|
13768
|
+
function FromRegExp2(value) {
|
|
13769
|
+
return new RegExp(value.source, value.flags);
|
|
13770
|
+
}
|
|
13771
|
+
function FromMap(value) {
|
|
13772
|
+
return new Map(FromValue2([...value.entries()]));
|
|
13773
|
+
}
|
|
13774
|
+
function FromSet(value) {
|
|
13775
|
+
return new Set(FromValue2([...value.values()]));
|
|
13776
|
+
}
|
|
13777
|
+
function FromValue2(value) {
|
|
13778
|
+
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;
|
|
13779
|
+
}
|
|
13780
|
+
function Deep(value) {
|
|
13781
|
+
return FromValue2(value);
|
|
13782
|
+
}
|
|
13783
|
+
var init_deep = __esm(() => {
|
|
13784
|
+
init_guard2();
|
|
13785
|
+
});
|
|
13786
|
+
|
|
13719
13787
|
// node_modules/typebox/build/value/clone/clone.mjs
|
|
13720
|
-
function
|
|
13721
|
-
return
|
|
13788
|
+
function Clone(value) {
|
|
13789
|
+
return Deep(value);
|
|
13722
13790
|
}
|
|
13723
13791
|
var init_clone2 = __esm(() => {
|
|
13724
|
-
|
|
13792
|
+
init_deep();
|
|
13725
13793
|
});
|
|
13726
13794
|
|
|
13727
13795
|
// node_modules/typebox/build/value/clone/index.mjs
|
|
@@ -13732,7 +13800,7 @@ var init_clone3 = __esm(() => {
|
|
|
13732
13800
|
// node_modules/typebox/build/value/clean/from_union.mjs
|
|
13733
13801
|
function FromUnion9(context, type, value) {
|
|
13734
13802
|
for (const schema of type.anyOf) {
|
|
13735
|
-
const clean = FromType19(context, schema,
|
|
13803
|
+
const clean = FromType19(context, schema, Clone(value));
|
|
13736
13804
|
if (Check2(context, schema, clean))
|
|
13737
13805
|
return clean;
|
|
13738
13806
|
}
|
|
@@ -13746,7 +13814,7 @@ var init_from_union7 = __esm(() => {
|
|
|
13746
13814
|
|
|
13747
13815
|
// node_modules/typebox/build/value/clean/from_type.mjs
|
|
13748
13816
|
function FromType19(context, type, value) {
|
|
13749
|
-
return IsArray2(type) ?
|
|
13817
|
+
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;
|
|
13750
13818
|
}
|
|
13751
13819
|
var init_from_type11 = __esm(() => {
|
|
13752
13820
|
init_type3();
|
|
@@ -13762,12 +13830,7 @@ var init_from_type11 = __esm(() => {
|
|
|
13762
13830
|
|
|
13763
13831
|
// node_modules/typebox/build/value/shared/union_priority_sort.mjs
|
|
13764
13832
|
function Modifiers(type, next) {
|
|
13765
|
-
|
|
13766
|
-
if (HasPropertyKey(next, key))
|
|
13767
|
-
continue;
|
|
13768
|
-
next[key] = type[key];
|
|
13769
|
-
}
|
|
13770
|
-
return next;
|
|
13833
|
+
return Assign(type, next);
|
|
13771
13834
|
}
|
|
13772
13835
|
function FromProperties4(properties) {
|
|
13773
13836
|
const result = {};
|
|
@@ -13794,6 +13857,7 @@ function UnionPrioritySort(type) {
|
|
|
13794
13857
|
}
|
|
13795
13858
|
var init_union_priority_sort = __esm(() => {
|
|
13796
13859
|
init_guard2();
|
|
13860
|
+
init_memory2();
|
|
13797
13861
|
init_type3();
|
|
13798
13862
|
init_type3();
|
|
13799
13863
|
init_type3();
|
|
@@ -14238,7 +14302,7 @@ function FromUnion10(context, type, value) {
|
|
|
14238
14302
|
const matched = type.anyOf.some((type) => Check2(context, type, value));
|
|
14239
14303
|
if (matched)
|
|
14240
14304
|
return value;
|
|
14241
|
-
const candidates = type.anyOf.map((type) => FromType21(context, type,
|
|
14305
|
+
const candidates = type.anyOf.map((type) => FromType21(context, type, Clone(value)));
|
|
14242
14306
|
const selected = candidates.find((value) => Check2(context, type, value));
|
|
14243
14307
|
return IsUndefined(selected) ? value : selected;
|
|
14244
14308
|
}
|
|
@@ -14330,7 +14394,7 @@ var init_from_cyclic8 = __esm(() => {
|
|
|
14330
14394
|
function FromDefault(type, value) {
|
|
14331
14395
|
if (!IsUndefined(value))
|
|
14332
14396
|
return value;
|
|
14333
|
-
return IsFunction(type.default) ? type.default() :
|
|
14397
|
+
return IsFunction(type.default) ? type.default() : Clone(type.default);
|
|
14334
14398
|
}
|
|
14335
14399
|
var init_from_default = __esm(() => {
|
|
14336
14400
|
init_guard2();
|
|
@@ -14430,7 +14494,7 @@ var init_from_tuple7 = __esm(() => {
|
|
|
14430
14494
|
// node_modules/typebox/build/value/default/from_union.mjs
|
|
14431
14495
|
function FromUnion11(context, schema, value) {
|
|
14432
14496
|
for (const inner of schema.anyOf) {
|
|
14433
|
-
const result = FromType22(context, inner,
|
|
14497
|
+
const result = FromType22(context, inner, Clone(value));
|
|
14434
14498
|
if (Check2(context, inner, result)) {
|
|
14435
14499
|
return result;
|
|
14436
14500
|
}
|
|
@@ -14567,7 +14631,7 @@ function NonMatchingInterior(value, interiors) {
|
|
|
14567
14631
|
function Decode5(direction, context, type, value) {
|
|
14568
14632
|
if (IsEqual(type.allOf.length, 0))
|
|
14569
14633
|
return Callback(direction, context, type, value);
|
|
14570
|
-
const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema,
|
|
14634
|
+
const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema, Clone(value))));
|
|
14571
14635
|
const structural = interiors.every((result) => IsObject(result));
|
|
14572
14636
|
const exterior = structural ? MergeInteriors(interiors) : NonMatchingInterior(value, interiors);
|
|
14573
14637
|
return Callback(direction, context, type, exterior);
|
|
@@ -14576,7 +14640,7 @@ function Encode5(direction, context, type, value) {
|
|
|
14576
14640
|
if (IsEqual(type.allOf.length, 0))
|
|
14577
14641
|
return Callback(direction, context, type, value);
|
|
14578
14642
|
const exterior = Callback(direction, context, type, value);
|
|
14579
|
-
const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema,
|
|
14643
|
+
const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema, Clone(exterior))));
|
|
14580
14644
|
const structural = interiors.every((result) => IsObject(result));
|
|
14581
14645
|
if (structural)
|
|
14582
14646
|
return MergeInteriors(interiors);
|
|
@@ -14712,7 +14776,7 @@ function Decode9(direction, context, type, value) {
|
|
|
14712
14776
|
function Encode9(direction, context, type, value) {
|
|
14713
14777
|
const exterior = Callback(direction, context, type, value);
|
|
14714
14778
|
for (const schema of type.anyOf) {
|
|
14715
|
-
const variant = FromType23(direction, context, schema,
|
|
14779
|
+
const variant = FromType23(direction, context, schema, Clone(exterior));
|
|
14716
14780
|
if (!Check2(context, schema, variant))
|
|
14717
14781
|
continue;
|
|
14718
14782
|
return variant;
|
|
@@ -14776,7 +14840,7 @@ var init_decode2 = __esm(() => {
|
|
|
14776
14840
|
}
|
|
14777
14841
|
};
|
|
14778
14842
|
Decoder = Pipeline([
|
|
14779
|
-
(_context, _type, value) =>
|
|
14843
|
+
(_context, _type, value) => Clone(value),
|
|
14780
14844
|
(context, type, value) => Default(context, type, value),
|
|
14781
14845
|
(context, type, value) => Convert(context, type, value),
|
|
14782
14846
|
(context, type, value) => Clean(context, type, value),
|
|
@@ -14814,7 +14878,7 @@ var init_encode2 = __esm(() => {
|
|
|
14814
14878
|
}
|
|
14815
14879
|
};
|
|
14816
14880
|
Encoder = Pipeline([
|
|
14817
|
-
(_context, _type, value) =>
|
|
14881
|
+
(_context, _type, value) => Clone(value),
|
|
14818
14882
|
(context, type, value) => EncodeUnsafe(context, type, value),
|
|
14819
14883
|
(context, type, value) => Default(context, type, value),
|
|
14820
14884
|
(context, type, value) => Convert(context, type, value),
|
|
@@ -15033,7 +15097,7 @@ var init_parse2 = __esm(() => {
|
|
|
15033
15097
|
}
|
|
15034
15098
|
};
|
|
15035
15099
|
Parser = Pipeline([
|
|
15036
|
-
(_context, _type, value) =>
|
|
15100
|
+
(_context, _type, value) => Clone(value),
|
|
15037
15101
|
(context, type, value) => Default(context, type, value),
|
|
15038
15102
|
(context, type, value) => Convert(context, type, value),
|
|
15039
15103
|
(context, type, value) => Clean(context, type, value),
|
|
@@ -16827,7 +16891,7 @@ async function applyDiagnosticFix(fix, options = {}) {
|
|
|
16827
16891
|
throw new Error("Command mode fix requires an explicit property and policy value");
|
|
16828
16892
|
}
|
|
16829
16893
|
const object = decoratorObject(findClass(source, fix.command), "Command");
|
|
16830
|
-
const current =
|
|
16894
|
+
const current = property2(object, fix.property);
|
|
16831
16895
|
if (!current || current.initializer.getText(source) !== fix.expectedExpression) {
|
|
16832
16896
|
throw new Error("Command mode changed since diagnosis; analyze the project again");
|
|
16833
16897
|
}
|
|
@@ -16841,7 +16905,7 @@ async function applyDiagnosticFix(fix, options = {}) {
|
|
|
16841
16905
|
const withImport = importSymbol(source, fix.importPath, fix.symbol);
|
|
16842
16906
|
source = parse5(file, withImport);
|
|
16843
16907
|
const object = unique(moduleObjects(source).filter((candidate) => !fix.targetModule || stringProperty(candidate, "name") === fix.targetModule), "target module");
|
|
16844
|
-
const imports =
|
|
16908
|
+
const imports = property2(object, "imports");
|
|
16845
16909
|
if (imports && !ts13.isArrayLiteralExpression(imports.initializer)) {
|
|
16846
16910
|
throw new Error("Module imports must be a static array");
|
|
16847
16911
|
}
|
|
@@ -16861,7 +16925,7 @@ async function applyDiagnosticFix(fix, options = {}) {
|
|
|
16861
16925
|
}
|
|
16862
16926
|
const command = findClass(source, fix.command);
|
|
16863
16927
|
const object = decoratorObject(command, "Command");
|
|
16864
|
-
const current =
|
|
16928
|
+
const current = property2(object, "permission");
|
|
16865
16929
|
if (current && (!ts13.isStringLiteral(current.initializer) || current.initializer.text !== permission)) {
|
|
16866
16930
|
throw new Error("Command permission already exists with a different value");
|
|
16867
16931
|
}
|
|
@@ -16931,7 +16995,7 @@ function nameOf(name) {
|
|
|
16931
16995
|
return "";
|
|
16932
16996
|
return ts13.isIdentifier(name) || ts13.isStringLiteral(name) || ts13.isNumericLiteral(name) ? name.text : "";
|
|
16933
16997
|
}
|
|
16934
|
-
function
|
|
16998
|
+
function property2(object, key) {
|
|
16935
16999
|
if (object.properties.some((item) => !ts13.isPropertyAssignment(item) || ts13.isComputedPropertyName(item.name))) {
|
|
16936
17000
|
throw new Error("Fix requires explicit static object properties");
|
|
16937
17001
|
}
|
|
@@ -16941,11 +17005,11 @@ function property(object, key) {
|
|
|
16941
17005
|
return values[0];
|
|
16942
17006
|
}
|
|
16943
17007
|
function stringProperty(object, key) {
|
|
16944
|
-
const value =
|
|
17008
|
+
const value = property2(object, key)?.initializer;
|
|
16945
17009
|
return value && ts13.isStringLiteral(value) ? value.text : undefined;
|
|
16946
17010
|
}
|
|
16947
17011
|
function replaceProperty(source, object, key, value) {
|
|
16948
|
-
const previous =
|
|
17012
|
+
const previous = property2(object, key);
|
|
16949
17013
|
const replacement = ts13.factory.createPropertyAssignment(key, value);
|
|
16950
17014
|
const properties = object.properties.map((item) => item === previous ? replacement : item);
|
|
16951
17015
|
if (!previous)
|
|
@@ -25093,10 +25157,10 @@ import { readFileSync as readFileSync4 } from "node:fs";
|
|
|
25093
25157
|
import { resolve as resolve18 } from "node:path";
|
|
25094
25158
|
|
|
25095
25159
|
// src/migration-app-version.ts
|
|
25096
|
-
var MIGRATION_APP_VERSION = "0.
|
|
25160
|
+
var MIGRATION_APP_VERSION = "0.33.0";
|
|
25097
25161
|
|
|
25098
25162
|
// src/migration-elysia-version.ts
|
|
25099
|
-
var MIGRATION_ELYSIA_VERSION = "0.36.
|
|
25163
|
+
var MIGRATION_ELYSIA_VERSION = "0.36.2";
|
|
25100
25164
|
|
|
25101
25165
|
// src/migration-policy.ts
|
|
25102
25166
|
var cachedCompilerVersion;
|
|
@@ -25115,7 +25179,7 @@ function migrationDependencies() {
|
|
|
25115
25179
|
"@supacloud/app": MIGRATION_APP_VERSION,
|
|
25116
25180
|
"@supacloud/compiler": compilerVersion(),
|
|
25117
25181
|
"@supacloud/elysia": MIGRATION_ELYSIA_VERSION,
|
|
25118
|
-
elysia: "2.0.0-
|
|
25182
|
+
elysia: "2.0.0-rc.0",
|
|
25119
25183
|
typescript: "7.0.2"
|
|
25120
25184
|
};
|
|
25121
25185
|
}
|