vovk-cli 0.0.1-draft.302 → 0.0.1-draft.304
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.
|
@@ -49,6 +49,7 @@ export default async function getClientTemplateFiles({ config, cwd, log, configK
|
|
|
49
49
|
}
|
|
50
50
|
const defOutDir = configKey === 'composedClient' ? templateDef.composedClient?.outDir : templateDef.segmentedClient?.outDir;
|
|
51
51
|
let files = [];
|
|
52
|
+
const outCwdRelativeDir = forceOutCwdRelativeDir ?? cliOutDir ?? defOutDir ?? configOutDir;
|
|
52
53
|
if (templateAbsolutePath) {
|
|
53
54
|
if (entryType === FileSystemEntryType.FILE) {
|
|
54
55
|
files = [{ filePath: templateAbsolutePath, isSingleFileTemplate: true }];
|
|
@@ -64,7 +65,6 @@ export default async function getClientTemplateFiles({ config, cwd, log, configK
|
|
|
64
65
|
log.error(`Template "${templateAbsolutePath}" not found`);
|
|
65
66
|
continue;
|
|
66
67
|
}
|
|
67
|
-
const outCwdRelativeDir = forceOutCwdRelativeDir ?? cliOutDir ?? defOutDir ?? configOutDir;
|
|
68
68
|
for (const { filePath, isSingleFileTemplate } of files) {
|
|
69
69
|
templateFiles.push({
|
|
70
70
|
templateName,
|
|
@@ -74,14 +74,14 @@ export default async function getClientTemplateFiles({ config, cwd, log, configK
|
|
|
74
74
|
templateDef,
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
entries.push([tName, def, path.join(outCwdRelativeDir, reqRelativeDir)]);
|
|
77
|
+
}
|
|
78
|
+
if (templateDef.requires) {
|
|
79
|
+
for (const [tName, reqRelativeDir] of Object.entries(templateDef.requires)) {
|
|
80
|
+
const def = config.clientTemplateDefs[tName];
|
|
81
|
+
if (!def) {
|
|
82
|
+
throw new Error(`Template "${tName}" required by "${templateName}" not found`);
|
|
84
83
|
}
|
|
84
|
+
entries.push([tName, def, path.join(outCwdRelativeDir, reqRelativeDir)]);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
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.304",
|
|
4
4
|
"bin": {
|
|
5
5
|
"vovk": "./dist/index.mjs"
|
|
6
6
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"vovk": "^3.0.0-draft.348"
|
|
39
39
|
},
|
|
40
40
|
"optionalDependencies": {
|
|
41
|
-
"vovk-python": "^0.0.1-draft.
|
|
41
|
+
"vovk-python": "^0.0.1-draft.56"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@iarna/toml": "^2.2.5",
|