@wave-ai-os/wave-cli 0.1.58 → 0.1.59

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/README.md CHANGED
@@ -103,14 +103,19 @@ Config files are JSON objects using the same keys accepted by `--auth-json-stdin
103
103
  }
104
104
  ```
105
105
 
106
- For a persistent production login, use the production endpoint explicitly and
107
- save only that endpoint to the local CLI config. The token remains in the
108
- configured credential store, not in `config.json`:
106
+ For a persistent production login, configure `https://api.ourwave.io` as the
107
+ GraphQL/API base and save only that API endpoint to the local CLI config. The
108
+ token remains in the configured credential store, not in `config.json`:
109
109
 
110
110
  ```bash
111
111
  wave --base-url https://api.ourwave.io login --save-base-url
112
112
  ```
113
113
 
114
+ The API host is not the browser-login destination. When production returns a
115
+ relative authorization path such as `/cli/login?code=<code>`, the CLI opens the
116
+ Wave app login page at
117
+ `https://app.ourwave.io/login?next=%2Fcli%2Flogin%3Fcode%3D<encoded-code>`.
118
+
114
119
  For a headless environment, add `--no-browser`. This is explicit by design:
115
120
  it does not replace a developer's local API endpoint unless they request it.
116
121
 
package/dist/index.cjs CHANGED
@@ -10151,6 +10151,11 @@ function absoluteAuthorizeUrl(baseUrl, authorizeUrl, uiBaseUrl = explicitUiBaseU
10151
10151
  if (/^https?:\/\//i.test(authorizeUrl)) {
10152
10152
  return authorizeUrl;
10153
10153
  }
10154
+ if (new URL(baseUrl).hostname.toLowerCase() === "api.ourwave.io") {
10155
+ const loginUrl = new URL("https://app.ourwave.io/login");
10156
+ loginUrl.searchParams.set("next", authorizeUrl);
10157
+ return loginUrl.toString();
10158
+ }
10154
10159
  return new URL(authorizeUrl, uiBaseUrl ?? localUiBaseUrlFor(baseUrl) ?? baseUrl).toString();
10155
10160
  }
10156
10161
  function canOpenBrowser(noBrowser) {
@@ -15793,7 +15798,7 @@ function attachDiscoveryHelp(program) {
15793
15798
  }
15794
15799
 
15795
15800
  // src/version.ts
15796
- var CLI_VERSION = "0.1.58";
15801
+ var CLI_VERSION = "0.1.59";
15797
15802
 
15798
15803
  // src/cli.ts
15799
15804
  function buildCli(options) {
package/dist/index.js CHANGED
@@ -10150,6 +10150,11 @@ function absoluteAuthorizeUrl(baseUrl, authorizeUrl, uiBaseUrl = explicitUiBaseU
10150
10150
  if (/^https?:\/\//i.test(authorizeUrl)) {
10151
10151
  return authorizeUrl;
10152
10152
  }
10153
+ if (new URL(baseUrl).hostname.toLowerCase() === "api.ourwave.io") {
10154
+ const loginUrl = new URL("https://app.ourwave.io/login");
10155
+ loginUrl.searchParams.set("next", authorizeUrl);
10156
+ return loginUrl.toString();
10157
+ }
10153
10158
  return new URL(authorizeUrl, uiBaseUrl ?? localUiBaseUrlFor(baseUrl) ?? baseUrl).toString();
10154
10159
  }
10155
10160
  function canOpenBrowser(noBrowser) {
@@ -15792,7 +15797,7 @@ function attachDiscoveryHelp(program) {
15792
15797
  }
15793
15798
 
15794
15799
  // src/version.ts
15795
- var CLI_VERSION = "0.1.58";
15800
+ var CLI_VERSION = "0.1.59";
15796
15801
 
15797
15802
  // src/cli.ts
15798
15803
  function buildCli(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wave-ai-os/wave-cli",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "wave": "dist/index.js"