Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
1 line
No EOL
2.7 KiB
Text
1 line
No EOL
2.7 KiB
Text
{"version":3,"sources":["../../../src/server/lib/server-action-request-meta.ts"],"sourcesContent":["import type { IncomingMessage } from 'http'\nimport type { BaseNextRequest } from '../base-http'\nimport type { NextRequest } from '../web/exports'\nimport { ACTION_HEADER } from '../../client/components/app-router-headers'\n\nexport function getServerActionRequestMetadata(\n req: IncomingMessage | BaseNextRequest | NextRequest\n): {\n actionId: string | null\n isURLEncodedAction: boolean\n isMultipartAction: boolean\n isFetchAction: boolean\n isPossibleServerAction: boolean\n} {\n let actionId: string | null\n let contentType: string | null\n\n if (req.headers instanceof Headers) {\n actionId = req.headers.get(ACTION_HEADER) ?? null\n contentType = req.headers.get('content-type')\n } else {\n actionId = (req.headers[ACTION_HEADER] as string) ?? null\n contentType = req.headers['content-type'] ?? null\n }\n\n const isURLEncodedAction = Boolean(\n req.method === 'POST' && contentType === 'application/x-www-form-urlencoded'\n )\n const isMultipartAction = Boolean(\n req.method === 'POST' && contentType?.startsWith('multipart/form-data')\n )\n const isFetchAction = Boolean(\n actionId !== undefined &&\n typeof actionId === 'string' &&\n req.method === 'POST'\n )\n\n const isPossibleServerAction = Boolean(\n isFetchAction || isURLEncodedAction || isMultipartAction\n )\n\n return {\n actionId,\n isURLEncodedAction,\n isMultipartAction,\n isFetchAction,\n isPossibleServerAction,\n }\n}\n\nexport function getIsPossibleServerAction(\n req: IncomingMessage | BaseNextRequest | NextRequest\n): boolean {\n return getServerActionRequestMetadata(req).isPossibleServerAction\n}\n"],"names":["ACTION_HEADER","getServerActionRequestMetadata","req","actionId","contentType","headers","Headers","get","isURLEncodedAction","Boolean","method","isMultipartAction","startsWith","isFetchAction","undefined","isPossibleServerAction","getIsPossibleServerAction"],"mappings":"AAGA,SAASA,aAAa,QAAQ,6CAA4C;AAE1E,OAAO,SAASC,+BACdC,GAAoD;IAQpD,IAAIC;IACJ,IAAIC;IAEJ,IAAIF,IAAIG,OAAO,YAAYC,SAAS;QAClCH,WAAWD,IAAIG,OAAO,CAACE,GAAG,CAACP,kBAAkB;QAC7CI,cAAcF,IAAIG,OAAO,CAACE,GAAG,CAAC;IAChC,OAAO;QACLJ,WAAW,AAACD,IAAIG,OAAO,CAACL,cAAc,IAAe;QACrDI,cAAcF,IAAIG,OAAO,CAAC,eAAe,IAAI;IAC/C;IAEA,MAAMG,qBAAqBC,QACzBP,IAAIQ,MAAM,KAAK,UAAUN,gBAAgB;IAE3C,MAAMO,oBAAoBF,QACxBP,IAAIQ,MAAM,KAAK,WAAUN,+BAAAA,YAAaQ,UAAU,CAAC;IAEnD,MAAMC,gBAAgBJ,QACpBN,aAAaW,aACX,OAAOX,aAAa,YACpBD,IAAIQ,MAAM,KAAK;IAGnB,MAAMK,yBAAyBN,QAC7BI,iBAAiBL,sBAAsBG;IAGzC,OAAO;QACLR;QACAK;QACAG;QACAE;QACAE;IACF;AACF;AAEA,OAAO,SAASC,0BACdd,GAAoD;IAEpD,OAAOD,+BAA+BC,KAAKa,sBAAsB;AACnE","ignoreList":[0]} |