Skip to content

Commit

Permalink
removed old command
Browse files Browse the repository at this point in the history
  • Loading branch information
justinwilaby committed Mar 19, 2024
1 parent cbb7c4e commit a3e23c0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 575 deletions.
8 changes: 3 additions & 5 deletions packages/cli/src/commands/redis/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import {Client} from 'ssh2'
import Parser = require('redis-parser')
import type {Writable} from 'node:stream'
import portfinder = require('portfinder')
import {ClientRequestArgs} from 'node:http'
import {urlToHttpOptions} from 'url'
import {getRedisAddon, getRedisFormation, RedisFormation} from '../../lib/redis/utils'
import confirmApp from '../../lib/apps/confirm-app'
import * as tls from 'tls'
Expand All @@ -18,7 +16,7 @@ import * as net from 'net'

const REPLY_OK = 'OK'

async function redisCLI(uri: ClientRequestArgs, client: Writable): Promise<void> {
async function redisCLI(uri: URL, client: Writable): Promise<void> {
const io = readline.createInterface(process.stdin, process.stdout)
const reply = new Parser({
returnReply(reply) {
Expand Down Expand Up @@ -74,7 +72,7 @@ async function redisCLI(uri: ClientRequestArgs, client: Writable): Promise<void>
},
})
let state = 'connect'
client.write(`AUTH ${uri.auth?.split(':')[1]}\n`)
client.write(`AUTH ${uri.password}\n`)
io.setPrompt(uri.host + '> ')
io.on('line', function (line) {
switch (line.split(' ')[0]) {
Expand Down Expand Up @@ -133,7 +131,7 @@ async function bastionConnect(uri: URL, bastions: string, config: Record<string,
stream.on('close', () => tunnel.end())
stream.on('end', () => client.end())

return redisCLI(urlToHttpOptions(uri), client)
return redisCLI(uri, client)
}

function match(config: Record<string, unknown>, lookup: RegExp): string | null {
Expand Down
232 changes: 0 additions & 232 deletions packages/redis-v5/commands/cli.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/redis-v5/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
exports.commands = [
require('./commands/cli'),
require('./commands/wait'),
require('./commands/promote'),
require('./commands/timeout'),
Expand Down
Loading

0 comments on commit a3e23c0

Please sign in to comment.