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.
@@ -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;
@@ -1,7 +1,5 @@
1
1
  export declare enum CompilerPlugin {
2
- TYPESCRIPT = "typescript",
3
- LESS = "less",
4
- SASS = "sass"
2
+ TYPESCRIPT = "typescript"
5
3
  }
6
4
  export declare enum PACK_TYPE {
7
5
  FILE = "file",
@@ -26,7 +26,6 @@ export interface IApp extends BaseApp {
26
26
  version?: string;
27
27
  provider?: string;
28
28
  }>;
29
- enableIOSHighPerformanceMode?: boolean;
30
29
  enableIOSHighPerformanceModePlus?: boolean;
31
30
  }
32
31
  /**
@@ -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 {};
@@ -30,8 +30,6 @@ export declare type SizeLimitConfig = {
30
30
  openData: number;
31
31
  /** 试玩游戏最大 MB 数 */
32
32
  demo: number;
33
- apkSource?: number;
34
- il2cppSource?: number;
35
33
  };
36
34
  export declare type TmgSdkInfo = {
37
35
  latestSDKUrl: string;
@@ -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';
@@ -33,9 +33,6 @@ export interface TMACliConfig {
33
33
  unityCompileProgress: string;
34
34
  unityPreview: string;
35
35
  getChannelNumber: string;
36
- uploadMixed: string;
37
- previewMixed: string;
38
- compileProgressMixed: string;
39
36
  };
40
37
  playablegameUrl: {
41
38
  makeSchema: string;
@@ -2,4 +2,4 @@ export declare const ALLOWED_MICROGAME_EXTS_REG: RegExp;
2
2
  export declare function getWhiteList(isGame?: boolean, options?: {
3
3
  isLivePlugin?: boolean;
4
4
  isMicroappPlugin?: boolean;
5
- }, projectPath?: string): Promise<string[]>;
5
+ }): string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tt-minigame-ide-cli",
3
- "version": "2.0.16",
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,4 +0,0 @@
1
- export * from './mixed-cloud-compile';
2
- export * from './utils/mixed-package';
3
- export * from './meta';
4
- export * from './utils/mixed-constant';
@@ -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>;