datapos-connector-file-store-emulator 0.2.327 → 0.2.328
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datapos-connector-file-store-emulator.es.js","sources":["../node_modules/nanoid/url-alphabet/index.js","../node_modules/nanoid/index.browser.js","../node_modules/@datapos/datapos-shared/dist/datapos-shared.es.js","../node_modules/@datapos/datapos-shared/dist/datapos-shared-utilities.es.js","../src/rustBridge.ts","../src/index.ts"],"sourcesContent":["export const urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n","/* @ts-self-types=\"./index.d.ts\" */\nimport { urlAlphabet as scopedUrlAlphabet } from './url-alphabet/index.js'\nexport { urlAlphabet } from './url-alphabet/index.js'\nexport let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nexport let customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << Math.log2(alphabet.length - 1)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step | 0\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length >= size) return id\n }\n }\n }\n}\nexport let customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size | 0, random)\nexport let nanoid = (size = 21) => {\n let id = ''\n let bytes = crypto.getRandomValues(new Uint8Array((size |= 0)))\n while (size--) {\n id += scopedUrlAlphabet[bytes[size] & 63]\n }\n return id\n}\n","let M;\n// @__NO_SIDE_EFFECTS__\nfunction V(t) {\n return {\n lang: t?.lang ?? M?.lang,\n message: t?.message,\n abortEarly: t?.abortEarly ?? M?.abortEarly,\n abortPipeEarly: t?.abortPipeEarly ?? M?.abortPipeEarly\n };\n}\nlet z;\n// @__NO_SIDE_EFFECTS__\nfunction H(t) {\n return z?.get(t);\n}\nlet $;\n// @__NO_SIDE_EFFECTS__\nfunction W(t) {\n return $?.get(t);\n}\nlet X;\n// @__NO_SIDE_EFFECTS__\nfunction B(t, n) {\n return X?.get(t)?.get(n);\n}\n// @__NO_SIDE_EFFECTS__\nfunction _(t) {\n const n = typeof t;\n return n === \"string\" ? `\"${t}\"` : n === \"number\" || n === \"bigint\" || n === \"boolean\" ? `${t}` : n === \"object\" || n === \"function\" ? (t && Object.getPrototypeOf(t)?.constructor?.name) ?? \"null\" : n;\n}\nfunction y(t, n, e, r, s) {\n const o = s && \"input\" in s ? s.input : e.value, i = s?.expected ?? t.expects ?? null, u = s?.received ?? /* @__PURE__ */ _(o), a = {\n kind: t.kind,\n type: t.type,\n input: o,\n expected: i,\n received: u,\n message: `Invalid ${n}: ${i ? `Expected ${i} but r` : \"R\"}eceived ${u}`,\n requirement: t.requirement,\n path: s?.path,\n issues: s?.issues,\n lang: r.lang,\n abortEarly: r.abortEarly,\n abortPipeEarly: r.abortPipeEarly\n }, p = t.kind === \"schema\", d = s?.message ?? t.message ?? /* @__PURE__ */ B(t.reference, a.lang) ?? (p ? /* @__PURE__ */ W(a.lang) : null) ?? r.message ?? /* @__PURE__ */ H(a.lang);\n d !== void 0 && (a.message = typeof d == \"function\" ? d(a) : d), p && (e.typed = !1), e.issues ? e.issues.push(a) : e.issues = [a];\n}\n// @__NO_SIDE_EFFECTS__\nfunction g(t) {\n return {\n version: 1,\n vendor: \"valibot\",\n validate(n) {\n return t[\"~run\"]({ value: n }, /* @__PURE__ */ V());\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction J(t, n) {\n return Object.hasOwn(t, n) && n !== \"__proto__\" && n !== \"prototype\" && n !== \"constructor\";\n}\n// @__NO_SIDE_EFFECTS__\nfunction K(t, n) {\n const e = [...new Set(t)];\n return e.length > 1 ? `(${e.join(` ${n} `)})` : e[0] ?? \"never\";\n}\n// @__NO_SIDE_EFFECTS__\nfunction q(t, n, e) {\n return typeof t.fallback == \"function\" ? t.fallback(n, e) : t.fallback;\n}\n// @__NO_SIDE_EFFECTS__\nfunction w(t, n, e) {\n return typeof t.default == \"function\" ? t.default(n, e) : t.default;\n}\n// @__NO_SIDE_EFFECTS__\nfunction E(t, n) {\n return {\n kind: \"schema\",\n type: \"array\",\n reference: E,\n expects: \"Array\",\n async: !1,\n item: t,\n message: n,\n get \"~standard\"() {\n return /* @__PURE__ */ g(this);\n },\n \"~run\"(e, r) {\n const s = e.value;\n if (Array.isArray(s)) {\n e.typed = !0, e.value = [];\n for (let o = 0; o < s.length; o++) {\n const i = s[o], u = this.item[\"~run\"]({ value: i }, r);\n if (u.issues) {\n const a = {\n type: \"array\",\n origin: \"value\",\n input: s,\n key: o,\n value: i\n };\n for (const p of u.issues)\n p.path ? p.path.unshift(a) : p.path = [a], e.issues?.push(p);\n if (e.issues || (e.issues = u.issues), r.abortEarly) {\n e.typed = !1;\n break;\n }\n }\n u.typed || (e.typed = !1), e.value.push(u.value);\n }\n } else y(this, \"type\", e, r);\n return e;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction T(t) {\n return {\n kind: \"schema\",\n type: \"boolean\",\n reference: T,\n expects: \"boolean\",\n async: !1,\n message: t,\n get \"~standard\"() {\n return /* @__PURE__ */ g(this);\n },\n \"~run\"(n, e) {\n return typeof n.value == \"boolean\" ? n.typed = !0 : y(this, \"type\", n, e), n;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction k(t, n) {\n return {\n kind: \"schema\",\n type: \"literal\",\n reference: k,\n expects: /* @__PURE__ */ _(t),\n async: !1,\n literal: t,\n message: n,\n get \"~standard\"() {\n return /* @__PURE__ */ g(this);\n },\n \"~run\"(e, r) {\n return e.value === this.literal ? e.typed = !0 : y(this, \"type\", e, r), e;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction m(t, n) {\n return {\n kind: \"schema\",\n type: \"nullable\",\n reference: m,\n expects: `(${t.expects} | null)`,\n async: !1,\n wrapped: t,\n default: n,\n get \"~standard\"() {\n return /* @__PURE__ */ g(this);\n },\n \"~run\"(e, r) {\n return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ w(this, e, r)), e.value === null) ? (e.typed = !0, e) : this.wrapped[\"~run\"](e, r);\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction x(t) {\n return {\n kind: \"schema\",\n type: \"number\",\n reference: x,\n expects: \"number\",\n async: !1,\n message: t,\n get \"~standard\"() {\n return /* @__PURE__ */ g(this);\n },\n \"~run\"(n, e) {\n return typeof n.value == \"number\" && !isNaN(n.value) ? n.typed = !0 : y(this, \"type\", n, e), n;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction b(t, n) {\n return {\n kind: \"schema\",\n type: \"object\",\n reference: b,\n expects: \"Object\",\n async: !1,\n entries: t,\n message: n,\n get \"~standard\"() {\n return /* @__PURE__ */ g(this);\n },\n \"~run\"(e, r) {\n const s = e.value;\n if (s && typeof s == \"object\") {\n e.typed = !0, e.value = {};\n for (const o in this.entries) {\n const i = this.entries[o];\n if (o in s || (i.type === \"exact_optional\" || i.type === \"optional\" || i.type === \"nullish\") && i.default !== void 0) {\n const u = o in s ? s[o] : /* @__PURE__ */ w(i), a = i[\"~run\"]({ value: u }, r);\n if (a.issues) {\n const p = {\n type: \"object\",\n origin: \"value\",\n input: s,\n key: o,\n value: u\n };\n for (const d of a.issues)\n d.path ? d.path.unshift(p) : d.path = [p], e.issues?.push(d);\n if (e.issues || (e.issues = a.issues), r.abortEarly) {\n e.typed = !1;\n break;\n }\n }\n a.typed || (e.typed = !1), e.value[o] = a.value;\n } else if (i.fallback !== void 0) e.value[o] = /* @__PURE__ */ q(i);\n else if (i.type !== \"exact_optional\" && i.type !== \"optional\" && i.type !== \"nullish\" && (y(this, \"key\", e, r, {\n input: void 0,\n expected: `\"${o}\"`,\n path: [{\n type: \"object\",\n origin: \"key\",\n input: s,\n key: o,\n value: s[o]\n }]\n }), r.abortEarly))\n break;\n }\n } else y(this, \"type\", e, r);\n return e;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction f(t, n) {\n return {\n kind: \"schema\",\n type: \"optional\",\n reference: f,\n expects: `(${t.expects} | undefined)`,\n async: !1,\n wrapped: t,\n default: n,\n get \"~standard\"() {\n return /* @__PURE__ */ g(this);\n },\n \"~run\"(e, r) {\n return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ w(this, e, r)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped[\"~run\"](e, r);\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction R(t, n, e) {\n return {\n kind: \"schema\",\n type: \"record\",\n reference: R,\n expects: \"Object\",\n async: !1,\n key: t,\n value: n,\n message: e,\n get \"~standard\"() {\n return /* @__PURE__ */ g(this);\n },\n \"~run\"(r, s) {\n const o = r.value;\n if (o && typeof o == \"object\") {\n r.typed = !0, r.value = {};\n for (const i in o) if (/* @__PURE__ */ J(o, i)) {\n const u = o[i], a = this.key[\"~run\"]({ value: i }, s);\n if (a.issues) {\n const d = {\n type: \"object\",\n origin: \"key\",\n input: o,\n key: i,\n value: u\n };\n for (const S of a.issues)\n S.path = [d], r.issues?.push(S);\n if (r.issues || (r.issues = a.issues), s.abortEarly) {\n r.typed = !1;\n break;\n }\n }\n const p = this.value[\"~run\"]({ value: u }, s);\n if (p.issues) {\n const d = {\n type: \"object\",\n origin: \"value\",\n input: o,\n key: i,\n value: u\n };\n for (const S of p.issues)\n S.path ? S.path.unshift(d) : S.path = [d], r.issues?.push(S);\n if (r.issues || (r.issues = p.issues), s.abortEarly) {\n r.typed = !1;\n break;\n }\n }\n (!a.typed || !p.typed) && (r.typed = !1), a.typed && (r.value[a.value] = p.value);\n }\n } else y(this, \"type\", r, s);\n return r;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction l(t) {\n return {\n kind: \"schema\",\n type: \"string\",\n reference: l,\n expects: \"string\",\n async: !1,\n message: t,\n get \"~standard\"() {\n return /* @__PURE__ */ g(this);\n },\n \"~run\"(n, e) {\n return typeof n.value == \"string\" ? n.typed = !0 : y(this, \"type\", n, e), n;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction P(t) {\n let n;\n if (t) for (const e of t) n ? n.push(...e.issues) : n = e.issues;\n return n;\n}\n// @__NO_SIDE_EFFECTS__\nfunction U(t, n) {\n return {\n kind: \"schema\",\n type: \"union\",\n reference: U,\n expects: /* @__PURE__ */ K(t.map((e) => e.expects), \"|\"),\n async: !1,\n options: t,\n message: n,\n get \"~standard\"() {\n return /* @__PURE__ */ g(this);\n },\n \"~run\"(e, r) {\n let s, o, i;\n for (const u of this.options) {\n const a = u[\"~run\"]({ value: e.value }, r);\n if (a.typed) if (a.issues) o ? o.push(a) : o = [a];\n else {\n s = a;\n break;\n }\n else i ? i.push(a) : i = [a];\n }\n if (s) return s;\n if (o) {\n if (o.length === 1) return o[0];\n y(this, \"type\", e, r, { issues: /* @__PURE__ */ P(o) }), e.typed = !0;\n } else {\n if (i?.length === 1) return i[0];\n y(this, \"type\", e, r, { issues: /* @__PURE__ */ P(i) });\n }\n return e;\n }\n };\n}\nconst h = (t) => /* @__PURE__ */ U(t.map((n) => /* @__PURE__ */ k(n))), Q = /* @__PURE__ */ b({\n \"en-au\": /* @__PURE__ */ l(),\n \"en-gb\": /* @__PURE__ */ l(),\n \"en-us\": /* @__PURE__ */ l(),\n \"es-es\": /* @__PURE__ */ l()\n}), j = /* @__PURE__ */ b({\n \"en-au\": /* @__PURE__ */ f(/* @__PURE__ */ l()),\n \"en-gb\": /* @__PURE__ */ f(/* @__PURE__ */ l()),\n \"en-us\": /* @__PURE__ */ f(/* @__PURE__ */ l()),\n \"es-es\": /* @__PURE__ */ f(/* @__PURE__ */ l())\n}), Y = h([\"amber\", \"green\", \"red\", \"other\"]), Z = h([\n \"alpha\",\n \"beta\",\n \"generalAvailability\",\n \"notApplicable\",\n \"preAlpha\",\n \"proposed\",\n \"releaseCandidate\",\n \"unavailable\",\n \"underReview\"\n]), ee = h([\n \"app\",\n \"connector\",\n \"connectorConnection\",\n \"context\",\n \"contextModelGroup\",\n \"contextModel\",\n \"contextModelDimensionGroup\",\n \"contextModelDimension\",\n \"contextModelDimensionHierarchy\",\n \"contextModelEntityGroup\",\n \"contextModelEntity\",\n \"contextModelEntityDataItem\",\n \"contextModelEntityEvent\",\n \"contextModelEntityPrimaryMeasure\",\n \"contextModelSecondaryMeasureGroup\",\n \"contextModelSecondaryMeasure\",\n \"dataView\",\n \"dimension\",\n \"engine\",\n \"eventQuery\",\n \"presenter\",\n \"presenterPresentation\",\n \"tool\"\n]);\nh([\"app\", \"engine\", \"connector\", \"context\", \"presenter\", \"tool\"]);\nconst te = /* @__PURE__ */ b({\n id: /* @__PURE__ */ l(),\n color: Y,\n label: /* @__PURE__ */ l()\n}), A = {\n id: /* @__PURE__ */ l(),\n label: j,\n description: j,\n firstCreatedAt: /* @__PURE__ */ f(/* @__PURE__ */ x()),\n icon: /* @__PURE__ */ m(/* @__PURE__ */ l()),\n iconDark: /* @__PURE__ */ m(/* @__PURE__ */ l()),\n lastUpdatedAt: /* @__PURE__ */ m(/* @__PURE__ */ x()),\n status: /* @__PURE__ */ m(te),\n statusId: Z\n}, he = /* @__PURE__ */ b({\n ...A,\n typeId: ee\n}), I = {\n ...A,\n version: /* @__PURE__ */ l()\n}, F = /* @__PURE__ */ b({\n id: /* @__PURE__ */ l(),\n label: j,\n description: j,\n icon: /* @__PURE__ */ m(/* @__PURE__ */ l()),\n iconDark: /* @__PURE__ */ m(/* @__PURE__ */ l()),\n order: /* @__PURE__ */ x(),\n path: /* @__PURE__ */ l()\n}), v = (t) => {\n const n = Object.entries(t).filter((e) => typeof e[1] == \"string\");\n return new Map(n);\n}, ne = (t, n, e = O) => {\n const r = t.get(n);\n if (r !== void 0) return r;\n if (e !== n)\n return t.get(e);\n}, re = [\n { id: \"alpha\", color: \"red\", labels: v({ \"en-gb\": \"alpha\" }) },\n { id: \"beta\", color: \"amber\", labels: v({ \"en-gb\": \"beta\" }) },\n { id: \"generalAvailability\", color: \"green\", labels: v({ \"en-gb\": \"\" }) },\n { id: \"notApplicable\", color: \"green\", labels: v({ \"en-gb\": \"not-applicable\" }) },\n { id: \"preAlpha\", color: \"red\", labels: v({ \"en-gb\": \"pre-alpha\" }) },\n { id: \"proposed\", color: \"other\", labels: v({ \"en-gb\": \"proposed\" }) },\n { id: \"releaseCandidate\", color: \"green\", labels: v({ \"en-gb\": \"release-candidate\" }) },\n { id: \"unavailable\", color: \"other\", labels: v({ \"en-gb\": \"unavailable\" }) },\n { id: \"underReview\", color: \"other\", labels: v({ \"en-gb\": \"under-review\" }) }\n], ve = (t, n = O) => {\n const e = re.find((r) => r.id === t);\n if (e) {\n const r = ne(e.labels, n);\n return { id: e.id, color: e.color, label: r ?? e.id };\n }\n return { id: t, color: \"other\", label: t };\n}, se = h([\"apiKey\", \"disabled\", \"oAuth2\", \"none\"]), oe = h([\"application\", \"curatedDataset\", \"database\", \"fileStore\"]), ie = h([\n \"abortOperation\",\n \"authenticateConnection\",\n \"createObject\",\n \"describeConnection\",\n \"dropObject\",\n \"findObject\",\n \"getReadableStream\",\n \"getRecord\",\n \"listNodes\",\n \"previewObject\",\n \"removeRecords\",\n \"retrieveChunks\",\n \"retrieveRecords\",\n \"upsertRecords\"\n]), ae = h([\"bidirectional\", \"destination\", \"source\", \"unknown\"]), le = /* @__PURE__ */ b({\n authMethodId: se,\n activeConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ x()),\n canDescribe: /* @__PURE__ */ f(/* @__PURE__ */ T()),\n id: /* @__PURE__ */ f(/* @__PURE__ */ l()),\n label: /* @__PURE__ */ f(Q),\n maxConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ x()),\n params: /* @__PURE__ */ f(/* @__PURE__ */ E(/* @__PURE__ */ R(/* @__PURE__ */ l(), /* @__PURE__ */ l())))\n}), Ee = /* @__PURE__ */ b({\n ...I,\n typeId: /* @__PURE__ */ k(\"connector\"),\n category: /* @__PURE__ */ m(/* @__PURE__ */ b({ id: /* @__PURE__ */ l(), label: /* @__PURE__ */ l() })),\n categoryId: oe,\n implementations: /* @__PURE__ */ R(/* @__PURE__ */ l(), le),\n operations: /* @__PURE__ */ E(ie),\n usageId: ae,\n vendorAccountURL: /* @__PURE__ */ m(/* @__PURE__ */ l()),\n vendorDocumentationURL: /* @__PURE__ */ m(/* @__PURE__ */ l()),\n vendorHomeURL: /* @__PURE__ */ m(/* @__PURE__ */ l())\n}), Se = [\"createObject\", \"dropObject\", \"removeRecords\", \"upsertRecords\"], xe = [\"findObject\", \"getRecord\", \"listNodes\", \"previewObject\", \"retrieveRecords\"], D = (t) => {\n const n = Object.entries(t).filter((e) => typeof e[1] == \"string\");\n return new Map(n);\n};\nD({ \"en-gb\": \"Application\" }), D({ \"en-gb\": \"Curated Dataset\" }), D({ \"en-gb\": \"Database\" }), D({ \"en-gb\": \"File Store\" });\nconst ce = h([\"list\"]), ue = /* @__PURE__ */ b({\n ...A,\n typeId: /* @__PURE__ */ k(\"contextModelGroup\"),\n modelRefs: /* @__PURE__ */ E(F),\n order: /* @__PURE__ */ x()\n}), ke = /* @__PURE__ */ b({\n ...I,\n typeId: /* @__PURE__ */ k(\"context\"),\n models: /* @__PURE__ */ E(ue),\n operations: /* @__PURE__ */ E(ce)\n});\nclass L extends Error {\n locator;\n constructor(n, e, r) {\n super(n, r), this.name = \"DataPosError\", this.locator = e;\n }\n}\nclass C extends L {\n constructor(n, e, r) {\n super(n, e, r), this.name = \"ApplicationError\";\n }\n}\nclass Ce extends C {\n constructor(n, e, r) {\n super(n, e, r), this.name = \"APIError\";\n }\n}\nclass Oe extends C {\n constructor(n, e, r) {\n super(n, e, r), this.name = \"EngineError\";\n }\n}\nclass G extends C {\n body;\n constructor(n, e, r, s) {\n super(n, e, s), this.name = \"FetchError\", this.body = r;\n }\n}\nclass pe extends C {\n componentName;\n info;\n constructor(n, e, r, s, o) {\n super(n, e, o), this.name = \"VueHandledError\", this.info = r, this.componentName = s;\n }\n}\nclass De extends C {\n constructor(n, e, r) {\n super(n, e, r), this.name = \"WindowHandledRuntimeError\";\n }\n}\nclass je extends C {\n constructor(n, e, r) {\n super(n, e, r), this.name = \"WindowHandledPromiseRejectionError\";\n }\n}\nclass Me extends L {\n constructor(n, e, r) {\n super(n, e, r), this.name = \"OperationalError\";\n }\n}\nasync function we(t, n, e) {\n const r = ` - ${t.statusText}`, s = `${n} Response status '${t.status}${t.statusText ? r : \"\"}' received.`, o = await t.text();\n return new G(s, e, o);\n}\nfunction Re(t) {\n return t.map((n) => n.message).join(\" \");\n}\nfunction Ae(t) {\n if (t instanceof Error) return t;\n if (typeof t == \"string\") return new Error(t);\n if (typeof t == \"number\" || typeof t == \"boolean\" || typeof t == \"bigint\") return new Error(String(t));\n if (typeof t == \"symbol\") return new Error(t.description ?? \"Unknown error\");\n if (t && typeof t == \"object\")\n try {\n return new Error(JSON.stringify(t));\n } catch {\n return new Error(\"Unknown error\");\n }\n return new Error(\"Unknown error\");\n}\nfunction Ie(t) {\n const n = /* @__PURE__ */ new Set(), e = [];\n let r = t;\n for (; r && !n.has(r); ) {\n n.add(r);\n let s;\n if (r instanceof G)\n s = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;\n else if (r instanceof pe)\n s = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;\n else if (r instanceof L)\n s = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;\n else if (r instanceof Error) {\n const o = r;\n s = { locator: \"\", message: o.message, name: o.name, stack: o.stack }, r = o.cause;\n } else\n s = { locator: \"\", message: String(r), name: \"Error\" }, r = void 0;\n /(?:\\.{3}|[.!?])$/.test(s.message) || (s.message += \".\"), e.push(s);\n }\n return e;\n}\nconst de = h([\"list\", \"render\", \"setColorMode\"]), Le = /* @__PURE__ */ b({\n ...I,\n typeId: /* @__PURE__ */ k(\"presenter\"),\n presentations: /* @__PURE__ */ E(F),\n operations: /* @__PURE__ */ E(de)\n});\nfunction Ne() {\n return { render: fe };\n}\nfunction fe(t, n, e) {\n e.textContent = \"Cytoscape.js diagram goes here...\";\n}\nfunction Pe() {\n return { render: be };\n}\nfunction be(t, n) {\n console.log(1111, t), console.log(2222, n), console.log(3333, n.childNodes), console.log(4444, n.children);\n}\nconst c = (t) => new Map(Object.entries(t)), N = (t, n, e = O) => {\n const r = t.get(n);\n if (r !== void 0) return r;\n if (e !== n)\n return t.get(e);\n}, me = [\n { id: \"dtv\", labels: c({ \"en-gb\": \"Delimited Text\" }) },\n { id: \"e/e\", labels: c({ \"en-gb\": \"Entity/Event\" }) },\n { id: \"jsonArray\", labels: c({ \"en-gb\": \"JSON Array\" }) },\n { id: \"spss\", labels: c({ \"en-gb\": \"SPSS\" }) },\n { id: \"xls\", labels: c({ \"en-gb\": \"XLS\" }) },\n { id: \"xlsx\", labels: c({ \"en-gb\": \"XLSX\" }) },\n { id: \"xml\", labels: c({ \"en-gb\": \"XML\" }) }\n], _e = (t = O) => {\n const n = [];\n for (const e of me) {\n const r = N(e.labels, t);\n n.push({ id: e.id, label: r ?? e.id });\n }\n return n;\n}, ye = [\n { id: `\n`, labels: c({ \"en-gb\": \"Newline\" }) },\n { id: \"\\r\", labels: c({ \"en-gb\": \"Carriage Return\" }) },\n { id: `\\r\n`, labels: c({ \"en-gb\": \"Carriage Return/Newline\" }) }\n], Te = (t = O) => {\n const n = [];\n for (const e of ye) {\n const r = N(e.labels, t);\n n.push({ id: e.id, label: r ?? e.id });\n }\n return n;\n}, ge = [\n { id: \":\", labels: c({ \"en-gb\": \"Colon\" }) },\n { id: \",\", labels: c({ \"en-gb\": \"Comma\" }) },\n { id: \"!\", labels: c({ \"en-gb\": \"Exclamation Mark\" }) },\n // { id: '', label: { 'en-gb': 'Other' } }, // TODO: Maybe set this to a 'not printing' or special ascii character when there is a user supplied delimited, rather than ''?\n { id: \"0x1E\", labels: c({ \"en-gb\": \"Record Separator\" }) },\n { id: \";\", labels: c({ \"en-gb\": \"Semicolon\" }) },\n { id: \" \", labels: c({ \"en-gb\": \"Space\" }) },\n { id: \"\t\", labels: c({ \"en-gb\": \"Tab\" }) },\n { id: \"_\", labels: c({ \"en-gb\": \"Underscore\" }) },\n { id: \"0x1F\", labels: c({ \"en-gb\": \"Unit Separator\" }) },\n { id: \"|\", labels: c({ \"en-gb\": \"Vertical Bar\" }) }\n], Ue = (t = O) => {\n const n = [];\n for (const e of ge) {\n const r = N(e.labels, t);\n n.push({ id: e.id, label: r ?? e.id });\n }\n return n;\n}, O = \"en-gb\";\nexport {\n Ce as APIError,\n C as ApplicationError,\n Se as CONNECTOR_DESTINATION_OPERATIONS,\n xe as CONNECTOR_SOURCE_OPERATIONS,\n O as DEFAULT_LOCALE_CODE,\n Oe as EngineError,\n G as FetchError,\n Me as OperationalError,\n pe as VueError,\n je as WindowPromiseRejectionError,\n De as WindowRuntimeError,\n we as buildFetchError,\n he as componentConfigSchema,\n Re as concatenateSerialisedErrorMessages,\n Ee as connectorConfigSchema,\n ke as contextConfigSchema,\n ve as getComponentStatus,\n _e as getDataFormats,\n Te as getRecordDelimiters,\n Ue as getValueDelimiters,\n Ae as normalizeToError,\n Le as presenterConfigSchema,\n Ie as serialiseError,\n Ne as useCytoscapeJS,\n Pe as useDataTable\n};\n","const c = \"en-US\", s = /* @__PURE__ */ new Map();\nfunction f(e) {\n switch (e) {\n case \"Edm.Binary\":\n return \"unknown\";\n // Binary...\n case \"Edm.Boolean\":\n return \"boolean\";\n case \"Edm.Byte\":\n return \"wholeNumber\";\n case \"Edm.DateTime\":\n return \"moment\";\n // DateTime...\n case \"Edm.DateTimeOffset\":\n return \"moment\";\n // DateTimeOffset...\n case \"Edm.Decimal\":\n return \"decimalNumber\";\n case \"Edm.Double\":\n return \"decimalNumber\";\n case \"Edm.Guid\":\n return \"string\";\n case \"Edm.Int16\":\n return \"wholeNumber\";\n case \"Edm.Int32\":\n return \"wholeNumber\";\n case \"Edm.Int64\":\n return \"wholeNumber\";\n case \"Edm.SByte\":\n return \"wholeNumber\";\n case \"Edm.Single\":\n return \"decimalNumber\";\n case \"Edm.String\":\n return \"string\";\n case \"Edm.Time\":\n return \"momentTime\";\n // Time...\n default:\n return \"unknown\";\n }\n}\nfunction l(e) {\n if (e) {\n const t = e.lastIndexOf(\"/\"), n = e.lastIndexOf(\".\", t === -1 ? e.length : t);\n return n === -1 ? e : e.slice(0, Math.max(0, n));\n }\n}\nfunction m(e) {\n if (e) {\n const t = e.lastIndexOf(\".\");\n if (t !== -1) return e.slice(Math.max(0, t + 1));\n }\n}\nfunction r(e, t = 2, n = t, i = c) {\n if (e == null) return \"\";\n const u = `${i}decimal${t}.${n}`;\n let a = s.get(u);\n return a || (a = new Intl.NumberFormat(i, {\n localeMatcher: \"best fit\",\n maximumFractionDigits: t,\n minimumFractionDigits: n,\n minimumIntegerDigits: 1,\n style: \"decimal\",\n useGrouping: !0\n }), s.set(u, a)), a.format(e);\n}\nfunction d(e) {\n return e == null ? \"\" : e < 1e3 ? o(e) : e < 1e6 ? `${r(e / 1e3, 2, 0)}K` : e < 1e9 ? `${r(e / 1e6, 2, 0)}M` : e < 1e12 ? `${r(e / 1e9, 2, 0)}B` : `${r(e / 1e12, 2, 0)}T`;\n}\nfunction x(e) {\n return e == null ? \"\" : e === 1 ? \"1 byte\" : e < 1024 ? `${o(e)} bytes` : e < 1048576 ? `${r(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${r(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${r(e / 1073741824, 2, 0)} GB` : `${r(e / 1099511627776, 2, 0)} TB`;\n}\nfunction p(e) {\n return e == null ? \"\" : e < 1e3 ? `${o(e)} ms` : e === 1e3 ? `${o(e)} sec` : e < 6e4 ? `${r(e / 1e3, 2, 0)} secs` : e === 6e4 ? \"1 min\" : e < 36e5 ? `${r(e / 6e4, 2, 0)} mins` : e === 36e5 ? \"1 hr\" : e < 864e5 ? `${r(e / 36e5, 2, 0)} hrs` : e === 864e5 ? \"1 day\" : `${r(e / 864e5, 2, 0)} days`;\n}\nfunction o(e, t = c) {\n if (e == null) return \"\";\n const n = `${t}decimal0.0`;\n let i = s.get(n);\n return i || (i = new Intl.NumberFormat(t, {\n localeMatcher: \"best fit\",\n maximumFractionDigits: 0,\n minimumFractionDigits: 0,\n minimumIntegerDigits: 1,\n style: \"decimal\",\n useGrouping: !0\n }), s.set(n, i)), i.format(e);\n}\nfunction E(e) {\n switch (e) {\n case \"csv\":\n return \"text/csv\";\n case \"tab\":\n case \"tsv\":\n return \"text/tab-separated-values\";\n case \"xls\":\n return \"application/vnd.ms-excel\";\n case \"xlsx\":\n return \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n default:\n return \"application/octet-stream\";\n }\n}\nexport {\n f as convertODataTypeIdToUsageTypeId,\n m as extractExtensionFromPath,\n l as extractNameFromPath,\n r as formatNumberAsDecimalNumber,\n p as formatNumberAsDuration,\n d as formatNumberAsSize,\n x as formatNumberAsStorageSize,\n o as formatNumberAsWholeNumber,\n E as lookupMimeTypeForExtension\n};\n","// Dependencies - Framework\nimport type * as RustModule from '../rust/datapos-connector-file-store-emulator-core/pkg/datapos_connector_file_store_emulator_core.js';\n\n// Interfaces/Types\ntype RustBindings = typeof RustModule;\n\n// Module Variables\nlet rustBindingsPromise: Promise<RustBindings> | undefined;\n\n// Utilities\nasync function addNumbersWithRust(left: number, right: number): Promise<number> {\n const { add_my_numbers } = await loadRustBindings();\n console.log(1111, left, right);\n const yyyy = add_my_numbers(Math.trunc(left), Math.trunc(right));\n console.log(2222, yyyy);\n return yyyy;\n}\n\n// Utilities\nasync function checksumWithRust(input: string): Promise<number> {\n const { checksum_from_rust } = await loadRustBindings();\n return checksum_from_rust(input);\n}\n\n// Helpers\nasync function loadRustBindings(): Promise<RustBindings> {\n rustBindingsPromise ??= import('../rust/datapos-connector-file-store-emulator-core/pkg/datapos_connector_file_store_emulator_core.js');\n return rustBindingsPromise;\n}\n\n// Exposures\nexport { addNumbersWithRust, checksumWithRust };\n","/*\n * File store emulator connector class.\n */\n\n// NOTE: Consider Cloudflare R2 Download URL: https://plugins-eu.datapositioning.app/connectors/datapos-connector-file-store-emulator-es.js. This would allow us to secure the bucket?\n\n/** Dependencies - Vendor. */\nimport { nanoid } from 'nanoid';\n\n/** Dependencies - Framework. */\nimport type { Tool as CSVParseTool } from '@datapos/datapos-tool-csv-parse';\nimport { buildFetchError, normalizeToError, OperationalError } from '@datapos/datapos-shared';\nimport type {\n ConnectionConfig,\n ConnectionNodeConfig,\n Connector,\n ConnectorConfig,\n ConnectorTools,\n FindResult,\n FindSettings,\n GetReadableStreamResult,\n GetReadableStreamSettings,\n ListResult,\n ListSettings,\n PreviewResult,\n PreviewSettings,\n RetrieveRecordsSettings,\n RetrieveRecordsSummary,\n ToolConfig\n} from '@datapos/datapos-shared';\nimport { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from '@datapos/datapos-shared/utilities';\n\n/** Dependencies - Data. */\nimport config from '~/config.json';\nimport fileStoreIndex from '@/fileStoreIndex.json';\nimport { version } from '~/package.json';\nimport { addNumbersWithRust, checksumWithRust } from '@/rustBridge';\n\n/** Interfaces/Types - File store index. */\ntype FileStoreIndexItem =\n | ({ typeId: 'folder'; childCount: number } & { name: string })\n | ({ typeId: 'object'; id: string; lastModifiedAt: number; size: number } & { name: string });\ntype FileStoreIndex = Record<string, FileStoreIndexItem[]>;\n\n/** Constants */\nconst CALLBACK_PREVIEW_ABORTED = 'Connector failed to abort preview object operation.';\nconst CALLBACK_RETRIEVE_ABORTED = 'Connector failed to abort retrieve all records operation.';\nconst DEFAULT_PREVIEW_CHUNK_SIZE = 4096;\nconst DEFAULT_RETRIEVE_CHUNK_SIZE = 1000;\nconst URL_PREFIX = 'https://sample-data-eu.datapos.app';\n\n/** Classes - File store emulator connector. */\nexport default class FileStoreEmulatorConnector implements Connector {\n abortController: AbortController | undefined;\n readonly config: ConnectorConfig;\n readonly connectionConfig: ConnectionConfig;\n readonly tools: ConnectorTools;\n readonly toolConfigs;\n\n constructor(connectionConfig: ConnectionConfig, tools: ConnectorTools, toolConfigs: ToolConfig[]) {\n this.abortController = undefined;\n this.config = config as ConnectorConfig;\n this.config.version = version;\n this.connectionConfig = connectionConfig;\n this.tools = tools;\n this.toolConfigs = toolConfigs;\n }\n\n // Operations - Abort operation.\n abortOperation(connector: FileStoreEmulatorConnector): void {\n if (!connector.abortController) return;\n connector.abortController.abort();\n connector.abortController = undefined;\n }\n\n // Operations - Find object.\n findObject(connector: FileStoreEmulatorConnector, settings: FindSettings): Promise<FindResult> {\n // Loop through the file store index checking for an object entry with an identifier equal to the object name.\n for (const folderPath in fileStoreIndex) {\n if (Object.prototype.hasOwnProperty.call(fileStoreIndex, folderPath)) {\n // eslint-disable-next-line security/detect-object-injection\n const indexItems = (fileStoreIndex as FileStoreIndex)[folderPath];\n const indexItem = indexItems?.find((indexItem) => indexItem.typeId === 'object' && indexItem.id === settings.objectName);\n if (indexItem) return Promise.resolve({ folderPath }); // Found, return folder path.\n }\n }\n return Promise.resolve({}); // Not found, return undefined folder path.\n }\n\n // Operations - Get readable stream.\n async getReadableStream(connector: FileStoreEmulatorConnector, settings: GetReadableStreamSettings): Promise<GetReadableStreamResult> {\n try {\n console.log('getReader', 'connector', connector);\n console.log('getReader', 'settings', settings);\n // const response = await fetch('https://sample-data-eu.datapos.app/fileStore/ENGAGEMENT_START_EVENTS_202405121858.csv');\n const response = await fetch('https://sample-data-eu.datapos.app/WDI_Data.csv');\n console.log('getReader', 'response', response);\n if (!response.body) throw new Error('ReadableStream not supported by this browser.');\n\n const xxx = await addNumbersWithRust(12, 56);\n const sum = await checksumWithRust(connector.config.version);\n console.log('sum', sum, xxx);\n\n return await Promise.resolve({ readable: response.body }); // Not found, return undefined folder path.\n } catch (error) {\n connector.abortController = undefined;\n throw error;\n }\n }\n\n // Operations - List nodes.\n listNodes(connector: FileStoreEmulatorConnector, settings: ListSettings): Promise<ListResult> {\n const indexItems = (fileStoreIndex as FileStoreIndex)[settings.folderPath] ?? [];\n const connectionNodeConfigs: ConnectionNodeConfig[] = [];\n for (const indexItem of indexItems) {\n if (indexItem.typeId === 'folder') {\n connectionNodeConfigs.push(this.constructFolderNodeConfig(settings.folderPath, indexItem.name, indexItem.childCount));\n } else {\n connectionNodeConfigs.push(this.constructObjectNodeConfig(settings.folderPath, indexItem.id, indexItem.name, indexItem.lastModifiedAt, indexItem.size));\n }\n }\n return Promise.resolve({ cursor: undefined, isMore: false, connectionNodeConfigs, totalCount: connectionNodeConfigs.length });\n }\n\n // Operations - Preview object.\n async previewObject(connector: FileStoreEmulatorConnector, settings: PreviewSettings): Promise<PreviewResult> {\n try {\n // Create an abort controller. Get the signal for the abort controller and add an abort listener.\n connector.abortController = new AbortController();\n const signal = connector.abortController.signal;\n signal.addEventListener('abort', () => {\n throw new OperationalError(CALLBACK_PREVIEW_ABORTED, 'datapos-connector-file-store-emulator|Connector|preview.abort');\n });\n\n // Fetch chunk from start of file.\n const url = `${URL_PREFIX}/fileStore${settings.path}`;\n const chunkSize = settings.chunkSize ?? DEFAULT_PREVIEW_CHUNK_SIZE;\n const headers: HeadersInit = { Range: `bytes=0-${chunkSize}` };\n const response = await fetch(encodeURI(url), { headers, signal });\n if (response.ok) {\n connector.abortController = undefined;\n return { data: new Uint8Array(await response.arrayBuffer()), typeId: 'uint8Array' };\n } else {\n throw await buildFetchError(response, `Failed to fetch '${settings.path}' file.`, 'datapos-connector-file-store-emulator|Connector|preview');\n }\n } catch (error) {\n connector.abortController = undefined;\n throw error;\n }\n }\n\n // Operations - Retrieve records.\n async retrieveRecords(\n connector: FileStoreEmulatorConnector,\n settings: RetrieveRecordsSettings,\n chunk: (records: string[][]) => void,\n complete: (result: RetrieveRecordsSummary) => void\n ): Promise<void> {\n const csvParseTool = await connector.loadTool<CSVParseTool>('csv-parse');\n console.log(1234, csvParseTool);\n return new Promise((resolve, reject) => {\n try {\n // Create an abort controller and get the signal. Add an abort listener to the signal.\n connector.abortController = new AbortController();\n const signal = connector.abortController.signal;\n signal.addEventListener(\n 'abort',\n () => {\n connector.abortController = undefined;\n reject(new OperationalError(CALLBACK_RETRIEVE_ABORTED, 'datapos-connector-file-store-emulator|Connector|retrieve.abort'));\n },\n { once: true }\n );\n\n // Parser - Declare variables.\n let pendingRows: string[][] = []; // Array to store rows of parsed field values and associated information.\n\n // Parser - Create a parser object for CSV parsing.\n const parser = csvParseTool.buildParser({\n delimiter: settings.valueDelimiterId,\n info: true,\n relax_column_count: true,\n relax_quotes: true\n });\n\n // Parser - Event listener for the 'readable' (data available) event.\n parser.on('readable', () => {\n try {\n let data: string[] | null;\n while ((data = parser.read() as string[] | null) !== null) {\n signal.throwIfAborted(); // Check if the abort signal has been triggered.\n pendingRows.push(data); // Append the row of parsed values and associated information to the pending rows array.\n if (pendingRows.length < DEFAULT_RETRIEVE_CHUNK_SIZE) continue; // Continue with next iteration if the pending rows array is not yet full.\n chunk(pendingRows); // Pass the pending rows to the engine using the 'chunk' callback.\n pendingRows = []; // Clear the pending rows array in preparation for the next batch of data.\n }\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n\n // Parser - Event listener for the 'error' event.\n parser.on('error', (error) => {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n });\n\n // Parser - Event listener for the 'end' (end of data) event.\n parser.on('end', () => {\n try {\n signal.throwIfAborted(); // Check if the abort signal has been triggered.\n connector.abortController = undefined; // Clear the abort controller.\n if (pendingRows.length > 0) {\n chunk(pendingRows);\n pendingRows = [];\n }\n complete({\n byteCount: parser.info.bytes,\n commentLineCount: parser.info.comment_lines,\n emptyLineCount: parser.info.empty_lines,\n invalidFieldLengthCount: parser.info.invalid_field_length,\n lineCount: parser.info.lines,\n recordCount: parser.info.records\n });\n resolve();\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n\n // Fetch, decode and forward the contents of the file to the parser.\n const url = `${URL_PREFIX}/fileStore${settings.path}`;\n fetch(encodeURI(url), { signal })\n .then(async (response) => {\n try {\n if (response.ok && response.body) {\n const stream = response.body.pipeThrough(new TextDecoderStream(settings.encodingId));\n const decodedStreamReader = stream.getReader();\n let result = await decodedStreamReader.read();\n while (!result.done) {\n signal.throwIfAborted(); // Check if the abort signal has been triggered.\n // Write the decoded data to the parser and terminate if there is an error.\n parser.write(result.value, (error) => {\n if (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n result = await decodedStreamReader.read();\n }\n parser.end(); // Signal no more data will be written.\n } else {\n const error = await connector.tools.dataPos.buildFetchError(\n response,\n `Failed to fetch '${settings.path}' file.`,\n 'datapos-connector-file-store-emulator|Connector|retrieve'\n );\n connector.abortController = undefined;\n reject(error);\n }\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n })\n .catch((error: unknown) => {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n });\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n }\n\n /** Utilities - Construct folder node configuration. */\n private constructFolderNodeConfig(folderPath: string, name: string, childCount: number): ConnectionNodeConfig {\n return { id: nanoid(), childCount, folderPath, label: name, name, typeId: 'folder' };\n }\n\n /** Utilities - Construct object (file) node configuration. */\n private constructObjectNodeConfig(folderPath: string, id: string, fullName: string, lastModifiedAt: number, size: number): ConnectionNodeConfig {\n const name = extractNameFromPath(fullName) ?? '';\n const extension = extractExtensionFromPath(fullName);\n const lastModifiedAtTimestamp = lastModifiedAt;\n const mimeType = lookupMimeTypeForExtension(extension);\n return { id, extension, folderPath, label: fullName, lastModifiedAt: lastModifiedAtTimestamp, mimeType, name, size, typeId: 'object' };\n }\n\n // Helpers - Load tool.\n private async loadTool<T>(toolId: string): Promise<T> {\n const toolName = `datapos-tool-${toolId}`;\n const toolModuleConfig = this.toolConfigs.find((config) => config.id === toolName);\n if (!toolModuleConfig) throw new Error(`Unknown tool '${toolId}'.`);\n\n const url = `https://engine-eu.datapos.app/tools/${toolId}_v${toolModuleConfig.version}/${toolName}.es.js`;\n const toolModule = (await import(/* @vite-ignore */ url)) as { Tool: new () => T };\n const toolInstance = new toolModule.Tool();\n return toolInstance;\n }\n}\n"],"names":["urlAlphabet","nanoid","size","id","bytes","scopedUrlAlphabet","M","V","z","H","$","W","X","B","n","_","y","e","r","s","o","i","u","p","d","g","K","k","P","U","h","v","D","L","C","G","Me","we","Ae","c","l","t","m","E","rustBindingsPromise","addNumbersWithRust","left","right","add_my_numbers","loadRustBindings","yyyy","checksumWithRust","input","checksum_from_rust","CALLBACK_PREVIEW_ABORTED","CALLBACK_RETRIEVE_ABORTED","DEFAULT_PREVIEW_CHUNK_SIZE","DEFAULT_RETRIEVE_CHUNK_SIZE","URL_PREFIX","FileStoreEmulatorConnector","connectionConfig","tools","toolConfigs","config","version","connector","settings","folderPath","fileStoreIndex","indexItem","response","xxx","sum","error","indexItems","connectionNodeConfigs","signal","OperationalError","url","headers","buildFetchError","chunk","complete","csvParseTool","resolve","reject","pendingRows","parser","data","normalizeToError","decodedStreamReader","result","name","childCount","fullName","lastModifiedAt","extractNameFromPath","extension","extractExtensionFromPath","lastModifiedAtTimestamp","mimeType","lookupMimeTypeForExtension","toolId","toolName","toolModuleConfig","toolModule"],"mappings":"AAAO,MAAMA,IACX;ACoBK,IAAIC,IAAS,CAACC,IAAO,OAAO;AACjC,MAAIC,IAAK,IACLC,IAAQ,OAAO,gBAAgB,IAAI,WAAYF,KAAQ,CAAC,CAAE;AAC9D,SAAOA;AACL,IAAAC,KAAME,EAAkBD,EAAMF,CAAI,IAAI,EAAE;AAE1C,SAAOC;AACT,GC5BIG;AAAA;AAEJ,SAASC,EAAE,GAAG;AACZ,SAAO;AAAA,IACL,MAAM,GAAG,QAAQD,GAAG;AAAA,IACpB,SAAS,GAAG;AAAA,IACZ,YAAY,GAAG,cAAcA,GAAG;AAAA,IAChC,gBAAgB,GAAG,kBAAkBA,GAAG;AAAA,EAC5C;AACA;AACA,IAAIE;AAAA;AAEJ,SAASC,EAAE,GAAG;AACZ,SAAOD,GAAG,IAAI,CA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ACJ,CAAC,EACA,MAAM,CAACA,MAAmB;AACvB,UAAAR,EAAU,kBAAkB,QAC5BoB,EAAOI,EAAiBhB,CAAK,CAAC;AAAA,QAClC,CAAC;AAAA,MACT,SAASA,GAAO;AACZ,QAAAR,EAAU,kBAAkB,QAC5BoB,EAAOI,EAAiBhB,CAAK,CAAC;AAAA,MAClC;AAAA,IACJ,CAAC;AAAA,EACL;AAAA;AAAA,EAGQ,0BAA0BN,GAAoByB,GAAcC,GAA0C;AAC1G,WAAO,EAAE,IAAI5F,EAAA,GAAU,YAAA4F,GAAY,YAAA1B,GAAY,OAAOyB,GAAM,MAAAA,GAAM,QAAQ,SAAA;AAAA,EAC9E;AAAA;AAAA,EAGQ,0BAA0BzB,GAAoBhE,GAAY2F,GAAkBC,GAAwB7F,GAAoC;AAC5I,UAAM0F,IAAOI,EAAoBF,CAAQ,KAAK,IACxCG,IAAYC,EAAyBJ,CAAQ,GAC7CK,IAA0BJ,GAC1BK,IAAWC,EAA2BJ,CAAS;AACrD,WAAO,EAAE,IAAA9F,GAAI,WAAA8F,GAAW,YAAA9B,GAAY,OAAO2B,GAAU,gBAAgBK,GAAyB,UAAAC,GAAU,MAAAR,GAAM,MAAA1F,GAAM,QAAQ,SAAA;AAAA,EAChI;AAAA;AAAA,EAGA,MAAc,SAAYoG,GAA4B;AAClD,UAAMC,IAAW,gBAAgBD,CAAM,IACjCE,IAAmB,KAAK,YAAY,KAAK,CAACzC,MAAWA,EAAO,OAAOwC,CAAQ;AACjF,QAAI,CAACC,EAAkB,OAAM,IAAI,MAAM,iBAAiBF,CAAM,IAAI;AAGlE,UAAMG,IAAc,MAAM,OADd,uCAAuCH,CAAM,KAAKE,EAAiB,OAAO,IAAID,CAAQ;AAGlG,WADqB,IAAIE,EAAW,KAAA;AAAA,EAExC;AACJ;","x_google_ignoreList":[0,1,2,3]}
|
|
1
|
+
{"version":3,"file":"datapos-connector-file-store-emulator.es.js","sources":["../node_modules/nanoid/url-alphabet/index.js","../node_modules/nanoid/index.browser.js","../node_modules/@datapos/datapos-shared/dist/datapos-shared-errors.es.js","../node_modules/@datapos/datapos-shared/dist/datapos-shared-utilities.es.js","../src/rustBridge.ts","../src/index.ts"],"sourcesContent":["export const urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n","/* @ts-self-types=\"./index.d.ts\" */\nimport { urlAlphabet as scopedUrlAlphabet } from './url-alphabet/index.js'\nexport { urlAlphabet } from './url-alphabet/index.js'\nexport let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nexport let customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << Math.log2(alphabet.length - 1)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step | 0\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length >= size) return id\n }\n }\n }\n}\nexport let customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size | 0, random)\nexport let nanoid = (size = 21) => {\n let id = ''\n let bytes = crypto.getRandomValues(new Uint8Array((size |= 0)))\n while (size--) {\n id += scopedUrlAlphabet[bytes[size] & 63]\n }\n return id\n}\n","class i extends Error {\n locator;\n /** Logical source of the error. */\n constructor(o, t, r) {\n super(o, r), this.name = new.target.name, this.locator = t;\n }\n}\nclass a extends i {\n}\nclass g extends a {\n}\nclass p extends a {\n}\nclass c extends a {\n body;\n /** Sanitized HTTP response body. */\n constructor(o, t, r, n) {\n super(o, t, n), this.name = new.target.name, this.body = E(r ?? void 0);\n }\n}\nclass y extends i {\n}\nclass m extends a {\n componentName;\n /** Vue component name, if available. */\n info;\n /** Vue error info string. */\n constructor(o, t, r, n, s) {\n super(o, t, s), this.name = new.target.name, this.info = r, this.componentName = n;\n }\n}\nclass w extends a {\n}\nclass b extends a {\n}\nasync function h(e, o, t) {\n const r = ` - ${e.statusText}`, n = `${o} Response status '${e.status}${e.statusText ? r : \"\"}' received.`;\n let s;\n try {\n s = await e.text();\n } catch (d) {\n s = `<body unavailable: ${l(d).message}>`;\n }\n return new c(n, t, s);\n}\nfunction k(e) {\n return e.map((o) => o.message).join(\" \");\n}\nfunction l(e) {\n if (e instanceof Error) return e;\n if (typeof e == \"string\") return new Error(e);\n if (typeof e == \"number\" || typeof e == \"boolean\" || typeof e == \"bigint\") return new Error(String(e));\n if (typeof e == \"symbol\") return new Error(e.description ?? \"Unknown error\");\n if (e != null && typeof e == \"object\")\n try {\n return new Error(JSON.stringify(e));\n } catch {\n return new Error(\"Unknown error\");\n }\n return new Error(\"Unknown error\");\n}\nfunction x(e) {\n const o = /* @__PURE__ */ new Set(), t = [];\n let r = e;\n for (; r != null && !o.has(r); ) {\n o.add(r);\n let n;\n if (r instanceof c)\n n = { componentName: void 0, body: r.body, info: void 0, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;\n else if (r instanceof m)\n n = {\n componentName: r.componentName,\n body: void 0,\n info: r.info,\n locator: r.locator,\n message: r.message,\n name: r.name,\n stack: r.stack\n }, r = r.cause;\n else if (r instanceof i)\n n = { componentName: void 0, body: void 0, info: void 0, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;\n else if (r instanceof Error) {\n const s = r;\n n = { componentName: void 0, body: void 0, info: void 0, locator: \"\", message: s.message, name: s.name, stack: s.stack }, r = s.cause;\n } else\n n = { componentName: void 0, body: void 0, info: void 0, locator: \"\", message: f(r), name: \"Error\", stack: void 0 }, r = void 0;\n /(?:\\.{3}|[.!?])$/.test(n.message) || (n.message += \".\"), t.push(n);\n }\n return t;\n}\nfunction f(e) {\n let o;\n try {\n o = JSON.stringify(e);\n } catch {\n typeof e == \"symbol\" ? o = e.description ?? \"Unknown error\" : typeof e == \"bigint\" ? o = e.toString() : o = \"Unknown error\";\n }\n return o === \"\" && (o = \"Unknown error\"), o;\n}\nfunction E(e) {\n if (!(e == null || e === \"\"))\n return e.length > 2048 ? `${e.slice(0, 2048)}... [truncated]` : e;\n}\nexport {\n g as APIError,\n a as ApplicationError,\n p as EngineError,\n c as FetchError,\n y as OperationalError,\n m as VueHandledError,\n b as WindowHandledPromiseRejectionError,\n w as WindowHandledRuntimeError,\n h as buildFetchError,\n k as concatenateSerialisedErrorMessages,\n l as normalizeToError,\n x as serialiseError\n};\n","const c = \"en-US\", s = /* @__PURE__ */ new Map();\nfunction f(e) {\n switch (e) {\n case \"Edm.Binary\":\n return \"unknown\";\n // Binary...\n case \"Edm.Boolean\":\n return \"boolean\";\n case \"Edm.Byte\":\n return \"wholeNumber\";\n case \"Edm.DateTime\":\n return \"moment\";\n // DateTime...\n case \"Edm.DateTimeOffset\":\n return \"moment\";\n // DateTimeOffset...\n case \"Edm.Decimal\":\n return \"decimalNumber\";\n case \"Edm.Double\":\n return \"decimalNumber\";\n case \"Edm.Guid\":\n return \"string\";\n case \"Edm.Int16\":\n return \"wholeNumber\";\n case \"Edm.Int32\":\n return \"wholeNumber\";\n case \"Edm.Int64\":\n return \"wholeNumber\";\n case \"Edm.SByte\":\n return \"wholeNumber\";\n case \"Edm.Single\":\n return \"decimalNumber\";\n case \"Edm.String\":\n return \"string\";\n case \"Edm.Time\":\n return \"momentTime\";\n // Time...\n default:\n return \"unknown\";\n }\n}\nfunction l(e) {\n if (e) {\n const t = e.lastIndexOf(\"/\"), n = e.lastIndexOf(\".\", t === -1 ? e.length : t);\n return n === -1 ? e : e.slice(0, Math.max(0, n));\n }\n}\nfunction m(e) {\n if (e) {\n const t = e.lastIndexOf(\".\");\n if (t !== -1) return e.slice(Math.max(0, t + 1));\n }\n}\nfunction r(e, t = 2, n = t, i = c) {\n if (e == null) return \"\";\n const u = `${i}decimal${t}.${n}`;\n let a = s.get(u);\n return a || (a = new Intl.NumberFormat(i, {\n localeMatcher: \"best fit\",\n maximumFractionDigits: t,\n minimumFractionDigits: n,\n minimumIntegerDigits: 1,\n style: \"decimal\",\n useGrouping: !0\n }), s.set(u, a)), a.format(e);\n}\nfunction d(e) {\n return e == null ? \"\" : e < 1e3 ? o(e) : e < 1e6 ? `${r(e / 1e3, 2, 0)}K` : e < 1e9 ? `${r(e / 1e6, 2, 0)}M` : e < 1e12 ? `${r(e / 1e9, 2, 0)}B` : `${r(e / 1e12, 2, 0)}T`;\n}\nfunction x(e) {\n return e == null ? \"\" : e === 1 ? \"1 byte\" : e < 1024 ? `${o(e)} bytes` : e < 1048576 ? `${r(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${r(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${r(e / 1073741824, 2, 0)} GB` : `${r(e / 1099511627776, 2, 0)} TB`;\n}\nfunction p(e) {\n return e == null ? \"\" : e < 1e3 ? `${o(e)} ms` : e === 1e3 ? `${o(e)} sec` : e < 6e4 ? `${r(e / 1e3, 2, 0)} secs` : e === 6e4 ? \"1 min\" : e < 36e5 ? `${r(e / 6e4, 2, 0)} mins` : e === 36e5 ? \"1 hr\" : e < 864e5 ? `${r(e / 36e5, 2, 0)} hrs` : e === 864e5 ? \"1 day\" : `${r(e / 864e5, 2, 0)} days`;\n}\nfunction o(e, t = c) {\n if (e == null) return \"\";\n const n = `${t}decimal0.0`;\n let i = s.get(n);\n return i || (i = new Intl.NumberFormat(t, {\n localeMatcher: \"best fit\",\n maximumFractionDigits: 0,\n minimumFractionDigits: 0,\n minimumIntegerDigits: 1,\n style: \"decimal\",\n useGrouping: !0\n }), s.set(n, i)), i.format(e);\n}\nfunction E(e) {\n switch (e) {\n case \"csv\":\n return \"text/csv\";\n case \"tab\":\n case \"tsv\":\n return \"text/tab-separated-values\";\n case \"xls\":\n return \"application/vnd.ms-excel\";\n case \"xlsx\":\n return \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n default:\n return \"application/octet-stream\";\n }\n}\nexport {\n f as convertODataTypeIdToUsageTypeId,\n m as extractExtensionFromPath,\n l as extractNameFromPath,\n r as formatNumberAsDecimalNumber,\n p as formatNumberAsDuration,\n d as formatNumberAsSize,\n x as formatNumberAsStorageSize,\n o as formatNumberAsWholeNumber,\n E as lookupMimeTypeForExtension\n};\n","// Dependencies - Framework\nimport type * as RustModule from '../rust/datapos-connector-file-store-emulator-core/pkg/datapos_connector_file_store_emulator_core.js';\n\n// Interfaces/Types\ntype RustBindings = typeof RustModule;\n\n// Module Variables\nlet rustBindingsPromise: Promise<RustBindings> | undefined;\n\n// Utilities\nasync function addNumbersWithRust(left: number, right: number): Promise<number> {\n const { add_my_numbers } = await loadRustBindings();\n console.log(1111, left, right);\n const yyyy = add_my_numbers(Math.trunc(left), Math.trunc(right));\n console.log(2222, yyyy);\n return yyyy;\n}\n\n// Utilities\nasync function checksumWithRust(input: string): Promise<number> {\n const { checksum_from_rust } = await loadRustBindings();\n return checksum_from_rust(input);\n}\n\n// Helpers\nasync function loadRustBindings(): Promise<RustBindings> {\n rustBindingsPromise ??= import('../rust/datapos-connector-file-store-emulator-core/pkg/datapos_connector_file_store_emulator_core.js');\n return rustBindingsPromise;\n}\n\n// Exposures\nexport { addNumbersWithRust, checksumWithRust };\n","/*\n * File store emulator connector class.\n */\n\n// NOTE: Consider Cloudflare R2 Download URL: https://plugins-eu.datapositioning.app/connectors/datapos-connector-file-store-emulator-es.js. This would allow us to secure the bucket?\n\n/** Dependencies - Vendor. */\nimport { nanoid } from 'nanoid';\n\n/** Dependencies - Framework. */\nimport type { Tool as CSVParseTool } from '@datapos/datapos-tool-csv-parse';\nimport type { ToolConfig } from '@datapos/datapos-shared';\nimport { buildFetchError, normalizeToError, OperationalError } from '@datapos/datapos-shared/errors';\nimport type {\n ConnectionConfig,\n ConnectionNodeConfig,\n Connector,\n ConnectorConfig,\n FindResult,\n FindSettings,\n GetReadableStreamResult,\n GetReadableStreamSettings,\n ListResult,\n ListSettings,\n PreviewResult,\n PreviewSettings,\n RetrieveRecordsSettings,\n RetrieveRecordsSummary\n} from '@datapos/datapos-shared/component/connector';\nimport { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from '@datapos/datapos-shared/utilities';\n\n/** Dependencies - Data. */\nimport config from '~/config.json';\nimport fileStoreIndex from '@/fileStoreIndex.json';\nimport { version } from '~/package.json';\nimport { addNumbersWithRust, checksumWithRust } from '@/rustBridge';\n\n/** Interfaces/Types - File store index. */\ntype FileStoreIndexItem =\n | ({ typeId: 'folder'; childCount: number } & { name: string })\n | ({ typeId: 'object'; id: string; lastModifiedAt: number; size: number } & { name: string });\ntype FileStoreIndex = Record<string, FileStoreIndexItem[]>;\n\n/** Constants */\nconst CALLBACK_PREVIEW_ABORTED = 'Connector failed to abort preview object operation.';\nconst CALLBACK_RETRIEVE_ABORTED = 'Connector failed to abort retrieve all records operation.';\nconst DEFAULT_PREVIEW_CHUNK_SIZE = 4096;\nconst DEFAULT_RETRIEVE_CHUNK_SIZE = 1000;\nconst URL_PREFIX = 'https://sample-data-eu.datapos.app';\n\n/** Classes - File store emulator connector. */\nexport default class FileStoreEmulatorConnector implements Connector {\n abortController: AbortController | undefined;\n readonly config: ConnectorConfig;\n readonly connectionConfig: ConnectionConfig;\n readonly toolConfigs;\n\n constructor(connectionConfig: ConnectionConfig, toolConfigs: ToolConfig[]) {\n this.abortController = undefined;\n this.config = config as ConnectorConfig;\n this.config.version = version;\n this.connectionConfig = connectionConfig;\n this.toolConfigs = toolConfigs;\n }\n\n // Operations - Abort operation.\n abortOperation(connector: Connector): void {\n if (!connector.abortController) return;\n connector.abortController.abort();\n connector.abortController = undefined;\n }\n\n // Operations - Find object.\n findObject(connector: Connector, settings: FindSettings): Promise<FindResult> {\n // Loop through the file store index checking for an object entry with an identifier equal to the object name.\n for (const folderPath in fileStoreIndex) {\n if (Object.prototype.hasOwnProperty.call(fileStoreIndex, folderPath)) {\n // eslint-disable-next-line security/detect-object-injection\n const indexItems = (fileStoreIndex as FileStoreIndex)[folderPath];\n const indexItem = indexItems?.find((indexItem) => indexItem.typeId === 'object' && indexItem.id === settings.objectName);\n if (indexItem) return Promise.resolve({ folderPath }); // Found, return folder path.\n }\n }\n return Promise.resolve({}); // Not found, return undefined folder path.\n }\n\n // Operations - Get readable stream.\n async getReadableStream(connector: Connector, settings: GetReadableStreamSettings): Promise<GetReadableStreamResult> {\n try {\n console.log('getReader', 'connector', connector);\n console.log('getReader', 'settings', settings);\n // const response = await fetch('https://sample-data-eu.datapos.app/fileStore/ENGAGEMENT_START_EVENTS_202405121858.csv');\n const response = await fetch('https://sample-data-eu.datapos.app/WDI_Data.csv');\n console.log('getReader', 'response', response);\n if (!response.body) throw new Error('ReadableStream not supported by this browser.');\n\n const xxx = await addNumbersWithRust(12, 56);\n const sum = await checksumWithRust(connector.config.version);\n console.log('sum', sum, xxx);\n\n return await Promise.resolve({ readable: response.body }); // Not found, return undefined folder path.\n } catch (error) {\n connector.abortController = undefined;\n throw error;\n }\n }\n\n // Operations - List nodes.\n listNodes(connector: Connector, settings: ListSettings): Promise<ListResult> {\n const indexItems = (fileStoreIndex as FileStoreIndex)[settings.folderPath] ?? [];\n const connectionNodeConfigs: ConnectionNodeConfig[] = [];\n for (const indexItem of indexItems) {\n if (indexItem.typeId === 'folder') {\n connectionNodeConfigs.push(this.constructFolderNodeConfig(settings.folderPath, indexItem.name, indexItem.childCount));\n } else {\n connectionNodeConfigs.push(this.constructObjectNodeConfig(settings.folderPath, indexItem.id, indexItem.name, indexItem.lastModifiedAt, indexItem.size));\n }\n }\n return Promise.resolve({ cursor: undefined, isMore: false, connectionNodeConfigs, totalCount: connectionNodeConfigs.length });\n }\n\n // Operations - Preview object.\n async previewObject(connector: Connector, settings: PreviewSettings): Promise<PreviewResult> {\n try {\n // Create an abort controller. Get the signal for the abort controller and add an abort listener.\n connector.abortController = new AbortController();\n const signal = connector.abortController.signal;\n signal.addEventListener('abort', () => {\n throw new OperationalError(CALLBACK_PREVIEW_ABORTED, 'datapos-connector-file-store-emulator|Connector|preview.abort');\n });\n\n // Fetch chunk from start of file.\n const url = `${URL_PREFIX}/fileStore${settings.path}`;\n const chunkSize = settings.chunkSize ?? DEFAULT_PREVIEW_CHUNK_SIZE;\n const headers: HeadersInit = { Range: `bytes=0-${chunkSize}` };\n const response = await fetch(encodeURI(url), { headers, signal });\n if (response.ok) {\n connector.abortController = undefined;\n return { data: new Uint8Array(await response.arrayBuffer()), typeId: 'uint8Array' };\n } else {\n throw await buildFetchError(response, `Failed to fetch '${settings.path}' file.`, 'datapos-connector-file-store-emulator|Connector|preview');\n }\n } catch (error) {\n connector.abortController = undefined;\n throw error;\n }\n }\n\n // Operations - Retrieve records.\n async retrieveRecords(\n connector: Connector,\n settings: RetrieveRecordsSettings,\n chunk: (records: string[][]) => void,\n complete: (result: RetrieveRecordsSummary) => void\n ): Promise<void> {\n const csvParseTool = await (connector as FileStoreEmulatorConnector).loadTool<CSVParseTool>('csv-parse');\n console.log(1234, csvParseTool);\n return new Promise((resolve, reject) => {\n try {\n // Create an abort controller and get the signal. Add an abort listener to the signal.\n connector.abortController = new AbortController();\n const signal = connector.abortController.signal;\n signal.addEventListener(\n 'abort',\n () => {\n connector.abortController = undefined;\n reject(new OperationalError(CALLBACK_RETRIEVE_ABORTED, 'datapos-connector-file-store-emulator|Connector|retrieve.abort'));\n },\n { once: true }\n );\n\n // Parser - Declare variables.\n let pendingRows: string[][] = []; // Array to store rows of parsed field values and associated information.\n\n // Parser - Create a parser object for CSV parsing.\n const parser = csvParseTool.buildParser({\n delimiter: settings.valueDelimiterId,\n info: true,\n relax_column_count: true,\n relax_quotes: true\n });\n\n // Parser - Event listener for the 'readable' (data available) event.\n parser.on('readable', () => {\n try {\n let data: string[] | null;\n while ((data = parser.read() as string[] | null) !== null) {\n signal.throwIfAborted(); // Check if the abort signal has been triggered.\n pendingRows.push(data); // Append the row of parsed values and associated information to the pending rows array.\n if (pendingRows.length < DEFAULT_RETRIEVE_CHUNK_SIZE) continue; // Continue with next iteration if the pending rows array is not yet full.\n chunk(pendingRows); // Pass the pending rows to the engine using the 'chunk' callback.\n pendingRows = []; // Clear the pending rows array in preparation for the next batch of data.\n }\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n\n // Parser - Event listener for the 'error' event.\n parser.on('error', (error) => {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n });\n\n // Parser - Event listener for the 'end' (end of data) event.\n parser.on('end', () => {\n try {\n signal.throwIfAborted(); // Check if the abort signal has been triggered.\n connector.abortController = undefined; // Clear the abort controller.\n if (pendingRows.length > 0) {\n chunk(pendingRows);\n pendingRows = [];\n }\n complete({\n byteCount: parser.info.bytes,\n commentLineCount: parser.info.comment_lines,\n emptyLineCount: parser.info.empty_lines,\n invalidFieldLengthCount: parser.info.invalid_field_length,\n lineCount: parser.info.lines,\n recordCount: parser.info.records\n });\n resolve();\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n\n // Fetch, decode and forward the contents of the file to the parser.\n const url = `${URL_PREFIX}/fileStore${settings.path}`;\n fetch(encodeURI(url), { signal })\n .then(async (response) => {\n try {\n if (response.ok && response.body) {\n const stream = response.body.pipeThrough(new TextDecoderStream(settings.encodingId));\n const decodedStreamReader = stream.getReader();\n let result = await decodedStreamReader.read();\n while (!result.done) {\n signal.throwIfAborted(); // Check if the abort signal has been triggered.\n // Write the decoded data to the parser and terminate if there is an error.\n parser.write(result.value, (error) => {\n if (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n result = await decodedStreamReader.read();\n }\n parser.end(); // Signal no more data will be written.\n } else {\n const error = await buildFetchError(\n response,\n `Failed to fetch '${settings.path}' file.`,\n 'datapos-connector-file-store-emulator|Connector|retrieve'\n );\n connector.abortController = undefined;\n reject(error);\n }\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n })\n .catch((error: unknown) => {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n });\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n }\n\n /** Utilities - Construct folder node configuration. */\n private constructFolderNodeConfig(folderPath: string, name: string, childCount: number): ConnectionNodeConfig {\n return { id: nanoid(), childCount, extension: undefined, folderPath, label: name, name, typeId: 'folder' };\n }\n\n /** Utilities - Construct object (file) node configuration. */\n private constructObjectNodeConfig(folderPath: string, id: string, fullName: string, lastModifiedAt: number, size: number): ConnectionNodeConfig {\n const name = extractNameFromPath(fullName) ?? '';\n const extension = extractExtensionFromPath(fullName);\n const lastModifiedAtTimestamp = lastModifiedAt;\n const mimeType = lookupMimeTypeForExtension(extension);\n return { id, extension, folderPath, label: fullName, lastModifiedAt: lastModifiedAtTimestamp, mimeType, name, size, typeId: 'object' };\n }\n\n // Helpers - Load tool.\n private async loadTool<T>(toolId: string): Promise<T> {\n const toolName = `datapos-tool-${toolId}`;\n const toolModuleConfig = this.toolConfigs.find((config) => config.id === toolName);\n if (!toolModuleConfig) throw new Error(`Unknown tool '${toolId}'.`);\n\n const url = `https://engine-eu.datapos.app/tools/${toolId}_v${toolModuleConfig.version}/${toolName}.es.js`;\n const toolModule = (await import(/* @vite-ignore */ url)) as { Tool: new () => T };\n const toolInstance = new toolModule.Tool();\n return toolInstance;\n }\n}\n"],"names":["urlAlphabet","nanoid","size","id","bytes","scopedUrlAlphabet","i","o","t","r","a","c","n","E","y","h","e","s","d","l","m","rustBindingsPromise","addNumbersWithRust","left","right","add_my_numbers","loadRustBindings","yyyy","checksumWithRust","input","checksum_from_rust","CALLBACK_PREVIEW_ABORTED","CALLBACK_RETRIEVE_ABORTED","DEFAULT_PREVIEW_CHUNK_SIZE","DEFAULT_RETRIEVE_CHUNK_SIZE","URL_PREFIX","FileStoreEmulatorConnector","connectionConfig","toolConfigs","config","version","connector","settings","folderPath","fileStoreIndex","indexItem","response","xxx","sum","error","indexItems","connectionNodeConfigs","signal","OperationalError","url","headers","buildFetchError","chunk","complete","csvParseTool","resolve","reject","pendingRows","parser","data","normalizeToError","decodedStreamReader","result","name","childCount","fullName","lastModifiedAt","extractNameFromPath","extension","extractExtensionFromPath","lastModifiedAtTimestamp","mimeType","lookupMimeTypeForExtension","toolId","toolName","toolModuleConfig","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CAAQ;AACjF,QAAI,CAACC,EAAkB,OAAM,IAAI,MAAM,iBAAiBF,CAAM,IAAI;AAGlE,UAAMG,IAAc,MAAM,OADd,uCAAuCH,CAAM,KAAKE,EAAiB,OAAO,IAAID,CAAQ;AAGlG,WADqB,IAAIE,EAAW,KAAA;AAAA,EAExC;AACJ;","x_google_ignoreList":[0,1,2,3]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ToolConfig } from '@datapos/datapos-shared';
|
|
2
|
+
import { ConnectionConfig, Connector, ConnectorConfig, FindResult, FindSettings, GetReadableStreamResult, GetReadableStreamSettings, ListResult, ListSettings, PreviewResult, PreviewSettings, RetrieveRecordsSettings, RetrieveRecordsSummary } from '@datapos/datapos-shared/component/connector';
|
|
2
3
|
/** Classes - File store emulator connector. */
|
|
3
4
|
export default class FileStoreEmulatorConnector implements Connector {
|
|
4
5
|
abortController: AbortController | undefined;
|
|
5
6
|
readonly config: ConnectorConfig;
|
|
6
7
|
readonly connectionConfig: ConnectionConfig;
|
|
7
|
-
readonly tools: ConnectorTools;
|
|
8
8
|
readonly toolConfigs: ToolConfig[];
|
|
9
|
-
constructor(connectionConfig: ConnectionConfig,
|
|
10
|
-
abortOperation(connector:
|
|
11
|
-
findObject(connector:
|
|
12
|
-
getReadableStream(connector:
|
|
13
|
-
listNodes(connector:
|
|
14
|
-
previewObject(connector:
|
|
15
|
-
retrieveRecords(connector:
|
|
9
|
+
constructor(connectionConfig: ConnectionConfig, toolConfigs: ToolConfig[]);
|
|
10
|
+
abortOperation(connector: Connector): void;
|
|
11
|
+
findObject(connector: Connector, settings: FindSettings): Promise<FindResult>;
|
|
12
|
+
getReadableStream(connector: Connector, settings: GetReadableStreamSettings): Promise<GetReadableStreamResult>;
|
|
13
|
+
listNodes(connector: Connector, settings: ListSettings): Promise<ListResult>;
|
|
14
|
+
previewObject(connector: Connector, settings: PreviewSettings): Promise<PreviewResult>;
|
|
15
|
+
retrieveRecords(connector: Connector, settings: RetrieveRecordsSettings, chunk: (records: string[][]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
|
|
16
16
|
/** Utilities - Construct folder node configuration. */
|
|
17
17
|
private constructFolderNodeConfig;
|
|
18
18
|
/** Utilities - Construct object (file) node configuration. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datapos-connector-file-store-emulator",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.328",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Jonathan Terrell <terrell.jm@gmail.com>",
|
|
6
6
|
"private": false,
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
],
|
|
27
27
|
"prettier": "@datapos/datapos-development/prettierrc",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@datapos/datapos-shared": "^0.3.
|
|
29
|
+
"@datapos/datapos-shared": "^0.3.366",
|
|
30
30
|
"nanoid": "^5.1.6"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@datapos/datapos-development": "^0.3.
|
|
34
|
-
"@datapos/datapos-tool-csv-parse": "^0.0.
|
|
35
|
-
"@datapos/eslint-config-datapos": "^1.0.
|
|
33
|
+
"@datapos/datapos-development": "^0.3.434",
|
|
34
|
+
"@datapos/datapos-tool-csv-parse": "^0.0.12",
|
|
35
|
+
"@datapos/eslint-config-datapos": "^1.0.33",
|
|
36
36
|
"@types/node": "^25.0.3",
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "^8.50.
|
|
38
|
-
"@typescript-eslint/parser": "^8.50.
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
38
|
+
"@typescript-eslint/parser": "^8.50.1",
|
|
39
39
|
"eslint": "^9.39.2",
|
|
40
40
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
41
41
|
"eslint-plugin-import": "^2.32.0",
|