@deslop/deploy 0.1.1223 → 0.1.1228

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/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$10(fiber.context, this));
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$10(fiber.context, this)));
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$10(fiber.context, this))));
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$10 = getUnsafe$1;
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$9 = /*#__PURE__*/ dual(2, (self, key) => Object.hasOwn(self, key) ? some$1(self[key]) : none());
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$4 = (collection) => Array$2.isArray(collection) ? collection : Array$2.from(collection);
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$8 = /*#__PURE__*/ dual(2, (self, index) => {
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$8(0);
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$4(self);
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$4(self);
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$4(self);
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$4(self);
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$4(self);
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$4(self).reduce((b, a, i) => f(b, a, i), b));
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$4(self);
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$4(self).join(sep));
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$10(this.context, ref);
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$10(context, Scheduler),
9623
+ scheduler: get$11(context, Scheduler),
9624
9624
  tracer: currentTracer,
9625
9625
  tracerContext: currentTracer ? currentTracer["context"] : void 0,
9626
- tracerEnabled: get$10(context, TracerEnabled),
9626
+ tracerEnabled: get$11(context, TracerEnabled),
9627
9627
  span: getOrUndefinedUnsafe(context, ParentSpanKey),
9628
- logLevel: get$10(context, CurrentLogLevel$1),
9629
- minimumLogLevel: get$10(context, MinimumLogLevel$1),
9630
- stackFrame: get$10(context, CurrentStackFrame),
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$10(context, MaxOpsBeforeYield),
9633
- preventYield: get$10(context, PreventSchedulerYield)
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$4(all);
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$4(iterable);
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$10(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$1(span.parent)) : none() : some$1(span);
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$10(options.annotations, DisablePropagation);
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$10(unwrapKey));
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$7 = /*#__PURE__*/ dual(2, (self, key) => {
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$4(messages);
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$4(messages);
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$6(key));
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 get$6 = /*#__PURE__*/ dual(2, (self, key) => {
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$10(context, CurrentRedactedNames$1));
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$10(context, CurrentRedactedNames)))
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$4(input) : Object.entries(input);
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$10(globalThis["~effect/Fiber/currentFiber"]?.context ?? empty$14(), CurrentRedactedNames);
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$10(services, Scope);
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$10(context, Scope);
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$7(state.map, key);
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$7(self.state.map, key);
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$7(self.state.map, key);
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$7(self.state.map, key);
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$10(context, Scope);
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$10(tool.annotations, Strict);
50217
+ const getStrictMode = (tool) => get$11(tool.annotations, Strict);
50165
50218
  /**
50166
50219
  * Schema for denied or interrupted tool calls.
50167
50220
  *
@@ -51416,6 +51469,23 @@ const compressBody = /*#__PURE__*/ dual((args) => isHttpClientRequest(args[0]),
51416
51469
  return map$5(compressBody$1(self.body, algorithm, options), (body) => body === self.body ? self : makeWith$1(self.method, self.url, self.urlParams, self.hash, set$3(updateContentLength(self.headers, body), "content-encoding", algorithm), body));
51417
51470
  });
51418
51471
  /**
51472
+ * Sets a JSON request body using unsafe JSON encoding.
51473
+ *
51474
+ * **When to use**
51475
+ *
51476
+ * Use when the request body is known to be JSON-serializable and a synchronous
51477
+ * `HttpClientRequest` result is needed.
51478
+ *
51479
+ * **Gotchas**
51480
+ *
51481
+ * JSON encoding may throw instead of failing in the Effect error channel.
51482
+ *
51483
+ * @stability unstable
51484
+ * @category combinators
51485
+ * @since 4.0.0
51486
+ */
51487
+ const bodyJsonUnsafe = /*#__PURE__*/ dual(2, (self, body) => setBody$1(self, jsonUnsafe$1(body)));
51488
+ /**
51419
51489
  * Builds a `URL` from the request URL, query parameters, and hash, returning `Option.none()` if the URL is invalid.
51420
51490
  *
51421
51491
  * @stability unstable
@@ -57556,7 +57626,7 @@ const makeNoSerialization$1 = /*#__PURE__*/ fnUntraced(function* (group, options
57556
57626
  const disableTracing = options?.disableTracing ?? false;
57557
57627
  const generateRequestId = options?.generateRequestId ?? (() => requestIdCounter++);
57558
57628
  const services = yield* context();
57559
- const scope = get$10(services, Scope);
57629
+ const scope = get$11(services, Scope);
57560
57630
  const entries = /* @__PURE__ */ new Map();
57561
57631
  let isShutdown = false;
57562
57632
  yield* addFinalizer$1(scope, withFiber((parent) => {
@@ -57903,7 +57973,7 @@ const makeRpcSchemas = (codecFor) => {
57903
57973
  let entry = cache.get(rpc);
57904
57974
  if (entry !== void 0) return entry;
57905
57975
  const streamSchemas = getStreamSchemas(rpc.successSchema);
57906
- const parseOptions = get$10(rpc.annotations, ParseOptions);
57976
+ const parseOptions = get$11(rpc.annotations, ParseOptions);
57907
57977
  const exitSchema$2 = exitSchema(rpc);
57908
57978
  let decodeDiscardExit;
57909
57979
  entry = {
@@ -65156,7 +65226,7 @@ const isMultipartError = (u) => hasProperty(u, MultipartErrorTypeId);
65156
65226
  * @since 4.0.0
65157
65227
  */
65158
65228
  const makeConfig = (headers) => withFiber((fiber) => {
65159
- const mimeTypes = get$10(fiber.context, FieldMimeTypes);
65229
+ const mimeTypes = get$11(fiber.context, FieldMimeTypes);
65160
65230
  return succeed$5({
65161
65231
  headers,
65162
65232
  maxParts: fiber.getRef(MaxParts),
@@ -68386,7 +68456,7 @@ var MiddlewareImpl = class MiddlewareImpl {
68386
68456
  const stack = [getOrUndefinedUnsafe(context$3, fnContextKey)];
68387
68457
  if (this.dependencies) {
68388
68458
  const memoMap = yield* CurrentMemoMap;
68389
- const scope = get$10(context$3, Scope);
68459
+ const scope = get$11(context$3, Scope);
68390
68460
  const depsContext = yield* buildWithMemoMap(this.dependencies, memoMap, scope);
68391
68461
  stack.push(...getMiddleware$1(depsContext));
68392
68462
  }
@@ -68412,7 +68482,7 @@ const getMiddleware$1 = (context) => {
68412
68482
  else {
68413
68483
  const middleware = /* @__PURE__ */ new Set();
68414
68484
  for (let i = maxLength - 1; i >= 0; i--) for (const arr of topLevel) if (i < arr.length) middleware.add(arr[i]);
68415
- arr = fromIterable$4(middleware).reverse();
68485
+ arr = fromIterable$6(middleware).reverse();
68416
68486
  }
68417
68487
  middlewareCache.set(context, arr);
68418
68488
  return arr;
@@ -68441,9 +68511,9 @@ const serve = (appLayer, options) => {
68441
68511
  const layerWithRouter = provideMerge(appLayer, options?.routerConfig ? provide$2(layer$18, succeed$6(RouterConfig)(options.routerConfig)) : layer$18);
68442
68512
  return contextWith((context) => {
68443
68513
  const memoMap = CurrentMemoMap.forkOrCreate(context);
68444
- return buildWithMemoMap(layerWithRouter, memoMap, get$10(context, Scope));
68514
+ return buildWithMemoMap(layerWithRouter, memoMap, get$11(context, Scope));
68445
68515
  }).pipe(map$5((context) => {
68446
- const handler = get$10(context, HttpRouter).asHttpEffect();
68516
+ const handler = get$11(context, HttpRouter).asHttpEffect();
68447
68517
  return merge$3(middleware ? serve$1(handler, middleware) : serve$1(handler), succeedContext(context));
68448
68518
  }), unwrap$7, options?.disableListenLog ? identity : withLogAddress);
68449
68519
  };
@@ -68480,7 +68550,7 @@ const makeNoSerialization = /*#__PURE__*/ fnUntraced(function* (group, options)
68480
68550
  const concurrency = options.concurrency ?? "unbounded";
68481
68551
  const disableFatalDefects = options.disableFatalDefects ?? false;
68482
68552
  const services = yield* context();
68483
- const scope = get$10(services, Scope);
68553
+ const scope = get$11(services, Scope);
68484
68554
  const trackFiber = runIn(forkUnsafe(scope, "parallel"));
68485
68555
  const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* make$69(concurrency);
68486
68556
  const clients = /* @__PURE__ */ new Map();
@@ -68721,7 +68791,7 @@ const rpcCodecs = (codecFor, rpc) => {
68721
68791
  let codecs = shared ? sharedRpcCodecs.get(rpc) : void 0;
68722
68792
  if (codecs === void 0) {
68723
68793
  const streamSchemas = getStreamSchemas(rpc.successSchema);
68724
- const parseOptions = get$10(rpc.annotations, ParseOptions);
68794
+ const parseOptions = get$11(rpc.annotations, ParseOptions);
68725
68795
  codecs = {
68726
68796
  decode: decodeUnknownEffect(codecFor(rpc.payloadSchema), parseOptions),
68727
68797
  encodeChunk: encodeUnknownEffect(codecFor(NonEmptyArray(isSome(streamSchemas) ? streamSchemas.value.success : Any)), parseOptions),
@@ -68846,7 +68916,7 @@ const make$13 = /*#__PURE__*/ fnUntraced(function* (group, options) {
68846
68916
  const exitSchema$1 = exitSchema(rpc);
68847
68917
  discardSchemas = {
68848
68918
  ...schemas,
68849
- encodeExit: encodeUnknownEffect(codecFor(Exit(Void, exitSchema$1.error, exitSchema$1.defect)), get$10(rpc.annotations, ParseOptions))
68919
+ encodeExit: encodeUnknownEffect(codecFor(Exit(Void, exitSchema$1.error, exitSchema$1.defect)), get$11(rpc.annotations, ParseOptions))
68850
68920
  };
68851
68921
  discardSchemasCache.set(rpc, discardSchemas);
68852
68922
  }
@@ -69413,7 +69483,7 @@ const runMiddleware = (handler, middleware, invocation, request) => {
69413
69483
  if (isSuccess$1(failure) && !hasDies(cause)) {
69414
69484
  const error = failure.success.error;
69415
69485
  if (isHidden(error)) return fail$6(error);
69416
- if (middleware.length === 0 || get$10(reasonAnnotations(failure.success), HandlerFailure)) return failCause$3(cause);
69486
+ if (middleware.length === 0 || get$11(reasonAnnotations(failure.success), HandlerFailure)) return failCause$3(cause);
69417
69487
  if (isMcpError(error)) return rejectWith(error);
69418
69488
  }
69419
69489
  return logError(cause).pipe(andThen(report(cause)), andThen(rejectWith(internalError)));
@@ -69502,7 +69572,7 @@ var McpServer = class McpServer extends (/*#__PURE__*/ Service$1()("effect/ai/Mc
69502
69572
  _tag: "Exit",
69503
69573
  exit: void_$2
69504
69574
  }));
69505
- const requestQueue = get$10(fiber.context, RequestNotificationQueue);
69575
+ const requestQueue = get$11(fiber.context, RequestNotificationQueue);
69506
69576
  if (requestQueue !== void 0 && queued.requestContext !== void 0 && isRequestNotification(notification)) {
69507
69577
  offerUnsafe(requestQueue, queued);
69508
69578
  return andThen(_await(delivered), acknowledge);
@@ -70460,7 +70530,7 @@ const registerToolkit = /*#__PURE__*/ fnUntraced(function* (toolkit) {
70460
70530
  const failure = findFail(cause);
70461
70531
  if (isSuccess$1(failure)) {
70462
70532
  const error = failure.success.error;
70463
- const origin = get$10(reasonAnnotations(failure.success), FailureOrigin);
70533
+ const origin = get$11(reasonAnnotations(failure.success), FailureOrigin);
70464
70534
  if (origin === "parameters" && isParameterValidationError(error)) return fail$6(new InvalidParams({ message: error.reason.message }));
70465
70535
  if (origin === "handler" && isDeclaredFailure(error)) return catchCause$2(declaredFailureResult(error), internalToolError);
70466
70536
  }
@@ -70475,10 +70545,10 @@ const registerToolkit = /*#__PURE__*/ fnUntraced(function* (toolkit) {
70475
70545
  outputSchema,
70476
70546
  annotations: {
70477
70547
  ...getOption(tool.annotations, Title).pipe(map$11((title) => ({ title })), getOrUndefined$1),
70478
- readOnlyHint: get$10(tool.annotations, Readonly),
70479
- destructiveHint: get$10(tool.annotations, Destructive),
70480
- idempotentHint: get$10(tool.annotations, Idempotent),
70481
- openWorldHint: get$10(tool.annotations, OpenWorld)
70548
+ readOnlyHint: get$11(tool.annotations, Readonly),
70549
+ destructiveHint: get$11(tool.annotations, Destructive),
70550
+ idempotentHint: get$11(tool.annotations, Idempotent),
70551
+ openWorldHint: get$11(tool.annotations, OpenWorld)
70482
70552
  },
70483
70553
  _meta: toolMeta
70484
70554
  });
@@ -81728,7 +81798,7 @@ const Formatter = /*#__PURE__*/ Reference("effect/cli/CliOutput", { defaultValue
81728
81798
  */
81729
81799
  const defaultPresenter = { present: /*#__PURE__*/ fnUntraced(function* (event) {
81730
81800
  const context$2 = yield* context();
81731
- const formatter = getOrUndefined(context$2, Formatter) ?? defaultFormatter({ colors: get$10(context$2, TerminalCapabilities).canColor });
81801
+ const formatter = getOrUndefined(context$2, Formatter) ?? defaultFormatter({ colors: get$11(context$2, TerminalCapabilities).canColor });
81732
81802
  switch (event._tag) {
81733
81803
  case "Help": return yield* log(formatter.formatHelpDoc(event.helpDoc));
81734
81804
  case "InvalidInvocation":
@@ -84123,7 +84193,7 @@ const defaults = { builtIns: BuiltIns };
84123
84193
  *
84124
84194
  * @internal
84125
84195
  */
84126
- const resolveFormatter = /*#__PURE__*/ contextWith((context) => succeed$5(getOrUndefined(context, Formatter) ?? defaultFormatter({ colors: get$10(context, TerminalCapabilities).canColor })));
84196
+ const resolveFormatter = /*#__PURE__*/ contextWith((context) => succeed$5(getOrUndefined(context, Formatter) ?? defaultFormatter({ colors: get$11(context, TerminalCapabilities).canColor })));
84127
84197
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/cli/internal/lexer.js
84128
84198
  /**
84129
84199
  * @internal
@@ -86003,6 +86073,8 @@ const SecureOrigin = Origin.check(makeFilter((value) => {
86003
86073
  const Port = String$6.check(isPattern(/^\d{1,5}$/u), makeFilter((value) => exists(parse$2(value), (port) => port >= 1 && port <= 65535), { expected: "a port between 1 and 65535" }));
86004
86074
  const AppVersion = String$6.check(isPattern(/^0\.1\.\d+$/u));
86005
86075
  const RuntimeConfig = Struct({
86076
+ auth: optionalKey(String$6),
86077
+ name: String$6,
86006
86078
  traces: String$6,
86007
86079
  version: AppVersion
86008
86080
  });
@@ -86117,10 +86189,10 @@ const layerFlusher = /*#__PURE__*/ sync$1(Flusher, () => {
86117
86189
  */
86118
86190
  const make$3 = /*#__PURE__*/ fnUntraced(function* (options) {
86119
86191
  const services = yield* context();
86120
- const clock = get$10(services, Clock);
86121
- const scope = get$10(services, Scope);
86192
+ const clock = get$11(services, Clock);
86193
+ const scope = get$11(services, Scope);
86122
86194
  const exportInterval = max(fromInputUnsafe$1(options.exportInterval), zero$2);
86123
- const client = get$10(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({
86195
+ 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
86196
  schedule: policy,
86125
86197
  times: 3
86126
86198
  }));
@@ -86910,7 +86982,7 @@ function layerKeyValueStore(directory) {
86910
86982
  unwrap$7(map$5(dataDirectory, layerKeyValueStore));
86911
86983
  const layerProtocol = mergeAll$1(layerSchemaBinary(), succeed$6(MaxBodySize)(mebibytes(10)));
86912
86984
  const layerTelemetry = unwrap$7(gen(function* () {
86913
- const name = yield* appName;
86985
+ const name = (yield* packageMetadata).name;
86914
86986
  return match$8(yield* option(String$5("OTEL_URL")), {
86915
86987
  onNone: () => empty$10,
86916
86988
  onSome: (url) => layerOtlp(`${name}-server`, url, "server")
@@ -86935,10 +87007,17 @@ const layerRoutes = use((router) => gen(function* () {
86935
87007
  })
86936
87008
  });
86937
87009
  });
86938
- yield* router.add("GET", "/api/runtime", flatMap$2(packageMetadata, (metadata) => schemaJson(RuntimeConfig)({
86939
- traces,
86940
- version: metadata.version
86941
- })));
87010
+ yield* router.add("GET", "/api/runtime", gen(function* () {
87011
+ return yield* schemaJson(RuntimeConfig)({
87012
+ ...match$8(issuer, {
87013
+ onNone: () => ({}),
87014
+ onSome: (origin) => ({ auth: origin })
87015
+ }),
87016
+ name: yield* appName,
87017
+ traces,
87018
+ version: (yield* packageMetadata).version
87019
+ });
87020
+ }));
86942
87021
  yield* router.add("GET", "/auth/sign-in", toIssuer({}));
86943
87022
  yield* router.add("GET", "/auth/sign-out", toIssuer({ "sign-out": "" }));
86944
87023
  yield* router.add("GET", "/auth/user", gen(function* () {
@@ -86950,6 +87029,22 @@ const layerRoutes = use((router) => gen(function* () {
86950
87029
  }, { headers: { "cache-control": "no-store" } });
86951
87030
  }));
86952
87031
  }));
87032
+ const layerAnnounce = effectDiscard(gen(function* () {
87033
+ const origin = new URL(yield* String$5("APP_URL")).origin;
87034
+ const client = filterStatusOk(yield* HttpClient);
87035
+ yield* match$8(yield* option(String$5("AUTH_URL")), {
87036
+ onNone: () => void_$1,
87037
+ onSome: fnUntraced(function* (issuer) {
87038
+ yield* pipe(post(new URL("/api/apps", issuer).href), bodyJsonUnsafe({ origin }), client.execute, delay("2 seconds"), retry({
87039
+ schedule: spaced("1 minute"),
87040
+ times: 60
87041
+ }), ignore$1({
87042
+ log: "Warn",
87043
+ message: "Auth did not list this app"
87044
+ }), forkScoped);
87045
+ })
87046
+ });
87047
+ }));
86953
87048
  function layerIcon(icon) {
86954
87049
  return add("GET", "/icon", succeed$5(text(icon, {
86955
87050
  contentType: "image/svg+xml",
@@ -87056,17 +87151,20 @@ function systemctl(...args) {
87056
87151
  const unitDirectory = gen(function* () {
87057
87152
  return (yield* Path$1).join(yield* String$5("HOME"), ".config", "systemd", "user");
87058
87153
  });
87059
- const install = fnUntraced(function* (name, command) {
87154
+ const install = fnUntraced(function* (name, command, options) {
87060
87155
  const fs = yield* FileSystem;
87061
87156
  const path = yield* Path$1;
87062
87157
  const home = yield* String$5("HOME");
87063
87158
  const directory = yield* unitDirectory;
87064
87159
  const unit = `deslop-${name}.service`;
87065
87160
  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=-${systemdArgument(`${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 });
87161
+ 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
87162
  yield* systemctl("daemon-reload");
87068
87163
  yield* systemctl("enable", unit);
87069
- yield* systemctl("restart", unit);
87164
+ yield* systemctl(match$1(options?.restart === false, {
87165
+ onFalse: () => "restart",
87166
+ onTrue: () => "start"
87167
+ }), unit);
87070
87168
  return `${unit} installed\n`;
87071
87169
  });
87072
87170
  const installUpdates = fnUntraced(function* (name, command) {
@@ -87189,7 +87287,7 @@ const provider = fnUntraced(function* (given) {
87189
87287
  });
87190
87288
  const layerPlatform = mergeAll$1(layer$4, layer$12, layer$15);
87191
87289
  function server(app) {
87192
- return pipe(serve(pipe(mergeAll$1(app.routes, layerRoutes, layerIcon(app.icon), layerWeb), provide$2(Auth.layer)), {
87290
+ return pipe(serve(pipe(mergeAll$1(app.routes, layerRoutes, layerIcon(app.icon), layerWeb, layerAnnounce), provide$2(Auth.layer)), {
87193
87291
  disableLogger: true,
87194
87292
  middleware: (http) => guard(app.middleware?.(http) ?? http)
87195
87293
  }), provide$2(mergeAll$1(layerProtocol, match$1(app.telemetry === false, {
@@ -87271,12 +87369,14 @@ const InventoryItem = Struct({
87271
87369
  ]),
87272
87370
  links: optionalKey(ArraySchema(String$6)),
87273
87371
  name: String$6,
87372
+ next: optionalKey(Finite),
87274
87373
  owned: optionalKey(Boolean$5),
87275
87374
  port: optionalKey(Int$1),
87276
87375
  process: optionalKey(String$6),
87277
87376
  processes: optionalKey(ArraySchema(Process)),
87278
87377
  protocol: optionalKey(Literals(["tcp", "udp"])),
87279
87378
  publicAccess: optionalKey(Boolean$5),
87379
+ scheduled: optionalKey(Boolean$5),
87280
87380
  scope: optionalKey(Literals(["user", "system"])),
87281
87381
  self: optionalKey(Boolean$5),
87282
87382
  state: String$6,
@@ -87333,6 +87433,10 @@ const HideRequest = Struct({
87333
87433
  name: String$6,
87334
87434
  target: optionalKey(String$6)
87335
87435
  });
87436
+ const Timer = Struct({
87437
+ activates: NullOr(String$6),
87438
+ next: NullOr(Finite)
87439
+ });
87336
87440
  const Unit = Struct({
87337
87441
  active: String$6,
87338
87442
  description: String$6,
@@ -87452,10 +87556,10 @@ var RpcContracts = class extends make$29(make$31("deploy.metrics", {
87452
87556
  })).middleware(RpcAuth) {};
87453
87557
  // src/services/exposures/service.ts
87454
87558
  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")}`;
87559
+ 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
87560
  }
87457
87561
  function ownsMapping(status, row) {
87458
- return status.AllowFunnel?.[`${row.hostname}:${row.port}`] !== true && exists(get$9(status.Web ?? {}, `${row.hostname}:${row.port}`), (value) => size$3(value.Handlers) === 1 && value.Handlers["/"]?.Proxy === `http://127.0.0.1:${row.port}`);
87562
+ 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
87563
  }
87460
87564
  function exposureUrl(row) {
87461
87565
  if (row.kind === "tailnet") return `https://${row.hostname}:${row.port}`;
@@ -87521,7 +87625,7 @@ var Exposures = class Exposures extends Service$1()("@deslop/deploy/services/exp
87521
87625
  configFile,
87522
87626
  "--adapter",
87523
87627
  "caddyfile"
87524
- ]), provideService(ChildProcessSpawner, spawner), provideService(FileSystem, fs), provideService(Path$1, path));
87628
+ ], { restart: false }), provideService(ChildProcessSpawner, spawner), provideService(FileSystem, fs), provideService(Path$1, path));
87525
87629
  yield* pipe(run(binary, [
87526
87630
  "reload",
87527
87631
  "--address",
@@ -87565,7 +87669,7 @@ var Exposures = class Exposures extends Service$1()("@deslop/deploy/services/exp
87565
87669
  }, scoped, withPermit(lock), failed),
87566
87670
  hide: fnUntraced(function* (name) {
87567
87671
  const rows = yield* get(state);
87568
- const owned = yield* pipe(fromOption(get$9(rows, name)), mapError$2((cause) => DeployError.make({
87672
+ const owned = yield* pipe(fromOption(get$10(rows, name)), mapError$2((cause) => DeployError.make({
87569
87673
  cause,
87570
87674
  message: "Deploy does not own this exposure"
87571
87675
  })));
@@ -87709,7 +87813,7 @@ function portItems(text, worker, fs, http) {
87709
87813
  return getOrElse(yield* option$1(fs.readFileString(`/proc/${match[1]}/cgroup`)), () => "");
87710
87814
  })
87711
87815
  });
87712
- const unit = getOrElse(last(fromIterable$4(matchAll(/\/([^/]+\.service)(?=\/|\n|$)/gu)(cgroup))), () => ["", ""])[1] ?? "";
87816
+ const unit = getOrElse(last(fromIterable$6(matchAll(/\/([^/]+\.service)(?=\/|\n|$)/gu)(cgroup))), () => ["", ""])[1] ?? "";
87713
87817
  const process = yield* match$8(match$3(/users:\(\("([^"]+)",pid=([0-9]+)/u)(line), {
87714
87818
  onNone: () => succeed$5(""),
87715
87819
  onSome: fnUntraced(function* (match) {
@@ -87780,16 +87884,24 @@ var Inventory = class Inventory extends Service$1()("@deslop/deploy/services/inv
87780
87884
  }
87781
87885
  const worker = trim(yield* fs.readFileString("/proc/sys/kernel/hostname"));
87782
87886
  const processState = yield* make$44(none());
87783
- function units(system) {
87887
+ const units = fnUntraced(function* (system) {
87784
87888
  const scope = match$1(system, {
87785
87889
  onFalse: () => "user",
87786
87890
  onTrue: () => "system"
87787
87891
  });
87788
- return pipe(command("systemctl", [
87789
- ...match$1(system, {
87790
- onFalse: () => ["--user"],
87791
- onTrue: () => []
87792
- }),
87892
+ const manager = match$1(system, {
87893
+ onFalse: () => ["--user"],
87894
+ onTrue: () => []
87895
+ });
87896
+ const scheduled = fromIterable$4(getSomes(map$8(yield* pipe(command("systemctl", [
87897
+ ...manager,
87898
+ "list-timers",
87899
+ "--all",
87900
+ "--output=json",
87901
+ "--no-pager"
87902
+ ]), flatMap$2(decodeUnknownEffect(fromJsonString(ArraySchema(Timer))))), (timer) => map$11(fromNullishOr(timer.activates), (unit) => [unit, map$11(fromNullishOr(timer.next), (next) => Math.floor(next / 1e3))]))));
87903
+ return yield* pipe(command("systemctl", [
87904
+ ...manager,
87793
87905
  "list-units",
87794
87906
  "--all",
87795
87907
  "--type=service",
@@ -87800,12 +87912,22 @@ var Inventory = class Inventory extends Service$1()("@deslop/deploy/services/inv
87800
87912
  id: `${worker}:${scope}:${row.unit}`,
87801
87913
  kind: "service",
87802
87914
  name: row.unit,
87915
+ ...match$8(get$6(scheduled, row.unit), {
87916
+ onNone: () => ({}),
87917
+ onSome: (next) => match$8(next, {
87918
+ onNone: () => ({ scheduled: true }),
87919
+ onSome: (time) => ({
87920
+ next: time,
87921
+ scheduled: true
87922
+ })
87923
+ })
87924
+ }),
87803
87925
  scope,
87804
87926
  state: `${row.active} · ${row.sub}`,
87805
87927
  url: "",
87806
87928
  worker
87807
87929
  }))));
87808
- }
87930
+ });
87809
87931
  return Inventory.of({ snapshot: scoped(gen(function* () {
87810
87932
  const sources = yield* all$1([
87811
87933
  collect("User services", units(false)),
@@ -87816,11 +87938,11 @@ var Inventory = class Inventory extends Service$1()("@deslop/deploy/services/inv
87816
87938
  "--format",
87817
87939
  "{{json .}}"
87818
87940
  ]), 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$4(matchAll(/traefik\.http\.services\.[^=,]+\.loadbalancer\.server\.port=([0-9]+)/gu)(row.Labels ?? "")), (match) => ({
87941
+ bindings: [...map$8(fromIterable$6(matchAll(/traefik\.http\.services\.[^=,]+\.loadbalancer\.server\.port=([0-9]+)/gu)(row.Labels ?? "")), (match) => ({
87820
87942
  address: "container",
87821
87943
  port: getOrElse(parse$2(match[1] ?? ""), () => 0),
87822
87944
  protocol: "tcp"
87823
- })), ...map$8(fromIterable$4(matchAll(/((?:[0-9.]+|\[::\])):([0-9]+)->[0-9]+\/(tcp|udp)/gu)(row.Ports)), (match) => ({
87945
+ })), ...map$8(fromIterable$6(matchAll(/((?:[0-9.]+|\[::\])):([0-9]+)->[0-9]+\/(tcp|udp)/gu)(row.Ports)), (match) => ({
87824
87946
  address: `${match[1]}:${match[2]}`,
87825
87947
  port: getOrElse(parse$2(match[2] ?? ""), () => 0),
87826
87948
  protocol: match$1(match[3] === "udp", {
@@ -87831,7 +87953,7 @@ var Inventory = class Inventory extends Service$1()("@deslop/deploy/services/inv
87831
87953
  detail: row.Status,
87832
87954
  id: `${worker}:docker:${row.ID}`,
87833
87955
  kind: "container",
87834
- links: dedupe(map$8(fromIterable$4(matchAll(/Host\(`([^`]+)`\)/gu)(row.Labels ?? "")), (match) => `https://${match[1]}`)),
87956
+ links: dedupe(map$8(fromIterable$6(matchAll(/Host\(`([^`]+)`\)/gu)(row.Labels ?? "")), (match) => `https://${match[1]}`)),
87835
87957
  name: row.Names,
87836
87958
  state: row.State,
87837
87959
  url: "",