vovk-cli 0.0.1-draft.56 → 0.0.1-draft.59
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/dist/dev/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import once from 'lodash/once.js';
|
|
|
10
10
|
import { debouncedEnsureSchemaFiles } from './ensureSchemaFiles.mjs';
|
|
11
11
|
import writeOneSchemaFile from './writeOneSchemaFile.mjs';
|
|
12
12
|
import logDiffResult from './logDiffResult.mjs';
|
|
13
|
-
import ensureClient from '
|
|
13
|
+
import ensureClient from '../generate/ensureClient.mjs';
|
|
14
14
|
import getProjectInfo from '../getProjectInfo/index.mjs';
|
|
15
15
|
import generate from '../generate/index.mjs';
|
|
16
16
|
import locateSegments from '../locateSegments.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
|
-
import getClientTemplates from '
|
|
2
|
+
import getClientTemplates from './getClientTemplates.mjs';
|
|
3
3
|
export default async function ensureClient({ config, cwd, log }) {
|
|
4
4
|
const now = Date.now();
|
|
5
5
|
const { clientOutDirAbsolutePath, templateFiles } = getClientTemplates({
|
|
@@ -8,8 +8,8 @@ export default async function getConfig({ clientOutDir, cwd }) {
|
|
|
8
8
|
const config = {
|
|
9
9
|
modulesDir: env.VOVK_MODULES_DIR ?? conf.modulesDir ?? './' + [srcRoot, 'modules'].filter(Boolean).join('/'),
|
|
10
10
|
validateOnClientPath: env.VOVK_VALIDATE_ON_CLIENT_PATH ?? conf.validateOnClientPath ?? null,
|
|
11
|
-
fetcherPath: env.VOVK_FETCHER_PATH ?? conf.fetcherPath ?? 'vovk/dist/client/defaultFetcher',
|
|
12
|
-
createRPCPath: env.VOVK_CREATE_RPC_PATH ?? conf.createRPCPath ?? 'vovk/dist/client/createRPC',
|
|
11
|
+
fetcherPath: env.VOVK_FETCHER_PATH ?? conf.fetcherPath ?? 'vovk/dist/client/defaultFetcher.js',
|
|
12
|
+
createRPCPath: env.VOVK_CREATE_RPC_PATH ?? conf.createRPCPath ?? 'vovk/dist/client/createRPC.js',
|
|
13
13
|
schemaOutDir: env.VOVK_SCHEMA_OUT_DIR ?? conf.schemaOutDir ?? './.vovk-schema',
|
|
14
14
|
clientOutDir: clientOutDir ?? env.VOVK_CLIENT_OUT_DIR ?? conf.clientOutDir ?? './node_modules/.vovk-client',
|
|
15
15
|
origin: (env.VOVK_ORIGIN ?? conf.origin ?? '').replace(/\/$/, ''), // Remove trailing slash
|
|
@@ -8,7 +8,8 @@ export default async function getProjectInfo({ port: givenPort, clientOutDir, cw
|
|
|
8
8
|
const { config, srcRoot, configAbsolutePaths, userConfig, error } = await getConfig({ clientOutDir, cwd });
|
|
9
9
|
const apiRoot = `${config.origin ?? ''}/${config.rootEntry}`;
|
|
10
10
|
const apiDir = path.join(srcRoot, 'app', config.rootEntry);
|
|
11
|
-
const schemaOutImportPath = path.relative(config.clientOutDir, config.schemaOutDir).replace(/\\/g, '/')
|
|
11
|
+
const schemaOutImportPath = path.relative(config.clientOutDir, config.schemaOutDir).replace(/\\/g, '/') + // windows fix
|
|
12
|
+
'/index.js';
|
|
12
13
|
const fetcherClientImportPath = config.fetcherPath.startsWith('.')
|
|
13
14
|
? path.relative(config.clientOutDir, config.fetcherPath)
|
|
14
15
|
: config.fetcherPath;
|
package/package.json
CHANGED
|
File without changes
|