Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

pair.test.ts

590 lines22.8 KB

1// @effect-diagnostics nodeBuiltinImport:off - CLI integration exercises Node HTTP and filesystem boundaries.
2import * as NodeHttp from "node:http";
3import * as NodeFS from "node:fs";
4import * as NodeOS from "node:os";
5import * as NodePath from "node:path";
6​
7import * as NodeServices from "@effect/platform-node/NodeServices";
8import { AuthStandardClientScopes, ORCHESTRATION_PROTOCOL_VERSION } from "@t3tools/contracts";
9import * as NetService from "@t3tools/shared/Net";
10import * as HostProcess from "@t3tools/shared/HostProcess";
11import { assert, describe, expect, it } from "@effect/vitest";
12import * as Cause from "effect/Cause";
13import * as ConfigProvider from "effect/ConfigProvider";
14import * as Effect from "effect/Effect";
15import * as Exit from "effect/Exit";
16import * as Layer from "effect/Layer";
17import * as Sink from "effect/Sink";
18import * as Stream from "effect/Stream";
19import { FetchHttpClient } from "effect/http";
20import { ChildProcess, ChildProcessSpawner } from "effect/process";
21import * as TestClock from "effect/testing/TestClock";
22import * as TestConsole from "effect/testing/TestConsole";
23import { Command, CliError } from "effect/cli";
24​
25import { cli } from "../binCli.ts";
26import {
27 SERVICE_LAUNCHER_CONTEXT_ENV,
28 SERVICE_LAUNCHER_PROTOCOL,
29} from "../cloud/serviceProtocol.ts";
30import * as ServiceLauncherClient from "../cloud/serviceLauncherClient.ts";
31import {
32 makePersistedServerRuntimeState,
33 persistServerRuntimeState,
34 type PersistedServerRuntimeState,
35} from "../serverRuntimeState.ts";
36import { DevServerNotProxiableError, resolveTailscaleLocalTarget } from "./pair.ts";
37​
38import packageJson from "../../package.json" with { type: "json" };
39import { buildPairingAppLink } from "@t3tools/shared/remote";
40​
41const layerCliRuntime = Layer.mergeAll(NodeServices.layer, NetService.layer);
42​
43const baseState = {
44 version: 1,
45 pid: 123,
46 port: 3_773,
47 origin: "http://127.0.0.1:3773",
48 startedAt: "2026-06-20T00:00:00.000Z",
49} as const satisfies PersistedServerRuntimeState;
50​
51describe("pair tailscale local target", () => {
52 it("proxies the dev web port for dev servers", () => {
53 expect(resolveTailscaleLocalTarget({ ...baseState, devUrl: "http://localhost:5733/" })).toEqual(
54 { localPort: 5_733 },
55 );
56 // tailscale serve defaults to loopback, so non-loopback dev servers need an explicit target.
57 expect(
58 resolveTailscaleLocalTarget({ ...baseState, devUrl: "http://192.168.1.10:5733/" }),
59 ).toEqual({ localPort: 5_733, localHost: "192.168.1.10" });
60 expect(
61 resolveTailscaleLocalTarget({ ...baseState, devUrl: "http://[fd7a:115c::1]:5733/" }),
62 ).toEqual({ localPort: 5_733, localHost: "[fd7a:115c::1]" });
63 });
64​
65 it("rejects HTTPS dev URLs, which tailscale serve cannot proxy", () => {
66 expect(
67 resolveTailscaleLocalTarget({ ...baseState, devUrl: "https://localhost:5733/" }),
68 ).toBeInstanceOf(DevServerNotProxiableError);
69 });
70});
71​
72const runCli = (args: ReadonlyArray<string>) => Command.runWith(cli, { version: "0.0.0" })(args);
73​
74const provideCliTestLayers = <A, E, R>(effect: Effect.Effect<A, E, R>) =>
75 Effect.provide(effect, Layer.mergeAll(layerCliRuntime, TestConsole.layer));
76​
77const captureStdout = <A, E, R>(effect: Effect.Effect<A, E, R>) =>
78 provideCliTestLayers(
79 Effect.gen(function* () {
80 yield* effect;
81 return (
82 (yield* TestConsole.logLines).findLast(
83 (line): line is string => typeof line === "string",
84 ) ?? ""
85 );
86 }),
87 );
88​
89const testDescriptor = {
90 environmentId: "pair-test-environment",
91 label: "pair-test",
92 platform: { os: "linux", arch: "x64" },
93 serverVersion: "0.0.1",
94 orchestrationProtocolVersion: ORCHESTRATION_PROTOCOL_VERSION,
95 capabilities: { repositoryIdentity: true },
96};
97​
98const withDescriptorServer = <A, E, R>(
99 run: (origin: string) => Effect.Effect<A, E, R>,
100 host = "127.0.0.1",
101 descriptor: object = testDescriptor,
102) =>
103 Effect.acquireUseRelease(
104 Effect.callback<NodeHttp.Server>((resume) => {
105 const server = NodeHttp.createServer((request, response) => {
106 if (request.url === "/.well-known/t3/environment") {
107 response.writeHead(200, { "content-type": "application/json" });
108 response.end(JSON.stringify(descriptor));
109 return;
110 }
111 response.writeHead(404);
112 response.end();
113 });
114 server.listen(0, host, () => resume(Effect.succeed(server)));
115 }),
116 (server) => {
117 const address = server.address();
118 if (address === null || typeof address === "string") {
119 return Effect.die(new Error("Expected a TCP address"));
120 }
121 return run(`http://${host === "::1" ? "[::1]" : host}:${String(address.port)}`);
122 },
123 (server) => Effect.sync(() => server.close()),
124 );
125​
126describe("t3 pair", () => {
127 it.effect("publishes an IPv6-only server through Tailscale Serve when pairing", () =>
128 withDescriptorServer(
129 (origin) =>
130 Effect.gen(function* () {
131 const fetch = yield* FetchHttpClient.Fetch;
132 let serving = false;
133 const spawner = ChildProcessSpawner.make((command) =>
134 Effect.gen(function* () {
135 if (!ChildProcess.isStandardCommand(command))
136 return yield* Effect.die("Unexpected pipeline");
137 if (command.args[0] === "serve") {
138 const target = command.args.at(-1)!;
139 const descriptor = yield* Effect.promise(async () =>
140 (await fetch(new URL("/.well-known/t3/environment", target))).json(),
141 );
142 expect(descriptor).toEqual(testDescriptor);
143 serving = true;
144 }
145 return ChildProcessSpawner.makeHandle({
146 pid: ChildProcessSpawner.ProcessId(1),
147 exitCode: Effect.succeed(ChildProcessSpawner.ExitCode(0)),
148 isRunning: Effect.succeed(false),
149 kill: () => Effect.void,
150 unref: Effect.succeed(Effect.void),
151 stdin: Sink.drain,
152 stdout: Stream.make(
153 new TextEncoder().encode('{"Self":{"DNSName":"pair-test.tail.ts.net."}}'),
154 ),
155 stderr: Stream.empty,
156 all: Stream.empty,
157 getInputFd: () => Sink.drain,
158 getOutputFd: () => Stream.empty,
159 });
160 }),
161 );
162​
163 const baseDir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-pair-ipv6-test-"));
164 yield* persistServerRuntimeState({
165 path: NodePath.join(baseDir, "userdata", "server-runtime.json"),
166 state: yield* makePersistedServerRuntimeState({
167 config: { host: "::1", devUrl: undefined },
168 port: Number(new URL(origin).port),
169 }),
170 });
171 const output = yield* captureStdout(
172 runCli(["pair", "--base-dir", baseDir, "--tailscale"]).pipe(
173 Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),
174 Effect.provideService(HostProcess.Platform, "linux"),
175 Effect.provideService(FetchHttpClient.Fetch, async (input, init) => {
176 if (String(input).startsWith(origin)) return fetch(input, init);
177 assert.equal(
178 String(input),
179 "https://pair-test.tail.ts.net/.well-known/t3/environment",
180 );
181 return serving
182 ? Response.json(testDescriptor)
183 : new Response(null, { status: 503 });
184 }),
185 ),
186 );
187​
188 expect(serving).toBe(true);
189 assert.include(output, "Pairing URL: https://pair-test.tail.ts.net/pair#token=");
190 }),
191 "::1",
192 ).pipe(Effect.provide(NodeServices.layer)),
193 );
194​
195 it.effect("mints a token and prints a QR pairing URL for a live server", () =>
196 withDescriptorServer((origin) =>
197 Effect.gen(function* () {
198 const baseDir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-pair-test-"));
199 const port = Number(new URL(origin).port);
200 const statePath = NodePath.join(baseDir, "userdata", "server-runtime.json");
201 yield* persistServerRuntimeState({
202 path: statePath,
203 state: yield* makePersistedServerRuntimeState({
204 config: { host: "127.0.0.1", devUrl: undefined },
205 port,
206 }),
207 });
208​
209 const output = yield* captureStdout(runCli(["pair", "--base-dir", baseDir]));
210​
211 assert.include(output, `Pairing with pair-test (${origin})`);
212 assert.include(output, `Pairing URL: ${origin}/pair#token=`);
213 assert.isTrue(output.includes("█") || output.includes("▀") || output.includes("▄"));
214 assert.include(output, "only reachable from this machine");
215​
216 const token = /#token=([A-Z2-9]+)/.exec(output)?.[1];
217 assert.isString(token);
218 assert.include(output, `App link: ${buildPairingAppLink(`${origin}/pair#token=${token}`)}`);
219​
220 const listed = yield* captureStdout(
221 runCli(["auth", "pairing", "list", "--base-dir", baseDir, "--json"]),
222 );
223 const credentials = JSON.parse(listed) as ReadonlyArray<{
224 readonly label?: string;
225 readonly scopes: ReadonlyArray<string>;
226 }>;
227 assert.equal(credentials.length, 1);
228 assert.equal(credentials[0]?.label, "t3 pair");
229 assert.deepEqual(credentials[0]?.scopes, AuthStandardClientScopes);
230 }),
231 ).pipe(
232 Effect.provide(NodeServices.layer),
233 Effect.provideService(HostProcess.Environment, {
234 ...process.env,
235 [SERVICE_LAUNCHER_CONTEXT_ENV]: JSON.stringify({
236 protocol: SERVICE_LAUNCHER_PROTOCOL,
237 childVersion: packageJson.version,
238 }),
239 }),
240 Effect.provideService(ServiceLauncherClient.ServiceLauncherHostProcess, {
241 connected: false,
242 send: () => false,
243 on: () => undefined,
244 off: () => undefined,
245 }),
246 ),
247 );
248​
249 it.effect("pairs through the recorded dev web URL for dev servers", () =>
250 withDescriptorServer((origin) =>
251 Effect.gen(function* () {
252 const baseDir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-pair-dev-test-"));
253 const port = Number(new URL(origin).port);
254 const statePath = NodePath.join(baseDir, "dev", "server-runtime.json");
255 yield* persistServerRuntimeState({
256 path: statePath,
257 state: yield* makePersistedServerRuntimeState({
258 config: { host: undefined, devUrl: new URL("http://localhost:5733") },
259 port,
260 }),
261 });
262​
263 const output = yield* captureStdout(runCli(["pair", "--base-dir", baseDir]));
264​
265 assert.include(output, "Pairing URL: http://localhost:5733/pair#token=");
266 }),
267 ).pipe(Effect.provide(NodeServices.layer)),
268 );
269​
270 it.effect("ignores runtime state whose recorded pid is no longer alive", () =>
271 withDescriptorServer((origin) =>
272 Effect.gen(function* () {
273 const baseDir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-pair-pid-test-"));
274 const statePath = NodePath.join(baseDir, "userdata", "server-runtime.json");
275 const state = yield* makePersistedServerRuntimeState({
276 config: { host: "127.0.0.1", devUrl: undefined },
277 port: Number(new URL(origin).port),
278 });
279 yield* persistServerRuntimeState({
280 path: statePath,
281 state: { ...state, pid: 4_194_305 },
282 });
283​
284 const error = yield* provideCliTestLayers(
285 runCli(["pair", "--base-dir", baseDir]).pipe(Effect.flip),
286 );
287​
288 const rendered = String(
289 typeof error === "object" && error !== null && "cause" in error ? error.cause : error,
290 );
291 assert.include(rendered, "No running T3 Code server found.");
292 }),
293 ).pipe(Effect.provide(NodeServices.layer)),
294 );
295​
296 // regression: #10516 minting opens the target database with this checkout's
297 // migrations, so a worktree must never fall back to the live install.
298 it.effect("does not fall back to the shared home from a linked worktree", () =>
299 withDescriptorServer((origin) =>
300 Effect.gen(function* () {
301 const root = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-pair-worktree-test-"));
302 const worktree = NodePath.join(root, "worktree");
303 NodeFS.mkdirSync(worktree);
304 NodeFS.writeFileSync(
305 NodePath.join(worktree, ".git"),
306 `gitdir: ${NodePath.join(root, "repo", ".git", "worktrees", "worktree")}\n`,
307 );
308 const sharedHome = NodePath.join(root, "shared");
309 yield* persistServerRuntimeState({
310 path: NodePath.join(sharedHome, "userdata", "server-runtime.json"),
311 state: yield* makePersistedServerRuntimeState({
312 config: { host: "127.0.0.1", devUrl: undefined },
313 port: Number(new URL(origin).port),
314 }),
315 });
316​
317 const error = yield* provideCliTestLayers(
318 runCli(["pair"]).pipe(
319 Effect.provideService(HostProcess.WorkingDirectory, worktree),
320 Effect.provide(
321 ConfigProvider.layer(ConfigProvider.fromEnv({ env: { T3CODE_HOME: sharedHome } })),
322 ),
323 Effect.flip,
324 ),
325 );
326​
327 assert.include(String(error), "No running T3 Code server found.");
328 assert.notInclude(String(error), sharedHome);
329 assert.deepEqual(NodeFS.readdirSync(NodePath.join(sharedHome, "userdata")), [
330 "server-runtime.json",
331 ]);
332 }),
333 ).pipe(Effect.provide(NodeServices.layer)),
334 );
335​
336 // regression: #15492 an older CLI minted into a V1 database the protocol 2
337 // server never reads, so pairing must refuse before opening the database.
338 it.effect("rejects a server on another protocol before opening its database", () =>
339 withDescriptorServer(
340 (origin) =>
341 Effect.gen(function* () {
342 const baseDir = NodeFS.mkdtempSync(
343 NodePath.join(NodeOS.tmpdir(), "t3-pair-protocol-test-"),
344 );
345 yield* persistServerRuntimeState({
346 path: NodePath.join(baseDir, "userdata", "server-runtime.json"),
347 state: yield* makePersistedServerRuntimeState({
348 config: { host: "127.0.0.1", devUrl: undefined },
349 port: Number(new URL(origin).port),
350 }),
351 });
352​
353 const exit = yield* provideCliTestLayers(
354 runCli(["pair", "--base-dir", baseDir]).pipe(Effect.exit),
355 );
356​
357 assert.deepEqual(NodeFS.readdirSync(NodePath.join(baseDir, "userdata")), [
358 "server-runtime.json",
359 ]);
360 assert.isTrue(Exit.isFailure(exit));
361 if (Exit.isFailure(exit)) {
362 assert.include(String(Cause.squash(exit.cause)), "t3@0.0.45 pair");
363 }
364 }),
365 "127.0.0.1",
366 { ...testDescriptor, serverVersion: "0.0.45", orchestrationProtocolVersion: 1 },
367 ).pipe(Effect.provide(NodeServices.layer)),
368 );
369​
370 // Without the capability `tailscale serve` blocks on an enablement URL, so
371 // pairing must stop at status instead of spawning it.
372 it.effect("explains a tailnet without HTTPS serve instead of running tailscale serve", () =>
373 withDescriptorServer((origin) =>
374 Effect.gen(function* () {
375 const baseDir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-pair-ts-test-"));
376 yield* persistServerRuntimeState({
377 path: NodePath.join(baseDir, "userdata", "server-runtime.json"),
378 state: yield* makePersistedServerRuntimeState({
379 config: { host: "127.0.0.1", devUrl: undefined },
380 port: Number(new URL(origin).port),
381 }),
382 });
383 const tailscaleCalls: Array<ReadonlyArray<string>> = [];
384 const spawner = ChildProcessSpawner.make((command) => {
385 const { args } = command as unknown as { readonly args: ReadonlyArray<string> };
386 tailscaleCalls.push(args);
387 const stdout =
388 args[0] === "status"
389 ? `{"Self":{"DNSName":"pair-test.invalid.","CapMap":{"funnel":null}}}`
390 : "";
391 return Effect.succeed(
392 ChildProcessSpawner.makeHandle({
393 pid: ChildProcessSpawner.ProcessId(1),
394 exitCode: Effect.succeed(ChildProcessSpawner.ExitCode(args[0] === "status" ? 0 : 1)),
395 isRunning: Effect.succeed(false),
396 kill: () => Effect.void,
397 unref: Effect.succeed(Effect.void),
398 stdin: Sink.drain,
399 stdout: Stream.make(new TextEncoder().encode(stdout)),
400 stderr: Stream.empty,
401 all: Stream.empty,
402 getInputFd: () => Sink.drain,
403 getOutputFd: () => Stream.empty,
404 }),
405 );
406 });
407​
408 const error = yield* provideCliTestLayers(
409 runCli(["pair", "--base-dir", baseDir, "--tailscale"]).pipe(
410 Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),
411 Effect.flip,
412 ),
413 );
414​
415 assert.include(String(error), "Tailscale Serve is not enabled on your tailnet.");
416 assert.include(String(error), "https://login.tailscale.com/admin/dns");
417 assert.deepEqual(tailscaleCalls, [["status", "--json"]]);
418 }),
419 ).pipe(Effect.provide(NodeServices.layer)),
420 );
421});
422​
423describe("auth scope options", () => {
424 it.effect.each([
425 { group: "pairing", action: "create" },
426 { group: "session", action: "issue" },
427 ] as const)(
428 "issues and persists only the selected scopes for auth $group $action",
429 ({ group, action }) =>
430 Effect.gen(function* () {
431 const baseDir = NodeFS.mkdtempSync(
432 NodePath.join(NodeOS.tmpdir(), "t3-cli-auth-scopes-test-"),
433 );
434 const output = yield* captureStdout(
435 runCli([
436 "auth",
437 group,
438 action,
439 "--base-dir",
440 baseDir,
441 "--json",
442 "--scope",
443 "orchestration:read",
444 "--scope",
445 "access:read",
446 "--scope",
447 "orchestration:read",
448 ]),
449 );
450 const issued = JSON.parse(output) as { readonly scopes: ReadonlyArray<string> };
451 const listOutput = yield* captureStdout(
452 runCli(["auth", group, "list", "--base-dir", baseDir, "--json"]),
453 );
454 const listed = JSON.parse(listOutput) as ReadonlyArray<{
455 readonly scopes: ReadonlyArray<string>;
456 }>;
457​
458 assert.deepEqual(issued.scopes, ["orchestration:read", "access:read"]);
459 assert.lengthOf(listed, 1);
460 assert.deepEqual(listed[0]?.scopes, issued.scopes);
461 }),
462 );
463​
464 it.effect.each(
465 [["pair"], ["auth", "pairing", "create"], ["auth", "session", "issue"]].map((command) => ({
466 command,
467 label: command.join(" "),
468 })),
469 )("rejects invalid scopes before running $label", ({ command }) =>
470 Effect.gen(function* () {
471 const error = yield* runCli([
472 ...command,
473 "--scope",
474 "orchestration:read",
475 "--scope",
476 "admin",
477 ]).pipe(Effect.provide(layerCliRuntime), Effect.flip);
478​
479 if (!CliError.isCliError(error) || error._tag !== "ShowHelp") {
480 assert.fail(`Expected ShowHelp, got ${String(error)}`);
481 }
482 assert.deepEqual(error.commandPath, ["t3", ...command]);
483 const scopeError = error.errors[0];
484 if (scopeError?._tag !== "InvalidValue") {
485 assert.fail(`Expected InvalidValue, got ${String(scopeError?._tag)}`);
486 }
487 assert.equal(scopeError.option, "scope");
488 assert.equal(scopeError.value, "admin");
489 }),
490 );
491});
492​
493describe("auth pairing create --base-url", () => {
494 it.effect.each(["192.168.1.5:3773", "localhost:3773", "ftp://localhost:3773"])(
495 "rejects %s before issuing a token",
496 (baseUrl) =>
497 Effect.gen(function* () {
498 const baseDir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-cli-base-url-test-"));
499 const error = yield* runCli([
500 "auth",
501 "pairing",
502 "create",
503 "--base-dir",
504 baseDir,
505 "--base-url",
506 baseUrl,
507 ]).pipe(Effect.provide(layerCliRuntime), Effect.flip);
508​
509 if (!CliError.isCliError(error) || error._tag !== "ShowHelp") {
510 assert.fail(`Expected ShowHelp, got ${String(error)}`);
511 }
512 const flagError = error.errors[0];
513 if (flagError?._tag !== "InvalidValue") {
514 assert.fail(`Expected InvalidValue, got ${String(flagError?._tag)}`);
515 }
516 assert.equal(flagError.option, "base-url");
517 assert.equal(flagError.value, baseUrl);
518​
519 const listOutput = yield* captureStdout(
520 runCli(["auth", "pairing", "list", "--base-dir", baseDir, "--json"]),
521 );
522 assert.deepEqual(JSON.parse(listOutput), []);
523 }),
524 );
525​
526 it.effect.each(["http://192.168.1.5:3773", "https://example.com", "http:localhost:3773"])(
527 "prints a pair URL for %s",
528 (baseUrl) =>
529 Effect.gen(function* () {
530 const baseDir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-cli-base-url-test-"));
531 const output = yield* captureStdout(
532 runCli([
533 "auth",
534 "pairing",
535 "create",
536 "--base-dir",
537 baseDir,
538 "--base-url",
539 baseUrl,
540 "--json",
541 ]),
542 );
543 const issued = JSON.parse(output) as {
544 readonly credential: string;
545 readonly pairUrl: string;
546 };
547​
548 assert.equal(issued.pairUrl, `${new URL(baseUrl).origin}/pair#token=${issued.credential}`);
549 }),
550 );
551});
552​
553describe("scripted auth output", () => {
554 it.effect.each(
555 [
556 ["auth", "session", "issue", "--token-only"],
557 ["auth", "session", "list", "--json"],
558 ["auth", "pairing", "list", "--json"],
559 ].map((command) => ({ command, label: command.join(" ") })),
560 )("prints only the result for $label after removing an abandoned upload", ({ command }) =>
561 Effect.gen(function* () {
562 const baseDir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-cli-quiet-test-"));
563 const attachmentsDir = NodePath.join(baseDir, "userdata", "attachments");
564 NodeFS.mkdirSync(attachmentsDir, { recursive: true });
565 // An abandoned upload makes config resolution log that it removed it.
566 const abandoned = NodePath.join(attachmentsDir, "abandoned.part");
567 NodeFS.writeFileSync(abandoned, "");
568 const jan2020Seconds = 1_577_836_800;
569 NodeFS.utimesSync(abandoned, jan2020Seconds, jan2020Seconds);
570 // The sweep reads Clock, so a week past the upload's mtime makes it expired.
571 yield* TestClock.setTime((jan2020Seconds + 7 * 24 * 60 * 60) * 1000);
572​
573 const lines = yield* provideCliTestLayers(
574 Effect.gen(function* () {
575 yield* runCli([...command, "--base-dir", baseDir]);
576 return yield* TestConsole.logLines;
577 }),
578 );
579​
580 assert.isFalse(NodeFS.existsSync(abandoned));
581 assert.lengthOf(lines, 1);
582 const output = String(lines[0]);
583 if (command.includes("--json")) {
584 assert.deepEqual(JSON.parse(output), []);
585 } else {
586 assert.match(output.trim(), /^[\w-]+\.[\w-]+/);
587 }
588 }),
589 );
590});