Skip to content

Commit 32a5d47

Browse files
authored
Apply suggestions from code review
1 parent bb100a1 commit 32a5d47

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ import {
114114
import { isEmptyObj } from './internal/utils/values';
115115

116116
const environments = {
117-
production: 'https://api.kernel.com/',
117+
production: 'https://api.onkernel.com/',
118118
development: 'https://localhost:3001/',
119119
};
120120
type Environment = keyof typeof environments;
@@ -129,7 +129,7 @@ export interface ClientOptions {
129129
* Specifies the environment to use for the API.
130130
*
131131
* Each environment maps to a different base URL:
132-
* - `production` corresponds to `https://api.kernel.com/`
132+
* - `production` corresponds to `https://api.onkernel.com/`
133133
* - `development` corresponds to `https://localhost:3001/`
134134
*/
135135
environment?: Environment | undefined;
@@ -226,7 +226,7 @@ export class Kernel {
226226
*
227227
* @param {string | undefined} [opts.apiKey=process.env['KERNEL_API_KEY'] ?? undefined]
228228
* @param {Environment} [opts.environment=production] - Specifies the environment URL to use for the API.
229-
* @param {string} [opts.baseURL=process.env['KERNEL_BASE_URL'] ?? https://api.kernel.com/] - Override the default base URL for the API.
229+
* @param {string} [opts.baseURL=process.env['KERNEL_BASE_URL'] ?? https://api.onkernel.com/] - Override the default base URL for the API.
230230
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
231231
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
232232
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.

tests/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,13 @@ describe('instantiate client', () => {
322322
test('empty env variable', () => {
323323
process.env['KERNEL_BASE_URL'] = ''; // empty
324324
const client = new Kernel({ apiKey: 'My API Key' });
325-
expect(client.baseURL).toEqual('https://api.kernel.com/');
325+
expect(client.baseURL).toEqual('https://api.onkernel.com/');
326326
});
327327

328328
test('blank env variable', () => {
329329
process.env['KERNEL_BASE_URL'] = ' '; // blank
330330
const client = new Kernel({ apiKey: 'My API Key' });
331-
expect(client.baseURL).toEqual('https://api.kernel.com/');
331+
expect(client.baseURL).toEqual('https://api.onkernel.com/');
332332
expect(client.baseURL).toEqual('https://api.onkernel.com/');
333333
});
334334

0 commit comments

Comments
 (0)