unplugin-cloudflare-tunnel 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,67 @@
1
+ //#region src/core/options.d.ts
2
+ type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'fatal';
3
+ /**
4
+ * Base configuration options shared between named and quick tunnel modes
5
+ */
6
+ interface BaseTunnelOptions {
7
+ /**
8
+ * Tunnel mode.
9
+ * - `quick`: temporary `trycloudflare.com` URL, no hostname required
10
+ * - `named`: persistent tunnel using your configured hostname
11
+ *
12
+ * When omitted, the plugin uses named mode if `hostname` is provided,
13
+ * otherwise it uses quick mode.
14
+ */
15
+ mode?: 'quick' | 'named';
16
+ /**
17
+ * Local port your dev server listens on.
18
+ * If not specified, the plugin tries to detect it from the bundler.
19
+ */
20
+ port?: number;
21
+ /**
22
+ * Path to write cloudflared logs to a file.
23
+ */
24
+ logFile?: string;
25
+ /**
26
+ * Log level for cloudflared output shown by the plugin.
27
+ */
28
+ logLevel?: LogLevel;
29
+ /**
30
+ * Transport protocol used by cloudflared.
31
+ * @default 'http2'
32
+ */
33
+ protocol?: 'http2' | 'quic';
34
+ /**
35
+ * Enable extra plugin debug logging.
36
+ * @default false
37
+ */
38
+ debug?: boolean;
39
+ /**
40
+ * Disable the plugin entirely.
41
+ * @default true
42
+ */
43
+ enabled?: boolean;
44
+ }
45
+ /**
46
+ * Configuration options for named tunnel mode (requires hostname and API token)
47
+ */
48
+ interface NamedTunnelOptions extends BaseTunnelOptions {
49
+ hostname: string;
50
+ apiToken?: string;
51
+ accountId?: string;
52
+ zoneId?: string;
53
+ tunnelName?: string;
54
+ dns?: string;
55
+ ssl?: string;
56
+ cleanup?: {
57
+ autoCleanup?: boolean;
58
+ preserveTunnels?: Array<string>;
59
+ };
60
+ }
61
+ /**
62
+ * Configuration options for quick tunnel mode (no hostname required)
63
+ */
64
+ interface QuickTunnelOptions extends BaseTunnelOptions {}
65
+ type CloudflareTunnelOptions = NamedTunnelOptions | QuickTunnelOptions;
66
+ //#endregion
67
+ export { CloudflareTunnelOptions as t };