@tuya-sat/micro-script 3.2.5 → 3.2.7
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,7 +56,7 @@ const toArray = (value) => {
|
|
|
56
56
|
return Array.isArray(value) ? value : [value];
|
|
57
57
|
};
|
|
58
58
|
const validateMicroTheme = () => {
|
|
59
|
-
const microTheme = process.env.MICRO_THEME;
|
|
59
|
+
const microTheme = (process.env.MICRO_THEME || index_1.LIGHT_THEME);
|
|
60
60
|
if (microTheme && ![index_1.DARK_THEME, index_1.LIGHT_THEME].includes(microTheme)) {
|
|
61
61
|
console.error(`请设置正确的MICRO_THEME环境变量,当前值为${microTheme},请修改为${index_1.LIGHT_THEME}或${index_1.DARK_THEME}`);
|
|
62
62
|
return process.exit(1);
|
|
@@ -70,7 +70,7 @@ function getCommonConfig({ isDev, isBuild, }) {
|
|
|
70
70
|
const enableThemeCompile = isDev
|
|
71
71
|
? !!devMicroTheme
|
|
72
72
|
: (0, utils_2.getAnnotations)()['sdf.feat:colorTheme'];
|
|
73
|
-
const isReactTsMicroApp = (0, utils_2.getAnnotations)()['sdf.
|
|
73
|
+
const isReactTsMicroApp = (0, utils_2.getAnnotations)()['sdf.cli:microFramework'] === 'REACT_TS';
|
|
74
74
|
//获取style处理的loader
|
|
75
75
|
const getStyleLoaders = (extraLoader = []) => {
|
|
76
76
|
extraLoader = toArray(extraLoader);
|
|
@@ -36,8 +36,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.getFakeUser = void 0;
|
|
39
|
-
const axios_1 = __importDefault(require("axios"));
|
|
40
39
|
const chalk_1 = __importDefault(require("chalk"));
|
|
40
|
+
const micro_dev_proxy_1 = require("@tuya-sat/micro-dev-proxy");
|
|
41
41
|
const fs = __importStar(require("fs-extra"));
|
|
42
42
|
const path = __importStar(require("path"));
|
|
43
43
|
function parse_SDF_CONFIG(html) {
|
|
@@ -57,10 +57,10 @@ function parse__MAIN_APP_PUBLIC_PATH(html) {
|
|
|
57
57
|
}
|
|
58
58
|
const grabSaasPage = (target) => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
59
|
try {
|
|
60
|
-
return yield
|
|
60
|
+
return yield micro_dev_proxy_1.globalAxios.get(target);
|
|
61
61
|
}
|
|
62
62
|
catch (e) {
|
|
63
|
-
return
|
|
63
|
+
return micro_dev_proxy_1.globalAxios.get(new URL('/login?disable_third_login=true', target).href);
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
function getFakeSaas(config) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuya-sat/micro-script",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
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.
|
|
27
|
-
"@tuya-sat/micro-dev-proxy": "3.2.
|
|
28
|
-
"@tuya-sat/micro-utils": "3.2.
|
|
26
|
+
"@tuya-sat/micro-dev-loader": "3.2.7",
|
|
27
|
+
"@tuya-sat/micro-dev-proxy": "3.2.7",
|
|
28
|
+
"@tuya-sat/micro-utils": "3.2.7",
|
|
29
29
|
"@types/kill-port": "^2.0.0",
|
|
30
30
|
"babel-loader": "8.2.4",
|
|
31
31
|
"babel-plugin-import": "1.13.3",
|