@tscircuit/cli 0.1.105 → 0.1.106
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/README.md +5 -5
- package/dist/main.js +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ npm install -g @tscircuit/cli
|
|
|
31
31
|
```
|
|
32
32
|
Usage: tsci [options] [command]
|
|
33
33
|
|
|
34
|
-
CLI for developing tscircuit
|
|
34
|
+
CLI for developing tscircuit snippets
|
|
35
35
|
|
|
36
36
|
Options:
|
|
37
37
|
-h, --help display help for command
|
|
@@ -40,9 +40,9 @@ Commands:
|
|
|
40
40
|
init [directory] Initialize a new TSCircuit project in the
|
|
41
41
|
specified directory (or current directory if none
|
|
42
42
|
is provided)
|
|
43
|
-
dev [options] [file] Start development server for a
|
|
44
|
-
clone [options] <
|
|
45
|
-
push [options] [file] Save
|
|
43
|
+
dev [options] [file] Start development server for a snippet
|
|
44
|
+
clone [options] <snippet> Clone a snippet from the registry
|
|
45
|
+
push [options] [file] Save snippet code to Registry API
|
|
46
46
|
auth Login/logout
|
|
47
47
|
login Login to tscircuit registry
|
|
48
48
|
logout Logout from tscircuit registry
|
|
@@ -52,7 +52,7 @@ Commands:
|
|
|
52
52
|
remove <component> Remove a tscircuit component package from your
|
|
53
53
|
project
|
|
54
54
|
upgrade Upgrade CLI to the latest version
|
|
55
|
-
search <query> Search for
|
|
55
|
+
search <query> Search for snippets in the tscircuit registry
|
|
56
56
|
version Print CLI version
|
|
57
57
|
help [command] display help for command
|
|
58
58
|
```
|
package/dist/main.js
CHANGED
|
@@ -433495,7 +433495,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
|
|
|
433495
433495
|
import { execSync as execSync2 } from "node:child_process";
|
|
433496
433496
|
var import_semver = __toESM2(require_semver2(), 1);
|
|
433497
433497
|
// package.json
|
|
433498
|
-
var version = "0.1.
|
|
433498
|
+
var version = "0.1.105";
|
|
433499
433499
|
var package_default = {
|
|
433500
433500
|
name: "@tscircuit/cli",
|
|
433501
433501
|
version,
|
|
@@ -438996,7 +438996,7 @@ var pushSnippet = async ({
|
|
|
438996
438996
|
}) => {
|
|
438997
438997
|
const sessionToken = cliConfig.get("sessionToken");
|
|
438998
438998
|
if (!sessionToken) {
|
|
438999
|
-
onError("You need to log in to save
|
|
438999
|
+
onError("You need to log in to save package. Run 'tsci login' to authenticate.");
|
|
439000
439000
|
return onExit(1);
|
|
439001
439001
|
}
|
|
439002
439002
|
const snippetFilePath = await getEntrypoint({
|
|
@@ -439423,7 +439423,7 @@ var getVersion = () => {
|
|
|
439423
439423
|
|
|
439424
439424
|
// cli/dev/register.ts
|
|
439425
439425
|
var registerDev = (program3) => {
|
|
439426
|
-
program3.command("dev").description("Start development server for a
|
|
439426
|
+
program3.command("dev").description("Start development server for a package").argument("[file]", "Path to the package file").option("-p, --port <number>", "Port to run server on", "3020").action(async (file, options) => {
|
|
439427
439427
|
let port = parseInt(options.port);
|
|
439428
439428
|
const startTime = Date.now();
|
|
439429
439429
|
const isPortAvailable = (port2) => {
|
|
@@ -439458,7 +439458,7 @@ var registerDev = (program3) => {
|
|
|
439458
439458
|
}
|
|
439459
439459
|
}
|
|
439460
439460
|
try {
|
|
439461
|
-
process.stdout.write(kleur_default.gray("Installing types for imported
|
|
439461
|
+
process.stdout.write(kleur_default.gray("Installing types for imported packages..."));
|
|
439462
439462
|
await installNodeModuleTypesForSnippet(absolutePath);
|
|
439463
439463
|
console.log(kleur_default.green(" done"));
|
|
439464
439464
|
} catch (error) {
|
|
@@ -439612,12 +439612,12 @@ var registerConfigPrint = (program3) => {
|
|
|
439612
439612
|
import * as fs20 from "node:fs";
|
|
439613
439613
|
import * as path20 from "node:path";
|
|
439614
439614
|
var registerClone = (program3) => {
|
|
439615
|
-
program3.command("clone").description("Clone a
|
|
439615
|
+
program3.command("clone").description("Clone a package from the registry").argument("<package>", "Package to clone (e.g. author/packageName or https://tscircuit.com/author/packageName)").option("-a, --include-author", "Include author name in the directory path").action(async (snippetPath, options) => {
|
|
439616
439616
|
const urlMatch = snippetPath.match(/^https:\/\/tscircuit\.com\/([^\/]+)\/([^\/]+)\/?$/i);
|
|
439617
439617
|
const originalMatch = !urlMatch && snippetPath.match(/^(?:@tsci\/)?([^/.]+)[/.]([^/.]+)$/);
|
|
439618
439618
|
const originalCwd = process.cwd();
|
|
439619
439619
|
if (!urlMatch && !originalMatch) {
|
|
439620
|
-
console.error(`Invalid
|
|
439620
|
+
console.error(`Invalid package path "${snippetPath}". Accepted formats:
|
|
439621
439621
|
- author/snippetName
|
|
439622
439622
|
- author.snippetName
|
|
439623
439623
|
- @tsci/author.snippetName
|
|
@@ -464607,7 +464607,7 @@ var exportSnippet = async ({
|
|
|
464607
464607
|
|
|
464608
464608
|
// cli/export/register.ts
|
|
464609
464609
|
var registerExport = (program3) => {
|
|
464610
|
-
program3.command("export").description("Export tscircuit code to various formats").argument("<file>", "Path to the
|
|
464610
|
+
program3.command("export").description("Export tscircuit code to various formats").argument("<file>", "Path to the package file").option("-f, --format <format>", "Output format").option("-o, --output <path>", "Output file path").action(async (file, options) => {
|
|
464611
464611
|
await exportSnippet({
|
|
464612
464612
|
filePath: file,
|
|
464613
464613
|
format: options.format ?? "json",
|
|
@@ -464705,7 +464705,7 @@ var registerConfigSet = (program3) => {
|
|
|
464705
464705
|
// cli/search/register.ts
|
|
464706
464706
|
var import_prompts5 = __toESM2(require_prompts3(), 1);
|
|
464707
464707
|
var registerSearch = (program3) => {
|
|
464708
|
-
program3.command("search").description("Search for
|
|
464708
|
+
program3.command("search").description("Search for packages in the tscircuit registry").argument("<query>", "Search query (e.g. keyword, author, or package name)").action(async (query) => {
|
|
464709
464709
|
const ky2 = getRegistryApiKy();
|
|
464710
464710
|
let results = { packages: [] };
|
|
464711
464711
|
try {
|
|
@@ -464786,7 +464786,7 @@ var registerRemove = (program3) => {
|
|
|
464786
464786
|
|
|
464787
464787
|
// cli/main.ts
|
|
464788
464788
|
var program2 = new Command;
|
|
464789
|
-
program2.name("tsci").description("CLI for developing tscircuit
|
|
464789
|
+
program2.name("tsci").description("CLI for developing tscircuit packages");
|
|
464790
464790
|
registerInit(program2);
|
|
464791
464791
|
registerDev(program2);
|
|
464792
464792
|
registerClone(program2);
|