added search-utilities and basic schema for index creation

This commit is contained in:
Martina 2021-10-04 15:11:33 -07:00
parent b2135c203f
commit c1bceaf1ec
5 changed files with 509 additions and 175 deletions

View File

@ -0,0 +1,28 @@
import { Client } from "@elastic/elasticsearch";
import * as Environment from "common/environment";
const client = new Client({
cloud: {
id: Environment.ELASTIC_SEARCH_ID,
},
auth: {
apiKey: Environment.ELASTIC_SEARCH_API_KEY,
},
});
export const searchInSlate = ({ query, slateId }) => {
search({ query, filters: { }})
}
export const search = ({ query, filters }) => {
const result = await client.search({ index: Environment.ELASTIC_SEARCH_INDEX, body: {
query: {
match: {
hello: "world"
}
}
}})
const { body, statusCode, headers, warnings, meta } = result;
console.log(result)
};

View File

@ -57,3 +57,8 @@ export const MICROLINK_API_KEY = process.env.MICROLINK_API_KEY;
//NOTE(martina): Estuary
export const ESTUARY_API_KEY = process.env.ESTUARY_API_KEY;
//NOTE(martina): Elastic search
export const ELASTIC_SEARCH_ID = process.env.NEXT_PUBLIC_ELASTIC_SEARCH_ID;
export const ELASTIC_SEARCH_API_KEY = process.env.NEXT_PUBLIC_ELASTIC_SEARCH_API_KEY;
export const ELASTIC_SEARCH_INDEX = process.env.NEXT_PUBLIC_ELASTIC_SEARCH_INDEX;

View File

@ -10,90 +10,258 @@ import * as Window from "~/common/window";
import WebSocket from "ws";
const websocketSend = async (type, data) => {
if (Strings.isEmpty(Environment.PUBSUB_SECRET)) {
return;
}
import { Client } from "@elastic/elasticsearch";
let ws = Websocket.get();
if (!ws) {
ws = Websocket.create();
await Window.delay(2000);
}
const client = new Client({
cloud: {
id: Environment.ELASTIC_SEARCH_ID,
},
auth: {
apiKey: Environment.ELASTIC_SEARCH_API_KEY,
},
});
const encryptedData = await Utilities.encryptWithSecret(
JSON.stringify(data),
Environment.PUBSUB_SECRET
);
// NOTE(jim): Only allow this to be passed around encrypted.
if (ws && ws.readyState === WebSocket.OPEN) {
ws.send(
JSON.stringify({
type,
iv: encryptedData.iv,
data: encryptedData.hex,
})
);
}
const createUserIndex = () => {
let properties = {
mappings: {
properties: {
id: {
type: "keyword",
store: true,
},
username: {
type: "keyword",
store: true,
},
name: {
type: "text",
store: true,
},
body: {
type: "text",
store: true,
},
followerCount: {
type: "integer",
index: false,
store: true,
},
slateCount: {
type: "integer",
index: false,
store: true,
},
photo: {
type: "keyword",
index: false,
store: true,
},
},
},
};
};
export const updateUser = async (user, action) => {
if (!user || !action) return;
Logging.log(`Search is updating user ...`);
let data;
if (Array.isArray(user)) {
data = user.map((item) => {
return { ...Serializers.sanitizeUser(item), type: "USER" };
});
} else {
data = { ...Serializers.sanitizeUser(user), type: "USER" };
}
websocketSend("UPDATE", {
id: "LENS",
data: { action, data },
});
const createSlateIndex = () => {
let properties = {
mappings: {
properties: {
id: {
type: "keyword",
store: true,
},
slatename: {
type: "keyword",
store: true,
},
name: {
type: "text",
store: true,
},
body: {
type: "text",
store: true,
},
preview: {
type: "text",
index: false,
store: true,
},
ownerId: {
type: "keyword",
store: true,
},
isPublic: {
type: "bool",
store: true,
},
subscriberCount: {
type: "integer",
index: false,
store: true,
},
fileCount: {
type: "integer",
index: false,
store: true,
},
},
},
};
};
export const updateSlate = async (slate, action) => {
if (!slate || !action) return;
Logging.log(`Search is updating slate ...`);
let data;
if (Array.isArray(slate)) {
data = slate.map((item) => {
return { ...item, type: "SLATE" };
});
} else {
data = { ...slate, type: "SLATE" };
}
websocketSend("UPDATE", {
id: "LENS",
data: { action, data },
});
const createFileIndex = () => {
let properties = {
mappings: {
properties: {
id: {
type: "keyword",
store: true,
},
cid: {
type: "keyword",
store: true,
},
filename: {
type: "keyword",
index: false,
store: true,
},
name: {
type: "text",
store: true,
},
body: {
type: "text",
store: true,
},
author: {
type: "text",
store: true,
},
source: {
type: "text",
store: true,
},
type: {
type: "keyword",
index: false,
store: true,
},
isPublic: {
type: "bool",
store: true,
},
downloadCount: {
type: "integer",
index: false,
store: true,
},
saveCount: {
type: "integer",
index: false,
store: true,
},
data: {
type: "object",
index: false,
store: true,
},
isLink: {
type: "bool",
store: true,
},
fileCategory: {
type: "keyword",
},
},
},
};
};
export const updateFile = async (file, action) => {
if (!file || !action) return;
// const websocketSend = async (type, data) => {
// if (Strings.isEmpty(Environment.PUBSUB_SECRET)) {
// return;
// }
Logging.log(`Search is updating file ...`);
// let ws = Websocket.get();
// if (!ws) {
// ws = Websocket.create();
// await Window.delay(2000);
// }
let data;
if (Array.isArray(file)) {
data = file.map((item) => {
return { ...item, type: "FILE" };
});
} else {
data = { ...file, type: "FILE" };
}
// const encryptedData = await Utilities.encryptWithSecret(
// JSON.stringify(data),
// Environment.PUBSUB_SECRET
// );
websocketSend("UPDATE", {
id: "LENS",
data: { action, data },
});
};
// // NOTE(jim): Only allow this to be passed around encrypted.
// if (ws && ws.readyState === WebSocket.OPEN) {
// ws.send(
// JSON.stringify({
// type,
// iv: encryptedData.iv,
// data: encryptedData.hex,
// })
// );
// }
// };
// export const updateUser = async (user, action) => {
// if (!user || !action) return;
// Logging.log(`Search is updating user ...`);
// let data;
// if (Array.isArray(user)) {
// data = user.map((item) => {
// return { ...Serializers.sanitizeUser(item), type: "USER" };
// });
// } else {
// data = { ...Serializers.sanitizeUser(user), type: "USER" };
// }
// websocketSend("UPDATE", {
// id: "LENS",
// data: { action, data },
// });
// };
// export const updateSlate = async (slate, action) => {
// if (!slate || !action) return;
// Logging.log(`Search is updating slate ...`);
// let data;
// if (Array.isArray(slate)) {
// data = slate.map((item) => {
// return { ...item, type: "SLATE" };
// });
// } else {
// data = { ...slate, type: "SLATE" };
// }
// websocketSend("UPDATE", {
// id: "LENS",
// data: { action, data },
// });
// };
// export const updateFile = async (file, action) => {
// if (!file || !action) return;
// Logging.log(`Search is updating file ...`);
// let data;
// if (Array.isArray(file)) {
// data = file.map((item) => {
// return { ...item, type: "FILE" };
// });
// } else {
// data = { ...file, type: "FILE" };
// }
// websocketSend("UPDATE", {
// id: "LENS",
// data: { action, data },
// });
// };

330
package-lock.json generated
View File

@ -5,9 +5,12 @@
"requires": true,
"packages": {
"": {
"name": "slate",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@babel/register": "^7.12.13",
"@elastic/elasticsearch": "^7.15.0",
"@emotion/babel-preset-css-prop": "11.2.0",
"@emotion/react": "11.1.5",
"@glif/filecoin-number": "^1.1.0-beta.17",
@ -40,7 +43,7 @@
"moment": "^2.29.1",
"morgan": "^1.10.0",
"multihashing-async": "^2.1.2",
"next": "^11.1.0",
"next": "^11.1.2",
"next-offline": "^5.0.5",
"oauth": "^0.9.15",
"pg": "^8.5.1",
@ -67,7 +70,6 @@
"@babel/eslint-parser": "^7.13.8",
"@babel/plugin-proposal-optional-chaining": "^7.12.16",
"@babel/preset-env": "^7.12.16",
"@babel/register": "^7.15.3",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-json": "^4.1.0",
@ -1761,7 +1763,6 @@
"version": "7.15.3",
"resolved": "https://registry.npmjs.org/@babel/register/-/register-7.15.3.tgz",
"integrity": "sha512-mj4IY1ZJkorClxKTImccn4T81+UKTo4Ux0+OFSV9hME1ooqS9UV+pJ6BjD0qXPK4T3XW/KNa79XByjeEMZz+fw==",
"dev": true,
"dependencies": {
"clone-deep": "^4.0.1",
"find-cache-dir": "^2.0.0",
@ -1777,11 +1778,14 @@
}
},
"node_modules/@babel/runtime": {
"version": "7.13.10",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz",
"integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==",
"version": "7.15.3",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz",
"integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==",
"dependencies": {
"regenerator-runtime": "^0.13.4"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/runtime-corejs3": {
@ -1840,6 +1844,25 @@
"seedrandom": "^3.0.5"
}
},
"node_modules/@elastic/elasticsearch": {
"version": "7.15.0",
"resolved": "https://registry.npmjs.org/@elastic/elasticsearch/-/elasticsearch-7.15.0.tgz",
"integrity": "sha512-FUKvjV2IKtIiWsvBy7D+wLbSEONsmNR15RRN7P/Sb30g4ObZRHH2qGOP5PPnzxdntEkzZ8HzY7nKKXFS+3Du1g==",
"dependencies": {
"debug": "^4.3.1",
"hpagent": "^0.1.1",
"ms": "^2.1.3",
"secure-json-parse": "^2.4.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/@elastic/elasticsearch/node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"node_modules/@emotion/babel-plugin": {
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.3.0.tgz",
@ -2238,19 +2261,19 @@
"integrity": "sha512-jDJTpta+P4p1NZTFVLHJ/TLFVYVcOqv6l8xwOeBKNPMgY/zDYH/YH7SJbvrr/h1RcS9GzbPcLKGzpuK9cV56UA=="
},
"node_modules/@next/env": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@next/env/-/env-11.1.0.tgz",
"integrity": "sha512-zPJkMFRenSf7BLlVee8987G0qQXAhxy7k+Lb/5hLAGkPVHAHm+oFFeL+2ipbI2KTEFlazdmGY0M+AlLQn7pWaw=="
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/env/-/env-11.1.2.tgz",
"integrity": "sha512-+fteyVdQ7C/OoulfcF6vd1Yk0FEli4453gr8kSFbU8sKseNSizYq6df5MKz/AjwLptsxrUeIkgBdAzbziyJ3mA=="
},
"node_modules/@next/polyfill-module": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@next/polyfill-module/-/polyfill-module-11.1.0.tgz",
"integrity": "sha512-64EgW8SzJRQls2yJ5DkuljRxgE24o2kYtX/ghTkPUJYsfidHMWzQGwg26IgRbb/uHqTd1G0W5UkKag+Nt8TWaQ=="
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/polyfill-module/-/polyfill-module-11.1.2.tgz",
"integrity": "sha512-xZmixqADM3xxtqBV0TpAwSFzWJP0MOQzRfzItHXf1LdQHWb0yofHHC+7eOrPFic8+ZGz5y7BdPkkgR1S25OymA=="
},
"node_modules/@next/react-dev-overlay": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@next/react-dev-overlay/-/react-dev-overlay-11.1.0.tgz",
"integrity": "sha512-h+ry0sTk1W3mJw+TwEf91aqLbBJ5oqAsxfx+QryqEItNtfW6zLSSjxkyTYTqX8DkgSssQQutQfATkzBVgOR+qQ==",
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/react-dev-overlay/-/react-dev-overlay-11.1.2.tgz",
"integrity": "sha512-rDF/mGY2NC69mMg2vDqzVpCOlWqnwPUXB2zkARhvknUHyS6QJphPYv9ozoPJuoT/QBs49JJd9KWaAzVBvq920A==",
"dependencies": {
"@babel/code-frame": "7.12.11",
"anser": "1.4.9",
@ -2304,9 +2327,9 @@
}
},
"node_modules/@next/react-refresh-utils": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@next/react-refresh-utils/-/react-refresh-utils-11.1.0.tgz",
"integrity": "sha512-g5DtFTpLTGa36iy9DuZawtJeitI11gysFGKPQQqy+mNbSFazguArcJ10gAYFlbqpIi4boUamWNI5mAoSPx3kog==",
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/react-refresh-utils/-/react-refresh-utils-11.1.2.tgz",
"integrity": "sha512-hsoJmPfhVqjZ8w4IFzoo8SyECVnN+8WMnImTbTKrRUHOVJcYMmKLL7xf7T0ft00tWwAl/3f3Q3poWIN2Ueql/Q==",
"peerDependencies": {
"react-refresh": "0.8.3",
"webpack": "^4 || ^5"
@ -2317,6 +2340,66 @@
}
}
},
"node_modules/@next/swc-darwin-arm64": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-11.1.2.tgz",
"integrity": "sha512-hZuwOlGOwBZADA8EyDYyjx3+4JGIGjSHDHWrmpI7g5rFmQNltjlbaefAbiU5Kk7j3BUSDwt30quJRFv3nyJQ0w==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-darwin-x64": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-11.1.2.tgz",
"integrity": "sha512-PGOp0E1GisU+EJJlsmJVGE+aPYD0Uh7zqgsrpD3F/Y3766Ptfbe1lEPPWnRDl+OzSSrSrX1lkyM/Jlmh5OwNvA==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-linux-x64-gnu": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-11.1.2.tgz",
"integrity": "sha512-YcDHTJjn/8RqvyJVB6pvEKXihDcdrOwga3GfMv/QtVeLphTouY4BIcEUfrG5+26Nf37MP1ywN3RRl1TxpurAsQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-win32-x64-msvc": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-11.1.2.tgz",
"integrity": "sha512-e/pIKVdB+tGQYa1cW3sAeHm8gzEri/HYLZHT4WZojrUxgWXqx8pk7S7Xs47uBcFTqBDRvK3EcQpPLf3XdVsDdg==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@node-rs/helper": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@node-rs/helper/-/helper-1.2.1.tgz",
@ -4358,7 +4441,6 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
"integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==",
"dev": true,
"dependencies": {
"is-plain-object": "^2.0.4",
"kind-of": "^6.0.2",
@ -6534,6 +6616,11 @@
"react-is": "^16.7.0"
}
},
"node_modules/hpagent": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/hpagent/-/hpagent-0.1.2.tgz",
"integrity": "sha512-ePqFXHtSQWAFXYmj+JtOTHr84iNrII4/QRlAAPPE+zqnKy4xJo7Ie1Y4kC7AdB+LxLxSTTzBMASsEcy0q8YyvQ=="
},
"node_modules/http-cache-semantics": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
@ -7097,7 +7184,6 @@
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
"dev": true,
"dependencies": {
"isobject": "^3.0.1"
},
@ -7109,7 +7195,6 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
@ -7450,7 +7535,6 @@
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
@ -8837,16 +8921,16 @@
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
},
"node_modules/next": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/next/-/next-11.1.0.tgz",
"integrity": "sha512-GHBk/c7Wyr6YbFRFZF37I0X7HKzkHHI8pur/loyXo5AIE8wdkbGPGO0ds3vNAO6f8AxZAKGCRYtAzoGlVLoifA==",
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/next/-/next-11.1.2.tgz",
"integrity": "sha512-azEYL0L+wFjv8lstLru3bgvrzPvK0P7/bz6B/4EJ9sYkXeW8r5Bjh78D/Ol7VOg0EIPz0CXoe72hzAlSAXo9hw==",
"dependencies": {
"@babel/runtime": "7.12.5",
"@babel/runtime": "7.15.3",
"@hapi/accept": "5.0.2",
"@next/env": "11.1.0",
"@next/polyfill-module": "11.1.0",
"@next/react-dev-overlay": "11.1.0",
"@next/react-refresh-utils": "11.1.0",
"@next/env": "11.1.2",
"@next/polyfill-module": "11.1.2",
"@next/react-dev-overlay": "11.1.2",
"@next/react-refresh-utils": "11.1.2",
"@node-rs/helper": "1.2.1",
"assert": "2.0.0",
"ast-types": "0.13.2",
@ -8884,11 +8968,11 @@
"stream-browserify": "3.0.0",
"stream-http": "3.1.1",
"string_decoder": "1.3.0",
"styled-jsx": "4.0.0",
"styled-jsx": "4.0.1",
"timers-browserify": "2.0.12",
"tty-browserify": "0.0.1",
"use-subscription": "1.5.1",
"util": "0.12.3",
"util": "0.12.4",
"vm-browserify": "1.1.2",
"watchpack": "2.1.1"
},
@ -8898,6 +8982,12 @@
"engines": {
"node": ">=12.0.0"
},
"optionalDependencies": {
"@next/swc-darwin-arm64": "11.1.2",
"@next/swc-darwin-x64": "11.1.2",
"@next/swc-linux-x64-gnu": "11.1.2",
"@next/swc-win32-x64-msvc": "11.1.2"
},
"peerDependencies": {
"fibers": ">= 3.1.0",
"node-sass": "^4.0.0 || ^5.0.0",
@ -8960,14 +9050,6 @@
"node": ">= 4.0.0"
}
},
"node_modules/next/node_modules/@babel/runtime": {
"version": "7.12.5",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz",
"integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==",
"dependencies": {
"regenerator-runtime": "^0.13.4"
}
},
"node_modules/next/node_modules/ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
@ -9368,7 +9450,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz",
"integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
@ -9959,7 +10040,6 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz",
"integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==",
"dev": true,
"dependencies": {
"node-modules-regexp": "^1.0.0"
},
@ -10965,6 +11045,11 @@
"node": ">= 4"
}
},
"node_modules/secure-json-parse": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.4.0.tgz",
"integrity": "sha512-Q5Z/97nbON5t/L/sH6mY2EacfjVGwrCcSi5D3btRO2GZ8pf1K1UN7Z9H5J57hjVU2Qzxr1xO+FmBhOvEkzCMmg=="
},
"node_modules/seedrandom": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
@ -11092,7 +11177,6 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
"integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==",
"dev": true,
"dependencies": {
"kind-of": "^6.0.2"
},
@ -11602,9 +11686,9 @@
"integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w=="
},
"node_modules/styled-jsx": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-4.0.0.tgz",
"integrity": "sha512-2USeoWMoJ/Lx5s2y1PxuvLy/cz2Yrr8cTySV3ILHU1Vmaw1bnV7suKdblLPjnyhMD+qzN7B1SWyh4UZTARn/WA==",
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-4.0.1.tgz",
"integrity": "sha512-Gcb49/dRB1k8B4hdK8vhW27Rlb2zujCk1fISrizCcToIs+55B4vmUM0N9Gi4nnVfFZWe55jRdWpAqH1ldAKWvQ==",
"dependencies": {
"@babel/plugin-syntax-jsx": "7.14.5",
"@babel/types": "7.15.0",
@ -11615,8 +11699,16 @@
"stylis": "3.5.4",
"stylis-rule-sheet": "0.0.10"
},
"engines": {
"node": ">= 12.0.0"
},
"peerDependencies": {
"react": ">= 16.8.0 || 17.x.x || 18.x.x"
},
"peerDependenciesMeta": {
"@babel/core": {
"optional": true
}
}
},
"node_modules/styled-jsx/node_modules/source-map": {
@ -12370,9 +12462,9 @@
}
},
"node_modules/util": {
"version": "0.12.3",
"resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz",
"integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==",
"version": "0.12.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz",
"integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==",
"dependencies": {
"inherits": "^2.0.3",
"is-arguments": "^1.0.4",
@ -14526,7 +14618,6 @@
"version": "7.15.3",
"resolved": "https://registry.npmjs.org/@babel/register/-/register-7.15.3.tgz",
"integrity": "sha512-mj4IY1ZJkorClxKTImccn4T81+UKTo4Ux0+OFSV9hME1ooqS9UV+pJ6BjD0qXPK4T3XW/KNa79XByjeEMZz+fw==",
"dev": true,
"requires": {
"clone-deep": "^4.0.1",
"find-cache-dir": "^2.0.0",
@ -14536,9 +14627,9 @@
}
},
"@babel/runtime": {
"version": "7.13.10",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz",
"integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==",
"version": "7.15.3",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz",
"integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
@ -14596,6 +14687,24 @@
"seedrandom": "^3.0.5"
}
},
"@elastic/elasticsearch": {
"version": "7.15.0",
"resolved": "https://registry.npmjs.org/@elastic/elasticsearch/-/elasticsearch-7.15.0.tgz",
"integrity": "sha512-FUKvjV2IKtIiWsvBy7D+wLbSEONsmNR15RRN7P/Sb30g4ObZRHH2qGOP5PPnzxdntEkzZ8HzY7nKKXFS+3Du1g==",
"requires": {
"debug": "^4.3.1",
"hpagent": "^0.1.1",
"ms": "^2.1.3",
"secure-json-parse": "^2.4.0"
},
"dependencies": {
"ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
}
}
},
"@emotion/babel-plugin": {
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.3.0.tgz",
@ -14943,19 +15052,19 @@
"integrity": "sha512-jDJTpta+P4p1NZTFVLHJ/TLFVYVcOqv6l8xwOeBKNPMgY/zDYH/YH7SJbvrr/h1RcS9GzbPcLKGzpuK9cV56UA=="
},
"@next/env": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@next/env/-/env-11.1.0.tgz",
"integrity": "sha512-zPJkMFRenSf7BLlVee8987G0qQXAhxy7k+Lb/5hLAGkPVHAHm+oFFeL+2ipbI2KTEFlazdmGY0M+AlLQn7pWaw=="
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/env/-/env-11.1.2.tgz",
"integrity": "sha512-+fteyVdQ7C/OoulfcF6vd1Yk0FEli4453gr8kSFbU8sKseNSizYq6df5MKz/AjwLptsxrUeIkgBdAzbziyJ3mA=="
},
"@next/polyfill-module": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@next/polyfill-module/-/polyfill-module-11.1.0.tgz",
"integrity": "sha512-64EgW8SzJRQls2yJ5DkuljRxgE24o2kYtX/ghTkPUJYsfidHMWzQGwg26IgRbb/uHqTd1G0W5UkKag+Nt8TWaQ=="
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/polyfill-module/-/polyfill-module-11.1.2.tgz",
"integrity": "sha512-xZmixqADM3xxtqBV0TpAwSFzWJP0MOQzRfzItHXf1LdQHWb0yofHHC+7eOrPFic8+ZGz5y7BdPkkgR1S25OymA=="
},
"@next/react-dev-overlay": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@next/react-dev-overlay/-/react-dev-overlay-11.1.0.tgz",
"integrity": "sha512-h+ry0sTk1W3mJw+TwEf91aqLbBJ5oqAsxfx+QryqEItNtfW6zLSSjxkyTYTqX8DkgSssQQutQfATkzBVgOR+qQ==",
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/react-dev-overlay/-/react-dev-overlay-11.1.2.tgz",
"integrity": "sha512-rDF/mGY2NC69mMg2vDqzVpCOlWqnwPUXB2zkARhvknUHyS6QJphPYv9ozoPJuoT/QBs49JJd9KWaAzVBvq920A==",
"requires": {
"@babel/code-frame": "7.12.11",
"anser": "1.4.9",
@ -14998,11 +15107,35 @@
}
},
"@next/react-refresh-utils": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@next/react-refresh-utils/-/react-refresh-utils-11.1.0.tgz",
"integrity": "sha512-g5DtFTpLTGa36iy9DuZawtJeitI11gysFGKPQQqy+mNbSFazguArcJ10gAYFlbqpIi4boUamWNI5mAoSPx3kog==",
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/react-refresh-utils/-/react-refresh-utils-11.1.2.tgz",
"integrity": "sha512-hsoJmPfhVqjZ8w4IFzoo8SyECVnN+8WMnImTbTKrRUHOVJcYMmKLL7xf7T0ft00tWwAl/3f3Q3poWIN2Ueql/Q==",
"requires": {}
},
"@next/swc-darwin-arm64": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-11.1.2.tgz",
"integrity": "sha512-hZuwOlGOwBZADA8EyDYyjx3+4JGIGjSHDHWrmpI7g5rFmQNltjlbaefAbiU5Kk7j3BUSDwt30quJRFv3nyJQ0w==",
"optional": true
},
"@next/swc-darwin-x64": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-11.1.2.tgz",
"integrity": "sha512-PGOp0E1GisU+EJJlsmJVGE+aPYD0Uh7zqgsrpD3F/Y3766Ptfbe1lEPPWnRDl+OzSSrSrX1lkyM/Jlmh5OwNvA==",
"optional": true
},
"@next/swc-linux-x64-gnu": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-11.1.2.tgz",
"integrity": "sha512-YcDHTJjn/8RqvyJVB6pvEKXihDcdrOwga3GfMv/QtVeLphTouY4BIcEUfrG5+26Nf37MP1ywN3RRl1TxpurAsQ==",
"optional": true
},
"@next/swc-win32-x64-msvc": {
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-11.1.2.tgz",
"integrity": "sha512-e/pIKVdB+tGQYa1cW3sAeHm8gzEri/HYLZHT4WZojrUxgWXqx8pk7S7Xs47uBcFTqBDRvK3EcQpPLf3XdVsDdg==",
"optional": true
},
"@node-rs/helper": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@node-rs/helper/-/helper-1.2.1.tgz",
@ -16718,7 +16851,6 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
"integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==",
"dev": true,
"requires": {
"is-plain-object": "^2.0.4",
"kind-of": "^6.0.2",
@ -18459,6 +18591,11 @@
"react-is": "^16.7.0"
}
},
"hpagent": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/hpagent/-/hpagent-0.1.2.tgz",
"integrity": "sha512-ePqFXHtSQWAFXYmj+JtOTHr84iNrII4/QRlAAPPE+zqnKy4xJo7Ie1Y4kC7AdB+LxLxSTTzBMASsEcy0q8YyvQ=="
},
"http-cache-semantics": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
@ -18819,7 +18956,6 @@
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
"dev": true,
"requires": {
"isobject": "^3.0.1"
},
@ -18827,8 +18963,7 @@
"isobject": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
"dev": true
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
}
}
},
@ -19094,8 +19229,7 @@
"kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
"dev": true
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
},
"knex": {
"version": "0.95.4",
@ -20172,16 +20306,20 @@
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
},
"next": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/next/-/next-11.1.0.tgz",
"integrity": "sha512-GHBk/c7Wyr6YbFRFZF37I0X7HKzkHHI8pur/loyXo5AIE8wdkbGPGO0ds3vNAO6f8AxZAKGCRYtAzoGlVLoifA==",
"version": "11.1.2",
"resolved": "https://registry.npmjs.org/next/-/next-11.1.2.tgz",
"integrity": "sha512-azEYL0L+wFjv8lstLru3bgvrzPvK0P7/bz6B/4EJ9sYkXeW8r5Bjh78D/Ol7VOg0EIPz0CXoe72hzAlSAXo9hw==",
"requires": {
"@babel/runtime": "7.12.5",
"@babel/runtime": "7.15.3",
"@hapi/accept": "5.0.2",
"@next/env": "11.1.0",
"@next/polyfill-module": "11.1.0",
"@next/react-dev-overlay": "11.1.0",
"@next/react-refresh-utils": "11.1.0",
"@next/env": "11.1.2",
"@next/polyfill-module": "11.1.2",
"@next/react-dev-overlay": "11.1.2",
"@next/react-refresh-utils": "11.1.2",
"@next/swc-darwin-arm64": "11.1.2",
"@next/swc-darwin-x64": "11.1.2",
"@next/swc-linux-x64-gnu": "11.1.2",
"@next/swc-win32-x64-msvc": "11.1.2",
"@node-rs/helper": "1.2.1",
"assert": "2.0.0",
"ast-types": "0.13.2",
@ -20219,23 +20357,15 @@
"stream-browserify": "3.0.0",
"stream-http": "3.1.1",
"string_decoder": "1.3.0",
"styled-jsx": "4.0.0",
"styled-jsx": "4.0.1",
"timers-browserify": "2.0.12",
"tty-browserify": "0.0.1",
"use-subscription": "1.5.1",
"util": "0.12.3",
"util": "0.12.4",
"vm-browserify": "1.1.2",
"watchpack": "2.1.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.12.5",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz",
"integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
@ -20609,8 +20739,7 @@
"node-modules-regexp": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz",
"integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=",
"dev": true
"integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA="
},
"node-releases": {
"version": "1.1.71",
@ -21039,7 +21168,6 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz",
"integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==",
"dev": true,
"requires": {
"node-modules-regexp": "^1.0.0"
}
@ -21821,6 +21949,11 @@
"ajv-keywords": "^3.1.0"
}
},
"secure-json-parse": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.4.0.tgz",
"integrity": "sha512-Q5Z/97nbON5t/L/sH6mY2EacfjVGwrCcSi5D3btRO2GZ8pf1K1UN7Z9H5J57hjVU2Qzxr1xO+FmBhOvEkzCMmg=="
},
"seedrandom": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
@ -21937,7 +22070,6 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
"integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==",
"dev": true,
"requires": {
"kind-of": "^6.0.2"
}
@ -22360,9 +22492,9 @@
}
},
"styled-jsx": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-4.0.0.tgz",
"integrity": "sha512-2USeoWMoJ/Lx5s2y1PxuvLy/cz2Yrr8cTySV3ILHU1Vmaw1bnV7suKdblLPjnyhMD+qzN7B1SWyh4UZTARn/WA==",
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-4.0.1.tgz",
"integrity": "sha512-Gcb49/dRB1k8B4hdK8vhW27Rlb2zujCk1fISrizCcToIs+55B4vmUM0N9Gi4nnVfFZWe55jRdWpAqH1ldAKWvQ==",
"requires": {
"@babel/plugin-syntax-jsx": "7.14.5",
"@babel/types": "7.15.0",
@ -22943,9 +23075,9 @@
}
},
"util": {
"version": "0.12.3",
"resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz",
"integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==",
"version": "0.12.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz",
"integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==",
"requires": {
"inherits": "^2.0.3",
"is-arguments": "^1.0.4",

View File

@ -34,6 +34,7 @@
"repository": "filecoin-project/slate",
"dependencies": {
"@babel/register": "^7.12.13",
"@elastic/elasticsearch": "^7.15.0",
"@emotion/babel-preset-css-prop": "11.2.0",
"@emotion/react": "11.1.5",
"@glif/filecoin-number": "^1.1.0-beta.17",