@wave-ai-os/wave-cli 0.1.66 → 0.1.67

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
@@ -69,7 +69,10 @@ Notes:
69
69
  Required (from flags, stdin, env, config, or stored credentials):
70
70
 
71
71
  - `WAVE_API_TOKEN`
72
- - `WAVE_API_BASE_URL`
72
+
73
+ The API base defaults to production: `https://api.ourwave.io`. Supply
74
+ `--base-url`, stdin context, `WAVE_API_BASE_URL`/`WAVE_API_URL`, or config only
75
+ when using a non-production environment.
73
76
 
74
77
  Organization-scoped data commands use the organization certified by the
75
78
  authenticated CLI token. `--organization-id` is the only local override.
@@ -92,7 +95,7 @@ Deterministic precedence:
92
95
  - stdin context (`--token-stdin` or `--auth-json-stdin`)
93
96
  - env vars (`WAVE_*`)
94
97
  - config file (`--config`, `WAVE_CONFIG_PATH`, or `~/.wave/config.json` when present)
95
- - failure with structured JSON error
98
+ - production API default (`https://api.ourwave.io`)
96
99
 
97
100
  Config files are JSON objects using the same keys accepted by `--auth-json-stdin`, for example:
98
101
 
@@ -104,12 +107,12 @@ Config files are JSON objects using the same keys accepted by `--auth-json-stdin
104
107
  }
105
108
  ```
106
109
 
107
- For a persistent production login, configure `https://api.ourwave.io` as the
108
- GraphQL/API base and save only that API endpoint to the local CLI config. The
109
- token remains in the configured credential store, not in `config.json`:
110
+ For a persistent production login, `wave login --save-base-url` saves the
111
+ default production GraphQL/API base to the local CLI config. The token remains
112
+ in the configured credential store, not in `config.json`:
110
113
 
111
114
  ```bash
112
- wave --base-url https://api.ourwave.io login --save-base-url
115
+ wave login --save-base-url
113
116
  ```
114
117
 
115
118
  The API host is not the browser-login destination. When production returns a
package/dist/index.cjs CHANGED
@@ -58,6 +58,9 @@ function mapStatusToExitCode(status) {
58
58
  return EXIT_CODES.generic;
59
59
  }
60
60
 
61
+ // src/runtimeDefaults.ts
62
+ var DEFAULT_PRODUCTION_API_BASE_URL = "https://api.ourwave.io";
63
+
61
64
  // src/config.ts
62
65
  var DEFAULT_TIMEOUT_MS = 1e4;
63
66
  var configSchema = import_zod.z.object({
@@ -116,15 +119,7 @@ function getConfig(options) {
116
119
  exitCode: EXIT_CODES.missingOrInvalidAuth
117
120
  });
118
121
  }
119
- const baseUrl = options.baseUrl ?? process.env.WAVE_API_BASE_URL ?? process.env.WAVE_API_URL;
120
- if (!baseUrl) {
121
- throw new CliError({
122
- message: "Missing API base URL. Pass --base-url, provide via --auth-json-stdin, or set WAVE_API_BASE_URL/WAVE_API_URL.",
123
- kind: "invalid_args",
124
- status: 400,
125
- exitCode: EXIT_CODES.invalidArgs
126
- });
127
- }
122
+ const baseUrl = options.baseUrl ?? process.env.WAVE_API_BASE_URL ?? process.env.WAVE_API_URL ?? DEFAULT_PRODUCTION_API_BASE_URL;
128
123
  const parsed = configSchema.safeParse({
129
124
  baseUrl,
130
125
  token,
@@ -2277,7 +2272,8 @@ function resolveFromSources(options, stdin, config, env) {
2277
2272
  normalize3(stdin.baseUrl),
2278
2273
  normalize3(env.WAVE_API_BASE_URL),
2279
2274
  normalize3(env.WAVE_API_URL),
2280
- normalize3(config.baseUrl)
2275
+ normalize3(config.baseUrl),
2276
+ DEFAULT_PRODUCTION_API_BASE_URL
2281
2277
  );
2282
2278
  const organizationId = normalize3(options.organizationId);
2283
2279
  const organizationIdSource = organizationId ? "flag" : "none";
@@ -15996,7 +15992,7 @@ function attachDiscoveryHelp(program) {
15996
15992
  }
15997
15993
 
15998
15994
  // src/version.ts
15999
- var CLI_VERSION = "0.1.66";
15995
+ var CLI_VERSION = "0.1.67";
16000
15996
 
16001
15997
  // src/cli.ts
16002
15998
  function buildCli(options) {
@@ -16006,7 +16002,7 @@ function buildCli(options) {
16006
16002
  "Read auth/runtime context JSON from stdin (token, baseUrl, tracing fields, ...)"
16007
16003
  ).option(
16008
16004
  "--base-url <baseUrl>",
16009
- "API base URL (prefer WAVE_API_BASE_URL env var)"
16005
+ "API base URL (defaults to production; WAVE_API_BASE_URL overrides it)"
16010
16006
  ).option(
16011
16007
  "--organization-id <organizationId>",
16012
16008
  "Explicit organization ID override"
package/dist/index.js CHANGED
@@ -57,6 +57,9 @@ function mapStatusToExitCode(status) {
57
57
  return EXIT_CODES.generic;
58
58
  }
59
59
 
60
+ // src/runtimeDefaults.ts
61
+ var DEFAULT_PRODUCTION_API_BASE_URL = "https://api.ourwave.io";
62
+
60
63
  // src/config.ts
61
64
  var DEFAULT_TIMEOUT_MS = 1e4;
62
65
  var configSchema = z.object({
@@ -115,15 +118,7 @@ function getConfig(options) {
115
118
  exitCode: EXIT_CODES.missingOrInvalidAuth
116
119
  });
117
120
  }
118
- const baseUrl = options.baseUrl ?? process.env.WAVE_API_BASE_URL ?? process.env.WAVE_API_URL;
119
- if (!baseUrl) {
120
- throw new CliError({
121
- message: "Missing API base URL. Pass --base-url, provide via --auth-json-stdin, or set WAVE_API_BASE_URL/WAVE_API_URL.",
122
- kind: "invalid_args",
123
- status: 400,
124
- exitCode: EXIT_CODES.invalidArgs
125
- });
126
- }
121
+ const baseUrl = options.baseUrl ?? process.env.WAVE_API_BASE_URL ?? process.env.WAVE_API_URL ?? DEFAULT_PRODUCTION_API_BASE_URL;
127
122
  const parsed = configSchema.safeParse({
128
123
  baseUrl,
129
124
  token,
@@ -2276,7 +2271,8 @@ function resolveFromSources(options, stdin, config, env) {
2276
2271
  normalize3(stdin.baseUrl),
2277
2272
  normalize3(env.WAVE_API_BASE_URL),
2278
2273
  normalize3(env.WAVE_API_URL),
2279
- normalize3(config.baseUrl)
2274
+ normalize3(config.baseUrl),
2275
+ DEFAULT_PRODUCTION_API_BASE_URL
2280
2276
  );
2281
2277
  const organizationId = normalize3(options.organizationId);
2282
2278
  const organizationIdSource = organizationId ? "flag" : "none";
@@ -15995,7 +15991,7 @@ function attachDiscoveryHelp(program) {
15995
15991
  }
15996
15992
 
15997
15993
  // src/version.ts
15998
- var CLI_VERSION = "0.1.66";
15994
+ var CLI_VERSION = "0.1.67";
15999
15995
 
16000
15996
  // src/cli.ts
16001
15997
  function buildCli(options) {
@@ -16005,7 +16001,7 @@ function buildCli(options) {
16005
16001
  "Read auth/runtime context JSON from stdin (token, baseUrl, tracing fields, ...)"
16006
16002
  ).option(
16007
16003
  "--base-url <baseUrl>",
16008
- "API base URL (prefer WAVE_API_BASE_URL env var)"
16004
+ "API base URL (defaults to production; WAVE_API_BASE_URL overrides it)"
16009
16005
  ).option(
16010
16006
  "--organization-id <organizationId>",
16011
16007
  "Explicit organization ID override"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wave-ai-os/wave-cli",
3
- "version": "0.1.66",
3
+ "version": "0.1.67",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "wave": "dist/index.js"