@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.
- package/.vscode/settings.json +3 -0
- package/README.md +0 -4
- package/admin/src/components/Initializer/index.js +26 -0
- package/admin/src/components/PluginIcon/index.js +12 -0
- package/admin/src/components/SubNavigation/index.js +48 -0
- package/admin/src/index.js +63 -0
- package/admin/src/pages/App/index.js +29 -0
- package/admin/src/pages/ConfigureCollection/index.js +225 -0
- package/admin/src/pages/ConfigureCollectionList/index.js +266 -0
- package/admin/src/pages/Homepage/index.js +168 -0
- package/admin/src/pages/ViewIndexingRunLog/index.js +124 -0
- package/admin/src/pluginId.js +5 -0
- package/admin/src/translations/en.json +1 -0
- package/admin/src/translations/fr.json +1 -0
- package/admin/src/utils/apiUrls.js +14 -0
- package/admin/src/utils/axiosInstance.js +40 -0
- package/admin/src/utils/getTrad.js +5 -0
- package/package.json +40 -80
- package/server/bootstrap.js +142 -0
- package/server/config/index.js +6 -0
- package/server/content-types/index.js +9 -0
- package/server/content-types/indexing-logs.js +35 -0
- package/server/content-types/name-prefix.js +0 -0
- package/server/content-types/tasks.js +52 -0
- package/server/controllers/configure-indexing.js +66 -0
- package/server/controllers/index.js +15 -0
- package/server/controllers/log-indexing.js +11 -0
- package/server/controllers/perform-indexing.js +28 -0
- package/server/controllers/perform-search.js +31 -0
- package/server/controllers/setup-info.js +14 -0
- package/server/destroy.js +5 -0
- package/server/index.js +25 -0
- package/server/middlewares/index.js +3 -0
- package/server/policies/index.js +3 -0
- package/server/register.js +5 -0
- package/server/routes/configure-indexing.js +42 -0
- package/server/routes/index.js +13 -0
- package/server/routes/perform-indexing.js +24 -0
- package/server/routes/perform-search.js +14 -0
- package/server/routes/run-log.js +12 -0
- package/server/routes/setup-info.js +12 -0
- package/server/services/configure-indexing.js +184 -0
- package/server/services/es-interface.js +187 -0
- package/server/services/helper.js +305 -0
- package/server/services/index.js +19 -0
- package/server/services/log-indexing.js +26 -0
- package/server/services/perform-indexing.js +173 -0
- package/server/services/schedule-indexing.js +65 -0
- package/server/services/transform-content.js +22 -0
- package/strapi-admin.js +3 -0
- package/strapi-server.js +3 -0
- package/dist/_chunks/App-Br53NnT1.mjs +0 -17315
- package/dist/_chunks/App-C3jMSu4l.js +0 -17314
- package/dist/_chunks/en-B4KWt_jN.js +0 -4
- package/dist/_chunks/en-Byx4XI2L.mjs +0 -4
- package/dist/_chunks/index-BlmgBQo2.js +0 -71
- package/dist/_chunks/index-CRnRLV0T.mjs +0 -72
- package/dist/admin/index.js +0 -3
- package/dist/admin/index.mjs +0 -4
- package/dist/server/index.js +0 -7330
- package/dist/server/index.mjs +0 -7307
@@ -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
|
-
};
|
package/dist/admin/index.js
DELETED
package/dist/admin/index.mjs
DELETED