velocious 1.0.19 → 1.0.20

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli/index.js +5 -3
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "velocious": "bin/velocious.js"
4
4
  },
5
5
  "name": "velocious",
6
- "version": "1.0.19",
6
+ "version": "1.0.20",
7
7
  "main": "index.js",
8
8
  "scripts": {
9
9
  "test": "jasmine",
package/src/cli/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import configurationResolver from "../configuration-resolver.js"
2
2
  import {dirname} from "path"
3
3
  import {fileURLToPath} from "url"
4
+ import fs from "fs/promises"
5
+
4
6
  import fileExists from "../utils/file-exists.js"
5
7
 
6
8
  export default class VelociousCli {
@@ -9,11 +11,11 @@ export default class VelociousCli {
9
11
  }
10
12
 
11
13
  async execute() {
12
- const __filename = fileURLToPath(`${import.meta.url}/../..`)
13
- const __dirname = dirname(__filename)
14
+ const __filename = fileURLToPath(import.meta.url)
15
+ const basePath = await fs.realpath(`${dirname(__filename)}/../..`)
14
16
  const commandParts = this.args.processArgs[0].split(":")
15
17
  const filePaths = []
16
- let filePath = `${__dirname}/src/cli/commands`
18
+ let filePath = `${basePath}/src/cli/commands`
17
19
 
18
20
  for (let commandPart of commandParts) {
19
21
  if (commandPart == "d") commandPart = "destroy"