vovk-cli 0.0.1-draft.290 → 0.0.1-draft.292
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.
|
@@ -12,7 +12,9 @@ export default async function writeOneClientFile({ cwd, projectInfo, clientTempl
|
|
|
12
12
|
const { config, apiRoot } = projectInfo;
|
|
13
13
|
const { templateFilePath, relativeDir } = clientTemplateFile;
|
|
14
14
|
const locatedSegmentsByName = _.keyBy(locatedSegments, 'segmentName');
|
|
15
|
-
const outPath = path
|
|
15
|
+
const outPath = path
|
|
16
|
+
.resolve(cwd, outCwdRelativeDir, typeof segmentName === 'string' ? segmentName || ROOT_SEGMENT_FILE_NAME : '', relativeDir, path.basename(templateFilePath).replace('.ejs', ''))
|
|
17
|
+
.replace('[package_name]', packageJson.name?.replace(/-/g, '_') ?? 'my_package_name');
|
|
16
18
|
let placeholder = `// This is a temporary placeholder to avoid compilation errors if client is imported before it's generated.
|
|
17
19
|
// If you still see this text, the client is not generated yet because of an unknown problem.
|
|
18
20
|
// Feel free to report an issue at https://github.com/finom/vovk/issues`;
|
|
@@ -22,7 +24,7 @@ export default async function writeOneClientFile({ cwd, projectInfo, clientTempl
|
|
|
22
24
|
switch (type) {
|
|
23
25
|
case 'html':
|
|
24
26
|
return `<!-- ${text} -->`;
|
|
25
|
-
case '
|
|
27
|
+
case 'sh':
|
|
26
28
|
return `# ${text}`;
|
|
27
29
|
case 'c':
|
|
28
30
|
return `// ${text}`;
|
|
@@ -64,7 +64,7 @@ export default function getTemplateDefs(userTemplateDefs = {}) {
|
|
|
64
64
|
outDir: 'dist_rust',
|
|
65
65
|
},
|
|
66
66
|
requires: {
|
|
67
|
-
[BuiltInTemplateName.schemaJson]: './data',
|
|
67
|
+
[BuiltInTemplateName.schemaJson]: './data/',
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
[BuiltInTemplateName.py]: {
|
|
@@ -73,7 +73,7 @@ export default function getTemplateDefs(userTemplateDefs = {}) {
|
|
|
73
73
|
outDir: 'dist_python',
|
|
74
74
|
},
|
|
75
75
|
requires: {
|
|
76
|
-
[BuiltInTemplateName.schemaJson]: './
|
|
76
|
+
[BuiltInTemplateName.schemaJson]: './src/[package_name]/',
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
};
|
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.292",
|
|
4
4
|
"bin": {
|
|
5
5
|
"vovk": "./dist/index.mjs"
|
|
6
6
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"vovk": "^3.0.0-draft.321"
|
|
39
39
|
},
|
|
40
40
|
"optionalDependencies": {
|
|
41
|
-
"vovk-python": "^0.0.1-draft.
|
|
41
|
+
"vovk-python": "^0.0.1-draft.49"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@iarna/toml": "^2.2.5",
|