Skip to content

Commit 60723d8

Browse files
committed
Merge branch 'main' into feature/RI-4325_Fix_dependabot_issues
# Conflicts: # package.json
2 parents caaaa3e + bd6a48c commit 60723d8

File tree

162 files changed

+1202
-1150
lines changed

Some content is hidden

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

162 files changed

+1202
-1150
lines changed

.circleci/config.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ aliases:
9191
- mods-preview # OSS Standalone and all preview modules
9292
- oss-st-6-tls # OSS Standalone v6 with TLS enabled
9393
- oss-st-6-tls-auth # OSS Standalone v6 with TLS auth required
94-
- oss-st-6-tls-auth-ssh # OSS Standalone v6 with TLS auth required through ssh
94+
# - oss-st-6-tls-auth-ssh # OSS Standalone v6 with TLS auth required through ssh
9595
- oss-clu # OSS Cluster
9696
- oss-clu-tls # OSS Cluster with TLS enabled
9797
- oss-sent # OSS Sentinel
@@ -565,7 +565,8 @@ jobs:
565565
- release/redisstack
566566
macosx:
567567
macos:
568-
xcode: 14.2.0
568+
xcode: 14.3.0
569+
resource_class: macos.x86.medium.gen2
569570
parameters:
570571
env:
571572
description: Build environment (stage || prod)

electron-builder.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"type": "distribution",
3434
"hardenedRuntime": true,
3535
"darkModeSupport": true,
36-
"bundleVersion": "3",
36+
"bundleVersion": "9",
3737
"icon": "resources/icon.icns",
3838
"artifactName": "${productName}-${os}-${arch}.${ext}",
3939
"entitlements": "resources/entitlements.mac.plist",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"cross-env": "^7.0.2",
153153
"css-loader": "^5.0.1",
154154
"css-minimizer-webpack-plugin": "^2.0.0",
155-
"electron": "^19.0.7",
155+
"electron": "19.0.7",
156156
"electron-builder": "^23.6.0",
157157
"electron-builder-notarize": "^1.5.1",
158158
"electron-debug": "^3.2.0",

redisinsight/about-panel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const ICON_PATH = app.isPackaged
88
export default {
99
applicationName: 'RedisInsight-v2',
1010
applicationVersion:
11-
`${app.getVersion() || '2.22.1'}${process.env.NODE_ENV !== 'production' ? `-dev-${process.getCreationTime()}` : ''}`,
11+
`${app.getVersion() || '2.24.0'}${process.env.NODE_ENV !== 'production' ? `-dev-${process.getCreationTime()}` : ''}`,
1212
copyright: `Copyright © ${new Date().getFullYear()} Redis Ltd.`,
1313
iconPath: ICON_PATH,
1414
};

redisinsight/api/config/default.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default {
5757
tlsKey: process.env.SERVER_TLS_KEY,
5858
staticContent: !!process.env.SERVER_STATIC_CONTENT || false,
5959
buildType: process.env.BUILD_TYPE || 'ELECTRON',
60-
appVersion: process.env.APP_VERSION || '2.22.0',
60+
appVersion: process.env.APP_VERSION || '2.24.0',
6161
requestTimeout: parseInt(process.env.REQUEST_TIMEOUT, 10) || 25000,
6262
excludeRoutes: [],
6363
excludeAuthRoutes: [],

redisinsight/api/config/swagger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const SWAGGER_CONFIG: Omit<OpenAPIObject, 'paths'> = {
55
info: {
66
title: 'RedisInsight Backend API',
77
description: 'RedisInsight Backend API',
8-
version: '2.22.1',
8+
version: '2.24.0',
99
},
1010
tags: [],
1111
};

redisinsight/api/src/modules/browser/dto/keys.dto.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,20 @@ export class GetKeysInfoDto {
176176
@IsRedisString({ each: true })
177177
@RedisStringType({ each: true })
178178
keys: RedisString[];
179+
180+
@ApiPropertyOptional({
181+
description:
182+
'Iterate through the database looking for keys of a specific type.',
183+
enum: RedisDataType,
184+
example: RedisDataType.Hash,
185+
})
186+
@IsEnum(RedisDataType, {
187+
message: `destination must be a valid enum value. Valid values: ${Object.values(
188+
RedisDataType,
189+
)}.`,
190+
})
191+
@IsOptional()
192+
type?: RedisDataType;
179193
}
180194

181195
export class GetKeyInfoDto extends KeyDto {}

redisinsight/api/src/modules/browser/services/keys-business/keys-business.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export class KeysBusinessService {
176176
try {
177177
const client = await this.browserTool.getRedisClient(clientMetadata);
178178
const scanner = this.scanner.getStrategy(client.isCluster ? ConnectionType.CLUSTER : ConnectionType.STANDALONE);
179-
const result = await scanner.getKeysInfo(client, dto.keys);
179+
const result = await scanner.getKeysInfo(client, dto.keys, dto.type);
180180

181181
return plainToClass(GetKeyInfoResponse, result);
182182
} catch (error) {

redisinsight/api/src/modules/browser/services/keys-business/scanner/strategies/cluster.strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class ClusterStrategy extends AbstractStrategy {
9494
);
9595
} else {
9696
// eslint-disable-next-line no-param-reassign
97-
node.keys = node.keys.map((name) => ({ name }));
97+
node.keys = node.keys.map((name) => ({ name, type: args.type || undefined }));
9898
}
9999
}),
100100
);

redisinsight/api/src/modules/browser/services/keys-business/scanner/strategies/standalone.strategy.spec.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ describe('Standalone Scanner Strategy', () => {
101101
null,
102102
);
103103
});
104-
it('should return keys names only', async () => {
104+
it('should return keys names and type only', async () => {
105105
const args = {
106106
...getKeysDto, type: 'string', match: 'pattern*', keysInfo: false,
107107
};
@@ -126,7 +126,7 @@ describe('Standalone Scanner Strategy', () => {
126126
...mockNodeEmptyResult,
127127
total: 1,
128128
scanned: getKeysDto.count,
129-
keys: [{ name: getKeyInfoResponse.name }],
129+
keys: [{ name: getKeyInfoResponse.name, type: getKeyInfoResponse.type }],
130130
},
131131
]);
132132
});
@@ -384,7 +384,7 @@ describe('Standalone Scanner Strategy', () => {
384384
.fn()
385385
.mockResolvedValue([getKeyInfoResponse]);
386386

387-
const result = await strategy.getKeys(mockBrowserClientMetadata, dto);
387+
const result = await strategy.getKeys(mockBrowserClientMetadata, dto, dto.type);
388388

389389
expect(result).toEqual([
390390
{
@@ -394,9 +394,11 @@ describe('Standalone Scanner Strategy', () => {
394394
keys: [getKeyInfoResponse],
395395
},
396396
]);
397-
expect(strategy.getKeysInfo).toHaveBeenCalledWith(nodeClient, [
398-
Buffer.from(key),
399-
]);
397+
expect(strategy.getKeysInfo).toHaveBeenCalledWith(
398+
nodeClient,
399+
[Buffer.from(key)],
400+
dto.type,
401+
);
400402
expect(strategy.scan).not.toHaveBeenCalled();
401403
});
402404
it('should find exact key when match is escaped glob patter', async () => {
@@ -406,7 +408,7 @@ describe('Standalone Scanner Strategy', () => {
406408
.fn()
407409
.mockResolvedValue([{ ...getKeyInfoResponse, name: mockSearchPattern }]);
408410

409-
const result = await strategy.getKeys(mockBrowserClientMetadata, dto);
411+
const result = await strategy.getKeys(mockBrowserClientMetadata, dto, dto.type);
410412

411413
expect(result).toEqual([
412414
{
@@ -416,7 +418,11 @@ describe('Standalone Scanner Strategy', () => {
416418
keys: [{ ...getKeyInfoResponse, name: mockSearchPattern }],
417419
},
418420
]);
419-
expect(strategy.getKeysInfo).toHaveBeenCalledWith(nodeClient, [Buffer.from(mockSearchPattern)]);
421+
expect(strategy.getKeysInfo).toHaveBeenCalledWith(
422+
nodeClient,
423+
[Buffer.from(mockSearchPattern)],
424+
dto.type,
425+
);
420426
expect(strategy.scan).not.toHaveBeenCalled();
421427
});
422428
it('should find exact key with correct type', async () => {

0 commit comments

Comments
 (0)