@k-int/bruno-shared-scripts 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/es/index.js +5 -3
- package/package.json +1 -1
- package/src/auth/login.js +3 -3
- package/src/folioRequest.js +2 -0
package/es/index.js
CHANGED
|
@@ -103,9 +103,7 @@ var init_login = __esm({
|
|
|
103
103
|
url,
|
|
104
104
|
creds,
|
|
105
105
|
config
|
|
106
|
-
)
|
|
107
|
-
console.error("Failed to login to FOLIO: %o", err);
|
|
108
|
-
});
|
|
106
|
+
);
|
|
109
107
|
}
|
|
110
108
|
};
|
|
111
109
|
loginFunc = async ({
|
|
@@ -122,6 +120,8 @@ var init_login = __esm({
|
|
|
122
120
|
if (!withExpiry) {
|
|
123
121
|
req.setHeader("x-okapi-token", getToken());
|
|
124
122
|
}
|
|
123
|
+
}).catch((err) => {
|
|
124
|
+
console.error("Failed to login to folio: %o", err);
|
|
125
125
|
});
|
|
126
126
|
};
|
|
127
127
|
login = (urlOverride) => loginFunc({ urlOverride, withExpiry: false });
|
|
@@ -222,5 +222,7 @@ var getFolioAxios = async ({
|
|
|
222
222
|
}
|
|
223
223
|
!suppressConsole && console.log("folioRequest ready with config: %o", config);
|
|
224
224
|
return axios2.create(config);
|
|
225
|
+
}).catch((err) => {
|
|
226
|
+
console.error("Failed to login to folio: %o", err);
|
|
225
227
|
});
|
|
226
228
|
};
|
package/package.json
CHANGED
package/src/auth/login.js
CHANGED
|
@@ -48,9 +48,6 @@ const doALogin = async ({
|
|
|
48
48
|
creds,
|
|
49
49
|
config
|
|
50
50
|
)
|
|
51
|
-
.catch(err => {
|
|
52
|
-
console.error("Failed to login to FOLIO: %o", err);
|
|
53
|
-
});
|
|
54
51
|
}
|
|
55
52
|
}
|
|
56
53
|
|
|
@@ -73,6 +70,9 @@ const loginFunc = async ({
|
|
|
73
70
|
// This is only populated on login, not login with expiry
|
|
74
71
|
req.setHeader('x-okapi-token', getToken())
|
|
75
72
|
}
|
|
73
|
+
})
|
|
74
|
+
.catch(err => {
|
|
75
|
+
console.error("Failed to login to folio: %o", err)
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
|
package/src/folioRequest.js
CHANGED