UNPKG

@integration-app/membrane-cli

Version:

CLI tool for importing and exporting Integration.app workspace data

2 lines (1 loc) 1.17 kB
var l=Object.defineProperty;var i=(r,e)=>l(r,"name",{value:e,configurable:!0});import{g as p}from"./index-CNuB1luy.js";const f=i(r=>{if(r==null)return{};if(Array.isArray(r))return r.filter(e=>e!=null).map(f);if(typeof r=="object"){const e={};for(const t of Object.keys(r))r[t]!=null&&(e[t]=f(r[t]));return e}return r},"_json"),a=i((r,e)=>p(r,e).then(t=>{if(t.length)try{return JSON.parse(t)}catch(s){throw s?.name==="SyntaxError"&&Object.defineProperty(s,"$responseBodyText",{value:t}),s}return{}}),"parseJsonBody"),u=i(async(r,e)=>{const t=await a(r,e);return t.message=t.message??t.Message,t},"parseJsonErrorBody"),d=i((r,e)=>{const t=i((o,n)=>Object.keys(o).find(y=>y.toLowerCase()===n.toLowerCase()),"findKey"),s=i(o=>{let n=o;return typeof n=="number"&&(n=n.toString()),n.indexOf(",")>=0&&(n=n.split(",")[0]),n.indexOf(":")>=0&&(n=n.split(":")[0]),n.indexOf("#")>=0&&(n=n.split("#")[1]),n},"sanitizeErrorCode"),c=t(r.headers,"x-amzn-errortype");if(c!==void 0)return s(r.headers[c]);if(e&&typeof e=="object"){const o=t(e,"code");if(o&&e[o]!==void 0)return s(e[o]);if(e.__type!==void 0)return s(e.__type)}},"loadRestJsonErrorCode");export{f as _,u as a,d as l,a as p};