@uipath/solution-sdk 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.
Files changed (34) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +2 -2
  2. package/dist/deployment-search.js +5 -5
  3. package/dist/{embedded-file-reader-pxpwcq3n.js → embedded-file-reader-k94wt612.js} +16 -16
  4. package/dist/{first-party-service-6b9ajm57.js → first-party-service-qfg2m05s.js} +1 -1
  5. package/dist/{index-t1evhtnh.js → index-1bffghc6.js} +88 -21
  6. package/dist/{index-j1tcfaem.js → index-3j38eakj.js} +9 -5
  7. package/dist/{index-0b3srjv7.js → index-3stpkr4a.js} +30 -8
  8. package/dist/{index-y9qx7901.js → index-93ee30d0.js} +248 -132
  9. package/dist/index-b4cns9y6.js +48 -0
  10. package/dist/{index-amqqhge1.js → index-ewg6ygg0.js} +1 -1
  11. package/dist/{index-xnrbg4x3.js → index-knpm888a.js} +4 -2
  12. package/dist/{index-bpn15jyk.js → index-mgaz5jpa.js} +48 -6
  13. package/dist/{index-jjkypwge.js → index-s8jxyjgj.js} +15 -4
  14. package/dist/{index-dfmtrvrq.js → index-tt6bptj4.js} +4 -4
  15. package/dist/index.js +57 -13
  16. package/dist/invocation-graph.js +82 -0
  17. package/dist/{jmespath-x4na7sj8.js → jmespath-d7vwhn8r.js} +1 -1
  18. package/dist/package-search.js +5 -5
  19. package/dist/project-context.js +3 -3
  20. package/dist/resources/index.js +3104 -765
  21. package/dist/solution-auth.js +3 -3
  22. package/dist/{solution-definition-helper-6zwd9hjs.js → solution-definition-helper-qjj01xh0.js} +1 -1
  23. package/dist/src/index.d.ts +2 -2
  24. package/dist/src/invocation-graph.d.ts +107 -0
  25. package/dist/src/resources/services/local-resource-matcher.d.ts +23 -0
  26. package/dist/src/resources/services/remote-resources.d.ts +11 -0
  27. package/dist/src/resources/services/resource-name.d.ts +6 -0
  28. package/dist/src/resources/services/resource-refresh-service.d.ts +8 -0
  29. package/dist/src/resources/services/sync-resources-from-bindings.d.ts +7 -1
  30. package/dist/src/solution-auth.d.ts +3 -0
  31. package/dist/src/solution-file.d.ts +36 -6
  32. package/dist/src/studio-web-compat.d.ts +19 -16
  33. package/dist/src/types.d.ts +8 -0
  34. package/package.json +6 -2
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __require,
3
3
  getFileSystem
4
- } from "./index-0b3srjv7.js";
4
+ } from "./index-3stpkr4a.js";
5
5
 
6
6
  // ../auth/src/catch-error.ts
7
7
  function isPromiseLike(value) {
@@ -34,6 +34,8 @@ function settlePromiseLike(thenable) {
34
34
  // ../auth/src/constants.ts
35
35
  var UIPATH_HOME_DIR = ".uipath";
36
36
  var AUTH_FILENAME = ".auth";
37
+ var AUTH_FILE_MODE = 384;
38
+ var AUTH_DIR_MODE = 448;
37
39
  var DEFAULT_BASE_URL = "https://cloud.uipath.com";
38
40
  var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
39
41
 
@@ -857,6 +859,38 @@ var loadEnvFileAsync = async ({ envPath }) => {
857
859
  }
858
860
  return parseEnvContent(content);
859
861
  };
862
+ var findAuthHomeDir = (fs, dir) => {
863
+ let current = dir;
864
+ for (;; ) {
865
+ if (fs.path.basename(current) === UIPATH_HOME_DIR)
866
+ return current;
867
+ const parent = fs.path.dirname(current);
868
+ if (parent === current)
869
+ return;
870
+ current = parent;
871
+ }
872
+ };
873
+ var TEMP_FILE_ATTEMPTS = 5;
874
+ var isFileExists = (error) => error instanceof Error && error.code === "EEXIST";
875
+ var writeTempFile = async (fs, targetPath, content) => {
876
+ for (let attempt = 1;; attempt++) {
877
+ const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
878
+ try {
879
+ await fs.writeFile(tempPath, content, {
880
+ mode: AUTH_FILE_MODE,
881
+ exclusive: true
882
+ });
883
+ return tempPath;
884
+ } catch (error) {
885
+ if (!isFileExists(error)) {
886
+ await fs.rm(tempPath).catch(() => {});
887
+ throw error;
888
+ }
889
+ if (attempt === TEMP_FILE_ATTEMPTS)
890
+ throw error;
891
+ }
892
+ }
893
+ };
860
894
  var saveEnvFileAsync = async ({
861
895
  envPath,
862
896
  data,
@@ -884,10 +918,18 @@ var saveEnvFileAsync = async ({
884
918
  `)}
885
919
  `;
886
920
  const dir = fs.path.dirname(absolutePath);
887
- await fs.mkdir(dir);
888
- const tempPath = `${absolutePath}.tmp`;
889
- await fs.writeFile(tempPath, content);
890
- await fs.rename(tempPath, absolutePath);
921
+ await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
922
+ const authHomeDir = findAuthHomeDir(fs, dir);
923
+ if (authHomeDir !== undefined) {
924
+ await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
925
+ }
926
+ const tempPath = await writeTempFile(fs, absolutePath, content);
927
+ try {
928
+ await fs.rename(tempPath, absolutePath);
929
+ } catch (error) {
930
+ await fs.rm(tempPath).catch(() => {});
931
+ throw error;
932
+ }
891
933
  };
892
934
 
893
935
  // ../auth/src/loginStatus.ts
@@ -1484,4 +1526,4 @@ var TENANT_SELECTION_CODES = new Set([
1484
1526
  ]);
1485
1527
  export { resolveSessionIdentity, getLoginStatusAsync, getAuthContext };
1486
1528
 
1487
- //# debugId=00C28083FDEE07A064756E2164756E21
1529
+ //# debugId=EEF43192E639028664756E2164756E21
@@ -389,12 +389,15 @@ var ErrorCodes = {
389
389
  DuplicatePackageName: "2026",
390
390
  TooManySearchKinds: "2027",
391
391
  SearchTypesWithSeveralKinds: "2028",
392
+ FileAttachNotSupported: "2029",
393
+ InvalidAttachedFile: "2030",
392
394
  ResourceNotFound: "1000",
393
395
  ResourceAlreadyExists: "Resources.ResourceAlreadyExists",
394
396
  ResourceDependencyNotFound: "Resources.ResourceDependencyNotFound",
395
397
  FileDependencyNotFound: "Resources.FileDependencyNotFound",
396
398
  PropertyInvalidFormat: "Resources.PropertyInvalidFormat",
397
- PropertyInvalidValue: "Resources.PropertyInvalidValue"
399
+ PropertyInvalidValue: "Resources.PropertyInvalidValue",
400
+ SecretNotFound: "Resources.SecretNotFound"
398
401
  },
399
402
  Solutions: {
400
403
  ConfigurationNotFound: "3002",
@@ -504,7 +507,8 @@ var WellKnownPropertyNames = {
504
507
  Name: "name",
505
508
  PackageName: "packageName",
506
509
  Description: "description",
507
- UiappFile: "uiappFile"
510
+ UiappFile: "uiappFile",
511
+ FileName: "fileName"
508
512
  };
509
513
  var ExcludedKindsAndTypes = [
510
514
  "webapp"
@@ -512,6 +516,13 @@ var ExcludedKindsAndTypes = [
512
516
  var FailOnNameConflictKinds = [
513
517
  "entity"
514
518
  ];
519
+ function tryGetAppSystemName(resource) {
520
+ const value = resource.spec?.["appSystemName"];
521
+ if (value == null)
522
+ return null;
523
+ const s = String(value);
524
+ return s.trim().length === 0 ? null : s;
525
+ }
515
526
  function toResourceIdentifier2(resource, trimVersion = false, ignoreType = false) {
516
527
  return {
517
528
  kind: resource.kind,
@@ -1319,6 +1330,6 @@ class FirstPartyServiceApi2 extends HttpClient {
1319
1330
  };
1320
1331
  }
1321
1332
  }
1322
- export { ErrorCodes, BadRequestException, InvalidOperationException, types_ResourceScope, toResourceIdentifier, toServiceName, getVersionOrDefault, isSingleReferenceProperty, isAnyReferenceProperty, isSecretProperty, isNameProperty, isFileReferenceProperty, WellKnownProjectType, WellKnownPropertyNames, FailOnNameConflictKinds, toResourceIdentifier2, isExcluded, filterVisibleFolderResources, filterHiddenResourceKeys, filterHiddenUnsupportingDebugProvisioningKeys, supportsDebugProvisioningWithDependencies, supportsDebugProvisioning, isProcessArtefact, resolvePackageNameAfterRename, findPackageNameConflict, changePackageName, getDefaultValue, buildDefaultConfiguration, isDependencyToResource, updateReferenceProps, cloneResourceDefinition, resourceNameIdentity, getResource, getResourceOrDefault, findMetadataForResource, getResourceIdentifierKey, invariantEquals, addResource, addResourceWithUniqueName, upsertFile, getRootFolder, JsonSerializerNames2, JsonSerializer2, CAMEL_CASE_ENUM_PROPERTIES2, SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES2, RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES2, PASCAL_CASE_ENUM_PROPERTIES2, JsonSerializerFactory2, JsonSerializerProxy2, StreamSerializer2, SolutionDefinitionHelper2, FirstPartyServiceApi2 };
1333
+ export { ErrorCodes, BadRequestException, InvalidOperationException, types_ResourceScope, toResourceIdentifier, toServiceName, getVersionOrDefault, isSingleReferenceProperty, isAnyReferenceProperty, isSecretProperty, isNameProperty, isFileReferenceProperty, WellKnownProjectType, WellKnownPropertyNames, FailOnNameConflictKinds, tryGetAppSystemName, toResourceIdentifier2, isExcluded, filterVisibleFolderResources, filterHiddenResourceKeys, filterHiddenUnsupportingDebugProvisioningKeys, supportsDebugProvisioningWithDependencies, supportsDebugProvisioning, isProcessArtefact, resolvePackageNameAfterRename, findPackageNameConflict, changePackageName, getDefaultValue, buildDefaultConfiguration, isDependencyToResource, updateReferenceProps, cloneResourceDefinition, resourceNameIdentity, getResource, getResourceOrDefault, findMetadataForResource, getResourceIdentifierKey, invariantEquals, addResource, addResourceWithUniqueName, upsertFile, getRootFolder, JsonSerializerNames2, JsonSerializer2, CAMEL_CASE_ENUM_PROPERTIES2, SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES2, RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES2, PASCAL_CASE_ENUM_PROPERTIES2, JsonSerializerFactory2, JsonSerializerProxy2, StreamSerializer2, SolutionDefinitionHelper2, FirstPartyServiceApi2 };
1323
1334
 
1324
- //# debugId=6AA8492A0E5BD36D64756E2164756E21
1335
+ //# debugId=22C8418985CDD6D864756E2164756E21
@@ -3,10 +3,10 @@ import {
3
3
  installSdkUserAgentHeader,
4
4
  catchError,
5
5
  httpStatusOf
6
- } from "./index-y9qx7901.js";
6
+ } from "./index-93ee30d0.js";
7
7
  import {
8
8
  resolveSessionIdentity
9
- } from "./index-bpn15jyk.js";
9
+ } from "./index-mgaz5jpa.js";
10
10
 
11
11
  // ../pipelines-sdk/generated/src/runtime.ts
12
12
  var BASE_PATH = "http://localhost".replace(/\/+$/, "");
@@ -1798,7 +1798,7 @@ var package_default = {
1798
1798
  name: "@uipath/pipelines-sdk",
1799
1799
  author: "UiPath",
1800
1800
  license: "SEE LICENSE IN LICENSE.txt",
1801
- version: "1.206.0",
1801
+ version: "1.207.0",
1802
1802
  description: "Generated TypeScript client for UiPath Pipelines API (CI/CD deployment lifecycle)",
1803
1803
  repository: {
1804
1804
  type: "git",
@@ -1906,4 +1906,4 @@ function parseRow(row, route, kind) {
1906
1906
 
1907
1907
  export { Configuration2, PipelinesApi, isMissingPipelinesRoute, isApplicationSession, parseSearchPage };
1908
1908
 
1909
- //# debugId=9066DC44D14E25C764756E2164756E21
1909
+ //# debugId=E61AB910535F2CB264756E2164756E21
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  addSdkUserAgentHeader,
3
3
  catchError,
4
+ RESULTS,
4
5
  redactTokens,
5
6
  parseAuthChallenge,
6
- RESULTS,
7
7
  summarizePlatformBody,
8
8
  logger
9
- } from "./index-y9qx7901.js";
9
+ } from "./index-93ee30d0.js";
10
10
  import {
11
11
  BASE_PATH2,
12
12
  Configuration3,
@@ -299,12 +299,16 @@ import {
299
299
  ProjectsApi2,
300
300
  SearchApi2,
301
301
  SettingsApi2
302
- } from "./index-j1tcfaem.js";
302
+ } from "./index-3j38eakj.js";
303
303
  import {
304
304
  __toESM,
305
305
  __commonJS
306
- } from "./index-0b3srjv7.js";
306
+ } from "./index-3stpkr4a.js";
307
+ import {
308
+ hasUnsafeNameChars2
309
+ } from "./index-b4cns9y6.js";
307
310
  import {
311
+ SolutionFileError2,
308
312
  normalizeProjectType2,
309
313
  toPortableRelativePath2,
310
314
  readUipxFile2,
@@ -319,8 +323,9 @@ import {
319
323
  findNearestParentUipxFile2,
320
324
  readSolutionManifest2,
321
325
  isProjectRegisteredInSolution2,
326
+ findListedProjectDir2,
322
327
  findSolutionFileUpward2
323
- } from "./index-t1evhtnh.js";
328
+ } from "./index-1bffghc6.js";
324
329
 
325
330
  // ../../node_modules/ignore/index.js
326
331
  var require_ignore = __commonJS(function(exports, module) {
@@ -1935,6 +1940,24 @@ function assertStudioWebCompatibleProjects(projects) {
1935
1940
  throw new StudioWebIncompatibleProjectError(incompatible.map((p) => p.ProjectRelativePath));
1936
1941
  }
1937
1942
  }
1943
+ var MAX_NAMED_PATHS = 20;
1944
+
1945
+ class StudioWebInvalidFileNameError extends Error {
1946
+ offendingPaths;
1947
+ constructor(offendingPaths) {
1948
+ const named = offendingPaths.slice(0, MAX_NAMED_PATHS).join(", ");
1949
+ const more = offendingPaths.length - MAX_NAMED_PATHS;
1950
+ super(`Studio Web cannot import a project file whose name holds a control character or any of : * ? " < > |: ${named}${more > 0 ? `, and ${more} more` : ""}.`);
1951
+ this.offendingPaths = offendingPaths;
1952
+ this.name = "StudioWebInvalidFileNameError";
1953
+ }
1954
+ }
1955
+ function assertStudioWebValidFileNames(projectFilePaths) {
1956
+ const invalid = projectFilePaths.filter((p) => hasUnsafeNameChars2(p.replace(/\\/g, "/").split("/").pop() ?? ""));
1957
+ if (invalid.length > 0) {
1958
+ throw new StudioWebInvalidFileNameError(invalid);
1959
+ }
1960
+ }
1938
1961
 
1939
1962
  // ../../node_modules/fflate/esm/index.mjs
1940
1963
  import { createRequire } from "module";
@@ -2801,14 +2824,16 @@ async function mirrorTree(fs, srcDir, relativeBase, destBaseDir, ignoreRules) {
2801
2824
  if (rootRel) {
2802
2825
  await fs.mkdir(fs.path.join(destBaseDir, rootRel));
2803
2826
  }
2804
- return;
2827
+ return [];
2805
2828
  }
2829
+ const copied = [];
2806
2830
  for (const f of files) {
2807
2831
  const relPath = fs.path.relative(relativeBase, f);
2808
2832
  const destPath = fs.path.join(destBaseDir, relPath);
2809
2833
  const data = await fs.readFile(f);
2810
2834
  if (data) {
2811
2835
  await fs.writeFile(destPath, data);
2836
+ copied.push(f);
2812
2837
  } else {
2813
2838
  logger.warn(`Skipping empty or unreadable file: ${f}`);
2814
2839
  }
@@ -2820,9 +2845,11 @@ async function mirrorTree(fs, srcDir, relativeBase, destBaseDir, ignoreRules) {
2820
2845
  }
2821
2846
  await fs.mkdir(fs.path.join(destBaseDir, relPath));
2822
2847
  }
2848
+ return copied;
2823
2849
  }
2824
2850
  async function flattenProjectDir(fs, srcProjectDir, destProjectDir, ignoreRules) {
2825
2851
  await fs.mkdir(destProjectDir);
2852
+ const copied = [];
2826
2853
  const entries = await fs.readdir(srcProjectDir);
2827
2854
  for (const entryName of entries) {
2828
2855
  const srcPath = fs.path.join(srcProjectDir, entryName);
@@ -2837,18 +2864,20 @@ async function flattenProjectDir(fs, srcProjectDir, destProjectDir, ignoreRules)
2837
2864
  const data = await fs.readFile(srcPath);
2838
2865
  if (data) {
2839
2866
  await fs.writeFile(fs.path.join(destProjectDir, entryName), data);
2867
+ copied.push(srcPath);
2840
2868
  }
2841
2869
  } else if (entryStat.isDirectory()) {
2842
2870
  if (DEFAULT_EXCLUDED_DIR_NAMES.has(entryName) || isIgnoredByRules(fs, ignoreRules, srcPath, true)) {
2843
2871
  continue;
2844
2872
  }
2845
- if (entryName === "content" || entryName === "flow_files") {
2846
- await mirrorTree(fs, srcPath, srcPath, destProjectDir, ignoreRules);
2847
- } else {
2848
- await mirrorTree(fs, srcPath, srcProjectDir, destProjectDir, ignoreRules);
2873
+ const relativeBase = entryName === "content" || entryName === "flow_files" ? srcPath : srcProjectDir;
2874
+ const mirrored = await mirrorTree(fs, srcPath, relativeBase, destProjectDir, ignoreRules);
2875
+ for (const f of mirrored) {
2876
+ copied.push(f);
2849
2877
  }
2850
2878
  }
2851
2879
  }
2880
+ return copied;
2852
2881
  }
2853
2882
  async function bundleSolution(fs, solutionDir, outputDir, outputName) {
2854
2883
  const resolvedPath = fs.path.resolve(solutionDir);
@@ -2883,6 +2912,7 @@ async function bundleSolution(fs, solutionDir, outputDir, outputName) {
2883
2912
  try {
2884
2913
  await fs.writeFile(fs.path.join(stagingDir, "SolutionStorage.json"), JSON.stringify(solutionStorage));
2885
2914
  await fs.writeFile(fs.path.join(stagingDir, uipxFileName), JSON.stringify(uipx));
2915
+ const projectFiles = [];
2886
2916
  for (const project of uipx.Projects) {
2887
2917
  const projectDir = fs.path.dirname(project.ProjectRelativePath);
2888
2918
  const srcProjectPath = fs.path.join(resolvedPath, projectDir);
@@ -2895,8 +2925,12 @@ async function bundleSolution(fs, solutionDir, outputDir, outputName) {
2895
2925
  if (isIgnoredByRules(fs, projectRules, manifestPath, false)) {
2896
2926
  throw new UipignoreExcludesProjectError(project.ProjectRelativePath);
2897
2927
  }
2898
- await flattenProjectDir(fs, srcProjectPath, fs.path.join(stagingDir, projectDir), projectRules);
2928
+ const copied = await flattenProjectDir(fs, srcProjectPath, fs.path.join(stagingDir, projectDir), projectRules);
2929
+ for (const f of copied) {
2930
+ projectFiles.push(toForwardSlash(fs.path.relative(resolvedPath, f)));
2931
+ }
2899
2932
  }
2933
+ assertStudioWebValidFileNames(projectFiles);
2900
2934
  const resourcesPath = fs.path.join(resolvedPath, "resources");
2901
2935
  if (!isTopLevelTreeExcluded(resourcesPath, "resources") && await fs.exists(resourcesPath)) {
2902
2936
  await mirrorTree(fs, resourcesPath, resolvedPath, stagingDir, solutionRules);
@@ -3134,6 +3168,7 @@ function buildAuthRefusalInstructions({
3134
3168
  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.`;
3135
3169
  return `Studio Web ${refusal} while ${what}. ${diagnosis}${actor}${tenant}` + `Nothing was uploaded and nothing ran, so the ${subject} is not the ` + `cause. ${closing}`;
3136
3170
  }
3171
+ var INVALID_FILE_NAME_ERROR_CODE = "20039";
3137
3172
  function buildSolutionUploadFailureOutput(err, options = {}) {
3138
3173
  const stage = err.operation === "overwrite" ? "overwrite-solution" : "import-solution";
3139
3174
  const authRefusal = isAuthRefusal(err.status);
@@ -3154,7 +3189,8 @@ function buildSolutionUploadFailureOutput(err, options = {}) {
3154
3189
  identityType: options.identityType,
3155
3190
  clientId: options.clientId
3156
3191
  }) : undefined;
3157
- const Instructions = authInstructions ?? (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}`);
3192
+ const invalidFileName = err.parsedErrorCode === INVALID_FILE_NAME_ERROR_CODE;
3193
+ 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}`);
3158
3194
  const Context = {
3159
3195
  httpStatus: err.status,
3160
3196
  stage,
@@ -3173,6 +3209,11 @@ function buildSolutionUploadFailureOutput(err, options = {}) {
3173
3209
  if (err.status === 401 && options.identityType === "Application") {
3174
3210
  output.ErrorCode = "permission_denied";
3175
3211
  }
3212
+ if (invalidFileName) {
3213
+ output.ErrorCode = "invalid_argument";
3214
+ output.Retry = "RetryWillNotFix";
3215
+ return output;
3216
+ }
3176
3217
  if (err.operation === "overwrite" && err.status >= 500 && err.status < 600) {
3177
3218
  output.Retry = "RetryAfter30Seconds";
3178
3219
  }
@@ -3556,8 +3597,10 @@ export {
3556
3597
  SolutionDeploymentActionFromJSONTyped2 as SolutionDeploymentActionFromJSONTyped,
3557
3598
  SolutionDeploymentActionToJSON2 as SolutionDeploymentActionToJSON,
3558
3599
  SolutionDeploymentActionToJSONTyped2 as SolutionDeploymentActionToJSONTyped,
3600
+ SolutionFileError2 as SolutionFileError,
3559
3601
  SolutionUploadHttpError,
3560
3602
  StudioWebIncompatibleProjectError,
3603
+ StudioWebInvalidFileNameError,
3561
3604
  TextApiResponse2 as TextApiResponse,
3562
3605
  UipignoreExcludesProjectError,
3563
3606
  VoidApiResponse2 as VoidApiResponse,
@@ -3576,6 +3619,7 @@ export {
3576
3619
  createZipFromDir,
3577
3620
  exists2 as exists,
3578
3621
  finalizeZip64,
3622
+ findListedProjectDir2 as findListedProjectDir,
3579
3623
  findNearestParentUipxFile2 as findNearestParentUipxFile,
3580
3624
  findSolutionFile2 as findSolutionFile,
3581
3625
  findSolutionFileUpward2 as findSolutionFileUpward,
@@ -3655,4 +3699,4 @@ export {
3655
3699
  uploadOrOverwriteSolution
3656
3700
  };
3657
3701
 
3658
- //# debugId=25E3C5C5AC2F598B64756E2164756E21
3702
+ //# debugId=C15D312CD5B03E6F64756E2164756E21
@@ -0,0 +1,82 @@
1
+ // src/invocation-graph.ts
2
+ async function resolveReachableProjectsAsync(input) {
3
+ const { projects, lead, callsOf, cancellationToken } = input;
4
+ const reached = new Set([lead]);
5
+ const queue = [lead];
6
+ const edges = [];
7
+ const keepAll = (keptAll) => ({
8
+ projects,
9
+ edges,
10
+ keptAll
11
+ });
12
+ for (let next = queue.shift();next; next = queue.shift()) {
13
+ const from = next;
14
+ cancellationToken?.throwIfAborted();
15
+ let answer;
16
+ try {
17
+ answer = await callsOf(from);
18
+ } catch (error) {
19
+ cancellationToken?.throwIfAborted();
20
+ return keepAll({
21
+ kind: "failed",
22
+ project: from.name,
23
+ message: `Could not list the process calls of project '${from.name}': ` + `${error instanceof Error ? error.message : String(error)}. ` + "Every project of the solution takes part."
24
+ });
25
+ }
26
+ cancellationToken?.throwIfAborted();
27
+ if (answer.status === "unknown") {
28
+ return keepAll({
29
+ kind: "unknown",
30
+ project: from.name,
31
+ message: `Project '${from.name}' cannot list its process calls: ${answer.reason}. ` + "Every project of the solution takes part."
32
+ });
33
+ }
34
+ for (const call of answer.calls) {
35
+ const processName = call.processName?.trim();
36
+ if (!processName) {
37
+ return keepAll({
38
+ kind: "dynamicCall",
39
+ project: from.name,
40
+ message: `Project '${from.name}' starts a process whose name is an expression` + `${describeCallSite(call)}, so every project of the solution takes part.`
41
+ });
42
+ }
43
+ const wanted = processName.toLowerCase();
44
+ const targets = projects.filter((p) => p.name.toLowerCase() === wanted);
45
+ if (targets.length === 0) {
46
+ return keepAll({
47
+ kind: "externalCall",
48
+ project: from.name,
49
+ message: `Project '${from.name}' starts process '${processName}'${describeCallSite(call)}, ` + "which is not in the solution. A process outside the solution can call any project " + "of the solution, so every project takes part."
50
+ });
51
+ }
52
+ for (const to of targets) {
53
+ if (to === from) {
54
+ continue;
55
+ }
56
+ edges.push({
57
+ from,
58
+ to,
59
+ ...call.activityId ? { activityId: call.activityId } : {},
60
+ ...call.workflowPath ? { workflowPath: call.workflowPath } : {}
61
+ });
62
+ if (!reached.has(to)) {
63
+ reached.add(to);
64
+ queue.push(to);
65
+ }
66
+ }
67
+ }
68
+ }
69
+ return {
70
+ projects: projects.filter((p) => reached.has(p)),
71
+ edges
72
+ };
73
+ }
74
+ function describeCallSite(call) {
75
+ const parts = [call.workflowPath, call.activityId].filter((part) => !!part);
76
+ return parts.length > 0 ? ` (${parts.join(", ")})` : "";
77
+ }
78
+ export {
79
+ resolveReachableProjectsAsync
80
+ };
81
+
82
+ //# debugId=DD1FBD19BE69694E64756E2164756E21
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __commonJS
3
- } from "./index-0b3srjv7.js";
3
+ } from "./index-3stpkr4a.js";
4
4
 
5
5
  // ../../node_modules/jmespath/jmespath.js
6
6
  var require_jmespath = __commonJS(function(exports) {
@@ -1,21 +1,21 @@
1
- import"./index-0b3srjv7.js";
1
+ import"./index-3stpkr4a.js";
2
2
  import {
3
3
  catchError,
4
4
  logger
5
- } from "./index-y9qx7901.js";
5
+ } from "./index-93ee30d0.js";
6
6
  import {
7
7
  Configuration2,
8
8
  PipelinesApi,
9
9
  isMissingPipelinesRoute,
10
10
  isApplicationSession,
11
11
  parseSearchPage
12
- } from "./index-dfmtrvrq.js";
12
+ } from "./index-tt6bptj4.js";
13
13
  import {
14
14
  Configuration3,
15
15
  PackageInfoFromJSON2,
16
16
  SearchApi2
17
- } from "./index-j1tcfaem.js";
18
- import"./index-bpn15jyk.js";
17
+ } from "./index-3j38eakj.js";
18
+ import"./index-mgaz5jpa.js";
19
19
 
20
20
  // src/legacy-package-search.ts
21
21
  var LEGACY_PACKAGE_SEARCH_ROUTE = "POST /api/search/packages";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  getFileSystem
3
- } from "./index-0b3srjv7.js";
3
+ } from "./index-3stpkr4a.js";
4
4
  import {
5
5
  ProjectDimensions,
6
6
  solutionIdentityProperties,
7
7
  projectKey,
8
8
  logger
9
- } from "./index-y9qx7901.js";
9
+ } from "./index-93ee30d0.js";
10
10
  import {
11
11
  toPortableRelativePath2,
12
12
  findSolutionFileUpward2
13
- } from "./index-t1evhtnh.js";
13
+ } from "./index-1bffghc6.js";
14
14
 
15
15
  // src/project-context.ts
16
16
  function record(value) {