Rocky_Mountain_Vending/.pnpm-store/v10/files/36/aeadf60feee4bbc1810cbdcfcf6a1f27e1f0c86a7d9d7407adbc8c92c4ef982510beedeb88fbf8bbd8dfffd5e100bd3d106a5551a2db40d19493afde0e8192
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
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>
2026-02-12 16:22:15 -07:00

45 lines
No EOL
1.8 KiB
Text

/**
* We extend Web Crypto APIs during builds and revalidates to ensure that prerenders don't observe random bytes
* When cacheComponents is enabled. Random bytes are a form of IO even if they resolve synchronously. When cacheComponents is
* enabled we need to ensure that random bytes are excluded from prerenders unless they are cached.
*
*
* The extensions here never error nor alter the underlying return values and thus should be transparent to callers.
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _utils = require("./utils");
let webCrypto;
if (process.env.NEXT_RUNTIME === 'edge') {
webCrypto = crypto;
} else {
if (typeof crypto === 'undefined') {
// @ts-expect-error -- TODO: Is this actually safe?
webCrypto = require('node:crypto').webcrypto;
} else {
webCrypto = crypto;
}
}
const getRandomValuesExpression = '`crypto.getRandomValues()`';
try {
const _getRandomValues = webCrypto.getRandomValues;
webCrypto.getRandomValues = function getRandomValues() {
(0, _utils.io)(getRandomValuesExpression, 'crypto');
return _getRandomValues.apply(webCrypto, arguments);
};
} catch {
console.error(`Failed to install ${getRandomValuesExpression} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`);
}
const randomUUIDExpression = '`crypto.randomUUID()`';
try {
const _randomUUID = webCrypto.randomUUID;
webCrypto.randomUUID = function randomUUID() {
(0, _utils.io)(randomUUIDExpression, 'crypto');
return _randomUUID.apply(webCrypto, arguments);
};
} catch {
console.error(`Failed to install ${getRandomValuesExpression} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`);
}
//# sourceMappingURL=web-crypto.js.map