@uipath/packager-tool-workflowcompiler 1.206.0-preview.303 → 1.207.0-preview.305

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import "./i18n/index.js";
2
2
  export { WorkflowCompilerToolFactory } from "./workflow-compiler-tool-factory.js";
3
+ export { readProjectIdentity } from "./project-identity.js";
3
4
  export { setupWorkflowCompiler } from "./workflow-compiler-config.js";
4
5
  export type { CleanedWorkflowDetail, WorkflowCleanupDetails, } from "./workflow-cleanup-details.js";
package/dist/index.js CHANGED
@@ -656,6 +656,50 @@ import {
656
656
  translate as translate5
657
657
  } from "@uipath/solutionpackager-tool-core";
658
658
 
659
+ // src/project-identity.ts
660
+ import {
661
+ declaredProjectType,
662
+ identityFieldValue,
663
+ PROJECT_FILE,
664
+ readIdentityJson
665
+ } from "@uipath/solutionpackager-tool-core";
666
+ function declaredType(project) {
667
+ const type = declaredProjectType(project);
668
+ return typeof type === "string" && type.trim() ? type : "unknown";
669
+ }
670
+ var readProjectIdentity = async (target, fs) => {
671
+ const projectDirectory = fs.path.resolve(target);
672
+ const unresolved = (status, projectType = "unknown") => ({
673
+ projectDirectory,
674
+ projectType,
675
+ status
676
+ });
677
+ let stat;
678
+ try {
679
+ stat = await fs.stat(projectDirectory);
680
+ } catch {
681
+ return unresolved("invalid");
682
+ }
683
+ if (stat && !stat.isDirectory())
684
+ return unresolved("invalid");
685
+ let project;
686
+ try {
687
+ project = await readIdentityJson(fs, fs.path.join(projectDirectory, PROJECT_FILE));
688
+ } catch {
689
+ return unresolved("invalid");
690
+ }
691
+ if (!project)
692
+ return unresolved("missing");
693
+ const projectType = declaredType(project);
694
+ let id;
695
+ try {
696
+ id = identityFieldValue(project, ["projectId"]);
697
+ } catch {
698
+ return unresolved("invalid", projectType);
699
+ }
700
+ return id === undefined ? unresolved("missing", projectType) : { projectDirectory, projectType, id, status: "resolved" };
701
+ };
702
+
659
703
  // src/workflow-compiler-config.ts
660
704
  var DEFAULT_WORKFLOW_COMPILER_VERSION = "26.0.202-cloud.24987";
661
705
  var DEFAULT_DOTNET_PATH = "dotnet";
@@ -748,13 +792,15 @@ var ProjectDimensions = {
748
792
  SolutionKey: "SolutionKey",
749
793
  SolutionProjectKey: "SolutionProjectKey",
750
794
  SolutionIdentityStatus: "SolutionIdentityStatus",
751
- PreviousSolutionKey: "PreviousSolutionKey"
795
+ PreviousSolutionKey: "PreviousSolutionKey",
796
+ PreviousProjectKey: "PreviousProjectKey"
752
797
  };
753
798
  var GUID_KEY_DIMENSIONS = new Set([
754
799
  ProjectDimensions.ProjectKey,
755
800
  ProjectDimensions.SolutionKey,
756
801
  ProjectDimensions.SolutionProjectKey,
757
- ProjectDimensions.PreviousSolutionKey
802
+ ProjectDimensions.PreviousSolutionKey,
803
+ ProjectDimensions.PreviousProjectKey
758
804
  ]);
759
805
  var ShipDimensions = {
760
806
  ShipKind: "ShipKind",
@@ -853,7 +899,7 @@ var CURATED_DIMENSIONS = new Set([
853
899
  ...Object.values(ProjectDimensions)
854
900
  ]);
855
901
 
856
- // ../../common/src/telemetry/pseudonymize.ts
902
+ // ../../common/src/sha256.ts
857
903
  var SHA256_K = new Uint32Array([
858
904
  1116352408,
859
905
  1899447441,
@@ -1183,7 +1229,7 @@ import {
1183
1229
  // ../packager-orchestrator-client/package.json
1184
1230
  var package_default = {
1185
1231
  name: "@uipath/packager-orchestrator-client",
1186
- version: "1.206.0",
1232
+ version: "1.207.0",
1187
1233
  description: "UiPath packager client for Orchestrator package-feed interaction (feed discovery + NuGet source composition)",
1188
1234
  type: "module",
1189
1235
  private: true,
@@ -1995,15 +2041,17 @@ class WorkflowCompilerTool extends ProjectTool {
1995
2041
  this.context = context;
1996
2042
  this.executor = new WorkflowCompilerExecutor(logger, fileSystem);
1997
2043
  }
1998
- async withFeedPaths(options, run) {
2044
+ async withCompilerPaths(options, run) {
2045
+ const projectPath = await this.fileSystem.realpath(options.projectPath);
1999
2046
  const userNugetConfigPath = options.nuGetSourcesConfigPath;
2000
2047
  const connection = this.context?.connection;
2001
2048
  if (!connection && !options.feedFolder) {
2002
- return run({ userNugetConfigPath });
2049
+ return run({ projectPath, userNugetConfigPath });
2003
2050
  }
2004
2051
  const composed = await new OrchestratorFeedComposer(this.fileSystem, this.logger).composeAsync({ connection, feedFolder: options.feedFolder });
2005
2052
  try {
2006
2053
  return await run({
2054
+ projectPath,
2007
2055
  orchestratorFeedsJsonPath: composed.configPath,
2008
2056
  userNugetConfigPath
2009
2057
  });
@@ -2012,10 +2060,10 @@ class WorkflowCompilerTool extends ProjectTool {
2012
2060
  }
2013
2061
  }
2014
2062
  async restoreAsync(options, cancellationToken) {
2015
- return this.withFeedPaths(options, (paths) => {
2063
+ return this.withCompilerPaths(options, (paths) => {
2016
2064
  const args = [
2017
2065
  `-p`,
2018
- options.projectPath,
2066
+ paths.projectPath,
2019
2067
  `--log-level`,
2020
2068
  String(options.logLevel ?? LogLevel.Info),
2021
2069
  `--destination`,
@@ -2035,10 +2083,10 @@ class WorkflowCompilerTool extends ProjectTool {
2035
2083
  });
2036
2084
  }
2037
2085
  async validateAsync(options, cancellationToken) {
2038
- return this.withFeedPaths(options, (paths) => {
2086
+ return this.withCompilerPaths(options, (paths) => {
2039
2087
  const args = [
2040
2088
  `-p`,
2041
- options.projectPath,
2089
+ paths.projectPath,
2042
2090
  `--log-level`,
2043
2091
  String(options.logLevel ?? LogLevel.Info),
2044
2092
  `--format-logs`,
@@ -2073,10 +2121,10 @@ class WorkflowCompilerTool extends ProjectTool {
2073
2121
  });
2074
2122
  }
2075
2123
  async buildAsync(options, cancellationToken) {
2076
- return this.withFeedPaths(options, (paths) => {
2124
+ return this.withCompilerPaths(options, (paths) => {
2077
2125
  const args = [
2078
2126
  `-p`,
2079
- options.projectPath,
2127
+ paths.projectPath,
2080
2128
  `-o`,
2081
2129
  options.outputPath,
2082
2130
  `--log-level`,
@@ -2115,10 +2163,10 @@ class WorkflowCompilerTool extends ProjectTool {
2115
2163
  });
2116
2164
  }
2117
2165
  async packAsync(options, cancellationToken) {
2118
- return this.withFeedPaths(options, async (paths) => {
2166
+ return this.withCompilerPaths(options, async (paths) => {
2119
2167
  const args = [
2120
2168
  `-p`,
2121
- options.projectPath,
2169
+ paths.projectPath,
2122
2170
  `-o`,
2123
2171
  options.outputPath,
2124
2172
  `--build-version`,
@@ -2171,10 +2219,10 @@ class WorkflowCompilerTool extends ProjectTool {
2171
2219
  });
2172
2220
  }
2173
2221
  async cleanupAsync(options, cancellationToken) {
2174
- return this.withFeedPaths(options, async (paths) => {
2222
+ return this.withCompilerPaths(options, async (paths) => {
2175
2223
  const args = [
2176
2224
  `-p`,
2177
- options.projectPath,
2225
+ paths.projectPath,
2178
2226
  `--log-level`,
2179
2227
  String(options.logLevel ?? LogLevel.Info),
2180
2228
  `--format-logs`,
@@ -2294,6 +2342,7 @@ class WorkflowCompilerTool extends ProjectTool {
2294
2342
  // src/workflow-compiler-tool-factory.ts
2295
2343
  class WorkflowCompilerToolFactory {
2296
2344
  static cachedDotnetAvailable;
2345
+ readProjectIdentityAsync = readProjectIdentity;
2297
2346
  supportedTypes = [
2298
2347
  ProjectTypes.Process,
2299
2348
  ProjectTypes.Library,
@@ -2326,7 +2375,8 @@ class WorkflowCompilerToolFactory {
2326
2375
  }
2327
2376
  export {
2328
2377
  WorkflowCompilerToolFactory,
2378
+ readProjectIdentity,
2329
2379
  setupWorkflowCompiler
2330
2380
  };
2331
2381
 
2332
- //# debugId=A8E9BEEF52E7852B64756E2164756E21
2382
+ //# debugId=3D204D661D5034B864756E2164756E21
@@ -0,0 +1,21 @@
1
+ import { type ProjectIdentityReader } from "@uipath/solutionpackager-tool-core";
2
+ /**
3
+ * The identity of an RPA project, for the host's project telemetry: the
4
+ * `projectId` Studio wrote into `project.json`, read with the packagers'
5
+ * shared bounded reader in the member directory the packager hands over.
6
+ *
7
+ * No `project.json` (a `WebApp` member, or an empty folder), or one without
8
+ * an id (absent, `null` or empty), is `missing`; a target that is not a
9
+ * folder, a manifest past the size bound or that cannot be parsed, or an id
10
+ * that is not a non-blank string is `invalid`; a non-GUID id is reported as
11
+ * found and the host marks it `invalid` itself. `projectType` is what the
12
+ * manifest declares, `unknown` when it declares nothing, so a caller that
13
+ * knows the `.uipx` `Type` prefers that. `projectDirectory` is the resolved
14
+ * folder, so the host adds the solution keys of a registered member.
15
+ *
16
+ * Same contract as the API workflow, coded app and agent readers. rpa-tool's
17
+ * own commands read the same field through their project loader; this reader
18
+ * exists for the hosts that reach an RPA member only through its factory
19
+ * (`solution upload`, and the member observer should it ever widen).
20
+ */
21
+ export declare const readProjectIdentity: ProjectIdentityReader;
@@ -10,6 +10,7 @@ export declare class WorkflowCompilerToolFactory implements IProjectToolFactory
10
10
  * the factory across the rest of the process.
11
11
  */
12
12
  private static cachedDotnetAvailable;
13
+ readProjectIdentityAsync: import("@uipath/solutionpackager-tool-core").ProjectIdentityReader;
13
14
  readonly supportedTypes: readonly ProjectType[];
14
15
  createAsync(logger: IToolLogger, fileSystem: IFileSystem, context?: ProjectOperationContext): Promise<ProjectTool>;
15
16
  /**
@@ -7,7 +7,7 @@ export declare class WorkflowCompilerTool extends ProjectTool {
7
7
  private readonly context?;
8
8
  private readonly executor;
9
9
  constructor(fileSystem: IFileSystem, logger: IToolLogger, context?: ProjectOperationContext | undefined);
10
- private withFeedPaths;
10
+ private withCompilerPaths;
11
11
  restoreAsync(options: IProjectRestoreOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
12
12
  validateAsync(options: IProjectValidateOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
13
13
  buildAsync(options: IProjectBuildOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/packager-tool-workflowcompiler",
3
- "version": "1.206.0-preview.303",
3
+ "version": "1.207.0-preview.305",
4
4
  "description": "UiPath Workflow Compiler tool implementation",
5
5
  "type": "module",
6
6
  "exports": {
@@ -21,8 +21,8 @@
21
21
  "author": "UiPath",
22
22
  "license": "SEE LICENSE IN LICENSE.txt",
23
23
  "peerDependencies": {
24
- "@uipath/solutionpackager-tool-core": "1.206.0"
24
+ "@uipath/solutionpackager-tool-core": "1.207.0"
25
25
  },
26
26
  "dependencies": {},
27
- "gitHead": "7d17b8a3c1a50892d42c9302087abc8307b04409"
27
+ "gitHead": "1600aa89255c37c1b8bc68d9882c3395c1d5bff4"
28
28
  }