@tuya-sat/micro-script 3.0.21-beta.4 → 3.0.21-beta.5
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.
|
@@ -246,7 +246,7 @@ function getCommonConfig({ isDev, isBuild, }) {
|
|
|
246
246
|
if (!multiApps) {
|
|
247
247
|
multiApps = [];
|
|
248
248
|
fs.readdirSync(path_1.default.join(process.cwd(), 'apps')).forEach((dir) => {
|
|
249
|
-
multiApps = [...multiApps,
|
|
249
|
+
multiApps = [...multiApps, { name: dir }];
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
252
|
multiApps.forEach((app) => {
|
|
@@ -39,7 +39,7 @@ function mockSaasInfo(app, microPort) {
|
|
|
39
39
|
if (!multiApps) {
|
|
40
40
|
multiApps = [];
|
|
41
41
|
fs_extra_1.default.readdirSync(path.join(process.cwd(), 'apps')).forEach((dir) => {
|
|
42
|
-
multiApps = [...multiApps,
|
|
42
|
+
multiApps = [...multiApps, { name: dir }];
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
multiApps === null || multiApps === void 0 ? void 0 : multiApps.forEach((app) => {
|
|
@@ -57,7 +57,8 @@ function mockSaasInfo(app, microPort) {
|
|
|
57
57
|
};
|
|
58
58
|
multiApps.forEach((app) => {
|
|
59
59
|
const entry_id = idsMap.get(app.name).entry_id;
|
|
60
|
-
const
|
|
60
|
+
const dir = (0, utils_1.isMonorepo)() ? `apps/${app.name}` : `${app.dir}`;
|
|
61
|
+
const manifest = fs_extra_1.default.readJSONSync(path.join(process.cwd(), dir, 'manifest.json'), 'utf-8');
|
|
61
62
|
const oem_micro_app_id = idsMap.get(app.name).oem_micro_app_id;
|
|
62
63
|
const baseUrl = `/apps/${oem_micro_app_id}`;
|
|
63
64
|
result.saas_id_info_list.push({
|
|
@@ -65,7 +66,7 @@ function mockSaasInfo(app, microPort) {
|
|
|
65
66
|
universal_id: '',
|
|
66
67
|
});
|
|
67
68
|
const micoApp = consturctApp(manifest, oem_micro_app_id, baseUrl, lang, microPort, app.name);
|
|
68
|
-
const entryInfo = consturctEntry(manifest, oem_micro_app_id, entry_id, baseUrl, lang,
|
|
69
|
+
const entryInfo = consturctEntry(manifest, oem_micro_app_id, entry_id, baseUrl, lang, dir);
|
|
69
70
|
const permission = consturctPermissions();
|
|
70
71
|
result.apps.push(micoApp);
|
|
71
72
|
result.entry_info.entries.push(entryInfo);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuya-sat/micro-script",
|
|
3
|
-
"version": "3.0.21-beta.
|
|
3
|
+
"version": "3.0.21-beta.5",
|
|
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.21-beta.
|
|
27
|
-
"@tuya-sat/micro-dev-proxy": "3.0.21-beta.
|
|
28
|
-
"@tuya-sat/micro-utils": "3.0.21-beta.
|
|
26
|
+
"@tuya-sat/micro-dev-loader": "3.0.21-beta.5",
|
|
27
|
+
"@tuya-sat/micro-dev-proxy": "3.0.21-beta.5",
|
|
28
|
+
"@tuya-sat/micro-utils": "3.0.21-beta.5",
|
|
29
29
|
"@types/kill-port": "^2.0.0",
|
|
30
30
|
"babel-loader": "8.2.4",
|
|
31
31
|
"babel-plugin-import": "1.13.3",
|