@dcloudio/uni-cli-shared 3.0.0-alpha-4020520240808001 → 3.0.0-alpha-4020620240822001
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.
- package/dist/uni_modules.d.ts +1 -0
- package/dist/uni_modules.js +1 -1
- package/dist/vite/cloud.js +16 -1
- package/package.json +4 -4
package/dist/uni_modules.d.ts
CHANGED
package/dist/uni_modules.js
CHANGED
|
@@ -498,7 +498,7 @@ function findLastIndex(array, predicate) {
|
|
|
498
498
|
}
|
|
499
499
|
let encryptUniModules = {};
|
|
500
500
|
function resolveEncryptUniModule(id, platform, isX = true) {
|
|
501
|
-
const parts = id.split('/');
|
|
501
|
+
const parts = id.split('?', 2)[0].split('/');
|
|
502
502
|
const index = findLastIndex(parts, (part) => part === 'uni_modules');
|
|
503
503
|
if (index !== -1) {
|
|
504
504
|
const uniModuleId = parts[index + 1];
|
package/dist/vite/cloud.js
CHANGED
|
@@ -152,15 +152,29 @@ function uniEncryptUniModulesPlugin() {
|
|
|
152
152
|
autoImports[source] = allAutoImports[source];
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
|
+
const uni_modules = [];
|
|
156
|
+
const pkgJson = path_1.default.resolve(process.env.UNI_INPUT_DIR, 'uni_modules', uniModule, 'package.json');
|
|
157
|
+
if (fs_extra_1.default.existsSync(pkgJson)) {
|
|
158
|
+
try {
|
|
159
|
+
const pkg = require(pkgJson);
|
|
160
|
+
if (pkg.uni_modules?.dependencies) {
|
|
161
|
+
uni_modules.push(...pkg.uni_modules.dependencies);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch (e) {
|
|
165
|
+
console.error(e);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
155
168
|
const result = await compiler.compile(pluginDir, {
|
|
156
169
|
isX: process.env.UNI_APP_X === 'true',
|
|
157
170
|
isSingleThread: true,
|
|
158
171
|
isPlugin: false,
|
|
159
172
|
sourceMap: false,
|
|
160
|
-
uni_modules
|
|
173
|
+
uni_modules,
|
|
161
174
|
transform: {
|
|
162
175
|
uvueClassNamePrefix: 'Gen',
|
|
163
176
|
autoImports,
|
|
177
|
+
uvueGenDefaultAs: '__sfc__',
|
|
164
178
|
},
|
|
165
179
|
});
|
|
166
180
|
if (result) {
|
|
@@ -286,6 +300,7 @@ function genUniModulesPackageJson(uniModuleId, inputDir, artifacts) {
|
|
|
286
300
|
id: pkg.id,
|
|
287
301
|
version: pkg.version,
|
|
288
302
|
uni_modules: {
|
|
303
|
+
dependencies: pkg.uni_modules?.dependencies || [],
|
|
289
304
|
artifacts,
|
|
290
305
|
},
|
|
291
306
|
}, null, 2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-cli-shared",
|
|
3
|
-
"version": "3.0.0-alpha-
|
|
3
|
+
"version": "3.0.0-alpha-4020620240822001",
|
|
4
4
|
"description": "@dcloudio/uni-cli-shared",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@babel/core": "^7.23.3",
|
|
27
27
|
"@babel/parser": "^7.23.9",
|
|
28
28
|
"@babel/types": "^7.20.7",
|
|
29
|
-
"@dcloudio/uni-i18n": "3.0.0-alpha-
|
|
30
|
-
"@dcloudio/uni-shared": "3.0.0-alpha-
|
|
29
|
+
"@dcloudio/uni-i18n": "3.0.0-alpha-4020620240822001",
|
|
30
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-4020620240822001",
|
|
31
31
|
"@intlify/core-base": "9.1.9",
|
|
32
32
|
"@intlify/shared": "9.1.9",
|
|
33
33
|
"@intlify/vue-devtools": "9.1.9",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@dcloudio/uni-uts-v1": "3.0.0-alpha-
|
|
74
|
+
"@dcloudio/uni-uts-v1": "3.0.0-alpha-4020620240822001",
|
|
75
75
|
"@types/adm-zip": "^0.5.5",
|
|
76
76
|
"@types/babel__code-frame": "^7.0.6",
|
|
77
77
|
"@types/babel__core": "^7.1.19",
|