fss-link 1.2.8 → 1.2.9
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/README.md +1 -1
- package/bundle/fss-link.js +264 -224
- package/package.json +2 -1
package/README.md
CHANGED
package/bundle/fss-link.js
CHANGED
|
@@ -93,12 +93,12 @@ var init_errors = __esm({
|
|
|
93
93
|
import path from "node:path";
|
|
94
94
|
import os from "os";
|
|
95
95
|
import * as crypto2 from "crypto";
|
|
96
|
-
function tildeifyPath(
|
|
96
|
+
function tildeifyPath(path83) {
|
|
97
97
|
const homeDir2 = os.homedir();
|
|
98
|
-
if (
|
|
99
|
-
return
|
|
98
|
+
if (path83.startsWith(homeDir2)) {
|
|
99
|
+
return path83.replace(homeDir2, "~");
|
|
100
100
|
}
|
|
101
|
-
return
|
|
101
|
+
return path83;
|
|
102
102
|
}
|
|
103
103
|
function shortenPath(filePath, maxLen = 35) {
|
|
104
104
|
if (filePath.length <= maxLen) {
|
|
@@ -4220,8 +4220,8 @@ var require_utils = __commonJS({
|
|
|
4220
4220
|
}
|
|
4221
4221
|
return ind;
|
|
4222
4222
|
}
|
|
4223
|
-
function removeDotSegments(
|
|
4224
|
-
let input =
|
|
4223
|
+
function removeDotSegments(path83) {
|
|
4224
|
+
let input = path83;
|
|
4225
4225
|
const output = [];
|
|
4226
4226
|
let nextSlash = -1;
|
|
4227
4227
|
let len = 0;
|
|
@@ -4420,8 +4420,8 @@ var require_schemes = __commonJS({
|
|
|
4420
4420
|
wsComponent.secure = void 0;
|
|
4421
4421
|
}
|
|
4422
4422
|
if (wsComponent.resourceName) {
|
|
4423
|
-
const [
|
|
4424
|
-
wsComponent.path =
|
|
4423
|
+
const [path83, query] = wsComponent.resourceName.split("?");
|
|
4424
|
+
wsComponent.path = path83 && path83 !== "/" ? path83 : void 0;
|
|
4425
4425
|
wsComponent.query = query;
|
|
4426
4426
|
wsComponent.resourceName = void 0;
|
|
4427
4427
|
}
|
|
@@ -7507,9 +7507,9 @@ function hasCycleInSchema(schema2) {
|
|
|
7507
7507
|
if (!ref.startsWith("#/")) {
|
|
7508
7508
|
return null;
|
|
7509
7509
|
}
|
|
7510
|
-
const
|
|
7510
|
+
const path83 = ref.substring(2).split("/");
|
|
7511
7511
|
let current = schema2;
|
|
7512
|
-
for (const segment of
|
|
7512
|
+
for (const segment of path83) {
|
|
7513
7513
|
if (typeof current !== "object" || current === null || !Object.prototype.hasOwnProperty.call(current, segment)) {
|
|
7514
7514
|
return null;
|
|
7515
7515
|
}
|
|
@@ -13443,12 +13443,12 @@ var init_path = __esm({
|
|
|
13443
13443
|
"node_modules/openai/internal/utils/path.mjs"() {
|
|
13444
13444
|
init_error();
|
|
13445
13445
|
EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
13446
|
-
createPathTagFunction = (pathEncoder = encodeURIPath) => function
|
|
13446
|
+
createPathTagFunction = (pathEncoder = encodeURIPath) => function path83(statics, ...params) {
|
|
13447
13447
|
if (statics.length === 1)
|
|
13448
13448
|
return statics[0];
|
|
13449
13449
|
let postPath = false;
|
|
13450
13450
|
const invalidSegments = [];
|
|
13451
|
-
const
|
|
13451
|
+
const path84 = statics.reduce((previousValue, currentValue, index) => {
|
|
13452
13452
|
if (/[?#]/.test(currentValue)) {
|
|
13453
13453
|
postPath = true;
|
|
13454
13454
|
}
|
|
@@ -13465,7 +13465,7 @@ var init_path = __esm({
|
|
|
13465
13465
|
}
|
|
13466
13466
|
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
13467
13467
|
}, "");
|
|
13468
|
-
const pathOnly =
|
|
13468
|
+
const pathOnly = path84.split(/[?#]/, 1)[0];
|
|
13469
13469
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
13470
13470
|
let match2;
|
|
13471
13471
|
while ((match2 = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
@@ -13486,10 +13486,10 @@ var init_path = __esm({
|
|
|
13486
13486
|
}, "");
|
|
13487
13487
|
throw new OpenAIError(`Path parameters result in path with invalid segments:
|
|
13488
13488
|
${invalidSegments.map((e2) => e2.error).join("\n")}
|
|
13489
|
-
${
|
|
13489
|
+
${path84}
|
|
13490
13490
|
${underline}`);
|
|
13491
13491
|
}
|
|
13492
|
-
return
|
|
13492
|
+
return path84;
|
|
13493
13493
|
};
|
|
13494
13494
|
path5 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
13495
13495
|
}
|
|
@@ -18458,9 +18458,9 @@ var init_client = __esm({
|
|
|
18458
18458
|
makeStatusError(status, error, message, headers) {
|
|
18459
18459
|
return APIError.generate(status, error, message, headers);
|
|
18460
18460
|
}
|
|
18461
|
-
buildURL(
|
|
18461
|
+
buildURL(path83, query, defaultBaseURL) {
|
|
18462
18462
|
const baseURL = !__classPrivateFieldGet(this, _OpenAI_instances, "m", _OpenAI_baseURLOverridden).call(this) && defaultBaseURL || this.baseURL;
|
|
18463
|
-
const url2 = isAbsoluteURL(
|
|
18463
|
+
const url2 = isAbsoluteURL(path83) ? new URL(path83) : new URL(baseURL + (baseURL.endsWith("/") && path83.startsWith("/") ? path83.slice(1) : path83));
|
|
18464
18464
|
const defaultQuery = this.defaultQuery();
|
|
18465
18465
|
if (!isEmptyObj(defaultQuery)) {
|
|
18466
18466
|
query = { ...defaultQuery, ...query };
|
|
@@ -18483,24 +18483,24 @@ var init_client = __esm({
|
|
|
18483
18483
|
*/
|
|
18484
18484
|
async prepareRequest(request2, { url: url2, options: options2 }) {
|
|
18485
18485
|
}
|
|
18486
|
-
get(
|
|
18487
|
-
return this.methodRequest("get",
|
|
18486
|
+
get(path83, opts) {
|
|
18487
|
+
return this.methodRequest("get", path83, opts);
|
|
18488
18488
|
}
|
|
18489
|
-
post(
|
|
18490
|
-
return this.methodRequest("post",
|
|
18489
|
+
post(path83, opts) {
|
|
18490
|
+
return this.methodRequest("post", path83, opts);
|
|
18491
18491
|
}
|
|
18492
|
-
patch(
|
|
18493
|
-
return this.methodRequest("patch",
|
|
18492
|
+
patch(path83, opts) {
|
|
18493
|
+
return this.methodRequest("patch", path83, opts);
|
|
18494
18494
|
}
|
|
18495
|
-
put(
|
|
18496
|
-
return this.methodRequest("put",
|
|
18495
|
+
put(path83, opts) {
|
|
18496
|
+
return this.methodRequest("put", path83, opts);
|
|
18497
18497
|
}
|
|
18498
|
-
delete(
|
|
18499
|
-
return this.methodRequest("delete",
|
|
18498
|
+
delete(path83, opts) {
|
|
18499
|
+
return this.methodRequest("delete", path83, opts);
|
|
18500
18500
|
}
|
|
18501
|
-
methodRequest(method,
|
|
18501
|
+
methodRequest(method, path83, opts) {
|
|
18502
18502
|
return this.request(Promise.resolve(opts).then((opts2) => {
|
|
18503
|
-
return { method, path:
|
|
18503
|
+
return { method, path: path83, ...opts2 };
|
|
18504
18504
|
}));
|
|
18505
18505
|
}
|
|
18506
18506
|
request(options2, remainingRetries = null) {
|
|
@@ -18604,8 +18604,8 @@ var init_client = __esm({
|
|
|
18604
18604
|
}));
|
|
18605
18605
|
return { response, options: options2, controller, requestLogID, retryOfRequestLogID, startTime };
|
|
18606
18606
|
}
|
|
18607
|
-
getAPIList(
|
|
18608
|
-
return this.requestAPIList(Page2, { method: "get", path:
|
|
18607
|
+
getAPIList(path83, Page2, opts) {
|
|
18608
|
+
return this.requestAPIList(Page2, { method: "get", path: path83, ...opts });
|
|
18609
18609
|
}
|
|
18610
18610
|
requestAPIList(Page2, options2) {
|
|
18611
18611
|
const request2 = this.makeRequest(options2, null, void 0);
|
|
@@ -18683,8 +18683,8 @@ var init_client = __esm({
|
|
|
18683
18683
|
}
|
|
18684
18684
|
async buildRequest(inputOptions, { retryCount = 0 } = {}) {
|
|
18685
18685
|
const options2 = { ...inputOptions };
|
|
18686
|
-
const { method, path:
|
|
18687
|
-
const url2 = this.buildURL(
|
|
18686
|
+
const { method, path: path83, query, defaultBaseURL } = options2;
|
|
18687
|
+
const url2 = this.buildURL(path83, query, defaultBaseURL);
|
|
18688
18688
|
if ("timeout" in options2)
|
|
18689
18689
|
validatePositiveInteger("timeout", options2.timeout);
|
|
18690
18690
|
options2.timeout = options2.timeout ?? this.timeout;
|
|
@@ -22342,7 +22342,7 @@ async function createContentGeneratorConfig(config, authType) {
|
|
|
22342
22342
|
async function createContentGenerator(config, gcConfig, sessionId2) {
|
|
22343
22343
|
if (DEBUG_CONTENT)
|
|
22344
22344
|
console.log(`\u{1F41B} DEBUG createContentGenerator: authType=${config.authType}, apiKey=${config.apiKey}, baseUrl=${config.baseUrl}`);
|
|
22345
|
-
const version = "1.2.
|
|
22345
|
+
const version = "1.2.9";
|
|
22346
22346
|
const userAgent = `FSS-Link/${version} (${process.platform}; ${process.arch})`;
|
|
22347
22347
|
const baseHeaders = {
|
|
22348
22348
|
"User-Agent": userAgent
|
|
@@ -29769,12 +29769,12 @@ var init_esm5 = __esm({
|
|
|
29769
29769
|
/**
|
|
29770
29770
|
* Get the Path object referenced by the string path, resolved from this Path
|
|
29771
29771
|
*/
|
|
29772
|
-
resolve(
|
|
29773
|
-
if (!
|
|
29772
|
+
resolve(path83) {
|
|
29773
|
+
if (!path83) {
|
|
29774
29774
|
return this;
|
|
29775
29775
|
}
|
|
29776
|
-
const rootPath = this.getRootString(
|
|
29777
|
-
const dir =
|
|
29776
|
+
const rootPath = this.getRootString(path83);
|
|
29777
|
+
const dir = path83.substring(rootPath.length);
|
|
29778
29778
|
const dirParts = dir.split(this.splitSep);
|
|
29779
29779
|
const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
|
|
29780
29780
|
return result;
|
|
@@ -30526,8 +30526,8 @@ var init_esm5 = __esm({
|
|
|
30526
30526
|
/**
|
|
30527
30527
|
* @internal
|
|
30528
30528
|
*/
|
|
30529
|
-
getRootString(
|
|
30530
|
-
return win32.parse(
|
|
30529
|
+
getRootString(path83) {
|
|
30530
|
+
return win32.parse(path83).root;
|
|
30531
30531
|
}
|
|
30532
30532
|
/**
|
|
30533
30533
|
* @internal
|
|
@@ -30573,8 +30573,8 @@ var init_esm5 = __esm({
|
|
|
30573
30573
|
/**
|
|
30574
30574
|
* @internal
|
|
30575
30575
|
*/
|
|
30576
|
-
getRootString(
|
|
30577
|
-
return
|
|
30576
|
+
getRootString(path83) {
|
|
30577
|
+
return path83.startsWith("/") ? "/" : "";
|
|
30578
30578
|
}
|
|
30579
30579
|
/**
|
|
30580
30580
|
* @internal
|
|
@@ -30663,11 +30663,11 @@ var init_esm5 = __esm({
|
|
|
30663
30663
|
/**
|
|
30664
30664
|
* Get the depth of a provided path, string, or the cwd
|
|
30665
30665
|
*/
|
|
30666
|
-
depth(
|
|
30667
|
-
if (typeof
|
|
30668
|
-
|
|
30666
|
+
depth(path83 = this.cwd) {
|
|
30667
|
+
if (typeof path83 === "string") {
|
|
30668
|
+
path83 = this.cwd.resolve(path83);
|
|
30669
30669
|
}
|
|
30670
|
-
return
|
|
30670
|
+
return path83.depth();
|
|
30671
30671
|
}
|
|
30672
30672
|
/**
|
|
30673
30673
|
* Return the cache of child entries. Exposed so subclasses can create
|
|
@@ -31154,9 +31154,9 @@ var init_esm5 = __esm({
|
|
|
31154
31154
|
process19();
|
|
31155
31155
|
return results;
|
|
31156
31156
|
}
|
|
31157
|
-
chdir(
|
|
31157
|
+
chdir(path83 = this.cwd) {
|
|
31158
31158
|
const oldCwd = this.cwd;
|
|
31159
|
-
this.cwd = typeof
|
|
31159
|
+
this.cwd = typeof path83 === "string" ? this.cwd.resolve(path83) : path83;
|
|
31160
31160
|
this.cwd[setAsCwd](oldCwd);
|
|
31161
31161
|
}
|
|
31162
31162
|
};
|
|
@@ -31531,8 +31531,8 @@ var init_processor = __esm({
|
|
|
31531
31531
|
}
|
|
31532
31532
|
// match, absolute, ifdir
|
|
31533
31533
|
entries() {
|
|
31534
|
-
return [...this.store.entries()].map(([
|
|
31535
|
-
|
|
31534
|
+
return [...this.store.entries()].map(([path83, n2]) => [
|
|
31535
|
+
path83,
|
|
31536
31536
|
!!(n2 & 2),
|
|
31537
31537
|
!!(n2 & 1)
|
|
31538
31538
|
]);
|
|
@@ -31745,9 +31745,9 @@ var init_walker = __esm({
|
|
|
31745
31745
|
signal;
|
|
31746
31746
|
maxDepth;
|
|
31747
31747
|
includeChildMatches;
|
|
31748
|
-
constructor(patterns,
|
|
31748
|
+
constructor(patterns, path83, opts) {
|
|
31749
31749
|
this.patterns = patterns;
|
|
31750
|
-
this.path =
|
|
31750
|
+
this.path = path83;
|
|
31751
31751
|
this.opts = opts;
|
|
31752
31752
|
this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
|
|
31753
31753
|
this.includeChildMatches = opts.includeChildMatches !== false;
|
|
@@ -31766,11 +31766,11 @@ var init_walker = __esm({
|
|
|
31766
31766
|
});
|
|
31767
31767
|
}
|
|
31768
31768
|
}
|
|
31769
|
-
#ignored(
|
|
31770
|
-
return this.seen.has(
|
|
31769
|
+
#ignored(path83) {
|
|
31770
|
+
return this.seen.has(path83) || !!this.#ignore?.ignored?.(path83);
|
|
31771
31771
|
}
|
|
31772
|
-
#childrenIgnored(
|
|
31773
|
-
return !!this.#ignore?.childrenIgnored?.(
|
|
31772
|
+
#childrenIgnored(path83) {
|
|
31773
|
+
return !!this.#ignore?.childrenIgnored?.(path83);
|
|
31774
31774
|
}
|
|
31775
31775
|
// backpressure mechanism
|
|
31776
31776
|
pause() {
|
|
@@ -31985,8 +31985,8 @@ var init_walker = __esm({
|
|
|
31985
31985
|
};
|
|
31986
31986
|
GlobWalker = class extends GlobUtil {
|
|
31987
31987
|
matches = /* @__PURE__ */ new Set();
|
|
31988
|
-
constructor(patterns,
|
|
31989
|
-
super(patterns,
|
|
31988
|
+
constructor(patterns, path83, opts) {
|
|
31989
|
+
super(patterns, path83, opts);
|
|
31990
31990
|
}
|
|
31991
31991
|
matchEmit(e2) {
|
|
31992
31992
|
this.matches.add(e2);
|
|
@@ -32023,8 +32023,8 @@ var init_walker = __esm({
|
|
|
32023
32023
|
};
|
|
32024
32024
|
GlobStream = class extends GlobUtil {
|
|
32025
32025
|
results;
|
|
32026
|
-
constructor(patterns,
|
|
32027
|
-
super(patterns,
|
|
32026
|
+
constructor(patterns, path83, opts) {
|
|
32027
|
+
super(patterns, path83, opts);
|
|
32028
32028
|
this.results = new Minipass({
|
|
32029
32029
|
signal: this.signal,
|
|
32030
32030
|
objectMode: true
|
|
@@ -33568,12 +33568,12 @@ ${fileListDescription}`;
|
|
|
33568
33568
|
}
|
|
33569
33569
|
formatFilesWithMetadata(files) {
|
|
33570
33570
|
return files.map((file) => {
|
|
33571
|
-
const { path:
|
|
33571
|
+
const { path: path83, metadata } = file;
|
|
33572
33572
|
const icon = metadata.icon;
|
|
33573
33573
|
const size = formatFileSize(metadata.size);
|
|
33574
33574
|
const lines = metadata.totalLines ? ` (${metadata.totalLines} lines, ${size}` : ` (${size}`;
|
|
33575
33575
|
const time = formatRelativeTime(metadata.lastModified);
|
|
33576
|
-
return `${icon} ${
|
|
33576
|
+
return `${icon} ${path83}${lines}, ${time})`;
|
|
33577
33577
|
}).join("\n");
|
|
33578
33578
|
}
|
|
33579
33579
|
formatGroupedFiles(files) {
|
|
@@ -33591,12 +33591,12 @@ ${fileListDescription}`;
|
|
|
33591
33591
|
const totalSize = groupFiles2.reduce((sum, f) => sum + f.metadata.size, 0);
|
|
33592
33592
|
const header = `${groupName} (${groupFiles2.length} files, ${formatFileSize(totalSize)}):`;
|
|
33593
33593
|
const fileList = groupFiles2.map((file) => {
|
|
33594
|
-
const { path:
|
|
33594
|
+
const { path: path83, metadata } = file;
|
|
33595
33595
|
const icon = metadata.icon;
|
|
33596
33596
|
const size = formatFileSize(metadata.size);
|
|
33597
33597
|
const lines = metadata.totalLines ? ` (${metadata.totalLines} lines, ${size}` : ` (${size}`;
|
|
33598
33598
|
const time = formatRelativeTime(metadata.lastModified);
|
|
33599
|
-
return `${icon} ${
|
|
33599
|
+
return `${icon} ${path83}${lines}, ${time})`;
|
|
33600
33600
|
}).join("\n");
|
|
33601
33601
|
groupStrings.push(`${header}
|
|
33602
33602
|
${fileList}`);
|
|
@@ -34268,11 +34268,11 @@ var init_lib = __esm({
|
|
|
34268
34268
|
}
|
|
34269
34269
|
}
|
|
34270
34270
|
},
|
|
34271
|
-
addToPath: function addToPath(
|
|
34272
|
-
var last =
|
|
34271
|
+
addToPath: function addToPath(path83, added, removed, oldPosInc, options2) {
|
|
34272
|
+
var last = path83.lastComponent;
|
|
34273
34273
|
if (last && !options2.oneChangePerToken && last.added === added && last.removed === removed) {
|
|
34274
34274
|
return {
|
|
34275
|
-
oldPos:
|
|
34275
|
+
oldPos: path83.oldPos + oldPosInc,
|
|
34276
34276
|
lastComponent: {
|
|
34277
34277
|
count: last.count + 1,
|
|
34278
34278
|
added,
|
|
@@ -34282,7 +34282,7 @@ var init_lib = __esm({
|
|
|
34282
34282
|
};
|
|
34283
34283
|
} else {
|
|
34284
34284
|
return {
|
|
34285
|
-
oldPos:
|
|
34285
|
+
oldPos: path83.oldPos + oldPosInc,
|
|
34286
34286
|
lastComponent: {
|
|
34287
34287
|
count: 1,
|
|
34288
34288
|
added,
|
|
@@ -35036,8 +35036,8 @@ var init_parseUtil = __esm({
|
|
|
35036
35036
|
init_errors3();
|
|
35037
35037
|
init_en();
|
|
35038
35038
|
makeIssue = (params) => {
|
|
35039
|
-
const { data, path:
|
|
35040
|
-
const fullPath = [...
|
|
35039
|
+
const { data, path: path83, errorMaps, issueData } = params;
|
|
35040
|
+
const fullPath = [...path83, ...issueData.path || []];
|
|
35041
35041
|
const fullIssue = {
|
|
35042
35042
|
...issueData,
|
|
35043
35043
|
path: fullPath
|
|
@@ -35345,11 +35345,11 @@ var init_types3 = __esm({
|
|
|
35345
35345
|
init_parseUtil();
|
|
35346
35346
|
init_util();
|
|
35347
35347
|
ParseInputLazyPath = class {
|
|
35348
|
-
constructor(parent, value,
|
|
35348
|
+
constructor(parent, value, path83, key) {
|
|
35349
35349
|
this._cachedPath = [];
|
|
35350
35350
|
this.parent = parent;
|
|
35351
35351
|
this.data = value;
|
|
35352
|
-
this._path =
|
|
35352
|
+
this._path = path83;
|
|
35353
35353
|
this._key = key;
|
|
35354
35354
|
}
|
|
35355
35355
|
get path() {
|
|
@@ -38932,11 +38932,11 @@ import { StreamableHTTPClientTransport as StreamableHTTPClientTransport2 } from
|
|
|
38932
38932
|
import * as os10 from "node:os";
|
|
38933
38933
|
import * as path19 from "node:path";
|
|
38934
38934
|
import { EnvHttpProxyAgent } from "undici";
|
|
38935
|
-
function getRealPath(
|
|
38935
|
+
function getRealPath(path83) {
|
|
38936
38936
|
try {
|
|
38937
|
-
return fs15.realpathSync(
|
|
38937
|
+
return fs15.realpathSync(path83);
|
|
38938
38938
|
} catch (_e) {
|
|
38939
|
-
return
|
|
38939
|
+
return path83;
|
|
38940
38940
|
}
|
|
38941
38941
|
}
|
|
38942
38942
|
function getIdeServerHost() {
|
|
@@ -54114,8 +54114,8 @@ function mergeDuplicatesPreferLast(items, getKey) {
|
|
|
54114
54114
|
}
|
|
54115
54115
|
return [...map3.values()].reverse();
|
|
54116
54116
|
}
|
|
54117
|
-
function get(obj,
|
|
54118
|
-
for (const key of
|
|
54117
|
+
function get(obj, path83) {
|
|
54118
|
+
for (const key of path83) {
|
|
54119
54119
|
if (!obj) {
|
|
54120
54120
|
return void 0;
|
|
54121
54121
|
}
|
|
@@ -54494,8 +54494,8 @@ function withBrackets(str3, brackets) {
|
|
|
54494
54494
|
const rbr = typeof brackets[1] === "string" ? brackets[1] : "]";
|
|
54495
54495
|
return lbr + str3 + rbr;
|
|
54496
54496
|
}
|
|
54497
|
-
function pathRewrite(
|
|
54498
|
-
const modifiedPath = typeof rewriter === "function" ? rewriter(
|
|
54497
|
+
function pathRewrite(path83, rewriter, baseUrl, metadata, elem) {
|
|
54498
|
+
const modifiedPath = typeof rewriter === "function" ? rewriter(path83, metadata, elem) : path83;
|
|
54499
54499
|
return modifiedPath[0] === "/" && baseUrl ? trimCharacterEnd(baseUrl, "/") + modifiedPath : modifiedPath;
|
|
54500
54500
|
}
|
|
54501
54501
|
function formatImage(elem, walk, builder, formatOptions) {
|
|
@@ -54709,9 +54709,9 @@ function handleDeprecatedOptions(options2) {
|
|
|
54709
54709
|
options2.selectors.push(...tagDefinitions);
|
|
54710
54710
|
options2.selectors = mergeDuplicatesPreferLast(options2.selectors, ((s2) => s2.selector));
|
|
54711
54711
|
}
|
|
54712
|
-
function set2(obj,
|
|
54713
|
-
const valueKey =
|
|
54714
|
-
for (const key of
|
|
54712
|
+
function set2(obj, path83, value) {
|
|
54713
|
+
const valueKey = path83.pop();
|
|
54714
|
+
for (const key of path83) {
|
|
54715
54715
|
let nested = obj[key];
|
|
54716
54716
|
if (!nested) {
|
|
54717
54717
|
nested = {};
|
|
@@ -60654,12 +60654,12 @@ var init_text_analyzer = __esm({
|
|
|
60654
60654
|
}
|
|
60655
60655
|
return counts;
|
|
60656
60656
|
}
|
|
60657
|
-
getFileExtension(
|
|
60658
|
-
const lastDot =
|
|
60659
|
-
return lastDot === -1 ? "" :
|
|
60657
|
+
getFileExtension(path83) {
|
|
60658
|
+
const lastDot = path83.lastIndexOf(".");
|
|
60659
|
+
return lastDot === -1 ? "" : path83.substring(lastDot).toLowerCase();
|
|
60660
60660
|
}
|
|
60661
|
-
getFileName(
|
|
60662
|
-
return
|
|
60661
|
+
getFileName(path83) {
|
|
60662
|
+
return path83.split("/").pop() || path83.split("\\").pop() || path83;
|
|
60663
60663
|
}
|
|
60664
60664
|
createErrorResult(error) {
|
|
60665
60665
|
return {
|
|
@@ -70477,18 +70477,18 @@ var init_client2 = __esm({
|
|
|
70477
70477
|
f
|
|
70478
70478
|
]));
|
|
70479
70479
|
const openedFiles = [];
|
|
70480
|
-
for (const [
|
|
70481
|
-
if (!lastFiles.has(
|
|
70482
|
-
openedFiles.push(
|
|
70480
|
+
for (const [path83] of currentFiles.entries()) {
|
|
70481
|
+
if (!lastFiles.has(path83)) {
|
|
70482
|
+
openedFiles.push(path83);
|
|
70483
70483
|
}
|
|
70484
70484
|
}
|
|
70485
70485
|
if (openedFiles.length > 0) {
|
|
70486
70486
|
changes["filesOpened"] = openedFiles;
|
|
70487
70487
|
}
|
|
70488
70488
|
const closedFiles = [];
|
|
70489
|
-
for (const [
|
|
70490
|
-
if (!currentFiles.has(
|
|
70491
|
-
closedFiles.push(
|
|
70489
|
+
for (const [path83] of lastFiles.entries()) {
|
|
70490
|
+
if (!currentFiles.has(path83)) {
|
|
70491
|
+
closedFiles.push(path83);
|
|
70492
70492
|
}
|
|
70493
70493
|
}
|
|
70494
70494
|
if (closedFiles.length > 0) {
|
|
@@ -71214,7 +71214,7 @@ var require_ignore = __commonJS({
|
|
|
71214
71214
|
// path matching.
|
|
71215
71215
|
// - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
71216
71216
|
// @returns {TestResult} true if a file is ignored
|
|
71217
|
-
test(
|
|
71217
|
+
test(path83, checkUnignored, mode) {
|
|
71218
71218
|
let ignored = false;
|
|
71219
71219
|
let unignored = false;
|
|
71220
71220
|
let matchedRule;
|
|
@@ -71223,7 +71223,7 @@ var require_ignore = __commonJS({
|
|
|
71223
71223
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
|
|
71224
71224
|
return;
|
|
71225
71225
|
}
|
|
71226
|
-
const matched = rule[mode].test(
|
|
71226
|
+
const matched = rule[mode].test(path83);
|
|
71227
71227
|
if (!matched) {
|
|
71228
71228
|
return;
|
|
71229
71229
|
}
|
|
@@ -71244,17 +71244,17 @@ var require_ignore = __commonJS({
|
|
|
71244
71244
|
var throwError2 = (message, Ctor) => {
|
|
71245
71245
|
throw new Ctor(message);
|
|
71246
71246
|
};
|
|
71247
|
-
var checkPath = (
|
|
71248
|
-
if (!isString(
|
|
71247
|
+
var checkPath = (path83, originalPath, doThrow) => {
|
|
71248
|
+
if (!isString(path83)) {
|
|
71249
71249
|
return doThrow(
|
|
71250
71250
|
`path must be a string, but got \`${originalPath}\``,
|
|
71251
71251
|
TypeError
|
|
71252
71252
|
);
|
|
71253
71253
|
}
|
|
71254
|
-
if (!
|
|
71254
|
+
if (!path83) {
|
|
71255
71255
|
return doThrow(`path must not be empty`, TypeError);
|
|
71256
71256
|
}
|
|
71257
|
-
if (checkPath.isNotRelative(
|
|
71257
|
+
if (checkPath.isNotRelative(path83)) {
|
|
71258
71258
|
const r3 = "`path.relative()`d";
|
|
71259
71259
|
return doThrow(
|
|
71260
71260
|
`path should be a ${r3} string, but got "${originalPath}"`,
|
|
@@ -71263,7 +71263,7 @@ var require_ignore = __commonJS({
|
|
|
71263
71263
|
}
|
|
71264
71264
|
return true;
|
|
71265
71265
|
};
|
|
71266
|
-
var isNotRelative = (
|
|
71266
|
+
var isNotRelative = (path83) => REGEX_TEST_INVALID_PATH.test(path83);
|
|
71267
71267
|
checkPath.isNotRelative = isNotRelative;
|
|
71268
71268
|
checkPath.convert = (p) => p;
|
|
71269
71269
|
var Ignore3 = class {
|
|
@@ -71293,19 +71293,19 @@ var require_ignore = __commonJS({
|
|
|
71293
71293
|
}
|
|
71294
71294
|
// @returns {TestResult}
|
|
71295
71295
|
_test(originalPath, cache, checkUnignored, slices) {
|
|
71296
|
-
const
|
|
71296
|
+
const path83 = originalPath && checkPath.convert(originalPath);
|
|
71297
71297
|
checkPath(
|
|
71298
|
-
|
|
71298
|
+
path83,
|
|
71299
71299
|
originalPath,
|
|
71300
71300
|
this._strictPathCheck ? throwError2 : RETURN_FALSE
|
|
71301
71301
|
);
|
|
71302
|
-
return this._t(
|
|
71302
|
+
return this._t(path83, cache, checkUnignored, slices);
|
|
71303
71303
|
}
|
|
71304
|
-
checkIgnore(
|
|
71305
|
-
if (!REGEX_TEST_TRAILING_SLASH.test(
|
|
71306
|
-
return this.test(
|
|
71304
|
+
checkIgnore(path83) {
|
|
71305
|
+
if (!REGEX_TEST_TRAILING_SLASH.test(path83)) {
|
|
71306
|
+
return this.test(path83);
|
|
71307
71307
|
}
|
|
71308
|
-
const slices =
|
|
71308
|
+
const slices = path83.split(SLASH).filter(Boolean);
|
|
71309
71309
|
slices.pop();
|
|
71310
71310
|
if (slices.length) {
|
|
71311
71311
|
const parent = this._t(
|
|
@@ -71318,18 +71318,18 @@ var require_ignore = __commonJS({
|
|
|
71318
71318
|
return parent;
|
|
71319
71319
|
}
|
|
71320
71320
|
}
|
|
71321
|
-
return this._rules.test(
|
|
71321
|
+
return this._rules.test(path83, false, MODE_CHECK_IGNORE);
|
|
71322
71322
|
}
|
|
71323
|
-
_t(
|
|
71324
|
-
if (
|
|
71325
|
-
return cache[
|
|
71323
|
+
_t(path83, cache, checkUnignored, slices) {
|
|
71324
|
+
if (path83 in cache) {
|
|
71325
|
+
return cache[path83];
|
|
71326
71326
|
}
|
|
71327
71327
|
if (!slices) {
|
|
71328
|
-
slices =
|
|
71328
|
+
slices = path83.split(SLASH).filter(Boolean);
|
|
71329
71329
|
}
|
|
71330
71330
|
slices.pop();
|
|
71331
71331
|
if (!slices.length) {
|
|
71332
|
-
return cache[
|
|
71332
|
+
return cache[path83] = this._rules.test(path83, checkUnignored, MODE_IGNORE);
|
|
71333
71333
|
}
|
|
71334
71334
|
const parent = this._t(
|
|
71335
71335
|
slices.join(SLASH) + SLASH,
|
|
@@ -71337,29 +71337,29 @@ var require_ignore = __commonJS({
|
|
|
71337
71337
|
checkUnignored,
|
|
71338
71338
|
slices
|
|
71339
71339
|
);
|
|
71340
|
-
return cache[
|
|
71340
|
+
return cache[path83] = parent.ignored ? parent : this._rules.test(path83, checkUnignored, MODE_IGNORE);
|
|
71341
71341
|
}
|
|
71342
|
-
ignores(
|
|
71343
|
-
return this._test(
|
|
71342
|
+
ignores(path83) {
|
|
71343
|
+
return this._test(path83, this._ignoreCache, false).ignored;
|
|
71344
71344
|
}
|
|
71345
71345
|
createFilter() {
|
|
71346
|
-
return (
|
|
71346
|
+
return (path83) => !this.ignores(path83);
|
|
71347
71347
|
}
|
|
71348
71348
|
filter(paths) {
|
|
71349
71349
|
return makeArray(paths).filter(this.createFilter());
|
|
71350
71350
|
}
|
|
71351
71351
|
// @returns {TestResult}
|
|
71352
|
-
test(
|
|
71353
|
-
return this._test(
|
|
71352
|
+
test(path83) {
|
|
71353
|
+
return this._test(path83, this._testCache, true);
|
|
71354
71354
|
}
|
|
71355
71355
|
};
|
|
71356
71356
|
var factory = (options2) => new Ignore3(options2);
|
|
71357
|
-
var isPathValid = (
|
|
71357
|
+
var isPathValid = (path83) => checkPath(path83 && checkPath.convert(path83), path83, RETURN_FALSE);
|
|
71358
71358
|
var setupWindows = () => {
|
|
71359
71359
|
const makePosix = (str3) => /^\\\\\?\\/.test(str3) || /["<>|\u0000-\u001F]+/u.test(str3) ? str3 : str3.replace(/\\/g, "/");
|
|
71360
71360
|
checkPath.convert = makePosix;
|
|
71361
71361
|
const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
71362
|
-
checkPath.isNotRelative = (
|
|
71362
|
+
checkPath.isNotRelative = (path83) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path83) || isNotRelative(path83);
|
|
71363
71363
|
};
|
|
71364
71364
|
if (
|
|
71365
71365
|
// Detect `process` so that it can run in browsers.
|
|
@@ -72806,9 +72806,9 @@ var init_logger = __esm({
|
|
|
72806
72806
|
console.error("Logger not initialized or checkpoint file path not set. Cannot save a checkpoint.");
|
|
72807
72807
|
return;
|
|
72808
72808
|
}
|
|
72809
|
-
const
|
|
72809
|
+
const path83 = this._checkpointPath(tag2);
|
|
72810
72810
|
try {
|
|
72811
|
-
await fs36.writeFile(
|
|
72811
|
+
await fs36.writeFile(path83, JSON.stringify(conversation, null, 2), "utf-8");
|
|
72812
72812
|
} catch (error) {
|
|
72813
72813
|
console.error("Error writing to checkpoint file:", error);
|
|
72814
72814
|
}
|
|
@@ -72818,12 +72818,12 @@ var init_logger = __esm({
|
|
|
72818
72818
|
console.error("Logger not initialized or checkpoint file path not set. Cannot load checkpoint.");
|
|
72819
72819
|
return [];
|
|
72820
72820
|
}
|
|
72821
|
-
const
|
|
72821
|
+
const path83 = await this._getCheckpointPath(tag2);
|
|
72822
72822
|
try {
|
|
72823
|
-
const fileContent = await fs36.readFile(
|
|
72823
|
+
const fileContent = await fs36.readFile(path83, "utf-8");
|
|
72824
72824
|
const parsedContent = JSON.parse(fileContent);
|
|
72825
72825
|
if (!Array.isArray(parsedContent)) {
|
|
72826
|
-
console.warn(`Checkpoint file at ${
|
|
72826
|
+
console.warn(`Checkpoint file at ${path83} is not a valid JSON array. Returning empty checkpoint.`);
|
|
72827
72827
|
return [];
|
|
72828
72828
|
}
|
|
72829
72829
|
return parsedContent;
|
|
@@ -72832,7 +72832,7 @@ var init_logger = __esm({
|
|
|
72832
72832
|
if (nodeError.code === "ENOENT") {
|
|
72833
72833
|
return [];
|
|
72834
72834
|
}
|
|
72835
|
-
console.error(`Failed to read or parse checkpoint file ${
|
|
72835
|
+
console.error(`Failed to read or parse checkpoint file ${path83}:`, error);
|
|
72836
72836
|
return [];
|
|
72837
72837
|
}
|
|
72838
72838
|
}
|
|
@@ -77078,8 +77078,8 @@ var require_utils3 = __commonJS({
|
|
|
77078
77078
|
}
|
|
77079
77079
|
return output;
|
|
77080
77080
|
};
|
|
77081
|
-
exports.basename = (
|
|
77082
|
-
const segs =
|
|
77081
|
+
exports.basename = (path83, { windows } = {}) => {
|
|
77082
|
+
const segs = path83.split(windows ? /[\\/]/ : "/");
|
|
77083
77083
|
const last = segs[segs.length - 1];
|
|
77084
77084
|
if (last === "") {
|
|
77085
77085
|
return segs[segs.length - 2];
|
|
@@ -78498,25 +78498,25 @@ var init_result_cache = __esm({
|
|
|
78498
78498
|
import { createRequire } from "module";
|
|
78499
78499
|
import { basename as basename14, dirname as dirname8, normalize as normalize4, relative as relative5, resolve as resolve13, sep as sep4 } from "path";
|
|
78500
78500
|
import * as nativeFs from "fs";
|
|
78501
|
-
function cleanPath(
|
|
78502
|
-
let normalized2 = normalize4(
|
|
78501
|
+
function cleanPath(path83) {
|
|
78502
|
+
let normalized2 = normalize4(path83);
|
|
78503
78503
|
if (normalized2.length > 1 && normalized2[normalized2.length - 1] === sep4) normalized2 = normalized2.substring(0, normalized2.length - 1);
|
|
78504
78504
|
return normalized2;
|
|
78505
78505
|
}
|
|
78506
|
-
function convertSlashes(
|
|
78507
|
-
return
|
|
78506
|
+
function convertSlashes(path83, separator) {
|
|
78507
|
+
return path83.replace(SLASHES_REGEX, separator);
|
|
78508
78508
|
}
|
|
78509
|
-
function isRootDirectory(
|
|
78510
|
-
return
|
|
78509
|
+
function isRootDirectory(path83) {
|
|
78510
|
+
return path83 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path83);
|
|
78511
78511
|
}
|
|
78512
|
-
function normalizePath(
|
|
78512
|
+
function normalizePath(path83, options2) {
|
|
78513
78513
|
const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options2;
|
|
78514
|
-
const pathNeedsCleaning = process.platform === "win32" &&
|
|
78515
|
-
if (resolvePaths)
|
|
78516
|
-
if (normalizePath$1 || pathNeedsCleaning)
|
|
78517
|
-
if (
|
|
78518
|
-
const needsSeperator =
|
|
78519
|
-
return convertSlashes(needsSeperator ?
|
|
78514
|
+
const pathNeedsCleaning = process.platform === "win32" && path83.includes("/") || path83.startsWith(".");
|
|
78515
|
+
if (resolvePaths) path83 = resolve13(path83);
|
|
78516
|
+
if (normalizePath$1 || pathNeedsCleaning) path83 = cleanPath(path83);
|
|
78517
|
+
if (path83 === ".") return "";
|
|
78518
|
+
const needsSeperator = path83[path83.length - 1] !== pathSeparator;
|
|
78519
|
+
return convertSlashes(needsSeperator ? path83 + pathSeparator : path83, pathSeparator);
|
|
78520
78520
|
}
|
|
78521
78521
|
function joinPathWithBasePath(filename, directoryPath) {
|
|
78522
78522
|
return directoryPath + filename;
|
|
@@ -78572,9 +78572,9 @@ function build$2(options2, isSynchronous) {
|
|
|
78572
78572
|
if (!options2.resolveSymlinks || options2.excludeSymlinks) return null;
|
|
78573
78573
|
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
|
78574
78574
|
}
|
|
78575
|
-
function isRecursive(
|
|
78575
|
+
function isRecursive(path83, resolved, state) {
|
|
78576
78576
|
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
|
|
78577
|
-
let parent = dirname8(
|
|
78577
|
+
let parent = dirname8(path83);
|
|
78578
78578
|
let depth = 1;
|
|
78579
78579
|
while (parent !== state.root && depth < 2) {
|
|
78580
78580
|
const resolvedPath = state.symlinks.get(parent);
|
|
@@ -78582,7 +78582,7 @@ function isRecursive(path82, resolved, state) {
|
|
|
78582
78582
|
if (isSameRoot) depth++;
|
|
78583
78583
|
else parent = dirname8(parent);
|
|
78584
78584
|
}
|
|
78585
|
-
state.symlinks.set(
|
|
78585
|
+
state.symlinks.set(path83, resolved);
|
|
78586
78586
|
return depth > 1;
|
|
78587
78587
|
}
|
|
78588
78588
|
function isRecursiveUsingRealPaths(resolved, state) {
|
|
@@ -78628,8 +78628,8 @@ var init_dist = __esm({
|
|
|
78628
78628
|
paths.push(directoryPath || ".");
|
|
78629
78629
|
};
|
|
78630
78630
|
pushDirectoryFilter = (directoryPath, paths, filters) => {
|
|
78631
|
-
const
|
|
78632
|
-
if (filters.every((filter4) => filter4(
|
|
78631
|
+
const path83 = directoryPath || ".";
|
|
78632
|
+
if (filters.every((filter4) => filter4(path83, true))) paths.push(path83);
|
|
78633
78633
|
};
|
|
78634
78634
|
empty$2 = () => {
|
|
78635
78635
|
};
|
|
@@ -78662,26 +78662,26 @@ var init_dist = __esm({
|
|
|
78662
78662
|
};
|
|
78663
78663
|
empty = () => {
|
|
78664
78664
|
};
|
|
78665
|
-
resolveSymlinksAsync = function(
|
|
78665
|
+
resolveSymlinksAsync = function(path83, state, callback$1) {
|
|
78666
78666
|
const { queue, fs: fs72, options: { suppressErrors } } = state;
|
|
78667
78667
|
queue.enqueue();
|
|
78668
|
-
fs72.realpath(
|
|
78668
|
+
fs72.realpath(path83, (error, resolvedPath) => {
|
|
78669
78669
|
if (error) return queue.dequeue(suppressErrors ? null : error, state);
|
|
78670
78670
|
fs72.stat(resolvedPath, (error$1, stat7) => {
|
|
78671
78671
|
if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
|
|
78672
|
-
if (stat7.isDirectory() && isRecursive(
|
|
78672
|
+
if (stat7.isDirectory() && isRecursive(path83, resolvedPath, state)) return queue.dequeue(null, state);
|
|
78673
78673
|
callback$1(stat7, resolvedPath);
|
|
78674
78674
|
queue.dequeue(null, state);
|
|
78675
78675
|
});
|
|
78676
78676
|
});
|
|
78677
78677
|
};
|
|
78678
|
-
resolveSymlinks = function(
|
|
78678
|
+
resolveSymlinks = function(path83, state, callback$1) {
|
|
78679
78679
|
const { queue, fs: fs72, options: { suppressErrors } } = state;
|
|
78680
78680
|
queue.enqueue();
|
|
78681
78681
|
try {
|
|
78682
|
-
const resolvedPath = fs72.realpathSync(
|
|
78682
|
+
const resolvedPath = fs72.realpathSync(path83);
|
|
78683
78683
|
const stat7 = fs72.statSync(resolvedPath);
|
|
78684
|
-
if (stat7.isDirectory() && isRecursive(
|
|
78684
|
+
if (stat7.isDirectory() && isRecursive(path83, resolvedPath, state)) return;
|
|
78685
78685
|
callback$1(stat7, resolvedPath);
|
|
78686
78686
|
} catch (e2) {
|
|
78687
78687
|
if (!suppressErrors) throw e2;
|
|
@@ -78839,19 +78839,19 @@ var init_dist = __esm({
|
|
|
78839
78839
|
const filename = this.joinPath(entry.name, directoryPath);
|
|
78840
78840
|
this.pushFile(filename, files, this.state.counts, filters);
|
|
78841
78841
|
} else if (entry.isDirectory()) {
|
|
78842
|
-
let
|
|
78843
|
-
if (exclude && exclude(entry.name,
|
|
78844
|
-
this.pushDirectory(
|
|
78845
|
-
this.walkDirectory(this.state,
|
|
78842
|
+
let path83 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
|
78843
|
+
if (exclude && exclude(entry.name, path83)) continue;
|
|
78844
|
+
this.pushDirectory(path83, paths, filters);
|
|
78845
|
+
this.walkDirectory(this.state, path83, path83, depth - 1, this.walk);
|
|
78846
78846
|
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
|
78847
|
-
let
|
|
78848
|
-
this.resolveSymlink(
|
|
78847
|
+
let path83 = joinPathWithBasePath(entry.name, directoryPath);
|
|
78848
|
+
this.resolveSymlink(path83, this.state, (stat7, resolvedPath) => {
|
|
78849
78849
|
if (stat7.isDirectory()) {
|
|
78850
78850
|
resolvedPath = normalizePath(resolvedPath, this.state.options);
|
|
78851
|
-
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath :
|
|
78852
|
-
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath :
|
|
78851
|
+
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path83 + pathSeparator)) return;
|
|
78852
|
+
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path83 + pathSeparator, depth - 1, this.walk);
|
|
78853
78853
|
} else {
|
|
78854
|
-
resolvedPath = useRealPaths ? resolvedPath :
|
|
78854
|
+
resolvedPath = useRealPaths ? resolvedPath : path83;
|
|
78855
78855
|
const filename = basename14(resolvedPath);
|
|
78856
78856
|
const directoryPath$1 = normalizePath(dirname8(resolvedPath), this.state.options);
|
|
78857
78857
|
resolvedPath = this.joinPath(filename, directoryPath$1);
|
|
@@ -79001,7 +79001,7 @@ var init_dist = __esm({
|
|
|
79001
79001
|
isMatch = globFn(patterns, ...options2);
|
|
79002
79002
|
this.globCache[patterns.join("\0")] = isMatch;
|
|
79003
79003
|
}
|
|
79004
|
-
this.options.filters.push((
|
|
79004
|
+
this.options.filters.push((path83) => isMatch(path83));
|
|
79005
79005
|
return this;
|
|
79006
79006
|
}
|
|
79007
79007
|
};
|
|
@@ -94885,13 +94885,13 @@ var LoadedTrustedFolders = class {
|
|
|
94885
94885
|
this.errors = errors;
|
|
94886
94886
|
}
|
|
94887
94887
|
get rules() {
|
|
94888
|
-
return Object.entries(this.user.config).map(([
|
|
94889
|
-
path:
|
|
94888
|
+
return Object.entries(this.user.config).map(([path83, trustLevel]) => ({
|
|
94889
|
+
path: path83,
|
|
94890
94890
|
trustLevel
|
|
94891
94891
|
}));
|
|
94892
94892
|
}
|
|
94893
|
-
setValue(
|
|
94894
|
-
this.user.config[
|
|
94893
|
+
setValue(path83, trustLevel) {
|
|
94894
|
+
this.user.config[path83] = trustLevel;
|
|
94895
94895
|
saveTrustedFolders(this.user);
|
|
94896
94896
|
}
|
|
94897
94897
|
};
|
|
@@ -95173,7 +95173,7 @@ async function getPackageJson() {
|
|
|
95173
95173
|
// packages/cli/src/utils/version.ts
|
|
95174
95174
|
async function getCliVersion() {
|
|
95175
95175
|
const pkgJson = await getPackageJson();
|
|
95176
|
-
return "1.2.
|
|
95176
|
+
return "1.2.9";
|
|
95177
95177
|
}
|
|
95178
95178
|
|
|
95179
95179
|
// packages/cli/src/ui/commands/aboutCommand.ts
|
|
@@ -95225,7 +95225,7 @@ import open4 from "open";
|
|
|
95225
95225
|
import process11 from "node:process";
|
|
95226
95226
|
|
|
95227
95227
|
// packages/cli/src/generated/git-commit.ts
|
|
95228
|
-
var GIT_COMMIT_INFO = "
|
|
95228
|
+
var GIT_COMMIT_INFO = "69072e25";
|
|
95229
95229
|
|
|
95230
95230
|
// packages/cli/src/ui/commands/bugCommand.ts
|
|
95231
95231
|
init_dist2();
|
|
@@ -118594,8 +118594,8 @@ function requiresRestart(key) {
|
|
|
118594
118594
|
function getDefaultValue(key) {
|
|
118595
118595
|
return FLATTENED_SCHEMA[key]?.default;
|
|
118596
118596
|
}
|
|
118597
|
-
function getNestedValue(obj,
|
|
118598
|
-
const [first, ...rest] =
|
|
118597
|
+
function getNestedValue(obj, path83) {
|
|
118598
|
+
const [first, ...rest] = path83;
|
|
118599
118599
|
if (!first || !(first in obj)) {
|
|
118600
118600
|
return void 0;
|
|
118601
118601
|
}
|
|
@@ -118613,12 +118613,12 @@ function getEffectiveValue(key, settings, mergedSettings) {
|
|
|
118613
118613
|
if (!definition) {
|
|
118614
118614
|
return void 0;
|
|
118615
118615
|
}
|
|
118616
|
-
const
|
|
118617
|
-
let value = getNestedValue(settings,
|
|
118616
|
+
const path83 = key.split(".");
|
|
118617
|
+
let value = getNestedValue(settings, path83);
|
|
118618
118618
|
if (value !== void 0) {
|
|
118619
118619
|
return value;
|
|
118620
118620
|
}
|
|
118621
|
-
value = getNestedValue(mergedSettings,
|
|
118621
|
+
value = getNestedValue(mergedSettings, path83);
|
|
118622
118622
|
if (value !== void 0) {
|
|
118623
118623
|
return value;
|
|
118624
118624
|
}
|
|
@@ -118643,12 +118643,12 @@ function getSettingValue(key, settings, mergedSettings) {
|
|
|
118643
118643
|
return false;
|
|
118644
118644
|
}
|
|
118645
118645
|
function settingExistsInScope(key, scopeSettings) {
|
|
118646
|
-
const
|
|
118647
|
-
const value = getNestedValue(scopeSettings,
|
|
118646
|
+
const path83 = key.split(".");
|
|
118647
|
+
const value = getNestedValue(scopeSettings, path83);
|
|
118648
118648
|
return value !== void 0;
|
|
118649
118649
|
}
|
|
118650
|
-
function setNestedValue(obj,
|
|
118651
|
-
const [first, ...rest] =
|
|
118650
|
+
function setNestedValue(obj, path83, value) {
|
|
118651
|
+
const [first, ...rest] = path83;
|
|
118652
118652
|
if (!first) {
|
|
118653
118653
|
return obj;
|
|
118654
118654
|
}
|
|
@@ -118663,15 +118663,15 @@ function setNestedValue(obj, path82, value) {
|
|
|
118663
118663
|
return obj;
|
|
118664
118664
|
}
|
|
118665
118665
|
function setPendingSettingValue(key, value, pendingSettings) {
|
|
118666
|
-
const
|
|
118666
|
+
const path83 = key.split(".");
|
|
118667
118667
|
const newSettings = JSON.parse(JSON.stringify(pendingSettings));
|
|
118668
|
-
setNestedValue(newSettings,
|
|
118668
|
+
setNestedValue(newSettings, path83, value);
|
|
118669
118669
|
return newSettings;
|
|
118670
118670
|
}
|
|
118671
118671
|
function setPendingSettingValueAny(key, value, pendingSettings) {
|
|
118672
|
-
const
|
|
118672
|
+
const path83 = key.split(".");
|
|
118673
118673
|
const newSettings = structuredClone(pendingSettings);
|
|
118674
|
-
setNestedValue(newSettings,
|
|
118674
|
+
setNestedValue(newSettings, path83, value);
|
|
118675
118675
|
return newSettings;
|
|
118676
118676
|
}
|
|
118677
118677
|
function hasRestartRequiredSettings(modifiedSettings) {
|
|
@@ -118682,10 +118682,10 @@ function getRestartRequiredFromModified(modifiedSettings) {
|
|
|
118682
118682
|
}
|
|
118683
118683
|
function saveModifiedSettings(modifiedSettings, pendingSettings, loadedSettings, scope) {
|
|
118684
118684
|
modifiedSettings.forEach((settingKey) => {
|
|
118685
|
-
const
|
|
118685
|
+
const path83 = settingKey.split(".");
|
|
118686
118686
|
const value = getNestedValue(
|
|
118687
118687
|
pendingSettings,
|
|
118688
|
-
|
|
118688
|
+
path83
|
|
118689
118689
|
);
|
|
118690
118690
|
if (value === void 0) {
|
|
118691
118691
|
return;
|
|
@@ -118696,7 +118696,7 @@ function saveModifiedSettings(modifiedSettings, pendingSettings, loadedSettings,
|
|
|
118696
118696
|
);
|
|
118697
118697
|
const isDefaultValue2 = value === getDefaultValue(settingKey);
|
|
118698
118698
|
if (existsInOriginalFile || !isDefaultValue2) {
|
|
118699
|
-
const [parentKey] =
|
|
118699
|
+
const [parentKey] = path83;
|
|
118700
118700
|
if (parentKey) {
|
|
118701
118701
|
const newParentValue = setPendingSettingValueAny(
|
|
118702
118702
|
settingKey,
|
|
@@ -125528,8 +125528,8 @@ function SettingsDialog({
|
|
|
125528
125528
|
displayValue = editBuffer;
|
|
125529
125529
|
}
|
|
125530
125530
|
} else if (item.type === "number") {
|
|
125531
|
-
const
|
|
125532
|
-
const currentValue = getNestedValue(pendingSettings,
|
|
125531
|
+
const path83 = item.value.split(".");
|
|
125532
|
+
const currentValue = getNestedValue(pendingSettings, path83);
|
|
125533
125533
|
const defaultValue = getDefaultValue(item.value);
|
|
125534
125534
|
if (currentValue !== void 0 && currentValue !== null) {
|
|
125535
125535
|
displayValue = String(currentValue);
|
|
@@ -125743,6 +125743,39 @@ import { spawn as spawn5 } from "child_process";
|
|
|
125743
125743
|
var spawnWrapper = spawn5;
|
|
125744
125744
|
|
|
125745
125745
|
// packages/cli/src/utils/handleAutoUpdate.ts
|
|
125746
|
+
import { existsSync as existsSync20 } from "fs";
|
|
125747
|
+
import os28 from "os";
|
|
125748
|
+
import path79 from "path";
|
|
125749
|
+
function hasSudoAskpass() {
|
|
125750
|
+
const homeDir2 = os28.homedir();
|
|
125751
|
+
const sudoGuiPath = path79.join(homeDir2, ".local", "bin", "sudo-gui");
|
|
125752
|
+
return existsSync20(sudoGuiPath);
|
|
125753
|
+
}
|
|
125754
|
+
function shouldAttemptAutoUpdate(installationInfo, isGlobal) {
|
|
125755
|
+
if (!isGlobal) {
|
|
125756
|
+
return {
|
|
125757
|
+
shouldAttempt: true,
|
|
125758
|
+
updateMessage: "Attempting automatic update..."
|
|
125759
|
+
};
|
|
125760
|
+
}
|
|
125761
|
+
if (hasSudoAskpass()) {
|
|
125762
|
+
return {
|
|
125763
|
+
shouldAttempt: true,
|
|
125764
|
+
updateMessage: "Global installation detected. Will prompt for password to update..."
|
|
125765
|
+
};
|
|
125766
|
+
}
|
|
125767
|
+
const manualCommand = installationInfo.updateCommand || "npm install -g fss-link@latest";
|
|
125768
|
+
return {
|
|
125769
|
+
shouldAttempt: false,
|
|
125770
|
+
updateMessage: `Global installation requires elevated privileges.
|
|
125771
|
+
|
|
125772
|
+
To update, run: ${manualCommand.replace("npm install", "sudo npm install")}
|
|
125773
|
+
|
|
125774
|
+
Or for automatic updates, install locally:
|
|
125775
|
+
npm config set prefix ~/.local
|
|
125776
|
+
npm install -g fss-link@latest`
|
|
125777
|
+
};
|
|
125778
|
+
}
|
|
125746
125779
|
function handleAutoUpdate(info, settings, projectRoot, spawnFn = spawnWrapper) {
|
|
125747
125780
|
if (!info) {
|
|
125748
125781
|
return;
|
|
@@ -125754,22 +125787,29 @@ function handleAutoUpdate(info, settings, projectRoot, spawnFn = spawnWrapper) {
|
|
|
125754
125787
|
projectRoot,
|
|
125755
125788
|
settings.merged.disableAutoUpdate ?? false
|
|
125756
125789
|
);
|
|
125790
|
+
const updateDecision = shouldAttemptAutoUpdate(
|
|
125791
|
+
installationInfo,
|
|
125792
|
+
installationInfo.isGlobal
|
|
125793
|
+
);
|
|
125757
125794
|
let combinedMessage = info.message;
|
|
125758
|
-
|
|
125759
|
-
|
|
125760
|
-
${installationInfo.updateMessage}`;
|
|
125761
|
-
}
|
|
125795
|
+
combinedMessage += `
|
|
125796
|
+
${updateDecision.updateMessage}`;
|
|
125762
125797
|
updateEventEmitter.emit("update-received", {
|
|
125763
125798
|
message: combinedMessage
|
|
125764
125799
|
});
|
|
125765
|
-
if (!installationInfo.updateCommand || settings.merged.disableAutoUpdate) {
|
|
125800
|
+
if (!updateDecision.shouldAttempt || !installationInfo.updateCommand || settings.merged.disableAutoUpdate) {
|
|
125766
125801
|
return;
|
|
125767
125802
|
}
|
|
125768
125803
|
const isNightly = info.update.latest.includes("nightly");
|
|
125769
|
-
|
|
125804
|
+
let updateCommand = installationInfo.updateCommand.replace(
|
|
125770
125805
|
"@latest",
|
|
125771
125806
|
isNightly ? "@nightly" : `@${info.update.latest}`
|
|
125772
125807
|
);
|
|
125808
|
+
if (installationInfo.isGlobal && hasSudoAskpass()) {
|
|
125809
|
+
const homeDir2 = os28.homedir();
|
|
125810
|
+
const sudoGui = path79.join(homeDir2, ".local", "bin", "sudo-gui");
|
|
125811
|
+
updateCommand = updateCommand.replace(/^(npm|pnpm|yarn|bun)/, `${sudoGui} $1`);
|
|
125812
|
+
}
|
|
125773
125813
|
const updateProcess = spawnFn(updateCommand, { stdio: "pipe", shell: true });
|
|
125774
125814
|
let errorOutput = "";
|
|
125775
125815
|
updateProcess.stderr.on("data", (data) => {
|
|
@@ -126853,7 +126893,7 @@ async function readStdin() {
|
|
|
126853
126893
|
// packages/cli/src/gemini.tsx
|
|
126854
126894
|
import { basename as basename15 } from "node:path";
|
|
126855
126895
|
import v8 from "node:v8";
|
|
126856
|
-
import
|
|
126896
|
+
import os32 from "node:os";
|
|
126857
126897
|
import dns from "node:dns";
|
|
126858
126898
|
import { spawn as spawn7 } from "node:child_process";
|
|
126859
126899
|
|
|
@@ -126861,14 +126901,14 @@ import { spawn as spawn7 } from "node:child_process";
|
|
|
126861
126901
|
var import_shell_quote4 = __toESM(require_shell_quote(), 1);
|
|
126862
126902
|
init_settings();
|
|
126863
126903
|
import { exec as exec7, execSync as execSync6, spawn as spawn6 } from "node:child_process";
|
|
126864
|
-
import
|
|
126865
|
-
import
|
|
126904
|
+
import os29 from "node:os";
|
|
126905
|
+
import path80 from "node:path";
|
|
126866
126906
|
import fs68 from "node:fs";
|
|
126867
126907
|
import { readFile as readFile11 } from "node:fs/promises";
|
|
126868
126908
|
import { promisify as promisify6 } from "util";
|
|
126869
126909
|
var execAsync5 = promisify6(exec7);
|
|
126870
126910
|
function getContainerPath(hostPath) {
|
|
126871
|
-
if (
|
|
126911
|
+
if (os29.platform() !== "win32") {
|
|
126872
126912
|
return hostPath;
|
|
126873
126913
|
}
|
|
126874
126914
|
const withForwardSlashes = hostPath.replace(/\\/g, "/");
|
|
@@ -126897,7 +126937,7 @@ async function shouldUseCurrentUserInSandbox() {
|
|
|
126897
126937
|
if (envVar === "0" || envVar === "false") {
|
|
126898
126938
|
return false;
|
|
126899
126939
|
}
|
|
126900
|
-
if (
|
|
126940
|
+
if (os29.platform() === "linux") {
|
|
126901
126941
|
try {
|
|
126902
126942
|
const osReleaseContent = await readFile11("/etc/os-release", "utf8");
|
|
126903
126943
|
if (osReleaseContent.includes("ID=debian") || osReleaseContent.includes("ID=ubuntu") || osReleaseContent.match(/^ID_LIKE=.*debian.*/m) || // Covers derivatives
|
|
@@ -126924,7 +126964,7 @@ function ports() {
|
|
|
126924
126964
|
return (process.env["SANDBOX_PORTS"] ?? "").split(",").filter((p) => p.trim()).map((p) => p.trim());
|
|
126925
126965
|
}
|
|
126926
126966
|
function entrypoint(workdir) {
|
|
126927
|
-
const isWindows4 =
|
|
126967
|
+
const isWindows4 = os29.platform() === "win32";
|
|
126928
126968
|
const containerWorkdir = getContainerPath(workdir);
|
|
126929
126969
|
const shellCmds = [];
|
|
126930
126970
|
const pathSeparator = isWindows4 ? ";" : ":";
|
|
@@ -126954,7 +126994,7 @@ function entrypoint(workdir) {
|
|
|
126954
126994
|
if (pythonPathSuffix) {
|
|
126955
126995
|
shellCmds.push(`export PYTHONPATH="$PYTHONPATH${pythonPathSuffix}";`);
|
|
126956
126996
|
}
|
|
126957
|
-
const projectSandboxBashrc =
|
|
126997
|
+
const projectSandboxBashrc = path80.join(
|
|
126958
126998
|
SETTINGS_DIRECTORY_NAME,
|
|
126959
126999
|
"sandbox.bashrc"
|
|
126960
127000
|
);
|
|
@@ -126986,7 +127026,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig) {
|
|
|
126986
127026
|
const profile = process.env["SEATBELT_PROFILE"] ??= "permissive-open";
|
|
126987
127027
|
let profileFile = new URL(`sandbox-macos-${profile}.sb`, import.meta.url).pathname;
|
|
126988
127028
|
if (!BUILTIN_SEATBELT_PROFILES.includes(profile)) {
|
|
126989
|
-
profileFile =
|
|
127029
|
+
profileFile = path80.join(
|
|
126990
127030
|
SETTINGS_DIRECTORY_NAME,
|
|
126991
127031
|
`sandbox-macos-${profile}.sb`
|
|
126992
127032
|
);
|
|
@@ -127006,9 +127046,9 @@ async function start_sandbox(config, nodeArgs = [], cliConfig) {
|
|
|
127006
127046
|
"-D",
|
|
127007
127047
|
`TARGET_DIR=${fs68.realpathSync(process.cwd())}`,
|
|
127008
127048
|
"-D",
|
|
127009
|
-
`TMP_DIR=${fs68.realpathSync(
|
|
127049
|
+
`TMP_DIR=${fs68.realpathSync(os29.tmpdir())}`,
|
|
127010
127050
|
"-D",
|
|
127011
|
-
`HOME_DIR=${fs68.realpathSync(
|
|
127051
|
+
`HOME_DIR=${fs68.realpathSync(os29.homedir())}`,
|
|
127012
127052
|
"-D",
|
|
127013
127053
|
`CACHE_DIR=${fs68.realpathSync(execSync6(`getconf DARWIN_USER_CACHE_DIR`).toString().trim())}`
|
|
127014
127054
|
];
|
|
@@ -127097,13 +127137,13 @@ async function start_sandbox(config, nodeArgs = [], cliConfig) {
|
|
|
127097
127137
|
}
|
|
127098
127138
|
console.error(`hopping into sandbox (command: ${config.command}) ...`);
|
|
127099
127139
|
const gcPath = fs68.realpathSync(process.argv[1]);
|
|
127100
|
-
const projectSandboxDockerfile =
|
|
127140
|
+
const projectSandboxDockerfile = path80.join(
|
|
127101
127141
|
SETTINGS_DIRECTORY_NAME,
|
|
127102
127142
|
"sandbox.Dockerfile"
|
|
127103
127143
|
);
|
|
127104
127144
|
const isCustomProjectSandbox = fs68.existsSync(projectSandboxDockerfile);
|
|
127105
127145
|
const image2 = config.image;
|
|
127106
|
-
const workdir =
|
|
127146
|
+
const workdir = path80.resolve(process.cwd());
|
|
127107
127147
|
const containerWorkdir = getContainerPath(workdir);
|
|
127108
127148
|
if (process.env["BUILD_SANDBOX"]) {
|
|
127109
127149
|
if (!gcPath.includes("fss-link/packages/")) {
|
|
@@ -127115,13 +127155,13 @@ async function start_sandbox(config, nodeArgs = [], cliConfig) {
|
|
|
127115
127155
|
console.error("building sandbox ...");
|
|
127116
127156
|
const gcRoot = gcPath.split("/packages/")[0];
|
|
127117
127157
|
let buildArgs = "";
|
|
127118
|
-
const projectSandboxDockerfile2 =
|
|
127158
|
+
const projectSandboxDockerfile2 = path80.join(
|
|
127119
127159
|
SETTINGS_DIRECTORY_NAME,
|
|
127120
127160
|
"sandbox.Dockerfile"
|
|
127121
127161
|
);
|
|
127122
127162
|
if (isCustomProjectSandbox) {
|
|
127123
127163
|
console.error(`using ${projectSandboxDockerfile2} for sandbox`);
|
|
127124
|
-
buildArgs += `-f ${
|
|
127164
|
+
buildArgs += `-f ${path80.resolve(projectSandboxDockerfile2)} -i ${image2}`;
|
|
127125
127165
|
}
|
|
127126
127166
|
execSync6(
|
|
127127
127167
|
`cd ${gcRoot} && node scripts/build_sandbox.js -s ${buildArgs}`,
|
|
@@ -127171,8 +127211,8 @@ async function start_sandbox(config, nodeArgs = [], cliConfig) {
|
|
|
127171
127211
|
`${userSettingsDirOnHost}:${getContainerPath(userSettingsDirOnHost)}`
|
|
127172
127212
|
);
|
|
127173
127213
|
}
|
|
127174
|
-
args.push("--volume", `${
|
|
127175
|
-
const gcloudConfigDir =
|
|
127214
|
+
args.push("--volume", `${os29.tmpdir()}:${getContainerPath(os29.tmpdir())}`);
|
|
127215
|
+
const gcloudConfigDir = path80.join(os29.homedir(), ".config", "gcloud");
|
|
127176
127216
|
if (fs68.existsSync(gcloudConfigDir)) {
|
|
127177
127217
|
args.push(
|
|
127178
127218
|
"--volume",
|
|
@@ -127196,7 +127236,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig) {
|
|
|
127196
127236
|
to = to || from;
|
|
127197
127237
|
opts = opts || "ro";
|
|
127198
127238
|
mount = `${from}:${to}:${opts}`;
|
|
127199
|
-
if (!
|
|
127239
|
+
if (!path80.isAbsolute(from)) {
|
|
127200
127240
|
console.error(
|
|
127201
127241
|
`ERROR: path '${from}' listed in SANDBOX_MOUNTS must be absolute`
|
|
127202
127242
|
);
|
|
@@ -127304,7 +127344,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig) {
|
|
|
127304
127344
|
}
|
|
127305
127345
|
}
|
|
127306
127346
|
if (process.env["VIRTUAL_ENV"]?.toLowerCase().startsWith(workdir.toLowerCase())) {
|
|
127307
|
-
const sandboxVenvPath =
|
|
127347
|
+
const sandboxVenvPath = path80.resolve(
|
|
127308
127348
|
SETTINGS_DIRECTORY_NAME,
|
|
127309
127349
|
"sandbox.venv"
|
|
127310
127350
|
);
|
|
@@ -127345,7 +127385,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig) {
|
|
|
127345
127385
|
}
|
|
127346
127386
|
args.push("--env", `SANDBOX=${containerName}`);
|
|
127347
127387
|
if (config.command === "podman") {
|
|
127348
|
-
const emptyAuthFilePath =
|
|
127388
|
+
const emptyAuthFilePath = path80.join(os29.tmpdir(), "empty_auth.json");
|
|
127349
127389
|
fs68.writeFileSync(emptyAuthFilePath, "{}", "utf-8");
|
|
127350
127390
|
args.push("--authfile", emptyAuthFilePath);
|
|
127351
127391
|
}
|
|
@@ -127359,7 +127399,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig) {
|
|
|
127359
127399
|
const uid = execSync6("id -u").toString().trim();
|
|
127360
127400
|
const gid = execSync6("id -g").toString().trim();
|
|
127361
127401
|
const username = "fss-link";
|
|
127362
|
-
const homeDir2 = getContainerPath(
|
|
127402
|
+
const homeDir2 = getContainerPath(os29.homedir());
|
|
127363
127403
|
const setupUserCommands = [
|
|
127364
127404
|
// Use -f with groupadd to avoid errors if the group already exists.
|
|
127365
127405
|
`groupadd -f -g ${gid} ${username}`,
|
|
@@ -127371,7 +127411,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig) {
|
|
|
127371
127411
|
const suCommand = `su -p ${username} -c '${escapedOriginalCommand}'`;
|
|
127372
127412
|
finalEntrypoint[2] = `${setupUserCommands} && ${suCommand}`;
|
|
127373
127413
|
userFlag = `--user ${uid}:${gid}`;
|
|
127374
|
-
args.push("--env", `HOME=${
|
|
127414
|
+
args.push("--env", `HOME=${os29.homedir()}`);
|
|
127375
127415
|
}
|
|
127376
127416
|
args.push(image2);
|
|
127377
127417
|
args.push(...finalEntrypoint);
|
|
@@ -127545,9 +127585,9 @@ init_settings();
|
|
|
127545
127585
|
// packages/cli/src/utils/startupWarnings.ts
|
|
127546
127586
|
init_dist2();
|
|
127547
127587
|
import fs69 from "fs/promises";
|
|
127548
|
-
import
|
|
127588
|
+
import os30 from "os";
|
|
127549
127589
|
import { join as pathJoin } from "node:path";
|
|
127550
|
-
var warningsFilePath = pathJoin(
|
|
127590
|
+
var warningsFilePath = pathJoin(os30.tmpdir(), "fss-link-warnings.txt");
|
|
127551
127591
|
async function getStartupWarnings() {
|
|
127552
127592
|
try {
|
|
127553
127593
|
await fs69.access(warningsFilePath);
|
|
@@ -127569,15 +127609,15 @@ async function getStartupWarnings() {
|
|
|
127569
127609
|
|
|
127570
127610
|
// packages/cli/src/utils/userStartupWarnings.ts
|
|
127571
127611
|
import fs70 from "fs/promises";
|
|
127572
|
-
import * as
|
|
127573
|
-
import
|
|
127612
|
+
import * as os31 from "os";
|
|
127613
|
+
import path81 from "path";
|
|
127574
127614
|
var homeDirectoryCheck = {
|
|
127575
127615
|
id: "home-directory",
|
|
127576
127616
|
check: async (workspaceRoot) => {
|
|
127577
127617
|
try {
|
|
127578
127618
|
const [workspaceRealPath, homeRealPath] = await Promise.all([
|
|
127579
127619
|
fs70.realpath(workspaceRoot),
|
|
127580
|
-
fs70.realpath(
|
|
127620
|
+
fs70.realpath(os31.homedir())
|
|
127581
127621
|
]);
|
|
127582
127622
|
if (workspaceRealPath === homeRealPath) {
|
|
127583
127623
|
return "You are running FSS Link in your home directory. It is recommended to run in a project-specific directory.";
|
|
@@ -127594,7 +127634,7 @@ var rootDirectoryCheck = {
|
|
|
127594
127634
|
try {
|
|
127595
127635
|
const workspaceRealPath = await fs70.realpath(workspaceRoot);
|
|
127596
127636
|
const errorMessage = "Warning: You are running FSS Link in the root directory. Your entire folder structure will be used for context. It is strongly recommended to run in a project-specific directory.";
|
|
127597
|
-
if (
|
|
127637
|
+
if (path81.dirname(workspaceRealPath) === workspaceRealPath) {
|
|
127598
127638
|
return errorMessage;
|
|
127599
127639
|
}
|
|
127600
127640
|
return null;
|
|
@@ -127878,7 +127918,7 @@ init_zod();
|
|
|
127878
127918
|
init_settings();
|
|
127879
127919
|
import * as fs71 from "fs/promises";
|
|
127880
127920
|
import { Readable, Writable as Writable2 } from "node:stream";
|
|
127881
|
-
import * as
|
|
127921
|
+
import * as path82 from "path";
|
|
127882
127922
|
|
|
127883
127923
|
// packages/cli/src/zed-integration/acp.ts
|
|
127884
127924
|
init_zod();
|
|
@@ -128826,7 +128866,7 @@ var Session = class {
|
|
|
128826
128866
|
let currentPathSpec = pathName;
|
|
128827
128867
|
let resolvedSuccessfully = false;
|
|
128828
128868
|
try {
|
|
128829
|
-
const absolutePath =
|
|
128869
|
+
const absolutePath = path82.resolve(this.config.getTargetDir(), pathName);
|
|
128830
128870
|
if (isWithinRoot(absolutePath, this.config.getTargetDir())) {
|
|
128831
128871
|
const stats = await fs71.stat(absolutePath);
|
|
128832
128872
|
if (stats.isDirectory()) {
|
|
@@ -128861,7 +128901,7 @@ var Session = class {
|
|
|
128861
128901
|
const lines = globResult.llmContent.split("\n");
|
|
128862
128902
|
if (lines.length > 1 && lines[1]) {
|
|
128863
128903
|
const firstMatchAbsolute = lines[1].trim();
|
|
128864
|
-
currentPathSpec =
|
|
128904
|
+
currentPathSpec = path82.relative(
|
|
128865
128905
|
this.config.getTargetDir(),
|
|
128866
128906
|
firstMatchAbsolute
|
|
128867
128907
|
);
|
|
@@ -129162,7 +129202,7 @@ function validateDnsResolutionOrder(order) {
|
|
|
129162
129202
|
return defaultValue;
|
|
129163
129203
|
}
|
|
129164
129204
|
function getNodeMemoryArgs(config) {
|
|
129165
|
-
const totalMemoryMB =
|
|
129205
|
+
const totalMemoryMB = os32.totalmem() / (1024 * 1024);
|
|
129166
129206
|
const heapStats = v8.getHeapStatistics();
|
|
129167
129207
|
const currentMaxOldSpaceSizeMb = Math.floor(
|
|
129168
129208
|
heapStats.heap_size_limit / 1024 / 1024
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fss-link",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.0.0"
|
|
6
6
|
},
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"build:packages": "npm run build --workspaces",
|
|
30
30
|
"build:sandbox": "node scripts/build_sandbox.js --skip-npm-install-build",
|
|
31
31
|
"bundle": "npm run generate && node esbuild.config.js && node scripts/copy_bundle_assets.js",
|
|
32
|
+
"prepublishOnly": "node scripts/check-publish.js",
|
|
32
33
|
"test": "npm run test --workspaces --if-present",
|
|
33
34
|
"test:ci": "npm run test:ci --workspaces --if-present && npm run test:scripts",
|
|
34
35
|
"test:scripts": "vitest run --config ./scripts/tests/vitest.config.ts",
|