@gapi/gcli 1.8.274 → 1.8.276

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,17 @@
1
+ ## 2026-11-18 - local-workspaces: a --ci login is never refreshed
2
+
3
+ **Feature:** local-workspaces · **Type:** fix
4
+
5
+ - `GraphqlClienAPI.getConfig` (`src/services/gql-client.ts`): a login
6
+ without an API key (`gcli login --ci --token`) is not "expired" after 30
7
+ minutes any more. It used to call the Firebase refresh with an empty key
8
+ and overwrite the stored token with nothing, so every command failed half
9
+ an hour after the login. CI pipelines never noticed (they log in per
10
+ run); a cloud workspace pod signed in with a project token (plan 37) is
11
+ logged in once and lives for weeks.
12
+ - **Test:** `gcli login --ci --token <ci token>`, set
13
+ `~/.gapi/...` generation time back an hour, run `gcli lambda:list`.
14
+ - **Debug:** "not logged in" / 401 some time after a --ci login on an
15
+ older gcli = this bug.
16
+ - **Verification:** tsc clean. Not run against a live token yet (checked
17
+ with the cloud workspace change that uses it).
@@ -0,0 +1,12 @@
1
+ ## 2026-11-18 - local-workspaces: A new editor watch at the cap drops the oldest instead of being refused
2
+
3
+ **Feature:** local-workspaces · **Type:** fix
4
+
5
+ - A reloaded or closed browser tab never closes its file watch. After four
6
+ reloads `watch/open` answered "At most 4 editors watching at a time" and
7
+ the editor silently showed no changes from disk (found when the assistant
8
+ wrote a file that never appeared). `TerminalManager.watch` now closes the
9
+ oldest watch at the cap.
10
+ - **Test:** `npx jest test/workspace-terminals.spec.ts --forceExit` (15).
11
+ - **Debug:** graphql-server log: an error on `watchLocalWorkspace`.
12
+ - **Verification:** 15/15, lint clean.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gapi/gcli",
3
- "version": "1.8.274",
3
+ "version": "1.8.276",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Stradivario/gapi.git"
package/release/index.js CHANGED
@@ -37640,7 +37640,10 @@ var init_gql_client = __esm({
37640
37640
  refresh,
37641
37641
  key,
37642
37642
  timeGenerated,
37643
- expired: force || (Date.now() - timeGenerated) / 1e3 > 1800,
37643
+ // A `--ci` login has no API key: its token is long-lived and is
37644
+ // never refreshed (refreshing it broke every command 30 minutes
37645
+ // after the login - a cloud workspace stays signed in for weeks).
37646
+ expired: !!key && (force || (Date.now() - timeGenerated) / 1e3 > 1800),
37644
37647
  uploadUrl: resolveUploadUrl(uploadUrl, url2)
37645
37648
  })),
37646
37649
  (0, import_operators.switchMap)(
@@ -324774,10 +324777,8 @@ ${e2.message}\r
324774
324777
  */
324775
324778
  watch() {
324776
324779
  if (this.watches.size >= MAX_SESSIONS) {
324777
- throw new WorkspaceError(
324778
- `At most ${MAX_SESSIONS} editors watching at a time.`,
324779
- 429
324780
- );
324780
+ const oldest = this.watches.keys().next().value;
324781
+ this.unwatch(oldest);
324781
324782
  }
324782
324783
  const sessionId = (0, import_crypto3.randomUUID)();
324783
324784
  const changed$ = new import_rxjs70.Subject();
@@ -326256,7 +326257,7 @@ if (!isWebContainer) {
326256
326257
  } else {
326257
326258
  }
326258
326259
  }
326259
- var version2 = true ? "1.8.273" : "development";
326260
+ var version2 = true ? "1.8.275" : "development";
326260
326261
  var main = (argv) => {
326261
326262
  import_commander.program.name("gcli").version(version2);
326262
326263
  commands.map((command) => command(import_commander.program));