@vegan-friendly/strapi-plugin-elasticsearch 0.0.11-alpha.6 → 0.0.11-alpha.7

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.
Files changed (61) hide show
  1. package/.vscode/settings.json +3 -0
  2. package/README.md +0 -4
  3. package/admin/src/components/Initializer/index.js +26 -0
  4. package/admin/src/components/PluginIcon/index.js +12 -0
  5. package/admin/src/components/SubNavigation/index.js +48 -0
  6. package/admin/src/index.js +63 -0
  7. package/admin/src/pages/App/index.js +29 -0
  8. package/admin/src/pages/ConfigureCollection/index.js +225 -0
  9. package/admin/src/pages/ConfigureCollectionList/index.js +266 -0
  10. package/admin/src/pages/Homepage/index.js +168 -0
  11. package/admin/src/pages/ViewIndexingRunLog/index.js +124 -0
  12. package/admin/src/pluginId.js +5 -0
  13. package/admin/src/translations/en.json +1 -0
  14. package/admin/src/translations/fr.json +1 -0
  15. package/admin/src/utils/apiUrls.js +14 -0
  16. package/admin/src/utils/axiosInstance.js +40 -0
  17. package/admin/src/utils/getTrad.js +5 -0
  18. package/package.json +40 -80
  19. package/server/bootstrap.js +142 -0
  20. package/server/config/index.js +6 -0
  21. package/server/content-types/index.js +9 -0
  22. package/server/content-types/indexing-logs.js +35 -0
  23. package/server/content-types/name-prefix.js +0 -0
  24. package/server/content-types/tasks.js +52 -0
  25. package/server/controllers/configure-indexing.js +66 -0
  26. package/server/controllers/index.js +15 -0
  27. package/server/controllers/log-indexing.js +11 -0
  28. package/server/controllers/perform-indexing.js +28 -0
  29. package/server/controllers/perform-search.js +31 -0
  30. package/server/controllers/setup-info.js +14 -0
  31. package/server/destroy.js +5 -0
  32. package/server/index.js +25 -0
  33. package/server/middlewares/index.js +3 -0
  34. package/server/policies/index.js +3 -0
  35. package/server/register.js +5 -0
  36. package/server/routes/configure-indexing.js +42 -0
  37. package/server/routes/index.js +13 -0
  38. package/server/routes/perform-indexing.js +24 -0
  39. package/server/routes/perform-search.js +14 -0
  40. package/server/routes/run-log.js +12 -0
  41. package/server/routes/setup-info.js +12 -0
  42. package/server/services/configure-indexing.js +184 -0
  43. package/server/services/es-interface.js +187 -0
  44. package/server/services/helper.js +305 -0
  45. package/server/services/index.js +19 -0
  46. package/server/services/log-indexing.js +26 -0
  47. package/server/services/perform-indexing.js +173 -0
  48. package/server/services/schedule-indexing.js +65 -0
  49. package/server/services/transform-content.js +22 -0
  50. package/strapi-admin.js +3 -0
  51. package/strapi-server.js +3 -0
  52. package/dist/_chunks/App-Br53NnT1.mjs +0 -17315
  53. package/dist/_chunks/App-C3jMSu4l.js +0 -17314
  54. package/dist/_chunks/en-B4KWt_jN.js +0 -4
  55. package/dist/_chunks/en-Byx4XI2L.mjs +0 -4
  56. package/dist/_chunks/index-BlmgBQo2.js +0 -71
  57. package/dist/_chunks/index-CRnRLV0T.mjs +0 -72
  58. package/dist/admin/index.js +0 -3
  59. package/dist/admin/index.mjs +0 -4
  60. package/dist/server/index.js +0 -7330
  61. package/dist/server/index.mjs +0 -7307
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const en = {};
4
- exports.default = en;
@@ -1,4 +0,0 @@
1
- const en = {};
2
- export {
3
- en as default
4
- };
@@ -1,71 +0,0 @@
1
- "use strict";
2
- const React = require("react");
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const icons = require("@strapi/icons");
5
- const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
6
- const v = glob[path];
7
- if (v) {
8
- return typeof v === "function" ? v() : Promise.resolve(v);
9
- }
10
- return new Promise((_, reject) => {
11
- (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
12
- reject.bind(
13
- null,
14
- new Error(
15
- "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
16
- )
17
- )
18
- );
19
- });
20
- };
21
- const strapi = {
22
- name: "elasticsearch"
23
- };
24
- const pluginPkg = {
25
- strapi
26
- };
27
- const pluginId = pluginPkg.strapi.name;
28
- const Initializer = ({ setPlugin }) => {
29
- const ref = React.useRef(setPlugin);
30
- React.useEffect(() => {
31
- ref.current(pluginId);
32
- }, []);
33
- return null;
34
- };
35
- const PluginIcon = () => /* @__PURE__ */ jsxRuntime.jsx(icons.Search, {});
36
- const index = {
37
- register(app) {
38
- app.addMenuLink({
39
- to: `plugins/${pluginId}`,
40
- icon: PluginIcon,
41
- intlLabel: {
42
- id: `${pluginId}.plugin.name`,
43
- defaultMessage: pluginId
44
- },
45
- Component: async () => {
46
- const { App } = await Promise.resolve().then(() => require("./App-C3jMSu4l.js"));
47
- return App;
48
- }
49
- });
50
- app.registerPlugin({
51
- id: pluginId,
52
- initializer: Initializer,
53
- isReady: false,
54
- name: pluginId
55
- });
56
- },
57
- async registerTrads({ locales }) {
58
- return Promise.all(
59
- locales.map(async (locale) => {
60
- try {
61
- const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-B4KWt_jN.js")) }), `./translations/${locale}.json`, 3);
62
- return { data, locale };
63
- } catch {
64
- return { data: {}, locale };
65
- }
66
- })
67
- );
68
- }
69
- };
70
- exports.index = index;
71
- exports.pluginId = pluginId;
@@ -1,72 +0,0 @@
1
- import { useRef, useEffect } from "react";
2
- import { jsx } from "react/jsx-runtime";
3
- import { Search } from "@strapi/icons";
4
- const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
5
- const v = glob[path];
6
- if (v) {
7
- return typeof v === "function" ? v() : Promise.resolve(v);
8
- }
9
- return new Promise((_, reject) => {
10
- (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
11
- reject.bind(
12
- null,
13
- new Error(
14
- "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
15
- )
16
- )
17
- );
18
- });
19
- };
20
- const strapi = {
21
- name: "elasticsearch"
22
- };
23
- const pluginPkg = {
24
- strapi
25
- };
26
- const pluginId = pluginPkg.strapi.name;
27
- const Initializer = ({ setPlugin }) => {
28
- const ref = useRef(setPlugin);
29
- useEffect(() => {
30
- ref.current(pluginId);
31
- }, []);
32
- return null;
33
- };
34
- const PluginIcon = () => /* @__PURE__ */ jsx(Search, {});
35
- const index = {
36
- register(app) {
37
- app.addMenuLink({
38
- to: `plugins/${pluginId}`,
39
- icon: PluginIcon,
40
- intlLabel: {
41
- id: `${pluginId}.plugin.name`,
42
- defaultMessage: pluginId
43
- },
44
- Component: async () => {
45
- const { App } = await import("./App-Br53NnT1.mjs");
46
- return App;
47
- }
48
- });
49
- app.registerPlugin({
50
- id: pluginId,
51
- initializer: Initializer,
52
- isReady: false,
53
- name: pluginId
54
- });
55
- },
56
- async registerTrads({ locales }) {
57
- return Promise.all(
58
- locales.map(async (locale) => {
59
- try {
60
- const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("./en-Byx4XI2L.mjs") }), `./translations/${locale}.json`, 3);
61
- return { data, locale };
62
- } catch {
63
- return { data: {}, locale };
64
- }
65
- })
66
- );
67
- }
68
- };
69
- export {
70
- index as i,
71
- pluginId as p
72
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- const index = require("../_chunks/index-BlmgBQo2.js");
3
- module.exports = index.index;
@@ -1,4 +0,0 @@
1
- import { i } from "../_chunks/index-CRnRLV0T.mjs";
2
- export {
3
- i as default
4
- };