@wise/wds-codemods 1.0.0-experimental-792d14d → 1.0.0-experimental-d212448

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,382 @@
1
+ const require_constants = require('./constants-CcE2TmzN.js');
2
+ let node_child_process = require("node:child_process");
3
+ let node_path = require("node:path");
4
+ let _listr2_manager = require("@listr2/manager");
5
+ let node_fs = require("node:fs");
6
+ let listr2 = require("listr2");
7
+ let node_https = require("node:https");
8
+ node_https = require_constants.__toESM(node_https);
9
+ let _anthropic_ai_claude_agent_sdk = require("@anthropic-ai/claude-agent-sdk");
10
+
11
+ //#region src/transforms/list-item/constants.ts
12
+ const CLAUDE_SETTINGS_FILE = ".claude/settings.json";
13
+ const VPN_COUNTDOWN_TIMEOUT = 5;
14
+ const DIRECTORY_CONCURRENCY_LIMIT = 3;
15
+ const FILE_CONCURRENCY_LIMIT = 10;
16
+ const DEPRECATED_COMPONENT_NAMES = [
17
+ "ActionOption",
18
+ "NavigationOption",
19
+ "NavigationOptionList",
20
+ "Summary",
21
+ "SwitchOption",
22
+ "CheckboxOption",
23
+ "RadioOption"
24
+ ];
25
+ const GREP_PATTERN = new RegExp(`import\\s*\\{[\\s\\S]*?(${DEPRECATED_COMPONENT_NAMES.join("|")})[\\s\\S]*?\\}\\s*from\\s*['"]@transferwise/components['"]`, "u");
26
+ const MIGRATION_RULES = `Migration rules:
27
+ # Legacy Component → ListItem Migration Guide
28
+
29
+ ## Universal Rules
30
+
31
+ 1. \`title\` → \`title\` (direct)
32
+ 2. \`content\` or \`description\` → \`subtitle\`
33
+ 3. \`disabled\` stays on \`ListItem\` (not controls)
34
+ 4. Keep HTML attributes (\`id\`, \`name\`, \`aria-label\`), remove: \`as\`, \`complex\`, \`showMediaAtAllSizes\`, \`showMediaCircle\`, \`isContainerAligned\`
35
+ 5. In strings, don't convert \`\`to\`'\`or\`"\`. Preserve what is there.
36
+
37
+ ---
38
+
39
+ ## ActionOption → ListItem.Button
40
+
41
+ - \`action\` → Button children
42
+ - \`onClick\` → Button \`onClick\`
43
+ - Priority: default/\`"primary"\` → \`"primary"\`, \`"secondary"\` → \`"secondary-neutral"\`, \`"secondary-send"\` → \`"secondary"\`, \`"tertiary"\` → \`"tertiary"\`
44
+
45
+ \`\`\`tsx
46
+ <ActionOption title="Title" content="Text" action="Click" priority="secondary" onClick={fn} />
47
+
48
+ <ListItem title="Title" subtitle="Text" control={<ListItem.Button priority="secondary-neutral" onClick={fn}>Click</ListItem.Button>} />
49
+ \`\`\`
50
+
51
+ ---
52
+
53
+ ## CheckboxOption → ListItem.Checkbox
54
+
55
+ - \`onChange\`: \`(checked: boolean)\` → \`(event: ChangeEvent)\` use \`event.target.checked\`
56
+ - \`name\` move to Checkbox
57
+ - Don't move \`id\` to Checkbox
58
+
59
+ \`\`\`tsx
60
+ <CheckboxOption id="x" name="y" title="Title" content="Text" checked={v} onChange={(c) => set(c)} />
61
+
62
+ <ListItem title="Title" subtitle="Text" control={<ListItem.Checkbox name="y" checked={v} onChange={(e) => set(e.target.checked)} />} />
63
+ \`\`\`
64
+
65
+ ---
66
+
67
+ ## RadioOption → ListItem.Radio
68
+
69
+ - \`name\`, \`value\`, \`checked\`, \`onChange\` move to Radio
70
+ - Don't move \`id\` to Radio
71
+
72
+ \`\`\`tsx
73
+ <RadioOption id="x" name="y" value="v" title="Title" content="Text" checked={v==='v'} onChange={set} />
74
+
75
+ <ListItem title="Title" subtitle="Text" control={<ListItem.Radio name="y" value="v" checked={v==='v'} onChange={set} />} />
76
+ \`\`\`
77
+
78
+ ---
79
+
80
+ ## SwitchOption → ListItem.Switch
81
+
82
+ - \`onChange\` → \`onClick\`, toggle manually
83
+ - \`aria-label\` moves to Switch
84
+
85
+ \`\`\`tsx
86
+ <SwitchOption title="Title" content="Text" checked={v} aria-label="Toggle" onChange={set} />
87
+
88
+ <ListItem title="Title" subtitle="Text" control={<ListItem.Switch checked={v} aria-label="Toggle" onClick={() => set(!v)} />} />
89
+ \`\`\`
90
+
91
+ ---
92
+
93
+ ## NavigationOption → ListItem.Navigation
94
+
95
+ - \`onClick\` or \`href\` move to Navigation
96
+
97
+ \`\`\`tsx
98
+ <NavigationOption title="Title" content="Text" onClick={fn} />
99
+
100
+ <ListItem title="Title" subtitle="Text" control={<ListItem.Navigation onClick={fn} />} />
101
+ \`\`\`
102
+
103
+ ---
104
+
105
+ ## Option → ListItem
106
+
107
+ - Wrap \`media\` in \`ListItem.AvatarView\`
108
+
109
+ \`\`\`tsx
110
+ <Option media={<Icon />} title="Title" />
111
+
112
+ <ListItem title="Title" media={<ListItem.AvatarView><Icon /></ListItem.AvatarView>} />
113
+ \`\`\`
114
+
115
+ ---
116
+
117
+ ## Summary → ListItem
118
+
119
+ **Basic:**
120
+
121
+ - \`icon\` → wrap in \`ListItem.AvatarView\` with \`size={32}\` as \`media\`
122
+ - Remove \`size\` from child \`<Icon />\`
123
+
124
+ **Status:**
125
+
126
+ - \`Status.DONE\` → \`badge={{ status: 'positive' }}\`
127
+ - \`Status.PENDING\` → \`badge={{ status: 'pending' }}\`
128
+ - \`Status.NOT_DONE\` → no badge
129
+
130
+ **Action:**
131
+
132
+ - \`action.text\` → \`action.label\` in \`ListItem.AdditionalInfo\` as \`additionalInfo\`
133
+
134
+ **Info (requires state):**
135
+
136
+ - \`MODAL\` → \`ListItem.IconButton partiallyInteractive\` + \`<Modal>\` in \`control\`
137
+ - \`POPOVER\` → \`<Popover>\` wrapping \`ListItem.IconButton partiallyInteractive\` in \`control\`
138
+ - Use \`QuestionMarkCircle\` icon (import from \`@transferwise/icons\`)
139
+
140
+ \`\`\`tsx
141
+ // Basic
142
+ <Summary title="T" description="D" icon={<Icon />} />
143
+
144
+ <ListItem title="T" subtitle="D" media={<ListItem.AvatarView size={32}><Icon /></ListItem.AvatarView>} />
145
+
146
+ // Status
147
+ <Summary title="T" description="D" icon={<Icon />} status={Status.DONE} />
148
+
149
+ <ListItem title="T" subtitle="D" media={<ListItem.AvatarView size={32} badge={{status:'positive'}}><Icon /></ListItem.AvatarView>} />
150
+
151
+ // Action
152
+ <Summary title="T" description="D" icon={<Icon />} action={{text:'Go', href:'/go'}} />
153
+
154
+ <ListItem title="T" subtitle="D" media={<ListItem.AvatarView size={32}><Icon /></ListItem.AvatarView>} additionalInfo={<ListItem.AdditionalInfo action={{label:'Go', href:'/go'}} />} />
155
+
156
+ // Modal (add: const [open, setOpen] = useState(false))
157
+ <Summary title="T" description="D" icon={<Icon />} info={{title:'Help', content:'Text', presentation:'MODAL', 'aria-label':'Info'}} />
158
+
159
+ <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>} />
160
+
161
+ // Popover
162
+ <Summary title="T" description="D" icon={<Icon />} info={{title:'Help', content:'Text', presentation:'POPOVER', 'aria-label':'Info'}} />
163
+
164
+ <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>} />
165
+ \`\`\`
166
+
167
+ `;
168
+ 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'.
169
+
170
+ Rules:
171
+ 1. Only ever modify files via the Edit tool - do not use the Write tool
172
+ 2. When identifying what code to migrate within a file, explain how you identified it first.
173
+ 2. Migrate components per provided migration rules
174
+ 3. Maintain TypeScript type safety and update types to match new API
175
+ 4. Map props: handle renamed, deprecated, new required, and changed types
176
+ 5. Update imports to new WDS components and types
177
+ 6. Preserve code style, formatting, and calculated logic
178
+ 7. Handle conditional rendering, spread props, and complex expressions
179
+ 8. Note: New components may lack feature parity with legacy versions
180
+ 9. Only modify code requiring changes per migration rules, and any impacted surrounding code for context.
181
+ 10. Final result response should just be whether the migration was successful overall, or if any errors were encountered
182
+ - Do not summarise or explain the changes made
183
+ 11. Explain your reasoning and justification before making changes, as you edit each file.
184
+ - Keep it concise and succinct, as only bullet points
185
+ 12. After modifying the file, do not summarise the changes made.
186
+ 13. If you do not have permission to edit a file, still attempt to edit it and then move onto the next file.
187
+
188
+ You'll receive:
189
+ - File paths to migrate in individual queries
190
+ - Deprecated component names at the end of this prompt
191
+ - Migration context and rules for each deprecated component
192
+
193
+ Deprecated components: ${DEPRECATED_COMPONENT_NAMES.join(", ")}.
194
+
195
+ ${MIGRATION_RULES}`;
196
+
197
+ //#endregion
198
+ //#region src/transforms/list-item/helpers.ts
199
+ /** Split the path to get the relative path after the directory, and wrap with ANSI color codes */
200
+ function formatPathOutput(directory, path, asDim) {
201
+ const relativePath = path ? path.split(directory.replace(".", ""))[1] ?? path : directory;
202
+ return asDim ? `\x1b[2m${relativePath}\x1b[0m` : `\x1b[32m${relativePath}\x1b[0m`;
203
+ }
204
+ /** Generates a formatted string representing the total elapsed time since the given start time */
205
+ function generateElapsedTime(startTime) {
206
+ const endTime = Date.now();
207
+ const elapsedTime = Math.floor((endTime - startTime) / 1e3);
208
+ const hours = Math.floor(elapsedTime / 3600);
209
+ const minutes = Math.floor(elapsedTime % 3600 / 60);
210
+ const seconds = elapsedTime % 60;
211
+ return `${hours ? `${hours}h ` : ""}${minutes ? `${minutes}m ` : ""}${seconds ? `${seconds}s` : ""}`;
212
+ }
213
+
214
+ //#endregion
215
+ //#region src/transforms/list-item/claude.ts
216
+ async function checkVPN(baseUrl, task) {
217
+ if (!baseUrl) return;
218
+ const checkOnce = async () => new Promise((resolveCheck) => {
219
+ const url = new URL("/health", baseUrl);
220
+ const req = node_https.default.get(url, {
221
+ timeout: 2e3,
222
+ rejectUnauthorized: false
223
+ }, (res) => {
224
+ const ok = !!(res.statusCode && res.statusCode >= 200 && res.statusCode < 400);
225
+ res.resume();
226
+ resolveCheck(ok);
227
+ });
228
+ req.on("timeout", () => {
229
+ req.destroy(/* @__PURE__ */ new Error("timeout"));
230
+ });
231
+ req.on("error", () => resolveCheck(false));
232
+ });
233
+ while (true) {
234
+ if (await checkOnce()) {
235
+ task.title = "Connected to VPN";
236
+ break;
237
+ }
238
+ for (let countdown = VPN_COUNTDOWN_TIMEOUT; countdown > 0; countdown -= 1) {
239
+ task.output = `Please connect to VPN... retrying in ${countdown}s`;
240
+ await new Promise((response) => {
241
+ setTimeout(response, 1e3);
242
+ });
243
+ }
244
+ }
245
+ }
246
+ function getQueryOptions(sessionId) {
247
+ const claudeSettingsPath = (0, node_path.resolve)(process.env.HOME || "", CLAUDE_SETTINGS_FILE);
248
+ const settings = JSON.parse((0, node_fs.readFileSync)(claudeSettingsPath, "utf-8"));
249
+ let apiKey;
250
+ try {
251
+ apiKey = (0, node_child_process.execSync)(`bash ${settings.apiKeyHelper}`, { encoding: "utf-8" }).trim();
252
+ } catch {}
253
+ 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");
254
+ const { ANTHROPIC_CUSTOM_HEADERS, ...restEnvVars } = settings?.env ?? {};
255
+ return {
256
+ resume: sessionId,
257
+ env: {
258
+ ANTHROPIC_AUTH_TOKEN: apiKey,
259
+ ANTHROPIC_CUSTOM_HEADERS,
260
+ ...restEnvVars,
261
+ PATH: process.env.PATH
262
+ },
263
+ permissionMode: "acceptEdits",
264
+ systemPrompt: {
265
+ type: "preset",
266
+ preset: "claude_code",
267
+ append: SYSTEM_PROMPT
268
+ },
269
+ allowedTools: ["Grep", "Read"],
270
+ settingSources: [
271
+ "local",
272
+ "project",
273
+ "user"
274
+ ]
275
+ };
276
+ }
277
+ /** Initiate a new Claude session/conversation and return reusable options */
278
+ async function initiateClaudeSessionOptions(manager) {
279
+ const options = getQueryOptions(void 0);
280
+ manager.add([{
281
+ title: "Checking VPN connection",
282
+ task: async (_, task) => checkVPN(options.env?.ANTHROPIC_BASE_URL, task)
283
+ }]);
284
+ await manager.runAll();
285
+ manager.add([{
286
+ title: "Starting Claude instance",
287
+ task: async (_, task) => {
288
+ task.output = "Your browser may open for Okta authentication if required";
289
+ const result = (0, _anthropic_ai_claude_agent_sdk.query)({
290
+ options,
291
+ 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.`
292
+ });
293
+ for await (const message of result) switch (message.type) {
294
+ case "system":
295
+ if (message.subtype === "init" && !options.resume) {
296
+ task.title = "Successfully initialised Claude instance\n";
297
+ options.resume = message.session_id;
298
+ }
299
+ break;
300
+ default: if (message.type === "result" && message.subtype !== "success") throw new Error(`Claude encountered an error when initialising: ${message.errors.join("\n")}`);
301
+ }
302
+ task.task.complete();
303
+ }
304
+ }]);
305
+ await manager.runAll().finally(() => {
306
+ manager.options = { concurrent: DIRECTORY_CONCURRENCY_LIMIT };
307
+ });
308
+ return options;
309
+ }
310
+ async function queryClaude(directory, filePath, options, task, isDebug = false) {
311
+ const startTime = Date.now();
312
+ const result = (0, _anthropic_ai_claude_agent_sdk.query)({
313
+ options,
314
+ prompt: filePath
315
+ });
316
+ for await (const message of result) switch (message.type) {
317
+ case "result":
318
+ if (message.subtype === "success" && isDebug) {
319
+ task.title = `\x1b[2m${formatPathOutput(directory, filePath)}\x1b[0m]`;
320
+ task.output = `\x1b[2mMigrated in ${generateElapsedTime(startTime)}\x1b[0m`;
321
+ } else if (message.is_error) {
322
+ task.title = `\x1b[2m${formatPathOutput(directory, filePath)}\x1b[0m]`;
323
+ task.output = `${require_constants.CONSOLE_ICONS.error} Claude encountered an error: ${JSON.stringify(message)}`;
324
+ }
325
+ break;
326
+ default:
327
+ }
328
+ }
329
+
330
+ //#endregion
331
+ //#region src/transforms/list-item/transformer.ts
332
+ const transformer = async (targetPaths, isDebug = false) => {
333
+ process.setMaxListeners(20);
334
+ const startTime = Date.now();
335
+ const manager = new _listr2_manager.Manager({ concurrent: true });
336
+ const queryOptions = await initiateClaudeSessionOptions(manager);
337
+ for (const directory of targetPaths) {
338
+ const matchingFilePaths = (0, node_child_process.execSync)(`find "${directory}" -name "*.tsx" -type f`, { encoding: "utf-8" }).trim().split("\n").filter(Boolean).filter((filePath) => {
339
+ const content = (0, node_fs.readFileSync)(filePath, "utf-8");
340
+ return GREP_PATTERN.test(content);
341
+ });
342
+ if (matchingFilePaths.length === 0) manager.add([{
343
+ title: `\x1b[2m${formatPathOutput(directory)} - No files need migration\x1b[0m`,
344
+ task: (ctx) => {
345
+ ctx.skip = true;
346
+ }
347
+ }]);
348
+ else manager.add([{
349
+ title: `${formatPathOutput(directory)} - Found \x1b[32m${matchingFilePaths.length}\x1b[0m file(s) needing migration`,
350
+ task: async (_ctx, parentTask) => {
351
+ parentTask.title = `${formatPathOutput(directory)} - Migrating \x1b[32m${matchingFilePaths.length}\x1b[0m file(s)...`;
352
+ const completedFilesInDirectory = { count: 0 };
353
+ return parentTask.newListr(matchingFilePaths.map((filePath) => ({
354
+ title: "",
355
+ task: async (_fileCtx, fileTask) => {
356
+ await queryClaude(directory, filePath, queryOptions, fileTask, isDebug).finally(() => {
357
+ completedFilesInDirectory.count += 1;
358
+ const isDim = completedFilesInDirectory.count === matchingFilePaths.length;
359
+ parentTask.title = `${isDim ? "\x1B[2m" : ""}${formatPathOutput(directory)} - Migrated \x1b[32m${completedFilesInDirectory.count}\x1b[0m/\x1b[32m${matchingFilePaths.length}\x1b[0m files${isDim ? "\x1B[0m" : ""}`;
360
+ });
361
+ }
362
+ })), { concurrent: FILE_CONCURRENCY_LIMIT }).run();
363
+ }
364
+ }]);
365
+ }
366
+ await manager.runAll().finally(async () => {
367
+ await new listr2.Listr([{
368
+ title: `Finished migrating - elapsed time: \x1b[32m${generateElapsedTime(startTime)}\x1b[0m `,
369
+ task: async () => {}
370
+ }]).run();
371
+ });
372
+ };
373
+ var transformer_default = transformer;
374
+
375
+ //#endregion
376
+ Object.defineProperty(exports, 'transformer_default', {
377
+ enumerable: true,
378
+ get: function () {
379
+ return transformer_default;
380
+ }
381
+ });
382
+ //# sourceMappingURL=transformer-BBzz1o9D.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformer-BBzz1o9D.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 CLAUDE_SETTINGS_FILE = '.claude/settings.json';\nexport const VPN_COUNTDOWN_TIMEOUT = 5;\nexport const DIRECTORY_CONCURRENCY_LIMIT = 3;\nexport const FILE_CONCURRENCY_LIMIT = 10;\nconst DEPRECATED_COMPONENT_NAMES = [\n 'ActionOption',\n 'NavigationOption',\n 'NavigationOptionList',\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\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 {\n CLAUDE_SETTINGS_FILE,\n DIRECTORY_CONCURRENCY_LIMIT,\n SYSTEM_PROMPT,\n VPN_COUNTDOWN_TIMEOUT,\n} from './constants';\nimport { formatPathOutput, generateElapsedTime } from './helpers';\nimport type { ClaudeSettings } from './types';\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 = VPN_COUNTDOWN_TIMEOUT; 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,uBAAuB;AACpC,MAAa,wBAAwB;AACrC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+I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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('../../constants-CcE2TmzN.js');
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
  /**