nmtjs 0.16.0 → 0.17.0-beta.1
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/LICENSE.md +1 -1
- package/README.md +41 -1
- package/dist/index.d.ts +22 -121
- package/dist/index.js +24 -53
- package/dist/index.js.map +1 -1
- package/package.json +11 -63
- package/src/index.ts +71 -91
- package/bin/cli.js +0 -2
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -137
- package/dist/cli.js.map +0 -1
- package/dist/codegen.d.ts +0 -5
- package/dist/codegen.js +0 -18
- package/dist/codegen.js.map +0 -1
- package/dist/config.d.ts +0 -47
- package/dist/config.js +0 -16
- package/dist/config.js.map +0 -1
- package/dist/entrypoints/cli.d.ts +0 -1
- package/dist/entrypoints/cli.js +0 -12
- package/dist/entrypoints/cli.js.map +0 -1
- package/dist/entrypoints/main.d.ts +0 -5
- package/dist/entrypoints/main.js +0 -248
- package/dist/entrypoints/main.js.map +0 -1
- package/dist/entrypoints/thread.d.ts +0 -16
- package/dist/entrypoints/thread.js +0 -182
- package/dist/entrypoints/thread.js.map +0 -1
- package/dist/entrypoints/worker.d.ts +0 -9
- package/dist/entrypoints/worker.js +0 -143
- package/dist/entrypoints/worker.js.map +0 -1
- package/dist/resolver.d.ts +0 -2
- package/dist/resolver.js +0 -7
- package/dist/resolver.js.map +0 -1
- package/dist/runtime/application/index.d.ts +0 -1
- package/dist/runtime/application/index.js +0 -2
- package/dist/runtime/application/index.js.map +0 -1
- package/dist/runtime/constants.d.ts +0 -8
- package/dist/runtime/constants.js +0 -5
- package/dist/runtime/constants.js.map +0 -1
- package/dist/runtime/enums.d.ts +0 -10
- package/dist/runtime/enums.js +0 -13
- package/dist/runtime/enums.js.map +0 -1
- package/dist/runtime/hooks.d.ts +0 -1
- package/dist/runtime/hooks.js +0 -2
- package/dist/runtime/hooks.js.map +0 -1
- package/dist/runtime/index.d.ts +0 -28
- package/dist/runtime/index.js +0 -29
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/injectables.d.ts +0 -28
- package/dist/runtime/injectables.js +0 -24
- package/dist/runtime/injectables.js.map +0 -1
- package/dist/runtime/jobs/job.d.ts +0 -146
- package/dist/runtime/jobs/job.js +0 -89
- package/dist/runtime/jobs/job.js.map +0 -1
- package/dist/runtime/jobs/manager.d.ts +0 -131
- package/dist/runtime/jobs/manager.js +0 -309
- package/dist/runtime/jobs/manager.js.map +0 -1
- package/dist/runtime/jobs/router.d.ts +0 -296
- package/dist/runtime/jobs/router.js +0 -458
- package/dist/runtime/jobs/router.js.map +0 -1
- package/dist/runtime/jobs/runner.d.ts +0 -103
- package/dist/runtime/jobs/runner.js +0 -425
- package/dist/runtime/jobs/runner.js.map +0 -1
- package/dist/runtime/jobs/step.d.ts +0 -26
- package/dist/runtime/jobs/step.js +0 -18
- package/dist/runtime/jobs/step.js.map +0 -1
- package/dist/runtime/jobs/types.d.ts +0 -86
- package/dist/runtime/jobs/types.js +0 -5
- package/dist/runtime/jobs/types.js.map +0 -1
- package/dist/runtime/metrics/metric.d.ts +0 -8
- package/dist/runtime/metrics/metric.js +0 -11
- package/dist/runtime/metrics/metric.js.map +0 -1
- package/dist/runtime/metrics/registry.d.ts +0 -3
- package/dist/runtime/metrics/registry.js +0 -5
- package/dist/runtime/metrics/registry.js.map +0 -1
- package/dist/runtime/metrics/server.d.ts +0 -7
- package/dist/runtime/metrics/server.js +0 -53
- package/dist/runtime/metrics/server.js.map +0 -1
- package/dist/runtime/plugin.d.ts +0 -2
- package/dist/runtime/plugin.js +0 -2
- package/dist/runtime/plugin.js.map +0 -1
- package/dist/runtime/runtime.d.ts +0 -27
- package/dist/runtime/runtime.js +0 -77
- package/dist/runtime/runtime.js.map +0 -1
- package/dist/runtime/scheduler/index.d.ts +0 -22
- package/dist/runtime/scheduler/index.js +0 -20
- package/dist/runtime/scheduler/index.js.map +0 -1
- package/dist/runtime/server/applications.d.ts +0 -91
- package/dist/runtime/server/applications.js +0 -171
- package/dist/runtime/server/applications.js.map +0 -1
- package/dist/runtime/server/config.d.ts +0 -148
- package/dist/runtime/server/config.js +0 -33
- package/dist/runtime/server/config.js.map +0 -1
- package/dist/runtime/server/environment.d.ts +0 -43
- package/dist/runtime/server/environment.js +0 -33
- package/dist/runtime/server/environment.js.map +0 -1
- package/dist/runtime/server/error-policy.d.ts +0 -62
- package/dist/runtime/server/error-policy.js +0 -73
- package/dist/runtime/server/error-policy.js.map +0 -1
- package/dist/runtime/server/hmr-coordinator.d.ts +0 -37
- package/dist/runtime/server/hmr-coordinator.js +0 -94
- package/dist/runtime/server/hmr-coordinator.js.map +0 -1
- package/dist/runtime/server/jobs.d.ts +0 -54
- package/dist/runtime/server/jobs.js +0 -176
- package/dist/runtime/server/jobs.js.map +0 -1
- package/dist/runtime/server/lifecycle.d.ts +0 -85
- package/dist/runtime/server/lifecycle.js +0 -177
- package/dist/runtime/server/lifecycle.js.map +0 -1
- package/dist/runtime/server/managed-worker.d.ts +0 -158
- package/dist/runtime/server/managed-worker.js +0 -420
- package/dist/runtime/server/managed-worker.js.map +0 -1
- package/dist/runtime/server/pool-manager.d.ts +0 -85
- package/dist/runtime/server/pool-manager.js +0 -129
- package/dist/runtime/server/pool-manager.js.map +0 -1
- package/dist/runtime/server/proxy.d.ts +0 -21
- package/dist/runtime/server/proxy.js +0 -76
- package/dist/runtime/server/proxy.js.map +0 -1
- package/dist/runtime/server/server.d.ts +0 -60
- package/dist/runtime/server/server.js +0 -163
- package/dist/runtime/server/server.js.map +0 -1
- package/dist/runtime/server/types.d.ts +0 -31
- package/dist/runtime/server/types.js +0 -2
- package/dist/runtime/server/types.js.map +0 -1
- package/dist/runtime/server/worker-pool.d.ts +0 -121
- package/dist/runtime/server/worker-pool.js +0 -171
- package/dist/runtime/server/worker-pool.js.map +0 -1
- package/dist/runtime/store/index.d.ts +0 -3
- package/dist/runtime/store/index.js +0 -23
- package/dist/runtime/store/index.js.map +0 -1
- package/dist/runtime/subscription/manager.d.ts +0 -49
- package/dist/runtime/subscription/manager.js +0 -170
- package/dist/runtime/subscription/manager.js.map +0 -1
- package/dist/runtime/subscription/redis.d.ts +0 -18
- package/dist/runtime/subscription/redis.js +0 -120
- package/dist/runtime/subscription/redis.js.map +0 -1
- package/dist/runtime/types.d.ts +0 -95
- package/dist/runtime/types.js +0 -2
- package/dist/runtime/types.js.map +0 -1
- package/dist/runtime/workers/application.d.ts +0 -29
- package/dist/runtime/workers/application.js +0 -77
- package/dist/runtime/workers/application.js.map +0 -1
- package/dist/runtime/workers/base.d.ts +0 -16
- package/dist/runtime/workers/base.js +0 -46
- package/dist/runtime/workers/base.js.map +0 -1
- package/dist/runtime/workers/cli.d.ts +0 -1
- package/dist/runtime/workers/cli.js +0 -2
- package/dist/runtime/workers/cli.js.map +0 -1
- package/dist/runtime/workers/job.d.ts +0 -20
- package/dist/runtime/workers/job.js +0 -170
- package/dist/runtime/workers/job.js.map +0 -1
- package/dist/vite/builder.d.ts +0 -5
- package/dist/vite/builder.js +0 -79
- package/dist/vite/builder.js.map +0 -1
- package/dist/vite/config.d.ts +0 -28
- package/dist/vite/config.js +0 -22
- package/dist/vite/config.js.map +0 -1
- package/dist/vite/plugins.d.ts +0 -2
- package/dist/vite/plugins.js +0 -43
- package/dist/vite/plugins.js.map +0 -1
- package/dist/vite/runners/worker.d.ts +0 -3
- package/dist/vite/runners/worker.js +0 -34
- package/dist/vite/runners/worker.js.map +0 -1
- package/dist/vite/server.d.ts +0 -3
- package/dist/vite/server.js +0 -36
- package/dist/vite/server.js.map +0 -1
- package/dist/vite/servers/main.d.ts +0 -8
- package/dist/vite/servers/main.js +0 -24
- package/dist/vite/servers/main.js.map +0 -1
- package/dist/vite/servers/worker.d.ts +0 -13
- package/dist/vite/servers/worker.js +0 -124
- package/dist/vite/servers/worker.js.map +0 -1
- package/src/cli.ts +0 -162
- package/src/codegen.ts +0 -30
- package/src/config.ts +0 -69
- package/src/entrypoints/cli.ts +0 -13
- package/src/entrypoints/main.ts +0 -317
- package/src/entrypoints/thread.ts +0 -223
- package/src/entrypoints/worker.ts +0 -174
- package/src/resolver.ts +0 -7
- package/src/runtime/application/index.ts +0 -1
- package/src/runtime/constants.ts +0 -13
- package/src/runtime/enums.ts +0 -12
- package/src/runtime/hooks.ts +0 -1
- package/src/runtime/index.ts +0 -29
- package/src/runtime/injectables.ts +0 -72
- package/src/runtime/jobs/job.ts +0 -467
- package/src/runtime/jobs/manager.ts +0 -454
- package/src/runtime/jobs/router.ts +0 -967
- package/src/runtime/jobs/runner.ts +0 -583
- package/src/runtime/jobs/step.ts +0 -66
- package/src/runtime/jobs/types.ts +0 -116
- package/src/runtime/metrics/metric.ts +0 -18
- package/src/runtime/metrics/registry.ts +0 -11
- package/src/runtime/metrics/server.ts +0 -69
- package/src/runtime/plugin.ts +0 -2
- package/src/runtime/runtime.ts +0 -103
- package/src/runtime/scheduler/index.ts +0 -39
- package/src/runtime/server/applications.ts +0 -264
- package/src/runtime/server/config.ts +0 -199
- package/src/runtime/server/environment.ts +0 -71
- package/src/runtime/server/error-policy.ts +0 -132
- package/src/runtime/server/hmr-coordinator.ts +0 -116
- package/src/runtime/server/jobs.ts +0 -266
- package/src/runtime/server/lifecycle.ts +0 -234
- package/src/runtime/server/managed-worker.ts +0 -546
- package/src/runtime/server/pool-manager.ts +0 -187
- package/src/runtime/server/proxy.ts +0 -119
- package/src/runtime/server/server.ts +0 -218
- package/src/runtime/server/types.ts +0 -32
- package/src/runtime/server/worker-pool.ts +0 -275
- package/src/runtime/store/index.ts +0 -30
- package/src/runtime/subscription/manager.ts +0 -310
- package/src/runtime/subscription/redis.ts +0 -157
- package/src/runtime/types.ts +0 -84
- package/src/runtime/workers/application.ts +0 -133
- package/src/runtime/workers/base.ts +0 -71
- package/src/runtime/workers/cli.ts +0 -0
- package/src/runtime/workers/job.ts +0 -142
- package/src/vite/builder.ts +0 -94
- package/src/vite/config.ts +0 -45
- package/src/vite/plugins.ts +0 -53
- package/src/vite/runners/worker.ts +0 -55
- package/src/vite/server.ts +0 -55
- package/src/vite/servers/main.ts +0 -41
- package/src/vite/servers/worker.ts +0 -177
package/LICENSE.md
CHANGED
|
@@ -4,4 +4,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
|
4
4
|
|
|
5
5
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
6
|
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,9 +1,49 @@
|
|
|
1
1
|
# NeemataJS - RPC application server for real-time applications (proof of concept)
|
|
2
2
|
|
|
3
3
|
### Built with following in mind:
|
|
4
|
+
|
|
4
5
|
- transport-agnostic (like WebSockets, WebTransport, .etc)
|
|
5
6
|
- format-agnostic (like JSON, MessagePack, BSON, .etc)
|
|
6
7
|
- binary data streaming and event subscriptions
|
|
7
8
|
- contract-based API
|
|
8
9
|
- end-to-end type safety
|
|
9
|
-
- CPU-intensive task execution on separate workers
|
|
10
|
+
- CPU-intensive task execution on separate workers
|
|
11
|
+
|
|
12
|
+
## Neem CLI draft
|
|
13
|
+
|
|
14
|
+
`neem build` compiles config, app entries, plugin entries, and plugin-declared
|
|
15
|
+
artifacts into `dist` by default. It writes an internal `neem.manifest.json`
|
|
16
|
+
with relative artifact paths.
|
|
17
|
+
|
|
18
|
+
`neem start` consumes an existing built output directory. It reads the manifest
|
|
19
|
+
for executable artifacts and serialized runtime config, registers built plugin
|
|
20
|
+
hooks, and starts app workers in production mode.
|
|
21
|
+
|
|
22
|
+
`neem dev` uses `.neem` by default as a build-like watched output directory. It
|
|
23
|
+
uses the same manifest shape as `start`, restarts app workers after successful
|
|
24
|
+
config/app rebuilds, reloads plugin hooks after plugin entry rebuilds, and keeps
|
|
25
|
+
existing workers alive on rebuild errors.
|
|
26
|
+
|
|
27
|
+
## Service integration tests
|
|
28
|
+
|
|
29
|
+
Service-backed package integration tests live beside package owners under
|
|
30
|
+
`packages/*/tests/integration`.
|
|
31
|
+
|
|
32
|
+
Local services:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
docker compose up -d --wait redis valkey kafka
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Run required service tests:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
NMTJS_REQUIRE_SERVICE_TESTS=1 \
|
|
42
|
+
REDIS_URL=redis://localhost:6379 \
|
|
43
|
+
VALKEY_URL=redis://localhost:6380 \
|
|
44
|
+
KAFKA_BROKERS=localhost:9092 \
|
|
45
|
+
pnpm run test:integration:services
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Without service env, these tests skip in normal package/root test runs. In CI,
|
|
49
|
+
`NMTJS_REQUIRE_SERVICE_TESTS=1` makes missing service env fail instead of skip.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,123 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[Symbol.asyncDispose]: () => Promise<void>;
|
|
17
|
-
}>;
|
|
18
|
-
}, import("@nmtjs/core").Scope.Global>;
|
|
19
|
-
dispose: import("@nmtjs/core").LazyInjectable<<T extends import("@nmtjs/core").AnyInjectable>(injectable: T, instance?: any) => Promise<void>, import("@nmtjs/core").Scope.Global>;
|
|
20
|
-
connection: import("@nmtjs/core").LazyInjectable<import("@nmtjs/gateway").GatewayConnection, import("@nmtjs/core").Scope.Connection>;
|
|
21
|
-
connectionId: import("@nmtjs/core").LazyInjectable<string, import("@nmtjs/core").Scope.Connection>;
|
|
22
|
-
connectionData: import("@nmtjs/core").LazyInjectable<unknown, import("@nmtjs/core").Scope.Connection>;
|
|
23
|
-
connectionAbortSignal: import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Connection>;
|
|
24
|
-
rpcClientAbortSignal: import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Call>;
|
|
25
|
-
rpcStreamAbortSignal: import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Call>;
|
|
26
|
-
rpcAbortSignal: import("@nmtjs/core").FactoryInjectable<AbortSignal, {
|
|
27
|
-
rpcClientAbortSignal: import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Call>;
|
|
28
|
-
connectionAbortSignal: import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Connection>;
|
|
29
|
-
rpcStreamAbortSignal: import("@nmtjs/core").DependencyOptional<import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Call>>;
|
|
30
|
-
}, import("@nmtjs/core").Scope.Global, AbortSignal>;
|
|
31
|
-
createBlob: import("@nmtjs/core").LazyInjectable<(source: import("stream").Readable | globalThis.ReadableStream | File | Blob | string | ArrayBuffer | Uint8Array, metadata?: import("@nmtjs/protocol").ProtocolBlobMetadata) => import("@nmtjs/protocol").ProtocolBlobInterface, import("@nmtjs/core").Scope.Call>;
|
|
32
|
-
consumeBlob: import("@nmtjs/core").LazyInjectable<(blob: import("@nmtjs/protocol").ProtocolBlobInterface) => import("@nmtjs/protocol/server").ProtocolClientStream, import("@nmtjs/core").Scope.Call>;
|
|
33
|
-
subscriptionAdapter: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").SubscriptionAdapterType, import("@nmtjs/core").Scope.Global>;
|
|
34
|
-
publish: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").PublishFn, import("@nmtjs/core").Scope.Global>;
|
|
35
|
-
subscribe: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").SubscribeFn, import("@nmtjs/core").Scope.Global>;
|
|
36
|
-
jobManager: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").JobManagerInstance, import("@nmtjs/core").Scope.Global>;
|
|
37
|
-
storeConfig: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").ServerStoreConfig, import("@nmtjs/core").Scope.Global>;
|
|
38
|
-
workerType: import("@nmtjs/core").LazyInjectable<import("./runtime/enums.ts").WorkerType, import("@nmtjs/core").Scope.Global>;
|
|
39
|
-
jobWorkerPool: import("@nmtjs/core").LazyInjectable<string, import("@nmtjs/core").Scope.Global>;
|
|
40
|
-
jobAbortSignal: import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Global>;
|
|
41
|
-
saveJobProgress: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").SaveJobProgress, import("@nmtjs/core").Scope.Global>;
|
|
42
|
-
currentJobInfo: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").JobExecutionContext, import("@nmtjs/core").Scope.Global>;
|
|
43
|
-
}>;
|
|
44
|
-
const inject: Readonly<{
|
|
45
|
-
logger: ((label: string) => import("@nmtjs/core").FactoryInjectable<import("pino").Logger, {
|
|
46
|
-
logger: import("@nmtjs/core").LazyInjectable<import("pino").Logger>;
|
|
47
|
-
}>) & import("@nmtjs/core").LazyInjectable<import("pino").Logger, import("@nmtjs/core").Scope.Global>;
|
|
48
|
-
inject: import("@nmtjs/core").LazyInjectable<(<T extends import("@nmtjs/core").AnyInjectable>(injectable: T, context: { [K in keyof T["dependencies"]]?: import("@nmtjs/core").ResolveInjectableType<T["dependencies"][K]> | import("@nmtjs/core").AnyInjectable<import("@nmtjs/core").ResolveInjectableType<T["dependencies"][K]>> | undefined; }, scope?: Exclude<import("@nmtjs/core").Scope, import("@nmtjs/core").Scope.Transient>) => Promise<import("@nmtjs/core").ResolveInjectableType<T>>) & {
|
|
49
|
-
explicit: <T extends import("@nmtjs/core").AnyInjectable>(injectable: T, context: { [K in keyof T["dependencies"]]?: import("@nmtjs/core").ResolveInjectableType<T["dependencies"][K]> | import("@nmtjs/core").AnyInjectable<import("@nmtjs/core").ResolveInjectableType<T["dependencies"][K]>> | undefined; }, scope?: Exclude<import("@nmtjs/core").Scope, import("@nmtjs/core").Scope.Transient>) => Promise<{
|
|
50
|
-
instance: Awaited<import("@nmtjs/core").ResolveInjectableType<T>>;
|
|
51
|
-
[Symbol.asyncDispose]: () => Promise<void>;
|
|
52
|
-
}>;
|
|
53
|
-
}, import("@nmtjs/core").Scope.Global>;
|
|
54
|
-
dispose: import("@nmtjs/core").LazyInjectable<<T extends import("@nmtjs/core").AnyInjectable>(injectable: T, instance?: any) => Promise<void>, import("@nmtjs/core").Scope.Global>;
|
|
55
|
-
connection: import("@nmtjs/core").LazyInjectable<import("@nmtjs/gateway").GatewayConnection, import("@nmtjs/core").Scope.Connection>;
|
|
56
|
-
connectionId: import("@nmtjs/core").LazyInjectable<string, import("@nmtjs/core").Scope.Connection>;
|
|
57
|
-
connectionData: import("@nmtjs/core").LazyInjectable<unknown, import("@nmtjs/core").Scope.Connection>;
|
|
58
|
-
connectionAbortSignal: import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Connection>;
|
|
59
|
-
rpcClientAbortSignal: import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Call>;
|
|
60
|
-
rpcStreamAbortSignal: import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Call>;
|
|
61
|
-
rpcAbortSignal: import("@nmtjs/core").FactoryInjectable<AbortSignal, {
|
|
62
|
-
rpcClientAbortSignal: import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Call>;
|
|
63
|
-
connectionAbortSignal: import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Connection>;
|
|
64
|
-
rpcStreamAbortSignal: import("@nmtjs/core").DependencyOptional<import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Call>>;
|
|
65
|
-
}, import("@nmtjs/core").Scope.Global, AbortSignal>;
|
|
66
|
-
createBlob: import("@nmtjs/core").LazyInjectable<(source: import("stream").Readable | globalThis.ReadableStream | File | Blob | string | ArrayBuffer | Uint8Array, metadata?: import("@nmtjs/protocol").ProtocolBlobMetadata) => import("@nmtjs/protocol").ProtocolBlobInterface, import("@nmtjs/core").Scope.Call>;
|
|
67
|
-
consumeBlob: import("@nmtjs/core").LazyInjectable<(blob: import("@nmtjs/protocol").ProtocolBlobInterface) => import("@nmtjs/protocol/server").ProtocolClientStream, import("@nmtjs/core").Scope.Call>;
|
|
68
|
-
subscriptionAdapter: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").SubscriptionAdapterType, import("@nmtjs/core").Scope.Global>;
|
|
69
|
-
publish: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").PublishFn, import("@nmtjs/core").Scope.Global>;
|
|
70
|
-
subscribe: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").SubscribeFn, import("@nmtjs/core").Scope.Global>;
|
|
71
|
-
jobManager: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").JobManagerInstance, import("@nmtjs/core").Scope.Global>;
|
|
72
|
-
storeConfig: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").ServerStoreConfig, import("@nmtjs/core").Scope.Global>;
|
|
73
|
-
workerType: import("@nmtjs/core").LazyInjectable<import("./runtime/enums.ts").WorkerType, import("@nmtjs/core").Scope.Global>;
|
|
74
|
-
jobWorkerPool: import("@nmtjs/core").LazyInjectable<string, import("@nmtjs/core").Scope.Global>;
|
|
75
|
-
jobAbortSignal: import("@nmtjs/core").LazyInjectable<AbortSignal, import("@nmtjs/core").Scope.Global>;
|
|
76
|
-
saveJobProgress: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").SaveJobProgress, import("@nmtjs/core").Scope.Global>;
|
|
77
|
-
currentJobInfo: import("@nmtjs/core").LazyInjectable<import("./runtime/index.ts").JobExecutionContext, import("@nmtjs/core").Scope.Global>;
|
|
78
|
-
}>;
|
|
79
|
-
const transport: typeof createTransport;
|
|
80
|
-
const plugin: typeof createPlugin;
|
|
81
|
-
const logging: Readonly<{
|
|
82
|
-
console: import("@nmtjs/core").CreateConsolePrettyDestination;
|
|
83
|
-
}>;
|
|
84
|
-
const value: typeof createValueInjectable;
|
|
85
|
-
const lazy: typeof createLazyInjectable;
|
|
86
|
-
const factory: typeof createFactoryInjectable;
|
|
87
|
-
const rootRouter: typeof createRootRouter;
|
|
88
|
-
const router: typeof createRouter;
|
|
89
|
-
const contractRouter: typeof createContractRouter;
|
|
90
|
-
const jobRouter: typeof createJobsRouter;
|
|
91
|
-
const jobRouterOperation: typeof createJobRouterOperation;
|
|
92
|
-
const procedure: typeof createProcedure;
|
|
93
|
-
const contractProcedure: typeof createContractProcedure;
|
|
94
|
-
const middleware: typeof createMiddleware;
|
|
95
|
-
const meta: typeof createMeta;
|
|
96
|
-
const config: import("@nmtjs/core").Meta<import("@nmtjs/application").RuntimeConfig, import("@nmtjs/core").MetadataKind.STATIC, Readonly<{
|
|
97
|
-
callId: string;
|
|
98
|
-
connection: import("@nmtjs/gateway").GatewayConnection;
|
|
99
|
-
container: import("@nmtjs/core").Container;
|
|
100
|
-
path: readonly import("@nmtjs/application").ApiMetaRouteContext[];
|
|
101
|
-
procedure: import("@nmtjs/application").ApiMetaProcedureContext;
|
|
102
|
-
}>>;
|
|
103
|
-
const guard: typeof createGuard;
|
|
104
|
-
const filter: typeof createFilter;
|
|
105
|
-
const job: typeof createJob;
|
|
106
|
-
const step: typeof createStep;
|
|
107
|
-
const hook: typeof createHook;
|
|
108
|
-
const metrics: Readonly<{
|
|
109
|
-
counter: (config: never) => import("@nmtjs/prom-client").Counter<any>;
|
|
110
|
-
gauge: (config: never) => import("@nmtjs/prom-client").Gauge<any>;
|
|
111
|
-
histogram: (config: never) => import("@nmtjs/prom-client").Histogram<any>;
|
|
112
|
-
summary: (config: never) => import("@nmtjs/prom-client").Summary<any>;
|
|
113
|
-
}>;
|
|
114
|
-
}
|
|
115
|
-
export { c } from '@nmtjs/contract';
|
|
116
|
-
export { MetadataKind, Scope } from '@nmtjs/core';
|
|
117
|
-
export { type ConnectionIdentityType, GatewayHook, ProxyableTransportType, } from '@nmtjs/gateway';
|
|
1
|
+
import { CoreInjectables } from '@nmtjs/core';
|
|
2
|
+
import { GatewayInjectables } from '@nmtjs/gateway';
|
|
3
|
+
import { createCounterMetric, createGaugeMetric, createHistogramMetric, createSummaryMetric } from '@nmtjs/metrics';
|
|
4
|
+
import { PubSubInjectables } from '@nmtjs/pubsub';
|
|
5
|
+
type Injectables = Readonly<typeof CoreInjectables & typeof GatewayInjectables & typeof PubSubInjectables>;
|
|
6
|
+
type Metrics = Readonly<{
|
|
7
|
+
counter: typeof createCounterMetric;
|
|
8
|
+
gauge: typeof createGaugeMetric;
|
|
9
|
+
histogram: typeof createHistogramMetric;
|
|
10
|
+
summary: typeof createSummaryMetric;
|
|
11
|
+
}>;
|
|
12
|
+
export { ApiError, createContractProcedure as contractProcedure, createContractRouter as contractRouter, createFilter as filter, createGuard as guard, createHook as hook, createMeta as meta, createMiddleware as middleware, createPlugin as plugin, createProcedure as procedure, createRootRouter as rootRouter, createRouter as router, defineApplication as app, defineApplicationHost as host, implement as implementRouter, LifecycleHook, } from '@nmtjs/application';
|
|
13
|
+
export { blobType, c } from '@nmtjs/contract';
|
|
14
|
+
export { CoreInjectables, createFactoryInjectable as factory, createHandler as handler, createLazyInjectable as lazy, createValueInjectable as value, MetadataKind, optional, Scope, } from '@nmtjs/core';
|
|
15
|
+
export { type ConnectionIdentityType, createTransport as transport, GatewayHook, GatewayInjectables, ProxyableTransportType, } from '@nmtjs/gateway';
|
|
118
16
|
export { ConnectionType, ErrorCode, ProtocolBlob } from '@nmtjs/protocol';
|
|
17
|
+
export { createPubSubPlugin as pubsubPlugin, PubSubInjectables, } from '@nmtjs/pubsub';
|
|
119
18
|
export { t } from '@nmtjs/type';
|
|
120
|
-
export {
|
|
121
|
-
export
|
|
122
|
-
|
|
123
|
-
|
|
19
|
+
export { defineSchedule as schedule, defineTask as task, defineWorkflow as workflow, implementTask, implementWorkflow, WorkflowAttemptTimeoutError, } from '@nmtjs/workflows';
|
|
20
|
+
export declare const logging: Readonly<{
|
|
21
|
+
console: import("@nmtjs/core").CreateConsolePrettyDestination;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const metrics: Metrics;
|
|
24
|
+
export declare const inject: Injectables;
|
package/dist/index.js
CHANGED
|
@@ -1,56 +1,27 @@
|
|
|
1
|
-
import { CoreInjectables, createConsolePrettyDestination
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
neemata.host = defineApplicationHost;
|
|
10
|
-
neemata.server = defineServer;
|
|
11
|
-
neemata.injectables = Object.freeze({
|
|
12
|
-
...CoreInjectables,
|
|
13
|
-
...GatewayInjectables,
|
|
14
|
-
...RuntimeInjectables,
|
|
15
|
-
});
|
|
16
|
-
neemata.inject = neemata.injectables;
|
|
17
|
-
neemata.transport = createTransport;
|
|
18
|
-
neemata.plugin = createPlugin;
|
|
19
|
-
neemata.logging = Object.freeze({
|
|
20
|
-
console: createConsolePrettyDestination,
|
|
21
|
-
});
|
|
22
|
-
neemata.value = createValueInjectable;
|
|
23
|
-
neemata.lazy = createLazyInjectable;
|
|
24
|
-
neemata.factory = createFactoryInjectable;
|
|
25
|
-
neemata.rootRouter = createRootRouter;
|
|
26
|
-
neemata.router = createRouter;
|
|
27
|
-
neemata.contractRouter = createContractRouter;
|
|
28
|
-
neemata.jobRouter = createJobsRouter;
|
|
29
|
-
neemata.jobRouterOperation = createJobRouterOperation;
|
|
30
|
-
neemata.procedure = createProcedure;
|
|
31
|
-
neemata.contractProcedure = createContractProcedure;
|
|
32
|
-
neemata.middleware = createMiddleware;
|
|
33
|
-
neemata.meta = createMeta;
|
|
34
|
-
neemata.config = runtimeConfig;
|
|
35
|
-
neemata.guard = createGuard;
|
|
36
|
-
neemata.filter = createFilter;
|
|
37
|
-
neemata.job = createJob;
|
|
38
|
-
neemata.step = createStep;
|
|
39
|
-
neemata.hook = createHook;
|
|
40
|
-
neemata.metrics = Object.freeze({
|
|
41
|
-
counter: createCounterMetric,
|
|
42
|
-
gauge: createGaugeMetric,
|
|
43
|
-
histogram: createHistogramMetric,
|
|
44
|
-
summary: createSummaryMetric,
|
|
45
|
-
});
|
|
46
|
-
})(neemata || (neemata = {}));
|
|
47
|
-
export { c } from '@nmtjs/contract';
|
|
48
|
-
export { MetadataKind, Scope } from '@nmtjs/core';
|
|
49
|
-
export { GatewayHook, ProxyableTransportType, } from '@nmtjs/gateway';
|
|
1
|
+
import { CoreInjectables, createConsolePrettyDestination } from '@nmtjs/core';
|
|
2
|
+
import { GatewayInjectables } from '@nmtjs/gateway';
|
|
3
|
+
import { createCounterMetric, createGaugeMetric, createHistogramMetric, createSummaryMetric, } from '@nmtjs/metrics';
|
|
4
|
+
import { PubSubInjectables } from '@nmtjs/pubsub';
|
|
5
|
+
export { ApiError, createContractProcedure as contractProcedure, createContractRouter as contractRouter, createFilter as filter, createGuard as guard, createHook as hook, createMeta as meta, createMiddleware as middleware, createPlugin as plugin, createProcedure as procedure, createRootRouter as rootRouter, createRouter as router, defineApplication as app, defineApplicationHost as host, implement as implementRouter, LifecycleHook, } from '@nmtjs/application';
|
|
6
|
+
export { blobType, c } from '@nmtjs/contract';
|
|
7
|
+
export { CoreInjectables, createFactoryInjectable as factory, createHandler as handler, createLazyInjectable as lazy, createValueInjectable as value, MetadataKind, optional, Scope, } from '@nmtjs/core';
|
|
8
|
+
export { createTransport as transport, GatewayHook, GatewayInjectables, ProxyableTransportType, } from '@nmtjs/gateway';
|
|
50
9
|
export { ConnectionType, ErrorCode, ProtocolBlob } from '@nmtjs/protocol';
|
|
10
|
+
export { createPubSubPlugin as pubsubPlugin, PubSubInjectables, } from '@nmtjs/pubsub';
|
|
51
11
|
export { t } from '@nmtjs/type';
|
|
52
|
-
export {
|
|
53
|
-
export
|
|
54
|
-
|
|
55
|
-
|
|
12
|
+
export { defineSchedule as schedule, defineTask as task, defineWorkflow as workflow, implementTask, implementWorkflow, WorkflowAttemptTimeoutError, } from '@nmtjs/workflows';
|
|
13
|
+
export const logging = Object.freeze({
|
|
14
|
+
console: createConsolePrettyDestination,
|
|
15
|
+
});
|
|
16
|
+
export const metrics = Object.freeze({
|
|
17
|
+
counter: createCounterMetric,
|
|
18
|
+
gauge: createGaugeMetric,
|
|
19
|
+
histogram: createHistogramMetric,
|
|
20
|
+
summary: createSummaryMetric,
|
|
21
|
+
});
|
|
22
|
+
export const inject = Object.freeze({
|
|
23
|
+
...CoreInjectables,
|
|
24
|
+
...GatewayInjectables,
|
|
25
|
+
...PubSubInjectables,
|
|
26
|
+
});
|
|
56
27
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAajD,OAAO,EACL,QAAQ,EACR,uBAAuB,IAAI,iBAAiB,EAC5C,oBAAoB,IAAI,cAAc,EACtC,YAAY,IAAI,MAAM,EACtB,WAAW,IAAI,KAAK,EACpB,UAAU,IAAI,IAAI,EAClB,UAAU,IAAI,IAAI,EAClB,gBAAgB,IAAI,UAAU,EAC9B,YAAY,IAAI,MAAM,EACtB,eAAe,IAAI,SAAS,EAC5B,gBAAgB,IAAI,UAAU,EAC9B,YAAY,IAAI,MAAM,EACtB,iBAAiB,IAAI,GAAG,EACxB,qBAAqB,IAAI,IAAI,EAC7B,SAAS,IAAI,eAAe,EAC5B,aAAa,GACd,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EACL,eAAe,EACf,uBAAuB,IAAI,OAAO,EAClC,aAAa,IAAI,OAAO,EACxB,oBAAoB,IAAI,IAAI,EAC5B,qBAAqB,IAAI,KAAK,EAC9B,YAAY,EACZ,QAAQ,EACR,KAAK,GACN,MAAM,aAAa,CAAA;AACpB,OAAO,EAEL,eAAe,IAAI,SAAS,EAC5B,WAAW,EACX,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,EACL,kBAAkB,IAAI,YAAY,EAClC,iBAAiB,GAClB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAA;AAC/B,OAAO,EACL,cAAc,IAAI,QAAQ,EAC1B,UAAU,IAAI,IAAI,EAClB,cAAc,IAAI,QAAQ,EAC1B,aAAa,EACb,iBAAiB,EACjB,2BAA2B,GAC5B,MAAM,kBAAkB,CAAA;AAEzB,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;IACnC,OAAO,EAAE,8BAA8B;CACxC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,OAAO,GAAY,MAAM,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,mBAAmB;IAC5B,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,qBAAqB;IAChC,OAAO,EAAE,mBAAmB;CAC7B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,MAAM,GAAgB,MAAM,CAAC,MAAM,CAAC;IAC/C,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,iBAAiB;CACrB,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,86 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmtjs",
|
|
3
|
-
"description": "Neemata framework
|
|
3
|
+
"description": "Neemata framework umbrella package.",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"bin": {
|
|
6
|
-
"neemata": "./bin/cli.js"
|
|
7
|
-
},
|
|
8
5
|
"exports": {
|
|
9
6
|
".": {
|
|
10
7
|
"types": "./dist/index.d.ts",
|
|
11
8
|
"import": "./dist/index.js",
|
|
12
9
|
"module-sync": "./dist/index.js"
|
|
13
|
-
},
|
|
14
|
-
"./cli": {
|
|
15
|
-
"types": "./dist/cli.d.ts",
|
|
16
|
-
"import": "./dist/cli.js",
|
|
17
|
-
"module-sync": "./dist/cli.js"
|
|
18
|
-
},
|
|
19
|
-
"./config": {
|
|
20
|
-
"types": "./dist/config.d.ts",
|
|
21
|
-
"import": "./dist/config.js",
|
|
22
|
-
"module-sync": "./dist/config.js"
|
|
23
|
-
},
|
|
24
|
-
"./runtime": {
|
|
25
|
-
"types": "./dist/runtime/index.d.ts",
|
|
26
|
-
"import": "./dist/runtime/index.js",
|
|
27
|
-
"module-sync": "./dist/runtime/index.js"
|
|
28
|
-
},
|
|
29
|
-
"./runtime/types": {
|
|
30
|
-
"types": "./dist/runtime/types.d.ts",
|
|
31
|
-
"import": "./dist/runtime/types.js",
|
|
32
|
-
"module-sync": "./dist/runtime/types.js"
|
|
33
10
|
}
|
|
34
11
|
},
|
|
35
12
|
"dependencies": {
|
|
36
|
-
"@nmtjs/
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"@nmtjs/common": "0.16.0",
|
|
46
|
-
"@nmtjs/contract": "0.16.0",
|
|
47
|
-
"@nmtjs/application": "0.16.0",
|
|
48
|
-
"@nmtjs/core": "0.16.0",
|
|
49
|
-
"@nmtjs/gateway": "0.16.0",
|
|
50
|
-
"@nmtjs/json-format": "0.16.0",
|
|
51
|
-
"@nmtjs/http-transport": "0.16.0",
|
|
52
|
-
"@nmtjs/protocol": "0.16.0",
|
|
53
|
-
"@nmtjs/type": "0.16.0",
|
|
54
|
-
"@nmtjs/msgpack-format": "0.16.0",
|
|
55
|
-
"@nmtjs/ws-transport": "0.16.0"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@nmtjs/proxy": "1.0.0-beta.6",
|
|
59
|
-
"pino": "10.3.1",
|
|
60
|
-
"zod": "^4.0.0"
|
|
61
|
-
},
|
|
62
|
-
"peerDependencies": {
|
|
63
|
-
"@nmtjs/proxy": "1.0.0-beta.6",
|
|
64
|
-
"zod": "^4.0.0"
|
|
65
|
-
},
|
|
66
|
-
"peerDependenciesMeta": {
|
|
67
|
-
"@nmtjs/proxy": {
|
|
68
|
-
"optional": true
|
|
69
|
-
}
|
|
13
|
+
"@nmtjs/application": "0.17.0-beta.1",
|
|
14
|
+
"@nmtjs/gateway": "0.17.0-beta.1",
|
|
15
|
+
"@nmtjs/core": "0.17.0-beta.1",
|
|
16
|
+
"@nmtjs/contract": "0.17.0-beta.1",
|
|
17
|
+
"@nmtjs/protocol": "0.17.0-beta.1",
|
|
18
|
+
"@nmtjs/pubsub": "0.17.0-beta.1",
|
|
19
|
+
"@nmtjs/workflows": "0.17.0-beta.1",
|
|
20
|
+
"@nmtjs/metrics": "0.17.0-beta.1",
|
|
21
|
+
"@nmtjs/type": "0.17.0-beta.1"
|
|
70
22
|
},
|
|
71
23
|
"files": [
|
|
72
|
-
"bin",
|
|
73
24
|
"dist",
|
|
74
25
|
"src",
|
|
75
26
|
"LICENSE.md",
|
|
76
27
|
"README.md"
|
|
77
28
|
],
|
|
78
|
-
"version": "0.
|
|
29
|
+
"version": "0.17.0-beta.1",
|
|
79
30
|
"repository": {
|
|
80
31
|
"type": "git",
|
|
81
32
|
"url": "https://github.com/neematajs/neemata"
|
|
82
|
-
},
|
|
83
|
-
"scripts": {
|
|
84
|
-
"clean-build": "rm -rf ./dist"
|
|
85
33
|
}
|
|
86
34
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,108 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
CoreInjectables,
|
|
6
|
-
createConsolePrettyDestination,
|
|
7
|
-
createFactoryInjectable,
|
|
8
|
-
createLazyInjectable,
|
|
9
|
-
createValueInjectable,
|
|
10
|
-
} from '@nmtjs/core'
|
|
11
|
-
import { createTransport, GatewayInjectables } from '@nmtjs/gateway'
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
config as runtimeConfig,
|
|
15
|
-
createContractProcedure,
|
|
16
|
-
createContractRouter,
|
|
17
|
-
createFilter,
|
|
18
|
-
defineApplicationHost,
|
|
19
|
-
createGuard,
|
|
20
|
-
createHook,
|
|
21
|
-
createMeta,
|
|
22
|
-
createMiddleware,
|
|
23
|
-
createPlugin,
|
|
24
|
-
createProcedure,
|
|
25
|
-
createRootRouter,
|
|
26
|
-
createRouter,
|
|
27
|
-
defineApplication,
|
|
28
|
-
} from '@nmtjs/application'
|
|
29
|
-
import {
|
|
30
|
-
createJob,
|
|
31
|
-
createJobRouterOperation,
|
|
32
|
-
createJobsRouter,
|
|
33
|
-
createStep,
|
|
34
|
-
defineServer,
|
|
35
|
-
RuntimeInjectables,
|
|
36
|
-
} from './runtime/index.ts'
|
|
1
|
+
import { CoreInjectables, createConsolePrettyDestination } from '@nmtjs/core'
|
|
2
|
+
import { GatewayInjectables } from '@nmtjs/gateway'
|
|
37
3
|
import {
|
|
38
4
|
createCounterMetric,
|
|
39
5
|
createGaugeMetric,
|
|
40
6
|
createHistogramMetric,
|
|
41
7
|
createSummaryMetric,
|
|
42
|
-
} from '
|
|
8
|
+
} from '@nmtjs/metrics'
|
|
9
|
+
import { PubSubInjectables } from '@nmtjs/pubsub'
|
|
10
|
+
|
|
11
|
+
type Injectables = Readonly<
|
|
12
|
+
typeof CoreInjectables & typeof GatewayInjectables & typeof PubSubInjectables
|
|
13
|
+
>
|
|
43
14
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
...GatewayInjectables,
|
|
51
|
-
...RuntimeInjectables,
|
|
52
|
-
})
|
|
53
|
-
export const inject = injectables
|
|
54
|
-
export const transport = createTransport
|
|
55
|
-
export const plugin = createPlugin
|
|
56
|
-
export const logging = Object.freeze({
|
|
57
|
-
console: createConsolePrettyDestination,
|
|
58
|
-
})
|
|
59
|
-
export const value = createValueInjectable
|
|
60
|
-
export const lazy = createLazyInjectable
|
|
61
|
-
export const factory = createFactoryInjectable
|
|
62
|
-
export const rootRouter = createRootRouter
|
|
63
|
-
export const router = createRouter
|
|
64
|
-
export const contractRouter = createContractRouter
|
|
65
|
-
export const jobRouter = createJobsRouter
|
|
66
|
-
export const jobRouterOperation = createJobRouterOperation
|
|
67
|
-
export const procedure = createProcedure
|
|
68
|
-
export const contractProcedure = createContractProcedure
|
|
69
|
-
export const middleware = createMiddleware
|
|
70
|
-
export const meta = createMeta
|
|
71
|
-
export const config = runtimeConfig
|
|
72
|
-
export const guard = createGuard
|
|
73
|
-
export const filter = createFilter
|
|
74
|
-
export const job = createJob
|
|
75
|
-
export const step = createStep
|
|
76
|
-
export const hook = createHook
|
|
77
|
-
export const metrics = Object.freeze({
|
|
78
|
-
counter: createCounterMetric,
|
|
79
|
-
gauge: createGaugeMetric,
|
|
80
|
-
histogram: createHistogramMetric,
|
|
81
|
-
summary: createSummaryMetric,
|
|
82
|
-
})
|
|
83
|
-
}
|
|
15
|
+
type Metrics = Readonly<{
|
|
16
|
+
counter: typeof createCounterMetric
|
|
17
|
+
gauge: typeof createGaugeMetric
|
|
18
|
+
histogram: typeof createHistogramMetric
|
|
19
|
+
summary: typeof createSummaryMetric
|
|
20
|
+
}>
|
|
84
21
|
|
|
85
|
-
export {
|
|
86
|
-
|
|
22
|
+
export {
|
|
23
|
+
ApiError,
|
|
24
|
+
createContractProcedure as contractProcedure,
|
|
25
|
+
createContractRouter as contractRouter,
|
|
26
|
+
createFilter as filter,
|
|
27
|
+
createGuard as guard,
|
|
28
|
+
createHook as hook,
|
|
29
|
+
createMeta as meta,
|
|
30
|
+
createMiddleware as middleware,
|
|
31
|
+
createPlugin as plugin,
|
|
32
|
+
createProcedure as procedure,
|
|
33
|
+
createRootRouter as rootRouter,
|
|
34
|
+
createRouter as router,
|
|
35
|
+
defineApplication as app,
|
|
36
|
+
defineApplicationHost as host,
|
|
37
|
+
implement as implementRouter,
|
|
38
|
+
LifecycleHook,
|
|
39
|
+
} from '@nmtjs/application'
|
|
40
|
+
export { blobType, c } from '@nmtjs/contract'
|
|
41
|
+
export {
|
|
42
|
+
CoreInjectables,
|
|
43
|
+
createFactoryInjectable as factory,
|
|
44
|
+
createHandler as handler,
|
|
45
|
+
createLazyInjectable as lazy,
|
|
46
|
+
createValueInjectable as value,
|
|
47
|
+
MetadataKind,
|
|
48
|
+
optional,
|
|
49
|
+
Scope,
|
|
50
|
+
} from '@nmtjs/core'
|
|
87
51
|
export {
|
|
88
52
|
type ConnectionIdentityType,
|
|
53
|
+
createTransport as transport,
|
|
89
54
|
GatewayHook,
|
|
55
|
+
GatewayInjectables,
|
|
90
56
|
ProxyableTransportType,
|
|
91
57
|
} from '@nmtjs/gateway'
|
|
92
58
|
export { ConnectionType, ErrorCode, ProtocolBlob } from '@nmtjs/protocol'
|
|
59
|
+
export {
|
|
60
|
+
createPubSubPlugin as pubsubPlugin,
|
|
61
|
+
PubSubInjectables,
|
|
62
|
+
} from '@nmtjs/pubsub'
|
|
93
63
|
export { t } from '@nmtjs/type'
|
|
94
|
-
|
|
95
64
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
65
|
+
defineSchedule as schedule,
|
|
66
|
+
defineTask as task,
|
|
67
|
+
defineWorkflow as workflow,
|
|
68
|
+
implementTask,
|
|
69
|
+
implementWorkflow,
|
|
70
|
+
WorkflowAttemptTimeoutError,
|
|
71
|
+
} from '@nmtjs/workflows'
|
|
101
72
|
|
|
102
|
-
export {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
73
|
+
export const logging = Object.freeze({
|
|
74
|
+
console: createConsolePrettyDestination,
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
export const metrics: Metrics = Object.freeze({
|
|
78
|
+
counter: createCounterMetric,
|
|
79
|
+
gauge: createGaugeMetric,
|
|
80
|
+
histogram: createHistogramMetric,
|
|
81
|
+
summary: createSummaryMetric,
|
|
82
|
+
})
|
|
106
83
|
|
|
107
|
-
export
|
|
108
|
-
|
|
84
|
+
export const inject: Injectables = Object.freeze({
|
|
85
|
+
...CoreInjectables,
|
|
86
|
+
...GatewayInjectables,
|
|
87
|
+
...PubSubInjectables,
|
|
88
|
+
})
|
package/bin/cli.js
DELETED
package/dist/cli.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|