@deslop/deploy 0.1.1223 → 0.1.1227
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/(home)-BrRplUzJ.js +1 -0
- package/dist/client/assets/(home)-Czzfl9Ca.js +1 -0
- package/dist/client/assets/-error-B5svU3Y7.js +1 -0
- package/dist/client/assets/{useAnchoredPopupScrollLock-C5J2rRQi.js → icon-dark-qOQYJ5Qz.js} +1 -1
- package/dist/client/assets/index-ChuK7asF.css +2 -0
- package/dist/client/assets/index-DVPVace2.js +13 -0
- package/dist/client/assets/monitor-BrRplUzJ.js +1 -0
- package/dist/client/assets/monitor-DARSk0nK.js +1 -0
- package/dist/client/assets/route-Bt2B66uY.js +1 -0
- package/dist/client/assets/{schema-Bqsq2HKN.js → schema-DLne3DRa.js} +1 -1
- package/dist/client/assets/skeleton-C78VMh1_.js +1 -0
- package/dist/client/assets/utils-B7SpBnlR.js +1 -0
- package/dist/client/assets/utils-CzWcd8BF.js +1 -0
- package/dist/client/index.html +3 -3
- package/dist/server.js +167 -87
- package/package.json +2 -2
- package/dist/client/assets/(home)-CWfhmaL6.js +0 -1
- package/dist/client/assets/(home)-ykOWm0AL.js +0 -1
- package/dist/client/assets/-error-R2qPsRo1.js +0 -1
- package/dist/client/assets/index-HlW3ZtG_.css +0 -2
- package/dist/client/assets/index-OvIQc5i7.js +0 -13
- package/dist/client/assets/monitor-sMHE3JZH.js +0 -1
- package/dist/client/assets/monitor-ykOWm0AL.js +0 -1
- package/dist/client/assets/route-BskkLQgb.js +0 -1
- package/dist/client/assets/skeleton-DwejJ2lj.js +0 -1
- package/dist/client/assets/utils-Fm6WHGZv.js +0 -1
- package/dist/client/assets/utils-NO5Sw07j.js +0 -1
package/dist/server.js
CHANGED
|
@@ -4682,7 +4682,7 @@ const ServiceProto = {
|
|
|
4682
4682
|
.../*#__PURE__*/ Prototype({
|
|
4683
4683
|
label: "Service",
|
|
4684
4684
|
evaluate(fiber) {
|
|
4685
|
-
return exitSucceed(get$
|
|
4685
|
+
return exitSucceed(get$11(fiber.context, this));
|
|
4686
4686
|
}
|
|
4687
4687
|
}),
|
|
4688
4688
|
toJSON() {
|
|
@@ -4698,10 +4698,10 @@ const ServiceProto = {
|
|
|
4698
4698
|
return make$78(this, self);
|
|
4699
4699
|
},
|
|
4700
4700
|
use(f) {
|
|
4701
|
-
return withFiber$1((fiber) => f(get$
|
|
4701
|
+
return withFiber$1((fiber) => f(get$11(fiber.context, this)));
|
|
4702
4702
|
},
|
|
4703
4703
|
useSync(f) {
|
|
4704
|
-
return withFiber$1((fiber) => exitSucceed(f(get$
|
|
4704
|
+
return withFiber$1((fiber) => exitSucceed(f(get$11(fiber.context, this))));
|
|
4705
4705
|
}
|
|
4706
4706
|
};
|
|
4707
4707
|
const cacheKeys = /*#__PURE__*/ new Set();
|
|
@@ -5080,7 +5080,7 @@ const getUnsafe$1 = /*#__PURE__*/ dual(2, (self, service) => {
|
|
|
5080
5080
|
* @category getters
|
|
5081
5081
|
* @since 2.0.0
|
|
5082
5082
|
*/
|
|
5083
|
-
const get$
|
|
5083
|
+
const get$11 = getUnsafe$1;
|
|
5084
5084
|
const defaultValueCacheKey = "~effect/Context/defaultValue";
|
|
5085
5085
|
const getDefaultValue = (ref) => {
|
|
5086
5086
|
if (defaultValueCacheKey in ref) return ref[defaultValueCacheKey];
|
|
@@ -6007,7 +6007,7 @@ const has$4 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key));
|
|
|
6007
6007
|
* @category getters
|
|
6008
6008
|
* @since 2.0.0
|
|
6009
6009
|
*/
|
|
6010
|
-
const get$
|
|
6010
|
+
const get$10 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key) ? some$1(self[key]) : none());
|
|
6011
6011
|
/**
|
|
6012
6012
|
* Removes a key from a record.
|
|
6013
6013
|
*
|
|
@@ -6280,7 +6280,7 @@ const Array$2 = globalThis.Array;
|
|
|
6280
6280
|
* @category constructors
|
|
6281
6281
|
* @since 2.0.0
|
|
6282
6282
|
*/
|
|
6283
|
-
const fromIterable$
|
|
6283
|
+
const fromIterable$6 = (collection) => Array$2.isArray(collection) ? collection : Array$2.from(collection);
|
|
6284
6284
|
/**
|
|
6285
6285
|
* Normalizes a value that is either a single element or an array into an array.
|
|
6286
6286
|
*
|
|
@@ -6510,7 +6510,7 @@ function isOutOfBounds(i, as) {
|
|
|
6510
6510
|
* @category getters
|
|
6511
6511
|
* @since 2.0.0
|
|
6512
6512
|
*/
|
|
6513
|
-
const get$
|
|
6513
|
+
const get$9 = /*#__PURE__*/ dual(2, (self, index) => {
|
|
6514
6514
|
const i = Math.floor(index);
|
|
6515
6515
|
return isOutOfBounds(i, self) ? none() : some$1(self[i]);
|
|
6516
6516
|
});
|
|
@@ -6571,7 +6571,7 @@ const getUnsafe = /*#__PURE__*/ dual(2, (self, index) => {
|
|
|
6571
6571
|
* @category getters
|
|
6572
6572
|
* @since 2.0.0
|
|
6573
6573
|
*/
|
|
6574
|
-
const head = /*#__PURE__*/ get$
|
|
6574
|
+
const head = /*#__PURE__*/ get$9(0);
|
|
6575
6575
|
/**
|
|
6576
6576
|
* Returns the first element of a `NonEmptyReadonlyArray` directly (no `Option`
|
|
6577
6577
|
* wrapper).
|
|
@@ -6675,7 +6675,7 @@ const clampCount = (n, length) => Math.min(normalize$2(n), length);
|
|
|
6675
6675
|
* @since 2.0.0
|
|
6676
6676
|
*/
|
|
6677
6677
|
const take$3 = /*#__PURE__*/ dual(2, (self, n) => {
|
|
6678
|
-
const input = fromIterable$
|
|
6678
|
+
const input = fromIterable$6(self);
|
|
6679
6679
|
return input.slice(0, clampCount(n, input.length));
|
|
6680
6680
|
});
|
|
6681
6681
|
/**
|
|
@@ -6708,7 +6708,7 @@ const take$3 = /*#__PURE__*/ dual(2, (self, n) => {
|
|
|
6708
6708
|
* @since 2.0.0
|
|
6709
6709
|
*/
|
|
6710
6710
|
const drop$1 = /*#__PURE__*/ dual(2, (self, n) => {
|
|
6711
|
-
const input = fromIterable$
|
|
6711
|
+
const input = fromIterable$6(self);
|
|
6712
6712
|
return input.slice(clampCount(n, input.length), input.length);
|
|
6713
6713
|
});
|
|
6714
6714
|
/**
|
|
@@ -6767,7 +6767,7 @@ const findFirstIndex = /*#__PURE__*/ dual(2, (self, predicate) => {
|
|
|
6767
6767
|
* @since 2.0.0
|
|
6768
6768
|
*/
|
|
6769
6769
|
const findLastIndex = /*#__PURE__*/ dual(2, (self, predicate) => {
|
|
6770
|
-
const input = fromIterable$
|
|
6770
|
+
const input = fromIterable$6(self);
|
|
6771
6771
|
for (let i = input.length - 1; i >= 0; i--) if (predicate(input[i], i)) return some$1(i);
|
|
6772
6772
|
return none();
|
|
6773
6773
|
});
|
|
@@ -6832,7 +6832,7 @@ const findFirst = findFirst$1;
|
|
|
6832
6832
|
* @since 2.0.0
|
|
6833
6833
|
*/
|
|
6834
6834
|
const findLast = /*#__PURE__*/ dual(2, (self, f) => {
|
|
6835
|
-
const input = fromIterable$
|
|
6835
|
+
const input = fromIterable$6(self);
|
|
6836
6836
|
for (let i = input.length - 1; i >= 0; i--) {
|
|
6837
6837
|
const a = input[i];
|
|
6838
6838
|
const o = f(a, i);
|
|
@@ -7198,7 +7198,7 @@ const getSomes = (self) => {
|
|
|
7198
7198
|
* @since 2.0.0
|
|
7199
7199
|
*/
|
|
7200
7200
|
const filter$3 = /*#__PURE__*/ dual(2, (self, predicate) => {
|
|
7201
|
-
const as = fromIterable$
|
|
7201
|
+
const as = fromIterable$6(self);
|
|
7202
7202
|
const out = [];
|
|
7203
7203
|
for (let i = 0; i < as.length; i++) if (predicate(as[i], i)) out.push(as[i]);
|
|
7204
7204
|
return out;
|
|
@@ -7229,7 +7229,7 @@ const filter$3 = /*#__PURE__*/ dual(2, (self, predicate) => {
|
|
|
7229
7229
|
* @category folding
|
|
7230
7230
|
* @since 2.0.0
|
|
7231
7231
|
*/
|
|
7232
|
-
const reduce = /*#__PURE__*/ dual(3, (self, b, f) => fromIterable$
|
|
7232
|
+
const reduce = /*#__PURE__*/ dual(3, (self, b, f) => fromIterable$6(self).reduce((b, a, i) => f(b, a, i), b));
|
|
7233
7233
|
/**
|
|
7234
7234
|
* Checks whether at least one element satisfies the predicate. Narrows the type
|
|
7235
7235
|
* to `NonEmptyReadonlyArray` on success.
|
|
@@ -7298,7 +7298,7 @@ const makeEquivalence$2 = Array_;
|
|
|
7298
7298
|
* @since 2.0.0
|
|
7299
7299
|
*/
|
|
7300
7300
|
const dedupe = (self) => {
|
|
7301
|
-
const input = fromIterable$
|
|
7301
|
+
const input = fromIterable$6(self);
|
|
7302
7302
|
if (input.length < 2) return [...input];
|
|
7303
7303
|
const buckets = /* @__PURE__ */ new Map();
|
|
7304
7304
|
const out = [];
|
|
@@ -7322,7 +7322,7 @@ const dedupe = (self) => {
|
|
|
7322
7322
|
* @category folding
|
|
7323
7323
|
* @since 2.0.0
|
|
7324
7324
|
*/
|
|
7325
|
-
const join$2 = /*#__PURE__*/ dual(2, (self, sep) => fromIterable$
|
|
7325
|
+
const join$2 = /*#__PURE__*/ dual(2, (self, sep) => fromIterable$6(self).join(sep));
|
|
7326
7326
|
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Duration.js
|
|
7327
7327
|
const TypeId$64 = "~effect/Duration";
|
|
7328
7328
|
const bigint0$3 = /*#__PURE__*/ BigInt(0);
|
|
@@ -9452,7 +9452,7 @@ var FiberImpl = class {
|
|
|
9452
9452
|
return this._dispatcher ??= this.cache.scheduler.makeDispatcher();
|
|
9453
9453
|
}
|
|
9454
9454
|
getRef(ref) {
|
|
9455
|
-
return get$
|
|
9455
|
+
return get$11(this.context, ref);
|
|
9456
9456
|
}
|
|
9457
9457
|
addObserver(cb) {
|
|
9458
9458
|
if (this._exit) {
|
|
@@ -9620,17 +9620,17 @@ var FiberImpl = class {
|
|
|
9620
9620
|
const makeFiberContextCache = (context) => {
|
|
9621
9621
|
const currentTracer = getOrUndefinedUnsafe(context, TracerKey);
|
|
9622
9622
|
return {
|
|
9623
|
-
scheduler: get$
|
|
9623
|
+
scheduler: get$11(context, Scheduler),
|
|
9624
9624
|
tracer: currentTracer,
|
|
9625
9625
|
tracerContext: currentTracer ? currentTracer["context"] : void 0,
|
|
9626
|
-
tracerEnabled: get$
|
|
9626
|
+
tracerEnabled: get$11(context, TracerEnabled),
|
|
9627
9627
|
span: getOrUndefinedUnsafe(context, ParentSpanKey),
|
|
9628
|
-
logLevel: get$
|
|
9629
|
-
minimumLogLevel: get$
|
|
9630
|
-
stackFrame: get$
|
|
9628
|
+
logLevel: get$11(context, CurrentLogLevel$1),
|
|
9629
|
+
minimumLogLevel: get$11(context, MinimumLogLevel$1),
|
|
9630
|
+
stackFrame: get$11(context, CurrentStackFrame),
|
|
9631
9631
|
runtimeMetrics: getOrUndefinedUnsafe(context, FiberRuntimeMetricsKey),
|
|
9632
|
-
maxOpsBeforeYield: get$
|
|
9633
|
-
preventYield: get$
|
|
9632
|
+
maxOpsBeforeYield: get$11(context, MaxOpsBeforeYield),
|
|
9633
|
+
preventYield: get$11(context, PreventSchedulerYield)
|
|
9634
9634
|
};
|
|
9635
9635
|
};
|
|
9636
9636
|
const deferredInterruptCont = {
|
|
@@ -10059,7 +10059,7 @@ const raceAll = (all, options) => withFiber$1((parent) => {
|
|
|
10059
10059
|
const fibers = /* @__PURE__ */ new Set();
|
|
10060
10060
|
onExitUnsafe(parent, () => fibers.size === 0 ? void 0 : fiberInterruptAll(fibers));
|
|
10061
10061
|
return callback$2((resume) => {
|
|
10062
|
-
const effects = fromIterable$
|
|
10062
|
+
const effects = fromIterable$6(all);
|
|
10063
10063
|
const len = effects.length;
|
|
10064
10064
|
let doneCount = 0;
|
|
10065
10065
|
let done = false;
|
|
@@ -10778,7 +10778,7 @@ const whileLoop$1 = /*#__PURE__*/ makePrimitive$1({
|
|
|
10778
10778
|
const forEach$2 = /*#__PURE__*/ dual((args) => typeof args[1] === "function", (iterable, f, options) => suspend$3(() => {
|
|
10779
10779
|
const concurrency = resolveConcurrency(options?.concurrency);
|
|
10780
10780
|
if (concurrency === 1) return forEachSequential(iterable, f, options);
|
|
10781
|
-
const items = fromIterable$
|
|
10781
|
+
const items = fromIterable$6(iterable);
|
|
10782
10782
|
let length = items.length;
|
|
10783
10783
|
if (length === 0) return options?.discard ? void_$3 : succeed$9([]);
|
|
10784
10784
|
const out = options?.discard ? void 0 : new Array(length);
|
|
@@ -11143,11 +11143,11 @@ const NoopSpanProto = {
|
|
|
11143
11143
|
const noopSpan = (options) => Object.assign(Object.create(NoopSpanProto), options);
|
|
11144
11144
|
const filterDisablePropagation = (span) => {
|
|
11145
11145
|
if (!span) return none();
|
|
11146
|
-
return get$
|
|
11146
|
+
return get$11(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$1(span.parent)) : none() : some$1(span);
|
|
11147
11147
|
};
|
|
11148
11148
|
/** @internal */
|
|
11149
11149
|
const makeSpanUnsafe = (fiber, name, options) => {
|
|
11150
|
-
const disablePropagation = !fiber.cache.tracerEnabled || options?.annotations && get$
|
|
11150
|
+
const disablePropagation = !fiber.cache.tracerEnabled || options?.annotations && get$11(options.annotations, DisablePropagation);
|
|
11151
11151
|
const parent = options?.parent !== void 0 ? some$1(options.parent) : options?.root ? none() : filterDisablePropagation(fiber.cache.span);
|
|
11152
11152
|
let span;
|
|
11153
11153
|
if (disablePropagation) span = noopSpan({
|
|
@@ -14327,7 +14327,7 @@ const unwrapKey = /*#__PURE__*/ Service$1("effect/Layer/unwrap");
|
|
|
14327
14327
|
* @category converting
|
|
14328
14328
|
* @since 4.0.0
|
|
14329
14329
|
*/
|
|
14330
|
-
const unwrap$7 = (self) => flatMap$3(effect(unwrapKey)(self), get$
|
|
14330
|
+
const unwrap$7 = (self) => flatMap$3(effect(unwrapKey)(self), get$11(unwrapKey));
|
|
14331
14331
|
const mergeAllEffect = (layers, memoMap, scope) => {
|
|
14332
14332
|
const parentScope = forkUnsafe(scope, "parallel");
|
|
14333
14333
|
return forEach$2(layers, (layer) => layer.build(memoMap, forkUnsafe(parentScope, "sequential")), { concurrency: layers.length }).pipe(map$7((context) => mergeAll$2(...context)));
|
|
@@ -16410,7 +16410,7 @@ const empty$9 = () => {
|
|
|
16410
16410
|
* @category getters
|
|
16411
16411
|
* @since 2.0.0
|
|
16412
16412
|
*/
|
|
16413
|
-
const get$
|
|
16413
|
+
const get$8 = /*#__PURE__*/ dual(2, (self, key) => {
|
|
16414
16414
|
if (self.backing.has(key)) return some$1(self.backing.get(key));
|
|
16415
16415
|
else if (isSimpleKey(key)) return none();
|
|
16416
16416
|
const hash$3 = hash(key);
|
|
@@ -22673,7 +22673,7 @@ const offerAll = /*#__PURE__*/ dual(2, (self, messages) => callback$2((resume) =
|
|
|
22673
22673
|
* @since 4.0.0
|
|
22674
22674
|
*/
|
|
22675
22675
|
const offerAllUnsafe = (self, messages) => {
|
|
22676
|
-
if (self.state._tag !== "Open") return fromIterable$
|
|
22676
|
+
if (self.state._tag !== "Open") return fromIterable$6(messages);
|
|
22677
22677
|
else if (self.capacity === Number.POSITIVE_INFINITY || self.strategy === "sliding") {
|
|
22678
22678
|
appendAll(self.messages, messages);
|
|
22679
22679
|
if (self.strategy === "sliding") takeN(self.messages, self.messages.length - self.capacity);
|
|
@@ -22681,7 +22681,7 @@ const offerAllUnsafe = (self, messages) => {
|
|
|
22681
22681
|
return [];
|
|
22682
22682
|
}
|
|
22683
22683
|
const free = self.capacity <= 0 ? self.state.takers.size : self.capacity - self.messages.length;
|
|
22684
|
-
if (free === 0) return fromIterable$
|
|
22684
|
+
if (free === 0) return fromIterable$6(messages);
|
|
22685
22685
|
const remaining = [];
|
|
22686
22686
|
let i = 0;
|
|
22687
22687
|
for (const message of messages) {
|
|
@@ -28343,7 +28343,7 @@ var HashMapImpl = class {
|
|
|
28343
28343
|
const thatImpl = that;
|
|
28344
28344
|
if (this.size !== thatImpl.size) return false;
|
|
28345
28345
|
for (const [key, value] of this) {
|
|
28346
|
-
const otherValue = pipe(that, get$
|
|
28346
|
+
const otherValue = pipe(that, get$7(key));
|
|
28347
28347
|
if (isNone(otherValue) || !equals$1(value, otherValue.value)) return false;
|
|
28348
28348
|
}
|
|
28349
28349
|
return true;
|
|
@@ -28376,7 +28376,20 @@ const isHashMap$1 = (u) => hasProperty(u, HashMapTypeId);
|
|
|
28376
28376
|
/** @internal */
|
|
28377
28377
|
const empty$8 = () => new HashMapImpl(false, 0, emptyNode, 0);
|
|
28378
28378
|
/** @internal */
|
|
28379
|
-
const
|
|
28379
|
+
const fromIterable$5 = (entries) => {
|
|
28380
|
+
let root = emptyNode;
|
|
28381
|
+
let size = 0;
|
|
28382
|
+
const added = { value: false };
|
|
28383
|
+
for (const [key, value] of entries) {
|
|
28384
|
+
const hash$1 = hash(key);
|
|
28385
|
+
added.value = false;
|
|
28386
|
+
root = root.set(NaN, 0, hash$1, key, value, added);
|
|
28387
|
+
if (added.value) size++;
|
|
28388
|
+
}
|
|
28389
|
+
return new HashMapImpl(false, 0, root, size);
|
|
28390
|
+
};
|
|
28391
|
+
/** @internal */
|
|
28392
|
+
const get$7 = /*#__PURE__*/ dual(2, (self, key) => {
|
|
28380
28393
|
return self._root.get(0, hash(key), key);
|
|
28381
28394
|
});
|
|
28382
28395
|
/** @internal */
|
|
@@ -28438,6 +28451,46 @@ const size$1 = (self) => self.size;
|
|
|
28438
28451
|
* @since 2.0.0
|
|
28439
28452
|
*/
|
|
28440
28453
|
const isHashMap = isHashMap$1;
|
|
28454
|
+
/**
|
|
28455
|
+
* Creates a new `HashMap` from an iterable collection of key/value pairs.
|
|
28456
|
+
*
|
|
28457
|
+
* **Example** (Creating a HashMap from an iterable)
|
|
28458
|
+
*
|
|
28459
|
+
* ```ts import.meta.vitest
|
|
28460
|
+
* import { HashMap } from "effect"
|
|
28461
|
+
*
|
|
28462
|
+
* const entries = [["a", 1], ["b", 2], ["c", 3]] as const
|
|
28463
|
+
* HashMap.fromIterable(entries) // => HashMap.make(["a", 1], ["b", 2], ["c", 3])
|
|
28464
|
+
* ```
|
|
28465
|
+
*
|
|
28466
|
+
* @stability stable
|
|
28467
|
+
* @category constructors
|
|
28468
|
+
* @since 2.0.0
|
|
28469
|
+
*/
|
|
28470
|
+
const fromIterable$4 = fromIterable$5;
|
|
28471
|
+
/**
|
|
28472
|
+
* Looks up the value for the specified key in the `HashMap` safely using the
|
|
28473
|
+
* internal hashing function.
|
|
28474
|
+
*
|
|
28475
|
+
* **Example** (Looking up values)
|
|
28476
|
+
*
|
|
28477
|
+
* ```ts import.meta.vitest
|
|
28478
|
+
* import { HashMap, Option } from "effect"
|
|
28479
|
+
*
|
|
28480
|
+
* const map = HashMap.make(["a", 1], ["b", 2])
|
|
28481
|
+
*
|
|
28482
|
+
* HashMap.get(map, "a") // => Option.some(1)
|
|
28483
|
+
* HashMap.get(map, "c") // => Option.none()
|
|
28484
|
+
*
|
|
28485
|
+
* // Using pipe syntax
|
|
28486
|
+
* HashMap.get("b")(map) // => Option.some(2)
|
|
28487
|
+
* ```
|
|
28488
|
+
*
|
|
28489
|
+
* @stability stable
|
|
28490
|
+
* @category getters
|
|
28491
|
+
* @since 2.0.0
|
|
28492
|
+
*/
|
|
28493
|
+
const get$6 = get$7;
|
|
28441
28494
|
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/hashSet.js
|
|
28442
28495
|
/**
|
|
28443
28496
|
* @since 2.0.0
|
|
@@ -29113,7 +29166,7 @@ const TypeId$49 = /*#__PURE__*/ Symbol.for("~effect/http/Headers");
|
|
|
29113
29166
|
const Proto$17 = /*#__PURE__*/ Object.defineProperties(/*#__PURE__*/ Object.create(null), {
|
|
29114
29167
|
[TypeId$49]: { value: TypeId$49 },
|
|
29115
29168
|
[symbolRedactable]: { value(context) {
|
|
29116
|
-
return redact$1(this, get$
|
|
29169
|
+
return redact$1(this, get$11(context, CurrentRedactedNames$1));
|
|
29117
29170
|
} },
|
|
29118
29171
|
toJSON: { value() {
|
|
29119
29172
|
return redact$2(this);
|
|
@@ -29548,7 +29601,7 @@ const Proto$16 = {
|
|
|
29548
29601
|
[symbolRedactable](context) {
|
|
29549
29602
|
return {
|
|
29550
29603
|
_id: "UrlParams",
|
|
29551
|
-
params: Object.fromEntries(redact(this, get$
|
|
29604
|
+
params: Object.fromEntries(redact(this, get$11(context, CurrentRedactedNames)))
|
|
29552
29605
|
};
|
|
29553
29606
|
},
|
|
29554
29607
|
toJSON() {
|
|
@@ -29601,7 +29654,7 @@ const fromInput = (input) => {
|
|
|
29601
29654
|
return make$62(out);
|
|
29602
29655
|
};
|
|
29603
29656
|
const fromInputNested = (input) => {
|
|
29604
|
-
const entries = typeof input[Symbol.iterator] === "function" ? fromIterable$
|
|
29657
|
+
const entries = typeof input[Symbol.iterator] === "function" ? fromIterable$6(input) : Object.entries(input);
|
|
29605
29658
|
const out = [];
|
|
29606
29659
|
for (const [key, value] of entries) if (Array.isArray(value)) {
|
|
29607
29660
|
for (let i = 0; i < value.length; i++) if (value[i] !== void 0) out.push([key, coerce(value[i])]);
|
|
@@ -29749,7 +29802,7 @@ const decodeQueryKey = (key) => {
|
|
|
29749
29802
|
return key;
|
|
29750
29803
|
}
|
|
29751
29804
|
};
|
|
29752
|
-
const currentRedactedNames = () => get$
|
|
29805
|
+
const currentRedactedNames = () => get$11(globalThis["~effect/Fiber/currentFiber"]?.context ?? empty$14(), CurrentRedactedNames);
|
|
29753
29806
|
/**
|
|
29754
29807
|
* Query parameter names or patterns to redact in inspection, spans and errors.
|
|
29755
29808
|
*
|
|
@@ -39854,7 +39907,7 @@ const publishUnsafe = /*#__PURE__*/ dual(2, (self, value) => {
|
|
|
39854
39907
|
* @since 2.0.0
|
|
39855
39908
|
*/
|
|
39856
39909
|
const subscribe = (self) => uninterruptible(contextWith((services) => {
|
|
39857
|
-
const localScope = get$
|
|
39910
|
+
const localScope = get$11(services, Scope);
|
|
39858
39911
|
const scope = forkUnsafe(self.scope);
|
|
39859
39912
|
const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
|
|
39860
39913
|
return addFinalizer$1(scope, unsubscribe(subscription)).pipe(andThen(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
|
|
@@ -42858,7 +42911,7 @@ const makeUnsafe$2 = (options) => ({
|
|
|
42858
42911
|
*/
|
|
42859
42912
|
const make$54 = (options) => withFiber((fiber) => {
|
|
42860
42913
|
const context = fiber.context;
|
|
42861
|
-
const scope = get$
|
|
42914
|
+
const scope = get$11(context, Scope);
|
|
42862
42915
|
const self = makeUnsafe$2({
|
|
42863
42916
|
lookup: options.lookup,
|
|
42864
42917
|
context,
|
|
@@ -42925,7 +42978,7 @@ const get$4 = /*#__PURE__*/ dual(2, (self, key) => uninterruptibleMask((restore)
|
|
|
42925
42978
|
if (self.state._tag === "Closed") return interrupt$1;
|
|
42926
42979
|
const state = self.state;
|
|
42927
42980
|
const parent = getCurrent();
|
|
42928
|
-
const o = get$
|
|
42981
|
+
const o = get$8(state.map, key);
|
|
42929
42982
|
let entry;
|
|
42930
42983
|
if (o._tag === "Some") {
|
|
42931
42984
|
entry = o.value;
|
|
@@ -42959,7 +43012,7 @@ const get$4 = /*#__PURE__*/ dual(2, (self, key) => uninterruptibleMask((restore)
|
|
|
42959
43012
|
}));
|
|
42960
43013
|
const removeInterrupted = (self, key, entry, context) => {
|
|
42961
43014
|
if (self.state._tag === "Closed") return;
|
|
42962
|
-
const o = get$
|
|
43015
|
+
const o = get$8(self.state.map, key);
|
|
42963
43016
|
if (o._tag === "None" || o.value !== entry) return;
|
|
42964
43017
|
remove$3(self.state.map, key);
|
|
42965
43018
|
if (entry.refCount > 0) return;
|
|
@@ -42973,7 +43026,7 @@ const release$1 = (self, key, entry) => withFiber((fiber) => {
|
|
|
42973
43026
|
entry.refCount--;
|
|
42974
43027
|
if (entry.refCount > 0) return void_$1;
|
|
42975
43028
|
else if (self.state._tag === "Closed") return closeEntry(entry);
|
|
42976
|
-
const o = get$
|
|
43029
|
+
const o = get$8(self.state.map, key);
|
|
42977
43030
|
if (o._tag === "None" || o.value !== entry) return closeEntry(entry);
|
|
42978
43031
|
else if (isZero$1(entry.idleTimeToLive)) {
|
|
42979
43032
|
remove$3(self.state.map, key);
|
|
@@ -42987,7 +43040,7 @@ const release$1 = (self, key, entry) => withFiber((fiber) => {
|
|
|
42987
43040
|
const remaining = entry.expiresAt - now;
|
|
42988
43041
|
if (remaining <= 0) {
|
|
42989
43042
|
if (self.state._tag === "Closed" || entry.refCount > 0) return void_$1;
|
|
42990
|
-
const o = get$
|
|
43043
|
+
const o = get$8(self.state.map, key);
|
|
42991
43044
|
if (o._tag === "None" || o.value !== entry) return void_$1;
|
|
42992
43045
|
remove$3(self.state.map, key);
|
|
42993
43046
|
return ignoreCause(close(entry.scope, void_$2), {
|
|
@@ -43029,7 +43082,7 @@ var RcRefImpl = class {
|
|
|
43029
43082
|
/** @internal */
|
|
43030
43083
|
const make$53 = (options) => withFiber((fiber) => {
|
|
43031
43084
|
const context = fiber.context;
|
|
43032
|
-
const scope = get$
|
|
43085
|
+
const scope = get$11(context, Scope);
|
|
43033
43086
|
const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== void 0 ? fromInputUnsafe$1(options.idleTimeToLive) : void 0);
|
|
43034
43087
|
return as(addFinalizerExit(scope, () => {
|
|
43035
43088
|
const state = ref.state;
|
|
@@ -50161,7 +50214,7 @@ const Strict = /*#__PURE__*/ Reference("effect/ai/Tool/Strict", { defaultValue:
|
|
|
50161
50214
|
* @category getters
|
|
50162
50215
|
* @since 4.0.0
|
|
50163
50216
|
*/
|
|
50164
|
-
const getStrictMode = (tool) => get$
|
|
50217
|
+
const getStrictMode = (tool) => get$11(tool.annotations, Strict);
|
|
50165
50218
|
/**
|
|
50166
50219
|
* Schema for denied or interrupted tool calls.
|
|
50167
50220
|
*
|
|
@@ -57556,7 +57609,7 @@ const makeNoSerialization$1 = /*#__PURE__*/ fnUntraced(function* (group, options
|
|
|
57556
57609
|
const disableTracing = options?.disableTracing ?? false;
|
|
57557
57610
|
const generateRequestId = options?.generateRequestId ?? (() => requestIdCounter++);
|
|
57558
57611
|
const services = yield* context();
|
|
57559
|
-
const scope = get$
|
|
57612
|
+
const scope = get$11(services, Scope);
|
|
57560
57613
|
const entries = /* @__PURE__ */ new Map();
|
|
57561
57614
|
let isShutdown = false;
|
|
57562
57615
|
yield* addFinalizer$1(scope, withFiber((parent) => {
|
|
@@ -57903,7 +57956,7 @@ const makeRpcSchemas = (codecFor) => {
|
|
|
57903
57956
|
let entry = cache.get(rpc);
|
|
57904
57957
|
if (entry !== void 0) return entry;
|
|
57905
57958
|
const streamSchemas = getStreamSchemas(rpc.successSchema);
|
|
57906
|
-
const parseOptions = get$
|
|
57959
|
+
const parseOptions = get$11(rpc.annotations, ParseOptions);
|
|
57907
57960
|
const exitSchema$2 = exitSchema(rpc);
|
|
57908
57961
|
let decodeDiscardExit;
|
|
57909
57962
|
entry = {
|
|
@@ -65156,7 +65209,7 @@ const isMultipartError = (u) => hasProperty(u, MultipartErrorTypeId);
|
|
|
65156
65209
|
* @since 4.0.0
|
|
65157
65210
|
*/
|
|
65158
65211
|
const makeConfig = (headers) => withFiber((fiber) => {
|
|
65159
|
-
const mimeTypes = get$
|
|
65212
|
+
const mimeTypes = get$11(fiber.context, FieldMimeTypes);
|
|
65160
65213
|
return succeed$5({
|
|
65161
65214
|
headers,
|
|
65162
65215
|
maxParts: fiber.getRef(MaxParts),
|
|
@@ -68386,7 +68439,7 @@ var MiddlewareImpl = class MiddlewareImpl {
|
|
|
68386
68439
|
const stack = [getOrUndefinedUnsafe(context$3, fnContextKey)];
|
|
68387
68440
|
if (this.dependencies) {
|
|
68388
68441
|
const memoMap = yield* CurrentMemoMap;
|
|
68389
|
-
const scope = get$
|
|
68442
|
+
const scope = get$11(context$3, Scope);
|
|
68390
68443
|
const depsContext = yield* buildWithMemoMap(this.dependencies, memoMap, scope);
|
|
68391
68444
|
stack.push(...getMiddleware$1(depsContext));
|
|
68392
68445
|
}
|
|
@@ -68412,7 +68465,7 @@ const getMiddleware$1 = (context) => {
|
|
|
68412
68465
|
else {
|
|
68413
68466
|
const middleware = /* @__PURE__ */ new Set();
|
|
68414
68467
|
for (let i = maxLength - 1; i >= 0; i--) for (const arr of topLevel) if (i < arr.length) middleware.add(arr[i]);
|
|
68415
|
-
arr = fromIterable$
|
|
68468
|
+
arr = fromIterable$6(middleware).reverse();
|
|
68416
68469
|
}
|
|
68417
68470
|
middlewareCache.set(context, arr);
|
|
68418
68471
|
return arr;
|
|
@@ -68441,9 +68494,9 @@ const serve = (appLayer, options) => {
|
|
|
68441
68494
|
const layerWithRouter = provideMerge(appLayer, options?.routerConfig ? provide$2(layer$18, succeed$6(RouterConfig)(options.routerConfig)) : layer$18);
|
|
68442
68495
|
return contextWith((context) => {
|
|
68443
68496
|
const memoMap = CurrentMemoMap.forkOrCreate(context);
|
|
68444
|
-
return buildWithMemoMap(layerWithRouter, memoMap, get$
|
|
68497
|
+
return buildWithMemoMap(layerWithRouter, memoMap, get$11(context, Scope));
|
|
68445
68498
|
}).pipe(map$5((context) => {
|
|
68446
|
-
const handler = get$
|
|
68499
|
+
const handler = get$11(context, HttpRouter).asHttpEffect();
|
|
68447
68500
|
return merge$3(middleware ? serve$1(handler, middleware) : serve$1(handler), succeedContext(context));
|
|
68448
68501
|
}), unwrap$7, options?.disableListenLog ? identity : withLogAddress);
|
|
68449
68502
|
};
|
|
@@ -68480,7 +68533,7 @@ const makeNoSerialization = /*#__PURE__*/ fnUntraced(function* (group, options)
|
|
|
68480
68533
|
const concurrency = options.concurrency ?? "unbounded";
|
|
68481
68534
|
const disableFatalDefects = options.disableFatalDefects ?? false;
|
|
68482
68535
|
const services = yield* context();
|
|
68483
|
-
const scope = get$
|
|
68536
|
+
const scope = get$11(services, Scope);
|
|
68484
68537
|
const trackFiber = runIn(forkUnsafe(scope, "parallel"));
|
|
68485
68538
|
const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* make$69(concurrency);
|
|
68486
68539
|
const clients = /* @__PURE__ */ new Map();
|
|
@@ -68721,7 +68774,7 @@ const rpcCodecs = (codecFor, rpc) => {
|
|
|
68721
68774
|
let codecs = shared ? sharedRpcCodecs.get(rpc) : void 0;
|
|
68722
68775
|
if (codecs === void 0) {
|
|
68723
68776
|
const streamSchemas = getStreamSchemas(rpc.successSchema);
|
|
68724
|
-
const parseOptions = get$
|
|
68777
|
+
const parseOptions = get$11(rpc.annotations, ParseOptions);
|
|
68725
68778
|
codecs = {
|
|
68726
68779
|
decode: decodeUnknownEffect(codecFor(rpc.payloadSchema), parseOptions),
|
|
68727
68780
|
encodeChunk: encodeUnknownEffect(codecFor(NonEmptyArray(isSome(streamSchemas) ? streamSchemas.value.success : Any)), parseOptions),
|
|
@@ -68846,7 +68899,7 @@ const make$13 = /*#__PURE__*/ fnUntraced(function* (group, options) {
|
|
|
68846
68899
|
const exitSchema$1 = exitSchema(rpc);
|
|
68847
68900
|
discardSchemas = {
|
|
68848
68901
|
...schemas,
|
|
68849
|
-
encodeExit: encodeUnknownEffect(codecFor(Exit(Void, exitSchema$1.error, exitSchema$1.defect)), get$
|
|
68902
|
+
encodeExit: encodeUnknownEffect(codecFor(Exit(Void, exitSchema$1.error, exitSchema$1.defect)), get$11(rpc.annotations, ParseOptions))
|
|
68850
68903
|
};
|
|
68851
68904
|
discardSchemasCache.set(rpc, discardSchemas);
|
|
68852
68905
|
}
|
|
@@ -69413,7 +69466,7 @@ const runMiddleware = (handler, middleware, invocation, request) => {
|
|
|
69413
69466
|
if (isSuccess$1(failure) && !hasDies(cause)) {
|
|
69414
69467
|
const error = failure.success.error;
|
|
69415
69468
|
if (isHidden(error)) return fail$6(error);
|
|
69416
|
-
if (middleware.length === 0 || get$
|
|
69469
|
+
if (middleware.length === 0 || get$11(reasonAnnotations(failure.success), HandlerFailure)) return failCause$3(cause);
|
|
69417
69470
|
if (isMcpError(error)) return rejectWith(error);
|
|
69418
69471
|
}
|
|
69419
69472
|
return logError(cause).pipe(andThen(report(cause)), andThen(rejectWith(internalError)));
|
|
@@ -69502,7 +69555,7 @@ var McpServer = class McpServer extends (/*#__PURE__*/ Service$1()("effect/ai/Mc
|
|
|
69502
69555
|
_tag: "Exit",
|
|
69503
69556
|
exit: void_$2
|
|
69504
69557
|
}));
|
|
69505
|
-
const requestQueue = get$
|
|
69558
|
+
const requestQueue = get$11(fiber.context, RequestNotificationQueue);
|
|
69506
69559
|
if (requestQueue !== void 0 && queued.requestContext !== void 0 && isRequestNotification(notification)) {
|
|
69507
69560
|
offerUnsafe(requestQueue, queued);
|
|
69508
69561
|
return andThen(_await(delivered), acknowledge);
|
|
@@ -70460,7 +70513,7 @@ const registerToolkit = /*#__PURE__*/ fnUntraced(function* (toolkit) {
|
|
|
70460
70513
|
const failure = findFail(cause);
|
|
70461
70514
|
if (isSuccess$1(failure)) {
|
|
70462
70515
|
const error = failure.success.error;
|
|
70463
|
-
const origin = get$
|
|
70516
|
+
const origin = get$11(reasonAnnotations(failure.success), FailureOrigin);
|
|
70464
70517
|
if (origin === "parameters" && isParameterValidationError(error)) return fail$6(new InvalidParams({ message: error.reason.message }));
|
|
70465
70518
|
if (origin === "handler" && isDeclaredFailure(error)) return catchCause$2(declaredFailureResult(error), internalToolError);
|
|
70466
70519
|
}
|
|
@@ -70475,10 +70528,10 @@ const registerToolkit = /*#__PURE__*/ fnUntraced(function* (toolkit) {
|
|
|
70475
70528
|
outputSchema,
|
|
70476
70529
|
annotations: {
|
|
70477
70530
|
...getOption(tool.annotations, Title).pipe(map$11((title) => ({ title })), getOrUndefined$1),
|
|
70478
|
-
readOnlyHint: get$
|
|
70479
|
-
destructiveHint: get$
|
|
70480
|
-
idempotentHint: get$
|
|
70481
|
-
openWorldHint: get$
|
|
70531
|
+
readOnlyHint: get$11(tool.annotations, Readonly),
|
|
70532
|
+
destructiveHint: get$11(tool.annotations, Destructive),
|
|
70533
|
+
idempotentHint: get$11(tool.annotations, Idempotent),
|
|
70534
|
+
openWorldHint: get$11(tool.annotations, OpenWorld)
|
|
70482
70535
|
},
|
|
70483
70536
|
_meta: toolMeta
|
|
70484
70537
|
});
|
|
@@ -81728,7 +81781,7 @@ const Formatter = /*#__PURE__*/ Reference("effect/cli/CliOutput", { defaultValue
|
|
|
81728
81781
|
*/
|
|
81729
81782
|
const defaultPresenter = { present: /*#__PURE__*/ fnUntraced(function* (event) {
|
|
81730
81783
|
const context$2 = yield* context();
|
|
81731
|
-
const formatter = getOrUndefined(context$2, Formatter) ?? defaultFormatter({ colors: get$
|
|
81784
|
+
const formatter = getOrUndefined(context$2, Formatter) ?? defaultFormatter({ colors: get$11(context$2, TerminalCapabilities).canColor });
|
|
81732
81785
|
switch (event._tag) {
|
|
81733
81786
|
case "Help": return yield* log(formatter.formatHelpDoc(event.helpDoc));
|
|
81734
81787
|
case "InvalidInvocation":
|
|
@@ -84123,7 +84176,7 @@ const defaults = { builtIns: BuiltIns };
|
|
|
84123
84176
|
*
|
|
84124
84177
|
* @internal
|
|
84125
84178
|
*/
|
|
84126
|
-
const resolveFormatter = /*#__PURE__*/ contextWith((context) => succeed$5(getOrUndefined(context, Formatter) ?? defaultFormatter({ colors: get$
|
|
84179
|
+
const resolveFormatter = /*#__PURE__*/ contextWith((context) => succeed$5(getOrUndefined(context, Formatter) ?? defaultFormatter({ colors: get$11(context, TerminalCapabilities).canColor })));
|
|
84127
84180
|
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/cli/internal/lexer.js
|
|
84128
84181
|
/**
|
|
84129
84182
|
* @internal
|
|
@@ -86117,10 +86170,10 @@ const layerFlusher = /*#__PURE__*/ sync$1(Flusher, () => {
|
|
|
86117
86170
|
*/
|
|
86118
86171
|
const make$3 = /*#__PURE__*/ fnUntraced(function* (options) {
|
|
86119
86172
|
const services = yield* context();
|
|
86120
|
-
const clock = get$
|
|
86121
|
-
const scope = get$
|
|
86173
|
+
const clock = get$11(services, Clock);
|
|
86174
|
+
const scope = get$11(services, Scope);
|
|
86122
86175
|
const exportInterval = max(fromInputUnsafe$1(options.exportInterval), zero$2);
|
|
86123
|
-
const client = get$
|
|
86176
|
+
const client = get$11(services, HttpClient).pipe(tap((response) => ignore$1(response.arrayBuffer)), tapError((error) => error.response ? ignore$1(error.response.arrayBuffer) : void_$1), filterStatusOk, transformResponse(provideService(TracerPropagationEnabled, false)), retryTransient({
|
|
86124
86177
|
schedule: policy,
|
|
86125
86178
|
times: 3
|
|
86126
86179
|
}));
|
|
@@ -86910,7 +86963,7 @@ function layerKeyValueStore(directory) {
|
|
|
86910
86963
|
unwrap$7(map$5(dataDirectory, layerKeyValueStore));
|
|
86911
86964
|
const layerProtocol = mergeAll$1(layerSchemaBinary(), succeed$6(MaxBodySize)(mebibytes(10)));
|
|
86912
86965
|
const layerTelemetry = unwrap$7(gen(function* () {
|
|
86913
|
-
const name = yield*
|
|
86966
|
+
const name = (yield* packageMetadata).name;
|
|
86914
86967
|
return match$8(yield* option(String$5("OTEL_URL")), {
|
|
86915
86968
|
onNone: () => empty$10,
|
|
86916
86969
|
onSome: (url) => layerOtlp(`${name}-server`, url, "server")
|
|
@@ -87056,17 +87109,20 @@ function systemctl(...args) {
|
|
|
87056
87109
|
const unitDirectory = gen(function* () {
|
|
87057
87110
|
return (yield* Path$1).join(yield* String$5("HOME"), ".config", "systemd", "user");
|
|
87058
87111
|
});
|
|
87059
|
-
const install = fnUntraced(function* (name, command) {
|
|
87112
|
+
const install = fnUntraced(function* (name, command, options) {
|
|
87060
87113
|
const fs = yield* FileSystem;
|
|
87061
87114
|
const path = yield* Path$1;
|
|
87062
87115
|
const home = yield* String$5("HOME");
|
|
87063
87116
|
const directory = yield* unitDirectory;
|
|
87064
87117
|
const unit = `deslop-${name}.service`;
|
|
87065
87118
|
yield* fs.makeDirectory(directory, { recursive: true });
|
|
87066
|
-
yield* fs.writeFileString(path.join(directory, unit), `[Unit]\nDescription=Deslop ${name}\nAfter=network-online.target\n\n[Service]\nType=simple\nEnvironment=NODE_ENV=production\nEnvironment=${systemdArgument(`PATH=${home}/.vite-plus/bin:/usr/local/bin:/usr/bin:/bin`)}\nEnvironmentFile=-${
|
|
87119
|
+
yield* fs.writeFileString(path.join(directory, unit), `[Unit]\nDescription=Deslop ${name}\nAfter=network-online.target\n\n[Service]\nType=simple\nEnvironment=NODE_ENV=production\nEnvironment=${systemdArgument(`PATH=${home}/.vite-plus/bin:/usr/local/bin:/usr/bin:/bin`)}\nEnvironmentFile=-${replaceAll("%", "%%")(`${home}/.deslop/${name}.env`)}\nExecStart=${join$2(map$8(command, systemdArgument), " ")}\nRestart=on-failure\nRestartSec=3\nUMask=0077\n\n[Install]\nWantedBy=default.target\n`, { mode: 384 });
|
|
87067
87120
|
yield* systemctl("daemon-reload");
|
|
87068
87121
|
yield* systemctl("enable", unit);
|
|
87069
|
-
yield* systemctl(
|
|
87122
|
+
yield* systemctl(match$1(options?.restart === false, {
|
|
87123
|
+
onFalse: () => "restart",
|
|
87124
|
+
onTrue: () => "start"
|
|
87125
|
+
}), unit);
|
|
87070
87126
|
return `${unit} installed\n`;
|
|
87071
87127
|
});
|
|
87072
87128
|
const installUpdates = fnUntraced(function* (name, command) {
|
|
@@ -87271,12 +87327,14 @@ const InventoryItem = Struct({
|
|
|
87271
87327
|
]),
|
|
87272
87328
|
links: optionalKey(ArraySchema(String$6)),
|
|
87273
87329
|
name: String$6,
|
|
87330
|
+
next: optionalKey(Finite),
|
|
87274
87331
|
owned: optionalKey(Boolean$5),
|
|
87275
87332
|
port: optionalKey(Int$1),
|
|
87276
87333
|
process: optionalKey(String$6),
|
|
87277
87334
|
processes: optionalKey(ArraySchema(Process)),
|
|
87278
87335
|
protocol: optionalKey(Literals(["tcp", "udp"])),
|
|
87279
87336
|
publicAccess: optionalKey(Boolean$5),
|
|
87337
|
+
scheduled: optionalKey(Boolean$5),
|
|
87280
87338
|
scope: optionalKey(Literals(["user", "system"])),
|
|
87281
87339
|
self: optionalKey(Boolean$5),
|
|
87282
87340
|
state: String$6,
|
|
@@ -87333,6 +87391,10 @@ const HideRequest = Struct({
|
|
|
87333
87391
|
name: String$6,
|
|
87334
87392
|
target: optionalKey(String$6)
|
|
87335
87393
|
});
|
|
87394
|
+
const Timer = Struct({
|
|
87395
|
+
activates: NullOr(String$6),
|
|
87396
|
+
next: NullOr(Finite)
|
|
87397
|
+
});
|
|
87336
87398
|
const Unit = Struct({
|
|
87337
87399
|
active: String$6,
|
|
87338
87400
|
description: String$6,
|
|
@@ -87452,10 +87514,10 @@ var RpcContracts = class extends make$29(make$31("deploy.metrics", {
|
|
|
87452
87514
|
})).middleware(RpcAuth) {};
|
|
87453
87515
|
// src/services/exposures/service.ts
|
|
87454
87516
|
function caddyConfig(rows, storage) {
|
|
87455
|
-
return `{\n\tadmin 127.0.0.1:20219\n\tpersist_config off\n\tstorage file_system {\n\t\troot ${encodeSync(fromJsonString(String$6))(storage)}\n\t}\n}\n\n${join$2(map$8(filter$3(rows, (row) => row.kind === "public"), (row) => `${row.hostname} {\n\treverse_proxy 127.0.0.1:${row.port}\n}\n`), "\n")}`;
|
|
87517
|
+
return `{\n\tadmin 127.0.0.1:20219\n\tgrace_period 10s\n\tpersist_config off\n\tstorage file_system {\n\t\troot ${encodeSync(fromJsonString(String$6))(storage)}\n\t}\n}\n\n${join$2(map$8(filter$3(rows, (row) => row.kind === "public"), (row) => `${row.hostname} {\n\treverse_proxy 127.0.0.1:${row.port}\n}\n`), "\n")}`;
|
|
87456
87518
|
}
|
|
87457
87519
|
function ownsMapping(status, row) {
|
|
87458
|
-
return status.AllowFunnel?.[`${row.hostname}:${row.port}`] !== true && exists(get$
|
|
87520
|
+
return status.AllowFunnel?.[`${row.hostname}:${row.port}`] !== true && exists(get$10(status.Web ?? {}, `${row.hostname}:${row.port}`), (value) => size$3(value.Handlers) === 1 && value.Handlers["/"]?.Proxy === `http://127.0.0.1:${row.port}`);
|
|
87459
87521
|
}
|
|
87460
87522
|
function exposureUrl(row) {
|
|
87461
87523
|
if (row.kind === "tailnet") return `https://${row.hostname}:${row.port}`;
|
|
@@ -87521,7 +87583,7 @@ var Exposures = class Exposures extends Service$1()("@deslop/deploy/services/exp
|
|
|
87521
87583
|
configFile,
|
|
87522
87584
|
"--adapter",
|
|
87523
87585
|
"caddyfile"
|
|
87524
|
-
]), provideService(ChildProcessSpawner, spawner), provideService(FileSystem, fs), provideService(Path$1, path));
|
|
87586
|
+
], { restart: false }), provideService(ChildProcessSpawner, spawner), provideService(FileSystem, fs), provideService(Path$1, path));
|
|
87525
87587
|
yield* pipe(run(binary, [
|
|
87526
87588
|
"reload",
|
|
87527
87589
|
"--address",
|
|
@@ -87565,7 +87627,7 @@ var Exposures = class Exposures extends Service$1()("@deslop/deploy/services/exp
|
|
|
87565
87627
|
}, scoped, withPermit(lock), failed),
|
|
87566
87628
|
hide: fnUntraced(function* (name) {
|
|
87567
87629
|
const rows = yield* get(state);
|
|
87568
|
-
const owned = yield* pipe(fromOption(get$
|
|
87630
|
+
const owned = yield* pipe(fromOption(get$10(rows, name)), mapError$2((cause) => DeployError.make({
|
|
87569
87631
|
cause,
|
|
87570
87632
|
message: "Deploy does not own this exposure"
|
|
87571
87633
|
})));
|
|
@@ -87709,7 +87771,7 @@ function portItems(text, worker, fs, http) {
|
|
|
87709
87771
|
return getOrElse(yield* option$1(fs.readFileString(`/proc/${match[1]}/cgroup`)), () => "");
|
|
87710
87772
|
})
|
|
87711
87773
|
});
|
|
87712
|
-
const unit = getOrElse(last(fromIterable$
|
|
87774
|
+
const unit = getOrElse(last(fromIterable$6(matchAll(/\/([^/]+\.service)(?=\/|\n|$)/gu)(cgroup))), () => ["", ""])[1] ?? "";
|
|
87713
87775
|
const process = yield* match$8(match$3(/users:\(\("([^"]+)",pid=([0-9]+)/u)(line), {
|
|
87714
87776
|
onNone: () => succeed$5(""),
|
|
87715
87777
|
onSome: fnUntraced(function* (match) {
|
|
@@ -87780,16 +87842,24 @@ var Inventory = class Inventory extends Service$1()("@deslop/deploy/services/inv
|
|
|
87780
87842
|
}
|
|
87781
87843
|
const worker = trim(yield* fs.readFileString("/proc/sys/kernel/hostname"));
|
|
87782
87844
|
const processState = yield* make$44(none());
|
|
87783
|
-
|
|
87845
|
+
const units = fnUntraced(function* (system) {
|
|
87784
87846
|
const scope = match$1(system, {
|
|
87785
87847
|
onFalse: () => "user",
|
|
87786
87848
|
onTrue: () => "system"
|
|
87787
87849
|
});
|
|
87788
|
-
|
|
87789
|
-
|
|
87790
|
-
|
|
87791
|
-
|
|
87792
|
-
|
|
87850
|
+
const manager = match$1(system, {
|
|
87851
|
+
onFalse: () => ["--user"],
|
|
87852
|
+
onTrue: () => []
|
|
87853
|
+
});
|
|
87854
|
+
const scheduled = fromIterable$4(getSomes(map$8(yield* pipe(command("systemctl", [
|
|
87855
|
+
...manager,
|
|
87856
|
+
"list-timers",
|
|
87857
|
+
"--all",
|
|
87858
|
+
"--output=json",
|
|
87859
|
+
"--no-pager"
|
|
87860
|
+
]), flatMap$2(decodeUnknownEffect(fromJsonString(ArraySchema(Timer))))), (timer) => map$11(fromNullishOr(timer.activates), (unit) => [unit, map$11(fromNullishOr(timer.next), (next) => Math.floor(next / 1e3))]))));
|
|
87861
|
+
return yield* pipe(command("systemctl", [
|
|
87862
|
+
...manager,
|
|
87793
87863
|
"list-units",
|
|
87794
87864
|
"--all",
|
|
87795
87865
|
"--type=service",
|
|
@@ -87800,12 +87870,22 @@ var Inventory = class Inventory extends Service$1()("@deslop/deploy/services/inv
|
|
|
87800
87870
|
id: `${worker}:${scope}:${row.unit}`,
|
|
87801
87871
|
kind: "service",
|
|
87802
87872
|
name: row.unit,
|
|
87873
|
+
...match$8(get$6(scheduled, row.unit), {
|
|
87874
|
+
onNone: () => ({}),
|
|
87875
|
+
onSome: (next) => match$8(next, {
|
|
87876
|
+
onNone: () => ({ scheduled: true }),
|
|
87877
|
+
onSome: (time) => ({
|
|
87878
|
+
next: time,
|
|
87879
|
+
scheduled: true
|
|
87880
|
+
})
|
|
87881
|
+
})
|
|
87882
|
+
}),
|
|
87803
87883
|
scope,
|
|
87804
87884
|
state: `${row.active} · ${row.sub}`,
|
|
87805
87885
|
url: "",
|
|
87806
87886
|
worker
|
|
87807
87887
|
}))));
|
|
87808
|
-
}
|
|
87888
|
+
});
|
|
87809
87889
|
return Inventory.of({ snapshot: scoped(gen(function* () {
|
|
87810
87890
|
const sources = yield* all$1([
|
|
87811
87891
|
collect("User services", units(false)),
|
|
@@ -87816,11 +87896,11 @@ var Inventory = class Inventory extends Service$1()("@deslop/deploy/services/inv
|
|
|
87816
87896
|
"--format",
|
|
87817
87897
|
"{{json .}}"
|
|
87818
87898
|
]), flatMap$2((text) => forEach$1(filter$3(split$1(text, "\n"), isNonEmpty$1), (line) => decodeEffect(fromJsonString(Container))(line), { concurrency: 1 })), map$5((rows) => map$8(rows, (row) => InventoryItem.make({
|
|
87819
|
-
bindings: [...map$8(fromIterable$
|
|
87899
|
+
bindings: [...map$8(fromIterable$6(matchAll(/traefik\.http\.services\.[^=,]+\.loadbalancer\.server\.port=([0-9]+)/gu)(row.Labels ?? "")), (match) => ({
|
|
87820
87900
|
address: "container",
|
|
87821
87901
|
port: getOrElse(parse$2(match[1] ?? ""), () => 0),
|
|
87822
87902
|
protocol: "tcp"
|
|
87823
|
-
})), ...map$8(fromIterable$
|
|
87903
|
+
})), ...map$8(fromIterable$6(matchAll(/((?:[0-9.]+|\[::\])):([0-9]+)->[0-9]+\/(tcp|udp)/gu)(row.Ports)), (match) => ({
|
|
87824
87904
|
address: `${match[1]}:${match[2]}`,
|
|
87825
87905
|
port: getOrElse(parse$2(match[2] ?? ""), () => 0),
|
|
87826
87906
|
protocol: match$1(match[3] === "udp", {
|
|
@@ -87831,7 +87911,7 @@ var Inventory = class Inventory extends Service$1()("@deslop/deploy/services/inv
|
|
|
87831
87911
|
detail: row.Status,
|
|
87832
87912
|
id: `${worker}:docker:${row.ID}`,
|
|
87833
87913
|
kind: "container",
|
|
87834
|
-
links: dedupe(map$8(fromIterable$
|
|
87914
|
+
links: dedupe(map$8(fromIterable$6(matchAll(/Host\(`([^`]+)`\)/gu)(row.Labels ?? "")), (match) => `https://${match[1]}`)),
|
|
87835
87915
|
name: row.Names,
|
|
87836
87916
|
state: row.State,
|
|
87837
87917
|
url: "",
|