Skip to content

Commit f62d2cf

Browse files
authored
Merge pull request #12 from onkernel/release-please--branches--main--changes--next--components--sdk
release: 0.1.0-alpha.10
2 parents f2239d5 + e969487 commit f62d2cf

File tree

8 files changed

+48
-25
lines changed

8 files changed

+48
-25
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.9"
2+
".": "0.1.0-alpha.10"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 4
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-2af763aab4c314b382e1123edc4ee3d51c0fe7977730ce6776b9fb09b29fe291.yml
3-
openapi_spec_hash: be02256478be81fa3f649076879850bc
4-
config_hash: eab40627b734534462ae3b8ccd8b263b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-07d481d1498bf9677437b555e9ec2d843d50107faa7501e4c430a32b1f3c3343.yml
3+
openapi_spec_hash: 296f78d82afbac95fad12c5eabd71f18
4+
config_hash: 2c8351ba6611ce4a352e248405783846

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 0.1.0-alpha.10 (2025-05-14)
4+
5+
Full Changelog: [v0.1.0-alpha.9...v0.1.0-alpha.10](https://github.com/onkernel/kernel-node-sdk/compare/v0.1.0-alpha.9...v0.1.0-alpha.10)
6+
7+
### Features
8+
9+
* **api:** update via SDK Studio ([3b78bc2](https://github.com/onkernel/kernel-node-sdk/commit/3b78bc20c94d4e6cfca144da4096b32fe6c5d5dc))
10+
11+
12+
### Chores
13+
14+
* **package:** remove engines ([d4d2eb2](https://github.com/onkernel/kernel-node-sdk/commit/d4d2eb2ab59cc5e4d237fddd143388a4348d51ba))
15+
316
## 0.1.0-alpha.9 (2025-05-12)
417

518
Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/onkernel/kernel-node-sdk/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)

README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const client = new Kernel({
2929

3030
async function main() {
3131
const response = await client.apps.deploy({
32+
entrypointRelPath: 'app.py',
3233
file: fs.createReadStream('path/to/file'),
3334
version: 'REPLACE_ME',
3435
});
@@ -53,7 +54,11 @@ const client = new Kernel({
5354
});
5455

5556
async function main() {
56-
const params: Kernel.AppDeployParams = { file: fs.createReadStream('path/to/file'), version: 'REPLACE_ME' };
57+
const params: Kernel.AppDeployParams = {
58+
entrypointRelPath: 'app.py',
59+
file: fs.createReadStream('path/to/file'),
60+
version: 'REPLACE_ME',
61+
};
5762
const response: Kernel.AppDeployResponse = await client.apps.deploy(params);
5863
}
5964

@@ -78,17 +83,23 @@ import Kernel, { toFile } from '@onkernel/sdk';
7883
const client = new Kernel();
7984

8085
// If you have access to Node `fs` we recommend using `fs.createReadStream()`:
81-
await client.apps.deploy({ file: fs.createReadStream('/path/to/file') });
86+
await client.apps.deploy({ entrypointRelPath: 'app.py', file: fs.createReadStream('/path/to/file') });
8287

8388
// Or if you have the web `File` API you can pass a `File` instance:
84-
await client.apps.deploy({ file: new File(['my bytes'], 'file') });
89+
await client.apps.deploy({ entrypointRelPath: 'app.py', file: new File(['my bytes'], 'file') });
8590

8691
// You can also pass a `fetch` `Response`:
87-
await client.apps.deploy({ file: await fetch('https://somesite/file') });
92+
await client.apps.deploy({ entrypointRelPath: 'app.py', file: await fetch('https://somesite/file') });
8893

8994
// Finally, if none of the above are convenient, you can use our `toFile` helper:
90-
await client.apps.deploy({ file: await toFile(Buffer.from('my bytes'), 'file') });
91-
await client.apps.deploy({ file: await toFile(new Uint8Array([0, 1, 2]), 'file') });
95+
await client.apps.deploy({
96+
entrypointRelPath: 'app.py',
97+
file: await toFile(Buffer.from('my bytes'), 'file'),
98+
});
99+
await client.apps.deploy({
100+
entrypointRelPath: 'app.py',
101+
file: await toFile(new Uint8Array([0, 1, 2]), 'file'),
102+
});
92103
```
93104

94105
## Handling errors
@@ -101,7 +112,7 @@ a subclass of `APIError` will be thrown:
101112
```ts
102113
async function main() {
103114
const response = await client.apps
104-
.deploy({ file: fs.createReadStream('path/to/file'), version: 'REPLACE_ME' })
115+
.deploy({ entrypointRelPath: 'app.py', file: fs.createReadStream('path/to/file'), version: 'REPLACE_ME' })
105116
.catch(async (err) => {
106117
if (err instanceof Kernel.APIError) {
107118
console.log(err.status); // 400
@@ -145,7 +156,7 @@ const client = new Kernel({
145156
});
146157

147158
// Or, configure per-request:
148-
await client.apps.deploy({ file: fs.createReadStream('path/to/file'), version: 'REPLACE_ME' }, {
159+
await client.apps.deploy({ entrypointRelPath: 'app.py', file: fs.createReadStream('path/to/file'), version: 'REPLACE_ME' }, {
149160
maxRetries: 5,
150161
});
151162
```
@@ -162,7 +173,7 @@ const client = new Kernel({
162173
});
163174

164175
// Override per-request:
165-
await client.apps.deploy({ file: fs.createReadStream('path/to/file'), version: 'REPLACE_ME' }, {
176+
await client.apps.deploy({ entrypointRelPath: 'app.py', file: fs.createReadStream('path/to/file'), version: 'REPLACE_ME' }, {
166177
timeout: 5 * 1000,
167178
});
168179
```
@@ -186,13 +197,13 @@ Unlike `.asResponse()` this method consumes the body, returning once it is parse
186197
const client = new Kernel();
187198

188199
const response = await client.apps
189-
.deploy({ file: fs.createReadStream('path/to/file'), version: 'REPLACE_ME' })
200+
.deploy({ entrypointRelPath: 'app.py', file: fs.createReadStream('path/to/file'), version: 'REPLACE_ME' })
190201
.asResponse();
191202
console.log(response.headers.get('X-My-Header'));
192203
console.log(response.statusText); // access the underlying Response object
193204

194205
const { data: response, response: raw } = await client.apps
195-
.deploy({ file: fs.createReadStream('path/to/file'), version: 'REPLACE_ME' })
206+
.deploy({ entrypointRelPath: 'app.py', file: fs.createReadStream('path/to/file'), version: 'REPLACE_ME' })
196207
.withResponse();
197208
console.log(raw.headers.get('X-My-Header'));
198209
console.log(response.apps);

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@onkernel/sdk",
3-
"version": "0.1.0-alpha.9",
3+
"version": "0.1.0-alpha.10",
44
"description": "The official TypeScript library for the Kernel API",
55
"author": "Kernel <>",
66
"types": "dist/index.d.ts",
@@ -68,8 +68,5 @@
6868
"import": "./dist/*.mjs",
6969
"require": "./dist/*.js"
7070
}
71-
},
72-
"engines": {
73-
"node": ">= 20"
7471
}
7572
}

src/resources/apps.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export class Apps extends APIResource {
1414
* @example
1515
* ```ts
1616
* const response = await client.apps.deploy({
17+
* entrypointRelPath: 'app.py',
1718
* file: fs.createReadStream('path/to/file'),
1819
* });
1920
* ```
@@ -128,14 +129,14 @@ export interface AppRetrieveInvocationResponse {
128129

129130
export interface AppDeployParams {
130131
/**
131-
* ZIP file containing the application source directory
132+
* Relative path to the entrypoint of the application
132133
*/
133-
file: Uploadable;
134+
entrypointRelPath: string;
134135

135136
/**
136-
* Relative path to the entrypoint of the application
137+
* ZIP file containing the application source directory
137138
*/
138-
entrypointRelPath?: string;
139+
file: Uploadable;
139140

140141
/**
141142
* Allow overwriting an existing app version

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '0.1.0-alpha.9'; // x-release-please-version
1+
export const VERSION = '0.1.0-alpha.10'; // x-release-please-version

tests/api-resources/apps.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ describe('resource apps', () => {
1111
// skipped: tests are disabled for the time being
1212
test.skip('deploy: only required params', async () => {
1313
const responsePromise = client.apps.deploy({
14+
entrypointRelPath: 'app.py',
1415
file: await toFile(Buffer.from('# my file contents'), 'README.md'),
1516
});
1617
const rawResponse = await responsePromise.asResponse();
@@ -25,8 +26,8 @@ describe('resource apps', () => {
2526
// skipped: tests are disabled for the time being
2627
test.skip('deploy: required and optional params', async () => {
2728
const response = await client.apps.deploy({
28-
file: await toFile(Buffer.from('# my file contents'), 'README.md'),
2929
entrypointRelPath: 'app.py',
30+
file: await toFile(Buffer.from('# my file contents'), 'README.md'),
3031
force: 'false',
3132
region: 'aws.us-east-1a',
3233
version: '1.0.0',

0 commit comments

Comments
 (0)