@tuya-sat/micro-script 3.0.27-beta.23 → 3.0.27-beta.24

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.
@@ -56,13 +56,13 @@ function parse__MAIN_APP_PUBLIC_PATH(html) {
56
56
  return ((_a = REGEX.exec(html)) === null || _a === void 0 ? void 0 : _a[0]) || '';
57
57
  }
58
58
  function getFakeSaas(config) {
59
+ var _a;
59
60
  return __awaiter(this, void 0, void 0, function* () {
60
61
  if (!config.target) {
61
62
  console.log(chalk_1.default.red('没有配置target'));
62
63
  process.exit(1);
63
64
  }
64
- if ((config.isMainApp && fs.existsSync(path.join(process.cwd(), 'apps'))) ||
65
- process.env.IS_OPEN_CODE) {
65
+ if (config.isMainApp && fs.existsSync(path.join(process.cwd(), 'apps'))) {
66
66
  const saasInfo = fs.readJSONSync(path.join(process.cwd(), 'saas-info.config.json'));
67
67
  let saas = {
68
68
  _SDF: {
@@ -106,7 +106,7 @@ function getFakeSaas(config) {
106
106
  const __MAIN_APP_PUBLIC_PATH = parse__MAIN_APP_PUBLIC_PATH(data);
107
107
  const saas = {
108
108
  _SDF_CONFIG: JSON.parse(_SDF_CONFIG),
109
- _SDF: JSON.parse(_SDF),
109
+ _SDF: Object.assign(Object.assign({}, JSON.parse(_SDF)), { isOpenCode: !!((_a = process.env) === null || _a === void 0 ? void 0 : _a.IS_OPEN_CODE) }),
110
110
  __MAIN_APP_PUBLIC_PATH: JSON.parse(__MAIN_APP_PUBLIC_PATH),
111
111
  };
112
112
  return saas;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/micro-script",
3
- "version": "3.0.27-beta.23",
3
+ "version": "3.0.27-beta.24",
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.0.27-beta.23",
27
- "@tuya-sat/micro-dev-proxy": "3.0.27-beta.23",
28
- "@tuya-sat/micro-utils": "3.0.27-beta.23",
26
+ "@tuya-sat/micro-dev-loader": "3.0.27-beta.24",
27
+ "@tuya-sat/micro-dev-proxy": "3.0.27-beta.24",
28
+ "@tuya-sat/micro-utils": "3.0.27-beta.24",
29
29
  "@types/kill-port": "^2.0.0",
30
30
  "babel-loader": "8.2.4",
31
31
  "babel-plugin-import": "1.13.3",