miniprogram-ci 2.1.26-alpha.1 → 2.1.27

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ #### 2.1.27
2
+ - `new` 优化 cos 上传链路
3
+ #### 2.1.20
4
+ - `fix` 修复 onProgressUpdate 未指定时输出多余日志
1
5
  #### 2.1.19
2
6
  - `fix` 修复 当使用多个多端插件时出现的下载失败问题
3
7
  - `fix` 修复 分包 entry 被无依赖过滤的问题
package/README.md CHANGED
@@ -7,6 +7,10 @@ miniprogram-ci 是从[微信开发者工具](https://developers.weixin.qq.com/mi
7
7
  miniprogram-ci 从 1.0.28 开始支持第三方平台开发的上传和预览,调用方式与普通开发模式无异。[查看详情](#第三方平台开发)
8
8
 
9
9
  ## 最近变更
10
+ #### 2.1.27
11
+ - `new` 优化 cos 上传链路
12
+ #### 2.1.20
13
+ - `fix` 修复 onProgressUpdate 未指定时输出多余日志
10
14
  #### 2.1.19
11
15
  - `fix` 修复 当使用多个多端插件时出现的下载失败问题
12
16
  - `fix` 修复 分包 entry 被无依赖过滤的问题
@@ -1,6 +1,5 @@
1
- import { IMiniApp } from '~/types';
1
+ import { IMiniApp, MiniProgramCI } from '../types';
2
2
  import type { CIProject } from '../project/ciProject';
3
- import { MiniProgramCI } from '../types';
4
3
  import { IUploadOptions } from './upload';
5
4
  export interface IBuildIpaOptions extends IUploadOptions {
6
5
  project: CIProject;
@@ -1,12 +1,28 @@
1
1
  /// <reference types="node" />
2
2
  import { IProject } from '../types';
3
+ import { TBusinessType } from '../config/businesstype';
3
4
  export declare function innerRequest<T>(url: string, body: any): Promise<T>;
4
5
  export declare function uploadByCos(gzipBuffer: Buffer, commitUrl: string, project: IProject, robot: any): Promise<{
5
6
  fallback: boolean;
6
7
  body?: any;
7
8
  uploadCOSCostTime?: number;
8
9
  }>;
9
- export declare function uploadByCosSafely(buffer: Buffer, commitUrl: string, project: IProject, robot: any): Promise<{
10
+ export declare function uploadByCosSafely(buffer: Buffer, commitUrl: string, project: IProject, robot: any, businessType: TBusinessType, onProgressUpdate?: (progressData: any) => void): Promise<{
11
+ fallback: boolean;
12
+ body?: any;
13
+ uploadCOSCostTime?: number;
14
+ }>;
15
+ export declare function uploadByCosSafelyAsyncWithoutMulti(buffer: Buffer, commitUrl: string, project: IProject, robot: any): Promise<{
16
+ fallback: boolean;
17
+ body?: any;
18
+ uploadCOSCostTime?: number;
19
+ }>;
20
+ export declare function uploadByCosSafelyWithMultiUpload(filePath: string, commitUrl: string, project: IProject, robot: any, urlOptions: {
21
+ getUploadInfo: string;
22
+ getUploadSign: string;
23
+ getAsyncResult: string;
24
+ businessType: TBusinessType;
25
+ }, onProgress?: (progressData: any) => void): Promise<{
10
26
  fallback: boolean;
11
27
  body?: any;
12
28
  uploadCOSCostTime?: number;
@@ -11,9 +11,4 @@ export interface IUploadOptions {
11
11
  onProgressUpdate?: (task: MiniProgramCI.ITaskStatus | string) => void;
12
12
  }
13
13
  export declare function uploadGamePkg(options: IUploadOptions): Promise<IUploadResult>;
14
- export declare function uploadGamePkgPlugByCos(filePath: string, commitUrl: string, project: IProject, robot: any, onProgress?: (progressData: any) => void): Promise<{
15
- fallback: boolean;
16
- body?: any;
17
- uploadCOSCostTime?: number;
18
- }>;
19
14
  export {};
@@ -1,4 +1,4 @@
1
- import { IMiniApp } from '~/types';
1
+ import { IMiniApp } from '../../types';
2
2
  import { IBuildIpaOptions } from '../build-ipa';
3
3
  import { IBuildArchiveOpts } from '../build-apk';
4
4
  declare class IOSCloudBuild {
@@ -1,4 +1,4 @@
1
- import { IMiniApp } from '~/types';
1
+ import { IMiniApp } from '../../types';
2
2
  import { IBuildIpaOptions } from '../build-ipa';
3
3
  import { IBuildArchiveOpts } from '../build-apk';
4
4
  declare class IOSLocalBuild {
@@ -1,4 +1,5 @@
1
1
  import { IProject, MiniProgramCI } from '../types';
2
+ export declare const MIN_COS_UPLOAD_SIZE = 5242880;
2
3
  export interface IUploadOptions {
3
4
  project: IProject;
4
5
  version: string;
@@ -0,0 +1,10 @@
1
+ export declare const BUSINESS_TYPE: {
2
+ BusiType_UploadApkPlugin: number;
3
+ BusiType_UploadCpfPlugin: number;
4
+ BusiType_TestSource: number;
5
+ BusiType_CommitSource: number;
6
+ BusiType_BuildSource: number;
7
+ BusiType_CompileSource: number;
8
+ BusiType_AiCommitSource: number;
9
+ };
10
+ export type TBusinessType = typeof BUSINESS_TYPE[keyof typeof BUSINESS_TYPE];
@@ -1,5 +1,5 @@
1
1
  import { IProject } from '../types';
2
- export declare const CI_VERSION = "2.1.26";
2
+ export declare const CI_VERSION = "2.1.27";
3
3
  export declare const PARAM_ERROR = 10000;
4
4
  export declare const WXML_NOT_FOUND = 10007;
5
5
  export declare const JS_NOT_FOUND = 10008;
@@ -13,6 +13,9 @@ export declare const GAME_PKG_UPLOAD_URL: string;
13
13
  export declare const GET_GAME_PKG_ASYNC_RESULT: string;
14
14
  export declare const GET_GAME_PKG_UPLOAD_INFO: string;
15
15
  export declare const GET_GAME_PKG_UPLOAD_SIGN: string;
16
+ export declare const GET_MULTI_COS_ASYNC_RESULT: string;
17
+ export declare const GET_MULTI_COS_UPLOAD_INFO: string;
18
+ export declare const GET_MULTI_COS_UPLOAD_SIGN: string;
16
19
  export declare const GET_PLUG_PKG_GET_LIST: string;
17
20
  export declare const GET_PLUG_PKG_GET_URL: string;
18
21
  export declare const GET_PLUG_PKG_CHECK_USERVERSION: string;
@@ -0,0 +1 @@
1
+ export declare function genTempFile(): any;