@signetai/connector-base 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.
- package/dist/index.js +10 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -12521,7 +12521,8 @@ function isRecord4(value) {
|
|
|
12521
12521
|
function getWorkspaceConfigPath(env = process.env, home = homedir4()) {
|
|
12522
12522
|
return join6(readConfigHome(env, home), "signet", "workspace.json");
|
|
12523
12523
|
}
|
|
12524
|
-
function readConfiguredWorkspacePath(env = process.env, home = homedir4(),
|
|
12524
|
+
function readConfiguredWorkspacePath(env = process.env, home = homedir4(), options = {}) {
|
|
12525
|
+
const strict = options.strict ?? true;
|
|
12525
12526
|
const configPath = getWorkspaceConfigPath(env, home);
|
|
12526
12527
|
if (!existsSync4(configPath))
|
|
12527
12528
|
return null;
|
|
@@ -12529,14 +12530,20 @@ function readConfiguredWorkspacePath(env = process.env, home = homedir4(), _opti
|
|
|
12529
12530
|
try {
|
|
12530
12531
|
raw = JSON.parse(readFileSync3(configPath, "utf-8"));
|
|
12531
12532
|
} catch (err) {
|
|
12533
|
+
if (!strict)
|
|
12534
|
+
return null;
|
|
12532
12535
|
const detail = err instanceof Error ? err.message : String(err);
|
|
12533
12536
|
throw new Error(`Invalid Signet workspace config at ${configPath}: ${detail}`);
|
|
12534
12537
|
}
|
|
12535
12538
|
if (!isRecord4(raw) || !("workspace" in raw)) {
|
|
12539
|
+
if (!strict)
|
|
12540
|
+
return null;
|
|
12536
12541
|
throw new Error(`Invalid Signet workspace config at ${configPath}: missing workspace`);
|
|
12537
12542
|
}
|
|
12538
12543
|
const workspace = raw.workspace;
|
|
12539
12544
|
if (typeof workspace !== "string" || workspace.trim().length === 0) {
|
|
12545
|
+
if (!strict)
|
|
12546
|
+
return null;
|
|
12540
12547
|
throw new Error(`Invalid Signet workspace config at ${configPath}: workspace must be a non-empty string`);
|
|
12541
12548
|
}
|
|
12542
12549
|
return normalizeWorkspacePath(workspace, home);
|
|
@@ -12544,10 +12551,11 @@ function readConfiguredWorkspacePath(env = process.env, home = homedir4(), _opti
|
|
|
12544
12551
|
function resolveWorkspacePath(options = {}) {
|
|
12545
12552
|
const env = options.env ?? process.env;
|
|
12546
12553
|
const home = options.home ?? homedir4();
|
|
12554
|
+
const strict = options.strict ?? true;
|
|
12547
12555
|
const requireExistingEnvPath = options.requireExistingEnvPath ?? false;
|
|
12548
12556
|
const configPath = getWorkspaceConfigPath(env, home);
|
|
12549
12557
|
const envPath = resolveEnvWorkspace(env, home, requireExistingEnvPath);
|
|
12550
|
-
const configValue = readConfiguredWorkspacePath(env, home);
|
|
12558
|
+
const configValue = readConfiguredWorkspacePath(env, home, { strict: envPath ? false : strict });
|
|
12551
12559
|
if (envPath) {
|
|
12552
12560
|
return {
|
|
12553
12561
|
path: envPath,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-base",
|
|
3
|
-
"version": "0.200.
|
|
3
|
+
"version": "0.200.19",
|
|
4
4
|
"description": "Base class for Signet harness connectors",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typecheck": "tsc --noEmit"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@signetai/core": "0.200.
|
|
29
|
+
"@signetai/core": "0.200.19",
|
|
30
30
|
"json5": "^2.2.3",
|
|
31
31
|
"jsonc-parser": "3.3.1"
|
|
32
32
|
},
|