atlarix 15.12.3 → 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
|
}
|
|
@@ -41609,45 +41609,45 @@ function createOpenAI(options2 = {}) {
|
|
|
41609
41609
|
);
|
|
41610
41610
|
const createChatModel = (modelId) => new OpenAIChatLanguageModel(modelId, {
|
|
41611
41611
|
provider: `${providerName}.chat`,
|
|
41612
|
-
url: ({ path:
|
|
41612
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41613
41613
|
headers: getHeaders,
|
|
41614
41614
|
fetch: options2.fetch
|
|
41615
41615
|
});
|
|
41616
41616
|
const createCompletionModel = (modelId) => new OpenAICompletionLanguageModel(modelId, {
|
|
41617
41617
|
provider: `${providerName}.completion`,
|
|
41618
|
-
url: ({ path:
|
|
41618
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41619
41619
|
headers: getHeaders,
|
|
41620
41620
|
fetch: options2.fetch
|
|
41621
41621
|
});
|
|
41622
41622
|
const createEmbeddingModel = (modelId) => new OpenAIEmbeddingModel(modelId, {
|
|
41623
41623
|
provider: `${providerName}.embedding`,
|
|
41624
|
-
url: ({ path:
|
|
41624
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41625
41625
|
headers: getHeaders,
|
|
41626
41626
|
fetch: options2.fetch
|
|
41627
41627
|
});
|
|
41628
41628
|
const createImageModel = (modelId) => new OpenAIImageModel(modelId, {
|
|
41629
41629
|
provider: `${providerName}.image`,
|
|
41630
|
-
url: ({ path:
|
|
41630
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41631
41631
|
headers: getHeaders,
|
|
41632
41632
|
fetch: options2.fetch
|
|
41633
41633
|
});
|
|
41634
41634
|
const createTranscriptionModel = (modelId) => new OpenAITranscriptionModel(modelId, {
|
|
41635
41635
|
provider: `${providerName}.transcription`,
|
|
41636
|
-
url: ({ path:
|
|
41636
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41637
41637
|
headers: getHeaders,
|
|
41638
41638
|
fetch: options2.fetch,
|
|
41639
41639
|
webSocket: options2.webSocket
|
|
41640
41640
|
});
|
|
41641
41641
|
const createSpeechTranslationModel = (modelId) => new OpenAISpeechTranslationModel(modelId, {
|
|
41642
41642
|
provider: `${providerName}.speech-translation`,
|
|
41643
|
-
url: ({ path:
|
|
41643
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41644
41644
|
headers: getHeaders,
|
|
41645
41645
|
fetch: options2.fetch,
|
|
41646
41646
|
webSocket: options2.webSocket
|
|
41647
41647
|
});
|
|
41648
41648
|
const createSpeechModel = (modelId) => new OpenAISpeechModel(modelId, {
|
|
41649
41649
|
provider: `${providerName}.speech`,
|
|
41650
|
-
url: ({ path:
|
|
41650
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41651
41651
|
headers: getHeaders,
|
|
41652
41652
|
fetch: options2.fetch
|
|
41653
41653
|
});
|
|
@@ -41659,7 +41659,7 @@ function createOpenAI(options2 = {}) {
|
|
|
41659
41659
|
});
|
|
41660
41660
|
const createSkills = () => new OpenAISkills({
|
|
41661
41661
|
provider: `${providerName}.skills`,
|
|
41662
|
-
url: ({ path:
|
|
41662
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41663
41663
|
headers: getHeaders,
|
|
41664
41664
|
fetch: options2.fetch
|
|
41665
41665
|
});
|
|
@@ -41674,7 +41674,7 @@ function createOpenAI(options2 = {}) {
|
|
|
41674
41674
|
const createResponsesModel = (modelId) => {
|
|
41675
41675
|
return new OpenAIResponsesBatchLanguageModel(modelId, {
|
|
41676
41676
|
provider: `${providerName}.responses`,
|
|
41677
|
-
url: ({ path:
|
|
41677
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
41678
41678
|
headers: getHeaders,
|
|
41679
41679
|
fetch: options2.fetch,
|
|
41680
41680
|
// Soft-deprecated. TODO: remove in v8
|
|
@@ -47528,10 +47528,10 @@ var init_dist5 = __esm({
|
|
|
47528
47528
|
result: conversion.result
|
|
47529
47529
|
};
|
|
47530
47530
|
}
|
|
47531
|
-
getUrl(
|
|
47531
|
+
getUrl(path95) {
|
|
47532
47532
|
return this.options.config.url({
|
|
47533
47533
|
modelId: this.options.modelId,
|
|
47534
|
-
path:
|
|
47534
|
+
path: path95
|
|
47535
47535
|
});
|
|
47536
47536
|
}
|
|
47537
47537
|
};
|
|
@@ -54557,8 +54557,8 @@ var init_dist6 = __esm({
|
|
|
54557
54557
|
yield await convertAnthropicBatchResult(line);
|
|
54558
54558
|
}
|
|
54559
54559
|
}
|
|
54560
|
-
getBatchUrl(
|
|
54561
|
-
return `${this.config.baseURL}/messages/batches${
|
|
54560
|
+
getBatchUrl(path95) {
|
|
54561
|
+
return `${this.config.baseURL}/messages/batches${path95}`;
|
|
54562
54562
|
}
|
|
54563
54563
|
async getStartBatchHeaders({
|
|
54564
54564
|
betas,
|
|
@@ -68396,8 +68396,8 @@ function createOpenAICompatible(options2) {
|
|
|
68396
68396
|
const getHeaders = () => withUserAgentSuffix(headers, `ai-sdk/openai-compatible/${VERSION6}`);
|
|
68397
68397
|
const getCommonModelConfig = (modelType) => ({
|
|
68398
68398
|
provider: `${providerName}.${modelType}`,
|
|
68399
|
-
url: ({ path:
|
|
68400
|
-
const url2 = new URL(`${baseURL}${
|
|
68399
|
+
url: ({ path: path95 }) => {
|
|
68400
|
+
const url2 = new URL(`${baseURL}${path95}`);
|
|
68401
68401
|
if (options2.queryParams) {
|
|
68402
68402
|
url2.search = new URLSearchParams(options2.queryParams).toString();
|
|
68403
68403
|
}
|
|
@@ -71303,8 +71303,8 @@ var require_windows = __commonJS({
|
|
|
71303
71303
|
"node_modules/isexe/windows.js"(exports2, module2) {
|
|
71304
71304
|
module2.exports = isexe;
|
|
71305
71305
|
isexe.sync = sync;
|
|
71306
|
-
var
|
|
71307
|
-
function checkPathExt(
|
|
71306
|
+
var fs78 = __require("fs");
|
|
71307
|
+
function checkPathExt(path95, options2) {
|
|
71308
71308
|
var pathext = options2.pathExt !== void 0 ? options2.pathExt : process.env.PATHEXT;
|
|
71309
71309
|
if (!pathext) {
|
|
71310
71310
|
return true;
|
|
@@ -71315,25 +71315,25 @@ var require_windows = __commonJS({
|
|
|
71315
71315
|
}
|
|
71316
71316
|
for (var i4 = 0; i4 < pathext.length; i4++) {
|
|
71317
71317
|
var p2 = pathext[i4].toLowerCase();
|
|
71318
|
-
if (p2 &&
|
|
71318
|
+
if (p2 && path95.substr(-p2.length).toLowerCase() === p2) {
|
|
71319
71319
|
return true;
|
|
71320
71320
|
}
|
|
71321
71321
|
}
|
|
71322
71322
|
return false;
|
|
71323
71323
|
}
|
|
71324
|
-
function checkStat(stat9,
|
|
71324
|
+
function checkStat(stat9, path95, options2) {
|
|
71325
71325
|
if (!stat9.isSymbolicLink() && !stat9.isFile()) {
|
|
71326
71326
|
return false;
|
|
71327
71327
|
}
|
|
71328
|
-
return checkPathExt(
|
|
71328
|
+
return checkPathExt(path95, options2);
|
|
71329
71329
|
}
|
|
71330
|
-
function isexe(
|
|
71331
|
-
|
|
71332
|
-
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));
|
|
71333
71333
|
});
|
|
71334
71334
|
}
|
|
71335
|
-
function sync(
|
|
71336
|
-
return checkStat(
|
|
71335
|
+
function sync(path95, options2) {
|
|
71336
|
+
return checkStat(fs78.statSync(path95), path95, options2);
|
|
71337
71337
|
}
|
|
71338
71338
|
}
|
|
71339
71339
|
});
|
|
@@ -71343,14 +71343,14 @@ var require_mode = __commonJS({
|
|
|
71343
71343
|
"node_modules/isexe/mode.js"(exports2, module2) {
|
|
71344
71344
|
module2.exports = isexe;
|
|
71345
71345
|
isexe.sync = sync;
|
|
71346
|
-
var
|
|
71347
|
-
function isexe(
|
|
71348
|
-
|
|
71346
|
+
var fs78 = __require("fs");
|
|
71347
|
+
function isexe(path95, options2, cb2) {
|
|
71348
|
+
fs78.stat(path95, function(er2, stat9) {
|
|
71349
71349
|
cb2(er2, er2 ? false : checkStat(stat9, options2));
|
|
71350
71350
|
});
|
|
71351
71351
|
}
|
|
71352
|
-
function sync(
|
|
71353
|
-
return checkStat(
|
|
71352
|
+
function sync(path95, options2) {
|
|
71353
|
+
return checkStat(fs78.statSync(path95), options2);
|
|
71354
71354
|
}
|
|
71355
71355
|
function checkStat(stat9, options2) {
|
|
71356
71356
|
return stat9.isFile() && checkMode(stat9, options2);
|
|
@@ -71374,7 +71374,7 @@ var require_mode = __commonJS({
|
|
|
71374
71374
|
// node_modules/isexe/index.js
|
|
71375
71375
|
var require_isexe = __commonJS({
|
|
71376
71376
|
"node_modules/isexe/index.js"(exports2, module2) {
|
|
71377
|
-
var
|
|
71377
|
+
var fs78 = __require("fs");
|
|
71378
71378
|
var core;
|
|
71379
71379
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
71380
71380
|
core = require_windows();
|
|
@@ -71383,7 +71383,7 @@ var require_isexe = __commonJS({
|
|
|
71383
71383
|
}
|
|
71384
71384
|
module2.exports = isexe;
|
|
71385
71385
|
isexe.sync = sync;
|
|
71386
|
-
function isexe(
|
|
71386
|
+
function isexe(path95, options2, cb2) {
|
|
71387
71387
|
if (typeof options2 === "function") {
|
|
71388
71388
|
cb2 = options2;
|
|
71389
71389
|
options2 = {};
|
|
@@ -71393,7 +71393,7 @@ var require_isexe = __commonJS({
|
|
|
71393
71393
|
throw new TypeError("callback not provided");
|
|
71394
71394
|
}
|
|
71395
71395
|
return new Promise(function(resolve16, reject2) {
|
|
71396
|
-
isexe(
|
|
71396
|
+
isexe(path95, options2 || {}, function(er2, is3) {
|
|
71397
71397
|
if (er2) {
|
|
71398
71398
|
reject2(er2);
|
|
71399
71399
|
} else {
|
|
@@ -71402,7 +71402,7 @@ var require_isexe = __commonJS({
|
|
|
71402
71402
|
});
|
|
71403
71403
|
});
|
|
71404
71404
|
}
|
|
71405
|
-
core(
|
|
71405
|
+
core(path95, options2 || {}, function(er2, is3) {
|
|
71406
71406
|
if (er2) {
|
|
71407
71407
|
if (er2.code === "EACCES" || options2 && options2.ignoreErrors) {
|
|
71408
71408
|
er2 = null;
|
|
@@ -71412,9 +71412,9 @@ var require_isexe = __commonJS({
|
|
|
71412
71412
|
cb2(er2, is3);
|
|
71413
71413
|
});
|
|
71414
71414
|
}
|
|
71415
|
-
function sync(
|
|
71415
|
+
function sync(path95, options2) {
|
|
71416
71416
|
try {
|
|
71417
|
-
return core.sync(
|
|
71417
|
+
return core.sync(path95, options2 || {});
|
|
71418
71418
|
} catch (er2) {
|
|
71419
71419
|
if (options2 && options2.ignoreErrors || er2.code === "EACCES") {
|
|
71420
71420
|
return false;
|
|
@@ -71430,7 +71430,7 @@ var require_isexe = __commonJS({
|
|
|
71430
71430
|
var require_which = __commonJS({
|
|
71431
71431
|
"node_modules/which/which.js"(exports2, module2) {
|
|
71432
71432
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
71433
|
-
var
|
|
71433
|
+
var path95 = __require("path");
|
|
71434
71434
|
var COLON2 = isWindows ? ";" : ":";
|
|
71435
71435
|
var isexe = require_isexe();
|
|
71436
71436
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -71468,7 +71468,7 @@ var require_which = __commonJS({
|
|
|
71468
71468
|
return opt.all && found.length ? resolve16(found) : reject2(getNotFoundError(cmd));
|
|
71469
71469
|
const ppRaw = pathEnv[i4];
|
|
71470
71470
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
71471
|
-
const pCmd =
|
|
71471
|
+
const pCmd = path95.join(pathPart, cmd);
|
|
71472
71472
|
const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
71473
71473
|
resolve16(subStep(p2, i4, 0));
|
|
71474
71474
|
});
|
|
@@ -71495,7 +71495,7 @@ var require_which = __commonJS({
|
|
|
71495
71495
|
for (let i4 = 0; i4 < pathEnv.length; i4++) {
|
|
71496
71496
|
const ppRaw = pathEnv[i4];
|
|
71497
71497
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
71498
|
-
const pCmd =
|
|
71498
|
+
const pCmd = path95.join(pathPart, cmd);
|
|
71499
71499
|
const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
71500
71500
|
for (let j2 = 0; j2 < pathExt.length; j2++) {
|
|
71501
71501
|
const cur = p2 + pathExt[j2];
|
|
@@ -71543,7 +71543,7 @@ var require_path_key = __commonJS({
|
|
|
71543
71543
|
var require_resolveCommand = __commonJS({
|
|
71544
71544
|
"node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
71545
71545
|
"use strict";
|
|
71546
|
-
var
|
|
71546
|
+
var path95 = __require("path");
|
|
71547
71547
|
var which = require_which();
|
|
71548
71548
|
var getPathKey = require_path_key();
|
|
71549
71549
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -71561,7 +71561,7 @@ var require_resolveCommand = __commonJS({
|
|
|
71561
71561
|
try {
|
|
71562
71562
|
resolved2 = which.sync(parsed.command, {
|
|
71563
71563
|
path: env3[getPathKey({ env: env3 })],
|
|
71564
|
-
pathExt: withoutPathExt ?
|
|
71564
|
+
pathExt: withoutPathExt ? path95.delimiter : void 0
|
|
71565
71565
|
});
|
|
71566
71566
|
} catch (e3) {
|
|
71567
71567
|
} finally {
|
|
@@ -71570,7 +71570,7 @@ var require_resolveCommand = __commonJS({
|
|
|
71570
71570
|
}
|
|
71571
71571
|
}
|
|
71572
71572
|
if (resolved2) {
|
|
71573
|
-
resolved2 =
|
|
71573
|
+
resolved2 = path95.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved2);
|
|
71574
71574
|
}
|
|
71575
71575
|
return resolved2;
|
|
71576
71576
|
}
|
|
@@ -71624,8 +71624,8 @@ var require_shebang_command = __commonJS({
|
|
|
71624
71624
|
if (!match) {
|
|
71625
71625
|
return null;
|
|
71626
71626
|
}
|
|
71627
|
-
const [
|
|
71628
|
-
const binary =
|
|
71627
|
+
const [path95, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
71628
|
+
const binary = path95.split("/").pop();
|
|
71629
71629
|
if (binary === "env") {
|
|
71630
71630
|
return argument;
|
|
71631
71631
|
}
|
|
@@ -71638,16 +71638,16 @@ var require_shebang_command = __commonJS({
|
|
|
71638
71638
|
var require_readShebang = __commonJS({
|
|
71639
71639
|
"node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
71640
71640
|
"use strict";
|
|
71641
|
-
var
|
|
71641
|
+
var fs78 = __require("fs");
|
|
71642
71642
|
var shebangCommand = require_shebang_command();
|
|
71643
71643
|
function readShebang(command) {
|
|
71644
71644
|
const size2 = 150;
|
|
71645
71645
|
const buffer = Buffer.alloc(size2);
|
|
71646
71646
|
let fd2;
|
|
71647
71647
|
try {
|
|
71648
|
-
fd2 =
|
|
71649
|
-
|
|
71650
|
-
|
|
71648
|
+
fd2 = fs78.openSync(command, "r");
|
|
71649
|
+
fs78.readSync(fd2, buffer, 0, size2, 0);
|
|
71650
|
+
fs78.closeSync(fd2);
|
|
71651
71651
|
} catch (e3) {
|
|
71652
71652
|
}
|
|
71653
71653
|
return shebangCommand(buffer.toString());
|
|
@@ -71660,7 +71660,7 @@ var require_readShebang = __commonJS({
|
|
|
71660
71660
|
var require_parse = __commonJS({
|
|
71661
71661
|
"node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
71662
71662
|
"use strict";
|
|
71663
|
-
var
|
|
71663
|
+
var path95 = __require("path");
|
|
71664
71664
|
var resolveCommand = require_resolveCommand();
|
|
71665
71665
|
var escape2 = require_escape();
|
|
71666
71666
|
var readShebang = require_readShebang();
|
|
@@ -71685,7 +71685,7 @@ var require_parse = __commonJS({
|
|
|
71685
71685
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
71686
71686
|
if (parsed.options.forceShell || needsShell) {
|
|
71687
71687
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
71688
|
-
parsed.command =
|
|
71688
|
+
parsed.command = path95.normalize(parsed.command);
|
|
71689
71689
|
parsed.command = escape2.command(parsed.command);
|
|
71690
71690
|
parsed.args = parsed.args.map((arg2) => escape2.argument(arg2, needsDoubleEscapeMetaChars));
|
|
71691
71691
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -71817,7 +71817,7 @@ var require_strip_final_newline = __commonJS({
|
|
|
71817
71817
|
var require_npm_run_path = __commonJS({
|
|
71818
71818
|
"node_modules/shell-env/node_modules/npm-run-path/index.js"(exports2, module2) {
|
|
71819
71819
|
"use strict";
|
|
71820
|
-
var
|
|
71820
|
+
var path95 = __require("path");
|
|
71821
71821
|
var pathKey2 = require_path_key();
|
|
71822
71822
|
var npmRunPath = (options2) => {
|
|
71823
71823
|
options2 = {
|
|
@@ -71827,16 +71827,16 @@ var require_npm_run_path = __commonJS({
|
|
|
71827
71827
|
...options2
|
|
71828
71828
|
};
|
|
71829
71829
|
let previous2;
|
|
71830
|
-
let cwdPath =
|
|
71830
|
+
let cwdPath = path95.resolve(options2.cwd);
|
|
71831
71831
|
const result2 = [];
|
|
71832
71832
|
while (previous2 !== cwdPath) {
|
|
71833
|
-
result2.push(
|
|
71833
|
+
result2.push(path95.join(cwdPath, "node_modules/.bin"));
|
|
71834
71834
|
previous2 = cwdPath;
|
|
71835
|
-
cwdPath =
|
|
71835
|
+
cwdPath = path95.resolve(cwdPath, "..");
|
|
71836
71836
|
}
|
|
71837
|
-
const execPathDir =
|
|
71837
|
+
const execPathDir = path95.resolve(options2.cwd, options2.execPath, "..");
|
|
71838
71838
|
result2.push(execPathDir);
|
|
71839
|
-
return result2.concat(options2.path).join(
|
|
71839
|
+
return result2.concat(options2.path).join(path95.delimiter);
|
|
71840
71840
|
};
|
|
71841
71841
|
module2.exports = npmRunPath;
|
|
71842
71842
|
module2.exports.default = npmRunPath;
|
|
@@ -71846,9 +71846,9 @@ var require_npm_run_path = __commonJS({
|
|
|
71846
71846
|
...options2
|
|
71847
71847
|
};
|
|
71848
71848
|
const env3 = { ...options2.env };
|
|
71849
|
-
const
|
|
71850
|
-
options2.path = env3[
|
|
71851
|
-
env3[
|
|
71849
|
+
const path96 = pathKey2({ env: env3 });
|
|
71850
|
+
options2.path = env3[path96];
|
|
71851
|
+
env3[path96] = module2.exports(options2);
|
|
71852
71852
|
return env3;
|
|
71853
71853
|
};
|
|
71854
71854
|
}
|
|
@@ -73030,7 +73030,7 @@ var require_command = __commonJS({
|
|
|
73030
73030
|
var require_execa = __commonJS({
|
|
73031
73031
|
"node_modules/shell-env/node_modules/execa/index.js"(exports2, module2) {
|
|
73032
73032
|
"use strict";
|
|
73033
|
-
var
|
|
73033
|
+
var path95 = __require("path");
|
|
73034
73034
|
var childProcess = __require("child_process");
|
|
73035
73035
|
var crossSpawn = require_cross_spawn();
|
|
73036
73036
|
var stripFinalNewline = require_strip_final_newline();
|
|
@@ -73072,7 +73072,7 @@ var require_execa = __commonJS({
|
|
|
73072
73072
|
};
|
|
73073
73073
|
options2.env = getEnv(options2);
|
|
73074
73074
|
options2.stdio = normalizeStdio(options2);
|
|
73075
|
-
if (process.platform === "win32" &&
|
|
73075
|
+
if (process.platform === "win32" && path95.basename(file2, ".exe") === "cmd") {
|
|
73076
73076
|
args2.unshift("/q");
|
|
73077
73077
|
}
|
|
73078
73078
|
return { file: file2, args: args2, options: options2, parsed };
|
|
@@ -75476,13 +75476,13 @@ var require_tiktoken = __commonJS({
|
|
|
75476
75476
|
var wasm = require_tiktoken_bg();
|
|
75477
75477
|
var imports = {};
|
|
75478
75478
|
imports["./tiktoken_bg.js"] = wasm;
|
|
75479
|
-
var
|
|
75480
|
-
var
|
|
75481
|
-
var candidates = __dirname.split(
|
|
75482
|
-
const prefix = array3.slice(0, index2 + 1).join(
|
|
75483
|
-
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)) {
|
|
75484
75484
|
memo.unshift(
|
|
75485
|
-
|
|
75485
|
+
path95.join(
|
|
75486
75486
|
prefix,
|
|
75487
75487
|
"node_modules",
|
|
75488
75488
|
"tiktoken",
|
|
@@ -75493,11 +75493,11 @@ var require_tiktoken = __commonJS({
|
|
|
75493
75493
|
}
|
|
75494
75494
|
return memo;
|
|
75495
75495
|
}, []);
|
|
75496
|
-
candidates.unshift(
|
|
75496
|
+
candidates.unshift(path95.join(__dirname, "./tiktoken_bg.wasm"));
|
|
75497
75497
|
var bytes = null;
|
|
75498
75498
|
for (const candidate of candidates) {
|
|
75499
75499
|
try {
|
|
75500
|
-
bytes =
|
|
75500
|
+
bytes = fs78.readFileSync(candidate);
|
|
75501
75501
|
break;
|
|
75502
75502
|
} catch {
|
|
75503
75503
|
}
|
|
@@ -76046,13 +76046,13 @@ function __disposeResources(env3) {
|
|
|
76046
76046
|
}
|
|
76047
76047
|
return next();
|
|
76048
76048
|
}
|
|
76049
|
-
function __rewriteRelativeImportExtension(
|
|
76050
|
-
if (typeof
|
|
76051
|
-
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) {
|
|
76052
76052
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d2 && (!ext || !cm) ? m3 : d2 + ext + "." + cm.toLowerCase() + "js";
|
|
76053
76053
|
});
|
|
76054
76054
|
}
|
|
76055
|
-
return
|
|
76055
|
+
return path95;
|
|
76056
76056
|
}
|
|
76057
76057
|
var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
|
|
76058
76058
|
var init_tslib_es6 = __esm({
|
|
@@ -84655,8 +84655,8 @@ var require_main4 = __commonJS({
|
|
|
84655
84655
|
});
|
|
84656
84656
|
|
|
84657
84657
|
// node_modules/iceberg-js/dist/index.mjs
|
|
84658
|
-
function buildUrl(baseUrl,
|
|
84659
|
-
const url2 = new URL(
|
|
84658
|
+
function buildUrl(baseUrl, path95, query) {
|
|
84659
|
+
const url2 = new URL(path95, baseUrl);
|
|
84660
84660
|
if (query) {
|
|
84661
84661
|
for (const [key, value] of Object.entries(query)) {
|
|
84662
84662
|
if (value !== void 0) {
|
|
@@ -84686,12 +84686,12 @@ function createFetchClient(options2) {
|
|
|
84686
84686
|
return {
|
|
84687
84687
|
async request({
|
|
84688
84688
|
method,
|
|
84689
|
-
path:
|
|
84689
|
+
path: path95,
|
|
84690
84690
|
query,
|
|
84691
84691
|
body,
|
|
84692
84692
|
headers
|
|
84693
84693
|
}) {
|
|
84694
|
-
const url2 = buildUrl(options2.baseUrl,
|
|
84694
|
+
const url2 = buildUrl(options2.baseUrl, path95, query);
|
|
84695
84695
|
const authHeaders = await buildAuthHeaders(options2.auth);
|
|
84696
84696
|
const res = await fetchFn(url2, {
|
|
84697
84697
|
method,
|
|
@@ -85359,7 +85359,7 @@ var init_dist12 = __esm({
|
|
|
85359
85359
|
if (bucketName.includes("/") || bucketName.includes("\\")) return false;
|
|
85360
85360
|
return /^[\w!.\*'() &$@=;:+,?-]+$/.test(bucketName);
|
|
85361
85361
|
};
|
|
85362
|
-
encodeStoragePath = (
|
|
85362
|
+
encodeStoragePath = (path95) => path95.split("/").map(encodeURIComponent).join("/");
|
|
85363
85363
|
_getErrorMessage = (err2) => {
|
|
85364
85364
|
if (typeof err2 === "object" && err2 !== null) {
|
|
85365
85365
|
const e3 = err2;
|
|
@@ -85591,7 +85591,7 @@ var init_dist12 = __esm({
|
|
|
85591
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.
|
|
85592
85592
|
* @param fileBody The body of the file to be stored in the bucket.
|
|
85593
85593
|
*/
|
|
85594
|
-
async uploadOrUpdate(method,
|
|
85594
|
+
async uploadOrUpdate(method, path95, fileBody, fileOptions) {
|
|
85595
85595
|
var _this = this;
|
|
85596
85596
|
return _this.handleOperation(async () => {
|
|
85597
85597
|
let body;
|
|
@@ -85615,7 +85615,7 @@ var init_dist12 = __esm({
|
|
|
85615
85615
|
if ((typeof ReadableStream !== "undefined" && body instanceof ReadableStream || body && typeof body === "object" && "pipe" in body && typeof body.pipe === "function") && !options2.duplex) options2.duplex = "half";
|
|
85616
85616
|
}
|
|
85617
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);
|
|
85618
|
-
const cleanPath = _this._removeEmptyFolders(
|
|
85618
|
+
const cleanPath = _this._removeEmptyFolders(path95);
|
|
85619
85619
|
const _path = _this._getFinalPath(cleanPath);
|
|
85620
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 } : {}));
|
|
85621
85621
|
return {
|
|
@@ -85692,8 +85692,8 @@ var init_dist12 = __esm({
|
|
|
85692
85692
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
85693
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.
|
|
85694
85694
|
*/
|
|
85695
|
-
async upload(
|
|
85696
|
-
return this.uploadOrUpdate("POST",
|
|
85695
|
+
async upload(path95, fileBody, fileOptions) {
|
|
85696
|
+
return this.uploadOrUpdate("POST", path95, fileBody, fileOptions);
|
|
85697
85697
|
}
|
|
85698
85698
|
/**
|
|
85699
85699
|
* Upload a file with a token generated from `createSignedUploadUrl`.
|
|
@@ -85733,9 +85733,9 @@ var init_dist12 = __esm({
|
|
|
85733
85733
|
* - `objects` table permissions: none
|
|
85734
85734
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
85735
85735
|
*/
|
|
85736
|
-
async uploadToSignedUrl(
|
|
85736
|
+
async uploadToSignedUrl(path95, token2, fileBody, fileOptions) {
|
|
85737
85737
|
var _this3 = this;
|
|
85738
|
-
const cleanPath = _this3._removeEmptyFolders(
|
|
85738
|
+
const cleanPath = _this3._removeEmptyFolders(path95);
|
|
85739
85739
|
const _path = _this3._getFinalPath(cleanPath);
|
|
85740
85740
|
const url2 = new URL(_this3.url + `/object/upload/sign/${_path}`);
|
|
85741
85741
|
url2.searchParams.set("token", token2);
|
|
@@ -85804,10 +85804,10 @@ var init_dist12 = __esm({
|
|
|
85804
85804
|
* - `objects` table permissions: `insert`
|
|
85805
85805
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
85806
85806
|
*/
|
|
85807
|
-
async createSignedUploadUrl(
|
|
85807
|
+
async createSignedUploadUrl(path95, options2) {
|
|
85808
85808
|
var _this4 = this;
|
|
85809
85809
|
return _this4.handleOperation(async () => {
|
|
85810
|
-
let _path = _this4._getFinalPath(
|
|
85810
|
+
let _path = _this4._getFinalPath(path95);
|
|
85811
85811
|
const headers = _objectSpread22({}, _this4.headers);
|
|
85812
85812
|
if (options2 === null || options2 === void 0 ? void 0 : options2.upsert) headers["x-upsert"] = "true";
|
|
85813
85813
|
const data = await post(_this4.fetch, `${_this4.url}/object/upload/sign/${_path}`, {}, { headers });
|
|
@@ -85816,7 +85816,7 @@ var init_dist12 = __esm({
|
|
|
85816
85816
|
if (!token2) throw new StorageError("No token returned by API");
|
|
85817
85817
|
return {
|
|
85818
85818
|
signedUrl: url2.toString(),
|
|
85819
|
-
path:
|
|
85819
|
+
path: path95,
|
|
85820
85820
|
token: token2
|
|
85821
85821
|
};
|
|
85822
85822
|
});
|
|
@@ -85876,8 +85876,8 @@ var init_dist12 = __esm({
|
|
|
85876
85876
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
85877
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.
|
|
85878
85878
|
*/
|
|
85879
|
-
async update(
|
|
85880
|
-
return this.uploadOrUpdate("PUT",
|
|
85879
|
+
async update(path95, fileBody, fileOptions) {
|
|
85880
|
+
return this.uploadOrUpdate("PUT", path95, fileBody, fileOptions);
|
|
85881
85881
|
}
|
|
85882
85882
|
/**
|
|
85883
85883
|
* Moves an existing file to a new path in the same bucket.
|
|
@@ -86028,10 +86028,10 @@ var init_dist12 = __esm({
|
|
|
86028
86028
|
* - `objects` table permissions: `select`
|
|
86029
86029
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
86030
86030
|
*/
|
|
86031
|
-
async createSignedUrl(
|
|
86031
|
+
async createSignedUrl(path95, expiresIn, options2) {
|
|
86032
86032
|
var _this8 = this;
|
|
86033
86033
|
return _this8.handleOperation(async () => {
|
|
86034
|
-
let _path = _this8._getFinalPath(
|
|
86034
|
+
let _path = _this8._getFinalPath(path95);
|
|
86035
86035
|
const hasTransform = typeof (options2 === null || options2 === void 0 ? void 0 : options2.transform) === "object" && options2.transform !== null && Object.keys(options2.transform).length > 0;
|
|
86036
86036
|
let data = await post(_this8.fetch, `${_this8.url}/object/sign/${_path}`, _objectSpread22({ expiresIn }, hasTransform ? { transform: options2.transform } : {}), { headers: _this8.headers });
|
|
86037
86037
|
const query = new URLSearchParams();
|
|
@@ -86166,13 +86166,13 @@ var init_dist12 = __esm({
|
|
|
86166
86166
|
* - `objects` table permissions: `select`
|
|
86167
86167
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
86168
86168
|
*/
|
|
86169
|
-
download(
|
|
86169
|
+
download(path95, options2, parameters) {
|
|
86170
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";
|
|
86171
86171
|
const query = new URLSearchParams();
|
|
86172
86172
|
if (options2 === null || options2 === void 0 ? void 0 : options2.transform) this.applyTransformOptsToQuery(query, options2.transform);
|
|
86173
86173
|
if ((options2 === null || options2 === void 0 ? void 0 : options2.cacheNonce) != null) query.set("cacheNonce", String(options2.cacheNonce));
|
|
86174
86174
|
const queryString = query.toString();
|
|
86175
|
-
const _path = this._getFinalPath(
|
|
86175
|
+
const _path = this._getFinalPath(path95);
|
|
86176
86176
|
const downloadFn = () => get(this.fetch, `${this.url}/${renderPath}/${_path}${queryString ? `?${queryString}` : ""}`, {
|
|
86177
86177
|
headers: this.headers,
|
|
86178
86178
|
noResolveJson: true
|
|
@@ -86203,9 +86203,9 @@ var init_dist12 = __esm({
|
|
|
86203
86203
|
* }
|
|
86204
86204
|
* ```
|
|
86205
86205
|
*/
|
|
86206
|
-
async info(
|
|
86206
|
+
async info(path95) {
|
|
86207
86207
|
var _this10 = this;
|
|
86208
|
-
const _path = _this10._getFinalPath(
|
|
86208
|
+
const _path = _this10._getFinalPath(path95);
|
|
86209
86209
|
return _this10.handleOperation(async () => {
|
|
86210
86210
|
return recursiveToCamel(await get(_this10.fetch, `${_this10.url}/object/info/${_path}`, { headers: _this10.headers }));
|
|
86211
86211
|
});
|
|
@@ -86226,9 +86226,9 @@ var init_dist12 = __esm({
|
|
|
86226
86226
|
* .exists('folder/avatar1.png')
|
|
86227
86227
|
* ```
|
|
86228
86228
|
*/
|
|
86229
|
-
async exists(
|
|
86229
|
+
async exists(path95) {
|
|
86230
86230
|
var _this11 = this;
|
|
86231
|
-
const _path = _this11._getFinalPath(
|
|
86231
|
+
const _path = _this11._getFinalPath(path95);
|
|
86232
86232
|
try {
|
|
86233
86233
|
await head(_this11.fetch, `${_this11.url}/object/${_path}`, { headers: _this11.headers });
|
|
86234
86234
|
return {
|
|
@@ -86307,8 +86307,8 @@ var init_dist12 = __esm({
|
|
|
86307
86307
|
* - `objects` table permissions: none
|
|
86308
86308
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
86309
86309
|
*/
|
|
86310
|
-
getPublicUrl(
|
|
86311
|
-
const _path = this._getFinalPath(
|
|
86310
|
+
getPublicUrl(path95, options2) {
|
|
86311
|
+
const _path = this._getFinalPath(path95);
|
|
86312
86312
|
const query = new URLSearchParams();
|
|
86313
86313
|
if (options2 === null || options2 === void 0 ? void 0 : options2.download) query.set("download", options2.download === true ? "" : options2.download);
|
|
86314
86314
|
if (options2 === null || options2 === void 0 ? void 0 : options2.transform) this.applyTransformOptsToQuery(query, options2.transform);
|
|
@@ -86397,10 +86397,10 @@ var init_dist12 = __esm({
|
|
|
86397
86397
|
* .purgeCache('folder/avatar1.png', { transformations: true })
|
|
86398
86398
|
* ```
|
|
86399
86399
|
*/
|
|
86400
|
-
async purgeCache(
|
|
86400
|
+
async purgeCache(path95, options2, parameters) {
|
|
86401
86401
|
var _this13 = this;
|
|
86402
86402
|
return _this13.handleOperation(async () => {
|
|
86403
|
-
const _path = encodeStoragePath(_this13._getFinalPath(
|
|
86403
|
+
const _path = encodeStoragePath(_this13._getFinalPath(path95));
|
|
86404
86404
|
const query = new URLSearchParams();
|
|
86405
86405
|
if (options2 === null || options2 === void 0 ? void 0 : options2.transformations) query.set("transformations", "true");
|
|
86406
86406
|
const queryString = query.toString();
|
|
@@ -86498,13 +86498,13 @@ var init_dist12 = __esm({
|
|
|
86498
86498
|
* - `objects` table permissions: `select`
|
|
86499
86499
|
* - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works
|
|
86500
86500
|
*/
|
|
86501
|
-
async list(
|
|
86501
|
+
async list(path95, options2, parameters) {
|
|
86502
86502
|
var _this14 = this;
|
|
86503
86503
|
return _this14.handleOperation(async () => {
|
|
86504
86504
|
const sortBy2 = (options2 === null || options2 === void 0 ? void 0 : options2.sortBy) ? _objectSpread22(_objectSpread22({}, DEFAULT_SEARCH_OPTIONS.sortBy), options2.sortBy) : DEFAULT_SEARCH_OPTIONS.sortBy;
|
|
86505
86505
|
const body = _objectSpread22(_objectSpread22(_objectSpread22({}, DEFAULT_SEARCH_OPTIONS), options2), {}, {
|
|
86506
86506
|
sortBy: sortBy2,
|
|
86507
|
-
prefix:
|
|
86507
|
+
prefix: path95 || ""
|
|
86508
86508
|
});
|
|
86509
86509
|
return await post(_this14.fetch, `${_this14.url}/object/list/${_this14.bucketId}`, body, { headers: _this14.headers }, parameters);
|
|
86510
86510
|
});
|
|
@@ -86570,11 +86570,11 @@ var init_dist12 = __esm({
|
|
|
86570
86570
|
if (typeof Buffer !== "undefined") return Buffer.from(data).toString("base64");
|
|
86571
86571
|
return btoa(data);
|
|
86572
86572
|
}
|
|
86573
|
-
_getFinalPath(
|
|
86574
|
-
return `${this.bucketId}/${
|
|
86573
|
+
_getFinalPath(path95) {
|
|
86574
|
+
return `${this.bucketId}/${path95.replace(/^\/+/, "")}`;
|
|
86575
86575
|
}
|
|
86576
|
-
_removeEmptyFolders(
|
|
86577
|
-
return
|
|
86576
|
+
_removeEmptyFolders(path95) {
|
|
86577
|
+
return path95.replace(/^\/|\/$/g, "").replace(/\/+/g, "/");
|
|
86578
86578
|
}
|
|
86579
86579
|
/** Modifies the `query`, appending values the from `transform` */
|
|
86580
86580
|
applyTransformOptsToQuery(query, transform2) {
|
|
@@ -88676,9 +88676,9 @@ var require_helpers = __commonJS({
|
|
|
88676
88676
|
const fragment = hashIndex === -1 ? "" : redirectTo.slice(hashIndex);
|
|
88677
88677
|
const queryIndex = base.indexOf("?");
|
|
88678
88678
|
if (queryIndex !== -1) {
|
|
88679
|
-
const
|
|
88679
|
+
const path95 = base.slice(0, queryIndex);
|
|
88680
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}=`));
|
|
88681
|
-
base = remaining.length > 0 ? `${
|
|
88681
|
+
base = remaining.length > 0 ? `${path95}?${remaining.join("&")}` : path95;
|
|
88682
88682
|
}
|
|
88683
88683
|
const separator = base.includes("?") ? "&" : "?";
|
|
88684
88684
|
return `${base}${separator}${constants_1.PKCE_FLOW_ID_PARAM}=${encodeURIComponent(flowId)}${fragment}`;
|
|
@@ -140719,14 +140719,14 @@ __export(account_connectors_exports, {
|
|
|
140719
140719
|
updateConnector: () => updateConnector,
|
|
140720
140720
|
waitForConnectorCredential: () => waitForConnectorCredential
|
|
140721
140721
|
});
|
|
140722
|
-
async function proxyPost(
|
|
140722
|
+
async function proxyPost(path95, payload) {
|
|
140723
140723
|
const base = getCoreProxyBaseUrl();
|
|
140724
140724
|
if (!base) return null;
|
|
140725
140725
|
const session2 = await getSession();
|
|
140726
140726
|
const token2 = session2?.access_token;
|
|
140727
140727
|
if (!token2 || token2 === "atlarix-headless") return null;
|
|
140728
140728
|
try {
|
|
140729
|
-
const res = await coreProxyFetch(`${base}${
|
|
140729
|
+
const res = await coreProxyFetch(`${base}${path95}`, {
|
|
140730
140730
|
method: "POST",
|
|
140731
140731
|
headers: {
|
|
140732
140732
|
"Content-Type": "application/json",
|
|
@@ -140737,12 +140737,12 @@ async function proxyPost(path94, payload) {
|
|
|
140737
140737
|
});
|
|
140738
140738
|
const body = await res.json().catch(() => ({}));
|
|
140739
140739
|
if (!res.ok) {
|
|
140740
|
-
logger21.warn(`[account-connectors] ${
|
|
140740
|
+
logger21.warn(`[account-connectors] ${path95} \u2192 ${res.status}: ${body?.error ?? ""}`);
|
|
140741
140741
|
return null;
|
|
140742
140742
|
}
|
|
140743
140743
|
return body;
|
|
140744
140744
|
} catch (err2) {
|
|
140745
|
-
logger21.warn(`[account-connectors] ${
|
|
140745
|
+
logger21.warn(`[account-connectors] ${path95} threw:`, err2);
|
|
140746
140746
|
return null;
|
|
140747
140747
|
}
|
|
140748
140748
|
}
|
|
@@ -140812,7 +140812,7 @@ async function rpc(fn2, input) {
|
|
|
140812
140812
|
clearAccountConnectorsCache();
|
|
140813
140813
|
}
|
|
140814
140814
|
}
|
|
140815
|
-
async function proxyWrite(
|
|
140815
|
+
async function proxyWrite(path95, payload) {
|
|
140816
140816
|
const base = getCoreProxyBaseUrl();
|
|
140817
140817
|
const session2 = await getSession();
|
|
140818
140818
|
const token2 = session2?.access_token;
|
|
@@ -140820,7 +140820,7 @@ async function proxyWrite(path94, payload) {
|
|
|
140820
140820
|
return { ok: false, error: WRITE_MESSAGES.not_authenticated };
|
|
140821
140821
|
}
|
|
140822
140822
|
try {
|
|
140823
|
-
const res = await coreProxyFetch(`${base}${
|
|
140823
|
+
const res = await coreProxyFetch(`${base}${path95}`, {
|
|
140824
140824
|
method: "POST",
|
|
140825
140825
|
headers: {
|
|
140826
140826
|
"Content-Type": "application/json",
|
|
@@ -140836,7 +140836,7 @@ async function proxyWrite(path94, payload) {
|
|
|
140836
140836
|
}
|
|
140837
140837
|
return { ok: true, value: body };
|
|
140838
140838
|
} catch (err2) {
|
|
140839
|
-
logger21.warn(`[account-connectors] ${
|
|
140839
|
+
logger21.warn(`[account-connectors] ${path95} threw:`, err2);
|
|
140840
140840
|
return { ok: false, error: "Could not reach Atlarix. Check your connection and try again." };
|
|
140841
140841
|
} finally {
|
|
140842
140842
|
clearAccountConnectorsCache();
|
|
@@ -149838,11 +149838,11 @@ var require_mime_types = __commonJS({
|
|
|
149838
149838
|
}
|
|
149839
149839
|
return exts[0];
|
|
149840
149840
|
}
|
|
149841
|
-
function lookup2(
|
|
149842
|
-
if (!
|
|
149841
|
+
function lookup2(path95) {
|
|
149842
|
+
if (!path95 || typeof path95 !== "string") {
|
|
149843
149843
|
return false;
|
|
149844
149844
|
}
|
|
149845
|
-
var extension2 = extname3("x." +
|
|
149845
|
+
var extension2 = extname3("x." + path95).toLowerCase().substr(1);
|
|
149846
149846
|
if (!extension2) {
|
|
149847
149847
|
return false;
|
|
149848
149848
|
}
|
|
@@ -150947,11 +150947,11 @@ var require_form_data = __commonJS({
|
|
|
150947
150947
|
"use strict";
|
|
150948
150948
|
var CombinedStream = require_combined_stream();
|
|
150949
150949
|
var util2 = __require("util");
|
|
150950
|
-
var
|
|
150950
|
+
var path95 = __require("path");
|
|
150951
150951
|
var http5 = __require("http");
|
|
150952
150952
|
var https2 = __require("https");
|
|
150953
150953
|
var parseUrl2 = __require("url").parse;
|
|
150954
|
-
var
|
|
150954
|
+
var fs78 = __require("fs");
|
|
150955
150955
|
var Stream5 = __require("stream").Stream;
|
|
150956
150956
|
var crypto8 = __require("crypto");
|
|
150957
150957
|
var mime = require_mime_types();
|
|
@@ -151021,7 +151021,7 @@ var require_form_data = __commonJS({
|
|
|
151021
151021
|
if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
|
|
151022
151022
|
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
151023
151023
|
} else {
|
|
151024
|
-
|
|
151024
|
+
fs78.stat(value.path, function(err2, stat9) {
|
|
151025
151025
|
if (err2) {
|
|
151026
151026
|
callback(err2);
|
|
151027
151027
|
return;
|
|
@@ -151078,11 +151078,11 @@ var require_form_data = __commonJS({
|
|
|
151078
151078
|
FormData4.prototype._getContentDisposition = function(value, options2) {
|
|
151079
151079
|
var filename;
|
|
151080
151080
|
if (typeof options2.filepath === "string") {
|
|
151081
|
-
filename =
|
|
151081
|
+
filename = path95.normalize(options2.filepath).replace(/\\/g, "/");
|
|
151082
151082
|
} else if (options2.filename || value && (value.name || value.path)) {
|
|
151083
|
-
filename =
|
|
151083
|
+
filename = path95.basename(options2.filename || value && (value.name || value.path));
|
|
151084
151084
|
} else if (value && value.readable && hasOwn3(value, "httpVersion")) {
|
|
151085
|
-
filename =
|
|
151085
|
+
filename = path95.basename(value.client._httpMessage.path || "");
|
|
151086
151086
|
}
|
|
151087
151087
|
if (filename) {
|
|
151088
151088
|
return 'filename="' + escapeHeaderParam(filename) + '"';
|
|
@@ -153019,7 +153019,7 @@ var require_axios = __commonJS({
|
|
|
153019
153019
|
var https2 = __require("https");
|
|
153020
153020
|
var http22 = __require("http2");
|
|
153021
153021
|
var util2 = __require("util");
|
|
153022
|
-
var
|
|
153022
|
+
var path95 = __require("path");
|
|
153023
153023
|
var followRedirects = require_follow_redirects();
|
|
153024
153024
|
var zlib4 = __require("zlib");
|
|
153025
153025
|
var stream2 = __require("stream");
|
|
@@ -154087,9 +154087,9 @@ var require_axios = __commonJS({
|
|
|
154087
154087
|
function removeBrackets(key) {
|
|
154088
154088
|
return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
154089
154089
|
}
|
|
154090
|
-
function renderKey(
|
|
154091
|
-
if (!
|
|
154092
|
-
return
|
|
154090
|
+
function renderKey(path96, key, dots) {
|
|
154091
|
+
if (!path96) return key;
|
|
154092
|
+
return path96.concat(key).map(function each2(token2, i4) {
|
|
154093
154093
|
token2 = removeBrackets(token2);
|
|
154094
154094
|
return !dots && i4 ? "[" + token2 + "]" : token2;
|
|
154095
154095
|
}).join(dots ? "." : "");
|
|
@@ -154167,13 +154167,13 @@ var require_axios = __commonJS({
|
|
|
154167
154167
|
return currentValue;
|
|
154168
154168
|
});
|
|
154169
154169
|
}
|
|
154170
|
-
function defaultVisitor(value, key,
|
|
154170
|
+
function defaultVisitor(value, key, path96) {
|
|
154171
154171
|
let arr = value;
|
|
154172
154172
|
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
154173
|
-
formData.append(renderKey(
|
|
154173
|
+
formData.append(renderKey(path96, key, dots), convertValue(value));
|
|
154174
154174
|
return false;
|
|
154175
154175
|
}
|
|
154176
|
-
if (value && !
|
|
154176
|
+
if (value && !path96 && typeof value === "object") {
|
|
154177
154177
|
if (utils$1.endsWith(key, "{}")) {
|
|
154178
154178
|
key = metaTokens ? key : key.slice(0, -2);
|
|
154179
154179
|
value = stringifyWithDepthLimit(value, 1);
|
|
@@ -154192,7 +154192,7 @@ var require_axios = __commonJS({
|
|
|
154192
154192
|
if (isVisitable(value)) {
|
|
154193
154193
|
return true;
|
|
154194
154194
|
}
|
|
154195
|
-
formData.append(renderKey(
|
|
154195
|
+
formData.append(renderKey(path96, key, dots), convertValue(value));
|
|
154196
154196
|
return false;
|
|
154197
154197
|
}
|
|
154198
154198
|
const exposedHelpers = Object.assign(predicates, {
|
|
@@ -154200,17 +154200,17 @@ var require_axios = __commonJS({
|
|
|
154200
154200
|
convertValue,
|
|
154201
154201
|
isVisitable
|
|
154202
154202
|
});
|
|
154203
|
-
function build(value,
|
|
154203
|
+
function build(value, path96, depth = 0) {
|
|
154204
154204
|
if (utils$1.isUndefined(value)) return;
|
|
154205
154205
|
throwIfMaxDepthExceeded(depth);
|
|
154206
154206
|
if (stack.indexOf(value) !== -1) {
|
|
154207
|
-
throw new Error("Circular reference detected in " +
|
|
154207
|
+
throw new Error("Circular reference detected in " + path96.join("."));
|
|
154208
154208
|
}
|
|
154209
154209
|
stack.push(value);
|
|
154210
154210
|
utils$1.forEach(value, function each2(el, key) {
|
|
154211
|
-
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);
|
|
154212
154212
|
if (result2 === true) {
|
|
154213
|
-
build(el,
|
|
154213
|
+
build(el, path96 ? path96.concat(key) : [key], depth + 1);
|
|
154214
154214
|
}
|
|
154215
154215
|
});
|
|
154216
154216
|
stack.pop();
|
|
@@ -154399,7 +154399,7 @@ var require_axios = __commonJS({
|
|
|
154399
154399
|
};
|
|
154400
154400
|
function toURLEncodedForm(data, options2) {
|
|
154401
154401
|
return toFormData2(data, new platform.classes.URLSearchParams(), {
|
|
154402
|
-
visitor: function(value, key,
|
|
154402
|
+
visitor: function(value, key, path96, helpers) {
|
|
154403
154403
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
154404
154404
|
this.append(key, value.toString("base64"));
|
|
154405
154405
|
return false;
|
|
@@ -154416,14 +154416,14 @@ var require_axios = __commonJS({
|
|
|
154416
154416
|
}
|
|
154417
154417
|
}
|
|
154418
154418
|
function parsePropPath(name30) {
|
|
154419
|
-
const
|
|
154419
|
+
const path96 = [];
|
|
154420
154420
|
const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
|
|
154421
154421
|
let match;
|
|
154422
154422
|
while ((match = pattern.exec(name30)) !== null) {
|
|
154423
|
-
throwIfDepthExceeded(
|
|
154424
|
-
|
|
154423
|
+
throwIfDepthExceeded(path96.length);
|
|
154424
|
+
path96.push(match[0] === "[]" ? "" : match[1] || match[0]);
|
|
154425
154425
|
}
|
|
154426
|
-
return
|
|
154426
|
+
return path96;
|
|
154427
154427
|
}
|
|
154428
154428
|
function arrayToObject(arr) {
|
|
154429
154429
|
const obj2 = {};
|
|
@@ -154438,12 +154438,12 @@ var require_axios = __commonJS({
|
|
|
154438
154438
|
return obj2;
|
|
154439
154439
|
}
|
|
154440
154440
|
function formDataToJSON(formData) {
|
|
154441
|
-
function buildPath(
|
|
154441
|
+
function buildPath(path96, value, target, index2) {
|
|
154442
154442
|
throwIfDepthExceeded(index2);
|
|
154443
|
-
let name30 =
|
|
154443
|
+
let name30 = path96[index2++];
|
|
154444
154444
|
if (name30 === "__proto__") return true;
|
|
154445
154445
|
const isNumericKey = Number.isFinite(+name30);
|
|
154446
|
-
const isLast = index2 >=
|
|
154446
|
+
const isLast = index2 >= path96.length;
|
|
154447
154447
|
name30 = !name30 && utils$1.isArray(target) ? target.length : name30;
|
|
154448
154448
|
if (isLast) {
|
|
154449
154449
|
if (utils$1.hasOwnProp(target, name30)) {
|
|
@@ -154456,7 +154456,7 @@ var require_axios = __commonJS({
|
|
|
154456
154456
|
if (!utils$1.hasOwnProp(target, name30) || !utils$1.isObject(target[name30])) {
|
|
154457
154457
|
target[name30] = [];
|
|
154458
154458
|
}
|
|
154459
|
-
const result2 = buildPath(
|
|
154459
|
+
const result2 = buildPath(path96, value, target[name30], index2);
|
|
154460
154460
|
if (result2 && utils$1.isArray(target[name30])) {
|
|
154461
154461
|
target[name30] = arrayToObject(target[name30]);
|
|
154462
154462
|
}
|
|
@@ -156067,8 +156067,8 @@ var require_axios = __commonJS({
|
|
|
156067
156067
|
const allowedSocketPaths = own2("allowedSocketPaths");
|
|
156068
156068
|
if (allowedSocketPaths != null) {
|
|
156069
156069
|
const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
|
|
156070
|
-
const resolvedSocket =
|
|
156071
|
-
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);
|
|
156072
156072
|
if (!isAllowed) {
|
|
156073
156073
|
return reject2(new AxiosError(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config2));
|
|
156074
156074
|
}
|
|
@@ -156367,14 +156367,14 @@ var require_axios = __commonJS({
|
|
|
156367
156367
|
var cookies = platform.hasStandardBrowserEnv ? (
|
|
156368
156368
|
// Standard browser envs support document.cookie
|
|
156369
156369
|
{
|
|
156370
|
-
write(name30, value, expires,
|
|
156370
|
+
write(name30, value, expires, path96, domain2, secure, sameSite) {
|
|
156371
156371
|
if (typeof document === "undefined") return;
|
|
156372
156372
|
const cookie = [`${name30}=${encodeURIComponent(value)}`];
|
|
156373
156373
|
if (utils$1.isNumber(expires)) {
|
|
156374
156374
|
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
156375
156375
|
}
|
|
156376
|
-
if (utils$1.isString(
|
|
156377
|
-
cookie.push(`path=${
|
|
156376
|
+
if (utils$1.isString(path96)) {
|
|
156377
|
+
cookie.push(`path=${path96}`);
|
|
156378
156378
|
}
|
|
156379
156379
|
if (utils$1.isString(domain2)) {
|
|
156380
156380
|
cookie.push(`domain=${domain2}`);
|
|
@@ -158164,8 +158164,8 @@ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname3(proce
|
|
|
158164
158164
|
return decodedFile;
|
|
158165
158165
|
};
|
|
158166
158166
|
}
|
|
158167
|
-
function normalizeWindowsPath(
|
|
158168
|
-
return
|
|
158167
|
+
function normalizeWindowsPath(path95) {
|
|
158168
|
+
return path95.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
158169
158169
|
}
|
|
158170
158170
|
async function addSourceContext(frames) {
|
|
158171
158171
|
const filesToLines = {};
|
|
@@ -158210,9 +158210,9 @@ async function addSourceContext(frames) {
|
|
|
158210
158210
|
LRU_FILE_CONTENTS_CACHE.reduce();
|
|
158211
158211
|
return frames;
|
|
158212
158212
|
}
|
|
158213
|
-
function getContextLinesFromFile(
|
|
158213
|
+
function getContextLinesFromFile(path95, ranges, output) {
|
|
158214
158214
|
return new Promise((resolve16) => {
|
|
158215
|
-
const stream2 = createReadStream(
|
|
158215
|
+
const stream2 = createReadStream(path95);
|
|
158216
158216
|
const lineReaded = createInterface({
|
|
158217
158217
|
input: stream2
|
|
158218
158218
|
});
|
|
@@ -158230,7 +158230,7 @@ function getContextLinesFromFile(path94, ranges, output) {
|
|
|
158230
158230
|
let rangeStart = range3[0];
|
|
158231
158231
|
let rangeEnd = range3[1];
|
|
158232
158232
|
function onStreamError() {
|
|
158233
|
-
LRU_FILE_CONTENTS_FS_READ_FAILED.set(
|
|
158233
|
+
LRU_FILE_CONTENTS_FS_READ_FAILED.set(path95, 1);
|
|
158234
158234
|
lineReaded.close();
|
|
158235
158235
|
lineReaded.removeAllListeners();
|
|
158236
158236
|
destroyStreamAndResolve();
|
|
@@ -158307,8 +158307,8 @@ function clearLineContext(frame) {
|
|
|
158307
158307
|
delete frame.context_line;
|
|
158308
158308
|
delete frame.post_context;
|
|
158309
158309
|
}
|
|
158310
|
-
function shouldSkipContextLinesForFile(
|
|
158311
|
-
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:");
|
|
158312
158312
|
}
|
|
158313
158313
|
function shouldSkipContextLinesForFrame(frame) {
|
|
158314
158314
|
if (frame.lineno !== void 0 && frame.lineno > MAX_CONTEXTLINES_LINENO) {
|
|
@@ -161984,8 +161984,8 @@ var require_auth_config = __commonJS({
|
|
|
161984
161984
|
writeAuthConfig: () => writeAuthConfig
|
|
161985
161985
|
});
|
|
161986
161986
|
module2.exports = __toCommonJS2(auth_config_exports);
|
|
161987
|
-
var
|
|
161988
|
-
var
|
|
161987
|
+
var fs78 = __toESM2(__require("fs"));
|
|
161988
|
+
var path95 = __toESM2(__require("path"));
|
|
161989
161989
|
var import_token_util = require_token_util();
|
|
161990
161990
|
function getAuthConfigPath() {
|
|
161991
161991
|
const dataDir = (0, import_token_util.getVercelDataDir)();
|
|
@@ -161994,15 +161994,15 @@ var require_auth_config = __commonJS({
|
|
|
161994
161994
|
`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`
|
|
161995
161995
|
);
|
|
161996
161996
|
}
|
|
161997
|
-
return
|
|
161997
|
+
return path95.join(dataDir, "auth.json");
|
|
161998
161998
|
}
|
|
161999
161999
|
function readAuthConfig() {
|
|
162000
162000
|
try {
|
|
162001
162001
|
const authPath = getAuthConfigPath();
|
|
162002
|
-
if (!
|
|
162002
|
+
if (!fs78.existsSync(authPath)) {
|
|
162003
162003
|
return null;
|
|
162004
162004
|
}
|
|
162005
|
-
const content =
|
|
162005
|
+
const content = fs78.readFileSync(authPath, "utf8");
|
|
162006
162006
|
if (!content) {
|
|
162007
162007
|
return null;
|
|
162008
162008
|
}
|
|
@@ -162013,11 +162013,11 @@ var require_auth_config = __commonJS({
|
|
|
162013
162013
|
}
|
|
162014
162014
|
function writeAuthConfig(config2) {
|
|
162015
162015
|
const authPath = getAuthConfigPath();
|
|
162016
|
-
const authDir =
|
|
162017
|
-
if (!
|
|
162018
|
-
|
|
162016
|
+
const authDir = path95.dirname(authPath);
|
|
162017
|
+
if (!fs78.existsSync(authDir)) {
|
|
162018
|
+
fs78.mkdirSync(authDir, { mode: 504, recursive: true });
|
|
162019
162019
|
}
|
|
162020
|
-
|
|
162020
|
+
fs78.writeFileSync(authPath, JSON.stringify(config2, null, 2), { mode: 384 });
|
|
162021
162021
|
}
|
|
162022
162022
|
function isValidAccessToken(authConfig, expirationBufferMs = 0) {
|
|
162023
162023
|
if (!authConfig.token)
|
|
@@ -162208,8 +162208,8 @@ var require_token_util = __commonJS({
|
|
|
162208
162208
|
saveToken: () => saveToken
|
|
162209
162209
|
});
|
|
162210
162210
|
module2.exports = __toCommonJS2(token_util_exports);
|
|
162211
|
-
var
|
|
162212
|
-
var
|
|
162211
|
+
var path95 = __toESM2(__require("path"));
|
|
162212
|
+
var fs78 = __toESM2(__require("fs"));
|
|
162213
162213
|
var import_token_error = require_token_error();
|
|
162214
162214
|
var import_token_io = require_token_io();
|
|
162215
162215
|
var import_auth_config = require_auth_config();
|
|
@@ -162221,7 +162221,7 @@ var require_token_util = __commonJS({
|
|
|
162221
162221
|
if (!dataDir) {
|
|
162222
162222
|
return null;
|
|
162223
162223
|
}
|
|
162224
|
-
return
|
|
162224
|
+
return path95.join(dataDir, vercelFolder);
|
|
162225
162225
|
}
|
|
162226
162226
|
async function getVercelToken2(options2) {
|
|
162227
162227
|
const authConfig = (0, import_auth_config.readAuthConfig)();
|
|
@@ -162297,13 +162297,13 @@ var require_token_util = __commonJS({
|
|
|
162297
162297
|
"Unable to find project root directory. Have you linked your project with `vc link?`"
|
|
162298
162298
|
);
|
|
162299
162299
|
}
|
|
162300
|
-
const prjPath =
|
|
162301
|
-
if (!
|
|
162300
|
+
const prjPath = path95.join(dir, ".vercel", "project.json");
|
|
162301
|
+
if (!fs78.existsSync(prjPath)) {
|
|
162302
162302
|
throw new import_token_error.VercelOidcTokenError(
|
|
162303
162303
|
"project.json not found, have you linked your project with `vc link?`"
|
|
162304
162304
|
);
|
|
162305
162305
|
}
|
|
162306
|
-
const prj = JSON.parse(
|
|
162306
|
+
const prj = JSON.parse(fs78.readFileSync(prjPath, "utf8"));
|
|
162307
162307
|
if (typeof prj.projectId !== "string" && typeof prj.orgId !== "string") {
|
|
162308
162308
|
throw new TypeError(
|
|
162309
162309
|
"Expected a string-valued projectId property. Try running `vc link` to re-link your project."
|
|
@@ -162318,11 +162318,11 @@ var require_token_util = __commonJS({
|
|
|
162318
162318
|
"Unable to find user data directory. Please reach out to Vercel support."
|
|
162319
162319
|
);
|
|
162320
162320
|
}
|
|
162321
|
-
const tokenPath =
|
|
162321
|
+
const tokenPath = path95.join(dir, "com.vercel.token", `${projectId}.json`);
|
|
162322
162322
|
const tokenJson = JSON.stringify(token2);
|
|
162323
|
-
|
|
162324
|
-
|
|
162325
|
-
|
|
162323
|
+
fs78.mkdirSync(path95.dirname(tokenPath), { mode: 504, recursive: true });
|
|
162324
|
+
fs78.writeFileSync(tokenPath, tokenJson);
|
|
162325
|
+
fs78.chmodSync(tokenPath, 432);
|
|
162326
162326
|
return;
|
|
162327
162327
|
}
|
|
162328
162328
|
function loadToken(projectId) {
|
|
@@ -162332,11 +162332,11 @@ var require_token_util = __commonJS({
|
|
|
162332
162332
|
"Unable to find user data directory. Please reach out to Vercel support."
|
|
162333
162333
|
);
|
|
162334
162334
|
}
|
|
162335
|
-
const tokenPath =
|
|
162336
|
-
if (!
|
|
162335
|
+
const tokenPath = path95.join(dir, "com.vercel.token", `${projectId}.json`);
|
|
162336
|
+
if (!fs78.existsSync(tokenPath)) {
|
|
162337
162337
|
return null;
|
|
162338
162338
|
}
|
|
162339
|
-
const token2 = JSON.parse(
|
|
162339
|
+
const token2 = JSON.parse(fs78.readFileSync(tokenPath, "utf8"));
|
|
162340
162340
|
assertVercelOidcTokenResponse(token2);
|
|
162341
162341
|
return token2;
|
|
162342
162342
|
}
|
|
@@ -187768,11 +187768,11 @@ var init_lib = __esm({
|
|
|
187768
187768
|
}
|
|
187769
187769
|
}
|
|
187770
187770
|
},
|
|
187771
|
-
addToPath: function addToPath(
|
|
187772
|
-
var last2 =
|
|
187771
|
+
addToPath: function addToPath(path95, added, removed, oldPosInc, options2) {
|
|
187772
|
+
var last2 = path95.lastComponent;
|
|
187773
187773
|
if (last2 && !options2.oneChangePerToken && last2.added === added && last2.removed === removed) {
|
|
187774
187774
|
return {
|
|
187775
|
-
oldPos:
|
|
187775
|
+
oldPos: path95.oldPos + oldPosInc,
|
|
187776
187776
|
lastComponent: {
|
|
187777
187777
|
count: last2.count + 1,
|
|
187778
187778
|
added,
|
|
@@ -187782,7 +187782,7 @@ var init_lib = __esm({
|
|
|
187782
187782
|
};
|
|
187783
187783
|
} else {
|
|
187784
187784
|
return {
|
|
187785
|
-
oldPos:
|
|
187785
|
+
oldPos: path95.oldPos + oldPosInc,
|
|
187786
187786
|
lastComponent: {
|
|
187787
187787
|
count: 1,
|
|
187788
187788
|
added,
|
|
@@ -188702,18 +188702,18 @@ function daemonParsesMarkup() {
|
|
|
188702
188702
|
const ask = (cmd, args2) => new Promise(
|
|
188703
188703
|
(resolve16, reject2) => execFile2(cmd, args2, { timeout: 1500 }, (err2, stdout) => err2 ? reject2(err2) : resolve16(String(stdout)))
|
|
188704
188704
|
);
|
|
188705
|
-
const
|
|
188705
|
+
const path95 = ["/org/freedesktop/Notifications", "org.freedesktop.Notifications.GetCapabilities"];
|
|
188706
188706
|
return linuxMarkup ??= ask("gdbus", [
|
|
188707
188707
|
"call",
|
|
188708
188708
|
"--session",
|
|
188709
188709
|
"--dest",
|
|
188710
188710
|
"org.freedesktop.Notifications",
|
|
188711
188711
|
"--object-path",
|
|
188712
|
-
|
|
188712
|
+
path95[0],
|
|
188713
188713
|
"--method",
|
|
188714
|
-
|
|
188714
|
+
path95[1]
|
|
188715
188715
|
]).catch(
|
|
188716
|
-
() => 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]])
|
|
188717
188717
|
).then(capabilitiesListMarkup, () => false);
|
|
188718
188718
|
}
|
|
188719
188719
|
async function notificationBody(body, platform = process.platform, parsesMarkup = daemonParsesMarkup) {
|
|
@@ -190701,14 +190701,14 @@ function emitRunCommandPermissionActivity(sender, chatId, label2, command) {
|
|
|
190701
190701
|
chatId
|
|
190702
190702
|
});
|
|
190703
190703
|
}
|
|
190704
|
-
function emitFilePermissionActivity(sender, chatId, label2,
|
|
190704
|
+
function emitFilePermissionActivity(sender, chatId, label2, path95) {
|
|
190705
190705
|
safeSend(sender, "chat:activity", {
|
|
190706
190706
|
id: `file-perm-${chatId}-${Date.now()}`,
|
|
190707
190707
|
type: "tool_use",
|
|
190708
190708
|
// v13.8: edit_file is the single file-mutation tool (absorbed write_file).
|
|
190709
190709
|
toolName: "edit_file",
|
|
190710
190710
|
label: label2,
|
|
190711
|
-
detail:
|
|
190711
|
+
detail: path95.slice(0, 200),
|
|
190712
190712
|
status: "done",
|
|
190713
190713
|
timestamp: Date.now(),
|
|
190714
190714
|
chatId
|
|
@@ -195361,12 +195361,12 @@ function getMCPToolHeaderBindings(inputSchema) {
|
|
|
195361
195361
|
const bindings = [];
|
|
195362
195362
|
const headerNames = /* @__PURE__ */ new Set();
|
|
195363
195363
|
let error51;
|
|
195364
|
-
const visit3 = (value,
|
|
195364
|
+
const visit3 = (value, path95, staticallyReachable) => {
|
|
195365
195365
|
if (error51 != null || !isRecord(value)) {
|
|
195366
195366
|
return;
|
|
195367
195367
|
}
|
|
195368
195368
|
if ("x-mcp-header" in value) {
|
|
195369
|
-
if (!staticallyReachable ||
|
|
195369
|
+
if (!staticallyReachable || path95.length === 0) {
|
|
195370
195370
|
error51 = "x-mcp-header is not on a statically reachable property";
|
|
195371
195371
|
return;
|
|
195372
195372
|
}
|
|
@@ -195386,7 +195386,7 @@ function getMCPToolHeaderBindings(inputSchema) {
|
|
|
195386
195386
|
return;
|
|
195387
195387
|
}
|
|
195388
195388
|
headerNames.add(normalizedHeaderName);
|
|
195389
|
-
bindings.push({ headerName, path:
|
|
195389
|
+
bindings.push({ headerName, path: path95, valueType });
|
|
195390
195390
|
}
|
|
195391
195391
|
for (const [key, child2] of Object.entries(value)) {
|
|
195392
195392
|
if (key === "x-mcp-header") {
|
|
@@ -195394,19 +195394,19 @@ function getMCPToolHeaderBindings(inputSchema) {
|
|
|
195394
195394
|
}
|
|
195395
195395
|
if (key === "properties" && isRecord(child2)) {
|
|
195396
195396
|
for (const [propertyName, propertySchema] of Object.entries(child2)) {
|
|
195397
|
-
visit3(propertySchema, [...
|
|
195397
|
+
visit3(propertySchema, [...path95, propertyName], staticallyReachable);
|
|
195398
195398
|
}
|
|
195399
195399
|
} else {
|
|
195400
|
-
visit3(child2,
|
|
195400
|
+
visit3(child2, path95, false);
|
|
195401
195401
|
}
|
|
195402
195402
|
}
|
|
195403
195403
|
};
|
|
195404
195404
|
visit3(inputSchema, [], true);
|
|
195405
195405
|
return error51 == null ? { success: true, bindings } : { success: false, error: error51 };
|
|
195406
195406
|
}
|
|
195407
|
-
function getValueAtPath(value,
|
|
195407
|
+
function getValueAtPath(value, path95) {
|
|
195408
195408
|
let current = value;
|
|
195409
|
-
for (const segment of
|
|
195409
|
+
for (const segment of path95) {
|
|
195410
195410
|
if (!isRecord(current)) {
|
|
195411
195411
|
return void 0;
|
|
195412
195412
|
}
|
|
@@ -205765,15 +205765,15 @@ async function QuickJSRaw(moduleArg = {}) {
|
|
|
205765
205765
|
throw c2;
|
|
205766
205766
|
}, w2 = import.meta.url, y2 = "", z5, A3;
|
|
205767
205767
|
if (q3) {
|
|
205768
|
-
var
|
|
205768
|
+
var fs78 = require4("node:fs");
|
|
205769
205769
|
w2.startsWith("file:") && (y2 = require4("node:path").dirname(require4("node:url").fileURLToPath(w2)) + "/");
|
|
205770
205770
|
A3 = (a2) => {
|
|
205771
205771
|
a2 = B2(a2) ? new URL(a2) : a2;
|
|
205772
|
-
return
|
|
205772
|
+
return fs78.readFileSync(a2);
|
|
205773
205773
|
};
|
|
205774
205774
|
z5 = async (a2) => {
|
|
205775
205775
|
a2 = B2(a2) ? new URL(a2) : a2;
|
|
205776
|
-
return
|
|
205776
|
+
return fs78.readFileSync(a2, void 0);
|
|
205777
205777
|
};
|
|
205778
205778
|
1 < process.argv.length && (u2 = process.argv[1].replace(/\\/g, "/"));
|
|
205779
205779
|
process.argv.slice(2);
|
|
@@ -209846,15 +209846,15 @@ var init_services = __esm({
|
|
|
209846
209846
|
usage: async (filters) => (await Promise.resolve().then(() => (init_usage_report(), usage_report_exports))).getUsageReport(filters),
|
|
209847
209847
|
usageCredits: async () => (await Promise.resolve().then(() => (init_usage_credits(), usage_credits_exports))).getUsageCredits(),
|
|
209848
209848
|
async saveUsageCard(svg) {
|
|
209849
|
-
const [{ promises:
|
|
209850
|
-
const dir =
|
|
209851
|
-
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 });
|
|
209852
209852
|
const { localDayKey: localDayKey3 } = await Promise.resolve().then(() => (init_edit_stats2(), edit_stats_exports));
|
|
209853
|
-
const stem =
|
|
209853
|
+
const stem = path95.join(dir, `atlarix-usage-${localDayKey3()}`);
|
|
209854
209854
|
for (let n2 = 1; ; n2++) {
|
|
209855
209855
|
const file2 = n2 === 1 ? `${stem}.svg` : `${stem}-${n2}.svg`;
|
|
209856
209856
|
try {
|
|
209857
|
-
await
|
|
209857
|
+
await fs78.writeFile(file2, svg, { encoding: "utf8", flag: "wx" });
|
|
209858
209858
|
return file2;
|
|
209859
209859
|
} catch (e3) {
|
|
209860
209860
|
if (e3.code !== "EEXIST" || n2 >= 100) throw e3;
|
|
@@ -219524,22 +219524,22 @@ var init_from = __esm({
|
|
|
219524
219524
|
init_file();
|
|
219525
219525
|
init_fetch_blob();
|
|
219526
219526
|
({ stat: stat6 } = fs49);
|
|
219527
|
-
blobFromSync = (
|
|
219528
|
-
blobFrom = (
|
|
219529
|
-
fileFrom = (
|
|
219530
|
-
fileFromSync = (
|
|
219531
|
-
fromBlob = (stat9,
|
|
219532
|
-
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,
|
|
219533
219533
|
size: stat9.size,
|
|
219534
219534
|
lastModified: stat9.mtimeMs,
|
|
219535
219535
|
start: 0
|
|
219536
219536
|
})], { type: type2 });
|
|
219537
|
-
fromFile = (stat9,
|
|
219538
|
-
path:
|
|
219537
|
+
fromFile = (stat9, path95, type2 = "") => new file_default([new BlobDataItem({
|
|
219538
|
+
path: path95,
|
|
219539
219539
|
size: stat9.size,
|
|
219540
219540
|
lastModified: stat9.mtimeMs,
|
|
219541
219541
|
start: 0
|
|
219542
|
-
})], basename2(
|
|
219542
|
+
})], basename2(path95), { type: type2, lastModified: stat9.mtimeMs });
|
|
219543
219543
|
BlobDataItem = class _BlobDataItem {
|
|
219544
219544
|
#path;
|
|
219545
219545
|
#start;
|
|
@@ -224718,9 +224718,9 @@ var require_util2 = __commonJS({
|
|
|
224718
224718
|
exports2.removeUndefinedValuesInObject = removeUndefinedValuesInObject;
|
|
224719
224719
|
exports2.isValidFile = isValidFile;
|
|
224720
224720
|
exports2.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
|
|
224721
|
-
var
|
|
224721
|
+
var fs78 = __require("fs");
|
|
224722
224722
|
var os29 = __require("os");
|
|
224723
|
-
var
|
|
224723
|
+
var path95 = __require("path");
|
|
224724
224724
|
var WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
|
|
224725
224725
|
var CLOUDSDK_CONFIG_DIRECTORY = "gcloud";
|
|
224726
224726
|
function snakeToCamel(str2) {
|
|
@@ -224806,15 +224806,15 @@ var require_util2 = __commonJS({
|
|
|
224806
224806
|
}
|
|
224807
224807
|
async function isValidFile(filePath) {
|
|
224808
224808
|
try {
|
|
224809
|
-
const stats = await
|
|
224809
|
+
const stats = await fs78.promises.lstat(filePath);
|
|
224810
224810
|
return stats.isFile();
|
|
224811
224811
|
} catch (e3) {
|
|
224812
224812
|
return false;
|
|
224813
224813
|
}
|
|
224814
224814
|
}
|
|
224815
224815
|
function getWellKnownCertificateConfigFileLocation() {
|
|
224816
|
-
const configDir = process.env.CLOUDSDK_CONFIG || (_isWindows() ?
|
|
224817
|
-
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);
|
|
224818
224818
|
}
|
|
224819
224819
|
function _isWindows() {
|
|
224820
224820
|
return os29.platform().startsWith("win");
|
|
@@ -226760,11 +226760,11 @@ var require_getCredentials = __commonJS({
|
|
|
226760
226760
|
"use strict";
|
|
226761
226761
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
226762
226762
|
exports2.getCredentials = getCredentials;
|
|
226763
|
-
var
|
|
226764
|
-
var
|
|
226763
|
+
var path95 = __require("path");
|
|
226764
|
+
var fs78 = __require("fs");
|
|
226765
226765
|
var util_1 = __require("util");
|
|
226766
226766
|
var errorWithCode_1 = require_errorWithCode();
|
|
226767
|
-
var readFile15 =
|
|
226767
|
+
var readFile15 = fs78.readFile ? (0, util_1.promisify)(fs78.readFile) : async () => {
|
|
226768
226768
|
throw new errorWithCode_1.ErrorWithCode("use key rather than keyFile.", "MISSING_CREDENTIALS");
|
|
226769
226769
|
};
|
|
226770
226770
|
var ExtensionFiles;
|
|
@@ -226832,7 +226832,7 @@ var require_getCredentials = __commonJS({
|
|
|
226832
226832
|
* @returns An instance of a class that implements ICredentialsProvider.
|
|
226833
226833
|
*/
|
|
226834
226834
|
static create(keyFilePath) {
|
|
226835
|
-
const keyFileExtension =
|
|
226835
|
+
const keyFileExtension = path95.extname(keyFilePath);
|
|
226836
226836
|
switch (keyFileExtension) {
|
|
226837
226837
|
case ExtensionFiles.JSON:
|
|
226838
226838
|
return new JsonCredentialsProvider(keyFilePath);
|
|
@@ -228441,12 +228441,12 @@ var require_filesubjecttokensupplier = __commonJS({
|
|
|
228441
228441
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
228442
228442
|
exports2.FileSubjectTokenSupplier = void 0;
|
|
228443
228443
|
var util_1 = __require("util");
|
|
228444
|
-
var
|
|
228445
|
-
var readFile15 = (0, util_1.promisify)(
|
|
228444
|
+
var fs78 = __require("fs");
|
|
228445
|
+
var readFile15 = (0, util_1.promisify)(fs78.readFile ?? (() => {
|
|
228446
228446
|
}));
|
|
228447
|
-
var realpath = (0, util_1.promisify)(
|
|
228447
|
+
var realpath = (0, util_1.promisify)(fs78.realpath ?? (() => {
|
|
228448
228448
|
}));
|
|
228449
|
-
var lstat = (0, util_1.promisify)(
|
|
228449
|
+
var lstat = (0, util_1.promisify)(fs78.lstat ?? (() => {
|
|
228450
228450
|
}));
|
|
228451
228451
|
var FileSubjectTokenSupplier = class {
|
|
228452
228452
|
filePath;
|
|
@@ -228564,7 +228564,7 @@ var require_certificatesubjecttokensupplier = __commonJS({
|
|
|
228564
228564
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
228565
228565
|
exports2.CertificateSubjectTokenSupplier = exports2.InvalidConfigurationError = exports2.CertificateSourceUnavailableError = exports2.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = void 0;
|
|
228566
228566
|
var util_1 = require_util2();
|
|
228567
|
-
var
|
|
228567
|
+
var fs78 = __require("fs");
|
|
228568
228568
|
var crypto_1 = __require("crypto");
|
|
228569
228569
|
var https2 = __require("https");
|
|
228570
228570
|
exports2.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = "GOOGLE_API_CERTIFICATE_CONFIG";
|
|
@@ -228658,7 +228658,7 @@ var require_certificatesubjecttokensupplier = __commonJS({
|
|
|
228658
228658
|
const configPath = this.certificateConfigPath;
|
|
228659
228659
|
let fileContents;
|
|
228660
228660
|
try {
|
|
228661
|
-
fileContents = await
|
|
228661
|
+
fileContents = await fs78.promises.readFile(configPath, "utf8");
|
|
228662
228662
|
} catch (err2) {
|
|
228663
228663
|
throw new CertificateSourceUnavailableError(`Failed to read certificate config file at: ${configPath}`);
|
|
228664
228664
|
}
|
|
@@ -228683,14 +228683,14 @@ var require_certificatesubjecttokensupplier = __commonJS({
|
|
|
228683
228683
|
async #getKeyAndCert(certPath, keyPath) {
|
|
228684
228684
|
let cert, key;
|
|
228685
228685
|
try {
|
|
228686
|
-
cert = await
|
|
228686
|
+
cert = await fs78.promises.readFile(certPath);
|
|
228687
228687
|
new crypto_1.X509Certificate(cert);
|
|
228688
228688
|
} catch (err2) {
|
|
228689
228689
|
const message = err2 instanceof Error ? err2.message : String(err2);
|
|
228690
228690
|
throw new CertificateSourceUnavailableError(`Failed to read certificate file at ${certPath}: ${message}`);
|
|
228691
228691
|
}
|
|
228692
228692
|
try {
|
|
228693
|
-
key = await
|
|
228693
|
+
key = await fs78.promises.readFile(keyPath);
|
|
228694
228694
|
(0, crypto_1.createPrivateKey)(key);
|
|
228695
228695
|
} catch (err2) {
|
|
228696
228696
|
const message = err2 instanceof Error ? err2.message : String(err2);
|
|
@@ -228709,7 +228709,7 @@ var require_certificatesubjecttokensupplier = __commonJS({
|
|
|
228709
228709
|
return JSON.stringify([leafCert.raw.toString("base64")]);
|
|
228710
228710
|
}
|
|
228711
228711
|
try {
|
|
228712
|
-
const chainPems = await
|
|
228712
|
+
const chainPems = await fs78.promises.readFile(this.trustChainPath, "utf8");
|
|
228713
228713
|
const pemBlocks = chainPems.match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g) ?? [];
|
|
228714
228714
|
const chainCerts = pemBlocks.map((pem, index2) => {
|
|
228715
228715
|
try {
|
|
@@ -229411,7 +229411,7 @@ var require_pluggable_auth_handler = __commonJS({
|
|
|
229411
229411
|
exports2.PluggableAuthHandler = exports2.ExecutableError = void 0;
|
|
229412
229412
|
var executable_response_1 = require_executable_response();
|
|
229413
229413
|
var childProcess = __require("child_process");
|
|
229414
|
-
var
|
|
229414
|
+
var fs78 = __require("fs");
|
|
229415
229415
|
var ExecutableError = class extends Error {
|
|
229416
229416
|
/**
|
|
229417
229417
|
* The exit code returned by the executable.
|
|
@@ -229496,14 +229496,14 @@ var require_pluggable_auth_handler = __commonJS({
|
|
|
229496
229496
|
}
|
|
229497
229497
|
let filePath;
|
|
229498
229498
|
try {
|
|
229499
|
-
filePath = await
|
|
229499
|
+
filePath = await fs78.promises.realpath(this.outputFile);
|
|
229500
229500
|
} catch {
|
|
229501
229501
|
return void 0;
|
|
229502
229502
|
}
|
|
229503
|
-
if (!(await
|
|
229503
|
+
if (!(await fs78.promises.lstat(filePath)).isFile()) {
|
|
229504
229504
|
return void 0;
|
|
229505
229505
|
}
|
|
229506
|
-
const responseString = await
|
|
229506
|
+
const responseString = await fs78.promises.readFile(filePath, {
|
|
229507
229507
|
encoding: "utf8"
|
|
229508
229508
|
});
|
|
229509
229509
|
if (responseString === "") {
|
|
@@ -229914,7 +229914,7 @@ var require_gdchclient = __commonJS({
|
|
|
229914
229914
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
229915
229915
|
exports2.GdchClient = exports2.GDCH_SERVICE_ACCOUNT_TYPE = void 0;
|
|
229916
229916
|
var crypto8 = __require("crypto");
|
|
229917
|
-
var
|
|
229917
|
+
var fs78 = __require("fs");
|
|
229918
229918
|
var https2 = __require("https");
|
|
229919
229919
|
var oauth2client_1 = require_oauth2client();
|
|
229920
229920
|
var DEFAULT_LIFETIME_IN_SECONDS = 3600;
|
|
@@ -230137,7 +230137,7 @@ var require_gdchclient = __commonJS({
|
|
|
230137
230137
|
const currentPath = this.caCertPath;
|
|
230138
230138
|
this.caAgentPromise = (async () => {
|
|
230139
230139
|
try {
|
|
230140
|
-
const ca2 = await
|
|
230140
|
+
const ca2 = await fs78.promises.readFile(currentPath);
|
|
230141
230141
|
return new https2.Agent({ ca: ca2 });
|
|
230142
230142
|
} catch (err2) {
|
|
230143
230143
|
if (this.cachedCaCertPath === currentPath) {
|
|
@@ -230197,11 +230197,11 @@ var require_googleauth = __commonJS({
|
|
|
230197
230197
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
230198
230198
|
exports2.GoogleAuth = exports2.GoogleAuthExceptionMessages = void 0;
|
|
230199
230199
|
var child_process_1 = __require("child_process");
|
|
230200
|
-
var
|
|
230200
|
+
var fs78 = __require("fs");
|
|
230201
230201
|
var gaxios_1 = require_src4();
|
|
230202
230202
|
var gcpMetadata = require_src6();
|
|
230203
230203
|
var os29 = __require("os");
|
|
230204
|
-
var
|
|
230204
|
+
var path95 = __require("path");
|
|
230205
230205
|
var crypto_1 = require_crypto3();
|
|
230206
230206
|
var computeclient_1 = require_computeclient();
|
|
230207
230207
|
var idtokenclient_1 = require_idtokenclient();
|
|
@@ -230486,20 +230486,20 @@ var require_googleauth = __commonJS({
|
|
|
230486
230486
|
if (!configDir) {
|
|
230487
230487
|
if (this._isWindows()) {
|
|
230488
230488
|
if (process.env["APPDATA"]) {
|
|
230489
|
-
configDir =
|
|
230489
|
+
configDir = path95.join(process.env["APPDATA"], "gcloud");
|
|
230490
230490
|
}
|
|
230491
230491
|
} else {
|
|
230492
230492
|
const home = process.env["HOME"];
|
|
230493
230493
|
if (home) {
|
|
230494
|
-
configDir =
|
|
230494
|
+
configDir = path95.join(home, ".config", "gcloud");
|
|
230495
230495
|
}
|
|
230496
230496
|
}
|
|
230497
230497
|
}
|
|
230498
230498
|
if (!configDir) {
|
|
230499
230499
|
return null;
|
|
230500
230500
|
}
|
|
230501
|
-
const location2 =
|
|
230502
|
-
if (!
|
|
230501
|
+
const location2 = path95.join(configDir, "application_default_credentials.json");
|
|
230502
|
+
if (!fs78.existsSync(location2)) {
|
|
230503
230503
|
return null;
|
|
230504
230504
|
}
|
|
230505
230505
|
const client2 = await this._getApplicationCredentialsFromFilePath(location2, options2);
|
|
@@ -230516,8 +230516,8 @@ var require_googleauth = __commonJS({
|
|
|
230516
230516
|
throw new Error("The file path is invalid.");
|
|
230517
230517
|
}
|
|
230518
230518
|
try {
|
|
230519
|
-
filePath =
|
|
230520
|
-
if (!
|
|
230519
|
+
filePath = fs78.realpathSync(filePath);
|
|
230520
|
+
if (!fs78.lstatSync(filePath).isFile()) {
|
|
230521
230521
|
throw new Error();
|
|
230522
230522
|
}
|
|
230523
230523
|
} catch (err2) {
|
|
@@ -230526,7 +230526,7 @@ var require_googleauth = __commonJS({
|
|
|
230526
230526
|
}
|
|
230527
230527
|
throw err2;
|
|
230528
230528
|
}
|
|
230529
|
-
const readStream =
|
|
230529
|
+
const readStream = fs78.createReadStream(filePath);
|
|
230530
230530
|
return this.fromStream(readStream, options2);
|
|
230531
230531
|
}
|
|
230532
230532
|
/**
|
|
@@ -230853,8 +230853,8 @@ var require_googleauth = __commonJS({
|
|
|
230853
230853
|
if (this.jsonContent) {
|
|
230854
230854
|
return this._cacheClientFromJSON(this.jsonContent, this.clientOptions);
|
|
230855
230855
|
} else if (this.keyFilename) {
|
|
230856
|
-
const filePath =
|
|
230857
|
-
const stream2 =
|
|
230856
|
+
const filePath = path95.resolve(this.keyFilename);
|
|
230857
|
+
const stream2 = fs78.createReadStream(filePath);
|
|
230858
230858
|
return await this.fromStreamAsync(stream2, this.clientOptions);
|
|
230859
230859
|
} else if (this.apiKey) {
|
|
230860
230860
|
const client2 = await this.fromAPIKey(this.apiKey, this.clientOptions);
|
|
@@ -247631,18 +247631,18 @@ function createAzure(options2 = {}) {
|
|
|
247631
247631
|
});
|
|
247632
247632
|
const apiVersion = (_a30 = options2.apiVersion) != null ? _a30 : "v1";
|
|
247633
247633
|
const useAzureOpenAIEndpoint = isAzureOpenAIBaseURL(options2.baseURL);
|
|
247634
|
-
const url2 = ({ path:
|
|
247634
|
+
const url2 = ({ path: path95, modelId }) => {
|
|
247635
247635
|
var _a211;
|
|
247636
247636
|
const baseUrlPrefix = withoutTrailingSlash(
|
|
247637
247637
|
(_a211 = options2.baseURL) != null ? _a211 : `https://${getResourceName()}.openai.azure.com/openai`
|
|
247638
247638
|
);
|
|
247639
247639
|
let fullUrl;
|
|
247640
247640
|
if (options2.useDeploymentBasedUrls) {
|
|
247641
|
-
fullUrl = new URL(`${baseUrlPrefix}/deployments/${modelId}${
|
|
247641
|
+
fullUrl = new URL(`${baseUrlPrefix}/deployments/${modelId}${path95}`);
|
|
247642
247642
|
} else if (!useAzureOpenAIEndpoint) {
|
|
247643
|
-
fullUrl = new URL(`${baseUrlPrefix}${
|
|
247643
|
+
fullUrl = new URL(`${baseUrlPrefix}${path95}`);
|
|
247644
247644
|
} else {
|
|
247645
|
-
fullUrl = new URL(`${baseUrlPrefix}/v1${
|
|
247645
|
+
fullUrl = new URL(`${baseUrlPrefix}/v1${path95}`);
|
|
247646
247646
|
}
|
|
247647
247647
|
if (useAzureOpenAIEndpoint || options2.useDeploymentBasedUrls) {
|
|
247648
247648
|
fullUrl.searchParams.set("api-version", apiVersion);
|
|
@@ -248152,8 +248152,8 @@ var init_parseUtil = __esm({
|
|
|
248152
248152
|
init_errors5();
|
|
248153
248153
|
init_en2();
|
|
248154
248154
|
makeIssue = (params) => {
|
|
248155
|
-
const { data, path:
|
|
248156
|
-
const fullPath = [...
|
|
248155
|
+
const { data, path: path95, errorMaps, issueData } = params;
|
|
248156
|
+
const fullPath = [...path95, ...issueData.path || []];
|
|
248157
248157
|
const fullIssue = {
|
|
248158
248158
|
...issueData,
|
|
248159
248159
|
path: fullPath
|
|
@@ -248433,11 +248433,11 @@ var init_types3 = __esm({
|
|
|
248433
248433
|
init_parseUtil();
|
|
248434
248434
|
init_util2();
|
|
248435
248435
|
ParseInputLazyPath = class {
|
|
248436
|
-
constructor(parent, value,
|
|
248436
|
+
constructor(parent, value, path95, key) {
|
|
248437
248437
|
this._cachedPath = [];
|
|
248438
248438
|
this.parent = parent;
|
|
248439
248439
|
this.data = value;
|
|
248440
|
-
this._path =
|
|
248440
|
+
this._path = path95;
|
|
248441
248441
|
this._key = key;
|
|
248442
248442
|
}
|
|
248443
248443
|
get path() {
|
|
@@ -253933,7 +253933,7 @@ function createOpenRouter(options2 = {}) {
|
|
|
253933
253933
|
);
|
|
253934
253934
|
const createChatModel = (modelId, settings = {}) => new OpenRouterChatLanguageModel(modelId, settings, {
|
|
253935
253935
|
provider: "openrouter.chat",
|
|
253936
|
-
url: ({ path:
|
|
253936
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
253937
253937
|
headers: getHeaders,
|
|
253938
253938
|
compatibility,
|
|
253939
253939
|
fetch: options2.fetch,
|
|
@@ -253941,7 +253941,7 @@ function createOpenRouter(options2 = {}) {
|
|
|
253941
253941
|
});
|
|
253942
253942
|
const createCompletionModel = (modelId, settings = {}) => new OpenRouterCompletionLanguageModel(modelId, settings, {
|
|
253943
253943
|
provider: "openrouter.completion",
|
|
253944
|
-
url: ({ path:
|
|
253944
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
253945
253945
|
headers: getHeaders,
|
|
253946
253946
|
compatibility,
|
|
253947
253947
|
fetch: options2.fetch,
|
|
@@ -253949,21 +253949,21 @@ function createOpenRouter(options2 = {}) {
|
|
|
253949
253949
|
});
|
|
253950
253950
|
const createEmbeddingModel = (modelId, settings = {}) => new OpenRouterEmbeddingModel(modelId, settings, {
|
|
253951
253951
|
provider: "openrouter.embedding",
|
|
253952
|
-
url: ({ path:
|
|
253952
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
253953
253953
|
headers: getHeaders,
|
|
253954
253954
|
fetch: options2.fetch,
|
|
253955
253955
|
extraBody: options2.extraBody
|
|
253956
253956
|
});
|
|
253957
253957
|
const createImageModel = (modelId, settings = {}) => new OpenRouterImageModel(modelId, settings, {
|
|
253958
253958
|
provider: "openrouter.image",
|
|
253959
|
-
url: ({ path:
|
|
253959
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
253960
253960
|
headers: getHeaders,
|
|
253961
253961
|
fetch: options2.fetch,
|
|
253962
253962
|
extraBody: options2.extraBody
|
|
253963
253963
|
});
|
|
253964
253964
|
const createVideoModel = (modelId, settings = {}) => new OpenRouterVideoModel(modelId, settings, {
|
|
253965
253965
|
provider: "openrouter.video",
|
|
253966
|
-
url: ({ path:
|
|
253966
|
+
url: ({ path: path95 }) => `${baseURL}${path95}`,
|
|
253967
253967
|
headers: getHeaders,
|
|
253968
253968
|
fetch: options2.fetch,
|
|
253969
253969
|
extraBody: options2.extraBody
|
|
@@ -264681,14 +264681,14 @@ var init_readFile = __esm({
|
|
|
264681
264681
|
"node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/readFile.js"() {
|
|
264682
264682
|
filePromises = {};
|
|
264683
264683
|
fileIntercept = {};
|
|
264684
|
-
readFile8 = (
|
|
264685
|
-
if (fileIntercept[
|
|
264686
|
-
return fileIntercept[
|
|
264684
|
+
readFile8 = (path95, options2) => {
|
|
264685
|
+
if (fileIntercept[path95] !== void 0) {
|
|
264686
|
+
return fileIntercept[path95];
|
|
264687
264687
|
}
|
|
264688
|
-
if (!filePromises[
|
|
264689
|
-
filePromises[
|
|
264688
|
+
if (!filePromises[path95] || options2?.ignoreCache) {
|
|
264689
|
+
filePromises[path95] = fsReadFile(path95, "utf8");
|
|
264690
264690
|
}
|
|
264691
|
-
return filePromises[
|
|
264691
|
+
return filePromises[path95];
|
|
264692
264692
|
};
|
|
264693
264693
|
}
|
|
264694
264694
|
});
|
|
@@ -265111,8 +265111,8 @@ var init_createConfigValueProvider = __esm({
|
|
|
265111
265111
|
return endpoint2.url.href;
|
|
265112
265112
|
}
|
|
265113
265113
|
if ("hostname" in endpoint2) {
|
|
265114
|
-
const { protocol, hostname: hostname4, port, path:
|
|
265115
|
-
return `${protocol}//${hostname4}${port ? ":" + port : ""}${
|
|
265114
|
+
const { protocol, hostname: hostname4, port, path: path95 } = endpoint2;
|
|
265115
|
+
return `${protocol}//${hostname4}${port ? ":" + port : ""}${path95}`;
|
|
265116
265116
|
}
|
|
265117
265117
|
}
|
|
265118
265118
|
return endpoint2;
|
|
@@ -273795,8 +273795,8 @@ function formatSearchMatchPreview(payload, plainText) {
|
|
|
273795
273795
|
function formatReadFilePreview(content) {
|
|
273796
273796
|
const pathMatch = content.match(/^File:\s*(.+)$/m);
|
|
273797
273797
|
if (pathMatch) {
|
|
273798
|
-
const
|
|
273799
|
-
const short =
|
|
273798
|
+
const path95 = pathMatch[1].trim();
|
|
273799
|
+
const short = path95.length > 64 ? `\u2026${path95.slice(-61)}` : path95;
|
|
273800
273800
|
const linesMatch = content.match(/^Lines:\s*(.+)$/m);
|
|
273801
273801
|
if (linesMatch) {
|
|
273802
273802
|
return `Read ${short} \u2014 lines ${linesMatch[1].trim()}`;
|
|
@@ -273925,8 +273925,8 @@ function formatToolResultPreview(registryName, rawDetail, status) {
|
|
|
273925
273925
|
if (!envelope) return void 0;
|
|
273926
273926
|
if (status === "error" || envelope.error) {
|
|
273927
273927
|
const msg = envelope.error ?? extractShortField(envelope.payload) ?? "Tool failed";
|
|
273928
|
-
const
|
|
273929
|
-
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);
|
|
273930
273930
|
}
|
|
273931
273931
|
const payload = envelope.payload;
|
|
273932
273932
|
const plain = envelope.plainText;
|
|
@@ -273976,7 +273976,7 @@ function formatToolStartPreview(registryName, toolArgs) {
|
|
|
273976
273976
|
if (!toolArgs || typeof toolArgs !== "object") {
|
|
273977
273977
|
return getToolActivityLabel(registryName);
|
|
273978
273978
|
}
|
|
273979
|
-
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;
|
|
273980
273980
|
const query = typeof toolArgs.query === "string" ? toolArgs.query.trim() : void 0;
|
|
273981
273981
|
const pattern = (registryName === "grep" || registryName === "glob") && typeof toolArgs.pattern === "string" ? toolArgs.pattern.trim() : void 0;
|
|
273982
273982
|
const command = typeof toolArgs.command === "string" ? toolArgs.command.trim() : void 0;
|
|
@@ -273985,8 +273985,8 @@ function formatToolStartPreview(registryName, toolArgs) {
|
|
|
273985
273985
|
const p2 = pattern.length > 56 ? `${pattern.slice(0, 53)}\u2026` : pattern;
|
|
273986
273986
|
return `${base}: ${p2}\u2026`;
|
|
273987
273987
|
}
|
|
273988
|
-
if (
|
|
273989
|
-
const short =
|
|
273988
|
+
if (path95) {
|
|
273989
|
+
const short = path95.length > 72 ? `${path95.slice(0, 69)}\u2026` : path95;
|
|
273990
273990
|
return `${base} (${short})\u2026`;
|
|
273991
273991
|
}
|
|
273992
273992
|
if (query) {
|
|
@@ -275885,6 +275885,14 @@ ${views.length} proposed file change(s). NOTHING has been written. Review each,
|
|
|
275885
275885
|
rec.error = outcome.error ?? "Sub-agent run failed";
|
|
275886
275886
|
}
|
|
275887
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;
|
|
275888
275896
|
} finally {
|
|
275889
275897
|
if (proposalSetId && !keepProposals) deleteProposalSet(proposalSetId);
|
|
275890
275898
|
}
|
|
@@ -277400,24 +277408,24 @@ function errMessage(err2) {
|
|
|
277400
277408
|
return err2 instanceof Error ? err2.message : String(err2);
|
|
277401
277409
|
}
|
|
277402
277410
|
function readFileStructuredError(err2, displayPath2) {
|
|
277403
|
-
const
|
|
277411
|
+
const path95 = displayPath2;
|
|
277404
277412
|
const msg = errMessage(err2);
|
|
277405
277413
|
const code = nodeErrno(err2);
|
|
277406
277414
|
if (code === "ENOENT") {
|
|
277407
|
-
const p2 =
|
|
277415
|
+
const p2 = path95 ?? "requested path";
|
|
277408
277416
|
return {
|
|
277409
277417
|
success: false,
|
|
277410
277418
|
error: "file_not_found",
|
|
277411
|
-
path:
|
|
277419
|
+
path: path95,
|
|
277412
277420
|
message: `No file at path "${p2}". Use list_files or explore_folder to find the correct path.`
|
|
277413
277421
|
};
|
|
277414
277422
|
}
|
|
277415
277423
|
if (code === "EISDIR" || msg.includes("is a directory") || msg.toLowerCase().includes("not a file")) {
|
|
277416
|
-
const p2 =
|
|
277424
|
+
const p2 = path95 ?? "requested path";
|
|
277417
277425
|
return {
|
|
277418
277426
|
success: false,
|
|
277419
277427
|
error: "not_a_file",
|
|
277420
|
-
path:
|
|
277428
|
+
path: path95,
|
|
277421
277429
|
message: `Path "${p2}" is a directory, not a file. Use explore_folder or list_files.`
|
|
277422
277430
|
};
|
|
277423
277431
|
}
|
|
@@ -277425,7 +277433,7 @@ function readFileStructuredError(err2, displayPath2) {
|
|
|
277425
277433
|
return {
|
|
277426
277434
|
success: false,
|
|
277427
277435
|
error: "path_not_allowed",
|
|
277428
|
-
path:
|
|
277436
|
+
path: path95,
|
|
277429
277437
|
message: msg
|
|
277430
277438
|
};
|
|
277431
277439
|
}
|
|
@@ -277433,7 +277441,7 @@ function readFileStructuredError(err2, displayPath2) {
|
|
|
277433
277441
|
return {
|
|
277434
277442
|
success: false,
|
|
277435
277443
|
error: "path_not_allowed",
|
|
277436
|
-
path:
|
|
277444
|
+
path: path95,
|
|
277437
277445
|
message: msg
|
|
277438
277446
|
};
|
|
277439
277447
|
}
|
|
@@ -282868,12 +282876,12 @@ var init_hosting_tier = __esm({
|
|
|
282868
282876
|
});
|
|
282869
282877
|
|
|
282870
282878
|
// supabase/functions/_shared/relic-files.ts
|
|
282871
|
-
function contentTypeFor(
|
|
282872
|
-
const ext =
|
|
282879
|
+
function contentTypeFor(path95) {
|
|
282880
|
+
const ext = path95.split(".").pop()?.toLowerCase() ?? "";
|
|
282873
282881
|
return TYPES[ext] ?? null;
|
|
282874
282882
|
}
|
|
282875
|
-
function cleanRelicPath(
|
|
282876
|
-
const p2 =
|
|
282883
|
+
function cleanRelicPath(path95) {
|
|
282884
|
+
const p2 = path95.trim().replace(/\\/g, "/").replace(/^\.\//, "");
|
|
282877
282885
|
if (!p2 || p2.length > 200 || p2.startsWith("/")) return null;
|
|
282878
282886
|
if (!/^[A-Za-z0-9._\-/]+$/.test(p2)) return null;
|
|
282879
282887
|
if (p2.split("/").some((seg) => seg === "" || seg === "." || seg === "..")) return null;
|
|
@@ -282890,22 +282898,22 @@ function prepareRelicFiles(files) {
|
|
|
282890
282898
|
const seen3 = /* @__PURE__ */ new Set();
|
|
282891
282899
|
let total = 0;
|
|
282892
282900
|
for (const f5 of files) {
|
|
282893
|
-
const
|
|
282894
|
-
if (!
|
|
282895
|
-
if (seen3.has(
|
|
282896
|
-
seen3.add(
|
|
282897
|
-
const type2 = contentTypeFor(
|
|
282898
|
-
if (!type2) return { error: `${
|
|
282899
|
-
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.` };
|
|
282900
282908
|
let bytes;
|
|
282901
282909
|
try {
|
|
282902
282910
|
bytes = f5.encoding === "base64" ? decodeBase64(f5.content) : new TextEncoder().encode(f5.content);
|
|
282903
282911
|
} catch {
|
|
282904
|
-
return { error: `${
|
|
282912
|
+
return { error: `${path95}: the base64 content doesn't decode.` };
|
|
282905
282913
|
}
|
|
282906
282914
|
total += bytes.length;
|
|
282907
282915
|
if (total > RELIC_LIMITS.maxBytes) return { error: `A relic can be at most ${RELIC_LIMITS.maxBytes / 1024 / 1024} MB.` };
|
|
282908
|
-
out.push({ path:
|
|
282916
|
+
out.push({ path: path95, bytes, contentType: type2 });
|
|
282909
282917
|
}
|
|
282910
282918
|
if (!seen3.has("index.html")) return { error: "A relic needs an index.html." };
|
|
282911
282919
|
return { files: out, bytes: total };
|
|
@@ -290496,32 +290504,32 @@ var require_URL = __commonJS({
|
|
|
290496
290504
|
else
|
|
290497
290505
|
return basepath.substring(0, lastslash + 1) + refpath;
|
|
290498
290506
|
}
|
|
290499
|
-
function remove_dot_segments(
|
|
290500
|
-
if (!
|
|
290507
|
+
function remove_dot_segments(path95) {
|
|
290508
|
+
if (!path95) return path95;
|
|
290501
290509
|
var output = "";
|
|
290502
|
-
while (
|
|
290503
|
-
if (
|
|
290504
|
-
|
|
290510
|
+
while (path95.length > 0) {
|
|
290511
|
+
if (path95 === "." || path95 === "..") {
|
|
290512
|
+
path95 = "";
|
|
290505
290513
|
break;
|
|
290506
290514
|
}
|
|
290507
|
-
var twochars =
|
|
290508
|
-
var threechars =
|
|
290509
|
-
var fourchars =
|
|
290515
|
+
var twochars = path95.substring(0, 2);
|
|
290516
|
+
var threechars = path95.substring(0, 3);
|
|
290517
|
+
var fourchars = path95.substring(0, 4);
|
|
290510
290518
|
if (threechars === "../") {
|
|
290511
|
-
|
|
290519
|
+
path95 = path95.substring(3);
|
|
290512
290520
|
} else if (twochars === "./") {
|
|
290513
|
-
|
|
290521
|
+
path95 = path95.substring(2);
|
|
290514
290522
|
} else if (threechars === "/./") {
|
|
290515
|
-
|
|
290516
|
-
} else if (twochars === "/." &&
|
|
290517
|
-
|
|
290518
|
-
} else if (fourchars === "/../" || threechars === "/.." &&
|
|
290519
|
-
|
|
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);
|
|
290520
290528
|
output = output.replace(/\/?[^\/]*$/, "");
|
|
290521
290529
|
} else {
|
|
290522
|
-
var segment =
|
|
290530
|
+
var segment = path95.match(/(\/?([^\/]*))/)[0];
|
|
290523
290531
|
output += segment;
|
|
290524
|
-
|
|
290532
|
+
path95 = path95.substring(segment.length);
|
|
290525
290533
|
}
|
|
290526
290534
|
}
|
|
290527
290535
|
return output;
|
|
@@ -302794,7 +302802,7 @@ async function paidCoreForChat(chatId) {
|
|
|
302794
302802
|
balanceCents
|
|
302795
302803
|
});
|
|
302796
302804
|
}
|
|
302797
|
-
async function coreProxyPost(
|
|
302805
|
+
async function coreProxyPost(path95, body, opts = {}) {
|
|
302798
302806
|
const base = getCoreProxyBaseUrl();
|
|
302799
302807
|
if (!base) return null;
|
|
302800
302808
|
let token2 = getPinnedCoreToken();
|
|
@@ -302815,7 +302823,7 @@ async function coreProxyPost(path94, body, opts = {}) {
|
|
|
302815
302823
|
} else {
|
|
302816
302824
|
payload = body.form;
|
|
302817
302825
|
}
|
|
302818
|
-
return coreProxyFetch(`${base}${
|
|
302826
|
+
return coreProxyFetch(`${base}${path95}`, {
|
|
302819
302827
|
method: "POST",
|
|
302820
302828
|
headers,
|
|
302821
302829
|
body: payload,
|
|
@@ -307459,54 +307467,54 @@ var require_polyfills2 = __commonJS({
|
|
|
307459
307467
|
}
|
|
307460
307468
|
var chdir;
|
|
307461
307469
|
module2.exports = patch;
|
|
307462
|
-
function patch(
|
|
307470
|
+
function patch(fs78) {
|
|
307463
307471
|
if (constants2.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
307464
|
-
patchLchmod(
|
|
307465
|
-
}
|
|
307466
|
-
if (!
|
|
307467
|
-
patchLutimes(
|
|
307468
|
-
}
|
|
307469
|
-
|
|
307470
|
-
|
|
307471
|
-
|
|
307472
|
-
|
|
307473
|
-
|
|
307474
|
-
|
|
307475
|
-
|
|
307476
|
-
|
|
307477
|
-
|
|
307478
|
-
|
|
307479
|
-
|
|
307480
|
-
|
|
307481
|
-
|
|
307482
|
-
|
|
307483
|
-
|
|
307484
|
-
|
|
307485
|
-
|
|
307486
|
-
|
|
307487
|
-
if (
|
|
307488
|
-
|
|
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) {
|
|
307489
307497
|
if (cb2) process.nextTick(cb2);
|
|
307490
307498
|
};
|
|
307491
|
-
|
|
307499
|
+
fs78.lchmodSync = function() {
|
|
307492
307500
|
};
|
|
307493
307501
|
}
|
|
307494
|
-
if (
|
|
307495
|
-
|
|
307502
|
+
if (fs78.chown && !fs78.lchown) {
|
|
307503
|
+
fs78.lchown = function(path95, uid, gid, cb2) {
|
|
307496
307504
|
if (cb2) process.nextTick(cb2);
|
|
307497
307505
|
};
|
|
307498
|
-
|
|
307506
|
+
fs78.lchownSync = function() {
|
|
307499
307507
|
};
|
|
307500
307508
|
}
|
|
307501
307509
|
if (platform === "win32") {
|
|
307502
|
-
|
|
307510
|
+
fs78.rename = typeof fs78.rename !== "function" ? fs78.rename : (function(fs$rename) {
|
|
307503
307511
|
function rename5(from, to2, cb2) {
|
|
307504
307512
|
var start = Date.now();
|
|
307505
307513
|
var backoff = 0;
|
|
307506
307514
|
fs$rename(from, to2, function CB(er2) {
|
|
307507
307515
|
if (er2 && (er2.code === "EACCES" || er2.code === "EPERM" || er2.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
307508
307516
|
setTimeout(function() {
|
|
307509
|
-
|
|
307517
|
+
fs78.stat(to2, function(stater, st2) {
|
|
307510
307518
|
if (stater && stater.code === "ENOENT")
|
|
307511
307519
|
fs$rename(from, to2, CB);
|
|
307512
307520
|
else
|
|
@@ -307522,9 +307530,9 @@ var require_polyfills2 = __commonJS({
|
|
|
307522
307530
|
}
|
|
307523
307531
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename5, fs$rename);
|
|
307524
307532
|
return rename5;
|
|
307525
|
-
})(
|
|
307533
|
+
})(fs78.rename);
|
|
307526
307534
|
}
|
|
307527
|
-
|
|
307535
|
+
fs78.read = typeof fs78.read !== "function" ? fs78.read : (function(fs$read) {
|
|
307528
307536
|
function read(fd2, buffer, offset, length, position, callback_) {
|
|
307529
307537
|
var callback;
|
|
307530
307538
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -307532,22 +307540,22 @@ var require_polyfills2 = __commonJS({
|
|
|
307532
307540
|
callback = function(er2, _4, __) {
|
|
307533
307541
|
if (er2 && er2.code === "EAGAIN" && eagCounter < 10) {
|
|
307534
307542
|
eagCounter++;
|
|
307535
|
-
return fs$read.call(
|
|
307543
|
+
return fs$read.call(fs78, fd2, buffer, offset, length, position, callback);
|
|
307536
307544
|
}
|
|
307537
307545
|
callback_.apply(this, arguments);
|
|
307538
307546
|
};
|
|
307539
307547
|
}
|
|
307540
|
-
return fs$read.call(
|
|
307548
|
+
return fs$read.call(fs78, fd2, buffer, offset, length, position, callback);
|
|
307541
307549
|
}
|
|
307542
307550
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
307543
307551
|
return read;
|
|
307544
|
-
})(
|
|
307545
|
-
|
|
307552
|
+
})(fs78.read);
|
|
307553
|
+
fs78.readSync = typeof fs78.readSync !== "function" ? fs78.readSync : /* @__PURE__ */ (function(fs$readSync) {
|
|
307546
307554
|
return function(fd2, buffer, offset, length, position) {
|
|
307547
307555
|
var eagCounter = 0;
|
|
307548
307556
|
while (true) {
|
|
307549
307557
|
try {
|
|
307550
|
-
return fs$readSync.call(
|
|
307558
|
+
return fs$readSync.call(fs78, fd2, buffer, offset, length, position);
|
|
307551
307559
|
} catch (er2) {
|
|
307552
307560
|
if (er2.code === "EAGAIN" && eagCounter < 10) {
|
|
307553
307561
|
eagCounter++;
|
|
@@ -307557,11 +307565,11 @@ var require_polyfills2 = __commonJS({
|
|
|
307557
307565
|
}
|
|
307558
307566
|
}
|
|
307559
307567
|
};
|
|
307560
|
-
})(
|
|
307561
|
-
function patchLchmod(
|
|
307562
|
-
|
|
307563
|
-
|
|
307564
|
-
|
|
307568
|
+
})(fs78.readSync);
|
|
307569
|
+
function patchLchmod(fs79) {
|
|
307570
|
+
fs79.lchmod = function(path95, mode, callback) {
|
|
307571
|
+
fs79.open(
|
|
307572
|
+
path95,
|
|
307565
307573
|
constants2.O_WRONLY | constants2.O_SYMLINK,
|
|
307566
307574
|
mode,
|
|
307567
307575
|
function(err2, fd2) {
|
|
@@ -307569,80 +307577,80 @@ var require_polyfills2 = __commonJS({
|
|
|
307569
307577
|
if (callback) callback(err2);
|
|
307570
307578
|
return;
|
|
307571
307579
|
}
|
|
307572
|
-
|
|
307573
|
-
|
|
307580
|
+
fs79.fchmod(fd2, mode, function(err3) {
|
|
307581
|
+
fs79.close(fd2, function(err22) {
|
|
307574
307582
|
if (callback) callback(err3 || err22);
|
|
307575
307583
|
});
|
|
307576
307584
|
});
|
|
307577
307585
|
}
|
|
307578
307586
|
);
|
|
307579
307587
|
};
|
|
307580
|
-
|
|
307581
|
-
var fd2 =
|
|
307588
|
+
fs79.lchmodSync = function(path95, mode) {
|
|
307589
|
+
var fd2 = fs79.openSync(path95, constants2.O_WRONLY | constants2.O_SYMLINK, mode);
|
|
307582
307590
|
var threw = true;
|
|
307583
307591
|
var ret2;
|
|
307584
307592
|
try {
|
|
307585
|
-
ret2 =
|
|
307593
|
+
ret2 = fs79.fchmodSync(fd2, mode);
|
|
307586
307594
|
threw = false;
|
|
307587
307595
|
} finally {
|
|
307588
307596
|
if (threw) {
|
|
307589
307597
|
try {
|
|
307590
|
-
|
|
307598
|
+
fs79.closeSync(fd2);
|
|
307591
307599
|
} catch (er2) {
|
|
307592
307600
|
}
|
|
307593
307601
|
} else {
|
|
307594
|
-
|
|
307602
|
+
fs79.closeSync(fd2);
|
|
307595
307603
|
}
|
|
307596
307604
|
}
|
|
307597
307605
|
return ret2;
|
|
307598
307606
|
};
|
|
307599
307607
|
}
|
|
307600
|
-
function patchLutimes(
|
|
307601
|
-
if (constants2.hasOwnProperty("O_SYMLINK") &&
|
|
307602
|
-
|
|
307603
|
-
|
|
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) {
|
|
307604
307612
|
if (er2) {
|
|
307605
307613
|
if (cb2) cb2(er2);
|
|
307606
307614
|
return;
|
|
307607
307615
|
}
|
|
307608
|
-
|
|
307609
|
-
|
|
307616
|
+
fs79.futimes(fd2, at2, mt2, function(er3) {
|
|
307617
|
+
fs79.close(fd2, function(er22) {
|
|
307610
307618
|
if (cb2) cb2(er3 || er22);
|
|
307611
307619
|
});
|
|
307612
307620
|
});
|
|
307613
307621
|
});
|
|
307614
307622
|
};
|
|
307615
|
-
|
|
307616
|
-
var fd2 =
|
|
307623
|
+
fs79.lutimesSync = function(path95, at2, mt2) {
|
|
307624
|
+
var fd2 = fs79.openSync(path95, constants2.O_SYMLINK);
|
|
307617
307625
|
var ret2;
|
|
307618
307626
|
var threw = true;
|
|
307619
307627
|
try {
|
|
307620
|
-
ret2 =
|
|
307628
|
+
ret2 = fs79.futimesSync(fd2, at2, mt2);
|
|
307621
307629
|
threw = false;
|
|
307622
307630
|
} finally {
|
|
307623
307631
|
if (threw) {
|
|
307624
307632
|
try {
|
|
307625
|
-
|
|
307633
|
+
fs79.closeSync(fd2);
|
|
307626
307634
|
} catch (er2) {
|
|
307627
307635
|
}
|
|
307628
307636
|
} else {
|
|
307629
|
-
|
|
307637
|
+
fs79.closeSync(fd2);
|
|
307630
307638
|
}
|
|
307631
307639
|
}
|
|
307632
307640
|
return ret2;
|
|
307633
307641
|
};
|
|
307634
|
-
} else if (
|
|
307635
|
-
|
|
307642
|
+
} else if (fs79.futimes) {
|
|
307643
|
+
fs79.lutimes = function(_a30, _b21, _c, cb2) {
|
|
307636
307644
|
if (cb2) process.nextTick(cb2);
|
|
307637
307645
|
};
|
|
307638
|
-
|
|
307646
|
+
fs79.lutimesSync = function() {
|
|
307639
307647
|
};
|
|
307640
307648
|
}
|
|
307641
307649
|
}
|
|
307642
307650
|
function chmodFix(orig) {
|
|
307643
307651
|
if (!orig) return orig;
|
|
307644
307652
|
return function(target, mode, cb2) {
|
|
307645
|
-
return orig.call(
|
|
307653
|
+
return orig.call(fs78, target, mode, function(er2) {
|
|
307646
307654
|
if (chownErOk(er2)) er2 = null;
|
|
307647
307655
|
if (cb2) cb2.apply(this, arguments);
|
|
307648
307656
|
});
|
|
@@ -307652,7 +307660,7 @@ var require_polyfills2 = __commonJS({
|
|
|
307652
307660
|
if (!orig) return orig;
|
|
307653
307661
|
return function(target, mode) {
|
|
307654
307662
|
try {
|
|
307655
|
-
return orig.call(
|
|
307663
|
+
return orig.call(fs78, target, mode);
|
|
307656
307664
|
} catch (er2) {
|
|
307657
307665
|
if (!chownErOk(er2)) throw er2;
|
|
307658
307666
|
}
|
|
@@ -307661,7 +307669,7 @@ var require_polyfills2 = __commonJS({
|
|
|
307661
307669
|
function chownFix(orig) {
|
|
307662
307670
|
if (!orig) return orig;
|
|
307663
307671
|
return function(target, uid, gid, cb2) {
|
|
307664
|
-
return orig.call(
|
|
307672
|
+
return orig.call(fs78, target, uid, gid, function(er2) {
|
|
307665
307673
|
if (chownErOk(er2)) er2 = null;
|
|
307666
307674
|
if (cb2) cb2.apply(this, arguments);
|
|
307667
307675
|
});
|
|
@@ -307671,7 +307679,7 @@ var require_polyfills2 = __commonJS({
|
|
|
307671
307679
|
if (!orig) return orig;
|
|
307672
307680
|
return function(target, uid, gid) {
|
|
307673
307681
|
try {
|
|
307674
|
-
return orig.call(
|
|
307682
|
+
return orig.call(fs78, target, uid, gid);
|
|
307675
307683
|
} catch (er2) {
|
|
307676
307684
|
if (!chownErOk(er2)) throw er2;
|
|
307677
307685
|
}
|
|
@@ -307691,13 +307699,13 @@ var require_polyfills2 = __commonJS({
|
|
|
307691
307699
|
}
|
|
307692
307700
|
if (cb2) cb2.apply(this, arguments);
|
|
307693
307701
|
}
|
|
307694
|
-
return options2 ? orig.call(
|
|
307702
|
+
return options2 ? orig.call(fs78, target, options2, callback) : orig.call(fs78, target, callback);
|
|
307695
307703
|
};
|
|
307696
307704
|
}
|
|
307697
307705
|
function statFixSync(orig) {
|
|
307698
307706
|
if (!orig) return orig;
|
|
307699
307707
|
return function(target, options2) {
|
|
307700
|
-
var stats = options2 ? orig.call(
|
|
307708
|
+
var stats = options2 ? orig.call(fs78, target, options2) : orig.call(fs78, target);
|
|
307701
307709
|
if (stats) {
|
|
307702
307710
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
307703
307711
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -307726,16 +307734,16 @@ var require_legacy_streams = __commonJS({
|
|
|
307726
307734
|
"node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
307727
307735
|
var Stream5 = __require("stream").Stream;
|
|
307728
307736
|
module2.exports = legacy2;
|
|
307729
|
-
function legacy2(
|
|
307737
|
+
function legacy2(fs78) {
|
|
307730
307738
|
return {
|
|
307731
307739
|
ReadStream: ReadStream2,
|
|
307732
307740
|
WriteStream
|
|
307733
307741
|
};
|
|
307734
|
-
function ReadStream2(
|
|
307735
|
-
if (!(this instanceof ReadStream2)) return new ReadStream2(
|
|
307742
|
+
function ReadStream2(path95, options2) {
|
|
307743
|
+
if (!(this instanceof ReadStream2)) return new ReadStream2(path95, options2);
|
|
307736
307744
|
Stream5.call(this);
|
|
307737
307745
|
var self2 = this;
|
|
307738
|
-
this.path =
|
|
307746
|
+
this.path = path95;
|
|
307739
307747
|
this.fd = null;
|
|
307740
307748
|
this.readable = true;
|
|
307741
307749
|
this.paused = false;
|
|
@@ -307769,7 +307777,7 @@ var require_legacy_streams = __commonJS({
|
|
|
307769
307777
|
});
|
|
307770
307778
|
return;
|
|
307771
307779
|
}
|
|
307772
|
-
|
|
307780
|
+
fs78.open(this.path, this.flags, this.mode, function(err2, fd2) {
|
|
307773
307781
|
if (err2) {
|
|
307774
307782
|
self2.emit("error", err2);
|
|
307775
307783
|
self2.readable = false;
|
|
@@ -307780,10 +307788,10 @@ var require_legacy_streams = __commonJS({
|
|
|
307780
307788
|
self2._read();
|
|
307781
307789
|
});
|
|
307782
307790
|
}
|
|
307783
|
-
function WriteStream(
|
|
307784
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
307791
|
+
function WriteStream(path95, options2) {
|
|
307792
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path95, options2);
|
|
307785
307793
|
Stream5.call(this);
|
|
307786
|
-
this.path =
|
|
307794
|
+
this.path = path95;
|
|
307787
307795
|
this.fd = null;
|
|
307788
307796
|
this.writable = true;
|
|
307789
307797
|
this.flags = "w";
|
|
@@ -307808,7 +307816,7 @@ var require_legacy_streams = __commonJS({
|
|
|
307808
307816
|
this.busy = false;
|
|
307809
307817
|
this._queue = [];
|
|
307810
307818
|
if (this.fd === null) {
|
|
307811
|
-
this._open =
|
|
307819
|
+
this._open = fs78.open;
|
|
307812
307820
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
307813
307821
|
this.flush();
|
|
307814
307822
|
}
|
|
@@ -307843,7 +307851,7 @@ var require_clone = __commonJS({
|
|
|
307843
307851
|
// node_modules/graceful-fs/graceful-fs.js
|
|
307844
307852
|
var require_graceful_fs = __commonJS({
|
|
307845
307853
|
"node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
307846
|
-
var
|
|
307854
|
+
var fs78 = __require("fs");
|
|
307847
307855
|
var polyfills = require_polyfills2();
|
|
307848
307856
|
var legacy2 = require_legacy_streams();
|
|
307849
307857
|
var clone4 = require_clone();
|
|
@@ -307875,12 +307883,12 @@ var require_graceful_fs = __commonJS({
|
|
|
307875
307883
|
m3 = "GFS4: " + m3.split(/\n/).join("\nGFS4: ");
|
|
307876
307884
|
console.error(m3);
|
|
307877
307885
|
};
|
|
307878
|
-
if (!
|
|
307886
|
+
if (!fs78[gracefulQueue]) {
|
|
307879
307887
|
queue2 = global[gracefulQueue] || [];
|
|
307880
|
-
publishQueue(
|
|
307881
|
-
|
|
307888
|
+
publishQueue(fs78, queue2);
|
|
307889
|
+
fs78.close = (function(fs$close) {
|
|
307882
307890
|
function close(fd2, cb2) {
|
|
307883
|
-
return fs$close.call(
|
|
307891
|
+
return fs$close.call(fs78, fd2, function(err2) {
|
|
307884
307892
|
if (!err2) {
|
|
307885
307893
|
resetQueue();
|
|
307886
307894
|
}
|
|
@@ -307892,48 +307900,48 @@ var require_graceful_fs = __commonJS({
|
|
|
307892
307900
|
value: fs$close
|
|
307893
307901
|
});
|
|
307894
307902
|
return close;
|
|
307895
|
-
})(
|
|
307896
|
-
|
|
307903
|
+
})(fs78.close);
|
|
307904
|
+
fs78.closeSync = (function(fs$closeSync) {
|
|
307897
307905
|
function closeSync(fd2) {
|
|
307898
|
-
fs$closeSync.apply(
|
|
307906
|
+
fs$closeSync.apply(fs78, arguments);
|
|
307899
307907
|
resetQueue();
|
|
307900
307908
|
}
|
|
307901
307909
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
307902
307910
|
value: fs$closeSync
|
|
307903
307911
|
});
|
|
307904
307912
|
return closeSync;
|
|
307905
|
-
})(
|
|
307913
|
+
})(fs78.closeSync);
|
|
307906
307914
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
307907
307915
|
process.on("exit", function() {
|
|
307908
|
-
debug(
|
|
307909
|
-
__require("assert").equal(
|
|
307916
|
+
debug(fs78[gracefulQueue]);
|
|
307917
|
+
__require("assert").equal(fs78[gracefulQueue].length, 0);
|
|
307910
307918
|
});
|
|
307911
307919
|
}
|
|
307912
307920
|
}
|
|
307913
307921
|
var queue2;
|
|
307914
307922
|
if (!global[gracefulQueue]) {
|
|
307915
|
-
publishQueue(global,
|
|
307916
|
-
}
|
|
307917
|
-
module2.exports = patch(clone4(
|
|
307918
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
307919
|
-
module2.exports = patch(
|
|
307920
|
-
|
|
307921
|
-
}
|
|
307922
|
-
function patch(
|
|
307923
|
-
polyfills(
|
|
307924
|
-
|
|
307925
|
-
|
|
307926
|
-
|
|
307927
|
-
var fs$readFile =
|
|
307928
|
-
|
|
307929
|
-
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) {
|
|
307930
307938
|
if (typeof options2 === "function")
|
|
307931
307939
|
cb2 = options2, options2 = null;
|
|
307932
|
-
return go$readFile(
|
|
307933
|
-
function go$readFile(
|
|
307934
|
-
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) {
|
|
307935
307943
|
if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
|
|
307936
|
-
enqueue([go$readFile, [
|
|
307944
|
+
enqueue([go$readFile, [path96, options3, cb3], err2, startTime || Date.now(), Date.now()]);
|
|
307937
307945
|
else {
|
|
307938
307946
|
if (typeof cb3 === "function")
|
|
307939
307947
|
cb3.apply(this, arguments);
|
|
@@ -307941,16 +307949,16 @@ var require_graceful_fs = __commonJS({
|
|
|
307941
307949
|
});
|
|
307942
307950
|
}
|
|
307943
307951
|
}
|
|
307944
|
-
var fs$writeFile =
|
|
307945
|
-
|
|
307946
|
-
function writeFile11(
|
|
307952
|
+
var fs$writeFile = fs79.writeFile;
|
|
307953
|
+
fs79.writeFile = writeFile11;
|
|
307954
|
+
function writeFile11(path95, data, options2, cb2) {
|
|
307947
307955
|
if (typeof options2 === "function")
|
|
307948
307956
|
cb2 = options2, options2 = null;
|
|
307949
|
-
return go$writeFile(
|
|
307950
|
-
function go$writeFile(
|
|
307951
|
-
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) {
|
|
307952
307960
|
if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
|
|
307953
|
-
enqueue([go$writeFile, [
|
|
307961
|
+
enqueue([go$writeFile, [path96, data2, options3, cb3], err2, startTime || Date.now(), Date.now()]);
|
|
307954
307962
|
else {
|
|
307955
307963
|
if (typeof cb3 === "function")
|
|
307956
307964
|
cb3.apply(this, arguments);
|
|
@@ -307958,17 +307966,17 @@ var require_graceful_fs = __commonJS({
|
|
|
307958
307966
|
});
|
|
307959
307967
|
}
|
|
307960
307968
|
}
|
|
307961
|
-
var fs$appendFile =
|
|
307969
|
+
var fs$appendFile = fs79.appendFile;
|
|
307962
307970
|
if (fs$appendFile)
|
|
307963
|
-
|
|
307964
|
-
function appendFile(
|
|
307971
|
+
fs79.appendFile = appendFile;
|
|
307972
|
+
function appendFile(path95, data, options2, cb2) {
|
|
307965
307973
|
if (typeof options2 === "function")
|
|
307966
307974
|
cb2 = options2, options2 = null;
|
|
307967
|
-
return go$appendFile(
|
|
307968
|
-
function go$appendFile(
|
|
307969
|
-
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) {
|
|
307970
307978
|
if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
|
|
307971
|
-
enqueue([go$appendFile, [
|
|
307979
|
+
enqueue([go$appendFile, [path96, data2, options3, cb3], err2, startTime || Date.now(), Date.now()]);
|
|
307972
307980
|
else {
|
|
307973
307981
|
if (typeof cb3 === "function")
|
|
307974
307982
|
cb3.apply(this, arguments);
|
|
@@ -307976,9 +307984,9 @@ var require_graceful_fs = __commonJS({
|
|
|
307976
307984
|
});
|
|
307977
307985
|
}
|
|
307978
307986
|
}
|
|
307979
|
-
var fs$copyFile =
|
|
307987
|
+
var fs$copyFile = fs79.copyFile;
|
|
307980
307988
|
if (fs$copyFile)
|
|
307981
|
-
|
|
307989
|
+
fs79.copyFile = copyFile;
|
|
307982
307990
|
function copyFile(src, dest, flags, cb2) {
|
|
307983
307991
|
if (typeof flags === "function") {
|
|
307984
307992
|
cb2 = flags;
|
|
@@ -307996,34 +308004,34 @@ var require_graceful_fs = __commonJS({
|
|
|
307996
308004
|
});
|
|
307997
308005
|
}
|
|
307998
308006
|
}
|
|
307999
|
-
var fs$readdir =
|
|
308000
|
-
|
|
308007
|
+
var fs$readdir = fs79.readdir;
|
|
308008
|
+
fs79.readdir = readdir3;
|
|
308001
308009
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
308002
|
-
function readdir3(
|
|
308010
|
+
function readdir3(path95, options2, cb2) {
|
|
308003
308011
|
if (typeof options2 === "function")
|
|
308004
308012
|
cb2 = options2, options2 = null;
|
|
308005
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
308006
|
-
return fs$readdir(
|
|
308007
|
-
|
|
308013
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path96, options3, cb3, startTime) {
|
|
308014
|
+
return fs$readdir(path96, fs$readdirCallback(
|
|
308015
|
+
path96,
|
|
308008
308016
|
options3,
|
|
308009
308017
|
cb3,
|
|
308010
308018
|
startTime
|
|
308011
308019
|
));
|
|
308012
|
-
} : function go$readdir2(
|
|
308013
|
-
return fs$readdir(
|
|
308014
|
-
|
|
308020
|
+
} : function go$readdir2(path96, options3, cb3, startTime) {
|
|
308021
|
+
return fs$readdir(path96, options3, fs$readdirCallback(
|
|
308022
|
+
path96,
|
|
308015
308023
|
options3,
|
|
308016
308024
|
cb3,
|
|
308017
308025
|
startTime
|
|
308018
308026
|
));
|
|
308019
308027
|
};
|
|
308020
|
-
return go$readdir(
|
|
308021
|
-
function fs$readdirCallback(
|
|
308028
|
+
return go$readdir(path95, options2, cb2);
|
|
308029
|
+
function fs$readdirCallback(path96, options3, cb3, startTime) {
|
|
308022
308030
|
return function(err2, files) {
|
|
308023
308031
|
if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
|
|
308024
308032
|
enqueue([
|
|
308025
308033
|
go$readdir,
|
|
308026
|
-
[
|
|
308034
|
+
[path96, options3, cb3],
|
|
308027
308035
|
err2,
|
|
308028
308036
|
startTime || Date.now(),
|
|
308029
308037
|
Date.now()
|
|
@@ -308038,21 +308046,21 @@ var require_graceful_fs = __commonJS({
|
|
|
308038
308046
|
}
|
|
308039
308047
|
}
|
|
308040
308048
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
308041
|
-
var legStreams = legacy2(
|
|
308049
|
+
var legStreams = legacy2(fs79);
|
|
308042
308050
|
ReadStream2 = legStreams.ReadStream;
|
|
308043
308051
|
WriteStream = legStreams.WriteStream;
|
|
308044
308052
|
}
|
|
308045
|
-
var fs$ReadStream =
|
|
308053
|
+
var fs$ReadStream = fs79.ReadStream;
|
|
308046
308054
|
if (fs$ReadStream) {
|
|
308047
308055
|
ReadStream2.prototype = Object.create(fs$ReadStream.prototype);
|
|
308048
308056
|
ReadStream2.prototype.open = ReadStream$open;
|
|
308049
308057
|
}
|
|
308050
|
-
var fs$WriteStream =
|
|
308058
|
+
var fs$WriteStream = fs79.WriteStream;
|
|
308051
308059
|
if (fs$WriteStream) {
|
|
308052
308060
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
308053
308061
|
WriteStream.prototype.open = WriteStream$open;
|
|
308054
308062
|
}
|
|
308055
|
-
Object.defineProperty(
|
|
308063
|
+
Object.defineProperty(fs79, "ReadStream", {
|
|
308056
308064
|
get: function() {
|
|
308057
308065
|
return ReadStream2;
|
|
308058
308066
|
},
|
|
@@ -308062,7 +308070,7 @@ var require_graceful_fs = __commonJS({
|
|
|
308062
308070
|
enumerable: true,
|
|
308063
308071
|
configurable: true
|
|
308064
308072
|
});
|
|
308065
|
-
Object.defineProperty(
|
|
308073
|
+
Object.defineProperty(fs79, "WriteStream", {
|
|
308066
308074
|
get: function() {
|
|
308067
308075
|
return WriteStream;
|
|
308068
308076
|
},
|
|
@@ -308073,7 +308081,7 @@ var require_graceful_fs = __commonJS({
|
|
|
308073
308081
|
configurable: true
|
|
308074
308082
|
});
|
|
308075
308083
|
var FileReadStream = ReadStream2;
|
|
308076
|
-
Object.defineProperty(
|
|
308084
|
+
Object.defineProperty(fs79, "FileReadStream", {
|
|
308077
308085
|
get: function() {
|
|
308078
308086
|
return FileReadStream;
|
|
308079
308087
|
},
|
|
@@ -308084,7 +308092,7 @@ var require_graceful_fs = __commonJS({
|
|
|
308084
308092
|
configurable: true
|
|
308085
308093
|
});
|
|
308086
308094
|
var FileWriteStream = WriteStream;
|
|
308087
|
-
Object.defineProperty(
|
|
308095
|
+
Object.defineProperty(fs79, "FileWriteStream", {
|
|
308088
308096
|
get: function() {
|
|
308089
308097
|
return FileWriteStream;
|
|
308090
308098
|
},
|
|
@@ -308094,7 +308102,7 @@ var require_graceful_fs = __commonJS({
|
|
|
308094
308102
|
enumerable: true,
|
|
308095
308103
|
configurable: true
|
|
308096
308104
|
});
|
|
308097
|
-
function ReadStream2(
|
|
308105
|
+
function ReadStream2(path95, options2) {
|
|
308098
308106
|
if (this instanceof ReadStream2)
|
|
308099
308107
|
return fs$ReadStream.apply(this, arguments), this;
|
|
308100
308108
|
else
|
|
@@ -308114,7 +308122,7 @@ var require_graceful_fs = __commonJS({
|
|
|
308114
308122
|
}
|
|
308115
308123
|
});
|
|
308116
308124
|
}
|
|
308117
|
-
function WriteStream(
|
|
308125
|
+
function WriteStream(path95, options2) {
|
|
308118
308126
|
if (this instanceof WriteStream)
|
|
308119
308127
|
return fs$WriteStream.apply(this, arguments), this;
|
|
308120
308128
|
else
|
|
@@ -308132,22 +308140,22 @@ var require_graceful_fs = __commonJS({
|
|
|
308132
308140
|
}
|
|
308133
308141
|
});
|
|
308134
308142
|
}
|
|
308135
|
-
function createReadStream3(
|
|
308136
|
-
return new
|
|
308143
|
+
function createReadStream3(path95, options2) {
|
|
308144
|
+
return new fs79.ReadStream(path95, options2);
|
|
308137
308145
|
}
|
|
308138
|
-
function createWriteStream(
|
|
308139
|
-
return new
|
|
308146
|
+
function createWriteStream(path95, options2) {
|
|
308147
|
+
return new fs79.WriteStream(path95, options2);
|
|
308140
308148
|
}
|
|
308141
|
-
var fs$open =
|
|
308142
|
-
|
|
308143
|
-
function open(
|
|
308149
|
+
var fs$open = fs79.open;
|
|
308150
|
+
fs79.open = open;
|
|
308151
|
+
function open(path95, flags, mode, cb2) {
|
|
308144
308152
|
if (typeof mode === "function")
|
|
308145
308153
|
cb2 = mode, mode = null;
|
|
308146
|
-
return go$open(
|
|
308147
|
-
function go$open(
|
|
308148
|
-
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) {
|
|
308149
308157
|
if (err2 && (err2.code === "EMFILE" || err2.code === "ENFILE"))
|
|
308150
|
-
enqueue([go$open, [
|
|
308158
|
+
enqueue([go$open, [path96, flags2, mode2, cb3], err2, startTime || Date.now(), Date.now()]);
|
|
308151
308159
|
else {
|
|
308152
308160
|
if (typeof cb3 === "function")
|
|
308153
308161
|
cb3.apply(this, arguments);
|
|
@@ -308155,20 +308163,20 @@ var require_graceful_fs = __commonJS({
|
|
|
308155
308163
|
});
|
|
308156
308164
|
}
|
|
308157
308165
|
}
|
|
308158
|
-
return
|
|
308166
|
+
return fs79;
|
|
308159
308167
|
}
|
|
308160
308168
|
function enqueue(elem) {
|
|
308161
308169
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
308162
|
-
|
|
308170
|
+
fs78[gracefulQueue].push(elem);
|
|
308163
308171
|
retry();
|
|
308164
308172
|
}
|
|
308165
308173
|
var retryTimer2;
|
|
308166
308174
|
function resetQueue() {
|
|
308167
308175
|
var now2 = Date.now();
|
|
308168
|
-
for (var i4 = 0; i4 <
|
|
308169
|
-
if (
|
|
308170
|
-
|
|
308171
|
-
|
|
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;
|
|
308172
308180
|
}
|
|
308173
308181
|
}
|
|
308174
308182
|
retry();
|
|
@@ -308176,9 +308184,9 @@ var require_graceful_fs = __commonJS({
|
|
|
308176
308184
|
function retry() {
|
|
308177
308185
|
clearTimeout(retryTimer2);
|
|
308178
308186
|
retryTimer2 = void 0;
|
|
308179
|
-
if (
|
|
308187
|
+
if (fs78[gracefulQueue].length === 0)
|
|
308180
308188
|
return;
|
|
308181
|
-
var elem =
|
|
308189
|
+
var elem = fs78[gracefulQueue].shift();
|
|
308182
308190
|
var fn2 = elem[0];
|
|
308183
308191
|
var args2 = elem[1];
|
|
308184
308192
|
var err2 = elem[2];
|
|
@@ -308200,7 +308208,7 @@ var require_graceful_fs = __commonJS({
|
|
|
308200
308208
|
debug("RETRY", fn2.name, args2);
|
|
308201
308209
|
fn2.apply(null, args2.concat([startTime]));
|
|
308202
308210
|
} else {
|
|
308203
|
-
|
|
308211
|
+
fs78[gracefulQueue].push(elem);
|
|
308204
308212
|
}
|
|
308205
308213
|
}
|
|
308206
308214
|
if (retryTimer2 === void 0) {
|
|
@@ -308951,8 +308959,8 @@ var init_convertInputToNodeStream = __esm({
|
|
|
308951
308959
|
|
|
308952
308960
|
// node_modules/read-excel-file/modules/export/filterZipArchiveEntry.js
|
|
308953
308961
|
function filterZipArchiveEntry(_ref) {
|
|
308954
|
-
var
|
|
308955
|
-
return
|
|
308962
|
+
var path95 = _ref.path;
|
|
308963
|
+
return path95.endsWith(".xml") || path95.endsWith(".xml.rels");
|
|
308956
308964
|
}
|
|
308957
308965
|
var init_filterZipArchiveEntry = __esm({
|
|
308958
308966
|
"node_modules/read-excel-file/modules/export/filterZipArchiveEntry.js"() {
|
|
@@ -309355,11 +309363,11 @@ function parseFilePaths(content, parseXml2) {
|
|
|
309355
309363
|
break;
|
|
309356
309364
|
}
|
|
309357
309365
|
}
|
|
309358
|
-
function getFilePathFromRelationTarget(
|
|
309359
|
-
if (
|
|
309360
|
-
return
|
|
309366
|
+
function getFilePathFromRelationTarget(path95) {
|
|
309367
|
+
if (path95[0] === "/") {
|
|
309368
|
+
return path95.slice("/".length);
|
|
309361
309369
|
}
|
|
309362
|
-
return "xl/" +
|
|
309370
|
+
return "xl/" + path95;
|
|
309363
309371
|
}
|
|
309364
309372
|
}
|
|
309365
309373
|
var init_parseFilePaths = __esm({
|
|
@@ -311464,18 +311472,18 @@ function parseDataRow(dataRow, schema, columns, options2) {
|
|
|
311464
311472
|
object: transformValue(value, isEmptyValue2, void 0, options2)
|
|
311465
311473
|
};
|
|
311466
311474
|
}
|
|
311467
|
-
function parseObject(row, schema,
|
|
311475
|
+
function parseObject(row, schema, path95, columns, options2) {
|
|
311468
311476
|
var object4 = {};
|
|
311469
311477
|
var isEmptyObject = true;
|
|
311470
311478
|
var errors = [];
|
|
311471
311479
|
var children = [];
|
|
311472
311480
|
for (var _i2 = 0, _Object$keys = Object.keys(schema); _i2 < _Object$keys.length; _i2++) {
|
|
311473
311481
|
var key = _Object$keys[_i2];
|
|
311474
|
-
var child2 = parseProperty(row, schema[key], getPropertyPath(key,
|
|
311482
|
+
var child2 = parseProperty(row, schema[key], getPropertyPath(key, path95), columns, options2);
|
|
311475
311483
|
if (child2.errors) {
|
|
311476
311484
|
errors = errors.concat(child2.errors);
|
|
311477
311485
|
} else {
|
|
311478
|
-
object4[key] = transformValue(child2.value, child2.isEmptyValue, getPropertyPath(key,
|
|
311486
|
+
object4[key] = transformValue(child2.value, child2.isEmptyValue, getPropertyPath(key, path95), options2);
|
|
311479
311487
|
if (isEmptyObject && !child2.isEmptyValue) {
|
|
311480
311488
|
isEmptyObject = false;
|
|
311481
311489
|
}
|
|
@@ -311500,13 +311508,13 @@ function parseObject(row, schema, path94, columns, options2) {
|
|
|
311500
311508
|
children
|
|
311501
311509
|
};
|
|
311502
311510
|
}
|
|
311503
|
-
function parseProperty(row, schemaEntry,
|
|
311511
|
+
function parseProperty(row, schemaEntry, path95, columns, options2) {
|
|
311504
311512
|
var columnIndex = schemaEntry.column ? columns.indexOf(schemaEntry.column) : void 0;
|
|
311505
311513
|
var isMissingColumn = schemaEntry.column ? columnIndex < 0 : void 0;
|
|
311506
311514
|
var _ref = schemaEntry.column ? isMissingColumn ? {
|
|
311507
311515
|
value: options2.propertyValueWhenColumnIsMissing,
|
|
311508
311516
|
isEmptyValue: true
|
|
311509
|
-
} : 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;
|
|
311510
311518
|
if (errors) {
|
|
311511
311519
|
return {
|
|
311512
311520
|
// Return the errors.
|
|
@@ -311725,15 +311733,15 @@ function parseSeparatedSubstrings(string4, separatorCharacter) {
|
|
|
311725
311733
|
}
|
|
311726
311734
|
return elements;
|
|
311727
311735
|
}
|
|
311728
|
-
function transformValue(value, isEmptyValue2,
|
|
311736
|
+
function transformValue(value, isEmptyValue2, path95, options2) {
|
|
311729
311737
|
if (isEmptyValue2) {
|
|
311730
311738
|
if (isObject3(value)) {
|
|
311731
311739
|
return options2.transformEmptyObject(value, {
|
|
311732
|
-
path:
|
|
311740
|
+
path: path95
|
|
311733
311741
|
});
|
|
311734
311742
|
} else if (Array.isArray(value)) {
|
|
311735
311743
|
return options2.transformEmptyArray(value, {
|
|
311736
|
-
path:
|
|
311744
|
+
path: path95
|
|
311737
311745
|
});
|
|
311738
311746
|
}
|
|
311739
311747
|
}
|
|
@@ -313200,8 +313208,8 @@ var init_tap = __esm({
|
|
|
313200
313208
|
});
|
|
313201
313209
|
|
|
313202
313210
|
// node_modules/underscore/modules/toPath.js
|
|
313203
|
-
function toPath(
|
|
313204
|
-
return isArray_default(
|
|
313211
|
+
function toPath(path95) {
|
|
313212
|
+
return isArray_default(path95) ? path95 : [path95];
|
|
313205
313213
|
}
|
|
313206
313214
|
var init_toPath = __esm({
|
|
313207
313215
|
"node_modules/underscore/modules/toPath.js"() {
|
|
@@ -313212,8 +313220,8 @@ var init_toPath = __esm({
|
|
|
313212
313220
|
});
|
|
313213
313221
|
|
|
313214
313222
|
// node_modules/underscore/modules/_toPath.js
|
|
313215
|
-
function toPath2(
|
|
313216
|
-
return _2.toPath(
|
|
313223
|
+
function toPath2(path95) {
|
|
313224
|
+
return _2.toPath(path95);
|
|
313217
313225
|
}
|
|
313218
313226
|
var init_toPath2 = __esm({
|
|
313219
313227
|
"node_modules/underscore/modules/_toPath.js"() {
|
|
@@ -313223,11 +313231,11 @@ var init_toPath2 = __esm({
|
|
|
313223
313231
|
});
|
|
313224
313232
|
|
|
313225
313233
|
// node_modules/underscore/modules/_deepGet.js
|
|
313226
|
-
function deepGet(obj2,
|
|
313227
|
-
var length =
|
|
313234
|
+
function deepGet(obj2, path95) {
|
|
313235
|
+
var length = path95.length;
|
|
313228
313236
|
for (var i4 = 0; i4 < length; i4++) {
|
|
313229
313237
|
if (obj2 == null) return void 0;
|
|
313230
|
-
obj2 = obj2[
|
|
313238
|
+
obj2 = obj2[path95[i4]];
|
|
313231
313239
|
}
|
|
313232
313240
|
return length ? obj2 : void 0;
|
|
313233
313241
|
}
|
|
@@ -313237,8 +313245,8 @@ var init_deepGet = __esm({
|
|
|
313237
313245
|
});
|
|
313238
313246
|
|
|
313239
313247
|
// node_modules/underscore/modules/get.js
|
|
313240
|
-
function get2(object4,
|
|
313241
|
-
var value = deepGet(object4, toPath2(
|
|
313248
|
+
function get2(object4, path95, defaultValue) {
|
|
313249
|
+
var value = deepGet(object4, toPath2(path95));
|
|
313242
313250
|
return isUndefined(value) ? defaultValue : value;
|
|
313243
313251
|
}
|
|
313244
313252
|
var init_get = __esm({
|
|
@@ -313250,11 +313258,11 @@ var init_get = __esm({
|
|
|
313250
313258
|
});
|
|
313251
313259
|
|
|
313252
313260
|
// node_modules/underscore/modules/has.js
|
|
313253
|
-
function has2(obj2,
|
|
313254
|
-
|
|
313255
|
-
var length =
|
|
313261
|
+
function has2(obj2, path95) {
|
|
313262
|
+
path95 = toPath2(path95);
|
|
313263
|
+
var length = path95.length;
|
|
313256
313264
|
for (var i4 = 0; i4 < length; i4++) {
|
|
313257
|
-
var key =
|
|
313265
|
+
var key = path95[i4];
|
|
313258
313266
|
if (!has(obj2, key)) return false;
|
|
313259
313267
|
obj2 = obj2[key];
|
|
313260
313268
|
}
|
|
@@ -313291,10 +313299,10 @@ var init_matcher = __esm({
|
|
|
313291
313299
|
});
|
|
313292
313300
|
|
|
313293
313301
|
// node_modules/underscore/modules/property.js
|
|
313294
|
-
function property(
|
|
313295
|
-
|
|
313302
|
+
function property(path95) {
|
|
313303
|
+
path95 = toPath2(path95);
|
|
313296
313304
|
return function(obj2) {
|
|
313297
|
-
return deepGet(obj2,
|
|
313305
|
+
return deepGet(obj2, path95);
|
|
313298
313306
|
};
|
|
313299
313307
|
}
|
|
313300
313308
|
var init_property = __esm({
|
|
@@ -313403,8 +313411,8 @@ var init_noop = __esm({
|
|
|
313403
313411
|
// node_modules/underscore/modules/propertyOf.js
|
|
313404
313412
|
function propertyOf(obj2) {
|
|
313405
313413
|
if (obj2 == null) return noop5;
|
|
313406
|
-
return function(
|
|
313407
|
-
return get2(obj2,
|
|
313414
|
+
return function(path95) {
|
|
313415
|
+
return get2(obj2, path95);
|
|
313408
313416
|
};
|
|
313409
313417
|
}
|
|
313410
313418
|
var init_propertyOf = __esm({
|
|
@@ -313598,14 +313606,14 @@ var init_template = __esm({
|
|
|
313598
313606
|
});
|
|
313599
313607
|
|
|
313600
313608
|
// node_modules/underscore/modules/result.js
|
|
313601
|
-
function result(obj2,
|
|
313602
|
-
|
|
313603
|
-
var length =
|
|
313609
|
+
function result(obj2, path95, fallback) {
|
|
313610
|
+
path95 = toPath2(path95);
|
|
313611
|
+
var length = path95.length;
|
|
313604
313612
|
if (!length) {
|
|
313605
313613
|
return isFunction_default(fallback) ? fallback.call(obj2) : fallback;
|
|
313606
313614
|
}
|
|
313607
313615
|
for (var i4 = 0; i4 < length; i4++) {
|
|
313608
|
-
var prop = obj2 == null ? void 0 : obj2[
|
|
313616
|
+
var prop = obj2 == null ? void 0 : obj2[path95[i4]];
|
|
313609
313617
|
if (prop === void 0) {
|
|
313610
313618
|
prop = fallback;
|
|
313611
313619
|
i4 = length;
|
|
@@ -314288,14 +314296,14 @@ var init_invoke = __esm({
|
|
|
314288
314296
|
init_map();
|
|
314289
314297
|
init_deepGet();
|
|
314290
314298
|
init_toPath2();
|
|
314291
|
-
invoke_default = restArguments(function(obj2,
|
|
314299
|
+
invoke_default = restArguments(function(obj2, path95, args2) {
|
|
314292
314300
|
var contextPath, func;
|
|
314293
|
-
if (isFunction_default(
|
|
314294
|
-
func =
|
|
314301
|
+
if (isFunction_default(path95)) {
|
|
314302
|
+
func = path95;
|
|
314295
314303
|
} else {
|
|
314296
|
-
|
|
314297
|
-
contextPath =
|
|
314298
|
-
|
|
314304
|
+
path95 = toPath2(path95);
|
|
314305
|
+
contextPath = path95.slice(0, -1);
|
|
314306
|
+
path95 = path95[path95.length - 1];
|
|
314299
314307
|
}
|
|
314300
314308
|
return map2(obj2, function(context) {
|
|
314301
314309
|
var method = func;
|
|
@@ -314304,7 +314312,7 @@ var init_invoke = __esm({
|
|
|
314304
314312
|
context = deepGet(context, contextPath);
|
|
314305
314313
|
}
|
|
314306
314314
|
if (context == null) return void 0;
|
|
314307
|
-
method = context[
|
|
314315
|
+
method = context[path95];
|
|
314308
314316
|
}
|
|
314309
314317
|
return method == null ? method : method.apply(context, args2);
|
|
314310
314318
|
});
|
|
@@ -323669,8 +323677,8 @@ var require_utils2 = __commonJS({
|
|
|
323669
323677
|
var result2 = transform2[inputType][outputType](input);
|
|
323670
323678
|
return result2;
|
|
323671
323679
|
};
|
|
323672
|
-
exports2.resolve = function(
|
|
323673
|
-
var parts =
|
|
323680
|
+
exports2.resolve = function(path95) {
|
|
323681
|
+
var parts = path95.split("/");
|
|
323674
323682
|
var result2 = [];
|
|
323675
323683
|
for (var index2 = 0; index2 < parts.length; index2++) {
|
|
323676
323684
|
var part = parts[index2];
|
|
@@ -329523,18 +329531,18 @@ var require_object2 = __commonJS({
|
|
|
329523
329531
|
var object4 = new ZipObject(name30, zipObjectContent, o2);
|
|
329524
329532
|
this.files[name30] = object4;
|
|
329525
329533
|
};
|
|
329526
|
-
var parentFolder = function(
|
|
329527
|
-
if (
|
|
329528
|
-
|
|
329534
|
+
var parentFolder = function(path95) {
|
|
329535
|
+
if (path95.slice(-1) === "/") {
|
|
329536
|
+
path95 = path95.substring(0, path95.length - 1);
|
|
329529
329537
|
}
|
|
329530
|
-
var lastSlash =
|
|
329531
|
-
return lastSlash > 0 ?
|
|
329538
|
+
var lastSlash = path95.lastIndexOf("/");
|
|
329539
|
+
return lastSlash > 0 ? path95.substring(0, lastSlash) : "";
|
|
329532
329540
|
};
|
|
329533
|
-
var forceTrailingSlash = function(
|
|
329534
|
-
if (
|
|
329535
|
-
|
|
329541
|
+
var forceTrailingSlash = function(path95) {
|
|
329542
|
+
if (path95.slice(-1) !== "/") {
|
|
329543
|
+
path95 += "/";
|
|
329536
329544
|
}
|
|
329537
|
-
return
|
|
329545
|
+
return path95;
|
|
329538
329546
|
};
|
|
329539
329547
|
var folderAdd = function(name30, createFolders) {
|
|
329540
329548
|
createFolders = typeof createFolders !== "undefined" ? createFolders : defaults.createFolders;
|
|
@@ -330572,27 +330580,27 @@ var require_zipfile = __commonJS({
|
|
|
330572
330580
|
};
|
|
330573
330581
|
});
|
|
330574
330582
|
}
|
|
330575
|
-
function splitPath(
|
|
330576
|
-
var lastIndex =
|
|
330583
|
+
function splitPath(path95) {
|
|
330584
|
+
var lastIndex = path95.lastIndexOf("/");
|
|
330577
330585
|
if (lastIndex === -1) {
|
|
330578
|
-
return { dirname: "", basename:
|
|
330586
|
+
return { dirname: "", basename: path95 };
|
|
330579
330587
|
} else {
|
|
330580
330588
|
return {
|
|
330581
|
-
dirname:
|
|
330582
|
-
basename:
|
|
330589
|
+
dirname: path95.substring(0, lastIndex),
|
|
330590
|
+
basename: path95.substring(lastIndex + 1)
|
|
330583
330591
|
};
|
|
330584
330592
|
}
|
|
330585
330593
|
}
|
|
330586
330594
|
function joinPath() {
|
|
330587
|
-
var nonEmptyPaths = Array.prototype.filter.call(arguments, function(
|
|
330588
|
-
return
|
|
330595
|
+
var nonEmptyPaths = Array.prototype.filter.call(arguments, function(path95) {
|
|
330596
|
+
return path95;
|
|
330589
330597
|
});
|
|
330590
330598
|
var relevantPaths = [];
|
|
330591
|
-
nonEmptyPaths.forEach(function(
|
|
330592
|
-
if (/^\//.test(
|
|
330593
|
-
relevantPaths = [
|
|
330599
|
+
nonEmptyPaths.forEach(function(path95) {
|
|
330600
|
+
if (/^\//.test(path95)) {
|
|
330601
|
+
relevantPaths = [path95];
|
|
330594
330602
|
} else {
|
|
330595
|
-
relevantPaths.push(
|
|
330603
|
+
relevantPaths.push(path95);
|
|
330596
330604
|
}
|
|
330597
330605
|
});
|
|
330598
330606
|
return relevantPaths.join("/");
|
|
@@ -337995,9 +338003,9 @@ var require_office_xml_reader = __commonJS({
|
|
|
337995
338003
|
return collapseAlternateContent(document2)[0];
|
|
337996
338004
|
});
|
|
337997
338005
|
}
|
|
337998
|
-
function readXmlFromZipFile(docxFile,
|
|
337999
|
-
if (docxFile.exists(
|
|
338000
|
-
return docxFile.read(
|
|
338006
|
+
function readXmlFromZipFile(docxFile, path95) {
|
|
338007
|
+
if (docxFile.exists(path95)) {
|
|
338008
|
+
return docxFile.read(path95, "utf-8").then(stripUtf8Bom).then(read);
|
|
338001
338009
|
} else {
|
|
338002
338010
|
return promises6.resolve(null);
|
|
338003
338011
|
}
|
|
@@ -339761,10 +339769,10 @@ var require_body_reader = __commonJS({
|
|
|
339761
339769
|
}
|
|
339762
339770
|
}
|
|
339763
339771
|
function findEmbeddedImageFile(relationshipId) {
|
|
339764
|
-
var
|
|
339772
|
+
var path95 = uris.uriToZipEntryName("word", relationships.findTargetByRelationshipId(relationshipId));
|
|
339765
339773
|
return {
|
|
339766
|
-
path:
|
|
339767
|
-
read: docxFile.read.bind(docxFile,
|
|
339774
|
+
path: path95,
|
|
339775
|
+
read: docxFile.read.bind(docxFile, path95)
|
|
339768
339776
|
};
|
|
339769
339777
|
}
|
|
339770
339778
|
function readImage(imageFile, altText) {
|
|
@@ -340001,12 +340009,12 @@ var require_content_types_reader = __commonJS({
|
|
|
340001
340009
|
}
|
|
340002
340010
|
function contentTypes(overrides, extensionDefaults) {
|
|
340003
340011
|
return {
|
|
340004
|
-
findContentType: function(
|
|
340005
|
-
var overrideContentType = overrides[
|
|
340012
|
+
findContentType: function(path95) {
|
|
340013
|
+
var overrideContentType = overrides[path95];
|
|
340006
340014
|
if (overrideContentType) {
|
|
340007
340015
|
return overrideContentType;
|
|
340008
340016
|
} else {
|
|
340009
|
-
var pathParts =
|
|
340017
|
+
var pathParts = path95.split(".");
|
|
340010
340018
|
var extension = pathParts[pathParts.length - 1];
|
|
340011
340019
|
if (extensionDefaults.hasOwnProperty(extension)) {
|
|
340012
340020
|
return extensionDefaults[extension];
|
|
@@ -340255,12 +340263,12 @@ var require_comments_reader = __commonJS({
|
|
|
340255
340263
|
var require_path_is_absolute = __commonJS({
|
|
340256
340264
|
"node_modules/path-is-absolute/index.js"(exports2, module2) {
|
|
340257
340265
|
"use strict";
|
|
340258
|
-
function posix2(
|
|
340259
|
-
return
|
|
340266
|
+
function posix2(path95) {
|
|
340267
|
+
return path95.charAt(0) === "/";
|
|
340260
340268
|
}
|
|
340261
|
-
function win32(
|
|
340269
|
+
function win32(path95) {
|
|
340262
340270
|
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
|
340263
|
-
var result2 = splitDeviceRe.exec(
|
|
340271
|
+
var result2 = splitDeviceRe.exec(path95);
|
|
340264
340272
|
var device = result2[1] || "";
|
|
340265
340273
|
var isUnc = Boolean(device && device.charAt(1) !== ":");
|
|
340266
340274
|
return Boolean(result2[2] || isUnc);
|
|
@@ -340274,7 +340282,7 @@ var require_path_is_absolute = __commonJS({
|
|
|
340274
340282
|
// node_modules/mammoth/lib/docx/files.js
|
|
340275
340283
|
var require_files = __commonJS({
|
|
340276
340284
|
"node_modules/mammoth/lib/docx/files.js"(exports2) {
|
|
340277
|
-
var
|
|
340285
|
+
var fs78 = __require("fs");
|
|
340278
340286
|
var url2 = __require("url");
|
|
340279
340287
|
var os29 = __require("os");
|
|
340280
340288
|
var dirname11 = __require("path").dirname;
|
|
@@ -340294,19 +340302,19 @@ var require_files = __commonJS({
|
|
|
340294
340302
|
}
|
|
340295
340303
|
var base = options2.relativeToFile ? dirname11(options2.relativeToFile) : null;
|
|
340296
340304
|
function read(uri, encoding) {
|
|
340297
|
-
return resolveUri(uri).then(function(
|
|
340298
|
-
return readFile15(
|
|
340305
|
+
return resolveUri(uri).then(function(path95) {
|
|
340306
|
+
return readFile15(path95, encoding).caught(function(error51) {
|
|
340299
340307
|
var message = "could not open external image: '" + uri + "' (document directory: '" + base + "')\n" + error51.message;
|
|
340300
340308
|
return promises6.reject(new Error(message));
|
|
340301
340309
|
});
|
|
340302
340310
|
});
|
|
340303
340311
|
}
|
|
340304
340312
|
function resolveUri(uri) {
|
|
340305
|
-
var
|
|
340306
|
-
if (isAbsolutePath(
|
|
340307
|
-
return promises6.resolve(
|
|
340313
|
+
var path95 = uriToPath(uri);
|
|
340314
|
+
if (isAbsolutePath(path95)) {
|
|
340315
|
+
return promises6.resolve(path95);
|
|
340308
340316
|
} else if (base) {
|
|
340309
|
-
return promises6.resolve(resolvePath(base,
|
|
340317
|
+
return promises6.resolve(resolvePath(base, path95));
|
|
340310
340318
|
} else {
|
|
340311
340319
|
return promises6.reject(new Error("could not find external image '" + uri + "', path of input document is unknown"));
|
|
340312
340320
|
}
|
|
@@ -340315,18 +340323,18 @@ var require_files = __commonJS({
|
|
|
340315
340323
|
read
|
|
340316
340324
|
};
|
|
340317
340325
|
}
|
|
340318
|
-
var readFile15 = promises6.promisify(
|
|
340326
|
+
var readFile15 = promises6.promisify(fs78.readFile.bind(fs78));
|
|
340319
340327
|
function uriToPath(uriString, platform) {
|
|
340320
340328
|
if (!platform) {
|
|
340321
340329
|
platform = os29.platform();
|
|
340322
340330
|
}
|
|
340323
340331
|
var uri = url2.parse(uriString);
|
|
340324
340332
|
if (isLocalFileUri(uri) || isRelativeUri(uri)) {
|
|
340325
|
-
var
|
|
340326
|
-
if (platform === "win32" && /^\/[a-z]:/i.test(
|
|
340327
|
-
return
|
|
340333
|
+
var path95 = decodeURIComponent(uri.path);
|
|
340334
|
+
if (platform === "win32" && /^\/[a-z]:/i.test(path95)) {
|
|
340335
|
+
return path95.slice(1);
|
|
340328
340336
|
} else {
|
|
340329
|
-
return
|
|
340337
|
+
return path95;
|
|
340330
340338
|
}
|
|
340331
340339
|
} else {
|
|
340332
340340
|
throw new Error("Could not convert URI to path: " + uriString);
|
|
@@ -340526,18 +340534,18 @@ var require_docx_reader = __commonJS({
|
|
|
340526
340534
|
readElement: contentTypesReader.readContentTypesFromXml,
|
|
340527
340535
|
defaultValue: contentTypesReader.defaultContentTypes
|
|
340528
340536
|
});
|
|
340529
|
-
function readNumberingFromZipFile(zipFile,
|
|
340537
|
+
function readNumberingFromZipFile(zipFile, path95, styles) {
|
|
340530
340538
|
return xmlFileReader({
|
|
340531
|
-
filename:
|
|
340539
|
+
filename: path95,
|
|
340532
340540
|
readElement: function(element) {
|
|
340533
340541
|
return numberingXml.readNumberingXml(element, { styles });
|
|
340534
340542
|
},
|
|
340535
340543
|
defaultValue: numberingXml.defaultNumbering
|
|
340536
340544
|
})(zipFile);
|
|
340537
340545
|
}
|
|
340538
|
-
function readStylesFromZipFile(zipFile,
|
|
340546
|
+
function readStylesFromZipFile(zipFile, path95) {
|
|
340539
340547
|
return xmlFileReader({
|
|
340540
|
-
filename:
|
|
340548
|
+
filename: path95,
|
|
340541
340549
|
readElement: stylesReader.readStylesXml,
|
|
340542
340550
|
defaultValue: stylesReader.defaultStyles
|
|
340543
340551
|
})(zipFile);
|
|
@@ -340568,10 +340576,10 @@ var require_style_map = __commonJS({
|
|
|
340568
340576
|
});
|
|
340569
340577
|
}
|
|
340570
340578
|
function updateRelationships(docxFile) {
|
|
340571
|
-
var
|
|
340579
|
+
var path95 = "word/_rels/document.xml.rels";
|
|
340572
340580
|
var relationshipsUri = "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
340573
340581
|
var relationshipElementName = "{" + relationshipsUri + "}Relationship";
|
|
340574
|
-
return docxFile.read(
|
|
340582
|
+
return docxFile.read(path95, "utf8").then(xml.readString).then(function(relationshipsContainer) {
|
|
340575
340583
|
var relationships = relationshipsContainer.children;
|
|
340576
340584
|
addOrUpdateElement(relationships, relationshipElementName, "Id", {
|
|
340577
340585
|
"Id": "rMammothStyleMap",
|
|
@@ -340579,21 +340587,21 @@ var require_style_map = __commonJS({
|
|
|
340579
340587
|
"Target": styleMapAbsolutePath
|
|
340580
340588
|
});
|
|
340581
340589
|
var namespaces = { "": relationshipsUri };
|
|
340582
|
-
return docxFile.write(
|
|
340590
|
+
return docxFile.write(path95, xml.writeString(relationshipsContainer, namespaces));
|
|
340583
340591
|
});
|
|
340584
340592
|
}
|
|
340585
340593
|
function updateContentTypes(docxFile) {
|
|
340586
|
-
var
|
|
340594
|
+
var path95 = "[Content_Types].xml";
|
|
340587
340595
|
var contentTypesUri = "http://schemas.openxmlformats.org/package/2006/content-types";
|
|
340588
340596
|
var overrideName = "{" + contentTypesUri + "}Override";
|
|
340589
|
-
return docxFile.read(
|
|
340597
|
+
return docxFile.read(path95, "utf8").then(xml.readString).then(function(typesElement) {
|
|
340590
340598
|
var children = typesElement.children;
|
|
340591
340599
|
addOrUpdateElement(children, overrideName, "PartName", {
|
|
340592
340600
|
"PartName": styleMapAbsolutePath,
|
|
340593
340601
|
"ContentType": "text/prs.mammoth.style-map"
|
|
340594
340602
|
});
|
|
340595
340603
|
var namespaces = { "": contentTypesUri };
|
|
340596
|
-
return docxFile.write(
|
|
340604
|
+
return docxFile.write(path95, xml.writeString(typesElement, namespaces));
|
|
340597
340605
|
});
|
|
340598
340606
|
}
|
|
340599
340607
|
function addOrUpdateElement(elements, name30, identifyingAttribute, attributes) {
|
|
@@ -341285,9 +341293,9 @@ var require_document_to_html = __commonJS({
|
|
|
341285
341293
|
};
|
|
341286
341294
|
var paths = [];
|
|
341287
341295
|
if (run2.highlight !== null) {
|
|
341288
|
-
var
|
|
341289
|
-
if (
|
|
341290
|
-
paths.push(
|
|
341296
|
+
var path95 = findHtmlPath({ type: "highlight", color: run2.highlight });
|
|
341297
|
+
if (path95) {
|
|
341298
|
+
paths.push(path95);
|
|
341291
341299
|
}
|
|
341292
341300
|
}
|
|
341293
341301
|
if (run2.isSmallCaps) {
|
|
@@ -341322,15 +341330,15 @@ var require_document_to_html = __commonJS({
|
|
|
341322
341330
|
messages.push(unrecognisedStyleWarning("run", run2));
|
|
341323
341331
|
}
|
|
341324
341332
|
paths.push(stylePath);
|
|
341325
|
-
paths.forEach(function(
|
|
341326
|
-
nodes =
|
|
341333
|
+
paths.forEach(function(path96) {
|
|
341334
|
+
nodes = path96.wrap.bind(path96, nodes);
|
|
341327
341335
|
});
|
|
341328
341336
|
return nodes();
|
|
341329
341337
|
}
|
|
341330
341338
|
function findHtmlPathForRunProperty(elementType, defaultTagName) {
|
|
341331
|
-
var
|
|
341332
|
-
if (
|
|
341333
|
-
return
|
|
341339
|
+
var path95 = findHtmlPath({ type: elementType });
|
|
341340
|
+
if (path95) {
|
|
341341
|
+
return path95;
|
|
341334
341342
|
} else if (defaultTagName) {
|
|
341335
341343
|
return htmlPaths.element(defaultTagName, {}, { fresh: false });
|
|
341336
341344
|
} else {
|
|
@@ -343032,11 +343040,11 @@ var require_options_reader = __commonJS({
|
|
|
343032
343040
|
// node_modules/mammoth/lib/unzip.js
|
|
343033
343041
|
var require_unzip = __commonJS({
|
|
343034
343042
|
"node_modules/mammoth/lib/unzip.js"(exports2) {
|
|
343035
|
-
var
|
|
343043
|
+
var fs78 = __require("fs");
|
|
343036
343044
|
var promises6 = require_promises();
|
|
343037
343045
|
var zipfile = require_zipfile();
|
|
343038
343046
|
exports2.openZip = openZip;
|
|
343039
|
-
var readFile15 = promises6.promisify(
|
|
343047
|
+
var readFile15 = promises6.promisify(fs78.readFile);
|
|
343040
343048
|
function openZip(options2) {
|
|
343041
343049
|
if (options2.path) {
|
|
343042
343050
|
return readFile15(options2.path).then(zipfile.openArrayBuffer);
|
|
@@ -345756,16 +345764,16 @@ ${body}${more}`,
|
|
|
345756
345764
|
LIMIT ${maxHits}
|
|
345757
345765
|
`);
|
|
345758
345766
|
for (const h3 of hits) {
|
|
345759
|
-
const
|
|
345767
|
+
const path95 = hitPath(
|
|
345760
345768
|
titleById.get(h3.session_id) ?? h3.session_id,
|
|
345761
345769
|
h3.turn,
|
|
345762
345770
|
h3.role
|
|
345763
345771
|
);
|
|
345764
345772
|
groups.push({
|
|
345765
|
-
file:
|
|
345773
|
+
file: path95,
|
|
345766
345774
|
matchCount: countOccurrences2(h3.content ?? "", query)
|
|
345767
345775
|
});
|
|
345768
|
-
lines.push(`${
|
|
345776
|
+
lines.push(`${path95}
|
|
345769
345777
|
${snippetAround(formatTurnPlain(h3.role, h3.content ?? ""), query)}`);
|
|
345770
345778
|
}
|
|
345771
345779
|
const totalHits = hits.length;
|
|
@@ -347826,23 +347834,23 @@ function findAutonomousOp(chatId, turnId, operationId) {
|
|
|
347826
347834
|
return sessionLogs.get(sessionKey(chatId, turnId))?.find((o2) => o2.operationId === operationId);
|
|
347827
347835
|
}
|
|
347828
347836
|
function autonomousOpFromPermissionExec(operationId, operationType, preview, execApproved) {
|
|
347829
|
-
let
|
|
347837
|
+
let path95;
|
|
347830
347838
|
let summary;
|
|
347831
347839
|
const p2 = preview;
|
|
347832
347840
|
if (Array.isArray(p2)) {
|
|
347833
347841
|
const first2 = p2[0];
|
|
347834
|
-
|
|
347842
|
+
path95 = first2?.path;
|
|
347835
347843
|
summary = first2?.description;
|
|
347836
347844
|
} else if (p2 && typeof p2 === "object") {
|
|
347837
347845
|
const o2 = p2;
|
|
347838
|
-
if (typeof o2.path === "string")
|
|
347839
|
-
if (typeof o2.command === "string")
|
|
347846
|
+
if (typeof o2.path === "string") path95 = o2.path;
|
|
347847
|
+
if (typeof o2.command === "string") path95 = o2.command;
|
|
347840
347848
|
if (typeof o2.description === "string") summary = o2.description;
|
|
347841
347849
|
}
|
|
347842
347850
|
return {
|
|
347843
347851
|
operationId,
|
|
347844
347852
|
type: operationType,
|
|
347845
|
-
path:
|
|
347853
|
+
path: path95,
|
|
347846
347854
|
summary: summary ?? operationType,
|
|
347847
347855
|
timestamp: Date.now(),
|
|
347848
347856
|
result: execApproved ? "success" : "failed",
|
|
@@ -350048,16 +350056,16 @@ var init_run_command_guidance = __esm({
|
|
|
350048
350056
|
});
|
|
350049
350057
|
|
|
350050
350058
|
// src/lib/agent/mutation-verify.ts
|
|
350051
|
-
function recordUnverifiedEdit(turnId,
|
|
350059
|
+
function recordUnverifiedEdit(turnId, path95) {
|
|
350052
350060
|
let set3 = unverifiedEditsByTurn.get(turnId);
|
|
350053
350061
|
if (!set3) {
|
|
350054
350062
|
set3 = /* @__PURE__ */ new Set();
|
|
350055
350063
|
unverifiedEditsByTurn.set(turnId, set3);
|
|
350056
350064
|
}
|
|
350057
|
-
set3.add(
|
|
350065
|
+
set3.add(path95);
|
|
350058
350066
|
}
|
|
350059
|
-
function clearUnverifiedEdit(turnId,
|
|
350060
|
-
unverifiedEditsByTurn.get(turnId)?.delete(
|
|
350067
|
+
function clearUnverifiedEdit(turnId, path95) {
|
|
350068
|
+
unverifiedEditsByTurn.get(turnId)?.delete(path95);
|
|
350061
350069
|
}
|
|
350062
350070
|
function getUnverifiedEditFeedback(turnId) {
|
|
350063
350071
|
if (turnId == null) return null;
|
|
@@ -352899,10 +352907,10 @@ async function hasConfiguredGitIdentity(workspacePath) {
|
|
|
352899
352907
|
return result2.exitCode === 0 && result2.stdout.trim().length > 0;
|
|
352900
352908
|
}
|
|
352901
352909
|
async function getCurrentCommitHash({
|
|
352902
|
-
path:
|
|
352910
|
+
path: path95,
|
|
352903
352911
|
ref = "HEAD"
|
|
352904
352912
|
}) {
|
|
352905
|
-
const gitDir = resolveGitDir(
|
|
352913
|
+
const gitDir = resolveGitDir(path95);
|
|
352906
352914
|
if (!gitDir) return "";
|
|
352907
352915
|
const result2 = await exec(["rev-parse", ref], gitDir);
|
|
352908
352916
|
if (isGitMissingResult(result2)) {
|
|
@@ -353507,11 +353515,11 @@ var init_interceptor = __esm({
|
|
|
353507
353515
|
* Update workspace path and ID (e.g. after create_workspace in same turn).
|
|
353508
353516
|
* Ensures subsequent run_command/write_file in this session use the new project root.
|
|
353509
353517
|
*/
|
|
353510
|
-
setWorkspace(
|
|
353511
|
-
this.workspacePath =
|
|
353518
|
+
setWorkspace(path95, id) {
|
|
353519
|
+
this.workspacePath = path95;
|
|
353512
353520
|
if (id != null) this.workspaceId = id;
|
|
353513
353521
|
logger113.log(
|
|
353514
|
-
`[PermissionInterceptor] Workspace updated to: ${
|
|
353522
|
+
`[PermissionInterceptor] Workspace updated to: ${path95} (id: ${id})`
|
|
353515
353523
|
);
|
|
353516
353524
|
}
|
|
353517
353525
|
// ════════════════════════════════════════════════════════════════════════════
|
|
@@ -353922,12 +353930,12 @@ var init_interceptor = __esm({
|
|
|
353922
353930
|
}
|
|
353923
353931
|
}
|
|
353924
353932
|
const preview = operation.request.preview;
|
|
353925
|
-
const
|
|
353926
|
-
if (
|
|
353933
|
+
const path95 = preview?.path;
|
|
353934
|
+
if (path95 && RESULT_BEARING_FILE_OPS.has(operation.request.operation)) {
|
|
353927
353935
|
const opType = preview.type === "create" ? "create" : preview.type === "delete" ? "delete" : "update";
|
|
353928
353936
|
return {
|
|
353929
353937
|
success: true,
|
|
353930
|
-
path:
|
|
353938
|
+
path: path95,
|
|
353931
353939
|
operation: opType,
|
|
353932
353940
|
oldContent: preview.oldContent ?? "",
|
|
353933
353941
|
newContent: preview.content ?? "",
|
|
@@ -353939,8 +353947,8 @@ var init_interceptor = __esm({
|
|
|
353939
353947
|
...preview.notice ? { output: preview.notice } : {}
|
|
353940
353948
|
};
|
|
353941
353949
|
}
|
|
353942
|
-
if (
|
|
353943
|
-
return { success: true, path:
|
|
353950
|
+
if (path95) {
|
|
353951
|
+
return { success: true, path: path95 };
|
|
353944
353952
|
}
|
|
353945
353953
|
if (operation.request.operation === "mcp_server_write") {
|
|
353946
353954
|
const note = operation.request.preview.resultNote;
|
|
@@ -359044,6 +359052,65 @@ var init_turn_session_choices = __esm({
|
|
|
359044
359052
|
});
|
|
359045
359053
|
|
|
359046
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
|
+
}
|
|
359047
359114
|
function ageLabel(days) {
|
|
359048
359115
|
if (days <= 0) return "today";
|
|
359049
359116
|
if (days === 1) return "1 day ago";
|
|
@@ -359052,17 +359119,33 @@ function ageLabel(days) {
|
|
|
359052
359119
|
function tokenize2(s3) {
|
|
359053
359120
|
return s3.toLowerCase().split(/[^a-z0-9]+/).filter((t3) => t3.length > 1 && !STOP_WORDS.has(t3));
|
|
359054
359121
|
}
|
|
359055
|
-
function
|
|
359056
|
-
const
|
|
359057
|
-
|
|
359058
|
-
|
|
359059
|
-
|
|
359060
|
-
|
|
359061
|
-
|
|
359062
|
-
|
|
359063
|
-
|
|
359064
|
-
|
|
359065
|
-
|
|
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);
|
|
359066
359149
|
return { file: c2.file, score: score2 };
|
|
359067
359150
|
}).filter((x4) => x4.score > 0).sort((a2, b3) => b3.score - a2.score || a2.file.localeCompare(b3.file));
|
|
359068
359151
|
return scored.slice(0, RECALL_MAX_NOTES).map((x4) => x4.file);
|
|
@@ -359099,8 +359182,18 @@ function parseRecallReply(text5, candidates) {
|
|
|
359099
359182
|
return out;
|
|
359100
359183
|
}
|
|
359101
359184
|
async function selectRelevantMemories(args2) {
|
|
359102
|
-
const { message, candidates } = args2;
|
|
359185
|
+
const { message, candidates, memoryDir } = args2;
|
|
359103
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
|
+
}
|
|
359104
359197
|
try {
|
|
359105
359198
|
const { generateText: generateText2 } = await Promise.resolve().then(() => (init_dist16(), dist_exports3));
|
|
359106
359199
|
const { readSettings: readSettings2 } = await Promise.resolve().then(() => (init_settings(), settings_exports));
|
|
@@ -359121,22 +359214,20 @@ async function selectRelevantMemories(args2) {
|
|
|
359121
359214
|
abortSignal: AbortSignal.timeout(RECALL_TIMEOUT_MS)
|
|
359122
359215
|
});
|
|
359123
359216
|
recordAuxUsage2(args2.chatId, result2.usage, "memory");
|
|
359124
|
-
|
|
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;
|
|
359125
359222
|
} catch (err2) {
|
|
359126
359223
|
logger122.warn(
|
|
359127
359224
|
"recall: selector failed \u2014",
|
|
359128
359225
|
err2 instanceof Error ? err2.message : err2
|
|
359129
359226
|
);
|
|
359130
|
-
|
|
359131
|
-
if (local2.length > 0) {
|
|
359132
|
-
logger122.info(`recall: local fallback matched ${local2.join(", ")}`);
|
|
359133
|
-
} else {
|
|
359134
|
-
logger122.info("recall: skipped (selector failed and no local match)");
|
|
359135
|
-
}
|
|
359136
|
-
return local2;
|
|
359227
|
+
return [];
|
|
359137
359228
|
}
|
|
359138
359229
|
}
|
|
359139
|
-
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;
|
|
359140
359231
|
var init_recall = __esm({
|
|
359141
359232
|
"src/lib/memory/recall.ts"() {
|
|
359142
359233
|
import_electron_log125 = __toESM(require_src());
|
|
@@ -359145,6 +359236,10 @@ var init_recall = __esm({
|
|
|
359145
359236
|
RECALL_TIMEOUT_MS = 2500;
|
|
359146
359237
|
RECALL_MAX_OUTPUT_TOKENS = 512;
|
|
359147
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;
|
|
359148
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.
|
|
359149
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.`;
|
|
359150
359245
|
STOP_WORDS = /* @__PURE__ */ new Set([
|
|
@@ -359207,6 +359302,8 @@ Reply with JSON only, in the form {"files": ["<file>", ...]}: at most ${RECALL_M
|
|
|
359207
359302
|
"after",
|
|
359208
359303
|
"make"
|
|
359209
359304
|
]);
|
|
359305
|
+
BM25_K1 = 1.2;
|
|
359306
|
+
BM25_B = 0.75;
|
|
359210
359307
|
}
|
|
359211
359308
|
});
|
|
359212
359309
|
|
|
@@ -359226,8 +359323,8 @@ __export(session_context_exports, {
|
|
|
359226
359323
|
renderRecalledNote: () => renderRecalledNote,
|
|
359227
359324
|
withMemoryContext: () => withMemoryContext
|
|
359228
359325
|
});
|
|
359229
|
-
import
|
|
359230
|
-
import
|
|
359326
|
+
import fs72 from "node:fs/promises";
|
|
359327
|
+
import path90 from "node:path";
|
|
359231
359328
|
function escapeRe2(s3) {
|
|
359232
359329
|
return s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
359233
359330
|
}
|
|
@@ -359327,7 +359424,7 @@ function deriveRecalledNotes(rows2) {
|
|
|
359327
359424
|
for (const row of rows2) {
|
|
359328
359425
|
if (row.role !== "user" || !row.modelContent) continue;
|
|
359329
359426
|
for (const m3 of row.modelContent.matchAll(re2)) {
|
|
359330
|
-
out.set(
|
|
359427
|
+
out.set(path90.basename(m3[1]), m3[2]);
|
|
359331
359428
|
}
|
|
359332
359429
|
}
|
|
359333
359430
|
return out;
|
|
@@ -359350,15 +359447,15 @@ ${SYSTEM_REMINDER_CLOSE}`;
|
|
|
359350
359447
|
async function readNotes(dir, now2) {
|
|
359351
359448
|
let names;
|
|
359352
359449
|
try {
|
|
359353
|
-
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);
|
|
359354
359451
|
} catch {
|
|
359355
359452
|
return [];
|
|
359356
359453
|
}
|
|
359357
359454
|
const notes = await Promise.all(
|
|
359358
359455
|
names.map(async (file2) => {
|
|
359359
|
-
const abs =
|
|
359456
|
+
const abs = path90.join(dir, file2);
|
|
359360
359457
|
try {
|
|
359361
|
-
const [text5, st2] = await Promise.all([
|
|
359458
|
+
const [text5, st2] = await Promise.all([fs72.readFile(abs, "utf8"), fs72.stat(abs)]);
|
|
359362
359459
|
const fm = readNoteFrontmatter(text5);
|
|
359363
359460
|
const stamped = fm.modified ? Date.parse(fm.modified) : NaN;
|
|
359364
359461
|
const written = Number.isFinite(stamped) ? stamped : st2.mtimeMs;
|
|
@@ -359400,7 +359497,7 @@ async function buildMemoryTurnContext(args2) {
|
|
|
359400
359497
|
const parts = [];
|
|
359401
359498
|
let raw = "";
|
|
359402
359499
|
try {
|
|
359403
|
-
raw = await
|
|
359500
|
+
raw = await fs72.readFile(indexPath, "utf8");
|
|
359404
359501
|
} catch {
|
|
359405
359502
|
raw = "";
|
|
359406
359503
|
}
|
|
@@ -359433,7 +359530,8 @@ async function buildMemoryTurnContext(args2) {
|
|
|
359433
359530
|
message: args2.userText,
|
|
359434
359531
|
candidates,
|
|
359435
359532
|
chatId: args2.chatId,
|
|
359436
|
-
turnModel: args2.turnModel
|
|
359533
|
+
turnModel: args2.turnModel,
|
|
359534
|
+
memoryDir: dir
|
|
359437
359535
|
}).catch(() => []);
|
|
359438
359536
|
const byFile = new Map(fresh.map((n2) => [n2.file, n2]));
|
|
359439
359537
|
for (const file2 of chosen) {
|
|
@@ -359492,8 +359590,8 @@ __export(chat_stream_handlers_exports, {
|
|
|
359492
359590
|
removeThinkingTags: () => removeThinkingTags,
|
|
359493
359591
|
resolveModeChange: () => resolveModeChange
|
|
359494
359592
|
});
|
|
359495
|
-
import
|
|
359496
|
-
import * as
|
|
359593
|
+
import fs73 from "node:fs";
|
|
359594
|
+
import * as path91 from "path";
|
|
359497
359595
|
import * as os26 from "os";
|
|
359498
359596
|
import * as crypto7 from "crypto";
|
|
359499
359597
|
import { readFile as readFile14, writeFile as writeFile10, unlink as unlink2 } from "fs/promises";
|
|
@@ -359839,9 +359937,9 @@ function registerChatStreamHandlers() {
|
|
|
359839
359937
|
const hash3 = attachment.id || crypto7.createHash("md5").update(base64Data).digest("hex");
|
|
359840
359938
|
if (seenAttachmentHashes.has(hash3)) continue;
|
|
359841
359939
|
seenAttachmentHashes.add(hash3);
|
|
359842
|
-
const fileExtension =
|
|
359940
|
+
const fileExtension = path91.extname(attachment.name);
|
|
359843
359941
|
const filename = `${hash3}${fileExtension}`;
|
|
359844
|
-
const filePath =
|
|
359942
|
+
const filePath = path91.join(TEMP_DIR, filename);
|
|
359845
359943
|
await writeFile10(filePath, Buffer.from(base64Data, "base64"));
|
|
359846
359944
|
attachmentPaths.push(filePath);
|
|
359847
359945
|
const resolvedMimeType = mimeTypes[fileExtension] || "application/octet-stream";
|
|
@@ -360237,7 +360335,7 @@ ${hookContext.join("\n\n")}`
|
|
|
360237
360335
|
logger124.log(
|
|
360238
360336
|
`Using workspace for chat ${req.chatId}: ${appPath || "(none)"} (appId: ${effectiveAppId ?? req.appId ?? "n/a"})`
|
|
360239
360337
|
);
|
|
360240
|
-
if (hasWorkspace && appPath && !
|
|
360338
|
+
if (hasWorkspace && appPath && !fs73.existsSync(appPath)) {
|
|
360241
360339
|
logger124.warn(`Workspace path does not exist on disk: ${appPath}`);
|
|
360242
360340
|
safeSend(event.sender, "chat:activity", {
|
|
360243
360341
|
id: `workspace-path-missing-${req.chatId}`,
|
|
@@ -360942,7 +361040,7 @@ ${hookContext.join("\n\n")}`
|
|
|
360942
361040
|
try {
|
|
360943
361041
|
setTimeout(
|
|
360944
361042
|
async () => {
|
|
360945
|
-
if (
|
|
361043
|
+
if (fs73.existsSync(filePath)) {
|
|
360946
361044
|
await unlink2(filePath);
|
|
360947
361045
|
logger124.log(`Deleted temporary file: ${filePath}`);
|
|
360948
361046
|
}
|
|
@@ -361116,9 +361214,9 @@ var init_chat_stream_handlers = __esm({
|
|
|
361116
361214
|
init_finalize();
|
|
361117
361215
|
init_context_sections();
|
|
361118
361216
|
logger124 = import_electron_log127.default.scope("chat_stream_handlers");
|
|
361119
|
-
TEMP_DIR =
|
|
361120
|
-
if (!
|
|
361121
|
-
|
|
361217
|
+
TEMP_DIR = path91.join(os26.tmpdir(), "atlarix-attachments");
|
|
361218
|
+
if (!fs73.existsSync(TEMP_DIR)) {
|
|
361219
|
+
fs73.mkdirSync(TEMP_DIR, { recursive: true });
|
|
361122
361220
|
}
|
|
361123
361221
|
}
|
|
361124
361222
|
});
|
|
@@ -361134,13 +361232,13 @@ __export(temp_hygiene_exports, {
|
|
|
361134
361232
|
startTempHygiene: () => startTempHygiene,
|
|
361135
361233
|
sweepTempOnQuit: () => sweepTempOnQuit
|
|
361136
361234
|
});
|
|
361137
|
-
import
|
|
361235
|
+
import fs76 from "node:fs";
|
|
361138
361236
|
import fsp2 from "node:fs/promises";
|
|
361139
361237
|
import os28 from "node:os";
|
|
361140
361238
|
import net5 from "node:net";
|
|
361141
|
-
import
|
|
361239
|
+
import path93 from "node:path";
|
|
361142
361240
|
function leasesDir() {
|
|
361143
|
-
return
|
|
361241
|
+
return path93.join(os28.tmpdir(), LEASES_DIR_NAME);
|
|
361144
361242
|
}
|
|
361145
361243
|
function isAlive2(pid) {
|
|
361146
361244
|
try {
|
|
@@ -361153,9 +361251,9 @@ function isAlive2(pid) {
|
|
|
361153
361251
|
function registerTempLease(surface2) {
|
|
361154
361252
|
if (leasePath) return;
|
|
361155
361253
|
try {
|
|
361156
|
-
|
|
361157
|
-
const p2 =
|
|
361158
|
-
|
|
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() }));
|
|
361159
361257
|
leasePath = p2;
|
|
361160
361258
|
process.once("exit", releaseTempLease);
|
|
361161
361259
|
} catch (e3) {
|
|
@@ -361165,7 +361263,7 @@ function registerTempLease(surface2) {
|
|
|
361165
361263
|
function releaseTempLease() {
|
|
361166
361264
|
if (!leasePath) return;
|
|
361167
361265
|
try {
|
|
361168
|
-
|
|
361266
|
+
fs76.rmSync(leasePath, { force: true });
|
|
361169
361267
|
} catch {
|
|
361170
361268
|
}
|
|
361171
361269
|
leasePath = null;
|
|
@@ -361211,12 +361309,12 @@ async function liveInboxPids() {
|
|
|
361211
361309
|
}
|
|
361212
361310
|
function inboxPath(pid) {
|
|
361213
361311
|
const own = peerSocketPath(process.platform, pid);
|
|
361214
|
-
return peerSocketDirOverride ?
|
|
361312
|
+
return peerSocketDirOverride ? path93.join(peerSocketDirOverride, path93.basename(own)) : own;
|
|
361215
361313
|
}
|
|
361216
361314
|
async function peerInboxPids() {
|
|
361217
361315
|
const own = peerSocketPath(process.platform, 0);
|
|
361218
|
-
const dir = peerSocketDirOverride ?? (process.platform === "win32" ? "\\\\.\\pipe\\" :
|
|
361219
|
-
const prefix =
|
|
361316
|
+
const dir = peerSocketDirOverride ?? (process.platform === "win32" ? "\\\\.\\pipe\\" : path93.dirname(own));
|
|
361317
|
+
const prefix = path93.basename(own).replace(/0(\.sock)?$/, "");
|
|
361220
361318
|
let names;
|
|
361221
361319
|
try {
|
|
361222
361320
|
names = await fsp2.readdir(dir);
|
|
@@ -361242,7 +361340,7 @@ async function otherLiveHolders() {
|
|
|
361242
361340
|
const pid = Number(m3[1]);
|
|
361243
361341
|
if (pid === process.pid) continue;
|
|
361244
361342
|
if (isAlive2(pid)) live2.add(pid);
|
|
361245
|
-
else await fsp2.rm(
|
|
361343
|
+
else await fsp2.rm(path93.join(leasesDir(), name30), { force: true }).catch(() => {
|
|
361246
361344
|
});
|
|
361247
361345
|
}
|
|
361248
361346
|
for (const pid of await liveInboxPids()) live2.add(pid);
|
|
@@ -361267,7 +361365,7 @@ async function sweepTempDirsCounting(opts) {
|
|
|
361267
361365
|
if (!entry.isDirectory()) continue;
|
|
361268
361366
|
if (entry.name === LEASES_DIR_NAME) continue;
|
|
361269
361367
|
if (LIVE_WHILE_RUNNING.has(entry.name) && (!opts.includeLive || others > 0)) continue;
|
|
361270
|
-
const full =
|
|
361368
|
+
const full = path93.join(root2, entry.name);
|
|
361271
361369
|
try {
|
|
361272
361370
|
if (entry.name.startsWith(OTHER_PROCESS_PREFIX)) {
|
|
361273
361371
|
const stat9 = await fsp2.stat(full);
|
|
@@ -361410,8 +361508,8 @@ set("ATLARIX_QUICKJS_WASM", assets.quickjsWasm);
|
|
|
361410
361508
|
registerBundledSkills(assets.skills);
|
|
361411
361509
|
|
|
361412
361510
|
// src/headless/atlarix-headless.mts
|
|
361413
|
-
import
|
|
361414
|
-
import
|
|
361511
|
+
import fs77 from "node:fs";
|
|
361512
|
+
import path94 from "node:path";
|
|
361415
361513
|
|
|
361416
361514
|
// src/lib/workspace-app-by-path.ts
|
|
361417
361515
|
init_db2();
|
|
@@ -361429,9 +361527,9 @@ async function workspaceAppIdForPath(dir) {
|
|
|
361429
361527
|
|
|
361430
361528
|
// src/headless/headless-runner.ts
|
|
361431
361529
|
init_fake_sender();
|
|
361432
|
-
import
|
|
361530
|
+
import fs74 from "node:fs";
|
|
361433
361531
|
import os27 from "node:os";
|
|
361434
|
-
import
|
|
361532
|
+
import path92 from "node:path";
|
|
361435
361533
|
|
|
361436
361534
|
// src/headless/auto-approve.ts
|
|
361437
361535
|
var sleep = (ms2) => new Promise((r3) => setTimeout(r3, ms2));
|
|
@@ -361696,16 +361794,16 @@ async function runHeadlessAgent(opts) {
|
|
|
361696
361794
|
const mode = opts.mode ?? "build";
|
|
361697
361795
|
const resolveHandler = opts.resolveHandler ?? defaultResolveHandler;
|
|
361698
361796
|
if (!process.env.ATLARIX_USER_DATA_DIR) {
|
|
361699
|
-
process.env.ATLARIX_USER_DATA_DIR =
|
|
361700
|
-
|
|
361797
|
+
process.env.ATLARIX_USER_DATA_DIR = fs74.mkdtempSync(
|
|
361798
|
+
path92.join(os27.tmpdir(), "atlarix-headless-ud-")
|
|
361701
361799
|
);
|
|
361702
|
-
process.env.ATLARIX_HOME_DIR ??=
|
|
361800
|
+
process.env.ATLARIX_HOME_DIR ??= path92.join(os27.homedir(), ".atlarix");
|
|
361703
361801
|
}
|
|
361704
361802
|
process.env.ATLARIX_HEADLESS = "1";
|
|
361705
361803
|
process.env.ATLARIX_DISABLE_TEXT_TOOLS = "1";
|
|
361706
361804
|
if (!process.env.ATLARIX_MEMORY) process.env.ATLARIX_MEMORY = "off";
|
|
361707
361805
|
const userDataDir = process.env.ATLARIX_USER_DATA_DIR;
|
|
361708
|
-
|
|
361806
|
+
fs74.mkdirSync(userDataDir, { recursive: true });
|
|
361709
361807
|
const { initializeDatabase: initializeDatabase2 } = await Promise.resolve().then(() => (init_db2(), db_exports));
|
|
361710
361808
|
const db3 = initializeDatabase2();
|
|
361711
361809
|
const schema = await Promise.resolve().then(() => (init_schema(), schema_exports));
|
|
@@ -361742,7 +361840,7 @@ async function runHeadlessAgent(opts) {
|
|
|
361742
361840
|
effort: opts.effort
|
|
361743
361841
|
});
|
|
361744
361842
|
if (opts.provider.apiKey) setPinnedProviderKey(providerId, opts.provider.apiKey);
|
|
361745
|
-
|
|
361843
|
+
fs74.mkdirSync(settingsDir, { recursive: true });
|
|
361746
361844
|
if (!handlersRegistered) {
|
|
361747
361845
|
handlersRegistered = true;
|
|
361748
361846
|
const { registerChatStreamHandlers: registerChatStreamHandlers2 } = await Promise.resolve().then(() => (init_chat_stream_handlers(), chat_stream_handlers_exports));
|
|
@@ -361826,7 +361924,7 @@ init_core_proxy();
|
|
|
361826
361924
|
|
|
361827
361925
|
// src/headless/api-key-file.ts
|
|
361828
361926
|
init_pinned_provider_key();
|
|
361829
|
-
import
|
|
361927
|
+
import fs75 from "node:fs";
|
|
361830
361928
|
function pinApiKeyFile(file2, provider) {
|
|
361831
361929
|
if (provider.id === "compass") {
|
|
361832
361930
|
return { error: "--api-key-file is for your own provider's key, not Atlarix Core (use --core-token-file)" };
|
|
@@ -361840,8 +361938,8 @@ function pinApiKeyFile(file2, provider) {
|
|
|
361840
361938
|
} catch (e3) {
|
|
361841
361939
|
return { error: e3.message };
|
|
361842
361940
|
}
|
|
361843
|
-
const key =
|
|
361844
|
-
|
|
361941
|
+
const key = fs75.readFileSync(file2, "utf8");
|
|
361942
|
+
fs75.rmSync(file2, { force: true });
|
|
361845
361943
|
if (!key.trim()) return { error: "the --api-key-file was empty" };
|
|
361846
361944
|
setPinnedProviderKey(providerId, key);
|
|
361847
361945
|
return { providerId };
|
|
@@ -361876,7 +361974,7 @@ ${err2.stack}` : "";
|
|
|
361876
361974
|
}
|
|
361877
361975
|
|
|
361878
361976
|
// src/headless/atlarix-headless.mts
|
|
361879
|
-
var VERSION15 = false ? "dev" : "15.12.
|
|
361977
|
+
var VERSION15 = false ? "dev" : "15.12.4";
|
|
361880
361978
|
if (process.argv[2] === "run") process.argv.splice(2, 1);
|
|
361881
361979
|
var RUN_HELP = `atlarix run: one turn without the UI, for scripts and CI
|
|
361882
361980
|
|
|
@@ -361929,7 +362027,7 @@ async function main() {
|
|
|
361929
362027
|
registerTempLease2("headless");
|
|
361930
362028
|
const workspace = arg("workspace") ?? process.cwd();
|
|
361931
362029
|
const promptFile = arg("prompt-file");
|
|
361932
|
-
const prompt = promptFile ?
|
|
362030
|
+
const prompt = promptFile ? fs77.readFileSync(promptFile, "utf8") : arg("prompt");
|
|
361933
362031
|
if (!prompt) {
|
|
361934
362032
|
console.error("atlarix-headless: --prompt or --prompt-file is required");
|
|
361935
362033
|
process.exit(2);
|
|
@@ -361956,22 +362054,22 @@ async function main() {
|
|
|
361956
362054
|
if (a2 !== "--attach") return [];
|
|
361957
362055
|
const file2 = process.argv[i4 + 1];
|
|
361958
362056
|
if (!file2) return [];
|
|
361959
|
-
if (!
|
|
362057
|
+
if (!fs77.existsSync(file2)) {
|
|
361960
362058
|
console.error(`atlarix-headless: --attach ${file2}: no such file`);
|
|
361961
362059
|
process.exit(2);
|
|
361962
362060
|
}
|
|
361963
362061
|
return [
|
|
361964
362062
|
{
|
|
361965
|
-
name:
|
|
361966
|
-
type: ATTACH_MIME[
|
|
361967
|
-
data:
|
|
362063
|
+
name: path94.basename(file2),
|
|
362064
|
+
type: ATTACH_MIME[path94.extname(file2).toLowerCase()] ?? "application/octet-stream",
|
|
362065
|
+
data: fs77.readFileSync(file2).toString("base64")
|
|
361968
362066
|
}
|
|
361969
362067
|
];
|
|
361970
362068
|
});
|
|
361971
362069
|
const coreTokenFile = arg("core-token-file");
|
|
361972
362070
|
if (coreTokenFile) {
|
|
361973
|
-
setPinnedCoreToken(
|
|
361974
|
-
|
|
362071
|
+
setPinnedCoreToken(fs77.readFileSync(coreTokenFile, "utf8"));
|
|
362072
|
+
fs77.rmSync(coreTokenFile, { force: true });
|
|
361975
362073
|
}
|
|
361976
362074
|
const apiKeyFile = arg("api-key-file");
|
|
361977
362075
|
if (apiKeyFile) {
|
|
@@ -362001,7 +362099,7 @@ async function main() {
|
|
|
362001
362099
|
await refreshCoreModelOverrides2();
|
|
362002
362100
|
}
|
|
362003
362101
|
const res = await runHeadlessAgent({
|
|
362004
|
-
workspaceDir:
|
|
362102
|
+
workspaceDir: fs77.realpathSync(workspace),
|
|
362005
362103
|
prompt,
|
|
362006
362104
|
provider: {
|
|
362007
362105
|
// Default to the OpenRouter builtin (native FC + provider pin). Pass
|
|
@@ -362022,7 +362120,7 @@ async function main() {
|
|
|
362022
362120
|
});
|
|
362023
362121
|
if (outputFile) {
|
|
362024
362122
|
const { finalAnswerText: finalAnswerText2 } = await Promise.resolve().then(() => (init_assistant_message_parts(), assistant_message_parts_exports));
|
|
362025
|
-
|
|
362123
|
+
fs77.writeFileSync(outputFile, res.lastAssistant ? finalAnswerText2(res.lastAssistant) : "");
|
|
362026
362124
|
}
|
|
362027
362125
|
console.error(
|
|
362028
362126
|
`[atlarix-headless] completed=${res.completed} workspace=${workspace}` + (outputFile ? ` output=${outputFile}` : "")
|