@dcloudio/uni-cli-shared 3.0.0-alpha-3021320211109002 → 3.0.0-alpha-3021320211115001
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 +3 -0
- package/dist/constants.js +4 -1
- package/dist/easycom.d.ts +7 -1
- package/dist/easycom.js +25 -6
- package/dist/env/define.d.ts +3 -0
- package/dist/env/define.js +6 -0
- package/dist/exports.d.ts +1 -0
- package/dist/exports.js +8 -0
- package/dist/filter.d.ts +16 -0
- package/dist/filter.js +60 -0
- package/dist/hbx/alias.js +9 -1
- package/dist/hbx/env.js +4 -1
- package/dist/hbx/index.js +0 -7
- package/dist/hbx/log.d.ts +2 -0
- package/dist/hbx/log.js +36 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/json/app/manifest/confusion.d.ts +3 -0
- package/dist/json/app/manifest/confusion.js +56 -14
- package/dist/json/app/manifest/env.d.ts +1 -1
- package/dist/json/app/manifest/index.d.ts +1 -0
- package/dist/json/app/manifest/index.js +5 -1
- package/dist/json/app/manifest/nvue.d.ts +3 -3
- package/dist/json/app/pages/index.d.ts +0 -1
- package/dist/json/app/pages/index.js +0 -11
- package/dist/json/manifest.d.ts +1 -1
- package/dist/json/manifest.js +9 -3
- package/dist/json/mp/index.d.ts +1 -0
- package/dist/json/mp/index.js +11 -0
- package/dist/json/mp/jsonFile.d.ts +8 -6
- package/dist/json/mp/jsonFile.js +68 -16
- package/dist/json/mp/pages.d.ts +1 -0
- package/dist/json/mp/pages.js +17 -3
- package/dist/json/mp/types.d.ts +1 -0
- package/dist/json/pages.js +0 -4
- package/dist/logs/console.js +5 -2
- package/dist/logs/format.js +6 -0
- package/dist/messages/index.d.ts +3 -0
- package/dist/messages/index.js +3 -0
- package/dist/mp/constants.d.ts +2 -0
- package/dist/mp/constants.js +5 -0
- package/dist/mp/event.d.ts +2 -1
- package/dist/mp/event.js +18 -3
- package/dist/mp/imports.d.ts +5 -0
- package/dist/mp/imports.js +63 -0
- package/dist/mp/index.d.ts +5 -0
- package/dist/mp/index.js +7 -0
- package/dist/mp/nvue.d.ts +1 -0
- package/dist/mp/nvue.js +18 -0
- package/dist/mp/style.d.ts +1 -0
- package/dist/mp/style.js +9 -0
- package/dist/mp/template.d.ts +55 -0
- package/dist/mp/template.js +73 -0
- package/dist/mp/transformImports.d.ts +14 -0
- package/dist/mp/transformImports.js +175 -0
- package/dist/postcss/plugins/stylePluginScoped.d.ts +1 -1
- package/dist/postcss/plugins/uniapp.d.ts +1 -1
- package/dist/postcss/plugins/uniapp.js +51 -21
- package/dist/preprocess/context.js +1 -0
- package/dist/utils.d.ts +9 -1
- package/dist/utils.js +93 -8
- package/dist/vite/features.d.ts +1 -1
- package/dist/vite/index.d.ts +2 -3
- package/dist/vite/plugins/copy.d.ts +1 -1
- package/dist/vite/plugins/cssScoped.d.ts +1 -1
- package/dist/vite/plugins/inject.d.ts +1 -1
- package/dist/vite/plugins/inject.js +2 -2
- package/dist/vite/plugins/vitejs/config.d.ts +1 -1
- package/dist/vite/plugins/vitejs/index.d.ts +1 -1
- package/dist/vite/plugins/vitejs/plugin.d.ts +1 -1
- package/dist/vite/plugins/vitejs/plugins/asset.d.ts +1 -1
- package/dist/vite/plugins/vitejs/plugins/asset.js +28 -21
- package/dist/vite/plugins/vitejs/plugins/css.d.ts +4 -4
- package/dist/vite/plugins/vitejs/plugins/css.js +15 -24
- package/dist/vite/plugins/vitejs/server/moduleGraph.d.ts +1 -1
- package/dist/vite/plugins/vitejs/server/moduleGraph.js +0 -3
- package/dist/vite/utils/ast.d.ts +1 -1
- package/dist/vite/utils/index.d.ts +1 -1
- package/dist/vite/utils/plugin.d.ts +4 -4
- package/dist/vite/utils/plugin.js +2 -2
- package/dist/vue/index.d.ts +2 -0
- package/dist/vue/index.js +14 -0
- package/dist/vue/transforms/index.d.ts +10 -0
- package/dist/vue/transforms/index.js +36 -0
- package/dist/vue/transforms/transformComponent.d.ts +3 -0
- package/dist/vue/transforms/transformComponent.js +26 -0
- package/dist/vue/transforms/transformEvent.d.ts +2 -0
- package/dist/vue/transforms/transformEvent.js +22 -0
- package/dist/vue/transforms/transformPageHead.d.ts +2 -0
- package/dist/vue/transforms/transformPageHead.js +11 -0
- package/dist/vue/transforms/transformRef.d.ts +2 -0
- package/dist/vue/transforms/transformRef.js +32 -0
- package/dist/vue/transforms/transformTag.d.ts +2 -0
- package/dist/vue/transforms/transformTag.js +18 -0
- package/dist/vue/transforms/vModel.d.ts +12 -0
- package/dist/vue/transforms/vModel.js +33 -0
- package/dist/vue/transforms/vOn.d.ts +15 -0
- package/dist/vue/transforms/vOn.js +88 -0
- package/dist/vue/utils.d.ts +9 -0
- package/dist/vue/utils.js +66 -0
- package/lib/nvue.css +34 -0
- package/package.json +27 -6
- package/LICENSE +0 -202
- package/dist/json/app/pages/nvue.d.ts +0 -1
- package/dist/json/app/pages/nvue.js +0 -88
- package/dist/renderjs.d.ts +0 -16
- package/dist/renderjs.js +0 -44
package/dist/constants.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ export declare const EXTNAME_JS: string[];
|
|
|
3
3
|
export declare const EXTNAME_VUE: string[];
|
|
4
4
|
export declare const EXTNAME_VUE_RE: RegExp;
|
|
5
5
|
export declare const EXTNAME_JS_RE: RegExp;
|
|
6
|
+
export declare const ASSETS_INLINE_LIMIT: number;
|
|
7
|
+
export declare const APP_SERVICE_FILENAME = "app-service.js";
|
|
8
|
+
export declare const BINDING_COMPONENTS = "__BINDING_COMPONENTS__";
|
|
6
9
|
export declare const PAGE_EXTNAME_APP: string[];
|
|
7
10
|
export declare const PAGE_EXTNAME: string[];
|
|
8
11
|
export declare const H5_API_STYLE_PATH = "@dcloudio/uni-h5/style/api/";
|
package/dist/constants.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.COMMON_EXCLUDE = exports.BASE_COMPONENTS_STYLE_PATH = exports.H5_COMPONENTS_STYLE_PATH = exports.H5_FRAMEWORK_STYLE_PATH = exports.H5_API_STYLE_PATH = exports.PAGE_EXTNAME = exports.PAGE_EXTNAME_APP = exports.EXTNAME_JS_RE = exports.EXTNAME_VUE_RE = exports.EXTNAME_VUE = exports.EXTNAME_JS = exports.PUBLIC_DIR = void 0;
|
|
3
|
+
exports.COMMON_EXCLUDE = exports.BASE_COMPONENTS_STYLE_PATH = exports.H5_COMPONENTS_STYLE_PATH = exports.H5_FRAMEWORK_STYLE_PATH = exports.H5_API_STYLE_PATH = exports.PAGE_EXTNAME = exports.PAGE_EXTNAME_APP = exports.BINDING_COMPONENTS = exports.APP_SERVICE_FILENAME = exports.ASSETS_INLINE_LIMIT = exports.EXTNAME_JS_RE = exports.EXTNAME_VUE_RE = exports.EXTNAME_VUE = exports.EXTNAME_JS = exports.PUBLIC_DIR = void 0;
|
|
4
4
|
exports.PUBLIC_DIR = 'static';
|
|
5
5
|
exports.EXTNAME_JS = ['.js', '.ts', '.jsx', '.tsx'];
|
|
6
6
|
exports.EXTNAME_VUE = ['.vue', '.nvue'];
|
|
7
7
|
exports.EXTNAME_VUE_RE = /\.(vue|nvue)$/;
|
|
8
8
|
exports.EXTNAME_JS_RE = /\.[jt]sx?$/;
|
|
9
|
+
exports.ASSETS_INLINE_LIMIT = 40 * 1024;
|
|
10
|
+
exports.APP_SERVICE_FILENAME = 'app-service.js';
|
|
11
|
+
exports.BINDING_COMPONENTS = '__BINDING_COMPONENTS__';
|
|
9
12
|
// APP 平台解析页面后缀的优先级
|
|
10
13
|
exports.PAGE_EXTNAME_APP = ['.nvue', '.vue', '.tsx', '.jsx', '.js'];
|
|
11
14
|
// 其他平台解析页面后缀的优先级
|
package/dist/easycom.d.ts
CHANGED
|
@@ -12,7 +12,10 @@ interface EasycomMatcher {
|
|
|
12
12
|
interface EasycomCustom {
|
|
13
13
|
[key: string]: string;
|
|
14
14
|
}
|
|
15
|
-
export declare function initEasycoms(inputDir: string, platform
|
|
15
|
+
export declare function initEasycoms(inputDir: string, { dirs, platform }: {
|
|
16
|
+
dirs: string[];
|
|
17
|
+
platform: UniApp.PLATFORM;
|
|
18
|
+
}): {
|
|
16
19
|
options: EasycomOption;
|
|
17
20
|
filter: (id: unknown) => boolean;
|
|
18
21
|
refresh(): void;
|
|
@@ -20,4 +23,7 @@ export declare function initEasycoms(inputDir: string, platform: UniApp.PLATFORM
|
|
|
20
23
|
};
|
|
21
24
|
export declare const initEasycomsOnce: typeof initEasycoms;
|
|
22
25
|
export declare function matchEasycom(tag: string): string | false | undefined;
|
|
26
|
+
export declare function addImportDeclaration(importDeclarations: string[], local: string, source: string, imported?: string): string;
|
|
27
|
+
export declare function genResolveEasycomCode(importDeclarations: string[], code: string, name: string): string;
|
|
28
|
+
export declare const UNI_EASYCOM_EXCLUDE: RegExp[];
|
|
23
29
|
export {};
|
package/dist/easycom.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.matchEasycom = exports.initEasycomsOnce = exports.initEasycoms = void 0;
|
|
6
|
+
exports.UNI_EASYCOM_EXCLUDE = exports.genResolveEasycomCode = exports.addImportDeclaration = exports.matchEasycom = exports.initEasycomsOnce = exports.initEasycoms = void 0;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const debug_1 = __importDefault(require("debug"));
|
|
@@ -13,7 +13,7 @@ const uni_shared_1 = require("@dcloudio/uni-shared");
|
|
|
13
13
|
const utils_1 = require("./utils");
|
|
14
14
|
const pages_1 = require("./json/pages");
|
|
15
15
|
const messages_1 = require("./messages");
|
|
16
|
-
const debugEasycom = (0, debug_1.default)('uni:easycom');
|
|
16
|
+
const debugEasycom = (0, debug_1.default)('vite:uni:easycom');
|
|
17
17
|
const easycoms = [];
|
|
18
18
|
const easycomsCache = new Map();
|
|
19
19
|
const easycomsInvalidCache = new Set();
|
|
@@ -23,8 +23,7 @@ function clearEasycom() {
|
|
|
23
23
|
easycomsCache.clear();
|
|
24
24
|
easycomsInvalidCache.clear();
|
|
25
25
|
}
|
|
26
|
-
function initEasycoms(inputDir, platform) {
|
|
27
|
-
const buildInComponentsDir = path_1.default.resolve(require.resolve('@dcloudio/uni-components'), '../lib');
|
|
26
|
+
function initEasycoms(inputDir, { dirs, platform }) {
|
|
28
27
|
const componentsDir = path_1.default.resolve(inputDir, 'components');
|
|
29
28
|
const uniModulesDir = path_1.default.resolve(inputDir, 'uni_modules');
|
|
30
29
|
const initEasycomOptions = (pagesJson) => {
|
|
@@ -32,9 +31,9 @@ function initEasycoms(inputDir, platform) {
|
|
|
32
31
|
const { easycom } = pagesJson || (0, pages_1.parsePagesJson)(inputDir, platform, false);
|
|
33
32
|
const easycomOptions = {
|
|
34
33
|
dirs: easycom && easycom.autoscan === false
|
|
35
|
-
? [
|
|
34
|
+
? [...dirs] // 禁止自动扫描
|
|
36
35
|
: [
|
|
37
|
-
|
|
36
|
+
...dirs,
|
|
38
37
|
componentsDir,
|
|
39
38
|
...initUniModulesEasycomDirs(uniModulesDir),
|
|
40
39
|
],
|
|
@@ -178,3 +177,23 @@ function initAutoScanEasycoms(dirs, rootDir, extensions) {
|
|
|
178
177
|
function normalizeCompath(compath, rootDir) {
|
|
179
178
|
return (0, utils_1.normalizePath)(path_1.default.relative(rootDir, compath));
|
|
180
179
|
}
|
|
180
|
+
function addImportDeclaration(importDeclarations, local, source, imported) {
|
|
181
|
+
importDeclarations.push(createImportDeclaration(local, source, imported));
|
|
182
|
+
return local;
|
|
183
|
+
}
|
|
184
|
+
exports.addImportDeclaration = addImportDeclaration;
|
|
185
|
+
function createImportDeclaration(local, source, imported) {
|
|
186
|
+
if (imported) {
|
|
187
|
+
return `import {${imported} as ${local}} from '${source}';`;
|
|
188
|
+
}
|
|
189
|
+
return `import ${local} from '${source}';`;
|
|
190
|
+
}
|
|
191
|
+
const RESOLVE_EASYCOM_IMPORT_CODE = `import { resolveDynamicComponent as __resolveDynamicComponent } from 'vue';import { resolveEasycom } from '@dcloudio/uni-app';`;
|
|
192
|
+
function genResolveEasycomCode(importDeclarations, code, name) {
|
|
193
|
+
if (!importDeclarations.includes(RESOLVE_EASYCOM_IMPORT_CODE)) {
|
|
194
|
+
importDeclarations.push(RESOLVE_EASYCOM_IMPORT_CODE);
|
|
195
|
+
}
|
|
196
|
+
return `resolveEasycom(${code.replace('_resolveComponent', '__resolveDynamicComponent')}, ${name})`;
|
|
197
|
+
}
|
|
198
|
+
exports.genResolveEasycomCode = genResolveEasycomCode;
|
|
199
|
+
exports.UNI_EASYCOM_EXCLUDE = [/App.vue$/, /@dcloudio\/uni-h5/];
|
package/dist/env/define.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export declare function initDefine(stringifyBoolean?: boolean): {
|
|
2
2
|
'process.env.NODE_ENV': string;
|
|
3
|
+
'process.env.UNI_DEBUG': string | boolean;
|
|
3
4
|
'process.env.UNI_APP_ID': string;
|
|
4
5
|
'process.env.UNI_APP_NAME': string;
|
|
5
6
|
'process.env.UNI_PLATFORM': string;
|
|
7
|
+
'process.env.UNI_SUBPACKAGE': string;
|
|
8
|
+
'process.env.UNI_COMPILER_VERSION': string;
|
|
6
9
|
'process.env.RUN_BY_HBUILDERX': string | boolean;
|
|
7
10
|
'process.env.UNI_AUTOMATOR_WS_ENDPOINT': string;
|
|
8
11
|
'process.env.UNI_CLOUD_PROVIDER': string;
|
package/dist/env/define.js
CHANGED
|
@@ -6,11 +6,17 @@ const json_1 = require("../json");
|
|
|
6
6
|
function initDefine(stringifyBoolean = false) {
|
|
7
7
|
const manifestJson = (0, json_1.parseManifestJsonOnce)(process.env.UNI_INPUT_DIR);
|
|
8
8
|
const isRunByHBuilderX = (0, env_1.runByHBuilderX)();
|
|
9
|
+
const isDebug = !!manifestJson.debug;
|
|
9
10
|
return {
|
|
10
11
|
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
|
|
12
|
+
'process.env.UNI_DEBUG': stringifyBoolean
|
|
13
|
+
? JSON.stringify(isDebug)
|
|
14
|
+
: isDebug,
|
|
11
15
|
'process.env.UNI_APP_ID': JSON.stringify(manifestJson.appid || ''),
|
|
12
16
|
'process.env.UNI_APP_NAME': JSON.stringify(manifestJson.name || ''),
|
|
13
17
|
'process.env.UNI_PLATFORM': JSON.stringify(process.env.UNI_PLATFORM),
|
|
18
|
+
'process.env.UNI_SUBPACKAGE': JSON.stringify(process.env.UNI_SUBPACKAGE),
|
|
19
|
+
'process.env.UNI_COMPILER_VERSION': JSON.stringify(process.env.UNI_COMPILER_VERSION),
|
|
14
20
|
'process.env.RUN_BY_HBUILDERX': stringifyBoolean
|
|
15
21
|
? JSON.stringify(isRunByHBuilderX)
|
|
16
22
|
: isRunByHBuilderX,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as chokidar } from 'chokidar';
|
package/dist/exports.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
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.chokidar = void 0;
|
|
7
|
+
var chokidar_1 = require("chokidar");
|
|
8
|
+
Object.defineProperty(exports, "chokidar", { enumerable: true, get: function () { return __importDefault(chokidar_1).default; } });
|
package/dist/filter.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function isWxs(id: string): boolean;
|
|
2
|
+
export declare function isSjs(id: string): boolean;
|
|
3
|
+
export declare function isRenderjs(id: string): boolean;
|
|
4
|
+
declare type FilterType = 'wxs' | 'renderjs' | 'sjs';
|
|
5
|
+
export declare function parseRenderjs(id: string): {
|
|
6
|
+
type: FilterType;
|
|
7
|
+
name: string;
|
|
8
|
+
filename: string;
|
|
9
|
+
} | {
|
|
10
|
+
readonly type: "";
|
|
11
|
+
readonly name: "";
|
|
12
|
+
readonly filename: "";
|
|
13
|
+
};
|
|
14
|
+
export declare function missingModuleName(type: FilterType, code: string): string;
|
|
15
|
+
export declare function parseFilterNames(lang: string, code: string): string[];
|
|
16
|
+
export {};
|
package/dist/filter.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseFilterNames = exports.missingModuleName = exports.parseRenderjs = exports.isRenderjs = exports.isSjs = exports.isWxs = void 0;
|
|
4
|
+
const url_1 = require("./vite/utils/url");
|
|
5
|
+
const WXS_RE = /vue&type=wxs/;
|
|
6
|
+
function isWxs(id) {
|
|
7
|
+
return WXS_RE.test(id);
|
|
8
|
+
}
|
|
9
|
+
exports.isWxs = isWxs;
|
|
10
|
+
const SJS_RE = /vue&type=sjs/;
|
|
11
|
+
function isSjs(id) {
|
|
12
|
+
return SJS_RE.test(id);
|
|
13
|
+
}
|
|
14
|
+
exports.isSjs = isSjs;
|
|
15
|
+
const RENDERJS_RE = /vue&type=renderjs/;
|
|
16
|
+
function isRenderjs(id) {
|
|
17
|
+
return RENDERJS_RE.test(id);
|
|
18
|
+
}
|
|
19
|
+
exports.isRenderjs = isRenderjs;
|
|
20
|
+
function parseRenderjs(id) {
|
|
21
|
+
if (isWxs(id) || isRenderjs(id) || isSjs(id)) {
|
|
22
|
+
const { query, filename } = (0, url_1.parseVueRequest)(id);
|
|
23
|
+
return {
|
|
24
|
+
type: query.type,
|
|
25
|
+
name: query.name,
|
|
26
|
+
filename,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
type: '',
|
|
31
|
+
name: '',
|
|
32
|
+
filename: '',
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
exports.parseRenderjs = parseRenderjs;
|
|
36
|
+
function missingModuleName(type, code) {
|
|
37
|
+
return `<script module="missing module name" lang="${type}">
|
|
38
|
+
${code}
|
|
39
|
+
</script>`;
|
|
40
|
+
}
|
|
41
|
+
exports.missingModuleName = missingModuleName;
|
|
42
|
+
const moduleRE = /module=["'](.*?)["']/;
|
|
43
|
+
function parseFilterNames(lang, code) {
|
|
44
|
+
const names = [];
|
|
45
|
+
const scriptTags = code.match(/<script\b[^>]*>/gm);
|
|
46
|
+
if (!scriptTags) {
|
|
47
|
+
return names;
|
|
48
|
+
}
|
|
49
|
+
const langRE = new RegExp(`lang=["']${lang}["']`);
|
|
50
|
+
scriptTags.forEach((scriptTag) => {
|
|
51
|
+
if (langRE.test(scriptTag)) {
|
|
52
|
+
const matches = scriptTag.match(moduleRE);
|
|
53
|
+
if (matches) {
|
|
54
|
+
names.push(matches[1]);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
return names;
|
|
59
|
+
}
|
|
60
|
+
exports.parseFilterNames = parseFilterNames;
|
package/dist/hbx/alias.js
CHANGED
|
@@ -22,6 +22,12 @@ function initModuleAlias() {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
exports.initModuleAlias = initModuleAlias;
|
|
25
|
+
function supportAutoInstallPlugin() {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
function sendSignal(lang) {
|
|
29
|
+
return console.error(`%HXRunUniAPPPluginName%${lang}%HXRunUniAPPPluginName%`);
|
|
30
|
+
}
|
|
25
31
|
exports.moduleAliasFormatter = {
|
|
26
32
|
test(msg) {
|
|
27
33
|
return msg.includes('Preprocessor dependency');
|
|
@@ -42,7 +48,9 @@ exports.moduleAliasFormatter = {
|
|
|
42
48
|
preprocessor = 'compile-stylus';
|
|
43
49
|
}
|
|
44
50
|
if (lang) {
|
|
45
|
-
|
|
51
|
+
const autoInstall = supportAutoInstallPlugin();
|
|
52
|
+
autoInstall && sendSignal(preprocessor);
|
|
53
|
+
return `预编译器错误:代码使用了${lang}语言,但未安装相应的编译器插件,${autoInstall ? '正在从' : '请前往'}插件市场安装该插件:
|
|
46
54
|
https://ext.dcloud.net.cn/plugin?name=${preprocessor}`;
|
|
47
55
|
}
|
|
48
56
|
return msg;
|
package/dist/hbx/env.js
CHANGED
|
@@ -10,7 +10,10 @@ const uni_shared_1 = require("@dcloudio/uni-shared");
|
|
|
10
10
|
exports.isInHBuilderX = (0, uni_shared_1.once)(() => {
|
|
11
11
|
try {
|
|
12
12
|
const { name } = require(path_1.default.resolve(process.cwd(), '../about/package.json'));
|
|
13
|
-
|
|
13
|
+
if (name === 'about') {
|
|
14
|
+
process.env.UNI_HBUILDERX_PLUGINS = path_1.default.resolve(process.cwd(), '..');
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
14
17
|
}
|
|
15
18
|
catch (e) {
|
|
16
19
|
// console.error(e)
|
package/dist/hbx/index.js
CHANGED
|
@@ -9,15 +9,8 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
9
9
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
-
};
|
|
15
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
13
|
exports.initModuleAlias = void 0;
|
|
17
|
-
const path_1 = __importDefault(require("path"));
|
|
18
|
-
process.env.UNI_HBUILDERX_PLUGINS =
|
|
19
|
-
process.env.UNI_HBUILDERX_PLUGINS ||
|
|
20
|
-
path_1.default.resolve(__dirname, '../../../../../../');
|
|
21
14
|
__exportStar(require("./env"), exports);
|
|
22
15
|
var alias_1 = require("./alias");
|
|
23
16
|
Object.defineProperty(exports, "initModuleAlias", { enumerable: true, get: function () { return alias_1.initModuleAlias; } });
|
package/dist/hbx/log.d.ts
CHANGED
|
@@ -2,3 +2,5 @@ import { Formatter } from '../logs/format';
|
|
|
2
2
|
export declare const h5ServeFormatter: Formatter;
|
|
3
3
|
export declare const removeInfoFormatter: Formatter;
|
|
4
4
|
export declare const removeWarnFormatter: Formatter;
|
|
5
|
+
export declare const FilenameFormatter: Formatter;
|
|
6
|
+
export declare const HBuilderXFileFormatter: Formatter;
|
package/dist/hbx/log.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeWarnFormatter = exports.removeInfoFormatter = exports.h5ServeFormatter = void 0;
|
|
6
|
+
exports.HBuilderXFileFormatter = exports.FilenameFormatter = exports.removeWarnFormatter = exports.removeInfoFormatter = exports.h5ServeFormatter = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const utils_1 = require("../utils");
|
|
4
9
|
const SIGNAL_H5_LOCAL = ' > Local:';
|
|
5
10
|
const SIGNAL_H5_NETWORK = ' > Network:';
|
|
6
11
|
const networkLogs = [];
|
|
@@ -40,7 +45,7 @@ exports.removeInfoFormatter = {
|
|
|
40
45
|
return '';
|
|
41
46
|
},
|
|
42
47
|
};
|
|
43
|
-
const REMOVED_WARN_MSGS = [
|
|
48
|
+
const REMOVED_WARN_MSGS = [];
|
|
44
49
|
exports.removeWarnFormatter = {
|
|
45
50
|
test(msg) {
|
|
46
51
|
return !!REMOVED_WARN_MSGS.find((m) => msg.includes(m));
|
|
@@ -49,3 +54,32 @@ exports.removeWarnFormatter = {
|
|
|
49
54
|
return '';
|
|
50
55
|
},
|
|
51
56
|
};
|
|
57
|
+
const fileRE = /file:\s(.*):(\d+):(\d+)/;
|
|
58
|
+
exports.FilenameFormatter = {
|
|
59
|
+
test(msg) {
|
|
60
|
+
return fileRE.test(msg);
|
|
61
|
+
},
|
|
62
|
+
format(msg) {
|
|
63
|
+
return msg.replace(fileRE, (_, filename, line, column) => {
|
|
64
|
+
return `file: ${filename.split('?')[0]}:${line}:${column}`;
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
exports.HBuilderXFileFormatter = {
|
|
69
|
+
test(msg) {
|
|
70
|
+
return fileRE.test(msg);
|
|
71
|
+
},
|
|
72
|
+
format(msg) {
|
|
73
|
+
return (msg
|
|
74
|
+
// remove color
|
|
75
|
+
.replace(/\x1B[[(?);]{0,2}(;?\d)*./g, '')
|
|
76
|
+
.replace(fileRE, (_, filename, line, column) => {
|
|
77
|
+
return ('at ' +
|
|
78
|
+
(0, utils_1.normalizePath)(path_1.default.relative(process.env.UNI_INPUT_DIR, filename.split('?')[0])) +
|
|
79
|
+
':' +
|
|
80
|
+
line +
|
|
81
|
+
':' +
|
|
82
|
+
column);
|
|
83
|
+
}));
|
|
84
|
+
},
|
|
85
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ export * from './fs';
|
|
|
2
2
|
export * from './mp';
|
|
3
3
|
export * from './env';
|
|
4
4
|
export * from './hbx';
|
|
5
|
-
export * from './logs';
|
|
6
5
|
export * from './ssr';
|
|
6
|
+
export * from './vue';
|
|
7
|
+
export * from './logs';
|
|
7
8
|
export * from './i18n';
|
|
8
9
|
export * from './deps';
|
|
9
10
|
export * from './json';
|
|
@@ -13,7 +14,8 @@ export * from './easycom';
|
|
|
13
14
|
export * from './constants';
|
|
14
15
|
export * from './preprocess';
|
|
15
16
|
export * from './postcss';
|
|
16
|
-
export * from './
|
|
17
|
+
export * from './filter';
|
|
17
18
|
export * from './esbuild';
|
|
18
19
|
export { M } from './messages';
|
|
20
|
+
export * from './exports';
|
|
19
21
|
export { checkUpdate } from './checkUpdate';
|
package/dist/index.js
CHANGED
|
@@ -15,8 +15,9 @@ __exportStar(require("./fs"), exports);
|
|
|
15
15
|
__exportStar(require("./mp"), exports);
|
|
16
16
|
__exportStar(require("./env"), exports);
|
|
17
17
|
__exportStar(require("./hbx"), exports);
|
|
18
|
-
__exportStar(require("./logs"), exports);
|
|
19
18
|
__exportStar(require("./ssr"), exports);
|
|
19
|
+
__exportStar(require("./vue"), exports);
|
|
20
|
+
__exportStar(require("./logs"), exports);
|
|
20
21
|
__exportStar(require("./i18n"), exports);
|
|
21
22
|
__exportStar(require("./deps"), exports);
|
|
22
23
|
__exportStar(require("./json"), exports);
|
|
@@ -26,9 +27,10 @@ __exportStar(require("./easycom"), exports);
|
|
|
26
27
|
__exportStar(require("./constants"), exports);
|
|
27
28
|
__exportStar(require("./preprocess"), exports);
|
|
28
29
|
__exportStar(require("./postcss"), exports);
|
|
29
|
-
__exportStar(require("./
|
|
30
|
+
__exportStar(require("./filter"), exports);
|
|
30
31
|
__exportStar(require("./esbuild"), exports);
|
|
31
32
|
var messages_1 = require("./messages");
|
|
32
33
|
Object.defineProperty(exports, "M", { enumerable: true, get: function () { return messages_1.M; } });
|
|
34
|
+
__exportStar(require("./exports"), exports);
|
|
33
35
|
var checkUpdate_1 = require("./checkUpdate");
|
|
34
36
|
Object.defineProperty(exports, "checkUpdate", { enumerable: true, get: function () { return checkUpdate_1.checkUpdate; } });
|
|
@@ -1 +1,4 @@
|
|
|
1
|
+
export declare const APP_CONFUSION_FILENAME = "app-confusion.js";
|
|
2
|
+
export declare function isConfusionFile(filename: string): boolean;
|
|
3
|
+
export declare function hasConfusionFile(inputDir?: string): boolean;
|
|
1
4
|
export declare function initConfusion(manifestJson: Record<string, any>): void;
|
|
@@ -3,33 +3,75 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.initConfusion = void 0;
|
|
6
|
+
exports.initConfusion = exports.hasConfusionFile = exports.isConfusionFile = exports.APP_CONFUSION_FILENAME = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const utils_1 = require("../../../utils");
|
|
9
|
+
const constants_1 = require("../../../constants");
|
|
10
|
+
const manifest_1 = require("../../manifest");
|
|
11
|
+
function isJsFile(filename) {
|
|
12
|
+
return constants_1.EXTNAME_JS_RE.test(filename);
|
|
13
|
+
}
|
|
14
|
+
function isStaticJsFile(filename) {
|
|
15
|
+
return (filename.indexOf('hybrid/html') === 0 ||
|
|
16
|
+
filename.indexOf('static/') === 0 ||
|
|
17
|
+
filename.indexOf('/static/') !== -1); // subpackages, uni_modules 中的 static 目录
|
|
18
|
+
}
|
|
19
|
+
const dynamicConfusionJsFiles = [];
|
|
20
|
+
exports.APP_CONFUSION_FILENAME = 'app-confusion.js';
|
|
21
|
+
function isConfusionFile(filename) {
|
|
22
|
+
return dynamicConfusionJsFiles.includes((0, utils_1.normalizePath)(filename));
|
|
23
|
+
}
|
|
24
|
+
exports.isConfusionFile = isConfusionFile;
|
|
25
|
+
function hasConfusionFile(inputDir) {
|
|
26
|
+
var _a, _b;
|
|
27
|
+
if (inputDir) {
|
|
28
|
+
const manifestJson = (0, manifest_1.parseManifestJsonOnce)(inputDir);
|
|
29
|
+
const resources = (_b = (_a = manifestJson['app-plus']) === null || _a === void 0 ? void 0 : _a.confusion) === null || _b === void 0 ? void 0 : _b.resources;
|
|
30
|
+
if (resources && parseConfusion(resources)[1].length) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
12
33
|
}
|
|
13
|
-
|
|
14
|
-
|
|
34
|
+
return !!dynamicConfusionJsFiles.length;
|
|
35
|
+
}
|
|
36
|
+
exports.hasConfusionFile = hasConfusionFile;
|
|
37
|
+
function parseConfusion(resources) {
|
|
38
|
+
const res = {};
|
|
39
|
+
const dynamicJsFiles = [];
|
|
40
|
+
Object.keys(resources).reduce((res, name) => {
|
|
15
41
|
const extname = path_1.default.extname(name);
|
|
16
42
|
if (extname === '.nvue') {
|
|
17
43
|
res[name.replace('.nvue', '.js')] = resources[name];
|
|
18
44
|
}
|
|
19
|
-
else if (
|
|
20
|
-
//
|
|
21
|
-
if (name
|
|
22
|
-
name.indexOf('static/') === 0 ||
|
|
23
|
-
name.indexOf('/static/') !== -1 // subpackages, uni_modules 中的 static 目录
|
|
24
|
-
) {
|
|
45
|
+
else if (isJsFile(name)) {
|
|
46
|
+
// 静态 js 加密
|
|
47
|
+
if (isStaticJsFile(name)) {
|
|
25
48
|
res[name] = resources[name];
|
|
26
49
|
}
|
|
50
|
+
else {
|
|
51
|
+
// 非静态 js 将被合并进 app-confusion.js
|
|
52
|
+
dynamicJsFiles.push(name);
|
|
53
|
+
}
|
|
27
54
|
}
|
|
28
55
|
else {
|
|
29
56
|
throw new Error(`原生混淆仅支持 nvue 页面,错误的页面路径:${name}`);
|
|
30
57
|
}
|
|
31
58
|
// TODO 旧编译器会检查要加密的 nvue 页面(包括subnvue)是否被使用?后续有时间再考虑支持吧,意义不太大
|
|
32
59
|
return res;
|
|
33
|
-
},
|
|
60
|
+
}, res);
|
|
61
|
+
if (dynamicJsFiles.length) {
|
|
62
|
+
res[exports.APP_CONFUSION_FILENAME] = {};
|
|
63
|
+
}
|
|
64
|
+
return [res, dynamicJsFiles];
|
|
65
|
+
}
|
|
66
|
+
function initConfusion(manifestJson) {
|
|
67
|
+
var _a;
|
|
68
|
+
dynamicConfusionJsFiles.length = 0;
|
|
69
|
+
if (!((_a = manifestJson.plus.confusion) === null || _a === void 0 ? void 0 : _a.resources)) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const resources = manifestJson.plus.confusion.resources;
|
|
73
|
+
const [res, dynamicJsFiles] = parseConfusion(resources);
|
|
74
|
+
manifestJson.plus.confusion.resources = res;
|
|
75
|
+
dynamicConfusionJsFiles.push(...dynamicJsFiles);
|
|
34
76
|
}
|
|
35
77
|
exports.initConfusion = initConfusion;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function getAppRenderer(manifestJson: Record<string, any>): "
|
|
1
|
+
export declare function getAppRenderer(manifestJson: Record<string, any>): "" | "native";
|
|
2
2
|
export declare function getAppCodeSpliting(manifestJson: Record<string, any>): boolean;
|
|
3
3
|
export declare function getAppStyleIsolation(manifestJson: Record<string, any>): 'apply-shared' | 'isolated' | 'shared';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare function normalizeAppManifestJson(userManifestJson: Record<string, any>, pagesJson: UniApp.PagesJson): Record<string, any>;
|
|
2
2
|
export * from './env';
|
|
3
|
+
export { APP_CONFUSION_FILENAME, isConfusionFile, hasConfusionFile, } from './confusion';
|
|
3
4
|
export { getNVueCompiler, getNVueStyleCompiler, getNVueFlexDirection, } from './nvue';
|
|
@@ -10,7 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.getNVueFlexDirection = exports.getNVueStyleCompiler = exports.getNVueCompiler = exports.normalizeAppManifestJson = void 0;
|
|
13
|
+
exports.getNVueFlexDirection = exports.getNVueStyleCompiler = exports.getNVueCompiler = exports.hasConfusionFile = exports.isConfusionFile = exports.APP_CONFUSION_FILENAME = exports.normalizeAppManifestJson = void 0;
|
|
14
14
|
const merge_1 = require("./merge");
|
|
15
15
|
const defaultManifestJson_1 = require("./defaultManifestJson");
|
|
16
16
|
const statusbar_1 = require("./statusbar");
|
|
@@ -39,6 +39,10 @@ function normalizeAppManifestJson(userManifestJson, pagesJson) {
|
|
|
39
39
|
}
|
|
40
40
|
exports.normalizeAppManifestJson = normalizeAppManifestJson;
|
|
41
41
|
__exportStar(require("./env"), exports);
|
|
42
|
+
var confusion_2 = require("./confusion");
|
|
43
|
+
Object.defineProperty(exports, "APP_CONFUSION_FILENAME", { enumerable: true, get: function () { return confusion_2.APP_CONFUSION_FILENAME; } });
|
|
44
|
+
Object.defineProperty(exports, "isConfusionFile", { enumerable: true, get: function () { return confusion_2.isConfusionFile; } });
|
|
45
|
+
Object.defineProperty(exports, "hasConfusionFile", { enumerable: true, get: function () { return confusion_2.hasConfusionFile; } });
|
|
42
46
|
var nvue_2 = require("./nvue");
|
|
43
47
|
Object.defineProperty(exports, "getNVueCompiler", { enumerable: true, get: function () { return nvue_2.getNVueCompiler; } });
|
|
44
48
|
Object.defineProperty(exports, "getNVueStyleCompiler", { enumerable: true, get: function () { return nvue_2.getNVueStyleCompiler; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function initNVue(manifestJson: Record<string, any>, pagesJson: UniApp.PagesJson): void;
|
|
2
|
-
export declare function getNVueCompiler(manifestJson: Record<string, any>): "
|
|
3
|
-
export declare function getNVueStyleCompiler(manifestJson: Record<string, any>): "
|
|
4
|
-
export declare function getNVueFlexDirection(manifestJson: Record<string, any>): "
|
|
2
|
+
export declare function getNVueCompiler(manifestJson: Record<string, any>): "uni-app" | "weex" | "vue";
|
|
3
|
+
export declare function getNVueStyleCompiler(manifestJson: Record<string, any>): "uni-app" | "weex";
|
|
4
|
+
export declare function getNVueFlexDirection(manifestJson: Record<string, any>): "row" | "row-reverse" | "column" | "column-reverse";
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
3
|
exports.normalizeAppConfigService = exports.normalizeAppPagesJson = void 0;
|
|
14
4
|
const code_1 = require("./code");
|
|
15
5
|
const definePage_1 = require("./definePage");
|
|
16
6
|
const uniConfig_1 = require("./uniConfig");
|
|
17
7
|
const uniRoutes_1 = require("./uniRoutes");
|
|
18
|
-
__exportStar(require("./nvue"), exports);
|
|
19
8
|
function normalizeAppPagesJson(pagesJson) {
|
|
20
9
|
return code_1.polyfillCode + code_1.restoreGlobalCode + (0, definePage_1.definePageCode)(pagesJson);
|
|
21
10
|
}
|
package/dist/json/manifest.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const parseManifestJson: (inputDir: string) => any;
|
|
2
2
|
export declare const parseManifestJsonOnce: (inputDir: string) => any;
|
|
3
|
-
export declare const parseRpx2UnitOnce: (inputDir: string) => any;
|
|
3
|
+
export declare const parseRpx2UnitOnce: (inputDir: string, platform?: UniApp.PLATFORM) => any;
|
|
4
4
|
interface CompilerCompatConfig {
|
|
5
5
|
MODE?: 2 | 3;
|
|
6
6
|
}
|
package/dist/json/manifest.js
CHANGED
|
@@ -14,9 +14,15 @@ const parseManifestJson = (inputDir) => {
|
|
|
14
14
|
};
|
|
15
15
|
exports.parseManifestJson = parseManifestJson;
|
|
16
16
|
exports.parseManifestJsonOnce = (0, uni_shared_1.once)(exports.parseManifestJson);
|
|
17
|
-
exports.parseRpx2UnitOnce = (0, uni_shared_1.once)((inputDir) => {
|
|
18
|
-
const
|
|
19
|
-
|
|
17
|
+
exports.parseRpx2UnitOnce = (0, uni_shared_1.once)((inputDir, platform = 'h5') => {
|
|
18
|
+
const rpx2unit = platform === 'h5' || platform === 'app'
|
|
19
|
+
? uni_shared_1.defaultRpx2Unit
|
|
20
|
+
: uni_shared_1.defaultMiniProgramRpx2Unit;
|
|
21
|
+
const platformOptions = (0, exports.parseManifestJsonOnce)(inputDir)[platform];
|
|
22
|
+
if (platformOptions && platformOptions.rpx) {
|
|
23
|
+
return (0, shared_1.extend)({}, rpx2unit, platformOptions);
|
|
24
|
+
}
|
|
25
|
+
return (0, shared_1.extend)({}, rpx2unit);
|
|
20
26
|
});
|
|
21
27
|
function parseCompatConfig(_inputDir) {
|
|
22
28
|
// 不支持 mode:2
|
package/dist/json/mp/index.d.ts
CHANGED
package/dist/json/mp/index.js
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
13
|
exports.parseMiniProgramProjectJson = exports.parseMiniProgramPagesJson = void 0;
|
|
14
|
+
__exportStar(require("./jsonFile"), exports);
|
|
4
15
|
var pages_1 = require("./pages");
|
|
5
16
|
Object.defineProperty(exports, "parseMiniProgramPagesJson", { enumerable: true, get: function () { return pages_1.parseMiniProgramPagesJson; } });
|
|
6
17
|
var project_1 = require("./project");
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ComponentJson, PageWindowOptions, UsingComponents } from './types';
|
|
2
|
-
export declare
|
|
3
|
-
export declare
|
|
4
|
-
export declare
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
2
|
+
export declare function isPageFile(file: string): boolean;
|
|
3
|
+
export declare function hasJsonFile(filename: string): boolean;
|
|
4
|
+
export declare function normalizeJsonFilename(filename: string): string;
|
|
5
|
+
export declare function findChangedJsonFiles(): Map<string, string>;
|
|
6
|
+
export declare function addMiniProgramAppJson(appJson: Record<string, any>): void;
|
|
7
|
+
export declare function addMiniProgramPageJson(filename: string, json: PageWindowOptions): void;
|
|
8
|
+
export declare function addMiniProgramComponentJson(filename: string, json: ComponentJson): void;
|
|
9
|
+
export declare function addMiniProgramUsingComponents(filename: string, json: UsingComponents): void;
|