druxt 0.19.0 → 0.19.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/dist/druxt.esm.js +8 -6
- package/dist/druxt.ssr.js +8 -6
- package/package.json +1 -1
package/dist/druxt.esm.js
CHANGED
|
@@ -251,7 +251,7 @@ class DruxtClient {
|
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
var name = "druxt";
|
|
254
|
-
var version = "0.19.
|
|
254
|
+
var version = "0.19.1";
|
|
255
255
|
var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";
|
|
256
256
|
var keywords = [
|
|
257
257
|
"cms",
|
|
@@ -348,11 +348,13 @@ const DruxtNuxtModule = async function(moduleOptions = {}) {
|
|
|
348
348
|
const proxies = {};
|
|
349
349
|
if ((options.proxy || {}).api) {
|
|
350
350
|
proxies[options.endpoint] = options.baseUrl;
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
351
|
+
const languageResourceType = "configurable_language--configurable_language";
|
|
352
|
+
if (await druxt.getIndex(languageResourceType)) {
|
|
353
|
+
const query = new DrupalJsonApiParams().addFields(languageResourceType, ["drupal_internal__id"]);
|
|
354
|
+
const languages = (await druxt.getCollectionAll(languageResourceType, query) || []).map((o) => o.data).flat().filter((o) => !["und", "zxx"].includes(((o || {}).attributes || {}).drupal_internal__id)).map((o) => o.attributes.drupal_internal__id);
|
|
355
|
+
for (const langcode of languages) {
|
|
356
|
+
proxies[`/${langcode}${options.endpoint}`] = options.baseUrl;
|
|
357
|
+
}
|
|
356
358
|
}
|
|
357
359
|
proxies["/router/translate-path"] = options.baseUrl;
|
|
358
360
|
}
|
package/dist/druxt.ssr.js
CHANGED
|
@@ -264,7 +264,7 @@ class DruxtClient {
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
var name = "druxt";
|
|
267
|
-
var version = "0.19.
|
|
267
|
+
var version = "0.19.1";
|
|
268
268
|
var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";
|
|
269
269
|
var keywords = [
|
|
270
270
|
"cms",
|
|
@@ -361,11 +361,13 @@ const DruxtNuxtModule = async function(moduleOptions = {}) {
|
|
|
361
361
|
const proxies = {};
|
|
362
362
|
if ((options.proxy || {}).api) {
|
|
363
363
|
proxies[options.endpoint] = options.baseUrl;
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
364
|
+
const languageResourceType = "configurable_language--configurable_language";
|
|
365
|
+
if (await druxt.getIndex(languageResourceType)) {
|
|
366
|
+
const query = new drupalJsonapiParams.DrupalJsonApiParams().addFields(languageResourceType, ["drupal_internal__id"]);
|
|
367
|
+
const languages = (await druxt.getCollectionAll(languageResourceType, query) || []).map((o) => o.data).flat().filter((o) => !["und", "zxx"].includes(((o || {}).attributes || {}).drupal_internal__id)).map((o) => o.attributes.drupal_internal__id);
|
|
368
|
+
for (const langcode of languages) {
|
|
369
|
+
proxies[`/${langcode}${options.endpoint}`] = options.baseUrl;
|
|
370
|
+
}
|
|
369
371
|
}
|
|
370
372
|
proxies["/router/translate-path"] = options.baseUrl;
|
|
371
373
|
}
|