@dcloudio/uni-cli-shared 3.0.0-alpha-5000520260323001 → 3.0.0-alpha-5000720260327001
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/constants.d.ts +1 -3
- package/dist/constants.js +2 -6
- package/dist/deps.d.ts +1 -0
- package/dist/deps.js +22 -13
- package/dist/dom2/fontFamily.d.ts +4 -0
- package/dist/dom2/fontFamily.js +21 -0
- package/dist/dom2/index.d.ts +2 -0
- package/dist/dom2/index.js +2 -0
- package/dist/dom2/sharedData.d.ts +4 -0
- package/dist/dom2/sharedData.js +38 -5
- package/dist/dom2/vue.d.ts +15 -0
- package/dist/dom2/vue.js +41 -0
- package/dist/easycom.js +13 -9
- package/dist/env/define.d.ts +0 -1
- package/dist/env/define.js +3 -11
- package/dist/hbx/alias.js +48 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/json/uni-x/manifest.d.ts +1 -1
- package/dist/json/uni-x/manifest.js +2 -1
- package/dist/messages/en.d.ts +1 -0
- package/dist/messages/en.js +1 -0
- package/dist/messages/index.d.ts +2 -0
- package/dist/messages/zh_CN.d.ts +1 -0
- package/dist/messages/zh_CN.js +1 -0
- package/dist/uni_modules.cloud.js +16 -12
- package/dist/uni_modules.js +3 -2
- package/dist/uts.js +4 -2
- package/dist/vite/autoImport.js +7 -4
- package/dist/vite/cloud.js +13 -6
- package/dist/vite/extApi.js +4 -1
- package/dist/vite/plugins/stats.js +2 -1
- package/dist/vite/plugins/uts/uni_modules.js +7 -2
- package/dist/vite/plugins/vitejs/plugins/css.js +6 -4
- package/dist/workers.js +2 -0
- package/dist/x.d.ts +10 -0
- package/dist/x.js +39 -0
- package/lib/dom2/app/@vitejs/plugin-vue/dist/index.cjs +0 -7
- package/lib/dom2/app/@vitejs/plugin-vue/dist/index.mjs +0 -7
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.js +1 -1
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.prod.js +1 -1
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.d.ts +1 -0
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.esm-bundler.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.js +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.prod.js +1 -1
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +348 -120
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +99 -56
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.cjs.js +70 -47
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.d.ts +127 -107
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.esm-browser.js +70 -48
- package/lib/dom2/app/@vue/compiler-vapor-dom2/dist/compiler-vapor-dom2.cjs.js +1 -1
- package/lib/dom2/app/@vue/shared/dist/shared.cjs.js +1 -1
- package/lib/dom2/app/@vue/shared/dist/shared.cjs.prod.js +1 -1
- package/lib/dom2/app/@vue/shared/dist/shared.esm-bundler.js +1 -1
- package/package.json +5 -5
package/dist/constants.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const EXTNAME_VUE_TEMPLATE: string[];
|
|
|
7
7
|
export declare const EXTNAME_VUE_RE: RegExp;
|
|
8
8
|
export declare const EXTNAME_JS_RE: RegExp;
|
|
9
9
|
export declare const EXTNAME_TS_RE: RegExp;
|
|
10
|
+
export declare const DEFAULT_APPID = "__UNI__uniappx";
|
|
10
11
|
export declare const SPECIAL_CHARS: {
|
|
11
12
|
WARN_BLOCK: string;
|
|
12
13
|
ERROR_BLOCK: string;
|
|
@@ -39,6 +40,3 @@ export declare const COMMON_EXCLUDE: RegExp[];
|
|
|
39
40
|
export declare const KNOWN_ASSET_TYPES: string[];
|
|
40
41
|
export declare const DEFAULT_ASSETS_RE: RegExp;
|
|
41
42
|
export declare const TEXT_STYLE: string[];
|
|
42
|
-
export declare const JS_STYLE_PLACEHOLDER_MARKER = "__js_style_placeholder__";
|
|
43
|
-
export declare const JS_STYLE_PLACEHOLDER_STR: string;
|
|
44
|
-
export declare const JS_STYLE_PLACEHOLDER_RE: RegExp;
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TEXT_STYLE = exports.DEFAULT_ASSETS_RE = exports.KNOWN_ASSET_TYPES = exports.COMMON_EXCLUDE = exports.X_BASE_COMPONENTS_STYLE_PATH = exports.BASE_COMPONENTS_STYLE_PATH = exports.H5_COMPONENTS_STYLE_PATH = exports.H5_FRAMEWORK_STYLE_PATH = exports.H5_API_STYLE_PATH = exports.X_PAGE_EXTNAME_APP = exports.X_PAGE_EXTNAME = exports.PAGE_EXTNAME = exports.PAGE_EXTNAME_APP = exports.BINDING_COMPONENTS = exports.APP_CONFIG_SERVICE = exports.APP_CONFIG = exports.APP_SERVICE_FILENAME = exports.ASSETS_INLINE_LIMIT = exports.JSON_JS_MAP = exports.MANIFEST_JSON_UTS = exports.MANIFEST_JSON_JS = exports.PAGES_JSON_UTS = exports.PAGES_JSON_JS = exports.uni_app_x_extensions = exports.extensions = exports.SPECIAL_CHARS = exports.DEFAULT_APPID = exports.EXTNAME_TS_RE = exports.EXTNAME_JS_RE = exports.EXTNAME_VUE_RE = exports.EXTNAME_VUE_TEMPLATE = exports.X_EXTNAME_VUE = exports.EXTNAME_VUE = exports.EXTNAME_TS = exports.EXTNAME_JS = exports.PUBLIC_DIR = void 0;
|
|
4
4
|
exports.PUBLIC_DIR = 'static';
|
|
5
5
|
exports.EXTNAME_JS = ['.js', '.ts', '.jsx', '.tsx', '.uts'];
|
|
6
6
|
exports.EXTNAME_TS = ['.ts', '.tsx'];
|
|
@@ -10,6 +10,7 @@ exports.EXTNAME_VUE_TEMPLATE = ['.vue', '.nvue', '.uvue', '.jsx', '.tsx'];
|
|
|
10
10
|
exports.EXTNAME_VUE_RE = /\.(vue|nvue|uvue)$/;
|
|
11
11
|
exports.EXTNAME_JS_RE = /\.(js|jsx|ts|uts|tsx|mjs)$/;
|
|
12
12
|
exports.EXTNAME_TS_RE = /\.tsx?$/;
|
|
13
|
+
exports.DEFAULT_APPID = '__UNI__uniappx';
|
|
13
14
|
exports.SPECIAL_CHARS = {
|
|
14
15
|
WARN_BLOCK: '\uFEFF', // 警告块前后标识
|
|
15
16
|
ERROR_BLOCK: '\u2060', // 错误块前后标识
|
|
@@ -88,8 +89,3 @@ exports.KNOWN_ASSET_TYPES = [
|
|
|
88
89
|
];
|
|
89
90
|
exports.DEFAULT_ASSETS_RE = new RegExp(`\\.(` + exports.KNOWN_ASSET_TYPES.join('|') + `)(\\?.*)?$`);
|
|
90
91
|
exports.TEXT_STYLE = ['black', 'white'];
|
|
91
|
-
exports.JS_STYLE_PLACEHOLDER_MARKER = '__js_style_placeholder__';
|
|
92
|
-
exports.JS_STYLE_PLACEHOLDER_STR = JSON.stringify({
|
|
93
|
-
[exports.JS_STYLE_PLACEHOLDER_MARKER]: 0,
|
|
94
|
-
});
|
|
95
|
-
exports.JS_STYLE_PLACEHOLDER_RE = /\{\s*"__js_style_placeholder__"\s*:\s*0\s*}/g;
|
package/dist/deps.d.ts
CHANGED
package/dist/deps.js
CHANGED
|
@@ -6,9 +6,9 @@ const RESIZE_SENSOR_CSS = constants_1.BASE_COMPONENTS_STYLE_PATH + 'resize-senso
|
|
|
6
6
|
const REFRESHER_CSS = constants_1.BASE_COMPONENTS_STYLE_PATH + 'refresher.css';
|
|
7
7
|
const API_DEPS_CSS = (isX) => {
|
|
8
8
|
const deps_css = {
|
|
9
|
-
showModal: [
|
|
9
|
+
showModal: [],
|
|
10
10
|
showToast: [`${constants_1.H5_API_STYLE_PATH}toast.css`],
|
|
11
|
-
showActionSheet: [
|
|
11
|
+
showActionSheet: [],
|
|
12
12
|
previewImage: [
|
|
13
13
|
RESIZE_SENSOR_CSS,
|
|
14
14
|
`${constants_1.BASE_COMPONENTS_STYLE_PATH}swiper.css`,
|
|
@@ -17,22 +17,31 @@ const API_DEPS_CSS = (isX) => {
|
|
|
17
17
|
`${constants_1.BASE_COMPONENTS_STYLE_PATH}movable-view.css`,
|
|
18
18
|
],
|
|
19
19
|
openLocation: [`${constants_1.H5_API_STYLE_PATH}location-view.css`],
|
|
20
|
-
chooseLocation: [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
chooseLocation: [],
|
|
21
|
+
showLoading: [],
|
|
22
|
+
};
|
|
23
|
+
if (isX) {
|
|
24
|
+
deps_css.showModal = [`${constants_1.BASE_COMPONENTS_STYLE_PATH}textarea.css`];
|
|
25
|
+
deps_css.chooseLocation = [
|
|
26
|
+
`${constants_1.BASE_COMPONENTS_STYLE_PATH}/view.css`,
|
|
27
|
+
`${constants_1.BASE_COMPONENTS_STYLE_PATH}/text.css`,
|
|
27
28
|
`${constants_1.BASE_COMPONENTS_STYLE_PATH}/input.css`,
|
|
28
29
|
`${constants_1.H5_COMPONENTS_STYLE_PATH}/map.css`,
|
|
29
30
|
`${constants_1.BASE_COMPONENTS_STYLE_PATH}/scroll-view.css`,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (isX) {
|
|
33
|
-
// @ts-expect-error
|
|
31
|
+
`${constants_1.BASE_COMPONENTS_STYLE_PATH}/image.css`,
|
|
32
|
+
];
|
|
34
33
|
deps_css.showLoading = [`${constants_1.X_BASE_COMPONENTS_STYLE_PATH}loading.css`];
|
|
35
34
|
}
|
|
35
|
+
else {
|
|
36
|
+
deps_css.showModal = [`${constants_1.H5_API_STYLE_PATH}modal.css`];
|
|
37
|
+
deps_css.showActionSheet = [`${constants_1.H5_API_STYLE_PATH}action-sheet.css`];
|
|
38
|
+
deps_css.chooseLocation = [
|
|
39
|
+
`${constants_1.H5_API_STYLE_PATH}/location-picker.css`,
|
|
40
|
+
`${constants_1.BASE_COMPONENTS_STYLE_PATH}/input.css`,
|
|
41
|
+
`${constants_1.H5_COMPONENTS_STYLE_PATH}/map.css`,
|
|
42
|
+
`${constants_1.BASE_COMPONENTS_STYLE_PATH}/scroll-view.css`,
|
|
43
|
+
];
|
|
44
|
+
}
|
|
36
45
|
return deps_css;
|
|
37
46
|
};
|
|
38
47
|
exports.API_DEPS_CSS = API_DEPS_CSS;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const JS_STYLE_PLACEHOLDER_MARKER = "__js_style_placeholder__";
|
|
2
|
+
export declare function createJsStylePlaceholder(id: string): string;
|
|
3
|
+
export declare function createJsStylePlaceholderRegExp(id: string): RegExp;
|
|
4
|
+
export declare const ANY_JS_STYLE_PLACEHOLDER_RE: RegExp;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ANY_JS_STYLE_PLACEHOLDER_RE = exports.createJsStylePlaceholderRegExp = exports.createJsStylePlaceholder = exports.JS_STYLE_PLACEHOLDER_MARKER = void 0;
|
|
7
|
+
const hash_sum_1 = __importDefault(require("hash-sum"));
|
|
8
|
+
exports.JS_STYLE_PLACEHOLDER_MARKER = '__js_style_placeholder__';
|
|
9
|
+
function createJsStylePlaceholder(id) {
|
|
10
|
+
const hashId = (0, hash_sum_1.default)(id);
|
|
11
|
+
return JSON.stringify({
|
|
12
|
+
[exports.JS_STYLE_PLACEHOLDER_MARKER]: hashId,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
exports.createJsStylePlaceholder = createJsStylePlaceholder;
|
|
16
|
+
function createJsStylePlaceholderRegExp(id) {
|
|
17
|
+
const hashId = (0, hash_sum_1.default)(id);
|
|
18
|
+
return new RegExp(`\\{\\s*"${exports.JS_STYLE_PLACEHOLDER_MARKER}"\\s*:\\s*"${hashId}"\\s*\\}`, 'g');
|
|
19
|
+
}
|
|
20
|
+
exports.createJsStylePlaceholderRegExp = createJsStylePlaceholderRegExp;
|
|
21
|
+
exports.ANY_JS_STYLE_PLACEHOLDER_RE = new RegExp(`\\{\\s*"${exports.JS_STYLE_PLACEHOLDER_MARKER}"\\s*:\\s*".+?"\\s*\\}`, 'g');
|
package/dist/dom2/index.d.ts
CHANGED
package/dist/dom2/index.js
CHANGED
|
@@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./sharedData"), exports);
|
|
18
|
+
__exportStar(require("./vue"), exports);
|
|
19
|
+
__exportStar(require("./fontFamily"), exports);
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import type { Plugin } from 'vite';
|
|
2
2
|
export declare function uniSharedDataPlugin(): Plugin;
|
|
3
|
+
export declare function initSourceFileCallback(): ((sourceFile: import('typescript').SourceFile) => void) | undefined;
|
|
4
|
+
export declare function initUts2jsSharedDataOptions(): {
|
|
5
|
+
resolveFieldMeta: any;
|
|
6
|
+
} | undefined;
|
package/dist/dom2/sharedData.js
CHANGED
|
@@ -1,19 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.uniSharedDataPlugin = void 0;
|
|
3
|
+
exports.initUts2jsSharedDataOptions = exports.initSourceFileCallback = exports.uniSharedDataPlugin = void 0;
|
|
4
4
|
const uts_1 = require("../uts");
|
|
5
5
|
const pages_1 = require("../json/pages");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
const asset_1 = require("../vite/plugins/vitejs/plugins/asset");
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const x_1 = require("../x");
|
|
9
|
+
const manifest_1 = require("../json/uni-x/manifest");
|
|
10
|
+
const manifest_2 = require("../json/manifest");
|
|
11
|
+
function initSharedDataOptions() {
|
|
10
12
|
const compiler = require('@dcloudio/compiler-vapor-dom2');
|
|
11
|
-
|
|
13
|
+
const manifest = (0, manifest_2.parseManifestJsonOnce)(process.env.UNI_INPUT_DIR);
|
|
14
|
+
return {
|
|
15
|
+
platform: process.env.UNI_UTS_PLATFORM,
|
|
12
16
|
compilerVaporDom2: compiler,
|
|
13
17
|
utsCompiler: (0, uts_1.resolveUTSCompiler)(),
|
|
14
18
|
isUniPageFile: pages_1.isUniPageFile,
|
|
15
19
|
getSharedDataResult: compiler.getSharedDataResult,
|
|
16
20
|
getAssetFilenameById: asset_1.getAssetFilenameById,
|
|
17
|
-
|
|
21
|
+
uvueScriptEngine: (0, x_1.isUniAppXAndroidNative)() ? 'native' : 'js',
|
|
22
|
+
compilerVersion: process.env.HX_Version || process.env.UNI_COMPILER_VERSION,
|
|
23
|
+
androidOptions: (0, x_1.isUniAppXAndroidJsEngine)()
|
|
24
|
+
? {
|
|
25
|
+
package: (0, manifest_1.parseUniXAppAndroidPackage)(manifest.appid),
|
|
26
|
+
}
|
|
27
|
+
: undefined,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function uniSharedDataPlugin() {
|
|
31
|
+
return (0, utils_1.requireUniHelpers)().USDP(initSharedDataOptions());
|
|
18
32
|
}
|
|
19
33
|
exports.uniSharedDataPlugin = uniSharedDataPlugin;
|
|
34
|
+
function initSourceFileCallback() {
|
|
35
|
+
if (process.env.UNI_APP_X_DOM2 === 'true' && (0, x_1.isUniAppXAndroidNative)()) {
|
|
36
|
+
const { TSDBSF } = (0, utils_1.requireUniHelpers)();
|
|
37
|
+
const options = initSharedDataOptions();
|
|
38
|
+
return (sourceFile) => {
|
|
39
|
+
TSDBSF(sourceFile, options);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.initSourceFileCallback = initSourceFileCallback;
|
|
44
|
+
function initUts2jsSharedDataOptions() {
|
|
45
|
+
if (process.env.UNI_APP_X_DOM2 === 'true') {
|
|
46
|
+
return {
|
|
47
|
+
resolveFieldMeta: require('@dcloudio/compiler-vapor-dom2')
|
|
48
|
+
.resolveSharedDataFieldMeta,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.initUts2jsSharedDataOptions = initUts2jsSharedDataOptions;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CompilerError, SFCDescriptor } from '@vue/compiler-sfc';
|
|
2
|
+
export declare function initVueTemplateCompilerExtraOptions(descriptor: SFCDescriptor): {
|
|
3
|
+
root: string;
|
|
4
|
+
platform: keyof UniApp.PagesJsonPagePlatformStyle;
|
|
5
|
+
componentType: string;
|
|
6
|
+
filename: string;
|
|
7
|
+
relativeFilename: string;
|
|
8
|
+
helper: any;
|
|
9
|
+
scriptCppBlocks: any;
|
|
10
|
+
disableStaticStyle: boolean;
|
|
11
|
+
onVueTemplateCompileLog(type: 'warn' | 'error', error: CompilerError): void;
|
|
12
|
+
r: any;
|
|
13
|
+
className: any;
|
|
14
|
+
inlineRender: boolean;
|
|
15
|
+
};
|
package/dist/dom2/vue.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.initVueTemplateCompilerExtraOptions = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
const json_1 = require("../json");
|
|
10
|
+
const vue_1 = require("../vue");
|
|
11
|
+
function initVueTemplateCompilerExtraOptions(descriptor) {
|
|
12
|
+
const filename = (0, utils_1.normalizePath)(descriptor.filename.split('?')[0]);
|
|
13
|
+
const relativeFilename = (0, utils_1.normalizePath)(path_1.default.relative(process.env.UNI_INPUT_DIR, filename));
|
|
14
|
+
const isDevX = process.env.UNI_HX_VERSION_DEV === 'true' &&
|
|
15
|
+
process.env.UNI_APP_X === 'true';
|
|
16
|
+
let disableStaticStyle = false;
|
|
17
|
+
if (isDevX && process.env.NODE_ENV === 'development') {
|
|
18
|
+
if (process.env.UNI_UTS_PLATFORM === 'app-harmony') {
|
|
19
|
+
// 开发版本、开发模式下,非鸿蒙release模式打包
|
|
20
|
+
disableStaticStyle = process.env.UNI_APP_HARMONY_RUN_MODE !== 'release';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const helper = (0, utils_1.requireUniHelpers)();
|
|
24
|
+
return {
|
|
25
|
+
root: (0, utils_1.normalizePath)(process.env.UNI_INPUT_DIR),
|
|
26
|
+
platform: process.env.UNI_UTS_PLATFORM,
|
|
27
|
+
componentType: (0, json_1.isUniPageFile)(filename) ? 'page' : 'component',
|
|
28
|
+
filename: filename,
|
|
29
|
+
relativeFilename,
|
|
30
|
+
helper,
|
|
31
|
+
scriptCppBlocks: descriptor.scriptCppBlocks,
|
|
32
|
+
disableStaticStyle,
|
|
33
|
+
onVueTemplateCompileLog(type, error) {
|
|
34
|
+
return (0, vue_1.onVueTemplateCompileLog)(type, error, descriptor.source, relativeFilename);
|
|
35
|
+
},
|
|
36
|
+
r: helper.K,
|
|
37
|
+
className: helper.GCN(descriptor.filename, process.env.UNI_INPUT_DIR),
|
|
38
|
+
inlineRender: process.env.UNI_UTS_PLATFORM === 'app-android',
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
exports.initVueTemplateCompilerExtraOptions = initVueTemplateCompilerExtraOptions;
|
package/dist/easycom.js
CHANGED
|
@@ -10,6 +10,7 @@ const debug_1 = __importDefault(require("debug"));
|
|
|
10
10
|
const shared_1 = require("@vue/shared");
|
|
11
11
|
const pluginutils_1 = require("@rollup/pluginutils");
|
|
12
12
|
const uni_shared_1 = require("@dcloudio/uni-shared");
|
|
13
|
+
const x_1 = require("./x");
|
|
13
14
|
const utils_1 = require("./utils");
|
|
14
15
|
const pages_1 = require("./json/pages");
|
|
15
16
|
const messages_1 = require("./messages");
|
|
@@ -109,8 +110,8 @@ function initEasycoms(inputDir, { dirs, platform, isX, }) {
|
|
|
109
110
|
clearEasycom();
|
|
110
111
|
(0, uts_1.clearUTSComponents)();
|
|
111
112
|
(0, uts_1.clearUTSCustomElements)();
|
|
112
|
-
initEasycom(easyComOptions);
|
|
113
|
-
if (
|
|
113
|
+
initEasycom(res.easyComOptions);
|
|
114
|
+
if (supportCustomElements) {
|
|
114
115
|
initUTSEasycomCustomElements();
|
|
115
116
|
}
|
|
116
117
|
initUTSEasycom();
|
|
@@ -197,6 +198,11 @@ function matchEasycom(tag) {
|
|
|
197
198
|
source = tag.replace(matcher.pattern, matcher.replacement);
|
|
198
199
|
easycomsCache.set(tag, source);
|
|
199
200
|
debugEasycom('matchEasycom', tag, source);
|
|
201
|
+
// 检查 H5 专用组件 ask163203
|
|
202
|
+
const H5_ONLY_COMPONENTS = ['custom-tab-bar'];
|
|
203
|
+
if (H5_ONLY_COMPONENTS.includes(tag) && process.env.UNI_PLATFORM !== 'h5') {
|
|
204
|
+
console.warn(`[uni-app] 组件 <${tag}> 是 H5 平台专用组件,在 ${process.env.UNI_PLATFORM} 平台使用可能导致错误。如果你要引入自定义 tabBar 可重命名为其他名称。`);
|
|
205
|
+
}
|
|
200
206
|
return source;
|
|
201
207
|
}
|
|
202
208
|
exports.matchEasycom = matchEasycom;
|
|
@@ -255,12 +261,7 @@ function initAutoScanEasycom(platform, dir, rootDir, extensions) {
|
|
|
255
261
|
easycoms[`^${name}$`] =
|
|
256
262
|
// mp平台,这里不处理,由uniEntryPlugin处理
|
|
257
263
|
is_easycom_encrypt_uni_modules && !isMp
|
|
258
|
-
? (0, utils_1.normalizePath)(path_1.default.join(rootDir, `uni_modules/${uni_modules_plugin_id}?${
|
|
259
|
-
// android 走 proxy
|
|
260
|
-
process.env.UNI_APP_X === 'true' &&
|
|
261
|
-
process.env.UNI_UTS_PLATFORM === 'app-android'
|
|
262
|
-
? 'uts-proxy'
|
|
263
|
-
: 'uni_helpers'}`))
|
|
264
|
+
? (0, utils_1.normalizePath)(path_1.default.join(rootDir, `uni_modules/${uni_modules_plugin_id}?${(0, x_1.isUniAppXAndroidNative)() ? 'uts-proxy' : 'uni_helpers'}`))
|
|
264
265
|
: `${importDir}/${name}${ext}`;
|
|
265
266
|
break;
|
|
266
267
|
}
|
|
@@ -313,7 +314,10 @@ function createImportDeclaration(local, source, imported) {
|
|
|
313
314
|
}
|
|
314
315
|
const RESOLVE_EASYCOM_IMPORT_CODE = `import { resolveDynamicComponent as __resolveDynamicComponent } from 'vue';import { resolveEasycom } from '@dcloudio/uni-app';`;
|
|
315
316
|
function genResolveEasycomCode(importDeclarations, code, name) {
|
|
316
|
-
if (process.env.UNI_APP_X_DOM2 === 'true'
|
|
317
|
+
if (process.env.UNI_APP_X_DOM2 === 'true' ||
|
|
318
|
+
// 内部 dev 版本,需要本地开发内置组件,比如web-view,此时需要直接返回本地easycom,不然会找到基座内置的
|
|
319
|
+
(process.env.UNI_HX_VERSION_DEV === 'true' &&
|
|
320
|
+
process.env.UNI_APP_X === 'true')) {
|
|
317
321
|
// dom2 模式下,为了性能,不再考虑优先级问题,如果开发者需要区别,可以手动导入为其他名称
|
|
318
322
|
return name;
|
|
319
323
|
}
|
package/dist/env/define.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export declare function initDefine(stringifyBoolean?: boolean): {
|
|
|
2
2
|
__X_STYLE_ISOLATION__: string | boolean;
|
|
3
3
|
__X_STYLE_ISOLATION_UP_ARROW__: string | boolean;
|
|
4
4
|
'process.env.UNI_APP_X_NEW_STYLE_ISOLATION': string | boolean;
|
|
5
|
-
__UNI_FEATURE_VIRTUAL_HOST__: boolean;
|
|
6
5
|
'process.env.NODE_ENV': string;
|
|
7
6
|
'process.env.UNI_DEBUG': string | boolean;
|
|
8
7
|
'process.env.UNI_APP_ID': string;
|
package/dist/env/define.js
CHANGED
|
@@ -15,17 +15,9 @@ function initDefine(stringifyBoolean = false) {
|
|
|
15
15
|
const isNewStyleIsolationUpArrow = isNewStyleIsolation && process.env.UNI_PLATFORM === 'mp-weixin';
|
|
16
16
|
const isMP = process.env.UNI_PLATFORM && process.env.UNI_PLATFORM.startsWith('mp-');
|
|
17
17
|
process.env['UNI_APP_ID'] = manifestJson.appid;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
: {
|
|
23
|
-
__UNI_FEATURE_VIRTUAL_HOST__: false,
|
|
24
|
-
};
|
|
25
|
-
if (isX && isMP) {
|
|
26
|
-
mpXDefine.__UNI_FEATURE_VIRTUAL_HOST__ =
|
|
27
|
-
platformManifestJson.enableVirtualHost !== false;
|
|
28
|
-
}
|
|
18
|
+
const mpXDefine = {
|
|
19
|
+
__UNI_FEATURE_VIRTUAL_HOST__: isX && isMP && platformManifestJson.enableVirtualHost !== false,
|
|
20
|
+
};
|
|
29
21
|
const styleIsolation = stringifyBoolean
|
|
30
22
|
? JSON.stringify(isNewStyleIsolation)
|
|
31
23
|
: isNewStyleIsolation;
|
package/dist/hbx/alias.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// 注意:该文件尽可能少依赖其他文件,否则可能会导致还没有alias的时候,就加载了目标模块
|
|
3
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
4
|
};
|
|
6
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
6
|
exports.formatInstallHBuilderXPluginTips = exports.moduleAliasFormatter = exports.installHBuilderXPlugin = exports.initModuleAlias = void 0;
|
|
7
|
+
// 注意:该文件尽可能少依赖其他文件,否则可能会导致还没有alias的时候,就加载了目标模块
|
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
9
|
const path_1 = __importDefault(require("path"));
|
|
9
10
|
const module_alias_1 = __importDefault(require("module-alias"));
|
|
10
11
|
const utils_1 = require("./utils");
|
|
12
|
+
const jsonc_parser_1 = require("jsonc-parser");
|
|
11
13
|
const hbxPlugins = {
|
|
12
14
|
typescript: 'compile-typescript/node_modules/typescript',
|
|
13
15
|
less: 'compile-less/node_modules/less',
|
|
@@ -19,19 +21,55 @@ function initModuleAlias() {
|
|
|
19
21
|
const libDir = path_1.default.resolve(__dirname, '../../lib');
|
|
20
22
|
const compilerSfcPath = path_1.default.resolve(libDir, '@vue/compiler-sfc');
|
|
21
23
|
const serverRendererPath = require.resolve('@vue/server-renderer');
|
|
24
|
+
// 对路径进行兼容
|
|
25
|
+
if (!process.env.UNI_APP_X_DOM2_CPP_DIR &&
|
|
26
|
+
process.env.UNI_APP_HARMONY_DOM2_CPP_DIR) {
|
|
27
|
+
process.env.UNI_APP_X_DOM2_CPP_DIR =
|
|
28
|
+
process.env.UNI_APP_HARMONY_DOM2_CPP_DIR;
|
|
29
|
+
}
|
|
30
|
+
if (process.env.UNI_APP_PLATFORM === 'ios' ||
|
|
31
|
+
process.env.UNI_APP_PLATFORM === 'android') {
|
|
32
|
+
if (process.env.UNI_INPUT_DIR) {
|
|
33
|
+
const manifestJsonFilename = path_1.default.resolve(process.env.UNI_INPUT_DIR, 'manifest.json');
|
|
34
|
+
if (fs_1.default.existsSync(manifestJsonFilename)) {
|
|
35
|
+
const manifestJsonStr = fs_1.default.readFileSync(manifestJsonFilename, 'utf-8');
|
|
36
|
+
const manifestJson = (0, jsonc_parser_1.parse)(manifestJsonStr);
|
|
37
|
+
if (manifestJson?.['uni-app-x']?.vapor === true) {
|
|
38
|
+
const vaporFilename = path_1.default.resolve(process.env.UNI_INPUT_DIR, '.vapor');
|
|
39
|
+
if (fs_1.default.existsSync(vaporFilename)) {
|
|
40
|
+
process.env.UNI_APP_X_DOM2 = 'true';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
22
46
|
if (process.env.UNI_APP_X_DOM2 === 'true') {
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
47
|
+
if (process.env.UNI_OUTPUT_DIR &&
|
|
48
|
+
(process.env.UNI_PLATFORM === 'app' ||
|
|
49
|
+
process.env.UNI_PLATFORM === 'app-plus' ||
|
|
50
|
+
process.env.UNI_PLATFORM === 'app-harmony')) {
|
|
51
|
+
if (!process.env.UNI_APP_X_DOM2_CPP_DIR) {
|
|
52
|
+
const baseDir = process.env.UNI_PLATFORM === 'app-harmony'
|
|
53
|
+
? process.env.UNI_OUTPUT_DIR
|
|
54
|
+
: process.env.UNI_APP_X_CACHE_DIR || process.env.UNI_OUTPUT_DIR;
|
|
55
|
+
process.env.UNI_APP_X_DOM2_CPP_DIR = path_1.default.resolve(baseDir, 'cpp');
|
|
56
|
+
}
|
|
57
|
+
if (!process.env.UNI_APP_X_DOM2_KT_DIR) {
|
|
58
|
+
if (process.env.NODE_ENV !== 'development') {
|
|
59
|
+
process.env.UNI_APP_X_DOM2_KT_DIR = path_1.default.resolve(process.env.UNI_OUTPUT_DIR, 'src/.uniappx/android', 'src');
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
process.env.UNI_APP_X_DOM2_KT_DIR = path_1.default.resolve(process.env.UNI_APP_X_CACHE_DIR ||
|
|
63
|
+
path_1.default.resolve(process.env.UNI_OUTPUT_DIR, '../.cache'), 'src');
|
|
29
64
|
}
|
|
30
65
|
}
|
|
31
66
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
67
|
+
if (process.env.UNI_APP_PLATFORM ||
|
|
68
|
+
process.env.UNI_PLATFORM === 'app-harmony') {
|
|
69
|
+
const dynamicFilename = path_1.default.resolve(process.env.UNI_INPUT_DIR, '.dynamic');
|
|
70
|
+
if (fs_1.default.existsSync(dynamicFilename)) {
|
|
71
|
+
process.env.UNI_APP_X_DOM2_DYNAMIC = 'true';
|
|
72
|
+
}
|
|
35
73
|
}
|
|
36
74
|
}
|
|
37
75
|
if (process.env.UNI_APP_X_DOM2 === 'true') {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __exportStar(require("./hbx"), exports);
|
|
|
23
23
|
__exportStar(require("./ssr"), exports);
|
|
24
24
|
__exportStar(require("./vue"), exports);
|
|
25
25
|
__exportStar(require("./uts"), exports);
|
|
26
|
+
__exportStar(require("./x"), exports);
|
|
26
27
|
__exportStar(require("./logs"), exports);
|
|
27
28
|
__exportStar(require("./dom2"), exports);
|
|
28
29
|
__exportStar(require("./i18n"), exports);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare function parseUniXFlexDirection(manifestJson: Record<string, any>): any;
|
|
2
2
|
export declare function parseUniXSplashScreen(platform: 'app-android' | 'app-ios' | 'app-harmony', manifestJson: Record<string, any>): false | object;
|
|
3
|
-
export declare function parseUniXAppAndroidPackage(appid
|
|
3
|
+
export declare function parseUniXAppAndroidPackage(appid?: string): string;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseUniXAppAndroidPackage = exports.parseUniXSplashScreen = exports.parseUniXFlexDirection = void 0;
|
|
4
4
|
const shared_1 = require("@vue/shared");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
5
6
|
const flexDirs = ['row', 'row-reverse', 'column', 'column-reverse'];
|
|
6
7
|
function parseUniXFlexDirection(manifestJson) {
|
|
7
8
|
const flexDir = manifestJson?.['uni-app-x']?.['flex-direction'];
|
|
@@ -20,6 +21,6 @@ function parseUniXSplashScreen(platform, manifestJson) {
|
|
|
20
21
|
}
|
|
21
22
|
exports.parseUniXSplashScreen = parseUniXSplashScreen;
|
|
22
23
|
function parseUniXAppAndroidPackage(appid) {
|
|
23
|
-
return 'uni.' + appid.replace(/_/g, '');
|
|
24
|
+
return 'uni.' + (appid || constants_1.DEFAULT_APPID).replace(/_/g, '');
|
|
24
25
|
}
|
|
25
26
|
exports.parseUniXAppAndroidPackage = parseUniXAppAndroidPackage;
|
package/dist/messages/en.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
readonly 'app.compiler.version': "Compiler version: {version}";
|
|
3
|
+
readonly 'style.isolation.version': "Style isolation version: {version}";
|
|
3
4
|
readonly compiling: "Compiling...";
|
|
4
5
|
readonly 'dev.performance': "Please note that in running mode, due to log output, sourcemap, and uncompressed source code, the performance and package size are not as good as release mode.";
|
|
5
6
|
readonly 'dev.performance.nvue': "Especially the sourcemap of app-nvue has a greater impact";
|
package/dist/messages/en.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
'app.compiler.version': 'Compiler version: {version}',
|
|
5
|
+
'style.isolation.version': 'Style isolation version: {version}',
|
|
5
6
|
compiling: 'Compiling...',
|
|
6
7
|
'dev.performance': 'Please note that in running mode, due to log output, sourcemap, and uncompressed source code, the performance and package size are not as good as release mode.',
|
|
7
8
|
'dev.performance.nvue': 'Especially the sourcemap of app-nvue has a greater impact',
|
package/dist/messages/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const M: {
|
|
2
2
|
readonly 'app.compiler.version': "编译器版本:{version}";
|
|
3
|
+
readonly 'style.isolation.version': "当前样式隔离策略:{version}。详见:https://doc.dcloud.net.cn/uni-app-x/css/common/style-isolation.html";
|
|
3
4
|
readonly compiling: "正在编译中...";
|
|
4
5
|
readonly 'dev.performance': "请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。";
|
|
5
6
|
readonly 'dev.performance.nvue': "尤其是 app-nvue 的 sourcemap 影响较大";
|
|
@@ -51,6 +52,7 @@ export declare const M: {
|
|
|
51
52
|
readonly 'pages.json.tabbar.page.notfound': "tabBar 中配置的页面 \"{pagePath}\" 未在 pages.json 中注册。";
|
|
52
53
|
} | {
|
|
53
54
|
readonly 'app.compiler.version': "Compiler version: {version}";
|
|
55
|
+
readonly 'style.isolation.version': "Style isolation version: {version}";
|
|
54
56
|
readonly compiling: "Compiling...";
|
|
55
57
|
readonly 'dev.performance': "Please note that in running mode, due to log output, sourcemap, and uncompressed source code, the performance and package size are not as good as release mode.";
|
|
56
58
|
readonly 'dev.performance.nvue': "Especially the sourcemap of app-nvue has a greater impact";
|
package/dist/messages/zh_CN.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
readonly 'app.compiler.version': "编译器版本:{version}";
|
|
3
|
+
readonly 'style.isolation.version': "当前样式隔离策略:{version}。详见:https://doc.dcloud.net.cn/uni-app-x/css/common/style-isolation.html";
|
|
3
4
|
readonly compiling: "正在编译中...";
|
|
4
5
|
readonly 'dev.performance': "请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。";
|
|
5
6
|
readonly 'dev.performance.nvue': "尤其是 app-nvue 的 sourcemap 影响较大";
|
package/dist/messages/zh_CN.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
'app.compiler.version': '编译器版本:{version}',
|
|
5
|
+
'style.isolation.version': '当前样式隔离策略:{version}。详见:https://doc.dcloud.net.cn/uni-app-x/css/common/style-isolation.html',
|
|
5
6
|
compiling: '正在编译中...',
|
|
6
7
|
'dev.performance': '请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。',
|
|
7
8
|
'dev.performance.nvue': '尤其是 app-nvue 的 sourcemap 影响较大',
|
|
@@ -12,6 +12,7 @@ const easycom_1 = require("./easycom");
|
|
|
12
12
|
const messages_1 = require("./messages");
|
|
13
13
|
const constants_1 = require("./constants");
|
|
14
14
|
const url_1 = require("./url");
|
|
15
|
+
const x_1 = require("./x");
|
|
15
16
|
function genEncryptEasyComModuleIndex(pluginId, platform, components) {
|
|
16
17
|
const isMp = platform.startsWith('mp-');
|
|
17
18
|
const imports = [];
|
|
@@ -23,7 +24,7 @@ function genEncryptEasyComModuleIndex(pluginId, platform, components) {
|
|
|
23
24
|
ids.push(id);
|
|
24
25
|
}
|
|
25
26
|
let instance = '';
|
|
26
|
-
if (
|
|
27
|
+
if ((0, x_1.isUniAppXAndroidNative)(platform)) {
|
|
27
28
|
instance = (0, easycom_1.genUTSComponentPublicInstanceIdent)(component);
|
|
28
29
|
// 类型
|
|
29
30
|
ids.push(instance);
|
|
@@ -307,14 +308,15 @@ const KNOWN_ASSET_TYPES = [
|
|
|
307
308
|
'txt',
|
|
308
309
|
];
|
|
309
310
|
function findUniModuleFiles(platform, id, inputDir) {
|
|
311
|
+
const useUniAppXAndroidNative = (0, x_1.isUniAppXAndroidNative)(platform);
|
|
310
312
|
return (0, fast_glob_1.sync)(`uni_modules/${id}/**/*`, {
|
|
311
313
|
cwd: inputDir,
|
|
312
314
|
absolute: true,
|
|
313
315
|
ignore: [
|
|
314
316
|
'**/*.md',
|
|
315
|
-
...(
|
|
316
|
-
? [
|
|
317
|
-
: []),
|
|
317
|
+
...(useUniAppXAndroidNative // 仅旧版 Android x 需要扫描 assets
|
|
318
|
+
? []
|
|
319
|
+
: [`**/*.{${KNOWN_ASSET_TYPES.join(',')}}`]),
|
|
318
320
|
],
|
|
319
321
|
});
|
|
320
322
|
}
|
|
@@ -367,8 +369,10 @@ function resolveEncryptUniModule(id, platform, isX = true) {
|
|
|
367
369
|
}
|
|
368
370
|
}
|
|
369
371
|
}
|
|
370
|
-
//
|
|
371
|
-
return (0, utils_1.normalizePath)(path_1.default.join(process.env.UNI_INPUT_DIR, `uni_modules/${uniModuleId}?${isX &&
|
|
372
|
+
// 仅旧版 Android x 原生引擎走 uts-proxy,JS 引擎与其他平台统一走 uni_helpers
|
|
373
|
+
return (0, utils_1.normalizePath)(path_1.default.join(process.env.UNI_INPUT_DIR, `uni_modules/${uniModuleId}?${isX && (0, x_1.isUniAppXAndroidNative)(platform)
|
|
374
|
+
? 'uts-proxy'
|
|
375
|
+
: 'uni_helpers'}`));
|
|
372
376
|
}
|
|
373
377
|
}
|
|
374
378
|
}
|
|
@@ -383,15 +387,14 @@ async function checkEncryptUniModules(inputDir, params, sdkType = 'all') {
|
|
|
383
387
|
return {};
|
|
384
388
|
}
|
|
385
389
|
const cacheDir = process.env.UNI_MODULES_ENCRYPT_CACHE_DIR;
|
|
386
|
-
const { zipFile, modules } = packUploadEncryptUniModules(curEncryptUniModules,
|
|
390
|
+
const { zipFile, modules } = packUploadEncryptUniModules(curEncryptUniModules, params.platform, inputDir, cacheDir);
|
|
387
391
|
if (zipFile) {
|
|
388
392
|
const downloadFile = path_1.default.resolve(cacheDir, 'uni_modules.download.zip');
|
|
389
393
|
const { C, D, R, U } = (0, utils_1.requireUniHelpers)();
|
|
390
394
|
try {
|
|
391
395
|
const isLogin = await C();
|
|
392
|
-
const
|
|
393
|
-
|
|
394
|
-
: '';
|
|
396
|
+
const useUniAppXAndroidNative = (0, x_1.isUniAppXAndroidNative)(params.platform);
|
|
397
|
+
const tips = !useUniAppXAndroidNative ? '(此过程耗时较长)' : '';
|
|
395
398
|
console.log(`正在云编译插件${isLogin ? '' : '(请先登录)'}${tips}:${modules.join(',')}...`);
|
|
396
399
|
let downloadUrl = '';
|
|
397
400
|
try {
|
|
@@ -431,8 +434,9 @@ async function checkEncryptUniModules(inputDir, params, sdkType = 'all') {
|
|
|
431
434
|
}
|
|
432
435
|
}
|
|
433
436
|
else {
|
|
434
|
-
|
|
435
|
-
|
|
437
|
+
const useUniAppXAndroidNative = (0, x_1.isUniAppXAndroidNative)(params.platform);
|
|
438
|
+
// 仅旧版 Android x 需要在缓存命中时额外初始化
|
|
439
|
+
if (useUniAppXAndroidNative) {
|
|
436
440
|
const { R } = (0, utils_1.requireUniHelpers)();
|
|
437
441
|
R({
|
|
438
442
|
dir: process.env.UNI_INPUT_DIR,
|