@nmtjs/protocol 0.12.1 → 0.12.2
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/server/api.js.map +1 -1
- package/package.json +7 -7
- package/src/server/api.ts +1 -1
package/dist/server/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAEA,SAAS,yBAAyB,gBAAgB;AAmClD,OAAO,SAAS,iBACdA,OACwC;AACxC,QAAO,SAAS,MAAM,uBAAuB;AAC9C;AAED,OAAO,SAAS,qBACdC,UACA,SAAS,WACTC,UACqC;AACrC,QAAO;GACJ,oBAAoB;EACrB;EACA;EACA;CACD;AACF","names":["value:
|
|
1
|
+
{"mappings":"AAEA,SAAS,yBAAyB,gBAAgB;AAmClD,OAAO,SAAS,iBACdA,OACwC;AACxC,QAAO,SAAS,MAAM,uBAAuB;AAC9C;AAED,OAAO,SAAS,qBACdC,UACA,SAAS,WACTC,UACqC;AACrC,QAAO;GACJ,oBAAoB;EACrB;EACA;EACA;CACD;AACF","names":["value: ProtocolApiCallResult","iterable: ProtocolAnyIterable<Y>","onFinish?: () => void"],"sources":["../../src/server/api.ts"],"sourcesContent":["import type { Container, Hook, MetadataStore } from '@nmtjs/core'\nimport type { Connection } from './connection.ts'\nimport { kIterableResponse } from './constants.ts'\n\nexport type ProtocolApiCallOptions = {\n connection: Connection\n namespace: string\n procedure: string\n container: Container\n payload: any\n signal: AbortSignal\n metadata?: (metadata: MetadataStore) => void\n}\n\nexport type ProtocolAnyIterable<T> =\n | ((signal: AbortSignal) => AsyncIterable<T>)\n | AsyncIterable<T>\n\nexport interface ProtocolApiCallBaseResult<T = unknown> {\n output: T\n}\n\nexport interface ProtocolApiCallIterableResult<Y = unknown, O = unknown>\n extends ProtocolApiCallBaseResult<O> {\n [kIterableResponse]: true\n iterable: ProtocolAnyIterable<Y>\n onFinish?: () => void\n}\n\nexport type ProtocolApiCallResult =\n | ProtocolApiCallBaseResult\n | ProtocolApiCallIterableResult\n\nexport interface ProtocolApi {\n call(options: ProtocolApiCallOptions): Promise<ProtocolApiCallResult>\n}\n\nexport function isIterableResult(\n value: ProtocolApiCallResult,\n): value is ProtocolApiCallIterableResult {\n return value && value[kIterableResponse] === true\n}\n\nexport function createStreamResponse<Y, O>(\n iterable: ProtocolAnyIterable<Y>,\n output = undefined as O,\n onFinish?: () => void,\n): ProtocolApiCallIterableResult<Y, O> {\n return {\n [kIterableResponse]: true as const,\n iterable,\n output,\n onFinish,\n }\n}\n\ndeclare module '@nmtjs/core' {\n export interface HookType {\n [Hook.OnConnect]: (connection: Connection) => any\n [Hook.OnDisconnect]: (connection: Connection) => any\n }\n}\n"],"version":3,"file":"api.js"}
|
package/package.json
CHANGED
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@nmtjs/
|
|
20
|
-
"@nmtjs/
|
|
21
|
-
"@nmtjs/
|
|
19
|
+
"@nmtjs/common": "0.12.2",
|
|
20
|
+
"@nmtjs/core": "0.12.2",
|
|
21
|
+
"@nmtjs/type": "0.12.2"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@nmtjs/
|
|
25
|
-
"@nmtjs/
|
|
26
|
-
"@nmtjs/core": "0.12.
|
|
24
|
+
"@nmtjs/type": "0.12.2",
|
|
25
|
+
"@nmtjs/common": "0.12.2",
|
|
26
|
+
"@nmtjs/core": "0.12.2"
|
|
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.12.
|
|
34
|
+
"version": "0.12.2",
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "neemata-build --root=./src './**/*.ts'",
|
|
37
37
|
"type-check": "tsc --noEmit"
|
package/src/server/api.ts
CHANGED