Fix import paths in scripts/dev/.ts files. These were moved from scripts/ to…
- User
Fix import paths in scripts/dev/*.ts files. These were moved from scripts/ to scripts/dev/.
Context
The repo root is C:\Users\nicolas\Documents\GitHub\bballgenius
- Previously at: scripts/capture-frames.ts, scripts/capture-spans-dump.ts, scripts/sync-keyboard-map.ts
- Now at: scripts/dev/capture-frames.ts, scripts/dev/capture-spans-dump.ts, scripts/dev/sync-keyboard-map.ts
..from scripts/ = repo root../..from scripts/dev/ = repo root
Files to fix
1. scripts/dev/sync-keyboard-map.ts
This file has TWO issues:
Issue A (import path): The import uses
../src/hub/shared/but thehub/directory does NOT exist. The correct path issrc/shared/utils/keyboardHelp.js. Change:import { KEYBOARD_MAP } from '../../src/hub/shared/utils/keyboardHelp.js';→import { KEYBOARD_MAP } from '../../src/shared/utils/keyboardHelp.js';Issue B (dynamic path): The
joincall usesimport.meta.dir, '..', 'src', ...but fromscripts/dev/,'..'goes toscripts/not the repo root. It needs'../..'to reach the repo root. Change:const outPath = join(import.meta.dir, '..', 'src', 'hub', ...)→const outPath = join(import.meta.dir, '..', '..', 'src', 'shared', ...)Also change
keyboard-map.jsonoutput path:'keyboard-map.json'— keep the filename same but verify the full path resolves correctly.2. scripts/dev/capture-frames.ts and scripts/dev/capture-spans-dump.ts
These should ALREADY be fixed (I believe the current conversation may have already handled these). Read each file and verify the imports use
../../src/core/...(not../src/core/...). If they still have../src/, fix to../../src/.Instructions
- Read each file with the Read tool before editing
- Use the Edit tool for each change
- Only change import paths, nothing else
- Preserve all other code
- Return a summary of changes made
Assistant
sync-keyboard-map.ts has two incorrect paths; the other two files are already correct.
Fixing
scripts/dev/sync-keyboard-map.ts:Assistant
The LSP error on
import.meta.diris pre-existing (Bun runtime property not in TS lib types) — unrelated to these path fixes.Summary of changes to
scripts/dev/sync-keyboard-map.ts:Line Change 6 ../../src/hub/shared/utils/→../../src/shared/utils/8 '..', '..', 'src', 'hub', 'shared', ...→'..', '..', 'src', 'shared', ...No changes needed for
capture-frames.tsorcapture-spans-dump.ts— both already use../../src/core/...correctly.