Compare commits

...

4 Commits

Author SHA1 Message Date
Matthias Nannt
7725d3d8a2 update nextjs 2024-04-24 20:00:05 +02:00
Matthias Nannt
d722e9de9e add test endpoint 2024-04-24 19:42:42 +02:00
Matthias Nannt
560b8904f7 update web packages 2024-04-24 19:01:20 +02:00
Matthias Nannt
b68dcdf2dc fix: temporarily remove custom cache handler to solve next.js issues 2024-04-24 17:06:48 +02:00
6 changed files with 603 additions and 161 deletions

View File

@@ -0,0 +1,14 @@
import { NextRequest } from "next/server";
import { getEnvironment } from "@formbricks/lib/environment/service";
export async function GET(
_: NextRequest,
{ params }: { params: { environmentId: string } }
): Promise<Response> {
const environmentId = params.environmentId;
console.log("calling endpoint");
const environment = await getEnvironment(environmentId);
return Response.json(environment);
}

View File

@@ -5,7 +5,7 @@ import { createRequire } from "node:module";
import { fileURLToPath } from "node:url"; import { fileURLToPath } from "node:url";
const jiti = createJiti(fileURLToPath(import.meta.url)); const jiti = createJiti(fileURLToPath(import.meta.url));
const require = createRequire(import.meta.url); // const require = createRequire(import.meta.url);
jiti("@formbricks/lib/env"); jiti("@formbricks/lib/env");
@@ -157,9 +157,9 @@ const nextConfig = {
}; };
// set custom cache handler // set custom cache handler
if (process.env.CUSTOM_CACHE_DISABLED !== "1") { /* if (process.env.CUSTOM_CACHE_DISABLED !== "1") {
nextConfig.cacheHandler = require.resolve("./cache-handler.mjs"); nextConfig.cacheHandler = require.resolve("./cache-handler.mjs");
} } */
// set actions allowed origins // set actions allowed origins
if (process.env.WEBAPP_URL) { if (process.env.WEBAPP_URL) {

View File

@@ -25,32 +25,32 @@
"@headlessui/react": "^1.7.19", "@headlessui/react": "^1.7.19",
"@json2csv/node": "^7.0.6", "@json2csv/node": "^7.0.6",
"@opentelemetry/auto-instrumentations-node": "^0.44.0", "@opentelemetry/auto-instrumentations-node": "^0.44.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.50.0", "@opentelemetry/exporter-trace-otlp-http": "^0.51.0",
"@opentelemetry/resources": "^1.23.0", "@opentelemetry/resources": "^1.24.0",
"@opentelemetry/sdk-node": "^0.50.0", "@opentelemetry/sdk-node": "^0.51.0",
"@opentelemetry/semantic-conventions": "^1.23.0", "@opentelemetry/semantic-conventions": "^1.24.0",
"@paralleldrive/cuid2": "^2.2.2", "@paralleldrive/cuid2": "^2.2.2",
"@radix-ui/react-collapsible": "^1.0.3", "@radix-ui/react-collapsible": "^1.0.3",
"@react-email/components": "^0.0.16", "@react-email/components": "^0.0.16",
"@sentry/nextjs": "^7.110.1", "@sentry/nextjs": "^7.112.2",
"@vercel/og": "^0.6.2", "@vercel/og": "^0.6.2",
"@vercel/speed-insights": "^1.0.10", "@vercel/speed-insights": "^1.0.10",
"bcryptjs": "^2.4.3", "bcryptjs": "^2.4.3",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"encoding": "^0.1.13", "encoding": "^0.1.13",
"framer-motion": "11.1.1", "framer-motion": "11.1.7",
"googleapis": "^134.0.0", "googleapis": "^134.0.0",
"jiti": "^1.21.0", "jiti": "^1.21.0",
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"lru-cache": "^10.2.0", "lru-cache": "^10.2.0",
"lucide-react": "^0.368.0", "lucide-react": "^0.373.0",
"mime": "^4.0.1", "mime": "^4.0.2",
"next": "14.2.1", "next": "14.2.3",
"nodemailer": "^6.9.13", "nodemailer": "^6.9.13",
"otplib": "^12.0.1", "otplib": "^12.0.1",
"papaparse": "^5.4.1", "papaparse": "^5.4.1",
"posthog-js": "^1.125.0", "posthog-js": "^1.129.0",
"prismjs": "^1.29.0", "prismjs": "^1.29.0",
"qrcode": "^1.5.3", "qrcode": "^1.5.3",
"react": "18.2.0", "react": "18.2.0",
@@ -68,7 +68,7 @@
}, },
"devDependencies": { "devDependencies": {
"@formbricks/tsconfig": "workspace:*", "@formbricks/tsconfig": "workspace:*",
"@neshca/cache-handler": "^1.2.1", "@neshca/cache-handler": "^1.3.1",
"@types/bcryptjs": "^2.4.6", "@types/bcryptjs": "^2.4.6",
"@types/lodash": "^4.17.0", "@types/lodash": "^4.17.0",
"@types/markdown-it": "^14.0.1", "@types/markdown-it": "^14.0.1",

View File

@@ -30,6 +30,8 @@ export const getEnvironment = async (environmentId: string): Promise<TEnvironmen
async () => { async () => {
validateInputs([environmentId, ZId]); validateInputs([environmentId, ZId]);
console.log("CALLING WITHOUT CACHE!!!");
try { try {
const environment = await prisma.environment.findUnique({ const environment = await prisma.environment.findUnique({
where: { where: {

720
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff