Skip to content

build(deps): bump @types/node from 22.15.11 to 22.15.14 #2423

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

Merged
merged 3 commits into from
May 7, 2025
Merged
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
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/azure_auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class AzureAuth implements Authenticator {
public async applyAuthentication(user: User, opts: https.RequestOptions): Promise<void> {
const token = this.getToken(user);
if (token) {
opts.headers!.Authorization = `Bearer ${token}`;
opts.headers!['Authorization'] = `Bearer ${token}`;
}
}

Expand Down
28 changes: 14 additions & 14 deletions src/config_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ describe('KubeConfig', () => {
const opts = {} as RequestOptions;

await config.applyToHTTPSOptions(opts);
strictEqual(opts.headers!.Authorization, `Bearer ${token}`);
strictEqual(opts.headers!['Authorization'], `Bearer ${token}`);
});
it('should populate from auth provider', async () => {
const config = new KubeConfig();
Expand All @@ -982,11 +982,11 @@ describe('KubeConfig', () => {
const opts = {} as RequestOptions;

await config.applyToHTTPSOptions(opts);
strictEqual(opts.headers!.Authorization, `Bearer ${token}`);
strictEqual(opts.headers!['Authorization'], `Bearer ${token}`);
opts.headers = {};
opts.headers.Host = 'foo.com';
await config.applyToHTTPSOptions(opts);
strictEqual(opts.headers.Authorization, `Bearer ${token}`);
strictEqual(opts.headers!['Authorization'], `Bearer ${token}`);
});

it('should populate from auth provider without expirty', async () => {
Expand All @@ -1006,7 +1006,7 @@ describe('KubeConfig', () => {
const opts = {} as RequestOptions;

await config.applyToHTTPSOptions(opts);
strictEqual(opts.headers!.Authorization, `Bearer ${token}`);
strictEqual(opts.headers!['Authorization'], `Bearer ${token}`);
});

it('should populate rejectUnauthorized=false when skipTLSVerify is set', async () => {
Expand Down Expand Up @@ -1115,7 +1115,7 @@ describe('KubeConfig', () => {
);
const opts = {} as RequestOptions;
await config.applyToHTTPSOptions(opts);
strictEqual(opts.headers!.Authorization, `Bearer ${token}`);
strictEqual(opts.headers!['Authorization'], `Bearer ${token}`);
});

it('should exec with expired token', async () => {
Expand Down Expand Up @@ -1143,7 +1143,7 @@ describe('KubeConfig', () => {
);
const opts = {} as RequestOptions;
await config.applyToHTTPSOptions(opts);
strictEqual(opts.headers!.Authorization, `Bearer ${token}`);
strictEqual(opts.headers!['Authorization'], `Bearer ${token}`);
});

it('should exec without access-token', async () => {
Expand All @@ -1170,7 +1170,7 @@ describe('KubeConfig', () => {
);
const opts = {} as RequestOptions;
await config.applyToHTTPSOptions(opts);
strictEqual(opts.headers!.Authorization, `Bearer ${token}`);
strictEqual(opts.headers!['Authorization'], `Bearer ${token}`);
});
it('should exec without access-token', async () => {
// TODO: fix this test for Windows
Expand All @@ -1196,7 +1196,7 @@ describe('KubeConfig', () => {
);
const opts = {} as RequestOptions;
await config.applyToHTTPSOptions(opts);
strictEqual(opts.headers!.Authorization, `Bearer ${token}`);
strictEqual(opts.headers!['Authorization'], `Bearer ${token}`);
});
it('should exec succesfully with spaces in cmd', async () => {
// TODO: fix this test for Windows
Expand All @@ -1222,7 +1222,7 @@ describe('KubeConfig', () => {
);
const opts = {} as RequestOptions;
await config.applyToHTTPSOptions(opts);
strictEqual(opts.headers!.Authorization, `Bearer ${token}`);
strictEqual(opts.headers!['Authorization'], `Bearer ${token}`);
});
it('should exec with exec auth and env vars', async () => {
// TODO: fix this test for Windows
Expand Down Expand Up @@ -1255,7 +1255,7 @@ describe('KubeConfig', () => {
// TODO: inject the exec command here and validate env vars?
const opts = {} as RequestOptions;
await config.applyToHTTPSOptions(opts);
strictEqual(opts.headers!.Authorization, `Bearer ${token}`);
strictEqual(opts.headers!['Authorization'], `Bearer ${token}`);
});
it('should exec with exec auth', async () => {
// TODO: fix this test for Windows
Expand Down Expand Up @@ -1288,7 +1288,7 @@ describe('KubeConfig', () => {
// TODO: inject the exec command here?
const opts = {} as RequestOptions;
await config.applyToHTTPSOptions(opts);
strictEqual(opts.headers!.Authorization, `Bearer ${token}`);
strictEqual(opts.headers!['Authorization'], `Bearer ${token}`);
});
it('should exec with exec auth (other location)', async () => {
// TODO: fix this test for Windows
Expand Down Expand Up @@ -1316,7 +1316,7 @@ describe('KubeConfig', () => {
// TODO: inject the exec command here?
const opts = {} as RequestOptions;
await config.applyToHTTPSOptions(opts);
strictEqual(opts.headers!.Authorization, `Bearer ${token}`);
strictEqual(opts.headers!['Authorization'], `Bearer ${token}`);
});
it('should cache exec with name', async () => {
// TODO: fix this test for Windows
Expand Down Expand Up @@ -1776,7 +1776,7 @@ describe('KubeConfig', () => {
// Simulate token retrieval
const token = 'test-token';
opts.headers = opts.headers || {};
opts.headers.Authorization = `Bearer ${token}`;
opts.headers['Authorization'] = `Bearer ${token}`;
} else {
throw new Error('No custom configuration found');
}
Expand All @@ -1802,7 +1802,7 @@ describe('KubeConfig', () => {
const opts: RequestOptions = {};
await kc.applyToHTTPSOptions(opts);

strictEqual(opts.headers!.Authorization, 'Bearer test-token');
strictEqual(opts.headers!['Authorization'], 'Bearer test-token');
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/exec_auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class ExecAuth implements Authenticator {
if (!opts.headers) {
opts.headers = {} as OutgoingHttpHeaders;
}
opts.headers!.Authorization = `Bearer ${token}`;
opts.headers!['Authorization'] = `Bearer ${token}`;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/exec_auth_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ describe('ExecAuth', () => {
},
opts,
);
strictEqual(opts.headers?.Authorization, 'Bearer foo');
strictEqual(opts.headers!['Authorization'], 'Bearer foo');
});
it('should handle null credentials correctly', async () => {
const auth = new ExecAuth();
Expand Down
2 changes: 1 addition & 1 deletion src/file_auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class FileAuth implements Authenticator {
this.refreshToken(user.authProvider.config.tokenFile);
}
if (this.token) {
opts.headers!.Authorization = `Bearer ${this.token}`;
opts.headers!['Authorization'] = `Bearer ${this.token}`;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/gcp_auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class GoogleCloudPlatformAuth implements Authenticator {
public async applyAuthentication(user: User, opts: https.RequestOptions): Promise<void> {
const token = this.getToken(user);
if (token) {
opts.headers!.Authorization = `Bearer ${token}`;
opts.headers!['Authorization'] = `Bearer ${token}`;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/oidc_auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class OpenIDConnectAuth implements Authenticator {
): Promise<void> {
const token = await this.getToken(user, overrideClient);
if (token) {
opts.headers!.Authorization = `Bearer ${token}`;
opts.headers!['Authorization'] = `Bearer ${token}`;
}
}

Expand Down