@cocos/ccbuild 2.0.3-alpha.1 → 2.0.3-alpha.10
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 +263 -0
- package/README.md +16 -37
- package/lib/src/index.d.ts +5 -1
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +5 -1
- package/lib/src/index.js.map +1 -1
- package/modules/build-engine/lib/build-dts.d.ts +7 -0
- package/modules/build-engine/lib/build-dts.d.ts.map +1 -0
- package/modules/build-engine/lib/build-dts.js +297 -0
- package/modules/build-engine/lib/build-dts.js.map +1 -0
- package/modules/build-engine/lib/engine-js/index.d.ts.map +1 -1
- package/modules/build-engine/lib/engine-js/index.js +11 -2
- package/modules/build-engine/lib/engine-js/index.js.map +1 -1
- package/modules/build-engine/lib/engine-js/rollup-plugins/external-wasm-loader.d.ts +33 -33
- package/modules/build-engine/lib/engine-js/rollup-plugins/external-wasm-loader.d.ts.map +1 -1
- package/modules/build-engine/lib/engine-js/rollup-plugins/external-wasm-loader.js +72 -43
- package/modules/build-engine/lib/engine-js/rollup-plugins/external-wasm-loader.js.map +1 -1
- package/modules/build-engine/lib/engine-js/rollup-plugins/module-query-plugin.d.ts +4 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/module-query-plugin.d.ts.map +1 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/module-query-plugin.js +43 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/module-query-plugin.js.map +1 -0
- package/modules/build-engine/lib/engine-js/rollup-plugins/ts-paths.d.ts.map +1 -1
- package/modules/build-engine/lib/engine-js/rollup-plugins/ts-paths.js +8 -7
- package/modules/build-engine/lib/engine-js/rollup-plugins/ts-paths.js.map +1 -1
- package/modules/build-engine/lib/engine-ts/engine-builder.d.ts +0 -1
- package/modules/build-engine/lib/engine-ts/engine-builder.d.ts.map +1 -1
- package/modules/build-engine/lib/engine-ts/engine-builder.js +28 -47
- package/modules/build-engine/lib/engine-ts/engine-builder.js.map +1 -1
- package/modules/build-engine/lib/engine-ts/plugins/external-wasm-loader.d.ts.map +1 -1
- package/modules/build-engine/lib/engine-ts/plugins/external-wasm-loader.js +20 -3
- package/modules/build-engine/lib/engine-ts/plugins/external-wasm-loader.js.map +1 -1
- package/modules/build-engine/lib/engine-ts/plugins/interface.d.ts +14 -14
- package/modules/build-engine/lib/engine-ts/plugins/module-query-plugin.d.ts +3 -0
- package/modules/build-engine/lib/engine-ts/plugins/module-query-plugin.d.ts.map +1 -0
- package/modules/build-engine/lib/engine-ts/plugins/module-query-plugin.js +52 -0
- package/modules/build-engine/lib/engine-ts/plugins/module-query-plugin.js.map +1 -0
- package/modules/build-engine/lib/index.d.ts +98 -86
- package/modules/build-engine/lib/index.d.ts.map +1 -1
- package/modules/build-engine/lib/index.js +69 -38
- package/modules/build-engine/lib/index.js.map +1 -1
- package/modules/dts-bundler/lib/index.d.ts +5 -0
- package/modules/dts-bundler/lib/index.d.ts.map +1 -0
- package/modules/dts-bundler/lib/index.js +344 -0
- package/modules/dts-bundler/lib/index.js.map +1 -0
- package/modules/modularize/lib/index.d.ts +3 -20
- package/modules/modularize/lib/index.d.ts.map +1 -1
- package/modules/modularize/lib/index.js +20 -75
- package/modules/modularize/lib/index.js.map +1 -1
- package/modules/modularize/lib/module-config.d.ts +134 -0
- package/modules/modularize/lib/module-config.d.ts.map +1 -0
- package/modules/modularize/lib/module-config.js +6 -0
- package/modules/modularize/lib/module-config.js.map +1 -0
- package/modules/modularize/lib/module-config.schema.json +425 -0
- package/modules/modularize/lib/module-query.d.ts +55 -0
- package/modules/modularize/lib/module-query.d.ts.map +1 -0
- package/modules/modularize/lib/module-query.js +207 -0
- package/modules/modularize/lib/module-query.js.map +1 -0
- package/modules/modularize/lib/platform-config.d.ts +43 -0
- package/modules/modularize/lib/platform-config.d.ts.map +1 -0
- package/modules/modularize/lib/platform-config.js +52 -0
- package/modules/modularize/lib/platform-config.js.map +1 -0
- package/modules/stats-query/lib/cc.config.schema.json +216 -0
- package/modules/stats-query/lib/config-interface.d.ts +61 -61
- package/modules/stats-query/lib/config-interface.js +1 -1
- package/modules/stats-query/lib/config-interface.js.map +1 -1
- package/modules/stats-query/lib/index.d.ts +62 -73
- package/modules/stats-query/lib/index.d.ts.map +1 -1
- package/modules/stats-query/lib/index.js +43 -38
- package/modules/stats-query/lib/index.js.map +1 -1
- package/modules/transformer/lib/babel/plugins.d.ts +1 -0
- package/modules/transformer/lib/babel/plugins.d.ts.map +1 -1
- package/modules/transformer/lib/babel/plugins.js +2 -4
- package/modules/transformer/lib/babel/plugins.js.map +1 -1
- package/modules/transformer/lib/index.d.ts +2 -1
- package/modules/transformer/lib/index.d.ts.map +1 -1
- package/modules/transformer/lib/index.js +4 -2
- package/modules/transformer/lib/index.js.map +1 -1
- package/modules/transformer/lib/typescript/index.d.ts +2 -0
- package/modules/transformer/lib/typescript/index.d.ts.map +1 -0
- package/modules/transformer/lib/typescript/index.js +39 -0
- package/modules/transformer/lib/typescript/index.js.map +1 -0
- package/modules/transformer/static/types-polyfill.d.ts +18 -0
- package/modules/utils/lib/index.d.ts +3 -1
- package/modules/utils/lib/index.d.ts.map +1 -1
- package/modules/utils/lib/index.js +61 -4
- package/modules/utils/lib/index.js.map +1 -1
- package/modules/utils/lib/path.d.ts +5 -0
- package/modules/utils/lib/path.d.ts.map +1 -1
- package/modules/utils/lib/path.js +21 -4
- package/modules/utils/lib/path.js.map +1 -1
- package/package.json +26 -20
- package/static/helper-dynamic-constants.txt +13 -13
- package/static/helper-file-decorator.ts +20 -20
- package/static/helper-global-exporter.txt +8 -8
- package/static/lib.dom.d.ts +2330 -2330
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# Change Log - @cocos/ccbuild
|
|
2
2
|
|
|
3
|
+
## 2.0.3-alpha.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7bb3ea2: fix: getAllModules in ModuleQuery
|
|
8
|
+
|
|
9
|
+
## 2.0.3-alpha.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 2c600f4: add peerDependencies for module config
|
|
14
|
+
- 08afa0f: feat: support buildDTS
|
|
15
|
+
- 354cc12: feat: support cc.editor.d.ts build
|
|
16
|
+
|
|
17
|
+
## 2.0.3-alpha.8
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- a294f8b: remove dep of Modularize on StatsQuery
|
|
22
|
+
- fe1f559: feat: support enumerateDependentAssets and remove deprecation of enumerateDependentChunks
|
|
23
|
+
- 17fecf1: workflow: support gen module graph
|
|
24
|
+
|
|
25
|
+
## 2.0.3-alpha.7
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- be67053: remove api-extractor and use tfig as api report tool
|
|
30
|
+
- 5cf707e: feat: support editor internal export
|
|
31
|
+
- fix: build ts engine with asm.js in CJS
|
|
32
|
+
- be67053: designed module config schema
|
|
33
|
+
- be67053: fix: add babel types
|
|
34
|
+
- be67053: add Modularize module to support engine modularization
|
|
35
|
+
|
|
36
|
+
## 2.0.3-alpha.6
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- 2c4e7a8: support typescript in Transformer module
|
|
41
|
+
|
|
42
|
+
## 2.0.3-alpha.5
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- optimize: remove eslint deps on ts engine builder
|
|
47
|
+
|
|
48
|
+
## 2.0.3-alpha.4
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- 673cb2d: fix: type error in CCBuildTsFieldDecoratorHelper
|
|
53
|
+
|
|
54
|
+
## 2.0.3-alpha.3
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- fix: dts files copy in naitve/external
|
|
59
|
+
|
|
60
|
+
## 2.0.3-alpha.2
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- a8463a2: fix: circular reference && type merge && handle cache
|
|
65
|
+
|
|
3
66
|
## 2.0.3-alpha.1
|
|
4
67
|
|
|
5
68
|
### Patch Changes
|
|
@@ -42,3 +105,203 @@ Thu, 13 Jul 2023 15:30:27 GMT
|
|
|
42
105
|
|
|
43
106
|
- fix dts types && fix fs-extra version
|
|
44
107
|
- fix build ts engine with intrinsic flag
|
|
108
|
+
|
|
109
|
+
## 1.1.20
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- 1cb3389: dperecate: build engine loose option
|
|
114
|
+
|
|
115
|
+
## 1.1.19
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- bb5f1e5: fix: async bundle external wasm module
|
|
120
|
+
|
|
121
|
+
## 1.1.18
|
|
122
|
+
|
|
123
|
+
### Patch Changes
|
|
124
|
+
|
|
125
|
+
- 84d16d6: feat: wasm subpackage support umd
|
|
126
|
+
|
|
127
|
+
## 1.1.17
|
|
128
|
+
|
|
129
|
+
### Patch Changes
|
|
130
|
+
|
|
131
|
+
- fix: enumerateAllDependents doesn't resolve featureUnits' dependent chunks' dependent asset
|
|
132
|
+
|
|
133
|
+
## 1.1.16
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- 40da2c0: fix: use inline dynamic imports on OH platform
|
|
138
|
+
|
|
139
|
+
## 1.1.15
|
|
140
|
+
|
|
141
|
+
### Patch Changes
|
|
142
|
+
|
|
143
|
+
- downgrade glob to fix compability with node14
|
|
144
|
+
|
|
145
|
+
## 1.1.14
|
|
146
|
+
|
|
147
|
+
### Patch Changes
|
|
148
|
+
|
|
149
|
+
- 1a46941: feat: support wasmSubpackage options on externalWasmLoader
|
|
150
|
+
|
|
151
|
+
## 1.1.13
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- feat: support constant WASM_SUBPACKAGE
|
|
156
|
+
|
|
157
|
+
## 1.1.12
|
|
158
|
+
|
|
159
|
+
### Patch Changes
|
|
160
|
+
|
|
161
|
+
- 84a40ac: feat: support load wasm.fallback module && WASM_FALLBACK constant
|
|
162
|
+
|
|
163
|
+
## 1.1.11
|
|
164
|
+
|
|
165
|
+
### Patch Changes
|
|
166
|
+
|
|
167
|
+
- 58a3a35: feat: support buildEngine.enumerateAllDependents()
|
|
168
|
+
|
|
169
|
+
## 1.1.10
|
|
170
|
+
|
|
171
|
+
### Patch Changes
|
|
172
|
+
|
|
173
|
+
- e3c3221: fix: culling bullet wasm on wechat platform
|
|
174
|
+
|
|
175
|
+
## 1.1.9
|
|
176
|
+
|
|
177
|
+
### Patch Changes
|
|
178
|
+
|
|
179
|
+
- f7fe86e: feat: support constant CULL_ASM_JS_MODULE
|
|
180
|
+
|
|
181
|
+
## 1.1.8
|
|
182
|
+
|
|
183
|
+
### Patch Changes
|
|
184
|
+
|
|
185
|
+
- eb0ede7: fix: change .mem suffix to .bin
|
|
186
|
+
|
|
187
|
+
## 1.1.7
|
|
188
|
+
|
|
189
|
+
### Patch Changes
|
|
190
|
+
|
|
191
|
+
- 32d1541: feat: support loading '.js.mem' module
|
|
192
|
+
- 345fc75: fix: downgrade "typescript" version
|
|
193
|
+
|
|
194
|
+
## 1.1.6
|
|
195
|
+
|
|
196
|
+
### Patch Changes
|
|
197
|
+
|
|
198
|
+
- fix bullet wasm emit
|
|
199
|
+
|
|
200
|
+
## 1.1.5
|
|
201
|
+
|
|
202
|
+
### Patch Changes
|
|
203
|
+
|
|
204
|
+
- caffe4d: add FORCE_BANNING_BULLET_WASM constant, controlled by ammoJsWasm option
|
|
205
|
+
|
|
206
|
+
## 1.1.4
|
|
207
|
+
|
|
208
|
+
### Patch Changes
|
|
209
|
+
|
|
210
|
+
- 2aa2d7f: add EDITOR_NOT_IN_PREVIEW dynamic constant
|
|
211
|
+
- 8001c61: Revert "patch: add EDITOR_PREVIEW dynamic constant (#7)"
|
|
212
|
+
|
|
213
|
+
## 1.1.3
|
|
214
|
+
|
|
215
|
+
### Patch Changes
|
|
216
|
+
|
|
217
|
+
- 9406d42: add EDITOR_PREVIEW dynamic constant
|
|
218
|
+
|
|
219
|
+
## 1.1.2
|
|
220
|
+
|
|
221
|
+
### Patch Changes
|
|
222
|
+
|
|
223
|
+
- d70a215: fix: export `WASM_SUPPORT_MODE` for dynamic const
|
|
224
|
+
|
|
225
|
+
## 1.1.1
|
|
226
|
+
|
|
227
|
+
### Patch Changes
|
|
228
|
+
|
|
229
|
+
- fix: use fixed babel version
|
|
230
|
+
|
|
231
|
+
## 1.1.0
|
|
232
|
+
|
|
233
|
+
### Minor Changes
|
|
234
|
+
|
|
235
|
+
- 279e42a: feat: support engine WASM module building
|
|
236
|
+
|
|
237
|
+
### Patch Changes
|
|
238
|
+
|
|
239
|
+
- 6411ef4: feat: support CCBuildTsFieldDecoratorHelper
|
|
240
|
+
|
|
241
|
+
## 1.0.1-alpha.0
|
|
242
|
+
|
|
243
|
+
### Patch Changes
|
|
244
|
+
|
|
245
|
+
- d94d769: feat: support CCBuildTsFieldDecoratorHelper
|
|
246
|
+
|
|
247
|
+
## 1.0.0
|
|
248
|
+
|
|
249
|
+
### Major Changes
|
|
250
|
+
|
|
251
|
+
- e49f97e: integrate build js engine
|
|
252
|
+
|
|
253
|
+
### Patch Changes
|
|
254
|
+
|
|
255
|
+
- e49f97e: revert @rollup/plugin-node-resolve version to fix rollup issue https://github.com/rollup/plugins/issues/1464
|
|
256
|
+
- e49f97e: fix wrong rullup version deps
|
|
257
|
+
- d2b5b77: support keepTypes options
|
|
258
|
+
- bdea922: change @rollup/plugin-terser to rollup-plugin-terser
|
|
259
|
+
- d2b5b77: make PlatformType for string
|
|
260
|
+
- b2f4116: implement build ts engine
|
|
261
|
+
- 74eb0fc: use build js engine for OH platform
|
|
262
|
+
- remove assert that build js engine should be in BUILD mode
|
|
263
|
+
- ed9a9db: fix @rollup/plugin-json deps for editor-extension install
|
|
264
|
+
- 3ac56fa: change keepTypes to preserveType option
|
|
265
|
+
|
|
266
|
+
## 1.0.0-alpha.13
|
|
267
|
+
|
|
268
|
+
### Patch Changes
|
|
269
|
+
|
|
270
|
+
- change keepTypes to preserveType option
|
|
271
|
+
|
|
272
|
+
## 1.0.0-alpha.12
|
|
273
|
+
|
|
274
|
+
### Patch Changes
|
|
275
|
+
|
|
276
|
+
- support keepTypes options
|
|
277
|
+
- make PlatformType for string
|
|
278
|
+
- b2f4116: implement build ts engine
|
|
279
|
+
|
|
280
|
+
## 1.0.0-alpha.11
|
|
281
|
+
|
|
282
|
+
### Patch Changes
|
|
283
|
+
|
|
284
|
+
- use build js engine for OH platform
|
|
285
|
+
|
|
286
|
+
## 1.0.0-alpha.10
|
|
287
|
+
|
|
288
|
+
### Patch Changes
|
|
289
|
+
|
|
290
|
+
- change @rollup/plugin-terser to rollup-plugin-terser
|
|
291
|
+
|
|
292
|
+
## 1.0.0-alpha.9
|
|
293
|
+
|
|
294
|
+
### Patch Changes
|
|
295
|
+
|
|
296
|
+
- fix @rollup/plugin-json deps for editor-extension install
|
|
297
|
+
|
|
298
|
+
## 1.0.0-alpha.8
|
|
299
|
+
|
|
300
|
+
### Major Changes
|
|
301
|
+
|
|
302
|
+
- e49f97e: integrate build js engine
|
|
303
|
+
|
|
304
|
+
### Patch Changes
|
|
305
|
+
|
|
306
|
+
- e49f97e: revert @rollup/plugin-node-resolve version to fix rollup issue https://github.com/rollup/plugins/issues/1464
|
|
307
|
+
- e49f97e: fix wrong rullup version deps
|
package/README.md
CHANGED
|
@@ -1,37 +1,16 @@
|
|
|
1
|
-
# CCBUILD
|
|
2
|
-
|
|
3
|
-
The next generation of build tool for Cocos engine.
|
|
4
|
-
|
|
5
|
-
# What problems does this build tool solve ?
|
|
6
|
-
|
|
7
|
-
- To merge `@editor/quick-compiler` and `@cocos/build-engine`
|
|
8
|
-
- To support build cache management
|
|
9
|
-
- To support generating ts engine for AOT optimization on Open Harmony
|
|
10
|
-
- To support API generation
|
|
11
|
-
- To support API report
|
|
12
|
-
- To support API document model generation
|
|
13
|
-
- To support build modular engine
|
|
14
|
-
- More human-friendly log info
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Run `npm i` to setup the dev environment.
|
|
19
|
-
|
|
20
|
-
## unit test
|
|
21
|
-
|
|
22
|
-
Every time you fix a bug or introduce a new feature to ccbuild, please remember considering to add your unit test into `test` folder, and run `npm test` to make sure all your modification can pass the unit test.
|
|
23
|
-
|
|
24
|
-
If you want to update the snapshot, please run `npm test -- -u`.
|
|
25
|
-
|
|
26
|
-
## changelog generation
|
|
27
|
-
|
|
28
|
-
We use [changesets](https://github.com/changesets/changesets) to manage all the changelog.
|
|
29
|
-
Every time you make a change in the repo, please run `npm run change` to generate a changeset in the folder `.changeset`, this file should be also commit to the repo.
|
|
30
|
-
|
|
31
|
-
## publish
|
|
32
|
-
|
|
33
|
-
Please run `npm run version` to publish a version, this command would consume all the changesets in `.changeset` folder.
|
|
34
|
-
If you wan't to publish an alpha version, please use `npm run version-alpha`, this command won't consume any of the changesets.
|
|
35
|
-
|
|
36
|
-
And finally, run `npm publish` before your npm account got a publish authorization.
|
|
37
|
-
|
|
1
|
+
# CCBUILD
|
|
2
|
+
|
|
3
|
+
The next generation of build tool for Cocos engine.
|
|
4
|
+
|
|
5
|
+
# What problems does this build tool solve ?
|
|
6
|
+
|
|
7
|
+
- To merge `@editor/quick-compiler` and `@cocos/build-engine`
|
|
8
|
+
- To support build cache management
|
|
9
|
+
- To support generating ts engine for AOT optimization on Open Harmony
|
|
10
|
+
- To support API generation
|
|
11
|
+
- To support API report
|
|
12
|
+
- To support API document model generation
|
|
13
|
+
- To support build modular engine
|
|
14
|
+
- More human-friendly log info
|
|
15
|
+
|
|
16
|
+
> [I am a maintainer of this repo](./README_MAINTAIN.md)
|
package/lib/src/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as Transformer from "../../modules/transformer/lib/index";
|
|
2
2
|
import * as Bundler from "../../modules/bundler/lib/index";
|
|
3
|
+
import * as Modularize from "../../modules/modularize/lib/index";
|
|
4
|
+
import * as dtsBundler from "../../modules/dts-bundler/lib/index";
|
|
3
5
|
export { buildEngine } from "../../modules/build-engine/lib/index";
|
|
4
6
|
export { StatsQuery, ConfigInterface } from "../../modules/stats-query/lib/index";
|
|
5
|
-
export { Transformer, Bundler };
|
|
7
|
+
export { Transformer, Bundler };
|
|
8
|
+
export { Modularize };
|
|
9
|
+
export { dtsBundler };
|
package/lib/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/lib/src/index.js
CHANGED
|
@@ -34,11 +34,15 @@ var __importStar = this && this.__importStar || function (mod) {
|
|
|
34
34
|
Object.defineProperty(exports, "__esModule", {
|
|
35
35
|
value: true
|
|
36
36
|
});
|
|
37
|
-
exports.Bundler = exports.Transformer = exports.ConfigInterface = exports.StatsQuery = exports.buildEngine = void 0;
|
|
37
|
+
exports.dtsBundler = exports.Modularize = exports.Bundler = exports.Transformer = exports.ConfigInterface = exports.StatsQuery = exports.buildEngine = void 0;
|
|
38
38
|
const Transformer = __importStar(require("../../modules/transformer/lib/index.js"));
|
|
39
39
|
exports.Transformer = Transformer;
|
|
40
40
|
const Bundler = __importStar(require("../../modules/bundler/lib/index.js"));
|
|
41
41
|
exports.Bundler = Bundler;
|
|
42
|
+
const Modularize = __importStar(require("../../modules/modularize/lib/index.js"));
|
|
43
|
+
exports.Modularize = Modularize;
|
|
44
|
+
const dtsBundler = __importStar(require("../../modules/dts-bundler/lib/index.js"));
|
|
45
|
+
exports.dtsBundler = dtsBundler;
|
|
42
46
|
var build_engine_1 = require("../../modules/build-engine/lib/index.js");
|
|
43
47
|
Object.defineProperty(exports, "buildEngine", {
|
|
44
48
|
enumerable: true,
|
package/lib/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AAM3C,kCAAW;AALpB,0DAA4C;AAKtB,0BAAO;AAJ7B,gEAAkD;AAKzC,gCAAU;AAJnB,iEAAmD;AAK1C,gCAAU;AAJnB,sDAAoD;AAA3C,2GAAA,WAAW,OAAA;AACpB,oDAAmE;AAA1D,yGAAA,UAAU,OAAA;AAAE,8GAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-dts.d.ts","sourceRoot":"","sources":["../src/build-dts.ts"],"names":[],"mappings":"AAaA,wBAAsB,QAAQ,CAAE,OAAO,EAAE;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;CAC9B,GAAG,OAAO,CAAC,OAAO,CAAC,CA2OnB"}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return m[k];
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
} : function (o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
});
|
|
19
|
+
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
value: v
|
|
23
|
+
});
|
|
24
|
+
} : function (o, v) {
|
|
25
|
+
o["default"] = v;
|
|
26
|
+
});
|
|
27
|
+
var __importStar = this && this.__importStar || function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
35
|
+
function adopt(value) {
|
|
36
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
37
|
+
resolve(value);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) {
|
|
42
|
+
try {
|
|
43
|
+
step(generator.next(value));
|
|
44
|
+
} catch (e) {
|
|
45
|
+
reject(e);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function rejected(value) {
|
|
49
|
+
try {
|
|
50
|
+
step(generator["throw"](value));
|
|
51
|
+
} catch (e) {
|
|
52
|
+
reject(e);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function step(result) {
|
|
56
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
57
|
+
}
|
|
58
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
62
|
+
return mod && mod.__esModule ? mod : {
|
|
63
|
+
"default": mod
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
Object.defineProperty(exports, "__esModule", {
|
|
67
|
+
value: true
|
|
68
|
+
});
|
|
69
|
+
exports.buildDTS = void 0;
|
|
70
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
71
|
+
const gift = __importStar(require("tfig"));
|
|
72
|
+
const stats_query_1 = require("../../stats-query/lib/index.js");
|
|
73
|
+
const utils_1 = require("../../utils/lib/index.js");
|
|
74
|
+
const transpiler_1 = require("@ccbuild/transpiler");
|
|
75
|
+
var ts = transpiler_1.typescript.core;
|
|
76
|
+
const DEBUG = false;
|
|
77
|
+
const REMOVE_OLD = !DEBUG;
|
|
78
|
+
const RECOMPILE = !DEBUG;
|
|
79
|
+
const REMOVE_UNBUNDLED_CACHE = !DEBUG;
|
|
80
|
+
function buildDTS(options) {
|
|
81
|
+
var _a;
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
console.log(`Typescript version: ${ts.version}`);
|
|
84
|
+
const {
|
|
85
|
+
engine,
|
|
86
|
+
outDir,
|
|
87
|
+
withIndex = true,
|
|
88
|
+
withExports = false,
|
|
89
|
+
withEditorExports = false
|
|
90
|
+
} = options;
|
|
91
|
+
yield fs_extra_1.default.ensureDir(outDir);
|
|
92
|
+
console.debug(`With index: ${withIndex}`);
|
|
93
|
+
console.debug(`With exports: ${withExports}`);
|
|
94
|
+
console.debug(`With editor exports: ${withEditorExports}`);
|
|
95
|
+
const statsQuery = yield stats_query_1.StatsQuery.create(engine);
|
|
96
|
+
const tsConfigPath = statsQuery.tsConfigPath;
|
|
97
|
+
const unbundledOutDir = utils_1.ps.join(outDir, '__before_bundle');
|
|
98
|
+
const parsedCommandLine = ts.getParsedCommandLineOfConfigFile(tsConfigPath, {
|
|
99
|
+
declaration: true,
|
|
100
|
+
noEmit: false,
|
|
101
|
+
emitDeclarationOnly: true,
|
|
102
|
+
outFile: undefined,
|
|
103
|
+
outDir: unbundledOutDir
|
|
104
|
+
}, {
|
|
105
|
+
onUnRecoverableConfigFileDiagnostic: () => {},
|
|
106
|
+
useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,
|
|
107
|
+
readDirectory: ts.sys.readDirectory,
|
|
108
|
+
getCurrentDirectory: ts.sys.getCurrentDirectory,
|
|
109
|
+
fileExists: ts.sys.fileExists,
|
|
110
|
+
readFile: ts.sys.readFile
|
|
111
|
+
});
|
|
112
|
+
if (!parsedCommandLine) {
|
|
113
|
+
throw new Error(`Can not get 'parsedCommandLine'.`);
|
|
114
|
+
}
|
|
115
|
+
const unbundledOutDirNormalized = utils_1.ps.resolve(engine, parsedCommandLine.options.outDir);
|
|
116
|
+
console.debug(`Unbundled will write to: ${unbundledOutDirNormalized}`);
|
|
117
|
+
yield fs_extra_1.default.ensureDir(unbundledOutDirNormalized);
|
|
118
|
+
if (REMOVE_OLD) {
|
|
119
|
+
yield fs_extra_1.default.emptyDir(unbundledOutDirNormalized);
|
|
120
|
+
}
|
|
121
|
+
console.log(`Generating...`);
|
|
122
|
+
const featureUnits = statsQuery.getFeatureUnits().filter(m => m !== 'wait-for-ammo-instantiation');
|
|
123
|
+
const editorExportModules = statsQuery.getEditorPublicModules();
|
|
124
|
+
if (RECOMPILE) {
|
|
125
|
+
let fileNames = parsedCommandLine.fileNames;
|
|
126
|
+
if (withEditorExports) {
|
|
127
|
+
fileNames = fileNames.concat(editorExportModules.map(e => statsQuery.getEditorPublicModuleFile(e)));
|
|
128
|
+
}
|
|
129
|
+
const program = ts.createProgram(fileNames, parsedCommandLine.options);
|
|
130
|
+
const emitResult = program.emit(undefined,
|
|
131
|
+
// targetSourceFile
|
|
132
|
+
undefined,
|
|
133
|
+
// writeFile
|
|
134
|
+
undefined,
|
|
135
|
+
// cancellationToken,
|
|
136
|
+
true,
|
|
137
|
+
// emitOnlyDtsFiles
|
|
138
|
+
undefined);
|
|
139
|
+
const allDiagnostics = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
|
|
140
|
+
for (const diagnostic of allDiagnostics) {
|
|
141
|
+
let printer;
|
|
142
|
+
switch (diagnostic.category) {
|
|
143
|
+
case ts.DiagnosticCategory.Error:
|
|
144
|
+
printer = console.error;
|
|
145
|
+
break;
|
|
146
|
+
case ts.DiagnosticCategory.Warning:
|
|
147
|
+
printer = console.warn;
|
|
148
|
+
break;
|
|
149
|
+
case ts.DiagnosticCategory.Message:
|
|
150
|
+
case ts.DiagnosticCategory.Suggestion:
|
|
151
|
+
default:
|
|
152
|
+
printer = console.log;
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
if (!printer) {
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
if (diagnostic.file && diagnostic.start !== undefined) {
|
|
159
|
+
const {
|
|
160
|
+
line,
|
|
161
|
+
character
|
|
162
|
+
} = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
|
|
163
|
+
const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine);
|
|
164
|
+
printer(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
|
165
|
+
} else {
|
|
166
|
+
printer(`${ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')}`);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
// HACK: fix comments generated on top level namespace
|
|
171
|
+
// // TODO:
|
|
172
|
+
// let code = fs.readFileSync(tscOutputDtsFile, 'utf8');
|
|
173
|
+
// const regExpRef = /(\/\/\/ <reference types.*)/g;
|
|
174
|
+
// const matches = code.match(regExpRef);
|
|
175
|
+
// code = code.replace(regExpRef, '');
|
|
176
|
+
// if (matches) {
|
|
177
|
+
// let outputUnbundledCode = matches.join('\n');
|
|
178
|
+
// outputUnbundledCode += '\ndeclare const __skip_reference__: never;\n';
|
|
179
|
+
// outputUnbundledCode += code;
|
|
180
|
+
// fs.outputFileSync(tscOutputDtsFile, outputUnbundledCode, 'utf8');
|
|
181
|
+
// }
|
|
182
|
+
const patchSpineCoreDtsSource = utils_1.ps.join(engine, 'cocos', 'spine', 'lib', 'spine-core.d.ts');
|
|
183
|
+
const patchSpineCoreDtsTarget = utils_1.ps.join(unbundledOutDirNormalized, 'cocos', 'spine', 'lib', 'spine-core.d.ts');
|
|
184
|
+
if (!(yield fs_extra_1.default.pathExists(patchSpineCoreDtsSource))) {
|
|
185
|
+
console.debug(`Does 'cocos/spine/lib/spine-core.d.ts' no longer existed? I have a patch for it.`);
|
|
186
|
+
} else {
|
|
187
|
+
console.debug(`It's ${new Date().toLocaleString()}, we're still doing the hack for spine-core.d.ts`);
|
|
188
|
+
yield fs_extra_1.default.ensureDir(utils_1.ps.dirname(patchSpineCoreDtsTarget));
|
|
189
|
+
yield fs_extra_1.default.copyFile(patchSpineCoreDtsSource, patchSpineCoreDtsTarget);
|
|
190
|
+
}
|
|
191
|
+
const giftInputs = [];
|
|
192
|
+
const types = (_a = parsedCommandLine.options.types) === null || _a === void 0 ? void 0 : _a.map(typeFile => `${typeFile}.d.ts`);
|
|
193
|
+
if (types) {
|
|
194
|
+
for (let file of types) {
|
|
195
|
+
const isBareSpecifier = !file.includes('/');
|
|
196
|
+
if (isBareSpecifier) {
|
|
197
|
+
file = require.resolve(`@types/${file.slice(0, -'.d.ts'.length)}`);
|
|
198
|
+
}
|
|
199
|
+
giftInputs.push(file);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
const listGiftInputs = dir => __awaiter(this, void 0, void 0, function* () {
|
|
203
|
+
for (const file of yield fs_extra_1.default.readdir(dir)) {
|
|
204
|
+
const path = utils_1.ps.join(dir, file);
|
|
205
|
+
// eslint-disable-next-line no-await-in-loop
|
|
206
|
+
const stats = yield fs_extra_1.default.stat(path);
|
|
207
|
+
if (stats.isFile()) {
|
|
208
|
+
giftInputs.push(path);
|
|
209
|
+
} else if (stats.isDirectory()) {
|
|
210
|
+
// eslint-disable-next-line no-await-in-loop
|
|
211
|
+
yield listGiftInputs(path);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
yield listGiftInputs(unbundledOutDirNormalized);
|
|
216
|
+
const giftEntries = {};
|
|
217
|
+
const getModuleNameInTsOutFile = moduleFile => {
|
|
218
|
+
const path = utils_1.ps.relative(statsQuery.path, moduleFile);
|
|
219
|
+
const pathDts = path.replace(/\.ts$/, '.d.ts');
|
|
220
|
+
return utils_1.ps.join(unbundledOutDirNormalized, pathDts);
|
|
221
|
+
};
|
|
222
|
+
if (withExports) {
|
|
223
|
+
for (const exportEntry of featureUnits) {
|
|
224
|
+
giftEntries[exportEntry] = getModuleNameInTsOutFile(statsQuery.getFeatureUnitFile(exportEntry));
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
if (withEditorExports) {
|
|
228
|
+
for (const editorExportModule of editorExportModules) {
|
|
229
|
+
giftEntries[editorExportModule] = getModuleNameInTsOutFile(statsQuery.getEditorPublicModuleFile(editorExportModule));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
let ccDtsFile;
|
|
233
|
+
if (withIndex && !withExports) {
|
|
234
|
+
ccDtsFile = utils_1.ps.join(unbundledOutDirNormalized, 'virtual-cc.d.ts');
|
|
235
|
+
giftEntries.cc = ccDtsFile;
|
|
236
|
+
giftInputs.push(ccDtsFile);
|
|
237
|
+
const code = `// Auto-generated\n${statsQuery.evaluateIndexModuleSource(featureUnits, featureUnit => getModuleNameInTsOutFile(statsQuery.getFeatureUnitFile(featureUnit)).replace(/\\/g, '/').replace(/\.d.ts$/, ''))}\n`;
|
|
238
|
+
yield fs_extra_1.default.writeFile(ccDtsFile, code, {
|
|
239
|
+
encoding: 'utf8'
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
console.log(`Bundling...`);
|
|
243
|
+
try {
|
|
244
|
+
const indexOutputPath = utils_1.ps.join(outDir, 'cc.d.ts');
|
|
245
|
+
const giftResult = gift.bundle({
|
|
246
|
+
input: giftInputs,
|
|
247
|
+
rootDir: unbundledOutDirNormalized,
|
|
248
|
+
name: 'cc',
|
|
249
|
+
rootModule: 'index',
|
|
250
|
+
entries: giftEntries,
|
|
251
|
+
priority: [...(ccDtsFile ? [ccDtsFile] : []) // Things should be exported to 'cc' as far as possible.
|
|
252
|
+
],
|
|
253
|
+
|
|
254
|
+
privateJsDocTag: 'engineInternal',
|
|
255
|
+
groups: [{
|
|
256
|
+
test: /^cc\/editor.*$/,
|
|
257
|
+
path: utils_1.ps.join(outDir, 'cc.editor.d.ts')
|
|
258
|
+
}, {
|
|
259
|
+
test: /^cc\/.*$/,
|
|
260
|
+
path: utils_1.ps.join(outDir, 'index.d.ts')
|
|
261
|
+
}, {
|
|
262
|
+
test: /^cc.*$/,
|
|
263
|
+
path: indexOutputPath
|
|
264
|
+
}],
|
|
265
|
+
nonExportedSymbolDistribution: [{
|
|
266
|
+
sourceModule: /cocos\/animation\/marionette/,
|
|
267
|
+
targetModule: 'cc/editor/new-gen-anim'
|
|
268
|
+
}, {
|
|
269
|
+
sourceModule: /.*/,
|
|
270
|
+
targetModule: 'cc'
|
|
271
|
+
}]
|
|
272
|
+
});
|
|
273
|
+
yield Promise.all(giftResult.groups.map(group => __awaiter(this, void 0, void 0, function* () {
|
|
274
|
+
yield fs_extra_1.default.outputFile(group.path, group.code, {
|
|
275
|
+
encoding: 'utf8'
|
|
276
|
+
});
|
|
277
|
+
})));
|
|
278
|
+
if (withIndex && withExports) {
|
|
279
|
+
yield fs_extra_1.default.outputFile(indexOutputPath, buildIndexModule(featureUnits, statsQuery), {
|
|
280
|
+
encoding: 'utf8'
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
} catch (error) {
|
|
284
|
+
console.error(error);
|
|
285
|
+
return false;
|
|
286
|
+
} finally {
|
|
287
|
+
if (REMOVE_UNBUNDLED_CACHE) {
|
|
288
|
+
yield fs_extra_1.default.remove(unbundledOutDirNormalized);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return true;
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
exports.buildDTS = buildDTS;
|
|
295
|
+
function buildIndexModule(featureUnits, statsQuery) {
|
|
296
|
+
return `declare module "cc" {\n${statsQuery.evaluateIndexModuleSource(featureUnits).split('\n').map(line => ` ${line}`).join('\n')}\n}`;
|
|
297
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-dts.js","sourceRoot":"","sources":["../src/build-dts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAA0B;AAC1B,2CAA6B;AAC7B,sDAAkD;AAClD,0CAAoC;AACpC,oDAA+D;AAE/D,IAAO,EAAE,GAAG,uBAAU,CAAC,IAAI,CAAC;AAE5B,MAAM,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