@tscircuit/cli 0.0.190 → 0.0.192
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/bun.lockb
CHANGED
|
Binary file
|
|
@@ -11,6 +11,9 @@ import { deriveSelectorFromPcbComponentId } from "./derive-selector-from-pcb-com
|
|
|
11
11
|
import type { EditEvent } from "@tscircuit/manual-edit-events"
|
|
12
12
|
import { getManualTraceHintFromEvent, ManualTraceHint } from "@tscircuit/layout"
|
|
13
13
|
import JSON5 from "json5"
|
|
14
|
+
import Debug from "debug"
|
|
15
|
+
|
|
16
|
+
const debug = Debug("tscircuit:cli:edit-event-watcher")
|
|
14
17
|
|
|
15
18
|
export const startEditEventWatcher = async (
|
|
16
19
|
{
|
|
@@ -46,14 +49,12 @@ export const startEditEventWatcher = async (
|
|
|
46
49
|
`Edit event detected for dev_package_example ${dev_package_example.dev_package_example_id}`,
|
|
47
50
|
),
|
|
48
51
|
)
|
|
49
|
-
|
|
50
|
-
kleur.gray(` file_path: ${dev_package_example.file_path}`),
|
|
51
|
-
)
|
|
52
|
+
debug(`file_path: ${dev_package_example.file_path}`)
|
|
52
53
|
|
|
53
54
|
last_edit_event_update_time[dev_package_example_id] =
|
|
54
55
|
dev_package_example.edit_events_last_updated_at! // TODO last_edit_event_updated_at
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
debug(` getting new edit events...`)
|
|
57
58
|
|
|
58
59
|
const dev_package_example_full = await devServerAxios
|
|
59
60
|
.post("/api/dev_package_examples/get", {
|
|
@@ -99,9 +100,7 @@ export const startEditEventWatcher = async (
|
|
|
99
100
|
"utf-8",
|
|
100
101
|
)
|
|
101
102
|
|
|
102
|
-
|
|
103
|
-
kleur.gray(` found manual edit file: ${manual_edit_file}`),
|
|
104
|
-
)
|
|
103
|
+
debug(` found manual edit file: ${manual_edit_file}`)
|
|
105
104
|
|
|
106
105
|
// 2. Convert the edit events into ManualPcbPosition[] and append,
|
|
107
106
|
// removing any old placements/positions for the same selector.
|
|
@@ -211,6 +210,10 @@ export const startEditEventWatcher = async (
|
|
|
211
210
|
if (handled_edit_events.has(incoming_edit_event.edit_event_id))
|
|
212
211
|
continue
|
|
213
212
|
|
|
213
|
+
debug(
|
|
214
|
+
`incoming_edit_event: ${JSON.stringify(incoming_edit_event)}`,
|
|
215
|
+
)
|
|
216
|
+
|
|
214
217
|
if (
|
|
215
218
|
incoming_edit_event.pcb_edit_event_type ===
|
|
216
219
|
"edit_component_location"
|
|
@@ -224,6 +227,10 @@ export const startEditEventWatcher = async (
|
|
|
224
227
|
})
|
|
225
228
|
}
|
|
226
229
|
|
|
230
|
+
debug(
|
|
231
|
+
`edit event pcb_component_selector: "${pcb_component_selector}"`,
|
|
232
|
+
)
|
|
233
|
+
|
|
227
234
|
// TODO we'll need to work past this for edit_event_type=edit_trace
|
|
228
235
|
if (!pcb_component_selector) continue
|
|
229
236
|
|