velocious 1.0.93 → 1.0.94

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 (33) hide show
  1. package/package.json +1 -1
  2. package/src/application.js +19 -0
  3. package/src/cli/base-command.js +1 -0
  4. package/src/cli/commands/db/migrate.js +2 -0
  5. package/src/cli/commands/generate/base-models.js +7 -0
  6. package/src/cli/commands/generate/model.js +1 -1
  7. package/src/configuration-resolver.js +6 -3
  8. package/src/configuration.js +27 -4
  9. package/src/database/drivers/base-column.js +69 -0
  10. package/src/database/drivers/base-columns-index.js +19 -0
  11. package/src/database/drivers/base-foreign-key.js +12 -0
  12. package/src/database/drivers/base-table.js +32 -0
  13. package/src/database/drivers/base.js +125 -3
  14. package/src/database/migrator.js +17 -2
  15. package/src/database/query/drop-table-base.js +8 -0
  16. package/src/database/query/index.js +42 -0
  17. package/src/database/query-parser/from-parser.js +17 -6
  18. package/src/database/query-parser/group-parser.js +21 -8
  19. package/src/database/record/index.js +5 -0
  20. package/src/database/record/relationships/base.js +18 -3
  21. package/src/database/table-data/index.js +198 -6
  22. package/src/environment-handlers/base.js +58 -0
  23. package/src/environment-handlers/browser.js +0 -24
  24. package/src/environment-handlers/node/cli/commands/generate/base-models.js +80 -0
  25. package/src/environment-handlers/node.js +6 -1
  26. package/src/initializer.js +4 -0
  27. package/src/logger.js +54 -2
  28. package/src/routes/base-route.js +25 -4
  29. package/src/routes/get-route.js +3 -1
  30. package/src/routes/namespace-route.js +3 -1
  31. package/src/routes/post-route.js +3 -1
  32. package/src/routes/resource-route.js +3 -1
  33. package/src/utils/backtrace-cleaner.js +10 -0
@@ -1,11 +1,13 @@
1
1
  import BaseRoute, {initBaseRoute} from "./base-route.js"
2
2
  import escapeStringRegexp from "escape-string-regexp"
3
+ import restArgsError from "../utils/rest-args-error.js"
3
4
 
4
5
  initBaseRoute()
5
6
 
6
7
  export default class VelociousRouteResourceRoute extends BaseRoute {
7
- constructor({name}) {
8
+ constructor({name, ...restArgs}) {
8
9
  super()
10
+ restArgsError(restArgs)
9
11
  this.name = name
10
12
  this.regExp = new RegExp(`^(${escapeStringRegexp(name)})(.*)$`)
11
13
  }
@@ -1,12 +1,22 @@
1
1
  export default class BacktraceCleaner {
2
+ /**
3
+ * @param {Error} error
4
+ * @returns {string}
5
+ */
2
6
  static getCleanedStack(error) {
3
7
  return new BacktraceCleaner(error).getCleanedStack()
4
8
  }
5
9
 
10
+ /**
11
+ * @param {Error} error
12
+ */
6
13
  constructor(error) {
7
14
  this.error = error
8
15
  }
9
16
 
17
+ /**
18
+ * @returns {string}
19
+ */
10
20
  getCleanedStack() {
11
21
  const backtrace = this.error.stack.split("\n")
12
22