@uipath/solution-tool 1.206.0-preview.306 → 1.207.0-preview.307
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/THIRD-PARTY-NOTICES.md +4 -4
- package/dist/{archive-extract-ma0gy822.js → archive-extract-afgwacbg.js} +3 -3
- package/dist/{cleanup-command-service-abtxpefz.js → cleanup-command-service-0j6qxj96.js} +20 -15
- package/dist/deploy-delete-service-ghyetrvj.js +23 -0
- package/dist/deploy-run-service-sz77fpsz.js +24 -0
- package/dist/{deploy-status-service-k1gycn13.js → deploy-status-service-aj4m61hg.js} +49 -25
- package/dist/deploy.js +21 -20
- package/dist/{deployment-search-bjdwqh5w.js → deployment-search-mkvzgeq4.js} +9 -9
- package/dist/{embedded-file-reader-pxpwcq3n.js → embedded-file-reader-k94wt612.js} +16 -16
- package/dist/feed-resolver-yj94m9j1.js +31 -0
- package/dist/feed-scope-failure-7abh61sj.js +20 -0
- package/dist/{feed-session-ytew8k2j.js → feed-session-z8t87r5w.js} +6 -6
- package/dist/{first-party-service-6gf3n6d8.js → first-party-service-bmtxd7wx.js} +1 -1
- package/dist/folder-runtime-check-8nf63er2.js +25 -0
- package/dist/{governance-options-40m81z8h.js → governance-options-ft8bqz4p.js} +7 -7
- package/dist/{packager-tool-v3ze7wmr.js → index-6ma58k47.js} +33 -708
- package/dist/{index-yjvmjpdn.js → index-j3tpb2cr.js} +12 -11
- package/dist/{index-p3x7ztdr.js → index-jy1760qy.js} +1 -1
- package/dist/{index-2bn3jzn9.js → index-nbs04tqr.js} +9 -7
- package/dist/index.js +26 -26
- package/dist/init.js +10 -10
- package/dist/{list-0k8c4rt6.js → list-3a1tdrgm.js} +11 -11
- package/dist/models/pack-command-types.d.ts +12 -0
- package/dist/{node-6ay6nbnq.js → node-83xy0gm0.js} +6 -6
- package/dist/pack-command-service-42p3t8xa.js +32 -0
- package/dist/{pack-project-2g2ncn2k.js → pack-project-w514zr5v.js} +21 -18
- package/dist/pack.js +25 -22
- package/dist/{package-id-56k44s7y.js → package-id-2dgfbh5h.js} +3 -3
- package/dist/{packager-tool-2zn98p5r.js → packager-tool-0gyqtxvs.js} +4 -4
- package/dist/{packager-tool-vgrswa8p.js → packager-tool-1db1wqdy.js} +30 -8
- package/dist/{packager-tool-vx2c68sb.js → packager-tool-1dsxhz1r.js} +2 -2
- package/dist/{packager-tool-xxf8f4v2.js → packager-tool-2syv199e.js} +9 -5
- package/dist/packager-tool-3ft8hywr.js +449 -0
- package/dist/{packager-tool-829w06ns.js → packager-tool-3qach0s4.js} +14 -8
- package/dist/{packager-tool-bkmwknfn.js → packager-tool-4f1k64fh.js} +8 -74
- package/dist/{packager-tool-7v03ncmv.js → packager-tool-70ag56bf.js} +49 -24
- package/dist/{packager-tool-5e4gps62.js → packager-tool-71sz9598.js} +20 -8
- package/dist/{packager-tool-23g7kn35.js → packager-tool-7j920ac5.js} +18 -11
- package/dist/packager-tool-7s842xrq.js +140 -0
- package/dist/{packager-tool-s8q14fth.js → packager-tool-849ch2tq.js} +4 -6
- package/dist/{packager-tool-aws5w512.js → packager-tool-887bkh9y.js} +1 -1
- package/dist/{packager-tool-f5pzh184.js → packager-tool-a566400t.js} +26 -10
- package/dist/packager-tool-a813na66.js +75 -0
- package/dist/{packager-tool-c8x0tpe4.js → packager-tool-af8n6rqz.js} +85 -30
- package/dist/{packager-tool-y1304xzm.js → packager-tool-bpdyy6vs.js} +530 -204
- package/dist/{packager-tool-fx4ws49n.js → packager-tool-cenfraf4.js} +2 -2
- package/dist/{packager-tool-0z4aq300.js → packager-tool-cwqy5rb5.js} +119 -52
- package/dist/{packager-tool-a7s0gbxs.js → packager-tool-devc4w73.js} +7 -2
- package/dist/{packager-tool-pqk9v4h7.js → packager-tool-fbajevvm.js} +52 -15
- package/dist/{packager-tool-r0ha8c95.js → packager-tool-fz96p75n.js} +3 -3
- package/dist/{packager-tool-m07vyk89.js → packager-tool-gb3dq79g.js} +36 -9
- package/dist/{packager-tool-h8tksb5s.js → packager-tool-gns0nxbt.js} +28 -9
- package/dist/{packager-tool-wjvks6st.js → packager-tool-h8wam8pt.js} +15 -6
- package/dist/{packager-tool-z4cbca95.js → packager-tool-hczpvrc1.js} +6 -6
- package/dist/{packager-tool-t39pjz7n.js → packager-tool-jtvhkavz.js} +48 -6
- package/dist/{packager-tool-p5322gew.js → packager-tool-kmwjscby.js} +88 -10
- package/dist/{packager-tool-ppj5f4y7.js → packager-tool-n1zrk6zv.js} +4 -2
- package/dist/{packager-tool-2qsbh4kd.js → packager-tool-ncgpx1ce.js} +50 -12
- package/dist/{packager-tool-f15an17m.js → packager-tool-p1xfsv6c.js} +92 -4
- package/dist/{packager-tool-egc54x78.js → packager-tool-qhht1tc9.js} +2408 -771
- package/dist/packager-tool-r7fmsz2t.js +741 -0
- package/dist/{packager-tool-resolver-30hxk8vm.js → packager-tool-resolver-mynfj0rt.js} +6 -6
- package/dist/{packager-tool-ay4j9x92.js → packager-tool-s9tyw75r.js} +19 -8
- package/dist/{packager-tool-ckrt4gyr.js → packager-tool-t9zked1m.js} +3 -3
- package/dist/{packager-tool-1ctvbx0h.js → packager-tool-tr3ttz5c.js} +1 -1
- package/dist/{packager-tool-chff74yz.js → packager-tool-tt9v40x6.js} +3010 -846
- package/dist/{packager-tool-k9dk39tg.js → packager-tool-txygqgb2.js} +3 -3
- package/dist/packager-tool-v6jcys3s.js +46 -0
- package/dist/packager-tool-w0tmr9xe.js +279 -0
- package/dist/packager-tool-w35s60sx.js +179 -0
- package/dist/{packager-tool-axqk17xw.js → packager-tool-xbfr6y2x.js} +142 -34
- package/dist/{packager-tool-m5mwc6by.js → packager-tool-zsv8208n.js} +22 -18
- package/dist/{packager-tool-vrw36pdb.js → packager-tool-ztxsccjk.js} +140 -10
- package/dist/packager-tool.js +2 -2
- package/dist/prepare-solution-resources-g9y01pgd.js +26 -0
- package/dist/{project-command-utils-82tja3k0.js → project-command-utils-yxrgwzf9.js} +20 -13
- package/dist/project-contributions-c8v3bwjr.js +31 -0
- package/dist/project-identity-telemetry-yxdhswyq.js +18 -0
- package/dist/publish.js +14 -14
- package/dist/{resource-mutations-h6wfdqr4.js → resource-mutations-dn4f8xr1.js} +9 -9
- package/dist/{resource-version-lookup-xzgnvr48.js → resource-version-lookup-mksxc1dc.js} +9 -9
- package/dist/resource.js +9 -9
- package/dist/{restore-command-service-bqs7r9y3.js → restore-command-service-ztbt2ejp.js} +20 -15
- package/dist/run-service-r52wgf69.js +1056 -0
- package/dist/services/deploy-activate-service.d.ts +5 -2
- package/dist/services/deploy-config-file.d.ts +24 -0
- package/dist/services/deploy-delete-service.d.ts +1 -1
- package/dist/services/deploy-run-service.d.ts +8 -1
- package/dist/services/deploy-uninstall-service.d.ts +4 -2
- package/dist/services/deploy-upgrade-service.d.ts +23 -2
- package/dist/services/deployment-feed-locator.d.ts +19 -6
- package/dist/services/deployment-links.d.ts +16 -0
- package/dist/services/deployment-progress.d.ts +10 -0
- package/dist/services/deployment-search.d.ts +15 -2
- package/dist/services/deployment-state.d.ts +9 -0
- package/dist/services/feed-resolver.d.ts +17 -0
- package/dist/services/feed-selection.d.ts +59 -0
- package/dist/services/folder-runtime-check.d.ts +107 -0
- package/dist/services/incomplete-feed-sweep.d.ts +6 -0
- package/dist/services/pack-command-service.d.ts +6 -0
- package/dist/services/pack-project.d.ts +1 -1
- package/dist/services/package-metadata-rewrite.d.ts +13 -0
- package/dist/services/personal-workspace-resolver.d.ts +4 -1
- package/dist/services/prepare-solution-resources.d.ts +11 -6
- package/dist/services/project-contributions.d.ts +26 -2
- package/dist/services/project-identity-telemetry.d.ts +31 -0
- package/dist/services/solution-members.d.ts +31 -0
- package/dist/{ship-telemetry-19gx83af.js → ship-telemetry-9djqndmy.js} +4 -4
- package/dist/{solution-auth-jxcgd2m0.js → solution-auth-0e3qm74f.js} +3 -3
- package/dist/{solution-definition-helper-tqwd6cxn.js → solution-definition-helper-dreejga4.js} +1 -1
- package/dist/{solution-identity-c23d9bfv.js → solution-identity-j63p6n81.js} +4 -4
- package/dist/templates/AGENTS.md +131 -24
- package/dist/tool.js +26 -26
- package/package.json +2 -2
- package/dist/deploy-delete-service-as1jfycj.js +0 -23
- package/dist/deploy-run-service-gs1xv1y1.js +0 -23
- package/dist/feed-resolver-x0kt3yrw.js +0 -27
- package/dist/feed-scope-failure-9p8w0j1v.js +0 -20
- package/dist/pack-command-service-jzbch4eb.js +0 -29
- package/dist/packager-tool-qpryf1x2.js +0 -74
- package/dist/packager-tool-vrqbbh01.js +0 -182
- package/dist/prepare-solution-resources-h7zvnncd.js +0 -26
- package/dist/project-contributions-xx560n8y.js +0 -27
- package/dist/run-service-ekbx2jdg.js +0 -506
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catchError,
|
|
3
|
+
RESULTS,
|
|
3
4
|
addSdkUserAgentHeader
|
|
4
|
-
} from "./packager-tool-
|
|
5
|
+
} from "./packager-tool-gb3dq79g.js";
|
|
5
6
|
import {
|
|
6
7
|
ResponseError,
|
|
7
8
|
SDK_USER_AGENT
|
|
8
|
-
} from "./packager-tool-
|
|
9
|
+
} from "./packager-tool-2syv199e.js";
|
|
9
10
|
import {
|
|
10
11
|
redactTokens,
|
|
11
12
|
parseAuthChallenge,
|
|
12
|
-
RESULTS,
|
|
13
13
|
summarizePlatformBody,
|
|
14
14
|
logger
|
|
15
|
-
} from "./packager-tool-
|
|
15
|
+
} from "./packager-tool-xbfr6y2x.js";
|
|
16
16
|
import {
|
|
17
17
|
zipSync2
|
|
18
18
|
} from "./packager-tool-rj2d1g0w.js";
|
|
19
19
|
import {
|
|
20
|
-
readUipxFile
|
|
21
|
-
|
|
20
|
+
readUipxFile,
|
|
21
|
+
hasUnsafeNameChars
|
|
22
|
+
} from "./packager-tool-kmwjscby.js";
|
|
22
23
|
import {
|
|
23
24
|
__toESM,
|
|
24
25
|
__commonJS
|
|
@@ -1637,6 +1638,24 @@ function assertStudioWebCompatibleProjects(projects) {
|
|
|
1637
1638
|
throw new StudioWebIncompatibleProjectError2(incompatible.map((p) => p.ProjectRelativePath));
|
|
1638
1639
|
}
|
|
1639
1640
|
}
|
|
1641
|
+
var MAX_NAMED_PATHS = 20;
|
|
1642
|
+
|
|
1643
|
+
class StudioWebInvalidFileNameError2 extends Error {
|
|
1644
|
+
offendingPaths;
|
|
1645
|
+
constructor(offendingPaths) {
|
|
1646
|
+
const named = offendingPaths.slice(0, MAX_NAMED_PATHS).join(", ");
|
|
1647
|
+
const more = offendingPaths.length - MAX_NAMED_PATHS;
|
|
1648
|
+
super(`Studio Web cannot import a project file whose name holds a control character or any of : * ? " < > |: ${named}${more > 0 ? `, and ${more} more` : ""}.`);
|
|
1649
|
+
this.offendingPaths = offendingPaths;
|
|
1650
|
+
this.name = "StudioWebInvalidFileNameError";
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
function assertStudioWebValidFileNames(projectFilePaths) {
|
|
1654
|
+
const invalid = projectFilePaths.filter((p) => hasUnsafeNameChars(p.replace(/\\/g, "/").split("/").pop() ?? ""));
|
|
1655
|
+
if (invalid.length > 0) {
|
|
1656
|
+
throw new StudioWebInvalidFileNameError2(invalid);
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1640
1659
|
|
|
1641
1660
|
// ../solution-sdk/src/zip-utils.ts
|
|
1642
1661
|
var import_ignore = __toESM(require_ignore(), 1);
|
|
@@ -1857,14 +1876,16 @@ async function mirrorTree(fs, srcDir, relativeBase, destBaseDir, ignoreRules) {
|
|
|
1857
1876
|
if (rootRel) {
|
|
1858
1877
|
await fs.mkdir(fs.path.join(destBaseDir, rootRel));
|
|
1859
1878
|
}
|
|
1860
|
-
return;
|
|
1879
|
+
return [];
|
|
1861
1880
|
}
|
|
1881
|
+
const copied = [];
|
|
1862
1882
|
for (const f of files) {
|
|
1863
1883
|
const relPath = fs.path.relative(relativeBase, f);
|
|
1864
1884
|
const destPath = fs.path.join(destBaseDir, relPath);
|
|
1865
1885
|
const data = await fs.readFile(f);
|
|
1866
1886
|
if (data) {
|
|
1867
1887
|
await fs.writeFile(destPath, data);
|
|
1888
|
+
copied.push(f);
|
|
1868
1889
|
} else {
|
|
1869
1890
|
logger.warn(`Skipping empty or unreadable file: ${f}`);
|
|
1870
1891
|
}
|
|
@@ -1876,9 +1897,11 @@ async function mirrorTree(fs, srcDir, relativeBase, destBaseDir, ignoreRules) {
|
|
|
1876
1897
|
}
|
|
1877
1898
|
await fs.mkdir(fs.path.join(destBaseDir, relPath));
|
|
1878
1899
|
}
|
|
1900
|
+
return copied;
|
|
1879
1901
|
}
|
|
1880
1902
|
async function flattenProjectDir(fs, srcProjectDir, destProjectDir, ignoreRules) {
|
|
1881
1903
|
await fs.mkdir(destProjectDir);
|
|
1904
|
+
const copied = [];
|
|
1882
1905
|
const entries = await fs.readdir(srcProjectDir);
|
|
1883
1906
|
for (const entryName of entries) {
|
|
1884
1907
|
const srcPath = fs.path.join(srcProjectDir, entryName);
|
|
@@ -1893,18 +1916,20 @@ async function flattenProjectDir(fs, srcProjectDir, destProjectDir, ignoreRules)
|
|
|
1893
1916
|
const data = await fs.readFile(srcPath);
|
|
1894
1917
|
if (data) {
|
|
1895
1918
|
await fs.writeFile(fs.path.join(destProjectDir, entryName), data);
|
|
1919
|
+
copied.push(srcPath);
|
|
1896
1920
|
}
|
|
1897
1921
|
} else if (entryStat.isDirectory()) {
|
|
1898
1922
|
if (DEFAULT_EXCLUDED_DIR_NAMES.has(entryName) || isIgnoredByRules(fs, ignoreRules, srcPath, true)) {
|
|
1899
1923
|
continue;
|
|
1900
1924
|
}
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1925
|
+
const relativeBase = entryName === "content" || entryName === "flow_files" ? srcPath : srcProjectDir;
|
|
1926
|
+
const mirrored = await mirrorTree(fs, srcPath, relativeBase, destProjectDir, ignoreRules);
|
|
1927
|
+
for (const f of mirrored) {
|
|
1928
|
+
copied.push(f);
|
|
1905
1929
|
}
|
|
1906
1930
|
}
|
|
1907
1931
|
}
|
|
1932
|
+
return copied;
|
|
1908
1933
|
}
|
|
1909
1934
|
async function bundleSolution2(fs, solutionDir, outputDir, outputName) {
|
|
1910
1935
|
const resolvedPath = fs.path.resolve(solutionDir);
|
|
@@ -1939,6 +1964,7 @@ async function bundleSolution2(fs, solutionDir, outputDir, outputName) {
|
|
|
1939
1964
|
try {
|
|
1940
1965
|
await fs.writeFile(fs.path.join(stagingDir, "SolutionStorage.json"), JSON.stringify(solutionStorage));
|
|
1941
1966
|
await fs.writeFile(fs.path.join(stagingDir, uipxFileName), JSON.stringify(uipx));
|
|
1967
|
+
const projectFiles = [];
|
|
1942
1968
|
for (const project of uipx.Projects) {
|
|
1943
1969
|
const projectDir = fs.path.dirname(project.ProjectRelativePath);
|
|
1944
1970
|
const srcProjectPath = fs.path.join(resolvedPath, projectDir);
|
|
@@ -1951,8 +1977,12 @@ async function bundleSolution2(fs, solutionDir, outputDir, outputName) {
|
|
|
1951
1977
|
if (isIgnoredByRules(fs, projectRules, manifestPath, false)) {
|
|
1952
1978
|
throw new UipignoreExcludesProjectError2(project.ProjectRelativePath);
|
|
1953
1979
|
}
|
|
1954
|
-
await flattenProjectDir(fs, srcProjectPath, fs.path.join(stagingDir, projectDir), projectRules);
|
|
1980
|
+
const copied = await flattenProjectDir(fs, srcProjectPath, fs.path.join(stagingDir, projectDir), projectRules);
|
|
1981
|
+
for (const f of copied) {
|
|
1982
|
+
projectFiles.push(toForwardSlash(fs.path.relative(resolvedPath, f)));
|
|
1983
|
+
}
|
|
1955
1984
|
}
|
|
1985
|
+
assertStudioWebValidFileNames(projectFiles);
|
|
1956
1986
|
const resourcesPath = fs.path.join(resolvedPath, "resources");
|
|
1957
1987
|
if (!isTopLevelTreeExcluded(resourcesPath, "resources") && await fs.exists(resourcesPath)) {
|
|
1958
1988
|
await mirrorTree(fs, resourcesPath, resolvedPath, stagingDir, solutionRules);
|
|
@@ -2130,6 +2160,7 @@ function buildAuthRefusalInstructions({
|
|
|
2130
2160
|
const closing = bodySuffix ? `If the grants and the tenant are already right, report the platform ` + `response, including its traceId.${bodySuffix}` : challenge.error ? `If the grants and the tenant are already right, report that reason ` + `together with the request path and status above.` : `If the grants and the tenant are already right, report the request ` + `path and status above — Studio Web returned no response body and ` + `no authentication challenge, so there is nothing further to quote.`;
|
|
2131
2161
|
return `Studio Web ${refusal} while ${what}. ${diagnosis}${actor}${tenant}` + `Nothing was uploaded and nothing ran, so the ${subject} is not the ` + `cause. ${closing}`;
|
|
2132
2162
|
}
|
|
2163
|
+
var INVALID_FILE_NAME_ERROR_CODE = "20039";
|
|
2133
2164
|
function buildSolutionUploadFailureOutput2(err, options = {}) {
|
|
2134
2165
|
const stage = err.operation === "overwrite" ? "overwrite-solution" : "import-solution";
|
|
2135
2166
|
const authRefusal = isAuthRefusal(err.status);
|
|
@@ -2150,7 +2181,8 @@ function buildSolutionUploadFailureOutput2(err, options = {}) {
|
|
|
2150
2181
|
identityType: options.identityType,
|
|
2151
2182
|
clientId: options.clientId
|
|
2152
2183
|
}) : undefined;
|
|
2153
|
-
const
|
|
2184
|
+
const invalidFileName = err.parsedErrorCode === INVALID_FILE_NAME_ERROR_CODE;
|
|
2185
|
+
const Instructions = authInstructions ?? (invalidFileName ? `Studio Web refused a file name in the uploaded solution ` + `package: a file inside a project folder has a name holding a ` + `control character or one of : * ? " < > |, and the platform ` + `does not say which file. Rename that file, or move it out ` + `of the project folder, and upload again. Retrying ` + `unchanged fails the same way.${bodySuffix}` : err.operation === "overwrite" ? `Studio Web refused to replace the contents of solution ` + `${target}. Nothing was uploaded and nothing ran, so the ` + `${subject} is not the cause: do not re-author it, and do not ` + `copy the project into another solution. Confirm that ${target} ` + `is a solution you can still write to, and that it is the one ` + `this project should publish to — it comes from the SolutionId ` + `recorded in the enclosing solution file. If it is right, report ` + `the platform response.${bodySuffix}` : `Studio Web refused to import the solution package. Nothing was ` + `uploaded and nothing ran, so no part of the ${subject} executed ` + `— but the package itself may be what was rejected.${importHint} ` + `Report the platform response if the ${subject} is ` + `well-formed.${bodySuffix}`);
|
|
2154
2186
|
const Context = {
|
|
2155
2187
|
httpStatus: err.status,
|
|
2156
2188
|
stage,
|
|
@@ -2169,6 +2201,11 @@ function buildSolutionUploadFailureOutput2(err, options = {}) {
|
|
|
2169
2201
|
if (err.status === 401 && options.identityType === "Application") {
|
|
2170
2202
|
output.ErrorCode = "permission_denied";
|
|
2171
2203
|
}
|
|
2204
|
+
if (invalidFileName) {
|
|
2205
|
+
output.ErrorCode = "invalid_argument";
|
|
2206
|
+
output.Retry = "RetryWillNotFix";
|
|
2207
|
+
return output;
|
|
2208
|
+
}
|
|
2172
2209
|
if (err.operation === "overwrite" && err.status >= 500 && err.status < 600) {
|
|
2173
2210
|
output.Retry = "RetryAfter30Seconds";
|
|
2174
2211
|
}
|
|
@@ -2288,6 +2325,6 @@ async function overwriteSolution2(config, organizationName, fileBuffer, fileName
|
|
|
2288
2325
|
}
|
|
2289
2326
|
return await response.json();
|
|
2290
2327
|
}
|
|
2291
|
-
export { getAvailablePublishLocationsV22, StudioWebIncompatibleProjectError2, UipignoreExcludesProjectError2, bundleSolution2, isDebugProvisioningTerminal2, isDebugProvisioningSucceeded2, getProjectDebugStatus2, getStudioWebSolutionProjects2, listStudioWebSolutions2, isSolutionUploadHttpError2, buildSolutionUploadFailureOutput2, solutionExistsOnStudioWeb2, importSolution2, overwriteSolution2 };
|
|
2328
|
+
export { getAvailablePublishLocationsV22, StudioWebIncompatibleProjectError2, StudioWebInvalidFileNameError2, UipignoreExcludesProjectError2, bundleSolution2, isDebugProvisioningTerminal2, isDebugProvisioningSucceeded2, getProjectDebugStatus2, getStudioWebSolutionProjects2, listStudioWebSolutions2, isSolutionUploadHttpError2, buildSolutionUploadFailureOutput2, solutionExistsOnStudioWeb2, importSolution2, overwriteSolution2 };
|
|
2292
2329
|
|
|
2293
|
-
//# debugId=
|
|
2330
|
+
//# debugId=9EDD6B0BB2F87F8864756E2164756E21
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
catchError,
|
|
3
3
|
carriedErrorCode,
|
|
4
4
|
carriedInstructions
|
|
5
|
-
} from "./packager-tool-
|
|
5
|
+
} from "./packager-tool-gb3dq79g.js";
|
|
6
6
|
import {
|
|
7
7
|
isUnpackableProjectTypeError2
|
|
8
|
-
} from "./packager-tool-
|
|
8
|
+
} from "./packager-tool-0gyqtxvs.js";
|
|
9
9
|
import {
|
|
10
10
|
PackCommandService2
|
|
11
|
-
} from "./packager-tool-
|
|
11
|
+
} from "./packager-tool-70ag56bf.js";
|
|
12
12
|
|
|
13
13
|
// src/services/pack-service.ts
|
|
14
14
|
async function packSolutionAsync2(solutionPath, options) {
|
|
@@ -44,13 +44,15 @@ var ProjectDimensions = {
|
|
|
44
44
|
SolutionKey: "SolutionKey",
|
|
45
45
|
SolutionProjectKey: "SolutionProjectKey",
|
|
46
46
|
SolutionIdentityStatus: "SolutionIdentityStatus",
|
|
47
|
-
PreviousSolutionKey: "PreviousSolutionKey"
|
|
47
|
+
PreviousSolutionKey: "PreviousSolutionKey",
|
|
48
|
+
PreviousProjectKey: "PreviousProjectKey"
|
|
48
49
|
};
|
|
49
50
|
var GUID_KEY_DIMENSIONS = new Set([
|
|
50
51
|
ProjectDimensions.ProjectKey,
|
|
51
52
|
ProjectDimensions.SolutionKey,
|
|
52
53
|
ProjectDimensions.SolutionProjectKey,
|
|
53
|
-
ProjectDimensions.PreviousSolutionKey
|
|
54
|
+
ProjectDimensions.PreviousSolutionKey,
|
|
55
|
+
ProjectDimensions.PreviousProjectKey
|
|
54
56
|
]);
|
|
55
57
|
var ShipDimensions = {
|
|
56
58
|
ShipKind: "ShipKind",
|
|
@@ -213,9 +215,7 @@ async function withinProjectIdentityBudget(work, onTimeout) {
|
|
|
213
215
|
}
|
|
214
216
|
}
|
|
215
217
|
|
|
216
|
-
// ../common/src/
|
|
217
|
-
var PSEUDONYM_DOMAIN = "uipath-cli/telemetry/pseudonym/v1:";
|
|
218
|
-
var PSEUDONYM_HEX_LENGTH = 32;
|
|
218
|
+
// ../common/src/sha256.ts
|
|
219
219
|
var SHA256_K = new Uint32Array([
|
|
220
220
|
1116352408,
|
|
221
221
|
1899447441,
|
|
@@ -295,7 +295,7 @@ var SHA256_INITIAL_STATE = new Uint32Array([
|
|
|
295
295
|
function rotr(value, bits) {
|
|
296
296
|
return (value >>> bits | value << 32 - bits) >>> 0;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function sha256Words(input) {
|
|
299
299
|
const bytes = new TextEncoder().encode(input);
|
|
300
300
|
const paddedLength = bytes.length + 9 + 63 >> 6 << 6;
|
|
301
301
|
const buffer = new Uint8Array(paddedLength);
|
|
@@ -351,12 +351,19 @@ function sha256Hex(input) {
|
|
|
351
351
|
state[6] = state[6] + g >>> 0;
|
|
352
352
|
state[7] = state[7] + h >>> 0;
|
|
353
353
|
}
|
|
354
|
+
return state;
|
|
355
|
+
}
|
|
356
|
+
function sha256Hex(input) {
|
|
354
357
|
let hex = "";
|
|
355
|
-
for (const word of
|
|
358
|
+
for (const word of sha256Words(input)) {
|
|
356
359
|
hex += word.toString(16).padStart(8, "0");
|
|
357
360
|
}
|
|
358
361
|
return hex;
|
|
359
362
|
}
|
|
363
|
+
|
|
364
|
+
// ../common/src/telemetry/pseudonymize.ts
|
|
365
|
+
var PSEUDONYM_DOMAIN = "uipath-cli/telemetry/pseudonym/v1:";
|
|
366
|
+
var PSEUDONYM_HEX_LENGTH = 32;
|
|
360
367
|
function resolveSha256Hex() {
|
|
361
368
|
try {
|
|
362
369
|
const nodeCrypto = __require("node:crypto");
|
|
@@ -752,13 +759,25 @@ function settlePromiseLike(thenable) {
|
|
|
752
759
|
return Promise.resolve(thenable).then((data) => [undefined, data]).catch((error) => [toError(error), undefined]);
|
|
753
760
|
}
|
|
754
761
|
|
|
762
|
+
// ../common/src/result-types.ts
|
|
763
|
+
var RESULTS = {
|
|
764
|
+
Success: "Success",
|
|
765
|
+
Failure: "Failure",
|
|
766
|
+
ConfigError: "ConfigError",
|
|
767
|
+
AuthenticationError: "AuthenticationError",
|
|
768
|
+
ValidationError: "ValidationError",
|
|
769
|
+
TimeoutError: "TimeoutError"
|
|
770
|
+
};
|
|
771
|
+
|
|
755
772
|
// ../common/src/error-codes.ts
|
|
756
773
|
var CLI_ERROR_CODES = [
|
|
757
774
|
"invalid_argument",
|
|
775
|
+
"confirmation_required",
|
|
758
776
|
"authentication_required",
|
|
759
777
|
"permission_denied",
|
|
760
778
|
"local_permission_denied",
|
|
761
779
|
"not_found",
|
|
780
|
+
"not_enabled",
|
|
762
781
|
"rate_limited",
|
|
763
782
|
"network_error",
|
|
764
783
|
"timeout",
|
|
@@ -797,6 +816,12 @@ function carriedRetry(error) {
|
|
|
797
816
|
const retry = error.retry;
|
|
798
817
|
return isRetryHint(retry) ? retry : undefined;
|
|
799
818
|
}
|
|
819
|
+
function carriedResult(error) {
|
|
820
|
+
if (!error || typeof error !== "object")
|
|
821
|
+
return;
|
|
822
|
+
const result = error.result;
|
|
823
|
+
return typeof result === "string" && result !== RESULTS.Success && Object.values(RESULTS).includes(result) ? result : undefined;
|
|
824
|
+
}
|
|
800
825
|
function defaultRetryForErrorCode(errorCode) {
|
|
801
826
|
switch (errorCode) {
|
|
802
827
|
case "network_error":
|
|
@@ -1204,6 +1229,8 @@ async function extractErrorDetails(error, options) {
|
|
|
1204
1229
|
}
|
|
1205
1230
|
if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
|
|
1206
1231
|
context.errorCode = parsedBody.errorCode;
|
|
1232
|
+
} else if (typeof parsedBody?.errorCode === "number") {
|
|
1233
|
+
context.errorCode = String(parsedBody.errorCode);
|
|
1207
1234
|
} else if (parsedBody?.code && typeof parsedBody.code === "string") {
|
|
1208
1235
|
context.errorCode = parsedBody.code;
|
|
1209
1236
|
}
|
|
@@ -1954,6 +1981,6 @@ function installSdkUserAgentHeader(BaseApiClass, userAgent) {
|
|
|
1954
1981
|
// ../common/src/telemetry/environment-info.ts
|
|
1955
1982
|
var LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
|
|
1956
1983
|
|
|
1957
|
-
export { CommandDimensions, ProjectDimensions, GUID_KEY_DIMENSIONS, ShipDimensions, ErrorDimensions, PackagerDimensions, solutionIdentityProperties, projectKey, projectIdentityProperties, PROJECT_IDENTITY_LOOKUP_BUDGET_MS, withinProjectIdentityBudget, pseudonymize, singleton, recordSuppliedArgumentValues, releaseSuppliedArgumentValues, redactProperties, catchError, isCliErrorCode, isRetryHint, carriedErrorCode, carriedRetry, defaultRetryForErrorCode, walkErrorGraph, parseHttpStatusFromMessage, findHttpStatusInGraph, httpStatusOf2, classifyHttpStatus, LOCAL_PERMISSION_ERROR_CODES, carriedInstructions, describeConnectivityError, describePermissionError, classifyThrownError, extractErrorDetails, extractErrorMessage, TelemetryService, isProjectTelemetryDisabled, buildCommandTelemetryAttribution, buildAgentSessionTelemetry, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader };
|
|
1984
|
+
export { CommandDimensions, ProjectDimensions, GUID_KEY_DIMENSIONS, ShipDimensions, ErrorDimensions, PackagerDimensions, solutionIdentityProperties, projectKey, projectIdentityProperties, PROJECT_IDENTITY_LOOKUP_BUDGET_MS, withinProjectIdentityBudget, pseudonymize, singleton, recordSuppliedArgumentValues, releaseSuppliedArgumentValues, redactProperties, catchError, RESULTS, isCliErrorCode, isRetryHint, carriedErrorCode, carriedRetry, carriedResult, defaultRetryForErrorCode, walkErrorGraph, parseHttpStatusFromMessage, findHttpStatusInGraph, httpStatusOf2, classifyHttpStatus, LOCAL_PERMISSION_ERROR_CODES, carriedInstructions, describeConnectivityError, describePermissionError, classifyThrownError, extractErrorDetails, extractErrorMessage, TelemetryService, isProjectTelemetryDisabled, buildCommandTelemetryAttribution, buildAgentSessionTelemetry, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader };
|
|
1958
1985
|
|
|
1959
|
-
//# debugId=
|
|
1986
|
+
//# debugId=6FC68BC57025B6F464756E2164756E21
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileSystem
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-1db1wqdy.js";
|
|
4
4
|
import {
|
|
5
5
|
catchError,
|
|
6
6
|
extractErrorDetails
|
|
7
|
-
} from "./packager-tool-
|
|
7
|
+
} from "./packager-tool-gb3dq79g.js";
|
|
8
8
|
import {
|
|
9
9
|
logger,
|
|
10
10
|
PollOutcome,
|
|
11
11
|
mapPollFailure,
|
|
12
12
|
pollUntil
|
|
13
|
-
} from "./packager-tool-
|
|
13
|
+
} from "./packager-tool-xbfr6y2x.js";
|
|
14
14
|
import {
|
|
15
15
|
Configuration2,
|
|
16
16
|
PipelinesApi,
|
|
17
17
|
feedSessionRefusalAsync2
|
|
18
|
-
} from "./packager-tool-
|
|
18
|
+
} from "./packager-tool-hczpvrc1.js";
|
|
19
19
|
import {
|
|
20
20
|
getSolutionAuthContext2
|
|
21
|
-
} from "./packager-tool-
|
|
21
|
+
} from "./packager-tool-n1zrk6zv.js";
|
|
22
22
|
import {
|
|
23
23
|
strToU82,
|
|
24
24
|
strFromU82,
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
feedScopeInitOverride2,
|
|
30
30
|
describeFeedResolutionFailureAsync2,
|
|
31
31
|
resolveFeedScope2
|
|
32
|
-
} from "./packager-tool-
|
|
32
|
+
} from "./packager-tool-7j920ac5.js";
|
|
33
33
|
import {
|
|
34
34
|
capturePackedSolutionIdentity2
|
|
35
|
-
} from "./packager-tool-
|
|
35
|
+
} from "./packager-tool-t9zked1m.js";
|
|
36
36
|
|
|
37
37
|
// src/services/package-metadata-rewrite.ts
|
|
38
38
|
import { randomUUID } from "node:crypto";
|
|
@@ -40,6 +40,25 @@ var SOLUTION_METADATA_ENTRY = "solutionMetadata.json";
|
|
|
40
40
|
function isRecord(value) {
|
|
41
41
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
42
42
|
}
|
|
43
|
+
var GUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
44
|
+
var MAX_SOLUTION_METADATA_BYTES = 1024 * 1024;
|
|
45
|
+
function readPackedSolutionId(archive) {
|
|
46
|
+
try {
|
|
47
|
+
const entries = unzipSync2(archive, {
|
|
48
|
+
filter: (entry) => entry.name === SOLUTION_METADATA_ENTRY && entry.originalSize <= MAX_SOLUTION_METADATA_BYTES
|
|
49
|
+
});
|
|
50
|
+
const metadataBytes = entries[SOLUTION_METADATA_ENTRY];
|
|
51
|
+
if (!metadataBytes)
|
|
52
|
+
return;
|
|
53
|
+
const parsed = JSON.parse(strFromU82(metadataBytes));
|
|
54
|
+
if (!isRecord(parsed) || !isRecord(parsed.spec))
|
|
55
|
+
return;
|
|
56
|
+
const projectKey = parsed.spec.projectKey;
|
|
57
|
+
return typeof projectKey === "string" && GUID_PATTERN.test(projectKey.trim()) ? projectKey.trim() : undefined;
|
|
58
|
+
} catch {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
43
62
|
var requireValue = (value, flag) => {
|
|
44
63
|
const trimmed = value.trim();
|
|
45
64
|
if (!trimmed) {
|
|
@@ -364,6 +383,6 @@ async function mapUploadError(uploadError) {
|
|
|
364
383
|
};
|
|
365
384
|
}
|
|
366
385
|
|
|
367
|
-
export { publishSolutionAsync2 };
|
|
386
|
+
export { readPackedSolutionId, publishSolutionAsync2 };
|
|
368
387
|
|
|
369
|
-
//# debugId=
|
|
388
|
+
//# debugId=BF8F50CBC88CAD7064756E2164756E21
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catchError
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-gb3dq79g.js";
|
|
4
4
|
import {
|
|
5
5
|
quoteForShell
|
|
6
|
-
} from "./packager-tool-
|
|
6
|
+
} from "./packager-tool-xbfr6y2x.js";
|
|
7
7
|
import {
|
|
8
8
|
Configuration2,
|
|
9
9
|
PipelinesApi
|
|
10
|
-
} from "./packager-tool-
|
|
10
|
+
} from "./packager-tool-hczpvrc1.js";
|
|
11
11
|
import {
|
|
12
12
|
Configuration3,
|
|
13
13
|
SolutionDeploymentAction2,
|
|
14
14
|
DeploymentsApi2
|
|
15
|
-
} from "./packager-tool-
|
|
15
|
+
} from "./packager-tool-2syv199e.js";
|
|
16
16
|
|
|
17
17
|
// src/services/deployment-state.ts
|
|
18
18
|
function pendingResourceApis(auth) {
|
|
@@ -172,6 +172,15 @@ function formatPendingResources(resources) {
|
|
|
172
172
|
const remaining = resources.length - MAX_LISTED_RESOURCES;
|
|
173
173
|
return remaining > 0 ? `${described}; and ${remaining} more` : described;
|
|
174
174
|
}
|
|
175
|
+
function relinkStep(deployment, version, feedSelector) {
|
|
176
|
+
const name = quoteForShell(deployment.name);
|
|
177
|
+
const pkg = deployment.packageName ? quoteForShell(deployment.packageName) : "<package-name>";
|
|
178
|
+
const key = deployment.installDeploymentKey || deployment.key;
|
|
179
|
+
const folderFeed = feedSelector !== "" && feedSelector !== " --personal-workspace";
|
|
180
|
+
const target = key ? quoteForShell(key) : folderFeed ? `<deployment-key> (Key from uip solution deploy list${feedSelector})` : `--name ${name} --package-name ${pkg}${feedSelector}`;
|
|
181
|
+
const pinned = version ? quoteForShell(version) : "<deployed-version>";
|
|
182
|
+
return `To link its resources to existing ones instead (an authenticated connection in place of the one the deploy created): uip solution deploy config get ${pkg} --package-version ${pinned}${feedSelector} -d config.json, then uip solution deploy config link config.json '<resource-name>' --name '<existing-name>' --folder-path '<folder-path>' for each resource, then uip solution deploy upgrade ${target} --version ${pinned} --config-file config.json (keep only the linked resources in the file: each resource it names is applied as written, one it leaves out keeps its values), then uip solution deploy activate ${name}${feedSelector}.`;
|
|
183
|
+
}
|
|
175
184
|
function activationNextSteps(deployment, pendingResources, feedSelector = "") {
|
|
176
185
|
const name = deployment.name;
|
|
177
186
|
const version = deployment.currentPackageVersion ?? deployment.packageVersion;
|
|
@@ -182,7 +191,7 @@ function activationNextSteps(deployment, pendingResources, feedSelector = "") {
|
|
|
182
191
|
`${installed} but not live: it needs 'Setup activation' before it can be activated.`,
|
|
183
192
|
describePendingResources(pendingResources)
|
|
184
193
|
];
|
|
185
|
-
steps.push(`
|
|
194
|
+
steps.push(relinkStep(deployment, version, feedSelector), `Or complete 'Setup activation' for '${name}' in Orchestrator (Tenant > Solutions > Deployments, open the deployment), which is also where a connection is authenticated in place. 'uip solution deploy activate' is refused until one of the two is done.`);
|
|
186
195
|
return steps;
|
|
187
196
|
}
|
|
188
197
|
case "ReadyToActivate":
|
|
@@ -253,4 +262,4 @@ function describeDraft(deployment, feedSelector) {
|
|
|
253
262
|
|
|
254
263
|
export { pendingResourceApis, reportedActivationStatus, readPendingResourcesAsync, readActivationBlockersAsync, isCurrentRecordAsync, appendDeploymentStateInstructions, explainRefusal, needsPendingResources, deploymentNextSteps };
|
|
255
264
|
|
|
256
|
-
//# debugId=
|
|
265
|
+
//# debugId=060FE384381C1FD364756E2164756E21
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSessionIdentity
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-jtvhkavz.js";
|
|
4
4
|
import {
|
|
5
5
|
catchError,
|
|
6
6
|
httpStatusOf2,
|
|
7
7
|
getSdkUserAgentToken,
|
|
8
8
|
installSdkUserAgentHeader
|
|
9
|
-
} from "./packager-tool-
|
|
9
|
+
} from "./packager-tool-gb3dq79g.js";
|
|
10
10
|
import {
|
|
11
11
|
logger
|
|
12
|
-
} from "./packager-tool-
|
|
12
|
+
} from "./packager-tool-xbfr6y2x.js";
|
|
13
13
|
import {
|
|
14
14
|
Configuration3,
|
|
15
15
|
DeploymentSearchItemDto2FromJSON,
|
|
16
16
|
SearchApi
|
|
17
|
-
} from "./packager-tool-
|
|
17
|
+
} from "./packager-tool-2syv199e.js";
|
|
18
18
|
|
|
19
19
|
// ../pipelines-sdk/generated/src/runtime.ts
|
|
20
20
|
var BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
@@ -290,7 +290,7 @@ var package_default = {
|
|
|
290
290
|
name: "@uipath/pipelines-sdk",
|
|
291
291
|
author: "UiPath",
|
|
292
292
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
293
|
-
version: "1.
|
|
293
|
+
version: "1.207.0",
|
|
294
294
|
description: "Generated TypeScript client for UiPath Pipelines API (CI/CD deployment lifecycle)",
|
|
295
295
|
repository: {
|
|
296
296
|
type: "git",
|
|
@@ -2140,4 +2140,4 @@ async function feedReadRefusalAsync2(session, folderKey, action, route = "deploy
|
|
|
2140
2140
|
|
|
2141
2141
|
export { Configuration2, DeploymentOperation, DeploymentStatus, PipelinesApi, isMissingPipelinesRoute, isApplicationSession, parseSearchPage, DeploymentSearchNeedsUserSessionError, DeploymentSearchTruncatedError, searchDeploymentsPage, isAuthRefusal, classifyFeedSession2, feedSessionRefusal2, feedReadRefusalForApplication2, FeedReadRefusedError2, feedSessionRefusalAsync2, feedReadRefusalAsync2 };
|
|
2142
2142
|
|
|
2143
|
-
//# debugId=
|
|
2143
|
+
//# debugId=DABF7BDF7D82E47B64756E2164756E21
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileSystem
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-1db1wqdy.js";
|
|
4
4
|
import {
|
|
5
5
|
__require
|
|
6
6
|
} from "./packager-tool-epsr41wx.js";
|
|
@@ -195,6 +195,8 @@ var readTokenScopes = (accessToken) => accessToken ? pickScopes(decodeClaims(acc
|
|
|
195
195
|
// ../auth/src/constants.ts
|
|
196
196
|
var UIPATH_HOME_DIR = ".uipath";
|
|
197
197
|
var AUTH_FILENAME = ".auth";
|
|
198
|
+
var AUTH_FILE_MODE = 384;
|
|
199
|
+
var AUTH_DIR_MODE = 448;
|
|
198
200
|
var DEFAULT_BASE_URL = "https://cloud.uipath.com";
|
|
199
201
|
var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
200
202
|
|
|
@@ -859,6 +861,38 @@ var loadEnvFileAsync = async ({ envPath }) => {
|
|
|
859
861
|
}
|
|
860
862
|
return parseEnvContent(content);
|
|
861
863
|
};
|
|
864
|
+
var findAuthHomeDir = (fs, dir) => {
|
|
865
|
+
let current = dir;
|
|
866
|
+
for (;; ) {
|
|
867
|
+
if (fs.path.basename(current) === UIPATH_HOME_DIR)
|
|
868
|
+
return current;
|
|
869
|
+
const parent = fs.path.dirname(current);
|
|
870
|
+
if (parent === current)
|
|
871
|
+
return;
|
|
872
|
+
current = parent;
|
|
873
|
+
}
|
|
874
|
+
};
|
|
875
|
+
var TEMP_FILE_ATTEMPTS = 5;
|
|
876
|
+
var isFileExists = (error) => error instanceof Error && error.code === "EEXIST";
|
|
877
|
+
var writeTempFile = async (fs, targetPath, content) => {
|
|
878
|
+
for (let attempt = 1;; attempt++) {
|
|
879
|
+
const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
|
|
880
|
+
try {
|
|
881
|
+
await fs.writeFile(tempPath, content, {
|
|
882
|
+
mode: AUTH_FILE_MODE,
|
|
883
|
+
exclusive: true
|
|
884
|
+
});
|
|
885
|
+
return tempPath;
|
|
886
|
+
} catch (error) {
|
|
887
|
+
if (!isFileExists(error)) {
|
|
888
|
+
await fs.rm(tempPath).catch(() => {});
|
|
889
|
+
throw error;
|
|
890
|
+
}
|
|
891
|
+
if (attempt === TEMP_FILE_ATTEMPTS)
|
|
892
|
+
throw error;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
};
|
|
862
896
|
var saveEnvFileAsync = async ({
|
|
863
897
|
envPath,
|
|
864
898
|
data,
|
|
@@ -886,10 +920,18 @@ var saveEnvFileAsync = async ({
|
|
|
886
920
|
`)}
|
|
887
921
|
`;
|
|
888
922
|
const dir = fs.path.dirname(absolutePath);
|
|
889
|
-
await fs.mkdir(dir);
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
|
|
923
|
+
await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
|
|
924
|
+
const authHomeDir = findAuthHomeDir(fs, dir);
|
|
925
|
+
if (authHomeDir !== undefined) {
|
|
926
|
+
await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
|
|
927
|
+
}
|
|
928
|
+
const tempPath = await writeTempFile(fs, absolutePath, content);
|
|
929
|
+
try {
|
|
930
|
+
await fs.rename(tempPath, absolutePath);
|
|
931
|
+
} catch (error) {
|
|
932
|
+
await fs.rm(tempPath).catch(() => {});
|
|
933
|
+
throw error;
|
|
934
|
+
}
|
|
893
935
|
};
|
|
894
936
|
|
|
895
937
|
// ../auth/src/loginStatus.ts
|
|
@@ -1486,4 +1528,4 @@ var TENANT_SELECTION_CODES = new Set([
|
|
|
1486
1528
|
]);
|
|
1487
1529
|
export { resolveSessionIdentity, getLoginStatusAsync, getAuthContext };
|
|
1488
1530
|
|
|
1489
|
-
//# debugId=
|
|
1531
|
+
//# debugId=3B20C7545532AB8464756E2164756E21
|