@uipath/context-grounding-tool 1.206.0-preview.312 → 1.206.0-preview.323
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/{tool-dvbn8w3d.js → tool-hesx257s.js} +74 -12
- package/dist/tool.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2127,12 +2127,26 @@ class NodeFileSystem {
|
|
|
2127
2127
|
throw error;
|
|
2128
2128
|
}
|
|
2129
2129
|
}
|
|
2130
|
-
async writeFile(filePath, data) {
|
|
2130
|
+
async writeFile(filePath, data, options) {
|
|
2131
2131
|
const dir = path.dirname(filePath);
|
|
2132
2132
|
if (dir) {
|
|
2133
2133
|
await fs.mkdir(dir, { recursive: true });
|
|
2134
2134
|
}
|
|
2135
|
-
|
|
2135
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
2136
|
+
if (options?.exclusive) {
|
|
2137
|
+
await fs.writeFile(filePath, data, { flag: "wx" });
|
|
2138
|
+
} else {
|
|
2139
|
+
await fs.writeFile(filePath, data);
|
|
2140
|
+
}
|
|
2141
|
+
return;
|
|
2142
|
+
}
|
|
2143
|
+
const handle = await fs.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
2144
|
+
try {
|
|
2145
|
+
await handle.chmod(options.mode);
|
|
2146
|
+
await handle.writeFile(data);
|
|
2147
|
+
} finally {
|
|
2148
|
+
await handle.close();
|
|
2149
|
+
}
|
|
2136
2150
|
}
|
|
2137
2151
|
async appendFile(filePath, data) {
|
|
2138
2152
|
const dir = path.dirname(filePath);
|
|
@@ -2167,7 +2181,8 @@ class NodeFileSystem {
|
|
|
2167
2181
|
isDirectory: () => stats.isDirectory(),
|
|
2168
2182
|
size: stats.size,
|
|
2169
2183
|
mtimeMs: stats.mtimeMs,
|
|
2170
|
-
ctimeMs: stats.ctimeMs
|
|
2184
|
+
ctimeMs: stats.ctimeMs,
|
|
2185
|
+
mode: stats.mode
|
|
2171
2186
|
};
|
|
2172
2187
|
} catch (error) {
|
|
2173
2188
|
if (this.isEnoent(error))
|
|
@@ -2178,8 +2193,13 @@ class NodeFileSystem {
|
|
|
2178
2193
|
async exists(filePath) {
|
|
2179
2194
|
return existsSync(filePath);
|
|
2180
2195
|
}
|
|
2181
|
-
async mkdir(dirPath) {
|
|
2182
|
-
await fs.mkdir(dirPath, { recursive: true });
|
|
2196
|
+
async mkdir(dirPath, options) {
|
|
2197
|
+
await fs.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
2198
|
+
}
|
|
2199
|
+
async chmod(targetPath, mode) {
|
|
2200
|
+
if (process.platform === "win32")
|
|
2201
|
+
return;
|
|
2202
|
+
await fs.chmod(targetPath, mode);
|
|
2183
2203
|
}
|
|
2184
2204
|
async acquireLock(lockPath) {
|
|
2185
2205
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -6883,7 +6903,7 @@ var package_default = {
|
|
|
6883
6903
|
name: "@uipath/uipath-python-bridge",
|
|
6884
6904
|
author: "UiPath",
|
|
6885
6905
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
6886
|
-
version: "1.206.0-preview.
|
|
6906
|
+
version: "1.206.0-preview.323",
|
|
6887
6907
|
description: "Shared Python detection, caching, and CLI bridge for UiPath Python SDK tools.",
|
|
6888
6908
|
keywords: [
|
|
6889
6909
|
"uip",
|
|
@@ -7040,6 +7060,8 @@ function settlePromiseLike2(thenable) {
|
|
|
7040
7060
|
// ../auth/src/constants.ts
|
|
7041
7061
|
var UIPATH_HOME_DIR2 = ".uipath";
|
|
7042
7062
|
var AUTH_FILENAME = ".auth";
|
|
7063
|
+
var AUTH_FILE_MODE = 384;
|
|
7064
|
+
var AUTH_DIR_MODE = 448;
|
|
7043
7065
|
var DEFAULT_BASE_URL = "https://cloud.uipath.com";
|
|
7044
7066
|
var DEFAULT_AUTH_TIMEOUT_MS2 = 5 * 60 * 1000;
|
|
7045
7067
|
|
|
@@ -7863,6 +7885,38 @@ var loadEnvFileAsync = async ({ envPath }) => {
|
|
|
7863
7885
|
}
|
|
7864
7886
|
return parseEnvContent(content);
|
|
7865
7887
|
};
|
|
7888
|
+
var findAuthHomeDir = (fs, dir) => {
|
|
7889
|
+
let current = dir;
|
|
7890
|
+
for (;; ) {
|
|
7891
|
+
if (fs.path.basename(current) === UIPATH_HOME_DIR2)
|
|
7892
|
+
return current;
|
|
7893
|
+
const parent = fs.path.dirname(current);
|
|
7894
|
+
if (parent === current)
|
|
7895
|
+
return;
|
|
7896
|
+
current = parent;
|
|
7897
|
+
}
|
|
7898
|
+
};
|
|
7899
|
+
var TEMP_FILE_ATTEMPTS = 5;
|
|
7900
|
+
var isFileExists = (error) => error instanceof Error && error.code === "EEXIST";
|
|
7901
|
+
var writeTempFile = async (fs, targetPath, content) => {
|
|
7902
|
+
for (let attempt = 1;; attempt++) {
|
|
7903
|
+
const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
|
|
7904
|
+
try {
|
|
7905
|
+
await fs.writeFile(tempPath, content, {
|
|
7906
|
+
mode: AUTH_FILE_MODE,
|
|
7907
|
+
exclusive: true
|
|
7908
|
+
});
|
|
7909
|
+
return tempPath;
|
|
7910
|
+
} catch (error) {
|
|
7911
|
+
if (!isFileExists(error)) {
|
|
7912
|
+
await fs.rm(tempPath).catch(() => {});
|
|
7913
|
+
throw error;
|
|
7914
|
+
}
|
|
7915
|
+
if (attempt === TEMP_FILE_ATTEMPTS)
|
|
7916
|
+
throw error;
|
|
7917
|
+
}
|
|
7918
|
+
}
|
|
7919
|
+
};
|
|
7866
7920
|
var saveEnvFileAsync = async ({
|
|
7867
7921
|
envPath,
|
|
7868
7922
|
data,
|
|
@@ -7890,10 +7944,18 @@ var saveEnvFileAsync = async ({
|
|
|
7890
7944
|
`)}
|
|
7891
7945
|
`;
|
|
7892
7946
|
const dir = fs.path.dirname(absolutePath);
|
|
7893
|
-
await fs.mkdir(dir);
|
|
7894
|
-
const
|
|
7895
|
-
|
|
7896
|
-
|
|
7947
|
+
await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
|
|
7948
|
+
const authHomeDir = findAuthHomeDir(fs, dir);
|
|
7949
|
+
if (authHomeDir !== undefined) {
|
|
7950
|
+
await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
|
|
7951
|
+
}
|
|
7952
|
+
const tempPath = await writeTempFile(fs, absolutePath, content);
|
|
7953
|
+
try {
|
|
7954
|
+
await fs.rename(tempPath, absolutePath);
|
|
7955
|
+
} catch (error) {
|
|
7956
|
+
await fs.rm(tempPath).catch(() => {});
|
|
7957
|
+
throw error;
|
|
7958
|
+
}
|
|
7897
7959
|
};
|
|
7898
7960
|
|
|
7899
7961
|
// ../auth/src/loginStatus.ts
|
|
@@ -9406,7 +9468,7 @@ var package_default2 = {
|
|
|
9406
9468
|
name: "@uipath/context-grounding-tool",
|
|
9407
9469
|
author: "UiPath",
|
|
9408
9470
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
9409
|
-
version: "1.206.0-preview.
|
|
9471
|
+
version: "1.206.0-preview.323",
|
|
9410
9472
|
description: "Tool for context grounding operations via the UiPath Python SDK",
|
|
9411
9473
|
keywords: [
|
|
9412
9474
|
"uipcli-tool",
|
|
@@ -9493,4 +9555,4 @@ var registerCommands2 = async (program) => {
|
|
|
9493
9555
|
|
|
9494
9556
|
export { Command, metadata2, registerCommands2 };
|
|
9495
9557
|
|
|
9496
|
-
//# debugId=
|
|
9558
|
+
//# debugId=E22F1AE312A7864964756E2164756E21
|
package/dist/tool.js
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/context-grounding-tool",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.206.0-preview.
|
|
5
|
+
"version": "1.206.0-preview.323",
|
|
6
6
|
"description": "Tool for context grounding operations via the UiPath Python SDK",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"uipcli-tool",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"registry": "https://registry.npmjs.org/"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "a752d8a8d78de138e3be0a19642620fec7893d99"
|
|
33
33
|
}
|