Skip to content

Commit 66c842b

Browse files
Merge pull request #3745 from RedisInsight/feature/dynamic-dependencies
Feature/dynamic dependencies
2 parents f578cd9 + 3dcde61 commit 66c842b

File tree

410 files changed

+8977
-2985
lines changed

Some content is hidden

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

410 files changed

+8977
-2985
lines changed

.github/redisinsight_browser.png

-547 KB
Loading

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,5 @@ licenses
8585

8686
# caches
8787
.temp_cache
88+
89+
static/

jest.config.cjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require('dotenv').config({ path: './redisinsight/ui/.env.test' })
2+
13
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
24
module.exports = {
35
testEnvironmentOptions: {
@@ -65,4 +67,7 @@ module.exports = {
6567
lines: 80,
6668
},
6769
},
70+
globals: {
71+
riConfig: {}
72+
}
6873
};

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
"@teamsupercell/typings-for-css-modules-loader": "^2.4.0",
104104
"@testing-library/jest-dom": "^6.2.0",
105105
"@testing-library/react": "^13.3.0",
106+
"@testing-library/react-hooks": "^8.0.1",
106107
"@testing-library/user-event": "^14.4.3",
107108
"@types/classnames": "^2.2.11",
108109
"@types/d3": "^7.4.0",
@@ -147,6 +148,7 @@
147148
"css-minimizer-webpack-plugin": "^6.0.0",
148149
"csv-parser": "^3.0.0",
149150
"csv-stringify": "^6.4.0",
151+
"dotenv": "^16.4.5",
150152
"electron": "33.2.0",
151153
"electron-builder": "^24.13.3",
152154
"electron-builder-notarize": "^1.5.2",

redisinsight/api/config/default.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ export default {
8585
excludeRoutes: [],
8686
excludeAuthRoutes: [],
8787
},
88+
statics: {
89+
initDefaults: process.env.RI_STATICS_INIT_DEFAULTS ? process.env.RI_STATICS_INIT_DEFAULTS === 'true' : true,
90+
autoUpdate: process.env.RI_STATICS_AUTO_UPDATE ? process.env.RI_STATICS_AUTO_UPDATE === 'true' : true,
91+
},
8892
encryption: {
8993
keytar: process.env.RI_ENCRYPTION_KEYTAR ? process.env.RI_ENCRYPTION_KEYTAR === 'true' : true, // enabled by default
9094
// !!! DO NOT CHANGE THIS VARIABLE FOR REDIS INSIGHT!!! MUST BE "redisinsight"!!! It's only for vscode extension
@@ -93,9 +97,14 @@ export default {
9397
encryptionAlgorithm: process.env.RI_ENCRYPTION_ALGORYTHM || 'aes-256-cbc',
9498
},
9599
sockets: {
96-
cors: process.env.RI_SOCKETS_CORS ? process.env.RI_SOCKETS_CORS === 'true' : false,
97100
serveClient: process.env.RI_SOCKETS_SERVE_CLIENT ? process.env.RI_SOCKETS_SERVE_CLIENT === 'true' : false,
98101
path: socketPath,
102+
namespacePrefix: process.env.RI_SOCKETS_NAMESPACE_PREFIX ?? '',
103+
cors: {
104+
enabled: process.env.RI_SOCKETS_CORS === 'true',
105+
origin: process.env.RI_SOCKETS_CORS_ORIGIN ? process.env.RI_SOCKETS_CORS_ORIGIN : '*',
106+
credentials: process.env.RI_SOCKETS_CORS_CREDENTIALS === 'true' ? true : false,
107+
},
99108
},
100109
db: {
101110
database: join(homedir, 'redisinsight.db'),

redisinsight/api/config/development.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ export default {
33
env: 'development',
44
},
55
sockets: {
6-
cors: true,
6+
cors: {
7+
enabled: true,
8+
},
79
},
810
db: {
911
synchronize: process.env.RI_DB_SYNC ? process.env.RI_DB_SYNC === 'true' : true,

redisinsight/api/config/logger.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ if (LOGGER_CONFIG.stdout) {
1919
format: format.combine(
2020
sensitiveDataFormatter({ omitSensitiveData: LOGGER_CONFIG.omitSensitiveData }),
2121
format.timestamp(),
22-
nestWinstonModuleUtilities.format.nestLike(),
22+
nestWinstonModuleUtilities.format.nestLike('Redis Insight', {
23+
colors: true,
24+
prettyPrint: true,
25+
processId: true,
26+
appName: true,
27+
}),
2328
),
2429
}),
2530
);

redisinsight/api/config/test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ export default {
2121
url: process.env.RI_FEATURES_CONFIG_URL
2222
|| 'http://localhost:5551/remote/features-config.json',
2323
},
24+
analytics: {
25+
startEvents: process.env.RI_ANALYTICS_START_EVENTS ? process.env.RI_ANALYTICS_START_EVENTS === 'true' : true,
26+
},
2427
cloud: {
2528
apiUrl: process.env.RI_CLOUD_API_URL || 'https://app-sm.k8s-cloudapi.sm-qa.qa.redislabs.com/api/v1',
2629
apiToken: process.env.RI_CLOUD_API_TOKEN || 'token',

redisinsight/api/src/__mocks__/database-recommendation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const mockDatabaseRecommendationService = () => ({
3434
create: jest.fn(),
3535
list: jest.fn(),
3636
check: jest.fn(),
37+
checkMulti: jest.fn(),
3738
read: jest.fn(),
3839
});
3940

redisinsight/api/src/__mocks__/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ export * from './database-info';
4242
export * from './cloud-job';
4343
export * from './rdi';
4444
export * from './workbench';
45+
export * from './utm';

0 commit comments

Comments
 (0)