@tuya-sat/micro-script 3.2.1 → 3.2.3

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.
@@ -221,18 +221,17 @@ function refactorConstructApp(config, localApps) {
221
221
  const packageInfo = (0, micro_utils_1.getPackage)();
222
222
  return localApps.map((app) => {
223
223
  const uuid = app.manifest.universalId;
224
- const code = app.code || `${packageInfo.name}`;
225
- const appInfo = saasAppsMap[app.oem_micro_app_id];
224
+ const appInfo = saasAppsMap[app.oem_micro_app_id] || {};
226
225
  return {
227
- ext_info: appInfo === null || appInfo === void 0 ? void 0 : appInfo.ext_info,
226
+ ext_info: appInfo.ext_info,
228
227
  micro_app_config: appInfo.micro_app_config,
229
228
  lang_package_biz_id: appInfo.lang_package_biz_id,
230
229
  active_rule: app.baseUrl,
231
- micro_app_code: code || `${packageInfo.name}`,
232
- micro_app_name: code ? `${code}-dev` : `${packageInfo.name}-dev`,
230
+ micro_app_code: app.code || `${packageInfo.name}`,
231
+ micro_app_name: app.code ? `${app.code}-dev` : `${packageInfo.name}-dev`,
233
232
  micro_app_version: '0.0.0-x',
234
233
  oem_micro_app_id: app.oem_micro_app_id,
235
- resource: `http://localhost:${app.port}/${code || 'index'}.html`,
234
+ resource: `http://localhost:${app.port}/${app.code || 'index'}.html`,
236
235
  universal_id: uuid,
237
236
  isAuth: true,
238
237
  schema: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/micro-script",
3
- "version": "3.2.1",
3
+ "version": "3.2.3",
4
4
  "bin": "./dist/bin/cli.js",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
@@ -23,9 +23,9 @@
23
23
  "@babel/preset-typescript": "7.16.7",
24
24
  "@babel/traverse": "^7.20.13",
25
25
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
26
- "@tuya-sat/micro-dev-loader": "3.2.1",
27
- "@tuya-sat/micro-dev-proxy": "3.2.1",
28
- "@tuya-sat/micro-utils": "3.2.1",
26
+ "@tuya-sat/micro-dev-loader": "3.2.3",
27
+ "@tuya-sat/micro-dev-proxy": "3.2.3",
28
+ "@tuya-sat/micro-utils": "3.2.3",
29
29
  "@types/kill-port": "^2.0.0",
30
30
  "babel-loader": "8.2.4",
31
31
  "babel-plugin-import": "1.13.3",