@nocobase/plugin-ui-schema-storage 1.5.0-alpha.5 → 1.6.0-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/dist/externalVersion.js +7 -7
- package/dist/server/server.js +26 -0
- package/package.json +2 -2
package/dist/externalVersion.js
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.
|
|
12
|
-
"@nocobase/database": "1.
|
|
13
|
-
"@nocobase/cache": "1.
|
|
14
|
-
"@nocobase/utils": "1.
|
|
11
|
+
"@nocobase/client": "1.6.0-alpha.1",
|
|
12
|
+
"@nocobase/database": "1.6.0-alpha.1",
|
|
13
|
+
"@nocobase/cache": "1.6.0-alpha.1",
|
|
14
|
+
"@nocobase/utils": "1.6.0-alpha.1",
|
|
15
15
|
"lodash": "4.17.21",
|
|
16
|
-
"@nocobase/server": "1.
|
|
17
|
-
"@nocobase/actions": "1.
|
|
18
|
-
"@nocobase/resourcer": "1.
|
|
16
|
+
"@nocobase/server": "1.6.0-alpha.1",
|
|
17
|
+
"@nocobase/actions": "1.6.0-alpha.1",
|
|
18
|
+
"@nocobase/resourcer": "1.6.0-alpha.1",
|
|
19
19
|
"@formily/json-schema": "2.3.0"
|
|
20
20
|
};
|
package/dist/server/server.js
CHANGED
|
@@ -111,6 +111,32 @@ class PluginUISchemaStorageServer extends import_server.Plugin {
|
|
|
111
111
|
plugin: this
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
+
const getSourceAndTargetForRemoveAction = async (ctx) => {
|
|
115
|
+
const { filterByTk } = ctx.action.params;
|
|
116
|
+
return {
|
|
117
|
+
targetCollection: "uiSchemas",
|
|
118
|
+
targetRecordUK: filterByTk
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
const getSourceAndTargetForInsertAdjacentAction = async (ctx) => {
|
|
122
|
+
var _a, _b;
|
|
123
|
+
return {
|
|
124
|
+
targetCollection: "uiSchemas",
|
|
125
|
+
targetRecordUK: (_b = (_a = ctx.request.body) == null ? void 0 : _a.schema) == null ? void 0 : _b["x-uid"]
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
const getSourceAndTargetForPatchAction = async (ctx) => {
|
|
129
|
+
var _a;
|
|
130
|
+
return {
|
|
131
|
+
targetCollection: "uiSchemas",
|
|
132
|
+
targetRecordUK: (_a = ctx.request.body) == null ? void 0 : _a["x-uid"]
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
this.app.auditManager.registerActions([
|
|
136
|
+
{ name: "uiSchemas:remove", getSourceAndTarget: getSourceAndTargetForRemoveAction },
|
|
137
|
+
{ name: "uiSchemas:insertAdjacent", getSourceAndTarget: getSourceAndTargetForInsertAdjacentAction },
|
|
138
|
+
{ name: "uiSchemas:patch", getSourceAndTarget: getSourceAndTargetForPatchAction }
|
|
139
|
+
]);
|
|
114
140
|
await this.importCollections((0, import_path.resolve)(__dirname, "collections"));
|
|
115
141
|
}
|
|
116
142
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "UI schema 存储服务",
|
|
5
5
|
"description": "Provides centralized UI schema storage service.",
|
|
6
6
|
"description.zh-CN": "提供中心化的 UI schema 存储服务。",
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.6.0-alpha.1",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/ui-schema-storage",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@nocobase/test": "1.x",
|
|
25
25
|
"@nocobase/utils": "1.x"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "a4c91015e34ec0c9a427451b5fbdfb5fedc4f3d7",
|
|
28
28
|
"keywords": [
|
|
29
29
|
"System & security"
|
|
30
30
|
]
|