@uipath/packager-tool-case 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.
|
@@ -17,4 +17,7 @@ export declare const CASE_ROLE_RESOURCE_TYPE = "case-role";
|
|
|
17
17
|
* this is the pack-time equivalent. Reads only files the case project owns and
|
|
18
18
|
* returns plain data (AGENTS.md Hard Rule #19).
|
|
19
19
|
*/
|
|
20
|
-
export declare function describeCaseRoles(projectDir: string, fs: IFileSystem
|
|
20
|
+
export declare function describeCaseRoles(projectDir: string, fs: IFileSystem, options?: {
|
|
21
|
+
/** Leave out a role with no `Role` entry instead of failing (a Debug build). */
|
|
22
|
+
skipUnbound?: boolean;
|
|
23
|
+
}): Promise<ProjectResourceContribution>;
|
|
@@ -5,6 +5,12 @@ import { type IFileSystem, type IProjectToolFactory, type IToolLogger, type Proj
|
|
|
5
5
|
export declare class CaseToolFactory implements IProjectToolFactory {
|
|
6
6
|
readonly supportedTypes: readonly ProjectType[];
|
|
7
7
|
createAsync(logger: IToolLogger, fileSystem: IFileSystem): Promise<ProjectTool>;
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The case roles' spec — see `case-role-contribution.ts`. A debug run's
|
|
10
|
+
* pack leaves out a role with no `Role` entry instead of failing: Studio Web's
|
|
11
|
+
* debug-time sidecar binds none, and a debug run does not need them.
|
|
12
|
+
*/
|
|
13
|
+
describeResourcesAsync(projectDir: string, fileSystem: IFileSystem, context?: {
|
|
14
|
+
forDebug?: boolean;
|
|
15
|
+
}): Promise<ProjectResourceContribution>;
|
|
10
16
|
}
|
package/dist/index.js
CHANGED
|
@@ -226,7 +226,7 @@ var readCaseRoles = (plan) => caseRoleEntries(plan).flatMap((entry) => {
|
|
|
226
226
|
var BINDINGS_FILE_NAME = "bindings_v2.json";
|
|
227
227
|
var ROLE_RESOURCE_KIND = "role";
|
|
228
228
|
var CASE_ROLE_RESOURCE_TYPE = "case-role";
|
|
229
|
-
async function describeCaseRoles(projectDir, fs) {
|
|
229
|
+
async function describeCaseRoles(projectDir, fs, options) {
|
|
230
230
|
const entries = await fs.readdir(projectDir);
|
|
231
231
|
const planName = findCasePlanFileName(entries);
|
|
232
232
|
if (planName === undefined)
|
|
@@ -254,7 +254,7 @@ async function describeCaseRoles(projectDir, fs) {
|
|
|
254
254
|
const reconciled = reconcileRoleBindings(sidecar, roles);
|
|
255
255
|
const bound = roleBindingNames(reconciled.resources);
|
|
256
256
|
const unbound = roles.filter((role) => !bound.has(role.name));
|
|
257
|
-
if (unbound.length > 0) {
|
|
257
|
+
if (unbound.length > 0 && !options?.skipUnbound) {
|
|
258
258
|
const names = unbound.map((role) => `"${role.name}"`).join(", ");
|
|
259
259
|
return {
|
|
260
260
|
errors: [
|
|
@@ -266,8 +266,11 @@ async function describeCaseRoles(projectDir, fs) {
|
|
|
266
266
|
]
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
+
const deployed = roles.filter((role) => bound.has(role.name));
|
|
270
|
+
if (deployed.length === 0)
|
|
271
|
+
return {};
|
|
269
272
|
return {
|
|
270
|
-
specPatch:
|
|
273
|
+
specPatch: deployed.map(rolePatch),
|
|
271
274
|
...reconciled.changed && {
|
|
272
275
|
bindings: reconciled.resources
|
|
273
276
|
}
|
|
@@ -634,8 +637,10 @@ class CaseToolFactory {
|
|
|
634
637
|
async createAsync(logger, fileSystem) {
|
|
635
638
|
return new CaseTool(fileSystem, logger);
|
|
636
639
|
}
|
|
637
|
-
async describeResourcesAsync(projectDir, fileSystem) {
|
|
638
|
-
return describeCaseRoles(projectDir, fileSystem
|
|
640
|
+
async describeResourcesAsync(projectDir, fileSystem, context) {
|
|
641
|
+
return describeCaseRoles(projectDir, fileSystem, {
|
|
642
|
+
skipUnbound: context?.forDebug === true
|
|
643
|
+
});
|
|
639
644
|
}
|
|
640
645
|
}
|
|
641
646
|
|
|
@@ -661,4 +666,4 @@ export {
|
|
|
661
666
|
withCasePlanDefaults
|
|
662
667
|
};
|
|
663
668
|
|
|
664
|
-
//# debugId=
|
|
669
|
+
//# debugId=D6ACCE921512AACC64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/packager-tool-case",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.207.0-preview.307",
|
|
4
4
|
"description": "UiPath Case Management tool implementation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"author": "UiPath",
|
|
30
30
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@uipath/solutionpackager-tool-core": "1.
|
|
32
|
+
"@uipath/solutionpackager-tool-core": "1.207.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "a625ed8ac421089170db3cb8b95c497f3c7b0d62"
|
|
35
35
|
}
|