@yassidev/nuxt-directus 0.0.19 → 0.0.20
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/module.json +1 -1
- package/dist/module.mjs +9 -7
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1807,22 +1807,24 @@ const module$1 = defineNuxtModule({
|
|
|
1807
1807
|
}
|
|
1808
1808
|
nuxt.options.typescript.hoist ??= [];
|
|
1809
1809
|
nuxt.options.typescript.hoist.push("@directus/sdk");
|
|
1810
|
+
const auth = config.auth.enabled ? {
|
|
1811
|
+
mode: config.auth.mode,
|
|
1812
|
+
autoRefresh: config.auth.mode === "cookie" || config.auth.mode === "session" ? config.auth.autoRefresh : void 0,
|
|
1813
|
+
cookieName: config.auth.mode === "cookie" || config.auth.mode === "session" ? config.auth.cookieName : void 0,
|
|
1814
|
+
token: config.auth.mode === "static" ? config.auth.token ?? config.accessToken : void 0
|
|
1815
|
+
} : void 0;
|
|
1810
1816
|
updateRuntimeConfig({
|
|
1811
1817
|
[NAME]: {
|
|
1812
1818
|
url: config.url,
|
|
1813
1819
|
accessToken: config.accessToken,
|
|
1814
|
-
i18nPrefix: config.i18n.prefix
|
|
1820
|
+
i18nPrefix: config.i18n.prefix,
|
|
1821
|
+
auth
|
|
1815
1822
|
},
|
|
1816
1823
|
public: {
|
|
1817
1824
|
[NAME]: {
|
|
1818
1825
|
url: config.composables.client ? config.url : void 0,
|
|
1819
1826
|
i18nPrefix: config.i18n.prefix,
|
|
1820
|
-
auth
|
|
1821
|
-
mode: config.auth.mode,
|
|
1822
|
-
autoRefresh: config.auth.mode === "cookie" || config.auth.mode === "session" ? config.auth.autoRefresh : void 0,
|
|
1823
|
-
cookieName: config.auth.mode === "cookie" || config.auth.mode === "session" ? config.auth.cookieName : void 0,
|
|
1824
|
-
token: config.auth.mode === "static" ? config.auth.token ?? config.accessToken : void 0
|
|
1825
|
-
} : void 0
|
|
1827
|
+
auth
|
|
1826
1828
|
}
|
|
1827
1829
|
}
|
|
1828
1830
|
});
|