@enkaku/client 0.17.1 → 0.18.0
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/lib/client.d.ts +5 -5
- package/lib/client.js +11 -8
- package/lib/events.d.ts +1 -1
- package/lib/safe-write.js +1 -1
- package/package.json +12 -12
package/lib/client.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Disposer } from '@enkaku/async';
|
|
2
|
-
import { type Logger } from '@enkaku/log';
|
|
3
|
-
import { type Tracer } from '@enkaku/otel';
|
|
4
1
|
import type { AnyProcedureDefinition, AnyRequestProcedureDefinition, ChannelProcedureDefinition, ClientTransportOf, DataOf, EventProcedureDefinition, ProtocolDefinition, RequestProcedureDefinition, RequestType, ReturnOf, StreamProcedureDefinition } from '@enkaku/protocol';
|
|
5
|
-
import { type
|
|
6
|
-
import {
|
|
2
|
+
import { type Identity } from '@kokuin/token';
|
|
3
|
+
import { Disposer } from '@sozai/async';
|
|
4
|
+
import { type Logger } from '@sozai/log';
|
|
5
|
+
import { type Tracer } from '@sozai/otel';
|
|
6
|
+
import { type Runtime } from '@sozai/runtime';
|
|
7
7
|
import type { ClientEmitter } from './events.js';
|
|
8
8
|
type FilterNever<T> = {
|
|
9
9
|
[K in keyof T as T[K] extends never ? never : K]: T[K];
|
package/lib/client.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { createUnsignedToken, isSigningIdentity } from '@kokuin/token';
|
|
2
|
+
import { Disposer, defer } from '@sozai/async';
|
|
3
|
+
import { EventEmitter } from '@sozai/event';
|
|
4
|
+
import { getLogger } from '@sozai/log';
|
|
5
|
+
import { AttributeKeys, createTracer, injectTraceContext as otelInjectTraceContext, SpanNames, SpanStatusCode, setSpanOnContext, withActiveContext, withSpan } from '@sozai/otel';
|
|
6
|
+
import { createRuntime } from '@sozai/runtime';
|
|
7
|
+
import { createPipe, writeTo } from '@sozai/stream';
|
|
8
8
|
import { RequestError } from './error.js';
|
|
9
9
|
import { safeWrite } from './safe-write.js';
|
|
10
10
|
const defaultTracer = createTracer('client');
|
|
@@ -109,7 +109,10 @@ export class Client extends Disposer {
|
|
|
109
109
|
});
|
|
110
110
|
this.#handleTransportDisposed = params.handleTransportDisposed;
|
|
111
111
|
this.#handleTransportError = params.handleTransportError;
|
|
112
|
-
this.#logger = params.logger ??
|
|
112
|
+
this.#logger = params.logger ?? getLogger([
|
|
113
|
+
'enkaku',
|
|
114
|
+
'client'
|
|
115
|
+
], {
|
|
113
116
|
clientID: this.#runtime.getRandomID()
|
|
114
117
|
});
|
|
115
118
|
this.#tracer = params.tracer ?? defaultTracer;
|
package/lib/events.d.ts
CHANGED
package/lib/safe-write.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enkaku/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://enkaku.dev",
|
|
6
6
|
"description": "Enkaku RPC client",
|
|
@@ -26,22 +26,22 @@
|
|
|
26
26
|
],
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
29
|
+
"@sozai/async": "^0.1.0",
|
|
30
|
+
"@sozai/event": "^0.1.0",
|
|
31
|
+
"@sozai/execution": "^0.1.0",
|
|
32
|
+
"@sozai/log": "^0.1.0",
|
|
33
|
+
"@sozai/runtime": "^0.1.0",
|
|
34
|
+
"@sozai/otel": "^0.1.0",
|
|
35
|
+
"@sozai/stream": "^0.1.0",
|
|
36
|
+
"@kokuin/token": "^0.1.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@enkaku/
|
|
40
|
-
"@enkaku/
|
|
39
|
+
"@enkaku/protocol": "^0.18.0",
|
|
40
|
+
"@enkaku/transport": "^0.18.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build:clean": "del lib",
|
|
44
|
-
"build:js": "swc src -d ./lib --config-file ../../swc.json --strip-leading-paths",
|
|
44
|
+
"build:js": "swc src -d ./lib --config-file ../../node_modules/@kigu/dev/swc.json --strip-leading-paths",
|
|
45
45
|
"build:types": "tsc --emitDeclarationOnly --skipLibCheck",
|
|
46
46
|
"build": "pnpm run build:clean && pnpm run build:js && pnpm run build:types",
|
|
47
47
|
"test:types": "tsc --noEmit --skipLibCheck -p tsconfig.test.json",
|