Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump std and fix isTTY & actions deprecation warning #20

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export { join as joinPath } from "https://deno.land/std@0.202.0/path/mod.ts";
export { join as joinPath } from "https://deno.land/std@0.214.0/path/mod.ts";

export { parse as parseYaml } from "https://deno.land/std@0.202.0/yaml/mod.ts";
export { parse as parseYaml } from "https://deno.land/std@0.214.0/yaml/mod.ts";

export { TextLineStream } from "https://deno.land/std@0.202.0/streams/text_line_stream.ts";
export { readableStreamFromReader } from "https://deno.land/std@0.202.0/streams/readable_stream_from_reader.ts";
export { TextLineStream } from "https://deno.land/std@0.214.0/streams/text_line_stream.ts";
2 changes: 1 addition & 1 deletion lib/kubeconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class KubeConfigContext {
const execConfig = this.user['exec'];
if (!execConfig) throw new Error(`BUG: execConfig disappeared`);

const isTTY = Deno.isatty(Deno.stdin.rid);
const isTTY = Deno.stdin.isTerminal();
const stdinPolicy = execConfig.interactiveMode ?? 'IfAvailable';
if (stdinPolicy == 'Always' && !isTTY) {
throw new Error(`KubeConfig exec plugin wants a TTY, but stdin is not a TTY`);
Expand Down
2 changes: 1 addition & 1 deletion lib/stream-transformers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { JSONObject, WatchEvent } from './contract.ts';

function parseJsonLine(line: string, controller: TransformStreamDefaultController<JSONObject>) {
if (!line.startsWith('{')) {
throw new Error(`JSON line doesn't start with {: `+line.slice(0, 256));
throw new Error(`JSON line doesn't start with {: ${line.slice(0, 256)}`);
}
controller.enqueue(JSON.parse(line));
}
Expand Down
2 changes: 1 addition & 1 deletion transports/via-kubeconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class KubeConfigRestClient implements RestClient {
await KubeConfig.getInClusterConfig());
}

static async forKubectlProxy(): Promise<RestClient> {
static forKubectlProxy(): Promise<RestClient> {
return this.forKubeConfig(
KubeConfig.getSimpleUrlConfig({
baseUrl: 'http://localhost:8001',
Expand Down
2 changes: 1 addition & 1 deletion transports/via-kubectl-raw.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readableStreamFromReader, TextLineStream } from '../deps.ts';
import { TextLineStream } from '../deps.ts';
import { RestClient, RequestOptions, JSONValue, KubernetesTunnel } from '../lib/contract.ts';
import { JsonParsingTransformer } from '../lib/stream-transformers.ts';

Expand Down
Loading