nmtjs 0.7.4 → 0.7.6
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/index.js +26 -28
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
- package/src/index.ts +33 -30
package/dist/index.js
CHANGED
|
@@ -2,39 +2,37 @@ import { AppInjectables, Application, createContractNamespace, createContractPro
|
|
|
2
2
|
import { CoreInjectables, createClassInjectable, createConsolePrettyDestination, createExtendableClassInjectable, createFactoryInjectable, createLazyInjectable, createOptionalInjectable, createPlugin, createValueInjectable } from "@nmtjs/core";
|
|
3
3
|
import { createTransport, ProtocolInjectables } from "@nmtjs/protocol/server";
|
|
4
4
|
import { ApplicationServer } from "@nmtjs/server";
|
|
5
|
-
export
|
|
6
|
-
(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
export const neemata = {
|
|
6
|
+
app: (...args) => new Application(...args),
|
|
7
|
+
server: (...args) => new ApplicationServer(...args),
|
|
8
|
+
optional: createOptionalInjectable,
|
|
9
|
+
value: createValueInjectable,
|
|
10
|
+
lazy: createLazyInjectable,
|
|
11
|
+
factory: createFactoryInjectable,
|
|
12
|
+
class: createClassInjectable,
|
|
13
|
+
extendClass: createExtendableClassInjectable,
|
|
14
|
+
task: createTask,
|
|
15
|
+
procedure: createProcedure,
|
|
16
|
+
namespace: createNamespace,
|
|
17
|
+
middleware: createMiddleware,
|
|
18
|
+
guard: createGuard,
|
|
19
|
+
filter: createFilter,
|
|
20
|
+
contract: {
|
|
21
|
+
procedure: createContractProcedure,
|
|
22
|
+
namespace: createContractNamespace
|
|
23
|
+
},
|
|
24
|
+
injectables: {
|
|
22
25
|
...CoreInjectables,
|
|
23
26
|
...ProtocolInjectables,
|
|
24
27
|
...AppInjectables
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
(function(_contract) {
|
|
31
|
-
const procedure = _contract.procedure = createContractProcedure;
|
|
32
|
-
const namespace = _contract.namespace = createContractNamespace;
|
|
33
|
-
})(contract || (contract = _neemata.contract || (_neemata.contract = {})));
|
|
34
|
-
})(neemata || (neemata = {}));
|
|
28
|
+
},
|
|
29
|
+
transport: createTransport,
|
|
30
|
+
plugin: createPlugin,
|
|
31
|
+
logging: { console: createConsolePrettyDestination }
|
|
32
|
+
};
|
|
35
33
|
export { neemata as n };
|
|
36
34
|
export { ApiError, WorkerType } from "@nmtjs/application";
|
|
37
35
|
export { c, contract } from "@nmtjs/contract";
|
|
38
36
|
export { Hook, Scope } from "@nmtjs/core";
|
|
39
37
|
export { ErrorCode, ProtocolBlob, TransportType } from "@nmtjs/protocol/common";
|
|
40
|
-
export
|
|
38
|
+
export * from "@nmtjs/type";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAAA,SACE,gBACA,aACA,yBACA,yBACA,cACA,aACA,kBACA,iBACA,iBACA,kBACK,oBAAoB;AAC3B,SACE,iBACA,uBACA,gCACA,iCACA,yBACA,sBACA,0BACA,cACA,6BACK,aAAa;AACpB,SAAS,iBAAiB,2BAA2B,wBAAwB;AAC7E,SAAS,yBAAyB,eAAe
|
|
1
|
+
{"mappings":"AAAA,SACE,gBACA,aACA,yBACA,yBACA,cACA,aACA,kBACA,iBACA,iBACA,kBACK,oBAAoB;AAC3B,SACE,iBACA,uBACA,gCACA,iCACA,yBACA,sBACA,0BACA,cACA,6BACK,aAAa;AACpB,SAAS,iBAAiB,2BAA2B,wBAAwB;AAC7E,SAAS,yBAAyB,eAAe;AAEjD,OAAO,MAAM,UAAU;CACrB,KAAK,CAAC,GAAG,SACP,IAAI,YAAY,GAAG;CAErB,QAAQ,CAAC,GAAG,SACV,IAAI,kBAAkB,GAAG;CAE3B,UAAU;CACV,OAAO;CACP,MAAM;CACN,SAAS;CACT,OAAO;CACP,aAAa;CACb,MAAM;CACN,WAAW;CACX,WAAW;CACX,YAAY;CACZ,OAAO;CACP,QAAQ;CAER,UAAU;EACR,WAAW;EACX,WAAW;CACZ;CAED,aAAa;EACX,GAAG;EACH,GAAG;EACH,GAAG;CACJ;CAED,WAAW;CAEX,QAAQ;CAER,SAAS,EACP,SAAS,+BACV;AACF;AAED,SAAS,WAAW;AAEpB,SACE,UAKA,kBACK;AAEP,SACE,GACA,gBAMK;AAEP,SAA6B,MAAmB,aAAa;AAE7D,SACE,WACA,cAEA,qBACK;AAEP,cAAc","names":[],"sources":["src/index.ts"],"sourcesContent":["import {\n AppInjectables,\n Application,\n createContractNamespace,\n createContractProcedure,\n createFilter,\n createGuard,\n createMiddleware,\n createNamespace,\n createProcedure,\n createTask,\n} from '@nmtjs/application'\nimport {\n CoreInjectables,\n createClassInjectable,\n createConsolePrettyDestination,\n createExtendableClassInjectable,\n createFactoryInjectable,\n createLazyInjectable,\n createOptionalInjectable,\n createPlugin,\n createValueInjectable,\n} from '@nmtjs/core'\nimport { createTransport, ProtocolInjectables } from '@nmtjs/protocol/server'\nimport { ApplicationServer } from '@nmtjs/server'\n\nexport const neemata = {\n app: (...args: ConstructorParameters<typeof Application>) =>\n new Application(...args),\n\n server: (...args: ConstructorParameters<typeof ApplicationServer>) =>\n new ApplicationServer(...args),\n\n optional: createOptionalInjectable,\n value: createValueInjectable,\n lazy: createLazyInjectable,\n factory: createFactoryInjectable,\n class: createClassInjectable,\n extendClass: createExtendableClassInjectable,\n task: createTask,\n procedure: createProcedure,\n namespace: createNamespace,\n middleware: createMiddleware,\n guard: createGuard,\n filter: createFilter,\n\n contract: {\n procedure: createContractProcedure,\n namespace: createContractNamespace,\n },\n\n injectables: {\n ...CoreInjectables,\n ...ProtocolInjectables,\n ...AppInjectables,\n },\n\n transport: createTransport,\n\n plugin: createPlugin,\n\n logging: {\n console: createConsolePrettyDestination,\n },\n}\n\nexport { neemata as n }\n\nexport {\n ApiError,\n type ApplicationWorkerOptions,\n type FilterLike,\n type GuardLike,\n type MiddlewareLike,\n WorkerType,\n} from '@nmtjs/application'\n\nexport {\n c,\n contract,\n type TAPIContract,\n type TEventContract,\n type TNamespaceContract,\n type TProcedureContract,\n type TSubscriptionContract,\n} from '@nmtjs/contract'\n\nexport { type AnyInjectable, Hook, type Logger, Scope } from '@nmtjs/core'\n\nexport {\n ErrorCode,\n ProtocolBlob,\n type ProtocolBlobMetadata,\n TransportType,\n} from '@nmtjs/protocol/common'\n\nexport * from '@nmtjs/type'\n"],"version":3}
|
package/package.json
CHANGED
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@nmtjs/common": "0.7.
|
|
12
|
-
"@nmtjs/protocol": "0.7.
|
|
13
|
-
"@nmtjs/
|
|
14
|
-
"@nmtjs/application": "0.7.
|
|
15
|
-
"@nmtjs/server": "0.7.
|
|
16
|
-
"@nmtjs/
|
|
17
|
-
"@nmtjs/
|
|
18
|
-
"@nmtjs/
|
|
19
|
-
"@nmtjs/
|
|
20
|
-
"@nmtjs/
|
|
11
|
+
"@nmtjs/common": "0.7.6",
|
|
12
|
+
"@nmtjs/protocol": "0.7.6",
|
|
13
|
+
"@nmtjs/core": "0.7.6",
|
|
14
|
+
"@nmtjs/application": "0.7.6",
|
|
15
|
+
"@nmtjs/server": "0.7.6",
|
|
16
|
+
"@nmtjs/contract": "0.7.6",
|
|
17
|
+
"@nmtjs/ws-transport": "0.7.6",
|
|
18
|
+
"@nmtjs/cli": "0.7.6",
|
|
19
|
+
"@nmtjs/json-format": "0.7.6",
|
|
20
|
+
"@nmtjs/type": "0.7.6"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"src",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"LICENSE.md",
|
|
26
26
|
"README.md"
|
|
27
27
|
],
|
|
28
|
-
"version": "0.7.
|
|
28
|
+
"version": "0.7.6",
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "neemata-build --root=./src './**/*.ts'",
|
|
31
31
|
"type-check": "tsc --noEmit"
|
package/src/index.ts
CHANGED
|
@@ -24,41 +24,44 @@ import {
|
|
|
24
24
|
import { createTransport, ProtocolInjectables } from '@nmtjs/protocol/server'
|
|
25
25
|
import { ApplicationServer } from '@nmtjs/server'
|
|
26
26
|
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
new Application(...args)
|
|
27
|
+
export const neemata = {
|
|
28
|
+
app: (...args: ConstructorParameters<typeof Application>) =>
|
|
29
|
+
new Application(...args),
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
...args
|
|
33
|
-
) => new ApplicationServer(...args)
|
|
31
|
+
server: (...args: ConstructorParameters<typeof ApplicationServer>) =>
|
|
32
|
+
new ApplicationServer(...args),
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
optional: createOptionalInjectable,
|
|
35
|
+
value: createValueInjectable,
|
|
36
|
+
lazy: createLazyInjectable,
|
|
37
|
+
factory: createFactoryInjectable,
|
|
38
|
+
class: createClassInjectable,
|
|
39
|
+
extendClass: createExtendableClassInjectable,
|
|
40
|
+
task: createTask,
|
|
41
|
+
procedure: createProcedure,
|
|
42
|
+
namespace: createNamespace,
|
|
43
|
+
middleware: createMiddleware,
|
|
44
|
+
guard: createGuard,
|
|
45
|
+
filter: createFilter,
|
|
46
|
+
|
|
47
|
+
contract: {
|
|
48
|
+
procedure: createContractProcedure,
|
|
49
|
+
namespace: createContractNamespace,
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
injectables: {
|
|
48
53
|
...CoreInjectables,
|
|
49
54
|
...ProtocolInjectables,
|
|
50
55
|
...AppInjectables,
|
|
51
|
-
}
|
|
52
|
-
export const transport = createTransport
|
|
53
|
-
export const plugin = createPlugin
|
|
54
|
-
export const logging = {
|
|
55
|
-
console: createConsolePrettyDestination,
|
|
56
|
-
}
|
|
56
|
+
},
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
transport: createTransport,
|
|
59
|
+
|
|
60
|
+
plugin: createPlugin,
|
|
61
|
+
|
|
62
|
+
logging: {
|
|
63
|
+
console: createConsolePrettyDestination,
|
|
64
|
+
},
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
export { neemata as n }
|
|
@@ -91,4 +94,4 @@ export {
|
|
|
91
94
|
TransportType,
|
|
92
95
|
} from '@nmtjs/protocol/common'
|
|
93
96
|
|
|
94
|
-
export
|
|
97
|
+
export * from '@nmtjs/type'
|