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

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,7 +170,9 @@
170
170
  iconFile: '<string>', // 选填,小程序图标的本地绝对路径
171
171
  h5Version: '<string>', // 选填,版本号(若传入,则使用此版本号。若未传入,则使用appInfo.h5Version + packageType生成新的版本号)
172
172
  whiteListValue: '<string>', // 选填,白名单(若packageType === '3' || '4',则为测试包,需要白名单)
173
- sourceCodeFile: '<string>', // 选填,源码包本地的压缩包地址
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: '<string>',
182
- // 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;}"
183
- // packageType === 1 || 2。 "发布ID"
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
 
@@ -247,3 +265,21 @@
247
265
  }
248
266
  ```
249
267
 
268
+ #### getUUID 获取uuid
269
+
270
+ - 入参
271
+
272
+ - ```js
273
+ {
274
+ config: '<object>', // 必填,配置文件
275
+ }
276
+ ```
277
+
278
+ - 返回
279
+
280
+ - ```javascript
281
+ {
282
+ data: '<string>', // 生成的uuid
283
+ success: true
284
+ }
285
+ ```
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 _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")),_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(){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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay-inc/mpaas-ide-openapi",
3
- "version": "1.0.9-alpha.1",
3
+ "version": "1.0.9-alpha.14",
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.1",
15
- "@alipay-inc/mpaas-ide-openapi-antfin": "^1.0.9-alpha.1",
16
- "@alipay-inc/mpaas-ide-openapi-classic": "^1.0.9-alpha.1",
17
- "@alipay-inc/mpaas-ide-openapi-common": "^1.0.9-alpha.1",
14
+ "@alipay-inc/mpaas-ide-openapi-aliyun": "^1.0.9-alpha.14",
15
+ "@alipay-inc/mpaas-ide-openapi-antfin": "^1.0.9-alpha.14",
16
+ "@alipay-inc/mpaas-ide-openapi-classic": "^1.0.9-alpha.14",
17
+ "@alipay-inc/mpaas-ide-openapi-common": "^1.0.9-alpha.14",
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": "3a9b29d0915b030bf0d19255a14f6ef7a85cc2f3"
34
+ "gitHead": "a348c367cf4ade1f6d2dd40746eb436428045847"
35
35
  }