rads-db 3.0.80 → 3.0.82
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.
|
@@ -43,7 +43,7 @@ async function getJsonBody(args) {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
async function blobToDataUrl(blob) {
|
|
46
|
-
if (FileReader) {
|
|
46
|
+
if (globalThis.FileReader) {
|
|
47
47
|
return new Promise((resolve, reject) => {
|
|
48
48
|
const a = new FileReader();
|
|
49
49
|
a.onload = function (e) {
|
|
@@ -55,7 +55,7 @@ async function blobToDataUrl(blob) {
|
|
|
55
55
|
a.readAsDataURL(blob);
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
if (Buffer) {
|
|
58
|
+
if (globalThis.Buffer) {
|
|
59
59
|
const buf = await blob.arrayBuffer();
|
|
60
60
|
const b64string = Buffer.from(buf).toString("base64");
|
|
61
61
|
return `data:${blob.type};base64,${b64string}`;
|
|
@@ -31,7 +31,7 @@ async function getJsonBody(args) {
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
async function blobToDataUrl(blob) {
|
|
34
|
-
if (FileReader) {
|
|
34
|
+
if (globalThis.FileReader) {
|
|
35
35
|
return new Promise((resolve, reject) => {
|
|
36
36
|
const a = new FileReader();
|
|
37
37
|
a.onload = function(e) {
|
|
@@ -43,7 +43,7 @@ async function blobToDataUrl(blob) {
|
|
|
43
43
|
a.readAsDataURL(blob);
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
if (Buffer) {
|
|
46
|
+
if (globalThis.Buffer) {
|
|
47
47
|
const buf = await blob.arrayBuffer();
|
|
48
48
|
const b64string = Buffer.from(buf).toString("base64");
|
|
49
49
|
return `data:${blob.type};base64,${b64string}`;
|
package/integrations/node.cjs
CHANGED
|
@@ -69,7 +69,8 @@ async function getSchema(normalizedOptions) {
|
|
|
69
69
|
}
|
|
70
70
|
schema = (0, _lib.parseSchema)(entities);
|
|
71
71
|
} else if (apiUrl) {
|
|
72
|
-
const
|
|
72
|
+
const url = new URL("radsTunnel", apiUrl);
|
|
73
|
+
const fetchResponse = await fetch(url.href, {
|
|
73
74
|
method: "POST",
|
|
74
75
|
headers: {
|
|
75
76
|
"content-type": "application/json"
|
package/integrations/node.mjs
CHANGED
|
@@ -64,7 +64,8 @@ export async function getSchema(normalizedOptions) {
|
|
|
64
64
|
}
|
|
65
65
|
schema = parseSchema(entities);
|
|
66
66
|
} else if (apiUrl) {
|
|
67
|
-
const
|
|
67
|
+
const url = new URL("radsTunnel", apiUrl);
|
|
68
|
+
const fetchResponse = await fetch(url.href, {
|
|
68
69
|
method: "POST",
|
|
69
70
|
headers: { "content-type": "application/json" },
|
|
70
71
|
body: JSON.stringify({ method: "_schema" })
|