@nmtjs/protocol 0.11.3 → 0.11.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.
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { createFactoryInjectable, createLazyInjectable, Scope } from "@nmtjs/core";
|
|
2
2
|
const connection = createLazyInjectable(Scope.Connection, "RPC connection");
|
|
3
3
|
const connectionData = createLazyInjectable(Scope.Connection, "RPC connection's data");
|
|
4
|
-
const
|
|
4
|
+
const connectionAbortSignal = createLazyInjectable(Scope.Connection, "Connection abort signal");
|
|
5
5
|
const rpcClientAbortSignal = createLazyInjectable(Scope.Call, "RPC client abort signal");
|
|
6
6
|
const rpcTimeoutSignal = createLazyInjectable(Scope.Call, "RPC timeout signal");
|
|
7
7
|
const rpcAbortSignal = createFactoryInjectable({
|
|
8
8
|
dependencies: {
|
|
9
9
|
rpcTimeoutSignal,
|
|
10
10
|
rpcClientAbortSignal,
|
|
11
|
-
|
|
11
|
+
connectionAbortSignal
|
|
12
12
|
},
|
|
13
13
|
factory: (ctx) => AbortSignal.any(Object.values(ctx))
|
|
14
14
|
}, "Any RPC abort signal");
|
|
15
15
|
export const ProtocolInjectables = {
|
|
16
16
|
connection,
|
|
17
17
|
connectionData,
|
|
18
|
-
|
|
18
|
+
connectionAbortSignal,
|
|
19
19
|
rpcClientAbortSignal,
|
|
20
20
|
rpcTimeoutSignal,
|
|
21
21
|
rpcAbortSignal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAAA,SACE,yBACA,sBACA,aACK,aAAa;AAGpB,MAAM,aAAa,qBACjB,MAAM,YACN,iBACD;AAED,MAAM,iBAAiB,qBACrB,MAAM,YACN,wBACD;AAED,MAAM,
|
|
1
|
+
{"mappings":"AAAA,SACE,yBACA,sBACA,aACK,aAAa;AAGpB,MAAM,aAAa,qBACjB,MAAM,YACN,iBACD;AAED,MAAM,iBAAiB,qBACrB,MAAM,YACN,wBACD;AAED,MAAM,wBAAwB,qBAG5B,MAAM,YAAY,0BAA0B;AAE9C,MAAM,uBAAuB,qBAC3B,MAAM,MACN,0BACD;AAED,MAAM,mBAAmB,qBACvB,MAAM,MACN,qBACD;AAED,MAAM,iBAAiB,wBACrB;CACE,cAAc;EACZ;EACA;EACA;CACD;CACD,SAAS,CAAC,QAAQ,YAAY,IAAI,OAAO,OAAO,IAAI,CAAC;AACtD,GACD,uBACD;AAED,OAAO,MAAM,sBAAsB;CACjC;CACA;CACA;CACA;CACA;CACA;AACD","names":[],"sources":["../../src/server/injectables.ts"],"sourcesContent":["import {\n createFactoryInjectable,\n createLazyInjectable,\n Scope,\n} from '@nmtjs/core'\nimport type { Connection } from './connection.ts'\n\nconst connection = createLazyInjectable<Connection, Scope.Connection>(\n Scope.Connection,\n 'RPC connection',\n)\n\nconst connectionData = createLazyInjectable<any, Scope.Connection>(\n Scope.Connection,\n \"RPC connection's data\",\n)\n\nconst connectionAbortSignal = createLazyInjectable<\n AbortSignal,\n Scope.Connection\n>(Scope.Connection, 'Connection abort signal')\n\nconst rpcClientAbortSignal = createLazyInjectable<AbortSignal, Scope.Call>(\n Scope.Call,\n 'RPC client abort signal',\n)\n\nconst rpcTimeoutSignal = createLazyInjectable<AbortSignal, Scope.Call>(\n Scope.Call,\n 'RPC timeout signal',\n)\n\nconst rpcAbortSignal = createFactoryInjectable(\n {\n dependencies: {\n rpcTimeoutSignal,\n rpcClientAbortSignal,\n connectionAbortSignal,\n },\n factory: (ctx) => AbortSignal.any(Object.values(ctx)),\n },\n 'Any RPC abort signal',\n)\n\nexport const ProtocolInjectables = {\n connection,\n connectionData,\n connectionAbortSignal,\n rpcClientAbortSignal,\n rpcTimeoutSignal,\n rpcAbortSignal,\n} as const\n"],"version":3,"file":"injectables.js"}
|
package/package.json
CHANGED
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@nmtjs/common": "0.11.
|
|
20
|
-
"@nmtjs/core": "0.11.
|
|
21
|
-
"@nmtjs/type": "0.11.
|
|
19
|
+
"@nmtjs/common": "0.11.4",
|
|
20
|
+
"@nmtjs/core": "0.11.4",
|
|
21
|
+
"@nmtjs/type": "0.11.4"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@nmtjs/
|
|
25
|
-
"@nmtjs/
|
|
26
|
-
"@nmtjs/core": "0.11.
|
|
24
|
+
"@nmtjs/common": "0.11.4",
|
|
25
|
+
"@nmtjs/type": "0.11.4",
|
|
26
|
+
"@nmtjs/core": "0.11.4"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"src",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"LICENSE.md",
|
|
32
32
|
"README.md"
|
|
33
33
|
],
|
|
34
|
-
"version": "0.11.
|
|
34
|
+
"version": "0.11.4",
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "neemata-build --root=./src './**/*.ts'",
|
|
37
37
|
"type-check": "tsc --noEmit"
|
|
@@ -15,10 +15,10 @@ const connectionData = createLazyInjectable<any, Scope.Connection>(
|
|
|
15
15
|
"RPC connection's data",
|
|
16
16
|
)
|
|
17
17
|
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
)
|
|
18
|
+
const connectionAbortSignal = createLazyInjectable<
|
|
19
|
+
AbortSignal,
|
|
20
|
+
Scope.Connection
|
|
21
|
+
>(Scope.Connection, 'Connection abort signal')
|
|
22
22
|
|
|
23
23
|
const rpcClientAbortSignal = createLazyInjectable<AbortSignal, Scope.Call>(
|
|
24
24
|
Scope.Call,
|
|
@@ -35,7 +35,7 @@ const rpcAbortSignal = createFactoryInjectable(
|
|
|
35
35
|
dependencies: {
|
|
36
36
|
rpcTimeoutSignal,
|
|
37
37
|
rpcClientAbortSignal,
|
|
38
|
-
|
|
38
|
+
connectionAbortSignal,
|
|
39
39
|
},
|
|
40
40
|
factory: (ctx) => AbortSignal.any(Object.values(ctx)),
|
|
41
41
|
},
|
|
@@ -45,7 +45,7 @@ const rpcAbortSignal = createFactoryInjectable(
|
|
|
45
45
|
export const ProtocolInjectables = {
|
|
46
46
|
connection,
|
|
47
47
|
connectionData,
|
|
48
|
-
|
|
48
|
+
connectionAbortSignal,
|
|
49
49
|
rpcClientAbortSignal,
|
|
50
50
|
rpcTimeoutSignal,
|
|
51
51
|
rpcAbortSignal,
|