showpane 0.4.19 → 0.4.20

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-04-11T23:18:05.246Z",
3
+ "generatedAt": "2026-04-12T08:47:16.973Z",
4
4
  "scaffoldVersion": "0.2.7",
5
5
  "files": {
6
6
  ".env.example": "ed105f2bdcd1888a98181d55e3c9f7d6eff3ae9c3e2366c2e777a12e3caddfa7",
@@ -1 +1 @@
1
- 0.4.19
1
+ 0.4.20
package/dist/index.js CHANGED
@@ -1554,11 +1554,18 @@ async function openClaude(args) {
1554
1554
  async function login() {
1555
1555
  printBanner();
1556
1556
  ensureShowpaneShim();
1557
+ const config = readShowpaneConfig();
1557
1558
  blue("Authenticating with Showpane...");
1558
1559
  console.log();
1559
1560
  let initRes;
1560
1561
  try {
1561
- initRes = await fetch(`${API_BASE}/api/cli/init`, { method: "POST" });
1562
+ initRes = await fetch(`${API_BASE}/api/cli/init`, {
1563
+ method: "POST",
1564
+ headers: { "Content-Type": "application/json" },
1565
+ body: JSON.stringify({
1566
+ orgSlug: typeof config.orgSlug === "string" ? config.orgSlug : ""
1567
+ })
1568
+ });
1562
1569
  } catch (errorLike) {
1563
1570
  const message = errorLike instanceof Error ? errorLike.message : String(errorLike);
1564
1571
  throw new Error(
@@ -1590,14 +1597,14 @@ async function login() {
1590
1597
  }
1591
1598
  const data = await pollRes.json();
1592
1599
  if (data.status !== "approved") continue;
1593
- const config = readShowpaneConfig();
1594
- config.accessToken = data.accessToken;
1595
- config.accessTokenExpiresAt = data.tokenExpiresAt;
1596
- config.orgSlug = data.orgSlug;
1597
- config.portalUrl = data.portalUrl;
1598
- const currentWorkspace = findWorkspaceRoot(process.cwd()) ?? (config.app_path ? findWorkspaceRoot(config.app_path) ?? resolve(config.app_path) : null);
1600
+ const config2 = readShowpaneConfig();
1601
+ config2.accessToken = data.accessToken;
1602
+ config2.accessTokenExpiresAt = data.tokenExpiresAt;
1603
+ config2.orgSlug = data.orgSlug;
1604
+ config2.portalUrl = data.portalUrl;
1605
+ const currentWorkspace = findWorkspaceRoot(process.cwd()) ?? (config2.app_path ? findWorkspaceRoot(config2.app_path) ?? resolve(config2.app_path) : null);
1599
1606
  if (currentWorkspace) {
1600
- updateWorkspaceFromConfig(config, currentWorkspace, {
1607
+ updateWorkspaceFromConfig(config2, currentWorkspace, {
1601
1608
  name: basename(currentWorkspace),
1602
1609
  deployMode: "cloud",
1603
1610
  orgSlug: data.orgSlug
@@ -1607,9 +1614,9 @@ async function login() {
1607
1614
  } catch {
1608
1615
  }
1609
1616
  } else {
1610
- config.deploy_mode = "cloud";
1617
+ config2.deploy_mode = "cloud";
1611
1618
  }
1612
- writeShowpaneConfig(config);
1619
+ writeShowpaneConfig(config2);
1613
1620
  console.log();
1614
1621
  green(`Authenticated! Connected to ${BOLD}${data.orgSlug}${RESET}`);
1615
1622
  console.log();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "showpane",
3
- "version": "0.4.19",
3
+ "version": "0.4.20",
4
4
  "description": "CLI for Showpane — AI-generated client portals",
5
5
  "type": "module",
6
6
  "bin": {