@modular-circuit/transpiler 0.1.2 → 0.1.3
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/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -7
- package/dist/index.mjs +7 -7
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -315,16 +315,16 @@ async function collect_sub_sheets_by_id(module_ids, module_resolver) {
|
|
|
315
315
|
const files = await (0, import_utils2.unzipFile)(zip_archive);
|
|
316
316
|
for (const [name, content] of Object.entries(files)) {
|
|
317
317
|
if (name.endsWith(import_utils2.KICAD_SHC_FILE_EXT)) {
|
|
318
|
-
const
|
|
319
|
-
if (
|
|
320
|
-
console.error(`Duplicate sheet name: ${
|
|
318
|
+
const filename = (0, import_utils2.remove_filename_path_prefix)(name);
|
|
319
|
+
if (filename in sheets) {
|
|
320
|
+
console.error(`Duplicate sheet name: ${filename}`);
|
|
321
321
|
continue;
|
|
322
322
|
}
|
|
323
|
-
sheets[
|
|
324
|
-
design_block.sheets.push({
|
|
323
|
+
sheets[filename] = content;
|
|
324
|
+
design_block.sheets.push({ filename, content });
|
|
325
325
|
} else if (name.endsWith(import_utils2.KICAD_PCB_FILE_EXT)) {
|
|
326
|
-
const
|
|
327
|
-
design_block.pcb = {
|
|
326
|
+
const filename = (0, import_utils2.remove_filename_path_prefix)(name);
|
|
327
|
+
design_block.pcb = { filename, content };
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -202,16 +202,16 @@ async function collect_sub_sheets_by_id(module_ids, module_resolver) {
|
|
|
202
202
|
const files = await unzipFile2(zip_archive);
|
|
203
203
|
for (const [name, content] of Object.entries(files)) {
|
|
204
204
|
if (name.endsWith(KICAD_SHC_FILE_EXT2)) {
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
207
|
-
console.error(`Duplicate sheet name: ${
|
|
205
|
+
const filename = remove_filename_path_prefix2(name);
|
|
206
|
+
if (filename in sheets) {
|
|
207
|
+
console.error(`Duplicate sheet name: ${filename}`);
|
|
208
208
|
continue;
|
|
209
209
|
}
|
|
210
|
-
sheets[
|
|
211
|
-
design_block.sheets.push({
|
|
210
|
+
sheets[filename] = content;
|
|
211
|
+
design_block.sheets.push({ filename, content });
|
|
212
212
|
} else if (name.endsWith(KICAD_PCB_FILE_EXT)) {
|
|
213
|
-
const
|
|
214
|
-
design_block.pcb = {
|
|
213
|
+
const filename = remove_filename_path_prefix2(name);
|
|
214
|
+
design_block.pcb = { filename, content };
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
}
|