@alipay-inc/mpaas-ide-openapi-common
Advanced tools
Comparing version 1.0.10-alpha.0 to 1.0.10-alpha.1
@@ -1,1 +0,1 @@ | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _exportNames={uuid:!0,delay:!0,getConfigType:!0,getUserInfo:!0,setUserInfo:!0,login:!0,defaultTinyappConfig:!0,getDefaultTinyappConfig:!0,getTmpDirRoot:!0,getTmpDir:!0,cleanCache:!0,getVersion:!0,getUUID:!0,getZipFile:!0,getZipFromTar:!0,logger:!0,getPackageType:!0,looseJsonParse:!0,downloadFile:!0,getUploadData:!0,appInfoToVariables:!0,variablesToappInfo:!0,parseDebugURL:!0,getUploadResult:!0};Object.defineProperty(exports,"__esModule",{value:!0});exports.variablesToappInfo=exports.uuid=exports.setUserInfo=exports.parseDebugURL=exports.looseJsonParse=exports.login=exports.logger=exports.getZipFromTar=exports.getZipFile=exports.getVersion=exports.getUserInfo=exports.getUploadResult=exports.getUploadData=exports.getUUID=exports.getTmpDirRoot=exports.getTmpDir=exports.getPackageType=exports.getDefaultTinyappConfig=exports.getConfigType=exports.downloadFile=exports.delay=exports.defaultTinyappConfig=exports.cleanCache=exports.appInfoToVariables=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof")),_toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")),_slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_superagent=_interopRequireDefault(require("superagent")),_tar=_interopRequireDefault(require("tar")),_archiver=_interopRequireDefault(require("archiver")),_os=require("os"),_path=_interopRequireDefault(require("path")),_isElectron=_interopRequireDefault(require("is-electron")),_progress=_interopRequireDefault(require("progress")),_fsExtra=require("fs-extra"),_cloudBuild=require("./cloudBuild");Object.keys(_cloudBuild).forEach(function(a){"default"===a||"__esModule"===a||Object.prototype.hasOwnProperty.call(_exportNames,a)||a in exports&&exports[a]===_cloudBuild[a]||Object.defineProperty(exports,a,{enumerable:!0,get:function get(){return _cloudBuild[a]}})});var _log4js=_interopRequireDefault(require("log4js")),_excluded=["config"],_excluded2=["data"];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 uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=0|16*Math.random(),c="x"==a?b:8|3&b;return c.toString(16)})};exports.uuid=uuid;var tmpdirRoot="".concat((0,_os.tmpdir)(),"/.mpaas_ide_openapi"),delay=function(a){return new Promise(function(b){return setTimeout(b,a)})};exports.delay=delay;var getConfigType=function(a){var b="",c=a.openapi;if(!c)b="classic";else{var d=c.type;"aliyun"===d?b="aliyun":"antfin"===d&&(b="antfin")}return{data:b,success:!0}};exports.getConfigType=getConfigType;var userInfo={},getUserInfo=function(){return userInfo};exports.getUserInfo=getUserInfo;var setUserInfo=function(a){var b=a.id;a.userId=b,userInfo=a};exports.setUserInfo=setUserInfo;var login=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function b(a){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:c=a.config,d=(0,_objectWithoutProperties2["default"])(a,_excluded),b.prev=1,e=getConfigType(c),f=e.data,g={},b.t0=f,b.next="classic"===b.t0?7:23;break;case 7:return h=c.login_url,i=d.username,j=d.password,k=c.sign,l={loginName:i.toLowerCase(),password:j,sign:k,config:JSON.stringify(c)},b.next=13,_superagent["default"].post(h).field(l).accept("json");case 13:if(m=b.sent,n=m.body,o=void 0===n?{}:n,g=o.data,p=g,q=p.success,r=p.data,s=p.message,q){b.next=20;break}throw new Error(s);case 20:return r.userId=r.userId||r.id,setUserInfo(r),b.abrupt("break",29);case 23:return t=c.openapi,t=void 0===t?{}:t,u=t.userId,g={data:{id:u,loginName:u,nickName:u,realName:u,userId:u},success:!0},setUserInfo(g.data),b.abrupt("break",29);case 29:return b.abrupt("return",g);case 32:throw b.prev=32,b.t1=b["catch"](1),new Error(b.t1.message);case 35:case"end":return b.stop();}},b,null,[[1,32]])}));return function(){return a.apply(this,arguments)}}();exports.login=login;var defaultTinyappConfig={appCode:"",autoInstall:1,clientVersionMax:"",clientVersionMin:"0.0.0.0;0.0.0.0",downloadUrl:"",debugUrl:"",extendInfo:"",extraData:"{\"enableKeepAlive\":\"0\",\"enableOptionMenu\":\"1\",\"enableTabBar\":\"0\",\"iconUrl\":\"\",\"resourceType\":\"4\"}",fallbackBaseUrl:"",fileSize:"",gmtCreate:"",gmtModified:"",h5Version:"1.0.0.0",installType:1,lazyLoad:0,mainUrl:"/index.html#pages/index/index",md5:"",memo:"",modifier:"success",platform:"all",publishPeriod:5,releaseVersion:"",resourceType:"4",status:1};exports.defaultTinyappConfig=defaultTinyappConfig;var getDefaultTinyappConfig=function(a){return{data:_objectSpread(_objectSpread({},defaultTinyappConfig),a),success:!0}};exports.getDefaultTinyappConfig=getDefaultTinyappConfig;var getTmpDirRoot=function(){var a=(0,_fsExtra.existsSync)(tmpdirRoot);return a||(0,_fsExtra.mkdirSync)(tmpdirRoot),tmpdirRoot};exports.getTmpDirRoot=getTmpDirRoot;var getTmpDir=function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"appid",b=getTmpDirRoot(),c="".concat(b,"/").concat(a,"_").concat(new Date().valueOf(),"_").concat(uuid()),d=(0,_fsExtra.existsSync)(c);return d||(0,_fsExtra.mkdirSync)(c),c};exports.getTmpDir=getTmpDir;var cleanCache=function(){try{var a=getTmpDirRoot();return(0,_fsExtra.emptydirSync)(a),{data:"OK",success:!0}}catch(a){throw new Error(a.message)}};exports.cleanCache=cleanCache;var getVersion=function(a){try{var b=a.split("."),c=(0,_slicedToArray2["default"])(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=void 0===g?0:g,i=[d,e,f,h].join("."),j=[d,e,1*f+1,0].join("."),k=[d,e,f,1*h+1].join(".");return{data:{current:i,nextProd:j,nextDev:k},success:!0}}catch(a){throw new Error(a)}};exports.getVersion=getVersion;var getUUID=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function b(a){var c,d,e;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return c=a.uuid_url,b.prev=1,b.next=4,_superagent["default"].get(c);case 4:return b.next=6,b.sent;case 6:return d=b.sent,e=d.text,b.abrupt("return",{data:e,success:!0});case 11:throw b.prev=11,b.t0=b["catch"](1),new Error(b.t0);case 14:case"end":return b.stop();}},b,null,[[1,11]])}));return function(){return a.apply(this,arguments)}}();exports.getUUID=getUUID;var getZipFile=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function b(a){var c,d,e;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return c=a.pathname,d=a.version,e=a.h5Id,b.abrupt("return",new Promise(function(a,b){var f=getTmpDir();(0,_fsExtra.ensureDirSync)(f);try{var g="".concat(f,"/").concat(e,".zip");d&&(g="".concat(f,"/").concat(e,"_").concat(d.replace(/\./ig,"_"),".zip"));var h=(0,_fsExtra.createWriteStream)(g),i=(0,_archiver["default"])("zip",{zlib:{level:9}});i.pipe(h),h.on("close",function(){a(g)}),i.on("error",function(a){b(a)}),i.directory("".concat(c),e),i.finalize()}catch(a){(0,_fsExtra.removeSync)(f),b(a)}}));case 2:case"end":return b.stop();}},b)}));return function(){return a.apply(this,arguments)}}();exports.getZipFile=getZipFile;var getZipFromTar=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function a(){var b,c,d,e,f,g,h=arguments;return _regenerator["default"].wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return b=0<h.length&&void 0!==h[0]?h[0]:{},c=b.tarFilePath,d=b.h5Id,e=getTmpDir(),f=_path["default"].join(e,d),(0,_fsExtra.ensureDirSync)(f),a.prev=4,a.next=7,_tar["default"].x({file:_path["default"].resolve(c),cwd:f});case 7:return a.next=9,getZipFile({pathname:f,h5Id:d});case 9:return g=a.sent,a.abrupt("return",{data:g,success:!0});case 13:throw a.prev=13,a.t0=a["catch"](4),new Error(a.t0.message);case 16:return a.prev=16,(0,_fsExtra.removeSync)(e),a.finish(16);case 19:case"end":return a.stop();}},a,null,[[4,13,16,19]])}));return function(){return a.apply(this,arguments)}}();exports.getZipFromTar=getZipFromTar;var printLog=function(){for(var a,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];var e=c,f=["%c[mpaas_ide_openapi]","color: blue;"];if(Array.isArray(c))try{f[0]="".concat(f[0]," %c").concat(c[0]),f.push("color: red;"),e=c.slice(1)}catch(a){console.log(a)}(a=console).log.apply(a,f.concat((0,_toConsumableArray2["default"])(e)))},showLog=function(a,b,c){if(c){var d=(0,_isElectron["default"])(),e=null!==c&&void 0!==c&&c.root?_path["default"].resolve(c.root):_path["default"].resolve((0,_os.homedir)(),".mpaas_log");(0,_fsExtra.ensureDirSync)(e);var f=d?"mpaas_ide":"mpaas_ide_openapi",g=_path["default"].resolve(e,f);_log4js["default"].configure({appenders:{"[mpaas_ide_openapi]":{type:"dateFile",filename:g,pattern:"yyyy-MM-dd.log",alwaysIncludePattern:!0,category:"normal"}},categories:{default:{appenders:["[mpaas_ide_openapi]"],level:"trace"}}}),_log4js["default"].getLogger("[mpaas_ide_openapi]")[a](JSON.stringify(b)),printLog.apply(void 0,(0,_toConsumableArray2["default"])(b))}},logger={trace:function trace(){for(var a,b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return showLog("trace",d,null===(a=global)||void 0===a||null===(b=a.mpaasOpenApi)||void 0===b?void 0:b.log)},info:function info(){for(var a,b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return showLog("info",d,null===(a=global)||void 0===a||null===(b=a.mpaasOpenApi)||void 0===b?void 0:b.log)},warn:function warn(){for(var a,b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return showLog("warn",d,null===(a=global)||void 0===a||null===(b=a.mpaasOpenApi)||void 0===b?void 0:b.log)},error:function error(){for(var a,b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return showLog("error",d,null===(a=global)||void 0===a||null===(b=a.mpaasOpenApi)||void 0===b?void 0:b.log)},debug:function debug(){for(var a,b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return showLog("debug",d,null===(a=global)||void 0===a||null===(b=a.mpaasOpenApi)||void 0===b?void 0:b.log)}};exports.logger=logger;var getPackageType=function(a){return{data:["1","2"].includes(a)?"production":"development",success:!0}};exports.getPackageType=getPackageType;var looseJsonParse=function(a){try{return{data:Function("\"use strict\";return (".concat(a,")"))(),success:!0}}catch(b){return{data:JSON.parse(a.replace(/"/ig,"\"")),success:!0}}};exports.looseJsonParse=looseJsonParse;var downloadFile=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function b(a){var c,d,e,f,g,h;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(c=a.url,d=a.target,b.prev=1,b.t0=d,b.t0){b.next=7;break}return b.next=6,getTmpDir();case 6:b.t0=b.sent;case 7:return e=b.t0,f="".concat(uuid()).concat(_path["default"].extname(new URL(c).pathname)),g=_path["default"].join(e,f),b.next=12,_superagent["default"].get(c);case 12:return h=b.sent,b.next=15,(0,_fsExtra.writeFileSync)(g,h.body,"binary");case 15:return b.abrupt("return",{data:g,success:!0});case 18:throw b.prev=18,b.t1=b["catch"](1),new Error(b.t1.message);case 21:case"end":return b.stop();}},b,null,[[1,18]])}));return function(){return a.apply(this,arguments)}}();exports.downloadFile=downloadFile;var getUploadData=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function b(a){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,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:c=a.type,d=a.config,e=a.req,f=a.getVhostByApi,g=a.createWhitelistByApi,h=a.uploadFile,b.prev=1,i=d.appId,j=d.workspaceId,k=d.tenantId,l=d.userId,m=d.uuid_url,n=e.appInfo,o=e.packageType,p=e.resourceFile,q=e.iconFile,r=e.whiteListValue,s=e.sourceCodeFile,t=e.appxVersion,u=void 0===t?"1.0":t,v=e.uuid,w=n||{},x=w.h5Id,y=w.h5Name,z=w.mainUrl,A=w.suburl,B=void 0===A?"":A,C=w.autoInstall,D=w.resourceType,E=w.installType,F=w.platform,G=w.clientVersionMin,H=w.clientVersionMax,I=n.extendInfo,J=void 0===I?"":I,K=n.extraData,L=void 0===K?"":K,b.prev=6,M=looseJsonParse(L),L=M.data,b.next=21;break;case 11:b.prev=11,b.t0=b["catch"](6),b.prev=13,N=looseJsonParse(L),L=N.data,b.next=21;break;case 18:throw b.prev=18,b.t1=b["catch"](13),new Error(b.t1);case 21:if(O=L,P=O.enableTabBar,Q=void 0===P?"1":P,R=O.enableOptionMenu,S=void 0===R?"1":R,T=O.enableKeepAlive,U=void 0===T?"0":T,V=O.iconUrl,J=J.replace(/"|&quot;/ig,"\""),W={appId:i,workspaceId:j,tenantId:k,userId:l,h5Id:x,h5Name:y,mainUrl:z,suburl:B,extendInfo:J,autoInstall:C,resourceType:D,installType:E,platform:F,clientVersionMin:G,clientVersionMax:H,enableTabBar:Q,enableOptionMenu:S,enableKeepAlive:U,packageType:1*o,appxVersion:u},0!=o-3){b.next=28;break}if(v){b.next=27;break}throw new Error("\u771F\u673A\u8C03\u8BD5\u5305\u9700\u8981\u4F20\u5165uuid");case 27:W.uuid=v;case 28:if(0!=o-4||v||(W.uuid="mockuuid"),p){b.next=31;break}throw new Error("\u6CA1\u6709\u5C0F\u7A0B\u5E8F\u5305\u8D44\u6E90\u6587\u4EF6\uFF01");case 31:if(o){b.next=33;break}throw new Error("\u6CA1\u6709\u5305\u7C7B\u578B\uFF01");case 33:return b.next=35,f();case 35:if(X=b.sent,X.success){b.next=38;break}throw new Error(X.resultMsg);case 38:if(X.data){b.next=40;break}throw new Error("\u65E0\u865A\u62DF\u57DF\u540D\uFF0C\u9700\u8981\u5148\u81F3\u63A7\u5236\u53F0\u8BBE\u7F6E\u865A\u62DF\u57DF\u540D");case 40:if(W.vhost="".concat(x,".").concat(X.data),"development"!==getPackageType(o).data){b.next=49;break}if(r){b.next=44;break}throw new Error("\u975E\u6B63\u5F0F\u5305\u9700\u8981\u6709\u767D\u540D\u5355\uFF01");case 44:return b.next=46,g();case 46:if(Y=b.sent,Y.success){b.next=49;break}throw new Error(Y.resultMsg);case 49:Z=e.h5Version,Z||($=getVersion(null===n||void 0===n?void 0:n.h5Version).data,Z="production"===getPackageType(o).data?$.nextProd:$.nextDev);;W.h5Version=Z,b.t2=c,b.next="aliyun"===b.t2?56:82;break;case 56:if(!p){b.next=63;break}return b.next=59,h(p);case 59:if(_=b.sent,_.success){b.next=62;break}throw new Error(_.resultMsg);case 62:W.resourceFileUrl=_.data;case 63:if(!q){b.next=72;break}return b.next=66,h(q);case 66:if(aa=b.sent,aa.success){b.next=69;break}throw new Error(aa.resultMsg);case 69:W.iconFileUrl=aa.data,b.next=73;break;case 72:V&&(W.iconUrl=V);case 73:;if(!s){b.next=81;break}return b.next=77,h(s);case 77:if(ba=b.sent,ba.success){b.next=80;break}throw new Error(ba.resultMsg);case 80:W.sourceCodeFileUrl=ba.data;case 81:return b.abrupt("break",88);case 82:ca=[{name:"resourceFile",file:p}],q?ca.push({name:"iconFile",file:q}):V&&(W.iconUrl=V);;return s&&ca.push({name:"sourceCodeFile",file:s}),W.files=ca,b.abrupt("break",88);case 88:return b.abrupt("return",W);case 91:throw b.prev=91,b.t3=b["catch"](1),new Error(b.t3.message);case 94:case"end":return b.stop();}},b,null,[[1,91],[6,11],[13,18]])}));return function(){return a.apply(this,arguments)}}();exports.getUploadData=getUploadData;var appInfoToVariables=function(a){var b=a.h5Id,c=a.platform,d=a.clientVersionMin,e=a.clientVersionMax,f=a.mainUrl,g=void 0===f?"/index.html#pages/index/index":f,h=a.extraData,i=a.extendInfo,j=a.autoInstall,k=void 0===j?"0":j,l=a.installType,m=void 0===l?"0":l,n=a.iconFile,o=h&&looseJsonParse(h.replace(/"|&quot;/gi,"\"")),p=o.data;p=void 0===p?{}:p;var q,r,s,t,u,v,w=p.iconUrl,x=void 0===w?"":w,y=p.enableTabBar,z=void 0===y?"1":y,A=p.enableOptionMenu,B=void 0===A?"1":A,C=d&&d.split(";"),D=e&&e.split(";");switch(c){case"all":q=!0,r=!0,s=C&&C[0],t=D&&D[0],u=C&&C[1],v=D&&D[1];break;case"iOS":q=!0,r=!1,s=C&&C[0],t=D&&D[0];break;case"android":q=!1,r=!0,u=C&&C[1],v=D&&D[1];break;default:q=!1,r=!1;}return{h5Id:b,mainUrl:g,autoInstall:k,installType:m,iconFile:n,extendInfo:i.replace(/"|&quot;/gi,"\""),iconUrl:x,enableTabBar:z,enableOptionMenu:B,enableKeepAlive:"0",platformIOS:q,platformAndroid:r,iosMinVersion:s,iosMaxVersion:t,androidMinVersion:u,androidMaxVersion:v}};exports.appInfoToVariables=appInfoToVariables;var variablesToappInfo=function(a){var b,c,d,e=a.h5Id,f=a.h5Name,g=a.mainUrl,h=a.subUrl,i=void 0===h?"":h,j=a.iconFile,k=void 0===j?"":j,l=a.resourceType,m=a.platformIOS,n=a.platformAndroid,o=a.iosMinVersion,p=void 0===o?"":o,q=a.iosMaxVersion,r=void 0===q?"":q,s=a.androidMinVersion,t=void 0===s?"":s,u=a.androidMaxVersion,v=void 0===u?"":u,w=a.autoInstall,x=a.installType,y=a.enableKeepAlive,z=a.enableOptionMenu,A=a.enableTabBar,B=a.extendInfo,C=a.iconUrl,D=a.vhost;return m&&n?(b="all",c="".concat(p).concat(t?";".concat(t):""),d="".concat(r).concat(v?";".concat(v):"")):m?(b="iOS",c="".concat(p),d="".concat(r)):n&&(b="android",c="".concat(t?";".concat(t):""),d="".concat(v?";".concat(v):"")),{h5Id:e,h5Name:f,mainUrl:g,iconFile:k,subUrl:i,vhost:D,enableKeepAlive:y,enableOptionMenu:z,enableTabBar:A,iconUrl:C,resourceType:l,autoInstall:w,installType:x,extendInfo:B,platform:b,clientVersionMin:c,clientVersionMax:d}};exports.variablesToappInfo=variablesToappInfo;var parseDebugURL=function(a){var b;try{b=a.data.replace(/&/ig,"&"),b=looseJsonParse(b)}catch(c){b=a}return b};exports.parseDebugURL=parseDebugURL;var getUploadResult=function(a){var b=a.res,c=a.h5Version;try{var d=parseDebugURL(b),e=d.data,f=(0,_objectWithoutProperties2["default"])(d,_excluded2);return"object"!==(0,_typeof2["default"])(e)&&(e={projectId:e}),e=_objectSpread(_objectSpread({},e),{},{h5Version:c,gmtCreate:new Date().valueOf()}),_objectSpread(_objectSpread({},f),{},{data:e,originData:d})}catch(a){throw new Error(a.message)}};exports.getUploadResult=getUploadResult; | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _exportNames={uuid:!0,delay:!0,getConfigType:!0,getUserInfo:!0,setUserInfo:!0,login:!0,defaultTinyappConfig:!0,getDefaultTinyappConfig:!0,getTmpDirRoot:!0,getTmpDir:!0,cleanCache:!0,getVersion:!0,getUUID:!0,getZipFile:!0,getZipFromTar:!0,logger:!0,getPackageType:!0,looseJsonParse:!0,downloadFile:!0,getUploadData:!0,appInfoToVariables:!0,variablesToappInfo:!0,parseDebugURL:!0,getUploadResult:!0};Object.defineProperty(exports,"__esModule",{value:!0});exports.variablesToappInfo=exports.uuid=exports.setUserInfo=exports.parseDebugURL=exports.looseJsonParse=exports.login=exports.logger=exports.getZipFromTar=exports.getZipFile=exports.getVersion=exports.getUserInfo=exports.getUploadResult=exports.getUploadData=exports.getUUID=exports.getTmpDirRoot=exports.getTmpDir=exports.getPackageType=exports.getDefaultTinyappConfig=exports.getConfigType=exports.downloadFile=exports.delay=exports.defaultTinyappConfig=exports.cleanCache=exports.appInfoToVariables=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof")),_toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")),_slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_superagent=_interopRequireDefault(require("superagent")),_tar=_interopRequireDefault(require("tar")),_archiver=_interopRequireDefault(require("archiver")),_os=require("os"),_path=_interopRequireDefault(require("path")),_isElectron=_interopRequireDefault(require("is-electron")),_progress=_interopRequireDefault(require("progress")),_queryString=_interopRequireDefault(require("query-string")),_fsExtra=require("fs-extra"),_cloudBuild=require("./cloudBuild");Object.keys(_cloudBuild).forEach(function(a){"default"===a||"__esModule"===a||Object.prototype.hasOwnProperty.call(_exportNames,a)||a in exports&&exports[a]===_cloudBuild[a]||Object.defineProperty(exports,a,{enumerable:!0,get:function get(){return _cloudBuild[a]}})});var _log4js=_interopRequireDefault(require("log4js")),_excluded=["config"],_excluded2=["data"];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 uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=0|16*Math.random(),c="x"==a?b:8|3&b;return c.toString(16)})};exports.uuid=uuid;var tmpdirRoot="".concat((0,_os.tmpdir)(),"/.mpaas_ide_openapi"),delay=function(a){return new Promise(function(b){return setTimeout(b,a)})};exports.delay=delay;var getConfigType=function(a){var b="",c=a.openapi;if(!c)b="classic";else{var d=c.type;"aliyun"===d?b="aliyun":"antfin"===d&&(b="antfin")}return{data:b,success:!0}};exports.getConfigType=getConfigType;var userInfo={},getUserInfo=function(){return userInfo};exports.getUserInfo=getUserInfo;var setUserInfo=function(a){var b=a.id;a.userId=b,userInfo=a};exports.setUserInfo=setUserInfo;var login=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function b(a){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:c=a.config,d=(0,_objectWithoutProperties2["default"])(a,_excluded),b.prev=1,e=getConfigType(c),f=e.data,g={},b.t0=f,b.next="classic"===b.t0?7:23;break;case 7:return h=c.login_url,i=d.username,j=d.password,k=c.sign,l={loginName:i.toLowerCase(),password:j,sign:k,config:JSON.stringify(c)},b.next=13,_superagent["default"].post(h).field(l).accept("json");case 13:if(m=b.sent,n=m.body,o=void 0===n?{}:n,g=o.data,p=g,q=p.success,r=p.data,s=p.message,q){b.next=20;break}throw new Error(s);case 20:return r.userId=r.userId||r.id,setUserInfo(r),b.abrupt("break",29);case 23:return t=c.openapi,t=void 0===t?{}:t,u=t.userId,g={data:{id:u,loginName:u,nickName:u,realName:u,userId:u},success:!0},setUserInfo(g.data),b.abrupt("break",29);case 29:return b.abrupt("return",g);case 32:throw b.prev=32,b.t1=b["catch"](1),new Error(b.t1.message);case 35:case"end":return b.stop();}},b,null,[[1,32]])}));return function(){return a.apply(this,arguments)}}();exports.login=login;var defaultTinyappConfig={appCode:"",autoInstall:1,clientVersionMax:"",clientVersionMin:"0.0.0.0;0.0.0.0",downloadUrl:"",debugUrl:"",extendInfo:"",extraData:"{\"enableKeepAlive\":\"0\",\"enableOptionMenu\":\"1\",\"enableTabBar\":\"0\",\"iconUrl\":\"\",\"resourceType\":\"4\"}",fallbackBaseUrl:"",fileSize:"",gmtCreate:"",gmtModified:"",h5Version:"1.0.0.0",installType:1,lazyLoad:0,mainUrl:"/index.html#pages/index/index",md5:"",memo:"",modifier:"success",platform:"all",publishPeriod:5,releaseVersion:"",resourceType:"4",status:1};exports.defaultTinyappConfig=defaultTinyappConfig;var getDefaultTinyappConfig=function(a){return{data:_objectSpread(_objectSpread({},defaultTinyappConfig),a),success:!0}};exports.getDefaultTinyappConfig=getDefaultTinyappConfig;var getTmpDirRoot=function(){var a=(0,_fsExtra.existsSync)(tmpdirRoot);return a||(0,_fsExtra.mkdirSync)(tmpdirRoot),tmpdirRoot};exports.getTmpDirRoot=getTmpDirRoot;var getTmpDir=function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"appid",b=getTmpDirRoot(),c="".concat(b,"/").concat(a,"_").concat(new Date().valueOf(),"_").concat(uuid()),d=(0,_fsExtra.existsSync)(c);return d||(0,_fsExtra.mkdirSync)(c),c};exports.getTmpDir=getTmpDir;var cleanCache=function(){try{var a=getTmpDirRoot();return(0,_fsExtra.emptydirSync)(a),{data:"OK",success:!0}}catch(a){throw new Error(a.message)}};exports.cleanCache=cleanCache;var getVersion=function(a){try{var b=a.split("."),c=(0,_slicedToArray2["default"])(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=void 0===g?0:g,i=[d,e,f,h].join("."),j=[d,e,1*f+1,0].join("."),k=[d,e,f,1*h+1].join(".");return{data:{current:i,nextProd:j,nextDev:k},success:!0}}catch(a){throw new Error(a)}};exports.getVersion=getVersion;var getUUID=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function b(a){var c,d,e;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return c=a.uuid_url,b.prev=1,b.next=4,_superagent["default"].get(c);case 4:return b.next=6,b.sent;case 6:return d=b.sent,e=d.text,b.abrupt("return",{data:e,success:!0});case 11:throw b.prev=11,b.t0=b["catch"](1),new Error(b.t0);case 14:case"end":return b.stop();}},b,null,[[1,11]])}));return function(){return a.apply(this,arguments)}}();exports.getUUID=getUUID;var getZipFile=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function b(a){var c,d,e;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return c=a.pathname,d=a.version,e=a.h5Id,b.abrupt("return",new Promise(function(a,b){var f=getTmpDir();(0,_fsExtra.ensureDirSync)(f);try{var g="".concat(f,"/").concat(e,".zip");d&&(g="".concat(f,"/").concat(e,"_").concat(d.replace(/\./ig,"_"),".zip"));var h=(0,_fsExtra.createWriteStream)(g),i=(0,_archiver["default"])("zip",{zlib:{level:9}});i.pipe(h),h.on("close",function(){a(g)}),i.on("error",function(a){b(a)}),i.directory("".concat(c),e),i.finalize()}catch(a){(0,_fsExtra.removeSync)(f),b(a)}}));case 2:case"end":return b.stop();}},b)}));return function(){return a.apply(this,arguments)}}();exports.getZipFile=getZipFile;var getZipFromTar=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function a(){var b,c,d,e,f,g,h=arguments;return _regenerator["default"].wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return b=0<h.length&&void 0!==h[0]?h[0]:{},c=b.tarFilePath,d=b.h5Id,e=getTmpDir(),f=_path["default"].join(e,d),(0,_fsExtra.ensureDirSync)(f),a.prev=4,a.next=7,_tar["default"].x({file:_path["default"].resolve(c),cwd:f});case 7:return a.next=9,getZipFile({pathname:f,h5Id:d});case 9:return g=a.sent,a.abrupt("return",{data:g,success:!0});case 13:throw a.prev=13,a.t0=a["catch"](4),new Error(a.t0.message);case 16:return a.prev=16,(0,_fsExtra.removeSync)(e),a.finish(16);case 19:case"end":return a.stop();}},a,null,[[4,13,16,19]])}));return function(){return a.apply(this,arguments)}}();exports.getZipFromTar=getZipFromTar;var printLog=function(){for(var a,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];var e=c,f=["%c[mpaas_ide_openapi]","color: blue;"];if(Array.isArray(c))try{f[0]="".concat(f[0]," %c").concat(c[0]),f.push("color: red;"),e=c.slice(1)}catch(a){console.log(a)}(a=console).log.apply(a,f.concat((0,_toConsumableArray2["default"])(e)))},showLog=function(a,b,c){if(c){var d=(0,_isElectron["default"])(),e=null!==c&&void 0!==c&&c.root?_path["default"].resolve(c.root):_path["default"].resolve((0,_os.homedir)(),".mpaas_log");(0,_fsExtra.ensureDirSync)(e);var f=d?"mpaas_ide":"mpaas_ide_openapi",g=_path["default"].resolve(e,f);_log4js["default"].configure({appenders:{"[mpaas_ide_openapi]":{type:"dateFile",filename:g,pattern:"yyyy-MM-dd.log",alwaysIncludePattern:!0,category:"normal"}},categories:{default:{appenders:["[mpaas_ide_openapi]"],level:"trace"}}}),_log4js["default"].getLogger("[mpaas_ide_openapi]")[a](JSON.stringify(b)),printLog.apply(void 0,(0,_toConsumableArray2["default"])(b))}},logger={trace:function trace(){for(var a,b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return showLog("trace",d,null===(a=global)||void 0===a||null===(b=a.mpaasOpenApi)||void 0===b?void 0:b.log)},info:function info(){for(var a,b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return showLog("info",d,null===(a=global)||void 0===a||null===(b=a.mpaasOpenApi)||void 0===b?void 0:b.log)},warn:function warn(){for(var a,b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return showLog("warn",d,null===(a=global)||void 0===a||null===(b=a.mpaasOpenApi)||void 0===b?void 0:b.log)},error:function error(){for(var a,b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return showLog("error",d,null===(a=global)||void 0===a||null===(b=a.mpaasOpenApi)||void 0===b?void 0:b.log)},debug:function debug(){for(var a,b,c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return showLog("debug",d,null===(a=global)||void 0===a||null===(b=a.mpaasOpenApi)||void 0===b?void 0:b.log)}};exports.logger=logger;var getPackageType=function(a){return{data:["1","2"].includes(a)?"production":"development",success:!0}};exports.getPackageType=getPackageType;var looseJsonParse=function(a){try{return{data:Function("\"use strict\";return (".concat(a,")"))(),success:!0}}catch(b){return{data:JSON.parse(a.replace(/"/ig,"\"")),success:!0}}};exports.looseJsonParse=looseJsonParse;var downloadFile=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function b(a){var c,d,e,f,g,h;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(c=a.url,d=a.target,b.prev=1,b.t0=d,b.t0){b.next=7;break}return b.next=6,getTmpDir();case 6:b.t0=b.sent;case 7:return e=b.t0,f="".concat(uuid()).concat(_path["default"].extname(new URL(c).pathname)),g=_path["default"].join(e,f),b.next=12,_superagent["default"].get(c);case 12:return h=b.sent,b.next=15,(0,_fsExtra.writeFileSync)(g,h.body,"binary");case 15:return b.abrupt("return",{data:g,success:!0});case 18:throw b.prev=18,b.t1=b["catch"](1),new Error(b.t1.message);case 21:case"end":return b.stop();}},b,null,[[1,18]])}));return function(){return a.apply(this,arguments)}}();exports.downloadFile=downloadFile;var getUploadData=function(){var a=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function b(a){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,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:c=a.type,d=a.config,e=a.req,f=a.getVhostByApi,g=a.createWhitelistByApi,h=a.uploadFile,b.prev=1,i=d.appId,j=d.workspaceId,k=d.tenantId,l=d.userId,m=d.uuid_url,n=e.appInfo,o=e.packageType,p=e.resourceFile,q=e.iconFile,r=e.whiteListValue,s=e.sourceCodeFile,t=e.appxVersion,u=void 0===t?"1.0":t,v=e.uuid,w=n||{},x=w.h5Id,y=w.h5Name,z=w.mainUrl,A=w.suburl,B=void 0===A?"":A,C=w.autoInstall,D=w.resourceType,E=w.installType,F=w.platform,G=w.clientVersionMin,H=w.clientVersionMax,I=n.extendInfo,J=void 0===I?"":I,K=n.extraData,L=void 0===K?"":K,b.prev=6,M=looseJsonParse(L),L=M.data,b.next=21;break;case 11:b.prev=11,b.t0=b["catch"](6),b.prev=13,N=looseJsonParse(L),L=N.data,b.next=21;break;case 18:throw b.prev=18,b.t1=b["catch"](13),new Error(b.t1);case 21:if(O=L,P=O.enableTabBar,Q=void 0===P?"1":P,R=O.enableOptionMenu,S=void 0===R?"1":R,T=O.enableKeepAlive,U=void 0===T?"0":T,V=O.iconUrl,J=J.replace(/"|&quot;/ig,"\""),W={appId:i,workspaceId:j,tenantId:k,userId:l,h5Id:x,h5Name:y,mainUrl:z,suburl:B,extendInfo:J,autoInstall:C,resourceType:D,installType:E,platform:F,clientVersionMin:G,clientVersionMax:H,enableTabBar:Q,enableOptionMenu:S,enableKeepAlive:U,packageType:1*o,appxVersion:u},0!=o-3){b.next=28;break}if(v){b.next=27;break}throw new Error("\u771F\u673A\u8C03\u8BD5\u5305\u9700\u8981\u4F20\u5165uuid");case 27:W.uuid=v;case 28:if(0!=o-4||v||(W.uuid="mockuuid"),p){b.next=31;break}throw new Error("\u6CA1\u6709\u5C0F\u7A0B\u5E8F\u5305\u8D44\u6E90\u6587\u4EF6\uFF01");case 31:if(o){b.next=33;break}throw new Error("\u6CA1\u6709\u5305\u7C7B\u578B\uFF01");case 33:return b.next=35,f();case 35:if(X=b.sent,X.success){b.next=38;break}throw new Error(X.resultMsg);case 38:if(X.data){b.next=40;break}throw new Error("\u65E0\u865A\u62DF\u57DF\u540D\uFF0C\u9700\u8981\u5148\u81F3\u63A7\u5236\u53F0\u8BBE\u7F6E\u865A\u62DF\u57DF\u540D");case 40:if(W.vhost="".concat(x,".").concat(X.data),"development"!==getPackageType(o).data){b.next=49;break}if(r){b.next=44;break}throw new Error("\u975E\u6B63\u5F0F\u5305\u9700\u8981\u6709\u767D\u540D\u5355\uFF01");case 44:return b.next=46,g();case 46:if(Y=b.sent,Y.success){b.next=49;break}throw new Error(Y.resultMsg);case 49:Z=e.h5Version,Z||($=getVersion(null===n||void 0===n?void 0:n.h5Version).data,Z="production"===getPackageType(o).data?$.nextProd:$.nextDev);;W.h5Version=Z,b.t2=c,b.next="aliyun"===b.t2?56:82;break;case 56:if(!p){b.next=63;break}return b.next=59,h(p);case 59:if(_=b.sent,_.success){b.next=62;break}throw new Error(_.resultMsg);case 62:W.resourceFileUrl=_.data;case 63:if(!q){b.next=72;break}return b.next=66,h(q);case 66:if(aa=b.sent,aa.success){b.next=69;break}throw new Error(aa.resultMsg);case 69:W.iconFileUrl=aa.data,b.next=73;break;case 72:V&&(W.iconUrl=V);case 73:;if(!s){b.next=81;break}return b.next=77,h(s);case 77:if(ba=b.sent,ba.success){b.next=80;break}throw new Error(ba.resultMsg);case 80:W.sourceCodeFileUrl=ba.data;case 81:return b.abrupt("break",88);case 82:ca=[{name:"resourceFile",file:p}],q?ca.push({name:"iconFile",file:q}):V&&(W.iconUrl=V);;return s&&ca.push({name:"sourceCodeFile",file:s}),W.files=ca,b.abrupt("break",88);case 88:return b.abrupt("return",W);case 91:throw b.prev=91,b.t3=b["catch"](1),new Error(b.t3.message);case 94:case"end":return b.stop();}},b,null,[[1,91],[6,11],[13,18]])}));return function(){return a.apply(this,arguments)}}();exports.getUploadData=getUploadData;var appInfoToVariables=function(a){var b=a.h5Id,c=a.platform,d=a.clientVersionMin,e=a.clientVersionMax,f=a.mainUrl,g=void 0===f?"/index.html#pages/index/index":f,h=a.extraData,i=a.extendInfo,j=a.autoInstall,k=void 0===j?"0":j,l=a.installType,m=void 0===l?"0":l,n=a.iconFile,o=h&&looseJsonParse(h.replace(/"|&quot;/gi,"\"")),p=o.data;p=void 0===p?{}:p;var q,r,s,t,u,v,w=p.iconUrl,x=void 0===w?"":w,y=p.enableTabBar,z=void 0===y?"1":y,A=p.enableOptionMenu,B=void 0===A?"1":A,C=d&&d.split(";"),D=e&&e.split(";");switch(c){case"all":q=!0,r=!0,s=C&&C[0],t=D&&D[0],u=C&&C[1],v=D&&D[1];break;case"iOS":q=!0,r=!1,s=C&&C[0],t=D&&D[0];break;case"android":q=!1,r=!0,u=C&&C[1],v=D&&D[1];break;default:q=!1,r=!1;}return{h5Id:b,mainUrl:g,autoInstall:k,installType:m,iconFile:n,extendInfo:i.replace(/"|&quot;/gi,"\""),iconUrl:x,enableTabBar:z,enableOptionMenu:B,enableKeepAlive:"0",platformIOS:q,platformAndroid:r,iosMinVersion:s,iosMaxVersion:t,androidMinVersion:u,androidMaxVersion:v}};exports.appInfoToVariables=appInfoToVariables;var variablesToappInfo=function(a){var b,c,d,e=a.h5Id,f=a.h5Name,g=a.mainUrl,h=a.subUrl,i=void 0===h?"":h,j=a.iconFile,k=void 0===j?"":j,l=a.resourceType,m=a.platformIOS,n=a.platformAndroid,o=a.iosMinVersion,p=void 0===o?"":o,q=a.iosMaxVersion,r=void 0===q?"":q,s=a.androidMinVersion,t=void 0===s?"":s,u=a.androidMaxVersion,v=void 0===u?"":u,w=a.autoInstall,x=a.installType,y=a.enableKeepAlive,z=a.enableOptionMenu,A=a.enableTabBar,B=a.extendInfo,C=a.iconUrl,D=a.vhost;return m&&n?(b="all",c="".concat(p).concat(t?";".concat(t):""),d="".concat(r).concat(v?";".concat(v):"")):m?(b="iOS",c="".concat(p),d="".concat(r)):n&&(b="android",c="".concat(t?";".concat(t):""),d="".concat(v?";".concat(v):"")),{h5Id:e,h5Name:f,mainUrl:g,iconFile:k,subUrl:i,vhost:D,enableKeepAlive:y,enableOptionMenu:z,enableTabBar:A,iconUrl:C,resourceType:l,autoInstall:w,installType:x,extendInfo:B,platform:b,clientVersionMin:c,clientVersionMax:d}};exports.variablesToappInfo=variablesToappInfo;var parseDebugURL=function(a){var b;try{b=a.data.replace(/&/ig,"&"),b=looseJsonParse(b)}catch(c){b=a}return b};exports.parseDebugURL=parseDebugURL;var getUploadResult=function(a){var b=a.res,c=a.h5Version,d=a.req;try{var e=parseDebugURL(b),f=e.data,g=(0,_objectWithoutProperties2["default"])(e,_excluded2);"object"!==(0,_typeof2["default"])(f)&&(f={projectId:f}),f=_objectSpread(_objectSpread({},f),{},{h5Version:c,gmtCreate:new Date().valueOf()});var h=d.packageType,i=d.buildTarget;if(0==h-3&&"RemoteBoatman"===i){var j=f,k=j.debugUrl;k=decodeURIComponent(k);var l=k.match(/mpaas.*?scheme=mpaas:\/\/platformapi\/startapp\?/gi)[0],m=k.replace(l,"");m=_queryString["default"].parse(m),delete m.enablePolyfillWorker,delete m.isRemoteDebug,m.tyroId=m.channelId,m.isRemoteX=!0,m=_queryString["default"].stringify(m),m=encodeURIComponent(m),k=l+m,f.debugUrl=k}return _objectSpread(_objectSpread({},g),{},{data:f,originData:e})}catch(a){throw new Error(a.message)}};exports.getUploadResult=getUploadResult; |
{ | ||
"name": "@alipay-inc/mpaas-ide-openapi-common", | ||
"version": "1.0.10-alpha.0", | ||
"version": "1.0.10-alpha.1", | ||
"main": "dist/index.js", | ||
@@ -22,2 +22,3 @@ "repository": "https://code.alipay.com/mPaaS-IDE-Adaptor/mPaaS-IDE-openAPI.git", | ||
"progress": "^2.0.3", | ||
"query-string": "^7.1.1", | ||
"superagent": "^6.1.0", | ||
@@ -34,3 +35,3 @@ "tar": "^6.1.1" | ||
}, | ||
"gitHead": "255b69a347b9052186bebc0c71bd835eb0a47fec" | ||
"gitHead": "6d7d5091bba9de26eca0c83ab6c467cfab170b4f" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
31942
2
11
+ Addedquery-string@^7.1.1
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addedfilter-obj@1.1.0(transitive)
+ Addedquery-string@7.1.3(transitive)
+ Addedsplit-on-first@1.1.0(transitive)
+ Addedstrict-uri-encode@2.0.0(transitive)