@nocobase/actions 0.7.4-alpha.7 → 0.7.6-alpha.1
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/lib/actions/update.js +4 -3
- package/lib/index.d.ts +2 -0
- package/package.json +5 -4
package/lib/actions/update.js
CHANGED
|
@@ -19,22 +19,23 @@ function _update() {
|
|
|
19
19
|
_update = _asyncToGenerator(function* (ctx, next) {
|
|
20
20
|
const repository = (0, _utils.getRepositoryFromParams)(ctx);
|
|
21
21
|
const _ctx$action$params = ctx.action.params,
|
|
22
|
+
forceUpdate = _ctx$action$params.forceUpdate,
|
|
22
23
|
filterByTk = _ctx$action$params.filterByTk,
|
|
23
24
|
values = _ctx$action$params.values,
|
|
24
25
|
whitelist = _ctx$action$params.whitelist,
|
|
25
26
|
blacklist = _ctx$action$params.blacklist,
|
|
26
27
|
filter = _ctx$action$params.filter,
|
|
27
28
|
updateAssociationValues = _ctx$action$params.updateAssociationValues;
|
|
28
|
-
|
|
29
|
+
ctx.body = yield repository.update({
|
|
29
30
|
filterByTk,
|
|
30
31
|
values,
|
|
31
32
|
whitelist,
|
|
32
33
|
blacklist,
|
|
33
34
|
filter,
|
|
34
35
|
updateAssociationValues,
|
|
35
|
-
context: ctx
|
|
36
|
+
context: ctx,
|
|
37
|
+
forceUpdate
|
|
36
38
|
});
|
|
37
|
-
ctx.body = instance;
|
|
38
39
|
yield next();
|
|
39
40
|
});
|
|
40
41
|
return _update.apply(this, arguments);
|
package/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import Koa from 'koa';
|
|
2
2
|
import { Database } from '@nocobase/database';
|
|
3
3
|
import { Action } from '@nocobase/resourcer';
|
|
4
|
+
import { Cache } from '@nocobase/cache';
|
|
4
5
|
import * as actions from './actions';
|
|
5
6
|
export * as utils from './utils';
|
|
6
7
|
export declare type Next = () => Promise<any>;
|
|
7
8
|
export interface Context extends Koa.Context {
|
|
8
9
|
db: Database;
|
|
10
|
+
cache: Cache;
|
|
9
11
|
action: Action;
|
|
10
12
|
body: any;
|
|
11
13
|
app: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/actions",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"licenses": [
|
|
@@ -12,13 +12,14 @@
|
|
|
12
12
|
"main": "./lib/index.js",
|
|
13
13
|
"types": "./lib/index.d.ts",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@nocobase/
|
|
16
|
-
"@nocobase/
|
|
15
|
+
"@nocobase/cache": "0.7.6-alpha.1",
|
|
16
|
+
"@nocobase/database": "0.7.6-alpha.1",
|
|
17
|
+
"@nocobase/resourcer": "0.7.6-alpha.1"
|
|
17
18
|
},
|
|
18
19
|
"repository": {
|
|
19
20
|
"type": "git",
|
|
20
21
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
21
22
|
"directory": "packages/actions"
|
|
22
23
|
},
|
|
23
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "f20ce011a9ac516dc6aec110979f063a0e63f923"
|
|
24
25
|
}
|