@uipath/case-tool 1.206.0-preview.303 → 1.207.0-preview.305
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 +7 -90
- package/dist/THIRD-PARTY-NOTICES.md +162 -7
- package/dist/{authoring-wt5ngnjb.js → authoring-qqev46bh.js} +233 -63
- package/dist/{bindings-v2-x100hvcy.js → bindings-v2-wjgg92tj.js} +4 -4
- package/dist/{browser-strategy-627rrg7z.js → browser-strategy-qc6htsnf.js} +1 -1
- package/dist/{business-rule-export-pggs7x01.js → business-rule-export-0pbc3ysq.js} +2 -2
- package/dist/{carry-forward-gxsadrqb.js → carry-forward-tj5yrqf6.js} +6 -6
- package/dist/{case-api-a6v5beat.js → case-api-bfwmvkb8.js} +24 -28
- package/dist/{case-bindings-service-9zemt0r2.js → case-bindings-service-5r7c70kz.js} +5 -5
- package/dist/case-catalog-h4fjn6q3.js +304 -0
- package/dist/{case-debug-solution-projects-c300019s.js → case-debug-solution-projects-5tr4pwbs.js} +2 -2
- package/dist/{case-debug-studio-web-service-b6xe8es1.js → case-debug-studio-web-service-7smzvq4c.js} +10 -9
- package/dist/{case-described-io-service-8dw21x2y.js → case-described-io-service-ddsvkz8w.js} +5 -5
- package/dist/{case-event-trigger-bindings-pmad4dev.js → case-event-trigger-bindings-8nd78j4e.js} +5 -5
- package/dist/{case-format-service-xjvnx3jd.js → case-format-service-4mzszgfb.js} +2 -2
- package/dist/case-pack-service-bp7sh20v.js +297 -0
- package/dist/{case-splice-service-8deak994.js → case-splice-service-tpp2syvn.js} +7 -7
- package/dist/{case-validate-service-p324kcry.js → case-validate-service-fxvq4qx7.js} +146 -38
- package/dist/{connector-enrichment-service-9wnew5a0.js → connector-enrichment-service-x0w721wj.js} +26 -25
- package/dist/{connector-library-1yw5r47w.js → connector-library-844myxz2.js} +20 -6
- package/dist/{connector-lookup-service-v8r2htmg.js → connector-lookup-service-51pca3bf.js} +8 -8
- package/dist/{connector-task-shape-bgywpbqc.js → connector-task-shape-s2zny4gf.js} +3 -3
- package/dist/{de-AI7ML6JM-km47f8k4.js → de-B6IFKV43-9sk50xx0.js} +164 -2
- package/dist/{de-2BEKRUMY-x4dx0nn9.js → de-HF4GJ4EK-xrrajtht.js} +1277 -10
- package/dist/{debug-service-tm92ws5e.js → debug-service-hf2wb4tw.js} +9 -4
- package/dist/{en-LAVDF7IQ-yzy20n6d.js → en-5JIPZTS5-c68n8taw.js} +4 -2
- package/dist/{en-X6T4SP2Y-xm47mf18.js → en-ETY46SDS-far9tmsf.js} +66 -2
- package/dist/{enrichment-service-hzsn1aqp.js → enrichment-service-7f4sdff5.js} +17 -17
- package/dist/{es-SPNKTD5Y-vw5cbgv5.js → es-AQW6PFIU-q2mz247f.js} +164 -2
- package/dist/{es-7ZTQTGKN-11sj0yjx.js → es-IYP2OLUY-98xsbyd5.js} +1271 -10
- package/dist/{es-MX-IHGRIEWH-g63p0gb4.js → es-MX-D2MN3U37-0y5q0nbe.js} +1276 -10
- package/dist/{es-MX-7KJZPEQN-1fq0a9jr.js → es-MX-KWITVBWE-w49gknha.js} +164 -2
- package/dist/{fr-7ZDL4MVO-pd27vwh6.js → fr-NISALSPL-vzfmygd7.js} +1277 -10
- package/dist/{fr-AXJGUT53-hdg3pmd4.js → fr-RNWK2TMC-dpyzj366.js} +164 -2
- package/dist/{index-n1ndwwsz.js → index-2j5tfjwv.js} +129 -76
- package/dist/{index-kc1h1yf6.js → index-ezxmyhan.js} +4 -4
- package/dist/{index-j2gw61z0.js → index-gb75pv5a.js} +111 -65
- package/dist/index-prn518fr.js +36 -0
- package/dist/{index-nj3axvya.js → index-rk82650j.js} +7 -5
- package/dist/{index-pg9wmyrf.js → index-t6fnts8a.js} +2 -2
- package/dist/index-wkmh1h6w.js +26 -0
- package/dist/{index-21kns9qg.js → index-y7v9rkq9.js} +1 -1
- package/dist/index.js +13 -11
- package/dist/init-entry-points-52kvvbg9.js +15 -0
- package/dist/input-reader-zr71xcm9.js +13 -0
- package/dist/integration-service-fetcher-bpbz1gcx.js +68 -0
- package/dist/{ja-C7GZV6YP-hvtbngr5.js → ja-DH4I3GEF-ywyhhppa.js} +164 -2
- package/dist/{ja-LGAM5HKR-sgrtjqjh.js → ja-HTS2Q4YG-4ahnq47y.js} +1277 -10
- package/dist/{known-types-gak9by1w.js → known-types-a5d0evdm.js} +2 -2
- package/dist/{ko-7B4SUZB7-c8wr20sc.js → ko-3JFGTMNY-qnf1bnef.js} +1271 -10
- package/dist/{ko-Q24HSSL4-5vn55pte.js → ko-R5BCWVO7-whzgmh6q.js} +164 -2
- package/dist/library-option-pbvkt66g.js +13 -0
- package/dist/{localSolutionDiscovery-9pj8mzye.js → localSolutionDiscovery-5sqz9dkr.js} +5 -5
- package/dist/manifest-rhee8kem.js +32 -0
- package/dist/{node-strategy-2mqzg36t.js → node-strategy-aaf2qe6c.js} +2 -2
- package/dist/{node-sync-service-7n5960qy.js → node-sync-service-q1a37d6n.js} +21 -15
- package/dist/{out-target-gtg3we44.js → out-target-02x6x6nk.js} +5 -5
- package/dist/{packager-tool-h2ar8xf8.js → packager-tool-00ck60cc.js} +25 -24
- package/dist/{packager-tool-rfdkx9c9.js → packager-tool-00qmds4s.js} +254 -69
- package/dist/{packager-tool-388vyja1.js → packager-tool-0gmnk7sb.js} +2 -2
- package/dist/{packager-tool-fcektt1g.js → packager-tool-0nbcqyvp.js} +10 -9
- package/dist/{packager-tool-anvg0etj.js → packager-tool-178xtejt.js} +191 -154
- package/dist/{packager-tool-j69tzg52.js → packager-tool-1dsedy7x.js} +59 -34
- package/dist/packager-tool-1yew22sn.js +9 -0
- package/dist/{packager-tool-1hpd2gmh.js → packager-tool-225b9qhq.js} +1 -1
- package/dist/{packager-tool-z4phaas7.js → packager-tool-2x40ye7a.js} +21 -7
- package/dist/{packager-tool-p0rdmmvk.js → packager-tool-2xemp3b1.js} +2 -2
- package/dist/packager-tool-34ttsx9q.js +18 -0
- package/dist/{packager-tool-3zy717ga.js → packager-tool-36vkdb3h.js} +2 -2
- package/dist/{packager-tool-7hcpmn4g.js → packager-tool-380ac64s.js} +61 -11
- package/dist/{packager-tool-cqkbf2fg.js → packager-tool-3hzsw5r7.js} +906 -41
- package/dist/packager-tool-3k5j706w.js +73 -0
- package/dist/{packager-tool-scy94jyb.js → packager-tool-4seehsme.js} +2 -72
- package/dist/{packager-tool-es77jvky.js → packager-tool-4w7nzx18.js} +360 -44
- package/dist/{packager-tool-4avchhz8.js → packager-tool-57970zfm.js} +12 -7
- package/dist/{packager-tool-bjt8b2nz.js → packager-tool-5s476jdt.js} +13 -13
- package/dist/{packager-tool-0xj79bbd.js → packager-tool-8kcwawyg.js} +13 -4
- package/dist/{packager-tool-wy3a65rx.js → packager-tool-bw4fsdq4.js} +27 -13
- package/dist/{packager-tool-dn9d4ywm.js → packager-tool-c0pavv0s.js} +66 -10
- package/dist/packager-tool-c9h0rwgv.js +31 -0
- package/dist/{packager-tool-t8qx6hvn.js → packager-tool-dv2vtyg0.js} +4 -4
- package/dist/{packager-tool-3r23qsca.js → packager-tool-ef43cy32.js} +213 -231
- package/dist/{packager-tool-m4kp6a7j.js → packager-tool-ej14cxen.js} +22 -22
- package/dist/{packager-tool-5w0gjcck.js → packager-tool-engs9gvj.js} +1 -1
- package/dist/{packager-tool-stdwmgvd.js → packager-tool-exrjwmew.js} +202 -83
- package/dist/{task-type-declaration-yhczvj05.js → packager-tool-f9n5mk1c.js} +8 -12
- package/dist/{packager-tool-b2q8m9pq.js → packager-tool-fspmvh6g.js} +5 -4
- package/dist/packager-tool-geh2qybm.js +179 -0
- package/dist/{packager-tool-17b466mr.js → packager-tool-hrd44w8g.js} +7561 -6408
- package/dist/{packager-tool-snesn0bt.js → packager-tool-j1etnthk.js} +19 -14
- package/dist/{packager-tool-k871wgpe.js → packager-tool-j53d4vv1.js} +18 -4
- package/dist/{packager-tool-6ewsbrnb.js → packager-tool-j8mnpsv8.js} +329 -149
- package/dist/{packager-tool-7x1tmb8a.js → packager-tool-jydreskq.js} +1 -1
- package/dist/{packager-tool-r5pha7xq.js → packager-tool-k08k9g2y.js} +9 -9
- package/dist/{packager-tool-bg3tdpva.js → packager-tool-kh9gs4d5.js} +4 -2
- package/dist/{packager-tool-8467kcz9.js → packager-tool-m7s4n455.js} +120 -13
- package/dist/{packager-tool-q26hncjr.js → packager-tool-n3r5apbb.js} +4 -2
- package/dist/packager-tool-n6h4bz4d.js +22 -0
- package/dist/{packager-tool-ad8v11jd.js → packager-tool-p4c1g2sj.js} +1032 -819
- package/dist/{packager-tool-z070caqq.js → packager-tool-p64w2wrt.js} +30 -8
- package/dist/{packager-tool-xd1wbvay.js → packager-tool-pq61r2f1.js} +1 -1
- package/dist/{packager-tool-65vr263d.js → packager-tool-qzyb1eac.js} +1 -1
- package/dist/{packager-tool-5dptce1y.js → packager-tool-rzxnm9yj.js} +2 -2
- package/dist/{init-entry-points-5xzn81bb.js → packager-tool-t6xwkhht.js} +12 -10
- package/dist/packager-tool-vmfd007q.js +27 -0
- package/dist/packager-tool-wvf6b31h.js +50 -0
- package/dist/{packager-tool-cdvrca04.js → packager-tool-x9z4krtr.js} +1036 -259
- package/dist/{packager-tool-z1fw9a8v.js → packager-tool-y69796fy.js} +19 -11
- package/dist/{packager-tool-jkwpw95j.js → packager-tool-z13dp55w.js} +3393 -3092
- package/dist/{packager-tool-9m7jbv7t.js → packager-tool-zbfwp75m.js} +4 -4
- package/dist/{packager-tool-pq9xv4vq.js → packager-tool-zte9svtn.js} +11 -4
- package/dist/packager-tool.js +2 -2
- package/dist/{prepare-uip-ad7mfs8t.js → prepare-uip-2hcb65bn.js} +39 -6
- package/dist/{project-artifacts-pfcn65cg.js → project-artifacts-77yctm8b.js} +1 -1
- package/dist/{pt-BR-BIUJXIPU-2sqzhr8y.js → pt-BR-6TBBEDQS-y3f2vg5d.js} +164 -2
- package/dist/{pt-BR-PHLFHMXZ-n6de4s7z.js → pt-BR-7H7BP5DT-z2e5aaj1.js} +1276 -10
- package/dist/{pt-N7ZTJT4W-d6c67xcn.js → pt-QWGSZKMD-m50nrkx8.js} +1271 -10
- package/dist/{pt-MHX6JGAX-xfgvdqwg.js → pt-ZSQC5RZ3-8kp3g1z5.js} +164 -2
- package/dist/{resolved-check-dz8eqrf6.js → resolved-check-kwgy875v.js} +1 -1
- package/dist/{resourcesSyncService-y5r4k43w.js → resourcesSyncService-gegbd8b8.js} +49 -26
- package/dist/{ro-FLNXVYJI-ytrwabg2.js → ro-B7G474JK-9k2jjk88.js} +1271 -10
- package/dist/{ro-3RKJNGJZ-xqj14e3d.js → ro-P33AQ6ZL-s92z1mgg.js} +164 -2
- package/dist/{rule-type-declaration-ze0saj5r.js → rule-type-declaration-a0fk7fe7.js} +12 -11
- package/dist/{sdd-convert-service-m8e615a1.js → sdd-convert-service-2ag3xjpj.js} +120 -621
- package/dist/{sdd-lookup-fwj6x364.js → sdd-lookup-wgm5ctnd.js} +2 -2
- package/dist/{sdd-resolve-service-dvg387wx.js → sdd-resolve-service-epygyb0n.js} +34 -6
- package/dist/{sdd-resolve-siblings-xsm2ktkq.js → sdd-resolve-siblings-qz7gwws5.js} +4 -4
- package/dist/solution-auth-yb1twb9d.js +11 -0
- package/dist/{solution-discovery-gfdqhgt2.js → solution-discovery-t0nkzpm3.js} +4 -4
- package/dist/{strict-case-rules-045kbjvv.js → strict-case-rules-x1sytx3e.js} +91 -46
- package/dist/{strict-entry-points-wd85a81g.js → strict-entry-points-anxeg692.js} +6 -6
- package/dist/strict-sdd-audit-z1bg2zr0.js +28 -0
- package/dist/taggable-variables-gc58xb0s.js +6094 -0
- package/dist/task-type-declaration-b0ejzhc6.js +15 -0
- package/dist/tool.js +13 -11
- package/dist/{tr-7AIZZWZ6-pdzp9n0p.js → tr-FX7WCKK2-x3rx9fjt.js} +1271 -10
- package/dist/{tr-PQLUUHPC-qsb7btxn.js → tr-XD73CQAA-tb2nrpyp.js} +164 -2
- package/dist/{trigger-enrichment-service-dzkht78s.js → trigger-enrichment-service-bsj58ppa.js} +33 -32
- package/dist/{trigger-entry-point-id-4j9rk3kp.js → trigger-entry-point-id-hre2ewts.js} +1 -1
- package/dist/{zh-CN-OHNTHZRI-b0hjkfqn.js → zh-CN-GWP3B2EM-c07fm17a.js} +164 -2
- package/dist/{zh-CN-CN2ARPFS-e0p2qrxf.js → zh-CN-NCMB6YM5-drw9bnxg.js} +1271 -10
- package/dist/{zh-TW-E4D3Y6ZR-tn3bmzz5.js → zh-TW-2DLUOA7C-9khqnr4r.js} +164 -2
- package/dist/{zh-TW-7RUFEVFK-qd7myw31.js → zh-TW-UNIEJPLE-4vxzbphe.js} +1272 -11
- package/package.json +2 -2
- package/dist/case-pack-service-adhg30nq.js +0 -167
- package/dist/index-garh9kcd.js +0 -35
- package/dist/input-reader-pjt4a914.js +0 -10
- package/dist/packager-tool-v11fx4dk.js +0 -25
- package/dist/solution-auth-a1p22hq1.js +0 -11
- package/dist/strict-sdd-audit-6es2j6fs.js +0 -26
|
@@ -1,36 +1,39 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getLoginStatusAsync2
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-c0pavv0s.js";
|
|
4
4
|
import {
|
|
5
5
|
getFileSystem2
|
|
6
|
-
} from "./packager-tool-
|
|
6
|
+
} from "./packager-tool-p64w2wrt.js";
|
|
7
7
|
import {
|
|
8
8
|
catchError2,
|
|
9
9
|
classifyThrownError,
|
|
10
10
|
UIPATH_HOME_DIR2,
|
|
11
11
|
hashContent
|
|
12
|
-
} from "./packager-tool-
|
|
12
|
+
} from "./packager-tool-j8mnpsv8.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
AGENT_TOOL_CONNECTOR_NODE_PREFIX2,
|
|
15
|
+
DEFAULT_FETCHERS2,
|
|
16
|
+
MANIFEST_FEATURE_FLAGS2,
|
|
17
|
+
ManifestClient2
|
|
18
|
+
} from "./packager-tool-hrd44w8g.js";
|
|
17
19
|
import {
|
|
18
20
|
searchWithFilters2
|
|
19
21
|
} from "./packager-tool-xb16e3tz.js";
|
|
20
22
|
import {
|
|
23
|
+
enrichConnectorNode2
|
|
24
|
+
} from "./packager-tool-1dsedy7x.js";
|
|
25
|
+
import {
|
|
26
|
+
selectMaestroNodes,
|
|
21
27
|
listKnownSdkNodes2
|
|
22
|
-
} from "./packager-tool-
|
|
28
|
+
} from "./packager-tool-c9h0rwgv.js";
|
|
23
29
|
import {
|
|
24
30
|
findSolutionFromCwd2,
|
|
25
31
|
buildInSolutionNodes2,
|
|
26
32
|
unknownContractWarning2
|
|
27
|
-
} from "./packager-tool-
|
|
33
|
+
} from "./packager-tool-5s476jdt.js";
|
|
28
34
|
import {
|
|
29
35
|
resolveMaestroRegistry
|
|
30
|
-
} from "./packager-tool-
|
|
31
|
-
import {
|
|
32
|
-
enrichConnectorNode
|
|
33
|
-
} from "./packager-tool-j69tzg52.js";
|
|
36
|
+
} from "./packager-tool-36vkdb3h.js";
|
|
34
37
|
|
|
35
38
|
// ../maestro-sdk/src/registry/is-precache.ts
|
|
36
39
|
async function resolveLibraryJsonDir() {
|
|
@@ -87,12 +90,14 @@ async function getPrecacheNode(nodeType, options) {
|
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
// ../maestro-sdk/src/registry/node-storage.ts
|
|
90
|
-
var CACHE_FORMAT_VERSION =
|
|
93
|
+
var CACHE_FORMAT_VERSION = 8;
|
|
91
94
|
var INDEX_FILE = "index.json";
|
|
92
95
|
var METADATA_FILE = "index.meta.json";
|
|
93
96
|
var SEARCH_INDEX_FILE = "search-index.json";
|
|
94
97
|
var ESSENTIALS_INDEX_FILE = "get-essentials.json";
|
|
95
98
|
var WRITE_LOCK_FILE = ".index-write.lock";
|
|
99
|
+
var CONNECTOR_FETCH_FILE = "connector-nodes.json";
|
|
100
|
+
var MISS_REFRESH_PREFIX = "miss-refresh-";
|
|
96
101
|
function nodeCacheScope(login) {
|
|
97
102
|
const baseUrl = login.baseUrl?.trim().replace(/\/+$/, "");
|
|
98
103
|
const organizationId = login.organizationId?.trim();
|
|
@@ -101,6 +106,49 @@ function nodeCacheScope(login) {
|
|
|
101
106
|
return;
|
|
102
107
|
return [baseUrl, organizationId, tenantId].join("|").toLowerCase();
|
|
103
108
|
}
|
|
109
|
+
async function saveConnectorFetch(scope, options, result) {
|
|
110
|
+
const fs = getFileSystem2();
|
|
111
|
+
const dir = await resolveNodeStorageDir();
|
|
112
|
+
await fs.mkdir(dir);
|
|
113
|
+
await writeTempAndRename(fs, fs.path.join(dir, CONNECTOR_FETCH_FILE), JSON.stringify({
|
|
114
|
+
cacheVersion: CACHE_FORMAT_VERSION,
|
|
115
|
+
scope,
|
|
116
|
+
options,
|
|
117
|
+
fetchedAt: Date.now(),
|
|
118
|
+
result
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
async function loadConnectorFetch(scope, options) {
|
|
122
|
+
const fs = getFileSystem2();
|
|
123
|
+
const path = fs.path.join(await resolveNodeStorageDir(), CONNECTOR_FETCH_FILE);
|
|
124
|
+
const [readError, content] = await catchError2(fs.readFile(path, "utf-8"));
|
|
125
|
+
if (readError || content === null)
|
|
126
|
+
return null;
|
|
127
|
+
const [parseError, record] = catchError2(() => JSON.parse(content));
|
|
128
|
+
if (parseError || !record || record.cacheVersion !== CACHE_FORMAT_VERSION || record.scope !== scope || record.options !== options || typeof record.fetchedAt !== "number" || !record.result) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
return { fetchedAt: record.fetchedAt, result: record.result };
|
|
132
|
+
}
|
|
133
|
+
async function missRefreshPath(fs, scope) {
|
|
134
|
+
const name = `${MISS_REFRESH_PREFIX}${(await hashContent(scope)).slice(0, 16)}.json`;
|
|
135
|
+
return fs.path.join(await resolveNodeStorageDir(), name);
|
|
136
|
+
}
|
|
137
|
+
async function loadMissRefreshAt(scope) {
|
|
138
|
+
const fs = getFileSystem2();
|
|
139
|
+
const [readError, content] = await catchError2(fs.readFile(await missRefreshPath(fs, scope), "utf-8"));
|
|
140
|
+
if (readError || content === null)
|
|
141
|
+
return;
|
|
142
|
+
const [parseError, record] = catchError2(() => JSON.parse(content));
|
|
143
|
+
if (parseError || record?.scope !== scope)
|
|
144
|
+
return;
|
|
145
|
+
return typeof record.at === "number" ? record.at : undefined;
|
|
146
|
+
}
|
|
147
|
+
async function saveMissRefreshAt(scope, at) {
|
|
148
|
+
const fs = getFileSystem2();
|
|
149
|
+
await fs.mkdir(await resolveNodeStorageDir());
|
|
150
|
+
await writeTempAndRename(fs, await missRefreshPath(fs, scope), JSON.stringify({ scope, at }));
|
|
151
|
+
}
|
|
104
152
|
async function resolveNodeStorageDir() {
|
|
105
153
|
const fs = getFileSystem2();
|
|
106
154
|
return fs.path.join(fs.env.homedir(), UIPATH_HOME_DIR2, "nodes");
|
|
@@ -146,7 +194,7 @@ async function writeTempAndRename(fs, targetPath, content) {
|
|
|
146
194
|
await fs.writeFile(tempPath, content);
|
|
147
195
|
await fs.rename(tempPath, targetPath);
|
|
148
196
|
}
|
|
149
|
-
async function writeNodeArtifacts(fs, dir, nodes, scope, missingSources) {
|
|
197
|
+
async function writeNodeArtifacts(fs, dir, nodes, scope, missingSources, syncedAt) {
|
|
150
198
|
const indexPath = fs.path.join(dir, INDEX_FILE);
|
|
151
199
|
const searchIndexPath = fs.path.join(dir, SEARCH_INDEX_FILE);
|
|
152
200
|
const essentialsIndexPath = fs.path.join(dir, ESSENTIALS_INDEX_FILE);
|
|
@@ -156,7 +204,7 @@ async function writeNodeArtifacts(fs, dir, nodes, scope, missingSources) {
|
|
|
156
204
|
const searchContent = JSON.stringify(createDerivedArtifact(buildSearchIndex(nodes), hash));
|
|
157
205
|
const essentialsContent = JSON.stringify(createDerivedArtifact(buildEssentialsIndex(nodes), hash));
|
|
158
206
|
const metadataContent = JSON.stringify({
|
|
159
|
-
lastSync:
|
|
207
|
+
lastSync: syncedAt,
|
|
160
208
|
nodeCount: nodes.length,
|
|
161
209
|
hash,
|
|
162
210
|
cacheVersion: CACHE_FORMAT_VERSION,
|
|
@@ -169,7 +217,7 @@ async function writeNodeArtifacts(fs, dir, nodes, scope, missingSources) {
|
|
|
169
217
|
await writeTempAndRename(fs, metaPath, metadataContent);
|
|
170
218
|
return nodes.length;
|
|
171
219
|
}
|
|
172
|
-
async function commitNodeIndexUnderLock(nodes, scope, missingSources, protectExistingSources = false) {
|
|
220
|
+
async function commitNodeIndexUnderLock(nodes, scope, missingSources, protectExistingSources = false, syncedAt = Date.now()) {
|
|
173
221
|
const fs = getFileSystem2();
|
|
174
222
|
const dir = await resolveNodeStorageDir();
|
|
175
223
|
await fs.mkdir(dir);
|
|
@@ -190,7 +238,7 @@ async function commitNodeIndexUnderLock(nodes, scope, missingSources, protectExi
|
|
|
190
238
|
await writeTempAndRename(fs, fs.path.join(dir, METADATA_FILE), JSON.stringify({
|
|
191
239
|
...rest,
|
|
192
240
|
cacheVersion: CACHE_FORMAT_VERSION,
|
|
193
|
-
lastSync:
|
|
241
|
+
lastSync: syncedAt,
|
|
194
242
|
...missingSources?.length && { missingSources }
|
|
195
243
|
}));
|
|
196
244
|
return {
|
|
@@ -200,7 +248,7 @@ async function commitNodeIndexUnderLock(nodes, scope, missingSources, protectExi
|
|
|
200
248
|
}
|
|
201
249
|
return {
|
|
202
250
|
committed: true,
|
|
203
|
-
nodeCount: await writeNodeArtifacts(fs, dir, nodes, scope, missingSources)
|
|
251
|
+
nodeCount: await writeNodeArtifacts(fs, dir, nodes, scope, missingSources, syncedAt)
|
|
204
252
|
};
|
|
205
253
|
})());
|
|
206
254
|
const [releaseError] = await catchError2(releaseLock());
|
|
@@ -216,8 +264,8 @@ async function commitNodeIndex(nodes, scope, missingSources) {
|
|
|
216
264
|
throw new Error("Unexpected refused node index commit");
|
|
217
265
|
return result.nodeCount;
|
|
218
266
|
}
|
|
219
|
-
async function commitNodeIndexForReader(nodes, scope, missingSources) {
|
|
220
|
-
return commitNodeIndexUnderLock(nodes, scope, missingSources, true);
|
|
267
|
+
async function commitNodeIndexForReader(nodes, scope, missingSources, syncedAt) {
|
|
268
|
+
return commitNodeIndexUnderLock(nodes, scope, missingSources, true, syncedAt);
|
|
221
269
|
}
|
|
222
270
|
async function loadScopedNodeIndex(scope) {
|
|
223
271
|
const metadata = await loadIndexMetadata();
|
|
@@ -338,7 +386,7 @@ async function rederiveNodeIndexArtifacts() {
|
|
|
338
386
|
const hash = await hashContent(JSON.stringify(nodes));
|
|
339
387
|
const sameNodes = metadata !== null && metadata.hash === hash;
|
|
340
388
|
const scope = sameNodes ? metadata.scope : undefined;
|
|
341
|
-
return writeNodeArtifacts(fs, dir, nodes, scope, sameNodes ? metadata.missingSources : undefined);
|
|
389
|
+
return writeNodeArtifacts(fs, dir, nodes, scope, sameNodes ? metadata.missingSources : undefined, Date.now());
|
|
342
390
|
})());
|
|
343
391
|
const [releaseError] = await catchError2(releaseLock());
|
|
344
392
|
if (rederiveError)
|
|
@@ -433,6 +481,23 @@ async function readLoginStatus() {
|
|
|
433
481
|
const [loginError, loginStatus] = await catchError2(getLoginStatusAsync2());
|
|
434
482
|
return loginError ? { loginStatus: "Not logged in" } : loginStatus;
|
|
435
483
|
}
|
|
484
|
+
function hasRemoteSession(loginStatus) {
|
|
485
|
+
return loginStatus.loginStatus === "Logged in" && !!loginStatus.baseUrl && !!loginStatus.accessToken && !!loginStatus.tenantId && !!loginStatus.organizationId;
|
|
486
|
+
}
|
|
487
|
+
async function gatedNodeFailure2(nodeType) {
|
|
488
|
+
if (!hasRemoteSession(await readLoginStatus())) {
|
|
489
|
+
return {
|
|
490
|
+
message: `Node type '${nodeType}' is not in the built-in registry, and the tenant's nodes were not checked.`,
|
|
491
|
+
instructions: "Run 'uip login' and select a tenant, then run the command again.",
|
|
492
|
+
errorCode: "authentication_required"
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
return {
|
|
496
|
+
message: `Node type '${nodeType}' is not enabled for this tenant.`,
|
|
497
|
+
instructions: "Ask an admin to enable the feature flag for this node type, " + "or run `uip maestro flow registry list` to see every " + "known type with its `AvailableOnTenant` flag.",
|
|
498
|
+
errorCode: "not_enabled"
|
|
499
|
+
};
|
|
500
|
+
}
|
|
436
501
|
function loginScope(loginStatus) {
|
|
437
502
|
if (loginStatus.loginStatus !== "Logged in" || !loginStatus.accessToken) {
|
|
438
503
|
return;
|
|
@@ -522,23 +587,51 @@ async function refreshNodes(loginStatus) {
|
|
|
522
587
|
};
|
|
523
588
|
}
|
|
524
589
|
var ENABLED_MANIFEST_FLAGS = new Set([
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
590
|
+
MANIFEST_FEATURE_FLAGS2.EXTRACT_DOCUMENT,
|
|
591
|
+
MANIFEST_FEATURE_FLAGS2.CONVERSATION_TRIGGER,
|
|
592
|
+
MANIFEST_FEATURE_FLAGS2.CONVERSATIONAL_WAIT_FOR_MESSAGE,
|
|
593
|
+
MANIFEST_FEATURE_FLAGS2.CONVERSATIONAL_SEND_MESSAGE,
|
|
594
|
+
MANIFEST_FEATURE_FLAGS2.CONVERSATIONAL_GET_CONVERSATION_CONTEXT,
|
|
595
|
+
MANIFEST_FEATURE_FLAGS2.READ_ENTITY,
|
|
596
|
+
MANIFEST_FEATURE_FLAGS2.CREATE_ENTITY,
|
|
597
|
+
MANIFEST_FEATURE_FLAGS2.UPDATE_ENTITY,
|
|
598
|
+
MANIFEST_FEATURE_FLAGS2.DELETE_ENTITY,
|
|
599
|
+
MANIFEST_FEATURE_FLAGS2.READ_FILE,
|
|
600
|
+
MANIFEST_FEATURE_FLAGS2.CREATE_FILE
|
|
536
601
|
]);
|
|
537
|
-
async function pullRemoteNodes2(loginStatus) {
|
|
602
|
+
async function pullRemoteNodes2(loginStatus, options = {}) {
|
|
603
|
+
const pulled = await pullNodesForEveryRuntime(loginStatus, options);
|
|
604
|
+
return { ...pulled, nodes: selectMaestroNodes(pulled.nodes) };
|
|
605
|
+
}
|
|
606
|
+
function cachingConnectorFetcher(scope, reuse, onReuse = () => {}) {
|
|
607
|
+
return async (config, fetchOptions) => {
|
|
608
|
+
const key = JSON.stringify(fetchOptions);
|
|
609
|
+
if (reuse && scope !== undefined) {
|
|
610
|
+
const [, cached] = await catchError2(loadConnectorFetch(scope, key));
|
|
611
|
+
const age = cached ? Date.now() - cached.fetchedAt : -1;
|
|
612
|
+
if (cached && age >= 0 && age < CACHE_EXPIRATION) {
|
|
613
|
+
onReuse(cached.fetchedAt);
|
|
614
|
+
return cached.result;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
const result = await DEFAULT_FETCHERS2.fetchConnectorNodes(config, fetchOptions);
|
|
618
|
+
if (scope !== undefined) {
|
|
619
|
+
await catchError2(saveConnectorFetch(scope, key, result));
|
|
620
|
+
}
|
|
621
|
+
return result;
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
async function pullNodesForEveryRuntime(loginStatus, options = {}) {
|
|
538
625
|
loginStatus ??= await getLoginStatusAsync2();
|
|
539
|
-
|
|
626
|
+
let connectorsFetchedAt;
|
|
627
|
+
const client = new ManifestClient2({
|
|
540
628
|
baseUrl: loginStatus.baseUrl || "localhost",
|
|
541
|
-
getFeatureFlag: (flag) => ENABLED_MANIFEST_FLAGS.has(flag)
|
|
629
|
+
getFeatureFlag: (flag) => ENABLED_MANIFEST_FLAGS.has(flag),
|
|
630
|
+
fetchers: {
|
|
631
|
+
fetchConnectorNodes: cachingConnectorFetcher(loginScope(loginStatus), options.reuseConnectors === true, (fetchedAt) => {
|
|
632
|
+
connectorsFetchedAt = fetchedAt;
|
|
633
|
+
})
|
|
634
|
+
}
|
|
542
635
|
});
|
|
543
636
|
if (loginStatus.loginStatus === "Expired" || loginStatus.loginStatus === "Refresh Failed") {
|
|
544
637
|
const sessionError = new SessionExpiredError(loginStatus.loginStatus);
|
|
@@ -553,7 +646,7 @@ async function pullRemoteNodes2(loginStatus) {
|
|
|
553
646
|
refreshError: sessionError
|
|
554
647
|
};
|
|
555
648
|
}
|
|
556
|
-
if (
|
|
649
|
+
if (!hasRemoteSession(loginStatus)) {
|
|
557
650
|
const manifest = await client.getManifest({
|
|
558
651
|
inlineAgentNodes: true
|
|
559
652
|
});
|
|
@@ -578,12 +671,14 @@ async function pullRemoteNodes2(loginStatus) {
|
|
|
578
671
|
}));
|
|
579
672
|
if (!manifestError) {
|
|
580
673
|
const nodes = diagnostics.manifest.nodes || [];
|
|
674
|
+
const syncedAt = connectorsFetchedAt !== undefined ? { syncedAt: Math.min(Date.now(), connectorsFetchedAt) } : {};
|
|
581
675
|
if (diagnostics.failures.length === 0) {
|
|
582
676
|
return {
|
|
583
677
|
nodes,
|
|
584
678
|
source: "authenticated",
|
|
585
679
|
cacheable: true,
|
|
586
|
-
scope: nodeCacheScope(loginStatus)
|
|
680
|
+
scope: nodeCacheScope(loginStatus),
|
|
681
|
+
...syncedAt
|
|
587
682
|
};
|
|
588
683
|
}
|
|
589
684
|
const failures = toPullFailures(diagnostics.failures);
|
|
@@ -594,7 +689,8 @@ async function pullRemoteNodes2(loginStatus) {
|
|
|
594
689
|
source: "authenticated",
|
|
595
690
|
cacheable: true,
|
|
596
691
|
scope: nodeCacheScope(loginStatus),
|
|
597
|
-
missingSources: failures
|
|
692
|
+
missingSources: failures,
|
|
693
|
+
...syncedAt
|
|
598
694
|
};
|
|
599
695
|
}
|
|
600
696
|
return {
|
|
@@ -616,22 +712,59 @@ async function pullRemoteNodes2(loginStatus) {
|
|
|
616
712
|
refreshError: manifestError
|
|
617
713
|
};
|
|
618
714
|
}
|
|
715
|
+
function missingSourceNames(missingSources) {
|
|
716
|
+
return (missingSources ?? []).map((missing) => missing.source);
|
|
717
|
+
}
|
|
619
718
|
async function getNodesWithCacheFallback() {
|
|
620
|
-
const { nodes, failures, refreshError } = await loadCurrentTenantNodes2();
|
|
719
|
+
const { nodes, fromCache, failures, refreshError, missingSources } = await loadCurrentTenantNodes2();
|
|
621
720
|
if (failures?.length) {
|
|
622
721
|
throw new TenantManifestInvalidError2(failures, nodes);
|
|
623
722
|
}
|
|
624
723
|
if (refreshError) {
|
|
625
724
|
throw new TenantManifestUnavailableError2(refreshError, nodes);
|
|
626
725
|
}
|
|
627
|
-
return
|
|
726
|
+
return {
|
|
727
|
+
result: nodes,
|
|
728
|
+
missingSources: missingSourceNames(missingSources),
|
|
729
|
+
fromCache
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
var CONNECTOR_CATALOG_PREFIXES = [
|
|
733
|
+
"uipath.connector.",
|
|
734
|
+
AGENT_TOOL_CONNECTOR_NODE_PREFIX2
|
|
735
|
+
];
|
|
736
|
+
function isConnectorCatalogType(lowerNodeType) {
|
|
737
|
+
return CONNECTOR_CATALOG_PREFIXES.some((prefix) => lowerNodeType.startsWith(prefix));
|
|
738
|
+
}
|
|
739
|
+
var MISS_REFRESH_INTERVAL = 60 * 1000;
|
|
740
|
+
async function refreshOnMiss(reuseConnectors) {
|
|
741
|
+
const scope = loginScope(await readLoginStatus());
|
|
742
|
+
if (scope === undefined)
|
|
743
|
+
return null;
|
|
744
|
+
const [, last] = await catchError2(loadMissRefreshAt(scope));
|
|
745
|
+
const age = typeof last === "number" ? Date.now() - last : -1;
|
|
746
|
+
if (age >= 0 && age < MISS_REFRESH_INTERVAL) {
|
|
747
|
+
return null;
|
|
748
|
+
}
|
|
749
|
+
await catchError2(saveMissRefreshAt(scope, Date.now()));
|
|
750
|
+
const [error, refreshed] = await catchError2(loadCurrentTenantNodes2({ force: true, reuseConnectors }));
|
|
751
|
+
if (error || refreshed.failures?.length || refreshed.refreshError) {
|
|
752
|
+
return null;
|
|
753
|
+
}
|
|
754
|
+
return {
|
|
755
|
+
result: refreshed.nodes,
|
|
756
|
+
missingSources: missingSourceNames(refreshed.missingSources)
|
|
757
|
+
};
|
|
628
758
|
}
|
|
629
759
|
async function loadFreshDerivedIndex(load) {
|
|
630
760
|
const scope = loginScope(await readLoginStatus());
|
|
631
761
|
if (scope === undefined)
|
|
632
762
|
return null;
|
|
633
763
|
const [, cached] = await catchError2(load(scope));
|
|
634
|
-
return cached && isFreshFor(cached.metadata, scope) ?
|
|
764
|
+
return cached && isFreshFor(cached.metadata, scope) ? {
|
|
765
|
+
result: cached.nodes,
|
|
766
|
+
missingSources: missingSourceNames(cached.metadata.missingSources)
|
|
767
|
+
} : null;
|
|
635
768
|
}
|
|
636
769
|
async function loadCurrentTenantNodes2(options = {}) {
|
|
637
770
|
const loginStatus = await readLoginStatus();
|
|
@@ -639,12 +772,19 @@ async function loadCurrentTenantNodes2(options = {}) {
|
|
|
639
772
|
if (scope !== undefined) {
|
|
640
773
|
const [, scoped] = await catchError2(loadScopedNodeIndex(scope));
|
|
641
774
|
if (!options.force && scoped && isFreshFor(scoped.metadata, scope)) {
|
|
642
|
-
return {
|
|
775
|
+
return {
|
|
776
|
+
nodes: scoped.nodes,
|
|
777
|
+
fromCache: true,
|
|
778
|
+
source: "cache",
|
|
779
|
+
missingSources: scoped.metadata.missingSources
|
|
780
|
+
};
|
|
643
781
|
}
|
|
644
782
|
}
|
|
645
|
-
const pullResult = await pullRemoteNodes2(loginStatus
|
|
783
|
+
const pullResult = await pullRemoteNodes2(loginStatus, {
|
|
784
|
+
reuseConnectors: options.reuseConnectors
|
|
785
|
+
});
|
|
646
786
|
if (pullResult.cacheable) {
|
|
647
|
-
const [commitError, commit] = await catchError2(commitNodeIndexForReader(pullResult.nodes, pullResult.scope, pullResult.missingSources));
|
|
787
|
+
const [commitError, commit] = await catchError2(commitNodeIndexForReader(pullResult.nodes, pullResult.scope, pullResult.missingSources, pullResult.syncedAt));
|
|
648
788
|
const unavailableSources = commit && !commit.committed ? commit.newlyMissingSources : commitError ? pullResult.missingSources : undefined;
|
|
649
789
|
if (unavailableSources?.length) {
|
|
650
790
|
if (commit && !commit.committed && scope !== undefined) {
|
|
@@ -675,7 +815,8 @@ async function loadCurrentTenantNodes2(options = {}) {
|
|
|
675
815
|
source: pullResult.source,
|
|
676
816
|
info: pullResult.info,
|
|
677
817
|
failures: pullResult.failures,
|
|
678
|
-
refreshError: pullResult.refreshError
|
|
818
|
+
refreshError: pullResult.refreshError,
|
|
819
|
+
missingSources: pullResult.missingSources
|
|
679
820
|
};
|
|
680
821
|
}
|
|
681
822
|
async function getLocalSolutionSnapshot2() {
|
|
@@ -723,10 +864,14 @@ function findNodeByType2(nodes, nodeType) {
|
|
|
723
864
|
async function listNodes2(options) {
|
|
724
865
|
if (options?.local)
|
|
725
866
|
return getLocalSolutionNodes();
|
|
867
|
+
return (await listNodesWithDiagnostics2()).result;
|
|
868
|
+
}
|
|
869
|
+
async function listNodesWithDiagnostics2() {
|
|
726
870
|
const precacheEntries = await listPrecacheEntries();
|
|
727
|
-
const
|
|
871
|
+
const snapshot = await getNodesWithCacheFallback();
|
|
872
|
+
const registryCacheNodes = snapshot.result;
|
|
728
873
|
if (precacheEntries.length === 0)
|
|
729
|
-
return
|
|
874
|
+
return snapshot;
|
|
730
875
|
const byType = new Map;
|
|
731
876
|
for (const entry of precacheEntries) {
|
|
732
877
|
const key = entry.nodeType.toLowerCase();
|
|
@@ -751,7 +896,7 @@ async function listNodes2(options) {
|
|
|
751
896
|
display: { label: entry.label }
|
|
752
897
|
});
|
|
753
898
|
}
|
|
754
|
-
return merged;
|
|
899
|
+
return { result: merged, missingSources: snapshot.missingSources };
|
|
755
900
|
}
|
|
756
901
|
function unionWithKnownSdkNodes(tenantNodes) {
|
|
757
902
|
const seen = new Set;
|
|
@@ -775,10 +920,29 @@ function unionWithKnownSdkNodes(tenantNodes) {
|
|
|
775
920
|
return result;
|
|
776
921
|
}
|
|
777
922
|
async function loadSearchSummariesWithCacheFallback() {
|
|
778
|
-
|
|
923
|
+
const cached = await loadFreshDerivedIndex(loadScopedSearchIndex);
|
|
924
|
+
if (cached)
|
|
925
|
+
return { ...cached, fromCache: true };
|
|
926
|
+
const snapshot = await getNodesWithCacheFallback();
|
|
927
|
+
return {
|
|
928
|
+
result: buildSearchIndex(snapshot.result),
|
|
929
|
+
missingSources: snapshot.missingSources,
|
|
930
|
+
fromCache: snapshot.fromCache
|
|
931
|
+
};
|
|
779
932
|
}
|
|
780
|
-
async function
|
|
781
|
-
const
|
|
933
|
+
async function searchNodeSummariesWithAvailabilityAndDiagnostics2(keyword, filters) {
|
|
934
|
+
const snapshot = await loadSearchSummariesWithCacheFallback();
|
|
935
|
+
const found = searchSummaries(snapshot.result, keyword, filters);
|
|
936
|
+
if (found.length > 0 || !snapshot.fromCache || !keyword && !filters) {
|
|
937
|
+
return { result: found, missingSources: snapshot.missingSources };
|
|
938
|
+
}
|
|
939
|
+
const refreshed = await refreshOnMiss(false);
|
|
940
|
+
return refreshed ? {
|
|
941
|
+
result: searchSummaries(buildSearchIndex(refreshed.result), keyword, filters),
|
|
942
|
+
missingSources: refreshed.missingSources
|
|
943
|
+
} : { result: found, missingSources: snapshot.missingSources };
|
|
944
|
+
}
|
|
945
|
+
function searchSummaries(tenantNodes, keyword, filters) {
|
|
782
946
|
const tenantTypes = new Set(tenantNodes.map((node) => node.nodeType?.toLowerCase()).filter((type) => typeof type === "string"));
|
|
783
947
|
const merged = tenantNodes.map((node) => ({
|
|
784
948
|
node,
|
|
@@ -809,43 +973,64 @@ async function searchNodes2(keyword, options) {
|
|
|
809
973
|
nodes = await getLocalSolutionNodes();
|
|
810
974
|
} else {
|
|
811
975
|
const tenantNodes = await getNodesWithCacheFallback();
|
|
812
|
-
nodes = unionWithKnownSdkNodes(tenantNodes);
|
|
976
|
+
nodes = unionWithKnownSdkNodes(tenantNodes.result);
|
|
813
977
|
}
|
|
814
978
|
return filterNodesByKeyword2(nodes, keyword);
|
|
815
979
|
}
|
|
816
980
|
async function getNode2(nodeType, options) {
|
|
981
|
+
return (await getNodeWithDiagnostics(nodeType, options)).result;
|
|
982
|
+
}
|
|
983
|
+
async function getNodeWithDiagnostics(nodeType, options) {
|
|
817
984
|
const lowerNodeType = nodeType.toLowerCase();
|
|
818
985
|
if (!options?.local && lowerNodeType.startsWith("uipath.connector.")) {
|
|
819
986
|
const precached = await getPrecacheNode(nodeType);
|
|
820
987
|
if (precached)
|
|
821
|
-
return precached;
|
|
988
|
+
return { result: precached, missingSources: [] };
|
|
822
989
|
}
|
|
823
990
|
if (!options?.local && isEssentialNodeType(nodeType)) {
|
|
824
991
|
const essentials = await loadFreshDerivedIndex(loadScopedEssentialsIndex);
|
|
825
|
-
const node = essentials?.find((node) => node.nodeType?.toLowerCase() === lowerNodeType) ?? null;
|
|
826
|
-
if (node)
|
|
827
|
-
return
|
|
992
|
+
const node = essentials?.result.find((node) => node.nodeType?.toLowerCase() === lowerNodeType) ?? null;
|
|
993
|
+
if (node) {
|
|
994
|
+
return {
|
|
995
|
+
result: node,
|
|
996
|
+
missingSources: essentials?.missingSources ?? []
|
|
997
|
+
};
|
|
998
|
+
}
|
|
828
999
|
}
|
|
829
1000
|
if (options?.local) {
|
|
830
|
-
return
|
|
1001
|
+
return {
|
|
1002
|
+
result: findNodeByType2(await getLocalSolutionNodes(), nodeType),
|
|
1003
|
+
missingSources: []
|
|
1004
|
+
};
|
|
831
1005
|
}
|
|
832
|
-
const [error,
|
|
1006
|
+
const [error, snapshot] = await catchError2(getNodesWithCacheFallback());
|
|
833
1007
|
if (error) {
|
|
834
1008
|
if (error instanceof TenantManifestInvalidError2 || error instanceof TenantManifestUnavailableError2) {
|
|
835
1009
|
const ootbNode = findNodeByType2(error.ootbNodes, nodeType);
|
|
836
1010
|
if (ootbNode)
|
|
837
|
-
return ootbNode;
|
|
1011
|
+
return { result: ootbNode, missingSources: [] };
|
|
838
1012
|
}
|
|
839
1013
|
throw error;
|
|
840
1014
|
}
|
|
841
|
-
|
|
1015
|
+
const node = findNodeByType2(snapshot.result, nodeType);
|
|
1016
|
+
if (node || !snapshot.fromCache || options?.refreshOnMiss === false) {
|
|
1017
|
+
return { result: node, missingSources: snapshot.missingSources };
|
|
1018
|
+
}
|
|
1019
|
+
const refreshed = await refreshOnMiss(!isConnectorCatalogType(lowerNodeType));
|
|
1020
|
+
return refreshed ? {
|
|
1021
|
+
result: findNodeByType2(refreshed.result, nodeType),
|
|
1022
|
+
missingSources: refreshed.missingSources
|
|
1023
|
+
} : { result: null, missingSources: snapshot.missingSources };
|
|
842
1024
|
}
|
|
843
1025
|
async function getNodeEnriched2(nodeType, connectionId, options) {
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
return
|
|
1026
|
+
return (await getNodeEnrichedWithDiagnostics2(nodeType, connectionId, options)).result;
|
|
1027
|
+
}
|
|
1028
|
+
async function getNodeEnrichedWithDiagnostics2(nodeType, connectionId, options) {
|
|
1029
|
+
const snapshot = await getNodeWithDiagnostics(nodeType, options);
|
|
1030
|
+
return {
|
|
1031
|
+
result: snapshot.result ? await enrichConnectorNode2(snapshot.result, connectionId) : null,
|
|
1032
|
+
missingSources: snapshot.missingSources
|
|
1033
|
+
};
|
|
849
1034
|
}
|
|
850
1035
|
async function getLocalNodeEnriched2(nodeType, connectionId) {
|
|
851
1036
|
const snapshot = await getLocalSolutionSnapshot2();
|
|
@@ -853,7 +1038,7 @@ async function getLocalNodeEnriched2(nodeType, connectionId) {
|
|
|
853
1038
|
if (!node)
|
|
854
1039
|
return { node: null };
|
|
855
1040
|
return {
|
|
856
|
-
node: await
|
|
1041
|
+
node: await enrichConnectorNode2(node, connectionId),
|
|
857
1042
|
warning: localContractWarning2(snapshot, [node])
|
|
858
1043
|
};
|
|
859
1044
|
}
|
|
@@ -863,11 +1048,11 @@ async function searchNodesWithFilters2(keyword, filters, options) {
|
|
|
863
1048
|
nodes = await getLocalSolutionNodes();
|
|
864
1049
|
} else {
|
|
865
1050
|
const tenantNodes = await getNodesWithCacheFallback();
|
|
866
|
-
nodes = unionWithKnownSdkNodes(tenantNodes);
|
|
1051
|
+
nodes = unionWithKnownSdkNodes(tenantNodes.result);
|
|
867
1052
|
}
|
|
868
1053
|
return searchWithFilters2(nodes, keyword, filters);
|
|
869
1054
|
}
|
|
870
1055
|
|
|
871
|
-
export { MANIFEST_VALIDATION_NEXT_STEP2, TenantManifestInvalidError2, isTenantManifestInvalidError2, TenantManifestUnavailableError2, isTenantManifestUnavailableError2, pullNodes2, pullRemoteNodes2, loadCurrentTenantNodes2, getLocalSolutionSnapshot2, localContractWarning2, filterNodesByKeyword2, findNodeByType2, listNodes2,
|
|
1056
|
+
export { MANIFEST_VALIDATION_NEXT_STEP2, TenantManifestInvalidError2, isTenantManifestInvalidError2, TenantManifestUnavailableError2, isTenantManifestUnavailableError2, gatedNodeFailure2, pullNodes2, pullRemoteNodes2, loadCurrentTenantNodes2, getLocalSolutionSnapshot2, localContractWarning2, filterNodesByKeyword2, findNodeByType2, listNodes2, listNodesWithDiagnostics2, searchNodeSummariesWithAvailabilityAndDiagnostics2, searchNodes2, getNode2, getNodeEnriched2, getNodeEnrichedWithDiagnostics2, getLocalNodeEnriched2, searchNodesWithFilters2 };
|
|
872
1057
|
|
|
873
|
-
//# debugId=
|
|
1058
|
+
//# debugId=208EE966687F1C1564756E2164756E21
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
} from "./packager-tool-yh8mmj3p.js";
|
|
14
14
|
import {
|
|
15
15
|
withoutTrailingSlug
|
|
16
|
-
} from "./packager-tool-
|
|
16
|
+
} from "./packager-tool-0nbcqyvp.js";
|
|
17
17
|
import {
|
|
18
18
|
indexKey
|
|
19
|
-
} from "./packager-tool-
|
|
19
|
+
} from "./packager-tool-engs9gvj.js";
|
|
20
20
|
import {
|
|
21
21
|
prefixedId
|
|
22
22
|
} from "./packager-tool-1h7abxw6.js";
|
|
@@ -203,12 +203,13 @@ var fenceOf = (line) => {
|
|
|
203
203
|
const bare = line.slice(at + run).trim() === "";
|
|
204
204
|
return run >= 3 ? { ch, run, bare } : undefined;
|
|
205
205
|
};
|
|
206
|
-
var pipeTables = (block) =>
|
|
206
|
+
var pipeTables = (block) => pipeTablesAt(block).map((table) => table.text);
|
|
207
|
+
var pipeTablesAt = (block) => {
|
|
207
208
|
const tables = [];
|
|
208
209
|
let inRun = false;
|
|
209
210
|
let open;
|
|
210
|
-
for (const line of block.split(`
|
|
211
|
-
`)) {
|
|
211
|
+
for (const [at, line] of block.split(`
|
|
212
|
+
`).entries()) {
|
|
212
213
|
const fence = fenceOf(line);
|
|
213
214
|
if (fence !== undefined) {
|
|
214
215
|
if (open === undefined)
|
|
@@ -224,13 +225,13 @@ var pipeTables = (block) => {
|
|
|
224
225
|
}
|
|
225
226
|
const isRow = line.trim().startsWith("|");
|
|
226
227
|
if (isRow && !inRun)
|
|
227
|
-
tables.push([]);
|
|
228
|
+
tables.push({ lines: [], line: at });
|
|
228
229
|
if (isRow)
|
|
229
|
-
tables[tables.length - 1].push(line);
|
|
230
|
+
tables[tables.length - 1].lines.push(line);
|
|
230
231
|
inRun = isRow;
|
|
231
232
|
}
|
|
232
|
-
return tables.map((lines) => lines.join(`
|
|
233
|
-
`));
|
|
233
|
+
return tables.map(({ lines, line }) => ({ text: lines.join(`
|
|
234
|
+
`), line }));
|
|
234
235
|
};
|
|
235
236
|
var columnIndex = (header, ...names) => {
|
|
236
237
|
const wanted = new Set(names.map(norm));
|
|
@@ -268,6 +269,6 @@ var columnField = (block, column) => {
|
|
|
268
269
|
return;
|
|
269
270
|
};
|
|
270
271
|
|
|
271
|
-
export { withoutTrailingSlug, field, isDigit, isLetter, isLowerLetter, trimQuotes, norm, stripTicks, isBlank, namedValue, splitRowCells, isSeparatorCell, firstTable, fenceOf, pipeTables, columnIndex, cellAt, withoutAnnotation, columnField };
|
|
272
|
+
export { withoutTrailingSlug, field, isDigit, isLetter, isLowerLetter, trimQuotes, norm, stripTicks, isBlank, namedValue, splitRowCells, isSeparatorCell, firstTable, fenceOf, pipeTables, pipeTablesAt, columnIndex, cellAt, withoutAnnotation, columnField };
|
|
272
273
|
|
|
273
|
-
//# debugId=
|
|
274
|
+
//# debugId=DD5F1EE180C66AB864756E2164756E21
|