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.
- package/CHANGELOG.md +3 -1
- package/__TEST__/tests/fixtures/game-cocos-by-files/ccRequire.js +1 -0
- package/__TEST__/tests/fixtures/game-cocos-by-files/cocos/cocos2d-js-min.js +1 -0
- package/__TEST__/tests/fixtures/game-cocos-by-files/game.js +3 -0
- package/__TEST__/tests/fixtures/game-cocos-by-files/game.json +3 -0
- package/__TEST__/tests/fixtures/game-laya-by-files/game.js +3 -0
- package/__TEST__/tests/fixtures/game-laya-by-files/game.json +3 -0
- package/__TEST__/tests/fixtures/game-laya-by-files/libs/laya.core.js +1 -0
- package/__TEST__/tests/fixtures/game-laya-by-files/version.json +3 -0
- package/__TEST__/tests/utils/getGameEngine.test.js +10 -0
- package/dist/index.js +128 -10
- package/dist/index.js.map +1 -1
- package/dist/libs/debugPkgs/index.d.ts +1 -0
- package/dist/typings/index.d.ts +1 -1
- package/dist/utils/getGameEngine.d.ts +1 -1
- package/package.json +1 -1
- package/dist/libs/checkPkgs/checkPkgPath.d.ts +0 -1
- package/dist/libs/extractPkgs/hasAnyNodeModulesShallow.d.ts +0 -1
- package/dist/libs/extractPkgs/index.d.ts +0 -6
- package/dist/libs/makePkgs/extract/NodeModuleExtractor.d.ts +0 -39
- package/dist/libs/makePkgs/extract/hasAnyNodeModulesShallow.d.ts +0 -1
- package/dist/libs/makePkgs/extract/index.d.ts +0 -6
- package/dist/libs/makePkgs/extract.d.ts +0 -4
- package/dist/utils/NodeModuleExtractor.d.ts +0 -38
- package/dist/utils/overrideConfig.d.ts +0 -8
package/dist/typings/index.d.ts
CHANGED
|
@@ -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 +0,0 @@
|
|
|
1
|
-
export declare function checkPkgPath(path: string): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function hasAnyNodeModulesShallow(root: string): boolean;
|
|
@@ -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,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>;
|