velocious 1.0.105 → 1.0.107
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 +3 -1
- package/peak_flow.yml +1 -0
- package/spec/cli/commands/db/migrate-spec.js +7 -2
- package/spec/cli/commands/test/test-files-finder-spec.js +2 -0
- package/spec/database/connection/drivers/mysql/query-parser-spec.js +3 -1
- package/spec/database/drivers/mysql/connection-spec.js +1 -1
- package/spec/database/record/find-or-create-spec.js +3 -3
- package/spec/database/record/find-spec.js +1 -1
- package/spec/database/record/instance-relationships/belongs-to-relationship-spec.js +1 -1
- package/spec/database/record/instance-relationships/has-many-relationship-spec.js +3 -3
- package/spec/database/record/instance-relationships/has-one-relationship-spec.js +1 -1
- package/spec/database/record/last-spec.js +2 -2
- package/spec/database/record/preloader/belongs-to-spec.js +1 -1
- package/spec/database/record/preloader/has-many-spec.js +4 -4
- package/spec/database/record/preloader/has-one-spec.js +1 -1
- package/spec/database/record/query-spec.js +8 -6
- package/spec/database/record/translation-fallbacks-spec.js +1 -1
- package/spec/dummy/src/config/configuration.example.js +1 -0
- package/spec/dummy/src/model-bases/account.js +2 -2
- package/spec/dummy/src/model-bases/authentication-token.js +3 -3
- package/spec/dummy/src/model-bases/project-detail.js +3 -3
- package/spec/dummy/src/model-bases/project-translation.js +3 -3
- package/spec/dummy/src/model-bases/project.js +12 -12
- package/spec/dummy/src/model-bases/task.js +3 -3
- package/spec/dummy/src/model-bases/user.js +9 -9
- package/spec/dummy/src/routes/projects/controller.js +1 -1
- package/spec/dummy/src/routes/tasks/controller.js +1 -3
- package/spec/http-server/client-spec.js +1 -1
- package/spec/http-server/get-spec.js +1 -1
- package/spec/http-server/post-spec.js +9 -9
- package/spec/http-server/root-get-spec.js +2 -1
- package/src/application.js +1 -0
- package/src/cli/base-command.js +1 -1
- package/src/cli/commands/db/create.js +1 -1
- package/src/cli/use-browser-cli.js +2 -0
- package/src/configuration-types.js +11 -6
- package/src/controller.js +1 -2
- package/src/database/drivers/base.js +9 -9
- package/src/database/drivers/mssql/index.js +11 -11
- package/src/database/drivers/mssql/options.js +10 -6
- package/src/database/drivers/mysql/index.js +8 -8
- package/src/database/drivers/mysql/options.js +10 -6
- package/src/database/drivers/pgsql/index.js +10 -10
- package/src/database/drivers/pgsql/options.js +9 -6
- package/src/database/drivers/sqlite/base.js +10 -10
- package/src/database/drivers/sqlite/connection-sql-js.js +2 -0
- package/src/database/drivers/sqlite/index.js +8 -2
- package/src/database/drivers/sqlite/index.native.js +5 -1
- package/src/database/drivers/sqlite/index.web.js +2 -1
- package/src/database/drivers/sqlite/options.js +10 -7
- package/src/database/drivers/sqlite/sql/alter-table.js +3 -3
- package/src/database/migration/index.js +16 -5
- package/src/database/migrator.js +5 -1
- package/src/database/pool/base-methods-forward.js +0 -4
- package/src/database/query/alter-table-base.js +2 -2
- package/src/database/query/base.js +2 -2
- package/src/database/query/create-index-base.js +2 -2
- package/src/database/query/create-table-base.js +4 -4
- package/src/database/query/drop-table-base.js +2 -2
- package/src/database/query/index.js +2 -2
- package/src/database/record/index.js +11 -44
- package/src/database/record/instance-relationships/base.js +2 -2
- package/src/database/record/instance-relationships/has-many.js +1 -1
- package/src/database/use-database.js +1 -0
- package/src/environment-handlers/base.js +2 -2
- package/src/environment-handlers/browser.js +40 -18
- package/src/environment-handlers/node/cli/commands/destroy/migration.js +5 -1
- package/src/environment-handlers/node/cli/commands/generate/base-models.js +20 -9
- package/src/environment-handlers/node/cli/commands/generate/migration.js +5 -1
- package/src/environment-handlers/node/cli/commands/generate/model.js +5 -1
- package/src/environment-handlers/node/cli/commands/init.js +5 -1
- package/src/environment-handlers/node.js +1 -1
- package/src/http-server/client/index.js +2 -1
- package/src/http-server/client/params-to-object.js +0 -8
- package/src/http-server/client/request-buffer/index.js +1 -0
- package/src/routes/basic-route.js +1 -1
- package/src/testing/test-files-finder.js +1 -1
- package/src/testing/test-runner.js +3 -0
- package/src/testing/test.js +1 -3
- package/src/utils/with-tracked-stack-async-hooks.js +0 -2
- package/src/utils/with-tracked-stack.js +0 -2
- package/tsconfig.json +15 -0
|
@@ -13,7 +13,7 @@ export default class TestFilesFinder {
|
|
|
13
13
|
/**
|
|
14
14
|
* @param {object} args
|
|
15
15
|
* @param {string} args.directory
|
|
16
|
-
* @param {string[]} args.directories
|
|
16
|
+
* @param {string[]} [args.directories]
|
|
17
17
|
* @param {string[]} args.processArgs
|
|
18
18
|
*/
|
|
19
19
|
constructor({directory, directories, processArgs, ...restArgs}) {
|
|
@@ -11,6 +11,9 @@ import {tests} from "./test.js"
|
|
|
11
11
|
* @typedef {object} TestArgs
|
|
12
12
|
* @property {Application} [application]
|
|
13
13
|
* @property {RequestClient} [client]
|
|
14
|
+
* @property {object} [databaseCleaning]
|
|
15
|
+
* @property {boolean} [databaseCleaning.transaction]
|
|
16
|
+
* @property {boolean} [databaseCleaning.truncate]
|
|
14
17
|
* @property {boolean} [focus]
|
|
15
18
|
* @property {() => Promise<void>} [function]
|
|
16
19
|
* @property {string} [type]
|
package/src/testing/test.js
CHANGED
|
@@ -412,7 +412,6 @@ function it(description, arg1, arg2) {
|
|
|
412
412
|
let testFunction
|
|
413
413
|
|
|
414
414
|
if (typeof arg1 == "function") {
|
|
415
|
-
// @ts-expect-error
|
|
416
415
|
testFunction = arg1
|
|
417
416
|
testArgs = {}
|
|
418
417
|
} else if (typeof arg2 == "function") {
|
|
@@ -440,7 +439,6 @@ function fit(description, arg1, arg2) {
|
|
|
440
439
|
let testFunction
|
|
441
440
|
|
|
442
441
|
if (typeof arg1 == "function") {
|
|
443
|
-
// @ts-expect-error
|
|
444
442
|
testFunction = arg1
|
|
445
443
|
testArgs = {focus: true}
|
|
446
444
|
} else if (typeof arg2 == "function") {
|
|
@@ -461,4 +459,4 @@ globalThis.expect = expect
|
|
|
461
459
|
globalThis.it = it
|
|
462
460
|
globalThis.fit = fit
|
|
463
461
|
|
|
464
|
-
export {describe, expect, fit, it, tests}
|
|
462
|
+
export {afterEach, beforeEach, describe, expect, fit, it, tests}
|
|
@@ -76,11 +76,9 @@ async function withTrackedStack(arg1, arg2) {
|
|
|
76
76
|
})
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
// @ts-expect-error
|
|
80
79
|
if (globalThis.withTrackedStack) {
|
|
81
80
|
console.warn("globalThis.withTrackedStack was already defined")
|
|
82
81
|
} else {
|
|
83
|
-
// @ts-expect-error
|
|
84
82
|
globalThis.withTrackedStack = {addTrackedStackToError, withTrackedStack}
|
|
85
83
|
}
|
|
86
84
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
/** @param {Error} error */
|
|
4
4
|
function addTrackedStackToError(error) {
|
|
5
|
-
// @ts-expect-error
|
|
6
5
|
globalThis.withTrackedStack?.addTrackedStackToError(error)
|
|
7
6
|
}
|
|
8
7
|
|
|
@@ -11,7 +10,6 @@ function addTrackedStackToError(error) {
|
|
|
11
10
|
* @returns {Promise<any>}
|
|
12
11
|
*/
|
|
13
12
|
async function withTrackedStack(...args) {
|
|
14
|
-
// @ts-expect-error
|
|
15
13
|
const withTrackedStack = globalThis.withTrackedStack?.withTrackedStack
|
|
16
14
|
|
|
17
15
|
let callback
|
package/tsconfig.json
ADDED