@tuya-sat/micro-script 2.3.0-rc.1 → 3.0.0-beta.2

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.
@@ -23,6 +23,7 @@ const micro_dev_loader_1 = require("@tuya-sat/micro-dev-loader");
23
23
  const index_1 = require("@tuya-sat/micro-dev-loader/dist/less/utils/index");
24
24
  const micro_utils_1 = require("@tuya-sat/micro-utils");
25
25
  const paths_1 = __importDefault(require("./paths"));
26
+ const locales_1 = __importDefault(require("@tuya-sat/micro-dev-loader/dist/plugins/locales"));
26
27
  const toArray = (value) => {
27
28
  return Array.isArray(value) ? value : [value];
28
29
  };
@@ -174,7 +175,7 @@ function getCommonConfig({ isDev, isBuild, }) {
174
175
  chunkFilename: "static/css/[name].[contenthash:8].chunk.css",
175
176
  }),
176
177
  isBuild && enableThemeCompile && new micro_dev_loader_1.ThemePlugin(),
177
- isBuild && new micro_dev_loader_1.LocalesPlugin(),
178
+ isBuild && new locales_1.default(),
178
179
  ].filter((value) => Boolean(value)),
179
180
  };
180
181
  }
@@ -96,14 +96,10 @@ function insertScript($, debuggerConfig) {
96
96
  return item.config_key === "dynamic_theme";
97
97
  }) || initalCustom_configs(saas);
98
98
  const theme = (0, webpack_common_1.validateMicroTheme)();
99
- themeConfig.config_value_json = JSON.stringify(Object.assign(Object.assign(Object.assign({}, JSON.parse(themeConfig.config_value_json)), (theme
100
- ? {
101
- supportedTheme: theme,
102
- }
103
- : {})), readThemeConfig()));
99
+ themeConfig.config_value_json = JSON.stringify(Object.assign(Object.assign(Object.assign({}, JSON.parse(themeConfig.config_value_json)), (theme ? {
100
+ supportedTheme: theme,
101
+ } : {})), readThemeConfig()));
104
102
  overrideNotification(saas);
105
- // 本地开发态多语言剥离多语言平台,走本地多语言兜底逻辑
106
- _SDF.saas.saas_locales = {};
107
103
  $("head").append($("<script>").text(`window._SDF_CONFIG=${JSON.stringify(_SDF_CONFIG)};window._SDF=${JSON.stringify(_SDF)};window.__MAIN_APP_PUBLIC_PATH=${JSON.stringify(__MAIN_APP_PUBLIC_PATH)};
108
104
  localStorage.setItem('theme',${JSON.stringify(process.env.MICRO_THEME)});
109
105
  localStorage.setItem('isDebugger','true')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/micro-script",
3
- "version": "2.3.0-rc.1",
3
+ "version": "3.0.0-beta.2",
4
4
  "bin": "./dist/bin/cli.js",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
@@ -20,9 +20,9 @@
20
20
  "@babel/preset-react": "7.16.7",
21
21
  "@babel/preset-typescript": "7.16.7",
22
22
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
23
- "@tuya-sat/micro-dev-loader": "2.3.0-rc.1",
24
- "@tuya-sat/micro-dev-proxy": "2.3.0-rc.1",
25
- "@tuya-sat/micro-utils": "2.3.0-rc.1",
23
+ "@tuya-sat/micro-dev-loader": "3.0.0-beta.2",
24
+ "@tuya-sat/micro-dev-proxy": "3.0.0-beta.2",
25
+ "@tuya-sat/micro-utils": "3.0.0-beta.2",
26
26
  "babel-loader": "8.2.4",
27
27
  "babel-plugin-import": "1.13.3",
28
28
  "chalk": "4.1.2",
@@ -75,6 +75,5 @@
75
75
  "saas",
76
76
  "cloud",
77
77
  "tuya"
78
- ],
79
- "stableVersion": "2.2.30"
78
+ ]
80
79
  }