tt-minigame-ide-cli 2.0.13 → 2.0.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/miniprogram-utils/src/constants/index.d.ts +1 -0
- package/dist/miniprogram-utils/src/data/app.d.ts +1 -0
- package/dist/tt-ide-cli/src/features/microgame/utils/file-system.d.ts +7 -0
- package/dist/tt-ide-cli/src/features/preview.d.ts +4 -0
- package/dist/tt-ide-cli/src/index.d.ts +2 -0
- package/dist/tt-ide-cli/src/utils/constants.d.ts +22 -0
- package/dist/tt-ide-cli/src/utils/util.d.ts +12 -0
- package/package.json +1 -1
@@ -195,6 +195,7 @@ export declare const SLARDAR_EVENT: {
|
|
195
195
|
readonly IDE_CLOUD_COPY: "IDE_CLOUD_COPY";
|
196
196
|
readonly IDE_CLOUD_DEBUG: "IDE_CLOUD_DEBUG";
|
197
197
|
readonly IDE_CLOUD_REQUEST: "IDE_CLOUD_REQUEST";
|
198
|
+
readonly IDE_PROJECT_TO_QRCODE_STEP: "IDE_PROJECT_TO_QRCODE_STEP";
|
198
199
|
readonly IDE_LOADER_IO_ERROR: string;
|
199
200
|
readonly IDE_LOADER_INSTALL_RECOVER_ERROR: string;
|
200
201
|
readonly IDE_LOADER_START_FROM_ENTRY: string;
|
@@ -12,3 +12,10 @@ export declare const getFileByteSize: (path: string, projectConfig: ProjectConfi
|
|
12
12
|
export declare const getDirByteSize: (path: string, ignore: string[], whiteList: string[], projectConfig: ProjectConfig) => Promise<number>;
|
13
13
|
/** 获取指定路径(兼容文件 / 整个目录)大小 Byte 数 */
|
14
14
|
export declare const getPathByteSize: (path: string, ignore: any[], whiteList: string[], projectConfig: ProjectConfig) => number | Promise<number>;
|
15
|
+
/**
|
16
|
+
* @description: 把game.json插入到zip中
|
17
|
+
* @param {string} gameJsonPath
|
18
|
+
* @param {string} webglPath
|
19
|
+
* @return {Promise<Buffer>}
|
20
|
+
*/
|
21
|
+
export declare const appendGameJsonToZipForUnity: (gameJsonPath: string, webglPath: string) => Promise<Buffer | null>;
|
@@ -11,6 +11,9 @@ export declare type ProjectQRCode = {
|
|
11
11
|
qrcodeSVG?: string;
|
12
12
|
qrcodeFilePath?: string;
|
13
13
|
useCache: boolean;
|
14
|
+
timeReport?: {
|
15
|
+
[k: string]: number;
|
16
|
+
};
|
14
17
|
} & Pick<CompileProgressResult, 'metrics' | 'passJson'>;
|
15
18
|
export declare function checkChannel(appid: string, channel: string): Promise<void>;
|
16
19
|
declare type CompileProgressResult = {
|
@@ -97,6 +100,7 @@ export declare type ProjectToQRCodeOption = {
|
|
97
100
|
setCheckResult?: (result: any) => any;
|
98
101
|
lynxPackages?: string;
|
99
102
|
useLocalSchema?: string;
|
103
|
+
needTimeReport?: boolean;
|
100
104
|
};
|
101
105
|
export declare function projectToQRCode(options: ProjectToQRCodeOption, hashTimeout?: number): Promise<ProjectQRCode>;
|
102
106
|
export {};
|
@@ -24,3 +24,5 @@ export { folderToZipStream } from './features/packages';
|
|
24
24
|
export * from './utils/metrics';
|
25
25
|
export * as microgame from './features/microgame';
|
26
26
|
export { getProjectHash, setProjectHashFn } from './utils/hash';
|
27
|
+
export { getProjectToQRCodeStepReporterDesc } from './utils/util';
|
28
|
+
export { PROJECT_TO_QR_CODE_STEP } from './utils/constants';
|
@@ -2,3 +2,25 @@ export declare const IDE_SCHEMA = "bytedanceide:";
|
|
2
2
|
export declare const TEMPLATE_DOWNLOAD_URL = "https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master.zip";
|
3
3
|
export declare const TS_TEMPLATE_DOWNLOAD_URL = "https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master-ts.zip";
|
4
4
|
export declare const TEMPLATE_PLUGIN_DOWNLOAD_URL = "https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/microapp-plugin-template-js.zip";
|
5
|
+
export declare const PROJECT_TO_QR_CODE_STEP: {
|
6
|
+
readonly channelCheck: "channel_check";
|
7
|
+
readonly zip: "source_zip";
|
8
|
+
readonly upload: "upload_source_zip";
|
9
|
+
readonly hash: "hash_project";
|
10
|
+
readonly prepare: "prepare";
|
11
|
+
readonly check: "check";
|
12
|
+
readonly compile: "cloud_download_and_compile";
|
13
|
+
readonly preCheck: "pre_check";
|
14
|
+
readonly makeSchema: "make_schema";
|
15
|
+
};
|
16
|
+
export declare const PROJECT_TO_QR_CODE_STEP_DESC: {
|
17
|
+
readonly channel_check: "通道检查耗时";
|
18
|
+
readonly source_zip: "打压缩包耗时";
|
19
|
+
readonly upload_source_zip: "上传压缩包耗时";
|
20
|
+
readonly hash_project: "hash计算耗时";
|
21
|
+
readonly prepare: "各项检测准备耗时";
|
22
|
+
readonly check: "包体检查耗时";
|
23
|
+
readonly cloud_download_and_compile: "云端下载编译耗时";
|
24
|
+
readonly pre_check: "项目预检耗时";
|
25
|
+
readonly make_schema: "schema生成耗时";
|
26
|
+
};
|
@@ -61,3 +61,15 @@ export declare const isGameFileValid: (pattern: string) => boolean;
|
|
61
61
|
export declare const isObject: (value: any) => boolean;
|
62
62
|
export declare function sleep(timer: number): Promise<unknown>;
|
63
63
|
export declare function verifyLoginTypeAuth(projectPath: string): Promise<void>;
|
64
|
+
export declare type TimeReporter = {
|
65
|
+
startStep: (step: string) => () => void;
|
66
|
+
finish: () => ({
|
67
|
+
[x: string]: number;
|
68
|
+
});
|
69
|
+
};
|
70
|
+
export declare function createTimeReporter(): TimeReporter;
|
71
|
+
export declare function getProjectToQRCodeStepReporterDesc(report: {
|
72
|
+
[k: string]: number;
|
73
|
+
}): {
|
74
|
+
总耗时: string;
|
75
|
+
};
|