tt-minigame-ide-cli 2.0.8 → 2.0.10
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 +19 -0
- package/dist/miniprogram-utils/src/constants/project.d.ts +12 -0
- package/dist/miniprogram-utils/src/constants/slardar-events/update-events.d.ts +1 -0
- package/dist/miniprogram-utils/src/data/project.d.ts +21 -1
- package/dist/miniprogram-utils/src/electron-monitor/common/browser.d.ts +18 -0
- package/dist/miniprogram-utils/src/electron-monitor/common/share.d.ts +1 -4
- package/dist/miniprogram-utils/src/utils/filterFile.d.ts +2 -0
- package/dist/miniprogram-utils/src/utils/index.d.ts +26 -0
- package/dist/tt-ide-cli/src/features/microgame/unity.d.ts +36 -1
- package/dist/tt-ide-cli/src/features/microgame/utils/file-system.d.ts +4 -3
- package/dist/tt-ide-cli/src/features/microgame/utils/package.d.ts +2 -1
- package/dist/tt-ide-cli/src/features/packages.d.ts +20 -6
- package/dist/tt-ide-cli/src/features/preview.d.ts +4 -1
- package/dist/tt-ide-cli/src/monitor/constants.d.ts +1 -0
- package/dist/tt-ide-cli/src/types.d.ts +2 -0
- package/dist/tt-ide-cli/src/utils/qrcode.d.ts +9 -0
- package/dist/tt-ide-cli/src/utils/update.d.ts +7 -0
- package/dist/tt-minigame-ide-cli/src/index.d.ts +28 -1
- package/package.json +1 -1
@@ -157,6 +157,9 @@ export declare const SLARDAR_EVENT: {
|
|
157
157
|
readonly IDE_AI_QUESTION: "IDE_AI_QUESTION";
|
158
158
|
readonly IDE_AI_FEEDBACK: "IDE_AI_FEEDBACK";
|
159
159
|
readonly IDE_AI_OPEN_LINK: "IDE_AI_OPEN_LINK";
|
160
|
+
readonly IDE_AI_ABNORMAL_REPLY: "IDE_AI_ABNORMAL_REPLY";
|
161
|
+
readonly IDE_AI_BUTTON_SHOW: "IDE_AI_BUTTON_SHOW";
|
162
|
+
readonly IDE_AI_STAY_DURATION: "IDE_AI_STAY_DURATION";
|
160
163
|
readonly IDE_DETAIL_CONFIG_ITEM_CLICK: "IDE_DETAIL_CONFIG_ITEM_CLICK";
|
161
164
|
readonly IDE_WORKBENCH_VIEW_STATUS: "IDE_WORKBENCH_VIEW_STATUS";
|
162
165
|
readonly IDE_POWER_EVENT: "IDE_POWER_EVENT";
|
@@ -170,6 +173,11 @@ export declare const SLARDAR_EVENT: {
|
|
170
173
|
readonly IDE_MAIN_HELPER_FORK: "IDE_MAIN_HELPER_FORK";
|
171
174
|
readonly IDE_MAIN_HELPER_SPAWN: "IDE_MAIN_HELPER_SPAWN";
|
172
175
|
readonly IDE_MAIN_HELPER_READY: "IDE_MAIN_HELPER_READY";
|
176
|
+
readonly IDE_DOUYIN_OAUTH_BIND_CLICK: "IDE_DOUYIN_OAUTH_BIND_CLICK";
|
177
|
+
readonly IDE_USER_LOCAL_IP_COUNT: "IDE_USER_LOCAL_IP_COUNT";
|
178
|
+
readonly IDE_WEB_CREATE: "IDE_WEB_CREATE";
|
179
|
+
readonly IDE_WEB_LOAD: "IDE_WEB_LOAD";
|
180
|
+
readonly IDE_WEB_DETECT: "IDE_WEB_DETECT";
|
173
181
|
readonly IDE_LOADER_IO_ERROR: string;
|
174
182
|
readonly IDE_LOADER_INSTALL_RECOVER_ERROR: string;
|
175
183
|
readonly IDE_LOADER_START_FROM_ENTRY: string;
|
@@ -190,6 +198,7 @@ export declare const SLARDAR_EVENT: {
|
|
190
198
|
readonly IDE_FULLUPGRADE_POP_YESBACK: "IDE_FULLUPGRADE_POP_YESBACK";
|
191
199
|
readonly IDE_FULLUPGRADE_POP_YESONCE: "IDE_FULLUPGRADE_POP_YESONCE";
|
192
200
|
readonly IDE_FULLUPGRADE_POP_VIEWDETAIL: "IDE_FULLUPGRADE_POP_VIEWDETAIL";
|
201
|
+
readonly IDE_FORCE_UPGRADE: "IDE_FORCE_UPGRADE";
|
193
202
|
};
|
194
203
|
/**
|
195
204
|
* IDE的模块统计
|
@@ -211,6 +220,7 @@ export declare const IDE_MODULES: {
|
|
211
220
|
readonly UPLOAD: "UPLOAD";
|
212
221
|
readonly SIGN_CHECK: "SIGN_CHECK";
|
213
222
|
readonly INTELLIGENCE: "INTELLIGENCE";
|
223
|
+
readonly PROJECT_INSPECTION: "PROJECT_INSPECTION";
|
214
224
|
readonly AI: "AI";
|
215
225
|
readonly SHARE_PROJECT: "SHARE_PROJECT";
|
216
226
|
readonly PROJECT_MANAGE: "PROJECT_MANAGE";
|
@@ -224,6 +234,10 @@ export declare const IDE_MODULES: {
|
|
224
234
|
readonly UPDATE: "UPDATE";
|
225
235
|
readonly EDITOR_SAVE: "EDITOR_SAVE";
|
226
236
|
readonly MAIN_HELPER: "MAIN_HELPER";
|
237
|
+
readonly WEB_PC_SDK: "WEB_PC_SDK";
|
238
|
+
readonly SIGN_CHECKER_GUARANTEED_PAYMENT: "SIGN_CHECKER_GUARANTEED_PAYMENT";
|
239
|
+
readonly SIGN_CHECKER_TRADE_SYSTEM: "SIGN_CHECKER_TRADE_SYSTEM";
|
240
|
+
readonly TEST_QRCODE: "TEST_QRCODE";
|
227
241
|
};
|
228
242
|
export declare const IDE_TIMELINE_NAMES: {
|
229
243
|
readonly SIMULATOR_FIRST_LOADING_END: "SIMULATOR_FIRST_LOADING_END";
|
@@ -245,6 +259,7 @@ export declare const IDE_TIMELINE_NAMES: {
|
|
245
259
|
readonly UPLOAD: "UPLOAD";
|
246
260
|
readonly SIGN_CHECK: "SIGN_CHECK";
|
247
261
|
readonly INTELLIGENCE: "INTELLIGENCE";
|
262
|
+
readonly PROJECT_INSPECTION: "PROJECT_INSPECTION";
|
248
263
|
readonly AI: "AI";
|
249
264
|
readonly SHARE_PROJECT: "SHARE_PROJECT";
|
250
265
|
readonly PROJECT_MANAGE: "PROJECT_MANAGE";
|
@@ -258,6 +273,10 @@ export declare const IDE_TIMELINE_NAMES: {
|
|
258
273
|
readonly UPDATE: "UPDATE";
|
259
274
|
readonly EDITOR_SAVE: "EDITOR_SAVE";
|
260
275
|
readonly MAIN_HELPER: "MAIN_HELPER";
|
276
|
+
readonly WEB_PC_SDK: "WEB_PC_SDK";
|
277
|
+
readonly SIGN_CHECKER_GUARANTEED_PAYMENT: "SIGN_CHECKER_GUARANTEED_PAYMENT";
|
278
|
+
readonly SIGN_CHECKER_TRADE_SYSTEM: "SIGN_CHECKER_TRADE_SYSTEM";
|
279
|
+
readonly TEST_QRCODE: "TEST_QRCODE";
|
261
280
|
};
|
262
281
|
/**
|
263
282
|
* IDE 性能统计 ipc 事件收敛
|
@@ -1,3 +1,15 @@
|
|
1
1
|
export declare enum CompilerPlugin {
|
2
2
|
TYPESCRIPT = "typescript"
|
3
3
|
}
|
4
|
+
export declare enum PACK_TYPE {
|
5
|
+
FILE = "file",
|
6
|
+
FOLDER = "folder",
|
7
|
+
SUFFIX = "suffix",
|
8
|
+
PREFIX = "prefix",
|
9
|
+
GLOB = "glob",
|
10
|
+
REGEXP = "regexp"
|
11
|
+
}
|
12
|
+
export declare type IPackItem = {
|
13
|
+
type: PACK_TYPE;
|
14
|
+
value: string;
|
15
|
+
};
|
@@ -15,6 +15,7 @@ export declare const UPDATE_SLARDAR_EVENTS: {
|
|
15
15
|
readonly IDE_FULLUPGRADE_POP_YESBACK: "IDE_FULLUPGRADE_POP_YESBACK";
|
16
16
|
readonly IDE_FULLUPGRADE_POP_YESONCE: "IDE_FULLUPGRADE_POP_YESONCE";
|
17
17
|
readonly IDE_FULLUPGRADE_POP_VIEWDETAIL: "IDE_FULLUPGRADE_POP_VIEWDETAIL";
|
18
|
+
readonly IDE_FORCE_UPGRADE: "IDE_FORCE_UPGRADE";
|
18
19
|
};
|
19
20
|
export declare const UPDATE_SLARDAR_EVENTS_TECH: {
|
20
21
|
IDE_LOADER_IO_ERROR: string;
|
@@ -3,7 +3,7 @@ import { ExtJSON } from './ext';
|
|
3
3
|
import { JSONContainer } from './jsons';
|
4
4
|
import type { ConditionItem } from './schema/base';
|
5
5
|
import type { IProject } from './schema/project';
|
6
|
-
import { CompilerPlugin } from '../constants/project';
|
6
|
+
import { CompilerPlugin, IPackItem } from '../constants/project';
|
7
7
|
import { GetEnvFunction } from '../network/axios';
|
8
8
|
import { IProjectPrivate } from './schema/project.private';
|
9
9
|
/**
|
@@ -51,6 +51,13 @@ export interface IProjectConfig extends IProject {
|
|
51
51
|
IDEPreviewHotRestartCache?: boolean;
|
52
52
|
useCompilerPlugins?: CompilerPlugin[];
|
53
53
|
bigPackageSizeSupport?: boolean;
|
54
|
+
webDetect?: boolean;
|
55
|
+
previewPreload?: boolean;
|
56
|
+
};
|
57
|
+
lynx?: {
|
58
|
+
debugSchema?: Record<string, {
|
59
|
+
schema: string;
|
60
|
+
}>;
|
54
61
|
};
|
55
62
|
condition?: {
|
56
63
|
miniprogram?: ConditionData;
|
@@ -63,6 +70,7 @@ export interface IProjectConfig extends IProject {
|
|
63
70
|
native: {
|
64
71
|
il2cpp: string;
|
65
72
|
apk: string;
|
73
|
+
fullApk?: string;
|
66
74
|
};
|
67
75
|
instantGame: string;
|
68
76
|
};
|
@@ -142,6 +150,18 @@ export declare class ProjectConfig extends JSONContainer<Partial<IProjectConfig>
|
|
142
150
|
getPreviewHotRestartCache(): boolean;
|
143
151
|
getMiniprogramRoot(): string;
|
144
152
|
getBigPackageSizeSupport(): boolean;
|
153
|
+
getWebDetect(): boolean;
|
154
|
+
getPreviewPreload(): boolean;
|
155
|
+
getPackOptions(): {
|
156
|
+
ignore: IPackItem[];
|
157
|
+
include: IPackItem[];
|
158
|
+
};
|
159
|
+
getLynxConfig(): {
|
160
|
+
debugSchema?: Record<string, {
|
161
|
+
schema: string;
|
162
|
+
}>;
|
163
|
+
};
|
164
|
+
getLynxPackage(): string;
|
145
165
|
/**
|
146
166
|
* Detect current project is 小程序 (`app.json`) or 游戏Like (`game.json`)
|
147
167
|
* @param match Optional comparison type
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export declare type InpInfo = {
|
2
|
+
metrics: {
|
3
|
+
inp: number;
|
4
|
+
inpt: number;
|
5
|
+
inputDelay: number;
|
6
|
+
processTime: number;
|
7
|
+
};
|
8
|
+
tags: {
|
9
|
+
outerHTML?: string;
|
10
|
+
type: string;
|
11
|
+
};
|
12
|
+
};
|
13
|
+
export declare type InpReporter = (inpInfo: InpInfo, stop: () => void) => void;
|
14
|
+
export declare function watchBrowserINP(reporter: InpReporter): PerformanceObserver;
|
15
|
+
/**
|
16
|
+
* 去除差异性安装路径,保持 dist 之后的内容
|
17
|
+
*/
|
18
|
+
export declare function getPathname(): string;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ElectronCommandClient } from '@slardar/electron';
|
2
2
|
import { BrowserCommandClient } from '@slardar/web';
|
3
|
+
export { getPathname } from './browser';
|
3
4
|
export declare function getCPUModel(): string;
|
4
5
|
export declare function getSystemMemory(): string;
|
5
6
|
export declare type SlardarClient = ElectronCommandClient | BrowserCommandClient;
|
@@ -46,10 +47,6 @@ export declare function commonParams2Context(commonParams: ICommonParams, global
|
|
46
47
|
system_memory: string;
|
47
48
|
};
|
48
49
|
export declare function getHref(): string;
|
49
|
-
/**
|
50
|
-
* 去除差异性安装路径,保持 dist 之后的内容
|
51
|
-
*/
|
52
|
-
export declare function getPathname(): string;
|
53
50
|
/**
|
54
51
|
* 存放打点需要在内存中缓存的数据及操作方法
|
55
52
|
*/
|
@@ -0,0 +1,26 @@
|
|
1
|
+
export declare function parseJson<T>(json: string, errorDefault?: {}): T;
|
2
|
+
export declare function waitUntil(task: () => Promise<boolean>, timeout?: number, interval?: number): Promise<boolean>;
|
3
|
+
export declare function sleep(millisecond: number): Promise<void>;
|
4
|
+
/**
|
5
|
+
* 延时重试任务
|
6
|
+
*/
|
7
|
+
export declare function retryTask(task: () => Promise<void>, tryCount?: number, delay?: number | (() => Promise<unknown>)): Promise<void>;
|
8
|
+
/**
|
9
|
+
* @description 输入现版本号与下一个版本号,比较两个版本大小
|
10
|
+
* @param [curVersion] - string 现版本号
|
11
|
+
* @param [nextVersion] - string 下一个版本号
|
12
|
+
* @return [-1] 下一个版本大于当前版本(合法)
|
13
|
+
* @return [1] 下一个版本小于当前版本(不合法)
|
14
|
+
* @return [0] 当前版本与下一个版本相同(不合法)
|
15
|
+
*/
|
16
|
+
export declare const versionStringCompare: (curVersion?: string, nextVersion?: string) => number;
|
17
|
+
export declare const isNeedForceUpdate: ({ curVersion, updateVersion, date, appType, }: {
|
18
|
+
curVersion: string;
|
19
|
+
updateVersion: string;
|
20
|
+
date: string;
|
21
|
+
appType: 'IDE' | 'CLI';
|
22
|
+
}) => {
|
23
|
+
message: string;
|
24
|
+
type: 'warn' | 'force';
|
25
|
+
} | null;
|
26
|
+
export declare function isSubPath(parent: string, child: string): boolean;
|
@@ -5,6 +5,7 @@ declare type UnityConfigType = {
|
|
5
5
|
native: {
|
6
6
|
il2cpp: string;
|
7
7
|
apk: string;
|
8
|
+
fullApk?: string;
|
8
9
|
};
|
9
10
|
instantGame: string;
|
10
11
|
};
|
@@ -48,7 +49,7 @@ export declare const unityCli: {
|
|
48
49
|
ctime: string;
|
49
50
|
version: string;
|
50
51
|
}>;
|
51
|
-
|
52
|
+
testQrcode: ({ projectPath, ideUid }: {
|
52
53
|
projectPath: string;
|
53
54
|
ideUid?: number;
|
54
55
|
}) => Promise<string>;
|
@@ -94,6 +95,40 @@ export declare const unityCli: {
|
|
94
95
|
} & {
|
95
96
|
publishType?: UnityConfigType['publishType'];
|
96
97
|
deviceOrientation?: UnityGameJson['deviceOrientation'];
|
98
|
+
output?: string;
|
97
99
|
}) => Promise<void>;
|
100
|
+
preview: ({ projectPath, ideUid, }: {
|
101
|
+
projectPath: string;
|
102
|
+
ideUid?: string;
|
103
|
+
}) => Promise<{
|
104
|
+
code: number;
|
105
|
+
data: {
|
106
|
+
short_url: string;
|
107
|
+
origin_schema: string;
|
108
|
+
expire_time: number;
|
109
|
+
};
|
110
|
+
msg: string;
|
111
|
+
}>;
|
112
|
+
makeSchema: ({ appId, ideConfig, ctime, }: {
|
113
|
+
appId: string;
|
114
|
+
ideConfig: any;
|
115
|
+
ctime: number;
|
116
|
+
}) => Promise<{
|
117
|
+
code: number;
|
118
|
+
data: {
|
119
|
+
short_url: string;
|
120
|
+
origin_schema: string;
|
121
|
+
expire_time: number;
|
122
|
+
};
|
123
|
+
msg: string;
|
124
|
+
}>;
|
125
|
+
previewForCli: ({ projectPath, output, }: {
|
126
|
+
projectPath: string;
|
127
|
+
output?: string;
|
128
|
+
}) => Promise<{
|
129
|
+
short_url: string;
|
130
|
+
origin_schema: string;
|
131
|
+
expire_time: number;
|
132
|
+
}>;
|
98
133
|
};
|
99
134
|
export {};
|
@@ -1,13 +1,14 @@
|
|
1
1
|
/**
|
2
2
|
* 文件系统相关
|
3
3
|
*/
|
4
|
+
import { ProjectConfig } from '@byted/miniprogram-utils/dist/data/project';
|
4
5
|
/** MB 转 Byte 数,即 mb * 1024 * 1024 */
|
5
6
|
export declare const mb2Byte: (mb: number) => number;
|
6
7
|
/** Byte size 转 MB,即 byte / 1024 / 1024,默认保留 4 位小数 */
|
7
8
|
export declare const byte2Mb: (byte: number, fixed?: number) => number;
|
8
9
|
/** 获取文件字节数体积,实际上文件夹也支持,获取的是文件夹本身占用的系统体积(测试为 128Byte) */
|
9
|
-
export declare const getFileByteSize: (path: string) => number;
|
10
|
+
export declare const getFileByteSize: (path: string, projectConfig: ProjectConfig) => number;
|
10
11
|
/** 获取指定目录下所有文件体积和,支持 glob pattern ignore */
|
11
|
-
export declare const getDirByteSize: (path: string, ignore
|
12
|
+
export declare const getDirByteSize: (path: string, ignore: string[], whiteList: string[], projectConfig: ProjectConfig) => Promise<number>;
|
12
13
|
/** 获取指定路径(兼容文件 / 整个目录)大小 Byte 数 */
|
13
|
-
export declare const getPathByteSize: (path: string, ignore
|
14
|
+
export declare const getPathByteSize: (path: string, ignore: any[], whiteList: string[], projectConfig: ProjectConfig) => number | Promise<number>;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* 小游戏源码、打包相关
|
3
3
|
*/
|
4
|
+
import { ProjectConfig } from '@byted/miniprogram-utils/dist/data/project';
|
4
5
|
/** 不参与体积计算的 glob pattern */
|
5
6
|
export declare const PKG_SIZE_IGNORE_GLOBS: string[];
|
6
7
|
/** 计算包哈希时不参与计算的文件匹配规则 */
|
@@ -23,7 +24,7 @@ export declare const getSizeLimitConfig: (appId: string) => Promise<{
|
|
23
24
|
* @param root 小游戏路径
|
24
25
|
* @returns 错误信息,空串表示校验通过
|
25
26
|
*/
|
26
|
-
export declare const verifyPkgSize: (root: string) => Promise<string>;
|
27
|
+
export declare const verifyPkgSize: (root: string, projectConfig: ProjectConfig) => Promise<string>;
|
27
28
|
export declare const getDirHash: (dirPath: string) => Promise<string>;
|
28
29
|
export declare function compressZip(filePath: string, tempStoragePath: string, extraIgnore?: string[]): Promise<string>;
|
29
30
|
export declare const checkUCAppId: (appId: string) => boolean;
|
@@ -1,18 +1,32 @@
|
|
1
1
|
/**
|
2
2
|
* Utils for microapp packages
|
3
3
|
*/
|
4
|
-
import type { ProjectConfig } from '@byted/miniprogram-utils/dist/data/project';
|
4
|
+
import type { IProjectConfig, ProjectConfig } from '@byted/miniprogram-utils/dist/data/project';
|
5
5
|
import { ProjectSize } from '@byted/miniprogram-utils/typings/project';
|
6
6
|
import archiver from 'archiver';
|
7
7
|
import fg from 'fast-glob';
|
8
8
|
/**
|
9
9
|
* 计算给定文件夹下面的文件体积总值
|
10
|
-
*
|
11
|
-
* @param
|
12
|
-
* @param
|
13
|
-
* @
|
10
|
+
*
|
11
|
+
* @param {Object} params - 参数对象
|
12
|
+
* @param {string} params.folderPath - 要计算大小的文件夹路径
|
13
|
+
* @param {boolean} params.useTypeScript - 是否使用TypeScript
|
14
|
+
* @param {fg.Options} [params.options={}] - pass to fast-glob
|
15
|
+
* @param {boolean} params.isGame - 是否为小玩法或小游戏
|
16
|
+
* @param {string[]} [params.gameFiles] - 小游戏文件列表
|
17
|
+
* @param {string} params.rootPath - 项目根路径
|
18
|
+
* @param {IProjectConfig['packOptions']} params.packOptions - 打包配置选项
|
19
|
+
* @returns {Promise<number>} - 返回包含文件夹大小的Promise
|
14
20
|
*/
|
15
|
-
export declare function getFolderSize(folderPath
|
21
|
+
export declare function getFolderSize({ folderPath, useTypeScript, options, isGame, gameFiles, rootPath, packOptions, }: {
|
22
|
+
folderPath: string;
|
23
|
+
useTypeScript: boolean;
|
24
|
+
options?: fg.Options;
|
25
|
+
isGame: boolean;
|
26
|
+
gameFiles?: string[];
|
27
|
+
rootPath: string;
|
28
|
+
packOptions: IProjectConfig['packOptions'];
|
29
|
+
}): Promise<number>;
|
16
30
|
/**
|
17
31
|
* 以文件夹为单位的包体积统计,不适用于依赖分析
|
18
32
|
*
|
@@ -25,7 +25,7 @@ declare type CompileProgressResult = {
|
|
25
25
|
} & Record<string, any>;
|
26
26
|
};
|
27
27
|
export declare function checkProjectMatchAppid(projectConfig: ProjectConfig, appid?: string): Promise<void>;
|
28
|
-
declare type PreviewOption = Pick<ProjectToQRCodeOption, 'project' | 'page' | 'qrcode' | 'cache' | 'copyToClipboard' | 'extraInfoJson' | 'localCompileVersion' | 'ideConfig' | 'interactGame' | 'penetrateMapJson'>;
|
28
|
+
declare type PreviewOption = Pick<ProjectToQRCodeOption, 'project' | 'page' | 'qrcode' | 'cache' | 'copyToClipboard' | 'extraInfoJson' | 'localCompileVersion' | 'ideConfig' | 'interactGame' | 'penetrateMapJson' | 'lynxPackages' | 'useLocalSchema'>;
|
29
29
|
/**
|
30
30
|
* 预览上传(功能入口)
|
31
31
|
* @param options
|
@@ -84,12 +84,15 @@ export declare type ProjectToQRCodeOption = {
|
|
84
84
|
enableHotRestartCache?: boolean;
|
85
85
|
penetrateMapJson?: Record<string, unknown>;
|
86
86
|
traceVersion?: number;
|
87
|
+
traceMode?: number;
|
87
88
|
updateStatus?: (status: {
|
88
89
|
upload: number;
|
89
90
|
check: number;
|
90
91
|
compile: number;
|
91
92
|
}) => any;
|
92
93
|
setCheckResult?: (result: any) => any;
|
94
|
+
lynxPackages?: string;
|
95
|
+
useLocalSchema?: string;
|
93
96
|
};
|
94
97
|
export declare function projectToQRCode(options: ProjectToQRCodeOption, hashTimeout?: number): Promise<ProjectQRCode>;
|
95
98
|
export {};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { ProjectToQRCodeOption } from '../features/preview';
|
1
2
|
export interface MakeSchemaResult {
|
2
3
|
originSchema: string;
|
3
4
|
shortUrl: string;
|
@@ -13,6 +14,9 @@ interface QRCodeQuery extends RoomInfo {
|
|
13
14
|
interface BDPLog {
|
14
15
|
launch_from: string;
|
15
16
|
location: string;
|
17
|
+
entrance_form?: string;
|
18
|
+
enter_from_merge?: string;
|
19
|
+
enter_position?: string;
|
16
20
|
}
|
17
21
|
export declare type IDEConfig = IDEBaseConfig & IDESandboxConfig;
|
18
22
|
export declare type IDEExtraInfo = {
|
@@ -21,6 +25,7 @@ export declare type IDEExtraInfo = {
|
|
21
25
|
local_room_service_url?: string;
|
22
26
|
packages_token?: string;
|
23
27
|
is_app_auto_test?: boolean;
|
28
|
+
preload?: '0' | '1';
|
24
29
|
};
|
25
30
|
export interface IDEBaseConfig {
|
26
31
|
previewScene: 'live' | 'default';
|
@@ -38,6 +43,7 @@ export interface IDEBaseConfig {
|
|
38
43
|
websocket: string | null;
|
39
44
|
};
|
40
45
|
extraInfo?: IDEExtraInfo;
|
46
|
+
performanceTest?: boolean;
|
41
47
|
}
|
42
48
|
export interface IDESandboxConfig {
|
43
49
|
isSandbox?: boolean;
|
@@ -68,6 +74,9 @@ export declare type MakeSchemaOption = {
|
|
68
74
|
type: string;
|
69
75
|
penetrateMapJson?: Record<string, unknown>;
|
70
76
|
traceVersion?: number;
|
77
|
+
traceMode?: number;
|
78
|
+
uploadOptions?: ProjectToQRCodeOption['uploadOptions'];
|
79
|
+
lynxSchema?: string;
|
71
80
|
};
|
72
81
|
export declare function makeSchema(options: MakeSchemaOption): Promise<MakeSchemaResult>;
|
73
82
|
export declare function toQRCodeSVG(str: string): Promise<string>;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
2
|
+
export declare function getIDESettings(options?: AxiosRequestConfig): Promise<any>;
|
3
|
+
export declare function getForceUpdateConfig(appType: 'microapp' | 'microgame'): Promise<{
|
4
|
+
date: any;
|
5
|
+
updateVersion: any;
|
6
|
+
}>;
|
7
|
+
export declare function isCliNeedForceUpdate(appType: 'microapp' | 'microgame'): Promise<any>;
|
@@ -6,4 +6,31 @@ declare function open(options: {
|
|
6
6
|
project: ProjectInfo;
|
7
7
|
remotePort?: number;
|
8
8
|
}): Promise<void>;
|
9
|
-
|
9
|
+
declare const unity: {
|
10
|
+
preview: ({ projectPath, output, }: {
|
11
|
+
projectPath: string;
|
12
|
+
output?: string;
|
13
|
+
}) => Promise<{
|
14
|
+
short_url: string;
|
15
|
+
origin_schema: string;
|
16
|
+
expire_time: number;
|
17
|
+
}>;
|
18
|
+
upload: (options: {
|
19
|
+
projectPath: string;
|
20
|
+
version: string;
|
21
|
+
publishDesc?: string;
|
22
|
+
ideUid?: number;
|
23
|
+
} & Pick<{
|
24
|
+
projectPath: string;
|
25
|
+
version: string;
|
26
|
+
publishDesc?: string;
|
27
|
+
ideUid?: number;
|
28
|
+
}, "projectPath" | "version" | "ideUid"> & {
|
29
|
+
updateStatus?: (status: string | number) => void;
|
30
|
+
} & {
|
31
|
+
publishType?: "0" | "1" | "2" | "3" | "4" | "5";
|
32
|
+
deviceOrientation?: "portrait" | "landscape";
|
33
|
+
output?: string;
|
34
|
+
}) => Promise<void>;
|
35
|
+
};
|
36
|
+
export { preview, upload, open, unity };
|