miniprogram-ci 2.1.7 → 2.1.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.
- package/CHANGELOG.md +2 -0
- package/README.md +151 -0
- package/dist/@types/config/config.d.ts +1 -1
- package/dist/@types/modules/nativecompiler/ios/buildCloud.d.ts +3 -1
- package/dist/@types/modules/nativecompiler/ios/index.d.ts +1 -0
- package/dist/@types/project/baseProject.d.ts +3 -0
- package/dist/@types/schema/@types/appjson.d.ts +1 -1
- package/dist/@types/types/ci.d.ts +1 -0
- package/dist/@types/types/devtools.d.ts +1 -0
- package/dist/@types/types/miniapp/index.d.ts +2 -0
- package/dist/ci/android-miniapp-toolkit/dist/index.js +1 -1
- package/dist/config/config.js +1 -1
- package/dist/modules/corecompiler/original/npm/packnpm.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/index.js +1 -1
- package/dist/modules/corecompiler/summer/graph/appconf.js +1 -1
- package/dist/modules/createSummer.js +1 -1
- package/dist/modules/nativecompiler/ios/buildCloud.js +1 -1
- package/dist/modules/nativecompiler/ios/index.js +1 -1
- package/dist/project/baseProject.js +1 -1
- package/dist/schema/dist/app.js +2 -1
- package/dist/schema/dist/ext.js +4 -1
- package/dist/schema/dist/game.js +1 -1
- package/dist/schema/dist/page.js +3 -1
- package/dist/schema/dist/plugin.js +1 -1
- package/dist/schema/dist/pluginpage.js +1 -1
- package/dist/schema/dist/projectconfig.js +1 -1
- package/dist/schema/dist/projectprivateconfig.js +1 -1
- package/dist/schema/dist/sitemap.js +1 -1
- package/dist/schema/dist/theme.js +1 -1
- package/dist/utils/cosUpload.js +1 -1
- package/dist/utils/debug.js +1 -1
- package/dist/utils/subprocess/processManager.js +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,6 +7,8 @@ miniprogram-ci 是从[微信开发者工具](https://developers.weixin.qq.com/mi
|
|
|
7
7
|
miniprogram-ci 从 1.0.28 开始支持第三方平台开发的上传和预览,调用方式与普通开发模式无异。[查看详情](#第三方平台开发)
|
|
8
8
|
|
|
9
9
|
## 最近变更
|
|
10
|
+
#### 2.1.9
|
|
11
|
+
- `fix` 修复 miniprogramRoot 结尾没有 / 会影响babel编译的问题
|
|
10
12
|
#### 2.1.7
|
|
11
13
|
- `fix` 修复 同进程构建 Ipa 与 Apk 时条件编译错误
|
|
12
14
|
#### 2.1.6
|
|
@@ -783,6 +785,155 @@ const ci = require('miniprogram-ci')
|
|
|
783
785
|
ci.proxy('YOUR_PROXY_URL')
|
|
784
786
|
```
|
|
785
787
|
|
|
788
|
+
### 构建 Apk
|
|
789
|
+
```js
|
|
790
|
+
const ci = require('miniprogram-ci')
|
|
791
|
+
;(async () => {
|
|
792
|
+
const project = new ci.Project({
|
|
793
|
+
appid: 'wxsomeappid',
|
|
794
|
+
type: 'miniProgram',
|
|
795
|
+
projectPath: 'the/project/path',
|
|
796
|
+
privateKeyPath: 'the/path/to/privatekey',
|
|
797
|
+
ignores: ['node_modules/**/*'],
|
|
798
|
+
})
|
|
799
|
+
const buildResult = await ci.buildApk({
|
|
800
|
+
project,
|
|
801
|
+
keyAlias: 'keyAlias',
|
|
802
|
+
keyPass: 'keyPass',
|
|
803
|
+
keyStore: 'the/path/to/keystore',
|
|
804
|
+
storePass: 'storePass',
|
|
805
|
+
output: '/the/path/to/output',
|
|
806
|
+
desc: 'build apk from ci',
|
|
807
|
+
setting: {
|
|
808
|
+
es6: true,
|
|
809
|
+
},
|
|
810
|
+
})
|
|
811
|
+
console.log(uploadResult)
|
|
812
|
+
})()
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
#### 参数
|
|
816
|
+
|
|
817
|
+
同时支持传入 [ci.upload](#上传) 的参数
|
|
818
|
+
|
|
819
|
+
| 键 | 类型 | 必填 | 说明 |
|
|
820
|
+
| ---------------- | -------- | ---- | ------------------------------------- |
|
|
821
|
+
| project | IProject | 是 | [项目对象](#项目对象) |
|
|
822
|
+
| keyStore | string | 是 | 证书文件绝对路径 |
|
|
823
|
+
| keyPass | string | 是 | 证书密码 |
|
|
824
|
+
| storePass | string | 是 | 证书文件密码 |
|
|
825
|
+
| keyAlias | string | 是 | 证书别名 |
|
|
826
|
+
| output | string | 是 | 构建产物的保存路径,需要为系统绝对路径 |
|
|
827
|
+
| useAab | boolean | 否 | 默认 false |
|
|
828
|
+
| desc | string | 否 | 版本描述 |
|
|
829
|
+
| isUploadResourceBundle | boolean | 否 | 是否上传资源包 |
|
|
830
|
+
| resourceBundleVersion | string | 否 | 资源包版本号 |
|
|
831
|
+
| resourceBundleDesc | string | 否 | 资源包项目备注 |
|
|
832
|
+
| disableCache | boolean | 否 | 是否清除构建缓存 |
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
#### 返回
|
|
836
|
+
|
|
837
|
+
| 键 | 类型 | 必填 | 说明 |
|
|
838
|
+
| ----------| -------- | ---- | ----------------------- |
|
|
839
|
+
| errmsg | string | | 构建信息 |
|
|
840
|
+
| success | boolean | | 构建是否成功 |
|
|
841
|
+
|
|
842
|
+
### 构建 Ipa
|
|
843
|
+
|
|
844
|
+
支持本地构建与远程构建。本地构建 Ipa 仅支持在 macOS 上使用 codesign 进行签名,因此开发者需要确保 keychains 中包含自己的证书信息。windows 可以使用远程构建。
|
|
845
|
+
|
|
846
|
+
```js
|
|
847
|
+
const ci = require('miniprogram-ci')
|
|
848
|
+
;(async () => {
|
|
849
|
+
const project = new ci.Project({
|
|
850
|
+
appid: 'wxsomeappid',
|
|
851
|
+
type: 'miniProgram',
|
|
852
|
+
projectPath: 'the/project/path',
|
|
853
|
+
privateKeyPath: 'the/path/to/privatekey',
|
|
854
|
+
ignores: ['node_modules/**/*'],
|
|
855
|
+
})
|
|
856
|
+
const buildResult = await ci.buildIpa({
|
|
857
|
+
project,
|
|
858
|
+
output: '/the/path/to/output', // 构建产物的保存路径,需要为系统绝对路径
|
|
859
|
+
profilePath: '/the/path/to/profile', // profile 文件地址,文件格式为 mobileprovision,相对项目根路径的相对路径
|
|
860
|
+
certificateName: 'Apple Develop', // 签名证书名
|
|
861
|
+
tpnsProfilePath: '/the/path/to/tnpsprofile', // tpnsProfile 文件路径,相对项目根路径的相对路径
|
|
862
|
+
})
|
|
863
|
+
console.log(uploadResult)
|
|
864
|
+
})()
|
|
865
|
+
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
#### 参数
|
|
869
|
+
|
|
870
|
+
同时支持传入 [ci.upload](#上传) 的参数
|
|
871
|
+
|
|
872
|
+
| 键 | 类型 | 必填 | 说明 |
|
|
873
|
+
| ---------------- | -------- | ---- | ------------------------------------- |
|
|
874
|
+
| project | IProject | 是 | [项目对象](#项目对象) |
|
|
875
|
+
| output | string | 是 | 构建产物的保存路径,需要为系统绝对路径 |
|
|
876
|
+
| isDistribute | string | 否 | 是否使用分发证书 |
|
|
877
|
+
| profilePath | string | 是 | profile 文件地址,文件格式为 mobileprovision,相对项目根路径的相对路径|
|
|
878
|
+
| certificateName | string | 是 | 证书别名 |
|
|
879
|
+
| tpnsProfilePath | string | 否 | tpnsProfile 文件路径,相对项目根路径的相对路径 |
|
|
880
|
+
| p12Path | string | 否 | p12 文件路径,文件格式为 p12,相对项目根路径的相对路径。使用远程构建时必填 |
|
|
881
|
+
| p12Password | string | 否 | p12 密码。使用远程构建时必填 |
|
|
882
|
+
| desc | string | 否 | 版本描述 |
|
|
883
|
+
| isUploadResourceBundle | boolean | 否 | 是否上传资源包 |
|
|
884
|
+
| resourceBundleVersion | string | 否 | 资源包版本号 |
|
|
885
|
+
| resourceBundleDesc | string | 否 | 资源包项目备注 |
|
|
886
|
+
| disableCache | boolean | 否 | 是否清除构建缓存 |
|
|
887
|
+
| isRemoteBuild | boolean | 否 | 是否使用远程构建 |
|
|
888
|
+
|
|
889
|
+
#### 返回
|
|
890
|
+
| 键 | 类型 | 必填 | 说明 |
|
|
891
|
+
| ----------| -------- | ---- | ----------------------- |
|
|
892
|
+
| errmsg | string | | 构建信息 |
|
|
893
|
+
| success | boolean | | 构建是否成功 |
|
|
894
|
+
|
|
895
|
+
### 上传多端资源包
|
|
896
|
+
|
|
897
|
+
```js
|
|
898
|
+
const ci = require('miniprogram-ci')
|
|
899
|
+
;(async () => {
|
|
900
|
+
const project = new ci.Project({
|
|
901
|
+
appid: 'wxsomeappid',
|
|
902
|
+
type: 'miniProgram',
|
|
903
|
+
projectPath: 'the/project/path',
|
|
904
|
+
privateKeyPath: 'the/path/to/privatekey',
|
|
905
|
+
ignores: ['node_modules/**/*'],
|
|
906
|
+
})
|
|
907
|
+
const uploadResult = await ci.miniappCloudUpload({
|
|
908
|
+
project,
|
|
909
|
+
version: '0.1.24',
|
|
910
|
+
androidPlatform: false,
|
|
911
|
+
setting: {
|
|
912
|
+
es6: true,
|
|
913
|
+
},
|
|
914
|
+
})
|
|
915
|
+
console.log(uploadResult)
|
|
916
|
+
})()
|
|
917
|
+
```
|
|
918
|
+
|
|
919
|
+
#### 参数
|
|
920
|
+
|
|
921
|
+
同时支持传入 [ci.upload](#上传) 的参数
|
|
922
|
+
|
|
923
|
+
| 键 | 类型 | 必填 | 说明 |
|
|
924
|
+
| ---------------- | -------- | ---- | ------------------------------------- |
|
|
925
|
+
| project | IProject | 是 | [项目对象](#项目对象) |
|
|
926
|
+
| version | string | 是 | 版本号 |
|
|
927
|
+
| desc | string | 否 | 版本描述 |
|
|
928
|
+
| iOSPlatform | boolean | 否 | 适用平台 iOS,默认为 true |
|
|
929
|
+
| androidPlatform | boolean | 否 | 适用平台 Android,默认为 true |
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
#### 返回
|
|
933
|
+
| 键 | 类型 | 必填 | 说明 |
|
|
934
|
+
| ----------| -------- | ---- | ----------------------- |
|
|
935
|
+
| errmsg | string | | 构建信息 |
|
|
936
|
+
| success | boolean | | 构建是否成功 |
|
|
786
937
|
|
|
787
938
|
## 命令行调用
|
|
788
939
|
|
|
@@ -32,7 +32,7 @@ declare class buildCloudManager {
|
|
|
32
32
|
updateIOSAppConfigPlistInfo(projectPath: string, bindAppInfo: MiniProgramCore.IStringKeyMap, demoIpaPath: string, iosMiniappJson: MiniProgramCore.IStringKeyMap, sdkPath: string, isSimulator: boolean, recorder: Recorder, theme: ITheme | undefined, i18nInfo: II18NInfo): Promise<void>;
|
|
33
33
|
updateIOSAppexInfoPlistInfo(bindAppInfo: MiniProgramCore.IStringKeyMap, demoIpaPath: string, iosMiniappJson: MiniProgramCore.IStringKeyMap, CFBundleVersion: number, recorder: Recorder): Promise<void>;
|
|
34
34
|
private updateBundleIcons;
|
|
35
|
-
updateIOSIcons(projectPath: string, demoIpaPath: string, miniappCacheDirPath: string, iosMiniappJson: MiniProgramCore.IStringKeyMap, isPublish: boolean, recorder: Recorder): Promise<void>;
|
|
35
|
+
updateIOSIcons(projectPath: string, demoIpaPath: string, miniappCacheDirPath: string, iosMiniappJson: MiniProgramCore.IStringKeyMap, isPublish: boolean, recorder: Recorder, inLandun?: boolean, cacheAssetCarPath?: string): Promise<void>;
|
|
36
36
|
replaceLaunchScreenImage(storyboardPath: string, newScreenImagePath: string, oldScreenImageName: string, recorder: Recorder, projectPath: string, demoIpaPath: string): string | undefined;
|
|
37
37
|
updateSplashScreen(projectPath: string, demoIpaPath: string, iosMiniappJson: MiniProgramCore.IStringKeyMap, recorder: Recorder, theme: ITheme | undefined, i18nInfo: II18NInfo): Promise<void>;
|
|
38
38
|
genUseExtendedSdk(iosMiniappJson: MiniProgramCore.IStringKeyMap, debugInfo?: IMiniApp.IDebugInfo): MiniProgramCore.IStringKeyMap<any>;
|
|
@@ -60,6 +60,8 @@ declare class buildCloudManager {
|
|
|
60
60
|
buildCloud(args: IMiniApp.IIOSBuildCloudArgs, recorder: Recorder): Promise<IBuildCloudResult>;
|
|
61
61
|
writeI18NInfoFile(demoIpaPath: string, i18nInfo: II18NInfo, iosI18NField: Record<string, string>): Promise<void>;
|
|
62
62
|
getMaterialFilePath(projectPath: string, relativeTargetPath: string): string;
|
|
63
|
+
updateIOSAppResource(projectPath: string, demoIpaPath: string, iosMiniappJson: MiniProgramCore.IStringKeyMap, recorder: Recorder): void;
|
|
64
|
+
copyDirectory(sourceDir: string, targetDir: string, overWrite?: boolean): void;
|
|
63
65
|
}
|
|
64
66
|
declare const _default: buildCloudManager;
|
|
65
67
|
export default _default;
|
|
@@ -10,6 +10,7 @@ type ProjectEventEmitter = MiniProgramSummer.TypedEventEmitter<{
|
|
|
10
10
|
export declare abstract class BaseProject extends WaitAble implements MiniProgramCore.IProject {
|
|
11
11
|
protected _nameMappingFromDevtools?: MiniProgramCore.IStringKeyMap<string> | undefined;
|
|
12
12
|
protected _projectPath: string;
|
|
13
|
+
protected _injectedPages: string[];
|
|
13
14
|
protected _projectArchitecture: MiniProgramCore.IProjectArchitecture;
|
|
14
15
|
protected _miniprogramRoot: string;
|
|
15
16
|
protected _pluginRoot: string;
|
|
@@ -28,6 +29,7 @@ export declare abstract class BaseProject extends WaitAble implements MiniProgra
|
|
|
28
29
|
protected _fileSet: Set<string>;
|
|
29
30
|
event: ProjectEventEmitter;
|
|
30
31
|
get projectPath(): string;
|
|
32
|
+
get injectedPages(): string[];
|
|
31
33
|
get projectArchitecture(): import("../types").MiniProgramCI.IProjectArchitecture;
|
|
32
34
|
get srcPath(): string;
|
|
33
35
|
get pluginSrcPath(): string;
|
|
@@ -47,6 +49,7 @@ export declare abstract class BaseProject extends WaitAble implements MiniProgra
|
|
|
47
49
|
ready(): Promise<void>;
|
|
48
50
|
protected getProjectType(attr: any, compileType: MiniProgramCore.ProjectType): import("../types").MiniProgramCI.ProjectType;
|
|
49
51
|
getProjectConfig(): ProjectConfigJSON.IProjectConfigJSON;
|
|
52
|
+
normalizeRootPath: (pathName?: string) => string;
|
|
50
53
|
serialize(): Promise<MiniProgramCore.IProjectSerializeInfo>;
|
|
51
54
|
abstract init(...args: any[]): void;
|
|
52
55
|
abstract updateFileAndDirs(...args: any[]): void;
|
|
@@ -38,7 +38,7 @@ export interface IWindow {
|
|
|
38
38
|
renderingMode?: 'seperated' | 'mixed';
|
|
39
39
|
restartStrategy?: 'homePage' | 'homePageAndLatestPage';
|
|
40
40
|
visualEffectInBackground?: 'hidden' | 'none';
|
|
41
|
-
initialRenderingCache?: 'static' | 'dynamic';
|
|
41
|
+
initialRenderingCache?: 'static' | 'dynamic' | 'capture';
|
|
42
42
|
handleWebviewPreload?: 'static' | 'manual' | 'auto';
|
|
43
43
|
homeButton?: boolean;
|
|
44
44
|
}
|
|
@@ -50,6 +50,7 @@ export declare namespace MiniProgramDevtools {
|
|
|
50
50
|
ignore: MiniProgramDevtools.IProjectConfigPackOption[];
|
|
51
51
|
include: MiniProgramDevtools.IProjectConfigPackOption[];
|
|
52
52
|
};
|
|
53
|
+
injectedPages?: string[];
|
|
53
54
|
}
|
|
54
55
|
type GraphId = MiniProgramCore.ProjectType;
|
|
55
56
|
type IGetConfOptions = {
|
|
@@ -101,6 +101,7 @@ export declare namespace IMiniApp {
|
|
|
101
101
|
theme: ITheme;
|
|
102
102
|
i18nInfo: II18NInfo;
|
|
103
103
|
debugInfo?: IDebugInfo;
|
|
104
|
+
cacheAssetCarPath?: string;
|
|
104
105
|
}
|
|
105
106
|
type IIOSRunCloudArgs = IIOSRunCloudSimpleArgs & {
|
|
106
107
|
projectPath: string;
|
|
@@ -151,6 +152,7 @@ export declare namespace IMiniApp {
|
|
|
151
152
|
theme: ITheme;
|
|
152
153
|
i18nInfo: II18NInfo;
|
|
153
154
|
debugInfo?: IDebugInfo;
|
|
155
|
+
cacheAssetCarPath?: string;
|
|
154
156
|
};
|
|
155
157
|
type IIOSBuildCloudArgs = IIOSBuildCloudSimpleArgs & {
|
|
156
158
|
projectPath: string;
|