@actor-system/spawn-protocol 0.0.16 → 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.
@@ -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 behavior: <T>() => Behavior<Command<T>>;
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 behavior: <T>() => Behavior<Command<T>>;
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 behavior = () => receive((msg, context) => {
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, Behavior, ActorRef } from '@actor-system/core';
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, Behavior, ActorRef } from '@actor-system/core/internal';
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.16",
3
+ "version": "0.0.18",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "type-check": "tsc -b src",
@@ -9,7 +9,13 @@
9
9
  "publint": "publint",
10
10
  "build:tsc:internal": "tsc -b src/tsconfig.lib.json",
11
11
  "build:tsc:trimmed": "tsc -b src/tsconfig.lib.trimmed.json",
12
- "build:rollup": "rollup -c node:config/rollup-config"
12
+ "build:rollup": "rollup -c node:config/rollup-config",
13
+ "test": "NODE_OPTIONS=\"--expose-gc\" vitest run",
14
+ "test:browser": "vitest run --browser.enabled",
15
+ "test:browser:watch": "vitest --browser.enabled",
16
+ "test:browser:coverage": "vitest run --coverage --browser.enabled",
17
+ "test:extensive": "npm run test && npm run test -- --mode sync && npm run test:browser && npm run test:browser -- --mode sync",
18
+ "test:coverage": "vitest run --coverage"
13
19
  },
14
20
  "module": "./dist/index.js",
15
21
  "main": "./dist/index.js",
@@ -32,13 +38,13 @@
32
38
  "@actor-system/shared"
33
39
  ],
34
40
  "dependencies": {
35
- "@actor-system/behaviors": "0.0.16",
36
- "@actor-system/core": "0.1.0",
37
- "@actor-system/mail": "0.0.2"
41
+ "@actor-system/behaviors": "0.0.18",
42
+ "@actor-system/core": "0.1.2",
43
+ "@actor-system/mail": "0.0.3"
38
44
  },
39
45
  "devDependencies": {
40
46
  "@actor-system/testing": "0.0.2",
41
- "@actor-system/shared": "0.0.2",
47
+ "@actor-system/shared": "0.0.3",
42
48
  "config": "^1.0.0"
43
49
  }
44
50
  }