diff --git a/package.json b/package.json index 307d5166b2..2d66972d89 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,12 @@ "\\.(jpg|jpeg|png|ico|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/redisinsight/__mocks__/fileMock.js", "\\.(css|less|sass|scss)$": "identity-obj-proxy", "uiSrc/(.*)": "/redisinsight/ui/src/$1", - "monaco-editor": "/redisinsight/__mocks__/monacoMock.js" + "monaco-editor": "/redisinsight/__mocks__/monacoMock.js", + "unified": "/redisinsight/__mocks__/unified.js", + "remark-parse": "/redisinsight/__mocks__/remarkParse.js", + "remark-rehype": "/redisinsight/__mocks__/remarkRehype.js", + "rehype-stringify": "/redisinsight/__mocks__/rehypeStringify.js", + "unist-util-visit": "/redisinsight/__mocks__/unistUtilsVisit.js" }, "setupFilesAfterEnv": [ "/redisinsight/ui/src/setup-tests.ts" @@ -243,7 +248,12 @@ "react-redux": "^7.2.2", "react-jsx-parser": "^1.28.4", "react-router-dom": "^5.2.0", - "react-virtualized": "^9.22.2" + "react-virtualized": "^9.22.2", + "remark-parse": "^10.0.1", + "remark-rehype": "^10.0.1", + "rehype-stringify": "^9.0.2", + "unified": "^10.1.1", + "unist-util-visit": "^4.1.0" }, "devEngines": { "node": ">=14.x <16", diff --git a/redisinsight/__mocks__/rehypeStringify.js b/redisinsight/__mocks__/rehypeStringify.js new file mode 100644 index 0000000000..bbabe6d0d1 --- /dev/null +++ b/redisinsight/__mocks__/rehypeStringify.js @@ -0,0 +1 @@ +export default jest.fn() diff --git a/redisinsight/__mocks__/remarkParse.js b/redisinsight/__mocks__/remarkParse.js new file mode 100644 index 0000000000..bbabe6d0d1 --- /dev/null +++ b/redisinsight/__mocks__/remarkParse.js @@ -0,0 +1 @@ +export default jest.fn() diff --git a/redisinsight/__mocks__/remarkRehype.js b/redisinsight/__mocks__/remarkRehype.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/redisinsight/__mocks__/unified.js b/redisinsight/__mocks__/unified.js new file mode 100644 index 0000000000..127615fa42 --- /dev/null +++ b/redisinsight/__mocks__/unified.js @@ -0,0 +1 @@ +export const unified = jest.fn() diff --git a/redisinsight/__mocks__/unistUtilsVisit.js b/redisinsight/__mocks__/unistUtilsVisit.js new file mode 100644 index 0000000000..31557f85e7 --- /dev/null +++ b/redisinsight/__mocks__/unistUtilsVisit.js @@ -0,0 +1 @@ +export const visit = jest.fn(); diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/aggregation-with-apply.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/aggregation-with-apply.txt deleted file mode 100644 index 20e2c318f6..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/aggregation-with-apply.txt +++ /dev/null @@ -1,20 +0,0 @@ -// Perform an aggregation of your documents with an apply function: for each document construct an ID out of construction_value and building_type fields -// Note that you need to enclose the apply function within double quotes - -FT.AGGREGATE "permits" "*" - APPLY "format(\"%s-%s\", @construction_value, @building_type)" as ID - -// See the "permits" index schema for reference - -// FT.CREATE "permits" -// ON HASH -// PREFIX 1 "permit:" -// SCHEMA -// "permit_timestamp" NUMERIC SORTABLE -// "address_street" AS street TEXT NOSTEM -// "address_city" AS city TAG SORTABLE -// "description" TEXT -// "building_type" TEXT NOSTEM SORTABLE -// "work_type" TAG SEPARATOR ";" -// "construction_value" NUMERIC SORTABLE -// "location" GEO diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/combined-search-with-and.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/combined-search-with-and.txt deleted file mode 100644 index d4eba2f674..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/combined-search-with-and.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Perform a combined search on two fields (AND): query for intersection of both search terms. - -FT.SEARCH "permits" "@building_type:house @description:new" - -// See the "permits" index schema for reference - -// FT.CREATE "permits" -// ON HASH -// PREFIX 1 "permit:" -// SCHEMA -// "permit_timestamp" NUMERIC SORTABLE -// "address_street" AS street TEXT NOSTEM -// "address_city" AS city TAG SORTABLE -// "description" TEXT -// "building_type" TEXT NOSTEM SORTABLE -// "work_type" TAG SEPARATOR ";" -// "construction_value" NUMERIC SORTABLE -// "location" GEO diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/combined-search-with-geo-filter.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/combined-search-with-geo-filter.txt deleted file mode 100644 index ba189684ba..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/combined-search-with-geo-filter.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Perform a fuzzy text search and filter on location in a radius distance of 10 miles - -FT.SEARCH "permits" "%%hous%%" GEOFILTER location 37.11 -8.6 10 mi - -// See the "permits" index schema for reference - -// FT.CREATE "permits" -// ON HASH -// PREFIX 1 "permit:" -// SCHEMA -// "permit_timestamp" NUMERIC SORTABLE -// "address_street" AS street TEXT NOSTEM -// "address_city" AS city TAG SORTABLE -// "description" TEXT -// "building_type" TEXT NOSTEM SORTABLE -// "work_type" TAG SEPARATOR ";" -// "construction_value" NUMERIC SORTABLE -// "location" GEO diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/combined-search-with-or.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/combined-search-with-or.txt deleted file mode 100644 index b174f83d5f..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/combined-search-with-or.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Perform a combined search on two fields (OR): query for union of both search terms. The brackets are important. - -FT.SEARCH "permits" "(@city:{Lagos})|(@description:detached)" - -// See the "permits" index schema for reference - -// FT.CREATE "permits" -// ON HASH -// PREFIX 1 "permit:" -// SCHEMA -// "permit_timestamp" NUMERIC SORTABLE -// "address_street" AS street TEXT NOSTEM -// "address_city" AS city TAG SORTABLE -// "description" TEXT -// "building_type" TEXT NOSTEM SORTABLE -// "work_type" TAG SEPARATOR ";" -// "construction_value" NUMERIC SORTABLE -// "location" GEO diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/create-hash-index.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/create-hash-index.txt deleted file mode 100644 index 3a9a3e4c02..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/create-hash-index.txt +++ /dev/null @@ -1,14 +0,0 @@ -// Command to create an index on hash keys that are prefixed with "permit:" -// Note that it is possible to index either every hash or every JSON document in the keyspace or configure indexing only for a subset of the same data type documents described by a prefix. -FT.CREATE "permits" // Index name - ON HASH // Indicates the type of data to index - PREFIX 1 "permit:" // Tells the index which keys it should index - SCHEMA - "permit_timestamp" NUMERIC SORTABLE // Will be indexed as a numeric field. Will permit sorting during query. - "address_street" AS street TEXT NOSTEM // 'address_street' field will be indexed as TEXT and can be referred as 'street' due to the '... AS fieldname ...' construct. Stemming is disabled - which is ideal for proper names. - "address_city" AS city TAG SORTABLE // Will be indexed as a tag. Will allow exact-match queries. - "description" TEXT - "building_type" TEXT NOSTEM SORTABLE - "work_type" TAG SEPARATOR ";" // For TAG fields, a separator indicates how the text contained in the field is to be split into individual tags - "construction_value" NUMERIC SORTABLE - "location" GEO // Will be indexed as GEO. Will allow geographic range queries diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/crud-create.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/crud-create.txt deleted file mode 100644 index 5f33d3ebf4..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/crud-create.txt +++ /dev/null @@ -1,8 +0,0 @@ -// Let's add three documents as Hashes. -// Each document represents a building permit. - -HSET permit:1 "description" "To reconstruct a single detached house with a front covered veranda." "construction_value" 42000 "building_type" "single detached house" "address_city" "Lisbon" "work_type" "demolition,reconstruction" "permit_timestamp" "1602156878" "address_street" "R. Da Palma" "location" "38.717746, -9.135839" - -HSET permit:2 "description" "To construct a loft" "construction_value" 53000 "building_type" "apartment" "address_city" "Porto" "work_type" "construction" "permit_timestamp" "1556546400" "address_street" "Rua da Boavista" "location" "41.155854, -8.616721" - -HSET permit:3 "description" "New house build" "construction_value" 260000 "building_type" "house" "address_city" "Lagos" "work_type" "construction;design" "permit_timestamp" "1612947600" "address_street" "R. Antonio Gedeao" "location" "37.114864, -8.668521" diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/crud-delete.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/crud-delete.txt deleted file mode 100644 index 19dc96f88b..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/crud-delete.txt +++ /dev/null @@ -1,9 +0,0 @@ -HGET permit:2 construction_value // Read the construction_value field before deletion - -HDEL permit:2 construction_value // Delete only the construction_value field from the document - -HGETALL permit:2 // Read the whole document to confirm the construction_value field has been deleted - -DEL permit:2 // Delete the entire document - -HGETALL permit:2 // Confirm the entire document has been deleted diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/crud-read.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/crud-read.txt deleted file mode 100644 index 9ee2e821cb..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/crud-read.txt +++ /dev/null @@ -1,3 +0,0 @@ -HGETALL permit:1 // Read the whole document - -HGET permit:1 description // Read only the field description diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/crud-update.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/crud-update.txt deleted file mode 100644 index fb6a5746b5..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/crud-update.txt +++ /dev/null @@ -1,5 +0,0 @@ -HGET permit:1 construction_value // Read the construction_value field before the update - -HSET permit:1 "construction_value" 36000 // Update the construction_value field - -HGET permit:1 construction_value // Read the construction_value field after the update diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/exact-text-search.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/exact-text-search.txt deleted file mode 100644 index a2dd648fd5..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/exact-text-search.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Perform a text search on all text fields: query for documents inside which the word 'veranda' occurs - -FT.SEARCH "permits" "veranda" - -// See the "permits" index schema for reference - -// FT.CREATE "permits" -// ON HASH -// PREFIX 1 "permit:" -// SCHEMA -// "permit_timestamp" NUMERIC SORTABLE -// "address_street" AS street TEXT NOSTEM -// "address_city" AS city TAG SORTABLE -// "description" TEXT -// "building_type" TEXT NOSTEM SORTABLE -// "work_type" TAG SEPARATOR ";" -// "construction_value" NUMERIC SORTABLE -// "location" GEO diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/field-specific-text-search.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/field-specific-text-search.txt deleted file mode 100644 index 001bd5cb11..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/field-specific-text-search.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Perform a text search on a specific field: query for documents which have a field 'building_type' inside which the word 'detached' occurs - -FT.SEARCH "permits" "@building_type:detached" - -// See the "permits" index schema for reference - -// FT.CREATE "permits" -// ON HASH -// PREFIX 1 "permit:" -// SCHEMA -// "permit_timestamp" NUMERIC SORTABLE -// "address_street" AS street TEXT NOSTEM -// "address_city" AS city TAG SORTABLE -// "description" TEXT -// "building_type" TEXT NOSTEM SORTABLE -// "work_type" TAG SEPARATOR ";" -// "construction_value" NUMERIC SORTABLE -// "location" GEO diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/fuzzy-text-search.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/fuzzy-text-search.txt deleted file mode 100644 index 48aa508ca3..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/fuzzy-text-search.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Perform a Fuzzy text search on all text fields: query for documents with words similar to 'haus'. The number of % indicates the allowed Levenshtein distance. So the query would also match on 'house' because 'haus' and 'house' have a distance of two. - -FT.SEARCH "permits" "%%haus%%" - -// See the "permits" index schema for reference - -// FT.CREATE "permits" -// ON HASH -// PREFIX 1 "permit:" -// SCHEMA -// "permit_timestamp" NUMERIC SORTABLE -// "address_street" AS street TEXT NOSTEM -// "address_city" AS city TAG SORTABLE -// "description" TEXT -// "building_type" TEXT NOSTEM SORTABLE -// "work_type" TAG SEPARATOR ";" -// "construction_value" NUMERIC SORTABLE -// "location" GEO diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/group-and-sort-by-aggregation.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/group-and-sort-by-aggregation.txt deleted file mode 100644 index 29f2717317..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/group-and-sort-by-aggregation.txt +++ /dev/null @@ -1,24 +0,0 @@ -// Aggregations are a way to process the results of a search query, group, sort and transform them - and extract analytic insights from them. -// Aggregations are represented as the following data processing pipeline: -// Filter -> Group (Reduce) -> Apply -> Sort -> Apply - -// Perform a Group By & Sort By aggregation of your documents: display the number of permits by city and then sort the city alphabetically - -FT.AGGREGATE "permits" "*" - GROUPBY 1 @city REDUCE COUNT 0 AS nb_of_permits - SORTBY 2 @city Asc - -// See the "permits" index schema for reference - -// FT.CREATE "permits" -// ON HASH -// PREFIX 1 "permit:" -// SCHEMA -// "permit_timestamp" NUMERIC SORTABLE -// "address_street" AS street TEXT NOSTEM -// "address_city" AS city TAG SORTABLE -// "description" TEXT -// "building_type" TEXT NOSTEM SORTABLE -// "work_type" TAG SEPARATOR ";" -// "construction_value" NUMERIC SORTABLE -// "location" GEO diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/index-info.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/index-info.txt deleted file mode 100644 index 33e506fe4d..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/index-info.txt +++ /dev/null @@ -1,4 +0,0 @@ -// Command to display information about a particular index. -// In this case display the information about the newly created "permits" index - -FT.INFO "permits" diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/list-all-indexes.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/list-all-indexes.txt deleted file mode 100644 index 01a7b83a5b..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/list-all-indexes.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Command to return the list of all existing indexes - -FT._LIST diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/multiple-tags-and-search.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/multiple-tags-and-search.txt deleted file mode 100644 index c5825ed3c8..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/multiple-tags-and-search.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Perform a search for documents that all of the tags (AND condition) - -FT.SEARCH "permits" "@work_type:{construction} @work_type:{design}" - -// See the "permits" index schema for reference - -// FT.CREATE "permits" -// ON HASH -// PREFIX 1 "permit:" -// SCHEMA -// "permit_timestamp" NUMERIC SORTABLE -// "address_street" AS street TEXT NOSTEM -// "address_city" AS city TAG SORTABLE -// "description" TEXT -// "building_type" TEXT NOSTEM SORTABLE -// "work_type" TAG SEPARATOR ";" -// "construction_value" NUMERIC SORTABLE -// "location" GEO diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/multiple-tags-or-search.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/multiple-tags-or-search.txt deleted file mode 100644 index 4644cc619f..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/multiple-tags-or-search.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Perform a search for documents that have one of multiple tags (OR condition) - -FT.SEARCH "permits" "@work_type:{construction|design}" - -// See the "permits" index schema for reference - -// FT.CREATE "permits" -// ON HASH -// PREFIX 1 "permit:" -// SCHEMA -// "permit_timestamp" NUMERIC SORTABLE -// "address_street" AS street TEXT NOSTEM -// "address_city" AS city TAG SORTABLE -// "description" TEXT -// "building_type" TEXT NOSTEM SORTABLE -// "work_type" TAG SEPARATOR ";" -// "construction_value" NUMERIC SORTABLE -// "location" GEO diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/numeric-range-query.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/numeric-range-query.txt deleted file mode 100644 index 9f9ab8a443..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/numeric-range-query.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Perform a numeric range query: query for every document that has a construction value between 20000 and 36000 -// To reference a field, use @ construct -// For numerical ranges, square brackets are inclusive of the listed values - -FT.SEARCH "permits" "@construction_value:[20000,36000]" - -// See the "permits" index schema for reference -// FT.CREATE "permits" -// ON HASH -// PREFIX 1 "permit:" -// SCHEMA -// "permit_timestamp" NUMERIC SORTABLE -// "address_street" AS street TEXT NOSTEM -// "address_city" AS city TAG SORTABLE -// "description" TEXT -// "building_type" TEXT NOSTEM SORTABLE -// "work_type" TAG SEPARATOR ";" -// "construction_value" NUMERIC SORTABLE -// "location" GEO diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/tag-search.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/tag-search.txt deleted file mode 100644 index 01cf593011..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-hashes/tag-search.txt +++ /dev/null @@ -1,18 +0,0 @@ -// Perform a tag search: query for documents which have the address_city field set to "Lisbon". Note that we use curly braces around the tag. Also note that even though the field is called address_city in the hash, we can query it as city. That's because in the schema definition we used the ... AS fieldname ... construct, which allowed us to index address_city as city. - -FT.SEARCH "permits" "@city:{Lisbon}" - -// See the "permits" index schema for reference - -// FT.CREATE "permits" -// ON HASH -// PREFIX 1 "permit:" -// SCHEMA -// "permit_timestamp" NUMERIC SORTABLE -// "address_street" AS street TEXT NOSTEM -// "address_city" AS city TAG SORTABLE -// "description" TEXT -// "building_type" TEXT NOSTEM SORTABLE -// "work_type" TAG SEPARATOR ";" -// "construction_value" NUMERIC SORTABLE -// "location" GEO diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/combined-search-with-and.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/combined-search-with-and.txt deleted file mode 100644 index e72baa6c0e..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/combined-search-with-and.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Perform a combined search on two fields (AND): query for intersection of both search terms, a text search and a tag match - -FT.SEARCH "schools" "@description:girls @status:{closed}" - -// See the "schools" index schema for reference - -// FT.CREATE schools -// on JSON -// PREFIX 1 "school:" -// SCHEMA -// $.name AS name TEXT NOSTEM SORTABLE -// $.description AS description TEXT -// $.school_type AS school_type TAG SEPARATOR ";" -// $.class AS class TAG -// $.address.street AS address TEXT NOSTEM -// $.address.city AS city TAG -// $.pupils AS pupils NUMERIC SORTABLE -// $.location AS location GEO -// $.status_log.[-1] as status TAG diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/combined-search-with-geo-filter.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/combined-search-with-geo-filter.txt deleted file mode 100644 index 83ec2b9109..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/combined-search-with-geo-filter.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Perform a fuzzy text search and filter on location in a radius distance of 10 miles - -FT.SEARCH "schools" "%%gill%%" GEOFILTER location 51.11 0.45 10 mi - -// See the "schools" index schema for reference - -// FT.CREATE schools -// on JSON -// PREFIX 1 "school:" -// SCHEMA -// $.name AS name TEXT NOSTEM SORTABLE -// $.description AS description TEXT -// $.school_type AS school_type TAG SEPARATOR ";" -// $.class AS class TAG -// $.address.street AS address TEXT NOSTEM -// $.address.city AS city TAG -// $.pupils AS pupils NUMERIC SORTABLE -// $.location AS location GEO -// $.status_log.[-1] as status TAG diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/combined-search-with-or.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/combined-search-with-or.txt deleted file mode 100644 index fa28f448e0..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/combined-search-with-or.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Perform a combined search on two fields (OR): query for union of both search terms. The brackets are important. - -FT.SEARCH "schools" "(@city:{Oxford})|(@description:girls)" - -// See the "schools" index schema for reference - -// FT.CREATE schools -// on JSON -// PREFIX 1 "school:" -// SCHEMA -// $.name AS name TEXT NOSTEM SORTABLE -// $.description AS description TEXT -// $.school_type AS school_type TAG SEPARATOR ";" -// $.class AS class TAG -// $.address.street AS address TEXT NOSTEM -// $.address.city AS city TAG -// $.pupils AS pupils NUMERIC SORTABLE -// $.location AS location GEO -// $.status_log.[-1] as status TAG diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/create-json-index.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/create-json-index.txt deleted file mode 100644 index aa4972fce4..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/create-json-index.txt +++ /dev/null @@ -1,24 +0,0 @@ -// It is possible to index either every hash or every JSON document in the keyspace or configure indexing only for a subset of the same data type documents described by a prefix. - -// RedisJSON supports JSONPath, so we can easily access and index nested properties and array elements. -// Note that you cannot index values that contain JSON objects or JSON arrays. To be indexed, a JSONPath expression must return a single scalar value (string or number). If the JSONPath expression returns an object or an array, it will be ignored. - -// JSON Strings can only be indexed as TEXT, TAG and GEO (using the right syntax). -// JSON numbers can only be indexed as NUMERIC. -// Boolean and NULL values are ignored. - -// Command to create an index on JSON keys that are prefixed with "school:" - -FT.CREATE schools // Index name - on JSON // Indicates the type of data to index - PREFIX 1 "school:" // Tells the index which keys it should index - SCHEMA - $.name AS name TEXT NOSTEM SORTABLE // Will be indexed as a TEXT field. Will permit sorting during query. Stemming is disabled - which is ideal for proper names. - $.description AS description TEXT - $.school_type AS school_type TAG SEPARATOR ";" // For tag fields, a separator indicates how the text contained in the field is to be split into individual tags - $.class AS class TAG // Will be indexed as a tag. Will allow exact-match queries. - $.address.street AS address TEXT NOSTEM // '$.address.street' field will be indexed as TEXT and can be referred as 'street' due to the '... AS fieldname ...' construct. - $.address.city AS city TAG - $.pupils AS pupils NUMERIC SORTABLE // Will be indexed as a numeric field. Will permit sorting during query - $.location AS location GEO // Will be indexed as GEO. Will allow geographic range queries - $.status_log.[-1] as status TAG // Will index the last element of the array as "status" diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/crud-create.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/crud-create.txt deleted file mode 100644 index 5904384541..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/crud-create.txt +++ /dev/null @@ -1,11 +0,0 @@ -// Let's add four documents as JSON to the index. Note the format of the key names. -// Each document represents a school. - -JSON.SET school:1 . '{"name":"Hall School", "description":"Independent primary school for boys aged 5 to 11","school_type":"single;boys","class":"independent", "address":{"city":"London", "street":"Manor Street"}, "pupils":342, "location":"51.445417, -0.258352", "status_log":["new", "operating"]}' - -JSON.SET school:2 . '{"name":"Garden School", "description":"State school for boys and girls aged 5 to 18","school_type":"mixed;boys;girls","class":"state", "address":{"city":"London", "street":"Gordon Street"}, "pupils":1452, "location":"51.402926, -0.321523", "status_log":["new", "operating"]}' - -JSON.SET school:3 . '{"name":"Gillford School", "description":"Independent school for girls aged 5 to 18","school_type":"single;girls","class":"private", "address":{"city":"Goudhurst", "street":"Goudhurst"}, "pupils":721, "location":"51.112685, 0.451076", "status_log":["new", "operating", "closed"]}' - -JSON.SET school:4 . '{"name":"Old Boys School", "description":"Independent school for boys aged 5 to 18","school_type":"single;boys","class":"independent", "address":{"city":"Oxford", "street":"Trident Street"}, "pupils":1200, "location":"51.781756, -1.123196", "status_log":["new", "operating"]}' - diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/crud-delete.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/crud-delete.txt deleted file mode 100644 index 68970feb23..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/crud-delete.txt +++ /dev/null @@ -1,9 +0,0 @@ -JSON.GET school:1 $.pupils // Read the pupils field before deletion - -JSON.DEL school:1 $.pupils // Delete only the pupils field from the document - -JSON.GET school:1 // Read the whole document to confirm the construction_value field has been deleted - -JSON.DEL school:1 // Delete the entire document - -JSON.GET school:1 // Confirm the entire document has been deleted diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/crud-read.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/crud-read.txt deleted file mode 100644 index 9af0845a6c..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/crud-read.txt +++ /dev/null @@ -1,5 +0,0 @@ -JSON.GET school:1 // Read the whole document - -// RedisJSON supports JSONPath, so we can easily access nested properties using $. construct - -JSON.GET school:1 $.description // Read only the field description diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/crud-update.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/crud-update.txt deleted file mode 100644 index b9cb1e0f19..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/crud-update.txt +++ /dev/null @@ -1,5 +0,0 @@ -JSON.GET school:1 $.pupils // Read the pupils field before the update - -JSON.SET school:1 $.pupils 430 // Update the pupils field - -JSON.GET school:1 $.pupils // Read the pupils field after the update diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/exact-text-search.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/exact-text-search.txt deleted file mode 100644 index 64d41fabeb..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/exact-text-search.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Perform a text search on all text fields: query for documents inside which the word 'girls' occurs - -FT.SEARCH "schools" "girls" - -// See the "schools" index schema for reference - -// FT.CREATE schools -// on JSON -// PREFIX 1 "school:" -// SCHEMA -// $.name AS name TEXT NOSTEM SORTABLE -// $.description AS description TEXT -// $.school_type AS school_type TAG SEPARATOR ";" -// $.class AS class TAG -// $.address.street AS address TEXT NOSTEM -// $.address.city AS city TAG -// $.pupils AS pupils NUMERIC SORTABLE -// $.location AS location GEO -// $.status_log.[-1] as status TAG diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/field-specific-text-search.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/field-specific-text-search.txt deleted file mode 100644 index a30dae9d82..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/field-specific-text-search.txt +++ /dev/null @@ -1,20 +0,0 @@ -// Perform a text search on a specific field: query for documents which have a field 'name' inside which the word 'old' occurs -// To reference a field, use @ construct - -FT.SEARCH "schools" "@name:old" - -// See the "schools" index schema for reference - -// FT.CREATE schools -// on JSON -// PREFIX 1 "school:" -// SCHEMA -// $.name AS name TEXT NOSTEM SORTABLE -// $.description AS description TEXT -// $.school_type AS school_type TAG SEPARATOR ";" -// $.class AS class TAG -// $.address.street AS address TEXT NOSTEM -// $.address.city AS city TAG -// $.pupils AS pupils NUMERIC SORTABLE -// $.location AS location GEO -// $.status_log.[-1] as status TAG diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/fuzzy-text-search.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/fuzzy-text-search.txt deleted file mode 100644 index 5b3b140140..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/fuzzy-text-search.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Perform a Fuzzy text search on all text fields: query for documents with words similar to 'gill'. The number of % indicates the allowed Levenshtein distance. So the query would also match on 'girl' because 'gill' and 'girl' have a distance of two. - -FT.SEARCH "schools" "%%gill%%" - -// See the "schools" index schema for reference - -// FT.CREATE schools -// on JSON -// PREFIX 1 "school:" -// SCHEMA -// $.name AS name TEXT NOSTEM SORTABLE -// $.description AS description TEXT -// $.school_type AS school_type TAG SEPARATOR ";" -// $.class AS class TAG -// $.address.street AS address TEXT NOSTEM -// $.address.city AS city TAG -// $.pupils AS pupils NUMERIC SORTABLE -// $.location AS location GEO -// $.status_log.[-1] as status TAG diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/group-and-sort-by-aggregation.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/group-and-sort-by-aggregation.txt deleted file mode 100644 index 80cbfa4f90..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/group-and-sort-by-aggregation.txt +++ /dev/null @@ -1,25 +0,0 @@ -// Aggregations are a way to process the results of a search query, group, sort and transform them - and extract analytic insights from them. -// Aggregations are represented as the following data processing pipeline: -// Filter -> Group (Reduce) -> Apply -> Sort -> Apply - -// Perform a Group By & Sort By aggregation of your documents: display the number of permits by city and then sort the city alphabetically - -FT.AGGREGATE "schools" "*" - GROUPBY 1 @city REDUCE COUNT 0 AS nb_of_schools - SORTBY 2 @city Asc - -// See the "schools" index schema for reference - -// FT.CREATE schools -// on JSON -// PREFIX 1 "school:" -// SCHEMA -// $.name AS name TEXT NOSTEM SORTABLE -// $.description AS description TEXT -// $.school_type AS school_type TAG SEPARATOR ";" -// $.class AS class TAG -// $.address.street AS address TEXT NOSTEM -// $.address.city AS city TAG -// $.pupils AS pupils NUMERIC SORTABLE -// $.location AS location GEO -// $.status_log.[-1] as status TAG diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/index-info.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/index-info.txt deleted file mode 100644 index 40ab37462a..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/index-info.txt +++ /dev/null @@ -1,5 +0,0 @@ -// Command to display information about a particular index. -// In this case display the information about the newly created "schools" index - -FT.INFO "schools" - diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/list-all-indexes.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/list-all-indexes.txt deleted file mode 100644 index 01a7b83a5b..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/list-all-indexes.txt +++ /dev/null @@ -1,3 +0,0 @@ -// Command to return the list of all existing indexes - -FT._LIST diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/multiple-tags-and-search.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/multiple-tags-and-search.txt deleted file mode 100644 index 3cfb18f581..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/multiple-tags-and-search.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Perform a search for documents that all of the tags (AND condition) - -FT.SEARCH "schools" "@school_type:{single} @school_type:{girls}" - -// See the "schools" index schema for reference - -// FT.CREATE schools -// on JSON -// PREFIX 1 "school:" -// SCHEMA -// $.name AS name TEXT NOSTEM SORTABLE -// $.description AS description TEXT -// $.school_type AS school_type TAG SEPARATOR ";" -// $.class AS class TAG -// $.address.street AS address TEXT NOSTEM -// $.address.city AS city TAG -// $.pupils AS pupils NUMERIC SORTABLE -// $.location AS location GEO -// $.status_log.[-1] as status TAG diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/multiple-tags-or-search.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/multiple-tags-or-search.txt deleted file mode 100644 index 2713ed5863..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/multiple-tags-or-search.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Perform a search for documents that have one of multiple tags (OR condition) - -FT.SEARCH "schools" "@school_type:{single|girls}" - -// See the "schools" index schema for reference - -// FT.CREATE schools -// on JSON -// PREFIX 1 "school:" -// SCHEMA -// $.name AS name TEXT NOSTEM SORTABLE -// $.description AS description TEXT -// $.school_type AS school_type TAG SEPARATOR ";" -// $.class AS class TAG -// $.address.street AS address TEXT NOSTEM -// $.address.city AS city TAG -// $.pupils AS pupils NUMERIC SORTABLE -// $.location AS location GEO -// $.status_log.[-1] as status TAG diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/numeric-range-query.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/numeric-range-query.txt deleted file mode 100644 index 91dfb9725d..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/numeric-range-query.txt +++ /dev/null @@ -1,21 +0,0 @@ -// Perform a numeric range query: query for every document that has a 'pupils' value between 0 and 1000 -// For numerical ranges, square brackets are inclusive of the listed values - -FT.SEARCH "schools" "@pupils:[0,1000]" - - -// See the "schools" index schema for reference - -// FT.CREATE schools -// on JSON -// PREFIX 1 "school:" -// SCHEMA -// $.name AS name TEXT NOSTEM SORTABLE -// $.description AS description TEXT -// $.school_type AS school_type TAG SEPARATOR ";" -// $.class AS class TAG -// $.address.street AS address TEXT NOSTEM -// $.address.city AS city TAG -// $.pupils AS pupils NUMERIC SORTABLE -// $.location AS location GEO -// $.status_log.[-1] as status TAG diff --git a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/tag-search.txt b/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/tag-search.txt deleted file mode 100644 index bb1abaf392..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/_scripts/document/working-with-json/tag-search.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Perform a tag search: query for documents which have the city field set to "London". Note that we use curly braces around the tag. - -FT.SEARCH "schools" "@city:{Oxford}" - -// See the "schools" index schema for reference - -// FT.CREATE schools -// on JSON -// PREFIX 1 "school:" -// SCHEMA -// $.name AS name TEXT NOSTEM SORTABLE -// $.description AS description TEXT -// $.school_type AS school_type TAG SEPARATOR ";" -// $.class AS class TAG -// $.address.street AS address TEXT NOSTEM -// $.address.city AS city TAG -// $.pupils AS pupils NUMERIC SORTABLE -// $.location AS location GEO -// diff --git a/redisinsight/ui/src/packages/enablement-area/enablement-area.json b/redisinsight/ui/src/packages/enablement-area/enablement-area.json index cc1aafbb5b..572166ee1a 100644 --- a/redisinsight/ui/src/packages/enablement-area/enablement-area.json +++ b/redisinsight/ui/src/packages/enablement-area/enablement-area.json @@ -21,7 +21,7 @@ "id": "introduction", "label": "Introduction", "args": { - "path": "/static/workbench/quick-guides/document/introduction.html" + "path": "/static/workbench/quick-guides/document/introduction.md" } }, "working-with-hashes": { @@ -29,7 +29,7 @@ "id": "working-with-hashes", "label": "Working with Hashes", "args": { - "path": "/static/workbench/quick-guides/document/working-with-hashes.html" + "path": "/static/workbench/quick-guides/document/working-with-hashes.md" } }, "working-with-json": { @@ -37,7 +37,7 @@ "id": "working-with-json", "label": "Working with JSON", "args": { - "path": "/static/workbench/quick-guides/document/working-with-json.html" + "path": "/static/workbench/quick-guides/document/working-with-json.md" } }, "learn-more": { @@ -45,7 +45,7 @@ "id": "learn-more", "label": "Learn More", "args": { - "path": "/static/workbench/quick-guides/document/learn-more.html" + "path": "/static/workbench/quick-guides/document/learn-more.md" } } } diff --git a/redisinsight/ui/src/packages/enablement-area/quick-guides/document/introduction.html b/redisinsight/ui/src/packages/enablement-area/quick-guides/document/introduction.html deleted file mode 100644 index 25f6334d8f..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/quick-guides/document/introduction.html +++ /dev/null @@ -1,70 +0,0 @@ -
-
-
- In Redis, you can model documents using: - -
-
- Hashes: -
    -
  • Best for representing rows in a relational database table
  • -
  • Schemaless collections of flat field-value pairs
  • -
  • Support CRUD operation on field-value pairs at any time, not just initial declaration
  • -
-
-
- JSON: -
    -
  • Best for representing documents in a document store
  • -
  • Full support of the JSON format with nested objects and nested arrays
  • -
  • Supports JSONPath -like syntax for selecting elements inside
  • -
  • Supports atomic CRUD operations
  • -
-
-

Full-text search and querying is supported for both Hashes and JSON via a secondary index.

-
- A number of data types are available for indexing: -
    -
  • Full-text index with support of different languages, fuzzy, and phonetic
  • -
  • Numeric range index
  • -
  • Tag index supporting multiple values
  • -
  • Geo index
  • -
  • Vector index (upcoming)
  • -
-
-
- Querying supports the following: -
    -
  • Multiple fields queries
  • -
  • Complex boolean queries with AND, OR, NOT operators between sub-queries
  • -
  • Optional terms, fuzzy matching, prefix queries, clauses
  • -
  • Projection of full document or just part of it
  • -
  • Aggregations
  • -
-
-
- What you will learn for both Hashes and JSON: -
    -
  • CRUD operations
  • -
  • Search and Querying
  • -
-
-
-

PRE-REQUISITES

-

- Follow these instructions to set up the RedisJSON and RediSearch modules on Redis OSS. -
-
- For working with Hashes you will need Redis >=6, RediSearch >=2.0. -
-
- For working with JSON you will need Redis >=6, RediSearch >=2.2 and RedisJSON >=2.0. -
-
- You could also create a free and ready to use instance on Redis Cloud. -

-
-
diff --git a/redisinsight/ui/src/packages/enablement-area/quick-guides/document/introduction.md b/redisinsight/ui/src/packages/enablement-area/quick-guides/document/introduction.md new file mode 100644 index 0000000000..eed5ad93d4 --- /dev/null +++ b/redisinsight/ui/src/packages/enablement-area/quick-guides/document/introduction.md @@ -0,0 +1,25 @@ +**In Redis, you can model documents using:** +* [Hashes](https://redis.io/topics/data-types#hashes) +* [JSON](https://oss.redis.com/redisjson/) + +**Hashes:** +* Best for representing rows in a relational database table +* Schemaless collections of flat field-value pairs +* Support CRUD operation on field-value pairs at any time, not just initial declaration + +**JSON:** +* Best for representing documents in a document store +* Full support of the JSON format with nested objects and nested arrays +* Supports [JSONPath](http://goessner.net/articles/JsonPath/) -like syntax for selecting elements inside +* Supports atomic CRUD operations + +*** +### PRE-REQUISITES + +Follow these instructions to set up the RedisJSON and RediSearch modules on Redis OSS.\ +\ +For working with Hashes you will need Redis {">"}=6, [RediSearch](https://oss.redis.com/redisearch/) {">"}=2.0.\ +\ +For working with JSON you will need Redis {">"}=6, [RediSearch](https://oss.redis.com/redisearch/) {">"}=2.2 and [RedisJSON](https://oss.redis.com/redisjson/) {">"}=2.0.\ +\ +You could also create a free and ready to use instance on [Redis Cloud](https://redis.com/try-free/?utm_source=redis\&utm_medium=app\&utm_campaign=redisinsight_doc_guide). diff --git a/redisinsight/ui/src/packages/enablement-area/quick-guides/document/learn-more.html b/redisinsight/ui/src/packages/enablement-area/quick-guides/document/learn-more.html deleted file mode 100644 index e052e84ffb..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/quick-guides/document/learn-more.html +++ /dev/null @@ -1,40 +0,0 @@ - diff --git a/redisinsight/ui/src/packages/enablement-area/quick-guides/document/learn-more.md b/redisinsight/ui/src/packages/enablement-area/quick-guides/document/learn-more.md new file mode 100644 index 0000000000..451ac4b36d --- /dev/null +++ b/redisinsight/ui/src/packages/enablement-area/quick-guides/document/learn-more.md @@ -0,0 +1,12 @@ +### Documentation +* [Hashes](https://redis.io/topics/data-types#hashes) +* [RediSearch](https://oss.redis.com/redisearch/) +* [RedisJSON](https://oss.redis.com/redisjson/) + +### Blogs +* [RedisJSON: Public Preview & Performance Benchmarking](https://redis.com/blog/redisjson-public-preview-performance-benchmarking/) +* [Indexing, Querying, and Full-Text Search of JSON Documents with Redis](https://redis.com/blog/index-and-query-json-docs-with-redis/) + +### Tutorials +* [RedisJSON tutorial](https://developer.redis.com/howtos/redisjson/) +* [More on Redis University](https://university.redis.com/) diff --git a/redisinsight/ui/src/packages/enablement-area/quick-guides/document/working-with-hashes.html b/redisinsight/ui/src/packages/enablement-area/quick-guides/document/working-with-hashes.html deleted file mode 100644 index fbe1b031b8..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/quick-guides/document/working-with-hashes.html +++ /dev/null @@ -1,136 +0,0 @@ -
-
-

Click on the button, see the command and the comments in the Workbench editor, and then run it.

-
    -
  1. - - CRUD operations -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
  2. -
  3. - - Secondary Index -
    - -
    -
    - -
    -
    - -
    -
    -
  4. -
  5. - - Search and Querying Basics -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
  6. -
-
-
diff --git a/redisinsight/ui/src/packages/enablement-area/quick-guides/document/working-with-hashes.md b/redisinsight/ui/src/packages/enablement-area/quick-guides/document/working-with-hashes.md new file mode 100644 index 0000000000..d8640572fa --- /dev/null +++ b/redisinsight/ui/src/packages/enablement-area/quick-guides/document/working-with-hashes.md @@ -0,0 +1,335 @@ +Click on the button, see the command and the comments in the Workbench editor, and then run it. + +1. CRUD operations + + ```redis Create + // Let's add three documents as Hashes. + // Each document represents a building permit. + + HSET permit:1 "description" "To reconstruct a single detached house with a front covered veranda." "construction_value" 42000 "building_type" "single detached house" "address_city" "Lisbon" "work_type" "demolition,reconstruction" "permit_timestamp" "1602156878" "address_street" "R. Da Palma" "location" "38.717746, -9.135839" + + HSET permit:2 "description" "To construct a loft" "construction_value" 53000 "building_type" "apartment" "address_city" "Porto" "work_type" "construction" "permit_timestamp" "1556546400" "address_street" "Rua da Boavista" "location" "41.155854, -8.616721" + + HSET permit:3 "description" "New house build" "construction_value" 260000 "building_type" "house" "address_city" "Lagos" "work_type" "construction;design" "permit_timestamp" "1612947600" "address_street" "R. Antonio Gedeao" "location" "37.114864, -8.668521" + + ``` + ```redis Read + HGETALL permit:1 // Read the whole document + + HGET permit:1 description // Read only the field description + + ``` + ```redis Update + HGET permit:1 construction_value // Read the construction_value field before the update + + HSET permit:1 "construction_value" 36000 // Update the construction_value field + + HGET permit:1 construction_value // Read the construction_value field after the update + + ``` + ```redis Delete + HGET permit:2 construction_value // Read the construction_value field before deletion + + HDEL permit:2 construction_value // Delete only the construction_value field from the document + + HGETALL permit:2 // Read the whole document to confirm the construction_value field has been deleted + + DEL permit:2 // Delete the entire document + + HGETALL permit:2 // Confirm the entire document has been deleted + + ``` + +2. Secondary Index + ```redis Create hash index + // Command to create an index on hash keys that are prefixed with "permit:" + // Note that it is possible to index either every hash or every JSON document in the keyspace or configure indexing only for a subset of the same data type documents described by a prefix. + FT.CREATE "permits" // Index name + ON HASH // Indicates the type of data to index + PREFIX 1 "permit:" // Tells the index which keys it should index + SCHEMA + "permit_timestamp" NUMERIC SORTABLE // Will be indexed as a numeric field. Will permit sorting during query. + "address_street" AS street TEXT NOSTEM // 'address_street' field will be indexed as TEXT and can be referred as 'street' due to the '... AS fieldname ...' construct. Stemming is disabled - which is ideal for proper names. + "address_city" AS city TAG SORTABLE // Will be indexed as a tag. Will allow exact-match queries. + "description" TEXT + "building_type" TEXT NOSTEM SORTABLE + "work_type" TAG SEPARATOR ";" // For TAG fields, a separator indicates how the text contained in the field is to be split into individual tags + "construction_value" NUMERIC SORTABLE + "location" GEO // Will be indexed as GEO. Will allow geographic range queries + + ``` + ```redis List all indexes + // Command to return the list of all existing indexes + + FT._LIST + + ``` + ```redis Index info + // Command to display information about a particular index. + // In this case display the information about the newly created "permits" index + + FT.INFO "permits" + + ``` +3. Search and Querying Basics + ```redis Exact text search + // Perform a text search on all text fields: query for documents inside which the word 'veranda' occurs + + FT.SEARCH "permits" "veranda" + + // See the "permits" index schema for reference + + // FT.CREATE "permits" + // ON HASH + // PREFIX 1 "permit:" + // SCHEMA + // "permit_timestamp" NUMERIC SORTABLE + // "address_street" AS street TEXT NOSTEM + // "address_city" AS city TAG SORTABLE + // "description" TEXT + // "building_type" TEXT NOSTEM SORTABLE + // "work_type" TAG SEPARATOR ";" + // "construction_value" NUMERIC SORTABLE + // "location" GEO + + ``` + ```redis Fuzzy text search + // Perform a Fuzzy text search on all text fields: query for documents with words similar to 'haus'. The number of % indicates the allowed Levenshtein distance. So the query would also match on 'house' because 'haus' and 'house' have a distance of two. + + FT.SEARCH "permits" "%%haus%%" + + // See the "permits" index schema for reference + + // FT.CREATE "permits" + // ON HASH + // PREFIX 1 "permit:" + // SCHEMA + // "permit_timestamp" NUMERIC SORTABLE + // "address_street" AS street TEXT NOSTEM + // "address_city" AS city TAG SORTABLE + // "description" TEXT + // "building_type" TEXT NOSTEM SORTABLE + // "work_type" TAG SEPARATOR ";" + // "construction_value" NUMERIC SORTABLE + // "location" GEO + + ``` + ```redis Field specific text search + // Perform a text search on a specific field: query for documents which have a field 'building_type' inside which the word 'detached' occurs + + FT.SEARCH "permits" "@building_type:detached" + + // See the "permits" index schema for reference + + // FT.CREATE "permits" + // ON HASH + // PREFIX 1 "permit:" + // SCHEMA + // "permit_timestamp" NUMERIC SORTABLE + // "address_street" AS street TEXT NOSTEM + // "address_city" AS city TAG SORTABLE + // "description" TEXT + // "building_type" TEXT NOSTEM SORTABLE + // "work_type" TAG SEPARATOR ";" + // "construction_value" NUMERIC SORTABLE + // "location" GEO + + ``` + ```redis Numeric range query + // Perform a numeric range query: query for every document that has a construction value between 20000 and 36000 + // To reference a field, use @ construct + // For numerical ranges, square brackets are inclusive of the listed values + + FT.SEARCH "permits" "@construction_value:[20000,36000]" + + // See the "permits" index schema for reference + // FT.CREATE "permits" + // ON HASH + // PREFIX 1 "permit:" + // SCHEMA + // "permit_timestamp" NUMERIC SORTABLE + // "address_street" AS street TEXT NOSTEM + // "address_city" AS city TAG SORTABLE + // "description" TEXT + // "building_type" TEXT NOSTEM SORTABLE + // "work_type" TAG SEPARATOR ";" + // "construction_value" NUMERIC SORTABLE + // "location" GEO + + ``` + ```redis Tag search + // Perform a tag search: query for documents which have the address_city field set to "Lisbon". Note that we use curly braces around the tag. Also note that even though the field is called address_city in the hash, we can query it as city. That's because in the schema definition we used the ... AS fieldname ... construct, which allowed us to index address_city as city. + + FT.SEARCH "permits" "@city:{Lisbon}" + + // See the "permits" index schema for reference + + // FT.CREATE "permits" + // ON HASH + // PREFIX 1 "permit:" + // SCHEMA + // "permit_timestamp" NUMERIC SORTABLE + // "address_street" AS street TEXT NOSTEM + // "address_city" AS city TAG SORTABLE + // "description" TEXT + // "building_type" TEXT NOSTEM SORTABLE + // "work_type" TAG SEPARATOR ";" + // "construction_value" NUMERIC SORTABLE + // "location" GEO + + ``` + ```redis Multiple tags (OR) search + // Perform a search for documents that have one of multiple tags (OR condition) + + FT.SEARCH "permits" "@work_type:{construction|design}" + + // See the "permits" index schema for reference + + // FT.CREATE "permits" + // ON HASH + // PREFIX 1 "permit:" + // SCHEMA + // "permit_timestamp" NUMERIC SORTABLE + // "address_street" AS street TEXT NOSTEM + // "address_city" AS city TAG SORTABLE + // "description" TEXT + // "building_type" TEXT NOSTEM SORTABLE + // "work_type" TAG SEPARATOR ";" + // "construction_value" NUMERIC SORTABLE + // "location" GEO + + ``` + ```redis Multiple tags (AND) search + // Perform a search for documents that all of the tags (AND condition) + + FT.SEARCH "permits" "@work_type:{construction} @work_type:{design}" + + // See the "permits" index schema for reference + + // FT.CREATE "permits" + // ON HASH + // PREFIX 1 "permit:" + // SCHEMA + // "permit_timestamp" NUMERIC SORTABLE + // "address_street" AS street TEXT NOSTEM + // "address_city" AS city TAG SORTABLE + // "description" TEXT + // "building_type" TEXT NOSTEM SORTABLE + // "work_type" TAG SEPARATOR ";" + // "construction_value" NUMERIC SORTABLE + // "location" GEO + + ``` + ```redis Combined search on two fields (AND) + // Perform a combined search on two fields (AND): query for intersection of both search terms. + + FT.SEARCH "permits" "@building_type:house @description:new" + + // See the "permits" index schema for reference + + // FT.CREATE "permits" + // ON HASH + // PREFIX 1 "permit:" + // SCHEMA + // "permit_timestamp" NUMERIC SORTABLE + // "address_street" AS street TEXT NOSTEM + // "address_city" AS city TAG SORTABLE + // "description" TEXT + // "building_type" TEXT NOSTEM SORTABLE + // "work_type" TAG SEPARATOR ";" + // "construction_value" NUMERIC SORTABLE + // "location" GEO + + ``` + ```redis Combined search on two fields (OR) + // Perform a combined search on two fields (OR): query for union of both search terms. The brackets are important. + + FT.SEARCH "permits" "(@city:{Lagos})|(@description:detached)" + + // See the "permits" index schema for reference + + // FT.CREATE "permits" + // ON HASH + // PREFIX 1 "permit:" + // SCHEMA + // "permit_timestamp" NUMERIC SORTABLE + // "address_street" AS street TEXT NOSTEM + // "address_city" AS city TAG SORTABLE + // "description" TEXT + // "building_type" TEXT NOSTEM SORTABLE + // "work_type" TAG SEPARATOR ";" + // "construction_value" NUMERIC SORTABLE + // "location" GEO + + ``` + ```redis Combined search and geo filter + // Perform a fuzzy text search and filter on location in a radius distance of 10 miles + + FT.SEARCH "permits" "%%hous%%" GEOFILTER location 37.11 -8.6 10 mi + + // See the "permits" index schema for reference + + // FT.CREATE "permits" + // ON HASH + // PREFIX 1 "permit:" + // SCHEMA + // "permit_timestamp" NUMERIC SORTABLE + // "address_street" AS street TEXT NOSTEM + // "address_city" AS city TAG SORTABLE + // "description" TEXT + // "building_type" TEXT NOSTEM SORTABLE + // "work_type" TAG SEPARATOR ";" + // "construction_value" NUMERIC SORTABLE + // "location" GEO + + ``` + ```redis Group by & sort by aggregation + // Aggregations are a way to process the results of a search query, group, sort and transform them - and extract analytic insights from them. + // Aggregations are represented as the following data processing pipeline: + // Filter -> Group (Reduce) -> Apply -> Sort -> Apply + + // Perform a Group By & Sort By aggregation of your documents: display the number of permits by city and then sort the city alphabetically + + FT.AGGREGATE "permits" "*" + GROUPBY 1 @city REDUCE COUNT 0 AS nb_of_permits + SORTBY 2 @city Asc + + // See the "permits" index schema for reference + + // FT.CREATE "permits" + // ON HASH + // PREFIX 1 "permit:" + // SCHEMA + // "permit_timestamp" NUMERIC SORTABLE + // "address_street" AS street TEXT NOSTEM + // "address_city" AS city TAG SORTABLE + // "description" TEXT + // "building_type" TEXT NOSTEM SORTABLE + // "work_type" TAG SEPARATOR ";" + // "construction_value" NUMERIC SORTABLE + // "location" GEO + + ``` + ```redis Aggregation with apply + // Perform an aggregation of your documents with an apply function: for each document construct an ID out of construction_value and building_type fields + // Note that you need to enclose the apply function within double quotes + + FT.AGGREGATE "permits" "*" + APPLY "format(\"%s-%s\", @construction_value, @building_type)" as ID + + // See the "permits" index schema for reference + + // FT.CREATE "permits" + // ON HASH + // PREFIX 1 "permit:" + // SCHEMA + // "permit_timestamp" NUMERIC SORTABLE + // "address_street" AS street TEXT NOSTEM + // "address_city" AS city TAG SORTABLE + // "description" TEXT + // "building_type" TEXT NOSTEM SORTABLE + // "work_type" TAG SEPARATOR ";" + // "construction_value" NUMERIC SORTABLE + // "location" GEO + + ``` diff --git a/redisinsight/ui/src/packages/enablement-area/quick-guides/document/working-with-json.html b/redisinsight/ui/src/packages/enablement-area/quick-guides/document/working-with-json.html deleted file mode 100644 index e228f992af..0000000000 --- a/redisinsight/ui/src/packages/enablement-area/quick-guides/document/working-with-json.html +++ /dev/null @@ -1,130 +0,0 @@ -
-
-

Click on the button, see the command and the comments in the Workbench editor, and then run it.

-
    -
  1. - - CRUD operations -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
  2. -
  3. - - Secondary Index -
    - -
    -
    - -
    -
    - -
    -
    -
  4. -
  5. - - Search and Querying Basics -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
  6. -
-
-
diff --git a/redisinsight/ui/src/packages/enablement-area/quick-guides/document/working-with-json.md b/redisinsight/ui/src/packages/enablement-area/quick-guides/document/working-with-json.md new file mode 100644 index 0000000000..8c5d52edaa --- /dev/null +++ b/redisinsight/ui/src/packages/enablement-area/quick-guides/document/working-with-json.md @@ -0,0 +1,342 @@ +Click on the button, see the command and the comments in the Workbench editor, and then run it. + +1. CRUD operations + + ```redis Create + // Let's add four documents as JSON to the index. Note the format of the key names. + // Each document represents a school. + + JSON.SET school:1 . '{"name":"Hall School", "description":"Independent primary school for boys aged 5 to 11","school_type":"single;boys","class":"independent", "address":{"city":"London", "street":"Manor Street"}, "pupils":342, "location":"51.445417, -0.258352", "status_log":["new", "operating"]}' + + JSON.SET school:2 . '{"name":"Garden School", "description":"State school for boys and girls aged 5 to 18","school_type":"mixed;boys;girls","class":"state", "address":{"city":"London", "street":"Gordon Street"}, "pupils":1452, "location":"51.402926, -0.321523", "status_log":["new", "operating"]}' + + JSON.SET school:3 . '{"name":"Gillford School", "description":"Independent school for girls aged 5 to 18","school_type":"single;girls","class":"private", "address":{"city":"Goudhurst", "street":"Goudhurst"}, "pupils":721, "location":"51.112685, 0.451076", "status_log":["new", "operating", "closed"]}' + + JSON.SET school:4 . '{"name":"Old Boys School", "description":"Independent school for boys aged 5 to 18","school_type":"single;boys","class":"independent", "address":{"city":"Oxford", "street":"Trident Street"}, "pupils":1200, "location":"51.781756, -1.123196", "status_log":["new", "operating"]}' + + ``` + ```redis Read + JSON.GET school:1 // Read the whole document + + // RedisJSON supports JSONPath, so we can easily access nested properties using $. construct + + JSON.GET school:1 $.description // Read only the field description + + ``` + ```redis Update + JSON.GET school:1 $.pupils // Read the pupils field before the update + + JSON.SET school:1 $.pupils 430 // Update the pupils field + + JSON.GET school:1 $.pupils // Read the pupils field after the update + + ``` + ```redis Delete + JSON.GET school:1 $.pupils // Read the pupils field before deletion + + JSON.DEL school:1 $.pupils // Delete only the pupils field from the document + + JSON.GET school:1 // Read the whole document to confirm the construction_value field has been deleted + + JSON.DEL school:1 // Delete the entire document + + JSON.GET school:1 // Confirm the entire document has been deleted + + ``` + +2. Secondary Index + + ```redis Create JSON index + // It is possible to index either every hash or every JSON document in the keyspace or configure indexing only for a subset of the same data type documents described by a prefix. + + // RedisJSON supports JSONPath, so we can easily access and index nested properties and array elements. + // Note that you cannot index values that contain JSON objects or JSON arrays. To be indexed, a JSONPath expression must return a single scalar value (string or number). If the JSONPath expression returns an object or an array, it will be ignored. + + // JSON Strings can only be indexed as TEXT, TAG and GEO (using the right syntax). + // JSON numbers can only be indexed as NUMERIC. + // Boolean and NULL values are ignored. + + // Command to create an index on JSON keys that are prefixed with "school:" + + FT.CREATE schools // Index name + on JSON // Indicates the type of data to index + PREFIX 1 "school:" // Tells the index which keys it should index + SCHEMA + $.name AS name TEXT NOSTEM SORTABLE // Will be indexed as a TEXT field. Will permit sorting during query. Stemming is disabled - which is ideal for proper names. + $.description AS description TEXT + $.school_type AS school_type TAG SEPARATOR ";" // For tag fields, a separator indicates how the text contained in the field is to be split into individual tags + $.class AS class TAG // Will be indexed as a tag. Will allow exact-match queries. + $.address.street AS address TEXT NOSTEM // '$.address.street' field will be indexed as TEXT and can be referred as 'street' due to the '... AS fieldname ...' construct. + $.address.city AS city TAG + $.pupils AS pupils NUMERIC SORTABLE // Will be indexed as a numeric field. Will permit sorting during query + $.location AS location GEO // Will be indexed as GEO. Will allow geographic range queries + $.status_log.[-1] as status TAG // Will index the last element of the array as "status" + + ``` + ```redis List all indexes + // Command to return the list of all existing indexes + + FT._LIST + + ``` + ```redis Index info + // Command to display information about a particular index. + // In this case display the information about the newly created "schools" index + + FT.INFO "schools" + + ``` + +3. Search and Querying Basics + + ```redis Exact text search + // Perform a text search on all text fields: query for documents inside which the word 'girls' occurs + + FT.SEARCH "schools" "girls" + + // See the "schools" index schema for reference + + // FT.CREATE schools + // on JSON + // PREFIX 1 "school:" + // SCHEMA + // $.name AS name TEXT NOSTEM SORTABLE + // $.description AS description TEXT + // $.school_type AS school_type TAG SEPARATOR ";" + // $.class AS class TAG + // $.address.street AS address TEXT NOSTEM + // $.address.city AS city TAG + // $.pupils AS pupils NUMERIC SORTABLE + // $.location AS location GEO + // $.status_log.[-1] as status TAG + + ``` + ```redis Fuzzy text search + // Perform a Fuzzy text search on all text fields: query for documents with words similar to 'gill'. The number of % indicates the allowed Levenshtein distance. So the query would also match on 'girl' because 'gill' and 'girl' have a distance of two. + + FT.SEARCH "schools" "%%gill%%" + + // See the "schools" index schema for reference + + // FT.CREATE schools + // on JSON + // PREFIX 1 "school:" + // SCHEMA + // $.name AS name TEXT NOSTEM SORTABLE + // $.description AS description TEXT + // $.school_type AS school_type TAG SEPARATOR ";" + // $.class AS class TAG + // $.address.street AS address TEXT NOSTEM + // $.address.city AS city TAG + // $.pupils AS pupils NUMERIC SORTABLE + // $.location AS location GEO + // $.status_log.[-1] as status TAG + + ``` + ```redis Field specific text search + // Perform a text search on a specific field: query for documents which have a field 'name' inside which the word 'old' occurs + // To reference a field, use @ construct + + FT.SEARCH "schools" "@name:old" + + // See the "schools" index schema for reference + + // FT.CREATE schools + // on JSON + // PREFIX 1 "school:" + // SCHEMA + // $.name AS name TEXT NOSTEM SORTABLE + // $.description AS description TEXT + // $.school_type AS school_type TAG SEPARATOR ";" + // $.class AS class TAG + // $.address.street AS address TEXT NOSTEM + // $.address.city AS city TAG + // $.pupils AS pupils NUMERIC SORTABLE + // $.location AS location GEO + // $.status_log.[-1] as status TAG + + ``` + ```redis Numeric range query + // Perform a numeric range query: query for every document that has a 'pupils' value between 0 and 1000 + // For numerical ranges, square brackets are inclusive of the listed values + + FT.SEARCH "schools" "@pupils:[0,1000]" + + + // See the "schools" index schema for reference + + // FT.CREATE schools + // on JSON + // PREFIX 1 "school:" + // SCHEMA + // $.name AS name TEXT NOSTEM SORTABLE + // $.description AS description TEXT + // $.school_type AS school_type TAG SEPARATOR ";" + // $.class AS class TAG + // $.address.street AS address TEXT NOSTEM + // $.address.city AS city TAG + // $.pupils AS pupils NUMERIC SORTABLE + // $.location AS location GEO + // $.status_log.[-1] as status TAG + + ``` + ```redis Tag search + // Perform a tag search: query for documents which have the city field set to "London". Note that we use curly braces around the tag. + + FT.SEARCH "schools" "@city:{Oxford}" + + // See the "schools" index schema for reference + + // FT.CREATE schools + // on JSON + // PREFIX 1 "school:" + // SCHEMA + // $.name AS name TEXT NOSTEM SORTABLE + // $.description AS description TEXT + // $.school_type AS school_type TAG SEPARATOR ";" + // $.class AS class TAG + // $.address.street AS address TEXT NOSTEM + // $.address.city AS city TAG + // $.pupils AS pupils NUMERIC SORTABLE + // $.location AS location GEO + // + + ``` + ```redis Multiple tags (OR) search + // Perform a search for documents that have one of multiple tags (OR condition) + + FT.SEARCH "schools" "@school_type:{single|girls}" + + // See the "schools" index schema for reference + + // FT.CREATE schools + // on JSON + // PREFIX 1 "school:" + // SCHEMA + // $.name AS name TEXT NOSTEM SORTABLE + // $.description AS description TEXT + // $.school_type AS school_type TAG SEPARATOR ";" + // $.class AS class TAG + // $.address.street AS address TEXT NOSTEM + // $.address.city AS city TAG + // $.pupils AS pupils NUMERIC SORTABLE + // $.location AS location GEO + // $.status_log.[-1] as status TAG + + ``` + ```redis Multiple tags (AND) search + // Perform a search for documents that all of the tags (AND condition) + + FT.SEARCH "schools" "@school_type:{single} @school_type:{girls}" + + // See the "schools" index schema for reference + + // FT.CREATE schools + // on JSON + // PREFIX 1 "school:" + // SCHEMA + // $.name AS name TEXT NOSTEM SORTABLE + // $.description AS description TEXT + // $.school_type AS school_type TAG SEPARATOR ";" + // $.class AS class TAG + // $.address.street AS address TEXT NOSTEM + // $.address.city AS city TAG + // $.pupils AS pupils NUMERIC SORTABLE + // $.location AS location GEO + // $.status_log.[-1] as status TAG + + ``` + ```redis Combined search on two fields (AND) + // Perform a combined search on two fields (AND): query for intersection of both search terms, a text search and a tag match + + FT.SEARCH "schools" "@description:girls @status:{closed}" + + // See the "schools" index schema for reference + + // FT.CREATE schools + // on JSON + // PREFIX 1 "school:" + // SCHEMA + // $.name AS name TEXT NOSTEM SORTABLE + // $.description AS description TEXT + // $.school_type AS school_type TAG SEPARATOR ";" + // $.class AS class TAG + // $.address.street AS address TEXT NOSTEM + // $.address.city AS city TAG + // $.pupils AS pupils NUMERIC SORTABLE + // $.location AS location GEO + // $.status_log.[-1] as status TAG + + ``` + ```redis Combined search on two fields (OR) + // Perform a combined search on two fields (OR): query for union of both search terms. The brackets are important. + + FT.SEARCH "schools" "(@city:{Oxford})|(@description:girls)" + + // See the "schools" index schema for reference + + // FT.CREATE schools + // on JSON + // PREFIX 1 "school:" + // SCHEMA + // $.name AS name TEXT NOSTEM SORTABLE + // $.description AS description TEXT + // $.school_type AS school_type TAG SEPARATOR ";" + // $.class AS class TAG + // $.address.street AS address TEXT NOSTEM + // $.address.city AS city TAG + // $.pupils AS pupils NUMERIC SORTABLE + // $.location AS location GEO + // $.status_log.[-1] as status TAG + + ``` + ```redis Combined search and geo filter + // Perform a fuzzy text search and filter on location in a radius distance of 10 miles + + FT.SEARCH "schools" "%%gill%%" GEOFILTER location 51.11 0.45 10 mi + + // See the "schools" index schema for reference + + // FT.CREATE schools + // on JSON + // PREFIX 1 "school:" + // SCHEMA + // $.name AS name TEXT NOSTEM SORTABLE + // $.description AS description TEXT + // $.school_type AS school_type TAG SEPARATOR ";" + // $.class AS class TAG + // $.address.street AS address TEXT NOSTEM + // $.address.city AS city TAG + // $.pupils AS pupils NUMERIC SORTABLE + // $.location AS location GEO + // $.status_log.[-1] as status TAG + + ``` + ```redis Group by & sort by aggregation + // Aggregations are a way to process the results of a search query, group, sort and transform them - and extract analytic insights from them. + // Aggregations are represented as the following data processing pipeline: + // Filter -> Group (Reduce) -> Apply -> Sort -> Apply + + // Perform a Group By & Sort By aggregation of your documents: display the number of permits by city and then sort the city alphabetically + + FT.AGGREGATE "schools" "*" + GROUPBY 1 @city REDUCE COUNT 0 AS nb_of_schools + SORTBY 2 @city Asc + + // See the "schools" index schema for reference + + // FT.CREATE schools + // on JSON + // PREFIX 1 "school:" + // SCHEMA + // $.name AS name TEXT NOSTEM SORTABLE + // $.description AS description TEXT + // $.school_type AS school_type TAG SEPARATOR ";" + // $.class AS class TAG + // $.address.street AS address TEXT NOSTEM + // $.address.city AS city TAG + // $.pupils AS pupils NUMERIC SORTABLE + // $.location AS location GEO + // $.status_log.[-1] as status TAG + + ``` diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/EnablementArea.tsx b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/EnablementArea.tsx index 6f155fb2a5..8ad7b824cd 100644 --- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/EnablementArea.tsx +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/EnablementArea.tsx @@ -15,13 +15,12 @@ import { PlainText } from './components' -import './styles.scss' import styles from './styles.module.scss' export interface Props { items: Record; loading: boolean; - openScript: (script: string, path: string) => void; + openScript: (script: string, path?: string, name?: string) => void; onOpenInternalPage: (page: IInternalPage) => void; } @@ -78,7 +77,7 @@ const EnablementArea = ({ items, openScript, loading, onOpenInternalPage }: Prop case EnablementAreaComponent.CodeButton: return args?.path ?
- :
openScript(args?.content || '', '')} label={label} {...args} />
+ :
openScript(args?.content || '')} label={label} {...args} />
case EnablementAreaComponent.InternalLink: return ( diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Code/Code.spec.tsx b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Code/Code.spec.tsx new file mode 100644 index 0000000000..09dd5b1cf8 --- /dev/null +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Code/Code.spec.tsx @@ -0,0 +1,34 @@ +import React from 'react' +import { instance, mock } from 'ts-mockito' +import { fireEvent, render } from 'uiSrc/utils/test-utils' +import { EnablementAreaProvider, defaultValue } from 'uiSrc/pages/workbench/contexts/enablementAreaContext' +import { MONACO_MANUAL } from 'uiSrc/constants' + +import Code, { Props } from './Code' + +const mockedProps = mock() + +describe('Code', () => { + it('should render', () => { + const label = 'Manual' + const component = render({MONACO_MANUAL}) + const { container } = component + + expect(component).toBeTruthy() + expect(container).toHaveTextContent(label) + }) + it('should correctly set script', () => { + const setScript = jest.fn() + const label = 'Manual' + + const { queryByTestId } = render( + + {MONACO_MANUAL} + + ) + + const link = queryByTestId(`preselect-${label}`) + fireEvent.click(link as Element) + expect(setScript).toBeCalledWith(MONACO_MANUAL) + }) +}) diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Code/Code.tsx b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Code/Code.tsx new file mode 100644 index 0000000000..ec5eb3c061 --- /dev/null +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Code/Code.tsx @@ -0,0 +1,34 @@ +import React, { useContext } from 'react' +import { startCase } from 'lodash' +import { useLocation } from 'react-router-dom' + +import EnablementAreaContext from 'uiSrc/pages/workbench/contexts/enablementAreaContext' +import { getFileInfo } from 'uiSrc/pages/workbench/components/enablament-area/EnablementArea/utils/getFileInfo' + +import CodeButton from '../CodeButton' + +export interface Props { + label: string; + children: string; +} + +const Code = ({ children, ...rest }: Props) => { + const { search } = useLocation() + const { setScript } = useContext(EnablementAreaContext) + + const loadContent = () => { + const pagePath = new URLSearchParams(search).get('guide') + if (pagePath) { + const pageInfo = getFileInfo(pagePath) + setScript(children, `${pageInfo.location}/${pageInfo.name}`, startCase(rest.label)) + } else { + setScript(children) + } + } + + return ( + + ) +} + +export default Code diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Code/index.ts b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Code/index.ts new file mode 100644 index 0000000000..cf284fdbd3 --- /dev/null +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Code/index.ts @@ -0,0 +1,3 @@ +import Code from './Code' + +export default Code diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/CodeButton/CodeButton.tsx b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/CodeButton/CodeButton.tsx index 0e4bd17999..bc8c7e366f 100644 --- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/CodeButton/CodeButton.tsx +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/CodeButton/CodeButton.tsx @@ -9,7 +9,7 @@ export interface Props { isLoading?: boolean; className?: string; } -const CodeButton = ({ onClick, label, isLoading, ...rest }: Props) => ( +const CodeButton = ({ onClick, label, isLoading, className, ...rest }: Props) => ( ( onClick={onClick} fullWidth color="secondary" - className={styles.button} + className={[className, styles.button].join(' ')} textProps={{ className: styles.buttonText }} data-testid={`preselect-${label}`} {...rest} diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Group/styles.scss b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Group/styles.scss index f59a9a1f2f..55abe960dd 100644 --- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Group/styles.scss +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/Group/styles.scss @@ -35,15 +35,15 @@ padding: 3px 8px; line-height: 24px; max-height: 30px; - &:hover { - background-color: var(--hoverInListColorDarken); - color: var(--euiTextColor) - } } .euiListGroupItem__label { font: normal normal normal 14px/20px Graphik; letter-spacing: -0.14px; } } + .euiListGroupItem:hover { + color: var(--euiTextColor); + background-color: var(--hoverInListColorDarken); + } } } diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/InternalPage.spec.tsx b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/InternalPage.spec.tsx index c5dc23f508..084db76d26 100644 --- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/InternalPage.spec.tsx +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/InternalPage.spec.tsx @@ -1,7 +1,6 @@ import React from 'react' import { instance, mock } from 'ts-mockito' import { fireEvent, render } from 'uiSrc/utils/test-utils' - import InternalPage, { Props } from './InternalPage' const mockedProps = mock() diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/InternalPage.tsx b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/InternalPage.tsx index dd4bf472cf..9d8b08afed 100644 --- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/InternalPage.tsx +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/InternalPage.tsx @@ -15,6 +15,7 @@ import { LazyCodeButton, InternalLink, Image, + Code, EmptyPrompt, Pagination } from 'uiSrc/pages/workbench/components/enablament-area/EnablementArea/components' @@ -51,7 +52,7 @@ const InternalPage = (props: Props) => { id, path, } = props - const components: any = { LazyCodeButton, InternalLink, Image } + const components: any = { LazyCodeButton, InternalLink, Image, Code } const containerRef = useRef(null) const { instanceId = '' } = useParams<{ instanceId: string }>() const handleScroll = debounce(() => { diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/styles.scss b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/styles.scss index faee80527b..b3168bfbb4 100644 --- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/styles.scss +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/InternalPage/styles.scss @@ -10,8 +10,10 @@ letter-spacing: -0.12px; } } +$margin-size-pace: 4; .enablement-area__page { + padding-bottom: 12px; height: 100%; @include font; letter-spacing: -0.12px; @@ -19,14 +21,26 @@ h1, h2, h3, h4, h5, h6 { color: var(--euiColorGhost); font: normal normal 500 14px/24px Graphik; - margin-bottom: 12px; + margin-bottom: ($margin-size-pace * 3 + px); + margin-top: ($margin-size-pace * 3 + px); letter-spacing: 0; } + hr + h1, hr + h2, hr + h3, hr + h4, hr + h5, hr + h6 { + margin-top: 0; + } + p { margin-bottom: 20px; } + .mb-s { + margin-bottom: ($margin-size-pace * 3 + px); + } + .mt-s { + margin-top: ($margin-size-pace * 3 + px); + } + a { color: var(--euiColorGhost); text-decoration: underline; @@ -44,7 +58,7 @@ height: 1px; width: 100%; background-color: var(--separatorColor); - margin: 12px 0; + margin: ($margin-size-pace * 3 + px) 0; } code { @@ -52,6 +66,7 @@ padding: 12px; width: 100%; background-color: var(--euiColorLightShade); + white-space: pre-wrap; border-radius: 2px; } @@ -86,11 +101,15 @@ } } - .sticky-footer { - position: sticky; - bottom: 0; - border-top: 1px solid var(--separatorColor); - padding: 12px 0; - background-color: var(--euiColorEmptyShade); + ul, ol { + + p { + margin-top: ($margin-size-pace * 3 + px); + } + li p { + margin-bottom: 0; + } + } + p + ul, p + ol { + margin-top: -($margin-size-pace * 3 + px); } } diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/LazyCodeButton/LazyCodeButton.tsx b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/LazyCodeButton/LazyCodeButton.tsx index d71baebcb1..d998217848 100644 --- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/LazyCodeButton/LazyCodeButton.tsx +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/LazyCodeButton/LazyCodeButton.tsx @@ -1,7 +1,10 @@ import React, { useContext, useState } from 'react' +import { startCase } from 'lodash' + import { getApiErrorMessage, isStatusSuccessful } from 'uiSrc/utils' import { resourcesService } from 'uiSrc/services' import EnablementAreaContext from 'uiSrc/pages/workbench/contexts/enablementAreaContext' +import { getFileInfo } from 'uiSrc/pages/workbench/components/enablament-area/EnablementArea/utils/getFileInfo' import CodeButton from '../CodeButton' @@ -22,7 +25,8 @@ const LazyCodeButton = ({ path = '', ...rest }: Props) => { const { data, status } = await resourcesService.get(path) if (isStatusSuccessful(status)) { setLoading(false) - setScript(data, path) + const pageInfo = getFileInfo(path) + setScript(data, pageInfo.location, startCase(pageInfo.name)) } } catch (error) { setLoading(false) diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/LazyInternalPage/LazyInternalPage.tsx b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/LazyInternalPage/LazyInternalPage.tsx index f49fb2e8dc..e708fb5ed8 100644 --- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/LazyInternalPage/LazyInternalPage.tsx +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/LazyInternalPage/LazyInternalPage.tsx @@ -15,8 +15,9 @@ import { import { IEnablementAreaItem } from 'uiSrc/slices/interfaces' import { workbenchEnablementAreaSelector } from 'uiSrc/slices/workbench/wb-enablement-area' -import { getFileInfo, getPagesInsideGroup, IFileInfo } from '../../utils/getFileInfo' import InternalPage from '../InternalPage' +import { getFileInfo, getPagesInsideGroup, IFileInfo } from '../../utils/getFileInfo' +import FormatSelector from '../../utils/formatter/FormatSelector' interface IPageData extends IFileInfo { content: string; @@ -46,10 +47,12 @@ const LazyInternalPage = ({ onClose, title, path }: Props) => { const relatedPages = getPagesInsideGroup(enablementArea.items, pageInfo.location) setPageData({ ...DEFAULT_PAGE_DATA, ...pageInfo, relatedPages }) try { + const formatter = FormatSelector.selectFor(pageInfo.extension) const { data, status } = await fetchService.get(path) if (isStatusSuccessful(status)) { dispatch(setWorkbenchEAGuide(path)) - setPageData((prevState) => ({ ...prevState, content: data })) + const contentData = await formatter.format(data) + setPageData((prevState) => ({ ...prevState, content: contentData })) setLoading(false) } } catch (error) { diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/index.ts b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/index.ts index 651a69e594..37477b400d 100644 --- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/index.ts +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/components/index.ts @@ -1,3 +1,4 @@ +import Code from './Code' import CodeButton from './CodeButton' import EmptyPrompt from './EmptyPrompt' import Group from './Group' @@ -10,6 +11,7 @@ import PlainText from './PlainText' import Pagination from './Pagination' export { + Code, CodeButton, EmptyPrompt, Group, diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/styles.scss b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/styles.scss deleted file mode 100644 index bfd30d1e84..0000000000 --- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/styles.scss +++ /dev/null @@ -1,6 +0,0 @@ -.enablement-area { - .jsx-parser { - min-height: 100%; - height: 1px; - } -} diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/FormatSelector.spec.ts b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/FormatSelector.spec.ts new file mode 100644 index 0000000000..535ef8d9cc --- /dev/null +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/FormatSelector.spec.ts @@ -0,0 +1,19 @@ +import FormatSelector from './FormatSelector' +import HtmlToJsxString from './HtmlToJsxString' +import MarkdownToJsxString from './MarkdownToJsxString' + +describe('FormatSelector', () => { + it('should select correct formatter for html ', () => { + expect(FormatSelector.selectFor('html')).toBeInstanceOf(HtmlToJsxString) + }) + it('should select correct formatter for markdown ', () => { + expect(FormatSelector.selectFor('md')).toBeInstanceOf(MarkdownToJsxString) + }) + it('should throw unsupported format error', () => { + try { + FormatSelector.selectFor('mp4') + } catch (e) { + expect(e.message).toBe('Unsupported format') + } + }) +}) diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/FormatSelector.ts b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/FormatSelector.ts new file mode 100644 index 0000000000..62a8d397c4 --- /dev/null +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/FormatSelector.ts @@ -0,0 +1,25 @@ +import { IFormatter } from './formatter.interfaces' +import MarkdownToJsxString from './MarkdownToJsxString' +import HtmlToJsxString from './HtmlToJsxString' + +export enum FileExtension { + Html = 'html', + Markdown = 'md' +} + +class FormatSelector { + private static formatters = { + [FileExtension.Html]: new HtmlToJsxString(), + [FileExtension.Markdown]: new MarkdownToJsxString(), + } + + static selectFor(extension: string): IFormatter { + const FormatterFactory = FormatSelector.formatters[extension as FileExtension] + if (FormatterFactory) { + return FormatterFactory + } + throw new Error('Unsupported format') + } +} + +export default FormatSelector diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/HtmlToJsxString.ts b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/HtmlToJsxString.ts new file mode 100644 index 0000000000..e3a3fc623f --- /dev/null +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/HtmlToJsxString.ts @@ -0,0 +1,11 @@ +import { IFormatter } from './formatter.interfaces' + +class HtmlToJsxString implements IFormatter { + format(data: any): Promise { + return new Promise((resolve) => { + resolve(String(data)) + }) + } +} + +export default HtmlToJsxString diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/MarkdownToJsxString.ts b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/MarkdownToJsxString.ts new file mode 100644 index 0000000000..b5bfbd85fc --- /dev/null +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/MarkdownToJsxString.ts @@ -0,0 +1,57 @@ +import { unified } from 'unified' +import remarkParse from 'remark-parse' +import remarkRehype from 'remark-rehype' +import rehypeStringify from 'rehype-stringify' +import { visit } from 'unist-util-visit' +import { IS_ABSOLUTE_PATH } from 'uiSrc/constants/regex' + +import { IFormatter } from './formatter.interfaces' + +class MarkdownToJsxString implements IFormatter { + format(data: any): Promise { + return new Promise((resolve, reject) => { + unified() + .use(remarkParse) + .use(MarkdownToJsxString.remarkRedisCode) + .use(remarkRehype, { allowDangerousHtml: true }) // Pass raw HTML strings through. + .use(MarkdownToJsxString.rehypeExternalLinks) // Set External links + .use(rehypeStringify, { allowDangerousHtml: true }) // Serialize the raw HTML strings + .process(data) + .then((file) => { + resolve(String(file)) + }) + .catch((error) => reject(error)) + }) + } + + private static remarkRedisCode(): (tree: Node) => void { + return (tree: any) => { + // Find code node in syntax tree + visit(tree, 'code', (codeNode) => { + const { value, meta, lang } = codeNode + // Check that it has a language unsupported by our editor + if (lang === 'redis') { + codeNode.type = 'html' + // Replace it with our custom component + codeNode.value = `{${JSON.stringify(value)}}` + } + }) + } + } + + private static rehypeExternalLinks(): (tree: Node) => void { + return (tree: any) => { + visit(tree, 'element', (node) => { + if (node.tagName === 'a' && node.properties && typeof node.properties.href === 'string') { + const url = node.properties.href + if (IS_ABSOLUTE_PATH.test(url)) { + node.properties.rel = ['nofollow', 'noopener', 'noreferrer'] + node.properties.target = '_blank' + } + } + }) + } + } +} + +export default MarkdownToJsxString diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/formatter.interfaces.ts b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/formatter.interfaces.ts new file mode 100644 index 0000000000..f7a692f6ee --- /dev/null +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementArea/utils/formatter/formatter.interfaces.ts @@ -0,0 +1,3 @@ +export interface IFormatter { + format(data: any): Promise; +} diff --git a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementAreaWrapper.tsx b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementAreaWrapper.tsx index 394ed4d999..255312bc88 100644 --- a/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementAreaWrapper.tsx +++ b/redisinsight/ui/src/pages/workbench/components/enablament-area/EnablementAreaWrapper.tsx @@ -32,18 +32,18 @@ const EnablementAreaWrapper = React.memo(({ isMinimized, setIsMinimized, scriptE dispatch(fetchEnablementArea()) }, []) - const sendEventButtonClickedTelemetry = (path: string = '') => { + const sendEventButtonClickedTelemetry = (data: Record) => { sendEventTelemetry({ event: TelemetryEvent.WORKBENCH_ENABLEMENT_AREA_COMMAND_CLICKED, eventData: { - path, databaseId: instanceId, + ...data, } }) } - const openScript = (script: string, path: string) => { - sendEventButtonClickedTelemetry(path) + const openScript = (script: string, path?: string, name?: string) => { + sendEventButtonClickedTelemetry({ path, name }) setScript(script) setTimeout(() => { diff --git a/redisinsight/ui/src/pages/workbench/contexts/enablementAreaContext.tsx b/redisinsight/ui/src/pages/workbench/contexts/enablementAreaContext.tsx index 67200d4bbf..965ded1d7c 100644 --- a/redisinsight/ui/src/pages/workbench/contexts/enablementAreaContext.tsx +++ b/redisinsight/ui/src/pages/workbench/contexts/enablementAreaContext.tsx @@ -1,7 +1,7 @@ import React from 'react' interface IContext { - setScript: (script: string, path: string) => void; + setScript: (script: string, path?: string, name?: string) => void; openPage: (page: IInternalPage) => void; } export interface IInternalPage { @@ -9,7 +9,7 @@ export interface IInternalPage { label?: string; } export const defaultValue = { - setScript: (script: string, path: string) => script, + setScript: (script: string) => script, openPage: (page: IInternalPage) => page } const EnablementAreaContext = React.createContext(defaultValue) diff --git a/yarn.lock b/yarn.lock index de27b465cd..64e8362b61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1822,7 +1822,7 @@ dependencies: date-fns "*" -"@types/debug@^4.1.6": +"@types/debug@^4.0.0", "@types/debug@^4.1.6": version "4.1.7" resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.7.tgz#7cc0ea761509124709b8b2d1090d8f6c17aadb82" integrity sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg== @@ -2025,6 +2025,11 @@ dependencies: "@types/unist" "*" +"@types/mdurl@^1.0.0": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@types/mdurl/-/mdurl-1.0.2.tgz#e2ce9d83a613bacf284c7be7d491945e39e1f8e9" + integrity sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA== + "@types/mime@^1": version "1.3.2" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" @@ -2071,9 +2076,9 @@ integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/parse5@*": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.2.tgz#99f6b72d82e34cea03a4d8f2ed72114d909c1c61" - integrity sha512-+hQX+WyJAOne7Fh3zF5CxPemILIbuhNcqHHodzK9caYOLnC8pD5efmPleRnw0z++LfKUC/sVNMwk0Gap+B0baA== + version "6.0.3" + resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.3.tgz#705bb349e789efa06f43f128cef51240753424cb" + integrity sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g== "@types/parse5@^5.0.0": version "5.0.3" @@ -2203,9 +2208,9 @@ "@types/react" "*" "@types/react@*", "@types/react@>=16.9.0", "@types/react@^17.0.1": - version "17.0.34" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.34.tgz#797b66d359b692e3f19991b6b07e4b0c706c0102" - integrity sha512-46FEGrMjc2+8XhHXILr+3+/sTe3OfzSPU9YGKILLrUYbQ1CLQC9Daqo1KzENGXAWwrFwiY0l4ZbF20gRvgpWTg== + version "17.0.37" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.37.tgz#6884d0aa402605935c397ae689deed115caad959" + integrity sha512-2FS1oTqBGcH/s0E+CjrCCR9+JMpsu9b69RTFO+40ua43ZqP5MmQ4iUde/dMjWR909KxZwmOQIFq6AV6NjEG5xg== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -3394,6 +3399,11 @@ bail@^1.0.0: resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.5.tgz#b6fa133404a392cbc1f8c4bf63f5953351e7a776" integrity sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ== +bail@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/bail/-/bail-2.0.2.tgz#d26f5cd8fe5d6f832a31517b9f7c356040ba6d5d" + integrity sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw== + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -3962,6 +3972,11 @@ ccount@^1.0.0: resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.1.0.tgz#246687debb6014735131be8abab2d93898f8d043" integrity sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg== +ccount@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/ccount/-/ccount-2.0.1.tgz#17a3bf82302e0870d6da43a01311a8bc02a3ecf5" + integrity sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg== + chalk@3.0.0, chalk@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" @@ -4008,16 +4023,31 @@ character-entities-html4@^1.0.0: resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-1.1.4.tgz#0e64b0a3753ddbf1fdc044c5fd01d0199a02e125" integrity sha512-HRcDxZuZqMx3/a+qrzxdBKBPUpxWEq9xw2OPZ3a/174ihfrQKVsFhqtthBInFy1zZ9GgZyFXOatNujm8M+El3g== +character-entities-html4@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-2.1.0.tgz#1f1adb940c971a4b22ba39ddca6b618dc6e56b2b" + integrity sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA== + character-entities-legacy@^1.0.0: version "1.1.4" resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1" integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA== +character-entities-legacy@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz#76bc83a90738901d7bc223a9e93759fdd560125b" + integrity sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ== + character-entities@^1.0.0: version "1.2.4" resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b" integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw== +character-entities@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-2.0.1.tgz#98724833e1e27990dee0bd0f2b8a859c3476aac7" + integrity sha512-OzmutCf2Kmc+6DrFrrPS8/tDh2+DpnrfzdICHWhcVC9eOd0N1PXmQEE1a8iM4IziIAG+8tmTq3K+oo0ubH6RRQ== + character-reference-invalid@^1.0.0: version "1.1.4" resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560" @@ -4361,6 +4391,11 @@ comma-separated-tokens@^1.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== +comma-separated-tokens@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.2.tgz#d4c25abb679b7751c880be623c1179780fe1dd98" + integrity sha512-G5yTt3KQN4Yn7Yk4ed73hlZ1evrFKXeUW3086p3PRFNp7m2vIjI6Pg+Kgb+oyzhd9F2qdcoj67+y3SdxL5XWsg== + commander@2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" @@ -4972,10 +5007,10 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6. dependencies: ms "2.0.0" -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== +debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== dependencies: ms "2.1.2" @@ -4996,6 +5031,13 @@ decimal.js@^10.2.1: resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== +decode-named-character-reference@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/decode-named-character-reference/-/decode-named-character-reference-1.0.1.tgz#57b2bd9112659cacbc449d3577d7dadb8e1f3d1b" + integrity sha512-YV/0HQHreRwKb7uBopyIkLG17jG6Sv2qUchk9qSoVJ2f+flwRsPNBO0hAnjt6mTNYUT+vw9Gy2ihXg4sUWPi2w== + dependencies: + character-entities "^2.0.0" + decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -5134,6 +5176,11 @@ depd@~1.1.2: resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= +dequal@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.2.tgz#85ca22025e3a87e65ef75a7a437b35284a7e319d" + integrity sha512-q9K8BlJVxK7hQYqa6XISGmBZbtQQWVXSrRrWreHC94rMt1QL/Impruc+7p2CYSYuVIUr+YCt6hjrs1kkdJRTug== + des.js@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" @@ -5195,6 +5242,11 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +diff@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -7249,6 +7301,14 @@ hast-util-is-element@^1.0.0: resolved "https://registry.yarnpkg.com/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz#3b3ed5159a2707c6137b48637fbfe068e175a425" integrity sha512-oUmNua0bFbdrD/ELDSSEadRVtWZOf3iF6Lbv81naqsIV99RnSCieTbWuWCY8BAeEfKJTKl0gRdokv+dELutHGQ== +hast-util-is-element@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/hast-util-is-element/-/hast-util-is-element-2.1.2.tgz#fc0b0dc7cef3895e839b8d66979d57b0338c68f3" + integrity sha512-thjnlGAnwP8ef/GSO1Q8BfVk2gundnc2peGQqEg2kUt/IqesiGg/5mSwN2fE7nLzy61pg88NG6xV+UrGOrx9EA== + dependencies: + "@types/hast" "^2.0.0" + "@types/unist" "^2.0.0" + hast-util-parse-selector@^2.0.0: version "2.2.5" resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz#d57c23f4da16ae3c63b3b6ca4616683313499c3a" @@ -7287,6 +7347,22 @@ hast-util-to-html@^7.1.1: unist-util-is "^4.0.0" xtend "^4.0.0" +hast-util-to-html@^8.0.0: + version "8.0.3" + resolved "https://registry.yarnpkg.com/hast-util-to-html/-/hast-util-to-html-8.0.3.tgz#4e37580872e143ea9ce0dba87918b19e4ea997e3" + integrity sha512-/D/E5ymdPYhHpPkuTHOUkSatxr4w1ZKrZsG0Zv/3C2SRVT0JFJG53VS45AMrBtYk0wp5A7ksEhiC8QaOZM95+A== + dependencies: + "@types/hast" "^2.0.0" + ccount "^2.0.0" + comma-separated-tokens "^2.0.0" + hast-util-is-element "^2.0.0" + hast-util-whitespace "^2.0.0" + html-void-elements "^2.0.0" + property-information "^6.0.0" + space-separated-tokens "^2.0.0" + stringify-entities "^4.0.2" + unist-util-is "^5.0.0" + hast-util-to-parse5@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz#1ec44650b631d72952066cea9b1445df699f8479" @@ -7303,6 +7379,11 @@ hast-util-whitespace@^1.0.0: resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-1.0.4.tgz#e4fe77c4a9ae1cb2e6c25e02df0043d0164f6e41" integrity sha512-I5GTdSfhYfAPNztx2xJRQpG8cuDSNt599/7YUn7Gx/WxNMsG+a835k97TDkFgk123cwjfwINaZknkKkphx/f2A== +hast-util-whitespace@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-2.0.0.tgz#4fc1086467cc1ef5ba20673cb6b03cec3a970f1c" + integrity sha512-Pkw+xBHuV6xFeJprJe2BBEoDV+AvQySaz3pPDRUs5PNZEMQjpXJJueqrpcHIXxnWTcAGi/UOCgVShlkY6kLoqg== + hastscript@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-6.0.0.tgz#e8768d7eac56c3fdeac8a92830d58e811e5bf640" @@ -7446,6 +7527,11 @@ html-void-elements@^1.0.0: resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-1.0.5.tgz#ce9159494e86d95e45795b166c2021c2cfca4483" integrity sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w== +html-void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-2.0.1.tgz#29459b8b05c200b6c5ee98743c41b979d577549f" + integrity sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A== + html-webpack-plugin@^4.5.0: version "4.5.1" resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.5.1.tgz#40aaf1b5cb78f2f23a83333999625c20929cda65" @@ -8196,6 +8282,11 @@ is-plain-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== +is-plain-obj@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.0.0.tgz#06c0999fd7574edf5a906ba5644ad0feb3a84d22" + integrity sha512-NXRbBtUdBioI73y/HmOhogw/U5msYPC9DAtGkJXeFcFWSFZw0mCUsPxk/snTuJHzNKA8kLBK4rH97RMB1BfCXw== + is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -9073,6 +9164,11 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +kleur@^4.0.3: + version "4.1.4" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.4.tgz#8c202987d7e577766d039a8cd461934c01cda04d" + integrity sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA== + klona@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.4.tgz#7bb1e3affb0cb8624547ef7e8f6708ea2e39dfc0" @@ -9474,6 +9570,33 @@ mdast-util-definitions@^4.0.0: dependencies: unist-util-visit "^2.0.0" +mdast-util-definitions@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-5.1.0.tgz#b6d10ef00a3c4cf191e8d9a5fa58d7f4a366f817" + integrity sha512-5hcR7FL2EuZ4q6lLMUK5w4lHT2H3vqL9quPvYZ/Ku5iifrirfMHiGdhxdXMUbUkDmz5I+TYMd7nbaxUhbQkfpQ== + dependencies: + "@types/mdast" "^3.0.0" + "@types/unist" "^2.0.0" + unist-util-visit "^3.0.0" + +mdast-util-from-markdown@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-1.2.0.tgz#84df2924ccc6c995dec1e2368b2b208ad0a76268" + integrity sha512-iZJyyvKD1+K7QX1b5jXdE7Sc5dtoTry1vzV28UZZe8Z1xVnB/czKntJ7ZAkG0tANqRnBF6p3p7GpU1y19DTf2Q== + dependencies: + "@types/mdast" "^3.0.0" + "@types/unist" "^2.0.0" + decode-named-character-reference "^1.0.0" + mdast-util-to-string "^3.1.0" + micromark "^3.0.0" + micromark-util-decode-numeric-character-reference "^1.0.0" + micromark-util-decode-string "^1.0.0" + micromark-util-normalize-identifier "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + unist-util-stringify-position "^3.0.0" + uvu "^0.5.0" + mdast-util-to-hast@^10.0.0, mdast-util-to-hast@^10.2.0: version "10.2.0" resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-10.2.0.tgz#61875526a017d8857b71abc9333942700b2d3604" @@ -9488,6 +9611,27 @@ mdast-util-to-hast@^10.0.0, mdast-util-to-hast@^10.2.0: unist-util-position "^3.0.0" unist-util-visit "^2.0.0" +mdast-util-to-hast@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-12.1.0.tgz#5942207baf1b46fc04a588fd6bf37bfcfb4043b2" + integrity sha512-dHfCt9Yh05AXEeghoziB3DjJV8oCIKdQmBJOPoAT1NlgMDBy+/MQn7Pxfq0jI8YRO1IfzcnmA/OU3FVVn/E5Sg== + dependencies: + "@types/hast" "^2.0.0" + "@types/mdast" "^3.0.0" + "@types/mdurl" "^1.0.0" + mdast-util-definitions "^5.0.0" + mdurl "^1.0.0" + micromark-util-sanitize-uri "^1.0.0" + unist-builder "^3.0.0" + unist-util-generated "^2.0.0" + unist-util-position "^4.0.0" + unist-util-visit "^4.0.0" + +mdast-util-to-string@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-3.1.0.tgz#56c506d065fbf769515235e577b5a261552d56e9" + integrity sha512-n4Vypz/DZgwo0iMHLQL49dJzlp7YtAJP+N07MZHpjPf/5XJuHUWstviF4Mn2jEiR/GNmtnRRqnwsXExk3igfFA== + mdn-data@2.0.14: version "2.0.14" resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" @@ -9577,6 +9721,201 @@ methods@^1.1.1, methods@^1.1.2, methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= +micromark-core-commonmark@^1.0.1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/micromark-core-commonmark/-/micromark-core-commonmark-1.0.6.tgz#edff4c72e5993d93724a3c206970f5a15b0585ad" + integrity sha512-K+PkJTxqjFfSNkfAhp4GB+cZPfQd6dxtTXnf+RjZOV7T4EEXnvgzOcnp+eSTmpGk9d1S9sL6/lqrgSNn/s0HZA== + dependencies: + decode-named-character-reference "^1.0.0" + micromark-factory-destination "^1.0.0" + micromark-factory-label "^1.0.0" + micromark-factory-space "^1.0.0" + micromark-factory-title "^1.0.0" + micromark-factory-whitespace "^1.0.0" + micromark-util-character "^1.0.0" + micromark-util-chunked "^1.0.0" + micromark-util-classify-character "^1.0.0" + micromark-util-html-tag-name "^1.0.0" + micromark-util-normalize-identifier "^1.0.0" + micromark-util-resolve-all "^1.0.0" + micromark-util-subtokenize "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.1" + uvu "^0.5.0" + +micromark-factory-destination@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz#fef1cb59ad4997c496f887b6977aa3034a5a277e" + integrity sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw== + dependencies: + micromark-util-character "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + +micromark-factory-label@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/micromark-factory-label/-/micromark-factory-label-1.0.2.tgz#6be2551fa8d13542fcbbac478258fb7a20047137" + integrity sha512-CTIwxlOnU7dEshXDQ+dsr2n+yxpP0+fn271pu0bwDIS8uqfFcumXpj5mLn3hSC8iw2MUr6Gx8EcKng1dD7i6hg== + dependencies: + micromark-util-character "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + uvu "^0.5.0" + +micromark-factory-space@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micromark-factory-space/-/micromark-factory-space-1.0.0.tgz#cebff49968f2b9616c0fcb239e96685cb9497633" + integrity sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew== + dependencies: + micromark-util-character "^1.0.0" + micromark-util-types "^1.0.0" + +micromark-factory-title@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/micromark-factory-title/-/micromark-factory-title-1.0.2.tgz#7e09287c3748ff1693930f176e1c4a328382494f" + integrity sha512-zily+Nr4yFqgMGRKLpTVsNl5L4PMu485fGFDOQJQBl2NFpjGte1e86zC0da93wf97jrc4+2G2GQudFMHn3IX+A== + dependencies: + micromark-factory-space "^1.0.0" + micromark-util-character "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + uvu "^0.5.0" + +micromark-factory-whitespace@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0.tgz#e991e043ad376c1ba52f4e49858ce0794678621c" + integrity sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A== + dependencies: + micromark-factory-space "^1.0.0" + micromark-util-character "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + +micromark-util-character@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/micromark-util-character/-/micromark-util-character-1.1.0.tgz#d97c54d5742a0d9611a68ca0cd4124331f264d86" + integrity sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg== + dependencies: + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + +micromark-util-chunked@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micromark-util-chunked/-/micromark-util-chunked-1.0.0.tgz#5b40d83f3d53b84c4c6bce30ed4257e9a4c79d06" + integrity sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g== + dependencies: + micromark-util-symbol "^1.0.0" + +micromark-util-classify-character@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micromark-util-classify-character/-/micromark-util-classify-character-1.0.0.tgz#cbd7b447cb79ee6997dd274a46fc4eb806460a20" + integrity sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA== + dependencies: + micromark-util-character "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + +micromark-util-combine-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.0.0.tgz#91418e1e74fb893e3628b8d496085639124ff3d5" + integrity sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA== + dependencies: + micromark-util-chunked "^1.0.0" + micromark-util-types "^1.0.0" + +micromark-util-decode-numeric-character-reference@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.0.0.tgz#dcc85f13b5bd93ff8d2868c3dba28039d490b946" + integrity sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w== + dependencies: + micromark-util-symbol "^1.0.0" + +micromark-util-decode-string@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/micromark-util-decode-string/-/micromark-util-decode-string-1.0.2.tgz#942252ab7a76dec2dbf089cc32505ee2bc3acf02" + integrity sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q== + dependencies: + decode-named-character-reference "^1.0.0" + micromark-util-character "^1.0.0" + micromark-util-decode-numeric-character-reference "^1.0.0" + micromark-util-symbol "^1.0.0" + +micromark-util-encode@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micromark-util-encode/-/micromark-util-encode-1.0.0.tgz#c409ecf751a28aa9564b599db35640fccec4c068" + integrity sha512-cJpFVM768h6zkd8qJ1LNRrITfY4gwFt+tziPcIf71Ui8yFzY9wG3snZQqiWVq93PG4Sw6YOtcNiKJfVIs9qfGg== + +micromark-util-html-tag-name@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.0.0.tgz#75737e92fef50af0c6212bd309bc5cb8dbd489ed" + integrity sha512-NenEKIshW2ZI/ERv9HtFNsrn3llSPZtY337LID/24WeLqMzeZhBEE6BQ0vS2ZBjshm5n40chKtJ3qjAbVV8S0g== + +micromark-util-normalize-identifier@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.0.0.tgz#4a3539cb8db954bbec5203952bfe8cedadae7828" + integrity sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg== + dependencies: + micromark-util-symbol "^1.0.0" + +micromark-util-resolve-all@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micromark-util-resolve-all/-/micromark-util-resolve-all-1.0.0.tgz#a7c363f49a0162e931960c44f3127ab58f031d88" + integrity sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw== + dependencies: + micromark-util-types "^1.0.0" + +micromark-util-sanitize-uri@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.0.0.tgz#27dc875397cd15102274c6c6da5585d34d4f12b2" + integrity sha512-cCxvBKlmac4rxCGx6ejlIviRaMKZc0fWm5HdCHEeDWRSkn44l6NdYVRyU+0nT1XC72EQJMZV8IPHF+jTr56lAg== + dependencies: + micromark-util-character "^1.0.0" + micromark-util-encode "^1.0.0" + micromark-util-symbol "^1.0.0" + +micromark-util-subtokenize@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/micromark-util-subtokenize/-/micromark-util-subtokenize-1.0.2.tgz#ff6f1af6ac836f8bfdbf9b02f40431760ad89105" + integrity sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA== + dependencies: + micromark-util-chunked "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.0" + uvu "^0.5.0" + +micromark-util-symbol@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/micromark-util-symbol/-/micromark-util-symbol-1.0.1.tgz#b90344db62042ce454f351cf0bebcc0a6da4920e" + integrity sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ== + +micromark-util-types@^1.0.0, micromark-util-types@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/micromark-util-types/-/micromark-util-types-1.0.2.tgz#f4220fdb319205812f99c40f8c87a9be83eded20" + integrity sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w== + +micromark@^3.0.0: + version "3.0.10" + resolved "https://registry.yarnpkg.com/micromark/-/micromark-3.0.10.tgz#1eac156f0399d42736458a14b0ca2d86190b457c" + integrity sha512-ryTDy6UUunOXy2HPjelppgJ2sNfcPz1pLlMdA6Rz9jPzhLikWXv/irpWV/I2jd68Uhmny7hHxAlAhk4+vWggpg== + dependencies: + "@types/debug" "^4.0.0" + debug "^4.0.0" + decode-named-character-reference "^1.0.0" + micromark-core-commonmark "^1.0.1" + micromark-factory-space "^1.0.0" + micromark-util-character "^1.0.0" + micromark-util-chunked "^1.0.0" + micromark-util-combine-extensions "^1.0.0" + micromark-util-decode-numeric-character-reference "^1.0.0" + micromark-util-encode "^1.0.0" + micromark-util-normalize-identifier "^1.0.0" + micromark-util-resolve-all "^1.0.0" + micromark-util-sanitize-uri "^1.0.0" + micromark-util-subtokenize "^1.0.0" + micromark-util-symbol "^1.0.0" + micromark-util-types "^1.0.1" + uvu "^0.5.0" + micromatch@4.x, micromatch@^4.0.0, micromatch@^4.0.2: version "4.0.4" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" @@ -9798,6 +10137,11 @@ monaco-editor@^0.26.1: resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.26.1.tgz#62bb5f658bc95379f8abb64b147632bd1c019d73" integrity sha512-mm45nUrBDk0DgZKgbD7+bhDOtcAFNGPJJRAdS6Su1kTGl6XEgC7U3xOmDUW/0RrLf+jlvCGaqLvD4p2VjwuwwQ== +mri@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" + integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -11271,6 +11615,11 @@ property-information@^5.0.0, property-information@^5.3.0: dependencies: xtend "^4.0.0" +property-information@^6.0.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/property-information/-/property-information-6.1.1.tgz#5ca85510a3019726cb9afed4197b7b8ac5926a22" + integrity sha512-hrzC564QIl0r0vy4l6MvRLhafmUowhO/O3KgVSoXIbbA2Sz4j8HGpJc6T2cubRVwMwpdiG/vKGfhT4IixmKN9w== + proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" @@ -12005,6 +12354,15 @@ rehype-stringify@^8.0.0: dependencies: hast-util-to-html "^7.1.1" +rehype-stringify@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/rehype-stringify/-/rehype-stringify-9.0.2.tgz#2d95e06e246abbee504cf2f54c8d12f27d7bfd8e" + integrity sha512-BuVA6lAEYtOpXO2xuHLohAzz8UNoQAxAqYRqh4QEEtU39Co+P1JBZhw6wXA9hMWp+JLcmrxWH8+UKcNSr443Fw== + dependencies: + "@types/hast" "^2.0.0" + hast-util-to-html "^8.0.0" + unified "^10.0.0" + relateurl@^0.2.7: version "0.2.7" resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" @@ -12019,6 +12377,15 @@ remark-emoji@^2.1.0: node-emoji "^1.10.0" unist-util-visit "^2.0.3" +remark-parse@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-10.0.1.tgz#6f60ae53edbf0cf38ea223fe643db64d112e0775" + integrity sha512-1fUyHr2jLsVOkhbvPRBJ5zTKZZyD6yZzYaWCS6BPBdQ8vEMBCH+9zNCDA6tET/zHCi/jLqjCWtlJZUPk+DbnFw== + dependencies: + "@types/mdast" "^3.0.0" + mdast-util-from-markdown "^1.0.0" + unified "^10.0.0" + remark-parse@^8.0.3: version "8.0.3" resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-8.0.3.tgz#9c62aa3b35b79a486454c690472906075f40c7e1" @@ -12041,6 +12408,16 @@ remark-parse@^8.0.3: vfile-location "^3.0.0" xtend "^4.0.1" +remark-rehype@^10.0.1: + version "10.1.0" + resolved "https://registry.yarnpkg.com/remark-rehype/-/remark-rehype-10.1.0.tgz#32dc99d2034c27ecaf2e0150d22a6dcccd9a6279" + integrity sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw== + dependencies: + "@types/hast" "^2.0.0" + "@types/mdast" "^3.0.0" + mdast-util-to-hast "^12.1.0" + unified "^10.0.0" + remark-rehype@^8.0.0: version "8.1.0" resolved "https://registry.yarnpkg.com/remark-rehype/-/remark-rehype-8.1.0.tgz#610509a043484c1e697437fa5eb3fd992617c945" @@ -12304,6 +12681,13 @@ rxjs@6.6.3, rxjs@^6.5.2, rxjs@^6.6.0, rxjs@^6.6.3: dependencies: tslib "^1.9.0" +sade@^1.7.3: + version "1.7.4" + resolved "https://registry.yarnpkg.com/sade/-/sade-1.7.4.tgz#ea681e0c65d248d2095c90578c03ca0bb1b54691" + integrity sha512-y5yauMD93rX840MwUJr7C1ysLFBgMspsdTo4UVrDg3fXDvtwOyIqykhVAAm6fk/3au77773itJStObgK+LKaiA== + dependencies: + mri "^1.1.0" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -12862,6 +13246,11 @@ space-separated-tokens@^1.0.0: resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz#85f32c3d10d9682007e917414ddc5c26d1aa6899" integrity sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA== +space-separated-tokens@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-2.0.1.tgz#43193cec4fb858a2ce934b7f98b7f2c18107098b" + integrity sha512-ekwEbFp5aqSPKaqeY1PGrlGQxPNaq+Cnx4+bE2D8sciBQrHpbwoBbawqTN2+6jPs9IdWxxiUcN0K2pkczD3zmw== + spawn-command@^0.0.2-1: version "0.0.2-1" resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" @@ -13134,6 +13523,14 @@ stringify-entities@^3.0.1: character-entities-legacy "^1.0.0" xtend "^4.0.0" +stringify-entities@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-4.0.2.tgz#13d113dc7449dc8ae4cb22c28883ee3fff8753e3" + integrity sha512-MTxTVcEkorNtBbNpoFJPEh0kKdM6+QbMjLbaxmvaPMmayOXdr/AIVIIJX7FReUVweRBFJfZepK4A4AKgwuFpMQ== + dependencies: + character-entities-html4 "^2.0.0" + character-entities-legacy "^3.0.0" + stringify-object@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" @@ -13589,6 +13986,11 @@ totalist@^1.0.0: resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== +totalist@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/totalist/-/totalist-2.0.0.tgz#db6f1e19c0fa63e71339bbb8fba89653c18c7eec" + integrity sha512-+Y17F0YzxfACxTyjfhnJQEe7afPA0GSpYlFkl2VFMxYP7jshQf9gXV7cH47EfToBumFThfKBvfAcoUn6fdNeRQ== + tough-cookie@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" @@ -13638,6 +14040,11 @@ trough@^1.0.0: resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== +trough@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/trough/-/trough-2.0.2.tgz#94a3aa9d5ce379fc561f6244905b3f36b7458d96" + integrity sha512-FnHq5sTMxC0sk957wHDzRnemFnNBvt/gSY99HzK8F7UP5WAbvP70yX5bd7CjEQkN+TjdxwI7g7lJ6podqrG2/w== + "true-case-path@^1.0.2": version "1.0.3" resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.3.tgz#f813b5a8c86b40da59606722b144e3225799f47d" @@ -13880,6 +14287,19 @@ unicode-property-aliases-ecmascript@^1.0.4: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== +unified@^10.0.0, unified@^10.1.1: + version "10.1.1" + resolved "https://registry.yarnpkg.com/unified/-/unified-10.1.1.tgz#345e349e3ab353ab612878338eb9d57b4dea1d46" + integrity sha512-v4ky1+6BN9X3pQrOdkFIPWAaeDsHPE1svRDxq7YpTc2plkIqFMwukfqM+l0ewpP9EfwARlt9pPFAeWYhHm8X9w== + dependencies: + "@types/unist" "^2.0.0" + bail "^2.0.0" + extend "^3.0.0" + is-buffer "^2.0.0" + is-plain-obj "^4.0.0" + trough "^2.0.0" + vfile "^5.0.0" + unified@^9.2.0: version "9.2.2" resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.2.tgz#67649a1abfc3ab85d2969502902775eb03146975" @@ -13938,11 +14358,23 @@ unist-builder@^2.0.0: resolved "https://registry.yarnpkg.com/unist-builder/-/unist-builder-2.0.3.tgz#77648711b5d86af0942f334397a33c5e91516436" integrity sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw== +unist-builder@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unist-builder/-/unist-builder-3.0.0.tgz#728baca4767c0e784e1e64bb44b5a5a753021a04" + integrity sha512-GFxmfEAa0vi9i5sd0R2kcrI9ks0r82NasRq5QHh2ysGngrc6GiqD5CDf1FjPenY4vApmFASBIIlk/jj5J5YbmQ== + dependencies: + "@types/unist" "^2.0.0" + unist-util-generated@^1.0.0: version "1.1.6" resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-1.1.6.tgz#5ab51f689e2992a472beb1b35f2ce7ff2f324d4b" integrity sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg== +unist-util-generated@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-2.0.0.tgz#86fafb77eb6ce9bfa6b663c3f5ad4f8e56a60113" + integrity sha512-TiWE6DVtVe7Ye2QxOVW9kqybs6cZexNwTwSMVgkfjEReqy/xwGpAXb99OxktoWwmL+Z+Epb0Dn8/GNDYP1wnUw== + unist-util-is@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-3.0.0.tgz#d9e84381c2468e82629e4a5be9d7d05a2dd324cd" @@ -13953,11 +14385,21 @@ unist-util-is@^4.0.0: resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-4.1.0.tgz#976e5f462a7a5de73d94b706bac1b90671b57797" integrity sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg== +unist-util-is@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-5.1.1.tgz#e8aece0b102fa9bc097b0fef8f870c496d4a6236" + integrity sha512-F5CZ68eYzuSvJjGhCLPL3cYx45IxkqXSetCcRgUXtbcm50X2L9oOWQlfUfDdAf+6Pd27YDblBfdtmsThXmwpbQ== + unist-util-position@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-3.1.0.tgz#1c42ee6301f8d52f47d14f62bbdb796571fa2d47" integrity sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA== +unist-util-position@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-4.0.1.tgz#f8484b2da19a897a0180556d160c28633070dbb9" + integrity sha512-mgy/zI9fQ2HlbOtTdr2w9lhVaiFUHWQnZrFF2EUoVOqtAUdzqMtNiD99qA5a1IcjWVR8O6aVYE9u7Z2z1v0SQA== + unist-util-remove-position@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz#5d19ca79fdba712301999b2b73553ca8f3b352cc" @@ -13994,6 +14436,22 @@ unist-util-visit-parents@^3.0.0: "@types/unist" "^2.0.0" unist-util-is "^4.0.0" +unist-util-visit-parents@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-4.1.1.tgz#e83559a4ad7e6048a46b1bdb22614f2f3f4724f2" + integrity sha512-1xAFJXAKpnnJl8G7K5KgU7FY55y3GcLIXqkzUj5QF/QVP7biUm0K0O2oqVkYsdjzJKifYeWn9+o6piAK2hGSHw== + dependencies: + "@types/unist" "^2.0.0" + unist-util-is "^5.0.0" + +unist-util-visit-parents@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-5.1.0.tgz#44bbc5d25f2411e7dfc5cecff12de43296aa8521" + integrity sha512-y+QVLcY5eR/YVpqDsLf/xh9R3Q2Y4HxkZTp7ViLDU6WtJCEcPmRzW1gpdWDCDIqIlhuPDXOgttqPlykrHYDekg== + dependencies: + "@types/unist" "^2.0.0" + unist-util-is "^5.0.0" + unist-util-visit@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.4.1.tgz#4724aaa8486e6ee6e26d7ff3c8685960d560b1e3" @@ -14010,6 +14468,24 @@ unist-util-visit@^2.0.0, unist-util-visit@^2.0.3: unist-util-is "^4.0.0" unist-util-visit-parents "^3.0.0" +unist-util-visit@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-3.1.0.tgz#9420d285e1aee938c7d9acbafc8e160186dbaf7b" + integrity sha512-Szoh+R/Ll68QWAyQyZZpQzZQm2UPbxibDvaY8Xc9SUtYgPsDzx5AWSk++UUt2hJuow8mvwR+rG+LQLw+KsuAKA== + dependencies: + "@types/unist" "^2.0.0" + unist-util-is "^5.0.0" + unist-util-visit-parents "^4.0.0" + +unist-util-visit@^4.0.0, unist-util-visit@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-4.1.0.tgz#f41e407a9e94da31594e6b1c9811c51ab0b3d8f5" + integrity sha512-n7lyhFKJfVZ9MnKtqbsqkQEk5P1KShj0+//V7mAcoI6bpbUjh3C/OG8HVD+pBihfh6Ovl01m8dkcv9HNqYajmQ== + dependencies: + "@types/unist" "^2.0.0" + unist-util-is "^5.0.0" + unist-util-visit-parents "^5.0.0" + universalify@^0.1.0, universalify@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -14214,6 +14690,17 @@ uuid@^8.3.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uvu@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/uvu/-/uvu-0.5.2.tgz#c145e7f4b5becf80099cf22fd8a4a05f0112b2c0" + integrity sha512-m2hLe7I2eROhh+tm3WE5cTo/Cv3WQA7Oc9f7JB6uWv+/zVKvfAm53bMyOoGOSZeQ7Ov2Fu9pLhFr7p07bnT20w== + dependencies: + dequal "^2.0.0" + diff "^5.0.0" + kleur "^4.0.3" + sade "^1.7.3" + totalist "^2.0.0" + v8-compile-cache@^2.0.3, v8-compile-cache@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" @@ -14265,7 +14752,7 @@ vfile-location@^3.0.0, vfile-location@^3.2.0: resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-3.2.0.tgz#d8e41fbcbd406063669ebf6c33d56ae8721d0f3c" integrity sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA== -vfile-message@*: +vfile-message@*, vfile-message@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-3.0.2.tgz#db7eaebe7fecb853010f2ef1664427f52baf8f74" integrity sha512-UUjZYIOg9lDRwwiBAuezLIsu9KlXntdxwG+nXnjuQAHvBpcX3x0eN8h+I7TkY5nkCXj+cWVp4ZqebtGBvok8ww== @@ -14291,6 +14778,16 @@ vfile@^4.0.0, vfile@^4.2.0: unist-util-stringify-position "^2.0.0" vfile-message "^2.0.0" +vfile@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/vfile/-/vfile-5.2.0.tgz#a32a646ff9251c274dbe8675644a39031025b369" + integrity sha512-ftCpb6pU8Jrzcqku8zE6N3Gi4/RkDhRwEXSWudzZzA2eEOn/cBpsfk9aulCUR+j1raRSAykYQap9u6j6rhUaCA== + dependencies: + "@types/unist" "^2.0.0" + is-buffer "^2.0.0" + unist-util-stringify-position "^3.0.0" + vfile-message "^3.0.0" + vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"