@tuya-sat/micro-script 3.0.27-beta.28 → 3.0.27-beta.29

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.
@@ -8,10 +8,6 @@ const http_proxy_middleware_1 = require("http-proxy-middleware");
8
8
  function useProxy(app) {
9
9
  const isProxy = process.env.MICRO_PROXY === 'true';
10
10
  const { debuggerConfig } = require(paths_1.default.microConfig);
11
- if (isProxy) {
12
- const createProxy = require('@tuya-sat/micro-dev-proxy').default;
13
- createProxy(debuggerConfig)(app);
14
- }
15
11
  const customApiUrl = debuggerConfig === null || debuggerConfig === void 0 ? void 0 : debuggerConfig.customApiUrl;
16
12
  if (customApiUrl) {
17
13
  app.use('/custom-api', (0, http_proxy_middleware_1.createProxyMiddleware)({
@@ -20,5 +16,9 @@ function useProxy(app) {
20
16
  changeOrigin: true,
21
17
  }));
22
18
  }
19
+ if (isProxy) {
20
+ const createProxy = require('@tuya-sat/micro-dev-proxy').default;
21
+ createProxy(debuggerConfig)(app);
22
+ }
23
23
  }
24
24
  exports.default = useProxy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/micro-script",
3
- "version": "3.0.27-beta.28",
3
+ "version": "3.0.27-beta.29",
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.28",
27
- "@tuya-sat/micro-dev-proxy": "3.0.27-beta.28",
28
- "@tuya-sat/micro-utils": "3.0.27-beta.28",
26
+ "@tuya-sat/micro-dev-loader": "3.0.27-beta.29",
27
+ "@tuya-sat/micro-dev-proxy": "3.0.27-beta.29",
28
+ "@tuya-sat/micro-utils": "3.0.27-beta.29",
29
29
  "@types/kill-port": "^2.0.0",
30
30
  "babel-loader": "8.2.4",
31
31
  "babel-plugin-import": "1.13.3",