tt-minigame-ide-cli 2.0.8 → 2.0.9

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.
@@ -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的模块统计
@@ -224,6 +233,9 @@ export declare const IDE_MODULES: {
224
233
  readonly UPDATE: "UPDATE";
225
234
  readonly EDITOR_SAVE: "EDITOR_SAVE";
226
235
  readonly MAIN_HELPER: "MAIN_HELPER";
236
+ readonly WEB_PC_SDK: "WEB_PC_SDK";
237
+ readonly SIGN_CHECKER_GUARANTEED_PAYMENT: "SIGN_CHECKER_GUARANTEED_PAYMENT";
238
+ readonly SIGN_CHECKER_TRADE_SYSTEM: "SIGN_CHECKER_TRADE_SYSTEM";
227
239
  };
228
240
  export declare const IDE_TIMELINE_NAMES: {
229
241
  readonly SIMULATOR_FIRST_LOADING_END: "SIMULATOR_FIRST_LOADING_END";
@@ -258,6 +270,9 @@ export declare const IDE_TIMELINE_NAMES: {
258
270
  readonly UPDATE: "UPDATE";
259
271
  readonly EDITOR_SAVE: "EDITOR_SAVE";
260
272
  readonly MAIN_HELPER: "MAIN_HELPER";
273
+ readonly WEB_PC_SDK: "WEB_PC_SDK";
274
+ readonly SIGN_CHECKER_GUARANTEED_PAYMENT: "SIGN_CHECKER_GUARANTEED_PAYMENT";
275
+ readonly SIGN_CHECKER_TRADE_SYSTEM: "SIGN_CHECKER_TRADE_SYSTEM";
261
276
  };
262
277
  /**
263
278
  * IDE 性能统计 ipc 事件收敛
@@ -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;
@@ -51,6 +51,8 @@ export interface IProjectConfig extends IProject {
51
51
  IDEPreviewHotRestartCache?: boolean;
52
52
  useCompilerPlugins?: CompilerPlugin[];
53
53
  bigPackageSizeSupport?: boolean;
54
+ webDetect?: boolean;
55
+ previewPreload?: boolean;
54
56
  };
55
57
  condition?: {
56
58
  miniprogram?: ConditionData;
@@ -142,6 +144,8 @@ export declare class ProjectConfig extends JSONContainer<Partial<IProjectConfig>
142
144
  getPreviewHotRestartCache(): boolean;
143
145
  getMiniprogramRoot(): string;
144
146
  getBigPackageSizeSupport(): boolean;
147
+ getWebDetect(): boolean;
148
+ getPreviewPreload(): boolean;
145
149
  /**
146
150
  * Detect current project is 小程序 (`app.json`) or 游戏Like (`game.json`)
147
151
  * @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,25 @@
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;
@@ -94,6 +94,7 @@ export declare const unityCli: {
94
94
  } & {
95
95
  publishType?: UnityConfigType['publishType'];
96
96
  deviceOrientation?: UnityGameJson['deviceOrientation'];
97
+ outputPath?: string;
97
98
  }) => Promise<void>;
98
99
  };
99
100
  export {};
@@ -84,6 +84,7 @@ 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;
@@ -7,4 +7,5 @@ export declare const CLI_EVENTS: {
7
7
  IDE_CLI_UPLOAD_FAIL: string;
8
8
  IDE_CLI_ERROR: string;
9
9
  IDE_LITE_MODE_ENTER: string;
10
+ IDE_CLI_FORCE_UPGRADE: string;
10
11
  };
@@ -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,8 @@ 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'];
71
79
  };
72
80
  export declare function makeSchema(options: MakeSchemaOption): Promise<MakeSchemaResult>;
73
81
  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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tt-minigame-ide-cli",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "Command line interface for micro app development",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",