@uipath/solution-tool 1.205.0-preview.277 → 1.206.0-preview.279
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/{archive-extract-x35t9ktj.js → archive-extract-136rn3ja.js} +13 -15
- package/dist/{cleanup-command-service-dwbrt6d9.js → cleanup-command-service-ejakyhea.js} +34 -31
- package/dist/deploy-delete-service-r7abfh28.js +23 -0
- package/dist/deploy-run-service-rnthz10q.js +23 -0
- package/dist/{deploy-status-service-xw2nzh7m.js → deploy-status-service-6my5vm61.js} +72 -62
- package/dist/deploy.js +35 -37
- package/dist/deployment-search-gfm907tx.js +54 -0
- package/dist/{embedded-file-reader-z4becc02.js → embedded-file-reader-0228j82a.js} +1 -4
- package/dist/feed-resolver-14crsx5y.js +27 -0
- package/dist/feed-scope-failure-67cyybn0.js +20 -0
- package/dist/feed-session-g94q2bjc.js +23 -0
- package/dist/first-party-service-n3vva2m4.js +8 -0
- package/dist/governance-options-t20vsznh.js +19 -0
- package/dist/index-aspmac9f.js +24 -0
- package/dist/index-ddk6v1ej.js +60 -0
- package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
- package/dist/index-qq4kre7a.js +93 -0
- package/dist/index-t262f2xv.js +16 -0
- package/dist/index.js +33 -34
- package/dist/init.js +18 -21
- package/dist/{jmespath-231m3hyn.js → jmespath-ab6tdc42.js} +1 -1
- package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/{list-zckdhv0c.js → list-jntan9tx.js} +23 -23
- package/dist/models/pack-command-types.d.ts +3 -1
- package/dist/node-kwzcw5ex.js +25 -0
- package/dist/pack-command-service-pwaeha7y.js +29 -0
- package/dist/{pack-project-erd95bt1.js → pack-project-ztt1hfrs.js} +33 -40
- package/dist/pack.js +26 -30
- package/dist/package-id-4tsg5jsb.js +11 -0
- package/dist/{packager-tool-d3cmmbw1.js → packager-tool-1bz9h5ca.js} +11 -11
- package/dist/{packager-tool-gs3f3tf7.js → packager-tool-1ctvbx0h.js} +1 -1
- package/dist/{packager-tool-r1jvvm8y.js → packager-tool-55ztfccd.js} +176 -196
- package/dist/{packager-tool-wrg41m7t.js → packager-tool-95y24705.js} +37 -39
- package/dist/{packager-tool-bkjqza3a.js → packager-tool-9j8e5q1z.js} +184 -33
- package/dist/{packager-tool-tx834spe.js → packager-tool-9vrwpgt3.js} +757 -309
- package/dist/packager-tool-a6va4gc5.js +1178 -0
- package/dist/{packager-tool-pbmqk39a.js → packager-tool-a7s0gbxs.js} +33 -28
- package/dist/{packager-tool-47wzvqw0.js → packager-tool-aws5w512.js} +6 -6
- package/dist/{packager-tool-97rcgwvv.js → packager-tool-bs1jn1yn.js} +331 -55
- package/dist/packager-tool-c64hqa8n.js +106 -0
- package/dist/{packager-tool-5ddtwzva.js → packager-tool-ca5ngmqv.js} +12 -12
- package/dist/{packager-tool-6kz1pv9f.js → packager-tool-d1texmvn.js} +828 -338
- package/dist/{packager-tool-1de529jm.js → packager-tool-epsr41wx.js} +12 -3
- package/dist/packager-tool-f84z7nds.js +130 -0
- package/dist/{packager-tool-8ptbmmmp.js → packager-tool-fp46ebde.js} +147 -76
- package/dist/packager-tool-fqs6hdcy.js +290 -0
- package/dist/{packager-tool-3bwnkjdq.js → packager-tool-fx4ws49n.js} +12 -12
- package/dist/{packager-tool-6ybywxxn.js → packager-tool-m07vyk89.js} +371 -221
- package/dist/{packager-tool-hsya909c.js → packager-tool-nrhqgr4z.js} +273 -255
- package/dist/{packager-tool-61pwb567.js → packager-tool-ppj5f4y7.js} +6 -7
- package/dist/{packager-tool-qqbt4b44.js → packager-tool-pyt9fvty.js} +51 -48
- package/dist/packager-tool-q5d9df2q.js +74 -0
- package/dist/{packager-tool-ph7fg1aa.js → packager-tool-q8ryk6q9.js} +122 -89
- package/dist/{packager-tool-t8gh825q.js → packager-tool-qf8753ee.js} +53 -41
- package/dist/{packager-tool-60af1hw2.js → packager-tool-qzcd5c9s.js} +3 -3
- package/dist/packager-tool-resolver-td3bhccd.js +20 -0
- package/dist/{packager-tool-dfrk01gn.js → packager-tool-rj2d1g0w.js} +154 -154
- package/dist/{packager-tool-a4bs7wtm.js → packager-tool-snm6s7b5.js} +15 -15
- package/dist/{packager-tool-43ahv5mn.js → packager-tool-t39pjz7n.js} +35 -18
- package/dist/{packager-tool-f2hsb9ta.js → packager-tool-t3a48ys5.js} +305 -657
- package/dist/{packager-tool-cjjk2ek2.js → packager-tool-t3ahzjh1.js} +356 -298
- package/dist/{packager-tool-v1f5e8t9.js → packager-tool-vgrswa8p.js} +53 -8
- package/dist/packager-tool-vrtabg73.js +2307 -0
- package/dist/{packager-tool-gmwva4yv.js → packager-tool-vx2c68sb.js} +2 -2
- package/dist/{packager-tool-4pkzxkty.js → packager-tool-vx39dhvn.js} +65 -35
- package/dist/{packager-tool-zn76tbxc.js → packager-tool-w34wyhwf.js} +13 -15
- package/dist/packager-tool-w8bcwfd3.js +280 -0
- package/dist/{packager-tool-3gwrcgrc.js → packager-tool-wm0h0wa1.js} +18 -18
- package/dist/{packager-tool-b2nhscfk.js → packager-tool-wm8nj6e9.js} +18 -18
- package/dist/{packager-tool-amhyxzz6.js → packager-tool-x33sdw6n.js} +16 -16
- package/dist/{packager-tool-wy4fx250.js → packager-tool-yetmzme9.js} +89 -30
- package/dist/{packager-tool-6tyyvhh0.js → packager-tool-z5r49ky9.js} +75 -9
- package/dist/packager-tool.js +6 -7
- package/dist/prepare-solution-resources-pwnyvtza.js +26 -0
- package/dist/{project-command-utils-t6pmpvq3.js → project-command-utils-zcmbecfy.js} +23 -26
- package/dist/project-contributions-kh9yftvg.js +27 -0
- package/dist/publish.js +17 -17
- package/dist/resource-mutations-mfn5k1hb.js +27 -0
- package/dist/{resource-version-lookup-0e3e2j58.js → resource-version-lookup-6ejh1hwd.js} +20 -23
- package/dist/resource.js +13 -16
- package/dist/{restore-command-service-2g02d7s1.js → restore-command-service-n880dxre.js} +37 -34
- package/dist/{run-service-6necpy9s.js → run-service-4vhn6mtb.js} +144 -66
- package/dist/services/deploy-activate-service.d.ts +2 -1
- package/dist/services/deployment-search-client.d.ts +2 -1
- package/dist/services/deployment-search.d.ts +39 -0
- package/dist/services/feed-resolver.d.ts +13 -1
- package/dist/services/feed-selection.d.ts +8 -5
- package/dist/services/feed-session.d.ts +34 -0
- package/dist/services/install-run.d.ts +92 -0
- package/dist/services/prepare-solution-resources.d.ts +11 -2
- package/dist/services/project-contributions.d.ts +2 -0
- package/dist/services/project-identity-telemetry.d.ts +3 -0
- package/dist/services/publish-service.d.ts +20 -3
- package/dist/services/solution-identity.d.ts +18 -0
- package/dist/ship-telemetry-bkf3800w.js +16 -0
- package/dist/solution-auth-jxcgd2m0.js +10 -0
- package/dist/solution-identity-92h2fbpa.js +19 -0
- package/dist/templates/AGENTS.md +27 -29
- package/dist/tool.js +32 -33
- package/package.json +2 -2
- package/dist/deploy-delete-service-7py597ng.js +0 -25
- package/dist/deploy-run-service-446bssn0.js +0 -25
- package/dist/deployment-search-qyd6dv0m.js +0 -55
- package/dist/feed-resolver-va10c73n.js +0 -28
- package/dist/feed-scope-failure-3yxfg1x7.js +0 -19
- package/dist/feed-session-7xqphdrg.js +0 -17
- package/dist/first-party-service-sd8yaf73.js +0 -27
- package/dist/governance-options-8snbrbt1.js +0 -32
- package/dist/index-dqa169gp.js +0 -25
- package/dist/index-fcwmbjap.js +0 -667
- package/dist/index-prm27bvm.js +0 -138
- package/dist/node-9hdy9st1.js +0 -86
- package/dist/pack-command-service-tr3z33gz.js +0 -35
- package/dist/package-id-kdkapmn2.js +0 -13
- package/dist/packager-tool-53w8skv5.js +0 -262
- package/dist/packager-tool-5edvzz80.js +0 -543
- package/dist/packager-tool-6d3fx89p.js +0 -171
- package/dist/packager-tool-d8ng7mex.js +0 -68
- package/dist/packager-tool-gdtpsdn7.js +0 -342
- package/dist/packager-tool-mq5pc4zr.js +0 -418
- package/dist/packager-tool-qw47eyw7.js +0 -43
- package/dist/packager-tool-resolver-994z3jkj.js +0 -23
- package/dist/packager-tool-rg3xgn9a.js +0 -182
- package/dist/packager-tool-sxjehksx.js +0 -5367
- package/dist/packager-tool-yrdyppjd.js +0 -188
- package/dist/prepare-solution-resources-m1djfj62.js +0 -29
- package/dist/project-contributions-79ndycrx.js +0 -32
- package/dist/resource-mutations-c3krjqze.js +0 -36
- package/dist/ship-telemetry-myes7ak5.js +0 -21
- package/dist/solution-auth-aead70sw.js +0 -11
- /package/dist/{packager-tool-act5r386.js → packager-tool-2pxe2r4j.js} +0 -0
- /package/dist/{packager-tool-kkfb5kgn.js → packager-tool-vrqbbh01.js} +0 -0
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PackService
|
|
3
|
-
} from "./packager-tool-f2hsb9ta.js";
|
|
4
|
-
import {
|
|
5
|
-
Path
|
|
6
|
-
} from "./packager-tool-pbmqk39a.js";
|
|
7
|
-
// ../packager/solution-packager/src/services/package-id-reader.ts
|
|
8
|
-
var legacySolutionResourcesFileName = "resources.json";
|
|
9
|
-
|
|
10
|
-
class PackageIdReader {
|
|
11
|
-
fileSystem;
|
|
12
|
-
packService;
|
|
13
|
-
projectTypesToFolderNameMapping = {
|
|
14
|
-
processorchestration: "processOrchestration",
|
|
15
|
-
casemanagement: "caseManagement",
|
|
16
|
-
agent: "agent",
|
|
17
|
-
api: "api",
|
|
18
|
-
webapp: "webApp",
|
|
19
|
-
process: "process",
|
|
20
|
-
flow: "flow"
|
|
21
|
-
};
|
|
22
|
-
static projectTypeMap = {
|
|
23
|
-
process: "Rpa",
|
|
24
|
-
library: "Lib",
|
|
25
|
-
tests: "Tests",
|
|
26
|
-
webapp: "App",
|
|
27
|
-
processorchestration: "Agentic",
|
|
28
|
-
casemanagement: "Case",
|
|
29
|
-
api: "Api",
|
|
30
|
-
agent: "Agent",
|
|
31
|
-
flow: "Flow"
|
|
32
|
-
};
|
|
33
|
-
constructor(fileSystem, packService) {
|
|
34
|
-
this.fileSystem = fileSystem;
|
|
35
|
-
this.packService = packService;
|
|
36
|
-
}
|
|
37
|
-
async read(project, solutionPath, solutionName) {
|
|
38
|
-
try {
|
|
39
|
-
if (!solutionPath || solutionPath.trim() === "") {
|
|
40
|
-
return this.defaultToProjectFolder(project, solutionPath, solutionName);
|
|
41
|
-
}
|
|
42
|
-
return await this.readFromResourcesDirectory(project, solutionPath) || await this.readFromLegacyResourcesJson(project, solutionPath) || this.defaultToProjectFolder(project, solutionPath, solutionName);
|
|
43
|
-
} catch (ex) {
|
|
44
|
-
console.error("Error reading package ID:", ex);
|
|
45
|
-
return this.defaultToProjectFolder(project, solutionPath, solutionName);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
defaultToProjectFolder(project, solutionPath, solutionName) {
|
|
49
|
-
const projectFolderName = Path.dirname(project.ProjectRelativePath);
|
|
50
|
-
const id = this.packService.sanitizePackageId(projectFolderName);
|
|
51
|
-
return this.getPackageId(id, project, solutionPath, solutionName);
|
|
52
|
-
}
|
|
53
|
-
getPackageId(rootPackageId, project, solutionPath, solutionName) {
|
|
54
|
-
const packageId = this.composePackageId(rootPackageId, project, solutionPath, solutionName);
|
|
55
|
-
return this.packService.sanitizePackageId(packageId);
|
|
56
|
-
}
|
|
57
|
-
composePackageId(rootPackageId, project, solutionPath, solutionName) {
|
|
58
|
-
if (!solutionName && (!solutionPath || solutionPath.trim() === "")) {
|
|
59
|
-
return rootPackageId;
|
|
60
|
-
}
|
|
61
|
-
const resolvedSolutionName = solutionName || this.deriveSolutionName(solutionPath);
|
|
62
|
-
const parts = [resolvedSolutionName];
|
|
63
|
-
if (project.Type) {
|
|
64
|
-
parts.push(PackageIdReader.normalizeProjectType(project.Type));
|
|
65
|
-
}
|
|
66
|
-
parts.push(rootPackageId);
|
|
67
|
-
return parts.join(".");
|
|
68
|
-
}
|
|
69
|
-
static normalizeProjectType(projectType) {
|
|
70
|
-
const normalizedKey = projectType.toLowerCase();
|
|
71
|
-
return PackageIdReader.projectTypeMap[normalizedKey] || projectType;
|
|
72
|
-
}
|
|
73
|
-
deriveSolutionName(solutionPath) {
|
|
74
|
-
const ext = Path.extname(solutionPath);
|
|
75
|
-
const base = Path.basename(solutionPath);
|
|
76
|
-
return ext ? base.substring(0, base.length - ext.length) : base;
|
|
77
|
-
}
|
|
78
|
-
async readFromLegacyResourcesJson(project, solutionPath) {
|
|
79
|
-
const resourcesFilePath = Path.join(solutionPath, legacySolutionResourcesFileName);
|
|
80
|
-
const exists = await this.fileSystem.exists(resourcesFilePath);
|
|
81
|
-
if (!exists) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
const data = await this.fileSystem.readFile(resourcesFilePath);
|
|
85
|
-
if (!data) {
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
const json = new TextDecoder().decode(data);
|
|
89
|
-
return this.getProjectIdFromJson(project, json);
|
|
90
|
-
}
|
|
91
|
-
getProjectIdFromJson(project, json) {
|
|
92
|
-
try {
|
|
93
|
-
const jsonObject = JSON.parse(json);
|
|
94
|
-
const resources = this.getProperty(jsonObject, "resources");
|
|
95
|
-
if (!Array.isArray(resources)) {
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
const resource = resources.find((r) => {
|
|
99
|
-
const projectKey = this.getProperty(r, "projectKey");
|
|
100
|
-
const kind = this.getProperty(r, "kind");
|
|
101
|
-
return projectKey === project.Id && typeof kind === "string" && kind.toLowerCase() === "process";
|
|
102
|
-
});
|
|
103
|
-
if (!resource) {
|
|
104
|
-
return null;
|
|
105
|
-
}
|
|
106
|
-
const spec = this.getProperty(resource, "spec");
|
|
107
|
-
if (!spec) {
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
const packageName = this.getProperty(spec, "packageName");
|
|
111
|
-
if (!packageName || typeof packageName !== "string" || packageName.trim() === "") {
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
|
-
return packageName;
|
|
115
|
-
} catch (ex) {
|
|
116
|
-
console.error("Error parsing legacy resources JSON:", ex);
|
|
117
|
-
return null;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
async readFromResourcesDirectory(project, solutionPath) {
|
|
121
|
-
const projectTypeLower = project.Type.toLowerCase();
|
|
122
|
-
const projectTypeFolder = this.projectTypesToFolderNameMapping[projectTypeLower] || Path.dirname(project.ProjectRelativePath);
|
|
123
|
-
const processDirectory = Path.join(solutionPath, "resources", "solution_folder", "process", projectTypeFolder);
|
|
124
|
-
const stats = await this.fileSystem.stat(processDirectory);
|
|
125
|
-
if (!stats?.isDirectory()) {
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
|
-
const files = await this.fileSystem.readdir(processDirectory);
|
|
129
|
-
const jsonFiles = files.filter((f) => f.endsWith(".json")).map((f) => Path.join(processDirectory, f));
|
|
130
|
-
for (const jsonFile of jsonFiles) {
|
|
131
|
-
try {
|
|
132
|
-
const data = await this.fileSystem.readFile(jsonFile);
|
|
133
|
-
if (!data) {
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
const json = new TextDecoder().decode(data);
|
|
137
|
-
const jsonObject = JSON.parse(json);
|
|
138
|
-
const resource = this.getProperty(jsonObject, "resource");
|
|
139
|
-
const projectKey = this.getProperty(resource, "projectKey");
|
|
140
|
-
if (projectKey === project.Id) {
|
|
141
|
-
const spec = this.getProperty(resource, "spec");
|
|
142
|
-
const packageName = this.getProperty(spec, "packageName");
|
|
143
|
-
if (typeof packageName !== "string" || packageName.trim() === "") {
|
|
144
|
-
return null;
|
|
145
|
-
}
|
|
146
|
-
return packageName;
|
|
147
|
-
}
|
|
148
|
-
} catch (ex) {
|
|
149
|
-
console.error("Error reading resource file:", jsonFile, ex);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
getProperty(obj, propertyName) {
|
|
155
|
-
if (!obj || typeof obj !== "object") {
|
|
156
|
-
return null;
|
|
157
|
-
}
|
|
158
|
-
const keys = Object.keys(obj);
|
|
159
|
-
const matchingKey = keys.find((key) => key.toLowerCase() === propertyName.toLowerCase());
|
|
160
|
-
return matchingKey ? obj[matchingKey] : null;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
async function readMemberPackageIdAsync(fileSystem, project, solutionPath, solutionName) {
|
|
164
|
-
const packService = new PackService;
|
|
165
|
-
const packageId = await new PackageIdReader(fileSystem, packService).read(project, solutionPath, solutionName);
|
|
166
|
-
return packageId ? packService.sanitizePackageId(packageId) : packageId;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export { PackageIdReader, readMemberPackageIdAsync };
|
|
170
|
-
|
|
171
|
-
//# debugId=95D09CBD9B00686D64756E2164756E21
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
describeFeedResolutionFailureAsync,
|
|
3
|
-
resolveFeedScope
|
|
4
|
-
} from "./packager-tool-rg3xgn9a.js";
|
|
5
|
-
import {
|
|
6
|
-
classifyFeedSession,
|
|
7
|
-
feedSessionRefusal
|
|
8
|
-
} from "./packager-tool-qw47eyw7.js";
|
|
9
|
-
import {
|
|
10
|
-
catchError
|
|
11
|
-
} from "./packager-tool-6ybywxxn.js";
|
|
12
|
-
|
|
13
|
-
// src/services/feed-selection.ts
|
|
14
|
-
async function resolveFeedSelectionAsync(auth, flags, action) {
|
|
15
|
-
if (!flags.personalWorkspace && flags.feed === undefined) {
|
|
16
|
-
return { ok: true };
|
|
17
|
-
}
|
|
18
|
-
if (flags.personalWorkspace) {
|
|
19
|
-
const refusal = refuseUnlessUser(auth, `${action} in a Personal Workspace`);
|
|
20
|
-
if (refusal) {
|
|
21
|
-
return refusal;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
const [scopeError, scope] = await catchError(resolveFeedScope({
|
|
25
|
-
personalWorkspace: flags.personalWorkspace,
|
|
26
|
-
feed: flags.feed,
|
|
27
|
-
tenant: flags.tenant,
|
|
28
|
-
loginValidity: flags.loginValidity,
|
|
29
|
-
envFilePath: flags.envFilePath
|
|
30
|
-
}));
|
|
31
|
-
if (scopeError) {
|
|
32
|
-
const failure = await describeFeedResolutionFailureAsync(scopeError, flags, auth);
|
|
33
|
-
return {
|
|
34
|
-
ok: false,
|
|
35
|
-
reason: "feed_resolution_failed",
|
|
36
|
-
message: failure.message,
|
|
37
|
-
instructions: failure.instructions,
|
|
38
|
-
errorCode: failure.errorCode,
|
|
39
|
-
retry: failure.retry
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
if (scope.kind !== "tenant") {
|
|
43
|
-
const refusal = refuseUnlessUser(auth, `${action} in the feed '${scope.name ?? scope.folderKey}'`);
|
|
44
|
-
if (refusal) {
|
|
45
|
-
return refusal;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return { ok: true, selectedFeed: scope };
|
|
49
|
-
}
|
|
50
|
-
function refuseUnlessUser(auth, action) {
|
|
51
|
-
const verdict = classifyFeedSession(auth);
|
|
52
|
-
if (verdict === "user") {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const { message, instructions } = feedSessionRefusal(verdict, action, "drop the feed flag to act on a tenant-feed deployment");
|
|
56
|
-
return {
|
|
57
|
-
ok: false,
|
|
58
|
-
reason: "feed_requires_user_session",
|
|
59
|
-
message,
|
|
60
|
-
instructions,
|
|
61
|
-
errorCode: "permission_denied",
|
|
62
|
-
retry: "RetryWillNotFix"
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { resolveFeedSelectionAsync };
|
|
67
|
-
|
|
68
|
-
//# debugId=9E3902AB9AB273B164756E2164756E21
|
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/json-serializer-names.js
|
|
2
|
-
var JsonSerializerNames = {
|
|
3
|
-
DefaultCaseInsensitive: "DefaultCaseInsensitive",
|
|
4
|
-
CaseInsensitive: "CaseInsensitive",
|
|
5
|
-
Indented: "Indented",
|
|
6
|
-
CamelCase: "CamelCase",
|
|
7
|
-
CaseInsensitiveIndented: "CaseInsensitiveIndented",
|
|
8
|
-
IndentedIgnoreNull: "IndentedIgnoreNull",
|
|
9
|
-
PreservePropertyNames: "PreservePropertyNames",
|
|
10
|
-
CamelCaseIndented: "CamelCaseIndented",
|
|
11
|
-
AllNames: [
|
|
12
|
-
"DefaultCaseInsensitive",
|
|
13
|
-
"CaseInsensitive",
|
|
14
|
-
"Indented",
|
|
15
|
-
"CamelCase",
|
|
16
|
-
"CaseInsensitiveIndented",
|
|
17
|
-
"IndentedIgnoreNull",
|
|
18
|
-
"PreservePropertyNames",
|
|
19
|
-
"CamelCaseIndented"
|
|
20
|
-
]
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/json-serializer.js
|
|
24
|
-
class JsonSerializer {
|
|
25
|
-
serialize(value) {
|
|
26
|
-
if (value == null)
|
|
27
|
-
return null;
|
|
28
|
-
let toSerialize = value;
|
|
29
|
-
if (this.options.ignoreNull)
|
|
30
|
-
toSerialize = this.removeNullValues(value);
|
|
31
|
-
if (this.options.camelCase && !this.options.preservePropertyNames)
|
|
32
|
-
toSerialize = this.toCamelCase(toSerialize);
|
|
33
|
-
if (this.options.enumCamelCase !== false)
|
|
34
|
-
toSerialize = this.convertEnumValuesToCamelCase(toSerialize);
|
|
35
|
-
const json = JSON.stringify(toSerialize, null, this.options.indented ? 2 : undefined);
|
|
36
|
-
return json;
|
|
37
|
-
}
|
|
38
|
-
async serializeAsync(stream, value, cancellationToken) {
|
|
39
|
-
cancellationToken?.throwIfAborted?.();
|
|
40
|
-
const json = this.serialize(value);
|
|
41
|
-
if (json === null)
|
|
42
|
-
return;
|
|
43
|
-
const writer = stream.getWriter();
|
|
44
|
-
try {
|
|
45
|
-
const bytes = this.encoder.encode(json);
|
|
46
|
-
await writer.write(bytes);
|
|
47
|
-
} finally {
|
|
48
|
-
writer.releaseLock();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
serializeToUtf8Bytes(value) {
|
|
52
|
-
const json = this.serialize(value);
|
|
53
|
-
if (json === null)
|
|
54
|
-
return new Uint8Array(0);
|
|
55
|
-
return this.encoder.encode(json);
|
|
56
|
-
}
|
|
57
|
-
deserialize(value) {
|
|
58
|
-
if (value == null || value === "")
|
|
59
|
-
return null;
|
|
60
|
-
try {
|
|
61
|
-
let cleanValue = value.charCodeAt(0) === 65279 ? value.slice(1) : value;
|
|
62
|
-
if (cleanValue.charCodeAt(cleanValue.length - 1) === 26)
|
|
63
|
-
cleanValue = cleanValue.slice(0, -1);
|
|
64
|
-
const parsed = JSON.parse(cleanValue);
|
|
65
|
-
return parsed;
|
|
66
|
-
} catch {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
deserializeAsType(value, _type) {
|
|
71
|
-
return this.deserialize(value);
|
|
72
|
-
}
|
|
73
|
-
removeNullValues(obj) {
|
|
74
|
-
if (obj == null)
|
|
75
|
-
return obj;
|
|
76
|
-
if (Array.isArray(obj))
|
|
77
|
-
return obj.map((item) => this.removeNullValues(item));
|
|
78
|
-
if (typeof obj == "object") {
|
|
79
|
-
const result = {};
|
|
80
|
-
for (const [key, val] of Object.entries(obj))
|
|
81
|
-
if (val != null)
|
|
82
|
-
result[key] = this.removeNullValues(val);
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
return obj;
|
|
86
|
-
}
|
|
87
|
-
toCamelCase(obj) {
|
|
88
|
-
if (obj == null)
|
|
89
|
-
return obj;
|
|
90
|
-
if (Array.isArray(obj))
|
|
91
|
-
return obj.map((item) => this.toCamelCase(item));
|
|
92
|
-
if (typeof obj == "object") {
|
|
93
|
-
const result = {};
|
|
94
|
-
for (const [key, val] of Object.entries(obj)) {
|
|
95
|
-
const camelKey = key.charAt(0).toLowerCase() + key.slice(1);
|
|
96
|
-
result[camelKey] = this.toCamelCase(val);
|
|
97
|
-
}
|
|
98
|
-
return result;
|
|
99
|
-
}
|
|
100
|
-
return obj;
|
|
101
|
-
}
|
|
102
|
-
convertEnumValuesToCamelCase(obj, className) {
|
|
103
|
-
if (obj == null)
|
|
104
|
-
return obj;
|
|
105
|
-
if (typeof obj == "string")
|
|
106
|
-
return this.tryConvertEnumStringToCamelCase(obj, undefined, undefined);
|
|
107
|
-
if (Array.isArray(obj))
|
|
108
|
-
return obj.map((item) => this.convertEnumValuesToCamelCase(item, className));
|
|
109
|
-
if (typeof obj == "object") {
|
|
110
|
-
const result = {};
|
|
111
|
-
const currentClassName = obj.constructor?.name !== "Object" ? obj.constructor.name : className;
|
|
112
|
-
for (const [key, val] of Object.entries(obj))
|
|
113
|
-
if (typeof val == "string")
|
|
114
|
-
result[key] = this.tryConvertEnumStringToCamelCase(val, currentClassName, key);
|
|
115
|
-
else if (Array.isArray(val))
|
|
116
|
-
result[key] = val.map((item) => {
|
|
117
|
-
if (typeof item == "string")
|
|
118
|
-
return this.tryConvertEnumStringToCamelCase(item, currentClassName, key);
|
|
119
|
-
return this.convertEnumValuesToCamelCase(item, currentClassName);
|
|
120
|
-
});
|
|
121
|
-
else
|
|
122
|
-
result[key] = this.convertEnumValuesToCamelCase(val, currentClassName);
|
|
123
|
-
return result;
|
|
124
|
-
}
|
|
125
|
-
return obj;
|
|
126
|
-
}
|
|
127
|
-
tryConvertEnumStringToCamelCase(value, className, propertyName) {
|
|
128
|
-
if (this.camelCaseEnumProperties.size > 0) {
|
|
129
|
-
if (!propertyName || !this.isKnownCamelCaseEnum(className, propertyName))
|
|
130
|
-
return value;
|
|
131
|
-
} else if (propertyName && this.isInPropertySet(this.pascalCaseEnumProperties, className, propertyName))
|
|
132
|
-
return value;
|
|
133
|
-
if (/^[A-Z][a-zA-Z0-9]*$/.test(value))
|
|
134
|
-
return value.charAt(0).toLowerCase() + value.slice(1);
|
|
135
|
-
return value;
|
|
136
|
-
}
|
|
137
|
-
isKnownCamelCaseEnum(className, propertyName) {
|
|
138
|
-
if (this.isInPropertySet(this.pascalCaseEnumProperties, className, propertyName))
|
|
139
|
-
return false;
|
|
140
|
-
return this.isInPropertySet(this.camelCaseEnumProperties, className, propertyName);
|
|
141
|
-
}
|
|
142
|
-
isInPropertySet(propertySet, className, propertyName) {
|
|
143
|
-
if (className && propertySet.has(`${className}.${propertyName}`))
|
|
144
|
-
return true;
|
|
145
|
-
return propertySet.has(propertyName);
|
|
146
|
-
}
|
|
147
|
-
constructor(options = {}) {
|
|
148
|
-
this.isContextBased = false;
|
|
149
|
-
this.encoder = new TextEncoder;
|
|
150
|
-
this.options = options;
|
|
151
|
-
this.camelCaseEnumProperties = new Set(options.camelCaseEnumProperties ?? []);
|
|
152
|
-
this.pascalCaseEnumProperties = new Set(options.pascalCaseEnumProperties ?? []);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/pascal-case-enum-properties.js
|
|
157
|
-
var CAMEL_CASE_ENUM_PROPERTIES = [
|
|
158
|
-
"scope",
|
|
159
|
-
"replaceOption",
|
|
160
|
-
"lookupStrategy",
|
|
161
|
-
"folderType"
|
|
162
|
-
];
|
|
163
|
-
var SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES = [
|
|
164
|
-
"propertyCategory"
|
|
165
|
-
];
|
|
166
|
-
var RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES = [
|
|
167
|
-
"ValidationState.errorSeverity",
|
|
168
|
-
"ValidationState.errorType",
|
|
169
|
-
"AddOrUpdateResourceToSolutionResponse.status",
|
|
170
|
-
"Overwrite.type",
|
|
171
|
-
"OverwriteValidationError.severity",
|
|
172
|
-
"ProjectResourceDescriptor.provisionType"
|
|
173
|
-
];
|
|
174
|
-
var PASCAL_CASE_ENUM_PROPERTIES = [
|
|
175
|
-
...SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES,
|
|
176
|
-
...RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES
|
|
177
|
-
];
|
|
178
|
-
|
|
179
|
-
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/json-serializer-factory.js
|
|
180
|
-
class JsonSerializerFactory {
|
|
181
|
-
get() {
|
|
182
|
-
return this.defaultSerializer;
|
|
183
|
-
}
|
|
184
|
-
getByName(name) {
|
|
185
|
-
if (!name)
|
|
186
|
-
return this.defaultSerializer;
|
|
187
|
-
let serializer = this.namedSerializers.get(name);
|
|
188
|
-
if (!serializer) {
|
|
189
|
-
serializer = this.createNamedSerializer(name);
|
|
190
|
-
this.namedSerializers.set(name, serializer);
|
|
191
|
-
}
|
|
192
|
-
return serializer;
|
|
193
|
-
}
|
|
194
|
-
initializePredefinedSerializers() {
|
|
195
|
-
for (const name of JsonSerializerNames.AllNames)
|
|
196
|
-
this.namedSerializers.set(name, this.createNamedSerializer(name));
|
|
197
|
-
}
|
|
198
|
-
createNamedSerializer(name) {
|
|
199
|
-
const options = this.createOptionsForName(name);
|
|
200
|
-
return new JsonSerializer(options);
|
|
201
|
-
}
|
|
202
|
-
createOptionsForName(name) {
|
|
203
|
-
const options = {
|
|
204
|
-
...this.baseOptions
|
|
205
|
-
};
|
|
206
|
-
switch (name) {
|
|
207
|
-
case JsonSerializerNames.DefaultCaseInsensitive:
|
|
208
|
-
return {
|
|
209
|
-
caseInsensitive: true
|
|
210
|
-
};
|
|
211
|
-
case JsonSerializerNames.CaseInsensitive:
|
|
212
|
-
options.caseInsensitive = true;
|
|
213
|
-
break;
|
|
214
|
-
case JsonSerializerNames.Indented:
|
|
215
|
-
options.indented = true;
|
|
216
|
-
break;
|
|
217
|
-
case JsonSerializerNames.CamelCase:
|
|
218
|
-
options.camelCase = true;
|
|
219
|
-
break;
|
|
220
|
-
case JsonSerializerNames.CaseInsensitiveIndented:
|
|
221
|
-
options.caseInsensitive = true;
|
|
222
|
-
options.indented = true;
|
|
223
|
-
break;
|
|
224
|
-
case JsonSerializerNames.IndentedIgnoreNull:
|
|
225
|
-
options.indented = true;
|
|
226
|
-
options.ignoreNull = true;
|
|
227
|
-
break;
|
|
228
|
-
case JsonSerializerNames.PreservePropertyNames:
|
|
229
|
-
options.preservePropertyNames = true;
|
|
230
|
-
options.camelCase = false;
|
|
231
|
-
break;
|
|
232
|
-
case JsonSerializerNames.CamelCaseIndented:
|
|
233
|
-
options.indented = true;
|
|
234
|
-
options.camelCase = true;
|
|
235
|
-
options.ignoreNull = true;
|
|
236
|
-
break;
|
|
237
|
-
default:
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
return options;
|
|
241
|
-
}
|
|
242
|
-
constructor(options) {
|
|
243
|
-
const defaults = {
|
|
244
|
-
camelCase: true,
|
|
245
|
-
enumCamelCase: true,
|
|
246
|
-
camelCaseEnumProperties: CAMEL_CASE_ENUM_PROPERTIES,
|
|
247
|
-
pascalCaseEnumProperties: PASCAL_CASE_ENUM_PROPERTIES
|
|
248
|
-
};
|
|
249
|
-
this.baseOptions = options ? {
|
|
250
|
-
...defaults,
|
|
251
|
-
...options
|
|
252
|
-
} : defaults;
|
|
253
|
-
this.defaultSerializer = new JsonSerializer(this.baseOptions);
|
|
254
|
-
this.namedSerializers = new Map;
|
|
255
|
-
this.initializePredefinedSerializers();
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/serializer-proxy.js
|
|
260
|
-
class JsonSerializerProxy {
|
|
261
|
-
serialize(value) {
|
|
262
|
-
return this.jsonSerializer.serialize(value);
|
|
263
|
-
}
|
|
264
|
-
serializeAsync(stream, value, cancellationToken) {
|
|
265
|
-
return this.jsonSerializer.serializeAsync(stream, value, cancellationToken);
|
|
266
|
-
}
|
|
267
|
-
serializeToUtf8Bytes(value) {
|
|
268
|
-
return this.jsonSerializer.serializeToUtf8Bytes(value);
|
|
269
|
-
}
|
|
270
|
-
deserialize(value) {
|
|
271
|
-
return this.jsonSerializer.deserialize(value);
|
|
272
|
-
}
|
|
273
|
-
tryDeserializeObject(json) {
|
|
274
|
-
if (!json || json.trim() === "")
|
|
275
|
-
return null;
|
|
276
|
-
try {
|
|
277
|
-
return this.jsonSerializer.isContextBased ? this.jsonSerializer.deserialize(json) : this.caseInsensitiveSerializer.deserialize(json);
|
|
278
|
-
} catch (ex) {
|
|
279
|
-
this.logger.info("Deserialization failed with exception.", ex);
|
|
280
|
-
return null;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
tryDeserialize(value) {
|
|
284
|
-
if (!value || value.trim() === "")
|
|
285
|
-
return [
|
|
286
|
-
false,
|
|
287
|
-
null
|
|
288
|
-
];
|
|
289
|
-
try {
|
|
290
|
-
const result = this.jsonSerializer.deserialize(value);
|
|
291
|
-
return [
|
|
292
|
-
true,
|
|
293
|
-
result
|
|
294
|
-
];
|
|
295
|
-
} catch (ex) {
|
|
296
|
-
this.logger.info("Deserialization failed with exception.", ex);
|
|
297
|
-
return [
|
|
298
|
-
false,
|
|
299
|
-
null
|
|
300
|
-
];
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
constructor(jsonSerializerFactory, loggerFactory) {
|
|
304
|
-
this.jsonSerializer = jsonSerializerFactory.get();
|
|
305
|
-
this.caseInsensitiveSerializer = jsonSerializerFactory.getByName(JsonSerializerNames.CaseInsensitive);
|
|
306
|
-
this.logger = loggerFactory.create("JsonSerializerProxy");
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/stream-serializer.js
|
|
311
|
-
class StreamSerializer {
|
|
312
|
-
async serializeAsync(data, cancellationToken) {
|
|
313
|
-
cancellationToken?.throwIfAborted?.();
|
|
314
|
-
const serializer = this.jsonSerializerFactory.getByName(JsonSerializerNames.PreservePropertyNames);
|
|
315
|
-
const serializedContent = serializer.serialize(data);
|
|
316
|
-
const encoder = new TextEncoder;
|
|
317
|
-
const bytes = serializedContent ? encoder.encode(serializedContent) : new Uint8Array(0);
|
|
318
|
-
let streamClosed = false;
|
|
319
|
-
const stream = new ReadableStream({
|
|
320
|
-
start(controller) {
|
|
321
|
-
controller.enqueue(bytes);
|
|
322
|
-
controller.close();
|
|
323
|
-
streamClosed = true;
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
const disposeStream = this.disposeStream;
|
|
327
|
-
return {
|
|
328
|
-
stream,
|
|
329
|
-
dispose() {
|
|
330
|
-
if (disposeStream && !streamClosed)
|
|
331
|
-
stream.cancel().catch(() => {});
|
|
332
|
-
}
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
constructor(jsonSerializerFactory, disposeStream = true) {
|
|
336
|
-
this.jsonSerializerFactory = jsonSerializerFactory;
|
|
337
|
-
this.disposeStream = disposeStream;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
export { JsonSerializerNames, JsonSerializer, CAMEL_CASE_ENUM_PROPERTIES, SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES, RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES, PASCAL_CASE_ENUM_PROPERTIES, JsonSerializerFactory, JsonSerializerProxy, StreamSerializer };
|
|
341
|
-
|
|
342
|
-
//# debugId=B9E68BD7718EF2DB64756E2164756E21
|