@ditojs/server 2.6.9 → 2.7.0

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/server",
3
- "version": "2.6.9",
3
+ "version": "2.7.0",
4
4
  "type": "module",
5
5
  "description": "Dito.js Server – Dito.js is a declarative and modern web framework, based on Objection.js, Koa.js and Vue.js",
6
6
  "repository": "https://github.com/ditojs/dito/tree/master/packages/server",
@@ -22,10 +22,10 @@
22
22
  "node >= 18"
23
23
  ],
24
24
  "dependencies": {
25
- "@ditojs/admin": "^2.6.9",
25
+ "@ditojs/admin": "^2.7.0",
26
26
  "@ditojs/build": "^2.5.0",
27
- "@ditojs/router": "^2.6.0",
28
- "@ditojs/utils": "^2.6.0",
27
+ "@ditojs/router": "^2.7.0",
28
+ "@ditojs/utils": "^2.7.0",
29
29
  "@koa/cors": "^4.0.0",
30
30
  "@koa/multer": "^3.0.2",
31
31
  "@originjs/vite-plugin-commonjs": "^1.0.3",
@@ -88,7 +88,7 @@
88
88
  "typescript": "^5.0.4"
89
89
  },
90
90
  "types": "types",
91
- "gitHead": "40ee20c006b240c735252fb8fcebd538ace2f508",
91
+ "gitHead": "874c68d5807ba97b67867f6b8d13f8fcb4990533",
92
92
  "scripts": {
93
93
  "types": "tsc --noEmit --esModuleInterop ./types/index.d.ts"
94
94
  },
@@ -30,7 +30,8 @@ import {
30
30
  parseDataPath,
31
31
  normalizeDataPath,
32
32
  toPromiseCallback,
33
- mapConcurrently
33
+ mapConcurrently,
34
+ deprecate
34
35
  } from '@ditojs/utils'
35
36
  import { Validator } from './Validator.js'
36
37
  import { EventEmitter } from '../lib/index.js'
@@ -39,7 +40,6 @@ import { Service } from '../services/index.js'
39
40
  import { Storage } from '../storage/index.js'
40
41
  import { convertSchema } from '../schema/index.js'
41
42
  import { getDuration, subtractDuration } from '../utils/duration.js'
42
- import { deprecate } from '../utils/deprecate.js'
43
43
  import {
44
44
  ResponseError,
45
45
  ValidationError,
@@ -5,13 +5,12 @@ import { defineConfig, createServer } from 'vite'
5
5
  import createVuePlugin from '@vitejs/plugin-vue'
6
6
  import { viteCommonjs as createCommonJsPlugin } from '@originjs/vite-plugin-commonjs'
7
7
  import { testModuleIdentifier, getPostCssConfig } from '@ditojs/build'
8
- import { merge } from '@ditojs/utils'
8
+ import { merge, deprecate } from '@ditojs/utils'
9
9
  import { Controller } from './Controller.js'
10
10
  import { handleConnectMiddleware } from '../middleware/index.js'
11
11
  import { ControllerError } from '../errors/index.js'
12
12
  import { getRandomFreePort } from '../utils/net.js'
13
13
  import { formatJson } from '../utils/json.js'
14
- import { deprecate } from '../utils/deprecate.js'
15
14
 
16
15
  export class AdminController extends Controller {
17
16
  // @override
@@ -16,7 +16,6 @@ import {
16
16
  import { processHandlerParameters } from '../utils/handler.js'
17
17
  import { describeFunction } from '../utils/function.js'
18
18
  import { formatJson } from '../utils/json.js'
19
- import { deprecate } from '../utils/deprecate.js'
20
19
  import {
21
20
  isObject,
22
21
  isString,
@@ -26,7 +25,8 @@ import {
26
25
  asArray,
27
26
  equals,
28
27
  parseDataPath,
29
- normalizeDataPath
28
+ normalizeDataPath,
29
+ deprecate
30
30
  } from '@ditojs/utils'
31
31
 
32
32
  export class Controller {
@@ -1,7 +1,6 @@
1
- import { isArray, isObject } from '@ditojs/utils'
1
+ import { isArray, isObject, deprecate } from '@ditojs/utils'
2
2
  import { createDecorator } from '../utils/decorator.js'
3
3
  import { formatJson } from '../utils/json.js'
4
- import { deprecate } from '../utils/deprecate.js'
5
4
 
6
5
  export function parameters(parameters, options) {
7
6
  if (isObject(parameters)) {
@@ -8,7 +8,8 @@ import {
8
8
  mapKeys,
9
9
  getValueAtDataPath,
10
10
  setValueAtDataPath,
11
- parseDataPath
11
+ parseDataPath,
12
+ deprecate
12
13
  } from '@ditojs/utils'
13
14
  import { QueryParameters } from './QueryParameters.js'
14
15
  import { KnexHelper } from '../lib/index.js'
@@ -16,7 +17,6 @@ import { DitoGraphProcessor, walkGraph } from '../graph/index.js'
16
17
  import { QueryBuilderError, RelationError } from '../errors/index.js'
17
18
  import { createLookup } from '../utils/object.js'
18
19
  import { getScope } from '../utils/scope.js'
19
- import { deprecate } from '../utils/deprecate.js'
20
20
 
21
21
  const SYMBOL_ALL = Symbol('all')
22
22
 
@@ -4,9 +4,8 @@ import multer from '@koa/multer'
4
4
  import picomatch from 'picomatch'
5
5
  import { PassThrough } from 'stream'
6
6
  import { readMediaAttributes } from 'leather'
7
- import { hyphenate, toPromiseCallback } from '@ditojs/utils'
7
+ import { hyphenate, toPromiseCallback, deprecate } from '@ditojs/utils'
8
8
  import { AssetFile } from './AssetFile.js'
9
- import { deprecate } from '../utils/deprecate.js'
10
9
 
11
10
  const storageClasses = {}
12
11
 
@@ -1,9 +0,0 @@
1
- const loggedDeprecations = new Set()
2
-
3
- export function deprecate(message) {
4
- // Only log deprecation messages once.
5
- if (!loggedDeprecations.has(message)) {
6
- loggedDeprecations.add(message)
7
- console.warn(message)
8
- }
9
- }