@tscircuit/cli 0.0.43 → 0.0.45

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.
@@ -8,10 +8,12 @@ export const getGeneratedReadme = ({
8
8
  return `
9
9
  # ${name}
10
10
 
11
- [![tscircuit version badge](https://registry.tscircuit.com/badges/view?package_name=${name.replace(
12
- "/",
13
- "."
14
- )})](https://registry.tscircuit.com/${name.replace("@", "")})
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
+ )})
15
17
 
16
18
  ${
17
19
  shouldHaveProjectGeneratedNotice
@@ -35,8 +35,12 @@ export const initCmd = async (ctx: AppContext, args: any) => {
35
35
  const myAccount = await ctx.axios
36
36
  .get("/accounts/get")
37
37
  .then((r) => r.data.account)
38
- params.name = `@${myAccount.github_username}/${Path.basename(params.dir)}`
39
- } catch (e) {
38
+ let subName = Path.basename(params.dir)
39
+ if (subName === ".") {
40
+ subName = Path.basename(Path.resolve(params.dir))
41
+ }
42
+ params.name = `@${myAccount.github_username}/${subName}`
43
+ } catch (e: any) {
40
44
  params.name = Path.basename(params.dir ?? ctx.cwd)
41
45
  }
42
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Command line tool for developing, publishing and installing tscircuit circuits",