@deslop/deploy 0.1.1348 → 0.1.1354

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
@@ -4447,44 +4447,6 @@ const liftThrowable = (f) => (...a) => {
4447
4447
  }
4448
4448
  };
4449
4449
  /**
4450
- * Extracts the value from a `Some`, or throws a default `Error` for `None`.
4451
- *
4452
- * **When to use**
4453
- *
4454
- * Use when you need quick fail-fast unwrapping of an `Option` and a generic
4455
- * error is acceptable.
4456
- *
4457
- * **Details**
4458
- *
4459
- * - `Some` → returns the inner value
4460
- * - `None` → throws `new Error("getOrThrow called on a None")`
4461
- *
4462
- * **Example** (Throwing a default error)
4463
- *
4464
- * ```ts import.meta.vitest
4465
- * import { Option, Result } from "effect"
4466
- *
4467
- * Option.getOrThrow(Option.some(1)) // => 1
4468
- *
4469
- * const failure = Result.try({
4470
- * try: () => Option.getOrThrow(Option.none()),
4471
- * catch: (error) => (error as Error).message
4472
- * })
4473
- * Result.getFailure(failure).pipe(Option.getOrElse(() => "no error")) // => "getOrThrow called on a None"
4474
- * ```
4475
- *
4476
- * @see {@link getOrThrowWith} for a custom error
4477
- * @see {@link getOrElse} for a non-throwing alternative
4478
- *
4479
- * @stability stable
4480
- * @category converting
4481
- * @since 2.0.0
4482
- */
4483
- const getOrThrow$1 = /*#__PURE__*/ (/* @__PURE__ */ dual(2, (self, onNone) => {
4484
- if (isSome(self)) return self.value;
4485
- throw onNone();
4486
- }))(() => /* @__PURE__ */ new Error("getOrThrow called on a None"));
4487
- /**
4488
4450
  * Transforms the value inside a `Some` using the provided function, leaving
4489
4451
  * `None` unchanged.
4490
4452
  *
@@ -7866,6 +7828,42 @@ const getSomes = (self) => {
7866
7828
  return out;
7867
7829
  };
7868
7830
  /**
7831
+ * Keeps transformed values for elements where a `Filter` succeeds.
7832
+ *
7833
+ * **When to use**
7834
+ *
7835
+ * Use to filter an iterable with a `Result`-returning transformation while
7836
+ * discarding failures.
7837
+ *
7838
+ * **Details**
7839
+ *
7840
+ * The filter receives `(element, index)`. Failures are discarded.
7841
+ *
7842
+ * **Example** (Filtering and transforming)
7843
+ *
7844
+ * ```ts import.meta.vitest
7845
+ * import { Array, Result } from "effect"
7846
+ *
7847
+ * Array.filterMap([1, 2, 3, 4], (n) => n % 2 === 0 ? Result.succeed(n * 10) : Result.failVoid) // => [20, 40]
7848
+ * ```
7849
+ *
7850
+ * @see {@link filter} — keep original elements matching a predicate
7851
+ * @see {@link partition} for keeping both successes and failures
7852
+ *
7853
+ * @stability stable
7854
+ * @category filtering
7855
+ * @since 2.0.0
7856
+ */
7857
+ const filterMap = /*#__PURE__*/ dual(2, (self, f) => {
7858
+ const as = fromIterable$8(self);
7859
+ const out = [];
7860
+ for (let i = 0; i < as.length; i++) {
7861
+ const result = f(as[i], i);
7862
+ if (isSuccess$1(result)) out.push(result.success);
7863
+ }
7864
+ return out;
7865
+ });
7866
+ /**
7869
7867
  * Keeps only elements satisfying a predicate (or refinement).
7870
7868
  *
7871
7869
  * **When to use**
@@ -9307,6 +9305,18 @@ const format$2 = (self) => {
9307
9305
  */
9308
9306
  const fromPredicate = (predicate) => (input) => predicate(input) ? succeed$10(input) : fail$11(input);
9309
9307
  /**
9308
+ * Creates a `Filter` from a function that returns an `Option`; `Some(value)`
9309
+ * passes with `value`, and `None` fails with the original input.
9310
+ *
9311
+ * @stability stable
9312
+ * @category constructors
9313
+ * @since 4.0.0
9314
+ */
9315
+ const fromPredicateOption = (predicate) => (input) => {
9316
+ const o = predicate(input);
9317
+ return o._tag === "None" ? fail$11(input) : succeed$10(o.value);
9318
+ };
9319
+ /**
9310
9320
  * Converts a Filter into a predicate function.
9311
9321
  *
9312
9322
  * **When to use**
@@ -35680,6 +35690,11 @@ function structWithRest(ast, records) {
35680
35690
  return new Objects(propertySignatures, indexSignatures, void 0, checks);
35681
35691
  }
35682
35692
  /** @internal */
35693
+ function tupleWithRest(ast, rest) {
35694
+ if (ast.encoding) throw new Error("TupleWithRest does not support encodings");
35695
+ return new Arrays(ast.isMutable, ast.elements, rest, void 0, ast.checks);
35696
+ }
35697
+ /** @internal */
35683
35698
  function mutable$1(ast) {
35684
35699
  if (ast.encoding) throw new Error("mutable does not support encodings");
35685
35700
  return new Arrays(true, ast.elements, ast.rest, ast.annotations, ast.checks, void 0, ast.context, ast.encodingChecks);
@@ -37164,30 +37179,6 @@ function decodeUnknownEffect$1(schema, options) {
37164
37179
  const parser = run$5(schema.ast);
37165
37180
  return options === void 0 ? parser : (input, overrideOptions) => parser(input, mergeParseOptions(options, overrideOptions));
37166
37181
  }
37167
- /**
37168
- * Creates an effectful decoder for input already typed as the schema's `Encoded`
37169
- * type.
37170
- *
37171
- * **When to use**
37172
- *
37173
- * Use when you already have input typed as the schema's `Encoded` type and
37174
- * need an `Effect` whose failure channel is `SchemaIssue.Issue`, while
37175
- * preserving decoding service requirements.
37176
- *
37177
- * **Details**
37178
- *
37179
- * The returned function succeeds with the decoded `Type` or fails with a
37180
- * `SchemaIssue.Issue`, preserving any decoding service requirements in the
37181
- * returned `Effect`.
37182
- *
37183
- * @see {@link decodeUnknownEffect} for untyped boundary input
37184
- * @see {@link encodeEffect} for the opposite direction
37185
- *
37186
- * @stability stable
37187
- * @category decoding
37188
- * @since 4.0.0
37189
- */
37190
- const decodeEffect$1 = decodeUnknownEffect$1;
37191
37182
  /** @internal */
37192
37183
  function decodeUnknownOption$1(schema, options) {
37193
37184
  return asOption(decodeUnknownEffect$1(schema, options));
@@ -40623,6 +40614,43 @@ function Tuple(elements) {
40623
40614
  return makeTuple(tuple(elements), elements);
40624
40615
  }
40625
40616
  /**
40617
+ * Extends a fixed-length tuple schema with a variadic rest segment.
40618
+ *
40619
+ * **Details**
40620
+ *
40621
+ * The `rest` argument must be a non-empty fixed-length tuple of schemas.
40622
+ *
40623
+ * The resulting tuple starts with the fixed elements from `schema`. The first
40624
+ * schema in `rest` is the repeatable element schema, and any additional schemas
40625
+ * in `rest` are required trailing tuple elements after the variadic segment. For
40626
+ * example, `[Schema.Boolean, Schema.String]` represents zero or more booleans
40627
+ * followed by a final string.
40628
+ *
40629
+ * **Example** (Defining tuples with rest elements)
40630
+ *
40631
+ * ```ts import.meta.vitest
40632
+ * import { Schema } from "effect"
40633
+ *
40634
+ * // [string, number, ...boolean[]]
40635
+ * const schema = Schema.TupleWithRest(
40636
+ * Schema.Tuple([Schema.String, Schema.Number]),
40637
+ * [Schema.Boolean]
40638
+ * )
40639
+ *
40640
+ * Schema.decodeUnknownSync(schema)(["hello", 1, true, false]) // => ["hello", 1, true, false]
40641
+ * ```
40642
+ *
40643
+ * @stability stable
40644
+ * @category constructors
40645
+ * @since 4.0.0
40646
+ */
40647
+ function TupleWithRest(schema, rest) {
40648
+ return make$72(tupleWithRest(schema.ast, rest.map(getAST)), {
40649
+ schema,
40650
+ rest
40651
+ });
40652
+ }
40653
+ /**
40626
40654
  * @category constructors
40627
40655
  * @since 4.0.0
40628
40656
  */
@@ -112598,24 +112626,14 @@ const JsonFromString = (schema) => {
112598
112626
  jsonUpdate: schema
112599
112627
  });
112600
112628
  };
112601
- // ../../packages/runtime/src/shared/time.ts
112602
- const TimeFrame = Literals([
112629
+ Literals([
112603
112630
  "10m",
112604
112631
  "1h",
112605
112632
  "24h",
112606
112633
  "7d",
112607
112634
  "30d"
112608
112635
  ]);
112609
- const TIME_FRAME_DURATIONS = {
112610
- "1h": hours(1),
112611
- "7d": days(7),
112612
- "10m": minutes(10),
112613
- "24h": days(1),
112614
- "30d": days(30)
112615
- };
112616
- function timeFrameDuration(frame) {
112617
- return TIME_FRAME_DURATIONS[frame];
112618
- }
112636
+ hours(1), days(7), minutes(10), days(1), days(30);
112619
112637
  const DateTimeUtcFromFiniteMillis = pipe(Finite.check(isBetween({
112620
112638
  maximum: 864e13,
112621
112639
  minimum: -864e13
@@ -112912,13 +112930,25 @@ Literals([
112912
112930
  "sys",
112913
112931
  "user"
112914
112932
  ]);
112915
- const CpuCounters = ArraySchema(FiniteFromString).check(isMinLength(5));
112933
+ const CpuCounters = TupleWithRest(Tuple([
112934
+ FiniteFromString,
112935
+ FiniteFromString,
112936
+ FiniteFromString,
112937
+ FiniteFromString,
112938
+ FiniteFromString
112939
+ ]), [FiniteFromString]);
112916
112940
  const LoadAverages = ArraySchema(FiniteFromString);
112917
112941
  const CgroupPath = brand("DeployCgroupPath")(String$6);
112918
- const HistoryMinutes = Literals(map$10(TimeFrame.literals, (frame) => toMinutes(timeFrameDuration(frame))));
112942
+ const HistoryMinutes = Literals([
112943
+ 10,
112944
+ 60,
112945
+ 1440,
112946
+ 10080,
112947
+ 43200
112948
+ ]);
112919
112949
  const HistoryQuery = Struct$2({ minutes: pipe(HistoryMinutes, decodeTo(Duration, {
112920
112950
  decode: transform$3(minutes),
112921
- encode: transformEffect$1((range) => pipe(range, toMinutes, decodeEffect$1(HistoryMinutes)))
112951
+ encode: transformEffect$1((range) => pipe(range, toMinutes, decodeUnknownEffect$1(HistoryMinutes)))
112922
112952
  })) });
112923
112953
  const HistoryToolInput = Struct$2({
112924
112954
  ...HistoryQuery.fields,
@@ -113270,11 +113300,14 @@ function unitFailures(text) {
113270
113300
  const id = fields["Id"] ?? "";
113271
113301
  const result = fields["Result"] ?? "";
113272
113302
  const status = parse$2(fields["ExecMainStatus"] ?? "");
113273
- if (!isNonEmpty$1(id) || !isNonEmpty$1(result) || isNone(status) || !isNonEmpty$1(fields["ExecMainCode"] ?? "")) return [];
113274
- return [[UnitId.make(id), {
113275
- at: map$13(parse$2(replace(/^@/u, "")(fields["StateChangeTimestamp"] ?? "")), (seconds) => mapEpochMillis(makeUnsafe$5(0), () => seconds * 1e3)),
113276
- reason: failureReason(result, getOrThrow$1(status), fields["ExecMainCode"] !== "0")
113277
- }]];
113303
+ if (!isNonEmpty$1(id) || !isNonEmpty$1(result) || !isNonEmpty$1(fields["ExecMainCode"] ?? "")) return [];
113304
+ return match$8(status, {
113305
+ onNone: () => [],
113306
+ onSome: (exitStatus) => [[UnitId.make(id), {
113307
+ at: map$13(parse$2(replace(/^@/u, "")(fields["StateChangeTimestamp"] ?? "")), (seconds) => mapEpochMillis(makeUnsafe$5(0), () => seconds * 1e3)),
113308
+ reason: failureReason(result, exitStatus, fields["ExecMainCode"] !== "0")
113309
+ }]]
113310
+ });
113278
113311
  }), fromEntries);
113279
113312
  }
113280
113313
  // src/services/inventory/lib/launchd.ts
@@ -113758,12 +113791,9 @@ function processTree(rows) {
113758
113791
  function workerNames(snapshot) {
113759
113792
  return dedupe([...snapshot.workers, ...map$10(snapshot.items, (item) => item.worker)]);
113760
113793
  }
113761
- function sourceWorker(source, workers, local) {
113762
- return pipe(workers, findFirst((worker) => sourceBelongsToWorker(source, worker)), orElse$3(() => local));
113763
- }
113764
113794
  function errorsOf(sources, workers, worker) {
113765
113795
  const local = head(workers);
113766
- return pipe(sources, filter$5((source) => isSome(source.error) && contains$2(sourceWorker(source, workers, local), worker)), map$10((source) => `${replace(`${worker} · `, "")(source.name)}: ${getOrThrow$1(source.error)}`));
113796
+ return pipe(sources, filter$5((source) => pipe(workers, findFirst((candidate) => sourceBelongsToWorker(source, candidate)), orElse$3(() => local), contains$2(worker))), filterMap(fromPredicateOption((source) => map$13(source.error, (error) => `${replace(`${worker} · `, "")(source.name)}: ${error}`))));
113767
113797
  }
113768
113798
  function portsOf(row) {
113769
113799
  return pipe([...row.listeners, ...row.exposures], filter$5((item) => !contains$2(item.address, "container")), map$10((item) => item.port), getSomes, dedupe, sort(Number$6));
@@ -113804,7 +113834,7 @@ function appOf(row, withProcesses) {
113804
113834
  };
113805
113835
  }
113806
113836
  function exposureOf(item) {
113807
- return {
113837
+ return map$13(item.url, (url) => ({
113808
113838
  access: pipe(item.publicAccess, contains$2(true), match({
113809
113839
  onFalse: constant("tailnet"),
113810
113840
  onTrue: constant("public")
@@ -113812,8 +113842,8 @@ function exposureOf(item) {
113812
113842
  id: item.id,
113813
113843
  name: ExposureName.make(item.name),
113814
113844
  port: item.port,
113815
- url: getOrThrow$1(item.url)
113816
- };
113845
+ url
113846
+ }));
113817
113847
  }
113818
113848
  function matches(row, app) {
113819
113849
  const needle = toLowerCase(app);
@@ -113846,7 +113876,7 @@ function listApps(snapshot, input) {
113846
113876
  })));
113847
113877
  const exposures = pipe(own, flatMap$6((row) => {
113848
113878
  if (row.item.kind !== "exposure" || onlyFailing) return [];
113849
- return [exposureOf(row.item)];
113879
+ return toArray(exposureOf(row.item));
113850
113880
  }), sort(mapInput(String$10, (exposure) => exposure.url)));
113851
113881
  return {
113852
113882
  apps,
@@ -113870,18 +113900,15 @@ function requestOf(item) {
113870
113900
  }
113871
113901
  const jobRequest = fnUntraced(function* (snapshot, input) {
113872
113902
  const matching = filter$5(workloads(snapshot.items), (row) => contains$2(row.item.scheduled, true) && !exists(input.worker, (worker) => row.item.worker !== worker) && (workloadName(row.item) === input.job || row.item.name === input.job));
113873
- if (isArrayEmpty(matching)) return yield* DeployError.make({ message: `No scheduled job named ${input.job}; list_apps shows the jobs.` });
113903
+ if (!isArrayNonEmpty(matching)) return yield* DeployError.make({ message: `No scheduled job named ${input.job}; list_apps shows the jobs.` });
113874
113904
  if (matching.length > 1) return yield* DeployError.make({ message: `${input.job} runs on more than one worker; pass its worker.` });
113875
- return requestOf(getOrThrow$1(head(matching)).item);
113905
+ return requestOf(headNonEmpty(matching).item);
113876
113906
  });
113877
113907
  // src/services/inventory/lib/processes.ts
113878
113908
  const SECRET = /(?:token|secret|passw(?:or)?d|key|auth|credential|cookie|session)/iu;
113879
113909
  const PROCESS_INTERVAL = seconds(2);
113880
113910
  function processStatus(status) {
113881
- const values = pipe(trim(status), split$1("\n"), fromIterableWith((line) => {
113882
- const at = getOrThrow$1(indexOf(":")(line));
113883
- return [slice(0, at)(line), trim(slice(at + 1)(line))];
113884
- }));
113911
+ const values = pipe(trim(status), split$1("\n"), filterMap(fromPredicateOption((line) => map$13(indexOf(":")(line), (at) => [slice(0, at)(line), trim(slice(at + 1)(line))]))), fromEntries);
113885
113912
  function field(name) {
113886
113913
  return pipe(get$13(values, name), filter$7(isNonEmpty$1), getOrUndefined$1);
113887
113914
  }
@@ -114626,9 +114653,9 @@ const SERIES = {
114626
114653
  43200: hours(6)
114627
114654
  };
114628
114655
  function counters(stat, uptime, time) {
114629
- const values = decodeSync(CpuCounters)(pipe(stat, split$1("\n"), head, getOrElse$1(constant("")), trim, split$1(/\s+/u), drop$1(1), take$3(8)));
114656
+ const values = decodeUnknownSync(CpuCounters)(pipe(stat, split$1("\n"), head, getOrElse$1(constant("")), trim, split$1(/\s+/u), drop$1(1), take$3(8)));
114630
114657
  return {
114631
- cpuIdle: millis((getOrThrow$1(get$12(values, 3)) + getOrThrow$1(get$12(values, 4))) * 10),
114658
+ cpuIdle: millis((values[3] + values[4]) * 10),
114632
114659
  cpuTotal: millis(sumAll(values) * 10),
114633
114660
  time,
114634
114661
  uptime: seconds(decodeSync(FiniteFromString)(split$1(uptime, " ")[0]))
@@ -114986,7 +115013,7 @@ var Metrics = class extends Service$1()("@deslop/deploy/services/metrics/service
114986
115013
  });
114987
115014
  const deleteExpired = void_({
114988
115015
  Request: Sample.fields.time,
114989
- execute: (now) => forEach$1([AppHistory.table, MachineSample.table], (table) => sql`DELETE FROM ${sql(table)} WHERE ${sql.or(map$10(toEntries(SERIES), (entry) => sql`(step = ${toMillis(entry[1])} AND since < ${now - pipe(entry[0], parse$2, getOrThrow$1, minutes, toMillis) - toMillis(entry[1])})`))}`, { concurrency: 1 })
115016
+ execute: (now) => forEach$1([AppHistory.table, MachineSample.table], (table) => sql`DELETE FROM ${sql(table)} WHERE ${sql.or(map$10(HistoryMinutes.literals, (minutes$1) => sql`(step = ${toMillis(SERIES[minutes$1])} AND since < ${now - toMillis(minutes(minutes$1)) - toMillis(SERIES[minutes$1])})`))}`, { concurrency: 1 })
114990
115017
  });
114991
115018
  const previous = yield* make$56(none());
114992
115019
  const lastApps = yield* make$56(none());
@@ -115011,22 +115038,27 @@ var Metrics = class extends Service$1()("@deslop/deploy/services/metrics/service
115011
115038
  }
115012
115039
  const appCgroups = walk([CgroupPath.make("")], []);
115013
115040
  const apps = gen(function* () {
115014
- const readings = yield* forEach$1(yield* appCgroups, (path) => pipe(all$1({
115015
- cpu: fs.readFileString(`${CGROUP}${path}/cpu.stat`),
115016
- memory: fs.readFileString(`${CGROUP}${path}/memory.stat`)
115017
- }, { concurrency: "unbounded" }), catchTag("PlatformError", (cause) => {
115018
- if (isTagged(cause.reason, "NotFound")) return undefined_$1;
115019
- return fail$6(cause);
115020
- }), flatMap$3((stats) => {
115021
- if (stats === void 0) return succeedNone;
115022
- return match$8(cgroupUsage(stats.cpu, stats.memory), {
115023
- onNone: () => fail$6(DeployError.make({ message: `The cgroup counters for ${path} are missing or invalid.` })),
115024
- onSome: (usage) => succeedSome([path, {
115025
- id: getOrThrow$1(processOwner(path)),
115026
- ...usage
115027
- }])
115028
- });
115029
- })), { concurrency: 8 });
115041
+ const readings = yield* forEach$1(yield* appCgroups, (path) => match$8(processOwner(path), {
115042
+ onNone: () => fail$6(DeployError.make({ message: `The cgroup ${path} has no app owner.` })),
115043
+ onSome: fnUntraced(function* (id) {
115044
+ return yield* pipe(all$1({
115045
+ cpu: fs.readFileString(`${CGROUP}${path}/cpu.stat`),
115046
+ memory: fs.readFileString(`${CGROUP}${path}/memory.stat`)
115047
+ }, { concurrency: "unbounded" }), catchTag("PlatformError", (cause) => {
115048
+ if (isTagged(cause.reason, "NotFound")) return undefined_$1;
115049
+ return fail$6(cause);
115050
+ }), flatMap$3((stats) => {
115051
+ if (stats === void 0) return succeedNone;
115052
+ return match$8(cgroupUsage(stats.cpu, stats.memory), {
115053
+ onNone: () => fail$6(DeployError.make({ message: `The cgroup counters for ${path} are missing or invalid.` })),
115054
+ onSome: (usage) => succeedSome([path, {
115055
+ id,
115056
+ ...usage
115057
+ }])
115058
+ });
115059
+ }));
115060
+ })
115061
+ }), { concurrency: 8 });
115030
115062
  return fromEntries(getSomes(readings));
115031
115063
  });
115032
115064
  const refreshStorage = pipe(scoped(match(platform === "darwin", {
@@ -115121,7 +115153,7 @@ var Metrics = class extends Service$1()("@deslop/deploy/services/metrics/service
115121
115153
  worker
115122
115154
  });
115123
115155
  const time = yield* now;
115124
- const step = getOrThrow$1(get$13(SERIES, `${toMinutes(query.minutes)}`));
115156
+ const step = SERIES[yield* asDeployError$1(encodeEffect(HistoryQuery.fields.minutes)(query.minutes))];
115125
115157
  const samples = yield* asDeployError$1(listSeries({
115126
115158
  after: subtractDuration(chartWindow(query.minutes, time).start, step),
115127
115159
  step
@@ -115282,7 +115314,10 @@ var Fleet = class Fleet extends Service$1()("@deslop/deploy/services/fleet/servi
115282
115314
  };
115283
115315
  }), "Fleet.local");
115284
115316
  const remote = fnUntraced(function* (worker, use) {
115285
- const peer = getOrThrow$1(get$13(peers, worker.name));
115317
+ const peer = yield* pipe(peers, get$13(worker.name), match$8({
115318
+ onNone: () => DeployError.make({ message: `Worker ${worker.name} is not configured.` }),
115319
+ onSome: succeed$5
115320
+ }));
115286
115321
  if (!(yield* get$2(peer.connected))) return yield* DeployError.make({ message: "Worker is unreachable" });
115287
115322
  return yield* pipe(use(peer.client), timeout(seconds(15)), withSpan("Fleet.remote", { attributes: { worker: worker.name } }));
115288
115323
  });
@@ -115522,8 +115557,10 @@ function checkWorker(snapshot, worker) {
115522
115557
  failing: none(),
115523
115558
  worker: none()
115524
115559
  });
115525
- if (exists(worker, (selected) => !some(workers, (row) => row.worker === selected))) return fail$6(DeployError.make({ message: `Unknown worker ${getOrThrow$1(worker)}; valid workers: ${pipe(workers, map$10((row) => row.worker), join$4(", "))}. Nothing changed.` }));
115526
- return void_$2;
115560
+ return pipe(worker, filter$7((selected) => !some(workers, (row) => row.worker === selected)), match$8({
115561
+ onNone: () => void_$2,
115562
+ onSome: (selected) => fail$6(DeployError.make({ message: `Unknown worker ${selected}; valid workers: ${pipe(workers, map$10((row) => row.worker), join$4(", "))}. Nothing changed.` }))
115563
+ }));
115527
115564
  }
115528
115565
  function processPaths(tree, prefix) {
115529
115566
  return flatMap$6(tree, (node, index) => [`${prefix}${index}`, ...processPaths(getOrElse$1(node.children, empty$15), `${prefix}${index}.`)]);
@@ -115581,16 +115618,20 @@ function inventoryPage(workers, input) {
115581
115618
  };
115582
115619
  }
115583
115620
  function focusedInventory(workers, app) {
115584
- if (isNone(app)) return workers;
115585
- const query = toLowerCase(getOrThrow$1(app));
115586
- function matchingName(row) {
115587
- return pipe(row.name, toLowerCase, includes(query));
115588
- }
115589
- return map$10(workers, (worker) => ({
115590
- ...worker,
115591
- exposures: pipe(worker.exposures, map$13((rows) => filter$5(rows, matchingName)), orElseSome(() => [])),
115592
- jobs: pipe(worker.jobs, map$13((rows) => filter$5(rows, matchingName)), orElseSome(() => []))
115593
- }));
115621
+ return match$8(app, {
115622
+ onNone: () => workers,
115623
+ onSome: (queryText) => {
115624
+ const query = toLowerCase(queryText);
115625
+ function matchingName(row) {
115626
+ return pipe(row.name, toLowerCase, includes(query));
115627
+ }
115628
+ return map$10(workers, (worker) => ({
115629
+ ...worker,
115630
+ exposures: pipe(worker.exposures, map$13((rows) => filter$5(rows, matchingName)), orElseSome(() => [])),
115631
+ jobs: pipe(worker.jobs, map$13((rows) => filter$5(rows, matchingName)), orElseSome(() => []))
115632
+ }));
115633
+ }
115634
+ });
115594
115635
  }
115595
115636
  function metricSummary(series) {
115596
115637
  const values = getSomes(series);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deslop/deploy",
3
- "version": "0.1.1348",
3
+ "version": "0.1.1354",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/MP281X/deslop.git",
@@ -40,5 +40,5 @@
40
40
  "engines": {
41
41
  "node": ">=26"
42
42
  },
43
- "fingerprint": "40637c158deb2e01ebf992401e2c050463aeb0e72b437e10c2c7067e8bf642b1"
43
+ "fingerprint": "f3757eec59c5a10dc96b3b1650f9409bfb7a26ba063b700c3b365ec5a987216a"
44
44
  }