Skip to content

Commit 9a27bc7

Browse files
Merge branch 'main' into feature/e2e
2 parents 4a11b29 + 331150e commit 9a27bc7

File tree

171 files changed

+1681
-8222
lines changed

Some content is hidden

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

171 files changed

+1681
-8222
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ jobs:
432432
exit 0;
433433
fi
434434
435-
SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:<< parameters.env >>
435+
UPGRADES_LINK=$UPGRADES_LINK_STAGE SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:<< parameters.env >>
436436
- persist_to_workspace:
437437
root: .
438438
paths:
@@ -474,7 +474,7 @@ jobs:
474474
exit 0;
475475
fi
476476
477-
SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:<< parameters.env >>
477+
UPGRADES_LINK=$UPGRADES_LINK_STAGE SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:<< parameters.env >>
478478
rm -rf release/mac
479479
no_output_timeout: 15m
480480
- persist_to_workspace:
@@ -514,7 +514,7 @@ jobs:
514514
exit 0;
515515
fi
516516
517-
SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:<< parameters.env >>
517+
UPGRADES_LINK=$UPGRADES_LINK_STAGE SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:<< parameters.env >>
518518
rm -rf release/win-unpacked
519519
shell: bash.exe
520520
no_output_timeout: 20m
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main, latest, release/*, codeql ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
schedule:
21+
- cron: '37 11 * * 3'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'javascript' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v2
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@v1
57+
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
60+
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
64+
65+
#- run: |
66+
# make bootstrap
67+
# make release
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v1

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ WORKDIR /usr/src/app
1818
COPY redisinsight/api/package.json redisinsight/api/yarn.lock ./
1919
RUN yarn install
2020
COPY redisinsight/api ./
21-
COPY --from=front /usr/src/app/redisinsight/api/src/static ./src/static
21+
COPY --from=front /usr/src/app/redisinsight/api/static ./static
22+
COPY --from=front /usr/src/app/redisinsight/api/defaults ./defaults
2223
RUN yarn run build:prod
2324

2425
FROM node:14.17-slim

configs/webpack.config.main.prod.babel.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import path from 'path';
22
import webpack from 'webpack';
33
import { merge } from 'webpack-merge';
4-
import TerserPlugin from 'terser-webpack-plugin';
54
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
65
import baseConfig from './webpack.config.base';
76
import DeleteSourceMaps from '../scripts/DeleteSourceMaps';

electron-builder.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,14 @@
6363
"extraResources": [
6464
"./resources/**",
6565
{
66-
"from": "./redisinsight/api/src/static",
66+
"from": "./redisinsight/api/static",
6767
"to": "static",
6868
"filter": ["**/*"]
69+
},
70+
{
71+
"from": "./redisinsight/api/defaults",
72+
"to": "defaults",
73+
"filter": ["**/*"]
6974
}
7075
]
7176
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
"build:main": "webpack --config ./configs/webpack.config.main.prod.babel.js",
1414
"build:main:stage": "webpack --config ./configs/webpack.config.main.stage.babel.js",
1515
"build:web": "webpack --config ./configs/webpack.config.web.prod.babel.js",
16-
"build:statics": "sh ./scripts/build-statics.sh",
17-
"build:statics:win": "./scripts/build-statics.cmd",
16+
"build:defaults": "yarn --cwd redisinsight/api build:defaults",
17+
"build:statics": "yarn build:defaults & sh ./scripts/build-statics.sh",
18+
"build:statics:win": "yarn build:defaults & ./scripts/build-statics.cmd",
1819
"build:renderer": "webpack --config ./configs/webpack.config.renderer.prod.babel.js",
1920
"build:renderer:stage": "webpack --config ./configs/webpack.config.renderer.stage.babel.js",
2021
"rebuild": "electron-rebuild --parallel --types prod,dev,optional --module-dir redisinsight/ui",

redisinsight/api/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# compiled output
22
/dist
33
/node_modules
4-
/src/static
4+
/static
5+
/defaults
56

67
# Logs
78
logs

redisinsight/api/config/default.ts

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,21 @@ const staticDir = process.env.BUILD_TYPE === 'ELECTRON' && process['resourcesPat
66
? join(process['resourcesPath'], 'static')
77
: join(__dirname, '..', 'static');
88

9+
const defaultsDir = process.env.BUILD_TYPE === 'ELECTRON' && process['resourcesPath']
10+
? join(process['resourcesPath'], 'defaults')
11+
: join(__dirname, '..', 'defaults');
12+
913
export default {
1014
dir_path: {
1115
homedir,
1216
staticDir,
17+
defaultsDir,
1318
logs: join(homedir, 'logs'),
1419
defaultPlugins: join(staticDir, 'plugins'),
1520
customPlugins: join(homedir, 'plugins'),
1621
pluginsAssets: join(staticDir, 'resources', 'plugins'),
1722
commands: join(homedir, 'commands'),
23+
defaultCommandsDir: join(defaultsDir, 'commands'),
1824
caCertificates: join(homedir, 'ca_certificates'),
1925
clientCertificates: join(homedir, 'client_certificates'),
2026
},
@@ -72,18 +78,36 @@ export default {
7278
omitSensitiveData: process.env.LOGGER_OMIT_DATA ? process.env.LOGGER_OMIT_DATA === 'true' : true,
7379
pipelineSummaryLimit: parseInt(process.env.LOGGER_PIPELINE_SUMMARY_LIMIT, 10) || 5,
7480
},
75-
commands: {
76-
mainUrl: process.env.COMMANDS_MAIN_URL
77-
|| 'https://raw.githubusercontent.com/redis/redis-doc/master/commands.json',
78-
redisearchUrl: process.env.COMMANDS_REDISEARCH_URL
79-
|| 'https://raw.githubusercontent.com/RediSearch/RediSearch/master/commands.json',
80-
redijsonUrl: process.env.COMMANDS_REDIJSON_URL
81-
|| 'https://raw.githubusercontent.com/RedisJSON/RedisJSON/master/commands.json',
82-
redistimeseriesUrl: process.env.COMMANDS_REDISTIMESERIES_URL
83-
|| 'https://raw.githubusercontent.com/RedisTimeSeries/RedisTimeSeries/master/commands.json',
84-
redisaiUrl: process.env.COMMANDS_REDISAI_URL
85-
|| 'https://raw.githubusercontent.com/RedisAI/RedisAI/master/commands.json',
86-
redisgraphUrl: process.env.COMMANDS_REDISGRAPH_URL
87-
|| 'https://raw.githubusercontent.com/RedisGraph/RedisGraph/master/commands.json',
88-
},
81+
commands: [
82+
{
83+
name: 'main',
84+
url: process.env.COMMANDS_MAIN_URL
85+
|| 'https://raw.githubusercontent.com/redis/redis-doc/master/commands.json',
86+
},
87+
{
88+
name: 'redisearch',
89+
url: process.env.COMMANDS_REDISEARCH_URL
90+
|| 'https://raw.githubusercontent.com/RediSearch/RediSearch/master/commands.json',
91+
},
92+
{
93+
name: 'redijson',
94+
url: process.env.COMMANDS_REDIJSON_URL
95+
|| 'https://raw.githubusercontent.com/RedisJSON/RedisJSON/master/commands.json',
96+
},
97+
{
98+
name: 'redistimeseries',
99+
url: process.env.COMMANDS_REDISTIMESERIES_URL
100+
|| 'https://raw.githubusercontent.com/RedisTimeSeries/RedisTimeSeries/master/commands.json',
101+
},
102+
{
103+
name: 'redisai',
104+
url: process.env.COMMANDS_REDISAI_URL
105+
|| 'https://raw.githubusercontent.com/RedisAI/RedisAI/master/commands.json',
106+
},
107+
{
108+
name: 'redisgraph',
109+
url: process.env.COMMANDS_REDISGRAPH_URL
110+
|| 'https://raw.githubusercontent.com/RedisGraph/RedisGraph/master/commands.json',
111+
},
112+
],
89113
};

redisinsight/api/config/production.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { join } from 'path';
22

3-
const homedir = join(require('os').homedir(), process.env.APP_FOLDER_NAME || '.redisinsight-v2.0');
3+
const homedir = join(require('os').homedir(), process.env.APP_FOLDER_NAME || '.redisinsight-preview');
44

55
export default {
66
dir_path: {

redisinsight/api/nest-cli.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33
"sourceRoot": "src",
44
"compilerOptions": {
55
"assets": [
6-
"static/**/*"
6+
{
7+
"include": "../static/**/*",
8+
"outDir": "dist/static"
9+
},
10+
{
11+
"include": "../defaults/**/*",
12+
"outDir": "dist/defaults"
13+
}
714
]
815
}
916
}

0 commit comments

Comments
 (0)