vovk 3.0.0-draft.140 → 3.0.0-draft.142

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.
@@ -92,6 +92,7 @@ function createVovkApp() {
92
92
  };
93
93
  };
94
94
  const initVovk = (options) => {
95
+ options.segmentName = trimPath(options.segmentName ?? '');
95
96
  for (const [rpcModuleName, controller] of Object.entries(options.controllers)) {
96
97
  controller._rpcModuleName = rpcModuleName;
97
98
  controller._activated = true;
package/cjs/types.d.ts CHANGED
@@ -227,9 +227,9 @@ export type ClientTemplateDef = {
227
227
  }>;
228
228
  requires?: Record<string, string>;
229
229
  };
230
- export type VovkConfig = {
230
+ type VovkUserConfig = {
231
231
  $schema?: typeof VovkSchemaIdEnum.CONFIG | string;
232
- emitConfig?: boolean | (keyof VovkStrictConfig)[];
232
+ emitConfig?: boolean | (keyof VovkStrictConfig | string)[];
233
233
  schemaOutDir?: string;
234
234
  composedClient?: ClientConfigFull;
235
235
  segmentedClient?: ClientConfigSegmented;
@@ -259,9 +259,12 @@ export type VovkConfig = {
259
259
  rootEntry?: boolean;
260
260
  }>;
261
261
  };
262
- export type VovkStrictConfig = Required<Omit<VovkConfig, 'emitConfig' | 'libs' | 'imports' | 'composedClient' | 'segmentedClient' | 'bundle'>> & {
263
- emitConfig: (keyof VovkStrictConfig)[];
264
- bundle: RequireAllExcept<Exclude<VovkConfig['bundle'], undefined>, 'includeSegments' | 'excludeSegments'>;
262
+ export type VovkConfig = VovkUserConfig & {
263
+ [key: string]: KnownAny;
264
+ };
265
+ export type VovkStrictConfig = Required<Omit<VovkUserConfig, 'emitConfig' | 'libs' | 'imports' | 'composedClient' | 'segmentedClient' | 'bundle'>> & {
266
+ emitConfig: (keyof VovkStrictConfig | string)[];
267
+ bundle: RequireAllExcept<Exclude<VovkUserConfig['bundle'], undefined>, 'includeSegments' | 'excludeSegments'>;
265
268
  imports: {
266
269
  fetcher: [string, string] | [string];
267
270
  validateOnClient: [string, string] | [string] | null;
@@ -92,6 +92,7 @@ function createVovkApp() {
92
92
  };
93
93
  };
94
94
  const initVovk = (options) => {
95
+ options.segmentName = trimPath(options.segmentName ?? '');
95
96
  for (const [rpcModuleName, controller] of Object.entries(options.controllers)) {
96
97
  controller._rpcModuleName = rpcModuleName;
97
98
  controller._activated = true;
package/mjs/types.d.ts CHANGED
@@ -227,9 +227,9 @@ export type ClientTemplateDef = {
227
227
  }>;
228
228
  requires?: Record<string, string>;
229
229
  };
230
- export type VovkConfig = {
230
+ type VovkUserConfig = {
231
231
  $schema?: typeof VovkSchemaIdEnum.CONFIG | string;
232
- emitConfig?: boolean | (keyof VovkStrictConfig)[];
232
+ emitConfig?: boolean | (keyof VovkStrictConfig | string)[];
233
233
  schemaOutDir?: string;
234
234
  composedClient?: ClientConfigFull;
235
235
  segmentedClient?: ClientConfigSegmented;
@@ -259,9 +259,12 @@ export type VovkConfig = {
259
259
  rootEntry?: boolean;
260
260
  }>;
261
261
  };
262
- export type VovkStrictConfig = Required<Omit<VovkConfig, 'emitConfig' | 'libs' | 'imports' | 'composedClient' | 'segmentedClient' | 'bundle'>> & {
263
- emitConfig: (keyof VovkStrictConfig)[];
264
- bundle: RequireAllExcept<Exclude<VovkConfig['bundle'], undefined>, 'includeSegments' | 'excludeSegments'>;
262
+ export type VovkConfig = VovkUserConfig & {
263
+ [key: string]: KnownAny;
264
+ };
265
+ export type VovkStrictConfig = Required<Omit<VovkUserConfig, 'emitConfig' | 'libs' | 'imports' | 'composedClient' | 'segmentedClient' | 'bundle'>> & {
266
+ emitConfig: (keyof VovkStrictConfig | string)[];
267
+ bundle: RequireAllExcept<Exclude<VovkUserConfig['bundle'], undefined>, 'includeSegments' | 'excludeSegments'>;
265
268
  imports: {
266
269
  fetcher: [string, string] | [string];
267
270
  validateOnClient: [string, string] | [string] | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "3.0.0-draft.140",
3
+ "version": "3.0.0-draft.142",
4
4
  "main": "./cjs/index.js",
5
5
  "module": "./mjs/index.js",
6
6
  "types": "./mjs/index.d.ts",