ttmg-pack 0.4.7 → 0.4.8-beta.1

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.
@@ -3,5 +3,6 @@ export declare function debugPkgs(config: BuildConfig, context?: PackContext): P
3
3
  isSuccess: boolean;
4
4
  errorMsg?: string;
5
5
  packages?: ProjectConfig['packages'];
6
+ packageConfig?: ProjectConfig;
6
7
  checkResults?: CheckResult[];
7
8
  }>;
@@ -85,7 +85,7 @@ export interface CheckAPIResult {
85
85
  dimension: CheckDimension;
86
86
  }
87
87
  export interface GetPkgsResult {
88
- engine: 'unity' | 'cocos' | 'unknown';
88
+ engine: 'unity' | 'cocos' | 'laya' | 'unknown';
89
89
  size: number;
90
90
  packages: {
91
91
  type: 'main' | 'subpackage' | 'independent' | 'wasmcode';
@@ -1 +1 @@
1
- export declare function getGameEngine(gameEntry: string): 'unity' | 'cocos' | 'unknown';
1
+ export declare function getGameEngine(gameEntry: string): 'unity' | 'cocos' | 'laya' | 'unknown';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ttmg-pack",
3
3
  "author": "ttmg",
4
- "version": "0.4.7",
4
+ "version": "0.4.8-beta.1",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
@@ -1 +0,0 @@
1
- export declare function checkPkgPath(path: string): boolean;
@@ -1 +0,0 @@
1
- export declare function hasAnyNodeModulesShallow(root: string): boolean;
@@ -1,6 +0,0 @@
1
- export declare function extractPkgs(params: {
2
- entryDir: string;
3
- outputDir: string;
4
- }): Promise<{
5
- extractOutputDir: string;
6
- }>;
@@ -1,39 +0,0 @@
1
- export declare class NodeModuleExtractor {
2
- srcDir: string;
3
- distDir: string;
4
- miniprogramNpmDir: string;
5
- addedFiles: Set<string>;
6
- pendingTransforms: Array<{
7
- srcRelativePath: string;
8
- distRelativePath: string;
9
- isNodeModuleFile: boolean;
10
- }>;
11
- sourceMaps: Map<string, any>;
12
- enableReport: boolean;
13
- constructor(srcDir: any, distDir: any);
14
- customRequireHook(modulePath: any, relativePath: any): Promise<boolean>;
15
- findInNodeModules(moduleName: any, relativePath: any): string;
16
- transformModulePath(originalPath: any): any;
17
- transformRequirePath(moduleName: any, srcRelativePath: any, srcModuleRelativePath: any, distModuleRelativePath: any): string;
18
- isCodeFile(filePath: any): boolean;
19
- ensureDirForFile(filePath: any): void;
20
- processCodeFile(srcRelativePath: any, distRelativePath: any, isNodeModuleFile: any): Promise<void>;
21
- copyNonCodeFile(srcRelativePath: any, distRelativePath: any): void;
22
- collectFiles(rootDir: any, relativeDir?: any): void;
23
- addTransform(srcRelativePath: any, distRelativePath: any, isNodeModuleFile: any): void;
24
- processTransforms(): Promise<void>;
25
- generateReport(): {
26
- srcDir: string;
27
- distDir: string;
28
- processedFiles: string[];
29
- sourceMaps: [string, any][];
30
- totalFiles: number;
31
- totalSourceMaps: number;
32
- timestamp: string;
33
- };
34
- extract(): Promise<void>;
35
- }
36
- export declare function extract(params: {
37
- srcDir: string;
38
- distDir: string;
39
- }): Promise<void>;
@@ -1 +0,0 @@
1
- export declare function hasAnyNodeModulesShallow(root: string): boolean;
@@ -1,6 +0,0 @@
1
- export declare function extract(params: {
2
- entryDir: string;
3
- outputDir: string;
4
- }): Promise<{
5
- extractOutputDir: string;
6
- }>;
@@ -1,4 +0,0 @@
1
- export declare function extract(params: {
2
- srcDir: string;
3
- distDir: string;
4
- }): Promise<void>;
@@ -1,38 +0,0 @@
1
- export declare class NodeModuleExtractor {
2
- srcDir: string;
3
- distDir: string;
4
- miniprogramNpmDir: string;
5
- addedFiles: Set<string>;
6
- pendingTransforms: Array<{
7
- srcRelativePath: string;
8
- distRelativePath: string;
9
- isNodeModuleFile: boolean;
10
- }>;
11
- sourceMaps: Map<string, any>;
12
- constructor(srcDir: any, distDir: any);
13
- customRequireHook(modulePath: any, relativePath: any): Promise<boolean>;
14
- findInNodeModules(moduleName: any, relativePath: any): string;
15
- transformModulePath(originalPath: any): any;
16
- transformRequirePath(moduleName: any, srcRelativePath: any, srcModuleRelativePath: any, distModuleRelativePath: any): string;
17
- isCodeFile(filePath: any): boolean;
18
- ensureDirForFile(filePath: any): void;
19
- processCodeFile(srcRelativePath: any, distRelativePath: any, isNodeModuleFile: any): Promise<void>;
20
- copyNonCodeFile(srcRelativePath: any, distRelativePath: any): void;
21
- collectFiles(rootDir: any, relativeDir?: any): void;
22
- addTransform(srcRelativePath: any, distRelativePath: any, isNodeModuleFile: any): void;
23
- processTransforms(): Promise<void>;
24
- generateReport(): {
25
- srcDir: string;
26
- distDir: string;
27
- processedFiles: string[];
28
- sourceMaps: [string, any][];
29
- totalFiles: number;
30
- totalSourceMaps: number;
31
- timestamp: string;
32
- };
33
- extract(): Promise<void>;
34
- }
35
- export declare function extract(params: {
36
- srcDir: string;
37
- distDir: string;
38
- }): Promise<void>;
@@ -1,8 +0,0 @@
1
- import { BuildConfig } from '../typings';
2
- /**
3
- * 覆盖配置,根据游戏引擎类型,设置主包和独立子包的大小限制
4
- * @param entryDir 游戏项目入口目录
5
- * @param config 原始构建配置
6
- * @returns 覆盖后的构建配置
7
- */
8
- export declare function overrideConfig(config: BuildConfig): BuildConfig;