@voltro/plugin-search 0.80.0 → 0.82.0

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.
@@ -659,7 +659,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
659
659
  SOFTWARE.
660
660
  ```
661
661
 
662
- ## axios@1.18.1
662
+ ## axios@1.20.0
663
663
 
664
664
  License: MIT
665
665
 
package/dist/index.js CHANGED
@@ -333,7 +333,7 @@ var C = /^[A-Za-z_][A-Za-z0-9_.]*$/, w = (e) => C.test(e), re = (e, t) => {
333
333
  case "nin": return `${n} NOT IN [${A(e.value).map(t).join(", ")}]`;
334
334
  }
335
335
  }, ce = (e, t = {}) => {
336
- let n = I("meilisearch", t), r, i = async () => (r ||= F("meilisearch", "meilisearch", () => import("meilisearch")).then((t) => new t.MeiliSearch({
336
+ let n = I("meilisearch", t), r, i = async () => (r ||= F("meilisearch", "meilisearch", () => import("meilisearch")).then((t) => new t.Meilisearch({
337
337
  host: e.host ?? e.url ?? "http://localhost:7700",
338
338
  apiKey: e.apiKey
339
339
  })), r), a = (e) => e && e.length > 0 ? e.map(se) : void 0, o = async (e, t) => {
@@ -347,13 +347,24 @@ var C = /^[A-Za-z_][A-Za-z0-9_.]*$/, w = (e) => C.test(e), re = (e, t) => {
347
347
  transient: !0
348
348
  });
349
349
  }
350
+ }, s = async (e, t) => {
351
+ let n = await (await i()).tasks.waitForTask(t, {
352
+ timeout: 6e4,
353
+ interval: 50
354
+ });
355
+ if (n.status !== "succeeded") throw new k({
356
+ engine: "meilisearch",
357
+ op: e,
358
+ message: n.error?.message ?? `Meilisearch task ${t.taskUid} ${n.status}`,
359
+ transient: n.status === "canceled"
360
+ });
350
361
  };
351
362
  return {
352
363
  upsert: (e, t) => o("upsert", async () => {
353
- await (await i()).index(e).addDocuments(t);
364
+ await s("upsert", await (await i()).index(e).addDocuments([...t]));
354
365
  }),
355
366
  remove: (e, t) => o("remove", async () => {
356
- await (await i()).index(e).deleteDocuments([...t]);
367
+ await s("remove", await (await i()).index(e).deleteDocuments([...t]));
357
368
  }),
358
369
  query: (e, { q: t, limit: r, offset: s, filters: c, facets: l, highlight: u, fuzziness: d, engineParams: f }) => o("query", async () => {
359
370
  let o = n(f), p = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/plugin-search",
3
- "version": "0.80.0",
3
+ "version": "0.82.0",
4
4
  "description": "Keep an external search index (Typesense / Meilisearch / Algolia) in sync with framework tables via the post-commit ChangeEvent tap, then query it — tenant-scoped, with a backfill path and a useSearch() hook.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -43,9 +43,9 @@
43
43
  "node": ">=24.0.0"
44
44
  },
45
45
  "dependencies": {
46
- "@voltro/client": "0.80.0",
47
- "@voltro/database": "0.80.0",
48
- "@voltro/protocol": "0.80.0"
46
+ "@voltro/client": "0.82.0",
47
+ "@voltro/database": "0.82.0",
48
+ "@voltro/protocol": "0.82.0"
49
49
  },
50
50
  "optionalDependencies": {
51
51
  "algoliasearch": "^5.59.0",