@systemfsoftware/effect-daemon-cluster 0.2.0 → 1.0.0
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 +19 -0
- package/README.md +2 -2
- package/dist/mod.d.ts +1 -1
- package/dist/mod.mjs +10 -6
- package/package.json +15 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @systemfsoftware/effect-daemon-cluster
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
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
|
+
- These packages now list `@systemfsoftware/effect-cell-types` as a runtime dependency.
|
|
21
|
+
|
|
3
22
|
## 0.2.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @systemfsoftware/effect-daemon-cluster
|
|
2
2
|
|
|
3
|
-
The `@systemfsoftware/effect-daemon-spec` medium over `effect/
|
|
3
|
+
The `@systemfsoftware/effect-daemon-spec` medium over `effect/cluster`: cluster entities
|
|
4
4
|
and single-owner singletons are supervised with inferred death and eventual group stop.
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
@@ -28,7 +28,7 @@ pnpm add @systemfsoftware/effect-daemon-cluster
|
|
|
28
28
|
import { ClusterMedium } from '@systemfsoftware/effect-daemon-cluster'
|
|
29
29
|
import { Supervisor } from '@systemfsoftware/effect-daemon-spec'
|
|
30
30
|
import { Effect } from 'effect'
|
|
31
|
-
import { SingleRunner } from 'effect/
|
|
31
|
+
import { SingleRunner } from 'effect/cluster'
|
|
32
32
|
|
|
33
33
|
const handleOrders = (ready: Effect.Effect<void>) => Effect.andThen(ready, serveOrders)
|
|
34
34
|
|
package/dist/mod.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Conformance } from "@systemfsoftware/effect-daemon-conformance";
|
|
2
2
|
import { Effect, Layer, Scope } from "effect";
|
|
3
3
|
import { Supervisor } from "@systemfsoftware/effect-daemon-spec";
|
|
4
|
-
import { Sharding } from "effect/
|
|
4
|
+
import { Sharding } from "effect/cluster";
|
|
5
5
|
//#region src/ClusterMedium/ClusterProgram.d.ts
|
|
6
6
|
declare const SingletonTag: {
|
|
7
7
|
readonly _tag: 'Singleton';
|
package/dist/mod.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
2
|
import "@systemfsoftware/effect-daemon-conformance";
|
|
3
|
-
import {
|
|
3
|
+
import { Deferred, Duration, Effect, Exit, Layer, Match, Option, Queue, Result, Scope } from "effect";
|
|
4
4
|
import { Supervisor } from "@systemfsoftware/effect-daemon-spec";
|
|
5
|
-
import { Sharding } from "effect/
|
|
5
|
+
import { Sharding } from "effect/cluster";
|
|
6
|
+
import { absurd } from "effect/Function";
|
|
6
7
|
//#region src/ClusterMedium/ClusterProgram.ts
|
|
7
8
|
const SingletonTag = { _tag: "Singleton" };
|
|
8
9
|
const EntityTag = { _tag: "Entity" };
|
|
@@ -40,10 +41,13 @@ const inferredDeath = {
|
|
|
40
41
|
failedProbes: 1
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
|
-
const terminationOf = (exit) =>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
})
|
|
44
|
+
const terminationOf = (exit) => Match.value(Result.match(Supervisor.classifyChildExit(new Supervisor.ClassifyChildExit({
|
|
45
|
+
stopping: false,
|
|
46
|
+
exit
|
|
47
|
+
})), {
|
|
48
|
+
onFailure: (error) => absurd(error),
|
|
49
|
+
onSuccess: (decision) => decision
|
|
50
|
+
})).pipe(Match.tag("Normal", () => normalTermination), Match.tag("Shutdown", () => shutdownTermination), Match.tag("Abnormal", () => inferredDeath), Match.exhaustive);
|
|
47
51
|
const startSingleton = (program, shardGroup) => Effect.gen(function* () {
|
|
48
52
|
const evidenceScope = yield* Effect.scope;
|
|
49
53
|
const registration = yield* Scope.fork(evidenceScope);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/effect-daemon-cluster",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"author": "Ryan Lee <drdgvhbh@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/daemon/effect-daemon-cluster#readme",
|
|
12
12
|
"bugs": "https://github.com/systemfsoftware/systemfsoftware/issues",
|
|
13
|
-
"description": "The effect-daemon-spec medium over effect/
|
|
13
|
+
"description": "The effect-daemon-spec medium over effect/cluster — entities and single-owner singletons supervised with inferred death and eventual group stop.",
|
|
14
14
|
"keywords": [
|
|
15
15
|
"effect",
|
|
16
16
|
"effect-ts",
|
|
@@ -35,33 +35,26 @@
|
|
|
35
35
|
"./package.json": "./package.json"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@systemfsoftware/effect-
|
|
39
|
-
"@systemfsoftware/effect-daemon-
|
|
38
|
+
"@systemfsoftware/effect-cell-types": "^12.0.0",
|
|
39
|
+
"@systemfsoftware/effect-daemon-conformance": "^1.0.0",
|
|
40
|
+
"@systemfsoftware/effect-daemon-spec": "^6.0.0"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
|
-
"@effect/platform-node": "4
|
|
43
|
-
"@effect/sql-pglite": "4
|
|
43
|
+
"@effect/platform-node": "^4",
|
|
44
|
+
"@effect/sql-pglite": "^4",
|
|
44
45
|
"@microsoft/api-extractor": "^7.59.1",
|
|
45
46
|
"@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
|
|
46
|
-
"@systemfsoftware/conformance-spec": "^0.
|
|
47
|
-
"@systemfsoftware/effect-gherkin-spec": "^
|
|
48
|
-
"@systemfsoftware/effect-schema-law": "^
|
|
49
|
-
"@systemfsoftware/effect-schema-vite": "^
|
|
50
|
-
"@systemfsoftware/oxlint-config-recommended": "^
|
|
51
|
-
"@systemfsoftware/stryker-config": "^0.1.0",
|
|
52
|
-
"@systemfsoftware/stryker-ignorer-effect-schema-declarations": "latest",
|
|
53
|
-
"@systemfsoftware/stryker-ignorer-in-source-vitest-block": "latest",
|
|
54
|
-
"@systemfsoftware/stryker-js": "latest",
|
|
55
|
-
"@systemfsoftware/stryker-js-typescript-checker": "latest",
|
|
56
|
-
"@systemfsoftware/stryker-js-vitest-runner": "latest",
|
|
57
|
-
"@systemfsoftware/stryker-test-contribution": "latest",
|
|
47
|
+
"@systemfsoftware/conformance-spec": "^1.0.0",
|
|
48
|
+
"@systemfsoftware/effect-gherkin-spec": "^7.0.0",
|
|
49
|
+
"@systemfsoftware/effect-schema-law": "^5.0.0",
|
|
50
|
+
"@systemfsoftware/effect-schema-vite": "^3.0.0",
|
|
51
|
+
"@systemfsoftware/oxlint-config-recommended": "^4.0.0",
|
|
58
52
|
"@systemfsoftware/tsconfig": "^2.0.1",
|
|
59
53
|
"@systemfsoftware/tsdown-config": "^0.1.0",
|
|
60
|
-
"@systemfsoftware/vitest": "^0.
|
|
54
|
+
"@systemfsoftware/vitest": "^1.0.0",
|
|
61
55
|
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
62
56
|
"@types/node": "^26",
|
|
63
|
-
"effect": "4
|
|
64
|
-
"fast-check": "^4",
|
|
57
|
+
"effect": "^4",
|
|
65
58
|
"oxlint": "~1.82.0",
|
|
66
59
|
"rimraf": "^6.1.3",
|
|
67
60
|
"tsdown": "^0.23.0",
|
|
@@ -69,7 +62,7 @@
|
|
|
69
62
|
"vitest": "^5"
|
|
70
63
|
},
|
|
71
64
|
"peerDependencies": {
|
|
72
|
-
"effect": "4
|
|
65
|
+
"effect": "^4",
|
|
73
66
|
"typescript": ">=7.0.0"
|
|
74
67
|
},
|
|
75
68
|
"publishConfig": {
|
|
@@ -81,8 +74,6 @@
|
|
|
81
74
|
"build": "tsdown -l warn && pnpm api:check",
|
|
82
75
|
"typecheck": "tsc -b",
|
|
83
76
|
"test": "vitest run --project unit --project conformance",
|
|
84
|
-
"test:contract": "vitest run --project contract",
|
|
85
|
-
"mutation": "stryker run",
|
|
86
77
|
"lint": "f=${OXLINT_FORMAT:-${AGENT:+agent}}; oxlint . --format=${f:-default}",
|
|
87
78
|
"attw": "attw --pack .",
|
|
88
79
|
"api:check": "api-extractor-quiet run",
|