ttmg-pack 0.3.7 → 0.3.9

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 ADDED
@@ -0,0 +1,374 @@
1
+ ## 0.0.1
2
+
3
+ 发布第一个版本,将分包逻辑单独维护
4
+
5
+ ## 0.0.3
6
+
7
+ - 增加类型导出
8
+ - 修改入参格式
9
+
10
+ ## 0.0.4
11
+
12
+ - 支持自定义输出 log
13
+ - 打包产物支持 banner 注释
14
+
15
+ ## 0.0.5
16
+
17
+ - 调整包大小校验限制,主包 30MB,子包 4MB
18
+
19
+ ## 0.0.6
20
+
21
+ 优化入口接口
22
+
23
+ ```
24
+ export interface BuildConfig {
25
+ entry: string;
26
+ output: string;
27
+ rules?: {
28
+ mainPackageSizeLimit: number;
29
+ projectSizeLimit: number;
30
+ subpackageSizeLimit?: number;
31
+ };
32
+ enableDev?: boolean;
33
+ enableCheck?: boolean;
34
+ enableLog?: boolean;
35
+ }
36
+
37
+ ```
38
+
39
+ ## 0.0.7
40
+
41
+ 支持类型文件导出
42
+
43
+ ## 0.0.8
44
+
45
+ ODR 相关功能
46
+
47
+ - 支持 ODR 打包
48
+ - 支持 ODR 下载
49
+ - 支持 ODR 配置写入
50
+
51
+ ## 0.0.9
52
+
53
+ 拆分 debug 功能 和 build 功能
54
+
55
+ ## 0.0.10
56
+
57
+ fix buildPkgs 日志输出问题
58
+
59
+ ## 0.0.11
60
+
61
+ 移除 console.log 日志
62
+
63
+ ## 0.0.12
64
+
65
+ 支持校验 project.config.json,appid 不能为空,开发调试环节强依赖
66
+
67
+ ## 0.0.13
68
+
69
+ 移除无效 log
70
+
71
+ ## 0.0.14
72
+
73
+ 导出 packageConfig.json,调试环节使用
74
+
75
+ ## 0.0.15
76
+
77
+ fix: 修复 生成 projectConfig.json
78
+
79
+ ## 0.0.16
80
+
81
+ 调试模式不做大小校验,只做警告
82
+
83
+ ## 0.0.17
84
+
85
+ 支持 sourcemap
86
+
87
+ ## 0.0.18
88
+
89
+ 支持 sourcemap 配置
90
+
91
+ ## 0.0.19
92
+
93
+ 支持自定义 sourcemap 文件名
94
+
95
+ ## 0.0.20
96
+
97
+ 1. 支持多种 sourcemap 输出方案
98
+ 2. 优化打包配置接口
99
+
100
+ ## 0.0.21
101
+
102
+ 1. 优化生产 sourcemap 生成逻辑
103
+
104
+ ## 0.0.22
105
+
106
+ 修复 sourcemap
107
+
108
+ ## 0.0.23
109
+
110
+ 优化 pack 逻辑,降低耗时
111
+
112
+ ## 0.0.24
113
+
114
+ 优化 buildPkgs 逻辑
115
+
116
+ ## 0.0.25
117
+
118
+ fix: odr 下载逻辑,Array buffer 读写
119
+
120
+ ## 0.0.26
121
+
122
+ 1. fix: source map 写入 bug
123
+ 2. 支持 esmodule 打包
124
+
125
+ ## 0.0.27
126
+
127
+ 1. 修复循环依赖问题
128
+
129
+ ## 0.0.28
130
+
131
+ 回滚 支持 esmodule 打包,止损加密后解密失败的问题
132
+
133
+ ## 0.0.29
134
+
135
+ 支持 es module 打包
136
+
137
+ ## 0.0.30
138
+
139
+ 修改类型定义文件
140
+
141
+ ## 0.0.31
142
+
143
+ 1. 修复 打包逻辑,移除 subpackages 逻辑,基于 root 进行分包拆解
144
+ 2. 修复 debugPkgs 逻辑,合并代码出问题,导致 wasmcode 代码丢失
145
+
146
+ ## 0.0.32
147
+
148
+ 1. 移除日志
149
+ 2. 移除 subpackages 常量
150
+
151
+ ## 0.0.33
152
+
153
+ 修复打包 BUG
154
+
155
+ ## 0.0.34
156
+
157
+ 1. pack remove file not work
158
+ 2. merge remove file not work
159
+
160
+ ## 0.0.35
161
+
162
+ fix main path error
163
+
164
+ ## 0.0.36
165
+
166
+ remove useless log
167
+
168
+ ## 0.0.37
169
+
170
+ 支持调试模式校验日志导出
171
+
172
+ ## 0.0.38
173
+
174
+ 导出 checkPkgs 函数
175
+
176
+ ## 0.0.39
177
+
178
+ 1. 导出 getPkgs 函数
179
+ 2. 修复校验主包大小 BUG
180
+
181
+ ## 0.0.40
182
+
183
+ 1. 导出 GAME_MAIN_PACKAGE_NAME 常量
184
+ 2. 修复校验主包大小 BUG
185
+
186
+ ## 0.0.41/42
187
+
188
+ 优化校验逻辑提示文案
189
+
190
+ ## 0.0.43
191
+
192
+ 调整 log 结构
193
+
194
+ ## 0.0.44
195
+
196
+ 移除日志空格
197
+
198
+ ## 0.0.45
199
+
200
+ 优化打包类型
201
+
202
+ ## 0.0.46
203
+
204
+ 包大小限制提示大小显示问题优化,避免 0MB 展示效果
205
+
206
+ ## 0.0.47
207
+
208
+ 修复校验主包大小 BUG
209
+
210
+ ## 0.0.48
211
+
212
+ 优化校验逻辑提示文案
213
+
214
+ ## 0.0.49
215
+
216
+ 优化校验逻辑提示文案
217
+
218
+ ## 0.0.50
219
+
220
+ 优化校验逻辑提示文案,移除废弃 log
221
+
222
+ ## 0.0.51
223
+
224
+ 支持 fyf packages 导出
225
+
226
+ ## 0.0.52
227
+
228
+ 支持必接 API 预检查,校验必接 API 是否被调用,但是否生效不在检查范畴内
229
+
230
+ ## 0.0.53
231
+
232
+ 移除非必要日志
233
+
234
+ ## 0.0.54
235
+
236
+ 修复 require 路径解析问题
237
+
238
+ ## 0.0.55
239
+
240
+ 支持 unity 游戏引擎,对于 unity 游戏引擎的游戏,不限制主包和独立分包大小
241
+
242
+ ## 0.0.56
243
+
244
+ 补充必接 API 校验范围
245
+
246
+ ## 0.1.0
247
+
248
+ 发布 0.1.0 版本,更新后续平台升级
249
+
250
+ ## 0.1.1
251
+
252
+ 移除 project.config.json 校验
253
+
254
+ ## 0.1.2-0.1.5
255
+
256
+ 开发 unity 相关
257
+
258
+ ## 0.1.2
259
+
260
+ 支持 getPkgs unity br 信息导出
261
+
262
+ ## 0.1.3
263
+
264
+ 优化 unity br 相关问题,支持 CLI 部分测试
265
+
266
+ ## 0.1.4
267
+
268
+ 修复 unity br 相关问题,支持 CLI 全部测试,补发版本
269
+
270
+ ## 0.1.5
271
+
272
+ 调整 unity 包大小问题校验,仅对非 unity 工程生效
273
+
274
+ ## 0.1.6
275
+
276
+ 修复 esbuild 构建编码问题,导致部分 JS 语法不符合预期
277
+
278
+ ## 0.1.7
279
+
280
+ 调整 esbuild 构建目标为 esnext,避免部分语法不符合预期
281
+
282
+ ## 0.1.8
283
+
284
+ 调整 esbuild 构建目标为 es2015,避免部分语法不符合预期
285
+
286
+ ## 0.1.8-beta.1
287
+
288
+ 导出 unity 相关函数
289
+
290
+ ## 0.1.9
291
+
292
+ 支持开放数据域
293
+
294
+ ## 0.2.0
295
+
296
+ fix: 修复 esbuild 构建编码问题
297
+
298
+ ## 0.2.0-beta.1
299
+
300
+ 切换成 esbuild 更稳定的 build
301
+
302
+ ## 0.2.1
303
+
304
+ 完善编译, 修复 open data context 编译问题
305
+
306
+ ## 0.2.2
307
+
308
+ 补充对 分包名称名称为中文类型字符的校验支持,避免打包失败
309
+
310
+ ## 0.2.3
311
+
312
+ esbuild 构建目标调整为 es2020,避免部分语法不符合预期,和安卓 vmsdk 支持最低版本保持一致
313
+
314
+ ## 0.2.4
315
+
316
+ 修复 open data context 编译问题
317
+
318
+ ## 0.2.5
319
+
320
+ 修复 open data context 编译问题
321
+
322
+ ## 0.2.6
323
+
324
+ 修复 build 失败丢失 open data context 代码问题
325
+
326
+ ## 0.2.7
327
+
328
+ 修复 open data context 代码丢失问题,彻底修复
329
+ 调整 esbuild 构建目标为 esnext,避免部分语法不符合预期
330
+
331
+ ## 0.2.8
332
+
333
+ 支持 unity 游戏引擎,支持包体个性化校验 60MB
334
+
335
+ ## 0.2.9
336
+ 本地调试代码预检查校验适配 unity 包大小限制
337
+
338
+ ## 0.3.0
339
+ 空发了
340
+
341
+ ## 0.3.1
342
+
343
+ 修复 open data context 代码丢失问题,兼容 Cocos 2.0 版本
344
+
345
+ ## 0.3.2-0.3.5
346
+ for unity plugin
347
+
348
+ ## 0.3.6
349
+
350
+ 1. **参数简化**:将多个函数的入参从多个参数改为单个 `config` 参数
351
+ - `checkProjectSize`
352
+ - `checkIndependentPackages`
353
+ - `checkSubpackages`
354
+ - `makePkgs`
355
+
356
+ 2. **错误处理**:修复 `checkMainPackageEntry` 在非开发环境下不抛异常的问题
357
+
358
+ 3. **修复 bug**:修复 `subPackages` 小驼峰配置导致主包大小计算错误的问题,现在会给出正确的错误提示
359
+
360
+ ## 0.3.7
361
+
362
+ 1. **优化错误处理**:将 `subPackages` 小驼峰配置的错误处理从抛出异常改为返回 error 级别的检查结果,避免 CLI 项目直接崩溃
363
+
364
+ 2. **增强兼容性**:修改 `getSubpackagesRoots` 函数,优先使用小写的 `subpackages`,如果没有,再使用小驼峰的 `subPackages`,确保主包大小的校验不会出问题
365
+
366
+ ## 0.3.8
367
+
368
+ 1. **优化错误信息**:移除了所有 console 打印语句,不再向开发者打印 console 信息,统一通过返回的检查结果进行错误处理
369
+
370
+ 2. **修复重复错误信息**:移除了 `checkSubpackages` 函数中对 `subPackages` 小驼峰配置的重复检查,确保错误信息只显示一次
371
+
372
+ ## 0.3.9
373
+
374
+ 1. 增加对 wasmFuncCount 校验
@@ -4,6 +4,7 @@ export declare const GAME_PROJECT_CONFIG_FILE_NAME = "project.config.json";
4
4
  export declare const GAME_ORIGIN_CONFIG_FILE_NAME = "game.json";
5
5
  export declare const GAME_MODULE_CONFIG_FILE_NAME = "moduleConfig.json";
6
6
  export declare const GAME_OUTPUT_CONFIG_FILE_NAME = "output.json";
7
+ export declare const GAME_WASM_SPLIT_CONFIG_FILE_NAME = "webgl-wasm-split.json";
7
8
  export declare const GAME_MAIN_PACKAGE_NAME = "__GAME__";
8
9
  export declare const TTPKG_TAG = "TPKG";
9
10
  export declare const STTPKG_TAG = "SPKG";
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * ==========================================
3
3
  * @Description: ttmg pack
4
- * @Version: 0.3.7
4
+ * @Version: 0.3.9
5
5
  * @Author: zhanghongyang.mocha
6
- * @Date: 2026-02-28 17:14:10
6
+ * @Date: 2026-03-06 15:09:58
7
7
  * ==========================================
8
8
  */
9
9
  'use strict';
@@ -127,6 +127,7 @@ function removeEmptyDir(dir) {
127
127
  const GAME_PACK_CONFIG_FILE_NAME = 'packageConfig.json';
128
128
  const GAME_ORIGIN_CONFIG_FILE_NAME = 'game.json';
129
129
  const GAME_MODULE_CONFIG_FILE_NAME = 'moduleConfig.json';
130
+ const GAME_WASM_SPLIT_CONFIG_FILE_NAME = 'webgl-wasm-split.json';
130
131
  const GAME_MAIN_PACKAGE_NAME = '__GAME__';
131
132
  const STTPKG_EXT = '.txt';
132
133
  const ODR_CODE_DIR_SUFFIX = '_code';
@@ -892,10 +893,11 @@ function checkProject(config) {
892
893
  logger.info('start check project');
893
894
  const gameJsonCheckResult = checkGameJson(config);
894
895
  const checkSizeResult = checkProjectSize(config);
895
- const result = [
896
- gameJsonCheckResult,
897
- checkSizeResult,
898
- ];
896
+ const checkPerfResult = checkPerformance(config);
897
+ /**
898
+ * 过滤掉空的
899
+ */
900
+ const result = [gameJsonCheckResult, checkSizeResult, checkPerfResult].filter(Boolean);
899
901
  if (result.every(item => item.passed)) {
900
902
  logger.info('check project successfully');
901
903
  }
@@ -909,7 +911,6 @@ function checkGameJson(config) {
909
911
  const errMsg = 'Can not find game.json in game source code, please check it';
910
912
  logger.error(errMsg);
911
913
  if ((_a = config === null || config === void 0 ? void 0 : config.dev) === null || _a === void 0 ? void 0 : _a.enable) {
912
- console.log('\x1b[1m\x1b[33m%s\x1b[0m', `❗️ ${errMsg}`);
913
914
  return Object.assign({ passed: false, msg: errMsg, type: 'config', level: 'error', file: GAME_ORIGIN_CONFIG_FILE_NAME, name: 'project' }, defaultCheckConfig$3);
914
915
  }
915
916
  else {
@@ -922,7 +923,6 @@ function checkGameJson(config) {
922
923
  const errMsg = `'subPackages' is found in ${GAME_ORIGIN_CONFIG_FILE_NAME}. Please use 'subpackages' (all lowercase) instead.`;
923
924
  logger.error(errMsg);
924
925
  if ((_b = config === null || config === void 0 ? void 0 : config.dev) === null || _b === void 0 ? void 0 : _b.enable) {
925
- console.log('\x1b[1m\x1b[33m%s\x1b[0m', `❗️ ${errMsg}`);
926
926
  return Object.assign({ passed: false, msg: errMsg, type: 'config', name: 'project', level: 'error', file: GAME_ORIGIN_CONFIG_FILE_NAME }, defaultCheckConfig$3);
927
927
  }
928
928
  else {
@@ -951,7 +951,6 @@ function checkProjectSize(config) {
951
951
  const errMsg = `Check project size failed, size: ${gameSizeMB}MB, must not exceed ${limitMB}MB`;
952
952
  logger.error(errMsg);
953
953
  if (enableDev) {
954
- console.log('\x1b[1m\x1b[33m%s\x1b[0m', errMsg);
955
954
  return Object.assign({ passed: false, name: 'project', msg: errMsg, type: 'size', level: 'warning', size: gameSize }, defaultCheckConfig$3);
956
955
  }
957
956
  else {
@@ -967,6 +966,29 @@ function checkProjectSize(config) {
967
966
  return Object.assign({ passed: true, msg: logMsg, name: 'project', type: 'size', level: 'info', size: gameSize }, defaultCheckConfig$3);
968
967
  }
969
968
  }
969
+ function checkPerformance(config) {
970
+ const { entry } = config;
971
+ if (!isUnityEngine(entry)) {
972
+ return null;
973
+ }
974
+ const gameJsonPath = path.join(entry, GAME_ORIGIN_CONFIG_FILE_NAME);
975
+ const gameJson = JSON.parse(fs.readFileSync(gameJsonPath, 'utf-8'));
976
+ if ((gameJson === null || gameJson === void 0 ? void 0 : gameJson.wasmFuncCount) < 80000) {
977
+ return Object.assign(Object.assign({}, defaultCheckConfig$3), { passed: true, msg: `wasmFuncCount < 80000, no need to split wasm code`, type: 'performance', level: 'info', name: 'project' });
978
+ }
979
+ const splitConfigPath = path.join(entry, GAME_WASM_SPLIT_CONFIG_FILE_NAME);
980
+ const errResult = Object.assign(Object.assign({}, defaultCheckConfig$3), { passed: false, msg: 'wasmFuncCount >= 80000, must enable wasm split to optimize performance', type: 'performance', level: 'warning', name: 'project' });
981
+ if (!fs.existsSync(splitConfigPath)) {
982
+ return errResult;
983
+ }
984
+ const splitConfig = JSON.parse(fs.readFileSync(splitConfigPath, 'utf-8'));
985
+ if ((splitConfig === null || splitConfig === void 0 ? void 0 : splitConfig.enableWasmSplit) !== true) {
986
+ return errResult;
987
+ }
988
+ else {
989
+ return Object.assign(Object.assign({}, defaultCheckConfig$3), { passed: true, msg: 'wasmFuncCount >= 80000, wasm split is enabled', type: 'performance', level: 'info', name: 'project' });
990
+ }
991
+ }
970
992
 
971
993
  const defaultCheckConfig$2 = {
972
994
  name: 'main',
@@ -988,7 +1010,6 @@ function checkMainPackageSize(config) {
988
1010
  const errMsg = `Check main package size failed, main package size ${mainPkgSizeMB}MB, must not exceed ${limitMB}MB`;
989
1011
  logger.error(errMsg);
990
1012
  if (dev === null || dev === void 0 ? void 0 : dev.enable) {
991
- console.log('\x1b[1m\x1b[33m%s\x1b[0m', `❗️ ${errMsg}`);
992
1013
  return Object.assign({ passed: false, msg: errMsg, size: mainPkgSize, type: 'size', level: 'warning' }, defaultCheckConfig$2);
993
1014
  }
994
1015
  else {
@@ -1008,7 +1029,6 @@ function checkMainPackageEntry(config) {
1008
1029
  const errMsg = 'Check main package entry failed, game.js must exist in main package!';
1009
1030
  logger.error(errMsg);
1010
1031
  if ((_a = config.dev) === null || _a === void 0 ? void 0 : _a.enable) {
1011
- console.log('\x1b[1m\x1b[33m%s\x1b[0m', errMsg);
1012
1032
  return Object.assign({ passed: false, msg: errMsg, type: 'config', level: 'error', file: 'game.js' }, defaultCheckConfig$2);
1013
1033
  }
1014
1034
  }
@@ -1043,7 +1063,6 @@ const defaultCheckConfig$1 = {
1043
1063
  dimension: 'subpackage',
1044
1064
  };
1045
1065
  function checkSubpackages(config) {
1046
- var _a;
1047
1066
  const { entry: entryDir } = config;
1048
1067
  const checkResults = [];
1049
1068
  /**
@@ -1051,22 +1070,6 @@ function checkSubpackages(config) {
1051
1070
  * 开始校验 subpackages 配置是否有效
1052
1071
  */
1053
1072
  logger.info('start check subpackages in game.json');
1054
- // 检查是否使用了小驼峰命名的 subPackages
1055
- try {
1056
- const gameOriginConfigPath = path.join(entryDir, GAME_ORIGIN_CONFIG_FILE_NAME);
1057
- const gameOriginConfig = JSON.parse(fs.readFileSync(gameOriginConfigPath, 'utf-8'));
1058
- if (gameOriginConfig.subPackages) {
1059
- const errMsg = 'Error: \'subPackages\' is found in game.json. Please use \'subpackages\' (all lowercase) instead.';
1060
- logger.error(errMsg);
1061
- if ((_a = config === null || config === void 0 ? void 0 : config.dev) === null || _a === void 0 ? void 0 : _a.enable) {
1062
- console.log('\x1b[1m\x1b[33m%s\x1b[0m', `❗️ ${errMsg}`);
1063
- }
1064
- checkResults.push(Object.assign({ passed: false, msg: errMsg, type: 'config', level: 'error', file: GAME_ORIGIN_CONFIG_FILE_NAME }, defaultCheckConfig$1));
1065
- }
1066
- }
1067
- catch (e) {
1068
- // 忽略读取配置文件的错误,继续检查其他配置
1069
- }
1070
1073
  const subpackages = getSubpackagesConfig(entryDir);
1071
1074
  subpackages.forEach(sub => {
1072
1075
  var _a, _b, _c;
@@ -1077,7 +1080,6 @@ function checkSubpackages(config) {
1077
1080
  const errMsg = 'Check subpackages config failed, the subpackages configuration in game.json is invalid: the root or name field in one or more subpackages is empty. Please ensure that all subpackages have non-empty root and name values.';
1078
1081
  logger.error(errMsg);
1079
1082
  if ((_a = config === null || config === void 0 ? void 0 : config.dev) === null || _a === void 0 ? void 0 : _a.enable) {
1080
- console.log('\x1b[1m\x1b[33m%s\x1b[0m', `❗️ ${errMsg}`);
1081
1083
  checkResults.push(Object.assign({ passed: false, msg: errMsg, type: 'config', level: 'error', file: GAME_ORIGIN_CONFIG_FILE_NAME }, defaultCheckConfig$1));
1082
1084
  }
1083
1085
  else {
@@ -1088,7 +1090,6 @@ function checkSubpackages(config) {
1088
1090
  const errMsg = `Check subpackages config failed, the subpackages configuration in game.json is invalid: the root field in subpackage<${sub.name}> is invalid. Your subpackage root contain invalid characters, only A-Za-z0-9 _ - . / \\ are allowed.`;
1089
1091
  logger.error(errMsg);
1090
1092
  if ((_b = config === null || config === void 0 ? void 0 : config.dev) === null || _b === void 0 ? void 0 : _b.enable) {
1091
- console.log('\x1b[1m\x1b[33m%s\x1b[0m', `❗️ ${errMsg}`);
1092
1093
  checkResults.push(Object.assign({ passed: false, msg: errMsg, type: 'config', level: 'error', file: GAME_ORIGIN_CONFIG_FILE_NAME }, defaultCheckConfig$1));
1093
1094
  }
1094
1095
  else {
@@ -1107,7 +1108,6 @@ function checkSubpackages(config) {
1107
1108
  const errMsg = `Check subpackage<${sub.name}> config failed, the subpackages configuration in game.json is invalid: can not find subpackage ${sub.name} entry dir, please check it`;
1108
1109
  logger.error(errMsg);
1109
1110
  if ((_c = config === null || config === void 0 ? void 0 : config.dev) === null || _c === void 0 ? void 0 : _c.enable) {
1110
- console.log('\x1b[1m\x1b[33m%s\x1b[0m', `❗️ ${errMsg}`);
1111
1111
  checkResults.push(Object.assign({ passed: false, msg: errMsg, type: 'config', level: 'error', file: GAME_ORIGIN_CONFIG_FILE_NAME }, defaultCheckConfig$1));
1112
1112
  }
1113
1113
  else {
@@ -1145,7 +1145,6 @@ function checkIndependentPackages(config) {
1145
1145
  const errMsg = 'Check independent subpackages config failed, the subpackages configuration in game.json is invalid: the root or name field in one or more independent subpackages is empty. Please ensure that all independent subpackages have non-empty root and name values.';
1146
1146
  logger.error(errMsg);
1147
1147
  if (isEnableDev) {
1148
- console.log('\x1b[1m\x1b[33m%s\x1b[0m', `❗️${errMsg}`);
1149
1148
  checkResults.push(Object.assign(Object.assign({}, defaultCheckConfig), { passed: false, msg: errMsg, type: 'config', level: 'error', file: GAME_ORIGIN_CONFIG_FILE_NAME, name: sub.name }));
1150
1149
  }
1151
1150
  else {
@@ -1164,7 +1163,6 @@ function checkIndependentPackages(config) {
1164
1163
  const errMsg = `Check independent package<${sub.name}> config failed, the subpackages configuration in game.json is invalid: can not find subpackage ${sub.name} entry dir, please check it`;
1165
1164
  logger.error(errMsg);
1166
1165
  if (isEnableDev) {
1167
- console.log('\x1b[1m\x1b[33m%s\x1b[0m', `❗️ ${errMsg}`);
1168
1166
  checkResults.push(Object.assign(Object.assign({}, defaultCheckConfig), { passed: false, msg: errMsg, type: 'config', level: 'error', file: GAME_ORIGIN_CONFIG_FILE_NAME, name: sub.name }));
1169
1167
  }
1170
1168
  else {
@@ -1197,9 +1195,7 @@ function checkIndependentPackages(config) {
1197
1195
  checkResults.push(checkSizeResult);
1198
1196
  logger.info(checkSizeResult.msg);
1199
1197
  if (!checkSizeResult.passed) {
1200
- if (isEnableDev) {
1201
- console.log('\x1b[1m\x1b[33m%s\x1b[0m', `❗️ ${checkSizeResult.msg}`);
1202
- }
1198
+ if (isEnableDev) ;
1203
1199
  else {
1204
1200
  throw new Error(checkSizeResult.msg);
1205
1201
  }
@@ -2146,7 +2142,7 @@ async function buildPkgs(config) {
2146
2142
  const { output: outputDir, build } = config;
2147
2143
  let startTime = Date.now();
2148
2144
  logger.init(outputDir, true);
2149
- logger.info(`TTMG_PACK_VERSION: ${"0.3.7"}`);
2145
+ logger.info(`TTMG_PACK_VERSION: ${"0.3.9"}`);
2150
2146
  logger.info(`pack start, startTime:${startTime}`);
2151
2147
  /**
2152
2148
  * 清理