@nocobase/data-source-manager 1.5.0-beta.1 → 1.6.0-alpha.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.
|
@@ -7,11 +7,9 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var __create = Object.create;
|
|
11
10
|
var __defProp = Object.defineProperty;
|
|
12
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
15
13
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
14
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
17
15
|
var __export = (target, all) => {
|
|
@@ -26,14 +24,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
26
24
|
}
|
|
27
25
|
return to;
|
|
28
26
|
};
|
|
29
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
-
mod
|
|
36
|
-
));
|
|
37
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
28
|
var load_default_actions_exports = {};
|
|
39
29
|
__export(load_default_actions_exports, {
|
|
@@ -41,9 +31,7 @@ __export(load_default_actions_exports, {
|
|
|
41
31
|
});
|
|
42
32
|
module.exports = __toCommonJS(load_default_actions_exports);
|
|
43
33
|
var import_list = require("./default-actions/list");
|
|
44
|
-
var import_move = require("./default-actions/move");
|
|
45
34
|
var import_proxy_to_repository = require("./default-actions/proxy-to-repository");
|
|
46
|
-
var import_actions = __toESM(require("@nocobase/actions"));
|
|
47
35
|
const actions = {
|
|
48
36
|
add: {
|
|
49
37
|
params(ctx) {
|
|
@@ -109,8 +97,7 @@ function loadDefaultActions() {
|
|
|
109
97
|
carry[key] = (0, import_proxy_to_repository.proxyToRepository)(actions[key].params, actions[key].method);
|
|
110
98
|
return carry;
|
|
111
99
|
}, {}),
|
|
112
|
-
list: import_list.list
|
|
113
|
-
move: (0, import_move.createMoveAction)(import_actions.default.move)
|
|
100
|
+
list: import_list.list
|
|
114
101
|
};
|
|
115
102
|
}
|
|
116
103
|
__name(loadDefaultActions, "loadDefaultActions");
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/data-source-manager",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0-alpha.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"main": "./lib/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@nocobase/actions": "1.
|
|
10
|
-
"@nocobase/cache": "1.
|
|
11
|
-
"@nocobase/database": "1.
|
|
12
|
-
"@nocobase/resourcer": "1.
|
|
13
|
-
"@nocobase/utils": "1.
|
|
9
|
+
"@nocobase/actions": "1.6.0-alpha.2",
|
|
10
|
+
"@nocobase/cache": "1.6.0-alpha.2",
|
|
11
|
+
"@nocobase/database": "1.6.0-alpha.2",
|
|
12
|
+
"@nocobase/resourcer": "1.6.0-alpha.2",
|
|
13
|
+
"@nocobase/utils": "1.6.0-alpha.2",
|
|
14
14
|
"@types/jsonwebtoken": "^8.5.8",
|
|
15
15
|
"jsonwebtoken": "^8.5.1"
|
|
16
16
|
},
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
20
20
|
"directory": "packages/auth"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "08bbc34c21727fc0ad0880f397a42bf7741091ee"
|
|
23
23
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
import { Context } from '@nocobase/actions';
|
|
10
|
-
export declare function createMoveAction(databaseMoveAction: any): (ctx: Context, next: any) => Promise<any>;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
15
|
-
var __export = (target, all) => {
|
|
16
|
-
for (var name in all)
|
|
17
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
-
};
|
|
19
|
-
var __copyProps = (to, from, except, desc) => {
|
|
20
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
21
|
-
for (let key of __getOwnPropNames(from))
|
|
22
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
23
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
24
|
-
}
|
|
25
|
-
return to;
|
|
26
|
-
};
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
var move_exports = {};
|
|
29
|
-
__export(move_exports, {
|
|
30
|
-
createMoveAction: () => createMoveAction
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(move_exports);
|
|
33
|
-
function createMoveAction(databaseMoveAction) {
|
|
34
|
-
return /* @__PURE__ */ __name(async function move(ctx, next) {
|
|
35
|
-
const repository = ctx.getCurrentRepository();
|
|
36
|
-
if (repository.move) {
|
|
37
|
-
ctx.body = await repository.move(ctx.action.params);
|
|
38
|
-
await next();
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (repository.database) {
|
|
42
|
-
ctx.databaseRepository = repository;
|
|
43
|
-
return databaseMoveAction(ctx, next);
|
|
44
|
-
}
|
|
45
|
-
throw new Error(`Repository can not handle action move for ${ctx.action.resourceName}`);
|
|
46
|
-
}, "move");
|
|
47
|
-
}
|
|
48
|
-
__name(createMoveAction, "createMoveAction");
|
|
49
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
-
0 && (module.exports = {
|
|
51
|
-
createMoveAction
|
|
52
|
-
});
|