@pronto-tools-and-more/cli 3.3.10 → 3.3.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/cli",
3
- "version": "3.3.10",
3
+ "version": "3.3.11",
4
4
  "description": "",
5
5
  "main": "src/main.js",
6
6
  "type": "module",
@@ -15,7 +15,7 @@
15
15
  "author": "",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "@pronto-tools-and-more/pronto": "3.3.10"
18
+ "@pronto-tools-and-more/pronto": "3.3.11"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/node": "^20.12.7"
@@ -1,10 +1,7 @@
1
1
  import { join } from "node:path";
2
2
  import * as Root from "../Root/Root.js";
3
+ import * as ResolveBin from "../ResolveBin/ResolveBin.js";
3
4
 
4
- export const prontoPath = join(
5
- Root.root,
6
- "packages",
7
- "pronto",
8
- "src",
9
- "main.js"
10
- );
5
+ export const prontoPath =
6
+ ResolveBin.resolveBin("@pronto-tools-and-more/pronto") ||
7
+ join(Root.root, "packages", "pronto", "src", "main.js");
@@ -0,0 +1,11 @@
1
+ import { fileURLToPath } from 'node:url'
2
+
3
+ export const resolveBin = (name) => {
4
+ try {
5
+ const uri = import.meta.resolve(name)
6
+ const path = fileURLToPath(uri)
7
+ return path
8
+ } catch {
9
+ return ''
10
+ }
11
+ }