velocious 1.0.109 → 1.0.111
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/dist/src/cli/use-browser-cli.d.ts.map +1 -1
- package/dist/src/cli/use-browser-cli.js +0 -1
- package/dist/src/database/drivers/base.js +1 -1
- package/dist/src/database/use-database.d.ts.map +1 -1
- package/dist/src/database/use-database.js +0 -1
- package/dist/src/environment-handlers/node/cli/commands/generate/base-models.d.ts.map +1 -1
- package/dist/src/environment-handlers/node/cli/commands/generate/base-models.js +9 -7
- package/dist/src/testing/test.js +1 -1
- package/package.json +7 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-browser-cli.d.ts","sourceRoot":"","sources":["../../../src/cli/use-browser-cli.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-browser-cli.d.ts","sourceRoot":"","sources":["../../../src/cli/use-browser-cli.js"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,+EAHG;IAAoD,aAAa,EAAzD,OAAO,qBAAqB,EAAE,OAAO;CAC7C,GAAU,OAAO,CAAC,UAAU,CAAC,CAe/B;uBAvBsB,kBAAkB"}
|
|
@@ -45,7 +45,7 @@ import UUID from "pure-uuid";
|
|
|
45
45
|
import TableData from "../table-data/index.js";
|
|
46
46
|
import TableColumn from "../table-data/table-column.js";
|
|
47
47
|
import TableForeignKey from "../table-data/table-foreign-key.js";
|
|
48
|
-
import wait from "awaitery/
|
|
48
|
+
import wait from "awaitery/dist/wait.js";
|
|
49
49
|
export default class VelociousDatabaseDriversBase {
|
|
50
50
|
/** @type {number | undefined} */
|
|
51
51
|
idSeq = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-database.d.ts","sourceRoot":"","sources":["../../../src/database/use-database.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-database.d.ts","sourceRoot":"","sources":["../../../src/database/use-database.js"],"names":[],"mappings":"AASA;;;;GAIG;AACH,0FAHG;IAAuF,gCAAgC,EAA/G,MAAM,OAAO,CAAC,OAAO,qBAAqB,EAAE,2BAA2B,CAAC;CAChF,GAAU;IAAC,MAAM,EAAE,OAAO,CAAA;CAAC,CAkC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-models.d.ts","sourceRoot":"","sources":["../../../../../../../src/environment-handlers/node/cli/commands/generate/base-models.js"],"names":[],"mappings":"AAKA;IACE,yBA4OC;IAED;;;OAGG;IACH,4BAHW,OAAO,gDAAgD,EAAE,OAAO,GAC9D,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"base-models.d.ts","sourceRoot":"","sources":["../../../../../../../src/environment-handlers/node/cli/commands/generate/base-models.js"],"names":[],"mappings":"AAKA;IACE,yBA4OC;IAED;;;OAGG;IACH,4BAHW,OAAO,gDAAgD,EAAE,OAAO,GAC9D,MAAM,GAAG,SAAS,CAY9B;CACF;wBAnQuB,oCAAoC"}
|
|
@@ -22,16 +22,15 @@ export default class DbGenerateModel extends BaseCommand {
|
|
|
22
22
|
const modelPath = `${modelsDir}/${modelBaseFileName}`;
|
|
23
23
|
console.log(`create src/model-bases/${modelBaseFileName}`);
|
|
24
24
|
let fileContent = "";
|
|
25
|
-
let velociousPath
|
|
25
|
+
let velociousPath;
|
|
26
26
|
if (devMode) {
|
|
27
|
-
velociousPath = "
|
|
28
|
-
fileContent += `import DatabaseRecord from "../../../../src/database/record/index.js"\n\n`;
|
|
29
|
-
// /** @type {import("./instance-relationships/has-many.js").default} */
|
|
27
|
+
velociousPath = "../../../../src";
|
|
30
28
|
}
|
|
31
29
|
else {
|
|
32
|
-
|
|
30
|
+
velociousPath = "velocious/dist/src";
|
|
33
31
|
}
|
|
34
|
-
|
|
32
|
+
fileContent += `import DatabaseRecord from "${velociousPath}/database/record/index.js"\n\n`;
|
|
33
|
+
const hasManyRelationFilePath = `${velociousPath}/database/record/instance-relationships/has-many.js`;
|
|
35
34
|
fileContent += `export default class ${modelNameCamelized}Base extends DatabaseRecord {\n`;
|
|
36
35
|
const columns = await modelClass._getTable().getColumns();
|
|
37
36
|
let methodsCount = 0;
|
|
@@ -167,7 +166,7 @@ export default class DbGenerateModel extends BaseCommand {
|
|
|
167
166
|
recordImport = `../model-bases/${fileName}.js`;
|
|
168
167
|
}
|
|
169
168
|
else {
|
|
170
|
-
recordImport = `${velociousPath}/
|
|
169
|
+
recordImport = `${velociousPath}/database/record/index.js`;
|
|
171
170
|
}
|
|
172
171
|
fileContent += " /**\n";
|
|
173
172
|
fileContent += ` * @returns {import("${hasManyRelationFilePath}").default}\n`;
|
|
@@ -215,5 +214,8 @@ export default class DbGenerateModel extends BaseCommand {
|
|
|
215
214
|
else if (["date", "datetime"].includes(column.getType())) {
|
|
216
215
|
return "Date";
|
|
217
216
|
}
|
|
217
|
+
else {
|
|
218
|
+
console.error(`Unknown column type: ${column.getType()}`);
|
|
219
|
+
}
|
|
218
220
|
}
|
|
219
221
|
}
|
package/dist/src/testing/test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
import { anythingDifferent } from "set-state-compare/
|
|
2
|
+
import { anythingDifferent } from "set-state-compare/build/diff-utils.js";
|
|
3
3
|
import restArgsError from "../utils/rest-args-error.js";
|
|
4
4
|
/** @type {import("./test-runner.js").TestsArgument} */
|
|
5
5
|
const tests = {
|
package/package.json
CHANGED
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
"velocious": "dist/bin/velocious.js"
|
|
4
4
|
},
|
|
5
5
|
"name": "velocious",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.111",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"files": ["dist/**"],
|
|
10
10
|
"scripts": {
|
|
11
|
-
"
|
|
11
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
12
12
|
"lint": "eslint",
|
|
13
13
|
"test": "VELOCIOUS_TEST_DIR=../ cd spec/dummy && npx velocious test",
|
|
14
|
-
"prepublishOnly": "npm run
|
|
14
|
+
"prepublishOnly": "npm run build",
|
|
15
15
|
"typecheck": "tsc --noEmit",
|
|
16
|
-
"velocious": "asd"
|
|
16
|
+
"velocious": "asd",
|
|
17
|
+
"watch": "tsc -p tsconfig.build.json -w"
|
|
17
18
|
},
|
|
18
19
|
"type": "module",
|
|
19
20
|
"repository": {
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
"homepage": "https://github.com/kaspernj/velocious#readme",
|
|
29
30
|
"description": "",
|
|
30
31
|
"dependencies": {
|
|
31
|
-
"awaitery": "^1.0.
|
|
32
|
+
"awaitery": "^1.0.4",
|
|
32
33
|
"bcryptjs": "^3.0.2",
|
|
33
34
|
"better-localstorage": "^1.0.7",
|
|
34
35
|
"debounce": "^3.0.0",
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
"inflection": "^3.0.0",
|
|
42
43
|
"is-plain-object": "^5.0.0",
|
|
43
44
|
"pure-uuid": "^1.8.1",
|
|
44
|
-
"set-state-compare": "^1.0.
|
|
45
|
+
"set-state-compare": "^1.0.61",
|
|
45
46
|
"sql-escape-string": "^1.1.0",
|
|
46
47
|
"sql.js": "^1.12.0",
|
|
47
48
|
"strftime": "^0.10.2"
|