-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpull.test.ts
More file actions
658 lines (564 loc) · 21.6 KB
/
pull.test.ts
File metadata and controls
658 lines (564 loc) · 21.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
import { test, expect, describe, beforeEach, afterEach, spyOn, mock } from "bun:test";
import { mkdtemp, rm } from "node:fs/promises";
import { join } from "node:path";
import { tmpdir } from "node:os";
import {
credentialStoreStubs,
gitStubs,
configStubs,
stubFetch,
captureLog,
} from "../../test/lib/stubs.ts";
mock.module("../../lib/credential-store.ts", () => credentialStoreStubs);
mock.module("../../lib/git.ts", () => gitStubs);
mock.module("../../lib/spinner.ts", () => ({
withSpinner: async (msg: string, fn: () => Promise<unknown>) => {
console.error(msg);
return fn();
},
}));
type Profile = { workspaceId: string; appId: string; instances: Record<string, string> };
const _profiles: Record<string, Profile> = {};
const INSTANCE_ALIASES: Record<string, string> = {
dev: "development",
development: "development",
prod: "production",
production: "production",
};
mock.module("../../lib/config.ts", () => ({
...configStubs,
setProfile: async (path: string, profile: Profile) => {
_profiles[path] = profile;
},
resolveProfile: async (cwd: string) => {
if (_profiles[cwd])
return { path: cwd, profile: _profiles[cwd], resolvedVia: "directory" as const };
return undefined;
},
resolveInstanceId: (profile: Profile, flag?: string) => {
if (!flag) return { id: profile.instances.development, label: "development" };
const env = INSTANCE_ALIASES[flag];
if (!env) return { id: flag, label: flag };
const id = profile.instances[env];
if (!id) throw new Error(`No ${env} instance configured. Run \`clerk link\` to set one up.`);
return { id, label: env };
},
resolveAppContext: async (options: { app?: string; instance?: string; cwd?: string }) => {
if (options.app) {
const app = {
application_id: "app_1",
instances: [
{
instance_id: "ins_dev",
environment_type: "development",
publishable_key: "pk_test_abc123",
secret_key: "sk_test_xyz789",
},
{
instance_id: "ins_prod",
environment_type: "production",
publishable_key: "pk_live_abc123",
secret_key: "sk_live_xyz789",
},
],
};
if (options.instance) {
const env = INSTANCE_ALIASES[options.instance];
if (env) {
const matched = app.instances.find((i) => i.environment_type === env);
if (!matched) throw new Error(`No ${env} instance found for application ${options.app}.`);
return {
appId: options.app,
appLabel: options.app,
instanceId: matched.instance_id,
instanceLabel: env,
};
}
return {
appId: options.app,
appLabel: options.app,
instanceId: options.instance,
instanceLabel: options.instance,
};
}
return {
appId: options.app,
appLabel: options.app,
instanceId: "ins_dev",
instanceLabel: "development",
};
}
const profile = _profiles[options.cwd ?? process.cwd()];
if (!profile) throw new Error("No Clerk project linked");
const instance = !options.instance
? { id: profile.instances.development, label: "development" }
: (() => {
const env = INSTANCE_ALIASES[options.instance];
if (!env) return { id: options.instance, label: options.instance };
const id = profile.instances[env];
if (!id)
throw new Error(`No ${env} instance configured. Run \`clerk link\` to set one up.`);
return { id, label: env };
})();
return {
appId: profile.appId,
appLabel: profile.appId,
instanceId: instance.id,
instanceLabel: instance.label,
};
},
}));
const { _setConfigDir, setProfile } = (await import("../../lib/config.ts")) as any;
describe("env pull", () => {
const originalEnv = { ...process.env };
const originalFetch = globalThis.fetch;
const originalCwd = process.cwd;
let tempDir: string;
let errorSpy: ReturnType<typeof spyOn>;
let logSpy: ReturnType<typeof spyOn>;
let exitSpy: ReturnType<typeof spyOn>;
let captured: ReturnType<typeof captureLog>;
const mockApplication = {
application_id: "app_1",
instances: [
{
instance_id: "ins_dev",
environment_type: "development",
publishable_key: "pk_test_abc123",
secret_key: "sk_test_xyz789",
},
{
instance_id: "ins_prod",
environment_type: "production",
publishable_key: "pk_live_abc123",
secret_key: "sk_live_xyz789",
},
],
};
beforeEach(async () => {
Object.keys(_profiles).forEach((k) => delete _profiles[k]);
tempDir = await mkdtemp(join(tmpdir(), "clerk-env-pull-test-"));
_setConfigDir(tempDir);
process.env.CLERK_PLATFORM_API_KEY = "test_key";
process.env.CLERK_PLATFORM_API_URL = "https://test-api.clerk.com";
// Write a package.json so framework detection works (fallback)
await Bun.write(
join(tempDir, "package.json"),
JSON.stringify({ dependencies: { express: "4.0.0" } }),
);
// Mock cwd to tempDir so file resolution works
process.cwd = () => tempDir;
errorSpy = spyOn(console, "error").mockImplementation(() => {});
logSpy = spyOn(console, "log").mockImplementation(() => {});
exitSpy = spyOn(process, "exit").mockImplementation(() => {
throw new Error("process.exit");
});
captured = captureLog();
stubFetch(async () => new Response(JSON.stringify(mockApplication), { status: 200 }));
});
afterEach(async () => {
captured.teardown();
_setConfigDir(undefined);
process.env = { ...originalEnv };
process.cwd = originalCwd;
globalThis.fetch = originalFetch;
errorSpy.mockRestore();
logSpy.mockRestore();
exitSpy.mockRestore();
await rm(tempDir, { recursive: true, force: true });
});
async function runEnvPull(
options: { app?: string; instance?: string; file?: string; cwd?: string } = {},
) {
const { pull } = await import("./pull.ts");
return captured.run(() => pull(options));
}
test("errors when no profile is linked", async () => {
await expect(runEnvPull()).rejects.toThrow("No Clerk project linked");
});
test("errors when CLERK_PLATFORM_API_KEY is missing", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
delete process.env.CLERK_PLATFORM_API_KEY;
await expect(runEnvPull()).rejects.toThrow("Not authenticated");
});
test("creates .env.local with keys when no env file exists", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await runEnvPull();
const content = await Bun.file(join(tempDir, ".env.local")).text();
expect(content).toContain("CLERK_PUBLISHABLE_KEY=pk_test_abc123");
expect(content).toContain("CLERK_SECRET_KEY=sk_test_xyz789");
});
test("updates existing .env.local preserving other vars", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(join(tempDir, ".env.local"), "DB_URL=postgres://localhost\nAPP_NAME=myapp\n");
await runEnvPull();
const content = await Bun.file(join(tempDir, ".env.local")).text();
expect(content).toContain("DB_URL=postgres://localhost");
expect(content).toContain("APP_NAME=myapp");
expect(content).toContain("CLERK_PUBLISHABLE_KEY=pk_test_abc123");
expect(content).toContain("CLERK_SECRET_KEY=sk_test_xyz789");
});
test("updates existing Clerk keys in-place", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(
join(tempDir, ".env.local"),
"CLERK_PUBLISHABLE_KEY=old_pk\nOTHER=val\nCLERK_SECRET_KEY=old_sk\n",
);
await runEnvPull();
const content = await Bun.file(join(tempDir, ".env.local")).text();
expect(content).toBe(
"CLERK_PUBLISHABLE_KEY=pk_test_abc123\nOTHER=val\nCLERK_SECRET_KEY=sk_test_xyz789\n",
);
});
test("falls back to .env when .env.local does not exist and .env has Clerk keys", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(join(tempDir, ".env"), "EXISTING=value\nCLERK_SECRET_KEY=old_sk\n");
await runEnvPull();
const content = await Bun.file(join(tempDir, ".env")).text();
expect(content).toContain("EXISTING=value");
expect(content).toContain("CLERK_SECRET_KEY=sk_test_xyz789");
// Should not have created .env.local since .env already had Clerk keys
expect(await Bun.file(join(tempDir, ".env.local")).exists()).toBe(false);
});
test("falls back to .env when it contains NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(
join(tempDir, "package.json"),
JSON.stringify({ dependencies: { next: "14.0.0" } }),
);
await Bun.write(
join(tempDir, ".env"),
"NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=old_pk\nCLERK_SECRET_KEY=old_sk\n",
);
await runEnvPull();
const content = await Bun.file(join(tempDir, ".env")).text();
expect(content).toContain("NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_abc123");
expect(await Bun.file(join(tempDir, ".env.local")).exists()).toBe(false);
});
test("falls back to .env when it contains VITE_CLERK_PUBLISHABLE_KEY", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(
join(tempDir, "package.json"),
JSON.stringify({ dependencies: { react: "19.0.0" } }),
);
await Bun.write(
join(tempDir, ".env"),
"VITE_CLERK_PUBLISHABLE_KEY=old_pk\nCLERK_SECRET_KEY=old_sk\n",
);
await runEnvPull();
const content = await Bun.file(join(tempDir, ".env")).text();
expect(content).toContain("VITE_CLERK_PUBLISHABLE_KEY=pk_test_abc123");
expect(await Bun.file(join(tempDir, ".env.local")).exists()).toBe(false);
});
test("creates preferred file when .env exists but has no Clerk keys", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(join(tempDir, ".env"), "EXISTING=value\n");
await runEnvPull();
// Express prefers .env.local; .env exists but has no Clerk keys,
// so keys go to the preferred file
const content = await Bun.file(join(tempDir, ".env.local")).text();
expect(content).toContain("CLERK_SECRET_KEY=sk_test_xyz789");
});
test("writes to .env.development.local when it exists (highest priority)", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(join(tempDir, ".env.local"), "OTHER=1\n");
await Bun.write(join(tempDir, ".env.development.local"), "DEV_LOCAL=1\n");
await runEnvPull();
const content = await Bun.file(join(tempDir, ".env.development.local")).text();
expect(content).toContain("CLERK_SECRET_KEY=sk_test_xyz789");
// .env.local should be untouched
expect(await Bun.file(join(tempDir, ".env.local")).text()).toBe("OTHER=1\n");
});
test("writes to .env.development.local even when preferred file does not exist", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(join(tempDir, ".env.development.local"), "DEV_LOCAL=1\n");
await runEnvPull();
const content = await Bun.file(join(tempDir, ".env.development.local")).text();
expect(content).toContain("CLERK_SECRET_KEY=sk_test_xyz789");
expect(await Bun.file(join(tempDir, ".env.local")).exists()).toBe(false);
});
test("uses --file flag to target specific file", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await runEnvPull({ file: ".env.development" });
const content = await Bun.file(join(tempDir, ".env.development")).text();
expect(content).toContain("CLERK_SECRET_KEY=sk_test_xyz789");
});
test("writes --file to an absolute path outside cwd", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
const outsideDir = await mkdtemp(join(tmpdir(), "clerk-env-pull-outside-"));
const absoluteTarget = join(outsideDir, "clerk-dev.env");
try {
await runEnvPull({ file: absoluteTarget });
// File must land at the absolute path the user specified, not joined under cwd
const content = await Bun.file(absoluteTarget).text();
expect(content).toContain("CLERK_PUBLISHABLE_KEY=pk_test_abc123");
expect(content).toContain("CLERK_SECRET_KEY=sk_test_xyz789");
// Default fallback location inside cwd must not have been touched
expect(await Bun.file(join(tempDir, ".env.local")).exists()).toBe(false);
expect(captured.err).toContain(`Environment variables written to ${absoluteTarget}`);
} finally {
await rm(outsideDir, { recursive: true, force: true });
}
});
test("writes --file to absolute path when package.json is absent", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await rm(join(tempDir, "package.json"));
const outsideDir = await mkdtemp(join(tmpdir(), "clerk-env-pull-noframework-"));
const absoluteTarget = join(outsideDir, "clerk-dev.env");
try {
await runEnvPull({ file: absoluteTarget });
const content = await Bun.file(absoluteTarget).text();
expect(content).toContain("CLERK_PUBLISHABLE_KEY=pk_test_abc123");
expect(content).toContain("CLERK_SECRET_KEY=sk_test_xyz789");
} finally {
await rm(outsideDir, { recursive: true, force: true });
}
});
test("uses --instance prod to target production", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev", production: "ins_prod" },
});
await runEnvPull({ instance: "prod" });
const content = await Bun.file(join(tempDir, ".env.local")).text();
expect(content).toContain("CLERK_PUBLISHABLE_KEY=pk_live_abc123");
expect(content).toContain("CLERK_SECRET_KEY=sk_live_xyz789");
});
test("uses --app without a linked profile", async () => {
await runEnvPull({ app: "app_1" });
const content = await Bun.file(join(tempDir, ".env.local")).text();
expect(content).toContain("CLERK_PUBLISHABLE_KEY=pk_test_abc123");
expect(content).toContain("CLERK_SECRET_KEY=sk_test_xyz789");
});
test("shows instance label in status message", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await runEnvPull();
expect(errorSpy).toHaveBeenCalledWith(
expect.stringContaining("Pulling env vars from development instance"),
);
});
test("shows written file in status message", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await runEnvPull();
expect(captured.err).toContain("Environment variables written to");
});
test("errors when instance not found in API response", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_unknown" },
});
await expect(runEnvPull()).rejects.toThrow("Instance ins_unknown not found");
});
test("handles API errors gracefully", async () => {
stubFetch(async () => new Response("Unauthorized", { status: 401 }));
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await expect(runEnvPull()).rejects.toThrow("Unauthorized");
});
test("sends include_secret_keys=true in API request", async () => {
let requestedUrl = "";
stubFetch(async (input) => {
requestedUrl = input.toString();
return new Response(JSON.stringify(mockApplication), { status: 200 });
});
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await runEnvPull();
expect(requestedUrl).toContain("include_secret_keys=true");
});
test("omits CLERK_SECRET_KEY when API does not return it", async () => {
const appWithoutSecret = {
application_id: "app_1",
instances: [
{
instance_id: "ins_dev",
environment_type: "development",
publishable_key: "pk_test_abc123",
},
],
};
stubFetch(async () => new Response(JSON.stringify(appWithoutSecret), { status: 200 }));
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await runEnvPull();
const content = await Bun.file(join(tempDir, ".env.local")).text();
expect(content).toContain("CLERK_PUBLISHABLE_KEY=pk_test_abc123");
expect(content).not.toContain("CLERK_SECRET_KEY");
});
test("detects Next.js and uses NEXT_PUBLIC_* key name", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(
join(tempDir, "package.json"),
JSON.stringify({ dependencies: { next: "14.0.0" } }),
);
await runEnvPull();
// Next.js prefers .env.local (always gitignored, per Next.js convention for secrets)
const content = await Bun.file(join(tempDir, ".env.local")).text();
expect(content).toContain("NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_abc123");
// Should NOT have created .env
expect(await Bun.file(join(tempDir, ".env")).exists()).toBe(false);
});
test("Next.js writes to existing .env.local if it already has Clerk keys", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(
join(tempDir, "package.json"),
JSON.stringify({ dependencies: { next: "16.0.0" } }),
);
// Simulate a project that already ran env pull before this change
await Bun.write(
join(tempDir, ".env.local"),
"NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=old_pk\nCLERK_SECRET_KEY=old_sk\n",
);
await runEnvPull();
// Should update .env.local (backwards compat) not create .env
const content = await Bun.file(join(tempDir, ".env.local")).text();
expect(content).toContain("NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_abc123");
expect(content).toContain("CLERK_SECRET_KEY=sk_test_xyz789");
});
test("Nuxt writes to .env", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(
join(tempDir, "package.json"),
JSON.stringify({ dependencies: { nuxt: "4.0.0" } }),
);
await runEnvPull();
const content = await Bun.file(join(tempDir, ".env")).text();
expect(content).toContain("NUXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_abc123");
expect(await Bun.file(join(tempDir, ".env.local")).exists()).toBe(false);
});
test("Vite React writes to .env.local", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(
join(tempDir, "package.json"),
JSON.stringify({ dependencies: { react: "19.0.0" } }),
);
await runEnvPull();
const content = await Bun.file(join(tempDir, ".env.local")).text();
expect(content).toContain("VITE_CLERK_PUBLISHABLE_KEY=pk_test_abc123");
expect(await Bun.file(join(tempDir, ".env")).exists()).toBe(false);
});
test("writes to options.cwd, not process.cwd(), when cwd is passed", async () => {
const projectDir = await mkdtemp(join(tmpdir(), "clerk-env-pull-project-"));
try {
await Bun.write(
join(projectDir, "package.json"),
JSON.stringify({ dependencies: { express: "4.0.0" } }),
);
await setProfile(projectDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await runEnvPull({ cwd: projectDir });
const projectEnv = await Bun.file(join(projectDir, ".env.local")).text();
expect(projectEnv).toContain("CLERK_SECRET_KEY=sk_test_xyz789");
// The process.cwd() directory (tempDir) must not have received keys.
expect(await Bun.file(join(tempDir, ".env.local")).exists()).toBe(false);
} finally {
await rm(projectDir, { recursive: true, force: true });
}
});
test("detects Nuxt and uses NUXT_CLERK_SECRET_KEY", async () => {
await setProfile(tempDir, {
workspaceId: "org_1",
appId: "app_1",
instances: { development: "ins_dev" },
});
await Bun.write(
join(tempDir, "package.json"),
JSON.stringify({ dependencies: { nuxt: "4.0.0" } }),
);
await runEnvPull();
const content = await Bun.file(join(tempDir, ".env")).text();
expect(content).toContain("NUXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_abc123");
expect(content).toContain("NUXT_CLERK_SECRET_KEY=sk_test_xyz789");
expect(content).not.toMatch(/^CLERK_SECRET_KEY=/m);
});
});