@actor-system/spawn-protocol 0.0.17 → 0.0.18
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/behavior.d.ts +4 -3
- package/dist/behavior.internal.d.ts +4 -3
- package/dist/behavior.js +2 -2
- package/dist/command.d.ts +2 -2
- package/dist/command.internal.d.ts +2 -2
- package/package.json +5 -5
package/dist/behavior.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Behavior } from '@actor-system/core';
|
|
2
1
|
import { Command } from './command.js';
|
|
2
|
+
import { behavior } from '@actor-system/core';
|
|
3
3
|
|
|
4
|
-
declare const
|
|
4
|
+
declare const spawnBehavior: <T>() => behavior.Behavior<Command<T>>;
|
|
5
|
+
//# sourceMappingURL=behavior.d.ts.map
|
|
5
6
|
|
|
6
|
-
export { behavior };
|
|
7
|
+
export { spawnBehavior as behavior };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Behavior } from '@actor-system/core/internal';
|
|
2
1
|
import { Command } from './command.internal.js';
|
|
2
|
+
import { behavior } from '@actor-system/core/internal';
|
|
3
3
|
|
|
4
|
-
declare const
|
|
4
|
+
declare const spawnBehavior: <T>() => behavior.Behavior<Command<T>>;
|
|
5
|
+
//# sourceMappingURL=behavior.d.ts.map
|
|
5
6
|
|
|
6
|
-
export { behavior };
|
|
7
|
+
export { spawnBehavior as behavior };
|
package/dist/behavior.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { receive, same } from '@actor-system/behaviors';
|
|
2
2
|
import { isSpawn } from './command.js';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const spawnBehavior = () => receive((msg, context) => {
|
|
5
5
|
if (!isSpawn(msg))
|
|
6
6
|
return same;
|
|
7
7
|
const { behavior, name, replyTo } = msg;
|
|
@@ -10,4 +10,4 @@ const behavior = () => receive((msg, context) => {
|
|
|
10
10
|
return same;
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
export { behavior };
|
|
13
|
+
export { spawnBehavior as behavior };
|
package/dist/command.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ActorProps,
|
|
1
|
+
import { ActorProps, behavior, ActorRef } from '@actor-system/core';
|
|
2
2
|
import { Letter } from '@actor-system/mail';
|
|
3
3
|
|
|
4
4
|
type Command<T = unknown> = Spawn<T>;
|
|
5
5
|
interface Spawn<T> extends Letter<typeof $spawn> {
|
|
6
6
|
readonly name?: string;
|
|
7
7
|
readonly props?: ActorProps;
|
|
8
|
-
readonly behavior: Behavior<T>;
|
|
8
|
+
readonly behavior: behavior.Behavior<T>;
|
|
9
9
|
readonly replyTo: ActorRef<ActorRef<T>>;
|
|
10
10
|
}
|
|
11
11
|
declare const $spawn: "spawn";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ActorProps,
|
|
1
|
+
import { ActorProps, behavior, ActorRef } from '@actor-system/core/internal';
|
|
2
2
|
import { Letter } from '@actor-system/mail/internal';
|
|
3
3
|
|
|
4
4
|
type Command<T = unknown> = Spawn<T>;
|
|
5
5
|
interface Spawn<T> extends Letter<typeof $spawn> {
|
|
6
6
|
readonly name?: string;
|
|
7
7
|
readonly props?: ActorProps;
|
|
8
|
-
readonly behavior: Behavior<T>;
|
|
8
|
+
readonly behavior: behavior.Behavior<T>;
|
|
9
9
|
readonly replyTo: ActorRef<ActorRef<T>>;
|
|
10
10
|
}
|
|
11
11
|
declare const $spawn: "spawn";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actor-system/spawn-protocol",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"type-check": "tsc -b src",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"@actor-system/shared"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@actor-system/behaviors": "0.0.
|
|
42
|
-
"@actor-system/core": "0.1.
|
|
43
|
-
"@actor-system/mail": "0.0.
|
|
41
|
+
"@actor-system/behaviors": "0.0.18",
|
|
42
|
+
"@actor-system/core": "0.1.2",
|
|
43
|
+
"@actor-system/mail": "0.0.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@actor-system/testing": "0.0.2",
|
|
47
|
-
"@actor-system/shared": "0.0.
|
|
47
|
+
"@actor-system/shared": "0.0.3",
|
|
48
48
|
"config": "^1.0.0"
|
|
49
49
|
}
|
|
50
50
|
}
|