@deslop/deploy 0.1.1335 → 0.1.1338

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
@@ -111860,7 +111860,17 @@ const tool = fn("ToolPath.resolve")(function* (name) {
111860
111860
  return target;
111861
111861
  });
111862
111862
  var ToolPath = class extends Service$1()("@deslop/runtime/server/process/ToolPath") {
111863
- static layer = succeed$6(this, tool);
111863
+ static layer = effect(this, gen(function* () {
111864
+ const paths = yield* makeWith$2(tool, {
111865
+ capacity: Infinity,
111866
+ requireServicesAt: "lookup",
111867
+ timeToLive: match$3({
111868
+ onFailure: constant(0),
111869
+ onSuccess: constant("Infinity")
111870
+ })
111871
+ });
111872
+ return (name) => get$7(paths, name);
111873
+ }));
111864
111874
  };
111865
111875
  // ../../packages/runtime/src/server/launchd.ts
111866
111876
  function xml(value) {
@@ -114015,22 +114025,25 @@ var Inventory = class extends Service$1()("@deslop/deploy/services/inventory/ser
114015
114025
  onFalse: () => ["--user"],
114016
114026
  onTrue: () => []
114017
114027
  });
114018
- const scheduled = fromIterable$5(getSomes(map$10(yield* flatMap$3(command("systemctl", [
114019
- ...scopeFlags,
114020
- "list-timers",
114021
- "--all",
114022
- "--output=json",
114023
- "--no-pager"
114024
- ]), decodeUnknownEffect(fromJsonString(ArraySchema(Timer)))), (timer) => map$13(timer.activates, (unit) => [unit, map$13(timer.next, (next) => mapEpochMillis(next, Math.floor))]))));
114025
- const rows = yield* flatMap$3(command("systemctl", [
114026
- ...scopeFlags,
114027
- "list-units",
114028
- "--all",
114029
- "--type=service",
114030
- "--output=json",
114031
- "--no-pager"
114032
- ]), decodeUnknownEffect(fromJsonString(ArraySchema(Unit))));
114033
- const failed = pipe(rows, filter$5((row) => row.active === "failed"), map$10((row) => row.unit));
114028
+ const listed = yield* all$1({
114029
+ rows: flatMap$3(command("systemctl", [
114030
+ ...scopeFlags,
114031
+ "list-units",
114032
+ "--all",
114033
+ "--type=service",
114034
+ "--output=json",
114035
+ "--no-pager"
114036
+ ]), decodeUnknownEffect(fromJsonString(ArraySchema(Unit)))),
114037
+ timers: flatMap$3(command("systemctl", [
114038
+ ...scopeFlags,
114039
+ "list-timers",
114040
+ "--all",
114041
+ "--output=json",
114042
+ "--no-pager"
114043
+ ]), decodeUnknownEffect(fromJsonString(ArraySchema(Timer))))
114044
+ }, { concurrency: "unbounded" });
114045
+ const scheduled = fromIterable$5(getSomes(map$10(listed.timers, (timer) => map$13(timer.activates, (unit) => [unit, map$13(timer.next, (next) => mapEpochMillis(next, Math.floor))]))));
114046
+ const failed = pipe(listed.rows, filter$5((row) => row.active === "failed"), map$10((row) => row.unit));
114034
114047
  const failures = getOrElse$1(flatten$6(yield* pipe(command("systemctl", [
114035
114048
  ...scopeFlags,
114036
114049
  "show",
@@ -114039,7 +114052,7 @@ var Inventory = class extends Service$1()("@deslop/deploy/services/inventory/ser
114039
114052
  "Id,Result,ExecMainCode,ExecMainStatus,StateChangeTimestamp",
114040
114053
  "--timestamp=unix"
114041
114054
  ]), map$7(unitFailures), option$1, when$2(succeed$5(isReadonlyArrayNonEmpty(failed))))), () => unitFailures(""));
114042
- return map$10(rows, (row) => InventoryItem.make({
114055
+ return map$10(listed.rows, (row) => InventoryItem.make({
114043
114056
  active: row.active === "active",
114044
114057
  detail: `${scope} · ${row.description}`,
114045
114058
  failure: get$12(failures, row.unit),
@@ -114288,6 +114301,19 @@ var Inventory = class extends Service$1()("@deslop/deploy/services/inventory/ser
114288
114301
  onFalse: () => linux,
114289
114302
  onTrue: () => darwin
114290
114303
  });
114304
+ const processing = yield* pipe(machine.processes, flatMap$3((current) => modify$1(processState, (previous) => {
114305
+ const next = processReadings(current, previous);
114306
+ return [next.readings, some$1(next)];
114307
+ })), timeout(seconds(3)), match$1({
114308
+ onFailure: (cause) => ({
114309
+ error: some$1(cause.message),
114310
+ records: []
114311
+ }),
114312
+ onSuccess: (records) => ({
114313
+ error: none(),
114314
+ records
114315
+ })
114316
+ }), forkScoped);
114291
114317
  const sources = yield* all$1([
114292
114318
  ...machine.sources,
114293
114319
  collect("Tailnet", pipe(command("tailscale", ["status", "--json"]), flatMap$3(decodeEffect(fromJsonString(Tailnet))), map$7((status) => map$10(toArray(status.Self), (peer) => InventoryItem.make({
@@ -114328,19 +114354,7 @@ var Inventory = class extends Service$1()("@deslop/deploy/services/inventory/ser
114328
114354
  worker
114329
114355
  }))))))
114330
114356
  ], { concurrency: "unbounded" });
114331
- const collected = yield* pipe(machine.processes, flatMap$3((current) => modify$1(processState, (previous) => {
114332
- const next = processReadings(current, previous);
114333
- return [next.readings, some$1(next)];
114334
- })), timeout(seconds(3)), match$1({
114335
- onFailure: (cause) => ({
114336
- error: some$1(cause.message),
114337
- records: []
114338
- }),
114339
- onSuccess: (records) => ({
114340
- error: none(),
114341
- records
114342
- })
114343
- }));
114357
+ const collected = yield* join$3(processing);
114344
114358
  return {
114345
114359
  items: attachProcesses(flatMap$6(sources, (source) => source.items), collected.records),
114346
114360
  sources: [...map$10(sources, (source) => source.source), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deslop/deploy",
3
- "version": "0.1.1335",
3
+ "version": "0.1.1338",
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": "2362cbfb173c6a8a54228b3b8ad13de53c12d40b8f4901601cb507490bb6c90a"
43
+ "fingerprint": "bac3de70e461ff193c6aa832ad686234782566755dcf11f9d4c1025586d80d27"
44
44
  }