@alipay-inc/mpaas-ide-openapi 1.0.9-alpha.2 → 1.0.9-alpha.22
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/README.md +22 -4
- package/dist/index.js +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -170,7 +170,9 @@
|
|
|
170
170
|
iconFile: '<string>', // 选填,小程序图标的本地绝对路径
|
|
171
171
|
h5Version: '<string>', // 选填,版本号(若传入,则使用此版本号。若未传入,则使用appInfo.h5Version + packageType生成新的版本号)
|
|
172
172
|
whiteListValue: '<string>', // 选填,白名单(若packageType === '3' || '4',则为测试包,需要白名单)
|
|
173
|
-
|
|
173
|
+
uuid: '<string>', // 真机调试的UUID(若packageType === '3',则为调试包,需要UUID,未必填项)
|
|
174
|
+
sourceCodeFile: '<string>', // 选填,源码包本地的压缩包地址,
|
|
175
|
+
appxVersion: '<string>' // '1.0' || '2.0',appx的版本。默认 '1.0'
|
|
174
176
|
}
|
|
175
177
|
```
|
|
176
178
|
|
|
@@ -178,9 +180,24 @@
|
|
|
178
180
|
|
|
179
181
|
- ```javascript
|
|
180
182
|
{
|
|
181
|
-
data: '<
|
|
182
|
-
|
|
183
|
-
|
|
183
|
+
data: '<object>',
|
|
184
|
+
/**
|
|
185
|
+
* packageType === 3 || 4
|
|
186
|
+
* {
|
|
187
|
+
* debugUrl: '....', // 二维码地址
|
|
188
|
+
* userId: 'xxx', //
|
|
189
|
+
* h5Version: 'xxx', // 本次上传的版本号
|
|
190
|
+
* gmtCreate: 'xxx', // 本次上传的时间戳
|
|
191
|
+
* }
|
|
192
|
+
*
|
|
193
|
+
*
|
|
194
|
+
* packageType === 1 || 2
|
|
195
|
+
* {
|
|
196
|
+
* packageId: '....',// 本次上传的ID
|
|
197
|
+
* h5Version: 'xxx', // 本次上传的版本号
|
|
198
|
+
* gmtCreate: 'xxx', // 本次上传的时间戳
|
|
199
|
+
* }
|
|
200
|
+
*/
|
|
184
201
|
errorCode: 'OK',
|
|
185
202
|
requestId: '<string>',
|
|
186
203
|
resultMsg: '',
|
|
@@ -199,6 +216,7 @@
|
|
|
199
216
|
file: '<string>', // 必填,本地amr文件路径、或者本地项目的根目录
|
|
200
217
|
config: '<object>', // 必填,配置文件
|
|
201
218
|
h5Id: '<string>', // 必填,mPaaS小程序ID
|
|
219
|
+
appxVersion: '<string || boolean>' // 选填 '1.0' || '2.0' || 'mixed' || false,appx的版本。默认 'mixed' 混合模式,false 可以关闭
|
|
202
220
|
}
|
|
203
221
|
```
|
|
204
222
|
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault"),_typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault"),_typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")),_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_mpaasIdeOpenapiAliyun=_interopRequireDefault(require("@alipay-inc/mpaas-ide-openapi-aliyun")),_mpaasIdeOpenapiAntfin=_interopRequireDefault(require("@alipay-inc/mpaas-ide-openapi-antfin")),_mpaasIdeOpenapiClassic=_interopRequireDefault(require("@alipay-inc/mpaas-ide-openapi-classic")),CommonClient=_interopRequireWildcard(require("@alipay-inc/mpaas-ide-openapi-common")),_superagent=_interopRequireDefault(require("superagent")),_excluded=["openapi"];function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!==_typeof(a)&&"function"!=typeof a)return{default:a};var c=_getRequireWildcardCache(b);if(c&&c.has(a))return c.get(a);var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!=f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d["default"]=a,c&&c.set(a,d),d}function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){(0,_defineProperty2["default"])(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}var OpenAPI=function(){function a(b){var c=this;(0,_classCallCheck2["default"])(this,a),(0,_defineProperty2["default"])(this,"updateConfig",function(a){c.client.config=_objectSpread(_objectSpread({},c.client.config),a)}),global.mpaasOpenApi=global.mpaasOpenApi||{},this.config=b,global.mpaasOpenApi.log=b.log,this.checkConfig(),this.createClient()}return(0,_createClass2["default"])(a,[{key:"createClient",value:function createClient(){var a=this;try{var b={},c=this.config,d=c.openapi,e=(0,_objectWithoutProperties2["default"])(c,_excluded),f=CommonClient.getConfigType(this.config),g=f.data;"classic"===g?b=new _mpaasIdeOpenapiClassic["default"](this.config):"aliyun"===g?b=new _mpaasIdeOpenapiAliyun["default"](_objectSpread(_objectSpread({},e),d)):"antfin"===g?b=new _mpaasIdeOpenapiAntfin["default"](_objectSpread(_objectSpread({},e),d)):void 0,b=Object.assign(b,CommonClient),this.client=_objectSpread({},b);var h=this.config.callback;h=void 0===h?{}:h;var i=h.api_url,j=h.actions,k=void 0===j?["getAppListByApi","getPackageInfoByApi","uploadPackageByApi","login"]:j;if(i){if(!Array.isArray(k))throw new Error("\u914D\u7F6E\u6587\u4EF6\u4E2D callback.actions \u683C\u5F0F\u9519\u8BEF");k.forEach(function(b){if(!a.client[b])throw new Error("\u914D\u7F6E\u6587\u4EF6\u4E2D callback.actions \u4E2D\u5B58\u5728\u65E0\u6548action: ".concat(b))}),k.forEach(function(c){delete a.client[c],a.client[c]=function(){var d=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function d(e){var f;return _regenerator["default"].wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,b[c](e);case 2:return f=d.sent,_superagent["default"].post(i).send({action:c,config:a.config,userInfo:CommonClient.getUserInfo(),req:e,res:f}).end(),d.abrupt("return",f);case 5:case"end":return d.stop();}},d)}));return function(){return d.apply(this,arguments)}}()})}global.mpaasOpenApi.client=this.client}catch(a){throw new Error(a.message)}}},{key:"checkConfig",value:function checkConfig(){var a=this.config.openapi;if(!a);else{var b=a.type,c=a.userId,d=a.privateKey,e=a.api_url,f=a.accessKeyId,g=a.accessKeySecret,h=a.endpoint;if(!c)throw new Error("userId \u5B57\u6BB5\u4E3A\u7A7A");if(!/^\w+$/.test(c))throw new Error("userId \u683C\u5F0F\u9519\u8BEF\u3001\u5B57\u6BCD\u6570\u5B57\u4E0B\u5212\u7EBF");if(!["aliyun","antfin"].includes(b))throw new Error("type \u7C7B\u578B\u4E0D\u5BF9");if("aliyun"===b){if(!f)throw new Error("accessKeyId \u5B57\u6BB5\u4E3A\u7A7A");if(!g)throw new Error("accessKeySecret \u5B57\u6BB5\u4E3A\u7A7A");if(!h)throw new Error("endpoint \u5B57\u6BB5\u4E3A\u7A7A")}else if("antfin"===b){if(!d)throw new Error("privateKey \u5B57\u6BB5\u4E3A\u7A7A");if(!e)throw new Error("api_url \u5B57\u6BB5\u4E3A\u7A7A")}}}}]),a}(),_default=OpenAPI;exports["default"]=_default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alipay-inc/mpaas-ide-openapi",
|
|
3
|
-
"version": "1.0.9-alpha.
|
|
3
|
+
"version": "1.0.9-alpha.22",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"repository": "https://code.alipay.com/mPaaS-IDE-Adaptor/mPaaS-IDE-openAPI.git",
|
|
6
6
|
"author": "跟着勇哥有肉吃 <shengyong.zhu@antgroup.com>",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"prepublish": "yarn build"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@alipay-inc/mpaas-ide-openapi-aliyun": "^1.0.9-alpha.
|
|
15
|
-
"@alipay-inc/mpaas-ide-openapi-antfin": "^1.0.9-alpha.
|
|
16
|
-
"@alipay-inc/mpaas-ide-openapi-classic": "^1.0.9-alpha.
|
|
17
|
-
"@alipay-inc/mpaas-ide-openapi-common": "^1.0.9-alpha.
|
|
14
|
+
"@alipay-inc/mpaas-ide-openapi-aliyun": "^1.0.9-alpha.22",
|
|
15
|
+
"@alipay-inc/mpaas-ide-openapi-antfin": "^1.0.9-alpha.22",
|
|
16
|
+
"@alipay-inc/mpaas-ide-openapi-classic": "^1.0.9-alpha.22",
|
|
17
|
+
"@alipay-inc/mpaas-ide-openapi-common": "^1.0.9-alpha.22",
|
|
18
18
|
"@babel/runtime": "^7.15.4",
|
|
19
19
|
"archiver": "^5.3.0",
|
|
20
20
|
"chalk": "^4.1.2",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "126530b29461053813ecfc587370cdbeece8a31f"
|
|
35
35
|
}
|