@tscircuit/cli 0.1.1467 → 0.1.1469
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/cli/build/build.worker.js +26 -6
- package/dist/cli/main.js +809 -980
- package/dist/cli/snapshot/snapshot.worker.js +243 -7
- package/dist/lib/index.js +88 -12
- package/package.json +5 -4
|
@@ -9967,6 +9967,18 @@ var require_semver = __commonJS((exports, module) => {
|
|
|
9967
9967
|
var { safeRe: re, t } = require_re();
|
|
9968
9968
|
var parseOptions = require_parse_options();
|
|
9969
9969
|
var { compareIdentifiers } = require_identifiers();
|
|
9970
|
+
var isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
9971
|
+
const identifiers = identifier.split(".");
|
|
9972
|
+
if (identifiers.length > prerelease.length) {
|
|
9973
|
+
return false;
|
|
9974
|
+
}
|
|
9975
|
+
for (let i = 0;i < identifiers.length; i++) {
|
|
9976
|
+
if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
|
|
9977
|
+
return false;
|
|
9978
|
+
}
|
|
9979
|
+
}
|
|
9980
|
+
return true;
|
|
9981
|
+
};
|
|
9970
9982
|
|
|
9971
9983
|
class SemVer {
|
|
9972
9984
|
constructor(version, options) {
|
|
@@ -10206,8 +10218,9 @@ var require_semver = __commonJS((exports, module) => {
|
|
|
10206
10218
|
if (identifierBase === false) {
|
|
10207
10219
|
prerelease = [identifier];
|
|
10208
10220
|
}
|
|
10209
|
-
if (
|
|
10210
|
-
|
|
10221
|
+
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
10222
|
+
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
10223
|
+
if (isNaN(prereleaseBase)) {
|
|
10211
10224
|
this.prerelease = prerelease;
|
|
10212
10225
|
}
|
|
10213
10226
|
} else {
|
|
@@ -10678,6 +10691,7 @@ var require_range = __commonJS((exports, module) => {
|
|
|
10678
10691
|
return this.range;
|
|
10679
10692
|
}
|
|
10680
10693
|
parseRange(range) {
|
|
10694
|
+
range = range.replace(BUILDSTRIPRE, "");
|
|
10681
10695
|
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
10682
10696
|
const memoKey = memoOpts + ":" + range;
|
|
10683
10697
|
const cached = cache.get(memoKey);
|
|
@@ -10759,12 +10773,14 @@ var require_range = __commonJS((exports, module) => {
|
|
|
10759
10773
|
var SemVer = require_semver();
|
|
10760
10774
|
var {
|
|
10761
10775
|
safeRe: re,
|
|
10776
|
+
src,
|
|
10762
10777
|
t,
|
|
10763
10778
|
comparatorTrimReplace,
|
|
10764
10779
|
tildeTrimReplace,
|
|
10765
10780
|
caretTrimReplace
|
|
10766
10781
|
} = require_re();
|
|
10767
10782
|
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
10783
|
+
var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
|
|
10768
10784
|
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
10769
10785
|
var isAny = (c) => c.value === "";
|
|
10770
10786
|
var isSatisfiable = (comparators, options) => {
|
|
@@ -10793,6 +10809,7 @@ var require_range = __commonJS((exports, module) => {
|
|
|
10793
10809
|
return comp;
|
|
10794
10810
|
};
|
|
10795
10811
|
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
10812
|
+
var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
|
|
10796
10813
|
var replaceTildes = (comp, options) => {
|
|
10797
10814
|
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
10798
10815
|
};
|
|
@@ -10852,9 +10869,9 @@ var require_range = __commonJS((exports, module) => {
|
|
|
10852
10869
|
debug2("no pr");
|
|
10853
10870
|
if (M === "0") {
|
|
10854
10871
|
if (m === "0") {
|
|
10855
|
-
ret = `>=${M}.${m}.${p}
|
|
10872
|
+
ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
|
|
10856
10873
|
} else {
|
|
10857
|
-
ret = `>=${M}.${m}.${p}
|
|
10874
|
+
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
10858
10875
|
}
|
|
10859
10876
|
} else {
|
|
10860
10877
|
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
@@ -10873,6 +10890,9 @@ var require_range = __commonJS((exports, module) => {
|
|
|
10873
10890
|
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
10874
10891
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
10875
10892
|
debug2("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
10893
|
+
if (invalidXRangeOrder(M, m, p)) {
|
|
10894
|
+
return comp;
|
|
10895
|
+
}
|
|
10876
10896
|
const xM = isX(M);
|
|
10877
10897
|
const xm = xM || isX(m);
|
|
10878
10898
|
const xp = xm || isX(p);
|
|
@@ -11481,7 +11501,7 @@ var require_subset = __commonJS((exports, module) => {
|
|
|
11481
11501
|
if (higher === c && higher !== gt) {
|
|
11482
11502
|
return false;
|
|
11483
11503
|
}
|
|
11484
|
-
} else if (gt.operator === ">=" && !
|
|
11504
|
+
} else if (gt.operator === ">=" && !c.test(gt.semver)) {
|
|
11485
11505
|
return false;
|
|
11486
11506
|
}
|
|
11487
11507
|
}
|
|
@@ -11496,7 +11516,7 @@ var require_subset = __commonJS((exports, module) => {
|
|
|
11496
11516
|
if (lower === c && lower !== lt) {
|
|
11497
11517
|
return false;
|
|
11498
11518
|
}
|
|
11499
|
-
} else if (lt.operator === "<=" && !
|
|
11519
|
+
} else if (lt.operator === "<=" && !c.test(lt.semver)) {
|
|
11500
11520
|
return false;
|
|
11501
11521
|
}
|
|
11502
11522
|
}
|
|
@@ -16425,10 +16445,226 @@ var processSnapshotFile = async ({
|
|
|
16425
16445
|
};
|
|
16426
16446
|
};
|
|
16427
16447
|
|
|
16448
|
+
// lib/project-config/index.ts
|
|
16449
|
+
import * as fs11 from "node:fs";
|
|
16450
|
+
import * as path12 from "node:path";
|
|
16451
|
+
import { pathToFileURL as pathToFileURL2 } from "node:url";
|
|
16452
|
+
|
|
16453
|
+
// lib/project-config/project-config-schema.ts
|
|
16454
|
+
import { z } from "zod";
|
|
16455
|
+
var pcbSnapshotSettingsSchema = z.object({
|
|
16456
|
+
showCourtyards: z.boolean().optional(),
|
|
16457
|
+
showPcbNotes: z.boolean().optional(),
|
|
16458
|
+
showFabricationNotes: z.boolean().optional()
|
|
16459
|
+
});
|
|
16460
|
+
var projectConfigSchema = z.object({
|
|
16461
|
+
mainEntrypoint: z.string().optional(),
|
|
16462
|
+
libraryEntrypoint: z.string().optional(),
|
|
16463
|
+
previewComponentPath: z.string().optional(),
|
|
16464
|
+
siteDefaultComponentPath: z.string().optional(),
|
|
16465
|
+
ignoredFiles: z.array(z.string()).optional(),
|
|
16466
|
+
includeBoardFiles: z.array(z.string()).optional(),
|
|
16467
|
+
snapshotsDir: z.string().optional(),
|
|
16468
|
+
pcbSnapshotSettings: pcbSnapshotSettingsSchema.optional(),
|
|
16469
|
+
prebuildCommand: z.string().optional(),
|
|
16470
|
+
buildCommand: z.string().optional(),
|
|
16471
|
+
kicadProjectEntrypointPath: z.string().optional(),
|
|
16472
|
+
kicadLibraryEntrypointPath: z.string().optional(),
|
|
16473
|
+
kicadLibraryName: z.string().optional(),
|
|
16474
|
+
alwaysUseLatestTscircuitOnCloud: z.boolean().optional(),
|
|
16475
|
+
build: z.object({
|
|
16476
|
+
circuitJson: z.boolean().optional(),
|
|
16477
|
+
kicadProject: z.boolean().optional(),
|
|
16478
|
+
kicadLibrary: z.boolean().optional(),
|
|
16479
|
+
kicadPcm: z.boolean().optional(),
|
|
16480
|
+
previewImages: z.boolean().optional(),
|
|
16481
|
+
glbs: z.boolean().optional(),
|
|
16482
|
+
step: z.boolean().optional(),
|
|
16483
|
+
workerTimeoutMs: z.number().int().positive().optional(),
|
|
16484
|
+
routingDisabled: z.boolean().optional(),
|
|
16485
|
+
typescriptLibrary: z.boolean().optional()
|
|
16486
|
+
}).optional()
|
|
16487
|
+
});
|
|
16488
|
+
|
|
16489
|
+
// lib/project-config/index.ts
|
|
16490
|
+
var CONFIG_FILENAME = "tscircuit.config.json";
|
|
16491
|
+
var CONFIG_MODULE_FILENAMES = [
|
|
16492
|
+
"tscircuit.config.ts",
|
|
16493
|
+
"tscircuit.config.js"
|
|
16494
|
+
];
|
|
16495
|
+
var ENV_FILENAMES = [".env", ".env.local"];
|
|
16496
|
+
var CONFIG_SCHEMA_URL = "https://cdn.jsdelivr.net/npm/@tscircuit/cli/types/tscircuit.config.schema.json";
|
|
16497
|
+
var DEFAULT_BOARD_FILE_PATTERNS = [
|
|
16498
|
+
"**/*.board.tsx",
|
|
16499
|
+
"**/*.circuit.tsx",
|
|
16500
|
+
"**/*.circuit.json"
|
|
16501
|
+
];
|
|
16502
|
+
var parseProjectConfigObject = (config) => {
|
|
16503
|
+
if (!config || typeof config !== "object" || Array.isArray(config)) {
|
|
16504
|
+
throw new Error("tscircuit config must export an object");
|
|
16505
|
+
}
|
|
16506
|
+
const { platformConfig, ...serializableConfig } = config;
|
|
16507
|
+
const parsedConfig = projectConfigSchema.parse(serializableConfig);
|
|
16508
|
+
if (platformConfig === undefined) {
|
|
16509
|
+
return parsedConfig;
|
|
16510
|
+
}
|
|
16511
|
+
return {
|
|
16512
|
+
...parsedConfig,
|
|
16513
|
+
platformConfig
|
|
16514
|
+
};
|
|
16515
|
+
};
|
|
16516
|
+
var stripWrappingQuotes = (value) => {
|
|
16517
|
+
if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
|
|
16518
|
+
return value.slice(1, -1);
|
|
16519
|
+
}
|
|
16520
|
+
return value;
|
|
16521
|
+
};
|
|
16522
|
+
var loadProjectEnv = (projectDir) => {
|
|
16523
|
+
const initialEnvKeys = new Set(Object.keys(process.env));
|
|
16524
|
+
for (const envFileName of ENV_FILENAMES) {
|
|
16525
|
+
const envPath = path12.join(projectDir, envFileName);
|
|
16526
|
+
if (!fs11.existsSync(envPath))
|
|
16527
|
+
continue;
|
|
16528
|
+
const envContent = fs11.readFileSync(envPath, "utf8");
|
|
16529
|
+
for (const rawLine of envContent.split(/\r?\n/)) {
|
|
16530
|
+
const line = rawLine.trim();
|
|
16531
|
+
if (!line || line.startsWith("#"))
|
|
16532
|
+
continue;
|
|
16533
|
+
const lineWithoutExport = line.startsWith("export ") ? line.slice("export ".length) : line;
|
|
16534
|
+
const separatorIndex = lineWithoutExport.indexOf("=");
|
|
16535
|
+
if (separatorIndex <= 0)
|
|
16536
|
+
continue;
|
|
16537
|
+
const key = lineWithoutExport.slice(0, separatorIndex).trim();
|
|
16538
|
+
if (!key || initialEnvKeys.has(key))
|
|
16539
|
+
continue;
|
|
16540
|
+
const value = stripWrappingQuotes(lineWithoutExport.slice(separatorIndex + 1).trim());
|
|
16541
|
+
process.env[key] = value;
|
|
16542
|
+
}
|
|
16543
|
+
}
|
|
16544
|
+
};
|
|
16545
|
+
var loadProjectConfigSync = (projectDir = process.cwd()) => {
|
|
16546
|
+
const configPath = path12.join(projectDir, CONFIG_FILENAME);
|
|
16547
|
+
if (!fs11.existsSync(configPath)) {
|
|
16548
|
+
return null;
|
|
16549
|
+
}
|
|
16550
|
+
try {
|
|
16551
|
+
const configContent = fs11.readFileSync(configPath, "utf8");
|
|
16552
|
+
const parsedConfig = JSON.parse(configContent);
|
|
16553
|
+
return projectConfigSchema.parse(parsedConfig);
|
|
16554
|
+
} catch (error) {
|
|
16555
|
+
console.error(`Error loading tscircuit config: ${error}`);
|
|
16556
|
+
return null;
|
|
16557
|
+
}
|
|
16558
|
+
};
|
|
16559
|
+
var loadProjectConfigModule = async (projectDir) => {
|
|
16560
|
+
loadProjectEnv(projectDir);
|
|
16561
|
+
for (const configFileName of CONFIG_MODULE_FILENAMES) {
|
|
16562
|
+
const configPath = path12.join(projectDir, configFileName);
|
|
16563
|
+
if (!fs11.existsSync(configPath))
|
|
16564
|
+
continue;
|
|
16565
|
+
try {
|
|
16566
|
+
const moduleUrl = pathToFileURL2(configPath);
|
|
16567
|
+
const stat = fs11.statSync(configPath);
|
|
16568
|
+
moduleUrl.searchParams.set("tsci", String(stat.mtimeMs));
|
|
16569
|
+
const importedModule = await import(moduleUrl.href);
|
|
16570
|
+
const exportedConfig = importedModule.default ?? importedModule.config ?? importedModule;
|
|
16571
|
+
return parseProjectConfigObject(exportedConfig);
|
|
16572
|
+
} catch (error) {
|
|
16573
|
+
console.error(`Error loading ${configFileName}: ${error}`);
|
|
16574
|
+
return null;
|
|
16575
|
+
}
|
|
16576
|
+
}
|
|
16577
|
+
return null;
|
|
16578
|
+
};
|
|
16579
|
+
var loadRuntimeProjectConfig = async (projectDir = process.cwd()) => {
|
|
16580
|
+
const jsonConfig = loadProjectConfigSync(projectDir);
|
|
16581
|
+
const moduleConfig = await loadProjectConfigModule(projectDir);
|
|
16582
|
+
if (!jsonConfig && !moduleConfig) {
|
|
16583
|
+
return null;
|
|
16584
|
+
}
|
|
16585
|
+
return {
|
|
16586
|
+
...jsonConfig ?? {},
|
|
16587
|
+
...moduleConfig ?? {},
|
|
16588
|
+
build: {
|
|
16589
|
+
...jsonConfig?.build,
|
|
16590
|
+
...moduleConfig?.build
|
|
16591
|
+
},
|
|
16592
|
+
pcbSnapshotSettings: {
|
|
16593
|
+
...jsonConfig?.pcbSnapshotSettings,
|
|
16594
|
+
...moduleConfig?.pcbSnapshotSettings
|
|
16595
|
+
}
|
|
16596
|
+
};
|
|
16597
|
+
};
|
|
16598
|
+
var loadProjectConfig = (projectDir = process.cwd()) => {
|
|
16599
|
+
return loadProjectConfigSync(projectDir);
|
|
16600
|
+
};
|
|
16601
|
+
var getBoardFilePatterns = (projectDir = process.cwd()) => {
|
|
16602
|
+
const config = loadProjectConfigSync(projectDir);
|
|
16603
|
+
const patterns = config?.includeBoardFiles?.filter((pattern) => pattern.trim());
|
|
16604
|
+
if (patterns && patterns.length > 0) {
|
|
16605
|
+
return patterns;
|
|
16606
|
+
}
|
|
16607
|
+
return DEFAULT_BOARD_FILE_PATTERNS;
|
|
16608
|
+
};
|
|
16609
|
+
var getSnapshotsDir = (projectDir = process.cwd()) => {
|
|
16610
|
+
const config = loadProjectConfigSync(projectDir);
|
|
16611
|
+
return config?.snapshotsDir;
|
|
16612
|
+
};
|
|
16613
|
+
var saveProjectConfig = (config, projectDir = process.cwd()) => {
|
|
16614
|
+
const configPath = path12.join(projectDir, CONFIG_FILENAME);
|
|
16615
|
+
try {
|
|
16616
|
+
const configWithSchema = {
|
|
16617
|
+
$schema: CONFIG_SCHEMA_URL,
|
|
16618
|
+
...config ?? {}
|
|
16619
|
+
};
|
|
16620
|
+
fs11.writeFileSync(configPath, JSON.stringify(configWithSchema, null, 2));
|
|
16621
|
+
return true;
|
|
16622
|
+
} catch (error) {
|
|
16623
|
+
console.error(`Error saving tscircuit config: ${error}`);
|
|
16624
|
+
return false;
|
|
16625
|
+
}
|
|
16626
|
+
};
|
|
16627
|
+
|
|
16628
|
+
// lib/shared/platform-config-utils.ts
|
|
16629
|
+
var mergePlatformConfigs = (...configs) => {
|
|
16630
|
+
const definedConfigs = configs.filter(Boolean);
|
|
16631
|
+
if (definedConfigs.length === 0) {
|
|
16632
|
+
return;
|
|
16633
|
+
}
|
|
16634
|
+
return definedConfigs.reduce((mergedConfig, config) => {
|
|
16635
|
+
return {
|
|
16636
|
+
...mergedConfig,
|
|
16637
|
+
...config,
|
|
16638
|
+
footprintLibraryMap: {
|
|
16639
|
+
...mergedConfig.footprintLibraryMap,
|
|
16640
|
+
...config.footprintLibraryMap
|
|
16641
|
+
},
|
|
16642
|
+
footprintFileParserMap: {
|
|
16643
|
+
...mergedConfig.footprintFileParserMap,
|
|
16644
|
+
...config.footprintFileParserMap
|
|
16645
|
+
},
|
|
16646
|
+
staticFileLoaderMap: {
|
|
16647
|
+
...mergedConfig.staticFileLoaderMap,
|
|
16648
|
+
...config.staticFileLoaderMap
|
|
16649
|
+
},
|
|
16650
|
+
autorouterMap: {
|
|
16651
|
+
...mergedConfig.autorouterMap,
|
|
16652
|
+
...config.autorouterMap
|
|
16653
|
+
},
|
|
16654
|
+
spiceEngineMap: {
|
|
16655
|
+
...mergedConfig.spiceEngineMap,
|
|
16656
|
+
...config.spiceEngineMap
|
|
16657
|
+
}
|
|
16658
|
+
};
|
|
16659
|
+
}, {});
|
|
16660
|
+
};
|
|
16661
|
+
|
|
16428
16662
|
// cli/snapshot/worker-snapshot-handlers.ts
|
|
16429
16663
|
var handleSnapshotFile = async (filePath, projectDir, snapshotsDirName, options) => {
|
|
16430
16664
|
process.chdir(projectDir);
|
|
16431
16665
|
await registerStaticAssetLoaders();
|
|
16666
|
+
const projectConfig = await loadRuntimeProjectConfig(projectDir);
|
|
16667
|
+
const platformConfig = mergePlatformConfigs(projectConfig?.platformConfig, options.platformConfig);
|
|
16432
16668
|
const result = await processSnapshotFile({
|
|
16433
16669
|
file: filePath,
|
|
16434
16670
|
projectDir,
|
|
@@ -16438,7 +16674,7 @@ var handleSnapshotFile = async (filePath, projectDir, snapshotsDirName, options)
|
|
|
16438
16674
|
pcbOnly: options.pcbOnly,
|
|
16439
16675
|
schematicOnly: options.schematicOnly,
|
|
16440
16676
|
forceUpdate: options.forceUpdate,
|
|
16441
|
-
platformConfig
|
|
16677
|
+
platformConfig,
|
|
16442
16678
|
pcbSnapshotSettings: options.pcbSnapshotSettings,
|
|
16443
16679
|
createDiff: options.createDiff,
|
|
16444
16680
|
cameraPreset: options.cameraPreset
|
package/dist/lib/index.js
CHANGED
|
@@ -43606,6 +43606,18 @@ var require_semver = __commonJS((exports2, module2) => {
|
|
|
43606
43606
|
var { safeRe: re, t } = require_re();
|
|
43607
43607
|
var parseOptions = require_parse_options();
|
|
43608
43608
|
var { compareIdentifiers } = require_identifiers();
|
|
43609
|
+
var isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
43610
|
+
const identifiers = identifier.split(".");
|
|
43611
|
+
if (identifiers.length > prerelease.length) {
|
|
43612
|
+
return false;
|
|
43613
|
+
}
|
|
43614
|
+
for (let i = 0;i < identifiers.length; i++) {
|
|
43615
|
+
if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
|
|
43616
|
+
return false;
|
|
43617
|
+
}
|
|
43618
|
+
}
|
|
43619
|
+
return true;
|
|
43620
|
+
};
|
|
43609
43621
|
|
|
43610
43622
|
class SemVer {
|
|
43611
43623
|
constructor(version2, options) {
|
|
@@ -43845,8 +43857,9 @@ var require_semver = __commonJS((exports2, module2) => {
|
|
|
43845
43857
|
if (identifierBase === false) {
|
|
43846
43858
|
prerelease = [identifier];
|
|
43847
43859
|
}
|
|
43848
|
-
if (
|
|
43849
|
-
|
|
43860
|
+
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
43861
|
+
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
43862
|
+
if (isNaN(prereleaseBase)) {
|
|
43850
43863
|
this.prerelease = prerelease;
|
|
43851
43864
|
}
|
|
43852
43865
|
} else {
|
|
@@ -44317,6 +44330,7 @@ var require_range = __commonJS((exports2, module2) => {
|
|
|
44317
44330
|
return this.range;
|
|
44318
44331
|
}
|
|
44319
44332
|
parseRange(range) {
|
|
44333
|
+
range = range.replace(BUILDSTRIPRE, "");
|
|
44320
44334
|
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
44321
44335
|
const memoKey = memoOpts + ":" + range;
|
|
44322
44336
|
const cached = cache.get(memoKey);
|
|
@@ -44398,12 +44412,14 @@ var require_range = __commonJS((exports2, module2) => {
|
|
|
44398
44412
|
var SemVer = require_semver();
|
|
44399
44413
|
var {
|
|
44400
44414
|
safeRe: re,
|
|
44415
|
+
src,
|
|
44401
44416
|
t,
|
|
44402
44417
|
comparatorTrimReplace,
|
|
44403
44418
|
tildeTrimReplace,
|
|
44404
44419
|
caretTrimReplace
|
|
44405
44420
|
} = require_re();
|
|
44406
44421
|
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
44422
|
+
var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
|
|
44407
44423
|
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
44408
44424
|
var isAny = (c) => c.value === "";
|
|
44409
44425
|
var isSatisfiable = (comparators, options) => {
|
|
@@ -44432,6 +44448,7 @@ var require_range = __commonJS((exports2, module2) => {
|
|
|
44432
44448
|
return comp;
|
|
44433
44449
|
};
|
|
44434
44450
|
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
44451
|
+
var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
|
|
44435
44452
|
var replaceTildes = (comp, options) => {
|
|
44436
44453
|
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
44437
44454
|
};
|
|
@@ -44491,9 +44508,9 @@ var require_range = __commonJS((exports2, module2) => {
|
|
|
44491
44508
|
debug("no pr");
|
|
44492
44509
|
if (M === "0") {
|
|
44493
44510
|
if (m === "0") {
|
|
44494
|
-
ret = `>=${M}.${m}.${p}
|
|
44511
|
+
ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
|
|
44495
44512
|
} else {
|
|
44496
|
-
ret = `>=${M}.${m}.${p}
|
|
44513
|
+
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
44497
44514
|
}
|
|
44498
44515
|
} else {
|
|
44499
44516
|
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
@@ -44512,6 +44529,9 @@ var require_range = __commonJS((exports2, module2) => {
|
|
|
44512
44529
|
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
44513
44530
|
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
44514
44531
|
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
44532
|
+
if (invalidXRangeOrder(M, m, p)) {
|
|
44533
|
+
return comp;
|
|
44534
|
+
}
|
|
44515
44535
|
const xM = isX(M);
|
|
44516
44536
|
const xm = xM || isX(m);
|
|
44517
44537
|
const xp = xm || isX(p);
|
|
@@ -45120,7 +45140,7 @@ var require_subset = __commonJS((exports2, module2) => {
|
|
|
45120
45140
|
if (higher === c && higher !== gt) {
|
|
45121
45141
|
return false;
|
|
45122
45142
|
}
|
|
45123
|
-
} else if (gt.operator === ">=" && !
|
|
45143
|
+
} else if (gt.operator === ">=" && !c.test(gt.semver)) {
|
|
45124
45144
|
return false;
|
|
45125
45145
|
}
|
|
45126
45146
|
}
|
|
@@ -45135,7 +45155,7 @@ var require_subset = __commonJS((exports2, module2) => {
|
|
|
45135
45155
|
if (lower === c && lower !== lt) {
|
|
45136
45156
|
return false;
|
|
45137
45157
|
}
|
|
45138
|
-
} else if (lt.operator === "<=" && !
|
|
45158
|
+
} else if (lt.operator === "<=" && !c.test(lt.semver)) {
|
|
45139
45159
|
return false;
|
|
45140
45160
|
}
|
|
45141
45161
|
}
|
|
@@ -45315,7 +45335,7 @@ var require_isarray = __commonJS((exports2, module2) => {
|
|
|
45315
45335
|
};
|
|
45316
45336
|
});
|
|
45317
45337
|
|
|
45318
|
-
// node_modules/safe-buffer/index.js
|
|
45338
|
+
// node_modules/readable-stream/node_modules/safe-buffer/index.js
|
|
45319
45339
|
var require_safe_buffer = __commonJS((exports2, module2) => {
|
|
45320
45340
|
var buffer = __require("buffer");
|
|
45321
45341
|
var Buffer3 = buffer.Buffer;
|
|
@@ -46169,9 +46189,64 @@ var require__stream_duplex = __commonJS((exports2, module2) => {
|
|
|
46169
46189
|
};
|
|
46170
46190
|
});
|
|
46171
46191
|
|
|
46192
|
+
// node_modules/string_decoder/node_modules/safe-buffer/index.js
|
|
46193
|
+
var require_safe_buffer2 = __commonJS((exports2, module2) => {
|
|
46194
|
+
var buffer = __require("buffer");
|
|
46195
|
+
var Buffer3 = buffer.Buffer;
|
|
46196
|
+
function copyProps(src, dst) {
|
|
46197
|
+
for (var key in src) {
|
|
46198
|
+
dst[key] = src[key];
|
|
46199
|
+
}
|
|
46200
|
+
}
|
|
46201
|
+
if (Buffer3.from && Buffer3.alloc && Buffer3.allocUnsafe && Buffer3.allocUnsafeSlow) {
|
|
46202
|
+
module2.exports = buffer;
|
|
46203
|
+
} else {
|
|
46204
|
+
copyProps(buffer, exports2);
|
|
46205
|
+
exports2.Buffer = SafeBuffer;
|
|
46206
|
+
}
|
|
46207
|
+
function SafeBuffer(arg, encodingOrOffset, length) {
|
|
46208
|
+
return Buffer3(arg, encodingOrOffset, length);
|
|
46209
|
+
}
|
|
46210
|
+
copyProps(Buffer3, SafeBuffer);
|
|
46211
|
+
SafeBuffer.from = function(arg, encodingOrOffset, length) {
|
|
46212
|
+
if (typeof arg === "number") {
|
|
46213
|
+
throw new TypeError("Argument must not be a number");
|
|
46214
|
+
}
|
|
46215
|
+
return Buffer3(arg, encodingOrOffset, length);
|
|
46216
|
+
};
|
|
46217
|
+
SafeBuffer.alloc = function(size, fill, encoding) {
|
|
46218
|
+
if (typeof size !== "number") {
|
|
46219
|
+
throw new TypeError("Argument must be a number");
|
|
46220
|
+
}
|
|
46221
|
+
var buf = Buffer3(size);
|
|
46222
|
+
if (fill !== undefined) {
|
|
46223
|
+
if (typeof encoding === "string") {
|
|
46224
|
+
buf.fill(fill, encoding);
|
|
46225
|
+
} else {
|
|
46226
|
+
buf.fill(fill);
|
|
46227
|
+
}
|
|
46228
|
+
} else {
|
|
46229
|
+
buf.fill(0);
|
|
46230
|
+
}
|
|
46231
|
+
return buf;
|
|
46232
|
+
};
|
|
46233
|
+
SafeBuffer.allocUnsafe = function(size) {
|
|
46234
|
+
if (typeof size !== "number") {
|
|
46235
|
+
throw new TypeError("Argument must be a number");
|
|
46236
|
+
}
|
|
46237
|
+
return Buffer3(size);
|
|
46238
|
+
};
|
|
46239
|
+
SafeBuffer.allocUnsafeSlow = function(size) {
|
|
46240
|
+
if (typeof size !== "number") {
|
|
46241
|
+
throw new TypeError("Argument must be a number");
|
|
46242
|
+
}
|
|
46243
|
+
return buffer.SlowBuffer(size);
|
|
46244
|
+
};
|
|
46245
|
+
});
|
|
46246
|
+
|
|
46172
46247
|
// node_modules/string_decoder/lib/string_decoder.js
|
|
46173
46248
|
var require_string_decoder = __commonJS((exports2) => {
|
|
46174
|
-
var Buffer3 =
|
|
46249
|
+
var Buffer3 = require_safe_buffer2().Buffer;
|
|
46175
46250
|
var isEncoding = Buffer3.isEncoding || function(encoding) {
|
|
46176
46251
|
encoding = "" + encoding;
|
|
46177
46252
|
switch (encoding && encoding.toLowerCase()) {
|
|
@@ -65733,7 +65808,7 @@ var getNodeHandler = (winterSpec, { port, middleware = [] }) => {
|
|
|
65733
65808
|
}));
|
|
65734
65809
|
};
|
|
65735
65810
|
// package.json
|
|
65736
|
-
var version = "0.1.
|
|
65811
|
+
var version = "0.1.1468";
|
|
65737
65812
|
var package_default = {
|
|
65738
65813
|
name: "@tscircuit/cli",
|
|
65739
65814
|
version,
|
|
@@ -65748,15 +65823,16 @@ var package_default = {
|
|
|
65748
65823
|
"@tscircuit/circuit-json-placement-analysis": "^0.0.6",
|
|
65749
65824
|
"@tscircuit/circuit-json-routing-analysis": "^0.0.1",
|
|
65750
65825
|
"@tscircuit/circuit-json-schematic-placement-analysis": "github:tscircuit/circuit-json-schematic-placement-analysis#b6d5fe675adc26a2fc988aa081e6fb51e6bf696a",
|
|
65751
|
-
"@tscircuit/eval": "^0.0.
|
|
65826
|
+
"@tscircuit/eval": "^0.0.915",
|
|
65752
65827
|
"@tscircuit/fake-snippets": "^0.0.182",
|
|
65753
65828
|
"@tscircuit/file-server": "^0.0.32",
|
|
65754
65829
|
"@tscircuit/image-utils": "^0.0.3",
|
|
65755
65830
|
"@tscircuit/krt-wasm": "^0.1.0",
|
|
65756
65831
|
"@tscircuit/math-utils": "0.0.36",
|
|
65757
|
-
"@tscircuit/props": "^0.0.
|
|
65832
|
+
"@tscircuit/props": "^0.0.546",
|
|
65758
65833
|
"@tscircuit/runframe": "^0.0.2057",
|
|
65759
65834
|
"@tscircuit/schematic-match-adapt": "^0.0.22",
|
|
65835
|
+
"@tscircuit/solver-utils": "0.0.16",
|
|
65760
65836
|
"@types/bun": "^1.2.2",
|
|
65761
65837
|
"@types/configstore": "^6.0.2",
|
|
65762
65838
|
"@types/debug": "^4.1.12",
|
|
@@ -65807,7 +65883,7 @@ var package_default = {
|
|
|
65807
65883
|
semver: "^7.6.3",
|
|
65808
65884
|
stepts: "^0.0.3",
|
|
65809
65885
|
tempy: "^3.1.0",
|
|
65810
|
-
tscircuit: "0.0.
|
|
65886
|
+
tscircuit: "^0.0.1849-libonly",
|
|
65811
65887
|
tsx: "^4.7.1",
|
|
65812
65888
|
"typed-ky": "^0.0.4",
|
|
65813
65889
|
zod: "^3.23.8"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1469",
|
|
4
4
|
"main": "dist/cli/main.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/cli/main.js",
|
|
@@ -12,15 +12,16 @@
|
|
|
12
12
|
"@tscircuit/circuit-json-placement-analysis": "^0.0.6",
|
|
13
13
|
"@tscircuit/circuit-json-routing-analysis": "^0.0.1",
|
|
14
14
|
"@tscircuit/circuit-json-schematic-placement-analysis": "github:tscircuit/circuit-json-schematic-placement-analysis#b6d5fe675adc26a2fc988aa081e6fb51e6bf696a",
|
|
15
|
-
"@tscircuit/eval": "^0.0.
|
|
15
|
+
"@tscircuit/eval": "^0.0.915",
|
|
16
16
|
"@tscircuit/fake-snippets": "^0.0.182",
|
|
17
17
|
"@tscircuit/file-server": "^0.0.32",
|
|
18
18
|
"@tscircuit/image-utils": "^0.0.3",
|
|
19
19
|
"@tscircuit/krt-wasm": "^0.1.0",
|
|
20
20
|
"@tscircuit/math-utils": "0.0.36",
|
|
21
|
-
"@tscircuit/props": "^0.0.
|
|
21
|
+
"@tscircuit/props": "^0.0.546",
|
|
22
22
|
"@tscircuit/runframe": "^0.0.2057",
|
|
23
23
|
"@tscircuit/schematic-match-adapt": "^0.0.22",
|
|
24
|
+
"@tscircuit/solver-utils": "0.0.16",
|
|
24
25
|
"@types/bun": "^1.2.2",
|
|
25
26
|
"@types/configstore": "^6.0.2",
|
|
26
27
|
"@types/debug": "^4.1.12",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
"semver": "^7.6.3",
|
|
72
73
|
"stepts": "^0.0.3",
|
|
73
74
|
"tempy": "^3.1.0",
|
|
74
|
-
"tscircuit": "0.0.
|
|
75
|
+
"tscircuit": "^0.0.1849-libonly",
|
|
75
76
|
"tsx": "^4.7.1",
|
|
76
77
|
"typed-ky": "^0.0.4",
|
|
77
78
|
"zod": "^3.23.8"
|