Download deploy/server/mocks/sentry-plugin.js from DOOOOOGF/afsdzfgdz: direct link, hf CLI and curl.
- Browser
- Download file 602 Bytes
-
https://huggingface.co/spaces/DOOOOOGF/afsdzfgdz/resolve/main/deploy/server/mocks/sentry-plugin.js
- Command line
-
hf download hf://spaces/DOOOOOGF/afsdzfgdz/deploy/server/mocks/sentry-plugin.js
-
curl -L -o sentry-plugin.js https://huggingface.co/spaces/DOOOOOGF/afsdzfgdz/resolve/main/deploy/server/mocks/sentry-plugin.js
602 Bytes
| /** | |
| * Mock for @cloudflare/pages-plugin-sentry | |
| * Docker 模式下不使用 Sentry,提供空实现 | |
| */ | |
| export default function sentryPlugin(config) { | |
| return function(context) { | |
| // 提供一个空的 sentry 对象以兼容 telemetryData 中的调用 | |
| if (!context.data) context.data = {}; | |
| context.data.sentry = { | |
| setTag: () => {}, | |
| setContext: () => {}, | |
| startTransaction: () => ({ | |
| startChild: () => ({ finish: () => {} }), | |
| finish: () => {} | |
| }) | |
| }; | |
| return context.next(); | |
| }; | |
| } | |