@steedos/service-pages 3.0.13-beta.5 → 3.0.13-beta.51
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.
|
@@ -34,7 +34,7 @@ router.get('/api/pageDesign', auth.requireAuthentication, async function (req, r
|
|
|
34
34
|
const page = await objectql.broker.call(`page.getLatestPageVersion`, {pageId: req.query.pageId});
|
|
35
35
|
const retUrl = req.query.retUrl || process.env.ROOT_URL + '/app/admin/pages/view/' + req.query.pageId
|
|
36
36
|
const steedosBuilderUrl = process.env.STEEDOS_BUILDER_URL || 'https://builder.steedos.cn';
|
|
37
|
-
const builderHost = `${steedosBuilderUrl}/amis?${assetUrl}retUrl=${retUrl}&locale=${locale}&pageType=${page.type}`;
|
|
37
|
+
const builderHost = `${steedosBuilderUrl}/amis?${assetUrl}retUrl=${retUrl}&locale=${locale}&pageType=${page.type}&unpkgUrl=${process.env.STEEDOS_UNPKG_URL || 'https://unpkg.steedos.cn'}`;
|
|
38
38
|
|
|
39
39
|
const filename = __dirname+'/page_design.ejs'
|
|
40
40
|
const data = {
|
|
@@ -47,7 +47,8 @@ router.get('/api/pageDesign', auth.requireAuthentication, async function (req, r
|
|
|
47
47
|
pageId: req.query.pageId,
|
|
48
48
|
userSession: userSession,
|
|
49
49
|
useOpenAPI: process.env.STEEDOS_PUBLIC_USE_OPEN_API,
|
|
50
|
-
locale: locale
|
|
50
|
+
locale: locale,
|
|
51
|
+
unpkgUrl: process.env.STEEDOS_UNPKG_URL || 'https://unpkg.steedos.cn',
|
|
51
52
|
}
|
|
52
53
|
const options = {}
|
|
53
54
|
ejs.renderFile(filename, data, options, function(err, str){
|
|
@@ -29,7 +29,8 @@ module.exports = {
|
|
|
29
29
|
async handler(ctx) {
|
|
30
30
|
const userSession = ctx.meta.user;
|
|
31
31
|
const { type, app, objectApiName, recordId, pageId, formFactor } = ctx.params;
|
|
32
|
-
|
|
32
|
+
const _result = await this.getMeSchema(type, app, objectApiName, recordId, pageId, formFactor, userSession);
|
|
33
|
+
return _result;
|
|
33
34
|
}
|
|
34
35
|
},
|
|
35
36
|
//发布最新版
|
|
@@ -256,11 +257,12 @@ module.exports = {
|
|
|
256
257
|
async handler(type, app, objectApiName, recordId, formFactor, userSession) {
|
|
257
258
|
const pageRender = this.settings.pageRender;
|
|
258
259
|
if (pageRender) {
|
|
259
|
-
|
|
260
|
+
const _result = await this.broker.call(`${pageRender}.getDefaultSchema`, {type, app, objectApiName, recordId, formFactor}, {
|
|
260
261
|
meta: {
|
|
261
262
|
user: userSession
|
|
262
263
|
}
|
|
263
|
-
})
|
|
264
|
+
});
|
|
265
|
+
return _result;
|
|
264
266
|
}
|
|
265
267
|
return;
|
|
266
268
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-pages",
|
|
3
|
-
"version": "3.0.13-beta.
|
|
3
|
+
"version": "3.0.13-beta.51",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
|
-
"gitHead": "
|
|
9
|
+
"gitHead": "9b19bd2edf8d73de46261adc2679d7eba1dcd69a",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"clone": "^2.1.2",
|
|
12
12
|
"ejs": "^3.1.8"
|