@tscircuit/cli 0.1.179 → 0.1.180
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 +19 -4
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -434909,7 +434909,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
|
|
|
434909
434909
|
import { execSync as execSync2 } from "node:child_process";
|
|
434910
434910
|
var import_semver2 = __toESM2(require_semver2(), 1);
|
|
434911
434911
|
// package.json
|
|
434912
|
-
var version = "0.1.
|
|
434912
|
+
var version = "0.1.179";
|
|
434913
434913
|
var package_default = {
|
|
434914
434914
|
name: "@tscircuit/cli",
|
|
434915
434915
|
version,
|
|
@@ -438467,7 +438467,13 @@ var getEntrypoint = async ({
|
|
|
438467
438467
|
onError = (message) => console.error(message)
|
|
438468
438468
|
}) => {
|
|
438469
438469
|
if (filePath) {
|
|
438470
|
-
|
|
438470
|
+
const absolutePath = path13.resolve(projectDir, filePath);
|
|
438471
|
+
if (fs12.existsSync(absolutePath)) {
|
|
438472
|
+
onSuccess(`Using provided file: '${path13.relative(projectDir, absolutePath)}'`);
|
|
438473
|
+
return absolutePath;
|
|
438474
|
+
}
|
|
438475
|
+
onError(kleur_default.red(`File not found: '${filePath}'`));
|
|
438476
|
+
return null;
|
|
438471
438477
|
}
|
|
438472
438478
|
const projectConfig = loadProjectConfig(projectDir);
|
|
438473
438479
|
if (projectConfig?.mainEntrypoint) {
|
|
@@ -438480,10 +438486,19 @@ var getEntrypoint = async ({
|
|
|
438480
438486
|
const possibleEntrypoints = [
|
|
438481
438487
|
path13.resolve(projectDir, "index.tsx"),
|
|
438482
438488
|
path13.resolve(projectDir, "index.ts"),
|
|
438489
|
+
path13.resolve(projectDir, "index.circuit.tsx"),
|
|
438490
|
+
path13.resolve(projectDir, "main.tsx"),
|
|
438491
|
+
path13.resolve(projectDir, "main.circuit.tsx"),
|
|
438483
438492
|
path13.resolve(projectDir, "lib/index.tsx"),
|
|
438484
438493
|
path13.resolve(projectDir, "lib/index.ts"),
|
|
438494
|
+
path13.resolve(projectDir, "lib/index.circuit.tsx"),
|
|
438495
|
+
path13.resolve(projectDir, "lib/main.tsx"),
|
|
438496
|
+
path13.resolve(projectDir, "lib/main.circuit.tsx"),
|
|
438485
438497
|
path13.resolve(projectDir, "src/index.tsx"),
|
|
438486
|
-
path13.resolve(projectDir, "src/index.ts")
|
|
438498
|
+
path13.resolve(projectDir, "src/index.ts"),
|
|
438499
|
+
path13.resolve(projectDir, "src/index.circuit.tsx"),
|
|
438500
|
+
path13.resolve(projectDir, "src/main.tsx"),
|
|
438501
|
+
path13.resolve(projectDir, "src/main.circuit.tsx")
|
|
438487
438502
|
];
|
|
438488
438503
|
let detectedEntrypoint = null;
|
|
438489
438504
|
for (const entrypoint of possibleEntrypoints) {
|
|
@@ -439072,7 +439087,7 @@ var pushSnippet = async ({
|
|
|
439072
439087
|
}
|
|
439073
439088
|
const snippetFilePath = await getEntrypoint({
|
|
439074
439089
|
filePath,
|
|
439075
|
-
onSuccess,
|
|
439090
|
+
onSuccess: () => {},
|
|
439076
439091
|
onError
|
|
439077
439092
|
});
|
|
439078
439093
|
if (!snippetFilePath) {
|