Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alipay-inc/mpaas-ide-openapi-common

Package Overview
Dependencies
Maintainers
3
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alipay-inc/mpaas-ide-openapi-common - npm Package Compare versions

Comparing version 1.0.11-alpha.3 to 1.0.11-alpha.4

2

dist/getUploadData.js

@@ -1,1 +0,1 @@

"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.getUploadData=exports.getPluginFiles=exports.getPluginData=exports.getMiniFiles=exports.getMiniData=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_index=require("./index.js"),_fsExtra=_interopRequireDefault(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 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;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=e.appInfo,j=e.packageType,k=e.resourceFile,l=e.iconFile,m=e.whiteListValue,n=e.sourceCodeFile,o=e.appxVersion,p=void 0===o?"1.0":o,q=e.uuid,r=e.miniType,s=e.pluginFile,t={},u=e.h5Version,u||(v=(0,_index.getVersion)(null===i||void 0===i?void 0:i.h5Version).data,u="production"===(0,_index.getPackageType)(j).data?v.nextProd:v.nextDev);;if("plugin"!==r){b.next=14;break}return b.next=10,getPluginData(a);case 10:t=b.sent,t.miniPluginVersion=u,b.next=18;break;case 14:return b.next=16,getMiniData(a);case 16:t=b.sent,t.h5Version=u;case 18:if(0!=j-3){b.next=22;break}if(q){b.next=21;break}throw new Error("\u771F\u673A\u8C03\u8BD5\u5305\u9700\u8981\u4F20\u5165uuid");case 21:t.uuid=q;case 22:if(t.packageType=j,0!=j-4||q||(t.uuid="mockuuid"),k){b.next=26;break}throw new Error("\u6CA1\u6709\u5C0F\u7A0B\u5E8F\u5305\u8D44\u6E90\u6587\u4EF6\uFF01");case 26:if(j){b.next=28;break}throw new Error("\u6CA1\u6709\u5305\u7C7B\u578B\uFF01");case 28:if("development"!==(0,_index.getPackageType)(j).data){b.next=36;break}if(m){b.next=31;break}throw new Error("\u975E\u6B63\u5F0F\u5305\u9700\u8981\u6709\u767D\u540D\u5355\uFF01");case 31:return b.next=33,g();case 33:if(w=b.sent,w.success){b.next=36;break}throw new Error(w.resultMsg);case 36:if("plugin"!==r){b.next=45;break}return b.t0=_objectSpread,b.t1=_objectSpread({},t),b.next=41,getPluginFiles(a);case 41:b.t2=b.sent,t=(0,b.t0)(b.t1,b.t2),b.next=51;break;case 45:return b.t3=_objectSpread,b.t4=_objectSpread({},t),b.next=49,getMiniFiles(a);case 49:b.t5=b.sent,t=(0,b.t3)(b.t4,b.t5);case 51:return b.abrupt("return",t);case 54:throw b.prev=54,b.t6=b["catch"](1),new Error(b.t6.message);case 57:case"end":return b.stop();}},b,null,[[1,54]])}));return function(){return a.apply(this,arguments)}}();exports.getUploadData=getUploadData;var getPluginData=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;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(c=a.type,d=a.config,e=a.req,f=a.getVhostByApi,g=a.createWhitelistByApi,h=a.uploadFile,i=e.appInfo,j=e.pluginFile,k=(0,_index.transformPluginParams)(i),l=k.miniPluginName,m=k.miniPluginId,n={miniPluginName:l,miniPluginId:m},j){b.next=6;break}throw new Error("\u6CA1\u6709\u5C0F\u7A0B\u5E8F\u63D2\u4EF6\u8D44\u6E90\u6587\u4EF6\uFF01");case 6:return b.abrupt("return",n);case 7:case"end":return b.stop();}},b)}));return function(){return a.apply(this,arguments)}}();exports.getPluginData=getPluginData;var getPluginFiles=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;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,i=e.appInfo,j=e.packageType,k=e.resourceFile,l=e.iconFile,m=e.whiteListValue,n=e.sourceCodeFile,o=e.appxVersion,p=void 0===o?"1.0":o,q=e.uuid,r=e.miniType,s=e.pluginFile,t=i.h5Id,u={},b.t0=c,b.next="aliyun"===b.t0?7:33;break;case 7:if(!k){b.next=14;break}return b.next=10,h(k);case 10:if(v=b.sent,v.success){b.next=13;break}throw new Error(v.resultMsg);case 13:u.resourceFileUrl=v.data;case 14:if(!l){b.next=23;break}return b.next=17,h(l);case 17:if(w=b.sent,w.success){b.next=20;break}throw new Error(w.resultMsg);case 20:u.iconFileUrl=w.data,b.next=24;break;case 23:iconUrl&&(u.iconUrl=iconUrl);case 24:;if(!n){b.next=32;break}return b.next=28,h(n);case 28:if(x=b.sent,x.success){b.next=31;break}throw new Error(x.resultMsg);case 31:u.sourceCodeFileUrl=x.data;case 32:return b.abrupt("break",60);case 33:return y=[],b.next=36,(0,_index.getZipFromTar)({tarFilePath:s,h5Id:t});case 36:if(z=b.sent,A=z.data,"production"!==(0,_index.getPackageType)(j).data){b.next=42;break}y.push({name:"resourceFile",file:A}),b.next=58;break;case 42:return b.t1=_fsExtra["default"],b.t2=_path["default"],b.next=46,(0,_index.getTmpDir)();case 46:return b.t3=b.sent,b.t4=t,b.t5=b.t2.resolve.call(b.t2,b.t3,b.t4),B=b.t1.emptydirSync.call(b.t1,b.t5),C=_path["default"].resolve(B,"".concat(t,"-miniProgram.zip")),D=_path["default"].resolve(B,"".concat(t,"-plugin.zip")),_fsExtra["default"].copySync(k,C),_fsExtra["default"].copySync(A,D),b.next=56,(0,_index.getZipFile)({files:[C,D],h5Id:t});case 56:E=b.sent,y.push({name:"resourceFile",file:E});case 58:return u.files=y,b.abrupt("break",60);case 60:return b.abrupt("return",u);case 61:case"end":return b.stop();}},b)}));return function(){return a.apply(this,arguments)}}();exports.getPluginFiles=getPluginFiles;var getMiniData=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,$;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,i=e.appInfo,j=e.packageType,k=e.resourceFile,l=e.iconFile,m=e.whiteListValue,n=e.sourceCodeFile,o=e.appxVersion,p=void 0===o?"1.0":o,q=e.uuid,r=e.miniType,s=e.pluginFile,t=e.bindMiniPluginIds,u=d.appId,v=d.workspaceId,w=d.tenantId,x=d.userId,y=d.uuid_url,z=i||{},A=z.h5Id,B=z.h5Name,C=z.mainUrl,D=z.suburl,E=void 0===D?"":D,F=z.autoInstall,G=z.resourceType,H=z.installType,I=z.platform,J=z.clientVersionMin,K=z.clientVersionMax,L=i.extendInfo,M=void 0===L?"":L,N=i.extraData,O=void 0===N?"":N,b.prev=5,P=(0,_index.looseJsonParse)(O),O=P.data,b.next=20;break;case 10:b.prev=10,b.t0=b["catch"](5),b.prev=12,Q=(0,_index.looseJsonParse)(O),O=Q.data,b.next=20;break;case 17:throw b.prev=17,b.t1=b["catch"](12),new Error(b.t1);case 20:return R=O,S=R.enableTabBar,T=void 0===S?"1":S,U=R.enableOptionMenu,V=void 0===U?"1":U,W=R.enableKeepAlive,X=void 0===W?"0":W,Y=R.iconUrl,M=M.replace(/&quot;|&amp;quot;/ig,"\""),Z={appId:u,workspaceId:v,tenantId:w,userId:x,h5Id:A,h5Name:B,mainUrl:C,suburl:E,extendInfo:M,autoInstall:F,resourceType:G,installType:H,platform:I,clientVersionMin:J,clientVersionMax:K,enableTabBar:T,enableOptionMenu:V,enableKeepAlive:X,packageType:1*j,appxVersion:p},t&&(Z.bindMiniPluginIds=t),b.next=26,f();case 26:if($=b.sent,$.success){b.next=29;break}throw new Error($.resultMsg);case 29:if($.data){b.next=31;break}throw new Error("\u65E0\u865A\u62DF\u57DF\u540D\uFF0C\u9700\u8981\u5148\u81F3\u63A7\u5236\u53F0\u8BBE\u7F6E\u865A\u62DF\u57DF\u540D");case 31:return Z.vhost="".concat(A,".").concat($.data),b.abrupt("return",Z);case 33:case"end":return b.stop();}},b,null,[[5,10],[12,17]])}));return function(){return a.apply(this,arguments)}}();exports.getMiniData=getMiniData;var getMiniFiles=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;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,i=e.appInfo,j=e.packageType,k=e.resourceFile,l=e.iconFile,m=e.whiteListValue,n=e.sourceCodeFile,o=e.appxVersion,p=void 0===o?"1.0":o,q=e.uuid,r=e.miniType,s=e.pluginFile,t={},b.t0=c,b.next="aliyun"===b.t0?6:32;break;case 6:if(!k){b.next=13;break}return b.next=9,h(k);case 9:if(u=b.sent,u.success){b.next=12;break}throw new Error(u.resultMsg);case 12:t.resourceFileUrl=u.data;case 13:if(!l){b.next=22;break}return b.next=16,h(l);case 16:if(v=b.sent,v.success){b.next=19;break}throw new Error(v.resultMsg);case 19:t.iconFileUrl=v.data,b.next=23;break;case 22:iconUrl&&(t.iconUrl=iconUrl);case 23:;if(!n){b.next=31;break}return b.next=27,h(n);case 27:if(w=b.sent,w.success){b.next=30;break}throw new Error(w.resultMsg);case 30:t.sourceCodeFileUrl=w.data;case 31:return b.abrupt("break",38);case 32:x=[{name:"resourceFile",file:k}],l?x.push({name:"iconFile",file:l}):iconUrl&&(t.iconUrl=iconUrl);;return n&&x.push({name:"sourceCodeFile",file:n}),t.files=x,b.abrupt("break",38);case 38:return b.abrupt("return",t);case 39:case"end":return b.stop();}},b)}));return function(){return a.apply(this,arguments)}}();exports.getMiniFiles=getMiniFiles;
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.getUploadData=exports.getPluginFiles=exports.getPluginData=exports.getMiniFiles=exports.getMiniData=exports.getExtraData=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_index=require("./index.js"),_fsExtra=_interopRequireDefault(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 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;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=e.appInfo,j=e.packageType,k=e.resourceFile,l=e.iconFile,m=e.whiteListValue,n=e.sourceCodeFile,o=e.appxVersion,p=void 0===o?"1.0":o,q=e.uuid,r=e.miniType,s=e.pluginFile,t={},u=e.h5Version,u||(v=(0,_index.getVersion)(null===i||void 0===i?void 0:i.h5Version).data,u="production"===(0,_index.getPackageType)(j).data?v.nextProd:v.nextDev);;if("plugin"!==r){b.next=14;break}return b.next=10,getPluginData(a);case 10:t=b.sent,t.miniPluginVersion=u,b.next=18;break;case 14:return b.next=16,getMiniData(a);case 16:t=b.sent,t.h5Version=u;case 18:if(0!=j-3){b.next=22;break}if(q){b.next=21;break}throw new Error("\u771F\u673A\u8C03\u8BD5\u5305\u9700\u8981\u4F20\u5165uuid");case 21:t.uuid=q;case 22:if(t.packageType=j,0!=j-4||q||(t.uuid="mockuuid"),k){b.next=26;break}throw new Error("\u6CA1\u6709\u5C0F\u7A0B\u5E8F\u5305\u8D44\u6E90\u6587\u4EF6\uFF01");case 26:if(j){b.next=28;break}throw new Error("\u6CA1\u6709\u5305\u7C7B\u578B\uFF01");case 28:if("development"!==(0,_index.getPackageType)(j).data){b.next=36;break}if(m){b.next=31;break}throw new Error("\u975E\u6B63\u5F0F\u5305\u9700\u8981\u6709\u767D\u540D\u5355\uFF01");case 31:return b.next=33,g();case 33:if(w=b.sent,w.success){b.next=36;break}throw new Error(w.resultMsg);case 36:if("plugin"!==r){b.next=45;break}return b.t0=_objectSpread,b.t1=_objectSpread({},t),b.next=41,getPluginFiles(a);case 41:b.t2=b.sent,t=(0,b.t0)(b.t1,b.t2),b.next=51;break;case 45:return b.t3=_objectSpread,b.t4=_objectSpread({},t),b.next=49,getMiniFiles(a);case 49:b.t5=b.sent,t=(0,b.t3)(b.t4,b.t5);case 51:return b.abrupt("return",t);case 54:throw b.prev=54,b.t6=b["catch"](1),new Error(b.t6.message);case 57:case"end":return b.stop();}},b,null,[[1,54]])}));return function(){return a.apply(this,arguments)}}();exports.getUploadData=getUploadData;var getPluginData=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;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(c=a.type,d=a.config,e=a.req,f=a.getVhostByApi,g=a.createWhitelistByApi,h=a.uploadFile,i=e.appInfo,j=e.pluginFile,k=(0,_index.transformPluginParams)(i),l=k.miniPluginName,m=k.miniPluginId,n={miniPluginName:l,miniPluginId:m},j){b.next=6;break}throw new Error("\u6CA1\u6709\u5C0F\u7A0B\u5E8F\u63D2\u4EF6\u8D44\u6E90\u6587\u4EF6\uFF01");case 6:return b.abrupt("return",n);case 7:case"end":return b.stop();}},b)}));return function(){return a.apply(this,arguments)}}();exports.getPluginData=getPluginData;var getPluginFiles=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;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,i=e.appInfo,j=e.packageType,k=e.resourceFile,l=e.iconFile,m=e.whiteListValue,n=e.sourceCodeFile,o=e.appxVersion,p=void 0===o?"1.0":o,q=e.uuid,r=e.miniType,s=e.pluginFile,t=i.h5Id,u={},b.t0=c,b.next="aliyun"===b.t0?7:22;break;case 7:if(!k){b.next=14;break}return b.next=10,h(k);case 10:if(v=b.sent,v.success){b.next=13;break}throw new Error(v.resultMsg);case 13:u.resourceFileUrl=v.data;case 14:if(!n){b.next=21;break}return b.next=17,h(n);case 17:if(w=b.sent,w.success){b.next=20;break}throw new Error(w.resultMsg);case 20:u.sourceCodeFileUrl=w.data;case 21:return b.abrupt("break",49);case 22:return x=[],b.next=25,(0,_index.getZipFromTar)({tarFilePath:s,h5Id:t});case 25:if(y=b.sent,z=y.data,"production"!==(0,_index.getPackageType)(j).data){b.next=31;break}x.push({name:"resourceFile",file:z}),b.next=47;break;case 31:return b.t1=_fsExtra["default"],b.t2=_path["default"],b.next=35,(0,_index.getTmpDir)();case 35:return b.t3=b.sent,b.t4=t,b.t5=b.t2.resolve.call(b.t2,b.t3,b.t4),A=b.t1.emptydirSync.call(b.t1,b.t5),B=_path["default"].resolve(A,"".concat(t,"-miniProgram.zip")),C=_path["default"].resolve(A,"".concat(t,"-plugin.zip")),_fsExtra["default"].copySync(k,B),_fsExtra["default"].copySync(z,C),b.next=45,(0,_index.getZipFile)({files:[B,C],h5Id:t});case 45:D=b.sent,x.push({name:"resourceFile",file:D});case 47:return u.files=x,b.abrupt("break",49);case 49:return b.abrupt("return",u);case 50:case"end":return b.stop();}},b)}));return function(){return a.apply(this,arguments)}}();exports.getPluginFiles=getPluginFiles;var getMiniData=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;return _regenerator["default"].wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return c=a.type,d=a.config,e=a.req,f=a.getVhostByApi,g=a.createWhitelistByApi,h=a.uploadFile,i=e.appInfo,j=e.packageType,k=e.resourceFile,l=e.iconFile,m=e.whiteListValue,n=e.sourceCodeFile,o=e.appxVersion,p=void 0===o?"1.0":o,q=e.uuid,r=e.miniType,s=e.pluginFile,t=e.bindMiniPluginIds,u=d.appId,v=d.workspaceId,w=d.tenantId,x=d.userId,y=d.uuid_url,z=i||{},A=z.h5Id,B=z.h5Name,C=z.mainUrl,D=z.suburl,E=void 0===D?"":D,F=z.autoInstall,G=z.resourceType,H=z.installType,I=z.platform,J=z.clientVersionMin,K=z.clientVersionMax,L=getExtraData(i),M=L.extendInfo,N=void 0===M?{}:M,O=L.extraData,P=void 0===O?{}:O,Q=P.enableTabBar,R=void 0===Q?"1":Q,S=P.enableOptionMenu,T=void 0===S?"1":S,U=P.enableKeepAlive,V=void 0===U?"0":U,W={appId:u,workspaceId:v,tenantId:w,userId:x,h5Id:A,h5Name:B,mainUrl:C,suburl:E,extendInfo:N,autoInstall:F,resourceType:G,installType:H,platform:I,clientVersionMin:J,clientVersionMax:K,enableTabBar:R,enableOptionMenu:T,enableKeepAlive:V,packageType:1*j,appxVersion:p},t&&(W.bindMiniPluginIds=t),b.next=10,f();case 10:if(X=b.sent,X.success){b.next=13;break}throw new Error(X.resultMsg);case 13:if(X.data){b.next=15;break}throw new Error("\u65E0\u865A\u62DF\u57DF\u540D\uFF0C\u9700\u8981\u5148\u81F3\u63A7\u5236\u53F0\u8BBE\u7F6E\u865A\u62DF\u57DF\u540D");case 15:return W.vhost="".concat(A,".").concat(X.data),b.abrupt("return",W);case 17:case"end":return b.stop();}},b)}));return function(){return a.apply(this,arguments)}}();exports.getMiniData=getMiniData;var getMiniFiles=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;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,i=e.appInfo,j=e.packageType,k=e.resourceFile,l=e.iconFile,m=e.whiteListValue,n=e.sourceCodeFile,o=e.appxVersion,p=void 0===o?"1.0":o,q=e.uuid,r=e.miniType,s=e.pluginFile,t=getExtraData(i),u=t.extraData,v=void 0===u?{}:u,w=v.iconUrl,x={},b.t0=c,b.next="aliyun"===b.t0?8:34;break;case 8:if(!k){b.next=15;break}return b.next=11,h(k);case 11:if(y=b.sent,y.success){b.next=14;break}throw new Error(y.resultMsg);case 14:x.resourceFileUrl=y.data;case 15:if(!l){b.next=24;break}return b.next=18,h(l);case 18:if(z=b.sent,z.success){b.next=21;break}throw new Error(z.resultMsg);case 21:x.iconFileUrl=z.data,b.next=25;break;case 24:w&&(x.iconUrl=w);case 25:;if(!n){b.next=33;break}return b.next=29,h(n);case 29:if(A=b.sent,A.success){b.next=32;break}throw new Error(A.resultMsg);case 32:x.sourceCodeFileUrl=A.data;case 33:return b.abrupt("break",40);case 34:B=[{name:"resourceFile",file:k}],l?B.push({name:"iconFile",file:l}):w&&(x.iconUrl=w);;return n&&B.push({name:"sourceCodeFile",file:n}),x.files=B,b.abrupt("break",40);case 40:return b.abrupt("return",x);case 41:case"end":return b.stop();}},b)}));return function(){return a.apply(this,arguments)}}();exports.getMiniFiles=getMiniFiles;var getExtraData=function(a){var b=a.extendInfo,c=void 0===b?"":b,d=a.extraData,e=void 0===d?"":d;try{var n=(0,_index.looseJsonParse)(e);e=n.data}catch(a){try{var o=(0,_index.looseJsonParse)(e);e=o.data}catch(a){throw new Error(a)}}var f=e,g=f.enableTabBar,h=void 0===g?"1":g,i=f.enableOptionMenu,j=void 0===i?"1":i,k=f.enableKeepAlive,l=void 0===k?"0":k,m=f.iconUrl;return c=c.replace(/&quot;|&amp;quot;/ig,"\""),{extraData:e,extendInfo:c}};exports.getExtraData=getExtraData;
{
"name": "@alipay-inc/mpaas-ide-openapi-common",
"version": "1.0.11-alpha.3",
"version": "1.0.11-alpha.4",
"main": "dist/index.js",

@@ -34,3 +34,3 @@ "repository": "https://code.alipay.com/mPaaS-IDE-Adaptor/mPaaS-IDE-openAPI.git",

},
"gitHead": "efec4bf21180a3862ef5e9aef74de73148ff37db"
"gitHead": "ffabc9840d174b2fe8572dadf23ef25202ab4dd4"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc