@uipath/pm-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-mjcm1bha.js → tool-twhgpjtk.js} +73 -11
- package/dist/tool.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2082,7 +2082,7 @@ var package_default = {
|
|
|
2082
2082
|
name: "@uipath/pm-tool",
|
|
2083
2083
|
author: "UiPath",
|
|
2084
2084
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
2085
|
-
version: "1.206.0-preview.
|
|
2085
|
+
version: "1.206.0-preview.323",
|
|
2086
2086
|
description: "Process Mining — process apps, transformations, and data ingestion.",
|
|
2087
2087
|
private: false,
|
|
2088
2088
|
repository: {
|
|
@@ -2174,12 +2174,26 @@ class NodeFileSystem {
|
|
|
2174
2174
|
throw error;
|
|
2175
2175
|
}
|
|
2176
2176
|
}
|
|
2177
|
-
async writeFile(filePath, data) {
|
|
2177
|
+
async writeFile(filePath, data, options) {
|
|
2178
2178
|
const dir = path.dirname(filePath);
|
|
2179
2179
|
if (dir) {
|
|
2180
2180
|
await fs.mkdir(dir, { recursive: true });
|
|
2181
2181
|
}
|
|
2182
|
-
|
|
2182
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
2183
|
+
if (options?.exclusive) {
|
|
2184
|
+
await fs.writeFile(filePath, data, { flag: "wx" });
|
|
2185
|
+
} else {
|
|
2186
|
+
await fs.writeFile(filePath, data);
|
|
2187
|
+
}
|
|
2188
|
+
return;
|
|
2189
|
+
}
|
|
2190
|
+
const handle = await fs.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
2191
|
+
try {
|
|
2192
|
+
await handle.chmod(options.mode);
|
|
2193
|
+
await handle.writeFile(data);
|
|
2194
|
+
} finally {
|
|
2195
|
+
await handle.close();
|
|
2196
|
+
}
|
|
2183
2197
|
}
|
|
2184
2198
|
async appendFile(filePath, data) {
|
|
2185
2199
|
const dir = path.dirname(filePath);
|
|
@@ -2214,7 +2228,8 @@ class NodeFileSystem {
|
|
|
2214
2228
|
isDirectory: () => stats.isDirectory(),
|
|
2215
2229
|
size: stats.size,
|
|
2216
2230
|
mtimeMs: stats.mtimeMs,
|
|
2217
|
-
ctimeMs: stats.ctimeMs
|
|
2231
|
+
ctimeMs: stats.ctimeMs,
|
|
2232
|
+
mode: stats.mode
|
|
2218
2233
|
};
|
|
2219
2234
|
} catch (error) {
|
|
2220
2235
|
if (this.isEnoent(error))
|
|
@@ -2225,8 +2240,13 @@ class NodeFileSystem {
|
|
|
2225
2240
|
async exists(filePath) {
|
|
2226
2241
|
return existsSync(filePath);
|
|
2227
2242
|
}
|
|
2228
|
-
async mkdir(dirPath) {
|
|
2229
|
-
await fs.mkdir(dirPath, { recursive: true });
|
|
2243
|
+
async mkdir(dirPath, options) {
|
|
2244
|
+
await fs.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
2245
|
+
}
|
|
2246
|
+
async chmod(targetPath, mode) {
|
|
2247
|
+
if (process.platform === "win32")
|
|
2248
|
+
return;
|
|
2249
|
+
await fs.chmod(targetPath, mode);
|
|
2230
2250
|
}
|
|
2231
2251
|
async acquireLock(lockPath) {
|
|
2232
2252
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -6947,6 +6967,8 @@ function settlePromiseLike2(thenable) {
|
|
|
6947
6967
|
// ../auth/src/constants.ts
|
|
6948
6968
|
var UIPATH_HOME_DIR = ".uipath";
|
|
6949
6969
|
var AUTH_FILENAME = ".auth";
|
|
6970
|
+
var AUTH_FILE_MODE = 384;
|
|
6971
|
+
var AUTH_DIR_MODE = 448;
|
|
6950
6972
|
var DEFAULT_BASE_URL = "https://cloud.uipath.com";
|
|
6951
6973
|
var DEFAULT_AUTH_TIMEOUT_MS2 = 5 * 60 * 1000;
|
|
6952
6974
|
|
|
@@ -7770,6 +7792,38 @@ var loadEnvFileAsync = async ({ envPath }) => {
|
|
|
7770
7792
|
}
|
|
7771
7793
|
return parseEnvContent(content);
|
|
7772
7794
|
};
|
|
7795
|
+
var findAuthHomeDir = (fs, dir) => {
|
|
7796
|
+
let current = dir;
|
|
7797
|
+
for (;; ) {
|
|
7798
|
+
if (fs.path.basename(current) === UIPATH_HOME_DIR)
|
|
7799
|
+
return current;
|
|
7800
|
+
const parent = fs.path.dirname(current);
|
|
7801
|
+
if (parent === current)
|
|
7802
|
+
return;
|
|
7803
|
+
current = parent;
|
|
7804
|
+
}
|
|
7805
|
+
};
|
|
7806
|
+
var TEMP_FILE_ATTEMPTS = 5;
|
|
7807
|
+
var isFileExists = (error) => error instanceof Error && error.code === "EEXIST";
|
|
7808
|
+
var writeTempFile = async (fs, targetPath, content) => {
|
|
7809
|
+
for (let attempt = 1;; attempt++) {
|
|
7810
|
+
const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
|
|
7811
|
+
try {
|
|
7812
|
+
await fs.writeFile(tempPath, content, {
|
|
7813
|
+
mode: AUTH_FILE_MODE,
|
|
7814
|
+
exclusive: true
|
|
7815
|
+
});
|
|
7816
|
+
return tempPath;
|
|
7817
|
+
} catch (error) {
|
|
7818
|
+
if (!isFileExists(error)) {
|
|
7819
|
+
await fs.rm(tempPath).catch(() => {});
|
|
7820
|
+
throw error;
|
|
7821
|
+
}
|
|
7822
|
+
if (attempt === TEMP_FILE_ATTEMPTS)
|
|
7823
|
+
throw error;
|
|
7824
|
+
}
|
|
7825
|
+
}
|
|
7826
|
+
};
|
|
7773
7827
|
var saveEnvFileAsync = async ({
|
|
7774
7828
|
envPath,
|
|
7775
7829
|
data,
|
|
@@ -7797,10 +7851,18 @@ var saveEnvFileAsync = async ({
|
|
|
7797
7851
|
`)}
|
|
7798
7852
|
`;
|
|
7799
7853
|
const dir = fs.path.dirname(absolutePath);
|
|
7800
|
-
await fs.mkdir(dir);
|
|
7801
|
-
const
|
|
7802
|
-
|
|
7803
|
-
|
|
7854
|
+
await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
|
|
7855
|
+
const authHomeDir = findAuthHomeDir(fs, dir);
|
|
7856
|
+
if (authHomeDir !== undefined) {
|
|
7857
|
+
await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
|
|
7858
|
+
}
|
|
7859
|
+
const tempPath = await writeTempFile(fs, absolutePath, content);
|
|
7860
|
+
try {
|
|
7861
|
+
await fs.rename(tempPath, absolutePath);
|
|
7862
|
+
} catch (error) {
|
|
7863
|
+
await fs.rm(tempPath).catch(() => {});
|
|
7864
|
+
throw error;
|
|
7865
|
+
}
|
|
7804
7866
|
};
|
|
7805
7867
|
|
|
7806
7868
|
// ../auth/src/loginStatus.ts
|
|
@@ -11295,4 +11357,4 @@ var registerCommands2 = async (program) => {
|
|
|
11295
11357
|
|
|
11296
11358
|
export { Command, metadata2, registerCommands2 };
|
|
11297
11359
|
|
|
11298
|
-
//# debugId=
|
|
11360
|
+
//# debugId=2D535A145F9F649664756E2164756E21
|
package/dist/tool.js
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/pm-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": "Process Mining — process apps, transformations, and data ingestion.",
|
|
7
7
|
"private": false,
|
|
8
8
|
"repository": {
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "a752d8a8d78de138e3be0a19642620fec7893d99"
|
|
31
31
|
}
|