strapi-plugin-meilisearch 0.13.2 → 0.13.3

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.
@@ -3,7 +3,7 @@ import * as React from "react";
3
3
  import { useState, useEffect, memo } from "react";
4
4
  import { Routes, Route } from "react-router-dom";
5
5
  import { useNotification, useFetchClient, useRBAC, private_useAutoReloadOverlayBlocker, private_AutoReloadOverlayBlockerProvider, Page, Layouts, BackButton } from "@strapi/strapi/admin";
6
- import { p as pluginId, P as PERMISSIONS } from "./index-CnETd4ds.mjs";
6
+ import { p as pluginId, P as PERMISSIONS } from "./index-EQZ5QLS6.mjs";
7
7
  import { Tr, Td, Checkbox, Typography, Flex, Box, Button, Thead, Th, VisuallyHidden, Table, Tbody, Field, Link, Tabs } from "@strapi/design-system";
8
8
  var __assign = function() {
9
9
  __assign = Object.assign || function __assign2(t) {
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
5
  const reactRouterDom = require("react-router-dom");
6
6
  const admin = require("@strapi/strapi/admin");
7
- const index = require("./index-OgM-GMGo.js");
7
+ const index = require("./index-MhpvuJMV.js");
8
8
  const designSystem = require("@strapi/design-system");
9
9
  function _interopNamespace(e) {
10
10
  if (e && e.__esModule) return e;
@@ -18,7 +18,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
18
18
  });
19
19
  };
20
20
  const name$1 = "strapi-plugin-meilisearch";
21
- const version = "0.13.2";
21
+ const version = "0.13.3";
22
22
  const description = "Synchronise and search in your Strapi content-types with Meilisearch";
23
23
  const scripts = {
24
24
  build: "strapi-plugin build",
@@ -210,7 +210,7 @@ const index = {
210
210
  defaultMessage: name
211
211
  },
212
212
  Component: async () => {
213
- const { App } = await import("./App-C_AT8Sze.mjs");
213
+ const { App } = await import("./App-B5q9mEPQ.mjs");
214
214
  return App;
215
215
  },
216
216
  permissions: PERMISSIONS.main
@@ -19,7 +19,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
19
19
  });
20
20
  };
21
21
  const name$1 = "strapi-plugin-meilisearch";
22
- const version = "0.13.2";
22
+ const version = "0.13.3";
23
23
  const description = "Synchronise and search in your Strapi content-types with Meilisearch";
24
24
  const scripts = {
25
25
  build: "strapi-plugin build",
@@ -211,7 +211,7 @@ const index = {
211
211
  defaultMessage: name
212
212
  },
213
213
  Component: async () => {
214
- const { App } = await Promise.resolve().then(() => require("./App-4wYXCpIt.js"));
214
+ const { App } = await Promise.resolve().then(() => require("./App-Bx6jJvL9.js"));
215
215
  return App;
216
216
  },
217
217
  permissions: PERMISSIONS.main
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-OgM-GMGo.js");
2
+ const index = require("../_chunks/index-MhpvuJMV.js");
3
3
  module.exports = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "../_chunks/index-CnETd4ds.mjs";
1
+ import { i } from "../_chunks/index-EQZ5QLS6.mjs";
2
2
  export {
3
3
  i as default
4
4
  };
@@ -1369,7 +1369,7 @@ const configurationService = ({ strapi: strapi2 }) => {
1369
1369
  }
1370
1370
  };
1371
1371
  };
1372
- const version = "0.13.2";
1372
+ const version = "0.13.3";
1373
1373
  const Meilisearch = (config2) => {
1374
1374
  return new meilisearch$1.MeiliSearch({
1375
1375
  ...config2,
@@ -1826,14 +1826,9 @@ const lifecycleService = ({ strapi: strapi2 }) => {
1826
1826
  async afterCreate(event) {
1827
1827
  const { result } = event;
1828
1828
  const meilisearch2 = strapi2.plugin("meilisearch").service("meilisearch");
1829
- const entry = await contentTypeService2.getEntry({
1829
+ await meilisearch2.addEntriesToMeilisearch({
1830
1830
  contentType: contentTypeUid,
1831
- documentId: result.documentId,
1832
- entriesQuery: meilisearch2.entriesQuery({ contentType: contentType2 })
1833
- });
1834
- meilisearch2.addEntriesToMeilisearch({
1835
- contentType: contentTypeUid,
1836
- entries: [entry]
1831
+ entries: [result]
1837
1832
  }).catch((e) => {
1838
1833
  strapi2.log.error(
1839
1834
  `Meilisearch could not add entry with id: ${result.id}: ${e.message}`
@@ -1872,14 +1867,9 @@ const lifecycleService = ({ strapi: strapi2 }) => {
1872
1867
  async afterUpdate(event) {
1873
1868
  const { result } = event;
1874
1869
  const meilisearch2 = strapi2.plugin("meilisearch").service("meilisearch");
1875
- const entry = await contentTypeService2.getEntry({
1876
- contentType: contentTypeUid,
1877
- documentId: result.documentId,
1878
- entriesQuery: meilisearch2.entriesQuery({ contentType: contentType2 })
1879
- });
1880
- meilisearch2.updateEntriesInMeilisearch({
1870
+ await meilisearch2.updateEntriesInMeilisearch({
1881
1871
  contentType: contentTypeUid,
1882
- entries: [entry]
1872
+ entries: [result]
1883
1873
  }).catch((e) => {
1884
1874
  strapi2.log.error(
1885
1875
  `Meilisearch could not update entry with id: ${result.id}: ${e.message}`
@@ -1368,7 +1368,7 @@ const configurationService = ({ strapi: strapi2 }) => {
1368
1368
  }
1369
1369
  };
1370
1370
  };
1371
- const version = "0.13.2";
1371
+ const version = "0.13.3";
1372
1372
  const Meilisearch = (config2) => {
1373
1373
  return new MeiliSearch({
1374
1374
  ...config2,
@@ -1825,14 +1825,9 @@ const lifecycleService = ({ strapi: strapi2 }) => {
1825
1825
  async afterCreate(event) {
1826
1826
  const { result } = event;
1827
1827
  const meilisearch2 = strapi2.plugin("meilisearch").service("meilisearch");
1828
- const entry = await contentTypeService2.getEntry({
1828
+ await meilisearch2.addEntriesToMeilisearch({
1829
1829
  contentType: contentTypeUid,
1830
- documentId: result.documentId,
1831
- entriesQuery: meilisearch2.entriesQuery({ contentType: contentType2 })
1832
- });
1833
- meilisearch2.addEntriesToMeilisearch({
1834
- contentType: contentTypeUid,
1835
- entries: [entry]
1830
+ entries: [result]
1836
1831
  }).catch((e) => {
1837
1832
  strapi2.log.error(
1838
1833
  `Meilisearch could not add entry with id: ${result.id}: ${e.message}`
@@ -1871,14 +1866,9 @@ const lifecycleService = ({ strapi: strapi2 }) => {
1871
1866
  async afterUpdate(event) {
1872
1867
  const { result } = event;
1873
1868
  const meilisearch2 = strapi2.plugin("meilisearch").service("meilisearch");
1874
- const entry = await contentTypeService2.getEntry({
1875
- contentType: contentTypeUid,
1876
- documentId: result.documentId,
1877
- entriesQuery: meilisearch2.entriesQuery({ contentType: contentType2 })
1878
- });
1879
- meilisearch2.updateEntriesInMeilisearch({
1869
+ await meilisearch2.updateEntriesInMeilisearch({
1880
1870
  contentType: contentTypeUid,
1881
- entries: [entry]
1871
+ entries: [result]
1882
1872
  }).catch((e) => {
1883
1873
  strapi2.log.error(
1884
1874
  `Meilisearch could not update entry with id: ${result.id}: ${e.message}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-plugin-meilisearch",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "description": "Synchronise and search in your Strapi content-types with Meilisearch",
5
5
  "scripts": {
6
6
  "build": "strapi-plugin build",