@signetai/connector-claude-code 0.147.21 → 0.147.24

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 +13 -5
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { join as join4 } from "node:path";
6
6
 
7
7
  // ../../../libs/connector-base/dist/index.js
8
8
  import { randomBytes } from "node:crypto";
9
- import { existsSync, readFileSync, renameSync, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
9
+ import { existsSync, readFileSync, renameSync, statSync, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
10
10
  import { dirname as dirname2, join as join3, resolve } from "node:path";
11
11
  import { createRequire } from "node:module";
12
12
  import { dirname, join } from "node:path";
@@ -11000,12 +11000,16 @@ function isSignetGeneratedFile(raw) {
11000
11000
  `).slice(0, 6);
11001
11001
  return lines.some((line, i) => /^#\s+AUTO-GENERATED\s+from\s+.*\s+by\s+Signet/i.test(line) || /^#\s+Auto-generated\s+from\s+/.test(line) && i + 1 < lines.length && /^#\s+Source:\s+/.test(lines[i + 1]));
11002
11002
  }
11003
- function atomicWriteJson(path, data, indent = 2) {
11004
- const content = `${JSON.stringify(data, null, indent)}
11005
- `;
11003
+ function atomicWriteText(path, content, mode) {
11006
11004
  const tmp = join3(dirname2(path), `.${randomBytes(6).toString("hex")}.tmp`);
11005
+ let writeMode = mode;
11006
+ if (writeMode === undefined) {
11007
+ try {
11008
+ writeMode = statSync(path).mode & 511;
11009
+ } catch {}
11010
+ }
11007
11011
  try {
11008
- writeFileSync(tmp, content, "utf-8");
11012
+ writeFileSync(tmp, content, { encoding: "utf-8", mode: writeMode });
11009
11013
  renameSync(tmp, path);
11010
11014
  } catch (err) {
11011
11015
  try {
@@ -11014,6 +11018,10 @@ function atomicWriteJson(path, data, indent = 2) {
11014
11018
  throw err;
11015
11019
  }
11016
11020
  }
11021
+ function atomicWriteJson(path, data, indent = 2) {
11022
+ atomicWriteText(path, `${JSON.stringify(data, null, indent)}
11023
+ `);
11024
+ }
11017
11025
 
11018
11026
  // ../../../platform/core/dist/index.js
11019
11027
  import { createRequire as createRequire3 } from "node:module";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-claude-code",
3
- "version": "0.147.21",
3
+ "version": "0.147.24",
4
4
  "description": "Signet connector for Claude Code (Anthropic 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.147.21",
28
- "@signetai/core": "0.147.21"
27
+ "@signetai/connector-base": "0.147.24",
28
+ "@signetai/core": "0.147.24"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",