@cloudoperators/juno-k8s-client 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.cjs.js +1 -1
- package/build/index.es.js +111 -104
- package/build/request.d.ts.map +1 -1
- package/package.json +1 -1
package/build/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("https");function I(t){return typeof t=="string"||t instanceof String}function $(t){return typeof t=="number"&&t.constructor===Number}function B(t){return t!==null&&typeof t=="object"&&t.constructor===Object}const H=t=>{if(!t)return;const n=[];for(const o in t)if(Object.keys(t).includes(o)){const h=t[o];n.push(encodeURIComponent(o)+"="+encodeURIComponent(h))}return n.join("&")};function p(...t){if(t.length<2)throw new Error("Bad parameters: buildUrl needs at least two non-empty parameters.");const n=B(t[t.length-1])?t.pop():null;t.forEach(r=>{if(!r||!(I(r)||$(r)))throw new Error("Bad parameters: buildUrl accepts only strings and numbers, with a hash map as the last parameter");if(I(r)&&r.indexOf("?")>=0)throw new Error('Bad parameters: buildUrl does not accept strings with "?" character. Please use a hashmap as the last parameter instead!')});let o=t.join("/");const[h,e]=o.split("://");if(!h||!e)throw new Error(`Bad URL: ${o}`);return o=`${h}://${e.replace(/\/\/+/g,"/")}`,n&&(o+=`?${H(n)}`),o}const k="[k8sClient]:",C=t=>function(...n){try{const o=[`${k}`,...n];console[t](...o)}catch(o){console.error(k,"Logging error:",o)}},P=C("error"),l=C("debug"),U=t=>{if(t.status>=200&&t.status<300)return t;{const n=new Error(t.statusText||`${t.status}`);throw n.response=t,n}};function X(t,n){if(!(!t||!n.startsWith("https:")||typeof window<"u"))try{return j?.Agent?new j.Agent({rejectUnauthorized:!1}):void 0}catch{return}}function E(t,n,o={}){o.params&&(n=p(n,o.params));const{ignoreSsl:h,debug:e,...r}=o,s=X(h||!1,n);s&&e===!0&&process.env.NODE_ENV!=="test"&&l(`⚠️ SSL verification disabled for request to: ${n}`);const a=["signal","headers","body","mode","cache","credentials"].reduce((m,f)=>r[f]?{...m,[f]:r[f]}:m,{credentials:"same-origin",method:t});return s&&(a.agent=s),a.body&&typeof a.body!="string"&&(a.body=JSON.stringify(a.body)),e===!0&&l("fetch >",n,{...a,agent:s?"HTTPS Agent (SSL ignored)":a.agent}),fetch(n,a).then(U)}const w="ADDED",R="MODIFIED",A="DELETED",b="ERROR",W="BOOKMARK";class S{constructor(n,o={},h){this.listeners={[w]:[],[R]:[],[A]:[],[b]:[]},this.controller=new AbortController,this.signal=this.controller.signal,this.resourceVersion=null,this.PREFIX="watch >",this.decoder=new TextDecoder,this.refreshToken=e=>{this.options.headers&&(this.options.headers.Authorization=`Bearer ${e}`)},this.checkType=e=>{if(![w,R,A,b].includes(e))throw new Error(`Bad type: ${e}`)},this.addListener=(e,r)=>{this.checkType(e),this.listeners[e].push(r)},this.informListeners=(e,r)=>{const s=this.listeners[e];s&&s.forEach(c=>{try{c(r)}catch(a){P(a)}})},this.handleEvents=e=>{Array.isArray(e)||(e=[e]);const r=this;setTimeout(()=>{const s={};e.forEach(c=>{c.type===W?r.resourceVersion=c?.object?.metadata?.resourceVersion??null:(s[c.type]||(s[c.type]=[]),s[c.type].push(c.object))}),Object.keys(s).forEach(c=>r.informListeners(c,s[c]))})},this.getResourceVersion=async()=>{if(this.resourceVersion)return this.resourceVersion;l(this.PREFIX,"get resource version from API");const{metadata:e,items:r}=await E("GET",this.url,this.options).then(s=>s.json());return this.resourceVersion=e.resourceVersion,r&&this.informListeners(w,r),this.resourceVersion},this.start=()=>{const e=this;return e.getCurrentToken&&e.refreshToken(e.getCurrentToken()),e.getResourceVersion().then(r=>(l(e.PREFIX,"current resource version",r),E("GET",e.url,{...e.options,params:{...e.options.params,watch:1,allowWatchBookmarks:!0,resourceVersion:r},signal:e.signal}))).then(async r=>{const s=r.body?.getReader();let c=!1,a="";for(;!c;){l(e.PREFIX,"read stream chunk");const m=await s?.read();c=m?.done??!0,a+=e.decoder.decode(m?.value||new Uint8Array);const f=a.split(/\n|\r|\r\n/);a=f.pop()??"";const D=[];f.forEach(O=>{const T=JSON.parse(O);if(T.type===b&&T?.object?.code===410){e.cancel(),setTimeout(()=>{l(e.PREFIX,"resource is gone 410","recreate watch request!"),e.start()});return}D.push(T)}),l(e.PREFIX,"inform listeners",f),e.handleEvents(D)}}).catch(r=>{if(r.name==="AbortError")return;const s=r.code??r?.response?.status;if(s===410){l(e.PREFIX,"resource is gone 410"),e.resourceVersion=null,setTimeout(()=>e.start(),0);return}if(s===404){e.handleEvents({type:b,object:r}),e.cancel();return}P("WATCH ERROR",r,r.code,s,r.response),console.dir(r),setTimeout(()=>{l(e.PREFIX,"recover connection","restart!"),e.start()},3e4)}),e.cancel},this.on=(e,r)=>(this.addListener(e,r),this),this.cancel=()=>{l(this.PREFIX,"cancel connection"),this.controller.abort()},this.url=n,this.options=o,this.getCurrentToken=h,o?.params?.resourceVersion&&(this.resourceVersion=o.params.resourceVersion,delete o.params.resourceVersion)}}const y=async t=>{const n=t.response?.data?new Error(t.response.data.message??t.message):t;return Promise.reject(n)};function v(t){const{apiEndpoint:n,ignoreSsl:o=!1,debug:h=!1}=t;let e=t.token;if(!n||!e)throw new Error(`Bad options: ${JSON.stringify(t,null,4)}. Please provide apiEndpoint and token`);o&&h===!0&&(console.warn(`⚠️ K8s Client: SSL certificate verification disabled for ${n}`),console.warn("🔒 This should only be used in development or secure internal networks"));const r=()=>({Authorization:`Bearer ${e}`,"Content-Type":"application/json"});function s(i,u={}){const d={...r(),...u.headers,...i.headers};return{debug:h,ignoreSsl:o,...u,...i,headers:d}}function c(i,u={}){return E("HEAD",p(n,i),s(u)).catch(y)}function a(i,u={}){return E("GET",p(n,i),s(u)).then(d=>d.json()).catch(y)}function m(i,u,d={}){return E("POST",p(n,i),s(d,{body:u})).then(V=>V.json()).catch(y)}function f(i,u,d={}){return E("PUT",p(n,i),s(d,{body:u})).then(g=>g.json()).catch(y)}function D(i,u,d={}){return E("PATCH",p(n,i),s(d,{headers:{"Content-Type":"application/merge-patch+json"},body:u})).then(g=>g.json()).catch(y)}function O(i,u,d={}){return E("DELETE",p(n,i),s(d,{body:u})).then(g=>g.json()).catch(y)}function T(i,u={}){return new S(p(n,i),s(u),()=>e)}function F(i){e=i}function L(){return e}return{WATCH_ERROR:b,WATCH_ADDED:w,WATCH_DELETED:A,WATCH_MODIFIED:R,head:c,get:a,post:m,put:f,patch:D,delete:O,watch:T,refreshToken:F,currentToken:L}}exports.ADDED=w;exports.DELETED=A;exports.ERROR=b;exports.MODIFIED=R;exports.Watch=S;exports.createClient=v;
|
package/build/index.es.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
1
|
+
import j from "https";
|
|
2
|
+
function k(t) {
|
|
3
3
|
return typeof t == "string" || t instanceof String;
|
|
4
4
|
}
|
|
5
5
|
function V(t) {
|
|
6
6
|
return typeof t == "number" && t.constructor === Number;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function $(t) {
|
|
9
9
|
return t !== null && typeof t == "object" && t.constructor === Object;
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const B = (t) => {
|
|
12
12
|
if (!t) return;
|
|
13
13
|
const n = [];
|
|
14
|
-
for (const
|
|
15
|
-
if (Object.keys(t).includes(
|
|
16
|
-
const
|
|
17
|
-
n.push(encodeURIComponent(
|
|
14
|
+
for (const o in t)
|
|
15
|
+
if (Object.keys(t).includes(o)) {
|
|
16
|
+
const h = t[o];
|
|
17
|
+
n.push(encodeURIComponent(o) + "=" + encodeURIComponent(h));
|
|
18
18
|
}
|
|
19
19
|
return n.join("&");
|
|
20
20
|
};
|
|
21
21
|
function p(...t) {
|
|
22
22
|
if (t.length < 2)
|
|
23
23
|
throw new Error("Bad parameters: buildUrl needs at least two non-empty parameters.");
|
|
24
|
-
const n =
|
|
24
|
+
const n = $(t[t.length - 1]) ? t.pop() : null;
|
|
25
25
|
t.forEach((r) => {
|
|
26
|
-
if (!r || !(
|
|
26
|
+
if (!r || !(k(r) || V(r)))
|
|
27
27
|
throw new Error(
|
|
28
28
|
"Bad parameters: buildUrl accepts only strings and numbers, with a hash map as the last parameter"
|
|
29
29
|
);
|
|
30
|
-
if (
|
|
30
|
+
if (k(r) && r.indexOf("?") >= 0)
|
|
31
31
|
throw new Error(
|
|
32
32
|
'Bad parameters: buildUrl does not accept strings with "?" character. Please use a hashmap as the last parameter instead!'
|
|
33
33
|
);
|
|
34
34
|
});
|
|
35
|
-
let
|
|
36
|
-
const [
|
|
37
|
-
if (!
|
|
38
|
-
throw new Error(`Bad URL: ${
|
|
39
|
-
return
|
|
35
|
+
let o = t.join("/");
|
|
36
|
+
const [h, e] = o.split("://");
|
|
37
|
+
if (!h || !e)
|
|
38
|
+
throw new Error(`Bad URL: ${o}`);
|
|
39
|
+
return o = `${h}://${e.replace(/\/\/+/g, "/")}`, n && (o += `?${B(n)}`), o;
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const I = "[k8sClient]:", C = (t) => function(...n) {
|
|
42
42
|
try {
|
|
43
|
-
const
|
|
44
|
-
console[t](...
|
|
45
|
-
} catch (
|
|
46
|
-
console.error(
|
|
43
|
+
const o = [`${I}`, ...n];
|
|
44
|
+
console[t](...o);
|
|
45
|
+
} catch (o) {
|
|
46
|
+
console.error(I, "Logging error:", o);
|
|
47
47
|
}
|
|
48
|
-
},
|
|
48
|
+
}, P = C("error"), l = C("debug"), H = (t) => {
|
|
49
49
|
if (t.status >= 200 && t.status < 300)
|
|
50
50
|
return t;
|
|
51
51
|
{
|
|
@@ -53,25 +53,32 @@ const k = "[k8sClient]:", P = (t) => function(...n) {
|
|
|
53
53
|
throw n.response = t, n;
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
function U(t, n) {
|
|
57
|
+
if (!(!t || !n.startsWith("https:") || typeof window < "u"))
|
|
58
|
+
try {
|
|
59
|
+
return j?.Agent ? new j.Agent({
|
|
60
|
+
rejectUnauthorized: !1
|
|
61
|
+
}) : void 0;
|
|
62
|
+
} catch {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function E(t, n, o = {}) {
|
|
67
|
+
o.params && (n = p(n, o.params));
|
|
68
|
+
const { ignoreSsl: h, debug: e, ...r } = o, s = U(h || !1, n);
|
|
69
|
+
s && e === !0 && process.env.NODE_ENV !== "test" && l(`⚠️ SSL verification disabled for request to: ${n}`);
|
|
70
|
+
const a = ["signal", "headers", "body", "mode", "cache", "credentials"].reduce(
|
|
71
|
+
(m, f) => r[f] ? { ...m, [f]: r[f] } : m,
|
|
65
72
|
{ credentials: "same-origin", method: t }
|
|
66
73
|
);
|
|
67
|
-
return
|
|
68
|
-
...
|
|
69
|
-
agent:
|
|
70
|
-
}), fetch(n,
|
|
74
|
+
return s && (a.agent = s), a.body && typeof a.body != "string" && (a.body = JSON.stringify(a.body)), e === !0 && l("fetch >", n, {
|
|
75
|
+
...a,
|
|
76
|
+
agent: s ? "HTTPS Agent (SSL ignored)" : a.agent
|
|
77
|
+
}), fetch(n, a).then(H);
|
|
71
78
|
}
|
|
72
|
-
const R = "ADDED", A = "MODIFIED", O = "DELETED", w = "ERROR",
|
|
73
|
-
class
|
|
74
|
-
constructor(n,
|
|
79
|
+
const R = "ADDED", A = "MODIFIED", O = "DELETED", w = "ERROR", X = "BOOKMARK";
|
|
80
|
+
class W {
|
|
81
|
+
constructor(n, o = {}, h) {
|
|
75
82
|
this.listeners = {
|
|
76
83
|
[R]: [],
|
|
77
84
|
[A]: [],
|
|
@@ -85,30 +92,30 @@ class X {
|
|
|
85
92
|
}, this.addListener = (e, r) => {
|
|
86
93
|
this.checkType(e), this.listeners[e].push(r);
|
|
87
94
|
}, this.informListeners = (e, r) => {
|
|
88
|
-
const
|
|
89
|
-
|
|
95
|
+
const s = this.listeners[e];
|
|
96
|
+
s && s.forEach((c) => {
|
|
90
97
|
try {
|
|
91
|
-
|
|
92
|
-
} catch (
|
|
93
|
-
|
|
98
|
+
c(r);
|
|
99
|
+
} catch (a) {
|
|
100
|
+
P(a);
|
|
94
101
|
}
|
|
95
102
|
});
|
|
96
103
|
}, this.handleEvents = (e) => {
|
|
97
104
|
Array.isArray(e) || (e = [e]);
|
|
98
105
|
const r = this;
|
|
99
106
|
setTimeout(() => {
|
|
100
|
-
const
|
|
101
|
-
e.forEach((
|
|
102
|
-
|
|
103
|
-
}), Object.keys(
|
|
107
|
+
const s = {};
|
|
108
|
+
e.forEach((c) => {
|
|
109
|
+
c.type === X ? r.resourceVersion = c?.object?.metadata?.resourceVersion ?? null : (s[c.type] || (s[c.type] = []), s[c.type].push(c.object));
|
|
110
|
+
}), Object.keys(s).forEach((c) => r.informListeners(c, s[c]));
|
|
104
111
|
});
|
|
105
112
|
}, this.getResourceVersion = async () => {
|
|
106
113
|
if (this.resourceVersion) return this.resourceVersion;
|
|
107
114
|
l(this.PREFIX, "get resource version from API");
|
|
108
115
|
const { metadata: e, items: r } = await E("GET", this.url, this.options).then(
|
|
109
|
-
(
|
|
116
|
+
(s) => (
|
|
110
117
|
// 'Body.json()' type definition expects 'any' as a return value
|
|
111
|
-
|
|
118
|
+
s.json()
|
|
112
119
|
)
|
|
113
120
|
);
|
|
114
121
|
return this.resourceVersion = e.resourceVersion, r && this.informListeners(R, r), this.resourceVersion;
|
|
@@ -124,16 +131,16 @@ class X {
|
|
|
124
131
|
},
|
|
125
132
|
signal: e.signal
|
|
126
133
|
}))).then(async (r) => {
|
|
127
|
-
const
|
|
128
|
-
let
|
|
129
|
-
for (; !
|
|
134
|
+
const s = r.body?.getReader();
|
|
135
|
+
let c = !1, a = "";
|
|
136
|
+
for (; !c; ) {
|
|
130
137
|
l(e.PREFIX, "read stream chunk");
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
|
|
138
|
+
const m = await s?.read();
|
|
139
|
+
c = m?.done ?? !0, a += e.decoder.decode(m?.value || new Uint8Array());
|
|
140
|
+
const f = a.split(/\n|\r|\r\n/);
|
|
141
|
+
a = f.pop() ?? "";
|
|
135
142
|
const T = [];
|
|
136
|
-
|
|
143
|
+
f.forEach((D) => {
|
|
137
144
|
const b = JSON.parse(D);
|
|
138
145
|
if (b.type === w && b?.object?.code === 410) {
|
|
139
146
|
e.cancel(), setTimeout(() => {
|
|
@@ -142,88 +149,88 @@ class X {
|
|
|
142
149
|
return;
|
|
143
150
|
}
|
|
144
151
|
T.push(b);
|
|
145
|
-
}), l(e.PREFIX, "inform listeners",
|
|
152
|
+
}), l(e.PREFIX, "inform listeners", f), e.handleEvents(T);
|
|
146
153
|
}
|
|
147
154
|
}).catch((r) => {
|
|
148
155
|
if (r.name === "AbortError") return;
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
156
|
+
const s = r.code ?? r?.response?.status;
|
|
157
|
+
if (s === 410) {
|
|
151
158
|
l(e.PREFIX, "resource is gone 410"), e.resourceVersion = null, setTimeout(() => e.start(), 0);
|
|
152
159
|
return;
|
|
153
160
|
}
|
|
154
|
-
if (
|
|
161
|
+
if (s === 404) {
|
|
155
162
|
e.handleEvents({ type: w, object: r }), e.cancel();
|
|
156
163
|
return;
|
|
157
164
|
}
|
|
158
|
-
|
|
165
|
+
P("WATCH ERROR", r, r.code, s, r.response), console.dir(r), setTimeout(() => {
|
|
159
166
|
l(e.PREFIX, "recover connection", "restart!"), e.start();
|
|
160
167
|
}, 3e4);
|
|
161
168
|
}), e.cancel;
|
|
162
169
|
}, this.on = (e, r) => (this.addListener(e, r), this), this.cancel = () => {
|
|
163
170
|
l(this.PREFIX, "cancel connection"), this.controller.abort();
|
|
164
|
-
}, this.url = n, this.options =
|
|
171
|
+
}, this.url = n, this.options = o, this.getCurrentToken = h, o?.params?.resourceVersion && (this.resourceVersion = o.params.resourceVersion, delete o.params.resourceVersion);
|
|
165
172
|
}
|
|
166
173
|
}
|
|
167
|
-
const
|
|
174
|
+
const y = async (t) => {
|
|
168
175
|
const n = t.response?.data ? new Error(t.response.data.message ?? t.message) : t;
|
|
169
176
|
return Promise.reject(n);
|
|
170
177
|
};
|
|
171
|
-
function
|
|
172
|
-
const { apiEndpoint: n, ignoreSsl:
|
|
178
|
+
function x(t) {
|
|
179
|
+
const { apiEndpoint: n, ignoreSsl: o = !1, debug: h = !1 } = t;
|
|
173
180
|
let e = t.token;
|
|
174
181
|
if (!n || !e)
|
|
175
182
|
throw new Error(`Bad options: ${JSON.stringify(t, null, 4)}. Please provide apiEndpoint and token`);
|
|
176
|
-
|
|
183
|
+
o && h === !0 && (console.warn(`⚠️ K8s Client: SSL certificate verification disabled for ${n}`), console.warn("🔒 This should only be used in development or secure internal networks"));
|
|
177
184
|
const r = () => ({
|
|
178
185
|
Authorization: `Bearer ${e}`,
|
|
179
186
|
"Content-Type": "application/json"
|
|
180
187
|
});
|
|
181
|
-
function
|
|
182
|
-
const
|
|
188
|
+
function s(i, u = {}) {
|
|
189
|
+
const d = {
|
|
183
190
|
...r(),
|
|
184
|
-
...
|
|
185
|
-
...
|
|
191
|
+
...u.headers,
|
|
192
|
+
...i.headers
|
|
186
193
|
};
|
|
187
194
|
return {
|
|
188
|
-
debug:
|
|
189
|
-
ignoreSsl:
|
|
190
|
-
...
|
|
191
|
-
...
|
|
192
|
-
headers:
|
|
195
|
+
debug: h,
|
|
196
|
+
ignoreSsl: o,
|
|
197
|
+
...u,
|
|
198
|
+
...i,
|
|
199
|
+
headers: d
|
|
193
200
|
};
|
|
194
201
|
}
|
|
195
|
-
function i
|
|
196
|
-
return E("HEAD", p(n,
|
|
202
|
+
function c(i, u = {}) {
|
|
203
|
+
return E("HEAD", p(n, i), s(u)).catch(y);
|
|
197
204
|
}
|
|
198
|
-
function
|
|
199
|
-
return E("GET", p(n,
|
|
205
|
+
function a(i, u = {}) {
|
|
206
|
+
return E("GET", p(n, i), s(u)).then((d) => d.json()).catch(y);
|
|
200
207
|
}
|
|
201
|
-
function
|
|
202
|
-
return E("POST", p(n,
|
|
208
|
+
function m(i, u, d = {}) {
|
|
209
|
+
return E("POST", p(n, i), s(d, { body: u })).then((L) => L.json()).catch(y);
|
|
203
210
|
}
|
|
204
|
-
function
|
|
205
|
-
return E("PUT", p(n,
|
|
211
|
+
function f(i, u, d = {}) {
|
|
212
|
+
return E("PUT", p(n, i), s(d, { body: u })).then((g) => g.json()).catch(y);
|
|
206
213
|
}
|
|
207
|
-
function T(
|
|
214
|
+
function T(i, u, d = {}) {
|
|
208
215
|
return E(
|
|
209
216
|
"PATCH",
|
|
210
|
-
p(n,
|
|
211
|
-
|
|
217
|
+
p(n, i),
|
|
218
|
+
s(d, {
|
|
212
219
|
headers: { "Content-Type": "application/merge-patch+json" },
|
|
213
|
-
body:
|
|
220
|
+
body: u
|
|
214
221
|
})
|
|
215
|
-
).then((
|
|
222
|
+
).then((g) => g.json()).catch(y);
|
|
216
223
|
}
|
|
217
|
-
function D(
|
|
218
|
-
return E("DELETE", p(n,
|
|
224
|
+
function D(i, u, d = {}) {
|
|
225
|
+
return E("DELETE", p(n, i), s(d, { body: u })).then((g) => g.json()).catch(y);
|
|
219
226
|
}
|
|
220
|
-
function b(
|
|
221
|
-
return new
|
|
227
|
+
function b(i, u = {}) {
|
|
228
|
+
return new W(p(n, i), s(u), () => e);
|
|
222
229
|
}
|
|
223
|
-
function
|
|
224
|
-
e =
|
|
230
|
+
function S(i) {
|
|
231
|
+
e = i;
|
|
225
232
|
}
|
|
226
|
-
function
|
|
233
|
+
function F() {
|
|
227
234
|
return e;
|
|
228
235
|
}
|
|
229
236
|
return {
|
|
@@ -231,15 +238,15 @@ function W(t) {
|
|
|
231
238
|
WATCH_ADDED: R,
|
|
232
239
|
WATCH_DELETED: O,
|
|
233
240
|
WATCH_MODIFIED: A,
|
|
234
|
-
head:
|
|
235
|
-
get:
|
|
236
|
-
post:
|
|
237
|
-
put:
|
|
241
|
+
head: c,
|
|
242
|
+
get: a,
|
|
243
|
+
post: m,
|
|
244
|
+
put: f,
|
|
238
245
|
patch: T,
|
|
239
246
|
delete: D,
|
|
240
247
|
watch: b,
|
|
241
|
-
refreshToken:
|
|
242
|
-
currentToken:
|
|
248
|
+
refreshToken: S,
|
|
249
|
+
currentToken: F
|
|
243
250
|
};
|
|
244
251
|
}
|
|
245
252
|
export {
|
|
@@ -247,6 +254,6 @@ export {
|
|
|
247
254
|
O as DELETED,
|
|
248
255
|
w as ERROR,
|
|
249
256
|
A as MODIFIED,
|
|
250
|
-
|
|
251
|
-
|
|
257
|
+
W as Watch,
|
|
258
|
+
x as createClient
|
|
252
259
|
};
|
package/build/request.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAUA,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAChC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAUA,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAChC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;AAiCD;;;;;;;GAOG;AACH,iBAAS,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC,CA8C7F;AAED,eAAe,OAAO,CAAA;AACtB,YAAY,EAAE,cAAc,EAAE,CAAA"}
|