vovk-cli 0.0.1-draft.106 → 0.0.1-draft.108
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/LICENSE
CHANGED
|
@@ -4,7 +4,7 @@ import type { VovkClientFetcher } from 'vovk';
|
|
|
4
4
|
import type fetcher from '<%= t.imports.fetcher %>';
|
|
5
5
|
import type createRPC from '<%= t.imports.createRPC %>';
|
|
6
6
|
<% Object.values(t.fullSchema.segments).forEach((segment, i) => { if(Object.keys(segment.controllers).length) { %>
|
|
7
|
-
import type { Controllers as Controllers<%= i %> } from "<%= segment.segmentImportPath %>";
|
|
7
|
+
import type { Controllers as Controllers<%= i %> } from "<%= t.segmentMeta[segment.segmentName].segmentImportPath %>";
|
|
8
8
|
<% }}) %>
|
|
9
9
|
type Options = typeof fetcher extends VovkClientFetcher<infer U> ? U : never;
|
|
10
10
|
<% Object.values(t.fullSchema.segments).forEach((segment, i) => {
|
|
@@ -4,7 +4,7 @@ import type { VovkClientFetcher } from 'vovk';
|
|
|
4
4
|
import type fetcher from '<%= t.imports.module.fetcher %>';
|
|
5
5
|
import type createRPC from '<%= t.imports.module.createRPC %>';
|
|
6
6
|
<% Object.values(t.fullSchema.segments).forEach((segment, i) => { if(Object.keys(segment.controllers).length) { %>
|
|
7
|
-
import type { Controllers as Controllers<%= i %> } from "<%= segment.segmentImportPath %>";
|
|
7
|
+
import type { Controllers as Controllers<%= i %> } from "<%= t.segmentMeta[segment.segmentName].segmentImportPath %>";
|
|
8
8
|
<% }}) %>
|
|
9
9
|
type Options = typeof fetcher extends VovkClientFetcher<infer U> ? U : never;
|
|
10
10
|
<% Object.values(t.fullSchema.segments).forEach((segment, i) => {
|
|
@@ -4,7 +4,7 @@ import fetcher from '<%= t.imports.fetcher %>';
|
|
|
4
4
|
import createRPC from '<%= t.imports.createRPC %>';
|
|
5
5
|
import fullSchema from '<%= t.imports.fullSchema %>';
|
|
6
6
|
<% Object.values(t.fullSchema.segments).forEach((segment, i) => { if(Object.keys(segment.controllers).length) { %>
|
|
7
|
-
import type { Controllers as Controllers<%= i %> } from "<%= segment.segmentImportPath %>";
|
|
7
|
+
import type { Controllers as Controllers<%= i %> } from "<%= t.segmentMeta[segment.segmentName].segmentImportPath %>";
|
|
8
8
|
<% }}) %>
|
|
9
9
|
<% if (t.imports.validateOnClient) { %>
|
|
10
10
|
import validateOnClient from '<%= t.imports.validateOnClient %>';
|
|
@@ -7,9 +7,9 @@ export default async function writeConfigJson(schemaOutAbsolutePath, projectInfo
|
|
|
7
7
|
const existingStr = await fs.readFile(configJsonPath, 'utf-8').catch(() => null);
|
|
8
8
|
if (existingStr !== configStr) {
|
|
9
9
|
await fs.writeFile(configJsonPath, configStr);
|
|
10
|
-
projectInfo?.log.info(`
|
|
10
|
+
projectInfo?.log.info(`Config JSON written to ${configJsonPath}`);
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
projectInfo?.log.debug(`
|
|
13
|
+
projectInfo?.log.debug(`Config JSON is up to date at ${configJsonPath}`);
|
|
14
14
|
}
|
|
15
15
|
}
|
package/dist/generate/index.mjs
CHANGED
|
@@ -28,6 +28,7 @@ export default async function generate({ projectInfo, segments, forceNothingWrit
|
|
|
28
28
|
apiRoot,
|
|
29
29
|
imports: clientImports,
|
|
30
30
|
fullSchema,
|
|
31
|
+
segmentMeta: Object.fromEntries(segments.map(({ segmentName, ...s }) => [segmentName, s])),
|
|
31
32
|
};
|
|
32
33
|
// Process each template in parallel
|
|
33
34
|
const processedTemplates = noClient
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vovk-cli",
|
|
3
|
-
"version": "0.0.1-draft.
|
|
3
|
+
"version": "0.0.1-draft.108",
|
|
4
4
|
"bin": {
|
|
5
5
|
"vovk": "./dist/index.mjs"
|
|
6
6
|
},
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"cli",
|
|
30
30
|
"vovk"
|
|
31
31
|
],
|
|
32
|
-
"author": "
|
|
32
|
+
"author": "Andrey Gubanov",
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/finom/vovk/issues"
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://vovk.dev",
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"vovk": "^3.0.0-draft.
|
|
39
|
+
"vovk": "^3.0.0-draft.91"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@inquirer/prompts": "^7.3.1",
|