datapos-connector-file-store-emulator 0.2.330 → 0.2.333

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,29 +1,41 @@
1
- const w = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2
- let g = (t = 21) => {
1
+ const g = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2
+ let E = (t = 21) => {
3
3
  let e = "", i = crypto.getRandomValues(new Uint8Array(t |= 0));
4
4
  for (; t--; )
5
- e += w[i[t] & 63];
5
+ e += g[i[t] & 63];
6
6
  return e;
7
7
  };
8
- class u extends Error {
8
+ const b = (t) => {
9
+ const e = Object.entries(t).filter((i) => typeof i[1] == "string");
10
+ return new Map(e);
11
+ };
12
+ b({ "en-gb": "Application" }), b({ "en-gb": "Curated Dataset" }), b({ "en-gb": "Database" }), b({ "en-gb": "File Store" });
13
+ async function R(t, e) {
14
+ console.log("loadToolForConnector", t, e);
15
+ const i = `datapos-tool-${e}`, d = t.toolConfigs.find((o) => o.id === i);
16
+ if (!d) throw new Error(`Connector could not load unknown tool '${e}'.`);
17
+ const s = await import(`https://engine-eu.datapos.app/tools/${e}_v${d.version}/${i}.es.js`);
18
+ return new s.Tool();
19
+ }
20
+ class C extends Error {
9
21
  locator;
10
22
  /** Logical source of the error. */
11
23
  constructor(e, i, d) {
12
24
  super(e, d), this.name = new.target.name, this.locator = i;
13
25
  }
14
26
  }
15
- class E extends u {
27
+ class P extends C {
16
28
  }
17
- class R extends E {
29
+ class _ extends P {
18
30
  body;
19
31
  /** Sanitized HTTP response body. */
20
32
  constructor(e, i, d, s) {
21
- super(e, i, s), this.name = new.target.name, this.body = P(d ?? void 0);
33
+ super(e, i, s), this.name = new.target.name, this.body = S(d ?? void 0);
22
34
  }
23
35
  }
24
- class z extends u {
36
+ class j extends C {
25
37
  }
26
- async function j(t, e, i) {
38
+ async function v(t, e, i) {
27
39
  const d = ` - ${t.statusText}`, s = `${e} Response status '${t.status}${t.statusText ? d : ""}' received.`;
28
40
  let o;
29
41
  try {
@@ -31,7 +43,7 @@ async function j(t, e, i) {
31
43
  } catch (c) {
32
44
  o = `<body unavailable: ${m(c).message}>`;
33
45
  }
34
- return new R(s, i, o);
46
+ return new _(s, i, o);
35
47
  }
36
48
  function m(t) {
37
49
  if (t instanceof Error) return t;
@@ -46,23 +58,23 @@ function m(t) {
46
58
  }
47
59
  return new Error("Unknown error");
48
60
  }
49
- function P(t) {
61
+ function S(t) {
50
62
  if (!(t == null || t === ""))
51
63
  return t.length > 2048 ? `${t.slice(0, 2048)}... [truncated]` : t;
52
64
  }
53
- function _(t) {
65
+ function T(t) {
54
66
  if (t) {
55
67
  const e = t.lastIndexOf("/"), i = t.lastIndexOf(".", e === -1 ? t.length : e);
56
68
  return i === -1 ? t : t.slice(0, Math.max(0, i));
57
69
  }
58
70
  }
59
- function S(t) {
71
+ function k(t) {
60
72
  if (t) {
61
73
  const e = t.lastIndexOf(".");
62
74
  if (e !== -1) return t.slice(Math.max(0, e + 1));
63
75
  }
64
76
  }
65
- function T(t) {
77
+ function x(t) {
66
78
  switch (t) {
67
79
  case "csv":
68
80
  return "text/csv";
@@ -77,25 +89,25 @@ function T(t) {
77
89
  return "application/octet-stream";
78
90
  }
79
91
  }
80
- const k = "datapos-connector-file-store-emulator", x = { en: "File Store Emulator" }, U = { "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." }, F = null, L = "fileStore", O = { default: { authMethodId: "none", maxConnectionCount: 1 } }, N = '<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>', V = '<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>', D = null, B = ["abortOperation", "findObject", "getReadableStream", "listNodes", "previewObject", "retrieveRecords"], G = null, H = "beta", q = "connector", Z = "source", K = null, Q = null, J = null, X = "0.2.330", Y = {
81
- id: k,
82
- label: x,
83
- description: U,
84
- category: F,
85
- categoryId: L,
86
- implementations: O,
87
- icon: N,
88
- iconDark: V,
89
- lastUpdatedAt: D,
90
- operations: B,
91
- status: G,
92
- statusId: H,
93
- typeId: q,
94
- usageId: Z,
95
- vendorAccountURL: K,
96
- vendorDocumentationURL: Q,
97
- vendorHomeURL: J,
98
- version: X
92
+ const F = "datapos-connector-file-store-emulator", U = { en: "File Store Emulator" }, O = { "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." }, L = null, N = "fileStore", D = { default: { authMethodId: "none", maxConnectionCount: 1 } }, V = '<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>', B = '<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>', G = null, H = ["abortOperation", "findObject", "getReadableStream", "listNodes", "previewObject", "retrieveRecords"], q = null, Z = "beta", K = "connector", Q = "source", J = null, X = null, Y = null, W = "0.2.333", $ = {
93
+ id: F,
94
+ label: U,
95
+ description: O,
96
+ category: L,
97
+ categoryId: N,
98
+ implementations: D,
99
+ icon: V,
100
+ iconDark: B,
101
+ lastUpdatedAt: G,
102
+ operations: H,
103
+ status: q,
104
+ statusId: Z,
105
+ typeId: K,
106
+ usageId: Q,
107
+ vendorAccountURL: J,
108
+ vendorDocumentationURL: X,
109
+ vendorHomeURL: Y,
110
+ version: W
99
111
  }, I = {
100
112
  "": [{ 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" }],
101
113
  "/AUDATACY Interchange Format": [{ childCount: 11, name: "Coded Data", typeId: "folder" }, { childCount: 1, name: "Human Resources", typeId: "folder" }, { childCount: 1, name: "Party", typeId: "folder" }],
@@ -114,29 +126,29 @@ const k = "datapos-connector-file-store-emulator", x = { en: "File Store Emulato
114
126
  "/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" }],
115
127
  "/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" }],
116
128
  "/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" }]
117
- }, W = "0.2.330";
118
- let v;
119
- async function $(t, e) {
120
- const { add_my_numbers: i } = await C();
129
+ }, ee = "0.2.333";
130
+ let u;
131
+ async function te(t, e) {
132
+ const { add_my_numbers: i } = await h();
121
133
  console.log(1111, t, e);
122
134
  const d = i(Math.trunc(t), Math.trunc(e));
123
135
  return console.log(2222, d), d;
124
136
  }
125
- async function ee(t) {
126
- const { checksum_from_rust: e } = await C();
137
+ async function ie(t) {
138
+ const { checksum_from_rust: e } = await h();
127
139
  return e(t);
128
140
  }
129
- async function C() {
130
- return v ??= import("./datapos_connector_file_store_emulator_core-CBVDrOML.js"), v;
141
+ async function h() {
142
+ return u ??= import("./datapos_connector_file_store_emulator_core-CBVDrOML.js"), u;
131
143
  }
132
- const te = "Connector failed to abort preview object operation.", ie = "Connector failed to abort retrieve all records operation.", de = 4096, oe = 1e3, y = "https://sample-data-eu.datapos.app";
133
- class se {
144
+ const de = "Connector failed to abort preview object operation.", oe = "Connector failed to abort retrieve all records operation.", se = 4096, ae = 1e3, A = "https://sample-data-eu.datapos.app";
145
+ class ne {
134
146
  abortController;
135
147
  config;
136
148
  connectionConfig;
137
149
  toolConfigs;
138
150
  constructor(e, i) {
139
- this.abortController = void 0, this.config = Y, this.config.version = W, this.connectionConfig = e, this.toolConfigs = i;
151
+ this.abortController = void 0, this.config = $, this.config.version = ee, this.connectionConfig = e, this.toolConfigs = i;
140
152
  }
141
153
  /** Abort operation. */
142
154
  abortOperation(e) {
@@ -153,9 +165,9 @@ class se {
153
165
  async getReadableStream(e, i) {
154
166
  try {
155
167
  console.log("getReader", "settings", i);
156
- const d = `${y}/fileStore${i.path}`, s = await fetch(d);
168
+ const d = `${A}/fileStore${i.path}`, s = await fetch(d);
157
169
  if (console.log("getReader", "response", s), !s.body) throw new Error("ReadableStream not supported by this browser.");
158
- const o = await $(12, 56), c = await ee(e.config.version);
170
+ const o = await te(12, 56), c = await ie(e.config.version);
159
171
  return console.log("sum", c, o), await Promise.resolve({ readable: s.body });
160
172
  } catch (d) {
161
173
  throw e.abortController = void 0, d;
@@ -174,19 +186,19 @@ class se {
174
186
  e.abortController = new AbortController();
175
187
  const d = e.abortController.signal;
176
188
  d.addEventListener("abort", () => {
177
- throw new z(te, "datapos-connector-file-store-emulator|Connector|preview.abort");
189
+ throw new j(de, "datapos-connector-file-store-emulator|Connector|preview.abort");
178
190
  });
179
- const s = `${y}/fileStore${i.path}`, c = { Range: `bytes=0-${i.chunkSize ?? de}` }, a = await fetch(encodeURI(s), { headers: c, signal: d });
191
+ const s = `${A}/fileStore${i.path}`, c = { Range: `bytes=0-${i.chunkSize ?? se}` }, a = await fetch(encodeURI(s), { headers: c, signal: d });
180
192
  if (a.ok)
181
193
  return e.abortController = void 0, { data: new Uint8Array(await a.arrayBuffer()), typeId: "uint8Array" };
182
- throw await j(a, `Failed to fetch '${i.path}' file.`, "datapos-connector-file-store-emulator|Connector|preview");
194
+ throw await v(a, `Failed to fetch '${i.path}' file.`, "datapos-connector-file-store-emulator|Connector|preview");
183
195
  } catch (d) {
184
196
  throw e.abortController = void 0, d;
185
197
  }
186
198
  }
187
199
  // Operations - Retrieve records.
188
200
  async retrieveRecords(e, i, d, s) {
189
- const o = await e.loadTool("csv-parse");
201
+ const o = await R(e, "csv-parse");
190
202
  return console.log(1234, o), new Promise((c, a) => {
191
203
  try {
192
204
  e.abortController = new AbortController();
@@ -194,7 +206,7 @@ class se {
194
206
  r.addEventListener(
195
207
  "abort",
196
208
  () => {
197
- e.abortController = void 0, a(new z(ie, "datapos-connector-file-store-emulator|Connector|retrieve.abort"));
209
+ e.abortController = void 0, a(new j(oe, "datapos-connector-file-store-emulator|Connector|retrieve.abort"));
198
210
  },
199
211
  { once: !0 }
200
212
  );
@@ -209,7 +221,7 @@ class se {
209
221
  try {
210
222
  let n;
211
223
  for (; (n = l.read()) !== null; )
212
- r.throwIfAborted(), p.push(n), !(p.length < oe) && (d(p), p = []);
224
+ r.throwIfAborted(), p.push(n), !(p.length < ae) && (d(p), p = []);
213
225
  } catch (n) {
214
226
  e.abortController = void 0, a(m(n));
215
227
  }
@@ -229,19 +241,19 @@ class se {
229
241
  e.abortController = void 0, a(m(n));
230
242
  }
231
243
  });
232
- const h = `${y}/fileStore${i.path}`;
233
- fetch(encodeURI(h), { signal: r }).then(async (n) => {
244
+ const w = `${A}/fileStore${i.path}`;
245
+ fetch(encodeURI(w), { signal: r }).then(async (n) => {
234
246
  try {
235
247
  if (n.ok && n.body) {
236
- const A = n.body.pipeThrough(new TextDecoderStream(i.encodingId)).getReader();
237
- let b = await A.read();
238
- for (; !b.done; )
239
- r.throwIfAborted(), l.write(b.value, (M) => {
240
- M && (e.abortController = void 0, a(m(M)));
241
- }), b = await A.read();
248
+ const M = n.body.pipeThrough(new TextDecoderStream(i.encodingId)).getReader();
249
+ let y = await M.read();
250
+ for (; !y.done; )
251
+ r.throwIfAborted(), l.write(y.value, (z) => {
252
+ z && (e.abortController = void 0, a(m(z)));
253
+ }), y = await M.read();
242
254
  l.end();
243
255
  } else {
244
- const f = await j(
256
+ const f = await v(
245
257
  n,
246
258
  `Failed to fetch '${i.path}' file.`,
247
259
  "datapos-connector-file-store-emulator|Connector|retrieve"
@@ -261,22 +273,25 @@ class se {
261
273
  }
262
274
  /** Utilities - Construct folder node configuration. */
263
275
  constructFolderNodeConfig(e, i, d) {
264
- return { id: g(), childCount: d, extension: void 0, folderPath: e, label: i, name: i, typeId: "folder" };
276
+ return { id: E(), childCount: d, extension: void 0, folderPath: e, label: i, name: i, typeId: "folder" };
265
277
  }
266
278
  /** Utilities - Construct object (file) node configuration. */
267
279
  constructObjectNodeConfig(e, i, d, s, o) {
268
- const c = _(d) ?? "", a = S(d), r = s, p = T(a);
280
+ const c = T(d) ?? "", a = k(d), r = s, p = x(a);
269
281
  return { id: i, extension: a, folderPath: e, label: d, lastModifiedAt: r, mimeType: p, name: c, size: o, typeId: "object" };
270
282
  }
271
- // Helpers - Load tool.
272
- async loadTool(e) {
273
- const i = `datapos-tool-${e}`, d = this.toolConfigs.find((a) => a.id === i);
274
- if (!d) throw new Error(`Unknown tool '${e}'.`);
275
- const o = await import(`https://engine-eu.datapos.app/tools/${e}_v${d.version}/${i}.es.js`);
276
- return new o.Tool();
277
- }
283
+ // // Helpers - Load tool for connector.
284
+ // private async loadToolForConnector<T>(connector: Connector, toolId: string): Promise<T> {
285
+ // const toolName = `datapos-tool-${toolId}`;
286
+ // const toolModuleConfig = connector.toolConfigs.find((config) => config.id === toolName);
287
+ // if (!toolModuleConfig) throw new Error(`Unknown tool '${toolId}'.`);
288
+ // const url = `https://engine-eu.datapos.app/tools/${toolId}_v${toolModuleConfig.version}/${toolName}.es.js`;
289
+ // const toolModule = (await import(/* @vite-ignore */ url)) as { Tool: new () => T };
290
+ // const toolInstance = new toolModule.Tool();
291
+ // return toolInstance;
292
+ // }
278
293
  }
279
294
  export {
280
- se as default
295
+ ne as default
281
296
  };
282
297
  //# 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/nanoid/url-alphabet/index.js","../node_modules/nanoid/index.browser.js","../node_modules/@datapos/datapos-shared/dist/datapos-shared-errors.es.js","../node_modules/@datapos/datapos-shared/dist/datapos-shared-utilities.es.js","../src/rustBridge.ts","../src/index.ts"],"sourcesContent":["export const urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n","/* @ts-self-types=\"./index.d.ts\" */\nimport { urlAlphabet as scopedUrlAlphabet } from './url-alphabet/index.js'\nexport { urlAlphabet } from './url-alphabet/index.js'\nexport let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nexport let customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << Math.log2(alphabet.length - 1)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step | 0\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length >= size) return id\n }\n }\n }\n}\nexport let customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size | 0, random)\nexport let nanoid = (size = 21) => {\n let id = ''\n let bytes = crypto.getRandomValues(new Uint8Array((size |= 0)))\n while (size--) {\n id += scopedUrlAlphabet[bytes[size] & 63]\n }\n return id\n}\n","class i extends Error {\n locator;\n /** Logical source of the error. */\n constructor(o, t, r) {\n super(o, r), this.name = new.target.name, this.locator = t;\n }\n}\nclass a extends i {\n}\nclass g extends a {\n}\nclass p extends a {\n}\nclass c extends a {\n body;\n /** Sanitized HTTP response body. */\n constructor(o, t, r, n) {\n super(o, t, n), this.name = new.target.name, this.body = E(r ?? void 0);\n }\n}\nclass y extends i {\n}\nclass m extends a {\n componentName;\n /** Vue component name, if available. */\n info;\n /** Vue error info string. */\n constructor(o, t, r, n, s) {\n super(o, t, s), this.name = new.target.name, this.info = r, this.componentName = n;\n }\n}\nclass w extends a {\n}\nclass b extends a {\n}\nasync function h(e, o, t) {\n const r = ` - ${e.statusText}`, n = `${o} Response status '${e.status}${e.statusText ? r : \"\"}' received.`;\n let s;\n try {\n s = await e.text();\n } catch (d) {\n s = `<body unavailable: ${l(d).message}>`;\n }\n return new c(n, t, s);\n}\nfunction k(e) {\n return e.map((o) => o.message).join(\" \");\n}\nfunction l(e) {\n if (e instanceof Error) return e;\n if (typeof e == \"string\") return new Error(e);\n if (typeof e == \"number\" || typeof e == \"boolean\" || typeof e == \"bigint\") return new Error(String(e));\n if (typeof e == \"symbol\") return new Error(e.description ?? \"Unknown error\");\n if (e != null && typeof e == \"object\")\n try {\n return new Error(JSON.stringify(e));\n } catch {\n return new Error(\"Unknown error\");\n }\n return new Error(\"Unknown error\");\n}\nfunction x(e) {\n const o = /* @__PURE__ */ new Set(), t = [];\n let r = e;\n for (; r != null && !o.has(r); ) {\n o.add(r);\n let n;\n if (r instanceof c)\n n = { componentName: void 0, body: r.body, info: void 0, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;\n else if (r instanceof m)\n n = {\n componentName: r.componentName,\n body: void 0,\n info: r.info,\n locator: r.locator,\n message: r.message,\n name: r.name,\n stack: r.stack\n }, r = r.cause;\n else if (r instanceof i)\n n = { componentName: void 0, body: void 0, info: void 0, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;\n else if (r instanceof Error) {\n const s = r;\n n = { componentName: void 0, body: void 0, info: void 0, locator: \"\", message: s.message, name: s.name, stack: s.stack }, r = s.cause;\n } else\n n = { componentName: void 0, body: void 0, info: void 0, locator: \"\", message: f(r), name: \"Error\", stack: void 0 }, r = void 0;\n /(?:\\.{3}|[.!?])$/.test(n.message) || (n.message += \".\"), t.push(n);\n }\n return t;\n}\nfunction f(e) {\n let o;\n try {\n o = JSON.stringify(e);\n } catch {\n typeof e == \"symbol\" ? o = e.description ?? \"Unknown error\" : typeof e == \"bigint\" ? o = e.toString() : o = \"Unknown error\";\n }\n return o === \"\" && (o = \"Unknown error\"), o;\n}\nfunction E(e) {\n if (!(e == null || e === \"\"))\n return e.length > 2048 ? `${e.slice(0, 2048)}... [truncated]` : e;\n}\nexport {\n g as APIError,\n a as ApplicationError,\n p as EngineError,\n c as FetchError,\n y as OperationalError,\n m as VueHandledError,\n b as WindowHandledPromiseRejectionError,\n w as WindowHandledRuntimeError,\n h as buildFetchError,\n k as concatenateSerialisedErrorMessages,\n l as normalizeToError,\n x as serialiseError\n};\n","const c = \"en-US\", s = /* @__PURE__ */ new Map();\nfunction f(e) {\n switch (e) {\n case \"Edm.Binary\":\n return \"unknown\";\n // Binary...\n case \"Edm.Boolean\":\n return \"boolean\";\n case \"Edm.Byte\":\n return \"wholeNumber\";\n case \"Edm.DateTime\":\n return \"moment\";\n // DateTime...\n case \"Edm.DateTimeOffset\":\n return \"moment\";\n // DateTimeOffset...\n case \"Edm.Decimal\":\n return \"decimalNumber\";\n case \"Edm.Double\":\n return \"decimalNumber\";\n case \"Edm.Guid\":\n return \"string\";\n case \"Edm.Int16\":\n return \"wholeNumber\";\n case \"Edm.Int32\":\n return \"wholeNumber\";\n case \"Edm.Int64\":\n return \"wholeNumber\";\n case \"Edm.SByte\":\n return \"wholeNumber\";\n case \"Edm.Single\":\n return \"decimalNumber\";\n case \"Edm.String\":\n return \"string\";\n case \"Edm.Time\":\n return \"momentTime\";\n // Time...\n default:\n return \"unknown\";\n }\n}\nfunction l(e) {\n if (e) {\n const t = e.lastIndexOf(\"/\"), n = e.lastIndexOf(\".\", t === -1 ? e.length : t);\n return n === -1 ? e : e.slice(0, Math.max(0, n));\n }\n}\nfunction m(e) {\n if (e) {\n const t = e.lastIndexOf(\".\");\n if (t !== -1) return e.slice(Math.max(0, t + 1));\n }\n}\nfunction r(e, t = 2, n = t, i = c) {\n if (e == null) return \"\";\n const u = `${i}decimal${t}.${n}`;\n let a = s.get(u);\n return a || (a = new Intl.NumberFormat(i, {\n localeMatcher: \"best fit\",\n maximumFractionDigits: t,\n minimumFractionDigits: n,\n minimumIntegerDigits: 1,\n style: \"decimal\",\n useGrouping: !0\n }), s.set(u, a)), a.format(e);\n}\nfunction d(e) {\n return e == null ? \"\" : e < 1e3 ? o(e) : e < 1e6 ? `${r(e / 1e3, 2, 0)}K` : e < 1e9 ? `${r(e / 1e6, 2, 0)}M` : e < 1e12 ? `${r(e / 1e9, 2, 0)}B` : `${r(e / 1e12, 2, 0)}T`;\n}\nfunction x(e) {\n return e == null ? \"\" : e === 1 ? \"1 byte\" : e < 1024 ? `${o(e)} bytes` : e < 1048576 ? `${r(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${r(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${r(e / 1073741824, 2, 0)} GB` : `${r(e / 1099511627776, 2, 0)} TB`;\n}\nfunction p(e) {\n return e == null ? \"\" : e < 1e3 ? `${o(e)} ms` : e === 1e3 ? `${o(e)} sec` : e < 6e4 ? `${r(e / 1e3, 2, 0)} secs` : e === 6e4 ? \"1 min\" : e < 36e5 ? `${r(e / 6e4, 2, 0)} mins` : e === 36e5 ? \"1 hr\" : e < 864e5 ? `${r(e / 36e5, 2, 0)} hrs` : e === 864e5 ? \"1 day\" : `${r(e / 864e5, 2, 0)} days`;\n}\nfunction o(e, t = c) {\n if (e == null) return \"\";\n const n = `${t}decimal0.0`;\n let i = s.get(n);\n return i || (i = new Intl.NumberFormat(t, {\n localeMatcher: \"best fit\",\n maximumFractionDigits: 0,\n minimumFractionDigits: 0,\n minimumIntegerDigits: 1,\n style: \"decimal\",\n useGrouping: !0\n }), s.set(n, i)), i.format(e);\n}\nfunction E(e) {\n switch (e) {\n case \"csv\":\n return \"text/csv\";\n case \"tab\":\n case \"tsv\":\n return \"text/tab-separated-values\";\n case \"xls\":\n return \"application/vnd.ms-excel\";\n case \"xlsx\":\n return \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n default:\n return \"application/octet-stream\";\n }\n}\nexport {\n f as convertODataTypeIdToUsageTypeId,\n m as extractExtensionFromPath,\n l as extractNameFromPath,\n r as formatNumberAsDecimalNumber,\n p as formatNumberAsDuration,\n d as formatNumberAsSize,\n x as formatNumberAsStorageSize,\n o as formatNumberAsWholeNumber,\n E as lookupMimeTypeForExtension\n};\n","// Dependencies - Framework\nimport type * as RustModule from '../rust/datapos-connector-file-store-emulator-core/pkg/datapos_connector_file_store_emulator_core.js';\n\n// Interfaces/Types\ntype RustBindings = typeof RustModule;\n\n// Module Variables\nlet rustBindingsPromise: Promise<RustBindings> | undefined;\n\n// Utilities\nasync function addNumbersWithRust(left: number, right: number): Promise<number> {\n const { add_my_numbers } = await loadRustBindings();\n console.log(1111, left, right);\n const yyyy = add_my_numbers(Math.trunc(left), Math.trunc(right));\n console.log(2222, yyyy);\n return yyyy;\n}\n\n// Utilities\nasync function checksumWithRust(input: string): Promise<number> {\n const { checksum_from_rust } = await loadRustBindings();\n return checksum_from_rust(input);\n}\n\n// Helpers\nasync function loadRustBindings(): Promise<RustBindings> {\n rustBindingsPromise ??= import('../rust/datapos-connector-file-store-emulator-core/pkg/datapos_connector_file_store_emulator_core.js');\n return rustBindingsPromise;\n}\n\n// Exposures\nexport { addNumbersWithRust, checksumWithRust };\n","/*\n * File store emulator connector class.\n */\n\n// NOTE: Consider Cloudflare R2 Download URL: https://plugins-eu.datapositioning.app/connectors/datapos-connector-file-store-emulator-es.js. This would allow us to secure the bucket?\n\n/** Dependencies - Vendor. */\nimport { nanoid } from 'nanoid';\n\n/** Dependencies - Framework. */\nimport type { Tool as CSVParseTool } from '@datapos/datapos-tool-csv-parse';\nimport type { ToolConfig } from '@datapos/datapos-shared';\nimport { buildFetchError, normalizeToError, OperationalError } from '@datapos/datapos-shared/errors';\nimport type {\n ConnectionConfig,\n ConnectionNodeConfig,\n Connector,\n ConnectorConfig,\n FindResult,\n FindSettings,\n GetReadableStreamResult,\n GetReadableStreamSettings,\n ListResult,\n ListSettings,\n PreviewResult,\n PreviewSettings,\n RetrieveRecordsSettings,\n RetrieveRecordsSummary\n} from '@datapos/datapos-shared/component/connector';\nimport { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from '@datapos/datapos-shared/utilities';\n\n/** Dependencies - Data. */\nimport config from '~/config.json';\nimport fileStoreIndex from '@/fileStoreIndex.json';\nimport { version } from '~/package.json';\nimport { addNumbersWithRust, checksumWithRust } from '@/rustBridge';\n\n/** Interfaces/Types - File store index. */\ntype FileStoreIndexItem =\n | ({ typeId: 'folder'; childCount: number } & { name: string })\n | ({ typeId: 'object'; id: string; lastModifiedAt: number; size: number } & { name: string });\ntype FileStoreIndex = Record<string, FileStoreIndexItem[]>;\n\n/** Constants */\nconst CALLBACK_PREVIEW_ABORTED = 'Connector failed to abort preview object operation.';\nconst CALLBACK_RETRIEVE_ABORTED = 'Connector failed to abort retrieve all records operation.';\nconst DEFAULT_PREVIEW_CHUNK_SIZE = 4096;\nconst DEFAULT_RETRIEVE_CHUNK_SIZE = 1000;\nconst URL_PREFIX = 'https://sample-data-eu.datapos.app';\n\n/** Classes - File store emulator connector. */\nexport default class FileStoreEmulatorConnector implements Connector {\n abortController: AbortController | undefined;\n readonly config: ConnectorConfig;\n readonly connectionConfig: ConnectionConfig;\n readonly toolConfigs;\n\n constructor(connectionConfig: ConnectionConfig, toolConfigs: ToolConfig[]) {\n this.abortController = undefined;\n this.config = config as ConnectorConfig;\n this.config.version = version;\n this.connectionConfig = connectionConfig;\n this.toolConfigs = toolConfigs;\n }\n\n /** Abort operation. */\n abortOperation(connector: Connector): void {\n if (!connector.abortController) return;\n connector.abortController.abort();\n connector.abortController = undefined;\n }\n\n /** Find object. */\n findObject(connector: Connector, settings: FindSettings): Promise<FindResult> {\n // Loop through the file store index checking for an object entry with an identifier equal to the object name.\n for (const folderPath in fileStoreIndex) {\n if (Object.prototype.hasOwnProperty.call(fileStoreIndex, folderPath)) {\n // eslint-disable-next-line security/detect-object-injection\n const indexItems = (fileStoreIndex as FileStoreIndex)[folderPath];\n const indexItem = indexItems?.find((indexItem) => indexItem.typeId === 'object' && indexItem.id === settings.objectName);\n if (indexItem) return Promise.resolve({ folderPath }); // Found, return folder path.\n }\n }\n return Promise.resolve({}); // Not found, return undefined folder path.\n }\n\n // Operations - Get readable stream.\n async getReadableStream(connector: Connector, settings: GetReadableStreamSettings): Promise<GetReadableStreamResult> {\n try {\n console.log('getReader', 'settings', settings);\n const url = `${URL_PREFIX}/fileStore${settings.path}`;\n const response = await fetch(url); // 'https://sample-data-eu.datapos.app/WDI_Data.csv' or 'https://sample-data-eu.datapos.app/fileStore/ENGAGEMENT_START_EVENTS_202405121858.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 });\n } catch (error) {\n connector.abortController = undefined;\n throw error;\n }\n }\n\n // Operations - List nodes.\n listNodes(connector: Connector, settings: ListSettings): Promise<ListResult> {\n const indexItems = (fileStoreIndex as FileStoreIndex)[settings.folderPath] ?? [];\n const connectionNodeConfigs: ConnectionNodeConfig[] = [];\n for (const indexItem of indexItems) {\n if (indexItem.typeId === 'folder') {\n connectionNodeConfigs.push(this.constructFolderNodeConfig(settings.folderPath, indexItem.name, indexItem.childCount));\n } else {\n connectionNodeConfigs.push(this.constructObjectNodeConfig(settings.folderPath, indexItem.id, indexItem.name, indexItem.lastModifiedAt, indexItem.size));\n }\n }\n return Promise.resolve({ cursor: undefined, isMore: false, connectionNodeConfigs, totalCount: connectionNodeConfigs.length });\n }\n\n // Operations - Preview object.\n async previewObject(connector: Connector, settings: PreviewSettings): Promise<PreviewResult> {\n try {\n // Create an abort controller. Get the signal for the abort controller and add an abort listener.\n connector.abortController = new AbortController();\n const signal = connector.abortController.signal;\n signal.addEventListener('abort', () => {\n throw new OperationalError(CALLBACK_PREVIEW_ABORTED, 'datapos-connector-file-store-emulator|Connector|preview.abort');\n });\n\n // Fetch chunk from start of file.\n const url = `${URL_PREFIX}/fileStore${settings.path}`;\n const chunkSize = settings.chunkSize ?? DEFAULT_PREVIEW_CHUNK_SIZE;\n const headers: HeadersInit = { Range: `bytes=0-${chunkSize}` };\n const response = await fetch(encodeURI(url), { headers, signal });\n if (response.ok) {\n connector.abortController = undefined;\n return { data: new Uint8Array(await response.arrayBuffer()), typeId: 'uint8Array' };\n } else {\n throw await buildFetchError(response, `Failed to fetch '${settings.path}' file.`, 'datapos-connector-file-store-emulator|Connector|preview');\n }\n } catch (error) {\n connector.abortController = undefined;\n throw error;\n }\n }\n\n // Operations - Retrieve records.\n async retrieveRecords(\n connector: Connector,\n settings: RetrieveRecordsSettings,\n chunk: (records: string[][]) => void,\n complete: (result: RetrieveRecordsSummary) => void\n ): Promise<void> {\n const csvParseTool = await (connector as FileStoreEmulatorConnector).loadTool<CSVParseTool>('csv-parse');\n console.log(1234, csvParseTool);\n return new Promise((resolve, reject) => {\n try {\n // Create an abort controller and get the signal. Add an abort listener to the signal.\n connector.abortController = new AbortController();\n const signal = connector.abortController.signal;\n signal.addEventListener(\n 'abort',\n () => {\n connector.abortController = undefined;\n reject(new OperationalError(CALLBACK_RETRIEVE_ABORTED, 'datapos-connector-file-store-emulator|Connector|retrieve.abort'));\n },\n { once: true }\n );\n\n // Parser - Declare variables.\n let pendingRows: string[][] = []; // Array to store rows of parsed field values and associated information.\n\n // Parser - Create a parser object for CSV parsing.\n const parser = csvParseTool.buildParser({\n delimiter: settings.valueDelimiterId,\n info: true,\n relax_column_count: true,\n relax_quotes: true\n });\n\n // Parser - Event listener for the 'readable' (data available) event.\n parser.on('readable', () => {\n try {\n let data: string[] | null;\n while ((data = parser.read() as string[] | null) !== null) {\n signal.throwIfAborted(); // Check if the abort signal has been triggered.\n pendingRows.push(data); // Append the row of parsed values and associated information to the pending rows array.\n if (pendingRows.length < DEFAULT_RETRIEVE_CHUNK_SIZE) continue; // Continue with next iteration if the pending rows array is not yet full.\n chunk(pendingRows); // Pass the pending rows to the engine using the 'chunk' callback.\n pendingRows = []; // Clear the pending rows array in preparation for the next batch of data.\n }\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n\n // Parser - Event listener for the 'error' event.\n parser.on('error', (error) => {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n });\n\n // Parser - Event listener for the 'end' (end of data) event.\n parser.on('end', () => {\n try {\n signal.throwIfAborted(); // Check if the abort signal has been triggered.\n connector.abortController = undefined; // Clear the abort controller.\n if (pendingRows.length > 0) {\n chunk(pendingRows);\n pendingRows = [];\n }\n complete({\n byteCount: parser.info.bytes,\n commentLineCount: parser.info.comment_lines,\n emptyLineCount: parser.info.empty_lines,\n invalidFieldLengthCount: parser.info.invalid_field_length,\n lineCount: parser.info.lines,\n recordCount: parser.info.records\n });\n resolve();\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n\n // Fetch, decode and forward the contents of the file to the parser.\n const url = `${URL_PREFIX}/fileStore${settings.path}`;\n fetch(encodeURI(url), { signal })\n .then(async (response) => {\n try {\n if (response.ok && response.body) {\n const stream = response.body.pipeThrough(new TextDecoderStream(settings.encodingId));\n const decodedStreamReader = stream.getReader();\n let result = await decodedStreamReader.read();\n while (!result.done) {\n signal.throwIfAborted(); // Check if the abort signal has been triggered.\n // Write the decoded data to the parser and terminate if there is an error.\n parser.write(result.value, (error) => {\n if (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n result = await decodedStreamReader.read();\n }\n parser.end(); // Signal no more data will be written.\n } else {\n const error = await buildFetchError(\n response,\n `Failed to fetch '${settings.path}' file.`,\n 'datapos-connector-file-store-emulator|Connector|retrieve'\n );\n connector.abortController = undefined;\n reject(error);\n }\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n })\n .catch((error: unknown) => {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n });\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n }\n\n /** Utilities - Construct folder node configuration. */\n private constructFolderNodeConfig(folderPath: string, name: string, childCount: number): ConnectionNodeConfig {\n return { id: nanoid(), childCount, extension: undefined, folderPath, label: name, name, typeId: 'folder' };\n }\n\n /** Utilities - Construct object (file) node configuration. */\n private constructObjectNodeConfig(folderPath: string, id: string, fullName: string, lastModifiedAt: number, size: number): ConnectionNodeConfig {\n const name = extractNameFromPath(fullName) ?? '';\n const extension = extractExtensionFromPath(fullName);\n const lastModifiedAtTimestamp = lastModifiedAt;\n const mimeType = lookupMimeTypeForExtension(extension);\n return { id, extension, folderPath, label: fullName, lastModifiedAt: lastModifiedAtTimestamp, mimeType, name, size, typeId: 'object' };\n }\n\n // Helpers - Load tool.\n private async loadTool<T>(toolId: string): Promise<T> {\n const toolName = `datapos-tool-${toolId}`;\n const toolModuleConfig = this.toolConfigs.find((config) => config.id === toolName);\n if (!toolModuleConfig) throw new Error(`Unknown tool '${toolId}'.`);\n\n const url = `https://engine-eu.datapos.app/tools/${toolId}_v${toolModuleConfig.version}/${toolName}.es.js`;\n const toolModule = (await import(/* @vite-ignore */ url)) as { Tool: new () => T };\n const toolInstance = new toolModule.Tool();\n return toolInstance;\n }\n}\n"],"names":["urlAlphabet","nanoid","size","id","bytes","scopedUrlAlphabet","i","o","t","r","a","c","n","E","y","h","e","s","d","l","m","rustBindingsPromise","addNumbersWithRust","left","right","add_my_numbers","loadRustBindings","yyyy","checksumWithRust","input","checksum_from_rust","CALLBACK_PREVIEW_ABORTED","CALLBACK_RETRIEVE_ABORTED","DEFAULT_PREVIEW_CHUNK_SIZE","DEFAULT_RETRIEVE_CHUNK_SIZE","URL_PREFIX","FileStoreEmulatorConnector","connectionConfig","toolConfigs","config","version","connector","settings","folderPath","fileStoreIndex","indexItem","url","response","xxx","sum","error","indexItems","connectionNodeConfigs","signal","OperationalError","headers","buildFetchError","chunk","complete","csvParseTool","resolve","reject","pendingRows","parser","data","normalizeToError","decodedStreamReader","result","name","childCount","fullName","lastModifiedAt","extractNameFromPath","extension","extractExtensionFromPath","lastModifiedAtTimestamp","mimeType","lookupMimeTypeForExtension","toolId","toolName","toolModuleConfig","toolModule"],"mappings":"AAAO,MAAMA,IACX;ACoBK,IAAIC,IAAS,CAACC,IAAO,OAAO;AACjC,MAAIC,IAAK,IACLC,IAAQ,OAAO,gBAAgB,IAAI,WAAYF,KAAQ,CAAC,CAAE;AAC9D,SAAOA;AACL,IAAAC,KAAME,EAAkBD,EAAMF,CAAI,IAAI,EAAE;AAE1C,SAAOC;AACT;AC5BA,MAAMG,UAAU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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-connector.es.js","../node_modules/@datapos/datapos-shared/dist/datapos-shared-errors.es.js","../node_modules/@datapos/datapos-shared/dist/datapos-shared-utilities.es.js","../src/rustBridge.ts","../src/index.ts"],"sourcesContent":["export const urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n","/* @ts-self-types=\"./index.d.ts\" */\nimport { urlAlphabet as scopedUrlAlphabet } from './url-alphabet/index.js'\nexport { urlAlphabet } from './url-alphabet/index.js'\nexport let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nexport let customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << Math.log2(alphabet.length - 1)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step | 0\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length >= size) return id\n }\n }\n }\n}\nexport let customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size | 0, random)\nexport let nanoid = (size = 21) => {\n let id = ''\n let bytes = crypto.getRandomValues(new Uint8Array((size |= 0)))\n while (size--) {\n id += scopedUrlAlphabet[bytes[size] & 63]\n }\n return id\n}\n","import { connectorConfigSchema as b } from \"./datapos-shared.es.js\";\nconst n = (e) => {\n const o = Object.entries(e).filter((t) => typeof t[1] == \"string\");\n return new Map(o);\n};\nn({ \"en-gb\": \"Application\" }), n({ \"en-gb\": \"Curated Dataset\" }), n({ \"en-gb\": \"Database\" }), n({ \"en-gb\": \"File Store\" });\nasync function c(e, o) {\n console.log(\"loadToolForConnector\", e, o);\n const t = `datapos-tool-${o}`, a = e.toolConfigs.find((s) => s.id === t);\n if (!a) throw new Error(`Connector could not load unknown tool '${o}'.`);\n const l = await import(`https://engine-eu.datapos.app/tools/${o}_v${a.version}/${t}.es.js`);\n return new l.Tool();\n}\nexport {\n b as connectorConfigSchema,\n c as loadToolForConnector\n};\n","class i extends Error {\n locator;\n /** Logical source of the error. */\n constructor(o, t, r) {\n super(o, r), this.name = new.target.name, this.locator = t;\n }\n}\nclass a extends i {\n}\nclass g extends a {\n}\nclass p extends a {\n}\nclass c extends a {\n body;\n /** Sanitized HTTP response body. */\n constructor(o, t, r, n) {\n super(o, t, n), this.name = new.target.name, this.body = E(r ?? void 0);\n }\n}\nclass y extends i {\n}\nclass m extends a {\n componentName;\n /** Vue component name, if available. */\n info;\n /** Vue error info string. */\n constructor(o, t, r, n, s) {\n super(o, t, s), this.name = new.target.name, this.info = r, this.componentName = n;\n }\n}\nclass w extends a {\n}\nclass b extends a {\n}\nasync function h(e, o, t) {\n const r = ` - ${e.statusText}`, n = `${o} Response status '${e.status}${e.statusText ? r : \"\"}' received.`;\n let s;\n try {\n s = await e.text();\n } catch (d) {\n s = `<body unavailable: ${l(d).message}>`;\n }\n return new c(n, t, s);\n}\nfunction k(e) {\n return e.map((o) => o.message).join(\" \");\n}\nfunction l(e) {\n if (e instanceof Error) return e;\n if (typeof e == \"string\") return new Error(e);\n if (typeof e == \"number\" || typeof e == \"boolean\" || typeof e == \"bigint\") return new Error(String(e));\n if (typeof e == \"symbol\") return new Error(e.description ?? \"Unknown error\");\n if (e != null && typeof e == \"object\")\n try {\n return new Error(JSON.stringify(e));\n } catch {\n return new Error(\"Unknown error\");\n }\n return new Error(\"Unknown error\");\n}\nfunction x(e) {\n const o = /* @__PURE__ */ new Set(), t = [];\n let r = e;\n for (; r != null && !o.has(r); ) {\n o.add(r);\n let n;\n if (r instanceof c)\n n = { componentName: void 0, body: r.body, info: void 0, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;\n else if (r instanceof m)\n n = {\n componentName: r.componentName,\n body: void 0,\n info: r.info,\n locator: r.locator,\n message: r.message,\n name: r.name,\n stack: r.stack\n }, r = r.cause;\n else if (r instanceof i)\n n = { componentName: void 0, body: void 0, info: void 0, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;\n else if (r instanceof Error) {\n const s = r;\n n = { componentName: void 0, body: void 0, info: void 0, locator: \"\", message: s.message, name: s.name, stack: s.stack }, r = s.cause;\n } else\n n = { componentName: void 0, body: void 0, info: void 0, locator: \"\", message: f(r), name: \"Error\", stack: void 0 }, r = void 0;\n /(?:\\.{3}|[.!?])$/.test(n.message) || (n.message += \".\"), t.push(n);\n }\n return t;\n}\nfunction f(e) {\n let o;\n try {\n o = JSON.stringify(e);\n } catch {\n typeof e == \"symbol\" ? o = e.description ?? \"Unknown error\" : typeof e == \"bigint\" ? o = e.toString() : o = \"Unknown error\";\n }\n return o === \"\" && (o = \"Unknown error\"), o;\n}\nfunction E(e) {\n if (!(e == null || e === \"\"))\n return e.length > 2048 ? `${e.slice(0, 2048)}... [truncated]` : e;\n}\nexport {\n g as APIError,\n a as ApplicationError,\n p as EngineError,\n c as FetchError,\n y as OperationalError,\n m as VueHandledError,\n b as WindowHandledPromiseRejectionError,\n w as WindowHandledRuntimeError,\n h as buildFetchError,\n k as concatenateSerialisedErrorMessages,\n l as normalizeToError,\n x as serialiseError\n};\n","const c = \"en-US\", s = /* @__PURE__ */ new Map();\nfunction f(e) {\n switch (e) {\n case \"Edm.Binary\":\n return \"unknown\";\n // Binary...\n case \"Edm.Boolean\":\n return \"boolean\";\n case \"Edm.Byte\":\n return \"wholeNumber\";\n case \"Edm.DateTime\":\n return \"moment\";\n // DateTime...\n case \"Edm.DateTimeOffset\":\n return \"moment\";\n // DateTimeOffset...\n case \"Edm.Decimal\":\n return \"decimalNumber\";\n case \"Edm.Double\":\n return \"decimalNumber\";\n case \"Edm.Guid\":\n return \"string\";\n case \"Edm.Int16\":\n return \"wholeNumber\";\n case \"Edm.Int32\":\n return \"wholeNumber\";\n case \"Edm.Int64\":\n return \"wholeNumber\";\n case \"Edm.SByte\":\n return \"wholeNumber\";\n case \"Edm.Single\":\n return \"decimalNumber\";\n case \"Edm.String\":\n return \"string\";\n case \"Edm.Time\":\n return \"momentTime\";\n // Time...\n default:\n return \"unknown\";\n }\n}\nfunction l(e) {\n if (e) {\n const t = e.lastIndexOf(\"/\"), n = e.lastIndexOf(\".\", t === -1 ? e.length : t);\n return n === -1 ? e : e.slice(0, Math.max(0, n));\n }\n}\nfunction m(e) {\n if (e) {\n const t = e.lastIndexOf(\".\");\n if (t !== -1) return e.slice(Math.max(0, t + 1));\n }\n}\nfunction r(e, t = 2, n = t, i = c) {\n if (e == null) return \"\";\n const u = `${i}decimal${t}.${n}`;\n let a = s.get(u);\n return a || (a = new Intl.NumberFormat(i, {\n localeMatcher: \"best fit\",\n maximumFractionDigits: t,\n minimumFractionDigits: n,\n minimumIntegerDigits: 1,\n style: \"decimal\",\n useGrouping: !0\n }), s.set(u, a)), a.format(e);\n}\nfunction d(e) {\n return e == null ? \"\" : e < 1e3 ? o(e) : e < 1e6 ? `${r(e / 1e3, 2, 0)}K` : e < 1e9 ? `${r(e / 1e6, 2, 0)}M` : e < 1e12 ? `${r(e / 1e9, 2, 0)}B` : `${r(e / 1e12, 2, 0)}T`;\n}\nfunction x(e) {\n return e == null ? \"\" : e === 1 ? \"1 byte\" : e < 1024 ? `${o(e)} bytes` : e < 1048576 ? `${r(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${r(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${r(e / 1073741824, 2, 0)} GB` : `${r(e / 1099511627776, 2, 0)} TB`;\n}\nfunction p(e) {\n return e == null ? \"\" : e < 1e3 ? `${o(e)} ms` : e === 1e3 ? `${o(e)} sec` : e < 6e4 ? `${r(e / 1e3, 2, 0)} secs` : e === 6e4 ? \"1 min\" : e < 36e5 ? `${r(e / 6e4, 2, 0)} mins` : e === 36e5 ? \"1 hr\" : e < 864e5 ? `${r(e / 36e5, 2, 0)} hrs` : e === 864e5 ? \"1 day\" : `${r(e / 864e5, 2, 0)} days`;\n}\nfunction o(e, t = c) {\n if (e == null) return \"\";\n const n = `${t}decimal0.0`;\n let i = s.get(n);\n return i || (i = new Intl.NumberFormat(t, {\n localeMatcher: \"best fit\",\n maximumFractionDigits: 0,\n minimumFractionDigits: 0,\n minimumIntegerDigits: 1,\n style: \"decimal\",\n useGrouping: !0\n }), s.set(n, i)), i.format(e);\n}\nfunction E(e) {\n switch (e) {\n case \"csv\":\n return \"text/csv\";\n case \"tab\":\n case \"tsv\":\n return \"text/tab-separated-values\";\n case \"xls\":\n return \"application/vnd.ms-excel\";\n case \"xlsx\":\n return \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n default:\n return \"application/octet-stream\";\n }\n}\nexport {\n f as convertODataTypeIdToUsageTypeId,\n m as extractExtensionFromPath,\n l as extractNameFromPath,\n r as formatNumberAsDecimalNumber,\n p as formatNumberAsDuration,\n d as formatNumberAsSize,\n x as formatNumberAsStorageSize,\n o as formatNumberAsWholeNumber,\n E as lookupMimeTypeForExtension\n};\n","// Dependencies - Framework\nimport type * as RustModule from '../rust/datapos-connector-file-store-emulator-core/pkg/datapos_connector_file_store_emulator_core.js';\n\n// Interfaces/Types\ntype RustBindings = typeof RustModule;\n\n// Module Variables\nlet rustBindingsPromise: Promise<RustBindings> | undefined;\n\n// Utilities\nasync function addNumbersWithRust(left: number, right: number): Promise<number> {\n const { add_my_numbers } = await loadRustBindings();\n console.log(1111, left, right);\n const yyyy = add_my_numbers(Math.trunc(left), Math.trunc(right));\n console.log(2222, yyyy);\n return yyyy;\n}\n\n// Utilities\nasync function checksumWithRust(input: string): Promise<number> {\n const { checksum_from_rust } = await loadRustBindings();\n return checksum_from_rust(input);\n}\n\n// Helpers\nasync function loadRustBindings(): Promise<RustBindings> {\n rustBindingsPromise ??= import('../rust/datapos-connector-file-store-emulator-core/pkg/datapos_connector_file_store_emulator_core.js');\n return rustBindingsPromise;\n}\n\n// Exposures\nexport { addNumbersWithRust, checksumWithRust };\n","/*\n * File store emulator connector class.\n */\n\n// NOTE: Consider Cloudflare R2 Download URL: https://plugins-eu.datapositioning.app/connectors/datapos-connector-file-store-emulator-es.js. This would allow us to secure the bucket?\n\n/** Dependencies - Vendor. */\nimport { nanoid } from 'nanoid';\n\n/** Dependencies - Framework. */\nimport type { Tool as CSVParseTool } from '@datapos/datapos-tool-csv-parse';\nimport { loadToolForConnector } from '@datapos/datapos-shared/component/connector';\nimport type { ToolConfig } from '@datapos/datapos-shared';\nimport { buildFetchError, normalizeToError, OperationalError } from '@datapos/datapos-shared/errors';\nimport type {\n ConnectionConfig,\n ConnectionNodeConfig,\n Connector,\n ConnectorConfig,\n FindResult,\n FindSettings,\n GetReadableStreamResult,\n GetReadableStreamSettings,\n ListResult,\n ListSettings,\n PreviewResult,\n PreviewSettings,\n RetrieveRecordsSettings,\n RetrieveRecordsSummary\n} from '@datapos/datapos-shared/component/connector';\nimport { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from '@datapos/datapos-shared/utilities';\n\n/** Dependencies - Data. */\nimport config from '~/config.json';\nimport fileStoreIndex from '@/fileStoreIndex.json';\nimport { version } from '~/package.json';\nimport { addNumbersWithRust, checksumWithRust } from '@/rustBridge';\n\n/** Interfaces/Types - File store index. */\ntype FileStoreIndexItem =\n | ({ typeId: 'folder'; childCount: number } & { name: string })\n | ({ typeId: 'object'; id: string; lastModifiedAt: number; size: number } & { name: string });\ntype FileStoreIndex = Record<string, FileStoreIndexItem[]>;\n\n/** Constants */\nconst CALLBACK_PREVIEW_ABORTED = 'Connector failed to abort preview object operation.';\nconst CALLBACK_RETRIEVE_ABORTED = 'Connector failed to abort retrieve all records operation.';\nconst DEFAULT_PREVIEW_CHUNK_SIZE = 4096;\nconst DEFAULT_RETRIEVE_CHUNK_SIZE = 1000;\nconst URL_PREFIX = 'https://sample-data-eu.datapos.app';\n\n/** Classes - File store emulator connector. */\nexport default class FileStoreEmulatorConnector implements Connector {\n abortController: AbortController | undefined;\n readonly config: ConnectorConfig;\n readonly connectionConfig: ConnectionConfig;\n readonly toolConfigs;\n\n constructor(connectionConfig: ConnectionConfig, toolConfigs: ToolConfig[]) {\n this.abortController = undefined;\n this.config = config as ConnectorConfig;\n this.config.version = version;\n this.connectionConfig = connectionConfig;\n this.toolConfigs = toolConfigs;\n }\n\n /** Abort operation. */\n abortOperation(connector: Connector): void {\n if (!connector.abortController) return;\n connector.abortController.abort();\n connector.abortController = undefined;\n }\n\n /** Find object. */\n findObject(connector: Connector, settings: FindSettings): Promise<FindResult> {\n // Loop through the file store index checking for an object entry with an identifier equal to the object name.\n for (const folderPath in fileStoreIndex) {\n if (Object.prototype.hasOwnProperty.call(fileStoreIndex, folderPath)) {\n // eslint-disable-next-line security/detect-object-injection\n const indexItems = (fileStoreIndex as FileStoreIndex)[folderPath];\n const indexItem = indexItems?.find((indexItem) => indexItem.typeId === 'object' && indexItem.id === settings.objectName);\n if (indexItem) return Promise.resolve({ folderPath }); // Found, return folder path.\n }\n }\n return Promise.resolve({}); // Not found, return undefined folder path.\n }\n\n // Operations - Get readable stream.\n async getReadableStream(connector: Connector, settings: GetReadableStreamSettings): Promise<GetReadableStreamResult> {\n try {\n console.log('getReader', 'settings', settings);\n const url = `${URL_PREFIX}/fileStore${settings.path}`;\n const response = await fetch(url); // 'https://sample-data-eu.datapos.app/WDI_Data.csv' or 'https://sample-data-eu.datapos.app/fileStore/ENGAGEMENT_START_EVENTS_202405121858.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 });\n } catch (error) {\n connector.abortController = undefined;\n throw error;\n }\n }\n\n // Operations - List nodes.\n listNodes(connector: Connector, settings: ListSettings): Promise<ListResult> {\n const indexItems = (fileStoreIndex as FileStoreIndex)[settings.folderPath] ?? [];\n const connectionNodeConfigs: ConnectionNodeConfig[] = [];\n for (const indexItem of indexItems) {\n if (indexItem.typeId === 'folder') {\n connectionNodeConfigs.push(this.constructFolderNodeConfig(settings.folderPath, indexItem.name, indexItem.childCount));\n } else {\n connectionNodeConfigs.push(this.constructObjectNodeConfig(settings.folderPath, indexItem.id, indexItem.name, indexItem.lastModifiedAt, indexItem.size));\n }\n }\n return Promise.resolve({ cursor: undefined, isMore: false, connectionNodeConfigs, totalCount: connectionNodeConfigs.length });\n }\n\n // Operations - Preview object.\n async previewObject(connector: Connector, settings: PreviewSettings): Promise<PreviewResult> {\n try {\n // Create an abort controller. Get the signal for the abort controller and add an abort listener.\n connector.abortController = new AbortController();\n const signal = connector.abortController.signal;\n signal.addEventListener('abort', () => {\n throw new OperationalError(CALLBACK_PREVIEW_ABORTED, 'datapos-connector-file-store-emulator|Connector|preview.abort');\n });\n\n // Fetch chunk from start of file.\n const url = `${URL_PREFIX}/fileStore${settings.path}`;\n const chunkSize = settings.chunkSize ?? DEFAULT_PREVIEW_CHUNK_SIZE;\n const headers: HeadersInit = { Range: `bytes=0-${chunkSize}` };\n const response = await fetch(encodeURI(url), { headers, signal });\n if (response.ok) {\n connector.abortController = undefined;\n return { data: new Uint8Array(await response.arrayBuffer()), typeId: 'uint8Array' };\n } else {\n throw await buildFetchError(response, `Failed to fetch '${settings.path}' file.`, 'datapos-connector-file-store-emulator|Connector|preview');\n }\n } catch (error) {\n connector.abortController = undefined;\n throw error;\n }\n }\n\n // Operations - Retrieve records.\n async retrieveRecords(\n connector: Connector,\n settings: RetrieveRecordsSettings,\n chunk: (records: string[][]) => void,\n complete: (result: RetrieveRecordsSummary) => void\n ): Promise<void> {\n const csvParseTool = await loadToolForConnector<CSVParseTool>(connector, 'csv-parse');\n console.log(1234, csvParseTool);\n return new Promise((resolve, reject) => {\n try {\n // Create an abort controller and get the signal. Add an abort listener to the signal.\n connector.abortController = new AbortController();\n const signal = connector.abortController.signal;\n signal.addEventListener(\n 'abort',\n () => {\n connector.abortController = undefined;\n reject(new OperationalError(CALLBACK_RETRIEVE_ABORTED, 'datapos-connector-file-store-emulator|Connector|retrieve.abort'));\n },\n { once: true }\n );\n\n // Parser - Declare variables.\n let pendingRows: string[][] = []; // Array to store rows of parsed field values and associated information.\n\n // Parser - Create a parser object for CSV parsing.\n const parser = csvParseTool.buildParser({\n delimiter: settings.valueDelimiterId,\n info: true,\n relax_column_count: true,\n relax_quotes: true\n });\n\n // Parser - Event listener for the 'readable' (data available) event.\n parser.on('readable', () => {\n try {\n let data: string[] | null;\n while ((data = parser.read() as string[] | null) !== null) {\n signal.throwIfAborted(); // Check if the abort signal has been triggered.\n pendingRows.push(data); // Append the row of parsed values and associated information to the pending rows array.\n if (pendingRows.length < DEFAULT_RETRIEVE_CHUNK_SIZE) continue; // Continue with next iteration if the pending rows array is not yet full.\n chunk(pendingRows); // Pass the pending rows to the engine using the 'chunk' callback.\n pendingRows = []; // Clear the pending rows array in preparation for the next batch of data.\n }\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n\n // Parser - Event listener for the 'error' event.\n parser.on('error', (error) => {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n });\n\n // Parser - Event listener for the 'end' (end of data) event.\n parser.on('end', () => {\n try {\n signal.throwIfAborted(); // Check if the abort signal has been triggered.\n connector.abortController = undefined; // Clear the abort controller.\n if (pendingRows.length > 0) {\n chunk(pendingRows);\n pendingRows = [];\n }\n complete({\n byteCount: parser.info.bytes,\n commentLineCount: parser.info.comment_lines,\n emptyLineCount: parser.info.empty_lines,\n invalidFieldLengthCount: parser.info.invalid_field_length,\n lineCount: parser.info.lines,\n recordCount: parser.info.records\n });\n resolve();\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n\n // Fetch, decode and forward the contents of the file to the parser.\n const url = `${URL_PREFIX}/fileStore${settings.path}`;\n fetch(encodeURI(url), { signal })\n .then(async (response) => {\n try {\n if (response.ok && response.body) {\n const stream = response.body.pipeThrough(new TextDecoderStream(settings.encodingId));\n const decodedStreamReader = stream.getReader();\n let result = await decodedStreamReader.read();\n while (!result.done) {\n signal.throwIfAborted(); // Check if the abort signal has been triggered.\n // Write the decoded data to the parser and terminate if there is an error.\n parser.write(result.value, (error) => {\n if (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n result = await decodedStreamReader.read();\n }\n parser.end(); // Signal no more data will be written.\n } else {\n const error = await buildFetchError(\n response,\n `Failed to fetch '${settings.path}' file.`,\n 'datapos-connector-file-store-emulator|Connector|retrieve'\n );\n connector.abortController = undefined;\n reject(error);\n }\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n })\n .catch((error: unknown) => {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n });\n } catch (error) {\n connector.abortController = undefined;\n reject(normalizeToError(error));\n }\n });\n }\n\n /** Utilities - Construct folder node configuration. */\n private constructFolderNodeConfig(folderPath: string, name: string, childCount: number): ConnectionNodeConfig {\n return { id: nanoid(), childCount, extension: undefined, folderPath, label: name, name, typeId: 'folder' };\n }\n\n /** Utilities - Construct object (file) node configuration. */\n private constructObjectNodeConfig(folderPath: string, id: string, fullName: string, lastModifiedAt: number, size: number): ConnectionNodeConfig {\n const name = extractNameFromPath(fullName) ?? '';\n const extension = extractExtensionFromPath(fullName);\n const lastModifiedAtTimestamp = lastModifiedAt;\n const mimeType = lookupMimeTypeForExtension(extension);\n return { id, extension, folderPath, label: fullName, lastModifiedAt: lastModifiedAtTimestamp, mimeType, name, size, typeId: 'object' };\n }\n\n // // Helpers - Load tool for connector.\n // private async loadToolForConnector<T>(connector: Connector, toolId: string): Promise<T> {\n // const toolName = `datapos-tool-${toolId}`;\n // const toolModuleConfig = connector.toolConfigs.find((config) => config.id === toolName);\n // if (!toolModuleConfig) throw new Error(`Unknown tool '${toolId}'.`);\n\n // const url = `https://engine-eu.datapos.app/tools/${toolId}_v${toolModuleConfig.version}/${toolName}.es.js`;\n // const toolModule = (await import(/* @vite-ignore */ url)) as { Tool: new () => T };\n // const toolInstance = new toolModule.Tool();\n // return toolInstance;\n // }\n}\n"],"names":["urlAlphabet","nanoid","size","id","bytes","scopedUrlAlphabet","n","e","o","t","c","a","s","l","i","r","E","y","h","d","m","rustBindingsPromise","addNumbersWithRust","left","right","add_my_numbers","loadRustBindings","yyyy","checksumWithRust","input","checksum_from_rust","CALLBACK_PREVIEW_ABORTED","CALLBACK_RETRIEVE_ABORTED","DEFAULT_PREVIEW_CHUNK_SIZE","DEFAULT_RETRIEVE_CHUNK_SIZE","URL_PREFIX","FileStoreEmulatorConnector","connectionConfig","toolConfigs","config","version","connector","settings","folderPath","fileStoreIndex","indexItem","url","response","xxx","sum","error","indexItems","connectionNodeConfigs","signal","OperationalError","headers","buildFetchError","chunk","complete","csvParseTool","loadToolForConnector","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,EAAkBD,EAAMF,CAAI,IAAI,EAAE;AAE1C,SAAOC;AACT;AC3BA,MAAMG,IAAI,CAACC,MAAM;AACf,QAAMC,IAAI,OAAO,QAAQD,CAAC,EAAE,OAAO,CAACE,MAAM,OAAOA,EAAE,CAAC,KAAK,QAAQ;AACjE,SAAO,IAAI,IAAID,CAAC;AAClB;AACAF,EAAE,EAAE,SAAS,cAAa,CAAE,GAAGA,EAAE,EAAE,SAAS,kBAAiB,CAAE,GAAGA,EAAE,EAAE,SAAS,WAAU,CAAE,GAAGA,EAAE,EAAE,SAAS,cAAc;AACzH,eAAeI,EAAEH,GAAGC,GAAG;AACrB,UAAQ,IAAI,wBAAwBD,GAAGC,CAAC;AACxC,QAAMC,IAAI,gBAAgBD,CAAC,IAAIG,IAA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derNodeConfig;
20
20
  /** Utilities - Construct object (file) node configuration. */
21
21
  private constructObjectNodeConfig;
22
- private loadTool;
23
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datapos-connector-file-store-emulator",
3
- "version": "0.2.330",
3
+ "version": "0.2.333",
4
4
  "license": "MIT",
5
5
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",
6
6
  "private": false,
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "prettier": "@datapos/datapos-development/prettierrc",
28
28
  "dependencies": {
29
- "@datapos/datapos-shared": "^0.3.366",
29
+ "@datapos/datapos-shared": "^0.3.379",
30
30
  "nanoid": "^5.1.6"
31
31
  },
32
32
  "devDependencies": {