@algolia/monitoring
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -259,3 +259,3 @@ import * as _algolia_client_common from '@algolia/client-common'; | ||
declare const apiClientVersion = "1.3.1"; | ||
declare const apiClientVersion = "1.3.2"; | ||
declare function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): { | ||
@@ -262,0 +262,0 @@ transporter: _algolia_client_common.Transporter; |
@@ -14,3 +14,3 @@ // builds/browser.ts | ||
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common"; | ||
var apiClientVersion = "1.3.1"; | ||
var apiClientVersion = "1.3.2"; | ||
function getDefaultHosts() { | ||
@@ -27,21 +27,22 @@ return [{ url: "status.algolia.com", accept: "readWrite", protocol: "https" }]; | ||
const auth = createAuth(appIdOption, apiKeyOption, authMode); | ||
const transporter = createTransporter({ | ||
hosts: getDefaultHosts(), | ||
...options, | ||
algoliaAgent: getAlgoliaAgent({ | ||
algoliaAgents, | ||
client: "Monitoring", | ||
version: apiClientVersion | ||
}), | ||
baseHeaders: { | ||
"content-type": "text/plain", | ||
...auth.headers(), | ||
...options.baseHeaders | ||
}, | ||
baseQueryParameters: { | ||
...auth.queryParameters(), | ||
...options.baseQueryParameters | ||
} | ||
}); | ||
return { | ||
transporter: createTransporter({ | ||
hosts: getDefaultHosts(), | ||
...options, | ||
algoliaAgent: getAlgoliaAgent({ | ||
algoliaAgents, | ||
client: "Monitoring", | ||
version: apiClientVersion | ||
}), | ||
baseHeaders: { | ||
"content-type": "text/plain", | ||
...auth.headers(), | ||
...options.baseHeaders | ||
}, | ||
baseQueryParameters: { | ||
...auth.queryParameters(), | ||
...options.baseQueryParameters | ||
} | ||
}), | ||
transporter, | ||
/** | ||
@@ -55,5 +56,3 @@ * The `appId` currently in use. | ||
clearCache() { | ||
return Promise.all([this.transporter.requestsCache.clear(), this.transporter.responsesCache.clear()]).then( | ||
() => void 0 | ||
); | ||
return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0); | ||
}, | ||
@@ -64,3 +63,3 @@ /** | ||
get _ua() { | ||
return this.transporter.algoliaAgent.value; | ||
return transporter.algoliaAgent.value; | ||
}, | ||
@@ -74,3 +73,3 @@ /** | ||
addAlgoliaAgent(segment, version) { | ||
this.transporter.algoliaAgent.add({ segment, version }); | ||
transporter.algoliaAgent.add({ segment, version }); | ||
}, | ||
@@ -85,5 +84,5 @@ /** | ||
if (!authMode || authMode === "WithinHeaders") { | ||
this.transporter.baseHeaders["x-algolia-api-key"] = apiKey; | ||
transporter.baseHeaders["x-algolia-api-key"] = apiKey; | ||
} else { | ||
this.transporter.baseQueryParameters["x-algolia-api-key"] = apiKey; | ||
transporter.baseQueryParameters["x-algolia-api-key"] = apiKey; | ||
} | ||
@@ -112,3 +111,3 @@ }, | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -136,3 +135,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -162,3 +161,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -188,3 +187,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -211,3 +210,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -234,3 +233,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -252,3 +251,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -275,3 +274,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -298,3 +297,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -325,3 +324,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -348,3 +347,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -366,3 +365,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -384,3 +383,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
} | ||
@@ -387,0 +386,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
function L(t,e,s="WithinHeaders"){let r={"x-algolia-api-key":e,"x-algolia-application-id":t};return{headers(){return s==="WithinHeaders"?r:{}},queryParameters(){return s==="WithinQueryParameters"?r:{}}}}function k(t){let e,s=`algolia-client-js-${t.key}`;function r(){return e===void 0&&(e=t.localStorage||window.localStorage),e}function n(){return JSON.parse(r().getItem(s)||"{}")}function p(a){r().setItem(s,JSON.stringify(a))}function o(){let a=t.timeToLive?t.timeToLive*1e3:null,i=n(),l=Object.fromEntries(Object.entries(i).filter(([,h])=>h.timestamp!==void 0));if(p(l),!a)return;let c=Object.fromEntries(Object.entries(l).filter(([,h])=>{let u=new Date().getTime();return!(h.timestamp+a<u)}));p(c)}return{get(a,i,l={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(o(),n()[JSON.stringify(a)])).then(c=>Promise.all([c?c.value:i(),c!==void 0])).then(([c,h])=>Promise.all([c,h||l.miss(c)])).then(([c])=>c)},set(a,i){return Promise.resolve().then(()=>{let l=n();return l[JSON.stringify(a)]={timestamp:new Date().getTime(),value:i},r().setItem(s,JSON.stringify(l)),i})},delete(a){return Promise.resolve().then(()=>{let i=n();delete i[JSON.stringify(a)],r().setItem(s,JSON.stringify(i))})},clear(){return Promise.resolve().then(()=>{r().removeItem(s)})}}}function V(){return{get(t,e,s={miss:()=>Promise.resolve()}){return e().then(n=>Promise.all([n,s.miss(n)])).then(([n])=>n)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}function T(t){let e=[...t.caches],s=e.shift();return s===void 0?V():{get(r,n,p={miss:()=>Promise.resolve()}){return s.get(r,n,p).catch(()=>T({caches:e}).get(r,n,p))},set(r,n){return s.set(r,n).catch(()=>T({caches:e}).set(r,n))},delete(r){return s.delete(r).catch(()=>T({caches:e}).delete(r))},clear(){return s.clear().catch(()=>T({caches:e}).clear())}}}function O(t={serializable:!0}){let e={};return{get(s,r,n={miss:()=>Promise.resolve()}){let p=JSON.stringify(s);if(p in e)return Promise.resolve(t.serializable?JSON.parse(e[p]):e[p]);let o=r();return o.then(a=>n.miss(a)).then(()=>o)},set(s,r){return e[JSON.stringify(s)]=t.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete(s){return delete e[JSON.stringify(s)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}var G=2*60*1e3;function H(t,e="up"){let s=Date.now();function r(){return e==="up"||Date.now()-s>G}function n(){return e==="timed out"&&Date.now()-s<=G}return{...t,status:e,lastUpdate:s,isUp:r,isTimedOut:n}}var M=class extends Error{name="AlgoliaError";constructor(t,e){super(t),e&&(this.name=e)}},W=class extends M{stackTrace;constructor(t,e,s){super(t,s),this.stackTrace=e}},Y=class extends W{constructor(t){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",t,"RetryError")}},I=class extends W{status;constructor(t,e,s,r="ApiError"){super(t,s,r),this.status=e}},Z=class extends M{response;constructor(t,e){super(t,"DeserializationError"),this.response=e}},ee=class extends I{error;constructor(t,e,s,r){super(t,e,r,"DetailedApiError"),this.error=s}};function te(t,e,s){let r=re(s),n=`${t.protocol}://${t.url}${t.port?`:${t.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return r.length&&(n+=`?${r}`),n}function re(t){return Object.keys(t).filter(e=>t[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(t[e])==="[object Array]"?t[e].join(","):t[e]).replaceAll("+","%20")}`).join("&")}function se(t,e){if(t.method==="GET"||t.data===void 0&&e.data===void 0)return;let s=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(s)}function oe(t,e,s){let r={Accept:"application/json",...t,...e,...s},n={};return Object.keys(r).forEach(p=>{let o=r[p];n[p.toLowerCase()]=o}),n}function ae(t){try{return JSON.parse(t.content)}catch(e){throw new Z(e.message,t)}}function ne({content:t,status:e},s){try{let r=JSON.parse(t);return"error"in r?new ee(r.message,e,r.error,s):new I(r.message,e,s)}catch{}return new I(t,e,s)}function ie({isTimedOut:t,status:e}){return!t&&~~e===0}function ce({isTimedOut:t,status:e}){return t||ie({isTimedOut:t,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function ue({status:t}){return~~(t/100)===2}function le(t){return t.map(e=>Q(e))}function Q(t){let e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function J({hosts:t,hostsCache:e,baseHeaders:s,baseQueryParameters:r,algoliaAgent:n,timeouts:p,requester:o,requestsCache:a,responsesCache:i}){async function l(u){let m=await Promise.all(u.map(d=>e.get(d,()=>Promise.resolve(H(d))))),R=m.filter(d=>d.isUp()),f=m.filter(d=>d.isTimedOut()),E=[...R,...f];return{hosts:E.length>0?E:u,getTimeout(d,y){return(f.length===0&&d===0?1:f.length+3+d)*y}}}async function c(u,m,R=!0){let f=[],E=se(u,m),g=oe(s,u.headers,m.headers),d=u.method==="GET"?{...u.data,...m.data}:{},y={...r,...u.queryParameters,...d};if(n.value&&(y["x-algolia-agent"]=n.value),m&&m.queryParameters)for(let P of Object.keys(m.queryParameters))!m.queryParameters[P]||Object.prototype.toString.call(m.queryParameters[P])==="[object Object]"?y[P]=m.queryParameters[P]:y[P]=m.queryParameters[P].toString();let v=0,b=async(P,C)=>{let w=P.pop();if(w===void 0)throw new Y(le(f));let A={...p,...m.timeouts},N={data:E,headers:g,method:u.method,url:te(w,u.path,y),connectTimeout:C(v,A.connect),responseTimeout:C(v,R?A.read:A.write)},D=S=>{let _={request:N,response:S,host:w,triesLeft:P.length};return f.push(_),_},q=await o.send(N);if(ce(q)){let S=D(q);return q.isTimedOut&&v++,console.log("Retryable failure",Q(S)),await e.set(w,H(w,q.isTimedOut?"timed out":"down")),b(P,C)}if(ue(q))return ae(q);throw D(q),ne(q,f)},K=t.filter(P=>P.accept==="readWrite"||(R?P.accept==="read":P.accept==="write")),U=await l(K);return b([...U.hosts].reverse(),U.getTimeout)}function h(u,m={}){let R=u.useReadTransporter||u.method==="GET";if(!R)return c(u,m,R);let f=()=>c(u,m);if((m.cacheable||u.cacheable)!==!0)return f();let g={request:u,requestOptions:m,transporter:{queryParameters:r,headers:s}};return i.get(g,()=>a.get(g,()=>a.set(g,f()).then(d=>Promise.all([a.delete(g),d]),d=>Promise.all([a.delete(g),Promise.reject(d)])).then(([d,y])=>y)),{miss:d=>i.set(g,d)})}return{hostsCache:e,requester:o,timeouts:p,algoliaAgent:n,baseHeaders:s,baseQueryParameters:r,hosts:t,request:h,requestsCache:a,responsesCache:i}}function me(t){let e={value:`Algolia for JavaScript (${t})`,add(s){let r=`; ${s.segment}${s.version!==void 0?` (${s.version})`:""}`;return e.value.indexOf(r)===-1&&(e.value=`${e.value}${r}`),e}};return e}function j({algoliaAgents:t,client:e,version:s}){let r=me(s).add({segment:e,version:s});return t.forEach(n=>r.add(n)),r}var $=1e3,z=2e3,F=3e4;function B(){function t(e){return new Promise(s=>{let r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach(a=>r.setRequestHeader(a,e.headers[a]));let n=(a,i)=>setTimeout(()=>{r.abort(),s({status:0,content:i,isTimedOut:!0})},a),p=n(e.connectTimeout,"Connection timeout"),o;r.onreadystatechange=()=>{r.readyState>r.OPENED&&o===void 0&&(clearTimeout(p),o=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{r.status===0&&(clearTimeout(p),clearTimeout(o),s({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(p),clearTimeout(o),s({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)})}return{send:t}}var x="1.3.1";function pe(){return[{url:"status.algolia.com",accept:"readWrite",protocol:"https"}]}function X({appId:t,apiKey:e,authMode:s,algoliaAgents:r,...n}){let p=L(t,e,s);return{transporter:J({hosts:pe(),...n,algoliaAgent:j({algoliaAgents:r,client:"Monitoring",version:x}),baseHeaders:{"content-type":"text/plain",...p.headers(),...n.baseHeaders},baseQueryParameters:{...p.queryParameters(),...n.baseQueryParameters}}),appId:t,clearCache(){return Promise.all([this.transporter.requestsCache.clear(),this.transporter.responsesCache.clear()]).then(()=>{})},get _ua(){return this.transporter.algoliaAgent.value},addAlgoliaAgent(o,a){this.transporter.algoliaAgent.add({segment:o,version:a})},setClientApiKey({apiKey:o}){!s||s==="WithinHeaders"?this.transporter.baseHeaders["x-algolia-api-key"]=o:this.transporter.baseQueryParameters["x-algolia-api-key"]=o},customDelete({path:o,parameters:a},i){if(!o)throw new Error("Parameter `path` is required when calling `customDelete`.");let u={method:"DELETE",path:"/{path}".replace("{path}",o),queryParameters:a||{},headers:{}};return this.transporter.request(u,i)},customGet({path:o,parameters:a},i){if(!o)throw new Error("Parameter `path` is required when calling `customGet`.");let u={method:"GET",path:"/{path}".replace("{path}",o),queryParameters:a||{},headers:{}};return this.transporter.request(u,i)},customPost({path:o,parameters:a,body:i},l){if(!o)throw new Error("Parameter `path` is required when calling `customPost`.");let m={method:"POST",path:"/{path}".replace("{path}",o),queryParameters:a||{},headers:{},data:i||{}};return this.transporter.request(m,l)},customPut({path:o,parameters:a,body:i},l){if(!o)throw new Error("Parameter `path` is required when calling `customPut`.");let m={method:"PUT",path:"/{path}".replace("{path}",o),queryParameters:a||{},headers:{},data:i||{}};return this.transporter.request(m,l)},getClusterIncidents({clusters:o},a){if(!o)throw new Error("Parameter `clusters` is required when calling `getClusterIncidents`.");let h={method:"GET",path:"/1/incidents/{clusters}".replace("{clusters}",encodeURIComponent(o)),queryParameters:{},headers:{}};return this.transporter.request(h,a)},getClusterStatus({clusters:o},a){if(!o)throw new Error("Parameter `clusters` is required when calling `getClusterStatus`.");let h={method:"GET",path:"/1/status/{clusters}".replace("{clusters}",encodeURIComponent(o)),queryParameters:{},headers:{}};return this.transporter.request(h,a)},getIncidents(o){let c={method:"GET",path:"/1/incidents",queryParameters:{},headers:{}};return this.transporter.request(c,o)},getIndexingTime({clusters:o},a){if(!o)throw new Error("Parameter `clusters` is required when calling `getIndexingTime`.");let h={method:"GET",path:"/1/indexing/{clusters}".replace("{clusters}",encodeURIComponent(o)),queryParameters:{},headers:{}};return this.transporter.request(h,a)},getLatency({clusters:o},a){if(!o)throw new Error("Parameter `clusters` is required when calling `getLatency`.");let h={method:"GET",path:"/1/latency/{clusters}".replace("{clusters}",encodeURIComponent(o)),queryParameters:{},headers:{}};return this.transporter.request(h,a)},getMetrics({metric:o,period:a},i){if(!o)throw new Error("Parameter `metric` is required when calling `getMetrics`.");if(!a)throw new Error("Parameter `period` is required when calling `getMetrics`.");let u={method:"GET",path:"/1/infrastructure/{metric}/period/{period}".replace("{metric}",encodeURIComponent(o)).replace("{period}",encodeURIComponent(a)),queryParameters:{},headers:{}};return this.transporter.request(u,i)},getReachability({clusters:o},a){if(!o)throw new Error("Parameter `clusters` is required when calling `getReachability`.");let h={method:"GET",path:"/1/reachability/{clusters}/probes".replace("{clusters}",encodeURIComponent(o)),queryParameters:{},headers:{}};return this.transporter.request(h,a)},getServers(o){let c={method:"GET",path:"/1/inventory/servers",queryParameters:{},headers:{}};return this.transporter.request(c,o)},getStatus(o){let c={method:"GET",path:"/1/status",queryParameters:{},headers:{}};return this.transporter.request(c,o)}}}function Ze(t,e,s){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");return X({appId:t,apiKey:e,timeouts:{connect:$,read:z,write:F},requester:B(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:O(),requestsCache:O({serializable:!1}),hostsCache:T({caches:[k({key:`${x}-${t}`}),O()]}),...s})}export{x as apiClientVersion,Ze as monitoringClient}; | ||
function L(t,e,o="WithinHeaders"){let r={"x-algolia-api-key":e,"x-algolia-application-id":t};return{headers(){return o==="WithinHeaders"?r:{}},queryParameters(){return o==="WithinQueryParameters"?r:{}}}}function k(t){let e,o=`algolia-client-js-${t.key}`;function r(){return e===void 0&&(e=t.localStorage||window.localStorage),e}function n(){return JSON.parse(r().getItem(o)||"{}")}function p(s){r().setItem(o,JSON.stringify(s))}function i(){let s=t.timeToLive?t.timeToLive*1e3:null,a=n(),u=Object.fromEntries(Object.entries(a).filter(([,d])=>d.timestamp!==void 0));if(p(u),!s)return;let l=Object.fromEntries(Object.entries(u).filter(([,d])=>{let c=new Date().getTime();return!(d.timestamp+s<c)}));p(l)}return{get(s,a,u={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(i(),n()[JSON.stringify(s)])).then(l=>Promise.all([l?l.value:a(),l!==void 0])).then(([l,d])=>Promise.all([l,d||u.miss(l)])).then(([l])=>l)},set(s,a){return Promise.resolve().then(()=>{let u=n();return u[JSON.stringify(s)]={timestamp:new Date().getTime(),value:a},r().setItem(o,JSON.stringify(u)),a})},delete(s){return Promise.resolve().then(()=>{let a=n();delete a[JSON.stringify(s)],r().setItem(o,JSON.stringify(a))})},clear(){return Promise.resolve().then(()=>{r().removeItem(o)})}}}function V(){return{get(t,e,o={miss:()=>Promise.resolve()}){return e().then(n=>Promise.all([n,o.miss(n)])).then(([n])=>n)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}function T(t){let e=[...t.caches],o=e.shift();return o===void 0?V():{get(r,n,p={miss:()=>Promise.resolve()}){return o.get(r,n,p).catch(()=>T({caches:e}).get(r,n,p))},set(r,n){return o.set(r,n).catch(()=>T({caches:e}).set(r,n))},delete(r){return o.delete(r).catch(()=>T({caches:e}).delete(r))},clear(){return o.clear().catch(()=>T({caches:e}).clear())}}}function O(t={serializable:!0}){let e={};return{get(o,r,n={miss:()=>Promise.resolve()}){let p=JSON.stringify(o);if(p in e)return Promise.resolve(t.serializable?JSON.parse(e[p]):e[p]);let i=r();return i.then(s=>n.miss(s)).then(()=>i)},set(o,r){return e[JSON.stringify(o)]=t.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete(o){return delete e[JSON.stringify(o)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}var G=2*60*1e3;function H(t,e="up"){let o=Date.now();function r(){return e==="up"||Date.now()-o>G}function n(){return e==="timed out"&&Date.now()-o<=G}return{...t,status:e,lastUpdate:o,isUp:r,isTimedOut:n}}var M=class extends Error{name="AlgoliaError";constructor(t,e){super(t),e&&(this.name=e)}},W=class extends M{stackTrace;constructor(t,e,o){super(t,o),this.stackTrace=e}},Y=class extends W{constructor(t){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",t,"RetryError")}},I=class extends W{status;constructor(t,e,o,r="ApiError"){super(t,o,r),this.status=e}},Z=class extends M{response;constructor(t,e){super(t,"DeserializationError"),this.response=e}},ee=class extends I{error;constructor(t,e,o,r){super(t,e,r,"DetailedApiError"),this.error=o}};function te(t,e,o){let r=re(o),n=`${t.protocol}://${t.url}${t.port?`:${t.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return r.length&&(n+=`?${r}`),n}function re(t){return Object.keys(t).filter(e=>t[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(t[e])==="[object Array]"?t[e].join(","):t[e]).replaceAll("+","%20")}`).join("&")}function se(t,e){if(t.method==="GET"||t.data===void 0&&e.data===void 0)return;let o=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(o)}function oe(t,e,o){let r={Accept:"application/json",...t,...e,...o},n={};return Object.keys(r).forEach(p=>{let i=r[p];n[p.toLowerCase()]=i}),n}function ae(t){try{return JSON.parse(t.content)}catch(e){throw new Z(e.message,t)}}function ne({content:t,status:e},o){try{let r=JSON.parse(t);return"error"in r?new ee(r.message,e,r.error,o):new I(r.message,e,o)}catch{}return new I(t,e,o)}function ie({isTimedOut:t,status:e}){return!t&&~~e===0}function ce({isTimedOut:t,status:e}){return t||ie({isTimedOut:t,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function ue({status:t}){return~~(t/100)===2}function le(t){return t.map(e=>Q(e))}function Q(t){let e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function J({hosts:t,hostsCache:e,baseHeaders:o,baseQueryParameters:r,algoliaAgent:n,timeouts:p,requester:i,requestsCache:s,responsesCache:a}){async function u(c){let m=await Promise.all(c.map(h=>e.get(h,()=>Promise.resolve(H(h))))),f=m.filter(h=>h.isUp()),g=m.filter(h=>h.isTimedOut()),E=[...f,...g];return{hosts:E.length>0?E:c,getTimeout(h,q){return(g.length===0&&h===0?1:g.length+3+h)*q}}}async function l(c,m,f=!0){let g=[],E=se(c,m),y=oe(o,c.headers,m.headers),h=c.method==="GET"?{...c.data,...m.data}:{},q={...r,...c.queryParameters,...h};if(n.value&&(q["x-algolia-agent"]=n.value),m&&m.queryParameters)for(let P of Object.keys(m.queryParameters))!m.queryParameters[P]||Object.prototype.toString.call(m.queryParameters[P])==="[object Object]"?q[P]=m.queryParameters[P]:q[P]=m.queryParameters[P].toString();let v=0,b=async(P,C)=>{let w=P.pop();if(w===void 0)throw new Y(le(g));let A={...p,...m.timeouts},N={data:E,headers:y,method:c.method,url:te(w,c.path,q),connectTimeout:C(v,A.connect),responseTimeout:C(v,f?A.read:A.write)},D=S=>{let _={request:N,response:S,host:w,triesLeft:P.length};return g.push(_),_},R=await i.send(N);if(ce(R)){let S=D(R);return R.isTimedOut&&v++,console.log("Retryable failure",Q(S)),await e.set(w,H(w,R.isTimedOut?"timed out":"down")),b(P,C)}if(ue(R))return ae(R);throw D(R),ne(R,g)},K=t.filter(P=>P.accept==="readWrite"||(f?P.accept==="read":P.accept==="write")),U=await u(K);return b([...U.hosts].reverse(),U.getTimeout)}function d(c,m={}){let f=c.useReadTransporter||c.method==="GET";if(!f)return l(c,m,f);let g=()=>l(c,m);if((m.cacheable||c.cacheable)!==!0)return g();let y={request:c,requestOptions:m,transporter:{queryParameters:r,headers:o}};return a.get(y,()=>s.get(y,()=>s.set(y,g()).then(h=>Promise.all([s.delete(y),h]),h=>Promise.all([s.delete(y),Promise.reject(h)])).then(([h,q])=>q)),{miss:h=>a.set(y,h)})}return{hostsCache:e,requester:i,timeouts:p,algoliaAgent:n,baseHeaders:o,baseQueryParameters:r,hosts:t,request:d,requestsCache:s,responsesCache:a}}function me(t){let e={value:`Algolia for JavaScript (${t})`,add(o){let r=`; ${o.segment}${o.version!==void 0?` (${o.version})`:""}`;return e.value.indexOf(r)===-1&&(e.value=`${e.value}${r}`),e}};return e}function j({algoliaAgents:t,client:e,version:o}){let r=me(o).add({segment:e,version:o});return t.forEach(n=>r.add(n)),r}var $=1e3,z=2e3,F=3e4;function B(){function t(e){return new Promise(o=>{let r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach(s=>r.setRequestHeader(s,e.headers[s]));let n=(s,a)=>setTimeout(()=>{r.abort(),o({status:0,content:a,isTimedOut:!0})},s),p=n(e.connectTimeout,"Connection timeout"),i;r.onreadystatechange=()=>{r.readyState>r.OPENED&&i===void 0&&(clearTimeout(p),i=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{r.status===0&&(clearTimeout(p),clearTimeout(i),o({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(p),clearTimeout(i),o({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)})}return{send:t}}var x="1.3.2";function de(){return[{url:"status.algolia.com",accept:"readWrite",protocol:"https"}]}function X({appId:t,apiKey:e,authMode:o,algoliaAgents:r,...n}){let p=L(t,e,o),i=J({hosts:de(),...n,algoliaAgent:j({algoliaAgents:r,client:"Monitoring",version:x}),baseHeaders:{"content-type":"text/plain",...p.headers(),...n.baseHeaders},baseQueryParameters:{...p.queryParameters(),...n.baseQueryParameters}});return{transporter:i,appId:t,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(s,a){i.algoliaAgent.add({segment:s,version:a})},setClientApiKey({apiKey:s}){!o||o==="WithinHeaders"?i.baseHeaders["x-algolia-api-key"]=s:i.baseQueryParameters["x-algolia-api-key"]=s},customDelete({path:s,parameters:a},u){if(!s)throw new Error("Parameter `path` is required when calling `customDelete`.");let m={method:"DELETE",path:"/{path}".replace("{path}",s),queryParameters:a||{},headers:{}};return i.request(m,u)},customGet({path:s,parameters:a},u){if(!s)throw new Error("Parameter `path` is required when calling `customGet`.");let m={method:"GET",path:"/{path}".replace("{path}",s),queryParameters:a||{},headers:{}};return i.request(m,u)},customPost({path:s,parameters:a,body:u},l){if(!s)throw new Error("Parameter `path` is required when calling `customPost`.");let f={method:"POST",path:"/{path}".replace("{path}",s),queryParameters:a||{},headers:{},data:u||{}};return i.request(f,l)},customPut({path:s,parameters:a,body:u},l){if(!s)throw new Error("Parameter `path` is required when calling `customPut`.");let f={method:"PUT",path:"/{path}".replace("{path}",s),queryParameters:a||{},headers:{},data:u||{}};return i.request(f,l)},getClusterIncidents({clusters:s},a){if(!s)throw new Error("Parameter `clusters` is required when calling `getClusterIncidents`.");let c={method:"GET",path:"/1/incidents/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return i.request(c,a)},getClusterStatus({clusters:s},a){if(!s)throw new Error("Parameter `clusters` is required when calling `getClusterStatus`.");let c={method:"GET",path:"/1/status/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return i.request(c,a)},getIncidents(s){let d={method:"GET",path:"/1/incidents",queryParameters:{},headers:{}};return i.request(d,s)},getIndexingTime({clusters:s},a){if(!s)throw new Error("Parameter `clusters` is required when calling `getIndexingTime`.");let c={method:"GET",path:"/1/indexing/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return i.request(c,a)},getLatency({clusters:s},a){if(!s)throw new Error("Parameter `clusters` is required when calling `getLatency`.");let c={method:"GET",path:"/1/latency/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return i.request(c,a)},getMetrics({metric:s,period:a},u){if(!s)throw new Error("Parameter `metric` is required when calling `getMetrics`.");if(!a)throw new Error("Parameter `period` is required when calling `getMetrics`.");let m={method:"GET",path:"/1/infrastructure/{metric}/period/{period}".replace("{metric}",encodeURIComponent(s)).replace("{period}",encodeURIComponent(a)),queryParameters:{},headers:{}};return i.request(m,u)},getReachability({clusters:s},a){if(!s)throw new Error("Parameter `clusters` is required when calling `getReachability`.");let c={method:"GET",path:"/1/reachability/{clusters}/probes".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return i.request(c,a)},getServers(s){let d={method:"GET",path:"/1/inventory/servers",queryParameters:{},headers:{}};return i.request(d,s)},getStatus(s){let d={method:"GET",path:"/1/status",queryParameters:{},headers:{}};return i.request(d,s)}}}function Ze(t,e,o){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");return X({appId:t,apiKey:e,timeouts:{connect:$,read:z,write:F},requester:B(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:O(),requestsCache:O({serializable:!1}),hostsCache:T({caches:[k({key:`${x}-${t}`}),O()]}),...o})}export{x as apiClientVersion,Ze as monitoringClient}; | ||
//# sourceMappingURL=browser.min.js.map |
@@ -7,3 +7,3 @@ (function (global, factory) { | ||
function L(t,e,s="WithinHeaders"){let r={"x-algolia-api-key":e,"x-algolia-application-id":t};return {headers(){return s==="WithinHeaders"?r:{}},queryParameters(){return s==="WithinQueryParameters"?r:{}}}}function k(t){let e,s=`algolia-client-js-${t.key}`;function r(){return e===void 0&&(e=t.localStorage||window.localStorage),e}function n(){return JSON.parse(r().getItem(s)||"{}")}function p(a){r().setItem(s,JSON.stringify(a));}function o(){let a=t.timeToLive?t.timeToLive*1e3:null,i=n(),l=Object.fromEntries(Object.entries(i).filter(([,h])=>h.timestamp!==void 0));if(p(l),!a)return;let c=Object.fromEntries(Object.entries(l).filter(([,h])=>{let u=new Date().getTime();return !(h.timestamp+a<u)}));p(c);}return {get(a,i,l={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(o(),n()[JSON.stringify(a)])).then(c=>Promise.all([c?c.value:i(),c!==void 0])).then(([c,h])=>Promise.all([c,h||l.miss(c)])).then(([c])=>c)},set(a,i){return Promise.resolve().then(()=>{let l=n();return l[JSON.stringify(a)]={timestamp:new Date().getTime(),value:i},r().setItem(s,JSON.stringify(l)),i})},delete(a){return Promise.resolve().then(()=>{let i=n();delete i[JSON.stringify(a)],r().setItem(s,JSON.stringify(i));})},clear(){return Promise.resolve().then(()=>{r().removeItem(s);})}}}function V(){return {get(t,e,s={miss:()=>Promise.resolve()}){return e().then(n=>Promise.all([n,s.miss(n)])).then(([n])=>n)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}function T(t){let e=[...t.caches],s=e.shift();return s===void 0?V():{get(r,n,p={miss:()=>Promise.resolve()}){return s.get(r,n,p).catch(()=>T({caches:e}).get(r,n,p))},set(r,n){return s.set(r,n).catch(()=>T({caches:e}).set(r,n))},delete(r){return s.delete(r).catch(()=>T({caches:e}).delete(r))},clear(){return s.clear().catch(()=>T({caches:e}).clear())}}}function O(t={serializable:!0}){let e={};return {get(s,r,n={miss:()=>Promise.resolve()}){let p=JSON.stringify(s);if(p in e)return Promise.resolve(t.serializable?JSON.parse(e[p]):e[p]);let o=r();return o.then(a=>n.miss(a)).then(()=>o)},set(s,r){return e[JSON.stringify(s)]=t.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete(s){return delete e[JSON.stringify(s)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}var G=2*60*1e3;function H(t,e="up"){let s=Date.now();function r(){return e==="up"||Date.now()-s>G}function n(){return e==="timed out"&&Date.now()-s<=G}return {...t,status:e,lastUpdate:s,isUp:r,isTimedOut:n}}var M=class extends Error{name="AlgoliaError";constructor(t,e){super(t),e&&(this.name=e);}},W=class extends M{stackTrace;constructor(t,e,s){super(t,s),this.stackTrace=e;}},Y=class extends W{constructor(t){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",t,"RetryError");}},I=class extends W{status;constructor(t,e,s,r="ApiError"){super(t,s,r),this.status=e;}},Z=class extends M{response;constructor(t,e){super(t,"DeserializationError"),this.response=e;}},ee=class extends I{error;constructor(t,e,s,r){super(t,e,r,"DetailedApiError"),this.error=s;}};function te(t,e,s){let r=re(s),n=`${t.protocol}://${t.url}${t.port?`:${t.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return r.length&&(n+=`?${r}`),n}function re(t){return Object.keys(t).filter(e=>t[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(t[e])==="[object Array]"?t[e].join(","):t[e]).replaceAll("+","%20")}`).join("&")}function se(t,e){if(t.method==="GET"||t.data===void 0&&e.data===void 0)return;let s=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(s)}function oe(t,e,s){let r={Accept:"application/json",...t,...e,...s},n={};return Object.keys(r).forEach(p=>{let o=r[p];n[p.toLowerCase()]=o;}),n}function ae(t){try{return JSON.parse(t.content)}catch(e){throw new Z(e.message,t)}}function ne({content:t,status:e},s){try{let r=JSON.parse(t);return "error"in r?new ee(r.message,e,r.error,s):new I(r.message,e,s)}catch{}return new I(t,e,s)}function ie({isTimedOut:t,status:e}){return !t&&~~e===0}function ce({isTimedOut:t,status:e}){return t||ie({isTimedOut:t,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function ue({status:t}){return ~~(t/100)===2}function le(t){return t.map(e=>Q(e))}function Q(t){let e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function J({hosts:t,hostsCache:e,baseHeaders:s,baseQueryParameters:r,algoliaAgent:n,timeouts:p,requester:o,requestsCache:a,responsesCache:i}){async function l(u){let m=await Promise.all(u.map(d=>e.get(d,()=>Promise.resolve(H(d))))),R=m.filter(d=>d.isUp()),f=m.filter(d=>d.isTimedOut()),E=[...R,...f];return {hosts:E.length>0?E:u,getTimeout(d,y){return (f.length===0&&d===0?1:f.length+3+d)*y}}}async function c(u,m,R=!0){let f=[],E=se(u,m),g=oe(s,u.headers,m.headers),d=u.method==="GET"?{...u.data,...m.data}:{},y={...r,...u.queryParameters,...d};if(n.value&&(y["x-algolia-agent"]=n.value),m&&m.queryParameters)for(let P of Object.keys(m.queryParameters))!m.queryParameters[P]||Object.prototype.toString.call(m.queryParameters[P])==="[object Object]"?y[P]=m.queryParameters[P]:y[P]=m.queryParameters[P].toString();let v=0,b=async(P,C)=>{let w=P.pop();if(w===void 0)throw new Y(le(f));let A={...p,...m.timeouts},N={data:E,headers:g,method:u.method,url:te(w,u.path,y),connectTimeout:C(v,A.connect),responseTimeout:C(v,R?A.read:A.write)},D=S=>{let _={request:N,response:S,host:w,triesLeft:P.length};return f.push(_),_},q=await o.send(N);if(ce(q)){let S=D(q);return q.isTimedOut&&v++,console.log("Retryable failure",Q(S)),await e.set(w,H(w,q.isTimedOut?"timed out":"down")),b(P,C)}if(ue(q))return ae(q);throw D(q),ne(q,f)},K=t.filter(P=>P.accept==="readWrite"||(R?P.accept==="read":P.accept==="write")),U=await l(K);return b([...U.hosts].reverse(),U.getTimeout)}function h(u,m={}){let R=u.useReadTransporter||u.method==="GET";if(!R)return c(u,m,R);let f=()=>c(u,m);if((m.cacheable||u.cacheable)!==!0)return f();let g={request:u,requestOptions:m,transporter:{queryParameters:r,headers:s}};return i.get(g,()=>a.get(g,()=>a.set(g,f()).then(d=>Promise.all([a.delete(g),d]),d=>Promise.all([a.delete(g),Promise.reject(d)])).then(([d,y])=>y)),{miss:d=>i.set(g,d)})}return {hostsCache:e,requester:o,timeouts:p,algoliaAgent:n,baseHeaders:s,baseQueryParameters:r,hosts:t,request:h,requestsCache:a,responsesCache:i}}function me(t){let e={value:`Algolia for JavaScript (${t})`,add(s){let r=`; ${s.segment}${s.version!==void 0?` (${s.version})`:""}`;return e.value.indexOf(r)===-1&&(e.value=`${e.value}${r}`),e}};return e}function j({algoliaAgents:t,client:e,version:s}){let r=me(s).add({segment:e,version:s});return t.forEach(n=>r.add(n)),r}var $=1e3,z=2e3,F=3e4;function B(){function t(e){return new Promise(s=>{let r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach(a=>r.setRequestHeader(a,e.headers[a]));let n=(a,i)=>setTimeout(()=>{r.abort(),s({status:0,content:i,isTimedOut:!0});},a),p=n(e.connectTimeout,"Connection timeout"),o;r.onreadystatechange=()=>{r.readyState>r.OPENED&&o===void 0&&(clearTimeout(p),o=n(e.responseTimeout,"Socket timeout"));},r.onerror=()=>{r.status===0&&(clearTimeout(p),clearTimeout(o),s({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}));},r.onload=()=>{clearTimeout(p),clearTimeout(o),s({content:r.responseText,status:r.status,isTimedOut:!1});},r.send(e.data);})}return {send:t}}var x="1.3.1";function pe(){return [{url:"status.algolia.com",accept:"readWrite",protocol:"https"}]}function X({appId:t,apiKey:e,authMode:s,algoliaAgents:r,...n}){let p=L(t,e,s);return {transporter:J({hosts:pe(),...n,algoliaAgent:j({algoliaAgents:r,client:"Monitoring",version:x}),baseHeaders:{"content-type":"text/plain",...p.headers(),...n.baseHeaders},baseQueryParameters:{...p.queryParameters(),...n.baseQueryParameters}}),appId:t,clearCache(){return Promise.all([this.transporter.requestsCache.clear(),this.transporter.responsesCache.clear()]).then(()=>{})},get _ua(){return this.transporter.algoliaAgent.value},addAlgoliaAgent(o,a){this.transporter.algoliaAgent.add({segment:o,version:a});},setClientApiKey({apiKey:o}){!s||s==="WithinHeaders"?this.transporter.baseHeaders["x-algolia-api-key"]=o:this.transporter.baseQueryParameters["x-algolia-api-key"]=o;},customDelete({path:o,parameters:a},i){if(!o)throw new Error("Parameter `path` is required when calling `customDelete`.");let u={method:"DELETE",path:"/{path}".replace("{path}",o),queryParameters:a||{},headers:{}};return this.transporter.request(u,i)},customGet({path:o,parameters:a},i){if(!o)throw new Error("Parameter `path` is required when calling `customGet`.");let u={method:"GET",path:"/{path}".replace("{path}",o),queryParameters:a||{},headers:{}};return this.transporter.request(u,i)},customPost({path:o,parameters:a,body:i},l){if(!o)throw new Error("Parameter `path` is required when calling `customPost`.");let m={method:"POST",path:"/{path}".replace("{path}",o),queryParameters:a||{},headers:{},data:i||{}};return this.transporter.request(m,l)},customPut({path:o,parameters:a,body:i},l){if(!o)throw new Error("Parameter `path` is required when calling `customPut`.");let m={method:"PUT",path:"/{path}".replace("{path}",o),queryParameters:a||{},headers:{},data:i||{}};return this.transporter.request(m,l)},getClusterIncidents({clusters:o},a){if(!o)throw new Error("Parameter `clusters` is required when calling `getClusterIncidents`.");let h={method:"GET",path:"/1/incidents/{clusters}".replace("{clusters}",encodeURIComponent(o)),queryParameters:{},headers:{}};return this.transporter.request(h,a)},getClusterStatus({clusters:o},a){if(!o)throw new Error("Parameter `clusters` is required when calling `getClusterStatus`.");let h={method:"GET",path:"/1/status/{clusters}".replace("{clusters}",encodeURIComponent(o)),queryParameters:{},headers:{}};return this.transporter.request(h,a)},getIncidents(o){let c={method:"GET",path:"/1/incidents",queryParameters:{},headers:{}};return this.transporter.request(c,o)},getIndexingTime({clusters:o},a){if(!o)throw new Error("Parameter `clusters` is required when calling `getIndexingTime`.");let h={method:"GET",path:"/1/indexing/{clusters}".replace("{clusters}",encodeURIComponent(o)),queryParameters:{},headers:{}};return this.transporter.request(h,a)},getLatency({clusters:o},a){if(!o)throw new Error("Parameter `clusters` is required when calling `getLatency`.");let h={method:"GET",path:"/1/latency/{clusters}".replace("{clusters}",encodeURIComponent(o)),queryParameters:{},headers:{}};return this.transporter.request(h,a)},getMetrics({metric:o,period:a},i){if(!o)throw new Error("Parameter `metric` is required when calling `getMetrics`.");if(!a)throw new Error("Parameter `period` is required when calling `getMetrics`.");let u={method:"GET",path:"/1/infrastructure/{metric}/period/{period}".replace("{metric}",encodeURIComponent(o)).replace("{period}",encodeURIComponent(a)),queryParameters:{},headers:{}};return this.transporter.request(u,i)},getReachability({clusters:o},a){if(!o)throw new Error("Parameter `clusters` is required when calling `getReachability`.");let h={method:"GET",path:"/1/reachability/{clusters}/probes".replace("{clusters}",encodeURIComponent(o)),queryParameters:{},headers:{}};return this.transporter.request(h,a)},getServers(o){let c={method:"GET",path:"/1/inventory/servers",queryParameters:{},headers:{}};return this.transporter.request(c,o)},getStatus(o){let c={method:"GET",path:"/1/status",queryParameters:{},headers:{}};return this.transporter.request(c,o)}}}function Ze(t,e,s){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");return X({appId:t,apiKey:e,timeouts:{connect:$,read:z,write:F},requester:B(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:O(),requestsCache:O({serializable:!1}),hostsCache:T({caches:[k({key:`${x}-${t}`}),O()]}),...s})} | ||
function L(t,e,o="WithinHeaders"){let r={"x-algolia-api-key":e,"x-algolia-application-id":t};return {headers(){return o==="WithinHeaders"?r:{}},queryParameters(){return o==="WithinQueryParameters"?r:{}}}}function k(t){let e,o=`algolia-client-js-${t.key}`;function r(){return e===void 0&&(e=t.localStorage||window.localStorage),e}function n(){return JSON.parse(r().getItem(o)||"{}")}function p(s){r().setItem(o,JSON.stringify(s));}function i(){let s=t.timeToLive?t.timeToLive*1e3:null,a=n(),u=Object.fromEntries(Object.entries(a).filter(([,d])=>d.timestamp!==void 0));if(p(u),!s)return;let l=Object.fromEntries(Object.entries(u).filter(([,d])=>{let c=new Date().getTime();return !(d.timestamp+s<c)}));p(l);}return {get(s,a,u={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(i(),n()[JSON.stringify(s)])).then(l=>Promise.all([l?l.value:a(),l!==void 0])).then(([l,d])=>Promise.all([l,d||u.miss(l)])).then(([l])=>l)},set(s,a){return Promise.resolve().then(()=>{let u=n();return u[JSON.stringify(s)]={timestamp:new Date().getTime(),value:a},r().setItem(o,JSON.stringify(u)),a})},delete(s){return Promise.resolve().then(()=>{let a=n();delete a[JSON.stringify(s)],r().setItem(o,JSON.stringify(a));})},clear(){return Promise.resolve().then(()=>{r().removeItem(o);})}}}function V(){return {get(t,e,o={miss:()=>Promise.resolve()}){return e().then(n=>Promise.all([n,o.miss(n)])).then(([n])=>n)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}function T(t){let e=[...t.caches],o=e.shift();return o===void 0?V():{get(r,n,p={miss:()=>Promise.resolve()}){return o.get(r,n,p).catch(()=>T({caches:e}).get(r,n,p))},set(r,n){return o.set(r,n).catch(()=>T({caches:e}).set(r,n))},delete(r){return o.delete(r).catch(()=>T({caches:e}).delete(r))},clear(){return o.clear().catch(()=>T({caches:e}).clear())}}}function O(t={serializable:!0}){let e={};return {get(o,r,n={miss:()=>Promise.resolve()}){let p=JSON.stringify(o);if(p in e)return Promise.resolve(t.serializable?JSON.parse(e[p]):e[p]);let i=r();return i.then(s=>n.miss(s)).then(()=>i)},set(o,r){return e[JSON.stringify(o)]=t.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete(o){return delete e[JSON.stringify(o)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}var G=2*60*1e3;function H(t,e="up"){let o=Date.now();function r(){return e==="up"||Date.now()-o>G}function n(){return e==="timed out"&&Date.now()-o<=G}return {...t,status:e,lastUpdate:o,isUp:r,isTimedOut:n}}var M=class extends Error{name="AlgoliaError";constructor(t,e){super(t),e&&(this.name=e);}},W=class extends M{stackTrace;constructor(t,e,o){super(t,o),this.stackTrace=e;}},Y=class extends W{constructor(t){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",t,"RetryError");}},I=class extends W{status;constructor(t,e,o,r="ApiError"){super(t,o,r),this.status=e;}},Z=class extends M{response;constructor(t,e){super(t,"DeserializationError"),this.response=e;}},ee=class extends I{error;constructor(t,e,o,r){super(t,e,r,"DetailedApiError"),this.error=o;}};function te(t,e,o){let r=re(o),n=`${t.protocol}://${t.url}${t.port?`:${t.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return r.length&&(n+=`?${r}`),n}function re(t){return Object.keys(t).filter(e=>t[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(t[e])==="[object Array]"?t[e].join(","):t[e]).replaceAll("+","%20")}`).join("&")}function se(t,e){if(t.method==="GET"||t.data===void 0&&e.data===void 0)return;let o=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(o)}function oe(t,e,o){let r={Accept:"application/json",...t,...e,...o},n={};return Object.keys(r).forEach(p=>{let i=r[p];n[p.toLowerCase()]=i;}),n}function ae(t){try{return JSON.parse(t.content)}catch(e){throw new Z(e.message,t)}}function ne({content:t,status:e},o){try{let r=JSON.parse(t);return "error"in r?new ee(r.message,e,r.error,o):new I(r.message,e,o)}catch{}return new I(t,e,o)}function ie({isTimedOut:t,status:e}){return !t&&~~e===0}function ce({isTimedOut:t,status:e}){return t||ie({isTimedOut:t,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function ue({status:t}){return ~~(t/100)===2}function le(t){return t.map(e=>Q(e))}function Q(t){let e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function J({hosts:t,hostsCache:e,baseHeaders:o,baseQueryParameters:r,algoliaAgent:n,timeouts:p,requester:i,requestsCache:s,responsesCache:a}){async function u(c){let m=await Promise.all(c.map(h=>e.get(h,()=>Promise.resolve(H(h))))),f=m.filter(h=>h.isUp()),g=m.filter(h=>h.isTimedOut()),E=[...f,...g];return {hosts:E.length>0?E:c,getTimeout(h,q){return (g.length===0&&h===0?1:g.length+3+h)*q}}}async function l(c,m,f=!0){let g=[],E=se(c,m),y=oe(o,c.headers,m.headers),h=c.method==="GET"?{...c.data,...m.data}:{},q={...r,...c.queryParameters,...h};if(n.value&&(q["x-algolia-agent"]=n.value),m&&m.queryParameters)for(let P of Object.keys(m.queryParameters))!m.queryParameters[P]||Object.prototype.toString.call(m.queryParameters[P])==="[object Object]"?q[P]=m.queryParameters[P]:q[P]=m.queryParameters[P].toString();let v=0,b=async(P,C)=>{let w=P.pop();if(w===void 0)throw new Y(le(g));let A={...p,...m.timeouts},N={data:E,headers:y,method:c.method,url:te(w,c.path,q),connectTimeout:C(v,A.connect),responseTimeout:C(v,f?A.read:A.write)},D=S=>{let _={request:N,response:S,host:w,triesLeft:P.length};return g.push(_),_},R=await i.send(N);if(ce(R)){let S=D(R);return R.isTimedOut&&v++,console.log("Retryable failure",Q(S)),await e.set(w,H(w,R.isTimedOut?"timed out":"down")),b(P,C)}if(ue(R))return ae(R);throw D(R),ne(R,g)},K=t.filter(P=>P.accept==="readWrite"||(f?P.accept==="read":P.accept==="write")),U=await u(K);return b([...U.hosts].reverse(),U.getTimeout)}function d(c,m={}){let f=c.useReadTransporter||c.method==="GET";if(!f)return l(c,m,f);let g=()=>l(c,m);if((m.cacheable||c.cacheable)!==!0)return g();let y={request:c,requestOptions:m,transporter:{queryParameters:r,headers:o}};return a.get(y,()=>s.get(y,()=>s.set(y,g()).then(h=>Promise.all([s.delete(y),h]),h=>Promise.all([s.delete(y),Promise.reject(h)])).then(([h,q])=>q)),{miss:h=>a.set(y,h)})}return {hostsCache:e,requester:i,timeouts:p,algoliaAgent:n,baseHeaders:o,baseQueryParameters:r,hosts:t,request:d,requestsCache:s,responsesCache:a}}function me(t){let e={value:`Algolia for JavaScript (${t})`,add(o){let r=`; ${o.segment}${o.version!==void 0?` (${o.version})`:""}`;return e.value.indexOf(r)===-1&&(e.value=`${e.value}${r}`),e}};return e}function j({algoliaAgents:t,client:e,version:o}){let r=me(o).add({segment:e,version:o});return t.forEach(n=>r.add(n)),r}var $=1e3,z=2e3,F=3e4;function B(){function t(e){return new Promise(o=>{let r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach(s=>r.setRequestHeader(s,e.headers[s]));let n=(s,a)=>setTimeout(()=>{r.abort(),o({status:0,content:a,isTimedOut:!0});},s),p=n(e.connectTimeout,"Connection timeout"),i;r.onreadystatechange=()=>{r.readyState>r.OPENED&&i===void 0&&(clearTimeout(p),i=n(e.responseTimeout,"Socket timeout"));},r.onerror=()=>{r.status===0&&(clearTimeout(p),clearTimeout(i),o({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}));},r.onload=()=>{clearTimeout(p),clearTimeout(i),o({content:r.responseText,status:r.status,isTimedOut:!1});},r.send(e.data);})}return {send:t}}var x="1.3.2";function de(){return [{url:"status.algolia.com",accept:"readWrite",protocol:"https"}]}function X({appId:t,apiKey:e,authMode:o,algoliaAgents:r,...n}){let p=L(t,e,o),i=J({hosts:de(),...n,algoliaAgent:j({algoliaAgents:r,client:"Monitoring",version:x}),baseHeaders:{"content-type":"text/plain",...p.headers(),...n.baseHeaders},baseQueryParameters:{...p.queryParameters(),...n.baseQueryParameters}});return {transporter:i,appId:t,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(s,a){i.algoliaAgent.add({segment:s,version:a});},setClientApiKey({apiKey:s}){!o||o==="WithinHeaders"?i.baseHeaders["x-algolia-api-key"]=s:i.baseQueryParameters["x-algolia-api-key"]=s;},customDelete({path:s,parameters:a},u){if(!s)throw new Error("Parameter `path` is required when calling `customDelete`.");let m={method:"DELETE",path:"/{path}".replace("{path}",s),queryParameters:a||{},headers:{}};return i.request(m,u)},customGet({path:s,parameters:a},u){if(!s)throw new Error("Parameter `path` is required when calling `customGet`.");let m={method:"GET",path:"/{path}".replace("{path}",s),queryParameters:a||{},headers:{}};return i.request(m,u)},customPost({path:s,parameters:a,body:u},l){if(!s)throw new Error("Parameter `path` is required when calling `customPost`.");let f={method:"POST",path:"/{path}".replace("{path}",s),queryParameters:a||{},headers:{},data:u||{}};return i.request(f,l)},customPut({path:s,parameters:a,body:u},l){if(!s)throw new Error("Parameter `path` is required when calling `customPut`.");let f={method:"PUT",path:"/{path}".replace("{path}",s),queryParameters:a||{},headers:{},data:u||{}};return i.request(f,l)},getClusterIncidents({clusters:s},a){if(!s)throw new Error("Parameter `clusters` is required when calling `getClusterIncidents`.");let c={method:"GET",path:"/1/incidents/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return i.request(c,a)},getClusterStatus({clusters:s},a){if(!s)throw new Error("Parameter `clusters` is required when calling `getClusterStatus`.");let c={method:"GET",path:"/1/status/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return i.request(c,a)},getIncidents(s){let d={method:"GET",path:"/1/incidents",queryParameters:{},headers:{}};return i.request(d,s)},getIndexingTime({clusters:s},a){if(!s)throw new Error("Parameter `clusters` is required when calling `getIndexingTime`.");let c={method:"GET",path:"/1/indexing/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return i.request(c,a)},getLatency({clusters:s},a){if(!s)throw new Error("Parameter `clusters` is required when calling `getLatency`.");let c={method:"GET",path:"/1/latency/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return i.request(c,a)},getMetrics({metric:s,period:a},u){if(!s)throw new Error("Parameter `metric` is required when calling `getMetrics`.");if(!a)throw new Error("Parameter `period` is required when calling `getMetrics`.");let m={method:"GET",path:"/1/infrastructure/{metric}/period/{period}".replace("{metric}",encodeURIComponent(s)).replace("{period}",encodeURIComponent(a)),queryParameters:{},headers:{}};return i.request(m,u)},getReachability({clusters:s},a){if(!s)throw new Error("Parameter `clusters` is required when calling `getReachability`.");let c={method:"GET",path:"/1/reachability/{clusters}/probes".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return i.request(c,a)},getServers(s){let d={method:"GET",path:"/1/inventory/servers",queryParameters:{},headers:{}};return i.request(d,s)},getStatus(s){let d={method:"GET",path:"/1/status",queryParameters:{},headers:{}};return i.request(d,s)}}}function Ze(t,e,o){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");return X({appId:t,apiKey:e,timeouts:{connect:$,read:z,write:F},requester:B(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:O(),requestsCache:O({serializable:!1}),hostsCache:T({caches:[k({key:`${x}-${t}`}),O()]}),...o})} | ||
@@ -10,0 +10,0 @@ exports.apiClientVersion = x; |
@@ -13,3 +13,3 @@ // builds/node.ts | ||
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common"; | ||
var apiClientVersion = "1.3.1"; | ||
var apiClientVersion = "1.3.2"; | ||
function getDefaultHosts() { | ||
@@ -26,21 +26,22 @@ return [{ url: "status.algolia.com", accept: "readWrite", protocol: "https" }]; | ||
const auth = createAuth(appIdOption, apiKeyOption, authMode); | ||
const transporter = createTransporter({ | ||
hosts: getDefaultHosts(), | ||
...options, | ||
algoliaAgent: getAlgoliaAgent({ | ||
algoliaAgents, | ||
client: "Monitoring", | ||
version: apiClientVersion | ||
}), | ||
baseHeaders: { | ||
"content-type": "text/plain", | ||
...auth.headers(), | ||
...options.baseHeaders | ||
}, | ||
baseQueryParameters: { | ||
...auth.queryParameters(), | ||
...options.baseQueryParameters | ||
} | ||
}); | ||
return { | ||
transporter: createTransporter({ | ||
hosts: getDefaultHosts(), | ||
...options, | ||
algoliaAgent: getAlgoliaAgent({ | ||
algoliaAgents, | ||
client: "Monitoring", | ||
version: apiClientVersion | ||
}), | ||
baseHeaders: { | ||
"content-type": "text/plain", | ||
...auth.headers(), | ||
...options.baseHeaders | ||
}, | ||
baseQueryParameters: { | ||
...auth.queryParameters(), | ||
...options.baseQueryParameters | ||
} | ||
}), | ||
transporter, | ||
/** | ||
@@ -54,5 +55,3 @@ * The `appId` currently in use. | ||
clearCache() { | ||
return Promise.all([this.transporter.requestsCache.clear(), this.transporter.responsesCache.clear()]).then( | ||
() => void 0 | ||
); | ||
return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0); | ||
}, | ||
@@ -63,3 +62,3 @@ /** | ||
get _ua() { | ||
return this.transporter.algoliaAgent.value; | ||
return transporter.algoliaAgent.value; | ||
}, | ||
@@ -73,3 +72,3 @@ /** | ||
addAlgoliaAgent(segment, version) { | ||
this.transporter.algoliaAgent.add({ segment, version }); | ||
transporter.algoliaAgent.add({ segment, version }); | ||
}, | ||
@@ -84,5 +83,5 @@ /** | ||
if (!authMode || authMode === "WithinHeaders") { | ||
this.transporter.baseHeaders["x-algolia-api-key"] = apiKey; | ||
transporter.baseHeaders["x-algolia-api-key"] = apiKey; | ||
} else { | ||
this.transporter.baseQueryParameters["x-algolia-api-key"] = apiKey; | ||
transporter.baseQueryParameters["x-algolia-api-key"] = apiKey; | ||
} | ||
@@ -111,3 +110,3 @@ }, | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -135,3 +134,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -161,3 +160,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -187,3 +186,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -210,3 +209,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -233,3 +232,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -251,3 +250,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -274,3 +273,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -297,3 +296,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -324,3 +323,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -347,3 +346,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -365,3 +364,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -383,3 +382,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
} | ||
@@ -386,0 +385,0 @@ }; |
@@ -259,3 +259,3 @@ import * as _algolia_client_common from '@algolia/client-common'; | ||
declare const apiClientVersion = "1.3.1"; | ||
declare const apiClientVersion = "1.3.2"; | ||
declare function createMonitoringClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): { | ||
@@ -262,0 +262,0 @@ transporter: _algolia_client_common.Transporter; |
// src/monitoringClient.ts | ||
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common"; | ||
var apiClientVersion = "1.3.1"; | ||
var apiClientVersion = "1.3.2"; | ||
function getDefaultHosts() { | ||
@@ -15,21 +15,22 @@ return [{ url: "status.algolia.com", accept: "readWrite", protocol: "https" }]; | ||
const auth = createAuth(appIdOption, apiKeyOption, authMode); | ||
const transporter = createTransporter({ | ||
hosts: getDefaultHosts(), | ||
...options, | ||
algoliaAgent: getAlgoliaAgent({ | ||
algoliaAgents, | ||
client: "Monitoring", | ||
version: apiClientVersion | ||
}), | ||
baseHeaders: { | ||
"content-type": "text/plain", | ||
...auth.headers(), | ||
...options.baseHeaders | ||
}, | ||
baseQueryParameters: { | ||
...auth.queryParameters(), | ||
...options.baseQueryParameters | ||
} | ||
}); | ||
return { | ||
transporter: createTransporter({ | ||
hosts: getDefaultHosts(), | ||
...options, | ||
algoliaAgent: getAlgoliaAgent({ | ||
algoliaAgents, | ||
client: "Monitoring", | ||
version: apiClientVersion | ||
}), | ||
baseHeaders: { | ||
"content-type": "text/plain", | ||
...auth.headers(), | ||
...options.baseHeaders | ||
}, | ||
baseQueryParameters: { | ||
...auth.queryParameters(), | ||
...options.baseQueryParameters | ||
} | ||
}), | ||
transporter, | ||
/** | ||
@@ -43,5 +44,3 @@ * The `appId` currently in use. | ||
clearCache() { | ||
return Promise.all([this.transporter.requestsCache.clear(), this.transporter.responsesCache.clear()]).then( | ||
() => void 0 | ||
); | ||
return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0); | ||
}, | ||
@@ -52,3 +51,3 @@ /** | ||
get _ua() { | ||
return this.transporter.algoliaAgent.value; | ||
return transporter.algoliaAgent.value; | ||
}, | ||
@@ -62,3 +61,3 @@ /** | ||
addAlgoliaAgent(segment, version) { | ||
this.transporter.algoliaAgent.add({ segment, version }); | ||
transporter.algoliaAgent.add({ segment, version }); | ||
}, | ||
@@ -73,5 +72,5 @@ /** | ||
if (!authMode || authMode === "WithinHeaders") { | ||
this.transporter.baseHeaders["x-algolia-api-key"] = apiKey; | ||
transporter.baseHeaders["x-algolia-api-key"] = apiKey; | ||
} else { | ||
this.transporter.baseQueryParameters["x-algolia-api-key"] = apiKey; | ||
transporter.baseQueryParameters["x-algolia-api-key"] = apiKey; | ||
} | ||
@@ -100,3 +99,3 @@ }, | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -124,3 +123,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -150,3 +149,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -176,3 +175,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -199,3 +198,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -222,3 +221,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -240,3 +239,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -263,3 +262,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -286,3 +285,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -313,3 +312,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -336,3 +335,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -354,3 +353,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
}, | ||
@@ -372,3 +371,3 @@ /** | ||
}; | ||
return this.transporter.request(request, requestOptions); | ||
return transporter.request(request, requestOptions); | ||
} | ||
@@ -375,0 +374,0 @@ }; |
{ | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"repository": { | ||
@@ -47,5 +47,5 @@ "type": "git", | ||
"dependencies": { | ||
"@algolia/client-common": "5.3.1", | ||
"@algolia/requester-browser-xhr": "5.3.1", | ||
"@algolia/requester-node-http": "5.3.1" | ||
"@algolia/client-common": "5.3.2", | ||
"@algolia/requester-browser-xhr": "5.3.2", | ||
"@algolia/requester-node-http": "5.3.2" | ||
}, | ||
@@ -52,0 +52,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
6
16
361570
213446
3198
+ Added@algolia/client-common@5.3.2(transitive)
+ Added@algolia/requester-browser-xhr@5.3.2(transitive)
+ Added@algolia/requester-node-http@5.3.2(transitive)
- Removed@algolia/client-common@5.3.1(transitive)
- Removed@algolia/requester-browser-xhr@5.3.1(transitive)
- Removed@algolia/requester-node-http@5.3.1(transitive)
Updated@algolia/client-common@5.3.2