Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,15 @@ The CLI source is MIT licensed. The hosted Pushman service, iPhone app, monthly

## Configuration

The production API is `https://api.pushman.whitekiwi.link/v1`. For local development, an explicit loopback override is supported:
The source default targets the live service at `https://api.pushman.io/v1`.
Client publication remains separate; existing releases default to
`https://api.pushman.whitekiwi.link/v1`. Set `PUSHMAN_API_URL=https://api.pushman.io/v1`
in each CLI and local MCP process until using a release with the updated default.
The new endpoint requires `pushman login` again. Credentials are scoped to the API base: login and
logout at the new endpoint preserve the old endpoint's keyring entry. There is no
automatic credential copy or fallback to the previous API.

For local development, an explicit loopback override is supported:

```sh
make pdev ARGS=status
Expand Down
2 changes: 1 addition & 1 deletion api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ info:
name: MIT
identifier: MIT
servers:
- url: https://api.pushman.whitekiwi.link/v1
- url: https://api.pushman.io/v1
description: Production API origin.
security:
- bearerAuth: []
Expand Down
32 changes: 32 additions & 0 deletions cmd/pushman/main_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
package main

import (
"errors"
"runtime/debug"
"testing"

pushclient "github.com/pushmanhq/pushman-cli/internal/client"
"github.com/pushmanhq/pushman-cli/internal/credential"
keyring "github.com/zalando/go-keyring"
)

func TestResolveVersionInfoUsesModuleAndVCSMetadata(t *testing.T) {
Expand Down Expand Up @@ -54,3 +59,30 @@ func TestCredentialServiceNameSeparatesDevelopmentCredentials(t *testing.T) {
t.Fatalf("development credential service = %q", development)
}
}

func TestMigratedEndpointRequiresAnIndependentKeyringLogin(t *testing.T) {
keyring.MockInit()
old := credential.NewKeyring(credentialServiceName("https://api.pushman.whitekiwi.link/v1", ""))
target := credential.NewKeyring(credentialServiceName(pushclient.DefaultBaseURL, ""))
if err := old.Set("synthetic-old-endpoint-token"); err != nil {
t.Fatal(err)
}
if _, err := target.Get(); !errors.Is(err, credential.ErrNotFound) {
t.Fatal("new endpoint reused an existing endpoint credential")
}
if err := target.Set("synthetic-new-endpoint-token"); err != nil {
t.Fatal(err)
}
if token, err := old.Get(); err != nil || token != "synthetic-old-endpoint-token" {
t.Fatal("new login changed the original endpoint credential")
}
if err := target.Delete(); err != nil {
t.Fatal(err)
}
if _, err := target.Get(); !errors.Is(err, credential.ErrNotFound) {
t.Fatal("new endpoint logout did not clear its own credential")
}
if token, err := old.Get(); err != nil || token != "synthetic-old-endpoint-token" {
t.Fatal("new endpoint logout changed the original endpoint credential")
}
}
2 changes: 1 addition & 1 deletion internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/pushmanhq/pushman-cli/internal/credential"
)

const DefaultBaseURL = "https://api.pushman.whitekiwi.link/v1"
const DefaultBaseURL = "https://api.pushman.io/v1"
Comment thread
WhiteKiwi marked this conversation as resolved.

type WaitFunc func(context.Context, time.Duration) error

Expand Down
Loading