velocious 1.0.18 → 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.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "velocious": "bin/velocious.js"
4
4
  },
5
5
  "name": "velocious",
6
- "version": "1.0.18",
6
+ "version": "1.0.20",
7
7
  "main": "index.js",
8
8
  "scripts": {
9
9
  "test": "jasmine",
@@ -38,7 +38,6 @@
38
38
  "incorporator": "^1.0.2",
39
39
  "inflection": "^3.0.0",
40
40
  "sql-escape-string": "^1.1.0",
41
- "sql-string-escape": "^1.1.6",
42
41
  "sql.js": "^1.12.0",
43
42
  "strftime": "^0.10.2"
44
43
  }
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"
@@ -5,7 +5,7 @@ import Base from "../base.js"
5
5
  import CreateIndex from "../sqlite/sql/create-index.js"
6
6
  import CreateTable from "../sqlite/sql/create-table.js"
7
7
  import Delete from "../sqlite/sql/delete.js"
8
- import escapeString from "sql-string-escape"
8
+ import escapeString from "sql-escape-string"
9
9
  import Insert from "../sqlite/sql/insert.js"
10
10
  import Options from "../sqlite/options.js"
11
11
  import QueryParser from "../sqlite/query-parser.js"