vovk 0.2.3-beta.70 → 0.2.3-beta.72
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/cli/getVars.js +1 -1
- package/cli/index.js +2 -2
- package/cli/lib/getReturnPath.js +5 -3
- package/package.json +1 -1
package/cli/getVars.js
CHANGED
package/cli/index.js
CHANGED
|
@@ -82,7 +82,7 @@ if (argv._.includes('build')) {
|
|
|
82
82
|
|
|
83
83
|
// @ts-expect-error yargs
|
|
84
84
|
if (argv._.includes('generate')) {
|
|
85
|
-
void generateClient(env).then(() => {
|
|
86
|
-
console.info(
|
|
85
|
+
void generateClient(env).then(({ path }) => {
|
|
86
|
+
console.info(` 🐺 Client generated in ${path}`);
|
|
87
87
|
});
|
|
88
88
|
}
|
package/cli/lib/getReturnPath.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
function getReturnPath(fromPath, toPath) {
|
|
3
3
|
// Split the paths into components
|
|
4
|
-
const fromParts = fromPath.split('/');
|
|
5
|
-
const toParts = toPath.split('/');
|
|
4
|
+
const fromParts = fromPath.replace(/^\.?\/|\/$/g, '').split('/');
|
|
5
|
+
const toParts = toPath.replace(/^\.?\/|\/$/g, '').split('/');
|
|
6
6
|
|
|
7
7
|
// Find the common base path length
|
|
8
8
|
const length = Math.min(fromParts.length, toParts.length);
|
|
@@ -19,7 +19,9 @@ function getReturnPath(fromPath, toPath) {
|
|
|
19
19
|
const stepsDown = toParts.slice(commonBaseLength).join('/');
|
|
20
20
|
|
|
21
21
|
// Combine steps up and steps down
|
|
22
|
-
|
|
22
|
+
const result = stepsUp + stepsDown;
|
|
23
|
+
|
|
24
|
+
return result;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
module.exports = getReturnPath;
|