@signetai/connector-gemini 0.199.2 → 0.199.4

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -21
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -8,14 +8,14 @@ import {
8
8
  readlinkSync,
9
9
  rmSync as rmSync2,
10
10
  unlinkSync as unlinkSync3,
11
- writeFileSync as writeFileSync3
11
+ writeFileSync as writeFileSync2
12
12
  } from "node:fs";
13
13
  import { homedir as homedir6 } from "node:os";
14
14
  import { dirname as dirname8, join as join7, resolve as resolve3 } from "node:path";
15
15
 
16
16
  // ../../../libs/connector-base/dist/index.js
17
17
  import { randomBytes } from "node:crypto";
18
- import { existsSync, readFileSync, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
18
+ import { existsSync, readFileSync, renameSync as renameSync2, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
19
19
  import { homedir } from "node:os";
20
20
  import { dirname as dirname5, isAbsolute, join as join3, relative, sep } from "node:path";
21
21
  import { createRequire } from "node:module";
@@ -24,7 +24,18 @@ import { fileURLToPath } from "node:url";
24
24
  import { createHash } from "node:crypto";
25
25
  import { homedir as homedir2 } from "os";
26
26
  import { join as join2 } from "path";
27
- import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync3, rmSync, statSync, writeFileSync as writeFileSync2 } from "node:fs";
27
+ import {
28
+ closeSync,
29
+ existsSync as existsSync4,
30
+ fsyncSync,
31
+ mkdirSync as mkdirSync2,
32
+ openSync,
33
+ readFileSync as readFileSync3,
34
+ renameSync,
35
+ rmSync,
36
+ statSync,
37
+ writeSync
38
+ } from "node:fs";
28
39
  import { homedir as homedir3 } from "node:os";
29
40
  import { dirname as dirname2, join as join5, resolve } from "node:path";
30
41
  import { createRequire as createRequire2 } from "node:module";
@@ -12403,8 +12414,7 @@ function isRecord4(value) {
12403
12414
  function getWorkspaceConfigPath(env = process.env, home = homedir3()) {
12404
12415
  return join5(readConfigHome(env, home), "signet", "workspace.json");
12405
12416
  }
12406
- function readConfiguredWorkspacePath(env = process.env, home = homedir3(), options = {}) {
12407
- const strict = options.strict ?? false;
12417
+ function readConfiguredWorkspacePath(env = process.env, home = homedir3(), _options = {}) {
12408
12418
  const configPath = getWorkspaceConfigPath(env, home);
12409
12419
  if (!existsSync4(configPath))
12410
12420
  return null;
@@ -12412,33 +12422,25 @@ function readConfiguredWorkspacePath(env = process.env, home = homedir3(), optio
12412
12422
  try {
12413
12423
  raw = JSON.parse(readFileSync3(configPath, "utf-8"));
12414
12424
  } catch (err) {
12415
- if (strict) {
12416
- const detail = err instanceof Error ? err.message : String(err);
12417
- throw new Error(`Invalid Signet workspace config at ${configPath}: ${detail}`);
12418
- }
12419
- return null;
12425
+ const detail = err instanceof Error ? err.message : String(err);
12426
+ throw new Error(`Invalid Signet workspace config at ${configPath}: ${detail}`);
12420
12427
  }
12421
12428
  if (!isRecord4(raw) || !("workspace" in raw)) {
12422
- if (strict)
12423
- throw new Error(`Invalid Signet workspace config at ${configPath}: missing workspace`);
12424
- return null;
12429
+ throw new Error(`Invalid Signet workspace config at ${configPath}: missing workspace`);
12425
12430
  }
12426
12431
  const workspace = raw.workspace;
12427
12432
  if (typeof workspace !== "string" || workspace.trim().length === 0) {
12428
- if (strict)
12429
- throw new Error(`Invalid Signet workspace config at ${configPath}: workspace must be a non-empty string`);
12430
- return null;
12433
+ throw new Error(`Invalid Signet workspace config at ${configPath}: workspace must be a non-empty string`);
12431
12434
  }
12432
12435
  return normalizeWorkspacePath(workspace, home);
12433
12436
  }
12434
12437
  function resolveWorkspacePath(options = {}) {
12435
12438
  const env = options.env ?? process.env;
12436
12439
  const home = options.home ?? homedir3();
12437
- const strict = options.strict ?? false;
12438
12440
  const requireExistingEnvPath = options.requireExistingEnvPath ?? false;
12439
12441
  const configPath = getWorkspaceConfigPath(env, home);
12440
12442
  const envPath = resolveEnvWorkspace(env, home, requireExistingEnvPath);
12441
- const configValue = readConfiguredWorkspacePath(env, home, { strict: envPath ? false : strict });
12443
+ const configValue = readConfiguredWorkspacePath(env, home);
12442
12444
  if (envPath) {
12443
12445
  return {
12444
12446
  path: envPath,
@@ -12710,7 +12712,7 @@ class BaseConnector {
12710
12712
  const tmp = join3(basePath, `.${randomBytes(6).toString("hex")}.tmp`);
12711
12713
  try {
12712
12714
  writeFileSync(tmp, cleaned, "utf-8");
12713
- renameSync(tmp, agentsPath);
12715
+ renameSync2(tmp, agentsPath);
12714
12716
  } catch (err) {
12715
12717
  try {
12716
12718
  unlinkSync2(tmp);
@@ -12774,7 +12776,7 @@ function atomicWriteText(path, content, mode) {
12774
12776
  }
12775
12777
  try {
12776
12778
  writeFileSync(tmp, content, { encoding: "utf-8", mode: writeMode });
12777
- renameSync(tmp, path);
12779
+ renameSync2(tmp, path);
12778
12780
  } catch (err) {
12779
12781
  try {
12780
12782
  unlinkSync2(tmp);
@@ -25559,7 +25561,7 @@ class GeminiConnector extends BaseConnector {
25559
25561
  `);
25560
25562
  const destPath = this.getGeminiMdPath();
25561
25563
  mkdirSync(dirname8(destPath), { recursive: true });
25562
- writeFileSync3(destPath, header + userContent + extras + notificationPolling);
25564
+ writeFileSync2(destPath, header + userContent + extras + notificationPolling);
25563
25565
  return destPath;
25564
25566
  }
25565
25567
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-gemini",
3
- "version": "0.199.2",
3
+ "version": "0.199.4",
4
4
  "description": "Signet connector for Gemini CLI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,8 +24,8 @@
24
24
  "typecheck": "tsc --noEmit"
25
25
  },
26
26
  "dependencies": {
27
- "@signetai/connector-base": "0.199.2",
28
- "@signetai/core": "0.199.2"
27
+ "@signetai/connector-base": "0.199.4",
28
+ "@signetai/core": "0.199.4"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",