@urateam/cli 0.1.41 → 0.1.43
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.
- package/dist/__tests__/env-file.test.d.ts +2 -0
- package/dist/__tests__/env-file.test.d.ts.map +1 -0
- package/dist/__tests__/env-file.test.js +89 -0
- package/dist/__tests__/env-file.test.js.map +1 -0
- package/dist/__tests__/linear-oauth.test.d.ts +2 -0
- package/dist/__tests__/linear-oauth.test.d.ts.map +1 -0
- package/dist/__tests__/linear-oauth.test.js +162 -0
- package/dist/__tests__/linear-oauth.test.js.map +1 -0
- package/dist/__tests__/oauth-state.test.d.ts +2 -0
- package/dist/__tests__/oauth-state.test.d.ts.map +1 -0
- package/dist/__tests__/oauth-state.test.js +40 -0
- package/dist/__tests__/oauth-state.test.js.map +1 -0
- package/dist/__tests__/self-auth-linear.test.d.ts +2 -0
- package/dist/__tests__/self-auth-linear.test.d.ts.map +1 -0
- package/dist/__tests__/self-auth-linear.test.js +92 -0
- package/dist/__tests__/self-auth-linear.test.js.map +1 -0
- package/dist/__tests__/tunnel.test.d.ts +2 -0
- package/dist/__tests__/tunnel.test.d.ts.map +1 -0
- package/dist/__tests__/tunnel.test.js +256 -0
- package/dist/__tests__/tunnel.test.js.map +1 -0
- package/dist/commands/self-auth-linear.d.ts +22 -0
- package/dist/commands/self-auth-linear.d.ts.map +1 -0
- package/dist/commands/self-auth-linear.js +100 -0
- package/dist/commands/self-auth-linear.js.map +1 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +84 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/env-file.d.ts +3 -0
- package/dist/lib/env-file.d.ts.map +1 -0
- package/dist/lib/env-file.js +69 -0
- package/dist/lib/env-file.js.map +1 -0
- package/dist/lib/linear-oauth-deps.d.ts +14 -0
- package/dist/lib/linear-oauth-deps.d.ts.map +1 -0
- package/dist/lib/linear-oauth-deps.js +54 -0
- package/dist/lib/linear-oauth-deps.js.map +1 -0
- package/dist/lib/linear-oauth.d.ts +46 -0
- package/dist/lib/linear-oauth.d.ts.map +1 -0
- package/dist/lib/linear-oauth.js +154 -0
- package/dist/lib/linear-oauth.js.map +1 -0
- package/dist/lib/oauth-state.d.ts +9 -0
- package/dist/lib/oauth-state.d.ts.map +1 -0
- package/dist/lib/oauth-state.js +43 -0
- package/dist/lib/oauth-state.js.map +1 -0
- package/dist/lib/tunnel.d.ts +105 -0
- package/dist/lib/tunnel.d.ts.map +1 -0
- package/dist/lib/tunnel.js +245 -0
- package/dist/lib/tunnel.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ura start --tunnel <mode>` runtime: wraps `cloudflared` as a child process.
|
|
3
|
+
*
|
|
4
|
+
* Two modes:
|
|
5
|
+
* - "cloudflare-quick": `cloudflared tunnel --url http://localhost:<port>`.
|
|
6
|
+
* Cloudflare assigns a random `*.trycloudflare.com` URL, which is parsed
|
|
7
|
+
* out of cloudflared's stderr.
|
|
8
|
+
* - "cloudflare-token": `cloudflared tunnel --token <token> run`. Operator
|
|
9
|
+
* has already configured a named tunnel in Cloudflare; the public URL
|
|
10
|
+
* is known ahead of time and must be passed via `opts.publicUrl` /
|
|
11
|
+
* `URATEAM_PUBLIC_URL`.
|
|
12
|
+
*
|
|
13
|
+
* Restart-on-exit: the child is supervised with exponential-backoff retries
|
|
14
|
+
* (default 1s → 2s → 4s ... capped at 30s, max 10 attempts). On `stop()`
|
|
15
|
+
* the supervisor cancels any pending retry timer and SIGTERMs the child.
|
|
16
|
+
*
|
|
17
|
+
* All I/O is injectable for tests; the real `spawn` is only invoked when the
|
|
18
|
+
* caller doesn't override `opts.spawn`.
|
|
19
|
+
*/
|
|
20
|
+
import { spawn as realSpawn, } from "node:child_process";
|
|
21
|
+
import { EventEmitter } from "node:events";
|
|
22
|
+
/** Cloudflare quick-tunnel stderr line we parse the URL out of. */
|
|
23
|
+
const QUICK_URL_REGEX = /https:\/\/[a-z0-9-]+\.trycloudflare\.com/;
|
|
24
|
+
/**
|
|
25
|
+
* Thrown when the `cloudflared` binary isn't installed (ENOENT on spawn).
|
|
26
|
+
* Carries an install hint so the start command can render an actionable
|
|
27
|
+
* error.
|
|
28
|
+
*/
|
|
29
|
+
export class CloudflaredMissingError extends Error {
|
|
30
|
+
constructor() {
|
|
31
|
+
super("cloudflared binary not found. Install it:\n" +
|
|
32
|
+
" macOS: brew install cloudflared\n" +
|
|
33
|
+
" Linux: https://pkg.cloudflare.com/index.html (apt/yum)\n" +
|
|
34
|
+
" Other: https://github.com/cloudflare/cloudflared/releases");
|
|
35
|
+
this.name = "CloudflaredMissingError";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export class TunnelManager extends EventEmitter {
|
|
39
|
+
opts;
|
|
40
|
+
child = null;
|
|
41
|
+
restartCount = 0;
|
|
42
|
+
shuttingDown = false;
|
|
43
|
+
restartTimer = null;
|
|
44
|
+
publicUrl = null;
|
|
45
|
+
spawnFn;
|
|
46
|
+
initialRestartDelayMs;
|
|
47
|
+
maxRestartDelayMs;
|
|
48
|
+
maxRestartAttempts;
|
|
49
|
+
urlDetectTimeoutMs;
|
|
50
|
+
log;
|
|
51
|
+
constructor(opts) {
|
|
52
|
+
super();
|
|
53
|
+
this.opts = opts;
|
|
54
|
+
this.spawnFn = opts.spawn ?? realSpawn;
|
|
55
|
+
this.initialRestartDelayMs = opts.initialRestartDelayMs ?? 1000;
|
|
56
|
+
this.maxRestartDelayMs = opts.maxRestartDelayMs ?? 30000;
|
|
57
|
+
this.maxRestartAttempts = opts.maxRestartAttempts ?? 10;
|
|
58
|
+
this.urlDetectTimeoutMs = opts.urlDetectTimeoutMs ?? 30000;
|
|
59
|
+
this.log = opts.log ?? ((m) => console.log(m));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Start the tunnel. Resolves with the detected (quick) or pre-configured
|
|
63
|
+
* (token) public URL. Throws `CloudflaredMissingError` on ENOENT.
|
|
64
|
+
*/
|
|
65
|
+
async start() {
|
|
66
|
+
if (this.opts.mode === "cloudflare-token") {
|
|
67
|
+
if (!this.opts.token) {
|
|
68
|
+
throw new Error("TunnelManager: cloudflare-token mode requires `token` (or CLOUDFLARE_TUNNEL_TOKEN env var)");
|
|
69
|
+
}
|
|
70
|
+
if (!this.opts.publicUrl) {
|
|
71
|
+
throw new Error("TunnelManager: cloudflare-token mode requires `publicUrl` (or URATEAM_PUBLIC_URL env var)");
|
|
72
|
+
}
|
|
73
|
+
this.publicUrl = this.opts.publicUrl;
|
|
74
|
+
}
|
|
75
|
+
const url = await this.spawnAndDetectUrl();
|
|
76
|
+
this.publicUrl = url;
|
|
77
|
+
return { publicUrl: url, restartCount: this.restartCount };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Stop the tunnel. Cancels any pending restart, SIGTERMs the child, and
|
|
81
|
+
* awaits the exit. Subsequent restarts (e.g. an exit fired during
|
|
82
|
+
* shutdown) are skipped.
|
|
83
|
+
*/
|
|
84
|
+
async stop() {
|
|
85
|
+
this.shuttingDown = true;
|
|
86
|
+
if (this.restartTimer) {
|
|
87
|
+
clearTimeout(this.restartTimer);
|
|
88
|
+
this.restartTimer = null;
|
|
89
|
+
}
|
|
90
|
+
if (this.child && this.child.exitCode === null && !this.child.killed) {
|
|
91
|
+
const exited = new Promise((resolve) => {
|
|
92
|
+
this.child.once("exit", () => resolve());
|
|
93
|
+
});
|
|
94
|
+
this.child.kill("SIGTERM");
|
|
95
|
+
await exited;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
buildArgs() {
|
|
99
|
+
if (this.opts.mode === "cloudflare-quick") {
|
|
100
|
+
return [
|
|
101
|
+
"tunnel",
|
|
102
|
+
"--no-autoupdate",
|
|
103
|
+
"--url",
|
|
104
|
+
`http://localhost:${this.opts.localPort}`,
|
|
105
|
+
];
|
|
106
|
+
}
|
|
107
|
+
return [
|
|
108
|
+
"tunnel",
|
|
109
|
+
"--no-autoupdate",
|
|
110
|
+
"run",
|
|
111
|
+
"--token",
|
|
112
|
+
this.opts.token,
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
spawnChild() {
|
|
116
|
+
const spawnOpts = { stdio: ["ignore", "pipe", "pipe"] };
|
|
117
|
+
try {
|
|
118
|
+
return this.spawnFn("cloudflared", this.buildArgs(), spawnOpts);
|
|
119
|
+
}
|
|
120
|
+
catch (err) {
|
|
121
|
+
if (err.code === "ENOENT") {
|
|
122
|
+
throw new CloudflaredMissingError();
|
|
123
|
+
}
|
|
124
|
+
throw err;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
async spawnAndDetectUrl() {
|
|
128
|
+
return new Promise((resolve, reject) => {
|
|
129
|
+
let child;
|
|
130
|
+
try {
|
|
131
|
+
child = this.spawnChild();
|
|
132
|
+
}
|
|
133
|
+
catch (err) {
|
|
134
|
+
reject(err);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
// Synchronous ENOENT surfaces as an "error" event on the child, not as
|
|
138
|
+
// a throw — cover both paths.
|
|
139
|
+
const onError = (err) => {
|
|
140
|
+
if (err.code === "ENOENT") {
|
|
141
|
+
reject(new CloudflaredMissingError());
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
reject(err);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
child.once("error", onError);
|
|
148
|
+
this.child = child;
|
|
149
|
+
this.wireSupervisor(child);
|
|
150
|
+
if (this.opts.mode === "cloudflare-token") {
|
|
151
|
+
// We already have a static publicUrl; the spawn either succeeds or
|
|
152
|
+
// exits — the supervisor handles both. Resolve immediately.
|
|
153
|
+
resolve(this.opts.publicUrl);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const urlTimer = setTimeout(() => {
|
|
157
|
+
reject(new Error(`TunnelManager: did not see a *.trycloudflare.com URL within ${this.urlDetectTimeoutMs}ms`));
|
|
158
|
+
}, this.urlDetectTimeoutMs);
|
|
159
|
+
const onStderr = (chunk) => {
|
|
160
|
+
const text = chunk.toString();
|
|
161
|
+
const match = text.match(QUICK_URL_REGEX);
|
|
162
|
+
if (match) {
|
|
163
|
+
clearTimeout(urlTimer);
|
|
164
|
+
child.stderr?.removeListener("data", onStderr);
|
|
165
|
+
this.log(`🌐 Public URL: ${match[0]}`);
|
|
166
|
+
resolve(match[0]);
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
child.stderr?.on("data", onStderr);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Wire the supervisor: on unexpected exit, schedule a restart with
|
|
174
|
+
* exponential backoff. Caps at `maxRestartAttempts` then emits "error".
|
|
175
|
+
*/
|
|
176
|
+
wireSupervisor(child) {
|
|
177
|
+
child.once("exit", (code, signal) => {
|
|
178
|
+
this.child = null;
|
|
179
|
+
this.emit("stopped", {
|
|
180
|
+
exitCode: code,
|
|
181
|
+
signal,
|
|
182
|
+
restartCount: this.restartCount,
|
|
183
|
+
});
|
|
184
|
+
if (this.shuttingDown)
|
|
185
|
+
return;
|
|
186
|
+
if (this.restartCount >= this.maxRestartAttempts) {
|
|
187
|
+
this.emit("error", new Error(`TunnelManager: cloudflared exited ${this.restartCount} times in a row; giving up`));
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
const delay = Math.min(this.initialRestartDelayMs * 2 ** this.restartCount, this.maxRestartDelayMs);
|
|
191
|
+
this.log(`tunnel: cloudflared exited (code=${code}, signal=${signal}); restart #${this.restartCount + 1} in ${delay}ms`);
|
|
192
|
+
this.restartTimer = setTimeout(() => {
|
|
193
|
+
this.restartTimer = null;
|
|
194
|
+
this.restartCount += 1;
|
|
195
|
+
this.restart().catch((err) => this.emit("error", err));
|
|
196
|
+
}, delay);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
async restart() {
|
|
200
|
+
if (this.shuttingDown)
|
|
201
|
+
return;
|
|
202
|
+
if (this.opts.mode === "cloudflare-quick") {
|
|
203
|
+
try {
|
|
204
|
+
const url = await this.spawnAndDetectUrl();
|
|
205
|
+
this.publicUrl = url;
|
|
206
|
+
this.emit("started", {
|
|
207
|
+
publicUrl: url,
|
|
208
|
+
restartCount: this.restartCount,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
catch (err) {
|
|
212
|
+
this.emit("error", err);
|
|
213
|
+
}
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
// token mode: spawn child; publicUrl is already known.
|
|
217
|
+
try {
|
|
218
|
+
const child = this.spawnChild();
|
|
219
|
+
this.child = child;
|
|
220
|
+
this.wireSupervisor(child);
|
|
221
|
+
this.emit("started", {
|
|
222
|
+
publicUrl: this.publicUrl,
|
|
223
|
+
restartCount: this.restartCount,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
catch (err) {
|
|
227
|
+
this.emit("error", err);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/** Currently-known public URL, or null before `start()`. */
|
|
231
|
+
getPublicUrl() {
|
|
232
|
+
return this.publicUrl;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Total restart attempts made since `start()`. Never resets within the
|
|
236
|
+
* lifetime of a single TunnelManager — so even a long stable period
|
|
237
|
+
* followed by a single new failure still incurs the cap-tier delay.
|
|
238
|
+
* Operators who care can construct a fresh manager. Used by the
|
|
239
|
+
* `tunnel.stopped` audit event to attribute flap loops correctly.
|
|
240
|
+
*/
|
|
241
|
+
getRestartCount() {
|
|
242
|
+
return this.restartCount;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
//# sourceMappingURL=tunnel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tunnel.js","sourceRoot":"","sources":["../../src/lib/tunnel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,KAAK,IAAI,SAAS,GAG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5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"commander": "^13.1.0",
|
|
24
24
|
"postgres": "^3.4.0",
|
|
25
25
|
"zod": "^4.3.6",
|
|
26
|
-
"@urateam/core": "0.1.
|
|
27
|
-
"@urateam/dashboard": "0.1.
|
|
26
|
+
"@urateam/core": "0.1.41",
|
|
27
|
+
"@urateam/dashboard": "0.1.41"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/better-sqlite3": "^7.6.0",
|