@alipay-inc/mpaas-ide-openapi 1.0.9-alpha.8 → 1.0.10-alpha.1

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 CHANGED
@@ -170,8 +170,10 @@
170
170
  iconFile: '<string>', // 选填,小程序图标的本地绝对路径
171
171
  h5Version: '<string>', // 选填,版本号(若传入,则使用此版本号。若未传入,则使用appInfo.h5Version + packageType生成新的版本号)
172
172
  whiteListValue: '<string>', // 选填,白名单(若packageType === '3' || '4',则为测试包,需要白名单)
173
+ uuid: '<string>', // 真机调试的UUID(若packageType === '3',则为调试包,需要UUID,未必填项)
173
174
  sourceCodeFile: '<string>', // 选填,源码包本地的压缩包地址,
174
- appxVersion: '<string>' // '1.0' || '2.0',appx的版本。默认 '1.0'
175
+ appxVersion: '<string>', // '1.0' || '2.0',appx的版本。默认 '1.0',
176
+ buildTarget: '<string>' // 远程调试类型,'RemoteBoatman' 为新版,需要匹配新容器
175
177
  }
176
178
  ```
177
179
 
@@ -179,9 +181,24 @@
179
181
 
180
182
  - ```javascript
181
183
  {
182
- data: '<string>',
183
- // packageType === 3 || 4。"{&quot;debugUrl&quot;:&quot;mpaas://platformapi/startapp?appId=20001101&amp;token=ide_qr&amp;scheme=mpaas%3A%2F%2Fplatformapi%2Fstartapp%3FappId%3D1234567890123456%26nbsv%3D1.4.25.62%26nbsource%3Ddebug%26nbprefer%3DYES%26nbsn%3DDEBUG%26nboffline%3Dsync%26nbtoken%3Dide_qr%26enableBugme%3Dfalse%26chInfo%3Dch_scan%26channelId%3Dnull%26enablePolyfillWorker%3D%26isRemoteDebug%3Dfalse%26enableBugme%3Dfalse%26websocketUrl%3Dwss%3A%2F%2Fcn-hangzhou-mproxy.cloud.alipay.com&quot;,&quot;userId&quot;:&quot;shengyong_zhu&quot;}"
184
- // packageType === 1 || 2。 "发布ID"
184
+ data: '<object>',
185
+ /**
186
+ * packageType === 3 || 4
187
+ * {
188
+ * debugUrl: '....', // 二维码地址
189
+ * userId: 'xxx', //
190
+ * h5Version: 'xxx', // 本次上传的版本号
191
+ * gmtCreate: 'xxx', // 本次上传的时间戳
192
+ * }
193
+ *
194
+ *
195
+ * packageType === 1 || 2
196
+ * {
197
+ * packageId: '....',// 本次上传的ID
198
+ * h5Version: 'xxx', // 本次上传的版本号
199
+ * gmtCreate: 'xxx', // 本次上传的时间戳
200
+ * }
201
+ */
185
202
  errorCode: 'OK',
186
203
  requestId: '<string>',
187
204
  resultMsg: '',
@@ -201,7 +218,6 @@
201
218
  config: '<object>', // 必填,配置文件
202
219
  h5Id: '<string>', // 必填,mPaaS小程序ID
203
220
  appxVersion: '<string || boolean>' // 选填 '1.0' || '2.0' || 'mixed' || false,appx的版本。默认 'mixed' 混合模式,false 可以关闭
204
- }
205
221
  }
206
222
  ```
207
223
 
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 _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_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")),_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){(0,_classCallCheck2["default"])(this,a),global.mpaasOpenApi=global.mpaasOpenApi||{},this.config=b,global.mpaasOpenApi.log=b.log,this.checkConfig(),this.createClient()}return(0,_createClass2["default"])(a,[{key:"updateConfig",value:function updateConfig(a){this.client.config=_objectSpread(_objectSpread({},this.client.config),a)}},{key:"createClient",value:function createClient(){try{var a={},b=this.config,c=b.openapi,d=(0,_objectWithoutProperties2["default"])(b,_excluded),e=CommonClient.getConfigType(this.config),f=e.data;"classic"===f?a=new _mpaasIdeOpenapiClassic["default"](this.config):"aliyun"===f?a=new _mpaasIdeOpenapiAliyun["default"](_objectSpread(_objectSpread({},d),c)):"antfin"===f?a=new _mpaasIdeOpenapiAntfin["default"](_objectSpread(_objectSpread({},d),c)):void 0,this.client=Object.assign(a,CommonClient),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;
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 e(d){var f;return _regenerator["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b[c](d);case 2:return f=e.sent,_superagent["default"].post(i).send({action:c,config:a.config,userInfo:CommonClient.getUserInfo(),req:d,res:f}).end(),e.abrupt("return",f);case 5:case"end":return e.stop();}},e)}));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.8",
3
+ "version": "1.0.10-alpha.1",
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.8",
15
- "@alipay-inc/mpaas-ide-openapi-antfin": "^1.0.9-alpha.8",
16
- "@alipay-inc/mpaas-ide-openapi-classic": "^1.0.9-alpha.8",
17
- "@alipay-inc/mpaas-ide-openapi-common": "^1.0.9-alpha.8",
14
+ "@alipay-inc/mpaas-ide-openapi-aliyun": "^1.0.10-alpha.1",
15
+ "@alipay-inc/mpaas-ide-openapi-antfin": "^1.0.10-alpha.1",
16
+ "@alipay-inc/mpaas-ide-openapi-classic": "^1.0.10-alpha.1",
17
+ "@alipay-inc/mpaas-ide-openapi-common": "^1.0.10-alpha.1",
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": "5e2b495afd935a56057f382d2248d7c85509eef4"
34
+ "gitHead": "6d7d5091bba9de26eca0c83ab6c467cfab170b4f"
35
35
  }