@mainset/cli 0.4.1 → 0.4.2

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.
@@ -1,6 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
- import { fileURLToPath } from 'url';
3
+ // import { fileURLToPath } from 'url';
4
4
  import { runtimePathById } from './path.mjs';
5
5
  function resolveHostPackageNodeModulesPath(hostPackageName, dependencyPackageName) {
6
6
  const hostPackageDependencyPackagePath = path.resolve(runtimePathById.root, `node_modules/${hostPackageName}/node_modules/${dependencyPackageName}`);
@@ -8,7 +8,8 @@ function resolveHostPackageNodeModulesPath(hostPackageName, dependencyPackageNam
8
8
  // Otherwise, return just the package name (for packages installed from the registry)
9
9
  return fs.existsSync(hostPackageDependencyPackagePath)
10
10
  ? hostPackageDependencyPackagePath
11
- : fileURLToPath(import.meta.resolve(dependencyPackageName));
11
+ : fs.realpathSync(dependencyPackageName);
12
+ // : fileURLToPath(import.meta.resolve(dependencyPackageName));
12
13
  }
13
14
  function resolveHostPackageBinForCLICommandPath(hostPackageName,
14
15
  // dependencyPackageName: string,
@@ -37,11 +38,11 @@ cliCommandName) {
37
38
  // return fileURLToPath(
38
39
  // import.meta.resolve(hostPackageDependencyBinCLICommandPath),
39
40
  // );
40
- return hostPackageDependencyBinCLICommandPath;
41
+ return fs.realpathSync(hostPackageDependencyBinCLICommandPath);
41
42
  }
42
43
  // Otherwise, return the path to the dependency in the root node_modules (for registry-installed packages)
43
44
  const dependencyBinCLICommandPath = path.resolve(runtimePathById.root, `node_modules/.bin/${cliCommandName}`);
44
45
  // return fileURLToPath(import.meta.resolve(dependencyBinCLICommandPath));
45
- return dependencyBinCLICommandPath;
46
+ return fs.realpathSync(dependencyBinCLICommandPath);
46
47
  }
47
48
  export { resolveHostPackageBinForCLICommandPath, resolveHostPackageNodeModulesPath, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mainset/cli",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "A unified CLI tool for accelerating development, based on mainset vision of front-end infrastructure",
5
5
  "homepage": "https://github.com/mainset/dev-stack-fe/tree/main/packages/cli",
6
6
  "bugs": {