coakka-v2-connector-node 1.3.3 → 1.3.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/README.md CHANGED
@@ -24,6 +24,57 @@ cd coakka-samples
24
24
  bash run.sh runtime node basic
25
25
  ```
26
26
 
27
+ No-checkout npm smoke:
28
+ https://github.com/phuong-tran/coakka-samples/blob/main/docs/first-npm-smoke.md
29
+
30
+ Try the npm package without cloning any CoAkka repo:
31
+
32
+ ```sh
33
+ mkdir coakka-runtime-first-run
34
+ cd coakka-runtime-first-run
35
+ npm init -y
36
+ npm install coakka-v2-connector-node@1.3.4
37
+ ```
38
+
39
+ ```js
40
+ import {
41
+ DeliveryHint,
42
+ localRoute,
43
+ NodeRuntimeClient,
44
+ PayloadFormat,
45
+ PayloadIdentity,
46
+ RuntimeHost,
47
+ } from "coakka-v2-connector-node";
48
+
49
+ const target = "first.user.echo";
50
+ const runtime = RuntimeHost.start({
51
+ systemName: "first-user-runtime",
52
+ nodeId: "first-user-runtime-node",
53
+ queueCapacity: 64,
54
+ strictNoDrop: true,
55
+ generation: 1,
56
+ routes: [localRoute(target, 19001)],
57
+ });
58
+
59
+ try {
60
+ runtime.registerHandler(target, (request) =>
61
+ NodeRuntimeClient.makeJsonReplyFromRequestIdentity(request, target, { ok: true }),
62
+ );
63
+ const response = await runtime.askJson(
64
+ "first-user-client",
65
+ target,
66
+ { hello: "coakka" },
67
+ new PayloadIdentity("first.user.echo.request.v1", 1, PayloadFormat.JSON),
68
+ 2000,
69
+ "echo",
70
+ DeliveryHint.ROUTER_DEFAULT,
71
+ );
72
+ console.log(response);
73
+ } finally {
74
+ runtime.close();
75
+ }
76
+ ```
77
+
27
78
  Current package shape:
28
79
 
29
80
  - `RuntimeHost.start(...)` as the preferred single-process lifecycle entrypoint
@@ -58,7 +109,7 @@ import {
58
109
  ConnectorOrchestrator,
59
110
  PayloadFormat,
60
111
  PayloadIdentity,
61
- } from "@coakka/v2-connector-node";
112
+ } from "coakka-v2-connector-node";
62
113
 
63
114
  const connector = ConnectorOrchestrator.start({
64
115
  systemName: "customer-local",
@@ -90,7 +141,7 @@ import {
90
141
  PayloadFormat,
91
142
  PayloadIdentity,
92
143
  RuntimeHost,
93
- } from "@coakka/v2-connector-node";
144
+ } from "coakka-v2-connector-node";
94
145
 
95
146
  const runtime = RuntimeHost.start({
96
147
  systemName: "customer-local",
@@ -1,4 +1,4 @@
1
- export declare const COAKKA_V2_NODE_VERSION = "1.3.3";
1
+ export declare const COAKKA_V2_NODE_VERSION = "1.3.4";
2
2
  export declare const COAKKA_V2_NATIVE_CORE_VERSION = "1.3.1";
3
3
  export declare const COAKKA_V2_NATIVE_GIT_COMMIT = "bda2ef5";
4
4
  export declare const COAKKA_V2_NATIVE_PACKAGE_VERSION = "1.3.1+bda2ef5";
package/dist/packaging.js CHANGED
@@ -1,4 +1,4 @@
1
- export const COAKKA_V2_NODE_VERSION = "1.3.3";
1
+ export const COAKKA_V2_NODE_VERSION = "1.3.4";
2
2
  export const COAKKA_V2_NATIVE_CORE_VERSION = "1.3.1";
3
3
  export const COAKKA_V2_NATIVE_GIT_COMMIT = "bda2ef5";
4
4
  export const COAKKA_V2_NATIVE_PACKAGE_VERSION = "1.3.1+bda2ef5";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coakka-v2-connector-node",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "Node.js connector package for the CoAkka runtime v2",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",