@nocobase/plugin-workflow-test 2.0.0-alpha.50 → 2.0.0-alpha.52
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/externalVersion.js
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.0.0-alpha.
|
|
12
|
-
"@nocobase/utils": "2.0.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.0.0-alpha.52",
|
|
12
|
+
"@nocobase/utils": "2.0.0-alpha.52",
|
|
13
13
|
"lodash": "4.17.21",
|
|
14
|
-
"@nocobase/test": "2.0.0-alpha.
|
|
15
|
-
"@nocobase/server": "2.0.0-alpha.
|
|
16
|
-
"@nocobase/data-source-manager": "2.0.0-alpha.
|
|
17
|
-
"@nocobase/database": "2.0.0-alpha.
|
|
14
|
+
"@nocobase/test": "2.0.0-alpha.52",
|
|
15
|
+
"@nocobase/server": "2.0.0-alpha.52",
|
|
16
|
+
"@nocobase/data-source-manager": "2.0.0-alpha.52",
|
|
17
|
+
"@nocobase/database": "2.0.0-alpha.52"
|
|
18
18
|
};
|
package/dist/server/index.js
CHANGED
|
@@ -50,6 +50,7 @@ var import_utils = require("@nocobase/utils");
|
|
|
50
50
|
var import_functions = __toESM(require("./functions"));
|
|
51
51
|
var import_instructions = __toESM(require("./instructions"));
|
|
52
52
|
var import_triggers = __toESM(require("./triggers"));
|
|
53
|
+
var import_database = require("@nocobase/database");
|
|
53
54
|
var import_test2 = require("@nocobase/test");
|
|
54
55
|
class TestCollectionPlugin extends import_server.Plugin {
|
|
55
56
|
async load() {
|
|
@@ -69,6 +70,10 @@ async function getApp({
|
|
|
69
70
|
"field-sort",
|
|
70
71
|
"file-manager",
|
|
71
72
|
"system-settings",
|
|
73
|
+
"users",
|
|
74
|
+
"auth",
|
|
75
|
+
"acl",
|
|
76
|
+
"data-source-manager",
|
|
72
77
|
[
|
|
73
78
|
"workflow",
|
|
74
79
|
{
|
|
@@ -82,24 +87,35 @@ async function getApp({
|
|
|
82
87
|
...plugins
|
|
83
88
|
]
|
|
84
89
|
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
app.dataSourceManager.factory.register("sequelize", import_data_source_manager.SequelizeDataSource);
|
|
91
|
+
const DataSourceRepo = app.db.getRepository("dataSources");
|
|
92
|
+
await DataSourceRepo.create({
|
|
93
|
+
values: {
|
|
94
|
+
key: "another",
|
|
95
|
+
name: "Another Data Source",
|
|
96
|
+
type: "sequelize",
|
|
97
|
+
options: {
|
|
98
|
+
collectionManager: {
|
|
99
|
+
...(0, import_database.getConfigByEnv)(),
|
|
90
100
|
tablePrefix: `t${(0, import_utils.uid)(5)}`
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
);
|
|
96
|
-
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
const loadStart = Date.now();
|
|
106
|
+
let another = app.dataSourceManager.dataSources.get("another");
|
|
107
|
+
while (!(another == null ? void 0 : another.collectionManager)) {
|
|
108
|
+
if (Date.now() - loadStart >= 5e3) {
|
|
109
|
+
throw new Error('Timed out waiting for the "another" data source to load');
|
|
110
|
+
}
|
|
111
|
+
await (0, import_test.sleep)(1e3);
|
|
112
|
+
another = app.dataSourceManager.dataSources.get("another");
|
|
113
|
+
}
|
|
97
114
|
const anotherDB = another.collectionManager.db;
|
|
98
115
|
await anotherDB.import({
|
|
99
116
|
directory: import_path.default.resolve(__dirname, "collections")
|
|
100
117
|
});
|
|
101
118
|
await anotherDB.sync();
|
|
102
|
-
another.acl.allow("*", "*", "loggedIn");
|
|
103
119
|
return app;
|
|
104
120
|
}
|
|
105
121
|
async function getCluster({ plugins = [], collectionsPath, ...options }) {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"displayName": "Workflow: test kit",
|
|
4
4
|
"displayName.ru-RU": "Рабочий процесс: Набор тестов",
|
|
5
5
|
"displayName.zh-CN": "工作流:测试工具包",
|
|
6
|
-
"version": "2.0.0-alpha.
|
|
6
|
+
"version": "2.0.0-alpha.52",
|
|
7
7
|
"license": "AGPL-3.0",
|
|
8
8
|
"main": "dist/server/index.js",
|
|
9
9
|
"types": "./dist/server/index.d.ts",
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"nocobase": {
|
|
16
16
|
"internal": true
|
|
17
17
|
},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "b32992d8baeb4ca6616d839ca2f9c023d49476a9"
|
|
19
19
|
}
|