@strands.gg/accui 2.1.3 → 2.1.4
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/nuxt/runtime/composables/useAuthenticatedFetch.cjs.js +1 -1
- package/dist/nuxt/runtime/composables/useAuthenticatedFetch.cjs.js.map +1 -1
- package/dist/nuxt/runtime/composables/useAuthenticatedFetch.d.ts.map +1 -1
- package/dist/nuxt/runtime/composables/useAuthenticatedFetch.es.js +5 -2
- package/dist/nuxt/runtime/composables/useAuthenticatedFetch.es.js.map +1 -1
- package/dist/nuxt-v4/runtime/composables/useAuthenticatedFetch.cjs.js +1 -1
- package/dist/nuxt-v4/runtime/composables/useAuthenticatedFetch.cjs.js.map +1 -1
- package/dist/nuxt-v4/runtime/composables/useAuthenticatedFetch.d.ts.map +1 -1
- package/dist/nuxt-v4/runtime/composables/useAuthenticatedFetch.es.js +5 -2
- package/dist/nuxt-v4/runtime/composables/useAuthenticatedFetch.es.js.map +1 -1
- package/dist/strands-auth-ui.cjs.js +1 -1
- package/dist/strands-auth-ui.cjs.js.map +1 -1
- package/dist/strands-auth-ui.es.js +4 -2
- package/dist/strands-auth-ui.es.js.map +1 -1
- package/dist/vue/composables/useAuthenticatedFetch.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -10294,6 +10294,7 @@ const StrandsUIPlugin = {
|
|
|
10294
10294
|
}
|
|
10295
10295
|
};
|
|
10296
10296
|
function useAuthenticatedFetch() {
|
|
10297
|
+
const { config } = useStrandsConfig();
|
|
10297
10298
|
const { currentSession, refreshToken, getAuthHeaders } = useStrandsAuth();
|
|
10298
10299
|
const authenticatedFetch = async (url, options = {}) => {
|
|
10299
10300
|
const {
|
|
@@ -10306,8 +10307,9 @@ function useAuthenticatedFetch() {
|
|
|
10306
10307
|
throw new Error("User is not authenticated");
|
|
10307
10308
|
}
|
|
10308
10309
|
let fullUrl = url;
|
|
10309
|
-
|
|
10310
|
-
|
|
10310
|
+
const resolvedBaseURL = baseURL || config.value.baseUrl;
|
|
10311
|
+
if (resolvedBaseURL && typeof url === "string" && !url.startsWith("http")) {
|
|
10312
|
+
fullUrl = new URL(url, resolvedBaseURL).toString();
|
|
10311
10313
|
}
|
|
10312
10314
|
const headers = new Headers(fetchOptions.headers);
|
|
10313
10315
|
if (currentSession.value?.accessToken) {
|