@dcloudio/uni-cli-shared 3.0.0-alpha-4010820240529002 → 3.0.0-alpha-4010820240531001
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/easycom.js
CHANGED
|
@@ -174,7 +174,10 @@ function initAutoScanEasycom(dir, rootDir, extensions) {
|
|
|
174
174
|
return easycoms;
|
|
175
175
|
}
|
|
176
176
|
const is_uni_modules = path_1.default.basename(path_1.default.resolve(dir, '../..')) === 'uni_modules';
|
|
177
|
-
const is_encrypt_uni_modules =
|
|
177
|
+
const is_encrypt_uni_modules = // uni_modules模式不需要此逻辑
|
|
178
|
+
process.env.UNI_COMPILE_TARGET !== 'uni_modules' &&
|
|
179
|
+
is_uni_modules &&
|
|
180
|
+
fs_1.default.existsSync(path_1.default.resolve(dir, '../encrypt'));
|
|
178
181
|
const uni_modules_plugin_id = is_encrypt_uni_modules && path_1.default.basename(path_1.default.resolve(dir, '..'));
|
|
179
182
|
fs_1.default.readdirSync(dir).forEach((name) => {
|
|
180
183
|
const folder = path_1.default.resolve(dir, name);
|
package/dist/json/manifest.d.ts
CHANGED
|
@@ -31,4 +31,5 @@ export declare function getRouterOptions(manifestJson: Record<string, any>): {
|
|
|
31
31
|
export declare function isEnableTreeShaking(manifestJson: Record<string, any>): boolean;
|
|
32
32
|
export declare function getDevServerOptions(manifestJson: Record<string, any>): any;
|
|
33
33
|
export declare function getPlatformManifestJsonOnce(): any;
|
|
34
|
+
export declare function validateThemeValue(value: string): boolean;
|
|
34
35
|
export {};
|
package/dist/json/manifest.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getPlatformManifestJsonOnce = exports.getDevServerOptions = exports.isEnableTreeShaking = exports.getRouterOptions = exports.isUniPushOffline = exports.hasPushModule = exports.isEnableSecureNetwork = exports.isEnableUniPushV2 = exports.isEnableUniPushV1 = exports.getUniStatistics = exports.normalizeNetworkTimeout = exports.parseCompatConfigOnce = exports.parseRpx2UnitOnce = exports.parseManifestJsonOnce = exports.parseManifestJson = void 0;
|
|
6
|
+
exports.validateThemeValue = exports.getPlatformManifestJsonOnce = exports.getDevServerOptions = exports.isEnableTreeShaking = exports.getRouterOptions = exports.isUniPushOffline = exports.hasPushModule = exports.isEnableSecureNetwork = exports.isEnableUniPushV2 = exports.isEnableUniPushV1 = exports.getUniStatistics = exports.normalizeNetworkTimeout = exports.parseCompatConfigOnce = exports.parseRpx2UnitOnce = exports.parseManifestJsonOnce = exports.parseManifestJson = void 0;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const shared_1 = require("@vue/shared");
|
|
@@ -121,3 +121,8 @@ function getPlatformManifestJsonOnce() {
|
|
|
121
121
|
: (0, exports.parseManifestJsonOnce)(process.env.UNI_INPUT_DIR)[platform] || {};
|
|
122
122
|
}
|
|
123
123
|
exports.getPlatformManifestJsonOnce = getPlatformManifestJsonOnce;
|
|
124
|
+
const themeValues = ['dark', 'light', 'auto'];
|
|
125
|
+
function validateThemeValue(value) {
|
|
126
|
+
return themeValues.indexOf(value) !== -1;
|
|
127
|
+
}
|
|
128
|
+
exports.validateThemeValue = validateThemeValue;
|
package/dist/vite/cloud.js
CHANGED
|
@@ -192,6 +192,17 @@ function createExternal(config) {
|
|
|
192
192
|
if (source.startsWith('@/uni_modules/')) {
|
|
193
193
|
return true;
|
|
194
194
|
}
|
|
195
|
+
// 相对目录
|
|
196
|
+
if (source.startsWith('@/') || source.startsWith('.')) {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
if (path_1.default.isAbsolute(source)) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
// android 系统库,三方库,iOS 的库呢?一般不包含.
|
|
203
|
+
if (source.includes('.')) {
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
195
206
|
return false;
|
|
196
207
|
};
|
|
197
208
|
}
|
|
@@ -80,6 +80,10 @@ function uniUTSUniModulesPlugin(options = {}) {
|
|
|
80
80
|
if (isUTSProxy(id) || isUniHelpers(id)) {
|
|
81
81
|
return id;
|
|
82
82
|
}
|
|
83
|
+
// 加密插件缓存目录的css文件
|
|
84
|
+
if (id.endsWith('.css')) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
83
87
|
const module = (0, uts_1.resolveUTSAppModule)(id, importer ? path_1.default.dirname(importer) : inputDir, options.x !== true);
|
|
84
88
|
if (module) {
|
|
85
89
|
// app-js 会直接返回 index.uts 路径,不需要 uts-proxy
|
|
@@ -165,7 +169,7 @@ function uniDecryptUniModulesPlugin() {
|
|
|
165
169
|
name: 'uni:uni_modules-d',
|
|
166
170
|
enforce: 'pre',
|
|
167
171
|
async configResolved() {
|
|
168
|
-
if (isX) {
|
|
172
|
+
if (isX && process.env.UNI_COMPILE_TARGET !== 'uni_modules') {
|
|
169
173
|
const manifest = (0, json_1.parseManifestJsonOnce)(inputDir);
|
|
170
174
|
await (0, uni_modules_1.checkEncryptUniModules)(inputDir, {
|
|
171
175
|
mode: process.env.NODE_ENV !== 'development'
|
|
@@ -185,7 +189,9 @@ function uniDecryptUniModulesPlugin() {
|
|
|
185
189
|
if (isUTSProxy(id) || isUniHelpers(id)) {
|
|
186
190
|
return id;
|
|
187
191
|
}
|
|
188
|
-
if (isX &&
|
|
192
|
+
if (isX &&
|
|
193
|
+
process.env.UNI_COMPILE_TARGET !== 'uni_modules' &&
|
|
194
|
+
!id.endsWith('.css')) {
|
|
189
195
|
const resolvedId = (0, uni_modules_1.resolveEncryptUniModule)(id, process.env.UNI_UTS_PLATFORM, process.env.UNI_APP_X === 'true');
|
|
190
196
|
if (resolvedId) {
|
|
191
197
|
return resolvedId;
|
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-4010820240531001",
|
|
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-4010820240531001",
|
|
30
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-4010820240531001",
|
|
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-4010820240531001",
|
|
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",
|