@hostlink/light 0.0.23 → 0.0.24
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/dist/light.js +105 -106
- package/dist/light.umd.cjs +1 -1
- package/package.json +1 -2
- package/dist/setApiUrl.d.ts +0 -2
package/dist/light.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsonToGraphQLQuery as b, VariableType as
|
|
3
|
-
|
|
4
|
-
const W = (e, t, r = "") => u("login", {
|
|
1
|
+
import R from "axios";
|
|
2
|
+
import { jsonToGraphQLQuery as b, VariableType as x } from "json-to-graphql-query";
|
|
3
|
+
const M = (e, t, r = "") => c("login", {
|
|
5
4
|
username: e,
|
|
6
5
|
password: t,
|
|
7
6
|
code: r
|
|
8
|
-
}),
|
|
7
|
+
}), W = () => c("logout"), B = (e, t) => c("updatePassword", {
|
|
9
8
|
old_password: e,
|
|
10
9
|
new_password: t
|
|
11
|
-
}),
|
|
10
|
+
}), I = (e, t, r) => c("resetPassword", {
|
|
12
11
|
email: e,
|
|
13
12
|
password: t,
|
|
14
13
|
code: r
|
|
15
|
-
}),
|
|
14
|
+
}), Q = (e) => c("forgetPassword", {
|
|
16
15
|
email: e
|
|
17
16
|
});
|
|
18
17
|
let g;
|
|
19
|
-
const
|
|
18
|
+
const z = (e) => {
|
|
20
19
|
g = e;
|
|
21
|
-
}, h = () => (g || (g =
|
|
20
|
+
}, h = () => (g || (g = R.create({
|
|
22
21
|
withCredentials: !0
|
|
23
|
-
})), g),
|
|
22
|
+
})), g), $ = async (e) => (await d({
|
|
24
23
|
granted: {
|
|
25
24
|
__args: {
|
|
26
25
|
rights: e
|
|
@@ -43,19 +42,19 @@ const G = (e) => {
|
|
|
43
42
|
}
|
|
44
43
|
t[r] = w(n);
|
|
45
44
|
}), t);
|
|
46
|
-
},
|
|
47
|
-
let t = b(
|
|
45
|
+
}, y = (e) => w(e), d = async (e) => {
|
|
46
|
+
let t = b(y(e));
|
|
48
47
|
const r = await h().post(_(), {
|
|
49
48
|
query: `{ ${t} }`
|
|
50
49
|
});
|
|
51
50
|
if (r.data.errors)
|
|
52
51
|
throw new Error(r.data.errors[0].message);
|
|
53
52
|
return r.data.data;
|
|
54
|
-
},
|
|
53
|
+
}, c = async (e, t = null, r = []) => {
|
|
55
54
|
const n = {
|
|
56
55
|
mutation: {}
|
|
57
56
|
};
|
|
58
|
-
n.mutation[e] = !0, r instanceof Array && r.length != 0 && (n.mutation[e] = {}), t && (n.mutation[e] = {}, n.mutation[e].__args = t), Object.entries(
|
|
57
|
+
n.mutation[e] = !0, r instanceof Array && r.length != 0 && (n.mutation[e] = {}), t && (n.mutation[e] = {}, n.mutation[e].__args = t), Object.entries(y(r)).forEach(([l, f]) => {
|
|
59
58
|
n.mutation[e][l] = f;
|
|
60
59
|
});
|
|
61
60
|
const i = await h().post(_(), {
|
|
@@ -65,18 +64,18 @@ const G = (e) => {
|
|
|
65
64
|
throw new Error(i.data.errors[0].message);
|
|
66
65
|
return i.data.data[e];
|
|
67
66
|
};
|
|
68
|
-
let
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
}, _ = () =>
|
|
72
|
-
async function
|
|
67
|
+
let F = "/api/";
|
|
68
|
+
const G = (e) => {
|
|
69
|
+
F = e;
|
|
70
|
+
}, _ = () => F;
|
|
71
|
+
async function H(e) {
|
|
73
72
|
const t = {
|
|
74
73
|
__variables: {
|
|
75
74
|
file: "Upload!"
|
|
76
75
|
},
|
|
77
76
|
fsUploadTempFile: {
|
|
78
77
|
__args: {
|
|
79
|
-
file: new
|
|
78
|
+
file: new x("file")
|
|
80
79
|
},
|
|
81
80
|
name: !0,
|
|
82
81
|
path: !0,
|
|
@@ -92,24 +91,24 @@ async function Y(e) {
|
|
|
92
91
|
throw new Error(n.data.errors[0].message);
|
|
93
92
|
return n.data.data.fsUploadTempFile;
|
|
94
93
|
}
|
|
95
|
-
const
|
|
94
|
+
const X = (e, t, r) => c("sendMail", {
|
|
96
95
|
email: e,
|
|
97
96
|
subject: t,
|
|
98
97
|
message: r
|
|
99
|
-
}),
|
|
98
|
+
}), Y = async (e) => (await d({
|
|
100
99
|
config: {
|
|
101
100
|
__args: {
|
|
102
101
|
name: e
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
})).config;
|
|
106
|
-
function
|
|
105
|
+
function O(e) {
|
|
107
106
|
const t = "==".slice(0, (4 - e.length % 4) % 4), r = e.replace(/-/g, "+").replace(/_/g, "/") + t, n = atob(r), i = new ArrayBuffer(n.length), l = new Uint8Array(i);
|
|
108
107
|
for (let f = 0; f < n.length; f++)
|
|
109
108
|
l[f] = n.charCodeAt(f);
|
|
110
109
|
return i;
|
|
111
110
|
}
|
|
112
|
-
function
|
|
111
|
+
function v(e) {
|
|
113
112
|
const t = new Uint8Array(e);
|
|
114
113
|
let r = "";
|
|
115
114
|
for (const l of t)
|
|
@@ -119,11 +118,11 @@ function A(e) {
|
|
|
119
118
|
"_"
|
|
120
119
|
).replace(/=/g, "");
|
|
121
120
|
}
|
|
122
|
-
var s = "copy",
|
|
121
|
+
var s = "copy", u = "convert";
|
|
123
122
|
function p(e, t, r) {
|
|
124
123
|
if (t === s)
|
|
125
124
|
return r;
|
|
126
|
-
if (t ===
|
|
125
|
+
if (t === u)
|
|
127
126
|
return e(r);
|
|
128
127
|
if (t instanceof Array)
|
|
129
128
|
return r.map((n) => p(e, t[0], n));
|
|
@@ -171,43 +170,43 @@ function o(e) {
|
|
|
171
170
|
schema: e
|
|
172
171
|
};
|
|
173
172
|
}
|
|
174
|
-
var
|
|
173
|
+
var A = {
|
|
175
174
|
type: a(s),
|
|
176
|
-
id: a(
|
|
175
|
+
id: a(u),
|
|
177
176
|
transports: o(s)
|
|
178
177
|
}, C = {
|
|
179
178
|
appid: o(s),
|
|
180
179
|
appidExclude: o(s),
|
|
181
180
|
credProps: o(s)
|
|
182
|
-
},
|
|
181
|
+
}, S = {
|
|
183
182
|
appid: o(s),
|
|
184
183
|
appidExclude: o(s),
|
|
185
184
|
credProps: o(s)
|
|
186
|
-
},
|
|
185
|
+
}, E = {
|
|
187
186
|
publicKey: a({
|
|
188
187
|
rp: a(s),
|
|
189
188
|
user: a({
|
|
190
|
-
id: a(
|
|
189
|
+
id: a(u),
|
|
191
190
|
name: a(s),
|
|
192
191
|
displayName: a(s)
|
|
193
192
|
}),
|
|
194
|
-
challenge: a(
|
|
193
|
+
challenge: a(u),
|
|
195
194
|
pubKeyCredParams: a(s),
|
|
196
195
|
timeout: o(s),
|
|
197
|
-
excludeCredentials: o([
|
|
196
|
+
excludeCredentials: o([A]),
|
|
198
197
|
authenticatorSelection: o(s),
|
|
199
198
|
attestation: o(s),
|
|
200
199
|
extensions: o(C)
|
|
201
200
|
}),
|
|
202
201
|
signal: o(s)
|
|
203
|
-
},
|
|
202
|
+
}, q = {
|
|
204
203
|
type: a(s),
|
|
205
204
|
id: a(s),
|
|
206
|
-
rawId: a(
|
|
205
|
+
rawId: a(u),
|
|
207
206
|
authenticatorAttachment: o(s),
|
|
208
207
|
response: a({
|
|
209
|
-
clientDataJSON: a(
|
|
210
|
-
attestationObject: a(
|
|
208
|
+
clientDataJSON: a(u),
|
|
209
|
+
attestationObject: a(u),
|
|
211
210
|
transports: m(
|
|
212
211
|
s,
|
|
213
212
|
(e) => {
|
|
@@ -217,92 +216,92 @@ var S = {
|
|
|
217
216
|
)
|
|
218
217
|
}),
|
|
219
218
|
clientExtensionResults: m(
|
|
220
|
-
|
|
219
|
+
S,
|
|
221
220
|
(e) => e.getClientExtensionResults()
|
|
222
221
|
)
|
|
223
|
-
},
|
|
222
|
+
}, J = {
|
|
224
223
|
mediation: o(s),
|
|
225
224
|
publicKey: a({
|
|
226
|
-
challenge: a(
|
|
225
|
+
challenge: a(u),
|
|
227
226
|
timeout: o(s),
|
|
228
227
|
rpId: o(s),
|
|
229
|
-
allowCredentials: o([
|
|
228
|
+
allowCredentials: o([A]),
|
|
230
229
|
userVerification: o(s),
|
|
231
230
|
extensions: o(C)
|
|
232
231
|
}),
|
|
233
232
|
signal: o(s)
|
|
234
|
-
},
|
|
233
|
+
}, N = {
|
|
235
234
|
type: a(s),
|
|
236
235
|
id: a(s),
|
|
237
|
-
rawId: a(
|
|
236
|
+
rawId: a(u),
|
|
238
237
|
authenticatorAttachment: o(s),
|
|
239
238
|
response: a({
|
|
240
|
-
clientDataJSON: a(
|
|
241
|
-
authenticatorData: a(
|
|
242
|
-
signature: a(
|
|
243
|
-
userHandle: a(
|
|
239
|
+
clientDataJSON: a(u),
|
|
240
|
+
authenticatorData: a(u),
|
|
241
|
+
signature: a(u),
|
|
242
|
+
userHandle: a(u)
|
|
244
243
|
}),
|
|
245
244
|
clientExtensionResults: m(
|
|
246
|
-
|
|
245
|
+
S,
|
|
247
246
|
(e) => e.getClientExtensionResults()
|
|
248
247
|
)
|
|
249
248
|
};
|
|
250
|
-
function
|
|
251
|
-
return p(
|
|
249
|
+
function P(e) {
|
|
250
|
+
return p(O, E, e);
|
|
252
251
|
}
|
|
253
|
-
function
|
|
252
|
+
function j(e) {
|
|
254
253
|
return p(
|
|
255
|
-
|
|
256
|
-
|
|
254
|
+
v,
|
|
255
|
+
q,
|
|
257
256
|
e
|
|
258
257
|
);
|
|
259
258
|
}
|
|
260
|
-
function
|
|
261
|
-
return p(
|
|
259
|
+
function D(e) {
|
|
260
|
+
return p(O, J, e);
|
|
262
261
|
}
|
|
263
|
-
function
|
|
262
|
+
function T(e) {
|
|
264
263
|
return p(
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
v,
|
|
265
|
+
N,
|
|
267
266
|
e
|
|
268
267
|
);
|
|
269
268
|
}
|
|
270
|
-
async function
|
|
269
|
+
async function K(e) {
|
|
271
270
|
const t = await navigator.credentials.create(
|
|
272
271
|
e
|
|
273
272
|
);
|
|
274
|
-
return t.toJSON = () =>
|
|
273
|
+
return t.toJSON = () => j(t), t;
|
|
275
274
|
}
|
|
276
|
-
async function
|
|
275
|
+
async function L(e) {
|
|
277
276
|
const t = await navigator.credentials.get(
|
|
278
277
|
e
|
|
279
278
|
);
|
|
280
|
-
return t.toJSON = () =>
|
|
279
|
+
return t.toJSON = () => T(t), t;
|
|
281
280
|
}
|
|
282
|
-
async function
|
|
281
|
+
async function Z(e) {
|
|
283
282
|
const r = (await d({
|
|
284
283
|
webAuthnRequestOptions: {
|
|
285
284
|
__args: {
|
|
286
285
|
username: e
|
|
287
286
|
}
|
|
288
287
|
}
|
|
289
|
-
})).webAuthnRequestOptions, n =
|
|
288
|
+
})).webAuthnRequestOptions, n = D({
|
|
290
289
|
publicKey: r
|
|
291
|
-
}), i = await
|
|
292
|
-
await
|
|
290
|
+
}), i = await L(n);
|
|
291
|
+
await c("webAuthnAssertion", {
|
|
293
292
|
username: e,
|
|
294
293
|
assertion: i.toJSON()
|
|
295
294
|
});
|
|
296
295
|
}
|
|
297
|
-
async function
|
|
298
|
-
const e = await d({ webAuthnCreationOptions: !0 }), t =
|
|
296
|
+
async function k() {
|
|
297
|
+
const e = await d({ webAuthnCreationOptions: !0 }), t = P({
|
|
299
298
|
publicKey: e.webAuthnCreationOptions
|
|
300
|
-
}), r = await
|
|
301
|
-
await
|
|
299
|
+
}), r = await K(t);
|
|
300
|
+
await c("webAuthnRegister", {
|
|
302
301
|
registration: r.toJSON()
|
|
303
302
|
});
|
|
304
303
|
}
|
|
305
|
-
const
|
|
304
|
+
const ee = async (e) => (await d({
|
|
306
305
|
fsListFiles: {
|
|
307
306
|
__args: {
|
|
308
307
|
path: e
|
|
@@ -314,7 +313,7 @@ const re = async (e) => (await d({
|
|
|
314
313
|
canPreview: !0,
|
|
315
314
|
imagePath: !0
|
|
316
315
|
}
|
|
317
|
-
})).fsListFiles,
|
|
316
|
+
})).fsListFiles, te = async (e) => (await d({
|
|
318
317
|
fsListFolders: {
|
|
319
318
|
__args: {
|
|
320
319
|
path: e
|
|
@@ -322,7 +321,7 @@ const re = async (e) => (await d({
|
|
|
322
321
|
name: !0,
|
|
323
322
|
path: !0
|
|
324
323
|
}
|
|
325
|
-
})).fsListFolders,
|
|
324
|
+
})).fsListFolders, re = async (e) => {
|
|
326
325
|
let t = await d({
|
|
327
326
|
fsFile: {
|
|
328
327
|
__args: {
|
|
@@ -331,53 +330,53 @@ const re = async (e) => (await d({
|
|
|
331
330
|
base64Content: !0
|
|
332
331
|
}
|
|
333
332
|
});
|
|
334
|
-
return
|
|
335
|
-
},
|
|
333
|
+
return window.atob(t.fsFile.base64Content);
|
|
334
|
+
}, ne = (e, t) => c("fsWriteFile", {
|
|
336
335
|
path: e,
|
|
337
336
|
content: t
|
|
338
|
-
})
|
|
337
|
+
}), se = (e) => c("fsDeleteFile", {
|
|
339
338
|
path: e
|
|
340
|
-
}),
|
|
339
|
+
}), ae = (e) => c("fsCreateFolder", {
|
|
341
340
|
path: e
|
|
342
|
-
}),
|
|
341
|
+
}), oe = (e) => c("fsDeleteFolder", {
|
|
343
342
|
path: e
|
|
344
|
-
}),
|
|
343
|
+
}), ie = (e, t) => c("fsRenameFile", {
|
|
345
344
|
path: e,
|
|
346
345
|
name: t
|
|
347
|
-
}),
|
|
346
|
+
}), ce = (e, t) => c("fsRenameFolder", {
|
|
348
347
|
path: e,
|
|
349
348
|
name: t
|
|
350
|
-
}),
|
|
349
|
+
}), ue = (e, t) => c("fsMoveFile", {
|
|
351
350
|
source: e,
|
|
352
351
|
target: t
|
|
353
352
|
});
|
|
354
353
|
export {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
354
|
+
Q as forgetPassword,
|
|
355
|
+
ae as fsCreateFolder,
|
|
356
|
+
se as fsDeleteFile,
|
|
357
|
+
oe as fsDeleteFolder,
|
|
358
|
+
ee as fsListFiles,
|
|
359
|
+
te as fsListFolders,
|
|
360
|
+
ue as fsMoveFile,
|
|
361
|
+
re as fsReadFile,
|
|
362
|
+
ie as fsRenameFile,
|
|
363
|
+
ce as fsRenameFolder,
|
|
364
|
+
ne as fsWriteFile,
|
|
366
365
|
_ as getApiUrl,
|
|
367
366
|
h as getAxios,
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
367
|
+
Y as getConfig,
|
|
368
|
+
$ as granted,
|
|
369
|
+
M as login,
|
|
370
|
+
W as logout,
|
|
371
|
+
c as mutation,
|
|
373
372
|
d as query,
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
373
|
+
I as resetPassword,
|
|
374
|
+
X as sendMail,
|
|
375
|
+
G as setApiUrl,
|
|
376
|
+
z as setAxios,
|
|
377
|
+
y as toQuery,
|
|
378
|
+
B as updatePassword,
|
|
379
|
+
H as uploadFile,
|
|
380
|
+
Z as webauthnLogin,
|
|
381
|
+
k as webauthnRegister
|
|
383
382
|
};
|
package/dist/light.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("axios"),require("json-to-graphql-query")
|
|
1
|
+
(function(n,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("axios"),require("json-to-graphql-query")):typeof define=="function"&&define.amd?define(["exports","axios","json-to-graphql-query"],w):(n=typeof globalThis<"u"?globalThis:n||self,w(n.light={},n.axios,n.jsonToGraphqlQuery))})(this,function(n,w,m){"use strict";const E=(e,t,r="")=>l("login",{username:e,password:t,code:r}),P=()=>l("logout"),j=(e,t)=>l("updatePassword",{old_password:e,new_password:t}),J=(e,t,r)=>l("resetPassword",{email:e,password:t,code:r}),L=e=>l("forgetPassword",{email:e});let h;const N=e=>{h=e},b=()=>(h||(h=w.create({withCredentials:!0})),h),D=async e=>(await g({granted:{__args:{rights:e}}})).granted,F=e=>{let t={};return typeof e=="string"?(t[e]=!0,t):e instanceof Array?(e.forEach(r=>{Object.entries(F(r)).forEach(([s,u])=>{t[s]=u})}),t):(Object.entries(e).forEach(([r,s])=>{if(r=="__args"||r=="__aliasFor"||r=="__variables"||r=="__directives"||r=="__all_on"||r=="__name"){t[r]=s;return}if(typeof s=="boolean"){t[r]=s;return}t[r]=F(s)}),t)},_=e=>F(e),g=async e=>{let t=m.jsonToGraphQLQuery(_(e));const r=await b().post(y(),{query:`{ ${t} }`});if(r.data.errors)throw new Error(r.data.errors[0].message);return r.data.data},l=async(e,t=null,r=[])=>{const s={mutation:{}};s.mutation[e]=!0,r instanceof Array&&r.length!=0&&(s.mutation[e]={}),t&&(s.mutation[e]={},s.mutation[e].__args=t),Object.entries(_(r)).forEach(([f,d])=>{s.mutation[e][f]=d});const u=await b().post(y(),{query:m.jsonToGraphQLQuery(s)});if(u.data.errors)throw new Error(u.data.errors[0].message);return u.data.data[e]};let O="/api/";const T=e=>{O=e},y=()=>O;async function U(e){const t={__variables:{file:"Upload!"},fsUploadTempFile:{__args:{file:new m.VariableType("file")},name:!0,path:!0,size:!0,mime:!0}},r=new FormData;r.append("operations",JSON.stringify({query:m.jsonToGraphQLQuery({mutation:t})})),r.append("map",JSON.stringify({0:["variables.file"]})),r.append("0",e);const s=await b().post(y(),r);if(s.data.errors)throw new Error(s.data.errors[0].message);return s.data.data.fsUploadTempFile}const K=(e,t,r)=>l("sendMail",{email:e,subject:t,message:r}),M=async e=>(await g({config:{__args:{name:e}}})).config;function v(e){const t="==".slice(0,(4-e.length%4)%4),r=e.replace(/-/g,"+").replace(/_/g,"/")+t,s=atob(r),u=new ArrayBuffer(s.length),f=new Uint8Array(u);for(let d=0;d<s.length;d++)f[d]=s.charCodeAt(d);return u}function C(e){const t=new Uint8Array(e);let r="";for(const f of t)r+=String.fromCharCode(f);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var a="copy",c="convert";function p(e,t,r){if(t===a)return r;if(t===c)return e(r);if(t instanceof Array)return r.map(s=>p(e,t[0],s));if(t instanceof Object){const s={};for(const[u,f]of Object.entries(t)){if(f.derive){const d=f.derive(r);d!==void 0&&(r[u]=d)}if(!(u in r)){if(f.required)throw new Error(`Missing key: ${u}`);continue}if(r[u]==null){s[u]=null;continue}s[u]=p(e,f.schema,r[u])}return s}}function A(e,t){return{required:!0,schema:e,derive:t}}function i(e){return{required:!0,schema:e}}function o(e){return{required:!1,schema:e}}var R={type:i(a),id:i(c),transports:o(a)},S={appid:o(a),appidExclude:o(a),credProps:o(a)},q={appid:o(a),appidExclude:o(a),credProps:o(a)},Q={publicKey:i({rp:i(a),user:i({id:i(c),name:i(a),displayName:i(a)}),challenge:i(c),pubKeyCredParams:i(a),timeout:o(a),excludeCredentials:o([R]),authenticatorSelection:o(a),attestation:o(a),extensions:o(S)}),signal:o(a)},V={type:i(a),id:i(a),rawId:i(c),authenticatorAttachment:o(a),response:i({clientDataJSON:i(c),attestationObject:i(c),transports:A(a,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:A(q,e=>e.getClientExtensionResults())},W={mediation:o(a),publicKey:i({challenge:i(c),timeout:o(a),rpId:o(a),allowCredentials:o([R]),userVerification:o(a),extensions:o(S)}),signal:o(a)},B={type:i(a),id:i(a),rawId:i(c),authenticatorAttachment:o(a),response:i({clientDataJSON:i(c),authenticatorData:i(c),signature:i(c),userHandle:i(c)}),clientExtensionResults:A(q,e=>e.getClientExtensionResults())};function I(e){return p(v,Q,e)}function z(e){return p(C,V,e)}function $(e){return p(v,W,e)}function G(e){return p(C,B,e)}async function H(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>z(t),t}async function X(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>G(t),t}async function Y(e){const r=(await g({webAuthnRequestOptions:{__args:{username:e}}})).webAuthnRequestOptions,s=$({publicKey:r}),u=await X(s);await l("webAuthnAssertion",{username:e,assertion:u.toJSON()})}async function Z(){const e=await g({webAuthnCreationOptions:!0}),t=I({publicKey:e.webAuthnCreationOptions}),r=await H(t);await l("webAuthnRegister",{registration:r.toJSON()})}const k=async e=>(await g({fsListFiles:{__args:{path:e},name:!0,path:!0,size:!0,mime:!0,canPreview:!0,imagePath:!0}})).fsListFiles,x=async e=>(await g({fsListFolders:{__args:{path:e},name:!0,path:!0}})).fsListFolders,ee=async e=>{let t=await g({fsFile:{__args:{path:e},base64Content:!0}});return window.atob(t.fsFile.base64Content)},te=(e,t)=>l("fsWriteFile",{path:e,content:t}),re=e=>l("fsDeleteFile",{path:e}),ne=e=>l("fsCreateFolder",{path:e}),se=e=>l("fsDeleteFolder",{path:e}),ae=(e,t)=>l("fsRenameFile",{path:e,name:t}),ie=(e,t)=>l("fsRenameFolder",{path:e,name:t}),oe=(e,t)=>l("fsMoveFile",{source:e,target:t});n.forgetPassword=L,n.fsCreateFolder=ne,n.fsDeleteFile=re,n.fsDeleteFolder=se,n.fsListFiles=k,n.fsListFolders=x,n.fsMoveFile=oe,n.fsReadFile=ee,n.fsRenameFile=ae,n.fsRenameFolder=ie,n.fsWriteFile=te,n.getApiUrl=y,n.getAxios=b,n.getConfig=M,n.granted=D,n.login=E,n.logout=P,n.mutation=l,n.query=g,n.resetPassword=J,n.sendMail=K,n.setApiUrl=T,n.setAxios=N,n.toQuery=_,n.updatePassword=j,n.uploadFile=U,n.webauthnLogin=Y,n.webauthnRegister=Z,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hostlink/light",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@github/webauthn-json": "^2.1.1",
|
|
31
31
|
"axios": "^1.5.1",
|
|
32
|
-
"buffer": "^6.0.3",
|
|
33
32
|
"json-to-graphql-query": "^2.2.5"
|
|
34
33
|
}
|
|
35
34
|
}
|
package/dist/setApiUrl.d.ts
DELETED