Internal
Clones a new Repo to the given directory
The HTTPS URL of the repository
The full path of the directory to clone the repository to
The branch of the repository to clone
In milliseconds, how long to wait before timing out
Sends a command to the server and then waits until output with the given prefix is seen in a console message
The short, unique string that your output will be prefixed with
The full command string to send
In milliseconds, how long to wait for output before timing out
Runs a custom lua command that will prefix its output with our nonce, then prints the output from that command
-- lua/autorun/server/nonce_example.lua
concommand.Add( "myCommand", function( ply, _, args )
if IsValid( ply ) then return end
local nonce = args[1]
print( nonce .. "Command output" )
end )
const nonce = "abc123";
const command = `myCommand "${nonce}"`;
try {
const output = await wisp.socket.sendCommandNonce(nonce, command);
console.log("Output from command:", output);
catch (error) {
console.error(error);
}
ℹ️ This is useful if you run code on your Server that will print output with the same prefix, letting you run commands and also receive output for it
Sets a callback to run on the Websocket Info before saving the details.
The callback to run when the data is received from the API
// Change the URL of the Websocket
wisp.socket.setWebsocketDetailsPreprocessor((info) => {
info.url = "wss://newurl.com"
})
ℹ️ This can be used to modify the URL or token after its retrieved from the API
Generated using TypeDoc
The primary interface to the Websocket API