@uipath/api-workflow-tool 0.1.11 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -0
- package/dist/packager-tool.js +540 -0
- package/dist/tool.js +2421 -575
- package/package.json +8 -7
package/dist/tool.js
CHANGED
|
@@ -30,8 +30,1929 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
30
30
|
return to;
|
|
31
31
|
};
|
|
32
32
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
|
+
var __returnValue = (v) => v;
|
|
34
|
+
function __exportSetter(name, newValue) {
|
|
35
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
36
|
+
}
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, {
|
|
40
|
+
get: all[name],
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
set: __exportSetter.bind(all, name)
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
33
47
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
34
48
|
|
|
49
|
+
// ../telemetry/dist/node.js
|
|
50
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
51
|
+
|
|
52
|
+
class ConsoleTelemetryProvider {
|
|
53
|
+
async trackEvent(eventName, _properties) {
|
|
54
|
+
console.log(`[Telemetry] Event: ${eventName}`);
|
|
55
|
+
}
|
|
56
|
+
async trackException(error, _properties) {
|
|
57
|
+
console.log(`[Telemetry] Exception: ${error.message}`);
|
|
58
|
+
}
|
|
59
|
+
async trackRequest(name, duration, success, _properties) {
|
|
60
|
+
console.log(`[Telemetry] Request: ${name} (${duration}ms, ${success ? "ok" : "fail"})`);
|
|
61
|
+
}
|
|
62
|
+
async trackDependency(name, type, duration, success, _properties) {
|
|
63
|
+
console.log(`[Telemetry] Dependency: ${name} [${type}] (${duration}ms, ${success ? "ok" : "fail"})`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
class NodeContextStorage {
|
|
68
|
+
storage = new AsyncLocalStorage;
|
|
69
|
+
run(context, fn) {
|
|
70
|
+
return this.storage.run(context, fn);
|
|
71
|
+
}
|
|
72
|
+
getContext() {
|
|
73
|
+
return this.storage.getStore();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
class TelemetryService {
|
|
78
|
+
telemetryProvider;
|
|
79
|
+
contextStorage;
|
|
80
|
+
operationId;
|
|
81
|
+
defaultProperties;
|
|
82
|
+
constructor(telemetryProvider, contextStorage) {
|
|
83
|
+
this.telemetryProvider = telemetryProvider;
|
|
84
|
+
this.contextStorage = contextStorage;
|
|
85
|
+
}
|
|
86
|
+
setOperationId(operationId) {
|
|
87
|
+
this.operationId = operationId;
|
|
88
|
+
}
|
|
89
|
+
setProvider(provider) {
|
|
90
|
+
this.telemetryProvider = provider;
|
|
91
|
+
}
|
|
92
|
+
setDefaultProperties(properties) {
|
|
93
|
+
this.defaultProperties = properties;
|
|
94
|
+
}
|
|
95
|
+
trackEvent(name, properties) {
|
|
96
|
+
const context = this.getCurrentContext();
|
|
97
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
98
|
+
this.telemetryProvider.trackEvent(name, enrichedProperties);
|
|
99
|
+
}
|
|
100
|
+
trackException(error, properties) {
|
|
101
|
+
const context = this.getCurrentContext();
|
|
102
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
103
|
+
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
104
|
+
}
|
|
105
|
+
async trackRequest(name, fn, properties) {
|
|
106
|
+
const context = {
|
|
107
|
+
operationId: this.operationId ?? this.generateId(),
|
|
108
|
+
id: this.generateId()
|
|
109
|
+
};
|
|
110
|
+
const startTime = performance.now();
|
|
111
|
+
try {
|
|
112
|
+
const result = await this.contextStorage.run(context, fn);
|
|
113
|
+
const durationMs = performance.now() - startTime;
|
|
114
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
115
|
+
await this.telemetryProvider.trackRequest(name, durationMs, true, enrichedProperties);
|
|
116
|
+
return result;
|
|
117
|
+
} catch (error) {
|
|
118
|
+
const durationMs = performance.now() - startTime;
|
|
119
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
120
|
+
const enrichedProperties = this.enrichPropertiesWithContext({ ...properties, errorMessage: err.message }, context);
|
|
121
|
+
await this.telemetryProvider.trackRequest(name, durationMs, false, enrichedProperties);
|
|
122
|
+
throw error;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
async trackDependencyOperation(name, type, fn, properties) {
|
|
126
|
+
const parentContext = this.getCurrentContext();
|
|
127
|
+
if (!parentContext) {
|
|
128
|
+
throw new Error("trackDependencyOperation must be called within a trackRequest block.");
|
|
129
|
+
}
|
|
130
|
+
const childContext = {
|
|
131
|
+
operationId: parentContext.operationId,
|
|
132
|
+
parentId: parentContext.id,
|
|
133
|
+
id: this.generateId()
|
|
134
|
+
};
|
|
135
|
+
const startTime = performance.now();
|
|
136
|
+
try {
|
|
137
|
+
const result = await this.contextStorage.run(childContext, fn);
|
|
138
|
+
const durationMs = performance.now() - startTime;
|
|
139
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, childContext);
|
|
140
|
+
await this.telemetryProvider.trackDependency(name, type, durationMs, true, enrichedProperties);
|
|
141
|
+
return result;
|
|
142
|
+
} catch (error) {
|
|
143
|
+
const durationMs = performance.now() - startTime;
|
|
144
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
145
|
+
const enrichedProperties = this.enrichPropertiesWithContext({ ...properties, errorMessage: err.message }, childContext);
|
|
146
|
+
await this.telemetryProvider.trackDependency(name, type, durationMs, false, enrichedProperties);
|
|
147
|
+
throw error;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
getCurrentContext() {
|
|
151
|
+
return this.contextStorage.getContext();
|
|
152
|
+
}
|
|
153
|
+
enrichPropertiesWithContext(properties, context) {
|
|
154
|
+
return {
|
|
155
|
+
...this.defaultProperties,
|
|
156
|
+
...properties,
|
|
157
|
+
...context
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
generateId() {
|
|
161
|
+
return crypto.randomUUID().replaceAll("-", "");
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
var init_node = () => {};
|
|
165
|
+
|
|
166
|
+
// ../packager/project-packager/dist/node.js
|
|
167
|
+
var exports_node = {};
|
|
168
|
+
__export(exports_node, {
|
|
169
|
+
setGlobalLogHandler: () => setGlobalLogHandler,
|
|
170
|
+
createNodeProjectPackager: () => createNodeProjectPackager,
|
|
171
|
+
ToolsFactory: () => ToolsFactory,
|
|
172
|
+
ToolLogger: () => ToolLogger,
|
|
173
|
+
TelemetryService: () => TelemetryService,
|
|
174
|
+
TelemetryNames: () => TelemetryNames,
|
|
175
|
+
RulesConfigFileType: () => RulesConfigFileType,
|
|
176
|
+
ProjectValidateOptionsValidator: () => ProjectValidateOptionsValidator,
|
|
177
|
+
ProjectValidateOptions: () => ProjectValidateOptions,
|
|
178
|
+
ProjectToolExecutor: () => ProjectToolExecutor,
|
|
179
|
+
ProjectRestoreOptions: () => ProjectRestoreOptions,
|
|
180
|
+
ProjectPackager: () => ProjectPackager,
|
|
181
|
+
ProjectPackOptions: () => ProjectPackOptions,
|
|
182
|
+
ProjectLoader: () => ProjectLoader,
|
|
183
|
+
ProjectBuildOptionsValidator: () => ProjectBuildOptionsValidator,
|
|
184
|
+
ProjectBuildOptions: () => ProjectBuildOptions,
|
|
185
|
+
PackagerParametersValidator: () => PackagerParametersValidator,
|
|
186
|
+
PackagerParameters: () => PackagerParameters,
|
|
187
|
+
PackService: () => PackService,
|
|
188
|
+
NodePackageSignService: () => NodePackageSignService,
|
|
189
|
+
NodeContextStorage: () => NodeContextStorage,
|
|
190
|
+
ConsoleTelemetryProvider: () => ConsoleTelemetryProvider,
|
|
191
|
+
BaseNodePackagerFactory: () => BaseNodePackagerFactory
|
|
192
|
+
});
|
|
193
|
+
import { I18nManager } from "@uipath/solutionpackager-tool-core";
|
|
194
|
+
import { execSync } from "node:child_process";
|
|
195
|
+
import { NodeFileSystem } from "@uipath/filesystem";
|
|
196
|
+
import { translate } from "@uipath/solutionpackager-tool-core";
|
|
197
|
+
import {
|
|
198
|
+
LogLevel,
|
|
199
|
+
LogMessage
|
|
200
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
201
|
+
import {
|
|
202
|
+
LogLevel as LogLevel2
|
|
203
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
204
|
+
import { execSync as execSync2, spawn } from "node:child_process";
|
|
205
|
+
import {
|
|
206
|
+
ToolErrorCodes,
|
|
207
|
+
ToolResult,
|
|
208
|
+
translate as translate2
|
|
209
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
210
|
+
import {
|
|
211
|
+
toolsFactoryRepository as defaultToolsFactoryRepository,
|
|
212
|
+
NugetPackager,
|
|
213
|
+
Path as Path3,
|
|
214
|
+
TemporaryStorageService,
|
|
215
|
+
ToolErrorCodes as ToolErrorCodes4,
|
|
216
|
+
ToolResult as ToolResult4,
|
|
217
|
+
translate as translate6,
|
|
218
|
+
ZipService
|
|
219
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
220
|
+
import {
|
|
221
|
+
Path,
|
|
222
|
+
toRelativeUrl,
|
|
223
|
+
translate as translate3
|
|
224
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
225
|
+
import {
|
|
226
|
+
ToolErrorCodes as ToolErrorCodes2,
|
|
227
|
+
ToolResult as ToolResult2,
|
|
228
|
+
translate as translate4
|
|
229
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
230
|
+
import {
|
|
231
|
+
Path as Path2,
|
|
232
|
+
ProjectTypes,
|
|
233
|
+
translate as translate5
|
|
234
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
235
|
+
import {
|
|
236
|
+
ToolErrorCodes as ToolErrorCodes3,
|
|
237
|
+
ToolResult as ToolResult3
|
|
238
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
239
|
+
function setGlobalLogHandler(handler) {
|
|
240
|
+
globalLogHandler = handler;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
class ToolLogger {
|
|
244
|
+
source;
|
|
245
|
+
sourceTarget;
|
|
246
|
+
constructor(source, sourceTarget) {
|
|
247
|
+
this.source = source;
|
|
248
|
+
this.sourceTarget = sourceTarget;
|
|
249
|
+
}
|
|
250
|
+
debug(message, options) {
|
|
251
|
+
const logMessage = new LogMessage(message, LogLevel.Debug, {
|
|
252
|
+
source: this.source,
|
|
253
|
+
sourceTarget: this.sourceTarget,
|
|
254
|
+
...options
|
|
255
|
+
});
|
|
256
|
+
globalLogHandler(logMessage);
|
|
257
|
+
}
|
|
258
|
+
info(message, options) {
|
|
259
|
+
const logMessage = new LogMessage(message, LogLevel.Info, {
|
|
260
|
+
source: this.source,
|
|
261
|
+
sourceTarget: this.sourceTarget,
|
|
262
|
+
...options
|
|
263
|
+
});
|
|
264
|
+
globalLogHandler(logMessage);
|
|
265
|
+
}
|
|
266
|
+
warn(message, options) {
|
|
267
|
+
const logMessage = new LogMessage(message, LogLevel.Warn, {
|
|
268
|
+
source: this.source,
|
|
269
|
+
sourceTarget: this.sourceTarget,
|
|
270
|
+
...options
|
|
271
|
+
});
|
|
272
|
+
globalLogHandler(logMessage);
|
|
273
|
+
}
|
|
274
|
+
error(message, options) {
|
|
275
|
+
const logMessage = new LogMessage(message, LogLevel.Error, {
|
|
276
|
+
source: this.source,
|
|
277
|
+
sourceTarget: this.sourceTarget,
|
|
278
|
+
...options
|
|
279
|
+
});
|
|
280
|
+
globalLogHandler(logMessage);
|
|
281
|
+
}
|
|
282
|
+
progress(message, options) {
|
|
283
|
+
const logMessage = new LogMessage(message, LogLevel.Info, {
|
|
284
|
+
source: this.source,
|
|
285
|
+
sourceTarget: this.sourceTarget,
|
|
286
|
+
...options
|
|
287
|
+
});
|
|
288
|
+
globalLogHandler(logMessage);
|
|
289
|
+
}
|
|
290
|
+
log(message, logLevel, options) {
|
|
291
|
+
const logMessage = new LogMessage(message, logLevel, {
|
|
292
|
+
source: this.source,
|
|
293
|
+
sourceTarget: this.sourceTarget,
|
|
294
|
+
...options
|
|
295
|
+
});
|
|
296
|
+
globalLogHandler(logMessage);
|
|
297
|
+
}
|
|
298
|
+
logMessage(message) {
|
|
299
|
+
globalLogHandler(message);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
class BaseNodePackagerFactory {
|
|
304
|
+
getOrCreateFileSystem(config) {
|
|
305
|
+
return config?.fileSystem ?? new NodeFileSystem;
|
|
306
|
+
}
|
|
307
|
+
getOrCreateTelemetryService(config) {
|
|
308
|
+
if (config?.telemetryService) {
|
|
309
|
+
return config.telemetryService;
|
|
310
|
+
}
|
|
311
|
+
const provider = new ConsoleTelemetryProvider;
|
|
312
|
+
const contextStorage = new NodeContextStorage;
|
|
313
|
+
return new TelemetryService(provider, contextStorage);
|
|
314
|
+
}
|
|
315
|
+
checkDotnetAvailability(logger) {
|
|
316
|
+
logger.info("Checking for dotnet CLI availability...");
|
|
317
|
+
try {
|
|
318
|
+
execSync("dotnet --version", {
|
|
319
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
320
|
+
});
|
|
321
|
+
logger.info("dotnet CLI is available.");
|
|
322
|
+
} catch {
|
|
323
|
+
logger.error("dotnet CLI is not available. Workflow compiler functionality and package signing will not be available.");
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
configureLogHandler(config) {
|
|
327
|
+
if (config?.logHandler) {
|
|
328
|
+
setGlobalLogHandler(config.logHandler);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
configureLanguage(config) {
|
|
332
|
+
const language = config?.language ?? "en";
|
|
333
|
+
translate.setLocale(language);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
class PackagerParameters {
|
|
338
|
+
inputPath;
|
|
339
|
+
logLevel = LogLevel2.Warn;
|
|
340
|
+
outputPath;
|
|
341
|
+
targetFramework;
|
|
342
|
+
excludeConfiguredSources = false;
|
|
343
|
+
nuGetSourcesConfigPath;
|
|
344
|
+
detailedLogPath;
|
|
345
|
+
connection;
|
|
346
|
+
workflowCompilerVersion;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
class NodePackageSignService {
|
|
350
|
+
logger;
|
|
351
|
+
constructor(logger) {
|
|
352
|
+
this.logger = logger;
|
|
353
|
+
}
|
|
354
|
+
async signPackageAsync(packagePath, certificatePath, certificatePassword, timestampServer) {
|
|
355
|
+
if (!this.checkAvailable()) {
|
|
356
|
+
this.logger.error(translate2.t("solutionpackager.signing.info.dotnetNotAvailable"));
|
|
357
|
+
return ToolResult.error(ToolErrorCodes.InternalError, translate2.t("solutionpackager.signing.errors.dotnetNotAvailable"));
|
|
358
|
+
}
|
|
359
|
+
const args = [
|
|
360
|
+
"nuget",
|
|
361
|
+
"sign",
|
|
362
|
+
packagePath,
|
|
363
|
+
"--certificate-path",
|
|
364
|
+
certificatePath,
|
|
365
|
+
"--overwrite"
|
|
366
|
+
];
|
|
367
|
+
if (certificatePassword) {
|
|
368
|
+
args.push("--certificate-password", certificatePassword);
|
|
369
|
+
}
|
|
370
|
+
if (timestampServer) {
|
|
371
|
+
args.push("--timestamper", timestampServer);
|
|
372
|
+
}
|
|
373
|
+
return new Promise((resolve) => {
|
|
374
|
+
const childProcess = spawn("dotnet", args, {
|
|
375
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
376
|
+
shell: false,
|
|
377
|
+
windowsHide: true
|
|
378
|
+
});
|
|
379
|
+
let stderr = "";
|
|
380
|
+
childProcess.stdout?.on("data", (data) => {
|
|
381
|
+
this.logger.info(data.toString().trim());
|
|
382
|
+
});
|
|
383
|
+
childProcess.stderr?.on("data", (data) => {
|
|
384
|
+
stderr += data.toString();
|
|
385
|
+
});
|
|
386
|
+
childProcess.on("error", (error) => {
|
|
387
|
+
this.logger.error(`Failed to start dotnet process: ${error.message}`);
|
|
388
|
+
resolve(ToolResult.error(ToolErrorCodes.InternalError, `Failed to start dotnet process: ${error.message}`));
|
|
389
|
+
});
|
|
390
|
+
childProcess.on("exit", (code) => {
|
|
391
|
+
if (code === 0) {
|
|
392
|
+
this.logger.info(`Successfully signed package: ${packagePath}`);
|
|
393
|
+
resolve(ToolResult.success());
|
|
394
|
+
} else {
|
|
395
|
+
const errorMessage = stderr.trim() || `dotnet nuget sign exited with code ${code}`;
|
|
396
|
+
this.logger.error(`Package signing failed: ${errorMessage}`);
|
|
397
|
+
resolve(ToolResult.error(ToolErrorCodes.InternalError, `Package signing failed: ${errorMessage}`));
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
checkAvailable() {
|
|
403
|
+
try {
|
|
404
|
+
const output = execSync2("dotnet nuget --version", {
|
|
405
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
406
|
+
encoding: "utf-8"
|
|
407
|
+
});
|
|
408
|
+
this.logger.info(`dotnet CLI found, version ${output.trim()}`);
|
|
409
|
+
return true;
|
|
410
|
+
} catch {
|
|
411
|
+
return false;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
class GovernancePolicyService {
|
|
417
|
+
fileSystem;
|
|
418
|
+
temporaryStorage;
|
|
419
|
+
fetchFn;
|
|
420
|
+
logger = new ToolLogger("GovernancePolicyService", "ResolvePolicy");
|
|
421
|
+
constructor(fileSystem, temporaryStorage, fetchFn = fetch.bind(globalThis)) {
|
|
422
|
+
this.fileSystem = fileSystem;
|
|
423
|
+
this.temporaryStorage = temporaryStorage;
|
|
424
|
+
this.fetchFn = fetchFn;
|
|
425
|
+
}
|
|
426
|
+
async resolveGovernancePolicyAsync(validateOptions, connectionInfo, cancellationToken) {
|
|
427
|
+
if (validateOptions.governanceFileType !== "AutomationOps") {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
if (validateOptions.governanceFilePath) {
|
|
431
|
+
this.logger.info(t("info.alreadyProvided"));
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
const cloudUrl = connectionInfo?.cloudUrl;
|
|
435
|
+
const organizationId = connectionInfo?.organizationId;
|
|
436
|
+
const tenantId = connectionInfo?.tenantId;
|
|
437
|
+
const accessToken = connectionInfo?.accessToken;
|
|
438
|
+
if (!cloudUrl || !organizationId || !tenantId || !accessToken) {
|
|
439
|
+
this.logger.warn(t("errors.connectionIncomplete"));
|
|
440
|
+
validateOptions.governanceFileType = "Default";
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
const profileKey = validateOptions.profileKey ?? DEFAULT_PROFILE_KEY;
|
|
444
|
+
const orchestratorUrl = toRelativeUrl(cloudUrl);
|
|
445
|
+
const licenseType = await this.resolveLicenseTypeAsync(profileKey, orchestratorUrl, accessToken, cancellationToken);
|
|
446
|
+
const policy = await this.downloadPolicyAsync(organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken);
|
|
447
|
+
if (!policy) {
|
|
448
|
+
validateOptions.governanceFileType = "Default";
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
try {
|
|
452
|
+
const dir = await this.temporaryStorage.getTempSubfolderPathAsync(GOVERNANCE_SUBFOLDER);
|
|
453
|
+
const filePath = Path.join(dir, GOVERNANCE_FILE_NAME);
|
|
454
|
+
await this.fileSystem.writeFile(filePath, policy);
|
|
455
|
+
this.logger.info(t("info.saved", { path: filePath }));
|
|
456
|
+
validateOptions.governanceFilePath = filePath;
|
|
457
|
+
} catch (error) {
|
|
458
|
+
this.logger.warn(t("errors.failedToSave", {
|
|
459
|
+
error: errorMessage(error)
|
|
460
|
+
}));
|
|
461
|
+
validateOptions.governanceFileType = "Default";
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
async downloadPolicyAsync(organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken) {
|
|
465
|
+
const policyUrl = `/${organizationId}/roboticsops_` + `/api/Policy/license/${licenseType}/product/${profileKey}/tenant/${tenantId}`;
|
|
466
|
+
this.logger.info(t("info.downloading", { url: policyUrl }));
|
|
467
|
+
try {
|
|
468
|
+
const response = await this.fetchFn(policyUrl, {
|
|
469
|
+
headers: {
|
|
470
|
+
Authorization: `Bearer ${accessToken}`,
|
|
471
|
+
AccountId: organizationId
|
|
472
|
+
},
|
|
473
|
+
signal: cancellationToken
|
|
474
|
+
});
|
|
475
|
+
if (response.status === 204 || response.status === 404) {
|
|
476
|
+
this.logger.info(t("info.noPolicyFound"));
|
|
477
|
+
return null;
|
|
478
|
+
}
|
|
479
|
+
if (!response.ok) {
|
|
480
|
+
const body = await response.text();
|
|
481
|
+
this.logger.warn(t("errors.failedToGetPolicy", { content: body }));
|
|
482
|
+
return null;
|
|
483
|
+
}
|
|
484
|
+
const content = await response.text();
|
|
485
|
+
if (!content?.trimStart().startsWith("{")) {
|
|
486
|
+
this.logger.info(t("info.responseNotJson"));
|
|
487
|
+
return null;
|
|
488
|
+
}
|
|
489
|
+
return content;
|
|
490
|
+
} catch (error) {
|
|
491
|
+
this.logger.warn(t("errors.failedToDownload", {
|
|
492
|
+
error: errorMessage(error)
|
|
493
|
+
}));
|
|
494
|
+
return null;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
async resolveLicenseTypeAsync(profileKey, orchestratorUrl, accessToken, cancellationToken) {
|
|
498
|
+
const isStudioWeb = profileKey === DEFAULT_PROFILE_KEY;
|
|
499
|
+
const fallback = isStudioWeb ? LICENSE_TYPES.NoLicense : LICENSE_TYPES.Development;
|
|
500
|
+
try {
|
|
501
|
+
const response = await this.fetchFn(`${orchestratorUrl}${ACQUIRE_LICENSE_PATH}`, {
|
|
502
|
+
method: "POST",
|
|
503
|
+
headers: { Authorization: `Bearer ${accessToken}` },
|
|
504
|
+
signal: cancellationToken
|
|
505
|
+
});
|
|
506
|
+
if (!response.ok) {
|
|
507
|
+
this.logger.info(t("info.licenseStatus", {
|
|
508
|
+
status: response.status,
|
|
509
|
+
fallback
|
|
510
|
+
}));
|
|
511
|
+
return fallback;
|
|
512
|
+
}
|
|
513
|
+
const { isLicensed, robotType } = await response.json();
|
|
514
|
+
this.logger.info(t("info.licenseResponse", {
|
|
515
|
+
isLicensed: String(isLicensed),
|
|
516
|
+
robotType: String(robotType)
|
|
517
|
+
}));
|
|
518
|
+
if (!isLicensed || !robotType) {
|
|
519
|
+
return fallback;
|
|
520
|
+
}
|
|
521
|
+
if (isStudioWeb) {
|
|
522
|
+
return robotType === LICENSE_TYPES.AutomationKit ? LICENSE_TYPES.AutomationKit : LICENSE_TYPES.NoLicense;
|
|
523
|
+
}
|
|
524
|
+
return robotType;
|
|
525
|
+
} catch (error) {
|
|
526
|
+
this.logger.info(t("info.licenseFailed", {
|
|
527
|
+
error: errorMessage(error),
|
|
528
|
+
fallback
|
|
529
|
+
}));
|
|
530
|
+
return fallback;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
class PackService {
|
|
536
|
+
disallowedCharsRegex = /[^\w.-]/g;
|
|
537
|
+
spacesDotRegex = /[\s.]+/g;
|
|
538
|
+
dotDashRegex = /\.{0,10}[-:]\.{0,10}/g;
|
|
539
|
+
MaxPackageIdLength = 100;
|
|
540
|
+
sanitizePackageId(packageId) {
|
|
541
|
+
packageId = packageId.trim();
|
|
542
|
+
packageId = packageId.replace(this.spacesDotRegex, ".");
|
|
543
|
+
packageId = packageId.replace(this.dotDashRegex, "-");
|
|
544
|
+
packageId = packageId.replace(this.disallowedCharsRegex, "_");
|
|
545
|
+
if (packageId.length > this.MaxPackageIdLength) {
|
|
546
|
+
throw new Error(`Package id ${packageId} exceeds the characters limit of ${this.MaxPackageIdLength}`);
|
|
547
|
+
}
|
|
548
|
+
return packageId;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
class PackagerParametersValidator {
|
|
553
|
+
logger;
|
|
554
|
+
fileSystem;
|
|
555
|
+
constructor(logger, fileSystem) {
|
|
556
|
+
this.logger = logger;
|
|
557
|
+
this.fileSystem = fileSystem;
|
|
558
|
+
}
|
|
559
|
+
async validateAsync(_options, _cancellationToken) {
|
|
560
|
+
return ToolResult2.success();
|
|
561
|
+
}
|
|
562
|
+
validateDestinationPath(destinationPath) {
|
|
563
|
+
if (!destinationPath) {
|
|
564
|
+
const error = translate4.t("solutionpackager.validator.errors.destinationNotDefined");
|
|
565
|
+
this.logger.error(error);
|
|
566
|
+
return ToolResult2.error(ToolErrorCodes2.InternalError, error);
|
|
567
|
+
}
|
|
568
|
+
return ToolResult2.success();
|
|
569
|
+
}
|
|
570
|
+
async validateGovernanceOptions(validateOptions) {
|
|
571
|
+
if (validateOptions.governanceFileType === "Default") {
|
|
572
|
+
if (validateOptions.governanceFilePath) {
|
|
573
|
+
this.logger.warn(`Governance file path '${validateOptions.governanceFilePath}' will be ignored when governance file type is Default`);
|
|
574
|
+
}
|
|
575
|
+
return ToolResult2.success();
|
|
576
|
+
}
|
|
577
|
+
if (!validateOptions.governanceFilePath) {
|
|
578
|
+
const error = translate4.t("solutionpackager.validator.errors.governanceRequired");
|
|
579
|
+
this.logger.error(error);
|
|
580
|
+
return ToolResult2.error(ToolErrorCodes2.InternalError, error);
|
|
581
|
+
}
|
|
582
|
+
try {
|
|
583
|
+
const stat = await this.fileSystem.stat(validateOptions.governanceFilePath);
|
|
584
|
+
if (!stat) {
|
|
585
|
+
const error = translate4.t("solutionpackager.validator.errors.governanceFileInfo", {
|
|
586
|
+
path: validateOptions.governanceFilePath
|
|
587
|
+
});
|
|
588
|
+
this.logger.error(error);
|
|
589
|
+
return ToolResult2.error(ToolErrorCodes2.InternalError, error);
|
|
590
|
+
}
|
|
591
|
+
if (stat.isDirectory()) {
|
|
592
|
+
const error = translate4.t("solutionpackager.validator.errors.governanceInvalidFile", {
|
|
593
|
+
path: validateOptions.governanceFilePath
|
|
594
|
+
});
|
|
595
|
+
this.logger.error(error);
|
|
596
|
+
return ToolResult2.error(ToolErrorCodes2.InternalError, error);
|
|
597
|
+
}
|
|
598
|
+
} catch (error) {
|
|
599
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
600
|
+
const errorLog = `Governance file not found or inaccessible: ${validateOptions.governanceFilePath}. Error: ${errorMessage2}`;
|
|
601
|
+
this.logger.error(errorLog);
|
|
602
|
+
return ToolResult2.error(ToolErrorCodes2.InternalError, errorLog);
|
|
603
|
+
}
|
|
604
|
+
this.logger.info(`Using Studio governance file: ${validateOptions.governanceFilePath}`);
|
|
605
|
+
return ToolResult2.success();
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
class ProjectLoader {
|
|
610
|
+
fileSystem;
|
|
611
|
+
static ProjectFileName = "project.uiproj";
|
|
612
|
+
static WebAppManifestFileName = "webAppManifest.json";
|
|
613
|
+
constructor(fileSystem) {
|
|
614
|
+
this.fileSystem = fileSystem;
|
|
615
|
+
}
|
|
616
|
+
async loadProject(projectPath) {
|
|
617
|
+
if (!projectPath) {
|
|
618
|
+
throw new Error(translate5.t("solutionpackager.projectLoader.errors.pathRequired"));
|
|
619
|
+
}
|
|
620
|
+
const projectFilePath = Path2.join(projectPath, ProjectLoader.ProjectFileName);
|
|
621
|
+
const projectFileExists = await this.fileSystem.exists(projectFilePath);
|
|
622
|
+
if (projectFileExists) {
|
|
623
|
+
return await this.loadFromProjectFile(projectPath, projectFilePath);
|
|
624
|
+
}
|
|
625
|
+
const webAppManifestPath = Path2.join(projectPath, ProjectLoader.WebAppManifestFileName);
|
|
626
|
+
const webAppManifestExists = await this.fileSystem.exists(webAppManifestPath);
|
|
627
|
+
if (webAppManifestExists) {
|
|
628
|
+
return this.loadFromWebAppManifest(projectPath, webAppManifestPath);
|
|
629
|
+
}
|
|
630
|
+
throw new Error(translate5.t("solutionpackager.projectLoader.errors.noProjectFile", {
|
|
631
|
+
projectFile: ProjectLoader.ProjectFileName,
|
|
632
|
+
manifestFile: ProjectLoader.WebAppManifestFileName,
|
|
633
|
+
path: projectPath
|
|
634
|
+
}));
|
|
635
|
+
}
|
|
636
|
+
async loadFromProjectFile(projectPath, projectFilePath) {
|
|
637
|
+
const fileContent = await this.fileSystem.readFile(projectFilePath);
|
|
638
|
+
if (!fileContent) {
|
|
639
|
+
throw new Error(translate5.t("solutionpackager.projectLoader.errors.readFailed", {
|
|
640
|
+
path: projectFilePath
|
|
641
|
+
}));
|
|
642
|
+
}
|
|
643
|
+
const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
|
|
644
|
+
const projectData = JSON.parse(json);
|
|
645
|
+
const projectType = projectData?.ProjectType || projectData?.type;
|
|
646
|
+
if (!projectData || !projectType) {
|
|
647
|
+
throw new Error(translate5.t("solutionpackager.projectLoader.errors.invalidProject", {
|
|
648
|
+
path: projectFilePath
|
|
649
|
+
}));
|
|
650
|
+
}
|
|
651
|
+
return {
|
|
652
|
+
type: projectType,
|
|
653
|
+
name: projectData.Name || Path2.basename(projectPath),
|
|
654
|
+
projectPath,
|
|
655
|
+
projectFilePath
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
loadFromWebAppManifest(projectPath, webAppManifestPath) {
|
|
659
|
+
const folderName = Path2.basename(projectPath);
|
|
660
|
+
return {
|
|
661
|
+
type: ProjectTypes.AppV2,
|
|
662
|
+
name: folderName,
|
|
663
|
+
projectPath,
|
|
664
|
+
projectFilePath: webAppManifestPath
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
class ProjectPackOptionsBuilder {
|
|
670
|
+
packService;
|
|
671
|
+
fileSystem;
|
|
672
|
+
constructor(packService, fileSystem) {
|
|
673
|
+
this.packService = packService;
|
|
674
|
+
this.fileSystem = fileSystem;
|
|
675
|
+
}
|
|
676
|
+
async buildProjectPackOptions(parameters, project) {
|
|
677
|
+
if (!parameters.outputPath) {
|
|
678
|
+
throw new Error("Output path is required for Pack command");
|
|
679
|
+
}
|
|
680
|
+
await this.fileSystem.mkdir(parameters.outputPath);
|
|
681
|
+
const packageId = !parameters.package.id || parameters.package.id.trim() === "" ? project.name : parameters.package.id;
|
|
682
|
+
const packageInfo = {
|
|
683
|
+
...parameters.package,
|
|
684
|
+
id: this.packService.sanitizePackageId(packageId)
|
|
685
|
+
};
|
|
686
|
+
return {
|
|
687
|
+
projectPath: project.projectPath,
|
|
688
|
+
excludeConfiguredSources: parameters.excludeConfiguredSources ?? false,
|
|
689
|
+
nuGetSourcesConfigPath: parameters.nuGetSourcesConfigPath,
|
|
690
|
+
logLevel: parameters.logLevel,
|
|
691
|
+
skipAnalyze: parameters.validateOptions.skipAnalyze,
|
|
692
|
+
skipValidate: false,
|
|
693
|
+
detailedLogPath: parameters.detailedLogPath,
|
|
694
|
+
policyFilePath: parameters.validateOptions.governanceFilePath,
|
|
695
|
+
policyFileType: parameters.validateOptions.governanceFileType,
|
|
696
|
+
outputPath: parameters.outputPath,
|
|
697
|
+
outputType: undefined,
|
|
698
|
+
projectType: project.type,
|
|
699
|
+
package: packageInfo,
|
|
700
|
+
skipDependencyOptimization: parameters.packOptions?.skipDependencyOptimization ?? false,
|
|
701
|
+
includeSources: parameters.packOptions?.includeSources ?? false,
|
|
702
|
+
splitPackages: parameters.packOptions?.splitPackages ?? false
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
class ProjectToolExecutor {
|
|
708
|
+
toolsFactory;
|
|
709
|
+
telemetry;
|
|
710
|
+
packageSignService;
|
|
711
|
+
constructor(toolsFactory, telemetry, packageSignService) {
|
|
712
|
+
this.toolsFactory = toolsFactory;
|
|
713
|
+
this.telemetry = telemetry;
|
|
714
|
+
this.packageSignService = packageSignService;
|
|
715
|
+
}
|
|
716
|
+
async restoreAsync(options, project, context, cancellationToken) {
|
|
717
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Restore", project.Type, async () => tool.restoreAsync(options, cancellationToken), {
|
|
718
|
+
projectId: project.Id,
|
|
719
|
+
projectType: project.Type
|
|
720
|
+
}));
|
|
721
|
+
}
|
|
722
|
+
async validateAsync(options, project, context, cancellationToken) {
|
|
723
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Validate", project.Type, async () => tool.validateAsync(options, cancellationToken), {
|
|
724
|
+
projectId: project.Id,
|
|
725
|
+
projectType: project.Type
|
|
726
|
+
}));
|
|
727
|
+
}
|
|
728
|
+
async buildAsync(options, project, context, cancellationToken) {
|
|
729
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Build", project.Type, async () => tool.buildAsync(options, cancellationToken), {
|
|
730
|
+
projectId: project.Id,
|
|
731
|
+
projectType: project.Type
|
|
732
|
+
}));
|
|
733
|
+
}
|
|
734
|
+
async packAsync(options, project, context, signingInfo, cancellationToken) {
|
|
735
|
+
return await this.executeToolOperationAsync(project, context, async (tool) => {
|
|
736
|
+
const result = await this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Pack", project.Type, async () => {
|
|
737
|
+
return await tool.packAsync(options, cancellationToken);
|
|
738
|
+
}, {
|
|
739
|
+
projectId: project.Id,
|
|
740
|
+
projectType: project.Type
|
|
741
|
+
});
|
|
742
|
+
if (result.isSuccess && signingInfo?.certificatePath && result.packages.length > 0) {
|
|
743
|
+
const signResult = await this.signPackagesAsync(result.packages, signingInfo);
|
|
744
|
+
if (!signResult.isSuccess) {
|
|
745
|
+
return signResult;
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
return result;
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
async executeToolOperationAsync(project, context, operation) {
|
|
752
|
+
try {
|
|
753
|
+
const tool = await this.toolsFactory.createProjectToolAsync(project, context);
|
|
754
|
+
try {
|
|
755
|
+
return await operation(tool);
|
|
756
|
+
} finally {
|
|
757
|
+
const disposeResult = tool.dispose();
|
|
758
|
+
if (disposeResult instanceof Promise) {
|
|
759
|
+
await disposeResult;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
} catch (error) {
|
|
763
|
+
return ToolResult3.error(ToolErrorCodes3.InternalError, error instanceof Error ? error.message : String(error));
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
async signPackagesAsync(packages, signingInfo) {
|
|
767
|
+
if (!this.packageSignService) {
|
|
768
|
+
return ToolResult3.error(ToolErrorCodes3.InternalError, "Package signing is required but signing service is not available. Package signing requires dotnet CLI to be installed in Node.js environment.");
|
|
769
|
+
}
|
|
770
|
+
const certificatePath = signingInfo.certificatePath;
|
|
771
|
+
const signResults = await Promise.all(packages.map((packagePath) => this.packageSignService?.signPackageAsync(packagePath, certificatePath, signingInfo.certificatePassword, signingInfo.timestampServer)));
|
|
772
|
+
const failedResult = signResults.find((result) => result && !result.isSuccess);
|
|
773
|
+
if (failedResult) {
|
|
774
|
+
return failedResult;
|
|
775
|
+
}
|
|
776
|
+
return ToolResult3.success();
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
class ToolsFactory {
|
|
781
|
+
repository;
|
|
782
|
+
fileSystem;
|
|
783
|
+
constructor(repository, fileSystem) {
|
|
784
|
+
this.repository = repository;
|
|
785
|
+
this.fileSystem = fileSystem;
|
|
786
|
+
}
|
|
787
|
+
async createSolutionToolAsync(solutionName) {
|
|
788
|
+
const logger = new ToolLogger("ResourceBuilder", solutionName);
|
|
789
|
+
const factory = this.repository.getSolutionToolFactory();
|
|
790
|
+
return await factory.createAsync(logger, this.fileSystem);
|
|
791
|
+
}
|
|
792
|
+
async createProjectToolAsync(project, context) {
|
|
793
|
+
const sourceTarget = getSourceTarget();
|
|
794
|
+
const logger = new ToolLogger(project.Type, sourceTarget);
|
|
795
|
+
if (!project.ProjectPath) {
|
|
796
|
+
throw new Error(`Project path not set for project: ${project.Id}`);
|
|
797
|
+
}
|
|
798
|
+
const factory = this.repository.getProjectToolFactory(project.Type);
|
|
799
|
+
return await factory.createAsync(logger, this.fileSystem, context);
|
|
800
|
+
function getSourceTarget() {
|
|
801
|
+
const segments = project.ProjectRelativePath.split(/[/\\]/);
|
|
802
|
+
if (segments.length > 1) {
|
|
803
|
+
return segments[0];
|
|
804
|
+
}
|
|
805
|
+
return project.Id;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
class ProjectPackager {
|
|
811
|
+
fileSystem;
|
|
812
|
+
telemetryService;
|
|
813
|
+
packageSignService;
|
|
814
|
+
repository;
|
|
815
|
+
temporaryStorage;
|
|
816
|
+
zipService;
|
|
817
|
+
logger;
|
|
818
|
+
optionsBuilder;
|
|
819
|
+
toolsFactory;
|
|
820
|
+
projectExecutor;
|
|
821
|
+
projectLoader;
|
|
822
|
+
validateOptionsValidator;
|
|
823
|
+
buildOptionsValidator;
|
|
824
|
+
packOptionsValidator;
|
|
825
|
+
nugetPackager;
|
|
826
|
+
governancePolicyService;
|
|
827
|
+
constructor(fileSystem, telemetryService, packageSignService) {
|
|
828
|
+
this.fileSystem = fileSystem;
|
|
829
|
+
this.telemetryService = telemetryService;
|
|
830
|
+
this.packageSignService = packageSignService;
|
|
831
|
+
this.repository = defaultToolsFactoryRepository;
|
|
832
|
+
this.temporaryStorage = new TemporaryStorageService(this.fileSystem);
|
|
833
|
+
this.zipService = new ZipService(this.fileSystem);
|
|
834
|
+
this.nugetPackager = new NugetPackager(this.fileSystem);
|
|
835
|
+
this.logger = new ToolLogger("ProjectPackager", "PackProject");
|
|
836
|
+
this.validateOptionsValidator = new ProjectValidateOptionsValidator(this.logger, this.fileSystem);
|
|
837
|
+
this.buildOptionsValidator = new ProjectBuildOptionsValidator(this.logger, this.fileSystem);
|
|
838
|
+
this.packOptionsValidator = new ProjectPackOptionsValidator(this.logger, this.fileSystem);
|
|
839
|
+
const packService = new PackService;
|
|
840
|
+
this.optionsBuilder = new ProjectPackOptionsBuilder(packService, this.fileSystem);
|
|
841
|
+
this.toolsFactory = new ToolsFactory(this.repository, this.fileSystem);
|
|
842
|
+
this.projectExecutor = new ProjectToolExecutor(this.toolsFactory, this.telemetryService, this.packageSignService);
|
|
843
|
+
this.projectLoader = new ProjectLoader(this.fileSystem);
|
|
844
|
+
this.governancePolicyService = new GovernancePolicyService(this.fileSystem, this.temporaryStorage);
|
|
845
|
+
}
|
|
846
|
+
async canPackProjectAsync(projectPath) {
|
|
847
|
+
const project = await this.projectLoader.loadProject(projectPath);
|
|
848
|
+
return this.repository.canHandleProject(project.type);
|
|
849
|
+
}
|
|
850
|
+
async setupAsync(input, operationId) {
|
|
851
|
+
this.telemetryService.setOperationId(operationId);
|
|
852
|
+
await this.temporaryStorage.cleanup();
|
|
853
|
+
if (typeof input === "string") {
|
|
854
|
+
return input;
|
|
855
|
+
}
|
|
856
|
+
const inputPath = await this.temporaryStorage.getTempSubfolderPathAsync("input");
|
|
857
|
+
await this.zipService.extractAsync(input, inputPath);
|
|
858
|
+
const entries = await this.fileSystem.readdir(inputPath);
|
|
859
|
+
if (entries.length === 1) {
|
|
860
|
+
const innerPath = Path3.join(inputPath, entries[0]);
|
|
861
|
+
const stat = await this.fileSystem.stat(innerPath);
|
|
862
|
+
if (stat?.isDirectory()) {
|
|
863
|
+
return innerPath;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
return inputPath;
|
|
867
|
+
}
|
|
868
|
+
async restoreProjectAsync(options, cancellationToken) {
|
|
869
|
+
return await this.executeProjectOperationAsync(options, "Restore", "ProjectPackager.Restore", async (uiPathProject, loadedProject) => {
|
|
870
|
+
const restoreOptions = {
|
|
871
|
+
projectPath: loadedProject.projectPath,
|
|
872
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
873
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
874
|
+
logLevel: options.logLevel,
|
|
875
|
+
outputPath: options.outputPath
|
|
876
|
+
};
|
|
877
|
+
return await this.projectExecutor.restoreAsync(restoreOptions, uiPathProject, undefined, cancellationToken);
|
|
878
|
+
}, cancellationToken);
|
|
879
|
+
}
|
|
880
|
+
async validateProjectAsync(options, cancellationToken) {
|
|
881
|
+
await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken);
|
|
882
|
+
const validationResult = await this.validateOptionsValidator.validateAsync(options, cancellationToken);
|
|
883
|
+
if (!validationResult.isSuccess) {
|
|
884
|
+
return validationResult;
|
|
885
|
+
}
|
|
886
|
+
return await this.executeProjectOperationAsync(options, "Validate", "ProjectPackager.Validate", async (uiPathProject, loadedProject) => {
|
|
887
|
+
const validateOptions = {
|
|
888
|
+
projectPath: loadedProject.projectPath,
|
|
889
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
890
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
891
|
+
logLevel: options.logLevel,
|
|
892
|
+
skipAnalyze: options.validateOptions.skipAnalyze,
|
|
893
|
+
defaultSeverity: options.validateOptions.defaultSeverity,
|
|
894
|
+
detailedLogPath: options.detailedLogPath,
|
|
895
|
+
policyFilePath: options.validateOptions.governanceFilePath,
|
|
896
|
+
policyFileType: options.validateOptions.governanceFileType
|
|
897
|
+
};
|
|
898
|
+
return await this.projectExecutor.validateAsync(validateOptions, uiPathProject, undefined, cancellationToken);
|
|
899
|
+
}, cancellationToken);
|
|
900
|
+
}
|
|
901
|
+
async buildProjectAsync(options, cancellationToken) {
|
|
902
|
+
await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken);
|
|
903
|
+
const validationResult = await this.buildOptionsValidator.validateAsync(options, cancellationToken);
|
|
904
|
+
if (!validationResult.isSuccess) {
|
|
905
|
+
return validationResult;
|
|
906
|
+
}
|
|
907
|
+
return await this.executeProjectOperationAsync(options, "Build", "ProjectPackager.Build", async (uiPathProject, loadedProject) => {
|
|
908
|
+
if (!options.outputPath) {
|
|
909
|
+
options.outputPath = await this.temporaryStorage.getTempSubfolderPathAsync("output");
|
|
910
|
+
}
|
|
911
|
+
const buildOptions = {
|
|
912
|
+
projectPath: loadedProject.projectPath,
|
|
913
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
914
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
915
|
+
logLevel: options.logLevel,
|
|
916
|
+
skipAnalyze: options.validateOptions.skipAnalyze,
|
|
917
|
+
skipValidate: false,
|
|
918
|
+
detailedLogPath: options.detailedLogPath,
|
|
919
|
+
policyFilePath: options.validateOptions.governanceFilePath,
|
|
920
|
+
policyFileType: options.validateOptions.governanceFileType,
|
|
921
|
+
outputPath: options.outputPath,
|
|
922
|
+
outputType: undefined,
|
|
923
|
+
projectType: uiPathProject.Type
|
|
924
|
+
};
|
|
925
|
+
return await this.projectExecutor.buildAsync(buildOptions, uiPathProject, undefined, cancellationToken);
|
|
926
|
+
}, cancellationToken);
|
|
927
|
+
}
|
|
928
|
+
async packProjectAsync(options, cancellationToken) {
|
|
929
|
+
return await this.telemetryService.trackRequest("ProjectPackager.Pack", async () => {
|
|
930
|
+
try {
|
|
931
|
+
await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken);
|
|
932
|
+
let result = await this.packOptionsValidator.validateAsync(options, cancellationToken);
|
|
933
|
+
if (!result.isSuccess) {
|
|
934
|
+
return result;
|
|
935
|
+
}
|
|
936
|
+
if (!options.outputPath) {
|
|
937
|
+
options.outputPath = await this.temporaryStorage.getTempSubfolderPathAsync("output");
|
|
938
|
+
}
|
|
939
|
+
const loadedProject = await this.projectLoader.loadProject(options.inputPath);
|
|
940
|
+
this.telemetryService.trackEvent("ProjectPackager.ProjectLoaded", { projectId: loadedProject.name });
|
|
941
|
+
const projectPackOptions = await this.optionsBuilder.buildProjectPackOptions(options, loadedProject);
|
|
942
|
+
const uiPathProject = {
|
|
943
|
+
Type: loadedProject.type,
|
|
944
|
+
ProjectRelativePath: Path3.basename(loadedProject.projectFilePath),
|
|
945
|
+
ProjectPath: loadedProject.projectPath,
|
|
946
|
+
Id: loadedProject.name
|
|
947
|
+
};
|
|
948
|
+
result = await this.projectExecutor.packAsync(projectPackOptions, uiPathProject, undefined, options.signingInfo, cancellationToken);
|
|
949
|
+
if (result.isSuccess && result.packages.length > 0) {
|
|
950
|
+
const destinationPackages = await this.copyPackagesToDestination(result.packages, options.destinationPath, projectPackOptions.package);
|
|
951
|
+
result = new ToolResult4(ToolErrorCodes4.Success, undefined, destinationPackages);
|
|
952
|
+
}
|
|
953
|
+
if (result.isSuccess) {
|
|
954
|
+
this.logger.info(`Project pack completed successfully. Packages: ${result.packages.join(", ")}`);
|
|
955
|
+
} else {
|
|
956
|
+
this.logger.error(`Project pack failed with error code ${result.errorCode}: ${result.message}`);
|
|
957
|
+
}
|
|
958
|
+
return result;
|
|
959
|
+
} catch (error) {
|
|
960
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
961
|
+
this.logger.error(`Processing error: ${errorMessage2}`);
|
|
962
|
+
return ToolResult4.error(ToolErrorCodes4.InternalError, `Project pack failed: ${errorMessage2}`);
|
|
963
|
+
} finally {
|
|
964
|
+
await this.temporaryStorage.cleanup();
|
|
965
|
+
}
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
async getPackageStreamsAsync(result) {
|
|
969
|
+
if (!result.isSuccess) {
|
|
970
|
+
throw new Error(translate6.t("solutionpackager.packager.errors.failedToGetStreams", {
|
|
971
|
+
errorCode: result.errorCode,
|
|
972
|
+
message: result.message ?? ""
|
|
973
|
+
}));
|
|
974
|
+
}
|
|
975
|
+
if (!result.packages || result.packages.length === 0) {
|
|
976
|
+
return [];
|
|
977
|
+
}
|
|
978
|
+
const packageStreams = [];
|
|
979
|
+
for (const packagePath of result.packages) {
|
|
980
|
+
const data = await this.fileSystem.readFile(packagePath);
|
|
981
|
+
if (!data) {
|
|
982
|
+
throw new Error(translate6.t("solutionpackager.packager.errors.failedToReadPackage", {
|
|
983
|
+
path: packagePath
|
|
984
|
+
}));
|
|
985
|
+
}
|
|
986
|
+
const name = packagePath.split(/[\\/]/).pop() || packagePath;
|
|
987
|
+
packageStreams.push({ name, data });
|
|
988
|
+
}
|
|
989
|
+
return packageStreams;
|
|
990
|
+
}
|
|
991
|
+
async executeProjectOperationAsync(options, operationName, telemetryName, operation, _cancellationToken) {
|
|
992
|
+
return await this.telemetryService.trackRequest(telemetryName, async () => {
|
|
993
|
+
try {
|
|
994
|
+
const loadedProject = await this.projectLoader.loadProject(options.inputPath);
|
|
995
|
+
const uiPathProject = {
|
|
996
|
+
Type: loadedProject.type,
|
|
997
|
+
ProjectRelativePath: Path3.basename(loadedProject.projectFilePath),
|
|
998
|
+
ProjectPath: loadedProject.projectPath,
|
|
999
|
+
Id: loadedProject.name
|
|
1000
|
+
};
|
|
1001
|
+
const operationResult = await operation(uiPathProject, loadedProject);
|
|
1002
|
+
if (operationResult.isSuccess) {
|
|
1003
|
+
this.logger.info(`Project ${operationName.toLowerCase()} completed successfully.`);
|
|
1004
|
+
} else {
|
|
1005
|
+
this.logger.error(`Project ${operationName.toLowerCase()} failed with error code ${operationResult.errorCode}: ${operationResult.message}`);
|
|
1006
|
+
}
|
|
1007
|
+
return operationResult;
|
|
1008
|
+
} catch (error) {
|
|
1009
|
+
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
1010
|
+
this.logger.error(`Processing error: ${errorMessage2}`);
|
|
1011
|
+
return ToolResult4.error(ToolErrorCodes4.InternalError, `Project ${operationName.toLowerCase()} failed: ${errorMessage2}`);
|
|
1012
|
+
} finally {
|
|
1013
|
+
await this.temporaryStorage.cleanup();
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
async copyPackagesToDestination(packagePaths, destinationPath, packageInfo) {
|
|
1018
|
+
await this.fileSystem.mkdir(destinationPath);
|
|
1019
|
+
const destinationPackages = [];
|
|
1020
|
+
for (const packagePath of packagePaths) {
|
|
1021
|
+
const stat = await this.fileSystem.stat(packagePath);
|
|
1022
|
+
if (stat?.isDirectory()) {
|
|
1023
|
+
const files = await this.fileSystem.readdir(packagePath);
|
|
1024
|
+
const nupkgFiles = files.filter((f) => f.endsWith(".nupkg"));
|
|
1025
|
+
if (nupkgFiles.length > 0) {
|
|
1026
|
+
for (const nupkgFile of nupkgFiles) {
|
|
1027
|
+
const filePath = Path3.join(packagePath, nupkgFile);
|
|
1028
|
+
const destPath = Path3.join(destinationPath, nupkgFile);
|
|
1029
|
+
const data = await this.fileSystem.readFile(filePath);
|
|
1030
|
+
if (!data) {
|
|
1031
|
+
throw new Error(translate6.t("solutionpackager.packager.errors.failedToReadPackage", {
|
|
1032
|
+
path: filePath
|
|
1033
|
+
}));
|
|
1034
|
+
}
|
|
1035
|
+
await this.fileSystem.writeFile(destPath, data);
|
|
1036
|
+
destinationPackages.push(destPath);
|
|
1037
|
+
}
|
|
1038
|
+
} else {
|
|
1039
|
+
const nupkgFileName = `${packageInfo.id}.${packageInfo.version}.nupkg`;
|
|
1040
|
+
const destPath = Path3.join(destinationPath, nupkgFileName);
|
|
1041
|
+
const packResult = await this.nugetPackager.packAsync(packagePath, packageInfo, destPath);
|
|
1042
|
+
destinationPackages.push(packResult.outputPath);
|
|
1043
|
+
}
|
|
1044
|
+
} else {
|
|
1045
|
+
const fileName = packagePath.split(/[\\/]/).pop() || packagePath;
|
|
1046
|
+
const destPath = Path3.join(destinationPath, fileName);
|
|
1047
|
+
const data = await this.fileSystem.readFile(packagePath);
|
|
1048
|
+
if (!data) {
|
|
1049
|
+
throw new Error(translate6.t("solutionpackager.packager.errors.failedToReadPackage", {
|
|
1050
|
+
path: packagePath
|
|
1051
|
+
}));
|
|
1052
|
+
}
|
|
1053
|
+
await this.fileSystem.writeFile(destPath, data);
|
|
1054
|
+
destinationPackages.push(destPath);
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
return destinationPackages;
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
async function createNodeProjectPackager(options) {
|
|
1061
|
+
const factory = new NodeProjectPackagerFactory;
|
|
1062
|
+
return factory.createAsync(options);
|
|
1063
|
+
}
|
|
1064
|
+
var de_default, en, es_default, es_MX_default, fr_default, ja_default, ko_default, pt_default, pt_BR_default, ro_default, ru_default, tr_default, zh_CN_default, zh_TW_default, zu_default, globalLogHandler = (logMessage) => {
|
|
1065
|
+
const formattedMessage = logMessage.toFormattedString();
|
|
1066
|
+
switch (logMessage.logLevel) {
|
|
1067
|
+
case LogLevel.Debug:
|
|
1068
|
+
console.debug(formattedMessage);
|
|
1069
|
+
break;
|
|
1070
|
+
case LogLevel.Info:
|
|
1071
|
+
console.info(formattedMessage);
|
|
1072
|
+
break;
|
|
1073
|
+
case LogLevel.Warn:
|
|
1074
|
+
console.warn(formattedMessage);
|
|
1075
|
+
break;
|
|
1076
|
+
case LogLevel.Error:
|
|
1077
|
+
console.error(formattedMessage);
|
|
1078
|
+
break;
|
|
1079
|
+
}
|
|
1080
|
+
}, RulesConfigFileType, ProjectRestoreOptions, ProjectValidateOptions, ProjectBuildOptions, ProjectPackOptions, TelemetryNames, LICENSE_TYPES, DEFAULT_PROFILE_KEY = "StudioWeb", ACQUIRE_LICENSE_PATH = "/orchestrator_/api/StudioWeb/AcquireLicense", GOVERNANCE_SUBFOLDER = "governance", GOVERNANCE_FILE_NAME = "governance-policy.json", errorMessage = (error) => error instanceof Error ? error.message : String(error), t = (key, params) => translate3.t(`solutionpackager.governance.${key}`, params), ProjectBuildOptionsValidator, ProjectPackOptionsValidator, ProjectValidateOptionsValidator, NodeProjectPackagerFactory;
|
|
1081
|
+
var init_node2 = __esm(() => {
|
|
1082
|
+
init_node();
|
|
1083
|
+
init_node();
|
|
1084
|
+
de_default = {
|
|
1085
|
+
solutionpackager: {
|
|
1086
|
+
projectLoader: {
|
|
1087
|
+
errors: {
|
|
1088
|
+
pathRequired: "Project directory path is required",
|
|
1089
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1090
|
+
readFailed: "Failed to read project file: {path}",
|
|
1091
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1092
|
+
}
|
|
1093
|
+
},
|
|
1094
|
+
validator: {
|
|
1095
|
+
errors: {
|
|
1096
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1097
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1098
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1099
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1100
|
+
}
|
|
1101
|
+
},
|
|
1102
|
+
packager: {
|
|
1103
|
+
errors: {
|
|
1104
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1105
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
governance: {
|
|
1109
|
+
info: {
|
|
1110
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1111
|
+
saved: "Governance policy saved to {path}",
|
|
1112
|
+
downloading: "Downloading governance policy from {url}",
|
|
1113
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1114
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1115
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1116
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1117
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1118
|
+
},
|
|
1119
|
+
errors: {
|
|
1120
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1121
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1122
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1123
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1124
|
+
}
|
|
1125
|
+
},
|
|
1126
|
+
signing: {
|
|
1127
|
+
errors: {
|
|
1128
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1129
|
+
},
|
|
1130
|
+
info: {
|
|
1131
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
};
|
|
1136
|
+
en = {
|
|
1137
|
+
solutionpackager: {
|
|
1138
|
+
projectLoader: {
|
|
1139
|
+
errors: {
|
|
1140
|
+
pathRequired: "Project directory path is required",
|
|
1141
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1142
|
+
readFailed: "Failed to read project file: {path}",
|
|
1143
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1144
|
+
}
|
|
1145
|
+
},
|
|
1146
|
+
validator: {
|
|
1147
|
+
errors: {
|
|
1148
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1149
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1150
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1151
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1152
|
+
}
|
|
1153
|
+
},
|
|
1154
|
+
packager: {
|
|
1155
|
+
errors: {
|
|
1156
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1157
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1158
|
+
}
|
|
1159
|
+
},
|
|
1160
|
+
governance: {
|
|
1161
|
+
info: {
|
|
1162
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1163
|
+
saved: "Governance policy saved to {path}",
|
|
1164
|
+
downloading: "Downloading governance policy from {url}",
|
|
1165
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1166
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1167
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1168
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1169
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1170
|
+
},
|
|
1171
|
+
errors: {
|
|
1172
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1173
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1174
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1175
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1176
|
+
}
|
|
1177
|
+
},
|
|
1178
|
+
signing: {
|
|
1179
|
+
errors: {
|
|
1180
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1181
|
+
},
|
|
1182
|
+
info: {
|
|
1183
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
};
|
|
1188
|
+
es_default = {
|
|
1189
|
+
solutionpackager: {
|
|
1190
|
+
projectLoader: {
|
|
1191
|
+
errors: {
|
|
1192
|
+
pathRequired: "Project directory path is required",
|
|
1193
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1194
|
+
readFailed: "Failed to read project file: {path}",
|
|
1195
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
validator: {
|
|
1199
|
+
errors: {
|
|
1200
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1201
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1202
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1203
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1204
|
+
}
|
|
1205
|
+
},
|
|
1206
|
+
packager: {
|
|
1207
|
+
errors: {
|
|
1208
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1209
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1210
|
+
}
|
|
1211
|
+
},
|
|
1212
|
+
governance: {
|
|
1213
|
+
info: {
|
|
1214
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1215
|
+
saved: "Governance policy saved to {path}",
|
|
1216
|
+
downloading: "Downloading governance policy from {url}",
|
|
1217
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1218
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1219
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1220
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1221
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1222
|
+
},
|
|
1223
|
+
errors: {
|
|
1224
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1225
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1226
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1227
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1228
|
+
}
|
|
1229
|
+
},
|
|
1230
|
+
signing: {
|
|
1231
|
+
errors: {
|
|
1232
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1233
|
+
},
|
|
1234
|
+
info: {
|
|
1235
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
};
|
|
1240
|
+
es_MX_default = {
|
|
1241
|
+
solutionpackager: {
|
|
1242
|
+
projectLoader: {
|
|
1243
|
+
errors: {
|
|
1244
|
+
pathRequired: "Project directory path is required",
|
|
1245
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1246
|
+
readFailed: "Failed to read project file: {path}",
|
|
1247
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1248
|
+
}
|
|
1249
|
+
},
|
|
1250
|
+
validator: {
|
|
1251
|
+
errors: {
|
|
1252
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1253
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1254
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1255
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1256
|
+
}
|
|
1257
|
+
},
|
|
1258
|
+
packager: {
|
|
1259
|
+
errors: {
|
|
1260
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1261
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1264
|
+
governance: {
|
|
1265
|
+
info: {
|
|
1266
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1267
|
+
saved: "Governance policy saved to {path}",
|
|
1268
|
+
downloading: "Downloading governance policy from {url}",
|
|
1269
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1270
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1271
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1272
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1273
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1274
|
+
},
|
|
1275
|
+
errors: {
|
|
1276
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1277
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1278
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1279
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1280
|
+
}
|
|
1281
|
+
},
|
|
1282
|
+
signing: {
|
|
1283
|
+
errors: {
|
|
1284
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1285
|
+
},
|
|
1286
|
+
info: {
|
|
1287
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
};
|
|
1292
|
+
fr_default = {
|
|
1293
|
+
solutionpackager: {
|
|
1294
|
+
projectLoader: {
|
|
1295
|
+
errors: {
|
|
1296
|
+
pathRequired: "Project directory path is required",
|
|
1297
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1298
|
+
readFailed: "Failed to read project file: {path}",
|
|
1299
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1300
|
+
}
|
|
1301
|
+
},
|
|
1302
|
+
validator: {
|
|
1303
|
+
errors: {
|
|
1304
|
+
destinationNotDefined: "Destination path is not defined",
|
|
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
|
+
}
|
|
1309
|
+
},
|
|
1310
|
+
packager: {
|
|
1311
|
+
errors: {
|
|
1312
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1313
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1314
|
+
}
|
|
1315
|
+
},
|
|
1316
|
+
governance: {
|
|
1317
|
+
info: {
|
|
1318
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1319
|
+
saved: "Governance policy saved to {path}",
|
|
1320
|
+
downloading: "Downloading governance policy from {url}",
|
|
1321
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1322
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1323
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1324
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1325
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1326
|
+
},
|
|
1327
|
+
errors: {
|
|
1328
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1329
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1330
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1331
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
signing: {
|
|
1335
|
+
errors: {
|
|
1336
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1337
|
+
},
|
|
1338
|
+
info: {
|
|
1339
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
};
|
|
1344
|
+
ja_default = {
|
|
1345
|
+
solutionpackager: {
|
|
1346
|
+
projectLoader: {
|
|
1347
|
+
errors: {
|
|
1348
|
+
pathRequired: "Project directory path is required",
|
|
1349
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1350
|
+
readFailed: "Failed to read project file: {path}",
|
|
1351
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
validator: {
|
|
1355
|
+
errors: {
|
|
1356
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1357
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1358
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1359
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1360
|
+
}
|
|
1361
|
+
},
|
|
1362
|
+
packager: {
|
|
1363
|
+
errors: {
|
|
1364
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1365
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
governance: {
|
|
1369
|
+
info: {
|
|
1370
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1371
|
+
saved: "Governance policy saved to {path}",
|
|
1372
|
+
downloading: "Downloading governance policy from {url}",
|
|
1373
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1374
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1375
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1376
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1377
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1378
|
+
},
|
|
1379
|
+
errors: {
|
|
1380
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1381
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1382
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1383
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1386
|
+
signing: {
|
|
1387
|
+
errors: {
|
|
1388
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1389
|
+
},
|
|
1390
|
+
info: {
|
|
1391
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
};
|
|
1396
|
+
ko_default = {
|
|
1397
|
+
solutionpackager: {
|
|
1398
|
+
projectLoader: {
|
|
1399
|
+
errors: {
|
|
1400
|
+
pathRequired: "Project directory path is required",
|
|
1401
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1402
|
+
readFailed: "Failed to read project file: {path}",
|
|
1403
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1404
|
+
}
|
|
1405
|
+
},
|
|
1406
|
+
validator: {
|
|
1407
|
+
errors: {
|
|
1408
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1409
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1410
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1411
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
packager: {
|
|
1415
|
+
errors: {
|
|
1416
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1417
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1420
|
+
governance: {
|
|
1421
|
+
info: {
|
|
1422
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1423
|
+
saved: "Governance policy saved to {path}",
|
|
1424
|
+
downloading: "Downloading governance policy from {url}",
|
|
1425
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1426
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1427
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1428
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1429
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1430
|
+
},
|
|
1431
|
+
errors: {
|
|
1432
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1433
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1434
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1435
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1436
|
+
}
|
|
1437
|
+
},
|
|
1438
|
+
signing: {
|
|
1439
|
+
errors: {
|
|
1440
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1441
|
+
},
|
|
1442
|
+
info: {
|
|
1443
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
};
|
|
1448
|
+
pt_default = {
|
|
1449
|
+
solutionpackager: {
|
|
1450
|
+
projectLoader: {
|
|
1451
|
+
errors: {
|
|
1452
|
+
pathRequired: "Project directory path is required",
|
|
1453
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1454
|
+
readFailed: "Failed to read project file: {path}",
|
|
1455
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
validator: {
|
|
1459
|
+
errors: {
|
|
1460
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1461
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1462
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1463
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1464
|
+
}
|
|
1465
|
+
},
|
|
1466
|
+
packager: {
|
|
1467
|
+
errors: {
|
|
1468
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1469
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1470
|
+
}
|
|
1471
|
+
},
|
|
1472
|
+
governance: {
|
|
1473
|
+
info: {
|
|
1474
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1475
|
+
saved: "Governance policy saved to {path}",
|
|
1476
|
+
downloading: "Downloading governance policy from {url}",
|
|
1477
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1478
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1479
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1480
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1481
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1482
|
+
},
|
|
1483
|
+
errors: {
|
|
1484
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1485
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1486
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1487
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1490
|
+
signing: {
|
|
1491
|
+
errors: {
|
|
1492
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1493
|
+
},
|
|
1494
|
+
info: {
|
|
1495
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
};
|
|
1500
|
+
pt_BR_default = {
|
|
1501
|
+
solutionpackager: {
|
|
1502
|
+
projectLoader: {
|
|
1503
|
+
errors: {
|
|
1504
|
+
pathRequired: "Project directory path is required",
|
|
1505
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1506
|
+
readFailed: "Failed to read project file: {path}",
|
|
1507
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1508
|
+
}
|
|
1509
|
+
},
|
|
1510
|
+
validator: {
|
|
1511
|
+
errors: {
|
|
1512
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1513
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1514
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1515
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1516
|
+
}
|
|
1517
|
+
},
|
|
1518
|
+
packager: {
|
|
1519
|
+
errors: {
|
|
1520
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1521
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1522
|
+
}
|
|
1523
|
+
},
|
|
1524
|
+
governance: {
|
|
1525
|
+
info: {
|
|
1526
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1527
|
+
saved: "Governance policy saved to {path}",
|
|
1528
|
+
downloading: "Downloading governance policy from {url}",
|
|
1529
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1530
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1531
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1532
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1533
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1534
|
+
},
|
|
1535
|
+
errors: {
|
|
1536
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1537
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1538
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1539
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1540
|
+
}
|
|
1541
|
+
},
|
|
1542
|
+
signing: {
|
|
1543
|
+
errors: {
|
|
1544
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1545
|
+
},
|
|
1546
|
+
info: {
|
|
1547
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
};
|
|
1552
|
+
ro_default = {
|
|
1553
|
+
solutionpackager: {
|
|
1554
|
+
projectLoader: {
|
|
1555
|
+
errors: {
|
|
1556
|
+
pathRequired: "Project directory path is required",
|
|
1557
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1558
|
+
readFailed: "Failed to read project file: {path}",
|
|
1559
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1560
|
+
}
|
|
1561
|
+
},
|
|
1562
|
+
validator: {
|
|
1563
|
+
errors: {
|
|
1564
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1565
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1566
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1567
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1568
|
+
}
|
|
1569
|
+
},
|
|
1570
|
+
packager: {
|
|
1571
|
+
errors: {
|
|
1572
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1573
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1574
|
+
}
|
|
1575
|
+
},
|
|
1576
|
+
governance: {
|
|
1577
|
+
info: {
|
|
1578
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1579
|
+
saved: "Governance policy saved to {path}",
|
|
1580
|
+
downloading: "Downloading governance policy from {url}",
|
|
1581
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1582
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1583
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1584
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1585
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1586
|
+
},
|
|
1587
|
+
errors: {
|
|
1588
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1589
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1590
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1591
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1592
|
+
}
|
|
1593
|
+
},
|
|
1594
|
+
signing: {
|
|
1595
|
+
errors: {
|
|
1596
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1597
|
+
},
|
|
1598
|
+
info: {
|
|
1599
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
};
|
|
1604
|
+
ru_default = {
|
|
1605
|
+
solutionpackager: {
|
|
1606
|
+
projectLoader: {
|
|
1607
|
+
errors: {
|
|
1608
|
+
pathRequired: "Project directory path is required",
|
|
1609
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1610
|
+
readFailed: "Failed to read project file: {path}",
|
|
1611
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1612
|
+
}
|
|
1613
|
+
},
|
|
1614
|
+
validator: {
|
|
1615
|
+
errors: {
|
|
1616
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1617
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1618
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1619
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
packager: {
|
|
1623
|
+
errors: {
|
|
1624
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1625
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1626
|
+
}
|
|
1627
|
+
},
|
|
1628
|
+
governance: {
|
|
1629
|
+
info: {
|
|
1630
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1631
|
+
saved: "Governance policy saved to {path}",
|
|
1632
|
+
downloading: "Downloading governance policy from {url}",
|
|
1633
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1634
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1635
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1636
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1637
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1638
|
+
},
|
|
1639
|
+
errors: {
|
|
1640
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1641
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1642
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1643
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1644
|
+
}
|
|
1645
|
+
},
|
|
1646
|
+
signing: {
|
|
1647
|
+
errors: {
|
|
1648
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1649
|
+
},
|
|
1650
|
+
info: {
|
|
1651
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
};
|
|
1656
|
+
tr_default = {
|
|
1657
|
+
solutionpackager: {
|
|
1658
|
+
projectLoader: {
|
|
1659
|
+
errors: {
|
|
1660
|
+
pathRequired: "Project directory path is required",
|
|
1661
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1662
|
+
readFailed: "Failed to read project file: {path}",
|
|
1663
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1666
|
+
validator: {
|
|
1667
|
+
errors: {
|
|
1668
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1669
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1670
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1671
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1672
|
+
}
|
|
1673
|
+
},
|
|
1674
|
+
packager: {
|
|
1675
|
+
errors: {
|
|
1676
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1677
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1678
|
+
}
|
|
1679
|
+
},
|
|
1680
|
+
governance: {
|
|
1681
|
+
info: {
|
|
1682
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1683
|
+
saved: "Governance policy saved to {path}",
|
|
1684
|
+
downloading: "Downloading governance policy from {url}",
|
|
1685
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1686
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1687
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1688
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1689
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1690
|
+
},
|
|
1691
|
+
errors: {
|
|
1692
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1693
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1694
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1695
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1696
|
+
}
|
|
1697
|
+
},
|
|
1698
|
+
signing: {
|
|
1699
|
+
errors: {
|
|
1700
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1701
|
+
},
|
|
1702
|
+
info: {
|
|
1703
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
};
|
|
1708
|
+
zh_CN_default = {
|
|
1709
|
+
solutionpackager: {
|
|
1710
|
+
projectLoader: {
|
|
1711
|
+
errors: {
|
|
1712
|
+
pathRequired: "Project directory path is required",
|
|
1713
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1714
|
+
readFailed: "Failed to read project file: {path}",
|
|
1715
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1716
|
+
}
|
|
1717
|
+
},
|
|
1718
|
+
validator: {
|
|
1719
|
+
errors: {
|
|
1720
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1721
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1722
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1723
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1724
|
+
}
|
|
1725
|
+
},
|
|
1726
|
+
packager: {
|
|
1727
|
+
errors: {
|
|
1728
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1729
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1730
|
+
}
|
|
1731
|
+
},
|
|
1732
|
+
governance: {
|
|
1733
|
+
info: {
|
|
1734
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1735
|
+
saved: "Governance policy saved to {path}",
|
|
1736
|
+
downloading: "Downloading governance policy from {url}",
|
|
1737
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1738
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1739
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1740
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1741
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1742
|
+
},
|
|
1743
|
+
errors: {
|
|
1744
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1745
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1746
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1747
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1748
|
+
}
|
|
1749
|
+
},
|
|
1750
|
+
signing: {
|
|
1751
|
+
errors: {
|
|
1752
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1753
|
+
},
|
|
1754
|
+
info: {
|
|
1755
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
};
|
|
1760
|
+
zh_TW_default = {
|
|
1761
|
+
solutionpackager: {
|
|
1762
|
+
projectLoader: {
|
|
1763
|
+
errors: {
|
|
1764
|
+
pathRequired: "Project directory path is required",
|
|
1765
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1766
|
+
readFailed: "Failed to read project file: {path}",
|
|
1767
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1768
|
+
}
|
|
1769
|
+
},
|
|
1770
|
+
validator: {
|
|
1771
|
+
errors: {
|
|
1772
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1773
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1774
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1775
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1776
|
+
}
|
|
1777
|
+
},
|
|
1778
|
+
packager: {
|
|
1779
|
+
errors: {
|
|
1780
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1781
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1782
|
+
}
|
|
1783
|
+
},
|
|
1784
|
+
governance: {
|
|
1785
|
+
info: {
|
|
1786
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1787
|
+
saved: "Governance policy saved to {path}",
|
|
1788
|
+
downloading: "Downloading governance policy from {url}",
|
|
1789
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1790
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1791
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1792
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1793
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1794
|
+
},
|
|
1795
|
+
errors: {
|
|
1796
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1797
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1798
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1799
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1800
|
+
}
|
|
1801
|
+
},
|
|
1802
|
+
signing: {
|
|
1803
|
+
errors: {
|
|
1804
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1805
|
+
},
|
|
1806
|
+
info: {
|
|
1807
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
};
|
|
1812
|
+
zu_default = {
|
|
1813
|
+
solutionpackager: {
|
|
1814
|
+
projectLoader: {
|
|
1815
|
+
errors: {
|
|
1816
|
+
pathRequired: "Project directory path is required",
|
|
1817
|
+
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1818
|
+
readFailed: "Failed to read project file: {path}",
|
|
1819
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1820
|
+
}
|
|
1821
|
+
},
|
|
1822
|
+
validator: {
|
|
1823
|
+
errors: {
|
|
1824
|
+
destinationNotDefined: "Destination path is not defined",
|
|
1825
|
+
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1826
|
+
governanceFileInfo: "Unable to get file information: {path}",
|
|
1827
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1828
|
+
}
|
|
1829
|
+
},
|
|
1830
|
+
packager: {
|
|
1831
|
+
errors: {
|
|
1832
|
+
failedToGetStreams: "Cannot get package streams from failed result. Error code: {errorCode}, message: {message}",
|
|
1833
|
+
failedToReadPackage: "Failed to read package file: {path}"
|
|
1834
|
+
}
|
|
1835
|
+
},
|
|
1836
|
+
governance: {
|
|
1837
|
+
info: {
|
|
1838
|
+
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1839
|
+
saved: "Governance policy saved to {path}",
|
|
1840
|
+
downloading: "Downloading governance policy from {url}",
|
|
1841
|
+
noPolicyFound: "No governance policy found for this configuration.",
|
|
1842
|
+
responseNotJson: "Policy response is not JSON, treating as no policy.",
|
|
1843
|
+
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1844
|
+
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1845
|
+
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1846
|
+
},
|
|
1847
|
+
errors: {
|
|
1848
|
+
connectionIncomplete: "Connection info incomplete, falling back to Default governance.",
|
|
1849
|
+
failedToGetPolicy: "Failed to download governance policy: {content}",
|
|
1850
|
+
failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
|
|
1851
|
+
failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
|
|
1852
|
+
}
|
|
1853
|
+
},
|
|
1854
|
+
signing: {
|
|
1855
|
+
errors: {
|
|
1856
|
+
dotnetNotAvailable: "dotnet CLI is not available. Package signing requires dotnet CLI to be installed."
|
|
1857
|
+
},
|
|
1858
|
+
info: {
|
|
1859
|
+
dotnetNotAvailable: "dotnet CLI is not available. Cannot sign package."
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
};
|
|
1864
|
+
I18nManager.registerTranslations("en", en);
|
|
1865
|
+
I18nManager.registerTranslations("de", de_default);
|
|
1866
|
+
I18nManager.registerTranslations("es", es_default);
|
|
1867
|
+
I18nManager.registerTranslations("es-MX", es_MX_default);
|
|
1868
|
+
I18nManager.registerTranslations("fr", fr_default);
|
|
1869
|
+
I18nManager.registerTranslations("ja", ja_default);
|
|
1870
|
+
I18nManager.registerTranslations("ko", ko_default);
|
|
1871
|
+
I18nManager.registerTranslations("pt", pt_default);
|
|
1872
|
+
I18nManager.registerTranslations("pt-BR", pt_BR_default);
|
|
1873
|
+
I18nManager.registerTranslations("ro", ro_default);
|
|
1874
|
+
I18nManager.registerTranslations("ru", ru_default);
|
|
1875
|
+
I18nManager.registerTranslations("tr", tr_default);
|
|
1876
|
+
I18nManager.registerTranslations("zh-CN", zh_CN_default);
|
|
1877
|
+
I18nManager.registerTranslations("zh-TW", zh_TW_default);
|
|
1878
|
+
I18nManager.registerTranslations("zu", zu_default);
|
|
1879
|
+
((RulesConfigFileType2) => {
|
|
1880
|
+
RulesConfigFileType2["Default"] = "Default";
|
|
1881
|
+
RulesConfigFileType2["AutomationOps"] = "AutomationOps";
|
|
1882
|
+
RulesConfigFileType2["Studio"] = "Studio";
|
|
1883
|
+
})(RulesConfigFileType ||= {});
|
|
1884
|
+
ProjectRestoreOptions = class ProjectRestoreOptions extends PackagerParameters {
|
|
1885
|
+
};
|
|
1886
|
+
ProjectValidateOptions = class ProjectValidateOptions extends ProjectRestoreOptions {
|
|
1887
|
+
validateOptions = {
|
|
1888
|
+
skipAnalyze: false,
|
|
1889
|
+
governanceFileType: "Default"
|
|
1890
|
+
};
|
|
1891
|
+
};
|
|
1892
|
+
ProjectBuildOptions = class ProjectBuildOptions extends ProjectValidateOptions {
|
|
1893
|
+
};
|
|
1894
|
+
ProjectPackOptions = class ProjectPackOptions extends ProjectBuildOptions {
|
|
1895
|
+
destinationPath;
|
|
1896
|
+
package;
|
|
1897
|
+
signingInfo;
|
|
1898
|
+
packOptions;
|
|
1899
|
+
};
|
|
1900
|
+
((TelemetryNames2) => {
|
|
1901
|
+
TelemetryNames2["ProjectToolPack"] = "ProjectPackager.Tool.Pack";
|
|
1902
|
+
TelemetryNames2["ProjectToolRestore"] = "ProjectPackager.Tool.Restore";
|
|
1903
|
+
TelemetryNames2["ProjectToolValidate"] = "ProjectPackager.Tool.Validate";
|
|
1904
|
+
TelemetryNames2["ProjectToolBuild"] = "ProjectPackager.Tool.Build";
|
|
1905
|
+
TelemetryNames2["ProjectPackagerPack"] = "ProjectPackager.Pack";
|
|
1906
|
+
TelemetryNames2["ProjectPackagerRestore"] = "ProjectPackager.Restore";
|
|
1907
|
+
TelemetryNames2["ProjectPackagerValidate"] = "ProjectPackager.Validate";
|
|
1908
|
+
TelemetryNames2["ProjectPackagerBuild"] = "ProjectPackager.Build";
|
|
1909
|
+
TelemetryNames2["ProjectPackagerProjectLoaded"] = "ProjectPackager.ProjectLoaded";
|
|
1910
|
+
})(TelemetryNames ||= {});
|
|
1911
|
+
LICENSE_TYPES = {
|
|
1912
|
+
NoLicense: "NoLicense",
|
|
1913
|
+
Development: "Development",
|
|
1914
|
+
Attended: "Attended",
|
|
1915
|
+
Unattended: "Unattended",
|
|
1916
|
+
StudioX: "StudioX",
|
|
1917
|
+
StudioPro: "StudioPro",
|
|
1918
|
+
AutomationKit: "AutomationKit"
|
|
1919
|
+
};
|
|
1920
|
+
ProjectBuildOptionsValidator = class ProjectBuildOptionsValidator extends PackagerParametersValidator {
|
|
1921
|
+
async validateAsync(options, _cancellationToken) {
|
|
1922
|
+
return await this.validateGovernanceOptions(options.validateOptions);
|
|
1923
|
+
}
|
|
1924
|
+
};
|
|
1925
|
+
ProjectPackOptionsValidator = class ProjectPackOptionsValidator extends ProjectBuildOptionsValidator {
|
|
1926
|
+
async validateAsync(options, cancellationToken) {
|
|
1927
|
+
const destinationResult = this.validateDestinationPath(options.destinationPath);
|
|
1928
|
+
if (!destinationResult.isSuccess) {
|
|
1929
|
+
return destinationResult;
|
|
1930
|
+
}
|
|
1931
|
+
return await super.validateAsync(options, cancellationToken);
|
|
1932
|
+
}
|
|
1933
|
+
};
|
|
1934
|
+
ProjectValidateOptionsValidator = class ProjectValidateOptionsValidator extends PackagerParametersValidator {
|
|
1935
|
+
async validateAsync(options, _cancellationToken) {
|
|
1936
|
+
return await this.validateGovernanceOptions(options.validateOptions);
|
|
1937
|
+
}
|
|
1938
|
+
};
|
|
1939
|
+
NodeProjectPackagerFactory = class NodeProjectPackagerFactory extends BaseNodePackagerFactory {
|
|
1940
|
+
async createAsync(config) {
|
|
1941
|
+
const logger = new ToolLogger("ProjectPackagerFactory", "Create");
|
|
1942
|
+
this.configureLanguage(config);
|
|
1943
|
+
this.configureLogHandler(config);
|
|
1944
|
+
logger.info("Creating ProjectPackager instance...");
|
|
1945
|
+
const fileSystem = this.getOrCreateFileSystem(config);
|
|
1946
|
+
const telemetryService = this.getOrCreateTelemetryService(config);
|
|
1947
|
+
const packageSignService = new NodePackageSignService(logger);
|
|
1948
|
+
const projectPackager = new ProjectPackager(fileSystem, telemetryService, packageSignService);
|
|
1949
|
+
this.checkDotnetAvailability(logger);
|
|
1950
|
+
logger.info("ProjectPackager created successfully.");
|
|
1951
|
+
return projectPackager;
|
|
1952
|
+
}
|
|
1953
|
+
};
|
|
1954
|
+
});
|
|
1955
|
+
|
|
35
1956
|
// ../../node_modules/@uipath/api-workflow-executor/dist/contracts/expression-handler.js
|
|
36
1957
|
var require_expression_handler = __commonJS((exports) => {
|
|
37
1958
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1070,7 +2991,7 @@ var require_localization_service = __commonJS((exports) => {
|
|
|
1070
2991
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1071
2992
|
exports.LocalizationService = undefined;
|
|
1072
2993
|
exports.initLocalization = initLocalization;
|
|
1073
|
-
exports.t =
|
|
2994
|
+
exports.t = t2;
|
|
1074
2995
|
exports.isLanguageSupported = isLanguageSupported;
|
|
1075
2996
|
var en_json_1 = __importDefault(require_en());
|
|
1076
2997
|
var de_json_1 = __importDefault(require_de());
|
|
@@ -1177,7 +3098,7 @@ var require_localization_service = __commonJS((exports) => {
|
|
|
1177
3098
|
async function initLocalization(language = DEFAULT_LANGUAGE) {
|
|
1178
3099
|
globalInstance = await LocalizationService.create(language);
|
|
1179
3100
|
}
|
|
1180
|
-
function
|
|
3101
|
+
function t2(key, values) {
|
|
1181
3102
|
if (!globalInstance) {
|
|
1182
3103
|
globalInstance = LocalizationService.createDefault();
|
|
1183
3104
|
}
|
|
@@ -1280,13 +3201,13 @@ var require_workflow_events = __commonJS((exports) => {
|
|
|
1280
3201
|
var require_workflow_log_data = __commonJS((exports) => {
|
|
1281
3202
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1282
3203
|
exports.LogLevel = undefined;
|
|
1283
|
-
var
|
|
1284
|
-
(function(
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
})(
|
|
3204
|
+
var LogLevel4;
|
|
3205
|
+
(function(LogLevel5) {
|
|
3206
|
+
LogLevel5["VERBOSE"] = "Verbose";
|
|
3207
|
+
LogLevel5["INFO"] = "Information";
|
|
3208
|
+
LogLevel5["WARN"] = "Warning";
|
|
3209
|
+
LogLevel5["ERROR"] = "Error";
|
|
3210
|
+
})(LogLevel4 || (exports.LogLevel = LogLevel4 = {}));
|
|
1290
3211
|
});
|
|
1291
3212
|
|
|
1292
3213
|
// ../../node_modules/@uipath/api-workflow-executor/dist/models/logging/index.js
|
|
@@ -1644,8 +3565,8 @@ var require_activity_base = __commonJS((exports) => {
|
|
|
1644
3565
|
exports.ActivityBase = undefined;
|
|
1645
3566
|
|
|
1646
3567
|
class ActivityBase {
|
|
1647
|
-
constructor(
|
|
1648
|
-
this.logger =
|
|
3568
|
+
constructor(logger2) {
|
|
3569
|
+
this.logger = logger2;
|
|
1649
3570
|
}
|
|
1650
3571
|
}
|
|
1651
3572
|
exports.ActivityBase = ActivityBase;
|
|
@@ -1663,8 +3584,8 @@ var require_generic_utils = __commonJS((exports) => {
|
|
|
1663
3584
|
}
|
|
1664
3585
|
function getErrorMessage(error) {
|
|
1665
3586
|
try {
|
|
1666
|
-
const
|
|
1667
|
-
return
|
|
3587
|
+
const errorMessage2 = isError(error) ? error.message : error ? typeof error === "object" ? JSON.stringify(error) : String(error) : "Unknown Error";
|
|
3588
|
+
return errorMessage2;
|
|
1668
3589
|
} catch (err) {
|
|
1669
3590
|
console.error("Error getting error message - circular reference or stringify failed");
|
|
1670
3591
|
return "Unknown Error";
|
|
@@ -2686,8 +4607,8 @@ var require_http_utils = __commonJS((exports) => {
|
|
|
2686
4607
|
}
|
|
2687
4608
|
} catch (error) {
|
|
2688
4609
|
console.error("Error reading response content:", error);
|
|
2689
|
-
const
|
|
2690
|
-
throw new Error(`Error reading response content: [${mediaType}] - ${
|
|
4610
|
+
const errorMessage2 = (0, generic_utils_1.getErrorMessage)(error);
|
|
4611
|
+
throw new Error(`Error reading response content: [${mediaType}] - ${errorMessage2}`);
|
|
2691
4612
|
}
|
|
2692
4613
|
};
|
|
2693
4614
|
});
|
|
@@ -2823,8 +4744,8 @@ var require_http_retry_policy = __commonJS((exports) => {
|
|
|
2823
4744
|
"timeout",
|
|
2824
4745
|
"aborted"
|
|
2825
4746
|
];
|
|
2826
|
-
const
|
|
2827
|
-
return networkErrorPatterns.some((pattern) =>
|
|
4747
|
+
const errorMessage2 = error.message.toLowerCase();
|
|
4748
|
+
return networkErrorPatterns.some((pattern) => errorMessage2.includes(pattern.toLowerCase()));
|
|
2828
4749
|
}
|
|
2829
4750
|
}
|
|
2830
4751
|
exports.HttpRetryPolicy = HttpRetryPolicy;
|
|
@@ -2836,11 +4757,11 @@ var require_http_retry_utils = __commonJS((exports) => {
|
|
|
2836
4757
|
exports.makeHttpRequestWithRetry = undefined;
|
|
2837
4758
|
var http_utils_1 = require_http_utils();
|
|
2838
4759
|
var http_retry_policy_1 = require_http_retry_policy();
|
|
2839
|
-
var makeHttpRequestWithRetry = async (url, method, headers, params, body, proxySettings, multipartFormData, timeoutMs, retryConfig,
|
|
4760
|
+
var makeHttpRequestWithRetry = async (url, method, headers, params, body, proxySettings, multipartFormData, timeoutMs, retryConfig, logger2, verboseLoggingEnabled) => {
|
|
2840
4761
|
if (!retryConfig) {
|
|
2841
4762
|
return (0, http_utils_1.makeHttpRequest)(url, method, headers, params, body, proxySettings, multipartFormData, timeoutMs, verboseLoggingEnabled);
|
|
2842
4763
|
}
|
|
2843
|
-
|
|
4764
|
+
logger2?.debug(`[Retry] Method: ${method}, RetryConfig provided: ${JSON.stringify(retryConfig)}`);
|
|
2844
4765
|
const config = http_retry_policy_1.HttpRetryPolicy.normalizeRetryConfig(retryConfig);
|
|
2845
4766
|
let attemptNumber = 0;
|
|
2846
4767
|
let totalDelayMs = 0;
|
|
@@ -2873,7 +4794,7 @@ var require_http_retry_utils = __commonJS((exports) => {
|
|
|
2873
4794
|
};
|
|
2874
4795
|
const decision = http_retry_policy_1.HttpRetryPolicy.shouldRetry(config, context);
|
|
2875
4796
|
if (!decision.shouldRetry) {
|
|
2876
|
-
|
|
4797
|
+
logger2?.debug(`[Retry] Not retrying: ${decision.reason}`);
|
|
2877
4798
|
if (attemptNumber > 1 && result.data) {
|
|
2878
4799
|
const retryInfo = {
|
|
2879
4800
|
retryCount: attemptNumber - 1,
|
|
@@ -2892,9 +4813,9 @@ var require_http_retry_utils = __commonJS((exports) => {
|
|
|
2892
4813
|
await new Promise((resolve) => setTimeout(resolve, decision.delayMs));
|
|
2893
4814
|
totalDelayMs += decision.delayMs;
|
|
2894
4815
|
}
|
|
2895
|
-
|
|
4816
|
+
logger2?.debug(`[Retry] Retrying in ${decision.delayMs}ms: ${decision.reason}: attempt ${attemptNumber}`);
|
|
2896
4817
|
} catch (error) {
|
|
2897
|
-
|
|
4818
|
+
logger2?.error(`Error while making HTTP request attempt ${attemptNumber}: ${error}`);
|
|
2898
4819
|
const context = {
|
|
2899
4820
|
attemptNumber,
|
|
2900
4821
|
error,
|
|
@@ -2902,7 +4823,7 @@ var require_http_retry_utils = __commonJS((exports) => {
|
|
|
2902
4823
|
};
|
|
2903
4824
|
const decision = http_retry_policy_1.HttpRetryPolicy.shouldRetry(config, context);
|
|
2904
4825
|
if (!decision.shouldRetry) {
|
|
2905
|
-
|
|
4826
|
+
logger2?.debug(`[Retry] Not retrying after exception: ${decision.reason}`);
|
|
2906
4827
|
return {
|
|
2907
4828
|
success: false,
|
|
2908
4829
|
error
|
|
@@ -2913,7 +4834,7 @@ var require_http_retry_utils = __commonJS((exports) => {
|
|
|
2913
4834
|
await new Promise((resolve) => setTimeout(resolve, decision.delayMs));
|
|
2914
4835
|
totalDelayMs += decision.delayMs;
|
|
2915
4836
|
}
|
|
2916
|
-
|
|
4837
|
+
logger2?.debug(`[Retry] Retrying in ${decision.delayMs}ms: ${decision.reason}: attempt ${attemptNumber}`);
|
|
2917
4838
|
}
|
|
2918
4839
|
}
|
|
2919
4840
|
};
|
|
@@ -2931,8 +4852,8 @@ var require_http_request_activity = __commonJS((exports) => {
|
|
|
2931
4852
|
var http_utils_1 = require_http_utils();
|
|
2932
4853
|
|
|
2933
4854
|
class HttpRequestActivity extends activity_base_1.ActivityBase {
|
|
2934
|
-
constructor(requestDefinition,
|
|
2935
|
-
super(
|
|
4855
|
+
constructor(requestDefinition, logger2, name) {
|
|
4856
|
+
super(logger2);
|
|
2936
4857
|
this.type = models_1.ActivityType.HttpRequest;
|
|
2937
4858
|
this.name = models_1.ActivityType.HttpRequest;
|
|
2938
4859
|
this.properties = requestDefinition.properties;
|
|
@@ -3333,16 +5254,16 @@ var require_is_utils = __commonJS((exports) => {
|
|
|
3333
5254
|
vendorProcessingTimeMs: isProxyAPIResponse.vendorProcessingTimeMs
|
|
3334
5255
|
};
|
|
3335
5256
|
const parsedContent = parsedResponse.content;
|
|
3336
|
-
let
|
|
5257
|
+
let errorMessage2 = "";
|
|
3337
5258
|
if (typeof parsedContent === "string") {
|
|
3338
|
-
|
|
5259
|
+
errorMessage2 = parsedContent;
|
|
3339
5260
|
} else if (parsedContent && typeof parsedContent === "object" && "message" in parsedContent) {
|
|
3340
|
-
|
|
5261
|
+
errorMessage2 = parsedContent.message;
|
|
3341
5262
|
}
|
|
3342
5263
|
return {
|
|
3343
5264
|
success: isSuccess,
|
|
3344
5265
|
data: parsedResponse,
|
|
3345
|
-
error: isSuccess ? undefined : new Error(
|
|
5266
|
+
error: isSuccess ? undefined : new Error(errorMessage2 ? `HTTP Status: ${code} - ${errorMessage2}` : `HTTP Status: ${code}`)
|
|
3346
5267
|
};
|
|
3347
5268
|
};
|
|
3348
5269
|
exports.toStandardHttpResponse = toStandardHttpResponse;
|
|
@@ -3425,7 +5346,7 @@ var require_is_utils = __commonJS((exports) => {
|
|
|
3425
5346
|
return true;
|
|
3426
5347
|
};
|
|
3427
5348
|
exports.isPaginationCallRequired = isPaginationCallRequired;
|
|
3428
|
-
var fetchAllPaginatedData = async (requestUrl, initialPageData, maxRecords, queryParameters = {}, method = http_method_1.HttpMethod.GET, headers = {}, useProxyServer = false, proxySettings = undefined, timeoutMs = 30000, retryConfig = undefined,
|
|
5349
|
+
var fetchAllPaginatedData = async (requestUrl, initialPageData, maxRecords, queryParameters = {}, method = http_method_1.HttpMethod.GET, headers = {}, useProxyServer = false, proxySettings = undefined, timeoutMs = 30000, retryConfig = undefined, logger2) => {
|
|
3429
5350
|
const pageDetails = (0, exports.extractPageDetailsIfPresent)(initialPageData);
|
|
3430
5351
|
let hasMorePages = pageDetails?.hasMorePages || false;
|
|
3431
5352
|
let nextPageToken = pageDetails?.nextPageToken;
|
|
@@ -3439,14 +5360,14 @@ var require_is_utils = __commonJS((exports) => {
|
|
|
3439
5360
|
nextPageToken
|
|
3440
5361
|
}
|
|
3441
5362
|
};
|
|
3442
|
-
|
|
5363
|
+
logger2.debug(`Starting paginated request with maxRecords: ${maxRecords}`);
|
|
3443
5364
|
while (hasMorePages && allRecords.length < maxRecords) {
|
|
3444
5365
|
pageCount++;
|
|
3445
|
-
|
|
3446
|
-
pageResult = await fetchPaginatedPage(requestUrl, nextPageToken, queryParameters, method, headers, useProxyServer, proxySettings, timeoutMs, retryConfig,
|
|
5366
|
+
logger2.debug(`Fetching page ${pageCount}, current records: ${allRecords.length}, nextPageToken: ${nextPageToken ? "present" : "none"}`);
|
|
5367
|
+
pageResult = await fetchPaginatedPage(requestUrl, nextPageToken, queryParameters, method, headers, useProxyServer, proxySettings, timeoutMs, retryConfig, logger2);
|
|
3447
5368
|
if (!pageResult.success || !pageResult.data) {
|
|
3448
|
-
|
|
3449
|
-
|
|
5369
|
+
logger2.error(`Pagination request failed on page ${pageCount}: ${pageResult.error?.message || "Unknown error"}`);
|
|
5370
|
+
logger2.warn(`Returning ${allRecords.length} already fetched records despite pagination error`);
|
|
3450
5371
|
return {
|
|
3451
5372
|
success: false,
|
|
3452
5373
|
data: initialPageData,
|
|
@@ -3456,19 +5377,19 @@ var require_is_utils = __commonJS((exports) => {
|
|
|
3456
5377
|
const { responseData: pageData, hasMorePages: pageHasMore, nextPageToken: pageNextToken } = pageResult.data;
|
|
3457
5378
|
const pageContent = Array.isArray(pageData.content) ? pageData.content : [];
|
|
3458
5379
|
allRecords.push(...pageContent);
|
|
3459
|
-
|
|
5380
|
+
logger2.info(`Page ${pageCount} returned ${pageContent.length} records, total so far: ${allRecords.length}, hasMorePages: ${pageHasMore}, nextPageToken: ${pageNextToken ? "present" : "none"}`);
|
|
3460
5381
|
hasMorePages = pageHasMore && !!pageNextToken;
|
|
3461
5382
|
nextPageToken = pageNextToken;
|
|
3462
5383
|
if (allRecords.length >= maxRecords) {
|
|
3463
|
-
|
|
5384
|
+
logger2.debug(`Reached maxRecords limit (${maxRecords}), stopping pagination after ${pageCount} pages`);
|
|
3464
5385
|
break;
|
|
3465
5386
|
}
|
|
3466
5387
|
if (!hasMorePages) {
|
|
3467
|
-
|
|
5388
|
+
logger2.debug(`No more pages available, stopping pagination after ${pageCount} pages`);
|
|
3468
5389
|
break;
|
|
3469
5390
|
}
|
|
3470
5391
|
}
|
|
3471
|
-
|
|
5392
|
+
logger2.debug(`Pagination completed. Total pages: ${pageCount}, Total records: ${allRecords.length}`);
|
|
3472
5393
|
let finalResponse = pageResult.data?.responseData;
|
|
3473
5394
|
if (!finalResponse) {
|
|
3474
5395
|
return {
|
|
@@ -3501,12 +5422,12 @@ var require_is_utils = __commonJS((exports) => {
|
|
|
3501
5422
|
return cleanedHeaders;
|
|
3502
5423
|
};
|
|
3503
5424
|
exports.cleanPaginationHeaders = cleanPaginationHeaders;
|
|
3504
|
-
var fetchPaginatedPage = async (requestUrl, nextPageToken, queryParameters = {}, method = http_method_1.HttpMethod.GET, headers = {}, useProxyServer = false, proxySettings = undefined, timeoutMs = 30000, retryConfig = undefined,
|
|
5425
|
+
var fetchPaginatedPage = async (requestUrl, nextPageToken, queryParameters = {}, method = http_method_1.HttpMethod.GET, headers = {}, useProxyServer = false, proxySettings = undefined, timeoutMs = 30000, retryConfig = undefined, logger2) => {
|
|
3505
5426
|
const queryParams = {
|
|
3506
5427
|
...queryParameters,
|
|
3507
5428
|
...nextPageToken && { nextPage: nextPageToken }
|
|
3508
5429
|
};
|
|
3509
|
-
const response = await (0, http_retry_utils_1.makeHttpRequestWithRetry)(requestUrl, method, headers, queryParams, undefined, useProxyServer ? proxySettings : undefined, undefined, timeoutMs, retryConfig,
|
|
5430
|
+
const response = await (0, http_retry_utils_1.makeHttpRequestWithRetry)(requestUrl, method, headers, queryParams, undefined, useProxyServer ? proxySettings : undefined, undefined, timeoutMs, retryConfig, logger2);
|
|
3510
5431
|
if (!response.success || !response.data) {
|
|
3511
5432
|
return {
|
|
3512
5433
|
success: false,
|
|
@@ -3723,7 +5644,7 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3723
5644
|
...orchestratorHeaders
|
|
3724
5645
|
};
|
|
3725
5646
|
}
|
|
3726
|
-
static async preProcessEndpointSpecific(context, orchestratorContext, baseUrl,
|
|
5647
|
+
static async preProcessEndpointSpecific(context, orchestratorContext, baseUrl, logger2, activityName) {
|
|
3727
5648
|
const endpoint = context.properties.endpoint;
|
|
3728
5649
|
const method = context.properties.method;
|
|
3729
5650
|
if (OrchestratorUtils.isAssetEndpoint(endpoint)) {
|
|
@@ -3733,7 +5654,7 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3733
5654
|
} else if (OrchestratorUtils.isQueueItemsEndpoint(endpoint)) {
|
|
3734
5655
|
OrchestratorUtils.processQueueItemsEndpoint(context, orchestratorContext);
|
|
3735
5656
|
} else if (OrchestratorUtils.isRunJobEndPoint(endpoint, method)) {
|
|
3736
|
-
await OrchestratorUtils.processRunJobEndpoint(context, orchestratorContext, baseUrl,
|
|
5657
|
+
await OrchestratorUtils.processRunJobEndpoint(context, orchestratorContext, baseUrl, logger2, activityName);
|
|
3737
5658
|
}
|
|
3738
5659
|
}
|
|
3739
5660
|
static processAssetEndpoint(context, orchestratorContext) {
|
|
@@ -3757,7 +5678,7 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3757
5678
|
};
|
|
3758
5679
|
}
|
|
3759
5680
|
}
|
|
3760
|
-
static async processRunJobEndpoint(context, orchestratorContext, baseUrl,
|
|
5681
|
+
static async processRunJobEndpoint(context, orchestratorContext, baseUrl, logger2, activityName) {
|
|
3761
5682
|
if (!context.properties.body) {
|
|
3762
5683
|
context.properties.body = {};
|
|
3763
5684
|
}
|
|
@@ -3768,7 +5689,7 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3768
5689
|
if (orchestratorContext.source) {
|
|
3769
5690
|
body.Source = orchestratorContext.source;
|
|
3770
5691
|
}
|
|
3771
|
-
await OrchestratorUtils.preProcessJobsEndPointRequest(context, baseUrl,
|
|
5692
|
+
await OrchestratorUtils.preProcessJobsEndPointRequest(context, baseUrl, logger2, activityName);
|
|
3772
5693
|
}
|
|
3773
5694
|
static isAssetEndpoint(endpoint) {
|
|
3774
5695
|
return endpoint.includes(OrchestratorUtils.ASSETS_ENDPOINT);
|
|
@@ -3796,19 +5717,19 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3796
5717
|
const regex = new RegExp(`${pathPrefix}[^\\/\\?#]+`, "g");
|
|
3797
5718
|
return url.replace(regex, `${pathPrefix}${encodeURIComponent(resourceName)}`);
|
|
3798
5719
|
}
|
|
3799
|
-
static async postProcessEndPointSpecific(context, response, baseUrl,
|
|
5720
|
+
static async postProcessEndPointSpecific(context, response, baseUrl, logger2) {
|
|
3800
5721
|
if (OrchestratorUtils.isRunJobEndPoint(context?.properties?.endpoint, context?.properties?.method) || OrchestratorUtils.isGetJobResultEndPoint(context?.properties?.endpoint, context?.properties?.method)) {
|
|
3801
|
-
return await OrchestratorUtils.postProcessJobsEndpoint(context, response, baseUrl,
|
|
5722
|
+
return await OrchestratorUtils.postProcessJobsEndpoint(context, response, baseUrl, logger2);
|
|
3802
5723
|
}
|
|
3803
5724
|
return response;
|
|
3804
5725
|
}
|
|
3805
|
-
static async postProcessJobsEndpoint(context, response, baseUrl,
|
|
5726
|
+
static async postProcessJobsEndpoint(context, response, baseUrl, logger2) {
|
|
3806
5727
|
if (!(0, generic_utils_1.hasProperty)(response?.data?.content, "OutputFile")) {
|
|
3807
5728
|
return response;
|
|
3808
5729
|
}
|
|
3809
5730
|
if (!(0, generic_utils_1.hasProperty)(response?.data?.content, "OrganizationUnitId")) {
|
|
3810
5731
|
const err = "No OrganizationUnitId found in the Orchestrator response";
|
|
3811
|
-
|
|
5732
|
+
logger2.error(err);
|
|
3812
5733
|
return {
|
|
3813
5734
|
success: false,
|
|
3814
5735
|
error: new Error(err)
|
|
@@ -3816,7 +5737,7 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3816
5737
|
}
|
|
3817
5738
|
const organizationUnitId = response?.data?.content.OrganizationUnitId;
|
|
3818
5739
|
const outputFileName = response?.data?.content["OutputFile"];
|
|
3819
|
-
let extractedResponse = await OrchestratorUtils.extractOutputFileAndFetchContents(baseUrl, outputFileName, organizationUnitId, context.properties,
|
|
5740
|
+
let extractedResponse = await OrchestratorUtils.extractOutputFileAndFetchContents(baseUrl, outputFileName, organizationUnitId, context.properties, logger2);
|
|
3820
5741
|
if (!extractedResponse.success) {
|
|
3821
5742
|
return {
|
|
3822
5743
|
success: false,
|
|
@@ -3870,15 +5791,15 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3870
5791
|
};
|
|
3871
5792
|
return { requestUrl, headers };
|
|
3872
5793
|
}
|
|
3873
|
-
static async extractOutputFileAndFetchContents(baseUrl, outputFileName, organizationUnitId, properties,
|
|
5794
|
+
static async extractOutputFileAndFetchContents(baseUrl, outputFileName, organizationUnitId, properties, logger2) {
|
|
3874
5795
|
try {
|
|
3875
5796
|
const { requestUrl, headers } = OrchestratorUtils.getAttachmentRequestConfig(baseUrl, outputFileName, properties.accessToken, organizationUnitId);
|
|
3876
|
-
const orchestratorAttachmentResponse = await (0, http_retry_utils_1.makeHttpRequestWithRetry)(requestUrl, http_method_1.HttpMethod.GET, headers, undefined, undefined, undefined, undefined, properties.timeoutMs || 30000, OrchestratorUtils.DEFAULT_HTTP_RETRY_CONFIG,
|
|
5797
|
+
const orchestratorAttachmentResponse = await (0, http_retry_utils_1.makeHttpRequestWithRetry)(requestUrl, http_method_1.HttpMethod.GET, headers, undefined, undefined, undefined, undefined, properties.timeoutMs || 30000, OrchestratorUtils.DEFAULT_HTTP_RETRY_CONFIG, logger2);
|
|
3877
5798
|
try {
|
|
3878
5799
|
const uriValidationResult = OrchestratorUtils.validateAndExtractOutputFileUri(orchestratorAttachmentResponse);
|
|
3879
5800
|
if (!uriValidationResult.success) {
|
|
3880
5801
|
const err = `Error while validating and extracting URI from Orchestrator response: ${uriValidationResult.error}`;
|
|
3881
|
-
|
|
5802
|
+
logger2.error(err);
|
|
3882
5803
|
return {
|
|
3883
5804
|
success: false,
|
|
3884
5805
|
error: new Error(err)
|
|
@@ -3887,7 +5808,7 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3887
5808
|
const uri = uriValidationResult.uri;
|
|
3888
5809
|
const rawOutputFileResponse = await (0, http_retry_utils_1.makeHttpRequestWithRetry)(uri, http_method_1.HttpMethod.GET, {
|
|
3889
5810
|
[constants_1.CONTENT_TYPE]: constants_1.APPLICATION_JSON
|
|
3890
|
-
}, undefined, undefined, undefined, undefined, properties.timeoutMs || 30000, OrchestratorUtils.DEFAULT_HTTP_RETRY_CONFIG,
|
|
5811
|
+
}, undefined, undefined, undefined, undefined, properties.timeoutMs || 30000, OrchestratorUtils.DEFAULT_HTTP_RETRY_CONFIG, logger2);
|
|
3891
5812
|
const contentValidationResponse = OrchestratorUtils.validateAndExtractContentFromOutputFileUriResponse(rawOutputFileResponse);
|
|
3892
5813
|
if (contentValidationResponse.success) {
|
|
3893
5814
|
const parsedContent = OrchestratorUtils.parseJsonOrReturnOriginalObject(contentValidationResponse.content);
|
|
@@ -3898,7 +5819,7 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3898
5819
|
}
|
|
3899
5820
|
} catch (error) {
|
|
3900
5821
|
const err = `Error requesting Orchestrator output file URI : ${(0, utils_1.getErrorMessage)(error)}`;
|
|
3901
|
-
|
|
5822
|
+
logger2.error(err);
|
|
3902
5823
|
return {
|
|
3903
5824
|
success: false,
|
|
3904
5825
|
error: new Error(err)
|
|
@@ -3906,7 +5827,7 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3906
5827
|
}
|
|
3907
5828
|
} catch (error) {
|
|
3908
5829
|
const err = `Error while extracting content from Orchestrator output file: ${(0, utils_1.getErrorMessage)(error)}`;
|
|
3909
|
-
|
|
5830
|
+
logger2.error(err);
|
|
3910
5831
|
return {
|
|
3911
5832
|
success: false,
|
|
3912
5833
|
error: new Error(err)
|
|
@@ -3917,10 +5838,10 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3917
5838
|
error: new Error(`Error while extracting content from Orchestrator output file`)
|
|
3918
5839
|
};
|
|
3919
5840
|
}
|
|
3920
|
-
static async preProcessJobsEndPointRequest(context, baseUrl,
|
|
3921
|
-
await OrchestratorUtils.handleOversizedInputArguments(context, baseUrl,
|
|
5841
|
+
static async preProcessJobsEndPointRequest(context, baseUrl, logger2, activityName) {
|
|
5842
|
+
await OrchestratorUtils.handleOversizedInputArguments(context, baseUrl, logger2, activityName);
|
|
3922
5843
|
}
|
|
3923
|
-
static async handleOversizedInputArguments(context, baseUrl,
|
|
5844
|
+
static async handleOversizedInputArguments(context, baseUrl, logger2, activityName) {
|
|
3924
5845
|
if (!context?.properties?.body) {
|
|
3925
5846
|
return;
|
|
3926
5847
|
}
|
|
@@ -3935,25 +5856,25 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3935
5856
|
}
|
|
3936
5857
|
const filename = (0, generic_utils_1.getNewGuid)();
|
|
3937
5858
|
try {
|
|
3938
|
-
const { attachmentId, blobStorageUrl, uploadHeaders } = await OrchestratorUtils.createOrchestratorAttachmentAndGetUploadMetadata(context, baseUrl, filename,
|
|
3939
|
-
|
|
5859
|
+
const { attachmentId, blobStorageUrl, uploadHeaders } = await OrchestratorUtils.createOrchestratorAttachmentAndGetUploadMetadata(context, baseUrl, filename, logger2, activityName);
|
|
5860
|
+
logger2.debug(`[${activityName}] Uploading content to Azure Blob Storage: ${blobStorageUrl}`);
|
|
3940
5861
|
const encoder = new TextEncoder;
|
|
3941
5862
|
const fileContent = encoder.encode(inputString);
|
|
3942
|
-
|
|
3943
|
-
const attachmentUploadResponse = await (0, http_retry_utils_1.makeHttpRequestWithRetry)(blobStorageUrl, http_method_1.HttpMethod.PUT, uploadHeaders, undefined, fileContent, undefined, undefined, context.properties.timeoutMs || 30000, OrchestratorUtils.DEFAULT_HTTP_RETRY_CONFIG,
|
|
5863
|
+
logger2.debug(`[${activityName}] Prepared content bytes for upload (${fileContent.length} bytes)`);
|
|
5864
|
+
const attachmentUploadResponse = await (0, http_retry_utils_1.makeHttpRequestWithRetry)(blobStorageUrl, http_method_1.HttpMethod.PUT, uploadHeaders, undefined, fileContent, undefined, undefined, context.properties.timeoutMs || 30000, OrchestratorUtils.DEFAULT_HTTP_RETRY_CONFIG, logger2);
|
|
3944
5865
|
if (!attachmentUploadResponse.success) {
|
|
3945
5866
|
const errorMsg = `Failed to upload content to Azure Blob Storage: ${attachmentUploadResponse.error?.message || "Unknown error"}`;
|
|
3946
|
-
|
|
5867
|
+
logger2.error(`[${activityName}] ${errorMsg}`);
|
|
3947
5868
|
throw new Error(errorMsg);
|
|
3948
5869
|
}
|
|
3949
|
-
|
|
5870
|
+
logger2.debug(`[${activityName}] Successfully uploaded content to Azure Blob Storage`);
|
|
3950
5871
|
context.properties.body = {
|
|
3951
5872
|
...body,
|
|
3952
5873
|
InputFile: attachmentId
|
|
3953
5874
|
};
|
|
3954
5875
|
delete context.properties.body.InputArguments;
|
|
3955
5876
|
} catch (error) {
|
|
3956
|
-
|
|
5877
|
+
logger2.error(`[${activityName}] Error processing large InputArguments: ${error}`);
|
|
3957
5878
|
return;
|
|
3958
5879
|
}
|
|
3959
5880
|
}
|
|
@@ -3970,18 +5891,18 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3970
5891
|
].join("/");
|
|
3971
5892
|
return `${baseUrl}/${path}`;
|
|
3972
5893
|
}
|
|
3973
|
-
static async createOrchestratorAttachmentAndGetUploadMetadata(context, baseUrl, filename,
|
|
5894
|
+
static async createOrchestratorAttachmentAndGetUploadMetadata(context, baseUrl, filename, logger2, activityName) {
|
|
3974
5895
|
try {
|
|
3975
5896
|
const url = baseUrl + OrchestratorUtils.ATTACHMENTS_ENDPOINT;
|
|
3976
5897
|
const attachmentCreationPayload = {
|
|
3977
5898
|
Name: filename
|
|
3978
5899
|
};
|
|
3979
|
-
|
|
5900
|
+
logger2.debug(`[${activityName}] Creating attachment: ${filename}`);
|
|
3980
5901
|
const attachmentCreationRequestHeaders = {
|
|
3981
5902
|
...context.properties.headers
|
|
3982
5903
|
};
|
|
3983
|
-
let attachmentCreationResponse = await (0, http_retry_utils_1.makeHttpRequestWithRetry)(url, http_method_1.HttpMethod.POST, attachmentCreationRequestHeaders, undefined, attachmentCreationPayload, context.properties.useProxyServer ? context.properties.proxySettings : undefined, undefined, context.properties.timeoutMs || 30000, OrchestratorUtils.DEFAULT_HTTP_RETRY_CONFIG,
|
|
3984
|
-
const attachmentMetadata = OrchestratorUtils.validateAndExtractAttachmentMetadata(attachmentCreationResponse,
|
|
5904
|
+
let attachmentCreationResponse = await (0, http_retry_utils_1.makeHttpRequestWithRetry)(url, http_method_1.HttpMethod.POST, attachmentCreationRequestHeaders, undefined, attachmentCreationPayload, context.properties.useProxyServer ? context.properties.proxySettings : undefined, undefined, context.properties.timeoutMs || 30000, OrchestratorUtils.DEFAULT_HTTP_RETRY_CONFIG, logger2);
|
|
5905
|
+
const attachmentMetadata = OrchestratorUtils.validateAndExtractAttachmentMetadata(attachmentCreationResponse, logger2, activityName);
|
|
3985
5906
|
if (!attachmentMetadata.success) {
|
|
3986
5907
|
throw attachmentMetadata.error;
|
|
3987
5908
|
}
|
|
@@ -3991,14 +5912,14 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
3991
5912
|
uploadHeaders: attachmentMetadata.data.uploadHeaders
|
|
3992
5913
|
};
|
|
3993
5914
|
} catch (error) {
|
|
3994
|
-
|
|
5915
|
+
logger2.error(`[${activityName}] Error in createOrchestratorAttachmentAndGetUploadMetadata: ${error}`);
|
|
3995
5916
|
throw error;
|
|
3996
5917
|
}
|
|
3997
5918
|
}
|
|
3998
|
-
static validateAndExtractAttachmentMetadata(attachmentCreationResponse,
|
|
5919
|
+
static validateAndExtractAttachmentMetadata(attachmentCreationResponse, logger2, activityName) {
|
|
3999
5920
|
if (!attachmentCreationResponse.success || !attachmentCreationResponse.data) {
|
|
4000
5921
|
const errorMsg = `Failed to create attachment: ${attachmentCreationResponse.error?.message || "Unknown error"}`;
|
|
4001
|
-
|
|
5922
|
+
logger2.error(`[${activityName}] ${errorMsg}`);
|
|
4002
5923
|
return {
|
|
4003
5924
|
success: false,
|
|
4004
5925
|
data: undefined,
|
|
@@ -4007,7 +5928,7 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
4007
5928
|
}
|
|
4008
5929
|
if (!(0, generic_utils_1.hasProperty)(attachmentCreationResponse.data, "content")) {
|
|
4009
5930
|
const errorMsg = "Invalid attachment response: missing content";
|
|
4010
|
-
|
|
5931
|
+
logger2.error(`[${activityName}] ${errorMsg}`);
|
|
4011
5932
|
return {
|
|
4012
5933
|
success: false,
|
|
4013
5934
|
data: undefined,
|
|
@@ -4017,7 +5938,7 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
4017
5938
|
const content = attachmentCreationResponse.data.content;
|
|
4018
5939
|
if (!(0, generic_utils_1.hasProperty)(content, "Id") || !(0, generic_utils_1.hasProperty)(content, "BlobFileAccess") || !(0, generic_utils_1.hasProperty)(content.BlobFileAccess, "Uri")) {
|
|
4019
5940
|
const errorMsg = `Invalid attachment response: missing Id or BlobFileAccess or Uri`;
|
|
4020
|
-
|
|
5941
|
+
logger2.error(`[${activityName}] ${errorMsg}`);
|
|
4021
5942
|
return {
|
|
4022
5943
|
success: false,
|
|
4023
5944
|
data: undefined,
|
|
@@ -4035,7 +5956,7 @@ var require_orchestrator_utils = __commonJS((exports) => {
|
|
|
4035
5956
|
uploadHeaders[headers.Keys[i]] = headers.Values[i];
|
|
4036
5957
|
}
|
|
4037
5958
|
}
|
|
4038
|
-
|
|
5959
|
+
logger2.debug(`[${activityName}] Extracted upload headers from BlobFileAccess Keys/Values: ${JSON.stringify(Object.keys(uploadHeaders))}`);
|
|
4039
5960
|
}
|
|
4040
5961
|
}
|
|
4041
5962
|
return {
|
|
@@ -4078,20 +5999,20 @@ var require_orchestrator_request_processor = __commonJS((exports) => {
|
|
|
4078
5999
|
var orchestrator_utils_1 = require_orchestrator_utils();
|
|
4079
6000
|
|
|
4080
6001
|
class OrchestratorRequestProcessor extends base_request_processor_1.BaseRequestProcessor {
|
|
4081
|
-
async preHook(context, baseUrl,
|
|
6002
|
+
async preHook(context, baseUrl, logger2, activityName) {
|
|
4082
6003
|
const orchestratorContext = context.properties.connectorContext?.orchestratorContext;
|
|
4083
6004
|
if (!orchestratorContext) {
|
|
4084
6005
|
return;
|
|
4085
6006
|
}
|
|
4086
6007
|
orchestrator_utils_1.OrchestratorUtils.applyFolderHeaders(context, orchestratorContext);
|
|
4087
|
-
await orchestrator_utils_1.OrchestratorUtils.preProcessEndpointSpecific(context, orchestratorContext, baseUrl,
|
|
6008
|
+
await orchestrator_utils_1.OrchestratorUtils.preProcessEndpointSpecific(context, orchestratorContext, baseUrl, logger2, activityName);
|
|
4088
6009
|
}
|
|
4089
|
-
async postHook(context, response, baseUrl,
|
|
6010
|
+
async postHook(context, response, baseUrl, logger2) {
|
|
4090
6011
|
const orchestratorContext = context.properties.connectorContext?.orchestratorContext;
|
|
4091
6012
|
if (!orchestratorContext) {
|
|
4092
6013
|
return response;
|
|
4093
6014
|
}
|
|
4094
|
-
response = await orchestrator_utils_1.OrchestratorUtils.postProcessEndPointSpecific(context, response, baseUrl,
|
|
6015
|
+
response = await orchestrator_utils_1.OrchestratorUtils.postProcessEndPointSpecific(context, response, baseUrl, logger2);
|
|
4095
6016
|
return response;
|
|
4096
6017
|
}
|
|
4097
6018
|
}
|
|
@@ -4166,8 +6087,8 @@ var require_int_svc_api_request_activity = __commonJS((exports) => {
|
|
|
4166
6087
|
var processors_1 = require_processors();
|
|
4167
6088
|
|
|
4168
6089
|
class IntSvcApiRequestActivity extends activity_base_1.ActivityBase {
|
|
4169
|
-
constructor(requestDefinition,
|
|
4170
|
-
super(
|
|
6090
|
+
constructor(requestDefinition, logger2, name) {
|
|
6091
|
+
super(logger2);
|
|
4171
6092
|
this.type = models_1.ActivityType.IntSvcApiRequest;
|
|
4172
6093
|
this.name = models_1.ActivityType.IntSvcApiRequest;
|
|
4173
6094
|
this.INTEGRATION_SERVICE_PATH_PREFIX = "elements_/v3/element/instances";
|
|
@@ -4311,7 +6232,7 @@ var require_int_svc_api_request_activity = __commonJS((exports) => {
|
|
|
4311
6232
|
}
|
|
4312
6233
|
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
4313
6234
|
} while (currentResponse.data.statusCode === 202);
|
|
4314
|
-
function logPollingTimeDetails(
|
|
6235
|
+
function logPollingTimeDetails(logger2, success) {
|
|
4315
6236
|
const jobRequestToPollStartTime = timeMakingIsRequest - startTime;
|
|
4316
6237
|
const totalPollingTime = Date.now() - startTime;
|
|
4317
6238
|
const pollingRequestDurations = pollingRequestDurationsMs.map((duration, index) => {
|
|
@@ -4330,7 +6251,7 @@ var require_int_svc_api_request_activity = __commonJS((exports) => {
|
|
|
4330
6251
|
pollingRequestDurations
|
|
4331
6252
|
};
|
|
4332
6253
|
const logMessage = `[IntSvcApiRequestActivity] Async process polling time details: ${JSON.stringify(asyncProcessPollingTimeDetails)}`;
|
|
4333
|
-
|
|
6254
|
+
logger2.warn(logMessage);
|
|
4334
6255
|
console.warn(logMessage);
|
|
4335
6256
|
}
|
|
4336
6257
|
logPollingTimeDetails(this.logger, true);
|
|
@@ -4453,8 +6374,8 @@ var require_int_svc_event_api_request_activity = __commonJS((exports) => {
|
|
|
4453
6374
|
};
|
|
4454
6375
|
|
|
4455
6376
|
class IntSvcEventApiRequestActivity extends activity_base_1.ActivityBase {
|
|
4456
|
-
constructor(requestDefinition,
|
|
4457
|
-
super(
|
|
6377
|
+
constructor(requestDefinition, logger2, name) {
|
|
6378
|
+
super(logger2);
|
|
4458
6379
|
this.type = models_1.ActivityType.IntSvcEventRequest;
|
|
4459
6380
|
this.name = models_1.ActivityType.IntSvcEventRequest;
|
|
4460
6381
|
this.INTEGRATION_SERVICE_PATH_PREFIX = "elements_/v3/element/instances";
|
|
@@ -4683,8 +6604,8 @@ var require_execute_script_activity = __commonJS((exports) => {
|
|
|
4683
6604
|
var local_script_executor_1 = require_local_script_executor();
|
|
4684
6605
|
|
|
4685
6606
|
class ExecuteScriptActivity extends activity_base_1.ActivityBase {
|
|
4686
|
-
constructor(definition,
|
|
4687
|
-
super(
|
|
6607
|
+
constructor(definition, logger2, name) {
|
|
6608
|
+
super(logger2);
|
|
4688
6609
|
this.type = models_1.ActivityType.ScriptExecution;
|
|
4689
6610
|
this.name = models_1.ActivityType.ScriptExecution;
|
|
4690
6611
|
this.properties = definition.properties;
|
|
@@ -4982,8 +6903,8 @@ var require_log_message_activity = __commonJS((exports) => {
|
|
|
4982
6903
|
var activity_base_1 = require_activity_base();
|
|
4983
6904
|
|
|
4984
6905
|
class LogMessageActivity extends activity_base_1.ActivityBase {
|
|
4985
|
-
constructor(definition,
|
|
4986
|
-
super(
|
|
6906
|
+
constructor(definition, logger2, name) {
|
|
6907
|
+
super(logger2);
|
|
4987
6908
|
this.type = activities_1.ActivityType.LogMessage;
|
|
4988
6909
|
this.name = activities_1.ActivityType.LogMessage;
|
|
4989
6910
|
this.properties = definition.properties;
|
|
@@ -5009,14 +6930,14 @@ var require_activity_factory = __commonJS((exports) => {
|
|
|
5009
6930
|
var log_message_activity_1 = require_log_message_activity();
|
|
5010
6931
|
var execute_script_activity_1 = require_execute_script_activity();
|
|
5011
6932
|
var models_1 = require_models();
|
|
5012
|
-
function ActivityFactory(activityDefinition,
|
|
6933
|
+
function ActivityFactory(activityDefinition, logger2, name) {
|
|
5013
6934
|
switch (activityDefinition.type) {
|
|
5014
6935
|
case models_1.ActivityType.HttpRequest:
|
|
5015
|
-
return new http_request_activity_1.HttpRequestActivity(activityDefinition,
|
|
6936
|
+
return new http_request_activity_1.HttpRequestActivity(activityDefinition, logger2, name);
|
|
5016
6937
|
case models_1.ActivityType.ScriptExecution:
|
|
5017
|
-
return new execute_script_activity_1.ExecuteScriptActivity(activityDefinition,
|
|
6938
|
+
return new execute_script_activity_1.ExecuteScriptActivity(activityDefinition, logger2, name);
|
|
5018
6939
|
case models_1.ActivityType.LogMessage:
|
|
5019
|
-
return new log_message_activity_1.LogMessageActivity(activityDefinition,
|
|
6940
|
+
return new log_message_activity_1.LogMessageActivity(activityDefinition, logger2, name);
|
|
5020
6941
|
default:
|
|
5021
6942
|
throw new Error(`Unsupported step type: ${activityDefinition.type}`);
|
|
5022
6943
|
}
|
|
@@ -5267,9 +7188,9 @@ var require_moment = __commonJS((exports, module) => {
|
|
|
5267
7188
|
some = Array.prototype.some;
|
|
5268
7189
|
} else {
|
|
5269
7190
|
some = function(fun) {
|
|
5270
|
-
var
|
|
7191
|
+
var t2 = Object(this), len = t2.length >>> 0, i;
|
|
5271
7192
|
for (i = 0;i < len; i++) {
|
|
5272
|
-
if (i in
|
|
7193
|
+
if (i in t2 && fun.call(this, t2[i], i, t2)) {
|
|
5273
7194
|
return true;
|
|
5274
7195
|
}
|
|
5275
7196
|
}
|
|
@@ -8941,7 +10862,7 @@ var require_date_format_utils = __commonJS((exports) => {
|
|
|
8941
10862
|
var constants_1 = require_constants2();
|
|
8942
10863
|
|
|
8943
10864
|
class DateFormatUtils {
|
|
8944
|
-
static extractOffsetFromDateExpression(expression,
|
|
10865
|
+
static extractOffsetFromDateExpression(expression, logger2) {
|
|
8945
10866
|
if (!expression || typeof expression !== "string") {
|
|
8946
10867
|
return null;
|
|
8947
10868
|
}
|
|
@@ -8958,17 +10879,17 @@ var require_date_format_utils = __commonJS((exports) => {
|
|
|
8958
10879
|
const offset = offsetMatch[0] === constants_1.UTC_TIMEZONE_INDICATOR ? constants_1.DEFAULT_TIMEZONE_OFFSET : offsetMatch[0];
|
|
8959
10880
|
return offset;
|
|
8960
10881
|
} catch (error) {
|
|
8961
|
-
|
|
10882
|
+
logger2.error(`${this.LOG_PREFIX}Failed to extract offset from date expression "${expression}": ${error.message}.`);
|
|
8962
10883
|
return null;
|
|
8963
10884
|
}
|
|
8964
10885
|
}
|
|
8965
|
-
static formatDate(utcString, mask, offset,
|
|
10886
|
+
static formatDate(utcString, mask, offset, logger2) {
|
|
8966
10887
|
if (!utcString || typeof utcString !== "string") {
|
|
8967
|
-
|
|
10888
|
+
logger2.warn(`${this.LOG_PREFIX}UTC string must be a non-empty string. Cannot format date.`);
|
|
8968
10889
|
return utcString || "";
|
|
8969
10890
|
}
|
|
8970
10891
|
if (!mask || typeof mask !== "string") {
|
|
8971
|
-
|
|
10892
|
+
logger2.warn(`${this.LOG_PREFIX}Mask must be a non-empty string. Returning original UTC string: ${utcString}`);
|
|
8972
10893
|
return utcString;
|
|
8973
10894
|
}
|
|
8974
10895
|
try {
|
|
@@ -8984,7 +10905,7 @@ var require_date_format_utils = __commonJS((exports) => {
|
|
|
8984
10905
|
formatted = formatted.replace(/\[Z\]/g, "Z");
|
|
8985
10906
|
return formatted;
|
|
8986
10907
|
} catch (error) {
|
|
8987
|
-
|
|
10908
|
+
logger2.error(`${this.LOG_PREFIX}Failed to format date "${utcString}" with mask "${mask}": ${error.message}. Returning original UTC string.`);
|
|
8988
10909
|
return utcString;
|
|
8989
10910
|
}
|
|
8990
10911
|
}
|
|
@@ -9042,20 +10963,20 @@ var require_error_utils = __commonJS((exports) => {
|
|
|
9042
10963
|
return !!error && typeof error === "object" && "name" in error && "title" in error && "detail" in error && "type" in error && "status" in error;
|
|
9043
10964
|
}
|
|
9044
10965
|
function toErrorString(error) {
|
|
9045
|
-
let
|
|
10966
|
+
let errorMessage2 = "Unknown error";
|
|
9046
10967
|
if (isWorkflowError(error)) {
|
|
9047
10968
|
const title = `${error.name}: ${error.title}`;
|
|
9048
10969
|
const instance = "instance" in error && error.instance ? `. ${error.instance}` : "";
|
|
9049
10970
|
const detail = "detail" in error && error.detail ? `. ${error.detail}` : "";
|
|
9050
|
-
|
|
10971
|
+
errorMessage2 = `${title}${instance}${detail}`;
|
|
9051
10972
|
} else if (!!error && typeof error === "object" && "name" in error && "message" in error) {
|
|
9052
10973
|
const message = `${error.name}: ${error.message}`;
|
|
9053
10974
|
const stack = "stack" in error && error.stack ? `. ${error.stack}` : "";
|
|
9054
|
-
|
|
10975
|
+
errorMessage2 = `${message}${stack}`;
|
|
9055
10976
|
} else {
|
|
9056
|
-
|
|
10977
|
+
errorMessage2 = (0, api_workflow_commons_1.getErrorMessage)(error);
|
|
9057
10978
|
}
|
|
9058
|
-
return
|
|
10979
|
+
return errorMessage2;
|
|
9059
10980
|
}
|
|
9060
10981
|
});
|
|
9061
10982
|
|
|
@@ -9124,9 +11045,9 @@ var require_resource_override_resolver = __commonJS((exports) => {
|
|
|
9124
11045
|
var constants_1 = require_constants2();
|
|
9125
11046
|
|
|
9126
11047
|
class ResourceOverrideResolver {
|
|
9127
|
-
static getOverriddenValue(workflowConfig,
|
|
11048
|
+
static getOverriddenValue(workflowConfig, logger2, resourceType, propertyName, defaultResourceKey, solutionResourceKey) {
|
|
9128
11049
|
if (!workflowConfig.resourceOverwrites || Object.keys(workflowConfig.resourceOverwrites).length === 0) {
|
|
9129
|
-
|
|
11050
|
+
logger2.info(`Resource overwrites is empty, returning defaultResourceKey: ${defaultResourceKey}`);
|
|
9130
11051
|
return defaultResourceKey;
|
|
9131
11052
|
}
|
|
9132
11053
|
const getResourceOverride = (identifier) => {
|
|
@@ -9145,10 +11066,10 @@ var require_resource_override_resolver = __commonJS((exports) => {
|
|
|
9145
11066
|
if (resourceOverride) {
|
|
9146
11067
|
return resourceOverride;
|
|
9147
11068
|
}
|
|
9148
|
-
|
|
11069
|
+
logger2.info(`No resource overrides found, returning defaultResourceKey: ${defaultResourceKey}`);
|
|
9149
11070
|
return defaultResourceKey;
|
|
9150
11071
|
}
|
|
9151
|
-
static getOrchestratorOverrides(workflowConfig,
|
|
11072
|
+
static getOrchestratorOverrides(workflowConfig, logger2, endpoint, pathParameters, bodyParameters) {
|
|
9152
11073
|
const resourcePrefix = this.getResourcePrefix(endpoint);
|
|
9153
11074
|
if (!resourcePrefix) {
|
|
9154
11075
|
return;
|
|
@@ -9157,13 +11078,13 @@ var require_resource_override_resolver = __commonJS((exports) => {
|
|
|
9157
11078
|
if (endpoint.includes(constants_1.ORCHESTRATOR_JOBS_ENDPOINT)) {
|
|
9158
11079
|
resourceParam = bodyParameters?.ReleaseName;
|
|
9159
11080
|
if (!resourceParam) {
|
|
9160
|
-
|
|
11081
|
+
logger2.info("No ReleaseName found in body parameters for Jobs endpoint orchestrator context resolution");
|
|
9161
11082
|
return;
|
|
9162
11083
|
}
|
|
9163
11084
|
} else {
|
|
9164
11085
|
resourceParam = pathParameters.id;
|
|
9165
11086
|
if (!resourceParam) {
|
|
9166
|
-
|
|
11087
|
+
logger2.info("No resource path parameter found for orchestrator context resolution");
|
|
9167
11088
|
return;
|
|
9168
11089
|
}
|
|
9169
11090
|
}
|
|
@@ -9180,16 +11101,16 @@ var require_resource_override_resolver = __commonJS((exports) => {
|
|
|
9180
11101
|
orchestratorContext = {
|
|
9181
11102
|
folderKey: workflowConfig.processConfig?.folderKey
|
|
9182
11103
|
};
|
|
9183
|
-
|
|
11104
|
+
logger2.info(`Fallback orchestrator context: ${JSON.stringify(orchestratorContext)}`);
|
|
9184
11105
|
}
|
|
9185
11106
|
if (endpoint.includes(constants_1.ORCHESTRATOR_JOBS_ENDPOINT)) {
|
|
9186
11107
|
orchestratorContext.source = constants_1.API_WORKFLOW_SOURCE;
|
|
9187
11108
|
}
|
|
9188
11109
|
return orchestratorContext;
|
|
9189
11110
|
}
|
|
9190
|
-
static getPropertyBindings(workflowConfig,
|
|
11111
|
+
static getPropertyBindings(workflowConfig, logger2, eventType) {
|
|
9191
11112
|
if (!workflowConfig.resourceOverwrites || Object.keys(workflowConfig.resourceOverwrites).length === 0) {
|
|
9192
|
-
|
|
11113
|
+
logger2.info(`Resource overwrites is empty, no property bindings for eventType: ${eventType}`);
|
|
9193
11114
|
return;
|
|
9194
11115
|
}
|
|
9195
11116
|
const propertyIdentifier = `Property.${eventType}`;
|
|
@@ -9197,7 +11118,7 @@ var require_resource_override_resolver = __commonJS((exports) => {
|
|
|
9197
11118
|
if (propertyBindings && typeof propertyBindings === "object") {
|
|
9198
11119
|
return propertyBindings;
|
|
9199
11120
|
}
|
|
9200
|
-
|
|
11121
|
+
logger2.info(`No property bindings found for eventType: ${eventType}`);
|
|
9201
11122
|
return;
|
|
9202
11123
|
}
|
|
9203
11124
|
static getResourcePrefix(endpoint) {
|
|
@@ -10173,8 +12094,8 @@ var require_js_expression_handler = __commonJS((exports) => {
|
|
|
10173
12094
|
this.setupWorkerListeners();
|
|
10174
12095
|
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
10175
12096
|
} catch (error) {
|
|
10176
|
-
const
|
|
10177
|
-
console.error(`[JsExpressionHandler] ${
|
|
12097
|
+
const errorMessage2 = "Failed to initialize Worker for expression evaluation";
|
|
12098
|
+
console.error(`[JsExpressionHandler] ${errorMessage2}:`, error);
|
|
10178
12099
|
const workflowError = new utils_1.WorkflowErrorBuilder().fromError(error).setInstance(JsExpressionHandler.INSTANCE_NAME).setTitle((0, localization_1.t)(localization_1.ErrorKeys.INTERNAL_ERROR)).build();
|
|
10179
12100
|
throw workflowError;
|
|
10180
12101
|
}
|
|
@@ -10660,10 +12581,10 @@ var require_trace_view_data_formatter = __commonJS((exports) => {
|
|
|
10660
12581
|
const workflowError = error;
|
|
10661
12582
|
const instance = "instance" in error && error.instance ? `${error.instance}: ` : "";
|
|
10662
12583
|
const detail = "detail" in error && error.detail ? error.detail : "";
|
|
10663
|
-
const
|
|
12584
|
+
const errorMessage2 = `${instance}${detail}`;
|
|
10664
12585
|
spanError = {
|
|
10665
12586
|
message: workflowError.title,
|
|
10666
|
-
details:
|
|
12587
|
+
details: errorMessage2
|
|
10667
12588
|
};
|
|
10668
12589
|
} else {
|
|
10669
12590
|
spanError = {
|
|
@@ -10767,10 +12688,10 @@ var require_abstract_task_handler = __commonJS((exports) => {
|
|
|
10767
12688
|
var utils_1 = require_utils3();
|
|
10768
12689
|
|
|
10769
12690
|
class AbstractTaskHandler {
|
|
10770
|
-
constructor(taskHandlerArgs,
|
|
12691
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
10771
12692
|
this.workflowConfig = taskHandlerArgs.workflowConfig;
|
|
10772
12693
|
this.expressionHandler = expressionHandler;
|
|
10773
|
-
this.logger =
|
|
12694
|
+
this.logger = logger2;
|
|
10774
12695
|
this.taskHandlerArgs = taskHandlerArgs;
|
|
10775
12696
|
}
|
|
10776
12697
|
async handleTask(taskName, task, runtimeExpressionArgs) {
|
|
@@ -10850,8 +12771,8 @@ var require_script_task_handler = __commonJS((exports) => {
|
|
|
10850
12771
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
10851
12772
|
|
|
10852
12773
|
class BaseScriptTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
10853
|
-
constructor(taskHandlerArgs,
|
|
10854
|
-
super(taskHandlerArgs,
|
|
12774
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
12775
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
10855
12776
|
}
|
|
10856
12777
|
async internalHandleTask(taskName, task, _input) {
|
|
10857
12778
|
const scriptInput = {};
|
|
@@ -10861,11 +12782,11 @@ var require_script_task_handler = __commonJS((exports) => {
|
|
|
10861
12782
|
exports.BaseScriptTaskHandler = BaseScriptTaskHandler;
|
|
10862
12783
|
|
|
10863
12784
|
class DefaultScriptTaskHandler extends BaseScriptTaskHandler {
|
|
10864
|
-
constructor(taskHandlerArgs,
|
|
10865
|
-
super(taskHandlerArgs,
|
|
12785
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
12786
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
10866
12787
|
}
|
|
10867
|
-
static create(taskHandlerArgs,
|
|
10868
|
-
return new DefaultScriptTaskHandler(taskHandlerArgs,
|
|
12788
|
+
static create(taskHandlerArgs, logger2, expressionHandler) {
|
|
12789
|
+
return new DefaultScriptTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
10869
12790
|
}
|
|
10870
12791
|
async executeScript(taskName, task, _input) {
|
|
10871
12792
|
const scriptConfig = task.run;
|
|
@@ -10956,18 +12877,18 @@ var require_debug_manager = __commonJS((exports) => {
|
|
|
10956
12877
|
static validateBreakpoints(breakpoints) {
|
|
10957
12878
|
for (const bp of breakpoints) {
|
|
10958
12879
|
if (!bp.id?.trim()) {
|
|
10959
|
-
const
|
|
10960
|
-
console.error(`[DebugManager] ${
|
|
12880
|
+
const errorMessage2 = "Breakpoint ID cannot be empty";
|
|
12881
|
+
console.error(`[DebugManager] ${errorMessage2}`);
|
|
10961
12882
|
throw new Error((0, localization_1.t)(localization_1.ErrorKeys.INTERNAL_ERROR));
|
|
10962
12883
|
}
|
|
10963
12884
|
if (!bp.taskId?.trim()) {
|
|
10964
|
-
const
|
|
10965
|
-
console.error(`[DebugManager] ${
|
|
12885
|
+
const errorMessage2 = "Task ID cannot be empty";
|
|
12886
|
+
console.error(`[DebugManager] ${errorMessage2}`);
|
|
10966
12887
|
throw new Error((0, localization_1.t)(localization_1.ErrorKeys.INTERNAL_ERROR));
|
|
10967
12888
|
}
|
|
10968
12889
|
if (typeof bp.isEnabled !== "boolean") {
|
|
10969
|
-
const
|
|
10970
|
-
console.error(`[DebugManager] ${
|
|
12890
|
+
const errorMessage2 = "Breakpoint isEnabled must be a boolean";
|
|
12891
|
+
console.error(`[DebugManager] ${errorMessage2}`);
|
|
10971
12892
|
throw new Error((0, localization_1.t)(localization_1.ErrorKeys.INTERNAL_ERROR));
|
|
10972
12893
|
}
|
|
10973
12894
|
}
|
|
@@ -11094,13 +13015,13 @@ var require_logging_helper = __commonJS((exports) => {
|
|
|
11094
13015
|
var executor_utils_1 = require_executor_utils();
|
|
11095
13016
|
|
|
11096
13017
|
class LoggingHelper {
|
|
11097
|
-
static async logWorkflowData(
|
|
13018
|
+
static async logWorkflowData(logger2, params) {
|
|
11098
13019
|
const logData = LoggingHelper.buildWorkflowLogData(params.event, params.runtimeExpressionArgs, params.input, params.output, params.details);
|
|
11099
|
-
await
|
|
13020
|
+
await logger2.logWorkflowEvent(params.event, logData, params.error);
|
|
11100
13021
|
}
|
|
11101
|
-
static async logTaskData(
|
|
13022
|
+
static async logTaskData(logger2, params, expressionHandler) {
|
|
11102
13023
|
const logData = await LoggingHelper.buildTaskLogData(params.taskId, params.taskType, params.event, params.runtimeExpressionArgs, expressionHandler, params.input, params.output, params.properties, params.variables, params.displayName, params.shouldPause, params.breakpointId, params.vendorExecutionTimeMs, params.HttpCallMode, params.isUiPathInternalServiceCall);
|
|
11103
|
-
await
|
|
13024
|
+
await logger2.logTaskEvent(params.event, logData, params.error);
|
|
11104
13025
|
}
|
|
11105
13026
|
static buildWorkflowLogData(event, runtimeExpressionArgs, input, output, details) {
|
|
11106
13027
|
let executionTimeMs = undefined;
|
|
@@ -13834,10 +15755,10 @@ var require_isIterable = __commonJS((exports) => {
|
|
|
13834
15755
|
var require_isReadableStreamLike = __commonJS((exports) => {
|
|
13835
15756
|
var __generator = exports && exports.__generator || function(thisArg, body) {
|
|
13836
15757
|
var _ = { label: 0, sent: function() {
|
|
13837
|
-
if (
|
|
13838
|
-
throw
|
|
13839
|
-
return
|
|
13840
|
-
}, trys: [], ops: [] }, f, y,
|
|
15758
|
+
if (t2[0] & 1)
|
|
15759
|
+
throw t2[1];
|
|
15760
|
+
return t2[1];
|
|
15761
|
+
}, trys: [], ops: [] }, f, y, t2, g;
|
|
13841
15762
|
return g = { next: verb(0), throw: verb(1), return: verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
13842
15763
|
return this;
|
|
13843
15764
|
}), g;
|
|
@@ -13851,14 +15772,14 @@ var require_isReadableStreamLike = __commonJS((exports) => {
|
|
|
13851
15772
|
throw new TypeError("Generator is already executing.");
|
|
13852
15773
|
while (_)
|
|
13853
15774
|
try {
|
|
13854
|
-
if (f = 1, y && (
|
|
13855
|
-
return
|
|
13856
|
-
if (y = 0,
|
|
13857
|
-
op = [op[0] & 2,
|
|
15775
|
+
if (f = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done)
|
|
15776
|
+
return t2;
|
|
15777
|
+
if (y = 0, t2)
|
|
15778
|
+
op = [op[0] & 2, t2.value];
|
|
13858
15779
|
switch (op[0]) {
|
|
13859
15780
|
case 0:
|
|
13860
15781
|
case 1:
|
|
13861
|
-
|
|
15782
|
+
t2 = op;
|
|
13862
15783
|
break;
|
|
13863
15784
|
case 4:
|
|
13864
15785
|
_.label++;
|
|
@@ -13873,25 +15794,25 @@ var require_isReadableStreamLike = __commonJS((exports) => {
|
|
|
13873
15794
|
_.trys.pop();
|
|
13874
15795
|
continue;
|
|
13875
15796
|
default:
|
|
13876
|
-
if (!(
|
|
15797
|
+
if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
13877
15798
|
_ = 0;
|
|
13878
15799
|
continue;
|
|
13879
15800
|
}
|
|
13880
|
-
if (op[0] === 3 && (!
|
|
15801
|
+
if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) {
|
|
13881
15802
|
_.label = op[1];
|
|
13882
15803
|
break;
|
|
13883
15804
|
}
|
|
13884
|
-
if (op[0] === 6 && _.label <
|
|
13885
|
-
_.label =
|
|
13886
|
-
|
|
15805
|
+
if (op[0] === 6 && _.label < t2[1]) {
|
|
15806
|
+
_.label = t2[1];
|
|
15807
|
+
t2 = op;
|
|
13887
15808
|
break;
|
|
13888
15809
|
}
|
|
13889
|
-
if (
|
|
13890
|
-
_.label =
|
|
15810
|
+
if (t2 && _.label < t2[2]) {
|
|
15811
|
+
_.label = t2[2];
|
|
13891
15812
|
_.ops.push(op);
|
|
13892
15813
|
break;
|
|
13893
15814
|
}
|
|
13894
|
-
if (
|
|
15815
|
+
if (t2[2])
|
|
13895
15816
|
_.ops.pop();
|
|
13896
15817
|
_.trys.pop();
|
|
13897
15818
|
continue;
|
|
@@ -13901,7 +15822,7 @@ var require_isReadableStreamLike = __commonJS((exports) => {
|
|
|
13901
15822
|
op = [6, e];
|
|
13902
15823
|
y = 0;
|
|
13903
15824
|
} finally {
|
|
13904
|
-
f =
|
|
15825
|
+
f = t2 = 0;
|
|
13905
15826
|
}
|
|
13906
15827
|
if (op[0] & 5)
|
|
13907
15828
|
throw op[1];
|
|
@@ -14028,10 +15949,10 @@ var require_innerFrom = __commonJS((exports) => {
|
|
|
14028
15949
|
};
|
|
14029
15950
|
var __generator = exports && exports.__generator || function(thisArg, body) {
|
|
14030
15951
|
var _ = { label: 0, sent: function() {
|
|
14031
|
-
if (
|
|
14032
|
-
throw
|
|
14033
|
-
return
|
|
14034
|
-
}, trys: [], ops: [] }, f, y,
|
|
15952
|
+
if (t2[0] & 1)
|
|
15953
|
+
throw t2[1];
|
|
15954
|
+
return t2[1];
|
|
15955
|
+
}, trys: [], ops: [] }, f, y, t2, g;
|
|
14035
15956
|
return g = { next: verb(0), throw: verb(1), return: verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
14036
15957
|
return this;
|
|
14037
15958
|
}), g;
|
|
@@ -14045,14 +15966,14 @@ var require_innerFrom = __commonJS((exports) => {
|
|
|
14045
15966
|
throw new TypeError("Generator is already executing.");
|
|
14046
15967
|
while (_)
|
|
14047
15968
|
try {
|
|
14048
|
-
if (f = 1, y && (
|
|
14049
|
-
return
|
|
14050
|
-
if (y = 0,
|
|
14051
|
-
op = [op[0] & 2,
|
|
15969
|
+
if (f = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done)
|
|
15970
|
+
return t2;
|
|
15971
|
+
if (y = 0, t2)
|
|
15972
|
+
op = [op[0] & 2, t2.value];
|
|
14052
15973
|
switch (op[0]) {
|
|
14053
15974
|
case 0:
|
|
14054
15975
|
case 1:
|
|
14055
|
-
|
|
15976
|
+
t2 = op;
|
|
14056
15977
|
break;
|
|
14057
15978
|
case 4:
|
|
14058
15979
|
_.label++;
|
|
@@ -14067,25 +15988,25 @@ var require_innerFrom = __commonJS((exports) => {
|
|
|
14067
15988
|
_.trys.pop();
|
|
14068
15989
|
continue;
|
|
14069
15990
|
default:
|
|
14070
|
-
if (!(
|
|
15991
|
+
if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
14071
15992
|
_ = 0;
|
|
14072
15993
|
continue;
|
|
14073
15994
|
}
|
|
14074
|
-
if (op[0] === 3 && (!
|
|
15995
|
+
if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) {
|
|
14075
15996
|
_.label = op[1];
|
|
14076
15997
|
break;
|
|
14077
15998
|
}
|
|
14078
|
-
if (op[0] === 6 && _.label <
|
|
14079
|
-
_.label =
|
|
14080
|
-
|
|
15999
|
+
if (op[0] === 6 && _.label < t2[1]) {
|
|
16000
|
+
_.label = t2[1];
|
|
16001
|
+
t2 = op;
|
|
14081
16002
|
break;
|
|
14082
16003
|
}
|
|
14083
|
-
if (
|
|
14084
|
-
_.label =
|
|
16004
|
+
if (t2 && _.label < t2[2]) {
|
|
16005
|
+
_.label = t2[2];
|
|
14085
16006
|
_.ops.push(op);
|
|
14086
16007
|
break;
|
|
14087
16008
|
}
|
|
14088
|
-
if (
|
|
16009
|
+
if (t2[2])
|
|
14089
16010
|
_.ops.pop();
|
|
14090
16011
|
_.trys.pop();
|
|
14091
16012
|
continue;
|
|
@@ -14095,7 +16016,7 @@ var require_innerFrom = __commonJS((exports) => {
|
|
|
14095
16016
|
op = [6, e];
|
|
14096
16017
|
y = 0;
|
|
14097
16018
|
} finally {
|
|
14098
|
-
f =
|
|
16019
|
+
f = t2 = 0;
|
|
14099
16020
|
}
|
|
14100
16021
|
if (op[0] & 5)
|
|
14101
16022
|
throw op[1];
|
|
@@ -15544,10 +17465,10 @@ var require_fromEventPattern = __commonJS((exports) => {
|
|
|
15544
17465
|
var require_generate = __commonJS((exports) => {
|
|
15545
17466
|
var __generator = exports && exports.__generator || function(thisArg, body) {
|
|
15546
17467
|
var _ = { label: 0, sent: function() {
|
|
15547
|
-
if (
|
|
15548
|
-
throw
|
|
15549
|
-
return
|
|
15550
|
-
}, trys: [], ops: [] }, f, y,
|
|
17468
|
+
if (t2[0] & 1)
|
|
17469
|
+
throw t2[1];
|
|
17470
|
+
return t2[1];
|
|
17471
|
+
}, trys: [], ops: [] }, f, y, t2, g;
|
|
15551
17472
|
return g = { next: verb(0), throw: verb(1), return: verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
15552
17473
|
return this;
|
|
15553
17474
|
}), g;
|
|
@@ -15561,14 +17482,14 @@ var require_generate = __commonJS((exports) => {
|
|
|
15561
17482
|
throw new TypeError("Generator is already executing.");
|
|
15562
17483
|
while (_)
|
|
15563
17484
|
try {
|
|
15564
|
-
if (f = 1, y && (
|
|
15565
|
-
return
|
|
15566
|
-
if (y = 0,
|
|
15567
|
-
op = [op[0] & 2,
|
|
17485
|
+
if (f = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done)
|
|
17486
|
+
return t2;
|
|
17487
|
+
if (y = 0, t2)
|
|
17488
|
+
op = [op[0] & 2, t2.value];
|
|
15568
17489
|
switch (op[0]) {
|
|
15569
17490
|
case 0:
|
|
15570
17491
|
case 1:
|
|
15571
|
-
|
|
17492
|
+
t2 = op;
|
|
15572
17493
|
break;
|
|
15573
17494
|
case 4:
|
|
15574
17495
|
_.label++;
|
|
@@ -15583,25 +17504,25 @@ var require_generate = __commonJS((exports) => {
|
|
|
15583
17504
|
_.trys.pop();
|
|
15584
17505
|
continue;
|
|
15585
17506
|
default:
|
|
15586
|
-
if (!(
|
|
17507
|
+
if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
15587
17508
|
_ = 0;
|
|
15588
17509
|
continue;
|
|
15589
17510
|
}
|
|
15590
|
-
if (op[0] === 3 && (!
|
|
17511
|
+
if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) {
|
|
15591
17512
|
_.label = op[1];
|
|
15592
17513
|
break;
|
|
15593
17514
|
}
|
|
15594
|
-
if (op[0] === 6 && _.label <
|
|
15595
|
-
_.label =
|
|
15596
|
-
|
|
17515
|
+
if (op[0] === 6 && _.label < t2[1]) {
|
|
17516
|
+
_.label = t2[1];
|
|
17517
|
+
t2 = op;
|
|
15597
17518
|
break;
|
|
15598
17519
|
}
|
|
15599
|
-
if (
|
|
15600
|
-
_.label =
|
|
17520
|
+
if (t2 && _.label < t2[2]) {
|
|
17521
|
+
_.label = t2[2];
|
|
15601
17522
|
_.ops.push(op);
|
|
15602
17523
|
break;
|
|
15603
17524
|
}
|
|
15604
|
-
if (
|
|
17525
|
+
if (t2[2])
|
|
15605
17526
|
_.ops.pop();
|
|
15606
17527
|
_.trys.pop();
|
|
15607
17528
|
continue;
|
|
@@ -15611,7 +17532,7 @@ var require_generate = __commonJS((exports) => {
|
|
|
15611
17532
|
op = [6, e];
|
|
15612
17533
|
y = 0;
|
|
15613
17534
|
} finally {
|
|
15614
|
-
f =
|
|
17535
|
+
f = t2 = 0;
|
|
15615
17536
|
}
|
|
15616
17537
|
if (op[0] & 5)
|
|
15617
17538
|
throw op[1];
|
|
@@ -16473,13 +18394,13 @@ var require_catchError = __commonJS((exports) => {
|
|
|
16473
18394
|
var innerFrom_1 = require_innerFrom();
|
|
16474
18395
|
var OperatorSubscriber_1 = require_OperatorSubscriber();
|
|
16475
18396
|
var lift_1 = require_lift();
|
|
16476
|
-
function
|
|
18397
|
+
function catchError2(selector) {
|
|
16477
18398
|
return lift_1.operate(function(source, subscriber) {
|
|
16478
18399
|
var innerSub = null;
|
|
16479
18400
|
var syncUnsub = false;
|
|
16480
18401
|
var handledResult;
|
|
16481
18402
|
innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, undefined, function(err) {
|
|
16482
|
-
handledResult = innerFrom_1.innerFrom(selector(err,
|
|
18403
|
+
handledResult = innerFrom_1.innerFrom(selector(err, catchError2(selector)(source)));
|
|
16483
18404
|
if (innerSub) {
|
|
16484
18405
|
innerSub.unsubscribe();
|
|
16485
18406
|
innerSub = null;
|
|
@@ -16495,7 +18416,7 @@ var require_catchError = __commonJS((exports) => {
|
|
|
16495
18416
|
}
|
|
16496
18417
|
});
|
|
16497
18418
|
}
|
|
16498
|
-
exports.catchError =
|
|
18419
|
+
exports.catchError = catchError2;
|
|
16499
18420
|
});
|
|
16500
18421
|
|
|
16501
18422
|
// ../../node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js
|
|
@@ -20204,8 +22125,8 @@ var require_break_task_handler = __commonJS((exports) => {
|
|
|
20204
22125
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
20205
22126
|
|
|
20206
22127
|
class BreakTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
20207
|
-
constructor(taskHandlerArgs,
|
|
20208
|
-
super(taskHandlerArgs,
|
|
22128
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
22129
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
20209
22130
|
}
|
|
20210
22131
|
async internalHandleTask(taskName, task, input) {
|
|
20211
22132
|
this.logger.info(`Executing BreakTask: ${taskName}`);
|
|
@@ -20253,8 +22174,8 @@ var require_do_task_handler = __commonJS((exports) => {
|
|
|
20253
22174
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
20254
22175
|
|
|
20255
22176
|
class DoTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
20256
|
-
constructor(taskHandlerArgs,
|
|
20257
|
-
super(taskHandlerArgs,
|
|
22177
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
22178
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
20258
22179
|
}
|
|
20259
22180
|
async internalHandleTask(_taskName, task, input) {
|
|
20260
22181
|
const result = await task_executor_helper_1.TaskExecutorHelper.executeTaskList(task.do, input, this.workflowConfig, this.getRuntimeExpressionArgs(), this.logger, this.expressionHandler, task.variables);
|
|
@@ -20276,8 +22197,8 @@ var require_do_while_task_handler = __commonJS((exports) => {
|
|
|
20276
22197
|
var MAX_ITERATIONS = 1e4;
|
|
20277
22198
|
|
|
20278
22199
|
class DoWhileTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
20279
|
-
constructor(taskHandlerArgs,
|
|
20280
|
-
super(taskHandlerArgs,
|
|
22200
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
22201
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
20281
22202
|
}
|
|
20282
22203
|
async internalHandleTask(taskName, task, previousStepOutput) {
|
|
20283
22204
|
this.logger.info(`Executing DoWhileTask: ${taskName}`);
|
|
@@ -20334,8 +22255,8 @@ var require_for_task_handler = __commonJS((exports) => {
|
|
|
20334
22255
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
20335
22256
|
|
|
20336
22257
|
class ForTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
20337
|
-
constructor(taskHandlerArgs,
|
|
20338
|
-
super(taskHandlerArgs,
|
|
22258
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
22259
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
20339
22260
|
}
|
|
20340
22261
|
async internalHandleTask(taskName, task, previousStepOutput) {
|
|
20341
22262
|
this.logger.info(`Executing ForTask: ${taskName}`);
|
|
@@ -20589,8 +22510,8 @@ var require_task_utils = __commonJS((exports) => {
|
|
|
20589
22510
|
}
|
|
20590
22511
|
var getHttpErrorDetails = (httpResult) => {
|
|
20591
22512
|
const providerMessage = httpResult?.content?.providerMessage;
|
|
20592
|
-
const
|
|
20593
|
-
let details = providerMessage &&
|
|
22513
|
+
const errorMessage2 = httpResult?.content?.message;
|
|
22514
|
+
let details = providerMessage && errorMessage2 ? `${errorMessage2} - ${providerMessage}` : providerMessage || errorMessage2;
|
|
20594
22515
|
if (!details) {
|
|
20595
22516
|
const content = httpResult?.content;
|
|
20596
22517
|
details = content ? JSON.stringify(content) : "";
|
|
@@ -20613,8 +22534,8 @@ var require_http_task_handler = __commonJS((exports) => {
|
|
|
20613
22534
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
20614
22535
|
|
|
20615
22536
|
class HttpTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
20616
|
-
constructor(taskHandlerArgs,
|
|
20617
|
-
super(taskHandlerArgs,
|
|
22537
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
22538
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
20618
22539
|
}
|
|
20619
22540
|
async internalHandleTask(taskName, task, input) {
|
|
20620
22541
|
let endpoint = task.with?.endpoint;
|
|
@@ -20733,10 +22654,10 @@ var require_intsvc_task_handler_util = __commonJS((exports) => {
|
|
|
20733
22654
|
headers[constants_1.X_UIPATH_ORIGINATOR] = workflowConfig.source || constants_1.ApiWorkflowJobSource;
|
|
20734
22655
|
return headers;
|
|
20735
22656
|
}
|
|
20736
|
-
static resolveConnectionId(task, workflowConfig,
|
|
22657
|
+
static resolveConnectionId(task, workflowConfig, logger2, bindingKey) {
|
|
20737
22658
|
const originalConnectionId = typeof task.with?.connectionId === "string" ? task.with.connectionId : "";
|
|
20738
22659
|
const solutionResourceKey = typeof task.with?.connectionResourceId === "string" ? task.with.connectionResourceId : "";
|
|
20739
|
-
return resource_override_resolver_1.ResourceOverrideResolver.getOverriddenValue(workflowConfig,
|
|
22660
|
+
return resource_override_resolver_1.ResourceOverrideResolver.getOverriddenValue(workflowConfig, logger2, bindingKey, "ConnectionId", originalConnectionId, solutionResourceKey);
|
|
20740
22661
|
}
|
|
20741
22662
|
static getBaseUrl(workflowConfig) {
|
|
20742
22663
|
if (workflowConfig.automationEdgeFqdn) {
|
|
@@ -20744,16 +22665,16 @@ var require_intsvc_task_handler_util = __commonJS((exports) => {
|
|
|
20744
22665
|
}
|
|
20745
22666
|
return workflowConfig.baseUrl;
|
|
20746
22667
|
}
|
|
20747
|
-
static extractDateFieldsFromConfig(configuration,
|
|
22668
|
+
static extractDateFieldsFromConfig(configuration, logger2) {
|
|
20748
22669
|
if (!configuration || typeof configuration !== "string") {
|
|
20749
|
-
|
|
22670
|
+
logger2.warn("Configuration is empty or invalid, no date fields to extract");
|
|
20750
22671
|
return [];
|
|
20751
22672
|
}
|
|
20752
22673
|
try {
|
|
20753
22674
|
const config = JSON.parse(configuration);
|
|
20754
22675
|
const inputFields = config?.fieldsContainer?.inputFields;
|
|
20755
22676
|
if (!Array.isArray(inputFields)) {
|
|
20756
|
-
|
|
22677
|
+
logger2.warn("No input fields found in configuration");
|
|
20757
22678
|
return [];
|
|
20758
22679
|
}
|
|
20759
22680
|
const dateFields = inputFields.filter((field) => {
|
|
@@ -20767,15 +22688,15 @@ var require_intsvc_task_handler_util = __commonJS((exports) => {
|
|
|
20767
22688
|
format: field.format
|
|
20768
22689
|
}));
|
|
20769
22690
|
if (dateFields.length > 0) {
|
|
20770
|
-
|
|
22691
|
+
logger2.debug(`Extracted ${dateFields.length} date field(s) from configuration: ${dateFields.map((f) => f.name).join(", ")}`);
|
|
20771
22692
|
}
|
|
20772
22693
|
return dateFields;
|
|
20773
22694
|
} catch (error) {
|
|
20774
|
-
|
|
22695
|
+
logger2.error(`Failed to parse configuration for date fields: ${error.message}`);
|
|
20775
22696
|
return [];
|
|
20776
22697
|
}
|
|
20777
22698
|
}
|
|
20778
|
-
static collectDateFieldOffsets(bodyParameters, queryParameters,
|
|
22699
|
+
static collectDateFieldOffsets(bodyParameters, queryParameters, logger2) {
|
|
20779
22700
|
const dateFieldOffsets = new Map;
|
|
20780
22701
|
const datePattern = /new\s+Date\s*\(/;
|
|
20781
22702
|
try {
|
|
@@ -20787,7 +22708,7 @@ var require_intsvc_task_handler_util = __commonJS((exports) => {
|
|
|
20787
22708
|
if (!datePattern.test(value)) {
|
|
20788
22709
|
continue;
|
|
20789
22710
|
}
|
|
20790
|
-
const offset = date_format_utils_1.DateFormatUtils.extractOffsetFromDateExpression(value,
|
|
22711
|
+
const offset = date_format_utils_1.DateFormatUtils.extractOffsetFromDateExpression(value, logger2);
|
|
20791
22712
|
const finalOffset = offset || constants_1.DEFAULT_TIMEZONE_OFFSET;
|
|
20792
22713
|
dateFieldOffsets.set(fieldName, finalOffset);
|
|
20793
22714
|
}
|
|
@@ -20800,22 +22721,22 @@ var require_intsvc_task_handler_util = __commonJS((exports) => {
|
|
|
20800
22721
|
if (!datePattern.test(value)) {
|
|
20801
22722
|
continue;
|
|
20802
22723
|
}
|
|
20803
|
-
const offset = date_format_utils_1.DateFormatUtils.extractOffsetFromDateExpression(value,
|
|
22724
|
+
const offset = date_format_utils_1.DateFormatUtils.extractOffsetFromDateExpression(value, logger2);
|
|
20804
22725
|
const finalOffset = offset || constants_1.DEFAULT_TIMEZONE_OFFSET;
|
|
20805
22726
|
dateFieldOffsets.set(fieldName, finalOffset);
|
|
20806
22727
|
}
|
|
20807
22728
|
}
|
|
20808
22729
|
return dateFieldOffsets;
|
|
20809
22730
|
} catch (error) {
|
|
20810
|
-
|
|
22731
|
+
logger2.error(`Failed to collect date field offsets: ${error.message}`);
|
|
20811
22732
|
return dateFieldOffsets;
|
|
20812
22733
|
}
|
|
20813
22734
|
}
|
|
20814
|
-
static formatDateFieldsInParameters(configuration, dateFieldOffsets, queryParameters, bodyParameters,
|
|
22735
|
+
static formatDateFieldsInParameters(configuration, dateFieldOffsets, queryParameters, bodyParameters, logger2) {
|
|
20815
22736
|
try {
|
|
20816
|
-
const dateFields = this.extractDateFieldsFromConfig(configuration,
|
|
22737
|
+
const dateFields = this.extractDateFieldsFromConfig(configuration, logger2);
|
|
20817
22738
|
if (dateFields.length === 0) {
|
|
20818
|
-
|
|
22739
|
+
logger2.warn("No date fields found in configuration, skipping date formatting");
|
|
20819
22740
|
return;
|
|
20820
22741
|
}
|
|
20821
22742
|
const configLookup = new Map;
|
|
@@ -20825,34 +22746,34 @@ var require_intsvc_task_handler_util = __commonJS((exports) => {
|
|
|
20825
22746
|
for (const [fieldName, offset] of dateFieldOffsets) {
|
|
20826
22747
|
const mask = configLookup.get(fieldName);
|
|
20827
22748
|
if (!mask) {
|
|
20828
|
-
|
|
22749
|
+
logger2.warn(`Field ${fieldName} not found in configuration, skipping`);
|
|
20829
22750
|
continue;
|
|
20830
22751
|
}
|
|
20831
22752
|
if (queryParameters && fieldName in queryParameters) {
|
|
20832
22753
|
const fieldValue = queryParameters[fieldName];
|
|
20833
22754
|
if (fieldValue && typeof fieldValue.toISOString === "function") {
|
|
20834
22755
|
const dateValue = fieldValue;
|
|
20835
|
-
const formattedValue = date_format_utils_1.DateFormatUtils.formatDate(dateValue.toISOString(), mask, offset,
|
|
22756
|
+
const formattedValue = date_format_utils_1.DateFormatUtils.formatDate(dateValue.toISOString(), mask, offset, logger2);
|
|
20836
22757
|
queryParameters[fieldName] = formattedValue;
|
|
20837
|
-
|
|
22758
|
+
logger2.info(`Formatted query param ${fieldName}: ${dateValue.toISOString()} → ${formattedValue} (offset: ${offset}, mask: ${mask})`);
|
|
20838
22759
|
} else {
|
|
20839
|
-
|
|
22760
|
+
logger2.warn(`Field ${fieldName} is not a Date object, skipping formatting. Value: ${fieldValue}`);
|
|
20840
22761
|
}
|
|
20841
22762
|
}
|
|
20842
22763
|
if (bodyParameters && fieldName in bodyParameters) {
|
|
20843
22764
|
const fieldValue = bodyParameters[fieldName];
|
|
20844
22765
|
if (fieldValue && typeof fieldValue.toISOString === "function") {
|
|
20845
22766
|
const dateValue = fieldValue;
|
|
20846
|
-
const formattedValue = date_format_utils_1.DateFormatUtils.formatDate(dateValue.toISOString(), mask, offset,
|
|
22767
|
+
const formattedValue = date_format_utils_1.DateFormatUtils.formatDate(dateValue.toISOString(), mask, offset, logger2);
|
|
20847
22768
|
bodyParameters[fieldName] = formattedValue;
|
|
20848
|
-
|
|
22769
|
+
logger2.info(`Formatted body param ${fieldName}: ${dateValue.toISOString()} → ${formattedValue} (offset: ${offset}, mask: ${mask})`);
|
|
20849
22770
|
} else {
|
|
20850
|
-
|
|
22771
|
+
logger2.warn(`Field ${fieldName} is not a Date object, skipping formatting. Value: ${fieldValue}`);
|
|
20851
22772
|
}
|
|
20852
22773
|
}
|
|
20853
22774
|
}
|
|
20854
22775
|
} catch (error) {
|
|
20855
|
-
|
|
22776
|
+
logger2.error(`Error during date formatting: ${error.message}. Skipping date formatting.`);
|
|
20856
22777
|
}
|
|
20857
22778
|
}
|
|
20858
22779
|
}
|
|
@@ -20875,8 +22796,8 @@ var require_intsvcs_event_task_handler = __commonJS((exports) => {
|
|
|
20875
22796
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
20876
22797
|
|
|
20877
22798
|
class IntSvcsEventTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
20878
|
-
constructor(taskHandlerArgs,
|
|
20879
|
-
super(taskHandlerArgs,
|
|
22799
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
22800
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
20880
22801
|
}
|
|
20881
22802
|
async internalHandleTask(taskName, task) {
|
|
20882
22803
|
let runtimeExpressionArgs = this.getRuntimeExpressionArgs();
|
|
@@ -21055,8 +22976,8 @@ var require_intsvcs_task_handler = __commonJS((exports) => {
|
|
|
21055
22976
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
21056
22977
|
|
|
21057
22978
|
class IntSvcsTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
21058
|
-
constructor(taskHandlerArgs,
|
|
21059
|
-
super(taskHandlerArgs,
|
|
22979
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
22980
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
21060
22981
|
}
|
|
21061
22982
|
async internalHandleTask(taskName, task) {
|
|
21062
22983
|
let runtimeExpressionArgs = this.getRuntimeExpressionArgs();
|
|
@@ -21249,8 +23170,8 @@ var require_raise_task_handler = __commonJS((exports) => {
|
|
|
21249
23170
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
21250
23171
|
|
|
21251
23172
|
class RaiseTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
21252
|
-
constructor(taskHandlerArgs,
|
|
21253
|
-
super(taskHandlerArgs,
|
|
23173
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
23174
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
21254
23175
|
}
|
|
21255
23176
|
async internalHandleTask(taskName, task) {
|
|
21256
23177
|
this.logger.debug(`Processing raise task for "${taskName}" with values:`, { error: task.raise?.error?.toString() });
|
|
@@ -21295,8 +23216,8 @@ var require_response_task_handler = __commonJS((exports) => {
|
|
|
21295
23216
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
21296
23217
|
|
|
21297
23218
|
class ResponseTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
21298
|
-
constructor(taskHandlerArgs,
|
|
21299
|
-
super(taskHandlerArgs,
|
|
23219
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
23220
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
21300
23221
|
}
|
|
21301
23222
|
async internalHandleTask(taskName, task) {
|
|
21302
23223
|
try {
|
|
@@ -21336,8 +23257,8 @@ var require_set_task_handler = __commonJS((exports) => {
|
|
|
21336
23257
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
21337
23258
|
|
|
21338
23259
|
class SetTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
21339
|
-
constructor(taskHandlerArgs,
|
|
21340
|
-
super(taskHandlerArgs,
|
|
23260
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
23261
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
21341
23262
|
}
|
|
21342
23263
|
async internalHandleTask(taskName, task) {
|
|
21343
23264
|
try {
|
|
@@ -21372,8 +23293,8 @@ var require_switch_task_handler = __commonJS((exports) => {
|
|
|
21372
23293
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
21373
23294
|
|
|
21374
23295
|
class SwitchTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
21375
|
-
constructor(taskHandlerArgs,
|
|
21376
|
-
super(taskHandlerArgs,
|
|
23296
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
23297
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
21377
23298
|
}
|
|
21378
23299
|
async internalHandleTask(taskName, task, input) {
|
|
21379
23300
|
try {
|
|
@@ -21387,8 +23308,8 @@ var require_switch_task_handler = __commonJS((exports) => {
|
|
|
21387
23308
|
const { caseName, caseTask } = getMatchedCaseTask(matchedCase, taskName);
|
|
21388
23309
|
if (!this.taskHandlerArgs.workflowResult || !this.taskHandlerArgs.allCurrentLevelTasks || !this.taskHandlerArgs.taskIndexRef) {
|
|
21389
23310
|
const missingContext = !this.taskHandlerArgs.workflowResult ? "workflowResult" : !this.taskHandlerArgs.allCurrentLevelTasks ? "allCurrentLevelTasks" : "taskIndexRef";
|
|
21390
|
-
const
|
|
21391
|
-
this.logger.error(
|
|
23311
|
+
const errorMessage2 = `Missing required switch task context: ${missingContext}`;
|
|
23312
|
+
this.logger.error(errorMessage2);
|
|
21392
23313
|
throw new utils_1.WorkflowErrorBuilder().setType(models_1.WorkflowErrorType.RUNTIME_ERROR).setStatus(models_1.WorkflowErrorStatus.INTERNAL_SERVER_ERROR).setTitle((0, localization_1.t)(localization_1.ErrorKeys.INTERNAL_ERROR)).build();
|
|
21393
23314
|
}
|
|
21394
23315
|
this.taskHandlerArgs.workflowResult.addToWorkflowExecutions(`Switch: ${task.name} > Case: ${caseName}`);
|
|
@@ -21422,7 +23343,7 @@ var require_switch_task_handler = __commonJS((exports) => {
|
|
|
21422
23343
|
}
|
|
21423
23344
|
}
|
|
21424
23345
|
exports.SwitchTaskHandler = SwitchTaskHandler;
|
|
21425
|
-
async function evaluateSwitchCondition(task, previousStepOutput,
|
|
23346
|
+
async function evaluateSwitchCondition(task, previousStepOutput, logger2, expressionHandler) {
|
|
21426
23347
|
if (!task.switch)
|
|
21427
23348
|
return;
|
|
21428
23349
|
const switchCases = task.switch;
|
|
@@ -21437,18 +23358,18 @@ var require_switch_task_handler = __commonJS((exports) => {
|
|
|
21437
23358
|
throw new Error((0, localization_1.t)(localization_1.ErrorKeys.MISSING_WHEN_CONDITION, { caseName }));
|
|
21438
23359
|
}
|
|
21439
23360
|
if (await expressionHandler.evaluateConditionExpression(caseDetails.when)) {
|
|
21440
|
-
|
|
23361
|
+
logger2.debug(`Switch case matched: '${caseName}' with expression: ${JSON.stringify(caseDetails.when)}`);
|
|
21441
23362
|
return switchCase;
|
|
21442
23363
|
}
|
|
21443
23364
|
if (previousStepOutput && previousStepOutput.content) {
|
|
21444
23365
|
const contentObject = previousStepOutput.content;
|
|
21445
23366
|
if (contentObject && await expressionHandler.evaluateConditionExpression(caseDetails.when)) {
|
|
21446
|
-
|
|
23367
|
+
logger2.debug(`Switch case matched in 'content': '${caseName}' with expression: ${JSON.stringify(caseDetails.when)}`);
|
|
21447
23368
|
return switchCase;
|
|
21448
23369
|
}
|
|
21449
23370
|
}
|
|
21450
23371
|
}
|
|
21451
|
-
|
|
23372
|
+
logger2.debug("No switch case matched, falling back to default case.");
|
|
21452
23373
|
return defaultCase;
|
|
21453
23374
|
}
|
|
21454
23375
|
function getMatchedCaseTask(matchedCase, stepName) {
|
|
@@ -21471,8 +23392,8 @@ var require_try_catch_task_handler = __commonJS((exports) => {
|
|
|
21471
23392
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
21472
23393
|
|
|
21473
23394
|
class TryCatchTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
21474
|
-
constructor(taskHandlerArgs,
|
|
21475
|
-
super(taskHandlerArgs,
|
|
23395
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
23396
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
21476
23397
|
}
|
|
21477
23398
|
async internalHandleTask(taskName, task, input) {
|
|
21478
23399
|
this.logger.info(`Executing Try: ${taskName}`);
|
|
@@ -21526,9 +23447,9 @@ var require_unified_http_task_handler = __commonJS((exports) => {
|
|
|
21526
23447
|
var intsvcs_task_handler_1 = require_intsvcs_task_handler();
|
|
21527
23448
|
|
|
21528
23449
|
class UnifiedHttpTaskHandler {
|
|
21529
|
-
constructor(taskHandlerArgs,
|
|
23450
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
21530
23451
|
this.taskHandlerArgs = taskHandlerArgs;
|
|
21531
|
-
this.logger =
|
|
23452
|
+
this.logger = logger2;
|
|
21532
23453
|
this.expressionHandler = expressionHandler;
|
|
21533
23454
|
}
|
|
21534
23455
|
async handleTask(taskName, task, runtimeExpressionArgs) {
|
|
@@ -21594,8 +23515,8 @@ var require_wait_task_handler = __commonJS((exports) => {
|
|
|
21594
23515
|
var abstract_task_handler_1 = require_abstract_task_handler();
|
|
21595
23516
|
|
|
21596
23517
|
class WaitTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
21597
|
-
constructor(taskHandlerArgs,
|
|
21598
|
-
super(taskHandlerArgs,
|
|
23518
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
23519
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
21599
23520
|
}
|
|
21600
23521
|
async internalHandleTask(taskName, task, _input) {
|
|
21601
23522
|
try {
|
|
@@ -21648,8 +23569,8 @@ var require_while_task_handler = __commonJS((exports) => {
|
|
|
21648
23569
|
var MAX_ITERATIONS = 1e4;
|
|
21649
23570
|
|
|
21650
23571
|
class WhileTaskHandler extends abstract_task_handler_1.AbstractTaskHandler {
|
|
21651
|
-
constructor(taskHandlerArgs,
|
|
21652
|
-
super(taskHandlerArgs,
|
|
23572
|
+
constructor(taskHandlerArgs, logger2, expressionHandler) {
|
|
23573
|
+
super(taskHandlerArgs, logger2, expressionHandler);
|
|
21653
23574
|
}
|
|
21654
23575
|
async internalHandleTask(taskName, task, previousStepOutput) {
|
|
21655
23576
|
this.logger.info(`Executing WhileTask: ${taskName}`);
|
|
@@ -21743,8 +23664,8 @@ var require_task_invoker = __commonJS((exports) => {
|
|
|
21743
23664
|
}
|
|
21744
23665
|
return taskResult;
|
|
21745
23666
|
}
|
|
21746
|
-
var invokeTask = async (task, taskName, taskHandlerArgs, runtimeExpressionArgs, stepInput,
|
|
21747
|
-
const handler = getTaskHandler(task, taskHandlerArgs,
|
|
23667
|
+
var invokeTask = async (task, taskName, taskHandlerArgs, runtimeExpressionArgs, stepInput, logger2, expressionHandler, customHandlers) => {
|
|
23668
|
+
const handler = getTaskHandler(task, taskHandlerArgs, logger2, expressionHandler, customHandlers);
|
|
21748
23669
|
const taskDescriptor = {
|
|
21749
23670
|
name: taskName,
|
|
21750
23671
|
input: stepInput,
|
|
@@ -21753,66 +23674,66 @@ var require_task_invoker = __commonJS((exports) => {
|
|
|
21753
23674
|
await expressionHandler.setVariables({ $task: taskDescriptor });
|
|
21754
23675
|
return await handler.handleTask(taskName, task, runtimeExpressionArgs);
|
|
21755
23676
|
};
|
|
21756
|
-
var getTaskHandler = (task, taskHandlerArgs,
|
|
23677
|
+
var getTaskHandler = (task, taskHandlerArgs, logger2, expressionHandler, customHandlers) => {
|
|
21757
23678
|
const taskWithBreak = task;
|
|
21758
23679
|
if (taskWithBreak.break && taskWithBreak.then === constants_1.EXIT) {
|
|
21759
|
-
return new break_task_handler_1.BreakTaskHandler(taskHandlerArgs,
|
|
23680
|
+
return new break_task_handler_1.BreakTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21760
23681
|
}
|
|
21761
23682
|
if (task.call) {
|
|
21762
23683
|
if ((0, task_utils_1.isUnifiedHttpTask)(task)) {
|
|
21763
|
-
return new unified_http_task_handler_1.UnifiedHttpTaskHandler(taskHandlerArgs,
|
|
23684
|
+
return new unified_http_task_handler_1.UnifiedHttpTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21764
23685
|
} else if ((0, task_utils_1.isIntSvcTask)(task)) {
|
|
21765
|
-
return new intsvcs_task_handler_1.IntSvcsTaskHandler(taskHandlerArgs,
|
|
23686
|
+
return new intsvcs_task_handler_1.IntSvcsTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21766
23687
|
} else if ((0, task_utils_1.isIntSvcEventTask)(task)) {
|
|
21767
|
-
return new intsvcs_event_task_handler_1.IntSvcsEventTaskHandler(taskHandlerArgs,
|
|
23688
|
+
return new intsvcs_event_task_handler_1.IntSvcsEventTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21768
23689
|
} else {
|
|
21769
|
-
return new http_task_handler_1.HttpTaskHandler(taskHandlerArgs,
|
|
23690
|
+
return new http_task_handler_1.HttpTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21770
23691
|
}
|
|
21771
23692
|
}
|
|
21772
23693
|
if (task.run) {
|
|
21773
23694
|
const customScriptHandler = customHandlers?.[models_1.TaskType.SCRIPT];
|
|
21774
23695
|
if (customScriptHandler) {
|
|
21775
|
-
return customScriptHandler(taskHandlerArgs,
|
|
23696
|
+
return customScriptHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21776
23697
|
}
|
|
21777
|
-
return script_task_handler_1.DefaultScriptTaskHandler.create(taskHandlerArgs,
|
|
23698
|
+
return script_task_handler_1.DefaultScriptTaskHandler.create(taskHandlerArgs, logger2, expressionHandler);
|
|
21778
23699
|
}
|
|
21779
23700
|
if (task.set !== undefined && !(0, task_utils_1.isResponseTask)(task)) {
|
|
21780
|
-
return new set_task_handler_1.SetTaskHandler(taskHandlerArgs,
|
|
23701
|
+
return new set_task_handler_1.SetTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21781
23702
|
}
|
|
21782
23703
|
if (task.try) {
|
|
21783
|
-
return new try_catch_task_handler_1.TryCatchTaskHandler(taskHandlerArgs,
|
|
23704
|
+
return new try_catch_task_handler_1.TryCatchTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21784
23705
|
}
|
|
21785
23706
|
if (task.for && task.do) {
|
|
21786
23707
|
if (task.while) {
|
|
21787
23708
|
const forLoop = task.for;
|
|
21788
23709
|
if (forLoop.each) {
|
|
21789
|
-
return new for_task_handler_1.ForTaskHandler(taskHandlerArgs,
|
|
23710
|
+
return new for_task_handler_1.ForTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21790
23711
|
} else {
|
|
21791
|
-
return new while_task_handler_1.WhileTaskHandler(taskHandlerArgs,
|
|
23712
|
+
return new while_task_handler_1.WhileTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21792
23713
|
}
|
|
21793
23714
|
} else if (task.doWhile) {
|
|
21794
|
-
return new do_while_task_handler_1.DoWhileTaskHandler(taskHandlerArgs,
|
|
23715
|
+
return new do_while_task_handler_1.DoWhileTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21795
23716
|
} else {
|
|
21796
|
-
return new for_task_handler_1.ForTaskHandler(taskHandlerArgs,
|
|
23717
|
+
return new for_task_handler_1.ForTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21797
23718
|
}
|
|
21798
23719
|
}
|
|
21799
23720
|
if (task.do) {
|
|
21800
|
-
return new do_task_handler_1.DoTaskHandler(taskHandlerArgs,
|
|
23721
|
+
return new do_task_handler_1.DoTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21801
23722
|
}
|
|
21802
23723
|
if (task.raise) {
|
|
21803
|
-
return new raise_task_handler_1.RaiseTaskHandler(taskHandlerArgs,
|
|
23724
|
+
return new raise_task_handler_1.RaiseTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21804
23725
|
}
|
|
21805
23726
|
if (task.switch) {
|
|
21806
23727
|
if (!taskHandlerArgs.allCurrentLevelTasks || !taskHandlerArgs.taskIndexRef || !taskHandlerArgs.workflowResult) {
|
|
21807
|
-
|
|
23728
|
+
logger2.error("Switch task handler missing required context: allCurrentLevelTasks, taskIndexRef, or workflowResult");
|
|
21808
23729
|
throw new utils_1.WorkflowErrorBuilder().setType(models_1.WorkflowErrorType.RUNTIME_ERROR).setStatus(models_1.WorkflowErrorStatus.INTERNAL_SERVER_ERROR).setTitle((0, localization_1.t)(localization_1.ErrorKeys.FAILED_SWITCH_TASK, { taskName: "switch" })).build();
|
|
21809
23730
|
}
|
|
21810
|
-
return new switch_task_handler_1.SwitchTaskHandler(taskHandlerArgs,
|
|
23731
|
+
return new switch_task_handler_1.SwitchTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21811
23732
|
}
|
|
21812
23733
|
if (task.wait) {
|
|
21813
|
-
return new wait_task_handler_1.WaitTaskHandler(taskHandlerArgs,
|
|
23734
|
+
return new wait_task_handler_1.WaitTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21814
23735
|
} else if ((0, task_utils_1.isResponseTask)(task)) {
|
|
21815
|
-
return new response_task_handler_1.ResponseTaskHandler(taskHandlerArgs,
|
|
23736
|
+
return new response_task_handler_1.ResponseTaskHandler(taskHandlerArgs, logger2, expressionHandler);
|
|
21816
23737
|
}
|
|
21817
23738
|
throw new utils_1.WorkflowErrorBuilder().setType(models_1.WorkflowErrorType.VALIDATION_ERROR).setStatus(models_1.WorkflowErrorStatus.BAD_REQUEST).setTitle((0, localization_1.t)(localization_1.ErrorKeys.UNSUPPORTED_TASK_TYPE)).setDetail((0, localization_1.t)(localization_1.ErrorKeys.UNSUPPORTED_TASK_TYPE_DETAIL, { taskType: String(task.type || "unknown") })).build();
|
|
21818
23739
|
};
|
|
@@ -21836,7 +23757,7 @@ var require_task_executor_helper = __commonJS((exports) => {
|
|
|
21836
23757
|
var utils_2 = require_utils3();
|
|
21837
23758
|
|
|
21838
23759
|
class TaskExecutorHelper {
|
|
21839
|
-
static async executeTaskList(taskList, previousStepOutput, workflowConfig, runtimeExpressionArgs,
|
|
23760
|
+
static async executeTaskList(taskList, previousStepOutput, workflowConfig, runtimeExpressionArgs, logger2, expressionHandler, workFlowTaskVariables) {
|
|
21840
23761
|
let result = { success: true, data: {} };
|
|
21841
23762
|
if (!taskList || taskList.length === 0) {
|
|
21842
23763
|
return result;
|
|
@@ -21851,7 +23772,7 @@ var require_task_executor_helper = __commonJS((exports) => {
|
|
|
21851
23772
|
continue;
|
|
21852
23773
|
}
|
|
21853
23774
|
const workflowExecutionResults = serverless_workflow_executor_1.ServerlessWorkflowExecutor.getExecutor(runtimeExpressionArgs.$runtime.metadata.workflowRunId).workflowExecutionResults;
|
|
21854
|
-
result = await this.executeFlowTask(taskToRun, taskList, previousStepOutput, taskIndexRef, workflowConfig, runtimeExpressionArgs, workflowExecutionResults,
|
|
23775
|
+
result = await this.executeFlowTask(taskToRun, taskList, previousStepOutput, taskIndexRef, workflowConfig, runtimeExpressionArgs, workflowExecutionResults, logger2, expressionHandler, workFlowTaskVariables);
|
|
21855
23776
|
const lastExecutedStep = TaskExecutorHelper.readAsExtendedTask(taskList[taskIndexRef.value]);
|
|
21856
23777
|
if (!result.success) {
|
|
21857
23778
|
if ((0, utils_1.isWorkflowError)(result.error)) {
|
|
@@ -21860,11 +23781,11 @@ var require_task_executor_helper = __commonJS((exports) => {
|
|
|
21860
23781
|
throw new utils_1.WorkflowErrorBuilder().fromError(result.error).setTitle((0, localization_1.t)(localization_1.ErrorKeys.UNKNOWN_TASK_ERROR, { taskName: lastExecutedStep.name })).setData({ taskName: lastExecutedStep.name, result }).build();
|
|
21861
23782
|
}
|
|
21862
23783
|
if (runtimeExpressionArgs.$runtime.control?.signalWorkflowEnd) {
|
|
21863
|
-
|
|
23784
|
+
logger2.debug(`TaskExecutorHelper.executeTaskList: signalWorkflowEnd detected after processing task '${lastExecutedStep.name}'. Halting current task list.`);
|
|
21864
23785
|
return result;
|
|
21865
23786
|
}
|
|
21866
23787
|
if (runtimeExpressionArgs.$runtime.control?.signalLoopExit === true) {
|
|
21867
|
-
|
|
23788
|
+
logger2.debug(`TaskExecutorHelper.executeTaskList: signalLoopExit detected after processing task '${lastExecutedStep.name}'. Halting current task list execution.`);
|
|
21868
23789
|
return result;
|
|
21869
23790
|
}
|
|
21870
23791
|
if (result.success && result.data) {
|
|
@@ -21880,10 +23801,10 @@ var require_task_executor_helper = __commonJS((exports) => {
|
|
|
21880
23801
|
return result;
|
|
21881
23802
|
}
|
|
21882
23803
|
} else {
|
|
21883
|
-
const nextTaskIndex = taskList.findIndex((
|
|
23804
|
+
const nextTaskIndex = taskList.findIndex((t2) => TaskExecutorHelper.readAsExtendedTask(t2).name === lastExecutedStep.then);
|
|
21884
23805
|
if (nextTaskIndex === -1) {
|
|
21885
|
-
const
|
|
21886
|
-
|
|
23806
|
+
const errorMessage2 = `Invalid transition from task '${lastExecutedStep.name}': Next task '${lastExecutedStep.then}' not found`;
|
|
23807
|
+
logger2.error(errorMessage2);
|
|
21887
23808
|
throw new utils_1.WorkflowErrorBuilder().setType(models_1.WorkflowErrorType.RUNTIME_ERROR).setStatus(models_1.WorkflowErrorStatus.INTERNAL_SERVER_ERROR).setTitle((0, localization_1.t)(localization_1.ErrorKeys.INTERNAL_ERROR)).setData({
|
|
21888
23809
|
taskName: lastExecutedStep.name,
|
|
21889
23810
|
nextTask: lastExecutedStep.then,
|
|
@@ -21924,7 +23845,7 @@ var require_task_executor_helper = __commonJS((exports) => {
|
|
|
21924
23845
|
}
|
|
21925
23846
|
return;
|
|
21926
23847
|
}
|
|
21927
|
-
static async executeFlowTask(currentTask, allCurrentLevelTasks, previousStepOutput, taskIndexRef, workflowConfig, runtimeExpressionArgs, workflowResult,
|
|
23848
|
+
static async executeFlowTask(currentTask, allCurrentLevelTasks, previousStepOutput, taskIndexRef, workflowConfig, runtimeExpressionArgs, workflowResult, logger2, expressionHandler, workFlowTaskVariables) {
|
|
21928
23849
|
const task = TaskExecutorHelper.readAsExtendedTask(currentTask, workFlowTaskVariables);
|
|
21929
23850
|
let result = { success: true, data: {} };
|
|
21930
23851
|
try {
|
|
@@ -21947,14 +23868,14 @@ var require_task_executor_helper = __commonJS((exports) => {
|
|
|
21947
23868
|
const resumeCommand$ = executor2?.commandStream$?.pipe((0, rxjs_1.filter)((command) => command.command === models_1.WorkflowCommandEvent.Resume));
|
|
21948
23869
|
const resumeCommandPromise = (0, rxjs_1.firstValueFrom)(resumeCommand$ ?? rxjs_1.EMPTY);
|
|
21949
23870
|
console.debug(`Paused on: ${task.name} [breakpoint: ${breakpointId}], waiting for command to continue...`);
|
|
21950
|
-
await logging_helper_1.LoggingHelper.logTaskData(
|
|
23871
|
+
await logging_helper_1.LoggingHelper.logTaskData(logger2, taskLogParams, expressionHandler);
|
|
21951
23872
|
await resumeCommandPromise;
|
|
21952
23873
|
console.debug(`Resume command received on: ${task.name} [breakpoint:${breakpointId}], continuing...`);
|
|
21953
23874
|
} else {
|
|
21954
|
-
await logging_helper_1.LoggingHelper.logTaskData(
|
|
23875
|
+
await logging_helper_1.LoggingHelper.logTaskData(logger2, taskLogParams, expressionHandler);
|
|
21955
23876
|
}
|
|
21956
23877
|
} else {
|
|
21957
|
-
await logging_helper_1.LoggingHelper.logTaskData(
|
|
23878
|
+
await logging_helper_1.LoggingHelper.logTaskData(logger2, taskLogParams, expressionHandler);
|
|
21958
23879
|
}
|
|
21959
23880
|
workflowResult.addToWorkflowExecutions(task.name);
|
|
21960
23881
|
const taskHandlerArgs = this.setupTaskHandlerArgs(workflowConfig, allCurrentLevelTasks, taskIndexRef, workflowResult);
|
|
@@ -21965,7 +23886,7 @@ var require_task_executor_helper = __commonJS((exports) => {
|
|
|
21965
23886
|
taskHandlerArgs,
|
|
21966
23887
|
runtimeExpressionArgs,
|
|
21967
23888
|
taskInput: previousStepOutput,
|
|
21968
|
-
logger,
|
|
23889
|
+
logger: logger2,
|
|
21969
23890
|
expressionHandler,
|
|
21970
23891
|
customTaskHandlerFactories: executor?.customTaskHandlerFactories
|
|
21971
23892
|
});
|
|
@@ -21975,7 +23896,7 @@ var require_task_executor_helper = __commonJS((exports) => {
|
|
|
21975
23896
|
}
|
|
21976
23897
|
const taskData = task.raise ? result.error.toObject() : result.data;
|
|
21977
23898
|
const isUiPathInternalServiceCall = this.detectUiPathInternalServiceCall(task, result.resolvedProperties);
|
|
21978
|
-
await logging_helper_1.LoggingHelper.logTaskData(
|
|
23899
|
+
await logging_helper_1.LoggingHelper.logTaskData(logger2, {
|
|
21979
23900
|
taskId: task.name,
|
|
21980
23901
|
taskType: (0, task_utils_1.getTaskType)(task),
|
|
21981
23902
|
displayName: task.metadata?.displayName,
|
|
@@ -22003,7 +23924,7 @@ var require_task_executor_helper = __commonJS((exports) => {
|
|
|
22003
23924
|
const workflowError = builder.build();
|
|
22004
23925
|
const eventToLog = isErrorOriginatingTask ? models_1.TaskEvent.TASK_FAILED : models_1.TaskEvent.TASK_STOPPED;
|
|
22005
23926
|
const isUiPathInternalServiceCall = this.detectUiPathInternalServiceCall(task, result.resolvedProperties);
|
|
22006
|
-
await logging_helper_1.LoggingHelper.logTaskData(
|
|
23927
|
+
await logging_helper_1.LoggingHelper.logTaskData(logger2, {
|
|
22007
23928
|
taskId: task.name,
|
|
22008
23929
|
taskType: (0, task_utils_1.getTaskType)(task),
|
|
22009
23930
|
displayName: task.metadata?.displayName,
|
|
@@ -22045,13 +23966,13 @@ var require_serverless_workflow_executor = __commonJS((exports) => {
|
|
|
22045
23966
|
var task_executor_helper_1 = require_task_executor_helper();
|
|
22046
23967
|
|
|
22047
23968
|
class ServerlessWorkflowExecutor {
|
|
22048
|
-
constructor(workflow, workflowConfig,
|
|
23969
|
+
constructor(workflow, workflowConfig, logger2, options, workflowRunId, input) {
|
|
22049
23970
|
this.workflowStartedAt = undefined;
|
|
22050
23971
|
this.customTaskHandlerFactories = {};
|
|
22051
23972
|
this.commandStream$ = undefined;
|
|
22052
23973
|
this.workflowStartedAt = new Date;
|
|
22053
23974
|
this.workflow = workflow;
|
|
22054
|
-
this.logger =
|
|
23975
|
+
this.logger = logger2;
|
|
22055
23976
|
this.workflowConfig = workflowConfig;
|
|
22056
23977
|
this.workflowRunId = workflowRunId || (0, api_workflow_commons_1.getNewGuid)();
|
|
22057
23978
|
this.workflowExecutionResults = new models_1.WorkflowExecutionResults(this.workflowRunId, workflowConfig.debugConfig?.enableTaskTracking === true);
|
|
@@ -22063,17 +23984,17 @@ var require_serverless_workflow_executor = __commonJS((exports) => {
|
|
|
22063
23984
|
return ServerlessWorkflowExecutor.workflowExecutorMap.get(workflowRunId);
|
|
22064
23985
|
}
|
|
22065
23986
|
static async execute(workflow, workflowConfig, input, options, workflowRunId) {
|
|
22066
|
-
const
|
|
23987
|
+
const logger2 = options?.logger ?? default_logger_1.defaultLogger;
|
|
22067
23988
|
await (0, localization_1.initLocalization)(workflowConfig.languageCode);
|
|
22068
23989
|
let executor = null;
|
|
22069
23990
|
let commandSubscription = null;
|
|
22070
23991
|
try {
|
|
22071
|
-
executor = new ServerlessWorkflowExecutor(workflow, workflowConfig,
|
|
23992
|
+
executor = new ServerlessWorkflowExecutor(workflow, workflowConfig, logger2, options, workflowRunId, input);
|
|
22072
23993
|
ServerlessWorkflowExecutor.workflowExecutorMap.set(executor.workflowRunId, executor);
|
|
22073
23994
|
if (workflowConfig.debugConfig?.runInDebugMode) {
|
|
22074
23995
|
if (!options?.commandStream$) {
|
|
22075
|
-
const
|
|
22076
|
-
|
|
23996
|
+
const errorMessage2 = "$commandStream is required in WorkflowExecutorOptions when debug mode is enabled";
|
|
23997
|
+
logger2.error(errorMessage2);
|
|
22077
23998
|
throw new Error((0, localization_1.t)(localization_1.ErrorKeys.INTERNAL_ERROR));
|
|
22078
23999
|
}
|
|
22079
24000
|
executor.commandStream$ = options.commandStream$;
|
|
@@ -22091,11 +24012,11 @@ var require_serverless_workflow_executor = __commonJS((exports) => {
|
|
|
22091
24012
|
const signalJobFailure = workflowResult.success === false || responseTaskSignal?.signalJobFailure === true;
|
|
22092
24013
|
const response = workflowResult.success === false ? workflowResult.error : isResponseStepExecuted ? workflowResult.data : undefined;
|
|
22093
24014
|
const workflowResponse = new models_1.WorkflowResponse(signalJobFailure, response);
|
|
22094
|
-
await
|
|
24015
|
+
await logger2.shutdown();
|
|
22095
24016
|
return workflowResponse;
|
|
22096
24017
|
} catch (error) {
|
|
22097
|
-
|
|
22098
|
-
await
|
|
24018
|
+
logger2?.error("Workflow execution failed", undefined, error instanceof Error ? error : new Error((0, api_workflow_commons_1.getErrorMessage)(error)));
|
|
24019
|
+
await logger2.shutdown();
|
|
22099
24020
|
const workflowError = (0, utils_1.isWorkflowError)(error) ? error : new utils_1.WorkflowErrorBuilder().fromError(error).setTitle((0, localization_1.t)(localization_1.ErrorKeys.WORKFLOW_EXECUTION_FAILED)).build();
|
|
22100
24021
|
throw workflowError;
|
|
22101
24022
|
} finally {
|
|
@@ -22209,227 +24130,12 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
22209
24130
|
} });
|
|
22210
24131
|
});
|
|
22211
24132
|
|
|
22212
|
-
//
|
|
22213
|
-
import
|
|
22214
|
-
var de_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22215
|
-
var en = {
|
|
22216
|
-
toolApiworkflow: {
|
|
22217
|
-
info: {
|
|
22218
|
-
restoreNotRequired: "Restore operation is not required for API projects",
|
|
22219
|
-
validateNotRequired: "Validate operation is not required for API projects",
|
|
22220
|
-
disposing: "Disposing API Workflows Tool"
|
|
22221
|
-
},
|
|
22222
|
-
progress: {
|
|
22223
|
-
copyingFiles: "Copying files...",
|
|
22224
|
-
creatingOperateFile: "Creating operate.json file...",
|
|
22225
|
-
creatingPackageDescriptor: "Creating package-descriptor.json file...",
|
|
22226
|
-
creatingNugetPackage: "Creating NuGet package...",
|
|
22227
|
-
packageCreatedSuccessfully: "Package created successfully"
|
|
22228
|
-
},
|
|
22229
|
-
success: {
|
|
22230
|
-
done: "done"
|
|
22231
|
-
},
|
|
22232
|
-
errors: {
|
|
22233
|
-
buildFailed: "An error occurred while building API project files",
|
|
22234
|
-
packFailed: "An error occurred while packing API project"
|
|
22235
|
-
}
|
|
22236
|
-
}
|
|
22237
|
-
};
|
|
22238
|
-
var es_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22239
|
-
var es_MX_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22240
|
-
var fr_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22241
|
-
var ja_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22242
|
-
var ko_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22243
|
-
var pt_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22244
|
-
var pt_BR_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22245
|
-
var ro_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22246
|
-
var ru_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22247
|
-
var tr_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22248
|
-
var zh_CN_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22249
|
-
var zh_TW_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22250
|
-
var zu_namespaceObject = JSON.parse('{"toolApiworkflow":{"info":{"restoreNotRequired":"Restore operation is not required for API projects","validateNotRequired":"Validate operation is not required for API projects","disposing":"Disposing API Workflows Tool"},"progress":{"copyingFiles":"Copying files...","creatingOperateFile":"Creating operate.json file...","creatingPackageDescriptor":"Creating package-descriptor.json file...","creatingNugetPackage":"Creating NuGet package...","packageCreatedSuccessfully":"Package created successfully"},"success":{"done":"done"},"errors":{"buildFailed":"An error occurred while building API project files","packFailed":"An error occurred while packing API project"}}}');
|
|
22251
|
-
I18nManager.registerTranslations("en", en);
|
|
22252
|
-
I18nManager.registerTranslations("de", de_namespaceObject);
|
|
22253
|
-
I18nManager.registerTranslations("es", es_namespaceObject);
|
|
22254
|
-
I18nManager.registerTranslations("es-MX", es_MX_namespaceObject);
|
|
22255
|
-
I18nManager.registerTranslations("fr", fr_namespaceObject);
|
|
22256
|
-
I18nManager.registerTranslations("ja", ja_namespaceObject);
|
|
22257
|
-
I18nManager.registerTranslations("ko", ko_namespaceObject);
|
|
22258
|
-
I18nManager.registerTranslations("pt", pt_namespaceObject);
|
|
22259
|
-
I18nManager.registerTranslations("pt-BR", pt_BR_namespaceObject);
|
|
22260
|
-
I18nManager.registerTranslations("ro", ro_namespaceObject);
|
|
22261
|
-
I18nManager.registerTranslations("ru", ru_namespaceObject);
|
|
22262
|
-
I18nManager.registerTranslations("tr", tr_namespaceObject);
|
|
22263
|
-
I18nManager.registerTranslations("zh-CN", zh_CN_namespaceObject);
|
|
22264
|
-
I18nManager.registerTranslations("zh-TW", zh_TW_namespaceObject);
|
|
22265
|
-
I18nManager.registerTranslations("zu", zu_namespaceObject);
|
|
22266
|
-
function _define_property(obj, key, value) {
|
|
22267
|
-
if (key in obj)
|
|
22268
|
-
Object.defineProperty(obj, key, {
|
|
22269
|
-
value,
|
|
22270
|
-
enumerable: true,
|
|
22271
|
-
configurable: true,
|
|
22272
|
-
writable: true
|
|
22273
|
-
});
|
|
22274
|
-
else
|
|
22275
|
-
obj[key] = value;
|
|
22276
|
-
return obj;
|
|
22277
|
-
}
|
|
22278
|
-
|
|
22279
|
-
class ApiWorkflowsTool extends ProjectTool {
|
|
22280
|
-
async restoreAsync(_options, _cancellationToken) {
|
|
22281
|
-
this.logger.info(translate.t("toolApiworkflow.info.restoreNotRequired"));
|
|
22282
|
-
return ToolResult.success();
|
|
22283
|
-
}
|
|
22284
|
-
async validateAsync(_options, _cancellationToken) {
|
|
22285
|
-
this.logger.info(translate.t("toolApiworkflow.info.validateNotRequired"));
|
|
22286
|
-
return ToolResult.success();
|
|
22287
|
-
}
|
|
22288
|
-
async buildAsync(options, _cancellationToken) {
|
|
22289
|
-
const tempFolder = await this._temporaryStorage.getTempFolderPath();
|
|
22290
|
-
const localBuildFolder = Path.join(tempFolder, NugetConstants.OutputFolderName);
|
|
22291
|
-
const contentFolder = Path.join(localBuildFolder, NugetConstants.ContentFolderName);
|
|
22292
|
-
try {
|
|
22293
|
-
this.logger.progress(translate.t("toolApiworkflow.progress.copyingFiles"));
|
|
22294
|
-
await this.copyFiles(options.projectPath, contentFolder);
|
|
22295
|
-
this.logger.progress(translate.t("toolApiworkflow.progress.creatingOperateFile"));
|
|
22296
|
-
await this.createOperateFile(options, contentFolder);
|
|
22297
|
-
this.logger.progress(translate.t("toolApiworkflow.progress.creatingPackageDescriptor"));
|
|
22298
|
-
await this.createPackageDescriptor(localBuildFolder);
|
|
22299
|
-
return new ToolResult(ToolErrorCodes.Success, translate.t("toolApiworkflow.success.done"), [
|
|
22300
|
-
localBuildFolder
|
|
22301
|
-
]);
|
|
22302
|
-
} catch (error) {
|
|
22303
|
-
const errorMessage = error instanceof Error ? error.toString() : String(error);
|
|
22304
|
-
this.logger.error(errorMessage);
|
|
22305
|
-
return ToolResult.error(ToolErrorCodes.InternalError, translate.t("toolApiworkflow.errors.buildFailed"));
|
|
22306
|
-
}
|
|
22307
|
-
}
|
|
22308
|
-
async packAsync(options, cancellationToken) {
|
|
22309
|
-
const buildResult = await this.buildAsync(options, cancellationToken);
|
|
22310
|
-
if (!buildResult.isSuccess)
|
|
22311
|
-
return buildResult;
|
|
22312
|
-
const localBuildFolder = buildResult.packages[0];
|
|
22313
|
-
try {
|
|
22314
|
-
this.logger.progress(translate.t("toolApiworkflow.progress.creatingNugetPackage"));
|
|
22315
|
-
const nupkgFileName = `${options.package.id}.${options.package.version}.nupkg`;
|
|
22316
|
-
const nupkgPath = Path.join(options.outputPath, nupkgFileName);
|
|
22317
|
-
const packager = new NugetPackager(this.fileSystem);
|
|
22318
|
-
const result = await packager.packAsync(localBuildFolder, options.package, nupkgPath);
|
|
22319
|
-
this.logger.progress(translate.t("toolApiworkflow.progress.packageCreatedSuccessfully"));
|
|
22320
|
-
return new ToolResult(ToolErrorCodes.Success, translate.t("toolApiworkflow.success.done"), [
|
|
22321
|
-
result.outputPath
|
|
22322
|
-
]);
|
|
22323
|
-
} catch (error) {
|
|
22324
|
-
const errorMessage = error instanceof Error ? error.toString() : String(error);
|
|
22325
|
-
this.logger.error(errorMessage);
|
|
22326
|
-
return ToolResult.error(ToolErrorCodes.InternalError, translate.t("toolApiworkflow.errors.packFailed"));
|
|
22327
|
-
}
|
|
22328
|
-
}
|
|
22329
|
-
async dispose() {
|
|
22330
|
-
this.logger.info(translate.t("toolApiworkflow.info.disposing"));
|
|
22331
|
-
try {
|
|
22332
|
-
await this._temporaryStorage.cleanup();
|
|
22333
|
-
} catch {}
|
|
22334
|
-
}
|
|
22335
|
-
async copyFiles(sourcePath, destinationPath) {
|
|
22336
|
-
await this.fileSystem.mkdir(destinationPath);
|
|
22337
|
-
const files = await this.fileSystem.readdir(sourcePath);
|
|
22338
|
-
for (const file of files) {
|
|
22339
|
-
const sourceFile = Path.join(sourcePath, file);
|
|
22340
|
-
const destinationFile = Path.join(destinationPath, file);
|
|
22341
|
-
const stat = await this.fileSystem.stat(sourceFile);
|
|
22342
|
-
if (stat?.isFile()) {
|
|
22343
|
-
const content = await this.fileSystem.readFile(sourceFile);
|
|
22344
|
-
if (content)
|
|
22345
|
-
await this.fileSystem.writeFile(destinationFile, content);
|
|
22346
|
-
}
|
|
22347
|
-
}
|
|
22348
|
-
}
|
|
22349
|
-
async createOperateFile(options, contentFolder) {
|
|
22350
|
-
const operateJsonFilePath = Path.join(contentFolder, NugetConstants.OperateFileName);
|
|
22351
|
-
const exists = await this.fileSystem.exists(operateJsonFilePath);
|
|
22352
|
-
if (!exists)
|
|
22353
|
-
await this.createOperateJsonFile(contentFolder, options.projectStorageId ?? "", operateJsonFilePath);
|
|
22354
|
-
}
|
|
22355
|
-
async createOperateJsonFile(projectPath, projectId, filePath) {
|
|
22356
|
-
const entryPointsFilePath = Path.join(projectPath, NugetConstants.EntryPointsFileName);
|
|
22357
|
-
let mainPath = "";
|
|
22358
|
-
const entryPointsExists = await this.fileSystem.exists(entryPointsFilePath);
|
|
22359
|
-
if (entryPointsExists) {
|
|
22360
|
-
const entryPointsContent = await this.fileSystem.readFile(entryPointsFilePath);
|
|
22361
|
-
if (entryPointsContent)
|
|
22362
|
-
try {
|
|
22363
|
-
const entryPointsText = new TextDecoder().decode(entryPointsContent);
|
|
22364
|
-
const entryPoints = JSON.parse(entryPointsText);
|
|
22365
|
-
mainPath = entryPoints.entryPoints?.[0]?.filePath ?? "";
|
|
22366
|
-
} catch {}
|
|
22367
|
-
}
|
|
22368
|
-
const operateFileModel = {
|
|
22369
|
-
$schema: "https://cloud.uipath.com/draft/2024-12/operate",
|
|
22370
|
-
contentType: ProjectTypes.Api,
|
|
22371
|
-
projectId,
|
|
22372
|
-
main: mainPath,
|
|
22373
|
-
targetFramework: "Portable",
|
|
22374
|
-
runtimeOptions: {
|
|
22375
|
-
isAttended: false,
|
|
22376
|
-
requiresUserInteraction: false
|
|
22377
|
-
}
|
|
22378
|
-
};
|
|
22379
|
-
const operateJsonString = JSON.stringify(operateFileModel, null, 2);
|
|
22380
|
-
await this.fileSystem.writeFile(filePath, operateJsonString);
|
|
22381
|
-
}
|
|
22382
|
-
async createPackageDescriptor(localBuildFolder) {
|
|
22383
|
-
const packageDescriptor = {
|
|
22384
|
-
files: {}
|
|
22385
|
-
};
|
|
22386
|
-
this.addFileIfExists(packageDescriptor, localBuildFolder, NugetConstants.OperateFileName, NugetConstants.OperateFileName);
|
|
22387
|
-
this.addFileIfExists(packageDescriptor, localBuildFolder, NugetConstants.EntryPointsFileName, NugetConstants.EntryPointsFileName);
|
|
22388
|
-
this.addFileIfExists(packageDescriptor, localBuildFolder, NugetConstants.BindingsFileId, NugetConstants.BindingsV2FileName);
|
|
22389
|
-
const packageDescriptorPath = Path.join(localBuildFolder, NugetConstants.ContentFolderName, NugetConstants.PackageDescriptorFileName);
|
|
22390
|
-
const packageDescriptorJson = JSON.stringify({
|
|
22391
|
-
$schema: "https://cloud.uipath.com/draft/2024-12/package-descriptor",
|
|
22392
|
-
...packageDescriptor
|
|
22393
|
-
}, null, 2);
|
|
22394
|
-
await this.fileSystem.writeFile(packageDescriptorPath, packageDescriptorJson);
|
|
22395
|
-
}
|
|
22396
|
-
addFileIfExists(packageDescriptor, _rootFolder, key, fileName) {
|
|
22397
|
-
const relativePath = Path.join(NugetConstants.ContentFolderName, fileName);
|
|
22398
|
-
packageDescriptor.files[key] = relativePath;
|
|
22399
|
-
}
|
|
22400
|
-
constructor(fileSystem, logger) {
|
|
22401
|
-
super(fileSystem, logger), _define_property(this, "_temporaryStorage", undefined);
|
|
22402
|
-
this._temporaryStorage = new TemporaryStorageService(fileSystem);
|
|
22403
|
-
}
|
|
22404
|
-
}
|
|
22405
|
-
function api_workflow_tool_factory_define_property(obj, key, value) {
|
|
22406
|
-
if (key in obj)
|
|
22407
|
-
Object.defineProperty(obj, key, {
|
|
22408
|
-
value,
|
|
22409
|
-
enumerable: true,
|
|
22410
|
-
configurable: true,
|
|
22411
|
-
writable: true
|
|
22412
|
-
});
|
|
22413
|
-
else
|
|
22414
|
-
obj[key] = value;
|
|
22415
|
-
return obj;
|
|
22416
|
-
}
|
|
22417
|
-
|
|
22418
|
-
class ApiWorkflowToolFactory {
|
|
22419
|
-
async createAsync(logger, fileSystem) {
|
|
22420
|
-
return new ApiWorkflowsTool(fileSystem, logger);
|
|
22421
|
-
}
|
|
22422
|
-
constructor() {
|
|
22423
|
-
api_workflow_tool_factory_define_property(this, "supportedTypes", [
|
|
22424
|
-
ProjectTypes.Api
|
|
22425
|
-
]);
|
|
22426
|
-
}
|
|
22427
|
-
}
|
|
22428
|
-
toolsFactoryRepository.registerProjectToolFactory(new ApiWorkflowToolFactory);
|
|
24133
|
+
// src/tool.ts
|
|
24134
|
+
import"./packager-tool.js";
|
|
22429
24135
|
// package.json
|
|
22430
24136
|
var package_default = {
|
|
22431
24137
|
name: "@uipath/api-workflow-tool",
|
|
22432
|
-
version: "0.1.
|
|
24138
|
+
version: "0.1.14",
|
|
22433
24139
|
description: "Run UiPath API Workflows locally.",
|
|
22434
24140
|
private: false,
|
|
22435
24141
|
repository: {
|
|
@@ -22438,7 +24144,7 @@ var package_default = {
|
|
|
22438
24144
|
directory: "packages/api-workflow-tool"
|
|
22439
24145
|
},
|
|
22440
24146
|
publishConfig: {
|
|
22441
|
-
registry: "https://
|
|
24147
|
+
registry: "https://npm.pkg.github.com/@uipath"
|
|
22442
24148
|
},
|
|
22443
24149
|
keywords: [
|
|
22444
24150
|
"cli-tool"
|
|
@@ -22452,7 +24158,7 @@ var package_default = {
|
|
|
22452
24158
|
"dist"
|
|
22453
24159
|
],
|
|
22454
24160
|
scripts: {
|
|
22455
|
-
build: "bun build ./src/tool.ts --outdir dist --format esm --target node --external commander --external @uipath/common --external @uipath/auth --external @uipath/filesystem --external @uipath/solutionpackager-tool-core",
|
|
24161
|
+
build: "bun build ./src/packager-tool.ts --outdir dist --format esm --target node --external @uipath/solutionpackager-tool-core && bun build ./src/tool.ts --outdir dist --format esm --target node --external '*/packager-tool.js' --external commander --external @uipath/common --external @uipath/auth --external @uipath/filesystem --external @uipath/solutionpackager-tool-core && bun build ./src/index.ts --outdir dist --format esm --target node --external '*/tool.js' --external commander --external @uipath/common --external @uipath/auth --external @uipath/filesystem --external @uipath/solutionpackager-tool-core",
|
|
22456
24162
|
package: "bun run build && bun pm pack",
|
|
22457
24163
|
lint: "biome check .",
|
|
22458
24164
|
"lint:fix": "biome check --write .",
|
|
@@ -22463,36 +24169,174 @@ var package_default = {
|
|
|
22463
24169
|
},
|
|
22464
24170
|
peerDependencies: {
|
|
22465
24171
|
commander: "^14.0.3",
|
|
22466
|
-
"@uipath/common": "^0.1.
|
|
22467
|
-
"@uipath/auth": "^0.1.
|
|
24172
|
+
"@uipath/common": "^0.1.13",
|
|
24173
|
+
"@uipath/auth": "^0.1.9",
|
|
22468
24174
|
"@uipath/filesystem": "^0.1.6",
|
|
22469
|
-
"@uipath/solutionpackager-tool-core": "
|
|
24175
|
+
"@uipath/solutionpackager-tool-core": "workspace:*"
|
|
22470
24176
|
},
|
|
22471
24177
|
devDependencies: {
|
|
22472
|
-
"@uipath/tool-apiworkflow": "
|
|
22473
|
-
"@
|
|
24178
|
+
"@uipath/packager-tool-apiworkflow": "workspace:*",
|
|
24179
|
+
"@uipath/project-packager": "workspace:*",
|
|
24180
|
+
"@types/node": "^25.5.0",
|
|
22474
24181
|
typescript: "^5"
|
|
22475
24182
|
}
|
|
22476
24183
|
};
|
|
22477
24184
|
|
|
22478
|
-
// src/commands/
|
|
24185
|
+
// src/commands/build.ts
|
|
22479
24186
|
import { processContext } from "@uipath/common";
|
|
22480
24187
|
|
|
22481
|
-
// src/
|
|
22482
|
-
var import_api_workflow_executor2 = __toESM(require_dist2(), 1);
|
|
22483
|
-
import { getLoginStatusAsync } from "@uipath/auth";
|
|
24188
|
+
// src/commands/packager-shared.ts
|
|
22484
24189
|
import {
|
|
22485
24190
|
catchError,
|
|
22486
24191
|
FailureOutput,
|
|
22487
|
-
|
|
24192
|
+
LogLevel as LogLevel3,
|
|
24193
|
+
logger,
|
|
22488
24194
|
OutputFormatter,
|
|
22489
24195
|
SuccessOutput
|
|
22490
24196
|
} from "@uipath/common";
|
|
22491
24197
|
import { getFileSystem } from "@uipath/filesystem";
|
|
24198
|
+
import {
|
|
24199
|
+
LogLevel as SdkLogLevel
|
|
24200
|
+
} from "@uipath/solutionpackager-tool-core";
|
|
24201
|
+
var fs = getFileSystem();
|
|
24202
|
+
async function createPackager() {
|
|
24203
|
+
const { createNodeProjectPackager: createNodeProjectPackager2 } = await Promise.resolve().then(() => (init_node2(), exports_node));
|
|
24204
|
+
return await createNodeProjectPackager2({
|
|
24205
|
+
logHandler: logger.handleLog
|
|
24206
|
+
});
|
|
24207
|
+
}
|
|
24208
|
+
async function setupProject(packager, projectPath) {
|
|
24209
|
+
const absPath = fs.path.resolve(projectPath);
|
|
24210
|
+
const stats = await fs.stat(absPath);
|
|
24211
|
+
if (!stats)
|
|
24212
|
+
throw new Error(`Path not found: ${absPath}`);
|
|
24213
|
+
if (stats.isFile() && !absPath.endsWith(".uip")) {
|
|
24214
|
+
throw new Error(`Unsupported file type: ${absPath}. Provide a .uip file or a project directory.`);
|
|
24215
|
+
}
|
|
24216
|
+
if (stats.isFile() && absPath.endsWith(".uip")) {
|
|
24217
|
+
const data = await fs.readFile(absPath);
|
|
24218
|
+
if (!data)
|
|
24219
|
+
throw new Error(`Failed to read file: ${absPath}`);
|
|
24220
|
+
return packager.setupAsync(new Uint8Array(data));
|
|
24221
|
+
}
|
|
24222
|
+
return packager.setupAsync(absPath);
|
|
24223
|
+
}
|
|
24224
|
+
async function buildBaseOptions() {
|
|
24225
|
+
const { ProjectPackOptions: ProjectPackOptions2 } = await Promise.resolve().then(() => (init_node2(), exports_node));
|
|
24226
|
+
const sdkLogLevelMap = {
|
|
24227
|
+
[LogLevel3.DEBUG]: SdkLogLevel.Debug,
|
|
24228
|
+
[LogLevel3.INFO]: SdkLogLevel.Info,
|
|
24229
|
+
[LogLevel3.WARN]: SdkLogLevel.Warn,
|
|
24230
|
+
[LogLevel3.ERROR]: SdkLogLevel.Error
|
|
24231
|
+
};
|
|
24232
|
+
const options = new ProjectPackOptions2;
|
|
24233
|
+
options.logLevel = sdkLogLevelMap[logger.getLevel()] ?? SdkLogLevel.Error;
|
|
24234
|
+
return options;
|
|
24235
|
+
}
|
|
24236
|
+
function formatError(label, hint, error) {
|
|
24237
|
+
OutputFormatter.error(new FailureOutput(`${label} failed`, error.message, hint));
|
|
24238
|
+
}
|
|
24239
|
+
async function runPackagerCommand(opts, config) {
|
|
24240
|
+
const [packagerError, packager] = await catchError(createPackager());
|
|
24241
|
+
if (packagerError) {
|
|
24242
|
+
formatError(config.label, config.hint, packagerError);
|
|
24243
|
+
return false;
|
|
24244
|
+
}
|
|
24245
|
+
const [setupError, inputPath] = await catchError(setupProject(packager, opts.projectPath));
|
|
24246
|
+
if (setupError) {
|
|
24247
|
+
formatError(config.label, config.hint, setupError);
|
|
24248
|
+
return false;
|
|
24249
|
+
}
|
|
24250
|
+
const [optsError, options] = await catchError(buildBaseOptions());
|
|
24251
|
+
if (optsError) {
|
|
24252
|
+
formatError(config.label, config.hint, optsError);
|
|
24253
|
+
return false;
|
|
24254
|
+
}
|
|
24255
|
+
options.inputPath = inputPath;
|
|
24256
|
+
const [execError, result] = await catchError(config.execute(packager, options, opts));
|
|
24257
|
+
if (execError) {
|
|
24258
|
+
formatError(config.label, config.hint, execError);
|
|
24259
|
+
return false;
|
|
24260
|
+
}
|
|
24261
|
+
if (result.isSuccess) {
|
|
24262
|
+
const data = config.formatSuccess?.(result) ?? { Success: true };
|
|
24263
|
+
OutputFormatter.success(new SuccessOutput(config.label, data));
|
|
24264
|
+
return true;
|
|
24265
|
+
}
|
|
24266
|
+
OutputFormatter.error(new FailureOutput(`${config.label} failed`, result.message ?? (result.errorCode ? `Error code: ${result.errorCode}` : "Unknown error"), config.hint));
|
|
24267
|
+
return false;
|
|
24268
|
+
}
|
|
24269
|
+
|
|
24270
|
+
// src/commands/build.ts
|
|
24271
|
+
var registerBuildCommand = (program) => {
|
|
24272
|
+
program.command("build").description("Build (compile) an API Workflow project").argument("<projectPath>", "Path to the API Workflow project directory or .uip file").trackedAction(processContext, async (projectPath, opts) => {
|
|
24273
|
+
opts.projectPath = projectPath;
|
|
24274
|
+
const success = await runPackagerCommand(opts, {
|
|
24275
|
+
label: "ApiWorkflowBuild",
|
|
24276
|
+
hint: "Check project path and build configuration.",
|
|
24277
|
+
execute: async (packager, options) => {
|
|
24278
|
+
return packager.buildProjectAsync(options);
|
|
24279
|
+
}
|
|
24280
|
+
});
|
|
24281
|
+
if (!success)
|
|
24282
|
+
processContext.exit(1);
|
|
24283
|
+
});
|
|
24284
|
+
};
|
|
24285
|
+
|
|
24286
|
+
// src/commands/pack.ts
|
|
24287
|
+
import { processContext as processContext2 } from "@uipath/common";
|
|
24288
|
+
var registerPackCommand = (program) => {
|
|
24289
|
+
program.command("pack").description("Build and package an API Workflow project into a .nupkg").argument("<projectPath>", "Path to the API Workflow project directory or .uip file").argument("<destinationPath>", "Directory where .nupkg is written").option("--package-id <id>", "NuGet package ID").option("--package-version <version>", "NuGet package version").option("--package-author <author>", "NuGet package author").option("--package-description <desc>", "NuGet package description").option("--signing-certificate-path <path>", "Path to .pfx certificate file").option("--signing-certificate-password <password>", "Certificate password").option("--signing-timestamp-server <url>", "Timestamp server URL").trackedAction(processContext2, async (projectPath, destinationPath, opts) => {
|
|
24290
|
+
opts.projectPath = projectPath;
|
|
24291
|
+
opts.destinationPath = destinationPath;
|
|
24292
|
+
const success = await runPackagerCommand(opts, {
|
|
24293
|
+
label: "ApiWorkflowPack",
|
|
24294
|
+
hint: "Check project path and pack configuration.",
|
|
24295
|
+
execute: async (packager, options, opts2) => {
|
|
24296
|
+
options.destinationPath = opts2.destinationPath;
|
|
24297
|
+
options.package = {
|
|
24298
|
+
id: opts2.packageId ?? "",
|
|
24299
|
+
version: opts2.packageVersion ?? "",
|
|
24300
|
+
author: opts2.packageAuthor,
|
|
24301
|
+
description: opts2.packageDescription
|
|
24302
|
+
};
|
|
24303
|
+
if (opts2.signingCertificatePath) {
|
|
24304
|
+
options.signingInfo = {
|
|
24305
|
+
certificatePath: opts2.signingCertificatePath,
|
|
24306
|
+
certificatePassword: opts2.signingCertificatePassword,
|
|
24307
|
+
timestampServer: opts2.signingTimestampServer
|
|
24308
|
+
};
|
|
24309
|
+
}
|
|
24310
|
+
return packager.packProjectAsync(options);
|
|
24311
|
+
},
|
|
24312
|
+
formatSuccess: (result) => ({
|
|
24313
|
+
Success: true,
|
|
24314
|
+
Packages: result.packages
|
|
24315
|
+
})
|
|
24316
|
+
});
|
|
24317
|
+
if (!success)
|
|
24318
|
+
processContext2.exit(1);
|
|
24319
|
+
});
|
|
24320
|
+
};
|
|
24321
|
+
|
|
24322
|
+
// src/commands/run.ts
|
|
24323
|
+
import { processContext as processContext3 } from "@uipath/common";
|
|
24324
|
+
|
|
24325
|
+
// src/services/workflow-run-service.ts
|
|
24326
|
+
var import_api_workflow_executor2 = __toESM(require_dist2(), 1);
|
|
24327
|
+
import { getLoginStatusAsync } from "@uipath/auth";
|
|
24328
|
+
import {
|
|
24329
|
+
catchError as catchError2,
|
|
24330
|
+
FailureOutput as FailureOutput2,
|
|
24331
|
+
logger as logger3,
|
|
24332
|
+
OutputFormatter as OutputFormatter2,
|
|
24333
|
+
SuccessOutput as SuccessOutput2
|
|
24334
|
+
} from "@uipath/common";
|
|
24335
|
+
import { getFileSystem as getFileSystem2 } from "@uipath/filesystem";
|
|
22492
24336
|
|
|
22493
24337
|
// src/services/console-logger.ts
|
|
22494
24338
|
var import_api_workflow_executor = __toESM(require_dist2(), 1);
|
|
22495
|
-
import { logger } from "@uipath/common";
|
|
24339
|
+
import { logger as logger2 } from "@uipath/common";
|
|
22496
24340
|
var SYMBOLS = {
|
|
22497
24341
|
started: "▶",
|
|
22498
24342
|
completed: "✓",
|
|
@@ -22514,15 +24358,15 @@ function createConsoleLogger() {
|
|
|
22514
24358
|
const timestamp = data.timestamp.toISOString();
|
|
22515
24359
|
switch (event) {
|
|
22516
24360
|
case import_api_workflow_executor.WorkflowEvent.WORKFLOW_STARTED:
|
|
22517
|
-
|
|
24361
|
+
logger2.info(`
|
|
22518
24362
|
[${timestamp}] Workflow started`);
|
|
22519
24363
|
break;
|
|
22520
24364
|
case import_api_workflow_executor.WorkflowEvent.WORKFLOW_COMPLETED:
|
|
22521
|
-
|
|
24365
|
+
logger2.info(`
|
|
22522
24366
|
[${timestamp}] Workflow completed${data.executionTimeMs ? ` (${data.executionTimeMs}ms)` : ""}`);
|
|
22523
24367
|
break;
|
|
22524
24368
|
case import_api_workflow_executor.WorkflowEvent.WORKFLOW_FAILED:
|
|
22525
|
-
|
|
24369
|
+
logger2.error(`
|
|
22526
24370
|
[${timestamp}] Workflow failed: ${error?.message ?? "Unknown error"}`);
|
|
22527
24371
|
break;
|
|
22528
24372
|
}
|
|
@@ -22534,16 +24378,16 @@ function createConsoleLogger() {
|
|
|
22534
24378
|
switch (event) {
|
|
22535
24379
|
case import_api_workflow_executor.TaskEvent.TASK_STARTED:
|
|
22536
24380
|
startTimes.set(data.taskId, Date.now());
|
|
22537
|
-
|
|
24381
|
+
logger2.info(` ${SYMBOLS.started} ${label} ${displayName}`);
|
|
22538
24382
|
break;
|
|
22539
24383
|
case import_api_workflow_executor.TaskEvent.TASK_COMPLETED:
|
|
22540
|
-
|
|
24384
|
+
logger2.info(` ${SYMBOLS.completed} ${label} ${displayName}${formatDuration(data.taskId)}`);
|
|
22541
24385
|
break;
|
|
22542
24386
|
case import_api_workflow_executor.TaskEvent.TASK_FAILED:
|
|
22543
|
-
|
|
24387
|
+
logger2.error(` ${SYMBOLS.failed} ${label} ${displayName}: ${error?.message ?? "error"}`);
|
|
22544
24388
|
break;
|
|
22545
24389
|
case import_api_workflow_executor.TaskEvent.TASK_STOPPED:
|
|
22546
|
-
|
|
24390
|
+
logger2.info(` ${SYMBOLS.stopped} ${label} ${displayName}`);
|
|
22547
24391
|
break;
|
|
22548
24392
|
}
|
|
22549
24393
|
},
|
|
@@ -22552,30 +24396,30 @@ function createConsoleLogger() {
|
|
|
22552
24396
|
const level = data.logLevel?.toLowerCase() ?? "info";
|
|
22553
24397
|
const message = typeof data.message === "string" ? data.message : JSON.stringify(data.message);
|
|
22554
24398
|
if (level === "error") {
|
|
22555
|
-
|
|
24399
|
+
logger2.error(` [${level}] ${message}`);
|
|
22556
24400
|
} else if (level === "warning") {
|
|
22557
|
-
|
|
24401
|
+
logger2.warn(` [${level}] ${message}`);
|
|
22558
24402
|
} else {
|
|
22559
|
-
|
|
24403
|
+
logger2.info(` [${level}] ${message}`);
|
|
22560
24404
|
}
|
|
22561
24405
|
}
|
|
22562
24406
|
},
|
|
22563
24407
|
async logIterationVariables(taskId, taskType, variables) {
|
|
22564
24408
|
if (variables) {
|
|
22565
|
-
|
|
24409
|
+
logger2.debug(` [iteration] ${taskId} (${taskType}): ${JSON.stringify(variables)}`);
|
|
22566
24410
|
}
|
|
22567
24411
|
},
|
|
22568
24412
|
async debug(message, data) {
|
|
22569
|
-
|
|
24413
|
+
logger2.debug(message, ...data ? [JSON.stringify(data)] : []);
|
|
22570
24414
|
},
|
|
22571
24415
|
async info(message, data) {
|
|
22572
|
-
|
|
24416
|
+
logger2.info(message, ...data ? [JSON.stringify(data)] : []);
|
|
22573
24417
|
},
|
|
22574
24418
|
async warn(message, data) {
|
|
22575
|
-
|
|
24419
|
+
logger2.warn(message, ...data ? [JSON.stringify(data)] : []);
|
|
22576
24420
|
},
|
|
22577
24421
|
async error(message, data, error) {
|
|
22578
|
-
|
|
24422
|
+
logger2.error(message, ...data ? [JSON.stringify(data)] : [], ...error ? [String(error)] : []);
|
|
22579
24423
|
},
|
|
22580
24424
|
async shutdown() {
|
|
22581
24425
|
startTimes.clear();
|
|
@@ -22586,68 +24430,68 @@ function createConsoleLogger() {
|
|
|
22586
24430
|
// src/services/workflow-run-service.ts
|
|
22587
24431
|
class WorkflowRunService {
|
|
22588
24432
|
async execute(filePath, options, context) {
|
|
22589
|
-
const
|
|
22590
|
-
const resolvedPath =
|
|
22591
|
-
if (!await
|
|
22592
|
-
|
|
24433
|
+
const fs2 = getFileSystem2();
|
|
24434
|
+
const resolvedPath = fs2.path.resolve(filePath);
|
|
24435
|
+
if (!await fs2.exists(resolvedPath)) {
|
|
24436
|
+
OutputFormatter2.error(new FailureOutput2("Failure", `File not found: ${resolvedPath}`, "Provide a valid path to a workflow JSON file."));
|
|
22593
24437
|
context.exit(1);
|
|
22594
24438
|
return;
|
|
22595
24439
|
}
|
|
22596
|
-
const [readError, raw] = await
|
|
24440
|
+
const [readError, raw] = await catchError2(fs2.readFile(resolvedPath, "utf-8"));
|
|
22597
24441
|
if (readError) {
|
|
22598
|
-
|
|
24442
|
+
OutputFormatter2.error(new FailureOutput2("Failure", `Failed to parse workflow file: ${readError.message}`, "Ensure the file contains valid JSON."));
|
|
22599
24443
|
context.exit(1);
|
|
22600
24444
|
return;
|
|
22601
24445
|
}
|
|
22602
|
-
const [parseError, workflow] =
|
|
24446
|
+
const [parseError, workflow] = catchError2(() => JSON.parse(raw ?? ""));
|
|
22603
24447
|
if (parseError) {
|
|
22604
|
-
|
|
24448
|
+
OutputFormatter2.error(new FailureOutput2("Failure", `Failed to parse workflow file: ${parseError.message}`, "Ensure the file contains valid JSON."));
|
|
22605
24449
|
context.exit(1);
|
|
22606
24450
|
return;
|
|
22607
24451
|
}
|
|
22608
24452
|
let input = {};
|
|
22609
24453
|
if (options.inputArguments) {
|
|
22610
24454
|
const rawInput = options.inputArguments;
|
|
22611
|
-
const [inputParseError, parsedInput] =
|
|
24455
|
+
const [inputParseError, parsedInput] = catchError2(() => JSON.parse(rawInput));
|
|
22612
24456
|
if (inputParseError) {
|
|
22613
|
-
|
|
24457
|
+
OutputFormatter2.error(new FailureOutput2("Failure", `Failed to parse --input-arguments JSON: ${inputParseError.message}`, `Provide valid JSON (e.g. '{"name": "World"}').`));
|
|
22614
24458
|
context.exit(1);
|
|
22615
24459
|
return;
|
|
22616
24460
|
}
|
|
22617
24461
|
input = parsedInput;
|
|
22618
24462
|
}
|
|
22619
24463
|
const workflowLogger = createConsoleLogger();
|
|
22620
|
-
const [configError, workflowConfig] = await
|
|
24464
|
+
const [configError, workflowConfig] = await catchError2(this.buildWorkflowConfig(options.auth));
|
|
22621
24465
|
if (configError) {
|
|
22622
24466
|
await workflowLogger.shutdown();
|
|
22623
|
-
|
|
24467
|
+
OutputFormatter2.error(new FailureOutput2("Failure", `Execution error: ${configError.message}`, "Check the workflow definition and try again with --log-level debug for more details."));
|
|
22624
24468
|
context.exit(1);
|
|
22625
24469
|
return;
|
|
22626
24470
|
}
|
|
22627
|
-
|
|
22628
|
-
Running workflow: ${
|
|
24471
|
+
logger3.info(`
|
|
24472
|
+
Running workflow: ${fs2.path.basename(resolvedPath)}`);
|
|
22629
24473
|
if (workflowConfig.accessToken) {
|
|
22630
|
-
|
|
24474
|
+
logger3.info(`Auth: connected to ${workflowConfig.baseUrl}`);
|
|
22631
24475
|
} else {
|
|
22632
|
-
|
|
24476
|
+
logger3.info("Auth: local mode (no credentials)");
|
|
22633
24477
|
}
|
|
22634
24478
|
if (Object.keys(input).length > 0) {
|
|
22635
|
-
|
|
24479
|
+
logger3.info(`Input: ${JSON.stringify(input, null, 2)}`);
|
|
22636
24480
|
}
|
|
22637
|
-
const [execError, result] = await
|
|
24481
|
+
const [execError, result] = await catchError2(import_api_workflow_executor2.ServerlessWorkflowExecutor.execute(workflow, workflowConfig, input, { logger: workflowLogger }));
|
|
22638
24482
|
if (execError) {
|
|
22639
24483
|
await workflowLogger.shutdown();
|
|
22640
|
-
|
|
24484
|
+
OutputFormatter2.error(new FailureOutput2("Failure", `Execution error: ${execError.message}`, "Check the workflow definition and try again with --log-level debug for more details."));
|
|
22641
24485
|
context.exit(1);
|
|
22642
24486
|
return;
|
|
22643
24487
|
}
|
|
22644
24488
|
await workflowLogger.shutdown();
|
|
22645
|
-
|
|
24489
|
+
logger3.debug(`Raw response: ${JSON.stringify(result, null, 2)}`);
|
|
22646
24490
|
if (result.status === "Successful") {
|
|
22647
24491
|
const data = result.data ?? { message: "(no output)" };
|
|
22648
|
-
|
|
24492
|
+
OutputFormatter2.success(new SuccessOutput2("WorkflowRun", data));
|
|
22649
24493
|
} else {
|
|
22650
|
-
|
|
24494
|
+
OutputFormatter2.error(new FailureOutput2("Failure", result.errorMessage ?? "Unknown error", "Check the workflow definition and input parameters."));
|
|
22651
24495
|
context.exit(1);
|
|
22652
24496
|
}
|
|
22653
24497
|
}
|
|
@@ -22660,10 +24504,10 @@ Running workflow: ${fs.path.basename(resolvedPath)}`);
|
|
|
22660
24504
|
source: "uipcli"
|
|
22661
24505
|
};
|
|
22662
24506
|
if (!authEnabled) {
|
|
22663
|
-
|
|
24507
|
+
logger3.debug("Auth disabled via --no-auth flag");
|
|
22664
24508
|
return localConfig;
|
|
22665
24509
|
}
|
|
22666
|
-
const [error, status] = await
|
|
24510
|
+
const [error, status] = await catchError2(getLoginStatusAsync({
|
|
22667
24511
|
ensureTokenValidityMinutes: 10
|
|
22668
24512
|
}));
|
|
22669
24513
|
if (error) {
|
|
@@ -22678,16 +24522,16 @@ Running workflow: ${fs.path.basename(resolvedPath)}`);
|
|
|
22678
24522
|
source: "uipcli"
|
|
22679
24523
|
};
|
|
22680
24524
|
}
|
|
22681
|
-
|
|
24525
|
+
logger3.debug("Not logged in, using local mode");
|
|
22682
24526
|
return localConfig;
|
|
22683
24527
|
}
|
|
22684
24528
|
}
|
|
22685
24529
|
|
|
22686
24530
|
// src/commands/run.ts
|
|
22687
24531
|
var registerRunCommand = (program) => {
|
|
22688
|
-
program.command("run").description("Execute an API Workflow JSON file locally using the Serverless Workflow executor").argument("<file>", "Path to the workflow JSON file").option("-i, --input-arguments <json>", `Input arguments as a JSON string (e.g. '{"name": "World"}')`).option("--no-auth", "Skip credential loading (local-only mode, no connector support)").trackedAction(
|
|
24532
|
+
program.command("run").description("Execute an API Workflow JSON file locally using the Serverless Workflow executor").argument("<file>", "Path to the workflow JSON file").option("-i, --input-arguments <json>", `Input arguments as a JSON string (e.g. '{"name": "World"}')`).option("--no-auth", "Skip credential loading (local-only mode, no connector support)").trackedAction(processContext3, async (file, options) => {
|
|
22689
24533
|
const service = new WorkflowRunService;
|
|
22690
|
-
await service.execute(file, options,
|
|
24534
|
+
await service.execute(file, options, processContext3);
|
|
22691
24535
|
});
|
|
22692
24536
|
};
|
|
22693
24537
|
|
|
@@ -22699,6 +24543,8 @@ var metadata = {
|
|
|
22699
24543
|
commandPrefix: "api-workflow"
|
|
22700
24544
|
};
|
|
22701
24545
|
var registerCommands = async (program) => {
|
|
24546
|
+
registerPackCommand(program);
|
|
24547
|
+
registerBuildCommand(program);
|
|
22702
24548
|
registerRunCommand(program);
|
|
22703
24549
|
};
|
|
22704
24550
|
export {
|