@dcloudio/uni-cli-shared 3.0.0-alpha-1000920260626810 → 3.0.0-alpha-5020120260710001
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/dom2/index.d.ts +1 -0
- package/dist/dom2/index.js +1 -0
- package/dist/dom2/rootScrollView.d.ts +47 -0
- package/dist/dom2/rootScrollView.js +283 -0
- package/dist/dom2/vue.d.ts +0 -1
- package/dist/dom2/vue.js +1 -14
- package/dist/hbx/alias.js +18 -39
- package/dist/hbx/index.d.ts +1 -1
- package/dist/i18n.js +17 -32
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/json/app/manifest/plus.js +9 -1
- package/dist/json/app/pages/definePage.js +3 -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/logs/console.js +1 -12
- package/dist/messages/en.d.ts +5 -2
- package/dist/messages/en.js +5 -2
- package/dist/messages/index.d.ts +11 -5
- package/dist/messages/zh_CN.d.ts +6 -3
- package/dist/messages/zh_CN.js +6 -3
- package/dist/mp/imports.d.ts +1 -3
- package/dist/mp/template.d.ts +1 -2
- package/dist/mp/usingComponents.d.ts +8 -7
- 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 +5 -0
- package/dist/uni_modules.cloud.js +102 -1
- package/dist/utils.js +5 -0
- package/dist/vite/cloud.js +5 -2
- package/dist/vite/index.d.ts +3 -2
- package/dist/vite/plugins/console.js +27 -31
- package/dist/vite/plugins/copy.js +0 -1
- package/dist/vite/plugins/cssScoped.js +27 -27
- package/dist/vite/plugins/dynamicImportPolyfill.d.ts +1 -8
- package/dist/vite/plugins/easycom.js +45 -46
- package/dist/vite/plugins/inject.js +121 -132
- package/dist/vite/plugins/json.js +14 -17
- package/dist/vite/plugins/jsonJs.d.ts +2 -2
- package/dist/vite/plugins/jsonJs.js +41 -10
- package/dist/vite/plugins/mainJs.d.ts +1 -1
- package/dist/vite/plugins/mainJs.js +0 -7
- package/dist/vite/plugins/pre.js +32 -35
- package/dist/vite/plugins/sfc.js +1 -11
- package/dist/vite/plugins/sourceMap.js +1 -4
- package/dist/vite/plugins/stats.d.ts +5 -1
- package/dist/vite/plugins/stats.js +71 -2
- package/dist/vite/plugins/uts/ext-api.js +17 -23
- package/dist/vite/plugins/uts/uni_modules.js +44 -66
- package/dist/vite/plugins/uts/uvue.js +48 -55
- package/dist/vite/plugins/vitejs/plugins/asset.d.ts +4 -12
- package/dist/vite/plugins/vitejs/plugins/asset.js +12 -4
- package/dist/vite/plugins/vitejs/plugins/css.d.ts +1 -4
- package/dist/vite/plugins/vitejs/plugins/css.js +114 -100
- package/dist/vite/utils/utils.d.ts +2 -3
- 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/watcher.d.ts +0 -1
- package/lib/@vue/compiler-core/dist/compiler-core.cjs.js +23 -16
- package/lib/@vue/compiler-core/dist/compiler-core.cjs.prod.js +23 -16
- package/lib/@vue/compiler-core/dist/compiler-core.esm-bundler.js +23 -16
- package/lib/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +66 -23
- package/lib/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +115 -67
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.js +11 -9
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.prod.js +11 -9
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.d.ts +13 -1
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.esm-bundler.js +8 -7
- 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 +8 -7
- 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 +1 -1
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.js +8 -7
- 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 +4773 -1514
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +3399 -1772
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.cjs.js +1663 -412
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.d.ts +201 -127
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.esm-browser.js +1764 -474
- 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 +77 -2
- package/lib/dom2/app/@vue/shared/dist/shared.cjs.prod.js +77 -2
- package/lib/dom2/app/@vue/shared/dist/shared.d.ts +89 -2
- package/lib/dom2/app/@vue/shared/dist/shared.esm-bundler.js +74 -3
- package/package.json +9 -8
package/dist/dom2/index.d.ts
CHANGED
package/dist/dom2/index.js
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export interface VueCodePosition {
|
|
2
|
+
line: number;
|
|
3
|
+
column: number;
|
|
4
|
+
}
|
|
5
|
+
export interface VueCodeEditRange {
|
|
6
|
+
start: VueCodePosition;
|
|
7
|
+
end: VueCodePosition;
|
|
8
|
+
/**
|
|
9
|
+
* 调用方替换时建议只移除非换行字符,用于尽量保持错误定位和调试行号不变。
|
|
10
|
+
*/
|
|
11
|
+
preserveLineBreaks: true;
|
|
12
|
+
/**
|
|
13
|
+
* 开始范围包含首个子节点前的缩进,调用方需要保留这段缩进,避免改变子节点格式。
|
|
14
|
+
*/
|
|
15
|
+
preserveEndIndent?: true;
|
|
16
|
+
}
|
|
17
|
+
export type VueCodeEditRangesResult = Record<string, VueCodeEditRange[]>;
|
|
18
|
+
/**
|
|
19
|
+
* 批量定位由 `#ifdef APP` 包裹的根 scroll-view 需要移除的范围。
|
|
20
|
+
* 只返回需要修改的行列号,不修改文件,也不返回修改后的文件内容。
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveAppRootScrollViewEditRanges(vueFiles: string[], inputDir: string): VueCodeEditRangesResult;
|
|
23
|
+
/**
|
|
24
|
+
* 蒸汽模式下,页面根节点会自动补一个 scroll-view。
|
|
25
|
+
* 这里仅用正则做精确匹配:命中范围宁可保守,也不能误报。
|
|
26
|
+
*/
|
|
27
|
+
export declare function hasAppRootScrollViewWrappedByIfdef(code: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 仅在 dom2 页面整文件预处理时定位需要提示优化建议的根 scroll-view 节点。
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveDom2RootScrollViewWarnLocation(code: string, filename: string, isVueSubRequest: boolean): {
|
|
32
|
+
loc: import("@vue/compiler-core").SourceLocation | {
|
|
33
|
+
start: {
|
|
34
|
+
line: number;
|
|
35
|
+
column: number;
|
|
36
|
+
offset: number;
|
|
37
|
+
};
|
|
38
|
+
end: {
|
|
39
|
+
line: number;
|
|
40
|
+
column: number;
|
|
41
|
+
offset: number;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
source: string;
|
|
45
|
+
} | undefined;
|
|
46
|
+
export declare function warnDom2RootScrollView(code: string, filename: string, isVueSubRequest: boolean): void;
|
|
47
|
+
export declare function resolveAppRootScrollViewEditRangesByCode(code: string, filename: string): VueCodeEditRange[];
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveAppRootScrollViewEditRangesByCode = exports.warnDom2RootScrollView = exports.resolveDom2RootScrollViewWarnLocation = exports.hasAppRootScrollViewWrappedByIfdef = exports.resolveAppRootScrollViewEditRanges = void 0;
|
|
4
|
+
const fs_extra_1 = require("fs-extra");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const compiler_sfc_1 = require("@vue/compiler-sfc");
|
|
7
|
+
const json_1 = require("../json");
|
|
8
|
+
const logs_1 = require("../logs");
|
|
9
|
+
const messages_1 = require("../messages");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
11
|
+
const utils_2 = require("../vite/plugins/vitejs/utils");
|
|
12
|
+
const { preprocess: preprocessHtml } = require('../../lib/preprocess');
|
|
13
|
+
const TEMPLATE_BLOCK_RE = /<template\b[^>]*>([\s\S]*?)<\/template>/i;
|
|
14
|
+
const ROOT_SCROLL_VIEW_ATTR_RE = /^\s+style\s*=\s*(["'])\s*flex\s*:\s*1\s*;?\s*\1\s*$/;
|
|
15
|
+
const APP_ROOT_SCROLL_VIEW_RE = /^\s*<!--\s*#ifdef APP\s*-->\s*<scroll-view([^>]*)>[\s\S]*<\/scroll-view>\s*<!--\s*#endif\s*-->\s*$/;
|
|
16
|
+
const SPLIT_APP_ROOT_SCROLL_VIEW_RE = /^\s*<!--\s*#ifdef APP\s*-->\s*<scroll-view([^>]*)>\s*<!--\s*#endif\s*-->[\s\S]*<!--\s*#ifdef APP\s*-->\s*<\/scroll-view>\s*<!--\s*#endif\s*-->\s*$/;
|
|
17
|
+
/**
|
|
18
|
+
* 批量定位由 `#ifdef APP` 包裹的根 scroll-view 需要移除的范围。
|
|
19
|
+
* 只返回需要修改的行列号,不修改文件,也不返回修改后的文件内容。
|
|
20
|
+
*/
|
|
21
|
+
function resolveAppRootScrollViewEditRanges(vueFiles, inputDir) {
|
|
22
|
+
const result = {};
|
|
23
|
+
vueFiles.forEach((file) => {
|
|
24
|
+
const filename = resolveVueFilename(inputDir, file);
|
|
25
|
+
if (!(0, fs_extra_1.existsSync)(filename)) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const content = (0, fs_extra_1.readFileSync)(filename, 'utf8');
|
|
29
|
+
const ranges = resolveAppRootScrollViewEditRangesByCode(content, filename);
|
|
30
|
+
if (ranges.length) {
|
|
31
|
+
result[file] = ranges;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
exports.resolveAppRootScrollViewEditRanges = resolveAppRootScrollViewEditRanges;
|
|
37
|
+
/**
|
|
38
|
+
* 蒸汽模式下,页面根节点会自动补一个 scroll-view。
|
|
39
|
+
* 这里仅用正则做精确匹配:命中范围宁可保守,也不能误报。
|
|
40
|
+
*/
|
|
41
|
+
function hasAppRootScrollViewWrappedByIfdef(code) {
|
|
42
|
+
const templateContent = getTemplateContent(code);
|
|
43
|
+
if (!templateContent) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
return (matchesAppRootScrollViewTemplate(templateContent, APP_ROOT_SCROLL_VIEW_RE) ||
|
|
47
|
+
matchesAppRootScrollViewTemplate(templateContent, SPLIT_APP_ROOT_SCROLL_VIEW_RE));
|
|
48
|
+
}
|
|
49
|
+
exports.hasAppRootScrollViewWrappedByIfdef = hasAppRootScrollViewWrappedByIfdef;
|
|
50
|
+
/**
|
|
51
|
+
* 仅在 dom2 页面整文件预处理时定位需要提示优化建议的根 scroll-view 节点。
|
|
52
|
+
*/
|
|
53
|
+
function resolveDom2RootScrollViewWarnLocation(code, filename, isVueSubRequest) {
|
|
54
|
+
if (process.env.UNI_PLATFORM !== 'app' ||
|
|
55
|
+
process.env.UNI_APP_X_DOM2 !== 'true' ||
|
|
56
|
+
isVueSubRequest ||
|
|
57
|
+
!(0, json_1.parseUniXPageOptions)(filename) ||
|
|
58
|
+
!code.includes('scroll-view') ||
|
|
59
|
+
!code.includes('#ifdef APP')) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!hasAppRootScrollViewWrappedByIfdef(code)) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
return resolveAppRootScrollViewNodeLocByCode(code, filename);
|
|
66
|
+
}
|
|
67
|
+
exports.resolveDom2RootScrollViewWarnLocation = resolveDom2RootScrollViewWarnLocation;
|
|
68
|
+
function warnDom2RootScrollView(code, filename, isVueSubRequest) {
|
|
69
|
+
const location = resolveDom2RootScrollViewWarnLocation(code, filename, isVueSubRequest);
|
|
70
|
+
if (!location) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
(0, logs_1.onCompileLog)('warn', {
|
|
74
|
+
message: messages_1.M['dom2.root.scroll.view'],
|
|
75
|
+
name: 'Warn',
|
|
76
|
+
loc: location.loc,
|
|
77
|
+
}, createWarnCodeFrameSource(location), (0, utils_1.normalizePath)((0, path_1.relative)(process.env.UNI_INPUT_DIR, filename)));
|
|
78
|
+
}
|
|
79
|
+
exports.warnDom2RootScrollView = warnDom2RootScrollView;
|
|
80
|
+
function resolveVueFilename(inputDir, file) {
|
|
81
|
+
if ((0, path_1.isAbsolute)(file)) {
|
|
82
|
+
const root = (0, path_1.parse)(file).root;
|
|
83
|
+
// HBuilderX/uni-app 里页面路径可能写成 `/pages/a/b.uvue`,
|
|
84
|
+
// 这种是项目内绝对路径,不是磁盘绝对路径,需要仍然基于 inputDir 解析。
|
|
85
|
+
if (root === '/' || root === '\\') {
|
|
86
|
+
return (0, path_1.resolve)(inputDir, removeLeadingRootSlash(file));
|
|
87
|
+
}
|
|
88
|
+
return file;
|
|
89
|
+
}
|
|
90
|
+
return (0, path_1.resolve)(inputDir, file);
|
|
91
|
+
}
|
|
92
|
+
function removeLeadingRootSlash(file) {
|
|
93
|
+
let index = 0;
|
|
94
|
+
while (file.charAt(index) === '/' || file.charAt(index) === '\\') {
|
|
95
|
+
index++;
|
|
96
|
+
}
|
|
97
|
+
return file.slice(index);
|
|
98
|
+
}
|
|
99
|
+
function getTemplateContent(code) {
|
|
100
|
+
return code.match(TEMPLATE_BLOCK_RE)?.[1];
|
|
101
|
+
}
|
|
102
|
+
function matchesAppRootScrollViewTemplate(template, regex) {
|
|
103
|
+
const match = template.match(regex);
|
|
104
|
+
return !!match && ROOT_SCROLL_VIEW_ATTR_RE.test(match[1]);
|
|
105
|
+
}
|
|
106
|
+
function resolveAppRootScrollViewNodeLocByCode(code, filename) {
|
|
107
|
+
const template = parseSfcTemplate(code, filename);
|
|
108
|
+
if (!template) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const children = template.ast.children;
|
|
112
|
+
if (children.length !== 3) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const [, scrollViewNode] = children;
|
|
116
|
+
if (!isRootScrollView(scrollViewNode)) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
loc: createStartTagLoc(code, scrollViewNode),
|
|
121
|
+
source: resolveStartTagSource(scrollViewNode),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function createStartTagLoc(code, node) {
|
|
125
|
+
const source = node.loc.source || '';
|
|
126
|
+
const endOffsetInSource = source.indexOf('>');
|
|
127
|
+
if (endOffsetInSource === -1) {
|
|
128
|
+
return {
|
|
129
|
+
start: node.loc.start,
|
|
130
|
+
end: node.loc.end,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
return (0, utils_2.offsetToStartAndEnd)(code, node.loc.start.offset, node.loc.start.offset + endOffsetInSource + 1);
|
|
134
|
+
}
|
|
135
|
+
function resolveStartTagSource(node) {
|
|
136
|
+
const source = node.loc.source || '';
|
|
137
|
+
const endOffsetInSource = source.indexOf('>');
|
|
138
|
+
if (endOffsetInSource === -1) {
|
|
139
|
+
return source;
|
|
140
|
+
}
|
|
141
|
+
return source.slice(0, endOffsetInSource + 1);
|
|
142
|
+
}
|
|
143
|
+
function createWarnCodeFrameSource(location) {
|
|
144
|
+
return `${'\n'.repeat(Math.max(location.loc.start.line - 1, 0))}${location.source}`;
|
|
145
|
+
}
|
|
146
|
+
function resolveAppRootScrollViewEditRangesByCode(code, filename) {
|
|
147
|
+
const template = parseSfcTemplate(code, filename);
|
|
148
|
+
if (!template) {
|
|
149
|
+
return [];
|
|
150
|
+
}
|
|
151
|
+
const children = template.ast.children;
|
|
152
|
+
if (children.length !== 3) {
|
|
153
|
+
return [];
|
|
154
|
+
}
|
|
155
|
+
const [ifdefNode, scrollViewNode, endifNode] = children;
|
|
156
|
+
if (!isAppIfdefComment(ifdefNode) ||
|
|
157
|
+
!isRootScrollView(scrollViewNode) ||
|
|
158
|
+
!isEndifComment(endifNode)) {
|
|
159
|
+
return [];
|
|
160
|
+
}
|
|
161
|
+
// 使用项目既有的条件编译实现先跑一遍,再交给 Vue 编译器确认 APP 分支根节点。
|
|
162
|
+
if (!isPreprocessedRootScrollView(template.content, filename)) {
|
|
163
|
+
return [];
|
|
164
|
+
}
|
|
165
|
+
return createRootScrollViewEditRanges(ifdefNode, scrollViewNode, endifNode);
|
|
166
|
+
}
|
|
167
|
+
exports.resolveAppRootScrollViewEditRangesByCode = resolveAppRootScrollViewEditRangesByCode;
|
|
168
|
+
function parseSfcTemplate(code, filename) {
|
|
169
|
+
const { descriptor, errors } = (0, compiler_sfc_1.parse)(code, {
|
|
170
|
+
filename,
|
|
171
|
+
sourceMap: false,
|
|
172
|
+
});
|
|
173
|
+
if (errors.length || !descriptor.template?.ast) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
content: descriptor.template.content,
|
|
178
|
+
ast: descriptor.template.ast,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function isPreprocessedRootScrollView(content, filename) {
|
|
182
|
+
try {
|
|
183
|
+
const preprocessed = preprocessHtml(content, createAppPreContext(), {
|
|
184
|
+
type: 'html',
|
|
185
|
+
});
|
|
186
|
+
const template = parseSfcTemplate(`<template>${preprocessed}</template>`, filename);
|
|
187
|
+
const root = template?.ast.children[0];
|
|
188
|
+
return (!!root && template.ast.children.length === 1 && root.tag === 'scroll-view');
|
|
189
|
+
}
|
|
190
|
+
catch (e) {
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
function createAppPreContext() {
|
|
195
|
+
// 这里只声明本函数需要的 APP/UVue 上下文,避免改动全局条件编译上下文。
|
|
196
|
+
return {
|
|
197
|
+
APP: true,
|
|
198
|
+
APP_UVUE: true,
|
|
199
|
+
UNI_APP_X: true,
|
|
200
|
+
VUE3: true,
|
|
201
|
+
VUE3_VAPOR: true,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function isAppIfdefComment(node) {
|
|
205
|
+
return (node.type === 3 /* NodeTypes.COMMENT */ && node.content?.trim() === '#ifdef APP');
|
|
206
|
+
}
|
|
207
|
+
function isEndifComment(node) {
|
|
208
|
+
return node.type === 3 /* NodeTypes.COMMENT */ && node.content?.trim() === '#endif';
|
|
209
|
+
}
|
|
210
|
+
function isRootScrollView(node) {
|
|
211
|
+
return (node.type === 1 /* NodeTypes.ELEMENT */ &&
|
|
212
|
+
node.tag === 'scroll-view' &&
|
|
213
|
+
hasOnlyFlexStyle(node));
|
|
214
|
+
}
|
|
215
|
+
function hasOnlyFlexStyle(node) {
|
|
216
|
+
if (!node.props || node.props.length !== 1) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
const style = node.props[0];
|
|
220
|
+
return (style.type === 6 /* NodeTypes.ATTRIBUTE */ &&
|
|
221
|
+
style.name === 'style' &&
|
|
222
|
+
!!style.value &&
|
|
223
|
+
normalizeFlexStyle(style.value.content) === 'flex:1');
|
|
224
|
+
}
|
|
225
|
+
function normalizeFlexStyle(style) {
|
|
226
|
+
let normalized = '';
|
|
227
|
+
for (let i = 0; i < style.length; i++) {
|
|
228
|
+
const char = style.charAt(i);
|
|
229
|
+
if (char !== ' ' && char !== '\t' && char !== '\n' && char !== '\r') {
|
|
230
|
+
normalized += char;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
if (normalized.endsWith(';')) {
|
|
234
|
+
return normalized.slice(0, -1);
|
|
235
|
+
}
|
|
236
|
+
return normalized;
|
|
237
|
+
}
|
|
238
|
+
function createRootScrollViewEditRanges(ifdefNode, scrollViewNode, endifNode) {
|
|
239
|
+
const children = scrollViewNode.children || [];
|
|
240
|
+
if (!children.length) {
|
|
241
|
+
return [createEditRange(ifdefNode, endifNode)];
|
|
242
|
+
}
|
|
243
|
+
const firstChild = children[0];
|
|
244
|
+
const lastChild = children[children.length - 1];
|
|
245
|
+
// 兼容如下写法:条件编译分别包裹 scroll-view 的开始标签和结束标签。
|
|
246
|
+
// <!-- #ifdef APP -->
|
|
247
|
+
// <scroll-view style="flex:1">
|
|
248
|
+
// <!-- #endif -->
|
|
249
|
+
// ...
|
|
250
|
+
// <!-- #ifdef APP -->
|
|
251
|
+
// </scroll-view>
|
|
252
|
+
// <!-- #endif -->
|
|
253
|
+
if (isEndifComment(firstChild) && isAppIfdefComment(lastChild)) {
|
|
254
|
+
return [
|
|
255
|
+
createEditRangeByLoc(ifdefNode.loc.start, firstChild.loc.end),
|
|
256
|
+
createEditRangeByLoc(lastChild.loc.start, endifNode.loc.end),
|
|
257
|
+
];
|
|
258
|
+
}
|
|
259
|
+
return [
|
|
260
|
+
createEditRangeByLoc(ifdefNode.loc.start, firstChild.loc.start, true),
|
|
261
|
+
createEditRangeByLoc(lastChild.loc.end, endifNode.loc.end),
|
|
262
|
+
];
|
|
263
|
+
}
|
|
264
|
+
function createEditRange(startNode, endNode) {
|
|
265
|
+
return createEditRangeByLoc(startNode.loc.start, endNode.loc.end);
|
|
266
|
+
}
|
|
267
|
+
function createEditRangeByLoc(start, end, preserveEndIndent = false) {
|
|
268
|
+
const range = {
|
|
269
|
+
start: toPosition(start),
|
|
270
|
+
end: toPosition(end),
|
|
271
|
+
preserveLineBreaks: true,
|
|
272
|
+
};
|
|
273
|
+
if (preserveEndIndent) {
|
|
274
|
+
range.preserveEndIndent = true;
|
|
275
|
+
}
|
|
276
|
+
return range;
|
|
277
|
+
}
|
|
278
|
+
function toPosition(loc) {
|
|
279
|
+
return {
|
|
280
|
+
line: loc.line,
|
|
281
|
+
column: loc.column,
|
|
282
|
+
};
|
|
283
|
+
}
|
package/dist/dom2/vue.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export declare function initVueTemplateCompilerExtraOptions(descriptor: SFCDescr
|
|
|
9
9
|
enableRootScrollViewTransform: boolean;
|
|
10
10
|
rootScrollView: import("src/json/uni-x").UniXPageOptions | undefined;
|
|
11
11
|
scriptCppBlocks: any;
|
|
12
|
-
disableStaticStyle: boolean;
|
|
13
12
|
onVueTemplateCompileLog(type: 'warn' | 'error', error: CompilerError): void;
|
|
14
13
|
r: any;
|
|
15
14
|
className: any;
|
package/dist/dom2/vue.js
CHANGED
|
@@ -13,32 +13,19 @@ function initVueTemplateCompilerExtraOptions(descriptor) {
|
|
|
13
13
|
const relativeFilename = (0, utils_1.normalizePath)(path_1.default.relative(process.env.UNI_INPUT_DIR, filename));
|
|
14
14
|
const rootScrollView = (0, json_1.parseUniXPageOptions)(filename);
|
|
15
15
|
const componentType = rootScrollView || (0, json_1.isUniPageFile)(filename) ? 'page' : 'component';
|
|
16
|
-
const isDevX = process.env.UNI_HX_VERSION_DEV === 'true' &&
|
|
17
|
-
process.env.UNI_APP_X === 'true';
|
|
18
16
|
const isDynamic = process.env.UNI_APP_X_DOM2_DYNAMIC === 'true';
|
|
19
|
-
let disableStaticStyle = false;
|
|
20
|
-
if (isDevX &&
|
|
21
|
-
// 动态渲染时,仍旧使用静态样式,避免性能问题。
|
|
22
|
-
!isDynamic &&
|
|
23
|
-
process.env.NODE_ENV === 'development') {
|
|
24
|
-
if (process.env.UNI_UTS_PLATFORM === 'app-harmony') {
|
|
25
|
-
// 开发版本、开发模式下,非鸿蒙release模式打包
|
|
26
|
-
disableStaticStyle = process.env.UNI_APP_HARMONY_RUN_MODE !== 'release';
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
17
|
const helper = (0, utils_1.requireUniHelpers)();
|
|
30
18
|
return {
|
|
31
19
|
root: (0, utils_1.normalizePath)(process.env.UNI_INPUT_DIR),
|
|
32
20
|
platform: process.env.UNI_UTS_PLATFORM,
|
|
33
21
|
componentType,
|
|
34
|
-
filename
|
|
22
|
+
filename,
|
|
35
23
|
relativeFilename,
|
|
36
24
|
helper,
|
|
37
25
|
enableRootScrollViewTransform: true,
|
|
38
26
|
// 仅页面透传 rootScrollView,避免非页面组件误触发 ROOT 自动包裹逻辑。
|
|
39
27
|
rootScrollView: componentType === 'page' ? rootScrollView : undefined,
|
|
40
28
|
scriptCppBlocks: descriptor.scriptCppBlocks,
|
|
41
|
-
disableStaticStyle,
|
|
42
29
|
onVueTemplateCompileLog(type, error) {
|
|
43
30
|
return (0, vue_1.onVueTemplateCompileLog)(type, error, descriptor.source, relativeFilename);
|
|
44
31
|
},
|
package/dist/hbx/alias.js
CHANGED
|
@@ -5,11 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.formatInstallHBuilderXPluginTips = exports.moduleAliasFormatter = exports.installHBuilderXPlugin = exports.initModuleAlias = void 0;
|
|
7
7
|
// 注意:该文件尽可能少依赖其他文件,否则可能会导致还没有alias的时候,就加载了目标模块
|
|
8
|
-
const fs_1 = __importDefault(require("fs"));
|
|
9
8
|
const path_1 = __importDefault(require("path"));
|
|
10
9
|
const module_alias_1 = __importDefault(require("module-alias"));
|
|
11
10
|
const utils_1 = require("./utils");
|
|
12
|
-
const jsonc_parser_1 = require("jsonc-parser");
|
|
13
11
|
const hbxPlugins = {
|
|
14
12
|
typescript: 'compile-typescript/node_modules/typescript',
|
|
15
13
|
less: 'compile-less/node_modules/less',
|
|
@@ -17,32 +15,32 @@ const hbxPlugins = {
|
|
|
17
15
|
stylus: 'compile-stylus/node_modules/stylus',
|
|
18
16
|
pug: 'compile-pug-cli/node_modules/pug',
|
|
19
17
|
};
|
|
18
|
+
function isWebOrMpPlatform(platform) {
|
|
19
|
+
return platform === 'h5' || platform === 'web' || platform?.startsWith('mp-');
|
|
20
|
+
}
|
|
20
21
|
function initModuleAlias() {
|
|
21
22
|
const libDir = path_1.default.resolve(__dirname, '../../lib');
|
|
22
23
|
const compilerSfcPath = path_1.default.resolve(libDir, '@vue/compiler-sfc');
|
|
23
24
|
const serverRendererPath = require.resolve('@vue/server-renderer');
|
|
25
|
+
if (process.env.UNI_OUTPUT_DIR) {
|
|
26
|
+
const baseOutDir = path_1.default.basename(process.env.UNI_OUTPUT_DIR);
|
|
27
|
+
process.env.UNI_APP_X_CACHE_DIR =
|
|
28
|
+
process.env.UNI_APP_X_CACHE_DIR ||
|
|
29
|
+
path_1.default.resolve(process.env.UNI_OUTPUT_DIR, '../cache/.' + baseOutDir);
|
|
30
|
+
}
|
|
24
31
|
// 对路径进行兼容
|
|
25
32
|
if (!process.env.UNI_APP_X_DOM2_CPP_DIR &&
|
|
26
33
|
process.env.UNI_APP_HARMONY_DOM2_CPP_DIR) {
|
|
27
34
|
process.env.UNI_APP_X_DOM2_CPP_DIR =
|
|
28
35
|
process.env.UNI_APP_HARMONY_DOM2_CPP_DIR;
|
|
29
36
|
}
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const manifestJson = (0, jsonc_parser_1.parse)(manifestJsonStr);
|
|
38
|
-
if (manifestJson?.['uni-app-x']?.vapor === true) {
|
|
39
|
-
const vaporFilename = path_1.default.resolve(process.env.UNI_INPUT_DIR, '.vapor');
|
|
40
|
-
if (fs_1.default.existsSync(vaporFilename)) {
|
|
41
|
-
process.env.UNI_APP_X_DOM2 = 'true';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
37
|
+
// alias 初始化可能早于 CLI 环境初始化,这里仅依据外部预置的平台环境变量判断。
|
|
38
|
+
// 如果是 web 和小程序,目前强制非蒸汽。
|
|
39
|
+
const utsPlatform = process.env.UNI_UTS_PLATFORM;
|
|
40
|
+
const uniPlatform = process.env.UNI_PLATFORM;
|
|
41
|
+
if (isWebOrMpPlatform(utsPlatform) || isWebOrMpPlatform(uniPlatform)) {
|
|
42
|
+
delete process.env.UNI_APP_X_DOM2;
|
|
43
|
+
delete process.env.UNI_APP_X_DOM2_DYNAMIC;
|
|
46
44
|
}
|
|
47
45
|
if (process.env.UNI_APP_X_DOM2 === 'true') {
|
|
48
46
|
if (process.env.UNI_OUTPUT_DIR &&
|
|
@@ -78,27 +76,8 @@ function initModuleAlias() {
|
|
|
78
76
|
if (process.env.UNI_APP_PLATFORM ||
|
|
79
77
|
process.env.UNI_PLATFORM === 'app-harmony') {
|
|
80
78
|
if (!process.env.UNI_APP_X_VAPOR_RENDER_TARGET) {
|
|
81
|
-
//
|
|
82
|
-
|
|
83
|
-
process.env.UNI_APP_PLATFORM === 'harmony' ||
|
|
84
|
-
process.env.UNI_PLATFORM === 'app-harmony') {
|
|
85
|
-
if (process.env.UNI_INPUT_DIR &&
|
|
86
|
-
fs_1.default.existsSync(path_1.default.resolve(process.env.UNI_INPUT_DIR, '.native'))) {
|
|
87
|
-
process.env.UNI_APP_X_VAPOR_RENDER_TARGET = 'nativecode';
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
process.env.UNI_APP_X_VAPOR_RENDER_TARGET = 'bytecode';
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
if (process.env.UNI_INPUT_DIR &&
|
|
95
|
-
fs_1.default.existsSync(path_1.default.resolve(process.env.UNI_INPUT_DIR, '.dynamic'))) {
|
|
96
|
-
process.env.UNI_APP_X_VAPOR_RENDER_TARGET = 'bytecode';
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
process.env.UNI_APP_X_VAPOR_RENDER_TARGET = 'nativecode';
|
|
100
|
-
}
|
|
101
|
-
}
|
|
79
|
+
// 默认 app 平台使用 bytecode 目标
|
|
80
|
+
process.env.UNI_APP_X_VAPOR_RENDER_TARGET = 'bytecode';
|
|
102
81
|
}
|
|
103
82
|
if (process.env.UNI_APP_X_VAPOR_RENDER_TARGET?.includes('bytecode')) {
|
|
104
83
|
process.env.UNI_APP_X_DOM2_DYNAMIC = 'true';
|
package/dist/hbx/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { formatAtFilename, createErrorWithBlockFlag } from './log';
|
|
2
2
|
export * from './env';
|
|
3
3
|
export { initModuleAlias, installHBuilderXPlugin, formatInstallHBuilderXPluginTips, } from './alias';
|
|
4
|
-
export declare function uniHBuilderXConsolePlugin(method?: string): import("vite
|
|
4
|
+
export declare function uniHBuilderXConsolePlugin(method?: string): import("vite").Plugin<any>;
|
|
5
5
|
export declare function isEnableConsole(): boolean;
|
package/dist/i18n.js
CHANGED
|
@@ -47,51 +47,36 @@ function isUniAppLocaleFile(filepath) {
|
|
|
47
47
|
return localeJsonRE.test(path_1.default.basename(filepath));
|
|
48
48
|
}
|
|
49
49
|
exports.isUniAppLocaleFile = isUniAppLocaleFile;
|
|
50
|
-
const localeJsonCache = new Map();
|
|
51
50
|
function parseLocaleJson(filepath) {
|
|
52
|
-
const { mtimeMs, size } = fs_1.default.statSync(filepath);
|
|
53
|
-
const cached = localeJsonCache.get(filepath);
|
|
54
|
-
if (cached && cached.mtimeMs === mtimeMs && cached.size === size) {
|
|
55
|
-
return cached.json;
|
|
56
|
-
}
|
|
57
51
|
let jsonObj = (0, json_1.parseJson)(fs_1.default.readFileSync(filepath, 'utf8'), false, filepath);
|
|
58
52
|
if (isUniAppLocaleFile(filepath)) {
|
|
59
53
|
jsonObj = jsonObj.common || {};
|
|
60
54
|
}
|
|
61
|
-
localeJsonCache.set(filepath, { mtimeMs, size, json: jsonObj });
|
|
62
55
|
return jsonObj;
|
|
63
56
|
}
|
|
64
|
-
const localeFilesCache = new Map();
|
|
65
57
|
function getLocaleFiles(cwd) {
|
|
66
|
-
|
|
67
|
-
try {
|
|
68
|
-
mtimeMs = fs_1.default.statSync(cwd).mtimeMs;
|
|
69
|
-
}
|
|
70
|
-
catch {
|
|
71
|
-
return [];
|
|
72
|
-
}
|
|
73
|
-
const cached = localeFilesCache.get(cwd);
|
|
74
|
-
if (cached && cached.mtimeMs === mtimeMs) {
|
|
75
|
-
return cached.files;
|
|
76
|
-
}
|
|
77
|
-
const files = (0, fast_glob_1.sync)('*.json', { cwd, absolute: true });
|
|
78
|
-
localeFilesCache.set(cwd, { mtimeMs, files });
|
|
79
|
-
return files;
|
|
58
|
+
return (0, fast_glob_1.sync)('*.json', { cwd, absolute: true });
|
|
80
59
|
}
|
|
81
60
|
exports.getLocaleFiles = getLocaleFiles;
|
|
82
61
|
function initLocales(dir, withMessages = true) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
62
|
+
if (!fs_1.default.existsSync(dir)) {
|
|
63
|
+
return {};
|
|
64
|
+
}
|
|
65
|
+
return fs_1.default.readdirSync(dir).reduce((res, filename) => {
|
|
66
|
+
if (path_1.default.extname(filename) === '.json') {
|
|
67
|
+
try {
|
|
68
|
+
const locale = path_1.default
|
|
69
|
+
.basename(filename)
|
|
70
|
+
.replace(/(uni-app.)?(.*).json/, '$2');
|
|
71
|
+
if (withMessages) {
|
|
72
|
+
(0, shared_1.extend)(res[locale] || (res[locale] = {}), parseLocaleJson(path_1.default.join(dir, filename)));
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
res[locale] = {};
|
|
76
|
+
}
|
|
92
77
|
}
|
|
78
|
+
catch (e) { }
|
|
93
79
|
}
|
|
94
|
-
catch { }
|
|
95
80
|
return res;
|
|
96
81
|
}, {});
|
|
97
82
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export * from './platform';
|
|
|
26
26
|
export * from './utsUtils';
|
|
27
27
|
export * from './workers';
|
|
28
28
|
export { parseUniExtApi, parseUniExtApis, parseInjects, Define, DefineOptions, Defines, getUniExtApiProviderRegisters, formatExtApiProviderName, } from './uni_modules';
|
|
29
|
-
export { getUniModulesEncryptType, parseUniModulesArtifacts, resolveEncryptUniModule, } from './uni_modules.cloud';
|
|
29
|
+
export { copyEncryptUniModulesDom2Bytes, getUniModulesEncryptType, parseUniModulesArtifacts, resolveEncryptUniModule, } from './uni_modules.cloud';
|
|
30
30
|
import type { EncryptPackageJson } from './uni_modules.cloud';
|
|
31
31
|
export type EncryptArtifacts = EncryptPackageJson['uni_modules']['artifacts'];
|
|
32
32
|
export { M } from './messages';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.checkUpdate = exports.M = exports.resolveEncryptUniModule = exports.parseUniModulesArtifacts = exports.getUniModulesEncryptType = exports.formatExtApiProviderName = exports.getUniExtApiProviderRegisters = exports.parseInjects = exports.parseUniExtApis = exports.parseUniExtApi = void 0;
|
|
17
|
+
exports.checkUpdate = exports.M = exports.resolveEncryptUniModule = exports.parseUniModulesArtifacts = exports.getUniModulesEncryptType = exports.copyEncryptUniModulesDom2Bytes = exports.formatExtApiProviderName = exports.getUniExtApiProviderRegisters = exports.parseInjects = exports.parseUniExtApis = exports.parseUniExtApi = void 0;
|
|
18
18
|
__exportStar(require("./fs"), exports);
|
|
19
19
|
__exportStar(require("./mp"), exports);
|
|
20
20
|
__exportStar(require("./url"), exports);
|
|
@@ -49,6 +49,7 @@ Object.defineProperty(exports, "parseInjects", { enumerable: true, get: function
|
|
|
49
49
|
Object.defineProperty(exports, "getUniExtApiProviderRegisters", { enumerable: true, get: function () { return uni_modules_1.getUniExtApiProviderRegisters; } });
|
|
50
50
|
Object.defineProperty(exports, "formatExtApiProviderName", { enumerable: true, get: function () { return uni_modules_1.formatExtApiProviderName; } });
|
|
51
51
|
var uni_modules_cloud_1 = require("./uni_modules.cloud");
|
|
52
|
+
Object.defineProperty(exports, "copyEncryptUniModulesDom2Bytes", { enumerable: true, get: function () { return uni_modules_cloud_1.copyEncryptUniModulesDom2Bytes; } });
|
|
52
53
|
Object.defineProperty(exports, "getUniModulesEncryptType", { enumerable: true, get: function () { return uni_modules_cloud_1.getUniModulesEncryptType; } });
|
|
53
54
|
Object.defineProperty(exports, "parseUniModulesArtifacts", { enumerable: true, get: function () { return uni_modules_cloud_1.parseUniModulesArtifacts; } });
|
|
54
55
|
Object.defineProperty(exports, "resolveEncryptUniModule", { enumerable: true, get: function () { return uni_modules_cloud_1.resolveEncryptUniModule; } });
|
|
@@ -117,7 +117,15 @@ function initUniStatistics(manifestJson) {
|
|
|
117
117
|
if (!uniStatistics) {
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
|
-
|
|
120
|
+
/**
|
|
121
|
+
* 判断是否为私有版统计:
|
|
122
|
+
* - 新配置:type === 'private'
|
|
123
|
+
* - 旧配置兼容:version === 2
|
|
124
|
+
*/
|
|
125
|
+
const isPrivateStat = uniStatistics.type === 'private' ||
|
|
126
|
+
uniStatistics.version === 2 ||
|
|
127
|
+
uniStatistics.version === '2';
|
|
128
|
+
if (isPrivateStat) {
|
|
121
129
|
if (uniStatistics.uniCloud && uniStatistics.uniCloud.spaceId) {
|
|
122
130
|
return;
|
|
123
131
|
}
|
|
@@ -46,7 +46,9 @@ function defineNVuePageCode(pagesJson) {
|
|
|
46
46
|
}
|
|
47
47
|
const pagePathWithExtname = (0, utils_1.normalizePagePath)(page.path, 'app');
|
|
48
48
|
if (pagePathWithExtname) {
|
|
49
|
-
importNVuePagesCode.push(
|
|
49
|
+
importNVuePagesCode.push(
|
|
50
|
+
// 使用 res.default 确保 rollup 不会摇树
|
|
51
|
+
`import('./${pagePathWithExtname}').then((res)=>{res.default})`);
|
|
50
52
|
}
|
|
51
53
|
});
|
|
52
54
|
return importNVuePagesCode.join('\n');
|
package/dist/json/mp/index.d.ts
CHANGED
|
@@ -2,3 +2,5 @@ export * from './jsonFile';
|
|
|
2
2
|
export { AppJson, ComponentJson, MiniProgramComponentsType } from './types';
|
|
3
3
|
export { mergeMiniProgramAppJson, parseMiniProgramPagesJson } from './pages';
|
|
4
4
|
export { parseMiniProgramProjectJson } from './project';
|
|
5
|
+
export { MP_INDEPENDENT_ROOT_QUERY, MP_INDEPENDENT_MAIN_PREFIX, MP_INDEPENDENT_VIRTUAL_ROOT_QUERY, formatIndependentVirtualId, getIndependentRootByFilename, getIndependentRoots, getIndependentSubPackages, hasIndependentRoot, isAppPagesJson, isInIndependentRoot, normalizeIndependentRoot, parseIndependentMainRoot, parseIndependentRoot, parseIndependentSubPackages, parseIndependentVirtualRoot, resolveIndependentRoot, setIndependentSubPackages, stringifyIndependentRoots, withIndependentRoot, withIndependentRootIfNeeded, withoutIndependentRoot, } from './subpackage';
|
|
6
|
+
export type { IndependentSubPackage } from './subpackage';
|
package/dist/json/mp/index.js
CHANGED
|
@@ -14,10 +14,32 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.parseMiniProgramProjectJson = exports.parseMiniProgramPagesJson = exports.mergeMiniProgramAppJson = void 0;
|
|
17
|
+
exports.withoutIndependentRoot = exports.withIndependentRootIfNeeded = exports.withIndependentRoot = exports.stringifyIndependentRoots = exports.setIndependentSubPackages = exports.resolveIndependentRoot = exports.parseIndependentVirtualRoot = exports.parseIndependentSubPackages = exports.parseIndependentRoot = exports.parseIndependentMainRoot = exports.normalizeIndependentRoot = exports.isInIndependentRoot = exports.isAppPagesJson = exports.hasIndependentRoot = exports.getIndependentSubPackages = exports.getIndependentRoots = exports.getIndependentRootByFilename = exports.formatIndependentVirtualId = exports.MP_INDEPENDENT_VIRTUAL_ROOT_QUERY = exports.MP_INDEPENDENT_MAIN_PREFIX = exports.MP_INDEPENDENT_ROOT_QUERY = exports.parseMiniProgramProjectJson = exports.parseMiniProgramPagesJson = exports.mergeMiniProgramAppJson = void 0;
|
|
18
18
|
__exportStar(require("./jsonFile"), exports);
|
|
19
19
|
var pages_1 = require("./pages");
|
|
20
20
|
Object.defineProperty(exports, "mergeMiniProgramAppJson", { enumerable: true, get: function () { return pages_1.mergeMiniProgramAppJson; } });
|
|
21
21
|
Object.defineProperty(exports, "parseMiniProgramPagesJson", { enumerable: true, get: function () { return pages_1.parseMiniProgramPagesJson; } });
|
|
22
22
|
var project_1 = require("./project");
|
|
23
23
|
Object.defineProperty(exports, "parseMiniProgramProjectJson", { enumerable: true, get: function () { return project_1.parseMiniProgramProjectJson; } });
|
|
24
|
+
var subpackage_1 = require("./subpackage");
|
|
25
|
+
Object.defineProperty(exports, "MP_INDEPENDENT_ROOT_QUERY", { enumerable: true, get: function () { return subpackage_1.MP_INDEPENDENT_ROOT_QUERY; } });
|
|
26
|
+
Object.defineProperty(exports, "MP_INDEPENDENT_MAIN_PREFIX", { enumerable: true, get: function () { return subpackage_1.MP_INDEPENDENT_MAIN_PREFIX; } });
|
|
27
|
+
Object.defineProperty(exports, "MP_INDEPENDENT_VIRTUAL_ROOT_QUERY", { enumerable: true, get: function () { return subpackage_1.MP_INDEPENDENT_VIRTUAL_ROOT_QUERY; } });
|
|
28
|
+
Object.defineProperty(exports, "formatIndependentVirtualId", { enumerable: true, get: function () { return subpackage_1.formatIndependentVirtualId; } });
|
|
29
|
+
Object.defineProperty(exports, "getIndependentRootByFilename", { enumerable: true, get: function () { return subpackage_1.getIndependentRootByFilename; } });
|
|
30
|
+
Object.defineProperty(exports, "getIndependentRoots", { enumerable: true, get: function () { return subpackage_1.getIndependentRoots; } });
|
|
31
|
+
Object.defineProperty(exports, "getIndependentSubPackages", { enumerable: true, get: function () { return subpackage_1.getIndependentSubPackages; } });
|
|
32
|
+
Object.defineProperty(exports, "hasIndependentRoot", { enumerable: true, get: function () { return subpackage_1.hasIndependentRoot; } });
|
|
33
|
+
Object.defineProperty(exports, "isAppPagesJson", { enumerable: true, get: function () { return subpackage_1.isAppPagesJson; } });
|
|
34
|
+
Object.defineProperty(exports, "isInIndependentRoot", { enumerable: true, get: function () { return subpackage_1.isInIndependentRoot; } });
|
|
35
|
+
Object.defineProperty(exports, "normalizeIndependentRoot", { enumerable: true, get: function () { return subpackage_1.normalizeIndependentRoot; } });
|
|
36
|
+
Object.defineProperty(exports, "parseIndependentMainRoot", { enumerable: true, get: function () { return subpackage_1.parseIndependentMainRoot; } });
|
|
37
|
+
Object.defineProperty(exports, "parseIndependentRoot", { enumerable: true, get: function () { return subpackage_1.parseIndependentRoot; } });
|
|
38
|
+
Object.defineProperty(exports, "parseIndependentSubPackages", { enumerable: true, get: function () { return subpackage_1.parseIndependentSubPackages; } });
|
|
39
|
+
Object.defineProperty(exports, "parseIndependentVirtualRoot", { enumerable: true, get: function () { return subpackage_1.parseIndependentVirtualRoot; } });
|
|
40
|
+
Object.defineProperty(exports, "resolveIndependentRoot", { enumerable: true, get: function () { return subpackage_1.resolveIndependentRoot; } });
|
|
41
|
+
Object.defineProperty(exports, "setIndependentSubPackages", { enumerable: true, get: function () { return subpackage_1.setIndependentSubPackages; } });
|
|
42
|
+
Object.defineProperty(exports, "stringifyIndependentRoots", { enumerable: true, get: function () { return subpackage_1.stringifyIndependentRoots; } });
|
|
43
|
+
Object.defineProperty(exports, "withIndependentRoot", { enumerable: true, get: function () { return subpackage_1.withIndependentRoot; } });
|
|
44
|
+
Object.defineProperty(exports, "withIndependentRootIfNeeded", { enumerable: true, get: function () { return subpackage_1.withIndependentRootIfNeeded; } });
|
|
45
|
+
Object.defineProperty(exports, "withoutIndependentRoot", { enumerable: true, get: function () { return subpackage_1.withoutIndependentRoot; } });
|