atlarix 15.12.2 → 15.12.4
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.
|
@@ -921,8 +921,8 @@ var require_renderer = __commonJS({
|
|
|
921
921
|
var require_packageJson = __commonJS({
|
|
922
922
|
"node_modules/electron-log/src/node/packageJson.js"(exports2, module2) {
|
|
923
923
|
"use strict";
|
|
924
|
-
var
|
|
925
|
-
var
|
|
924
|
+
var fs78 = __require("fs");
|
|
925
|
+
var path95 = __require("path");
|
|
926
926
|
module2.exports = {
|
|
927
927
|
findAndReadPackageJson,
|
|
928
928
|
tryReadJsonAt
|
|
@@ -935,12 +935,12 @@ var require_packageJson = __commonJS({
|
|
|
935
935
|
return void 0;
|
|
936
936
|
}
|
|
937
937
|
try {
|
|
938
|
-
const searchPath =
|
|
938
|
+
const searchPath = path95.join(...searchPaths);
|
|
939
939
|
const fileName = findUp("package.json", searchPath);
|
|
940
940
|
if (!fileName) {
|
|
941
941
|
return void 0;
|
|
942
942
|
}
|
|
943
|
-
const json3 = JSON.parse(
|
|
943
|
+
const json3 = JSON.parse(fs78.readFileSync(fileName, "utf8"));
|
|
944
944
|
const name30 = json3?.productName || json3?.name;
|
|
945
945
|
if (!name30 || name30.toLowerCase() === "electron") {
|
|
946
946
|
return void 0;
|
|
@@ -956,11 +956,11 @@ var require_packageJson = __commonJS({
|
|
|
956
956
|
function findUp(fileName, cwd) {
|
|
957
957
|
let currentPath = cwd;
|
|
958
958
|
while (true) {
|
|
959
|
-
const parsedPath =
|
|
959
|
+
const parsedPath = path95.parse(currentPath);
|
|
960
960
|
const root2 = parsedPath.root;
|
|
961
961
|
const dir = parsedPath.dir;
|
|
962
|
-
if (
|
|
963
|
-
return
|
|
962
|
+
if (fs78.existsSync(path95.join(currentPath, fileName))) {
|
|
963
|
+
return path95.resolve(path95.join(currentPath, fileName));
|
|
964
964
|
}
|
|
965
965
|
if (currentPath === root2) {
|
|
966
966
|
return null;
|
|
@@ -994,7 +994,7 @@ var require_NodeExternalApi = __commonJS({
|
|
|
994
994
|
"use strict";
|
|
995
995
|
var childProcess = __require("child_process");
|
|
996
996
|
var os29 = __require("os");
|
|
997
|
-
var
|
|
997
|
+
var path95 = __require("path");
|
|
998
998
|
var packageJson = require_packageJson();
|
|
999
999
|
var NodeExternalApi = class {
|
|
1000
1000
|
appName = void 0;
|
|
@@ -1002,9 +1002,9 @@ var require_NodeExternalApi = __commonJS({
|
|
|
1002
1002
|
platform = process.platform;
|
|
1003
1003
|
getAppLogPath(appName = this.getAppName()) {
|
|
1004
1004
|
if (this.platform === "darwin") {
|
|
1005
|
-
return
|
|
1005
|
+
return path95.join(this.getSystemPathHome(), "Library/Logs", appName);
|
|
1006
1006
|
}
|
|
1007
|
-
return
|
|
1007
|
+
return path95.join(this.getAppUserDataPath(appName), "logs");
|
|
1008
1008
|
}
|
|
1009
1009
|
getAppName() {
|
|
1010
1010
|
const appName = this.appName || this.getAppPackageJson()?.name;
|
|
@@ -1026,7 +1026,7 @@ var require_NodeExternalApi = __commonJS({
|
|
|
1026
1026
|
return this.appPackageJson;
|
|
1027
1027
|
}
|
|
1028
1028
|
getAppUserDataPath(appName = this.getAppName()) {
|
|
1029
|
-
return appName ?
|
|
1029
|
+
return appName ? path95.join(this.getSystemPathAppData(), appName) : void 0;
|
|
1030
1030
|
}
|
|
1031
1031
|
getAppVersion() {
|
|
1032
1032
|
return this.getAppPackageJson()?.version;
|
|
@@ -1079,13 +1079,13 @@ var require_NodeExternalApi = __commonJS({
|
|
|
1079
1079
|
const home = this.getSystemPathHome();
|
|
1080
1080
|
switch (this.platform) {
|
|
1081
1081
|
case "darwin": {
|
|
1082
|
-
return
|
|
1082
|
+
return path95.join(home, "Library/Application Support");
|
|
1083
1083
|
}
|
|
1084
1084
|
case "win32": {
|
|
1085
|
-
return process.env.APPDATA ||
|
|
1085
|
+
return process.env.APPDATA || path95.join(home, "AppData/Roaming");
|
|
1086
1086
|
}
|
|
1087
1087
|
default: {
|
|
1088
|
-
return process.env.XDG_CONFIG_HOME ||
|
|
1088
|
+
return process.env.XDG_CONFIG_HOME || path95.join(home, ".config");
|
|
1089
1089
|
}
|
|
1090
1090
|
}
|
|
1091
1091
|
}
|
|
@@ -1170,7 +1170,7 @@ var require_NodeExternalApi = __commonJS({
|
|
|
1170
1170
|
var require_ElectronExternalApi = __commonJS({
|
|
1171
1171
|
"node_modules/electron-log/src/main/ElectronExternalApi.js"(exports2, module2) {
|
|
1172
1172
|
"use strict";
|
|
1173
|
-
var
|
|
1173
|
+
var path95 = __require("path");
|
|
1174
1174
|
var NodeExternalApi = require_NodeExternalApi();
|
|
1175
1175
|
var ElectronExternalApi = class extends NodeExternalApi {
|
|
1176
1176
|
/**
|
|
@@ -1234,7 +1234,7 @@ var require_ElectronExternalApi = __commonJS({
|
|
|
1234
1234
|
return !this.electron.app.isPackaged;
|
|
1235
1235
|
}
|
|
1236
1236
|
if (typeof process.execPath === "string") {
|
|
1237
|
-
const execFileName =
|
|
1237
|
+
const execFileName = path95.basename(process.execPath).toLowerCase();
|
|
1238
1238
|
return execFileName.startsWith("electron");
|
|
1239
1239
|
}
|
|
1240
1240
|
return super.isDev();
|
|
@@ -1336,9 +1336,9 @@ var require_ElectronExternalApi = __commonJS({
|
|
|
1336
1336
|
var require_initialize = __commonJS({
|
|
1337
1337
|
"node_modules/electron-log/src/main/initialize.js"(exports2, module2) {
|
|
1338
1338
|
"use strict";
|
|
1339
|
-
var
|
|
1339
|
+
var fs78 = __require("fs");
|
|
1340
1340
|
var os29 = __require("os");
|
|
1341
|
-
var
|
|
1341
|
+
var path95 = __require("path");
|
|
1342
1342
|
var preloadInitializeFn = require_electron_log_preload();
|
|
1343
1343
|
var preloadInitialized = false;
|
|
1344
1344
|
var spyConsoleInitialized = false;
|
|
@@ -1385,14 +1385,14 @@ var require_initialize = __commonJS({
|
|
|
1385
1385
|
}
|
|
1386
1386
|
preloadInitialized = true;
|
|
1387
1387
|
try {
|
|
1388
|
-
preloadPath =
|
|
1388
|
+
preloadPath = path95.resolve(
|
|
1389
1389
|
__dirname,
|
|
1390
1390
|
"../renderer/electron-log-preload.js"
|
|
1391
1391
|
);
|
|
1392
1392
|
} catch {
|
|
1393
1393
|
}
|
|
1394
|
-
if (!preloadPath || !
|
|
1395
|
-
preloadPath =
|
|
1394
|
+
if (!preloadPath || !fs78.existsSync(preloadPath)) {
|
|
1395
|
+
preloadPath = path95.join(
|
|
1396
1396
|
externalApi.getAppUserDataPath() || os29.tmpdir(),
|
|
1397
1397
|
"electron-log-preload.js"
|
|
1398
1398
|
);
|
|
@@ -1403,7 +1403,7 @@ var require_initialize = __commonJS({
|
|
|
1403
1403
|
console.error(e);
|
|
1404
1404
|
}
|
|
1405
1405
|
`;
|
|
1406
|
-
|
|
1406
|
+
fs78.writeFileSync(preloadPath, preloadCode, "utf8");
|
|
1407
1407
|
}
|
|
1408
1408
|
externalApi.setPreloadFileForSessions({
|
|
1409
1409
|
filePath: preloadPath,
|
|
@@ -2159,7 +2159,7 @@ var require_File = __commonJS({
|
|
|
2159
2159
|
"node_modules/electron-log/src/node/transports/file/File.js"(exports2, module2) {
|
|
2160
2160
|
"use strict";
|
|
2161
2161
|
var EventEmitter6 = __require("events");
|
|
2162
|
-
var
|
|
2162
|
+
var fs78 = __require("fs");
|
|
2163
2163
|
var os29 = __require("os");
|
|
2164
2164
|
var File4 = class extends EventEmitter6 {
|
|
2165
2165
|
asyncWriteQueue = [];
|
|
@@ -2170,12 +2170,12 @@ var require_File = __commonJS({
|
|
|
2170
2170
|
writeOptions = null;
|
|
2171
2171
|
writeAsync = false;
|
|
2172
2172
|
constructor({
|
|
2173
|
-
path:
|
|
2173
|
+
path: path95,
|
|
2174
2174
|
writeOptions = { encoding: "utf8", flag: "a", mode: 438 },
|
|
2175
2175
|
writeAsync = false
|
|
2176
2176
|
}) {
|
|
2177
2177
|
super();
|
|
2178
|
-
this.path =
|
|
2178
|
+
this.path = path95;
|
|
2179
2179
|
this.writeOptions = writeOptions;
|
|
2180
2180
|
this.writeAsync = writeAsync;
|
|
2181
2181
|
}
|
|
@@ -2184,7 +2184,7 @@ var require_File = __commonJS({
|
|
|
2184
2184
|
}
|
|
2185
2185
|
clear() {
|
|
2186
2186
|
try {
|
|
2187
|
-
|
|
2187
|
+
fs78.writeFileSync(this.path, "", {
|
|
2188
2188
|
mode: this.writeOptions.mode,
|
|
2189
2189
|
flag: "w"
|
|
2190
2190
|
});
|
|
@@ -2214,7 +2214,7 @@ var require_File = __commonJS({
|
|
|
2214
2214
|
getSize() {
|
|
2215
2215
|
if (this.initialSize === void 0) {
|
|
2216
2216
|
try {
|
|
2217
|
-
const stats =
|
|
2217
|
+
const stats = fs78.statSync(this.path);
|
|
2218
2218
|
this.initialSize = stats.size;
|
|
2219
2219
|
} catch (e3) {
|
|
2220
2220
|
this.initialSize = 0;
|
|
@@ -2236,7 +2236,7 @@ var require_File = __commonJS({
|
|
|
2236
2236
|
const text5 = this.asyncWriteQueue.join("");
|
|
2237
2237
|
this.asyncWriteQueue = [];
|
|
2238
2238
|
this.hasActiveAsyncWriting = true;
|
|
2239
|
-
|
|
2239
|
+
fs78.writeFile(this.path, text5, this.writeOptions, (e3) => {
|
|
2240
2240
|
file2.hasActiveAsyncWriting = false;
|
|
2241
2241
|
if (e3) {
|
|
2242
2242
|
file2.emit(
|
|
@@ -2265,7 +2265,7 @@ var require_File = __commonJS({
|
|
|
2265
2265
|
return;
|
|
2266
2266
|
}
|
|
2267
2267
|
try {
|
|
2268
|
-
|
|
2268
|
+
fs78.writeFileSync(this.path, text5, this.writeOptions);
|
|
2269
2269
|
this.increaseBytesWrittenCounter(text5);
|
|
2270
2270
|
} catch (e3) {
|
|
2271
2271
|
this.emit(
|
|
@@ -2279,12 +2279,12 @@ var require_File = __commonJS({
|
|
|
2279
2279
|
module2.exports = File4;
|
|
2280
2280
|
function readFileSyncFromEnd(filePath, bytesCount) {
|
|
2281
2281
|
const buffer = Buffer.alloc(bytesCount);
|
|
2282
|
-
const stats =
|
|
2282
|
+
const stats = fs78.statSync(filePath);
|
|
2283
2283
|
const readLength = Math.min(stats.size, bytesCount);
|
|
2284
2284
|
const offset = Math.max(0, stats.size - bytesCount);
|
|
2285
|
-
const fd2 =
|
|
2286
|
-
const totalBytes =
|
|
2287
|
-
|
|
2285
|
+
const fd2 = fs78.openSync(filePath, "r");
|
|
2286
|
+
const totalBytes = fs78.readSync(fd2, buffer, 0, readLength, offset);
|
|
2287
|
+
fs78.closeSync(fd2);
|
|
2288
2288
|
return buffer.toString("utf8", 0, totalBytes);
|
|
2289
2289
|
}
|
|
2290
2290
|
}
|
|
@@ -2318,8 +2318,8 @@ var require_FileRegistry = __commonJS({
|
|
|
2318
2318
|
"node_modules/electron-log/src/node/transports/file/FileRegistry.js"(exports2, module2) {
|
|
2319
2319
|
"use strict";
|
|
2320
2320
|
var EventEmitter6 = __require("events");
|
|
2321
|
-
var
|
|
2322
|
-
var
|
|
2321
|
+
var fs78 = __require("fs");
|
|
2322
|
+
var path95 = __require("path");
|
|
2323
2323
|
var File4 = require_File();
|
|
2324
2324
|
var NullFile = require_NullFile();
|
|
2325
2325
|
var FileRegistry = class extends EventEmitter6 {
|
|
@@ -2338,7 +2338,7 @@ var require_FileRegistry = __commonJS({
|
|
|
2338
2338
|
provide({ filePath, writeOptions = {}, writeAsync = false }) {
|
|
2339
2339
|
let file2;
|
|
2340
2340
|
try {
|
|
2341
|
-
filePath =
|
|
2341
|
+
filePath = path95.resolve(filePath);
|
|
2342
2342
|
if (this.store[filePath]) {
|
|
2343
2343
|
return this.store[filePath];
|
|
2344
2344
|
}
|
|
@@ -2376,8 +2376,8 @@ var require_FileRegistry = __commonJS({
|
|
|
2376
2376
|
* @private
|
|
2377
2377
|
*/
|
|
2378
2378
|
testFileWriting({ filePath, writeOptions }) {
|
|
2379
|
-
|
|
2380
|
-
|
|
2379
|
+
fs78.mkdirSync(path95.dirname(filePath), { recursive: true });
|
|
2380
|
+
fs78.writeFileSync(filePath, "", { flag: "a", mode: writeOptions.mode });
|
|
2381
2381
|
}
|
|
2382
2382
|
};
|
|
2383
2383
|
module2.exports = FileRegistry;
|
|
@@ -2388,9 +2388,9 @@ var require_FileRegistry = __commonJS({
|
|
|
2388
2388
|
var require_file = __commonJS({
|
|
2389
2389
|
"node_modules/electron-log/src/node/transports/file/index.js"(exports2, module2) {
|
|
2390
2390
|
"use strict";
|
|
2391
|
-
var
|
|
2391
|
+
var fs78 = __require("fs");
|
|
2392
2392
|
var os29 = __require("os");
|
|
2393
|
-
var
|
|
2393
|
+
var path95 = __require("path");
|
|
2394
2394
|
var FileRegistry = require_FileRegistry();
|
|
2395
2395
|
var { transform: transform2 } = require_transform();
|
|
2396
2396
|
var { removeStyles } = require_style();
|
|
@@ -2421,9 +2421,9 @@ var require_file = __commonJS({
|
|
|
2421
2421
|
writeOptions: { flag: "a", mode: 438, encoding: "utf8" },
|
|
2422
2422
|
archiveLogFn(file2) {
|
|
2423
2423
|
const oldPath = file2.toString();
|
|
2424
|
-
const inf =
|
|
2424
|
+
const inf = path95.parse(oldPath);
|
|
2425
2425
|
try {
|
|
2426
|
-
|
|
2426
|
+
fs78.renameSync(oldPath, path95.join(inf.dir, `${inf.name}.old${inf.ext}`));
|
|
2427
2427
|
} catch (e3) {
|
|
2428
2428
|
logConsole("Could not rotate log", e3);
|
|
2429
2429
|
const quarterOfMaxSize = Math.round(transport.maxSize / 4);
|
|
@@ -2431,7 +2431,7 @@ var require_file = __commonJS({
|
|
|
2431
2431
|
}
|
|
2432
2432
|
},
|
|
2433
2433
|
resolvePathFn(vars) {
|
|
2434
|
-
return
|
|
2434
|
+
return path95.join(vars.libraryDefaultDir, vars.fileName);
|
|
2435
2435
|
},
|
|
2436
2436
|
setAppName(name30) {
|
|
2437
2437
|
logger126.dependencies.externalApi.setAppName(name30);
|
|
@@ -2492,15 +2492,15 @@ var require_file = __commonJS({
|
|
|
2492
2492
|
}
|
|
2493
2493
|
function readAllLogs({ fileFilter = (f5) => f5.endsWith(".log") } = {}) {
|
|
2494
2494
|
initializeOnFirstAccess();
|
|
2495
|
-
const logsPath =
|
|
2496
|
-
if (!
|
|
2495
|
+
const logsPath = path95.dirname(transport.resolvePathFn(pathVariables));
|
|
2496
|
+
if (!fs78.existsSync(logsPath)) {
|
|
2497
2497
|
return [];
|
|
2498
2498
|
}
|
|
2499
|
-
return
|
|
2499
|
+
return fs78.readdirSync(logsPath).map((fileName) => path95.join(logsPath, fileName)).filter(fileFilter).map((logPath) => {
|
|
2500
2500
|
try {
|
|
2501
2501
|
return {
|
|
2502
2502
|
path: logPath,
|
|
2503
|
-
lines:
|
|
2503
|
+
lines: fs78.readFileSync(logPath, "utf8").split(os29.EOL)
|
|
2504
2504
|
};
|
|
2505
2505
|
} catch {
|
|
2506
2506
|
return null;
|
|
@@ -4174,7 +4174,7 @@ var init_sql = __esm({
|
|
|
4174
4174
|
function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
4175
4175
|
const nullifyMap = {};
|
|
4176
4176
|
const result2 = columns.reduce(
|
|
4177
|
-
(result22, { path:
|
|
4177
|
+
(result22, { path: path95, field }, columnIndex) => {
|
|
4178
4178
|
let decoder;
|
|
4179
4179
|
if (is(field, Column)) {
|
|
4180
4180
|
decoder = field;
|
|
@@ -4186,8 +4186,8 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
|
4186
4186
|
decoder = field.sql.decoder;
|
|
4187
4187
|
}
|
|
4188
4188
|
let node2 = result22;
|
|
4189
|
-
for (const [pathChunkIndex, pathChunk] of
|
|
4190
|
-
if (pathChunkIndex <
|
|
4189
|
+
for (const [pathChunkIndex, pathChunk] of path95.entries()) {
|
|
4190
|
+
if (pathChunkIndex < path95.length - 1) {
|
|
4191
4191
|
if (!(pathChunk in node2)) {
|
|
4192
4192
|
node2[pathChunk] = {};
|
|
4193
4193
|
}
|
|
@@ -4195,8 +4195,8 @@ function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
|
4195
4195
|
} else {
|
|
4196
4196
|
const rawValue = row[columnIndex];
|
|
4197
4197
|
const value = node2[pathChunk] = rawValue === null ? null : decoder.mapFromDriverValue(rawValue);
|
|
4198
|
-
if (joinsNotNullableMap && is(field, Column) &&
|
|
4199
|
-
const objectName =
|
|
4198
|
+
if (joinsNotNullableMap && is(field, Column) && path95.length === 2) {
|
|
4199
|
+
const objectName = path95[0];
|
|
4200
4200
|
if (!(objectName in nullifyMap)) {
|
|
4201
4201
|
nullifyMap[objectName] = value === null ? getTableName(field.table) : false;
|
|
4202
4202
|
} else if (typeof nullifyMap[objectName] === "string" && nullifyMap[objectName] !== getTableName(field.table)) {
|
|
@@ -13135,10 +13135,10 @@ function mergeDefs(...defs) {
|
|
|
13135
13135
|
function cloneDef(schema) {
|
|
13136
13136
|
return mergeDefs(schema._zod.def);
|
|
13137
13137
|
}
|
|
13138
|
-
function getElementAtPath(obj2,
|
|
13139
|
-
if (!
|
|
13138
|
+
function getElementAtPath(obj2, path95) {
|
|
13139
|
+
if (!path95)
|
|
13140
13140
|
return obj2;
|
|
13141
|
-
return
|
|
13141
|
+
return path95.reduce((acc, key) => acc?.[key], obj2);
|
|
13142
13142
|
}
|
|
13143
13143
|
function promiseAllObject(promisesObj) {
|
|
13144
13144
|
const keys2 = Object.keys(promisesObj);
|
|
@@ -13466,11 +13466,11 @@ function explicitlyAborted(x4, startIndex = 0) {
|
|
|
13466
13466
|
}
|
|
13467
13467
|
return false;
|
|
13468
13468
|
}
|
|
13469
|
-
function prefixIssues(
|
|
13469
|
+
function prefixIssues(path95, issues) {
|
|
13470
13470
|
return issues.map((iss) => {
|
|
13471
13471
|
var _a30;
|
|
13472
13472
|
(_a30 = iss).path ?? (_a30.path = []);
|
|
13473
|
-
iss.path.unshift(
|
|
13473
|
+
iss.path.unshift(path95);
|
|
13474
13474
|
return iss;
|
|
13475
13475
|
});
|
|
13476
13476
|
}
|
|
@@ -13687,16 +13687,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
|
13687
13687
|
}
|
|
13688
13688
|
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
13689
13689
|
const fieldErrors = { _errors: [] };
|
|
13690
|
-
const processError = (error52,
|
|
13690
|
+
const processError = (error52, path95 = []) => {
|
|
13691
13691
|
for (const issue2 of error52.issues) {
|
|
13692
13692
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
13693
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
13693
|
+
issue2.errors.map((issues) => processError({ issues }, [...path95, ...issue2.path]));
|
|
13694
13694
|
} else if (issue2.code === "invalid_key") {
|
|
13695
|
-
processError({ issues: issue2.issues }, [...
|
|
13695
|
+
processError({ issues: issue2.issues }, [...path95, ...issue2.path]);
|
|
13696
13696
|
} else if (issue2.code === "invalid_element") {
|
|
13697
|
-
processError({ issues: issue2.issues }, [...
|
|
13697
|
+
processError({ issues: issue2.issues }, [...path95, ...issue2.path]);
|
|
13698
13698
|
} else {
|
|
13699
|
-
const fullpath = [...
|
|
13699
|
+
const fullpath = [...path95, ...issue2.path];
|
|
13700
13700
|
if (fullpath.length === 0) {
|
|
13701
13701
|
fieldErrors._errors.push(mapper(issue2));
|
|
13702
13702
|
} else {
|
|
@@ -13723,17 +13723,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
|
13723
13723
|
}
|
|
13724
13724
|
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
13725
13725
|
const result2 = { errors: [] };
|
|
13726
|
-
const processError = (error52,
|
|
13726
|
+
const processError = (error52, path95 = []) => {
|
|
13727
13727
|
var _a30, _b21;
|
|
13728
13728
|
for (const issue2 of error52.issues) {
|
|
13729
13729
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
13730
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
13730
|
+
issue2.errors.map((issues) => processError({ issues }, [...path95, ...issue2.path]));
|
|
13731
13731
|
} else if (issue2.code === "invalid_key") {
|
|
13732
|
-
processError({ issues: issue2.issues }, [...
|
|
13732
|
+
processError({ issues: issue2.issues }, [...path95, ...issue2.path]);
|
|
13733
13733
|
} else if (issue2.code === "invalid_element") {
|
|
13734
|
-
processError({ issues: issue2.issues }, [...
|
|
13734
|
+
processError({ issues: issue2.issues }, [...path95, ...issue2.path]);
|
|
13735
13735
|
} else {
|
|
13736
|
-
const fullpath = [...
|
|
13736
|
+
const fullpath = [...path95, ...issue2.path];
|
|
13737
13737
|
if (fullpath.length === 0) {
|
|
13738
13738
|
result2.errors.push(mapper(issue2));
|
|
13739
13739
|
continue;
|
|
@@ -13765,8 +13765,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
|
13765
13765
|
}
|
|
13766
13766
|
function toDotPath(_path) {
|
|
13767
13767
|
const segs = [];
|
|
13768
|
-
const
|
|
13769
|
-
for (const seg of
|
|
13768
|
+
const path95 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
13769
|
+
for (const seg of path95) {
|
|
13770
13770
|
if (typeof seg === "number")
|
|
13771
13771
|
segs.push(`[${seg}]`);
|
|
13772
13772
|
else if (typeof seg === "symbol")
|
|
@@ -27196,13 +27196,13 @@ function resolveRef(ref, ctx) {
|
|
|
27196
27196
|
if (!ref.startsWith("#")) {
|
|
27197
27197
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
27198
27198
|
}
|
|
27199
|
-
const
|
|
27200
|
-
if (
|
|
27199
|
+
const path95 = ref.slice(1).split("/").filter(Boolean);
|
|
27200
|
+
if (path95.length === 0) {
|
|
27201
27201
|
return ctx.rootSchema;
|
|
27202
27202
|
}
|
|
27203
27203
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
27204
|
-
if (
|
|
27205
|
-
const key =
|
|
27204
|
+
if (path95[0] === defsKey) {
|
|
27205
|
+
const key = path95[1];
|
|
27206
27206
|
if (!key || !ctx.defs[key]) {
|
|
27207
27207
|
throw new Error(`Reference not found: ${ref}`);
|
|
27208
27208
|
}
|
|
@@ -29131,6 +29131,7 @@ function deterministicTitle(firstUserText) {
|
|
|
29131
29131
|
rest2 = next;
|
|
29132
29132
|
}
|
|
29133
29133
|
rest2 = rest2.replace(EMOJI_RE, "").trim();
|
|
29134
|
+
rest2 = rest2.replace(/^\s*[›>·•*—–-]+\s*/, "");
|
|
29134
29135
|
if (!rest2 || BARE_GREETING_RE.test(rest2)) return "Greeting";
|
|
29135
29136
|
const words = rest2.split(" ").slice(0, 8).join(" ");
|
|
29136
29137
|
const capped = capOnWord(words).replace(/[.,:;!?]+$/, "").trim();
|
|
@@ -31086,11 +31087,15 @@ async function receive(f5) {
|
|
|
31086
31087
|
const notify5 = f5.notify === true && queued.length > 0 && f5.from?.sessionId !== "unknown";
|
|
31087
31088
|
if (notify5) turnWatches.push({ chatId: target.chatId, sessionId: target.sessionId, ids: queued, from: f5.from });
|
|
31088
31089
|
const idle = (text5 || applied.startTurn) && !hostImpl.isBusy(target.chatId);
|
|
31089
|
-
|
|
31090
|
+
const startTurn = !!applied.startTurn;
|
|
31091
|
+
const wake = idle && (f5.notify === true || startTurn);
|
|
31092
|
+
if (wake) hostImpl.wake(target.chatId);
|
|
31090
31093
|
return {
|
|
31091
31094
|
ok: true,
|
|
31092
31095
|
...applied.notice ? { applied: applied.notice } : {},
|
|
31093
|
-
|
|
31096
|
+
// "waits": queued for the session's next real turn (not woken now), or an
|
|
31097
|
+
// editor that holds messages until its own prompt starts the turn.
|
|
31098
|
+
...idle && (idleMessagesWait() || !wake) ? { waits: true } : {},
|
|
31094
31099
|
...notify5 ? { notify: true } : {}
|
|
31095
31100
|
};
|
|
31096
31101
|
}
|
|
@@ -31158,7 +31163,11 @@ function listPeerSessions(exclude) {
|
|
|
31158
31163
|
pid: r3.pid,
|
|
31159
31164
|
...r3.surface !== "chrome" ? { mode: modes.get(r3.session_id) ?? "build" } : {},
|
|
31160
31165
|
...r3.model ? { model: r3.model } : {},
|
|
31161
|
-
...r3.has_approval ? { hasApproval: true, ...local.get(r3.session_id)?.pendingApprovals ? { pendingApprovals: local.get(r3.session_id).pendingApprovals } : {} } : {}
|
|
31166
|
+
...r3.has_approval ? { hasApproval: true, ...local.get(r3.session_id)?.pendingApprovals ? { pendingApprovals: local.get(r3.session_id).pendingApprovals } : {} } : {},
|
|
31167
|
+
// A session with no messages yet (an editor's New chat, a CLI before its
|
|
31168
|
+
// first message) is LISTED, and marked new so the sender knows it has no
|
|
31169
|
+
// history to read back (owner, 2026-10-31: fresh sessions must be visible).
|
|
31170
|
+
...blank.has(r3.session_id) ? { new: true } : {}
|
|
31162
31171
|
});
|
|
31163
31172
|
}
|
|
31164
31173
|
return out;
|
|
@@ -41600,45 +41609,45 @@ function createOpenAI(options2 = {}) {
|
|
|
41600
41609
|
);
|
|
41601
41610
|
const createChatModel = (modelId) => new OpenAIChatLanguageModel(modelId, {
|
|
41602
41611
|
provider: `${providerName}.chat`,
|
|
41603
|
-
url: ({ path:
|
|
41612
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41604
41613
|
headers: getHeaders,
|
|
41605
41614
|
fetch: options2.fetch
|
|
41606
41615
|
});
|
|
41607
41616
|
const createCompletionModel = (modelId) => new OpenAICompletionLanguageModel(modelId, {
|
|
41608
41617
|
provider: `${providerName}.completion`,
|
|
41609
|
-
url: ({ path:
|
|
41618
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41610
41619
|
headers: getHeaders,
|
|
41611
41620
|
fetch: options2.fetch
|
|
41612
41621
|
});
|
|
41613
41622
|
const createEmbeddingModel = (modelId) => new OpenAIEmbeddingModel(modelId, {
|
|
41614
41623
|
provider: `${providerName}.embedding`,
|
|
41615
|
-
url: ({ path:
|
|
41624
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41616
41625
|
headers: getHeaders,
|
|
41617
41626
|
fetch: options2.fetch
|
|
41618
41627
|
});
|
|
41619
41628
|
const createImageModel = (modelId) => new OpenAIImageModel(modelId, {
|
|
41620
41629
|
provider: `${providerName}.image`,
|
|
41621
|
-
url: ({ path:
|
|
41630
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41622
41631
|
headers: getHeaders,
|
|
41623
41632
|
fetch: options2.fetch
|
|
41624
41633
|
});
|
|
41625
41634
|
const createTranscriptionModel = (modelId) => new OpenAITranscriptionModel(modelId, {
|
|
41626
41635
|
provider: `${providerName}.transcription`,
|
|
41627
|
-
url: ({ path:
|
|
41636
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41628
41637
|
headers: getHeaders,
|
|
41629
41638
|
fetch: options2.fetch,
|
|
41630
41639
|
webSocket: options2.webSocket
|
|
41631
41640
|
});
|
|
41632
41641
|
const createSpeechTranslationModel = (modelId) => new OpenAISpeechTranslationModel(modelId, {
|
|
41633
41642
|
provider: `${providerName}.speech-translation`,
|
|
41634
|
-
url: ({ path:
|
|
41643
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41635
41644
|
headers: getHeaders,
|
|
41636
41645
|
fetch: options2.fetch,
|
|
41637
41646
|
webSocket: options2.webSocket
|
|
41638
41647
|
});
|
|
41639
41648
|
const createSpeechModel = (modelId) => new OpenAISpeechModel(modelId, {
|
|
41640
41649
|
provider: `${providerName}.speech`,
|
|
41641
|
-
url: ({ path:
|
|
41650
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41642
41651
|
headers: getHeaders,
|
|
41643
41652
|
fetch: options2.fetch
|
|
41644
41653
|
});
|
|
@@ -41650,7 +41659,7 @@ function createOpenAI(options2 = {}) {
|
|
|
41650
41659
|
});
|
|
41651
41660
|
const createSkills = () => new OpenAISkills({
|
|
41652
41661
|
provider: `${providerName}.skills`,
|
|
41653
|
-
url: ({ path:
|
|
41662
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41654
41663
|
headers: getHeaders,
|
|
41655
41664
|
fetch: options2.fetch
|
|
41656
41665
|
});
|
|
@@ -41665,7 +41674,7 @@ function createOpenAI(options2 = {}) {
|
|
|
41665
41674
|
const createResponsesModel = (modelId) => {
|
|
41666
41675
|
return new OpenAIResponsesBatchLanguageModel(modelId, {
|
|
41667
41676
|
provider: `${providerName}.responses`,
|
|
41668
|
-
url: ({ path:
|
|
41677
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41669
41678
|
headers: getHeaders,
|
|
41670
41679
|
fetch: options2.fetch,
|
|
41671
41680
|
// Soft-deprecated. TODO: remove in v8
|
|
@@ -47519,10 +47528,10 @@ var init_dist5 = __esm({
|
|
|
47519
47528
|
result: conversion.result
|
|
47520
47529
|
};
|
|
47521
47530
|
}
|
|
47522
|
-
getUrl(
|
|
47531
|
+
getUrl(path95) {
|
|
47523
47532
|
return this.options.config.url({
|
|
47524
47533
|
modelId: this.options.modelId,
|
|
47525
|
-
path:
|
|
47534
|
+
path: path95
|
|
47526
47535
|
});
|
|
47527
47536
|
}
|
|
47528
47537
|
};
|
|
@@ -54548,8 +54557,8 @@ var init_dist6 = __esm({
|
|
|
54548
54557
|
yield await convertAnthropicBatchResult(line);
|
|
54549
54558
|
}
|
|
54550
54559
|
}
|
|
54551
|
-
getBatchUrl(
|
|
54552
|
-
return `${this.config.baseURL}/messages/batches${
|
|
54560
|
+
getBatchUrl(path95) {
|
|
54561
|
+
return `${this.config.baseURL}/messages/batches${path95}`;
|
|
54553
54562
|
}
|
|
54554
54563
|
async getStartBatchHeaders({
|
|
54555
54564
|
betas,
|
|
@@ -68387,8 +68396,8 @@ function createOpenAICompatible(options2) {
|
|
|
68387
68396
|
const getHeaders = () => withUserAgentSuffix(headers, `ai-sdk/openai-compatible/${VERSION6}`);
|
|
68388
68397
|
const getCommonModelConfig = (modelType) => ({
|
|
68389
68398
|
provider: `${providerName}.${modelType}`,
|
|
68390
|
-
url: ({ path:
|
|
68391
|
-
const url2 = new URL(`${baseURL}${
|
|
68399
|
+
url: ({ path: path95 }) => {
|
|
68400
|
+
const url2 = new URL(`${baseURL}${path95}`);
|
|
68392
68401
|
if (options2.queryParams) {
|
|
68393
68402
|
url2.search = new URLSearchParams(options2.queryParams).toString();
|
|
68394
68403
|
}
|
|
@@ -71294,8 +71303,8 @@ var require_windows = __commonJS({
|
|
|
71294
71303
|
"node_modules/isexe/windows.js"(exports2, module2) {
|
|
71295
71304
|
module2.exports = isexe;
|
|
71296
71305
|
isexe.sync = sync;
|
|
71297
|
-
var
|
|
71298
|
-
function checkPathExt(
|
|
71306
|
+
var fs78 = __require("fs");
|
|
71307
|
+
function checkPathExt(path95, options2) {
|
|
71299
71308
|
var pathext = options2.pathExt !== void 0 ? options2.pathExt : process.env.PATHEXT;
|
|
71300
71309
|
if (!pathext) {
|
|
71301
71310
|
return true;
|
|
@@ -71306,25 +71315,25 @@ var require_windows = __commonJS({
|
|
|
71306
71315
|
}
|
|
71307
71316
|
for (var i4 = 0; i4 < pathext.length; i4++) {
|
|
71308
71317
|
var p2 = pathext[i4].toLowerCase();
|
|
71309
|
-
if (p2 &&
|
|
71318
|
+
if (p2 && path95.substr(-p2.length).toLowerCase() === p2) {
|
|
71310
71319
|
return true;
|
|
71311
71320
|
}
|
|
71312
71321
|
}
|
|
71313
71322
|
return false;
|
|
71314
71323
|
}
|
|
71315
|
-
function checkStat(stat9,
|
|
71324
|
+
function checkStat(stat9, path95, options2) {
|
|
71316
71325
|
if (!stat9.isSymbolicLink() && !stat9.isFile()) {
|
|
71317
71326
|
return false;
|
|
71318
71327
|
}
|
|
71319
|
-
return checkPathExt(
|
|
71328
|
+
return checkPathExt(path95, options2);
|
|
71320
71329
|
}
|
|
71321
|
-
function isexe(
|
|
71322
|
-
|
|
71323
|
-
cb2(er2, er2 ? false : checkStat(stat9,
|
|
71330
|
+
function isexe(path95, options2, cb2) {
|
|
71331
|
+
fs78.stat(path95, function(er2, stat9) {
|
|
71332
|
+
cb2(er2, er2 ? false : checkStat(stat9, path95, options2));
|
|
71324
71333
|
});
|
|
71325
71334
|
}
|
|
71326
|
-
function sync(
|
|
71327
|
-
return checkStat(
|
|
71335
|
+
function sync(path95, options2) {
|
|
71336
|
+
return checkStat(fs78.statSync(path95), path95, options2);
|
|
71328
71337
|
}
|
|
71329
71338
|
}
|
|
71330
71339
|
});
|
|
@@ -71334,14 +71343,14 @@ var require_mode = __commonJS({
|
|
|
71334
71343
|
"node_modules/isexe/mode.js"(exports2, module2) {
|
|
71335
71344
|
module2.exports = isexe;
|
|
71336
71345
|
isexe.sync = sync;
|
|
71337
|
-
var
|
|
71338
|
-
function isexe(
|
|
71339
|
-
|
|
71346
|
+
var fs78 = __require("fs");
|
|
71347
|
+
function isexe(path95, options2, cb2) {
|
|
71348
|
+
fs78.stat(path95, function(er2, stat9) {
|
|
71340
71349
|
cb2(er2, er2 ? false : checkStat(stat9, options2));
|
|
71341
71350
|
});
|
|
71342
71351
|
}
|
|
71343
|
-
function sync(
|
|
71344
|
-
return checkStat(
|
|
71352
|
+
function sync(path95, options2) {
|
|
71353
|
+
return checkStat(fs78.statSync(path95), options2);
|
|
71345
71354
|
}
|
|
71346
71355
|
function checkStat(stat9, options2) {
|
|
71347
71356
|
return stat9.isFile() && checkMode(stat9, options2);
|
|
@@ -71365,7 +71374,7 @@ var require_mode = __commonJS({
|
|
|
71365
71374
|
// node_modules/isexe/index.js
|
|
71366
71375
|
var require_isexe = __commonJS({
|
|
71367
71376
|
"node_modules/isexe/index.js"(exports2, module2) {
|
|
71368
|
-
var
|
|
71377
|
+
var fs78 = __require("fs");
|
|
71369
71378
|
var core;
|
|
71370
71379
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
71371
71380
|
core = require_windows();
|
|
@@ -71374,7 +71383,7 @@ var require_isexe = __commonJS({
|
|
|
71374
71383
|
}
|
|
71375
71384
|
module2.exports = isexe;
|
|
71376
71385
|
isexe.sync = sync;
|
|
71377
|
-
function isexe(
|
|
71386
|
+
function isexe(path95, options2, cb2) {
|
|
71378
71387
|
if (typeof options2 === "function") {
|
|
71379
71388
|
cb2 = options2;
|
|
71380
71389
|
options2 = {};
|
|
@@ -71384,7 +71393,7 @@ var require_isexe = __commonJS({
|
|
|
71384
71393
|
throw new TypeError("callback not provided");
|
|
71385
71394
|
}
|
|
71386
71395
|
return new Promise(function(resolve16, reject2) {
|
|
71387
|
-
isexe(
|
|
71396
|
+
isexe(path95, options2 || {}, function(er2, is3) {
|
|
71388
71397
|
if (er2) {
|
|
71389
71398
|
reject2(er2);
|
|
71390
71399
|
} else {
|
|
@@ -71393,7 +71402,7 @@ var require_isexe = __commonJS({
|
|
|
71393
71402
|
});
|
|
71394
71403
|
});
|
|
71395
71404
|
}
|
|
71396
|
-
core(
|
|
71405
|
+
core(path95, options2 || {}, function(er2, is3) {
|
|
71397
71406
|
if (er2) {
|
|
71398
71407
|
if (er2.code === "EACCES" || options2 && options2.ignoreErrors) {
|
|
71399
71408
|
er2 = null;
|
|
@@ -71403,9 +71412,9 @@ var require_isexe = __commonJS({
|
|
|
71403
71412
|
cb2(er2, is3);
|
|
71404
71413
|
});
|
|
71405
71414
|
}
|
|
71406
|
-
function sync(
|
|
71415
|
+
function sync(path95, options2) {
|
|
71407
71416
|
try {
|
|
71408
|
-
return core.sync(
|
|
71417
|
+
return core.sync(path95, options2 || {});
|
|
71409
71418
|
} catch (er2) {
|
|
71410
71419
|
if (options2 && options2.ignoreErrors || er2.code === "EACCES") {
|
|
71411
71420
|
return false;
|
|
@@ -71421,7 +71430,7 @@ var require_isexe = __commonJS({
|
|
|
71421
71430
|
var require_which = __commonJS({
|
|
71422
71431
|
"node_modules/which/which.js"(exports2, module2) {
|
|
71423
71432
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
71424
|
-
var
|
|
71433
|
+
var path95 = __require("path");
|
|
71425
71434
|
var COLON2 = isWindows ? ";" : ":";
|
|
71426
71435
|
var isexe = require_isexe();
|
|
71427
71436
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -71459,7 +71468,7 @@ var require_which = __commonJS({
|
|
|
71459
71468
|
return opt.all && found.length ? resolve16(found) : reject2(getNotFoundError(cmd));
|
|
71460
71469
|
const ppRaw = pathEnv[i4];
|
|
71461
71470
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
71462
|
-
const pCmd =
|
|
71471
|
+
const pCmd = path95.join(pathPart, cmd);
|
|
71463
71472
|
const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
71464
71473
|
resolve16(subStep(p2, i4, 0));
|
|
71465
71474
|
});
|
|
@@ -71486,7 +71495,7 @@ var require_which = __commonJS({
|
|
|
71486
71495
|
for (let i4 = 0; i4 < pathEnv.length; i4++) {
|
|
71487
71496
|
const ppRaw = pathEnv[i4];
|
|
71488
71497
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
71489
|
-
const pCmd =
|
|
71498
|
+
const pCmd = path95.join(pathPart, cmd);
|
|
71490
71499
|
const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
71491
71500
|
for (let j2 = 0; j2 < pathExt.length; j2++) {
|
|
71492
71501
|
const cur = p2 + pathExt[j2];
|
|
@@ -71534,7 +71543,7 @@ var require_path_key = __commonJS({
|
|
|
71534
71543
|
var require_resolveCommand = __commonJS({
|
|
71535
71544
|
"node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
71536
71545
|
"use strict";
|
|
71537
|
-
var
|
|
71546
|
+
var path95 = __require("path");
|
|
71538
71547
|
var which = require_which();
|
|
71539
71548
|
var getPathKey = require_path_key();
|
|
71540
71549
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -71552,7 +71561,7 @@ var require_resolveCommand = __commonJS({
|
|
|
71552
71561
|
try {
|
|
71553
71562
|
resolved2 = which.sync(parsed.command, {
|
|
71554
71563
|
path: env3[getPathKey({ env: env3 })],
|
|
71555
|
-
pathExt: withoutPathExt ?
|
|
71564
|
+
pathExt: withoutPathExt ? path95.delimiter : void 0
|
|
71556
71565
|
});
|
|
71557
71566
|
} catch (e3) {
|
|
71558
71567
|
} finally {
|
|
@@ -71561,7 +71570,7 @@ var require_resolveCommand = __commonJS({
|
|
|
71561
71570
|
}
|
|
71562
71571
|
}
|
|
71563
71572
|
if (resolved2) {
|
|
71564
|
-
resolved2 =
|
|
71573
|
+
resolved2 = path95.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved2);
|
|
71565
71574
|
}
|
|
71566
71575
|
return resolved2;
|
|
71567
71576
|
}
|
|
@@ -71615,8 +71624,8 @@ var require_shebang_command = __commonJS({
|
|
|
71615
71624
|
if (!match) {
|
|
71616
71625
|
return null;
|
|
71617
71626
|
}
|
|
71618
|
-
const [
|
|
71619
|
-
const binary =
|
|
71627
|
+
const [path95, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
71628
|
+
const binary = path95.split("/").pop();
|
|
71620
71629
|
if (binary === "env") {
|
|
71621
71630
|
return argument;
|
|
71622
71631
|
}
|
|
@@ -71629,16 +71638,16 @@ var require_shebang_command = __commonJS({
|
|
|
71629
71638
|
var require_readShebang = __commonJS({
|
|
71630
71639
|
"node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
71631
71640
|
"use strict";
|
|
71632
|
-
var
|
|
71641
|
+
var fs78 = __require("fs");
|
|
71633
71642
|
var shebangCommand = require_shebang_command();
|
|
71634
71643
|
function readShebang(command) {
|
|
71635
71644
|
const size2 = 150;
|
|
71636
71645
|
const buffer = Buffer.alloc(size2);
|
|
71637
71646
|
let fd2;
|
|
71638
71647
|
try {
|
|
71639
|
-
fd2 =
|
|
71640
|
-
|
|
71641
|
-
|
|
71648
|
+
fd2 = fs78.openSync(command, "r");
|
|
71649
|
+
fs78.readSync(fd2, buffer, 0, size2, 0);
|
|
71650
|
+
fs78.closeSync(fd2);
|
|
71642
71651
|
} catch (e3) {
|
|
71643
71652
|
}
|
|
71644
71653
|
return shebangCommand(buffer.toString());
|
|
@@ -71651,7 +71660,7 @@ var require_readShebang = __commonJS({
|
|
|
71651
71660
|
var require_parse = __commonJS({
|
|
71652
71661
|
"node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
71653
71662
|
"use strict";
|
|
71654
|
-
var
|
|
71663
|
+
var path95 = __require("path");
|
|
71655
71664
|
var resolveCommand = require_resolveCommand();
|
|
71656
71665
|
var escape2 = require_escape();
|
|
71657
71666
|
var readShebang = require_readShebang();
|
|
@@ -71676,7 +71685,7 @@ var require_parse = __commonJS({
|
|
|
71676
71685
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
71677
71686
|
if (parsed.options.forceShell || needsShell) {
|
|
71678
71687
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
71679
|
-
parsed.command =
|
|
71688
|
+
parsed.command = path95.normalize(parsed.command);
|
|
71680
71689
|
parsed.command = escape2.command(parsed.command);
|
|
71681
71690
|
parsed.args = parsed.args.map((arg2) => escape2.argument(arg2, needsDoubleEscapeMetaChars));
|
|
71682
71691
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -71808,7 +71817,7 @@ var require_strip_final_newline = __commonJS({
|
|
|
71808
71817
|
var require_npm_run_path = __commonJS({
|
|
71809
71818
|
"node_modules/shell-env/node_modules/npm-run-path/index.js"(exports2, module2) {
|
|
71810
71819
|
"use strict";
|
|
71811
|
-
var
|
|
71820
|
+
var path95 = __require("path");
|
|
71812
71821
|
var pathKey2 = require_path_key();
|
|
71813
71822
|
var npmRunPath = (options2) => {
|
|
71814
71823
|
options2 = {
|
|
@@ -71818,16 +71827,16 @@ var require_npm_run_path = __commonJS({
|
|
|
71818
71827
|
...options2
|
|
71819
71828
|
};
|
|
71820
71829
|
let previous2;
|
|
71821
|
-
let cwdPath =
|
|
71830
|
+
let cwdPath = path95.resolve(options2.cwd);
|
|
71822
71831
|
const result2 = [];
|
|
71823
71832
|
while (previous2 !== cwdPath) {
|
|
71824
|
-
result2.push(
|
|
71833
|
+
result2.push(path95.join(cwdPath, "node_modules/.bin"));
|
|
71825
71834
|
previous2 = cwdPath;
|
|
71826
|
-
cwdPath =
|
|
71835
|
+
cwdPath = path95.resolve(cwdPath, "..");
|
|
71827
71836
|
}
|
|
71828
|
-
const execPathDir =
|
|
71837
|
+
const execPathDir = path95.resolve(options2.cwd, options2.execPath, "..");
|
|
71829
71838
|
result2.push(execPathDir);
|
|
71830
|
-
return result2.concat(options2.path).join(
|
|
71839
|
+
return result2.concat(options2.path).join(path95.delimiter);
|
|
71831
71840
|
};
|
|
71832
71841
|
module2.exports = npmRunPath;
|
|
71833
71842
|
module2.exports.default = npmRunPath;
|
|
@@ -71837,9 +71846,9 @@ var require_npm_run_path = __commonJS({
|
|
|
71837
71846
|
...options2
|
|
71838
71847
|
};
|
|
71839
71848
|
const env3 = { ...options2.env };
|
|
71840
|
-
const
|
|
71841
|
-
options2.path = env3[
|
|
71842
|
-
env3[
|
|
71849
|
+
const path96 = pathKey2({ env: env3 });
|
|
71850
|
+
options2.path = env3[path96];
|
|
71851
|
+
env3[path96] = module2.exports(options2);
|
|
71843
71852
|
return env3;
|
|
71844
71853
|
};
|
|
71845
71854
|
}
|
|
@@ -73021,7 +73030,7 @@ var require_command = __commonJS({
|
|
|
73021
73030
|
var require_execa = __commonJS({
|
|
73022
73031
|
"node_modules/shell-env/node_modules/execa/index.js"(exports2, module2) {
|
|
73023
73032
|
"use strict";
|
|
73024
|
-
var
|
|
73033
|
+
var path95 = __require("path");
|
|
73025
73034
|
var childProcess = __require("child_process");
|
|
73026
73035
|
var crossSpawn = require_cross_spawn();
|
|
73027
73036
|
var stripFinalNewline = require_strip_final_newline();
|
|
@@ -73063,7 +73072,7 @@ var require_execa = __commonJS({
|
|
|
73063
73072
|
};
|
|
73064
73073
|
options2.env = getEnv(options2);
|
|
73065
73074
|
options2.stdio = normalizeStdio(options2);
|
|
73066
|
-
if (process.platform === "win32" &&
|
|
73075
|
+
if (process.platform === "win32" && path95.basename(file2, ".exe") === "cmd") {
|
|
73067
73076
|
args2.unshift("/q");
|
|
73068
73077
|
}
|
|
73069
73078
|
return { file: file2, args: args2, options: options2, parsed };
|
|
@@ -75467,13 +75476,13 @@ var require_tiktoken = __commonJS({
|
|
|
75467
75476
|
var wasm = require_tiktoken_bg();
|
|
75468
75477
|
var imports = {};
|
|
75469
75478
|
imports["./tiktoken_bg.js"] = wasm;
|
|
75470
|
-
var
|
|
75471
|
-
var
|
|
75472
|
-
var candidates = __dirname.split(
|
|
75473
|
-
const prefix = array3.slice(0, index2 + 1).join(
|
|
75474
|
-
if (!prefix.includes("node_modules" +
|
|
75479
|
+
var path95 = __require("path");
|
|
75480
|
+
var fs78 = __require("fs");
|
|
75481
|
+
var candidates = __dirname.split(path95.sep).reduce((memo, _4, index2, array3) => {
|
|
75482
|
+
const prefix = array3.slice(0, index2 + 1).join(path95.sep) + path95.sep;
|
|
75483
|
+
if (!prefix.includes("node_modules" + path95.sep)) {
|
|
75475
75484
|
memo.unshift(
|
|
75476
|
-
|
|
75485
|
+
path95.join(
|
|
75477
75486
|
prefix,
|
|
75478
75487
|
"node_modules",
|
|
75479
75488
|
"tiktoken",
|
|
@@ -75484,11 +75493,11 @@ var require_tiktoken = __commonJS({
|
|
|
75484
75493
|
}
|
|
75485
75494
|
return memo;
|
|
75486
75495
|
}, []);
|
|
75487
|
-
candidates.unshift(
|
|
75496
|
+
candidates.unshift(path95.join(__dirname, "./tiktoken_bg.wasm"));
|
|
75488
75497
|
var bytes = null;
|
|
75489
75498
|
for (const candidate of candidates) {
|
|
75490
75499
|
try {
|
|
75491
|
-
bytes =
|
|
75500
|
+
bytes = fs78.readFileSync(candidate);
|
|
75492
75501
|
break;
|
|
75493
75502
|
} catch {
|
|
75494
75503
|
}
|
|
@@ -76037,13 +76046,13 @@ function __disposeResources(env3) {
|
|
|
76037
76046
|
}
|
|
76038
76047
|
return next();
|
|
76039
76048
|
}
|
|
76040
|
-
function __rewriteRelativeImportExtension(
|
|
76041
|
-
if (typeof
|
|
76042
|
-
return
|
|
76049
|
+
function __rewriteRelativeImportExtension(path95, preserveJsx) {
|
|
76050
|
+
if (typeof path95 === "string" && /^\.\.?\//.test(path95)) {
|
|
76051
|
+
return path95.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m3, tsx, d2, ext, cm) {
|
|
76043
76052
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d2 && (!ext || !cm) ? m3 : d2 + ext + "." + cm.toLowerCase() + "js";
|
|
76044
76053
|
});
|
|
76045
76054
|
}
|
|
76046
|
-
return
|
|
76055
|
+
return path95;
|
|
76047
76056
|
}
|
|
76048
76057
|
var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
|
|
76049
76058
|
var init_tslib_es6 = __esm({
|
|
@@ -84646,8 +84655,8 @@ var require_main4 = __commonJS({
|
|
|
84646
84655
|
});
|
|
84647
84656
|
|
|
84648
84657
|
// node_modules/iceberg-js/dist/index.mjs
|
|
84649
|
-
function buildUrl(baseUrl,
|
|
84650
|
-
const url2 = new URL(
|
|
84658
|
+
function buildUrl(baseUrl, path95, query) {
|
|
84659
|
+
const url2 = new URL(path95, baseUrl);
|
|
84651
84660
|
if (query) {
|
|
84652
84661
|
for (const [key, value] of Object.entries(query)) {
|
|
84653
84662
|
if (value !== void 0) {
|
|
@@ -84677,12 +84686,12 @@ function createFetchClient(options2) {
|
|
|
84677
84686
|
return {
|
|
84678
84687
|
async request({
|
|
84679
84688
|
method,
|
|
84680
|
-
path:
|
|
84689
|
+
path: path95,
|
|
84681
84690
|
query,
|
|
84682
84691
|
body,
|
|
84683
84692
|
headers
|
|
84684
84693
|
}) {
|
|
84685
|
-
const url2 = buildUrl(options2.baseUrl,
|
|
84694
|
+
const url2 = buildUrl(options2.baseUrl, path95, query);
|
|
84686
84695
|
const authHeaders = await buildAuthHeaders(options2.auth);
|
|
84687
84696
|
const res = await fetchFn(url2, {
|
|
84688
84697
|
method,
|
|
@@ -85350,7 +85359,7 @@ var init_dist12 = __esm({
|
|
|
85350
85359
|
if (bucketName.includes("/") || bucketName.includes("\\")) return false;
|
|
85351
85360
|
return /^[\w!.\*'() &$@=;:+,?-]+$/.test(bucketName);
|
|
85352
85361
|
};
|
|
85353
|
-
encodeStoragePath = (
|
|
85362
|
+
encodeStoragePath = (path95) => path95.split("/").map(encodeURIComponent).join("/");
|
|
85354
85363
|
_getErrorMessage = (err2) => {
|
|
85355
85364
|
if (typeof err2 === "object" && err2 !== null) {
|
|
85356
85365
|
const e3 = err2;
|
|
@@ -85582,7 +85591,7 @@ var init_dist12 = __esm({
|
|
|
85582
85591
|
* @param path The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.
|
|
85583
85592
|
* @param fileBody The body of the file to be stored in the bucket.
|
|
85584
85593
|
*/
|
|
85585
|
-
async uploadOrUpdate(method,
|
|
85594
|
+
async uploadOrUpdate(method, path95, fileBody, fileOptions) {
|
|
85586
85595
|
var _this = this;
|
|
85587
85596
|
return _this.handleOperation(async () => {
|
|
85588
85597
|
let body;
|
|
@@ -85606,7 +85615,7 @@ var init_dist12 = __esm({
|
|
|
85606
85615
|
if ((typeof ReadableStream !== "undefined" && body instanceof ReadableStream || body && typeof body === "object" && "pipe" in body && typeof body.pipe === "function") && !options2.duplex) options2.duplex = "half";
|
|
85607
85616
|
}
|
|
85608
85617
|
if (fileOptions === null || fileOptions === void 0 ? void 0 : fileOptions.headers) for (const [key, value] of Object.entries(fileOptions.headers)) headers = setHeader(headers, key, value);
|
|
85609
|
-
const cleanPath = _this._removeEmptyFolders(
|
|
85618
|
+
const cleanPath = _this._removeEmptyFolders(path95);
|
|
85610
85619
|
const _path = _this._getFinalPath(cleanPath);
|
|
85611
85620
|
const data = await (method == "PUT" ? put : post)(_this.fetch, `${_this.url}/object/${_path}`, body, _objectSpread22({ headers }, (options2 === null || options2 === void 0 ? void 0 : options2.duplex) ? { duplex: options2.duplex } : {}));
|
|
85612
85621
|
return {
|
|
@@ -85683,8 +85692,8 @@ var init_dist12 = __esm({
|
|
|
85683
85692
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
85684
85693
|
* - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Upload file using `ArrayBuffer` from base64 file data instead, see example below.
|
|
85685
85694
|
*/
|
|
85686
|
-
async upload(
|
|
85687
|
-
return this.uploadOrUpdate("POST",
|
|
85695
|
+
async upload(path95, fileBody, fileOptions) {
|
|
85696
|
+
return this.uploadOrUpdate("POST", path95, fileBody, fileOptions);
|
|
85688
85697
|
}
|
|
85689
85698
|
/**
|
|
85690
85699
|
* Upload a file with a token generated from `createSignedUploadUrl`.
|
|
@@ -85724,9 +85733,9 @@ var init_dist12 = __esm({
|
|
|
85724
85733
|
* - `objects` table permissions: none
|
|
85725
85734
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
85726
85735
|
*/
|
|
85727
|
-
async uploadToSignedUrl(
|
|
85736
|
+
async uploadToSignedUrl(path95, token2, fileBody, fileOptions) {
|
|
85728
85737
|
var _this3 = this;
|
|
85729
|
-
const cleanPath = _this3._removeEmptyFolders(
|
|
85738
|
+
const cleanPath = _this3._removeEmptyFolders(path95);
|
|
85730
85739
|
const _path = _this3._getFinalPath(cleanPath);
|
|
85731
85740
|
const url2 = new URL(_this3.url + `/object/upload/sign/${_path}`);
|
|
85732
85741
|
url2.searchParams.set("token", token2);
|
|
@@ -85795,10 +85804,10 @@ var init_dist12 = __esm({
|
|
|
85795
85804
|
* - `objects` table permissions: `insert`
|
|
85796
85805
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
85797
85806
|
*/
|
|
85798
|
-
async createSignedUploadUrl(
|
|
85807
|
+
async createSignedUploadUrl(path95, options2) {
|
|
85799
85808
|
var _this4 = this;
|
|
85800
85809
|
return _this4.handleOperation(async () => {
|
|
85801
|
-
let _path = _this4._getFinalPath(
|
|
85810
|
+
let _path = _this4._getFinalPath(path95);
|
|
85802
85811
|
const headers = _objectSpread22({}, _this4.headers);
|
|
85803
85812
|
if (options2 === null || options2 === void 0 ? void 0 : options2.upsert) headers["x-upsert"] = "true";
|
|
85804
85813
|
const data = await post(_this4.fetch, `${_this4.url}/object/upload/sign/${_path}`, {}, { headers });
|
|
@@ -85807,7 +85816,7 @@ var init_dist12 = __esm({
|
|
|
85807
85816
|
if (!token2) throw new StorageError("No token returned by API");
|
|
85808
85817
|
return {
|
|
85809
85818
|
signedUrl: url2.toString(),
|
|
85810
|
-
path:
|
|
85819
|
+
path: path95,
|
|
85811
85820
|
token: token2
|
|
85812
85821
|
};
|
|
85813
85822
|
});
|
|
@@ -85867,8 +85876,8 @@ var init_dist12 = __esm({
|
|
|
85867
85876
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
85868
85877
|
* - For React Native, using either `Blob`, `File` or `FormData` does not work as intended. Update file using `ArrayBuffer` from base64 file data instead, see example below.
|
|
85869
85878
|
*/
|
|
85870
|
-
async update(
|
|
85871
|
-
return this.uploadOrUpdate("PUT",
|
|
85879
|
+
async update(path95, fileBody, fileOptions) {
|
|
85880
|
+
return this.uploadOrUpdate("PUT", path95, fileBody, fileOptions);
|
|
85872
85881
|
}
|
|
85873
85882
|
/**
|
|
85874
85883
|
* Moves an existing file to a new path in the same bucket.
|
|
@@ -86019,10 +86028,10 @@ var init_dist12 = __esm({
|
|
|
86019
86028
|
* - `objects` table permissions: `select`
|
|
86020
86029
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
86021
86030
|
*/
|
|
86022
|
-
async createSignedUrl(
|
|
86031
|
+
async createSignedUrl(path95, expiresIn, options2) {
|
|
86023
86032
|
var _this8 = this;
|
|
86024
86033
|
return _this8.handleOperation(async () => {
|
|
86025
|
-
let _path = _this8._getFinalPath(
|
|
86034
|
+
let _path = _this8._getFinalPath(path95);
|
|
86026
86035
|
const hasTransform = typeof (options2 === null || options2 === void 0 ? void 0 : options2.transform) === "object" && options2.transform !== null && Object.keys(options2.transform).length > 0;
|
|
86027
86036
|
let data = await post(_this8.fetch, `${_this8.url}/object/sign/${_path}`, _objectSpread22({ expiresIn }, hasTransform ? { transform: options2.transform } : {}), { headers: _this8.headers });
|
|
86028
86037
|
const query = new URLSearchParams();
|
|
@@ -86157,13 +86166,13 @@ var init_dist12 = __esm({
|
|
|
86157
86166
|
* - `objects` table permissions: `select`
|
|
86158
86167
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
86159
86168
|
*/
|
|
86160
|
-
download(
|
|
86169
|
+
download(path95, options2, parameters) {
|
|
86161
86170
|
const renderPath = typeof (options2 === null || options2 === void 0 ? void 0 : options2.transform) === "object" && options2.transform !== null && Object.keys(options2.transform).length > 0 ? "render/image/authenticated" : "object";
|
|
86162
86171
|
const query = new URLSearchParams();
|
|
86163
86172
|
if (options2 === null || options2 === void 0 ? void 0 : options2.transform) this.applyTransformOptsToQuery(query, options2.transform);
|
|
86164
86173
|
if ((options2 === null || options2 === void 0 ? void 0 : options2.cacheNonce) != null) query.set("cacheNonce", String(options2.cacheNonce));
|
|
86165
86174
|
const queryString = query.toString();
|
|
86166
|
-
const _path = this._getFinalPath(
|
|
86175
|
+
const _path = this._getFinalPath(path95);
|
|
86167
86176
|
const downloadFn = () => get(this.fetch, `${this.url}/${renderPath}/${_path}${queryString ? `?${queryString}` : ""}`, {
|
|
86168
86177
|
headers: this.headers,
|
|
86169
86178
|
noResolveJson: true
|
|
@@ -86194,9 +86203,9 @@ var init_dist12 = __esm({
|
|
|
86194
86203
|
* }
|
|
86195
86204
|
* ```
|
|
86196
86205
|
*/
|
|
86197
|
-
async info(
|
|
86206
|
+
async info(path95) {
|
|
86198
86207
|
var _this10 = this;
|
|
86199
|
-
const _path = _this10._getFinalPath(
|
|
86208
|
+
const _path = _this10._getFinalPath(path95);
|
|
86200
86209
|
return _this10.handleOperation(async () => {
|
|
86201
86210
|
return recursiveToCamel(await get(_this10.fetch, `${_this10.url}/object/info/${_path}`, { headers: _this10.headers }));
|
|
86202
86211
|
});
|
|
@@ -86217,9 +86226,9 @@ var init_dist12 = __esm({
|
|
|
86217
86226
|
* .exists('folder/avatar1.png')
|
|
86218
86227
|
* ```
|
|
86219
86228
|
*/
|
|
86220
|
-
async exists(
|
|
86229
|
+
async exists(path95) {
|
|
86221
86230
|
var _this11 = this;
|
|
86222
|
-
const _path = _this11._getFinalPath(
|
|
86231
|
+
const _path = _this11._getFinalPath(path95);
|
|
86223
86232
|
try {
|
|
86224
86233
|
await head(_this11.fetch, `${_this11.url}/object/${_path}`, { headers: _this11.headers });
|
|
86225
86234
|
return {
|
|
@@ -86298,8 +86307,8 @@ var init_dist12 = __esm({
|
|
|
86298
86307
|
* - `objects` table permissions: none
|
|
86299
86308
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
86300
86309
|
*/
|
|
86301
|
-
getPublicUrl(
|
|
86302
|
-
const _path = this._getFinalPath(
|
|
86310
|
+
getPublicUrl(path95, options2) {
|
|
86311
|
+
const _path = this._getFinalPath(path95);
|
|
86303
86312
|
const query = new URLSearchParams();
|
|
86304
86313
|
if (options2 === null || options2 === void 0 ? void 0 : options2.download) query.set("download", options2.download === true ? "" : options2.download);
|
|
86305
86314
|
if (options2 === null || options2 === void 0 ? void 0 : options2.transform) this.applyTransformOptsToQuery(query, options2.transform);
|
|
@@ -86388,10 +86397,10 @@ var init_dist12 = __esm({
|
|
|
86388
86397
|
* .purgeCache('folder/avatar1.png', { transformations: true })
|
|
86389
86398
|
* ```
|
|
86390
86399
|
*/
|
|
86391
|
-
async purgeCache(
|
|
86400
|
+
async purgeCache(path95, options2, parameters) {
|
|
86392
86401
|
var _this13 = this;
|
|
86393
86402
|
return _this13.handleOperation(async () => {
|
|
86394
|
-
const _path = encodeStoragePath(_this13._getFinalPath(
|
|
86403
|
+
const _path = encodeStoragePath(_this13._getFinalPath(path95));
|
|
86395
86404
|
const query = new URLSearchParams();
|
|
86396
86405
|
if (options2 === null || options2 === void 0 ? void 0 : options2.transformations) query.set("transformations", "true");
|
|
86397
86406
|
const queryString = query.toString();
|
|
@@ -86489,13 +86498,13 @@ var init_dist12 = __esm({
|
|
|
86489
86498
|
* - `objects` table permissions: `select`
|
|
86490
86499
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
86491
86500
|
*/
|
|
86492
|
-
async list(
|
|
86501
|
+
async list(path95, options2, parameters) {
|
|
86493
86502
|
var _this14 = this;
|
|
86494
86503
|
return _this14.handleOperation(async () => {
|
|
86495
86504
|
const sortBy2 = (options2 === null || options2 === void 0 ? void 0 : options2.sortBy) ? _objectSpread22(_objectSpread22({}, DEFAULT_SEARCH_OPTIONS.sortBy), options2.sortBy) : DEFAULT_SEARCH_OPTIONS.sortBy;
|
|
86496
86505
|
const body = _objectSpread22(_objectSpread22(_objectSpread22({}, DEFAULT_SEARCH_OPTIONS), options2), {}, {
|
|
86497
86506
|
sortBy: sortBy2,
|
|
86498
|
-
prefix:
|
|
86507
|
+
prefix: path95 || ""
|
|
86499
86508
|
});
|
|
86500
86509
|
return await post(_this14.fetch, `${_this14.url}/object/list/${_this14.bucketId}`, body, { headers: _this14.headers }, parameters);
|
|
86501
86510
|
});
|
|
@@ -86561,11 +86570,11 @@ var init_dist12 = __esm({
|
|
|
86561
86570
|
if (typeof Buffer !== "undefined") return Buffer.from(data).toString("base64");
|
|
86562
86571
|
return btoa(data);
|
|
86563
86572
|
}
|
|
86564
|
-
_getFinalPath(
|
|
86565
|
-
return `${this.bucketId}/${
|
|
86573
|
+
_getFinalPath(path95) {
|
|
86574
|
+
return `${this.bucketId}/${path95.replace(/^\/+/, "")}`;
|
|
86566
86575
|
}
|
|
86567
|
-
_removeEmptyFolders(
|
|
86568
|
-
return
|
|
86576
|
+
_removeEmptyFolders(path95) {
|
|
86577
|
+
return path95.replace(/^\/|\/$/g, "").replace(/\/+/g, "/");
|
|
86569
86578
|
}
|
|
86570
86579
|
/** Modifies the `query`, appending values the from `transform` */
|
|
86571
86580
|
applyTransformOptsToQuery(query, transform2) {
|
|
@@ -88667,9 +88676,9 @@ var require_helpers = __commonJS({
|
|
|
88667
88676
|
const fragment = hashIndex === -1 ? "" : redirectTo.slice(hashIndex);
|
|
88668
88677
|
const queryIndex = base.indexOf("?");
|
|
88669
88678
|
if (queryIndex !== -1) {
|
|
88670
|
-
const
|
|
88679
|
+
const path95 = base.slice(0, queryIndex);
|
|
88671
88680
|
const remaining = base.slice(queryIndex + 1).split("&").filter((pair) => pair !== "" && pair !== constants_1.PKCE_FLOW_ID_PARAM && !pair.startsWith(`${constants_1.PKCE_FLOW_ID_PARAM}=`));
|
|
88672
|
-
base = remaining.length > 0 ? `${
|
|
88681
|
+
base = remaining.length > 0 ? `${path95}?${remaining.join("&")}` : path95;
|
|
88673
88682
|
}
|
|
88674
88683
|
const separator = base.includes("?") ? "&" : "?";
|
|
88675
88684
|
return `${base}${separator}${constants_1.PKCE_FLOW_ID_PARAM}=${encodeURIComponent(flowId)}${fragment}`;
|
|
@@ -140710,14 +140719,14 @@ __export(account_connectors_exports, {
|
|
|
140710
140719
|
updateConnector: () => updateConnector,
|
|
140711
140720
|
waitForConnectorCredential: () => waitForConnectorCredential
|
|
140712
140721
|
});
|
|
140713
|
-
async function proxyPost(
|
|
140722
|
+
async function proxyPost(path95, payload) {
|
|
140714
140723
|
const base = getCoreProxyBaseUrl();
|
|
140715
140724
|
if (!base) return null;
|
|
140716
140725
|
const session2 = await getSession();
|
|
140717
140726
|
const token2 = session2?.access_token;
|
|
140718
140727
|
if (!token2 || token2 === "atlarix-headless") return null;
|
|
140719
140728
|
try {
|
|
140720
|
-
const res = await coreProxyFetch(`${base}${
|
|
140729
|
+
const res = await coreProxyFetch(`${base}${path95}`, {
|
|
140721
140730
|
method: "POST",
|
|
140722
140731
|
headers: {
|
|
140723
140732
|
"Content-Type": "application/json",
|
|
@@ -140728,12 +140737,12 @@ async function proxyPost(path94, payload) {
|
|
|
140728
140737
|
});
|
|
140729
140738
|
const body = await res.json().catch(() => ({}));
|
|
140730
140739
|
if (!res.ok) {
|
|
140731
|
-
logger21.warn(`[account-connectors] ${
|
|
140740
|
+
logger21.warn(`[account-connectors] ${path95} \u2192 ${res.status}: ${body?.error ?? ""}`);
|
|
140732
140741
|
return null;
|
|
140733
140742
|
}
|
|
140734
140743
|
return body;
|
|
140735
140744
|
} catch (err2) {
|
|
140736
|
-
logger21.warn(`[account-connectors] ${
|
|
140745
|
+
logger21.warn(`[account-connectors] ${path95} threw:`, err2);
|
|
140737
140746
|
return null;
|
|
140738
140747
|
}
|
|
140739
140748
|
}
|
|
@@ -140803,7 +140812,7 @@ async function rpc(fn2, input) {
|
|
|
140803
140812
|
clearAccountConnectorsCache();
|
|
140804
140813
|
}
|
|
140805
140814
|
}
|
|
140806
|
-
async function proxyWrite(
|
|
140815
|
+
async function proxyWrite(path95, payload) {
|
|
140807
140816
|
const base = getCoreProxyBaseUrl();
|
|
140808
140817
|
const session2 = await getSession();
|
|
140809
140818
|
const token2 = session2?.access_token;
|
|
@@ -140811,7 +140820,7 @@ async function proxyWrite(path94, payload) {
|
|
|
140811
140820
|
return { ok: false, error: WRITE_MESSAGES.not_authenticated };
|
|
140812
140821
|
}
|
|
140813
140822
|
try {
|
|
140814
|
-
const res = await coreProxyFetch(`${base}${
|
|
140823
|
+
const res = await coreProxyFetch(`${base}${path95}`, {
|
|
140815
140824
|
method: "POST",
|
|
140816
140825
|
headers: {
|
|
140817
140826
|
"Content-Type": "application/json",
|
|
@@ -140827,7 +140836,7 @@ async function proxyWrite(path94, payload) {
|
|
|
140827
140836
|
}
|
|
140828
140837
|
return { ok: true, value: body };
|
|
140829
140838
|
} catch (err2) {
|
|
140830
|
-
logger21.warn(`[account-connectors] ${
|
|
140839
|
+
logger21.warn(`[account-connectors] ${path95} threw:`, err2);
|
|
140831
140840
|
return { ok: false, error: "Could not reach Atlarix. Check your connection and try again." };
|
|
140832
140841
|
} finally {
|
|
140833
140842
|
clearAccountConnectorsCache();
|
|
@@ -149829,11 +149838,11 @@ var require_mime_types = __commonJS({
|
|
|
149829
149838
|
}
|
|
149830
149839
|
return exts[0];
|
|
149831
149840
|
}
|
|
149832
|
-
function lookup2(
|
|
149833
|
-
if (!
|
|
149841
|
+
function lookup2(path95) {
|
|
149842
|
+
if (!path95 || typeof path95 !== "string") {
|
|
149834
149843
|
return false;
|
|
149835
149844
|
}
|
|
149836
|
-
var extension2 = extname3("x." +
|
|
149845
|
+
var extension2 = extname3("x." + path95).toLowerCase().substr(1);
|
|
149837
149846
|
if (!extension2) {
|
|
149838
149847
|
return false;
|
|
149839
149848
|
}
|
|
@@ -150938,11 +150947,11 @@ var require_form_data = __commonJS({
|
|
|
150938
150947
|
"use strict";
|
|
150939
150948
|
var CombinedStream = require_combined_stream();
|
|
150940
150949
|
var util2 = __require("util");
|
|
150941
|
-
var
|
|
150950
|
+
var path95 = __require("path");
|
|
150942
150951
|
var http5 = __require("http");
|
|
150943
150952
|
var https2 = __require("https");
|
|
150944
150953
|
var parseUrl2 = __require("url").parse;
|
|
150945
|
-
var
|
|
150954
|
+
var fs78 = __require("fs");
|
|
150946
150955
|
var Stream5 = __require("stream").Stream;
|
|
150947
150956
|
var crypto8 = __require("crypto");
|
|
150948
150957
|
var mime = require_mime_types();
|
|
@@ -151012,7 +151021,7 @@ var require_form_data = __commonJS({
|
|
|
151012
151021
|
if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
|
|
151013
151022
|
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
151014
151023
|
} else {
|
|
151015
|
-
|
|
151024
|
+
fs78.stat(value.path, function(err2, stat9) {
|
|
151016
151025
|
if (err2) {
|
|
151017
151026
|
callback(err2);
|
|
151018
151027
|
return;
|
|
@@ -151069,11 +151078,11 @@ var require_form_data = __commonJS({
|
|
|
151069
151078
|
FormData4.prototype._getContentDisposition = function(value, options2) {
|
|
151070
151079
|
var filename;
|
|
151071
151080
|
if (typeof options2.filepath === "string") {
|
|
151072
|
-
filename =
|
|
151081
|
+
filename = path95.normalize(options2.filepath).replace(/\\/g, "/");
|
|
151073
151082
|
} else if (options2.filename || value && (value.name || value.path)) {
|
|
151074
|
-
filename =
|
|
151083
|
+
filename = path95.basename(options2.filename || value && (value.name || value.path));
|
|
151075
151084
|
} else if (value && value.readable && hasOwn3(value, "httpVersion")) {
|
|
151076
|
-
filename =
|
|
151085
|
+
filename = path95.basename(value.client._httpMessage.path || "");
|
|
151077
151086
|
}
|
|
151078
151087
|
if (filename) {
|
|
151079
151088
|
return 'filename="' + escapeHeaderParam(filename) + '"';
|
|
@@ -153010,7 +153019,7 @@ var require_axios = __commonJS({
|
|
|
153010
153019
|
var https2 = __require("https");
|
|
153011
153020
|
var http22 = __require("http2");
|
|
153012
153021
|
var util2 = __require("util");
|
|
153013
|
-
var
|
|
153022
|
+
var path95 = __require("path");
|
|
153014
153023
|
var followRedirects = require_follow_redirects();
|
|
153015
153024
|
var zlib4 = __require("zlib");
|
|
153016
153025
|
var stream2 = __require("stream");
|
|
@@ -154078,9 +154087,9 @@ var require_axios = __commonJS({
|
|
|
154078
154087
|
function removeBrackets(key) {
|
|
154079
154088
|
return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
154080
154089
|
}
|
|
154081
|
-
function renderKey(
|
|
154082
|
-
if (!
|
|
154083
|
-
return
|
|
154090
|
+
function renderKey(path96, key, dots) {
|
|
154091
|
+
if (!path96) return key;
|
|
154092
|
+
return path96.concat(key).map(function each2(token2, i4) {
|
|
154084
154093
|
token2 = removeBrackets(token2);
|
|
154085
154094
|
return !dots && i4 ? "[" + token2 + "]" : token2;
|
|
154086
154095
|
}).join(dots ? "." : "");
|
|
@@ -154158,13 +154167,13 @@ var require_axios = __commonJS({
|
|
|
154158
154167
|
return currentValue;
|
|
154159
154168
|
});
|
|
154160
154169
|
}
|
|
154161
|
-
function defaultVisitor(value, key,
|
|
154170
|
+
function defaultVisitor(value, key, path96) {
|
|
154162
154171
|
let arr = value;
|
|
154163
154172
|
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
154164
|
-
formData.append(renderKey(
|
|
154173
|
+
formData.append(renderKey(path96, key, dots), convertValue(value));
|
|
154165
154174
|
return false;
|
|
154166
154175
|
}
|
|
154167
|
-
if (value && !
|
|
154176
|
+
if (value && !path96 && typeof value === "object") {
|
|
154168
154177
|
if (utils$1.endsWith(key, "{}")) {
|
|
154169
154178
|
key = metaTokens ? key : key.slice(0, -2);
|
|
154170
154179
|
value = stringifyWithDepthLimit(value, 1);
|
|
@@ -154183,7 +154192,7 @@ var require_axios = __commonJS({
|
|
|
154183
154192
|
if (isVisitable(value)) {
|
|
154184
154193
|
return true;
|
|
154185
154194
|
}
|
|
154186
|
-
formData.append(renderKey(
|
|
154195
|
+
formData.append(renderKey(path96, key, dots), convertValue(value));
|
|
154187
154196
|
return false;
|
|
154188
154197
|
}
|
|
154189
154198
|
const exposedHelpers = Object.assign(predicates, {
|
|
@@ -154191,17 +154200,17 @@ var require_axios = __commonJS({
|
|
|
154191
154200
|
convertValue,
|
|
154192
154201
|
isVisitable
|
|
154193
154202
|
});
|
|
154194
|
-
function build(value,
|
|
154203
|
+
function build(value, path96, depth = 0) {
|
|
154195
154204
|
if (utils$1.isUndefined(value)) return;
|
|
154196
154205
|
throwIfMaxDepthExceeded(depth);
|
|
154197
154206
|
if (stack.indexOf(value) !== -1) {
|
|
154198
|
-
throw new Error("Circular reference detected in " +
|
|
154207
|
+
throw new Error("Circular reference detected in " + path96.join("."));
|
|
154199
154208
|
}
|
|
154200
154209
|
stack.push(value);
|
|
154201
154210
|
utils$1.forEach(value, function each2(el, key) {
|
|
154202
|
-
const result2 = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key,
|
|
154211
|
+
const result2 = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path96, exposedHelpers);
|
|
154203
154212
|
if (result2 === true) {
|
|
154204
|
-
build(el,
|
|
154213
|
+
build(el, path96 ? path96.concat(key) : [key], depth + 1);
|
|
154205
154214
|
}
|
|
154206
154215
|
});
|
|
154207
154216
|
stack.pop();
|
|
@@ -154390,7 +154399,7 @@ var require_axios = __commonJS({
|
|
|
154390
154399
|
};
|
|
154391
154400
|
function toURLEncodedForm(data, options2) {
|
|
154392
154401
|
return toFormData2(data, new platform.classes.URLSearchParams(), {
|
|
154393
|
-
visitor: function(value, key,
|
|
154402
|
+
visitor: function(value, key, path96, helpers) {
|
|
154394
154403
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
154395
154404
|
this.append(key, value.toString("base64"));
|
|
154396
154405
|
return false;
|
|
@@ -154407,14 +154416,14 @@ var require_axios = __commonJS({
|
|
|
154407
154416
|
}
|
|
154408
154417
|
}
|
|
154409
154418
|
function parsePropPath(name30) {
|
|
154410
|
-
const
|
|
154419
|
+
const path96 = [];
|
|
154411
154420
|
const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
|
|
154412
154421
|
let match;
|
|
154413
154422
|
while ((match = pattern.exec(name30)) !== null) {
|
|
154414
|
-
throwIfDepthExceeded(
|
|
154415
|
-
|
|
154423
|
+
throwIfDepthExceeded(path96.length);
|
|
154424
|
+
path96.push(match[0] === "[]" ? "" : match[1] || match[0]);
|
|
154416
154425
|
}
|
|
154417
|
-
return
|
|
154426
|
+
return path96;
|
|
154418
154427
|
}
|
|
154419
154428
|
function arrayToObject(arr) {
|
|
154420
154429
|
const obj2 = {};
|
|
@@ -154429,12 +154438,12 @@ var require_axios = __commonJS({
|
|
|
154429
154438
|
return obj2;
|
|
154430
154439
|
}
|
|
154431
154440
|
function formDataToJSON(formData) {
|
|
154432
|
-
function buildPath(
|
|
154441
|
+
function buildPath(path96, value, target, index2) {
|
|
154433
154442
|
throwIfDepthExceeded(index2);
|
|
154434
|
-
let name30 =
|
|
154443
|
+
let name30 = path96[index2++];
|
|
154435
154444
|
if (name30 === "__proto__") return true;
|
|
154436
154445
|
const isNumericKey = Number.isFinite(+name30);
|
|
154437
|
-
const isLast = index2 >=
|
|
154446
|
+
const isLast = index2 >= path96.length;
|
|
154438
154447
|
name30 = !name30 && utils$1.isArray(target) ? target.length : name30;
|
|
154439
154448
|
if (isLast) {
|
|
154440
154449
|
if (utils$1.hasOwnProp(target, name30)) {
|
|
@@ -154447,7 +154456,7 @@ var require_axios = __commonJS({
|
|
|
154447
154456
|
if (!utils$1.hasOwnProp(target, name30) || !utils$1.isObject(target[name30])) {
|
|
154448
154457
|
target[name30] = [];
|
|
154449
154458
|
}
|
|
154450
|
-
const result2 = buildPath(
|
|
154459
|
+
const result2 = buildPath(path96, value, target[name30], index2);
|
|
154451
154460
|
if (result2 && utils$1.isArray(target[name30])) {
|
|
154452
154461
|
target[name30] = arrayToObject(target[name30]);
|
|
154453
154462
|
}
|
|
@@ -156058,8 +156067,8 @@ var require_axios = __commonJS({
|
|
|
156058
156067
|
const allowedSocketPaths = own2("allowedSocketPaths");
|
|
156059
156068
|
if (allowedSocketPaths != null) {
|
|
156060
156069
|
const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
|
|
156061
|
-
const resolvedSocket =
|
|
156062
|
-
const isAllowed = allowed.some((entry) => typeof entry === "string" &&
|
|
156070
|
+
const resolvedSocket = path95.resolve(socketPath);
|
|
156071
|
+
const isAllowed = allowed.some((entry) => typeof entry === "string" && path95.resolve(entry) === resolvedSocket);
|
|
156063
156072
|
if (!isAllowed) {
|
|
156064
156073
|
return reject2(new AxiosError(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config2));
|
|
156065
156074
|
}
|
|
@@ -156358,14 +156367,14 @@ var require_axios = __commonJS({
|
|
|
156358
156367
|
var cookies = platform.hasStandardBrowserEnv ? (
|
|
156359
156368
|
// Standard browser envs support document.cookie
|
|
156360
156369
|
{
|
|
156361
|
-
write(name30, value, expires,
|
|
156370
|
+
write(name30, value, expires, path96, domain2, secure, sameSite) {
|
|
156362
156371
|
if (typeof document === "undefined") return;
|
|
156363
156372
|
const cookie = [`${name30}=${encodeURIComponent(value)}`];
|
|
156364
156373
|
if (utils$1.isNumber(expires)) {
|
|
156365
156374
|
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
156366
156375
|
}
|
|
156367
|
-
if (utils$1.isString(
|
|
156368
|
-
cookie.push(`path=${
|
|
156376
|
+
if (utils$1.isString(path96)) {
|
|
156377
|
+
cookie.push(`path=${path96}`);
|
|
156369
156378
|
}
|
|
156370
156379
|
if (utils$1.isString(domain2)) {
|
|
156371
156380
|
cookie.push(`domain=${domain2}`);
|
|
@@ -158155,8 +158164,8 @@ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname3(proce
|
|
|
158155
158164
|
return decodedFile;
|
|
158156
158165
|
};
|
|
158157
158166
|
}
|
|
158158
|
-
function normalizeWindowsPath(
|
|
158159
|
-
return
|
|
158167
|
+
function normalizeWindowsPath(path95) {
|
|
158168
|
+
return path95.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
158160
158169
|
}
|
|
158161
158170
|
async function addSourceContext(frames) {
|
|
158162
158171
|
const filesToLines = {};
|
|
@@ -158201,9 +158210,9 @@ async function addSourceContext(frames) {
|
|
|
158201
158210
|
LRU_FILE_CONTENTS_CACHE.reduce();
|
|
158202
158211
|
return frames;
|
|
158203
158212
|
}
|
|
158204
|
-
function getContextLinesFromFile(
|
|
158213
|
+
function getContextLinesFromFile(path95, ranges, output) {
|
|
158205
158214
|
return new Promise((resolve16) => {
|
|
158206
|
-
const stream2 = createReadStream(
|
|
158215
|
+
const stream2 = createReadStream(path95);
|
|
158207
158216
|
const lineReaded = createInterface({
|
|
158208
158217
|
input: stream2
|
|
158209
158218
|
});
|
|
@@ -158221,7 +158230,7 @@ function getContextLinesFromFile(path94, ranges, output) {
|
|
|
158221
158230
|
let rangeStart = range3[0];
|
|
158222
158231
|
let rangeEnd = range3[1];
|
|
158223
158232
|
function onStreamError() {
|
|
158224
|
-
LRU_FILE_CONTENTS_FS_READ_FAILED.set(
|
|
158233
|
+
LRU_FILE_CONTENTS_FS_READ_FAILED.set(path95, 1);
|
|
158225
158234
|
lineReaded.close();
|
|
158226
158235
|
lineReaded.removeAllListeners();
|
|
158227
158236
|
destroyStreamAndResolve();
|
|
@@ -158298,8 +158307,8 @@ function clearLineContext(frame) {
|
|
|
158298
158307
|
delete frame.context_line;
|
|
158299
158308
|
delete frame.post_context;
|
|
158300
158309
|
}
|
|
158301
|
-
function shouldSkipContextLinesForFile(
|
|
158302
|
-
return
|
|
158310
|
+
function shouldSkipContextLinesForFile(path95) {
|
|
158311
|
+
return path95.startsWith("node:") || path95.endsWith(".min.js") || path95.endsWith(".min.cjs") || path95.endsWith(".min.mjs") || path95.startsWith("data:");
|
|
158303
158312
|
}
|
|
158304
158313
|
function shouldSkipContextLinesForFrame(frame) {
|
|
158305
158314
|
if (frame.lineno !== void 0 && frame.lineno > MAX_CONTEXTLINES_LINENO) {
|
|
@@ -161975,8 +161984,8 @@ var require_auth_config = __commonJS({
|
|
|
161975
161984
|
writeAuthConfig: () => writeAuthConfig
|
|
161976
161985
|
});
|
|
161977
161986
|
module2.exports = __toCommonJS2(auth_config_exports);
|
|
161978
|
-
var
|
|
161979
|
-
var
|
|
161987
|
+
var fs78 = __toESM2(__require("fs"));
|
|
161988
|
+
var path95 = __toESM2(__require("path"));
|
|
161980
161989
|
var import_token_util = require_token_util();
|
|
161981
161990
|
function getAuthConfigPath() {
|
|
161982
161991
|
const dataDir = (0, import_token_util.getVercelDataDir)();
|
|
@@ -161985,15 +161994,15 @@ var require_auth_config = __commonJS({
|
|
|
161985
161994
|
`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`
|
|
161986
161995
|
);
|
|
161987
161996
|
}
|
|
161988
|
-
return
|
|
161997
|
+
return path95.join(dataDir, "auth.json");
|
|
161989
161998
|
}
|
|
161990
161999
|
function readAuthConfig() {
|
|
161991
162000
|
try {
|
|
161992
162001
|
const authPath = getAuthConfigPath();
|
|
161993
|
-
if (!
|
|
162002
|
+
if (!fs78.existsSync(authPath)) {
|
|
161994
162003
|
return null;
|
|
161995
162004
|
}
|
|
161996
|
-
const content =
|
|
162005
|
+
const content = fs78.readFileSync(authPath, "utf8");
|
|
161997
162006
|
if (!content) {
|
|
161998
162007
|
return null;
|
|
161999
162008
|
}
|
|
@@ -162004,11 +162013,11 @@ var require_auth_config = __commonJS({
|
|
|
162004
162013
|
}
|
|
162005
162014
|
function writeAuthConfig(config2) {
|
|
162006
162015
|
const authPath = getAuthConfigPath();
|
|
162007
|
-
const authDir =
|
|
162008
|
-
if (!
|
|
162009
|
-
|
|
162016
|
+
const authDir = path95.dirname(authPath);
|
|
162017
|
+
if (!fs78.existsSync(authDir)) {
|
|
162018
|
+
fs78.mkdirSync(authDir, { mode: 504, recursive: true });
|
|
162010
162019
|
}
|
|
162011
|
-
|
|
162020
|
+
fs78.writeFileSync(authPath, JSON.stringify(config2, null, 2), { mode: 384 });
|
|
162012
162021
|
}
|
|
162013
162022
|
function isValidAccessToken(authConfig, expirationBufferMs = 0) {
|
|
162014
162023
|
if (!authConfig.token)
|
|
@@ -162199,8 +162208,8 @@ var require_token_util = __commonJS({
|
|
|
162199
162208
|
saveToken: () => saveToken
|
|
162200
162209
|
});
|
|
162201
162210
|
module2.exports = __toCommonJS2(token_util_exports);
|
|
162202
|
-
var
|
|
162203
|
-
var
|
|
162211
|
+
var path95 = __toESM2(__require("path"));
|
|
162212
|
+
var fs78 = __toESM2(__require("fs"));
|
|
162204
162213
|
var import_token_error = require_token_error();
|
|
162205
162214
|
var import_token_io = require_token_io();
|
|
162206
162215
|
var import_auth_config = require_auth_config();
|
|
@@ -162212,7 +162221,7 @@ var require_token_util = __commonJS({
|
|
|
162212
162221
|
if (!dataDir) {
|
|
162213
162222
|
return null;
|
|
162214
162223
|
}
|
|
162215
|
-
return
|
|
162224
|
+
return path95.join(dataDir, vercelFolder);
|
|
162216
162225
|
}
|
|
162217
162226
|
async function getVercelToken2(options2) {
|
|
162218
162227
|
const authConfig = (0, import_auth_config.readAuthConfig)();
|
|
@@ -162288,13 +162297,13 @@ var require_token_util = __commonJS({
|
|
|
162288
162297
|
"Unable to find project root directory. Have you linked your project with `vc link?`"
|
|
162289
162298
|
);
|
|
162290
162299
|
}
|
|
162291
|
-
const prjPath =
|
|
162292
|
-
if (!
|
|
162300
|
+
const prjPath = path95.join(dir, ".vercel", "project.json");
|
|
162301
|
+
if (!fs78.existsSync(prjPath)) {
|
|
162293
162302
|
throw new import_token_error.VercelOidcTokenError(
|
|
162294
162303
|
"project.json not found, have you linked your project with `vc link?`"
|
|
162295
162304
|
);
|
|
162296
162305
|
}
|
|
162297
|
-
const prj = JSON.parse(
|
|
162306
|
+
const prj = JSON.parse(fs78.readFileSync(prjPath, "utf8"));
|
|
162298
162307
|
if (typeof prj.projectId !== "string" && typeof prj.orgId !== "string") {
|
|
162299
162308
|
throw new TypeError(
|
|
162300
162309
|
"Expected a string-valued projectId property. Try running `vc link` to re-link your project."
|
|
@@ -162309,11 +162318,11 @@ var require_token_util = __commonJS({
|
|
|
162309
162318
|
"Unable to find user data directory. Please reach out to Vercel support."
|
|
162310
162319
|
);
|
|
162311
162320
|
}
|
|
162312
|
-
const tokenPath =
|
|
162321
|
+
const tokenPath = path95.join(dir, "com.vercel.token", `${projectId}.json`);
|
|
162313
162322
|
const tokenJson = JSON.stringify(token2);
|
|
162314
|
-
|
|
162315
|
-
|
|
162316
|
-
|
|
162323
|
+
fs78.mkdirSync(path95.dirname(tokenPath), { mode: 504, recursive: true });
|
|
162324
|
+
fs78.writeFileSync(tokenPath, tokenJson);
|
|
162325
|
+
fs78.chmodSync(tokenPath, 432);
|
|
162317
162326
|
return;
|
|
162318
162327
|
}
|
|
162319
162328
|
function loadToken(projectId) {
|
|
@@ -162323,11 +162332,11 @@ var require_token_util = __commonJS({
|
|
|
162323
162332
|
"Unable to find user data directory. Please reach out to Vercel support."
|
|
162324
162333
|
);
|
|
162325
162334
|
}
|
|
162326
|
-
const tokenPath =
|
|
162327
|
-
if (!
|
|
162335
|
+
const tokenPath = path95.join(dir, "com.vercel.token", `${projectId}.json`);
|
|
162336
|
+
if (!fs78.existsSync(tokenPath)) {
|
|
162328
162337
|
return null;
|
|
162329
162338
|
}
|
|
162330
|
-
const token2 = JSON.parse(
|
|
162339
|
+
const token2 = JSON.parse(fs78.readFileSync(tokenPath, "utf8"));
|
|
162331
162340
|
assertVercelOidcTokenResponse(token2);
|
|
162332
162341
|
return token2;
|
|
162333
162342
|
}
|
|
@@ -187759,11 +187768,11 @@ var init_lib = __esm({
|
|
|
187759
187768
|
}
|
|
187760
187769
|
}
|
|
187761
187770
|
},
|
|
187762
|
-
addToPath: function addToPath(
|
|
187763
|
-
var last2 =
|
|
187771
|
+
addToPath: function addToPath(path95, added, removed, oldPosInc, options2) {
|
|
187772
|
+
var last2 = path95.lastComponent;
|
|
187764
187773
|
if (last2 && !options2.oneChangePerToken && last2.added === added && last2.removed === removed) {
|
|
187765
187774
|
return {
|
|
187766
|
-
oldPos:
|
|
187775
|
+
oldPos: path95.oldPos + oldPosInc,
|
|
187767
187776
|
lastComponent: {
|
|
187768
187777
|
count: last2.count + 1,
|
|
187769
187778
|
added,
|
|
@@ -187773,7 +187782,7 @@ var init_lib = __esm({
|
|
|
187773
187782
|
};
|
|
187774
187783
|
} else {
|
|
187775
187784
|
return {
|
|
187776
|
-
oldPos:
|
|
187785
|
+
oldPos: path95.oldPos + oldPosInc,
|
|
187777
187786
|
lastComponent: {
|
|
187778
187787
|
count: 1,
|
|
187779
187788
|
added,
|
|
@@ -188693,18 +188702,18 @@ function daemonParsesMarkup() {
|
|
|
188693
188702
|
const ask = (cmd, args2) => new Promise(
|
|
188694
188703
|
(resolve16, reject2) => execFile2(cmd, args2, { timeout: 1500 }, (err2, stdout) => err2 ? reject2(err2) : resolve16(String(stdout)))
|
|
188695
188704
|
);
|
|
188696
|
-
const
|
|
188705
|
+
const path95 = ["/org/freedesktop/Notifications", "org.freedesktop.Notifications.GetCapabilities"];
|
|
188697
188706
|
return linuxMarkup ??= ask("gdbus", [
|
|
188698
188707
|
"call",
|
|
188699
188708
|
"--session",
|
|
188700
188709
|
"--dest",
|
|
188701
188710
|
"org.freedesktop.Notifications",
|
|
188702
188711
|
"--object-path",
|
|
188703
|
-
|
|
188712
|
+
path95[0],
|
|
188704
188713
|
"--method",
|
|
188705
|
-
|
|
188714
|
+
path95[1]
|
|
188706
188715
|
]).catch(
|
|
188707
|
-
() => ask("dbus-send", ["--session", "--print-reply", "--dest=org.freedesktop.Notifications",
|
|
188716
|
+
() => ask("dbus-send", ["--session", "--print-reply", "--dest=org.freedesktop.Notifications", path95[0], path95[1]])
|
|
188708
188717
|
).then(capabilitiesListMarkup, () => false);
|
|
188709
188718
|
}
|
|
188710
188719
|
async function notificationBody(body, platform = process.platform, parsesMarkup = daemonParsesMarkup) {
|
|
@@ -190692,14 +190701,14 @@ function emitRunCommandPermissionActivity(sender, chatId, label2, command) {
|
|
|
190692
190701
|
chatId
|
|
190693
190702
|
});
|
|
190694
190703
|
}
|
|
190695
|
-
function emitFilePermissionActivity(sender, chatId, label2,
|
|
190704
|
+
function emitFilePermissionActivity(sender, chatId, label2, path95) {
|
|
190696
190705
|
safeSend(sender, "chat:activity", {
|
|
190697
190706
|
id: `file-perm-${chatId}-${Date.now()}`,
|
|
190698
190707
|
type: "tool_use",
|
|
190699
190708
|
// v13.8: edit_file is the single file-mutation tool (absorbed write_file).
|
|
190700
190709
|
toolName: "edit_file",
|
|
190701
190710
|
label: label2,
|
|
190702
|
-
detail:
|
|
190711
|
+
detail: path95.slice(0, 200),
|
|
190703
190712
|
status: "done",
|
|
190704
190713
|
timestamp: Date.now(),
|
|
190705
190714
|
chatId
|
|
@@ -195352,12 +195361,12 @@ function getMCPToolHeaderBindings(inputSchema) {
|
|
|
195352
195361
|
const bindings = [];
|
|
195353
195362
|
const headerNames = /* @__PURE__ */ new Set();
|
|
195354
195363
|
let error51;
|
|
195355
|
-
const visit3 = (value,
|
|
195364
|
+
const visit3 = (value, path95, staticallyReachable) => {
|
|
195356
195365
|
if (error51 != null || !isRecord(value)) {
|
|
195357
195366
|
return;
|
|
195358
195367
|
}
|
|
195359
195368
|
if ("x-mcp-header" in value) {
|
|
195360
|
-
if (!staticallyReachable ||
|
|
195369
|
+
if (!staticallyReachable || path95.length === 0) {
|
|
195361
195370
|
error51 = "x-mcp-header is not on a statically reachable property";
|
|
195362
195371
|
return;
|
|
195363
195372
|
}
|
|
@@ -195377,7 +195386,7 @@ function getMCPToolHeaderBindings(inputSchema) {
|
|
|
195377
195386
|
return;
|
|
195378
195387
|
}
|
|
195379
195388
|
headerNames.add(normalizedHeaderName);
|
|
195380
|
-
bindings.push({ headerName, path:
|
|
195389
|
+
bindings.push({ headerName, path: path95, valueType });
|
|
195381
195390
|
}
|
|
195382
195391
|
for (const [key, child2] of Object.entries(value)) {
|
|
195383
195392
|
if (key === "x-mcp-header") {
|
|
@@ -195385,19 +195394,19 @@ function getMCPToolHeaderBindings(inputSchema) {
|
|
|
195385
195394
|
}
|
|
195386
195395
|
if (key === "properties" && isRecord(child2)) {
|
|
195387
195396
|
for (const [propertyName, propertySchema] of Object.entries(child2)) {
|
|
195388
|
-
visit3(propertySchema, [...
|
|
195397
|
+
visit3(propertySchema, [...path95, propertyName], staticallyReachable);
|
|
195389
195398
|
}
|
|
195390
195399
|
} else {
|
|
195391
|
-
visit3(child2,
|
|
195400
|
+
visit3(child2, path95, false);
|
|
195392
195401
|
}
|
|
195393
195402
|
}
|
|
195394
195403
|
};
|
|
195395
195404
|
visit3(inputSchema, [], true);
|
|
195396
195405
|
return error51 == null ? { success: true, bindings } : { success: false, error: error51 };
|
|
195397
195406
|
}
|
|
195398
|
-
function getValueAtPath(value,
|
|
195407
|
+
function getValueAtPath(value, path95) {
|
|
195399
195408
|
let current = value;
|
|
195400
|
-
for (const segment of
|
|
195409
|
+
for (const segment of path95) {
|
|
195401
195410
|
if (!isRecord(current)) {
|
|
195402
195411
|
return void 0;
|
|
195403
195412
|
}
|
|
@@ -201571,6 +201580,26 @@ var init_oauth_loopback_server = __esm({
|
|
|
201571
201580
|
}
|
|
201572
201581
|
});
|
|
201573
201582
|
|
|
201583
|
+
// src/lib/mcp/oauth-error-message.ts
|
|
201584
|
+
function describeMcpOAuthError(error51, guideUrl = MCP_CONNECTOR_GUIDE_URL) {
|
|
201585
|
+
const message = error51 instanceof Error ? error51.message : String(error51);
|
|
201586
|
+
if (NO_REGISTRATION.test(message)) {
|
|
201587
|
+
return `This server needs a pre-registered app. Set it up once on atlarix.dev: ${guideUrl}`;
|
|
201588
|
+
}
|
|
201589
|
+
return message;
|
|
201590
|
+
}
|
|
201591
|
+
function needsPreRegisteredClient(error51) {
|
|
201592
|
+
const message = error51 instanceof Error ? error51.message : String(error51);
|
|
201593
|
+
return NO_REGISTRATION.test(message);
|
|
201594
|
+
}
|
|
201595
|
+
var MCP_CONNECTOR_GUIDE_URL, NO_REGISTRATION;
|
|
201596
|
+
var init_oauth_error_message = __esm({
|
|
201597
|
+
"src/lib/mcp/oauth-error-message.ts"() {
|
|
201598
|
+
MCP_CONNECTOR_GUIDE_URL = "https://atlarix.dev/guides/slack-mcp";
|
|
201599
|
+
NO_REGISTRATION = /does not support dynamic client registration|dynamic_client_registration_not_supported|client_registration_required/i;
|
|
201600
|
+
}
|
|
201601
|
+
});
|
|
201602
|
+
|
|
201574
201603
|
// src/lib/mcp/open-for-user.ts
|
|
201575
201604
|
var open_for_user_exports = {};
|
|
201576
201605
|
__export(open_for_user_exports, {
|
|
@@ -201821,6 +201850,9 @@ async function startMcpOAuthFlow(serverId, opts) {
|
|
|
201821
201850
|
}
|
|
201822
201851
|
clearPendingMcpOAuthSession(serverId);
|
|
201823
201852
|
logger47.error("startMcpOAuthFlow failed", error51);
|
|
201853
|
+
if (needsPreRegisteredClient(error51)) {
|
|
201854
|
+
throw new McpOAuthError(describeMcpOAuthError(error51), "needs_registration");
|
|
201855
|
+
}
|
|
201824
201856
|
throw error51;
|
|
201825
201857
|
}
|
|
201826
201858
|
}
|
|
@@ -201842,12 +201874,13 @@ async function finishMcpOAuthCallback(code, state2) {
|
|
|
201842
201874
|
return { serverId: pending6.serverId, serverName: pending6.serverName };
|
|
201843
201875
|
} catch (error51) {
|
|
201844
201876
|
clearPendingMcpOAuthSession(pending6.serverId);
|
|
201845
|
-
const message =
|
|
201877
|
+
const message = describeMcpOAuthError(error51);
|
|
201846
201878
|
broadcastMcpOAuthEvent("mcp:oauth-error", {
|
|
201847
201879
|
serverId: pending6.serverId,
|
|
201848
201880
|
serverName: pending6.serverName,
|
|
201849
201881
|
error: message
|
|
201850
201882
|
});
|
|
201883
|
+
if (needsPreRegisteredClient(error51)) throw new McpOAuthError(message, "needs_registration");
|
|
201851
201884
|
throw error51;
|
|
201852
201885
|
}
|
|
201853
201886
|
}
|
|
@@ -201905,6 +201938,7 @@ var init_mcp_oauth_service = __esm({
|
|
|
201905
201938
|
init_schema();
|
|
201906
201939
|
init_atlarix_oauth_provider();
|
|
201907
201940
|
init_oauth_loopback_server();
|
|
201941
|
+
init_oauth_error_message();
|
|
201908
201942
|
init_oauth_session_store();
|
|
201909
201943
|
init_oauth_token_utils();
|
|
201910
201944
|
logger47 = import_electron_log50.default.scope("mcp-oauth");
|
|
@@ -205731,15 +205765,15 @@ async function QuickJSRaw(moduleArg = {}) {
|
|
|
205731
205765
|
throw c2;
|
|
205732
205766
|
}, w2 = import.meta.url, y2 = "", z5, A3;
|
|
205733
205767
|
if (q3) {
|
|
205734
|
-
var
|
|
205768
|
+
var fs78 = require4("node:fs");
|
|
205735
205769
|
w2.startsWith("file:") && (y2 = require4("node:path").dirname(require4("node:url").fileURLToPath(w2)) + "/");
|
|
205736
205770
|
A3 = (a2) => {
|
|
205737
205771
|
a2 = B2(a2) ? new URL(a2) : a2;
|
|
205738
|
-
return
|
|
205772
|
+
return fs78.readFileSync(a2);
|
|
205739
205773
|
};
|
|
205740
205774
|
z5 = async (a2) => {
|
|
205741
205775
|
a2 = B2(a2) ? new URL(a2) : a2;
|
|
205742
|
-
return
|
|
205776
|
+
return fs78.readFileSync(a2, void 0);
|
|
205743
205777
|
};
|
|
205744
205778
|
1 < process.argv.length && (u2 = process.argv[1].replace(/\\/g, "/"));
|
|
205745
205779
|
process.argv.slice(2);
|
|
@@ -209812,15 +209846,15 @@ var init_services = __esm({
|
|
|
209812
209846
|
usage: async (filters) => (await Promise.resolve().then(() => (init_usage_report(), usage_report_exports))).getUsageReport(filters),
|
|
209813
209847
|
usageCredits: async () => (await Promise.resolve().then(() => (init_usage_credits(), usage_credits_exports))).getUsageCredits(),
|
|
209814
209848
|
async saveUsageCard(svg) {
|
|
209815
|
-
const [{ promises:
|
|
209816
|
-
const dir =
|
|
209817
|
-
await
|
|
209849
|
+
const [{ promises: fs78 }, os29, path95] = await Promise.all([import("node:fs"), import("node:os"), import("node:path")]);
|
|
209850
|
+
const dir = path95.join(os29.homedir(), "Downloads");
|
|
209851
|
+
await fs78.mkdir(dir, { recursive: true });
|
|
209818
209852
|
const { localDayKey: localDayKey3 } = await Promise.resolve().then(() => (init_edit_stats2(), edit_stats_exports));
|
|
209819
|
-
const stem =
|
|
209853
|
+
const stem = path95.join(dir, `atlarix-usage-${localDayKey3()}`);
|
|
209820
209854
|
for (let n2 = 1; ; n2++) {
|
|
209821
209855
|
const file2 = n2 === 1 ? `${stem}.svg` : `${stem}-${n2}.svg`;
|
|
209822
209856
|
try {
|
|
209823
|
-
await
|
|
209857
|
+
await fs78.writeFile(file2, svg, { encoding: "utf8", flag: "wx" });
|
|
209824
209858
|
return file2;
|
|
209825
209859
|
} catch (e3) {
|
|
209826
209860
|
if (e3.code !== "EEXIST" || n2 >= 100) throw e3;
|
|
@@ -219490,22 +219524,22 @@ var init_from = __esm({
|
|
|
219490
219524
|
init_file();
|
|
219491
219525
|
init_fetch_blob();
|
|
219492
219526
|
({ stat: stat6 } = fs49);
|
|
219493
|
-
blobFromSync = (
|
|
219494
|
-
blobFrom = (
|
|
219495
|
-
fileFrom = (
|
|
219496
|
-
fileFromSync = (
|
|
219497
|
-
fromBlob = (stat9,
|
|
219498
|
-
path:
|
|
219527
|
+
blobFromSync = (path95, type2) => fromBlob(statSync3(path95), path95, type2);
|
|
219528
|
+
blobFrom = (path95, type2) => stat6(path95).then((stat9) => fromBlob(stat9, path95, type2));
|
|
219529
|
+
fileFrom = (path95, type2) => stat6(path95).then((stat9) => fromFile(stat9, path95, type2));
|
|
219530
|
+
fileFromSync = (path95, type2) => fromFile(statSync3(path95), path95, type2);
|
|
219531
|
+
fromBlob = (stat9, path95, type2 = "") => new fetch_blob_default([new BlobDataItem({
|
|
219532
|
+
path: path95,
|
|
219499
219533
|
size: stat9.size,
|
|
219500
219534
|
lastModified: stat9.mtimeMs,
|
|
219501
219535
|
start: 0
|
|
219502
219536
|
})], { type: type2 });
|
|
219503
|
-
fromFile = (stat9,
|
|
219504
|
-
path:
|
|
219537
|
+
fromFile = (stat9, path95, type2 = "") => new file_default([new BlobDataItem({
|
|
219538
|
+
path: path95,
|
|
219505
219539
|
size: stat9.size,
|
|
219506
219540
|
lastModified: stat9.mtimeMs,
|
|
219507
219541
|
start: 0
|
|
219508
|
-
})], basename2(
|
|
219542
|
+
})], basename2(path95), { type: type2, lastModified: stat9.mtimeMs });
|
|
219509
219543
|
BlobDataItem = class _BlobDataItem {
|
|
219510
219544
|
#path;
|
|
219511
219545
|
#start;
|
|
@@ -224684,9 +224718,9 @@ var require_util2 = __commonJS({
|
|
|
224684
224718
|
exports2.removeUndefinedValuesInObject = removeUndefinedValuesInObject;
|
|
224685
224719
|
exports2.isValidFile = isValidFile;
|
|
224686
224720
|
exports2.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
|
|
224687
|
-
var
|
|
224721
|
+
var fs78 = __require("fs");
|
|
224688
224722
|
var os29 = __require("os");
|
|
224689
|
-
var
|
|
224723
|
+
var path95 = __require("path");
|
|
224690
224724
|
var WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
|
|
224691
224725
|
var CLOUDSDK_CONFIG_DIRECTORY = "gcloud";
|
|
224692
224726
|
function snakeToCamel(str2) {
|
|
@@ -224772,15 +224806,15 @@ var require_util2 = __commonJS({
|
|
|
224772
224806
|
}
|
|
224773
224807
|
async function isValidFile(filePath) {
|
|
224774
224808
|
try {
|
|
224775
|
-
const stats = await
|
|
224809
|
+
const stats = await fs78.promises.lstat(filePath);
|
|
224776
224810
|
return stats.isFile();
|
|
224777
224811
|
} catch (e3) {
|
|
224778
224812
|
return false;
|
|
224779
224813
|
}
|
|
224780
224814
|
}
|
|
224781
224815
|
function getWellKnownCertificateConfigFileLocation() {
|
|
224782
|
-
const configDir = process.env.CLOUDSDK_CONFIG || (_isWindows() ?
|
|
224783
|
-
return
|
|
224816
|
+
const configDir = process.env.CLOUDSDK_CONFIG || (_isWindows() ? path95.join(process.env.APPDATA || "", CLOUDSDK_CONFIG_DIRECTORY) : path95.join(process.env.HOME || "", ".config", CLOUDSDK_CONFIG_DIRECTORY));
|
|
224817
|
+
return path95.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE);
|
|
224784
224818
|
}
|
|
224785
224819
|
function _isWindows() {
|
|
224786
224820
|
return os29.platform().startsWith("win");
|
|
@@ -226726,11 +226760,11 @@ var require_getCredentials = __commonJS({
|
|
|
226726
226760
|
"use strict";
|
|
226727
226761
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
226728
226762
|
exports2.getCredentials = getCredentials;
|
|
226729
|
-
var
|
|
226730
|
-
var
|
|
226763
|
+
var path95 = __require("path");
|
|
226764
|
+
var fs78 = __require("fs");
|
|
226731
226765
|
var util_1 = __require("util");
|
|
226732
226766
|
var errorWithCode_1 = require_errorWithCode();
|
|
226733
|
-
var readFile15 =
|
|
226767
|
+
var readFile15 = fs78.readFile ? (0, util_1.promisify)(fs78.readFile) : async () => {
|
|
226734
226768
|
throw new errorWithCode_1.ErrorWithCode("use key rather than keyFile.", "MISSING_CREDENTIALS");
|
|
226735
226769
|
};
|
|
226736
226770
|
var ExtensionFiles;
|
|
@@ -226798,7 +226832,7 @@ var require_getCredentials = __commonJS({
|
|
|
226798
226832
|
* @returns An instance of a class that implements ICredentialsProvider.
|
|
226799
226833
|
*/
|
|
226800
226834
|
static create(keyFilePath) {
|
|
226801
|
-
const keyFileExtension =
|
|
226835
|
+
const keyFileExtension = path95.extname(keyFilePath);
|
|
226802
226836
|
switch (keyFileExtension) {
|
|
226803
226837
|
case ExtensionFiles.JSON:
|
|
226804
226838
|
return new JsonCredentialsProvider(keyFilePath);
|
|
@@ -228407,12 +228441,12 @@ var require_filesubjecttokensupplier = __commonJS({
|
|
|
228407
228441
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
228408
228442
|
exports2.FileSubjectTokenSupplier = void 0;
|
|
228409
228443
|
var util_1 = __require("util");
|
|
228410
|
-
var
|
|
228411
|
-
var readFile15 = (0, util_1.promisify)(
|
|
228444
|
+
var fs78 = __require("fs");
|
|
228445
|
+
var readFile15 = (0, util_1.promisify)(fs78.readFile ?? (() => {
|
|
228412
228446
|
}));
|
|
228413
|
-
var realpath = (0, util_1.promisify)(
|
|
228447
|
+
var realpath = (0, util_1.promisify)(fs78.realpath ?? (() => {
|
|
228414
228448
|
}));
|
|
228415
|
-
var lstat = (0, util_1.promisify)(
|
|
228449
|
+
var lstat = (0, util_1.promisify)(fs78.lstat ?? (() => {
|
|
228416
228450
|
}));
|
|
228417
228451
|
var FileSubjectTokenSupplier = class {
|
|
228418
228452
|
filePath;
|
|
@@ -228530,7 +228564,7 @@ var require_certificatesubjecttokensupplier = __commonJS({
|
|
|
228530
228564
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
228531
228565
|
exports2.CertificateSubjectTokenSupplier = exports2.InvalidConfigurationError = exports2.CertificateSourceUnavailableError = exports2.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = void 0;
|
|
228532
228566
|
var util_1 = require_util2();
|
|
228533
|
-
var
|
|
228567
|
+
var fs78 = __require("fs");
|
|
228534
228568
|
var crypto_1 = __require("crypto");
|
|
228535
228569
|
var https2 = __require("https");
|
|
228536
228570
|
exports2.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = "GOOGLE_API_CERTIFICATE_CONFIG";
|
|
@@ -228624,7 +228658,7 @@ var require_certificatesubjecttokensupplier = __commonJS({
|
|
|
228624
228658
|
const configPath = this.certificateConfigPath;
|
|
228625
228659
|
let fileContents;
|
|
228626
228660
|
try {
|
|
228627
|
-
fileContents = await
|
|
228661
|
+
fileContents = await fs78.promises.readFile(configPath, "utf8");
|
|
228628
228662
|
} catch (err2) {
|
|
228629
228663
|
throw new CertificateSourceUnavailableError(`Failed to read certificate config file at: ${configPath}`);
|
|
228630
228664
|
}
|
|
@@ -228649,14 +228683,14 @@ var require_certificatesubjecttokensupplier = __commonJS({
|
|
|
228649
228683
|
async #getKeyAndCert(certPath, keyPath) {
|
|
228650
228684
|
let cert, key;
|
|
228651
228685
|
try {
|
|
228652
|
-
cert = await
|
|
228686
|
+
cert = await fs78.promises.readFile(certPath);
|
|
228653
228687
|
new crypto_1.X509Certificate(cert);
|
|
228654
228688
|
} catch (err2) {
|
|
228655
228689
|
const message = err2 instanceof Error ? err2.message : String(err2);
|
|
228656
228690
|
throw new CertificateSourceUnavailableError(`Failed to read certificate file at ${certPath}: ${message}`);
|
|
228657
228691
|
}
|
|
228658
228692
|
try {
|
|
228659
|
-
key = await
|
|
228693
|
+
key = await fs78.promises.readFile(keyPath);
|
|
228660
228694
|
(0, crypto_1.createPrivateKey)(key);
|
|
228661
228695
|
} catch (err2) {
|
|
228662
228696
|
const message = err2 instanceof Error ? err2.message : String(err2);
|
|
@@ -228675,7 +228709,7 @@ var require_certificatesubjecttokensupplier = __commonJS({
|
|
|
228675
228709
|
return JSON.stringify([leafCert.raw.toString("base64")]);
|
|
228676
228710
|
}
|
|
228677
228711
|
try {
|
|
228678
|
-
const chainPems = await
|
|
228712
|
+
const chainPems = await fs78.promises.readFile(this.trustChainPath, "utf8");
|
|
228679
228713
|
const pemBlocks = chainPems.match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g) ?? [];
|
|
228680
228714
|
const chainCerts = pemBlocks.map((pem, index2) => {
|
|
228681
228715
|
try {
|
|
@@ -229377,7 +229411,7 @@ var require_pluggable_auth_handler = __commonJS({
|
|
|
229377
229411
|
exports2.PluggableAuthHandler = exports2.ExecutableError = void 0;
|
|
229378
229412
|
var executable_response_1 = require_executable_response();
|
|
229379
229413
|
var childProcess = __require("child_process");
|
|
229380
|
-
var
|
|
229414
|
+
var fs78 = __require("fs");
|
|
229381
229415
|
var ExecutableError = class extends Error {
|
|
229382
229416
|
/**
|
|
229383
229417
|
* The exit code returned by the executable.
|
|
@@ -229462,14 +229496,14 @@ var require_pluggable_auth_handler = __commonJS({
|
|
|
229462
229496
|
}
|
|
229463
229497
|
let filePath;
|
|
229464
229498
|
try {
|
|
229465
|
-
filePath = await
|
|
229499
|
+
filePath = await fs78.promises.realpath(this.outputFile);
|
|
229466
229500
|
} catch {
|
|
229467
229501
|
return void 0;
|
|
229468
229502
|
}
|
|
229469
|
-
if (!(await
|
|
229503
|
+
if (!(await fs78.promises.lstat(filePath)).isFile()) {
|
|
229470
229504
|
return void 0;
|
|
229471
229505
|
}
|
|
229472
|
-
const responseString = await
|
|
229506
|
+
const responseString = await fs78.promises.readFile(filePath, {
|
|
229473
229507
|
encoding: "utf8"
|
|
229474
229508
|
});
|
|
229475
229509
|
if (responseString === "") {
|
|
@@ -229880,7 +229914,7 @@ var require_gdchclient = __commonJS({
|
|
|
229880
229914
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
229881
229915
|
exports2.GdchClient = exports2.GDCH_SERVICE_ACCOUNT_TYPE = void 0;
|
|
229882
229916
|
var crypto8 = __require("crypto");
|
|
229883
|
-
var
|
|
229917
|
+
var fs78 = __require("fs");
|
|
229884
229918
|
var https2 = __require("https");
|
|
229885
229919
|
var oauth2client_1 = require_oauth2client();
|
|
229886
229920
|
var DEFAULT_LIFETIME_IN_SECONDS = 3600;
|
|
@@ -230103,7 +230137,7 @@ var require_gdchclient = __commonJS({
|
|
|
230103
230137
|
const currentPath = this.caCertPath;
|
|
230104
230138
|
this.caAgentPromise = (async () => {
|
|
230105
230139
|
try {
|
|
230106
|
-
const ca2 = await
|
|
230140
|
+
const ca2 = await fs78.promises.readFile(currentPath);
|
|
230107
230141
|
return new https2.Agent({ ca: ca2 });
|
|
230108
230142
|
} catch (err2) {
|
|
230109
230143
|
if (this.cachedCaCertPath === currentPath) {
|
|
@@ -230163,11 +230197,11 @@ var require_googleauth = __commonJS({
|
|
|
230163
230197
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
230164
230198
|
exports2.GoogleAuth = exports2.GoogleAuthExceptionMessages = void 0;
|
|
230165
230199
|
var child_process_1 = __require("child_process");
|
|
230166
|
-
var
|
|
230200
|
+
var fs78 = __require("fs");
|
|
230167
230201
|
var gaxios_1 = require_src4();
|
|
230168
230202
|
var gcpMetadata = require_src6();
|
|
230169
230203
|
var os29 = __require("os");
|
|
230170
|
-
var
|
|
230204
|
+
var path95 = __require("path");
|
|
230171
230205
|
var crypto_1 = require_crypto3();
|
|
230172
230206
|
var computeclient_1 = require_computeclient();
|
|
230173
230207
|
var idtokenclient_1 = require_idtokenclient();
|
|
@@ -230452,20 +230486,20 @@ var require_googleauth = __commonJS({
|
|
|
230452
230486
|
if (!configDir) {
|
|
230453
230487
|
if (this._isWindows()) {
|
|
230454
230488
|
if (process.env["APPDATA"]) {
|
|
230455
|
-
configDir =
|
|
230489
|
+
configDir = path95.join(process.env["APPDATA"], "gcloud");
|
|
230456
230490
|
}
|
|
230457
230491
|
} else {
|
|
230458
230492
|
const home = process.env["HOME"];
|
|
230459
230493
|
if (home) {
|
|
230460
|
-
configDir =
|
|
230494
|
+
configDir = path95.join(home, ".config", "gcloud");
|
|
230461
230495
|
}
|
|
230462
230496
|
}
|
|
230463
230497
|
}
|
|
230464
230498
|
if (!configDir) {
|
|
230465
230499
|
return null;
|
|
230466
230500
|
}
|
|
230467
|
-
const location2 =
|
|
230468
|
-
if (!
|
|
230501
|
+
const location2 = path95.join(configDir, "application_default_credentials.json");
|
|
230502
|
+
if (!fs78.existsSync(location2)) {
|
|
230469
230503
|
return null;
|
|
230470
230504
|
}
|
|
230471
230505
|
const client2 = await this._getApplicationCredentialsFromFilePath(location2, options2);
|
|
@@ -230482,8 +230516,8 @@ var require_googleauth = __commonJS({
|
|
|
230482
230516
|
throw new Error("The file path is invalid.");
|
|
230483
230517
|
}
|
|
230484
230518
|
try {
|
|
230485
|
-
filePath =
|
|
230486
|
-
if (!
|
|
230519
|
+
filePath = fs78.realpathSync(filePath);
|
|
230520
|
+
if (!fs78.lstatSync(filePath).isFile()) {
|
|
230487
230521
|
throw new Error();
|
|
230488
230522
|
}
|
|
230489
230523
|
} catch (err2) {
|
|
@@ -230492,7 +230526,7 @@ var require_googleauth = __commonJS({
|
|
|
230492
230526
|
}
|
|
230493
230527
|
throw err2;
|
|
230494
230528
|
}
|
|
230495
|
-
const readStream =
|
|
230529
|
+
const readStream = fs78.createReadStream(filePath);
|
|
230496
230530
|
return this.fromStream(readStream, options2);
|
|
230497
230531
|
}
|
|
230498
230532
|
/**
|
|
@@ -230819,8 +230853,8 @@ var require_googleauth = __commonJS({
|
|
|
230819
230853
|
if (this.jsonContent) {
|
|
230820
230854
|
return this._cacheClientFromJSON(this.jsonContent, this.clientOptions);
|
|
230821
230855
|
} else if (this.keyFilename) {
|
|
230822
|
-
const filePath =
|
|
230823
|
-
const stream2 =
|
|
230856
|
+
const filePath = path95.resolve(this.keyFilename);
|
|
230857
|
+
const stream2 = fs78.createReadStream(filePath);
|
|
230824
230858
|
return await this.fromStreamAsync(stream2, this.clientOptions);
|
|
230825
230859
|
} else if (this.apiKey) {
|
|
230826
230860
|
const client2 = await this.fromAPIKey(this.apiKey, this.clientOptions);
|
|
@@ -247597,18 +247631,18 @@ function createAzure(options2 = {}) {
|
|
|
247597
247631
|
});
|
|
247598
247632
|
const apiVersion = (_a30 = options2.apiVersion) != null ? _a30 : "v1";
|
|
247599
247633
|
const useAzureOpenAIEndpoint = isAzureOpenAIBaseURL(options2.baseURL);
|
|
247600
|
-
const url2 = ({ path:
|
|
247634
|
+
const url2 = ({ path: path95, modelId }) => {
|
|
247601
247635
|
var _a211;
|
|
247602
247636
|
const baseUrlPrefix = withoutTrailingSlash(
|
|
247603
247637
|
(_a211 = options2.baseURL) != null ? _a211 : `https://${getResourceName()}.openai.azure.com/openai`
|
|
247604
247638
|
);
|
|
247605
247639
|
let fullUrl;
|
|
247606
247640
|
if (options2.useDeploymentBasedUrls) {
|
|
247607
|
-
fullUrl = new URL(`${baseUrlPrefix}/deployments/${modelId}${
|
|
247641
|
+
fullUrl = new URL(`${baseUrlPrefix}/deployments/${modelId}${path95}`);
|
|
247608
247642
|
} else if (!useAzureOpenAIEndpoint) {
|
|
247609
|
-
fullUrl = new URL(`${baseUrlPrefix}${
|
|
247643
|
+
fullUrl = new URL(`${baseUrlPrefix}${path95}`);
|
|
247610
247644
|
} else {
|
|
247611
|
-
fullUrl = new URL(`${baseUrlPrefix}/v1${
|
|
247645
|
+
fullUrl = new URL(`${baseUrlPrefix}/v1${path95}`);
|
|
247612
247646
|
}
|
|
247613
247647
|
if (useAzureOpenAIEndpoint || options2.useDeploymentBasedUrls) {
|
|
247614
247648
|
fullUrl.searchParams.set("api-version", apiVersion);
|
|
@@ -248118,8 +248152,8 @@ var init_parseUtil = __esm({
|
|
|
248118
248152
|
init_errors5();
|
|
248119
248153
|
init_en2();
|
|
248120
248154
|
makeIssue = (params) => {
|
|
248121
|
-
const { data, path:
|
|
248122
|
-
const fullPath = [...
|
|
248155
|
+
const { data, path: path95, errorMaps, issueData } = params;
|
|
248156
|
+
const fullPath = [...path95, ...issueData.path || []];
|
|
248123
248157
|
const fullIssue = {
|
|
248124
248158
|
...issueData,
|
|
248125
248159
|
path: fullPath
|
|
@@ -248399,11 +248433,11 @@ var init_types3 = __esm({
|
|
|
248399
248433
|
init_parseUtil();
|
|
248400
248434
|
init_util2();
|
|
248401
248435
|
ParseInputLazyPath = class {
|
|
248402
|
-
constructor(parent, value,
|
|
248436
|
+
constructor(parent, value, path95, key) {
|
|
248403
248437
|
this._cachedPath = [];
|
|
248404
248438
|
this.parent = parent;
|
|
248405
248439
|
this.data = value;
|
|
248406
|
-
this._path =
|
|
248440
|
+
this._path = path95;
|
|
248407
248441
|
this._key = key;
|
|
248408
248442
|
}
|
|
248409
248443
|
get path() {
|
|
@@ -253899,7 +253933,7 @@ function createOpenRouter(options2 = {}) {
|
|
|
253899
253933
|
);
|
|
253900
253934
|
const createChatModel = (modelId, settings = {}) => new OpenRouterChatLanguageModel(modelId, settings, {
|
|
253901
253935
|
provider: "openrouter.chat",
|
|
253902
|
-
url: ({ path:
|
|
253936
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
253903
253937
|
headers: getHeaders,
|
|
253904
253938
|
compatibility,
|
|
253905
253939
|
fetch: options2.fetch,
|
|
@@ -253907,7 +253941,7 @@ function createOpenRouter(options2 = {}) {
|
|
|
253907
253941
|
});
|
|
253908
253942
|
const createCompletionModel = (modelId, settings = {}) => new OpenRouterCompletionLanguageModel(modelId, settings, {
|
|
253909
253943
|
provider: "openrouter.completion",
|
|
253910
|
-
url: ({ path:
|
|
253944
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
253911
253945
|
headers: getHeaders,
|
|
253912
253946
|
compatibility,
|
|
253913
253947
|
fetch: options2.fetch,
|
|
@@ -253915,21 +253949,21 @@ function createOpenRouter(options2 = {}) {
|
|
|
253915
253949
|
});
|
|
253916
253950
|
const createEmbeddingModel = (modelId, settings = {}) => new OpenRouterEmbeddingModel(modelId, settings, {
|
|
253917
253951
|
provider: "openrouter.embedding",
|
|
253918
|
-
url: ({ path:
|
|
253952
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
253919
253953
|
headers: getHeaders,
|
|
253920
253954
|
fetch: options2.fetch,
|
|
253921
253955
|
extraBody: options2.extraBody
|
|
253922
253956
|
});
|
|
253923
253957
|
const createImageModel = (modelId, settings = {}) => new OpenRouterImageModel(modelId, settings, {
|
|
253924
253958
|
provider: "openrouter.image",
|
|
253925
|
-
url: ({ path:
|
|
253959
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
253926
253960
|
headers: getHeaders,
|
|
253927
253961
|
fetch: options2.fetch,
|
|
253928
253962
|
extraBody: options2.extraBody
|
|
253929
253963
|
});
|
|
253930
253964
|
const createVideoModel = (modelId, settings = {}) => new OpenRouterVideoModel(modelId, settings, {
|
|
253931
253965
|
provider: "openrouter.video",
|
|
253932
|
-
url: ({ path:
|
|
253966
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
253933
253967
|
headers: getHeaders,
|
|
253934
253968
|
fetch: options2.fetch,
|
|
253935
253969
|
extraBody: options2.extraBody
|
|
@@ -264647,14 +264681,14 @@ var init_readFile = __esm({
|
|
|
264647
264681
|
"node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/readFile.js"() {
|
|
264648
264682
|
filePromises = {};
|
|
264649
264683
|
fileIntercept = {};
|
|
264650
|
-
readFile8 = (
|
|
264651
|
-
if (fileIntercept[
|
|
264652
|
-
return fileIntercept[
|
|
264684
|
+
readFile8 = (path95, options2) => {
|
|
264685
|
+
if (fileIntercept[path95] !== void 0) {
|
|
264686
|
+
return fileIntercept[path95];
|
|
264653
264687
|
}
|
|
264654
|
-
if (!filePromises[
|
|
264655
|
-
filePromises[
|
|
264688
|
+
if (!filePromises[path95] || options2?.ignoreCache) {
|
|
264689
|
+
filePromises[path95] = fsReadFile(path95, "utf8");
|
|
264656
264690
|
}
|
|
264657
|
-
return filePromises[
|
|
264691
|
+
return filePromises[path95];
|
|
264658
264692
|
};
|
|
264659
264693
|
}
|
|
264660
264694
|
});
|
|
@@ -265077,8 +265111,8 @@ var init_createConfigValueProvider = __esm({
|
|
|
265077
265111
|
return endpoint2.url.href;
|
|
265078
265112
|
}
|
|
265079
265113
|
if ("hostname" in endpoint2) {
|
|
265080
|
-
const { protocol, hostname: hostname4, port, path:
|
|
265081
|
-
return `${protocol}//${hostname4}${port ? ":" + port : ""}${
|
|
265114
|
+
const { protocol, hostname: hostname4, port, path: path95 } = endpoint2;
|
|
265115
|
+
return `${protocol}//${hostname4}${port ? ":" + port : ""}${path95}`;
|
|
265082
265116
|
}
|
|
265083
265117
|
}
|
|
265084
265118
|
return endpoint2;
|
|
@@ -273761,8 +273795,8 @@ function formatSearchMatchPreview(payload, plainText) {
|
|
|
273761
273795
|
function formatReadFilePreview(content) {
|
|
273762
273796
|
const pathMatch = content.match(/^File:\s*(.+)$/m);
|
|
273763
273797
|
if (pathMatch) {
|
|
273764
|
-
const
|
|
273765
|
-
const short =
|
|
273798
|
+
const path95 = pathMatch[1].trim();
|
|
273799
|
+
const short = path95.length > 64 ? `\u2026${path95.slice(-61)}` : path95;
|
|
273766
273800
|
const linesMatch = content.match(/^Lines:\s*(.+)$/m);
|
|
273767
273801
|
if (linesMatch) {
|
|
273768
273802
|
return `Read ${short} \u2014 lines ${linesMatch[1].trim()}`;
|
|
@@ -273891,8 +273925,8 @@ function formatToolResultPreview(registryName, rawDetail, status) {
|
|
|
273891
273925
|
if (!envelope) return void 0;
|
|
273892
273926
|
if (status === "error" || envelope.error) {
|
|
273893
273927
|
const msg = envelope.error ?? extractShortField(envelope.payload) ?? "Tool failed";
|
|
273894
|
-
const
|
|
273895
|
-
return capPreview(
|
|
273928
|
+
const path95 = typeof envelope.payload.path === "string" && envelope.payload.path.trim() ? envelope.payload.path.trim() : void 0;
|
|
273929
|
+
return capPreview(path95 ? `${msg} (${path95})` : msg);
|
|
273896
273930
|
}
|
|
273897
273931
|
const payload = envelope.payload;
|
|
273898
273932
|
const plain = envelope.plainText;
|
|
@@ -273942,7 +273976,7 @@ function formatToolStartPreview(registryName, toolArgs) {
|
|
|
273942
273976
|
if (!toolArgs || typeof toolArgs !== "object") {
|
|
273943
273977
|
return getToolActivityLabel(registryName);
|
|
273944
273978
|
}
|
|
273945
|
-
const
|
|
273979
|
+
const path95 = typeof toolArgs.path === "string" && toolArgs.path.trim() || typeof toolArgs.file_path === "string" && toolArgs.file_path.trim() || typeof toolArgs.focus_path === "string" && toolArgs.focus_path.trim() || void 0;
|
|
273946
273980
|
const query = typeof toolArgs.query === "string" ? toolArgs.query.trim() : void 0;
|
|
273947
273981
|
const pattern = (registryName === "grep" || registryName === "glob") && typeof toolArgs.pattern === "string" ? toolArgs.pattern.trim() : void 0;
|
|
273948
273982
|
const command = typeof toolArgs.command === "string" ? toolArgs.command.trim() : void 0;
|
|
@@ -273951,8 +273985,8 @@ function formatToolStartPreview(registryName, toolArgs) {
|
|
|
273951
273985
|
const p2 = pattern.length > 56 ? `${pattern.slice(0, 53)}\u2026` : pattern;
|
|
273952
273986
|
return `${base}: ${p2}\u2026`;
|
|
273953
273987
|
}
|
|
273954
|
-
if (
|
|
273955
|
-
const short =
|
|
273988
|
+
if (path95) {
|
|
273989
|
+
const short = path95.length > 72 ? `${path95.slice(0, 69)}\u2026` : path95;
|
|
273956
273990
|
return `${base} (${short})\u2026`;
|
|
273957
273991
|
}
|
|
273958
273992
|
if (query) {
|
|
@@ -275851,6 +275885,14 @@ ${views.length} proposed file change(s). NOTHING has been written. Review each,
|
|
|
275851
275885
|
rec.error = outcome.error ?? "Sub-agent run failed";
|
|
275852
275886
|
}
|
|
275853
275887
|
rec.finishedAt = Date.now();
|
|
275888
|
+
} catch (err2) {
|
|
275889
|
+
const rec = taskStore.get(taskId);
|
|
275890
|
+
if (rec && !rec.cancelled && !rec.finishedAt) {
|
|
275891
|
+
rec.state = "error";
|
|
275892
|
+
rec.error = err2 instanceof Error ? err2.message : String(err2);
|
|
275893
|
+
rec.finishedAt = Date.now();
|
|
275894
|
+
}
|
|
275895
|
+
throw err2;
|
|
275854
275896
|
} finally {
|
|
275855
275897
|
if (proposalSetId && !keepProposals) deleteProposalSet(proposalSetId);
|
|
275856
275898
|
}
|
|
@@ -277366,24 +277408,24 @@ function errMessage(err2) {
|
|
|
277366
277408
|
return err2 instanceof Error ? err2.message : String(err2);
|
|
277367
277409
|
}
|
|
277368
277410
|
function readFileStructuredError(err2, displayPath2) {
|
|
277369
|
-
const
|
|
277411
|
+
const path95 = displayPath2;
|
|
277370
277412
|
const msg = errMessage(err2);
|
|
277371
277413
|
const code = nodeErrno(err2);
|
|
277372
277414
|
if (code === "ENOENT") {
|
|
277373
|
-
const p2 =
|
|
277415
|
+
const p2 = path95 ?? "requested path";
|
|
277374
277416
|
return {
|
|
277375
277417
|
success: false,
|
|
277376
277418
|
error: "file_not_found",
|
|
277377
|
-
path:
|
|
277419
|
+
path: path95,
|
|
277378
277420
|
message: `No file at path "${p2}". Use list_files or explore_folder to find the correct path.`
|
|
277379
277421
|
};
|
|
277380
277422
|
}
|
|
277381
277423
|
if (code === "EISDIR" || msg.includes("is a directory") || msg.toLowerCase().includes("not a file")) {
|
|
277382
|
-
const p2 =
|
|
277424
|
+
const p2 = path95 ?? "requested path";
|
|
277383
277425
|
return {
|
|
277384
277426
|
success: false,
|
|
277385
277427
|
error: "not_a_file",
|
|
277386
|
-
path:
|
|
277428
|
+
path: path95,
|
|
277387
277429
|
message: `Path "${p2}" is a directory, not a file. Use explore_folder or list_files.`
|
|
277388
277430
|
};
|
|
277389
277431
|
}
|
|
@@ -277391,7 +277433,7 @@ function readFileStructuredError(err2, displayPath2) {
|
|
|
277391
277433
|
return {
|
|
277392
277434
|
success: false,
|
|
277393
277435
|
error: "path_not_allowed",
|
|
277394
|
-
path:
|
|
277436
|
+
path: path95,
|
|
277395
277437
|
message: msg
|
|
277396
277438
|
};
|
|
277397
277439
|
}
|
|
@@ -277399,7 +277441,7 @@ function readFileStructuredError(err2, displayPath2) {
|
|
|
277399
277441
|
return {
|
|
277400
277442
|
success: false,
|
|
277401
277443
|
error: "path_not_allowed",
|
|
277402
|
-
path:
|
|
277444
|
+
path: path95,
|
|
277403
277445
|
message: msg
|
|
277404
277446
|
};
|
|
277405
277447
|
}
|
|
@@ -282834,12 +282876,12 @@ var init_hosting_tier = __esm({
|
|
|
282834
282876
|
});
|
|
282835
282877
|
|
|
282836
282878
|
// supabase/functions/_shared/relic-files.ts
|
|
282837
|
-
function contentTypeFor(
|
|
282838
|
-
const ext =
|
|
282879
|
+
function contentTypeFor(path95) {
|
|
282880
|
+
const ext = path95.split(".").pop()?.toLowerCase() ?? "";
|
|
282839
282881
|
return TYPES[ext] ?? null;
|
|
282840
282882
|
}
|
|
282841
|
-
function cleanRelicPath(
|
|
282842
|
-
const p2 =
|
|
282883
|
+
function cleanRelicPath(path95) {
|
|
282884
|
+
const p2 = path95.trim().replace(/\\/g, "/").replace(/^\.\//, "");
|
|
282843
282885
|
if (!p2 || p2.length > 200 || p2.startsWith("/")) return null;
|
|
282844
282886
|
if (!/^[A-Za-z0-9._\-/]+$/.test(p2)) return null;
|
|
282845
282887
|
if (p2.split("/").some((seg) => seg === "" || seg === "." || seg === "..")) return null;
|
|
@@ -282856,22 +282898,22 @@ function prepareRelicFiles(files) {
|
|
|
282856
282898
|
const seen3 = /* @__PURE__ */ new Set();
|
|
282857
282899
|
let total = 0;
|
|
282858
282900
|
for (const f5 of files) {
|
|
282859
|
-
const
|
|
282860
|
-
if (!
|
|
282861
|
-
if (seen3.has(
|
|
282862
|
-
seen3.add(
|
|
282863
|
-
const type2 = contentTypeFor(
|
|
282864
|
-
if (!type2) return { error: `${
|
|
282865
|
-
if (typeof f5.content !== "string") return { error: `${
|
|
282901
|
+
const path95 = typeof f5?.path === "string" ? cleanRelicPath(f5.path) : null;
|
|
282902
|
+
if (!path95) return { error: `Not a usable file path: ${JSON.stringify(f5?.path)}` };
|
|
282903
|
+
if (seen3.has(path95)) return { error: `${path95} appears twice.` };
|
|
282904
|
+
seen3.add(path95);
|
|
282905
|
+
const type2 = contentTypeFor(path95);
|
|
282906
|
+
if (!type2) return { error: `${path95}: that kind of file can't go in a relic.` };
|
|
282907
|
+
if (typeof f5.content !== "string") return { error: `${path95} has no content.` };
|
|
282866
282908
|
let bytes;
|
|
282867
282909
|
try {
|
|
282868
282910
|
bytes = f5.encoding === "base64" ? decodeBase64(f5.content) : new TextEncoder().encode(f5.content);
|
|
282869
282911
|
} catch {
|
|
282870
|
-
return { error: `${
|
|
282912
|
+
return { error: `${path95}: the base64 content doesn't decode.` };
|
|
282871
282913
|
}
|
|
282872
282914
|
total += bytes.length;
|
|
282873
282915
|
if (total > RELIC_LIMITS.maxBytes) return { error: `A relic can be at most ${RELIC_LIMITS.maxBytes / 1024 / 1024} MB.` };
|
|
282874
|
-
out.push({ path:
|
|
282916
|
+
out.push({ path: path95, bytes, contentType: type2 });
|
|
282875
282917
|
}
|
|
282876
282918
|
if (!seen3.has("index.html")) return { error: "A relic needs an index.html." };
|
|
282877
282919
|
return { files: out, bytes: total };
|
|
@@ -290462,32 +290504,32 @@ var require_URL = __commonJS({
|
|
|
290462
290504
|
else
|
|
290463
290505
|
return basepath.substring(0, lastslash + 1) + refpath;
|
|
290464
290506
|
}
|
|
290465
|
-
function remove_dot_segments(
|
|
290466
|
-
if (!
|
|
290507
|
+
function remove_dot_segments(path95) {
|
|
290508
|
+
if (!path95) return path95;
|
|
290467
290509
|
var output = "";
|
|
290468
|
-
while (
|
|
290469
|
-
if (
|
|
290470
|
-
|
|
290510
|
+
while (path95.length > 0) {
|
|
290511
|
+
if (path95 === "." || path95 === "..") {
|
|
290512
|
+
path95 = "";
|
|
290471
290513
|
break;
|
|
290472
290514
|
}
|
|
290473
|
-
var twochars =
|
|
290474
|
-
var threechars =
|
|
290475
|
-
var fourchars =
|
|
290515
|
+
var twochars = path95.substring(0, 2);
|
|
290516
|
+
var threechars = path95.substring(0, 3);
|
|
290517
|
+
var fourchars = path95.substring(0, 4);
|
|
290476
290518
|
if (threechars === "../") {
|
|
290477
|
-
|
|
290519
|
+
path95 = path95.substring(3);
|
|
290478
290520
|
} else if (twochars === "./") {
|
|
290479
|
-
|
|
290521
|
+
path95 = path95.substring(2);
|
|
290480
290522
|
} else if (threechars === "/./") {
|
|
290481
|
-
|
|
290482
|
-
} else if (twochars === "/." &&
|
|
290483
|
-
|
|
290484
|
-
} else if (fourchars === "/../" || threechars === "/.." &&
|
|
290485
|
-
|
|
290523
|
+
path95 = "/" + path95.substring(3);
|
|
290524
|
+
} else if (twochars === "/." && path95.length === 2) {
|
|
290525
|
+
path95 = "/";
|
|
290526
|
+
} else if (fourchars === "/../" || threechars === "/.." && path95.length === 3) {
|
|
290527
|
+
path95 = "/" + path95.substring(4);
|
|
290486
290528
|
output = output.replace(/\/?[^\/]*$/, "");
|
|
290487
290529
|
} else {
|
|
290488
|
-
var segment =
|
|
290530
|
+
var segment = path95.match(/(\/?([^\/]*))/)[0];
|
|
290489
290531
|
output += segment;
|
|
290490
|
-
|
|
290532
|
+
path95 = path95.substring(segment.length);
|
|
290491
290533
|
}
|
|
290492
290534
|
}
|
|
290493
290535
|
return output;
|
|
@@ -302760,7 +302802,7 @@ async function paidCoreForChat(chatId) {
|
|
|
302760
302802
|
balanceCents
|
|
302761
302803
|
});
|
|
302762
302804
|
}
|
|
302763
|
-
async function coreProxyPost(
|
|
302805
|
+
async function coreProxyPost(path95, body, opts = {}) {
|
|
302764
302806
|
const base = getCoreProxyBaseUrl();
|
|
302765
302807
|
if (!base) return null;
|
|
302766
302808
|
let token2 = getPinnedCoreToken();
|
|
@@ -302781,7 +302823,7 @@ async function coreProxyPost(path94, body, opts = {}) {
|
|
|
302781
302823
|
} else {
|
|
302782
302824
|
payload = body.form;
|
|
302783
302825
|
}
|
|
302784
|
-
return coreProxyFetch(`${base}${
|
|
302826
|
+
return coreProxyFetch(`${base}${path95}`, {
|
|
302785
302827
|
method: "POST",
|
|
302786
302828
|
headers,
|
|
302787
302829
|
body: payload,
|
|
@@ -307425,54 +307467,54 @@ var require_polyfills2 = __commonJS({
|
|
|
307425
307467
|
}
|
|
307426
307468
|
var chdir;
|
|
307427
307469
|
module2.exports = patch;
|
|
307428
|
-
function patch(
|
|
307470
|
+
function patch(fs78) {
|
|
307429
307471
|
if (constants2.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
307430
|
-
patchLchmod(
|
|
307431
|
-
}
|
|
307432
|
-
if (!
|
|
307433
|
-
patchLutimes(
|
|
307434
|
-
}
|
|
307435
|
-
|
|
307436
|
-
|
|
307437
|
-
|
|
307438
|
-
|
|
307439
|
-
|
|
307440
|
-
|
|
307441
|
-
|
|
307442
|
-
|
|
307443
|
-
|
|
307444
|
-
|
|
307445
|
-
|
|
307446
|
-
|
|
307447
|
-
|
|
307448
|
-
|
|
307449
|
-
|
|
307450
|
-
|
|
307451
|
-
|
|
307452
|
-
|
|
307453
|
-
if (
|
|
307454
|
-
|
|
307472
|
+
patchLchmod(fs78);
|
|
307473
|
+
}
|
|
307474
|
+
if (!fs78.lutimes) {
|
|
307475
|
+
patchLutimes(fs78);
|
|
307476
|
+
}
|
|
307477
|
+
fs78.chown = chownFix(fs78.chown);
|
|
307478
|
+
fs78.fchown = chownFix(fs78.fchown);
|
|
307479
|
+
fs78.lchown = chownFix(fs78.lchown);
|
|
307480
|
+
fs78.chmod = chmodFix(fs78.chmod);
|
|
307481
|
+
fs78.fchmod = chmodFix(fs78.fchmod);
|
|
307482
|
+
fs78.lchmod = chmodFix(fs78.lchmod);
|
|
307483
|
+
fs78.chownSync = chownFixSync(fs78.chownSync);
|
|
307484
|
+
fs78.fchownSync = chownFixSync(fs78.fchownSync);
|
|
307485
|
+
fs78.lchownSync = chownFixSync(fs78.lchownSync);
|
|
307486
|
+
fs78.chmodSync = chmodFixSync(fs78.chmodSync);
|
|
307487
|
+
fs78.fchmodSync = chmodFixSync(fs78.fchmodSync);
|
|
307488
|
+
fs78.lchmodSync = chmodFixSync(fs78.lchmodSync);
|
|
307489
|
+
fs78.stat = statFix(fs78.stat);
|
|
307490
|
+
fs78.fstat = statFix(fs78.fstat);
|
|
307491
|
+
fs78.lstat = statFix(fs78.lstat);
|
|
307492
|
+
fs78.statSync = statFixSync(fs78.statSync);
|
|
307493
|
+
fs78.fstatSync = statFixSync(fs78.fstatSync);
|
|
307494
|
+
fs78.lstatSync = statFixSync(fs78.lstatSync);
|
|
307495
|
+
if (fs78.chmod && !fs78.lchmod) {
|
|
307496
|
+
fs78.lchmod = function(path95, mode, cb2) {
|
|
307455
307497
|
if (cb2) process.nextTick(cb2);
|
|
307456
307498
|
};
|
|
307457
|
-
|
|
307499
|
+
fs78.lchmodSync = function() {
|
|
307458
307500
|
};
|
|
307459
307501
|
}
|
|
307460
|
-
if (
|
|
307461
|
-
|
|
307502
|
+
if (fs78.chown && !fs78.lchown) {
|
|
307503
|
+
fs78.lchown = function(path95, uid, gid, cb2) {
|
|
307462
307504
|
if (cb2) process.nextTick(cb2);
|
|
307463
307505
|
};
|
|
307464
|
-
|
|
307506
|
+
fs78.lchownSync = function() {
|
|
307465
307507
|
};
|
|
307466
307508
|
}
|
|
307467
307509
|
if (platform === "win32") {
|
|
307468
|
-
|
|
307510
|
+
fs78.rename = typeof fs78.rename !== "function" ? fs78.rename : (function(fs$rename) {
|
|
307469
307511
|
function rename5(from, to2, cb2) {
|
|
307470
307512
|
var start = Date.now();
|
|
307471
307513
|
var backoff = 0;
|
|
307472
307514
|
fs$rename(from, to2, function CB(er2) {
|
|
307473
307515
|
if (er2 && (er2.code === "EACCES" || er2.code === "EPERM" || er2.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
307474
307516
|
setTimeout(function() {
|
|
307475
|
-
|
|
307517
|
+
fs78.stat(to2, function(stater, st2) {
|
|
307476
307518
|
if (stater && stater.code === "ENOENT")
|
|
307477
307519
|
fs$rename(from, to2, CB);
|
|
307478
307520
|
else
|
|
@@ -307488,9 +307530,9 @@ var require_polyfills2 = __commonJS({
|
|
|
307488
307530
|
}
|
|
307489
307531
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename5, fs$rename);
|
|
307490
307532
|
return rename5;
|
|
307491
|
-
})(
|
|
307533
|
+
})(fs78.rename);
|
|
307492
307534
|
}
|
|
307493
|
-
|
|
307535
|
+
fs78.read = typeof fs78.read !== "function" ? fs78.read : (function(fs$read) {
|
|
307494
307536
|
function read(fd2, buffer, offset, length, position, callback_) {
|
|
307495
307537
|
var callback;
|
|
307496
307538
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -307498,22 +307540,22 @@ var require_polyfills2 = __commonJS({
|
|
|
307498
307540
|
callback = function(er2, _4, __) {
|
|
307499
307541
|
if (er2 && er2.code === "EAGAIN" && eagCounter < 10) {
|
|
307500
307542
|
eagCounter++;
|
|
307501
|
-
return fs$read.call(
|
|
307543
|
+
return fs$read.call(fs78, fd2, buffer, offset, length, position, callback);
|
|
307502
307544
|
}
|
|
307503
307545
|
callback_.apply(this, arguments);
|
|
307504
307546
|
};
|
|
307505
307547
|
}
|
|
307506
|
-
return fs$read.call(
|
|
307548
|
+
return fs$read.call(fs78, fd2, buffer, offset, length, position, callback);
|
|
307507
307549
|
}
|
|
307508
307550
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
307509
307551
|
return read;
|
|
307510
|
-
})(
|
|
307511
|
-
|
|
307552
|
+
})(fs78.read);
|
|
307553
|
+
fs78.readSync = typeof fs78.readSync !== "function" ? fs78.readSync : /* @__PURE__ */ (function(fs$readSync) {
|
|
307512
307554
|
return function(fd2, buffer, offset, length, position) {
|
|
307513
307555
|
var eagCounter = 0;
|
|
307514
307556
|
while (true) {
|
|
307515
307557
|
try {
|
|
307516
|
-
return fs$readSync.call(
|
|
307558
|
+
return fs$readSync.call(fs78, fd2, buffer, offset, length, position);
|
|
307517
307559
|
} catch (er2) {
|
|
307518
307560
|
if (er2.code === "EAGAIN" && eagCounter < 10) {
|
|
307519
307561
|
eagCounter++;
|
|
@@ -307523,11 +307565,11 @@ var require_polyfills2 = __commonJS({
|
|
|
307523
307565
|
}
|
|
307524
307566
|
}
|
|
307525
307567
|
};
|
|
307526
|
-
})(
|
|
307527
|
-
function patchLchmod(
|
|
307528
|
-
|
|
307529
|
-
|
|
307530
|
-
|
|
307568
|
+
})(fs78.readSync);
|
|
307569
|
+
function patchLchmod(fs79) {
|
|
307570
|
+
fs79.lchmod = function(path95, mode, callback) {
|
|
307571
|
+
fs79.open(
|
|
307572
|
+
path95,
|
|
307531
307573
|
constants2.O_WRONLY | constants2.O_SYMLINK,
|
|
307532
307574
|
mode,
|
|
307533
307575
|
function(err2, fd2) {
|
|
@@ -307535,80 +307577,80 @@ var require_polyfills2 = __commonJS({
|
|
|
307535
307577
|
if (callback) callback(err2);
|
|
307536
307578
|
return;
|
|
307537
307579
|
}
|
|
307538
|
-
|
|
307539
|
-
|
|
307580
|
+
fs79.fchmod(fd2, mode, function(err3) {
|
|
307581
|
+
fs79.close(fd2, function(err22) {
|
|
307540
307582
|
if (callback) callback(err3 || err22);
|
|
307541
307583
|
});
|
|
307542
307584
|
});
|
|
307543
307585
|
}
|
|
307544
307586
|
);
|
|
307545
307587
|
};
|
|
307546
|
-
|
|
307547
|
-
var fd2 =
|
|
307588
|
+
fs79.lchmodSync = function(path95, mode) {
|
|
307589
|
+
var fd2 = fs79.openSync(path95, constants2.O_WRONLY | constants2.O_SYMLINK, mode);
|
|
307548
307590
|
var threw = true;
|
|
307549
307591
|
var ret2;
|
|
307550
307592
|
try {
|
|
307551
|
-
ret2 =
|
|
307593
|
+
ret2 = fs79.fchmodSync(fd2, mode);
|
|
307552
307594
|
threw = false;
|
|
307553
307595
|
} finally {
|
|
307554
307596
|
if (threw) {
|
|
307555
307597
|
try {
|
|
307556
|
-
|
|
307598
|
+
fs79.closeSync(fd2);
|
|
307557
307599
|
} catch (er2) {
|
|
307558
307600
|
}
|
|
307559
307601
|
} else {
|
|
307560
|
-
|
|
307602
|
+
fs79.closeSync(fd2);
|
|
307561
307603
|
}
|
|
307562
307604
|
}
|
|
307563
307605
|
return ret2;
|
|
307564
307606
|
};
|
|
307565
307607
|
}
|
|
307566
|
-
function patchLutimes(
|
|
307567
|
-
if (constants2.hasOwnProperty("O_SYMLINK") &&
|
|
307568
|
-
|
|
307569
|
-
|
|
307608
|
+
function patchLutimes(fs79) {
|
|
307609
|
+
if (constants2.hasOwnProperty("O_SYMLINK") && fs79.futimes) {
|
|
307610
|
+
fs79.lutimes = function(path95, at2, mt2, cb2) {
|
|
307611
|
+
fs79.open(path95, constants2.O_SYMLINK, function(er2, fd2) {
|
|
307570
307612
|
if (er2) {
|
|
307571
307613
|
if (cb2) cb2(er2);
|
|
307572
307614
|
return;
|
|
307573
307615
|
}
|
|
307574
|
-
|
|
307575
|
-
|
|
307616
|
+
fs79.futimes(fd2, at2, mt2, function(er3) {
|
|
307617
|
+
fs79.close(fd2, function(er22) {
|
|
307576
307618
|
if (cb2) cb2(er3 || er22);
|
|
307577
307619
|
});
|
|
307578
307620
|
});
|
|
307579
307621
|
});
|
|
307580
307622
|
};
|
|
307581
|
-
|
|
307582
|
-
var fd2 =
|
|
307623
|
+
fs79.lutimesSync = function(path95, at2, mt2) {
|
|
307624
|
+
var fd2 = fs79.openSync(path95, constants2.O_SYMLINK);
|
|
307583
307625
|
var ret2;
|
|
307584
307626
|
var threw = true;
|
|
307585
307627
|
try {
|
|
307586
|
-
ret2 =
|
|
307628
|
+
ret2 = fs79.futimesSync(fd2, at2, mt2);
|
|
307587
307629
|
threw = false;
|
|
307588
307630
|
} finally {
|
|
307589
307631
|
if (threw) {
|
|
307590
307632
|
try {
|
|
307591
|
-
|
|
307633
|
+
fs79.closeSync(fd2);
|
|
307592
307634
|
} catch (er2) {
|
|
307593
307635
|
}
|
|
307594
307636
|
} else {
|
|
307595
|
-
|
|
307637
|
+
fs79.closeSync(fd2);
|
|
307596
307638
|
}
|
|
307597
307639
|
}
|
|
307598
307640
|
return ret2;
|
|
307599
307641
|
};
|
|
307600
|
-
} else if (
|
|
307601
|
-
|
|
307642
|
+
} else if (fs79.futimes) {
|
|
307643
|
+
fs79.lutimes = function(_a30, _b21, _c, cb2) {
|
|
307602
307644
|
if (cb2) process.nextTick(cb2);
|
|
307603
307645
|
};
|
|
307604
|
-
|
|
307646
|
+
fs79.lutimesSync = function() {
|
|
307605
307647
|
};
|
|
307606
307648
|
}
|
|
307607
307649
|
}
|
|
307608
307650
|
function chmodFix(orig) {
|
|
307609
307651
|
if (!orig) return orig;
|
|
307610
307652
|
return function(target, mode, cb2) {
|
|
307611
|
-
return orig.call(
|
|
307653
|
+
return orig.call(fs78, target, mode, function(er2) {
|
|
307612
307654
|
if (chownErOk(er2)) er2 = null;
|
|
307613
307655
|
if (cb2) cb2.apply(this, arguments);
|
|
307614
307656
|
});
|
|
@@ -307618,7 +307660,7 @@ var require_polyfills2 = __commonJS({
|
|
|
307618
307660
|
if (!orig) return orig;
|
|
307619
307661
|
return function(target, mode) {
|
|
307620
307662
|
try {
|
|
307621
|
-
return orig.call(
|
|
307663
|
+
return orig.call(fs78, target, mode);
|
|
307622
307664
|
} catch (er2) {
|
|
307623
307665
|
if (!chownErOk(er2)) throw er2;
|
|
307624
307666
|
}
|
|
@@ -307627,7 +307669,7 @@ var require_polyfills2 = __commonJS({
|
|
|
307627
307669
|
function chownFix(orig) {
|
|
307628
307670
|
if (!orig) return orig;
|
|
307629
307671
|
return function(target, uid, gid, cb2) {
|
|
307630
|
-
return orig.call(
|
|
307672
|
+
return orig.call(fs78, target, uid, gid, function(er2) {
|
|
307631
307673
|
if (chownErOk(er2)) er2 = null;
|
|
307632
307674
|
if (cb2) cb2.apply(this, arguments);
|
|
307633
307675
|
});
|
|
@@ -307637,7 +307679,7 @@ var require_polyfills2 = __commonJS({
|
|
|
307637
307679
|
if (!orig) return orig;
|
|
307638
307680
|
return function(target, uid, gid) {
|
|
307639
307681
|
try {
|
|
307640
|
-
return orig.call(
|
|
307682
|
+
return orig.call(fs78, target, uid, gid);
|
|
307641
307683
|
} catch (er2) {
|
|
307642
307684
|
if (!chownErOk(er2)) throw er2;
|
|
307643
307685
|
}
|
|
@@ -307657,13 +307699,13 @@ var require_polyfills2 = __commonJS({
|
|
|
307657
307699
|
}
|
|
307658
307700
|
if (cb2) cb2.apply(this, arguments);
|
|
307659
307701
|
}
|
|
307660
|
-
return options2 ? orig.call(
|
|
307702
|
+
return options2 ? orig.call(fs78, target, options2, callback) : orig.call(fs78, target, callback);
|
|
307661
307703
|
};
|
|
307662
307704
|
}
|
|
307663
307705
|
function statFixSync(orig) {
|
|
307664
307706
|
if (!orig) return orig;
|
|
307665
307707
|
return function(target, options2) {
|
|
307666
|
-
var stats = options2 ? orig.call(
|
|
307708
|
+
var stats = options2 ? orig.call(fs78, target, options2) : orig.call(fs78, target);
|
|
307667
307709
|
if (stats) {
|
|
307668
307710
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
307669
307711
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -307692,16 +307734,16 @@ var require_legacy_streams = __commonJS({
|
|
|
307692
307734
|
"node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
307693
307735
|
var Stream5 = __require("stream").Stream;
|
|
307694
307736
|
module2.exports = legacy2;
|
|
307695
|
-
function legacy2(
|
|
307737
|
+
function legacy2(fs78) {
|
|
307696
307738
|
return {
|
|
307697
307739
|
ReadStream: ReadStream2,
|
|
307698
307740
|
WriteStream
|
|
307699
307741
|
};
|
|
307700
|
-
function ReadStream2(
|
|
307701
|
-
if (!(this instanceof ReadStream2)) return new ReadStream2(
|
|
307742
|
+
function ReadStream2(path95, options2) {
|
|
307743
|
+
if (!(this instanceof ReadStream2)) return new ReadStream2(path95, options2);
|
|
307702
307744
|
Stream5.call(this);
|
|
307703
307745
|
var self2 = this;
|
|
307704
|
-
this.path =
|
|
307746
|
+
this.path = path95;
|
|
307705
307747
|
this.fd = null;
|
|
307706
307748
|
this.readable = true;
|
|
307707
307749
|
this.paused = false;
|
|
@@ -307735,7 +307777,7 @@ var require_legacy_streams = __commonJS({
|
|
|
307735
307777
|
});
|
|
307736
307778
|
return;
|
|
307737
307779
|
}
|
|
307738
|
-
|
|
307780
|
+
fs78.open(this.path, this.flags, this.mode, function(err2, fd2) {
|
|
307739
307781
|
if (err2) {
|
|
307740
307782
|
self2.emit("error", err2);
|
|
307741
307783
|
self2.readable = false;
|
|
@@ -307746,10 +307788,10 @@ var require_legacy_streams = __commonJS({
|
|
|
307746
307788
|
self2._read();
|
|
307747
307789
|
});
|
|
307748
307790
|
}
|
|
307749
|
-
function WriteStream(
|
|
307750
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
307791
|
+
function WriteStream(path95, options2) {
|
|
307792
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path95, options2);
|
|
307751
307793
|
Stream5.call(this);
|
|
307752
|
-
this.path =
|
|
307794
|
+
this.path = path95;
|
|
307753
307795
|
this.fd = null;
|
|
307754
307796
|
this.writable = true;
|
|
307755
307797
|
this.flags = "w";
|
|
@@ -307774,7 +307816,7 @@ var require_legacy_streams = __commonJS({
|
|
|
307774
307816
|
this.busy = false;
|
|
307775
307817
|
this._queue = [];
|
|
307776
307818
|
if (this.fd === null) {
|
|
307777
|
-
this._open =
|
|
307819
|
+
this._open = fs78.open;
|
|
307778
307820
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
307779
307821
|
this.flush();
|
|
307780
307822
|
}
|
|
@@ -307809,7 +307851,7 @@ var require_clone = __commonJS({
|
|
|
307809
307851
|
// node_modules/graceful-fs/graceful-fs.js
|
|
307810
307852
|
var require_graceful_fs = __commonJS({
|
|
307811
307853
|
"node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
307812
|
-
var
|
|
307854
|
+
var fs78 = __require("fs");
|
|
307813
307855
|
var polyfills = require_polyfills2();
|
|
307814
307856
|
var legacy2 = require_legacy_streams();
|
|
307815
307857
|
var clone4 = require_clone();
|
|
@@ -307841,12 +307883,12 @@ var require_graceful_fs = __commonJS({
|
|
|
307841
307883
|
m3 = "GFS4: " + m3.split(/\n/).join("\nGFS4: ");
|
|
307842
307884
|
console.error(m3);
|
|
307843
307885
|
};
|
|
307844
|
-
if (!
|
|
307886
|
+
if (!fs78[gracefulQueue]) {
|
|
307845
307887
|
queue2 = global[gracefulQueue] || [];
|
|
307846
|
-
publishQueue(
|
|
307847
|
-
|
|
307888
|
+
publishQueue(fs78, queue2);
|
|
307889
|
+
fs78.close = (function(fs$close) {
|
|
307848
307890
|
function close(fd2, cb2) {
|
|
307849
|
-
return fs$close.call(
|
|
307891
|
+
return fs$close.call(fs78, fd2, function(err2) {
|
|
307850
307892
|
if (!err2) {
|
|
307851
307893
|
resetQueue();
|
|
307852
307894
|
}
|
|
@@ -307858,48 +307900,48 @@ var require_graceful_fs = __commonJS({
|
|
|
307858
307900
|
value: fs$close
|
|
307859
307901
|
});
|
|
307860
307902
|
return close;
|
|
307861
|
-
})(
|
|
307862
|
-
|
|
307903
|
+
})(fs78.close);
|
|
307904
|
+
fs78.closeSync = (function(fs$closeSync) {
|
|
307863
307905
|
function closeSync(fd2) {
|
|
307864
|
-
fs$closeSync.apply(
|
|
307906
|
+
fs$closeSync.apply(fs78, arguments);
|
|
307865
307907
|
resetQueue();
|
|
307866
307908
|
}
|
|
307867
307909
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
307868
307910
|
value: fs$closeSync
|
|
307869
307911
|
});
|
|
307870
307912
|
return closeSync;
|
|
307871
|
-
})(
|
|
307913
|
+
})(fs78.closeSync);
|
|
307872
307914
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
307873
307915
|
process.on("exit", function() {
|
|
307874
|
-
debug(
|
|
307875
|
-
__require("assert").equal(
|
|
307916
|
+
debug(fs78[gracefulQueue]);
|
|
307917
|
+
__require("assert").equal(fs78[gracefulQueue].length, 0);
|
|
307876
307918
|
});
|
|
307877
307919
|
}
|
|
307878
307920
|
}
|
|
307879
307921
|
var queue2;
|
|
307880
307922
|
if (!global[gracefulQueue]) {
|
|
307881
|
-
publishQueue(global,
|
|
307882
|
-
}
|
|
307883
|
-
module2.exports = patch(clone4(
|
|
307884
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
307885
|
-
module2.exports = patch(
|
|
307886
|
-
|
|
307887
|
-
}
|
|
307888
|
-
function patch(
|
|
307889
|
-
polyfills(
|
|
307890
|
-
|
|
307891
|
-
|
|
307892
|
-
|
|
307893
|
-
var fs$readFile =
|
|
307894
|
-
|
|
307895
|
-
function readFile15(
|
|
307923
|
+
publishQueue(global, fs78[gracefulQueue]);
|
|
307924
|
+
}
|
|
307925
|
+
module2.exports = patch(clone4(fs78));
|
|
307926
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs78.__patched) {
|
|
307927
|
+
module2.exports = patch(fs78);
|
|
307928
|
+
fs78.__patched = true;
|
|
307929
|
+
}
|
|
307930
|
+
function patch(fs79) {
|
|
307931
|
+
polyfills(fs79);
|
|
307932
|
+
fs79.gracefulify = patch;
|
|
307933
|
+
fs79.createReadStream = createReadStream3;
|
|
307934
|
+
fs79.createWriteStream = createWriteStream;
|
|
307935
|
+
var fs$readFile = fs79.readFile;
|
|
307936
|
+
fs79.readFile = readFile15;
|
|
307937
|
+
function readFile15(path95, options2, cb2) {
|
|
307896
307938
|
if (typeof options2 === "function")
|
|
307897
307939
|
cb2 = options2, options2 = null;
|
|
307898
|
-
return go$readFile(
|
|
307899
|
-
function go$readFile(
|
|
307900
|
-
return fs$readFile(
|
|
307940
|
+
return go$readFile(path95, options2, cb2);
|
|
307941
|
+
function go$readFile(path96, options3, cb3, startTime) {
|
|
307942
|
+
return fs$readFile(path96, options3, function(err2) {
|
|
307901
307943
|
if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
|
|
307902
|
-
enqueue([go$readFile, [
|
|
307944
|
+
enqueue([go$readFile, [path96, options3, cb3], err2, startTime || Date.now(), Date.now()]);
|
|
307903
307945
|
else {
|
|
307904
307946
|
if (typeof cb3 === "function")
|
|
307905
307947
|
cb3.apply(this, arguments);
|
|
@@ -307907,16 +307949,16 @@ var require_graceful_fs = __commonJS({
|
|
|
307907
307949
|
});
|
|
307908
307950
|
}
|
|
307909
307951
|
}
|
|
307910
|
-
var fs$writeFile =
|
|
307911
|
-
|
|
307912
|
-
function writeFile11(
|
|
307952
|
+
var fs$writeFile = fs79.writeFile;
|
|
307953
|
+
fs79.writeFile = writeFile11;
|
|
307954
|
+
function writeFile11(path95, data, options2, cb2) {
|
|
307913
307955
|
if (typeof options2 === "function")
|
|
307914
307956
|
cb2 = options2, options2 = null;
|
|
307915
|
-
return go$writeFile(
|
|
307916
|
-
function go$writeFile(
|
|
307917
|
-
return fs$writeFile(
|
|
307957
|
+
return go$writeFile(path95, data, options2, cb2);
|
|
307958
|
+
function go$writeFile(path96, data2, options3, cb3, startTime) {
|
|
307959
|
+
return fs$writeFile(path96, data2, options3, function(err2) {
|
|
307918
307960
|
if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
|
|
307919
|
-
enqueue([go$writeFile, [
|
|
307961
|
+
enqueue([go$writeFile, [path96, data2, options3, cb3], err2, startTime || Date.now(), Date.now()]);
|
|
307920
307962
|
else {
|
|
307921
307963
|
if (typeof cb3 === "function")
|
|
307922
307964
|
cb3.apply(this, arguments);
|
|
@@ -307924,17 +307966,17 @@ var require_graceful_fs = __commonJS({
|
|
|
307924
307966
|
});
|
|
307925
307967
|
}
|
|
307926
307968
|
}
|
|
307927
|
-
var fs$appendFile =
|
|
307969
|
+
var fs$appendFile = fs79.appendFile;
|
|
307928
307970
|
if (fs$appendFile)
|
|
307929
|
-
|
|
307930
|
-
function appendFile(
|
|
307971
|
+
fs79.appendFile = appendFile;
|
|
307972
|
+
function appendFile(path95, data, options2, cb2) {
|
|
307931
307973
|
if (typeof options2 === "function")
|
|
307932
307974
|
cb2 = options2, options2 = null;
|
|
307933
|
-
return go$appendFile(
|
|
307934
|
-
function go$appendFile(
|
|
307935
|
-
return fs$appendFile(
|
|
307975
|
+
return go$appendFile(path95, data, options2, cb2);
|
|
307976
|
+
function go$appendFile(path96, data2, options3, cb3, startTime) {
|
|
307977
|
+
return fs$appendFile(path96, data2, options3, function(err2) {
|
|
307936
307978
|
if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
|
|
307937
|
-
enqueue([go$appendFile, [
|
|
307979
|
+
enqueue([go$appendFile, [path96, data2, options3, cb3], err2, startTime || Date.now(), Date.now()]);
|
|
307938
307980
|
else {
|
|
307939
307981
|
if (typeof cb3 === "function")
|
|
307940
307982
|
cb3.apply(this, arguments);
|
|
@@ -307942,9 +307984,9 @@ var require_graceful_fs = __commonJS({
|
|
|
307942
307984
|
});
|
|
307943
307985
|
}
|
|
307944
307986
|
}
|
|
307945
|
-
var fs$copyFile =
|
|
307987
|
+
var fs$copyFile = fs79.copyFile;
|
|
307946
307988
|
if (fs$copyFile)
|
|
307947
|
-
|
|
307989
|
+
fs79.copyFile = copyFile;
|
|
307948
307990
|
function copyFile(src, dest, flags, cb2) {
|
|
307949
307991
|
if (typeof flags === "function") {
|
|
307950
307992
|
cb2 = flags;
|
|
@@ -307962,34 +308004,34 @@ var require_graceful_fs = __commonJS({
|
|
|
307962
308004
|
});
|
|
307963
308005
|
}
|
|
307964
308006
|
}
|
|
307965
|
-
var fs$readdir =
|
|
307966
|
-
|
|
308007
|
+
var fs$readdir = fs79.readdir;
|
|
308008
|
+
fs79.readdir = readdir3;
|
|
307967
308009
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
307968
|
-
function readdir3(
|
|
308010
|
+
function readdir3(path95, options2, cb2) {
|
|
307969
308011
|
if (typeof options2 === "function")
|
|
307970
308012
|
cb2 = options2, options2 = null;
|
|
307971
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
307972
|
-
return fs$readdir(
|
|
307973
|
-
|
|
308013
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path96, options3, cb3, startTime) {
|
|
308014
|
+
return fs$readdir(path96, fs$readdirCallback(
|
|
308015
|
+
path96,
|
|
307974
308016
|
options3,
|
|
307975
308017
|
cb3,
|
|
307976
308018
|
startTime
|
|
307977
308019
|
));
|
|
307978
|
-
} : function go$readdir2(
|
|
307979
|
-
return fs$readdir(
|
|
307980
|
-
|
|
308020
|
+
} : function go$readdir2(path96, options3, cb3, startTime) {
|
|
308021
|
+
return fs$readdir(path96, options3, fs$readdirCallback(
|
|
308022
|
+
path96,
|
|
307981
308023
|
options3,
|
|
307982
308024
|
cb3,
|
|
307983
308025
|
startTime
|
|
307984
308026
|
));
|
|
307985
308027
|
};
|
|
307986
|
-
return go$readdir(
|
|
307987
|
-
function fs$readdirCallback(
|
|
308028
|
+
return go$readdir(path95, options2, cb2);
|
|
308029
|
+
function fs$readdirCallback(path96, options3, cb3, startTime) {
|
|
307988
308030
|
return function(err2, files) {
|
|
307989
308031
|
if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
|
|
307990
308032
|
enqueue([
|
|
307991
308033
|
go$readdir,
|
|
307992
|
-
[
|
|
308034
|
+
[path96, options3, cb3],
|
|
307993
308035
|
err2,
|
|
307994
308036
|
startTime || Date.now(),
|
|
307995
308037
|
Date.now()
|
|
@@ -308004,21 +308046,21 @@ var require_graceful_fs = __commonJS({
|
|
|
308004
308046
|
}
|
|
308005
308047
|
}
|
|
308006
308048
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
308007
|
-
var legStreams = legacy2(
|
|
308049
|
+
var legStreams = legacy2(fs79);
|
|
308008
308050
|
ReadStream2 = legStreams.ReadStream;
|
|
308009
308051
|
WriteStream = legStreams.WriteStream;
|
|
308010
308052
|
}
|
|
308011
|
-
var fs$ReadStream =
|
|
308053
|
+
var fs$ReadStream = fs79.ReadStream;
|
|
308012
308054
|
if (fs$ReadStream) {
|
|
308013
308055
|
ReadStream2.prototype = Object.create(fs$ReadStream.prototype);
|
|
308014
308056
|
ReadStream2.prototype.open = ReadStream$open;
|
|
308015
308057
|
}
|
|
308016
|
-
var fs$WriteStream =
|
|
308058
|
+
var fs$WriteStream = fs79.WriteStream;
|
|
308017
308059
|
if (fs$WriteStream) {
|
|
308018
308060
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
308019
308061
|
WriteStream.prototype.open = WriteStream$open;
|
|
308020
308062
|
}
|
|
308021
|
-
Object.defineProperty(
|
|
308063
|
+
Object.defineProperty(fs79, "ReadStream", {
|
|
308022
308064
|
get: function() {
|
|
308023
308065
|
return ReadStream2;
|
|
308024
308066
|
},
|
|
@@ -308028,7 +308070,7 @@ var require_graceful_fs = __commonJS({
|
|
|
308028
308070
|
enumerable: true,
|
|
308029
308071
|
configurable: true
|
|
308030
308072
|
});
|
|
308031
|
-
Object.defineProperty(
|
|
308073
|
+
Object.defineProperty(fs79, "WriteStream", {
|
|
308032
308074
|
get: function() {
|
|
308033
308075
|
return WriteStream;
|
|
308034
308076
|
},
|
|
@@ -308039,7 +308081,7 @@ var require_graceful_fs = __commonJS({
|
|
|
308039
308081
|
configurable: true
|
|
308040
308082
|
});
|
|
308041
308083
|
var FileReadStream = ReadStream2;
|
|
308042
|
-
Object.defineProperty(
|
|
308084
|
+
Object.defineProperty(fs79, "FileReadStream", {
|
|
308043
308085
|
get: function() {
|
|
308044
308086
|
return FileReadStream;
|
|
308045
308087
|
},
|
|
@@ -308050,7 +308092,7 @@ var require_graceful_fs = __commonJS({
|
|
|
308050
308092
|
configurable: true
|
|
308051
308093
|
});
|
|
308052
308094
|
var FileWriteStream = WriteStream;
|
|
308053
|
-
Object.defineProperty(
|
|
308095
|
+
Object.defineProperty(fs79, "FileWriteStream", {
|
|
308054
308096
|
get: function() {
|
|
308055
308097
|
return FileWriteStream;
|
|
308056
308098
|
},
|
|
@@ -308060,7 +308102,7 @@ var require_graceful_fs = __commonJS({
|
|
|
308060
308102
|
enumerable: true,
|
|
308061
308103
|
configurable: true
|
|
308062
308104
|
});
|
|
308063
|
-
function ReadStream2(
|
|
308105
|
+
function ReadStream2(path95, options2) {
|
|
308064
308106
|
if (this instanceof ReadStream2)
|
|
308065
308107
|
return fs$ReadStream.apply(this, arguments), this;
|
|
308066
308108
|
else
|
|
@@ -308080,7 +308122,7 @@ var require_graceful_fs = __commonJS({
|
|
|
308080
308122
|
}
|
|
308081
308123
|
});
|
|
308082
308124
|
}
|
|
308083
|
-
function WriteStream(
|
|
308125
|
+
function WriteStream(path95, options2) {
|
|
308084
308126
|
if (this instanceof WriteStream)
|
|
308085
308127
|
return fs$WriteStream.apply(this, arguments), this;
|
|
308086
308128
|
else
|
|
@@ -308098,22 +308140,22 @@ var require_graceful_fs = __commonJS({
|
|
|
308098
308140
|
}
|
|
308099
308141
|
});
|
|
308100
308142
|
}
|
|
308101
|
-
function createReadStream3(
|
|
308102
|
-
return new
|
|
308143
|
+
function createReadStream3(path95, options2) {
|
|
308144
|
+
return new fs79.ReadStream(path95, options2);
|
|
308103
308145
|
}
|
|
308104
|
-
function createWriteStream(
|
|
308105
|
-
return new
|
|
308146
|
+
function createWriteStream(path95, options2) {
|
|
308147
|
+
return new fs79.WriteStream(path95, options2);
|
|
308106
308148
|
}
|
|
308107
|
-
var fs$open =
|
|
308108
|
-
|
|
308109
|
-
function open(
|
|
308149
|
+
var fs$open = fs79.open;
|
|
308150
|
+
fs79.open = open;
|
|
308151
|
+
function open(path95, flags, mode, cb2) {
|
|
308110
308152
|
if (typeof mode === "function")
|
|
308111
308153
|
cb2 = mode, mode = null;
|
|
308112
|
-
return go$open(
|
|
308113
|
-
function go$open(
|
|
308114
|
-
return fs$open(
|
|
308154
|
+
return go$open(path95, flags, mode, cb2);
|
|
308155
|
+
function go$open(path96, flags2, mode2, cb3, startTime) {
|
|
308156
|
+
return fs$open(path96, flags2, mode2, function(err2, fd2) {
|
|
308115
308157
|
if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
|
|
308116
|
-
enqueue([go$open, [
|
|
308158
|
+
enqueue([go$open, [path96, flags2, mode2, cb3], err2, startTime || Date.now(), Date.now()]);
|
|
308117
308159
|
else {
|
|
308118
308160
|
if (typeof cb3 === "function")
|
|
308119
308161
|
cb3.apply(this, arguments);
|
|
@@ -308121,20 +308163,20 @@ var require_graceful_fs = __commonJS({
|
|
|
308121
308163
|
});
|
|
308122
308164
|
}
|
|
308123
308165
|
}
|
|
308124
|
-
return
|
|
308166
|
+
return fs79;
|
|
308125
308167
|
}
|
|
308126
308168
|
function enqueue(elem) {
|
|
308127
308169
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
308128
|
-
|
|
308170
|
+
fs78[gracefulQueue].push(elem);
|
|
308129
308171
|
retry();
|
|
308130
308172
|
}
|
|
308131
308173
|
var retryTimer2;
|
|
308132
308174
|
function resetQueue() {
|
|
308133
308175
|
var now2 = Date.now();
|
|
308134
|
-
for (var i4 = 0; i4 <
|
|
308135
|
-
if (
|
|
308136
|
-
|
|
308137
|
-
|
|
308176
|
+
for (var i4 = 0; i4 < fs78[gracefulQueue].length; ++i4) {
|
|
308177
|
+
if (fs78[gracefulQueue][i4].length > 2) {
|
|
308178
|
+
fs78[gracefulQueue][i4][3] = now2;
|
|
308179
|
+
fs78[gracefulQueue][i4][4] = now2;
|
|
308138
308180
|
}
|
|
308139
308181
|
}
|
|
308140
308182
|
retry();
|
|
@@ -308142,9 +308184,9 @@ var require_graceful_fs = __commonJS({
|
|
|
308142
308184
|
function retry() {
|
|
308143
308185
|
clearTimeout(retryTimer2);
|
|
308144
308186
|
retryTimer2 = void 0;
|
|
308145
|
-
if (
|
|
308187
|
+
if (fs78[gracefulQueue].length === 0)
|
|
308146
308188
|
return;
|
|
308147
|
-
var elem =
|
|
308189
|
+
var elem = fs78[gracefulQueue].shift();
|
|
308148
308190
|
var fn2 = elem[0];
|
|
308149
308191
|
var args2 = elem[1];
|
|
308150
308192
|
var err2 = elem[2];
|
|
@@ -308166,7 +308208,7 @@ var require_graceful_fs = __commonJS({
|
|
|
308166
308208
|
debug("RETRY", fn2.name, args2);
|
|
308167
308209
|
fn2.apply(null, args2.concat([startTime]));
|
|
308168
308210
|
} else {
|
|
308169
|
-
|
|
308211
|
+
fs78[gracefulQueue].push(elem);
|
|
308170
308212
|
}
|
|
308171
308213
|
}
|
|
308172
308214
|
if (retryTimer2 === void 0) {
|
|
@@ -308917,8 +308959,8 @@ var init_convertInputToNodeStream = __esm({
|
|
|
308917
308959
|
|
|
308918
308960
|
// node_modules/read-excel-file/modules/export/filterZipArchiveEntry.js
|
|
308919
308961
|
function filterZipArchiveEntry(_ref) {
|
|
308920
|
-
var
|
|
308921
|
-
return
|
|
308962
|
+
var path95 = _ref.path;
|
|
308963
|
+
return path95.endsWith(".xml") || path95.endsWith(".xml.rels");
|
|
308922
308964
|
}
|
|
308923
308965
|
var init_filterZipArchiveEntry = __esm({
|
|
308924
308966
|
"node_modules/read-excel-file/modules/export/filterZipArchiveEntry.js"() {
|
|
@@ -309321,11 +309363,11 @@ function parseFilePaths(content, parseXml2) {
|
|
|
309321
309363
|
break;
|
|
309322
309364
|
}
|
|
309323
309365
|
}
|
|
309324
|
-
function getFilePathFromRelationTarget(
|
|
309325
|
-
if (
|
|
309326
|
-
return
|
|
309366
|
+
function getFilePathFromRelationTarget(path95) {
|
|
309367
|
+
if (path95[0] === "/") {
|
|
309368
|
+
return path95.slice("/".length);
|
|
309327
309369
|
}
|
|
309328
|
-
return "xl/" +
|
|
309370
|
+
return "xl/" + path95;
|
|
309329
309371
|
}
|
|
309330
309372
|
}
|
|
309331
309373
|
var init_parseFilePaths = __esm({
|
|
@@ -311430,18 +311472,18 @@ function parseDataRow(dataRow, schema, columns, options2) {
|
|
|
311430
311472
|
object: transformValue(value, isEmptyValue2, void 0, options2)
|
|
311431
311473
|
};
|
|
311432
311474
|
}
|
|
311433
|
-
function parseObject(row, schema,
|
|
311475
|
+
function parseObject(row, schema, path95, columns, options2) {
|
|
311434
311476
|
var object4 = {};
|
|
311435
311477
|
var isEmptyObject = true;
|
|
311436
311478
|
var errors = [];
|
|
311437
311479
|
var children = [];
|
|
311438
311480
|
for (var _i2 = 0, _Object$keys = Object.keys(schema); _i2 < _Object$keys.length; _i2++) {
|
|
311439
311481
|
var key = _Object$keys[_i2];
|
|
311440
|
-
var child2 = parseProperty(row, schema[key], getPropertyPath(key,
|
|
311482
|
+
var child2 = parseProperty(row, schema[key], getPropertyPath(key, path95), columns, options2);
|
|
311441
311483
|
if (child2.errors) {
|
|
311442
311484
|
errors = errors.concat(child2.errors);
|
|
311443
311485
|
} else {
|
|
311444
|
-
object4[key] = transformValue(child2.value, child2.isEmptyValue, getPropertyPath(key,
|
|
311486
|
+
object4[key] = transformValue(child2.value, child2.isEmptyValue, getPropertyPath(key, path95), options2);
|
|
311445
311487
|
if (isEmptyObject && !child2.isEmptyValue) {
|
|
311446
311488
|
isEmptyObject = false;
|
|
311447
311489
|
}
|
|
@@ -311466,13 +311508,13 @@ function parseObject(row, schema, path94, columns, options2) {
|
|
|
311466
311508
|
children
|
|
311467
311509
|
};
|
|
311468
311510
|
}
|
|
311469
|
-
function parseProperty(row, schemaEntry,
|
|
311511
|
+
function parseProperty(row, schemaEntry, path95, columns, options2) {
|
|
311470
311512
|
var columnIndex = schemaEntry.column ? columns.indexOf(schemaEntry.column) : void 0;
|
|
311471
311513
|
var isMissingColumn = schemaEntry.column ? columnIndex < 0 : void 0;
|
|
311472
311514
|
var _ref = schemaEntry.column ? isMissingColumn ? {
|
|
311473
311515
|
value: options2.propertyValueWhenColumnIsMissing,
|
|
311474
311516
|
isEmptyValue: true
|
|
311475
|
-
} : parseCellValueWithPossibleErrors(row[columnIndex], schemaEntry, columnIndex, options2) : parseObject(row, schemaEntry.schema,
|
|
311517
|
+
} : parseCellValueWithPossibleErrors(row[columnIndex], schemaEntry, columnIndex, options2) : parseObject(row, schemaEntry.schema, path95, columns, options2), value = _ref.value, isEmptyValue2 = _ref.isEmptyValue, errors = _ref.errors, children = _ref.children;
|
|
311476
311518
|
if (errors) {
|
|
311477
311519
|
return {
|
|
311478
311520
|
// Return the errors.
|
|
@@ -311691,15 +311733,15 @@ function parseSeparatedSubstrings(string4, separatorCharacter) {
|
|
|
311691
311733
|
}
|
|
311692
311734
|
return elements;
|
|
311693
311735
|
}
|
|
311694
|
-
function transformValue(value, isEmptyValue2,
|
|
311736
|
+
function transformValue(value, isEmptyValue2, path95, options2) {
|
|
311695
311737
|
if (isEmptyValue2) {
|
|
311696
311738
|
if (isObject3(value)) {
|
|
311697
311739
|
return options2.transformEmptyObject(value, {
|
|
311698
|
-
path:
|
|
311740
|
+
path: path95
|
|
311699
311741
|
});
|
|
311700
311742
|
} else if (Array.isArray(value)) {
|
|
311701
311743
|
return options2.transformEmptyArray(value, {
|
|
311702
|
-
path:
|
|
311744
|
+
path: path95
|
|
311703
311745
|
});
|
|
311704
311746
|
}
|
|
311705
311747
|
}
|
|
@@ -313166,8 +313208,8 @@ var init_tap = __esm({
|
|
|
313166
313208
|
});
|
|
313167
313209
|
|
|
313168
313210
|
// node_modules/underscore/modules/toPath.js
|
|
313169
|
-
function toPath(
|
|
313170
|
-
return isArray_default(
|
|
313211
|
+
function toPath(path95) {
|
|
313212
|
+
return isArray_default(path95) ? path95 : [path95];
|
|
313171
313213
|
}
|
|
313172
313214
|
var init_toPath = __esm({
|
|
313173
313215
|
"node_modules/underscore/modules/toPath.js"() {
|
|
@@ -313178,8 +313220,8 @@ var init_toPath = __esm({
|
|
|
313178
313220
|
});
|
|
313179
313221
|
|
|
313180
313222
|
// node_modules/underscore/modules/_toPath.js
|
|
313181
|
-
function toPath2(
|
|
313182
|
-
return _2.toPath(
|
|
313223
|
+
function toPath2(path95) {
|
|
313224
|
+
return _2.toPath(path95);
|
|
313183
313225
|
}
|
|
313184
313226
|
var init_toPath2 = __esm({
|
|
313185
313227
|
"node_modules/underscore/modules/_toPath.js"() {
|
|
@@ -313189,11 +313231,11 @@ var init_toPath2 = __esm({
|
|
|
313189
313231
|
});
|
|
313190
313232
|
|
|
313191
313233
|
// node_modules/underscore/modules/_deepGet.js
|
|
313192
|
-
function deepGet(obj2,
|
|
313193
|
-
var length =
|
|
313234
|
+
function deepGet(obj2, path95) {
|
|
313235
|
+
var length = path95.length;
|
|
313194
313236
|
for (var i4 = 0; i4 < length; i4++) {
|
|
313195
313237
|
if (obj2 == null) return void 0;
|
|
313196
|
-
obj2 = obj2[
|
|
313238
|
+
obj2 = obj2[path95[i4]];
|
|
313197
313239
|
}
|
|
313198
313240
|
return length ? obj2 : void 0;
|
|
313199
313241
|
}
|
|
@@ -313203,8 +313245,8 @@ var init_deepGet = __esm({
|
|
|
313203
313245
|
});
|
|
313204
313246
|
|
|
313205
313247
|
// node_modules/underscore/modules/get.js
|
|
313206
|
-
function get2(object4,
|
|
313207
|
-
var value = deepGet(object4, toPath2(
|
|
313248
|
+
function get2(object4, path95, defaultValue) {
|
|
313249
|
+
var value = deepGet(object4, toPath2(path95));
|
|
313208
313250
|
return isUndefined(value) ? defaultValue : value;
|
|
313209
313251
|
}
|
|
313210
313252
|
var init_get = __esm({
|
|
@@ -313216,11 +313258,11 @@ var init_get = __esm({
|
|
|
313216
313258
|
});
|
|
313217
313259
|
|
|
313218
313260
|
// node_modules/underscore/modules/has.js
|
|
313219
|
-
function has2(obj2,
|
|
313220
|
-
|
|
313221
|
-
var length =
|
|
313261
|
+
function has2(obj2, path95) {
|
|
313262
|
+
path95 = toPath2(path95);
|
|
313263
|
+
var length = path95.length;
|
|
313222
313264
|
for (var i4 = 0; i4 < length; i4++) {
|
|
313223
|
-
var key =
|
|
313265
|
+
var key = path95[i4];
|
|
313224
313266
|
if (!has(obj2, key)) return false;
|
|
313225
313267
|
obj2 = obj2[key];
|
|
313226
313268
|
}
|
|
@@ -313257,10 +313299,10 @@ var init_matcher = __esm({
|
|
|
313257
313299
|
});
|
|
313258
313300
|
|
|
313259
313301
|
// node_modules/underscore/modules/property.js
|
|
313260
|
-
function property(
|
|
313261
|
-
|
|
313302
|
+
function property(path95) {
|
|
313303
|
+
path95 = toPath2(path95);
|
|
313262
313304
|
return function(obj2) {
|
|
313263
|
-
return deepGet(obj2,
|
|
313305
|
+
return deepGet(obj2, path95);
|
|
313264
313306
|
};
|
|
313265
313307
|
}
|
|
313266
313308
|
var init_property = __esm({
|
|
@@ -313369,8 +313411,8 @@ var init_noop = __esm({
|
|
|
313369
313411
|
// node_modules/underscore/modules/propertyOf.js
|
|
313370
313412
|
function propertyOf(obj2) {
|
|
313371
313413
|
if (obj2 == null) return noop5;
|
|
313372
|
-
return function(
|
|
313373
|
-
return get2(obj2,
|
|
313414
|
+
return function(path95) {
|
|
313415
|
+
return get2(obj2, path95);
|
|
313374
313416
|
};
|
|
313375
313417
|
}
|
|
313376
313418
|
var init_propertyOf = __esm({
|
|
@@ -313564,14 +313606,14 @@ var init_template = __esm({
|
|
|
313564
313606
|
});
|
|
313565
313607
|
|
|
313566
313608
|
// node_modules/underscore/modules/result.js
|
|
313567
|
-
function result(obj2,
|
|
313568
|
-
|
|
313569
|
-
var length =
|
|
313609
|
+
function result(obj2, path95, fallback) {
|
|
313610
|
+
path95 = toPath2(path95);
|
|
313611
|
+
var length = path95.length;
|
|
313570
313612
|
if (!length) {
|
|
313571
313613
|
return isFunction_default(fallback) ? fallback.call(obj2) : fallback;
|
|
313572
313614
|
}
|
|
313573
313615
|
for (var i4 = 0; i4 < length; i4++) {
|
|
313574
|
-
var prop = obj2 == null ? void 0 : obj2[
|
|
313616
|
+
var prop = obj2 == null ? void 0 : obj2[path95[i4]];
|
|
313575
313617
|
if (prop === void 0) {
|
|
313576
313618
|
prop = fallback;
|
|
313577
313619
|
i4 = length;
|
|
@@ -314254,14 +314296,14 @@ var init_invoke = __esm({
|
|
|
314254
314296
|
init_map();
|
|
314255
314297
|
init_deepGet();
|
|
314256
314298
|
init_toPath2();
|
|
314257
|
-
invoke_default = restArguments(function(obj2,
|
|
314299
|
+
invoke_default = restArguments(function(obj2, path95, args2) {
|
|
314258
314300
|
var contextPath, func;
|
|
314259
|
-
if (isFunction_default(
|
|
314260
|
-
func =
|
|
314301
|
+
if (isFunction_default(path95)) {
|
|
314302
|
+
func = path95;
|
|
314261
314303
|
} else {
|
|
314262
|
-
|
|
314263
|
-
contextPath =
|
|
314264
|
-
|
|
314304
|
+
path95 = toPath2(path95);
|
|
314305
|
+
contextPath = path95.slice(0, -1);
|
|
314306
|
+
path95 = path95[path95.length - 1];
|
|
314265
314307
|
}
|
|
314266
314308
|
return map2(obj2, function(context) {
|
|
314267
314309
|
var method = func;
|
|
@@ -314270,7 +314312,7 @@ var init_invoke = __esm({
|
|
|
314270
314312
|
context = deepGet(context, contextPath);
|
|
314271
314313
|
}
|
|
314272
314314
|
if (context == null) return void 0;
|
|
314273
|
-
method = context[
|
|
314315
|
+
method = context[path95];
|
|
314274
314316
|
}
|
|
314275
314317
|
return method == null ? method : method.apply(context, args2);
|
|
314276
314318
|
});
|
|
@@ -323635,8 +323677,8 @@ var require_utils2 = __commonJS({
|
|
|
323635
323677
|
var result2 = transform2[inputType][outputType](input);
|
|
323636
323678
|
return result2;
|
|
323637
323679
|
};
|
|
323638
|
-
exports2.resolve = function(
|
|
323639
|
-
var parts =
|
|
323680
|
+
exports2.resolve = function(path95) {
|
|
323681
|
+
var parts = path95.split("/");
|
|
323640
323682
|
var result2 = [];
|
|
323641
323683
|
for (var index2 = 0; index2 < parts.length; index2++) {
|
|
323642
323684
|
var part = parts[index2];
|
|
@@ -329489,18 +329531,18 @@ var require_object2 = __commonJS({
|
|
|
329489
329531
|
var object4 = new ZipObject(name30, zipObjectContent, o2);
|
|
329490
329532
|
this.files[name30] = object4;
|
|
329491
329533
|
};
|
|
329492
|
-
var parentFolder = function(
|
|
329493
|
-
if (
|
|
329494
|
-
|
|
329534
|
+
var parentFolder = function(path95) {
|
|
329535
|
+
if (path95.slice(-1) === "/") {
|
|
329536
|
+
path95 = path95.substring(0, path95.length - 1);
|
|
329495
329537
|
}
|
|
329496
|
-
var lastSlash =
|
|
329497
|
-
return lastSlash > 0 ?
|
|
329538
|
+
var lastSlash = path95.lastIndexOf("/");
|
|
329539
|
+
return lastSlash > 0 ? path95.substring(0, lastSlash) : "";
|
|
329498
329540
|
};
|
|
329499
|
-
var forceTrailingSlash = function(
|
|
329500
|
-
if (
|
|
329501
|
-
|
|
329541
|
+
var forceTrailingSlash = function(path95) {
|
|
329542
|
+
if (path95.slice(-1) !== "/") {
|
|
329543
|
+
path95 += "/";
|
|
329502
329544
|
}
|
|
329503
|
-
return
|
|
329545
|
+
return path95;
|
|
329504
329546
|
};
|
|
329505
329547
|
var folderAdd = function(name30, createFolders) {
|
|
329506
329548
|
createFolders = typeof createFolders !== "undefined" ? createFolders : defaults.createFolders;
|
|
@@ -330538,27 +330580,27 @@ var require_zipfile = __commonJS({
|
|
|
330538
330580
|
};
|
|
330539
330581
|
});
|
|
330540
330582
|
}
|
|
330541
|
-
function splitPath(
|
|
330542
|
-
var lastIndex =
|
|
330583
|
+
function splitPath(path95) {
|
|
330584
|
+
var lastIndex = path95.lastIndexOf("/");
|
|
330543
330585
|
if (lastIndex === -1) {
|
|
330544
|
-
return { dirname: "", basename:
|
|
330586
|
+
return { dirname: "", basename: path95 };
|
|
330545
330587
|
} else {
|
|
330546
330588
|
return {
|
|
330547
|
-
dirname:
|
|
330548
|
-
basename:
|
|
330589
|
+
dirname: path95.substring(0, lastIndex),
|
|
330590
|
+
basename: path95.substring(lastIndex + 1)
|
|
330549
330591
|
};
|
|
330550
330592
|
}
|
|
330551
330593
|
}
|
|
330552
330594
|
function joinPath() {
|
|
330553
|
-
var nonEmptyPaths = Array.prototype.filter.call(arguments, function(
|
|
330554
|
-
return
|
|
330595
|
+
var nonEmptyPaths = Array.prototype.filter.call(arguments, function(path95) {
|
|
330596
|
+
return path95;
|
|
330555
330597
|
});
|
|
330556
330598
|
var relevantPaths = [];
|
|
330557
|
-
nonEmptyPaths.forEach(function(
|
|
330558
|
-
if (/^\//.test(
|
|
330559
|
-
relevantPaths = [
|
|
330599
|
+
nonEmptyPaths.forEach(function(path95) {
|
|
330600
|
+
if (/^\//.test(path95)) {
|
|
330601
|
+
relevantPaths = [path95];
|
|
330560
330602
|
} else {
|
|
330561
|
-
relevantPaths.push(
|
|
330603
|
+
relevantPaths.push(path95);
|
|
330562
330604
|
}
|
|
330563
330605
|
});
|
|
330564
330606
|
return relevantPaths.join("/");
|
|
@@ -337961,9 +338003,9 @@ var require_office_xml_reader = __commonJS({
|
|
|
337961
338003
|
return collapseAlternateContent(document2)[0];
|
|
337962
338004
|
});
|
|
337963
338005
|
}
|
|
337964
|
-
function readXmlFromZipFile(docxFile,
|
|
337965
|
-
if (docxFile.exists(
|
|
337966
|
-
return docxFile.read(
|
|
338006
|
+
function readXmlFromZipFile(docxFile, path95) {
|
|
338007
|
+
if (docxFile.exists(path95)) {
|
|
338008
|
+
return docxFile.read(path95, "utf-8").then(stripUtf8Bom).then(read);
|
|
337967
338009
|
} else {
|
|
337968
338010
|
return promises6.resolve(null);
|
|
337969
338011
|
}
|
|
@@ -339727,10 +339769,10 @@ var require_body_reader = __commonJS({
|
|
|
339727
339769
|
}
|
|
339728
339770
|
}
|
|
339729
339771
|
function findEmbeddedImageFile(relationshipId) {
|
|
339730
|
-
var
|
|
339772
|
+
var path95 = uris.uriToZipEntryName("word", relationships.findTargetByRelationshipId(relationshipId));
|
|
339731
339773
|
return {
|
|
339732
|
-
path:
|
|
339733
|
-
read: docxFile.read.bind(docxFile,
|
|
339774
|
+
path: path95,
|
|
339775
|
+
read: docxFile.read.bind(docxFile, path95)
|
|
339734
339776
|
};
|
|
339735
339777
|
}
|
|
339736
339778
|
function readImage(imageFile, altText) {
|
|
@@ -339967,12 +340009,12 @@ var require_content_types_reader = __commonJS({
|
|
|
339967
340009
|
}
|
|
339968
340010
|
function contentTypes(overrides, extensionDefaults) {
|
|
339969
340011
|
return {
|
|
339970
|
-
findContentType: function(
|
|
339971
|
-
var overrideContentType = overrides[
|
|
340012
|
+
findContentType: function(path95) {
|
|
340013
|
+
var overrideContentType = overrides[path95];
|
|
339972
340014
|
if (overrideContentType) {
|
|
339973
340015
|
return overrideContentType;
|
|
339974
340016
|
} else {
|
|
339975
|
-
var pathParts =
|
|
340017
|
+
var pathParts = path95.split(".");
|
|
339976
340018
|
var extension = pathParts[pathParts.length - 1];
|
|
339977
340019
|
if (extensionDefaults.hasOwnProperty(extension)) {
|
|
339978
340020
|
return extensionDefaults[extension];
|
|
@@ -340221,12 +340263,12 @@ var require_comments_reader = __commonJS({
|
|
|
340221
340263
|
var require_path_is_absolute = __commonJS({
|
|
340222
340264
|
"node_modules/path-is-absolute/index.js"(exports2, module2) {
|
|
340223
340265
|
"use strict";
|
|
340224
|
-
function posix2(
|
|
340225
|
-
return
|
|
340266
|
+
function posix2(path95) {
|
|
340267
|
+
return path95.charAt(0) === "/";
|
|
340226
340268
|
}
|
|
340227
|
-
function win32(
|
|
340269
|
+
function win32(path95) {
|
|
340228
340270
|
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
|
340229
|
-
var result2 = splitDeviceRe.exec(
|
|
340271
|
+
var result2 = splitDeviceRe.exec(path95);
|
|
340230
340272
|
var device = result2[1] || "";
|
|
340231
340273
|
var isUnc = Boolean(device && device.charAt(1) !== ":");
|
|
340232
340274
|
return Boolean(result2[2] || isUnc);
|
|
@@ -340240,7 +340282,7 @@ var require_path_is_absolute = __commonJS({
|
|
|
340240
340282
|
// node_modules/mammoth/lib/docx/files.js
|
|
340241
340283
|
var require_files = __commonJS({
|
|
340242
340284
|
"node_modules/mammoth/lib/docx/files.js"(exports2) {
|
|
340243
|
-
var
|
|
340285
|
+
var fs78 = __require("fs");
|
|
340244
340286
|
var url2 = __require("url");
|
|
340245
340287
|
var os29 = __require("os");
|
|
340246
340288
|
var dirname11 = __require("path").dirname;
|
|
@@ -340260,19 +340302,19 @@ var require_files = __commonJS({
|
|
|
340260
340302
|
}
|
|
340261
340303
|
var base = options2.relativeToFile ? dirname11(options2.relativeToFile) : null;
|
|
340262
340304
|
function read(uri, encoding) {
|
|
340263
|
-
return resolveUri(uri).then(function(
|
|
340264
|
-
return readFile15(
|
|
340305
|
+
return resolveUri(uri).then(function(path95) {
|
|
340306
|
+
return readFile15(path95, encoding).caught(function(error51) {
|
|
340265
340307
|
var message = "could not open external image: '" + uri + "' (document directory: '" + base + "')\n" + error51.message;
|
|
340266
340308
|
return promises6.reject(new Error(message));
|
|
340267
340309
|
});
|
|
340268
340310
|
});
|
|
340269
340311
|
}
|
|
340270
340312
|
function resolveUri(uri) {
|
|
340271
|
-
var
|
|
340272
|
-
if (isAbsolutePath(
|
|
340273
|
-
return promises6.resolve(
|
|
340313
|
+
var path95 = uriToPath(uri);
|
|
340314
|
+
if (isAbsolutePath(path95)) {
|
|
340315
|
+
return promises6.resolve(path95);
|
|
340274
340316
|
} else if (base) {
|
|
340275
|
-
return promises6.resolve(resolvePath(base,
|
|
340317
|
+
return promises6.resolve(resolvePath(base, path95));
|
|
340276
340318
|
} else {
|
|
340277
340319
|
return promises6.reject(new Error("could not find external image '" + uri + "', path of input document is unknown"));
|
|
340278
340320
|
}
|
|
@@ -340281,18 +340323,18 @@ var require_files = __commonJS({
|
|
|
340281
340323
|
read
|
|
340282
340324
|
};
|
|
340283
340325
|
}
|
|
340284
|
-
var readFile15 = promises6.promisify(
|
|
340326
|
+
var readFile15 = promises6.promisify(fs78.readFile.bind(fs78));
|
|
340285
340327
|
function uriToPath(uriString, platform) {
|
|
340286
340328
|
if (!platform) {
|
|
340287
340329
|
platform = os29.platform();
|
|
340288
340330
|
}
|
|
340289
340331
|
var uri = url2.parse(uriString);
|
|
340290
340332
|
if (isLocalFileUri(uri) || isRelativeUri(uri)) {
|
|
340291
|
-
var
|
|
340292
|
-
if (platform === "win32" && /^\/[a-z]:/i.test(
|
|
340293
|
-
return
|
|
340333
|
+
var path95 = decodeURIComponent(uri.path);
|
|
340334
|
+
if (platform === "win32" && /^\/[a-z]:/i.test(path95)) {
|
|
340335
|
+
return path95.slice(1);
|
|
340294
340336
|
} else {
|
|
340295
|
-
return
|
|
340337
|
+
return path95;
|
|
340296
340338
|
}
|
|
340297
340339
|
} else {
|
|
340298
340340
|
throw new Error("Could not convert URI to path: " + uriString);
|
|
@@ -340492,18 +340534,18 @@ var require_docx_reader = __commonJS({
|
|
|
340492
340534
|
readElement: contentTypesReader.readContentTypesFromXml,
|
|
340493
340535
|
defaultValue: contentTypesReader.defaultContentTypes
|
|
340494
340536
|
});
|
|
340495
|
-
function readNumberingFromZipFile(zipFile,
|
|
340537
|
+
function readNumberingFromZipFile(zipFile, path95, styles) {
|
|
340496
340538
|
return xmlFileReader({
|
|
340497
|
-
filename:
|
|
340539
|
+
filename: path95,
|
|
340498
340540
|
readElement: function(element) {
|
|
340499
340541
|
return numberingXml.readNumberingXml(element, { styles });
|
|
340500
340542
|
},
|
|
340501
340543
|
defaultValue: numberingXml.defaultNumbering
|
|
340502
340544
|
})(zipFile);
|
|
340503
340545
|
}
|
|
340504
|
-
function readStylesFromZipFile(zipFile,
|
|
340546
|
+
function readStylesFromZipFile(zipFile, path95) {
|
|
340505
340547
|
return xmlFileReader({
|
|
340506
|
-
filename:
|
|
340548
|
+
filename: path95,
|
|
340507
340549
|
readElement: stylesReader.readStylesXml,
|
|
340508
340550
|
defaultValue: stylesReader.defaultStyles
|
|
340509
340551
|
})(zipFile);
|
|
@@ -340534,10 +340576,10 @@ var require_style_map = __commonJS({
|
|
|
340534
340576
|
});
|
|
340535
340577
|
}
|
|
340536
340578
|
function updateRelationships(docxFile) {
|
|
340537
|
-
var
|
|
340579
|
+
var path95 = "word/_rels/document.xml.rels";
|
|
340538
340580
|
var relationshipsUri = "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
340539
340581
|
var relationshipElementName = "{" + relationshipsUri + "}Relationship";
|
|
340540
|
-
return docxFile.read(
|
|
340582
|
+
return docxFile.read(path95, "utf8").then(xml.readString).then(function(relationshipsContainer) {
|
|
340541
340583
|
var relationships = relationshipsContainer.children;
|
|
340542
340584
|
addOrUpdateElement(relationships, relationshipElementName, "Id", {
|
|
340543
340585
|
"Id": "rMammothStyleMap",
|
|
@@ -340545,21 +340587,21 @@ var require_style_map = __commonJS({
|
|
|
340545
340587
|
"Target": styleMapAbsolutePath
|
|
340546
340588
|
});
|
|
340547
340589
|
var namespaces = { "": relationshipsUri };
|
|
340548
|
-
return docxFile.write(
|
|
340590
|
+
return docxFile.write(path95, xml.writeString(relationshipsContainer, namespaces));
|
|
340549
340591
|
});
|
|
340550
340592
|
}
|
|
340551
340593
|
function updateContentTypes(docxFile) {
|
|
340552
|
-
var
|
|
340594
|
+
var path95 = "[Content_Types].xml";
|
|
340553
340595
|
var contentTypesUri = "http://schemas.openxmlformats.org/package/2006/content-types";
|
|
340554
340596
|
var overrideName = "{" + contentTypesUri + "}Override";
|
|
340555
|
-
return docxFile.read(
|
|
340597
|
+
return docxFile.read(path95, "utf8").then(xml.readString).then(function(typesElement) {
|
|
340556
340598
|
var children = typesElement.children;
|
|
340557
340599
|
addOrUpdateElement(children, overrideName, "PartName", {
|
|
340558
340600
|
"PartName": styleMapAbsolutePath,
|
|
340559
340601
|
"ContentType": "text/prs.mammoth.style-map"
|
|
340560
340602
|
});
|
|
340561
340603
|
var namespaces = { "": contentTypesUri };
|
|
340562
|
-
return docxFile.write(
|
|
340604
|
+
return docxFile.write(path95, xml.writeString(typesElement, namespaces));
|
|
340563
340605
|
});
|
|
340564
340606
|
}
|
|
340565
340607
|
function addOrUpdateElement(elements, name30, identifyingAttribute, attributes) {
|
|
@@ -341251,9 +341293,9 @@ var require_document_to_html = __commonJS({
|
|
|
341251
341293
|
};
|
|
341252
341294
|
var paths = [];
|
|
341253
341295
|
if (run2.highlight !== null) {
|
|
341254
|
-
var
|
|
341255
|
-
if (
|
|
341256
|
-
paths.push(
|
|
341296
|
+
var path95 = findHtmlPath({ type: "highlight", color: run2.highlight });
|
|
341297
|
+
if (path95) {
|
|
341298
|
+
paths.push(path95);
|
|
341257
341299
|
}
|
|
341258
341300
|
}
|
|
341259
341301
|
if (run2.isSmallCaps) {
|
|
@@ -341288,15 +341330,15 @@ var require_document_to_html = __commonJS({
|
|
|
341288
341330
|
messages.push(unrecognisedStyleWarning("run", run2));
|
|
341289
341331
|
}
|
|
341290
341332
|
paths.push(stylePath);
|
|
341291
|
-
paths.forEach(function(
|
|
341292
|
-
nodes =
|
|
341333
|
+
paths.forEach(function(path96) {
|
|
341334
|
+
nodes = path96.wrap.bind(path96, nodes);
|
|
341293
341335
|
});
|
|
341294
341336
|
return nodes();
|
|
341295
341337
|
}
|
|
341296
341338
|
function findHtmlPathForRunProperty(elementType, defaultTagName) {
|
|
341297
|
-
var
|
|
341298
|
-
if (
|
|
341299
|
-
return
|
|
341339
|
+
var path95 = findHtmlPath({ type: elementType });
|
|
341340
|
+
if (path95) {
|
|
341341
|
+
return path95;
|
|
341300
341342
|
} else if (defaultTagName) {
|
|
341301
341343
|
return htmlPaths.element(defaultTagName, {}, { fresh: false });
|
|
341302
341344
|
} else {
|
|
@@ -342998,11 +343040,11 @@ var require_options_reader = __commonJS({
|
|
|
342998
343040
|
// node_modules/mammoth/lib/unzip.js
|
|
342999
343041
|
var require_unzip = __commonJS({
|
|
343000
343042
|
"node_modules/mammoth/lib/unzip.js"(exports2) {
|
|
343001
|
-
var
|
|
343043
|
+
var fs78 = __require("fs");
|
|
343002
343044
|
var promises6 = require_promises();
|
|
343003
343045
|
var zipfile = require_zipfile();
|
|
343004
343046
|
exports2.openZip = openZip;
|
|
343005
|
-
var readFile15 = promises6.promisify(
|
|
343047
|
+
var readFile15 = promises6.promisify(fs78.readFile);
|
|
343006
343048
|
function openZip(options2) {
|
|
343007
343049
|
if (options2.path) {
|
|
343008
343050
|
return readFile15(options2.path).then(zipfile.openArrayBuffer);
|
|
@@ -345722,16 +345764,16 @@ ${body}${more}`,
|
|
|
345722
345764
|
LIMIT ${maxHits}
|
|
345723
345765
|
`);
|
|
345724
345766
|
for (const h3 of hits) {
|
|
345725
|
-
const
|
|
345767
|
+
const path95 = hitPath(
|
|
345726
345768
|
titleById.get(h3.session_id) ?? h3.session_id,
|
|
345727
345769
|
h3.turn,
|
|
345728
345770
|
h3.role
|
|
345729
345771
|
);
|
|
345730
345772
|
groups.push({
|
|
345731
|
-
file:
|
|
345773
|
+
file: path95,
|
|
345732
345774
|
matchCount: countOccurrences2(h3.content ?? "", query)
|
|
345733
345775
|
});
|
|
345734
|
-
lines.push(`${
|
|
345776
|
+
lines.push(`${path95}
|
|
345735
345777
|
${snippetAround(formatTurnPlain(h3.role, h3.content ?? ""), query)}`);
|
|
345736
345778
|
}
|
|
345737
345779
|
const totalHits = hits.length;
|
|
@@ -346472,7 +346514,7 @@ var init_peers2 = __esm({
|
|
|
346472
346514
|
if (p2) toReview.set(r3.sessionId, p2.title ?? "Plan");
|
|
346473
346515
|
}
|
|
346474
346516
|
const lines = rows2.map(
|
|
346475
|
-
(r3) => r3.surface === "chrome" ? `- ${r3.name} (id ${r3.sessionId}, browser: the Atlarix extension's agent; it starts on a task when the user clicks the Atlarix icon)` : `- ${r3.name} (id ${r3.sessionId.startsWith("pending-") ? r3.sessionId : r3.sessionId.slice(0, 8)}, ${peerSurfaceLabel(r3.surface)}, ${r3.busy ? "busy" : "idle"}${settingsOf(r3)}${toReview.has(r3.sessionId) ? ` \xB7 plan to review: ${toReview.get(r3.sessionId)}` : ""}${r3.hasApproval ? approvalWaitingText(r3) : ""}) \u2014 ${r3.workspace || "no workspace"}`
|
|
346517
|
+
(r3) => r3.surface === "chrome" ? `- ${r3.name} (id ${r3.sessionId}, browser: the Atlarix extension's agent; it starts on a task when the user clicks the Atlarix icon)` : `- ${r3.name} (id ${r3.sessionId.startsWith("pending-") ? r3.sessionId : r3.sessionId.slice(0, 8)}, ${peerSurfaceLabel(r3.surface)}, ${r3.busy ? "busy" : r3.new ? "new" : "idle"}${settingsOf(r3)}${toReview.has(r3.sessionId) ? ` \xB7 plan to review: ${toReview.get(r3.sessionId)}` : ""}${r3.hasApproval ? approvalWaitingText(r3) : ""}) \u2014 ${r3.workspace || "no workspace"}`
|
|
346476
346518
|
);
|
|
346477
346519
|
let planText = "";
|
|
346478
346520
|
if (typeof plan_of === "string" && plan_of.trim()) {
|
|
@@ -346616,7 +346658,7 @@ Models you can set: ${shortModelList(models)}` : ""}${planText}${resultText}`
|
|
|
346616
346658
|
}
|
|
346617
346659
|
return {
|
|
346618
346660
|
success: true,
|
|
346619
|
-
text: `Sent to ${target.row.name} (${peerSurfaceLabel(target.row.surface)}, ${target.row.busy ? "busy: it reads it at its next step" : result2.waits ? "idle: it reads it
|
|
346661
|
+
text: `Sent to ${target.row.name} (${peerSurfaceLabel(target.row.surface)}, ${target.row.busy ? "busy: it reads it at its next step" : result2.waits ? "idle: it reads it at its next turn" : "idle: it starts a turn with it"}).${result2.applied ? ` ${result2.applied}` : ""}${noticeNote}${replyNote}`
|
|
346620
346662
|
};
|
|
346621
346663
|
}
|
|
346622
346664
|
});
|
|
@@ -347792,23 +347834,23 @@ function findAutonomousOp(chatId, turnId, operationId) {
|
|
|
347792
347834
|
return sessionLogs.get(sessionKey(chatId, turnId))?.find((o2) => o2.operationId === operationId);
|
|
347793
347835
|
}
|
|
347794
347836
|
function autonomousOpFromPermissionExec(operationId, operationType, preview, execApproved) {
|
|
347795
|
-
let
|
|
347837
|
+
let path95;
|
|
347796
347838
|
let summary;
|
|
347797
347839
|
const p2 = preview;
|
|
347798
347840
|
if (Array.isArray(p2)) {
|
|
347799
347841
|
const first2 = p2[0];
|
|
347800
|
-
|
|
347842
|
+
path95 = first2?.path;
|
|
347801
347843
|
summary = first2?.description;
|
|
347802
347844
|
} else if (p2 && typeof p2 === "object") {
|
|
347803
347845
|
const o2 = p2;
|
|
347804
|
-
if (typeof o2.path === "string")
|
|
347805
|
-
if (typeof o2.command === "string")
|
|
347846
|
+
if (typeof o2.path === "string") path95 = o2.path;
|
|
347847
|
+
if (typeof o2.command === "string") path95 = o2.command;
|
|
347806
347848
|
if (typeof o2.description === "string") summary = o2.description;
|
|
347807
347849
|
}
|
|
347808
347850
|
return {
|
|
347809
347851
|
operationId,
|
|
347810
347852
|
type: operationType,
|
|
347811
|
-
path:
|
|
347853
|
+
path: path95,
|
|
347812
347854
|
summary: summary ?? operationType,
|
|
347813
347855
|
timestamp: Date.now(),
|
|
347814
347856
|
result: execApproved ? "success" : "failed",
|
|
@@ -350014,16 +350056,16 @@ var init_run_command_guidance = __esm({
|
|
|
350014
350056
|
});
|
|
350015
350057
|
|
|
350016
350058
|
// src/lib/agent/mutation-verify.ts
|
|
350017
|
-
function recordUnverifiedEdit(turnId,
|
|
350059
|
+
function recordUnverifiedEdit(turnId, path95) {
|
|
350018
350060
|
let set3 = unverifiedEditsByTurn.get(turnId);
|
|
350019
350061
|
if (!set3) {
|
|
350020
350062
|
set3 = /* @__PURE__ */ new Set();
|
|
350021
350063
|
unverifiedEditsByTurn.set(turnId, set3);
|
|
350022
350064
|
}
|
|
350023
|
-
set3.add(
|
|
350065
|
+
set3.add(path95);
|
|
350024
350066
|
}
|
|
350025
|
-
function clearUnverifiedEdit(turnId,
|
|
350026
|
-
unverifiedEditsByTurn.get(turnId)?.delete(
|
|
350067
|
+
function clearUnverifiedEdit(turnId, path95) {
|
|
350068
|
+
unverifiedEditsByTurn.get(turnId)?.delete(path95);
|
|
350027
350069
|
}
|
|
350028
350070
|
function getUnverifiedEditFeedback(turnId) {
|
|
350029
350071
|
if (turnId == null) return null;
|
|
@@ -352865,10 +352907,10 @@ async function hasConfiguredGitIdentity(workspacePath) {
|
|
|
352865
352907
|
return result2.exitCode === 0 && result2.stdout.trim().length > 0;
|
|
352866
352908
|
}
|
|
352867
352909
|
async function getCurrentCommitHash({
|
|
352868
|
-
path:
|
|
352910
|
+
path: path95,
|
|
352869
352911
|
ref = "HEAD"
|
|
352870
352912
|
}) {
|
|
352871
|
-
const gitDir = resolveGitDir(
|
|
352913
|
+
const gitDir = resolveGitDir(path95);
|
|
352872
352914
|
if (!gitDir) return "";
|
|
352873
352915
|
const result2 = await exec(["rev-parse", ref], gitDir);
|
|
352874
352916
|
if (isGitMissingResult(result2)) {
|
|
@@ -353473,11 +353515,11 @@ var init_interceptor = __esm({
|
|
|
353473
353515
|
* Update workspace path and ID (e.g. after create_workspace in same turn).
|
|
353474
353516
|
* Ensures subsequent run_command/write_file in this session use the new project root.
|
|
353475
353517
|
*/
|
|
353476
|
-
setWorkspace(
|
|
353477
|
-
this.workspacePath =
|
|
353518
|
+
setWorkspace(path95, id) {
|
|
353519
|
+
this.workspacePath = path95;
|
|
353478
353520
|
if (id != null) this.workspaceId = id;
|
|
353479
353521
|
logger113.log(
|
|
353480
|
-
`[PermissionInterceptor] Workspace updated to: ${
|
|
353522
|
+
`[PermissionInterceptor] Workspace updated to: ${path95} (id: ${id})`
|
|
353481
353523
|
);
|
|
353482
353524
|
}
|
|
353483
353525
|
// ════════════════════════════════════════════════════════════════════════════
|
|
@@ -353888,12 +353930,12 @@ var init_interceptor = __esm({
|
|
|
353888
353930
|
}
|
|
353889
353931
|
}
|
|
353890
353932
|
const preview = operation.request.preview;
|
|
353891
|
-
const
|
|
353892
|
-
if (
|
|
353933
|
+
const path95 = preview?.path;
|
|
353934
|
+
if (path95 && RESULT_BEARING_FILE_OPS.has(operation.request.operation)) {
|
|
353893
353935
|
const opType = preview.type === "create" ? "create" : preview.type === "delete" ? "delete" : "update";
|
|
353894
353936
|
return {
|
|
353895
353937
|
success: true,
|
|
353896
|
-
path:
|
|
353938
|
+
path: path95,
|
|
353897
353939
|
operation: opType,
|
|
353898
353940
|
oldContent: preview.oldContent ?? "",
|
|
353899
353941
|
newContent: preview.content ?? "",
|
|
@@ -353905,8 +353947,8 @@ var init_interceptor = __esm({
|
|
|
353905
353947
|
...preview.notice ? { output: preview.notice } : {}
|
|
353906
353948
|
};
|
|
353907
353949
|
}
|
|
353908
|
-
if (
|
|
353909
|
-
return { success: true, path:
|
|
353950
|
+
if (path95) {
|
|
353951
|
+
return { success: true, path: path95 };
|
|
353910
353952
|
}
|
|
353911
353953
|
if (operation.request.operation === "mcp_server_write") {
|
|
353912
353954
|
const note = operation.request.preview.resultNote;
|
|
@@ -359010,6 +359052,65 @@ var init_turn_session_choices = __esm({
|
|
|
359010
359052
|
});
|
|
359011
359053
|
|
|
359012
359054
|
// src/lib/memory/recall.ts
|
|
359055
|
+
import fs71 from "node:fs/promises";
|
|
359056
|
+
import path89 from "node:path";
|
|
359057
|
+
function decayWeight(w2, daysSinceUse) {
|
|
359058
|
+
if (!(daysSinceUse > 0)) return w2;
|
|
359059
|
+
return 1 + (w2 - 1) * Math.pow(0.5, daysSinceUse / WEIGHT_DECAY_HALFLIFE_DAYS);
|
|
359060
|
+
}
|
|
359061
|
+
function applyDecay(weights, now2) {
|
|
359062
|
+
const out = {};
|
|
359063
|
+
for (const [file2, v2] of Object.entries(weights)) {
|
|
359064
|
+
const days = v2.lastUsedAt > 0 ? (now2 - v2.lastUsedAt) / 864e5 : Infinity;
|
|
359065
|
+
const w2 = decayWeight(v2.w, days);
|
|
359066
|
+
if (Math.abs(w2 - 1) < 0.01) continue;
|
|
359067
|
+
out[file2] = { w: w2, lastUsedAt: v2.lastUsedAt };
|
|
359068
|
+
}
|
|
359069
|
+
return out;
|
|
359070
|
+
}
|
|
359071
|
+
function bumpWeights(weights, files, now2) {
|
|
359072
|
+
const out = { ...weights };
|
|
359073
|
+
for (const file2 of files) {
|
|
359074
|
+
const prev = out[file2];
|
|
359075
|
+
out[file2] = {
|
|
359076
|
+
w: Math.min(WEIGHT_CAP, (prev?.w ?? 1) + WEIGHT_BUMP),
|
|
359077
|
+
lastUsedAt: now2
|
|
359078
|
+
};
|
|
359079
|
+
}
|
|
359080
|
+
return out;
|
|
359081
|
+
}
|
|
359082
|
+
async function readWeights(dir) {
|
|
359083
|
+
try {
|
|
359084
|
+
const raw = await fs71.readFile(path89.join(dir, WEIGHTS_FILE), "utf8");
|
|
359085
|
+
const parsed = JSON.parse(raw);
|
|
359086
|
+
if (!parsed || typeof parsed !== "object") return {};
|
|
359087
|
+
const out = {};
|
|
359088
|
+
for (const [file2, v2] of Object.entries(parsed)) {
|
|
359089
|
+
const entry = v2;
|
|
359090
|
+
if (!entry || typeof entry !== "object" || typeof entry.w !== "number") continue;
|
|
359091
|
+
out[file2] = {
|
|
359092
|
+
w: entry.w,
|
|
359093
|
+
lastUsedAt: typeof entry.lastUsedAt === "number" ? entry.lastUsedAt : 0
|
|
359094
|
+
};
|
|
359095
|
+
}
|
|
359096
|
+
return out;
|
|
359097
|
+
} catch {
|
|
359098
|
+
return {};
|
|
359099
|
+
}
|
|
359100
|
+
}
|
|
359101
|
+
async function writeWeights(dir, weights) {
|
|
359102
|
+
try {
|
|
359103
|
+
await fs71.writeFile(path89.join(dir, WEIGHTS_FILE), JSON.stringify(weights), "utf8");
|
|
359104
|
+
} catch (err2) {
|
|
359105
|
+
logger122.warn(
|
|
359106
|
+
"recall: could not write weights \u2014",
|
|
359107
|
+
err2 instanceof Error ? err2.message : err2
|
|
359108
|
+
);
|
|
359109
|
+
}
|
|
359110
|
+
}
|
|
359111
|
+
async function persistWeights(dir, weights, now2) {
|
|
359112
|
+
await writeWeights(dir, applyDecay(weights, now2));
|
|
359113
|
+
}
|
|
359013
359114
|
function ageLabel(days) {
|
|
359014
359115
|
if (days <= 0) return "today";
|
|
359015
359116
|
if (days === 1) return "1 day ago";
|
|
@@ -359018,17 +359119,33 @@ function ageLabel(days) {
|
|
|
359018
359119
|
function tokenize2(s3) {
|
|
359019
359120
|
return s3.toLowerCase().split(/[^a-z0-9]+/).filter((t3) => t3.length > 1 && !STOP_WORDS.has(t3));
|
|
359020
359121
|
}
|
|
359021
|
-
function
|
|
359022
|
-
const
|
|
359023
|
-
|
|
359024
|
-
|
|
359025
|
-
|
|
359026
|
-
|
|
359027
|
-
|
|
359028
|
-
|
|
359029
|
-
|
|
359030
|
-
|
|
359031
|
-
|
|
359122
|
+
function docTokens(c2) {
|
|
359123
|
+
const name30 = tokenize2(c2.file.replace(/\.md$/i, ""));
|
|
359124
|
+
const desc2 = tokenize2(c2.description ?? "");
|
|
359125
|
+
return [...name30, ...name30, ...desc2];
|
|
359126
|
+
}
|
|
359127
|
+
function idf(term, docs) {
|
|
359128
|
+
const containing = docs.reduce((n2, d2) => n2 + (d2.includes(term) ? 1 : 0), 0);
|
|
359129
|
+
return Math.log(1 + (docs.length - containing + 0.5) / (containing + 0.5));
|
|
359130
|
+
}
|
|
359131
|
+
function bm25(query, doc, docs, avgLen) {
|
|
359132
|
+
let score2 = 0;
|
|
359133
|
+
for (const term of query) {
|
|
359134
|
+
let tf = 0;
|
|
359135
|
+
for (const t3 of doc) if (t3 === term) tf++;
|
|
359136
|
+
if (tf === 0) continue;
|
|
359137
|
+
score2 += idf(term, docs) * (tf * (BM25_K1 + 1) / (tf + BM25_K1 * (1 - BM25_B + BM25_B * (doc.length / avgLen))));
|
|
359138
|
+
}
|
|
359139
|
+
return score2;
|
|
359140
|
+
}
|
|
359141
|
+
function localRecallMatch(message, candidates, weights) {
|
|
359142
|
+
const query = tokenize2(message);
|
|
359143
|
+
if (query.length === 0 || candidates.length === 0) return [];
|
|
359144
|
+
const qset = new Set(query);
|
|
359145
|
+
const docs = candidates.map(docTokens);
|
|
359146
|
+
const avgLen = docs.reduce((n2, d2) => n2 + d2.length, 0) / Math.max(1, docs.length);
|
|
359147
|
+
const scored = candidates.map((c2, i4) => {
|
|
359148
|
+
const score2 = bm25(qset, docs[i4], docs, avgLen) * (weights?.[c2.file]?.w ?? 1);
|
|
359032
359149
|
return { file: c2.file, score: score2 };
|
|
359033
359150
|
}).filter((x4) => x4.score > 0).sort((a2, b3) => b3.score - a2.score || a2.file.localeCompare(b3.file));
|
|
359034
359151
|
return scored.slice(0, RECALL_MAX_NOTES).map((x4) => x4.file);
|
|
@@ -359065,8 +359182,18 @@ function parseRecallReply(text5, candidates) {
|
|
|
359065
359182
|
return out;
|
|
359066
359183
|
}
|
|
359067
359184
|
async function selectRelevantMemories(args2) {
|
|
359068
|
-
const { message, candidates } = args2;
|
|
359185
|
+
const { message, candidates, memoryDir } = args2;
|
|
359069
359186
|
if (!message.trim() || candidates.length === 0) return [];
|
|
359187
|
+
const now2 = Date.now();
|
|
359188
|
+
let weights = {};
|
|
359189
|
+
if (memoryDir) {
|
|
359190
|
+
weights = applyDecay(await readWeights(memoryDir).catch(() => ({})), now2);
|
|
359191
|
+
}
|
|
359192
|
+
const local2 = localRecallMatch(message, candidates, weights);
|
|
359193
|
+
if (local2.length > 0) {
|
|
359194
|
+
if (memoryDir) await persistWeights(memoryDir, bumpWeights(weights, local2, now2), now2);
|
|
359195
|
+
return local2;
|
|
359196
|
+
}
|
|
359070
359197
|
try {
|
|
359071
359198
|
const { generateText: generateText2 } = await Promise.resolve().then(() => (init_dist16(), dist_exports3));
|
|
359072
359199
|
const { readSettings: readSettings2 } = await Promise.resolve().then(() => (init_settings(), settings_exports));
|
|
@@ -359087,22 +359214,20 @@ async function selectRelevantMemories(args2) {
|
|
|
359087
359214
|
abortSignal: AbortSignal.timeout(RECALL_TIMEOUT_MS)
|
|
359088
359215
|
});
|
|
359089
359216
|
recordAuxUsage2(args2.chatId, result2.usage, "memory");
|
|
359090
|
-
|
|
359217
|
+
const chosen = parseRecallReply(result2.text, candidates);
|
|
359218
|
+
if (memoryDir && chosen.length > 0) {
|
|
359219
|
+
await persistWeights(memoryDir, bumpWeights(weights, chosen, now2), now2);
|
|
359220
|
+
}
|
|
359221
|
+
return chosen;
|
|
359091
359222
|
} catch (err2) {
|
|
359092
359223
|
logger122.warn(
|
|
359093
359224
|
"recall: selector failed \u2014",
|
|
359094
359225
|
err2 instanceof Error ? err2.message : err2
|
|
359095
359226
|
);
|
|
359096
|
-
|
|
359097
|
-
if (local2.length > 0) {
|
|
359098
|
-
logger122.info(`recall: local fallback matched ${local2.join(", ")}`);
|
|
359099
|
-
} else {
|
|
359100
|
-
logger122.info("recall: skipped (selector failed and no local match)");
|
|
359101
|
-
}
|
|
359102
|
-
return local2;
|
|
359227
|
+
return [];
|
|
359103
359228
|
}
|
|
359104
359229
|
}
|
|
359105
|
-
var import_electron_log125, logger122, RECALL_MAX_NOTES, RECALL_TIMEOUT_MS, RECALL_MAX_OUTPUT_TOKENS, RECALL_MESSAGE_CHARS, RECALL_SYSTEM_PROMPT, STOP_WORDS;
|
|
359230
|
+
var import_electron_log125, logger122, RECALL_MAX_NOTES, RECALL_TIMEOUT_MS, RECALL_MAX_OUTPUT_TOKENS, RECALL_MESSAGE_CHARS, WEIGHTS_FILE, WEIGHT_CAP, WEIGHT_BUMP, WEIGHT_DECAY_HALFLIFE_DAYS, RECALL_SYSTEM_PROMPT, STOP_WORDS, BM25_K1, BM25_B;
|
|
359106
359231
|
var init_recall = __esm({
|
|
359107
359232
|
"src/lib/memory/recall.ts"() {
|
|
359108
359233
|
import_electron_log125 = __toESM(require_src());
|
|
@@ -359111,6 +359236,10 @@ var init_recall = __esm({
|
|
|
359111
359236
|
RECALL_TIMEOUT_MS = 2500;
|
|
359112
359237
|
RECALL_MAX_OUTPUT_TOKENS = 512;
|
|
359113
359238
|
RECALL_MESSAGE_CHARS = 4e3;
|
|
359239
|
+
WEIGHTS_FILE = "weights.json";
|
|
359240
|
+
WEIGHT_CAP = 4;
|
|
359241
|
+
WEIGHT_BUMP = 0.5;
|
|
359242
|
+
WEIGHT_DECAY_HALFLIFE_DAYS = 14;
|
|
359114
359243
|
RECALL_SYSTEM_PROMPT = `You pick which of a project's memory notes an AI coding agent should have in front of it for the user's next message. You get the message and the notes, each as its file name, type, age and description.
|
|
359115
359244
|
Reply with JSON only, in the form {"files": ["<file>", ...]}: at most ${RECALL_MAX_NOTES} files, only notes clearly useful for THIS message, fewest first. Reply {"files": []} when none are.`;
|
|
359116
359245
|
STOP_WORDS = /* @__PURE__ */ new Set([
|
|
@@ -359173,6 +359302,8 @@ Reply with JSON only, in the form {"files": ["<file>", ...]}: at most ${RECALL_M
|
|
|
359173
359302
|
"after",
|
|
359174
359303
|
"make"
|
|
359175
359304
|
]);
|
|
359305
|
+
BM25_K1 = 1.2;
|
|
359306
|
+
BM25_B = 0.75;
|
|
359176
359307
|
}
|
|
359177
359308
|
});
|
|
359178
359309
|
|
|
@@ -359192,8 +359323,8 @@ __export(session_context_exports, {
|
|
|
359192
359323
|
renderRecalledNote: () => renderRecalledNote,
|
|
359193
359324
|
withMemoryContext: () => withMemoryContext
|
|
359194
359325
|
});
|
|
359195
|
-
import
|
|
359196
|
-
import
|
|
359326
|
+
import fs72 from "node:fs/promises";
|
|
359327
|
+
import path90 from "node:path";
|
|
359197
359328
|
function escapeRe2(s3) {
|
|
359198
359329
|
return s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
359199
359330
|
}
|
|
@@ -359293,7 +359424,7 @@ function deriveRecalledNotes(rows2) {
|
|
|
359293
359424
|
for (const row of rows2) {
|
|
359294
359425
|
if (row.role !== "user" || !row.modelContent) continue;
|
|
359295
359426
|
for (const m3 of row.modelContent.matchAll(re2)) {
|
|
359296
|
-
out.set(
|
|
359427
|
+
out.set(path90.basename(m3[1]), m3[2]);
|
|
359297
359428
|
}
|
|
359298
359429
|
}
|
|
359299
359430
|
return out;
|
|
@@ -359316,15 +359447,15 @@ ${SYSTEM_REMINDER_CLOSE}`;
|
|
|
359316
359447
|
async function readNotes(dir, now2) {
|
|
359317
359448
|
let names;
|
|
359318
359449
|
try {
|
|
359319
|
-
names = (await
|
|
359450
|
+
names = (await fs72.readdir(dir, { withFileTypes: true })).filter((e3) => e3.isFile() && e3.name.endsWith(".md") && e3.name !== MEMORY_INDEX_FILE).map((e3) => e3.name);
|
|
359320
359451
|
} catch {
|
|
359321
359452
|
return [];
|
|
359322
359453
|
}
|
|
359323
359454
|
const notes = await Promise.all(
|
|
359324
359455
|
names.map(async (file2) => {
|
|
359325
|
-
const abs =
|
|
359456
|
+
const abs = path90.join(dir, file2);
|
|
359326
359457
|
try {
|
|
359327
|
-
const [text5, st2] = await Promise.all([
|
|
359458
|
+
const [text5, st2] = await Promise.all([fs72.readFile(abs, "utf8"), fs72.stat(abs)]);
|
|
359328
359459
|
const fm = readNoteFrontmatter(text5);
|
|
359329
359460
|
const stamped = fm.modified ? Date.parse(fm.modified) : NaN;
|
|
359330
359461
|
const written = Number.isFinite(stamped) ? stamped : st2.mtimeMs;
|
|
@@ -359366,7 +359497,7 @@ async function buildMemoryTurnContext(args2) {
|
|
|
359366
359497
|
const parts = [];
|
|
359367
359498
|
let raw = "";
|
|
359368
359499
|
try {
|
|
359369
|
-
raw = await
|
|
359500
|
+
raw = await fs72.readFile(indexPath, "utf8");
|
|
359370
359501
|
} catch {
|
|
359371
359502
|
raw = "";
|
|
359372
359503
|
}
|
|
@@ -359399,7 +359530,8 @@ async function buildMemoryTurnContext(args2) {
|
|
|
359399
359530
|
message: args2.userText,
|
|
359400
359531
|
candidates,
|
|
359401
359532
|
chatId: args2.chatId,
|
|
359402
|
-
turnModel: args2.turnModel
|
|
359533
|
+
turnModel: args2.turnModel,
|
|
359534
|
+
memoryDir: dir
|
|
359403
359535
|
}).catch(() => []);
|
|
359404
359536
|
const byFile = new Map(fresh.map((n2) => [n2.file, n2]));
|
|
359405
359537
|
for (const file2 of chosen) {
|
|
@@ -359458,8 +359590,8 @@ __export(chat_stream_handlers_exports, {
|
|
|
359458
359590
|
removeThinkingTags: () => removeThinkingTags,
|
|
359459
359591
|
resolveModeChange: () => resolveModeChange
|
|
359460
359592
|
});
|
|
359461
|
-
import
|
|
359462
|
-
import * as
|
|
359593
|
+
import fs73 from "node:fs";
|
|
359594
|
+
import * as path91 from "path";
|
|
359463
359595
|
import * as os26 from "os";
|
|
359464
359596
|
import * as crypto7 from "crypto";
|
|
359465
359597
|
import { readFile as readFile14, writeFile as writeFile10, unlink as unlink2 } from "fs/promises";
|
|
@@ -359805,9 +359937,9 @@ function registerChatStreamHandlers() {
|
|
|
359805
359937
|
const hash3 = attachment.id || crypto7.createHash("md5").update(base64Data).digest("hex");
|
|
359806
359938
|
if (seenAttachmentHashes.has(hash3)) continue;
|
|
359807
359939
|
seenAttachmentHashes.add(hash3);
|
|
359808
|
-
const fileExtension =
|
|
359940
|
+
const fileExtension = path91.extname(attachment.name);
|
|
359809
359941
|
const filename = `${hash3}${fileExtension}`;
|
|
359810
|
-
const filePath =
|
|
359942
|
+
const filePath = path91.join(TEMP_DIR, filename);
|
|
359811
359943
|
await writeFile10(filePath, Buffer.from(base64Data, "base64"));
|
|
359812
359944
|
attachmentPaths.push(filePath);
|
|
359813
359945
|
const resolvedMimeType = mimeTypes[fileExtension] || "application/octet-stream";
|
|
@@ -360203,7 +360335,7 @@ ${hookContext.join("\n\n")}`
|
|
|
360203
360335
|
logger124.log(
|
|
360204
360336
|
`Using workspace for chat ${req.chatId}: ${appPath || "(none)"} (appId: ${effectiveAppId ?? req.appId ?? "n/a"})`
|
|
360205
360337
|
);
|
|
360206
|
-
if (hasWorkspace && appPath && !
|
|
360338
|
+
if (hasWorkspace && appPath && !fs73.existsSync(appPath)) {
|
|
360207
360339
|
logger124.warn(`Workspace path does not exist on disk: ${appPath}`);
|
|
360208
360340
|
safeSend(event.sender, "chat:activity", {
|
|
360209
360341
|
id: `workspace-path-missing-${req.chatId}`,
|
|
@@ -360908,7 +361040,7 @@ ${hookContext.join("\n\n")}`
|
|
|
360908
361040
|
try {
|
|
360909
361041
|
setTimeout(
|
|
360910
361042
|
async () => {
|
|
360911
|
-
if (
|
|
361043
|
+
if (fs73.existsSync(filePath)) {
|
|
360912
361044
|
await unlink2(filePath);
|
|
360913
361045
|
logger124.log(`Deleted temporary file: ${filePath}`);
|
|
360914
361046
|
}
|
|
@@ -361082,9 +361214,9 @@ var init_chat_stream_handlers = __esm({
|
|
|
361082
361214
|
init_finalize();
|
|
361083
361215
|
init_context_sections();
|
|
361084
361216
|
logger124 = import_electron_log127.default.scope("chat_stream_handlers");
|
|
361085
|
-
TEMP_DIR =
|
|
361086
|
-
if (!
|
|
361087
|
-
|
|
361217
|
+
TEMP_DIR = path91.join(os26.tmpdir(), "atlarix-attachments");
|
|
361218
|
+
if (!fs73.existsSync(TEMP_DIR)) {
|
|
361219
|
+
fs73.mkdirSync(TEMP_DIR, { recursive: true });
|
|
361088
361220
|
}
|
|
361089
361221
|
}
|
|
361090
361222
|
});
|
|
@@ -361100,13 +361232,13 @@ __export(temp_hygiene_exports, {
|
|
|
361100
361232
|
startTempHygiene: () => startTempHygiene,
|
|
361101
361233
|
sweepTempOnQuit: () => sweepTempOnQuit
|
|
361102
361234
|
});
|
|
361103
|
-
import
|
|
361235
|
+
import fs76 from "node:fs";
|
|
361104
361236
|
import fsp2 from "node:fs/promises";
|
|
361105
361237
|
import os28 from "node:os";
|
|
361106
361238
|
import net5 from "node:net";
|
|
361107
|
-
import
|
|
361239
|
+
import path93 from "node:path";
|
|
361108
361240
|
function leasesDir() {
|
|
361109
|
-
return
|
|
361241
|
+
return path93.join(os28.tmpdir(), LEASES_DIR_NAME);
|
|
361110
361242
|
}
|
|
361111
361243
|
function isAlive2(pid) {
|
|
361112
361244
|
try {
|
|
@@ -361119,9 +361251,9 @@ function isAlive2(pid) {
|
|
|
361119
361251
|
function registerTempLease(surface2) {
|
|
361120
361252
|
if (leasePath) return;
|
|
361121
361253
|
try {
|
|
361122
|
-
|
|
361123
|
-
const p2 =
|
|
361124
|
-
|
|
361254
|
+
fs76.mkdirSync(leasesDir(), { recursive: true });
|
|
361255
|
+
const p2 = path93.join(leasesDir(), `${process.pid}.json`);
|
|
361256
|
+
fs76.writeFileSync(p2, JSON.stringify({ pid: process.pid, surface: surface2, since: Date.now() }));
|
|
361125
361257
|
leasePath = p2;
|
|
361126
361258
|
process.once("exit", releaseTempLease);
|
|
361127
361259
|
} catch (e3) {
|
|
@@ -361131,7 +361263,7 @@ function registerTempLease(surface2) {
|
|
|
361131
361263
|
function releaseTempLease() {
|
|
361132
361264
|
if (!leasePath) return;
|
|
361133
361265
|
try {
|
|
361134
|
-
|
|
361266
|
+
fs76.rmSync(leasePath, { force: true });
|
|
361135
361267
|
} catch {
|
|
361136
361268
|
}
|
|
361137
361269
|
leasePath = null;
|
|
@@ -361177,12 +361309,12 @@ async function liveInboxPids() {
|
|
|
361177
361309
|
}
|
|
361178
361310
|
function inboxPath(pid) {
|
|
361179
361311
|
const own = peerSocketPath(process.platform, pid);
|
|
361180
|
-
return peerSocketDirOverride ?
|
|
361312
|
+
return peerSocketDirOverride ? path93.join(peerSocketDirOverride, path93.basename(own)) : own;
|
|
361181
361313
|
}
|
|
361182
361314
|
async function peerInboxPids() {
|
|
361183
361315
|
const own = peerSocketPath(process.platform, 0);
|
|
361184
|
-
const dir = peerSocketDirOverride ?? (process.platform === "win32" ? "\\\\.\\pipe\\" :
|
|
361185
|
-
const prefix =
|
|
361316
|
+
const dir = peerSocketDirOverride ?? (process.platform === "win32" ? "\\\\.\\pipe\\" : path93.dirname(own));
|
|
361317
|
+
const prefix = path93.basename(own).replace(/0(\.sock)?$/, "");
|
|
361186
361318
|
let names;
|
|
361187
361319
|
try {
|
|
361188
361320
|
names = await fsp2.readdir(dir);
|
|
@@ -361208,7 +361340,7 @@ async function otherLiveHolders() {
|
|
|
361208
361340
|
const pid = Number(m3[1]);
|
|
361209
361341
|
if (pid === process.pid) continue;
|
|
361210
361342
|
if (isAlive2(pid)) live2.add(pid);
|
|
361211
|
-
else await fsp2.rm(
|
|
361343
|
+
else await fsp2.rm(path93.join(leasesDir(), name30), { force: true }).catch(() => {
|
|
361212
361344
|
});
|
|
361213
361345
|
}
|
|
361214
361346
|
for (const pid of await liveInboxPids()) live2.add(pid);
|
|
@@ -361233,7 +361365,7 @@ async function sweepTempDirsCounting(opts) {
|
|
|
361233
361365
|
if (!entry.isDirectory()) continue;
|
|
361234
361366
|
if (entry.name === LEASES_DIR_NAME) continue;
|
|
361235
361367
|
if (LIVE_WHILE_RUNNING.has(entry.name) && (!opts.includeLive || others > 0)) continue;
|
|
361236
|
-
const full =
|
|
361368
|
+
const full = path93.join(root2, entry.name);
|
|
361237
361369
|
try {
|
|
361238
361370
|
if (entry.name.startsWith(OTHER_PROCESS_PREFIX)) {
|
|
361239
361371
|
const stat9 = await fsp2.stat(full);
|
|
@@ -361376,8 +361508,8 @@ set("ATLARIX_QUICKJS_WASM", assets.quickjsWasm);
|
|
|
361376
361508
|
registerBundledSkills(assets.skills);
|
|
361377
361509
|
|
|
361378
361510
|
// src/headless/atlarix-headless.mts
|
|
361379
|
-
import
|
|
361380
|
-
import
|
|
361511
|
+
import fs77 from "node:fs";
|
|
361512
|
+
import path94 from "node:path";
|
|
361381
361513
|
|
|
361382
361514
|
// src/lib/workspace-app-by-path.ts
|
|
361383
361515
|
init_db2();
|
|
@@ -361395,9 +361527,9 @@ async function workspaceAppIdForPath(dir) {
|
|
|
361395
361527
|
|
|
361396
361528
|
// src/headless/headless-runner.ts
|
|
361397
361529
|
init_fake_sender();
|
|
361398
|
-
import
|
|
361530
|
+
import fs74 from "node:fs";
|
|
361399
361531
|
import os27 from "node:os";
|
|
361400
|
-
import
|
|
361532
|
+
import path92 from "node:path";
|
|
361401
361533
|
|
|
361402
361534
|
// src/headless/auto-approve.ts
|
|
361403
361535
|
var sleep = (ms2) => new Promise((r3) => setTimeout(r3, ms2));
|
|
@@ -361533,6 +361665,8 @@ function createTrajectoryWriter(filePath, meta3) {
|
|
|
361533
361665
|
type: "tool_use",
|
|
361534
361666
|
ts: p2.timestamp ?? Date.now(),
|
|
361535
361667
|
toolCallId: p2.toolCallId,
|
|
361668
|
+
...p2.toolCallId === void 0 && typeof p2.id === "string" ? { id: p2.id } : {},
|
|
361669
|
+
...typeof p2.parentDelegationId === "string" ? { parentDelegationId: p2.parentDelegationId } : {},
|
|
361536
361670
|
toolName: p2.toolName,
|
|
361537
361671
|
status: p2.status,
|
|
361538
361672
|
args: p2.toolArgs,
|
|
@@ -361660,16 +361794,16 @@ async function runHeadlessAgent(opts) {
|
|
|
361660
361794
|
const mode = opts.mode ?? "build";
|
|
361661
361795
|
const resolveHandler = opts.resolveHandler ?? defaultResolveHandler;
|
|
361662
361796
|
if (!process.env.ATLARIX_USER_DATA_DIR) {
|
|
361663
|
-
process.env.ATLARIX_USER_DATA_DIR =
|
|
361664
|
-
|
|
361797
|
+
process.env.ATLARIX_USER_DATA_DIR = fs74.mkdtempSync(
|
|
361798
|
+
path92.join(os27.tmpdir(), "atlarix-headless-ud-")
|
|
361665
361799
|
);
|
|
361666
|
-
process.env.ATLARIX_HOME_DIR ??=
|
|
361800
|
+
process.env.ATLARIX_HOME_DIR ??= path92.join(os27.homedir(), ".atlarix");
|
|
361667
361801
|
}
|
|
361668
361802
|
process.env.ATLARIX_HEADLESS = "1";
|
|
361669
361803
|
process.env.ATLARIX_DISABLE_TEXT_TOOLS = "1";
|
|
361670
361804
|
if (!process.env.ATLARIX_MEMORY) process.env.ATLARIX_MEMORY = "off";
|
|
361671
361805
|
const userDataDir = process.env.ATLARIX_USER_DATA_DIR;
|
|
361672
|
-
|
|
361806
|
+
fs74.mkdirSync(userDataDir, { recursive: true });
|
|
361673
361807
|
const { initializeDatabase: initializeDatabase2 } = await Promise.resolve().then(() => (init_db2(), db_exports));
|
|
361674
361808
|
const db3 = initializeDatabase2();
|
|
361675
361809
|
const schema = await Promise.resolve().then(() => (init_schema(), schema_exports));
|
|
@@ -361706,7 +361840,7 @@ async function runHeadlessAgent(opts) {
|
|
|
361706
361840
|
effort: opts.effort
|
|
361707
361841
|
});
|
|
361708
361842
|
if (opts.provider.apiKey) setPinnedProviderKey(providerId, opts.provider.apiKey);
|
|
361709
|
-
|
|
361843
|
+
fs74.mkdirSync(settingsDir, { recursive: true });
|
|
361710
361844
|
if (!handlersRegistered) {
|
|
361711
361845
|
handlersRegistered = true;
|
|
361712
361846
|
const { registerChatStreamHandlers: registerChatStreamHandlers2 } = await Promise.resolve().then(() => (init_chat_stream_handlers(), chat_stream_handlers_exports));
|
|
@@ -361790,7 +361924,7 @@ init_core_proxy();
|
|
|
361790
361924
|
|
|
361791
361925
|
// src/headless/api-key-file.ts
|
|
361792
361926
|
init_pinned_provider_key();
|
|
361793
|
-
import
|
|
361927
|
+
import fs75 from "node:fs";
|
|
361794
361928
|
function pinApiKeyFile(file2, provider) {
|
|
361795
361929
|
if (provider.id === "compass") {
|
|
361796
361930
|
return { error: "--api-key-file is for your own provider's key, not Atlarix Core (use --core-token-file)" };
|
|
@@ -361804,8 +361938,8 @@ function pinApiKeyFile(file2, provider) {
|
|
|
361804
361938
|
} catch (e3) {
|
|
361805
361939
|
return { error: e3.message };
|
|
361806
361940
|
}
|
|
361807
|
-
const key =
|
|
361808
|
-
|
|
361941
|
+
const key = fs75.readFileSync(file2, "utf8");
|
|
361942
|
+
fs75.rmSync(file2, { force: true });
|
|
361809
361943
|
if (!key.trim()) return { error: "the --api-key-file was empty" };
|
|
361810
361944
|
setPinnedProviderKey(providerId, key);
|
|
361811
361945
|
return { providerId };
|
|
@@ -361840,7 +361974,7 @@ ${err2.stack}` : "";
|
|
|
361840
361974
|
}
|
|
361841
361975
|
|
|
361842
361976
|
// src/headless/atlarix-headless.mts
|
|
361843
|
-
var VERSION15 = false ? "dev" : "15.12.
|
|
361977
|
+
var VERSION15 = false ? "dev" : "15.12.4";
|
|
361844
361978
|
if (process.argv[2] === "run") process.argv.splice(2, 1);
|
|
361845
361979
|
var RUN_HELP = `atlarix run: one turn without the UI, for scripts and CI
|
|
361846
361980
|
|
|
@@ -361893,7 +362027,7 @@ async function main() {
|
|
|
361893
362027
|
registerTempLease2("headless");
|
|
361894
362028
|
const workspace = arg("workspace") ?? process.cwd();
|
|
361895
362029
|
const promptFile = arg("prompt-file");
|
|
361896
|
-
const prompt = promptFile ?
|
|
362030
|
+
const prompt = promptFile ? fs77.readFileSync(promptFile, "utf8") : arg("prompt");
|
|
361897
362031
|
if (!prompt) {
|
|
361898
362032
|
console.error("atlarix-headless: --prompt or --prompt-file is required");
|
|
361899
362033
|
process.exit(2);
|
|
@@ -361920,22 +362054,22 @@ async function main() {
|
|
|
361920
362054
|
if (a2 !== "--attach") return [];
|
|
361921
362055
|
const file2 = process.argv[i4 + 1];
|
|
361922
362056
|
if (!file2) return [];
|
|
361923
|
-
if (!
|
|
362057
|
+
if (!fs77.existsSync(file2)) {
|
|
361924
362058
|
console.error(`atlarix-headless: --attach ${file2}: no such file`);
|
|
361925
362059
|
process.exit(2);
|
|
361926
362060
|
}
|
|
361927
362061
|
return [
|
|
361928
362062
|
{
|
|
361929
|
-
name:
|
|
361930
|
-
type: ATTACH_MIME[
|
|
361931
|
-
data:
|
|
362063
|
+
name: path94.basename(file2),
|
|
362064
|
+
type: ATTACH_MIME[path94.extname(file2).toLowerCase()] ?? "application/octet-stream",
|
|
362065
|
+
data: fs77.readFileSync(file2).toString("base64")
|
|
361932
362066
|
}
|
|
361933
362067
|
];
|
|
361934
362068
|
});
|
|
361935
362069
|
const coreTokenFile = arg("core-token-file");
|
|
361936
362070
|
if (coreTokenFile) {
|
|
361937
|
-
setPinnedCoreToken(
|
|
361938
|
-
|
|
362071
|
+
setPinnedCoreToken(fs77.readFileSync(coreTokenFile, "utf8"));
|
|
362072
|
+
fs77.rmSync(coreTokenFile, { force: true });
|
|
361939
362073
|
}
|
|
361940
362074
|
const apiKeyFile = arg("api-key-file");
|
|
361941
362075
|
if (apiKeyFile) {
|
|
@@ -361965,7 +362099,7 @@ async function main() {
|
|
|
361965
362099
|
await refreshCoreModelOverrides2();
|
|
361966
362100
|
}
|
|
361967
362101
|
const res = await runHeadlessAgent({
|
|
361968
|
-
workspaceDir:
|
|
362102
|
+
workspaceDir: fs77.realpathSync(workspace),
|
|
361969
362103
|
prompt,
|
|
361970
362104
|
provider: {
|
|
361971
362105
|
// Default to the OpenRouter builtin (native FC + provider pin). Pass
|
|
@@ -361986,7 +362120,7 @@ async function main() {
|
|
|
361986
362120
|
});
|
|
361987
362121
|
if (outputFile) {
|
|
361988
362122
|
const { finalAnswerText: finalAnswerText2 } = await Promise.resolve().then(() => (init_assistant_message_parts(), assistant_message_parts_exports));
|
|
361989
|
-
|
|
362123
|
+
fs77.writeFileSync(outputFile, res.lastAssistant ? finalAnswerText2(res.lastAssistant) : "");
|
|
361990
362124
|
}
|
|
361991
362125
|
console.error(
|
|
361992
362126
|
`[atlarix-headless] completed=${res.completed} workspace=${workspace}` + (outputFile ? ` output=${outputFile}` : "")
|