@alipay-inc/mpaas-ide-openapi-classic 1.0.0-beta.9 → 1.0.2

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.
@@ -0,0 +1 @@
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.request=exports.UPLOAD_PACKAGE_BY_API=exports.GET_WHITE_LIST_API=exports.GET_PACKAGE_INFO_BY_API=exports.GET_MINIPROGRAM_CONFIG_BY_API=exports.GET_ENVIRONMENT_INFO_API=exports.GET_APP_LIST_BY_API=exports.CREATE_SHITE_LIST_BY_API=exports.CLOUD_BUILD_POLL_URL=exports.CLOUD_BUILD_EXEC_URL=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_superagent=_interopRequireDefault(require("superagent")),_fsExtra=require("fs-extra"),_path=_interopRequireDefault(require("path"));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 GET_ENVIRONMENT_INFO_API="/privilege/getEnvironmentInfo";exports.GET_ENVIRONMENT_INFO_API="/privilege/getEnvironmentInfo";var GET_APP_LIST_BY_API="/miniProgram/getAppListByApi";exports.GET_APP_LIST_BY_API="/miniProgram/getAppListByApi";var GET_PACKAGE_INFO_BY_API="/miniProgramPackage/getPackageInfoByApi";exports.GET_PACKAGE_INFO_BY_API="/miniProgramPackage/getPackageInfoByApi";var UPLOAD_PACKAGE_BY_API="/miniProgramPackage/uploadPackageByApi";exports.UPLOAD_PACKAGE_BY_API="/miniProgramPackage/uploadPackageByApi";var CREATE_SHITE_LIST_BY_API="/whitelist/createWhiteListByApi";exports.CREATE_SHITE_LIST_BY_API="/whitelist/createWhiteListByApi";var GET_MINIPROGRAM_CONFIG_BY_API="/miniProgramConfig/getMiniprogramConfigByApi";exports.GET_MINIPROGRAM_CONFIG_BY_API="/miniProgramConfig/getMiniprogramConfigByApi";var GET_WHITE_LIST_API="/whitelist/getWhiteListByApi";exports.GET_WHITE_LIST_API="/whitelist/getWhiteListByApi";var CLOUD_BUILD_EXEC_URL="https://hpmweb.alipay.com/tinyApp/cloudBuild/execute";exports.CLOUD_BUILD_EXEC_URL="https://hpmweb.alipay.com/tinyApp/cloudBuild/execute";var CLOUD_BUILD_POLL_URL="https://hpmweb.alipay.com/tinyApp/cloudBuild/result";exports.CLOUD_BUILD_POLL_URL="https://hpmweb.alipay.com/tinyApp/cloudBuild/result";var request=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function a(b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;return _regenerator["default"].wrap(function(a){for(;;)switch(a.prev=a.next){case 0:c=b.config,d=b.url,e=b.method,f=b.req,g=void 0===f?{}:f,h=b.files,i=void 0===h?[]:h,j=b.userInfo,k=void 0===j?{}:j,l=c.appId,m=c.workspaceId,n=c.tenantId,a.prev=2,o=_objectSpread(_objectSpread({},g),{},{config:c,appId:l,workspaceId:m,tenantId:n}),p=k.userId,q=k.loginName,p&&(o.userId=p),q&&(o.loginName=q),a.t0=e,a.next="FORM"===a.t0?10:17;break;case 10:return o.config=JSON.stringify(c),s=_superagent["default"].post(d).field(o),i&&i[0]&&i.forEach(function(a){var b=a.name,c=a.file,d={value:(0,_fsExtra.createReadStream)(c),options:{filename:_path["default"].basename(c),contentType:"application/zip"}};s.attach(b,d.value,d.options)}),a.next=15,s;case 15:return r=a.sent,a.abrupt("break",22);case 17:return o.config=c,a.next=20,_superagent["default"].get(d).query(o);case 20:return r=a.sent,a.abrupt("break",22);case 22:if(t=JSON.parse(r.text),u=t.data,u=void 0===u?{}:u,v=u.data,w=u.success,x=void 0!==w&&w,y=u.resultMsg,z=void 0===y?"\u672A\u77E5\u9519\u8BEF":y,!0===x){a.next=27;break}throw new Error(z);case 27:return a.abrupt("return",{data:v,success:!0});case 30:throw a.prev=30,a.t1=a["catch"](2),new Error(a.t1.message);case 33:case"end":return a.stop();}},a,null,[[2,30]])}));return function(){return a.apply(this,arguments)}}();exports.request=request;
package/package.json CHANGED
@@ -1,25 +1,26 @@
1
1
  {
2
2
  "name": "@alipay-inc/mpaas-ide-openapi-classic",
3
- "version": "1.0.0-beta.9",
3
+ "version": "1.0.2",
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>",
7
7
  "license": "MIT",
8
8
  "scripts": {
9
- "build": "webpack",
9
+ "build": "sh ../../scripts/build.sh",
10
+ "watch": "sh ../../scripts/watch.sh",
10
11
  "prepublish": "yarn build"
11
12
  },
12
13
  "dependencies": {
13
- "@alipay-inc/mpaas-ide-openapi-common": "^1.0.0-beta.9",
14
+ "@alipay-inc/mpaas-ide-openapi-common": "^1.0.2",
15
+ "@babel/runtime": "^7.15.4",
14
16
  "archiver": "^3.1.1",
17
+ "chalk": "^4.1.2",
15
18
  "form-data": "^3.0.0",
19
+ "fs-extra": "^8.1.0",
20
+ "get-folder-size": "^2.0.1",
16
21
  "superagent": "^6.1.0",
17
22
  "uuid": "^7.0.2"
18
23
  },
19
- "devDependencies": {
20
- "fs-extra": "^8.1.0",
21
- "get-folder-size": "^2.0.1"
22
- },
23
24
  "files": [
24
25
  "dist",
25
26
  "LEGAL.md",
@@ -28,5 +29,5 @@
28
29
  "publishConfig": {
29
30
  "access": "public"
30
31
  },
31
- "gitHead": "3b00649140176363780207116d7d57219a532ce7"
32
+ "gitHead": "2f2c02d08b24cf2359e5f54a429176fe0c4504e4"
32
33
  }
package/README.md DELETED
@@ -1,27 +0,0 @@
1
- ### 使用方法
2
- - 下载配置文件
3
- - 阿里云开通accessKeyId https://help.aliyun.com/document_detail/178983.html
4
- - 在配置文件中添加
5
- ```js
6
- {
7
- ...
8
- accessKeyId: '<accessKeyId>',
9
- accessKeySecret: '<accessKeySecret>',
10
- endpoint: 'mpaas.cn-hangzhou.aliyuncs.com',
11
- openapi: 'public'
12
- }
13
- ```
14
- ### 获取小程序列表
15
- - listMcubeMiniApps
16
-
17
- ### 获取小程序信息
18
- - listMcubeMiniPackages
19
- - listMcubeMiniPackages({ h5Id, packageTypes: '1,2' });
20
- - 拉取最新的小程序正式包的第一个
21
-
22
-
23
- ### 在 IDE 中进行小程序预览和 debug 时使用的白名单创建
24
- - createMcubeWhitelistForIde
25
- - createMcubeWhitelistForIde({ userId, whitelistValue });
26
- - userId = 本地存储
27
- - whitelistValue = 白名单名称
@@ -1,21 +0,0 @@
1
- /*!
2
- * methods
3
- * Copyright(c) 2013-2014 TJ Holowaychuk
4
- * Copyright(c) 2015-2016 Douglas Christopher Wilson
5
- * MIT Licensed
6
- */
7
-
8
- /*!
9
- * mime-db
10
- * Copyright(c) 2014 Jonathan Ong
11
- * MIT Licensed
12
- */
13
-
14
- /*!
15
- * mime-types
16
- * Copyright(c) 2014 Jonathan Ong
17
- * Copyright(c) 2015 Douglas Christopher Wilson
18
- * MIT Licensed
19
- */
20
-
21
- /*! For license information please see index.js.LICENSE.txt */