@tscircuit/cli 0.0.102 → 0.0.104

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.
@@ -6,14 +6,13 @@ export const getGeneratedReadme = ({
6
6
  shouldHaveProjectGeneratedNotice?: boolean
7
7
  }) => {
8
8
  return `
9
- # ${name}
9
+ # ${name.split("/").pop()?.split(".").pop()}
10
10
 
11
11
  [![tscircuit version badge](https://registry-api.tscircuit.com/badges/view?package_name=${name
12
- .replace("@", "")
13
- .replace("/", ".")})](https://registry.tscircuit.com/${name.replace(
14
- "@",
15
- ""
16
- )})
12
+ .replace("@tsci/", "")
13
+ .replace("/", ".")})](https://registry.tscircuit.com/${name
14
+ .replace("@tsci/", "")
15
+ .replace(".", "/")})
17
16
 
18
17
  ${
19
18
  shouldHaveProjectGeneratedNotice
@@ -14,6 +14,7 @@ import { getGeneratedReadme } from "./get-generated-readme"
14
14
  import { getGeneratedTsconfig } from "./get-generated-tsconfig"
15
15
  import { getGeneratedNpmrc } from "./get-generated-npmrc"
16
16
  import { createOrModifyNpmrc } from "./create-or-modify-npmrc"
17
+ import prompts from "prompts"
17
18
 
18
19
  export const initCmd = async (ctx: AppContext, args: any) => {
19
20
  const params = z
@@ -39,9 +40,13 @@ export const initCmd = async (ctx: AppContext, args: any) => {
39
40
  if (subName === ".") {
40
41
  subName = Path.basename(Path.resolve(params.dir))
41
42
  }
42
- params.name = `@${myAccount.github_username}/${subName}`
43
+ params.name = `@tsci/${myAccount.github_username}.${subName}`
43
44
  } catch (e: any) {
44
- params.name = Path.basename(params.dir ?? ctx.cwd)
45
+ const { github_username, package_name } = await prompts([
46
+ { type: "text", name: "github_username", message: "GitHub username" },
47
+ { type: "text", name: "package_name", message: "Package name" },
48
+ ])
49
+ params.name = `@tsci/${github_username}.${package_name}`
45
50
  }
46
51
  }
47
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.0.102",
3
+ "version": "0.0.104",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Command line tool for developing, publishing and installing tscircuit circuits",
@@ -35,10 +35,6 @@
35
35
  "dependencies": {
36
36
  "@edge-runtime/primitives": "^4.1.0",
37
37
  "@hono/node-server": "^1.8.2",
38
- "@tscircuit/builder": "1.5.128",
39
- "@tscircuit/layout": "^0.0.20",
40
- "@tscircuit/react-fiber": "^1.1.29",
41
- "@tscircuit/soup-util": "^0.0.1",
42
38
  "archiver": "^7.0.1",
43
39
  "axios": "^1.6.7",
44
40
  "better-sqlite3": "^9.4.3",
@@ -71,7 +67,18 @@
71
67
  "tsup": "^8.0.2",
72
68
  "zod": "latest"
73
69
  },
70
+ "peerDependencies": {
71
+ "@tscircuit/builder": "*",
72
+ "@tscircuit/layout": "*",
73
+ "@tscircuit/react-fiber": "*",
74
+ "@tscircuit/soup-util": "*",
75
+ "@tscircuit/manual-edit-events": "*"
76
+ },
74
77
  "devDependencies": {
78
+ "@tscircuit/builder": "1.5.128",
79
+ "@tscircuit/layout": "^0.0.20",
80
+ "@tscircuit/react-fiber": "^1.1.29",
81
+ "@tscircuit/soup-util": "^0.0.1",
75
82
  "@tscircuit/manual-edit-events": "^0.0.4",
76
83
  "@types/archiver": "^6.0.2",
77
84
  "@types/bun": "^1.0.8",