@uipath/project-packager 1.196.0 → 1.197.0-preview.65

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.
@@ -1,4 +1,4 @@
1
- import { type ITelemetryService } from "@uipath/common/telemetry";
1
+ import { type ITelemetryService } from "@uipath/common";
2
2
  import type { IFileSystem } from "@uipath/solutionpackager-tool-core";
3
3
  import type { PackagerConfig } from "./models/packager-config.js";
4
4
  /**
@@ -10,9 +10,13 @@ import { type IProjectPackager } from "./services/project-packager.js";
10
10
  *
11
11
  * @example
12
12
  * ```typescript
13
- * // Import tools (triggers self-registration)
14
- * import '@uipath/packager-tool-connector';
15
- * import '@uipath/packager-tool-flow';
13
+ * // Register the tools you need explicitly
14
+ * import { ConnectorToolFactory } from '@uipath/packager-tool-connector';
15
+ * import { FlowToolFactory } from '@uipath/packager-tool-flow';
16
+ * import { toolsFactoryRepository } from '@uipath/solutionpackager-tool-core';
17
+ *
18
+ * toolsFactoryRepository.registerProjectToolFactory(new ConnectorToolFactory());
19
+ * toolsFactoryRepository.registerProjectToolFactory(new FlowToolFactory());
16
20
  *
17
21
  * // Create ProjectPackager
18
22
  * const packager = await createBrowserProjectPackager({
@@ -1,6 +1,6 @@
1
1
  import "./i18n/index.js";
2
- export type { IContextStorage, ITelemetryProvider, ITelemetryService, TelemetryContext, TelemetryProperties, } from "@uipath/common/telemetry";
3
- export { BrowserContextStorage, ConsoleTelemetryProvider, TelemetryService, } from "@uipath/common/telemetry";
2
+ export type { IContextStorage, ITelemetryProvider, ITelemetryService, TelemetryContext, TelemetryProperties, } from "@uipath/common";
3
+ export { BrowserContextStorage, ConsoleTelemetryProvider, TelemetryService, } from "@uipath/common";
4
4
  export type { PackagerConfig } from "./models/packager-config.js";
5
5
  export type { PackageSigningInfo, PackOptions, PublishInfo, ValidateOptions, } from "./models/packager-parameters.js";
6
6
  export { PackagerParameters, RulesConfigFileType, } from "./models/packager-parameters.js";
@@ -15,9 +15,11 @@ export type { IProjectPublisher } from "./publish/services/project-publisher.js"
15
15
  export { ProjectPublisher } from "./publish/services/project-publisher.js";
16
16
  export type { IGovernancePolicyService } from "./services/governance-policy-service.js";
17
17
  export { GovernancePolicyService } from "./services/governance-policy-service.js";
18
+ export { resolveProducedNupkgsAsync } from "./services/nupkg-resolver.js";
18
19
  export type { IPackService } from "./services/pack-service.js";
19
20
  export { PackService } from "./services/pack-service.js";
20
21
  export type { IPackageSignService } from "./services/package-sign-service.js";
22
+ export { signNupkgsAsync } from "./services/package-signer.js";
21
23
  export type { IPackagerParametersValidator } from "./services/packager-parameters-validator.js";
22
24
  export { PackagerParametersValidator } from "./services/packager-parameters-validator.js";
23
25
  export type { IProjectBuildOptionsValidator } from "./services/project-build-options-validator.js";
@@ -1,4 +1,4 @@
1
- import type { ITelemetryService } from "@uipath/common/telemetry";
1
+ import type { ITelemetryService } from "@uipath/common";
2
2
  import type { IFileSystem } from "@uipath/solutionpackager-tool-core";
3
3
  import type { LogHandler } from "../services/tool-logger.js";
4
4
  /**
@@ -1,12 +1,12 @@
1
1
  import "./i18n/index.js";
2
2
  export type { IContextStorage, ITelemetryProvider, ITelemetryService, TelemetryContext, TelemetryProperties, } from "@uipath/common";
3
- export { DebugTelemetryProvider, NodeContextStorage, TelemetryService, } from "@uipath/common";
3
+ export {
4
4
  /**
5
5
  * @deprecated Use {@link DebugTelemetryProvider} instead. This re-export is kept
6
6
  * for one release cycle to avoid breaking external consumers and will be removed
7
7
  * in the next minor version.
8
8
  */
9
- export { ConsoleTelemetryProvider } from "@uipath/common/telemetry";
9
+ ConsoleTelemetryProvider, DebugTelemetryProvider, NodeContextStorage, TelemetryService, } from "@uipath/common";
10
10
  export { BaseNodePackagerFactory } from "./base-node-packager-factory.js";
11
11
  export type { PackagerConfig } from "./models/packager-config.js";
12
12
  export type { PackageSigningInfo, PackOptions, PublishInfo, ValidateOptions, } from "./models/packager-parameters.js";
@@ -26,10 +26,12 @@ export type { IDotnetDiscoveryService } from "./services/dotnet-discovery-servic
26
26
  export { DotnetDiscoveryService } from "./services/dotnet-discovery-service.js";
27
27
  export type { IGovernancePolicyService } from "./services/governance-policy-service.js";
28
28
  export { GovernancePolicyService } from "./services/governance-policy-service.js";
29
+ export { resolveProducedNupkgsAsync } from "./services/nupkg-resolver.js";
29
30
  export type { IPackService } from "./services/pack-service.js";
30
31
  export { PackService } from "./services/pack-service.js";
31
32
  export type { IPackageSignService } from "./services/package-sign-service.js";
32
33
  export { NodePackageSignService } from "./services/package-sign-service.js";
34
+ export { signNupkgsAsync } from "./services/package-signer.js";
33
35
  export type { IPackagerParametersValidator } from "./services/packager-parameters-validator.js";
34
36
  export { PackagerParametersValidator } from "./services/packager-parameters-validator.js";
35
37
  export type { IProjectBuildOptionsValidator } from "./services/project-build-options-validator.js";
@@ -5,6 +5,15 @@ import type { IDotnetDiscoveryService } from "./dotnet-discovery-service.js";
5
5
  * Provides package signing operations with availability checks.
6
6
  */
7
7
  export interface IPackageSignService {
8
+ /**
9
+ * Sign NuGet packages using one dotnet nuget sign invocation.
10
+ * @param packagePaths - Paths to the .nupkg files to sign
11
+ * @param certificatePath - Path to the PFX certificate file
12
+ * @param certificatePassword - Optional password for the certificate
13
+ * @param timestampServer - Optional RFC 3161 timestamp server URL
14
+ * @returns ToolResult indicating success or failure
15
+ */
16
+ signPackagesAsync?(packagePaths: string[], certificatePath: string, certificatePassword?: string, timestampServer?: string): Promise<ToolResult>;
8
17
  /**
9
18
  * Sign a NuGet package using dotnet nuget sign.
10
19
  * @param packagePath - Path to the .nupkg file to sign
@@ -20,4 +29,5 @@ export declare class NodePackageSignService implements IPackageSignService {
20
29
  private readonly logger;
21
30
  constructor(dotnetDiscovery: IDotnetDiscoveryService, logger: IToolLogger);
22
31
  signPackageAsync(packagePath: string, certificatePath: string, certificatePassword?: string, timestampServer?: string): Promise<ToolResult>;
32
+ signPackagesAsync(packagePaths: string[], certificatePath: string, certificatePassword?: string, timestampServer?: string): Promise<ToolResult>;
23
33
  }
@@ -14,8 +14,9 @@ import type { IPackageSignService } from "./package-sign-service.js";
14
14
  * no certificate path).
15
15
  * - An error when signing is requested but no sign service is wired (the host
16
16
  * couldn't provide one, e.g. dotnet CLI missing).
17
- * - Otherwise signs each distinct path in parallel and returns the first
18
- * failure, or success if all signed.
17
+ * - Otherwise signs each distinct path in one `dotnet nuget sign` invocation
18
+ * when the sign service supports batching. This avoids concurrent dotnet
19
+ * sign processes loading the same PFX.
19
20
  *
20
21
  * @param signService The sign service, or undefined if none is available.
21
22
  * @param nupkgPaths Finalized `.nupkg` file paths to sign.
@@ -1,4 +1,4 @@
1
- import type { ITelemetryService } from "@uipath/common/telemetry";
1
+ import type { ITelemetryService } from "@uipath/common";
2
2
  import { type IFileSystem, ToolResult } from "@uipath/solutionpackager-tool-core";
3
3
  import type { ProjectBuildOptions } from "../models/project-build-options.js";
4
4
  import type { ProjectPackOptions } from "../models/project-pack-options.js";
@@ -128,25 +128,20 @@ export declare class ProjectPackager implements IProjectPackager {
128
128
  * shape they get from SolutionPackager — just with one project.
129
129
  */
130
130
  private createOperationContext;
131
- /**
132
- * Find .nupkg files produced by the tool in the parent directory.
133
- * Tools like WorkflowCompiler create the .nupkg in the output root
134
- * while reporting the content subdirectory in OutputPackages[].Path.
135
- * Only returns .nupkg files whose name starts with the subdirectory
136
- * name (the package id) to avoid picking up unrelated packages.
137
- */
138
- private findNupkgInParentDir;
139
131
  /**
140
132
  * Copy a single file to the destination, throwing if the read fails.
141
133
  */
142
134
  private copyFileToDestination;
143
135
  /**
144
- * Copy packages from the output path to the destination path.
145
- * Handles file paths, directories with .nupkg files, and directories with
146
- * unpacked NuGet content (e.g., content/, lib/ folders from WorkflowCompiler).
147
- * @param packagePaths Paths to the package files or directories
136
+ * Copy produced packages to the destination path.
137
+ *
138
+ * Most tools return a .nupkg file path (copied directly), but the workflow
139
+ * compiler reports the package content *folder*. For a folder, resolve it
140
+ * to the produced .nupkg(s) via the shared resolver and copy those. If the
141
+ * folder holds no .nupkg anywhere, pack it from content as a last resort.
142
+ * @param packagePaths Paths to the produced packages (files or folders)
148
143
  * @param destinationPath Destination directory
149
- * @param packageInfo NuGet package info for creating .nupkg from unpacked content
144
+ * @param packageInfo NuGet package info for packing unpacked content
150
145
  * @returns Paths to the copied package files
151
146
  */
152
147
  private copyPackagesToDestination;
@@ -1,8 +1,6 @@
1
- import type { ITelemetryService } from "@uipath/common/telemetry";
1
+ import type { ITelemetryService } from "@uipath/common";
2
2
  import { type IProjectBuildOptions, type IProjectPackOptions, type IProjectRestoreOptions, type IProjectValidateOptions, type ProjectOperationContext, ToolResult } from "@uipath/solutionpackager-tool-core";
3
- import type { PackageSigningInfo } from "../models/packager-parameters.js";
4
3
  import type { UiPathProject } from "../models/project-models.js";
5
- import type { IPackageSignService } from "./package-sign-service.js";
6
4
  import type { IToolsFactory } from "./tools-factory.js";
7
5
  /**
8
6
  * Interface for executing project tool operations
@@ -11,26 +9,18 @@ export interface IProjectToolExecutor {
11
9
  restoreAsync(options: IProjectRestoreOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
12
10
  validateAsync(options: IProjectValidateOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
13
11
  buildAsync(options: IProjectBuildOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
14
- packAsync(options: IProjectPackOptions, project: UiPathProject, context?: ProjectOperationContext, signingInfo?: PackageSigningInfo, cancellationToken?: AbortSignal): Promise<ToolResult>;
12
+ packAsync(options: IProjectPackOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
15
13
  }
16
14
  export declare class ProjectToolExecutor implements IProjectToolExecutor {
17
15
  private readonly toolsFactory;
18
16
  private readonly telemetry;
19
- private readonly packageSignService?;
20
- constructor(toolsFactory: IToolsFactory, telemetry: ITelemetryService, packageSignService?: IPackageSignService | undefined);
17
+ constructor(toolsFactory: IToolsFactory, telemetry: ITelemetryService);
21
18
  restoreAsync(options: IProjectRestoreOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
22
19
  validateAsync(options: IProjectValidateOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
23
20
  buildAsync(options: IProjectBuildOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
24
- packAsync(options: IProjectPackOptions, project: UiPathProject, context?: ProjectOperationContext, signingInfo?: PackageSigningInfo, cancellationToken?: AbortSignal): Promise<ToolResult>;
21
+ packAsync(options: IProjectPackOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
25
22
  /**
26
23
  * Execute an operation on a project tool with proper creation and disposal.
27
24
  */
28
25
  private executeToolOperationAsync;
29
- /**
30
- * Sign all packages using the package sign service.
31
- * @param packages - Array of package paths to sign
32
- * @param signingInfo - Signing configuration
33
- * @returns ToolResult indicating success or failure
34
- */
35
- private signPackagesAsync;
36
26
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1 @@
1
- import "@uipath/packager-tool-connector";
2
- import "@uipath/packager-tool-workflowcompiler";
3
- import "@uipath/packager-tool-apiworkflow";
4
- import "@uipath/packager-tool-flow";
5
- import "@uipath/tool-agent";
6
- import "@uipath/packager-tool-functions";
7
- import "@uipath/packager-tool-webapp";
8
- import "@uipath/resource-builder-tool";
1
+ export {};
package/package.json CHANGED
@@ -1,60 +1,43 @@
1
1
  {
2
- "name": "@uipath/project-packager",
3
- "license": "MIT",
4
- "version": "1.196.0",
5
- "description": "UiPath Project Packager - core library for packing individual UiPath projects",
6
- "type": "module",
7
- "main": "./dist/index.js",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/src/index.d.ts",
11
- "default": "./dist/index.js"
12
- },
13
- "./node": {
14
- "types": "./dist/src/node.d.ts",
15
- "default": "./dist/node.js"
16
- },
17
- "./browser": {
18
- "types": "./dist/src/browser.d.ts",
19
- "default": "./dist/browser.js"
20
- }
2
+ "name": "@uipath/project-packager",
3
+ "license": "MIT",
4
+ "version": "1.197.0-preview.65",
5
+ "description": "UiPath Project Packager - core library for packing individual UiPath projects",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/src/index.d.ts",
11
+ "default": "./dist/index.js"
21
12
  },
22
- "types": "./dist/src/index.d.ts",
23
- "repository": {
24
- "type": "git",
25
- "url": "https://github.com/UiPath/cli.git",
26
- "directory": "packages/packager/project-packager"
13
+ "./node": {
14
+ "types": "./dist/src/node.d.ts",
15
+ "default": "./dist/node.js"
27
16
  },
28
- "publishConfig": {
29
- "registry": "https://registry.npmjs.org/"
30
- },
31
- "files": [
32
- "dist",
33
- "!dist/**/*.map"
34
- ],
35
- "dependencies": {
36
- "@uipath/filesystem": "1.196.0",
37
- "@uipath/solutionpackager-tool-core": "1.196.0",
38
- "@uipath/common": "1.196.0"
39
- },
40
- "peerDependencies": {
41
- "fflate": "^0.8.2"
42
- },
43
- "devDependencies": {
44
- "@types/node": "^25.5.2",
45
- "@uipath/resource-builder-tool": "2025.11.0-alpha2928-3101",
46
- "@uipath/tool-agent": "^1.2.6",
47
- "@uipath/packager-tool-apiworkflow": "1.196.0",
48
- "@uipath/packager-tool-connector": "1.196.0",
49
- "@uipath/packager-tool-flow": "1.196.0",
50
- "@uipath/packager-tool-functions": "1.196.0",
51
- "@uipath/packager-tool-webapp": "1.196.0",
52
- "@uipath/packager-tool-workflowcompiler": "1.196.0",
53
- "@vitest/coverage-v8": "^4.1.6",
54
- "jsdom": "^29.0.0",
55
- "typescript": "^6.0.2",
56
- "vite-tsconfig-paths": "^6.1.1",
57
- "vitest": "^4.1.6"
58
- },
59
- "gitHead": "bed2b46f1ec33a47a7dcae2e6d4b7ab99bd06981"
17
+ "./browser": {
18
+ "types": "./dist/src/browser.d.ts",
19
+ "default": "./dist/browser.js"
20
+ }
21
+ },
22
+ "types": "./dist/src/index.d.ts",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://github.com/UiPath/cli.git",
26
+ "directory": "packages/packager/project-packager"
27
+ },
28
+ "publishConfig": {
29
+ "registry": "https://registry.npmjs.org/"
30
+ },
31
+ "files": [
32
+ "dist"
33
+ ],
34
+ "dependencies": {
35
+ "@uipath/filesystem": "1.197.0",
36
+ "@uipath/solutionpackager-tool-core": "1.197.0",
37
+ "@uipath/common": "1.197.0"
38
+ },
39
+ "peerDependencies": {
40
+ "fflate": "^0.8.2"
41
+ },
42
+ "gitHead": "9388ccbe5e739c9578bfd9b5395980fb63e11d9c"
60
43
  }