Skip to content

Commit f5ded5a

Browse files
committed
propagate renaming
1 parent 42afaf0 commit f5ded5a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

packages/core/src/awsService/ec2/activation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ import {
1919
openLogDocument,
2020
linkToLaunchInstance,
2121
} from './commands'
22-
import { EC2_LOGS_SCHEME } from '../../shared/constants'
22+
import { ec2LogsScheme } from '../../shared/constants'
2323
import { Ec2LogDocumentProvider } from './ec2LogDocumentProvider'
2424

2525
export async function activate(ctx: ExtContext): Promise<void> {
2626
ctx.extensionContext.subscriptions.push(
27-
vscode.workspace.registerTextDocumentContentProvider(EC2_LOGS_SCHEME, new Ec2LogDocumentProvider())
27+
vscode.workspace.registerTextDocumentContentProvider(ec2LogsScheme, new Ec2LogDocumentProvider())
2828
)
2929
ctx.extensionContext.subscriptions.push(
3030
Commands.register('aws.ec2.openTerminal', async (node?: Ec2InstanceNode) => {

packages/core/src/awsService/ec2/ec2LogDocumentProvider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import * as vscode from 'vscode'
66
import { Ec2Selection } from './prompter'
77
import { Ec2Client } from '../../shared/clients/ec2Client'
8-
import { EC2_LOGS_SCHEME } from '../../shared/constants'
8+
import { ec2LogsScheme } from '../../shared/constants'
99
import { UriSchema } from '../../shared/utilities/uriUtils'
1010

1111
export class Ec2LogDocumentProvider implements vscode.TextDocumentContentProvider {
@@ -27,7 +27,7 @@ export const ec2LogSchema = new UriSchema<Ec2Selection>(parseEc2Uri, formEc2Uri)
2727
function parseEc2Uri(uri: vscode.Uri): Ec2Selection {
2828
const parts = uri.path.split(':')
2929

30-
if (uri.scheme !== EC2_LOGS_SCHEME) {
30+
if (uri.scheme !== ec2LogsScheme) {
3131
throw new Error(`URI ${uri} is not parseable for EC2 Logs`)
3232
}
3333

@@ -38,5 +38,5 @@ function parseEc2Uri(uri: vscode.Uri): Ec2Selection {
3838
}
3939

4040
function formEc2Uri(selection: Ec2Selection): vscode.Uri {
41-
return vscode.Uri.parse(`${EC2_LOGS_SCHEME}:${selection.region}:${selection.instanceId}`)
41+
return vscode.Uri.parse(`${ec2LogsScheme}:${selection.region}:${selection.instanceId}`)
4242
}

packages/core/src/test/awsService/ec2/ec2LogDocumentProvider.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import assert from 'assert'
77
import * as vscode from 'vscode'
88
import * as sinon from 'sinon'
99
import { Ec2LogDocumentProvider } from '../../../awsService/ec2/ec2LogDocumentProvider'
10-
import { EC2_LOGS_SCHEME } from '../../../shared/constants'
10+
import { ec2LogsScheme } from '../../../shared/constants'
1111
import { Ec2Client } from '../../../shared/clients/ec2Client'
1212

1313
describe('LogDataDocumentProvider', async function () {
@@ -26,7 +26,7 @@ describe('LogDataDocumentProvider', async function () {
2626
})
2727

2828
it('fetches content for valid ec2 log URI', async function () {
29-
const validUri = vscode.Uri.parse(`${EC2_LOGS_SCHEME}:us-west1:instance1`)
29+
const validUri = vscode.Uri.parse(`${ec2LogsScheme}:us-west1:instance1`)
3030
const expectedContent = 'log content'
3131
sinon.stub(Ec2Client.prototype, 'getConsoleOutput').resolves({
3232
InstanceId: 'instance1',

0 commit comments

Comments
 (0)