@dcloudio/uni-cli-shared 3.0.0-5000720260410001 → 3.0.0-5010520260709001
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 +3 -0
- package/dist/dom2/index.js +3 -0
- package/dist/dom2/rootScrollView.d.ts +47 -0
- package/dist/dom2/rootScrollView.js +283 -0
- package/dist/dom2/sharedData.d.ts +4 -0
- package/dist/dom2/sharedData.js +40 -5
- package/dist/dom2/vue.d.ts +16 -0
- package/dist/dom2/vue.js +37 -0
- package/dist/easycom.d.ts +1 -0
- package/dist/easycom.js +23 -9
- package/dist/env/define.d.ts +0 -1
- package/dist/env/define.js +3 -11
- package/dist/hbx/alias.js +64 -10
- package/dist/hbx/log.js +9 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/json/app/manifest/plus.js +9 -1
- package/dist/json/app/pages/definePage.js +3 -1
- package/dist/json/index.d.ts +1 -1
- package/dist/json/index.js +2 -1
- package/dist/json/mp/index.d.ts +2 -0
- package/dist/json/mp/index.js +23 -1
- package/dist/json/mp/jsonFile.d.ts +3 -2
- package/dist/json/mp/jsonFile.js +83 -13
- package/dist/json/mp/pages.d.ts +1 -0
- package/dist/json/mp/pages.js +6 -2
- package/dist/json/mp/subpackage.d.ts +26 -0
- package/dist/json/mp/subpackage.js +236 -0
- package/dist/json/uni-x/index.d.ts +6 -0
- package/dist/json/uni-x/index.js +54 -1
- package/dist/json/uni-x/manifest.d.ts +1 -1
- package/dist/json/uni-x/manifest.js +2 -1
- package/dist/json/utils.js +24 -0
- package/dist/logs/console.js +4 -1
- package/dist/messages/en.d.ts +11 -2
- package/dist/messages/en.js +11 -2
- package/dist/messages/index.d.ts +22 -4
- package/dist/messages/zh_CN.d.ts +11 -2
- package/dist/messages/zh_CN.js +11 -2
- package/dist/mp/style.js +6 -2
- package/dist/mp/usingComponents.d.ts +7 -5
- package/dist/mp/usingComponents.js +63 -34
- package/dist/postcss/plugins/stylePluginExternal.d.ts +9 -10
- package/dist/postcss/plugins/stylePluginExternal.js +51 -45
- package/dist/resolve.d.ts +1 -0
- package/dist/resolve.js +9 -2
- package/dist/uni_modules.cloud.d.ts +7 -1
- package/dist/uni_modules.cloud.js +131 -14
- package/dist/uni_modules.js +3 -2
- package/dist/utils.js +5 -0
- package/dist/uts.d.ts +1 -0
- package/dist/uts.js +90 -6
- 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/cssScoped.js +11 -2
- package/dist/vite/plugins/easycom.js +3 -1
- package/dist/vite/plugins/inject.js +11 -3
- package/dist/vite/plugins/json.js +2 -69
- package/dist/vite/plugins/jsonJs.js +41 -3
- package/dist/vite/plugins/pre.js +2 -0
- package/dist/vite/plugins/sfc.js +4 -1
- package/dist/vite/plugins/stats.d.ts +5 -1
- package/dist/vite/plugins/stats.js +74 -3
- package/dist/vite/plugins/uts/uni_modules.d.ts +1 -1
- package/dist/vite/plugins/uts/uni_modules.js +30 -12
- package/dist/vite/plugins/vitejs/plugins/asset.js +14 -1
- package/dist/vite/plugins/vitejs/plugins/css.d.ts +2 -2
- package/dist/vite/plugins/vitejs/plugins/css.js +45 -6
- package/dist/vue/transforms/index.d.ts +1 -0
- package/dist/vue/transforms/index.js +2 -1
- package/dist/vue/transforms/transformTeleport.d.ts +2 -0
- package/dist/vue/transforms/transformTeleport.js +68 -0
- package/dist/vue/transforms/x/transformDirection.js +33 -4
- package/dist/workers.d.ts +1 -0
- package/dist/workers.js +12 -5
- package/dist/x.d.ts +11 -0
- package/dist/x.js +43 -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 +58 -63
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.prod.js +58 -63
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.d.ts +7 -1
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.esm-bundler.js +22 -47
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.js +12 -23
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +12 -22
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +23 -74
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +5 -5
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +3 -20
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.js +310 -363
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.prod.js +5 -5
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +810 -579
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.d.ts +33 -11114
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +1638 -1250
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.cjs.js +1031 -599
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.d.ts +470 -328
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.esm-browser.js +1154 -709
- 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 +16 -25
- package/lib/dom2/app/@vue/shared/dist/shared.cjs.prod.js +16 -25
- package/lib/dom2/app/@vue/shared/dist/shared.d.ts +5 -0
- package/lib/dom2/app/@vue/shared/dist/shared.esm-bundler.js +11 -23
- package/package.json +6 -6
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const MP_INDEPENDENT_ROOT_QUERY = "uni_mp_independent_root";
|
|
2
|
+
export declare const MP_INDEPENDENT_MAIN_PREFIX = "\0uni:mp-independent-main";
|
|
3
|
+
export declare const MP_INDEPENDENT_VIRTUAL_ROOT_QUERY = "root";
|
|
4
|
+
export interface IndependentSubPackage {
|
|
5
|
+
root: string;
|
|
6
|
+
pages: string[];
|
|
7
|
+
independent: true;
|
|
8
|
+
}
|
|
9
|
+
export declare function parseIndependentSubPackages(pagesJson: UniApp.PagesJson | undefined): IndependentSubPackage[];
|
|
10
|
+
export declare function setIndependentSubPackages(packages: IndependentSubPackage[]): void;
|
|
11
|
+
export declare function getIndependentSubPackages(): IndependentSubPackage[];
|
|
12
|
+
export declare function getIndependentRoots(): Set<string>;
|
|
13
|
+
export declare function getIndependentRootByFilename(filename: string, inputDir: string | undefined): string | undefined;
|
|
14
|
+
export declare function resolveIndependentRoot(id: string, importer: string | undefined, inputDir: string | undefined, platform: string | undefined): string | undefined;
|
|
15
|
+
export declare function withIndependentRootIfNeeded(id: string, root: string | undefined, inputDir: string | undefined): string;
|
|
16
|
+
export declare function isInIndependentRoot(filename: string, inputDir: string, root: string): boolean;
|
|
17
|
+
export declare function isAppPagesJson(filename: string, inputDir: string): boolean;
|
|
18
|
+
export declare function stringifyIndependentRoots(packages: IndependentSubPackage[]): string;
|
|
19
|
+
export declare function normalizeIndependentRoot(root: string): string;
|
|
20
|
+
export declare function parseIndependentRoot(id: string): string | undefined;
|
|
21
|
+
export declare function withIndependentRoot(id: string, root: string): string;
|
|
22
|
+
export declare function withoutIndependentRoot(id: string): string;
|
|
23
|
+
export declare function hasIndependentRoot(id: string): boolean;
|
|
24
|
+
export declare function formatIndependentVirtualId(prefix: string, root: string): string;
|
|
25
|
+
export declare function parseIndependentMainRoot(id: string): string | undefined;
|
|
26
|
+
export declare function parseIndependentVirtualRoot(id: string, prefix: string): string | undefined;
|
|
@@ -0,0 +1,236 @@
|
|
|
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.parseIndependentVirtualRoot = exports.parseIndependentMainRoot = exports.formatIndependentVirtualId = exports.hasIndependentRoot = exports.withoutIndependentRoot = exports.withIndependentRoot = exports.parseIndependentRoot = exports.normalizeIndependentRoot = exports.stringifyIndependentRoots = exports.isAppPagesJson = exports.isInIndependentRoot = exports.withIndependentRootIfNeeded = exports.resolveIndependentRoot = exports.getIndependentRootByFilename = exports.getIndependentRoots = exports.getIndependentSubPackages = exports.setIndependentSubPackages = exports.parseIndependentSubPackages = exports.MP_INDEPENDENT_VIRTUAL_ROOT_QUERY = exports.MP_INDEPENDENT_MAIN_PREFIX = exports.MP_INDEPENDENT_ROOT_QUERY = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
9
|
+
exports.MP_INDEPENDENT_ROOT_QUERY = 'uni_mp_independent_root';
|
|
10
|
+
exports.MP_INDEPENDENT_MAIN_PREFIX = '\0uni:mp-independent-main';
|
|
11
|
+
exports.MP_INDEPENDENT_VIRTUAL_ROOT_QUERY = 'root';
|
|
12
|
+
function parseIndependentSubPackages(pagesJson) {
|
|
13
|
+
if (!pagesJson) {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
const subPackages = pagesJson.subPackages || pagesJson.subpackages || [];
|
|
17
|
+
if (!Array.isArray(subPackages)) {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
return subPackages.reduce((packages, subPackage) => {
|
|
21
|
+
if (!subPackage || subPackage.independent !== true) {
|
|
22
|
+
return packages;
|
|
23
|
+
}
|
|
24
|
+
const root = normalizeSubPackageRoot(subPackage.root);
|
|
25
|
+
const pages = normalizeSubPackagePages(subPackage.pages);
|
|
26
|
+
if (!root || !pages.length) {
|
|
27
|
+
return packages;
|
|
28
|
+
}
|
|
29
|
+
packages.push({
|
|
30
|
+
root,
|
|
31
|
+
pages,
|
|
32
|
+
independent: true,
|
|
33
|
+
});
|
|
34
|
+
return packages;
|
|
35
|
+
}, []);
|
|
36
|
+
}
|
|
37
|
+
exports.parseIndependentSubPackages = parseIndependentSubPackages;
|
|
38
|
+
let independentSubPackages = [];
|
|
39
|
+
let independentRootMatchers = [];
|
|
40
|
+
function setIndependentSubPackages(packages) {
|
|
41
|
+
independentSubPackages = packages.reduce((result, pkg) => {
|
|
42
|
+
const root = normalizeIndependentRoot(pkg.root);
|
|
43
|
+
if (root) {
|
|
44
|
+
result.push({
|
|
45
|
+
...pkg,
|
|
46
|
+
root,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
}, []);
|
|
51
|
+
independentRootMatchers = independentSubPackages
|
|
52
|
+
.map(({ root }) => ({
|
|
53
|
+
root,
|
|
54
|
+
normalizedRoot: root,
|
|
55
|
+
}))
|
|
56
|
+
.sort((a, b) => b.normalizedRoot.length - a.normalizedRoot.length);
|
|
57
|
+
}
|
|
58
|
+
exports.setIndependentSubPackages = setIndependentSubPackages;
|
|
59
|
+
function getIndependentSubPackages() {
|
|
60
|
+
return independentSubPackages;
|
|
61
|
+
}
|
|
62
|
+
exports.getIndependentSubPackages = getIndependentSubPackages;
|
|
63
|
+
function getIndependentRoots() {
|
|
64
|
+
return new Set(independentSubPackages.map(({ root }) => root));
|
|
65
|
+
}
|
|
66
|
+
exports.getIndependentRoots = getIndependentRoots;
|
|
67
|
+
function getIndependentRootByFilename(filename, inputDir) {
|
|
68
|
+
const cleanFilename = splitIdQuery(withoutIndependentRoot(filename)).filename;
|
|
69
|
+
if (!inputDir || !path_1.default.isAbsolute(cleanFilename)) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const relativeFilename = (0, utils_1.normalizePath)(path_1.default.relative(inputDir, cleanFilename));
|
|
73
|
+
const matcher = independentRootMatchers.find(({ normalizedRoot }) => {
|
|
74
|
+
return (relativeFilename === normalizedRoot ||
|
|
75
|
+
relativeFilename.startsWith(`${normalizedRoot}/`));
|
|
76
|
+
});
|
|
77
|
+
return matcher?.root;
|
|
78
|
+
}
|
|
79
|
+
exports.getIndependentRootByFilename = getIndependentRootByFilename;
|
|
80
|
+
function resolveIndependentRoot(id, importer, inputDir, platform) {
|
|
81
|
+
if (!platform?.startsWith('mp-')) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const root = parseIndependentRoot(id) ||
|
|
85
|
+
(importer
|
|
86
|
+
? parseIndependentRoot(importer) ||
|
|
87
|
+
getIndependentRootByFilename(importer, inputDir)
|
|
88
|
+
: undefined);
|
|
89
|
+
const normalizedRoot = root && normalizeIndependentRoot(root);
|
|
90
|
+
if (normalizedRoot && getIndependentRoots().has(normalizedRoot)) {
|
|
91
|
+
return normalizedRoot;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.resolveIndependentRoot = resolveIndependentRoot;
|
|
95
|
+
function withIndependentRootIfNeeded(id, root, inputDir) {
|
|
96
|
+
if (!root ||
|
|
97
|
+
!inputDir ||
|
|
98
|
+
parseIndependentRoot(id) ||
|
|
99
|
+
isIndependentStyleRequest(id)) {
|
|
100
|
+
return id;
|
|
101
|
+
}
|
|
102
|
+
if (isInIndependentRoot(id, inputDir, root) || isAppPagesJson(id, inputDir)) {
|
|
103
|
+
return withIndependentRoot(id, root);
|
|
104
|
+
}
|
|
105
|
+
return id;
|
|
106
|
+
}
|
|
107
|
+
exports.withIndependentRootIfNeeded = withIndependentRootIfNeeded;
|
|
108
|
+
function isInIndependentRoot(filename, inputDir, root) {
|
|
109
|
+
const cleanFilename = (0, utils_1.normalizePath)(withoutIndependentRoot(filename)).split('?')[0];
|
|
110
|
+
const normalizedInputDir = (0, utils_1.normalizePath)(inputDir);
|
|
111
|
+
const normalizedRoot = normalizeIndependentRoot(root);
|
|
112
|
+
const rootDir = `${normalizedInputDir}/${normalizedRoot}`;
|
|
113
|
+
return cleanFilename === rootDir || cleanFilename.startsWith(`${rootDir}/`);
|
|
114
|
+
}
|
|
115
|
+
exports.isInIndependentRoot = isInIndependentRoot;
|
|
116
|
+
function isAppPagesJson(filename, inputDir) {
|
|
117
|
+
const cleanFilename = (0, utils_1.normalizePath)(withoutIndependentRoot(filename)).split('?')[0];
|
|
118
|
+
const pagesJson = (0, utils_1.normalizePath)(path_1.default.join(inputDir, 'pages.json'));
|
|
119
|
+
// uni-app x 的 UTS resolver 会把 JSON 文件映射为 .json.ts 参与类型编译。
|
|
120
|
+
return cleanFilename === pagesJson || cleanFilename === `${pagesJson}.ts`;
|
|
121
|
+
}
|
|
122
|
+
exports.isAppPagesJson = isAppPagesJson;
|
|
123
|
+
function stringifyIndependentRoots(packages) {
|
|
124
|
+
return packages
|
|
125
|
+
.map(({ root }) => normalizeIndependentRoot(root))
|
|
126
|
+
.filter(Boolean)
|
|
127
|
+
.sort()
|
|
128
|
+
.join('\n');
|
|
129
|
+
}
|
|
130
|
+
exports.stringifyIndependentRoots = stringifyIndependentRoots;
|
|
131
|
+
function normalizeIndependentRoot(root) {
|
|
132
|
+
return (0, utils_1.normalizePath)(root).replace(/^\/+|\/+$/g, '');
|
|
133
|
+
}
|
|
134
|
+
exports.normalizeIndependentRoot = normalizeIndependentRoot;
|
|
135
|
+
function isIndependentStyleRequest(id) {
|
|
136
|
+
const cleanId = withoutIndependentRoot(id);
|
|
137
|
+
// 这里保持独立判断,避免 json/mp 基础能力反向依赖 Vite CSS 插件实现。
|
|
138
|
+
return /\.(?:css|less|sass|scss|styl|stylus|pcss|postcss)(?:$|\?)/.test(cleanId);
|
|
139
|
+
}
|
|
140
|
+
function normalizeSubPackageRoot(root) {
|
|
141
|
+
if (typeof root !== 'string') {
|
|
142
|
+
return '';
|
|
143
|
+
}
|
|
144
|
+
return normalizeIndependentRoot(root.trim());
|
|
145
|
+
}
|
|
146
|
+
function normalizeSubPackagePages(pages) {
|
|
147
|
+
if (!Array.isArray(pages)) {
|
|
148
|
+
return [];
|
|
149
|
+
}
|
|
150
|
+
return pages.reduce((paths, page) => {
|
|
151
|
+
if (typeof page === 'string' && page) {
|
|
152
|
+
paths.push((0, utils_1.normalizePath)(page));
|
|
153
|
+
}
|
|
154
|
+
else if (page && typeof page.path === 'string' && page.path) {
|
|
155
|
+
paths.push((0, utils_1.normalizePath)(page.path));
|
|
156
|
+
}
|
|
157
|
+
return paths;
|
|
158
|
+
}, []);
|
|
159
|
+
}
|
|
160
|
+
function parseIndependentRoot(id) {
|
|
161
|
+
const query = splitIdQuery(id).query;
|
|
162
|
+
if (!query) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
for (const item of query.split('&')) {
|
|
166
|
+
const [name, value = ''] = splitQueryItem(item);
|
|
167
|
+
if (name === exports.MP_INDEPENDENT_ROOT_QUERY) {
|
|
168
|
+
return decodeURIComponent(value);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
exports.parseIndependentRoot = parseIndependentRoot;
|
|
173
|
+
function withIndependentRoot(id, root) {
|
|
174
|
+
const cleanId = withoutIndependentRoot(id);
|
|
175
|
+
const { filename, query } = splitIdQuery(cleanId);
|
|
176
|
+
const rootQuery = `${exports.MP_INDEPENDENT_ROOT_QUERY}=${encodeURIComponent(root)}`;
|
|
177
|
+
return `${(0, utils_1.normalizePath)(filename)}?${query ? query + '&' : ''}${rootQuery}`;
|
|
178
|
+
}
|
|
179
|
+
exports.withIndependentRoot = withIndependentRoot;
|
|
180
|
+
function withoutIndependentRoot(id) {
|
|
181
|
+
const { filename, query } = splitIdQuery(id);
|
|
182
|
+
if (!query) {
|
|
183
|
+
return id;
|
|
184
|
+
}
|
|
185
|
+
const nextQuery = query
|
|
186
|
+
.split('&')
|
|
187
|
+
.filter((item) => splitQueryItem(item)[0] !== exports.MP_INDEPENDENT_ROOT_QUERY)
|
|
188
|
+
.join('&');
|
|
189
|
+
return nextQuery ? `${filename}?${nextQuery}` : filename;
|
|
190
|
+
}
|
|
191
|
+
exports.withoutIndependentRoot = withoutIndependentRoot;
|
|
192
|
+
function hasIndependentRoot(id) {
|
|
193
|
+
return parseIndependentRoot(id) !== undefined;
|
|
194
|
+
}
|
|
195
|
+
exports.hasIndependentRoot = hasIndependentRoot;
|
|
196
|
+
function formatIndependentVirtualId(prefix, root) {
|
|
197
|
+
return `${prefix}?${exports.MP_INDEPENDENT_VIRTUAL_ROOT_QUERY}=${encodeURIComponent(root)}`;
|
|
198
|
+
}
|
|
199
|
+
exports.formatIndependentVirtualId = formatIndependentVirtualId;
|
|
200
|
+
function parseIndependentMainRoot(id) {
|
|
201
|
+
return parseIndependentVirtualRoot(id, exports.MP_INDEPENDENT_MAIN_PREFIX);
|
|
202
|
+
}
|
|
203
|
+
exports.parseIndependentMainRoot = parseIndependentMainRoot;
|
|
204
|
+
function parseIndependentVirtualRoot(id, prefix) {
|
|
205
|
+
if (!id.startsWith(`${prefix}?`)) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
const { query } = splitIdQuery(id);
|
|
209
|
+
if (!query) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
for (const item of query.split('&')) {
|
|
213
|
+
const [name, value = ''] = splitQueryItem(item);
|
|
214
|
+
if (name === exports.MP_INDEPENDENT_VIRTUAL_ROOT_QUERY) {
|
|
215
|
+
return decodeURIComponent(value);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
exports.parseIndependentVirtualRoot = parseIndependentVirtualRoot;
|
|
220
|
+
function splitIdQuery(id) {
|
|
221
|
+
const queryIndex = id.indexOf('?');
|
|
222
|
+
if (queryIndex === -1) {
|
|
223
|
+
return { filename: id, query: '' };
|
|
224
|
+
}
|
|
225
|
+
return {
|
|
226
|
+
filename: id.slice(0, queryIndex),
|
|
227
|
+
query: id.slice(queryIndex + 1),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function splitQueryItem(item) {
|
|
231
|
+
const equalIndex = item.indexOf('=');
|
|
232
|
+
if (equalIndex === -1) {
|
|
233
|
+
return [item, ''];
|
|
234
|
+
}
|
|
235
|
+
return [item.slice(0, equalIndex), item.slice(equalIndex + 1)];
|
|
236
|
+
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export * from './manifest';
|
|
2
|
+
export interface UniXPageOptions {
|
|
3
|
+
disableScroll?: boolean;
|
|
4
|
+
enablePullDownRefresh?: boolean;
|
|
5
|
+
scrollIndicator?: 'none';
|
|
6
|
+
}
|
|
2
7
|
export declare function normalizeUniAppXAppPagesJson(jsonStr: string): UniApp.PagesJson;
|
|
8
|
+
export declare function parseUniXPageOptions(filename: string): UniXPageOptions | undefined;
|
|
3
9
|
/**
|
|
4
10
|
* TODO 应该闭包,通过globalThis赋值?
|
|
5
11
|
* @param pagesJson
|
package/dist/json/uni-x/index.js
CHANGED
|
@@ -17,7 +17,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.getUniXPagePaths = exports.isUniXPageFile = exports.normalizeUniAppXAppConfig = exports.normalizeUniAppXAppPagesJson = void 0;
|
|
20
|
+
exports.getUniXPagePaths = exports.isUniXPageFile = exports.normalizeUniAppXAppConfig = exports.parseUniXPageOptions = exports.normalizeUniAppXAppPagesJson = void 0;
|
|
21
|
+
const fs_1 = __importDefault(require("fs"));
|
|
21
22
|
const path_1 = __importDefault(require("path"));
|
|
22
23
|
const shared_1 = require("@vue/shared");
|
|
23
24
|
const json_1 = require("../json");
|
|
@@ -28,6 +29,7 @@ const uniConfig_1 = require("./uniConfig");
|
|
|
28
29
|
const preprocess_1 = require("../../preprocess");
|
|
29
30
|
const utils_2 = require("../utils");
|
|
30
31
|
__exportStar(require("./manifest"), exports);
|
|
32
|
+
const uniXPageOptionsCache = new Map();
|
|
31
33
|
function normalizeUniAppXAppPagesJson(jsonStr) {
|
|
32
34
|
// 先条件编译
|
|
33
35
|
jsonStr = (0, preprocess_1.preUVueJson)(jsonStr, 'pages.json');
|
|
@@ -77,9 +79,60 @@ function normalizeUniAppXAppPagesJson(jsonStr) {
|
|
|
77
79
|
// 缓存页面列表
|
|
78
80
|
pages_1.pagesCacheSet.clear();
|
|
79
81
|
pagesJson.pages.forEach((page) => pages_1.pagesCacheSet.add(page.path));
|
|
82
|
+
updateUniXPageOptions(pagesJson);
|
|
80
83
|
return pagesJson;
|
|
81
84
|
}
|
|
82
85
|
exports.normalizeUniAppXAppPagesJson = normalizeUniAppXAppPagesJson;
|
|
86
|
+
function updateUniXPageOptions(pagesJson) {
|
|
87
|
+
const inputDir = getUniXInputDir();
|
|
88
|
+
if (!inputDir) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const pageOptions = new Map();
|
|
92
|
+
pagesJson.pages.forEach((page) => {
|
|
93
|
+
pageOptions.set(page.path, normalizeRootPageOptions(page.style));
|
|
94
|
+
});
|
|
95
|
+
uniXPageOptionsCache.set(inputDir, pageOptions);
|
|
96
|
+
}
|
|
97
|
+
function normalizeRootPageOptions(pageStyle) {
|
|
98
|
+
if (!pageStyle) {
|
|
99
|
+
return {};
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
disableScroll: pageStyle.disableScroll === true || undefined,
|
|
103
|
+
enablePullDownRefresh: isEnablePullDownRefresh(pageStyle) || undefined,
|
|
104
|
+
scrollIndicator: pageStyle.scrollIndicator,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function initUniXPageOptions() {
|
|
108
|
+
const inputDir = getUniXInputDir();
|
|
109
|
+
if (!inputDir || uniXPageOptionsCache.has(inputDir)) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const filename = path_1.default.resolve(inputDir, 'pages.json');
|
|
113
|
+
if (!fs_1.default.existsSync(filename)) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
normalizeUniAppXAppPagesJson(fs_1.default.readFileSync(filename, 'utf8'));
|
|
117
|
+
}
|
|
118
|
+
function isEnablePullDownRefresh(pageStyle) {
|
|
119
|
+
return pageStyle.enablePullDownRefresh || pageStyle.pullToRefresh?.support;
|
|
120
|
+
}
|
|
121
|
+
function parseUniXPageOptions(filename) {
|
|
122
|
+
initUniXPageOptions();
|
|
123
|
+
const inputDir = getUniXInputDir();
|
|
124
|
+
if (!inputDir) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const pagePath = (0, utils_1.removeExt)((0, utils_1.normalizePath)(path_1.default.relative(inputDir, filename.split('?')[0])));
|
|
128
|
+
return uniXPageOptionsCache.get(inputDir)?.get(pagePath);
|
|
129
|
+
}
|
|
130
|
+
exports.parseUniXPageOptions = parseUniXPageOptions;
|
|
131
|
+
function getUniXInputDir() {
|
|
132
|
+
return process.env.UNI_INPUT_DIR
|
|
133
|
+
? (0, utils_1.normalizePath)(process.env.UNI_INPUT_DIR)
|
|
134
|
+
: undefined;
|
|
135
|
+
}
|
|
83
136
|
function normalizeSubPackages(subPackages) {
|
|
84
137
|
const pages = [];
|
|
85
138
|
if ((0, shared_1.isArray)(subPackages)) {
|
|
@@ -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/json/utils.js
CHANGED
|
@@ -64,6 +64,30 @@ function checkPagesJson(jsonStr, inputDir) {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
|
+
const tabBarNode = root.children?.find((child) => child.type === 'property' &&
|
|
68
|
+
child.children?.length === 2 &&
|
|
69
|
+
child.children[0].value === 'tabBar');
|
|
70
|
+
if (process.env.UNI_APP_X_DOM2 !== 'true' && tabBarNode) {
|
|
71
|
+
// dom2下不支持tabBar配置项,这里先不校验
|
|
72
|
+
let allPages = []; // 收集全部页面,包含分包页面
|
|
73
|
+
let tabBarPages = []; // 收集 tabBar 页面
|
|
74
|
+
allPages.push(...pagePathNodes.map((node) => node.value));
|
|
75
|
+
findRootNode(tabBarNode.children[1], ['list']).forEach((node) => {
|
|
76
|
+
const pagePathNode = node.type === 'object' &&
|
|
77
|
+
node.children?.find((child) => child.type === 'property' &&
|
|
78
|
+
child.children?.length === 2 &&
|
|
79
|
+
child.children[0].value === 'pagePath');
|
|
80
|
+
if (pagePathNode) {
|
|
81
|
+
const pagePathValueNode = pagePathNode.children[1];
|
|
82
|
+
const pagePath = pagePathValueNode.value;
|
|
83
|
+
tabBarPages.push(pagePath);
|
|
84
|
+
if (!allPages.includes(pagePath) &&
|
|
85
|
+
!allPages.includes(pagePath.substring(1))) {
|
|
86
|
+
throwCompilerError(jsonStr, pagePathValueNode, messages_1.M['pages.json.tabbar.page.notfound'].replace('{pagePath}', pagePath));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
67
91
|
for (const node of pagePathNodes) {
|
|
68
92
|
const pagePath = node.value ?? '';
|
|
69
93
|
if (!pageExistsWithCaseSync(path_1.default.join(inputDir, pagePath))) {
|
package/dist/logs/console.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.appendConsoleExpr = exports.restoreConsoleExpr = exports.rewriteConsoleExpr = void 0;
|
|
7
7
|
const magic_string_1 = __importDefault(require("magic-string"));
|
|
8
8
|
const utils_1 = require("../utils");
|
|
9
|
+
const x_1 = require("../x");
|
|
9
10
|
function rewriteConsoleExpr(method, id, filename, code, sourceMap = false) {
|
|
10
11
|
filename = (0, utils_1.normalizePath)(filename);
|
|
11
12
|
const re = /(console\.(log|info|debug|warn|error))\s*\(([^)]+)\)/g;
|
|
@@ -19,7 +20,9 @@ function rewriteConsoleExpr(method, id, filename, code, sourceMap = false) {
|
|
|
19
20
|
if (s.hasChanged()) {
|
|
20
21
|
return {
|
|
21
22
|
code: s.toString(),
|
|
22
|
-
map: sourceMap
|
|
23
|
+
map: sourceMap
|
|
24
|
+
? s.generateMap({ hires: (0, x_1.shouldUseHighResolutionSourceMap)() })
|
|
25
|
+
: { mappings: '' },
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
return { code, map: null };
|
package/dist/messages/en.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
readonly 'app.compiler.version': "Compiler version: {version}";
|
|
3
|
+
readonly 'view.render.compiler.target': "Current view.render compile target: {target}";
|
|
4
|
+
readonly 'view.render.compiler.target.bytecode': "bytecode";
|
|
5
|
+
readonly 'view.render.compiler.target.nativecode': "nativecode";
|
|
6
|
+
readonly 'style.isolation.version': "Style isolation version: {version}";
|
|
3
7
|
readonly compiling: "Compiling...";
|
|
4
8
|
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
9
|
readonly 'dev.performance.nvue': "Especially the sourcemap of app-nvue has a greater impact";
|
|
@@ -11,14 +15,18 @@ declare const _default: {
|
|
|
11
15
|
readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
|
|
12
16
|
readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
|
|
13
17
|
readonly 'dev.watching.restart.vapor': "DONE Restart required. Switching vapor mode requires restarting to take effect.";
|
|
18
|
+
readonly 'dev.watching.restart.independentSubPackages': "DONE Restart required. Changing independent subpackage roots requires restarting to take effect.";
|
|
19
|
+
readonly 'dev.watching.vapor.render.target': "vapor-render-target in manifest.json was changed to {manifestTarget}, but the running console is still {runtimeTarget}.";
|
|
14
20
|
readonly 'build.failed': "DONE Build failed.";
|
|
15
21
|
readonly 'compiler.build.failed': "Build failed with errors.";
|
|
16
22
|
readonly 'stat.warn.appid': "The current application is not configured with Appid, and uni statistics cannot be used. For details, see https://ask.dcloud.net.cn/article/36303";
|
|
17
|
-
readonly 'stat.warn.version': "The uni statistics
|
|
18
|
-
readonly 'stat.warn.tip': "uni statistics
|
|
23
|
+
readonly 'stat.warn.version': "The uni statistics type is not configured. The default type is public. You can set it to public or private. Details: https://uniapp.dcloud.io/uni-stat";
|
|
24
|
+
readonly 'stat.warn.tip': "uni statistics enabled: {type}";
|
|
19
25
|
readonly 'i18n.fallbackLocale.default': "fallbackLocale is missing in manifest.json, use: {locale}";
|
|
20
26
|
readonly 'i18n.fallbackLocale.missing': "./local/{locale}.json is missing";
|
|
21
27
|
readonly 'easycom.conflict': "easycom component conflict: ";
|
|
28
|
+
readonly 'dom2.compatible.component': "Vapor mode does not support the uni-app compatibility component {name}. The implementation file {file} was detected. Please use the standard UTS component implementation for this purpose.";
|
|
29
|
+
readonly 'dom2.root.scroll.view': "Pages are scrollable in Vapor mode. Remove the root scroll-view to avoid nested scrolling. Details: https://doc.dcloud.net.cn/uni-app-x/page.html#disablescroll";
|
|
22
30
|
readonly 'mp.component.args[0]': "The first parameter of {0} must be a static string";
|
|
23
31
|
readonly 'mp.component.args[1]': "{0} requires two parameters";
|
|
24
32
|
readonly 'mp.360.unsupported': "360 is unsupported";
|
|
@@ -48,5 +56,6 @@ declare const _default: {
|
|
|
48
56
|
readonly 'uni_modules.import': "Plug-in [{0}] only supports @/uni_modules/{1}.";
|
|
49
57
|
readonly 'pages.json.page.notfound': "The page \"{pagePath}\" does not exist.";
|
|
50
58
|
readonly 'pages.json.page.slash': "The Path \"{pagePath}\" cannot start with \"/\"";
|
|
59
|
+
readonly 'pages.json.tabbar.page.notfound': "The tabBar page \"{pagePath}\" is not declared in \"pages.json\".";
|
|
51
60
|
};
|
|
52
61
|
export default _default;
|
package/dist/messages/en.js
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
'app.compiler.version': 'Compiler version: {version}',
|
|
5
|
+
'view.render.compiler.target': 'Current view.render compile target: {target}',
|
|
6
|
+
'view.render.compiler.target.bytecode': 'bytecode',
|
|
7
|
+
'view.render.compiler.target.nativecode': 'nativecode',
|
|
8
|
+
'style.isolation.version': 'Style isolation version: {version}',
|
|
5
9
|
compiling: 'Compiling...',
|
|
6
10
|
'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
11
|
'dev.performance.nvue': 'Especially the sourcemap of app-nvue has a greater impact',
|
|
@@ -13,14 +17,18 @@ exports.default = {
|
|
|
13
17
|
'dev.watching.end.pages': 'DONE Build complete. PAGES:{pages}',
|
|
14
18
|
'dev.watching.end.files': 'DONE Build complete. FILES:{files}',
|
|
15
19
|
'dev.watching.restart.vapor': 'DONE Restart required. Switching vapor mode requires restarting to take effect.',
|
|
20
|
+
'dev.watching.restart.independentSubPackages': 'DONE Restart required. Changing independent subpackage roots requires restarting to take effect.',
|
|
21
|
+
'dev.watching.vapor.render.target': 'vapor-render-target in manifest.json was changed to {manifestTarget}, but the running console is still {runtimeTarget}.',
|
|
16
22
|
'build.failed': 'DONE Build failed.',
|
|
17
23
|
'compiler.build.failed': 'Build failed with errors.',
|
|
18
24
|
'stat.warn.appid': 'The current application is not configured with Appid, and uni statistics cannot be used. For details, see https://ask.dcloud.net.cn/article/36303',
|
|
19
|
-
'stat.warn.version': 'The uni statistics
|
|
20
|
-
'stat.warn.tip': 'uni statistics
|
|
25
|
+
'stat.warn.version': 'The uni statistics type is not configured. The default type is public. You can set it to public or private. Details: https://uniapp.dcloud.io/uni-stat',
|
|
26
|
+
'stat.warn.tip': 'uni statistics enabled: {type}',
|
|
21
27
|
'i18n.fallbackLocale.default': 'fallbackLocale is missing in manifest.json, use: {locale}',
|
|
22
28
|
'i18n.fallbackLocale.missing': './local/{locale}.json is missing',
|
|
23
29
|
'easycom.conflict': 'easycom component conflict: ',
|
|
30
|
+
'dom2.compatible.component': 'Vapor mode does not support the uni-app compatibility component {name}. The implementation file {file} was detected. Please use the standard UTS component implementation for this purpose.',
|
|
31
|
+
'dom2.root.scroll.view': 'Pages are scrollable in Vapor mode. Remove the root scroll-view to avoid nested scrolling. Details: https://doc.dcloud.net.cn/uni-app-x/page.html#disablescroll',
|
|
24
32
|
'mp.component.args[0]': 'The first parameter of {0} must be a static string',
|
|
25
33
|
'mp.component.args[1]': '{0} requires two parameters',
|
|
26
34
|
'mp.360.unsupported': '360 is unsupported',
|
|
@@ -50,4 +58,5 @@ exports.default = {
|
|
|
50
58
|
'uni_modules.import': 'Plug-in [{0}] only supports @/uni_modules/{1}.',
|
|
51
59
|
'pages.json.page.notfound': 'The page "{pagePath}" does not exist.',
|
|
52
60
|
'pages.json.page.slash': 'The Path "{pagePath}" cannot start with "/"',
|
|
61
|
+
'pages.json.tabbar.page.notfound': 'The tabBar page "{pagePath}" is not declared in "pages.json".',
|
|
53
62
|
};
|
package/dist/messages/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export declare const M: {
|
|
2
2
|
readonly 'app.compiler.version': "编译器版本:{version}";
|
|
3
|
+
readonly 'view.render.compiler.target': "当前视图层编译目标:{target}";
|
|
4
|
+
readonly 'view.render.compiler.target.bytecode': "字节码";
|
|
5
|
+
readonly 'view.render.compiler.target.nativecode': "机器码";
|
|
6
|
+
readonly 'style.isolation.version': "当前样式隔离策略:{version}。详见:https://doc.dcloud.net.cn/uni-app-x/css/common/style-isolation.html";
|
|
3
7
|
readonly compiling: "正在编译中...";
|
|
4
8
|
readonly 'dev.performance': "请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。";
|
|
5
9
|
readonly 'dev.performance.nvue': "尤其是 app-nvue 的 sourcemap 影响较大";
|
|
@@ -11,14 +15,18 @@ export declare const M: {
|
|
|
11
15
|
readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
|
|
12
16
|
readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
|
|
13
17
|
readonly 'dev.watching.restart.vapor': "DONE Restart required. 切换蒸汽模式需要重新运行才能生效。";
|
|
18
|
+
readonly 'dev.watching.restart.independentSubPackages': "DONE Restart required. 独立分包 root 列表变化需要重新运行才能生效。";
|
|
19
|
+
readonly 'dev.watching.vapor.render.target': "manifest.json 中更改了视图层编译目标为{manifestTarget},但注意运行控制台还是{runtimeTarget}。";
|
|
14
20
|
readonly 'build.failed': "DONE Build failed.";
|
|
15
21
|
readonly 'compiler.build.failed': "编译失败";
|
|
16
22
|
readonly 'stat.warn.appid': "当前应用未配置 appid,无法使用 uni 统计,详情参考:https://ask.dcloud.net.cn/article/36303";
|
|
17
|
-
readonly 'stat.warn.version': "当前应用未配置uni
|
|
18
|
-
readonly 'stat.warn.tip': "已开启
|
|
23
|
+
readonly 'stat.warn.version': "当前应用未配置 uni 统计版本,默认使用公有版;可配置为公有版或私有版。详情:https://uniapp.dcloud.io/uni-stat";
|
|
24
|
+
readonly 'stat.warn.tip': "已开启uni 统计 2.0{type}";
|
|
19
25
|
readonly 'i18n.fallbackLocale.default': "当前应用未在 manifest.json 配置 fallbackLocale,默认使用:{locale}";
|
|
20
26
|
readonly 'i18n.fallbackLocale.missing': "当前应用配置的 fallbackLocale 或 locale 为:{locale},但 locale 目录缺少该语言文件";
|
|
21
27
|
readonly 'easycom.conflict': "easycom组件冲突:";
|
|
28
|
+
readonly 'dom2.compatible.component': "蒸汽模式不支持 uni-app 兼容模式组件 {name},检测到其实现文件为 {file}。请改用标准模式的UTS组件实现来实现。";
|
|
29
|
+
readonly 'dom2.root.scroll.view': "蒸汽模式下页面可滚动,建议移除根节点 scroll-view,以避免嵌套滚动。详情: https://doc.dcloud.net.cn/uni-app-x/page.html#disablescroll";
|
|
22
30
|
readonly 'mp.component.args[0]': "{0}的第一个参数必须为静态字符串";
|
|
23
31
|
readonly 'mp.component.args[1]': "{0}需要两个参数";
|
|
24
32
|
readonly 'mp.360.unsupported': "vue3暂不支持360小程序";
|
|
@@ -48,8 +56,13 @@ export declare const M: {
|
|
|
48
56
|
readonly 'uni_modules.import': "插件[{0}]仅支持 @/uni_modules/{1} 方式引入,不支持直接导入内部文件 {2}。";
|
|
49
57
|
readonly 'pages.json.page.notfound': "页面\"{pagePath}\"不存在,请确保填写的页面路径不包含文件后缀,且必须与真实的文件路径大小写保持一致。";
|
|
50
58
|
readonly 'pages.json.page.slash': "路径 \"{pagePath}\" 不能以 \"/\" 开头";
|
|
59
|
+
readonly 'pages.json.tabbar.page.notfound': "tabBar 中配置的页面 \"{pagePath}\" 未在 pages.json 中注册。";
|
|
51
60
|
} | {
|
|
52
61
|
readonly 'app.compiler.version': "Compiler version: {version}";
|
|
62
|
+
readonly 'view.render.compiler.target': "Current view.render compile target: {target}";
|
|
63
|
+
readonly 'view.render.compiler.target.bytecode': "bytecode";
|
|
64
|
+
readonly 'view.render.compiler.target.nativecode': "nativecode";
|
|
65
|
+
readonly 'style.isolation.version': "Style isolation version: {version}";
|
|
53
66
|
readonly compiling: "Compiling...";
|
|
54
67
|
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.";
|
|
55
68
|
readonly 'dev.performance.nvue': "Especially the sourcemap of app-nvue has a greater impact";
|
|
@@ -61,14 +74,18 @@ export declare const M: {
|
|
|
61
74
|
readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
|
|
62
75
|
readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
|
|
63
76
|
readonly 'dev.watching.restart.vapor': "DONE Restart required. Switching vapor mode requires restarting to take effect.";
|
|
77
|
+
readonly 'dev.watching.restart.independentSubPackages': "DONE Restart required. Changing independent subpackage roots requires restarting to take effect.";
|
|
78
|
+
readonly 'dev.watching.vapor.render.target': "vapor-render-target in manifest.json was changed to {manifestTarget}, but the running console is still {runtimeTarget}.";
|
|
64
79
|
readonly 'build.failed': "DONE Build failed.";
|
|
65
80
|
readonly 'compiler.build.failed': "Build failed with errors.";
|
|
66
81
|
readonly 'stat.warn.appid': "The current application is not configured with Appid, and uni statistics cannot be used. For details, see https://ask.dcloud.net.cn/article/36303";
|
|
67
|
-
readonly 'stat.warn.version': "The uni statistics
|
|
68
|
-
readonly 'stat.warn.tip': "uni statistics
|
|
82
|
+
readonly 'stat.warn.version': "The uni statistics type is not configured. The default type is public. You can set it to public or private. Details: https://uniapp.dcloud.io/uni-stat";
|
|
83
|
+
readonly 'stat.warn.tip': "uni statistics enabled: {type}";
|
|
69
84
|
readonly 'i18n.fallbackLocale.default': "fallbackLocale is missing in manifest.json, use: {locale}";
|
|
70
85
|
readonly 'i18n.fallbackLocale.missing': "./local/{locale}.json is missing";
|
|
71
86
|
readonly 'easycom.conflict': "easycom component conflict: ";
|
|
87
|
+
readonly 'dom2.compatible.component': "Vapor mode does not support the uni-app compatibility component {name}. The implementation file {file} was detected. Please use the standard UTS component implementation for this purpose.";
|
|
88
|
+
readonly 'dom2.root.scroll.view': "Pages are scrollable in Vapor mode. Remove the root scroll-view to avoid nested scrolling. Details: https://doc.dcloud.net.cn/uni-app-x/page.html#disablescroll";
|
|
72
89
|
readonly 'mp.component.args[0]': "The first parameter of {0} must be a static string";
|
|
73
90
|
readonly 'mp.component.args[1]': "{0} requires two parameters";
|
|
74
91
|
readonly 'mp.360.unsupported': "360 is unsupported";
|
|
@@ -98,4 +115,5 @@ export declare const M: {
|
|
|
98
115
|
readonly 'uni_modules.import': "Plug-in [{0}] only supports @/uni_modules/{1}.";
|
|
99
116
|
readonly 'pages.json.page.notfound': "The page \"{pagePath}\" does not exist.";
|
|
100
117
|
readonly 'pages.json.page.slash': "The Path \"{pagePath}\" cannot start with \"/\"";
|
|
118
|
+
readonly 'pages.json.tabbar.page.notfound': "The tabBar page \"{pagePath}\" is not declared in \"pages.json\".";
|
|
101
119
|
};
|
package/dist/messages/zh_CN.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
readonly 'app.compiler.version': "编译器版本:{version}";
|
|
3
|
+
readonly 'view.render.compiler.target': "当前视图层编译目标:{target}";
|
|
4
|
+
readonly 'view.render.compiler.target.bytecode': "字节码";
|
|
5
|
+
readonly 'view.render.compiler.target.nativecode': "机器码";
|
|
6
|
+
readonly 'style.isolation.version': "当前样式隔离策略:{version}。详见:https://doc.dcloud.net.cn/uni-app-x/css/common/style-isolation.html";
|
|
3
7
|
readonly compiling: "正在编译中...";
|
|
4
8
|
readonly 'dev.performance': "请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。";
|
|
5
9
|
readonly 'dev.performance.nvue': "尤其是 app-nvue 的 sourcemap 影响较大";
|
|
@@ -11,14 +15,18 @@ declare const _default: {
|
|
|
11
15
|
readonly 'dev.watching.end.pages': "DONE Build complete. PAGES:{pages}";
|
|
12
16
|
readonly 'dev.watching.end.files': "DONE Build complete. FILES:{files}";
|
|
13
17
|
readonly 'dev.watching.restart.vapor': "DONE Restart required. 切换蒸汽模式需要重新运行才能生效。";
|
|
18
|
+
readonly 'dev.watching.restart.independentSubPackages': "DONE Restart required. 独立分包 root 列表变化需要重新运行才能生效。";
|
|
19
|
+
readonly 'dev.watching.vapor.render.target': "manifest.json 中更改了视图层编译目标为{manifestTarget},但注意运行控制台还是{runtimeTarget}。";
|
|
14
20
|
readonly 'build.failed': "DONE Build failed.";
|
|
15
21
|
readonly 'compiler.build.failed': "编译失败";
|
|
16
22
|
readonly 'stat.warn.appid': "当前应用未配置 appid,无法使用 uni 统计,详情参考:https://ask.dcloud.net.cn/article/36303";
|
|
17
|
-
readonly 'stat.warn.version': "当前应用未配置uni
|
|
18
|
-
readonly 'stat.warn.tip': "已开启
|
|
23
|
+
readonly 'stat.warn.version': "当前应用未配置 uni 统计版本,默认使用公有版;可配置为公有版或私有版。详情:https://uniapp.dcloud.io/uni-stat";
|
|
24
|
+
readonly 'stat.warn.tip': "已开启uni 统计 2.0{type}";
|
|
19
25
|
readonly 'i18n.fallbackLocale.default': "当前应用未在 manifest.json 配置 fallbackLocale,默认使用:{locale}";
|
|
20
26
|
readonly 'i18n.fallbackLocale.missing': "当前应用配置的 fallbackLocale 或 locale 为:{locale},但 locale 目录缺少该语言文件";
|
|
21
27
|
readonly 'easycom.conflict': "easycom组件冲突:";
|
|
28
|
+
readonly 'dom2.compatible.component': "蒸汽模式不支持 uni-app 兼容模式组件 {name},检测到其实现文件为 {file}。请改用标准模式的UTS组件实现来实现。";
|
|
29
|
+
readonly 'dom2.root.scroll.view': "蒸汽模式下页面可滚动,建议移除根节点 scroll-view,以避免嵌套滚动。详情: https://doc.dcloud.net.cn/uni-app-x/page.html#disablescroll";
|
|
22
30
|
readonly 'mp.component.args[0]': "{0}的第一个参数必须为静态字符串";
|
|
23
31
|
readonly 'mp.component.args[1]': "{0}需要两个参数";
|
|
24
32
|
readonly 'mp.360.unsupported': "vue3暂不支持360小程序";
|
|
@@ -48,5 +56,6 @@ declare const _default: {
|
|
|
48
56
|
readonly 'uni_modules.import': "插件[{0}]仅支持 @/uni_modules/{1} 方式引入,不支持直接导入内部文件 {2}。";
|
|
49
57
|
readonly 'pages.json.page.notfound': "页面\"{pagePath}\"不存在,请确保填写的页面路径不包含文件后缀,且必须与真实的文件路径大小写保持一致。";
|
|
50
58
|
readonly 'pages.json.page.slash': "路径 \"{pagePath}\" 不能以 \"/\" 开头";
|
|
59
|
+
readonly 'pages.json.tabbar.page.notfound': "tabBar 中配置的页面 \"{pagePath}\" 未在 pages.json 中注册。";
|
|
51
60
|
};
|
|
52
61
|
export default _default;
|