@tscircuit/cli 0.0.17 → 0.0.19
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.js +6 -5
- package/lib/cmd-fns/publish/index.ts +0 -28
- package/lib/get-program.ts +1 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -653,10 +653,6 @@ var publish = async (ctx, args2) => {
|
|
|
653
653
|
patch: z15.boolean().optional(),
|
|
654
654
|
lock: z15.boolean().optional()
|
|
655
655
|
}).parse(args2);
|
|
656
|
-
if (typeof Bun === "undefined") {
|
|
657
|
-
console.log(kleur4.red("\n\n----------------------------------\nBun is currently required for publishing packages to the tscircuit registry. Try installing bun:\nhhttps://bun.sh/docs/installation\n\n---------------------"));
|
|
658
|
-
process.exit(1);
|
|
659
|
-
}
|
|
660
656
|
const shouldIncrement = params.increment || params.patch;
|
|
661
657
|
if (!await fs5.exists(Path2.join(ctx.cwd, "package.json"))) {
|
|
662
658
|
console.log(kleur4.red("No package.json found in current directory"));
|
|
@@ -1527,6 +1523,10 @@ var devServerUpload = async (ctx, args2) => {
|
|
|
1527
1523
|
const watcher = await startWatcher({ cwd: params.dir, devServerAxios });
|
|
1528
1524
|
}
|
|
1529
1525
|
};
|
|
1526
|
+
// lib/cmd-fns/config-clear.ts
|
|
1527
|
+
var configClear = async (ctx, args2) => {
|
|
1528
|
+
ctx.global_config.clear();
|
|
1529
|
+
};
|
|
1530
1530
|
// lib/cmd-fns/open.ts
|
|
1531
1531
|
import {existsSync as existsSync4, readFileSync as readFileSync6} from "fs";
|
|
1532
1532
|
import kleur16 from "kleur";
|
|
@@ -1546,7 +1546,7 @@ var openCmd = async (ctx, args2) => {
|
|
|
1546
1546
|
// package.json
|
|
1547
1547
|
var package_default = {
|
|
1548
1548
|
name: "@tscircuit/cli",
|
|
1549
|
-
version: "0.0.
|
|
1549
|
+
version: "0.0.18",
|
|
1550
1550
|
private: false,
|
|
1551
1551
|
type: "module",
|
|
1552
1552
|
description: "Command line tool for developing, publishing and installing tscircuit circuits",
|
|
@@ -1639,6 +1639,7 @@ var getProgram = (ctx) => {
|
|
|
1639
1639
|
configCmd.command("set-session").requiredOption("--session-token <session_token>", "Session Token").action((args2) => configSetSession(ctx, args2));
|
|
1640
1640
|
configCmd.command("set-log-requests").requiredOption("--log-requests", "Should log requests to registry").action((args2) => configSetLogRequests(ctx, args2));
|
|
1641
1641
|
configCmd.command("print-config").action((args2) => configPrintConfig(ctx, args2));
|
|
1642
|
+
configCmd.command("clear").action((args2) => configClear(ctx, args2));
|
|
1642
1643
|
const authSessionsCmd = authCmd.command("sessions");
|
|
1643
1644
|
authSessionsCmd.command("create").action((args2) => authSessionsCreate(ctx, args2));
|
|
1644
1645
|
authSessionsCmd.command("list").action((args2) => authSessionsList(ctx, args2));
|
|
@@ -22,14 +22,6 @@ export const publish = async (ctx: AppContext, args: any) => {
|
|
|
22
22
|
lock: z.boolean().optional(),
|
|
23
23
|
})
|
|
24
24
|
.parse(args)
|
|
25
|
-
if (typeof Bun === "undefined") {
|
|
26
|
-
console.log(
|
|
27
|
-
kleur.red(
|
|
28
|
-
"\n\n----------------------------------\nBun is currently required for publishing packages to the tscircuit registry. Try installing bun:\nhhttps://bun.sh/docs/installation\n\n---------------------"
|
|
29
|
-
)
|
|
30
|
-
)
|
|
31
|
-
process.exit(1)
|
|
32
|
-
}
|
|
33
25
|
|
|
34
26
|
const shouldIncrement = params.increment || params.patch
|
|
35
27
|
|
|
@@ -42,26 +34,6 @@ export const publish = async (ctx: AppContext, args: any) => {
|
|
|
42
34
|
await readFileSync(Path.join(ctx.cwd, "package.json"), "utf-8")
|
|
43
35
|
)
|
|
44
36
|
|
|
45
|
-
// TODO possibly use esbuild here, it's got stuff like packages: "external"
|
|
46
|
-
// await Bun.build({
|
|
47
|
-
// root: ctx.cwd,
|
|
48
|
-
// // TODO determine entrypoint in a more clever way e.g.
|
|
49
|
-
// // - package.json "main"
|
|
50
|
-
// entrypoints: ["index.ts"],
|
|
51
|
-
|
|
52
|
-
// // Everything should be external since it's a node module, esbuild has a
|
|
53
|
-
// // packages: "external" option for this
|
|
54
|
-
// external: [
|
|
55
|
-
// ...Object.keys(packageJson.dependencies || {}),
|
|
56
|
-
// ...Object.keys(packageJson.devDependencies || {}),
|
|
57
|
-
// ...Object.keys(packageJson.peerDependencies || {}),
|
|
58
|
-
// ...Object.keys(packageJson.trustedDependencies || {}),
|
|
59
|
-
// ],
|
|
60
|
-
|
|
61
|
-
// outdir: "dist",
|
|
62
|
-
|
|
63
|
-
// target: "node",
|
|
64
|
-
// })
|
|
65
37
|
await esbuild.build({
|
|
66
38
|
entryPoints: ["index.ts"], // TODO dynamically determine entrypoint
|
|
67
39
|
bundle: true,
|
package/lib/get-program.ts
CHANGED
|
@@ -47,6 +47,7 @@ export const getProgram = (ctx: AppContext) => {
|
|
|
47
47
|
configCmd
|
|
48
48
|
.command("print-config")
|
|
49
49
|
.action((args) => CMDFN.configPrintConfig(ctx, args))
|
|
50
|
+
configCmd.command("clear").action((args) => CMDFN.configClear(ctx, args))
|
|
50
51
|
|
|
51
52
|
const authSessionsCmd = authCmd.command("sessions")
|
|
52
53
|
|