| Server IP : 159.203.156.69 / Your IP : 216.73.216.37 Web Server : nginx/1.24.0 System : Linux main-ubuntu 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/tanviranik.com/node_modules/srvx/dist/ |
Upload File : |
import { t as LoadOptions } from "./_chunks/loader.mjs";
//#region src/cli/types.d.ts
type MainOptions = CLIOptions & {
args?: string[];
meta?: {
name?: string;
version?: string;
description?: string;
};
usage?: {
command?: string;
docs?: string;
issues?: string;
};
};
/**
* CLI options for srvx command
*/
type CLIOptions = {
/** CLI mode: "serve" to start a server, "fetch" to make HTTP requests */mode?: "serve" | "fetch"; /** Show help message */
help?: boolean; /** Show server and runtime versions */
version?: boolean; /** Working directory for resolving entry file */
dir?: string; /** Server entry file to use */
entry?: string; /** Run in production mode (no watch, no debug) */
prod?: boolean; /** Serve static files from the specified directory (default: "public") */
static?: string; /** ES module to preload */
import?: string; /** Host to bind to (default: all interfaces) */
hostname?: string; /** (alias to hostname) */
host?: string; /** Port to listen on (default: "3000") */
port?: string; /** Enable TLS (HTTPS/HTTP2) */
tls?: boolean; /** TLS certificate file */
cert?: string; /** TLS private key file */
key?: string; /** URL or path to fetch */
url?: string; /** HTTP method (default: "GET", or "POST" if body is provided) */
method?: string; /** Request headers (format: "Name: Value", can be used multiple times) */
header?: string[]; /** Show request and response headers */
verbose?: boolean; /** Request body (use "@-" for stdin, "@file" for file) */
data?: string;
};
//#endregion
//#region src/cli/main.d.ts
declare function main(mainOpts: MainOptions): Promise<void>;
//#endregion
//#region src/cli/fetch.d.ts
declare function cliFetch(cliOpts: CLIOptions & LoadOptions & {
loader?: LoadOptions;
stdin?: typeof process.stdin;
stdout?: typeof process.stdout;
stderr?: typeof process.stderr;
}): Promise<Response>;
//#endregion
export { type CLIOptions, type MainOptions, cliFetch, main };