@uipath/solution-tool 1.203.0-preview.212 → 1.204.0-preview.211
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/README.md +2 -2
- package/dist/THIRD-PARTY-NOTICES.md +4 -4
- package/dist/deploy-delete-service-gg00vadc.js +22 -0
- package/dist/deploy-status-service-cqfrvxpz.js +256 -0
- package/dist/deploy.d.ts +11 -4
- package/dist/deploy.js +19 -7
- package/dist/deployment-search-j34w33b2.js +49 -0
- package/dist/{embedded-file-reader-xxqe8vs8.js → embedded-file-reader-rf2g1kfj.js} +2 -2
- package/dist/feed-resolver-31gcvnnk.js +27 -0
- package/dist/feed-scope-failure-fwtdvvrh.js +18 -0
- package/dist/feed-session-sxga31vn.js +17 -0
- package/dist/index.js +27 -18
- package/dist/init.js +10 -7
- package/dist/{list-xjdnbyka.js → list-q4dzkv45.js} +9 -6
- package/dist/pack.js +14 -11
- package/dist/{packager-tool-7qmx64kz.js → packager-tool-00vh1ktg.js} +1022 -1342
- package/dist/packager-tool-1phh2rfx.js +37 -0
- package/dist/{packager-tool-vas0xg5h.js → packager-tool-2cntqvdv.js} +5 -3
- package/dist/{packager-tool-1haahq17.js → packager-tool-3enm2h28.js} +5 -5
- package/dist/{packager-tool-2syrt51a.js → packager-tool-3fv6zc86.js} +1062 -825
- package/dist/{packager-tool-grtmkd54.js → packager-tool-3m36mxn7.js} +16 -74
- package/dist/packager-tool-40vcj4wv.js +172 -0
- package/dist/packager-tool-482eg22x.js +322 -0
- package/dist/{packager-tool-k4mskzww.js → packager-tool-5dzjsw5q.js} +3 -3
- package/dist/{packager-tool-0f0wt9vh.js → packager-tool-5fjp60dk.js} +3071 -2794
- package/dist/{packager-tool-bkwnetqn.js → packager-tool-83rzavkx.js} +383 -88
- package/dist/{packager-tool-f423v35w.js → packager-tool-9hj0cfd0.js} +756 -359
- package/dist/{packager-tool-7znqtw3f.js → packager-tool-9vvdgbay.js} +8 -6
- package/dist/packager-tool-bqre28m1.js +43 -0
- package/dist/packager-tool-f5gq77m5.js +28 -0
- package/dist/{packager-tool-nzghfa48.js → packager-tool-fv7xyzg2.js} +550 -2
- package/dist/{packager-tool-3jrq7smt.js → packager-tool-gb35b4qs.js} +206 -289
- package/dist/{packager-tool-4kdt8mys.js → packager-tool-j30xck4w.js} +1008 -647
- package/dist/packager-tool-ks8spnq8.js +166 -0
- package/dist/packager-tool-q3tgpemc.js +113 -0
- package/dist/packager-tool-qdtjywsk.js +173 -0
- package/dist/{packager-tool-2p5yh1q9.js → packager-tool-qgaqqq41.js} +320 -151
- package/dist/packager-tool-qm24rbae.js +5889 -0
- package/dist/{packager-tool-resolver-fmjr60x8.js → packager-tool-resolver-2cbxyq6k.js} +6 -5
- package/dist/{packager-tool-znakt6yw.js → packager-tool-vh4ng74p.js} +8 -6
- package/dist/packager-tool-vmsxq1pc.js +104 -0
- package/dist/packager-tool-zf3929se.js +237 -0
- package/dist/packager-tool-zns6n8zp.js +837 -0
- package/dist/packager-tool.js +2 -2
- package/dist/prepare-solution-resources-p3gzdecy.js +25 -0
- package/dist/{project-contributions-cvttys34.js → project-contributions-txe8v6sm.js} +12 -9
- package/dist/publish.js +12 -7
- package/dist/resource.js +9 -6
- package/dist/services/activation.d.ts +17 -2
- package/dist/services/deploy-activate-service.d.ts +10 -0
- package/dist/services/deploy-delete-service.d.ts +82 -0
- package/dist/services/deploy-list-service.d.ts +15 -45
- package/dist/services/deploy-run-service.d.ts +36 -23
- package/dist/services/deploy-upgrade-service.d.ts +198 -39
- package/dist/services/deployment-feed-locator.d.ts +50 -12
- package/dist/services/deployment-search-client.d.ts +55 -0
- package/dist/services/deployment-search.d.ts +87 -34
- package/dist/services/deployment-state.d.ts +119 -0
- package/dist/services/feed-resolver.d.ts +31 -0
- package/dist/services/feed-session.d.ts +70 -0
- package/dist/services/folder-helper.d.ts +4 -27
- package/dist/services/http-status.d.ts +9 -0
- package/dist/services/incomplete-feed-sweep.d.ts +77 -0
- package/dist/services/legacy-deployment-search-v3.d.ts +23 -0
- package/dist/services/packages-list-service.d.ts +5 -0
- package/dist/services/pipeline-deploy-poll.d.ts +69 -0
- package/dist/services/publish-service.d.ts +14 -16
- package/dist/services/search-failure.d.ts +27 -0
- package/dist/templates/AGENTS.md +60 -20
- package/dist/tool.js +27 -18
- package/dist/utils/deployment-errors.d.ts +57 -0
- package/package.json +2 -2
- package/dist/packager-tool-jz2wbfjz.js +0 -2275
- package/dist/packager-tool-wtpe9285.js +0 -51960
- package/dist/prepare-solution-resources-wds3r8bq.js +0 -22
- package/dist/services/personal-workspace-deploy.d.ts +0 -49
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readUipxFile
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-vmsxq1pc.js";
|
|
4
4
|
import {
|
|
5
5
|
RESULTS,
|
|
6
6
|
addSdkUserAgentHeader,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
installSdkUserAgentHeader,
|
|
10
10
|
logger,
|
|
11
11
|
summarizePlatformBody
|
|
12
|
-
} from "./packager-tool-
|
|
12
|
+
} from "./packager-tool-5fjp60dk.js";
|
|
13
13
|
import {
|
|
14
14
|
zipSync
|
|
15
15
|
} from "./packager-tool-dfrk01gn.js";
|
|
@@ -263,70 +263,21 @@ class VoidApiResponse {
|
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
class TextApiResponse {
|
|
267
|
-
raw;
|
|
268
|
-
constructor(raw) {
|
|
269
|
-
this.raw = raw;
|
|
270
|
-
}
|
|
271
|
-
async value() {
|
|
272
|
-
return await this.raw.text();
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
// ../solution-sdk/generated/src/models/DeploymentOperationStatus.ts
|
|
277
|
-
var DeploymentOperationStatus = {
|
|
278
|
-
Draft: "Draft",
|
|
279
|
-
Successful: "Successful",
|
|
280
|
-
Failed: "Failed",
|
|
281
|
-
InProgress: "InProgress",
|
|
282
|
-
FailedRollback: "FailedRollback"
|
|
283
|
-
};
|
|
284
|
-
function DeploymentOperationStatusFromJSON(json) {
|
|
285
|
-
return DeploymentOperationStatusFromJSONTyped(json, false);
|
|
286
|
-
}
|
|
287
|
-
function DeploymentOperationStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
288
|
-
return json;
|
|
289
|
-
}
|
|
290
|
-
function DeploymentOperationStatusToJSON(value) {
|
|
291
|
-
return value;
|
|
292
|
-
}
|
|
293
266
|
|
|
294
|
-
// ../solution-sdk/generated/src/models/
|
|
295
|
-
var
|
|
267
|
+
// ../solution-sdk/generated/src/models/WorkflowAction.ts
|
|
268
|
+
var WorkflowAction = {
|
|
296
269
|
Install: "Install",
|
|
270
|
+
Activate: "Activate",
|
|
297
271
|
Uninstall: "Uninstall",
|
|
298
272
|
Upgrade: "Upgrade",
|
|
299
|
-
|
|
300
|
-
|
|
273
|
+
Delete: "Delete",
|
|
274
|
+
SetupActivation: "SetupActivation"
|
|
301
275
|
};
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
function ResponseDictionaryDtoFromJSON(json) {
|
|
305
|
-
return ResponseDictionaryDtoFromJSONTyped(json, false);
|
|
306
|
-
}
|
|
307
|
-
function ResponseDictionaryDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
308
|
-
if (json == null) {
|
|
309
|
-
return json;
|
|
310
|
-
}
|
|
311
|
-
return {
|
|
312
|
-
keys: json["keys"] == null ? undefined : json["keys"],
|
|
313
|
-
values: json["values"] == null ? undefined : json["values"]
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
// ../solution-sdk/generated/src/models/BlobFileAccessDto.ts
|
|
318
|
-
function BlobFileAccessDtoFromJSON(json) {
|
|
319
|
-
return BlobFileAccessDtoFromJSONTyped(json, false);
|
|
276
|
+
function WorkflowActionFromJSON(json) {
|
|
277
|
+
return WorkflowActionFromJSONTyped(json, false);
|
|
320
278
|
}
|
|
321
|
-
function
|
|
322
|
-
|
|
323
|
-
return json;
|
|
324
|
-
}
|
|
325
|
-
return {
|
|
326
|
-
uri: json["uri"],
|
|
327
|
-
verb: json["verb"],
|
|
328
|
-
headers: json["headers"] == null ? undefined : ResponseDictionaryDtoFromJSON(json["headers"])
|
|
329
|
-
};
|
|
279
|
+
function WorkflowActionFromJSONTyped(json, ignoreDiscriminator) {
|
|
280
|
+
return json;
|
|
330
281
|
}
|
|
331
282
|
// ../solution-sdk/generated/src/models/DeploymentActivationStatus.ts
|
|
332
283
|
var DeploymentActivationStatus = {
|
|
@@ -437,14 +388,6 @@ function DeploymentDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
437
388
|
deploymentName: json["deploymentName"]
|
|
438
389
|
};
|
|
439
390
|
}
|
|
440
|
-
// ../solution-sdk/generated/src/models/WorkflowAction.ts
|
|
441
|
-
function WorkflowActionFromJSON(json) {
|
|
442
|
-
return WorkflowActionFromJSONTyped(json, false);
|
|
443
|
-
}
|
|
444
|
-
function WorkflowActionFromJSONTyped(json, ignoreDiscriminator) {
|
|
445
|
-
return json;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
391
|
// ../solution-sdk/generated/src/models/DeploymentOperation.ts
|
|
449
392
|
function DeploymentOperationFromJSON(json) {
|
|
450
393
|
return DeploymentOperationFromJSONTyped(json, false);
|
|
@@ -464,6 +407,24 @@ function PackageVersionOriginFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
464
407
|
return json;
|
|
465
408
|
}
|
|
466
409
|
|
|
410
|
+
// ../solution-sdk/generated/src/models/DeploymentOperationStatus.ts
|
|
411
|
+
var DeploymentOperationStatus = {
|
|
412
|
+
Draft: "Draft",
|
|
413
|
+
Successful: "Successful",
|
|
414
|
+
Failed: "Failed",
|
|
415
|
+
InProgress: "InProgress",
|
|
416
|
+
FailedRollback: "FailedRollback"
|
|
417
|
+
};
|
|
418
|
+
function DeploymentOperationStatusFromJSON(json) {
|
|
419
|
+
return DeploymentOperationStatusFromJSONTyped(json, false);
|
|
420
|
+
}
|
|
421
|
+
function DeploymentOperationStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
422
|
+
return json;
|
|
423
|
+
}
|
|
424
|
+
function DeploymentOperationStatusToJSON(value) {
|
|
425
|
+
return value;
|
|
426
|
+
}
|
|
427
|
+
|
|
467
428
|
// ../solution-sdk/generated/src/models/DeploymentUpgradeType.ts
|
|
468
429
|
function DeploymentUpgradeTypeFromJSON(json) {
|
|
469
430
|
return DeploymentUpgradeTypeFromJSONTyped(json, false);
|
|
@@ -546,51 +507,92 @@ function DeploymentResourceValidationActionFromJSON(json) {
|
|
|
546
507
|
function DeploymentResourceValidationActionFromJSONTyped(json, ignoreDiscriminator) {
|
|
547
508
|
return json;
|
|
548
509
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
510
|
+
|
|
511
|
+
// ../solution-sdk/generated/src/models/ResetConfigurationSource.ts
|
|
512
|
+
function ResetConfigurationSourceFromJSON(json) {
|
|
513
|
+
return ResetConfigurationSourceFromJSONTyped(json, false);
|
|
552
514
|
}
|
|
553
|
-
function
|
|
515
|
+
function ResetConfigurationSourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
554
516
|
return json;
|
|
555
517
|
}
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
518
|
+
|
|
519
|
+
// ../solution-sdk/generated/src/models/DeploymentUpgradeState.ts
|
|
520
|
+
function DeploymentUpgradeStateFromJSON(json) {
|
|
521
|
+
return DeploymentUpgradeStateFromJSONTyped(json, false);
|
|
559
522
|
}
|
|
560
|
-
function
|
|
523
|
+
function DeploymentUpgradeStateFromJSONTyped(json, ignoreDiscriminator) {
|
|
561
524
|
return json;
|
|
562
525
|
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
526
|
+
|
|
527
|
+
// ../solution-sdk/generated/src/models/DeploymentResourceReplacementDto.ts
|
|
528
|
+
function DeploymentResourceReplacementDtoFromJSON(json) {
|
|
529
|
+
return DeploymentResourceReplacementDtoFromJSONTyped(json, false);
|
|
566
530
|
}
|
|
567
|
-
function
|
|
531
|
+
function DeploymentResourceReplacementDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
568
532
|
if (json == null) {
|
|
569
533
|
return json;
|
|
570
534
|
}
|
|
571
535
|
return {
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
536
|
+
serviceResourceKey: json["serviceResourceKey"],
|
|
537
|
+
serviceResourceName: json["serviceResourceName"],
|
|
538
|
+
serviceFolderPath: json["serviceFolderPath"] == null ? undefined : json["serviceFolderPath"],
|
|
539
|
+
solutionResourceKey: json["solutionResourceKey"]
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// ../solution-sdk/generated/src/models/FolderInfo.ts
|
|
544
|
+
function FolderInfoFromJSON(json) {
|
|
545
|
+
return FolderInfoFromJSONTyped(json, false);
|
|
546
|
+
}
|
|
547
|
+
function FolderInfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
548
|
+
if (json == null) {
|
|
549
|
+
return json;
|
|
550
|
+
}
|
|
551
|
+
return {
|
|
552
|
+
fullyQualifiedName: json["fullyQualifiedName"],
|
|
553
|
+
path: json["path"] == null ? undefined : json["path"],
|
|
554
|
+
folderKey: json["folderKey"] == null ? undefined : json["folderKey"]
|
|
576
555
|
};
|
|
577
556
|
}
|
|
578
557
|
|
|
579
|
-
// ../solution-sdk/generated/src/models/
|
|
580
|
-
function
|
|
581
|
-
return
|
|
558
|
+
// ../solution-sdk/generated/src/models/DeploymentResourceInfo.ts
|
|
559
|
+
function DeploymentResourceInfoFromJSON(json) {
|
|
560
|
+
return DeploymentResourceInfoFromJSONTyped(json, false);
|
|
582
561
|
}
|
|
583
|
-
function
|
|
562
|
+
function DeploymentResourceInfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
584
563
|
if (json == null) {
|
|
585
564
|
return json;
|
|
586
565
|
}
|
|
587
566
|
return {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
567
|
+
key: json["key"],
|
|
568
|
+
name: json["name"],
|
|
569
|
+
kind: json["kind"],
|
|
570
|
+
type: json["type"] == null ? undefined : json["type"],
|
|
571
|
+
apiVersion: json["apiVersion"],
|
|
572
|
+
folders: json["folders"].map(FolderInfoFromJSON),
|
|
573
|
+
requiresConfiguration: json["requiresConfiguration"],
|
|
574
|
+
isOverridable: json["isOverridable"],
|
|
575
|
+
hasWarnings: json["hasWarnings"],
|
|
576
|
+
upgradeState: json["upgradeState"] == null ? undefined : DeploymentUpgradeStateFromJSON(json["upgradeState"]),
|
|
577
|
+
upgradeConfigurationSource: json["upgradeConfigurationSource"] == null ? undefined : ResetConfigurationSourceFromJSON(json["upgradeConfigurationSource"]),
|
|
578
|
+
resourceReplacement: json["resourceReplacement"] == null ? undefined : DeploymentResourceReplacementDtoFromJSON(json["resourceReplacement"]),
|
|
579
|
+
selectedAction: json["selectedAction"] == null ? undefined : DeploymentResourceValidationActionFromJSON(json["selectedAction"])
|
|
592
580
|
};
|
|
593
581
|
}
|
|
582
|
+
// ../solution-sdk/generated/src/models/DeploymentResourceValidationErrorKind.ts
|
|
583
|
+
function DeploymentResourceValidationErrorKindFromJSON(json) {
|
|
584
|
+
return DeploymentResourceValidationErrorKindFromJSONTyped(json, false);
|
|
585
|
+
}
|
|
586
|
+
function DeploymentResourceValidationErrorKindFromJSONTyped(json, ignoreDiscriminator) {
|
|
587
|
+
return json;
|
|
588
|
+
}
|
|
589
|
+
// ../solution-sdk/generated/src/models/DeploymentResourceValidationErrorLevel.ts
|
|
590
|
+
function DeploymentResourceValidationErrorLevelFromJSON(json) {
|
|
591
|
+
return DeploymentResourceValidationErrorLevelFromJSONTyped(json, false);
|
|
592
|
+
}
|
|
593
|
+
function DeploymentResourceValidationErrorLevelFromJSONTyped(json, ignoreDiscriminator) {
|
|
594
|
+
return json;
|
|
595
|
+
}
|
|
594
596
|
// ../solution-sdk/generated/src/models/DeploymentType.ts
|
|
595
597
|
function DeploymentTypeFromJSON(json) {
|
|
596
598
|
return DeploymentTypeFromJSONTyped(json, false);
|
|
@@ -639,19 +641,22 @@ function DeploymentSearchItemDto2FromJSONTyped(json, ignoreDiscriminator) {
|
|
|
639
641
|
previousInstanceId: json["previousInstanceId"] == null ? undefined : json["previousInstanceId"]
|
|
640
642
|
};
|
|
641
643
|
}
|
|
642
|
-
// ../solution-sdk/generated/src/models/
|
|
643
|
-
function
|
|
644
|
-
return
|
|
644
|
+
// ../solution-sdk/generated/src/models/ServiceMessage.ts
|
|
645
|
+
function ServiceMessageFromJSON(json) {
|
|
646
|
+
return ServiceMessageFromJSONTyped(json, false);
|
|
645
647
|
}
|
|
646
|
-
function
|
|
647
|
-
if (
|
|
648
|
-
return
|
|
648
|
+
function ServiceMessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
649
|
+
if (json == null) {
|
|
650
|
+
return json;
|
|
649
651
|
}
|
|
650
652
|
return {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
+
resource: json["resource"],
|
|
654
|
+
text: json["text"],
|
|
655
|
+
parameters: json["parameters"],
|
|
656
|
+
errorCode: json["errorCode"] == null ? undefined : json["errorCode"]
|
|
653
657
|
};
|
|
654
658
|
}
|
|
659
|
+
|
|
655
660
|
// ../solution-sdk/generated/src/models/ResourceValidationError.ts
|
|
656
661
|
function ResourceValidationErrorFromJSON(json) {
|
|
657
662
|
return ResourceValidationErrorFromJSONTyped(json, false);
|
|
@@ -741,34 +746,6 @@ function ExtendedPackageVersionStateFromJSON(json) {
|
|
|
741
746
|
function ExtendedPackageVersionStateFromJSONTyped(json, ignoreDiscriminator) {
|
|
742
747
|
return json;
|
|
743
748
|
}
|
|
744
|
-
// ../solution-sdk/generated/src/models/FolderInfo.ts
|
|
745
|
-
function FolderInfoFromJSON(json) {
|
|
746
|
-
return FolderInfoFromJSONTyped(json, false);
|
|
747
|
-
}
|
|
748
|
-
function FolderInfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
749
|
-
if (json == null) {
|
|
750
|
-
return json;
|
|
751
|
-
}
|
|
752
|
-
return {
|
|
753
|
-
fullyQualifiedName: json["fullyQualifiedName"],
|
|
754
|
-
path: json["path"] == null ? undefined : json["path"],
|
|
755
|
-
folderKey: json["folderKey"] == null ? undefined : json["folderKey"]
|
|
756
|
-
};
|
|
757
|
-
}
|
|
758
|
-
// ../solution-sdk/generated/src/models/LocationDto.ts
|
|
759
|
-
function LocationDtoFromJSON(json) {
|
|
760
|
-
return LocationDtoFromJSONTyped(json, false);
|
|
761
|
-
}
|
|
762
|
-
function LocationDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
763
|
-
if (json == null) {
|
|
764
|
-
return json;
|
|
765
|
-
}
|
|
766
|
-
return {
|
|
767
|
-
name: json["name"],
|
|
768
|
-
key: json["key"],
|
|
769
|
-
isPersonalWorkspace: json["isPersonalWorkspace"]
|
|
770
|
-
};
|
|
771
|
-
}
|
|
772
749
|
// ../solution-sdk/generated/src/models/PackageInfo.ts
|
|
773
750
|
function PackageInfoFromJSON(json) {
|
|
774
751
|
return PackageInfoFromJSONTyped(json, false);
|
|
@@ -792,74 +769,17 @@ function PackageInfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
792
769
|
hasUpgradeableDeployments: json["hasUpgradeableDeployments"]
|
|
793
770
|
};
|
|
794
771
|
}
|
|
795
|
-
// ../solution-sdk/generated/src/models/
|
|
796
|
-
function
|
|
797
|
-
return
|
|
798
|
-
}
|
|
799
|
-
function ResourceStatsFromJSONTyped(json, ignoreDiscriminator) {
|
|
800
|
-
if (json == null) {
|
|
801
|
-
return json;
|
|
802
|
-
}
|
|
803
|
-
return {
|
|
804
|
-
count: json["count"],
|
|
805
|
-
kind: json["kind"],
|
|
806
|
-
serviceName: json["serviceName"]
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
// ../solution-sdk/generated/src/models/PackageVersionResourceDto.ts
|
|
811
|
-
function PackageVersionResourceDtoFromJSON(json) {
|
|
812
|
-
return PackageVersionResourceDtoFromJSONTyped(json, false);
|
|
813
|
-
}
|
|
814
|
-
function PackageVersionResourceDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
815
|
-
if (json == null) {
|
|
816
|
-
return json;
|
|
817
|
-
}
|
|
818
|
-
return {
|
|
819
|
-
key: json["key"],
|
|
820
|
-
name: json["name"],
|
|
821
|
-
kind: json["kind"],
|
|
822
|
-
type: json["type"] == null ? undefined : json["type"],
|
|
823
|
-
apiVersion: json["apiVersion"],
|
|
824
|
-
folders: json["folders"].map(FolderInfoFromJSON)
|
|
825
|
-
};
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
// ../solution-sdk/generated/src/models/PackageVersionComponentsDto.ts
|
|
829
|
-
function PackageVersionComponentsDtoFromJSON(json) {
|
|
830
|
-
return PackageVersionComponentsDtoFromJSONTyped(json, false);
|
|
772
|
+
// ../solution-sdk/generated/src/models/PageInfoDtoOfDeploymentResourceInfo.ts
|
|
773
|
+
function PageInfoDtoOfDeploymentResourceInfoFromJSON(json) {
|
|
774
|
+
return PageInfoDtoOfDeploymentResourceInfoFromJSONTyped(json, false);
|
|
831
775
|
}
|
|
832
|
-
function
|
|
776
|
+
function PageInfoDtoOfDeploymentResourceInfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
833
777
|
if (json == null) {
|
|
834
778
|
return json;
|
|
835
779
|
}
|
|
836
780
|
return {
|
|
837
781
|
count: json["count"],
|
|
838
|
-
|
|
839
|
-
stats: json["stats"].map(ResourceStatsFromJSON)
|
|
840
|
-
};
|
|
841
|
-
}
|
|
842
|
-
// ../solution-sdk/generated/src/models/PackageVersionInfoDto.ts
|
|
843
|
-
function PackageVersionInfoDtoFromJSON(json) {
|
|
844
|
-
return PackageVersionInfoDtoFromJSONTyped(json, false);
|
|
845
|
-
}
|
|
846
|
-
function PackageVersionInfoDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
847
|
-
if (json == null) {
|
|
848
|
-
return json;
|
|
849
|
-
}
|
|
850
|
-
return {
|
|
851
|
-
key: json["key"],
|
|
852
|
-
packageName: json["packageName"],
|
|
853
|
-
packageVersion: json["packageVersion"],
|
|
854
|
-
publishDate: new Date(json["publishDate"]),
|
|
855
|
-
authorName: json["authorName"],
|
|
856
|
-
authorEmail: json["authorEmail"] == null ? undefined : json["authorEmail"],
|
|
857
|
-
description: json["description"] == null ? undefined : json["description"],
|
|
858
|
-
releaseNotes: json["releaseNotes"] == null ? undefined : json["releaseNotes"],
|
|
859
|
-
state: ExtendedPackageVersionStateFromJSON(json["state"]),
|
|
860
|
-
solutionRootFolderName: json["solutionRootFolderName"],
|
|
861
|
-
locationKey: json["locationKey"] == null ? undefined : json["locationKey"],
|
|
862
|
-
components: json["components"] == null ? undefined : PackageVersionComponentsDtoFromJSON(json["components"])
|
|
782
|
+
values: json["values"].map(DeploymentResourceInfoFromJSON)
|
|
863
783
|
};
|
|
864
784
|
}
|
|
865
785
|
// ../solution-sdk/generated/src/models/PageInfoDtoOfDeploymentSearchItemDto2.ts
|
|
@@ -904,8 +824,45 @@ function SearchFilterToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
904
824
|
searchTerm: value["searchTerm"]
|
|
905
825
|
};
|
|
906
826
|
}
|
|
827
|
+
// ../solution-sdk/generated/src/models/SolutionDeploymentAction.ts
|
|
828
|
+
var SolutionDeploymentAction = {
|
|
829
|
+
Install: "Install",
|
|
830
|
+
Uninstall: "Uninstall",
|
|
831
|
+
Upgrade: "Upgrade",
|
|
832
|
+
Rollback: "Rollback",
|
|
833
|
+
Activate: "Activate"
|
|
834
|
+
};
|
|
907
835
|
// ../solution-sdk/generated/src/apis/DeploymentsApi.ts
|
|
908
836
|
class DeploymentsApi extends BaseAPI {
|
|
837
|
+
async deploymentsDeleteRaw(requestParameters, initOverrides) {
|
|
838
|
+
if (requestParameters["deploymentKey"] == null) {
|
|
839
|
+
throw new RequiredError("deploymentKey", 'Required parameter "deploymentKey" was null or undefined when calling deploymentsDelete().');
|
|
840
|
+
}
|
|
841
|
+
const queryParameters = {};
|
|
842
|
+
const headerParameters = {};
|
|
843
|
+
if (requestParameters["xUipathAsVersion"] != null) {
|
|
844
|
+
headerParameters["x-uipath-as-version"] = String(requestParameters["xUipathAsVersion"]);
|
|
845
|
+
}
|
|
846
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
847
|
+
const token = this.configuration.accessToken;
|
|
848
|
+
const tokenString = await token("Bearer", []);
|
|
849
|
+
if (tokenString) {
|
|
850
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
let urlPath = `/api/deployments/{deploymentKey}`;
|
|
854
|
+
urlPath = urlPath.replace(`{${"deploymentKey"}}`, encodeURIComponent(String(requestParameters["deploymentKey"])));
|
|
855
|
+
const response = await this.request({
|
|
856
|
+
path: urlPath,
|
|
857
|
+
method: "DELETE",
|
|
858
|
+
headers: headerParameters,
|
|
859
|
+
query: queryParameters
|
|
860
|
+
}, initOverrides);
|
|
861
|
+
return new VoidApiResponse(response);
|
|
862
|
+
}
|
|
863
|
+
async deploymentsDelete(requestParameters, initOverrides) {
|
|
864
|
+
await this.deploymentsDeleteRaw(requestParameters, initOverrides);
|
|
865
|
+
}
|
|
909
866
|
async deploymentsDeployRaw(requestParameters, initOverrides) {
|
|
910
867
|
if (requestParameters["deploymentAutoRequest"] == null) {
|
|
911
868
|
throw new RequiredError("deploymentAutoRequest", 'Required parameter "deploymentAutoRequest" was null or undefined when calling deploymentsDeploy().');
|
|
@@ -970,13 +927,22 @@ class DeploymentsApi extends BaseAPI {
|
|
|
970
927
|
const response = await this.deploymentsGetByKeyRaw(requestParameters, initOverrides);
|
|
971
928
|
return await response.value();
|
|
972
929
|
}
|
|
973
|
-
async
|
|
930
|
+
async deploymentsGetDeploymentResourcesRaw(requestParameters, initOverrides) {
|
|
974
931
|
if (requestParameters["deploymentKey"] == null) {
|
|
975
|
-
throw new RequiredError("deploymentKey", 'Required parameter "deploymentKey" was null or undefined when calling
|
|
932
|
+
throw new RequiredError("deploymentKey", 'Required parameter "deploymentKey" was null or undefined when calling deploymentsGetDeploymentResources().');
|
|
976
933
|
}
|
|
977
934
|
const queryParameters = {};
|
|
978
|
-
if (requestParameters["
|
|
979
|
-
queryParameters["
|
|
935
|
+
if (requestParameters["folderKey"] != null) {
|
|
936
|
+
queryParameters["folderKey"] = requestParameters["folderKey"];
|
|
937
|
+
}
|
|
938
|
+
if (requestParameters["kind"] != null) {
|
|
939
|
+
queryParameters["kind"] = requestParameters["kind"];
|
|
940
|
+
}
|
|
941
|
+
if (requestParameters["skip"] != null) {
|
|
942
|
+
queryParameters["skip"] = requestParameters["skip"];
|
|
943
|
+
}
|
|
944
|
+
if (requestParameters["take"] != null) {
|
|
945
|
+
queryParameters["take"] = requestParameters["take"];
|
|
980
946
|
}
|
|
981
947
|
const headerParameters = {};
|
|
982
948
|
if (requestParameters["xUipathAsVersion"] != null) {
|
|
@@ -989,7 +955,7 @@ class DeploymentsApi extends BaseAPI {
|
|
|
989
955
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
990
956
|
}
|
|
991
957
|
}
|
|
992
|
-
let urlPath = `/api/deployments/{deploymentKey}/
|
|
958
|
+
let urlPath = `/api/deployments/{deploymentKey}/resources`;
|
|
993
959
|
urlPath = urlPath.replace(`{${"deploymentKey"}}`, encodeURIComponent(String(requestParameters["deploymentKey"])));
|
|
994
960
|
const response = await this.request({
|
|
995
961
|
path: urlPath,
|
|
@@ -997,48 +963,20 @@ class DeploymentsApi extends BaseAPI {
|
|
|
997
963
|
headers: headerParameters,
|
|
998
964
|
query: queryParameters
|
|
999
965
|
}, initOverrides);
|
|
1000
|
-
return new JSONApiResponse(response, (jsonValue) =>
|
|
966
|
+
return new JSONApiResponse(response, (jsonValue) => PageInfoDtoOfDeploymentResourceInfoFromJSON(jsonValue));
|
|
1001
967
|
}
|
|
1002
|
-
async
|
|
1003
|
-
const response = await this.
|
|
968
|
+
async deploymentsGetDeploymentResources(requestParameters, initOverrides) {
|
|
969
|
+
const response = await this.deploymentsGetDeploymentResourcesRaw(requestParameters, initOverrides);
|
|
1004
970
|
return await response.value();
|
|
1005
971
|
}
|
|
1006
|
-
async
|
|
1007
|
-
if (requestParameters["
|
|
1008
|
-
throw new RequiredError("
|
|
972
|
+
async deploymentsGetValidationResultRaw(requestParameters, initOverrides) {
|
|
973
|
+
if (requestParameters["deploymentKey"] == null) {
|
|
974
|
+
throw new RequiredError("deploymentKey", 'Required parameter "deploymentKey" was null or undefined when calling deploymentsGetValidationResult().');
|
|
1009
975
|
}
|
|
1010
976
|
const queryParameters = {};
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
if (requestParameters["xUipathAsVersion"] != null) {
|
|
1014
|
-
headerParameters["x-uipath-as-version"] = String(requestParameters["xUipathAsVersion"]);
|
|
1015
|
-
}
|
|
1016
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
1017
|
-
const token = this.configuration.accessToken;
|
|
1018
|
-
const tokenString = await token("Bearer", []);
|
|
1019
|
-
if (tokenString) {
|
|
1020
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
let urlPath = `/api/deployments`;
|
|
1024
|
-
const response = await this.request({
|
|
1025
|
-
path: urlPath,
|
|
1026
|
-
method: "POST",
|
|
1027
|
-
headers: headerParameters,
|
|
1028
|
-
query: queryParameters,
|
|
1029
|
-
body: DeploymentRequestToJSON(requestParameters["deploymentRequest"])
|
|
1030
|
-
}, initOverrides);
|
|
1031
|
-
return new JSONApiResponse(response, (jsonValue) => DeploymentItemDtoFromJSON(jsonValue));
|
|
1032
|
-
}
|
|
1033
|
-
async deploymentsPost(requestParameters, initOverrides) {
|
|
1034
|
-
const response = await this.deploymentsPostRaw(requestParameters, initOverrides);
|
|
1035
|
-
return await response.value();
|
|
1036
|
-
}
|
|
1037
|
-
async deploymentsRunRaw(requestParameters, initOverrides) {
|
|
1038
|
-
if (requestParameters["deploymentKey"] == null) {
|
|
1039
|
-
throw new RequiredError("deploymentKey", 'Required parameter "deploymentKey" was null or undefined when calling deploymentsRun().');
|
|
977
|
+
if (requestParameters["deploymentAction"] != null) {
|
|
978
|
+
queryParameters["deploymentAction"] = requestParameters["deploymentAction"];
|
|
1040
979
|
}
|
|
1041
|
-
const queryParameters = {};
|
|
1042
980
|
const headerParameters = {};
|
|
1043
981
|
if (requestParameters["xUipathAsVersion"] != null) {
|
|
1044
982
|
headerParameters["x-uipath-as-version"] = String(requestParameters["xUipathAsVersion"]);
|
|
@@ -1050,28 +988,25 @@ class DeploymentsApi extends BaseAPI {
|
|
|
1050
988
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1051
989
|
}
|
|
1052
990
|
}
|
|
1053
|
-
let urlPath = `/api/deployments/{deploymentKey}/
|
|
991
|
+
let urlPath = `/api/deployments/{deploymentKey}/validation-result`;
|
|
1054
992
|
urlPath = urlPath.replace(`{${"deploymentKey"}}`, encodeURIComponent(String(requestParameters["deploymentKey"])));
|
|
1055
993
|
const response = await this.request({
|
|
1056
994
|
path: urlPath,
|
|
1057
|
-
method: "
|
|
995
|
+
method: "GET",
|
|
1058
996
|
headers: headerParameters,
|
|
1059
997
|
query: queryParameters
|
|
1060
998
|
}, initOverrides);
|
|
1061
|
-
return new JSONApiResponse(response, (jsonValue) =>
|
|
999
|
+
return new JSONApiResponse(response, (jsonValue) => DeploymentValidationResultDtoFromJSON(jsonValue));
|
|
1062
1000
|
}
|
|
1063
|
-
async
|
|
1064
|
-
const response = await this.
|
|
1001
|
+
async deploymentsGetValidationResult(requestParameters, initOverrides) {
|
|
1002
|
+
const response = await this.deploymentsGetValidationResultRaw(requestParameters, initOverrides);
|
|
1065
1003
|
return await response.value();
|
|
1066
1004
|
}
|
|
1067
|
-
async
|
|
1068
|
-
if (requestParameters["
|
|
1069
|
-
throw new RequiredError("
|
|
1005
|
+
async deploymentsPostRaw(requestParameters, initOverrides) {
|
|
1006
|
+
if (requestParameters["deploymentRequest"] == null) {
|
|
1007
|
+
throw new RequiredError("deploymentRequest", 'Required parameter "deploymentRequest" was null or undefined when calling deploymentsPost().');
|
|
1070
1008
|
}
|
|
1071
1009
|
const queryParameters = {};
|
|
1072
|
-
if (requestParameters["packageVersionKey"] != null) {
|
|
1073
|
-
queryParameters["packageVersionKey"] = requestParameters["packageVersionKey"];
|
|
1074
|
-
}
|
|
1075
1010
|
const headerParameters = {};
|
|
1076
1011
|
headerParameters["Content-Type"] = "application/json";
|
|
1077
1012
|
if (requestParameters["xUipathAsVersion"] != null) {
|
|
@@ -1084,936 +1019,377 @@ class DeploymentsApi extends BaseAPI {
|
|
|
1084
1019
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1085
1020
|
}
|
|
1086
1021
|
}
|
|
1087
|
-
let urlPath = `/api/deployments
|
|
1088
|
-
urlPath = urlPath.replace(`{${"deploymentKey"}}`, encodeURIComponent(String(requestParameters["deploymentKey"])));
|
|
1022
|
+
let urlPath = `/api/deployments`;
|
|
1089
1023
|
const response = await this.request({
|
|
1090
1024
|
path: urlPath,
|
|
1091
1025
|
method: "POST",
|
|
1092
1026
|
headers: headerParameters,
|
|
1093
1027
|
query: queryParameters,
|
|
1094
|
-
body:
|
|
1028
|
+
body: DeploymentRequestToJSON(requestParameters["deploymentRequest"])
|
|
1095
1029
|
}, initOverrides);
|
|
1096
1030
|
return new JSONApiResponse(response, (jsonValue) => DeploymentItemDtoFromJSON(jsonValue));
|
|
1097
1031
|
}
|
|
1098
|
-
async
|
|
1099
|
-
const response = await this.
|
|
1032
|
+
async deploymentsPost(requestParameters, initOverrides) {
|
|
1033
|
+
const response = await this.deploymentsPostRaw(requestParameters, initOverrides);
|
|
1100
1034
|
return await response.value();
|
|
1101
1035
|
}
|
|
1102
1036
|
}
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1037
|
+
// ../solution-sdk/package.json
|
|
1038
|
+
var package_default = {
|
|
1039
|
+
name: "@uipath/solution-sdk",
|
|
1040
|
+
author: "UiPath",
|
|
1041
|
+
license: "SEE LICENSE IN LICENSE.txt",
|
|
1042
|
+
version: "1.204.0-preview.211",
|
|
1043
|
+
repository: {
|
|
1044
|
+
type: "git",
|
|
1045
|
+
url: "https://github.com/UiPath/cli.git",
|
|
1046
|
+
directory: "packages/solution-sdk"
|
|
1047
|
+
},
|
|
1048
|
+
publishConfig: {
|
|
1049
|
+
registry: "https://npm.pkg.github.com/@uipath"
|
|
1050
|
+
},
|
|
1051
|
+
keywords: [
|
|
1052
|
+
"uipath",
|
|
1053
|
+
"solution",
|
|
1054
|
+
"sdk"
|
|
1055
|
+
],
|
|
1056
|
+
type: "module",
|
|
1057
|
+
main: "./dist/index.js",
|
|
1058
|
+
types: "./dist/src/index.d.ts",
|
|
1059
|
+
exports: {
|
|
1060
|
+
".": {
|
|
1061
|
+
types: "./dist/src/index.d.ts",
|
|
1062
|
+
default: "./dist/index.js"
|
|
1063
|
+
},
|
|
1064
|
+
"./resources": {
|
|
1065
|
+
types: "./dist/src/resources/index.d.ts",
|
|
1066
|
+
default: "./dist/resources/index.js"
|
|
1067
|
+
},
|
|
1068
|
+
"./auth": {
|
|
1069
|
+
types: "./dist/src/solution-auth.d.ts",
|
|
1070
|
+
default: "./dist/solution-auth.js"
|
|
1121
1071
|
}
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1072
|
+
},
|
|
1073
|
+
bin: {
|
|
1074
|
+
"generate-sdk": "./dist/scripts/generate-sdk.js"
|
|
1075
|
+
},
|
|
1076
|
+
files: [
|
|
1077
|
+
"dist"
|
|
1078
|
+
],
|
|
1079
|
+
private: false,
|
|
1080
|
+
scripts: {
|
|
1081
|
+
build: "bun build ./src/index.ts ./src/resources/index.ts ./src/solution-auth.ts --outdir dist --format esm --target node --splitting --sourcemap=linked && bun build ./src/scripts/generate-sdk.ts --outdir dist/scripts --format esm --target node --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
|
|
1082
|
+
generate: "bun run src/scripts/generate-sdk.ts",
|
|
1083
|
+
lint: "biome check .",
|
|
1084
|
+
test: "vitest run",
|
|
1085
|
+
"test:coverage": "vitest run --coverage"
|
|
1086
|
+
},
|
|
1087
|
+
devDependencies: {
|
|
1088
|
+
"@openapitools/openapi-generator-cli": "^2.31.1",
|
|
1089
|
+
"@uipath/auth": "workspace:*",
|
|
1090
|
+
"@uipath/common": "workspace:*",
|
|
1091
|
+
"@uipath/filesystem": "workspace:*",
|
|
1092
|
+
"@uipath/orchestrator-sdk": "workspace:*",
|
|
1093
|
+
"@uipath/resource-builder-sdk": "2025.11.0-alpha6004-4107",
|
|
1094
|
+
"@uipath/solutionpackager-tool-core": "workspace:*",
|
|
1095
|
+
"@uipath/studioweb-sdk": "workspace:*",
|
|
1096
|
+
"@types/node": "^25.5.2",
|
|
1097
|
+
fflate: "^0.8.2",
|
|
1098
|
+
typescript: "^7.0.2"
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1102
|
+
// ../solution-sdk/src/user-agent.ts
|
|
1103
|
+
var SDK_USER_AGENT = getSdkUserAgentToken(package_default);
|
|
1104
|
+
installSdkUserAgentHeader(BaseAPI, SDK_USER_AGENT);
|
|
1105
|
+
|
|
1106
|
+
// ../studioweb-sdk/generated/src/runtime.ts
|
|
1107
|
+
var BASE_PATH2 = "https://alpha.uipath.com/studio_/backend".replace(/\/+$/, "");
|
|
1108
|
+
|
|
1109
|
+
class Configuration2 {
|
|
1110
|
+
configuration;
|
|
1111
|
+
constructor(configuration = {}) {
|
|
1112
|
+
this.configuration = configuration;
|
|
1131
1113
|
}
|
|
1132
|
-
|
|
1133
|
-
|
|
1114
|
+
set config(configuration) {
|
|
1115
|
+
this.configuration = configuration;
|
|
1134
1116
|
}
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
throw new RequiredError("packageVersionKey", 'Required parameter "packageVersionKey" was null or undefined when calling packagesDeleteVersion().');
|
|
1138
|
-
}
|
|
1139
|
-
const queryParameters = {};
|
|
1140
|
-
const headerParameters = {};
|
|
1141
|
-
if (requestParameters["xUipathAsVersion"] != null) {
|
|
1142
|
-
headerParameters["x-uipath-as-version"] = String(requestParameters["xUipathAsVersion"]);
|
|
1143
|
-
}
|
|
1144
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
1145
|
-
const token = this.configuration.accessToken;
|
|
1146
|
-
const tokenString = await token("Bearer", []);
|
|
1147
|
-
if (tokenString) {
|
|
1148
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
let urlPath = `/api/packages/versions/{packageVersionKey}`;
|
|
1152
|
-
urlPath = urlPath.replace(`{${"packageVersionKey"}}`, encodeURIComponent(String(requestParameters["packageVersionKey"])));
|
|
1153
|
-
const response = await this.request({
|
|
1154
|
-
path: urlPath,
|
|
1155
|
-
method: "DELETE",
|
|
1156
|
-
headers: headerParameters,
|
|
1157
|
-
query: queryParameters
|
|
1158
|
-
}, initOverrides);
|
|
1159
|
-
return new VoidApiResponse(response);
|
|
1117
|
+
get basePath() {
|
|
1118
|
+
return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH2;
|
|
1160
1119
|
}
|
|
1161
|
-
|
|
1162
|
-
|
|
1120
|
+
get fetchApi() {
|
|
1121
|
+
return this.configuration.fetchApi;
|
|
1163
1122
|
}
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
throw new RequiredError("packageVersionKey", 'Required parameter "packageVersionKey" was null or undefined when calling packagesDownload().');
|
|
1167
|
-
}
|
|
1168
|
-
const queryParameters = {};
|
|
1169
|
-
const headerParameters = {};
|
|
1170
|
-
if (requestParameters["xUipathAsVersion"] != null) {
|
|
1171
|
-
headerParameters["x-uipath-as-version"] = String(requestParameters["xUipathAsVersion"]);
|
|
1172
|
-
}
|
|
1173
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
1174
|
-
const token = this.configuration.accessToken;
|
|
1175
|
-
const tokenString = await token("Bearer", []);
|
|
1176
|
-
if (tokenString) {
|
|
1177
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
let urlPath = `/api/packages/{packageVersionKey}/download`;
|
|
1181
|
-
urlPath = urlPath.replace(`{${"packageVersionKey"}}`, encodeURIComponent(String(requestParameters["packageVersionKey"])));
|
|
1182
|
-
const response = await this.request({
|
|
1183
|
-
path: urlPath,
|
|
1184
|
-
method: "GET",
|
|
1185
|
-
headers: headerParameters,
|
|
1186
|
-
query: queryParameters
|
|
1187
|
-
}, initOverrides);
|
|
1188
|
-
return new JSONApiResponse(response, (jsonValue) => BlobFileAccessDtoFromJSON(jsonValue));
|
|
1123
|
+
get middleware() {
|
|
1124
|
+
return this.configuration.middleware || [];
|
|
1189
1125
|
}
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
return await response.value();
|
|
1126
|
+
get queryParamsStringify() {
|
|
1127
|
+
return this.configuration.queryParamsStringify || querystring2;
|
|
1193
1128
|
}
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
throw new RequiredError("packageKey", 'Required parameter "packageKey" was null or undefined when calling packagesGetPackage().');
|
|
1197
|
-
}
|
|
1198
|
-
const queryParameters = {};
|
|
1199
|
-
const headerParameters = {};
|
|
1200
|
-
if (requestParameters["xUipathAsVersion"] != null) {
|
|
1201
|
-
headerParameters["x-uipath-as-version"] = String(requestParameters["xUipathAsVersion"]);
|
|
1202
|
-
}
|
|
1203
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
1204
|
-
const token = this.configuration.accessToken;
|
|
1205
|
-
const tokenString = await token("Bearer", []);
|
|
1206
|
-
if (tokenString) {
|
|
1207
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
let urlPath = `/api/packages/{packageKey}`;
|
|
1211
|
-
urlPath = urlPath.replace(`{${"packageKey"}}`, encodeURIComponent(String(requestParameters["packageKey"])));
|
|
1212
|
-
const response = await this.request({
|
|
1213
|
-
path: urlPath,
|
|
1214
|
-
method: "GET",
|
|
1215
|
-
headers: headerParameters,
|
|
1216
|
-
query: queryParameters
|
|
1217
|
-
}, initOverrides);
|
|
1218
|
-
return new JSONApiResponse(response, (jsonValue) => PackageInfoFromJSON(jsonValue));
|
|
1129
|
+
get username() {
|
|
1130
|
+
return this.configuration.username;
|
|
1219
1131
|
}
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
return await response.value();
|
|
1132
|
+
get password() {
|
|
1133
|
+
return this.configuration.password;
|
|
1223
1134
|
}
|
|
1224
|
-
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
headerParameters["x-uipath-as-version"] = String(requestParameters["xUipathAsVersion"]);
|
|
1135
|
+
get apiKey() {
|
|
1136
|
+
const apiKey = this.configuration.apiKey;
|
|
1137
|
+
if (apiKey) {
|
|
1138
|
+
return typeof apiKey === "function" ? apiKey : () => apiKey;
|
|
1229
1139
|
}
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1140
|
+
return;
|
|
1141
|
+
}
|
|
1142
|
+
get accessToken() {
|
|
1143
|
+
const accessToken = this.configuration.accessToken;
|
|
1144
|
+
if (accessToken) {
|
|
1145
|
+
return typeof accessToken === "function" ? accessToken : async () => accessToken;
|
|
1236
1146
|
}
|
|
1237
|
-
|
|
1238
|
-
const response = await this.request({
|
|
1239
|
-
path: urlPath,
|
|
1240
|
-
method: "GET",
|
|
1241
|
-
headers: headerParameters,
|
|
1242
|
-
query: queryParameters
|
|
1243
|
-
}, initOverrides);
|
|
1244
|
-
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(LocationDtoFromJSON));
|
|
1147
|
+
return;
|
|
1245
1148
|
}
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
return await response.value();
|
|
1149
|
+
get headers() {
|
|
1150
|
+
return this.configuration.headers;
|
|
1249
1151
|
}
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
throw new RequiredError("packageVersionKey", 'Required parameter "packageVersionKey" was null or undefined when calling packagesGetVersion().');
|
|
1253
|
-
}
|
|
1254
|
-
const queryParameters = {};
|
|
1255
|
-
const headerParameters = {};
|
|
1256
|
-
if (requestParameters["xUipathAsVersion"] != null) {
|
|
1257
|
-
headerParameters["x-uipath-as-version"] = String(requestParameters["xUipathAsVersion"]);
|
|
1258
|
-
}
|
|
1259
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
1260
|
-
const token = this.configuration.accessToken;
|
|
1261
|
-
const tokenString = await token("Bearer", []);
|
|
1262
|
-
if (tokenString) {
|
|
1263
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1264
|
-
}
|
|
1265
|
-
}
|
|
1266
|
-
let urlPath = `/api/packages/versions/{packageVersionKey}`;
|
|
1267
|
-
urlPath = urlPath.replace(`{${"packageVersionKey"}}`, encodeURIComponent(String(requestParameters["packageVersionKey"])));
|
|
1268
|
-
const response = await this.request({
|
|
1269
|
-
path: urlPath,
|
|
1270
|
-
method: "GET",
|
|
1271
|
-
headers: headerParameters,
|
|
1272
|
-
query: queryParameters
|
|
1273
|
-
}, initOverrides);
|
|
1274
|
-
return new JSONApiResponse(response, (jsonValue) => PackageVersionInfoDtoFromJSON(jsonValue));
|
|
1152
|
+
get credentials() {
|
|
1153
|
+
return this.configuration.credentials;
|
|
1275
1154
|
}
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1155
|
+
}
|
|
1156
|
+
var DefaultConfig2 = new Configuration2;
|
|
1157
|
+
|
|
1158
|
+
class BaseAPI2 {
|
|
1159
|
+
configuration;
|
|
1160
|
+
static jsonRegex = new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", "i");
|
|
1161
|
+
middleware;
|
|
1162
|
+
constructor(configuration = DefaultConfig2) {
|
|
1163
|
+
this.configuration = configuration;
|
|
1164
|
+
this.middleware = configuration.middleware;
|
|
1279
1165
|
}
|
|
1280
|
-
|
|
1281
|
-
const
|
|
1282
|
-
|
|
1283
|
-
|
|
1166
|
+
withMiddleware(...middlewares) {
|
|
1167
|
+
const next = this.clone();
|
|
1168
|
+
next.middleware = next.middleware.concat(...middlewares);
|
|
1169
|
+
return next;
|
|
1170
|
+
}
|
|
1171
|
+
withPreMiddleware(...preMiddlewares) {
|
|
1172
|
+
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
|
1173
|
+
return this.withMiddleware(...middlewares);
|
|
1174
|
+
}
|
|
1175
|
+
withPostMiddleware(...postMiddlewares) {
|
|
1176
|
+
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
1177
|
+
return this.withMiddleware(...middlewares);
|
|
1178
|
+
}
|
|
1179
|
+
isJsonMime(mime) {
|
|
1180
|
+
if (!mime) {
|
|
1181
|
+
return false;
|
|
1284
1182
|
}
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1183
|
+
return BaseAPI2.jsonRegex.test(mime);
|
|
1184
|
+
}
|
|
1185
|
+
async request(context, initOverrides) {
|
|
1186
|
+
const { url, init } = await this.createFetchParams(context, initOverrides);
|
|
1187
|
+
const response = await this.fetchApi(url, init);
|
|
1188
|
+
if (response && (response.status >= 200 && response.status < 300)) {
|
|
1189
|
+
return response;
|
|
1289
1190
|
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1191
|
+
throw new ResponseError2(response, "Response returned an error code");
|
|
1192
|
+
}
|
|
1193
|
+
async createFetchParams(context, initOverrides) {
|
|
1194
|
+
let url = this.configuration.basePath + context.path;
|
|
1195
|
+
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
1196
|
+
url += "?" + this.configuration.queryParamsStringify(context.query);
|
|
1296
1197
|
}
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
body:
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1198
|
+
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
1199
|
+
Object.keys(headers).forEach((key) => headers[key] === undefined ? delete headers[key] : {});
|
|
1200
|
+
const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async () => initOverrides;
|
|
1201
|
+
const initParams = {
|
|
1202
|
+
method: context.method,
|
|
1203
|
+
headers,
|
|
1204
|
+
body: context.body,
|
|
1205
|
+
credentials: this.configuration.credentials
|
|
1206
|
+
};
|
|
1207
|
+
const overriddenInit = {
|
|
1208
|
+
...initParams,
|
|
1209
|
+
...await initOverrideFn({
|
|
1210
|
+
init: initParams,
|
|
1211
|
+
context
|
|
1212
|
+
})
|
|
1213
|
+
};
|
|
1214
|
+
let body;
|
|
1215
|
+
if (isFormData2(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob2(overriddenInit.body)) {
|
|
1216
|
+
body = overriddenInit.body;
|
|
1217
|
+
} else if (this.isJsonMime(headers["Content-Type"])) {
|
|
1218
|
+
body = JSON.stringify(overriddenInit.body);
|
|
1307
1219
|
} else {
|
|
1308
|
-
|
|
1220
|
+
body = overriddenInit.body;
|
|
1309
1221
|
}
|
|
1222
|
+
const init = {
|
|
1223
|
+
...overriddenInit,
|
|
1224
|
+
body
|
|
1225
|
+
};
|
|
1226
|
+
return { url, init };
|
|
1310
1227
|
}
|
|
1311
|
-
async
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
async searchSearchDeployments22Raw(requestParameters, initOverrides) {
|
|
1320
|
-
if (requestParameters["deploymentsSearchRequest2"] == null) {
|
|
1321
|
-
throw new RequiredError("deploymentsSearchRequest2", 'Required parameter "deploymentsSearchRequest2" was null or undefined when calling searchSearchDeployments22().');
|
|
1322
|
-
}
|
|
1323
|
-
const queryParameters = {};
|
|
1324
|
-
const headerParameters = {};
|
|
1325
|
-
headerParameters["Content-Type"] = "application/json";
|
|
1326
|
-
if (requestParameters["xUipathAsVersion"] != null) {
|
|
1327
|
-
headerParameters["x-uipath-as-version"] = String(requestParameters["xUipathAsVersion"]);
|
|
1328
|
-
}
|
|
1329
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
1330
|
-
const token = this.configuration.accessToken;
|
|
1331
|
-
const tokenString = await token("Bearer", []);
|
|
1332
|
-
if (tokenString) {
|
|
1333
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1228
|
+
fetchApi = async (url, init) => {
|
|
1229
|
+
let fetchParams = { url, init };
|
|
1230
|
+
for (const middleware of this.middleware) {
|
|
1231
|
+
if (middleware.pre) {
|
|
1232
|
+
fetchParams = await middleware.pre({
|
|
1233
|
+
fetch: this.fetchApi,
|
|
1234
|
+
...fetchParams
|
|
1235
|
+
}) || fetchParams;
|
|
1334
1236
|
}
|
|
1335
1237
|
}
|
|
1336
|
-
let
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
headerParameters["x-uipath-as-version"] = String(requestParameters["xUipathAsVersion"]);
|
|
1238
|
+
let response = undefined;
|
|
1239
|
+
try {
|
|
1240
|
+
response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
|
1241
|
+
} catch (e) {
|
|
1242
|
+
for (const middleware of this.middleware) {
|
|
1243
|
+
if (middleware.onError) {
|
|
1244
|
+
response = await middleware.onError({
|
|
1245
|
+
fetch: this.fetchApi,
|
|
1246
|
+
url: fetchParams.url,
|
|
1247
|
+
init: fetchParams.init,
|
|
1248
|
+
error: e,
|
|
1249
|
+
response: response ? response.clone() : undefined
|
|
1250
|
+
}) || response;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
if (response === undefined) {
|
|
1254
|
+
if (e instanceof Error) {
|
|
1255
|
+
throw new FetchError2(e, "The request failed and the interceptors did not return an alternative response");
|
|
1256
|
+
} else {
|
|
1257
|
+
throw e;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1359
1260
|
}
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1261
|
+
for (const middleware of this.middleware) {
|
|
1262
|
+
if (middleware.post) {
|
|
1263
|
+
response = await middleware.post({
|
|
1264
|
+
fetch: this.fetchApi,
|
|
1265
|
+
url: fetchParams.url,
|
|
1266
|
+
init: fetchParams.init,
|
|
1267
|
+
response: response.clone()
|
|
1268
|
+
}) || response;
|
|
1365
1269
|
}
|
|
1366
1270
|
}
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
}, initOverrides);
|
|
1375
|
-
return new JSONApiResponse(response, (jsonValue) => PageInfoDtoOfPackageInfoFromJSON(jsonValue));
|
|
1376
|
-
}
|
|
1377
|
-
async searchSearchPackages(requestParameters, initOverrides) {
|
|
1378
|
-
const response = await this.searchSearchPackagesRaw(requestParameters, initOverrides);
|
|
1379
|
-
return await response.value();
|
|
1271
|
+
return response;
|
|
1272
|
+
};
|
|
1273
|
+
clone() {
|
|
1274
|
+
const constructor = this.constructor;
|
|
1275
|
+
const next = new constructor(this.configuration);
|
|
1276
|
+
next.middleware = this.middleware.slice();
|
|
1277
|
+
return next;
|
|
1380
1278
|
}
|
|
1381
1279
|
}
|
|
1280
|
+
function isBlob2(value) {
|
|
1281
|
+
return typeof Blob !== "undefined" && value instanceof Blob;
|
|
1282
|
+
}
|
|
1283
|
+
function isFormData2(value) {
|
|
1284
|
+
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
1285
|
+
}
|
|
1382
1286
|
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
super(`Studio Web cannot import API Workflow project(s) manifested by project.json: ${offendingProjects.join(", ")}. Studio Web's solution import accepts only project.uiproj-manifested projects.`);
|
|
1390
|
-
this.offendingProjects = offendingProjects;
|
|
1391
|
-
this.name = "StudioWebIncompatibleProjectError";
|
|
1287
|
+
class ResponseError2 extends Error {
|
|
1288
|
+
response;
|
|
1289
|
+
name = "ResponseError";
|
|
1290
|
+
constructor(response, msg) {
|
|
1291
|
+
super(msg);
|
|
1292
|
+
this.response = response;
|
|
1392
1293
|
}
|
|
1393
1294
|
}
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1295
|
+
|
|
1296
|
+
class FetchError2 extends Error {
|
|
1297
|
+
cause;
|
|
1298
|
+
name = "FetchError";
|
|
1299
|
+
constructor(cause, msg) {
|
|
1300
|
+
super(msg);
|
|
1301
|
+
this.cause = cause;
|
|
1398
1302
|
}
|
|
1399
1303
|
}
|
|
1400
1304
|
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
"
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
".local"
|
|
1408
|
-
]);
|
|
1409
|
-
var DEFAULT_EXCLUDED_FILE_PATTERNS = [
|
|
1410
|
-
/^\.env($|\..+)/
|
|
1411
|
-
];
|
|
1412
|
-
function isDefaultExcludedFileName(name) {
|
|
1413
|
-
for (const pattern of DEFAULT_EXCLUDED_FILE_PATTERNS) {
|
|
1414
|
-
if (pattern.test(name)) {
|
|
1415
|
-
return true;
|
|
1416
|
-
}
|
|
1305
|
+
class RequiredError2 extends Error {
|
|
1306
|
+
field;
|
|
1307
|
+
name = "RequiredError";
|
|
1308
|
+
constructor(field, msg) {
|
|
1309
|
+
super(msg);
|
|
1310
|
+
this.field = field;
|
|
1417
1311
|
}
|
|
1418
|
-
return false;
|
|
1419
1312
|
}
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
const names = new Set;
|
|
1423
|
-
for (const rawLine of body.split(/\r?\n/)) {
|
|
1424
|
-
const line = rawLine.split("#")[0]?.trim();
|
|
1425
|
-
if (!line) {
|
|
1426
|
-
continue;
|
|
1427
|
-
}
|
|
1428
|
-
if (line.includes("/") || line.includes("\\")) {
|
|
1429
|
-
continue;
|
|
1430
|
-
}
|
|
1431
|
-
names.add(line);
|
|
1432
|
-
}
|
|
1433
|
-
return names;
|
|
1313
|
+
function querystring2(params, prefix = "") {
|
|
1314
|
+
return Object.keys(params).map((key) => querystringSingleKey2(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
|
|
1434
1315
|
}
|
|
1435
|
-
|
|
1436
|
-
const
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
for (const name of options.additionalExcludeDirs) {
|
|
1441
|
-
excluded.add(name);
|
|
1442
|
-
}
|
|
1316
|
+
function querystringSingleKey2(key, value, keyPrefix = "") {
|
|
1317
|
+
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
|
|
1318
|
+
if (value instanceof Array) {
|
|
1319
|
+
const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
|
|
1320
|
+
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
|
1443
1321
|
}
|
|
1444
|
-
|
|
1445
|
-
const
|
|
1446
|
-
|
|
1447
|
-
if (!isRoot) {
|
|
1448
|
-
emptyDirs.push(current);
|
|
1449
|
-
}
|
|
1450
|
-
return;
|
|
1451
|
-
}
|
|
1452
|
-
for (const entryName of entries) {
|
|
1453
|
-
const fullPath = fs.path.join(current, entryName);
|
|
1454
|
-
const entryStat = await fs.stat(fullPath);
|
|
1455
|
-
if (entryStat?.isDirectory()) {
|
|
1456
|
-
if (excluded.has(entryName)) {
|
|
1457
|
-
continue;
|
|
1458
|
-
}
|
|
1459
|
-
await walk(fullPath, false);
|
|
1460
|
-
} else if (entryStat?.isFile()) {
|
|
1461
|
-
if (isDefaultExcludedFileName(entryName)) {
|
|
1462
|
-
continue;
|
|
1463
|
-
}
|
|
1464
|
-
files.push(fullPath);
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1322
|
+
if (value instanceof Set) {
|
|
1323
|
+
const valueAsArray = Array.from(value);
|
|
1324
|
+
return querystringSingleKey2(key, valueAsArray, keyPrefix);
|
|
1467
1325
|
}
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
}
|
|
1471
|
-
async function createZipFromDir(fs, dir, options = {}) {
|
|
1472
|
-
const { files, emptyDirs } = await collectTree(fs, dir, options);
|
|
1473
|
-
const zippable = {};
|
|
1474
|
-
for (const filePath of files) {
|
|
1475
|
-
const relPath = fs.path.relative(dir, filePath).replace(/\\/g, "/");
|
|
1476
|
-
const data = await fs.readFile(filePath);
|
|
1477
|
-
if (data) {
|
|
1478
|
-
zippable[relPath] = new Uint8Array(data);
|
|
1479
|
-
}
|
|
1326
|
+
if (value instanceof Date) {
|
|
1327
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
|
1480
1328
|
}
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
if (!relPath) {
|
|
1484
|
-
continue;
|
|
1485
|
-
}
|
|
1486
|
-
zippable[`${relPath}/`] = new Uint8Array(0);
|
|
1329
|
+
if (value instanceof Object) {
|
|
1330
|
+
return querystring2(value, fullKey);
|
|
1487
1331
|
}
|
|
1488
|
-
return
|
|
1332
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
1489
1333
|
}
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
var ZIP64_LOCATOR_SIGNATURE = 117853008;
|
|
1496
|
-
var ZIP64_LOCATOR_SIZE = 20;
|
|
1497
|
-
var MAX_ZIP32_ENTRIES = 65535;
|
|
1498
|
-
var MAX_ZIP32_OFFSET = 4294967295;
|
|
1499
|
-
function finalizeZip64(zip) {
|
|
1500
|
-
const view = new DataView(zip.buffer, zip.byteOffset, zip.byteLength);
|
|
1501
|
-
const eocdStart = zip.byteLength - EOCD_SIZE;
|
|
1502
|
-
if (eocdStart < 0 || view.getUint32(eocdStart, true) !== EOCD_SIGNATURE) {
|
|
1503
|
-
throw new Error("Cannot finalize the solution archive: it does not end with an end-of-central-directory record.");
|
|
1334
|
+
function canConsumeForm(consumes) {
|
|
1335
|
+
for (const consume of consumes) {
|
|
1336
|
+
if (consume.contentType === "multipart/form-data") {
|
|
1337
|
+
return true;
|
|
1338
|
+
}
|
|
1504
1339
|
}
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1340
|
+
return false;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
class JSONApiResponse2 {
|
|
1344
|
+
raw;
|
|
1345
|
+
transformer;
|
|
1346
|
+
constructor(raw, transformer = (jsonValue) => jsonValue) {
|
|
1347
|
+
this.raw = raw;
|
|
1348
|
+
this.transformer = transformer;
|
|
1510
1349
|
}
|
|
1511
|
-
|
|
1512
|
-
|
|
1350
|
+
async value() {
|
|
1351
|
+
return this.transformer(await this.raw.json());
|
|
1513
1352
|
}
|
|
1514
|
-
const tail = new Uint8Array(ZIP64_EOCD_SIZE + ZIP64_LOCATOR_SIZE + EOCD_SIZE);
|
|
1515
|
-
const tailView = new DataView(tail.buffer);
|
|
1516
|
-
const count = BigInt(entryCount);
|
|
1517
|
-
tailView.setUint32(0, ZIP64_EOCD_SIGNATURE, true);
|
|
1518
|
-
tailView.setBigUint64(4, BigInt(ZIP64_EOCD_SIZE - 12), true);
|
|
1519
|
-
tailView.setUint16(12, 45, true);
|
|
1520
|
-
tailView.setUint16(14, 45, true);
|
|
1521
|
-
tailView.setUint32(16, 0, true);
|
|
1522
|
-
tailView.setUint32(20, 0, true);
|
|
1523
|
-
tailView.setBigUint64(24, count, true);
|
|
1524
|
-
tailView.setBigUint64(32, count, true);
|
|
1525
|
-
tailView.setBigUint64(40, BigInt(cdSize), true);
|
|
1526
|
-
tailView.setBigUint64(48, BigInt(cdOffset), true);
|
|
1527
|
-
const locator = ZIP64_EOCD_SIZE;
|
|
1528
|
-
tailView.setUint32(locator, ZIP64_LOCATOR_SIGNATURE, true);
|
|
1529
|
-
tailView.setUint32(locator + 4, 0, true);
|
|
1530
|
-
tailView.setBigUint64(locator + 8, BigInt(eocdStart), true);
|
|
1531
|
-
tailView.setUint32(locator + 16, 1, true);
|
|
1532
|
-
const eocd = ZIP64_EOCD_SIZE + ZIP64_LOCATOR_SIZE;
|
|
1533
|
-
tailView.setUint32(eocd, EOCD_SIGNATURE, true);
|
|
1534
|
-
tailView.setUint16(eocd + 4, 0, true);
|
|
1535
|
-
tailView.setUint16(eocd + 6, 0, true);
|
|
1536
|
-
tailView.setUint16(eocd + 8, MAX_ZIP32_ENTRIES, true);
|
|
1537
|
-
tailView.setUint16(eocd + 10, MAX_ZIP32_ENTRIES, true);
|
|
1538
|
-
tailView.setUint32(eocd + 12, cdSize, true);
|
|
1539
|
-
tailView.setUint32(eocd + 16, cdOffset, true);
|
|
1540
|
-
tailView.setUint16(eocd + 20, 0, true);
|
|
1541
|
-
const out = new Uint8Array(eocdStart + tail.byteLength);
|
|
1542
|
-
out.set(zip.subarray(0, eocdStart), 0);
|
|
1543
|
-
out.set(tail, eocdStart);
|
|
1544
|
-
return out;
|
|
1545
1353
|
}
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1354
|
+
// ../studioweb-sdk/generated/src/models/AccessStatus.ts
|
|
1355
|
+
function AccessStatusFromJSON(json) {
|
|
1356
|
+
return AccessStatusFromJSONTyped(json, false);
|
|
1357
|
+
}
|
|
1358
|
+
function AccessStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
1359
|
+
return json;
|
|
1360
|
+
}
|
|
1361
|
+
// ../studioweb-sdk/generated/src/models/PinnedProject.ts
|
|
1362
|
+
function PinnedProjectFromJSON(json) {
|
|
1363
|
+
return PinnedProjectFromJSONTyped(json, false);
|
|
1364
|
+
}
|
|
1365
|
+
function PinnedProjectFromJSONTyped(json, ignoreDiscriminator) {
|
|
1366
|
+
if (json == null) {
|
|
1367
|
+
return json;
|
|
1556
1368
|
}
|
|
1557
|
-
return
|
|
1369
|
+
return {
|
|
1370
|
+
id: json["id"] == null ? undefined : json["id"],
|
|
1371
|
+
projectDbModelId: json["projectDbModelId"] == null ? undefined : json["projectDbModelId"],
|
|
1372
|
+
userId: json["userId"] == null ? undefined : json["userId"],
|
|
1373
|
+
creationTime: json["creationTime"] == null ? undefined : new Date(json["creationTime"]),
|
|
1374
|
+
project: json["project"] == null ? undefined : ProjectDbModelFromJSON(json["project"])
|
|
1375
|
+
};
|
|
1558
1376
|
}
|
|
1559
1377
|
|
|
1560
|
-
// ../
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
if (!await fs.exists(ignorePath)) {
|
|
1564
|
-
return new Set;
|
|
1565
|
-
}
|
|
1566
|
-
try {
|
|
1567
|
-
const body = await fs.readFile(ignorePath, "utf-8");
|
|
1568
|
-
if (!body) {
|
|
1569
|
-
return new Set;
|
|
1570
|
-
}
|
|
1571
|
-
return parseUipignore(body);
|
|
1572
|
-
} catch (err) {
|
|
1573
|
-
logger.warn(`Could not read ${UIPIGNORE_FILENAME}; ignoring it: ${String(err)}`);
|
|
1574
|
-
return new Set;
|
|
1575
|
-
}
|
|
1378
|
+
// ../studioweb-sdk/generated/src/models/ProjectStructure.ts
|
|
1379
|
+
function ProjectStructureFromJSON(json) {
|
|
1380
|
+
return ProjectStructureFromJSONTyped(json, false);
|
|
1576
1381
|
}
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
if (projectExtra.size === 0) {
|
|
1580
|
-
return solutionExcludeDirs;
|
|
1581
|
-
}
|
|
1582
|
-
const merged = new Set(solutionExcludeDirs);
|
|
1583
|
-
for (const name of projectExtra) {
|
|
1584
|
-
merged.add(name);
|
|
1585
|
-
}
|
|
1586
|
-
logger.info(`[${projectLabel}] Applying ${projectExtra.size} extra exclude(s) from project ${UIPIGNORE_FILENAME}: ${[...projectExtra].join(", ")}`);
|
|
1587
|
-
return merged;
|
|
1382
|
+
function ProjectStructureFromJSONTyped(json, ignoreDiscriminator) {
|
|
1383
|
+
return json;
|
|
1588
1384
|
}
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
});
|
|
1594
|
-
if (files.length === 0 && emptyDirs.length === 0) {
|
|
1595
|
-
const rootRel = fs.path.relative(relativeBase, srcDir);
|
|
1596
|
-
if (rootRel) {
|
|
1597
|
-
await fs.mkdir(fs.path.join(destBaseDir, rootRel));
|
|
1598
|
-
}
|
|
1599
|
-
return;
|
|
1600
|
-
}
|
|
1601
|
-
for (const f of files) {
|
|
1602
|
-
const relPath = fs.path.relative(relativeBase, f);
|
|
1603
|
-
const destPath = fs.path.join(destBaseDir, relPath);
|
|
1604
|
-
const data = await fs.readFile(f);
|
|
1605
|
-
if (data) {
|
|
1606
|
-
await fs.writeFile(destPath, data);
|
|
1607
|
-
} else {
|
|
1608
|
-
logger.warn(`Skipping empty or unreadable file: ${f}`);
|
|
1609
|
-
}
|
|
1610
|
-
}
|
|
1611
|
-
for (const dir of emptyDirs) {
|
|
1612
|
-
const relPath = fs.path.relative(relativeBase, dir);
|
|
1613
|
-
if (!relPath) {
|
|
1614
|
-
continue;
|
|
1615
|
-
}
|
|
1616
|
-
await fs.mkdir(fs.path.join(destBaseDir, relPath));
|
|
1617
|
-
}
|
|
1385
|
+
|
|
1386
|
+
// ../studioweb-sdk/generated/src/models/ProjectAppliedProfileModel.ts
|
|
1387
|
+
function ProjectAppliedProfileModelFromJSON(json) {
|
|
1388
|
+
return ProjectAppliedProfileModelFromJSONTyped(json, false);
|
|
1618
1389
|
}
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
if (additionalExcludeDirs) {
|
|
1623
|
-
for (const name of additionalExcludeDirs) {
|
|
1624
|
-
topLevelExclude.add(name);
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
const entries = await fs.readdir(srcProjectDir);
|
|
1628
|
-
for (const entryName of entries) {
|
|
1629
|
-
const srcPath = fs.path.join(srcProjectDir, entryName);
|
|
1630
|
-
const entryStat = await fs.stat(srcPath);
|
|
1631
|
-
if (!entryStat) {
|
|
1632
|
-
continue;
|
|
1633
|
-
}
|
|
1634
|
-
if (entryStat.isFile()) {
|
|
1635
|
-
if (isDefaultExcludedFileName(entryName)) {
|
|
1636
|
-
continue;
|
|
1637
|
-
}
|
|
1638
|
-
const data = await fs.readFile(srcPath);
|
|
1639
|
-
if (data) {
|
|
1640
|
-
await fs.writeFile(fs.path.join(destProjectDir, entryName), data);
|
|
1641
|
-
}
|
|
1642
|
-
} else if (entryStat.isDirectory()) {
|
|
1643
|
-
if (topLevelExclude.has(entryName)) {
|
|
1644
|
-
continue;
|
|
1645
|
-
}
|
|
1646
|
-
if (entryName === "content" || entryName === "flow_files") {
|
|
1647
|
-
await mirrorTree(fs, srcPath, srcPath, destProjectDir, additionalExcludeDirs);
|
|
1648
|
-
} else {
|
|
1649
|
-
await mirrorTree(fs, srcPath, srcProjectDir, destProjectDir, additionalExcludeDirs);
|
|
1650
|
-
}
|
|
1651
|
-
}
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
async function bundleSolution(fs, solutionDir, outputDir, outputName) {
|
|
1655
|
-
const resolvedPath = fs.path.resolve(solutionDir);
|
|
1656
|
-
const solStat = await fs.stat(resolvedPath);
|
|
1657
|
-
if (!solStat) {
|
|
1658
|
-
throw new Error(`Path not found: ${resolvedPath}`);
|
|
1659
|
-
}
|
|
1660
|
-
if (!solStat.isDirectory()) {
|
|
1661
|
-
throw new Error(`Not a directory: ${resolvedPath}. Provide the solution directory containing a .uipx file.`);
|
|
1662
|
-
}
|
|
1663
|
-
const { uipx, uipxFileName } = await readUipxFile(fs, resolvedPath);
|
|
1664
|
-
const additionalExcludeDirs = await readUipignore(fs, resolvedPath);
|
|
1665
|
-
if (additionalExcludeDirs.size > 0) {
|
|
1666
|
-
logger.info(`Applying ${additionalExcludeDirs.size} extra exclude(s) from .uipignore: ${[...additionalExcludeDirs].join(", ")}`);
|
|
1667
|
-
}
|
|
1668
|
-
const effectiveExclude = new Set(DEFAULT_EXCLUDED_DIR_NAMES);
|
|
1669
|
-
for (const name of additionalExcludeDirs) {
|
|
1670
|
-
effectiveExclude.add(name);
|
|
1671
|
-
}
|
|
1672
|
-
for (const project of uipx.Projects) {
|
|
1673
|
-
project.ProjectRelativePath = toForwardSlash(project.ProjectRelativePath);
|
|
1674
|
-
}
|
|
1675
|
-
assertStudioWebCompatibleProjects(uipx.Projects);
|
|
1676
|
-
const solutionStorage = {
|
|
1677
|
-
SolutionId: uipx.SolutionId,
|
|
1678
|
-
Projects: uipx.Projects.map((p) => ({
|
|
1679
|
-
ProjectId: p.Id,
|
|
1680
|
-
ProjectRelativePath: p.ProjectRelativePath
|
|
1681
|
-
}))
|
|
1682
|
-
};
|
|
1683
|
-
const solutionName = outputName || fs.path.basename(uipxFileName, ".uipx");
|
|
1684
|
-
const stagingDir = fs.path.join(resolvedPath, `.uis-staging-${Date.now()}`);
|
|
1685
|
-
await fs.mkdir(stagingDir);
|
|
1686
|
-
try {
|
|
1687
|
-
await fs.writeFile(fs.path.join(stagingDir, "SolutionStorage.json"), JSON.stringify(solutionStorage));
|
|
1688
|
-
await fs.writeFile(fs.path.join(stagingDir, uipxFileName), JSON.stringify(uipx));
|
|
1689
|
-
for (const project of uipx.Projects) {
|
|
1690
|
-
const projectDir = fs.path.dirname(project.ProjectRelativePath);
|
|
1691
|
-
const srcProjectPath = fs.path.join(resolvedPath, projectDir);
|
|
1692
|
-
const projectStat = await fs.stat(srcProjectPath);
|
|
1693
|
-
if (!projectStat) {
|
|
1694
|
-
throw new Error(`Project directory not found: ${srcProjectPath}`);
|
|
1695
|
-
}
|
|
1696
|
-
const projectExcludeDirs = await mergeProjectUipignore(fs, srcProjectPath, projectDir, additionalExcludeDirs);
|
|
1697
|
-
await flattenProjectDir(fs, srcProjectPath, fs.path.join(stagingDir, projectDir), projectExcludeDirs);
|
|
1698
|
-
}
|
|
1699
|
-
const resourcesPath = fs.path.join(resolvedPath, "resources");
|
|
1700
|
-
if (!effectiveExclude.has("resources") && await fs.exists(resourcesPath)) {
|
|
1701
|
-
await mirrorTree(fs, resourcesPath, resolvedPath, stagingDir, additionalExcludeDirs);
|
|
1702
|
-
}
|
|
1703
|
-
const userProfilePath = fs.path.join(resolvedPath, "userProfile");
|
|
1704
|
-
if (!effectiveExclude.has("userProfile") && await fs.exists(userProfilePath)) {
|
|
1705
|
-
await mirrorTree(fs, userProfilePath, resolvedPath, stagingDir, additionalExcludeDirs);
|
|
1706
|
-
}
|
|
1707
|
-
const resolvedOutputDir = fs.path.resolve(outputDir);
|
|
1708
|
-
if (!await fs.exists(resolvedOutputDir)) {
|
|
1709
|
-
await fs.mkdir(resolvedOutputDir);
|
|
1710
|
-
}
|
|
1711
|
-
const uisPath = fs.path.join(resolvedOutputDir, `${solutionName}.uis`);
|
|
1712
|
-
const zipData = await createZipFromDir(fs, stagingDir);
|
|
1713
|
-
await fs.writeFile(uisPath, zipData);
|
|
1714
|
-
const uipxPath = fs.path.join(resolvedPath, uipxFileName);
|
|
1715
|
-
return {
|
|
1716
|
-
uisPath,
|
|
1717
|
-
solutionName,
|
|
1718
|
-
solutionId: uipx.SolutionId,
|
|
1719
|
-
uipxPath,
|
|
1720
|
-
projects: uipx.Projects.map((p) => ({
|
|
1721
|
-
Name: fs.path.dirname(p.ProjectRelativePath),
|
|
1722
|
-
Type: p.Type
|
|
1723
|
-
}))
|
|
1724
|
-
};
|
|
1725
|
-
} finally {
|
|
1726
|
-
await fs.rm(stagingDir);
|
|
1727
|
-
}
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
|
-
// ../studioweb-sdk/generated/src/runtime.ts
|
|
1731
|
-
var BASE_PATH2 = "https://alpha.uipath.com/studio_/backend".replace(/\/+$/, "");
|
|
1732
|
-
|
|
1733
|
-
class Configuration2 {
|
|
1734
|
-
configuration;
|
|
1735
|
-
constructor(configuration = {}) {
|
|
1736
|
-
this.configuration = configuration;
|
|
1737
|
-
}
|
|
1738
|
-
set config(configuration) {
|
|
1739
|
-
this.configuration = configuration;
|
|
1740
|
-
}
|
|
1741
|
-
get basePath() {
|
|
1742
|
-
return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH2;
|
|
1743
|
-
}
|
|
1744
|
-
get fetchApi() {
|
|
1745
|
-
return this.configuration.fetchApi;
|
|
1746
|
-
}
|
|
1747
|
-
get middleware() {
|
|
1748
|
-
return this.configuration.middleware || [];
|
|
1749
|
-
}
|
|
1750
|
-
get queryParamsStringify() {
|
|
1751
|
-
return this.configuration.queryParamsStringify || querystring2;
|
|
1752
|
-
}
|
|
1753
|
-
get username() {
|
|
1754
|
-
return this.configuration.username;
|
|
1755
|
-
}
|
|
1756
|
-
get password() {
|
|
1757
|
-
return this.configuration.password;
|
|
1758
|
-
}
|
|
1759
|
-
get apiKey() {
|
|
1760
|
-
const apiKey = this.configuration.apiKey;
|
|
1761
|
-
if (apiKey) {
|
|
1762
|
-
return typeof apiKey === "function" ? apiKey : () => apiKey;
|
|
1763
|
-
}
|
|
1764
|
-
return;
|
|
1765
|
-
}
|
|
1766
|
-
get accessToken() {
|
|
1767
|
-
const accessToken = this.configuration.accessToken;
|
|
1768
|
-
if (accessToken) {
|
|
1769
|
-
return typeof accessToken === "function" ? accessToken : async () => accessToken;
|
|
1770
|
-
}
|
|
1771
|
-
return;
|
|
1772
|
-
}
|
|
1773
|
-
get headers() {
|
|
1774
|
-
return this.configuration.headers;
|
|
1775
|
-
}
|
|
1776
|
-
get credentials() {
|
|
1777
|
-
return this.configuration.credentials;
|
|
1778
|
-
}
|
|
1779
|
-
}
|
|
1780
|
-
var DefaultConfig2 = new Configuration2;
|
|
1781
|
-
|
|
1782
|
-
class BaseAPI2 {
|
|
1783
|
-
configuration;
|
|
1784
|
-
static jsonRegex = new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", "i");
|
|
1785
|
-
middleware;
|
|
1786
|
-
constructor(configuration = DefaultConfig2) {
|
|
1787
|
-
this.configuration = configuration;
|
|
1788
|
-
this.middleware = configuration.middleware;
|
|
1789
|
-
}
|
|
1790
|
-
withMiddleware(...middlewares) {
|
|
1791
|
-
const next = this.clone();
|
|
1792
|
-
next.middleware = next.middleware.concat(...middlewares);
|
|
1793
|
-
return next;
|
|
1794
|
-
}
|
|
1795
|
-
withPreMiddleware(...preMiddlewares) {
|
|
1796
|
-
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
|
1797
|
-
return this.withMiddleware(...middlewares);
|
|
1798
|
-
}
|
|
1799
|
-
withPostMiddleware(...postMiddlewares) {
|
|
1800
|
-
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
1801
|
-
return this.withMiddleware(...middlewares);
|
|
1802
|
-
}
|
|
1803
|
-
isJsonMime(mime) {
|
|
1804
|
-
if (!mime) {
|
|
1805
|
-
return false;
|
|
1806
|
-
}
|
|
1807
|
-
return BaseAPI2.jsonRegex.test(mime);
|
|
1808
|
-
}
|
|
1809
|
-
async request(context, initOverrides) {
|
|
1810
|
-
const { url, init } = await this.createFetchParams(context, initOverrides);
|
|
1811
|
-
const response = await this.fetchApi(url, init);
|
|
1812
|
-
if (response && (response.status >= 200 && response.status < 300)) {
|
|
1813
|
-
return response;
|
|
1814
|
-
}
|
|
1815
|
-
throw new ResponseError2(response, "Response returned an error code");
|
|
1816
|
-
}
|
|
1817
|
-
async createFetchParams(context, initOverrides) {
|
|
1818
|
-
let url = this.configuration.basePath + context.path;
|
|
1819
|
-
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
1820
|
-
url += "?" + this.configuration.queryParamsStringify(context.query);
|
|
1821
|
-
}
|
|
1822
|
-
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
1823
|
-
Object.keys(headers).forEach((key) => headers[key] === undefined ? delete headers[key] : {});
|
|
1824
|
-
const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async () => initOverrides;
|
|
1825
|
-
const initParams = {
|
|
1826
|
-
method: context.method,
|
|
1827
|
-
headers,
|
|
1828
|
-
body: context.body,
|
|
1829
|
-
credentials: this.configuration.credentials
|
|
1830
|
-
};
|
|
1831
|
-
const overriddenInit = {
|
|
1832
|
-
...initParams,
|
|
1833
|
-
...await initOverrideFn({
|
|
1834
|
-
init: initParams,
|
|
1835
|
-
context
|
|
1836
|
-
})
|
|
1837
|
-
};
|
|
1838
|
-
let body;
|
|
1839
|
-
if (isFormData2(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob2(overriddenInit.body)) {
|
|
1840
|
-
body = overriddenInit.body;
|
|
1841
|
-
} else if (this.isJsonMime(headers["Content-Type"])) {
|
|
1842
|
-
body = JSON.stringify(overriddenInit.body);
|
|
1843
|
-
} else {
|
|
1844
|
-
body = overriddenInit.body;
|
|
1845
|
-
}
|
|
1846
|
-
const init = {
|
|
1847
|
-
...overriddenInit,
|
|
1848
|
-
body
|
|
1849
|
-
};
|
|
1850
|
-
return { url, init };
|
|
1851
|
-
}
|
|
1852
|
-
fetchApi = async (url, init) => {
|
|
1853
|
-
let fetchParams = { url, init };
|
|
1854
|
-
for (const middleware of this.middleware) {
|
|
1855
|
-
if (middleware.pre) {
|
|
1856
|
-
fetchParams = await middleware.pre({
|
|
1857
|
-
fetch: this.fetchApi,
|
|
1858
|
-
...fetchParams
|
|
1859
|
-
}) || fetchParams;
|
|
1860
|
-
}
|
|
1861
|
-
}
|
|
1862
|
-
let response = undefined;
|
|
1863
|
-
try {
|
|
1864
|
-
response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
|
1865
|
-
} catch (e) {
|
|
1866
|
-
for (const middleware of this.middleware) {
|
|
1867
|
-
if (middleware.onError) {
|
|
1868
|
-
response = await middleware.onError({
|
|
1869
|
-
fetch: this.fetchApi,
|
|
1870
|
-
url: fetchParams.url,
|
|
1871
|
-
init: fetchParams.init,
|
|
1872
|
-
error: e,
|
|
1873
|
-
response: response ? response.clone() : undefined
|
|
1874
|
-
}) || response;
|
|
1875
|
-
}
|
|
1876
|
-
}
|
|
1877
|
-
if (response === undefined) {
|
|
1878
|
-
if (e instanceof Error) {
|
|
1879
|
-
throw new FetchError2(e, "The request failed and the interceptors did not return an alternative response");
|
|
1880
|
-
} else {
|
|
1881
|
-
throw e;
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
for (const middleware of this.middleware) {
|
|
1886
|
-
if (middleware.post) {
|
|
1887
|
-
response = await middleware.post({
|
|
1888
|
-
fetch: this.fetchApi,
|
|
1889
|
-
url: fetchParams.url,
|
|
1890
|
-
init: fetchParams.init,
|
|
1891
|
-
response: response.clone()
|
|
1892
|
-
}) || response;
|
|
1893
|
-
}
|
|
1894
|
-
}
|
|
1895
|
-
return response;
|
|
1896
|
-
};
|
|
1897
|
-
clone() {
|
|
1898
|
-
const constructor = this.constructor;
|
|
1899
|
-
const next = new constructor(this.configuration);
|
|
1900
|
-
next.middleware = this.middleware.slice();
|
|
1901
|
-
return next;
|
|
1902
|
-
}
|
|
1903
|
-
}
|
|
1904
|
-
function isBlob2(value) {
|
|
1905
|
-
return typeof Blob !== "undefined" && value instanceof Blob;
|
|
1906
|
-
}
|
|
1907
|
-
function isFormData2(value) {
|
|
1908
|
-
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
class ResponseError2 extends Error {
|
|
1912
|
-
response;
|
|
1913
|
-
name = "ResponseError";
|
|
1914
|
-
constructor(response, msg) {
|
|
1915
|
-
super(msg);
|
|
1916
|
-
this.response = response;
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
class FetchError2 extends Error {
|
|
1921
|
-
cause;
|
|
1922
|
-
name = "FetchError";
|
|
1923
|
-
constructor(cause, msg) {
|
|
1924
|
-
super(msg);
|
|
1925
|
-
this.cause = cause;
|
|
1926
|
-
}
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
|
-
class RequiredError2 extends Error {
|
|
1930
|
-
field;
|
|
1931
|
-
name = "RequiredError";
|
|
1932
|
-
constructor(field, msg) {
|
|
1933
|
-
super(msg);
|
|
1934
|
-
this.field = field;
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
function querystring2(params, prefix = "") {
|
|
1938
|
-
return Object.keys(params).map((key) => querystringSingleKey2(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
|
|
1939
|
-
}
|
|
1940
|
-
function querystringSingleKey2(key, value, keyPrefix = "") {
|
|
1941
|
-
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
|
|
1942
|
-
if (value instanceof Array) {
|
|
1943
|
-
const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
|
|
1944
|
-
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
|
1945
|
-
}
|
|
1946
|
-
if (value instanceof Set) {
|
|
1947
|
-
const valueAsArray = Array.from(value);
|
|
1948
|
-
return querystringSingleKey2(key, valueAsArray, keyPrefix);
|
|
1949
|
-
}
|
|
1950
|
-
if (value instanceof Date) {
|
|
1951
|
-
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
|
1952
|
-
}
|
|
1953
|
-
if (value instanceof Object) {
|
|
1954
|
-
return querystring2(value, fullKey);
|
|
1955
|
-
}
|
|
1956
|
-
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
1957
|
-
}
|
|
1958
|
-
function canConsumeForm(consumes) {
|
|
1959
|
-
for (const consume of consumes) {
|
|
1960
|
-
if (consume.contentType === "multipart/form-data") {
|
|
1961
|
-
return true;
|
|
1962
|
-
}
|
|
1963
|
-
}
|
|
1964
|
-
return false;
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
class JSONApiResponse2 {
|
|
1968
|
-
raw;
|
|
1969
|
-
transformer;
|
|
1970
|
-
constructor(raw, transformer = (jsonValue) => jsonValue) {
|
|
1971
|
-
this.raw = raw;
|
|
1972
|
-
this.transformer = transformer;
|
|
1973
|
-
}
|
|
1974
|
-
async value() {
|
|
1975
|
-
return this.transformer(await this.raw.json());
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
// ../studioweb-sdk/generated/src/models/AccessStatus.ts
|
|
1979
|
-
function AccessStatusFromJSON(json) {
|
|
1980
|
-
return AccessStatusFromJSONTyped(json, false);
|
|
1981
|
-
}
|
|
1982
|
-
function AccessStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
1983
|
-
return json;
|
|
1984
|
-
}
|
|
1985
|
-
// ../studioweb-sdk/generated/src/models/PinnedProject.ts
|
|
1986
|
-
function PinnedProjectFromJSON(json) {
|
|
1987
|
-
return PinnedProjectFromJSONTyped(json, false);
|
|
1988
|
-
}
|
|
1989
|
-
function PinnedProjectFromJSONTyped(json, ignoreDiscriminator) {
|
|
1990
|
-
if (json == null) {
|
|
1991
|
-
return json;
|
|
1992
|
-
}
|
|
1993
|
-
return {
|
|
1994
|
-
id: json["id"] == null ? undefined : json["id"],
|
|
1995
|
-
projectDbModelId: json["projectDbModelId"] == null ? undefined : json["projectDbModelId"],
|
|
1996
|
-
userId: json["userId"] == null ? undefined : json["userId"],
|
|
1997
|
-
creationTime: json["creationTime"] == null ? undefined : new Date(json["creationTime"]),
|
|
1998
|
-
project: json["project"] == null ? undefined : ProjectDbModelFromJSON(json["project"])
|
|
1999
|
-
};
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
// ../studioweb-sdk/generated/src/models/ProjectStructure.ts
|
|
2003
|
-
function ProjectStructureFromJSON(json) {
|
|
2004
|
-
return ProjectStructureFromJSONTyped(json, false);
|
|
2005
|
-
}
|
|
2006
|
-
function ProjectStructureFromJSONTyped(json, ignoreDiscriminator) {
|
|
2007
|
-
return json;
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
|
-
// ../studioweb-sdk/generated/src/models/ProjectAppliedProfileModel.ts
|
|
2011
|
-
function ProjectAppliedProfileModelFromJSON(json) {
|
|
2012
|
-
return ProjectAppliedProfileModelFromJSONTyped(json, false);
|
|
2013
|
-
}
|
|
2014
|
-
function ProjectAppliedProfileModelFromJSONTyped(json, ignoreDiscriminator) {
|
|
2015
|
-
if (json == null) {
|
|
2016
|
-
return json;
|
|
1390
|
+
function ProjectAppliedProfileModelFromJSONTyped(json, ignoreDiscriminator) {
|
|
1391
|
+
if (json == null) {
|
|
1392
|
+
return json;
|
|
2017
1393
|
}
|
|
2018
1394
|
return {
|
|
2019
1395
|
projectId: json["projectId"] == null ? undefined : json["projectId"],
|
|
@@ -2930,130 +2306,565 @@ class SolutionApi extends BaseAPI2 {
|
|
|
2930
2306
|
const response = await this.solutionOverwriteSolutionRaw(requestParameters, initOverrides);
|
|
2931
2307
|
return await response.value();
|
|
2932
2308
|
}
|
|
2933
|
-
async solutionSearchSolutionsAndProjectsRaw(requestParameters, initOverrides) {
|
|
2934
|
-
const queryParameters = {};
|
|
2935
|
-
if (requestParameters["triggerTypes"] != null) {
|
|
2936
|
-
queryParameters["triggerTypes"] = requestParameters["triggerTypes"];
|
|
2309
|
+
async solutionSearchSolutionsAndProjectsRaw(requestParameters, initOverrides) {
|
|
2310
|
+
const queryParameters = {};
|
|
2311
|
+
if (requestParameters["triggerTypes"] != null) {
|
|
2312
|
+
queryParameters["triggerTypes"] = requestParameters["triggerTypes"];
|
|
2313
|
+
}
|
|
2314
|
+
if (requestParameters["owners"] != null) {
|
|
2315
|
+
queryParameters["owners"] = requestParameters["owners"];
|
|
2316
|
+
}
|
|
2317
|
+
if (requestParameters["isPublished"] != null) {
|
|
2318
|
+
queryParameters["isPublished"] = requestParameters["isPublished"];
|
|
2319
|
+
}
|
|
2320
|
+
if (requestParameters["hasTestCases"] != null) {
|
|
2321
|
+
queryParameters["hasTestCases"] = requestParameters["hasTestCases"];
|
|
2322
|
+
}
|
|
2323
|
+
if (requestParameters["publishStatus"] != null) {
|
|
2324
|
+
queryParameters["publishStatus"] = requestParameters["publishStatus"];
|
|
2325
|
+
}
|
|
2326
|
+
if (requestParameters["validIds"] != null) {
|
|
2327
|
+
queryParameters["validIds"] = requestParameters["validIds"];
|
|
2328
|
+
}
|
|
2329
|
+
if (requestParameters["keywords"] != null) {
|
|
2330
|
+
queryParameters["keywords"] = requestParameters["keywords"];
|
|
2331
|
+
}
|
|
2332
|
+
if (requestParameters["connectors"] != null) {
|
|
2333
|
+
queryParameters["connectors"] = requestParameters["connectors"];
|
|
2334
|
+
}
|
|
2335
|
+
if (requestParameters["pagingOptionsLimit"] != null) {
|
|
2336
|
+
queryParameters["pagingOptions.limit"] = requestParameters["pagingOptionsLimit"];
|
|
2337
|
+
}
|
|
2338
|
+
if (requestParameters["pagingOptionsSkip"] != null) {
|
|
2339
|
+
queryParameters["pagingOptions.skip"] = requestParameters["pagingOptionsSkip"];
|
|
2340
|
+
}
|
|
2341
|
+
if (requestParameters["sortBy"] != null) {
|
|
2342
|
+
queryParameters["sortBy"] = requestParameters["sortBy"];
|
|
2343
|
+
}
|
|
2344
|
+
if (requestParameters["sortOrder"] != null) {
|
|
2345
|
+
queryParameters["sortOrder"] = requestParameters["sortOrder"];
|
|
2346
|
+
}
|
|
2347
|
+
if (requestParameters["apiVersion"] != null) {
|
|
2348
|
+
queryParameters["api-version"] = requestParameters["apiVersion"];
|
|
2349
|
+
}
|
|
2350
|
+
const headerParameters = {};
|
|
2351
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2352
|
+
const token = this.configuration.accessToken;
|
|
2353
|
+
const tokenString = await token("Bearer", []);
|
|
2354
|
+
if (tokenString) {
|
|
2355
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
let urlPath = `/api/Solution/SearchSolutionsAndProjects`;
|
|
2359
|
+
const response = await this.request({
|
|
2360
|
+
path: urlPath,
|
|
2361
|
+
method: "GET",
|
|
2362
|
+
headers: headerParameters,
|
|
2363
|
+
query: queryParameters
|
|
2364
|
+
}, initOverrides);
|
|
2365
|
+
return new JSONApiResponse2(response, (jsonValue) => SolutionAndProjectSearchModelDtoFromJSON(jsonValue));
|
|
2366
|
+
}
|
|
2367
|
+
async solutionSearchSolutionsAndProjects(requestParameters = {}, initOverrides) {
|
|
2368
|
+
const response = await this.solutionSearchSolutionsAndProjectsRaw(requestParameters, initOverrides);
|
|
2369
|
+
return await response.value();
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2372
|
+
// ../studioweb-sdk/src/client.ts
|
|
2373
|
+
function studioWebBasePath(config, organizationName) {
|
|
2374
|
+
return `${config.baseUrl}/${organizationName}/studio_/backend`;
|
|
2375
|
+
}
|
|
2376
|
+
function buildStudioWebConfiguration(config, organizationName) {
|
|
2377
|
+
const headers = {};
|
|
2378
|
+
if (config.tenantId) {
|
|
2379
|
+
headers["x-uipath-tenantid"] = config.tenantId;
|
|
2380
|
+
}
|
|
2381
|
+
return new Configuration2({
|
|
2382
|
+
basePath: studioWebBasePath(config, organizationName),
|
|
2383
|
+
accessToken: config.authToken,
|
|
2384
|
+
headers
|
|
2385
|
+
});
|
|
2386
|
+
}
|
|
2387
|
+
function createSolutionApi(config, organizationName) {
|
|
2388
|
+
return new SolutionApi(buildStudioWebConfiguration(config, organizationName));
|
|
2389
|
+
}
|
|
2390
|
+
// ../studioweb-sdk/src/publish-locations.ts
|
|
2391
|
+
class PublishLocationsRequestError extends Error {
|
|
2392
|
+
name = "PublishLocationsRequestError";
|
|
2393
|
+
status;
|
|
2394
|
+
constructor(status, message) {
|
|
2395
|
+
super(message);
|
|
2396
|
+
this.status = status;
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2399
|
+
async function getAvailablePublishLocationsV2(config, organizationName) {
|
|
2400
|
+
const url = `${studioWebBasePath(config, organizationName)}/api/resourcebuilder/solutions/v2/publish-location`;
|
|
2401
|
+
const headers = {
|
|
2402
|
+
Authorization: `Bearer ${config.authToken}`
|
|
2403
|
+
};
|
|
2404
|
+
if (config.tenantId) {
|
|
2405
|
+
headers["x-uipath-tenantid"] = config.tenantId;
|
|
2406
|
+
}
|
|
2407
|
+
const response = await fetch(url, { method: "GET", headers });
|
|
2408
|
+
if (!response.ok) {
|
|
2409
|
+
const text = await response.text();
|
|
2410
|
+
throw new PublishLocationsRequestError(response.status, `Failed to fetch publish locations (${response.status}): ${text}`);
|
|
2411
|
+
}
|
|
2412
|
+
const raw = await response.json();
|
|
2413
|
+
if (!Array.isArray(raw)) {
|
|
2414
|
+
throw new Error("Unexpected publish-locations response: expected a JSON array.");
|
|
2415
|
+
}
|
|
2416
|
+
return raw.map(toPublishLocationV2);
|
|
2417
|
+
}
|
|
2418
|
+
function toPublishLocationV2(value) {
|
|
2419
|
+
const v = value ?? {};
|
|
2420
|
+
return {
|
|
2421
|
+
name: typeof v.name === "string" ? v.name : "",
|
|
2422
|
+
key: typeof v.key === "string" ? v.key : "",
|
|
2423
|
+
isMyPersonalWorkspace: v.isMyPersonalWorkspace === true,
|
|
2424
|
+
type: normalizeType(v.type)
|
|
2425
|
+
};
|
|
2426
|
+
}
|
|
2427
|
+
function normalizeType(type) {
|
|
2428
|
+
if (typeof type !== "string") {
|
|
2429
|
+
return "Unknown";
|
|
2430
|
+
}
|
|
2431
|
+
switch (type.toLowerCase()) {
|
|
2432
|
+
case "tenant":
|
|
2433
|
+
return "Tenant";
|
|
2434
|
+
case "folder":
|
|
2435
|
+
return "Folder";
|
|
2436
|
+
case "personalworkspace":
|
|
2437
|
+
return "PersonalWorkspace";
|
|
2438
|
+
default:
|
|
2439
|
+
return "Unknown";
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
// ../solution-sdk/generated/src/apis/SearchApi.ts
|
|
2443
|
+
class SearchApi extends BaseAPI {
|
|
2444
|
+
async searchSearchDeployments22Raw(requestParameters, initOverrides) {
|
|
2445
|
+
if (requestParameters["deploymentsSearchRequest2"] == null) {
|
|
2446
|
+
throw new RequiredError("deploymentsSearchRequest2", 'Required parameter "deploymentsSearchRequest2" was null or undefined when calling searchSearchDeployments22().');
|
|
2447
|
+
}
|
|
2448
|
+
const queryParameters = {};
|
|
2449
|
+
const headerParameters = {};
|
|
2450
|
+
headerParameters["Content-Type"] = "application/json";
|
|
2451
|
+
if (requestParameters["xUipathAsVersion"] != null) {
|
|
2452
|
+
headerParameters["x-uipath-as-version"] = String(requestParameters["xUipathAsVersion"]);
|
|
2453
|
+
}
|
|
2454
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2455
|
+
const token = this.configuration.accessToken;
|
|
2456
|
+
const tokenString = await token("Bearer", []);
|
|
2457
|
+
if (tokenString) {
|
|
2458
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
let urlPath = `/api/v3/search/deployments`;
|
|
2462
|
+
const response = await this.request({
|
|
2463
|
+
path: urlPath,
|
|
2464
|
+
method: "POST",
|
|
2465
|
+
headers: headerParameters,
|
|
2466
|
+
query: queryParameters,
|
|
2467
|
+
body: DeploymentsSearchRequest2ToJSON(requestParameters["deploymentsSearchRequest2"])
|
|
2468
|
+
}, initOverrides);
|
|
2469
|
+
return new JSONApiResponse(response, (jsonValue) => PageInfoDtoOfDeploymentSearchItemDto2FromJSON(jsonValue));
|
|
2470
|
+
}
|
|
2471
|
+
async searchSearchDeployments22(requestParameters, initOverrides) {
|
|
2472
|
+
const response = await this.searchSearchDeployments22Raw(requestParameters, initOverrides);
|
|
2473
|
+
return await response.value();
|
|
2474
|
+
}
|
|
2475
|
+
async searchSearchPackagesRaw(requestParameters, initOverrides) {
|
|
2476
|
+
if (requestParameters["searchFilter"] == null) {
|
|
2477
|
+
throw new RequiredError("searchFilter", 'Required parameter "searchFilter" was null or undefined when calling searchSearchPackages().');
|
|
2478
|
+
}
|
|
2479
|
+
const queryParameters = {};
|
|
2480
|
+
const headerParameters = {};
|
|
2481
|
+
headerParameters["Content-Type"] = "application/json";
|
|
2482
|
+
if (requestParameters["xUipathAsVersion"] != null) {
|
|
2483
|
+
headerParameters["x-uipath-as-version"] = String(requestParameters["xUipathAsVersion"]);
|
|
2484
|
+
}
|
|
2485
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2486
|
+
const token = this.configuration.accessToken;
|
|
2487
|
+
const tokenString = await token("Bearer", []);
|
|
2488
|
+
if (tokenString) {
|
|
2489
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
let urlPath = `/api/search/packages`;
|
|
2493
|
+
const response = await this.request({
|
|
2494
|
+
path: urlPath,
|
|
2495
|
+
method: "POST",
|
|
2496
|
+
headers: headerParameters,
|
|
2497
|
+
query: queryParameters,
|
|
2498
|
+
body: SearchFilterToJSON(requestParameters["searchFilter"])
|
|
2499
|
+
}, initOverrides);
|
|
2500
|
+
return new JSONApiResponse(response, (jsonValue) => PageInfoDtoOfPackageInfoFromJSON(jsonValue));
|
|
2501
|
+
}
|
|
2502
|
+
async searchSearchPackages(requestParameters, initOverrides) {
|
|
2503
|
+
const response = await this.searchSearchPackagesRaw(requestParameters, initOverrides);
|
|
2504
|
+
return await response.value();
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2507
|
+
// ../solution-sdk/src/studio-web-compat.ts
|
|
2508
|
+
var API_PROJECT_TYPES = new Set(["api", "apiautomation"]);
|
|
2509
|
+
|
|
2510
|
+
class StudioWebIncompatibleProjectError extends Error {
|
|
2511
|
+
offendingProjects;
|
|
2512
|
+
constructor(offendingProjects) {
|
|
2513
|
+
super(`Studio Web cannot import API Workflow project(s) manifested by project.json: ${offendingProjects.join(", ")}. Studio Web's solution import accepts only project.uiproj-manifested projects.`);
|
|
2514
|
+
this.offendingProjects = offendingProjects;
|
|
2515
|
+
this.name = "StudioWebIncompatibleProjectError";
|
|
2516
|
+
}
|
|
2517
|
+
}
|
|
2518
|
+
function assertStudioWebCompatibleProjects(projects) {
|
|
2519
|
+
const incompatible = projects.filter((p) => typeof p.Type === "string" && API_PROJECT_TYPES.has(p.Type.toLowerCase()) && p.ProjectRelativePath.replace(/\\/g, "/").split("/").pop() === "project.json");
|
|
2520
|
+
if (incompatible.length > 0) {
|
|
2521
|
+
throw new StudioWebIncompatibleProjectError(incompatible.map((p) => p.ProjectRelativePath));
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
// ../solution-sdk/src/zip-utils.ts
|
|
2526
|
+
var DEFAULT_EXCLUDED_DIR_NAMES = new Set([
|
|
2527
|
+
".venv",
|
|
2528
|
+
"node_modules",
|
|
2529
|
+
"__pycache__",
|
|
2530
|
+
".git",
|
|
2531
|
+
".local",
|
|
2532
|
+
".flow-sdk"
|
|
2533
|
+
]);
|
|
2534
|
+
var DEFAULT_EXCLUDED_FILE_PATTERNS = [
|
|
2535
|
+
/^\.env($|\..+)/
|
|
2536
|
+
];
|
|
2537
|
+
function isDefaultExcludedFileName(name) {
|
|
2538
|
+
for (const pattern of DEFAULT_EXCLUDED_FILE_PATTERNS) {
|
|
2539
|
+
if (pattern.test(name)) {
|
|
2540
|
+
return true;
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
|
+
return false;
|
|
2544
|
+
}
|
|
2545
|
+
var UIPIGNORE_FILENAME = ".uipignore";
|
|
2546
|
+
function parseUipignore(body) {
|
|
2547
|
+
const names = new Set;
|
|
2548
|
+
for (const rawLine of body.split(/\r?\n/)) {
|
|
2549
|
+
const line = rawLine.split("#")[0]?.trim();
|
|
2550
|
+
if (!line) {
|
|
2551
|
+
continue;
|
|
2937
2552
|
}
|
|
2938
|
-
if (
|
|
2939
|
-
|
|
2553
|
+
if (line.includes("/") || line.includes("\\")) {
|
|
2554
|
+
continue;
|
|
2940
2555
|
}
|
|
2941
|
-
|
|
2942
|
-
|
|
2556
|
+
names.add(line);
|
|
2557
|
+
}
|
|
2558
|
+
return names;
|
|
2559
|
+
}
|
|
2560
|
+
async function collectTree(fs, dir, options = {}) {
|
|
2561
|
+
const files = [];
|
|
2562
|
+
const emptyDirs = [];
|
|
2563
|
+
const excluded = new Set(DEFAULT_EXCLUDED_DIR_NAMES);
|
|
2564
|
+
if (options.additionalExcludeDirs) {
|
|
2565
|
+
for (const name of options.additionalExcludeDirs) {
|
|
2566
|
+
excluded.add(name);
|
|
2943
2567
|
}
|
|
2944
|
-
|
|
2945
|
-
|
|
2568
|
+
}
|
|
2569
|
+
async function walk(current, isRoot) {
|
|
2570
|
+
const entries = await fs.readdir(current);
|
|
2571
|
+
if (entries.length === 0) {
|
|
2572
|
+
if (!isRoot) {
|
|
2573
|
+
emptyDirs.push(current);
|
|
2574
|
+
}
|
|
2575
|
+
return;
|
|
2946
2576
|
}
|
|
2947
|
-
|
|
2948
|
-
|
|
2577
|
+
for (const entryName of entries) {
|
|
2578
|
+
const fullPath = fs.path.join(current, entryName);
|
|
2579
|
+
const entryStat = await fs.stat(fullPath);
|
|
2580
|
+
if (entryStat?.isDirectory()) {
|
|
2581
|
+
if (excluded.has(entryName)) {
|
|
2582
|
+
continue;
|
|
2583
|
+
}
|
|
2584
|
+
await walk(fullPath, false);
|
|
2585
|
+
} else if (entryStat?.isFile()) {
|
|
2586
|
+
if (isDefaultExcludedFileName(entryName)) {
|
|
2587
|
+
continue;
|
|
2588
|
+
}
|
|
2589
|
+
files.push(fullPath);
|
|
2590
|
+
}
|
|
2949
2591
|
}
|
|
2950
|
-
|
|
2951
|
-
|
|
2592
|
+
}
|
|
2593
|
+
await walk(dir, true);
|
|
2594
|
+
return { files, emptyDirs };
|
|
2595
|
+
}
|
|
2596
|
+
async function createZipFromDir(fs, dir, options = {}) {
|
|
2597
|
+
const { files, emptyDirs } = await collectTree(fs, dir, options);
|
|
2598
|
+
const zippable = {};
|
|
2599
|
+
for (const filePath of files) {
|
|
2600
|
+
const relPath = fs.path.relative(dir, filePath).replace(/\\/g, "/");
|
|
2601
|
+
const data = await fs.readFile(filePath);
|
|
2602
|
+
if (data) {
|
|
2603
|
+
zippable[relPath] = new Uint8Array(data);
|
|
2952
2604
|
}
|
|
2953
|
-
|
|
2954
|
-
|
|
2605
|
+
}
|
|
2606
|
+
for (const emptyDir of emptyDirs) {
|
|
2607
|
+
const relPath = fs.path.relative(dir, emptyDir).replace(/\\/g, "/");
|
|
2608
|
+
if (!relPath) {
|
|
2609
|
+
continue;
|
|
2955
2610
|
}
|
|
2956
|
-
|
|
2957
|
-
|
|
2611
|
+
zippable[`${relPath}/`] = new Uint8Array(0);
|
|
2612
|
+
}
|
|
2613
|
+
return finalizeZip64(zipSync(zippable, { level: 6 }));
|
|
2614
|
+
}
|
|
2615
|
+
var EOCD_SIZE = 22;
|
|
2616
|
+
var EOCD_SIGNATURE = 101010256;
|
|
2617
|
+
var CD_HEADER_SIGNATURE = 33639248;
|
|
2618
|
+
var ZIP64_EOCD_SIGNATURE = 101075792;
|
|
2619
|
+
var ZIP64_EOCD_SIZE = 56;
|
|
2620
|
+
var ZIP64_LOCATOR_SIGNATURE = 117853008;
|
|
2621
|
+
var ZIP64_LOCATOR_SIZE = 20;
|
|
2622
|
+
var MAX_ZIP32_ENTRIES = 65535;
|
|
2623
|
+
var MAX_ZIP32_OFFSET = 4294967295;
|
|
2624
|
+
function finalizeZip64(zip) {
|
|
2625
|
+
const view = new DataView(zip.buffer, zip.byteOffset, zip.byteLength);
|
|
2626
|
+
const eocdStart = zip.byteLength - EOCD_SIZE;
|
|
2627
|
+
if (eocdStart < 0 || view.getUint32(eocdStart, true) !== EOCD_SIGNATURE) {
|
|
2628
|
+
throw new Error("Cannot finalize the solution archive: it does not end with an end-of-central-directory record.");
|
|
2629
|
+
}
|
|
2630
|
+
const cdSize = view.getUint32(eocdStart + 12, true);
|
|
2631
|
+
const cdOffset = view.getUint32(eocdStart + 16, true);
|
|
2632
|
+
const entryCount = countCentralDirectoryEntries(view, cdOffset, cdSize);
|
|
2633
|
+
if (entryCount <= MAX_ZIP32_ENTRIES) {
|
|
2634
|
+
return zip;
|
|
2635
|
+
}
|
|
2636
|
+
if (cdOffset >= MAX_ZIP32_OFFSET || zip.byteLength >= MAX_ZIP32_OFFSET) {
|
|
2637
|
+
throw new Error(`The solution archive is ${zip.byteLength} bytes, past the 4 GB limit this packer supports. Exclude large directories from the solution with a .uipignore file.`);
|
|
2638
|
+
}
|
|
2639
|
+
const tail = new Uint8Array(ZIP64_EOCD_SIZE + ZIP64_LOCATOR_SIZE + EOCD_SIZE);
|
|
2640
|
+
const tailView = new DataView(tail.buffer);
|
|
2641
|
+
const count = BigInt(entryCount);
|
|
2642
|
+
tailView.setUint32(0, ZIP64_EOCD_SIGNATURE, true);
|
|
2643
|
+
tailView.setBigUint64(4, BigInt(ZIP64_EOCD_SIZE - 12), true);
|
|
2644
|
+
tailView.setUint16(12, 45, true);
|
|
2645
|
+
tailView.setUint16(14, 45, true);
|
|
2646
|
+
tailView.setUint32(16, 0, true);
|
|
2647
|
+
tailView.setUint32(20, 0, true);
|
|
2648
|
+
tailView.setBigUint64(24, count, true);
|
|
2649
|
+
tailView.setBigUint64(32, count, true);
|
|
2650
|
+
tailView.setBigUint64(40, BigInt(cdSize), true);
|
|
2651
|
+
tailView.setBigUint64(48, BigInt(cdOffset), true);
|
|
2652
|
+
const locator = ZIP64_EOCD_SIZE;
|
|
2653
|
+
tailView.setUint32(locator, ZIP64_LOCATOR_SIGNATURE, true);
|
|
2654
|
+
tailView.setUint32(locator + 4, 0, true);
|
|
2655
|
+
tailView.setBigUint64(locator + 8, BigInt(eocdStart), true);
|
|
2656
|
+
tailView.setUint32(locator + 16, 1, true);
|
|
2657
|
+
const eocd = ZIP64_EOCD_SIZE + ZIP64_LOCATOR_SIZE;
|
|
2658
|
+
tailView.setUint32(eocd, EOCD_SIGNATURE, true);
|
|
2659
|
+
tailView.setUint16(eocd + 4, 0, true);
|
|
2660
|
+
tailView.setUint16(eocd + 6, 0, true);
|
|
2661
|
+
tailView.setUint16(eocd + 8, MAX_ZIP32_ENTRIES, true);
|
|
2662
|
+
tailView.setUint16(eocd + 10, MAX_ZIP32_ENTRIES, true);
|
|
2663
|
+
tailView.setUint32(eocd + 12, cdSize, true);
|
|
2664
|
+
tailView.setUint32(eocd + 16, cdOffset, true);
|
|
2665
|
+
tailView.setUint16(eocd + 20, 0, true);
|
|
2666
|
+
const out = new Uint8Array(eocdStart + tail.byteLength);
|
|
2667
|
+
out.set(zip.subarray(0, eocdStart), 0);
|
|
2668
|
+
out.set(tail, eocdStart);
|
|
2669
|
+
return out;
|
|
2670
|
+
}
|
|
2671
|
+
function countCentralDirectoryEntries(view, cdOffset, cdSize) {
|
|
2672
|
+
const end = cdOffset + cdSize;
|
|
2673
|
+
let position = cdOffset;
|
|
2674
|
+
let count = 0;
|
|
2675
|
+
while (position + 46 <= end && view.getUint32(position, true) === CD_HEADER_SIGNATURE) {
|
|
2676
|
+
const nameLength = view.getUint16(position + 28, true);
|
|
2677
|
+
const extraLength = view.getUint16(position + 30, true);
|
|
2678
|
+
const commentLength = view.getUint16(position + 32, true);
|
|
2679
|
+
position += 46 + nameLength + extraLength + commentLength;
|
|
2680
|
+
count++;
|
|
2681
|
+
}
|
|
2682
|
+
return count;
|
|
2683
|
+
}
|
|
2684
|
+
|
|
2685
|
+
// ../solution-sdk/src/bundle-service.ts
|
|
2686
|
+
async function readUipignore(fs, dir) {
|
|
2687
|
+
const ignorePath = fs.path.join(dir, UIPIGNORE_FILENAME);
|
|
2688
|
+
if (!await fs.exists(ignorePath)) {
|
|
2689
|
+
return new Set;
|
|
2690
|
+
}
|
|
2691
|
+
try {
|
|
2692
|
+
const body = await fs.readFile(ignorePath, "utf-8");
|
|
2693
|
+
if (!body) {
|
|
2694
|
+
return new Set;
|
|
2958
2695
|
}
|
|
2959
|
-
|
|
2960
|
-
|
|
2696
|
+
return parseUipignore(body);
|
|
2697
|
+
} catch (err) {
|
|
2698
|
+
logger.warn(`Could not read ${UIPIGNORE_FILENAME}; ignoring it: ${String(err)}`);
|
|
2699
|
+
return new Set;
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
async function mergeProjectUipignore(fs, projectPath, projectLabel, solutionExcludeDirs) {
|
|
2703
|
+
const projectExtra = await readUipignore(fs, projectPath);
|
|
2704
|
+
if (projectExtra.size === 0) {
|
|
2705
|
+
return solutionExcludeDirs;
|
|
2706
|
+
}
|
|
2707
|
+
const merged = new Set(solutionExcludeDirs);
|
|
2708
|
+
for (const name of projectExtra) {
|
|
2709
|
+
merged.add(name);
|
|
2710
|
+
}
|
|
2711
|
+
logger.info(`[${projectLabel}] Applying ${projectExtra.size} extra exclude(s) from project ${UIPIGNORE_FILENAME}: ${[...projectExtra].join(", ")}`);
|
|
2712
|
+
return merged;
|
|
2713
|
+
}
|
|
2714
|
+
var toForwardSlash = (p) => p.replace(/\\/g, "/");
|
|
2715
|
+
async function mirrorTree(fs, srcDir, relativeBase, destBaseDir, additionalExcludeDirs) {
|
|
2716
|
+
const { files, emptyDirs } = await collectTree(fs, srcDir, {
|
|
2717
|
+
additionalExcludeDirs
|
|
2718
|
+
});
|
|
2719
|
+
if (files.length === 0 && emptyDirs.length === 0) {
|
|
2720
|
+
const rootRel = fs.path.relative(relativeBase, srcDir);
|
|
2721
|
+
if (rootRel) {
|
|
2722
|
+
await fs.mkdir(fs.path.join(destBaseDir, rootRel));
|
|
2961
2723
|
}
|
|
2962
|
-
|
|
2963
|
-
|
|
2724
|
+
return;
|
|
2725
|
+
}
|
|
2726
|
+
for (const f of files) {
|
|
2727
|
+
const relPath = fs.path.relative(relativeBase, f);
|
|
2728
|
+
const destPath = fs.path.join(destBaseDir, relPath);
|
|
2729
|
+
const data = await fs.readFile(f);
|
|
2730
|
+
if (data) {
|
|
2731
|
+
await fs.writeFile(destPath, data);
|
|
2732
|
+
} else {
|
|
2733
|
+
logger.warn(`Skipping empty or unreadable file: ${f}`);
|
|
2964
2734
|
}
|
|
2965
|
-
|
|
2966
|
-
|
|
2735
|
+
}
|
|
2736
|
+
for (const dir of emptyDirs) {
|
|
2737
|
+
const relPath = fs.path.relative(relativeBase, dir);
|
|
2738
|
+
if (!relPath) {
|
|
2739
|
+
continue;
|
|
2967
2740
|
}
|
|
2968
|
-
|
|
2969
|
-
|
|
2741
|
+
await fs.mkdir(fs.path.join(destBaseDir, relPath));
|
|
2742
|
+
}
|
|
2743
|
+
}
|
|
2744
|
+
async function flattenProjectDir(fs, srcProjectDir, destProjectDir, additionalExcludeDirs) {
|
|
2745
|
+
await fs.mkdir(destProjectDir);
|
|
2746
|
+
const topLevelExclude = new Set(DEFAULT_EXCLUDED_DIR_NAMES);
|
|
2747
|
+
if (additionalExcludeDirs) {
|
|
2748
|
+
for (const name of additionalExcludeDirs) {
|
|
2749
|
+
topLevelExclude.add(name);
|
|
2970
2750
|
}
|
|
2971
|
-
|
|
2972
|
-
|
|
2751
|
+
}
|
|
2752
|
+
const entries = await fs.readdir(srcProjectDir);
|
|
2753
|
+
for (const entryName of entries) {
|
|
2754
|
+
const srcPath = fs.path.join(srcProjectDir, entryName);
|
|
2755
|
+
const entryStat = await fs.stat(srcPath);
|
|
2756
|
+
if (!entryStat) {
|
|
2757
|
+
continue;
|
|
2973
2758
|
}
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2759
|
+
if (entryStat.isFile()) {
|
|
2760
|
+
if (isDefaultExcludedFileName(entryName)) {
|
|
2761
|
+
continue;
|
|
2762
|
+
}
|
|
2763
|
+
const data = await fs.readFile(srcPath);
|
|
2764
|
+
if (data) {
|
|
2765
|
+
await fs.writeFile(fs.path.join(destProjectDir, entryName), data);
|
|
2766
|
+
}
|
|
2767
|
+
} else if (entryStat.isDirectory()) {
|
|
2768
|
+
if (topLevelExclude.has(entryName)) {
|
|
2769
|
+
continue;
|
|
2770
|
+
}
|
|
2771
|
+
if (entryName === "content" || entryName === "flow_files") {
|
|
2772
|
+
await mirrorTree(fs, srcPath, srcPath, destProjectDir, additionalExcludeDirs);
|
|
2773
|
+
} else {
|
|
2774
|
+
await mirrorTree(fs, srcPath, srcProjectDir, destProjectDir, additionalExcludeDirs);
|
|
2980
2775
|
}
|
|
2981
2776
|
}
|
|
2982
|
-
let urlPath = `/api/Solution/SearchSolutionsAndProjects`;
|
|
2983
|
-
const response = await this.request({
|
|
2984
|
-
path: urlPath,
|
|
2985
|
-
method: "GET",
|
|
2986
|
-
headers: headerParameters,
|
|
2987
|
-
query: queryParameters
|
|
2988
|
-
}, initOverrides);
|
|
2989
|
-
return new JSONApiResponse2(response, (jsonValue) => SolutionAndProjectSearchModelDtoFromJSON(jsonValue));
|
|
2990
|
-
}
|
|
2991
|
-
async solutionSearchSolutionsAndProjects(requestParameters = {}, initOverrides) {
|
|
2992
|
-
const response = await this.solutionSearchSolutionsAndProjectsRaw(requestParameters, initOverrides);
|
|
2993
|
-
return await response.value();
|
|
2994
2777
|
}
|
|
2995
2778
|
}
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
const headers = {};
|
|
3002
|
-
if (config.tenantId) {
|
|
3003
|
-
headers["x-uipath-tenantid"] = config.tenantId;
|
|
2779
|
+
async function bundleSolution(fs, solutionDir, outputDir, outputName) {
|
|
2780
|
+
const resolvedPath = fs.path.resolve(solutionDir);
|
|
2781
|
+
const solStat = await fs.stat(resolvedPath);
|
|
2782
|
+
if (!solStat) {
|
|
2783
|
+
throw new Error(`Path not found: ${resolvedPath}`);
|
|
3004
2784
|
}
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
accessToken: config.authToken,
|
|
3008
|
-
headers
|
|
3009
|
-
});
|
|
3010
|
-
}
|
|
3011
|
-
function createSolutionApi(config, organizationName) {
|
|
3012
|
-
return new SolutionApi(buildStudioWebConfiguration(config, organizationName));
|
|
3013
|
-
}
|
|
3014
|
-
// ../studioweb-sdk/src/publish-locations.ts
|
|
3015
|
-
async function getAvailablePublishLocationsV2(config, organizationName) {
|
|
3016
|
-
const url = `${studioWebBasePath(config, organizationName)}/api/resourcebuilder/solutions/v2/publish-location`;
|
|
3017
|
-
const headers = {
|
|
3018
|
-
Authorization: `Bearer ${config.authToken}`
|
|
3019
|
-
};
|
|
3020
|
-
if (config.tenantId) {
|
|
3021
|
-
headers["x-uipath-tenantid"] = config.tenantId;
|
|
2785
|
+
if (!solStat.isDirectory()) {
|
|
2786
|
+
throw new Error(`Not a directory: ${resolvedPath}. Provide the solution directory containing a .uipx file.`);
|
|
3022
2787
|
}
|
|
3023
|
-
const
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
2788
|
+
const { uipx, uipxFileName } = await readUipxFile(fs, resolvedPath);
|
|
2789
|
+
const additionalExcludeDirs = await readUipignore(fs, resolvedPath);
|
|
2790
|
+
if (additionalExcludeDirs.size > 0) {
|
|
2791
|
+
logger.info(`Applying ${additionalExcludeDirs.size} extra exclude(s) from .uipignore: ${[...additionalExcludeDirs].join(", ")}`);
|
|
3027
2792
|
}
|
|
3028
|
-
const
|
|
3029
|
-
|
|
3030
|
-
|
|
2793
|
+
const effectiveExclude = new Set(DEFAULT_EXCLUDED_DIR_NAMES);
|
|
2794
|
+
for (const name of additionalExcludeDirs) {
|
|
2795
|
+
effectiveExclude.add(name);
|
|
3031
2796
|
}
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
2797
|
+
for (const project of uipx.Projects) {
|
|
2798
|
+
project.ProjectRelativePath = toForwardSlash(project.ProjectRelativePath);
|
|
2799
|
+
}
|
|
2800
|
+
assertStudioWebCompatibleProjects(uipx.Projects);
|
|
2801
|
+
const solutionStorage = {
|
|
2802
|
+
SolutionId: uipx.SolutionId,
|
|
2803
|
+
Projects: uipx.Projects.map((p) => ({
|
|
2804
|
+
ProjectId: p.Id,
|
|
2805
|
+
ProjectRelativePath: p.ProjectRelativePath
|
|
2806
|
+
}))
|
|
3041
2807
|
};
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
2808
|
+
const solutionName = outputName || fs.path.basename(uipxFileName, ".uipx");
|
|
2809
|
+
const stagingDir = fs.path.join(resolvedPath, `.uis-staging-${Date.now()}`);
|
|
2810
|
+
await fs.mkdir(stagingDir);
|
|
2811
|
+
try {
|
|
2812
|
+
await fs.writeFile(fs.path.join(stagingDir, "SolutionStorage.json"), JSON.stringify(solutionStorage));
|
|
2813
|
+
await fs.writeFile(fs.path.join(stagingDir, uipxFileName), JSON.stringify(uipx));
|
|
2814
|
+
for (const project of uipx.Projects) {
|
|
2815
|
+
const projectDir = fs.path.dirname(project.ProjectRelativePath);
|
|
2816
|
+
const srcProjectPath = fs.path.join(resolvedPath, projectDir);
|
|
2817
|
+
const projectStat = await fs.stat(srcProjectPath);
|
|
2818
|
+
if (!projectStat) {
|
|
2819
|
+
throw new Error(`Project directory not found: ${srcProjectPath}`);
|
|
2820
|
+
}
|
|
2821
|
+
const projectExcludeDirs = await mergeProjectUipignore(fs, srcProjectPath, projectDir, additionalExcludeDirs);
|
|
2822
|
+
await flattenProjectDir(fs, srcProjectPath, fs.path.join(stagingDir, projectDir), projectExcludeDirs);
|
|
2823
|
+
}
|
|
2824
|
+
const resourcesPath = fs.path.join(resolvedPath, "resources");
|
|
2825
|
+
if (!effectiveExclude.has("resources") && await fs.exists(resourcesPath)) {
|
|
2826
|
+
await mirrorTree(fs, resourcesPath, resolvedPath, stagingDir, additionalExcludeDirs);
|
|
2827
|
+
}
|
|
2828
|
+
const userProfilePath = fs.path.join(resolvedPath, "userProfile");
|
|
2829
|
+
if (!effectiveExclude.has("userProfile") && await fs.exists(userProfilePath)) {
|
|
2830
|
+
await mirrorTree(fs, userProfilePath, resolvedPath, stagingDir, additionalExcludeDirs);
|
|
2831
|
+
}
|
|
2832
|
+
const resolvedOutputDir = fs.path.resolve(outputDir);
|
|
2833
|
+
if (!await fs.exists(resolvedOutputDir)) {
|
|
2834
|
+
await fs.mkdir(resolvedOutputDir);
|
|
2835
|
+
}
|
|
2836
|
+
const uisPath = fs.path.join(resolvedOutputDir, `${solutionName}.uis`);
|
|
2837
|
+
const zipData = await createZipFromDir(fs, stagingDir);
|
|
2838
|
+
await fs.writeFile(uisPath, zipData);
|
|
2839
|
+
const uipxPath = fs.path.join(resolvedPath, uipxFileName);
|
|
2840
|
+
return {
|
|
2841
|
+
uisPath,
|
|
2842
|
+
solutionName,
|
|
2843
|
+
solutionId: uipx.SolutionId,
|
|
2844
|
+
uipxPath,
|
|
2845
|
+
projects: uipx.Projects.map((p) => ({
|
|
2846
|
+
Name: fs.path.dirname(p.ProjectRelativePath),
|
|
2847
|
+
Type: p.Type
|
|
2848
|
+
}))
|
|
2849
|
+
};
|
|
2850
|
+
} finally {
|
|
2851
|
+
await fs.rm(stagingDir);
|
|
3046
2852
|
}
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
2853
|
+
}
|
|
2854
|
+
// ../solution-sdk/src/project-debug-status.ts
|
|
2855
|
+
var SUCCEEDED = "creationsucceeded";
|
|
2856
|
+
var TERMINAL = new Set([SUCCEEDED, "creationfailed", "validationfailed"]);
|
|
2857
|
+
var isDebugProvisioningTerminal = (status) => TERMINAL.has((status ?? "").toLowerCase());
|
|
2858
|
+
var isDebugProvisioningSucceeded = (status) => (status ?? "").toLowerCase() === SUCCEEDED;
|
|
2859
|
+
async function getProjectDebugStatus(config, solutionKey, debugSessionId) {
|
|
2860
|
+
const url = `${config.basePath}/api/v1/solutions/${encodeURIComponent(solutionKey)}` + `/projects/debug/status?debugSessionId=${encodeURIComponent(debugSessionId)}`;
|
|
2861
|
+
const response = await fetch(url, {
|
|
2862
|
+
headers: { Authorization: `Bearer ${config.accessToken}` }
|
|
2863
|
+
});
|
|
2864
|
+
if (!response.ok) {
|
|
2865
|
+
throw new ResponseError(response, "Response returned an error code");
|
|
3056
2866
|
}
|
|
2867
|
+
return await response.json();
|
|
3057
2868
|
}
|
|
3058
2869
|
// ../solution-sdk/src/solution-info.ts
|
|
3059
2870
|
async function getStudioWebSolutionProjects(config, organizationName, solutionId) {
|
|
@@ -3103,75 +2914,6 @@ async function listStudioWebSolutions(config, organizationName, options = {}) {
|
|
|
3103
2914
|
throw error;
|
|
3104
2915
|
}
|
|
3105
2916
|
}
|
|
3106
|
-
// ../solution-sdk/package.json
|
|
3107
|
-
var package_default = {
|
|
3108
|
-
name: "@uipath/solution-sdk",
|
|
3109
|
-
author: "UiPath",
|
|
3110
|
-
license: "SEE LICENSE IN LICENSE.txt",
|
|
3111
|
-
version: "1.203.0-preview.212",
|
|
3112
|
-
repository: {
|
|
3113
|
-
type: "git",
|
|
3114
|
-
url: "https://github.com/UiPath/cli.git",
|
|
3115
|
-
directory: "packages/solution-sdk"
|
|
3116
|
-
},
|
|
3117
|
-
publishConfig: {
|
|
3118
|
-
registry: "https://npm.pkg.github.com/@uipath"
|
|
3119
|
-
},
|
|
3120
|
-
keywords: [
|
|
3121
|
-
"uipath",
|
|
3122
|
-
"solution",
|
|
3123
|
-
"sdk"
|
|
3124
|
-
],
|
|
3125
|
-
type: "module",
|
|
3126
|
-
main: "./dist/index.js",
|
|
3127
|
-
types: "./dist/src/index.d.ts",
|
|
3128
|
-
exports: {
|
|
3129
|
-
".": {
|
|
3130
|
-
types: "./dist/src/index.d.ts",
|
|
3131
|
-
default: "./dist/index.js"
|
|
3132
|
-
},
|
|
3133
|
-
"./resources": {
|
|
3134
|
-
types: "./dist/src/resources/index.d.ts",
|
|
3135
|
-
default: "./dist/resources/index.js"
|
|
3136
|
-
},
|
|
3137
|
-
"./auth": {
|
|
3138
|
-
types: "./dist/src/solution-auth.d.ts",
|
|
3139
|
-
default: "./dist/solution-auth.js"
|
|
3140
|
-
}
|
|
3141
|
-
},
|
|
3142
|
-
bin: {
|
|
3143
|
-
"generate-sdk": "./dist/scripts/generate-sdk.js"
|
|
3144
|
-
},
|
|
3145
|
-
files: [
|
|
3146
|
-
"dist"
|
|
3147
|
-
],
|
|
3148
|
-
private: false,
|
|
3149
|
-
scripts: {
|
|
3150
|
-
build: "bun build ./src/index.ts ./src/resources/index.ts ./src/solution-auth.ts --outdir dist --format esm --target node --splitting --sourcemap=linked && bun build ./src/scripts/generate-sdk.ts --outdir dist/scripts --format esm --target node --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
|
|
3151
|
-
generate: "bun run src/scripts/generate-sdk.ts",
|
|
3152
|
-
lint: "biome check .",
|
|
3153
|
-
test: "vitest run",
|
|
3154
|
-
"test:coverage": "vitest run --coverage"
|
|
3155
|
-
},
|
|
3156
|
-
devDependencies: {
|
|
3157
|
-
"@openapitools/openapi-generator-cli": "^2.31.1",
|
|
3158
|
-
"@uipath/auth": "workspace:*",
|
|
3159
|
-
"@uipath/common": "workspace:*",
|
|
3160
|
-
"@uipath/filesystem": "workspace:*",
|
|
3161
|
-
"@uipath/orchestrator-sdk": "workspace:*",
|
|
3162
|
-
"@uipath/resource-builder-sdk": "2025.11.0-alpha5891-4020",
|
|
3163
|
-
"@uipath/solutionpackager-tool-core": "workspace:*",
|
|
3164
|
-
"@uipath/studioweb-sdk": "workspace:*",
|
|
3165
|
-
"@types/node": "^25.5.2",
|
|
3166
|
-
fflate: "^0.8.2",
|
|
3167
|
-
typescript: "^7.0.2"
|
|
3168
|
-
}
|
|
3169
|
-
};
|
|
3170
|
-
|
|
3171
|
-
// ../solution-sdk/src/user-agent.ts
|
|
3172
|
-
var SDK_USER_AGENT = getSdkUserAgentToken(package_default);
|
|
3173
|
-
installSdkUserAgentHeader(BaseAPI, SDK_USER_AGENT);
|
|
3174
|
-
|
|
3175
2917
|
// ../solution-sdk/src/upload-service.ts
|
|
3176
2918
|
class HttpError extends Error {
|
|
3177
2919
|
status;
|
|
@@ -3430,68 +3172,6 @@ async function overwriteSolution(config, organizationName, fileBuffer, fileName,
|
|
|
3430
3172
|
}
|
|
3431
3173
|
return await response.json();
|
|
3432
3174
|
}
|
|
3433
|
-
|
|
3434
|
-
async function deploymentsAutoInstall(config, request, feedFolderKey) {
|
|
3435
|
-
const url = `${config.basePath}/api/v2/deployments/auto-install`;
|
|
3436
|
-
const response = await fetch(url, {
|
|
3437
|
-
method: "POST",
|
|
3438
|
-
headers: {
|
|
3439
|
-
Authorization: `Bearer ${config.accessToken}`,
|
|
3440
|
-
"Content-Type": "application/json",
|
|
3441
|
-
"X-UIPATH-FolderKey": feedFolderKey
|
|
3442
|
-
},
|
|
3443
|
-
body: JSON.stringify(request)
|
|
3444
|
-
});
|
|
3445
|
-
if (!response.ok) {
|
|
3446
|
-
throw new ResponseError(response, "Response returned an error code");
|
|
3447
|
-
}
|
|
3448
|
-
const text = await response.text();
|
|
3449
|
-
if (!text) {
|
|
3450
|
-
return {};
|
|
3451
|
-
}
|
|
3452
|
-
try {
|
|
3453
|
-
const parsed = JSON.parse(text);
|
|
3454
|
-
return parsed !== null && typeof parsed === "object" ? parsed : {};
|
|
3455
|
-
} catch {
|
|
3456
|
-
return {};
|
|
3457
|
-
}
|
|
3458
|
-
}
|
|
3459
|
-
// ../solution-sdk/src/project-debug-status.ts
|
|
3460
|
-
var SUCCEEDED = "creationsucceeded";
|
|
3461
|
-
var TERMINAL = new Set([SUCCEEDED, "creationfailed", "validationfailed"]);
|
|
3462
|
-
var isDebugProvisioningTerminal = (status) => TERMINAL.has((status ?? "").toLowerCase());
|
|
3463
|
-
var isDebugProvisioningSucceeded = (status) => (status ?? "").toLowerCase() === SUCCEEDED;
|
|
3464
|
-
async function getProjectDebugStatus(config, solutionKey, debugSessionId) {
|
|
3465
|
-
const url = `${config.basePath}/api/v1/solutions/${encodeURIComponent(solutionKey)}` + `/projects/debug/status?debugSessionId=${encodeURIComponent(debugSessionId)}`;
|
|
3466
|
-
const response = await fetch(url, {
|
|
3467
|
-
headers: { Authorization: `Bearer ${config.accessToken}` }
|
|
3468
|
-
});
|
|
3469
|
-
if (!response.ok) {
|
|
3470
|
-
throw new ResponseError(response, "Response returned an error code");
|
|
3471
|
-
}
|
|
3472
|
-
return await response.json();
|
|
3473
|
-
}
|
|
3474
|
-
// ../solution-sdk/src/search-package-versions.ts
|
|
3475
|
-
async function searchPackageVersions(config, packageKey, filter, feedFolderKey) {
|
|
3476
|
-
const url = `${config.basePath}/api/search/packages/${encodeURIComponent(packageKey)}/versions`;
|
|
3477
|
-
const headers = {
|
|
3478
|
-
Authorization: `Bearer ${config.accessToken}`,
|
|
3479
|
-
"Content-Type": "application/json"
|
|
3480
|
-
};
|
|
3481
|
-
if (feedFolderKey) {
|
|
3482
|
-
headers["X-UIPATH-FolderKey"] = feedFolderKey;
|
|
3483
|
-
}
|
|
3484
|
-
const response = await fetch(url, {
|
|
3485
|
-
method: "POST",
|
|
3486
|
-
headers,
|
|
3487
|
-
body: JSON.stringify(filter)
|
|
3488
|
-
});
|
|
3489
|
-
if (!response.ok) {
|
|
3490
|
-
throw new ResponseError(response, "Response returned an error code");
|
|
3491
|
-
}
|
|
3492
|
-
const raw = await response.json();
|
|
3493
|
-
return { count: raw.count, values: raw.values ?? [] };
|
|
3494
|
-
}
|
|
3495
|
-
export { Configuration, getAvailablePublishLocationsV2, DeploymentActivationStatus, DeploymentOperationStatus, SolutionDeploymentAction, DeploymentsApi, PackagesApi, SearchApi, StudioWebIncompatibleProjectError, bundleSolution, deploymentsAutoInstall, isDebugProvisioningTerminal, isDebugProvisioningSucceeded, getProjectDebugStatus, searchPackageVersions, getStudioWebSolutionProjects, listStudioWebSolutions, isSolutionUploadHttpError, buildSolutionUploadFailureOutput, solutionExistsOnStudioWeb, importSolution, overwriteSolution };
|
|
3175
|
+
export { Configuration, getAvailablePublishLocationsV2, DeploymentActivationStatus, WorkflowAction, DeploymentOperationStatus, DeploymentSearchItemDto2FromJSON, SolutionDeploymentAction, DeploymentsApi, SearchApi, StudioWebIncompatibleProjectError, bundleSolution, isDebugProvisioningTerminal, isDebugProvisioningSucceeded, getProjectDebugStatus, getStudioWebSolutionProjects, listStudioWebSolutions, isSolutionUploadHttpError, buildSolutionUploadFailureOutput, solutionExistsOnStudioWeb, importSolution, overwriteSolution };
|
|
3496
3176
|
|
|
3497
|
-
//# debugId=
|
|
3177
|
+
//# debugId=7A510AA5B5EEC7F764756E2164756E21
|