@systemfsoftware/effect-daemon-process 1.0.0 → 1.0.4

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/CHANGELOG.md CHANGED
@@ -1,33 +1,5 @@
1
1
  # @systemfsoftware/effect-daemon-process
2
2
 
3
- ## 1.0.0
3
+ # @systemfsoftware/effect-daemon-process@1.0.4
4
4
 
5
- ### Major Changes
6
-
7
- - Require `effect` `^4` (stable 4.0.0). Release candidates are no longer supported: imports follow 4.0.0's module layout (`effect/http`, `effect/rpc`, `effect/http-api`, `effect/cluster`, `effect/process`, `effect/socket`, `effect/persistence`, `effect/reactivity`, `effect/encoding`, `effect/Arbitrary`), which does not exist in any 4.0.0 RC.
8
-
9
- ### Patch Changes
10
-
11
- - Updated dependencies:
12
- - @systemfsoftware/effect-cell-types@12.0.0
13
- - @systemfsoftware/effect-daemon-conformance@1.0.0
14
- - @systemfsoftware/effect-daemon-spec@6.0.0
15
-
16
- ## 0.2.1
17
-
18
- ### Patch Changes
19
-
20
- - Updated dependencies:
21
- - @systemfsoftware/effect-cell-types@11.0.0
22
-
23
- ## 0.2.0
24
-
25
- ### Minor Changes
26
-
27
- - First release. `ProcessMedium` supervises operating-system child processes as children of an `effect-daemon-spec` supervisor: bind it with `ProcessMedium.layer` and declare children with `Supervisor.ChildSpecs.on(ProcessMedium.port)`. A child is ready when its declared readiness line appears, its exit code and terminating signal are reported as observed, and a graceful stop sends `SIGTERM` before forcing `SIGKILL`.
28
-
29
- ### Patch Changes
30
-
31
- - Updated dependencies:
32
- - @systemfsoftware/effect-daemon-conformance@0.2.0
33
- - @systemfsoftware/effect-daemon-spec@5.0.0
5
+ Requires Effect ^4.1.2.
package/README.md CHANGED
@@ -6,9 +6,7 @@ signal reported as observed, and its shutdown mapped onto SIGTERM and SIGKILL.
6
6
 
7
7
  ## Installation
8
8
 
9
- ```bash
10
- pnpm add @systemfsoftware/effect-daemon-process
11
- ```
9
+ This package is not on npm: take `@systemfsoftware/effect-daemon-process` from nix.systemfsoftware.com, the package registry for `@systemfsoftware` packages, through a flake input (see the repository README).
12
10
 
13
11
  ## Features
14
12
 
package/dist/mod.d.ts CHANGED
@@ -3,7 +3,6 @@ import * as PlatformError from "effect/PlatformError";
3
3
  import { ChildProcess, ChildProcessSpawner } from "effect/process";
4
4
  import { Supervisor } from "@systemfsoftware/effect-daemon-spec";
5
5
  import { Conformance } from "@systemfsoftware/effect-daemon-conformance";
6
- //#region src/ProcessMedium/conformance-driver.d.ts
7
6
  declare const fixtureReadyLine = "READY";
8
7
  interface ProcessConformanceDriverOptions {
9
8
  readonly fixturePath: string;
@@ -11,8 +10,6 @@ interface ProcessConformanceDriverOptions {
11
10
  readonly fixtureArgs?: ReadonlyArray<string> | undefined;
12
11
  }
13
12
  declare const conformanceDriver: (options: ProcessConformanceDriverOptions) => Conformance.ConformanceDriver<ChildProcess.Command, PlatformError.PlatformError, ChildProcessSpawner.ChildProcessSpawner>;
14
- //#endregion
15
- //#region src/ProcessMedium/medium.d.ts
16
13
  /** What a process medium can say and honour (R16): the exit status and signal it observed, and a group stop that leaves nothing running. */
17
14
  declare const declaration: Supervisor.Medium.MediumDeclaration;
18
15
  /** How a process medium reads a child's readiness (R10, KTD17). */
@@ -34,5 +31,4 @@ declare const layer: (options?: ProcessMediumOptions) => Layer.Layer<Supervisor.
34
31
  declare namespace mod_d_exports {
35
32
  export { ProcessConformanceDriverOptions, ProcessMediumOptions, conformanceDriver, declaration, fixtureReadyLine, layer, port };
36
33
  }
37
- //#endregion
38
34
  export { mod_d_exports as ProcessMedium };
package/dist/mod.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-D3KUYPsf.mjs";
2
2
  import { Deferred, Duration, Effect, HashMap, Layer, Match, Option, Queue, Ref, Schema, Stream } from "effect";
3
3
  import "effect/PlatformError";
4
4
  import { ChildProcess, ChildProcessSpawner } from "effect/process";
@@ -6,12 +6,11 @@ import { Supervisor } from "@systemfsoftware/effect-daemon-spec";
6
6
  import { absurd } from "effect/Function";
7
7
  import * as Result from "effect/Result";
8
8
  import { Workflow } from "@systemfsoftware/effect-cell-types";
9
- //#region src/ProcessMedium/ProcessExit.schema.ts
9
+ // src/ProcessMedium/ProcessExit.schema.ts
10
10
  const Exited = Schema.TaggedStruct("Exited", { code: Schema.Int });
11
11
  const Signaled = Schema.TaggedStruct("Signaled", { detail: Schema.String });
12
12
  const ProcessExit = Schema.Union([Exited, Signaled]);
13
- //#endregion
14
- //#region src/ProcessMedium/ProcessExitDecision.schema.ts
13
+ // src/ProcessMedium/ProcessExitDecision.schema.ts
15
14
  const ProcessExitDecisionTypeId = Symbol.for("@systemfsoftware/effect-daemon-process/ProcessExitDecision");
16
15
  var ProcessExitNormal = class extends Schema.TaggedClass()("ProcessExitNormal", {}) {
17
16
  [ProcessExitDecisionTypeId] = ProcessExitDecisionTypeId;
@@ -33,8 +32,7 @@ const abnormalExitOf = (code, signal) => ({
33
32
  }
34
33
  });
35
34
  const terminationReasonOf = (decision) => Match.value(decision).pipe(Match.tag("ProcessExitNormal", () => NORMAL), Match.tag("ProcessExitAbnormal", (abnormal) => abnormalExitOf(abnormal.code, abnormal.signal)), Match.exhaustive);
36
- //#endregion
37
- //#region src/ProcessMedium/classify-process-exit.workflow.ts
35
+ // src/ProcessMedium/classify-process-exit.workflow.ts
38
36
  var ClassifyProcessExit = class extends Schema.TaggedClass()("ClassifyProcessExit", { exit: ProcessExit }) {
39
37
  static [Workflow.InstrumentationBrand] = {};
40
38
  };
@@ -53,8 +51,7 @@ const classifyProcessExit = Workflow.make({
53
51
  error: Schema.Never,
54
52
  decide: decideProcessExit
55
53
  });
56
- //#endregion
57
- //#region src/ProcessMedium/KillSignalDecision.schema.ts
54
+ // src/ProcessMedium/KillSignalDecision.schema.ts
58
55
  const KillSignalDecisionTypeId = Symbol.for("@systemfsoftware/effect-daemon-process/KillSignalDecision");
59
56
  var BrutalKill = class extends Schema.TaggedClass()("BrutalKill", {}) {
60
57
  [KillSignalDecisionTypeId] = KillSignalDecisionTypeId;
@@ -74,8 +71,7 @@ const killOptionsOf = (decision) => Match.value(decision).pipe(Match.tag("Brutal
74
71
  killSignal: "SIGTERM",
75
72
  forceKillAfter: Duration.millis(graceful.forceKillAfterMillis)
76
73
  })), Match.tag("PatientKill", () => ({ killSignal: "SIGTERM" })), Match.exhaustive);
77
- //#endregion
78
- //#region src/ProcessMedium/select-kill-signals.workflow.ts
74
+ // src/ProcessMedium/select-kill-signals.workflow.ts
79
75
  var SelectKillSignals = class extends Schema.TaggedClass()("SelectKillSignals", { mode: Supervisor.Medium.ShutdownMode }) {
80
76
  static [Workflow.InstrumentationBrand] = {};
81
77
  };
@@ -86,8 +82,7 @@ const selectKillSignals = Workflow.make({
86
82
  error: Schema.Never,
87
83
  decide: decideKillSignals
88
84
  });
89
- //#endregion
90
- //#region src/ProcessMedium/medium.ts
85
+ // src/ProcessMedium/medium.ts
91
86
  /**
92
87
  * The `effect-daemon-spec` medium over operating-system child processes (R20, KTD17): a
93
88
  * child's program is a command spec, spawned through the `ChildProcessSpawner` its
@@ -179,8 +174,7 @@ const mediumOf = (options) => Supervisor.Medium.make({
179
174
  * never on an implementation.
180
175
  */
181
176
  const layer = (options) => Layer.succeed(port, { medium: mediumOf(options ?? {}) });
182
- //#endregion
183
- //#region src/ProcessMedium/conformance-driver.ts
177
+ // src/ProcessMedium/conformance-driver.ts
184
178
  const fixtureReadyLine = "READY";
185
179
  const TEARDOWN_FORCE_KILL = "1 second";
186
180
  const encoder = new TextEncoder();
@@ -229,8 +223,7 @@ const conformanceDriver = (options) => ({
229
223
  port,
230
224
  launch: () => launchOf(options)
231
225
  });
232
- //#endregion
233
- //#region src/ProcessMedium/mod.ts
226
+ // src/ProcessMedium/mod.ts
234
227
  var ProcessMedium_exports = /* @__PURE__ */ __exportAll({
235
228
  conformanceDriver: () => conformanceDriver,
236
229
  declaration: () => declaration,
@@ -238,5 +231,4 @@ var ProcessMedium_exports = /* @__PURE__ */ __exportAll({
238
231
  layer: () => layer,
239
232
  port: () => port
240
233
  });
241
- //#endregion
242
234
  export { ProcessMedium_exports as ProcessMedium };
@@ -0,0 +1,12 @@
1
+ // \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, flags) => {
4
+ let target = Object.setPrototypeOf({}, null);
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!(flags & 1)) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return flags & 2 ? target : Object.preventExtensions(target);
11
+ };
12
+ export { __exportAll as t };
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@systemfsoftware/effect-daemon-process",
3
3
  "license": "Apache-2.0",
4
- "version": "1.0.0",
4
+ "version": "1.0.4",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/systemfsoftware/systemfsoftware.git",
9
- "directory": "packages/daemon/effect-daemon-process"
8
+ "url": "git+https://github.com/systemfsoftware/effect-daemon.git",
9
+ "directory": "packages/effect-daemon-process"
10
10
  },
11
- "homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/daemon/effect-daemon-process#readme",
12
- "bugs": "https://github.com/systemfsoftware/systemfsoftware/issues",
11
+ "homepage": "https://github.com/systemfsoftware/effect-daemon/tree/main/packages/effect-daemon-process#readme",
12
+ "bugs": "https://github.com/systemfsoftware/effect-daemon/issues",
13
13
  "description": "The effect-daemon-spec medium over operating-system child processes — a command spec spawned through ChildProcessSpawner, its exit code and terminating signal reported as observed, and its shutdown mapped to SIGTERM and SIGKILL.",
14
14
  "keywords": [
15
15
  "effect",
@@ -34,40 +34,39 @@
34
34
  "./package.json": "./package.json"
35
35
  },
36
36
  "dependencies": {
37
- "@systemfsoftware/effect-cell-types": "^12.0.0",
38
- "@systemfsoftware/effect-daemon-conformance": "^1.0.0",
39
- "@systemfsoftware/effect-daemon-spec": "^6.0.0"
37
+ "@systemfsoftware/effect-cell-types": "^12.0.2",
38
+ "@systemfsoftware/effect-daemon-conformance": "^1.0.4",
39
+ "@systemfsoftware/effect-daemon-spec": "^6.0.4"
40
40
  },
41
41
  "devDependencies": {
42
- "@effect/platform-node-shared": "^4",
43
- "@microsoft/api-extractor": "^7.59.1",
42
+ "@effect/platform-node-shared": "4.1.2",
43
+ "@microsoft/api-extractor": "^7.59.4",
44
44
  "@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
45
- "@systemfsoftware/conformance-spec": "^1.0.0",
46
- "@systemfsoftware/effect-gherkin-spec": "^7.0.0",
47
- "@systemfsoftware/effect-schema-law": "^5.0.0",
48
- "@systemfsoftware/effect-schema-vite": "^3.0.0",
49
- "@systemfsoftware/oxlint-config-recommended": "^4.0.0",
50
- "@systemfsoftware/stryker-config": "^0.1.0",
45
+ "@systemfsoftware/conformance-spec": "^1.0.1",
46
+ "@systemfsoftware/effect-gherkin-spec": "^8.0.0",
47
+ "@systemfsoftware/effect-schema-law": "^6.1.0",
48
+ "@systemfsoftware/effect-schema-vite": "^3.1.1",
49
+ "@systemfsoftware/oxlint-config-recommended": "^5.0.0",
50
+ "@systemfsoftware/stryker-config": "^0.2.0",
51
51
  "@systemfsoftware/stryker-ignorer-effect-schema-declarations": "latest",
52
52
  "@systemfsoftware/stryker-ignorer-in-source-vitest-block": "latest",
53
53
  "@systemfsoftware/stryker-js": "latest",
54
54
  "@systemfsoftware/stryker-js-typescript-checker": "latest",
55
55
  "@systemfsoftware/stryker-js-vitest-runner": "latest",
56
- "@systemfsoftware/stryker-test-contribution": "latest",
57
- "@systemfsoftware/tsconfig": "^2.0.1",
58
- "@systemfsoftware/tsdown-config": "^0.1.0",
59
- "@systemfsoftware/vitest": "^1.0.0",
60
- "@systemfsoftware/vitest-config": "^0.1.0",
61
- "@types/node": "^26",
62
- "effect": "^4",
63
- "oxlint": "~1.82.0",
56
+ "@systemfsoftware/tsconfig": "^2.0.2",
57
+ "@systemfsoftware/tsdown-config": "^0.1.1",
58
+ "@systemfsoftware/vitest": "^3.0.0",
59
+ "@systemfsoftware/vitest-config": "^0.1.1",
60
+ "@types/node": "^26.6.5",
61
+ "effect": "4.1.2",
62
+ "oxlint": "~1.90.0",
64
63
  "rimraf": "^6.1.3",
65
64
  "tsdown": "^0.23.0",
66
- "typescript": "^7",
67
- "vitest": "^5"
65
+ "typescript": "^7.0.2",
66
+ "vitest": "^5.0.5"
68
67
  },
69
68
  "peerDependencies": {
70
- "effect": "^4",
69
+ "effect": "^4.1.2",
71
70
  "typescript": ">=7.0.0"
72
71
  },
73
72
  "publishConfig": {
@@ -78,7 +77,7 @@
78
77
  "clean": "rimraf dist",
79
78
  "build": "tsdown -l warn && pnpm api:check",
80
79
  "typecheck": "tsc -b",
81
- "test": "vitest run --project unit --project conformance",
80
+ "test": "vitest run --project unit",
82
81
  "mutation": "stryker run",
83
82
  "lint": "f=${OXLINT_FORMAT:-${AGENT:+agent}}; oxlint . --format=${f:-default}",
84
83
  "attw": "attw --pack .",
@@ -1,13 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __defProp = Object.defineProperty;
3
- var __exportAll = (all, no_symbols) => {
4
- let target = {};
5
- for (var name in all) __defProp(target, name, {
6
- get: all[name],
7
- enumerable: true
8
- });
9
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
- return target;
11
- };
12
- //#endregion
13
- export { __exportAll as t };