@uipath/solutionpackager-tool-core 1.204.0-preview.254 → 1.205.0-preview.256

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.js CHANGED
@@ -1289,7 +1289,20 @@ async function writeOrBackfillOperateProjectId(operateFilePath, projectId, fs, c
1289
1289
 
1290
1290
  // src/services/content-operate-file.ts
1291
1291
  var OPERATE_SCHEMA = "https://cloud.uipath.com/draft/2024-12/operate";
1292
- async function resolveEntryPointMain(fs, sourceFolder) {
1292
+ function withoutContentPrefix(filePath) {
1293
+ return filePath.replace(/^\/?content\//, "");
1294
+ }
1295
+ function pickMain(entryPoints, mainFile) {
1296
+ if (mainFile) {
1297
+ const wanted = withoutContentPrefix(mainFile);
1298
+ const declared = entryPoints.find(({ filePath }) => filePath !== undefined && withoutContentPrefix(filePath) === wanted)?.filePath;
1299
+ if (declared) {
1300
+ return declared;
1301
+ }
1302
+ }
1303
+ return entryPoints[0]?.filePath ?? "";
1304
+ }
1305
+ async function resolveEntryPointMain(fs, sourceFolder, mainFile) {
1293
1306
  const entryPointsFilePath = Path.join(sourceFolder, NugetConstants.EntryPointsFileName);
1294
1307
  if (!await fs.exists(entryPointsFilePath)) {
1295
1308
  return "";
@@ -1300,7 +1313,7 @@ async function resolveEntryPointMain(fs, sourceFolder) {
1300
1313
  }
1301
1314
  try {
1302
1315
  const parsed = JSON.parse(new TextDecoder().decode(content));
1303
- return parsed.entryPoints?.[0]?.filePath ?? "";
1316
+ return pickMain(parsed.entryPoints ?? [], mainFile);
1304
1317
  } catch {
1305
1318
  return "";
1306
1319
  }
@@ -1308,7 +1321,7 @@ async function resolveEntryPointMain(fs, sourceFolder) {
1308
1321
  async function writeContentOperateFile(fs, params) {
1309
1322
  const operateFilePath = Path.join(params.contentFolder, NugetConstants.OperateFileName);
1310
1323
  await writeOrBackfillOperateProjectId(operateFilePath, params.projectId, fs, async () => {
1311
- const main = await resolveEntryPointMain(fs, params.contentFolder);
1324
+ const main = await resolveEntryPointMain(fs, params.contentFolder, params.mainFile);
1312
1325
  const operateFileModel = {
1313
1326
  $schema: OPERATE_SCHEMA,
1314
1327
  contentType: params.contentType,
@@ -1328,7 +1341,8 @@ async function ensureContentOperateFile(fs, params) {
1328
1341
  await writeContentOperateFile(fs, {
1329
1342
  contentFolder: params.contentFolder,
1330
1343
  projectId,
1331
- contentType: params.contentType
1344
+ contentType: params.contentType,
1345
+ mainFile: params.mainFile
1332
1346
  });
1333
1347
  }
1334
1348
  // src/services/nuget-packager.ts
@@ -1599,4 +1613,4 @@ export {
1599
1613
  writeOrBackfillOperateProjectId
1600
1614
  };
1601
1615
 
1602
- //# debugId=5AA988775C09FACD64756E2164756E21
1616
+ //# debugId=795C911A64F7FD5664756E2164756E21
@@ -2,6 +2,7 @@ export { BuildConfiguration } from "./build-configuration.js";
2
2
  export type { ConnectionInfo } from "./connection-info.js";
3
3
  export { toRelativeUrl } from "./connection-info.js";
4
4
  export { normalizeIgnoredRules } from "./ignored-rules.js";
5
+ export type { LocalEntityRef } from "./local-entity-ref.js";
5
6
  export { LogLevel, LogMessage } from "./log-message.js";
6
7
  export { NugetConstants } from "./nuget-constants.js";
7
8
  export type { NugetFeedModel } from "./nuget-feed-model.js";
@@ -0,0 +1,16 @@
1
+ /**
2
+ * An entity a solution authors locally, as a flow binds to it.
3
+ *
4
+ * Shared by the two packagers on either side of the binding: the Data Fabric
5
+ * packager reads these off disk, the Flow packager binds nodes to them. Neither
6
+ * imports the other — the Flow packager is handed a reader at runtime — so the
7
+ * contract lives here, below both.
8
+ */
9
+ export interface LocalEntityRef {
10
+ /** The resource's own casing. */
11
+ name: string;
12
+ /** What the solution resource and deploy overrides key on. */
13
+ resourceKey: string;
14
+ /** `UNASSIGNED_FOLDER_ID` until deploy or debug overwrites it. */
15
+ folderId: string;
16
+ }
@@ -6,12 +6,19 @@ export interface ContentOperateFileParams {
6
6
  projectId: string;
7
7
  /** operate.json `contentType` for this tool (e.g. ProjectTypes.Api). */
8
8
  contentType: string;
9
+ /**
10
+ * The file the user chose as main (`project.uiproj`'s `MainFile`). The
11
+ * entry point declaring it becomes `main`; absent or unmatched, the first
12
+ * entry point does.
13
+ */
14
+ mainFile?: string;
9
15
  }
10
16
  /**
11
17
  * Ensure content/operate.json carries `projectId`. An existing file is
12
18
  * backfilled in place; a missing one is scaffolded with the standard operate
13
- * model for `contentType`, deriving `main` from entry-points.json. Shared by
14
- * the packager tools that emit this same operate shape.
19
+ * model for `contentType`, deriving `main` from entry-points.json — the entry
20
+ * point matching `mainFile`, else the first one. Shared by the packager tools
21
+ * that emit this same operate shape.
15
22
  */
16
23
  export declare function writeContentOperateFile(fs: IFileSystem, params: ContentOperateFileParams): Promise<void>;
17
24
  export interface BuildContentOperateFileParams {
@@ -23,6 +30,8 @@ export interface BuildContentOperateFileParams {
23
30
  projectStorageId?: string;
24
31
  /** operate.json `contentType` for this tool (e.g. ProjectTypes.Api). */
25
32
  contentType: string;
33
+ /** See {@link ContentOperateFileParams.mainFile}. */
34
+ mainFile?: string;
26
35
  }
27
36
  /**
28
37
  * Resolve a stable projectId (projectStorageId, else ensureProjectId on the
@@ -4,7 +4,7 @@ export type { INugetPackager, NugetPackagerResult } from "./nuget-packager.js";
4
4
  export { NugetPackager } from "./nuget-packager.js";
5
5
  export { ensureProjectId, ensureProjectIdInOperateFile, writeOrBackfillOperateProjectId, } from "./project-id.js";
6
6
  export type { ProjectOperationContext } from "./project-operation-context.js";
7
- export type { ProjectContributionError, ProjectResourceContribution, ProjectSpecPatch, } from "./project-resource-contribution.js";
7
+ export type { ProjectBindingResource, ProjectContributionError, ProjectResourceContribution, ProjectSpecPatch, } from "./project-resource-contribution.js";
8
8
  export { ProjectTool } from "./project-tool.js";
9
9
  export type { IProjectToolFactory } from "./project-tool-factory.js";
10
10
  export { SolutionTool } from "./solution-tool.js";
@@ -15,6 +15,8 @@ export interface ProjectOperationContext {
15
15
  * Projects involved in the operation
16
16
  */
17
17
  projects: UiPathProject[];
18
+ /** Directory that owns shared solution files during a solution pack. */
19
+ solutionRoot?: string;
18
20
  /**
19
21
  * URL to download the snapshot for remote packing
20
22
  */
@@ -64,6 +66,17 @@ export interface ProjectOperationContext {
64
66
  * Version of the workflow compiler to use for remote packing
65
67
  */
66
68
  workflowCompilerVersion?: string;
69
+ /**
70
+ * Version of the Functions packager the remote agent restores to pack
71
+ * Function projects. Unset lets the agent use its own default.
72
+ */
73
+ functionsPackagerVersion?: string;
74
+ /**
75
+ * Version of the coded apps packager the remote agent restores to build
76
+ * and pack coded app (AppV2) projects. Unset lets the agent use its own
77
+ * default.
78
+ */
79
+ codedAppsPackagerVersion?: string;
67
80
  /**
68
81
  * Lock key of the editing session that triggered the operation.
69
82
  */
@@ -29,6 +29,15 @@ export interface ProjectSpecPatch {
29
29
  */
30
30
  values: Record<string, unknown>;
31
31
  }
32
+ /**
33
+ * One entry of a `bindings_v2.json` `resources[]` array: the shared,
34
+ * project-type-neutral binding format every solution project uses.
35
+ */
36
+ export interface ProjectBindingResource {
37
+ resource: string;
38
+ key?: string;
39
+ [field: string]: unknown;
40
+ }
32
41
  export interface ProjectResourceContribution {
33
42
  /** Blocking problems. Any entry fails `solution pack`. */
34
43
  errors?: ProjectContributionError[];
@@ -50,4 +59,15 @@ export interface ProjectResourceContribution {
50
59
  * value is worse than none.
51
60
  */
52
61
  projectSubType?: string;
62
+ /**
63
+ * The binding resources this project uses, as the `resources[]` of the
64
+ * `bindings_v2.json` its package would carry.
65
+ *
66
+ * For a type that keeps its bindings in its own source format. A derived
67
+ * `bindings_v2.json` may also be maintained beside that source, but can
68
+ * be absent or out of date. When present, the host reads these in place
69
+ * of that project's derived file, including any hand edits to it. Omit
70
+ * this for a type whose `bindings_v2.json` on disk is its source.
71
+ */
72
+ bindings?: ProjectBindingResource[];
53
73
  }
@@ -23,11 +23,16 @@ export interface IProjectToolFactory {
23
23
  * Describe what this project contributes to its solution's resources.
24
24
  * Called with the project's own directory; implementations read only files
25
25
  * they own and return plain data — no `.uipx`, no resource JSON.
26
+ * `sharesSolutionDirectory` lets a project avoid claiming files owned by
27
+ * the solution when its project directory is the solution root.
26
28
  *
27
- * Optional so every existing factory stays valid. A registered factory
28
- * without it is reported by the caller, not silently skipped: tool bundles
29
- * version independently of the host, so a missing method means "the
30
- * installed tool is older than this host", which the user has to hear.
29
+ * Optional so every existing factory stays valid. Tool bundles version
30
+ * independently of the host, so a missing method may mean the installed
31
+ * tool is older than this host — but it may equally mean this type has
32
+ * nothing to contribute, and a caller cannot tell the two apart. How a
33
+ * caller reports the absence is its own policy.
31
34
  */
32
- describeResourcesAsync?(projectDir: string, fileSystem: IFileSystem): Promise<ProjectResourceContribution>;
35
+ describeResourcesAsync?(projectDir: string, fileSystem: IFileSystem, context?: {
36
+ sharesSolutionDirectory: boolean;
37
+ }): Promise<ProjectResourceContribution>;
33
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/solutionpackager-tool-core",
3
- "version": "1.204.0-preview.254",
3
+ "version": "1.205.0-preview.256",
4
4
  "description": "UiPath contracts for solution packager tools",
5
5
  "type": "module",
6
6
  "exports": {
@@ -24,8 +24,8 @@
24
24
  "registry": "https://registry.npmjs.org/"
25
25
  },
26
26
  "dependencies": {
27
- "@uipath/filesystem": "1.204.0",
27
+ "@uipath/filesystem": "1.205.0",
28
28
  "fflate": "^0.8.2"
29
29
  },
30
- "gitHead": "3ee79cdec05b36231a8da9e8de6bf0043585526a"
30
+ "gitHead": "63740c6cbb7ff282fa9118cc16a148eb030b245f"
31
31
  }