@uipath/project-packager 1.1.10 → 1.196.0

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 (44) hide show
  1. package/dist/browser.js +2380 -0
  2. package/dist/index.js +1331 -131
  3. package/dist/node.js +1225 -110
  4. package/dist/src/base-browser-packager-factory.d.ts +37 -0
  5. package/dist/src/base-node-packager-factory.d.ts +9 -2
  6. package/dist/src/browser-project-packager-factory.d.ts +26 -0
  7. package/dist/src/browser.d.ts +3 -0
  8. package/dist/src/i18n/locales/en.d.ts +30 -1
  9. package/dist/src/index.d.ts +6 -2
  10. package/dist/src/models/packager-config.d.ts +2 -2
  11. package/dist/src/models/packager-parameters.d.ts +8 -0
  12. package/dist/src/models/project-build-options.d.ts +4 -0
  13. package/dist/src/models/project-models.d.ts +0 -11
  14. package/dist/src/node.d.ts +18 -3
  15. package/dist/src/publish/models/publish-options.d.ts +158 -0
  16. package/dist/src/publish/node-project-publisher-factory.d.ts +6 -0
  17. package/dist/src/publish/services/local-folder-publisher.d.ts +19 -0
  18. package/dist/src/publish/services/nuget-feed-publisher.d.ts +29 -0
  19. package/dist/src/publish/services/orchestrator-feed-types.d.ts +98 -0
  20. package/dist/src/publish/services/orchestrator-feeds-service.d.ts +44 -0
  21. package/dist/src/publish/services/orchestrator-publisher.d.ts +78 -0
  22. package/dist/src/publish/services/project-publisher.d.ts +29 -0
  23. package/dist/src/services/dotnet-discovery-service.d.ts +18 -0
  24. package/dist/src/services/nupkg-resolver.d.ts +20 -0
  25. package/dist/src/services/package-sign-service.d.ts +3 -2
  26. package/dist/src/services/package-signer.d.ts +24 -0
  27. package/dist/src/services/project-loader.d.ts +0 -1
  28. package/dist/src/services/project-packager.d.ts +19 -13
  29. package/dist/src/services/project-tool-executor.d.ts +1 -1
  30. package/dist/tests/{project-packager-e2e.test.d.ts → project-packager.e2e.test.d.ts} +1 -0
  31. package/dist/tests/project-packager.spec.d.ts +1 -0
  32. package/dist/tests/publish/local-folder-publisher.spec.d.ts +1 -0
  33. package/dist/tests/publish/nuget-feed-publisher.spec.d.ts +1 -0
  34. package/dist/tests/publish/orchestrator-feeds-service.spec.d.ts +1 -0
  35. package/dist/tests/publish/orchestrator-publisher.spec.d.ts +1 -0
  36. package/dist/tests/publish/project-publisher.spec.d.ts +1 -0
  37. package/dist/tests/tools-factory-repository.spec.d.ts +1 -0
  38. package/package.json +23 -30
  39. /package/dist/tests/{governance-policy-service.test.d.ts → governance-policy-service.spec.d.ts} +0 -0
  40. /package/dist/tests/{pack-service.test.d.ts → pack-service.spec.d.ts} +0 -0
  41. /package/dist/tests/{project-loader.test.d.ts → project-loader.spec.d.ts} +0 -0
  42. /package/dist/tests/{project-packager.test.d.ts → project-pack-options-builder.spec.d.ts} +0 -0
  43. /package/dist/tests/{project-tool-executor.test.d.ts → project-tool-executor.spec.d.ts} +0 -0
  44. /package/dist/tests/{tools-factory-repository.test.d.ts → publish/node-project-publisher-factory.spec.d.ts} +0 -0
@@ -0,0 +1,37 @@
1
+ import { type ITelemetryService } from "@uipath/common/telemetry";
2
+ import type { IFileSystem } from "@uipath/solutionpackager-tool-core";
3
+ import type { PackagerConfig } from "./models/packager-config.js";
4
+ /**
5
+ * Base factory class containing common functionality for browser packager factories.
6
+ *
7
+ * Mirrors {@link BaseNodePackagerFactory} on the browser side: shared
8
+ * filesystem + telemetry defaults, log-handler wiring, and locale config.
9
+ * Subclasses (`BrowserProjectPackagerFactory`, `BrowserSolutionPackagerFactory`)
10
+ * compose these to build their respective packager instances.
11
+ */
12
+ export declare abstract class BaseBrowserPackagerFactory {
13
+ /**
14
+ * Returns the provided file system or the shared {@link BrowserFileSystem}
15
+ * singleton, creating + initializing it on first call. The singleton is
16
+ * shared across browser factories so files written by one are visible to
17
+ * the others.
18
+ * @param config - Configuration options containing optional file system
19
+ */
20
+ protected getOrCreateFileSystem(config?: PackagerConfig): Promise<IFileSystem>;
21
+ /**
22
+ * Returns the provided telemetry service or creates a default one
23
+ * (`ConsoleTelemetryProvider` + `BrowserContextStorage`).
24
+ * @param config - Configuration options containing optional telemetry service
25
+ */
26
+ protected getOrCreateTelemetryService(config?: PackagerConfig): ITelemetryService;
27
+ /**
28
+ * Configures the global log handler if provided in config.
29
+ * @param config - Configuration options containing optional log handler
30
+ */
31
+ protected configureLogHandler(config?: PackagerConfig): void;
32
+ /**
33
+ * Configures the translation locale.
34
+ * @param config - Configuration options containing optional language
35
+ */
36
+ protected configureLanguage(config?: PackagerConfig): void;
37
+ }
@@ -1,10 +1,16 @@
1
+ import { type ITelemetryService } from "@uipath/common";
1
2
  import type { IFileSystem, IToolLogger } from "@uipath/solutionpackager-tool-core";
2
- import { type ITelemetryService } from "@uipath/telemetry/node";
3
3
  import type { PackagerConfig } from "./models/packager-config.js";
4
+ import type { IDotnetDiscoveryService } from "./services/dotnet-discovery-service.js";
4
5
  /**
5
6
  * Base factory class containing common functionality for Node.js packager factories.
6
7
  */
7
8
  export declare abstract class BaseNodePackagerFactory {
9
+ /**
10
+ * Subclasses set this when they want {@link checkDotnetAvailability} to
11
+ * actually probe for `dotnet`. Left undefined, the check is a no-op.
12
+ */
13
+ protected dotnetDiscovery?: IDotnetDiscoveryService;
8
14
  /**
9
15
  * Returns the provided file system or creates a default NodeFileSystem.
10
16
  * @param config - Configuration options containing optional file system
@@ -18,7 +24,8 @@ export declare abstract class BaseNodePackagerFactory {
18
24
  */
19
25
  protected getOrCreateTelemetryService(config?: PackagerConfig): ITelemetryService;
20
26
  /**
21
- * Checks dotnet CLI availability and logs appropriate messages.
27
+ * Checks dotnet CLI availability and logs appropriate messages. Skipped
28
+ * entirely when {@link dotnetDiscovery} is undefined.
22
29
  * @param logger - Logger instance to use for logging
23
30
  */
24
31
  protected checkDotnetAvailability(logger: IToolLogger): void;
@@ -0,0 +1,26 @@
1
+ import type { PackagerConfig } from "./models/packager-config.js";
2
+ import { type IProjectPackager } from "./services/project-packager.js";
3
+ /**
4
+ * Creates a ProjectPackager instance configured for browser usage.
5
+ *
6
+ * This is a convenience function that creates a BrowserProjectPackagerFactory and calls createAsync.
7
+ *
8
+ * @param options - Configuration options for the ProjectPackager
9
+ * @returns Promise<IProjectPackager> - A fully configured ProjectPackager instance ready for use in the browser.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * // Import tools (triggers self-registration)
14
+ * import '@uipath/packager-tool-connector';
15
+ * import '@uipath/packager-tool-flow';
16
+ *
17
+ * // Create ProjectPackager
18
+ * const packager = await createBrowserProjectPackager({
19
+ * logHandler: (message) => console.log(message)
20
+ * });
21
+ *
22
+ * // Tools are already registered and ready to use
23
+ * await packager.packAsync(options);
24
+ * ```
25
+ */
26
+ export declare function createBrowserProjectPackager(options?: PackagerConfig): Promise<IProjectPackager>;
@@ -0,0 +1,3 @@
1
+ import "./i18n/index.js";
2
+ export { BaseBrowserPackagerFactory } from "./base-browser-packager-factory.js";
3
+ export { createBrowserProjectPackager } from "./browser-project-packager-factory.js";
@@ -48,8 +48,37 @@ export declare const en: {
48
48
  readonly errors: {
49
49
  readonly dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed.";
50
50
  };
51
+ };
52
+ readonly dotnet: {
51
53
  readonly info: {
52
- readonly dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package.";
54
+ readonly available: "dotnet CLI is available (version {version}).";
55
+ };
56
+ readonly warnings: {
57
+ readonly notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available.";
58
+ };
59
+ };
60
+ readonly publish: {
61
+ readonly errors: {
62
+ readonly atLeastOnePackage: "At least one package path is required.";
63
+ readonly packageNotFound: "Package file not found: {path}";
64
+ readonly unknownDestination: "Unknown publish destination: {destination}";
65
+ readonly publishFailed: "Publish failed: {message}";
66
+ readonly failedToReadPackage: "Failed to read package file: {path}";
67
+ readonly localFolderRequired: "Local folder destination requires a folderPath.";
68
+ readonly localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}";
69
+ readonly nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.";
70
+ readonly nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}";
71
+ readonly nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}";
72
+ readonly orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.";
73
+ readonly orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.";
74
+ readonly orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}";
75
+ readonly orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}";
76
+ readonly orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}";
77
+ readonly orchestratorNoPackages: "No package files were provided to publish.";
78
+ readonly orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}";
79
+ readonly orchestratorUrlRequired: "Orchestrator URL is required.";
80
+ readonly getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}";
81
+ readonly getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}";
53
82
  };
54
83
  };
55
84
  };
@@ -1,6 +1,6 @@
1
1
  import "./i18n/index.js";
2
- export type { IContextStorage, ITelemetryProvider, ITelemetryService, TelemetryContext, TelemetryProperties, } from "@uipath/telemetry";
3
- export { BrowserContextStorage, ConsoleTelemetryProvider, TelemetryService, } from "@uipath/telemetry";
2
+ export type { IContextStorage, ITelemetryProvider, ITelemetryService, TelemetryContext, TelemetryProperties, } from "@uipath/common/telemetry";
3
+ export { BrowserContextStorage, ConsoleTelemetryProvider, TelemetryService, } from "@uipath/common/telemetry";
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";
@@ -9,6 +9,10 @@ export type { UiPathProject } from "./models/project-models.js";
9
9
  export { ProjectPackOptions } from "./models/project-pack-options.js";
10
10
  export { ProjectRestoreOptions } from "./models/project-restore-options.js";
11
11
  export { ProjectValidateOptions } from "./models/project-validate-options.js";
12
+ export type { LocalFolderDestination, NugetFeedDestination, OrchestratorCustomDestination, OrchestratorDestination, OrchestratorPersonalWorkspaceDestination, OrchestratorSharedLibrariesDestination, OrchestratorTenantProcessesDestination, PublishDestination, } from "./publish/models/publish-options.js";
13
+ export { ProjectPublishOptions, PublishDestinationKind, } from "./publish/models/publish-options.js";
14
+ export type { IProjectPublisher } from "./publish/services/project-publisher.js";
15
+ export { ProjectPublisher } from "./publish/services/project-publisher.js";
12
16
  export type { IGovernancePolicyService } from "./services/governance-policy-service.js";
13
17
  export { GovernancePolicyService } from "./services/governance-policy-service.js";
14
18
  export type { IPackService } from "./services/pack-service.js";
@@ -1,11 +1,11 @@
1
+ import type { ITelemetryService } from "@uipath/common/telemetry";
1
2
  import type { IFileSystem } from "@uipath/solutionpackager-tool-core";
2
- import type { ITelemetryService } from "@uipath/telemetry";
3
3
  import type { LogHandler } from "../services/tool-logger.js";
4
4
  /**
5
5
  * Configuration for packager factories.
6
6
  */
7
7
  export interface PackagerConfig {
8
- /** Optional telemetry service. If not provided, a default TelemetryService with ConsoleTelemetryProvider is created. */
8
+ /** Optional telemetry service. If not provided, a default TelemetryService with DebugTelemetryProvider is created. */
9
9
  telemetryService?: ITelemetryService;
10
10
  /** Optional file system. If not provided, a default NodeFileSystem is created. */
11
11
  fileSystem?: IFileSystem;
@@ -18,6 +18,10 @@ export interface ValidateOptions {
18
18
  * Whether to skip analysis
19
19
  */
20
20
  skipAnalyze: boolean;
21
+ /**
22
+ * Whether to skip validation
23
+ */
24
+ skipValidate: boolean;
21
25
  /**
22
26
  * Default severity level
23
27
  */
@@ -87,6 +91,10 @@ export declare abstract class PackagerParameters {
87
91
  * Input path to the solution or project folder
88
92
  */
89
93
  inputPath: string;
94
+ /**
95
+ * URL to download the project/solution snapshot for remote packing.
96
+ */
97
+ downloadUrl?: string;
90
98
  /**
91
99
  * Log level for the packager
92
100
  */
@@ -3,4 +3,8 @@ import { ProjectValidateOptions } from "./project-validate-options.js";
3
3
  * Project-specific parameters for build operations
4
4
  */
5
5
  export declare class ProjectBuildOptions extends ProjectValidateOptions {
6
+ /**
7
+ * Output package type passed through to the project build tool.
8
+ */
9
+ outputType?: string;
6
10
  }
@@ -13,14 +13,3 @@ export interface LoadedUiProject {
13
13
  /** Path to the project file (project.uiproj or webAppManifest.json) */
14
14
  projectFilePath: string;
15
15
  }
16
- /**
17
- * DTO matching the project.uiproj file format
18
- */
19
- export interface UiProject {
20
- ProjectType: string;
21
- /** Lowercase variant used by some project types (e.g., Flow) */
22
- type?: string;
23
- Name: string;
24
- Description: string | null;
25
- MainFile: string;
26
- }
@@ -1,9 +1,15 @@
1
1
  import "./i18n/index.js";
2
- export type { IContextStorage, ITelemetryProvider, ITelemetryService, TelemetryContext, TelemetryProperties, } from "@uipath/telemetry/node";
3
- export { ConsoleTelemetryProvider, NodeContextStorage, TelemetryService, } from "@uipath/telemetry/node";
2
+ export type { IContextStorage, ITelemetryProvider, ITelemetryService, TelemetryContext, TelemetryProperties, } from "@uipath/common";
3
+ export { DebugTelemetryProvider, NodeContextStorage, TelemetryService, } from "@uipath/common";
4
+ /**
5
+ * @deprecated Use {@link DebugTelemetryProvider} instead. This re-export is kept
6
+ * for one release cycle to avoid breaking external consumers and will be removed
7
+ * in the next minor version.
8
+ */
9
+ export { ConsoleTelemetryProvider } from "@uipath/common/telemetry";
4
10
  export { BaseNodePackagerFactory } from "./base-node-packager-factory.js";
5
11
  export type { PackagerConfig } from "./models/packager-config.js";
6
- export type { PackageSigningInfo, ValidateOptions, } from "./models/packager-parameters.js";
12
+ export type { PackageSigningInfo, PackOptions, PublishInfo, ValidateOptions, } from "./models/packager-parameters.js";
7
13
  export { PackagerParameters, RulesConfigFileType, } from "./models/packager-parameters.js";
8
14
  export { ProjectBuildOptions } from "./models/project-build-options.js";
9
15
  export type { UiPathProject } from "./models/project-models.js";
@@ -11,6 +17,15 @@ export { ProjectPackOptions } from "./models/project-pack-options.js";
11
17
  export { ProjectRestoreOptions } from "./models/project-restore-options.js";
12
18
  export { ProjectValidateOptions } from "./models/project-validate-options.js";
13
19
  export { createNodeProjectPackager } from "./node-project-packager-factory.js";
20
+ export type { LocalFolderDestination, NugetFeedDestination, OrchestratorCustomDestination, OrchestratorDestination, OrchestratorPersonalWorkspaceDestination, OrchestratorSharedLibrariesDestination, OrchestratorTenantProcessesDestination, PublishDestination, } from "./publish/models/publish-options.js";
21
+ export { ProjectPublishOptions, PublishDestinationKind, } from "./publish/models/publish-options.js";
22
+ export { createNodeProjectPublisher } from "./publish/node-project-publisher-factory.js";
23
+ export type { IProjectPublisher } from "./publish/services/project-publisher.js";
24
+ export { ProjectPublisher } from "./publish/services/project-publisher.js";
25
+ export type { IDotnetDiscoveryService } from "./services/dotnet-discovery-service.js";
26
+ export { DotnetDiscoveryService } from "./services/dotnet-discovery-service.js";
27
+ export type { IGovernancePolicyService } from "./services/governance-policy-service.js";
28
+ export { GovernancePolicyService } from "./services/governance-policy-service.js";
14
29
  export type { IPackService } from "./services/pack-service.js";
15
30
  export { PackService } from "./services/pack-service.js";
16
31
  export type { IPackageSignService } from "./services/package-sign-service.js";
@@ -0,0 +1,158 @@
1
+ import type { ConnectionInfo } from "@uipath/solutionpackager-tool-core";
2
+ /**
3
+ * Identifies a destination kind for publishing a .nupkg.
4
+ *
5
+ * The three orchestrator kinds map to feed purposes returned by
6
+ * `/orchestrator_/api/PackageFeeds/GetFeeds` (see `PackageFeedDto.purpose`).
7
+ * Callers pick the kind they want; the publisher resolves the matching
8
+ * feed itself.
9
+ */
10
+ export declare enum PublishDestinationKind {
11
+ LocalFolder = "LocalFolder",
12
+ NugetFeed = "NugetFeed",
13
+ OrchestratorPersonalWorkspace = "OrchestratorPersonalWorkspace",
14
+ OrchestratorTenantProcesses = "OrchestratorTenantProcesses",
15
+ OrchestratorSharedLibraries = "OrchestratorSharedLibraries",
16
+ OrchestratorCustom = "OrchestratorCustom"
17
+ }
18
+ /**
19
+ * Local folder destination.
20
+ *
21
+ * Only meaningful in desktop (Node.js) usage. In the browser the operation
22
+ * targets the virtual BrowserFileSystem.
23
+ */
24
+ export interface LocalFolderDestination {
25
+ kind: PublishDestinationKind.LocalFolder;
26
+ /**
27
+ * Absolute path to the folder where the .nupkg files will be written.
28
+ */
29
+ folderPath: string;
30
+ /**
31
+ * Overwrite existing files with the same name in the destination folder.
32
+ * Defaults to `true`.
33
+ */
34
+ overwrite?: boolean;
35
+ }
36
+ /**
37
+ * NuGet V2 feed destination (push API).
38
+ *
39
+ * The .nupkg is uploaded as multipart/form-data via PUT to
40
+ * `<feedUrl>` (when it already targets `.../api/v2/package`) or
41
+ * `<feedUrl>/api/v2/package` otherwise.
42
+ */
43
+ export interface NugetFeedDestination {
44
+ kind: PublishDestinationKind.NugetFeed;
45
+ /**
46
+ * NuGet feed base URL (with or without trailing `/api/v2/package`).
47
+ */
48
+ feedUrl: string;
49
+ /**
50
+ * NuGet API key, sent as `X-NuGet-ApiKey`.
51
+ */
52
+ apiKey?: string;
53
+ }
54
+ /**
55
+ * Shared shape for all UiPath Orchestrator destinations.
56
+ *
57
+ * Package files are POSTed as `multipart/form-data` to
58
+ * `<orchestratorRoot>/odata/{Processes|Libraries}/UiPath.Server.Configuration.OData.UploadPackage`.
59
+ * The publisher resolves the target feed itself by calling
60
+ * `/api/PackageFeeds/GetFeeds` and matching on `PackageFeedDto.purpose`
61
+ * — callers don't pass any feed data.
62
+ *
63
+ * The Orchestrator URL is derived from `connectionInfo.cloudUrl`.
64
+ */
65
+ interface OrchestratorBaseDestination {
66
+ /**
67
+ * Connection details for the target Orchestrator instance.
68
+ */
69
+ connectionInfo: ConnectionInfo;
70
+ }
71
+ /**
72
+ * Personal-workspace orchestrator feed (`Purpose: PersonalWorkspace`).
73
+ * The publisher resolves the workspace feed for the authenticated user
74
+ * and uploads to it; `X-UIPATH-OrganizationUnitId` is set from the
75
+ * resolved `feed.folderId`.
76
+ */
77
+ export interface OrchestratorPersonalWorkspaceDestination extends OrchestratorBaseDestination {
78
+ kind: PublishDestinationKind.OrchestratorPersonalWorkspace;
79
+ }
80
+ /**
81
+ * Tenant-level "Processes" orchestrator feed (`Purpose: Processes`).
82
+ * Use this for processes that should be accessible across folders.
83
+ */
84
+ export interface OrchestratorTenantProcessesDestination extends OrchestratorBaseDestination {
85
+ kind: PublishDestinationKind.OrchestratorTenantProcesses;
86
+ }
87
+ /**
88
+ * Tenant-level "Shared Libraries" orchestrator feed
89
+ * (`Purpose: Libraries`). Used for RPA libraries (project type
90
+ * ProcessLibrary / BusinessProcessLibrary).
91
+ *
92
+ * The orchestrator rejects tenant uploads to host shared library feeds unless
93
+ * a folder context is set. The caller must provide one as `folderId`;
94
+ * it is sent verbatim as `X-UIPATH-OrganizationUnitId`.
95
+ */
96
+ export interface OrchestratorSharedLibrariesDestination extends OrchestratorBaseDestination {
97
+ kind: PublishDestinationKind.OrchestratorSharedLibraries;
98
+ /**
99
+ * Orchestrator folder Id used as the `X-UIPATH-OrganizationUnitId`
100
+ * header. Any selectable folder the user can see works — Studio
101
+ * Desktop sends whatever folder is currently in scope in its UI.
102
+ */
103
+ folderId: number;
104
+ }
105
+ /**
106
+ * Custom orchestrator destination where the caller supplies the full
107
+ * upload URL (e.g. `https://host/orchestrator_/odata/Processes/...
108
+ * UploadPackage?feedId=...`). The publisher POSTs the multipart form to
109
+ * `publishUrl` verbatim — no feed resolution, no URL derivation from
110
+ * `connectionInfo.cloudUrl`. `connectionInfo` is still used for the
111
+ * `Authorization` and `X-UIPATH-TenantId` headers.
112
+ */
113
+ export interface OrchestratorCustomDestination extends OrchestratorBaseDestination {
114
+ kind: PublishDestinationKind.OrchestratorCustom;
115
+ /**
116
+ * Full publish URL — POSTed as-is.
117
+ */
118
+ publishUrl: string;
119
+ /**
120
+ * Optional folder context. When set, sent verbatim as
121
+ * `X-UIPATH-OrganizationUnitId`.
122
+ */
123
+ folderId?: number;
124
+ /**
125
+ * Optional NuGet feed API key. When set, sent as `X-NuGet-ApiKey`
126
+ * — required by ApiKey-authed shared library feeds that go through
127
+ * the NuGet v3 push protocol.
128
+ */
129
+ apiKey?: string;
130
+ }
131
+ /**
132
+ * Discriminated union of every supported Orchestrator destination.
133
+ */
134
+ export type OrchestratorDestination = OrchestratorPersonalWorkspaceDestination | OrchestratorTenantProcessesDestination | OrchestratorSharedLibrariesDestination | OrchestratorCustomDestination;
135
+ export type PublishDestination = LocalFolderDestination | NugetFeedDestination | OrchestratorDestination;
136
+ /**
137
+ * Options accepted by `IProjectPublisher.publishAsync`.
138
+ */
139
+ export declare class ProjectPublishOptions {
140
+ /**
141
+ * Absolute paths to the .nupkg files to publish.
142
+ */
143
+ packagePaths: string[];
144
+ /**
145
+ * Destination to publish to.
146
+ */
147
+ destination: PublishDestination;
148
+ constructor(
149
+ /**
150
+ * Absolute paths to the .nupkg files to publish.
151
+ */
152
+ packagePaths: string[],
153
+ /**
154
+ * Destination to publish to.
155
+ */
156
+ destination: PublishDestination);
157
+ }
158
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { PackagerConfig } from "../models/packager-config.js";
2
+ import { type IProjectPublisher } from "./services/project-publisher.js";
3
+ /**
4
+ * Convenience function: creates a ProjectPublisher configured for Node.js usage.
5
+ */
6
+ export declare function createNodeProjectPublisher(options?: PackagerConfig): Promise<IProjectPublisher>;
@@ -0,0 +1,19 @@
1
+ import type { IFileSystem } from "@uipath/solutionpackager-tool-core";
2
+ import { ToolResult } from "@uipath/solutionpackager-tool-core";
3
+ import type { LocalFolderDestination } from "../models/publish-options.js";
4
+ /**
5
+ * Copies .nupkg files into a local folder.
6
+ *
7
+ * Uses the supplied `IFileSystem`, so it works on both the Node filesystem
8
+ * and the browser-side virtual filesystem - though in practice this
9
+ * destination only makes sense in desktop usage.
10
+ */
11
+ export interface ILocalFolderPublisher {
12
+ publishAsync(packagePaths: string[], destination: LocalFolderDestination): Promise<ToolResult>;
13
+ }
14
+ export declare class LocalFolderPublisher implements ILocalFolderPublisher {
15
+ private readonly fileSystem;
16
+ private readonly logger;
17
+ constructor(fileSystem: IFileSystem);
18
+ publishAsync(packagePaths: string[], destination: LocalFolderDestination): Promise<ToolResult>;
19
+ }
@@ -0,0 +1,29 @@
1
+ import type { IFileSystem } from "@uipath/solutionpackager-tool-core";
2
+ import { ToolResult } from "@uipath/solutionpackager-tool-core";
3
+ import type { NugetFeedDestination } from "../models/publish-options.js";
4
+ /**
5
+ * Publishes .nupkg files to a NuGet feed using the standard `push` API.
6
+ *
7
+ * The feed receives a `PUT` with a multipart/form-data body containing the
8
+ * .nupkg under the field name `package`. Both v2 feeds (push at
9
+ * `<feedUrl>/api/v2/package`) and v3 feeds (push URL resolved from the
10
+ * service index's `PackagePublish/2.0.0` resource) are supported.
11
+ */
12
+ export interface INugetFeedPublisher {
13
+ publishAsync(packagePaths: string[], destination: NugetFeedDestination): Promise<ToolResult>;
14
+ }
15
+ export declare class NugetFeedPublisher implements INugetFeedPublisher {
16
+ private readonly fileSystem;
17
+ private readonly logger;
18
+ constructor(fileSystem: IFileSystem);
19
+ publishAsync(packagePaths: string[], destination: NugetFeedDestination): Promise<ToolResult>;
20
+ private resolvePushUrl;
21
+ /**
22
+ * Resolve the push endpoint from a NuGet v3 service index (e.g.
23
+ * `http://localhost:5555/v3/index.json`). The index lists resources by
24
+ * `@type`; the push URL is the `@id` of the `PackagePublish/2.0.0`
25
+ * resource. See https://learn.microsoft.com/en-us/nuget/api/package-publish-resource.
26
+ */
27
+ private resolveFromServiceIndex;
28
+ private safeReadBody;
29
+ }
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Local type and enum definitions for the small slice of the UiPath
3
+ * Orchestrator API that the publisher needs — package-feed discovery
4
+ * (`/api/PackageFeeds/GetFeeds`) and the folders-navigation lookup
5
+ * (`/api/FoldersNavigation/GetAllFoldersForCurrentUser`).
6
+ *
7
+ * These mirror the shapes that used to come from
8
+ * `@uipath/orchestrator-sdk`. That dependency was dropped so
9
+ * `@uipath/project-packager` can be published without pulling in the
10
+ * full generated Orchestrator client — the two GET calls the publisher
11
+ * performs are reimplemented over `fetch` (see
12
+ * {@link OrchestratorFeedsService}). The interfaces carry every field
13
+ * the SDK DTOs exposed; the enum string values are copied verbatim so
14
+ * comparisons against live API responses still hold. Enum fields the
15
+ * publisher never switches on (folder type / provision / permission
16
+ * model) are typed as plain `string` to avoid re-declaring enums that
17
+ * nobody reads.
18
+ */
19
+ /**
20
+ * Connection details for talking to a single Orchestrator instance when
21
+ * the caller already has a token. `orchestratorUrl` should point at the
22
+ * Orchestrator root, with or without the trailing `/orchestrator_`
23
+ * segment — the feeds service tolerates both shapes.
24
+ */
25
+ export interface OrchestratorConnection {
26
+ orchestratorUrl: string;
27
+ accessToken?: string;
28
+ tenantId?: string;
29
+ }
30
+ /** Feed purpose, as returned on `PackageFeedDto.purpose`. */
31
+ export declare const PackageFeedDtoPurposeEnum: {
32
+ readonly Undefined: "Undefined";
33
+ readonly Processes: "Processes";
34
+ readonly Libraries: "Libraries";
35
+ readonly PersonalWorkspace: "PersonalWorkspace";
36
+ readonly FolderHierarchy: "FolderHierarchy";
37
+ };
38
+ export type PackageFeedDtoPurposeEnum = (typeof PackageFeedDtoPurposeEnum)[keyof typeof PackageFeedDtoPurposeEnum];
39
+ /** Feed authentication type, as returned on `PackageFeedDto.authenticationType`. */
40
+ export declare const PackageFeedDtoAuthenticationTypeEnum: {
41
+ readonly Secure: "Secure";
42
+ readonly ApiKey: "ApiKey";
43
+ readonly Basic: "Basic";
44
+ };
45
+ export type PackageFeedDtoAuthenticationTypeEnum = (typeof PackageFeedDtoAuthenticationTypeEnum)[keyof typeof PackageFeedDtoAuthenticationTypeEnum];
46
+ /**
47
+ * A package feed the user can publish to. `/api/PackageFeeds/GetFeeds`
48
+ * returns these with camelCase property names, so the response is used
49
+ * as-is.
50
+ */
51
+ export interface PackageFeedDto {
52
+ name?: string;
53
+ purpose?: PackageFeedDtoPurposeEnum;
54
+ isShared?: boolean;
55
+ isPublic?: boolean;
56
+ isExternal?: boolean;
57
+ feedUrl?: string;
58
+ publishUrl?: string;
59
+ authenticationType?: PackageFeedDtoAuthenticationTypeEnum;
60
+ apiKey?: string;
61
+ basicUserName?: string;
62
+ basicPassword?: string;
63
+ folderId?: number;
64
+ supportedProjectTypes?: string[];
65
+ id?: string;
66
+ }
67
+ /** Folder feed type, as returned on `ExtendedFolderDto.feedType`. */
68
+ export declare const ExtendedFolderDtoFeedTypeEnum: {
69
+ readonly Undefined: "Undefined";
70
+ readonly Processes: "Processes";
71
+ readonly Libraries: "Libraries";
72
+ readonly PersonalWorkspace: "PersonalWorkspace";
73
+ readonly FolderHierarchy: "FolderHierarchy";
74
+ };
75
+ export type ExtendedFolderDtoFeedTypeEnum = (typeof ExtendedFolderDtoFeedTypeEnum)[keyof typeof ExtendedFolderDtoFeedTypeEnum];
76
+ /**
77
+ * A folder visible to the current user. Unlike the feeds endpoint,
78
+ * `/api/FoldersNavigation/GetAllFoldersForCurrentUser` returns
79
+ * PascalCase property names (`DisplayName`, `FeedType`, `Id`, …), so the
80
+ * raw response is mapped to this camelCase shape before use.
81
+ */
82
+ export interface ExtendedFolderDto {
83
+ isSelectable?: boolean;
84
+ hasChildren?: boolean;
85
+ level?: number;
86
+ key?: string;
87
+ displayName?: string;
88
+ fullyQualifiedName?: string;
89
+ description?: string;
90
+ folderType?: string;
91
+ isPersonal?: boolean;
92
+ provisionType?: string;
93
+ permissionModel?: string;
94
+ parentId?: number;
95
+ parentKey?: string;
96
+ feedType?: ExtendedFolderDtoFeedTypeEnum;
97
+ id?: number;
98
+ }
@@ -0,0 +1,44 @@
1
+ import type { ExtendedFolderDto, OrchestratorConnection, PackageFeedDto } from "./orchestrator-feed-types.js";
2
+ export type { OrchestratorConnection } from "./orchestrator-feed-types.js";
3
+ /**
4
+ * Public API of {@link OrchestratorFeedsService}.
5
+ *
6
+ * Mirrors the surface of Studio desktop's
7
+ * `IOrchestratorFeedsService` — the test browser, the Node CLI, and the
8
+ * robot all need a way to enumerate the feeds a user can publish to
9
+ * before they pick one.
10
+ */
11
+ export interface IOrchestratorFeedsService {
12
+ /**
13
+ * Lists every feed the authenticated user can publish to. Returns
14
+ * an empty array when the API responds 200 with no feeds.
15
+ */
16
+ getAccessibleFeedsAsync(connection: OrchestratorConnection): Promise<PackageFeedDto[]>;
17
+ /**
18
+ * Lists folders the authenticated user can see, including the
19
+ * special personal-workspace folder. Use the `feedType` field to
20
+ * find folder-purpose matches (e.g. `PersonalWorkspace`) — feeds
21
+ * returned from `getAccessibleFeedsAsync` only carry `Processes`
22
+ * or `Libraries` as their `purpose`, so this is the only way to
23
+ * tell which folder feed is the user's PW.
24
+ */
25
+ getFoldersForCurrentUserAsync(connection: OrchestratorConnection): Promise<ExtendedFolderDto[]>;
26
+ }
27
+ /**
28
+ * Talks directly to the package-feeds and folders-navigation endpoints
29
+ * over `fetch`. Studio Web's publisher uses the returned `publishUrl`
30
+ * (and `id` as the `feedId` query string) to upload the .nupkg — this
31
+ * service is the discovery half of that flow.
32
+ *
33
+ * These were previously two typed calls through
34
+ * `@uipath/orchestrator-sdk`; both are plain authenticated GETs, so
35
+ * they're issued directly here to keep the published package free of the
36
+ * full generated Orchestrator client.
37
+ */
38
+ export declare class OrchestratorFeedsService implements IOrchestratorFeedsService {
39
+ private readonly logger;
40
+ constructor();
41
+ getAccessibleFeedsAsync(connection: OrchestratorConnection): Promise<PackageFeedDto[]>;
42
+ getFoldersForCurrentUserAsync(connection: OrchestratorConnection): Promise<ExtendedFolderDto[]>;
43
+ private ensureOrchestratorUrl;
44
+ }