feathers-utils 2.1.1 → 2.1.2
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/index.d.ts +1 -1
- package/package.json +17 -17
- package/src/utils/shouldSkip.ts +2 -5
package/dist/index.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ type ShouldSkipOptions = {
|
|
|
202
202
|
/**
|
|
203
203
|
* util to detect if a hook should be skipped
|
|
204
204
|
*/
|
|
205
|
-
declare const shouldSkip: <H extends HookContext<_feathersjs_feathers.Application<any, any>, any> = HookContext<_feathersjs_feathers.Application<any, any>, any
|
|
205
|
+
declare const shouldSkip: <H extends HookContext<_feathersjs_feathers.Application<any, any>, any> = HookContext<_feathersjs_feathers.Application<any, any>, any>>(hookName: string, context: H, options?: ShouldSkipOptions) => boolean;
|
|
206
206
|
|
|
207
207
|
/**
|
|
208
208
|
* util to validate a query for operators
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "feathers-utils",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Some utils for projects using '@feathersjs/feathers'",
|
|
5
5
|
"author": "fratzinger",
|
|
6
6
|
"repository": {
|
|
@@ -39,36 +39,36 @@
|
|
|
39
39
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@feathersjs/adapter-commons": "5.0.
|
|
43
|
-
"@feathersjs/commons": "^5.0.
|
|
44
|
-
"@feathersjs/errors": "5.0.
|
|
45
|
-
"@feathersjs/feathers": "5.0.
|
|
42
|
+
"@feathersjs/adapter-commons": "5.0.1",
|
|
43
|
+
"@feathersjs/commons": "^5.0.1",
|
|
44
|
+
"@feathersjs/errors": "5.0.1",
|
|
45
|
+
"@feathersjs/feathers": "5.0.1",
|
|
46
46
|
"fast-equals": "^5.0.1",
|
|
47
|
-
"feathers-hooks-common": "^7.0.
|
|
47
|
+
"feathers-hooks-common": "^7.0.1",
|
|
48
48
|
"lodash": "^4.17.21"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@feathersjs/memory": "^5.0.
|
|
51
|
+
"@feathersjs/memory": "^5.0.1",
|
|
52
52
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
53
53
|
"@types/lodash": "^4.14.191",
|
|
54
54
|
"@types/mocha": "^10.0.1",
|
|
55
|
-
"@types/node": "^18.
|
|
56
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
57
|
-
"@typescript-eslint/parser": "^5.
|
|
58
|
-
"@vitest/coverage-c8": "^0.29.
|
|
55
|
+
"@types/node": "^18.15.9",
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^5.56.0",
|
|
57
|
+
"@typescript-eslint/parser": "^5.56.0",
|
|
58
|
+
"@vitest/coverage-c8": "^0.29.7",
|
|
59
59
|
"cross-env": "^7.0.3",
|
|
60
|
-
"eslint": "^8.
|
|
61
|
-
"eslint-config-prettier": "^8.
|
|
60
|
+
"eslint": "^8.36.0",
|
|
61
|
+
"eslint-config-prettier": "^8.8.0",
|
|
62
62
|
"eslint-import-resolver-typescript": "^3.5.3",
|
|
63
63
|
"eslint-plugin-import": "^2.27.5",
|
|
64
64
|
"eslint-plugin-prettier": "^4.2.1",
|
|
65
65
|
"eslint-plugin-security": "^1.7.1",
|
|
66
|
-
"np": "^7.6.
|
|
66
|
+
"np": "^7.6.4",
|
|
67
67
|
"nyc": "^15.1.0",
|
|
68
|
-
"prettier": "^2.8.
|
|
68
|
+
"prettier": "^2.8.7",
|
|
69
69
|
"shx": "^0.3.4",
|
|
70
|
-
"typescript": "^
|
|
70
|
+
"typescript": "^5.0.2",
|
|
71
71
|
"unbuild": "^1.1.2",
|
|
72
|
-
"vitest": "^0.29.
|
|
72
|
+
"vitest": "^0.29.7"
|
|
73
73
|
}
|
|
74
74
|
}
|
package/src/utils/shouldSkip.ts
CHANGED
|
@@ -12,13 +12,10 @@ export type ShouldSkipOptions = {
|
|
|
12
12
|
/**
|
|
13
13
|
* util to detect if a hook should be skipped
|
|
14
14
|
*/
|
|
15
|
-
export const shouldSkip = <
|
|
16
|
-
H extends HookContext = HookContext,
|
|
17
|
-
O extends ShouldSkipOptions = ShouldSkipOptions
|
|
18
|
-
>(
|
|
15
|
+
export const shouldSkip = <H extends HookContext = HookContext>(
|
|
19
16
|
hookName: string,
|
|
20
17
|
context: H,
|
|
21
|
-
options?:
|
|
18
|
+
options?: ShouldSkipOptions
|
|
22
19
|
): boolean => {
|
|
23
20
|
if (!context.params || !context.params.skipHooks || options?.notSkippable) {
|
|
24
21
|
return false;
|