@cocos/ccbuild 1.1.14 → 2.0.0-alpha.0
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/CHANGELOG.md +153 -165
- package/lib/src/index.d.ts +4 -0
- package/lib/src/index.d.ts.map +1 -0
- package/lib/src/index.js +59 -0
- package/lib/src/index.js.map +1 -0
- package/{lib/build-engine → modules/build-engine/lib}/engine-js/index.d.ts +2 -3
- package/modules/build-engine/lib/engine-js/index.d.ts.map +1 -0
- package/modules/build-engine/lib/engine-js/index.js +398 -0
- package/modules/build-engine/lib/engine-js/index.js.map +1 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/external-wasm-loader.d.ts +53 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/external-wasm-loader.d.ts.map +1 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/external-wasm-loader.js +202 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/external-wasm-loader.js.map +1 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/remove-deprecated-features.d.ts +3 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/remove-deprecated-features.d.ts.map +1 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/remove-deprecated-features.js +42 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/remove-deprecated-features.js.map +1 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/ts-paths.d.ts +7 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/ts-paths.d.ts.map +1 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/ts-paths.js +51 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/ts-paths.js.map +1 -0
- package/modules/build-engine/lib/engine-ts/engine-builder.d.ts +57 -0
- package/modules/build-engine/lib/engine-ts/engine-builder.d.ts.map +1 -0
- package/modules/build-engine/lib/engine-ts/engine-builder.js +650 -0
- package/modules/build-engine/lib/engine-ts/engine-builder.js.map +1 -0
- package/modules/build-engine/lib/engine-ts/field-decorator-helper.d.ts +11 -0
- package/modules/build-engine/lib/engine-ts/field-decorator-helper.d.ts.map +1 -0
- package/modules/build-engine/lib/engine-ts/field-decorator-helper.js +65 -0
- package/modules/build-engine/lib/engine-ts/field-decorator-helper.js.map +1 -0
- package/{lib/build-engine → modules/build-engine/lib}/engine-ts/index.d.ts +2 -3
- package/modules/build-engine/lib/engine-ts/index.d.ts.map +1 -0
- package/modules/build-engine/lib/engine-ts/index.js +59 -0
- package/modules/build-engine/lib/engine-ts/index.js.map +1 -0
- package/{lib/build-engine → modules/build-engine/lib}/engine-ts/plugins/external-wasm-loader.d.ts +7 -7
- package/modules/build-engine/lib/engine-ts/plugins/external-wasm-loader.d.ts.map +1 -0
- package/modules/build-engine/lib/engine-ts/plugins/external-wasm-loader.js +74 -0
- package/modules/build-engine/lib/engine-ts/plugins/external-wasm-loader.js.map +1 -0
- package/modules/build-engine/lib/engine-ts/plugins/interface.d.ts +20 -0
- package/modules/build-engine/lib/engine-ts/plugins/interface.d.ts.map +1 -0
- package/modules/build-engine/lib/engine-ts/plugins/interface.js +5 -0
- package/modules/build-engine/lib/engine-ts/plugins/interface.js.map +1 -0
- package/modules/build-engine/lib/index.d.ts +145 -0
- package/modules/build-engine/lib/index.d.ts.map +1 -0
- package/modules/build-engine/lib/index.js +180 -0
- package/modules/build-engine/lib/index.js.map +1 -0
- package/modules/bundler/lib/index.d.ts +2 -0
- package/modules/bundler/lib/index.d.ts.map +1 -0
- package/modules/bundler/lib/index.js +39 -0
- package/{lib → modules/bundler/lib}/index.js.map +1 -1
- package/modules/bundler/lib/rollup/index.d.ts +3 -0
- package/modules/bundler/lib/rollup/index.d.ts.map +1 -0
- package/modules/bundler/lib/rollup/index.js +41 -0
- package/modules/bundler/lib/rollup/index.js.map +1 -0
- package/modules/bundler/lib/rollup/plugins.d.ts +8 -0
- package/modules/bundler/lib/rollup/plugins.d.ts.map +1 -0
- package/modules/bundler/lib/rollup/plugins.js +56 -0
- package/modules/bundler/lib/rollup/plugins.js.map +1 -0
- package/modules/modularize/lib/cli.d.ts +1 -0
- package/modules/modularize/lib/cli.d.ts.map +1 -0
- package/modules/modularize/lib/cli.js +47 -0
- package/modules/modularize/lib/cli.js.map +1 -0
- package/modules/modularize/lib/deploy.d.ts +1 -0
- package/modules/modularize/lib/deploy.d.ts.map +1 -0
- package/modules/modularize/lib/deploy.js +92 -0
- package/modules/modularize/lib/deploy.js.map +1 -0
- package/modules/modularize/lib/index.d.ts +20 -0
- package/modules/modularize/lib/index.d.ts.map +1 -0
- package/modules/modularize/lib/index.js +82 -0
- package/modules/modularize/lib/index.js.map +1 -0
- package/modules/stats-query/lib/config-interface.d.ts +129 -0
- package/modules/stats-query/lib/config-interface.d.ts.map +1 -0
- package/modules/stats-query/lib/config-interface.js +6 -0
- package/modules/stats-query/lib/config-interface.js.map +1 -0
- package/modules/stats-query/lib/index.d.ts +183 -0
- package/modules/stats-query/lib/index.d.ts.map +1 -0
- package/modules/stats-query/lib/index.js +579 -0
- package/modules/stats-query/lib/index.js.map +1 -0
- package/modules/transformer/lib/babel/index.d.ts +6 -0
- package/modules/transformer/lib/babel/index.d.ts.map +1 -0
- package/modules/transformer/lib/babel/index.js +47 -0
- package/modules/transformer/lib/babel/index.js.map +1 -0
- package/modules/transformer/lib/babel/plugins.d.ts +5 -0
- package/modules/transformer/lib/babel/plugins.d.ts.map +1 -0
- package/modules/transformer/lib/babel/plugins.js +22 -0
- package/modules/transformer/lib/babel/plugins.js.map +1 -0
- package/modules/transformer/lib/babel/presets.d.ts +3 -0
- package/modules/transformer/lib/babel/presets.d.ts.map +1 -0
- package/modules/transformer/lib/babel/presets.js +41 -0
- package/modules/transformer/lib/babel/presets.js.map +1 -0
- package/modules/transformer/lib/index.d.ts +2 -0
- package/modules/transformer/lib/index.d.ts.map +1 -0
- package/modules/transformer/lib/index.js +39 -0
- package/modules/transformer/lib/index.js.map +1 -0
- package/modules/utils/lib/index.d.ts +3 -0
- package/modules/utils/lib/index.d.ts.map +1 -0
- package/modules/utils/lib/index.js +38 -0
- package/modules/utils/lib/index.js.map +1 -0
- package/modules/utils/lib/path.d.ts +7 -0
- package/modules/utils/lib/path.d.ts.map +1 -0
- package/modules/utils/lib/path.js +105 -0
- package/modules/utils/lib/path.js.map +1 -0
- package/package.json +65 -75
- package/static/lib.dom.d.ts +953 -18846
- package/lib/api-builder.d.ts +0 -1
- package/lib/api-builder.d.ts.map +0 -1
- package/lib/api-builder.js +0 -2
- package/lib/api-builder.js.map +0 -1
- package/lib/build-engine/engine-js/index.d.ts.map +0 -1
- package/lib/build-engine/engine-js/index.js +0 -404
- package/lib/build-engine/engine-js/index.js.map +0 -1
- package/lib/build-engine/engine-js/rollup-plugins/external-wasm-loader.d.ts +0 -58
- package/lib/build-engine/engine-js/rollup-plugins/external-wasm-loader.d.ts.map +0 -1
- package/lib/build-engine/engine-js/rollup-plugins/external-wasm-loader.js +0 -299
- package/lib/build-engine/engine-js/rollup-plugins/external-wasm-loader.js.map +0 -1
- package/lib/build-engine/engine-js/rollup-plugins/remove-deprecated-features.d.ts +0 -3
- package/lib/build-engine/engine-js/rollup-plugins/remove-deprecated-features.d.ts.map +0 -1
- package/lib/build-engine/engine-js/rollup-plugins/remove-deprecated-features.js +0 -38
- package/lib/build-engine/engine-js/rollup-plugins/remove-deprecated-features.js.map +0 -1
- package/lib/build-engine/engine-js/rollup-plugins/ts-paths.d.ts +0 -5
- package/lib/build-engine/engine-js/rollup-plugins/ts-paths.d.ts.map +0 -1
- package/lib/build-engine/engine-js/rollup-plugins/ts-paths.js +0 -43
- package/lib/build-engine/engine-js/rollup-plugins/ts-paths.js.map +0 -1
- package/lib/build-engine/engine-ts/engine-builder.d.ts +0 -58
- package/lib/build-engine/engine-ts/engine-builder.d.ts.map +0 -1
- package/lib/build-engine/engine-ts/engine-builder.js +0 -632
- package/lib/build-engine/engine-ts/engine-builder.js.map +0 -1
- package/lib/build-engine/engine-ts/field-decorator-helper.d.ts +0 -10
- package/lib/build-engine/engine-ts/field-decorator-helper.d.ts.map +0 -1
- package/lib/build-engine/engine-ts/field-decorator-helper.js +0 -55
- package/lib/build-engine/engine-ts/field-decorator-helper.js.map +0 -1
- package/lib/build-engine/engine-ts/index.d.ts.map +0 -1
- package/lib/build-engine/engine-ts/index.js +0 -37
- package/lib/build-engine/engine-ts/index.js.map +0 -1
- package/lib/build-engine/engine-ts/plugins/external-wasm-loader.d.ts.map +0 -1
- package/lib/build-engine/engine-ts/plugins/external-wasm-loader.js +0 -66
- package/lib/build-engine/engine-ts/plugins/external-wasm-loader.js.map +0 -1
- package/lib/build-engine/engine-ts/plugins/interface.d.ts +0 -21
- package/lib/build-engine/engine-ts/plugins/interface.d.ts.map +0 -1
- package/lib/build-engine/engine-ts/plugins/interface.js +0 -2
- package/lib/build-engine/engine-ts/plugins/interface.js.map +0 -1
- package/lib/build-engine/index.d.ts +0 -146
- package/lib/build-engine/index.d.ts.map +0 -1
- package/lib/build-engine/index.js +0 -155
- package/lib/build-engine/index.js.map +0 -1
- package/lib/index.d.ts +0 -5
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -34
- package/lib/module-resolver.d.ts +0 -8
- package/lib/module-resolver.d.ts.map +0 -1
- package/lib/module-resolver.js +0 -29
- package/lib/module-resolver.js.map +0 -1
- package/lib/stats-query/config-interface.d.ts +0 -130
- package/lib/stats-query/config-interface.d.ts.map +0 -1
- package/lib/stats-query/config-interface.js +0 -4
- package/lib/stats-query/config-interface.js.map +0 -1
- package/lib/stats-query/index.d.ts +0 -184
- package/lib/stats-query/index.d.ts.map +0 -1
- package/lib/stats-query/index.js +0 -532
- package/lib/stats-query/index.js.map +0 -1
- package/lib/stats-query/path-utils.d.ts +0 -3
- package/lib/stats-query/path-utils.d.ts.map +0 -1
- package/lib/stats-query/path-utils.js +0 -36
- package/lib/stats-query/path-utils.js.map +0 -1
- package/lib/transformer/babel.d.ts +0 -6
- package/lib/transformer/babel.d.ts.map +0 -1
- package/lib/transformer/babel.js +0 -35
- package/lib/transformer/babel.js.map +0 -1
- package/lib/transformer/index.d.ts +0 -3
- package/lib/transformer/index.d.ts.map +0 -1
- package/lib/transformer/index.js +0 -29
- package/lib/transformer/index.js.map +0 -1
- package/lib/utils.d.ts +0 -5
- package/lib/utils.d.ts.map +0 -1
- package/lib/utils.js +0 -24
- package/lib/utils.js.map +0 -1
package/lib/module-resolver.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-resolver.d.ts","sourceRoot":"","sources":["../src/module-resolver.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,EAAE,CAAC;CAClB;AAID,qBAAa,cAAc;IAEvB,OAAO,CAAE,QAAQ,EAAE,MAAM,GAAG,cAAc;CAgB7C"}
|
package/lib/module-resolver.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
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.ModuleResolver = void 0;
|
|
7
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const importRegExp = /[(import)(export)].*?['"](.*?)['"]/g;
|
|
10
|
-
class ModuleResolver {
|
|
11
|
-
resolve(filepath) {
|
|
12
|
-
const code = fs_extra_1.default.readFileSync(filepath, 'utf8');
|
|
13
|
-
const all = code.matchAll(importRegExp);
|
|
14
|
-
const deps = [];
|
|
15
|
-
for (let item of all) {
|
|
16
|
-
let dep = item[1];
|
|
17
|
-
if (!path_1.default.isAbsolute(dep)) {
|
|
18
|
-
dep = path_1.default.join(path_1.default.dirname(filepath), dep);
|
|
19
|
-
}
|
|
20
|
-
deps.push(dep + '.ts');
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
id: filepath,
|
|
24
|
-
deps,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.ModuleResolver = ModuleResolver;
|
|
29
|
-
//# sourceMappingURL=module-resolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-resolver.js","sourceRoot":"","sources":["../src/module-resolver.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAC1B,gDAAsB;AAOtB,MAAM,YAAY,GAAG,qCAAqC,CAAC;AAE3D,MAAa,cAAc;IAEvB,OAAO,CAAE,QAAgB;QACrB,MAAM,IAAI,GAAG,kBAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC/C,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QACxC,MAAM,IAAI,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,IAAI,IAAI,GAAG,EAAG;YACnB,IAAI,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,IAAI,CAAC,cAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;gBACrB,GAAG,GAAG,cAAE,CAAC,IAAI,CAAC,cAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC;aAC5C;YACD,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC;SAC1B;QACD,OAAO;YACH,EAAE,EAAE,QAAQ;YACZ,IAAI;SACP,CAAC;IACN,CAAC;CACJ;AAlBD,wCAkBC"}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
export interface Config {
|
|
2
|
-
/**
|
|
3
|
-
* Engine features. Keys are feature IDs.
|
|
4
|
-
*/
|
|
5
|
-
features: Record<string, Feature>;
|
|
6
|
-
/**
|
|
7
|
-
* Describe how to generate the index module `'cc'`.
|
|
8
|
-
* Currently not used.
|
|
9
|
-
*/
|
|
10
|
-
index?: IndexConfig;
|
|
11
|
-
moduleOverrides?: Array<{
|
|
12
|
-
test: Test;
|
|
13
|
-
overrides: Record<string, string>;
|
|
14
|
-
isVirtualModule: boolean;
|
|
15
|
-
}>;
|
|
16
|
-
/**
|
|
17
|
-
* Included files for quick-compiler.
|
|
18
|
-
*/
|
|
19
|
-
includes: Array<string>;
|
|
20
|
-
/**
|
|
21
|
-
* The constants config for engine and user.
|
|
22
|
-
*/
|
|
23
|
-
constants: IConstantConfig;
|
|
24
|
-
/**
|
|
25
|
-
* The decorators to be optimize when build engine.
|
|
26
|
-
*/
|
|
27
|
-
optimizeDecorators: IOptimizeDecorators;
|
|
28
|
-
}
|
|
29
|
-
export interface IndexConfig {
|
|
30
|
-
modules?: Record<string, {
|
|
31
|
-
/**
|
|
32
|
-
* If specified, export contents of the module into a namespace specified by `ns`
|
|
33
|
-
* and then export that namespace into `'cc'`.
|
|
34
|
-
* If not specified, contents of the module will be directly exported into `'cc'`.
|
|
35
|
-
*/
|
|
36
|
-
ns?: string;
|
|
37
|
-
/**
|
|
38
|
-
* If `true`, accesses the exports of this module from `'cc'` will be marked as deprecated.
|
|
39
|
-
*/
|
|
40
|
-
deprecated?: boolean;
|
|
41
|
-
}>;
|
|
42
|
-
}
|
|
43
|
-
export type Test = string;
|
|
44
|
-
/**
|
|
45
|
-
* An engine feature.
|
|
46
|
-
*/
|
|
47
|
-
export interface Feature {
|
|
48
|
-
/**
|
|
49
|
-
* Modules to be included in this feature in their IDs.
|
|
50
|
-
* The ID of a module is its relative path(no extension) under /exports/.
|
|
51
|
-
*/
|
|
52
|
-
modules: string[];
|
|
53
|
-
/**
|
|
54
|
-
* Flags to set when this feature is enabled.
|
|
55
|
-
*/
|
|
56
|
-
intrinsicFlags?: Record<string, unknown>;
|
|
57
|
-
/**
|
|
58
|
-
* List of uuid that the feature depend on.
|
|
59
|
-
*/
|
|
60
|
-
dependentAssets?: string[];
|
|
61
|
-
/**
|
|
62
|
-
* List of module that the feature depend on.
|
|
63
|
-
*/
|
|
64
|
-
dependentModules?: string[];
|
|
65
|
-
/**
|
|
66
|
-
* Whether it is a native only feature, default is false.
|
|
67
|
-
* @default false
|
|
68
|
-
*/
|
|
69
|
-
isNativeOnly?: boolean;
|
|
70
|
-
}
|
|
71
|
-
export interface Context {
|
|
72
|
-
mode?: string;
|
|
73
|
-
platform?: string;
|
|
74
|
-
buildTimeConstants?: Object;
|
|
75
|
-
}
|
|
76
|
-
export type ConstantTypeName = 'boolean' | 'number';
|
|
77
|
-
export interface IConstantInfo {
|
|
78
|
-
/**
|
|
79
|
-
* The comment of the constant.
|
|
80
|
-
* Which is used to generate the consts.d.ts file.
|
|
81
|
-
*/
|
|
82
|
-
readonly comment: string;
|
|
83
|
-
/**
|
|
84
|
-
* The type of the constant for generating consts.d.ts file.
|
|
85
|
-
*/
|
|
86
|
-
readonly type: ConstantTypeName;
|
|
87
|
-
/**
|
|
88
|
-
* The default value of the constant.
|
|
89
|
-
* It can be a boolean, number or string.
|
|
90
|
-
* When it's a string type, the value is the result of eval().
|
|
91
|
-
*/
|
|
92
|
-
value: boolean | string | number;
|
|
93
|
-
/**
|
|
94
|
-
* Whether exported to global as a `CC_XXXX` constant.
|
|
95
|
-
* eg. WECHAT is exported to global.CC_WECHAT
|
|
96
|
-
* NOTE: this is a feature of compatibility with Cocos 2.x engine.
|
|
97
|
-
* Default is false.
|
|
98
|
-
*
|
|
99
|
-
* @default false
|
|
100
|
-
*/
|
|
101
|
-
ccGlobal?: boolean;
|
|
102
|
-
/**
|
|
103
|
-
* Whether exported to developer.
|
|
104
|
-
* If true, it's only exported to engine.
|
|
105
|
-
*/
|
|
106
|
-
readonly internal: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* Some constant can't specify the value in the Editor, Preview or Test environment,
|
|
109
|
-
* so we need to dynamically judge them in runtime.
|
|
110
|
-
* These values are specified in a helper called `helper-dynamic-constants.ts`.
|
|
111
|
-
* Default is false.
|
|
112
|
-
*
|
|
113
|
-
* @default false
|
|
114
|
-
*/
|
|
115
|
-
dynamic?: boolean;
|
|
116
|
-
}
|
|
117
|
-
export interface IConstantConfig {
|
|
118
|
-
[ConstantName: string]: IConstantInfo;
|
|
119
|
-
}
|
|
120
|
-
export interface IOptimizeDecorators {
|
|
121
|
-
/**
|
|
122
|
-
* The decorators which should be optimized when they only decorate class fields.
|
|
123
|
-
*/
|
|
124
|
-
fieldDecorators: string[];
|
|
125
|
-
/**
|
|
126
|
-
* The decorators which should be removed directly when they only work in Cocos Creator editor.
|
|
127
|
-
*/
|
|
128
|
-
editorDecorators: string[];
|
|
129
|
-
}
|
|
130
|
-
//# sourceMappingURL=config-interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-interface.d.ts","sourceRoot":"","sources":["../../src/stats-query/config-interface.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,MAAM;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAElC;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB,eAAe,CAAC,EAAE,KAAK,CAAC;QACpB,IAAI,EAAE,IAAI,CAAC;QACX,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,eAAe,EAAE,OAAO,CAAC;KAC5B,CAAC,CAAC;IAEH;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB;;OAEG;IACH,SAAS,EAAE,eAAe,CAAC;IAE3B;;OAEG;IACH,kBAAkB,EAAE,mBAAmB,CAAC;CAC3C;AAED,MAAM,WAAW,WAAW;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QACrB;;;;WAIG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;KACxB,CAAC,CAAC;CACN;AAED,MAAM,MAAM,IAAI,GAAG,MAA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"names":[],"mappings":";AAAA,2DAA2D"}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { Context } from './config-interface';
|
|
2
|
-
import * as ConfigInterface from './config-interface';
|
|
3
|
-
export { ConfigInterface };
|
|
4
|
-
/**
|
|
5
|
-
* Query any any stats of the engine.
|
|
6
|
-
*/
|
|
7
|
-
export declare class StatsQuery {
|
|
8
|
-
/**
|
|
9
|
-
* @param engine Path to the engine root.
|
|
10
|
-
*/
|
|
11
|
-
static create(engine: string): Promise<StatsQuery>;
|
|
12
|
-
/**
|
|
13
|
-
* Constant manager for engine and user.
|
|
14
|
-
*/
|
|
15
|
-
constantManager: StatsQuery.ConstantManager;
|
|
16
|
-
/**
|
|
17
|
-
* Gets the path to the engine root.
|
|
18
|
-
*/
|
|
19
|
-
get path(): string;
|
|
20
|
-
/**
|
|
21
|
-
* Gets the path to tsconfig.
|
|
22
|
-
*/
|
|
23
|
-
get tsConfigPath(): string;
|
|
24
|
-
/**
|
|
25
|
-
* Gets all optimzie decorators
|
|
26
|
-
*/
|
|
27
|
-
getOptimizeDecorators(): ConfigInterface.IOptimizeDecorators;
|
|
28
|
-
/**
|
|
29
|
-
* Gets all features defined.
|
|
30
|
-
*/
|
|
31
|
-
getFeatures(): string[];
|
|
32
|
-
/**
|
|
33
|
-
* Returns if the specified feature is defined.
|
|
34
|
-
* @param feature Feature ID.
|
|
35
|
-
*/
|
|
36
|
-
hasFeature(feature: string): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Gets all feature units included in specified features.
|
|
39
|
-
* @param featureIds Feature ID.
|
|
40
|
-
*/
|
|
41
|
-
getUnitsOfFeatures(featureIds: string[]): string[];
|
|
42
|
-
getIntrinsicFlagsOfFeatures(featureIds: string[]): Record<string, string | number | boolean>;
|
|
43
|
-
/**
|
|
44
|
-
* Gets all feature units in their names.
|
|
45
|
-
*/
|
|
46
|
-
getFeatureUnits(): string[];
|
|
47
|
-
/**
|
|
48
|
-
* Gets the path to source file of the feature unit.
|
|
49
|
-
* @param moduleId Name of the feature unit.
|
|
50
|
-
*/
|
|
51
|
-
getFeatureUnitFile(featureUnit: string): string;
|
|
52
|
-
/**
|
|
53
|
-
* Gets all editor public modules in their names.
|
|
54
|
-
*/
|
|
55
|
-
getEditorPublicModules(): string[];
|
|
56
|
-
/**
|
|
57
|
-
* Gets the path to source file of the editor-public module.
|
|
58
|
-
* @param moduleName Name of the public module.
|
|
59
|
-
*/
|
|
60
|
-
getEditorPublicModuleFile(moduleName: string): string;
|
|
61
|
-
/**
|
|
62
|
-
* Gets the source of `'cc'`.
|
|
63
|
-
* @param featureUnits Involved feature units.
|
|
64
|
-
* @param mapper If exists, map the feature unit name into another module request.
|
|
65
|
-
*/
|
|
66
|
-
evaluateIndexModuleSource(featureUnits: string[], mapper?: (featureUnit: string) => string): string;
|
|
67
|
-
/**
|
|
68
|
-
* Evaluates the source of `'internal-constants'`(`'cc/env'`),
|
|
69
|
-
* @param context
|
|
70
|
-
*/
|
|
71
|
-
evaluateEnvModuleSourceFromRecord(record: Record<string, unknown>): string;
|
|
72
|
-
/**
|
|
73
|
-
* Evaluates module overrides under specified context.
|
|
74
|
-
* @param context
|
|
75
|
-
*/
|
|
76
|
-
evaluateModuleOverrides(context: Context): Record<string, string>;
|
|
77
|
-
private static _readModulesInDir;
|
|
78
|
-
private static _baseNameToFeatureUnitName;
|
|
79
|
-
private static _editorBaseNameToModuleName;
|
|
80
|
-
private constructor();
|
|
81
|
-
private _evalTest;
|
|
82
|
-
private _evalPathTemplate;
|
|
83
|
-
private _initialize;
|
|
84
|
-
private _engine;
|
|
85
|
-
private _index;
|
|
86
|
-
private _features;
|
|
87
|
-
private _config;
|
|
88
|
-
private _featureUnits;
|
|
89
|
-
private _editorPublicModules;
|
|
90
|
-
}
|
|
91
|
-
export declare namespace StatsQuery {
|
|
92
|
-
namespace ConstantManager {
|
|
93
|
-
interface IPlatformConfig {
|
|
94
|
-
HTML5: boolean;
|
|
95
|
-
NATIVE: boolean;
|
|
96
|
-
WECHAT: boolean;
|
|
97
|
-
BAIDU: boolean;
|
|
98
|
-
XIAOMI: boolean;
|
|
99
|
-
ALIPAY: boolean;
|
|
100
|
-
BYTEDANCE: boolean;
|
|
101
|
-
OPPO: boolean;
|
|
102
|
-
VIVO: boolean;
|
|
103
|
-
HUAWEI: boolean;
|
|
104
|
-
COCOSPLAY: boolean;
|
|
105
|
-
QTT: boolean;
|
|
106
|
-
LINKSURE: boolean;
|
|
107
|
-
OPEN_HARMONY: boolean;
|
|
108
|
-
TAOBAO_MINIGAME: boolean;
|
|
109
|
-
}
|
|
110
|
-
interface IInternalFlagConfig {
|
|
111
|
-
SERVER_MODE: boolean;
|
|
112
|
-
NOT_PACK_PHYSX_LIBS: boolean;
|
|
113
|
-
WEBGPU: boolean;
|
|
114
|
-
WASM_SUPPORT_MODE: number;
|
|
115
|
-
FORCE_BANNING_BULLET_WASM: boolean;
|
|
116
|
-
/**
|
|
117
|
-
* Whether cull the asm.js module.
|
|
118
|
-
* If this is true, the external modules ending with '.asm.js' or 'js.mem' will be culled.
|
|
119
|
-
*
|
|
120
|
-
* @default false
|
|
121
|
-
*/
|
|
122
|
-
CULL_ASM_JS_MODULE: boolean;
|
|
123
|
-
/**
|
|
124
|
-
* An internal constant to indicate whether need a fallback of wasm.
|
|
125
|
-
* If true, we build a wasm fallback module for the compatibility of wasm files compiled by different version of emscripten.
|
|
126
|
-
* This is useful when we use wasm on different version of Safari browsers.
|
|
127
|
-
*
|
|
128
|
-
* @default false
|
|
129
|
-
*/
|
|
130
|
-
WASM_FALLBACK: boolean;
|
|
131
|
-
/**
|
|
132
|
-
* An internal constant to indicate whether we use wasm assets as minigame subpackage.
|
|
133
|
-
* This is useful when we need to reduce code size.
|
|
134
|
-
*/
|
|
135
|
-
WASM_SUBPACKAGE: boolean;
|
|
136
|
-
}
|
|
137
|
-
interface IPublicFlagConfig {
|
|
138
|
-
DEBUG: boolean;
|
|
139
|
-
NET_MODE: number;
|
|
140
|
-
}
|
|
141
|
-
interface IFlagConfig extends IInternalFlagConfig, IPublicFlagConfig {
|
|
142
|
-
}
|
|
143
|
-
interface IModeConfig {
|
|
144
|
-
EDITOR: boolean;
|
|
145
|
-
PREVIEW: boolean;
|
|
146
|
-
BUILD: boolean;
|
|
147
|
-
TEST: boolean;
|
|
148
|
-
}
|
|
149
|
-
interface IConstantOptions {
|
|
150
|
-
platform: PlatformType;
|
|
151
|
-
flagConfig: IFlagConfig;
|
|
152
|
-
}
|
|
153
|
-
type PlatformType = keyof IPlatformConfig | string;
|
|
154
|
-
type ModeType = keyof IModeConfig;
|
|
155
|
-
type FlagType = keyof IFlagConfig;
|
|
156
|
-
interface BuildTimeConstants extends IPlatformConfig, IFlagConfig, IModeConfig {
|
|
157
|
-
}
|
|
158
|
-
interface CCEnvConstants extends IPlatformConfig, IPublicFlagConfig, IModeConfig {
|
|
159
|
-
}
|
|
160
|
-
type ValueType = boolean | number;
|
|
161
|
-
interface ConstantOptions {
|
|
162
|
-
mode: ModeType;
|
|
163
|
-
platform: PlatformType;
|
|
164
|
-
flags: Partial<Record<FlagType, ValueType>>;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
class ConstantManager {
|
|
168
|
-
private _engineRoot;
|
|
169
|
-
constructor(engineRoot: string);
|
|
170
|
-
exportDynamicConstants({ mode, platform, flags, }: ConstantManager.ConstantOptions): string;
|
|
171
|
-
genBuildTimeConstants(options: ConstantManager.ConstantOptions): ConstantManager.BuildTimeConstants;
|
|
172
|
-
genCCEnvConstants(options: ConstantManager.ConstantOptions): ConstantManager.CCEnvConstants;
|
|
173
|
-
exportStaticConstants({ mode, platform, flags, }: ConstantManager.ConstantOptions): string;
|
|
174
|
-
genInternalConstants(): string;
|
|
175
|
-
genCCEnv(): string;
|
|
176
|
-
private _genConstantDeclaration;
|
|
177
|
-
private _getConfig;
|
|
178
|
-
private _hasCCGlobal;
|
|
179
|
-
private _hasDynamic;
|
|
180
|
-
private _evalExpression;
|
|
181
|
-
private _applyOptionsToConfig;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stats-query/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAU,OAAO,EAA8D,MAAM,oBAAoB,CAAC;AAEjH,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B;;GAEG;AACH,qBAAa,UAAU;IACnB;;OAEG;WACiB,MAAM,CAAE,MAAM,EAAE,MAAM;IAU1C;;OAEG;IACI,eAAe,EAAE,UAAU,CAAC,eAAe,CAAC;IAEnD;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,YAAY,WAEf;IAED;;OAEG;IACI,qBAAqB;IAI5B;;OAEG;IACI,WAAW;IAIlB;;;OAGG;IACI,UAAU,CAAE,OAAO,EAAE,MAAM;IASlC;;;OAGG;IACI,kBAAkB,CAAE,UAAU,EAAE,MAAM,EAAE;IAQxC,2BAA2B,CAAE,UAAU,EAAE,MAAM,EAAE;IAWxD;;OAEG;IACI,eAAe;IAItB;;;OAGG;IACI,kBAAkB,CAAE,WAAW,EAAE,MAAM;IAI9C;;OAEG;IACI,sBAAsB;IAI7B;;;OAGG;IACI,yBAAyB,CAAE,UAAU,EAAE,MAAM;IAIpD;;;;OAIG;IACI,yBAAyB,CAAE,YAAY,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM;IAclG;;;OAGG;IACI,iCAAiC,CAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIzE;;;OAGG;IACI,uBAAuB,CAAE,OAAO,EAAE,OAAO;mBAqB3B,iBAAiB;IAetC,OAAO,CAAC,MAAM,CAAC,0BAA0B;IAIzC,OAAO,CAAC,MAAM,CAAC,2BAA2B;I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