tt-minigame-ide-cli 2.0.16 → 2.0.17
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/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/miniprogram-utils/src/constants/index.d.ts +0 -1
- package/dist/miniprogram-utils/src/constants/project.d.ts +1 -3
- package/dist/miniprogram-utils/src/data/app.d.ts +0 -1
- package/dist/miniprogram-utils/src/electron-monitor/common/share.d.ts +0 -4
- package/dist/miniprogram-utils/src/utils/crypto.d.ts +0 -1
- package/dist/tt-ide-cli/src/features/meta.d.ts +0 -1
- package/dist/tt-ide-cli/src/features/microgame/utils/source.type.d.ts +0 -2
- package/dist/tt-ide-cli/src/index.d.ts +0 -1
- package/dist/tt-ide-cli/src/types.d.ts +0 -3
- package/dist/tt-ide-cli/src/utils/white-list.d.ts +1 -1
- package/package.json +2 -2
- package/dist/tt-ide-cli/src/features/microgame/mixed-cloud-compile.d.ts +0 -103
- package/dist/tt-ide-cli/src/features/microgame/mixed-index.d.ts +0 -4
- package/dist/tt-ide-cli/src/features/microgame/utils/mixed-constant.d.ts +0 -8
- package/dist/tt-ide-cli/src/features/microgame/utils/mixed-package.d.ts +0 -73
@@ -207,7 +207,6 @@ export declare const SLARDAR_EVENT: {
|
|
207
207
|
readonly IDE_AI_AGENT_GENERATE: "IDE_AI_AGENT_GENERATE";
|
208
208
|
readonly IDE_AI_AGENT_DIFF_ACTION: "IDE_AI_AGENT_DIFF_ACTION";
|
209
209
|
readonly IDE_AI_AGENT_GEN_UI: "IDE_AI_AGENT_GEN_UI";
|
210
|
-
readonly IDE_OPERATOR_TIME: "IDE_OPERATOR_TIME";
|
211
210
|
readonly IDE_LOADER_IO_ERROR: string;
|
212
211
|
readonly IDE_LOADER_INSTALL_RECOVER_ERROR: string;
|
213
212
|
readonly IDE_LOADER_START_FROM_ENTRY: string;
|
@@ -21,8 +21,6 @@ export interface ICommonParams {
|
|
21
21
|
isSandbox?: string;
|
22
22
|
frameworkType?: string;
|
23
23
|
workbenchMode?: string;
|
24
|
-
mixType?: number;
|
25
|
-
isMixed?: '0' | '1';
|
26
24
|
}
|
27
25
|
export declare function commonParams2Context(commonParams: ICommonParams, globalDevAppId?: string, globalTechType?: string, globalExtAppId?: string): {
|
28
26
|
user_id: string;
|
@@ -47,8 +45,6 @@ export declare function commonParams2Context(commonParams: ICommonParams, global
|
|
47
45
|
e2e_scene: string;
|
48
46
|
cpu_model: string;
|
49
47
|
system_memory: string;
|
50
|
-
is_mixed: string;
|
51
|
-
mix_type: number;
|
52
48
|
};
|
53
49
|
export declare function getHref(): string;
|
54
50
|
/**
|
@@ -16,4 +16,3 @@ export declare function getFileHash(path: string, fullString?: boolean, algorith
|
|
16
16
|
export declare function getDirHash(root: string, ignore?: string[], algorithm?: string): Promise<{
|
17
17
|
[file: string]: string;
|
18
18
|
}>;
|
19
|
-
export declare const getBufferMd5: (buffer: Buffer) => string;
|
@@ -19,6 +19,5 @@ export declare function isRealToyId(appid: string): Promise<boolean>;
|
|
19
19
|
export declare function fetchMeta({ appid, isGame }: MetaOption): Promise<any>;
|
20
20
|
export declare function getAppVersions(appId: string, isPlugin?: boolean): Promise<{
|
21
21
|
audit_version: string;
|
22
|
-
plugin_base_library_version: string;
|
23
22
|
}>;
|
24
23
|
export {};
|
@@ -27,4 +27,3 @@ export * as microgame from './features/microgame';
|
|
27
27
|
export { getProjectHash, setProjectHashFn } from './utils/hash';
|
28
28
|
export { getProjectToQRCodeStepReporterDesc } from './utils/util';
|
29
29
|
export { PROJECT_TO_QR_CODE_STEP } from './utils/constants';
|
30
|
-
export * as mixedGame from './features/microgame/mixed-index';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "tt-minigame-ide-cli",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.17",
|
4
4
|
"description": "Command line interface for micro app development",
|
5
5
|
"license": "ISC",
|
6
6
|
"main": "dist/index.js",
|
@@ -61,4 +61,4 @@
|
|
61
61
|
"publishConfig": {
|
62
62
|
"registry": "https://registry.npmjs.org"
|
63
63
|
}
|
64
|
-
}
|
64
|
+
}
|
@@ -1,103 +0,0 @@
|
|
1
|
-
import { ServerSize } from '@byted/miniprogram-utils/typings/project';
|
2
|
-
import { ProjectInfo, QrcodeInfo } from '../../types';
|
3
|
-
import { IMetrics } from '../../utils/metrics';
|
4
|
-
import { IDEConfig, MakeSchemaOption } from '../../utils/qrcode';
|
5
|
-
export declare type ProjectQRCode = {
|
6
|
-
expireTime: number;
|
7
|
-
shortUrl: string;
|
8
|
-
originSchema: string;
|
9
|
-
qrcodeSVG?: string;
|
10
|
-
qrcodeFilePath?: string;
|
11
|
-
useCache: boolean;
|
12
|
-
} & Pick<CompileProgressResult, 'metrics' | 'passJson'>;
|
13
|
-
export declare enum MixType {
|
14
|
-
Cocos = 1,
|
15
|
-
WebGl = 2,
|
16
|
-
Native = 3
|
17
|
-
}
|
18
|
-
declare type CompileProgressResult = {
|
19
|
-
success: boolean;
|
20
|
-
/** error code */
|
21
|
-
error: number;
|
22
|
-
done: boolean;
|
23
|
-
msg: string;
|
24
|
-
metrics?: IMetrics;
|
25
|
-
errLink?: string;
|
26
|
-
passJson: {
|
27
|
-
packageSize?: ServerSize;
|
28
|
-
} & Record<string, any>;
|
29
|
-
};
|
30
|
-
export declare type PreviewOption = Pick<ProjectToQRCodeOption, 'project' | 'page' | 'qrcode' | 'cache' | 'copyToClipboard' | 'extraInfoJson' | 'localCompileVersion' | 'ideConfig' | 'mixType'>;
|
31
|
-
/**
|
32
|
-
* 预览上传(功能入口)
|
33
|
-
* @param options
|
34
|
-
* @returns
|
35
|
-
*/
|
36
|
-
export declare function preview(options: PreviewOption): Promise<ProjectQRCode>;
|
37
|
-
export declare type UploadOption = Pick<ProjectToQRCodeOption, 'project' | 'qrcode' | 'copyToClipboard' | 'extraInfoJson' | 'localCompileVersion' | 'ideConfig' | 'updateStatus' | 'setCheckResult' | 'isNewPlatform' | 'mixType'> & {
|
38
|
-
version: string;
|
39
|
-
changeLog: string;
|
40
|
-
needUploadSourcemap?: boolean;
|
41
|
-
extraCheckInfoJson?: string;
|
42
|
-
channel?: string;
|
43
|
-
};
|
44
|
-
/**
|
45
|
-
* 发布上传(功能入口)
|
46
|
-
* @param options
|
47
|
-
* @returns
|
48
|
-
*/
|
49
|
-
export declare function upload(options: UploadOption): Promise<ProjectQRCode>;
|
50
|
-
export declare type ProjectToQRCodeOption = {
|
51
|
-
project: ProjectInfo;
|
52
|
-
page: {
|
53
|
-
path: string;
|
54
|
-
query: string;
|
55
|
-
scene: string;
|
56
|
-
launchFrom: string;
|
57
|
-
location: string;
|
58
|
-
} & Pick<MakeSchemaOption, 'referrerInfo'>;
|
59
|
-
qrcode: QrcodeInfo;
|
60
|
-
cache: boolean;
|
61
|
-
copyToClipboard: boolean;
|
62
|
-
uploadOptions?: {
|
63
|
-
version: string;
|
64
|
-
changeLog: string;
|
65
|
-
needUploadSourcemap: boolean;
|
66
|
-
extraCheckInfoJson?: string;
|
67
|
-
channel?: string;
|
68
|
-
};
|
69
|
-
extraInfoJson?: string;
|
70
|
-
localCompileVersion?: string;
|
71
|
-
ideConfig?: IDEConfig;
|
72
|
-
debug?: {
|
73
|
-
query: {
|
74
|
-
gtoken: string;
|
75
|
-
roomid: string;
|
76
|
-
session: string;
|
77
|
-
};
|
78
|
-
};
|
79
|
-
uploadCache?: boolean;
|
80
|
-
supportSourcemap?: boolean;
|
81
|
-
enableHotRestartCache?: boolean;
|
82
|
-
updateStatus?: (status: {
|
83
|
-
upload: number;
|
84
|
-
check: number;
|
85
|
-
compile: number;
|
86
|
-
uploadSuccess?: boolean;
|
87
|
-
}) => any;
|
88
|
-
setCheckResult?: (result: any) => any;
|
89
|
-
isNewPlatform?: (value: boolean) => void;
|
90
|
-
mixType: MixType;
|
91
|
-
};
|
92
|
-
export declare function projectToQRCode(options: ProjectToQRCodeOption): Promise<ProjectQRCode>;
|
93
|
-
export declare function getChannelLimit(appid: string): Promise<{
|
94
|
-
limit_num: number;
|
95
|
-
} | null>;
|
96
|
-
export declare function checkChannel(appid: string, channel: string): Promise<void>;
|
97
|
-
export declare const previewForCli: (options: PreviewOption & {
|
98
|
-
useAndroidNative?: boolean;
|
99
|
-
}) => Promise<ProjectQRCode>;
|
100
|
-
export declare const uploadForCli: (options: UploadOption & {
|
101
|
-
useAndroidNative?: boolean;
|
102
|
-
}) => Promise<ProjectQRCode>;
|
103
|
-
export {};
|
@@ -1,8 +0,0 @@
|
|
1
|
-
export declare const NATIVE_RELATIVE_PATH = "native";
|
2
|
-
export declare const NATIVE_FULL_APK_NAME = "full.apk";
|
3
|
-
export declare const NATIVE_IL2CPP_NAME = "il2cpp.zip";
|
4
|
-
export declare const NATIVE_APK_NAME = "intermediate.apk";
|
5
|
-
export declare const UNITY_PLUGIN_PROVIDER = "tt674511f8f84ea91612";
|
6
|
-
export declare const UNITY_CACHE_DIR = ".dy-game-cache";
|
7
|
-
export declare const WEBGL_SYMBOLS_NAME = "webgl.symbols.json";
|
8
|
-
export declare const WEBGL_STREAMING_ASSETS_NAME = "StreamingAssets";
|
@@ -1,73 +0,0 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
import { PassThrough, Stream } from 'stream';
|
3
|
-
import { NATIVE_FULL_APK_NAME, NATIVE_APK_NAME, NATIVE_IL2CPP_NAME } from './mixed-constant';
|
4
|
-
import { SizeLimitConfig } from './source.type';
|
5
|
-
import { checkAppId, getAppId } from './package';
|
6
|
-
/** 不参与体积计算的 glob pattern */
|
7
|
-
export declare const PKG_SIZE_IGNORE_GLOBS: string[];
|
8
|
-
export declare const getSizeLimitConfig: (appId: string) => Promise<Omit<SizeLimitConfig, "demo">>;
|
9
|
-
/**
|
10
|
-
* @description: 目前小游戏分包大小有以下限制:
|
11
|
-
整个小游戏所有主包+分包大小不超过 30M
|
12
|
-
主包不超过 4M
|
13
|
-
单个普通分包不限制大小
|
14
|
-
* @return {*}
|
15
|
-
*/
|
16
|
-
export declare function verifyPkgSize(devAppid: string, projectPath: string, options?: {
|
17
|
-
withNative: boolean;
|
18
|
-
isUpload: boolean;
|
19
|
-
}): Promise<string>;
|
20
|
-
declare type NativeFileName = typeof NATIVE_APK_NAME | typeof NATIVE_FULL_APK_NAME | typeof NATIVE_IL2CPP_NAME;
|
21
|
-
export declare function getProjectSize(projectPath: string, options?: {
|
22
|
-
withNative: boolean;
|
23
|
-
isUpload: boolean;
|
24
|
-
}): Promise<{
|
25
|
-
main: number;
|
26
|
-
subPkgs: {
|
27
|
-
subs: Array<[
|
28
|
-
string,
|
29
|
-
number
|
30
|
-
]>;
|
31
|
-
total: number;
|
32
|
-
};
|
33
|
-
openData: number;
|
34
|
-
total: number;
|
35
|
-
native?: {
|
36
|
-
il2cpp: number;
|
37
|
-
apk: number;
|
38
|
-
};
|
39
|
-
}>;
|
40
|
-
declare type ReturnTypeOfFolderToZipStream = Partial<Record<NativeFileName, Stream>> & {
|
41
|
-
zipStream: PassThrough;
|
42
|
-
};
|
43
|
-
/**
|
44
|
-
* @description: 将项目打包为 zip,如果是native,则一起返回native产物
|
45
|
-
* @param {string} folderPath
|
46
|
-
* @return {ReturnTypeOfFolderToZipStream}
|
47
|
-
*/
|
48
|
-
export declare function folderToZipStream(folderPath: string, options?: {
|
49
|
-
withNative: boolean;
|
50
|
-
isUpload: boolean;
|
51
|
-
}): Promise<ReturnTypeOfFolderToZipStream>;
|
52
|
-
/**
|
53
|
-
* @description: 压缩文件
|
54
|
-
* @return {Buffer | PassThrough}
|
55
|
-
*/
|
56
|
-
export declare const compress: ({ entries, rootPath, }: {
|
57
|
-
entries: string[];
|
58
|
-
rootPath: string;
|
59
|
-
}) => Promise<PassThrough>;
|
60
|
-
export { getAppId, checkAppId };
|
61
|
-
export declare const validateAppId: (appId: string) => Promise<void>;
|
62
|
-
/**
|
63
|
-
* @description: for 混合引擎小游戏,计算项目 hash:
|
64
|
-
* StreamingAssets下面所有文件均计算
|
65
|
-
* native 预览只计算full.apk
|
66
|
-
* 除去 native 和StreamingAssets的文件按白名单计算
|
67
|
-
* 最后把三个hash拼起来作为最终的hash
|
68
|
-
* 目前上传不需要计算hash(上传不做缓存,预览才做)
|
69
|
-
* @param {string} projectPath
|
70
|
-
* @param {boolean} withNative
|
71
|
-
* @return {string}
|
72
|
-
*/
|
73
|
-
export declare const getMixedProjectHash: (projectPath: string, withNative: boolean) => Promise<string>;
|