vovk 3.0.0-draft.149 → 3.0.0-draft.151

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.
@@ -78,6 +78,7 @@ const createRPC = (schema, segmentName, rpcModuleName, options) => {
78
78
  handler.segmentSchema = segmentSchema;
79
79
  handler.fullSchema = schema;
80
80
  handler.isRPC = true;
81
+ handler.path = [segmentName, controllerPrefix, path].filter(Boolean).join('/');
81
82
  // @ts-expect-error TODO
82
83
  client[staticMethodName] = handler;
83
84
  }
@@ -44,6 +44,7 @@ type ClientMethod<T extends ((...args: KnownAny[]) => void | object | JSONLinesR
44
44
  __iteration?: KnownAny;
45
45
  }, OPTS extends Record<string, KnownAny>, STREAM extends KnownAny = unknown> = (<R, F extends VovkDefaultFetcherOptions<KnownAny> = VovkDefaultFetcherOptions<OPTS>>(options: StaticMethodOption<T, OPTS, STREAM, R, F>) => ReturnType<T> extends Promise<JSONLinesResponse<infer U>> | JSONLinesResponse<infer U> | Iterator<infer U> | AsyncIterator<infer U> ? Promise<VovkStreamAsyncIterable<U>> : R extends object ? Promise<R> : StaticMethodReturnPromise<T>) & {
46
46
  isRPC: true;
47
+ path: string;
47
48
  schema: VovkHandlerSchema;
48
49
  controllerSchema: VovkControllerSchema;
49
50
  segmentSchema: VovkSegmentSchema;
package/cjs/types.d.ts CHANGED
@@ -256,7 +256,7 @@ type VovkUserConfig = {
256
256
  /** @todo this is an experimental feature */
257
257
  segmentConfig?: false | Record<string, {
258
258
  origin?: string;
259
- rootEntry?: boolean;
259
+ rootEntry?: string;
260
260
  }>;
261
261
  };
262
262
  export type VovkConfig = VovkUserConfig & {
@@ -78,6 +78,7 @@ const createRPC = (schema, segmentName, rpcModuleName, options) => {
78
78
  handler.segmentSchema = segmentSchema;
79
79
  handler.fullSchema = schema;
80
80
  handler.isRPC = true;
81
+ handler.path = [segmentName, controllerPrefix, path].filter(Boolean).join('/');
81
82
  // @ts-expect-error TODO
82
83
  client[staticMethodName] = handler;
83
84
  }
@@ -44,6 +44,7 @@ type ClientMethod<T extends ((...args: KnownAny[]) => void | object | JSONLinesR
44
44
  __iteration?: KnownAny;
45
45
  }, OPTS extends Record<string, KnownAny>, STREAM extends KnownAny = unknown> = (<R, F extends VovkDefaultFetcherOptions<KnownAny> = VovkDefaultFetcherOptions<OPTS>>(options: StaticMethodOption<T, OPTS, STREAM, R, F>) => ReturnType<T> extends Promise<JSONLinesResponse<infer U>> | JSONLinesResponse<infer U> | Iterator<infer U> | AsyncIterator<infer U> ? Promise<VovkStreamAsyncIterable<U>> : R extends object ? Promise<R> : StaticMethodReturnPromise<T>) & {
46
46
  isRPC: true;
47
+ path: string;
47
48
  schema: VovkHandlerSchema;
48
49
  controllerSchema: VovkControllerSchema;
49
50
  segmentSchema: VovkSegmentSchema;
package/mjs/types.d.ts CHANGED
@@ -256,7 +256,7 @@ type VovkUserConfig = {
256
256
  /** @todo this is an experimental feature */
257
257
  segmentConfig?: false | Record<string, {
258
258
  origin?: string;
259
- rootEntry?: boolean;
259
+ rootEntry?: string;
260
260
  }>;
261
261
  };
262
262
  export type VovkConfig = VovkUserConfig & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "3.0.0-draft.149",
3
+ "version": "3.0.0-draft.151",
4
4
  "main": "./cjs/index.js",
5
5
  "module": "./mjs/index.js",
6
6
  "types": "./mjs/index.d.ts",