@uipath/flow-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 +4 -0
- package/dist/THIRD-PARTY-NOTICES.md +8 -8
- package/dist/authoring-4kyzh1tf.js +23 -0
- package/dist/{binding-service-zyb4a48m.js → binding-service-3a54pejx.js} +28 -30
- package/dist/{connector-service-v4k5k9cq.js → connector-service-b6vrb1bn.js} +34 -31
- package/dist/{conversion-FQTRFHRX-xh98wp2q.js → conversion-FQTRFHRX-1q7rk0te.js} +5 -5
- package/dist/{debug-conversation-trigger-khf68qqa.js → debug-conversation-trigger-svn8z44n.js} +14 -16
- package/dist/{debug-http-client-53qk6pc5.js → debug-http-client-s78gbtbn.js} +3 -3
- package/dist/{debug-service-nyk0s6mc.js → debug-service-0ppdzgzv.js} +4 -4
- package/dist/{edge-service-fxnxpetd.js → edge-service-ffh2gt2s.js} +13 -14
- package/dist/{embedded-file-reader-0sjt4nkj.js → embedded-file-reader-v8c2yj2a.js} +2 -2
- package/dist/{flow-api-2phdajnk.js → flow-api-b7k5dtpm.js} +8 -8
- package/dist/{flow-debug-service-r4ja009b.js → flow-debug-service-ev5g71a2.js} +38 -35
- package/dist/{flow-eval-node-target-hf5wgn23.js → flow-eval-node-target-4mbrmx04.js} +14 -15
- package/dist/{flow-eval-run-api-1bw5e0k4.js → flow-eval-run-api-yq18x5rb.js} +4 -4
- package/dist/{flow-eval-run-service-yxmf4ts9.js → flow-eval-run-service-8khfrec5.js} +40 -37
- package/dist/{flow-eval-service-8frqpr94.js → flow-eval-service-pbhak5s7.js} +19 -20
- package/dist/flow-init-sdk-source-9fy9p8ap.js +58 -0
- package/dist/{flow-init-service-zd8emetx.js → flow-init-service-7sb4evfv.js} +19 -18
- package/dist/{flow-io-hyctjz9n.js → flow-io-pm36g5z2.js} +13 -14
- package/dist/{flow-migrate-service-4ewgzq8h.js → flow-migrate-service-an1j9wbp.js} +14 -15
- package/dist/{flow-pack-service-hv0kbdpy.js → flow-pack-service-5ky0ajj7.js} +72 -39
- package/dist/flow-validate-service-r43z7ra7.js +64 -0
- package/dist/{governance-fetcher-y9ckczbw.js → governance-fetcher-ey26ppqz.js} +6 -5
- package/dist/{headless-mmnrkzve.js → headless-1pdmae01.js} +2 -2
- package/dist/{hitl-service-7a3etvhb.js → hitl-service-n2v3b8dr.js} +13 -14
- package/dist/{index-3ts7y9d3.js → index-2s8rmmw6.js} +5 -3
- package/dist/index-3jpjaq1g.js +26 -0
- package/dist/{index-b46bavh7.js → index-5yw15y73.js} +2 -2
- package/dist/{index-212q16sv.js → index-7qw3ttge.js} +416 -87
- package/dist/{index-t8e0ft8r.js → index-c1q6mnw1.js} +3 -3
- package/dist/{index-xa7gm52r.js → index-dqqg54v6.js} +601 -61
- package/dist/{index-98tcpmqy.js → index-pge7pdk8.js} +59 -27
- package/dist/index.js +10 -10
- package/dist/init.d.ts +1 -1
- package/dist/init.js +19 -18
- package/dist/{input-reader-tw0j373f.js → input-reader-bv7kt19c.js} +2 -2
- package/dist/{known-types-b64as10y.js → known-types-jhyhnkt6.js} +4 -4
- package/dist/{maestro-automate-entry-pqy9xqm3.js → maestro-automate-entry-qak46eg0.js} +2 -2
- package/dist/node-6p3nx3y1.js +4823 -0
- package/dist/{node-service-yg59dbn8.js → node-service-4rt0fyhf.js} +31 -30
- package/dist/{node-strategy-gc4sg6a2.js → node-strategy-fdnkvq4a.js} +1 -1
- package/dist/{node-sync-service-1wjvs1jf.js → node-sync-service-sccs2ebn.js} +9 -9
- package/dist/packager-tool-0ckstgfe.js +52 -0
- package/dist/{packager-tool-xhjny1hm.js → packager-tool-0n4bgrgt.js} +2 -2
- package/dist/{packager-tool-et7wj8kr.js → packager-tool-0w4es6rz.js} +2 -2
- package/dist/{packager-tool-dph5p2f5.js → packager-tool-1mnq1c97.js} +1 -1
- package/dist/{packager-tool-vbser1d9.js → packager-tool-2qr8z5ke.js} +4 -4
- package/dist/{packager-tool-0egkaa38.js → packager-tool-32czz9mq.js} +2 -2
- package/dist/{packager-tool-0v3s8r01.js → packager-tool-3h2ktz6q.js} +2 -2
- package/dist/{packager-tool-2cx6n4z5.js → packager-tool-3rpawg74.js} +10 -10
- package/dist/{packager-tool-w6wgrtew.js → packager-tool-40kgtec3.js} +141 -96
- package/dist/{packager-tool-8cab171x.js → packager-tool-4r35m5vh.js} +2 -2
- package/dist/{packager-tool-2f4djsyf.js → packager-tool-4w2r9x3t.js} +40 -11
- package/dist/{packager-tool-h9d8c9rf.js → packager-tool-4zdhy0c3.js} +2 -2
- package/dist/{packager-tool-2c688mdj.js → packager-tool-57fak54h.js} +4 -4
- package/dist/{packager-tool-qa2xzxez.js → packager-tool-59s95scr.js} +1 -1
- package/dist/{packager-tool-n8p9cay6.js → packager-tool-6azk3rex.js} +1 -1
- package/dist/{packager-tool-26ydwf12.js → packager-tool-6h69pd2a.js} +23 -8
- package/dist/{packager-tool-795gzq9k.js → packager-tool-8pmgk4f6.js} +1 -1
- package/dist/{packager-tool-321a1806.js → packager-tool-8vmx4j2w.js} +1 -1
- package/dist/{packager-tool-s0mzv3sx.js → packager-tool-aw60v0et.js} +1 -1
- package/dist/{packager-tool-e89k4pjj.js → packager-tool-c0rtxezv.js} +1 -1
- package/dist/{packager-tool-zn6hprd8.js → packager-tool-cdj4y3dx.js} +440 -29
- package/dist/{packager-tool-gzpvdcnw.js → packager-tool-da1cmt0q.js} +2 -2
- package/dist/{packager-tool-p8j4zvrq.js → packager-tool-dp8vjby4.js} +4829 -1364
- package/dist/packager-tool-e5hj89zm.js +6 -0
- package/dist/{packager-tool-ktw88pmq.js → packager-tool-f4bgm7we.js} +8 -8
- package/dist/{packager-tool-gctpkdzs.js → packager-tool-hhy1gr2k.js} +1 -1
- package/dist/{packager-tool-sf9f6jft.js → packager-tool-hygq2wy6.js} +1 -1
- package/dist/packager-tool-krzxg3ga.js +804 -0
- package/dist/{packager-tool-f05cqb81.js → packager-tool-mec8yzcd.js} +2 -2
- package/dist/{packager-tool-fnbz58pz.js → packager-tool-mswn2rf2.js} +5 -5
- package/dist/{packager-tool-1r5dnt9q.js → packager-tool-mv4jav1h.js} +1 -1
- package/dist/{packager-tool-pppzgwfw.js → packager-tool-n4vdjmjx.js} +18079 -18079
- package/dist/{packager-tool-7qmcvjb9.js → packager-tool-nakyn235.js} +4 -4
- package/dist/{packager-tool-t9c77psy.js → packager-tool-p1tb6d4f.js} +955 -150
- package/dist/{packager-tool-z70rs4y1.js → packager-tool-q4d3kmda.js} +55 -17
- package/dist/{packager-tool-gs28y1eq.js → packager-tool-qhhrq12s.js} +2 -2
- package/dist/{packager-tool-297axt45.js → packager-tool-qydwc2nn.js} +320 -200
- package/dist/{packager-tool-6k8s7pt9.js → packager-tool-r7xy9sew.js} +1090 -545
- package/dist/{packager-tool-b1xs6aty.js → packager-tool-stq8800d.js} +902 -897
- package/dist/{packager-tool-64tv6m11.js → packager-tool-tqasfphs.js} +184 -193
- package/dist/{packager-tool-qthhnc61.js → packager-tool-tt167shp.js} +5 -5
- package/dist/{packager-tool-a7t9v5ss.js → packager-tool-v9v9ch04.js} +2 -2
- package/dist/{packager-tool-9kx94sj5.js → packager-tool-x5qafkb7.js} +2 -2
- package/dist/{packager-tool-yxnepq2j.js → packager-tool-ysbskrta.js} +1 -1
- package/dist/packager-tool-zgsvggdr.js +50 -0
- package/dist/packager-tool.js +12 -13
- package/dist/{serialization-BXU6AKAN-rhgmwp06.js → serialization-BXU6AKAN-c2ge8yvb.js} +5 -5
- package/dist/services/flow-init-sdk-source.d.ts +28 -0
- package/dist/services/flow-init-service.d.ts +25 -0
- package/dist/services/inline-activity-service.d.ts +135 -0
- package/dist/services/node-service.d.ts +14 -0
- package/dist/services/node-validators/index.d.ts +2 -0
- package/dist/services/node-validators/inline-activity-validator.d.ts +18 -0
- package/dist/services/node-validators/types.d.ts +6 -0
- package/dist/services/node-validators/unresolved-binding-placeholder-validator.d.ts +2 -0
- package/dist/services/preview-id-rule.d.ts +33 -0
- package/dist/services/ui-only-node-types.d.ts +1 -0
- package/dist/{shared-utils-wv356cvj.js → shared-utils-9vfmrxtx.js} +2 -2
- package/dist/{packager-tool-132jmzds.js → tidy-service-x6r0dq7x.js} +33 -7
- package/dist/tool.js +10 -10
- package/dist/utils/flow-io.d.ts +3 -16
- package/dist/validation.js +35 -36
- package/dist/{variable-service-ed8cqxht.js → variable-service-kfr7m615.js} +13 -14
- package/dist/{wait-for-flow-job-v0njb0dk.js → wait-for-flow-job-yzyamptd.js} +8 -8
- package/package.json +2 -2
- package/dist/authoring-tv4dh80p.js +0 -360
- package/dist/flow-validate-service-b1m16mf4.js +0 -65
- package/dist/node-89449n7d.js +0 -15600
- package/dist/packager-tool-2513jrxr.js +0 -898
- package/dist/packager-tool-q5sazwbb.js +0 -85
- package/dist/packager-tool-w0kr4mbc.js +0 -996
- package/dist/services/tidy-service.d.ts +0 -26
- package/dist/tidy-service-98w9mh0r.js +0 -39
- /package/dist/{localization-y790z9vm.js → localization-xecwjpe2.js} +0 -0
|
@@ -0,0 +1,4823 @@
|
|
|
1
|
+
import {
|
|
2
|
+
I18nManager,
|
|
3
|
+
LogMessage,
|
|
4
|
+
NugetPackager,
|
|
5
|
+
Path,
|
|
6
|
+
ProjectTool,
|
|
7
|
+
TemporaryStorageService,
|
|
8
|
+
ToolResult,
|
|
9
|
+
ZipService,
|
|
10
|
+
normalizeIgnoredRules,
|
|
11
|
+
toolsFactoryRepository,
|
|
12
|
+
translate
|
|
13
|
+
} from "./packager-tool-stq8800d.js";
|
|
14
|
+
import"./packager-tool-nkrmjr3a.js";
|
|
15
|
+
import {
|
|
16
|
+
ConsoleTelemetryProvider,
|
|
17
|
+
DebugTelemetryProvider,
|
|
18
|
+
NodeContextStorage,
|
|
19
|
+
PackagerDimensions,
|
|
20
|
+
TelemetryService,
|
|
21
|
+
addSdkUserAgentHeader,
|
|
22
|
+
carriedInstructions,
|
|
23
|
+
catchError
|
|
24
|
+
} from "./packager-tool-r7xy9sew.js";
|
|
25
|
+
import {
|
|
26
|
+
NodeFileSystem
|
|
27
|
+
} from "./packager-tool-3h2ktz6q.js";
|
|
28
|
+
import"./packager-tool-1yh8g550.js";
|
|
29
|
+
// ../packager/project-packager/src/i18n/locales/de.json
|
|
30
|
+
var de_default = {
|
|
31
|
+
solutionpackager: {
|
|
32
|
+
projectLoader: {
|
|
33
|
+
errors: {
|
|
34
|
+
pathRequired: "Project directory path is required",
|
|
35
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
36
|
+
readFailed: "Failed to read project file: {path}",
|
|
37
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
validator: {
|
|
41
|
+
errors: {
|
|
42
|
+
destinationNotDefined: "Destination path is not defined",
|
|
43
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
44
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
45
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
46
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
47
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
packager: {
|
|
51
|
+
errors: {
|
|
52
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
53
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
governance: {
|
|
57
|
+
info: {
|
|
58
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
59
|
+
saved: "Governance policy saved to {path}",
|
|
60
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
61
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
62
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
63
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
64
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
65
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
66
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
67
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
68
|
+
},
|
|
69
|
+
errors: {
|
|
70
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
71
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
72
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
73
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
74
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
75
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
76
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
77
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
signing: {
|
|
81
|
+
errors: {
|
|
82
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
dotnet: {
|
|
86
|
+
info: {
|
|
87
|
+
available: "dotnet CLI is available (version {version})."
|
|
88
|
+
},
|
|
89
|
+
warnings: {
|
|
90
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
publish: {
|
|
94
|
+
errors: {
|
|
95
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
96
|
+
packageNotFound: "Package file not found: {path}",
|
|
97
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
98
|
+
publishFailed: "Publish failed: {message}",
|
|
99
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
100
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
101
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
102
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
103
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
104
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
105
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
106
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
107
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
108
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
109
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
110
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
111
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
112
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
113
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
114
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// ../packager/project-packager/src/i18n/locales/en.ts
|
|
121
|
+
var en = {
|
|
122
|
+
solutionpackager: {
|
|
123
|
+
projectLoader: {
|
|
124
|
+
errors: {
|
|
125
|
+
pathRequired: "Project directory path is required",
|
|
126
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
127
|
+
readFailed: "Failed to read project file: {path}",
|
|
128
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
validator: {
|
|
132
|
+
errors: {
|
|
133
|
+
destinationNotDefined: "Destination path is not defined",
|
|
134
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
135
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content.",
|
|
136
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
137
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
138
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
packager: {
|
|
142
|
+
errors: {
|
|
143
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
144
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
governance: {
|
|
148
|
+
info: {
|
|
149
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
150
|
+
saved: "Governance policy saved to {path}",
|
|
151
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
152
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
153
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
154
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
155
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
156
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
157
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
158
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
159
|
+
},
|
|
160
|
+
errors: {
|
|
161
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
162
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
163
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
164
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
165
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
166
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
167
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
168
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
signing: {
|
|
172
|
+
errors: {
|
|
173
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
dotnet: {
|
|
177
|
+
info: {
|
|
178
|
+
available: "dotnet CLI is available (version {version})."
|
|
179
|
+
},
|
|
180
|
+
warnings: {
|
|
181
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
publish: {
|
|
185
|
+
errors: {
|
|
186
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
187
|
+
packageNotFound: "Package file not found: {path}",
|
|
188
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
189
|
+
publishFailed: "Publish failed: {message}",
|
|
190
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
191
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
192
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
193
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
194
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
195
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
196
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
197
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
198
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
199
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
200
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
201
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
202
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
203
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
204
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
205
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
// ../packager/project-packager/src/i18n/locales/es.json
|
|
211
|
+
var es_default = {
|
|
212
|
+
solutionpackager: {
|
|
213
|
+
projectLoader: {
|
|
214
|
+
errors: {
|
|
215
|
+
pathRequired: "Project directory path is required",
|
|
216
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
217
|
+
readFailed: "Failed to read project file: {path}",
|
|
218
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
validator: {
|
|
222
|
+
errors: {
|
|
223
|
+
destinationNotDefined: "Destination path is not defined",
|
|
224
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
225
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
226
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
227
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
228
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
packager: {
|
|
232
|
+
errors: {
|
|
233
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
234
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
governance: {
|
|
238
|
+
info: {
|
|
239
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
240
|
+
saved: "Governance policy saved to {path}",
|
|
241
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
242
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
243
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
244
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
245
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
246
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
247
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
248
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
249
|
+
},
|
|
250
|
+
errors: {
|
|
251
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
252
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
253
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
254
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
255
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
256
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
257
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
258
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
signing: {
|
|
262
|
+
errors: {
|
|
263
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
dotnet: {
|
|
267
|
+
info: {
|
|
268
|
+
available: "dotnet CLI is available (version {version})."
|
|
269
|
+
},
|
|
270
|
+
warnings: {
|
|
271
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
publish: {
|
|
275
|
+
errors: {
|
|
276
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
277
|
+
packageNotFound: "Package file not found: {path}",
|
|
278
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
279
|
+
publishFailed: "Publish failed: {message}",
|
|
280
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
281
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
282
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
283
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
284
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
285
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
286
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
287
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
288
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
289
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
290
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
291
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
292
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
293
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
294
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
295
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
// ../packager/project-packager/src/i18n/locales/es-MX.json
|
|
301
|
+
var es_MX_default = {
|
|
302
|
+
solutionpackager: {
|
|
303
|
+
projectLoader: {
|
|
304
|
+
errors: {
|
|
305
|
+
pathRequired: "Project directory path is required",
|
|
306
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
307
|
+
readFailed: "Failed to read project file: {path}",
|
|
308
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
validator: {
|
|
312
|
+
errors: {
|
|
313
|
+
destinationNotDefined: "Destination path is not defined",
|
|
314
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
315
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
316
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
317
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
318
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
packager: {
|
|
322
|
+
errors: {
|
|
323
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
324
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
governance: {
|
|
328
|
+
info: {
|
|
329
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
330
|
+
saved: "Governance policy saved to {path}",
|
|
331
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
332
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
333
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
334
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
335
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
336
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
337
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
338
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
339
|
+
},
|
|
340
|
+
errors: {
|
|
341
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
342
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
343
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
344
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
345
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
346
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
347
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
348
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
signing: {
|
|
352
|
+
errors: {
|
|
353
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
dotnet: {
|
|
357
|
+
info: {
|
|
358
|
+
available: "dotnet CLI is available (version {version})."
|
|
359
|
+
},
|
|
360
|
+
warnings: {
|
|
361
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
publish: {
|
|
365
|
+
errors: {
|
|
366
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
367
|
+
packageNotFound: "Package file not found: {path}",
|
|
368
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
369
|
+
publishFailed: "Publish failed: {message}",
|
|
370
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
371
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
372
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
373
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
374
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
375
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
376
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
377
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
378
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
379
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
380
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
381
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
382
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
383
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
384
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
385
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
// ../packager/project-packager/src/i18n/locales/fr.json
|
|
391
|
+
var fr_default = {
|
|
392
|
+
solutionpackager: {
|
|
393
|
+
projectLoader: {
|
|
394
|
+
errors: {
|
|
395
|
+
pathRequired: "Project directory path is required",
|
|
396
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
397
|
+
readFailed: "Failed to read project file: {path}",
|
|
398
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
validator: {
|
|
402
|
+
errors: {
|
|
403
|
+
destinationNotDefined: "Destination path is not defined",
|
|
404
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
405
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
406
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
407
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
408
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
packager: {
|
|
412
|
+
errors: {
|
|
413
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
414
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
governance: {
|
|
418
|
+
info: {
|
|
419
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
420
|
+
saved: "Governance policy saved to {path}",
|
|
421
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
422
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
423
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
424
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
425
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
426
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
427
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
428
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
429
|
+
},
|
|
430
|
+
errors: {
|
|
431
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
432
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
433
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
434
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
435
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
436
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
437
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
438
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
signing: {
|
|
442
|
+
errors: {
|
|
443
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
dotnet: {
|
|
447
|
+
info: {
|
|
448
|
+
available: "dotnet CLI is available (version {version})."
|
|
449
|
+
},
|
|
450
|
+
warnings: {
|
|
451
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
publish: {
|
|
455
|
+
errors: {
|
|
456
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
457
|
+
packageNotFound: "Package file not found: {path}",
|
|
458
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
459
|
+
publishFailed: "Publish failed: {message}",
|
|
460
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
461
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
462
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
463
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
464
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
465
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
466
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
467
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
468
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
469
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
470
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
471
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
472
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
473
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
474
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
475
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
// ../packager/project-packager/src/i18n/locales/ja.json
|
|
481
|
+
var ja_default = {
|
|
482
|
+
solutionpackager: {
|
|
483
|
+
projectLoader: {
|
|
484
|
+
errors: {
|
|
485
|
+
pathRequired: "Project directory path is required",
|
|
486
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
487
|
+
readFailed: "Failed to read project file: {path}",
|
|
488
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
validator: {
|
|
492
|
+
errors: {
|
|
493
|
+
destinationNotDefined: "Destination path is not defined",
|
|
494
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
495
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
496
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
497
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
498
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
packager: {
|
|
502
|
+
errors: {
|
|
503
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
504
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
governance: {
|
|
508
|
+
info: {
|
|
509
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
510
|
+
saved: "Governance policy saved to {path}",
|
|
511
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
512
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
513
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
514
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
515
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
516
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
517
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
518
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
519
|
+
},
|
|
520
|
+
errors: {
|
|
521
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
522
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
523
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
524
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
525
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
526
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
527
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
528
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
signing: {
|
|
532
|
+
errors: {
|
|
533
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
dotnet: {
|
|
537
|
+
info: {
|
|
538
|
+
available: "dotnet CLI is available (version {version})."
|
|
539
|
+
},
|
|
540
|
+
warnings: {
|
|
541
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
publish: {
|
|
545
|
+
errors: {
|
|
546
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
547
|
+
packageNotFound: "Package file not found: {path}",
|
|
548
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
549
|
+
publishFailed: "Publish failed: {message}",
|
|
550
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
551
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
552
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
553
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
554
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
555
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
556
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
557
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
558
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
559
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
560
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
561
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
562
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
563
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
564
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
565
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
// ../packager/project-packager/src/i18n/locales/ko.json
|
|
571
|
+
var ko_default = {
|
|
572
|
+
solutionpackager: {
|
|
573
|
+
projectLoader: {
|
|
574
|
+
errors: {
|
|
575
|
+
pathRequired: "Project directory path is required",
|
|
576
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
577
|
+
readFailed: "Failed to read project file: {path}",
|
|
578
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
validator: {
|
|
582
|
+
errors: {
|
|
583
|
+
destinationNotDefined: "Destination path is not defined",
|
|
584
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
585
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
586
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
587
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
588
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
packager: {
|
|
592
|
+
errors: {
|
|
593
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
594
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
governance: {
|
|
598
|
+
info: {
|
|
599
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
600
|
+
saved: "Governance policy saved to {path}",
|
|
601
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
602
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
603
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
604
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
605
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
606
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
607
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
608
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
609
|
+
},
|
|
610
|
+
errors: {
|
|
611
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
612
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
613
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
614
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
615
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
616
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
617
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
618
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
signing: {
|
|
622
|
+
errors: {
|
|
623
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
dotnet: {
|
|
627
|
+
info: {
|
|
628
|
+
available: "dotnet CLI is available (version {version})."
|
|
629
|
+
},
|
|
630
|
+
warnings: {
|
|
631
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
publish: {
|
|
635
|
+
errors: {
|
|
636
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
637
|
+
packageNotFound: "Package file not found: {path}",
|
|
638
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
639
|
+
publishFailed: "Publish failed: {message}",
|
|
640
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
641
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
642
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
643
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
644
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
645
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
646
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
647
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
648
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
649
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
650
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
651
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
652
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
653
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
654
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
655
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
// ../packager/project-packager/src/i18n/locales/pt.json
|
|
661
|
+
var pt_default = {
|
|
662
|
+
solutionpackager: {
|
|
663
|
+
projectLoader: {
|
|
664
|
+
errors: {
|
|
665
|
+
pathRequired: "Project directory path is required",
|
|
666
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
667
|
+
readFailed: "Failed to read project file: {path}",
|
|
668
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
validator: {
|
|
672
|
+
errors: {
|
|
673
|
+
destinationNotDefined: "Destination path is not defined",
|
|
674
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
675
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
676
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
677
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
678
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
packager: {
|
|
682
|
+
errors: {
|
|
683
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
684
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
governance: {
|
|
688
|
+
info: {
|
|
689
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
690
|
+
saved: "Governance policy saved to {path}",
|
|
691
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
692
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
693
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
694
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
695
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
696
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
697
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
698
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
699
|
+
},
|
|
700
|
+
errors: {
|
|
701
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
702
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
703
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
704
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
705
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
706
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
707
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
708
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
signing: {
|
|
712
|
+
errors: {
|
|
713
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
dotnet: {
|
|
717
|
+
info: {
|
|
718
|
+
available: "dotnet CLI is available (version {version})."
|
|
719
|
+
},
|
|
720
|
+
warnings: {
|
|
721
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
publish: {
|
|
725
|
+
errors: {
|
|
726
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
727
|
+
packageNotFound: "Package file not found: {path}",
|
|
728
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
729
|
+
publishFailed: "Publish failed: {message}",
|
|
730
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
731
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
732
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
733
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
734
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
735
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
736
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
737
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
738
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
739
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
740
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
741
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
742
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
743
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
744
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
745
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
};
|
|
750
|
+
// ../packager/project-packager/src/i18n/locales/pt-BR.json
|
|
751
|
+
var pt_BR_default = {
|
|
752
|
+
solutionpackager: {
|
|
753
|
+
projectLoader: {
|
|
754
|
+
errors: {
|
|
755
|
+
pathRequired: "Project directory path is required",
|
|
756
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
757
|
+
readFailed: "Failed to read project file: {path}",
|
|
758
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
validator: {
|
|
762
|
+
errors: {
|
|
763
|
+
destinationNotDefined: "Destination path is not defined",
|
|
764
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
765
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
766
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
767
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
768
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
packager: {
|
|
772
|
+
errors: {
|
|
773
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
774
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
governance: {
|
|
778
|
+
info: {
|
|
779
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
780
|
+
saved: "Governance policy saved to {path}",
|
|
781
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
782
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
783
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
784
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
785
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
786
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
787
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
788
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
789
|
+
},
|
|
790
|
+
errors: {
|
|
791
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
792
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
793
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
794
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
795
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
796
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
797
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
798
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
signing: {
|
|
802
|
+
errors: {
|
|
803
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
dotnet: {
|
|
807
|
+
info: {
|
|
808
|
+
available: "dotnet CLI is available (version {version})."
|
|
809
|
+
},
|
|
810
|
+
warnings: {
|
|
811
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
812
|
+
}
|
|
813
|
+
},
|
|
814
|
+
publish: {
|
|
815
|
+
errors: {
|
|
816
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
817
|
+
packageNotFound: "Package file not found: {path}",
|
|
818
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
819
|
+
publishFailed: "Publish failed: {message}",
|
|
820
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
821
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
822
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
823
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
824
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
825
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
826
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
827
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
828
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
829
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
830
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
831
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
832
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
833
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
834
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
835
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
// ../packager/project-packager/src/i18n/locales/ro.json
|
|
841
|
+
var ro_default = {
|
|
842
|
+
solutionpackager: {
|
|
843
|
+
projectLoader: {
|
|
844
|
+
errors: {
|
|
845
|
+
pathRequired: "Project directory path is required",
|
|
846
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
847
|
+
readFailed: "Failed to read project file: {path}",
|
|
848
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
validator: {
|
|
852
|
+
errors: {
|
|
853
|
+
destinationNotDefined: "Destination path is not defined",
|
|
854
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
855
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
856
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
857
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
858
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
packager: {
|
|
862
|
+
errors: {
|
|
863
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
864
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
governance: {
|
|
868
|
+
info: {
|
|
869
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
870
|
+
saved: "Governance policy saved to {path}",
|
|
871
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
872
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
873
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
874
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
875
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
876
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
877
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
878
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
879
|
+
},
|
|
880
|
+
errors: {
|
|
881
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
882
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
883
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
884
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
885
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
886
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
887
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
888
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
signing: {
|
|
892
|
+
errors: {
|
|
893
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
dotnet: {
|
|
897
|
+
info: {
|
|
898
|
+
available: "dotnet CLI is available (version {version})."
|
|
899
|
+
},
|
|
900
|
+
warnings: {
|
|
901
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
publish: {
|
|
905
|
+
errors: {
|
|
906
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
907
|
+
packageNotFound: "Package file not found: {path}",
|
|
908
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
909
|
+
publishFailed: "Publish failed: {message}",
|
|
910
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
911
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
912
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
913
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
914
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
915
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
916
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
917
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
918
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
919
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
920
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
921
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
922
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
923
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
924
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
925
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
};
|
|
930
|
+
// ../packager/project-packager/src/i18n/locales/ru.json
|
|
931
|
+
var ru_default = {
|
|
932
|
+
solutionpackager: {
|
|
933
|
+
projectLoader: {
|
|
934
|
+
errors: {
|
|
935
|
+
pathRequired: "Project directory path is required",
|
|
936
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
937
|
+
readFailed: "Failed to read project file: {path}",
|
|
938
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
validator: {
|
|
942
|
+
errors: {
|
|
943
|
+
destinationNotDefined: "Destination path is not defined",
|
|
944
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
945
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
946
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
947
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
948
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
packager: {
|
|
952
|
+
errors: {
|
|
953
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
954
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
governance: {
|
|
958
|
+
info: {
|
|
959
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
960
|
+
saved: "Governance policy saved to {path}",
|
|
961
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
962
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
963
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
964
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
965
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
966
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
967
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
968
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
969
|
+
},
|
|
970
|
+
errors: {
|
|
971
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
972
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
973
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
974
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
975
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
976
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
977
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
978
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
979
|
+
}
|
|
980
|
+
},
|
|
981
|
+
signing: {
|
|
982
|
+
errors: {
|
|
983
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
dotnet: {
|
|
987
|
+
info: {
|
|
988
|
+
available: "dotnet CLI is available (version {version})."
|
|
989
|
+
},
|
|
990
|
+
warnings: {
|
|
991
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
992
|
+
}
|
|
993
|
+
},
|
|
994
|
+
publish: {
|
|
995
|
+
errors: {
|
|
996
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
997
|
+
packageNotFound: "Package file not found: {path}",
|
|
998
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
999
|
+
publishFailed: "Publish failed: {message}",
|
|
1000
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
1001
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
1002
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
1003
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
1004
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
1005
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
1006
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
1007
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
1008
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
1009
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
1010
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
1011
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
1012
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
1013
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
1014
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
1015
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
};
|
|
1020
|
+
// ../packager/project-packager/src/i18n/locales/tr.json
|
|
1021
|
+
var tr_default = {
|
|
1022
|
+
solutionpackager: {
|
|
1023
|
+
projectLoader: {
|
|
1024
|
+
errors: {
|
|
1025
|
+
pathRequired: "Project directory path is required",
|
|
1026
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1027
|
+
readFailed: "Failed to read project file: {path}",
|
|
1028
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1029
|
+
}
|
|
1030
|
+
},
|
|
1031
|
+
validator: {
|
|
1032
|
+
errors: {
|
|
1033
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1034
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1035
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1036
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1037
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1038
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1039
|
+
}
|
|
1040
|
+
},
|
|
1041
|
+
packager: {
|
|
1042
|
+
errors: {
|
|
1043
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1044
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1045
|
+
}
|
|
1046
|
+
},
|
|
1047
|
+
governance: {
|
|
1048
|
+
info: {
|
|
1049
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1050
|
+
saved: "Governance policy saved to {path}",
|
|
1051
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
1052
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
1053
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
1054
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
1055
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
1056
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1057
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1058
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1059
|
+
},
|
|
1060
|
+
errors: {
|
|
1061
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
1062
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
1063
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
1064
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
1065
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
1066
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
1067
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
1068
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1071
|
+
signing: {
|
|
1072
|
+
errors: {
|
|
1073
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1074
|
+
}
|
|
1075
|
+
},
|
|
1076
|
+
dotnet: {
|
|
1077
|
+
info: {
|
|
1078
|
+
available: "dotnet CLI is available (version {version})."
|
|
1079
|
+
},
|
|
1080
|
+
warnings: {
|
|
1081
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
1082
|
+
}
|
|
1083
|
+
},
|
|
1084
|
+
publish: {
|
|
1085
|
+
errors: {
|
|
1086
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
1087
|
+
packageNotFound: "Package file not found: {path}",
|
|
1088
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
1089
|
+
publishFailed: "Publish failed: {message}",
|
|
1090
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
1091
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
1092
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
1093
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
1094
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
1095
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
1096
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
1097
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
1098
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
1099
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
1100
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
1101
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
1102
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
1103
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
1104
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
1105
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
};
|
|
1110
|
+
// ../packager/project-packager/src/i18n/locales/zh-CN.json
|
|
1111
|
+
var zh_CN_default = {
|
|
1112
|
+
solutionpackager: {
|
|
1113
|
+
projectLoader: {
|
|
1114
|
+
errors: {
|
|
1115
|
+
pathRequired: "Project directory path is required",
|
|
1116
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1117
|
+
readFailed: "Failed to read project file: {path}",
|
|
1118
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1119
|
+
}
|
|
1120
|
+
},
|
|
1121
|
+
validator: {
|
|
1122
|
+
errors: {
|
|
1123
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1124
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1125
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1126
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1127
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1128
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1129
|
+
}
|
|
1130
|
+
},
|
|
1131
|
+
packager: {
|
|
1132
|
+
errors: {
|
|
1133
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1134
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1135
|
+
}
|
|
1136
|
+
},
|
|
1137
|
+
governance: {
|
|
1138
|
+
info: {
|
|
1139
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1140
|
+
saved: "Governance policy saved to {path}",
|
|
1141
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
1142
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
1143
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
1144
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
1145
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
1146
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1147
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1148
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1149
|
+
},
|
|
1150
|
+
errors: {
|
|
1151
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
1152
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
1153
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
1154
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
1155
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
1156
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
1157
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
1158
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
1159
|
+
}
|
|
1160
|
+
},
|
|
1161
|
+
signing: {
|
|
1162
|
+
errors: {
|
|
1163
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
dotnet: {
|
|
1167
|
+
info: {
|
|
1168
|
+
available: "dotnet CLI is available (version {version})."
|
|
1169
|
+
},
|
|
1170
|
+
warnings: {
|
|
1171
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
publish: {
|
|
1175
|
+
errors: {
|
|
1176
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
1177
|
+
packageNotFound: "Package file not found: {path}",
|
|
1178
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
1179
|
+
publishFailed: "Publish failed: {message}",
|
|
1180
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
1181
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
1182
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
1183
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
1184
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
1185
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
1186
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
1187
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
1188
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
1189
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
1190
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
1191
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
1192
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
1193
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
1194
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
1195
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
};
|
|
1200
|
+
// ../packager/project-packager/src/i18n/locales/zh-TW.json
|
|
1201
|
+
var zh_TW_default = {
|
|
1202
|
+
solutionpackager: {
|
|
1203
|
+
projectLoader: {
|
|
1204
|
+
errors: {
|
|
1205
|
+
pathRequired: "Project directory path is required",
|
|
1206
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1207
|
+
readFailed: "Failed to read project file: {path}",
|
|
1208
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1209
|
+
}
|
|
1210
|
+
},
|
|
1211
|
+
validator: {
|
|
1212
|
+
errors: {
|
|
1213
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1214
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1215
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1216
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1217
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1218
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
packager: {
|
|
1222
|
+
errors: {
|
|
1223
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1224
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1225
|
+
}
|
|
1226
|
+
},
|
|
1227
|
+
governance: {
|
|
1228
|
+
info: {
|
|
1229
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1230
|
+
saved: "Governance policy saved to {path}",
|
|
1231
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
1232
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
1233
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
1234
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
1235
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
1236
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1237
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1238
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1239
|
+
},
|
|
1240
|
+
errors: {
|
|
1241
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
1242
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
1243
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
1244
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
1245
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
1246
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
1247
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
1248
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
signing: {
|
|
1252
|
+
errors: {
|
|
1253
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1256
|
+
dotnet: {
|
|
1257
|
+
info: {
|
|
1258
|
+
available: "dotnet CLI is available (version {version})."
|
|
1259
|
+
},
|
|
1260
|
+
warnings: {
|
|
1261
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1264
|
+
publish: {
|
|
1265
|
+
errors: {
|
|
1266
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
1267
|
+
packageNotFound: "Package file not found: {path}",
|
|
1268
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
1269
|
+
publishFailed: "Publish failed: {message}",
|
|
1270
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
1271
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
1272
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
1273
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
1274
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
1275
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
1276
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
1277
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
1278
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
1279
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
1280
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
1281
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
1282
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
1283
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
1284
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
1285
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
};
|
|
1290
|
+
// ../packager/project-packager/src/i18n/locales/zu.json
|
|
1291
|
+
var zu_default = {
|
|
1292
|
+
solutionpackager: {
|
|
1293
|
+
projectLoader: {
|
|
1294
|
+
errors: {
|
|
1295
|
+
pathRequired: "Project directory path is required",
|
|
1296
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1297
|
+
readFailed: "Failed to read project file: {path}",
|
|
1298
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1299
|
+
}
|
|
1300
|
+
},
|
|
1301
|
+
validator: {
|
|
1302
|
+
errors: {
|
|
1303
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1304
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1305
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1306
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1307
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1308
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
packager: {
|
|
1312
|
+
errors: {
|
|
1313
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1314
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
governance: {
|
|
1318
|
+
info: {
|
|
1319
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1320
|
+
saved: "Governance policy saved to {path}",
|
|
1321
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
1322
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
1323
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
1324
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
1325
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
1326
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1327
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1328
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1329
|
+
},
|
|
1330
|
+
errors: {
|
|
1331
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
1332
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
1333
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
1334
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} governs this tenant, so the governance file at {path} is not used.",
|
|
1335
|
+
ignoredRulesNotApplied: "The AutomationOps policy published for {product} governs this tenant, so --ignored-rules is not applied and every rule the policy enforces stays enforced. Ignored: {rules}",
|
|
1336
|
+
defaultOverridden: "The AutomationOps policy published for {product} governs this tenant, so it is used instead of the rules shipped with the WorkflowCompiler.",
|
|
1337
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
1338
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
1339
|
+
}
|
|
1340
|
+
},
|
|
1341
|
+
signing: {
|
|
1342
|
+
errors: {
|
|
1343
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1344
|
+
}
|
|
1345
|
+
},
|
|
1346
|
+
dotnet: {
|
|
1347
|
+
info: {
|
|
1348
|
+
available: "dotnet CLI is available (version {version})."
|
|
1349
|
+
},
|
|
1350
|
+
warnings: {
|
|
1351
|
+
notAvailable: "dotnet CLI is not available. Workflow compiler functionality and package signing will not be available."
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
publish: {
|
|
1355
|
+
errors: {
|
|
1356
|
+
atLeastOnePackage: "At least one package path is required.",
|
|
1357
|
+
packageNotFound: "Package file not found: {path}",
|
|
1358
|
+
unknownDestination: "Unknown publish destination: {destination}",
|
|
1359
|
+
publishFailed: "Publish failed: {message}",
|
|
1360
|
+
failedToReadPackage: "Failed to read package file: {path}",
|
|
1361
|
+
localFolderRequired: "Local folder destination requires a folderPath.",
|
|
1362
|
+
localFolderFileExists: "File already exists at destination and overwrite is disabled: {path}",
|
|
1363
|
+
nugetFeedUrlRequired: "NuGet feed destination requires a feedUrl.",
|
|
1364
|
+
nugetPushFailed: "NuGet push failed for {fileName}: {status} {statusText}{body}",
|
|
1365
|
+
nugetPushUrlResolutionFailed: "Failed to resolve NuGet push URL from {feedUrl}: {message}",
|
|
1366
|
+
orchestratorCloudUrlRequired: "Orchestrator destination requires connectionInfo.cloudUrl.",
|
|
1367
|
+
orchestratorCustomPublishUrlRequired: "OrchestratorCustom destination requires a publishUrl.",
|
|
1368
|
+
orchestratorFeedResolutionFailed: "Could not resolve a target Orchestrator feed: {message}",
|
|
1369
|
+
orchestratorFeedNotFound: "No accessible Orchestrator feed matches destination {kind}. Available feeds: {available}",
|
|
1370
|
+
orchestratorPersonalWorkspaceFolderNotFound: "No personal-workspace folder is accessible — make sure the authenticated user has a personal workspace. Folders returned: {folders}",
|
|
1371
|
+
orchestratorNoPackages: "No package files were provided to publish.",
|
|
1372
|
+
orchestratorPublishFailed: "Orchestrator publish failed: {status} {statusText}{body}",
|
|
1373
|
+
orchestratorUrlRequired: "Orchestrator URL is required.",
|
|
1374
|
+
getAccessibleFeedsFailed: "GetAccessibleFeeds failed: {status} {statusText}{body}",
|
|
1375
|
+
getFoldersForCurrentUserFailed: "GetAllFoldersForCurrentUser failed: {status} {statusText}{body}"
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
};
|
|
1380
|
+
|
|
1381
|
+
// ../packager/project-packager/src/i18n/index.ts
|
|
1382
|
+
I18nManager.registerTranslations("en", en);
|
|
1383
|
+
I18nManager.registerTranslations("de", de_default);
|
|
1384
|
+
I18nManager.registerTranslations("es", es_default);
|
|
1385
|
+
I18nManager.registerTranslations("es-MX", es_MX_default);
|
|
1386
|
+
I18nManager.registerTranslations("fr", fr_default);
|
|
1387
|
+
I18nManager.registerTranslations("ja", ja_default);
|
|
1388
|
+
I18nManager.registerTranslations("ko", ko_default);
|
|
1389
|
+
I18nManager.registerTranslations("pt", pt_default);
|
|
1390
|
+
I18nManager.registerTranslations("pt-BR", pt_BR_default);
|
|
1391
|
+
I18nManager.registerTranslations("ro", ro_default);
|
|
1392
|
+
I18nManager.registerTranslations("ru", ru_default);
|
|
1393
|
+
I18nManager.registerTranslations("tr", tr_default);
|
|
1394
|
+
I18nManager.registerTranslations("zh-CN", zh_CN_default);
|
|
1395
|
+
I18nManager.registerTranslations("zh-TW", zh_TW_default);
|
|
1396
|
+
I18nManager.registerTranslations("zu", zu_default);
|
|
1397
|
+
// ../packager/project-packager/src/services/tool-logger.ts
|
|
1398
|
+
var globalLogHandler = (logMessage) => {
|
|
1399
|
+
const formattedMessage = logMessage.toFormattedString();
|
|
1400
|
+
switch (logMessage.logLevel) {
|
|
1401
|
+
case "Debug" /* Debug */:
|
|
1402
|
+
console.debug(formattedMessage);
|
|
1403
|
+
break;
|
|
1404
|
+
case "Information" /* Info */:
|
|
1405
|
+
console.info(formattedMessage);
|
|
1406
|
+
break;
|
|
1407
|
+
case "Warning" /* Warn */:
|
|
1408
|
+
console.warn(formattedMessage);
|
|
1409
|
+
break;
|
|
1410
|
+
case "Error" /* Error */:
|
|
1411
|
+
console.error(formattedMessage);
|
|
1412
|
+
break;
|
|
1413
|
+
}
|
|
1414
|
+
};
|
|
1415
|
+
function setGlobalLogHandler(handler) {
|
|
1416
|
+
globalLogHandler = handler;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
class ToolLogger {
|
|
1420
|
+
source;
|
|
1421
|
+
sourceTarget;
|
|
1422
|
+
constructor(source, sourceTarget) {
|
|
1423
|
+
this.source = source;
|
|
1424
|
+
this.sourceTarget = sourceTarget;
|
|
1425
|
+
}
|
|
1426
|
+
debug(message, options) {
|
|
1427
|
+
const logMessage = new LogMessage(message, "Debug" /* Debug */, {
|
|
1428
|
+
source: this.source,
|
|
1429
|
+
sourceTarget: this.sourceTarget,
|
|
1430
|
+
...options
|
|
1431
|
+
});
|
|
1432
|
+
globalLogHandler(logMessage);
|
|
1433
|
+
}
|
|
1434
|
+
info(message, options) {
|
|
1435
|
+
const logMessage = new LogMessage(message, "Information" /* Info */, {
|
|
1436
|
+
source: this.source,
|
|
1437
|
+
sourceTarget: this.sourceTarget,
|
|
1438
|
+
...options
|
|
1439
|
+
});
|
|
1440
|
+
globalLogHandler(logMessage);
|
|
1441
|
+
}
|
|
1442
|
+
warn(message, options) {
|
|
1443
|
+
const logMessage = new LogMessage(message, "Warning" /* Warn */, {
|
|
1444
|
+
source: this.source,
|
|
1445
|
+
sourceTarget: this.sourceTarget,
|
|
1446
|
+
...options
|
|
1447
|
+
});
|
|
1448
|
+
globalLogHandler(logMessage);
|
|
1449
|
+
}
|
|
1450
|
+
error(message, options) {
|
|
1451
|
+
const logMessage = new LogMessage(message, "Error" /* Error */, {
|
|
1452
|
+
source: this.source,
|
|
1453
|
+
sourceTarget: this.sourceTarget,
|
|
1454
|
+
...options
|
|
1455
|
+
});
|
|
1456
|
+
globalLogHandler(logMessage);
|
|
1457
|
+
}
|
|
1458
|
+
progress(message, options) {
|
|
1459
|
+
const logMessage = new LogMessage(message, "Information" /* Info */, {
|
|
1460
|
+
source: this.source,
|
|
1461
|
+
sourceTarget: this.sourceTarget,
|
|
1462
|
+
...options
|
|
1463
|
+
});
|
|
1464
|
+
globalLogHandler(logMessage);
|
|
1465
|
+
}
|
|
1466
|
+
log(message, logLevel, options) {
|
|
1467
|
+
const logMessage = new LogMessage(message, logLevel, {
|
|
1468
|
+
source: this.source,
|
|
1469
|
+
sourceTarget: this.sourceTarget,
|
|
1470
|
+
...options
|
|
1471
|
+
});
|
|
1472
|
+
globalLogHandler(logMessage);
|
|
1473
|
+
}
|
|
1474
|
+
logMessage(message) {
|
|
1475
|
+
globalLogHandler(message);
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
// ../packager/project-packager/src/base-node-packager-factory.ts
|
|
1480
|
+
class BaseNodePackagerFactory {
|
|
1481
|
+
dotnetDiscovery;
|
|
1482
|
+
getOrCreateFileSystem(config) {
|
|
1483
|
+
return config?.fileSystem ?? new NodeFileSystem;
|
|
1484
|
+
}
|
|
1485
|
+
getOrCreateTelemetryService(config) {
|
|
1486
|
+
if (config?.telemetryService) {
|
|
1487
|
+
return config.telemetryService;
|
|
1488
|
+
}
|
|
1489
|
+
const provider = new DebugTelemetryProvider;
|
|
1490
|
+
const contextStorage = new NodeContextStorage;
|
|
1491
|
+
return new TelemetryService(provider, contextStorage);
|
|
1492
|
+
}
|
|
1493
|
+
checkDotnetAvailability(logger) {
|
|
1494
|
+
if (!this.dotnetDiscovery) {
|
|
1495
|
+
return;
|
|
1496
|
+
}
|
|
1497
|
+
const version = this.dotnetDiscovery.getDotnetVersion();
|
|
1498
|
+
if (version) {
|
|
1499
|
+
logger.info(translate.t("solutionpackager.dotnet.info.available", {
|
|
1500
|
+
version
|
|
1501
|
+
}));
|
|
1502
|
+
} else {
|
|
1503
|
+
logger.warn(translate.t("solutionpackager.dotnet.warnings.notAvailable"));
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
configureLogHandler(config) {
|
|
1507
|
+
if (config?.logHandler) {
|
|
1508
|
+
setGlobalLogHandler(config.logHandler);
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
configureLanguage(config) {
|
|
1512
|
+
const language = config?.language ?? "en";
|
|
1513
|
+
translate.setLocale(language);
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
// ../packager/project-packager/src/models/packager-parameters.ts
|
|
1517
|
+
var RulesConfigFileType;
|
|
1518
|
+
((RulesConfigFileType2) => {
|
|
1519
|
+
RulesConfigFileType2["Default"] = "Default";
|
|
1520
|
+
RulesConfigFileType2["AutomationOps"] = "AutomationOps";
|
|
1521
|
+
RulesConfigFileType2["Studio"] = "Studio";
|
|
1522
|
+
})(RulesConfigFileType ||= {});
|
|
1523
|
+
|
|
1524
|
+
class PackagerParameters {
|
|
1525
|
+
inputPath;
|
|
1526
|
+
downloadUrl;
|
|
1527
|
+
projectId;
|
|
1528
|
+
logLevel = "Warning" /* Warn */;
|
|
1529
|
+
outputPath;
|
|
1530
|
+
targetFramework;
|
|
1531
|
+
excludeConfiguredSources = false;
|
|
1532
|
+
nuGetSourcesConfigPath;
|
|
1533
|
+
feedFolder;
|
|
1534
|
+
detailedLogPath;
|
|
1535
|
+
connection;
|
|
1536
|
+
workflowCompilerVersion;
|
|
1537
|
+
}
|
|
1538
|
+
// ../packager/project-packager/src/models/project-restore-options.ts
|
|
1539
|
+
class ProjectRestoreOptions extends PackagerParameters {
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
// ../packager/project-packager/src/models/project-validate-options.ts
|
|
1543
|
+
class ProjectValidateOptions extends ProjectRestoreOptions {
|
|
1544
|
+
validateOptions = {
|
|
1545
|
+
skipAnalyze: false,
|
|
1546
|
+
skipValidate: false,
|
|
1547
|
+
governanceFileType: "Default" /* Default */
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
// ../packager/project-packager/src/models/project-build-options.ts
|
|
1552
|
+
class ProjectBuildOptions extends ProjectValidateOptions {
|
|
1553
|
+
outputType;
|
|
1554
|
+
}
|
|
1555
|
+
// ../packager/project-packager/src/models/project-cleanup-options.ts
|
|
1556
|
+
class ProjectCleanupOptions extends PackagerParameters {
|
|
1557
|
+
dryRun = false;
|
|
1558
|
+
skipImports = false;
|
|
1559
|
+
lockKey;
|
|
1560
|
+
}
|
|
1561
|
+
// ../packager/project-packager/src/models/project-pack-options.ts
|
|
1562
|
+
class ProjectPackOptions extends ProjectBuildOptions {
|
|
1563
|
+
destinationPath;
|
|
1564
|
+
package;
|
|
1565
|
+
signingInfo;
|
|
1566
|
+
packOptions;
|
|
1567
|
+
}
|
|
1568
|
+
// ../packager/project-packager/src/services/dotnet-discovery-service.ts
|
|
1569
|
+
import { execSync } from "node:child_process";
|
|
1570
|
+
|
|
1571
|
+
class DotnetDiscoveryService {
|
|
1572
|
+
cachedVersion;
|
|
1573
|
+
isDotnetAvailable() {
|
|
1574
|
+
return this.getDotnetVersion() !== undefined;
|
|
1575
|
+
}
|
|
1576
|
+
getDotnetVersion() {
|
|
1577
|
+
if (this.cachedVersion !== undefined) {
|
|
1578
|
+
return this.cachedVersion;
|
|
1579
|
+
}
|
|
1580
|
+
try {
|
|
1581
|
+
const output = execSync("dotnet --version", {
|
|
1582
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
1583
|
+
encoding: "utf-8"
|
|
1584
|
+
});
|
|
1585
|
+
this.cachedVersion = output.trim();
|
|
1586
|
+
return this.cachedVersion;
|
|
1587
|
+
} catch {
|
|
1588
|
+
return;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
// ../packager/project-packager/src/services/package-sign-service.ts
|
|
1594
|
+
import { spawn } from "node:child_process";
|
|
1595
|
+
class NodePackageSignService {
|
|
1596
|
+
dotnetDiscovery;
|
|
1597
|
+
logger;
|
|
1598
|
+
constructor(dotnetDiscovery, logger) {
|
|
1599
|
+
this.dotnetDiscovery = dotnetDiscovery;
|
|
1600
|
+
this.logger = logger;
|
|
1601
|
+
}
|
|
1602
|
+
async signPackageAsync(packagePath, certificatePath, certificatePassword, timestampServer) {
|
|
1603
|
+
return this.signPackagesAsync([packagePath], certificatePath, certificatePassword, timestampServer);
|
|
1604
|
+
}
|
|
1605
|
+
async signPackagesAsync(packagePaths, certificatePath, certificatePassword, timestampServer) {
|
|
1606
|
+
if (packagePaths.length === 0) {
|
|
1607
|
+
return ToolResult.success();
|
|
1608
|
+
}
|
|
1609
|
+
if (!this.dotnetDiscovery.isDotnetAvailable()) {
|
|
1610
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.signing.errors.dotnetNotAvailable"));
|
|
1611
|
+
}
|
|
1612
|
+
const args = [
|
|
1613
|
+
"nuget",
|
|
1614
|
+
"sign",
|
|
1615
|
+
...packagePaths,
|
|
1616
|
+
"--certificate-path",
|
|
1617
|
+
certificatePath,
|
|
1618
|
+
"--overwrite"
|
|
1619
|
+
];
|
|
1620
|
+
if (certificatePassword) {
|
|
1621
|
+
args.push("--certificate-password", certificatePassword);
|
|
1622
|
+
}
|
|
1623
|
+
if (timestampServer) {
|
|
1624
|
+
args.push("--timestamper", timestampServer);
|
|
1625
|
+
}
|
|
1626
|
+
return new Promise((resolve) => {
|
|
1627
|
+
const childProcess = spawn("dotnet", args, {
|
|
1628
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
1629
|
+
shell: false,
|
|
1630
|
+
windowsHide: true
|
|
1631
|
+
});
|
|
1632
|
+
let stderr = "";
|
|
1633
|
+
childProcess.stdout?.on("data", (data) => {
|
|
1634
|
+
this.logger.info(data.toString().trim());
|
|
1635
|
+
});
|
|
1636
|
+
childProcess.stderr?.on("data", (data) => {
|
|
1637
|
+
stderr += data.toString();
|
|
1638
|
+
});
|
|
1639
|
+
childProcess.on("error", (error) => {
|
|
1640
|
+
this.logger.error(`Failed to start dotnet process: ${error.message}`);
|
|
1641
|
+
resolve(ToolResult.error("INTERNAL_ERROR" /* InternalError */, `Failed to start dotnet process: ${error.message}`));
|
|
1642
|
+
});
|
|
1643
|
+
childProcess.on("exit", (code) => {
|
|
1644
|
+
if (code === 0) {
|
|
1645
|
+
this.logger.info(`Successfully signed packages: ${packagePaths.join(", ")}`);
|
|
1646
|
+
resolve(ToolResult.success());
|
|
1647
|
+
} else {
|
|
1648
|
+
const errorMessage = stderr.trim() || `dotnet nuget sign exited with code ${code}`;
|
|
1649
|
+
this.logger.error(`Package signing failed: ${errorMessage}`);
|
|
1650
|
+
resolve(ToolResult.error("INTERNAL_ERROR" /* InternalError */, `Package signing failed: ${errorMessage}`));
|
|
1651
|
+
}
|
|
1652
|
+
});
|
|
1653
|
+
});
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
// ../packager/project-packager/src/telemetry-names.ts
|
|
1657
|
+
var TelemetryNames;
|
|
1658
|
+
((TelemetryNames2) => {
|
|
1659
|
+
TelemetryNames2["ProjectToolPack"] = "ProjectPackager.Tool.Pack";
|
|
1660
|
+
TelemetryNames2["ProjectToolRestore"] = "ProjectPackager.Tool.Restore";
|
|
1661
|
+
TelemetryNames2["ProjectToolValidate"] = "ProjectPackager.Tool.Validate";
|
|
1662
|
+
TelemetryNames2["ProjectToolBuild"] = "ProjectPackager.Tool.Build";
|
|
1663
|
+
TelemetryNames2["ProjectToolCleanup"] = "ProjectPackager.Tool.Cleanup";
|
|
1664
|
+
TelemetryNames2["ProjectPackagerPack"] = "ProjectPackager.Pack";
|
|
1665
|
+
TelemetryNames2["ProjectPackagerRestore"] = "ProjectPackager.Restore";
|
|
1666
|
+
TelemetryNames2["ProjectPackagerValidate"] = "ProjectPackager.Validate";
|
|
1667
|
+
TelemetryNames2["ProjectPackagerBuild"] = "ProjectPackager.Build";
|
|
1668
|
+
TelemetryNames2["ProjectPackagerCleanup"] = "ProjectPackager.Cleanup";
|
|
1669
|
+
TelemetryNames2["ProjectPackagerProjectLoaded"] = "ProjectPackager.ProjectLoaded";
|
|
1670
|
+
})(TelemetryNames ||= {});
|
|
1671
|
+
|
|
1672
|
+
// ../gov/aops-policy-sdk/generated/src/runtime.ts
|
|
1673
|
+
var BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
1674
|
+
|
|
1675
|
+
class Configuration {
|
|
1676
|
+
configuration;
|
|
1677
|
+
constructor(configuration = {}) {
|
|
1678
|
+
this.configuration = configuration;
|
|
1679
|
+
}
|
|
1680
|
+
set config(configuration) {
|
|
1681
|
+
this.configuration = configuration;
|
|
1682
|
+
}
|
|
1683
|
+
get basePath() {
|
|
1684
|
+
return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
|
|
1685
|
+
}
|
|
1686
|
+
get fetchApi() {
|
|
1687
|
+
return this.configuration.fetchApi;
|
|
1688
|
+
}
|
|
1689
|
+
get middleware() {
|
|
1690
|
+
return this.configuration.middleware || [];
|
|
1691
|
+
}
|
|
1692
|
+
get queryParamsStringify() {
|
|
1693
|
+
return this.configuration.queryParamsStringify || querystring;
|
|
1694
|
+
}
|
|
1695
|
+
get username() {
|
|
1696
|
+
return this.configuration.username;
|
|
1697
|
+
}
|
|
1698
|
+
get password() {
|
|
1699
|
+
return this.configuration.password;
|
|
1700
|
+
}
|
|
1701
|
+
get apiKey() {
|
|
1702
|
+
const apiKey = this.configuration.apiKey;
|
|
1703
|
+
if (apiKey) {
|
|
1704
|
+
return typeof apiKey === "function" ? apiKey : () => apiKey;
|
|
1705
|
+
}
|
|
1706
|
+
return;
|
|
1707
|
+
}
|
|
1708
|
+
get accessToken() {
|
|
1709
|
+
const accessToken = this.configuration.accessToken;
|
|
1710
|
+
if (accessToken) {
|
|
1711
|
+
return typeof accessToken === "function" ? accessToken : async () => accessToken;
|
|
1712
|
+
}
|
|
1713
|
+
return;
|
|
1714
|
+
}
|
|
1715
|
+
get headers() {
|
|
1716
|
+
return this.configuration.headers;
|
|
1717
|
+
}
|
|
1718
|
+
get credentials() {
|
|
1719
|
+
return this.configuration.credentials;
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
var DefaultConfig = new Configuration;
|
|
1723
|
+
|
|
1724
|
+
class BaseAPI {
|
|
1725
|
+
configuration;
|
|
1726
|
+
static jsonRegex = new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", "i");
|
|
1727
|
+
middleware;
|
|
1728
|
+
constructor(configuration = DefaultConfig) {
|
|
1729
|
+
this.configuration = configuration;
|
|
1730
|
+
this.middleware = configuration.middleware;
|
|
1731
|
+
}
|
|
1732
|
+
withMiddleware(...middlewares) {
|
|
1733
|
+
const next = this.clone();
|
|
1734
|
+
next.middleware = next.middleware.concat(...middlewares);
|
|
1735
|
+
return next;
|
|
1736
|
+
}
|
|
1737
|
+
withPreMiddleware(...preMiddlewares) {
|
|
1738
|
+
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
|
1739
|
+
return this.withMiddleware(...middlewares);
|
|
1740
|
+
}
|
|
1741
|
+
withPostMiddleware(...postMiddlewares) {
|
|
1742
|
+
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
1743
|
+
return this.withMiddleware(...middlewares);
|
|
1744
|
+
}
|
|
1745
|
+
isJsonMime(mime) {
|
|
1746
|
+
if (!mime) {
|
|
1747
|
+
return false;
|
|
1748
|
+
}
|
|
1749
|
+
return BaseAPI.jsonRegex.test(mime);
|
|
1750
|
+
}
|
|
1751
|
+
async request(context, initOverrides) {
|
|
1752
|
+
const { url, init } = await this.createFetchParams(context, initOverrides);
|
|
1753
|
+
const response = await this.fetchApi(url, init);
|
|
1754
|
+
if (response && (response.status >= 200 && response.status < 300)) {
|
|
1755
|
+
return response;
|
|
1756
|
+
}
|
|
1757
|
+
throw new ResponseError(response, "Response returned an error code");
|
|
1758
|
+
}
|
|
1759
|
+
async createFetchParams(context, initOverrides) {
|
|
1760
|
+
let url = this.configuration.basePath + context.path;
|
|
1761
|
+
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
1762
|
+
url += "?" + this.configuration.queryParamsStringify(context.query);
|
|
1763
|
+
}
|
|
1764
|
+
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
1765
|
+
Object.keys(headers).forEach((key) => headers[key] === undefined ? delete headers[key] : {});
|
|
1766
|
+
const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async () => initOverrides;
|
|
1767
|
+
const initParams = {
|
|
1768
|
+
method: context.method,
|
|
1769
|
+
headers,
|
|
1770
|
+
body: context.body,
|
|
1771
|
+
credentials: this.configuration.credentials
|
|
1772
|
+
};
|
|
1773
|
+
const overriddenInit = {
|
|
1774
|
+
...initParams,
|
|
1775
|
+
...await initOverrideFn({
|
|
1776
|
+
init: initParams,
|
|
1777
|
+
context
|
|
1778
|
+
})
|
|
1779
|
+
};
|
|
1780
|
+
let body;
|
|
1781
|
+
if (isFormData(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob(overriddenInit.body)) {
|
|
1782
|
+
body = overriddenInit.body;
|
|
1783
|
+
} else if (this.isJsonMime(headers["Content-Type"])) {
|
|
1784
|
+
body = JSON.stringify(overriddenInit.body);
|
|
1785
|
+
} else {
|
|
1786
|
+
body = overriddenInit.body;
|
|
1787
|
+
}
|
|
1788
|
+
const init = {
|
|
1789
|
+
...overriddenInit,
|
|
1790
|
+
body
|
|
1791
|
+
};
|
|
1792
|
+
return { url, init };
|
|
1793
|
+
}
|
|
1794
|
+
fetchApi = async (url, init) => {
|
|
1795
|
+
let fetchParams = { url, init };
|
|
1796
|
+
for (const middleware of this.middleware) {
|
|
1797
|
+
if (middleware.pre) {
|
|
1798
|
+
fetchParams = await middleware.pre({
|
|
1799
|
+
fetch: this.fetchApi,
|
|
1800
|
+
...fetchParams
|
|
1801
|
+
}) || fetchParams;
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
let response = undefined;
|
|
1805
|
+
try {
|
|
1806
|
+
response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
|
1807
|
+
} catch (e) {
|
|
1808
|
+
for (const middleware of this.middleware) {
|
|
1809
|
+
if (middleware.onError) {
|
|
1810
|
+
response = await middleware.onError({
|
|
1811
|
+
fetch: this.fetchApi,
|
|
1812
|
+
url: fetchParams.url,
|
|
1813
|
+
init: fetchParams.init,
|
|
1814
|
+
error: e,
|
|
1815
|
+
response: response ? response.clone() : undefined
|
|
1816
|
+
}) || response;
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
if (response === undefined) {
|
|
1820
|
+
if (e instanceof Error) {
|
|
1821
|
+
throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
|
|
1822
|
+
} else {
|
|
1823
|
+
throw e;
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
for (const middleware of this.middleware) {
|
|
1828
|
+
if (middleware.post) {
|
|
1829
|
+
response = await middleware.post({
|
|
1830
|
+
fetch: this.fetchApi,
|
|
1831
|
+
url: fetchParams.url,
|
|
1832
|
+
init: fetchParams.init,
|
|
1833
|
+
response: response.clone()
|
|
1834
|
+
}) || response;
|
|
1835
|
+
}
|
|
1836
|
+
}
|
|
1837
|
+
return response;
|
|
1838
|
+
};
|
|
1839
|
+
clone() {
|
|
1840
|
+
const constructor = this.constructor;
|
|
1841
|
+
const next = new constructor(this.configuration);
|
|
1842
|
+
next.middleware = this.middleware.slice();
|
|
1843
|
+
return next;
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
function isBlob(value) {
|
|
1847
|
+
return typeof Blob !== "undefined" && value instanceof Blob;
|
|
1848
|
+
}
|
|
1849
|
+
function isFormData(value) {
|
|
1850
|
+
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
class ResponseError extends Error {
|
|
1854
|
+
response;
|
|
1855
|
+
name = "ResponseError";
|
|
1856
|
+
constructor(response, msg) {
|
|
1857
|
+
super(msg);
|
|
1858
|
+
this.response = response;
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
class FetchError extends Error {
|
|
1863
|
+
cause;
|
|
1864
|
+
name = "FetchError";
|
|
1865
|
+
constructor(cause, msg) {
|
|
1866
|
+
super(msg);
|
|
1867
|
+
this.cause = cause;
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
class RequiredError extends Error {
|
|
1872
|
+
field;
|
|
1873
|
+
name = "RequiredError";
|
|
1874
|
+
constructor(field, msg) {
|
|
1875
|
+
super(msg);
|
|
1876
|
+
this.field = field;
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
function querystring(params, prefix = "") {
|
|
1880
|
+
return Object.keys(params).map((key) => querystringSingleKey(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
|
|
1881
|
+
}
|
|
1882
|
+
function querystringSingleKey(key, value, keyPrefix = "") {
|
|
1883
|
+
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
|
|
1884
|
+
if (value instanceof Array) {
|
|
1885
|
+
const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
|
|
1886
|
+
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
|
1887
|
+
}
|
|
1888
|
+
if (value instanceof Set) {
|
|
1889
|
+
const valueAsArray = Array.from(value);
|
|
1890
|
+
return querystringSingleKey(key, valueAsArray, keyPrefix);
|
|
1891
|
+
}
|
|
1892
|
+
if (value instanceof Date) {
|
|
1893
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
|
1894
|
+
}
|
|
1895
|
+
if (value instanceof Object) {
|
|
1896
|
+
return querystring(value, fullKey);
|
|
1897
|
+
}
|
|
1898
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
1899
|
+
}
|
|
1900
|
+
function canConsumeForm(consumes) {
|
|
1901
|
+
for (const consume of consumes) {
|
|
1902
|
+
if (consume.contentType === "multipart/form-data") {
|
|
1903
|
+
return true;
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
return false;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
class JSONApiResponse {
|
|
1910
|
+
raw;
|
|
1911
|
+
transformer;
|
|
1912
|
+
constructor(raw, transformer = (jsonValue) => jsonValue) {
|
|
1913
|
+
this.raw = raw;
|
|
1914
|
+
this.transformer = transformer;
|
|
1915
|
+
}
|
|
1916
|
+
async value() {
|
|
1917
|
+
return this.transformer(await this.raw.json());
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
class VoidApiResponse {
|
|
1922
|
+
raw;
|
|
1923
|
+
constructor(raw) {
|
|
1924
|
+
this.raw = raw;
|
|
1925
|
+
}
|
|
1926
|
+
async value() {
|
|
1927
|
+
return;
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
class TextApiResponse {
|
|
1931
|
+
raw;
|
|
1932
|
+
constructor(raw) {
|
|
1933
|
+
this.raw = raw;
|
|
1934
|
+
}
|
|
1935
|
+
async value() {
|
|
1936
|
+
return await this.raw.text();
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
// ../gov/aops-policy-sdk/generated/src/models/ProductDto.ts
|
|
1941
|
+
function ProductDtoFromJSON(json) {
|
|
1942
|
+
return ProductDtoFromJSONTyped(json, false);
|
|
1943
|
+
}
|
|
1944
|
+
function ProductDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
1945
|
+
if (json == null) {
|
|
1946
|
+
return json;
|
|
1947
|
+
}
|
|
1948
|
+
return {
|
|
1949
|
+
name: json["name"] == null ? undefined : json["name"],
|
|
1950
|
+
label: json["label"] == null ? undefined : json["label"],
|
|
1951
|
+
isRestricted: json["isRestricted"] == null ? undefined : json["isRestricted"],
|
|
1952
|
+
isCloud: json["isCloud"] == null ? undefined : json["isCloud"],
|
|
1953
|
+
isRemote: json["isRemote"] == null ? undefined : json["isRemote"]
|
|
1954
|
+
};
|
|
1955
|
+
}
|
|
1956
|
+
function ProductDtoToJSON(json) {
|
|
1957
|
+
return ProductDtoToJSONTyped(json, false);
|
|
1958
|
+
}
|
|
1959
|
+
function ProductDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1960
|
+
if (value == null) {
|
|
1961
|
+
return value;
|
|
1962
|
+
}
|
|
1963
|
+
return {
|
|
1964
|
+
name: value["name"],
|
|
1965
|
+
label: value["label"],
|
|
1966
|
+
isRestricted: value["isRestricted"],
|
|
1967
|
+
isCloud: value["isCloud"],
|
|
1968
|
+
isRemote: value["isRemote"]
|
|
1969
|
+
};
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
// ../gov/aops-policy-sdk/generated/src/models/GlobalPolicyDto.ts
|
|
1973
|
+
function GlobalPolicyDtoFromJSON(json) {
|
|
1974
|
+
return GlobalPolicyDtoFromJSONTyped(json, false);
|
|
1975
|
+
}
|
|
1976
|
+
function GlobalPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
1977
|
+
if (json == null) {
|
|
1978
|
+
return json;
|
|
1979
|
+
}
|
|
1980
|
+
return {
|
|
1981
|
+
licenseType: json["licenseType"] == null ? undefined : json["licenseType"],
|
|
1982
|
+
identifier: json["identifier"] == null ? undefined : json["identifier"],
|
|
1983
|
+
policyNumber: json["policyNumber"] == null ? undefined : json["policyNumber"],
|
|
1984
|
+
product: json["product"] == null ? undefined : ProductDtoFromJSON(json["product"]),
|
|
1985
|
+
data: json["data"] == null ? undefined : json["data"]
|
|
1986
|
+
};
|
|
1987
|
+
}
|
|
1988
|
+
function GlobalPolicyDtoToJSON(json) {
|
|
1989
|
+
return GlobalPolicyDtoToJSONTyped(json, false);
|
|
1990
|
+
}
|
|
1991
|
+
function GlobalPolicyDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1992
|
+
if (value == null) {
|
|
1993
|
+
return value;
|
|
1994
|
+
}
|
|
1995
|
+
return {
|
|
1996
|
+
licenseType: value["licenseType"],
|
|
1997
|
+
identifier: value["identifier"],
|
|
1998
|
+
policyNumber: value["policyNumber"],
|
|
1999
|
+
product: ProductDtoToJSON(value["product"]),
|
|
2000
|
+
data: value["data"]
|
|
2001
|
+
};
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
// ../gov/aops-policy-sdk/generated/src/models/CreateGlobalPolicyWithFormDataRequest.ts
|
|
2005
|
+
function CreateGlobalPolicyWithFormDataRequestToJSON(json) {
|
|
2006
|
+
return CreateGlobalPolicyWithFormDataRequestToJSONTyped(json, false);
|
|
2007
|
+
}
|
|
2008
|
+
function CreateGlobalPolicyWithFormDataRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2009
|
+
if (value == null) {
|
|
2010
|
+
return value;
|
|
2011
|
+
}
|
|
2012
|
+
return {
|
|
2013
|
+
globalPolicy: GlobalPolicyDtoToJSON(value["globalPolicy"])
|
|
2014
|
+
};
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
// ../gov/aops-policy-sdk/generated/src/models/CreatePolicyRequest.ts
|
|
2018
|
+
function CreatePolicyRequestToJSON(json) {
|
|
2019
|
+
return CreatePolicyRequestToJSONTyped(json, false);
|
|
2020
|
+
}
|
|
2021
|
+
function CreatePolicyRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2022
|
+
if (value == null) {
|
|
2023
|
+
return value;
|
|
2024
|
+
}
|
|
2025
|
+
return {
|
|
2026
|
+
name: value["name"],
|
|
2027
|
+
description: value["description"],
|
|
2028
|
+
priority: value["priority"],
|
|
2029
|
+
availability: value["availability"],
|
|
2030
|
+
productName: value["productName"],
|
|
2031
|
+
data: value["data"]
|
|
2032
|
+
};
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
// ../gov/aops-policy-sdk/generated/src/models/FormDataDto.ts
|
|
2036
|
+
function FormDataDtoFromJSON(json) {
|
|
2037
|
+
return FormDataDtoFromJSONTyped(json, false);
|
|
2038
|
+
}
|
|
2039
|
+
function FormDataDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
2040
|
+
if (json == null) {
|
|
2041
|
+
return json;
|
|
2042
|
+
}
|
|
2043
|
+
return {
|
|
2044
|
+
policyIdentifier: json["policyIdentifier"] == null ? undefined : json["policyIdentifier"],
|
|
2045
|
+
data: json["data"] == null ? undefined : json["data"]
|
|
2046
|
+
};
|
|
2047
|
+
}
|
|
2048
|
+
function FormDataDtoToJSON(json) {
|
|
2049
|
+
return FormDataDtoToJSONTyped(json, false);
|
|
2050
|
+
}
|
|
2051
|
+
function FormDataDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2052
|
+
if (value == null) {
|
|
2053
|
+
return value;
|
|
2054
|
+
}
|
|
2055
|
+
return {
|
|
2056
|
+
policyIdentifier: value["policyIdentifier"],
|
|
2057
|
+
data: value["data"]
|
|
2058
|
+
};
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
// ../gov/aops-policy-sdk/generated/src/models/PolicyDto.ts
|
|
2062
|
+
function PolicyDtoFromJSON(json) {
|
|
2063
|
+
return PolicyDtoFromJSONTyped(json, false);
|
|
2064
|
+
}
|
|
2065
|
+
function PolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
2066
|
+
if (json == null) {
|
|
2067
|
+
return json;
|
|
2068
|
+
}
|
|
2069
|
+
return {
|
|
2070
|
+
name: json["name"] == null ? undefined : json["name"],
|
|
2071
|
+
identifier: json["identifier"] == null ? undefined : json["identifier"],
|
|
2072
|
+
description: json["description"] == null ? undefined : json["description"],
|
|
2073
|
+
priority: json["priority"] == null ? undefined : json["priority"],
|
|
2074
|
+
availability: json["availability"] == null ? undefined : json["availability"],
|
|
2075
|
+
product: json["product"] == null ? undefined : ProductDtoFromJSON(json["product"]),
|
|
2076
|
+
data: json["data"] == null ? undefined : FormDataDtoFromJSON(json["data"])
|
|
2077
|
+
};
|
|
2078
|
+
}
|
|
2079
|
+
function PolicyDtoToJSON(json) {
|
|
2080
|
+
return PolicyDtoToJSONTyped(json, false);
|
|
2081
|
+
}
|
|
2082
|
+
function PolicyDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2083
|
+
if (value == null) {
|
|
2084
|
+
return value;
|
|
2085
|
+
}
|
|
2086
|
+
return {
|
|
2087
|
+
name: value["name"],
|
|
2088
|
+
identifier: value["identifier"],
|
|
2089
|
+
description: value["description"],
|
|
2090
|
+
priority: value["priority"],
|
|
2091
|
+
availability: value["availability"],
|
|
2092
|
+
product: ProductDtoToJSON(value["product"]),
|
|
2093
|
+
data: FormDataDtoToJSON(value["data"])
|
|
2094
|
+
};
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
// ../gov/aops-policy-sdk/generated/src/models/CreatePolicyWithFormDataRequest.ts
|
|
2098
|
+
function CreatePolicyWithFormDataRequestToJSON(json) {
|
|
2099
|
+
return CreatePolicyWithFormDataRequestToJSONTyped(json, false);
|
|
2100
|
+
}
|
|
2101
|
+
function CreatePolicyWithFormDataRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2102
|
+
if (value == null) {
|
|
2103
|
+
return value;
|
|
2104
|
+
}
|
|
2105
|
+
return {
|
|
2106
|
+
policy: PolicyDtoToJSON(value["policy"]),
|
|
2107
|
+
policyFormData: FormDataDtoToJSON(value["policyFormData"])
|
|
2108
|
+
};
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
// ../gov/aops-policy-sdk/generated/src/models/DeployedPolicyDto.ts
|
|
2112
|
+
function DeployedPolicyDtoToJSON(json) {
|
|
2113
|
+
return DeployedPolicyDtoToJSONTyped(json, false);
|
|
2114
|
+
}
|
|
2115
|
+
function DeployedPolicyDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2116
|
+
if (value == null) {
|
|
2117
|
+
return value;
|
|
2118
|
+
}
|
|
2119
|
+
return {
|
|
2120
|
+
licenseType: value["licenseType"],
|
|
2121
|
+
productName: value["productName"],
|
|
2122
|
+
tenantIdentifier: value["tenantIdentifier"],
|
|
2123
|
+
userIdentifier: value["userIdentifier"]
|
|
2124
|
+
};
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
// ../gov/aops-policy-sdk/generated/src/models/DeployedPolicyWithoutUserDto.ts
|
|
2128
|
+
function DeployedPolicyWithoutUserDtoToJSON(json) {
|
|
2129
|
+
return DeployedPolicyWithoutUserDtoToJSONTyped(json, false);
|
|
2130
|
+
}
|
|
2131
|
+
function DeployedPolicyWithoutUserDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2132
|
+
if (value == null) {
|
|
2133
|
+
return value;
|
|
2134
|
+
}
|
|
2135
|
+
return {
|
|
2136
|
+
licenseType: value["licenseType"],
|
|
2137
|
+
productName: value["productName"],
|
|
2138
|
+
tenantIdentifier: value["tenantIdentifier"]
|
|
2139
|
+
};
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
// ../gov/aops-policy-sdk/generated/src/models/DeploymentLevel.ts
|
|
2143
|
+
function DeploymentLevelFromJSON(json) {
|
|
2144
|
+
return DeploymentLevelFromJSONTyped(json, false);
|
|
2145
|
+
}
|
|
2146
|
+
function DeploymentLevelFromJSONTyped(json, ignoreDiscriminator) {
|
|
2147
|
+
return json;
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
// ../gov/aops-policy-sdk/generated/src/models/TenantPolicyDto.ts
|
|
2151
|
+
function TenantPolicyDtoFromJSON(json) {
|
|
2152
|
+
return TenantPolicyDtoFromJSONTyped(json, false);
|
|
2153
|
+
}
|
|
2154
|
+
function TenantPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
2155
|
+
if (json == null) {
|
|
2156
|
+
return json;
|
|
2157
|
+
}
|
|
2158
|
+
return {
|
|
2159
|
+
tenantIdentifier: json["tenantIdentifier"] == null ? undefined : json["tenantIdentifier"],
|
|
2160
|
+
policyIdentifier: json["policyIdentifier"] == null ? undefined : json["policyIdentifier"],
|
|
2161
|
+
productIdentifier: json["productIdentifier"] == null ? undefined : json["productIdentifier"],
|
|
2162
|
+
licenseTypeIdentifier: json["licenseTypeIdentifier"] == null ? undefined : json["licenseTypeIdentifier"],
|
|
2163
|
+
tenantName: json["tenantName"] == null ? undefined : json["tenantName"]
|
|
2164
|
+
};
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
// ../gov/aops-policy-sdk/generated/src/models/GroupPolicyDto.ts
|
|
2168
|
+
function GroupPolicyDtoFromJSON(json) {
|
|
2169
|
+
return GroupPolicyDtoFromJSONTyped(json, false);
|
|
2170
|
+
}
|
|
2171
|
+
function GroupPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
2172
|
+
if (json == null) {
|
|
2173
|
+
return json;
|
|
2174
|
+
}
|
|
2175
|
+
return {
|
|
2176
|
+
policyIdentifier: json["policyIdentifier"] == null ? undefined : json["policyIdentifier"],
|
|
2177
|
+
productIdentifier: json["productIdentifier"] == null ? undefined : json["productIdentifier"],
|
|
2178
|
+
groupId: json["groupId"] == null ? undefined : json["groupId"],
|
|
2179
|
+
groupName: json["groupName"] == null ? undefined : json["groupName"]
|
|
2180
|
+
};
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
// ../gov/aops-policy-sdk/generated/src/models/UserPolicyDto.ts
|
|
2184
|
+
function UserPolicyDtoFromJSON(json) {
|
|
2185
|
+
return UserPolicyDtoFromJSONTyped(json, false);
|
|
2186
|
+
}
|
|
2187
|
+
function UserPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
2188
|
+
if (json == null) {
|
|
2189
|
+
return json;
|
|
2190
|
+
}
|
|
2191
|
+
return {
|
|
2192
|
+
policyIdentifier: json["policyIdentifier"] == null ? undefined : json["policyIdentifier"],
|
|
2193
|
+
productIdentifier: json["productIdentifier"] == null ? undefined : json["productIdentifier"],
|
|
2194
|
+
userId: json["userId"] == null ? undefined : json["userId"],
|
|
2195
|
+
userName: json["userName"] == null ? undefined : json["userName"]
|
|
2196
|
+
};
|
|
2197
|
+
}
|
|
2198
|
+
|
|
2199
|
+
// ../gov/aops-policy-sdk/generated/src/models/FederatedPolicyDto.ts
|
|
2200
|
+
function FederatedPolicyDtoFromJSON(json) {
|
|
2201
|
+
return FederatedPolicyDtoFromJSONTyped(json, false);
|
|
2202
|
+
}
|
|
2203
|
+
function FederatedPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
2204
|
+
if (json == null) {
|
|
2205
|
+
return json;
|
|
2206
|
+
}
|
|
2207
|
+
return {
|
|
2208
|
+
name: json["name"] == null ? undefined : json["name"],
|
|
2209
|
+
identifier: json["identifier"] == null ? undefined : json["identifier"],
|
|
2210
|
+
product: json["product"] == null ? undefined : ProductDtoFromJSON(json["product"]),
|
|
2211
|
+
description: json["description"] == null ? undefined : json["description"],
|
|
2212
|
+
priority: json["priority"] == null ? undefined : json["priority"],
|
|
2213
|
+
availability: json["availability"] == null ? undefined : json["availability"],
|
|
2214
|
+
tenantPolicies: json["tenantPolicies"] == null ? undefined : json["tenantPolicies"].map(TenantPolicyDtoFromJSON),
|
|
2215
|
+
userPolicies: json["userPolicies"] == null ? undefined : json["userPolicies"].map(UserPolicyDtoFromJSON),
|
|
2216
|
+
groupPolicies: json["groupPolicies"] == null ? undefined : json["groupPolicies"].map(GroupPolicyDtoFromJSON)
|
|
2217
|
+
};
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
// ../gov/aops-policy-sdk/generated/src/models/FederatedPolicyDtoPagedResult.ts
|
|
2221
|
+
function FederatedPolicyDtoPagedResultFromJSON(json) {
|
|
2222
|
+
return FederatedPolicyDtoPagedResultFromJSONTyped(json, false);
|
|
2223
|
+
}
|
|
2224
|
+
function FederatedPolicyDtoPagedResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
2225
|
+
if (json == null) {
|
|
2226
|
+
return json;
|
|
2227
|
+
}
|
|
2228
|
+
return {
|
|
2229
|
+
totalCount: json["totalCount"] == null ? undefined : json["totalCount"],
|
|
2230
|
+
result: json["result"] == null ? undefined : json["result"].map(FederatedPolicyDtoFromJSON)
|
|
2231
|
+
};
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
// ../gov/aops-policy-sdk/generated/src/models/ImportPolicyRequest.ts
|
|
2235
|
+
function ImportPolicyRequestFromJSON(json) {
|
|
2236
|
+
return ImportPolicyRequestFromJSONTyped(json, false);
|
|
2237
|
+
}
|
|
2238
|
+
function ImportPolicyRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
2239
|
+
if (json == null) {
|
|
2240
|
+
return json;
|
|
2241
|
+
}
|
|
2242
|
+
return {
|
|
2243
|
+
productName: json["product-name"] == null ? undefined : json["product-name"],
|
|
2244
|
+
policyName: json["policy-name"] == null ? undefined : json["policy-name"],
|
|
2245
|
+
version: json["version"] == null ? undefined : json["version"],
|
|
2246
|
+
data: json["data"] == null ? undefined : json["data"]
|
|
2247
|
+
};
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
// ../gov/aops-policy-sdk/generated/src/models/PolicyDtoPagedResult.ts
|
|
2251
|
+
function PolicyDtoPagedResultFromJSON(json) {
|
|
2252
|
+
return PolicyDtoPagedResultFromJSONTyped(json, false);
|
|
2253
|
+
}
|
|
2254
|
+
function PolicyDtoPagedResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
2255
|
+
if (json == null) {
|
|
2256
|
+
return json;
|
|
2257
|
+
}
|
|
2258
|
+
return {
|
|
2259
|
+
totalCount: json["totalCount"] == null ? undefined : json["totalCount"],
|
|
2260
|
+
result: json["result"] == null ? undefined : json["result"].map(PolicyDtoFromJSON)
|
|
2261
|
+
};
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
// ../gov/aops-policy-sdk/generated/src/models/PolicyExportResponse.ts
|
|
2265
|
+
function PolicyExportResponseFromJSON(json) {
|
|
2266
|
+
return PolicyExportResponseFromJSONTyped(json, false);
|
|
2267
|
+
}
|
|
2268
|
+
function PolicyExportResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
2269
|
+
if (json == null) {
|
|
2270
|
+
return json;
|
|
2271
|
+
}
|
|
2272
|
+
return {
|
|
2273
|
+
identifier: json["identifier"] == null ? undefined : json["identifier"],
|
|
2274
|
+
name: json["name"] == null ? undefined : json["name"],
|
|
2275
|
+
availability: json["availability"] == null ? undefined : json["availability"],
|
|
2276
|
+
data: json["data"] == null ? undefined : json["data"],
|
|
2277
|
+
priority: json["priority"] == null ? undefined : json["priority"],
|
|
2278
|
+
deploymentLevel: json["deploymentLevel"] == null ? undefined : DeploymentLevelFromJSON(json["deploymentLevel"])
|
|
2279
|
+
};
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
// ../gov/aops-policy-sdk/generated/src/models/PolicyInfoDto.ts
|
|
2283
|
+
function PolicyInfoDtoFromJSON(json) {
|
|
2284
|
+
return PolicyInfoDtoFromJSONTyped(json, false);
|
|
2285
|
+
}
|
|
2286
|
+
function PolicyInfoDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
2287
|
+
if (json == null) {
|
|
2288
|
+
return json;
|
|
2289
|
+
}
|
|
2290
|
+
return {
|
|
2291
|
+
name: json["name"] == null ? undefined : json["name"],
|
|
2292
|
+
identifier: json["identifier"] == null ? undefined : json["identifier"],
|
|
2293
|
+
product: json["product"] == null ? undefined : json["product"]
|
|
2294
|
+
};
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
// ../gov/aops-policy-sdk/generated/src/models/PolicyUsageData.ts
|
|
2298
|
+
function PolicyUsageDataFromJSON(json) {
|
|
2299
|
+
return PolicyUsageDataFromJSONTyped(json, false);
|
|
2300
|
+
}
|
|
2301
|
+
function PolicyUsageDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
2302
|
+
if (json == null) {
|
|
2303
|
+
return json;
|
|
2304
|
+
}
|
|
2305
|
+
return {
|
|
2306
|
+
tenants: json["tenants"] == null ? undefined : json["tenants"],
|
|
2307
|
+
users: json["users"] == null ? undefined : json["users"],
|
|
2308
|
+
groups: json["groups"] == null ? undefined : json["groups"]
|
|
2309
|
+
};
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
// ../gov/aops-policy-sdk/generated/src/models/UpdatePolicyRequest.ts
|
|
2313
|
+
function UpdatePolicyRequestToJSON(json) {
|
|
2314
|
+
return UpdatePolicyRequestToJSONTyped(json, false);
|
|
2315
|
+
}
|
|
2316
|
+
function UpdatePolicyRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2317
|
+
if (value == null) {
|
|
2318
|
+
return value;
|
|
2319
|
+
}
|
|
2320
|
+
return {
|
|
2321
|
+
name: value["name"],
|
|
2322
|
+
identifier: value["identifier"],
|
|
2323
|
+
description: value["description"],
|
|
2324
|
+
priority: value["priority"],
|
|
2325
|
+
availability: value["availability"],
|
|
2326
|
+
productName: value["productName"],
|
|
2327
|
+
data: value["data"]
|
|
2328
|
+
};
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
// ../gov/aops-policy-sdk/generated/src/apis/PolicyApi.ts
|
|
2332
|
+
class PolicyApi extends BaseAPI {
|
|
2333
|
+
async policyCreateDefaultPolicyForAllProductsRaw(initOverrides) {
|
|
2334
|
+
const queryParameters = {};
|
|
2335
|
+
const headerParameters = {};
|
|
2336
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2337
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2338
|
+
}
|
|
2339
|
+
let urlPath = `/api/Policy/default`;
|
|
2340
|
+
const response = await this.request({
|
|
2341
|
+
path: urlPath,
|
|
2342
|
+
method: "POST",
|
|
2343
|
+
headers: headerParameters,
|
|
2344
|
+
query: queryParameters
|
|
2345
|
+
}, initOverrides);
|
|
2346
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
2347
|
+
}
|
|
2348
|
+
async policyCreateDefaultPolicyForAllProducts(initOverrides) {
|
|
2349
|
+
const response = await this.policyCreateDefaultPolicyForAllProductsRaw(initOverrides);
|
|
2350
|
+
return await response.value();
|
|
2351
|
+
}
|
|
2352
|
+
async policyCreateFormDataRaw(requestParameters, initOverrides) {
|
|
2353
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
2354
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyCreateFormData().');
|
|
2355
|
+
}
|
|
2356
|
+
const queryParameters = {};
|
|
2357
|
+
const headerParameters = {};
|
|
2358
|
+
headerParameters["Content-Type"] = "application/json";
|
|
2359
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2360
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2361
|
+
}
|
|
2362
|
+
let urlPath = `/api/Policy/form-data/{policyIdentifier}`;
|
|
2363
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
2364
|
+
const response = await this.request({
|
|
2365
|
+
path: urlPath,
|
|
2366
|
+
method: "PUT",
|
|
2367
|
+
headers: headerParameters,
|
|
2368
|
+
query: queryParameters,
|
|
2369
|
+
body: requestParameters["body"]
|
|
2370
|
+
}, initOverrides);
|
|
2371
|
+
if (this.isJsonMime(response.headers.get("content-type"))) {
|
|
2372
|
+
return new JSONApiResponse(response);
|
|
2373
|
+
} else {
|
|
2374
|
+
return new TextApiResponse(response);
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
async policyCreateFormData(requestParameters, initOverrides) {
|
|
2378
|
+
const response = await this.policyCreateFormDataRaw(requestParameters, initOverrides);
|
|
2379
|
+
return await response.value();
|
|
2380
|
+
}
|
|
2381
|
+
async policyCreateGlobalPolicyRaw(requestParameters, initOverrides) {
|
|
2382
|
+
const queryParameters = {};
|
|
2383
|
+
const headerParameters = {};
|
|
2384
|
+
headerParameters["Content-Type"] = "application/json";
|
|
2385
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2386
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2387
|
+
}
|
|
2388
|
+
let urlPath = `/api/Policy/global`;
|
|
2389
|
+
const response = await this.request({
|
|
2390
|
+
path: urlPath,
|
|
2391
|
+
method: "POST",
|
|
2392
|
+
headers: headerParameters,
|
|
2393
|
+
query: queryParameters,
|
|
2394
|
+
body: CreateGlobalPolicyWithFormDataRequestToJSON(requestParameters["createGlobalPolicyWithFormDataRequest"])
|
|
2395
|
+
}, initOverrides);
|
|
2396
|
+
return new JSONApiResponse(response, (jsonValue) => GlobalPolicyDtoFromJSON(jsonValue));
|
|
2397
|
+
}
|
|
2398
|
+
async policyCreateGlobalPolicy(requestParameters = {}, initOverrides) {
|
|
2399
|
+
const response = await this.policyCreateGlobalPolicyRaw(requestParameters, initOverrides);
|
|
2400
|
+
return await response.value();
|
|
2401
|
+
}
|
|
2402
|
+
async policyCreatePolicyRaw(requestParameters, initOverrides) {
|
|
2403
|
+
const queryParameters = {};
|
|
2404
|
+
if (requestParameters["telemetryFlowId"] != null) {
|
|
2405
|
+
queryParameters["telemetryFlowId"] = requestParameters["telemetryFlowId"];
|
|
2406
|
+
}
|
|
2407
|
+
const headerParameters = {};
|
|
2408
|
+
headerParameters["Content-Type"] = "application/json";
|
|
2409
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2410
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2411
|
+
}
|
|
2412
|
+
let urlPath = `/api/Policy`;
|
|
2413
|
+
const response = await this.request({
|
|
2414
|
+
path: urlPath,
|
|
2415
|
+
method: "POST",
|
|
2416
|
+
headers: headerParameters,
|
|
2417
|
+
query: queryParameters,
|
|
2418
|
+
body: CreatePolicyWithFormDataRequestToJSON(requestParameters["createPolicyWithFormDataRequest"])
|
|
2419
|
+
}, initOverrides);
|
|
2420
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
2421
|
+
}
|
|
2422
|
+
async policyCreatePolicy(requestParameters = {}, initOverrides) {
|
|
2423
|
+
const response = await this.policyCreatePolicyRaw(requestParameters, initOverrides);
|
|
2424
|
+
return await response.value();
|
|
2425
|
+
}
|
|
2426
|
+
async policyCreatePolicyV2Raw(requestParameters, initOverrides) {
|
|
2427
|
+
const queryParameters = {};
|
|
2428
|
+
if (requestParameters["telemetryFlowId"] != null) {
|
|
2429
|
+
queryParameters["telemetryFlowId"] = requestParameters["telemetryFlowId"];
|
|
2430
|
+
}
|
|
2431
|
+
const headerParameters = {};
|
|
2432
|
+
headerParameters["Content-Type"] = "application/json";
|
|
2433
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2434
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2435
|
+
}
|
|
2436
|
+
let urlPath = `/api/Policy/v2/create`;
|
|
2437
|
+
const response = await this.request({
|
|
2438
|
+
path: urlPath,
|
|
2439
|
+
method: "POST",
|
|
2440
|
+
headers: headerParameters,
|
|
2441
|
+
query: queryParameters,
|
|
2442
|
+
body: CreatePolicyRequestToJSON(requestParameters["createPolicyRequest"])
|
|
2443
|
+
}, initOverrides);
|
|
2444
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
2445
|
+
}
|
|
2446
|
+
async policyCreatePolicyV2(requestParameters = {}, initOverrides) {
|
|
2447
|
+
const response = await this.policyCreatePolicyV2Raw(requestParameters, initOverrides);
|
|
2448
|
+
return await response.value();
|
|
2449
|
+
}
|
|
2450
|
+
async policyDeletePolicyRaw(requestParameters, initOverrides) {
|
|
2451
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
2452
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyDeletePolicy().');
|
|
2453
|
+
}
|
|
2454
|
+
const queryParameters = {};
|
|
2455
|
+
const headerParameters = {};
|
|
2456
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2457
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2458
|
+
}
|
|
2459
|
+
let urlPath = `/api/Policy/{policyIdentifier}`;
|
|
2460
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
2461
|
+
const response = await this.request({
|
|
2462
|
+
path: urlPath,
|
|
2463
|
+
method: "DELETE",
|
|
2464
|
+
headers: headerParameters,
|
|
2465
|
+
query: queryParameters
|
|
2466
|
+
}, initOverrides);
|
|
2467
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
2468
|
+
}
|
|
2469
|
+
async policyDeletePolicy(requestParameters, initOverrides) {
|
|
2470
|
+
const response = await this.policyDeletePolicyRaw(requestParameters, initOverrides);
|
|
2471
|
+
return await response.value();
|
|
2472
|
+
}
|
|
2473
|
+
async policyDeletePolicyByProductNameAndPolicyNameRaw(requestParameters, initOverrides) {
|
|
2474
|
+
if (requestParameters["productName"] == null) {
|
|
2475
|
+
throw new RequiredError("productName", 'Required parameter "productName" was null or undefined when calling policyDeletePolicyByProductNameAndPolicyName().');
|
|
2476
|
+
}
|
|
2477
|
+
if (requestParameters["policyName"] == null) {
|
|
2478
|
+
throw new RequiredError("policyName", 'Required parameter "policyName" was null or undefined when calling policyDeletePolicyByProductNameAndPolicyName().');
|
|
2479
|
+
}
|
|
2480
|
+
const queryParameters = {};
|
|
2481
|
+
const headerParameters = {};
|
|
2482
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2483
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2484
|
+
}
|
|
2485
|
+
let urlPath = `/api/Policy/product/{productName}/policy/{policyName}`;
|
|
2486
|
+
urlPath = urlPath.replace(`{${"productName"}}`, encodeURIComponent(String(requestParameters["productName"])));
|
|
2487
|
+
urlPath = urlPath.replace(`{${"policyName"}}`, encodeURIComponent(String(requestParameters["policyName"])));
|
|
2488
|
+
const response = await this.request({
|
|
2489
|
+
path: urlPath,
|
|
2490
|
+
method: "DELETE",
|
|
2491
|
+
headers: headerParameters,
|
|
2492
|
+
query: queryParameters
|
|
2493
|
+
}, initOverrides);
|
|
2494
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
2495
|
+
}
|
|
2496
|
+
async policyDeletePolicyByProductNameAndPolicyName(requestParameters, initOverrides) {
|
|
2497
|
+
const response = await this.policyDeletePolicyByProductNameAndPolicyNameRaw(requestParameters, initOverrides);
|
|
2498
|
+
return await response.value();
|
|
2499
|
+
}
|
|
2500
|
+
async policyDownloadPolicyByIdentifierRaw(requestParameters, initOverrides) {
|
|
2501
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
2502
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyDownloadPolicyByIdentifier().');
|
|
2503
|
+
}
|
|
2504
|
+
const queryParameters = {};
|
|
2505
|
+
const headerParameters = {};
|
|
2506
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2507
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2508
|
+
}
|
|
2509
|
+
let urlPath = `/api/Policy/{policyIdentifier}/download`;
|
|
2510
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
2511
|
+
const response = await this.request({
|
|
2512
|
+
path: urlPath,
|
|
2513
|
+
method: "GET",
|
|
2514
|
+
headers: headerParameters,
|
|
2515
|
+
query: queryParameters
|
|
2516
|
+
}, initOverrides);
|
|
2517
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyUsageDataFromJSON(jsonValue));
|
|
2518
|
+
}
|
|
2519
|
+
async policyDownloadPolicyByIdentifier(requestParameters, initOverrides) {
|
|
2520
|
+
const response = await this.policyDownloadPolicyByIdentifierRaw(requestParameters, initOverrides);
|
|
2521
|
+
return await response.value();
|
|
2522
|
+
}
|
|
2523
|
+
async policyGetAllPoliciesRaw(initOverrides) {
|
|
2524
|
+
const queryParameters = {};
|
|
2525
|
+
const headerParameters = {};
|
|
2526
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2527
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2528
|
+
}
|
|
2529
|
+
let urlPath = `/api/Policy`;
|
|
2530
|
+
const response = await this.request({
|
|
2531
|
+
path: urlPath,
|
|
2532
|
+
method: "GET",
|
|
2533
|
+
headers: headerParameters,
|
|
2534
|
+
query: queryParameters
|
|
2535
|
+
}, initOverrides);
|
|
2536
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(PolicyDtoFromJSON));
|
|
2537
|
+
}
|
|
2538
|
+
async policyGetAllPolicies(initOverrides) {
|
|
2539
|
+
const response = await this.policyGetAllPoliciesRaw(initOverrides);
|
|
2540
|
+
return await response.value();
|
|
2541
|
+
}
|
|
2542
|
+
async policyGetAllPoliciesByProductIdRaw(requestParameters, initOverrides) {
|
|
2543
|
+
if (requestParameters["productIdentifier"] == null) {
|
|
2544
|
+
throw new RequiredError("productIdentifier", 'Required parameter "productIdentifier" was null or undefined when calling policyGetAllPoliciesByProductId().');
|
|
2545
|
+
}
|
|
2546
|
+
const queryParameters = {};
|
|
2547
|
+
const headerParameters = {};
|
|
2548
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2549
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2550
|
+
}
|
|
2551
|
+
let urlPath = `/api/Policy/{productIdentifier}`;
|
|
2552
|
+
urlPath = urlPath.replace(`{${"productIdentifier"}}`, encodeURIComponent(String(requestParameters["productIdentifier"])));
|
|
2553
|
+
const response = await this.request({
|
|
2554
|
+
path: urlPath,
|
|
2555
|
+
method: "GET",
|
|
2556
|
+
headers: headerParameters,
|
|
2557
|
+
query: queryParameters
|
|
2558
|
+
}, initOverrides);
|
|
2559
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(PolicyDtoFromJSON));
|
|
2560
|
+
}
|
|
2561
|
+
async policyGetAllPoliciesByProductId(requestParameters, initOverrides) {
|
|
2562
|
+
const response = await this.policyGetAllPoliciesByProductIdRaw(requestParameters, initOverrides);
|
|
2563
|
+
return await response.value();
|
|
2564
|
+
}
|
|
2565
|
+
async policyGetAllPoliciesByQueryOptionsRaw(requestParameters, initOverrides) {
|
|
2566
|
+
const queryParameters = {};
|
|
2567
|
+
if (requestParameters["productLabel"] != null) {
|
|
2568
|
+
queryParameters["productLabel"] = requestParameters["productLabel"];
|
|
2569
|
+
}
|
|
2570
|
+
if (requestParameters["productName"] != null) {
|
|
2571
|
+
queryParameters["productName"] = requestParameters["productName"];
|
|
2572
|
+
}
|
|
2573
|
+
if (requestParameters["productNames"] != null) {
|
|
2574
|
+
queryParameters["productNames"] = requestParameters["productNames"];
|
|
2575
|
+
}
|
|
2576
|
+
if (requestParameters["sortBy"] != null) {
|
|
2577
|
+
queryParameters["sortBy"] = requestParameters["sortBy"];
|
|
2578
|
+
}
|
|
2579
|
+
if (requestParameters["sortOrder"] != null) {
|
|
2580
|
+
queryParameters["sortOrder"] = requestParameters["sortOrder"];
|
|
2581
|
+
}
|
|
2582
|
+
if (requestParameters["pageIndex"] != null) {
|
|
2583
|
+
queryParameters["pageIndex"] = requestParameters["pageIndex"];
|
|
2584
|
+
}
|
|
2585
|
+
if (requestParameters["pageSize"] != null) {
|
|
2586
|
+
queryParameters["pageSize"] = requestParameters["pageSize"];
|
|
2587
|
+
}
|
|
2588
|
+
if (requestParameters["searchTerm"] != null) {
|
|
2589
|
+
queryParameters["searchTerm"] = requestParameters["searchTerm"];
|
|
2590
|
+
}
|
|
2591
|
+
const headerParameters = {};
|
|
2592
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2593
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2594
|
+
}
|
|
2595
|
+
let urlPath = `/api/Policy/paged`;
|
|
2596
|
+
const response = await this.request({
|
|
2597
|
+
path: urlPath,
|
|
2598
|
+
method: "GET",
|
|
2599
|
+
headers: headerParameters,
|
|
2600
|
+
query: queryParameters
|
|
2601
|
+
}, initOverrides);
|
|
2602
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoPagedResultFromJSON(jsonValue));
|
|
2603
|
+
}
|
|
2604
|
+
async policyGetAllPoliciesByQueryOptions(requestParameters = {}, initOverrides) {
|
|
2605
|
+
const response = await this.policyGetAllPoliciesByQueryOptionsRaw(requestParameters, initOverrides);
|
|
2606
|
+
return await response.value();
|
|
2607
|
+
}
|
|
2608
|
+
async policyGetAllRulesForProductRaw(requestParameters, initOverrides) {
|
|
2609
|
+
if (requestParameters["licenseType"] == null) {
|
|
2610
|
+
throw new RequiredError("licenseType", 'Required parameter "licenseType" was null or undefined when calling policyGetAllRulesForProduct().');
|
|
2611
|
+
}
|
|
2612
|
+
if (requestParameters["productName"] == null) {
|
|
2613
|
+
throw new RequiredError("productName", 'Required parameter "productName" was null or undefined when calling policyGetAllRulesForProduct().');
|
|
2614
|
+
}
|
|
2615
|
+
if (requestParameters["tenantIdentifier"] == null) {
|
|
2616
|
+
throw new RequiredError("tenantIdentifier", 'Required parameter "tenantIdentifier" was null or undefined when calling policyGetAllRulesForProduct().');
|
|
2617
|
+
}
|
|
2618
|
+
const queryParameters = {};
|
|
2619
|
+
const headerParameters = {};
|
|
2620
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2621
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2622
|
+
}
|
|
2623
|
+
let urlPath = `/api/Policy/all/license/{licenseType}/product/{productName}/tenant/{tenantIdentifier}`;
|
|
2624
|
+
urlPath = urlPath.replace(`{${"licenseType"}}`, encodeURIComponent(String(requestParameters["licenseType"])));
|
|
2625
|
+
urlPath = urlPath.replace(`{${"productName"}}`, encodeURIComponent(String(requestParameters["productName"])));
|
|
2626
|
+
urlPath = urlPath.replace(`{${"tenantIdentifier"}}`, encodeURIComponent(String(requestParameters["tenantIdentifier"])));
|
|
2627
|
+
const response = await this.request({
|
|
2628
|
+
path: urlPath,
|
|
2629
|
+
method: "GET",
|
|
2630
|
+
headers: headerParameters,
|
|
2631
|
+
query: queryParameters
|
|
2632
|
+
}, initOverrides);
|
|
2633
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(PolicyExportResponseFromJSON));
|
|
2634
|
+
}
|
|
2635
|
+
async policyGetAllRulesForProduct(requestParameters, initOverrides) {
|
|
2636
|
+
const response = await this.policyGetAllRulesForProductRaw(requestParameters, initOverrides);
|
|
2637
|
+
return await response.value();
|
|
2638
|
+
}
|
|
2639
|
+
async policyGetDeployedPolicyRaw(requestParameters, initOverrides) {
|
|
2640
|
+
const queryParameters = {};
|
|
2641
|
+
const headerParameters = {};
|
|
2642
|
+
headerParameters["Content-Type"] = "application/json";
|
|
2643
|
+
if (requestParameters["xUiPathClientVersion"] != null) {
|
|
2644
|
+
headerParameters["x-UiPath-ClientVersion"] = String(requestParameters["xUiPathClientVersion"]);
|
|
2645
|
+
}
|
|
2646
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2647
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2648
|
+
}
|
|
2649
|
+
let urlPath = `/api/Policy/deployed-policy`;
|
|
2650
|
+
const response = await this.request({
|
|
2651
|
+
path: urlPath,
|
|
2652
|
+
method: "POST",
|
|
2653
|
+
headers: headerParameters,
|
|
2654
|
+
query: queryParameters,
|
|
2655
|
+
body: DeployedPolicyDtoToJSON(requestParameters["deployedPolicyDto"])
|
|
2656
|
+
}, initOverrides);
|
|
2657
|
+
return new VoidApiResponse(response);
|
|
2658
|
+
}
|
|
2659
|
+
async policyGetDeployedPolicy(requestParameters = {}, initOverrides) {
|
|
2660
|
+
await this.policyGetDeployedPolicyRaw(requestParameters, initOverrides);
|
|
2661
|
+
}
|
|
2662
|
+
async policyGetDeployedTenantPoliciesRaw(requestParameters, initOverrides) {
|
|
2663
|
+
const queryParameters = {};
|
|
2664
|
+
const headerParameters = {};
|
|
2665
|
+
headerParameters["Content-Type"] = "application/json";
|
|
2666
|
+
if (requestParameters["xUiPathClientVersion"] != null) {
|
|
2667
|
+
headerParameters["x-UiPath-ClientVersion"] = String(requestParameters["xUiPathClientVersion"]);
|
|
2668
|
+
}
|
|
2669
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2670
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2671
|
+
}
|
|
2672
|
+
let urlPath = `/api/Policy/deployed-policy/tenant`;
|
|
2673
|
+
const response = await this.request({
|
|
2674
|
+
path: urlPath,
|
|
2675
|
+
method: "POST",
|
|
2676
|
+
headers: headerParameters,
|
|
2677
|
+
query: queryParameters,
|
|
2678
|
+
body: DeployedPolicyWithoutUserDtoToJSON(requestParameters["deployedPolicyWithoutUserDto"])
|
|
2679
|
+
}, initOverrides);
|
|
2680
|
+
return new VoidApiResponse(response);
|
|
2681
|
+
}
|
|
2682
|
+
async policyGetDeployedTenantPolicies(requestParameters = {}, initOverrides) {
|
|
2683
|
+
await this.policyGetDeployedTenantPoliciesRaw(requestParameters, initOverrides);
|
|
2684
|
+
}
|
|
2685
|
+
async policyGetFederatedPoliciesByQueryOptionsRaw(requestParameters, initOverrides) {
|
|
2686
|
+
const queryParameters = {};
|
|
2687
|
+
if (requestParameters["productLabel"] != null) {
|
|
2688
|
+
queryParameters["productLabel"] = requestParameters["productLabel"];
|
|
2689
|
+
}
|
|
2690
|
+
if (requestParameters["productName"] != null) {
|
|
2691
|
+
queryParameters["productName"] = requestParameters["productName"];
|
|
2692
|
+
}
|
|
2693
|
+
if (requestParameters["productNames"] != null) {
|
|
2694
|
+
queryParameters["productNames"] = requestParameters["productNames"];
|
|
2695
|
+
}
|
|
2696
|
+
if (requestParameters["sortBy"] != null) {
|
|
2697
|
+
queryParameters["sortBy"] = requestParameters["sortBy"];
|
|
2698
|
+
}
|
|
2699
|
+
if (requestParameters["sortOrder"] != null) {
|
|
2700
|
+
queryParameters["sortOrder"] = requestParameters["sortOrder"];
|
|
2701
|
+
}
|
|
2702
|
+
if (requestParameters["pageIndex"] != null) {
|
|
2703
|
+
queryParameters["pageIndex"] = requestParameters["pageIndex"];
|
|
2704
|
+
}
|
|
2705
|
+
if (requestParameters["pageSize"] != null) {
|
|
2706
|
+
queryParameters["pageSize"] = requestParameters["pageSize"];
|
|
2707
|
+
}
|
|
2708
|
+
if (requestParameters["searchTerm"] != null) {
|
|
2709
|
+
queryParameters["searchTerm"] = requestParameters["searchTerm"];
|
|
2710
|
+
}
|
|
2711
|
+
const headerParameters = {};
|
|
2712
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2713
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2714
|
+
}
|
|
2715
|
+
let urlPath = `/api/Policy/federated/paged`;
|
|
2716
|
+
const response = await this.request({
|
|
2717
|
+
path: urlPath,
|
|
2718
|
+
method: "GET",
|
|
2719
|
+
headers: headerParameters,
|
|
2720
|
+
query: queryParameters
|
|
2721
|
+
}, initOverrides);
|
|
2722
|
+
return new JSONApiResponse(response, (jsonValue) => FederatedPolicyDtoPagedResultFromJSON(jsonValue));
|
|
2723
|
+
}
|
|
2724
|
+
async policyGetFederatedPoliciesByQueryOptions(requestParameters = {}, initOverrides) {
|
|
2725
|
+
const response = await this.policyGetFederatedPoliciesByQueryOptionsRaw(requestParameters, initOverrides);
|
|
2726
|
+
return await response.value();
|
|
2727
|
+
}
|
|
2728
|
+
async policyGetFormDataByPolicyIdRaw(requestParameters, initOverrides) {
|
|
2729
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
2730
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyGetFormDataByPolicyId().');
|
|
2731
|
+
}
|
|
2732
|
+
const queryParameters = {};
|
|
2733
|
+
const headerParameters = {};
|
|
2734
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2735
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2736
|
+
}
|
|
2737
|
+
let urlPath = `/api/Policy/form-data/{policyIdentifier}`;
|
|
2738
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
2739
|
+
const response = await this.request({
|
|
2740
|
+
path: urlPath,
|
|
2741
|
+
method: "GET",
|
|
2742
|
+
headers: headerParameters,
|
|
2743
|
+
query: queryParameters
|
|
2744
|
+
}, initOverrides);
|
|
2745
|
+
if (this.isJsonMime(response.headers.get("content-type"))) {
|
|
2746
|
+
return new JSONApiResponse(response);
|
|
2747
|
+
} else {
|
|
2748
|
+
return new TextApiResponse(response);
|
|
2749
|
+
}
|
|
2750
|
+
}
|
|
2751
|
+
async policyGetFormDataByPolicyId(requestParameters, initOverrides) {
|
|
2752
|
+
const response = await this.policyGetFormDataByPolicyIdRaw(requestParameters, initOverrides);
|
|
2753
|
+
return await response.value();
|
|
2754
|
+
}
|
|
2755
|
+
async policyGetGlobalPolicyByLicenseTypeAndProductNameRaw(requestParameters, initOverrides) {
|
|
2756
|
+
if (requestParameters["licenseType"] == null) {
|
|
2757
|
+
throw new RequiredError("licenseType", 'Required parameter "licenseType" was null or undefined when calling policyGetGlobalPolicyByLicenseTypeAndProductName().');
|
|
2758
|
+
}
|
|
2759
|
+
if (requestParameters["productIdentifier"] == null) {
|
|
2760
|
+
throw new RequiredError("productIdentifier", 'Required parameter "productIdentifier" was null or undefined when calling policyGetGlobalPolicyByLicenseTypeAndProductName().');
|
|
2761
|
+
}
|
|
2762
|
+
const queryParameters = {};
|
|
2763
|
+
const headerParameters = {};
|
|
2764
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2765
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2766
|
+
}
|
|
2767
|
+
let urlPath = `/api/Policy/global/license/{licenseType}/product/{productIdentifier}`;
|
|
2768
|
+
urlPath = urlPath.replace(`{${"licenseType"}}`, encodeURIComponent(String(requestParameters["licenseType"])));
|
|
2769
|
+
urlPath = urlPath.replace(`{${"productIdentifier"}}`, encodeURIComponent(String(requestParameters["productIdentifier"])));
|
|
2770
|
+
const response = await this.request({
|
|
2771
|
+
path: urlPath,
|
|
2772
|
+
method: "GET",
|
|
2773
|
+
headers: headerParameters,
|
|
2774
|
+
query: queryParameters
|
|
2775
|
+
}, initOverrides);
|
|
2776
|
+
return new JSONApiResponse(response, (jsonValue) => GlobalPolicyDtoFromJSON(jsonValue));
|
|
2777
|
+
}
|
|
2778
|
+
async policyGetGlobalPolicyByLicenseTypeAndProductName(requestParameters, initOverrides) {
|
|
2779
|
+
const response = await this.policyGetGlobalPolicyByLicenseTypeAndProductNameRaw(requestParameters, initOverrides);
|
|
2780
|
+
return await response.value();
|
|
2781
|
+
}
|
|
2782
|
+
async policyGetGroupPoliciesForAllProductsRaw(requestParameters, initOverrides) {
|
|
2783
|
+
if (requestParameters["identifier"] == null) {
|
|
2784
|
+
throw new RequiredError("identifier", 'Required parameter "identifier" was null or undefined when calling policyGetGroupPoliciesForAllProducts().');
|
|
2785
|
+
}
|
|
2786
|
+
const queryParameters = {};
|
|
2787
|
+
const headerParameters = {};
|
|
2788
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2789
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2790
|
+
}
|
|
2791
|
+
let urlPath = `/api/Policy/group/{identifier}`;
|
|
2792
|
+
urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters["identifier"])));
|
|
2793
|
+
const response = await this.request({
|
|
2794
|
+
path: urlPath,
|
|
2795
|
+
method: "GET",
|
|
2796
|
+
headers: headerParameters,
|
|
2797
|
+
query: queryParameters
|
|
2798
|
+
}, initOverrides);
|
|
2799
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(GroupPolicyDtoFromJSON));
|
|
2800
|
+
}
|
|
2801
|
+
async policyGetGroupPoliciesForAllProducts(requestParameters, initOverrides) {
|
|
2802
|
+
const response = await this.policyGetGroupPoliciesForAllProductsRaw(requestParameters, initOverrides);
|
|
2803
|
+
return await response.value();
|
|
2804
|
+
}
|
|
2805
|
+
async policyGetPoliciesByProductIdentifiersRaw(requestParameters, initOverrides) {
|
|
2806
|
+
const queryParameters = {};
|
|
2807
|
+
if (requestParameters["ids"] != null) {
|
|
2808
|
+
queryParameters["ids"] = requestParameters["ids"];
|
|
2809
|
+
}
|
|
2810
|
+
const headerParameters = {};
|
|
2811
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2812
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2813
|
+
}
|
|
2814
|
+
let urlPath = `/api/Policy/filter/products`;
|
|
2815
|
+
const response = await this.request({
|
|
2816
|
+
path: urlPath,
|
|
2817
|
+
method: "GET",
|
|
2818
|
+
headers: headerParameters,
|
|
2819
|
+
query: queryParameters
|
|
2820
|
+
}, initOverrides);
|
|
2821
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(PolicyInfoDtoFromJSON));
|
|
2822
|
+
}
|
|
2823
|
+
async policyGetPoliciesByProductIdentifiers(requestParameters = {}, initOverrides) {
|
|
2824
|
+
const response = await this.policyGetPoliciesByProductIdentifiersRaw(requestParameters, initOverrides);
|
|
2825
|
+
return await response.value();
|
|
2826
|
+
}
|
|
2827
|
+
async policyGetPolicyByIdRaw(requestParameters, initOverrides) {
|
|
2828
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
2829
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyGetPolicyById().');
|
|
2830
|
+
}
|
|
2831
|
+
const queryParameters = {};
|
|
2832
|
+
const headerParameters = {};
|
|
2833
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2834
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2835
|
+
}
|
|
2836
|
+
let urlPath = `/api/Policy/id/{policyIdentifier}`;
|
|
2837
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
2838
|
+
const response = await this.request({
|
|
2839
|
+
path: urlPath,
|
|
2840
|
+
method: "GET",
|
|
2841
|
+
headers: headerParameters,
|
|
2842
|
+
query: queryParameters
|
|
2843
|
+
}, initOverrides);
|
|
2844
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
2845
|
+
}
|
|
2846
|
+
async policyGetPolicyById(requestParameters, initOverrides) {
|
|
2847
|
+
const response = await this.policyGetPolicyByIdRaw(requestParameters, initOverrides);
|
|
2848
|
+
return await response.value();
|
|
2849
|
+
}
|
|
2850
|
+
async policyGetPolicyByNameAndProductIdentifierRaw(requestParameters, initOverrides) {
|
|
2851
|
+
if (requestParameters["policyName"] == null) {
|
|
2852
|
+
throw new RequiredError("policyName", 'Required parameter "policyName" was null or undefined when calling policyGetPolicyByNameAndProductIdentifier().');
|
|
2853
|
+
}
|
|
2854
|
+
if (requestParameters["productIdentifier"] == null) {
|
|
2855
|
+
throw new RequiredError("productIdentifier", 'Required parameter "productIdentifier" was null or undefined when calling policyGetPolicyByNameAndProductIdentifier().');
|
|
2856
|
+
}
|
|
2857
|
+
const queryParameters = {};
|
|
2858
|
+
const headerParameters = {};
|
|
2859
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2860
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2861
|
+
}
|
|
2862
|
+
let urlPath = `/api/Policy/{policyName}/product/{productIdentifier}`;
|
|
2863
|
+
urlPath = urlPath.replace(`{${"policyName"}}`, encodeURIComponent(String(requestParameters["policyName"])));
|
|
2864
|
+
urlPath = urlPath.replace(`{${"productIdentifier"}}`, encodeURIComponent(String(requestParameters["productIdentifier"])));
|
|
2865
|
+
const response = await this.request({
|
|
2866
|
+
path: urlPath,
|
|
2867
|
+
method: "GET",
|
|
2868
|
+
headers: headerParameters,
|
|
2869
|
+
query: queryParameters
|
|
2870
|
+
}, initOverrides);
|
|
2871
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyUsageDataFromJSON(jsonValue));
|
|
2872
|
+
}
|
|
2873
|
+
async policyGetPolicyByNameAndProductIdentifier(requestParameters, initOverrides) {
|
|
2874
|
+
const response = await this.policyGetPolicyByNameAndProductIdentifierRaw(requestParameters, initOverrides);
|
|
2875
|
+
return await response.value();
|
|
2876
|
+
}
|
|
2877
|
+
async policyGetPolicyDataByIdentifierRaw(requestParameters, initOverrides) {
|
|
2878
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
2879
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyGetPolicyDataByIdentifier().');
|
|
2880
|
+
}
|
|
2881
|
+
const queryParameters = {};
|
|
2882
|
+
const headerParameters = {};
|
|
2883
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2884
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2885
|
+
}
|
|
2886
|
+
let urlPath = `/api/Policy/data/{policyIdentifier}`;
|
|
2887
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
2888
|
+
const response = await this.request({
|
|
2889
|
+
path: urlPath,
|
|
2890
|
+
method: "GET",
|
|
2891
|
+
headers: headerParameters,
|
|
2892
|
+
query: queryParameters
|
|
2893
|
+
}, initOverrides);
|
|
2894
|
+
return new JSONApiResponse(response, (jsonValue) => ImportPolicyRequestFromJSON(jsonValue));
|
|
2895
|
+
}
|
|
2896
|
+
async policyGetPolicyDataByIdentifier(requestParameters, initOverrides) {
|
|
2897
|
+
const response = await this.policyGetPolicyDataByIdentifierRaw(requestParameters, initOverrides);
|
|
2898
|
+
return await response.value();
|
|
2899
|
+
}
|
|
2900
|
+
async policyGetPolicyUsageDataRaw(requestParameters, initOverrides) {
|
|
2901
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
2902
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyGetPolicyUsageData().');
|
|
2903
|
+
}
|
|
2904
|
+
const queryParameters = {};
|
|
2905
|
+
const headerParameters = {};
|
|
2906
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2907
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2908
|
+
}
|
|
2909
|
+
let urlPath = `/api/Policy/usage/{policyIdentifier}`;
|
|
2910
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
2911
|
+
const response = await this.request({
|
|
2912
|
+
path: urlPath,
|
|
2913
|
+
method: "GET",
|
|
2914
|
+
headers: headerParameters,
|
|
2915
|
+
query: queryParameters
|
|
2916
|
+
}, initOverrides);
|
|
2917
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyUsageDataFromJSON(jsonValue));
|
|
2918
|
+
}
|
|
2919
|
+
async policyGetPolicyUsageData(requestParameters, initOverrides) {
|
|
2920
|
+
const response = await this.policyGetPolicyUsageDataRaw(requestParameters, initOverrides);
|
|
2921
|
+
return await response.value();
|
|
2922
|
+
}
|
|
2923
|
+
async policyGetRulesForProductRaw(requestParameters, initOverrides) {
|
|
2924
|
+
if (requestParameters["licenseType"] == null) {
|
|
2925
|
+
throw new RequiredError("licenseType", 'Required parameter "licenseType" was null or undefined when calling policyGetRulesForProduct().');
|
|
2926
|
+
}
|
|
2927
|
+
if (requestParameters["productName"] == null) {
|
|
2928
|
+
throw new RequiredError("productName", 'Required parameter "productName" was null or undefined when calling policyGetRulesForProduct().');
|
|
2929
|
+
}
|
|
2930
|
+
if (requestParameters["tenantIdentifier"] == null) {
|
|
2931
|
+
throw new RequiredError("tenantIdentifier", 'Required parameter "tenantIdentifier" was null or undefined when calling policyGetRulesForProduct().');
|
|
2932
|
+
}
|
|
2933
|
+
const queryParameters = {};
|
|
2934
|
+
const headerParameters = {};
|
|
2935
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2936
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2937
|
+
}
|
|
2938
|
+
let urlPath = `/api/Policy/license/{licenseType}/product/{productName}/tenant/{tenantIdentifier}`;
|
|
2939
|
+
urlPath = urlPath.replace(`{${"licenseType"}}`, encodeURIComponent(String(requestParameters["licenseType"])));
|
|
2940
|
+
urlPath = urlPath.replace(`{${"productName"}}`, encodeURIComponent(String(requestParameters["productName"])));
|
|
2941
|
+
urlPath = urlPath.replace(`{${"tenantIdentifier"}}`, encodeURIComponent(String(requestParameters["tenantIdentifier"])));
|
|
2942
|
+
const response = await this.request({
|
|
2943
|
+
path: urlPath,
|
|
2944
|
+
method: "GET",
|
|
2945
|
+
headers: headerParameters,
|
|
2946
|
+
query: queryParameters
|
|
2947
|
+
}, initOverrides);
|
|
2948
|
+
return new VoidApiResponse(response);
|
|
2949
|
+
}
|
|
2950
|
+
async policyGetRulesForProduct(requestParameters, initOverrides) {
|
|
2951
|
+
await this.policyGetRulesForProductRaw(requestParameters, initOverrides);
|
|
2952
|
+
}
|
|
2953
|
+
async policyGetUserInheritanceGroupPoliciesForAllProductsRaw(requestParameters, initOverrides) {
|
|
2954
|
+
if (requestParameters["identifier"] == null) {
|
|
2955
|
+
throw new RequiredError("identifier", 'Required parameter "identifier" was null or undefined when calling policyGetUserInheritanceGroupPoliciesForAllProducts().');
|
|
2956
|
+
}
|
|
2957
|
+
const queryParameters = {};
|
|
2958
|
+
const headerParameters = {};
|
|
2959
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2960
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2961
|
+
}
|
|
2962
|
+
let urlPath = `/api/Policy/user/group/{identifier}`;
|
|
2963
|
+
urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters["identifier"])));
|
|
2964
|
+
const response = await this.request({
|
|
2965
|
+
path: urlPath,
|
|
2966
|
+
method: "GET",
|
|
2967
|
+
headers: headerParameters,
|
|
2968
|
+
query: queryParameters
|
|
2969
|
+
}, initOverrides);
|
|
2970
|
+
return new VoidApiResponse(response);
|
|
2971
|
+
}
|
|
2972
|
+
async policyGetUserInheritanceGroupPoliciesForAllProducts(requestParameters, initOverrides) {
|
|
2973
|
+
await this.policyGetUserInheritanceGroupPoliciesForAllProductsRaw(requestParameters, initOverrides);
|
|
2974
|
+
}
|
|
2975
|
+
async policyGetUserPoliciesForAllProductsRaw(requestParameters, initOverrides) {
|
|
2976
|
+
if (requestParameters["identifier"] == null) {
|
|
2977
|
+
throw new RequiredError("identifier", 'Required parameter "identifier" was null or undefined when calling policyGetUserPoliciesForAllProducts().');
|
|
2978
|
+
}
|
|
2979
|
+
const queryParameters = {};
|
|
2980
|
+
const headerParameters = {};
|
|
2981
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
2982
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
2983
|
+
}
|
|
2984
|
+
let urlPath = `/api/Policy/user/{identifier}`;
|
|
2985
|
+
urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters["identifier"])));
|
|
2986
|
+
const response = await this.request({
|
|
2987
|
+
path: urlPath,
|
|
2988
|
+
method: "GET",
|
|
2989
|
+
headers: headerParameters,
|
|
2990
|
+
query: queryParameters
|
|
2991
|
+
}, initOverrides);
|
|
2992
|
+
return new VoidApiResponse(response);
|
|
2993
|
+
}
|
|
2994
|
+
async policyGetUserPoliciesForAllProducts(requestParameters, initOverrides) {
|
|
2995
|
+
await this.policyGetUserPoliciesForAllProductsRaw(requestParameters, initOverrides);
|
|
2996
|
+
}
|
|
2997
|
+
async policyGetUserPoliciesForAllProductsAndAllGroupsRaw(requestParameters, initOverrides) {
|
|
2998
|
+
if (requestParameters["identifier"] == null) {
|
|
2999
|
+
throw new RequiredError("identifier", 'Required parameter "identifier" was null or undefined when calling policyGetUserPoliciesForAllProductsAndAllGroups().');
|
|
3000
|
+
}
|
|
3001
|
+
const queryParameters = {};
|
|
3002
|
+
const headerParameters = {};
|
|
3003
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
3004
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
3005
|
+
}
|
|
3006
|
+
let urlPath = `/api/Policy/user/{identifier}/all`;
|
|
3007
|
+
urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters["identifier"])));
|
|
3008
|
+
const response = await this.request({
|
|
3009
|
+
path: urlPath,
|
|
3010
|
+
method: "GET",
|
|
3011
|
+
headers: headerParameters,
|
|
3012
|
+
query: queryParameters
|
|
3013
|
+
}, initOverrides);
|
|
3014
|
+
return new VoidApiResponse(response);
|
|
3015
|
+
}
|
|
3016
|
+
async policyGetUserPoliciesForAllProductsAndAllGroups(requestParameters, initOverrides) {
|
|
3017
|
+
await this.policyGetUserPoliciesForAllProductsAndAllGroupsRaw(requestParameters, initOverrides);
|
|
3018
|
+
}
|
|
3019
|
+
async policyUpdateGlobalPolicyRaw(requestParameters, initOverrides) {
|
|
3020
|
+
const queryParameters = {};
|
|
3021
|
+
const headerParameters = {};
|
|
3022
|
+
headerParameters["Content-Type"] = "application/json";
|
|
3023
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
3024
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
3025
|
+
}
|
|
3026
|
+
let urlPath = `/api/Policy/global`;
|
|
3027
|
+
const response = await this.request({
|
|
3028
|
+
path: urlPath,
|
|
3029
|
+
method: "PUT",
|
|
3030
|
+
headers: headerParameters,
|
|
3031
|
+
query: queryParameters,
|
|
3032
|
+
body: CreateGlobalPolicyWithFormDataRequestToJSON(requestParameters["createGlobalPolicyWithFormDataRequest"])
|
|
3033
|
+
}, initOverrides);
|
|
3034
|
+
return new JSONApiResponse(response, (jsonValue) => GlobalPolicyDtoFromJSON(jsonValue));
|
|
3035
|
+
}
|
|
3036
|
+
async policyUpdateGlobalPolicy(requestParameters = {}, initOverrides) {
|
|
3037
|
+
const response = await this.policyUpdateGlobalPolicyRaw(requestParameters, initOverrides);
|
|
3038
|
+
return await response.value();
|
|
3039
|
+
}
|
|
3040
|
+
async policyUpdatePolicyRaw(requestParameters, initOverrides) {
|
|
3041
|
+
const queryParameters = {};
|
|
3042
|
+
const headerParameters = {};
|
|
3043
|
+
headerParameters["Content-Type"] = "application/json";
|
|
3044
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
3045
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
3046
|
+
}
|
|
3047
|
+
let urlPath = `/api/Policy`;
|
|
3048
|
+
const response = await this.request({
|
|
3049
|
+
path: urlPath,
|
|
3050
|
+
method: "PUT",
|
|
3051
|
+
headers: headerParameters,
|
|
3052
|
+
query: queryParameters,
|
|
3053
|
+
body: CreatePolicyWithFormDataRequestToJSON(requestParameters["createPolicyWithFormDataRequest"])
|
|
3054
|
+
}, initOverrides);
|
|
3055
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
3056
|
+
}
|
|
3057
|
+
async policyUpdatePolicy(requestParameters = {}, initOverrides) {
|
|
3058
|
+
const response = await this.policyUpdatePolicyRaw(requestParameters, initOverrides);
|
|
3059
|
+
return await response.value();
|
|
3060
|
+
}
|
|
3061
|
+
async policyUpdatePolicyV2Raw(requestParameters, initOverrides) {
|
|
3062
|
+
const queryParameters = {};
|
|
3063
|
+
const headerParameters = {};
|
|
3064
|
+
headerParameters["Content-Type"] = "application/json";
|
|
3065
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
3066
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
3067
|
+
}
|
|
3068
|
+
let urlPath = `/api/Policy/v2/update`;
|
|
3069
|
+
const response = await this.request({
|
|
3070
|
+
path: urlPath,
|
|
3071
|
+
method: "PUT",
|
|
3072
|
+
headers: headerParameters,
|
|
3073
|
+
query: queryParameters,
|
|
3074
|
+
body: UpdatePolicyRequestToJSON(requestParameters["updatePolicyRequest"])
|
|
3075
|
+
}, initOverrides);
|
|
3076
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
3077
|
+
}
|
|
3078
|
+
async policyUpdatePolicyV2(requestParameters = {}, initOverrides) {
|
|
3079
|
+
const response = await this.policyUpdatePolicyV2Raw(requestParameters, initOverrides);
|
|
3080
|
+
return await response.value();
|
|
3081
|
+
}
|
|
3082
|
+
async policyUploadCheckPolicyRaw(requestParameters, initOverrides) {
|
|
3083
|
+
const queryParameters = {};
|
|
3084
|
+
const headerParameters = {};
|
|
3085
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
3086
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
3087
|
+
}
|
|
3088
|
+
const consumes = [
|
|
3089
|
+
{ contentType: "multipart/form-data" }
|
|
3090
|
+
];
|
|
3091
|
+
const canConsumeForm2 = canConsumeForm(consumes);
|
|
3092
|
+
let formParams;
|
|
3093
|
+
let useForm = false;
|
|
3094
|
+
useForm = canConsumeForm2;
|
|
3095
|
+
if (useForm) {
|
|
3096
|
+
formParams = new FormData;
|
|
3097
|
+
} else {
|
|
3098
|
+
formParams = new URLSearchParams;
|
|
3099
|
+
}
|
|
3100
|
+
if (requestParameters["file"] != null) {
|
|
3101
|
+
formParams.append("file", requestParameters["file"]);
|
|
3102
|
+
}
|
|
3103
|
+
let urlPath = `/api/Policy/upload/check`;
|
|
3104
|
+
const response = await this.request({
|
|
3105
|
+
path: urlPath,
|
|
3106
|
+
method: "POST",
|
|
3107
|
+
headers: headerParameters,
|
|
3108
|
+
query: queryParameters,
|
|
3109
|
+
body: formParams
|
|
3110
|
+
}, initOverrides);
|
|
3111
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
3112
|
+
}
|
|
3113
|
+
async policyUploadCheckPolicy(requestParameters = {}, initOverrides) {
|
|
3114
|
+
const response = await this.policyUploadCheckPolicyRaw(requestParameters, initOverrides);
|
|
3115
|
+
return await response.value();
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
// ../gov/aops-policy-sdk/src/policy-resolver.ts
|
|
3120
|
+
var DEFAULT_TIMEOUT_MS = 1e4;
|
|
3121
|
+
var CLIENT_VERSION_HEADER = "ClientVersion";
|
|
3122
|
+
var JSON_MIME = /^application\/(json|[^;\s]+\+json)\s*(;.*)?$/i;
|
|
3123
|
+
async function resolvePolicyAsync(options) {
|
|
3124
|
+
const subject = options.subject;
|
|
3125
|
+
requireValue("subject", subject);
|
|
3126
|
+
requireText("subject.organizationId", subject.organizationId);
|
|
3127
|
+
requireText("subject.tenantId", subject.tenantId);
|
|
3128
|
+
requireText("subject.product", subject.product);
|
|
3129
|
+
requireText("subject.licenseType", subject.licenseType);
|
|
3130
|
+
requireText("baseUrl", options.baseUrl);
|
|
3131
|
+
requireText("clientVersion", options.clientVersion);
|
|
3132
|
+
const fetchApi = options.fetch ?? globalThis.fetch;
|
|
3133
|
+
if (typeof fetchApi !== "function") {
|
|
3134
|
+
throw new RequiredError("fetch", "No fetch implementation available. Pass options.fetch.");
|
|
3135
|
+
}
|
|
3136
|
+
const now = options.now ?? (() => new Date);
|
|
3137
|
+
const basePath = `${options.baseUrl.replace(/\/+$/, "")}/${encodeURIComponent(subject.organizationId)}/roboticsops_`;
|
|
3138
|
+
let requestUrl = basePath;
|
|
3139
|
+
const api = new PolicyApi(new Configuration({
|
|
3140
|
+
basePath,
|
|
3141
|
+
fetchApi,
|
|
3142
|
+
apiKey: async () => `Bearer ${await readToken(options.accessToken)}`,
|
|
3143
|
+
headers: {
|
|
3144
|
+
AccountId: subject.organizationId,
|
|
3145
|
+
[CLIENT_VERSION_HEADER]: options.clientVersion
|
|
3146
|
+
},
|
|
3147
|
+
middleware: [
|
|
3148
|
+
{
|
|
3149
|
+
pre: async (context) => {
|
|
3150
|
+
requestUrl = context.url;
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
3153
|
+
]
|
|
3154
|
+
}));
|
|
3155
|
+
if (options.signal?.aborted) {
|
|
3156
|
+
return unknown(subject, buildAudit(requestUrl, now), "cancelled", "The request was cancelled before it was sent.");
|
|
3157
|
+
}
|
|
3158
|
+
const controller = new AbortController;
|
|
3159
|
+
let timedOut = false;
|
|
3160
|
+
const timer = setTimeout(() => {
|
|
3161
|
+
timedOut = true;
|
|
3162
|
+
controller.abort();
|
|
3163
|
+
}, options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
3164
|
+
const relayAbort = () => controller.abort();
|
|
3165
|
+
options.signal?.addEventListener("abort", relayAbort, { once: true });
|
|
3166
|
+
let seenResponse;
|
|
3167
|
+
try {
|
|
3168
|
+
const response = await api.policyGetRulesForProductRaw({
|
|
3169
|
+
licenseType: subject.licenseType,
|
|
3170
|
+
productName: subject.product,
|
|
3171
|
+
tenantIdentifier: subject.tenantId
|
|
3172
|
+
}, { signal: controller.signal });
|
|
3173
|
+
seenResponse = response.raw;
|
|
3174
|
+
return await classifySuccess(response.raw, subject, requestUrl, now);
|
|
3175
|
+
} catch (error) {
|
|
3176
|
+
return classifyFailure(error, subject, requestUrl, now, timedOut, options.signal, seenResponse);
|
|
3177
|
+
} finally {
|
|
3178
|
+
clearTimeout(timer);
|
|
3179
|
+
options.signal?.removeEventListener("abort", relayAbort);
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3182
|
+
async function classifySuccess(response, subject, url, now) {
|
|
3183
|
+
const audit = buildAudit(url, now, response);
|
|
3184
|
+
if (response.status === 204) {
|
|
3185
|
+
return { outcome: "ungoverned", subject, audit };
|
|
3186
|
+
}
|
|
3187
|
+
if (response.status !== 200) {
|
|
3188
|
+
return unknown(subject, audit, "serverError", `The policy service answered ${response.status}; only 200 carries a policy and only 204 means none is published.`);
|
|
3189
|
+
}
|
|
3190
|
+
const contentType = response.headers.get("content-type");
|
|
3191
|
+
if (!JSON_MIME.test(contentType ?? "")) {
|
|
3192
|
+
return unknown(subject, audit, "notJson", `Expected a JSON policy document, got content-type ${contentType ?? "(none)"}.`);
|
|
3193
|
+
}
|
|
3194
|
+
const body = await response.text();
|
|
3195
|
+
if (!isJsonObject(body)) {
|
|
3196
|
+
return unknown(subject, audit, "notJson", body.trim() === "" ? "The response body was empty." : "The response body is not a JSON object.");
|
|
3197
|
+
}
|
|
3198
|
+
return { outcome: "governed", subject, audit, document: body };
|
|
3199
|
+
}
|
|
3200
|
+
function classifyFailure(error, subject, url, now, timedOut, signal, seenResponse) {
|
|
3201
|
+
if (error instanceof ResponseError) {
|
|
3202
|
+
return unknown(subject, buildAudit(url, now, error.response), reasonForStatus(error.response.status), `The policy service answered ${error.response.status}.`);
|
|
3203
|
+
}
|
|
3204
|
+
const audit = buildAudit(url, now, seenResponse);
|
|
3205
|
+
if (timedOut) {
|
|
3206
|
+
return unknown(subject, audit, "timedOut", "The policy service did not answer within the timeout.");
|
|
3207
|
+
}
|
|
3208
|
+
if (signal?.aborted || isAbortError(error)) {
|
|
3209
|
+
return unknown(subject, audit, "cancelled", "The request was cancelled.");
|
|
3210
|
+
}
|
|
3211
|
+
return unknown(subject, audit, "transport", `The request to the policy service failed: ${describe(unwrap(error))}`);
|
|
3212
|
+
}
|
|
3213
|
+
function unwrap(error) {
|
|
3214
|
+
return error instanceof FetchError ? error.cause : error;
|
|
3215
|
+
}
|
|
3216
|
+
function reasonForStatus(status) {
|
|
3217
|
+
if (status === 401 || status === 403) {
|
|
3218
|
+
return "unauthorized";
|
|
3219
|
+
}
|
|
3220
|
+
if (status === 404) {
|
|
3221
|
+
return "notFound";
|
|
3222
|
+
}
|
|
3223
|
+
return "serverError";
|
|
3224
|
+
}
|
|
3225
|
+
function buildAudit(url, now, response) {
|
|
3226
|
+
const audit = { url, resolvedAt: now().toISOString() };
|
|
3227
|
+
if (response) {
|
|
3228
|
+
audit.httpStatus = response.status;
|
|
3229
|
+
const retryAfter = parseRetryAfter(response.headers.get("retry-after"), now);
|
|
3230
|
+
if (retryAfter !== undefined) {
|
|
3231
|
+
audit.retryAfterSeconds = retryAfter;
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
return audit;
|
|
3235
|
+
}
|
|
3236
|
+
function parseRetryAfter(header, now) {
|
|
3237
|
+
if (header === null || header.trim() === "") {
|
|
3238
|
+
return;
|
|
3239
|
+
}
|
|
3240
|
+
const seconds = Number(header.trim());
|
|
3241
|
+
if (Number.isInteger(seconds) && seconds >= 0) {
|
|
3242
|
+
return seconds;
|
|
3243
|
+
}
|
|
3244
|
+
const at = Date.parse(header);
|
|
3245
|
+
if (Number.isNaN(at)) {
|
|
3246
|
+
return;
|
|
3247
|
+
}
|
|
3248
|
+
return Math.max(0, Math.round((at - now().getTime()) / 1000));
|
|
3249
|
+
}
|
|
3250
|
+
function isJsonObject(body) {
|
|
3251
|
+
if (body.trim() === "") {
|
|
3252
|
+
return false;
|
|
3253
|
+
}
|
|
3254
|
+
let parsed;
|
|
3255
|
+
try {
|
|
3256
|
+
parsed = JSON.parse(body);
|
|
3257
|
+
} catch {
|
|
3258
|
+
return false;
|
|
3259
|
+
}
|
|
3260
|
+
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed);
|
|
3261
|
+
}
|
|
3262
|
+
function unknown(subject, audit, reason, detail) {
|
|
3263
|
+
return { outcome: "unknown", subject, audit, reason, detail };
|
|
3264
|
+
}
|
|
3265
|
+
async function readToken(accessToken) {
|
|
3266
|
+
return typeof accessToken === "function" ? await accessToken() : accessToken;
|
|
3267
|
+
}
|
|
3268
|
+
function isAbortError(error) {
|
|
3269
|
+
const candidate = error instanceof Error && "cause" in error && error.cause instanceof Error ? error.cause : error;
|
|
3270
|
+
return candidate instanceof Error && candidate.name === "AbortError";
|
|
3271
|
+
}
|
|
3272
|
+
function describe(error) {
|
|
3273
|
+
return error instanceof Error ? error.message : String(error);
|
|
3274
|
+
}
|
|
3275
|
+
function requireValue(field, value) {
|
|
3276
|
+
if (value === undefined || value === null) {
|
|
3277
|
+
throw new RequiredError(field, `Required option "${field}" is missing.`);
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
function requireText(field, value) {
|
|
3281
|
+
requireValue(field, value);
|
|
3282
|
+
if (typeof value !== "string" || value.trim() === "") {
|
|
3283
|
+
throw new RequiredError(field, `Required option "${field}" must be a non-empty string.`);
|
|
3284
|
+
}
|
|
3285
|
+
}
|
|
3286
|
+
// ../packager/project-packager/package.json
|
|
3287
|
+
var package_default = {
|
|
3288
|
+
name: "@uipath/project-packager",
|
|
3289
|
+
author: "UiPath",
|
|
3290
|
+
license: "SEE LICENSE IN LICENSE.txt",
|
|
3291
|
+
version: "1.204.0-preview.211",
|
|
3292
|
+
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
3293
|
+
type: "module",
|
|
3294
|
+
main: "./dist/index.js",
|
|
3295
|
+
exports: {
|
|
3296
|
+
".": {
|
|
3297
|
+
types: "./dist/src/index.d.ts",
|
|
3298
|
+
default: "./dist/index.js"
|
|
3299
|
+
},
|
|
3300
|
+
"./node": {
|
|
3301
|
+
types: "./dist/src/node.d.ts",
|
|
3302
|
+
default: "./dist/node.js"
|
|
3303
|
+
},
|
|
3304
|
+
"./browser": {
|
|
3305
|
+
types: "./dist/src/browser.d.ts",
|
|
3306
|
+
default: "./dist/browser.js"
|
|
3307
|
+
}
|
|
3308
|
+
},
|
|
3309
|
+
types: "./dist/src/index.d.ts",
|
|
3310
|
+
repository: {
|
|
3311
|
+
type: "git",
|
|
3312
|
+
url: "https://github.com/UiPath/cli.git",
|
|
3313
|
+
directory: "packages/packager/project-packager"
|
|
3314
|
+
},
|
|
3315
|
+
publishConfig: {
|
|
3316
|
+
registry: "https://npm.pkg.github.com/"
|
|
3317
|
+
},
|
|
3318
|
+
files: [
|
|
3319
|
+
"dist"
|
|
3320
|
+
],
|
|
3321
|
+
scripts: {
|
|
3322
|
+
build: "bun build ./src/index.ts --outdir dist --format esm --target browser --external @uipath/solutionpackager-tool-core --external '@uipath/filesystem/*' --external @uipath/filesystem --sourcemap=linked && bun build ./src/browser.ts --outdir dist --format esm --target browser --external @uipath/solutionpackager-tool-core --external '@uipath/filesystem/*' --external @uipath/filesystem --sourcemap=linked && bun build ./src/node.ts --outdir dist --format esm --target node --external @uipath/solutionpackager-tool-core --external '@uipath/filesystem/*' --external @uipath/filesystem --sourcemap=linked && tsc -p tsconfig.build.json --emitDeclarationOnly --noCheck --outDir dist",
|
|
3323
|
+
typecheck: "tsc --noEmit",
|
|
3324
|
+
clean: "rimraf dist",
|
|
3325
|
+
test: "vitest run",
|
|
3326
|
+
e2e: "vitest run --config vitest.e2e.config.ts",
|
|
3327
|
+
"test:coverage": "vitest run --coverage",
|
|
3328
|
+
prepack: "bun run build",
|
|
3329
|
+
"publish:dry": "bun publish --dry-run",
|
|
3330
|
+
"publish:gh": "bun publish",
|
|
3331
|
+
"version:patch": "bun version patch --no-git-tag-version",
|
|
3332
|
+
"version:minor": "bun version minor --no-git-tag-version",
|
|
3333
|
+
"version:major": "bun version major --no-git-tag-version",
|
|
3334
|
+
lint: "biome check ."
|
|
3335
|
+
},
|
|
3336
|
+
dependencies: {
|
|
3337
|
+
"@uipath/aops-policy-sdk": "workspace:*",
|
|
3338
|
+
"@uipath/filesystem": "workspace:*",
|
|
3339
|
+
"@uipath/solutionpackager-tool-core": "workspace:*",
|
|
3340
|
+
"@uipath/common": "workspace:*"
|
|
3341
|
+
},
|
|
3342
|
+
peerDependencies: {
|
|
3343
|
+
fflate: "^0.8.2"
|
|
3344
|
+
},
|
|
3345
|
+
devDependencies: {
|
|
3346
|
+
"@types/node": "^25.5.2",
|
|
3347
|
+
"@uipath/resource-builder-tool": "2025.11.0-alpha6004-4107",
|
|
3348
|
+
"@uipath/tool-agent": "^2.0.0",
|
|
3349
|
+
"@uipath/packager-tool-apiworkflow": "workspace:*",
|
|
3350
|
+
"@uipath/packager-tool-connector": "workspace:*",
|
|
3351
|
+
"@uipath/packager-tool-flow": "workspace:*",
|
|
3352
|
+
"@uipath/packager-tool-functions": "workspace:*",
|
|
3353
|
+
"@uipath/packager-tool-webapp": "workspace:*",
|
|
3354
|
+
"@uipath/packager-tool-workflowcompiler": "workspace:*",
|
|
3355
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
3356
|
+
jsdom: "^30.0.1",
|
|
3357
|
+
typescript: "^7.0.2",
|
|
3358
|
+
"vite-tsconfig-paths": "^6.1.1",
|
|
3359
|
+
vitest: "^4.1.11"
|
|
3360
|
+
}
|
|
3361
|
+
};
|
|
3362
|
+
|
|
3363
|
+
// ../packager/project-packager/src/services/governance-policy-service.ts
|
|
3364
|
+
var LICENSE_TYPES = {
|
|
3365
|
+
NoLicense: "NoLicense",
|
|
3366
|
+
Development: "Development",
|
|
3367
|
+
Attended: "Attended",
|
|
3368
|
+
Unattended: "Unattended",
|
|
3369
|
+
StudioX: "StudioX",
|
|
3370
|
+
StudioPro: "StudioPro",
|
|
3371
|
+
AutomationKit: "AutomationKit"
|
|
3372
|
+
};
|
|
3373
|
+
var STUDIOWEB_PRODUCT = "StudioWeb";
|
|
3374
|
+
var ACQUIRE_LICENSE_PATH = "/orchestrator_/api/StudioWeb/AcquireLicense";
|
|
3375
|
+
var GOVERNANCE_SUBFOLDER = "governance";
|
|
3376
|
+
var GOVERNANCE_FILE_NAME = "governance-policy.json";
|
|
3377
|
+
var errorMessage = (error) => error instanceof Error ? error.message : String(error);
|
|
3378
|
+
var t = (key, params) => translate.t(`solutionpackager.governance.${key}`, params);
|
|
3379
|
+
function localRulesType(requestedType, suppliedFilePath) {
|
|
3380
|
+
if (requestedType === "Default" /* Default */ || !suppliedFilePath) {
|
|
3381
|
+
return "Default" /* Default */;
|
|
3382
|
+
}
|
|
3383
|
+
return requestedType === "AutomationOps" /* AutomationOps */ ? "AutomationOps" /* AutomationOps */ : "Studio" /* Studio */;
|
|
3384
|
+
}
|
|
3385
|
+
|
|
3386
|
+
class GovernancePolicyService {
|
|
3387
|
+
fileSystem;
|
|
3388
|
+
temporaryStorage;
|
|
3389
|
+
fetchFn;
|
|
3390
|
+
logger = new ToolLogger("GovernancePolicyService", "ResolvePolicy");
|
|
3391
|
+
constructor(fileSystem, temporaryStorage, fetchFn = fetch.bind(globalThis)) {
|
|
3392
|
+
this.fileSystem = fileSystem;
|
|
3393
|
+
this.temporaryStorage = temporaryStorage;
|
|
3394
|
+
this.fetchFn = fetchFn;
|
|
3395
|
+
}
|
|
3396
|
+
async resolveGovernancePolicyAsync(validateOptions, connectionInfo, cancellationToken, _usage = "pack") {
|
|
3397
|
+
const requestedType = validateOptions.governanceFileType;
|
|
3398
|
+
const suppliedFilePath = validateOptions.governanceFilePath;
|
|
3399
|
+
const origin = this.resolveCloudOrigin(connectionInfo?.cloudUrl);
|
|
3400
|
+
const product = validateOptions.profileKey;
|
|
3401
|
+
if (!origin || !product || !connectionInfo?.organizationId || !connectionInfo.tenantId || !connectionInfo.accessToken) {
|
|
3402
|
+
if (requestedType === "Default" /* Default */) {
|
|
3403
|
+
return;
|
|
3404
|
+
}
|
|
3405
|
+
if (suppliedFilePath) {
|
|
3406
|
+
this.logger.info(t("info.noTenantToAsk", { path: suppliedFilePath }));
|
|
3407
|
+
validateOptions.governanceFileType = localRulesType(requestedType, suppliedFilePath);
|
|
3408
|
+
return;
|
|
3409
|
+
}
|
|
3410
|
+
this.warnAndUseShippedRules(validateOptions, t("errors.connectionIncomplete"));
|
|
3411
|
+
return;
|
|
3412
|
+
}
|
|
3413
|
+
const licenseType = await this.resolveLicenseTypeAsync(product, connectionInfo.cloudUrl?.replace(/\/+$/, "") ?? "", connectionInfo.accessToken, cancellationToken);
|
|
3414
|
+
const subject = {
|
|
3415
|
+
organizationId: connectionInfo.organizationId,
|
|
3416
|
+
tenantId: connectionInfo.tenantId,
|
|
3417
|
+
product,
|
|
3418
|
+
licenseType
|
|
3419
|
+
};
|
|
3420
|
+
this.logger.info(t("info.resolving", { product, licenseType }));
|
|
3421
|
+
const resolution = await resolvePolicyAsync({
|
|
3422
|
+
subject,
|
|
3423
|
+
baseUrl: origin,
|
|
3424
|
+
accessToken: connectionInfo.accessToken,
|
|
3425
|
+
clientVersion: package_default.version,
|
|
3426
|
+
fetch: this.fetchFn,
|
|
3427
|
+
signal: cancellationToken
|
|
3428
|
+
});
|
|
3429
|
+
await this.applyResolutionAsync(resolution, validateOptions, requestedType, suppliedFilePath);
|
|
3430
|
+
}
|
|
3431
|
+
async applyResolutionAsync(resolution, validateOptions, requestedType, suppliedFilePath) {
|
|
3432
|
+
switch (resolution.outcome) {
|
|
3433
|
+
case "governed": {
|
|
3434
|
+
const tenantProduct = resolution.subject.product;
|
|
3435
|
+
if (suppliedFilePath) {
|
|
3436
|
+
this.logger.warn(t("errors.tenantPolicyWins", {
|
|
3437
|
+
product: tenantProduct,
|
|
3438
|
+
path: suppliedFilePath
|
|
3439
|
+
}));
|
|
3440
|
+
} else if (requestedType === "Default" /* Default */) {
|
|
3441
|
+
this.logger.warn(t("errors.defaultOverridden", {
|
|
3442
|
+
product: tenantProduct
|
|
3443
|
+
}));
|
|
3444
|
+
}
|
|
3445
|
+
this.dropIgnoredRules(validateOptions, tenantProduct);
|
|
3446
|
+
await this.savePolicyAsync(validateOptions, resolution.document);
|
|
3447
|
+
return;
|
|
3448
|
+
}
|
|
3449
|
+
case "ungoverned": {
|
|
3450
|
+
const localType = localRulesType(requestedType, suppliedFilePath);
|
|
3451
|
+
if (suppliedFilePath && localType !== "Default" /* Default */) {
|
|
3452
|
+
this.logger.info(t("info.suppliedFileHonoured", {
|
|
3453
|
+
path: suppliedFilePath
|
|
3454
|
+
}));
|
|
3455
|
+
} else {
|
|
3456
|
+
this.logger.info(t("info.ungoverned"));
|
|
3457
|
+
}
|
|
3458
|
+
validateOptions.governanceFileType = localType;
|
|
3459
|
+
return;
|
|
3460
|
+
}
|
|
3461
|
+
case "unknown": {
|
|
3462
|
+
this.logger.warn(this.describeUnknown(resolution));
|
|
3463
|
+
const localType = localRulesType(requestedType, suppliedFilePath);
|
|
3464
|
+
if (suppliedFilePath && localType !== "Default" /* Default */) {
|
|
3465
|
+
this.logger.info(t("info.suppliedFileUnchecked", {
|
|
3466
|
+
path: suppliedFilePath
|
|
3467
|
+
}));
|
|
3468
|
+
}
|
|
3469
|
+
validateOptions.governanceFileType = localType;
|
|
3470
|
+
return;
|
|
3471
|
+
}
|
|
3472
|
+
}
|
|
3473
|
+
}
|
|
3474
|
+
dropIgnoredRules(validateOptions, product) {
|
|
3475
|
+
const rules = normalizeIgnoredRules(validateOptions.ignoredRules);
|
|
3476
|
+
validateOptions.ignoredRules = undefined;
|
|
3477
|
+
if (rules.length === 0) {
|
|
3478
|
+
return;
|
|
3479
|
+
}
|
|
3480
|
+
this.logger.warn(t("errors.ignoredRulesNotApplied", {
|
|
3481
|
+
product,
|
|
3482
|
+
rules: rules.join(", ")
|
|
3483
|
+
}));
|
|
3484
|
+
}
|
|
3485
|
+
async savePolicyAsync(validateOptions, document) {
|
|
3486
|
+
try {
|
|
3487
|
+
const dir = await this.temporaryStorage.getTempSubfolderPathAsync(GOVERNANCE_SUBFOLDER);
|
|
3488
|
+
const filePath = Path.join(dir, GOVERNANCE_FILE_NAME);
|
|
3489
|
+
await this.fileSystem.writeFile(filePath, document);
|
|
3490
|
+
this.logger.info(t("info.saved", { path: filePath }));
|
|
3491
|
+
validateOptions.governanceFilePath = filePath;
|
|
3492
|
+
validateOptions.governanceFileType = "AutomationOps" /* AutomationOps */;
|
|
3493
|
+
} catch (error) {
|
|
3494
|
+
this.warnAndUseShippedRules(validateOptions, t("errors.failedToSave", { error: errorMessage(error) }));
|
|
3495
|
+
}
|
|
3496
|
+
}
|
|
3497
|
+
warnAndUseShippedRules(validateOptions, reason) {
|
|
3498
|
+
this.logger.warn(t("errors.fallingBackToDefault", { reason }));
|
|
3499
|
+
validateOptions.governanceFileType = "Default" /* Default */;
|
|
3500
|
+
}
|
|
3501
|
+
describeUnknown(resolution) {
|
|
3502
|
+
const reason = t("errors.unknownOutcome", {
|
|
3503
|
+
reason: resolution.reason,
|
|
3504
|
+
detail: resolution.detail,
|
|
3505
|
+
url: resolution.audit.url
|
|
3506
|
+
});
|
|
3507
|
+
const retryAfter = resolution.audit.retryAfterSeconds;
|
|
3508
|
+
return retryAfter === undefined ? reason : `${reason} ${t("errors.retryAfter", { seconds: retryAfter })}`;
|
|
3509
|
+
}
|
|
3510
|
+
resolveCloudOrigin(cloudUrl) {
|
|
3511
|
+
if (!cloudUrl) {
|
|
3512
|
+
return null;
|
|
3513
|
+
}
|
|
3514
|
+
try {
|
|
3515
|
+
return new URL(cloudUrl).origin;
|
|
3516
|
+
} catch {
|
|
3517
|
+
return null;
|
|
3518
|
+
}
|
|
3519
|
+
}
|
|
3520
|
+
async resolveLicenseTypeAsync(profileKey, cloudUrl, accessToken, cancellationToken) {
|
|
3521
|
+
const isStudioWeb = profileKey === STUDIOWEB_PRODUCT;
|
|
3522
|
+
const fallback = isStudioWeb ? LICENSE_TYPES.NoLicense : LICENSE_TYPES.Development;
|
|
3523
|
+
try {
|
|
3524
|
+
const response = await this.fetchFn(`${cloudUrl}${ACQUIRE_LICENSE_PATH}`, {
|
|
3525
|
+
method: "POST",
|
|
3526
|
+
headers: { Authorization: `Bearer ${accessToken}` },
|
|
3527
|
+
signal: cancellationToken
|
|
3528
|
+
});
|
|
3529
|
+
if (!response.ok) {
|
|
3530
|
+
this.logger.info(t("info.licenseStatus", {
|
|
3531
|
+
status: response.status,
|
|
3532
|
+
fallback
|
|
3533
|
+
}));
|
|
3534
|
+
return fallback;
|
|
3535
|
+
}
|
|
3536
|
+
const { isLicensed, robotType } = await response.json();
|
|
3537
|
+
this.logger.info(t("info.licenseResponse", {
|
|
3538
|
+
isLicensed: String(isLicensed),
|
|
3539
|
+
robotType: String(robotType)
|
|
3540
|
+
}));
|
|
3541
|
+
if (!isLicensed || !robotType) {
|
|
3542
|
+
return fallback;
|
|
3543
|
+
}
|
|
3544
|
+
if (isStudioWeb) {
|
|
3545
|
+
return robotType === LICENSE_TYPES.AutomationKit ? LICENSE_TYPES.AutomationKit : LICENSE_TYPES.NoLicense;
|
|
3546
|
+
}
|
|
3547
|
+
return robotType;
|
|
3548
|
+
} catch (error) {
|
|
3549
|
+
this.logger.info(t("info.licenseFailed", {
|
|
3550
|
+
error: errorMessage(error),
|
|
3551
|
+
fallback
|
|
3552
|
+
}));
|
|
3553
|
+
return fallback;
|
|
3554
|
+
}
|
|
3555
|
+
}
|
|
3556
|
+
}
|
|
3557
|
+
|
|
3558
|
+
// ../packager/project-packager/src/services/nupkg-resolver.ts
|
|
3559
|
+
async function resolveProducedNupkgsAsync(fileSystem, packagePath) {
|
|
3560
|
+
if (packagePath.toLowerCase().endsWith(".nupkg")) {
|
|
3561
|
+
return [packagePath];
|
|
3562
|
+
}
|
|
3563
|
+
const stat = await fileSystem.stat(packagePath);
|
|
3564
|
+
if (!stat?.isDirectory()) {
|
|
3565
|
+
return [];
|
|
3566
|
+
}
|
|
3567
|
+
const candidateDirs = [packagePath, fileSystem.path.dirname(packagePath)];
|
|
3568
|
+
for (const dir of candidateDirs) {
|
|
3569
|
+
const entries = await fileSystem.readdir(dir);
|
|
3570
|
+
const nupkgs = entries.filter((entry) => entry.toLowerCase().endsWith(".nupkg")).map((entry) => fileSystem.path.join(dir, entry));
|
|
3571
|
+
if (nupkgs.length > 0) {
|
|
3572
|
+
return nupkgs;
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3575
|
+
return [];
|
|
3576
|
+
}
|
|
3577
|
+
|
|
3578
|
+
// ../packager/project-packager/src/services/pack-service.ts
|
|
3579
|
+
var PACKAGE_ID_TOO_LONG = "PACKAGE_ID_TOO_LONG";
|
|
3580
|
+
function isPackageIdTooLongError(error) {
|
|
3581
|
+
return error instanceof Error && error.code === PACKAGE_ID_TOO_LONG;
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
class PackService {
|
|
3585
|
+
disallowedCharsRegex = /[^\p{L}\p{N}_.-]/gu;
|
|
3586
|
+
spacesDotRegex = /[\s.]+/g;
|
|
3587
|
+
dotDashRegex = /\.{0,10}[-:]\.{0,10}/g;
|
|
3588
|
+
MaxPackageIdLength = 100;
|
|
3589
|
+
sanitizePackageId(packageId) {
|
|
3590
|
+
packageId = packageId.trim();
|
|
3591
|
+
packageId = packageId.replace(this.spacesDotRegex, ".");
|
|
3592
|
+
packageId = packageId.replace(this.dotDashRegex, "-");
|
|
3593
|
+
packageId = packageId.replace(this.disallowedCharsRegex, "_");
|
|
3594
|
+
if (packageId.length > this.MaxPackageIdLength) {
|
|
3595
|
+
const error = new Error(`Package id ${packageId} exceeds the characters limit of ${this.MaxPackageIdLength}`);
|
|
3596
|
+
error.code = PACKAGE_ID_TOO_LONG;
|
|
3597
|
+
error.packageId = packageId;
|
|
3598
|
+
error.maxLength = this.MaxPackageIdLength;
|
|
3599
|
+
throw error;
|
|
3600
|
+
}
|
|
3601
|
+
return packageId;
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
3604
|
+
|
|
3605
|
+
// ../packager/project-packager/src/services/package-signer.ts
|
|
3606
|
+
async function signNupkgsAsync(signService, nupkgPaths, signingInfo) {
|
|
3607
|
+
if (!signingInfo?.certificatePath) {
|
|
3608
|
+
return ToolResult.success();
|
|
3609
|
+
}
|
|
3610
|
+
if (!signService) {
|
|
3611
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, "Package signing is required but signing service is not available. Package signing requires dotnet CLI to be installed in Node.js environment.");
|
|
3612
|
+
}
|
|
3613
|
+
const certificatePath = signingInfo.certificatePath;
|
|
3614
|
+
const toSign = [...new Set(nupkgPaths)];
|
|
3615
|
+
if (toSign.length === 0) {
|
|
3616
|
+
return ToolResult.success();
|
|
3617
|
+
}
|
|
3618
|
+
if (signService.signPackagesAsync) {
|
|
3619
|
+
return signService.signPackagesAsync(toSign, certificatePath, signingInfo.certificatePassword, signingInfo.timestampServer);
|
|
3620
|
+
}
|
|
3621
|
+
for (const packagePath of toSign) {
|
|
3622
|
+
const signResult = await signService.signPackageAsync(packagePath, certificatePath, signingInfo.certificatePassword, signingInfo.timestampServer);
|
|
3623
|
+
if (!signResult.isSuccess) {
|
|
3624
|
+
return signResult;
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3627
|
+
return ToolResult.success();
|
|
3628
|
+
}
|
|
3629
|
+
|
|
3630
|
+
// ../packager/project-packager/src/services/packager-parameters-validator.ts
|
|
3631
|
+
class PackagerParametersValidator {
|
|
3632
|
+
logger;
|
|
3633
|
+
fileSystem;
|
|
3634
|
+
constructor(logger, fileSystem) {
|
|
3635
|
+
this.logger = logger;
|
|
3636
|
+
this.fileSystem = fileSystem;
|
|
3637
|
+
}
|
|
3638
|
+
async validateAsync(_options, _cancellationToken) {
|
|
3639
|
+
return ToolResult.success();
|
|
3640
|
+
}
|
|
3641
|
+
validateDestinationPath(destinationPath) {
|
|
3642
|
+
if (!destinationPath) {
|
|
3643
|
+
const error = translate.t("solutionpackager.validator.errors.destinationNotDefined");
|
|
3644
|
+
this.logger.error(error);
|
|
3645
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, error);
|
|
3646
|
+
}
|
|
3647
|
+
return ToolResult.success();
|
|
3648
|
+
}
|
|
3649
|
+
async validateDestinationOutsideProjectAsync(destinationPath, inputPath) {
|
|
3650
|
+
const projectDirectory = await this.resolveProjectDirectoryAsync(inputPath);
|
|
3651
|
+
if (!projectDirectory) {
|
|
3652
|
+
return ToolResult.success();
|
|
3653
|
+
}
|
|
3654
|
+
const destination = this.fileSystem.path.resolve(destinationPath);
|
|
3655
|
+
if (!this.isSameOrInside(projectDirectory, destination)) {
|
|
3656
|
+
return ToolResult.success();
|
|
3657
|
+
}
|
|
3658
|
+
const message = translate.t("solutionpackager.validator.errors.destinationInsideProject", {
|
|
3659
|
+
destinationPath: destination,
|
|
3660
|
+
projectPath: projectDirectory
|
|
3661
|
+
});
|
|
3662
|
+
const instructions = translate.t("solutionpackager.validator.errors.destinationInsideProjectInstruction");
|
|
3663
|
+
this.logger.error(message);
|
|
3664
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, message, instructions);
|
|
3665
|
+
}
|
|
3666
|
+
async resolveProjectDirectoryAsync(inputPath) {
|
|
3667
|
+
if (!inputPath) {
|
|
3668
|
+
return;
|
|
3669
|
+
}
|
|
3670
|
+
const resolved = this.fileSystem.path.resolve(inputPath);
|
|
3671
|
+
const stat = await this.fileSystem.stat(resolved);
|
|
3672
|
+
if (!stat) {
|
|
3673
|
+
return;
|
|
3674
|
+
}
|
|
3675
|
+
return stat.isDirectory() ? resolved : this.fileSystem.path.dirname(resolved);
|
|
3676
|
+
}
|
|
3677
|
+
isSameOrInside(parent, child) {
|
|
3678
|
+
const relative = this.fileSystem.path.relative(parent, child);
|
|
3679
|
+
if (relative === "") {
|
|
3680
|
+
return true;
|
|
3681
|
+
}
|
|
3682
|
+
if (this.fileSystem.path.isAbsolute(relative)) {
|
|
3683
|
+
return false;
|
|
3684
|
+
}
|
|
3685
|
+
return relative !== ".." && !relative.startsWith("../") && !relative.startsWith("..\\");
|
|
3686
|
+
}
|
|
3687
|
+
async validateGovernanceOptions(validateOptions) {
|
|
3688
|
+
if (validateOptions.governanceFileType === "Default" /* Default */) {
|
|
3689
|
+
if (validateOptions.governanceFilePath) {
|
|
3690
|
+
this.logger.warn(`Governance file path '${validateOptions.governanceFilePath}' will be ignored when governance file type is Default`);
|
|
3691
|
+
}
|
|
3692
|
+
return ToolResult.success();
|
|
3693
|
+
}
|
|
3694
|
+
if (!validateOptions.governanceFilePath) {
|
|
3695
|
+
const error = translate.t("solutionpackager.validator.errors.governanceRequired");
|
|
3696
|
+
this.logger.error(error);
|
|
3697
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, error);
|
|
3698
|
+
}
|
|
3699
|
+
try {
|
|
3700
|
+
const stat = await this.fileSystem.stat(validateOptions.governanceFilePath);
|
|
3701
|
+
if (!stat) {
|
|
3702
|
+
const error = translate.t("solutionpackager.validator.errors.governanceFileInfo", {
|
|
3703
|
+
path: validateOptions.governanceFilePath
|
|
3704
|
+
});
|
|
3705
|
+
this.logger.error(error);
|
|
3706
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, error);
|
|
3707
|
+
}
|
|
3708
|
+
if (stat.isDirectory()) {
|
|
3709
|
+
const error = translate.t("solutionpackager.validator.errors.governanceInvalidFile", {
|
|
3710
|
+
path: validateOptions.governanceFilePath
|
|
3711
|
+
});
|
|
3712
|
+
this.logger.error(error);
|
|
3713
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, error);
|
|
3714
|
+
}
|
|
3715
|
+
} catch (error) {
|
|
3716
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
3717
|
+
const errorLog = `Governance file not found or inaccessible: ${validateOptions.governanceFilePath}. Error: ${errorMessage2}`;
|
|
3718
|
+
this.logger.error(errorLog);
|
|
3719
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, errorLog);
|
|
3720
|
+
}
|
|
3721
|
+
this.logger.info(`Using Studio governance file: ${validateOptions.governanceFilePath}`);
|
|
3722
|
+
return ToolResult.success();
|
|
3723
|
+
}
|
|
3724
|
+
}
|
|
3725
|
+
|
|
3726
|
+
// ../packager/project-packager/src/services/project-build-options-validator.ts
|
|
3727
|
+
class ProjectBuildOptionsValidator extends PackagerParametersValidator {
|
|
3728
|
+
async validateAsync(options, _cancellationToken) {
|
|
3729
|
+
return await this.validateGovernanceOptions(options.validateOptions);
|
|
3730
|
+
}
|
|
3731
|
+
}
|
|
3732
|
+
|
|
3733
|
+
// ../packager/project-packager/src/services/project-loader.ts
|
|
3734
|
+
class ProjectLoader {
|
|
3735
|
+
fileSystem;
|
|
3736
|
+
static WebAppManifestFileName = "webAppManifest.json";
|
|
3737
|
+
static ProjectJsonFileName = "project.json";
|
|
3738
|
+
constructor(fileSystem) {
|
|
3739
|
+
this.fileSystem = fileSystem;
|
|
3740
|
+
}
|
|
3741
|
+
async loadProject(projectPath) {
|
|
3742
|
+
if (!projectPath) {
|
|
3743
|
+
throw new Error(translate.t("solutionpackager.projectLoader.errors.pathRequired"));
|
|
3744
|
+
}
|
|
3745
|
+
const projectFilePath = Path.join(projectPath, ProjectTool.ProjectFileName);
|
|
3746
|
+
const projectFileExists = await this.fileSystem.exists(projectFilePath);
|
|
3747
|
+
if (projectFileExists) {
|
|
3748
|
+
return await this.loadFromProjectFile(projectPath, projectFilePath);
|
|
3749
|
+
}
|
|
3750
|
+
const projectJsonPath = Path.join(projectPath, ProjectLoader.ProjectJsonFileName);
|
|
3751
|
+
if (await this.fileSystem.exists(projectJsonPath)) {
|
|
3752
|
+
return await this.loadFromProjectFile(projectPath, projectJsonPath, true);
|
|
3753
|
+
}
|
|
3754
|
+
const webAppManifestPath = Path.join(projectPath, ProjectLoader.WebAppManifestFileName);
|
|
3755
|
+
const webAppManifestExists = await this.fileSystem.exists(webAppManifestPath);
|
|
3756
|
+
if (webAppManifestExists) {
|
|
3757
|
+
return this.loadFromWebAppManifest(projectPath, webAppManifestPath);
|
|
3758
|
+
}
|
|
3759
|
+
throw new Error(translate.t("solutionpackager.projectLoader.errors.noProjectFile", {
|
|
3760
|
+
projectFile: ProjectTool.ProjectFileName,
|
|
3761
|
+
projectJsonFile: ProjectLoader.ProjectJsonFileName,
|
|
3762
|
+
manifestFile: ProjectLoader.WebAppManifestFileName,
|
|
3763
|
+
path: projectPath
|
|
3764
|
+
}));
|
|
3765
|
+
}
|
|
3766
|
+
async loadFromProjectFile(projectPath, projectFilePath, useProjectJson = false) {
|
|
3767
|
+
const fileContent = await this.fileSystem.readFile(projectFilePath);
|
|
3768
|
+
if (!fileContent) {
|
|
3769
|
+
throw new Error(translate.t("solutionpackager.projectLoader.errors.readFailed", {
|
|
3770
|
+
path: projectFilePath
|
|
3771
|
+
}));
|
|
3772
|
+
}
|
|
3773
|
+
const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
|
|
3774
|
+
const projectData = JSON.parse(json);
|
|
3775
|
+
const projectJson = useProjectJson ? projectData : undefined;
|
|
3776
|
+
const outputType = projectJson?.designOptions?.outputType;
|
|
3777
|
+
const projectType = outputType ?? (projectData?.ProjectType || projectData?.type);
|
|
3778
|
+
if (!projectData || !projectType) {
|
|
3779
|
+
throw new Error(translate.t("solutionpackager.projectLoader.errors.invalidProject", {
|
|
3780
|
+
path: projectFilePath
|
|
3781
|
+
}));
|
|
3782
|
+
}
|
|
3783
|
+
const declaredName = projectJson?.name?.trim() || projectData.Name;
|
|
3784
|
+
const declaredDescription = projectJson?.description?.trim() || projectData.Description?.trim() || undefined;
|
|
3785
|
+
const declaredAuthor = projectJson?.author?.trim() || projectData.Author?.trim() || undefined;
|
|
3786
|
+
return {
|
|
3787
|
+
type: projectType,
|
|
3788
|
+
name: declaredName || Path.basename(projectPath),
|
|
3789
|
+
projectPath,
|
|
3790
|
+
projectFilePath,
|
|
3791
|
+
description: declaredDescription,
|
|
3792
|
+
author: declaredAuthor
|
|
3793
|
+
};
|
|
3794
|
+
}
|
|
3795
|
+
loadFromWebAppManifest(projectPath, webAppManifestPath) {
|
|
3796
|
+
const folderName = Path.basename(projectPath);
|
|
3797
|
+
return {
|
|
3798
|
+
type: "AppV2" /* AppV2 */,
|
|
3799
|
+
name: folderName,
|
|
3800
|
+
projectPath,
|
|
3801
|
+
projectFilePath: webAppManifestPath
|
|
3802
|
+
};
|
|
3803
|
+
}
|
|
3804
|
+
}
|
|
3805
|
+
|
|
3806
|
+
// ../packager/project-packager/src/services/project-pack-options-builder.ts
|
|
3807
|
+
class ProjectPackOptionsBuilder {
|
|
3808
|
+
packService;
|
|
3809
|
+
fileSystem;
|
|
3810
|
+
constructor(packService, fileSystem) {
|
|
3811
|
+
this.packService = packService;
|
|
3812
|
+
this.fileSystem = fileSystem;
|
|
3813
|
+
}
|
|
3814
|
+
async buildProjectPackOptions(parameters, project) {
|
|
3815
|
+
if (!parameters.outputPath) {
|
|
3816
|
+
throw new Error("Output path is required for Pack command");
|
|
3817
|
+
}
|
|
3818
|
+
await this.fileSystem.mkdir(parameters.outputPath);
|
|
3819
|
+
const packageId = !parameters.package.id || parameters.package.id.trim() === "" ? project.name : parameters.package.id;
|
|
3820
|
+
const packageInfo = {
|
|
3821
|
+
...parameters.package,
|
|
3822
|
+
id: this.packService.sanitizePackageId(packageId),
|
|
3823
|
+
description: parameters.package.description || project.description,
|
|
3824
|
+
author: parameters.package.author || project.author
|
|
3825
|
+
};
|
|
3826
|
+
return {
|
|
3827
|
+
projectPath: project.projectPath,
|
|
3828
|
+
excludeConfiguredSources: parameters.excludeConfiguredSources ?? false,
|
|
3829
|
+
nuGetSourcesConfigPath: parameters.nuGetSourcesConfigPath,
|
|
3830
|
+
feedFolder: parameters.feedFolder,
|
|
3831
|
+
logLevel: parameters.logLevel,
|
|
3832
|
+
skipAnalyze: parameters.validateOptions.skipAnalyze,
|
|
3833
|
+
skipValidate: parameters.validateOptions.skipValidate,
|
|
3834
|
+
ignoredRules: parameters.validateOptions.ignoredRules,
|
|
3835
|
+
detailedLogPath: parameters.detailedLogPath,
|
|
3836
|
+
policyFilePath: parameters.validateOptions.governanceFilePath,
|
|
3837
|
+
policyFileType: parameters.validateOptions.governanceFileType,
|
|
3838
|
+
outputPath: parameters.outputPath,
|
|
3839
|
+
outputType: parameters.outputType,
|
|
3840
|
+
projectType: project.type,
|
|
3841
|
+
package: packageInfo,
|
|
3842
|
+
skipDependencyOptimization: parameters.packOptions?.skipDependencyOptimization ?? false,
|
|
3843
|
+
includeSources: parameters.packOptions?.includeSources ?? false,
|
|
3844
|
+
splitPackages: parameters.packOptions?.splitPackages ?? false
|
|
3845
|
+
};
|
|
3846
|
+
}
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
// ../packager/project-packager/src/services/project-pack-options-validator.ts
|
|
3850
|
+
class ProjectPackOptionsValidator extends ProjectBuildOptionsValidator {
|
|
3851
|
+
async validateAsync(options, cancellationToken) {
|
|
3852
|
+
const destinationResult = this.validateDestinationPath(options.destinationPath);
|
|
3853
|
+
if (!destinationResult.isSuccess) {
|
|
3854
|
+
return destinationResult;
|
|
3855
|
+
}
|
|
3856
|
+
const containmentResult = await this.validateDestinationOutsideProjectAsync(options.destinationPath, options.inputPath);
|
|
3857
|
+
if (!containmentResult.isSuccess) {
|
|
3858
|
+
return containmentResult;
|
|
3859
|
+
}
|
|
3860
|
+
return await super.validateAsync(options, cancellationToken);
|
|
3861
|
+
}
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
// ../packager/project-packager/src/services/project-tool-executor.ts
|
|
3865
|
+
class ProjectToolExecutor {
|
|
3866
|
+
toolsFactory;
|
|
3867
|
+
telemetry;
|
|
3868
|
+
constructor(toolsFactory, telemetry) {
|
|
3869
|
+
this.toolsFactory = toolsFactory;
|
|
3870
|
+
this.telemetry = telemetry;
|
|
3871
|
+
}
|
|
3872
|
+
async restoreAsync(options, project, context, cancellationToken) {
|
|
3873
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Restore" /* ProjectToolRestore */, project.Type, async () => tool.restoreAsync(options, cancellationToken), {
|
|
3874
|
+
[PackagerDimensions.ProjectId]: project.Id,
|
|
3875
|
+
[PackagerDimensions.ProjectType]: project.Type
|
|
3876
|
+
}));
|
|
3877
|
+
}
|
|
3878
|
+
async validateAsync(options, project, context, cancellationToken) {
|
|
3879
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Validate" /* ProjectToolValidate */, project.Type, async () => tool.validateAsync(options, cancellationToken), {
|
|
3880
|
+
[PackagerDimensions.ProjectId]: project.Id,
|
|
3881
|
+
[PackagerDimensions.ProjectType]: project.Type
|
|
3882
|
+
}));
|
|
3883
|
+
}
|
|
3884
|
+
async buildAsync(options, project, context, cancellationToken) {
|
|
3885
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Build" /* ProjectToolBuild */, project.Type, async () => tool.buildAsync(options, cancellationToken), {
|
|
3886
|
+
[PackagerDimensions.ProjectId]: project.Id,
|
|
3887
|
+
[PackagerDimensions.ProjectType]: project.Type
|
|
3888
|
+
}));
|
|
3889
|
+
}
|
|
3890
|
+
async packAsync(options, project, context, cancellationToken) {
|
|
3891
|
+
return await this.executeToolOperationAsync(project, context, async (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Pack" /* ProjectToolPack */, project.Type, async () => tool.packAsync(options, cancellationToken), {
|
|
3892
|
+
[PackagerDimensions.ProjectId]: project.Id,
|
|
3893
|
+
[PackagerDimensions.ProjectType]: project.Type
|
|
3894
|
+
}));
|
|
3895
|
+
}
|
|
3896
|
+
async cleanupAsync(options, project, context, cancellationToken) {
|
|
3897
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Cleanup" /* ProjectToolCleanup */, project.Type, async () => tool.cleanupAsync(options, cancellationToken), {
|
|
3898
|
+
[PackagerDimensions.ProjectId]: project.Id,
|
|
3899
|
+
[PackagerDimensions.ProjectType]: project.Type
|
|
3900
|
+
}));
|
|
3901
|
+
}
|
|
3902
|
+
async executeToolOperationAsync(project, context, operation) {
|
|
3903
|
+
try {
|
|
3904
|
+
const tool = await this.toolsFactory.createProjectToolAsync(project, context);
|
|
3905
|
+
try {
|
|
3906
|
+
return await operation(tool);
|
|
3907
|
+
} finally {
|
|
3908
|
+
const disposeResult = tool.dispose();
|
|
3909
|
+
if (disposeResult instanceof Promise) {
|
|
3910
|
+
await disposeResult;
|
|
3911
|
+
}
|
|
3912
|
+
}
|
|
3913
|
+
} catch (error) {
|
|
3914
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, error instanceof Error ? error.message : String(error));
|
|
3915
|
+
}
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
|
|
3919
|
+
// ../packager/project-packager/src/services/project-validate-options-validator.ts
|
|
3920
|
+
class ProjectValidateOptionsValidator extends PackagerParametersValidator {
|
|
3921
|
+
async validateAsync(options, _cancellationToken) {
|
|
3922
|
+
return await this.validateGovernanceOptions(options.validateOptions);
|
|
3923
|
+
}
|
|
3924
|
+
}
|
|
3925
|
+
|
|
3926
|
+
// ../packager/project-packager/src/services/tools-factory.ts
|
|
3927
|
+
class ToolsFactory {
|
|
3928
|
+
repository;
|
|
3929
|
+
fileSystem;
|
|
3930
|
+
constructor(repository, fileSystem) {
|
|
3931
|
+
this.repository = repository;
|
|
3932
|
+
this.fileSystem = fileSystem;
|
|
3933
|
+
}
|
|
3934
|
+
async createSolutionToolAsync(solutionName) {
|
|
3935
|
+
const logger = new ToolLogger("ResourceBuilder", solutionName);
|
|
3936
|
+
const factory = this.repository.getSolutionToolFactory();
|
|
3937
|
+
return await factory.createAsync(logger, this.fileSystem);
|
|
3938
|
+
}
|
|
3939
|
+
async createProjectToolAsync(project, context) {
|
|
3940
|
+
const sourceTarget = getSourceTarget();
|
|
3941
|
+
const logger = new ToolLogger(project.Type, sourceTarget);
|
|
3942
|
+
if (!project.ProjectPath) {
|
|
3943
|
+
throw new Error(`Project path not set for project: ${project.Id}`);
|
|
3944
|
+
}
|
|
3945
|
+
const factory = this.repository.getProjectToolFactory(project.Type);
|
|
3946
|
+
return await factory.createAsync(logger, this.fileSystem, context);
|
|
3947
|
+
function getSourceTarget() {
|
|
3948
|
+
const segments = project.ProjectRelativePath.split(/[/\\]/);
|
|
3949
|
+
if (segments.length > 1) {
|
|
3950
|
+
return segments[0];
|
|
3951
|
+
}
|
|
3952
|
+
return project.Id;
|
|
3953
|
+
}
|
|
3954
|
+
}
|
|
3955
|
+
}
|
|
3956
|
+
|
|
3957
|
+
// ../packager/project-packager/src/services/project-packager.ts
|
|
3958
|
+
class ProjectPackager {
|
|
3959
|
+
fileSystem;
|
|
3960
|
+
telemetryService;
|
|
3961
|
+
packageSignService;
|
|
3962
|
+
repository;
|
|
3963
|
+
temporaryStorage;
|
|
3964
|
+
zipService;
|
|
3965
|
+
logger;
|
|
3966
|
+
optionsBuilder;
|
|
3967
|
+
toolsFactory;
|
|
3968
|
+
projectExecutor;
|
|
3969
|
+
projectLoader;
|
|
3970
|
+
validateOptionsValidator;
|
|
3971
|
+
buildOptionsValidator;
|
|
3972
|
+
packOptionsValidator;
|
|
3973
|
+
nugetPackager;
|
|
3974
|
+
governancePolicyService;
|
|
3975
|
+
constructor(fileSystem, telemetryService, packageSignService) {
|
|
3976
|
+
this.fileSystem = fileSystem;
|
|
3977
|
+
this.telemetryService = telemetryService;
|
|
3978
|
+
this.packageSignService = packageSignService;
|
|
3979
|
+
this.repository = toolsFactoryRepository;
|
|
3980
|
+
this.temporaryStorage = new TemporaryStorageService(this.fileSystem);
|
|
3981
|
+
this.zipService = new ZipService(this.fileSystem);
|
|
3982
|
+
this.nugetPackager = new NugetPackager(this.fileSystem);
|
|
3983
|
+
this.logger = new ToolLogger("ProjectPackager", "PackProject");
|
|
3984
|
+
this.validateOptionsValidator = new ProjectValidateOptionsValidator(this.logger, this.fileSystem);
|
|
3985
|
+
this.buildOptionsValidator = new ProjectBuildOptionsValidator(this.logger, this.fileSystem);
|
|
3986
|
+
this.packOptionsValidator = new ProjectPackOptionsValidator(this.logger, this.fileSystem);
|
|
3987
|
+
const packService = new PackService;
|
|
3988
|
+
this.optionsBuilder = new ProjectPackOptionsBuilder(packService, this.fileSystem);
|
|
3989
|
+
this.toolsFactory = new ToolsFactory(this.repository, this.fileSystem);
|
|
3990
|
+
this.projectExecutor = new ProjectToolExecutor(this.toolsFactory, this.telemetryService);
|
|
3991
|
+
this.projectLoader = new ProjectLoader(this.fileSystem);
|
|
3992
|
+
this.governancePolicyService = new GovernancePolicyService(this.fileSystem, this.temporaryStorage);
|
|
3993
|
+
}
|
|
3994
|
+
async setupAsync(input, operationId) {
|
|
3995
|
+
this.telemetryService.setOperationId(operationId);
|
|
3996
|
+
await this.temporaryStorage.cleanup();
|
|
3997
|
+
if (typeof input === "string") {
|
|
3998
|
+
return input;
|
|
3999
|
+
}
|
|
4000
|
+
const inputPath = await this.temporaryStorage.getTempSubfolderPathAsync("input");
|
|
4001
|
+
await this.zipService.extractAsync(input, inputPath);
|
|
4002
|
+
const entries = await this.fileSystem.readdir(inputPath);
|
|
4003
|
+
if (entries.length === 1) {
|
|
4004
|
+
const innerPath = Path.join(inputPath, entries[0]);
|
|
4005
|
+
const stat = await this.fileSystem.stat(innerPath);
|
|
4006
|
+
if (stat?.isDirectory()) {
|
|
4007
|
+
return innerPath;
|
|
4008
|
+
}
|
|
4009
|
+
}
|
|
4010
|
+
return inputPath;
|
|
4011
|
+
}
|
|
4012
|
+
async restoreProjectAsync(options, cancellationToken) {
|
|
4013
|
+
return await this.executeProjectOperationAsync(options, "Restore", "ProjectPackager.Restore" /* ProjectPackagerRestore */, async (uiPathProject, loadedProject) => {
|
|
4014
|
+
const restoreOptions = {
|
|
4015
|
+
projectPath: loadedProject.projectPath,
|
|
4016
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
4017
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
4018
|
+
feedFolder: options.feedFolder,
|
|
4019
|
+
logLevel: options.logLevel,
|
|
4020
|
+
outputPath: options.outputPath
|
|
4021
|
+
};
|
|
4022
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
4023
|
+
return await this.projectExecutor.restoreAsync(restoreOptions, uiPathProject, context, cancellationToken);
|
|
4024
|
+
}, cancellationToken);
|
|
4025
|
+
}
|
|
4026
|
+
async validateProjectAsync(options, cancellationToken) {
|
|
4027
|
+
await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken, "analyze");
|
|
4028
|
+
const validationResult = await this.validateOptionsValidator.validateAsync(options, cancellationToken);
|
|
4029
|
+
if (!validationResult.isSuccess) {
|
|
4030
|
+
return validationResult;
|
|
4031
|
+
}
|
|
4032
|
+
return await this.executeProjectOperationAsync(options, "Validate", "ProjectPackager.Validate" /* ProjectPackagerValidate */, async (uiPathProject, loadedProject) => {
|
|
4033
|
+
const validateOptions = {
|
|
4034
|
+
projectPath: loadedProject.projectPath,
|
|
4035
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
4036
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
4037
|
+
feedFolder: options.feedFolder,
|
|
4038
|
+
logLevel: options.logLevel,
|
|
4039
|
+
skipAnalyze: options.validateOptions.skipAnalyze,
|
|
4040
|
+
skipValidate: options.validateOptions.skipValidate,
|
|
4041
|
+
ignoredRules: options.validateOptions.ignoredRules,
|
|
4042
|
+
defaultSeverity: options.validateOptions.defaultSeverity,
|
|
4043
|
+
detailedLogPath: options.detailedLogPath,
|
|
4044
|
+
policyFilePath: options.validateOptions.governanceFilePath,
|
|
4045
|
+
policyFileType: options.validateOptions.governanceFileType
|
|
4046
|
+
};
|
|
4047
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
4048
|
+
return await this.projectExecutor.validateAsync(validateOptions, uiPathProject, context, cancellationToken);
|
|
4049
|
+
}, cancellationToken);
|
|
4050
|
+
}
|
|
4051
|
+
async buildProjectAsync(options, cancellationToken) {
|
|
4052
|
+
const [governanceError] = await catchError(this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken));
|
|
4053
|
+
if (governanceError) {
|
|
4054
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, `Project build failed: ${governanceError.message}`, carriedInstructions(governanceError));
|
|
4055
|
+
}
|
|
4056
|
+
const validationResult = await this.buildOptionsValidator.validateAsync(options, cancellationToken);
|
|
4057
|
+
if (!validationResult.isSuccess) {
|
|
4058
|
+
return validationResult;
|
|
4059
|
+
}
|
|
4060
|
+
return await this.executeProjectOperationAsync(options, "Build", "ProjectPackager.Build" /* ProjectPackagerBuild */, async (uiPathProject, loadedProject) => {
|
|
4061
|
+
if (!options.outputPath) {
|
|
4062
|
+
options.outputPath = await this.temporaryStorage.getTempSubfolderPathAsync("output");
|
|
4063
|
+
}
|
|
4064
|
+
const buildOptions = {
|
|
4065
|
+
projectPath: loadedProject.projectPath,
|
|
4066
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
4067
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
4068
|
+
feedFolder: options.feedFolder,
|
|
4069
|
+
logLevel: options.logLevel,
|
|
4070
|
+
skipAnalyze: options.validateOptions.skipAnalyze,
|
|
4071
|
+
skipValidate: options.validateOptions.skipValidate,
|
|
4072
|
+
ignoredRules: options.validateOptions.ignoredRules,
|
|
4073
|
+
detailedLogPath: options.detailedLogPath,
|
|
4074
|
+
policyFilePath: options.validateOptions.governanceFilePath,
|
|
4075
|
+
policyFileType: options.validateOptions.governanceFileType,
|
|
4076
|
+
outputPath: options.outputPath,
|
|
4077
|
+
outputType: options.outputType,
|
|
4078
|
+
projectType: uiPathProject.Type
|
|
4079
|
+
};
|
|
4080
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
4081
|
+
return await this.projectExecutor.buildAsync(buildOptions, uiPathProject, context, cancellationToken);
|
|
4082
|
+
}, cancellationToken);
|
|
4083
|
+
}
|
|
4084
|
+
async packProjectAsync(options, cancellationToken) {
|
|
4085
|
+
return await this.telemetryService.trackDependencyOperation("ProjectPackager.Pack" /* ProjectPackagerPack */, "pack", async () => {
|
|
4086
|
+
try {
|
|
4087
|
+
await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken);
|
|
4088
|
+
let result = await this.packOptionsValidator.validateAsync(options, cancellationToken);
|
|
4089
|
+
if (!result.isSuccess) {
|
|
4090
|
+
return result;
|
|
4091
|
+
}
|
|
4092
|
+
if (!options.outputPath) {
|
|
4093
|
+
options.outputPath = await this.temporaryStorage.getTempSubfolderPathAsync("output");
|
|
4094
|
+
}
|
|
4095
|
+
const loadedProject = await this.projectLoader.loadProject(options.inputPath);
|
|
4096
|
+
this.telemetryService.trackEvent("ProjectPackager.ProjectLoaded" /* ProjectPackagerProjectLoaded */, { [PackagerDimensions.ProjectId]: loadedProject.name });
|
|
4097
|
+
const projectPackOptions = await this.optionsBuilder.buildProjectPackOptions(options, loadedProject);
|
|
4098
|
+
const uiPathProject = {
|
|
4099
|
+
Type: loadedProject.type,
|
|
4100
|
+
ProjectRelativePath: Path.basename(loadedProject.projectFilePath),
|
|
4101
|
+
ProjectPath: loadedProject.projectPath,
|
|
4102
|
+
Id: loadedProject.name
|
|
4103
|
+
};
|
|
4104
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
4105
|
+
result = await this.projectExecutor.packAsync(projectPackOptions, uiPathProject, context, cancellationToken);
|
|
4106
|
+
if (result.isSuccess && result.packages.length > 0) {
|
|
4107
|
+
const destinationPackages = await this.copyPackagesToDestination(result.packages, options.destinationPath, projectPackOptions.package);
|
|
4108
|
+
const signResult = await signNupkgsAsync(this.packageSignService, destinationPackages, options.signingInfo);
|
|
4109
|
+
if (!signResult.isSuccess) {
|
|
4110
|
+
return signResult;
|
|
4111
|
+
}
|
|
4112
|
+
result = new ToolResult("SUCCESS" /* Success */, undefined, destinationPackages);
|
|
4113
|
+
}
|
|
4114
|
+
if (result.isSuccess) {
|
|
4115
|
+
this.logger.info(`Project pack completed successfully. Packages: ${result.packages.join(", ")}`);
|
|
4116
|
+
} else {
|
|
4117
|
+
this.logger.error(`Project pack failed with error code ${result.errorCode}: ${result.message}`);
|
|
4118
|
+
}
|
|
4119
|
+
return result;
|
|
4120
|
+
} catch (error) {
|
|
4121
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
4122
|
+
this.logger.error(`Processing error: ${errorMessage2}`);
|
|
4123
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, `Project pack failed: ${errorMessage2}`, carriedInstructions(error));
|
|
4124
|
+
} finally {
|
|
4125
|
+
await this.temporaryStorage.cleanup();
|
|
4126
|
+
}
|
|
4127
|
+
});
|
|
4128
|
+
}
|
|
4129
|
+
async cleanupProjectAsync(options, cancellationToken) {
|
|
4130
|
+
return await this.executeProjectOperationAsync(options, "Cleanup", "ProjectPackager.Cleanup" /* ProjectPackagerCleanup */, async (uiPathProject, loadedProject) => {
|
|
4131
|
+
const cleanupOptions = {
|
|
4132
|
+
projectPath: loadedProject.projectPath,
|
|
4133
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
4134
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
4135
|
+
feedFolder: options.feedFolder,
|
|
4136
|
+
logLevel: options.logLevel,
|
|
4137
|
+
dryRun: options.dryRun ?? false,
|
|
4138
|
+
skipImports: options.skipImports ?? false
|
|
4139
|
+
};
|
|
4140
|
+
const context = {
|
|
4141
|
+
...this.createOperationContext(options, uiPathProject),
|
|
4142
|
+
lockKey: options.lockKey
|
|
4143
|
+
};
|
|
4144
|
+
return await this.projectExecutor.cleanupAsync(cleanupOptions, uiPathProject, context, cancellationToken);
|
|
4145
|
+
}, cancellationToken);
|
|
4146
|
+
}
|
|
4147
|
+
async getPackageStreamsAsync(result) {
|
|
4148
|
+
if (!result.isSuccess) {
|
|
4149
|
+
throw new Error(translate.t("solutionpackager.packager.errors.failedToGetStreams", {
|
|
4150
|
+
errorCode: result.errorCode,
|
|
4151
|
+
message: result.message ?? ""
|
|
4152
|
+
}));
|
|
4153
|
+
}
|
|
4154
|
+
if (!result.packages || result.packages.length === 0) {
|
|
4155
|
+
return [];
|
|
4156
|
+
}
|
|
4157
|
+
const packageStreams = [];
|
|
4158
|
+
for (const packagePath of result.packages) {
|
|
4159
|
+
const data = await this.fileSystem.readFile(packagePath);
|
|
4160
|
+
if (!data) {
|
|
4161
|
+
throw new Error(translate.t("solutionpackager.packager.errors.failedToReadPackage", {
|
|
4162
|
+
path: packagePath
|
|
4163
|
+
}));
|
|
4164
|
+
}
|
|
4165
|
+
const name = packagePath.split(/[\\/]/).pop() || packagePath;
|
|
4166
|
+
packageStreams.push({ name, data });
|
|
4167
|
+
}
|
|
4168
|
+
return packageStreams;
|
|
4169
|
+
}
|
|
4170
|
+
async executeProjectOperationAsync(options, operationName, telemetryName, operation, _cancellationToken) {
|
|
4171
|
+
return await this.telemetryService.trackDependencyOperation(telemetryName, operationName.toLowerCase(), async () => {
|
|
4172
|
+
try {
|
|
4173
|
+
const loadedProject = await this.projectLoader.loadProject(options.inputPath);
|
|
4174
|
+
const uiPathProject = {
|
|
4175
|
+
Type: loadedProject.type,
|
|
4176
|
+
ProjectRelativePath: Path.basename(loadedProject.projectFilePath),
|
|
4177
|
+
ProjectPath: loadedProject.projectPath,
|
|
4178
|
+
Id: loadedProject.name
|
|
4179
|
+
};
|
|
4180
|
+
const operationResult = await operation(uiPathProject, loadedProject);
|
|
4181
|
+
if (operationResult.isSuccess) {
|
|
4182
|
+
this.logger.info(`Project ${operationName.toLowerCase()} completed successfully.`);
|
|
4183
|
+
} else {
|
|
4184
|
+
this.logger.error(`Project ${operationName.toLowerCase()} failed with error code ${operationResult.errorCode}: ${operationResult.message}`);
|
|
4185
|
+
}
|
|
4186
|
+
return operationResult;
|
|
4187
|
+
} catch (error) {
|
|
4188
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
4189
|
+
this.logger.error(`Processing error: ${errorMessage2}`);
|
|
4190
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, `Project ${operationName.toLowerCase()} failed: ${errorMessage2}`);
|
|
4191
|
+
} finally {
|
|
4192
|
+
await this.temporaryStorage.cleanup();
|
|
4193
|
+
}
|
|
4194
|
+
});
|
|
4195
|
+
}
|
|
4196
|
+
createOperationContext(options, uiPathProject) {
|
|
4197
|
+
return {
|
|
4198
|
+
id: crypto.randomUUID(),
|
|
4199
|
+
projects: [uiPathProject],
|
|
4200
|
+
downloadUrl: options.downloadUrl,
|
|
4201
|
+
projectId: options.projectId,
|
|
4202
|
+
targetFramework: options.targetFramework ?? "Portable" /* Portable */,
|
|
4203
|
+
connection: options.connection,
|
|
4204
|
+
logger: this.logger,
|
|
4205
|
+
workflowCompilerVersion: options.workflowCompilerVersion
|
|
4206
|
+
};
|
|
4207
|
+
}
|
|
4208
|
+
async copyFileToDestination(sourcePath, destinationPath) {
|
|
4209
|
+
const fileName = Path.basename(sourcePath);
|
|
4210
|
+
const destPath = Path.join(destinationPath, fileName);
|
|
4211
|
+
const data = await this.fileSystem.readFile(sourcePath);
|
|
4212
|
+
if (!data) {
|
|
4213
|
+
throw new Error(translate.t("solutionpackager.packager.errors.failedToReadPackage", { path: sourcePath }));
|
|
4214
|
+
}
|
|
4215
|
+
await this.fileSystem.writeFile(destPath, data);
|
|
4216
|
+
return destPath;
|
|
4217
|
+
}
|
|
4218
|
+
async copyPackagesToDestination(packagePaths, destinationPath, packageInfo) {
|
|
4219
|
+
await this.fileSystem.mkdir(destinationPath);
|
|
4220
|
+
const destinationPackages = [];
|
|
4221
|
+
for (const packagePath of packagePaths) {
|
|
4222
|
+
const stat = await this.fileSystem.stat(packagePath);
|
|
4223
|
+
if (stat?.isDirectory()) {
|
|
4224
|
+
const nupkgs = await resolveProducedNupkgsAsync(this.fileSystem, packagePath);
|
|
4225
|
+
if (nupkgs.length > 0) {
|
|
4226
|
+
for (const filePath of nupkgs) {
|
|
4227
|
+
destinationPackages.push(await this.copyFileToDestination(filePath, destinationPath));
|
|
4228
|
+
}
|
|
4229
|
+
} else {
|
|
4230
|
+
const nupkgFileName = `${packageInfo.id}.${packageInfo.version}.nupkg`;
|
|
4231
|
+
const destPath = Path.join(destinationPath, nupkgFileName);
|
|
4232
|
+
const packResult = await this.nugetPackager.packAsync(packagePath, packageInfo, destPath);
|
|
4233
|
+
destinationPackages.push(packResult.outputPath);
|
|
4234
|
+
}
|
|
4235
|
+
} else {
|
|
4236
|
+
destinationPackages.push(await this.copyFileToDestination(packagePath, destinationPath));
|
|
4237
|
+
}
|
|
4238
|
+
}
|
|
4239
|
+
return destinationPackages;
|
|
4240
|
+
}
|
|
4241
|
+
}
|
|
4242
|
+
|
|
4243
|
+
// ../packager/project-packager/src/node-project-packager-factory.ts
|
|
4244
|
+
class NodeProjectPackagerFactory extends BaseNodePackagerFactory {
|
|
4245
|
+
async createAsync(config) {
|
|
4246
|
+
const logger = new ToolLogger("ProjectPackagerFactory", "Create");
|
|
4247
|
+
this.configureLanguage(config);
|
|
4248
|
+
this.configureLogHandler(config);
|
|
4249
|
+
logger.info("Creating ProjectPackager instance...");
|
|
4250
|
+
const fileSystem = this.getOrCreateFileSystem(config);
|
|
4251
|
+
const telemetryService = this.getOrCreateTelemetryService(config);
|
|
4252
|
+
this.dotnetDiscovery = new DotnetDiscoveryService;
|
|
4253
|
+
const packageSignService = new NodePackageSignService(this.dotnetDiscovery, logger);
|
|
4254
|
+
const projectPackager = new ProjectPackager(fileSystem, telemetryService, packageSignService);
|
|
4255
|
+
this.checkDotnetAvailability(logger);
|
|
4256
|
+
logger.info("ProjectPackager created successfully.");
|
|
4257
|
+
return projectPackager;
|
|
4258
|
+
}
|
|
4259
|
+
}
|
|
4260
|
+
async function createNodeProjectPackager(options) {
|
|
4261
|
+
const factory = new NodeProjectPackagerFactory;
|
|
4262
|
+
return factory.createAsync(options);
|
|
4263
|
+
}
|
|
4264
|
+
// ../packager/project-packager/src/publish/models/publish-options.ts
|
|
4265
|
+
var PublishDestinationKind;
|
|
4266
|
+
((PublishDestinationKind2) => {
|
|
4267
|
+
PublishDestinationKind2["LocalFolder"] = "LocalFolder";
|
|
4268
|
+
PublishDestinationKind2["NugetFeed"] = "NugetFeed";
|
|
4269
|
+
PublishDestinationKind2["OrchestratorPersonalWorkspace"] = "OrchestratorPersonalWorkspace";
|
|
4270
|
+
PublishDestinationKind2["OrchestratorTenantProcesses"] = "OrchestratorTenantProcesses";
|
|
4271
|
+
PublishDestinationKind2["OrchestratorSharedLibraries"] = "OrchestratorSharedLibraries";
|
|
4272
|
+
PublishDestinationKind2["OrchestratorCustom"] = "OrchestratorCustom";
|
|
4273
|
+
})(PublishDestinationKind ||= {});
|
|
4274
|
+
|
|
4275
|
+
class ProjectPublishOptions {
|
|
4276
|
+
packagePaths;
|
|
4277
|
+
destination;
|
|
4278
|
+
constructor(packagePaths, destination) {
|
|
4279
|
+
this.packagePaths = packagePaths;
|
|
4280
|
+
this.destination = destination;
|
|
4281
|
+
}
|
|
4282
|
+
}
|
|
4283
|
+
// ../packager/project-packager/src/publish/services/local-folder-publisher.ts
|
|
4284
|
+
class LocalFolderPublisher {
|
|
4285
|
+
fileSystem;
|
|
4286
|
+
logger;
|
|
4287
|
+
constructor(fileSystem) {
|
|
4288
|
+
this.fileSystem = fileSystem;
|
|
4289
|
+
this.logger = new ToolLogger("ProjectPublisher", "LocalFolder");
|
|
4290
|
+
}
|
|
4291
|
+
async publishAsync(packagePaths, destination) {
|
|
4292
|
+
const overwrite = destination.overwrite ?? true;
|
|
4293
|
+
if (!destination.folderPath) {
|
|
4294
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.localFolderRequired"));
|
|
4295
|
+
}
|
|
4296
|
+
if (!await this.fileSystem.exists(destination.folderPath)) {
|
|
4297
|
+
await this.fileSystem.mkdir(destination.folderPath);
|
|
4298
|
+
}
|
|
4299
|
+
const written = [];
|
|
4300
|
+
for (const sourcePath of packagePaths) {
|
|
4301
|
+
const fileName = this.fileSystem.path.basename(sourcePath);
|
|
4302
|
+
const destPath = this.fileSystem.path.join(destination.folderPath, fileName);
|
|
4303
|
+
if (!overwrite && await this.fileSystem.exists(destPath)) {
|
|
4304
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.localFolderFileExists", { path: destPath }));
|
|
4305
|
+
}
|
|
4306
|
+
const data = await this.fileSystem.readFile(sourcePath);
|
|
4307
|
+
if (!data) {
|
|
4308
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.failedToReadPackage", { path: sourcePath }));
|
|
4309
|
+
}
|
|
4310
|
+
await this.fileSystem.writeFile(destPath, data);
|
|
4311
|
+
written.push(destPath);
|
|
4312
|
+
this.logger.info(`Copied package to ${destPath}`);
|
|
4313
|
+
}
|
|
4314
|
+
return new ToolResult("SUCCESS" /* Success */, undefined, written);
|
|
4315
|
+
}
|
|
4316
|
+
}
|
|
4317
|
+
|
|
4318
|
+
// ../packager/project-packager/src/publish/services/nuget-feed-publisher.ts
|
|
4319
|
+
var NUGET_V3_PACKAGE_PUBLISH_TYPE = "PackagePublish/2.0.0";
|
|
4320
|
+
|
|
4321
|
+
class NugetFeedPublisher {
|
|
4322
|
+
fileSystem;
|
|
4323
|
+
logger;
|
|
4324
|
+
constructor(fileSystem) {
|
|
4325
|
+
this.fileSystem = fileSystem;
|
|
4326
|
+
this.logger = new ToolLogger("ProjectPublisher", "NugetFeed");
|
|
4327
|
+
}
|
|
4328
|
+
async publishAsync(packagePaths, destination) {
|
|
4329
|
+
if (!destination.feedUrl) {
|
|
4330
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.nugetFeedUrlRequired"));
|
|
4331
|
+
}
|
|
4332
|
+
let pushUrl;
|
|
4333
|
+
try {
|
|
4334
|
+
pushUrl = await this.resolvePushUrl(destination.feedUrl, destination.apiKey);
|
|
4335
|
+
} catch (error) {
|
|
4336
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
4337
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.nugetPushUrlResolutionFailed", { feedUrl: destination.feedUrl, message }));
|
|
4338
|
+
}
|
|
4339
|
+
const published = [];
|
|
4340
|
+
for (const packagePath of packagePaths) {
|
|
4341
|
+
const data = await this.fileSystem.readFile(packagePath);
|
|
4342
|
+
if (!data) {
|
|
4343
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.failedToReadPackage", { path: packagePath }));
|
|
4344
|
+
}
|
|
4345
|
+
const fileName = this.fileSystem.path.basename(packagePath);
|
|
4346
|
+
const form = new FormData;
|
|
4347
|
+
form.append("package", new Blob([data], {
|
|
4348
|
+
type: "application/octet-stream"
|
|
4349
|
+
}), fileName);
|
|
4350
|
+
const headers = {};
|
|
4351
|
+
if (destination.apiKey) {
|
|
4352
|
+
headers["X-NuGet-ApiKey"] = destination.apiKey;
|
|
4353
|
+
}
|
|
4354
|
+
this.logger.info(`Pushing ${fileName} to ${pushUrl}`);
|
|
4355
|
+
const response = await fetch(pushUrl, {
|
|
4356
|
+
method: "PUT",
|
|
4357
|
+
headers,
|
|
4358
|
+
body: form
|
|
4359
|
+
});
|
|
4360
|
+
if (!response.ok) {
|
|
4361
|
+
const body = await this.safeReadBody(response);
|
|
4362
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.nugetPushFailed", {
|
|
4363
|
+
fileName,
|
|
4364
|
+
status: response.status,
|
|
4365
|
+
statusText: response.statusText,
|
|
4366
|
+
body: body ? ` - ${body}` : ""
|
|
4367
|
+
}));
|
|
4368
|
+
}
|
|
4369
|
+
published.push(packagePath);
|
|
4370
|
+
this.logger.info(`Pushed ${fileName} successfully.`);
|
|
4371
|
+
}
|
|
4372
|
+
return new ToolResult("SUCCESS" /* Success */, undefined, published);
|
|
4373
|
+
}
|
|
4374
|
+
async resolvePushUrl(feedUrl, apiKey) {
|
|
4375
|
+
let end = feedUrl.length;
|
|
4376
|
+
while (end > 0 && feedUrl.charCodeAt(end - 1) === 47)
|
|
4377
|
+
end--;
|
|
4378
|
+
const trimmed = feedUrl.slice(0, end);
|
|
4379
|
+
if (/\/api\/v2\/package\/?$/i.test(trimmed)) {
|
|
4380
|
+
return trimmed;
|
|
4381
|
+
}
|
|
4382
|
+
if (/\.json$/i.test(trimmed)) {
|
|
4383
|
+
return this.resolveFromServiceIndex(trimmed, apiKey);
|
|
4384
|
+
}
|
|
4385
|
+
return `${trimmed}/api/v2/package`;
|
|
4386
|
+
}
|
|
4387
|
+
async resolveFromServiceIndex(serviceIndexUrl, apiKey) {
|
|
4388
|
+
const headers = { Accept: "application/json" };
|
|
4389
|
+
if (apiKey) {
|
|
4390
|
+
headers["X-NuGet-ApiKey"] = apiKey;
|
|
4391
|
+
}
|
|
4392
|
+
const response = await fetch(serviceIndexUrl, { headers });
|
|
4393
|
+
if (!response.ok) {
|
|
4394
|
+
throw new Error(`service index returned ${response.status} ${response.statusText}`);
|
|
4395
|
+
}
|
|
4396
|
+
const index = await response.json();
|
|
4397
|
+
const resource = index.resources?.find((r) => r["@type"] === NUGET_V3_PACKAGE_PUBLISH_TYPE);
|
|
4398
|
+
if (!resource?.["@id"]) {
|
|
4399
|
+
throw new Error(`service index has no ${NUGET_V3_PACKAGE_PUBLISH_TYPE} resource`);
|
|
4400
|
+
}
|
|
4401
|
+
return resource["@id"];
|
|
4402
|
+
}
|
|
4403
|
+
async safeReadBody(response) {
|
|
4404
|
+
try {
|
|
4405
|
+
const text = await response.text();
|
|
4406
|
+
return text.slice(0, 500);
|
|
4407
|
+
} catch {
|
|
4408
|
+
return "";
|
|
4409
|
+
}
|
|
4410
|
+
}
|
|
4411
|
+
}
|
|
4412
|
+
|
|
4413
|
+
// ../packager/project-packager/src/publish/services/orchestrator-feed-types.ts
|
|
4414
|
+
var PackageFeedDtoPurposeEnum = {
|
|
4415
|
+
Undefined: "Undefined",
|
|
4416
|
+
Processes: "Processes",
|
|
4417
|
+
Libraries: "Libraries",
|
|
4418
|
+
PersonalWorkspace: "PersonalWorkspace",
|
|
4419
|
+
FolderHierarchy: "FolderHierarchy"
|
|
4420
|
+
};
|
|
4421
|
+
var PackageFeedDtoAuthenticationTypeEnum = {
|
|
4422
|
+
Secure: "Secure",
|
|
4423
|
+
ApiKey: "ApiKey",
|
|
4424
|
+
Basic: "Basic"
|
|
4425
|
+
};
|
|
4426
|
+
var ExtendedFolderDtoFeedTypeEnum = {
|
|
4427
|
+
Undefined: "Undefined",
|
|
4428
|
+
Processes: "Processes",
|
|
4429
|
+
Libraries: "Libraries",
|
|
4430
|
+
PersonalWorkspace: "PersonalWorkspace",
|
|
4431
|
+
FolderHierarchy: "FolderHierarchy"
|
|
4432
|
+
};
|
|
4433
|
+
|
|
4434
|
+
// ../packager/project-packager/src/publish/services/orchestrator-feeds-service.ts
|
|
4435
|
+
var HEADER_TENANT_ID = "X-UIPATH-TenantId";
|
|
4436
|
+
var FEEDS_PATH = "/api/PackageFeeds/GetFeeds";
|
|
4437
|
+
var FOLDERS_PATH = "/api/FoldersNavigation/GetAllFoldersForCurrentUser";
|
|
4438
|
+
var SDK_USER_AGENT = `${package_default.name.replace(/^@uipath\//, "")}/${package_default.version}`;
|
|
4439
|
+
|
|
4440
|
+
class OrchestratorFeedsService {
|
|
4441
|
+
logger;
|
|
4442
|
+
constructor() {
|
|
4443
|
+
this.logger = new ToolLogger("OrchestratorFeedsService", "Feeds");
|
|
4444
|
+
}
|
|
4445
|
+
async getAccessibleFeedsAsync(connection) {
|
|
4446
|
+
this.ensureOrchestratorUrl(connection);
|
|
4447
|
+
this.logger.info(`Fetching accessible feeds from ${connection.orchestratorUrl}`);
|
|
4448
|
+
try {
|
|
4449
|
+
const json = await orchestratorGet(connection, FEEDS_PATH);
|
|
4450
|
+
return Array.isArray(json) ? json : [];
|
|
4451
|
+
} catch (error) {
|
|
4452
|
+
const { status, statusText, body } = await describeResponseError(error);
|
|
4453
|
+
throw new Error(translate.t("solutionpackager.publish.errors.getAccessibleFeedsFailed", { status, statusText, body }));
|
|
4454
|
+
}
|
|
4455
|
+
}
|
|
4456
|
+
async getFoldersForCurrentUserAsync(connection) {
|
|
4457
|
+
this.ensureOrchestratorUrl(connection);
|
|
4458
|
+
this.logger.info(`Fetching folders from ${connection.orchestratorUrl}`);
|
|
4459
|
+
try {
|
|
4460
|
+
const json = await orchestratorGet(connection, FOLDERS_PATH);
|
|
4461
|
+
return Array.isArray(json) ? json.map(mapExtendedFolder) : [];
|
|
4462
|
+
} catch (error) {
|
|
4463
|
+
const { status, statusText, body } = await describeResponseError(error);
|
|
4464
|
+
throw new Error(translate.t("solutionpackager.publish.errors.getFoldersForCurrentUserFailed", { status, statusText, body }));
|
|
4465
|
+
}
|
|
4466
|
+
}
|
|
4467
|
+
ensureOrchestratorUrl(connection) {
|
|
4468
|
+
if (!connection.orchestratorUrl) {
|
|
4469
|
+
throw new Error(translate.t("solutionpackager.publish.errors.orchestratorUrlRequired"));
|
|
4470
|
+
}
|
|
4471
|
+
}
|
|
4472
|
+
}
|
|
4473
|
+
function mapExtendedFolder(json) {
|
|
4474
|
+
return {
|
|
4475
|
+
isSelectable: json.IsSelectable,
|
|
4476
|
+
hasChildren: json.HasChildren,
|
|
4477
|
+
level: json.Level,
|
|
4478
|
+
key: json.Key,
|
|
4479
|
+
displayName: json.DisplayName,
|
|
4480
|
+
fullyQualifiedName: json.FullyQualifiedName,
|
|
4481
|
+
description: json.Description,
|
|
4482
|
+
folderType: json.FolderType,
|
|
4483
|
+
isPersonal: json.IsPersonal,
|
|
4484
|
+
provisionType: json.ProvisionType,
|
|
4485
|
+
permissionModel: json.PermissionModel,
|
|
4486
|
+
parentId: json.ParentId,
|
|
4487
|
+
parentKey: json.ParentKey,
|
|
4488
|
+
feedType: json.FeedType,
|
|
4489
|
+
id: json.Id
|
|
4490
|
+
};
|
|
4491
|
+
}
|
|
4492
|
+
|
|
4493
|
+
class OrchestratorResponseError extends Error {
|
|
4494
|
+
response;
|
|
4495
|
+
constructor(response) {
|
|
4496
|
+
super(`Orchestrator request failed with status ${response.status}.`);
|
|
4497
|
+
this.response = response;
|
|
4498
|
+
this.name = "OrchestratorResponseError";
|
|
4499
|
+
}
|
|
4500
|
+
}
|
|
4501
|
+
async function orchestratorGet(connection, relativePath) {
|
|
4502
|
+
const url = `${normalizeOrchestratorBasePath(connection.orchestratorUrl)}${relativePath}`;
|
|
4503
|
+
const response = await fetch(url, {
|
|
4504
|
+
method: "GET",
|
|
4505
|
+
headers: buildHeaders(connection)
|
|
4506
|
+
});
|
|
4507
|
+
if (!response.ok) {
|
|
4508
|
+
throw new OrchestratorResponseError(response);
|
|
4509
|
+
}
|
|
4510
|
+
const text = await response.text();
|
|
4511
|
+
if (text === "" || text === "null") {
|
|
4512
|
+
return null;
|
|
4513
|
+
}
|
|
4514
|
+
return JSON.parse(text);
|
|
4515
|
+
}
|
|
4516
|
+
function buildHeaders(connection) {
|
|
4517
|
+
const headers = {};
|
|
4518
|
+
if (connection.accessToken) {
|
|
4519
|
+
headers.Authorization = `Bearer ${connection.accessToken}`;
|
|
4520
|
+
}
|
|
4521
|
+
if (connection.tenantId) {
|
|
4522
|
+
headers[HEADER_TENANT_ID] = connection.tenantId;
|
|
4523
|
+
}
|
|
4524
|
+
return addSdkUserAgentHeader(headers, SDK_USER_AGENT);
|
|
4525
|
+
}
|
|
4526
|
+
function normalizeOrchestratorBasePath(orchestratorUrl) {
|
|
4527
|
+
let end = orchestratorUrl.length;
|
|
4528
|
+
while (end > 0 && orchestratorUrl.charCodeAt(end - 1) === 47)
|
|
4529
|
+
end--;
|
|
4530
|
+
const trimmed = orchestratorUrl.slice(0, end);
|
|
4531
|
+
return /\/orchestrator_$/i.test(trimmed) ? trimmed : `${trimmed}/orchestrator_`;
|
|
4532
|
+
}
|
|
4533
|
+
async function describeResponseError(error) {
|
|
4534
|
+
const response = error?.response;
|
|
4535
|
+
if (response) {
|
|
4536
|
+
let body = "";
|
|
4537
|
+
try {
|
|
4538
|
+
body = (await response.text()).slice(0, 500);
|
|
4539
|
+
} catch {
|
|
4540
|
+
body = "";
|
|
4541
|
+
}
|
|
4542
|
+
return {
|
|
4543
|
+
status: response.status,
|
|
4544
|
+
statusText: response.statusText,
|
|
4545
|
+
body: body ? ` - ${body}` : ""
|
|
4546
|
+
};
|
|
4547
|
+
}
|
|
4548
|
+
const cause = error?.cause;
|
|
4549
|
+
const message = cause instanceof Error ? cause.message : error instanceof Error ? error.message : String(error);
|
|
4550
|
+
return { status: "?", statusText: message, body: "" };
|
|
4551
|
+
}
|
|
4552
|
+
|
|
4553
|
+
// ../packager/project-packager/src/publish/services/orchestrator-publisher.ts
|
|
4554
|
+
var HEADER_FOLDER_ID = "X-UIPATH-OrganizationUnitId";
|
|
4555
|
+
var HEADER_TENANT_ID2 = "X-UIPATH-TenantId";
|
|
4556
|
+
var HEADER_NUGET_API_KEY = "X-NuGet-ApiKey";
|
|
4557
|
+
var ORCHESTRATOR_RELATIVE_URL = "/orchestrator_";
|
|
4558
|
+
var PROCESSES_UPLOAD_PATH = "/odata/Processes/UiPath.Server.Configuration.OData.UploadPackage";
|
|
4559
|
+
var LIBRARIES_UPLOAD_PATH = "/odata/Libraries/UiPath.Server.Configuration.OData.UploadPackage";
|
|
4560
|
+
|
|
4561
|
+
class OrchestratorPublisher {
|
|
4562
|
+
fileSystem;
|
|
4563
|
+
logger;
|
|
4564
|
+
feedsService;
|
|
4565
|
+
constructor(fileSystem, feedsService) {
|
|
4566
|
+
this.fileSystem = fileSystem;
|
|
4567
|
+
this.logger = new ToolLogger("ProjectPublisher", "Orchestrator");
|
|
4568
|
+
this.feedsService = feedsService ?? new OrchestratorFeedsService;
|
|
4569
|
+
}
|
|
4570
|
+
async publishAsync(packagePaths, destination) {
|
|
4571
|
+
if (packagePaths.length === 0) {
|
|
4572
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.orchestratorNoPackages"));
|
|
4573
|
+
}
|
|
4574
|
+
if (destination.kind === "OrchestratorCustom" /* OrchestratorCustom */) {
|
|
4575
|
+
if (!destination.publishUrl) {
|
|
4576
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.orchestratorCustomPublishUrlRequired"));
|
|
4577
|
+
}
|
|
4578
|
+
this.logger.info(`Publishing ${packagePaths.length} package(s) to ${destination.publishUrl} (custom)`);
|
|
4579
|
+
return this.postPackages(packagePaths, destination.publishUrl, this.buildCustomHeaders(destination));
|
|
4580
|
+
}
|
|
4581
|
+
if (!destination.connectionInfo?.cloudUrl) {
|
|
4582
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.orchestratorCloudUrlRequired"));
|
|
4583
|
+
}
|
|
4584
|
+
const orchestratorUrl = this.deriveOrchestratorUrl(destination.connectionInfo);
|
|
4585
|
+
let feed;
|
|
4586
|
+
try {
|
|
4587
|
+
feed = await this.resolveFeed(destination, orchestratorUrl);
|
|
4588
|
+
} catch (error) {
|
|
4589
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
4590
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.orchestratorFeedResolutionFailed", { message }));
|
|
4591
|
+
}
|
|
4592
|
+
const targetUrl = this.buildPublishUrl(orchestratorUrl, feed);
|
|
4593
|
+
const headers = this.buildHeaders(destination, feed);
|
|
4594
|
+
this.logger.info(`Publishing ${packagePaths.length} package(s) to ${targetUrl} (feed ${feed.name}, ${feed.purpose})`);
|
|
4595
|
+
return this.postPackages(packagePaths, targetUrl, headers);
|
|
4596
|
+
}
|
|
4597
|
+
async postPackages(packagePaths, targetUrl, headers) {
|
|
4598
|
+
const form = new FormData;
|
|
4599
|
+
for (const packagePath of packagePaths) {
|
|
4600
|
+
const data = await this.fileSystem.readFile(packagePath);
|
|
4601
|
+
if (!data) {
|
|
4602
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.failedToReadPackage", { path: packagePath }));
|
|
4603
|
+
}
|
|
4604
|
+
const fileName = this.fileSystem.path.basename(packagePath);
|
|
4605
|
+
form.append("file", new Blob([data], {
|
|
4606
|
+
type: "application/octet-stream"
|
|
4607
|
+
}), fileName);
|
|
4608
|
+
}
|
|
4609
|
+
const response = await fetch(targetUrl, {
|
|
4610
|
+
method: "POST",
|
|
4611
|
+
headers,
|
|
4612
|
+
body: form
|
|
4613
|
+
});
|
|
4614
|
+
if (!response.ok) {
|
|
4615
|
+
const body = await this.safeReadBody(response);
|
|
4616
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.orchestratorPublishFailed", {
|
|
4617
|
+
status: response.status,
|
|
4618
|
+
statusText: response.statusText,
|
|
4619
|
+
body: body ? ` - ${body}` : ""
|
|
4620
|
+
}));
|
|
4621
|
+
}
|
|
4622
|
+
this.logger.info("Orchestrator publish completed.");
|
|
4623
|
+
return new ToolResult("SUCCESS" /* Success */, undefined, packagePaths);
|
|
4624
|
+
}
|
|
4625
|
+
async resolveFeed(destination, orchestratorUrl) {
|
|
4626
|
+
const connection = {
|
|
4627
|
+
orchestratorUrl,
|
|
4628
|
+
accessToken: destination.connectionInfo.accessToken,
|
|
4629
|
+
tenantId: destination.connectionInfo.tenantId
|
|
4630
|
+
};
|
|
4631
|
+
const feeds = await this.feedsService.getAccessibleFeedsAsync(connection);
|
|
4632
|
+
if (destination.kind === "OrchestratorPersonalWorkspace" /* OrchestratorPersonalWorkspace */) {
|
|
4633
|
+
const folders = await this.feedsService.getFoldersForCurrentUserAsync(connection);
|
|
4634
|
+
const personalFolder = folders.find((f) => f.feedType === ExtendedFolderDtoFeedTypeEnum.PersonalWorkspace);
|
|
4635
|
+
if (!personalFolder) {
|
|
4636
|
+
const foldersDebug = folders.length === 0 ? "<none>" : folders.map((f) => `${f.displayName} (id=${f.id}, feedType=${f.feedType})`).join(", ");
|
|
4637
|
+
throw new Error(translate.t("solutionpackager.publish.errors.orchestratorPersonalWorkspaceFolderNotFound", { folders: foldersDebug }));
|
|
4638
|
+
}
|
|
4639
|
+
if (personalFolder.id == null) {
|
|
4640
|
+
throw new Error(`Personal-workspace folder "${personalFolder.displayName}" has no id; cannot resolve its feed.`);
|
|
4641
|
+
}
|
|
4642
|
+
const match2 = feeds.find((f) => f.folderId === personalFolder.id);
|
|
4643
|
+
if (!match2) {
|
|
4644
|
+
this.throwFeedNotFound(destination, feeds);
|
|
4645
|
+
}
|
|
4646
|
+
return match2;
|
|
4647
|
+
}
|
|
4648
|
+
const expectedPurpose = destination.kind === "OrchestratorSharedLibraries" /* OrchestratorSharedLibraries */ ? PackageFeedDtoPurposeEnum.Libraries : PackageFeedDtoPurposeEnum.Processes;
|
|
4649
|
+
const match = feeds.find((f) => f.purpose === expectedPurpose && f.folderId == null);
|
|
4650
|
+
if (!match) {
|
|
4651
|
+
this.throwFeedNotFound(destination, feeds);
|
|
4652
|
+
}
|
|
4653
|
+
return match;
|
|
4654
|
+
}
|
|
4655
|
+
throwFeedNotFound(destination, feeds) {
|
|
4656
|
+
const available = feeds.length === 0 ? "<none>" : feeds.map((f) => `${f.name} (purpose=${f.purpose}, folderId=${f.folderId ?? "null"})`).join(", ");
|
|
4657
|
+
throw new Error(translate.t("solutionpackager.publish.errors.orchestratorFeedNotFound", {
|
|
4658
|
+
kind: destination.kind,
|
|
4659
|
+
available
|
|
4660
|
+
}));
|
|
4661
|
+
}
|
|
4662
|
+
buildPublishUrl(orchestratorUrl, feed) {
|
|
4663
|
+
const baseUrl = feed.publishUrl ? feed.publishUrl : `${orchestratorUrl}${feed.purpose === PackageFeedDtoPurposeEnum.Libraries ? LIBRARIES_UPLOAD_PATH : PROCESSES_UPLOAD_PATH}`;
|
|
4664
|
+
const parsed = new URL(baseUrl);
|
|
4665
|
+
if (feed.id) {
|
|
4666
|
+
parsed.searchParams.set("feedId", feed.id);
|
|
4667
|
+
}
|
|
4668
|
+
return parsed.toString();
|
|
4669
|
+
}
|
|
4670
|
+
deriveOrchestratorUrl(connectionInfo) {
|
|
4671
|
+
const raw = connectionInfo.cloudUrl ?? "";
|
|
4672
|
+
let end = raw.length;
|
|
4673
|
+
while (end > 0 && raw.charCodeAt(end - 1) === 47)
|
|
4674
|
+
end--;
|
|
4675
|
+
return `${raw.slice(0, end)}${ORCHESTRATOR_RELATIVE_URL}`;
|
|
4676
|
+
}
|
|
4677
|
+
buildHeaders(destination, feed) {
|
|
4678
|
+
const headers = this.buildAuthHeaders(destination.connectionInfo);
|
|
4679
|
+
const folderHeader = destination.kind === "OrchestratorSharedLibraries" /* OrchestratorSharedLibraries */ ? destination.folderId : feed.folderId;
|
|
4680
|
+
if (folderHeader != null) {
|
|
4681
|
+
headers[HEADER_FOLDER_ID] = String(folderHeader);
|
|
4682
|
+
}
|
|
4683
|
+
if (feed.authenticationType === PackageFeedDtoAuthenticationTypeEnum.ApiKey && feed.apiKey) {
|
|
4684
|
+
headers[HEADER_NUGET_API_KEY] = feed.apiKey;
|
|
4685
|
+
}
|
|
4686
|
+
return headers;
|
|
4687
|
+
}
|
|
4688
|
+
buildCustomHeaders(destination) {
|
|
4689
|
+
const headers = this.buildAuthHeaders(destination.connectionInfo);
|
|
4690
|
+
if (destination.folderId != null) {
|
|
4691
|
+
headers[HEADER_FOLDER_ID] = String(destination.folderId);
|
|
4692
|
+
}
|
|
4693
|
+
if (destination.apiKey) {
|
|
4694
|
+
headers[HEADER_NUGET_API_KEY] = destination.apiKey;
|
|
4695
|
+
}
|
|
4696
|
+
return headers;
|
|
4697
|
+
}
|
|
4698
|
+
buildAuthHeaders(connectionInfo) {
|
|
4699
|
+
const headers = {};
|
|
4700
|
+
if (connectionInfo.accessToken) {
|
|
4701
|
+
headers.Authorization = `Bearer ${connectionInfo.accessToken}`;
|
|
4702
|
+
}
|
|
4703
|
+
if (connectionInfo.tenantId) {
|
|
4704
|
+
headers[HEADER_TENANT_ID2] = connectionInfo.tenantId;
|
|
4705
|
+
}
|
|
4706
|
+
return headers;
|
|
4707
|
+
}
|
|
4708
|
+
async safeReadBody(response) {
|
|
4709
|
+
try {
|
|
4710
|
+
const text = await response.text();
|
|
4711
|
+
return text.slice(0, 500);
|
|
4712
|
+
} catch {
|
|
4713
|
+
return "";
|
|
4714
|
+
}
|
|
4715
|
+
}
|
|
4716
|
+
}
|
|
4717
|
+
|
|
4718
|
+
// ../packager/project-packager/src/publish/services/project-publisher.ts
|
|
4719
|
+
class ProjectPublisher {
|
|
4720
|
+
fileSystem;
|
|
4721
|
+
logger;
|
|
4722
|
+
localFolderPublisher;
|
|
4723
|
+
nugetFeedPublisher;
|
|
4724
|
+
orchestratorPublisher;
|
|
4725
|
+
constructor(fileSystem, publishers) {
|
|
4726
|
+
this.fileSystem = fileSystem;
|
|
4727
|
+
this.logger = new ToolLogger("ProjectPublisher", "Publish");
|
|
4728
|
+
this.localFolderPublisher = publishers?.localFolder ?? new LocalFolderPublisher(fileSystem);
|
|
4729
|
+
this.nugetFeedPublisher = publishers?.nugetFeed ?? new NugetFeedPublisher(fileSystem);
|
|
4730
|
+
this.orchestratorPublisher = publishers?.orchestrator ?? new OrchestratorPublisher(fileSystem);
|
|
4731
|
+
}
|
|
4732
|
+
async publishAsync(options) {
|
|
4733
|
+
if (!options.packagePaths || options.packagePaths.length === 0) {
|
|
4734
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.atLeastOnePackage"));
|
|
4735
|
+
}
|
|
4736
|
+
for (const path of options.packagePaths) {
|
|
4737
|
+
if (!await this.fileSystem.exists(path)) {
|
|
4738
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.packageNotFound", { path }));
|
|
4739
|
+
}
|
|
4740
|
+
}
|
|
4741
|
+
try {
|
|
4742
|
+
const destination = options.destination;
|
|
4743
|
+
switch (destination.kind) {
|
|
4744
|
+
case "LocalFolder" /* LocalFolder */:
|
|
4745
|
+
return await this.localFolderPublisher.publishAsync(options.packagePaths, destination);
|
|
4746
|
+
case "NugetFeed" /* NugetFeed */:
|
|
4747
|
+
return await this.nugetFeedPublisher.publishAsync(options.packagePaths, destination);
|
|
4748
|
+
case "OrchestratorPersonalWorkspace" /* OrchestratorPersonalWorkspace */:
|
|
4749
|
+
case "OrchestratorTenantProcesses" /* OrchestratorTenantProcesses */:
|
|
4750
|
+
case "OrchestratorSharedLibraries" /* OrchestratorSharedLibraries */:
|
|
4751
|
+
case "OrchestratorCustom" /* OrchestratorCustom */:
|
|
4752
|
+
return await this.orchestratorPublisher.publishAsync(options.packagePaths, destination);
|
|
4753
|
+
default: {
|
|
4754
|
+
const exhaustive = destination;
|
|
4755
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.publish.errors.unknownDestination", { destination: JSON.stringify(exhaustive) }));
|
|
4756
|
+
}
|
|
4757
|
+
}
|
|
4758
|
+
} catch (error) {
|
|
4759
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
4760
|
+
const localized = translate.t("solutionpackager.publish.errors.publishFailed", { message });
|
|
4761
|
+
this.logger.error(localized);
|
|
4762
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, localized);
|
|
4763
|
+
}
|
|
4764
|
+
}
|
|
4765
|
+
}
|
|
4766
|
+
|
|
4767
|
+
// ../packager/project-packager/src/publish/node-project-publisher-factory.ts
|
|
4768
|
+
class NodeProjectPublisherFactory extends BaseNodePackagerFactory {
|
|
4769
|
+
async createAsync(config) {
|
|
4770
|
+
const logger = new ToolLogger("ProjectPublisherFactory", "Create");
|
|
4771
|
+
this.configureLanguage(config);
|
|
4772
|
+
this.configureLogHandler(config);
|
|
4773
|
+
logger.info("Creating ProjectPublisher instance...");
|
|
4774
|
+
const fileSystem = this.getOrCreateFileSystem(config);
|
|
4775
|
+
this.getOrCreateTelemetryService(config);
|
|
4776
|
+
const projectPublisher = new ProjectPublisher(fileSystem);
|
|
4777
|
+
logger.info("ProjectPublisher created successfully.");
|
|
4778
|
+
return projectPublisher;
|
|
4779
|
+
}
|
|
4780
|
+
}
|
|
4781
|
+
async function createNodeProjectPublisher(options) {
|
|
4782
|
+
const factory = new NodeProjectPublisherFactory;
|
|
4783
|
+
return factory.createAsync(options);
|
|
4784
|
+
}
|
|
4785
|
+
export {
|
|
4786
|
+
BaseNodePackagerFactory,
|
|
4787
|
+
ConsoleTelemetryProvider,
|
|
4788
|
+
DebugTelemetryProvider,
|
|
4789
|
+
DotnetDiscoveryService,
|
|
4790
|
+
GovernancePolicyService,
|
|
4791
|
+
NodeContextStorage,
|
|
4792
|
+
NodePackageSignService,
|
|
4793
|
+
PACKAGE_ID_TOO_LONG,
|
|
4794
|
+
PackService,
|
|
4795
|
+
PackagerParameters,
|
|
4796
|
+
PackagerParametersValidator,
|
|
4797
|
+
ProjectBuildOptions,
|
|
4798
|
+
ProjectBuildOptionsValidator,
|
|
4799
|
+
ProjectCleanupOptions,
|
|
4800
|
+
ProjectLoader,
|
|
4801
|
+
ProjectPackOptions,
|
|
4802
|
+
ProjectPackager,
|
|
4803
|
+
ProjectPublishOptions,
|
|
4804
|
+
ProjectPublisher,
|
|
4805
|
+
ProjectRestoreOptions,
|
|
4806
|
+
ProjectToolExecutor,
|
|
4807
|
+
ProjectValidateOptions,
|
|
4808
|
+
ProjectValidateOptionsValidator,
|
|
4809
|
+
PublishDestinationKind,
|
|
4810
|
+
RulesConfigFileType,
|
|
4811
|
+
TelemetryNames,
|
|
4812
|
+
TelemetryService,
|
|
4813
|
+
ToolLogger,
|
|
4814
|
+
ToolsFactory,
|
|
4815
|
+
createNodeProjectPackager,
|
|
4816
|
+
createNodeProjectPublisher,
|
|
4817
|
+
isPackageIdTooLongError,
|
|
4818
|
+
resolveProducedNupkgsAsync,
|
|
4819
|
+
setGlobalLogHandler,
|
|
4820
|
+
signNupkgsAsync
|
|
4821
|
+
};
|
|
4822
|
+
|
|
4823
|
+
//# debugId=CCBE7042B2E00F9F64756E2164756E21
|