@uipath/api-workflow-tool 1.205.0-preview.277 → 1.206.0-preview.279
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -0
- package/dist/THIRD-PARTY-NOTICES.md +64 -3
- package/dist/applicationinsights-web-8m26566f.js +17209 -0
- package/dist/executor-tool.js +7 -9
- package/dist/index-1wp4j95a.js +10 -0
- package/dist/index-3d09whjq.js +11 -0
- package/dist/{index-waq4trz1.js → index-njewr1c3.js} +5040 -2961
- package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
- package/dist/index.js +14 -15
- package/dist/index.umd.min-ttg1qc0x.js +7814 -0
- package/dist/{jmespath-e4a59c8w.js → jmespath-wwym30dp.js} +1 -1
- package/dist/js-yaml-0c4svjwq.js +36 -0
- package/dist/{node-0aex431z.js → node-zecqtv6e.js} +13 -90
- package/dist/{packager-tool-bgy9gdsp.js → packager-tool-2ckhrf4j.js} +128 -15
- package/dist/{packager-tool-kh3aq9n7.js → packager-tool-2wwd7kp4.js} +920 -903
- package/dist/{packager-tool-xak3m9vd.js → packager-tool-3hcrfsc1.js} +762 -384
- package/dist/{packager-tool-0aacqssr.js → packager-tool-5b6vjjp3.js} +371 -371
- package/dist/{packager-tool-d3w0wn6k.js → packager-tool-5gce5wfd.js} +16 -16
- package/dist/{packager-tool-f7zta1kg.js → packager-tool-61bdk9sn.js} +203 -156
- package/dist/{packager-tool-1yh8g550.js → packager-tool-6an893wm.js} +12 -3
- package/dist/{packager-tool-646qm7dh.js → packager-tool-km68yge6.js} +62 -586
- package/dist/{packager-tool-evd1kzq2.js → packager-tool-qhv22qaj.js} +809 -380
- package/dist/packager-tool-rqprykf5.js +15 -0
- package/dist/{packager-tool-h29ph2zm.js → packager-tool-w1asrkzg.js} +361 -205
- package/dist/packager-tool.js +6 -6
- package/dist/tool.js +13 -14
- package/package.json +2 -2
- package/dist/index-a8veczhw.js +0 -72
- package/dist/index.umd.min-fqefd9kn.js +0 -7814
- package/dist/js-yaml-69tsdrrf.js +0 -37
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
yaml,
|
|
3
|
+
Type2,
|
|
4
|
+
Schema2,
|
|
5
|
+
FAILSAFE_SCHEMA2,
|
|
6
|
+
JSON_SCHEMA2,
|
|
7
|
+
CORE_SCHEMA2,
|
|
8
|
+
DEFAULT_SCHEMA2,
|
|
9
|
+
load2,
|
|
10
|
+
loadAll2,
|
|
11
|
+
dump2,
|
|
12
|
+
YAMLException2,
|
|
13
|
+
types2,
|
|
14
|
+
safeLoad2,
|
|
15
|
+
safeLoadAll2,
|
|
16
|
+
safeDump2
|
|
17
|
+
} from "./packager-tool-5gce5wfd.js";
|
|
18
|
+
export {
|
|
19
|
+
CORE_SCHEMA2 as CORE_SCHEMA,
|
|
20
|
+
DEFAULT_SCHEMA2 as DEFAULT_SCHEMA,
|
|
21
|
+
FAILSAFE_SCHEMA2 as FAILSAFE_SCHEMA,
|
|
22
|
+
JSON_SCHEMA2 as JSON_SCHEMA,
|
|
23
|
+
Schema2 as Schema,
|
|
24
|
+
Type2 as Type,
|
|
25
|
+
YAMLException2 as YAMLException,
|
|
26
|
+
yaml as default,
|
|
27
|
+
dump2 as dump,
|
|
28
|
+
load2 as load,
|
|
29
|
+
loadAll2 as loadAll,
|
|
30
|
+
safeDump2 as safeDump,
|
|
31
|
+
safeLoad2 as safeLoad,
|
|
32
|
+
safeLoadAll2 as safeLoadAll,
|
|
33
|
+
types2 as types
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//# debugId=63F44311F167DCFE64756E2164756E21
|
|
@@ -1,45 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
PackagerParameters,
|
|
6
|
-
PackagerParametersValidator,
|
|
7
|
-
ProjectBuildOptions,
|
|
8
|
-
ProjectBuildOptionsValidator,
|
|
9
|
-
ProjectCleanupOptions,
|
|
10
|
-
ProjectLoader,
|
|
11
|
-
ProjectPackOptions,
|
|
12
|
-
ProjectPackager,
|
|
13
|
-
ProjectPublishOptions,
|
|
14
|
-
ProjectPublisher,
|
|
15
|
-
ProjectRestoreOptions,
|
|
16
|
-
ProjectToolExecutor,
|
|
17
|
-
ProjectValidateOptions,
|
|
18
|
-
ProjectValidateOptionsValidator,
|
|
19
|
-
PublishDestinationKind,
|
|
20
|
-
RulesConfigFileType,
|
|
21
|
-
TelemetryNames,
|
|
22
|
-
ToolLogger,
|
|
23
|
-
ToolsFactory,
|
|
24
|
-
isPackageIdTooLongError,
|
|
25
|
-
resolveProducedNupkgsAsync,
|
|
26
|
-
setGlobalLogHandler,
|
|
27
|
-
signNupkgsAsync
|
|
28
|
-
} from "./packager-tool-646qm7dh.js";
|
|
2
|
+
translate,
|
|
3
|
+
ToolResult
|
|
4
|
+
} from "./packager-tool-61bdk9sn.js";
|
|
29
5
|
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
6
|
+
setGlobalLogHandler,
|
|
7
|
+
ToolLogger,
|
|
8
|
+
ProjectPackager
|
|
9
|
+
} from "./packager-tool-km68yge6.js";
|
|
33
10
|
import {
|
|
11
|
+
NodeFileSystem,
|
|
34
12
|
DebugTelemetryProvider,
|
|
35
|
-
NodeContextStorage
|
|
36
|
-
|
|
37
|
-
} from "./packager-tool-xak3m9vd.js";
|
|
13
|
+
NodeContextStorage
|
|
14
|
+
} from "./packager-tool-3hcrfsc1.js";
|
|
38
15
|
import {
|
|
39
|
-
ConsoleTelemetryProvider,
|
|
40
16
|
TelemetryService
|
|
41
|
-
} from "./packager-tool-
|
|
42
|
-
import"./packager-tool-1yh8g550.js";
|
|
17
|
+
} from "./packager-tool-qhv22qaj.js";
|
|
43
18
|
// ../packager/project-packager/src/base-node-packager-factory.ts
|
|
44
19
|
class BaseNodePackagerFactory {
|
|
45
20
|
dotnetDiscovery;
|
|
@@ -187,60 +162,8 @@ async function createNodeProjectPackager(options) {
|
|
|
187
162
|
const factory = new NodeProjectPackagerFactory;
|
|
188
163
|
return factory.createAsync(options);
|
|
189
164
|
}
|
|
190
|
-
// ../packager/project-packager/src/publish/node-project-publisher-factory.ts
|
|
191
|
-
class NodeProjectPublisherFactory extends BaseNodePackagerFactory {
|
|
192
|
-
async createAsync(config) {
|
|
193
|
-
const logger = new ToolLogger("ProjectPublisherFactory", "Create");
|
|
194
|
-
this.configureLanguage(config);
|
|
195
|
-
this.configureLogHandler(config);
|
|
196
|
-
logger.info("Creating ProjectPublisher instance...");
|
|
197
|
-
const fileSystem = this.getOrCreateFileSystem(config);
|
|
198
|
-
this.getOrCreateTelemetryService(config);
|
|
199
|
-
const projectPublisher = new ProjectPublisher(fileSystem);
|
|
200
|
-
logger.info("ProjectPublisher created successfully.");
|
|
201
|
-
return projectPublisher;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
async function createNodeProjectPublisher(options) {
|
|
205
|
-
const factory = new NodeProjectPublisherFactory;
|
|
206
|
-
return factory.createAsync(options);
|
|
207
|
-
}
|
|
208
165
|
export {
|
|
209
|
-
|
|
210
|
-
ConsoleTelemetryProvider,
|
|
211
|
-
DebugTelemetryProvider,
|
|
212
|
-
DotnetDiscoveryService,
|
|
213
|
-
GovernancePolicyService,
|
|
214
|
-
NodeContextStorage,
|
|
215
|
-
NodePackageSignService,
|
|
216
|
-
PACKAGE_ID_TOO_LONG,
|
|
217
|
-
PackService,
|
|
218
|
-
PackagerParameters,
|
|
219
|
-
PackagerParametersValidator,
|
|
220
|
-
ProjectBuildOptions,
|
|
221
|
-
ProjectBuildOptionsValidator,
|
|
222
|
-
ProjectCleanupOptions,
|
|
223
|
-
ProjectLoader,
|
|
224
|
-
ProjectPackOptions,
|
|
225
|
-
ProjectPackager,
|
|
226
|
-
ProjectPublishOptions,
|
|
227
|
-
ProjectPublisher,
|
|
228
|
-
ProjectRestoreOptions,
|
|
229
|
-
ProjectToolExecutor,
|
|
230
|
-
ProjectValidateOptions,
|
|
231
|
-
ProjectValidateOptionsValidator,
|
|
232
|
-
PublishDestinationKind,
|
|
233
|
-
RulesConfigFileType,
|
|
234
|
-
TelemetryNames,
|
|
235
|
-
TelemetryService,
|
|
236
|
-
ToolLogger,
|
|
237
|
-
ToolsFactory,
|
|
238
|
-
createNodeProjectPackager,
|
|
239
|
-
createNodeProjectPublisher,
|
|
240
|
-
isPackageIdTooLongError,
|
|
241
|
-
resolveProducedNupkgsAsync,
|
|
242
|
-
setGlobalLogHandler,
|
|
243
|
-
signNupkgsAsync
|
|
166
|
+
createNodeProjectPackager
|
|
244
167
|
};
|
|
245
168
|
|
|
246
|
-
//# debugId=
|
|
169
|
+
//# debugId=C2704605A10C791D64756E2164756E21
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
I18nManager,
|
|
3
|
-
NugetConstants,
|
|
4
|
-
NugetPackager,
|
|
5
2
|
Path,
|
|
6
|
-
ProjectTool,
|
|
7
3
|
TemporaryStorageService,
|
|
4
|
+
I18nManager,
|
|
5
|
+
translate,
|
|
6
|
+
NugetConstants,
|
|
8
7
|
ToolResult,
|
|
9
8
|
ensureContentOperateFile,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
NugetPackager,
|
|
10
|
+
readIdentityJson,
|
|
11
|
+
readIdentityField,
|
|
12
|
+
ProjectTool
|
|
13
|
+
} from "./packager-tool-61bdk9sn.js";
|
|
13
14
|
// ../packager/packager-tool-apiworkflow/src/i18n/locales/de.json
|
|
14
15
|
var de_default = {
|
|
15
16
|
toolApiworkflow: {
|
|
@@ -515,18 +516,130 @@ class ApiWorkflowsTool extends ProjectTool {
|
|
|
515
516
|
}
|
|
516
517
|
}
|
|
517
518
|
|
|
519
|
+
// ../packager/packager-tool-apiworkflow/src/project-identity.ts
|
|
520
|
+
var MANIFEST_FILES = ["project.uiproj", "project.json"];
|
|
521
|
+
var PROJECT_ID_PATH = ["document", "tags", "projectId"];
|
|
522
|
+
function isRecord(value) {
|
|
523
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
524
|
+
}
|
|
525
|
+
function asRecord(value) {
|
|
526
|
+
return isRecord(value) ? value : undefined;
|
|
527
|
+
}
|
|
528
|
+
function declaredType(value) {
|
|
529
|
+
return value === undefined ? undefined : String(value);
|
|
530
|
+
}
|
|
531
|
+
async function sourceManifest(root, fs) {
|
|
532
|
+
const [modernFile, classicFile] = MANIFEST_FILES;
|
|
533
|
+
const modern = await readIdentityJson(fs, fs.path.join(root, modernFile));
|
|
534
|
+
if (modern)
|
|
535
|
+
return {
|
|
536
|
+
type: declaredType(modern.ProjectType ?? modern.type),
|
|
537
|
+
main: typeof modern.MainFile === "string" ? modern.MainFile : undefined
|
|
538
|
+
};
|
|
539
|
+
const classic = await readIdentityJson(fs, fs.path.join(root, classicFile));
|
|
540
|
+
const design = asRecord(classic?.designOptions);
|
|
541
|
+
return {
|
|
542
|
+
type: declaredType(design?.outputType ?? classic?.ProjectType ?? classic?.type),
|
|
543
|
+
main: typeof classic?.main === "string" ? classic.main : undefined
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
async function mainWorkflow(root, fs) {
|
|
547
|
+
const manifest = await sourceManifest(root, fs);
|
|
548
|
+
const main = manifest.main?.trim() ? manifest.main : "Workflow.json";
|
|
549
|
+
const file = fs.path.resolve(root, main);
|
|
550
|
+
const relative = fs.path.relative(root, file);
|
|
551
|
+
if (relative === ".." || relative.startsWith("../") || relative.startsWith("..\\") || fs.path.isAbsolute(relative)) {
|
|
552
|
+
throw new Error("Invalid API workflow main file");
|
|
553
|
+
}
|
|
554
|
+
return file;
|
|
555
|
+
}
|
|
556
|
+
var unresolved = (status) => ({
|
|
557
|
+
projectType: "Api" /* Api */,
|
|
558
|
+
status
|
|
559
|
+
});
|
|
560
|
+
async function findProjectDirectory(file, fs) {
|
|
561
|
+
try {
|
|
562
|
+
let directory = fs.path.dirname(fs.path.resolve(file));
|
|
563
|
+
while (true) {
|
|
564
|
+
for (const name of MANIFEST_FILES) {
|
|
565
|
+
if (await fs.exists(fs.path.join(directory, name))) {
|
|
566
|
+
const manifest = await sourceManifest(directory, fs);
|
|
567
|
+
return manifest.type === "Api" /* Api */ ? directory : undefined;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
const parent = fs.path.dirname(directory);
|
|
571
|
+
if (parent === directory)
|
|
572
|
+
return;
|
|
573
|
+
directory = parent;
|
|
574
|
+
}
|
|
575
|
+
} catch {
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
var readProjectIdentity2 = async (target, fs) => {
|
|
580
|
+
try {
|
|
581
|
+
const path = fs.path.resolve(target);
|
|
582
|
+
const stat = await fs.stat(path);
|
|
583
|
+
if (!stat)
|
|
584
|
+
return unresolved("missing");
|
|
585
|
+
if (stat.isFile() && path.endsWith(".uip"))
|
|
586
|
+
return unresolved("missing");
|
|
587
|
+
const isManifest = MANIFEST_FILES.includes(fs.path.basename(path));
|
|
588
|
+
const root = stat.isFile() ? fs.path.dirname(path) : path;
|
|
589
|
+
if (stat.isDirectory() || isManifest) {
|
|
590
|
+
const manifest = await sourceManifest(root, fs);
|
|
591
|
+
if (manifest.type !== undefined && manifest.type !== "Api" /* Api */)
|
|
592
|
+
return unresolved("unsupported");
|
|
593
|
+
return {
|
|
594
|
+
...await readWorkflowIdentity(await mainWorkflow(root, fs), fs),
|
|
595
|
+
projectDirectory: root
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
return {
|
|
599
|
+
...await readWorkflowIdentity(path, fs),
|
|
600
|
+
projectDirectory: await findProjectDirectory(path, fs)
|
|
601
|
+
};
|
|
602
|
+
} catch {
|
|
603
|
+
return unresolved("invalid");
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
async function readWorkflowIdentity(path, fs) {
|
|
607
|
+
try {
|
|
608
|
+
if (path.endsWith(".yaml") || path.endsWith(".yml"))
|
|
609
|
+
return await readYamlIdentity(path, fs);
|
|
610
|
+
const id = await readIdentityField(fs, path, PROJECT_ID_PATH);
|
|
611
|
+
return id ? { projectType: "Api" /* Api */, id, status: "resolved" } : unresolved("missing");
|
|
612
|
+
} catch {
|
|
613
|
+
return unresolved("invalid");
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
async function readYamlIdentity(path, fs) {
|
|
617
|
+
const stat = await fs.stat(path);
|
|
618
|
+
if (!stat)
|
|
619
|
+
return unresolved("missing");
|
|
620
|
+
if (!stat.isFile() || stat.size > 1024 * 1024)
|
|
621
|
+
return unresolved("invalid");
|
|
622
|
+
const { load } = await import("./js-yaml-0c4svjwq.js");
|
|
623
|
+
let value = load(await fs.readFile(path, "utf-8") ?? "");
|
|
624
|
+
for (const field of PROJECT_ID_PATH)
|
|
625
|
+
value = asRecord(value)?.[field];
|
|
626
|
+
if (value === undefined || value === null || value === "")
|
|
627
|
+
return unresolved("missing");
|
|
628
|
+
return typeof value === "string" && value.trim() ? {
|
|
629
|
+
projectType: "Api" /* Api */,
|
|
630
|
+
id: value,
|
|
631
|
+
status: "resolved"
|
|
632
|
+
} : unresolved("invalid");
|
|
633
|
+
}
|
|
634
|
+
|
|
518
635
|
// ../packager/packager-tool-apiworkflow/src/api-workflow-tool-factory.ts
|
|
519
|
-
class
|
|
636
|
+
class ApiWorkflowToolFactory2 {
|
|
637
|
+
readProjectIdentityAsync = readProjectIdentity2;
|
|
520
638
|
supportedTypes = ["Api" /* Api */];
|
|
521
639
|
async createAsync(logger, fileSystem) {
|
|
522
640
|
return new ApiWorkflowsTool(fileSystem, logger);
|
|
523
641
|
}
|
|
524
642
|
}
|
|
525
|
-
|
|
526
|
-
function registerPackagerFactories() {
|
|
527
|
-
toolsFactoryRepository.registerProjectToolFactory(new ApiWorkflowToolFactory);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
export { registerPackagerFactories };
|
|
643
|
+
export { readProjectIdentity2, ApiWorkflowToolFactory2 };
|
|
531
644
|
|
|
532
|
-
//# debugId=
|
|
645
|
+
//# debugId=98CBDBCD3FEB3F9564756E2164756E21
|