Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
vcheung-stripe committed Nov 13, 2024
1 parent 43dd961 commit 633503f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 135 deletions.
34 changes: 0 additions & 34 deletions src/shellEscape.ts

This file was deleted.

31 changes: 0 additions & 31 deletions src/stripeTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,37 +50,6 @@ export class StripeTerminal {
));
}

private async createNewSplitTerminal(): Promise<vscode.Terminal | undefined> {
const lastTerminal = this.terminals[this.terminals.length - 1];
lastTerminal.show();

// Note that this splits off of the user's currently visible terminal. That's why `.show()` is
// called above.
await vscode.commands.executeCommand<vscode.Terminal>('workbench.action.terminal.split');

// After `workbench.action.terminal.split`, the activeTerminal becomes the newly split terminal.
// Note that there is no API guarantee for this behavior; a prior implementation relied on
// different behavior entirely. Because historically this behavior has been in flux, we should
// move to an official API for creating split terminals once that lands in vscode.
return vscode.window.activeTerminal;
}

private async createTerminal(): Promise<vscode.Terminal> {
if (this.terminals.length > 0) {
const terminal = await this.createNewSplitTerminal();
if (!terminal) {
throw new Error('Failed to create a terminal for this Stripe command. Please try again.');
}

this.terminals.push(terminal);
return terminal;
}

const terminal = vscode.window.createTerminal('Stripe');
this.terminals.push(terminal);
return terminal;
}

// The Stripe CLI supports a number of flags for every command. See https://stripe.com/docs/cli/flags
private getGlobalCLIFlags(): Array<string> {
const stripeConfig = vscode.workspace.getConfiguration('stripe');
Expand Down
70 changes: 0 additions & 70 deletions test/suite/shellEscape.test.ts

This file was deleted.

0 comments on commit 633503f

Please sign in to comment.