Spaces:
Sleeping
Sleeping
pythonic-rag-FastAPIReact / frontend /node_modules /@pmmmwh /react-refresh-webpack-plugin /lib /utils /getSocketIntegration.js
Download frontend/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/utils/getSocketIntegration.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 897 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40pmmmwh/react-refresh-webpack-plugin/lib/utils/getSocketIntegration.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/utils/getSocketIntegration.js
-
curl -L -o getSocketIntegration.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40pmmmwh/react-refresh-webpack-plugin/lib/utils/getSocketIntegration.js
897 Bytes
| /** | |
| * Gets the socket integration to use for Webpack messages. | |
| * @param {'wds' | 'whm' | 'wps' | string} integrationType A valid socket integration type or a path to a module. | |
| * @returns {string} Path to the resolved socket integration module. | |
| */ | |
| function getSocketIntegration(integrationType) { | |
| let resolvedSocketIntegration; | |
| switch (integrationType) { | |
| case 'wds': { | |
| resolvedSocketIntegration = require.resolve('../../sockets/WDSSocket'); | |
| break; | |
| } | |
| case 'whm': { | |
| resolvedSocketIntegration = require.resolve('../../sockets/WHMEventSource'); | |
| break; | |
| } | |
| case 'wps': { | |
| resolvedSocketIntegration = require.resolve('../../sockets/WPSSocket'); | |
| break; | |
| } | |
| default: { | |
| resolvedSocketIntegration = require.resolve(integrationType); | |
| break; | |
| } | |
| } | |
| return resolvedSocketIntegration; | |
| } | |
| module.exports = getSocketIntegration; | |