@wise/wds-codemods 1.0.0-experimental-7597060 → 1.0.0-experimental-1fe0062
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/README.md +83 -101
- package/dist/{helpers-IFtIGywc.js → helpers-A50d9jU_.js} +368 -365
- package/dist/helpers-A50d9jU_.js.map +1 -0
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/{transformer-DoAMzZmy.js → transformer-DT78W0S6.js} +100 -167
- package/dist/transformer-DT78W0S6.js.map +1 -0
- package/dist/transforms/button/transformer.js +1 -2
- package/dist/transforms/button/transformer.js.map +1 -1
- package/dist/transforms/list-item/transformer.js +1 -2
- package/package.json +5 -4
- package/dist/helpers-IFtIGywc.js.map +0 -1
- package/dist/transformer-DoAMzZmy.js.map +0 -1
|
@@ -1,31 +1,16 @@
|
|
|
1
1
|
const require_constants = require('./constants-CcE2TmzN.js');
|
|
2
2
|
let node_child_process = require("node:child_process");
|
|
3
3
|
let node_path = require("node:path");
|
|
4
|
-
let
|
|
5
|
-
spinnies = require_constants.__toESM(spinnies);
|
|
4
|
+
let _listr2_manager = require("@listr2/manager");
|
|
6
5
|
let node_fs = require("node:fs");
|
|
6
|
+
let listr2 = require("listr2");
|
|
7
7
|
let node_https = require("node:https");
|
|
8
8
|
node_https = require_constants.__toESM(node_https);
|
|
9
|
-
let
|
|
10
|
-
let diff = require("diff");
|
|
9
|
+
let _anthropic_ai_claude_agent_sdk = require("@anthropic-ai/claude-agent-sdk");
|
|
11
10
|
|
|
12
|
-
//#region src/helpers/spinnerLogs.ts
|
|
13
|
-
function logToConsole({ spinnies: spinnies$1, spinnerId, options }) {
|
|
14
|
-
spinnies$1.add(spinnerId, options);
|
|
15
|
-
}
|
|
16
|
-
function logStaticMessage(spinnies$1, message) {
|
|
17
|
-
logToConsole({
|
|
18
|
-
spinnies: spinnies$1,
|
|
19
|
-
spinnerId: `static-message-${Date.now()}-${message.slice(0, 10).replace(/\s+/gu, "-")}-${Math.floor(Math.random() * 1e4)}`,
|
|
20
|
-
options: {
|
|
21
|
-
text: message,
|
|
22
|
-
status: "non-spinnable"
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
11
|
//#region src/transforms/list-item/constants.ts
|
|
12
|
+
const DIRECTORY_CONCURRENCY_LIMIT = 3;
|
|
13
|
+
const FILE_CONCURRENCY_LIMIT = 10;
|
|
29
14
|
const DEPRECATED_COMPONENT_NAMES = [
|
|
30
15
|
"ActionOption",
|
|
31
16
|
"NavigationOption",
|
|
@@ -35,6 +20,7 @@ const DEPRECATED_COMPONENT_NAMES = [
|
|
|
35
20
|
"CheckboxOption",
|
|
36
21
|
"RadioOption"
|
|
37
22
|
];
|
|
23
|
+
const GREP_PATTERN = new RegExp(`import\\s*\\{[\\s\\S]*?(${DEPRECATED_COMPONENT_NAMES.join("|")})[\\s\\S]*?\\}\\s*from\\s*['"]@transferwise/components['"]`, "u");
|
|
38
24
|
const MIGRATION_RULES = `Migration rules:
|
|
39
25
|
# Legacy Component → ListItem Migration Guide
|
|
40
26
|
|
|
@@ -242,74 +228,39 @@ function generateElapsedTime(startTime) {
|
|
|
242
228
|
const seconds = elapsedTime % 60;
|
|
243
229
|
return `${hours ? `${hours}h ` : ""}${minutes ? `${minutes}m ` : ""}${seconds ? `${seconds}s` : ""}`;
|
|
244
230
|
}
|
|
245
|
-
function formatClaudeResponseContent(content) {
|
|
246
|
-
return `\x1b[2m${content.replace(/\*\*(.+?)\*\*/gu, "\x1B[1m$1\x1B[0m\x1B[2m").replace(/`(.+?)`/gu, "\x1B[32m$1\x1B[0m\x1B[2m").split("\n").map((line, index) => index === 0 ? line : ` ${line}`).join("\n")}\x1b[0m`;
|
|
247
|
-
}
|
|
248
|
-
function generateDiff(original, modified) {
|
|
249
|
-
const lines = (0, diff.createPatch)("", original, modified, "", "").trim().split("\n").slice(4).filter((line) => !line.startsWith("\"));
|
|
250
|
-
let oldLineNumber = 0;
|
|
251
|
-
let newLineNumber = 0;
|
|
252
|
-
return lines.map((line) => {
|
|
253
|
-
const trimmedLine = line.trimEnd();
|
|
254
|
-
if (trimmedLine.startsWith("@@")) {
|
|
255
|
-
const match = /@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/u.exec(trimmedLine);
|
|
256
|
-
if (match) {
|
|
257
|
-
oldLineNumber = Number.parseInt(match[1], 10);
|
|
258
|
-
newLineNumber = Number.parseInt(match[2], 10);
|
|
259
|
-
}
|
|
260
|
-
return `\x1b[36m${trimmedLine}\x1b[0m`;
|
|
261
|
-
}
|
|
262
|
-
let linePrefix = "";
|
|
263
|
-
if (trimmedLine.startsWith("+")) {
|
|
264
|
-
linePrefix = `${newLineNumber.toString().padStart(4, " ")} `;
|
|
265
|
-
newLineNumber += 1;
|
|
266
|
-
return `\x1b[32m${linePrefix}${trimmedLine}\x1b[0m`;
|
|
267
|
-
}
|
|
268
|
-
if (trimmedLine.startsWith("-")) {
|
|
269
|
-
linePrefix = `${oldLineNumber.toString().padStart(4, " ")} `;
|
|
270
|
-
oldLineNumber += 1;
|
|
271
|
-
return `\x1b[31m${linePrefix}${trimmedLine}\x1b[0m`;
|
|
272
|
-
}
|
|
273
|
-
linePrefix = `${oldLineNumber.toString().padStart(4, " ")} `;
|
|
274
|
-
oldLineNumber += 1;
|
|
275
|
-
newLineNumber += 1;
|
|
276
|
-
return `${linePrefix}${trimmedLine}`;
|
|
277
|
-
}).join("\n");
|
|
278
|
-
}
|
|
279
231
|
|
|
280
232
|
//#endregion
|
|
281
233
|
//#region src/transforms/list-item/claude.ts
|
|
282
234
|
const CLAUDE_SETTINGS_FILE = ".claude/settings.json";
|
|
283
|
-
async function checkVPN(
|
|
284
|
-
if (baseUrl)
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
resolveCheck(ok);
|
|
295
|
-
});
|
|
296
|
-
req.on("timeout", () => {
|
|
297
|
-
req.destroy(/* @__PURE__ */ new Error("timeout"));
|
|
298
|
-
});
|
|
299
|
-
req.on("error", () => resolveCheck(false));
|
|
235
|
+
async function checkVPN(baseUrl, task) {
|
|
236
|
+
if (!baseUrl) return;
|
|
237
|
+
const checkOnce = async () => new Promise((resolveCheck) => {
|
|
238
|
+
const url = new URL("/health", baseUrl);
|
|
239
|
+
const req = node_https.default.get(url, {
|
|
240
|
+
timeout: 2e3,
|
|
241
|
+
rejectUnauthorized: false
|
|
242
|
+
}, (res) => {
|
|
243
|
+
const ok = !!(res.statusCode && res.statusCode >= 200 && res.statusCode < 400);
|
|
244
|
+
res.resume();
|
|
245
|
+
resolveCheck(ok);
|
|
300
246
|
});
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
247
|
+
req.on("timeout", () => {
|
|
248
|
+
req.destroy(/* @__PURE__ */ new Error("timeout"));
|
|
249
|
+
});
|
|
250
|
+
req.on("error", () => resolveCheck(false));
|
|
251
|
+
});
|
|
252
|
+
while (true) {
|
|
253
|
+
if (await checkOnce()) {
|
|
254
|
+
task.title = "Connected to VPN";
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
for (let countdown = 5; countdown > 0; countdown -= 1) {
|
|
258
|
+
task.output = `Please connect to VPN... retrying in ${countdown}s`;
|
|
307
259
|
await new Promise((response) => {
|
|
308
|
-
setTimeout(response,
|
|
260
|
+
setTimeout(response, 1e3);
|
|
309
261
|
});
|
|
310
262
|
}
|
|
311
263
|
}
|
|
312
|
-
return true;
|
|
313
264
|
}
|
|
314
265
|
function getQueryOptions(sessionId) {
|
|
315
266
|
const claudeSettingsPath = (0, node_path.resolve)(process.env.HOME || "", CLAUDE_SETTINGS_FILE);
|
|
@@ -318,7 +269,7 @@ function getQueryOptions(sessionId) {
|
|
|
318
269
|
try {
|
|
319
270
|
apiKey = (0, node_child_process.execSync)(`bash ${settings.apiKeyHelper}`, { encoding: "utf-8" }).trim();
|
|
320
271
|
} catch {}
|
|
321
|
-
if (!apiKey) throw new Error("Failed to retrieve Anthropic API key. Please check your Claude Code x LLM Gateway configuration - https://transferwise.atlassian.net/wiki/x/_YUe3Q");
|
|
272
|
+
if (!apiKey || !settings.env?.ANTHROPIC_BASE_URL) throw new Error("Failed to retrieve Anthropic API key or Base URL. Please check your Claude Code x LLM Gateway configuration - https://transferwise.atlassian.net/wiki/x/_YUe3Q");
|
|
322
273
|
const { ANTHROPIC_CUSTOM_HEADERS, ...restEnvVars } = settings?.env ?? {};
|
|
323
274
|
return {
|
|
324
275
|
resume: sessionId,
|
|
@@ -343,58 +294,52 @@ function getQueryOptions(sessionId) {
|
|
|
343
294
|
};
|
|
344
295
|
}
|
|
345
296
|
/** Initiate a new Claude session/conversation and return reusable options */
|
|
346
|
-
async function initiateClaudeSessionOptions(
|
|
297
|
+
async function initiateClaudeSessionOptions(manager) {
|
|
347
298
|
const options = getQueryOptions(void 0);
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
299
|
+
manager.add([{
|
|
300
|
+
title: "Checking VPN connection",
|
|
301
|
+
task: async (_, task) => checkVPN(options.env?.ANTHROPIC_BASE_URL, task)
|
|
302
|
+
}]);
|
|
303
|
+
await manager.runAll();
|
|
304
|
+
manager.add([{
|
|
305
|
+
title: "Starting Claude instance",
|
|
306
|
+
task: async (_, task) => {
|
|
307
|
+
task.output = "Your browser may open for Okta authentication if required";
|
|
308
|
+
const result = (0, _anthropic_ai_claude_agent_sdk.query)({
|
|
309
|
+
options,
|
|
310
|
+
prompt: `You'll be given file paths in additional individual queries to search in for files using deprecated Wise Design System (WDS) components. Migrate the code per the provided migration rules.`
|
|
311
|
+
});
|
|
312
|
+
for await (const message of result) switch (message.type) {
|
|
313
|
+
case "system":
|
|
314
|
+
if (message.subtype === "init" && !options.resume) {
|
|
315
|
+
task.title = "Successfully initialised Claude instance\n";
|
|
316
|
+
options.resume = message.session_id;
|
|
317
|
+
}
|
|
318
|
+
break;
|
|
319
|
+
default: if (message.type === "result" && message.subtype !== "success") throw new Error(`Claude encountered an error when initialising: ${message.errors.join("\n")}`);
|
|
360
320
|
}
|
|
361
|
-
|
|
362
|
-
default: if (message.type === "result" && message.subtype !== "success") {
|
|
363
|
-
spinnies$1.fail("claudeSession", { text: `Claude encountered an error when initialising: ${message.errors.join("\n")}` });
|
|
364
|
-
spinnies$1.stopAll("fail");
|
|
321
|
+
task.task.complete();
|
|
365
322
|
}
|
|
366
|
-
}
|
|
323
|
+
}]);
|
|
324
|
+
await manager.runAll().finally(() => {
|
|
325
|
+
manager.options = { concurrent: DIRECTORY_CONCURRENCY_LIMIT };
|
|
326
|
+
});
|
|
367
327
|
return options;
|
|
368
328
|
}
|
|
369
|
-
async function queryClaude(directory, filePath, options,
|
|
329
|
+
async function queryClaude(directory, filePath, options, task, isDebug = false) {
|
|
370
330
|
const startTime = Date.now();
|
|
371
|
-
const
|
|
372
|
-
const result = (0, __anthropic_ai_claude_agent_sdk.query)({
|
|
331
|
+
const result = (0, _anthropic_ai_claude_agent_sdk.query)({
|
|
373
332
|
options,
|
|
374
333
|
prompt: filePath
|
|
375
334
|
});
|
|
376
335
|
for await (const message of result) switch (message.type) {
|
|
377
|
-
case "assistant":
|
|
378
|
-
for (const msg of message.message.content) switch (msg.type) {
|
|
379
|
-
case "tool_use":
|
|
380
|
-
if (msg.name === "Read") {
|
|
381
|
-
spinnies$1.remove("placeholder");
|
|
382
|
-
spinnies$1.update(`file-${filePath}`, { text: `${formatPathOutput(directory, filePath, true)} - Reading...` });
|
|
383
|
-
} else if (msg.name === "Edit") spinnies$1.update(`file-${filePath}`, { text: `${formatPathOutput(directory, filePath, true)} - Migrating...` });
|
|
384
|
-
break;
|
|
385
|
-
case "text":
|
|
386
|
-
if (isDebug) logStaticMessage(debugSpinnies, `${require_constants.CONSOLE_ICONS.claude} ${formatClaudeResponseContent(msg.text)}`);
|
|
387
|
-
break;
|
|
388
|
-
default:
|
|
389
|
-
}
|
|
390
|
-
break;
|
|
391
336
|
case "result":
|
|
392
|
-
if (message.subtype === "success"
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
337
|
+
if (message.subtype === "success" && isDebug) {
|
|
338
|
+
task.title = `\x1b[2m${formatPathOutput(directory, filePath)}\x1b[0m]`;
|
|
339
|
+
task.output = `\x1b[2mMigrated in ${generateElapsedTime(startTime)}\x1b[0m`;
|
|
340
|
+
} else if (message.is_error) {
|
|
341
|
+
task.title = `\x1b[2m${formatPathOutput(directory, filePath)}\x1b[0m]`;
|
|
342
|
+
task.output = `${require_constants.CONSOLE_ICONS.error} Claude encountered an error: ${JSON.stringify(message)}`;
|
|
398
343
|
}
|
|
399
344
|
break;
|
|
400
345
|
default:
|
|
@@ -403,57 +348,45 @@ async function queryClaude(directory, filePath, options, codemodOptions, spinnie
|
|
|
403
348
|
|
|
404
349
|
//#endregion
|
|
405
350
|
//#region src/transforms/list-item/transformer.ts
|
|
406
|
-
const transformer = async (targetPaths,
|
|
351
|
+
const transformer = async (targetPaths, isDebug = false) => {
|
|
352
|
+
process.setMaxListeners(20);
|
|
407
353
|
const startTime = Date.now();
|
|
408
|
-
const
|
|
409
|
-
const queryOptions = await initiateClaudeSessionOptions(
|
|
410
|
-
spinnies$1.remove("placeholder");
|
|
411
|
-
spinnies$1.add("analysing", { text: "Analysing targetted paths - this may take a while..." });
|
|
354
|
+
const manager = new _listr2_manager.Manager({ concurrent: true });
|
|
355
|
+
const queryOptions = await initiateClaudeSessionOptions(manager);
|
|
412
356
|
for (const directory of targetPaths) {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
357
|
+
const matchingFilePaths = (0, node_child_process.execSync)(`find "${directory}" -name "*.tsx" -type f`, { encoding: "utf-8" }).trim().split("\n").filter(Boolean).filter((filePath) => {
|
|
358
|
+
const content = (0, node_fs.readFileSync)(filePath, "utf-8");
|
|
359
|
+
return GREP_PATTERN.test(content);
|
|
416
360
|
});
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
const content = (0, node_fs.readFileSync)(filePath, "utf-8");
|
|
422
|
-
return grepPattern.test(content);
|
|
423
|
-
} catch {
|
|
424
|
-
return false;
|
|
361
|
+
if (matchingFilePaths.length === 0) manager.add([{
|
|
362
|
+
title: `\x1b[2m${formatPathOutput(directory)} - No files need migration\x1b[0m`,
|
|
363
|
+
task: (ctx) => {
|
|
364
|
+
ctx.skip = true;
|
|
425
365
|
}
|
|
426
|
-
});
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
logStaticMessage(spinnies$1, generateDiff(originalFileContent, newFileContent));
|
|
366
|
+
}]);
|
|
367
|
+
else manager.add([{
|
|
368
|
+
title: `${formatPathOutput(directory)} - Found \x1b[32m${matchingFilePaths.length}\x1b[0m file(s) needing migration`,
|
|
369
|
+
task: async (_ctx, parentTask) => {
|
|
370
|
+
parentTask.title = `${formatPathOutput(directory)} - Migrating \x1b[32m${matchingFilePaths.length}\x1b[0m file(s)...`;
|
|
371
|
+
const completedFilesInDirectory = { count: 0 };
|
|
372
|
+
return parentTask.newListr(matchingFilePaths.map((filePath) => ({
|
|
373
|
+
title: "",
|
|
374
|
+
task: async (_fileCtx, fileTask) => {
|
|
375
|
+
await queryClaude(directory, filePath, queryOptions, fileTask, isDebug).finally(() => {
|
|
376
|
+
completedFilesInDirectory.count += 1;
|
|
377
|
+
const isDim = completedFilesInDirectory.count === matchingFilePaths.length;
|
|
378
|
+
parentTask.title = `${isDim ? "\x1B[2m" : ""}${formatPathOutput(directory)} - Migrated \x1b[32m${completedFilesInDirectory.count}\x1b[0m/\x1b[32m${matchingFilePaths.length}\x1b[0m files${isDim ? "\x1B[0m" : ""}`;
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
})), { concurrent: FILE_CONCURRENCY_LIMIT }).run();
|
|
443
382
|
}
|
|
444
|
-
|
|
445
|
-
}
|
|
446
|
-
if (matchingFilePaths.length === 0) spinnies$1.succeed(`directory-${directory}`, { text: `${formatPathOutput(directory)} - No files need migration` });
|
|
447
|
-
else spinnies$1.succeed(`directory-${directory}`, {
|
|
448
|
-
indent: 2,
|
|
449
|
-
text: `${formatPathOutput(directory)} - Migrated \x1b[32m${matchingFilePaths.length}\x1b[0m file(s) successfully`
|
|
450
|
-
});
|
|
383
|
+
}]);
|
|
451
384
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
385
|
+
await manager.runAll().finally(async () => {
|
|
386
|
+
await new listr2.Listr([{
|
|
387
|
+
title: `Finished migrating - elapsed time: \x1b[32m${generateElapsedTime(startTime)}\x1b[0m `,
|
|
388
|
+
task: async () => {}
|
|
389
|
+
}]).run();
|
|
457
390
|
});
|
|
458
391
|
};
|
|
459
392
|
var transformer_default = transformer;
|
|
@@ -465,4 +398,4 @@ Object.defineProperty(exports, 'transformer_default', {
|
|
|
465
398
|
return transformer_default;
|
|
466
399
|
}
|
|
467
400
|
});
|
|
468
|
-
//# sourceMappingURL=transformer-
|
|
401
|
+
//# sourceMappingURL=transformer-DT78W0S6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformer-DT78W0S6.js","names":["https","CONSOLE_ICONS","Manager","Listr"],"sources":["../src/transforms/list-item/constants.ts","../src/transforms/list-item/helpers.ts","../src/transforms/list-item/claude.ts","../src/transforms/list-item/transformer.ts"],"sourcesContent":["export const DIRECTORY_CONCURRENCY_LIMIT = 3;\nexport const FILE_CONCURRENCY_LIMIT = 10;\nconst DEPRECATED_COMPONENT_NAMES = [\n 'ActionOption',\n 'NavigationOption',\n 'NavigationOptionsList',\n 'Summary',\n 'SwitchOption',\n 'CheckboxOption',\n 'RadioOption',\n];\nexport const GREP_PATTERN = new RegExp(\n `import\\\\s*\\\\{[\\\\s\\\\S]*?(${DEPRECATED_COMPONENT_NAMES.join('|')})[\\\\s\\\\S]*?\\\\}\\\\s*from\\\\s*['\"]@transferwise/components['\"]`,\n 'u',\n);\n\nconst MIGRATION_RULES = `Migration rules:\n# Legacy Component → ListItem Migration Guide\n\n## Universal Rules\n\n1. \\`title\\` → \\`title\\` (direct)\n2. \\`content\\` or \\`description\\` → \\`subtitle\\`\n3. \\`disabled\\` stays on \\`ListItem\\` (not controls)\n4. Keep HTML attributes (\\`id\\`, \\`name\\`, \\`aria-label\\`), remove: \\`as\\`, \\`complex\\`, \\`showMediaAtAllSizes\\`, \\`showMediaCircle\\`, \\`isContainerAligned\\`\n5. In strings, don't convert \\`\\`to\\`'\\`or\\`\"\\`. Preserve what is there.\n\n---\n\n## ActionOption → ListItem.Button\n\n- \\`action\\` → Button children\n- \\`onClick\\` → Button \\`onClick\\`\n- Priority: default/\\`\"primary\"\\` → \\`\"primary\"\\`, \\`\"secondary\"\\` → \\`\"secondary-neutral\"\\`, \\`\"secondary-send\"\\` → \\`\"secondary\"\\`, \\`\"tertiary\"\\` → \\`\"tertiary\"\\`\n\n\\`\\`\\`tsx\n<ActionOption title=\"Title\" content=\"Text\" action=\"Click\" priority=\"secondary\" onClick={fn} />\n→\n<ListItem title=\"Title\" subtitle=\"Text\" control={<ListItem.Button priority=\"secondary-neutral\" onClick={fn}>Click</ListItem.Button>} />\n\\`\\`\\`\n\n---\n\n## CheckboxOption → ListItem.Checkbox\n\n- \\`onChange\\`: \\`(checked: boolean)\\` → \\`(event: ChangeEvent)\\` use \\`event.target.checked\\`\n- \\`name\\` move to Checkbox\n- Don't move \\`id\\` to Checkbox\n\n\\`\\`\\`tsx\n<CheckboxOption id=\"x\" name=\"y\" title=\"Title\" content=\"Text\" checked={v} onChange={(c) => set(c)} />\n→\n<ListItem title=\"Title\" subtitle=\"Text\" control={<ListItem.Checkbox name=\"y\" checked={v} onChange={(e) => set(e.target.checked)} />} />\n\\`\\`\\`\n\n---\n\n## RadioOption → ListItem.Radio\n\n- \\`name\\`, \\`value\\`, \\`checked\\`, \\`onChange\\` move to Radio\n- Don't move \\`id\\` to Radio\n\n\\`\\`\\`tsx\n<RadioOption id=\"x\" name=\"y\" value=\"v\" title=\"Title\" content=\"Text\" checked={v==='v'} onChange={set} />\n→\n<ListItem title=\"Title\" subtitle=\"Text\" control={<ListItem.Radio name=\"y\" value=\"v\" checked={v==='v'} onChange={set} />} />\n\\`\\`\\`\n\n---\n\n## SwitchOption → ListItem.Switch\n\n- \\`onChange\\` → \\`onClick\\`, toggle manually\n- \\`aria-label\\` moves to Switch\n\n\\`\\`\\`tsx\n<SwitchOption title=\"Title\" content=\"Text\" checked={v} aria-label=\"Toggle\" onChange={set} />\n→\n<ListItem title=\"Title\" subtitle=\"Text\" control={<ListItem.Switch checked={v} aria-label=\"Toggle\" onClick={() => set(!v)} />} />\n\\`\\`\\`\n\n---\n\n## NavigationOption → ListItem.Navigation\n\n- \\`onClick\\` or \\`href\\` move to Navigation\n\n\\`\\`\\`tsx\n<NavigationOption title=\"Title\" content=\"Text\" onClick={fn} />\n→\n<ListItem title=\"Title\" subtitle=\"Text\" control={<ListItem.Navigation onClick={fn} />} />\n\\`\\`\\`\n\n---\n\n## Option → ListItem\n\n- Wrap \\`media\\` in \\`ListItem.AvatarView\\`\n\n\\`\\`\\`tsx\n<Option media={<Icon />} title=\"Title\" />\n→\n<ListItem title=\"Title\" media={<ListItem.AvatarView><Icon /></ListItem.AvatarView>} />\n\\`\\`\\`\n\n---\n\n## Summary → ListItem\n\n**Basic:**\n\n- \\`icon\\` → wrap in \\`ListItem.AvatarView\\` with \\`size={32}\\` as \\`media\\`\n- Remove \\`size\\` from child \\`<Icon />\\`\n\n**Status:**\n\n- \\`Status.DONE\\` → \\`badge={{ status: 'positive' }}\\`\n- \\`Status.PENDING\\` → \\`badge={{ status: 'pending' }}\\`\n- \\`Status.NOT_DONE\\` → no badge\n\n**Action:**\n\n- \\`action.text\\` → \\`action.label\\` in \\`ListItem.AdditionalInfo\\` as \\`additionalInfo\\`\n\n**Info (requires state):**\n\n- \\`MODAL\\` → \\`ListItem.IconButton partiallyInteractive\\` + \\`<Modal>\\` in \\`control\\`\n- \\`POPOVER\\` → \\`<Popover>\\` wrapping \\`ListItem.IconButton partiallyInteractive\\` in \\`control\\`\n- Use \\`QuestionMarkCircle\\` icon (import from \\`@transferwise/icons\\`)\n\n\\`\\`\\`tsx\n// Basic\n<Summary title=\"T\" description=\"D\" icon={<Icon />} />\n→\n<ListItem title=\"T\" subtitle=\"D\" media={<ListItem.AvatarView size={32}><Icon /></ListItem.AvatarView>} />\n\n// Status\n<Summary title=\"T\" description=\"D\" icon={<Icon />} status={Status.DONE} />\n→\n<ListItem title=\"T\" subtitle=\"D\" media={<ListItem.AvatarView size={32} badge={{status:'positive'}}><Icon /></ListItem.AvatarView>} />\n\n// Action\n<Summary title=\"T\" description=\"D\" icon={<Icon />} action={{text:'Go', href:'/go'}} />\n→\n<ListItem title=\"T\" subtitle=\"D\" media={<ListItem.AvatarView size={32}><Icon /></ListItem.AvatarView>} additionalInfo={<ListItem.AdditionalInfo action={{label:'Go', href:'/go'}} />} />\n\n// Modal (add: const [open, setOpen] = useState(false))\n<Summary title=\"T\" description=\"D\" icon={<Icon />} info={{title:'Help', content:'Text', presentation:'MODAL', 'aria-label':'Info'}} />\n→\n<ListItem title=\"T\" subtitle=\"D\" media={<ListItem.AvatarView size={32}><Icon /></ListItem.AvatarView>} control={<ListItem.IconButton partiallyInteractive aria-label=\"Info\" onClick={()=>setOpen(!open)}><QuestionMarkCircle /><Modal open={open} title=\"Help\" body=\"Text\" onClose={()=>setOpen(false)} /></ListItem.IconButton>} />\n\n// Popover\n<Summary title=\"T\" description=\"D\" icon={<Icon />} info={{title:'Help', content:'Text', presentation:'POPOVER', 'aria-label':'Info'}} />\n→\n<ListItem title=\"T\" subtitle=\"D\" media={<ListItem.AvatarView size={32}><Icon /></ListItem.AvatarView>} control={<Popover title=\"Help\" content=\"Text\" onClose={()=>setOpen(false)}><ListItem.IconButton partiallyInteractive aria-label=\"Info\"><QuestionMarkCircle /></ListItem.IconButton></Popover>} />\n\\`\\`\\`\n\n---\n\n## DefinitionList → Multiple ListItem\n\n- Array → individual \\`ListItem\\`s\n- \\`value\\` → \\`subtitle\\`\n- \\`key\\` → React \\`key\\` prop\n- Action type: \"Edit\"/\"Update\"/\"View\" → \\`ListItem.Button priority=\"secondary-neutral\"\\`, \"Change\"/\"Password\" → \\`ListItem.Navigation\\`, \"Copy\" → \\`ListItem.IconButton\\`\n\n\\`\\`\\`tsx\n<DefinitionList definitions={[\n {title:'T1', value:'V1', key:'k1'},\n {title:'T2', value:'V2', key:'k2', action:{label:'Edit', onClick:fn}}\n]} />\n→\n\n <ListItem key=\"k1\" title=\"T1\" subtitle=\"V1\" />\n <ListItem key=\"k2\" title=\"T2\" subtitle=\"V2\" control={<ListItem.Button priority=\"secondary-neutral\" onClick={fn}>Edit</ListItem.Button>} />\n\n\\`\\`\\`\n`;\n\nexport const SYSTEM_PROMPT = `You are a code migration assistant that helps migrate TypeScript/JSX code from deprecated Wise Design System (WDS) components to the new ListItem component and ListItem subcomponents from '@transferwise/components'.\n\nRules:\n1. Only ever modify files via the Edit tool - do not use the Write tool\n2. When identifying what code to migrate within a file, explain how you identified it first.\n2. Migrate components per provided migration rules\n3. Maintain TypeScript type safety and update types to match new API\n4. Map props: handle renamed, deprecated, new required, and changed types\n5. Update imports to new WDS components and types\n6. Preserve code style, formatting, and calculated logic\n7. Handle conditional rendering, spread props, and complex expressions\n8. Note: New components may lack feature parity with legacy versions\n9. Only modify code requiring changes per migration rules, and any impacted surrounding code for context.\n10. Final result response should just be whether the migration was successful overall, or if any errors were encountered\n - Do not summarise or explain the changes made\n11. Explain your reasoning and justification before making changes, as you edit each file.\n - Keep it concise and succinct, as only bullet points\n12. After modifying the file, do not summarise the changes made.\n13. If you do not have permission to edit a file, still attempt to edit it and then move onto the next file.\n\nYou'll receive:\n- File paths to migrate in individual queries\n- Deprecated component names at the end of this prompt\n- Migration context and rules for each deprecated component\n\nDeprecated components: ${DEPRECATED_COMPONENT_NAMES.join(', ')}.\n\n${MIGRATION_RULES}`;\n","/** Split the path to get the relative path after the directory, and wrap with ANSI color codes */\nexport function formatPathOutput(directory: string, path?: string, asDim?: boolean): string {\n const relativePath = path ? (path.split(directory.replace('.', ''))[1] ?? path) : directory;\n return asDim ? `\\x1b[2m${relativePath}\\x1b[0m` : `\\x1b[32m${relativePath}\\x1b[0m`;\n}\n\n/** Generates a formatted string representing the total elapsed time since the given start time */\nexport function generateElapsedTime(startTime: number): string {\n const endTime = Date.now();\n const elapsedTime = Math.floor((endTime - startTime) / 1000);\n const hours = Math.floor(elapsedTime / 3600);\n const minutes = Math.floor((elapsedTime % 3600) / 60);\n const seconds = elapsedTime % 60;\n\n return `${hours ? `${hours}h ` : ''}${minutes ? `${minutes}m ` : ''}${seconds ? `${seconds}s` : ''}`;\n}\n","/* eslint-disable no-param-reassign */\nimport https from 'node:https';\n\nimport { type Options, query } from '@anthropic-ai/claude-agent-sdk';\nimport type { Manager } from '@listr2/manager';\nimport { execSync } from 'child_process';\nimport { readFileSync } from 'fs';\nimport type { DefaultRenderer, ListrTaskWrapper, SimpleRenderer } from 'listr2';\nimport { resolve } from 'path';\n\nimport { CONSOLE_ICONS } from '../../constants';\nimport { DIRECTORY_CONCURRENCY_LIMIT, SYSTEM_PROMPT } from './constants';\nimport { formatPathOutput, generateElapsedTime } from './helpers';\nimport type { ClaudeSettings } from './types';\n\nconst CLAUDE_SETTINGS_FILE = '.claude/settings.json';\n\nasync function checkVPN(\n baseUrl: string | undefined,\n task: ListrTaskWrapper<never, typeof DefaultRenderer, typeof SimpleRenderer>,\n): Promise<void> {\n if (!baseUrl) return;\n\n const checkOnce = async (): Promise<boolean> =>\n new Promise<boolean>((resolveCheck) => {\n const url = new URL('/health', baseUrl);\n const req = https.get(url, { timeout: 2000, rejectUnauthorized: false }, (res) => {\n const ok = !!(res.statusCode && res.statusCode >= 200 && res.statusCode < 400);\n res.resume();\n resolveCheck(ok);\n });\n req.on('timeout', () => {\n req.destroy(new Error('timeout'));\n });\n req.on('error', () => resolveCheck(false));\n });\n\n while (true) {\n const ok = await checkOnce();\n if (ok) {\n task.title = 'Connected to VPN';\n break;\n }\n\n // Countdown from 5s\n for (let countdown = 5; countdown > 0; countdown -= 1) {\n task.output = `Please connect to VPN... retrying in ${countdown}s`;\n await new Promise<void>((response) => {\n setTimeout(response, 1000);\n });\n }\n }\n}\n\nexport function getQueryOptions(sessionId?: string): Options {\n // Read settings from ~/.claude/settings.json to get headers and apiKeyHelper\n const claudeSettingsPath = resolve(process.env.HOME || '', CLAUDE_SETTINGS_FILE);\n const settings = JSON.parse(readFileSync(claudeSettingsPath, 'utf-8')) as ClaudeSettings;\n\n // Get API key by executing the apiKeyHelper script, for authenticating with Okta via LLM Gateway\n let apiKey;\n try {\n apiKey = execSync(`bash ${settings.apiKeyHelper}`, {\n encoding: 'utf-8',\n }).trim();\n } catch {}\n\n if (!apiKey || !settings.env?.ANTHROPIC_BASE_URL) {\n throw new Error(\n 'Failed to retrieve Anthropic API key or Base URL. Please check your Claude Code x LLM Gateway configuration - https://transferwise.atlassian.net/wiki/x/_YUe3Q',\n );\n }\n\n const { ANTHROPIC_CUSTOM_HEADERS, ...restEnvVars } = settings?.env ?? {};\n\n const envVars = {\n ANTHROPIC_AUTH_TOKEN: apiKey,\n ANTHROPIC_CUSTOM_HEADERS,\n ...restEnvVars,\n PATH: process.env.PATH, // Specifying PATH, as Claude Agent SDK seems to struggle consuming the actual environment PATH\n };\n\n return {\n resume: sessionId,\n env: envVars,\n permissionMode: 'acceptEdits',\n systemPrompt: {\n type: 'preset',\n preset: 'claude_code',\n append: SYSTEM_PROMPT,\n },\n allowedTools: ['Grep', 'Read'],\n settingSources: ['local', 'project', 'user'],\n };\n}\n\n/** Initiate a new Claude session/conversation and return reusable options */\nexport async function initiateClaudeSessionOptions(manager: Manager): Promise<Options> {\n const options = getQueryOptions(undefined);\n\n manager.add([\n {\n title: 'Checking VPN connection',\n task: async (\n _,\n task: ListrTaskWrapper<never, typeof DefaultRenderer, typeof SimpleRenderer>,\n ) => checkVPN(options.env?.ANTHROPIC_BASE_URL, task),\n },\n ]);\n\n await manager.runAll();\n\n manager.add([\n {\n title: 'Starting Claude instance',\n task: async (_, task) => {\n task.output = 'Your browser may open for Okta authentication if required';\n\n const result = query({\n options,\n prompt: `You'll be given file paths in additional individual queries to search in for files using deprecated Wise Design System (WDS) components. Migrate the code per the provided migration rules.`,\n });\n\n for await (const message of result) {\n switch (message.type) {\n case 'system':\n if (message.subtype === 'init' && !options.resume) {\n task.title = 'Successfully initialised Claude instance\\n';\n // Set the session ID to resume the conversation in future queries\n options.resume = message.session_id;\n }\n break;\n default:\n if (message.type === 'result' && message.subtype !== 'success') {\n throw new Error(\n `Claude encountered an error when initialising: ${message.errors.join('\\n')}`,\n );\n }\n }\n }\n\n task.task.complete();\n },\n },\n ]);\n\n await manager.runAll().finally(() => {\n // Set manager to run tasks concurrently, once initialisation steps are done\n manager.options = {\n concurrent: DIRECTORY_CONCURRENCY_LIMIT,\n };\n });\n\n return options;\n}\n\n// Queries Claude with the given path and handles logging of tool uses and results\nexport async function queryClaude(\n directory: string,\n filePath: string,\n options: Options,\n task: ListrTaskWrapper<never, typeof DefaultRenderer, typeof SimpleRenderer>,\n isDebug = false,\n) {\n const startTime = Date.now();\n const result = query({\n options,\n prompt: filePath,\n });\n\n for await (const message of result) {\n switch (message.type) {\n case 'result':\n if (message.subtype === 'success' && isDebug) {\n task.title = `\\x1b[2m${formatPathOutput(directory, filePath)}\\x1b[0m]`;\n task.output = `\\x1b[2mMigrated in ${generateElapsedTime(startTime)}\\x1b[0m`;\n } else if (message.is_error) {\n task.title = `\\x1b[2m${formatPathOutput(directory, filePath)}\\x1b[0m]`;\n task.output = `${CONSOLE_ICONS.error} Claude encountered an error: ${JSON.stringify(message)}`;\n }\n break;\n default:\n }\n }\n}\n","/* eslint-disable no-param-reassign */\n/* eslint-disable no-underscore-dangle */\nimport { Manager } from '@listr2/manager';\nimport { execSync } from 'child_process';\nimport { readFileSync } from 'fs';\nimport {\n type DefaultRenderer,\n Listr,\n type ListrTask,\n type ListrTaskWrapper,\n type SimpleRenderer,\n} from 'listr2';\n\nimport { initiateClaudeSessionOptions, queryClaude } from './claude';\nimport { FILE_CONCURRENCY_LIMIT, GREP_PATTERN } from './constants';\nimport { formatPathOutput, generateElapsedTime } from './helpers';\n\nconst transformer = async (targetPaths: string[], isDebug = false) => {\n process.setMaxListeners(20); // Resolves potential memory issues with how Claude handles it's own event listeners\n const startTime = Date.now();\n // Create manager for handling multiple listr instances\n const manager = new Manager({\n concurrent: true,\n });\n const queryOptions = await initiateClaudeSessionOptions(manager);\n\n // Process each directory\n for (const directory of targetPaths) {\n // Find all .tsx files in the directory\n const allTsxFiles = execSync(`find \"${directory}\" -name \"*.tsx\" -type f`, {\n encoding: 'utf-8',\n })\n .trim()\n .split('\\n')\n .filter(Boolean);\n\n // Filter files that match the pattern by reading and testing each file\n const matchingFilePaths = allTsxFiles.filter((filePath) => {\n const content = readFileSync(filePath, 'utf-8');\n return GREP_PATTERN.test(content);\n });\n\n // No files to process in this directory, so we add a task that's immediately skipped\n if (matchingFilePaths.length === 0) {\n manager.add([\n {\n title: `\\x1b[2m${formatPathOutput(directory)} - No files need migration\\x1b[0m`,\n task: (ctx: ListrTask): void => {\n ctx.skip = true;\n },\n },\n ]);\n } else {\n manager.add([\n {\n title: `${formatPathOutput(directory)} - Found \\x1b[32m${matchingFilePaths.length}\\x1b[0m file(s) needing migration`,\n task: async (_ctx, parentTask) => {\n parentTask.title = `${formatPathOutput(directory)} - Migrating \\x1b[32m${matchingFilePaths.length}\\x1b[0m file(s)...`;\n const completedFilesInDirectory = { count: 0 };\n return parentTask\n .newListr(\n matchingFilePaths.map((filePath) => ({\n title: '', // No title so it runs in the background without any console output\n task: async (\n _fileCtx,\n fileTask: ListrTaskWrapper<\n never,\n typeof DefaultRenderer,\n typeof SimpleRenderer\n >,\n ) => {\n await queryClaude(directory, filePath, queryOptions, fileTask, isDebug).finally(\n () => {\n // Update parent task title with progress for each completed file migration\n completedFilesInDirectory.count += 1;\n const isDim = completedFilesInDirectory.count === matchingFilePaths.length;\n parentTask.title = `${isDim ? '\\x1b[2m' : ''}${formatPathOutput(directory)} - Migrated \\x1b[32m${completedFilesInDirectory.count}\\x1b[0m/\\x1b[32m${matchingFilePaths.length}\\x1b[0m files${isDim ? '\\x1b[0m' : ''}`;\n },\n );\n },\n })),\n { concurrent: FILE_CONCURRENCY_LIMIT },\n )\n .run();\n },\n },\n ]);\n }\n }\n\n // Run all directory tasks, with final follow up/summary task\n await manager.runAll().finally(async () => {\n await new Listr([\n {\n title: `Finished migrating - elapsed time: \\x1b[32m${generateElapsedTime(startTime)}\\x1b[0m `,\n task: async () => {\n // Task completes immediately\n },\n },\n ]).run();\n });\n};\n\nexport default transformer;\n"],"mappings":";;;;;;;;;;;AAAA,MAAa,8BAA8B;AAC3C,MAAa,yBAAyB;AACtC,MAAM,6BAA6B;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AACD,MAAa,eAAe,IAAI,OAC9B,2BAA2B,2BAA2B,KAAK,IAAI,CAAC,6DAChE,IACD;AAED,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmK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AAU,CAAC;GAC7C,OAAO,QAAyB;AAC9B,QAAI,OAAO;;GAEd,CACF,CAAC;MAEF,SAAQ,IAAI,CACV;GACE,OAAO,GAAG,iBAAiB,UAAU,CAAC,mBAAmB,kBAAkB,OAAO;GAClF,MAAM,OAAO,MAAM,eAAe;AAChC,eAAW,QAAQ,GAAG,iBAAiB,UAAU,CAAC,uBAAuB,kBAAkB,OAAO;IAClG,MAAM,4BAA4B,EAAE,OAAO,GAAG;AAC9C,WAAO,WACJ,SACC,kBAAkB,KAAK,cAAc;KACnC,OAAO;KACP,MAAM,OACJ,UACA,aAKG;AACH,YAAM,YAAY,WAAW,UAAU,cAAc,UAAU,QAAQ,CAAC,cAChE;AAEJ,iCAA0B,SAAS;OACnC,MAAM,QAAQ,0BAA0B,UAAU,kBAAkB;AACpE,kBAAW,QAAQ,GAAG,QAAQ,YAAY,KAAK,iBAAiB,UAAU,CAAC,sBAAsB,0BAA0B,MAAM,kBAAkB,kBAAkB,OAAO,eAAe,QAAQ,YAAY;QAElN;;KAEJ,EAAE,EACH,EAAE,YAAY,wBAAwB,CACvC,CACA,KAAK;;GAEX,CACF,CAAC;;AAKN,OAAM,QAAQ,QAAQ,CAAC,QAAQ,YAAY;AACzC,QAAM,IAAIC,aAAM,CACd;GACE,OAAO,8CAA8C,oBAAoB,UAAU,CAAC;GACpF,MAAM,YAAY;GAGnB,CACF,CAAC,CAAC,KAAK;GACR;;AAGJ,0BAAe"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
require('../../
|
|
3
|
-
const require_helpers = require('../../helpers-IFtIGywc.js');
|
|
2
|
+
const require_helpers = require('../../helpers-A50d9jU_.js');
|
|
4
3
|
|
|
5
4
|
//#region src/helpers/addImport.ts
|
|
6
5
|
/**
|