vovk-cli 0.0.1-draft.41 → 0.0.1-draft.43

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.
@@ -1,12 +1,13 @@
1
+
1
2
  <%- '// auto-generated\n/* eslint-disable */' %>
2
3
  import type { clientizeController, VovkClientFetcher } from 'vovk/client';
3
4
  import type { promisifyWorker } from 'vovk/worker';
4
5
  import type fetcher from '<%= fetcherClientImportPath %>';
5
-
6
- <% segments.forEach((segment, i) => { %>
7
- import type { Controllers as Controllers<%= i %>, Workers as Workers<%= i %> } from "<%= segment.segmentImportPath %>";
6
+ <% segments.forEach((segment, i) => {
7
+ const hasWorkers = !!Object.keys(segmentsSchema[segment.segmentName].workers).length;
8
+ %>
9
+ import type { Controllers as Controllers<%= i %><% if(hasWorkers) { %>, Workers as Workers<%= i %> <% } %> } from "<%= segment.segmentImportPath %>";
8
10
  <% }) %>
9
-
10
11
  type Options = typeof fetcher extends VovkClientFetcher<infer U> ? U : never;
11
12
 
12
13
  <% segments.forEach((segment, i) => {
@@ -16,9 +17,9 @@ type Options = typeof fetcher extends VovkClientFetcher<infer U> ? U : never;
16
17
  const workers = Object.keys(segSchema.workers);
17
18
  %>
18
19
  <% controllers.forEach((key) => { %>
19
- export const <%= key %>: ReturnType<typeof clientizeController<Controllers<%= i %>["<%= key %>"], Options>>;
20
+ export const <%= key %>: ReturnType<typeof clientizeController<Controllers<%= i %>["<%= key %>"], Options>>;
20
21
  <% }) %>
21
22
  <% workers.forEach((key) => { %>
22
- export const <%= key %>: ReturnType<typeof promisifyWorker<Workers<%= i %>["<%= key %>"]>>;
23
+ export const <%= key %>: ReturnType<typeof promisifyWorker<Workers<%= i %>["<%= key %>"]>>;
23
24
  <% }) %>
24
25
  <% }) %>
@@ -5,7 +5,7 @@ const { default: fetcher } = require('<%= fetcherClientImportPath %>');
5
5
  const schema = require('<%= schemaOutImportPath %>');
6
6
 
7
7
  const { default: validateOnClient = null } = <%- validateOnClientImportPath ? `require('${validateOnClientImportPath}')` : '{}'%>;
8
- const apiRoot = '<%= apiEntryPoint %>';
8
+ const apiRoot = '<%= apiRoot %>';
9
9
 
10
10
  <% segments.forEach((segment) => {
11
11
  const segSchema = segmentsSchema[segment.segmentName];
@@ -14,13 +14,13 @@ const apiRoot = '<%= apiEntryPoint %>';
14
14
  const workers = Object.keys(segSchema.workers);
15
15
  %>
16
16
  <% controllers.forEach((key) => { %>
17
- exports.<%= key %> = clientizeController(
18
- schema['<%= segment.segmentName %>'].controllers.<%= key %>,
19
- '<%= segment.segmentName %>',
20
- { fetcher, validateOnClient, defaultOptions: { apiRoot } }
21
- );
17
+ exports.<%= key %> = clientizeController(
18
+ schema['<%= segment.segmentName %>'].controllers.<%= key %>,
19
+ '<%= segment.segmentName %>',
20
+ { fetcher, validateOnClient, defaultOptions: { apiRoot } }
21
+ );
22
22
  <% }) %>
23
23
  <% workers.forEach((key) => { %>
24
- exports.<%= key %> = promisifyWorker(null, schema['<%= segment.segmentName %>'].workers.<%= key %>);
24
+ exports.<%= key %> = promisifyWorker(null, schema['<%= segment.segmentName %>'].workers.<%= key %>);
25
25
  <% }) %>
26
26
  <% }) %>
@@ -1,36 +1,35 @@
1
1
  <%- '// auto-generated\n/* eslint-disable */' %>
2
2
  import { clientizeController, type VovkClientFetcher } from 'vovk/client';
3
- import { promisifyWorker } from 'vovk/worker';
3
+ <% if(hasWorkers) { %>import { promisifyWorker } from 'vovk/worker';<% } %>
4
4
  import fetcher from '<%= fetcherClientImportPath %>';
5
5
  import schema from '<%= schemaOutImportPath %>';
6
-
7
6
  <% if (validateOnClientImportPath) { %>
8
7
  import validateOnClient from '<%= validateOnClientImportPath %>';
9
8
  <% } else { %>
10
9
  const validateOnClient = undefined;
11
10
  <% } %>
12
-
13
11
  type Options = typeof fetcher extends VovkClientFetcher<infer U> ? U : never;
14
- const apiRoot = '<%= apiEntryPoint %>';
12
+ const apiRoot = '<%= apiRoot %>';
15
13
 
16
14
  <% segments.forEach((segment, i) => {
17
15
  const segSchema = segmentsSchema[segment.segmentName];
18
16
  if (!segSchema || !segSchema.emitSchema) return;
17
+ const hasWorkers = !!Object.keys(segmentsSchema[segment.segmentName].workers).length;
19
18
  %>
20
- import type { Controllers as Controllers<%= i %>, Workers as Workers<%= i %> } from "<%= segment.segmentImportPath %>";
19
+ import type { Controllers as Controllers<%= i %><% if(hasWorkers) { %>, Workers as Workers<%= i %> <% } %>} from "<%= segment.segmentImportPath %>";
21
20
 
22
21
  <% Object.keys(segSchema.controllers).forEach((key) => { %>
23
- export const <%= key %> = clientizeController<Controllers<%= i %>["<%= key %>"], Options>(
24
- schema['<%= segment.segmentName %>'].controllers.<%= key %>,
25
- '<%= segment.segmentName %>',
26
- { fetcher, validateOnClient, defaultOptions: { apiRoot } }
27
- );
22
+ export const <%= key %> = clientizeController<Controllers<%= i %>["<%= key %>"], Options>(
23
+ schema['<%= segment.segmentName %>'].controllers.<%= key %>,
24
+ '<%= segment.segmentName %>',
25
+ { fetcher, validateOnClient, defaultOptions: { apiRoot } }
26
+ );
28
27
  <% }) %>
29
28
 
30
29
  <% Object.keys(segSchema.workers).forEach((key) => { %>
31
- export const <%= key %> = promisifyWorker<Workers<%= i %>["<%= key %>"]>(
32
- null,
33
- schema['<%= segment.segmentName %>'].workers.<%= key %>
34
- );
30
+ export const <%= key %> = promisifyWorker<Workers<%= i %>["<%= key %>"]>(
31
+ null,
32
+ schema['<%= segment.segmentName %>'].workers.<%= key %>
33
+ );
35
34
  <% }) %>
36
35
  <% }) %>
@@ -1,5 +1,5 @@
1
1
  import type { VovkSchema } from 'vovk';
2
- import type { _VovkControllerSchema, _VovkWorkerSchema } from 'vovk/types';
2
+ import type { VovkControllerSchema, VovkWorkerSchema } from 'vovk/types';
3
3
  interface HandlersDiff {
4
4
  nameOfClass: string;
5
5
  added: string[];
@@ -15,7 +15,7 @@ export interface DiffResult {
15
15
  workers: WorkersOrControllersDiff;
16
16
  controllers: WorkersOrControllersDiff;
17
17
  }
18
- export declare function diffHandlers<T extends _VovkWorkerSchema['handlers'] | _VovkControllerSchema['handlers']>(oldHandlers: T, newHandlers: T, nameOfClass: string): HandlersDiff;
18
+ export declare function diffHandlers<T extends VovkWorkerSchema['handlers'] | VovkControllerSchema['handlers']>(oldHandlers: T, newHandlers: T, nameOfClass: string): HandlersDiff;
19
19
  export declare function diffWorkersOrControllers<T extends VovkSchema['controllers'] | VovkSchema['workers']>(oldItems: T, newItems: T): WorkersOrControllersDiff;
20
20
  /**
21
21
  example output:
@@ -1,5 +1,5 @@
1
1
  import type { ProjectInfo } from '../getProjectInfo/index.mjs';
2
- export default function ensureClient(projectInfo: ProjectInfo): Promise<{
2
+ export default function ensureClient({ config, cwd, log }: ProjectInfo): Promise<{
3
3
  written: boolean;
4
4
  path: string;
5
5
  }>;
@@ -1,7 +1,6 @@
1
1
  import path from 'node:path';
2
2
  import fs from 'node:fs/promises';
3
- export default async function ensureClient(projectInfo) {
4
- const { config, cwd, log } = projectInfo;
3
+ export default async function ensureClient({ config, cwd, log }) {
5
4
  const now = Date.now();
6
5
  const clientoOutDirAbsolutePath = path.join(cwd, config.clientOutDir);
7
6
  const dts = `// auto-generated
@@ -10,8 +9,8 @@ export default async function ensureClient(projectInfo) {
10
9
  // Feel free to report an issue at https://github.com/finom/vovk/issues`;
11
10
  const js = dts;
12
11
  const ts = dts;
13
- const localJsAbsolutePath = path.join(clientoOutDirAbsolutePath, 'client.js');
14
- const localDtsAbsolutePath = path.join(clientoOutDirAbsolutePath, 'client.d.ts');
12
+ const localJsAbsolutePath = path.join(clientoOutDirAbsolutePath, 'compiled.js');
13
+ const localDtsAbsolutePath = path.join(clientoOutDirAbsolutePath, 'compiled.d.ts');
15
14
  const localTsAbsolutePath = path.join(clientoOutDirAbsolutePath, 'index.ts');
16
15
  const existingJs = await fs.readFile(localJsAbsolutePath, 'utf-8').catch(() => null);
17
16
  const existingDts = await fs.readFile(localDtsAbsolutePath, 'utf-8').catch(() => null);
@@ -11,7 +11,7 @@ import writeOneSchemaFile from './writeOneSchemaFile.mjs';
11
11
  import logDiffResult from './logDiffResult.mjs';
12
12
  import ensureClient from './ensureClient.mjs';
13
13
  import getProjectInfo from '../getProjectInfo/index.mjs';
14
- import generateClient from '../generateClient.mjs';
14
+ import generate from '../generate/index.mjs';
15
15
  import locateSegments from '../locateSegments.mjs';
16
16
  import debounceWithArgs from '../utils/debounceWithArgs.mjs';
17
17
  import formatLoggedSegmentName from '../utils/formatLoggedSegmentName.mjs';
@@ -215,9 +215,9 @@ export class VovkDev {
215
215
  }
216
216
  };
217
217
  #requestSchema = debounceWithArgs(async (segmentName) => {
218
- const { apiEntryPoint, log, port, config } = this.#projectInfo;
218
+ const { apiRoot, log, port, config } = this.#projectInfo;
219
219
  const { devHttps } = config;
220
- const endpoint = `${apiEntryPoint.startsWith(`http${devHttps ? 's' : ''}://`) ? apiEntryPoint : `http${devHttps ? 's' : ''}://localhost:${port}${apiEntryPoint}`}/${segmentName ? `${segmentName}/` : ''}_schema_`;
220
+ const endpoint = `${apiRoot.startsWith(`http${devHttps ? 's' : ''}://`) ? apiRoot : `http${devHttps ? 's' : ''}://localhost:${port}${apiRoot}`}/${segmentName ? `${segmentName}/` : ''}_schema_`;
221
221
  log.debug(`Requesting schema for ${formatLoggedSegmentName(segmentName)} at ${endpoint}`);
222
222
  try {
223
223
  const resp = await fetch(endpoint);
@@ -275,7 +275,7 @@ export class VovkDev {
275
275
  }
276
276
  if (this.#segments.every((s) => this.#schemas[s.segmentName])) {
277
277
  log.debug(`All segments with "emitSchema" have schema.`);
278
- await generateClient({ projectInfo: this.#projectInfo, segments: this.#segments, segmentsSchema: this.#schemas });
278
+ await generate({ projectInfo: this.#projectInfo, segments: this.#segments, segmentsSchema: this.#schemas });
279
279
  }
280
280
  }
281
281
  async start() {
@@ -0,0 +1,11 @@
1
+ import { VovkConfig } from "../types.mjs";
2
+ interface ClientTemplate {
3
+ templatePath: string;
4
+ outPath: string;
5
+ }
6
+ export default function getClientTemplates({ config, cwd, templateNames, }: {
7
+ config: Required<VovkConfig>;
8
+ cwd: string;
9
+ templateNames?: string[];
10
+ }): ClientTemplate[];
11
+ export {};
@@ -0,0 +1,25 @@
1
+ import path from 'node:path';
2
+ export default function getClientTemplates({ config, cwd, templateNames = [], }) {
3
+ const __dirname = path.dirname(new URL(import.meta.url).pathname);
4
+ const templatesDir = path.join(__dirname, '../..', 'client-templates');
5
+ const clientOutDirAbsolutePath = path.resolve(cwd, config.clientOutDir);
6
+ const mapper = (dir) => (name) => ({
7
+ templatePath: path.resolve(templatesDir, dir, name),
8
+ outPath: path.join(clientOutDirAbsolutePath, name.replace('.ejs', '')),
9
+ });
10
+ const builtInTemplatesMap = {
11
+ ts: ['index.ts.ejs'].map(mapper('ts')),
12
+ compiled: ['compiled.js.ejs', 'compiled.d.ts.ejs'].map(mapper('compiled')),
13
+ python: ['__init__.py'].map(mapper('python')),
14
+ };
15
+ const templateFiles = (templateNames ?? config.clientGenerateTemplateNames).reduce((acc, template) => {
16
+ if (template in builtInTemplatesMap) {
17
+ return [...acc, ...builtInTemplatesMap[template]];
18
+ }
19
+ return [...acc, {
20
+ templatePath: path.resolve(cwd, template),
21
+ outPath: path.join(clientOutDirAbsolutePath, path.basename(template).replace('.ejs', ''))
22
+ }];
23
+ }, []);
24
+ return templateFiles;
25
+ }
@@ -0,0 +1,12 @@
1
+ import type { VovkSchema } from 'vovk';
2
+ import type { ProjectInfo } from '../getProjectInfo/index.mjs';
3
+ import type { Segment } from '../locateSegments.mjs';
4
+ import { GenerateOptions } from '../types.mjs';
5
+ export default function generate({ projectInfo, segments, segmentsSchema, templates, prettify: prettifyClient, fullSchema, }: {
6
+ projectInfo: ProjectInfo;
7
+ segments: Segment[];
8
+ segmentsSchema: Record<string, VovkSchema>;
9
+ } & Pick<GenerateOptions, 'templates' | 'prettify' | 'fullSchema'>): Promise<{
10
+ written: boolean;
11
+ path: string;
12
+ }>;
@@ -1,31 +1,15 @@
1
1
  import path from 'node:path';
2
2
  import fs from 'node:fs/promises';
3
3
  import ejs from 'ejs';
4
- import formatLoggedSegmentName from './utils/formatLoggedSegmentName.mjs';
5
- import prettify from './utils/prettify.mjs';
6
- export default async function generateClient({ projectInfo, segments, segmentsSchema, templates = ['ts', 'compiled'], prettify: prettifyClient, fullSchema, noClient, }) {
7
- const { config, cwd, log, validateOnClientImportPath, apiEntryPoint, fetcherClientImportPath, schemaOutImportPath, } = projectInfo;
8
- const __dirname = path.dirname(new URL(import.meta.url).pathname);
9
- const templatesDir = path.join(__dirname, '..', 'client-templates');
4
+ import formatLoggedSegmentName from '../utils/formatLoggedSegmentName.mjs';
5
+ import prettify from '../utils/prettify.mjs';
6
+ import getClientTemplates from './getClientTemplates.mjs';
7
+ export default async function generate({ projectInfo, segments, segmentsSchema, templates, prettify: prettifyClient, fullSchema, }) {
8
+ templates = templates ?? projectInfo.config.clientGenerateTemplateNames;
9
+ const noClient = templates?.[0] === 'none';
10
+ const { config, cwd, log, validateOnClientImportPath, apiRoot, fetcherClientImportPath, schemaOutImportPath, } = projectInfo;
10
11
  const clientOutDirAbsolutePath = path.resolve(cwd, config.clientOutDir);
11
- const mapper = (dir) => (name) => ({
12
- templatePath: path.resolve(templatesDir, dir, name),
13
- outPath: path.join(clientOutDirAbsolutePath, name.replace('.ejs', '')),
14
- });
15
- const builtInTemplatesMap = {
16
- ts: ['index.ts.ejs'].map(mapper('ts')),
17
- compiled: ['client.js.ejs', 'client.d.ts.ejs'].map(mapper('compiled')),
18
- python: ['__init__.py'].map(mapper('python')),
19
- };
20
- const templateFiles = templates.reduce((acc, template) => {
21
- if (template in builtInTemplatesMap) {
22
- return [...acc, ...builtInTemplatesMap[template]];
23
- }
24
- return [...acc, {
25
- templatePath: path.resolve(cwd, template),
26
- outPath: path.join(clientOutDirAbsolutePath, path.basename(template).replace('.ejs', ''))
27
- }];
28
- }, []);
12
+ const templateFiles = getClientTemplates({ config, cwd, templateNames: templates });
29
13
  // Ensure that each segment has a matching schema if it needs to be emitted:
30
14
  for (let i = 0; i < segments.length; i++) {
31
15
  const { segmentName } = segments[i];
@@ -39,7 +23,7 @@ export default async function generateClient({ projectInfo, segments, segmentsSc
39
23
  const now = Date.now();
40
24
  // Data for the EJS templates:
41
25
  const ejsData = {
42
- apiEntryPoint,
26
+ apiRoot,
43
27
  fetcherClientImportPath,
44
28
  schemaOutImportPath,
45
29
  validateOnClientImportPath,
@@ -69,7 +53,7 @@ export default async function generateClient({ projectInfo, segments, segmentsSc
69
53
  if (fullSchema) {
70
54
  const fullSchemaOutAbsolutePath = path.resolve(clientOutDirAbsolutePath, typeof fullSchema === 'string' ? fullSchema : 'full-schema.json');
71
55
  await fs.writeFile(fullSchemaOutAbsolutePath, JSON.stringify(segmentsSchema, null, 2));
72
- log.info(`Full schema written to ${fullSchemaOutAbsolutePath}`);
56
+ log.info(`Full schema has ben written to ${fullSchemaOutAbsolutePath}`);
73
57
  }
74
58
  // 2. Check if any file needs rewriting
75
59
  const anyNeedsWriting = processedTemplates.some(({ needsWriting }) => needsWriting);
@@ -18,6 +18,7 @@ export default async function getConfig({ clientOutDir, cwd }) {
18
18
  logLevel: env.VOVK_LOG_LEVEL ?? conf.logLevel ?? 'info',
19
19
  prettifyClient: (env.VOVK_PRETTIFY_CLIENT ? !!env.VOVK_PRETTIFY_CLIENT : null) ?? conf.prettifyClient ?? false,
20
20
  devHttps: (env.VOVK_DEV_HTTPS ? !!env.VOVK_DEV_HTTPS : null) ?? conf.devHttps ?? false,
21
+ clientGenerateTemplateNames: conf.clientGenerateTemplateNames ?? ['compiled'],
21
22
  templates: {
22
23
  service: 'vovk-cli/templates/service.ejs',
23
24
  controller: 'vovk-cli/templates/controller.ejs',
@@ -6,7 +6,7 @@ export default function getProjectInfo({ port: givenPort, clientOutDir, cwd, }?:
6
6
  }): Promise<{
7
7
  cwd: string;
8
8
  port: string;
9
- apiEntryPoint: string;
9
+ apiRoot: string;
10
10
  apiDir: string;
11
11
  srcRoot: string;
12
12
  schemaOutImportPath: string;
@@ -6,7 +6,7 @@ export default async function getProjectInfo({ port: givenPort, clientOutDir, cw
6
6
  // Make PORT available to the config file at getConfig
7
7
  process.env.PORT = port;
8
8
  const { config, srcRoot, configAbsolutePaths, userConfig, error } = await getConfig({ clientOutDir, cwd });
9
- const apiEntryPoint = `${config.origin ?? ''}/${config.rootEntry}`;
9
+ const apiRoot = `${config.origin ?? ''}/${config.rootEntry}`;
10
10
  const apiDir = path.join(srcRoot, 'app', config.rootEntry);
11
11
  const schemaOutImportPath = path.relative(config.clientOutDir, config.schemaOutDir).replace(/\\/g, '/'); // windows fix
12
12
  const fetcherClientImportPath = config.fetcher.startsWith('.')
@@ -25,7 +25,7 @@ export default async function getProjectInfo({ port: givenPort, clientOutDir, cw
25
25
  return {
26
26
  cwd,
27
27
  port,
28
- apiEntryPoint,
28
+ apiRoot,
29
29
  apiDir,
30
30
  srcRoot,
31
31
  schemaOutImportPath,
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import { Command } from 'commander';
7
7
  import concurrently from 'concurrently';
8
8
  import getAvailablePort from './utils/getAvailablePort.mjs';
9
9
  import getProjectInfo from './getProjectInfo/index.mjs';
10
- import generateClient from './generateClient.mjs';
10
+ import generate from './generate/index.mjs';
11
11
  import locateSegments from './locateSegments.mjs';
12
12
  import { VovkDev } from './dev/index.mjs';
13
13
  import newComponents from './new/index.mjs';
@@ -66,19 +66,18 @@ program
66
66
  .alias('g')
67
67
  .description('Generate client')
68
68
  .option('--out, --client-out-dir <path>', 'Path to output directory')
69
- .option('--template, --templates <templates...>', 'Client code templates')
70
- .option('--no-client', 'Do not generate client')
69
+ .option('--template, --templates <templates...>', 'Client code templates ("ts", "compiled", "python", "none", a custom path)')
71
70
  .option('--full-schema [fileName]', 'Generate client with full schema')
72
71
  .option('--prettify', 'Prettify output files')
73
72
  .action(async (options) => {
74
- const { clientOutDir, templates, prettify, noClient, fullSchema } = options;
73
+ const { clientOutDir, templates, prettify, fullSchema } = options;
75
74
  const projectInfo = await getProjectInfo({ clientOutDir });
76
75
  const { cwd, config, apiDir } = projectInfo;
77
76
  const segments = await locateSegments({ dir: apiDir, config });
78
77
  const schemaOutAbsolutePath = path.join(cwd, config.schemaOutDir);
79
78
  const schemaImportUrl = pathToFileURL(path.join(schemaOutAbsolutePath, 'index.js')).href;
80
79
  const { default: segmentsSchema } = await import(schemaImportUrl);
81
- await generateClient({ projectInfo, segments, segmentsSchema, templates, prettify, noClient, fullSchema });
80
+ await generate({ projectInfo, segments, segmentsSchema, templates, prettify, fullSchema });
82
81
  });
83
82
  program
84
83
  .command('new [components...]')
@@ -7,9 +7,9 @@ import path from 'node:path';
7
7
  */
8
8
  const getFileSystemEntryType = async (filePath) => !!(await fs.stat(filePath).catch(() => false));
9
9
  async function postinstall() {
10
- const vovk = path.join(import.meta.dirname, '../../.vovk');
11
- const js = path.join(vovk, 'client.js');
12
- const ts = path.join(vovk, 'client.d.ts');
10
+ const vovk = path.join(import.meta.dirname, '../../.vovk-client');
11
+ const js = path.join(vovk, 'compiled.js');
12
+ const ts = path.join(vovk, 'compiled.d.ts');
13
13
  const index = path.join(vovk, 'index.ts');
14
14
  if ((await getFileSystemEntryType(js)) ||
15
15
  (await getFileSystemEntryType(ts)) ||
package/dist/types.d.mts CHANGED
@@ -30,6 +30,7 @@ export type VovkConfig = {
30
30
  logLevel?: LogLevelNames;
31
31
  prettifyClient?: boolean;
32
32
  devHttps?: boolean;
33
+ clientGenerateTemplateNames?: string[];
33
34
  templates?: {
34
35
  service?: string;
35
36
  controller?: string;
@@ -52,7 +53,6 @@ export interface GenerateOptions {
52
53
  templates?: string[];
53
54
  prettify?: boolean;
54
55
  fullSchema?: string | boolean;
55
- noClient?: boolean;
56
56
  }
57
57
  export interface InitOptions {
58
58
  yes?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk-cli",
3
- "version": "0.0.1-draft.41",
3
+ "version": "0.0.1-draft.43",
4
4
  "bin": {
5
5
  "vovk": "./dist/index.mjs"
6
6
  },
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "homepage": "https://vovk.dev",
38
38
  "peerDependencies": {
39
- "vovk": "^3.0.0-draft.34"
39
+ "vovk": "^3.0.0-draft.35"
40
40
  },
41
41
  "dependencies": {
42
42
  "@inquirer/prompts": "^7.1.0",
@@ -1,12 +0,0 @@
1
- import type { VovkSchema } from 'vovk';
2
- import type { ProjectInfo } from './getProjectInfo/index.mjs';
3
- import type { Segment } from './locateSegments.mjs';
4
- import { GenerateOptions } from './types.mjs';
5
- export default function generateClient({ projectInfo, segments, segmentsSchema, templates, prettify: prettifyClient, fullSchema, noClient, }: {
6
- projectInfo: ProjectInfo;
7
- segments: Segment[];
8
- segmentsSchema: Record<string, VovkSchema>;
9
- } & Pick<GenerateOptions, 'templates' | 'prettify' | 'fullSchema' | 'noClient'>): Promise<{
10
- written: boolean;
11
- path: string;
12
- }>;