@tscircuit/cli 0.1.146 → 0.1.148
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/main.js +60 -16
- package/package.json +4 -3
package/dist/main.js
CHANGED
|
@@ -442424,7 +442424,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
|
|
|
442424
442424
|
import { execSync as execSync2 } from "node:child_process";
|
|
442425
442425
|
var import_semver2 = __toESM2(require_semver2(), 1);
|
|
442426
442426
|
// package.json
|
|
442427
|
-
var version = "0.1.
|
|
442427
|
+
var version = "0.1.147";
|
|
442428
442428
|
var package_default = {
|
|
442429
442429
|
name: "@tscircuit/cli",
|
|
442430
442430
|
version,
|
|
@@ -442437,7 +442437,7 @@ var package_default = {
|
|
|
442437
442437
|
"@tscircuit/fake-snippets": "^0.0.87",
|
|
442438
442438
|
"@tscircuit/file-server": "^0.0.24",
|
|
442439
442439
|
"@tscircuit/math-utils": "^0.0.18",
|
|
442440
|
-
"@tscircuit/props": "^0.0.
|
|
442440
|
+
"@tscircuit/props": "^0.0.242",
|
|
442441
442441
|
"@tscircuit/runframe": "^0.0.614",
|
|
442442
442442
|
"@tscircuit/schematic-match-adapt": "^0.0.22",
|
|
442443
442443
|
"@tscircuit/simple-3d-svg": "^0.0.10",
|
|
@@ -442478,7 +442478,8 @@ var package_default = {
|
|
|
442478
442478
|
},
|
|
442479
442479
|
peerDependencies: {
|
|
442480
442480
|
typescript: "^5.0.0",
|
|
442481
|
-
tscircuit: "*"
|
|
442481
|
+
tscircuit: "*",
|
|
442482
|
+
"@tscircuit/props": "*"
|
|
442482
442483
|
},
|
|
442483
442484
|
bin: {
|
|
442484
442485
|
tsci: "./dist/main.js"
|
|
@@ -467842,6 +467843,7 @@ init_dist3();
|
|
|
467842
467843
|
init_lib();
|
|
467843
467844
|
init_lib();
|
|
467844
467845
|
init_lib();
|
|
467846
|
+
init_lib();
|
|
467845
467847
|
init_dist3();
|
|
467846
467848
|
init_lib();
|
|
467847
467849
|
init_dist3();
|
|
@@ -467870,6 +467872,7 @@ init_lib();
|
|
|
467870
467872
|
init_dist3();
|
|
467871
467873
|
init_lib();
|
|
467872
467874
|
init_lib();
|
|
467875
|
+
init_lib();
|
|
467873
467876
|
init_dist3();
|
|
467874
467877
|
init_lib();
|
|
467875
467878
|
init_lib();
|
|
@@ -467877,7 +467880,6 @@ init_dist3();
|
|
|
467877
467880
|
init_lib();
|
|
467878
467881
|
init_dist3();
|
|
467879
467882
|
init_lib();
|
|
467880
|
-
init_lib();
|
|
467881
467883
|
init_dist3();
|
|
467882
467884
|
init_lib();
|
|
467883
467885
|
init_dist3();
|
|
@@ -467921,6 +467923,7 @@ init_lib();
|
|
|
467921
467923
|
init_dist3();
|
|
467922
467924
|
init_lib();
|
|
467923
467925
|
init_dist3();
|
|
467926
|
+
init_lib();
|
|
467924
467927
|
init_dist3();
|
|
467925
467928
|
init_lib();
|
|
467926
467929
|
init_lib();
|
|
@@ -468044,6 +468047,19 @@ var lrPolarPins = [
|
|
|
468044
468047
|
"neg"
|
|
468045
468048
|
];
|
|
468046
468049
|
var distanceOrMultiplier = distance3.or(z.enum(["2x", "3x", "4x"]));
|
|
468050
|
+
var schematicOrientation = z.enum([
|
|
468051
|
+
"vertical",
|
|
468052
|
+
"horizontal",
|
|
468053
|
+
"pos_top",
|
|
468054
|
+
"pos_bottom",
|
|
468055
|
+
"pos_left",
|
|
468056
|
+
"pos_right",
|
|
468057
|
+
"neg_top",
|
|
468058
|
+
"neg_bottom",
|
|
468059
|
+
"neg_left",
|
|
468060
|
+
"neg_right"
|
|
468061
|
+
]).describe("horizontal means pins go 1->2 rightward and vertical means pins go 1->2 downward (generally, positive on top)");
|
|
468062
|
+
expectTypesMatch3(true);
|
|
468047
468063
|
var explicitPinSideDefinition = z.object({
|
|
468048
468064
|
pins: z.array(z.union([z.number(), z.string()])),
|
|
468049
468065
|
direction: z.union([
|
|
@@ -468212,6 +468228,7 @@ var autorouterProp = z.union([
|
|
|
468212
468228
|
var baseGroupProps = commonLayoutProps.extend({
|
|
468213
468229
|
name: z.string().optional(),
|
|
468214
468230
|
children: z.any().optional(),
|
|
468231
|
+
schTitle: z.string().optional(),
|
|
468215
468232
|
key: z.any().optional(),
|
|
468216
468233
|
...layoutConfig.shape,
|
|
468217
468234
|
pcbWidth: length2.optional(),
|
|
@@ -468293,6 +468310,10 @@ var chipProps = commonComponentProps.extend({
|
|
|
468293
468310
|
connections: connectionsProp.optional()
|
|
468294
468311
|
});
|
|
468295
468312
|
expectTypesMatch3(true);
|
|
468313
|
+
var connectionTarget2 = z.string().or(z.array(z.string()).readonly()).or(z.array(z.string()));
|
|
468314
|
+
var createConnectionsProp = (labels) => {
|
|
468315
|
+
return z.record(z.enum(labels), connectionTarget2);
|
|
468316
|
+
};
|
|
468296
468317
|
var jumperProps = commonComponentProps.extend({
|
|
468297
468318
|
manufacturerPartNumber: z.string().optional(),
|
|
468298
468319
|
pinLabels: z.record(z.number().or(z.string()), z.string().or(z.array(z.string()))).optional(),
|
|
@@ -468303,7 +468324,8 @@ var jumperProps = commonComponentProps.extend({
|
|
|
468303
468324
|
schDirection: z.enum(["left", "right"]).optional(),
|
|
468304
468325
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
468305
468326
|
pinCount: z.union([z.literal(2), z.literal(3)]).optional(),
|
|
468306
|
-
internallyConnectedPins: z.array(z.array(z.string())).optional()
|
|
468327
|
+
internallyConnectedPins: z.array(z.array(z.string())).optional(),
|
|
468328
|
+
connections: z.custom().pipe(z.record(z.string(), connectionTarget2)).optional()
|
|
468307
468329
|
});
|
|
468308
468330
|
expectTypesMatch3(true);
|
|
468309
468331
|
var solderjumperProps = jumperProps.extend({
|
|
@@ -468327,6 +468349,7 @@ var fuseProps = commonComponentProps.extend({
|
|
|
468327
468349
|
currentRating: z.union([z.number(), z.string()]),
|
|
468328
468350
|
voltageRating: z.union([z.number(), z.string()]).optional(),
|
|
468329
468351
|
schShowRatings: z.boolean().optional(),
|
|
468352
|
+
schOrientation: schematicOrientation.optional(),
|
|
468330
468353
|
connections: z.record(z.string(), z.union([
|
|
468331
468354
|
z.string(),
|
|
468332
468355
|
z.array(z.string()).readonly(),
|
|
@@ -468341,6 +468364,7 @@ var distanceHiddenUndefined = z.custom().transform((a) => {
|
|
|
468341
468364
|
var platedHoleProps = z.discriminatedUnion("shape", [
|
|
468342
468365
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
468343
468366
|
name: z.string().optional(),
|
|
468367
|
+
connectsTo: z.string().or(z.array(z.string())).optional(),
|
|
468344
468368
|
shape: z.literal("circle"),
|
|
468345
468369
|
holeDiameter: distance3,
|
|
468346
468370
|
outerDiameter: distance3,
|
|
@@ -468348,6 +468372,7 @@ var platedHoleProps = z.discriminatedUnion("shape", [
|
|
|
468348
468372
|
}),
|
|
468349
468373
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
468350
468374
|
name: z.string().optional(),
|
|
468375
|
+
connectsTo: z.string().or(z.array(z.string())).optional(),
|
|
468351
468376
|
shape: z.literal("oval"),
|
|
468352
468377
|
outerWidth: distance3,
|
|
468353
468378
|
outerHeight: distance3,
|
|
@@ -468359,6 +468384,7 @@ var platedHoleProps = z.discriminatedUnion("shape", [
|
|
|
468359
468384
|
}),
|
|
468360
468385
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
468361
468386
|
name: z.string().optional(),
|
|
468387
|
+
connectsTo: z.string().or(z.array(z.string())).optional(),
|
|
468362
468388
|
shape: z.literal("pill"),
|
|
468363
468389
|
outerWidth: distance3,
|
|
468364
468390
|
outerHeight: distance3,
|
|
@@ -468370,6 +468396,7 @@ var platedHoleProps = z.discriminatedUnion("shape", [
|
|
|
468370
468396
|
}),
|
|
468371
468397
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
468372
468398
|
name: z.string().optional(),
|
|
468399
|
+
connectsTo: z.string().or(z.array(z.string())).optional(),
|
|
468373
468400
|
shape: z.literal("circular_hole_with_rect_pad"),
|
|
468374
468401
|
holeDiameter: distance3,
|
|
468375
468402
|
rectPadWidth: distance3,
|
|
@@ -468380,6 +468407,7 @@ var platedHoleProps = z.discriminatedUnion("shape", [
|
|
|
468380
468407
|
}),
|
|
468381
468408
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
468382
468409
|
name: z.string().optional(),
|
|
468410
|
+
connectsTo: z.string().or(z.array(z.string())).optional(),
|
|
468383
468411
|
shape: z.literal("pill_hole_with_rect_pad"),
|
|
468384
468412
|
holeShape: z.literal("pill"),
|
|
468385
468413
|
padShape: z.literal("rect"),
|
|
@@ -468399,10 +468427,6 @@ var platedHoleProps = z.discriminatedUnion("shape", [
|
|
|
468399
468427
|
return a;
|
|
468400
468428
|
});
|
|
468401
468429
|
expectTypesMatch3(true);
|
|
468402
|
-
var connectionTarget2 = z.string().or(z.array(z.string()).readonly()).or(z.array(z.string()));
|
|
468403
|
-
var createConnectionsProp = (labels) => {
|
|
468404
|
-
return z.record(z.enum(labels), connectionTarget2);
|
|
468405
|
-
};
|
|
468406
468430
|
var resistorPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
468407
468431
|
var resistorProps = commonComponentProps.extend({
|
|
468408
468432
|
resistance: resistance2,
|
|
@@ -468410,6 +468434,7 @@ var resistorProps = commonComponentProps.extend({
|
|
|
468410
468434
|
pullupTo: z.string().optional(),
|
|
468411
468435
|
pulldownFor: z.string().optional(),
|
|
468412
468436
|
pulldownTo: z.string().optional(),
|
|
468437
|
+
schOrientation: schematicOrientation.optional(),
|
|
468413
468438
|
connections: createConnectionsProp(resistorPinLabels).optional()
|
|
468414
468439
|
});
|
|
468415
468440
|
var resistorPins = lrPins;
|
|
@@ -468422,7 +468447,8 @@ expectTypesMatch3(true);
|
|
|
468422
468447
|
var crystalProps = commonComponentProps.extend({
|
|
468423
468448
|
frequency: frequency2,
|
|
468424
468449
|
loadCapacitance: capacitance2,
|
|
468425
|
-
pinVariant: z.enum(["two_pin", "four_pin"]).optional()
|
|
468450
|
+
pinVariant: z.enum(["two_pin", "four_pin"]).optional(),
|
|
468451
|
+
schOrientation: schematicOrientation.optional()
|
|
468426
468452
|
});
|
|
468427
468453
|
expectTypesMatch3(true);
|
|
468428
468454
|
var resonatorProps = commonComponentProps.extend({
|
|
@@ -468462,6 +468488,7 @@ var capacitorProps = commonComponentProps.extend({
|
|
|
468462
468488
|
bypassFor: z.string().optional(),
|
|
468463
468489
|
bypassTo: z.string().optional(),
|
|
468464
468490
|
maxDecouplingTraceLength: z.number().optional(),
|
|
468491
|
+
schOrientation: schematicOrientation.optional(),
|
|
468465
468492
|
connections: createConnectionsProp(capacitorPinLabels).optional()
|
|
468466
468493
|
});
|
|
468467
468494
|
var capacitorPins = lrPolarPins;
|
|
@@ -468547,6 +468574,7 @@ var cutoutProps = z.discriminatedUnion("shape", [
|
|
|
468547
468574
|
polygonCutoutProps
|
|
468548
468575
|
]);
|
|
468549
468576
|
var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
468577
|
+
name: z.string().optional(),
|
|
468550
468578
|
shape: z.literal("rect"),
|
|
468551
468579
|
width: distance3,
|
|
468552
468580
|
height: distance3,
|
|
@@ -468554,6 +468582,7 @@ var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
468554
468582
|
});
|
|
468555
468583
|
expectTypesMatch3(true);
|
|
468556
468584
|
var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
468585
|
+
name: z.string().optional(),
|
|
468557
468586
|
shape: z.literal("rotated_rect"),
|
|
468558
468587
|
width: distance3,
|
|
468559
468588
|
height: distance3,
|
|
@@ -468562,12 +468591,14 @@ var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
468562
468591
|
});
|
|
468563
468592
|
expectTypesMatch3(true);
|
|
468564
468593
|
var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
468594
|
+
name: z.string().optional(),
|
|
468565
468595
|
shape: z.literal("circle"),
|
|
468566
468596
|
radius: distance3,
|
|
468567
468597
|
portHints: portHints.optional()
|
|
468568
468598
|
});
|
|
468569
468599
|
expectTypesMatch3(true);
|
|
468570
468600
|
var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
468601
|
+
name: z.string().optional(),
|
|
468571
468602
|
shape: z.literal("pill"),
|
|
468572
468603
|
width: distance3,
|
|
468573
468604
|
height: distance3,
|
|
@@ -468576,6 +468607,7 @@ var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
468576
468607
|
});
|
|
468577
468608
|
expectTypesMatch3(true);
|
|
468578
468609
|
var polygonSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
468610
|
+
name: z.string().optional(),
|
|
468579
468611
|
shape: z.literal("polygon"),
|
|
468580
468612
|
points: z.array(point4),
|
|
468581
468613
|
portHints: portHints.optional()
|
|
@@ -468652,7 +468684,8 @@ var capacity = z.number().or(z.string().endsWith("mAh")).transform((v) => {
|
|
|
468652
468684
|
return v;
|
|
468653
468685
|
}).describe("Battery capacity in mAh");
|
|
468654
468686
|
var batteryProps = commonComponentProps.extend({
|
|
468655
|
-
capacity: capacity.optional()
|
|
468687
|
+
capacity: capacity.optional(),
|
|
468688
|
+
schOrientation: schematicOrientation.optional()
|
|
468656
468689
|
});
|
|
468657
468690
|
expectTypesMatch3(true);
|
|
468658
468691
|
var pinHeaderProps = commonComponentProps.extend({
|
|
@@ -468707,7 +468740,8 @@ var mosfetProps = commonComponentProps.extend({
|
|
|
468707
468740
|
expectTypesMatch3(true);
|
|
468708
468741
|
var inductorProps = commonComponentProps.extend({
|
|
468709
468742
|
inductance: inductance2,
|
|
468710
|
-
maxCurrentRating: z.union([z.string(), z.number()]).optional()
|
|
468743
|
+
maxCurrentRating: z.union([z.string(), z.number()]).optional(),
|
|
468744
|
+
schOrientation: schematicOrientation.optional()
|
|
468711
468745
|
});
|
|
468712
468746
|
expectTypesMatch3(true);
|
|
468713
468747
|
var diodeConnectionKeys = z.enum([
|
|
@@ -468728,7 +468762,8 @@ var diodeProps = commonComponentProps.extend({
|
|
|
468728
468762
|
schottky: z.boolean().optional(),
|
|
468729
468763
|
zener: z.boolean().optional(),
|
|
468730
468764
|
photo: z.boolean().optional(),
|
|
468731
|
-
tvs: z.boolean().optional()
|
|
468765
|
+
tvs: z.boolean().optional(),
|
|
468766
|
+
schOrientation: schematicOrientation.optional()
|
|
468732
468767
|
}).superRefine((data, ctx) => {
|
|
468733
468768
|
const enabledFlags = [
|
|
468734
468769
|
data.standard,
|
|
@@ -468792,7 +468827,8 @@ expectTypesMatch3(true);
|
|
|
468792
468827
|
var ledProps = commonComponentProps.extend({
|
|
468793
468828
|
color: z.string().optional(),
|
|
468794
468829
|
wavelength: z.string().optional(),
|
|
468795
|
-
schDisplayValue: z.string().optional()
|
|
468830
|
+
schDisplayValue: z.string().optional(),
|
|
468831
|
+
schOrientation: schematicOrientation.optional()
|
|
468796
468832
|
});
|
|
468797
468833
|
var ledPins = lrPolarPins;
|
|
468798
468834
|
var switchProps = commonComponentProps.extend({
|
|
@@ -468848,11 +468884,14 @@ var pcbTraceProps = z.object({
|
|
|
468848
468884
|
route: z.array(route_hint_point2)
|
|
468849
468885
|
});
|
|
468850
468886
|
var viaProps = commonLayoutProps.extend({
|
|
468887
|
+
name: z.string().optional(),
|
|
468851
468888
|
fromLayer: layer_ref2,
|
|
468852
468889
|
toLayer: layer_ref2,
|
|
468853
468890
|
holeDiameter: distance3,
|
|
468854
|
-
outerDiameter: distance3
|
|
468891
|
+
outerDiameter: distance3,
|
|
468892
|
+
connectsTo: z.string().or(z.array(z.string())).optional()
|
|
468855
468893
|
});
|
|
468894
|
+
expectTypesMatch3(true);
|
|
468856
468895
|
var testpointProps = commonComponentProps.extend({
|
|
468857
468896
|
footprintVariant: z.enum(["pad", "through_hole"]).optional(),
|
|
468858
468897
|
padShape: z.enum(["rect", "circle"]).optional().default("circle"),
|
|
@@ -502530,7 +502569,12 @@ var buildFile = async (input, output, projectDir, options) => {
|
|
|
502530
502569
|
console.error(kleur_default.red(msg));
|
|
502531
502570
|
}
|
|
502532
502571
|
}
|
|
502533
|
-
|
|
502572
|
+
if (errors2.length > 0 && !options?.ignoreErrors) {
|
|
502573
|
+
console.error(kleur_default.red(`Build failed with ${errors2.length} error(s). Use --ignore-errors to continue.`));
|
|
502574
|
+
return false;
|
|
502575
|
+
} else {
|
|
502576
|
+
return true;
|
|
502577
|
+
}
|
|
502534
502578
|
} catch (err) {
|
|
502535
502579
|
console.error(`Build failed: ${err}`);
|
|
502536
502580
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.148",
|
|
4
4
|
"main": "dist/main.js",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@babel/standalone": "^7.26.9",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@tscircuit/fake-snippets": "^0.0.87",
|
|
11
11
|
"@tscircuit/file-server": "^0.0.24",
|
|
12
12
|
"@tscircuit/math-utils": "^0.0.18",
|
|
13
|
-
"@tscircuit/props": "^0.0.
|
|
13
|
+
"@tscircuit/props": "^0.0.242",
|
|
14
14
|
"@tscircuit/runframe": "^0.0.614",
|
|
15
15
|
"@tscircuit/schematic-match-adapt": "^0.0.22",
|
|
16
16
|
"@tscircuit/simple-3d-svg": "^0.0.10",
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"typescript": "^5.0.0",
|
|
54
|
-
"tscircuit": "*"
|
|
54
|
+
"tscircuit": "*",
|
|
55
|
+
"@tscircuit/props": "*"
|
|
55
56
|
},
|
|
56
57
|
"bin": {
|
|
57
58
|
"tsci": "./dist/main.js"
|