datapos-connector-file-store-emulator 0.2.304 → 0.2.307

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,126 +1,132 @@
1
- let z;
1
+ const T = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2
+ let O = (e = 21) => {
3
+ let t = "", i = crypto.getRandomValues(new Uint8Array(e |= 0));
4
+ for (; e--; )
5
+ t += T[i[e] & 63];
6
+ return t;
7
+ }, z;
2
8
  // @__NO_SIDE_EFFECTS__
3
- function x(t) {
9
+ function F(e) {
4
10
  return {
5
- lang: t?.lang ?? z?.lang,
6
- message: t?.message,
7
- abortEarly: t?.abortEarly ?? z?.abortEarly,
8
- abortPipeEarly: t?.abortPipeEarly ?? z?.abortPipeEarly
11
+ lang: e?.lang ?? z?.lang,
12
+ message: e?.message,
13
+ abortEarly: e?.abortEarly ?? z?.abortEarly,
14
+ abortPipeEarly: e?.abortPipeEarly ?? z?.abortPipeEarly
9
15
  };
10
16
  }
11
- let k;
17
+ let U;
12
18
  // @__NO_SIDE_EFFECTS__
13
- function T(t) {
14
- return k?.get(t);
19
+ function L(e) {
20
+ return U?.get(e);
15
21
  }
16
- let O;
22
+ let N;
17
23
  // @__NO_SIDE_EFFECTS__
18
- function F(t) {
19
- return O?.get(t);
24
+ function D(e) {
25
+ return N?.get(e);
20
26
  }
21
- let U;
27
+ let V;
22
28
  // @__NO_SIDE_EFFECTS__
23
- function L(t, e) {
24
- return U?.get(t)?.get(e);
29
+ function G(e, t) {
30
+ return V?.get(e)?.get(t);
25
31
  }
26
32
  // @__NO_SIDE_EFFECTS__
27
- function w(t) {
28
- const e = typeof t;
29
- return e === "string" ? `"${t}"` : e === "number" || e === "bigint" || e === "boolean" ? `${t}` : e === "object" || e === "function" ? (t && Object.getPrototypeOf(t)?.constructor?.name) ?? "null" : e;
33
+ function R(e) {
34
+ const t = typeof e;
35
+ return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
30
36
  }
31
- function v(t, e, i, d, a) {
32
- const s = a && "input" in a ? a.input : i.value, o = a?.expected ?? t.expects ?? null, r = a?.received ?? /* @__PURE__ */ w(s), n = {
33
- kind: t.kind,
34
- type: t.type,
37
+ function u(e, t, i, d, o) {
38
+ const s = o && "input" in o ? o.input : i.value, a = o?.expected ?? e.expects ?? null, l = o?.received ?? /* @__PURE__ */ R(s), n = {
39
+ kind: e.kind,
40
+ type: e.type,
35
41
  input: s,
36
- expected: o,
37
- received: r,
38
- message: `Invalid ${e}: ${o ? `Expected ${o} but r` : "R"}eceived ${r}`,
39
- requirement: t.requirement,
40
- path: a?.path,
41
- issues: a?.issues,
42
+ expected: a,
43
+ received: l,
44
+ message: `Invalid ${t}: ${a ? `Expected ${a} but r` : "R"}eceived ${l}`,
45
+ requirement: e.requirement,
46
+ path: o?.path,
47
+ issues: o?.issues,
42
48
  lang: d.lang,
43
49
  abortEarly: d.abortEarly,
44
50
  abortPipeEarly: d.abortPipeEarly
45
- }, l = t.kind === "schema", y = a?.message ?? t.message ?? /* @__PURE__ */ L(t.reference, n.lang) ?? (l ? /* @__PURE__ */ F(n.lang) : null) ?? d.message ?? /* @__PURE__ */ T(n.lang);
46
- y !== void 0 && (n.message = typeof y == "function" ? y(n) : y), l && (i.typed = !1), i.issues ? i.issues.push(n) : i.issues = [n];
51
+ }, r = e.kind === "schema", y = o?.message ?? e.message ?? /* @__PURE__ */ G(e.reference, n.lang) ?? (r ? /* @__PURE__ */ D(n.lang) : null) ?? d.message ?? /* @__PURE__ */ L(n.lang);
52
+ y !== void 0 && (n.message = typeof y == "function" ? y(n) : y), r && (i.typed = !1), i.issues ? i.issues.push(n) : i.issues = [n];
47
53
  }
48
54
  // @__NO_SIDE_EFFECTS__
49
- function R(t) {
55
+ function P(e) {
50
56
  return {
51
57
  version: 1,
52
58
  vendor: "valibot",
53
- validate(e) {
54
- return t["~run"]({ value: e }, /* @__PURE__ */ x());
59
+ validate(t) {
60
+ return e["~run"]({ value: t }, /* @__PURE__ */ F());
55
61
  }
56
62
  };
57
63
  }
58
64
  // @__NO_SIDE_EFFECTS__
59
- function N(t, e) {
60
- const i = [...new Set(t)];
61
- return i.length > 1 ? `(${i.join(` ${e} `)})` : i[0] ?? "never";
65
+ function B(e, t) {
66
+ const i = [...new Set(e)];
67
+ return i.length > 1 ? `(${i.join(` ${t} `)})` : i[0] ?? "never";
62
68
  }
63
69
  // @__NO_SIDE_EFFECTS__
64
- function P(t, e) {
70
+ function x(e, t) {
65
71
  return {
66
72
  kind: "schema",
67
73
  type: "literal",
68
- reference: P,
69
- expects: /* @__PURE__ */ w(t),
74
+ reference: x,
75
+ expects: /* @__PURE__ */ R(e),
70
76
  async: !1,
71
- literal: t,
72
- message: e,
77
+ literal: e,
78
+ message: t,
73
79
  get "~standard"() {
74
- return /* @__PURE__ */ R(this);
80
+ return /* @__PURE__ */ P(this);
75
81
  },
76
82
  "~run"(i, d) {
77
- return i.value === this.literal ? i.typed = !0 : v(this, "type", i, d), i;
83
+ return i.value === this.literal ? i.typed = !0 : u(this, "type", i, d), i;
78
84
  }
79
85
  };
80
86
  }
81
87
  // @__NO_SIDE_EFFECTS__
82
- function g(t) {
83
- let e;
84
- if (t) for (const i of t) e ? e.push(...i.issues) : e = i.issues;
85
- return e;
88
+ function g(e) {
89
+ let t;
90
+ if (e) for (const i of e) t ? t.push(...i.issues) : t = i.issues;
91
+ return t;
86
92
  }
87
93
  // @__NO_SIDE_EFFECTS__
88
- function S(t, e) {
94
+ function S(e, t) {
89
95
  return {
90
96
  kind: "schema",
91
97
  type: "union",
92
98
  reference: S,
93
- expects: /* @__PURE__ */ N(t.map((i) => i.expects), "|"),
99
+ expects: /* @__PURE__ */ B(e.map((i) => i.expects), "|"),
94
100
  async: !1,
95
- options: t,
96
- message: e,
101
+ options: e,
102
+ message: t,
97
103
  get "~standard"() {
98
- return /* @__PURE__ */ R(this);
104
+ return /* @__PURE__ */ P(this);
99
105
  },
100
106
  "~run"(i, d) {
101
- let a, s, o;
102
- for (const r of this.options) {
103
- const n = r["~run"]({ value: i.value }, d);
107
+ let o, s, a;
108
+ for (const l of this.options) {
109
+ const n = l["~run"]({ value: i.value }, d);
104
110
  if (n.typed) if (n.issues) s ? s.push(n) : s = [n];
105
111
  else {
106
- a = n;
112
+ o = n;
107
113
  break;
108
114
  }
109
- else o ? o.push(n) : o = [n];
115
+ else a ? a.push(n) : a = [n];
110
116
  }
111
- if (a) return a;
117
+ if (o) return o;
112
118
  if (s) {
113
119
  if (s.length === 1) return s[0];
114
- v(this, "type", i, d, { issues: /* @__PURE__ */ g(s) }), i.typed = !0;
120
+ u(this, "type", i, d, { issues: /* @__PURE__ */ g(s) }), i.typed = !0;
115
121
  } else {
116
- if (o?.length === 1) return o[0];
117
- v(this, "type", i, d, { issues: /* @__PURE__ */ g(o) });
122
+ if (a?.length === 1) return a[0];
123
+ u(this, "type", i, d, { issues: /* @__PURE__ */ g(a) });
118
124
  }
119
125
  return i;
120
126
  }
121
127
  };
122
128
  }
123
- const b = (t) => /* @__PURE__ */ S(t.map((e) => /* @__PURE__ */ P(e)));
129
+ const b = (e) => /* @__PURE__ */ S(e.map((t) => /* @__PURE__ */ x(t)));
124
130
  b(["amber", "green", "red", "other"]);
125
131
  b([
126
132
  "alpha",
@@ -159,11 +165,12 @@ b([
159
165
  "tool"
160
166
  ]);
161
167
  b(["app", "engine", "connector", "context", "presenter", "tool"]);
162
- const m = (t) => {
163
- const e = Object.entries(t).filter((i) => typeof i[1] == "string");
164
- return new Map(e);
168
+ const m = (e) => {
169
+ const t = Object.entries(e).filter((i) => typeof i[1] == "string");
170
+ return new Map(t);
165
171
  };
166
172
  m({ "en-gb": "alpha" }), m({ "en-gb": "beta" }), m({ "en-gb": "" }), m({ "en-gb": "not-applicable" }), m({ "en-gb": "pre-alpha" }), m({ "en-gb": "proposed" }), m({ "en-gb": "release-candidate" }), m({ "en-gb": "unavailable" }), m({ "en-gb": "under-review" });
173
+ b(["apiKey", "disabled", "oAuth2", "none"]);
167
174
  b(["application", "curatedDataset", "database", "fileStore"]);
168
175
  b([
169
176
  "abortOperation",
@@ -177,54 +184,107 @@ b([
177
184
  "listNodes",
178
185
  "previewObject",
179
186
  "removeRecords",
187
+ "retrieveChunks",
180
188
  "retrieveRecords",
181
189
  "upsertRecords"
182
190
  ]);
183
191
  b(["bidirectional", "destination", "source", "unknown"]);
184
- b(["apiKey", "disabled", "oAuth2", "none"]);
185
- const A = (t) => {
186
- const e = Object.entries(t).filter((i) => typeof i[1] == "string");
187
- return new Map(e);
192
+ const A = (e) => {
193
+ const t = Object.entries(e).filter((i) => typeof i[1] == "string");
194
+ return new Map(t);
188
195
  };
189
196
  A({ "en-gb": "Application" }), A({ "en-gb": "Curated Dataset" }), A({ "en-gb": "Database" }), A({ "en-gb": "File Store" });
190
197
  b(["list"]);
191
- function f(t) {
192
- if (t instanceof Error) return t;
193
- if (typeof t == "string") return new Error(t);
194
- if (typeof t == "number" || typeof t == "boolean" || typeof t == "bigint") return new Error(String(t));
195
- if (typeof t == "symbol") return new Error(t.description ?? "Unknown error");
196
- if (t && typeof t == "object")
198
+ class _ extends Error {
199
+ locator;
200
+ constructor(t, i, d) {
201
+ super(t, d), this.name = "DataPosError", this.locator = i;
202
+ }
203
+ }
204
+ class q extends _ {
205
+ constructor(t, i, d) {
206
+ super(t, i, d), this.name = "ApplicationError";
207
+ }
208
+ }
209
+ class H extends q {
210
+ body;
211
+ constructor(t, i, d, o) {
212
+ super(t, i, o), this.name = "FetchError", this.body = d;
213
+ }
214
+ }
215
+ class h extends _ {
216
+ constructor(t, i, d) {
217
+ super(t, i, d), this.name = "OperationalError";
218
+ }
219
+ }
220
+ async function Z(e, t, i) {
221
+ const d = ` - ${e.statusText}`, o = `${t} Response status '${e.status}${e.statusText ? d : ""}' received.`, s = await e.text();
222
+ return new H(o, i, s);
223
+ }
224
+ function f(e) {
225
+ if (e instanceof Error) return e;
226
+ if (typeof e == "string") return new Error(e);
227
+ if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return new Error(String(e));
228
+ if (typeof e == "symbol") return new Error(e.description ?? "Unknown error");
229
+ if (e && typeof e == "object")
197
230
  try {
198
- return new Error(JSON.stringify(t));
231
+ return new Error(JSON.stringify(e));
199
232
  } catch {
200
233
  return new Error("Unknown error");
201
234
  }
202
235
  return new Error("Unknown error");
203
236
  }
204
237
  b(["list", "render", "setColorMode"]);
205
- const c = (t) => new Map(Object.entries(t));
238
+ function K(e) {
239
+ if (e) {
240
+ const t = e.lastIndexOf("/"), i = e.lastIndexOf(".", t === -1 ? e.length : t);
241
+ return i === -1 ? e : e.slice(0, Math.max(0, i));
242
+ }
243
+ }
244
+ function Q(e) {
245
+ if (e) {
246
+ const t = e.lastIndexOf(".");
247
+ if (t !== -1) return e.slice(Math.max(0, t + 1));
248
+ }
249
+ }
250
+ function J(e) {
251
+ switch (e) {
252
+ case "csv":
253
+ return "text/csv";
254
+ case "tab":
255
+ case "tsv":
256
+ return "text/tab-separated-values";
257
+ case "xls":
258
+ return "application/vnd.ms-excel";
259
+ case "xlsx":
260
+ return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
261
+ default:
262
+ return "application/octet-stream";
263
+ }
264
+ }
265
+ const c = (e) => new Map(Object.entries(e));
206
266
  c({ "en-gb": "Delimited Text" }), c({ "en-gb": "Entity/Event" }), c({ "en-gb": "JSON Array" }), c({ "en-gb": "SPSS" }), c({ "en-gb": "XLS" }), c({ "en-gb": "XLSX" }), c({ "en-gb": "XML" });
207
267
  c({ "en-gb": "Newline" }), c({ "en-gb": "Carriage Return" }), c({ "en-gb": "Carriage Return/Newline" });
208
268
  c({ "en-gb": "Colon" }), c({ "en-gb": "Comma" }), c({ "en-gb": "Exclamation Mark" }), c({ "en-gb": "Record Separator" }), c({ "en-gb": "Semicolon" }), c({ "en-gb": "Space" }), c({ "en-gb": "Tab" }), c({ "en-gb": "Underscore" }), c({ "en-gb": "Unit Separator" }), c({ "en-gb": "Vertical Bar" });
209
- const D = "datapos-connector-file-store-emulator", V = { en: "File Store Emulator" }, G = { "en-gb": "Imitates a cloud-based file storage solution. It hosts a read-only set of files for demonstration, evaluation and testing purposes and is freely available to all users." }, B = null, q = "fileStore", H = { default: { authMethodId: "none", maxConnectionCount: 1 } }, Z = '<svg fill="#000000" height="100%" viewBox="0 0 576 512"><path d="M320 32H64C46.33 32 32 46.33 32 64V448C32 465.7 46.33 480 64 480H296.2C305.1 491.8 317.3 502.3 329.7 511.3C326.6 511.7 323.3 512 320 512H64C28.65 512 0 483.3 0 448V64C0 28.65 28.65 0 64 0H320C355.3 0 384 28.65 384 64V198.6C372.8 201.8 362.1 206 352 211.2V64C352 46.33 337.7 32 320 32V32zM64 144C64 135.2 71.16 128 80 128H304C312.8 128 320 135.2 320 144C320 152.8 312.8 160 304 160H80C71.16 160 64 152.8 64 144zM272 224C280.8 224 288 231.2 288 240C288 248.8 280.8 256 272 256H80C71.16 256 64 248.8 64 240C64 231.2 71.16 224 80 224H272zM208 320C216.8 320 224 327.2 224 336C224 344.8 216.8 352 208 352H80C71.16 352 64 344.8 64 336C64 327.2 71.16 320 80 320H208zM476.7 324.7C482.9 318.4 493.1 318.4 499.3 324.7C505.6 330.9 505.6 341.1 499.3 347.3L427.3 419.3C421.1 425.6 410.9 425.6 404.7 419.3L364.7 379.3C358.4 373.1 358.4 362.9 364.7 356.7C370.9 350.4 381.1 350.4 387.3 356.7L416 385.4L476.7 324.7zM288 368C288 288.5 352.5 224 432 224C511.5 224 576 288.5 576 368C576 447.5 511.5 512 432 512C352.5 512 288 447.5 288 368zM432 480C493.9 480 544 429.9 544 368C544 306.1 493.9 256 432 256C370.1 256 320 306.1 320 368C320 429.9 370.1 480 432 480z"/></svg>', K = '<svg fill="#ffffff" height="100%" viewBox="0 0 576 512"><path d="M320 32H64C46.33 32 32 46.33 32 64V448C32 465.7 46.33 480 64 480H296.2C305.1 491.8 317.3 502.3 329.7 511.3C326.6 511.7 323.3 512 320 512H64C28.65 512 0 483.3 0 448V64C0 28.65 28.65 0 64 0H320C355.3 0 384 28.65 384 64V198.6C372.8 201.8 362.1 206 352 211.2V64C352 46.33 337.7 32 320 32V32zM64 144C64 135.2 71.16 128 80 128H304C312.8 128 320 135.2 320 144C320 152.8 312.8 160 304 160H80C71.16 160 64 152.8 64 144zM272 224C280.8 224 288 231.2 288 240C288 248.8 280.8 256 272 256H80C71.16 256 64 248.8 64 240C64 231.2 71.16 224 80 224H272zM208 320C216.8 320 224 327.2 224 336C224 344.8 216.8 352 208 352H80C71.16 352 64 344.8 64 336C64 327.2 71.16 320 80 320H208zM476.7 324.7C482.9 318.4 493.1 318.4 499.3 324.7C505.6 330.9 505.6 341.1 499.3 347.3L427.3 419.3C421.1 425.6 410.9 425.6 404.7 419.3L364.7 379.3C358.4 373.1 358.4 362.9 364.7 356.7C370.9 350.4 381.1 350.4 387.3 356.7L416 385.4L476.7 324.7zM288 368C288 288.5 352.5 224 432 224C511.5 224 576 288.5 576 368C576 447.5 511.5 512 432 512C352.5 512 288 447.5 288 368zM432 480C493.9 480 544 429.9 544 368C544 306.1 493.9 256 432 256C370.1 256 320 306.1 320 368C320 429.9 370.1 480 432 480z"/></svg>', Q = null, J = ["abortOperation", "findObject", "ReadableStream", "listNodes", "previewObject", "retrieveRecords"], X = null, W = "beta", Y = "connector", $ = "source", ee = null, te = null, ie = null, de = "0.2.304", oe = {
210
- id: D,
211
- label: V,
212
- description: G,
213
- category: B,
214
- categoryId: q,
215
- implementations: H,
216
- icon: Z,
217
- iconDark: K,
218
- lastUpdatedAt: Q,
219
- operations: J,
220
- status: X,
221
- statusId: W,
222
- typeId: Y,
223
- usageId: $,
224
- vendorAccountURL: ee,
225
- vendorDocumentationURL: te,
226
- vendorHomeURL: ie,
227
- version: de
269
+ const X = "datapos-connector-file-store-emulator", W = { en: "File Store Emulator" }, Y = { "en-gb": "Imitates a cloud-based file storage solution. It hosts a read-only set of files for demonstration, evaluation and testing purposes and is freely available to all users." }, $ = null, ee = "fileStore", te = { default: { authMethodId: "none", maxConnectionCount: 1 } }, ie = '<svg fill="#000000" height="100%" viewBox="0 0 576 512"><path d="M320 32H64C46.33 32 32 46.33 32 64V448C32 465.7 46.33 480 64 480H296.2C305.1 491.8 317.3 502.3 329.7 511.3C326.6 511.7 323.3 512 320 512H64C28.65 512 0 483.3 0 448V64C0 28.65 28.65 0 64 0H320C355.3 0 384 28.65 384 64V198.6C372.8 201.8 362.1 206 352 211.2V64C352 46.33 337.7 32 320 32V32zM64 144C64 135.2 71.16 128 80 128H304C312.8 128 320 135.2 320 144C320 152.8 312.8 160 304 160H80C71.16 160 64 152.8 64 144zM272 224C280.8 224 288 231.2 288 240C288 248.8 280.8 256 272 256H80C71.16 256 64 248.8 64 240C64 231.2 71.16 224 80 224H272zM208 320C216.8 320 224 327.2 224 336C224 344.8 216.8 352 208 352H80C71.16 352 64 344.8 64 336C64 327.2 71.16 320 80 320H208zM476.7 324.7C482.9 318.4 493.1 318.4 499.3 324.7C505.6 330.9 505.6 341.1 499.3 347.3L427.3 419.3C421.1 425.6 410.9 425.6 404.7 419.3L364.7 379.3C358.4 373.1 358.4 362.9 364.7 356.7C370.9 350.4 381.1 350.4 387.3 356.7L416 385.4L476.7 324.7zM288 368C288 288.5 352.5 224 432 224C511.5 224 576 288.5 576 368C576 447.5 511.5 512 432 512C352.5 512 288 447.5 288 368zM432 480C493.9 480 544 429.9 544 368C544 306.1 493.9 256 432 256C370.1 256 320 306.1 320 368C320 429.9 370.1 480 432 480z"/></svg>', de = '<svg fill="#ffffff" height="100%" viewBox="0 0 576 512"><path d="M320 32H64C46.33 32 32 46.33 32 64V448C32 465.7 46.33 480 64 480H296.2C305.1 491.8 317.3 502.3 329.7 511.3C326.6 511.7 323.3 512 320 512H64C28.65 512 0 483.3 0 448V64C0 28.65 28.65 0 64 0H320C355.3 0 384 28.65 384 64V198.6C372.8 201.8 362.1 206 352 211.2V64C352 46.33 337.7 32 320 32V32zM64 144C64 135.2 71.16 128 80 128H304C312.8 128 320 135.2 320 144C320 152.8 312.8 160 304 160H80C71.16 160 64 152.8 64 144zM272 224C280.8 224 288 231.2 288 240C288 248.8 280.8 256 272 256H80C71.16 256 64 248.8 64 240C64 231.2 71.16 224 80 224H272zM208 320C216.8 320 224 327.2 224 336C224 344.8 216.8 352 208 352H80C71.16 352 64 344.8 64 336C64 327.2 71.16 320 80 320H208zM476.7 324.7C482.9 318.4 493.1 318.4 499.3 324.7C505.6 330.9 505.6 341.1 499.3 347.3L427.3 419.3C421.1 425.6 410.9 425.6 404.7 419.3L364.7 379.3C358.4 373.1 358.4 362.9 364.7 356.7C370.9 350.4 381.1 350.4 387.3 356.7L416 385.4L476.7 324.7zM288 368C288 288.5 352.5 224 432 224C511.5 224 576 288.5 576 368C576 447.5 511.5 512 432 512C352.5 512 288 447.5 288 368zM432 480C493.9 480 544 429.9 544 368C544 306.1 493.9 256 432 256C370.1 256 320 306.1 320 368C320 429.9 370.1 480 432 480z"/></svg>', oe = null, se = ["abortOperation", "findObject", "getReadableStream", "listNodes", "previewObject", "retrieveRecords"], ae = null, ne = "beta", ce = "connector", le = "source", re = null, pe = null, be = null, me = "0.2.307", fe = {
270
+ id: X,
271
+ label: W,
272
+ description: Y,
273
+ category: $,
274
+ categoryId: ee,
275
+ implementations: te,
276
+ icon: ie,
277
+ iconDark: de,
278
+ lastUpdatedAt: oe,
279
+ operations: se,
280
+ status: ae,
281
+ statusId: ne,
282
+ typeId: ce,
283
+ usageId: le,
284
+ vendorAccountURL: re,
285
+ vendorDocumentationURL: pe,
286
+ vendorHomeURL: be,
287
+ version: me
228
288
  }, M = {
229
289
  "": [{ id: "cpB45vx36UWghglh18MUS", lastModifiedAt: 17435076862165598e-4, name: "ENGAGEMENT_START_EVENTS_202405121858.csv", size: 122800, typeId: "object" }, { id: "GUIHoZJcLIFZ6B7A1bu0r", lastModifiedAt: 1743507686221789e-3, name: "PEOPLE_BIRTH_EVENTS_202405121857.csv", size: 114287, typeId: "object" }, { childCount: 3, name: "AUDATACY Interchange Format", typeId: "folder" }, { childCount: 12, name: "Formula 1", typeId: "folder" }, { childCount: 7, name: "Salesforce API", typeId: "folder" }, { childCount: 156, name: "Salesforce Extract", typeId: "folder" }, { childCount: 20, name: "SAP Employee Central Extract", typeId: "folder" }, { childCount: 7, name: "SAP SuccessFactors API", typeId: "folder" }, { childCount: 12, name: "Test Files", typeId: "folder" }],
230
290
  "/AUDATACY Interchange Format": [{ childCount: 11, name: "Coded Data", typeId: "folder" }, { childCount: 1, name: "Human Resources", typeId: "folder" }, { childCount: 1, name: "Party", typeId: "folder" }],
@@ -243,161 +303,161 @@ const D = "datapos-connector-file-store-emulator", V = { en: "File Store Emulato
243
303
  "/Test Files/Encoding": [{ id: "VDPKvgp8-hYHAyD5Lspqx", lastModifiedAt: 17435076862472607e-4, name: "big5", size: 614, typeId: "object" }, { id: "BuaHWD5GhE1tR4h50Sgjb", lastModifiedAt: 1743507686247412e-3, name: "euc-jp", size: 3919, typeId: "object" }, { id: "4zP5NrMMQKfEImM1ql9rh", lastModifiedAt: 1743507686247461e-3, name: "euc-kr", size: 2480, typeId: "object" }, { id: "4ddofaJBAo3000bUD4l_-", lastModifiedAt: 17435076862475098e-4, name: "gb18030", size: 1665, typeId: "object" }, { id: "yk7BqZOfbjw1lrOWkYMX8", lastModifiedAt: 17435076862475715e-4, name: "iso-2022-jp", size: 2924, typeId: "object" }, { id: "A52Tx9PVrjFXZAzEyska1", lastModifiedAt: 17435076862476187e-4, name: "iso-8859-2", size: 1600, typeId: "object" }, { id: "CzzBPKwpdex-8NIdpgC0b", lastModifiedAt: 1743507686247666e-3, name: "iso-8859-5", size: 1024, typeId: "object" }, { id: "6LYPo_5Ux6C7olOqf0caX", lastModifiedAt: 17435076862477134e-4, name: "iso-8859-6", size: 2241, typeId: "object" }, { id: "bfAhVWgQoJ4gK1WpgMI-O", lastModifiedAt: 1743507686247772e-3, name: "iso-8859-7", size: 1033, typeId: "object" }, { id: "94cPoDWerynVP5nYqQok5", lastModifiedAt: 17435076862478198e-4, name: "koi8-r", size: 1024, typeId: "object" }, { id: "wZP8uYiw71--vBcvc8mr-", lastModifiedAt: 17435076862478694e-4, name: "shift_jis", size: 2816, typeId: "object" }, { id: "8N1hAcknG5QTCBGAb_DgC", lastModifiedAt: 17435076862479082e-4, name: "utf-16be", size: 1334, typeId: "object" }, { id: "b0wcTK1T3jAS_FMhx74-L", lastModifiedAt: 1743507686247954e-3, name: "utf-16le", size: 1334, typeId: "object" }, { id: "Ar8QcfiznCHcGUZqvc4Xt", lastModifiedAt: 1743507686247995e-3, name: "utf-8", size: 1125, typeId: "object" }, { id: "MFdztx3Hn_W0cZ-FvJAlb", lastModifiedAt: 17435076862480386e-4, name: "windows-1250", size: 1617, typeId: "object" }, { id: "Hh7pKXC0Y-_OyT_zwSmMK", lastModifiedAt: 17435076862480842e-4, name: "windows-1251", size: 1024, typeId: "object" }, { id: "OcIEHmkSVO8lOX7srKkPn", lastModifiedAt: 1743507686248141e-3, name: "windows-1252", size: 2976, typeId: "object" }, { id: "Fr-FOrJwjhwh-RrejQG2y", lastModifiedAt: 1743507686248181e-3, name: "windows-1253", size: 1052, typeId: "object" }, { id: "fJnDU4alQlSZ4x-nojhp1", lastModifiedAt: 17435076862482227e-4, name: "windows-1254", size: 2445, typeId: "object" }, { id: "vI70VbY2bLWPSppUJ27pX", lastModifiedAt: 17435076862482617e-4, name: "windows-1255", size: 2405, typeId: "object" }, { id: "CBX69u7zo_sNZTLSXL_Ok", lastModifiedAt: 17435076862483171e-4, name: "windows-1256", size: 2241, typeId: "object" }],
244
304
  "/Test Files/Encoding Test Files": [{ id: "2TJo3wC-qs3eQ4Q1LiC4p", lastModifiedAt: 17435076862436587e-4, name: "ascii.txt", size: 44, typeId: "object" }, { id: "lrrRdBkfNLjxDpgGBJafD", lastModifiedAt: 17435076862436975e-4, name: "big5.txt", size: 37, typeId: "object" }, { id: "kcfwAkKq1bMepTQIMmX-f", lastModifiedAt: 17435076862459814e-4, name: "euc-jp.txt", size: 218, typeId: "object" }, { id: "bciRqR0P6iJyQ_vtOop3Y", lastModifiedAt: 17435076862460261e-4, name: "euc-kr.txt", size: 153, typeId: "object" }, { id: "f4Q9QEcVNnx0hSGJrhOIV", lastModifiedAt: 17435076862460706e-4, name: "gb2312.txt", size: 105, typeId: "object" }, { id: "PcztjI4G2NZOYCdLSD5kA", lastModifiedAt: 17435076862461167e-4, name: "hz-gb-2312.txt", size: 117, typeId: "object" }, { id: "lLzl7OwIayebmkDf_johR", lastModifiedAt: 17435076862461694e-4, name: "ibm855.txt", size: 290, typeId: "object" }, { id: "Mq7D4ZWQsTMRsTX7_CsvU", lastModifiedAt: 17435076862462126e-4, name: "ibm866.txt", size: 290, typeId: "object" }, { id: "We9LB0aWPrd-IODoVKoRt", lastModifiedAt: 1743507686246254e-3, name: "iso-2022-jp.txt", size: 224, typeId: "object" }, { id: "W0qTlIiYoioBujG6zw8_Y", lastModifiedAt: 17435076862462983e-4, name: "iso-2022-kr.txt", size: 198, typeId: "object" }, { id: "I6IMhKsT4Uz4wGEJvW36C", lastModifiedAt: 17435076862463481e-4, name: "iso-8859-2.txt", size: 273, typeId: "object" }, { id: "Xwkvh13qNNKRwu7jYmzjR", lastModifiedAt: 17435076862463884e-4, name: "iso-8859-5-bulgarian.txt", size: 304, typeId: "object" }, { id: "asxDjWbs34mTKaGTkbNfw", lastModifiedAt: 17435076862464302e-4, name: "iso-8859-5-russian.txt", size: 290, typeId: "object" }, { id: "kgbViYQ9OX4w5SpLdskgZ", lastModifiedAt: 17435076862464714e-4, name: "iso-8859-7.txt", size: 319, typeId: "object" }, { id: "Bq0Gn-1G5BrhTxBUOQ7DF", lastModifiedAt: 17435076862465222e-4, name: "iso-8859-8.txt", size: 307, typeId: "object" }, { id: "jCtOU9WWV8jHWMgr_Oq7r", lastModifiedAt: 17435076862465593e-4, name: "koi8-r.txt", size: 290, typeId: "object" }, { id: "--cTZDZwr5BgECFgDGIo2", lastModifiedAt: 17435076862465964e-4, name: "shift_jis.txt", size: 216, typeId: "object" }, { id: "8mdQ36gjXep2wGj_kuQHx", lastModifiedAt: 1743507686246642e-3, name: "tis-620.txt", size: 68, typeId: "object" }, { id: "5rUGdrjGK4v6hZ1qwH2KJ", lastModifiedAt: 17435076862466946e-4, name: "utf-16be.txt", size: 2, typeId: "object" }, { id: "NtUpxZ5XGC1UAa0bJU4Cd", lastModifiedAt: 17435076862467427e-4, name: "utf-16le.txt", size: 84, typeId: "object" }, { id: "djicGUE7J59cQmEz22Lw2", lastModifiedAt: 1743507686246787e-3, name: "utf-32be.txt", size: 4, typeId: "object" }, { id: "E4ewVZr3kM5JfkCNHhaHv", lastModifiedAt: 17435076862468293e-4, name: "utf-32le.txt", size: 18, typeId: "object" }, { id: "T0gS9i2pl9OCYmqJdcEx-", lastModifiedAt: 17435076862468833e-4, name: "utf-8-with-bom.txt", size: 58, typeId: "object" }, { id: "ctcPwumVXy1mYV1fht5yD", lastModifiedAt: 17435076862469265e-4, name: "utf-8-without-bom.txt", size: 58, typeId: "object" }, { id: "V0aG5TkpxwM3_Q1di66Nz", lastModifiedAt: 1743507686246975e-3, name: "windows-1251.txt", size: 290, typeId: "object" }, { id: "LSFzaM5jL_I544Ol4mErA", lastModifiedAt: 17435076862470168e-4, name: "windows-1252.txt", size: 433, typeId: "object" }, { id: "SF10JGkRZ1rVLdm5LVBrl", lastModifiedAt: 17435076862470657e-4, name: "windows-1255.txt", size: 36, typeId: "object" }, { id: "kEx_hKy6rjhn97BwN07Ip", lastModifiedAt: 1743507686247103e-3, name: "x-iso-10646-ucs-4-2143.txt", size: 20, typeId: "object" }, { id: "XFbR4pbjpQwlmlKFmRqDC", lastModifiedAt: 1743507686247142e-3, name: "x-iso-10646-ucs-4-3412.txt", size: 20, typeId: "object" }, { id: "BuqENK-iJAXc1noTneDzz", lastModifiedAt: 17435076862471843e-4, name: "x-mac-cyrillic.txt", size: 290, typeId: "object" }, { childCount: 38, name: "encodings", typeId: "folder" }],
245
305
  "/Test Files/Encoding Test Files/encodings": [{ id: "irBUQdMBx4ZhLXyti4t0W", lastModifiedAt: 1743507686243765e-3, name: "big5", size: 614, typeId: "object" }, { id: "BPyMwzoNSnGdUV_dzYEWz", lastModifiedAt: 17435076862438152e-4, name: "euc_jp", size: 3919, typeId: "object" }, { id: "FXjFtwUcRxKmH_ZCAaNz6", lastModifiedAt: 1743507686243867e-3, name: "euc_kr", size: 2480, typeId: "object" }, { id: "5fBDsObvTXORIIgptb-sl", lastModifiedAt: 17435076862439092e-4, name: "gb18030", size: 1665, typeId: "object" }, { id: "7Jt6_ku8bzWNBFjRaagdR", lastModifiedAt: 17435076862439512e-4, name: "iso2022cn", size: 1749, typeId: "object" }, { id: "WLvdjjUGMGnEv3FmDQJ9p", lastModifiedAt: 1743507686243999e-3, name: "iso2022jp", size: 2924, typeId: "object" }, { id: "6CsULI8SIvo4zwFjKAA1_", lastModifiedAt: 17435076862440513e-4, name: "iso2022kr", size: 3172, typeId: "object" }, { id: "SqbmllHEuS76me2jsWjLI", lastModifiedAt: 17435076862440952e-4, name: "iso88591_en", size: 2955, typeId: "object" }, { id: "5oCOldZaxX2XoavVBBgdc", lastModifiedAt: 1743507686244138e-3, name: "iso88592_cs", size: 1600, typeId: "object" }, { id: "UATsUFbSUtqVhVhMJ2sec", lastModifiedAt: 1743507686244182e-3, name: "iso88595_ru", size: 1024, typeId: "object" }, { id: "wC1_pjcjj0NZZWTxqiGaw", lastModifiedAt: 17435076862442336e-4, name: "iso88596_ar", size: 2241, typeId: "object" }, { id: "Pe8RK8l_zBAjLODUX34IB", lastModifiedAt: 1743507686244275e-3, name: "iso88597_el", size: 1033, typeId: "object" }, { id: "Ga6Z1yRgs99Vpa5QrR70_", lastModifiedAt: 17435076862445083e-4, name: "iso88598", size: 2352, typeId: "object" }, { id: "XmtdLSxT84HsoF7OIqye4", lastModifiedAt: 1743507686244566e-3, name: "iso88598_he", size: 2353, typeId: "object" }, { id: "3HCk8XXlua9KEOtc5iseJ", lastModifiedAt: 1743507686244627e-3, name: "iso88599_tr", size: 2424, typeId: "object" }, { id: "zjfA3EHpzaPHAvTkBICWG", lastModifiedAt: 17435076862446736e-4, name: "koi8r", size: 1024, typeId: "object" }, { id: "IRnhQiGe4mxsoQpaJCdRM", lastModifiedAt: 17435076862447236e-4, name: "lang_arabic", size: 4059, typeId: "object" }, { id: "ih-RgplBSErEYOcna-NlI", lastModifiedAt: 17435076862447717e-4, name: "lang_chinese", size: 916, typeId: "object" }, { id: "9EYQqNjgOksavPn--KH46", lastModifiedAt: 17435076862448289e-4, name: "lang_czech", size: 1795, typeId: "object" }, { id: "Xaeq_CiSthaccRyGw22Bx", lastModifiedAt: 17435076862448726e-4, name: "lang_greek", size: 1895, typeId: "object" }, { id: "421DaSaIy8ywB26Rc2GV1", lastModifiedAt: 1743507686244933e-3, name: "lang_hebrew", size: 4124, typeId: "object" }, { id: "N01Ggo186R8phM3c0zLa2", lastModifiedAt: 17435076862449873e-4, name: "lang_japanese", size: 3978, typeId: "object" }, { id: "T8jzTqgGlU30YQd1QvMm3", lastModifiedAt: 17435076862450503e-4, name: "lang_korean", size: 3466, typeId: "object" }, { id: "R-Fkzl2BW0o9Hios70WwI", lastModifiedAt: 17435076862450947e-4, name: "lang_russian", size: 1873, typeId: "object" }, { id: "KiKbYoPDMht0f9ElSfTYZ", lastModifiedAt: 1743507686245141e-3, name: "lang_turkish", size: 2678, typeId: "object" }, { id: "a_RPqwZdZ5DmZOCDUVeiZ", lastModifiedAt: 17435076862451846e-4, name: "shiftjis", size: 2816, typeId: "object" }, { id: "rXd90uYo_IZSqu9U_3Sr6", lastModifiedAt: 1743507686245242e-3, name: "utf16be", size: 1334, typeId: "object" }, { id: "83XbTcV0_WKdvcPEKeuDy", lastModifiedAt: 17435076862452773e-4, name: "utf16le", size: 1334, typeId: "object" }, { id: "Upq9-WDaQTs--Ogg1Qtev", lastModifiedAt: 17435076862453193e-4, name: "utf32be", size: 2664, typeId: "object" }, { id: "mm0RGQoiYeYc7ORPPI2S8", lastModifiedAt: 17435076862453613e-4, name: "utf32le", size: 2664, typeId: "object" }, { id: "J9FIyiit-zK4HquqAwGNE", lastModifiedAt: 17435076862454148e-4, name: "utf8", size: 1125, typeId: "object" }, { id: "pZQOaI1tOrcy2Km0Z7Enb", lastModifiedAt: 17435076862454595e-4, name: "windows_1250", size: 1617, typeId: "object" }, { id: "da-PPmwaWqLyqUz6SRw1v", lastModifiedAt: 1743507686245507e-3, name: "windows_1251", size: 1024, typeId: "object" }, { id: "aw_8vVm1CvdxaiiI3CX-L", lastModifiedAt: 17435076862456494e-4, name: "windows_1252", size: 2976, typeId: "object" }, { id: "-JYzWLdhtRIWC0vwZFj0I", lastModifiedAt: 17435076862456982e-4, name: "windows_1253", size: 1052, typeId: "object" }, { id: "ImvMAQPnb13Mf7mqB7t6m", lastModifiedAt: 17435076862458247e-4, name: "windows_1254", size: 2445, typeId: "object" }, { id: "mYnEtUyasG7Cub5f7WgsT", lastModifiedAt: 17435076862458765e-4, name: "windows_1255", size: 2405, typeId: "object" }, { id: "clQEg9g9e9QiBJcsOcKcs", lastModifiedAt: 17435076862459272e-4, name: "windows_1256", size: 2241, typeId: "object" }]
246
- }, se = "0.2.304";
247
- let h;
248
- async function ae(t, e) {
249
- const { add_my_numbers: i } = await _();
250
- console.log(1111, t, e);
251
- const d = i(Math.trunc(t), Math.trunc(e));
306
+ }, ye = "0.2.307";
307
+ let E;
308
+ async function Ie(e, t) {
309
+ const { add_my_numbers: i } = await k();
310
+ console.log(1111, e, t);
311
+ const d = i(Math.trunc(e), Math.trunc(t));
252
312
  return console.log(2222, d), d;
253
313
  }
254
- async function ne(t) {
255
- const { checksum_from_rust: e } = await _();
256
- return e(t);
314
+ async function Ae(e) {
315
+ const { checksum_from_rust: t } = await k();
316
+ return t(e);
257
317
  }
258
- async function _() {
259
- return h ??= import("./datapos_connector_file_store_emulator_core-CBVDrOML.js"), h;
318
+ async function k() {
319
+ return E ??= import("./datapos_connector_file_store_emulator_core-CBVDrOML.js"), E;
260
320
  }
261
- const ce = "Connector failed to abort preview object operation.", le = "Connector failed to abort retrieve all records operation.", re = 4096, pe = 1e3, E = "https://sample-data-eu.datapos.app";
262
- class be {
321
+ const Me = "Connector failed to abort preview object operation.", je = "Connector failed to abort retrieve all records operation.", ze = 4096, ue = 1e3, w = "https://sample-data-eu.datapos.app";
322
+ class ve {
263
323
  abortController;
264
324
  config;
265
325
  connectionConfig;
266
326
  tools;
267
- constructor(e, i) {
268
- this.abortController = void 0, this.config = oe, this.config.version = se, this.connectionConfig = e, this.tools = i;
327
+ constructor(t, i) {
328
+ this.abortController = void 0, this.config = fe, this.config.version = ye, this.connectionConfig = t, this.tools = i;
269
329
  }
270
330
  // Operations - Abort operation.
271
- abortOperation(e) {
272
- e.abortController && (e.abortController.abort(), e.abortController = void 0);
331
+ abortOperation(t) {
332
+ t.abortController && (t.abortController.abort(), t.abortController = void 0);
273
333
  }
274
334
  // Operations - Find object.
275
- findObject(e, i) {
335
+ findObject(t, i) {
276
336
  for (const d in M)
277
- if (Object.prototype.hasOwnProperty.call(M, d) && M[d]?.find((o) => o.typeId === "object" && o.id === i.objectName))
337
+ if (Object.prototype.hasOwnProperty.call(M, d) && M[d]?.find((a) => a.typeId === "object" && a.id === i.objectName))
278
338
  return Promise.resolve({ folderPath: d });
279
339
  return Promise.resolve({});
280
340
  }
281
- // Operations - Get reader.
282
- async ReadableStream(e, i) {
341
+ // Operations - Get readable stream.
342
+ async getReadableStream(t, i) {
283
343
  try {
284
- console.log("getReader", "connector", e), console.log("getReader", "settings", i);
344
+ console.log("getReader", "connector", t), console.log("getReader", "settings", i);
285
345
  const d = await fetch("https://sample-data-eu.datapos.app/fileStore/ENGAGEMENT_START_EVENTS_202405121858.csv");
286
346
  if (console.log("getReader", "response", d), !d.body) throw new Error("ReadableStream not supported by this browser.");
287
- const a = await ae(12, 56), s = await ne(e.config.version);
288
- return console.log("sum", s, a), await Promise.resolve({ readable: d.body });
347
+ const o = await Ie(12, 56), s = await Ae(t.config.version);
348
+ return console.log("sum", s, o), await Promise.resolve({ readable: d.body });
289
349
  } catch (d) {
290
- throw e.abortController = void 0, d;
350
+ throw t.abortController = void 0, d;
291
351
  }
292
352
  }
293
353
  // Operations - List nodes.
294
- listNodes(e, i) {
295
- const d = M[i.folderPath] ?? [], a = [];
354
+ listNodes(t, i) {
355
+ const d = M[i.folderPath] ?? [], o = [];
296
356
  for (const s of d)
297
- s.typeId === "folder" ? a.push(this.constructFolderNodeConfig(i.folderPath, s.name, s.childCount)) : a.push(this.constructObjectNodeConfig(i.folderPath, s.id, s.name, s.lastModifiedAt, s.size));
298
- return Promise.resolve({ cursor: void 0, isMore: !1, connectionNodeConfigs: a, totalCount: a.length });
357
+ s.typeId === "folder" ? o.push(this.constructFolderNodeConfig(i.folderPath, s.name, s.childCount)) : o.push(this.constructObjectNodeConfig(i.folderPath, s.id, s.name, s.lastModifiedAt, s.size));
358
+ return Promise.resolve({ cursor: void 0, isMore: !1, connectionNodeConfigs: o, totalCount: o.length });
299
359
  }
300
360
  // Operations - Preview object.
301
- async previewObject(e, i) {
361
+ async previewObject(t, i) {
302
362
  try {
303
- e.abortController = new AbortController();
304
- const d = e.abortController.signal;
363
+ t.abortController = new AbortController();
364
+ const d = t.abortController.signal;
305
365
  d.addEventListener("abort", () => {
306
- throw new this.tools.dataPos.OperationalError(ce, "datapos-connector-file-store-emulator|Connector|preview.abort");
366
+ throw new h(Me, "datapos-connector-file-store-emulator|Connector|preview.abort");
307
367
  });
308
- const a = `${E}/fileStore${i.path}`, s = { Range: `bytes=0-${i.chunkSize != null || re}` }, o = await fetch(encodeURI(a), { headers: s, signal: d });
309
- if (o.ok)
310
- return e.abortController = void 0, { data: new Uint8Array(await o.arrayBuffer()), typeId: "uint8Array" };
311
- throw await this.tools.dataPos.buildFetchError(o, `Failed to fetch '${i.path}' file.`, "datapos-connector-file-store-emulator|Connector|preview");
368
+ const o = `${w}/fileStore${i.path}`, a = { Range: `bytes=0-${i.chunkSize ?? ze}` }, l = await fetch(encodeURI(o), { headers: a, signal: d });
369
+ if (l.ok)
370
+ return t.abortController = void 0, { data: new Uint8Array(await l.arrayBuffer()), typeId: "uint8Array" };
371
+ throw await Z(l, `Failed to fetch '${i.path}' file.`, "datapos-connector-file-store-emulator|Connector|preview");
312
372
  } catch (d) {
313
- throw e.abortController = void 0, d;
373
+ throw t.abortController = void 0, d;
314
374
  }
315
375
  }
316
376
  // Operations - Retrieve records.
317
- async retrieveRecords(e, i, d, a) {
318
- return new Promise((s, o) => {
377
+ async retrieveRecords(t, i, d, o) {
378
+ return new Promise((s, a) => {
319
379
  try {
320
- e.abortController = new AbortController();
321
- const r = e.abortController.signal;
322
- r.addEventListener(
380
+ t.abortController = new AbortController();
381
+ const l = t.abortController.signal;
382
+ l.addEventListener(
323
383
  "abort",
324
384
  () => {
325
- e.abortController = void 0, o(new e.tools.dataPos.OperationalError(le, "datapos-connector-file-store-emulator|Connector|retrieve.abort"));
385
+ t.abortController = void 0, a(new h(je, "datapos-connector-file-store-emulator|Connector|retrieve.abort"));
326
386
  },
327
387
  { once: !0 }
328
388
  );
329
389
  let n = [];
330
- const l = e.tools.csvParse({
390
+ const r = t.tools.csvParse({
331
391
  delimiter: i.valueDelimiterId,
332
392
  info: !0,
333
393
  relax_column_count: !0,
334
394
  relax_quotes: !0
335
395
  });
336
- l.on("readable", () => {
396
+ r.on("readable", () => {
337
397
  try {
338
398
  let p;
339
- for (; (p = l.read()) !== null; )
340
- r.throwIfAborted(), n.push(p), !(n.length < pe) && (d([]), n = []);
399
+ for (; (p = r.read()) !== null; )
400
+ l.throwIfAborted(), n.push(p), !(n.length < ue) && (d([]), n = []);
341
401
  } catch (p) {
342
- e.abortController = void 0, o(f(p));
402
+ t.abortController = void 0, a(f(p));
343
403
  }
344
- }), l.on("error", (p) => {
345
- e.abortController = void 0, o(f(p));
346
- }), l.on("end", () => {
404
+ }), r.on("error", (p) => {
405
+ t.abortController = void 0, a(f(p));
406
+ }), r.on("end", () => {
347
407
  try {
348
- r.throwIfAborted(), e.abortController = void 0, n.length > 0 && (d([]), n = []), a({
349
- byteCount: l.info.bytes,
350
- commentLineCount: l.info.comment_lines,
351
- emptyLineCount: l.info.empty_lines,
352
- invalidFieldLengthCount: l.info.invalid_field_length,
353
- lineCount: l.info.lines,
354
- recordCount: l.info.records
408
+ l.throwIfAborted(), t.abortController = void 0, n.length > 0 && (d([]), n = []), o({
409
+ byteCount: r.info.bytes,
410
+ commentLineCount: r.info.comment_lines,
411
+ emptyLineCount: r.info.empty_lines,
412
+ invalidFieldLengthCount: r.info.invalid_field_length,
413
+ lineCount: r.info.lines,
414
+ recordCount: r.info.records
355
415
  }), s();
356
416
  } catch (p) {
357
- e.abortController = void 0, o(f(p));
417
+ t.abortController = void 0, a(f(p));
358
418
  }
359
419
  });
360
- const y = `${E}/fileStore${i.path}`;
361
- fetch(encodeURI(y), { signal: r }).then(async (p) => {
420
+ const y = `${w}/fileStore${i.path}`;
421
+ fetch(encodeURI(y), { signal: l }).then(async (p) => {
362
422
  try {
363
423
  if (p.ok && p.body) {
364
- const u = p.body.pipeThrough(new TextDecoderStream(i.encodingId)).getReader();
365
- let j = await u.read();
424
+ const v = p.body.pipeThrough(new TextDecoderStream(i.encodingId)).getReader();
425
+ let j = await v.read();
366
426
  for (; !j.done; )
367
- r.throwIfAborted(), l.write(j.value, (C) => {
368
- C && (e.abortController = void 0, o(f(C)));
369
- }), j = await u.read();
370
- l.end();
427
+ l.throwIfAborted(), r.write(j.value, (C) => {
428
+ C && (t.abortController = void 0, a(f(C)));
429
+ }), j = await v.read();
430
+ r.end();
371
431
  } else {
372
- const I = await e.tools.dataPos.buildFetchError(
432
+ const I = await t.tools.dataPos.buildFetchError(
373
433
  p,
374
434
  `Failed to fetch '${i.path}' file.`,
375
435
  "datapos-connector-file-store-emulator|Connector|retrieve"
376
436
  );
377
- e.abortController = void 0, o(I);
437
+ t.abortController = void 0, a(I);
378
438
  }
379
439
  } catch (I) {
380
- e.abortController = void 0, o(f(I));
440
+ t.abortController = void 0, a(f(I));
381
441
  }
382
442
  }).catch((p) => {
383
- e.abortController = void 0, o(f(p));
443
+ t.abortController = void 0, a(f(p));
384
444
  });
385
- } catch (r) {
386
- e.abortController = void 0, o(f(r));
445
+ } catch (l) {
446
+ t.abortController = void 0, a(f(l));
387
447
  }
388
448
  });
389
449
  }
390
450
  /** Utilities - Construct folder node configuration. */
391
- constructFolderNodeConfig(e, i, d) {
392
- return { id: this.tools.nanoid(), childCount: d, folderPath: e, label: i, name: i, typeId: "folder" };
451
+ constructFolderNodeConfig(t, i, d) {
452
+ return { id: O(), childCount: d, folderPath: t, label: i, name: i, typeId: "folder" };
393
453
  }
394
454
  /** Utilities - Construct object (file) node configuration. */
395
- constructObjectNodeConfig(e, i, d, a, s) {
396
- const o = this.tools.dataPos.extractNameFromPath(d) ?? "", r = this.tools.dataPos.extractExtensionFromPath(d), n = a, l = this.tools.dataPos.lookupMimeTypeForExtension(r);
397
- return { id: i, extension: r, folderPath: e, label: d, lastModifiedAt: n, mimeType: l, name: o, size: s, typeId: "object" };
455
+ constructObjectNodeConfig(t, i, d, o, s) {
456
+ const a = K(d) ?? "", l = Q(d), n = o, r = J(l);
457
+ return { id: i, extension: l, folderPath: t, label: d, lastModifiedAt: n, mimeType: r, name: a, size: s, typeId: "object" };
398
458
  }
399
459
  }
400
460
  export {
401
- be as default
461
+ ve as default
402
462
  };
403
463
  //# sourceMappingURL=datapos-connector-file-store-emulator.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"datapos-connector-file-store-emulator.es.js","sources":["../node_modules/@datapos/datapos-shared/dist/datapos-shared.es.js","../src/rustBridge.ts","../src/index.ts"],"sourcesContent":["let j;\n// @__NO_SIDE_EFFECTS__\nfunction H(e) {\n return {\n lang: e?.lang ?? j?.lang,\n message: e?.message,\n abortEarly: e?.abortEarly ?? j?.abortEarly,\n abortPipeEarly: e?.abortPipeEarly ?? j?.abortPipeEarly\n };\n}\nlet K;\n// @__NO_SIDE_EFFECTS__\nfunction W(e) {\n return K?.get(e);\n}\nlet X;\n// @__NO_SIDE_EFFECTS__\nfunction J(e) {\n return X?.get(e);\n}\nlet q;\n// @__NO_SIDE_EFFECTS__\nfunction Q(e, r) {\n return q?.get(e)?.get(r);\n}\n// @__NO_SIDE_EFFECTS__\nfunction U(e) {\n const r = typeof e;\n return r === \"string\" ? `\"${e}\"` : r === \"number\" || r === \"bigint\" || r === \"boolean\" ? `${e}` : r === \"object\" || r === \"function\" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? \"null\" : r;\n}\nfunction g(e, r, t, n, s) {\n const o = s && \"input\" in s ? s.input : t.value, i = s?.expected ?? e.expects ?? null, u = s?.received ?? /* @__PURE__ */ U(o), a = {\n kind: e.kind,\n type: e.type,\n input: o,\n expected: i,\n received: u,\n message: `Invalid ${r}: ${i ? `Expected ${i} but r` : \"R\"}eceived ${u}`,\n requirement: e.requirement,\n path: s?.path,\n issues: s?.issues,\n lang: n.lang,\n abortEarly: n.abortEarly,\n abortPipeEarly: n.abortPipeEarly\n }, p = e.kind === \"schema\", d = s?.message ?? e.message ?? /* @__PURE__ */ Q(e.reference, a.lang) ?? (p ? /* @__PURE__ */ J(a.lang) : null) ?? n.message ?? /* @__PURE__ */ W(a.lang);\n d !== void 0 && (a.message = typeof d == \"function\" ? d(a) : d), p && (t.typed = !1), t.issues ? t.issues.push(a) : t.issues = [a];\n}\n// @__NO_SIDE_EFFECTS__\nfunction h(e) {\n return {\n version: 1,\n vendor: \"valibot\",\n validate(r) {\n return e[\"~run\"]({ value: r }, /* @__PURE__ */ H());\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction Y(e, r) {\n return Object.hasOwn(e, r) && r !== \"__proto__\" && r !== \"prototype\" && r !== \"constructor\";\n}\n// @__NO_SIDE_EFFECTS__\nfunction Z(e, r) {\n const t = [...new Set(e)];\n return t.length > 1 ? `(${t.join(` ${r} `)})` : t[0] ?? \"never\";\n}\n// @__NO_SIDE_EFFECTS__\nfunction ee(e, r, t) {\n return typeof e.fallback == \"function\" ? e.fallback(r, t) : e.fallback;\n}\n// @__NO_SIDE_EFFECTS__\nfunction A(e, r, t) {\n return typeof e.default == \"function\" ? e.default(r, t) : e.default;\n}\n// @__NO_SIDE_EFFECTS__\nfunction x(e, r) {\n return {\n kind: \"schema\",\n type: \"array\",\n reference: x,\n expects: \"Array\",\n async: !1,\n item: e,\n message: r,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(t, n) {\n const s = t.value;\n if (Array.isArray(s)) {\n t.typed = !0, t.value = [];\n for (let o = 0; o < s.length; o++) {\n const i = s[o], u = this.item[\"~run\"]({ value: i }, n);\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], t.issues?.push(p);\n if (t.issues || (t.issues = u.issues), n.abortEarly) {\n t.typed = !1;\n break;\n }\n }\n u.typed || (t.typed = !1), t.value.push(u.value);\n }\n } else g(this, \"type\", t, n);\n return t;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction B(e) {\n return {\n kind: \"schema\",\n type: \"boolean\",\n reference: B,\n expects: \"boolean\",\n async: !1,\n message: e,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(r, t) {\n return typeof r.value == \"boolean\" ? r.typed = !0 : g(this, \"type\", r, t), r;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction k(e, r) {\n return {\n kind: \"schema\",\n type: \"literal\",\n reference: k,\n expects: /* @__PURE__ */ U(e),\n async: !1,\n literal: e,\n message: r,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(t, n) {\n return t.value === this.literal ? t.typed = !0 : g(this, \"type\", t, n), t;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction y(e, r) {\n return {\n kind: \"schema\",\n type: \"nullable\",\n reference: y,\n expects: `(${e.expects} | null)`,\n async: !1,\n wrapped: e,\n default: r,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(t, n) {\n return t.value === null && (this.default !== void 0 && (t.value = /* @__PURE__ */ A(this, t, n)), t.value === null) ? (t.typed = !0, t) : this.wrapped[\"~run\"](t, n);\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction D(e) {\n return {\n kind: \"schema\",\n type: \"number\",\n reference: D,\n expects: \"number\",\n async: !1,\n message: e,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(r, t) {\n return typeof r.value == \"number\" && !isNaN(r.value) ? r.typed = !0 : g(this, \"type\", r, t), r;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction b(e, r) {\n return {\n kind: \"schema\",\n type: \"object\",\n reference: b,\n expects: \"Object\",\n async: !1,\n entries: e,\n message: r,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(t, n) {\n const s = t.value;\n if (s && typeof s == \"object\") {\n t.typed = !0, t.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__ */ A(i), a = i[\"~run\"]({ value: u }, n);\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], t.issues?.push(d);\n if (t.issues || (t.issues = a.issues), n.abortEarly) {\n t.typed = !1;\n break;\n }\n }\n a.typed || (t.typed = !1), t.value[o] = a.value;\n } else if (i.fallback !== void 0) t.value[o] = /* @__PURE__ */ ee(i);\n else if (i.type !== \"exact_optional\" && i.type !== \"optional\" && i.type !== \"nullish\" && (g(this, \"key\", t, n, {\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 }), n.abortEarly))\n break;\n }\n } else g(this, \"type\", t, n);\n return t;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction f(e, r) {\n return {\n kind: \"schema\",\n type: \"optional\",\n reference: f,\n expects: `(${e.expects} | undefined)`,\n async: !1,\n wrapped: e,\n default: r,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(t, n) {\n return t.value === void 0 && (this.default !== void 0 && (t.value = /* @__PURE__ */ A(this, t, n)), t.value === void 0) ? (t.typed = !0, t) : this.wrapped[\"~run\"](t, n);\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction R(e, r, t) {\n return {\n kind: \"schema\",\n type: \"record\",\n reference: R,\n expects: \"Object\",\n async: !1,\n key: e,\n value: r,\n message: t,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(n, s) {\n const o = n.value;\n if (o && typeof o == \"object\") {\n n.typed = !0, n.value = {};\n for (const i in o) if (/* @__PURE__ */ Y(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], n.issues?.push(S);\n if (n.issues || (n.issues = a.issues), s.abortEarly) {\n n.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], n.issues?.push(S);\n if (n.issues || (n.issues = p.issues), s.abortEarly) {\n n.typed = !1;\n break;\n }\n }\n (!a.typed || !p.typed) && (n.typed = !1), a.typed && (n.value[a.value] = p.value);\n }\n } else g(this, \"type\", n, s);\n return n;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction l(e) {\n return {\n kind: \"schema\",\n type: \"string\",\n reference: l,\n expects: \"string\",\n async: !1,\n message: e,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(r, t) {\n return typeof r.value == \"string\" ? r.typed = !0 : g(this, \"type\", r, t), r;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction _(e) {\n let r;\n if (e) for (const t of e) r ? r.push(...t.issues) : r = t.issues;\n return r;\n}\n// @__NO_SIDE_EFFECTS__\nfunction G(e, r) {\n return {\n kind: \"schema\",\n type: \"union\",\n reference: G,\n expects: /* @__PURE__ */ Z(e.map((t) => t.expects), \"|\"),\n async: !1,\n options: e,\n message: r,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(t, n) {\n let s, o, i;\n for (const u of this.options) {\n const a = u[\"~run\"]({ value: t.value }, n);\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 g(this, \"type\", t, n, { issues: /* @__PURE__ */ _(o) }), t.typed = !0;\n } else {\n if (i?.length === 1) return i[0];\n g(this, \"type\", t, n, { issues: /* @__PURE__ */ _(i) });\n }\n return t;\n }\n };\n}\nconst v = (e) => /* @__PURE__ */ G(e.map((r) => /* @__PURE__ */ k(r))), te = /* @__PURE__ */ b({\n \"en-au\": /* @__PURE__ */ l(),\n \"en-gb\": /* @__PURE__ */ l(),\n \"en-us\": /* @__PURE__ */ l(),\n \"es-es\": /* @__PURE__ */ l()\n}), O = /* @__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}), re = v([\"amber\", \"green\", \"red\", \"other\"]), ne = v([\n \"alpha\",\n \"beta\",\n \"generalAvailability\",\n \"notApplicable\",\n \"preAlpha\",\n \"proposed\",\n \"releaseCandidate\",\n \"unavailable\",\n \"underReview\"\n]), se = v([\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]);\nv([\"app\", \"engine\", \"connector\", \"context\", \"presenter\", \"tool\"]);\nconst oe = /* @__PURE__ */ b({\n id: /* @__PURE__ */ l(),\n color: re,\n label: /* @__PURE__ */ l()\n}), T = {\n id: /* @__PURE__ */ l(),\n label: O,\n description: O,\n firstCreatedAt: /* @__PURE__ */ f(/* @__PURE__ */ D()),\n icon: /* @__PURE__ */ y(/* @__PURE__ */ l()),\n iconDark: /* @__PURE__ */ y(/* @__PURE__ */ l()),\n lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ D()),\n status: /* @__PURE__ */ y(oe),\n statusId: ne\n}, De = /* @__PURE__ */ b({\n ...T,\n typeId: se\n}), $ = {\n ...T,\n version: /* @__PURE__ */ l()\n}, P = /* @__PURE__ */ b({\n id: /* @__PURE__ */ l(),\n label: O,\n description: O,\n icon: /* @__PURE__ */ y(/* @__PURE__ */ l()),\n iconDark: /* @__PURE__ */ y(/* @__PURE__ */ l()),\n order: /* @__PURE__ */ D(),\n path: /* @__PURE__ */ l()\n}), E = (e) => {\n const r = Object.entries(e).filter((t) => typeof t[1] == \"string\");\n return new Map(r);\n}, ie = (e, r, t = I) => {\n const n = e.get(r);\n if (n !== void 0) return n;\n if (t !== r)\n return e.get(t);\n}, ae = [\n { id: \"alpha\", color: \"red\", labels: E({ \"en-gb\": \"alpha\" }) },\n { id: \"beta\", color: \"amber\", labels: E({ \"en-gb\": \"beta\" }) },\n { id: \"generalAvailability\", color: \"green\", labels: E({ \"en-gb\": \"\" }) },\n { id: \"notApplicable\", color: \"green\", labels: E({ \"en-gb\": \"not-applicable\" }) },\n { id: \"preAlpha\", color: \"red\", labels: E({ \"en-gb\": \"pre-alpha\" }) },\n { id: \"proposed\", color: \"other\", labels: E({ \"en-gb\": \"proposed\" }) },\n { id: \"releaseCandidate\", color: \"green\", labels: E({ \"en-gb\": \"release-candidate\" }) },\n { id: \"unavailable\", color: \"other\", labels: E({ \"en-gb\": \"unavailable\" }) },\n { id: \"underReview\", color: \"other\", labels: E({ \"en-gb\": \"under-review\" }) }\n], ke = (e, r = I) => {\n const t = ae.find((n) => n.id === e);\n if (t) {\n const n = ie(t.labels, r);\n return { id: t.id, color: t.color, label: n ?? t.id };\n }\n return { id: e, color: \"other\", label: e };\n}, le = v([\"application\", \"curatedDataset\", \"database\", \"fileStore\"]), ce = v([\n \"abortOperation\",\n \"authenticateConnection\",\n \"createObject\",\n \"describeConnection\",\n \"dropObject\",\n \"findObject\",\n \"getReadableStream\",\n \"getRecord\",\n \"listNodes\",\n \"previewObject\",\n \"removeRecords\",\n \"retrieveRecords\",\n \"upsertRecords\"\n]), ue = v([\"bidirectional\", \"destination\", \"source\", \"unknown\"]), pe = v([\"apiKey\", \"disabled\", \"oAuth2\", \"none\"]), de = /* @__PURE__ */ b({\n id: /* @__PURE__ */ l(),\n label: /* @__PURE__ */ l()\n}), fe = /* @__PURE__ */ b({\n authMethodId: pe,\n activeConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ D()),\n canDescribe: /* @__PURE__ */ f(/* @__PURE__ */ B()),\n id: /* @__PURE__ */ f(/* @__PURE__ */ l()),\n label: /* @__PURE__ */ f(te),\n maxConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ D()),\n params: /* @__PURE__ */ f(/* @__PURE__ */ x(/* @__PURE__ */ R(/* @__PURE__ */ l(), /* @__PURE__ */ l())))\n}), we = /* @__PURE__ */ b({\n ...$,\n typeId: /* @__PURE__ */ k(\"connector\"),\n category: /* @__PURE__ */ y(de),\n categoryId: le,\n implementations: /* @__PURE__ */ R(/* @__PURE__ */ l(), fe),\n operations: /* @__PURE__ */ x(ce),\n usageId: ue,\n vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ l()),\n vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ l()),\n vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ l())\n}), Ie = [\"createObject\", \"dropObject\", \"removeRecords\", \"upsertRecords\"], Me = [\"findObject\", \"getRecord\", \"listNodes\", \"previewObject\", \"retrieveRecords\"], M = (e) => {\n const r = Object.entries(e).filter((t) => typeof t[1] == \"string\");\n return new Map(r);\n};\nM({ \"en-gb\": \"Application\" }), M({ \"en-gb\": \"Curated Dataset\" }), M({ \"en-gb\": \"Database\" }), M({ \"en-gb\": \"File Store\" });\nconst me = v([\"list\"]), be = /* @__PURE__ */ b({\n ...T,\n typeId: /* @__PURE__ */ k(\"contextModelGroup\"),\n modelRefs: /* @__PURE__ */ x(P),\n order: /* @__PURE__ */ D()\n}), Oe = /* @__PURE__ */ b({\n ...$,\n typeId: /* @__PURE__ */ k(\"context\"),\n models: /* @__PURE__ */ x(be),\n operations: /* @__PURE__ */ x(me)\n});\nclass F extends Error {\n locator;\n constructor(r, t, n) {\n super(r, n), this.name = \"DataPosError\", this.locator = t;\n }\n}\nclass w extends F {\n constructor(r, t, n) {\n super(r, t, n), this.name = \"ApplicationError\";\n }\n}\nclass Ce extends w {\n constructor(r, t, n) {\n super(r, t, n), this.name = \"APIError\";\n }\n}\nclass Ne extends w {\n constructor(r, t, n) {\n super(r, t, n), this.name = \"EngineError\";\n }\n}\nclass z extends w {\n body;\n constructor(r, t, n, s) {\n super(r, t, s), this.name = \"FetchError\", this.body = n;\n }\n}\nclass ye extends w {\n componentName;\n info;\n constructor(r, t, n, s, o) {\n super(r, t, o), this.name = \"VueHandledError\", this.info = n, this.componentName = s;\n }\n}\nclass je extends w {\n constructor(r, t, n) {\n super(r, t, n), this.name = \"WindowHandledRuntimeError\";\n }\n}\nclass Ae extends w {\n constructor(r, t, n) {\n super(r, t, n), this.name = \"WindowHandledPromiseRejectionError\";\n }\n}\nclass Re extends F {\n constructor(r, t, n) {\n super(r, t, n), this.name = \"OperationalError\";\n }\n}\nasync function Te(e, r, t) {\n const n = ` - ${e.statusText}`, s = `${r} Response status '${e.status}${e.statusText ? n : \"\"}' received.`, o = await e.text();\n return new z(s, t, o);\n}\nfunction $e(e) {\n return e.map((r) => r.message).join(\" \");\n}\nfunction Fe(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 && 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 Le(e) {\n const r = /* @__PURE__ */ new Set(), t = [];\n let n = e;\n for (; n && !r.has(n); ) {\n r.add(n);\n let s;\n if (n instanceof z)\n s = { body: n.body, locator: n.locator, message: n.message, name: n.name, stack: n.stack }, n = n.cause;\n else if (n instanceof ye)\n s = { componentName: n.componentName, info: n.info, locator: n.locator, message: n.message, name: n.name, stack: n.stack }, n = n.cause;\n else if (n instanceof F)\n s = { locator: n.locator, message: n.message, name: n.name, stack: n.stack }, n = n.cause;\n else if (n instanceof Error) {\n const o = n;\n s = { locator: \"\", message: o.message, name: o.name, stack: o.stack }, n = o.cause;\n } else\n s = { locator: \"\", message: String(n), name: \"Error\" }, n = void 0;\n /(?:\\.{3}|[.!?])$/.test(s.message) || (s.message += \".\"), t.push(s);\n }\n return t;\n}\nconst ge = v([\"list\", \"render\", \"setColorMode\"]), _e = /* @__PURE__ */ b({\n ...$,\n typeId: /* @__PURE__ */ k(\"presenter\"),\n presentations: /* @__PURE__ */ x(P),\n operations: /* @__PURE__ */ x(ge)\n});\nfunction Ue() {\n return { render: he };\n}\nfunction he(e, r, t) {\n t.textContent = \"Cytoscape.js diagram goes here...\";\n}\nfunction Be() {\n return { render: ve };\n}\nfunction ve(e, r) {\n console.log(1111, e), console.log(2222, r), console.log(3333, r.childNodes), console.log(4444, r.children);\n}\nconst V = \"en-US\", C = /* @__PURE__ */ new Map();\nfunction Ge(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 Pe(e) {\n if (e) {\n const r = e.lastIndexOf(\"/\"), t = e.lastIndexOf(\".\", r === -1 ? e.length : r);\n return t === -1 ? e : e.slice(0, Math.max(0, t));\n }\n}\nfunction ze(e) {\n if (e) {\n const r = e.lastIndexOf(\".\");\n if (r !== -1) return e.slice(Math.max(0, r + 1));\n }\n}\nfunction m(e, r = 2, t = r, n = V) {\n if (e == null) return \"\";\n const s = `${n}decimal${r}.${t}`;\n let o = C.get(s);\n return o || (o = new Intl.NumberFormat(n, {\n localeMatcher: \"best fit\",\n maximumFractionDigits: r,\n minimumFractionDigits: t,\n minimumIntegerDigits: 1,\n style: \"decimal\",\n useGrouping: !0\n }), C.set(s, o)), o.format(e);\n}\nfunction Ve(e) {\n return e == null ? \"\" : e < 1e3 ? N(e) : e < 1e6 ? `${m(e / 1e3, 2, 0)}K` : e < 1e9 ? `${m(e / 1e6, 2, 0)}M` : e < 1e12 ? `${m(e / 1e9, 2, 0)}B` : `${m(e / 1e12, 2, 0)}T`;\n}\nfunction He(e) {\n return e == null ? \"\" : e === 1 ? \"1 byte\" : e < 1024 ? `${N(e)} bytes` : e < 1048576 ? `${m(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${m(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${m(e / 1073741824, 2, 0)} GB` : `${m(e / 1099511627776, 2, 0)} TB`;\n}\nfunction Ke(e) {\n return e == null ? \"\" : e < 1e3 ? `${N(e)} ms` : e === 1e3 ? `${N(e)} sec` : e < 6e4 ? `${m(e / 1e3, 2, 0)} secs` : e === 6e4 ? \"1 min\" : e < 36e5 ? `${m(e / 6e4, 2, 0)} mins` : e === 36e5 ? \"1 hr\" : e < 864e5 ? `${m(e / 36e5, 2, 0)} hrs` : e === 864e5 ? \"1 day\" : `${m(e / 864e5, 2, 0)} days`;\n}\nfunction N(e, r = V) {\n if (e == null) return \"\";\n const t = `${r}decimal0.0`;\n let n = C.get(t);\n return n || (n = new Intl.NumberFormat(r, {\n localeMatcher: \"best fit\",\n maximumFractionDigits: 0,\n minimumFractionDigits: 0,\n minimumIntegerDigits: 1,\n style: \"decimal\",\n useGrouping: !0\n }), C.set(t, n)), n.format(e);\n}\nfunction We(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}\nconst c = (e) => new Map(Object.entries(e)), L = (e, r, t = I) => {\n const n = e.get(r);\n if (n !== void 0) return n;\n if (t !== r)\n return e.get(t);\n}, Ee = [\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], Xe = (e = I) => {\n const r = [];\n for (const t of Ee) {\n const n = L(t.labels, e);\n r.push({ id: t.id, label: n ?? t.id });\n }\n return r;\n}, xe = [\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], Je = (e = I) => {\n const r = [];\n for (const t of xe) {\n const n = L(t.labels, e);\n r.push({ id: t.id, label: n ?? t.id });\n }\n return r;\n}, Se = [\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], qe = (e = I) => {\n const r = [];\n for (const t of Se) {\n const n = L(t.labels, e);\n r.push({ id: t.id, label: n ?? t.id });\n }\n return r;\n}, I = \"en-gb\";\nexport {\n Ce as APIError,\n w as ApplicationError,\n Ie as CONNECTOR_DESTINATION_OPERATIONS,\n Me as CONNECTOR_SOURCE_OPERATIONS,\n I as DEFAULT_LOCALE_CODE,\n Ne as EngineError,\n z as FetchError,\n Re as OperationalError,\n ye as VueError,\n Ae as WindowPromiseRejectionError,\n je as WindowRuntimeError,\n Te as buildFetchError,\n De as componentConfigSchema,\n $e as concatenateSerialisedErrorMessages,\n we as connectorConfigSchema,\n Oe as contextConfigSchema,\n Ge as convertODataTypeIdToUsageTypeId,\n ze as extractExtensionFromPath,\n Pe as extractNameFromPath,\n m as formatNumberAsDecimalNumber,\n Ke as formatNumberAsDuration,\n Ve as formatNumberAsSize,\n He as formatNumberAsStorageSize,\n N as formatNumberAsWholeNumber,\n ke as getComponentStatus,\n Xe as getDataFormats,\n Je as getRecordDelimiters,\n qe as getValueDelimiters,\n We as lookupMimeTypeForExtension,\n Fe as normalizeToError,\n _e as presenterConfigSchema,\n Le as serialiseError,\n Ue as useCytoscapeJS,\n Be as useDataTable\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 type { HeadersInit } from 'undici';\n\n/** Dependencies - Framework. */\nimport { normalizeToError } from '@datapos/datapos-shared';\nimport type {\n ConnectionConfig,\n ConnectionNodeConfig,\n Connector,\n ConnectorConfig,\n ConnectorTools,\n FindResult,\n FindSettings,\n GetReaderResult,\n GetReaderSettings,\n ListResult,\n ListSettings,\n PreviewResult,\n PreviewSettings,\n RetrieveSettings,\n RetrieveSummary\n} from '@datapos/datapos-shared';\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\n constructor(connectionConfig: ConnectionConfig, tools: ConnectorTools) {\n this.abortController = undefined;\n this.config = config as ConnectorConfig;\n this.config.version = version;\n this.connectionConfig = connectionConfig;\n this.tools = tools;\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 reader.\n async ReadableStream(connector: FileStoreEmulatorConnector, settings: GetReaderSettings): Promise<GetReaderResult> {\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 this.tools.dataPos.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 headers: HeadersInit = { Range: `bytes=0-${settings.chunkSize != null || DEFAULT_PREVIEW_CHUNK_SIZE}` };\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 this.tools.dataPos.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: RetrieveSettings,\n chunk: (records: string[][]) => void,\n complete: (result: RetrieveSummary) => void\n ): Promise<void> {\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 connector.tools.dataPos.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 = connector.tools.csvParse({\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([]); // 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([]);\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: this.tools.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 = this.tools.dataPos.extractNameFromPath(fullName) ?? '';\n const extension = this.tools.dataPos.extractExtensionFromPath(fullName);\n const lastModifiedAtTimestamp = lastModifiedAt;\n const mimeType = this.tools.dataPos.lookupMimeTypeForExtension(extension);\n return { id, extension, folderPath, label: fullName, lastModifiedAt: lastModifiedAtTimestamp, mimeType, name, size, typeId: 'object' };\n }\n}\n"],"names":["j","H","e","K","W","X","J","q","Q","r","U","g","t","n","s","o","i","u","a","p","d","h","Z","k","_","G","v","E","M","Fe","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","config","version","connector","settings","folderPath","fileStoreIndex","indexItem","response","xxx","sum","error","indexItems","connectionNodeConfigs","signal","url","headers","chunk","complete","resolve","reject","pendingRows","parser","data","normalizeToError","decodedStreamReader","result","name","childCount","id","fullName","lastModifiedAt","size","extension","lastModifiedAtTimestamp","mimeType"],"mappings":"AAAA,IAAIA;AAAA;AAEJ,SAASC,EAAEC,GAAG;AACZ,SAAO;AAAA,IACL,MAAMA,GAAG,QAAQF,GAAG;AAAA,IACpB,SAASE,GAAG;AAAA,IACZ,YAAYA,GAAG,cAAcF,GAAG;AAAA,IAChC,gBAAgBE,GAAG,kBAAkBF,GAAG;AAAA,EAC5C;AACA;AACA,IAAIG;AAAA;AAEJ,SAASC,EAAEF,GAAG;AACZ,SAAOC,GAAG,IAAID,CAAC;AACjB;AACA,IAAIG;AAAA;AAEJ,SAASC,EAAEJ,GAAG;AACZ,SAAOG,GAAG,IAAIH,CAAC;AACjB;AACA,IAAIK;AAAA;AAEJ,SAASC,EAAEN,GAAGO,GAAG;AACf,SAAOF,GAAG,IAAIL,CAAC,GAAG,IAAIO,CAAC;AACzB;AAAA;AAEA,SAASC,EAAER,GAAG;AACZ,QAAMO,IAAI,OAAOP;AACjB,SAAOO,MAAM,WAAW,IAAIP,CAAC,MAAMO,MAAM,YAAYA,MAAM,YAAYA,MAAM,YAAY,GAAGP,CAAC,KAAKO,MAAM,YAAYA,MAAM,cAAcP,KAAK,OAAO,eAAeA,CAAC,GAAG,aAAa,SAAS,SAASO;AACxM;AACA,SAASE,EAAET,GAAGO,GAAGG,GAAGC,GAAGC,GAAG;AACxB,QAAMC,IAAID,KAAK,WAAWA,IAAIA,EAAE,QAAQF,EAAE,OAAOI,IAAIF,GAAG,YAAYZ,EAAE,WAAW,MAAMe,IAAIH,GAAG,YAA4B,gBAAAJ,EAAEK,CAAC,GAAGG,IAAI;AAAA,IAClI,MAAMhB,EAAE;AAAA,IACR,MAAMA,EAAE;AAAA,IACR,OAAOa;AAAA,IACP,UAAUC;AAAA,IACV,UAAUC;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jC;AAAA,cAAA;AAEJ,cAAAD,EAAU,kBAAkB,QAC5BiB,EAAOT,CAAK;AAAA,YAChB;AAAA,UACJ,SAASA,GAAO;AACZ,YAAAR,EAAU,kBAAkB,QAC5BiB,EAAOI,EAAiBb,CAAK,CAAC;AAAA,UAClC;AAAA,QACJ,CAAC,EACA,MAAM,CAACA,MAAmB;AACvB,UAAAR,EAAU,kBAAkB,QAC5BiB,EAAOI,EAAiBb,CAAK,CAAC;AAAA,QAClC,CAAC;AAAA,MACT,SAASA,GAAO;AACZ,QAAAR,EAAU,kBAAkB,QAC5BiB,EAAOI,EAAiBb,CAAK,CAAC;AAAA,MAClC;AAAA,IACJ,CAAC;AAAA,EACL;AAAA;AAAA,EAGQ,0BAA0BN,GAAoBsB,GAAcC,GAA0C;AAC1G,WAAO,EAAE,IAAI,KAAK,MAAM,OAAA,GAAU,YAAAA,GAAY,YAAAvB,GAAY,OAAOsB,GAAM,MAAAA,GAAM,QAAQ,SAAA;AAAA,EACzF;AAAA;AAAA,EAGQ,0BAA0BtB,GAAoBwB,GAAYC,GAAkBC,GAAwBC,GAAoC;AAC5I,UAAML,IAAO,KAAK,MAAM,QAAQ,oBAAoBG,CAAQ,KAAK,IAC3DG,IAAY,KAAK,MAAM,QAAQ,yBAAyBH,CAAQ,GAChEI,IAA0BH,GAC1BI,IAAW,KAAK,MAAM,QAAQ,2BAA2BF,CAAS;AACxE,WAAO,EAAE,IAAAJ,GAAI,WAAAI,GAAW,YAAA5B,GAAY,OAAOyB,GAAU,gBAAgBI,GAAyB,UAAAC,GAAU,MAAAR,GAAM,MAAAK,GAAM,QAAQ,SAAA;AAAA,EAChI;AACJ;","x_google_ignoreList":[0]}
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","../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 j;\n// @__NO_SIDE_EFFECTS__\nfunction H(e) {\n return {\n lang: e?.lang ?? j?.lang,\n message: e?.message,\n abortEarly: e?.abortEarly ?? j?.abortEarly,\n abortPipeEarly: e?.abortPipeEarly ?? j?.abortPipeEarly\n };\n}\nlet K;\n// @__NO_SIDE_EFFECTS__\nfunction W(e) {\n return K?.get(e);\n}\nlet X;\n// @__NO_SIDE_EFFECTS__\nfunction J(e) {\n return X?.get(e);\n}\nlet q;\n// @__NO_SIDE_EFFECTS__\nfunction Q(e, r) {\n return q?.get(e)?.get(r);\n}\n// @__NO_SIDE_EFFECTS__\nfunction U(e) {\n const r = typeof e;\n return r === \"string\" ? `\"${e}\"` : r === \"number\" || r === \"bigint\" || r === \"boolean\" ? `${e}` : r === \"object\" || r === \"function\" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? \"null\" : r;\n}\nfunction g(e, r, t, n, s) {\n const o = s && \"input\" in s ? s.input : t.value, i = s?.expected ?? e.expects ?? null, u = s?.received ?? /* @__PURE__ */ U(o), a = {\n kind: e.kind,\n type: e.type,\n input: o,\n expected: i,\n received: u,\n message: `Invalid ${r}: ${i ? `Expected ${i} but r` : \"R\"}eceived ${u}`,\n requirement: e.requirement,\n path: s?.path,\n issues: s?.issues,\n lang: n.lang,\n abortEarly: n.abortEarly,\n abortPipeEarly: n.abortPipeEarly\n }, p = e.kind === \"schema\", d = s?.message ?? e.message ?? /* @__PURE__ */ Q(e.reference, a.lang) ?? (p ? /* @__PURE__ */ J(a.lang) : null) ?? n.message ?? /* @__PURE__ */ W(a.lang);\n d !== void 0 && (a.message = typeof d == \"function\" ? d(a) : d), p && (t.typed = !1), t.issues ? t.issues.push(a) : t.issues = [a];\n}\n// @__NO_SIDE_EFFECTS__\nfunction h(e) {\n return {\n version: 1,\n vendor: \"valibot\",\n validate(r) {\n return e[\"~run\"]({ value: r }, /* @__PURE__ */ H());\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction Y(e, r) {\n return Object.hasOwn(e, r) && r !== \"__proto__\" && r !== \"prototype\" && r !== \"constructor\";\n}\n// @__NO_SIDE_EFFECTS__\nfunction Z(e, r) {\n const t = [...new Set(e)];\n return t.length > 1 ? `(${t.join(` ${r} `)})` : t[0] ?? \"never\";\n}\n// @__NO_SIDE_EFFECTS__\nfunction ee(e, r, t) {\n return typeof e.fallback == \"function\" ? e.fallback(r, t) : e.fallback;\n}\n// @__NO_SIDE_EFFECTS__\nfunction A(e, r, t) {\n return typeof e.default == \"function\" ? e.default(r, t) : e.default;\n}\n// @__NO_SIDE_EFFECTS__\nfunction x(e, r) {\n return {\n kind: \"schema\",\n type: \"array\",\n reference: x,\n expects: \"Array\",\n async: !1,\n item: e,\n message: r,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(t, n) {\n const s = t.value;\n if (Array.isArray(s)) {\n t.typed = !0, t.value = [];\n for (let o = 0; o < s.length; o++) {\n const i = s[o], u = this.item[\"~run\"]({ value: i }, n);\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], t.issues?.push(p);\n if (t.issues || (t.issues = u.issues), n.abortEarly) {\n t.typed = !1;\n break;\n }\n }\n u.typed || (t.typed = !1), t.value.push(u.value);\n }\n } else g(this, \"type\", t, n);\n return t;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction B(e) {\n return {\n kind: \"schema\",\n type: \"boolean\",\n reference: B,\n expects: \"boolean\",\n async: !1,\n message: e,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(r, t) {\n return typeof r.value == \"boolean\" ? r.typed = !0 : g(this, \"type\", r, t), r;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction D(e, r) {\n return {\n kind: \"schema\",\n type: \"literal\",\n reference: D,\n expects: /* @__PURE__ */ U(e),\n async: !1,\n literal: e,\n message: r,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(t, n) {\n return t.value === this.literal ? t.typed = !0 : g(this, \"type\", t, n), t;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction y(e, r) {\n return {\n kind: \"schema\",\n type: \"nullable\",\n reference: y,\n expects: `(${e.expects} | null)`,\n async: !1,\n wrapped: e,\n default: r,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(t, n) {\n return t.value === null && (this.default !== void 0 && (t.value = /* @__PURE__ */ A(this, t, n)), t.value === null) ? (t.typed = !0, t) : this.wrapped[\"~run\"](t, n);\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction k(e) {\n return {\n kind: \"schema\",\n type: \"number\",\n reference: k,\n expects: \"number\",\n async: !1,\n message: e,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(r, t) {\n return typeof r.value == \"number\" && !isNaN(r.value) ? r.typed = !0 : g(this, \"type\", r, t), r;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction b(e, r) {\n return {\n kind: \"schema\",\n type: \"object\",\n reference: b,\n expects: \"Object\",\n async: !1,\n entries: e,\n message: r,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(t, n) {\n const s = t.value;\n if (s && typeof s == \"object\") {\n t.typed = !0, t.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__ */ A(i), a = i[\"~run\"]({ value: u }, n);\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], t.issues?.push(d);\n if (t.issues || (t.issues = a.issues), n.abortEarly) {\n t.typed = !1;\n break;\n }\n }\n a.typed || (t.typed = !1), t.value[o] = a.value;\n } else if (i.fallback !== void 0) t.value[o] = /* @__PURE__ */ ee(i);\n else if (i.type !== \"exact_optional\" && i.type !== \"optional\" && i.type !== \"nullish\" && (g(this, \"key\", t, n, {\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 }), n.abortEarly))\n break;\n }\n } else g(this, \"type\", t, n);\n return t;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction f(e, r) {\n return {\n kind: \"schema\",\n type: \"optional\",\n reference: f,\n expects: `(${e.expects} | undefined)`,\n async: !1,\n wrapped: e,\n default: r,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(t, n) {\n return t.value === void 0 && (this.default !== void 0 && (t.value = /* @__PURE__ */ A(this, t, n)), t.value === void 0) ? (t.typed = !0, t) : this.wrapped[\"~run\"](t, n);\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction R(e, r, t) {\n return {\n kind: \"schema\",\n type: \"record\",\n reference: R,\n expects: \"Object\",\n async: !1,\n key: e,\n value: r,\n message: t,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(n, s) {\n const o = n.value;\n if (o && typeof o == \"object\") {\n n.typed = !0, n.value = {};\n for (const i in o) if (/* @__PURE__ */ Y(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], n.issues?.push(S);\n if (n.issues || (n.issues = a.issues), s.abortEarly) {\n n.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], n.issues?.push(S);\n if (n.issues || (n.issues = p.issues), s.abortEarly) {\n n.typed = !1;\n break;\n }\n }\n (!a.typed || !p.typed) && (n.typed = !1), a.typed && (n.value[a.value] = p.value);\n }\n } else g(this, \"type\", n, s);\n return n;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction l(e) {\n return {\n kind: \"schema\",\n type: \"string\",\n reference: l,\n expects: \"string\",\n async: !1,\n message: e,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(r, t) {\n return typeof r.value == \"string\" ? r.typed = !0 : g(this, \"type\", r, t), r;\n }\n };\n}\n// @__NO_SIDE_EFFECTS__\nfunction _(e) {\n let r;\n if (e) for (const t of e) r ? r.push(...t.issues) : r = t.issues;\n return r;\n}\n// @__NO_SIDE_EFFECTS__\nfunction G(e, r) {\n return {\n kind: \"schema\",\n type: \"union\",\n reference: G,\n expects: /* @__PURE__ */ Z(e.map((t) => t.expects), \"|\"),\n async: !1,\n options: e,\n message: r,\n get \"~standard\"() {\n return /* @__PURE__ */ h(this);\n },\n \"~run\"(t, n) {\n let s, o, i;\n for (const u of this.options) {\n const a = u[\"~run\"]({ value: t.value }, n);\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 g(this, \"type\", t, n, { issues: /* @__PURE__ */ _(o) }), t.typed = !0;\n } else {\n if (i?.length === 1) return i[0];\n g(this, \"type\", t, n, { issues: /* @__PURE__ */ _(i) });\n }\n return t;\n }\n };\n}\nconst v = (e) => /* @__PURE__ */ G(e.map((r) => /* @__PURE__ */ D(r))), te = /* @__PURE__ */ b({\n \"en-au\": /* @__PURE__ */ l(),\n \"en-gb\": /* @__PURE__ */ l(),\n \"en-us\": /* @__PURE__ */ l(),\n \"es-es\": /* @__PURE__ */ l()\n}), C = /* @__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}), re = v([\"amber\", \"green\", \"red\", \"other\"]), ne = v([\n \"alpha\",\n \"beta\",\n \"generalAvailability\",\n \"notApplicable\",\n \"preAlpha\",\n \"proposed\",\n \"releaseCandidate\",\n \"unavailable\",\n \"underReview\"\n]), se = v([\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]);\nv([\"app\", \"engine\", \"connector\", \"context\", \"presenter\", \"tool\"]);\nconst oe = /* @__PURE__ */ b({\n id: /* @__PURE__ */ l(),\n color: re,\n label: /* @__PURE__ */ l()\n}), T = {\n id: /* @__PURE__ */ l(),\n label: C,\n description: C,\n firstCreatedAt: /* @__PURE__ */ f(/* @__PURE__ */ k()),\n icon: /* @__PURE__ */ y(/* @__PURE__ */ l()),\n iconDark: /* @__PURE__ */ y(/* @__PURE__ */ l()),\n lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ k()),\n status: /* @__PURE__ */ y(oe),\n statusId: ne\n}, Se = /* @__PURE__ */ b({\n ...T,\n typeId: se\n}), $ = {\n ...T,\n version: /* @__PURE__ */ l()\n}, P = /* @__PURE__ */ b({\n id: /* @__PURE__ */ l(),\n label: C,\n description: C,\n icon: /* @__PURE__ */ y(/* @__PURE__ */ l()),\n iconDark: /* @__PURE__ */ y(/* @__PURE__ */ l()),\n order: /* @__PURE__ */ k(),\n path: /* @__PURE__ */ l()\n}), E = (e) => {\n const r = Object.entries(e).filter((t) => typeof t[1] == \"string\");\n return new Map(r);\n}, ie = (e, r, t = I) => {\n const n = e.get(r);\n if (n !== void 0) return n;\n if (t !== r)\n return e.get(t);\n}, ae = [\n { id: \"alpha\", color: \"red\", labels: E({ \"en-gb\": \"alpha\" }) },\n { id: \"beta\", color: \"amber\", labels: E({ \"en-gb\": \"beta\" }) },\n { id: \"generalAvailability\", color: \"green\", labels: E({ \"en-gb\": \"\" }) },\n { id: \"notApplicable\", color: \"green\", labels: E({ \"en-gb\": \"not-applicable\" }) },\n { id: \"preAlpha\", color: \"red\", labels: E({ \"en-gb\": \"pre-alpha\" }) },\n { id: \"proposed\", color: \"other\", labels: E({ \"en-gb\": \"proposed\" }) },\n { id: \"releaseCandidate\", color: \"green\", labels: E({ \"en-gb\": \"release-candidate\" }) },\n { id: \"unavailable\", color: \"other\", labels: E({ \"en-gb\": \"unavailable\" }) },\n { id: \"underReview\", color: \"other\", labels: E({ \"en-gb\": \"under-review\" }) }\n], ke = (e, r = I) => {\n const t = ae.find((n) => n.id === e);\n if (t) {\n const n = ie(t.labels, r);\n return { id: t.id, color: t.color, label: n ?? t.id };\n }\n return { id: e, color: \"other\", label: e };\n}, le = v([\"apiKey\", \"disabled\", \"oAuth2\", \"none\"]), ce = v([\"application\", \"curatedDataset\", \"database\", \"fileStore\"]), ue = v([\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]), pe = v([\"bidirectional\", \"destination\", \"source\", \"unknown\"]), de = /* @__PURE__ */ b({\n authMethodId: le,\n activeConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ k()),\n canDescribe: /* @__PURE__ */ f(/* @__PURE__ */ B()),\n id: /* @__PURE__ */ f(/* @__PURE__ */ l()),\n label: /* @__PURE__ */ f(te),\n maxConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ k()),\n params: /* @__PURE__ */ f(/* @__PURE__ */ x(/* @__PURE__ */ R(/* @__PURE__ */ l(), /* @__PURE__ */ l())))\n}), De = /* @__PURE__ */ b({\n ...$,\n typeId: /* @__PURE__ */ D(\"connector\"),\n category: /* @__PURE__ */ y(/* @__PURE__ */ b({ id: /* @__PURE__ */ l(), label: /* @__PURE__ */ l() })),\n categoryId: ce,\n implementations: /* @__PURE__ */ R(/* @__PURE__ */ l(), de),\n operations: /* @__PURE__ */ x(ue),\n usageId: pe,\n vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ l()),\n vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ l()),\n vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ l())\n}), we = [\"createObject\", \"dropObject\", \"removeRecords\", \"upsertRecords\"], Ie = [\"findObject\", \"getRecord\", \"listNodes\", \"previewObject\", \"retrieveRecords\"], O = (e) => {\n const r = Object.entries(e).filter((t) => typeof t[1] == \"string\");\n return new Map(r);\n};\nO({ \"en-gb\": \"Application\" }), O({ \"en-gb\": \"Curated Dataset\" }), O({ \"en-gb\": \"Database\" }), O({ \"en-gb\": \"File Store\" });\nconst fe = v([\"list\"]), me = /* @__PURE__ */ b({\n ...T,\n typeId: /* @__PURE__ */ D(\"contextModelGroup\"),\n modelRefs: /* @__PURE__ */ x(P),\n order: /* @__PURE__ */ k()\n}), Oe = /* @__PURE__ */ b({\n ...$,\n typeId: /* @__PURE__ */ D(\"context\"),\n models: /* @__PURE__ */ x(me),\n operations: /* @__PURE__ */ x(fe)\n});\nclass F extends Error {\n locator;\n constructor(r, t, n) {\n super(r, n), this.name = \"DataPosError\", this.locator = t;\n }\n}\nclass w extends F {\n constructor(r, t, n) {\n super(r, t, n), this.name = \"ApplicationError\";\n }\n}\nclass Ce extends w {\n constructor(r, t, n) {\n super(r, t, n), this.name = \"APIError\";\n }\n}\nclass Me extends w {\n constructor(r, t, n) {\n super(r, t, n), this.name = \"EngineError\";\n }\n}\nclass z extends w {\n body;\n constructor(r, t, n, s) {\n super(r, t, s), this.name = \"FetchError\", this.body = n;\n }\n}\nclass be extends w {\n componentName;\n info;\n constructor(r, t, n, s, o) {\n super(r, t, o), this.name = \"VueHandledError\", this.info = n, this.componentName = s;\n }\n}\nclass Ne extends w {\n constructor(r, t, n) {\n super(r, t, n), this.name = \"WindowHandledRuntimeError\";\n }\n}\nclass je extends w {\n constructor(r, t, n) {\n super(r, t, n), this.name = \"WindowHandledPromiseRejectionError\";\n }\n}\nclass Ae extends F {\n constructor(r, t, n) {\n super(r, t, n), this.name = \"OperationalError\";\n }\n}\nasync function Re(e, r, t) {\n const n = ` - ${e.statusText}`, s = `${r} Response status '${e.status}${e.statusText ? n : \"\"}' received.`, o = await e.text();\n return new z(s, t, o);\n}\nfunction Te(e) {\n return e.map((r) => r.message).join(\" \");\n}\nfunction $e(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 && 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 Fe(e) {\n const r = /* @__PURE__ */ new Set(), t = [];\n let n = e;\n for (; n && !r.has(n); ) {\n r.add(n);\n let s;\n if (n instanceof z)\n s = { body: n.body, locator: n.locator, message: n.message, name: n.name, stack: n.stack }, n = n.cause;\n else if (n instanceof be)\n s = { componentName: n.componentName, info: n.info, locator: n.locator, message: n.message, name: n.name, stack: n.stack }, n = n.cause;\n else if (n instanceof F)\n s = { locator: n.locator, message: n.message, name: n.name, stack: n.stack }, n = n.cause;\n else if (n instanceof Error) {\n const o = n;\n s = { locator: \"\", message: o.message, name: o.name, stack: o.stack }, n = o.cause;\n } else\n s = { locator: \"\", message: String(n), name: \"Error\" }, n = void 0;\n /(?:\\.{3}|[.!?])$/.test(s.message) || (s.message += \".\"), t.push(s);\n }\n return t;\n}\nconst ye = v([\"list\", \"render\", \"setColorMode\"]), Le = /* @__PURE__ */ b({\n ...$,\n typeId: /* @__PURE__ */ D(\"presenter\"),\n presentations: /* @__PURE__ */ x(P),\n operations: /* @__PURE__ */ x(ye)\n});\nfunction _e() {\n return { render: ge };\n}\nfunction ge(e, r, t) {\n t.textContent = \"Cytoscape.js diagram goes here...\";\n}\nfunction Ue() {\n return { render: he };\n}\nfunction he(e, r) {\n console.log(1111, e), console.log(2222, r), console.log(3333, r.childNodes), console.log(4444, r.children);\n}\nconst V = \"en-US\", M = /* @__PURE__ */ new Map();\nfunction Be(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 Ge(e) {\n if (e) {\n const r = e.lastIndexOf(\"/\"), t = e.lastIndexOf(\".\", r === -1 ? e.length : r);\n return t === -1 ? e : e.slice(0, Math.max(0, t));\n }\n}\nfunction Pe(e) {\n if (e) {\n const r = e.lastIndexOf(\".\");\n if (r !== -1) return e.slice(Math.max(0, r + 1));\n }\n}\nfunction m(e, r = 2, t = r, n = V) {\n if (e == null) return \"\";\n const s = `${n}decimal${r}.${t}`;\n let o = M.get(s);\n return o || (o = new Intl.NumberFormat(n, {\n localeMatcher: \"best fit\",\n maximumFractionDigits: r,\n minimumFractionDigits: t,\n minimumIntegerDigits: 1,\n style: \"decimal\",\n useGrouping: !0\n }), M.set(s, o)), o.format(e);\n}\nfunction ze(e) {\n return e == null ? \"\" : e < 1e3 ? N(e) : e < 1e6 ? `${m(e / 1e3, 2, 0)}K` : e < 1e9 ? `${m(e / 1e6, 2, 0)}M` : e < 1e12 ? `${m(e / 1e9, 2, 0)}B` : `${m(e / 1e12, 2, 0)}T`;\n}\nfunction Ve(e) {\n return e == null ? \"\" : e === 1 ? \"1 byte\" : e < 1024 ? `${N(e)} bytes` : e < 1048576 ? `${m(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${m(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${m(e / 1073741824, 2, 0)} GB` : `${m(e / 1099511627776, 2, 0)} TB`;\n}\nfunction He(e) {\n return e == null ? \"\" : e < 1e3 ? `${N(e)} ms` : e === 1e3 ? `${N(e)} sec` : e < 6e4 ? `${m(e / 1e3, 2, 0)} secs` : e === 6e4 ? \"1 min\" : e < 36e5 ? `${m(e / 6e4, 2, 0)} mins` : e === 36e5 ? \"1 hr\" : e < 864e5 ? `${m(e / 36e5, 2, 0)} hrs` : e === 864e5 ? \"1 day\" : `${m(e / 864e5, 2, 0)} days`;\n}\nfunction N(e, r = V) {\n if (e == null) return \"\";\n const t = `${r}decimal0.0`;\n let n = M.get(t);\n return n || (n = new Intl.NumberFormat(r, {\n localeMatcher: \"best fit\",\n maximumFractionDigits: 0,\n minimumFractionDigits: 0,\n minimumIntegerDigits: 1,\n style: \"decimal\",\n useGrouping: !0\n }), M.set(t, n)), n.format(e);\n}\nfunction Ke(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}\nconst c = (e) => new Map(Object.entries(e)), L = (e, r, t = I) => {\n const n = e.get(r);\n if (n !== void 0) return n;\n if (t !== r)\n return e.get(t);\n}, ve = [\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], We = (e = I) => {\n const r = [];\n for (const t of ve) {\n const n = L(t.labels, e);\n r.push({ id: t.id, label: n ?? t.id });\n }\n return r;\n}, Ee = [\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], Xe = (e = I) => {\n const r = [];\n for (const t of Ee) {\n const n = L(t.labels, e);\n r.push({ id: t.id, label: n ?? t.id });\n }\n return r;\n}, xe = [\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], Je = (e = I) => {\n const r = [];\n for (const t of xe) {\n const n = L(t.labels, e);\n r.push({ id: t.id, label: n ?? t.id });\n }\n return r;\n}, I = \"en-gb\";\nexport {\n Ce as APIError,\n w as ApplicationError,\n we as CONNECTOR_DESTINATION_OPERATIONS,\n Ie as CONNECTOR_SOURCE_OPERATIONS,\n I as DEFAULT_LOCALE_CODE,\n Me as EngineError,\n z as FetchError,\n Ae as OperationalError,\n be as VueError,\n je as WindowPromiseRejectionError,\n Ne as WindowRuntimeError,\n Re as buildFetchError,\n Se as componentConfigSchema,\n Te as concatenateSerialisedErrorMessages,\n De as connectorConfigSchema,\n Oe as contextConfigSchema,\n Be as convertODataTypeIdToUsageTypeId,\n Pe as extractExtensionFromPath,\n Ge as extractNameFromPath,\n m as formatNumberAsDecimalNumber,\n He as formatNumberAsDuration,\n ze as formatNumberAsSize,\n Ve as formatNumberAsStorageSize,\n N as formatNumberAsWholeNumber,\n ke as getComponentStatus,\n We as getDataFormats,\n Xe as getRecordDelimiters,\n Je as getValueDelimiters,\n Ke as lookupMimeTypeForExtension,\n $e as normalizeToError,\n Le as presenterConfigSchema,\n Fe as serialiseError,\n _e as useCytoscapeJS,\n Ue as useDataTable\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 { buildFetchError, extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension, 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} from '@datapos/datapos-shared';\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\n constructor(connectionConfig: ConnectionConfig, tools: ConnectorTools) {\n this.abortController = undefined;\n this.config = config as ConnectorConfig;\n this.config.version = version;\n this.connectionConfig = connectionConfig;\n this.tools = tools;\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 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 = connector.tools.csvParse({\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([]); // 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([]);\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"],"names":["urlAlphabet","nanoid","size","id","bytes","scopedUrlAlphabet","j","H","K","W","X","J","q","Q","r","U","g","t","n","s","o","i","u","a","p","d","h","Z","D","_","G","v","E","O","F","w","z","Ae","Re","$e","Ge","Pe","Ke","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","config","version","connector","settings","folderPath","fileStoreIndex","indexItem","response","xxx","sum","error","indexItems","connectionNodeConfigs","signal","OperationalError","url","headers","buildFetchError","chunk","complete","resolve","reject","pendingRows","parser","data","normalizeToError","decodedStreamReader","result","name","childCount","fullName","lastModifiedAt","extractNameFromPath","extension","extractExtensionFromPath","lastModifiedAtTimestamp","mimeType","lookupMimeTypeForExtension"],"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,EAA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cAAA;AAEJ,cAAAD,EAAU,kBAAkB,QAC5BmB,EAAOX,CAAK;AAAA,YAChB;AAAA,UACJ,SAASA,GAAO;AACZ,YAAAR,EAAU,kBAAkB,QAC5BmB,EAAOI,EAAiBf,CAAK,CAAC;AAAA,UAClC;AAAA,QACJ,CAAC,EACA,MAAM,CAACA,MAAmB;AACvB,UAAAR,EAAU,kBAAkB,QAC5BmB,EAAOI,EAAiBf,CAAK,CAAC;AAAA,QAClC,CAAC;AAAA,MACT,SAASA,GAAO;AACZ,QAAAR,EAAU,kBAAkB,QAC5BmB,EAAOI,EAAiBf,CAAK,CAAC;AAAA,MAClC;AAAA,IACJ,CAAC;AAAA,EACL;AAAA;AAAA,EAGQ,0BAA0BN,GAAoBwB,GAAcC,GAA0C;AAC1G,WAAO,EAAE,IAAIzF,EAAA,GAAU,YAAAyF,GAAY,YAAAzB,GAAY,OAAOwB,GAAM,MAAAA,GAAM,QAAQ,SAAA;AAAA,EAC9E;AAAA;AAAA,EAGQ,0BAA0BxB,GAAoB9D,GAAYwF,GAAkBC,GAAwB1F,GAAoC;AAC5I,UAAMuF,IAAOI,EAAoBF,CAAQ,KAAK,IACxCG,IAAYC,EAAyBJ,CAAQ,GAC7CK,IAA0BJ,GAC1BK,IAAWC,EAA2BJ,CAAS;AACrD,WAAO,EAAE,IAAA3F,GAAI,WAAA2F,GAAW,YAAA7B,GAAY,OAAO0B,GAAU,gBAAgBK,GAAyB,UAAAC,GAAU,MAAAR,GAAM,MAAAvF,GAAM,QAAQ,SAAA;AAAA,EAChI;AACJ;","x_google_ignoreList":[0,1,2]}
@@ -1,4 +1,4 @@
1
- import { ConnectionConfig, Connector, ConnectorConfig, ConnectorTools, FindResult, FindSettings, GetReaderResult, GetReaderSettings, ListResult, ListSettings, PreviewResult, PreviewSettings, RetrieveSettings, RetrieveSummary } from '@datapos/datapos-shared';
1
+ import { ConnectionConfig, Connector, ConnectorConfig, ConnectorTools, FindResult, FindSettings, GetReadableStreamResult, GetReadableStreamSettings, ListResult, ListSettings, PreviewResult, PreviewSettings, RetrieveRecordsSettings, RetrieveRecordsSummary } from '@datapos/datapos-shared';
2
2
  /** Classes - File store emulator connector. */
3
3
  export default class FileStoreEmulatorConnector implements Connector {
4
4
  abortController: AbortController | undefined;
@@ -8,10 +8,10 @@ export default class FileStoreEmulatorConnector implements Connector {
8
8
  constructor(connectionConfig: ConnectionConfig, tools: ConnectorTools);
9
9
  abortOperation(connector: FileStoreEmulatorConnector): void;
10
10
  findObject(connector: FileStoreEmulatorConnector, settings: FindSettings): Promise<FindResult>;
11
- ReadableStream(connector: FileStoreEmulatorConnector, settings: GetReaderSettings): Promise<GetReaderResult>;
11
+ getReadableStream(connector: FileStoreEmulatorConnector, settings: GetReadableStreamSettings): Promise<GetReadableStreamResult>;
12
12
  listNodes(connector: FileStoreEmulatorConnector, settings: ListSettings): Promise<ListResult>;
13
13
  previewObject(connector: FileStoreEmulatorConnector, settings: PreviewSettings): Promise<PreviewResult>;
14
- retrieveRecords(connector: FileStoreEmulatorConnector, settings: RetrieveSettings, chunk: (records: string[][]) => void, complete: (result: RetrieveSummary) => void): Promise<void>;
14
+ retrieveRecords(connector: FileStoreEmulatorConnector, settings: RetrieveRecordsSettings, chunk: (records: string[][]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
15
15
  /** Utilities - Construct folder node configuration. */
16
16
  private constructFolderNodeConfig;
17
17
  /** 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.304",
3
+ "version": "0.2.307",
4
4
  "license": "MIT",
5
5
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",
6
6
  "private": false,
@@ -25,14 +25,16 @@
25
25
  "dist"
26
26
  ],
27
27
  "prettier": "@datapos/datapos-development/prettierrc",
28
+ "dependencies": {
29
+ "@datapos/datapos-shared": "^0.3.332",
30
+ "nanoid": "^5.1.6"
31
+ },
28
32
  "devDependencies": {
29
33
  "@datapos/datapos-development": "^0.3.424",
30
- "@datapos/datapos-shared": "^0.3.331",
31
34
  "@datapos/eslint-config-datapos": "^1.0.28",
32
35
  "@types/node": "^25.0.3",
33
36
  "@typescript-eslint/eslint-plugin": "^8.50.0",
34
37
  "@typescript-eslint/parser": "^8.50.0",
35
- "csv-parse": "^6.1.0",
36
38
  "eslint": "^9.39.2",
37
39
  "eslint-import-resolver-typescript": "^4.4.4",
38
40
  "eslint-plugin-import": "^2.32.0",
@@ -44,7 +46,6 @@
44
46
  "license-report": "^6.8.1",
45
47
  "license-report-check": "^0.1.2",
46
48
  "license-report-recursive": "^6.8.2",
47
- "nanoid": "^5.1.6",
48
49
  "npm-check-updates": "^19.2.0",
49
50
  "owasp-dependency-check": "^1.0.0",
50
51
  "prettier": "^3.7.4",