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.8 KiB
Text
1 line
No EOL
2.8 KiB
Text
{"version":3,"sources":["../../../src/server/node-environment-extensions/web-crypto.tsx"],"sourcesContent":["/**\n * We extend Web Crypto APIs during builds and revalidates to ensure that prerenders don't observe random bytes\n * When cacheComponents is enabled. Random bytes are a form of IO even if they resolve synchronously. When cacheComponents is\n * enabled we need to ensure that random bytes are excluded from prerenders unless they are cached.\n *\n *\n * The extensions here never error nor alter the underlying return values and thus should be transparent to callers.\n */\n\nimport { io } from './utils'\n\nlet webCrypto: typeof crypto\nif (process.env.NEXT_RUNTIME === 'edge') {\n webCrypto = crypto\n} else {\n if (typeof crypto === 'undefined') {\n // @ts-expect-error -- TODO: Is this actually safe?\n webCrypto = (require('node:crypto') as typeof import('node:crypto'))\n .webcrypto\n } else {\n webCrypto = crypto\n }\n}\n\nconst getRandomValuesExpression = '`crypto.getRandomValues()`'\ntry {\n const _getRandomValues = webCrypto.getRandomValues\n webCrypto.getRandomValues = function getRandomValues() {\n io(getRandomValuesExpression, 'crypto')\n return _getRandomValues.apply(webCrypto, arguments as any)\n }\n} catch {\n console.error(\n `Failed to install ${getRandomValuesExpression} extension. When using \\`cacheComponents\\` calling this function will not correctly trigger dynamic behavior.`\n )\n}\n\nconst randomUUIDExpression = '`crypto.randomUUID()`'\ntry {\n const _randomUUID = webCrypto.randomUUID\n webCrypto.randomUUID = function randomUUID() {\n io(randomUUIDExpression, 'crypto')\n return _randomUUID.apply(webCrypto, arguments as any)\n } as typeof _randomUUID\n} catch {\n console.error(\n `Failed to install ${getRandomValuesExpression} extension. When using \\`cacheComponents\\` calling this function will not correctly trigger dynamic behavior.`\n )\n}\n"],"names":["io","webCrypto","process","env","NEXT_RUNTIME","crypto","require","webcrypto","getRandomValuesExpression","_getRandomValues","getRandomValues","apply","arguments","console","error","randomUUIDExpression","_randomUUID","randomUUID"],"mappings":"AAAA;;;;;;;CAOC,GAED,SAASA,EAAE,QAAQ,UAAS;AAE5B,IAAIC;AACJ,IAAIC,QAAQC,GAAG,CAACC,YAAY,KAAK,QAAQ;IACvCH,YAAYI;AACd,OAAO;IACL,IAAI,OAAOA,WAAW,aAAa;QACjC,mDAAmD;QACnDJ,YAAY,AAACK,QAAQ,eAClBC,SAAS;IACd,OAAO;QACLN,YAAYI;IACd;AACF;AAEA,MAAMG,4BAA4B;AAClC,IAAI;IACF,MAAMC,mBAAmBR,UAAUS,eAAe;IAClDT,UAAUS,eAAe,GAAG,SAASA;QACnCV,GAAGQ,2BAA2B;QAC9B,OAAOC,iBAAiBE,KAAK,CAACV,WAAWW;IAC3C;AACF,EAAE,OAAM;IACNC,QAAQC,KAAK,CACX,CAAC,kBAAkB,EAAEN,0BAA0B,6GAA6G,CAAC;AAEjK;AAEA,MAAMO,uBAAuB;AAC7B,IAAI;IACF,MAAMC,cAAcf,UAAUgB,UAAU;IACxChB,UAAUgB,UAAU,GAAG,SAASA;QAC9BjB,GAAGe,sBAAsB;QACzB,OAAOC,YAAYL,KAAK,CAACV,WAAWW;IACtC;AACF,EAAE,OAAM;IACNC,QAAQC,KAAK,CACX,CAAC,kBAAkB,EAAEN,0BAA0B,6GAA6G,CAAC;AAEjK","ignoreList":[0]} |