@gapi/gcli 1.8.255 → 1.8.257

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.
@@ -0,0 +1,10 @@
1
+ ## 2026-11-01 - dedicated-platform-cluster: cluster:cost prints amounts in the platform currency (no USD column)
2
+
3
+ **Feature:** dedicated-platform-cluster · **Type:** feat
4
+
5
+ - `gcli cluster:cost`: the USD column (totalCostUsd) is gone; amounts are
6
+ plain numbers in the platform currency (`totalCost`,
7
+ `estimatedMonthlyCost`), with a note.
8
+ - **Test:** `gcli cluster:cost --project <id>`.
9
+ - **Debug:** a missing column = an old gateway schema (restart it).
10
+ - **Verification:** tsc 0.
@@ -0,0 +1,20 @@
1
+ ## 2026-11-03 - dedicated-platform-cluster: cluster:plan; cluster:autoscale --mode/--consolidation/--minNodeAge; pools in YAML
2
+
3
+ **Feature:** dedicated-platform-cluster · **Type:** feat
4
+
5
+ - `gcli cluster:plan --cluster <id>` (`commands/cluster/plan.ts`): why pods
6
+ are pending (a verdict per pod), the nodes pods mode would create with
7
+ the monthly price, and the consolidation decision. Read-only, any mode.
8
+ - `cluster:autoscale` has three new flags:
9
+ - `--mode thresholds|pods`;
10
+ - `--consolidation` / `--no-consolidation`;
11
+ - `--minNodeAge <minutes>` (5-1440).
12
+ - `cluster.autoscale` in YAML accepts `mode`, `consolidation`,
13
+ `minNodeAgeMinutes` and `pools` (up to 5:
14
+ `{ name, serverTypes, labels, taints, maxWorkers, weight }`).
15
+ `cluster:apply` diffs pools as a list.
16
+ - **Test:** `npx jest --coverage=false test/cluster-scaling.spec.ts
17
+ test/cluster-apply.spec.ts`.
18
+ - **Debug:** "Cannot query field mode/pools" means cluster-provisioner is
19
+ older than this gcli.
20
+ - **Verification:** 141 tests passed. tsc and eslint are clean.
@@ -0,0 +1,27 @@
1
+ ## 2026-11-07 - cli-browser-login: login: upload URL defaults to <API origin>/upload-lambda; --ci needs no --key
2
+
3
+ **Feature:** cli-browser-login · **Type:** fix
4
+
5
+ - `gcli login` without `--uploadUrl` now uses the API URL's **origin** +
6
+ `/upload-lambda` (`src/commands/auth/login-urls.ts`). It used to append
7
+ to the whole `--url`: `https://pubsub.graphql-server.com/graphql` ->
8
+ `.../graphql/upload-lambda`, `https://api.lambforge.com/` ->
9
+ `...//upload-lambda`. An explicit `--uploadUrl` still wins.
10
+ - `GraphqlClienAPI.getConfig()` applies the same default when the
11
+ `upload-url` file is missing (older logins) or empty (`mcp:start`
12
+ login-gate), so `lambda:create/update` always has an upload server.
13
+ - `gcli login --ci --token <t>` without `--key` crashed:
14
+ `TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument ... Received
15
+ undefined` (the key file was written with `undefined`). It now writes
16
+ `''` - the key only refreshes Firebase tokens, never a CI token.
17
+ - **Test:** `npx jest test/login-urls.spec.ts`; manually, in a throwaway
18
+ HOME: `HOME=$(mktemp -d) node release/index.js login --ci --token x --url
19
+ https://api.lambforge.com` -> exit 0, `~/.graphql-server/upload-url` =
20
+ `https://api.lambforge.com/upload-lambda`, `key` empty.
21
+ - **Debug:** uploads going to the wrong host -> `cat
22
+ ~/.graphql-server/url ~/.graphql-server/upload-url`; re-login with
23
+ `--uploadUrl` to override.
24
+ - **Verification:** 3 new unit tests; full gcli suite 142/142 (18 suites);
25
+ `tsc --noEmit` clean; built CLI run with no URL, api.lambforge.com,
26
+ graphql-server's `/graphql` URL and an explicit `--uploadUrl`, all
27
+ without `--key`: every run exits 0 with the expected files.
@@ -8,6 +8,13 @@ Canonical doc: graphql-server `docs/features/cli-browser-login.md`.
8
8
  - `src/commands/auth/login.ts`: no `--token` runs the browser flow;
9
9
  `loginWithToken` is the shared path that writes `~/.graphql-server/`
10
10
  (`silent` for MCP).
11
+ - `src/commands/auth/login-urls.ts`: `defaultUploadUrl(apiUrl)` = the API
12
+ URL's origin + `/upload-lambda` (no `--url` -> `https://api.lambforge.com`);
13
+ `resolveUploadUrl(uploadUrl, apiUrl)` - an explicit `--uploadUrl` wins.
14
+ Used by `loginWithToken` and by `GraphqlClienAPI.getConfig()` (missing or
15
+ empty `upload-url` file -> derived from `url`).
16
+ - `--ci` needs no `--key`: the key file gets `''` (a CI token is never
17
+ refreshed through Firebase).
11
18
  - `src/commands/proxy/login-gate.ts`: `mcp:start` before login serves only
12
19
  `LambforgeLogin`.
13
- - Tests: `test/browser-login.spec.ts`.
20
+ - Tests: `test/browser-login.spec.ts`, `test/login-urls.spec.ts`.
@@ -13,11 +13,12 @@ commands (cluster-provisioner operations, the same ones gql-fission's
13
13
  | `cluster:status [--cluster]` | `projectClustersOverview` (status, agent, nodes, load, autoscale, issues) |
14
14
  | `cluster:health --cluster` | `clusterHealth(limit: 1)` - latest agent report + nodes |
15
15
  | `cluster:scale-events --cluster [--limit]` | `clusterScaleEvents` |
16
- | `cluster:cost` | `projectClustersOverview` (`monthToDate`, `estimatedMonthlyCostEur`) |
16
+ | `cluster:plan --cluster` | `clusterProvisioningPlan` - why pods are pending (verdict per pod), the nodes pods mode would create, consolidation (plan 17) |
17
+ | `cluster:cost` | `projectClustersOverview` (`monthToDate`, `estimatedMonthlyCost`) |
17
18
  | `cluster:scale --workers 1-10 [--wait]` | `scaleProjectCluster` |
18
19
  | `cluster:scale:control-planes --count 1/3/5 [--wait]` | `scaleControlPlanesProjectCluster` |
19
20
  | `cluster:multi-node --workers [--wait]` / `cluster:single-node [--wait]` | `migrateToMultiNodeProjectCluster` / `revertToSingleNodeProjectCluster` |
20
- | `cluster:autoscale [--enable/--disable] [--profile] [--serverTypes a,b] [--step] [--min --max --cpuUp --memUp --cpuDown --memDown --samples --cooldown]` | `updateProjectClusterAutoscale` - partial: the server merges it into the stored policy and validates (min <= max, scale-down below scale-up, single-node cannot autoscale, server types allowed by the plan and of the cluster's CPU architecture). A preset profile overrides the thresholds |
21
+ | `cluster:autoscale [--enable/--disable] [--mode thresholds|pods] [--consolidation/--no-consolidation] [--minNodeAge] [--profile] [--serverTypes a,b] [--step] [--min --max --cpuUp --memUp --cpuDown --memDown --samples --cooldown]` | `updateProjectClusterAutoscale` - partial: the server merges it into the stored policy and validates (min <= max, scale-down below scale-up, single-node cannot autoscale, server types allowed by the plan and of the cluster's CPU architecture). A preset profile overrides the thresholds |
21
22
  | `cluster:load-balancer --enable/--disable [--wait]` | `enable/disableLoadBalancerProjectCluster` |
22
23
  | `cluster:apply [--spec] [--dry-run] [--yes]` | reconciles the `cluster:` section of lambforge.yaml: `projectClusters` (current) → plan → provision / topology / scale / control planes / load balancer / autoscale, one job at a time, waiting for `ready` between them |
23
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gapi/gcli",
3
- "version": "1.8.255",
3
+ "version": "1.8.257",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Stradivario/gapi.git"