Skip to content

Commit 1854c70

Browse files
authored
Merge pull request #2862 from RedisInsight/feature/RI-4616-rdi-support
WIP: Feature/ri 4616 rdi support
2 parents 35fbfc6 + f49f356 commit 1854c70

File tree

603 files changed

+25147
-4659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

603 files changed

+25147
-4659
lines changed

.circleci/config.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,10 @@ jobs:
391391
- attach_workspace:
392392
at: .
393393
- run: sudo apt-get install net-tools
394+
- run:
395+
name: Clone mocked RDI server
396+
command: |
397+
git clone https://[email protected]/RedisInsight/RDI_server_mocked.git tests/e2e/rte/rdi
394398
- run:
395399
name: .AppImage tests
396400
command: |
@@ -483,6 +487,10 @@ jobs:
483487
name: Load built docker image from workspace
484488
command: |
485489
docker image load -i /tmp/release/docker/docker-linux-alpine.amd64.tar
490+
- run:
491+
name: Clone mocked RDI server
492+
command: |
493+
git clone https://[email protected]/RedisInsight/RDI_server_mocked.git tests/e2e/rte/rdi
486494
- run:
487495
name: Run tests
488496
command: |
@@ -1236,7 +1244,7 @@ workflows:
12361244
- Build docker image
12371245
- e2e-app-image:
12381246
name: E2ETest (AppImage)
1239-
parallelism: 2
1247+
parallelism: 1
12401248
requires:
12411249
- Build app - Linux (stage)
12421250
# Workflow for feature, bugfix, main branches

.circleci/e2e/test.app-image.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ yarn --cwd tests/e2e install
88

99
# create folder before tests run to prevent permissions issue
1010
mkdir -p tests/e2e/remote
11+
mkdir -p tests/e2e/rdi
1112

1213
# run rte
1314
docker-compose -f tests/e2e/rte.docker-compose.yml build

configs/webpack.config.renderer.dev.ts

Whitespace-only changes.

configs/webpack.config.renderer.prod.ts

Whitespace-only changes.

configs/webpack.config.web.common.ts

Whitespace-only changes.

configs/webpack.config.web.prod.ts

Whitespace-only changes.

jest-resolver.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const url = require('url')
2+
3+
module.exports = (request, options) => {
4+
// Remove any query parameters in the request path
5+
if (request.includes('?')) {
6+
return options.defaultResolver(url.parse(request).pathname, options)
7+
}
8+
9+
return options.defaultResolver(request, options)
10+
}

jest.config.cjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = {
1111
'\\.scss\\?inline$': '<rootDir>/redisinsight/__mocks__/scssRaw.js',
1212
'uiSrc/(.*)': '<rootDir>/redisinsight/ui/src/$1',
1313
'monaco-editor': '<rootDir>/redisinsight/__mocks__/monacoMock.js',
14+
'monaco-yaml': '<rootDir>/redisinsight/__mocks__/monacoYamlMock.js',
1415
unified: '<rootDir>/redisinsight/__mocks__/unified.js',
1516
'remark-parse': '<rootDir>/redisinsight/__mocks__/remarkParse.js',
1617
'remark-gfm': '<rootDir>/redisinsight/__mocks__/remarkGfm.js',
@@ -55,6 +56,7 @@ module.exports = {
5556
'<rootDir>/redisinsight/api',
5657
'<rootDir>/redisinsight/ui/src/packages',
5758
],
59+
resolver: '<rootDir>/jest-resolver.js',
5860
coverageThreshold: {
5961
global: {
6062
statements: 80,

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
"@types/ioredis": "^4.26.0",
108108
"@types/is-glob": "^4.0.2",
109109
"@types/jest": "^27.5.2",
110+
"@types/js-yaml": "^4.0.9",
110111
"@types/json-bigint": "^1.0.1",
111112
"@types/jsonpath": "^0.2.0",
112113
"@types/lodash": "^4.14.171",
@@ -172,7 +173,6 @@
172173
"lint-staged": "^10.2.11",
173174
"mini-css-extract-plugin": "2.7.2",
174175
"moment": "^2.29.3",
175-
"monaco-editor-webpack-plugin": "^6.0.0",
176176
"msw": "^1.3.2",
177177
"opencollective-postinstall": "^2.0.3",
178178
"patch-package": "^8.0.0",
@@ -202,6 +202,7 @@
202202
"vite-plugin-compression2": "^1.1.0",
203203
"vite-plugin-electron": "^0.28.6",
204204
"vite-plugin-electron-renderer": "^0.14.5",
205+
"vite-plugin-react-click-to-component": "^3.0.0",
205206
"vite-plugin-svgr": "^4.2.0",
206207
"webpack": "^5.91.0",
207208
"webpack-bundle-analyzer": "^4.10.2",
@@ -235,10 +236,14 @@
235236
"html-entities": "^2.3.2",
236237
"html-react-parser": "^1.2.4",
237238
"java-object-serialization": "^0.1.1",
239+
"js-yaml": "^4.1.0",
238240
"json-bigint": "^1.0.0",
239241
"jsonpath": "^1.1.1",
242+
"jszip": "^3.10.1",
240243
"lodash": "^4.17.21",
241244
"lz4js": "^0.2.0",
245+
"monaco-editor": "^0.48.0",
246+
"monaco-yaml": "^5.1.1",
242247
"msgpackr": "^1.10.1",
243248
"pako": "^2.1.0",
244249
"php-serialize": "^4.0.2",
@@ -249,7 +254,7 @@
249254
"react-dom": "^18.2.0",
250255
"react-hotkeys-hook": "^3.3.1",
251256
"react-jsx-parser": "^1.28.4",
252-
"react-monaco-editor": "^0.45.0",
257+
"react-monaco-editor": "^0.55.0",
253258
"react-redux": "^7.2.2",
254259
"react-rnd": "^10.3.5",
255260
"react-router-dom": "^5.2.0",

patches/monaco-yaml+5.1.1.patch

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/node_modules/monaco-yaml/yaml.worker.js b/node_modules/monaco-yaml/yaml.worker.js
2+
index c4e3806..7140210 100644
3+
--- a/node_modules/monaco-yaml/yaml.worker.js
4+
+++ b/node_modules/monaco-yaml/yaml.worker.js
5+
@@ -6709,11 +6709,11 @@ var YAMLHover = class {
6+
\`\`\`${example}\`\`\``;
7+
});
8+
}
9+
- if (result.length > 0 && schema.schema.url) {
10+
- result += `
11+
+// if (result.length > 0 && schema.schema.url) {
12+
+// result += `
13+
14+
-Source: [${getSchemaName(schema.schema)}](${schema.schema.url})`;
15+
- }
16+
+// Source: [${getSchemaName(schema.schema)}](${schema.schema.url})`;
17+
+// }
18+
return createHover(result);
19+
}
20+
return null;

0 commit comments

Comments
 (0)