Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

nuxtjs-drupal-ce

Package Overview
Dependencies
Maintainers
4
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxtjs-drupal-ce - npm Package Compare versions

Comparing version
2.5.0
to
2.5.1
+11
playground/components/global/canvas-page.vue
<template>
<div class="canvas-page">
<slot name="components" />
</div>
</template>
<script setup lang="ts">
defineSlots<{
components(): any
}>()
</script>
+1
-1

@@ -7,3 +7,3 @@ {

},
"version": "2.5.0",
"version": "2.5.1",
"builder": {

@@ -10,0 +10,0 @@ "@nuxt/module-builder": "1.0.2",

@@ -5,3 +5,3 @@ import { defineNuxtModule, createResolver, addServerPlugin, addImportsDir, addServerHandler, installModule, addImports } from '@nuxt/kit';

function getCorsOrigin(nuxt) {
const drupalBaseUrl = nuxt.options.runtimeConfig.public.drupalCe.drupalBaseUrl;
const drupalBaseUrl = process.env.NUXT_PUBLIC_DRUPAL_CE_DRUPAL_BASE_URL || nuxt.options.runtimeConfig.public.drupalCe.drupalBaseUrl;
if (!drupalBaseUrl) {

@@ -8,0 +8,0 @@ return null;

@@ -16,7 +16,7 @@ import type { $Fetch, NitroFetchRequest } from 'nitropack';

passThroughHeaders: (nuxtApp: any, pageHeaders: any) => void;
getCeApiEndpoint: (localize?: boolean) => any;
getDrupalBaseUrl: () => any;
getMenuBaseUrl: () => any;
getCeApiEndpoint: (localize?: boolean) => string;
getDrupalBaseUrl: () => string;
getMenuBaseUrl: () => string;
getPageLayout: (page?: Ref<any>) => ComputedRef<string>;
usePageHead: (page: Ref<any>, include?: Array<"title" | "meta" | "link" | "jsonld">) => void;
};

@@ -67,2 +67,11 @@ import { defu } from "defu";

const computePageKey = (skipProxy, nuxtApp) => {
const buildKey = (path) => {
const sanitized = path.replace(/\/(\?|$)/, "$1");
const proxyMode = skipProxy ? "-direct" : "-proxy";
return `page-${sanitized}${proxyMode}`;
};
if (import.meta.prerender) {
const route2 = useRoute();
return buildKey(route2.path);
}
if (import.meta.server) {

@@ -73,5 +82,3 @@ return "__ssr__";

const pathWithQuery = route.fullPath.split("#")[0];
const sanitized = pathWithQuery.replace(/\/(\?|$)/, "$1");
const proxyMode = skipProxy ? "-direct" : "-proxy";
const properKey = `page-${sanitized}${proxyMode}`;
const properKey = buildKey(pathWithQuery);
if (nuxtApp.payload.data["__ssr__"]) {

@@ -78,0 +85,0 @@ nuxtApp.payload.data[properKey] = nuxtApp.payload.data["__ssr__"];

@@ -7,3 +7,3 @@ /**

*/
export declare const getDrupalBaseUrl: () => any;
export declare const getDrupalBaseUrl: () => string;
/**

@@ -14,2 +14,2 @@ * Returns the menuBaseUrl if set, otherwise it returns the drupalBaseUrl + ceApiEndpoint.

*/
export declare const getMenuBaseUrl: () => any;
export declare const getMenuBaseUrl: () => string;

@@ -7,6 +7,10 @@ import { defineEventHandler, readFormData } from "h3";

const { ceApiEndpoint } = useRuntimeConfig().public.drupalCe;
const currentPath = event.node.req.url?.split("?")[0] || "";
if (currentPath.startsWith("/api/drupal-ce/") || currentPath === "/api/drupal-ce") {
return;
}
if (event.node.req.method === "POST") {
const routesToBypass = Array.isArray(disableFormHandler) ? disableFormHandler : [];
if (routesToBypass.length) {
const currentPath = event.node.req.url?.split("?")[0] || "";
const currentPath2 = event.node.req.url?.split("?")[0] || "";
const shouldBypass = routesToBypass.some((route) => {

@@ -18,3 +22,3 @@ const routeFormats = [

];
return routeFormats.some((format) => format === currentPath);
return routeFormats.some((format) => format === currentPath2);
});

@@ -21,0 +25,0 @@ if (shouldBypass) {

{
"name": "nuxtjs-drupal-ce",
"version": "2.5.0",
"version": "2.5.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "bin": {