@uipath/packager-tool-case 0.0.8 → 1.197.0-preview.64
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/case-tool.d.ts +0 -5
- package/dist/index.d.ts +2 -1
- package/dist/index.js +12 -33
- package/package.json +29 -57
- package/src/case-tool.ts +5 -62
- package/src/index.ts +9 -1
package/dist/case-tool.d.ts
CHANGED
|
@@ -24,11 +24,6 @@ export declare class CaseTool extends ProjectTool {
|
|
|
24
24
|
* Create operate.json file if it doesn't already exist
|
|
25
25
|
*/
|
|
26
26
|
private createOperateFile;
|
|
27
|
-
/**
|
|
28
|
-
* Create the operate.json file with project configuration.
|
|
29
|
-
* Uses contentType "CaseManagement".
|
|
30
|
-
*/
|
|
31
|
-
private createOperateJsonFile;
|
|
32
27
|
/**
|
|
33
28
|
* Create package-descriptor.json file.
|
|
34
29
|
* Lists standard packaging files and .bpmn files from content/.
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { CaseToolFactory } from "./case-tool-factory.js";
|
|
2
|
+
export { CaseToolFactory };
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
|
|
9
9
|
// src/case-tool.ts
|
|
10
10
|
import {
|
|
11
|
+
ensureContentOperateFile,
|
|
11
12
|
NugetConstants,
|
|
12
13
|
NugetPackager,
|
|
13
14
|
Path,
|
|
@@ -100,39 +101,12 @@ class CaseTool extends ProjectTool {
|
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
async createOperateFile(options, contentFolder) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
async createOperateJsonFile(projectPath, projectId, filePath) {
|
|
110
|
-
const entryPointsFilePath = Path.join(projectPath, CaseConstants.EntryPointsFileName);
|
|
111
|
-
let mainPath = "";
|
|
112
|
-
const entryPointsExists = await this.fileSystem.exists(entryPointsFilePath);
|
|
113
|
-
if (entryPointsExists) {
|
|
114
|
-
const entryPointsContent = await this.fileSystem.readFile(entryPointsFilePath);
|
|
115
|
-
if (entryPointsContent) {
|
|
116
|
-
try {
|
|
117
|
-
const entryPointsText = new TextDecoder().decode(entryPointsContent);
|
|
118
|
-
const entryPoints = JSON.parse(entryPointsText);
|
|
119
|
-
mainPath = entryPoints.entryPoints?.[0]?.filePath ?? "";
|
|
120
|
-
} catch {}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
const operateFileModel = {
|
|
124
|
-
$schema: "https://cloud.uipath.com/draft/2024-12/operate",
|
|
125
|
-
contentType: ProjectTypes.CaseManagement,
|
|
126
|
-
projectId,
|
|
127
|
-
main: mainPath,
|
|
128
|
-
targetFramework: "Portable",
|
|
129
|
-
runtimeOptions: {
|
|
130
|
-
isAttended: false,
|
|
131
|
-
requiresUserInteraction: false
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
const operateJsonString = JSON.stringify(operateFileModel, null, 2);
|
|
135
|
-
await this.fileSystem.writeFile(filePath, operateJsonString);
|
|
104
|
+
await ensureContentOperateFile(this.fileSystem, {
|
|
105
|
+
contentFolder,
|
|
106
|
+
projectPath: options.projectPath,
|
|
107
|
+
projectStorageId: options.projectStorageId,
|
|
108
|
+
contentType: ProjectTypes.CaseManagement
|
|
109
|
+
});
|
|
136
110
|
}
|
|
137
111
|
async createPackageDescriptor(localBuildFolder, contentFolder) {
|
|
138
112
|
const descriptorFiles = {};
|
|
@@ -166,3 +140,8 @@ class CaseToolFactory {
|
|
|
166
140
|
|
|
167
141
|
// src/index.ts
|
|
168
142
|
toolsFactoryRepository.registerProjectToolFactory(new CaseToolFactory);
|
|
143
|
+
export {
|
|
144
|
+
CaseToolFactory
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
//# debugId=C4347E7455C1904D64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,59 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"publish:dry": "bun publish --dry-run",
|
|
32
|
-
"publish:gh": "bun publish",
|
|
33
|
-
"version:patch": "bun version patch --no-git-tag-version",
|
|
34
|
-
"version:minor": "bun version minor --no-git-tag-version",
|
|
35
|
-
"version:major": "bun version major --no-git-tag-version",
|
|
36
|
-
"lint": "biome check ."
|
|
37
|
-
},
|
|
38
|
-
"files": [
|
|
39
|
-
"dist",
|
|
40
|
-
"!dist/**/*.map",
|
|
41
|
-
"src"
|
|
42
|
-
],
|
|
43
|
-
"author": "",
|
|
44
|
-
"license": "ISC",
|
|
45
|
-
"peerDependencies": {
|
|
46
|
-
"@uipath/solutionpackager-tool-core": "0.0.33"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@types/node": "^25.5.0",
|
|
50
|
-
"@uipath/solutionpackager-tool-core": "0.0.33",
|
|
51
|
-
"@vitest/browser": "^4.0.14",
|
|
52
|
-
"@vitest/browser-playwright": "^4.0.14",
|
|
53
|
-
"@vitest/coverage-v8": "^4.0.14",
|
|
54
|
-
"playwright": "^1.57.0",
|
|
55
|
-
"typescript": "^5.9.3",
|
|
56
|
-
"vitest": "^4.0.14"
|
|
57
|
-
},
|
|
58
|
-
"gitHead": "3f1b4d8e9f910be81e4cab956537f21dbd5d63ac"
|
|
2
|
+
"name": "@uipath/packager-tool-case",
|
|
3
|
+
"version": "1.197.0-preview.64",
|
|
4
|
+
"description": "UiPath Case Management tool implementation",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"source": "./src/index.ts",
|
|
9
|
+
"default": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/UiPath/cli.git",
|
|
15
|
+
"directory": "packages/packager/packager-tool-case"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"registry": "https://registry.npmjs.org/"
|
|
19
|
+
},
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"src"
|
|
24
|
+
],
|
|
25
|
+
"author": "",
|
|
26
|
+
"license": "ISC",
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@uipath/solutionpackager-tool-core": "1.197.0"
|
|
29
|
+
},
|
|
30
|
+
"gitHead": "3977b977945bf519336258da69fd271433eaaef4"
|
|
59
31
|
}
|
package/src/case-tool.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
EntryPointsFileModel,
|
|
3
2
|
IProjectBuildOptions,
|
|
4
3
|
IProjectPackOptions,
|
|
5
4
|
IProjectRestoreOptions,
|
|
6
5
|
IProjectValidateOptions,
|
|
7
6
|
} from "@uipath/solutionpackager-tool-core";
|
|
8
7
|
import {
|
|
8
|
+
ensureContentOperateFile,
|
|
9
9
|
type IFileSystem,
|
|
10
10
|
type IToolLogger,
|
|
11
11
|
NugetConstants,
|
|
@@ -182,69 +182,12 @@ export class CaseTool extends ProjectTool {
|
|
|
182
182
|
options: IProjectBuildOptions,
|
|
183
183
|
contentFolder: string,
|
|
184
184
|
): Promise<void> {
|
|
185
|
-
|
|
185
|
+
await ensureContentOperateFile(this.fileSystem, {
|
|
186
186
|
contentFolder,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
const exists = await this.fileSystem.exists(operateJsonFilePath);
|
|
191
|
-
if (!exists) {
|
|
192
|
-
await this.createOperateJsonFile(
|
|
193
|
-
contentFolder,
|
|
194
|
-
options.projectStorageId ?? "",
|
|
195
|
-
operateJsonFilePath,
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Create the operate.json file with project configuration.
|
|
202
|
-
* Uses contentType "CaseManagement".
|
|
203
|
-
*/
|
|
204
|
-
private async createOperateJsonFile(
|
|
205
|
-
projectPath: string,
|
|
206
|
-
projectId: string,
|
|
207
|
-
filePath: string,
|
|
208
|
-
): Promise<void> {
|
|
209
|
-
const entryPointsFilePath = Path.join(
|
|
210
|
-
projectPath,
|
|
211
|
-
CaseConstants.EntryPointsFileName,
|
|
212
|
-
);
|
|
213
|
-
let mainPath = "";
|
|
214
|
-
|
|
215
|
-
const entryPointsExists =
|
|
216
|
-
await this.fileSystem.exists(entryPointsFilePath);
|
|
217
|
-
if (entryPointsExists) {
|
|
218
|
-
const entryPointsContent =
|
|
219
|
-
await this.fileSystem.readFile(entryPointsFilePath);
|
|
220
|
-
if (entryPointsContent) {
|
|
221
|
-
try {
|
|
222
|
-
const entryPointsText = new TextDecoder().decode(
|
|
223
|
-
entryPointsContent,
|
|
224
|
-
);
|
|
225
|
-
const entryPoints: EntryPointsFileModel =
|
|
226
|
-
JSON.parse(entryPointsText);
|
|
227
|
-
mainPath = entryPoints.entryPoints?.[0]?.filePath ?? "";
|
|
228
|
-
} catch {
|
|
229
|
-
// Ignore parsing errors, use empty mainPath
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
const operateFileModel = {
|
|
235
|
-
$schema: "https://cloud.uipath.com/draft/2024-12/operate",
|
|
187
|
+
projectPath: options.projectPath,
|
|
188
|
+
projectStorageId: options.projectStorageId,
|
|
236
189
|
contentType: ProjectTypes.CaseManagement,
|
|
237
|
-
|
|
238
|
-
main: mainPath,
|
|
239
|
-
targetFramework: "Portable",
|
|
240
|
-
runtimeOptions: {
|
|
241
|
-
isAttended: false,
|
|
242
|
-
requiresUserInteraction: false,
|
|
243
|
-
},
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
const operateJsonString = JSON.stringify(operateFileModel, null, 2);
|
|
247
|
-
await this.fileSystem.writeFile(filePath, operateJsonString);
|
|
190
|
+
});
|
|
248
191
|
}
|
|
249
192
|
|
|
250
193
|
/**
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Case Management tool factory.
|
|
2
|
+
//
|
|
3
|
+
// Self-registers on import so micro-frontend consumers (whose MFEs UiPath does
|
|
4
|
+
// not control) that load this package via a side-effect import get the factory
|
|
5
|
+
// registered automatically — StudioWeb does not reference this package, so it
|
|
6
|
+
// relies on self-registration. Also exported for consumers that register
|
|
7
|
+
// explicitly; re-registering the same factory class is an idempotent no-op.
|
|
2
8
|
import { toolsFactoryRepository } from "@uipath/solutionpackager-tool-core";
|
|
3
9
|
import { CaseToolFactory } from "./case-tool-factory.js";
|
|
4
10
|
|
|
5
11
|
toolsFactoryRepository.registerProjectToolFactory(new CaseToolFactory());
|
|
12
|
+
|
|
13
|
+
export { CaseToolFactory };
|