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 CHANGED
@@ -24,7 +24,7 @@ function getVars(rcPath, options = {}) {
24
24
 
25
25
  vars = {
26
26
  VOVK_CLIENT_OUT:
27
- process.env.VOVK_OUT ||
27
+ process.env.VOVK_CLIENT_OUT ||
28
28
  (options.VOVK_CLIENT_OUT?.startsWith('/')
29
29
  ? options.VOVK_CLIENT_OUT
30
30
  : options.VOVK_CLIENT_OUT
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(' 🐺 Client generated');
85
+ void generateClient(env).then(({ path }) => {
86
+ console.info(` 🐺 Client generated in ${path}`);
87
87
  });
88
88
  }
@@ -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
- return stepsUp + stepsDown;
22
+ const result = stepsUp + stepsDown;
23
+
24
+ return result;
23
25
  }
24
26
 
25
27
  module.exports = getReturnPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "0.2.3-beta.70",
3
+ "version": "0.2.3-beta.72",
4
4
  "description": "Structural add-on for Next.js",
5
5
  "bin": "./cli/index.js",
6
6
  "scripts": {