@signetai/connector-forge 0.163.17 → 0.163.18
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.d.ts.map +1 -1
- package/dist/index.js +118 -122
- package/package.json +3 -3
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACN,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACN,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EASpB,MAAM,wBAAwB,CAAC;AAwEhC,qBAAa,cAAe,SAAQ,aAAa;IAChD,QAAQ,CAAC,IAAI,eAAe;IAC5B,QAAQ,CAAC,SAAS,WAAW;IAE7B,SAAS,CAAC,YAAY,IAAI,MAAM;IAUhC,aAAa,IAAI,MAAM;IAIjB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA4EjD,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC;IAiD3C,WAAW,IAAI,OAAO;IAStB,MAAM,CAAC,kBAAkB,IAAI,OAAO;IAWpC,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,mBAAmB;CAgC3B;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAC;AACnD,eAAe,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
writeFileSync as writeFileSync3
|
|
12
12
|
} from "node:fs";
|
|
13
13
|
import { homedir as homedir5 } from "node:os";
|
|
14
|
-
import {
|
|
14
|
+
import { join as join6, resolve as resolve2 } from "node:path";
|
|
15
15
|
|
|
16
16
|
// ../../../libs/connector-base/dist/index.js
|
|
17
17
|
import { randomBytes } from "node:crypto";
|
|
18
18
|
import { existsSync, readFileSync, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, writeFileSync } from "node:fs";
|
|
19
19
|
import { homedir } from "node:os";
|
|
20
|
-
import { dirname as dirname3, join as join3 } from "node:path";
|
|
20
|
+
import { dirname as dirname3, isAbsolute, join as join3, relative, sep } from "node:path";
|
|
21
21
|
import { createRequire } from "node:module";
|
|
22
22
|
import { dirname, join } from "node:path";
|
|
23
23
|
import { fileURLToPath } from "node:url";
|
|
@@ -3640,10 +3640,10 @@ var require_resolve_block_map = __commonJS2((exports) => {
|
|
|
3640
3640
|
let offset = bm.offset;
|
|
3641
3641
|
let commentEnd = null;
|
|
3642
3642
|
for (const collItem of bm.items) {
|
|
3643
|
-
const { start, key, sep, value } = collItem;
|
|
3643
|
+
const { start, key, sep: sep2, value } = collItem;
|
|
3644
3644
|
const keyProps = resolveProps.resolveProps(start, {
|
|
3645
3645
|
indicator: "explicit-key-ind",
|
|
3646
|
-
next: key ??
|
|
3646
|
+
next: key ?? sep2?.[0],
|
|
3647
3647
|
offset,
|
|
3648
3648
|
onError,
|
|
3649
3649
|
parentIndent: bm.indent,
|
|
@@ -3657,7 +3657,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
|
|
|
3657
3657
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
3658
3658
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
3659
3659
|
}
|
|
3660
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
3660
|
+
if (!keyProps.anchor && !keyProps.tag && !sep2) {
|
|
3661
3661
|
commentEnd = keyProps.end;
|
|
3662
3662
|
if (keyProps.comment) {
|
|
3663
3663
|
if (map.comment)
|
|
@@ -3682,7 +3682,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
|
|
|
3682
3682
|
ctx.atKey = false;
|
|
3683
3683
|
if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
|
|
3684
3684
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
3685
|
-
const valueProps = resolveProps.resolveProps(
|
|
3685
|
+
const valueProps = resolveProps.resolveProps(sep2 ?? [], {
|
|
3686
3686
|
indicator: "map-value-ind",
|
|
3687
3687
|
next: value,
|
|
3688
3688
|
offset: keyNode.range[2],
|
|
@@ -3698,7 +3698,7 @@ var require_resolve_block_map = __commonJS2((exports) => {
|
|
|
3698
3698
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
3699
3699
|
onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
3700
3700
|
}
|
|
3701
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset,
|
|
3701
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep2, null, valueProps, onError);
|
|
3702
3702
|
if (ctx.schema.compat)
|
|
3703
3703
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
3704
3704
|
offset = valueNode.range[2];
|
|
@@ -3780,7 +3780,7 @@ var require_resolve_end = __commonJS2((exports) => {
|
|
|
3780
3780
|
let comment = "";
|
|
3781
3781
|
if (end) {
|
|
3782
3782
|
let hasSpace = false;
|
|
3783
|
-
let
|
|
3783
|
+
let sep2 = "";
|
|
3784
3784
|
for (const token of end) {
|
|
3785
3785
|
const { source, type } = token;
|
|
3786
3786
|
switch (type) {
|
|
@@ -3794,13 +3794,13 @@ var require_resolve_end = __commonJS2((exports) => {
|
|
|
3794
3794
|
if (!comment)
|
|
3795
3795
|
comment = cb;
|
|
3796
3796
|
else
|
|
3797
|
-
comment +=
|
|
3798
|
-
|
|
3797
|
+
comment += sep2 + cb;
|
|
3798
|
+
sep2 = "";
|
|
3799
3799
|
break;
|
|
3800
3800
|
}
|
|
3801
3801
|
case "newline":
|
|
3802
3802
|
if (comment)
|
|
3803
|
-
|
|
3803
|
+
sep2 += source;
|
|
3804
3804
|
hasSpace = true;
|
|
3805
3805
|
break;
|
|
3806
3806
|
default:
|
|
@@ -3838,18 +3838,18 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3838
3838
|
let offset = fc.offset + fc.start.source.length;
|
|
3839
3839
|
for (let i = 0;i < fc.items.length; ++i) {
|
|
3840
3840
|
const collItem = fc.items[i];
|
|
3841
|
-
const { start, key, sep, value } = collItem;
|
|
3841
|
+
const { start, key, sep: sep2, value } = collItem;
|
|
3842
3842
|
const props = resolveProps.resolveProps(start, {
|
|
3843
3843
|
flow: fcName,
|
|
3844
3844
|
indicator: "explicit-key-ind",
|
|
3845
|
-
next: key ??
|
|
3845
|
+
next: key ?? sep2?.[0],
|
|
3846
3846
|
offset,
|
|
3847
3847
|
onError,
|
|
3848
3848
|
parentIndent: fc.indent,
|
|
3849
3849
|
startOnNewline: false
|
|
3850
3850
|
});
|
|
3851
3851
|
if (!props.found) {
|
|
3852
|
-
if (!props.anchor && !props.tag && !
|
|
3852
|
+
if (!props.anchor && !props.tag && !sep2 && !value) {
|
|
3853
3853
|
if (i === 0 && props.comma)
|
|
3854
3854
|
onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
3855
3855
|
else if (i < fc.items.length - 1)
|
|
@@ -3901,8 +3901,8 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3901
3901
|
}
|
|
3902
3902
|
}
|
|
3903
3903
|
}
|
|
3904
|
-
if (!isMap && !
|
|
3905
|
-
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end,
|
|
3904
|
+
if (!isMap && !sep2 && !props.found) {
|
|
3905
|
+
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep2, null, props, onError);
|
|
3906
3906
|
coll.items.push(valueNode);
|
|
3907
3907
|
offset = valueNode.range[2];
|
|
3908
3908
|
if (isBlock(value))
|
|
@@ -3914,7 +3914,7 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3914
3914
|
if (isBlock(key))
|
|
3915
3915
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
3916
3916
|
ctx.atKey = false;
|
|
3917
|
-
const valueProps = resolveProps.resolveProps(
|
|
3917
|
+
const valueProps = resolveProps.resolveProps(sep2 ?? [], {
|
|
3918
3918
|
flow: fcName,
|
|
3919
3919
|
indicator: "map-value-ind",
|
|
3920
3920
|
next: value,
|
|
@@ -3925,8 +3925,8 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3925
3925
|
});
|
|
3926
3926
|
if (valueProps.found) {
|
|
3927
3927
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
3928
|
-
if (
|
|
3929
|
-
for (const st of
|
|
3928
|
+
if (sep2)
|
|
3929
|
+
for (const st of sep2) {
|
|
3930
3930
|
if (st === valueProps.found)
|
|
3931
3931
|
break;
|
|
3932
3932
|
if (st.type === "newline") {
|
|
@@ -3943,7 +3943,7 @@ var require_resolve_flow_collection = __commonJS2((exports) => {
|
|
|
3943
3943
|
else
|
|
3944
3944
|
onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
3945
3945
|
}
|
|
3946
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
3946
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep2, null, valueProps, onError) : null;
|
|
3947
3947
|
if (valueNode) {
|
|
3948
3948
|
if (isBlock(value))
|
|
3949
3949
|
onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -4116,7 +4116,7 @@ var require_resolve_block_scalar = __commonJS2((exports) => {
|
|
|
4116
4116
|
chompStart = i + 1;
|
|
4117
4117
|
}
|
|
4118
4118
|
let value = "";
|
|
4119
|
-
let
|
|
4119
|
+
let sep2 = "";
|
|
4120
4120
|
let prevMoreIndented = false;
|
|
4121
4121
|
for (let i = 0;i < contentStart; ++i)
|
|
4122
4122
|
value += lines[i][0].slice(trimIndent) + `
|
|
@@ -4134,33 +4134,33 @@ var require_resolve_block_scalar = __commonJS2((exports) => {
|
|
|
4134
4134
|
indent = "";
|
|
4135
4135
|
}
|
|
4136
4136
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
4137
|
-
value +=
|
|
4138
|
-
|
|
4137
|
+
value += sep2 + indent.slice(trimIndent) + content;
|
|
4138
|
+
sep2 = `
|
|
4139
4139
|
`;
|
|
4140
4140
|
} else if (indent.length > trimIndent || content[0] === "\t") {
|
|
4141
|
-
if (
|
|
4142
|
-
|
|
4141
|
+
if (sep2 === " ")
|
|
4142
|
+
sep2 = `
|
|
4143
4143
|
`;
|
|
4144
|
-
else if (!prevMoreIndented &&
|
|
4144
|
+
else if (!prevMoreIndented && sep2 === `
|
|
4145
4145
|
`)
|
|
4146
|
-
|
|
4146
|
+
sep2 = `
|
|
4147
4147
|
|
|
4148
4148
|
`;
|
|
4149
|
-
value +=
|
|
4150
|
-
|
|
4149
|
+
value += sep2 + indent.slice(trimIndent) + content;
|
|
4150
|
+
sep2 = `
|
|
4151
4151
|
`;
|
|
4152
4152
|
prevMoreIndented = true;
|
|
4153
4153
|
} else if (content === "") {
|
|
4154
|
-
if (
|
|
4154
|
+
if (sep2 === `
|
|
4155
4155
|
`)
|
|
4156
4156
|
value += `
|
|
4157
4157
|
`;
|
|
4158
4158
|
else
|
|
4159
|
-
|
|
4159
|
+
sep2 = `
|
|
4160
4160
|
`;
|
|
4161
4161
|
} else {
|
|
4162
|
-
value +=
|
|
4163
|
-
|
|
4162
|
+
value += sep2 + content;
|
|
4163
|
+
sep2 = " ";
|
|
4164
4164
|
prevMoreIndented = false;
|
|
4165
4165
|
}
|
|
4166
4166
|
}
|
|
@@ -4339,27 +4339,27 @@ var require_resolve_flow_scalar = __commonJS2((exports) => {
|
|
|
4339
4339
|
if (!match)
|
|
4340
4340
|
return source;
|
|
4341
4341
|
let res = match[1];
|
|
4342
|
-
let
|
|
4342
|
+
let sep2 = " ";
|
|
4343
4343
|
let pos = first.lastIndex;
|
|
4344
4344
|
line.lastIndex = pos;
|
|
4345
4345
|
while (match = line.exec(source)) {
|
|
4346
4346
|
if (match[1] === "") {
|
|
4347
|
-
if (
|
|
4347
|
+
if (sep2 === `
|
|
4348
4348
|
`)
|
|
4349
|
-
res +=
|
|
4349
|
+
res += sep2;
|
|
4350
4350
|
else
|
|
4351
|
-
|
|
4351
|
+
sep2 = `
|
|
4352
4352
|
`;
|
|
4353
4353
|
} else {
|
|
4354
|
-
res +=
|
|
4355
|
-
|
|
4354
|
+
res += sep2 + match[1];
|
|
4355
|
+
sep2 = " ";
|
|
4356
4356
|
}
|
|
4357
4357
|
pos = line.lastIndex;
|
|
4358
4358
|
}
|
|
4359
4359
|
const last = /[ \t]*(.*)/sy;
|
|
4360
4360
|
last.lastIndex = pos;
|
|
4361
4361
|
match = last.exec(source);
|
|
4362
|
-
return res +
|
|
4362
|
+
return res + sep2 + (match?.[1] ?? "");
|
|
4363
4363
|
}
|
|
4364
4364
|
function doubleQuotedValue(source, onError) {
|
|
4365
4365
|
let res = "";
|
|
@@ -5126,14 +5126,14 @@ var require_cst_stringify = __commonJS2((exports) => {
|
|
|
5126
5126
|
}
|
|
5127
5127
|
}
|
|
5128
5128
|
}
|
|
5129
|
-
function stringifyItem({ start, key, sep, value }) {
|
|
5129
|
+
function stringifyItem({ start, key, sep: sep2, value }) {
|
|
5130
5130
|
let res = "";
|
|
5131
5131
|
for (const st of start)
|
|
5132
5132
|
res += st.source;
|
|
5133
5133
|
if (key)
|
|
5134
5134
|
res += stringifyToken(key);
|
|
5135
|
-
if (
|
|
5136
|
-
for (const st of
|
|
5135
|
+
if (sep2)
|
|
5136
|
+
for (const st of sep2)
|
|
5137
5137
|
res += st.source;
|
|
5138
5138
|
if (value)
|
|
5139
5139
|
res += stringifyToken(value);
|
|
@@ -6272,18 +6272,18 @@ var require_parser = __commonJS2((exports) => {
|
|
|
6272
6272
|
if (this.type === "map-value-ind") {
|
|
6273
6273
|
const prev = getPrevProps(this.peek(2));
|
|
6274
6274
|
const start = getFirstKeyStartProps(prev);
|
|
6275
|
-
let
|
|
6275
|
+
let sep2;
|
|
6276
6276
|
if (scalar.end) {
|
|
6277
|
-
|
|
6278
|
-
|
|
6277
|
+
sep2 = scalar.end;
|
|
6278
|
+
sep2.push(this.sourceToken);
|
|
6279
6279
|
delete scalar.end;
|
|
6280
6280
|
} else
|
|
6281
|
-
|
|
6281
|
+
sep2 = [this.sourceToken];
|
|
6282
6282
|
const map = {
|
|
6283
6283
|
type: "block-map",
|
|
6284
6284
|
offset: scalar.offset,
|
|
6285
6285
|
indent: scalar.indent,
|
|
6286
|
-
items: [{ start, key: scalar, sep }]
|
|
6286
|
+
items: [{ start, key: scalar, sep: sep2 }]
|
|
6287
6287
|
};
|
|
6288
6288
|
this.onKeyLine = true;
|
|
6289
6289
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -6437,15 +6437,15 @@ var require_parser = __commonJS2((exports) => {
|
|
|
6437
6437
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
6438
6438
|
const start2 = getFirstKeyStartProps(it.start);
|
|
6439
6439
|
const key = it.key;
|
|
6440
|
-
const
|
|
6441
|
-
|
|
6440
|
+
const sep2 = it.sep;
|
|
6441
|
+
sep2.push(this.sourceToken);
|
|
6442
6442
|
delete it.key;
|
|
6443
6443
|
delete it.sep;
|
|
6444
6444
|
this.stack.push({
|
|
6445
6445
|
type: "block-map",
|
|
6446
6446
|
offset: this.offset,
|
|
6447
6447
|
indent: this.indent,
|
|
6448
|
-
items: [{ start: start2, key, sep }]
|
|
6448
|
+
items: [{ start: start2, key, sep: sep2 }]
|
|
6449
6449
|
});
|
|
6450
6450
|
} else if (start.length > 0) {
|
|
6451
6451
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -6639,13 +6639,13 @@ var require_parser = __commonJS2((exports) => {
|
|
|
6639
6639
|
const prev = getPrevProps(parent);
|
|
6640
6640
|
const start = getFirstKeyStartProps(prev);
|
|
6641
6641
|
fixFlowSeqItems(fc);
|
|
6642
|
-
const
|
|
6643
|
-
|
|
6642
|
+
const sep2 = fc.end.splice(1, fc.end.length);
|
|
6643
|
+
sep2.push(this.sourceToken);
|
|
6644
6644
|
const map = {
|
|
6645
6645
|
type: "block-map",
|
|
6646
6646
|
offset: fc.offset,
|
|
6647
6647
|
indent: fc.indent,
|
|
6648
|
-
items: [{ start, key: fc, sep }]
|
|
6648
|
+
items: [{ start, key: fc, sep: sep2 }]
|
|
6649
6649
|
};
|
|
6650
6650
|
this.onKeyLine = true;
|
|
6651
6651
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -11622,13 +11622,23 @@ function resolvePackagedSignetCommand(bareCommand, scriptDirectory, scriptName,
|
|
|
11622
11622
|
function resolveSignetMcpCommand() {
|
|
11623
11623
|
return resolvePackagedSignetCommand("signet-mcp", "dist", "mcp-stdio.js", true);
|
|
11624
11624
|
}
|
|
11625
|
-
function
|
|
11625
|
+
function isJsonObject(value) {
|
|
11626
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11627
|
+
}
|
|
11628
|
+
function isChildOf(candidate, parent) {
|
|
11629
|
+
const rel = relative(parent, candidate);
|
|
11630
|
+
return rel !== "" && rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
|
|
11631
|
+
}
|
|
11632
|
+
function readTrimmedEnv2(name) {
|
|
11626
11633
|
const value = process.env[name];
|
|
11627
11634
|
if (typeof value !== "string")
|
|
11628
11635
|
return;
|
|
11629
|
-
const trimmed = value.trim();
|
|
11636
|
+
const trimmed = value.trim().replace(/[\r\n]+/g, "");
|
|
11630
11637
|
return trimmed.length > 0 ? trimmed : undefined;
|
|
11631
11638
|
}
|
|
11639
|
+
function readManagedTrimmedEnv(name) {
|
|
11640
|
+
return readTrimmedEnv2(name);
|
|
11641
|
+
}
|
|
11632
11642
|
function resolveSignetWorkspacePath(home2 = homedir()) {
|
|
11633
11643
|
return resolveWorkspacePath({ home: home2, strict: true, requireExistingEnvPath: true }).path;
|
|
11634
11644
|
}
|
|
@@ -15256,10 +15266,10 @@ var require_resolve_block_map2 = __commonJS((exports) => {
|
|
|
15256
15266
|
let offset = bm.offset;
|
|
15257
15267
|
let commentEnd = null;
|
|
15258
15268
|
for (const collItem of bm.items) {
|
|
15259
|
-
const { start, key, sep, value } = collItem;
|
|
15269
|
+
const { start, key, sep: sep2, value } = collItem;
|
|
15260
15270
|
const keyProps = resolveProps.resolveProps(start, {
|
|
15261
15271
|
indicator: "explicit-key-ind",
|
|
15262
|
-
next: key ??
|
|
15272
|
+
next: key ?? sep2?.[0],
|
|
15263
15273
|
offset,
|
|
15264
15274
|
onError,
|
|
15265
15275
|
parentIndent: bm.indent,
|
|
@@ -15273,7 +15283,7 @@ var require_resolve_block_map2 = __commonJS((exports) => {
|
|
|
15273
15283
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
15274
15284
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
15275
15285
|
}
|
|
15276
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
15286
|
+
if (!keyProps.anchor && !keyProps.tag && !sep2) {
|
|
15277
15287
|
commentEnd = keyProps.end;
|
|
15278
15288
|
if (keyProps.comment) {
|
|
15279
15289
|
if (map.comment)
|
|
@@ -15298,7 +15308,7 @@ var require_resolve_block_map2 = __commonJS((exports) => {
|
|
|
15298
15308
|
ctx.atKey = false;
|
|
15299
15309
|
if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
|
|
15300
15310
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
15301
|
-
const valueProps = resolveProps.resolveProps(
|
|
15311
|
+
const valueProps = resolveProps.resolveProps(sep2 ?? [], {
|
|
15302
15312
|
indicator: "map-value-ind",
|
|
15303
15313
|
next: value,
|
|
15304
15314
|
offset: keyNode.range[2],
|
|
@@ -15314,7 +15324,7 @@ var require_resolve_block_map2 = __commonJS((exports) => {
|
|
|
15314
15324
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
15315
15325
|
onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
15316
15326
|
}
|
|
15317
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset,
|
|
15327
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep2, null, valueProps, onError);
|
|
15318
15328
|
if (ctx.schema.compat)
|
|
15319
15329
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
15320
15330
|
offset = valueNode.range[2];
|
|
@@ -15396,7 +15406,7 @@ var require_resolve_end2 = __commonJS((exports) => {
|
|
|
15396
15406
|
let comment = "";
|
|
15397
15407
|
if (end) {
|
|
15398
15408
|
let hasSpace = false;
|
|
15399
|
-
let
|
|
15409
|
+
let sep2 = "";
|
|
15400
15410
|
for (const token of end) {
|
|
15401
15411
|
const { source, type } = token;
|
|
15402
15412
|
switch (type) {
|
|
@@ -15410,13 +15420,13 @@ var require_resolve_end2 = __commonJS((exports) => {
|
|
|
15410
15420
|
if (!comment)
|
|
15411
15421
|
comment = cb;
|
|
15412
15422
|
else
|
|
15413
|
-
comment +=
|
|
15414
|
-
|
|
15423
|
+
comment += sep2 + cb;
|
|
15424
|
+
sep2 = "";
|
|
15415
15425
|
break;
|
|
15416
15426
|
}
|
|
15417
15427
|
case "newline":
|
|
15418
15428
|
if (comment)
|
|
15419
|
-
|
|
15429
|
+
sep2 += source;
|
|
15420
15430
|
hasSpace = true;
|
|
15421
15431
|
break;
|
|
15422
15432
|
default:
|
|
@@ -15454,18 +15464,18 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
|
|
|
15454
15464
|
let offset = fc.offset + fc.start.source.length;
|
|
15455
15465
|
for (let i = 0;i < fc.items.length; ++i) {
|
|
15456
15466
|
const collItem = fc.items[i];
|
|
15457
|
-
const { start, key, sep, value } = collItem;
|
|
15467
|
+
const { start, key, sep: sep2, value } = collItem;
|
|
15458
15468
|
const props = resolveProps.resolveProps(start, {
|
|
15459
15469
|
flow: fcName,
|
|
15460
15470
|
indicator: "explicit-key-ind",
|
|
15461
|
-
next: key ??
|
|
15471
|
+
next: key ?? sep2?.[0],
|
|
15462
15472
|
offset,
|
|
15463
15473
|
onError,
|
|
15464
15474
|
parentIndent: fc.indent,
|
|
15465
15475
|
startOnNewline: false
|
|
15466
15476
|
});
|
|
15467
15477
|
if (!props.found) {
|
|
15468
|
-
if (!props.anchor && !props.tag && !
|
|
15478
|
+
if (!props.anchor && !props.tag && !sep2 && !value) {
|
|
15469
15479
|
if (i === 0 && props.comma)
|
|
15470
15480
|
onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
15471
15481
|
else if (i < fc.items.length - 1)
|
|
@@ -15517,8 +15527,8 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
|
|
|
15517
15527
|
}
|
|
15518
15528
|
}
|
|
15519
15529
|
}
|
|
15520
|
-
if (!isMap && !
|
|
15521
|
-
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end,
|
|
15530
|
+
if (!isMap && !sep2 && !props.found) {
|
|
15531
|
+
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep2, null, props, onError);
|
|
15522
15532
|
coll.items.push(valueNode);
|
|
15523
15533
|
offset = valueNode.range[2];
|
|
15524
15534
|
if (isBlock(value))
|
|
@@ -15530,7 +15540,7 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
|
|
|
15530
15540
|
if (isBlock(key))
|
|
15531
15541
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
15532
15542
|
ctx.atKey = false;
|
|
15533
|
-
const valueProps = resolveProps.resolveProps(
|
|
15543
|
+
const valueProps = resolveProps.resolveProps(sep2 ?? [], {
|
|
15534
15544
|
flow: fcName,
|
|
15535
15545
|
indicator: "map-value-ind",
|
|
15536
15546
|
next: value,
|
|
@@ -15541,8 +15551,8 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
|
|
|
15541
15551
|
});
|
|
15542
15552
|
if (valueProps.found) {
|
|
15543
15553
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
15544
|
-
if (
|
|
15545
|
-
for (const st of
|
|
15554
|
+
if (sep2)
|
|
15555
|
+
for (const st of sep2) {
|
|
15546
15556
|
if (st === valueProps.found)
|
|
15547
15557
|
break;
|
|
15548
15558
|
if (st.type === "newline") {
|
|
@@ -15559,7 +15569,7 @@ var require_resolve_flow_collection2 = __commonJS((exports) => {
|
|
|
15559
15569
|
else
|
|
15560
15570
|
onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
15561
15571
|
}
|
|
15562
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
15572
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep2, null, valueProps, onError) : null;
|
|
15563
15573
|
if (valueNode) {
|
|
15564
15574
|
if (isBlock(value))
|
|
15565
15575
|
onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -15732,7 +15742,7 @@ var require_resolve_block_scalar2 = __commonJS((exports) => {
|
|
|
15732
15742
|
chompStart = i + 1;
|
|
15733
15743
|
}
|
|
15734
15744
|
let value = "";
|
|
15735
|
-
let
|
|
15745
|
+
let sep2 = "";
|
|
15736
15746
|
let prevMoreIndented = false;
|
|
15737
15747
|
for (let i = 0;i < contentStart; ++i)
|
|
15738
15748
|
value += lines[i][0].slice(trimIndent) + `
|
|
@@ -15750,33 +15760,33 @@ var require_resolve_block_scalar2 = __commonJS((exports) => {
|
|
|
15750
15760
|
indent = "";
|
|
15751
15761
|
}
|
|
15752
15762
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
15753
|
-
value +=
|
|
15754
|
-
|
|
15763
|
+
value += sep2 + indent.slice(trimIndent) + content;
|
|
15764
|
+
sep2 = `
|
|
15755
15765
|
`;
|
|
15756
15766
|
} else if (indent.length > trimIndent || content[0] === "\t") {
|
|
15757
|
-
if (
|
|
15758
|
-
|
|
15767
|
+
if (sep2 === " ")
|
|
15768
|
+
sep2 = `
|
|
15759
15769
|
`;
|
|
15760
|
-
else if (!prevMoreIndented &&
|
|
15770
|
+
else if (!prevMoreIndented && sep2 === `
|
|
15761
15771
|
`)
|
|
15762
|
-
|
|
15772
|
+
sep2 = `
|
|
15763
15773
|
|
|
15764
15774
|
`;
|
|
15765
|
-
value +=
|
|
15766
|
-
|
|
15775
|
+
value += sep2 + indent.slice(trimIndent) + content;
|
|
15776
|
+
sep2 = `
|
|
15767
15777
|
`;
|
|
15768
15778
|
prevMoreIndented = true;
|
|
15769
15779
|
} else if (content === "") {
|
|
15770
|
-
if (
|
|
15780
|
+
if (sep2 === `
|
|
15771
15781
|
`)
|
|
15772
15782
|
value += `
|
|
15773
15783
|
`;
|
|
15774
15784
|
else
|
|
15775
|
-
|
|
15785
|
+
sep2 = `
|
|
15776
15786
|
`;
|
|
15777
15787
|
} else {
|
|
15778
|
-
value +=
|
|
15779
|
-
|
|
15788
|
+
value += sep2 + content;
|
|
15789
|
+
sep2 = " ";
|
|
15780
15790
|
prevMoreIndented = false;
|
|
15781
15791
|
}
|
|
15782
15792
|
}
|
|
@@ -15955,27 +15965,27 @@ var require_resolve_flow_scalar2 = __commonJS((exports) => {
|
|
|
15955
15965
|
if (!match)
|
|
15956
15966
|
return source;
|
|
15957
15967
|
let res = match[1];
|
|
15958
|
-
let
|
|
15968
|
+
let sep2 = " ";
|
|
15959
15969
|
let pos = first.lastIndex;
|
|
15960
15970
|
line.lastIndex = pos;
|
|
15961
15971
|
while (match = line.exec(source)) {
|
|
15962
15972
|
if (match[1] === "") {
|
|
15963
|
-
if (
|
|
15973
|
+
if (sep2 === `
|
|
15964
15974
|
`)
|
|
15965
|
-
res +=
|
|
15975
|
+
res += sep2;
|
|
15966
15976
|
else
|
|
15967
|
-
|
|
15977
|
+
sep2 = `
|
|
15968
15978
|
`;
|
|
15969
15979
|
} else {
|
|
15970
|
-
res +=
|
|
15971
|
-
|
|
15980
|
+
res += sep2 + match[1];
|
|
15981
|
+
sep2 = " ";
|
|
15972
15982
|
}
|
|
15973
15983
|
pos = line.lastIndex;
|
|
15974
15984
|
}
|
|
15975
15985
|
const last = /[ \t]*(.*)/sy;
|
|
15976
15986
|
last.lastIndex = pos;
|
|
15977
15987
|
match = last.exec(source);
|
|
15978
|
-
return res +
|
|
15988
|
+
return res + sep2 + (match?.[1] ?? "");
|
|
15979
15989
|
}
|
|
15980
15990
|
function doubleQuotedValue(source, onError) {
|
|
15981
15991
|
let res = "";
|
|
@@ -16742,14 +16752,14 @@ var require_cst_stringify2 = __commonJS((exports) => {
|
|
|
16742
16752
|
}
|
|
16743
16753
|
}
|
|
16744
16754
|
}
|
|
16745
|
-
function stringifyItem({ start, key, sep, value }) {
|
|
16755
|
+
function stringifyItem({ start, key, sep: sep2, value }) {
|
|
16746
16756
|
let res = "";
|
|
16747
16757
|
for (const st of start)
|
|
16748
16758
|
res += st.source;
|
|
16749
16759
|
if (key)
|
|
16750
16760
|
res += stringifyToken(key);
|
|
16751
|
-
if (
|
|
16752
|
-
for (const st of
|
|
16761
|
+
if (sep2)
|
|
16762
|
+
for (const st of sep2)
|
|
16753
16763
|
res += st.source;
|
|
16754
16764
|
if (value)
|
|
16755
16765
|
res += stringifyToken(value);
|
|
@@ -17888,18 +17898,18 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
17888
17898
|
if (this.type === "map-value-ind") {
|
|
17889
17899
|
const prev = getPrevProps(this.peek(2));
|
|
17890
17900
|
const start = getFirstKeyStartProps(prev);
|
|
17891
|
-
let
|
|
17901
|
+
let sep2;
|
|
17892
17902
|
if (scalar.end) {
|
|
17893
|
-
|
|
17894
|
-
|
|
17903
|
+
sep2 = scalar.end;
|
|
17904
|
+
sep2.push(this.sourceToken);
|
|
17895
17905
|
delete scalar.end;
|
|
17896
17906
|
} else
|
|
17897
|
-
|
|
17907
|
+
sep2 = [this.sourceToken];
|
|
17898
17908
|
const map = {
|
|
17899
17909
|
type: "block-map",
|
|
17900
17910
|
offset: scalar.offset,
|
|
17901
17911
|
indent: scalar.indent,
|
|
17902
|
-
items: [{ start, key: scalar, sep }]
|
|
17912
|
+
items: [{ start, key: scalar, sep: sep2 }]
|
|
17903
17913
|
};
|
|
17904
17914
|
this.onKeyLine = true;
|
|
17905
17915
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -18053,15 +18063,15 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
18053
18063
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
18054
18064
|
const start2 = getFirstKeyStartProps(it.start);
|
|
18055
18065
|
const key = it.key;
|
|
18056
|
-
const
|
|
18057
|
-
|
|
18066
|
+
const sep2 = it.sep;
|
|
18067
|
+
sep2.push(this.sourceToken);
|
|
18058
18068
|
delete it.key;
|
|
18059
18069
|
delete it.sep;
|
|
18060
18070
|
this.stack.push({
|
|
18061
18071
|
type: "block-map",
|
|
18062
18072
|
offset: this.offset,
|
|
18063
18073
|
indent: this.indent,
|
|
18064
|
-
items: [{ start: start2, key, sep }]
|
|
18074
|
+
items: [{ start: start2, key, sep: sep2 }]
|
|
18065
18075
|
});
|
|
18066
18076
|
} else if (start.length > 0) {
|
|
18067
18077
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -18255,13 +18265,13 @@ var require_parser2 = __commonJS((exports) => {
|
|
|
18255
18265
|
const prev = getPrevProps(parent);
|
|
18256
18266
|
const start = getFirstKeyStartProps(prev);
|
|
18257
18267
|
fixFlowSeqItems(fc);
|
|
18258
|
-
const
|
|
18259
|
-
|
|
18268
|
+
const sep2 = fc.end.splice(1, fc.end.length);
|
|
18269
|
+
sep2.push(this.sourceToken);
|
|
18260
18270
|
const map = {
|
|
18261
18271
|
type: "block-map",
|
|
18262
18272
|
offset: fc.offset,
|
|
18263
18273
|
indent: fc.indent,
|
|
18264
|
-
items: [{ start, key: fc, sep }]
|
|
18274
|
+
items: [{ start, key: fc, sep: sep2 }]
|
|
18265
18275
|
};
|
|
18266
18276
|
this.onKeyLine = true;
|
|
18267
18277
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -23078,16 +23088,6 @@ var home2 = homedir82();
|
|
|
23078
23088
|
|
|
23079
23089
|
// src/index.ts
|
|
23080
23090
|
var SIGNET_FORGE_MARKER = "Managed by Signet (@signetai/connector-forge)";
|
|
23081
|
-
function isJsonObject(value) {
|
|
23082
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
23083
|
-
}
|
|
23084
|
-
function readTrimmedEnv2(name) {
|
|
23085
|
-
const value = process.env[name];
|
|
23086
|
-
if (typeof value !== "string")
|
|
23087
|
-
return;
|
|
23088
|
-
const trimmed = value.trim().replace(/[\r\n]+/g, "");
|
|
23089
|
-
return trimmed.length > 0 ? trimmed : undefined;
|
|
23090
|
-
}
|
|
23091
23091
|
function getHomeDir() {
|
|
23092
23092
|
const home3 = readTrimmedEnv2("HOME");
|
|
23093
23093
|
return home3 ?? homedir5();
|
|
@@ -23140,10 +23140,6 @@ function buildMcpServer(basePath) {
|
|
|
23140
23140
|
env: signetRuntimeEnv(basePath)
|
|
23141
23141
|
};
|
|
23142
23142
|
}
|
|
23143
|
-
function isChildOf(candidate, parent) {
|
|
23144
|
-
const rel = relative(parent, candidate);
|
|
23145
|
-
return rel !== "" && rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
|
|
23146
|
-
}
|
|
23147
23143
|
|
|
23148
23144
|
class ForgeConnector extends BaseConnector {
|
|
23149
23145
|
name = "ForgeCode";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-forge",
|
|
3
|
-
"version": "0.163.
|
|
3
|
+
"version": "0.163.18",
|
|
4
4
|
"description": "Signet connector for ForgeCode - installs MCP, identity, and skills integration",
|
|
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.163.
|
|
28
|
-
"@signetai/core": "0.163.
|
|
27
|
+
"@signetai/connector-base": "0.163.18",
|
|
28
|
+
"@signetai/core": "0.163.18"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^22.0.0",
|