eraspace 0.3.0 → 0.4.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/README.md +2 -0
- package/bin.js +664 -177
- package/package.json +1 -1
- package/sdk/src/client/client.ts +10 -6
- package/sdk/src/client/files.ts +2 -0
- package/sdk/src/client/index.ts +1 -0
- package/sdk/src/client/sub-key.ts +3 -0
- package/templates/chat/client/index.tsx +11 -3
package/bin.js
CHANGED
|
@@ -2,11 +2,34 @@
|
|
|
2
2
|
import { createRequire as __eraspaceCreateRequire } from "node:module";
|
|
3
3
|
const require = __eraspaceCreateRequire(import.meta.url);
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __esm = (fn3, res, err) => function __init() {
|
|
7
|
+
if (err) throw err[0];
|
|
8
|
+
try {
|
|
9
|
+
return fn3 && (res = (0, fn3[__getOwnPropNames(fn3)[0]])(fn3 = 0)), res;
|
|
10
|
+
} catch (e) {
|
|
11
|
+
throw err = [e], e;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
5
14
|
var __export = (target2, all6) => {
|
|
6
15
|
for (var name in all6)
|
|
7
16
|
__defProp(target2, name, { get: all6[name], enumerable: true });
|
|
8
17
|
};
|
|
9
18
|
|
|
19
|
+
// <define:ERASPACE_MOVED_ORIGINS>
|
|
20
|
+
var define_ERASPACE_MOVED_ORIGINS_default;
|
|
21
|
+
var init_define_ERASPACE_MOVED_ORIGINS = __esm({
|
|
22
|
+
"<define:ERASPACE_MOVED_ORIGINS>"() {
|
|
23
|
+
define_ERASPACE_MOVED_ORIGINS_default = { "https://eraspace-production.up.railway.app": "https://eraspace.dev" };
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// cli/src/bin.ts
|
|
28
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
29
|
+
|
|
30
|
+
// node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.3.0/node_modules/@effect/platform-node/dist/index.js
|
|
31
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32
|
+
|
|
10
33
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Effect.js
|
|
11
34
|
var Effect_exports = {};
|
|
12
35
|
__export(Effect_exports, {
|
|
@@ -240,6 +263,7 @@ __export(Effect_exports, {
|
|
|
240
263
|
zip: () => zip2,
|
|
241
264
|
zipWith: () => zipWith3
|
|
242
265
|
});
|
|
266
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
243
267
|
|
|
244
268
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Context.js
|
|
245
269
|
var Context_exports = {};
|
|
@@ -268,8 +292,25 @@ __export(Context_exports, {
|
|
|
268
292
|
omit: () => omit,
|
|
269
293
|
pick: () => pick
|
|
270
294
|
});
|
|
295
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
296
|
+
|
|
297
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Effectable.js
|
|
298
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
299
|
+
|
|
300
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/core.js
|
|
301
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
302
|
+
|
|
303
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Equal.js
|
|
304
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
305
|
+
|
|
306
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Hash.js
|
|
307
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
308
|
+
|
|
309
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Function.js
|
|
310
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
271
311
|
|
|
272
312
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Pipeable.js
|
|
313
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
273
314
|
var pipeArguments = (self, args2) => {
|
|
274
315
|
switch (args2.length) {
|
|
275
316
|
case 0:
|
|
@@ -428,6 +469,7 @@ function memoizeIdempotent(f) {
|
|
|
428
469
|
}
|
|
429
470
|
|
|
430
471
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/equal.js
|
|
472
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
431
473
|
var getAllObjectKeys = (obj) => {
|
|
432
474
|
const keys4 = new Set(Reflect.ownKeys(obj));
|
|
433
475
|
if (obj.constructor === Object) return keys4;
|
|
@@ -452,6 +494,7 @@ var byReferenceInstances = /* @__PURE__ */ new WeakSet();
|
|
|
452
494
|
var viewBytes = (view) => new Uint8Array(view.buffer, view.byteOffset, view.byteLength);
|
|
453
495
|
|
|
454
496
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/hash.js
|
|
497
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
455
498
|
var backEdges = 0;
|
|
456
499
|
var addBackEdge = () => {
|
|
457
500
|
backEdges++;
|
|
@@ -508,6 +551,7 @@ __export(Predicate_exports, {
|
|
|
508
551
|
some: () => some,
|
|
509
552
|
xor: () => xor
|
|
510
553
|
});
|
|
554
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
511
555
|
var mapInput = /* @__PURE__ */ dual(2, (self, f) => (b) => self(f(b)));
|
|
512
556
|
var isTupleOf = /* @__PURE__ */ dual(2, (self, n) => self.length === n);
|
|
513
557
|
var isTupleOfAtLeast = /* @__PURE__ */ dual(2, (self, n) => self.length >= n);
|
|
@@ -947,7 +991,11 @@ var byReferenceUnsafe = (obj) => {
|
|
|
947
991
|
return obj;
|
|
948
992
|
};
|
|
949
993
|
|
|
994
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Formatter.js
|
|
995
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
996
|
+
|
|
950
997
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Redactable.js
|
|
998
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
951
999
|
var symbolRedactable = /* @__PURE__ */ Symbol.for("~effect/Redactable");
|
|
952
1000
|
var isRedactable = (u) => hasProperty(u, symbolRedactable);
|
|
953
1001
|
function redact(u) {
|
|
@@ -1122,6 +1170,7 @@ function isJsonPrimitiveWrapper(object) {
|
|
|
1122
1170
|
}
|
|
1123
1171
|
|
|
1124
1172
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Inspectable.js
|
|
1173
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
1125
1174
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
1126
1175
|
var toJson = (input) => {
|
|
1127
1176
|
try {
|
|
@@ -1188,7 +1237,11 @@ var Class2 = class {
|
|
|
1188
1237
|
}
|
|
1189
1238
|
};
|
|
1190
1239
|
|
|
1240
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Utils.js
|
|
1241
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
1242
|
+
|
|
1191
1243
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/stackTraceLimit.js
|
|
1244
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
1192
1245
|
var isStackTraceLimitWritable = () => {
|
|
1193
1246
|
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
1194
1247
|
if (desc === void 0) {
|
|
@@ -1258,6 +1311,7 @@ var pickInternalCall = () => {
|
|
|
1258
1311
|
var internalCall = /* @__PURE__ */ pickInternalCall();
|
|
1259
1312
|
|
|
1260
1313
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/record.js
|
|
1314
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
1261
1315
|
function assignProperty(self, key, value4) {
|
|
1262
1316
|
if (key === "__proto__") {
|
|
1263
1317
|
Object.defineProperty(self, key, {
|
|
@@ -1763,8 +1817,10 @@ __export(Option_exports, {
|
|
|
1763
1817
|
zipRight: () => zipRight,
|
|
1764
1818
|
zipWith: () => zipWith
|
|
1765
1819
|
});
|
|
1820
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
1766
1821
|
|
|
1767
1822
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Combiner.js
|
|
1823
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
1768
1824
|
function make(combine5) {
|
|
1769
1825
|
return {
|
|
1770
1826
|
combine: combine5
|
|
@@ -1777,7 +1833,11 @@ function max(order) {
|
|
|
1777
1833
|
return make((self, that) => order(self, that) === 1 ? self : that);
|
|
1778
1834
|
}
|
|
1779
1835
|
|
|
1836
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Equivalence.js
|
|
1837
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
1838
|
+
|
|
1780
1839
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Reducer.js
|
|
1840
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
1781
1841
|
function make2(combine5, initialValue, combineAll) {
|
|
1782
1842
|
return {
|
|
1783
1843
|
combine: combine5,
|
|
@@ -1820,6 +1880,7 @@ function Array_(item) {
|
|
|
1820
1880
|
}
|
|
1821
1881
|
|
|
1822
1882
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/doNotation.js
|
|
1883
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
1823
1884
|
var let_ = (map18) => dual(3, (self, name, f) => map18(self, (a) => ({
|
|
1824
1885
|
...a,
|
|
1825
1886
|
[name]: f(a)
|
|
@@ -1833,6 +1894,7 @@ var bind = (map18, flatMap11) => dual(3, (self, name, f) => flatMap11(self, (a)
|
|
|
1833
1894
|
}))));
|
|
1834
1895
|
|
|
1835
1896
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/option.js
|
|
1897
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
1836
1898
|
var TypeId = "~effect/Option";
|
|
1837
1899
|
var CommonProto = {
|
|
1838
1900
|
[TypeId]: {
|
|
@@ -1899,6 +1961,7 @@ SomeImpl.prototype = SomeProto;
|
|
|
1899
1961
|
var some2 = (value4) => new SomeImpl(value4);
|
|
1900
1962
|
|
|
1901
1963
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/result.js
|
|
1964
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
1902
1965
|
var TypeId2 = "~effect/Result";
|
|
1903
1966
|
var CommonProto2 = {
|
|
1904
1967
|
[TypeId2]: {
|
|
@@ -1969,6 +2032,7 @@ var getSuccess = (self) => isFailure(self) ? none : some2(self.success);
|
|
|
1969
2032
|
var fromOption = /* @__PURE__ */ dual(2, (self, onNone) => isNone(self) ? fail(onNone()) : succeed(self.value));
|
|
1970
2033
|
|
|
1971
2034
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Order.js
|
|
2035
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
1972
2036
|
function make4(compare2) {
|
|
1973
2037
|
return (self, that) => self === that ? 0 : compare2(self, that);
|
|
1974
2038
|
}
|
|
@@ -2455,6 +2519,7 @@ __export(Duration_exports, {
|
|
|
2455
2519
|
weeks: () => weeks,
|
|
2456
2520
|
zero: () => zero
|
|
2457
2521
|
});
|
|
2522
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
2458
2523
|
var TypeId4 = "~effect/Duration";
|
|
2459
2524
|
var bigint0 = /* @__PURE__ */ BigInt(0);
|
|
2460
2525
|
var bigint1 = /* @__PURE__ */ BigInt(1);
|
|
@@ -3004,14 +3069,29 @@ var ReducerSum = /* @__PURE__ */ make2(sum, zero);
|
|
|
3004
3069
|
var CombinerMax = /* @__PURE__ */ max(Order);
|
|
3005
3070
|
var CombinerMin = /* @__PURE__ */ min(Order);
|
|
3006
3071
|
|
|
3072
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Exit.js
|
|
3073
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3074
|
+
|
|
3075
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/effect.js
|
|
3076
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3077
|
+
|
|
3078
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Array.js
|
|
3079
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3080
|
+
|
|
3007
3081
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/array.js
|
|
3082
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3008
3083
|
var isArrayNonEmpty = (self) => self.length > 0;
|
|
3009
3084
|
|
|
3010
3085
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/count.js
|
|
3086
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3011
3087
|
var normalize = (n) => n > 0 ? Math.floor(n) : 0;
|
|
3012
3088
|
var normalizeNonEmpty = (n) => Math.max(1, normalize(n));
|
|
3013
3089
|
|
|
3090
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Iterable.js
|
|
3091
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3092
|
+
|
|
3014
3093
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Result.js
|
|
3094
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3015
3095
|
var succeed2 = succeed;
|
|
3016
3096
|
var fail2 = fail;
|
|
3017
3097
|
var fromOption2 = fromOption;
|
|
@@ -3075,6 +3155,7 @@ var all2 = (input) => {
|
|
|
3075
3155
|
};
|
|
3076
3156
|
|
|
3077
3157
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Tuple.js
|
|
3158
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3078
3159
|
var makeEquivalence2 = Tuple2;
|
|
3079
3160
|
|
|
3080
3161
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Iterable.js
|
|
@@ -3178,6 +3259,7 @@ var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => ({
|
|
|
3178
3259
|
}));
|
|
3179
3260
|
|
|
3180
3261
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Record.js
|
|
3262
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3181
3263
|
var isEmptyRecord = (self) => Object.keys(self).length === 0;
|
|
3182
3264
|
var has = /* @__PURE__ */ dual(2, (self, key) => Object.hasOwn(self, key));
|
|
3183
3265
|
var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
@@ -3332,12 +3414,14 @@ var dedupe = (self) => {
|
|
|
3332
3414
|
};
|
|
3333
3415
|
|
|
3334
3416
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Filter.js
|
|
3417
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3335
3418
|
var toOption = (self) => (input) => {
|
|
3336
3419
|
const result4 = self(input);
|
|
3337
3420
|
return isFailure2(result4) ? none2() : some3(result4.success);
|
|
3338
3421
|
};
|
|
3339
3422
|
|
|
3340
3423
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Scheduler.js
|
|
3424
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3341
3425
|
var Scheduler = /* @__PURE__ */ Reference("effect/Scheduler", {
|
|
3342
3426
|
fiberCached: true,
|
|
3343
3427
|
defaultValue: () => new MixedScheduler()
|
|
@@ -3481,7 +3565,17 @@ var PreventSchedulerYield = /* @__PURE__ */ Reference("effect/Scheduler/PreventS
|
|
|
3481
3565
|
defaultValue: () => false
|
|
3482
3566
|
});
|
|
3483
3567
|
|
|
3568
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Tracer.js
|
|
3569
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3570
|
+
|
|
3571
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/encoding/Hex.js
|
|
3572
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3573
|
+
|
|
3574
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/encoding/EncodingError.js
|
|
3575
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3576
|
+
|
|
3484
3577
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Data.js
|
|
3578
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3485
3579
|
var Class3 = class extends Class {
|
|
3486
3580
|
constructor(props) {
|
|
3487
3581
|
super();
|
|
@@ -3704,9 +3798,11 @@ var NativeSpan = class {
|
|
|
3704
3798
|
};
|
|
3705
3799
|
|
|
3706
3800
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/metric.js
|
|
3801
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3707
3802
|
var FiberRuntimeMetricsKey = "effect/Metric/FiberRuntimeMetrics";
|
|
3708
3803
|
|
|
3709
3804
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/references.js
|
|
3805
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3710
3806
|
var CurrentErrorReporters = /* @__PURE__ */ Reference("effect/ErrorReporter/CurrentErrorReporters", {
|
|
3711
3807
|
defaultValue: () => /* @__PURE__ */ new Set()
|
|
3712
3808
|
});
|
|
@@ -3743,6 +3839,7 @@ var CurrentLogSpans = /* @__PURE__ */ Reference("effect/References/CurrentLogSpa
|
|
|
3743
3839
|
});
|
|
3744
3840
|
|
|
3745
3841
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/tracer.js
|
|
3842
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
3746
3843
|
var addSpanStackTrace = (options3) => {
|
|
3747
3844
|
if (options3?.captureStackTrace === false) {
|
|
3748
3845
|
return options3;
|
|
@@ -6514,6 +6611,12 @@ var hasInterrupts2 = exitHasInterrupts;
|
|
|
6514
6611
|
var match6 = exitMatch;
|
|
6515
6612
|
var asVoidAll = exitAsVoidAll;
|
|
6516
6613
|
|
|
6614
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/executionPlan.js
|
|
6615
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
6616
|
+
|
|
6617
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/ExecutionPlan.js
|
|
6618
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
6619
|
+
|
|
6517
6620
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Layer.js
|
|
6518
6621
|
var Layer_exports = {};
|
|
6519
6622
|
__export(Layer_exports, {
|
|
@@ -6562,8 +6665,10 @@ __export(Layer_exports, {
|
|
|
6562
6665
|
withParentSpan: () => withParentSpan2,
|
|
6563
6666
|
withSpan: () => withSpan2
|
|
6564
6667
|
});
|
|
6668
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
6565
6669
|
|
|
6566
6670
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Deferred.js
|
|
6671
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
6567
6672
|
var TypeId5 = "~effect/Deferred";
|
|
6568
6673
|
var DeferredProto = {
|
|
6569
6674
|
[TypeId5]: {
|
|
@@ -6611,6 +6716,7 @@ var doneUnsafe = (self, effect2) => {
|
|
|
6611
6716
|
};
|
|
6612
6717
|
|
|
6613
6718
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/References.js
|
|
6719
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
6614
6720
|
var CurrentLogAnnotations2 = CurrentLogAnnotations;
|
|
6615
6721
|
var CurrentLogSpans2 = CurrentLogSpans;
|
|
6616
6722
|
var CurrentStackFrame2 = CurrentStackFrame;
|
|
@@ -6618,6 +6724,7 @@ var MinimumLogLevel2 = MinimumLogLevel;
|
|
|
6618
6724
|
var TracerTimingEnabled2 = TracerTimingEnabled;
|
|
6619
6725
|
|
|
6620
6726
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Scope.js
|
|
6727
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
6621
6728
|
var Scope = scopeTag;
|
|
6622
6729
|
var makeUnsafe3 = scopeMakeUnsafe;
|
|
6623
6730
|
var provide = provideScope;
|
|
@@ -6890,8 +6997,10 @@ __export(Schedule_exports, {
|
|
|
6890
6997
|
while: () => while_,
|
|
6891
6998
|
windowed: () => windowed
|
|
6892
6999
|
});
|
|
7000
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
6893
7001
|
|
|
6894
7002
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Cause.js
|
|
7003
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
6895
7004
|
var isCause2 = isCause;
|
|
6896
7005
|
var isReason = isCauseReason;
|
|
6897
7006
|
var isFailReason2 = isFailReason;
|
|
@@ -6920,6 +7029,12 @@ var ExceededCapacityError2 = ExceededCapacityError;
|
|
|
6920
7029
|
var UnknownError2 = UnknownError;
|
|
6921
7030
|
var reasonAnnotations2 = reasonAnnotations;
|
|
6922
7031
|
|
|
7032
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Cron.js
|
|
7033
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
7034
|
+
|
|
7035
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/dateTime.js
|
|
7036
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
7037
|
+
|
|
6923
7038
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Clock.js
|
|
6924
7039
|
var Clock_exports = {};
|
|
6925
7040
|
__export(Clock_exports, {
|
|
@@ -6929,6 +7044,7 @@ __export(Clock_exports, {
|
|
|
6929
7044
|
currentTimeNanos: () => currentTimeNanos2,
|
|
6930
7045
|
monotonicTimeNanos: () => monotonicTimeNanos2
|
|
6931
7046
|
});
|
|
7047
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
6932
7048
|
var Clock = ClockRef;
|
|
6933
7049
|
var clockWith2 = clockWith;
|
|
6934
7050
|
var currentTimeMillis2 = currentTimeMillis;
|
|
@@ -7339,6 +7455,7 @@ var formatIsoOffset = (self) => {
|
|
|
7339
7455
|
var formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
|
|
7340
7456
|
|
|
7341
7457
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Number.js
|
|
7458
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
7342
7459
|
var Number3 = globalThis.Number;
|
|
7343
7460
|
var Order2 = Number2;
|
|
7344
7461
|
var remainder = /* @__PURE__ */ dual(2, (self, divisor) => {
|
|
@@ -7380,6 +7497,7 @@ var round = /* @__PURE__ */ dual(2, (self, precision) => {
|
|
|
7380
7497
|
});
|
|
7381
7498
|
|
|
7382
7499
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/String.js
|
|
7500
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
7383
7501
|
var String3 = globalThis.String;
|
|
7384
7502
|
var isString2 = isString;
|
|
7385
7503
|
var toLowerCase = (self) => self.toLowerCase();
|
|
@@ -7915,6 +8033,7 @@ function aliasOrValue(field, aliases) {
|
|
|
7915
8033
|
var decimalRegex = /^\d+$/;
|
|
7916
8034
|
|
|
7917
8035
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/random.js
|
|
8036
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
7918
8037
|
var Random = /* @__PURE__ */ Reference("effect/Random", {
|
|
7919
8038
|
defaultValue: () => ({
|
|
7920
8039
|
nextIntUnsafe() {
|
|
@@ -7941,6 +8060,7 @@ var nextBetween = (min7, max7, draw) => {
|
|
|
7941
8060
|
};
|
|
7942
8061
|
|
|
7943
8062
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Pull.js
|
|
8063
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
7944
8064
|
var catchDone = /* @__PURE__ */ dual(2, (effect2, f) => catchCauseFilter(effect2, filterDoneLeftover, (l) => f(l)));
|
|
7945
8065
|
var isDoneCause = (cause) => cause.reasons.some(isDoneFailure);
|
|
7946
8066
|
var isDoneFailure = (failure2) => failure2._tag === "Fail" && isDone3(failure2.error);
|
|
@@ -8294,10 +8414,12 @@ var CurrentMetadata2 = /* @__PURE__ */ Reference("effect/ExecutionPlan/CurrentMe
|
|
|
8294
8414
|
});
|
|
8295
8415
|
|
|
8296
8416
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/layer.js
|
|
8417
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
8297
8418
|
var provideLayer = (self, layer16, options3) => scopedWith((scope3) => flatMap3(options3?.local ? buildWithMemoMap(layer16, makeMemoMapUnsafe(), scope3) : buildWithScope(layer16, scope3), (context3) => provideContext(self, context3)));
|
|
8298
8419
|
var provide3 = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, source, options3) => isContext(source) ? provideContext(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll2(...source) : source, options3));
|
|
8299
8420
|
|
|
8300
8421
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schedule.js
|
|
8422
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
8301
8423
|
var findErrorOnly = (cause) => cause.reasons.every(isFailReason) ? findError(cause) : fail2(cause);
|
|
8302
8424
|
var repeatOrElse = /* @__PURE__ */ dual(3, (self, schedule4, orElse6) => flatMap3(toStepWithMetadata(schedule4), (step) => {
|
|
8303
8425
|
let meta = CurrentMetadata.defaultValue();
|
|
@@ -8474,7 +8596,11 @@ var scheduleFromStep = (step, first) => {
|
|
|
8474
8596
|
};
|
|
8475
8597
|
var scheduleOnce = /* @__PURE__ */ recurs(1);
|
|
8476
8598
|
|
|
8599
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/request.js
|
|
8600
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
8601
|
+
|
|
8477
8602
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/MutableHashMap.js
|
|
8603
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
8478
8604
|
var TypeId11 = "~effect/MutableHashMap";
|
|
8479
8605
|
var MutableHashMapProto = {
|
|
8480
8606
|
[TypeId11]: TypeId11,
|
|
@@ -8585,6 +8711,7 @@ var clear = (self) => {
|
|
|
8585
8711
|
var size = (self) => self.backing.size;
|
|
8586
8712
|
|
|
8587
8713
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Request.js
|
|
8714
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
8588
8715
|
var TypeId12 = "~effect/Request";
|
|
8589
8716
|
var requestVariance = /* @__PURE__ */ byReferenceUnsafe({
|
|
8590
8717
|
/* c8 ignore next */
|
|
@@ -8727,6 +8854,7 @@ function runBatch(batch) {
|
|
|
8727
8854
|
}
|
|
8728
8855
|
|
|
8729
8856
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Metric.js
|
|
8857
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
8730
8858
|
var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
|
|
8731
8859
|
var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
|
|
8732
8860
|
defaultValue: () => ({})
|
|
@@ -9189,7 +9317,14 @@ var flatMapEager2 = flatMapEager;
|
|
|
9189
9317
|
var catchEager2 = catchEager;
|
|
9190
9318
|
var fnUntracedEager2 = fnUntracedEager;
|
|
9191
9319
|
|
|
9320
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/net/Dns.js
|
|
9321
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
9322
|
+
|
|
9323
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/net/Host.js
|
|
9324
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
9325
|
+
|
|
9192
9326
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/net/NetAddress.js
|
|
9327
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
9193
9328
|
var TypeId15 = "~effect/net/NetAddress";
|
|
9194
9329
|
var ipv4Value = (self) => self.value;
|
|
9195
9330
|
var ipv6Words = (self) => self;
|
|
@@ -9913,6 +10048,9 @@ var formatRecord = (self) => {
|
|
|
9913
10048
|
}
|
|
9914
10049
|
};
|
|
9915
10050
|
|
|
10051
|
+
// node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
|
|
10052
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
10053
|
+
|
|
9916
10054
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/FileSystem.js
|
|
9917
10055
|
var FileSystem_exports = {};
|
|
9918
10056
|
__export(FileSystem_exports, {
|
|
@@ -9924,8 +10062,13 @@ __export(FileSystem_exports, {
|
|
|
9924
10062
|
make: () => make20,
|
|
9925
10063
|
makeNoop: () => makeNoop
|
|
9926
10064
|
});
|
|
10065
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
10066
|
+
|
|
10067
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/ByteSize.js
|
|
10068
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
9927
10069
|
|
|
9928
10070
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/BigInt.js
|
|
10071
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
9929
10072
|
var BigInt3 = globalThis.BigInt;
|
|
9930
10073
|
var toNumber = (b) => {
|
|
9931
10074
|
if (b > BigInt3(Number.MAX_SAFE_INTEGER) || b < BigInt3(Number.MIN_SAFE_INTEGER)) {
|
|
@@ -10063,6 +10206,7 @@ var toBigInt = (self) => self;
|
|
|
10063
10206
|
var toNumber2 = toNumber;
|
|
10064
10207
|
|
|
10065
10208
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/PlatformError.js
|
|
10209
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
10066
10210
|
var TypeId17 = "~effect/PlatformError";
|
|
10067
10211
|
var BadArgument = class extends (/* @__PURE__ */ TaggedError2("BadArgument")) {
|
|
10068
10212
|
/**
|
|
@@ -10122,7 +10266,14 @@ var PlatformError = class extends (/* @__PURE__ */ TaggedError2("PlatformError")
|
|
|
10122
10266
|
var systemError = (options3) => new PlatformError(new SystemError(options3));
|
|
10123
10267
|
var badArgument = (options3) => new PlatformError(new BadArgument(options3));
|
|
10124
10268
|
|
|
10269
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Sink.js
|
|
10270
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
10271
|
+
|
|
10272
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Channel.js
|
|
10273
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
10274
|
+
|
|
10125
10275
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Chunk.js
|
|
10276
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
10126
10277
|
var TypeId18 = "~effect/Chunk";
|
|
10127
10278
|
function copy(src, srcPos, dest, destPos, len) {
|
|
10128
10279
|
for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) {
|
|
@@ -10287,6 +10438,7 @@ var fromArrayUnsafe = (self) => self.length === 0 ? empty5() : self.length === 1
|
|
|
10287
10438
|
var size2 = (self) => self.length;
|
|
10288
10439
|
|
|
10289
10440
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Fiber.js
|
|
10441
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
10290
10442
|
var await_ = fiberAwait;
|
|
10291
10443
|
var join = fiberJoin;
|
|
10292
10444
|
var joinAll = fiberJoinAll;
|
|
@@ -10295,10 +10447,12 @@ var getCurrent = getCurrentFiber;
|
|
|
10295
10447
|
var runIn = fiberRunIn;
|
|
10296
10448
|
|
|
10297
10449
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Latch.js
|
|
10450
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
10298
10451
|
var makeUnsafe5 = makeLatchUnsafe;
|
|
10299
10452
|
var make11 = makeLatch;
|
|
10300
10453
|
|
|
10301
10454
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/MutableRef.js
|
|
10455
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
10302
10456
|
var TypeId19 = "~effect/MutableRef";
|
|
10303
10457
|
var MutableRefProto = {
|
|
10304
10458
|
[TypeId19]: TypeId19,
|
|
@@ -10321,7 +10475,11 @@ var set2 = /* @__PURE__ */ dual(2, (self, value4) => {
|
|
|
10321
10475
|
return self;
|
|
10322
10476
|
});
|
|
10323
10477
|
|
|
10478
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/PubSub.js
|
|
10479
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
10480
|
+
|
|
10324
10481
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/MutableList.js
|
|
10482
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
10325
10483
|
var Empty = /* @__PURE__ */ Symbol.for("effect/MutableList/Empty");
|
|
10326
10484
|
var make13 = () => ({
|
|
10327
10485
|
head: void 0,
|
|
@@ -11644,6 +11802,7 @@ var emptyReplayWindow = {
|
|
|
11644
11802
|
};
|
|
11645
11803
|
|
|
11646
11804
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Queue.js
|
|
11805
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
11647
11806
|
var TypeId21 = "~effect/Queue";
|
|
11648
11807
|
var EnqueueTypeId = "~effect/Queue/Enqueue";
|
|
11649
11808
|
var DequeueTypeId = "~effect/Queue/Dequeue";
|
|
@@ -11958,6 +12117,7 @@ var finalize = (self, exit3) => {
|
|
|
11958
12117
|
};
|
|
11959
12118
|
|
|
11960
12119
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Semaphore.js
|
|
12120
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
11961
12121
|
var makeUnsafe6 = (permits) => new SemaphoreImpl(permits);
|
|
11962
12122
|
var waitForPermits = (self, n, effect2) => callback((resume) => {
|
|
11963
12123
|
if (self.free >= n) return resume(effect2);
|
|
@@ -12054,6 +12214,7 @@ var SemaphoreImpl = class {
|
|
|
12054
12214
|
};
|
|
12055
12215
|
|
|
12056
12216
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Take.js
|
|
12217
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
12057
12218
|
var toPull = (take6) => isExit2(take6) ? isSuccess4(take6) ? done3(take6.value) : take6 : succeed6(take6);
|
|
12058
12219
|
|
|
12059
12220
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Channel.js
|
|
@@ -12936,6 +13097,7 @@ var toPubSubTake = /* @__PURE__ */ dual(2, /* @__PURE__ */ fnUntraced2(function*
|
|
|
12936
13097
|
}));
|
|
12937
13098
|
|
|
12938
13099
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/stream.js
|
|
13100
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
12939
13101
|
var TypeId23 = "~effect/Stream";
|
|
12940
13102
|
var streamVariance = {
|
|
12941
13103
|
_R: identity,
|
|
@@ -13264,8 +13426,10 @@ __export(Stream_exports, {
|
|
|
13264
13426
|
zipWithPrevious: () => zipWithPrevious,
|
|
13265
13427
|
zipWithPreviousAndNext: () => zipWithPreviousAndNext
|
|
13266
13428
|
});
|
|
13429
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
13267
13430
|
|
|
13268
13431
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/RcMap.js
|
|
13432
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
13269
13433
|
var TypeId25 = "~effect/RcMap";
|
|
13270
13434
|
var makeUnsafe7 = (options3) => ({
|
|
13271
13435
|
[TypeId25]: TypeId25,
|
|
@@ -13401,7 +13565,11 @@ var touch = /* @__PURE__ */ dual(2, (self, key) => clockWith3((clock) => {
|
|
|
13401
13565
|
return void_4;
|
|
13402
13566
|
}));
|
|
13403
13567
|
|
|
13568
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/RcRef.js
|
|
13569
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
13570
|
+
|
|
13404
13571
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/rcRef.js
|
|
13572
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
13405
13573
|
var TypeId26 = "~effect/RcRef";
|
|
13406
13574
|
var stateEmpty = {
|
|
13407
13575
|
_tag: "Empty"
|
|
@@ -15288,6 +15456,7 @@ __export(Path_exports, {
|
|
|
15288
15456
|
layer: () => layer,
|
|
15289
15457
|
make: () => make21
|
|
15290
15458
|
});
|
|
15459
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
15291
15460
|
var TypeId29 = "~effect/Path";
|
|
15292
15461
|
var Path = /* @__PURE__ */ Service("effect/Path");
|
|
15293
15462
|
var make21 = (impl) => Path.of({
|
|
@@ -15780,6 +15949,7 @@ __export(ChildProcess_exports, {
|
|
|
15780
15949
|
setCwd: () => setCwd,
|
|
15781
15950
|
setEnv: () => setEnv
|
|
15782
15951
|
});
|
|
15952
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
15783
15953
|
|
|
15784
15954
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/process/ChildProcessSpawner.js
|
|
15785
15955
|
var ChildProcessSpawner_exports = {};
|
|
@@ -15790,8 +15960,16 @@ __export(ChildProcessSpawner_exports, {
|
|
|
15790
15960
|
make: () => make24,
|
|
15791
15961
|
makeHandle: () => makeHandle
|
|
15792
15962
|
});
|
|
15963
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
15964
|
+
|
|
15965
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Brand.js
|
|
15966
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
15967
|
+
|
|
15968
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/SchemaAST.js
|
|
15969
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
15793
15970
|
|
|
15794
15971
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/annotations.js
|
|
15972
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
15795
15973
|
function resolve3(ast) {
|
|
15796
15974
|
return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
|
|
15797
15975
|
}
|
|
@@ -15813,7 +15991,14 @@ var getExpected = /* @__PURE__ */ memoize((ast) => {
|
|
|
15813
15991
|
});
|
|
15814
15992
|
var annotationExcludedKeys = /* @__PURE__ */ new Set([SENTINELS_ANNOTATION_KEY, STRUCTURAL_ANNOTATION_KEY, "representation", "arbitraryConstraint", "toJsonSchema", "toCode", "toEquivalence", "toFormatter", "toCodec", "toCodecJson", "toCodecStringTree", "toCodecIso", "toCodecArbitrary"]);
|
|
15815
15993
|
|
|
15994
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/cause.js
|
|
15995
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
15996
|
+
|
|
15997
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/SchemaIssue.js
|
|
15998
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
15999
|
+
|
|
15816
16000
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/parser.js
|
|
16001
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
15817
16002
|
var missing = /* @__PURE__ */ Symbol();
|
|
15818
16003
|
var succeed9 = succeed4;
|
|
15819
16004
|
var missingExit = /* @__PURE__ */ succeed9(missing);
|
|
@@ -16185,7 +16370,11 @@ function getSchemaIssueOrThrow(cause, message) {
|
|
|
16185
16370
|
return issue;
|
|
16186
16371
|
}
|
|
16187
16372
|
|
|
16373
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/SchemaGetter.js
|
|
16374
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
16375
|
+
|
|
16188
16376
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/DateTime.js
|
|
16377
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
16189
16378
|
var isDateTime2 = isDateTime;
|
|
16190
16379
|
var isTimeZone2 = isTimeZone;
|
|
16191
16380
|
var isTimeZoneOffset2 = isTimeZoneOffset;
|
|
@@ -16209,6 +16398,7 @@ var formatIso2 = formatIso;
|
|
|
16209
16398
|
var formatIsoZoned2 = formatIsoZoned;
|
|
16210
16399
|
|
|
16211
16400
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/encoding/Base64.js
|
|
16401
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
16212
16402
|
var encode2 = (input) => encodeBytes(typeof input === "string" ? encoder3.encode(input) : input);
|
|
16213
16403
|
var decode2 = (str) => {
|
|
16214
16404
|
const stripped = stripCrlf(str);
|
|
@@ -16288,6 +16478,7 @@ var getCode = (charCode) => {
|
|
|
16288
16478
|
};
|
|
16289
16479
|
|
|
16290
16480
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/encoding/Base64Url.js
|
|
16481
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
16291
16482
|
var encode3 = (input) => encode2(input).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
16292
16483
|
var decode3 = (str) => {
|
|
16293
16484
|
const stripped = str.replace(/[\n\r]/g, "");
|
|
@@ -16687,7 +16878,11 @@ function collectBracketPathEntries(isLeaf) {
|
|
|
16687
16878
|
};
|
|
16688
16879
|
}
|
|
16689
16880
|
|
|
16881
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/SchemaTransformation.js
|
|
16882
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
16883
|
+
|
|
16690
16884
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/BigDecimal.js
|
|
16885
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
16691
16886
|
var FINITE_INT_REGEXP = /^[+-]?\d+$/;
|
|
16692
16887
|
var TypeId31 = "~effect/BigDecimal";
|
|
16693
16888
|
var BigDecimalProto = {
|
|
@@ -19414,6 +19609,7 @@ import * as NodeChildProcess from "node:child_process";
|
|
|
19414
19609
|
import { PassThrough } from "node:stream";
|
|
19415
19610
|
|
|
19416
19611
|
// node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/internal/nodeChildProcessSpawner.js
|
|
19612
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
19417
19613
|
var buildSpawnOptions = (options3, base, platform) => {
|
|
19418
19614
|
const detached = options3.detached ?? platform !== "win32";
|
|
19419
19615
|
return {
|
|
@@ -19425,6 +19621,7 @@ var buildSpawnOptions = (options3, base, platform) => {
|
|
|
19425
19621
|
};
|
|
19426
19622
|
|
|
19427
19623
|
// node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/internal/utils.js
|
|
19624
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
19428
19625
|
var handleErrnoException = (module, method) => (err, [path]) => {
|
|
19429
19626
|
let reason = "Unknown";
|
|
19430
19627
|
switch (err.code) {
|
|
@@ -19461,6 +19658,7 @@ var handleErrnoException = (module, method) => (err, [path]) => {
|
|
|
19461
19658
|
};
|
|
19462
19659
|
|
|
19463
19660
|
// node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/NodeSink.js
|
|
19661
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
19464
19662
|
var fromWritable = (options3) => fromChannel2(mapDone(fromWritableChannel(options3), (_) => [_]));
|
|
19465
19663
|
var fromWritableChannel = (options3) => fromTransform((pull) => {
|
|
19466
19664
|
const writable = options3.evaluate();
|
|
@@ -19520,6 +19718,7 @@ var pullIntoWritable = (options3) => options3.pull.pipe(flatMap5((chunk) => {
|
|
|
19520
19718
|
})));
|
|
19521
19719
|
|
|
19522
19720
|
// node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/NodeStream.js
|
|
19721
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
19523
19722
|
var fromReadable = (options3) => fromChannel3(fromReadableChannel(options3));
|
|
19524
19723
|
var fromReadableChannel = (options3) => fromTransform((_, scope3) => readableToPullUnsafe({
|
|
19525
19724
|
scope: scope3,
|
|
@@ -20162,8 +20361,10 @@ __export(HttpClient_exports, {
|
|
|
20162
20361
|
withRateLimiter: () => withRateLimiter,
|
|
20163
20362
|
withScope: () => withScope
|
|
20164
20363
|
});
|
|
20364
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
20165
20365
|
|
|
20166
20366
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Ref.js
|
|
20367
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
20167
20368
|
var TypeId35 = "~effect/Ref";
|
|
20168
20369
|
var RefProto = {
|
|
20169
20370
|
[TypeId35]: {
|
|
@@ -20183,6 +20384,7 @@ var update2 = /* @__PURE__ */ dual(2, (self, f) => sync3(() => {
|
|
|
20183
20384
|
}));
|
|
20184
20385
|
|
|
20185
20386
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/Cookies.js
|
|
20387
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
20186
20388
|
var TypeId36 = "~effect/http/Cookies";
|
|
20187
20389
|
var isCookies = (u) => hasProperty(u, TypeId36);
|
|
20188
20390
|
var CookieTypeId = "~effect/http/Cookies/Cookie";
|
|
@@ -20512,6 +20714,9 @@ var tryDecodeURIComponent = (str) => {
|
|
|
20512
20714
|
}
|
|
20513
20715
|
};
|
|
20514
20716
|
|
|
20717
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/Headers.js
|
|
20718
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
20719
|
+
|
|
20515
20720
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Redacted.js
|
|
20516
20721
|
var Redacted_exports = {};
|
|
20517
20722
|
__export(Redacted_exports, {
|
|
@@ -20521,8 +20726,10 @@ __export(Redacted_exports, {
|
|
|
20521
20726
|
value: () => value2,
|
|
20522
20727
|
wipeUnsafe: () => wipeUnsafe
|
|
20523
20728
|
});
|
|
20729
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
20524
20730
|
|
|
20525
20731
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/redacted.js
|
|
20732
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
20526
20733
|
var redactedRegistry = /* @__PURE__ */ new WeakMap();
|
|
20527
20734
|
var value = (self) => {
|
|
20528
20735
|
if (redactedRegistry.has(self)) {
|
|
@@ -20689,6 +20896,9 @@ var CurrentRedactedNames = /* @__PURE__ */ Reference("effect/Headers/CurrentReda
|
|
|
20689
20896
|
defaultValue: () => ["authorization", "cookie", "set-cookie", "x-api-key"]
|
|
20690
20897
|
});
|
|
20691
20898
|
|
|
20899
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/HttpBody.js
|
|
20900
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
20901
|
+
|
|
20692
20902
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Schema.js
|
|
20693
20903
|
var Schema_exports = {};
|
|
20694
20904
|
__export(Schema_exports, {
|
|
@@ -21061,8 +21271,13 @@ __export(Schema_exports, {
|
|
|
21061
21271
|
withDecodingDefaultType: () => withDecodingDefaultType,
|
|
21062
21272
|
withDecodingDefaultTypeKey: () => withDecodingDefaultTypeKey
|
|
21063
21273
|
});
|
|
21274
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
21275
|
+
|
|
21276
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/HashMap.js
|
|
21277
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
21064
21278
|
|
|
21065
21279
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/hashMap.js
|
|
21280
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
21066
21281
|
var HashMapTypeId = "~effect/HashMap";
|
|
21067
21282
|
var SHIFT = 5;
|
|
21068
21283
|
var BUCKET_SIZE = 1 << SHIFT;
|
|
@@ -21704,7 +21919,11 @@ var entries2 = entries;
|
|
|
21704
21919
|
var toEntries = (self) => Array.from(entries2(self));
|
|
21705
21920
|
var size4 = size3;
|
|
21706
21921
|
|
|
21922
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/HashSet.js
|
|
21923
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
21924
|
+
|
|
21707
21925
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/hashSet.js
|
|
21926
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
21708
21927
|
var HashSetTypeId = "~effect/HashSet";
|
|
21709
21928
|
var hashSetSeed = /* @__PURE__ */ string(HashSetTypeId);
|
|
21710
21929
|
var HashSetProto = {
|
|
@@ -21765,9 +21984,11 @@ var isHashSet2 = isHashSet;
|
|
|
21765
21984
|
var size6 = size5;
|
|
21766
21985
|
|
|
21767
21986
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/internal/urlParams.js
|
|
21987
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
21768
21988
|
var unwrap5 = (value4) => typeof value4 === "string" ? value4 : value2(value4);
|
|
21769
21989
|
|
|
21770
21990
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/UrlParams.js
|
|
21991
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
21771
21992
|
var TypeId39 = "~effect/http/UrlParams";
|
|
21772
21993
|
var isUrlParams = (u) => hasProperty(u, TypeId39);
|
|
21773
21994
|
var Proto8 = {
|
|
@@ -21927,6 +22148,7 @@ var CurrentRedactedNames2 = /* @__PURE__ */ Reference("effect/http/UrlParams/Cur
|
|
|
21927
22148
|
});
|
|
21928
22149
|
|
|
21929
22150
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/graph.js
|
|
22151
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
21930
22152
|
var TypeId40 = "~effect/Graph";
|
|
21931
22153
|
var isGraph = (u) => hasProperty(u, TypeId40);
|
|
21932
22154
|
var toImpl = (graph) => graph;
|
|
@@ -22050,7 +22272,17 @@ var hydrate = (snapshot2) => {
|
|
|
22050
22272
|
return graph;
|
|
22051
22273
|
};
|
|
22052
22274
|
|
|
22275
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/make.js
|
|
22276
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
22277
|
+
|
|
22278
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/SchemaParser.js
|
|
22279
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
22280
|
+
|
|
22281
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/compilerRegistry.js
|
|
22282
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
22283
|
+
|
|
22053
22284
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/interpreter.js
|
|
22285
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
22054
22286
|
var flatMapTransformation = (result4, current, f) => result4 === sameExit ? f(current) : flatMapEager2(result4, f);
|
|
22055
22287
|
function compileTransformation(transformation) {
|
|
22056
22288
|
if (transformation._tag === "Middleware") {
|
|
@@ -22628,7 +22860,14 @@ function make35(ast, options3) {
|
|
|
22628
22860
|
return self;
|
|
22629
22861
|
}
|
|
22630
22862
|
|
|
22863
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/standardSchema.js
|
|
22864
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
22865
|
+
|
|
22866
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/JsonSchema.js
|
|
22867
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
22868
|
+
|
|
22631
22869
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/JsonPointer.js
|
|
22870
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
22632
22871
|
function escapeToken(token) {
|
|
22633
22872
|
return token.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
22634
22873
|
}
|
|
@@ -23019,6 +23258,7 @@ function convertLegacyId(source, out, targetKey, dialect) {
|
|
|
23019
23258
|
}
|
|
23020
23259
|
|
|
23021
23260
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/toCodec.js
|
|
23261
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
23022
23262
|
function toCodecJson(schema2) {
|
|
23023
23263
|
return make35(toCodecJsonAST(schema2.ast), {
|
|
23024
23264
|
schema: schema2
|
|
@@ -23226,11 +23466,16 @@ function toCodecArrayFromSingleASTStep(ast) {
|
|
|
23226
23466
|
return ast._tag === "Declaration" || ast._tag === "Arrays" || ast._tag === "Objects" || ast._tag === "Union" || ast._tag === "Suspend" ? ast.recur(toCodecArrayFromSingleAST) : ast;
|
|
23227
23467
|
}
|
|
23228
23468
|
|
|
23469
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/toJsonSchemaDocument.js
|
|
23470
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
23471
|
+
|
|
23229
23472
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/RegExp.js
|
|
23473
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
23230
23474
|
var RegExp2 = globalThis.RegExp;
|
|
23231
23475
|
var escape = (string3) => string3.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
23232
23476
|
|
|
23233
23477
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/errors.js
|
|
23478
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
23234
23479
|
function errorWithPath(message, path) {
|
|
23235
23480
|
if (path.length > 0) {
|
|
23236
23481
|
message += `
|
|
@@ -23889,6 +24134,7 @@ function toJsonSchemaDocument(document, options3) {
|
|
|
23889
24134
|
}
|
|
23890
24135
|
|
|
23891
24136
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/toRepresentation.js
|
|
24137
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
23892
24138
|
var defaultReferencePolicy = ({
|
|
23893
24139
|
identifier: identifier2
|
|
23894
24140
|
}) => identifier2;
|
|
@@ -24305,7 +24551,11 @@ function toStandardJSONSchemaV1(self) {
|
|
|
24305
24551
|
});
|
|
24306
24552
|
}
|
|
24307
24553
|
|
|
24554
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/toDifferJsonPatch.js
|
|
24555
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
24556
|
+
|
|
24308
24557
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/JsonPatch.js
|
|
24558
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
24309
24559
|
function get9(oldValue, newValue) {
|
|
24310
24560
|
const patches = [];
|
|
24311
24561
|
getLoop(oldValue, newValue, "", patches);
|
|
@@ -24504,6 +24754,7 @@ function toDifferJsonPatch(schema2) {
|
|
|
24504
24754
|
}
|
|
24505
24755
|
|
|
24506
24756
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/toEncoderXml.js
|
|
24757
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
24507
24758
|
function toEncoderXml(codec, options3) {
|
|
24508
24759
|
const rootName = resolveIdentifier(codec.ast) ?? resolveTitle(codec.ast);
|
|
24509
24760
|
const serialize = encodeEffect(toCodecStringTree(codec));
|
|
@@ -24603,6 +24854,7 @@ var xml = {
|
|
|
24603
24854
|
};
|
|
24604
24855
|
|
|
24605
24856
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/toEquivalence.js
|
|
24857
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
24606
24858
|
var toEquivalence = /* @__PURE__ */ memoize((ast) => {
|
|
24607
24859
|
return recur(ast);
|
|
24608
24860
|
});
|
|
@@ -24787,6 +25039,7 @@ function causeEquivalence(error2, defect) {
|
|
|
24787
25039
|
}
|
|
24788
25040
|
|
|
24789
25041
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/toFormatter.js
|
|
25042
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
24790
25043
|
function causeReasonToFormatter(error2, defect) {
|
|
24791
25044
|
return (reason) => {
|
|
24792
25045
|
switch (reason._tag) {
|
|
@@ -25001,7 +25254,14 @@ function toFormatter(ast, options3) {
|
|
|
25001
25254
|
}
|
|
25002
25255
|
}
|
|
25003
25256
|
|
|
25257
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/toIso.js
|
|
25258
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
25259
|
+
|
|
25260
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Optic.js
|
|
25261
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
25262
|
+
|
|
25004
25263
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Struct.js
|
|
25264
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
25005
25265
|
var pick2 = /* @__PURE__ */ dual(2, (self, keys4) => {
|
|
25006
25266
|
return buildStruct(self, (k, v) => hasPropertyKey(keys4, k) ? [k, v] : void 0);
|
|
25007
25267
|
});
|
|
@@ -25393,12 +25653,14 @@ function toIsoFocus(_) {
|
|
|
25393
25653
|
}
|
|
25394
25654
|
|
|
25395
25655
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schemaError.js
|
|
25656
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
25396
25657
|
var SchemaErrorTypeId = "~effect/Schema/SchemaError";
|
|
25397
25658
|
function isSchemaError(u) {
|
|
25398
25659
|
return hasProperty(u, SchemaErrorTypeId) && u[SchemaErrorTypeId] === SchemaErrorTypeId;
|
|
25399
25660
|
}
|
|
25400
25661
|
|
|
25401
25662
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/net/IpInterface.js
|
|
25663
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
25402
25664
|
var TypeId42 = "~effect/net/IpInterface";
|
|
25403
25665
|
var isIpv4Interface = (u) => isIpInterface(u) && isIpv4Address(u.address);
|
|
25404
25666
|
var isIpv6Interface = (u) => isIpInterface(u) && isIpv6Address(u.address);
|
|
@@ -25461,6 +25723,7 @@ var fromString3 = (input, options3) => flatMap2(parseAddressWithPrefix(input, op
|
|
|
25461
25723
|
var format6 = (self) => `${formatIp(self.address)}/${self.prefixLength}`;
|
|
25462
25724
|
|
|
25463
25725
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/net/IpNetwork.js
|
|
25726
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
25464
25727
|
var TypeId43 = "~effect/net/IpNetwork";
|
|
25465
25728
|
var isIpv4Network = (u) => isIpNetwork(u) && isIpv4Address(u.address);
|
|
25466
25729
|
var isIpv6Network = (u) => isIpNetwork(u) && isIpv6Address(u.address);
|
|
@@ -29547,6 +29810,7 @@ var fileContentLength = /* @__PURE__ */ fnUntraced2(function* (size7, method, op
|
|
|
29547
29810
|
var file = (path, options3) => flatMap5(FileSystem, (fs) => flatMap5(fs.stat(path), (info2) => map8(fileContentLength(info2.size, "file", options3), (contentLength) => stream(fs.stream(path, options3), options3?.contentType, contentLength))));
|
|
29548
29811
|
|
|
29549
29812
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/HttpClientError.js
|
|
29813
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
29550
29814
|
var TypeId46 = "~effect/http/HttpClientError";
|
|
29551
29815
|
var isHttpClientError = (u) => hasProperty(u, TypeId46);
|
|
29552
29816
|
var HttpClientError = class extends (/* @__PURE__ */ TaggedError2("HttpClientError")) {
|
|
@@ -29749,12 +30013,15 @@ __export(HttpClientRequest_exports, {
|
|
|
29749
30013
|
updateHeaders: () => updateHeaders2,
|
|
29750
30014
|
updateUrl: () => updateUrl
|
|
29751
30015
|
});
|
|
30016
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
29752
30017
|
|
|
29753
30018
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/HttpMethod.js
|
|
30019
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
29754
30020
|
var hasBody = (method) => method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE";
|
|
29755
30021
|
var allShort = [["GET", "get"], ["POST", "post"], ["PUT", "put"], ["DELETE", "del"], ["PATCH", "patch"], ["HEAD", "head"], ["OPTIONS", "options"], ["TRACE", "trace"], ["QUERY", "query"]];
|
|
29756
30022
|
|
|
29757
30023
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/internal/compressionBody.js
|
|
30024
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
29758
30025
|
var compressionTransformWeb = (format8) => (stream2) => stream2.pipeThrough(new CompressionStream(format8));
|
|
29759
30026
|
var singleChunkStream = (data) => new ReadableStream({
|
|
29760
30027
|
start(controller) {
|
|
@@ -29779,6 +30046,7 @@ var compressBody = (body, algorithm, options3) => {
|
|
|
29779
30046
|
};
|
|
29780
30047
|
|
|
29781
30048
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/internal/httpBody.js
|
|
30049
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
29782
30050
|
var updateHeaders = (headers, body) => {
|
|
29783
30051
|
if (body._tag === "Empty" || body._tag === "FormData") {
|
|
29784
30052
|
return remove5(remove5(headers, "content-type"), "content-length");
|
|
@@ -29795,6 +30063,7 @@ var parseContentLength = (contentLength) => {
|
|
|
29795
30063
|
};
|
|
29796
30064
|
|
|
29797
30065
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/Url.js
|
|
30066
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
29798
30067
|
var UrlError = class extends (/* @__PURE__ */ TaggedError2("UrlError")) {
|
|
29799
30068
|
};
|
|
29800
30069
|
var make40 = (url, params, hash2) => try_({
|
|
@@ -30038,7 +30307,11 @@ var toWeb = (self, options3) => contextWith2((context3) => fromResult2(toWebResu
|
|
|
30038
30307
|
signal: options3?.signal
|
|
30039
30308
|
})));
|
|
30040
30309
|
|
|
30310
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/HttpClientResponse.js
|
|
30311
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
30312
|
+
|
|
30041
30313
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/HttpIncomingMessage.js
|
|
30314
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
30042
30315
|
var TypeId48 = "~effect/http/HttpIncomingMessage";
|
|
30043
30316
|
var inspect = (self, that) => {
|
|
30044
30317
|
const contentType = self.headers["content-type"] ?? "";
|
|
@@ -30206,6 +30479,7 @@ var WebHttpClientResponse = class extends Class2 {
|
|
|
30206
30479
|
};
|
|
30207
30480
|
|
|
30208
30481
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/HttpTraceContext.js
|
|
30482
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
30209
30483
|
var toHeaders = (span2) => fromRecordUnsafe({
|
|
30210
30484
|
b3: `${span2.traceId}-${span2.spanId}-${span2.sampled ? "1" : "0"}${match(span2.parent, {
|
|
30211
30485
|
onNone: () => "",
|
|
@@ -30215,6 +30489,7 @@ var toHeaders = (span2) => fromRecordUnsafe({
|
|
|
30215
30489
|
});
|
|
30216
30490
|
|
|
30217
30491
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/internal/tracing.js
|
|
30492
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
30218
30493
|
var defaultPorts = {
|
|
30219
30494
|
"http:": 80,
|
|
30220
30495
|
"https:": 443,
|
|
@@ -30795,9 +31070,11 @@ var isTooManyRequestsHttpClientError = (error2) => isHttpClientError(error2) &&
|
|
|
30795
31070
|
var isTransientResponse = (response) => response.status === 408 || response.status === 429 || response.status === 500 || response.status === 502 || response.status === 503 || response.status === 504;
|
|
30796
31071
|
|
|
30797
31072
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/LogLevel.js
|
|
31073
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
30798
31074
|
var values2 = ["All", "Fatal", "Error", "Warn", "Info", "Debug", "Trace", "None"];
|
|
30799
31075
|
|
|
30800
31076
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Stdio.js
|
|
31077
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
30801
31078
|
var TypeId51 = "~effect/Stdio";
|
|
30802
31079
|
var Stdio = /* @__PURE__ */ Service(TypeId51);
|
|
30803
31080
|
var make43 = (options3) => ({
|
|
@@ -30843,8 +31120,10 @@ __export(Config_exports, {
|
|
|
30843
31120
|
unwrap: () => unwrap6,
|
|
30844
31121
|
withDefault: () => withDefault3
|
|
30845
31122
|
});
|
|
31123
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
30846
31124
|
|
|
30847
31125
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/ConfigProvider.js
|
|
31126
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
30848
31127
|
function makeValue(value4) {
|
|
30849
31128
|
return {
|
|
30850
31129
|
_tag: "Value",
|
|
@@ -31218,7 +31497,11 @@ function Date5(name) {
|
|
|
31218
31497
|
}
|
|
31219
31498
|
var nested = /* @__PURE__ */ dual(2, (self, name) => make45((provider, pathPrefix) => evaluateAt(self, provider, [...pathPrefix, name])));
|
|
31220
31499
|
|
|
31500
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Crypto.js
|
|
31501
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
31502
|
+
|
|
31221
31503
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/ulid.js
|
|
31504
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
31222
31505
|
var maxTimestamp = 2 ** 48 - 1;
|
|
31223
31506
|
var base32Chars = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
31224
31507
|
var ulidString = (timestampMillis, bytes2) => {
|
|
@@ -31245,6 +31528,7 @@ var ulidString = (timestampMillis, bytes2) => {
|
|
|
31245
31528
|
};
|
|
31246
31529
|
|
|
31247
31530
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/uuid.js
|
|
31531
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
31248
31532
|
var hex = (byte) => byte.toString(16).padStart(2, "0");
|
|
31249
31533
|
var stringify = (bytes2) => {
|
|
31250
31534
|
const segments = [bytes2.subarray(0, 4), bytes2.subarray(4, 6), bytes2.subarray(6, 8), bytes2.subarray(8, 10), bytes2.subarray(10, 16)];
|
|
@@ -31335,7 +31619,11 @@ var validateSize = (method, size7) => Number.isSafeInteger(size7) && size7 >= 0
|
|
|
31335
31619
|
description: "size must be a non-negative safe integer"
|
|
31336
31620
|
}));
|
|
31337
31621
|
|
|
31622
|
+
// node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.3.0/node_modules/@effect/platform-node/dist/NodeCrypto.js
|
|
31623
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
31624
|
+
|
|
31338
31625
|
// node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/NodeCrypto.js
|
|
31626
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
31339
31627
|
import * as NodeCrypto from "node:crypto";
|
|
31340
31628
|
var toHashAlgorithm = (algorithm) => {
|
|
31341
31629
|
switch (algorithm) {
|
|
@@ -31368,7 +31656,11 @@ var layer3 = /* @__PURE__ */ succeed5(Crypto, make47);
|
|
|
31368
31656
|
// node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.3.0/node_modules/@effect/platform-node/dist/NodeCrypto.js
|
|
31369
31657
|
var layer4 = layer3;
|
|
31370
31658
|
|
|
31659
|
+
// node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.3.0/node_modules/@effect/platform-node/dist/NodeFileSystem.js
|
|
31660
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
31661
|
+
|
|
31371
31662
|
// node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/NodeFileSystem.js
|
|
31663
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
31372
31664
|
import * as Crypto2 from "node:crypto";
|
|
31373
31665
|
import * as NFS from "node:fs";
|
|
31374
31666
|
import * as OS from "node:os";
|
|
@@ -31854,6 +32146,7 @@ __export(FetchHttpClient_exports, {
|
|
|
31854
32146
|
RequestInit: () => RequestInit,
|
|
31855
32147
|
layer: () => layer7
|
|
31856
32148
|
});
|
|
32149
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
31857
32150
|
var Fetch = /* @__PURE__ */ Reference("effect/http/FetchHttpClient/Fetch", {
|
|
31858
32151
|
defaultValue: () => globalThis.fetch
|
|
31859
32152
|
});
|
|
@@ -31900,8 +32193,13 @@ var NodeServices_exports = {};
|
|
|
31900
32193
|
__export(NodeServices_exports, {
|
|
31901
32194
|
layer: () => layer14
|
|
31902
32195
|
});
|
|
32196
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32197
|
+
|
|
32198
|
+
// node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.3.0/node_modules/@effect/platform-node/dist/NodePath.js
|
|
32199
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
31903
32200
|
|
|
31904
32201
|
// node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/NodePath.js
|
|
32202
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
31905
32203
|
import * as NodePath from "node:path";
|
|
31906
32204
|
import * as NodeUrl from "node:url";
|
|
31907
32205
|
var fileUrlOps = (windows) => ({
|
|
@@ -31942,7 +32240,11 @@ var layer8 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make21({
|
|
|
31942
32240
|
// node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.3.0/node_modules/@effect/platform-node/dist/NodePath.js
|
|
31943
32241
|
var layer9 = layer8;
|
|
31944
32242
|
|
|
32243
|
+
// node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.3.0/node_modules/@effect/platform-node/dist/NodeStdio.js
|
|
32244
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32245
|
+
|
|
31945
32246
|
// node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/NodeStdio.js
|
|
32247
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
31946
32248
|
var layer10 = /* @__PURE__ */ succeed5(Stdio, /* @__PURE__ */ make43({
|
|
31947
32249
|
args: /* @__PURE__ */ sync3(() => process.argv.slice(2)),
|
|
31948
32250
|
stdinIsTerminal: /* @__PURE__ */ sync3(() => process.stdin.isTTY === true),
|
|
@@ -31983,7 +32285,14 @@ var layer10 = /* @__PURE__ */ succeed5(Stdio, /* @__PURE__ */ make43({
|
|
|
31983
32285
|
// node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.3.0/node_modules/@effect/platform-node/dist/NodeStdio.js
|
|
31984
32286
|
var layer11 = layer10;
|
|
31985
32287
|
|
|
32288
|
+
// node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.3.0/node_modules/@effect/platform-node/dist/NodeTerminal.js
|
|
32289
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32290
|
+
|
|
32291
|
+
// node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/NodeTerminal.js
|
|
32292
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32293
|
+
|
|
31986
32294
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Terminal.js
|
|
32295
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
31987
32296
|
var TypeId54 = "~effect/Terminal";
|
|
31988
32297
|
var QuitErrorTypeId = "~effect/Terminal/QuitError";
|
|
31989
32298
|
var QuitError = class extends (/* @__PURE__ */ Error4("QuitError")({
|
|
@@ -32136,6 +32445,10 @@ var NodeRuntime_exports = {};
|
|
|
32136
32445
|
__export(NodeRuntime_exports, {
|
|
32137
32446
|
runMain: () => runMain2
|
|
32138
32447
|
});
|
|
32448
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32449
|
+
|
|
32450
|
+
// node_modules/.pnpm/@effect+platform-node-shared@4.0.5_effect@4.0.5/node_modules/@effect/platform-node-shared/dist/NodeRuntime.js
|
|
32451
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32139
32452
|
|
|
32140
32453
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Runtime.js
|
|
32141
32454
|
var Runtime_exports = {};
|
|
@@ -32147,6 +32460,7 @@ __export(Runtime_exports, {
|
|
|
32147
32460
|
getErrorReported: () => getErrorReported,
|
|
32148
32461
|
makeRunMain: () => makeRunMain
|
|
32149
32462
|
});
|
|
32463
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32150
32464
|
var defaultTeardown = (exit3, onExit5) => {
|
|
32151
32465
|
if (isSuccess4(exit3)) return onExit5(0);
|
|
32152
32466
|
if (hasInterruptsOnly2(exit3.cause)) return onExit5(130);
|
|
@@ -32218,6 +32532,9 @@ var runMain = /* @__PURE__ */ makeRunMain(({
|
|
|
32218
32532
|
// node_modules/.pnpm/@effect+platform-node@4.0.5_effect@4.0.5_redis@6.3.0/node_modules/@effect/platform-node/dist/NodeRuntime.js
|
|
32219
32533
|
var runMain2 = runMain;
|
|
32220
32534
|
|
|
32535
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/index.js
|
|
32536
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32537
|
+
|
|
32221
32538
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Console.js
|
|
32222
32539
|
var Console_exports = {};
|
|
32223
32540
|
__export(Console_exports, {
|
|
@@ -32242,6 +32559,7 @@ __export(Console_exports, {
|
|
|
32242
32559
|
withGroup: () => withGroup,
|
|
32243
32560
|
withTime: () => withTime
|
|
32244
32561
|
});
|
|
32562
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32245
32563
|
var Console = ConsoleRef;
|
|
32246
32564
|
var consoleWith = (f) => withFiber((fiber3) => f(fiber3.getRef(Console)));
|
|
32247
32565
|
var assert = (condition, ...args2) => consoleWith((console) => sync(() => {
|
|
@@ -32315,6 +32633,9 @@ var withTime = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, label)
|
|
|
32315
32633
|
console.timeEnd(label);
|
|
32316
32634
|
}))));
|
|
32317
32635
|
|
|
32636
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/index.js
|
|
32637
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32638
|
+
|
|
32318
32639
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/Argument.js
|
|
32319
32640
|
var Argument_exports = {};
|
|
32320
32641
|
__export(Argument_exports, {
|
|
@@ -32351,6 +32672,10 @@ __export(Argument_exports, {
|
|
|
32351
32672
|
withMetavar: () => withMetavar2,
|
|
32352
32673
|
withSchema: () => withSchema2
|
|
32353
32674
|
});
|
|
32675
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32676
|
+
|
|
32677
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/Param.js
|
|
32678
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32354
32679
|
|
|
32355
32680
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/CliError.js
|
|
32356
32681
|
var CliError_exports = {};
|
|
@@ -32367,6 +32692,7 @@ __export(CliError_exports, {
|
|
|
32367
32692
|
UserError: () => UserError,
|
|
32368
32693
|
isCliError: () => isCliError
|
|
32369
32694
|
});
|
|
32695
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32370
32696
|
var TypeId55 = "~effect/cli/CliError";
|
|
32371
32697
|
var isCliError = (u) => hasProperty(u, TypeId55);
|
|
32372
32698
|
var UnrecognizedOption = class extends (/* @__PURE__ */ TaggedError3(`${TypeId55}/UnrecognizedOption`)("UnrecognizedOption", {
|
|
@@ -32580,7 +32906,11 @@ var ShowHelp = class extends (/* @__PURE__ */ TaggedError3(`${TypeId55}/ShowHelp
|
|
|
32580
32906
|
}
|
|
32581
32907
|
};
|
|
32582
32908
|
|
|
32909
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/Primitive.js
|
|
32910
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32911
|
+
|
|
32583
32912
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/encoding/Ini.js
|
|
32913
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32584
32914
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
32585
32915
|
var splitSections = (value4) => {
|
|
32586
32916
|
const sections = [];
|
|
@@ -32700,6 +33030,7 @@ var parse2 = (input) => {
|
|
|
32700
33030
|
};
|
|
32701
33031
|
|
|
32702
33032
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/encoding/Toml.js
|
|
33033
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
32703
33034
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
32704
33035
|
var makeTable = () => /* @__PURE__ */ Object.create(null);
|
|
32705
33036
|
var isTable = (value4) => typeof value4 === "object" && value4 !== null && !Array.isArray(value4) && !(value4 instanceof Date);
|
|
@@ -32879,15 +33210,15 @@ var TomlParser = class {
|
|
|
32879
33210
|
}
|
|
32880
33211
|
parseDate(token) {
|
|
32881
33212
|
const date = "\\d{4}-\\d{2}-\\d{2}";
|
|
32882
|
-
const
|
|
32883
|
-
if (new RegExp(`^${date}[Tt]${
|
|
33213
|
+
const time4 = "\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?";
|
|
33214
|
+
if (new RegExp(`^${date}[Tt]${time4}(?:[Zz]|[+-]\\d{2}:\\d{2})$`).test(token)) {
|
|
32884
33215
|
const value4 = new Date(token.replace("t", "T").replace("z", "Z"));
|
|
32885
33216
|
if (Number.isNaN(value4.getTime())) {
|
|
32886
33217
|
this.fail(`Invalid date-time '${token}'`);
|
|
32887
33218
|
}
|
|
32888
33219
|
return value4;
|
|
32889
33220
|
}
|
|
32890
|
-
if (new RegExp(`^${date}[Tt]${
|
|
33221
|
+
if (new RegExp(`^${date}[Tt]${time4}$`).test(token) || new RegExp(`^${date}$`).test(token) || new RegExp(`^${time4}$`).test(token)) {
|
|
32891
33222
|
return token.replace("t", "T");
|
|
32892
33223
|
}
|
|
32893
33224
|
return void 0;
|
|
@@ -33118,6 +33449,7 @@ var TomlParser = class {
|
|
|
33118
33449
|
var parse3 = (input) => new TomlParser(input.replace(/^\uFEFF/, "")).parse();
|
|
33119
33450
|
|
|
33120
33451
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/encoding/Yaml.js
|
|
33452
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
33121
33453
|
var hasOwn3 = Object.prototype.hasOwnProperty;
|
|
33122
33454
|
var setProperty = (record2, key, value4) => {
|
|
33123
33455
|
Object.defineProperty(record2, key, {
|
|
@@ -33780,7 +34112,11 @@ var getTypeName = (primitive) => {
|
|
|
33780
34112
|
var getChoiceKeys = (primitive) => primitive._tag === "Choice" ? primitive.choiceKeys : void 0;
|
|
33781
34113
|
var getPathType = (primitive) => primitive._tag === "Path" ? primitive.pathType : void 0;
|
|
33782
34114
|
|
|
34115
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/Prompt.js
|
|
34116
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
34117
|
+
|
|
33783
34118
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/ansi.js
|
|
34119
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
33784
34120
|
var ESC = "\x1B[";
|
|
33785
34121
|
var BEL = "\x07";
|
|
33786
34122
|
var SEP = ";";
|
|
@@ -35968,7 +36304,14 @@ var filterMap7 = /* @__PURE__ */ dual(3, (self, f, onNone) => filterMap6(self, f
|
|
|
35968
36304
|
var orElse4 = /* @__PURE__ */ dual(2, (self, that) => orElse3(self, that));
|
|
35969
36305
|
var orElseResult3 = /* @__PURE__ */ dual(2, (self, that) => orElseResult2(self, that));
|
|
35970
36306
|
|
|
36307
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/CliConfig.js
|
|
36308
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
36309
|
+
|
|
36310
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/GlobalFlag.js
|
|
36311
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
36312
|
+
|
|
35971
36313
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/CliOutput.js
|
|
36314
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
35972
36315
|
var Formatter = /* @__PURE__ */ Reference("effect/cli/CliOutput", {
|
|
35973
36316
|
defaultValue: () => defaultFormatter2()
|
|
35974
36317
|
});
|
|
@@ -36185,7 +36528,20 @@ var formatHelpDocImpl = (doc, colors2) => {
|
|
|
36185
36528
|
return sections.join("\n");
|
|
36186
36529
|
};
|
|
36187
36530
|
|
|
36531
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/Completions.js
|
|
36532
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
36533
|
+
|
|
36534
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/completions/bash.js
|
|
36535
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
36536
|
+
|
|
36537
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/completions/descriptor.js
|
|
36538
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
36539
|
+
|
|
36540
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/command.js
|
|
36541
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
36542
|
+
|
|
36188
36543
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/config.js
|
|
36544
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
36189
36545
|
var ConfigInternalTypeId = "~effect/cli/Command/Config/Internal";
|
|
36190
36546
|
var parseConfig = (config2) => {
|
|
36191
36547
|
const orderedParams = [];
|
|
@@ -36908,6 +37264,7 @@ var generate = (executableName, descriptor) => {
|
|
|
36908
37264
|
};
|
|
36909
37265
|
|
|
36910
37266
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/completions/fish.js
|
|
37267
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
36911
37268
|
var escapeFishString = (s) => s.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
36912
37269
|
var escapeFishChoice = (s) => escapeFishString(s.replace(/[^A-Za-z0-9_.,/@%+-]/gu, "\\$&"));
|
|
36913
37270
|
var subcommandCondition = (parentPath, childSubcommandNames) => {
|
|
@@ -37084,6 +37441,7 @@ var generate2 = (executableName, descriptor) => {
|
|
|
37084
37441
|
};
|
|
37085
37442
|
|
|
37086
37443
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/completions/powershell.js
|
|
37444
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
37087
37445
|
var quotePs = (s) => {
|
|
37088
37446
|
const parts2 = [];
|
|
37089
37447
|
let literal = "";
|
|
@@ -37341,6 +37699,7 @@ var generate3 = (executableName, descriptor) => {
|
|
|
37341
37699
|
};
|
|
37342
37700
|
|
|
37343
37701
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/completions/zsh.js
|
|
37702
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
37344
37703
|
var escapeZsh = (s) => s.replace(/\\/g, "\\\\").replace(/'/g, "'\\''").replace(/:/g, "\\:");
|
|
37345
37704
|
var escapeZshExplanation = (s) => escapeZsh(s).replace(/]/g, "\\]");
|
|
37346
37705
|
var escapeZshChoice = (s) => s.replace(/[^A-Za-z0-9_.,/@%+-]/gu, "\\$&").replace(/'/g, "'\\''");
|
|
@@ -37562,6 +37921,7 @@ __export(Flag_exports, {
|
|
|
37562
37921
|
withOptionalValue: () => withOptionalValue2,
|
|
37563
37922
|
withSchema: () => withSchema3
|
|
37564
37923
|
});
|
|
37924
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
37565
37925
|
var String12 = (name) => String10(flagKind, name);
|
|
37566
37926
|
var Boolean7 = (name) => Boolean6(flagKind, name);
|
|
37567
37927
|
var Int7 = (name) => Int5(flagKind, name);
|
|
@@ -37600,6 +37960,7 @@ var orElseResult4 = /* @__PURE__ */ dual(2, (self, that) => orElseResult2(self,
|
|
|
37600
37960
|
var withSchema3 = /* @__PURE__ */ dual(2, (self, schema2) => withSchema(self, schema2));
|
|
37601
37961
|
|
|
37602
37962
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/help.js
|
|
37963
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
37603
37964
|
var dedupeGlobalFlags = (flags) => {
|
|
37604
37965
|
const seen = /* @__PURE__ */ new Set();
|
|
37605
37966
|
const deduped = [];
|
|
@@ -37794,8 +38155,10 @@ __export(Command_exports, {
|
|
|
37794
38155
|
withSubcommands: () => withSubcommands,
|
|
37795
38156
|
wizard: () => wizard
|
|
37796
38157
|
});
|
|
38158
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
37797
38159
|
|
|
37798
38160
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/lexer.js
|
|
38161
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
37799
38162
|
function lex(argv) {
|
|
37800
38163
|
const endIndex = argv.indexOf("--");
|
|
37801
38164
|
if (endIndex === -1) {
|
|
@@ -37867,7 +38230,11 @@ var lexTokens = (args2) => {
|
|
|
37867
38230
|
return tokens;
|
|
37868
38231
|
};
|
|
37869
38232
|
|
|
38233
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/parser.js
|
|
38234
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
38235
|
+
|
|
37870
38236
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/auto-suggest.js
|
|
38237
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
37871
38238
|
var levenshtein = (a, b) => {
|
|
37872
38239
|
const m = a.length;
|
|
37873
38240
|
const n = b.length;
|
|
@@ -38402,6 +38769,7 @@ var scanCommandLevel = (tokens, context3) => {
|
|
|
38402
38769
|
};
|
|
38403
38770
|
|
|
38404
38771
|
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/cli/internal/wizard.js
|
|
38772
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
38405
38773
|
var run4 = /* @__PURE__ */ fnUntraced2(function* (command2, options3) {
|
|
38406
38774
|
const commandPath = options3?.commandPath ?? [command2.name];
|
|
38407
38775
|
const selected = getCommandAtPath(command2, commandPath);
|
|
@@ -38991,10 +39359,13 @@ var runWith2 = (command2, config2) => {
|
|
|
38991
39359
|
}, catchFilter2((error2) => isCliError(error2) && error2._tag === "ShowHelp" ? succeed2(error2) : fail2(error2), (error2) => andThen3(showHelp(command2, error2, config2.renderErrors !== false), fail6(error2))), catchFilter2((error2) => config2.renderErrors !== false && isCliError(error2) && error2._tag === "UserError" ? succeed2(error2) : fail2(error2), (error2) => andThen3(showUserError(error2), fail6(error2))), catchFilter2((e) => isQuitError(e) ? succeed2(e) : fail2(e), (_) => interrupt3));
|
|
38992
39360
|
};
|
|
38993
39361
|
|
|
39362
|
+
// cli/src/cli.ts
|
|
39363
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39364
|
+
|
|
38994
39365
|
// cli/package.json
|
|
38995
39366
|
var package_default = {
|
|
38996
39367
|
name: "eraspace-cli",
|
|
38997
|
-
version: "0.
|
|
39368
|
+
version: "0.4.1",
|
|
38998
39369
|
private: true,
|
|
38999
39370
|
license: "MIT",
|
|
39000
39371
|
type: "module",
|
|
@@ -39022,14 +39393,29 @@ var package_default = {
|
|
|
39022
39393
|
}
|
|
39023
39394
|
};
|
|
39024
39395
|
|
|
39396
|
+
// cli/src/auth.ts
|
|
39397
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39398
|
+
|
|
39399
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/process/index.js
|
|
39400
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39401
|
+
|
|
39402
|
+
// cli/src/api.ts
|
|
39403
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39404
|
+
|
|
39405
|
+
// node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/http/index.js
|
|
39406
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39407
|
+
|
|
39025
39408
|
// cli/src/credentials.ts
|
|
39409
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39026
39410
|
import { homedir } from "node:os";
|
|
39027
39411
|
import { join as join4 } from "node:path";
|
|
39028
39412
|
|
|
39029
39413
|
// cli/src/config.ts
|
|
39414
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39030
39415
|
import { join as join3, resolve as resolve6 } from "node:path";
|
|
39031
39416
|
|
|
39032
39417
|
// cli/src/errors.ts
|
|
39418
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39033
39419
|
var EraspaceError = class extends Schema_exports.TaggedError()("EraspaceError", {
|
|
39034
39420
|
message: Schema_exports.String
|
|
39035
39421
|
}) {
|
|
@@ -39051,6 +39437,7 @@ function describe(error2) {
|
|
|
39051
39437
|
var messageOf = (error2) => error2 instanceof EraspaceError ? error2.message : describe(error2);
|
|
39052
39438
|
|
|
39053
39439
|
// cli/src/files.ts
|
|
39440
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39054
39441
|
var JsonObject2 = Schema_exports.Record(Schema_exports.String, Schema_exports.Unknown);
|
|
39055
39442
|
var readJsonObject = Effect_exports.fnUntraced(function* (path, hint2 = "") {
|
|
39056
39443
|
const fs = yield* FileSystem_exports.FileSystem;
|
|
@@ -39088,7 +39475,8 @@ var writeFileAtomic = Effect_exports.fnUntraced(function* (path, contents, mode)
|
|
|
39088
39475
|
var writeJson = (path, value4, mode) => writeFileAtomic(path, JSON.stringify(value4, null, 2) + "\n", mode);
|
|
39089
39476
|
|
|
39090
39477
|
// cli/src/config.ts
|
|
39091
|
-
var DEFAULT_URL = true ? "https://eraspace
|
|
39478
|
+
var DEFAULT_URL = true ? "https://eraspace.dev" : "http://localhost:4000";
|
|
39479
|
+
var MOVED_ORIGINS = typeof define_ERASPACE_MOVED_ORIGINS_default === "object" ? define_ERASPACE_MOVED_ORIGINS_default : {};
|
|
39092
39480
|
var APP_NAME_RE = /^[a-z][a-z0-9-]{0,30}$/;
|
|
39093
39481
|
var assets = Effect_exports.gen(function* () {
|
|
39094
39482
|
const fs = yield* FileSystem_exports.FileSystem;
|
|
@@ -39118,7 +39506,7 @@ var findRoot = Effect_exports.fnUntraced(function* (start) {
|
|
|
39118
39506
|
dir3 = up;
|
|
39119
39507
|
}
|
|
39120
39508
|
});
|
|
39121
|
-
function
|
|
39509
|
+
function parseOrigin(url) {
|
|
39122
39510
|
let parsed;
|
|
39123
39511
|
try {
|
|
39124
39512
|
parsed = new URL(url);
|
|
@@ -39128,6 +39516,14 @@ function canonicalOrigin(url) {
|
|
|
39128
39516
|
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return fail12(`Platform URLs must use http or https: ${url}`);
|
|
39129
39517
|
return Effect_exports.succeed(parsed.origin);
|
|
39130
39518
|
}
|
|
39519
|
+
var currentOrigin = (origin) => Object.hasOwn(MOVED_ORIGINS, origin) ? MOVED_ORIGINS[origin] : origin;
|
|
39520
|
+
var originKeys = (origin) => [
|
|
39521
|
+
origin,
|
|
39522
|
+
...Object.keys(MOVED_ORIGINS).filter((old) => MOVED_ORIGINS[old] === origin && old !== origin)
|
|
39523
|
+
];
|
|
39524
|
+
function canonicalOrigin(url) {
|
|
39525
|
+
return Effect_exports.map(parseOrigin(url), currentOrigin);
|
|
39526
|
+
}
|
|
39131
39527
|
var decodeProject = Schema_exports.decodeUnknownEffect(ProjectFile);
|
|
39132
39528
|
var readProject = Effect_exports.fnUntraced(function* (root) {
|
|
39133
39529
|
const path = (yield* Path_exports.Path).join(root, "eraspace.json");
|
|
@@ -39153,11 +39549,13 @@ var loadConfig = Effect_exports.fnUntraced(function* (opts = {}) {
|
|
|
39153
39549
|
const root = (yield* findRoot(start)) ?? start;
|
|
39154
39550
|
const file2 = yield* readProject(root);
|
|
39155
39551
|
const envUrl = yield* envOption("ERASPACE_URL");
|
|
39156
|
-
const
|
|
39157
|
-
const
|
|
39158
|
-
if (
|
|
39159
|
-
return yield* fail12(`Platform URLs must be a canonical origin without a path, query, credentials or fragment: use ${
|
|
39552
|
+
const requested = (opts.url ?? envUrl ?? file2.url ?? DEFAULT_URL).replace(/\/+$/, "");
|
|
39553
|
+
const written = yield* parseOrigin(requested);
|
|
39554
|
+
if (requested !== written) {
|
|
39555
|
+
return yield* fail12(`Platform URLs must be a canonical origin without a path, query, credentials or fragment: use ${written}.`);
|
|
39160
39556
|
}
|
|
39557
|
+
const url = currentOrigin(written);
|
|
39558
|
+
const origin = url;
|
|
39161
39559
|
const app = opts.app ?? (yield* envOption("ERASPACE_APP"));
|
|
39162
39560
|
if (app !== void 0 && !APP_NAME_RE.test(app)) return yield* fail12(`Invalid app "${app}". Use a name or an app id.`);
|
|
39163
39561
|
if (file2.name !== void 0 && !APP_NAME_RE.test(file2.name)) {
|
|
@@ -39209,17 +39607,20 @@ var writeCredentials = Effect_exports.fnUntraced(function* (file2) {
|
|
|
39209
39607
|
});
|
|
39210
39608
|
var sessionFor = Effect_exports.fnUntraced(function* (origin) {
|
|
39211
39609
|
const file2 = yield* readCredentials;
|
|
39212
|
-
|
|
39610
|
+
const key = originKeys(origin).find((k) => Object.hasOwn(file2.sessions, k));
|
|
39611
|
+
return key === void 0 ? void 0 : file2.sessions[key];
|
|
39213
39612
|
});
|
|
39214
39613
|
var saveSession = Effect_exports.fnUntraced(function* (origin, session) {
|
|
39215
39614
|
const file2 = yield* readCredentials;
|
|
39615
|
+
for (const key of originKeys(origin)) delete file2.sessions[key];
|
|
39216
39616
|
file2.sessions[origin] = session;
|
|
39217
39617
|
yield* writeCredentials(file2);
|
|
39218
39618
|
});
|
|
39219
39619
|
var removeSession = Effect_exports.fnUntraced(function* (origin) {
|
|
39220
39620
|
const file2 = yield* readCredentials;
|
|
39221
|
-
|
|
39222
|
-
|
|
39621
|
+
const keys4 = originKeys(origin).filter((k) => Object.hasOwn(file2.sessions, k));
|
|
39622
|
+
if (keys4.length === 0) return false;
|
|
39623
|
+
for (const key of keys4) delete file2.sessions[key];
|
|
39223
39624
|
yield* writeCredentials(file2);
|
|
39224
39625
|
return true;
|
|
39225
39626
|
});
|
|
@@ -39232,10 +39633,11 @@ var envToken = Effect_exports.fnUntraced(function* (origin) {
|
|
|
39232
39633
|
`ERASPACE_TOKEN is set but ERASPACE_TOKEN_API is not. Set ERASPACE_TOKEN_API to the platform origin the token belongs to, for example https://eraspace.example.com.`
|
|
39233
39634
|
);
|
|
39234
39635
|
}
|
|
39235
|
-
const
|
|
39236
|
-
if (
|
|
39237
|
-
return yield* fail12(`ERASPACE_TOKEN_API must be a canonical origin (scheme, host and non-default port, no path): use ${
|
|
39636
|
+
const written = yield* parseOrigin(bound.value);
|
|
39637
|
+
if (written !== bound.value.replace(/\/+$/, "")) {
|
|
39638
|
+
return yield* fail12(`ERASPACE_TOKEN_API must be a canonical origin (scheme, host and non-default port, no path): use ${written}.`);
|
|
39238
39639
|
}
|
|
39640
|
+
const canonical = currentOrigin(written);
|
|
39239
39641
|
if (canonical !== origin) return yield* fail12(`Refusing to send ERASPACE_TOKEN to ${origin}: it is bound to ${canonical} by ERASPACE_TOKEN_API.`);
|
|
39240
39642
|
return Redacted_exports.make(token.value);
|
|
39241
39643
|
});
|
|
@@ -39247,6 +39649,7 @@ var bearerFor = Effect_exports.fnUntraced(function* (origin) {
|
|
|
39247
39649
|
});
|
|
39248
39650
|
|
|
39249
39651
|
// cli/src/format.ts
|
|
39652
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39250
39653
|
import { relative, resolve as resolve7 } from "node:path";
|
|
39251
39654
|
var useColor = !process.env.NO_COLOR && (process.stdout.isTTY || !!process.env.FORCE_COLOR);
|
|
39252
39655
|
var wrap = (open3, close3) => (s) => useColor ? `\x1B[${open3}m${s}\x1B[${close3}m` : s;
|
|
@@ -39314,12 +39717,12 @@ function findSpecifier(source, spec) {
|
|
|
39314
39717
|
}
|
|
39315
39718
|
function formatLog(l) {
|
|
39316
39719
|
const d = l.ts === void 0 ? /* @__PURE__ */ new Date() : new Date(typeof l.ts === "number" ? l.ts : Date.parse(l.ts));
|
|
39317
|
-
const
|
|
39720
|
+
const time4 = isNaN(d.getTime()) ? String(l.ts) : d.toISOString().slice(11, 23);
|
|
39318
39721
|
const level = (l.level ?? "info").toLowerCase();
|
|
39319
39722
|
const color = level === "error" ? c.red : level === "warn" ? c.yellow : level === "debug" ? c.gray : c.blue;
|
|
39320
39723
|
const fn3 = l.fn ? c.magenta(l.fn) + " " : "";
|
|
39321
39724
|
const data = l.data === void 0 || l.data === null ? "" : " " + c.gray(JSON.stringify(l.data));
|
|
39322
|
-
return `${c.gray(
|
|
39725
|
+
return `${c.gray(time4)} ${color(level.padEnd(5))} ${fn3}${l.msg ?? ""}${data}`;
|
|
39323
39726
|
}
|
|
39324
39727
|
var SKIPPED = {
|
|
39325
39728
|
fetch: "uses fetch",
|
|
@@ -39404,7 +39807,13 @@ var Deployed = Schema_exports.Struct({
|
|
|
39404
39807
|
...App.fields,
|
|
39405
39808
|
version: Schema_exports.optional(Schema_exports.Number),
|
|
39406
39809
|
claimToken: Schema_exports.optional(Schema_exports.String),
|
|
39407
|
-
shadow: Schema_exports.optional(ShadowReport)
|
|
39810
|
+
shadow: Schema_exports.optional(ShadowReport),
|
|
39811
|
+
/** For a rollback: the kept version whose files were deployed again. */
|
|
39812
|
+
rolledBackTo: Schema_exports.optional(Schema_exports.Number)
|
|
39813
|
+
});
|
|
39814
|
+
var DeployHistory = Schema_exports.Struct({
|
|
39815
|
+
version: Schema_exports.optional(Schema_exports.Number),
|
|
39816
|
+
deploys: Schema_exports.optional(Schema_exports.Array(Schema_exports.Struct({ version: Schema_exports.Number, createdAt: Schema_exports.optional(Schema_exports.Number) })))
|
|
39408
39817
|
});
|
|
39409
39818
|
var AppList = Schema_exports.Struct({ apps: Schema_exports.Array(App) });
|
|
39410
39819
|
var StateChange = Schema_exports.Struct({ state: Schema_exports.String });
|
|
@@ -39421,7 +39830,7 @@ var Token2 = Schema_exports.Struct({
|
|
|
39421
39830
|
lastUsedAt: Schema_exports.optional(Timestamp)
|
|
39422
39831
|
});
|
|
39423
39832
|
var TokenList = Schema_exports.Struct({ tokens: Schema_exports.Array(Token2) });
|
|
39424
|
-
var CreatedToken = Schema_exports.Struct({ token: Schema_exports.String });
|
|
39833
|
+
var CreatedToken = Schema_exports.Struct({ token: Schema_exports.String, id: Schema_exports.String });
|
|
39425
39834
|
var DeviceStart = Schema_exports.Struct({
|
|
39426
39835
|
deviceCode: Schema_exports.String,
|
|
39427
39836
|
userCode: Schema_exports.String,
|
|
@@ -39591,9 +40000,11 @@ var whoami = Effect_exports.fnUntraced(function* (config2) {
|
|
|
39591
40000
|
});
|
|
39592
40001
|
|
|
39593
40002
|
// cli/src/deploy.ts
|
|
40003
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39594
40004
|
import { basename } from "node:path";
|
|
39595
40005
|
|
|
39596
40006
|
// cli/src/build.ts
|
|
40007
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39597
40008
|
import { dirname as dirname2, isAbsolute, join as join5, relative as relative2, resolve as resolve8, sep } from "node:path";
|
|
39598
40009
|
import * as esbuild from "esbuild";
|
|
39599
40010
|
import { parseSync } from "oxc-parser";
|
|
@@ -39866,6 +40277,7 @@ var buildCapsule = Effect_exports.fnUntraced(function* (root) {
|
|
|
39866
40277
|
});
|
|
39867
40278
|
|
|
39868
40279
|
// cli/src/state.ts
|
|
40280
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
39869
40281
|
import { join as join6 } from "node:path";
|
|
39870
40282
|
var LocalDeploy = Schema_exports.Struct({
|
|
39871
40283
|
appId: Schema_exports.String,
|
|
@@ -39881,7 +40293,8 @@ var readState = Effect_exports.fnUntraced(function* (root) {
|
|
|
39881
40293
|
});
|
|
39882
40294
|
var localDeploy = Effect_exports.fnUntraced(function* (root, origin) {
|
|
39883
40295
|
const state = yield* readState(root);
|
|
39884
|
-
|
|
40296
|
+
const key = originKeys(origin).find((k) => Object.hasOwn(state, k));
|
|
40297
|
+
return key === void 0 ? void 0 : state[key];
|
|
39885
40298
|
});
|
|
39886
40299
|
var write2 = Effect_exports.fnUntraced(function* (root, state) {
|
|
39887
40300
|
const fs = yield* FileSystem_exports.FileSystem;
|
|
@@ -39890,12 +40303,15 @@ var write2 = Effect_exports.fnUntraced(function* (root, state) {
|
|
|
39890
40303
|
yield* writeJson(statePath(root), state, 384);
|
|
39891
40304
|
});
|
|
39892
40305
|
var saveLocalDeploy = Effect_exports.fnUntraced(function* (root, origin, deploy2) {
|
|
39893
|
-
|
|
40306
|
+
const state = yield* readState(root);
|
|
40307
|
+
for (const key of originKeys(origin)) delete state[key];
|
|
40308
|
+
yield* write2(root, { ...state, [origin]: deploy2 });
|
|
39894
40309
|
});
|
|
39895
40310
|
var removeLocalDeploy = Effect_exports.fnUntraced(function* (root, origin) {
|
|
39896
40311
|
const state = yield* readState(root);
|
|
39897
|
-
|
|
39898
|
-
|
|
40312
|
+
const keys4 = originKeys(origin).filter((k) => Object.hasOwn(state, k));
|
|
40313
|
+
if (keys4.length === 0) return;
|
|
40314
|
+
for (const key of keys4) delete state[key];
|
|
39899
40315
|
yield* write2(root, state);
|
|
39900
40316
|
});
|
|
39901
40317
|
|
|
@@ -39961,6 +40377,11 @@ var createApp = Effect_exports.fnUntraced(function* (config2, payload, extra, op
|
|
|
39961
40377
|
return { result: result4, name: naming.name };
|
|
39962
40378
|
});
|
|
39963
40379
|
var deploy = Effect_exports.fnUntraced(function* (config2, opts = {}) {
|
|
40380
|
+
const t = yield* target(config2);
|
|
40381
|
+
if (t.ref && opts.name !== void 0)
|
|
40382
|
+
return yield* fail12(
|
|
40383
|
+
t.claim ? `--name only names a new app, and this checkout already deploys to ${t.ref}. Name it when you claim it: eraspace claim --name ${opts.name}` : `--name only names a new app, and this checkout already deploys to ${t.ref}. Add the name with eraspace names add ${opts.name}`
|
|
40384
|
+
);
|
|
39964
40385
|
const build3 = yield* buildCapsule(config2.root);
|
|
39965
40386
|
if (!build3.ok || !build3.payload)
|
|
39966
40387
|
return yield* fail12(yield* formatErrors(build3.errors, config2.root));
|
|
@@ -39972,7 +40393,6 @@ var deploy = Effect_exports.fnUntraced(function* (config2, opts = {}) {
|
|
|
39972
40393
|
...opts.failOnQueryErrors ? { failOnQueryErrors: true } : {}
|
|
39973
40394
|
};
|
|
39974
40395
|
const signedIn = (yield* bearerFor(config2.origin)) !== void 0;
|
|
39975
|
-
const t = yield* target(config2);
|
|
39976
40396
|
let result4;
|
|
39977
40397
|
if (t.ref) {
|
|
39978
40398
|
const payload = t.claim ? yield* withoutEnv(build3.payload) : build3.payload;
|
|
@@ -40035,6 +40455,40 @@ var deploy = Effect_exports.fnUntraced(function* (config2, opts = {}) {
|
|
|
40035
40455
|
}
|
|
40036
40456
|
return result4;
|
|
40037
40457
|
});
|
|
40458
|
+
var time2 = (ms) => ms === void 0 ? "" : new Date(ms).toISOString();
|
|
40459
|
+
var deploys = Effect_exports.fnUntraced(function* (config2, explicit) {
|
|
40460
|
+
const t = yield* requireTarget(config2, explicit);
|
|
40461
|
+
const history = yield* ok(DeployHistory)(config2, "GET", `/_api/apps/${enc(t.ref)}`, { claim: t.claim });
|
|
40462
|
+
const kept = history.deploys ?? [];
|
|
40463
|
+
if (!kept.length) return yield* Console_exports.log(`${t.ref} has no deploys.`);
|
|
40464
|
+
for (const d of kept) {
|
|
40465
|
+
const serving = d.version === history.version ? ` ${c.green("serving")}` : "";
|
|
40466
|
+
yield* Console_exports.log(`v${d.version} ${c.dim(time2(d.createdAt))}${serving}`);
|
|
40467
|
+
}
|
|
40468
|
+
if (kept.length >= 50) yield* Console_exports.log(c.dim(`Showing the latest ${kept.length}; any older kept versions still roll back by number: eraspace rollback <version>`));
|
|
40469
|
+
});
|
|
40470
|
+
var rollback = Effect_exports.fnUntraced(function* (config2, version, opts = {}) {
|
|
40471
|
+
const t = yield* requireTarget(config2);
|
|
40472
|
+
const deleteTables = yield* confirmedDeletes(opts.deleteTables);
|
|
40473
|
+
const body = {
|
|
40474
|
+
...version === void 0 ? {} : { version },
|
|
40475
|
+
...Object.keys(deleteTables).length ? { deleteTables } : {},
|
|
40476
|
+
...opts.shadow ? { shadow: true } : {},
|
|
40477
|
+
...opts.failOnQueryErrors ? { failOnQueryErrors: true } : {}
|
|
40478
|
+
};
|
|
40479
|
+
const path = `/_api/apps/${enc(t.ref)}/rollback`;
|
|
40480
|
+
const response = yield* api(config2, "POST", path, { body, claim: t.claim, timeout: DEPLOY_TIMEOUT });
|
|
40481
|
+
if (response.status >= 400 || response.json.ok === false) {
|
|
40482
|
+
const refused = Schema_exports.decodeUnknownOption(ShadowReport)(response.json.shadow);
|
|
40483
|
+
if (Option_exports.isSome(refused)) yield* Console_exports.log(formatShadow(refused.value));
|
|
40484
|
+
return yield* Effect_exports.fail(yield* failure(response, config2.root));
|
|
40485
|
+
}
|
|
40486
|
+
const result4 = yield* decode5(Deployed, response.json, `POST ${path}`);
|
|
40487
|
+
if (result4.shadow) yield* Console_exports.log(formatShadow(result4.shadow));
|
|
40488
|
+
const label = result4.names?.[0] ?? result4.id;
|
|
40489
|
+
yield* Console_exports.log(`${label} v${String(result4.version)}: rolled back to v${String(result4.rolledBackTo)}: ${result4.url ?? config2.url}`);
|
|
40490
|
+
return result4;
|
|
40491
|
+
});
|
|
40038
40492
|
var claimRequest = (config2, path, body, claim2) => api(config2, "POST", path, { body, claim: claim2 });
|
|
40039
40493
|
var claim = Effect_exports.fnUntraced(function* (config2, name) {
|
|
40040
40494
|
const local = yield* localDeploy(config2.root, config2.origin);
|
|
@@ -40082,10 +40536,14 @@ var IGNORED = /(^|[/\\])(node_modules|\.git|\.eraspace)([/\\]|$)/;
|
|
|
40082
40536
|
var isWatched = (file2) => !IGNORED.test(file2) && WATCHED.test(file2);
|
|
40083
40537
|
var dev = Effect_exports.fnUntraced(function* (config2, opts) {
|
|
40084
40538
|
const fs = yield* FileSystem_exports.FileSystem;
|
|
40539
|
+
let current = opts;
|
|
40085
40540
|
const redeploy = Effect_exports.suspend(
|
|
40086
40541
|
() => loadConfig({ dir: config2.root, app: config2.app, url: config2.url })
|
|
40087
40542
|
).pipe(
|
|
40088
|
-
Effect_exports.flatMap((
|
|
40543
|
+
Effect_exports.flatMap((loaded) => deploy(loaded, current)),
|
|
40544
|
+
Effect_exports.tap(() => Effect_exports.sync(() => {
|
|
40545
|
+
current = { ...current, name: void 0 };
|
|
40546
|
+
})),
|
|
40089
40547
|
Effect_exports.catch((error2) => Console_exports.error(messageOf(error2)))
|
|
40090
40548
|
);
|
|
40091
40549
|
yield* redeploy;
|
|
@@ -40099,6 +40557,7 @@ var dev = Effect_exports.fnUntraced(function* (config2, opts) {
|
|
|
40099
40557
|
});
|
|
40100
40558
|
|
|
40101
40559
|
// cli/src/logs.ts
|
|
40560
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
40102
40561
|
var LogTimeouts = Context_exports.Reference(
|
|
40103
40562
|
"eraspace/cli/LogTimeouts",
|
|
40104
40563
|
{ defaultValue: () => ({ idle: Duration_exports.seconds(75), stalled: Duration_exports.seconds(30), errorBody: Duration_exports.seconds(10) }) }
|
|
@@ -40190,10 +40649,11 @@ var logs = Effect_exports.fnUntraced(function* (config2, explicit, follow, limit
|
|
|
40190
40649
|
});
|
|
40191
40650
|
|
|
40192
40651
|
// cli/src/manage.ts
|
|
40652
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
40193
40653
|
var okApp = ok(App);
|
|
40194
40654
|
var okJson = ok(JsonObject2);
|
|
40195
40655
|
var okState = ok(StateChange);
|
|
40196
|
-
var
|
|
40656
|
+
var time3 = (value4) => {
|
|
40197
40657
|
if (value4 === null || value4 === void 0) return void 0;
|
|
40198
40658
|
const date = new Date(typeof value4 === "number" ? value4 : Date.parse(value4));
|
|
40199
40659
|
return Number.isNaN(date.getTime()) ? String(value4) : date.toISOString();
|
|
@@ -40300,7 +40760,7 @@ var listTokens = Effect_exports.fnUntraced(function* (config2) {
|
|
|
40300
40760
|
if (!tokens.length) yield* Console_exports.log("No tokens.");
|
|
40301
40761
|
for (const t of tokens) {
|
|
40302
40762
|
const scope3 = t.scope === "personal" ? "personal (all your apps)" : `${t.app ?? "?"} (${t.access ?? "?"})`;
|
|
40303
|
-
const used =
|
|
40763
|
+
const used = time3(t.lastUsedAt);
|
|
40304
40764
|
yield* Console_exports.log(`${t.id} ${t.name} ${scope3} ${c.dim(used ? `last used ${used}` : "never used")}`);
|
|
40305
40765
|
}
|
|
40306
40766
|
});
|
|
@@ -40311,9 +40771,10 @@ var revokeToken = Effect_exports.fnUntraced(function* (config2, id2) {
|
|
|
40311
40771
|
var createToken = Effect_exports.fnUntraced(function* (config2, name, opts) {
|
|
40312
40772
|
if (opts.personal && opts.read) return yield* fail12("--read only applies to app tokens; personal tokens have full access to your apps.");
|
|
40313
40773
|
const spec = opts.personal ? { name, personal: true } : { name, app: (yield* requireTarget(config2)).ref, access: opts.read ? "read" : "deploy" };
|
|
40314
|
-
const { token } = yield* ok(CreatedToken)(config2, "POST", "/_api/tokens", { body: spec });
|
|
40774
|
+
const { token, id: id2 } = yield* ok(CreatedToken)(config2, "POST", "/_api/tokens", { body: spec });
|
|
40315
40775
|
yield* Console_exports.log(token);
|
|
40316
40776
|
yield* Console_exports.error(c.dim(`Shown once. Use it as ERASPACE_TOKEN with ERASPACE_TOKEN_API=${config2.origin}.`));
|
|
40777
|
+
yield* Console_exports.error(c.dim(`Token id ${id2}; revoke it with eraspace token revoke ${id2}.`));
|
|
40317
40778
|
});
|
|
40318
40779
|
function parseCallArgs(inputs) {
|
|
40319
40780
|
const args2 = [];
|
|
@@ -40346,142 +40807,79 @@ var call2 = Effect_exports.fnUntraced(function* (config2, fn3, inputs) {
|
|
|
40346
40807
|
});
|
|
40347
40808
|
|
|
40348
40809
|
// cli/src/scaffold.ts
|
|
40810
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
40349
40811
|
import { basename as basename2, join as join7, relative as relative3, resolve as resolve9 } from "node:path";
|
|
40350
40812
|
var TEMPLATES = ["chat", "todo", "poll"];
|
|
40351
40813
|
var agents = (cli) => `# eraspace capsule: agent instructions
|
|
40352
40814
|
|
|
40353
|
-
This directory is
|
|
40354
|
-
|
|
40355
|
-
|
|
40356
|
-
|
|
40357
|
-
## Commands
|
|
40358
|
-
|
|
40359
|
-
Run these from this directory. There is nothing to install: the CLI bundles the SDK, Preact and TypeScript.
|
|
40360
|
-
|
|
40361
|
-
- \`${cli} typecheck\`: tsc over \`server/\`, \`client/\` and \`shared/\`. Deploy does not typecheck.
|
|
40362
|
-
- \`${cli} deploy\`: build the client, compile the server and print the app URL.
|
|
40363
|
-
- \`${cli} call <fn> '<json arg>'...\`: call a query, mutation or action, e.g. \`call add '"milk"'\`.
|
|
40364
|
-
- \`${cli} logs\`: handler logs, \`ctx.log\` and \`console.log\` output.
|
|
40365
|
-
- \`${cli} inspect\`: deployed functions, schema and metadata.
|
|
40366
|
-
- \`${cli} dev\`: redeploy on every save (long-running; keep it open).
|
|
40367
|
-
|
|
40368
|
-
The platform URL comes from \`ERASPACE_URL\`, then \`eraspace.json\`, then \`${DEFAULT_URL}\`.
|
|
40815
|
+
This directory is an eraspace app ("capsule"): a TypeScript server in V8 and a Preact client over a database with
|
|
40816
|
+
live queries, hosted and driven by \`${cli}\`, which supplies TypeScript, Preact and \`eraspace/*\`, so there is
|
|
40817
|
+
nothing to install.
|
|
40369
40818
|
|
|
40370
40819
|
## Workflow
|
|
40371
40820
|
|
|
40372
|
-
1. Read \`server/index.ts\` and \`client/index.tsx
|
|
40373
|
-
2.
|
|
40374
|
-
3. Run \`${cli}
|
|
40375
|
-
4.
|
|
40376
|
-
|
|
40377
|
-
|
|
40378
|
-
|
|
40379
|
-
|
|
40380
|
-
|
|
40381
|
-
|
|
40382
|
-
|
|
40383
|
-
|
|
40384
|
-
|
|
40385
|
-
|
|
40386
|
-
|
|
40387
|
-
|
|
40388
|
-
|
|
40389
|
-
|
|
40390
|
-
|
|
40391
|
-
|
|
40392
|
-
|
|
40393
|
-
|
|
40394
|
-
|
|
40395
|
-
|
|
40396
|
-
|
|
40397
|
-
|
|
40398
|
-
|
|
40399
|
-
|
|
40400
|
-
|
|
40401
|
-
|
|
40402
|
-
|
|
40403
|
-
|
|
40404
|
-
|
|
40405
|
-
|
|
40406
|
-
|
|
40407
|
-
|
|
40408
|
-
|
|
40409
|
-
|
|
40410
|
-
|
|
40411
|
-
|
|
40412
|
-
|
|
40413
|
-
|
|
40414
|
-
|
|
40415
|
-
|
|
40416
|
-
|
|
40417
|
-
|
|
40418
|
-
|
|
40419
|
-
|
|
40420
|
-
|
|
40421
|
-
|
|
40422
|
-
|
|
40423
|
-
|
|
40424
|
-
|
|
40425
|
-
|
|
40426
|
-
|
|
40427
|
-
|
|
40428
|
-
|
|
40429
|
-
|
|
40430
|
-
- Mutations schedule later work with \`ctx.scheduler.runAfter(ms, "mutationName", ...args)\`, which returns a job id.
|
|
40431
|
-
The job commits with the mutation and its run commits once; only mutations can be scheduled.
|
|
40432
|
-
- Handler arguments are positional and not validated. Check them in the handler.
|
|
40433
|
-
- \`ctx.auth.userId\` is a per-connection guest id that changes on reload. It is not a login: never use it for
|
|
40434
|
-
ownership or access control. Every app is public.
|
|
40435
|
-
- \`ctx.log.info(msg, data?)\` (also debug/warn/error) writes to \`eraspace logs\`.
|
|
40436
|
-
- Endpoints receive \`req\` with \`method, path, url, headers.get(), query.get(), json(), text()\` and return
|
|
40437
|
-
\`json(value)\`, \`text(string)\`, \`empty()\`, \`redirect(url)\` or a plain value (sent as JSON).
|
|
40438
|
-
- Removing a populated table needs its row count confirmed: \`${cli} deploy --delete-table <table>=<rows>\` (the
|
|
40439
|
-
refused deploy prints the exact flag). Deletion runs in background batches.
|
|
40440
|
-
- Changing a field's type or making it required fails the deploy while stored rows do not match. Declare a
|
|
40441
|
-
migration instead: \`table({ ... }).migrate(1, row => ({ ...row, done: false }))\` upgrades old rows when read
|
|
40442
|
-
and rewrites them in the background. Number migrations 1, 2, 3, ... and keep each one until its rows are done.
|
|
40443
|
-
|
|
40444
|
-
## Client API (\`eraspace/client\`)
|
|
40445
|
-
|
|
40446
|
-
\`\`\`tsx
|
|
40447
|
-
import { createClient } from "eraspace/client";
|
|
40448
|
-
import { useState } from "preact/hooks";
|
|
40449
|
-
import type app from "../server/index";
|
|
40450
|
-
|
|
40451
|
-
const client = createClient<typeof app>();
|
|
40452
|
-
|
|
40453
|
-
export default function App() {
|
|
40454
|
-
const items = client.useQuery("items", "some-list"); // undefined while loading, then live
|
|
40455
|
-
const add = client.useMutation("add");
|
|
40456
|
-
const [title, setTitle] = useState("");
|
|
40457
|
-
if (items === undefined) return <p>Loading\u2026</p>;
|
|
40458
|
-
return <main class="p-6">
|
|
40459
|
-
<form onSubmit={async (e) => { e.preventDefault(); await add("some-list", title); setTitle(""); }}>
|
|
40460
|
-
<input value={title} onInput={(e) => setTitle(e.currentTarget.value)} />
|
|
40461
|
-
</form>
|
|
40462
|
-
<ul>{items.map((item) => <li key={item.id}>{item.title}</li>)}</ul>
|
|
40463
|
-
</main>;
|
|
40464
|
-
}
|
|
40465
|
-
\`\`\`
|
|
40466
|
-
|
|
40467
|
-
- Query, mutation and action names, arguments and results are typed from the server. Import the server with
|
|
40468
|
-
\`import type\` only.
|
|
40469
|
-
- Optimistic updates: \`client.useMutation("vote", { optimistic(store, id) { store.update("results", [],
|
|
40470
|
-
(rows) => rows.map((r) => (r.id === id ? { ...r, votes: r.votes + 1 } : r))) } })\`. The second argument of
|
|
40471
|
-
\`store.update\` is the query's argument list.
|
|
40472
|
-
- \`useAction(name)\`, \`usePaginatedQuery(name, args, { initialNumItems })\`, \`client.query/mutation/action(...)\`.
|
|
40473
|
-
- Realtime rooms, not stored: \`const room = client.useRoom(name, meta)\` gives \`room.presence\`,
|
|
40474
|
-
\`room.broadcast(event, payload)\` and \`room.on(event, cb)\` (call \`on\` inside \`useEffect\` and return its
|
|
40475
|
-
cleanup). \`client.usePresence(name, meta)\` returns just the members.
|
|
40476
|
-
- Files: see "File uploads" below.
|
|
40477
|
-
- Pages: \`Router\`, \`Route\`, \`Link\`, \`useLocation\`, \`useNavigate\`, \`useParams\` from \`eraspace/client\`.
|
|
40478
|
-
- Open tabs reload by themselves after each deploy. Pass \`createClient({ reloadOnDeploy: false })\` to keep the
|
|
40479
|
-
page and react to \`client.onDeployed(version => ...)\` instead.
|
|
40480
|
-
- Client imports are limited to \`eraspace/client\`, \`preact\`, \`preact/hooks\`, \`@preact/signals\` and relative files.
|
|
40821
|
+
1. Read \`CODING_STANDARDS.md\`, \`server/index.ts\` and \`client/index.tsx\`.
|
|
40822
|
+
2. Write the requested app or change.
|
|
40823
|
+
3. Run \`${cli} typecheck\` until it prints "No type errors."
|
|
40824
|
+
4. Run \`${cli} deploy\` until it prints the app URL. Pass \`--delete-table\` only for rows the user agreed to lose.
|
|
40825
|
+
5. Run \`${cli} call <fn> '<json arg>'...\` on every query, mutation and action, and on an invalid input for each
|
|
40826
|
+
mutation that takes arguments, until each returns what the code intends and each invalid input is refused with
|
|
40827
|
+
its message; then \`${cli} logs\` shows no unexpected error.
|
|
40828
|
+
6. Once steps 3 to 5 pass after your last edit, report the URL. For an unclaimed app, also report the expiry deploy
|
|
40829
|
+
printed and that \`${cli} auth login\` then \`${cli} claim\` keeps the app.
|
|
40830
|
+
`;
|
|
40831
|
+
var CODING_STANDARDS = `# eraspace capsule: coding standards
|
|
40832
|
+
|
|
40833
|
+
Before using one of these features, read its section in \`FEATURES.md\`: file uploads, rooms and presence, routing,
|
|
40834
|
+
optimistic updates, pagination, scheduled mutations, HTTP endpoints, reload on deploy.
|
|
40835
|
+
|
|
40836
|
+
## Security
|
|
40837
|
+
|
|
40838
|
+
- Every caller is an anonymous guest and every app is public. \`ctx.auth.userId\` is a guest id that changes with
|
|
40839
|
+
each connection, so it never grants ownership or access.
|
|
40840
|
+
- Keep secrets in \`.env.eraspace.server\` as \`KEY=value\` lines and read them in server code as \`ctx.env.KEY\`:
|
|
40841
|
+
\`client/\` and \`shared/\` ship to the browser.
|
|
40842
|
+
|
|
40843
|
+
## Server (\`eraspace/server\`)
|
|
40844
|
+
|
|
40845
|
+
- Fields: \`string() number() boolean() id("table") userId() any() array(field) object({...})\`, each with
|
|
40846
|
+
\`.optional()\` or \`.default(value)\`. Rows also have \`id\` and \`createdAt\` (epoch ms).
|
|
40847
|
+
- \`ctx.db.<table>\` has \`insert\`, \`get\`, \`update(id, partial)\` (\`null\` removes a field), \`replace\` and
|
|
40848
|
+
\`delete\`. Reads chain \`withIndex\`, \`order("asc" | "desc")\`, then \`collect()\`, \`take(n)\`, \`first()\`,
|
|
40849
|
+
\`unique()\`, \`count()\` or \`paginate(...)\`.
|
|
40850
|
+
- Declare an index with \`table({...}).index("by_list", ["listId"])\` and read it with
|
|
40851
|
+
\`ctx.db.items.withIndex("by_list", (q) => q.eq("listId", id))\`, then \`.gt(...)\` or \`.lt(...)\` on the next
|
|
40852
|
+
field. \`by_creation\` indexes every table by \`createdAt\`.
|
|
40853
|
+
- Validate every argument in the handler: arguments are positional, come from anyone and are not checked against
|
|
40854
|
+
their TypeScript types.
|
|
40855
|
+
- A query is a live query: its cached result is reused until rows it read change, then rerun and pushed to
|
|
40856
|
+
subscribers. Make it depend only on its arguments, its caller and the rows it reads: pass a time it needs as an
|
|
40857
|
+
argument, rounded so it stays the same across renders, and draw random values in mutations.
|
|
40858
|
+
- Mutations run one at a time per app, so a read-then-write in one mutation never races another.
|
|
40859
|
+
- Actions call outbound \`fetch\`, \`ctx.runQuery\`, \`ctx.runMutation\` and \`ctx.runAction\`: fetch in an action
|
|
40860
|
+
and save the result with \`ctx.runMutation\`.
|
|
40861
|
+
- Rows and results are JSON: keep times as epoch-ms numbers, as \`createdAt\` is.
|
|
40862
|
+
- Keep state in the database: module variables reset whenever the app unloads.
|
|
40863
|
+
- Handlers have CPU, wall-clock and heap limits: keep loops and reads bounded.
|
|
40864
|
+
- A \`.migrate\` upgrade is a pure function of the stored row.
|
|
40865
|
+
|
|
40866
|
+
## Client (\`eraspace/client\`)
|
|
40867
|
+
|
|
40868
|
+
- \`client.useQuery(name, ...args)\` subscribes to a live query: \`undefined\` while loading, then every new result,
|
|
40869
|
+
so mutations need no refetch.
|
|
40870
|
+
- \`client.useAction(name)\` returns a function, as \`useMutation\` does. Outside components, call \`client.query\`,
|
|
40871
|
+
\`client.mutation\` or \`client.action(name, ...args)\`.
|
|
40872
|
+
- Style with Tailwind utility classes, each written as a complete literal, and \`client/styles.css\`.
|
|
40873
|
+
|
|
40874
|
+
## Shared code
|
|
40875
|
+
|
|
40876
|
+
- Keep \`shared/\` to types, constants and pure functions, which both the browser and the server can run.
|
|
40877
|
+
`;
|
|
40878
|
+
var FEATURES = `# eraspace capsule: features
|
|
40481
40879
|
|
|
40482
40880
|
## File uploads
|
|
40483
40881
|
|
|
40484
|
-
Files
|
|
40882
|
+
Files live in app storage, not the database: a row saves the \`FileRef\` an upload returns.
|
|
40485
40883
|
|
|
40486
40884
|
\`\`\`tsx
|
|
40487
40885
|
// server/index.ts: declare the file in the schema and copy its fields in the mutation (extra fields are refused).
|
|
@@ -40501,36 +40899,93 @@ const addPhoto = client.useMutation("addPhoto");
|
|
|
40501
40899
|
- \`<FileUpload>\` is a drop zone and file picker with progress and error text. Props: \`accept\`, \`multiple\`,
|
|
40502
40900
|
\`maxBytes\`, \`disabled\`, \`class\` (replaces its default style; \`data-dragging\` is set during a drag) and
|
|
40503
40901
|
children for the label. \`onUpload(file)\` runs once per stored file; if it throws, the file is deleted again.
|
|
40504
|
-
- \`<FilePreview file={fileRef
|
|
40505
|
-
|
|
40506
|
-
|
|
40507
|
-
from the same page show at once from the browser's copy; \`<FileUpload>\` shows an image while it uploads.
|
|
40902
|
+
- \`<FilePreview file={fileRef}>\` shows images, video and audio inline, plain text in a frame, and other types as a
|
|
40903
|
+
download card. Pass it the saved \`FileRef\`: a bare key costs a metadata request per preview. \`caption={false}\`
|
|
40904
|
+
hides the name/size line; \`class\` replaces its style.
|
|
40508
40905
|
- Custom UI: \`const { upload, uploading, progress, error, file } = client.useUpload({ accept, maxBytes, onUpload })\`,
|
|
40509
40906
|
then \`upload(input.files)\`; \`file\` is the Blob uploading now. Lower level: \`client.storage.upload(blob, { onProgress })\`,
|
|
40510
40907
|
\`.url(key)\`, \`.localUrl(key)\`, \`.info(key)\` and \`.delete(key)\`.
|
|
40908
|
+
- Up to 5 MiB per file and 100 MiB per app.
|
|
40511
40909
|
- \`accept\` and \`maxBytes\` are checked in the browser only; the server stores any type up to its limit.
|
|
40512
|
-
-
|
|
40910
|
+
- Anyone with a file's key can read that file, so upload only what may be public. The \`deleteToken\` that
|
|
40911
|
+
\`client.storage.upload\` returns lets its holder delete the file: keep it out of rows.
|
|
40912
|
+
|
|
40913
|
+
## Rooms and presence
|
|
40513
40914
|
|
|
40514
|
-
|
|
40915
|
+
Rooms are realtime and never stored. \`const room = client.useRoom(name, meta)\` gives:
|
|
40515
40916
|
|
|
40516
|
-
|
|
40517
|
-
|
|
40518
|
-
|
|
40917
|
+
- \`room.presence\`, the members with their \`meta\`, and \`room.self\`, this connection's id.
|
|
40918
|
+
- \`room.broadcast(event, payload)\` and \`room.on(event, (payload, from) => ...)\`. Call \`on\` inside \`useEffect\`
|
|
40919
|
+
and return its cleanup.
|
|
40920
|
+
- \`room.state\`, shared by the members and set with \`room.setState(key, value)\`. It vanishes when the room
|
|
40921
|
+
empties: save what must last with a mutation.
|
|
40519
40922
|
|
|
40520
|
-
|
|
40521
|
-
\`import()\` are unavailable. Apps need no installed server dependencies.
|
|
40522
|
-
- The host supplies \`fetch\`, \`URL\`, \`URLPattern\`, \`Headers\`, \`Request\`, \`Response\`, Web Streams,
|
|
40523
|
-
\`Blob\`, \`File\`, \`FormData\`, \`crypto\` (including \`crypto.subtle\`), \`TextEncoder\`, \`TextDecoder\`,
|
|
40524
|
-
\`CompressionStream\`, timers and \`console\`. Bodies arrive and leave whole rather than incrementally.
|
|
40525
|
-
- Persist state in the database. Module state is not durable and resets when an app unloads or a worker restarts.
|
|
40526
|
-
- Await database calls. Mutations run through one writer per app and reply after their Postgres commit.
|
|
40527
|
-
- Handlers have CPU, wall-clock and heap limits. Keep loops and reads bounded.
|
|
40528
|
-
- Outbound fetch is available to claimed apps in actions and read-only endpoints. Private addresses are blocked.
|
|
40923
|
+
\`client.usePresence(name, meta)\` returns just the members.
|
|
40529
40924
|
|
|
40530
|
-
##
|
|
40925
|
+
## Routing
|
|
40531
40926
|
|
|
40532
|
-
|
|
40533
|
-
|
|
40927
|
+
\`\`\`tsx
|
|
40928
|
+
import { Router, Route, Link, useParams, useNavigate } from "eraspace/client";
|
|
40929
|
+
|
|
40930
|
+
<Router>
|
|
40931
|
+
<Route path="/" component={Home} />
|
|
40932
|
+
<Route path="/items/:id" component={Item} /> {/* Item reads useParams().id */}
|
|
40933
|
+
<Route default component={NotFound} />
|
|
40934
|
+
</Router>
|
|
40935
|
+
\`\`\`
|
|
40936
|
+
|
|
40937
|
+
Paths are app-relative: the app is served under \`/<app>/\`, and every path below it loads the app. Link with
|
|
40938
|
+
\`<Link to="/items/1">\` and navigate with \`useNavigate()("/items/1")\`, which add that base. \`useLocation()\`
|
|
40939
|
+
gives the current \`path\` and \`url\`.
|
|
40940
|
+
|
|
40941
|
+
## Optimistic updates
|
|
40942
|
+
|
|
40943
|
+
\`client.useMutation("vote", { optimistic(store, id) { store.update("results", [], (rows) => rows.map((r) =>
|
|
40944
|
+
(r.id === id ? { ...r, votes: r.votes + 1 } : r))) } })\`. The second argument of \`store.update\` is the query's
|
|
40945
|
+
argument list.
|
|
40946
|
+
|
|
40947
|
+
## Pagination
|
|
40948
|
+
|
|
40949
|
+
\`\`\`ts
|
|
40950
|
+
// server: the query takes PaginationOptions last and returns paginate(); cap numItems, which the client chooses.
|
|
40951
|
+
feed: query(async (ctx, listId: string, page: PaginationOptions) =>
|
|
40952
|
+
ctx.db.items.withIndex("by_list", (q) => q.eq("listId", listId)).order("desc")
|
|
40953
|
+
.paginate({ cursor: page.cursor, numItems: Math.min(page.numItems, 50) })),
|
|
40954
|
+
|
|
40955
|
+
// client
|
|
40956
|
+
const { results, status, loadMore } = client.usePaginatedQuery("feed", ["some-list"], { initialNumItems: 20 });
|
|
40957
|
+
\`\`\`
|
|
40958
|
+
|
|
40959
|
+
\`PaginationOptions\` comes from \`eraspace/server\`. \`status\` is \`"LoadingFirstPage"\`, \`"CanLoadMore"\`,
|
|
40960
|
+
\`"LoadingMore"\` or \`"Exhausted"\`; \`loadMore(n?)\` fetches the next page.
|
|
40961
|
+
|
|
40962
|
+
## Scheduled mutations
|
|
40963
|
+
|
|
40964
|
+
Mutations and writable endpoints run a mutation later with \`ctx.scheduler.runAfter(ms, "mutationName", ...args)\`,
|
|
40965
|
+
which returns a job id. The job commits with the mutation that schedules it, and its run commits at most once. For
|
|
40966
|
+
recurring work, the scheduled mutation schedules its next run.
|
|
40967
|
+
|
|
40968
|
+
## HTTP endpoints
|
|
40969
|
+
|
|
40970
|
+
\`\`\`ts
|
|
40971
|
+
import { endpoint, json } from "eraspace/server";
|
|
40972
|
+
|
|
40973
|
+
endpoints: {
|
|
40974
|
+
health: endpoint({ method: "GET", path: "/health", readOnly: true }, async (ctx, req) => json({ ok: true })),
|
|
40975
|
+
},
|
|
40976
|
+
\`\`\`
|
|
40977
|
+
|
|
40978
|
+
- An endpoint is served at \`/<app>/<path>\`. \`readOnly: true\` gives it a read-only db; otherwise it writes like a
|
|
40979
|
+
mutation.
|
|
40980
|
+
- \`req\` has \`method, path, url, headers.get(), query.get(), json(), text(), bytes(), formData()\`. Return
|
|
40981
|
+
\`json(value)\`, \`text(string)\`, \`empty()\`, \`redirect(url)\` (each takes \`{ status, headers }\` last) or a
|
|
40982
|
+
plain value (sent as JSON).
|
|
40983
|
+
- Endpoints are public: authenticate a webhook by checking its signature with \`crypto.subtle\`.
|
|
40984
|
+
|
|
40985
|
+
## Reload on deploy
|
|
40986
|
+
|
|
40987
|
+
Open tabs reload by themselves after each deploy. Pass \`createClient({ reloadOnDeploy: false })\` to keep the page
|
|
40988
|
+
and react to \`client.onDeployed(version => ...)\` instead.
|
|
40534
40989
|
`;
|
|
40535
40990
|
var GITIGNORE = [".eraspace/", ".env.eraspace.server"];
|
|
40536
40991
|
var keepsOnInit = (name) => name.startsWith(".") || /^(README|LICENSE)(\.|$)/i.test(name);
|
|
@@ -40560,6 +41015,8 @@ var createCapsule = Effect_exports.fnUntraced(function* (directory, template, mo
|
|
|
40560
41015
|
const files = {
|
|
40561
41016
|
"eraspace.json": JSON.stringify({ name: app }, null, 2) + "\n",
|
|
40562
41017
|
"AGENTS.md": agents(command2),
|
|
41018
|
+
"CODING_STANDARDS.md": CODING_STANDARDS,
|
|
41019
|
+
"FEATURES.md": FEATURES,
|
|
40563
41020
|
"CLAUDE.md": "@AGENTS.md\n"
|
|
40564
41021
|
};
|
|
40565
41022
|
const gitignore = join7(destination, ".gitignore");
|
|
@@ -40586,6 +41043,7 @@ ${cd ? `cd ${cd}
|
|
|
40586
41043
|
});
|
|
40587
41044
|
|
|
40588
41045
|
// cli/src/typecheck.ts
|
|
41046
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
40589
41047
|
import { createRequire } from "node:module";
|
|
40590
41048
|
import { dirname as dirname3, join as join8 } from "node:path";
|
|
40591
41049
|
var packageDir = Effect_exports.fnUntraced(function* (from, name) {
|
|
@@ -40659,7 +41117,7 @@ var config = Effect_exports.gen(function* () {
|
|
|
40659
41117
|
return yield* loadConfig({ dir: value3(flags.dir), app: value3(flags.app), url: value3(flags.url) });
|
|
40660
41118
|
});
|
|
40661
41119
|
var deployFlags = {
|
|
40662
|
-
name: optionalString("name", "Exact name for a new app, failing if it is taken (default: the eraspace.json or directory name, or a free variant of it)"),
|
|
41120
|
+
name: optionalString("name", "Exact name for a new app, failing if it is taken (default: the eraspace.json or directory name, or a free variant of it). A redeploy refuses it; use eraspace names add"),
|
|
40663
41121
|
publicInspect: Flag_exports.Boolean("public-inspect").pipe(Flag_exports.withDefault(false), Flag_exports.withDescription("Let anyone read this app's inspection data and logs"))
|
|
40664
41122
|
};
|
|
40665
41123
|
var deployOptions = (input) => ({ name: value3(input.name), publicInspect: input.publicInspect });
|
|
@@ -40714,6 +41172,32 @@ var deployCommand = Command_exports.make(
|
|
|
40714
41172
|
{ command: "eraspace deploy --fail-on-query-errors", description: "Deploy only if no live query starts throwing on the new code" }
|
|
40715
41173
|
])
|
|
40716
41174
|
);
|
|
41175
|
+
var deploysCommand = Command_exports.make(
|
|
41176
|
+
"deploys",
|
|
41177
|
+
{ app: optionalArg("app", "App name or id (default: this checkout's app)") },
|
|
41178
|
+
({ app }) => Effect_exports.flatMap(config, (c2) => deploys(c2, value3(app)))
|
|
41179
|
+
).pipe(Command_exports.withDescription("List the latest 50 kept versions you can roll back to, newest first"));
|
|
41180
|
+
var rollbackCommand = Command_exports.make(
|
|
41181
|
+
"rollback",
|
|
41182
|
+
{
|
|
41183
|
+
version: Argument_exports.Int("version").pipe(
|
|
41184
|
+
Argument_exports.withDescription("Version to roll back to (default: the newest kept version below the one serving)"),
|
|
41185
|
+
Argument_exports.optional
|
|
41186
|
+
),
|
|
41187
|
+
...deleteTableFlag,
|
|
41188
|
+
...shadowFlags
|
|
41189
|
+
},
|
|
41190
|
+
(input) => Effect_exports.flatMap(
|
|
41191
|
+
config,
|
|
41192
|
+
(c2) => rollback(c2, value3(input.version), { deleteTables: value3(input.deleteTable), shadow: input.shadow, failOnQueryErrors: input.failOnQueryErrors })
|
|
41193
|
+
)
|
|
41194
|
+
).pipe(
|
|
41195
|
+
Command_exports.withDescription("Deploy an earlier version's server code, client files and server env again, as a new version"),
|
|
41196
|
+
Command_exports.withExamples([
|
|
41197
|
+
{ command: "eraspace rollback", description: "Go back to the version before the one serving" },
|
|
41198
|
+
{ command: "eraspace rollback 3", description: "Serve version 3's code again" }
|
|
41199
|
+
])
|
|
41200
|
+
);
|
|
40717
41201
|
var devCommand = Command_exports.make("dev", deployFlags, (input) => Effect_exports.flatMap(config, (c2) => dev(c2, deployOptions(input)))).pipe(
|
|
40718
41202
|
Command_exports.withDescription("Deploy, then redeploy whenever server/, client/, shared/ or .env.eraspace.server change")
|
|
40719
41203
|
);
|
|
@@ -40861,6 +41345,8 @@ var command = eraspace.pipe(
|
|
|
40861
41345
|
initCommand,
|
|
40862
41346
|
typecheckCommand,
|
|
40863
41347
|
deployCommand,
|
|
41348
|
+
deploysCommand,
|
|
41349
|
+
rollbackCommand,
|
|
40864
41350
|
devCommand,
|
|
40865
41351
|
callCommand,
|
|
40866
41352
|
explainCommand,
|
|
@@ -40884,6 +41370,7 @@ var command = eraspace.pipe(
|
|
|
40884
41370
|
var run6 = Command_exports.runWith(command, { version: VERSION });
|
|
40885
41371
|
|
|
40886
41372
|
// cli/src/layer.ts
|
|
41373
|
+
init_define_ERASPACE_MOVED_ORIGINS();
|
|
40887
41374
|
var layer15 = Layer_exports.mergeAll(NodeServices_exports.layer, FetchHttpClient_exports.layer);
|
|
40888
41375
|
|
|
40889
41376
|
// cli/src/bin.ts
|