@signetai/connector-pi 0.200.17 → 0.200.19

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 +10 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -12491,7 +12491,8 @@ function isRecord4(value) {
12491
12491
  function getWorkspaceConfigPath(env = process.env, home = homedir4()) {
12492
12492
  return join6(readConfigHome(env, home), "signet", "workspace.json");
12493
12493
  }
12494
- function readConfiguredWorkspacePath(env = process.env, home = homedir4(), _options = {}) {
12494
+ function readConfiguredWorkspacePath(env = process.env, home = homedir4(), options = {}) {
12495
+ const strict = options.strict ?? true;
12495
12496
  const configPath = getWorkspaceConfigPath(env, home);
12496
12497
  if (!existsSync4(configPath))
12497
12498
  return null;
@@ -12499,14 +12500,20 @@ function readConfiguredWorkspacePath(env = process.env, home = homedir4(), _opti
12499
12500
  try {
12500
12501
  raw = JSON.parse(readFileSync3(configPath, "utf-8"));
12501
12502
  } catch (err) {
12503
+ if (!strict)
12504
+ return null;
12502
12505
  const detail = err instanceof Error ? err.message : String(err);
12503
12506
  throw new Error(`Invalid Signet workspace config at ${configPath}: ${detail}`);
12504
12507
  }
12505
12508
  if (!isRecord4(raw) || !("workspace" in raw)) {
12509
+ if (!strict)
12510
+ return null;
12506
12511
  throw new Error(`Invalid Signet workspace config at ${configPath}: missing workspace`);
12507
12512
  }
12508
12513
  const workspace = raw.workspace;
12509
12514
  if (typeof workspace !== "string" || workspace.trim().length === 0) {
12515
+ if (!strict)
12516
+ return null;
12510
12517
  throw new Error(`Invalid Signet workspace config at ${configPath}: workspace must be a non-empty string`);
12511
12518
  }
12512
12519
  return normalizeWorkspacePath(workspace, home);
@@ -12514,10 +12521,11 @@ function readConfiguredWorkspacePath(env = process.env, home = homedir4(), _opti
12514
12521
  function resolveWorkspacePath(options = {}) {
12515
12522
  const env = options.env ?? process.env;
12516
12523
  const home = options.home ?? homedir4();
12524
+ const strict = options.strict ?? true;
12517
12525
  const requireExistingEnvPath = options.requireExistingEnvPath ?? false;
12518
12526
  const configPath = getWorkspaceConfigPath(env, home);
12519
12527
  const envPath = resolveEnvWorkspace(env, home, requireExistingEnvPath);
12520
- const configValue = readConfiguredWorkspacePath(env, home);
12528
+ const configValue = readConfiguredWorkspacePath(env, home, { strict: envPath ? false : strict });
12521
12529
  if (envPath) {
12522
12530
  return {
12523
12531
  path: envPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-pi",
3
- "version": "0.200.17",
3
+ "version": "0.200.19",
4
4
  "description": "Signet connector for pi",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -25,8 +25,8 @@
25
25
  "typecheck": "tsc --noEmit"
26
26
  },
27
27
  "dependencies": {
28
- "@signetai/connector-base": "0.200.17",
29
- "@signetai/core": "0.200.17"
28
+ "@signetai/connector-base": "0.200.19",
29
+ "@signetai/core": "0.200.19"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.0.0",