tt-minigame-ide-cli 2.0.4 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,6 @@ export declare const SLARDAR_EVENT: {
10
10
  readonly VELA_UPLOAD_TIME: "VELA_UPLOAD_TIME";
11
11
  readonly VELA_COMPILE_FIRST_END: "VELA_COMPILE_FIRST_END";
12
12
  readonly VELA_COMPILE_TIME: "VELA_COMPILE_TIME";
13
- readonly PUCK_COMPILE_ERROR: "PUCK_COMPILE_ERROR";
14
13
  readonly IDE_COMPILE_PERFORMANCE: "IDE_COMPILE_PERFORMANCE";
15
14
  readonly IDE_COMPILE_RESULT: "IDE_COMPILE_RESULT";
16
15
  readonly VELA_SIMULATOR_RENDER_TIME: "VELA_SIMULATOR_RENDER_TIME";
@@ -61,6 +60,7 @@ export declare const SLARDAR_EVENT: {
61
60
  readonly IDE_REQUEST_START: "IDE_REQUEST_START";
62
61
  readonly IDE_REQUEST_FAIL: "IDE_REQUEST_FAIL";
63
62
  readonly IDE_COLOR_THEME: "IDE_COLOR_THEME";
63
+ readonly IDE_CODE_WINDOW_ERROR: "IDE_CODE_WINDOW_ERROR";
64
64
  readonly IDE_HELP_DEVELOPER_COMMUNITY: "IDE_HELP_DEVELOPER_COMMUNITY";
65
65
  readonly IDE_MESSAGE_EXPAND_CLICK: "IDE_MESSAGE_EXPAND_CLICK";
66
66
  readonly IDE_MODULE_CLICK: "IDE_MODULE_CLICK";
@@ -80,7 +80,9 @@ export declare const SLARDAR_EVENT: {
80
80
  readonly IDE_SCENE_END: "IDE_SCENE_END";
81
81
  readonly IDE_APPID_SELECT: "IDE_APPID_SELECT";
82
82
  readonly IDE_APPID_CHANGE: "IDE_APPID_CHANGE";
83
- readonly IDE_JS_BLOCK: "IDE_JS_BLOCK";
83
+ readonly IDE_FMP_BREAKDOWN: "IDE_FMP_BREAKDOWN";
84
+ readonly IDE_JS_LONG_TASK: "IDE_JS_LONG_TASK";
85
+ readonly IDE_INP_INFO: "IDE_INP_INFO";
84
86
  readonly IDE_LOW_FPS: "IDE_LOW_FPS";
85
87
  readonly IDE_LOW_MEMORY: "IDE_LOW_MEMORY";
86
88
  readonly IDE_FETCH_ADMIN_XCONFIG_TMAR: "IDE_FETCH_ADMIN_XCONFIG_TMAR";
@@ -93,6 +95,7 @@ export declare const SLARDAR_EVENT: {
93
95
  readonly IDE_DETAIL_PANEL_CLOSED: "IDE_DETAIL_PANEL_CLOSED";
94
96
  readonly IDE_SETTING_PAGE_SHOW: "IDE_SETTING_PAGE_SHOW";
95
97
  readonly IDE_SETTING_PAGE_OPERATION: "IDE_SETTING_PAGE_OPERATION";
98
+ readonly IDE_SETTING_CHANGE_LITE_MODE: "IDE_SETTING_CHANGE_LITE_MODE:";
96
99
  readonly IDE_MODULE_CLICK_AUTH_REG: "IDE_MODULE_CLICK_AUTH_REG";
97
100
  readonly IDE_MODULE_CLICK_AUTH_UNREGPOP_REG: "IDE_MODULE_CLICK_AUTH_UNREGPOP_REG";
98
101
  readonly IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL: "IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL";
@@ -118,7 +121,32 @@ export declare const SLARDAR_EVENT: {
118
121
  readonly IDE_SCENE_USER_OPERATE: "IDE_SCENE_USER_OPERATE";
119
122
  readonly IDE_TEMPLATE_HOVER: "IDE_TEMPLATE_HOVER";
120
123
  readonly IDE_TEMPLATE_DETAIL: "IDE_TEMPLATE_DETAIL";
124
+ readonly IDE_TEMPLATE_ERROR: "IDE_TEMPLATE_ERROR";
125
+ readonly IDE_TEMPLATE_DOWNLOAD: "IDE_TEMPLATE_DOWNLOAD";
121
126
  readonly IDE_QUICK_JS_ERROR: "IDE_QUICK_JS_ERROR";
127
+ readonly IDE_REMOTE_DEBUG_CONNECTION_QUALITY: "IDE_REMOTE_DEBUG_CONNECTION_QUALITY";
128
+ readonly IDE_REMOTE_DEBUG_EXCEPTION: "IDE_REMOTE_DEBUG_EXCEPTION";
129
+ readonly IDE_MODULE_AUTH_FORCE_LOGOUT: "IDE_MODULE_AUTH_FORCE_LOGOUT";
130
+ readonly IDE_CANVAS_WEBGL_CONTEXT_ENABLE: "IDE_CANVAS_WEBGL_CONTEXT_ENABLE";
131
+ readonly IDE_LOGIN_DATA_FORMAT: "IDE_LOGIN_DATA_FORMAT";
132
+ readonly IDE_ADD_COMPILE_MODE: "IDE_ADD_COMPILE_MODE";
133
+ readonly IDE_DECODE_QRCODE: "IDE_DECODE_QRCODE";
134
+ readonly IDE_DECODE_URL: "IDE_DECODE_URL";
135
+ readonly IDE_MAIN_HELPER_FORK_TIME: "IDE_MAIN_HELPER_FORK_TIME";
136
+ readonly IDE_INSTALL_PATH: "IDE_INSTALL_PATH";
137
+ readonly IDE_SWITCH_WORKBENCH_MODE: "IDE_SWITCH_WORKBENCH_MODE";
138
+ readonly IDE_TOGGLE_REMOTE_VIEW: "IDE_TOGGLE_REMOTE_VIEW";
139
+ readonly IDE_SIMULATOR_PAUSE_MINIAPP: "IDE_SIMULATOR_PAUSE_MINIAPP";
140
+ readonly IDE_SIMULATOR_REFRESH_MINIAPP: "IDE_SIMULATOR_REFRESH_MINIAPP";
141
+ readonly IDE_SIMULATOR_REFRESH: "IDE_SIMULATOR_REFRESH";
142
+ readonly IDE_SIMULATOR_CLICK_LITE_BANNER: "IDE_SIMULATOR_CLICK_LITE_BANNER";
143
+ readonly IDE_LITE_MODE_ENTER: "IDE_LITE_MODE_ENTER";
144
+ readonly IDE_LITE_NOTICE_MODAL_SHOW: "IDE_LITE_NOTICE_MODAL_SHOW";
145
+ readonly IDE_LITE_NOTICE_MODAL_CLICK: "IDE_LITE_NOTICE_MODAL_CLICK";
146
+ readonly IDE_WB_SCENE_START: "IDE_WB_SCENE_START";
147
+ readonly IDE_WB_SCENE_END: "IDE_WB_SCENE_END";
148
+ readonly IDE_GECKO_ERROR: "IDE_GECKO_ERROR";
149
+ readonly PUCK_COMPILE_ERROR: "PUCK_COMPILE_ERROR";
122
150
  readonly IDE_LOADER_IO_ERROR: string;
123
151
  readonly IDE_LOADER_INSTALL_RECOVER_ERROR: string;
124
152
  readonly IDE_LOADER_START_FROM_ENTRY: string;
@@ -175,6 +203,7 @@ export declare const IDE_MODULES: {
175
203
  export declare const IDE_TIMELINE_NAMES: {
176
204
  readonly SIMULATOR_FIRST_LOADING_END: "SIMULATOR_FIRST_LOADING_END";
177
205
  readonly SIMULATOR_LOADING: "SIMULATOR_LOADING";
206
+ readonly LOCAL_COMPILE: "LOCAL_COMPILE";
178
207
  readonly LOGIN: "LOGIN";
179
208
  readonly MESSAGE: "MESSAGE";
180
209
  readonly SIMULATOR: "SIMULATOR";
@@ -15,6 +15,8 @@ export interface IApp extends BaseApp {
15
15
  };
16
16
  path?: string;
17
17
  };
18
+ openDataContext?: string;
19
+ deviceOrientation?: 'landscape' | 'portrait';
18
20
  }
19
21
  /**
20
22
  * JSON object wrapper for `app.json`
@@ -5,6 +5,7 @@ import type { ConditionItem } from './schema/base';
5
5
  import type { IProject } from './schema/project';
6
6
  import { CompilerPlugin } from '../constants/project';
7
7
  import { GetEnvFunction } from '../network/axios';
8
+ import { IProjectPrivate } from './schema/project.private';
8
9
  /**
9
10
  * 因为 @byted/miniprogram-utils 都是分模块打包和引入的,两个模块之间不共享数据,所以需要单独设置
10
11
  * todo 其他文件都直接引入 @byted/miniprogram-utils 而不是 @byted/miniprogram-utils/dist/xxx/xxx
@@ -40,7 +41,7 @@ export interface IProjectConfig extends IProject {
40
41
  minified: boolean;
41
42
  newFeature: boolean;
42
43
  autoCompile?: boolean;
43
- mockUpdate?: boolean;
44
+ compileHotReLoad?: boolean;
44
45
  scripts?: boolean;
45
46
  localPlugins?: boolean;
46
47
  nodeModules?: boolean;
@@ -54,6 +55,7 @@ export interface IProjectConfig extends IProject {
54
55
  miniprogram?: ConditionData;
55
56
  game?: ConditionData;
56
57
  };
58
+ douyinProjectType?: string;
57
59
  }
58
60
  /**
59
61
  * 此处的技术类型与 ide 的技术类型有区别
@@ -65,18 +67,34 @@ export interface IProjectConfig extends IProject {
65
67
  */
66
68
  declare type TechType = 'app' | 'game' | 'toybox';
67
69
  declare type IDEAppTechType = 'microapp' | 'toybox' | 'microgame' | 'microapp-minicode' | 'toybox-minicode' | 'microgame-minicode' | '';
70
+ export declare const PROJECT_TYPE_MAP: Record<string, TechType>;
68
71
  export declare function setIDEAppTechType(type: IDEAppTechType): void;
69
72
  export declare function getIDEAppTechType(): IDEAppTechType;
70
73
  export declare function isTestAppid(appid: string): boolean;
71
74
  export declare function getOriginAppid(appid: string, type?: TechType): string;
75
+ export declare type KeyMap = Record<string, PrivateState | {
76
+ [key in string]: PrivateState | KeyMap;
77
+ }>;
78
+ export declare enum PrivateState {
79
+ ALWAYS = "ALWAYS",
80
+ NORMAL = "NORMAL"
81
+ }
72
82
  /**
73
83
  * 包裹 ProjectConfigJSON 文件的读取。
74
84
  *
75
85
  * 绝大部分数据读取都会在此处有 fallback default value。
76
86
  * 上层调用时,通常是不需要再处理了,使用时请小心。
77
87
  */
78
- export declare class ProjectConfig extends JSONContainer<IProjectConfig> {
88
+ export declare class ProjectConfig extends JSONContainer<Partial<IProjectConfig>> {
89
+ static readonly PRIVATE_CONFIG_KEYS: KeyMap;
90
+ private static _keyPath;
91
+ static getKeyPath(): [string, PrivateState][];
92
+ static getKeyPathList(): string[];
93
+ private static generateList;
79
94
  static from(projectPath: string): Promise<ProjectConfig>;
95
+ static fromJson(json: Record<string, any>, projectPath: string): ProjectConfig;
96
+ static getMergedConfig(publicConfig: Partial<IProjectConfig>, privateConfig: Partial<IProjectPrivate>): Partial<IProjectConfig>;
97
+ update<K extends keyof IProjectConfig>(key: K, value: IProjectConfig[K], write?: boolean): Promise<void>;
80
98
  /**
81
99
  * @param projectPath path to the project that contains `project.config.json`
82
100
  */
@@ -84,14 +102,22 @@ export declare class ProjectConfig extends JSONContainer<IProjectConfig> {
84
102
  * project path
85
103
  */
86
104
  readonly projectPath: string;
87
- constructor(json: IProjectConfig, filepath: string, projectPath: string);
105
+ private readonly privateConfigPath;
106
+ private readonly publicJson;
107
+ private privateJson;
108
+ private _enablePrivateConfig;
109
+ private constructor();
110
+ enablePrivateConfig(mergedJson: Partial<IProjectConfig>, privateJson: Partial<IProjectPrivate>): void;
111
+ getPublicRawJSON(): Partial<IProjectConfig>;
112
+ getPrivateRawJSON(): Partial<IProjectPrivate>;
88
113
  getAppid(): string;
89
114
  getRealAppid(): Promise<string>;
90
115
  getSetting(): IProjectConfig['setting'];
91
116
  getProjectName(): string;
92
117
  getScripts(): IProjectConfig['scripts'];
93
- getConditionData(conditionKeyName: keyof IProjectConfig['condition']): ConditionData;
118
+ getConditionData(conditionKeyName: keyof NonNullable<IProjectConfig['condition']>): ConditionData;
94
119
  getAutoCompileSetting(): boolean;
120
+ getCompileHotReloadSetting(): boolean;
95
121
  getLocalPluginsSetting(): boolean;
96
122
  getAfterOpenScript(): string;
97
123
  getBeforeCompileScript(): string;
@@ -25,4 +25,4 @@ declare const AxiosInstance: AxiosInstanceType;
25
25
  declare function setEnvFunction(fn: GetEnvFunction): void;
26
26
  declare function setSlardarInstance(obj: ISlardarInstance): void;
27
27
  declare function setJestMock<T extends keyof AxiosInstanceType>(mockInstance: object): void;
28
- export { AxiosInstance, defaultEnv, GetEnvFunction, setEnvFunction, setSlardarInstance, setJestMock };
28
+ export { AxiosInstance, defaultEnv, IEnvConfig, GetEnvFunction, setEnvFunction, setSlardarInstance, setJestMock };
@@ -8,6 +8,6 @@ export declare const byte2Mb: (byte: number, fixed?: number) => number;
8
8
  /** 获取文件字节数体积,实际上文件夹也支持,获取的是文件夹本身占用的系统体积(测试为 128Byte) */
9
9
  export declare const getFileByteSize: (path: string) => number;
10
10
  /** 获取指定目录下所有文件体积和,支持 glob pattern ignore */
11
- export declare const getDirByteSize: (path: string, ignore?: any[]) => Promise<number>;
11
+ export declare const getDirByteSize: (path: string, ignore?: string[], whiteList?: string[]) => Promise<number>;
12
12
  /** 获取指定路径(兼容文件 / 整个目录)大小 Byte 数 */
13
- export declare const getPathByteSize: (path: string, ignore?: any[]) => number | Promise<number>;
13
+ export declare const getPathByteSize: (path: string, ignore?: any[], whiteList?: string[]) => number | Promise<number>;
@@ -1,3 +1,5 @@
1
1
  export default function openProject(options: {
2
2
  projectPath: string;
3
+ mode?: 'full' | 'lite';
4
+ type: 'microapp' | 'microgame' | 'toybox';
3
5
  }, remotePort?: number): Promise<void>;
@@ -5,6 +5,7 @@ import type { 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
+ import { IApp } from '@byted/miniprogram-utils/dist/data/app';
8
9
  /**
9
10
  * 计算给定文件夹下面的文件体积总值
10
11
  * @param folderPath directory path
@@ -12,7 +13,7 @@ import fg from 'fast-glob';
12
13
  * @param options pass to fast-glob
13
14
  * @returns
14
15
  */
15
- export declare function getFolderSize(folderPath: string, useTypeScript: boolean, options?: fg.Options): Promise<number>;
16
+ export declare function getFolderSize(folderPath: string, useTypeScript: boolean, options: fg.Options, isGame: boolean, gameFiles?: string[]): Promise<number>;
16
17
  /**
17
18
  * 以文件夹为单位的包体积统计,不适用于依赖分析
18
19
  *
@@ -21,7 +22,7 @@ export declare function getFolderSize(folderPath: string, useTypeScript: boolean
21
22
  * @param projectPath
22
23
  * @param isGame
23
24
  */
24
- export declare function getProjectSize(projectConfig: ProjectConfig, appJson: any, projectPath: string, isGame: boolean): Promise<ProjectSize>;
25
+ export declare function getProjectSize(projectConfig: ProjectConfig, appJson: IApp, projectPath: string, isGame: boolean): Promise<ProjectSize>;
25
26
  /**
26
27
  * 校验当前项目的分包体积是否符合要求
27
28
  * 若有错误,会抛出 promise 异常
@@ -38,13 +39,7 @@ declare type FolderToZipStreamOption = {
38
39
  *
39
40
  * @param dir path to folder
40
41
  */
41
- export declare function folderToZipStream(dir: string, { whiteList, useTypeScript }: FolderToZipStreamOption): Promise<archiver.Archiver>;
42
- /**
43
- *
44
- * @param dir path to microapp project
45
- * @returns
46
- */
47
- export declare function getProjectHash(dir: string): Promise<string>;
42
+ export declare function folderToZipStream(dir: string, { whiteList, useTypeScript }: FolderToZipStreamOption, isGame: boolean): Promise<archiver.Archiver>;
48
43
  /**
49
44
  * For cli only
50
45
  * @param input
@@ -31,10 +31,12 @@ declare type PreviewOption = Pick<ProjectToQRCodeOption, 'project' | 'page' | 'q
31
31
  * @returns
32
32
  */
33
33
  export declare function preview(options: PreviewOption): Promise<ProjectQRCode>;
34
- declare type UploadOption = Pick<ProjectToQRCodeOption, 'project' | 'qrcode' | 'copyToClipboard' | 'extraInfoJson' | 'localCompileVersion' | 'ideConfig' | 'interactGame' | 'penetrateMapJson'> & {
34
+ export declare type UploadOption = Pick<ProjectToQRCodeOption, 'project' | 'qrcode' | 'copyToClipboard' | 'extraInfoJson' | 'localCompileVersion' | 'ideConfig' | 'interactGame' | 'penetrateMapJson'> & {
35
35
  version: string;
36
36
  changeLog: string;
37
37
  needUploadSourcemap?: boolean;
38
+ needUploadCheck?: boolean;
39
+ extraCheckInfoJson?: string;
38
40
  };
39
41
  /**
40
42
  * 发布上传(功能入口)
@@ -58,6 +60,8 @@ export declare type ProjectToQRCodeOption = {
58
60
  version: string;
59
61
  changeLog: string;
60
62
  needUploadSourcemap: boolean;
63
+ needUploadCheck: boolean;
64
+ extraCheckInfoJson?: string;
61
65
  };
62
66
  extraInfoJson?: string;
63
67
  localCompileVersion?: string;
@@ -76,6 +80,13 @@ export declare type ProjectToQRCodeOption = {
76
80
  supportSourcemap?: boolean;
77
81
  enableHotRestartCache?: boolean;
78
82
  penetrateMapJson?: Record<string, unknown>;
83
+ traceVersion?: number;
84
+ updateStatus?: (status: {
85
+ upload: number;
86
+ check: number;
87
+ compile: number;
88
+ }) => any;
89
+ setCheckResult?: (result: any) => any;
79
90
  };
80
- export declare function projectToQRCode(options: ProjectToQRCodeOption): Promise<ProjectQRCode>;
91
+ export declare function projectToQRCode(options: ProjectToQRCodeOption, hashTimeout?: number): Promise<ProjectQRCode>;
81
92
  export {};
@@ -3,7 +3,7 @@ import { getConfig, setConfig } from './features/config';
3
3
  import { createProject } from './features/create';
4
4
  import { checkSession, loginByEmail, loginByPhone, logout, sendVerificationCodeToPhone } from './features/login';
5
5
  import { getProjectSize, verifySubPackageSize } from './features/packages';
6
- import { checkProjectMatchAppid, ProjectToQRCodeOption, preview, ProjectQRCode, projectToQRCode, upload } from './features/preview';
6
+ import { checkProjectMatchAppid, ProjectToQRCodeOption, preview, ProjectQRCode, projectToQRCode, UploadOption } from './features/preview';
7
7
  import { detectValidExtApp, INVALID_EXTAPP_REASON } from './features/third-party';
8
8
  import { ProjectInfo } from './types';
9
9
  import { setCookieFn } from './utils/cookie';
@@ -15,8 +15,11 @@ declare function open(options: {
15
15
  declare function buildNpmFunc(options: {
16
16
  project: ProjectInfo;
17
17
  }): Promise<import("./features/npm").BuildNpmResult>;
18
+ declare function upload(options: UploadOption): Promise<ProjectQRCode>;
18
19
  export { ProjectQRCode, ProjectToQRCodeOption };
19
20
  export { open, setConfig, createProject as create, loginByEmail, loginByPhone, logout, sendVerificationCodeToPhone, checkSession, audit, getAuditHostsList, buildNpmFunc as buildNpm, preview, upload, projectToQRCode, setCookieFn, getConfig, detectValidExtApp, getProjectSize, verifySubPackageSize, checkProjectMatchAppid, INVALID_EXTAPP_REASON, IDEConfig, makeSchema, MakeSchemaOption, MakeSchemaResult, IDESandboxConfig, };
20
21
  export * from './features/meta';
22
+ export { folderToZipStream } from './features/packages';
21
23
  export * from './utils/metrics';
22
24
  export * as microgame from './features/microgame';
25
+ export { getProjectHash, setProjectHashFn } from './utils/hash';
@@ -6,7 +6,9 @@ export declare class CliMonitor {
6
6
  private static _instance;
7
7
  private _didReportLaunch;
8
8
  private readonly _commonParams;
9
+ private _commonData;
9
10
  private constructor();
11
+ static updateCommonParams(newParams: Record<string, string | number | boolean>): void;
10
12
  static getInstance(config: CLIMonitorConfigOptions): CliMonitor;
11
13
  shouldReport(eventName: string): boolean;
12
14
  report(eventName: string, params?: Record<string, string | number | boolean>): void;
@@ -1,7 +1,10 @@
1
1
  export declare const CLI_EVENTS: {
2
2
  IDE_CLI_LAUNCH: string;
3
3
  IDE_CLI_COMMAND_CALL: string;
4
+ IDE_CLI_PREVIEW_SUCCESS: string;
4
5
  IDE_CLI_PREVIEW_FAIL: string;
6
+ IDE_CLI_UPLOAD_SUCCESS: string;
5
7
  IDE_CLI_UPLOAD_FAIL: string;
6
8
  IDE_CLI_ERROR: string;
9
+ IDE_LITE_MODE_ENTER: string;
7
10
  };
@@ -1,5 +1,6 @@
1
1
  export interface ProjectInfo {
2
2
  path: string;
3
+ mode?: 'full' | 'lite';
3
4
  }
4
5
  export interface TMACliConfig {
5
6
  proxy: string | null;
@@ -10,6 +11,7 @@ export interface TMACliConfig {
10
11
  compileProgress: string;
11
12
  preview: string;
12
13
  upload: string;
14
+ check: string;
13
15
  emailLogin: string;
14
16
  mobileLogin: string;
15
17
  sendLoginCode: string;
@@ -1,6 +1,7 @@
1
1
  declare type GetCookieFunction = () => Promise<string>;
2
2
  export declare let getUserCookies: GetCookieFunction;
3
- export declare function saveUserCookies(cookies: string[]): void;
3
+ export declare const getUserId: () => string;
4
+ export declare function saveUserCookies(cookies: string[], userId: string): void;
4
5
  export declare function removeUserCookies(): void;
5
6
  export declare function setCookieFn(fn: GetCookieFunction): void;
6
7
  export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ *
3
+ * @param dir path to microapp project
4
+ * @param timeout 预留给worker进程hash逻辑使用参数
5
+ * @returns
6
+ */
7
+ export declare let getProjectHash: (dir: string, isGame: boolean, timeout?: number) => Promise<string>;
8
+ /**
9
+ * IDE workbench 中调用该函数,最终会在MainHelperWindow中计算hash
10
+ */
11
+ export declare function setProjectHashFn(fn: typeof getProjectHash): Promise<void>;
@@ -15,6 +15,12 @@ interface BDPLog {
15
15
  location: string;
16
16
  }
17
17
  export declare type IDEConfig = IDEBaseConfig & IDESandboxConfig;
18
+ export declare type IDEExtraInfo = {
19
+ ip?: string;
20
+ subnet?: string;
21
+ local_room_service_url?: string;
22
+ packages_token?: string;
23
+ };
18
24
  export interface IDEBaseConfig {
19
25
  previewScene: 'live' | 'default';
20
26
  ideVersion: string;
@@ -25,11 +31,12 @@ export interface IDEBaseConfig {
25
31
  inspectPlatform?: DevicePlatform;
26
32
  iOSDebugVersion?: string;
27
33
  connectType?: 'push' | 'scan';
28
- localDebug?: 'true' | 'false';
34
+ localDebug?: boolean;
29
35
  dycloudConfig?: {
30
36
  callContainer: string | null;
31
37
  websocket: string | null;
32
38
  };
39
+ extraInfo?: IDEExtraInfo;
33
40
  }
34
41
  export interface IDESandboxConfig {
35
42
  isSandbox?: boolean;
@@ -59,6 +66,7 @@ export declare type MakeSchemaOption = {
59
66
  hotRestartHash?: string;
60
67
  type: string;
61
68
  penetrateMapJson?: Record<string, unknown>;
69
+ traceVersion?: number;
62
70
  };
63
71
  export declare function makeSchema(options: MakeSchemaOption): Promise<MakeSchemaResult>;
64
72
  export declare function toQRCodeSVG(str: string): Promise<string>;
@@ -54,3 +54,4 @@ export declare function getMD5Stream(source: archiver.Archiver): Promise<Transfo
54
54
  __md5: string;
55
55
  }>;
56
56
  export declare const getNextVersion: (version: string) => string;
57
+ export declare const isGameFileValid: (pattern: string) => boolean;
@@ -0,0 +1,2 @@
1
+ export declare const ALLOWED_MICROGAME_EXTS_REG: RegExp;
2
+ export declare function getWhiteList(isGame?: boolean): string[];
@@ -1,4 +1,9 @@
1
1
  import { microgame } from 'tt-ide-cli';
2
+ import type { ProjectInfo } from 'tt-ide-cli/types';
2
3
  declare const preview: typeof microgame.preview, upload: typeof microgame.upload;
3
4
  export { loginByEmail, loginByPhone, checkSession, buildNpm, setConfig, logout, } from 'tt-ide-cli';
4
- export { preview, upload };
5
+ declare function open(options: {
6
+ project: ProjectInfo;
7
+ remotePort?: number;
8
+ }): Promise<void>;
9
+ export { preview, upload, open };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tt-minigame-ide-cli",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "Command line interface for micro app development",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -18,7 +18,7 @@
18
18
  "dev": "yarn dev:cli",
19
19
  "dev:cli": "cross-env NODE_ENV=development webpack --config webpack.cli.js --progress --watch",
20
20
  "prepublishOnly": "yarn build:cli",
21
- "test": "npx patch-package && jest"
21
+ "test": "jest"
22
22
  },
23
23
  "dependencies": {
24
24
  "@tt-miniprogram/ext-pack": "1.0.33",
@@ -61,4 +61,4 @@
61
61
  "publishConfig": {
62
62
  "registry": "https://registry.npmjs.org"
63
63
  }
64
- }
64
+ }