@uipath/case-tool 1.201.0 → 1.202.0-preview.136
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/{authoring-aaaqwck3.js → authoring-cvjhkfxp.js} +74 -48
- package/dist/{browser-strategy-rkcvc6tn.js → browser-strategy-6atc7v8s.js} +3 -3
- package/dist/case-api-bwcxsbxe.js +381 -0
- package/dist/case-debug-studio-web-service-qcb328bt.js +335 -0
- package/dist/{case-pack-service-bxas5bxz.js → case-pack-service-txby2znw.js} +11 -18
- package/dist/case-validate-service-0q8krj2a.js +2114 -0
- package/dist/connector-enrichment-service-agqxam5y.js +60 -0
- package/dist/connector-lookup-service-ycgk77n0.js +22 -0
- package/dist/connector-task-spec-kdx5bv87.js +1250 -0
- package/dist/{de-5KVP66U6-t37qr521.js → de-5KVP66U6-1bnf4zt5.js} +54 -54
- package/dist/{de-5HU6GFWV-zheyw6d2.js → de-7XQXX2DK-tqdy5n2b.js} +857 -845
- package/dist/debug-service-dxx5pfev.js +57 -0
- package/dist/{en-MABQK6C4-nkzq2j8t.js → en-5ZGC5VQ3-h581y30k.js} +897 -897
- package/dist/{en-4KXU7N7B-24v330b5.js → en-X3S6IZ5J-nhkg6pwn.js} +55 -61
- package/dist/enrichment-service-ebz1f4ds.js +421 -0
- package/dist/{es-MX-POESXYP2-9538722k.js → es-MX-U2VN3SZW-anynsmd8.js} +857 -845
- package/dist/{es-MX-XAVLOQW3-47a405kf.js → es-MX-XAVLOQW3-q00km2y7.js} +54 -54
- package/dist/{es-VFPNVMP5-6sftsdxe.js → es-VFPNVMP5-bx2c337j.js} +54 -54
- package/dist/{es-LUTYN7U7-ye5zn4sn.js → es-ZGCPPOME-8gazspjj.js} +857 -845
- package/dist/{fr-E5MDO4EG-f3x1jeqw.js → fr-E5MDO4EG-c3mkty2t.js} +54 -54
- package/dist/{fr-LJIK56LW-xf3xf2kh.js → fr-T3G5GZCT-y3f7xb1q.js} +857 -845
- package/dist/{index-cncq089f.js → index-7s201ka0.js} +163 -80
- package/dist/{index-hsadteg4.js → index-h8cph72k.js} +4 -4
- package/dist/index-k4xz16db.js +63712 -0
- package/dist/{index-p50kx6jv.js → index-k5tbd184.js} +276 -276
- package/dist/index-kwxe1vep.js +143 -0
- package/dist/{index-9f8q2ege.js → index-p3vk57z7.js} +27 -27
- package/dist/index-qyf1dee9.js +630 -0
- package/dist/index.js +16 -17
- package/dist/{index.umd.min-drpc57vn.js → index.umd.min-fqefd9kn.js} +3 -3
- package/dist/input-reader-xb9vecxv.js +11 -0
- package/dist/{ja-FGEGLBJ3-w9byjhze.js → ja-BI5K3JDZ-77zat4z2.js} +857 -845
- package/dist/{ja-DPO5PPLO-fmbg7zt2.js → ja-DPO5PPLO-mysfmznx.js} +54 -54
- package/dist/{js-yaml-cggj6w7q.js → js-yaml-87cdx6bm.js} +27 -19
- package/dist/known-types-qryebm95.js +15 -0
- package/dist/{ko-ITOPNIYI-aqy82jk8.js → ko-ITOPNIYI-hmxd2asd.js} +54 -54
- package/dist/{ko-TUAK3G3A-s25w0ckg.js → ko-JOBF5V7N-4bv0mjje.js} +857 -845
- package/dist/{node-strategy-8gzp67xs.js → node-strategy-0267x5e5.js} +130 -14
- package/dist/node-sync-service-9a9ksj9s.js +38 -0
- package/dist/{packager-tool-9qecd4wb.js → packager-tool-0gctz400.js} +5 -2
- package/dist/packager-tool-0mj06yen.js +65 -0
- package/dist/{packager-tool-1cb0d5e0.js → packager-tool-0v3s8r01.js} +2 -2
- package/dist/packager-tool-134mvmcm.js +3040 -0
- package/dist/{packager-tool-wckvcay0.js → packager-tool-1yh8g550.js} +9 -7
- package/dist/{packager-tool-zqa5k9f7.js → packager-tool-37zvccmt.js} +990 -2287
- package/dist/packager-tool-3ze5vt52.js +54 -0
- package/dist/{packager-tool-w3h8xrnv.js → packager-tool-56j6keqr.js} +71 -3
- package/dist/{packager-tool-3wygxefb.js → packager-tool-58q3tvh7.js} +10 -10
- package/dist/{packager-tool-zx48pq4v.js → packager-tool-5ax2ywcg.js} +1997 -1174
- package/dist/{packager-tool-we1phz71.js → packager-tool-885mmrvr.js} +31 -3
- package/dist/packager-tool-9scn4b15.js +852 -0
- package/dist/{packager-tool-p9j43p8h.js → packager-tool-a42jnpy5.js} +3 -9
- package/dist/packager-tool-ajvse9r3.js +356 -0
- package/dist/{packager-tool-jysvpt8p.js → packager-tool-c23zrhj8.js} +2 -2
- package/dist/packager-tool-dqs5qy9s.js +2327 -0
- package/dist/packager-tool-ee5dhff3.js +6717 -0
- package/dist/{packager-tool-wvqz81mx.js → packager-tool-gtzs471w.js} +3 -2
- package/dist/packager-tool-hrr0efqc.js +546 -0
- package/dist/packager-tool-j9rfdrdm.js +1125 -0
- package/dist/{packager-tool-gq6952nc.js → packager-tool-jhdf8gt1.js} +5054 -17851
- package/dist/packager-tool-mp59jtpm.js +6865 -0
- package/dist/packager-tool-njzcfve1.js +77 -0
- package/dist/packager-tool-p7jgrm5r.js +15 -0
- package/dist/packager-tool-r84ng21s.js +57 -0
- package/dist/packager-tool-rqvr63x5.js +1217 -0
- package/dist/packager-tool-s12392rd.js +80 -0
- package/dist/packager-tool-sv0d6wb6.js +173 -0
- package/dist/packager-tool-ty1t2byf.js +27 -0
- package/dist/packager-tool-vepqrsse.js +23 -0
- package/dist/packager-tool-w5ek334f.js +4892 -0
- package/dist/{packager-tool-5arsyj36.js → packager-tool-yc4kw997.js} +4 -2
- package/dist/packager-tool.js +91 -5
- package/dist/project-artifacts-vhanbtw5.js +14 -0
- package/dist/{pt-BR-7XGDXRDJ-espnkgrj.js → pt-BR-7DYX2YPT-fqxqzqtf.js} +857 -845
- package/dist/{pt-BR-BXURWX4W-xzyndmrx.js → pt-BR-BXURWX4W-bwfcwhk1.js} +54 -54
- package/dist/{pt-TMVOOITK-myha14p9.js → pt-HTXGGX6Y-97t21dty.js} +857 -845
- package/dist/{pt-YI4VE4YQ-521681zf.js → pt-YI4VE4YQ-wdkn2dcf.js} +54 -54
- package/dist/resourcesSyncService-mrmmwaqr.js +683 -0
- package/dist/{ro-2VALF3S5-cdz5afkr.js → ro-KTNQ3MNU-y08n1x5g.js} +857 -845
- package/dist/{ro-RKXZUG7Z-pdztdafr.js → ro-RKXZUG7Z-nndrrsq7.js} +54 -54
- package/dist/{ru-GSCT4ARZ-qj8dm4dp.js → ru-GSCT4ARZ-1sa9wbr8.js} +1 -1
- package/dist/ru-WBLQ5B2U-8r3c7v6d.js +10 -0
- package/dist/strict-case-rules-303vjvas.js +377 -0
- package/dist/strict-sdd-audit-qdmc9e1y.js +1024 -0
- package/dist/tool.js +17 -18
- package/dist/{tr-AA6O2WSR-bj9n80k8.js → tr-AA6O2WSR-86ba4bdf.js} +54 -54
- package/dist/{tr-RIFCEXFH-hgkb4g8y.js → tr-XHSSPNK7-cmqyc4wd.js} +857 -845
- package/dist/trigger-enrichment-service-zdx4x92j.js +340 -0
- package/dist/{zh-CN-IP3FMXWM-1cfarhcp.js → zh-CN-2EHQT23P-mr63c4xz.js} +857 -845
- package/dist/{zh-CN-R2KLHXQV-x6gnk2n0.js → zh-CN-R2KLHXQV-agqr45ds.js} +54 -54
- package/dist/{zh-TW-AGIDXIPF-n6r6w7vy.js → zh-TW-MGZCE5BT-c4ekmrz9.js} +857 -845
- package/dist/{zh-TW-RJGCQANM-tt8j5wv2.js → zh-TW-RJGCQANM-w0x3qc1p.js} +54 -54
- package/package.json +2 -2
- package/dist/index-8bsngk9y.js +0 -247140
- package/dist/packager-tool-axcdppp9.js +0 -13607
- package/dist/ru-WBLQ5B2U-8xd4gpv2.js +0 -10
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
catchError,
|
|
3
|
+
hashContent,
|
|
4
|
+
logger
|
|
5
|
+
} from "./packager-tool-5ax2ywcg.js";
|
|
6
|
+
import {
|
|
7
|
+
getFileSystem
|
|
8
|
+
} from "./packager-tool-0v3s8r01.js";
|
|
9
|
+
|
|
10
|
+
// src/utils/resourcesStorage.ts
|
|
11
|
+
async function resolveResourcesStorageDir() {
|
|
12
|
+
const fs = getFileSystem();
|
|
13
|
+
return fs.path.join(fs.env.homedir(), ".uip", "case-resources");
|
|
14
|
+
}
|
|
15
|
+
async function saveResourceIndex(resources, resourceType) {
|
|
16
|
+
const fs = getFileSystem();
|
|
17
|
+
const dir = await resolveResourcesStorageDir();
|
|
18
|
+
await fs.mkdir(dir);
|
|
19
|
+
const indexPath = fs.path.join(dir, `${resourceType}-index.json`);
|
|
20
|
+
const content = JSON.stringify(resources, null, 2);
|
|
21
|
+
await fs.writeFile(indexPath, content);
|
|
22
|
+
logger.debug(`Saved ${resources.length} ${resourceType} resources to index. Updating metadata...`);
|
|
23
|
+
const hash = await hashContent(content);
|
|
24
|
+
await saveIndexMetadata({
|
|
25
|
+
lastSync: Date.now(),
|
|
26
|
+
count: resources.length,
|
|
27
|
+
hash
|
|
28
|
+
}, resourceType);
|
|
29
|
+
return resources.length;
|
|
30
|
+
}
|
|
31
|
+
async function loadResourceIndex(resourceType) {
|
|
32
|
+
const fs = getFileSystem();
|
|
33
|
+
const dir = await resolveResourcesStorageDir();
|
|
34
|
+
const indexPath = fs.path.join(dir, `${resourceType}-index.json`);
|
|
35
|
+
if (!await fs.exists(indexPath)) {
|
|
36
|
+
throw new Error("No resource index found. Please run 'uip maestro case registry pull' to sync resources first.");
|
|
37
|
+
}
|
|
38
|
+
const [readError, content] = await catchError(fs.readFile(indexPath, "utf-8"));
|
|
39
|
+
if (readError) {
|
|
40
|
+
throw new Error(`Failed to load resource index: ${readError instanceof Error ? readError.message : String(readError)}`);
|
|
41
|
+
}
|
|
42
|
+
if (content === null || content.trim() === "") {
|
|
43
|
+
throw new Error("No resource index found. Please run 'uip maestro case registry pull' to sync resources first.");
|
|
44
|
+
}
|
|
45
|
+
const [parseError, parsed] = await catchError(Promise.resolve().then(() => JSON.parse(content)));
|
|
46
|
+
if (parseError) {
|
|
47
|
+
throw new Error("No resource index found. Please run 'uip maestro case registry pull' to sync resources first.");
|
|
48
|
+
}
|
|
49
|
+
return parsed;
|
|
50
|
+
}
|
|
51
|
+
async function saveIndexMetadata(metadata, resourceType) {
|
|
52
|
+
const fs = getFileSystem();
|
|
53
|
+
const dir = await resolveResourcesStorageDir();
|
|
54
|
+
await fs.mkdir(dir);
|
|
55
|
+
const metaPath = fs.path.join(dir, `${resourceType}-index.meta.json`);
|
|
56
|
+
await fs.writeFile(metaPath, JSON.stringify(metadata, null, 2));
|
|
57
|
+
}
|
|
58
|
+
async function loadIndexMetadata(resourceType) {
|
|
59
|
+
const fs = getFileSystem();
|
|
60
|
+
const dir = await resolveResourcesStorageDir();
|
|
61
|
+
const metaPath = fs.path.join(dir, `${resourceType}-index.meta.json`);
|
|
62
|
+
if (!await fs.exists(metaPath)) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
const [error, metadata] = await catchError((async () => {
|
|
66
|
+
const content = await fs.readFile(metaPath, "utf-8");
|
|
67
|
+
if (content === null) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return JSON.parse(content);
|
|
71
|
+
})());
|
|
72
|
+
if (error) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
return metadata;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { saveResourceIndex, loadResourceIndex, saveIndexMetadata, loadIndexMetadata };
|
|
79
|
+
|
|
80
|
+
//# debugId=5B29295616C3417264756E2164756E21
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
// src/utils/schema-helpers.ts
|
|
2
|
+
var VALID_TASK_ENTRY_RULE_TYPES = [
|
|
3
|
+
"current-stage-entered",
|
|
4
|
+
"selected-tasks-completed",
|
|
5
|
+
"wait-for-connector",
|
|
6
|
+
"adhoc",
|
|
7
|
+
"runs-sequentially"
|
|
8
|
+
];
|
|
9
|
+
var VALID_STAGE_ENTRY_RULE_TYPES = [
|
|
10
|
+
"case-entered",
|
|
11
|
+
"selected-stage-exited",
|
|
12
|
+
"selected-stage-completed",
|
|
13
|
+
"wait-for-connector",
|
|
14
|
+
"user-selected-stage"
|
|
15
|
+
];
|
|
16
|
+
var VALID_STAGE_COMPLETION_RULE_TYPES = [
|
|
17
|
+
"required-tasks-completed",
|
|
18
|
+
"wait-for-connector"
|
|
19
|
+
];
|
|
20
|
+
var VALID_STAGE_EXIT_RULE_TYPES = [
|
|
21
|
+
"selected-tasks-completed",
|
|
22
|
+
"wait-for-connector"
|
|
23
|
+
];
|
|
24
|
+
var VALID_CASE_COMPLETION_RULE_TYPES = [
|
|
25
|
+
"required-stages-completed",
|
|
26
|
+
"wait-for-connector"
|
|
27
|
+
];
|
|
28
|
+
var VALID_CASE_EXIT_RULE_TYPES = [
|
|
29
|
+
"selected-stage-completed",
|
|
30
|
+
"selected-stage-exited",
|
|
31
|
+
"wait-for-connector"
|
|
32
|
+
];
|
|
33
|
+
function buildRule(options) {
|
|
34
|
+
const {
|
|
35
|
+
id,
|
|
36
|
+
ruleType,
|
|
37
|
+
conditionExpression,
|
|
38
|
+
selectedStageId,
|
|
39
|
+
selectedTasksIds
|
|
40
|
+
} = options;
|
|
41
|
+
switch (ruleType) {
|
|
42
|
+
case "wait-for-connector":
|
|
43
|
+
return { rule: "wait-for-connector", id, conditionExpression };
|
|
44
|
+
case "case-entered":
|
|
45
|
+
return { rule: "case-entered", id, conditionExpression };
|
|
46
|
+
case "selected-stage-completed":
|
|
47
|
+
return {
|
|
48
|
+
rule: "selected-stage-completed",
|
|
49
|
+
id,
|
|
50
|
+
selectedStageId,
|
|
51
|
+
conditionExpression
|
|
52
|
+
};
|
|
53
|
+
case "selected-stage-exited":
|
|
54
|
+
return {
|
|
55
|
+
rule: "selected-stage-exited",
|
|
56
|
+
id,
|
|
57
|
+
selectedStageId,
|
|
58
|
+
conditionExpression
|
|
59
|
+
};
|
|
60
|
+
case "selected-tasks-completed":
|
|
61
|
+
return {
|
|
62
|
+
rule: "selected-tasks-completed",
|
|
63
|
+
id,
|
|
64
|
+
selectedTasksIds,
|
|
65
|
+
conditionExpression
|
|
66
|
+
};
|
|
67
|
+
case "current-stage-entered":
|
|
68
|
+
return { rule: "current-stage-entered", id, conditionExpression };
|
|
69
|
+
case "adhoc":
|
|
70
|
+
return { rule: "adhoc", id, conditionExpression };
|
|
71
|
+
case "required-stages-completed":
|
|
72
|
+
return {
|
|
73
|
+
rule: "required-stages-completed",
|
|
74
|
+
id,
|
|
75
|
+
conditionExpression
|
|
76
|
+
};
|
|
77
|
+
case "required-tasks-completed":
|
|
78
|
+
return {
|
|
79
|
+
rule: "required-tasks-completed",
|
|
80
|
+
id,
|
|
81
|
+
conditionExpression
|
|
82
|
+
};
|
|
83
|
+
case "user-selected-stage":
|
|
84
|
+
return { rule: "user-selected-stage", id, conditionExpression };
|
|
85
|
+
case "runs-sequentially":
|
|
86
|
+
return { rule: "runs-sequentially", id, conditionExpression };
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function isStageNode(node) {
|
|
90
|
+
return node.type === "case-management:Stage" || node.type === "case-management:ExceptionStage";
|
|
91
|
+
}
|
|
92
|
+
function requireStageNode(schema, stageId) {
|
|
93
|
+
const node = schema.nodes.find((n) => n.id === stageId);
|
|
94
|
+
if (!node) {
|
|
95
|
+
throw new Error(`Stage not found with id: ${stageId}`);
|
|
96
|
+
}
|
|
97
|
+
if (!isStageNode(node)) {
|
|
98
|
+
throw new Error(`Node ${stageId} is not a stage (type: ${node.type})`);
|
|
99
|
+
}
|
|
100
|
+
return node;
|
|
101
|
+
}
|
|
102
|
+
function findTask(tasks, taskId) {
|
|
103
|
+
for (let lane = 0;lane < tasks.length; lane++) {
|
|
104
|
+
const index = tasks[lane].findIndex((t) => t.id === taskId);
|
|
105
|
+
if (index !== -1) {
|
|
106
|
+
return { task: tasks[lane][index], lane, index };
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
function requireTask(tasks, taskId, stageId) {
|
|
112
|
+
const found = findTask(tasks, taskId);
|
|
113
|
+
if (!found) {
|
|
114
|
+
throw new Error(`Task not found with id: ${taskId} in stage: ${stageId}`);
|
|
115
|
+
}
|
|
116
|
+
return found;
|
|
117
|
+
}
|
|
118
|
+
var DEFAULT_TRIGGER_ID = "trigger_1";
|
|
119
|
+
var DEFAULT_TRIGGER_LABEL = "Trigger 1";
|
|
120
|
+
function isTriggerNode(node) {
|
|
121
|
+
return node.type === "case-management:Trigger";
|
|
122
|
+
}
|
|
123
|
+
function isAnyTriggerNode(node) {
|
|
124
|
+
return isTriggerNode(node) || node.type === "uipath.case.trigger";
|
|
125
|
+
}
|
|
126
|
+
function findTriggerNodes(schema) {
|
|
127
|
+
return schema.nodes.filter(isTriggerNode);
|
|
128
|
+
}
|
|
129
|
+
function ensureRootBindings(schema) {
|
|
130
|
+
schema.bindings ??= [];
|
|
131
|
+
schema.variables ??= { inputOutputs: [] };
|
|
132
|
+
return schema;
|
|
133
|
+
}
|
|
134
|
+
function findOrPushBinding(schema, binding) {
|
|
135
|
+
ensureRootBindings(schema);
|
|
136
|
+
const bindings = schema.bindings;
|
|
137
|
+
if (!bindings) {
|
|
138
|
+
throw new Error("Bindings array missing after ensureRootBindings");
|
|
139
|
+
}
|
|
140
|
+
const existing = bindings.find((b) => b.propertyAttribute === binding.propertyAttribute && b.resource === binding.resource && b.resourceKey === binding.resourceKey && b.default === binding.default);
|
|
141
|
+
if (existing)
|
|
142
|
+
return existing;
|
|
143
|
+
bindings.push(binding);
|
|
144
|
+
return binding;
|
|
145
|
+
}
|
|
146
|
+
function remapBindingRefs(value, idRemap) {
|
|
147
|
+
if (idRemap.size === 0)
|
|
148
|
+
return value;
|
|
149
|
+
if (Array.isArray(value)) {
|
|
150
|
+
for (let i = 0;i < value.length; i++) {
|
|
151
|
+
value[i] = remapBindingRefs(value[i], idRemap);
|
|
152
|
+
}
|
|
153
|
+
return value;
|
|
154
|
+
}
|
|
155
|
+
if (value && typeof value === "object") {
|
|
156
|
+
const obj = value;
|
|
157
|
+
for (const key of Object.keys(obj)) {
|
|
158
|
+
obj[key] = remapBindingRefs(obj[key], idRemap);
|
|
159
|
+
}
|
|
160
|
+
return obj;
|
|
161
|
+
}
|
|
162
|
+
if (typeof value === "string") {
|
|
163
|
+
for (const [from, to] of idRemap) {
|
|
164
|
+
if (value === `=bindings.${from}`)
|
|
165
|
+
return `=bindings.${to}`;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return value;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export { VALID_TASK_ENTRY_RULE_TYPES, VALID_STAGE_ENTRY_RULE_TYPES, VALID_STAGE_COMPLETION_RULE_TYPES, VALID_STAGE_EXIT_RULE_TYPES, VALID_CASE_COMPLETION_RULE_TYPES, VALID_CASE_EXIT_RULE_TYPES, buildRule, isStageNode, requireStageNode, requireTask, DEFAULT_TRIGGER_ID, DEFAULT_TRIGGER_LABEL, isAnyTriggerNode, findTriggerNodes, ensureRootBindings, findOrPushBinding, remapBindingRefs };
|
|
172
|
+
|
|
173
|
+
//# debugId=6BD6876D991554EF64756E2164756E21
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// src/services/strict-connector-context.ts
|
|
2
|
+
var REQUIRED_CONNECTOR_CONTEXT_KEYS = [
|
|
3
|
+
"connectorKey",
|
|
4
|
+
"connection",
|
|
5
|
+
"resourceKey",
|
|
6
|
+
"folderKey",
|
|
7
|
+
"objectName",
|
|
8
|
+
"operation",
|
|
9
|
+
"metadata"
|
|
10
|
+
];
|
|
11
|
+
var asRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : undefined;
|
|
12
|
+
var contextEntries = (context) => (Array.isArray(context) ? context : []).map((entry) => asRecord(entry)).filter((entry) => entry !== undefined);
|
|
13
|
+
var contextEntry = (context, name) => contextEntries(context).find((entry) => entry.name === name);
|
|
14
|
+
var missingContextKeys = (context) => {
|
|
15
|
+
const present = new Set(contextEntries(context).map((entry) => entry.name).filter((name) => typeof name === "string"));
|
|
16
|
+
return REQUIRED_CONNECTOR_CONTEXT_KEYS.filter((key) => !present.has(key));
|
|
17
|
+
};
|
|
18
|
+
var readActivityTypeId = (context) => {
|
|
19
|
+
const metadata = contextEntry(context, "metadata");
|
|
20
|
+
const configuration = asRecord(asRecord(metadata?.body)?.activityPropertyConfiguration);
|
|
21
|
+
const activityTypeId = configuration?.UiPathActivityTypeId;
|
|
22
|
+
return typeof activityTypeId === "string" && activityTypeId.trim() !== "" ? activityTypeId : undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { contextEntry, missingContextKeys, readActivityTypeId };
|
|
26
|
+
|
|
27
|
+
//# debugId=05A016EFC31CA34E64756E2164756E21
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// ../maestro-sdk/src/shared-utils.ts
|
|
2
|
+
var VALID_PROJECT_NAME_REGEX = /^[a-zA-Z0-9_-]+$/;
|
|
3
|
+
var VALID_PACKAGE_NAME_REGEX = /^[a-zA-Z0-9._-]+$/;
|
|
4
|
+
function formatTraceStatus(status) {
|
|
5
|
+
if (status === "Completed")
|
|
6
|
+
return "✓";
|
|
7
|
+
if (status === "Failed" || status === "Faulted")
|
|
8
|
+
return "✗";
|
|
9
|
+
if (status === "Running" || status === "InProgress")
|
|
10
|
+
return "⏳";
|
|
11
|
+
return "•";
|
|
12
|
+
}
|
|
13
|
+
function formatTraceLine(trace) {
|
|
14
|
+
const time = new Date(trace.timestamp).toLocaleTimeString();
|
|
15
|
+
const statusIcon = formatTraceStatus(trace.status);
|
|
16
|
+
const duration = trace.duration ? ` ${trace.duration}ms` : "";
|
|
17
|
+
const name = trace.name.length > 60 ? `${trace.name.substring(0, 57)}...` : trace.name;
|
|
18
|
+
return `[${time}] ${statusIcon} ${name} (${trace.status})${duration}`;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { VALID_PROJECT_NAME_REGEX, VALID_PACKAGE_NAME_REGEX, formatTraceLine };
|
|
22
|
+
|
|
23
|
+
//# debugId=3FEAF014449A0BAE64756E2164756E21
|