@steedos/service-pages 2.7.0-beta.3 → 2.7.0-beta.30

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.
@@ -1,8 +1,8 @@
1
1
  <!--
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2022-06-02 17:45:15
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2024-02-29 11:45:03
4
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
5
+ * @LastEditTime: 2024-03-14 18:48:28
6
6
  * @Description:
7
7
  -->
8
8
  <html>
@@ -14,6 +14,7 @@
14
14
  <body>
15
15
  <builder-fiddle host="<%=builderHost%>"></builder-fiddle>
16
16
  <script>
17
+ const useOpenAPI= <%=(useOpenAPI === "true" || useOpenAPI === true)%>;
17
18
  const settings = {
18
19
  assetUrls: "<%=assetUrls%>",
19
20
  rootUrl: "<%=rootUrl%>",
@@ -22,6 +23,7 @@
22
23
  authToken: "<%=authToken%>",
23
24
  pageId: "<%=pageId%>",
24
25
  messageOnly: true,
26
+ useOpenAPI: useOpenAPI
25
27
  };
26
28
 
27
29
  let comp = document.querySelector("builder-fiddle");
@@ -56,7 +56,8 @@ router.get('/api/pageDesign', core.requireAuthentication, async function (req, r
56
56
  userId: userSession.userId,
57
57
  authToken: userSession.authToken,
58
58
  pageId: req.query.pageId,
59
- userSession: userSession
59
+ userSession: userSession,
60
+ useOpenAPI: process.env.STEEDOS_PUBLIC_USE_OPEN_API
60
61
  }
61
62
  const options = {}
62
63
  ejs.renderFile(filename, data, options, function(err, str){
@@ -1,8 +1,8 @@
1
1
  <!--
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2023-08-01 17:47:18
4
- * @LastEditors: liaodaxue
5
- * @LastEditTime: 2023-12-28 13:26:17
4
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
5
+ * @LastEditTime: 2024-03-14 18:26:27
6
6
  * @Description:
7
7
  -->
8
8
  <!DOCTYPE html>
@@ -128,7 +128,8 @@
128
128
  return locale;
129
129
  };
130
130
 
131
-
131
+ const STEEDOS_PUBLIC_USE_OPEN_API= <%=(STEEDOS_PUBLIC_USE_OPEN_API === "true" || STEEDOS_PUBLIC_USE_OPEN_API === true)%>;
132
+
132
133
  Builder.set({
133
134
  nodeEnv: "<%=NODE_ENV%>",
134
135
  rootUrl: "<%=ROOT_URL%>",
@@ -136,7 +137,8 @@
136
137
  steedosVersion: "<%=STEEDOS_VERSION%>",
137
138
  assetUrls: assetUrls,
138
139
  steedosAmisVersion: "<%=STEEDOS_AMIS_VERSION%>",
139
- locale: "<%=STEEDOS_LOCALE%>" || getBrowserLocale()
140
+ locale: "<%=STEEDOS_LOCALE%>" || getBrowserLocale(),
141
+ useOpenAPI: STEEDOS_PUBLIC_USE_OPEN_API
140
142
  });
141
143
 
142
144
  window.axios = amisRequire('axios');
@@ -61,7 +61,8 @@ router.get('/api/page/view/:pageId', auth.authentication, async function (req, r
61
61
  spaceId: userSession.spaceId
62
62
  },
63
63
  pageSchema: _.isString(pageVersion.schema) ? JSON.parse(pageVersion.schema) : pageVersion.schema,
64
- __meteor_runtime_config__: __meteor_runtime_config__
64
+ __meteor_runtime_config__: __meteor_runtime_config__,
65
+ STEEDOS_PUBLIC_USE_OPEN_API: process.env.STEEDOS_PUBLIC_USE_OPEN_API
65
66
  }
66
67
  const options = {}
67
68
  ejs.renderFile(filename, data, options, function(err, str){
@@ -121,7 +122,8 @@ router.get('/api/page/public/:pageId', async function (req, res) {
121
122
  spaceId: ""
122
123
  },
123
124
  pageSchema: _.isString(pageVersion.schema) ? JSON.parse(pageVersion.schema) : pageVersion.schema,
124
- __meteor_runtime_config__: __meteor_runtime_config__
125
+ __meteor_runtime_config__: __meteor_runtime_config__,
126
+ STEEDOS_PUBLIC_USE_OPEN_API: process.env.STEEDOS_PUBLIC_USE_OPEN_API
125
127
  }
126
128
  const options = {}
127
129
  ejs.renderFile(filename, data, options, function(err, str){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-pages",
3
- "version": "2.7.0-beta.3",
3
+ "version": "2.7.0-beta.30",
4
4
  "main": "package.service.js",
5
5
  "scripts": {},
6
6
  "license": "MIT",
@@ -8,7 +8,7 @@
8
8
  "publishConfig": {
9
9
  "access": "public"
10
10
  },
11
- "gitHead": "753d7fa0840e6e254423eafbdd132ec10ca4072e",
11
+ "gitHead": "c886ced355a573a7c11b9daba97b2f6916328d89",
12
12
  "dependencies": {
13
13
  "ejs": "^3.1.8"
14
14
  }