@uipath/automation-hub-tool 1.205.0-preview.281 → 1.206.0-preview.282
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 +47 -0
- package/dist/{index-wsq7vfwv.js → index-ad011b5g.js} +11 -13
- package/dist/{index-756a7akp.js → index-j4aw4dcc.js} +7 -3
- package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
- package/dist/{index-ts63xpzd.js → index-q995gmh7.js} +64 -66
- package/dist/index.js +7 -8
- package/dist/{jmespath-231m3hyn.js → jmespath-ab6tdc42.js} +1 -1
- package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/{tool-91b06sfp.js → tool-072fs6k5.js} +1825 -679
- package/dist/{tool-54dm13ns.js → tool-6zwek67c.js} +207 -3
- package/dist/{tool-1de529jm.js → tool-epsr41wx.js} +12 -3
- package/dist/tool.js +7 -8
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# @uipath/automation-hub-tool
|
|
2
|
+
|
|
3
|
+
`uip` tool for UiPath Automation Hub. It adds `uip ah`, which works with
|
|
4
|
+
automation ideas (submit, assess, move through phases and idea flows), their
|
|
5
|
+
documents, media, collaborators and business cases, the pipeline and the
|
|
6
|
+
Automation Store, the category and application taxonomy, and Automation Hub
|
|
7
|
+
users.
|
|
8
|
+
|
|
9
|
+
Full page: [docs/tools/automation-hub.md](../../docs/tools/automation-hub.md).
|
|
10
|
+
|
|
11
|
+
## Commands
|
|
12
|
+
|
|
13
|
+
| Group | Commands | Purpose |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| `automations` | `list`, `get`, `schema get`, `create`, `update`, `change-idea-flow` | Automation ideas and their assessment forms |
|
|
16
|
+
| `phases` | `set` | Move an automation to a phase and status |
|
|
17
|
+
| `idea-flows` | `list` | Idea flows and the statuses in each phase |
|
|
18
|
+
| `business-cases` | `get`, `set-baseline` | Cost-benefit analysis and project-plan baseline |
|
|
19
|
+
| `documents` | `list`, `create`, `download` | Documents attached to an automation |
|
|
20
|
+
| `media` | `create` | Upload an image or video to an automation |
|
|
21
|
+
| `collaborators` | `list`, `create`, `delete` | People and roles on an automation |
|
|
22
|
+
| `tags`, `categories` | `tags set`, `categories get`, `update`, `set` | Tags and the category tree |
|
|
23
|
+
| `applications`, `components` | `applications list`, `update`, `delete`, `components list` | Application inventory and components |
|
|
24
|
+
| `pipelines`, `store-listings`, `store-reviews` | `list` | The pipeline and the Automation Store |
|
|
25
|
+
| `questionnaires`, `roles` | `list` | Assessment questions and assignable roles |
|
|
26
|
+
| `users` | `list`, `create`, `update` | Automation Hub users |
|
|
27
|
+
| `audit-logs` | `list`, `download` | Weekly audit-log CSV bundles |
|
|
28
|
+
| `auth-info` | `get` | The tenant, the calling user and their roles |
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
uip ah auth-info get
|
|
34
|
+
uip ah automations list --search invoice --limit 10
|
|
35
|
+
uip ah automations schema get --source-type COE --destination ./idea.json
|
|
36
|
+
uip ah automations create --source-type COE --file ./idea.json --from-schema
|
|
37
|
+
uip ah idea-flows list
|
|
38
|
+
uip ah phases set <automation-id> --phase <phase> --status <status>
|
|
39
|
+
uip ah documents create <automation-id> --title "Process map" --description "TO-BE" --file ./order-to-cash.bpmn
|
|
40
|
+
uip ah users create --email <email>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Authentication
|
|
44
|
+
|
|
45
|
+
Run `uip login` first. The tenant must have Automation Hub enabled and
|
|
46
|
+
onboarded; otherwise commands fail with a `ConfigError`. Automation Hub answers
|
|
47
|
+
403, not 404, for a record you cannot see.
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catchError
|
|
3
|
-
} from "./tool-
|
|
3
|
+
} from "./tool-6zwek67c.js";
|
|
4
4
|
import {
|
|
5
|
-
__require,
|
|
6
5
|
__toESM
|
|
7
|
-
} from "./tool-
|
|
6
|
+
} from "./tool-epsr41wx.js";
|
|
7
|
+
|
|
8
|
+
// ../maestro-sdk/src/xml-escape.ts
|
|
9
|
+
function escapeXmlAttr(value) {
|
|
10
|
+
return value.replaceAll("&", "&").replaceAll('"', """).replaceAll("<", "<").replaceAll(">", ">");
|
|
11
|
+
}
|
|
8
12
|
|
|
9
13
|
// ../maestro-sdk/src/bpmn-layout/layout.ts
|
|
10
14
|
var BPMN_DI_NAMESPACES = {
|
|
@@ -58,9 +62,6 @@ var SUB_PROCESS_TYPES = new Set([
|
|
|
58
62
|
"bpmn:Transaction",
|
|
59
63
|
"bpmn:AdHocSubProcess"
|
|
60
64
|
]);
|
|
61
|
-
function escapeXmlAttr(value) {
|
|
62
|
-
return value.replaceAll("&", "&").replaceAll('"', """).replaceAll("<", "<").replaceAll(">", ">");
|
|
63
|
-
}
|
|
64
65
|
var ROOT_ELEMENT = /<((?:[A-Za-z_][\w.-]*:)?definitions)\b/;
|
|
65
66
|
function rootElementName(xml) {
|
|
66
67
|
return ROOT_ELEMENT.exec(maskComments(xml))?.[1] ?? null;
|
|
@@ -461,7 +462,7 @@ function isDrawableEdge({ src, tgt, type }, flowNodes, positions) {
|
|
|
461
462
|
return endpoints.has(src) && endpoints.has(tgt);
|
|
462
463
|
}
|
|
463
464
|
async function tidyDiagram(positions, nodes, flows, flowNodes) {
|
|
464
|
-
const { tidyUpNodes } = await import("./index-
|
|
465
|
+
const { tidyUpNodes } = await import("./index-j4aw4dcc.js").then((m)=>__toESM(m.default,1));
|
|
465
466
|
const attachments = boundaryPositions(positions, nodes);
|
|
466
467
|
const canvasNodes = [...positions].map(([id, box]) => {
|
|
467
468
|
const node = nodes.get(id);
|
|
@@ -588,7 +589,7 @@ ${diagrams.join(`
|
|
|
588
589
|
|
|
589
590
|
// ../maestro-sdk/src/bpmn-layout/parse.ts
|
|
590
591
|
async function parseBpmnXml(xml) {
|
|
591
|
-
const { default: BpmnModdle } = await import("./index-
|
|
592
|
+
const { default: BpmnModdle } = await import("./index-q995gmh7.js");
|
|
592
593
|
const moddle = new BpmnModdle;
|
|
593
594
|
const parsed = await moddle.fromXML(xml);
|
|
594
595
|
const root = parsed.rootElement;
|
|
@@ -635,10 +636,7 @@ async function applyBpmnLayout(xml) {
|
|
|
635
636
|
return layout;
|
|
636
637
|
}
|
|
637
638
|
export {
|
|
638
|
-
applyBpmnLayout
|
|
639
|
-
generateBpmnLayout,
|
|
640
|
-
parseBpmnProcesses,
|
|
641
|
-
parseBpmnXml
|
|
639
|
+
applyBpmnLayout
|
|
642
640
|
};
|
|
643
641
|
|
|
644
|
-
//# debugId=
|
|
642
|
+
//# debugId=2574F7BF0E34BAF764756E2164756E21
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__commonJS,
|
|
3
3
|
__require
|
|
4
|
-
} from "./tool-
|
|
4
|
+
} from "./tool-epsr41wx.js";
|
|
5
5
|
|
|
6
6
|
// ../../node_modules/@uipath/maestro-layout/dist/index.cjs
|
|
7
7
|
var require_dist = __commonJS(function(exports, module) {
|
|
@@ -116,7 +116,7 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
116
116
|
var ELK2 = exports4["default"] = function() {
|
|
117
117
|
function ELK3() {
|
|
118
118
|
var _this = this;
|
|
119
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, _ref$defaultLayoutOpt = _ref.defaultLayoutOptions, defaultLayoutOptions = _ref$defaultLayoutOpt === undefined ? {} : _ref$defaultLayoutOpt, _ref$algorithms = _ref.algorithms, algorithms = _ref$algorithms === undefined ? ["layered", "stress", "mrtree", "radial", "force", "disco", "sporeOverlap", "sporeCompaction", "rectpacking"] : _ref$algorithms,
|
|
119
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, _ref$defaultLayoutOpt = _ref.defaultLayoutOptions, defaultLayoutOptions = _ref$defaultLayoutOpt === undefined ? {} : _ref$defaultLayoutOpt, _ref$algorithms = _ref.algorithms, algorithms = _ref$algorithms === undefined ? ["layered", "stress", "mrtree", "radial", "force", "disco", "sporeOverlap", "sporeCompaction", "rectpacking"] : _ref$algorithms, { workerFactory, workerUrl } = _ref;
|
|
120
120
|
_classCallCheck(this, ELK3);
|
|
121
121
|
this.defaultLayoutOptions = defaultLayoutOptions;
|
|
122
122
|
this.initialized = false;
|
|
@@ -96161,6 +96161,8 @@ Consider installing the package or pass your own 'workerFactory' to ELK's constr
|
|
|
96161
96161
|
var isDiagramLayoutCollisionBlockingNode = (node) => {
|
|
96162
96162
|
return !node.id.startsWith(VIRTUAL_NODE_PREFIX) && (!node.type || !COLLISION_TRANSPARENT_NODE_TYPES.has(node.type));
|
|
96163
96163
|
};
|
|
96164
|
+
var SEGMENTED_EDGE_CONSTANTS = { GRID_SIZE: 10, HANDLE_MARGIN: 20 };
|
|
96165
|
+
var { GRID_SIZE, HANDLE_MARGIN } = SEGMENTED_EDGE_CONSTANTS;
|
|
96164
96166
|
function generateWaypointId() {
|
|
96165
96167
|
return `wp-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
96166
96168
|
}
|
|
@@ -96282,8 +96284,10 @@ Consider installing the package or pass your own 'workerFactory' to ELK's constr
|
|
|
96282
96284
|
var BASE_NAMESPACES = ["vars", "iterator", "metadata"];
|
|
96283
96285
|
var RESERVED_NAMESPACES = [...BASE_NAMESPACES, "bindings", "datafabric", "instanceglobals", "orchestrator", "outputs", "result", "runtime", "senderinfo", "this"];
|
|
96284
96286
|
var reservedNamespaces = new Set(RESERVED_NAMESPACES);
|
|
96287
|
+
var FILE_TYPE_JSON_SCHEMA = { $schema: "http://json-schema.org/draft-07/schema#", type: "object", properties: { ID: { type: "string", description: "Orchestrator attachment key" }, FullName: { type: "string", description: "File name" }, MimeType: { type: "string", description: "The MIME type of the content, such as application/json or image/png" }, Metadata: { type: "object", description: "Dictionary<string, string> of metadata", additionalProperties: { type: "string" } } }, required: ["ID"], "x-uipath-resource-kind": "JobAttachment" };
|
|
96285
96288
|
var JOB_ATTACHMENT_TYPE_NAME = "job-attachment";
|
|
96286
96289
|
var JOB_ATTACHMENT_REF = `#/definitions/${JOB_ATTACHMENT_TYPE_NAME}`;
|
|
96290
|
+
var { $schema: _fileSchemaHeader, ...FILE_ITEM_SCHEMA } = FILE_TYPE_JSON_SCHEMA;
|
|
96287
96291
|
var ITERATOR_PATTERN = /^iterator(?:\[(?:\d+|["'][^"']*["'])\])?/;
|
|
96288
96292
|
var ITERATOR_PREFIX_REGEX = new RegExp(`${ITERATOR_PATTERN.source}(?:\\.|$)`);
|
|
96289
96293
|
var ITERATOR_ITEM_REGEX = new RegExp(`${ITERATOR_PATTERN.source}\\.item$`);
|
|
@@ -97593,4 +97597,4 @@ Consider installing the package or pass your own 'workerFactory' to ELK's constr
|
|
|
97593
97597
|
});
|
|
97594
97598
|
export default require_dist();
|
|
97595
97599
|
|
|
97596
|
-
//# debugId=
|
|
97600
|
+
//# debugId=CACA0ED0483DDBD964756E2164756E21
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import"./tool-1de529jm.js";
|
|
2
|
-
|
|
3
1
|
// ../../node_modules/open/index.js
|
|
4
2
|
import process7 from "node:process";
|
|
5
3
|
import path from "node:path";
|
|
@@ -548,22 +546,6 @@ var open = (target, options) => {
|
|
|
548
546
|
target
|
|
549
547
|
});
|
|
550
548
|
};
|
|
551
|
-
var openApp = (name, options) => {
|
|
552
|
-
if (typeof name !== "string" && !Array.isArray(name)) {
|
|
553
|
-
throw new TypeError("Expected a valid `name`");
|
|
554
|
-
}
|
|
555
|
-
const { arguments: appArguments = [] } = options ?? {};
|
|
556
|
-
if (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {
|
|
557
|
-
throw new TypeError("Expected `appArguments` as Array type");
|
|
558
|
-
}
|
|
559
|
-
return baseOpen({
|
|
560
|
-
...options,
|
|
561
|
-
app: {
|
|
562
|
-
name,
|
|
563
|
-
arguments: appArguments
|
|
564
|
-
}
|
|
565
|
-
});
|
|
566
|
-
};
|
|
567
549
|
function detectArchBinary(binary) {
|
|
568
550
|
if (typeof binary === "string" || Array.isArray(binary)) {
|
|
569
551
|
return binary;
|
|
@@ -626,9 +608,7 @@ defineLazyProperty(apps, "safari", () => detectPlatformBinary({
|
|
|
626
608
|
}));
|
|
627
609
|
var open_default = open;
|
|
628
610
|
export {
|
|
629
|
-
|
|
630
|
-
open_default as default,
|
|
631
|
-
openApp
|
|
611
|
+
open_default as default
|
|
632
612
|
};
|
|
633
613
|
|
|
634
|
-
//# debugId=
|
|
614
|
+
//# debugId=6F288C058A3A412164756E2164756E21
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import"./tool-1de529jm.js";
|
|
2
|
-
|
|
3
1
|
// ../../node_modules/min-dash/dist/index.esm.js
|
|
4
2
|
var nativeToString = Object.prototype.toString;
|
|
5
3
|
var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -349,7 +347,7 @@ DescriptorBuilder.prototype.addTrait = function(t, inherited) {
|
|
|
349
347
|
Object.defineProperty(p, "definedBy", {
|
|
350
348
|
value: t
|
|
351
349
|
});
|
|
352
|
-
var
|
|
350
|
+
var replaces = p.replaces, redefines = p.redefines;
|
|
353
351
|
if (replaces || redefines) {
|
|
354
352
|
this.redefineProperty(p, replaces || redefines, replaces);
|
|
355
353
|
} else {
|
|
@@ -425,9 +423,9 @@ Registry.prototype.registerType = function(type, pkg) {
|
|
|
425
423
|
Registry.prototype.mapTypes = function(nsName, iterator, trait) {
|
|
426
424
|
var type = isBuiltIn(nsName.name) ? { name: nsName.name } : this.typeMap[nsName.name];
|
|
427
425
|
var self = this;
|
|
428
|
-
function traverse(cls,
|
|
426
|
+
function traverse(cls, trait) {
|
|
429
427
|
var parentNs = parseName(cls, isBuiltIn(cls) ? "" : nsName.prefix);
|
|
430
|
-
self.mapTypes(parentNs, iterator,
|
|
428
|
+
self.mapTypes(parentNs, iterator, trait);
|
|
431
429
|
}
|
|
432
430
|
function traverseTrait(cls) {
|
|
433
431
|
return traverse(cls, true);
|
|
@@ -808,56 +806,56 @@ function Parser(options) {
|
|
|
808
806
|
if (cachedAttrs !== null) {
|
|
809
807
|
return cachedAttrs;
|
|
810
808
|
}
|
|
811
|
-
var nsUri, nsUriPrefix, nsName, defaultAlias = isNamespace && nsMatrix["xmlns"], attrList = isNamespace && maybeNS ? [] : null,
|
|
809
|
+
var nsUri, nsUriPrefix, nsName, defaultAlias = isNamespace && nsMatrix["xmlns"], attrList = isNamespace && maybeNS ? [] : null, i = attrsStart, s = attrsString, l = s.length, hasNewMatrix, newalias, value, alias, name, attrs = {}, seenAttrs = {}, skipAttr, w, j;
|
|
812
810
|
parseAttr:
|
|
813
|
-
for (;
|
|
811
|
+
for (;i < l; i++) {
|
|
814
812
|
skipAttr = false;
|
|
815
|
-
|
|
816
|
-
if (
|
|
813
|
+
w = s.charCodeAt(i);
|
|
814
|
+
if (w === 32 || w < 14 && w > 8) {
|
|
817
815
|
continue;
|
|
818
816
|
}
|
|
819
|
-
if (
|
|
820
|
-
if (
|
|
817
|
+
if (w < 65 || w > 122 || w > 90 && w < 97) {
|
|
818
|
+
if (w !== 95 && w !== 58) {
|
|
821
819
|
handleWarning("illegal first char attribute name");
|
|
822
820
|
skipAttr = true;
|
|
823
821
|
}
|
|
824
822
|
}
|
|
825
|
-
for (
|
|
826
|
-
|
|
827
|
-
if (
|
|
823
|
+
for (j = i + 1;j < l; j++) {
|
|
824
|
+
w = s.charCodeAt(j);
|
|
825
|
+
if (w > 96 && w < 123 || w > 64 && w < 91 || w > 47 && w < 59 || w === 46 || w === 45 || w === 95) {
|
|
828
826
|
continue;
|
|
829
827
|
}
|
|
830
|
-
if (
|
|
828
|
+
if (w === 32 || w < 14 && w > 8) {
|
|
831
829
|
handleWarning("missing attribute value");
|
|
832
|
-
|
|
830
|
+
i = j;
|
|
833
831
|
continue parseAttr;
|
|
834
832
|
}
|
|
835
|
-
if (
|
|
833
|
+
if (w === 61) {
|
|
836
834
|
break;
|
|
837
835
|
}
|
|
838
836
|
handleWarning("illegal attribute name char");
|
|
839
837
|
skipAttr = true;
|
|
840
838
|
}
|
|
841
|
-
name = s.substring(
|
|
839
|
+
name = s.substring(i, j);
|
|
842
840
|
if (name === "xmlns:xmlns") {
|
|
843
841
|
handleWarning("illegal declaration of xmlns");
|
|
844
842
|
skipAttr = true;
|
|
845
843
|
}
|
|
846
|
-
|
|
847
|
-
if (
|
|
848
|
-
|
|
849
|
-
if (
|
|
850
|
-
|
|
851
|
-
if (
|
|
844
|
+
w = s.charCodeAt(j + 1);
|
|
845
|
+
if (w === 34) {
|
|
846
|
+
j = s.indexOf('"', i = j + 2);
|
|
847
|
+
if (j === -1) {
|
|
848
|
+
j = s.indexOf("'", i);
|
|
849
|
+
if (j !== -1) {
|
|
852
850
|
handleWarning("attribute value quote missmatch");
|
|
853
851
|
skipAttr = true;
|
|
854
852
|
}
|
|
855
853
|
}
|
|
856
|
-
} else if (
|
|
857
|
-
|
|
858
|
-
if (
|
|
859
|
-
|
|
860
|
-
if (
|
|
854
|
+
} else if (w === 39) {
|
|
855
|
+
j = s.indexOf("'", i = j + 2);
|
|
856
|
+
if (j === -1) {
|
|
857
|
+
j = s.indexOf('"', i);
|
|
858
|
+
if (j !== -1) {
|
|
861
859
|
handleWarning("attribute value quote missmatch");
|
|
862
860
|
skipAttr = true;
|
|
863
861
|
}
|
|
@@ -865,33 +863,33 @@ function Parser(options) {
|
|
|
865
863
|
} else {
|
|
866
864
|
handleWarning("missing attribute value quotes");
|
|
867
865
|
skipAttr = true;
|
|
868
|
-
for (
|
|
869
|
-
|
|
870
|
-
if (
|
|
866
|
+
for (j = j + 1;j < l; j++) {
|
|
867
|
+
w = s.charCodeAt(j + 1);
|
|
868
|
+
if (w === 32 || w < 14 && w > 8) {
|
|
871
869
|
break;
|
|
872
870
|
}
|
|
873
871
|
}
|
|
874
872
|
}
|
|
875
|
-
if (
|
|
873
|
+
if (j === -1) {
|
|
876
874
|
handleWarning("missing closing quotes");
|
|
877
|
-
|
|
875
|
+
j = l;
|
|
878
876
|
skipAttr = true;
|
|
879
877
|
}
|
|
880
878
|
if (!skipAttr) {
|
|
881
|
-
value = s.substring(
|
|
879
|
+
value = s.substring(i, j);
|
|
882
880
|
}
|
|
883
|
-
|
|
884
|
-
for (;
|
|
885
|
-
|
|
886
|
-
if (
|
|
881
|
+
i = j;
|
|
882
|
+
for (;j + 1 < l; j++) {
|
|
883
|
+
w = s.charCodeAt(j + 1);
|
|
884
|
+
if (w === 32 || w < 14 && w > 8) {
|
|
887
885
|
break;
|
|
888
886
|
}
|
|
889
|
-
if (
|
|
887
|
+
if (i === j) {
|
|
890
888
|
handleWarning("illegal character after attribute end");
|
|
891
889
|
skipAttr = true;
|
|
892
890
|
}
|
|
893
891
|
}
|
|
894
|
-
|
|
892
|
+
i = j + 1;
|
|
895
893
|
if (skipAttr) {
|
|
896
894
|
continue parseAttr;
|
|
897
895
|
}
|
|
@@ -938,29 +936,29 @@ function Parser(options) {
|
|
|
938
936
|
attrList.push(name, value);
|
|
939
937
|
continue;
|
|
940
938
|
}
|
|
941
|
-
|
|
942
|
-
if (
|
|
939
|
+
w = name.indexOf(":");
|
|
940
|
+
if (w === -1) {
|
|
943
941
|
attrs[name] = value;
|
|
944
942
|
continue;
|
|
945
943
|
}
|
|
946
|
-
if (!(nsName = nsMatrix[name.substring(0,
|
|
947
|
-
handleWarning(missingNamespaceForPrefix(name.substring(0,
|
|
944
|
+
if (!(nsName = nsMatrix[name.substring(0, w)])) {
|
|
945
|
+
handleWarning(missingNamespaceForPrefix(name.substring(0, w)));
|
|
948
946
|
continue;
|
|
949
947
|
}
|
|
950
|
-
name = defaultAlias === nsName ? name.substr(
|
|
948
|
+
name = defaultAlias === nsName ? name.substr(w + 1) : nsName + name.substr(w);
|
|
951
949
|
attrs[name] = value;
|
|
952
950
|
}
|
|
953
951
|
if (maybeNS) {
|
|
954
|
-
for (
|
|
955
|
-
name = attrList[
|
|
956
|
-
value = attrList[
|
|
957
|
-
|
|
958
|
-
if (
|
|
959
|
-
if (!(nsName = nsMatrix[name.substring(0,
|
|
960
|
-
handleWarning(missingNamespaceForPrefix(name.substring(0,
|
|
952
|
+
for (i = 0, l = attrList.length;i < l; i++) {
|
|
953
|
+
name = attrList[i++];
|
|
954
|
+
value = attrList[i];
|
|
955
|
+
w = name.indexOf(":");
|
|
956
|
+
if (w !== -1) {
|
|
957
|
+
if (!(nsName = nsMatrix[name.substring(0, w)])) {
|
|
958
|
+
handleWarning(missingNamespaceForPrefix(name.substring(0, w)));
|
|
961
959
|
continue;
|
|
962
960
|
}
|
|
963
|
-
name = defaultAlias === nsName ? name.substr(
|
|
961
|
+
name = defaultAlias === nsName ? name.substr(w + 1) : nsName + name.substr(w);
|
|
964
962
|
}
|
|
965
963
|
attrs[name] = value;
|
|
966
964
|
}
|
|
@@ -1593,7 +1591,7 @@ Reader.prototype.fromXML = function(xml, options, done) {
|
|
|
1593
1591
|
var context = new Context(assign({}, options, { rootHandler })), parser = new Parser({ proxy: true }), stack = createStack();
|
|
1594
1592
|
rootHandler.context = context;
|
|
1595
1593
|
stack.push(rootHandler);
|
|
1596
|
-
function handleError(err, getContext,
|
|
1594
|
+
function handleError(err, getContext, lax) {
|
|
1597
1595
|
var ctx = getContext();
|
|
1598
1596
|
var { line, column, data } = ctx;
|
|
1599
1597
|
if (data.charAt(0) === "<" && data.indexOf(" ") !== -1) {
|
|
@@ -1603,7 +1601,7 @@ Reader.prototype.fromXML = function(xml, options, done) {
|
|
|
1603
1601
|
` + "line: " + line + `
|
|
1604
1602
|
` + "column: " + column + `
|
|
1605
1603
|
` + "nested error: " + err.message;
|
|
1606
|
-
if (
|
|
1604
|
+
if (lax) {
|
|
1607
1605
|
context.addWarning({
|
|
1608
1606
|
message,
|
|
1609
1607
|
error: err
|
|
@@ -1689,9 +1687,9 @@ Reader.prototype.fromXML = function(xml, options, done) {
|
|
|
1689
1687
|
}
|
|
1690
1688
|
handleCData(text, getContext);
|
|
1691
1689
|
}
|
|
1692
|
-
var uriMap = model.getPackages().reduce(function(
|
|
1693
|
-
|
|
1694
|
-
return
|
|
1690
|
+
var uriMap = model.getPackages().reduce(function(uriMap, p) {
|
|
1691
|
+
uriMap[p.uri] = p.prefix;
|
|
1692
|
+
return uriMap;
|
|
1695
1693
|
}, Object.entries(DEFAULT_NS_MAP).reduce(function(map, [prefix, url]) {
|
|
1696
1694
|
map[url] = prefix;
|
|
1697
1695
|
return map;
|
|
@@ -1710,8 +1708,8 @@ Reader.prototype.fromXML = function(xml, options, done) {
|
|
|
1710
1708
|
ns: obj.ns
|
|
1711
1709
|
};
|
|
1712
1710
|
handleOpen(node, getContext);
|
|
1713
|
-
}).on("question", handleQuestion).on("closeTag", handleClose).on("cdata", handleCData).on("text", function(text,
|
|
1714
|
-
handleText(
|
|
1711
|
+
}).on("question", handleQuestion).on("closeTag", handleClose).on("cdata", handleCData).on("text", function(text, decodeEntities, getContext) {
|
|
1712
|
+
handleText(decodeEntities(text), getContext);
|
|
1715
1713
|
}).on("error", handleError).on("warn", handleWarning);
|
|
1716
1714
|
return new Promise(function(resolve, reject) {
|
|
1717
1715
|
var err;
|
|
@@ -1803,8 +1801,8 @@ Namespaces.prototype.logUsed = function(ns) {
|
|
|
1803
1801
|
};
|
|
1804
1802
|
Namespaces.prototype.getUsed = function(ns) {
|
|
1805
1803
|
var allNs = [].concat(this.wellknown, this.custom);
|
|
1806
|
-
return allNs.filter((
|
|
1807
|
-
var nsKey = this.getNSKey(
|
|
1804
|
+
return allNs.filter((ns) => {
|
|
1805
|
+
var nsKey = this.getNSKey(ns);
|
|
1808
1806
|
return this.used[nsKey];
|
|
1809
1807
|
});
|
|
1810
1808
|
};
|
|
@@ -2064,7 +2062,7 @@ ElementSerializer.prototype.parseGenericAttributes = function(element, attribute
|
|
|
2064
2062
|
ElementSerializer.prototype.parseContainments = function(properties) {
|
|
2065
2063
|
var self = this, body = this.body, element = this.element;
|
|
2066
2064
|
forEach(properties, function(p) {
|
|
2067
|
-
var value = element.get(p.name),
|
|
2065
|
+
var value = element.get(p.name), { isReference, isMany } = p;
|
|
2068
2066
|
if (!isMany) {
|
|
2069
2067
|
value = [value];
|
|
2070
2068
|
}
|
|
@@ -2120,7 +2118,7 @@ ElementSerializer.prototype.logNamespace = function(ns, wellknown, local) {
|
|
|
2120
2118
|
};
|
|
2121
2119
|
ElementSerializer.prototype.logNamespaceUsed = function(ns, local) {
|
|
2122
2120
|
var namespaces = this.getNamespaces(local);
|
|
2123
|
-
var
|
|
2121
|
+
var prefix = ns.prefix, uri = ns.uri, newPrefix, idx, wellknownUri;
|
|
2124
2122
|
if (!prefix && !uri) {
|
|
2125
2123
|
return { localName: ns.localName };
|
|
2126
2124
|
}
|
|
@@ -5966,4 +5964,4 @@ export {
|
|
|
5966
5964
|
SimpleBpmnModdle as default
|
|
5967
5965
|
};
|
|
5968
5966
|
|
|
5969
|
-
//# debugId=
|
|
5967
|
+
//# debugId=B7F101BB35BF8E7C64756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
Command,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "./tool-
|
|
7
|
-
import"./tool-
|
|
8
|
-
import"./tool-1de529jm.js";
|
|
4
|
+
metadata2,
|
|
5
|
+
registerCommands2
|
|
6
|
+
} from "./tool-072fs6k5.js";
|
|
7
|
+
import"./tool-6zwek67c.js";
|
|
9
8
|
|
|
10
9
|
// src/index.ts
|
|
11
10
|
var program = new Command;
|
|
12
|
-
program.name(
|
|
13
|
-
await
|
|
11
|
+
program.name(metadata2.commandPrefix).description(metadata2.description).version(metadata2.version);
|
|
12
|
+
await registerCommands2(program);
|
|
14
13
|
program.parse(process.argv);
|
|
15
14
|
|
|
16
|
-
//# debugId=
|
|
15
|
+
//# debugId=8B4255F59F25075764756E2164756E21
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import"./tool-1de529jm.js";
|
|
2
|
-
|
|
3
1
|
// ../../node_modules/js-yaml/dist/js-yaml.mjs
|
|
4
2
|
function getDefaultExportFromCjs(x) {
|
|
5
3
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
@@ -3150,4 +3148,4 @@ export {
|
|
|
3150
3148
|
types
|
|
3151
3149
|
};
|
|
3152
3150
|
|
|
3153
|
-
//# debugId=
|
|
3151
|
+
//# debugId=41DC6971B94BC54964756E2164756E21
|