@uipath/solution-sdk 1.202.1 → 1.203.0-preview.180

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 (32) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +12 -1
  2. package/dist/embedded-file-reader-xxqe8vs8.js +114 -0
  3. package/dist/first-party-service-sd8yaf73.js +27 -0
  4. package/dist/index-1de529jm.js +39 -0
  5. package/dist/index-4zqv4bn2.js +6922 -0
  6. package/dist/index-53w8skv5.js +262 -0
  7. package/dist/index-dqa169gp.js +25 -0
  8. package/dist/index-g0hcxnae.js +237 -0
  9. package/dist/index-gdtpsdn7.js +342 -0
  10. package/dist/index-sby22td6.js +634 -0
  11. package/dist/index-y8tgscfm.js +1381 -0
  12. package/dist/index.js +3660 -15829
  13. package/dist/jmespath-231m3hyn.js +1485 -0
  14. package/dist/js-yaml-88tdqrtd.js +3153 -0
  15. package/dist/resources/index.js +14311 -27794
  16. package/dist/solution-auth.js +6 -2320
  17. package/dist/src/index.d.ts +1 -1
  18. package/dist/src/resources/commands/project-utils.d.ts +5 -0
  19. package/dist/src/resources/index.d.ts +3 -0
  20. package/dist/src/resources/providers/artefact-pair-binding-provider.d.ts +21 -0
  21. package/dist/src/resources/providers/file-storage-provider.d.ts +2 -1
  22. package/dist/src/resources/providers/resource-builder-init.d.ts +12 -12
  23. package/dist/src/resources/providers/solution-access-provider.d.ts +2 -1
  24. package/dist/src/resources/services/entry-point-spec-enhancer.d.ts +21 -2
  25. package/dist/src/resources/services/local-resource-matcher.d.ts +1 -1
  26. package/dist/src/resources/services/project-template-types.d.ts +35 -0
  27. package/dist/src/resources/services/resource-casing.d.ts +24 -0
  28. package/dist/src/resources/services/resource-refresh-service.d.ts +7 -0
  29. package/dist/src/resources/services/resource-remote-sync.d.ts +67 -0
  30. package/dist/src/resources/services/solution-manifest.d.ts +20 -6
  31. package/dist/src/resources/services/sync-resources-from-bindings.d.ts +4 -3
  32. package/package.json +3 -2
@@ -0,0 +1,342 @@
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