@supacloud/cli 0.108.2 → 0.109.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/index.js CHANGED
@@ -2812,77 +2812,51 @@ var settings = {
2812
2812
  function Get() {
2813
2813
  return settings;
2814
2814
  }
2815
- // node_modules/typebox/build/system/memory/freeze.mjs
2816
- function Freeze(value) {
2817
- return Get().immutableTypes ? Object.freeze(value) : value;
2815
+ // node_modules/typebox/build/system/memory/keys.mjs
2816
+ function Keys2(value) {
2817
+ return [...Keys(value), ...Symbols(value)];
2818
2818
  }
2819
2819
 
2820
- // node_modules/typebox/build/system/memory/assign.mjs
2821
- function Assign(left, right) {
2822
- Metrics.assign += 1;
2823
- return Freeze({ ...left, ...right });
2824
- }
2825
- // node_modules/typebox/build/system/memory/clone.mjs
2826
- function FromClassInstance(value) {
2827
- return value;
2828
- }
2829
- function IsSchemaObject(value) {
2830
- return HasPropertyKey(value, "~kind") || HasPropertyKey(value, "~unsafe");
2831
- }
2832
- function FromSchemaObject(value) {
2833
- const result = {};
2834
- for (const key of Keys(value)) {
2835
- if (IsUnsafePropertyKey(key))
2836
- continue;
2820
+ // node_modules/typebox/build/system/memory/finalize.mjs
2821
+ function Freeze(value, seen) {
2822
+ if (seen.has(value))
2823
+ return;
2824
+ seen.add(value);
2825
+ for (const key of Keys2(value)) {
2837
2826
  const descriptor = Object.getOwnPropertyDescriptor(value, key);
2838
- descriptor.value = FromValue(descriptor.value);
2839
- if (IsEqual(descriptor.enumerable, true)) {
2840
- result[key] = descriptor.value;
2841
- } else {
2842
- Object.defineProperty(result, key, descriptor);
2843
- }
2827
+ if (!descriptor || !("value" in descriptor))
2828
+ continue;
2829
+ if (IsObject(descriptor.value))
2830
+ Freeze(descriptor.value, seen);
2844
2831
  }
2845
- return result;
2832
+ Object.freeze(value);
2846
2833
  }
2847
- function FromPlainObject(value) {
2848
- const result = {};
2849
- for (const key of Keys(value)) {
2850
- if (IsUnsafePropertyKey(key))
2834
+ function Finalize(value) {
2835
+ if (!Get().immutableTypes)
2836
+ return value;
2837
+ Freeze(value, new WeakSet);
2838
+ return value;
2839
+ }
2840
+
2841
+ // node_modules/typebox/build/system/memory/assign.mjs
2842
+ function Assign(left, right) {
2843
+ Metrics.assign += 1;
2844
+ const result = {}, rightKeys = Keys2(right), leftKeys = Keys2(left);
2845
+ for (const key of leftKeys) {
2846
+ if (rightKeys.includes(key))
2851
2847
  continue;
2852
- result[key] = FromValue(value[key]);
2848
+ Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(left, key));
2853
2849
  }
2854
- for (const key of Symbols(value)) {
2855
- result[key] = FromValue(value[key]);
2850
+ for (const key of rightKeys) {
2851
+ Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(right, key));
2856
2852
  }
2857
- return result;
2858
- }
2859
- function FromObject(value) {
2860
- return IsClassInstance(value) ? FromClassInstance(value) : IsSchemaObject(value) ? FromSchemaObject(value) : FromPlainObject(value);
2861
- }
2862
- function FromArray(value) {
2863
- return value.map((element) => FromValue(element));
2864
- }
2865
- function FromTypedArray(value) {
2866
- return value.slice();
2867
- }
2868
- function FromRegExp(value) {
2869
- return new RegExp(value.source, value.flags);
2870
- }
2871
- function FromMap(value) {
2872
- return new Map(FromValue([...value.entries()]));
2873
- }
2874
- function FromSet(value) {
2875
- return new Set(FromValue([...value.values()]));
2876
- }
2877
- function FromValue(value) {
2878
- 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;
2879
- }
2880
- function Clone(value) {
2881
- Metrics.clone += 1;
2882
- return FromValue(value);
2853
+ return Finalize(result);
2883
2854
  }
2884
2855
  // node_modules/typebox/build/system/memory/create.mjs
2885
- function MergeHidden(left, right) {
2856
+ function WithEnumerable(left, right) {
2857
+ return { ...left, ...right };
2858
+ }
2859
+ function WithHidden(left, right) {
2886
2860
  for (const key of Object.keys(right)) {
2887
2861
  Object.defineProperty(left, key, {
2888
2862
  configurable: true,
@@ -2893,42 +2867,50 @@ function MergeHidden(left, right) {
2893
2867
  }
2894
2868
  return left;
2895
2869
  }
2896
- function Merge(left, right) {
2897
- return { ...left, ...right };
2898
- }
2899
2870
  function Create(hidden, enumerable, options = {}) {
2900
2871
  Metrics.create += 1;
2901
- const withOptions = Merge(enumerable, options);
2902
- const withHidden = Get().enumerableKind ? Merge(withOptions, hidden) : MergeHidden(withOptions, hidden);
2903
- return Freeze(withHidden);
2872
+ const withEnumerable = WithEnumerable(enumerable, options);
2873
+ const withHidden = Get().enumerableKind ? WithEnumerable(withEnumerable, hidden) : WithHidden(withEnumerable, hidden);
2874
+ return Finalize(withHidden);
2904
2875
  }
2905
2876
  // node_modules/typebox/build/system/memory/discard.mjs
2906
2877
  function Discard(value, propertyKeys) {
2907
2878
  Metrics.discard += 1;
2908
2879
  const result = {};
2909
- for (const key of Keys(value)) {
2880
+ for (const key of Keys2(value)) {
2910
2881
  if (propertyKeys.includes(key))
2911
2882
  continue;
2912
2883
  const descriptor = Object.getOwnPropertyDescriptor(value, key);
2913
- descriptor.value = Clone(descriptor.value);
2914
2884
  Object.defineProperty(result, key, descriptor);
2915
2885
  }
2916
- return Freeze(result);
2886
+ return Finalize(result);
2917
2887
  }
2918
2888
  // node_modules/typebox/build/system/memory/update.mjs
2919
- function Update(current, hidden, enumerable) {
2920
- Metrics.update += 1;
2921
- const settings = Get();
2922
- const result = Clone(current);
2923
- for (const key of Object.keys(hidden)) {
2889
+ function WithCurrent(current, hiddenKeys, enumerableKeys, result) {
2890
+ for (const key of Keys2(current)) {
2891
+ if (IsUnsafePropertyKey(key) || hiddenKeys.includes(key) || enumerableKeys.includes(key))
2892
+ continue;
2893
+ const descriptor = Object.getOwnPropertyDescriptor(current, key);
2894
+ Object.defineProperty(result, key, descriptor);
2895
+ }
2896
+ }
2897
+ function WithHidden2(hidden, keys, result) {
2898
+ const enumerableKind = Get().enumerableKind;
2899
+ for (const key of keys) {
2900
+ if (IsUnsafePropertyKey(key))
2901
+ continue;
2924
2902
  Object.defineProperty(result, key, {
2925
2903
  configurable: true,
2926
2904
  writable: true,
2927
- enumerable: settings.enumerableKind,
2905
+ enumerable: enumerableKind,
2928
2906
  value: hidden[key]
2929
2907
  });
2930
2908
  }
2931
- for (const key of Object.keys(enumerable)) {
2909
+ }
2910
+ function WithEnumerable2(enumerable, keys, result) {
2911
+ for (const key of keys) {
2912
+ if (IsUnsafePropertyKey(key))
2913
+ continue;
2932
2914
  Object.defineProperty(result, key, {
2933
2915
  configurable: true,
2934
2916
  enumerable: true,
@@ -2936,7 +2918,14 @@ function Update(current, hidden, enumerable) {
2936
2918
  value: enumerable[key]
2937
2919
  });
2938
2920
  }
2939
- return Freeze(result);
2921
+ }
2922
+ function Update(current, hidden, enumerable) {
2923
+ Metrics.update += 1;
2924
+ const result = {}, hiddenKeys = Keys2(hidden), enumerableKeys = Keys2(enumerable);
2925
+ WithCurrent(current, hiddenKeys, enumerableKeys, result);
2926
+ WithHidden2(hidden, hiddenKeys, result);
2927
+ WithEnumerable2(enumerable, enumerableKeys, result);
2928
+ return Finalize(result);
2940
2929
  }
2941
2930
  // node_modules/typebox/build/type/types/schema.mjs
2942
2931
  function IsKind(value, kind) {
@@ -2955,11 +2944,8 @@ function IsDeferred(value) {
2955
2944
  }
2956
2945
 
2957
2946
  // node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs
2958
- function AddReadonlyOperation(type) {
2959
- return Update(type, { "~readonly": true }, {});
2960
- }
2961
2947
  function AddReadonlyAction(type, options) {
2962
- const result = Update(AddReadonlyOperation(type), {}, options);
2948
+ const result = Update(type, { "~readonly": true }, options);
2963
2949
  return result;
2964
2950
  }
2965
2951
  function AddReadonlyInstantiate(context, state, type, options) {
@@ -2968,11 +2954,8 @@ function AddReadonlyInstantiate(context, state, type, options) {
2968
2954
  }
2969
2955
 
2970
2956
  // node_modules/typebox/build/type/engine/optional/instantiate_add.mjs
2971
- function AddOptionalOperation(type) {
2972
- return Update(type, { "~optional": true }, {});
2973
- }
2974
2957
  function AddOptionalAction(type, options) {
2975
- const result = Update(AddOptionalOperation(type), {}, options);
2958
+ const result = Update(type, { "~optional": true }, options);
2976
2959
  return result;
2977
2960
  }
2978
2961
  function AddOptionalInstantiate(context, state, type, options) {
@@ -3193,20 +3176,28 @@ var ByteMarker = {
3193
3176
  TypeArray: 12,
3194
3177
  Undefined: 13
3195
3178
  };
3196
- var Accumulator = BigInt("14695981039346656037");
3197
- var [Prime, Size] = [BigInt("1099511628211"), BigInt("18446744073709551616")];
3198
- var Bytes = Array.from({ length: 256 }).map((_, i) => BigInt(i));
3179
+ var A0 = 8997;
3180
+ var A1 = 33826;
3181
+ var A2 = 40164;
3182
+ var A3 = 52210;
3199
3183
  var F64 = new Float64Array(1);
3200
3184
  var F64In = new DataView(F64.buffer);
3201
3185
  var F64Out = new Uint8Array(F64.buffer);
3202
3186
  function FNV1A64_OP(byte) {
3203
- Accumulator = Accumulator ^ Bytes[byte];
3204
- Accumulator = Accumulator * Prime % Size;
3187
+ const L0 = A0 ^ byte;
3188
+ const T0 = L0 * 435;
3189
+ const T1 = A1 * 435 + (T0 >>> 16);
3190
+ const T2 = A2 * 435 + (T1 >>> 16) + (L0 << 8);
3191
+ const T3 = A3 * 435 + (T2 >>> 16) + (A1 << 8);
3192
+ A0 = T0 & 65535;
3193
+ A1 = T1 & 65535;
3194
+ A2 = T2 & 65535;
3195
+ A3 = T3 & 65535;
3205
3196
  }
3206
- function FromArray2(value) {
3197
+ function FromArray(value) {
3207
3198
  FNV1A64_OP(ByteMarker.Array);
3208
3199
  for (const item of value) {
3209
- FromValue2(item);
3200
+ FromValue(item);
3210
3201
  }
3211
3202
  }
3212
3203
  function FromBigInt(value) {
@@ -3222,15 +3213,15 @@ function FromBoolean(value) {
3222
3213
  }
3223
3214
  function FromConstructor(value) {
3224
3215
  FNV1A64_OP(ByteMarker.Constructor);
3225
- FromValue2(value.toString());
3216
+ FromValue(value.toString());
3226
3217
  }
3227
3218
  function FromDate(value) {
3228
3219
  FNV1A64_OP(ByteMarker.Date);
3229
- FromValue2(value.getTime());
3220
+ FromValue(value.getTime());
3230
3221
  }
3231
3222
  function FromFunction(value) {
3232
3223
  FNV1A64_OP(ByteMarker.Function);
3233
- FromValue2(value.toString());
3224
+ FromValue(value.toString());
3234
3225
  }
3235
3226
  function FromNull(_value) {
3236
3227
  FNV1A64_OP(ByteMarker.Null);
@@ -3242,27 +3233,34 @@ function FromNumber(value) {
3242
3233
  FNV1A64_OP(byte);
3243
3234
  }
3244
3235
  }
3245
- function FromObject2(value) {
3236
+ function FromObject(value) {
3246
3237
  FNV1A64_OP(ByteMarker.Object);
3247
3238
  for (const key of InstanceKeys(value).sort()) {
3248
- FromValue2(key);
3249
- FromValue2(value[key]);
3239
+ FromValue(key);
3240
+ FromValue(value[key]);
3250
3241
  }
3251
3242
  }
3252
- function FromRegExp2(value) {
3243
+ function FromRegExp(value) {
3253
3244
  FNV1A64_OP(ByteMarker.RegExp);
3254
3245
  FromString(value.toString());
3255
3246
  }
3256
3247
  var encoder = new TextEncoder;
3257
3248
  function FromString(value) {
3258
3249
  FNV1A64_OP(ByteMarker.String);
3259
- for (const byte of encoder.encode(value)) {
3260
- FNV1A64_OP(byte);
3250
+ for (let i = 0;i < value.length; i++) {
3251
+ const code = value.charCodeAt(i);
3252
+ if (code > 127) {
3253
+ for (const byte of encoder.encode(value.slice(i))) {
3254
+ FNV1A64_OP(byte);
3255
+ }
3256
+ return;
3257
+ }
3258
+ FNV1A64_OP(code);
3261
3259
  }
3262
3260
  }
3263
3261
  function FromSymbol(value) {
3264
3262
  FNV1A64_OP(ByteMarker.Symbol);
3265
- FromValue2(value.toString());
3263
+ FromValue(value.toString());
3266
3264
  }
3267
3265
  function FromTypeArray(value) {
3268
3266
  FNV1A64_OP(ByteMarker.TypeArray);
@@ -3274,16 +3272,16 @@ function FromTypeArray(value) {
3274
3272
  function FromUndefined(_value) {
3275
3273
  return FNV1A64_OP(ByteMarker.Undefined);
3276
3274
  }
3277
- function FromValue2(value) {
3278
- return IsTypeArray(value) ? FromTypeArray(value) : IsDate(value) ? FromDate(value) : IsRegExp(value) ? FromRegExp2(value) : IsBoolean2(value) ? FromBoolean(value.valueOf()) : IsString2(value) ? FromString(value.valueOf()) : IsNumber2(value) ? FromNumber(value.valueOf()) : IsIEEE754(value) ? FromNumber(value) : IsArray(value) ? FromArray2(value) : IsBoolean(value) ? FromBoolean(value) : IsBigInt(value) ? FromBigInt(value) : IsConstructor(value) ? FromConstructor(value) : IsNull(value) ? FromNull(value) : IsObject(value) ? FromObject2(value) : IsString(value) ? FromString(value) : IsSymbol(value) ? FromSymbol(value) : IsUndefined(value) ? FromUndefined(value) : IsFunction(value) ? FromFunction(value) : Unreachable();
3275
+ function FromValue(value) {
3276
+ 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();
3279
3277
  }
3280
- function HashCode(value) {
3281
- Accumulator = BigInt("14695981039346656037");
3282
- FromValue2(value);
3283
- return Accumulator;
3278
+ function Hex(limb) {
3279
+ return limb.toString(16).padStart(4, "0");
3284
3280
  }
3285
3281
  function Hash(value) {
3286
- return HashCode(value).toString(16).padStart(16, "0");
3282
+ A0 = 8997, A1 = 33826, A2 = 40164, A3 = 52210;
3283
+ FromValue(value);
3284
+ return `${Hex(A3)}${Hex(A2)}${Hex(A1)}${Hex(A0)}`;
3287
3285
  }
3288
3286
  // node_modules/typebox/build/system/locale/en_US.mjs
3289
3287
  function en_US(error) {
@@ -3610,22 +3608,17 @@ function TupleOptions(type) {
3610
3608
  return Discard(type, ["~kind", "type", "items", "minItems", "additionalItems"]);
3611
3609
  }
3612
3610
 
3613
- // node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs
3614
- function RemoveReadonlyOperation(type) {
3615
- return Discard(type, ["~readonly"]);
3616
- }
3617
- function RemoveReadonlyAction(type, options) {
3618
- const result = Update(RemoveReadonlyOperation(type), {}, options);
3611
+ // node_modules/typebox/build/type/engine/tuple/to_object.mjs
3612
+ function TupleElementsToProperties(types) {
3613
+ const result = types.reduceRight((result, right, index) => {
3614
+ return { [index]: right, ...result };
3615
+ }, {});
3619
3616
  return result;
3620
3617
  }
3621
- function RemoveReadonlyInstantiate(context, state, type, options) {
3622
- const instantiatedType = InstantiateType(context, state, type);
3623
- return RemoveReadonlyAction(instantiatedType, options);
3624
- }
3625
-
3626
- // node_modules/typebox/build/type/action/_remove_readonly.mjs
3627
- function RemoveReadonly(type, options = {}) {
3628
- return RemoveReadonlyAction(type, options);
3618
+ function TupleToObject(type) {
3619
+ const properties = TupleElementsToProperties(type.items);
3620
+ const result = _Object_(properties);
3621
+ return result;
3629
3622
  }
3630
3623
 
3631
3624
  // node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs
@@ -3641,43 +3634,39 @@ function RemoveOptionalInstantiate(context, state, type, options) {
3641
3634
  return RemoveOptionalAction(instantiatedType, options);
3642
3635
  }
3643
3636
 
3644
- // node_modules/typebox/build/type/action/_remove_optional.mjs
3645
- function RemoveOptional(type, options = {}) {
3646
- return RemoveOptionalAction(type, options);
3637
+ // node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs
3638
+ function RemoveReadonlyOperation(type) {
3639
+ return Discard(type, ["~readonly"]);
3647
3640
  }
3648
-
3649
- // node_modules/typebox/build/type/engine/tuple/to_object.mjs
3650
- function TupleElementsToProperties(types) {
3651
- const result = types.reduceRight((result, right, index) => {
3652
- return { [index]: right, ...result };
3653
- }, {});
3641
+ function RemoveReadonlyAction(type, options) {
3642
+ const result = Update(RemoveReadonlyOperation(type), {}, options);
3654
3643
  return result;
3655
3644
  }
3656
- function TupleToObject(type) {
3657
- const properties = TupleElementsToProperties(type.items);
3658
- const result = _Object_(properties);
3659
- return result;
3645
+ function RemoveReadonlyInstantiate(context, state, type, options) {
3646
+ const instantiatedType = InstantiateType(context, state, type);
3647
+ return RemoveReadonlyAction(instantiatedType, options);
3660
3648
  }
3661
3649
 
3662
- // node_modules/typebox/build/type/engine/evaluate/composite.mjs
3663
- function CanComposite(type) {
3664
- return IsObject2(type) || IsTuple(type);
3665
- }
3666
- function IsReadonlyProperty(left, right) {
3667
- return IsReadonly(left) ? IsReadonly(right) ? true : false : false;
3668
- }
3669
- function IsOptionalProperty(left, right) {
3670
- return IsOptional(left) ? IsOptional(right) ? true : false : false;
3671
- }
3672
- function CompositeProperty(left, right) {
3673
- const isReadonly = IsReadonlyProperty(left, right);
3674
- const isOptional = IsOptionalProperty(left, right);
3650
+ // node_modules/typebox/build/type/engine/evaluate/property.mjs
3651
+ function EvaluatePropertyIntersect(left, right) {
3652
+ const isReadonly = IsReadonly(left) && IsReadonly(right);
3653
+ const isOptional = IsOptional(left) && IsOptional(right);
3675
3654
  const evaluated = EvaluateIntersect([left, right]);
3676
- const property = RemoveReadonly(RemoveOptional(evaluated));
3677
- return isReadonly && isOptional ? AddReadonly(AddOptional(property)) : isReadonly && !isOptional ? AddReadonly(property) : !isReadonly && isOptional ? AddOptional(property) : property;
3655
+ const property = RemoveReadonlyAction(RemoveOptionalAction(evaluated, {}), {});
3656
+ return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
3657
+ }
3658
+ function EvaluatePropertyUnion(left, right) {
3659
+ const isReadonly = IsReadonly(left) || IsReadonly(right);
3660
+ const isOptional = IsOptional(left) || IsOptional(right);
3661
+ const leftProperty = RemoveReadonlyAction(RemoveOptionalAction(left, {}), {});
3662
+ const rightProperty = RemoveReadonlyAction(RemoveOptionalAction(right, {}), {});
3663
+ const property = EvaluateUnion([leftProperty, rightProperty]);
3664
+ return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
3678
3665
  }
3666
+
3667
+ // node_modules/typebox/build/type/engine/evaluate/composite.mjs
3679
3668
  function CompositePropertyKey(left, right, key) {
3680
- return key in left ? key in right ? CompositeProperty(left[key], right[key]) : left[key] : (key in right) ? right[key] : Never();
3669
+ return key in left ? key in right ? EvaluatePropertyIntersect(left[key], right[key]) : left[key] : (key in right) ? right[key] : Never();
3681
3670
  }
3682
3671
  function CompositeProperties(left, right) {
3683
3672
  const keys = new Set([...Keys(left), ...Keys(right)]);
@@ -3703,6 +3692,9 @@ function NarrowCompareRule(left, right) {
3703
3692
  const result = Compare(left, right);
3704
3693
  return IsEqual(result, CompareResultLeftInside) ? left : IsEqual(result, CompareResultRightInside) ? right : IsEqual(result, CompareResultEqual) ? right : Never();
3705
3694
  }
3695
+ function CanComposite(type) {
3696
+ return IsObject2(type) || IsTuple(type);
3697
+ }
3706
3698
  function NarrowCompositeRule(left, right) {
3707
3699
  const canCompositeLeft = CanComposite(left);
3708
3700
  const canCompositeRight = CanComposite(right);
@@ -4373,14 +4365,14 @@ function ExtendsObject(inferred, left, right) {
4373
4365
  }
4374
4366
 
4375
4367
  // node_modules/typebox/build/type/extends/record.mjs
4376
- function FromObject3(inferred, properties) {
4368
+ function FromObject2(inferred, properties) {
4377
4369
  return IsEqual(Keys(properties).length, 0) ? ExtendsTrue(inferred) : ExtendsFalse();
4378
4370
  }
4379
4371
  function FromRecord(inferred, _leftKey, leftValue, _rightKey, rightValue) {
4380
4372
  return ExtendsLeft(inferred, leftValue, rightValue);
4381
4373
  }
4382
4374
  function ExtendsRecord(inferred, leftPattern, leftValue, right) {
4383
- return IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) : IsObject2(right) ? FromObject3(inferred, right.properties) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
4375
+ 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();
4384
4376
  }
4385
4377
 
4386
4378
  // node_modules/typebox/build/type/extends/string.mjs
@@ -5042,7 +5034,7 @@ function CollapseIntersectProperties(left, right) {
5042
5034
  const sharedKeys = Keys(left).filter((key) => HasPropertyKey(right, key));
5043
5035
  const leftProperties = leftKeys.reduce((result, key) => ({ ...result, [key]: left[key] }), {});
5044
5036
  const rightProperties = rightKeys.reduce((result, key) => ({ ...result, [key]: right[key] }), {});
5045
- const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]: EvaluateIntersect([left[key], right[key]]) }), {});
5037
+ const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]: EvaluatePropertyIntersect(left[key], right[key]) }), {});
5046
5038
  const unique = Assign(leftProperties, rightProperties);
5047
5039
  const shared = Assign(unique, sharedProperties);
5048
5040
  return shared;
@@ -5054,7 +5046,7 @@ function FromIntersect(types) {
5054
5046
  }
5055
5047
 
5056
5048
  // node_modules/typebox/build/type/engine/object/from_object.mjs
5057
- function FromObject4(properties) {
5049
+ function FromObject3(properties) {
5058
5050
  return properties;
5059
5051
  }
5060
5052
 
@@ -5069,7 +5061,7 @@ function FromTuple(types) {
5069
5061
  function CollapseUnionProperties(left, right) {
5070
5062
  const sharedKeys = Keys(left).filter((key) => (key in right));
5071
5063
  const result = sharedKeys.reduce((result, key) => {
5072
- return { ...result, [key]: EvaluateUnion([left[key], right[key]]) };
5064
+ return { ...result, [key]: EvaluatePropertyUnion(left[key], right[key]) };
5073
5065
  }, {});
5074
5066
  return result;
5075
5067
  }
@@ -5082,7 +5074,7 @@ function FromUnion3(types) {
5082
5074
 
5083
5075
  // node_modules/typebox/build/type/engine/object/from_type.mjs
5084
5076
  function FromType8(type) {
5085
- 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) ? FromObject4(type.properties) : {};
5077
+ 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) : {};
5086
5078
  }
5087
5079
 
5088
5080
  // node_modules/typebox/build/type/engine/object/collapse.mjs
@@ -5108,7 +5100,7 @@ function NormalizeIndexerTypes(types) {
5108
5100
  function NormalizeIndexer(type) {
5109
5101
  return IsIntersect(type) ? Intersect(NormalizeIndexerTypes(type.allOf)) : IsUnion(type) ? Union(NormalizeIndexerTypes(type.anyOf)) : IsLiteral(type) ? NormalizeLiteral(type.const) : type;
5110
5102
  }
5111
- function FromArray3(type, indexer) {
5103
+ function FromArray2(type, indexer) {
5112
5104
  const normalizedIndexer = NormalizeIndexer(indexer);
5113
5105
  const check = Extends({}, normalizedIndexer, Number2());
5114
5106
  const result = IsExtendsTrueLike(check) ? type : IsLiteral(indexer) && IsEqual(indexer.const, "length") ? Number2() : Never();
@@ -5215,7 +5207,7 @@ function FromIndexerNumber(properties) {
5215
5207
  const result = EvaluateUnion(variants);
5216
5208
  return result;
5217
5209
  }
5218
- function FromObject5(properties, indexer) {
5210
+ function FromObject4(properties, indexer) {
5219
5211
  const result = IsNumber3(indexer) ? FromIndexerNumber(properties) : FromIndexer(properties, indexer);
5220
5212
  return result;
5221
5213
  }
@@ -5252,7 +5244,7 @@ function FromTuple2(types, indexer) {
5252
5244
 
5253
5245
  // node_modules/typebox/build/type/engine/indexed/from_type.mjs
5254
5246
  function FromType11(type, indexer) {
5255
- return IsArray2(type) ? FromArray3(type.items, indexer) : IsObject2(type) ? FromObject5(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
5247
+ return IsArray2(type) ? FromArray2(type.items, indexer) : IsObject2(type) ? FromObject4(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
5256
5248
  }
5257
5249
 
5258
5250
  // node_modules/typebox/build/type/engine/indexed/instantiate.mjs
@@ -5299,7 +5291,7 @@ function FromAny() {
5299
5291
  }
5300
5292
 
5301
5293
  // node_modules/typebox/build/type/engine/keyof/from_array.mjs
5302
- function FromArray4(_type) {
5294
+ function FromArray3(_type) {
5303
5295
  return Number2();
5304
5296
  }
5305
5297
 
@@ -5310,7 +5302,7 @@ function FromPropertyKeys(keys) {
5310
5302
  }, []);
5311
5303
  return result;
5312
5304
  }
5313
- function FromObject6(properties) {
5305
+ function FromObject5(properties) {
5314
5306
  const propertyKeys = Keys(properties);
5315
5307
  const variants = FromPropertyKeys(propertyKeys);
5316
5308
  const result = EvaluateUnionFast(variants);
@@ -5330,7 +5322,7 @@ function FromTuple3(types) {
5330
5322
 
5331
5323
  // node_modules/typebox/build/type/engine/keyof/from_type.mjs
5332
5324
  function FromType12(type) {
5333
- return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray4(type.items) : IsObject2(type) ? FromObject6(type.properties) : IsRecord(type) ? FromRecord2(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
5325
+ return IsAny(type) ? FromAny() : IsArray2(type) ? FromArray3(type.items) : IsObject2(type) ? FromObject5(type.properties) : IsRecord(type) ? FromRecord2(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
5334
5326
  }
5335
5327
 
5336
5328
  // node_modules/typebox/build/type/engine/keyof/instantiate.mjs
@@ -5562,7 +5554,7 @@ function FromUnion6(types) {
5562
5554
  }
5563
5555
 
5564
5556
  // node_modules/typebox/build/type/engine/partial/from_object.mjs
5565
- function FromObject7(properties) {
5557
+ function FromObject6(properties) {
5566
5558
  const mapped = Keys(properties).reduce((result, left) => {
5567
5559
  return { ...result, [left]: AddOptional(properties[left]) };
5568
5560
  }, {});
@@ -5572,7 +5564,7 @@ function FromObject7(properties) {
5572
5564
 
5573
5565
  // node_modules/typebox/build/type/engine/partial/from_type.mjs
5574
5566
  function FromType15(type) {
5575
- 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) ? FromObject7(type.properties) : _Object_({});
5567
+ 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_({});
5576
5568
  }
5577
5569
 
5578
5570
  // node_modules/typebox/build/type/engine/partial/instantiate.mjs
@@ -5622,7 +5614,7 @@ function ReadonlyObjectDeferred(type, options = {}) {
5622
5614
  }
5623
5615
 
5624
5616
  // node_modules/typebox/build/type/engine/readonly_object/from_array.mjs
5625
- function FromArray5(type) {
5617
+ function FromArray4(type) {
5626
5618
  const result = AddImmutable(_Array_(type));
5627
5619
  return result;
5628
5620
  }
@@ -5650,7 +5642,7 @@ function FromIntersect4(types) {
5650
5642
  }
5651
5643
 
5652
5644
  // node_modules/typebox/build/type/engine/readonly_object/from_object.mjs
5653
- function FromObject8(properties) {
5645
+ function FromObject7(properties) {
5654
5646
  const mapped = Keys(properties).reduce((result, left) => {
5655
5647
  return { ...result, [left]: AddReadonly(properties[left]) };
5656
5648
  }, {});
@@ -5672,7 +5664,7 @@ function FromUnion7(types) {
5672
5664
 
5673
5665
  // node_modules/typebox/build/type/engine/readonly_object/from_type.mjs
5674
5666
  function FromType17(type) {
5675
- return IsArray2(type) ? FromArray5(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) ? FromObject8(type.properties) : IsTuple(type) ? FromTuple4(type.items) : IsUnion(type) ? FromUnion7(type.anyOf) : type;
5667
+ 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;
5676
5668
  }
5677
5669
 
5678
5670
  // node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs
@@ -5718,8 +5710,13 @@ function FromUnion8(types) {
5718
5710
  return Union(result);
5719
5711
  }
5720
5712
 
5713
+ // node_modules/typebox/build/type/action/_remove_optional.mjs
5714
+ function RemoveOptional(type, options = {}) {
5715
+ return RemoveOptionalAction(type, options);
5716
+ }
5717
+
5721
5718
  // node_modules/typebox/build/type/engine/required/from_object.mjs
5722
- function FromObject9(properties) {
5719
+ function FromObject8(properties) {
5723
5720
  const mapped = Keys(properties).reduce((result, left) => {
5724
5721
  return { ...result, [left]: RemoveOptional(properties[left]) };
5725
5722
  }, {});
@@ -5729,7 +5726,7 @@ function FromObject9(properties) {
5729
5726
 
5730
5727
  // node_modules/typebox/build/type/engine/required/from_type.mjs
5731
5728
  function FromType18(type) {
5732
- 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) ? FromObject9(type.properties) : _Object_({});
5729
+ 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_({});
5733
5730
  }
5734
5731
 
5735
5732
  // node_modules/typebox/build/type/action/required.mjs
@@ -5837,11 +5834,8 @@ function Instantiate(context, type) {
5837
5834
  }
5838
5835
 
5839
5836
  // node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs
5840
- function AddImmutableOperation(type) {
5841
- return Update(type, { "~immutable": true }, {});
5842
- }
5843
5837
  function AddImmutableAction(type, options) {
5844
- const result = Update(AddImmutableOperation(type), {}, options);
5838
+ const result = Update(type, { "~immutable": true }, options);
5845
5839
  return result;
5846
5840
  }
5847
5841
  function AddImmutableInstantiate(context, state, type, options) {
@@ -5877,14 +5871,14 @@ function IsRefine2(value) {
5877
5871
  return HasPropertyKey(value, "~refine") && IsArray(value["~refine"]) && Every(value["~refine"], 0, (value) => IsObject(value) && HasPropertyKey(value, "check") && HasPropertyKey(value, "error") && IsFunction(value.check) && IsFunction(value.error));
5878
5872
  }
5879
5873
  // node_modules/typebox/build/schema/types/schema.mjs
5880
- function IsSchemaObject2(value) {
5874
+ function IsSchemaObject(value) {
5881
5875
  return IsObject(value) && !IsArray(value);
5882
5876
  }
5883
5877
  function IsSchemaBoolean(value) {
5884
5878
  return IsBoolean(value);
5885
5879
  }
5886
5880
  function IsSchema2(value) {
5887
- return IsSchemaObject2(value) || IsSchemaBoolean(value);
5881
+ return IsSchemaObject(value) || IsSchemaBoolean(value);
5888
5882
  }
5889
5883
 
5890
5884
  // node_modules/typebox/build/schema/types/additionalItems.mjs
@@ -6169,7 +6163,7 @@ function NextUri(ref, base) {
6169
6163
  return URL.canParse(ref, base) ? new URL(ref, base) : IsEqual(base, DefaultUri) ? new URL(`${base}:${ref}`) : new URL(`${base.slice(0, base.lastIndexOf(":"))}:${ref}`);
6170
6164
  }
6171
6165
  function Stack(context, schema) {
6172
- const base = IsSchemaObject2(schema) && IsId(schema) ? NextUri(schema.$id, DefaultUri).href : DefaultUri;
6166
+ const base = IsSchemaObject(schema) && IsId(schema) ? NextUri(schema.$id, DefaultUri).href : DefaultUri;
6173
6167
  return {
6174
6168
  context,
6175
6169
  schema,
@@ -6191,7 +6185,7 @@ function RegisterResourceAnchors(anchors, schema, isRoot = true) {
6191
6185
  return anchors;
6192
6186
  if (Array.isArray(schema))
6193
6187
  return schema.reduce((result, item) => RegisterResourceAnchors(result, item, false), anchors);
6194
- if (!IsSchemaObject2(schema))
6188
+ if (!IsSchemaObject(schema))
6195
6189
  return anchors;
6196
6190
  if (!isRoot && IsId(schema))
6197
6191
  return anchors;
@@ -6247,7 +6241,7 @@ function NextLexicalSchema(stack, schema) {
6247
6241
  return IsId(schema) ? schema : stack.lexicalSchema;
6248
6242
  }
6249
6243
  function HasStackKeywords(stack, schema) {
6250
- return IsSchemaObject2(schema) && (IsId(schema) || IsDynamicAnchor(schema) || IsUndefined(stack.recursiveAnchor) && IsRecursiveAnchorTrue(schema) || !IsUndefined(ResourceEntry(stack, schema)));
6244
+ return IsSchemaObject(schema) && (IsId(schema) || IsDynamicAnchor(schema) || IsUndefined(stack.recursiveAnchor) && IsRecursiveAnchorTrue(schema) || !IsUndefined(ResourceEntry(stack, schema)));
6251
6245
  }
6252
6246
  function NextStack(stack, schema) {
6253
6247
  return HasStackKeywords(stack, schema) ? {
@@ -6476,7 +6470,7 @@ function Get3(value, pointer) {
6476
6470
  }
6477
6471
  // node_modules/typebox/build/schema/resolve/resolve.mjs
6478
6472
  function RelativeBase(schema, base) {
6479
- return IsSchemaObject2(schema) && IsId(schema) ? NextUri(schema.$id, base.href) : base;
6473
+ return IsSchemaObject(schema) && IsId(schema) ? NextUri(schema.$id, base.href) : base;
6480
6474
  }
6481
6475
  function AbsoluteBase(base) {
6482
6476
  return NextUri(base, DefaultUri);
@@ -6561,7 +6555,7 @@ function MatchWithDynamicAnchor(schema, base, ref) {
6561
6555
  return isMatch ? schema : undefined;
6562
6556
  }
6563
6557
  function MatchSchemaObject(schema, base, ref) {
6564
- if (!IsSchemaObject2(schema))
6558
+ if (!IsSchemaObject(schema))
6565
6559
  return;
6566
6560
  return MatchWithId(schema, base, ref) ?? MatchWithAnchor(schema, base, ref) ?? MatchWithDynamicAnchor(schema, base, ref) ?? MatchWithHash(schema, ref);
6567
6561
  }
@@ -6589,12 +6583,12 @@ function Match4(schema, base, ref) {
6589
6583
  }
6590
6584
  function Resource(context, schema, base, ref) {
6591
6585
  const result = RefInternal(context, schema, base, ref);
6592
- return IsSchemaObject2(result) && IsId(result) ? result : undefined;
6586
+ return IsSchemaObject(result) && IsId(result) ? result : undefined;
6593
6587
  }
6594
6588
  function FindDeferredResourceLegacy(stack, ref, schema) {
6595
6589
  if (!ref.$ref.startsWith("#"))
6596
6590
  return;
6597
- if (!IsSchemaObject2(stack.schema) || HasPropertyKey(stack.schema, "$schema"))
6591
+ if (!IsSchemaObject(stack.schema) || HasPropertyKey(stack.schema, "$schema"))
6598
6592
  return;
6599
6593
  const targetBase = Base(stack.lexicalSchema, stack.referenceBase, schema);
6600
6594
  if (IsUndefined(targetBase) || IsEqual(targetBase, stack.referenceBase))
@@ -6603,7 +6597,7 @@ function FindDeferredResourceLegacy(stack, ref, schema) {
6603
6597
  }
6604
6598
  function FindDeferredResourceModern(stack, canonical, schema) {
6605
6599
  const remoteRoot = stack.context[canonical];
6606
- if (!IsSchemaObject2(remoteRoot))
6600
+ if (!IsSchemaObject(remoteRoot))
6607
6601
  return;
6608
6602
  return { target: schema, base: canonical, root: remoteRoot };
6609
6603
  }
@@ -6665,10 +6659,10 @@ function RefResultNotFound(stack, schema) {
6665
6659
  }
6666
6660
  function Ref2(stack, ref) {
6667
6661
  const schema = RefInternal(stack.context, RefRoot(stack, ref), stack.referenceBase, ref.$ref);
6668
- return IsSchemaObject2(schema) ? RefResultFound(stack, ref, schema) : RefResultNotFound(stack, schema);
6662
+ return IsSchemaObject(schema) ? RefResultFound(stack, ref, schema) : RefResultNotFound(stack, schema);
6669
6663
  }
6670
6664
  function IsRecursiveAnchorInScope(stack) {
6671
- return IsSchemaObject2(stack.lexicalSchema) && IsRecursiveAnchorTrue(stack.lexicalSchema);
6665
+ return IsSchemaObject(stack.lexicalSchema) && IsRecursiveAnchorTrue(stack.lexicalSchema);
6672
6666
  }
6673
6667
  function RecursiveRef(stack, recursiveRef) {
6674
6668
  const schema = IsRecursiveAnchorInScope(stack) ? stack.recursiveAnchor : stack.lexicalSchema;
@@ -6681,7 +6675,7 @@ function FindScopedDynamicAnchor(stack, name) {
6681
6675
  return stack.dynamicAnchors.find((anchor) => IsEqual(anchor.$dynamicAnchor, name)) ?? SearchDynamicAnchor(stack.schema, name);
6682
6676
  }
6683
6677
  function DynamicRefWhenFound(stack, dynamicRef, fragmentTarget) {
6684
- if (!IsSchemaObject2(fragmentTarget) || !IsDynamicAnchor(fragmentTarget))
6678
+ if (!IsSchemaObject(fragmentTarget) || !IsDynamicAnchor(fragmentTarget))
6685
6679
  return fragmentTarget;
6686
6680
  const fragment = DynamicRefFragment(stack, dynamicRef);
6687
6681
  return IsPointerFragment(fragment) ? fragmentTarget : FindScopedDynamicAnchor(stack, fragmentTarget.$dynamicAnchor);
@@ -7762,7 +7756,7 @@ class AssertError extends Error {
7762
7756
  }
7763
7757
  }
7764
7758
  // node_modules/typebox/build/value/clean/from_array.mjs
7765
- function FromArray6(context, type, value) {
7759
+ function FromArray5(context, type, value) {
7766
7760
  if (!IsArray(value))
7767
7761
  return value;
7768
7762
  return value.map((value) => FromType19(context, type.items, value));
@@ -7792,7 +7786,7 @@ function GetAdditionalProperties(type) {
7792
7786
  }
7793
7787
 
7794
7788
  // node_modules/typebox/build/value/clean/from_object.mjs
7795
- function FromObject10(context, type, value) {
7789
+ function FromObject9(context, type, value) {
7796
7790
  if (!IsObject(value) || IsArray(value))
7797
7791
  return value;
7798
7792
  const additionalProperties = GetAdditionalProperties(type);
@@ -7848,14 +7842,73 @@ function FromTuple5(context, schema, value) {
7848
7842
  return IsGreaterThan(value.length, length) ? value.slice(0, length) : value;
7849
7843
  }
7850
7844
 
7845
+ // node_modules/typebox/build/system/memory/deep.mjs
7846
+ function FromClassInstance(value) {
7847
+ return value;
7848
+ }
7849
+ function IsSchemaObject2(value) {
7850
+ return HasPropertyKey(value, "~kind") || HasPropertyKey(value, "~unsafe");
7851
+ }
7852
+ function FromSchemaObject(value) {
7853
+ const result = {};
7854
+ for (const key of Keys(value)) {
7855
+ if (IsUnsafePropertyKey(key))
7856
+ continue;
7857
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
7858
+ descriptor.value = FromValue2(descriptor.value);
7859
+ if (IsEqual(descriptor.enumerable, true)) {
7860
+ result[key] = descriptor.value;
7861
+ } else {
7862
+ Object.defineProperty(result, key, descriptor);
7863
+ }
7864
+ }
7865
+ return result;
7866
+ }
7867
+ function FromPlainObject(value) {
7868
+ const result = {};
7869
+ for (const key of Keys(value)) {
7870
+ if (IsUnsafePropertyKey(key))
7871
+ continue;
7872
+ result[key] = FromValue2(value[key]);
7873
+ }
7874
+ for (const key of Symbols(value)) {
7875
+ result[key] = FromValue2(value[key]);
7876
+ }
7877
+ return result;
7878
+ }
7879
+ function FromObject10(value) {
7880
+ return IsClassInstance(value) ? FromClassInstance(value) : IsSchemaObject2(value) ? FromSchemaObject(value) : FromPlainObject(value);
7881
+ }
7882
+ function FromArray6(value) {
7883
+ return value.map((element) => FromValue2(element));
7884
+ }
7885
+ function FromTypedArray(value) {
7886
+ return value.slice();
7887
+ }
7888
+ function FromRegExp2(value) {
7889
+ return new RegExp(value.source, value.flags);
7890
+ }
7891
+ function FromMap(value) {
7892
+ return new Map(FromValue2([...value.entries()]));
7893
+ }
7894
+ function FromSet(value) {
7895
+ return new Set(FromValue2([...value.values()]));
7896
+ }
7897
+ function FromValue2(value) {
7898
+ 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;
7899
+ }
7900
+ function Deep(value) {
7901
+ return FromValue2(value);
7902
+ }
7903
+
7851
7904
  // node_modules/typebox/build/value/clone/clone.mjs
7852
- function Clone2(value) {
7853
- return Clone(value);
7905
+ function Clone(value) {
7906
+ return Deep(value);
7854
7907
  }
7855
7908
  // node_modules/typebox/build/value/clean/from_union.mjs
7856
7909
  function FromUnion9(context, type, value) {
7857
7910
  for (const schema of type.anyOf) {
7858
- const clean = FromType19(context, schema, Clone2(value));
7911
+ const clean = FromType19(context, schema, Clone(value));
7859
7912
  if (Check2(context, schema, clean))
7860
7913
  return clean;
7861
7914
  }
@@ -7864,17 +7917,12 @@ function FromUnion9(context, type, value) {
7864
7917
 
7865
7918
  // node_modules/typebox/build/value/clean/from_type.mjs
7866
7919
  function FromType19(context, type, value) {
7867
- return IsArray2(type) ? FromArray6(context, type, value) : IsCyclic(type) ? FromCyclic6(context, type, value) : IsIntersect(type) ? FromIntersect6(context, type, value) : IsObject2(type) ? FromObject10(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;
7920
+ 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;
7868
7921
  }
7869
7922
 
7870
7923
  // node_modules/typebox/build/value/shared/union_priority_sort.mjs
7871
7924
  function Modifiers(type, next) {
7872
- for (const key of Keys(type)) {
7873
- if (HasPropertyKey(next, key))
7874
- continue;
7875
- next[key] = type[key];
7876
- }
7877
- return next;
7925
+ return Assign(type, next);
7878
7926
  }
7879
7927
  function FromProperties4(properties) {
7880
7928
  const result = {};
@@ -8191,7 +8239,7 @@ function FromUnion10(context, type, value) {
8191
8239
  const matched = type.anyOf.some((type) => Check2(context, type, value));
8192
8240
  if (matched)
8193
8241
  return value;
8194
- const candidates = type.anyOf.map((type) => FromType21(context, type, Clone2(value)));
8242
+ const candidates = type.anyOf.map((type) => FromType21(context, type, Clone(value)));
8195
8243
  const selected = candidates.find((value) => Check2(context, type, value));
8196
8244
  return IsUndefined(selected) ? value : selected;
8197
8245
  }
@@ -8234,7 +8282,7 @@ function FromCyclic8(context, type, value) {
8234
8282
  function FromDefault(type, value) {
8235
8283
  if (!IsUndefined(value))
8236
8284
  return value;
8237
- return IsFunction(type.default) ? type.default() : Clone2(type.default);
8285
+ return IsFunction(type.default) ? type.default() : Clone(type.default);
8238
8286
  }
8239
8287
 
8240
8288
  // node_modules/typebox/build/value/default/from_intersect.mjs
@@ -8306,7 +8354,7 @@ function FromTuple7(context, schema, value) {
8306
8354
  // node_modules/typebox/build/value/default/from_union.mjs
8307
8355
  function FromUnion11(context, schema, value) {
8308
8356
  for (const inner of schema.anyOf) {
8309
- const result = FromType22(context, inner, Clone2(value));
8357
+ const result = FromType22(context, inner, Clone(value));
8310
8358
  if (Check2(context, inner, result)) {
8311
8359
  return result;
8312
8360
  }
@@ -8392,7 +8440,7 @@ function NonMatchingInterior(value, interiors) {
8392
8440
  function Decode5(direction, context, type, value) {
8393
8441
  if (IsEqual(type.allOf.length, 0))
8394
8442
  return Callback(direction, context, type, value);
8395
- const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema, Clone2(value))));
8443
+ const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema, Clone(value))));
8396
8444
  const structural = interiors.every((result) => IsObject(result));
8397
8445
  const exterior = structural ? MergeInteriors(interiors) : NonMatchingInterior(value, interiors);
8398
8446
  return Callback(direction, context, type, exterior);
@@ -8401,7 +8449,7 @@ function Encode5(direction, context, type, value) {
8401
8449
  if (IsEqual(type.allOf.length, 0))
8402
8450
  return Callback(direction, context, type, value);
8403
8451
  const exterior = Callback(direction, context, type, value);
8404
- const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema, Clone2(exterior))));
8452
+ const interiors = type.allOf.map((schema) => FromType23(direction, context, schema, Clean(schema, Clone(exterior))));
8405
8453
  const structural = interiors.every((result) => IsObject(result));
8406
8454
  if (structural)
8407
8455
  return MergeInteriors(interiors);
@@ -8508,7 +8556,7 @@ function Decode9(direction, context, type, value) {
8508
8556
  function Encode9(direction, context, type, value) {
8509
8557
  const exterior = Callback(direction, context, type, value);
8510
8558
  for (const schema of type.anyOf) {
8511
- const variant = FromType23(direction, context, schema, Clone2(exterior));
8559
+ const variant = FromType23(direction, context, schema, Clone(exterior));
8512
8560
  if (!Check2(context, schema, variant))
8513
8561
  continue;
8514
8562
  return variant;
@@ -8540,7 +8588,7 @@ function DecodeUnsafe(context, type, value) {
8540
8588
  return FromType23("Decode", context, sorted, value);
8541
8589
  }
8542
8590
  var Decoder = Pipeline([
8543
- (_context, _type, value) => Clone2(value),
8591
+ (_context, _type, value) => Clone(value),
8544
8592
  (context, type, value) => Default(context, type, value),
8545
8593
  (context, type, value) => Convert(context, type, value),
8546
8594
  (context, type, value) => Clean(context, type, value),
@@ -8570,7 +8618,7 @@ function EncodeUnsafe(context, type, value) {
8570
8618
  return FromType23("Encode", context, sorted, value);
8571
8619
  }
8572
8620
  var Encoder = Pipeline([
8573
- (_context, _type, value) => Clone2(value),
8621
+ (_context, _type, value) => Clone(value),
8574
8622
  (context, type, value) => EncodeUnsafe(context, type, value),
8575
8623
  (context, type, value) => Default(context, type, value),
8576
8624
  (context, type, value) => Convert(context, type, value),
@@ -8594,7 +8642,7 @@ function Assert3(context, type, value) {
8594
8642
  return value;
8595
8643
  }
8596
8644
  var Parser = Pipeline([
8597
- (_context, _type, value) => Clone2(value),
8645
+ (_context, _type, value) => Clone(value),
8598
8646
  (context, type, value) => Default(context, type, value),
8599
8647
  (context, type, value) => Convert(context, type, value),
8600
8648
  (context, type, value) => Clean(context, type, value),
@@ -9313,6 +9361,7 @@ var ACTION_POLICY = {
9313
9361
  write: ["send", "receive", "ack", "release", "fail", "retry", "delete_message", "update_settings"]
9314
9362
  },
9315
9363
  ai: { local: ["show_skill", "install_skill"] },
9364
+ mcp: { local: ["config"] },
9316
9365
  init: { local: ["init"] },
9317
9366
  env: { local: ["list", "check"] },
9318
9367
  app: {
@@ -15360,7 +15409,7 @@ function scaffoldFiles(framework, slug) {
15360
15409
  "package.json": JSON.stringify({
15361
15410
  private: true,
15362
15411
  type: "module",
15363
- dependencies: { elysia: "2.0.0-beta.32" }
15412
+ dependencies: { elysia: "2.0.0-rc.0" }
15364
15413
  }, null, 2) + `
15365
15414
  `,
15366
15415
  "index.ts": `import { Elysia } from "elysia";
@@ -21443,6 +21492,53 @@ function registerAiTools(server) {
21443
21492
  });
21444
21493
  }
21445
21494
 
21495
+ // src/shared/tools/mcp-tools.ts
21496
+ function projectMcpEndpoint(context) {
21497
+ if (context.credentialScope !== "management" || !context.apiUrl || !context.apiToken) {
21498
+ throw new Error("MCP configuration requires Management API context");
21499
+ }
21500
+ if (!context.projectRef) {
21501
+ throw new Error("MCP configuration requires SUPACLOUD_PROJECT_REF");
21502
+ }
21503
+ return `${context.apiUrl}/mcp/projects/${projectRefPathSegment(context.projectRef, "MCP")}`;
21504
+ }
21505
+ function mcpConfiguration(context) {
21506
+ const endpoint = projectMcpEndpoint(context);
21507
+ const projectRef = context.projectRef;
21508
+ return {
21509
+ project_ref: projectRef,
21510
+ scope: "project",
21511
+ transport: "streamable-http",
21512
+ endpoint,
21513
+ authorization: {
21514
+ type: "bearer",
21515
+ environment_variable: "SUPACLOUD_API_TOKEN",
21516
+ header_template: "Bearer ${SUPACLOUD_API_TOKEN}",
21517
+ requires_client_configuration: true
21518
+ },
21519
+ client_config: {
21520
+ mcpServers: {
21521
+ [`supacloud-${projectRef}`]: {
21522
+ url: endpoint,
21523
+ headers: {
21524
+ Authorization: "Bearer ${SUPACLOUD_API_TOKEN}"
21525
+ }
21526
+ }
21527
+ }
21528
+ },
21529
+ safety: {
21530
+ project_binding: projectRef,
21531
+ cross_project_requests: "rejected",
21532
+ secrets_in_output: false
21533
+ }
21534
+ };
21535
+ }
21536
+ function registerMcpTools(server, context) {
21537
+ registerTool(server, "mcp", "Print a project-scoped MCP configuration without exposing credentials.", { action: Literal("config") }, async () => ({
21538
+ content: [{ type: "text", text: JSON.stringify(mcpConfiguration(context), null, 2) }]
21539
+ }));
21540
+ }
21541
+
21446
21542
  // src/shared/tools/app-tools.ts
21447
21543
  import { existsSync as existsSync11, readFileSync as readFileSync9 } from "node:fs";
21448
21544
  import { mkdir as mkdir5, readFile as readFile4, readdir as readdir5, writeFile as writeFile4 } from "node:fs/promises";
@@ -21588,25 +21684,25 @@ var starter_metadata_default = {
21588
21684
  generatedBy: "supacloud/starter-metadata-v1",
21589
21685
  packages: {
21590
21686
  compiler: {
21591
- version: "0.51.0"
21687
+ version: "0.51.1"
21592
21688
  },
21593
21689
  app: {
21594
- version: "0.32.0",
21690
+ version: "0.33.0",
21595
21691
  dependencies: {
21596
21692
  rxjs: "7.8.2"
21597
21693
  }
21598
21694
  },
21599
21695
  elysia: {
21600
- version: "0.36.0"
21696
+ version: "0.36.1"
21601
21697
  },
21602
21698
  commands: {
21603
- version: "0.11.0"
21699
+ version: "0.11.1"
21604
21700
  },
21605
21701
  contracts: {
21606
- version: "0.15.0"
21702
+ version: "0.15.1"
21607
21703
  },
21608
21704
  db: {
21609
- version: "0.20.0",
21705
+ version: "0.20.1",
21610
21706
  peerDependencies: {
21611
21707
  "drizzle-orm": "1.0.0-rc.5-5935859"
21612
21708
  },
@@ -21615,7 +21711,7 @@ var starter_metadata_default = {
21615
21711
  }
21616
21712
  },
21617
21713
  sdk: {
21618
- version: "0.45.1",
21714
+ version: "0.45.2",
21619
21715
  peerDependencies: {
21620
21716
  "@supabase/supabase-js": "^2.117.3"
21621
21717
  }
@@ -21959,7 +22055,7 @@ function baseFiles(name, sdkDependencies) {
21959
22055
  "@supacloud/app": `^${appMetadata.version}`,
21960
22056
  "@supacloud/elysia": `^${elysiaMetadata.version}`,
21961
22057
  effect: "4.0.5",
21962
- elysia: "2.0.0-beta.32",
22058
+ elysia: "2.0.0-rc.0",
21963
22059
  ...sdkDependencies ?? { rxjs: appMetadata.dependencies.rxjs }
21964
22060
  },
21965
22061
  devDependencies: {
@@ -25125,7 +25221,7 @@ function appStarterFiles(name) {
25125
25221
  "@supacloud/js": `^${sdkMetadata.version}`,
25126
25222
  "@supabase/supabase-js": sdkMetadata.peerDependencies["@supabase/supabase-js"],
25127
25223
  effect: "4.0.5",
25128
- elysia: "2.0.0-beta.32",
25224
+ elysia: "2.0.0-rc.0",
25129
25225
  rxjs: appMetadata2.dependencies.rxjs
25130
25226
  },
25131
25227
  devDependencies: {
@@ -33138,7 +33234,7 @@ async function runProjectDeployment(http, args) {
33138
33234
  // package.json
33139
33235
  var package_default = {
33140
33236
  name: "@supacloud/cli",
33141
- version: "0.108.2",
33237
+ version: "0.109.1",
33142
33238
  description: "Project-scoped CLI for SupaCloud users",
33143
33239
  type: "module",
33144
33240
  main: "./dist/index.js",
@@ -33190,22 +33286,22 @@ var package_default = {
33190
33286
  directory: "packages/cli"
33191
33287
  },
33192
33288
  dependencies: {
33193
- "@supacloud/compiler": "^0.51.0",
33194
- "@supacloud/delivery": "0.21.0",
33195
- "@supacloud/db": "0.20.0",
33196
- typebox: "1.3.37"
33289
+ "@supacloud/compiler": "^0.51.1",
33290
+ "@supacloud/delivery": "0.21.1",
33291
+ "@supacloud/db": "0.20.1",
33292
+ typebox: "1.4.2"
33197
33293
  },
33198
33294
  overrides: {
33199
- "@supacloud/contracts": "0.15.0",
33200
- "@supacloud/delivery": "0.21.0",
33295
+ "@supacloud/contracts": "0.15.1",
33296
+ "@supacloud/delivery": "0.21.1",
33201
33297
  "@graphql-tools/utils": "^12.0.4"
33202
33298
  },
33203
33299
  devDependencies: {
33204
33300
  "@supabase/supabase-js": "2.118.0",
33205
- "@supacloud/elysia": "0.36.0",
33301
+ "@supacloud/elysia": "0.36.1",
33206
33302
  "@types/bun": "^1.4.3",
33207
33303
  effect: "4.0.5",
33208
- elysia: "2.0.0-beta.32",
33304
+ elysia: "2.0.0-rc.0",
33209
33305
  typescript: "^7.0.2"
33210
33306
  }
33211
33307
  };
@@ -33451,6 +33547,7 @@ EXAMPLES
33451
33547
  ${preferredCommand} branch promote --branch_ref preview123 --plan_checksum <sha256>
33452
33548
  ${preferredCommand} ai show_skill
33453
33549
  ${preferredCommand} ai install_skill --dry_run
33550
+ ${preferredCommand} mcp config
33454
33551
  ${preferredCommand} app init --name my-service
33455
33552
  ${preferredCommand} app init --name my-api --template http
33456
33553
  ${preferredCommand} app init --name my-worker --template edge
@@ -33568,6 +33665,7 @@ function createCliTools(context, confirmProduction) {
33568
33665
  })));
33569
33666
  Object.assign(tools, captureTools((server) => registerLiteCliTools(server)));
33570
33667
  Object.assign(tools, captureTools((server) => registerAiTools(server)));
33668
+ Object.assign(tools, captureTools((server) => registerMcpTools(server, context)));
33571
33669
  Object.assign(tools, captureTools((server) => registerDeveloperExperienceTools(server, {
33572
33670
  cwd: process.cwd(),
33573
33671
  activeContext: context
@@ -0,0 +1,4 @@
1
+ import type { ResolvedContext } from "../context";
2
+ import { type ToolServer } from "../tool-server";
3
+ export declare function mcpConfiguration(context: ResolvedContext): Record<string, unknown>;
4
+ export declare function registerMcpTools(server: ToolServer, context: ResolvedContext): void;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/cli",
3
- "version": "0.108.2",
3
+ "version": "0.109.1",
4
4
  "description": "Project-scoped CLI for SupaCloud users",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -52,22 +52,22 @@
52
52
  "directory": "packages/cli"
53
53
  },
54
54
  "dependencies": {
55
- "@supacloud/compiler": "^0.51.0",
56
- "@supacloud/delivery": "0.21.0",
57
- "@supacloud/db": "0.20.0",
58
- "typebox": "1.3.37"
55
+ "@supacloud/compiler": "^0.51.1",
56
+ "@supacloud/delivery": "0.21.1",
57
+ "@supacloud/db": "0.20.1",
58
+ "typebox": "1.4.2"
59
59
  },
60
60
  "overrides": {
61
- "@supacloud/contracts": "0.15.0",
62
- "@supacloud/delivery": "0.21.0",
61
+ "@supacloud/contracts": "0.15.1",
62
+ "@supacloud/delivery": "0.21.1",
63
63
  "@graphql-tools/utils": "^12.0.4"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@supabase/supabase-js": "2.118.0",
67
- "@supacloud/elysia": "0.36.0",
67
+ "@supacloud/elysia": "0.36.1",
68
68
  "@types/bun": "^1.4.3",
69
69
  "effect": "4.0.5",
70
- "elysia": "2.0.0-beta.32",
70
+ "elysia": "2.0.0-rc.0",
71
71
  "typescript": "^7.0.2"
72
72
  }
73
73
  }