@uipath/maestro-sdk 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/connector-spec/index.js +68 -12
- package/dist/debug-http-client.js +26 -6
- package/dist/debug-service.js +26 -6
- package/dist/index.js +68 -12
- package/dist/json-input.js +26 -6
- package/dist/registry/command.js +68 -12
- package/dist/registry/snapshot.js +26 -6
- package/dist/shared-commands/index.js +67 -11
- package/dist/shared-utils.js +26 -6
- package/dist/studio-catalog.js +67 -11
- package/dist/with-pims-call.js +67 -11
- package/package.json +2 -2
|
@@ -900,7 +900,7 @@ var init_package = __esm(() => {
|
|
|
900
900
|
name: "@uipath/integrationservice-sdk",
|
|
901
901
|
author: "UiPath",
|
|
902
902
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
903
|
-
version: "1.206.0-preview.
|
|
903
|
+
version: "1.206.0-preview.323",
|
|
904
904
|
repository: {
|
|
905
905
|
type: "git",
|
|
906
906
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -8320,7 +8320,7 @@ function settlePromiseLike(thenable) {
|
|
|
8320
8320
|
}
|
|
8321
8321
|
|
|
8322
8322
|
// ../auth/src/constants.ts
|
|
8323
|
-
var UIPATH_HOME_DIR = ".uipath", AUTH_FILENAME = ".auth", DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS;
|
|
8323
|
+
var UIPATH_HOME_DIR = ".uipath", AUTH_FILENAME = ".auth", AUTH_FILE_MODE = 384, AUTH_DIR_MODE = 448, DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS;
|
|
8324
8324
|
var init_constants = __esm(() => {
|
|
8325
8325
|
DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
8326
8326
|
});
|
|
@@ -9091,12 +9091,26 @@ class NodeFileSystem {
|
|
|
9091
9091
|
throw error;
|
|
9092
9092
|
}
|
|
9093
9093
|
}
|
|
9094
|
-
async writeFile(filePath, data) {
|
|
9094
|
+
async writeFile(filePath, data, options) {
|
|
9095
9095
|
const dir = path2.dirname(filePath);
|
|
9096
9096
|
if (dir) {
|
|
9097
9097
|
await fs6.mkdir(dir, { recursive: true });
|
|
9098
9098
|
}
|
|
9099
|
-
|
|
9099
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
9100
|
+
if (options?.exclusive) {
|
|
9101
|
+
await fs6.writeFile(filePath, data, { flag: "wx" });
|
|
9102
|
+
} else {
|
|
9103
|
+
await fs6.writeFile(filePath, data);
|
|
9104
|
+
}
|
|
9105
|
+
return;
|
|
9106
|
+
}
|
|
9107
|
+
const handle = await fs6.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
9108
|
+
try {
|
|
9109
|
+
await handle.chmod(options.mode);
|
|
9110
|
+
await handle.writeFile(data);
|
|
9111
|
+
} finally {
|
|
9112
|
+
await handle.close();
|
|
9113
|
+
}
|
|
9100
9114
|
}
|
|
9101
9115
|
async appendFile(filePath, data) {
|
|
9102
9116
|
const dir = path2.dirname(filePath);
|
|
@@ -9131,7 +9145,8 @@ class NodeFileSystem {
|
|
|
9131
9145
|
isDirectory: () => stats.isDirectory(),
|
|
9132
9146
|
size: stats.size,
|
|
9133
9147
|
mtimeMs: stats.mtimeMs,
|
|
9134
|
-
ctimeMs: stats.ctimeMs
|
|
9148
|
+
ctimeMs: stats.ctimeMs,
|
|
9149
|
+
mode: stats.mode
|
|
9135
9150
|
};
|
|
9136
9151
|
} catch (error) {
|
|
9137
9152
|
if (this.isEnoent(error))
|
|
@@ -9142,8 +9157,13 @@ class NodeFileSystem {
|
|
|
9142
9157
|
async exists(filePath) {
|
|
9143
9158
|
return existsSync(filePath);
|
|
9144
9159
|
}
|
|
9145
|
-
async mkdir(dirPath) {
|
|
9146
|
-
await fs6.mkdir(dirPath, { recursive: true });
|
|
9160
|
+
async mkdir(dirPath, options) {
|
|
9161
|
+
await fs6.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
9162
|
+
}
|
|
9163
|
+
async chmod(targetPath, mode) {
|
|
9164
|
+
if (process.platform === "win32")
|
|
9165
|
+
return;
|
|
9166
|
+
await fs6.chmod(targetPath, mode);
|
|
9147
9167
|
}
|
|
9148
9168
|
async acquireLock(lockPath) {
|
|
9149
9169
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -10040,6 +10060,34 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
10040
10060
|
throw new Error(`Environment file not found: ${envPath}`);
|
|
10041
10061
|
}
|
|
10042
10062
|
return parseEnvContent(content);
|
|
10063
|
+
}, findAuthHomeDir = (fs, dir) => {
|
|
10064
|
+
let current = dir;
|
|
10065
|
+
for (;; ) {
|
|
10066
|
+
if (fs.path.basename(current) === UIPATH_HOME_DIR)
|
|
10067
|
+
return current;
|
|
10068
|
+
const parent = fs.path.dirname(current);
|
|
10069
|
+
if (parent === current)
|
|
10070
|
+
return;
|
|
10071
|
+
current = parent;
|
|
10072
|
+
}
|
|
10073
|
+
}, TEMP_FILE_ATTEMPTS = 5, isFileExists = (error) => error instanceof Error && error.code === "EEXIST", writeTempFile = async (fs, targetPath, content) => {
|
|
10074
|
+
for (let attempt = 1;; attempt++) {
|
|
10075
|
+
const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
|
|
10076
|
+
try {
|
|
10077
|
+
await fs.writeFile(tempPath, content, {
|
|
10078
|
+
mode: AUTH_FILE_MODE,
|
|
10079
|
+
exclusive: true
|
|
10080
|
+
});
|
|
10081
|
+
return tempPath;
|
|
10082
|
+
} catch (error) {
|
|
10083
|
+
if (!isFileExists(error)) {
|
|
10084
|
+
await fs.rm(tempPath).catch(() => {});
|
|
10085
|
+
throw error;
|
|
10086
|
+
}
|
|
10087
|
+
if (attempt === TEMP_FILE_ATTEMPTS)
|
|
10088
|
+
throw error;
|
|
10089
|
+
}
|
|
10090
|
+
}
|
|
10043
10091
|
}, saveEnvFileAsync = async ({
|
|
10044
10092
|
envPath,
|
|
10045
10093
|
data,
|
|
@@ -10067,10 +10115,18 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
10067
10115
|
`)}
|
|
10068
10116
|
`;
|
|
10069
10117
|
const dir = fs.path.dirname(absolutePath);
|
|
10070
|
-
await fs.mkdir(dir);
|
|
10071
|
-
const
|
|
10072
|
-
|
|
10073
|
-
|
|
10118
|
+
await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
|
|
10119
|
+
const authHomeDir = findAuthHomeDir(fs, dir);
|
|
10120
|
+
if (authHomeDir !== undefined) {
|
|
10121
|
+
await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
|
|
10122
|
+
}
|
|
10123
|
+
const tempPath = await writeTempFile(fs, absolutePath, content);
|
|
10124
|
+
try {
|
|
10125
|
+
await fs.rename(tempPath, absolutePath);
|
|
10126
|
+
} catch (error) {
|
|
10127
|
+
await fs.rm(tempPath).catch(() => {});
|
|
10128
|
+
throw error;
|
|
10129
|
+
}
|
|
10074
10130
|
};
|
|
10075
10131
|
var init_envFile = __esm(() => {
|
|
10076
10132
|
init_src2();
|
|
@@ -247478,4 +247534,4 @@ export {
|
|
|
247478
247534
|
studioCatalogTypeCache
|
|
247479
247535
|
};
|
|
247480
247536
|
|
|
247481
|
-
//# debugId=
|
|
247537
|
+
//# debugId=78C08DEF9B59B88C64756E2164756E21
|
|
@@ -740,12 +740,26 @@ class NodeFileSystem {
|
|
|
740
740
|
throw error;
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
async writeFile(filePath, data) {
|
|
743
|
+
async writeFile(filePath, data, options) {
|
|
744
744
|
const dir = path2.dirname(filePath);
|
|
745
745
|
if (dir) {
|
|
746
746
|
await fs6.mkdir(dir, { recursive: true });
|
|
747
747
|
}
|
|
748
|
-
|
|
748
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
749
|
+
if (options?.exclusive) {
|
|
750
|
+
await fs6.writeFile(filePath, data, { flag: "wx" });
|
|
751
|
+
} else {
|
|
752
|
+
await fs6.writeFile(filePath, data);
|
|
753
|
+
}
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
const handle = await fs6.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
757
|
+
try {
|
|
758
|
+
await handle.chmod(options.mode);
|
|
759
|
+
await handle.writeFile(data);
|
|
760
|
+
} finally {
|
|
761
|
+
await handle.close();
|
|
762
|
+
}
|
|
749
763
|
}
|
|
750
764
|
async appendFile(filePath, data) {
|
|
751
765
|
const dir = path2.dirname(filePath);
|
|
@@ -780,7 +794,8 @@ class NodeFileSystem {
|
|
|
780
794
|
isDirectory: () => stats.isDirectory(),
|
|
781
795
|
size: stats.size,
|
|
782
796
|
mtimeMs: stats.mtimeMs,
|
|
783
|
-
ctimeMs: stats.ctimeMs
|
|
797
|
+
ctimeMs: stats.ctimeMs,
|
|
798
|
+
mode: stats.mode
|
|
784
799
|
};
|
|
785
800
|
} catch (error) {
|
|
786
801
|
if (this.isEnoent(error))
|
|
@@ -791,8 +806,13 @@ class NodeFileSystem {
|
|
|
791
806
|
async exists(filePath) {
|
|
792
807
|
return existsSync(filePath);
|
|
793
808
|
}
|
|
794
|
-
async mkdir(dirPath) {
|
|
795
|
-
await fs6.mkdir(dirPath, { recursive: true });
|
|
809
|
+
async mkdir(dirPath, options) {
|
|
810
|
+
await fs6.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
811
|
+
}
|
|
812
|
+
async chmod(targetPath, mode) {
|
|
813
|
+
if (process.platform === "win32")
|
|
814
|
+
return;
|
|
815
|
+
await fs6.chmod(targetPath, mode);
|
|
796
816
|
}
|
|
797
817
|
async acquireLock(lockPath) {
|
|
798
818
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -13193,4 +13213,4 @@ export {
|
|
|
13193
13213
|
studioWebPost
|
|
13194
13214
|
};
|
|
13195
13215
|
|
|
13196
|
-
//# debugId=
|
|
13216
|
+
//# debugId=1A4E851003721D7464756E2164756E21
|
package/dist/debug-service.js
CHANGED
|
@@ -740,12 +740,26 @@ class NodeFileSystem {
|
|
|
740
740
|
throw error;
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
async writeFile(filePath, data) {
|
|
743
|
+
async writeFile(filePath, data, options) {
|
|
744
744
|
const dir = path2.dirname(filePath);
|
|
745
745
|
if (dir) {
|
|
746
746
|
await fs6.mkdir(dir, { recursive: true });
|
|
747
747
|
}
|
|
748
|
-
|
|
748
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
749
|
+
if (options?.exclusive) {
|
|
750
|
+
await fs6.writeFile(filePath, data, { flag: "wx" });
|
|
751
|
+
} else {
|
|
752
|
+
await fs6.writeFile(filePath, data);
|
|
753
|
+
}
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
const handle = await fs6.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
757
|
+
try {
|
|
758
|
+
await handle.chmod(options.mode);
|
|
759
|
+
await handle.writeFile(data);
|
|
760
|
+
} finally {
|
|
761
|
+
await handle.close();
|
|
762
|
+
}
|
|
749
763
|
}
|
|
750
764
|
async appendFile(filePath, data) {
|
|
751
765
|
const dir = path2.dirname(filePath);
|
|
@@ -780,7 +794,8 @@ class NodeFileSystem {
|
|
|
780
794
|
isDirectory: () => stats.isDirectory(),
|
|
781
795
|
size: stats.size,
|
|
782
796
|
mtimeMs: stats.mtimeMs,
|
|
783
|
-
ctimeMs: stats.ctimeMs
|
|
797
|
+
ctimeMs: stats.ctimeMs,
|
|
798
|
+
mode: stats.mode
|
|
784
799
|
};
|
|
785
800
|
} catch (error) {
|
|
786
801
|
if (this.isEnoent(error))
|
|
@@ -791,8 +806,13 @@ class NodeFileSystem {
|
|
|
791
806
|
async exists(filePath) {
|
|
792
807
|
return existsSync(filePath);
|
|
793
808
|
}
|
|
794
|
-
async mkdir(dirPath) {
|
|
795
|
-
await fs6.mkdir(dirPath, { recursive: true });
|
|
809
|
+
async mkdir(dirPath, options) {
|
|
810
|
+
await fs6.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
811
|
+
}
|
|
812
|
+
async chmod(targetPath, mode) {
|
|
813
|
+
if (process.platform === "win32")
|
|
814
|
+
return;
|
|
815
|
+
await fs6.chmod(targetPath, mode);
|
|
796
816
|
}
|
|
797
817
|
async acquireLock(lockPath) {
|
|
798
818
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -13886,4 +13906,4 @@ export {
|
|
|
13886
13906
|
uploadAndDebugSolution
|
|
13887
13907
|
};
|
|
13888
13908
|
|
|
13889
|
-
//# debugId=
|
|
13909
|
+
//# debugId=0988785BD5A5199464756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -1665,12 +1665,26 @@ class NodeFileSystem {
|
|
|
1665
1665
|
throw error;
|
|
1666
1666
|
}
|
|
1667
1667
|
}
|
|
1668
|
-
async writeFile(filePath, data) {
|
|
1668
|
+
async writeFile(filePath, data, options) {
|
|
1669
1669
|
const dir = path2.dirname(filePath);
|
|
1670
1670
|
if (dir) {
|
|
1671
1671
|
await fs6.mkdir(dir, { recursive: true });
|
|
1672
1672
|
}
|
|
1673
|
-
|
|
1673
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
1674
|
+
if (options?.exclusive) {
|
|
1675
|
+
await fs6.writeFile(filePath, data, { flag: "wx" });
|
|
1676
|
+
} else {
|
|
1677
|
+
await fs6.writeFile(filePath, data);
|
|
1678
|
+
}
|
|
1679
|
+
return;
|
|
1680
|
+
}
|
|
1681
|
+
const handle = await fs6.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
1682
|
+
try {
|
|
1683
|
+
await handle.chmod(options.mode);
|
|
1684
|
+
await handle.writeFile(data);
|
|
1685
|
+
} finally {
|
|
1686
|
+
await handle.close();
|
|
1687
|
+
}
|
|
1674
1688
|
}
|
|
1675
1689
|
async appendFile(filePath, data) {
|
|
1676
1690
|
const dir = path2.dirname(filePath);
|
|
@@ -1705,7 +1719,8 @@ class NodeFileSystem {
|
|
|
1705
1719
|
isDirectory: () => stats.isDirectory(),
|
|
1706
1720
|
size: stats.size,
|
|
1707
1721
|
mtimeMs: stats.mtimeMs,
|
|
1708
|
-
ctimeMs: stats.ctimeMs
|
|
1722
|
+
ctimeMs: stats.ctimeMs,
|
|
1723
|
+
mode: stats.mode
|
|
1709
1724
|
};
|
|
1710
1725
|
} catch (error) {
|
|
1711
1726
|
if (this.isEnoent(error))
|
|
@@ -1716,8 +1731,13 @@ class NodeFileSystem {
|
|
|
1716
1731
|
async exists(filePath) {
|
|
1717
1732
|
return existsSync(filePath);
|
|
1718
1733
|
}
|
|
1719
|
-
async mkdir(dirPath) {
|
|
1720
|
-
await fs6.mkdir(dirPath, { recursive: true });
|
|
1734
|
+
async mkdir(dirPath, options) {
|
|
1735
|
+
await fs6.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
1736
|
+
}
|
|
1737
|
+
async chmod(targetPath, mode) {
|
|
1738
|
+
if (process.platform === "win32")
|
|
1739
|
+
return;
|
|
1740
|
+
await fs6.chmod(targetPath, mode);
|
|
1721
1741
|
}
|
|
1722
1742
|
async acquireLock(lockPath) {
|
|
1723
1743
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -13090,7 +13110,7 @@ function settlePromiseLike2(thenable) {
|
|
|
13090
13110
|
}
|
|
13091
13111
|
|
|
13092
13112
|
// ../auth/src/constants.ts
|
|
13093
|
-
var UIPATH_HOME_DIR2 = ".uipath", AUTH_FILENAME = ".auth", DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS2;
|
|
13113
|
+
var UIPATH_HOME_DIR2 = ".uipath", AUTH_FILENAME = ".auth", AUTH_FILE_MODE = 384, AUTH_DIR_MODE = 448, DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS2;
|
|
13094
13114
|
var init_constants2 = __esm(() => {
|
|
13095
13115
|
DEFAULT_AUTH_TIMEOUT_MS2 = 5 * 60 * 1000;
|
|
13096
13116
|
});
|
|
@@ -13889,6 +13909,34 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
13889
13909
|
throw new Error(`Environment file not found: ${envPath}`);
|
|
13890
13910
|
}
|
|
13891
13911
|
return parseEnvContent(content);
|
|
13912
|
+
}, findAuthHomeDir = (fs, dir) => {
|
|
13913
|
+
let current = dir;
|
|
13914
|
+
for (;; ) {
|
|
13915
|
+
if (fs.path.basename(current) === UIPATH_HOME_DIR2)
|
|
13916
|
+
return current;
|
|
13917
|
+
const parent = fs.path.dirname(current);
|
|
13918
|
+
if (parent === current)
|
|
13919
|
+
return;
|
|
13920
|
+
current = parent;
|
|
13921
|
+
}
|
|
13922
|
+
}, TEMP_FILE_ATTEMPTS = 5, isFileExists = (error) => error instanceof Error && error.code === "EEXIST", writeTempFile = async (fs, targetPath, content) => {
|
|
13923
|
+
for (let attempt = 1;; attempt++) {
|
|
13924
|
+
const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
|
|
13925
|
+
try {
|
|
13926
|
+
await fs.writeFile(tempPath, content, {
|
|
13927
|
+
mode: AUTH_FILE_MODE,
|
|
13928
|
+
exclusive: true
|
|
13929
|
+
});
|
|
13930
|
+
return tempPath;
|
|
13931
|
+
} catch (error) {
|
|
13932
|
+
if (!isFileExists(error)) {
|
|
13933
|
+
await fs.rm(tempPath).catch(() => {});
|
|
13934
|
+
throw error;
|
|
13935
|
+
}
|
|
13936
|
+
if (attempt === TEMP_FILE_ATTEMPTS)
|
|
13937
|
+
throw error;
|
|
13938
|
+
}
|
|
13939
|
+
}
|
|
13892
13940
|
}, saveEnvFileAsync = async ({
|
|
13893
13941
|
envPath,
|
|
13894
13942
|
data,
|
|
@@ -13916,10 +13964,18 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
13916
13964
|
`)}
|
|
13917
13965
|
`;
|
|
13918
13966
|
const dir = fs.path.dirname(absolutePath);
|
|
13919
|
-
await fs.mkdir(dir);
|
|
13920
|
-
const
|
|
13921
|
-
|
|
13922
|
-
|
|
13967
|
+
await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
|
|
13968
|
+
const authHomeDir = findAuthHomeDir(fs, dir);
|
|
13969
|
+
if (authHomeDir !== undefined) {
|
|
13970
|
+
await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
|
|
13971
|
+
}
|
|
13972
|
+
const tempPath = await writeTempFile(fs, absolutePath, content);
|
|
13973
|
+
try {
|
|
13974
|
+
await fs.rename(tempPath, absolutePath);
|
|
13975
|
+
} catch (error) {
|
|
13976
|
+
await fs.rm(tempPath).catch(() => {});
|
|
13977
|
+
throw error;
|
|
13978
|
+
}
|
|
13923
13979
|
};
|
|
13924
13980
|
var init_envFile = __esm(() => {
|
|
13925
13981
|
init_src();
|
|
@@ -131368,7 +131424,7 @@ var init_package = __esm(() => {
|
|
|
131368
131424
|
name: "@uipath/integrationservice-sdk",
|
|
131369
131425
|
author: "UiPath",
|
|
131370
131426
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
131371
|
-
version: "1.206.0-preview.
|
|
131427
|
+
version: "1.206.0-preview.323",
|
|
131372
131428
|
repository: {
|
|
131373
131429
|
type: "git",
|
|
131374
131430
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -262829,4 +262885,4 @@ export {
|
|
|
262829
262885
|
withPimsCall
|
|
262830
262886
|
};
|
|
262831
262887
|
|
|
262832
|
-
//# debugId=
|
|
262888
|
+
//# debugId=F759C80BCD69DFE764756E2164756E21
|
package/dist/json-input.js
CHANGED
|
@@ -740,12 +740,26 @@ class NodeFileSystem {
|
|
|
740
740
|
throw error;
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
async writeFile(filePath, data) {
|
|
743
|
+
async writeFile(filePath, data, options) {
|
|
744
744
|
const dir = path2.dirname(filePath);
|
|
745
745
|
if (dir) {
|
|
746
746
|
await fs6.mkdir(dir, { recursive: true });
|
|
747
747
|
}
|
|
748
|
-
|
|
748
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
749
|
+
if (options?.exclusive) {
|
|
750
|
+
await fs6.writeFile(filePath, data, { flag: "wx" });
|
|
751
|
+
} else {
|
|
752
|
+
await fs6.writeFile(filePath, data);
|
|
753
|
+
}
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
const handle = await fs6.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
757
|
+
try {
|
|
758
|
+
await handle.chmod(options.mode);
|
|
759
|
+
await handle.writeFile(data);
|
|
760
|
+
} finally {
|
|
761
|
+
await handle.close();
|
|
762
|
+
}
|
|
749
763
|
}
|
|
750
764
|
async appendFile(filePath, data) {
|
|
751
765
|
const dir = path2.dirname(filePath);
|
|
@@ -780,7 +794,8 @@ class NodeFileSystem {
|
|
|
780
794
|
isDirectory: () => stats.isDirectory(),
|
|
781
795
|
size: stats.size,
|
|
782
796
|
mtimeMs: stats.mtimeMs,
|
|
783
|
-
ctimeMs: stats.ctimeMs
|
|
797
|
+
ctimeMs: stats.ctimeMs,
|
|
798
|
+
mode: stats.mode
|
|
784
799
|
};
|
|
785
800
|
} catch (error) {
|
|
786
801
|
if (this.isEnoent(error))
|
|
@@ -791,8 +806,13 @@ class NodeFileSystem {
|
|
|
791
806
|
async exists(filePath) {
|
|
792
807
|
return existsSync(filePath);
|
|
793
808
|
}
|
|
794
|
-
async mkdir(dirPath) {
|
|
795
|
-
await fs6.mkdir(dirPath, { recursive: true });
|
|
809
|
+
async mkdir(dirPath, options) {
|
|
810
|
+
await fs6.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
811
|
+
}
|
|
812
|
+
async chmod(targetPath, mode) {
|
|
813
|
+
if (process.platform === "win32")
|
|
814
|
+
return;
|
|
815
|
+
await fs6.chmod(targetPath, mode);
|
|
796
816
|
}
|
|
797
817
|
async acquireLock(lockPath) {
|
|
798
818
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -13022,4 +13042,4 @@ export {
|
|
|
13022
13042
|
resolveJsonInput
|
|
13023
13043
|
};
|
|
13024
13044
|
|
|
13025
|
-
//# debugId=
|
|
13045
|
+
//# debugId=027C9236C409CB0364756E2164756E21
|
package/dist/registry/command.js
CHANGED
|
@@ -740,12 +740,26 @@ class NodeFileSystem {
|
|
|
740
740
|
throw error;
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
async writeFile(filePath, data) {
|
|
743
|
+
async writeFile(filePath, data, options) {
|
|
744
744
|
const dir = path2.dirname(filePath);
|
|
745
745
|
if (dir) {
|
|
746
746
|
await fs6.mkdir(dir, { recursive: true });
|
|
747
747
|
}
|
|
748
|
-
|
|
748
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
749
|
+
if (options?.exclusive) {
|
|
750
|
+
await fs6.writeFile(filePath, data, { flag: "wx" });
|
|
751
|
+
} else {
|
|
752
|
+
await fs6.writeFile(filePath, data);
|
|
753
|
+
}
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
const handle = await fs6.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
757
|
+
try {
|
|
758
|
+
await handle.chmod(options.mode);
|
|
759
|
+
await handle.writeFile(data);
|
|
760
|
+
} finally {
|
|
761
|
+
await handle.close();
|
|
762
|
+
}
|
|
749
763
|
}
|
|
750
764
|
async appendFile(filePath, data) {
|
|
751
765
|
const dir = path2.dirname(filePath);
|
|
@@ -780,7 +794,8 @@ class NodeFileSystem {
|
|
|
780
794
|
isDirectory: () => stats.isDirectory(),
|
|
781
795
|
size: stats.size,
|
|
782
796
|
mtimeMs: stats.mtimeMs,
|
|
783
|
-
ctimeMs: stats.ctimeMs
|
|
797
|
+
ctimeMs: stats.ctimeMs,
|
|
798
|
+
mode: stats.mode
|
|
784
799
|
};
|
|
785
800
|
} catch (error) {
|
|
786
801
|
if (this.isEnoent(error))
|
|
@@ -791,8 +806,13 @@ class NodeFileSystem {
|
|
|
791
806
|
async exists(filePath) {
|
|
792
807
|
return existsSync(filePath);
|
|
793
808
|
}
|
|
794
|
-
async mkdir(dirPath) {
|
|
795
|
-
await fs6.mkdir(dirPath, { recursive: true });
|
|
809
|
+
async mkdir(dirPath, options) {
|
|
810
|
+
await fs6.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
811
|
+
}
|
|
812
|
+
async chmod(targetPath, mode) {
|
|
813
|
+
if (process.platform === "win32")
|
|
814
|
+
return;
|
|
815
|
+
await fs6.chmod(targetPath, mode);
|
|
796
816
|
}
|
|
797
817
|
async acquireLock(lockPath) {
|
|
798
818
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -129044,7 +129064,7 @@ function settlePromiseLike2(thenable) {
|
|
|
129044
129064
|
}
|
|
129045
129065
|
|
|
129046
129066
|
// ../auth/src/constants.ts
|
|
129047
|
-
var UIPATH_HOME_DIR2 = ".uipath", AUTH_FILENAME = ".auth", DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS2;
|
|
129067
|
+
var UIPATH_HOME_DIR2 = ".uipath", AUTH_FILENAME = ".auth", AUTH_FILE_MODE = 384, AUTH_DIR_MODE = 448, DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS2;
|
|
129048
129068
|
var init_constants2 = __esm(() => {
|
|
129049
129069
|
DEFAULT_AUTH_TIMEOUT_MS2 = 5 * 60 * 1000;
|
|
129050
129070
|
});
|
|
@@ -129843,6 +129863,34 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
129843
129863
|
throw new Error(`Environment file not found: ${envPath}`);
|
|
129844
129864
|
}
|
|
129845
129865
|
return parseEnvContent(content);
|
|
129866
|
+
}, findAuthHomeDir = (fs, dir) => {
|
|
129867
|
+
let current = dir;
|
|
129868
|
+
for (;; ) {
|
|
129869
|
+
if (fs.path.basename(current) === UIPATH_HOME_DIR2)
|
|
129870
|
+
return current;
|
|
129871
|
+
const parent = fs.path.dirname(current);
|
|
129872
|
+
if (parent === current)
|
|
129873
|
+
return;
|
|
129874
|
+
current = parent;
|
|
129875
|
+
}
|
|
129876
|
+
}, TEMP_FILE_ATTEMPTS = 5, isFileExists = (error) => error instanceof Error && error.code === "EEXIST", writeTempFile = async (fs, targetPath, content) => {
|
|
129877
|
+
for (let attempt = 1;; attempt++) {
|
|
129878
|
+
const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
|
|
129879
|
+
try {
|
|
129880
|
+
await fs.writeFile(tempPath, content, {
|
|
129881
|
+
mode: AUTH_FILE_MODE,
|
|
129882
|
+
exclusive: true
|
|
129883
|
+
});
|
|
129884
|
+
return tempPath;
|
|
129885
|
+
} catch (error) {
|
|
129886
|
+
if (!isFileExists(error)) {
|
|
129887
|
+
await fs.rm(tempPath).catch(() => {});
|
|
129888
|
+
throw error;
|
|
129889
|
+
}
|
|
129890
|
+
if (attempt === TEMP_FILE_ATTEMPTS)
|
|
129891
|
+
throw error;
|
|
129892
|
+
}
|
|
129893
|
+
}
|
|
129846
129894
|
}, saveEnvFileAsync = async ({
|
|
129847
129895
|
envPath,
|
|
129848
129896
|
data,
|
|
@@ -129870,10 +129918,18 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
129870
129918
|
`)}
|
|
129871
129919
|
`;
|
|
129872
129920
|
const dir = fs.path.dirname(absolutePath);
|
|
129873
|
-
await fs.mkdir(dir);
|
|
129874
|
-
const
|
|
129875
|
-
|
|
129876
|
-
|
|
129921
|
+
await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
|
|
129922
|
+
const authHomeDir = findAuthHomeDir(fs, dir);
|
|
129923
|
+
if (authHomeDir !== undefined) {
|
|
129924
|
+
await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
|
|
129925
|
+
}
|
|
129926
|
+
const tempPath = await writeTempFile(fs, absolutePath, content);
|
|
129927
|
+
try {
|
|
129928
|
+
await fs.rename(tempPath, absolutePath);
|
|
129929
|
+
} catch (error) {
|
|
129930
|
+
await fs.rm(tempPath).catch(() => {});
|
|
129931
|
+
throw error;
|
|
129932
|
+
}
|
|
129877
129933
|
};
|
|
129878
129934
|
var init_envFile = __esm(() => {
|
|
129879
129935
|
init_src();
|
|
@@ -131204,7 +131260,7 @@ var init_package = __esm(() => {
|
|
|
131204
131260
|
name: "@uipath/integrationservice-sdk",
|
|
131205
131261
|
author: "UiPath",
|
|
131206
131262
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
131207
|
-
version: "1.206.0-preview.
|
|
131263
|
+
version: "1.206.0-preview.323",
|
|
131208
131264
|
repository: {
|
|
131209
131265
|
type: "git",
|
|
131210
131266
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -246938,4 +246994,4 @@ export {
|
|
|
246938
246994
|
shownRows
|
|
246939
246995
|
};
|
|
246940
246996
|
|
|
246941
|
-
//# debugId=
|
|
246997
|
+
//# debugId=010D2BA353D1613164756E2164756E21
|
|
@@ -740,12 +740,26 @@ class NodeFileSystem {
|
|
|
740
740
|
throw error;
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
async writeFile(filePath, data) {
|
|
743
|
+
async writeFile(filePath, data, options) {
|
|
744
744
|
const dir = path2.dirname(filePath);
|
|
745
745
|
if (dir) {
|
|
746
746
|
await fs6.mkdir(dir, { recursive: true });
|
|
747
747
|
}
|
|
748
|
-
|
|
748
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
749
|
+
if (options?.exclusive) {
|
|
750
|
+
await fs6.writeFile(filePath, data, { flag: "wx" });
|
|
751
|
+
} else {
|
|
752
|
+
await fs6.writeFile(filePath, data);
|
|
753
|
+
}
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
const handle = await fs6.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
757
|
+
try {
|
|
758
|
+
await handle.chmod(options.mode);
|
|
759
|
+
await handle.writeFile(data);
|
|
760
|
+
} finally {
|
|
761
|
+
await handle.close();
|
|
762
|
+
}
|
|
749
763
|
}
|
|
750
764
|
async appendFile(filePath, data) {
|
|
751
765
|
const dir = path2.dirname(filePath);
|
|
@@ -780,7 +794,8 @@ class NodeFileSystem {
|
|
|
780
794
|
isDirectory: () => stats.isDirectory(),
|
|
781
795
|
size: stats.size,
|
|
782
796
|
mtimeMs: stats.mtimeMs,
|
|
783
|
-
ctimeMs: stats.ctimeMs
|
|
797
|
+
ctimeMs: stats.ctimeMs,
|
|
798
|
+
mode: stats.mode
|
|
784
799
|
};
|
|
785
800
|
} catch (error) {
|
|
786
801
|
if (this.isEnoent(error))
|
|
@@ -791,8 +806,13 @@ class NodeFileSystem {
|
|
|
791
806
|
async exists(filePath) {
|
|
792
807
|
return existsSync(filePath);
|
|
793
808
|
}
|
|
794
|
-
async mkdir(dirPath) {
|
|
795
|
-
await fs6.mkdir(dirPath, { recursive: true });
|
|
809
|
+
async mkdir(dirPath, options) {
|
|
810
|
+
await fs6.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
811
|
+
}
|
|
812
|
+
async chmod(targetPath, mode) {
|
|
813
|
+
if (process.platform === "win32")
|
|
814
|
+
return;
|
|
815
|
+
await fs6.chmod(targetPath, mode);
|
|
796
816
|
}
|
|
797
817
|
async acquireLock(lockPath) {
|
|
798
818
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -12969,4 +12989,4 @@ export {
|
|
|
12969
12989
|
resolveMaestroRegistry
|
|
12970
12990
|
};
|
|
12971
12991
|
|
|
12972
|
-
//# debugId=
|
|
12992
|
+
//# debugId=4713A42F402B54B264756E2164756E21
|
|
@@ -740,12 +740,26 @@ class NodeFileSystem {
|
|
|
740
740
|
throw error;
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
async writeFile(filePath, data) {
|
|
743
|
+
async writeFile(filePath, data, options) {
|
|
744
744
|
const dir = path2.dirname(filePath);
|
|
745
745
|
if (dir) {
|
|
746
746
|
await fs6.mkdir(dir, { recursive: true });
|
|
747
747
|
}
|
|
748
|
-
|
|
748
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
749
|
+
if (options?.exclusive) {
|
|
750
|
+
await fs6.writeFile(filePath, data, { flag: "wx" });
|
|
751
|
+
} else {
|
|
752
|
+
await fs6.writeFile(filePath, data);
|
|
753
|
+
}
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
const handle = await fs6.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
757
|
+
try {
|
|
758
|
+
await handle.chmod(options.mode);
|
|
759
|
+
await handle.writeFile(data);
|
|
760
|
+
} finally {
|
|
761
|
+
await handle.close();
|
|
762
|
+
}
|
|
749
763
|
}
|
|
750
764
|
async appendFile(filePath, data) {
|
|
751
765
|
const dir = path2.dirname(filePath);
|
|
@@ -780,7 +794,8 @@ class NodeFileSystem {
|
|
|
780
794
|
isDirectory: () => stats.isDirectory(),
|
|
781
795
|
size: stats.size,
|
|
782
796
|
mtimeMs: stats.mtimeMs,
|
|
783
|
-
ctimeMs: stats.ctimeMs
|
|
797
|
+
ctimeMs: stats.ctimeMs,
|
|
798
|
+
mode: stats.mode
|
|
784
799
|
};
|
|
785
800
|
} catch (error) {
|
|
786
801
|
if (this.isEnoent(error))
|
|
@@ -791,8 +806,13 @@ class NodeFileSystem {
|
|
|
791
806
|
async exists(filePath) {
|
|
792
807
|
return existsSync(filePath);
|
|
793
808
|
}
|
|
794
|
-
async mkdir(dirPath) {
|
|
795
|
-
await fs6.mkdir(dirPath, { recursive: true });
|
|
809
|
+
async mkdir(dirPath, options) {
|
|
810
|
+
await fs6.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
811
|
+
}
|
|
812
|
+
async chmod(targetPath, mode) {
|
|
813
|
+
if (process.platform === "win32")
|
|
814
|
+
return;
|
|
815
|
+
await fs6.chmod(targetPath, mode);
|
|
796
816
|
}
|
|
797
817
|
async acquireLock(lockPath) {
|
|
798
818
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -12926,7 +12946,7 @@ function settlePromiseLike2(thenable) {
|
|
|
12926
12946
|
}
|
|
12927
12947
|
|
|
12928
12948
|
// ../auth/src/constants.ts
|
|
12929
|
-
var UIPATH_HOME_DIR2 = ".uipath", AUTH_FILENAME = ".auth", DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS2;
|
|
12949
|
+
var UIPATH_HOME_DIR2 = ".uipath", AUTH_FILENAME = ".auth", AUTH_FILE_MODE = 384, AUTH_DIR_MODE = 448, DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS2;
|
|
12930
12950
|
var init_constants2 = __esm(() => {
|
|
12931
12951
|
DEFAULT_AUTH_TIMEOUT_MS2 = 5 * 60 * 1000;
|
|
12932
12952
|
});
|
|
@@ -13725,6 +13745,34 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
13725
13745
|
throw new Error(`Environment file not found: ${envPath}`);
|
|
13726
13746
|
}
|
|
13727
13747
|
return parseEnvContent(content);
|
|
13748
|
+
}, findAuthHomeDir = (fs, dir) => {
|
|
13749
|
+
let current = dir;
|
|
13750
|
+
for (;; ) {
|
|
13751
|
+
if (fs.path.basename(current) === UIPATH_HOME_DIR2)
|
|
13752
|
+
return current;
|
|
13753
|
+
const parent = fs.path.dirname(current);
|
|
13754
|
+
if (parent === current)
|
|
13755
|
+
return;
|
|
13756
|
+
current = parent;
|
|
13757
|
+
}
|
|
13758
|
+
}, TEMP_FILE_ATTEMPTS = 5, isFileExists = (error) => error instanceof Error && error.code === "EEXIST", writeTempFile = async (fs, targetPath, content) => {
|
|
13759
|
+
for (let attempt = 1;; attempt++) {
|
|
13760
|
+
const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
|
|
13761
|
+
try {
|
|
13762
|
+
await fs.writeFile(tempPath, content, {
|
|
13763
|
+
mode: AUTH_FILE_MODE,
|
|
13764
|
+
exclusive: true
|
|
13765
|
+
});
|
|
13766
|
+
return tempPath;
|
|
13767
|
+
} catch (error) {
|
|
13768
|
+
if (!isFileExists(error)) {
|
|
13769
|
+
await fs.rm(tempPath).catch(() => {});
|
|
13770
|
+
throw error;
|
|
13771
|
+
}
|
|
13772
|
+
if (attempt === TEMP_FILE_ATTEMPTS)
|
|
13773
|
+
throw error;
|
|
13774
|
+
}
|
|
13775
|
+
}
|
|
13728
13776
|
}, saveEnvFileAsync = async ({
|
|
13729
13777
|
envPath,
|
|
13730
13778
|
data,
|
|
@@ -13752,10 +13800,18 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
13752
13800
|
`)}
|
|
13753
13801
|
`;
|
|
13754
13802
|
const dir = fs.path.dirname(absolutePath);
|
|
13755
|
-
await fs.mkdir(dir);
|
|
13756
|
-
const
|
|
13757
|
-
|
|
13758
|
-
|
|
13803
|
+
await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
|
|
13804
|
+
const authHomeDir = findAuthHomeDir(fs, dir);
|
|
13805
|
+
if (authHomeDir !== undefined) {
|
|
13806
|
+
await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
|
|
13807
|
+
}
|
|
13808
|
+
const tempPath = await writeTempFile(fs, absolutePath, content);
|
|
13809
|
+
try {
|
|
13810
|
+
await fs.rename(tempPath, absolutePath);
|
|
13811
|
+
} catch (error) {
|
|
13812
|
+
await fs.rm(tempPath).catch(() => {});
|
|
13813
|
+
throw error;
|
|
13814
|
+
}
|
|
13759
13815
|
};
|
|
13760
13816
|
var init_envFile = __esm(() => {
|
|
13761
13817
|
init_src();
|
|
@@ -17442,4 +17498,4 @@ export {
|
|
|
17442
17498
|
registerSharedProcessesCommands
|
|
17443
17499
|
};
|
|
17444
17500
|
|
|
17445
|
-
//# debugId=
|
|
17501
|
+
//# debugId=3251692271FB83F264756E2164756E21
|
package/dist/shared-utils.js
CHANGED
|
@@ -740,12 +740,26 @@ class NodeFileSystem {
|
|
|
740
740
|
throw error;
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
async writeFile(filePath, data) {
|
|
743
|
+
async writeFile(filePath, data, options) {
|
|
744
744
|
const dir = path2.dirname(filePath);
|
|
745
745
|
if (dir) {
|
|
746
746
|
await fs6.mkdir(dir, { recursive: true });
|
|
747
747
|
}
|
|
748
|
-
|
|
748
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
749
|
+
if (options?.exclusive) {
|
|
750
|
+
await fs6.writeFile(filePath, data, { flag: "wx" });
|
|
751
|
+
} else {
|
|
752
|
+
await fs6.writeFile(filePath, data);
|
|
753
|
+
}
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
const handle = await fs6.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
757
|
+
try {
|
|
758
|
+
await handle.chmod(options.mode);
|
|
759
|
+
await handle.writeFile(data);
|
|
760
|
+
} finally {
|
|
761
|
+
await handle.close();
|
|
762
|
+
}
|
|
749
763
|
}
|
|
750
764
|
async appendFile(filePath, data) {
|
|
751
765
|
const dir = path2.dirname(filePath);
|
|
@@ -780,7 +794,8 @@ class NodeFileSystem {
|
|
|
780
794
|
isDirectory: () => stats.isDirectory(),
|
|
781
795
|
size: stats.size,
|
|
782
796
|
mtimeMs: stats.mtimeMs,
|
|
783
|
-
ctimeMs: stats.ctimeMs
|
|
797
|
+
ctimeMs: stats.ctimeMs,
|
|
798
|
+
mode: stats.mode
|
|
784
799
|
};
|
|
785
800
|
} catch (error) {
|
|
786
801
|
if (this.isEnoent(error))
|
|
@@ -791,8 +806,13 @@ class NodeFileSystem {
|
|
|
791
806
|
async exists(filePath) {
|
|
792
807
|
return existsSync(filePath);
|
|
793
808
|
}
|
|
794
|
-
async mkdir(dirPath) {
|
|
795
|
-
await fs6.mkdir(dirPath, { recursive: true });
|
|
809
|
+
async mkdir(dirPath, options) {
|
|
810
|
+
await fs6.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
811
|
+
}
|
|
812
|
+
async chmod(targetPath, mode) {
|
|
813
|
+
if (process.platform === "win32")
|
|
814
|
+
return;
|
|
815
|
+
await fs6.chmod(targetPath, mode);
|
|
796
816
|
}
|
|
797
817
|
async acquireLock(lockPath) {
|
|
798
818
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -12979,4 +12999,4 @@ export {
|
|
|
12979
12999
|
tracesFailure
|
|
12980
13000
|
};
|
|
12981
13001
|
|
|
12982
|
-
//# debugId=
|
|
13002
|
+
//# debugId=FD199778FA5D3C4464756E2164756E21
|
package/dist/studio-catalog.js
CHANGED
|
@@ -96,7 +96,7 @@ function settlePromiseLike(thenable) {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
// ../auth/src/constants.ts
|
|
99
|
-
var UIPATH_HOME_DIR = ".uipath", AUTH_FILENAME = ".auth", DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS;
|
|
99
|
+
var UIPATH_HOME_DIR = ".uipath", AUTH_FILENAME = ".auth", AUTH_FILE_MODE = 384, AUTH_DIR_MODE = 448, DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS;
|
|
100
100
|
var init_constants = __esm(() => {
|
|
101
101
|
DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
102
102
|
});
|
|
@@ -867,12 +867,26 @@ class NodeFileSystem {
|
|
|
867
867
|
throw error;
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
async writeFile(filePath, data) {
|
|
870
|
+
async writeFile(filePath, data, options) {
|
|
871
871
|
const dir = path2.dirname(filePath);
|
|
872
872
|
if (dir) {
|
|
873
873
|
await fs6.mkdir(dir, { recursive: true });
|
|
874
874
|
}
|
|
875
|
-
|
|
875
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
876
|
+
if (options?.exclusive) {
|
|
877
|
+
await fs6.writeFile(filePath, data, { flag: "wx" });
|
|
878
|
+
} else {
|
|
879
|
+
await fs6.writeFile(filePath, data);
|
|
880
|
+
}
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
const handle = await fs6.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
884
|
+
try {
|
|
885
|
+
await handle.chmod(options.mode);
|
|
886
|
+
await handle.writeFile(data);
|
|
887
|
+
} finally {
|
|
888
|
+
await handle.close();
|
|
889
|
+
}
|
|
876
890
|
}
|
|
877
891
|
async appendFile(filePath, data) {
|
|
878
892
|
const dir = path2.dirname(filePath);
|
|
@@ -907,7 +921,8 @@ class NodeFileSystem {
|
|
|
907
921
|
isDirectory: () => stats.isDirectory(),
|
|
908
922
|
size: stats.size,
|
|
909
923
|
mtimeMs: stats.mtimeMs,
|
|
910
|
-
ctimeMs: stats.ctimeMs
|
|
924
|
+
ctimeMs: stats.ctimeMs,
|
|
925
|
+
mode: stats.mode
|
|
911
926
|
};
|
|
912
927
|
} catch (error) {
|
|
913
928
|
if (this.isEnoent(error))
|
|
@@ -918,8 +933,13 @@ class NodeFileSystem {
|
|
|
918
933
|
async exists(filePath) {
|
|
919
934
|
return existsSync(filePath);
|
|
920
935
|
}
|
|
921
|
-
async mkdir(dirPath) {
|
|
922
|
-
await fs6.mkdir(dirPath, { recursive: true });
|
|
936
|
+
async mkdir(dirPath, options) {
|
|
937
|
+
await fs6.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
938
|
+
}
|
|
939
|
+
async chmod(targetPath, mode) {
|
|
940
|
+
if (process.platform === "win32")
|
|
941
|
+
return;
|
|
942
|
+
await fs6.chmod(targetPath, mode);
|
|
923
943
|
}
|
|
924
944
|
async acquireLock(lockPath) {
|
|
925
945
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -1816,6 +1836,34 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
1816
1836
|
throw new Error(`Environment file not found: ${envPath}`);
|
|
1817
1837
|
}
|
|
1818
1838
|
return parseEnvContent(content);
|
|
1839
|
+
}, findAuthHomeDir = (fs, dir) => {
|
|
1840
|
+
let current = dir;
|
|
1841
|
+
for (;; ) {
|
|
1842
|
+
if (fs.path.basename(current) === UIPATH_HOME_DIR)
|
|
1843
|
+
return current;
|
|
1844
|
+
const parent = fs.path.dirname(current);
|
|
1845
|
+
if (parent === current)
|
|
1846
|
+
return;
|
|
1847
|
+
current = parent;
|
|
1848
|
+
}
|
|
1849
|
+
}, TEMP_FILE_ATTEMPTS = 5, isFileExists = (error) => error instanceof Error && error.code === "EEXIST", writeTempFile = async (fs, targetPath, content) => {
|
|
1850
|
+
for (let attempt = 1;; attempt++) {
|
|
1851
|
+
const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
|
|
1852
|
+
try {
|
|
1853
|
+
await fs.writeFile(tempPath, content, {
|
|
1854
|
+
mode: AUTH_FILE_MODE,
|
|
1855
|
+
exclusive: true
|
|
1856
|
+
});
|
|
1857
|
+
return tempPath;
|
|
1858
|
+
} catch (error) {
|
|
1859
|
+
if (!isFileExists(error)) {
|
|
1860
|
+
await fs.rm(tempPath).catch(() => {});
|
|
1861
|
+
throw error;
|
|
1862
|
+
}
|
|
1863
|
+
if (attempt === TEMP_FILE_ATTEMPTS)
|
|
1864
|
+
throw error;
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1819
1867
|
}, saveEnvFileAsync = async ({
|
|
1820
1868
|
envPath,
|
|
1821
1869
|
data,
|
|
@@ -1843,10 +1891,18 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
1843
1891
|
`)}
|
|
1844
1892
|
`;
|
|
1845
1893
|
const dir = fs.path.dirname(absolutePath);
|
|
1846
|
-
await fs.mkdir(dir);
|
|
1847
|
-
const
|
|
1848
|
-
|
|
1849
|
-
|
|
1894
|
+
await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
|
|
1895
|
+
const authHomeDir = findAuthHomeDir(fs, dir);
|
|
1896
|
+
if (authHomeDir !== undefined) {
|
|
1897
|
+
await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
|
|
1898
|
+
}
|
|
1899
|
+
const tempPath = await writeTempFile(fs, absolutePath, content);
|
|
1900
|
+
try {
|
|
1901
|
+
await fs.rename(tempPath, absolutePath);
|
|
1902
|
+
} catch (error) {
|
|
1903
|
+
await fs.rm(tempPath).catch(() => {});
|
|
1904
|
+
throw error;
|
|
1905
|
+
}
|
|
1850
1906
|
};
|
|
1851
1907
|
var init_envFile = __esm(() => {
|
|
1852
1908
|
init_src();
|
|
@@ -14542,4 +14598,4 @@ export {
|
|
|
14542
14598
|
searchTriggers
|
|
14543
14599
|
};
|
|
14544
14600
|
|
|
14545
|
-
//# debugId=
|
|
14601
|
+
//# debugId=D926C7766CF7ACC064756E2164756E21
|
package/dist/with-pims-call.js
CHANGED
|
@@ -740,12 +740,26 @@ class NodeFileSystem {
|
|
|
740
740
|
throw error;
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
async writeFile(filePath, data) {
|
|
743
|
+
async writeFile(filePath, data, options) {
|
|
744
744
|
const dir = path2.dirname(filePath);
|
|
745
745
|
if (dir) {
|
|
746
746
|
await fs6.mkdir(dir, { recursive: true });
|
|
747
747
|
}
|
|
748
|
-
|
|
748
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
749
|
+
if (options?.exclusive) {
|
|
750
|
+
await fs6.writeFile(filePath, data, { flag: "wx" });
|
|
751
|
+
} else {
|
|
752
|
+
await fs6.writeFile(filePath, data);
|
|
753
|
+
}
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
const handle = await fs6.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
757
|
+
try {
|
|
758
|
+
await handle.chmod(options.mode);
|
|
759
|
+
await handle.writeFile(data);
|
|
760
|
+
} finally {
|
|
761
|
+
await handle.close();
|
|
762
|
+
}
|
|
749
763
|
}
|
|
750
764
|
async appendFile(filePath, data) {
|
|
751
765
|
const dir = path2.dirname(filePath);
|
|
@@ -780,7 +794,8 @@ class NodeFileSystem {
|
|
|
780
794
|
isDirectory: () => stats.isDirectory(),
|
|
781
795
|
size: stats.size,
|
|
782
796
|
mtimeMs: stats.mtimeMs,
|
|
783
|
-
ctimeMs: stats.ctimeMs
|
|
797
|
+
ctimeMs: stats.ctimeMs,
|
|
798
|
+
mode: stats.mode
|
|
784
799
|
};
|
|
785
800
|
} catch (error) {
|
|
786
801
|
if (this.isEnoent(error))
|
|
@@ -791,8 +806,13 @@ class NodeFileSystem {
|
|
|
791
806
|
async exists(filePath) {
|
|
792
807
|
return existsSync(filePath);
|
|
793
808
|
}
|
|
794
|
-
async mkdir(dirPath) {
|
|
795
|
-
await fs6.mkdir(dirPath, { recursive: true });
|
|
809
|
+
async mkdir(dirPath, options) {
|
|
810
|
+
await fs6.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
811
|
+
}
|
|
812
|
+
async chmod(targetPath, mode) {
|
|
813
|
+
if (process.platform === "win32")
|
|
814
|
+
return;
|
|
815
|
+
await fs6.chmod(targetPath, mode);
|
|
796
816
|
}
|
|
797
817
|
async acquireLock(lockPath) {
|
|
798
818
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -12926,7 +12946,7 @@ function settlePromiseLike2(thenable) {
|
|
|
12926
12946
|
}
|
|
12927
12947
|
|
|
12928
12948
|
// ../auth/src/constants.ts
|
|
12929
|
-
var UIPATH_HOME_DIR2 = ".uipath", AUTH_FILENAME = ".auth", DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS2;
|
|
12949
|
+
var UIPATH_HOME_DIR2 = ".uipath", AUTH_FILENAME = ".auth", AUTH_FILE_MODE = 384, AUTH_DIR_MODE = 448, DEFAULT_BASE_URL = "https://cloud.uipath.com", DEFAULT_AUTH_TIMEOUT_MS2;
|
|
12930
12950
|
var init_constants2 = __esm(() => {
|
|
12931
12951
|
DEFAULT_AUTH_TIMEOUT_MS2 = 5 * 60 * 1000;
|
|
12932
12952
|
});
|
|
@@ -13725,6 +13745,34 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
13725
13745
|
throw new Error(`Environment file not found: ${envPath}`);
|
|
13726
13746
|
}
|
|
13727
13747
|
return parseEnvContent(content);
|
|
13748
|
+
}, findAuthHomeDir = (fs, dir) => {
|
|
13749
|
+
let current = dir;
|
|
13750
|
+
for (;; ) {
|
|
13751
|
+
if (fs.path.basename(current) === UIPATH_HOME_DIR2)
|
|
13752
|
+
return current;
|
|
13753
|
+
const parent = fs.path.dirname(current);
|
|
13754
|
+
if (parent === current)
|
|
13755
|
+
return;
|
|
13756
|
+
current = parent;
|
|
13757
|
+
}
|
|
13758
|
+
}, TEMP_FILE_ATTEMPTS = 5, isFileExists = (error) => error instanceof Error && error.code === "EEXIST", writeTempFile = async (fs, targetPath, content) => {
|
|
13759
|
+
for (let attempt = 1;; attempt++) {
|
|
13760
|
+
const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
|
|
13761
|
+
try {
|
|
13762
|
+
await fs.writeFile(tempPath, content, {
|
|
13763
|
+
mode: AUTH_FILE_MODE,
|
|
13764
|
+
exclusive: true
|
|
13765
|
+
});
|
|
13766
|
+
return tempPath;
|
|
13767
|
+
} catch (error) {
|
|
13768
|
+
if (!isFileExists(error)) {
|
|
13769
|
+
await fs.rm(tempPath).catch(() => {});
|
|
13770
|
+
throw error;
|
|
13771
|
+
}
|
|
13772
|
+
if (attempt === TEMP_FILE_ATTEMPTS)
|
|
13773
|
+
throw error;
|
|
13774
|
+
}
|
|
13775
|
+
}
|
|
13728
13776
|
}, saveEnvFileAsync = async ({
|
|
13729
13777
|
envPath,
|
|
13730
13778
|
data,
|
|
@@ -13752,10 +13800,18 @@ var DEFAULT_ENV_FILENAME, KNOWN_ERROR_CODES, errorCode = (err) => {
|
|
|
13752
13800
|
`)}
|
|
13753
13801
|
`;
|
|
13754
13802
|
const dir = fs.path.dirname(absolutePath);
|
|
13755
|
-
await fs.mkdir(dir);
|
|
13756
|
-
const
|
|
13757
|
-
|
|
13758
|
-
|
|
13803
|
+
await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
|
|
13804
|
+
const authHomeDir = findAuthHomeDir(fs, dir);
|
|
13805
|
+
if (authHomeDir !== undefined) {
|
|
13806
|
+
await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
|
|
13807
|
+
}
|
|
13808
|
+
const tempPath = await writeTempFile(fs, absolutePath, content);
|
|
13809
|
+
try {
|
|
13810
|
+
await fs.rename(tempPath, absolutePath);
|
|
13811
|
+
} catch (error) {
|
|
13812
|
+
await fs.rm(tempPath).catch(() => {});
|
|
13813
|
+
throw error;
|
|
13814
|
+
}
|
|
13759
13815
|
};
|
|
13760
13816
|
var init_envFile = __esm(() => {
|
|
13761
13817
|
init_src();
|
|
@@ -14763,4 +14819,4 @@ export {
|
|
|
14763
14819
|
withPimsCall
|
|
14764
14820
|
};
|
|
14765
14821
|
|
|
14766
|
-
//# debugId=
|
|
14822
|
+
//# debugId=9CBA8DE266E8C4E364756E2164756E21
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/maestro-sdk",
|
|
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": "SDK for the UiPath Maestro (PIMS) API — process instance management.",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"files": [
|
|
114
114
|
"dist"
|
|
115
115
|
],
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "a752d8a8d78de138e3be0a19642620fec7893d99"
|
|
117
117
|
}
|