@aloma.io/integration-sdk 3.0.10 → 3.0.12
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/internal/index.mjs
CHANGED
@@ -58,9 +58,10 @@ class Fetcher {
|
|
58
58
|
var local = this, baseUrl = local.baseUrl;
|
59
59
|
if (retries == null)
|
60
60
|
retries = local.retry;
|
61
|
+
const theURL = `${baseUrl?.endsWith("/") ? baseUrl : baseUrl + "/"}${url}`.replace(/\/\/+/gi, "/");
|
61
62
|
try {
|
62
|
-
const theURL = `${baseUrl?.endsWith("/") ? baseUrl : baseUrl + "/"}${url}`.replace(/\/\/+/gi, "/");
|
63
63
|
await local.customize(options, args);
|
64
|
+
console.log(options, args);
|
64
65
|
const ret = await fetch(theURL, options);
|
65
66
|
const status = await ret.status;
|
66
67
|
if (status > 399) {
|
@@ -73,7 +74,7 @@ class Fetcher {
|
|
73
74
|
}
|
74
75
|
catch (e) {
|
75
76
|
--retries;
|
76
|
-
console.log(
|
77
|
+
console.log(theURL, e, this);
|
77
78
|
if (retries <= 0)
|
78
79
|
throw e;
|
79
80
|
return local.onError(e, url, options, retries, args);
|
@@ -417,7 +418,7 @@ ${text}
|
|
417
418
|
start({
|
418
419
|
config: decrypted,
|
419
420
|
oauth: theOAuth,
|
420
|
-
getClient: (arg) => theOAuth ? theOAuth.getClient(arg) : new Fetcher(
|
421
|
+
getClient: (arg) => theOAuth ? theOAuth.getClient(arg) : new Fetcher(arg),
|
421
422
|
newTask: (name, data) => {
|
422
423
|
return new Promise((resolve, reject) => {
|
423
424
|
const packet = transport.newPacket({}, (ret) => (ret?.error ? reject(ret.error) : resolve(ret)), `_req-${cuid()}`);
|
package/package.json
CHANGED
package/src/internal/index.mjs
CHANGED
@@ -72,13 +72,15 @@ class Fetcher {
|
|
72
72
|
|
73
73
|
if (retries == null) retries = local.retry;
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
}${url}`.replace(/\/\/+/gi, "/");
|
75
|
+
const theURL = `${
|
76
|
+
baseUrl?.endsWith("/") ? baseUrl : baseUrl + "/"
|
77
|
+
}${url}`.replace(/\/\/+/gi, "/");
|
79
78
|
|
79
|
+
try {
|
80
80
|
await local.customize(options, args);
|
81
81
|
|
82
|
+
console.log(options, args);
|
83
|
+
|
82
84
|
const ret = await fetch(theURL, options);
|
83
85
|
const status = await ret.status;
|
84
86
|
|
@@ -94,7 +96,7 @@ class Fetcher {
|
|
94
96
|
} catch (e) {
|
95
97
|
--retries;
|
96
98
|
|
97
|
-
console.log(
|
99
|
+
console.log(theURL, e, this);
|
98
100
|
|
99
101
|
if (retries <= 0) throw e;
|
100
102
|
|
@@ -513,7 +515,7 @@ ${text}
|
|
513
515
|
config: decrypted,
|
514
516
|
oauth: theOAuth,
|
515
517
|
getClient: (arg) =>
|
516
|
-
theOAuth ? theOAuth.getClient(arg) : new Fetcher(
|
518
|
+
theOAuth ? theOAuth.getClient(arg) : new Fetcher(arg),
|
517
519
|
newTask: (name, data) => {
|
518
520
|
return new Promise((resolve, reject) => {
|
519
521
|
const packet = transport.newPacket(
|