Skip to content
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.2"
".": "0.1.0-alpha.3"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company%2Fsfc-nodes-b800806859333bacc88fa4236eae35c8cdbec62970b7fb9ad440a330f24a1622.yml
openapi_spec_hash: fa672b6ca8953a8059961a7559a607a9
config_hash: e310f0f1f4275f17d4a3872005f33a90
config_hash: eef7f1ef61a018bf17b996862a8c0e01
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.0-alpha.3 (2025-07-22)

Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/sfcompute/nodes-typescript/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)

### Features

* **api:** update via SDK Studio ([709751e](https://github.com/sfcompute/nodes-typescript/commit/709751e721c1061ec63f264e7f866a9062d4d912))

## 0.1.0-alpha.2 (2025-07-22)

Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/sfcompute/nodes-typescript/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ $ cd nodes-typescript
# With yarn
$ yarn link
$ cd ../my-package
$ yarn link @sfc/nodes-sdk-alpha
$ yarn link @sfcompute/nodes-sdk-alpha

# With pnpm
$ pnpm link --global
$ cd ../my-package
$ pnpm link -—global @sfc/nodes-sdk-alpha
$ pnpm link -—global @sfcompute/nodes-sdk-alpha
```

## Running tests
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SFC Nodes TypeScript API Library

[![NPM version](<https://img.shields.io/npm/v/@sfc/nodes-sdk-alpha.svg?label=npm%20(stable)>)](https://npmjs.org/package/@sfc/nodes-sdk-alpha) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@sfc/nodes-sdk-alpha)
[![NPM version](<https://img.shields.io/npm/v/@sfcompute/nodes-sdk-alpha.svg?label=npm%20(stable)>)](https://npmjs.org/package/@sfcompute/nodes-sdk-alpha) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@sfcompute/nodes-sdk-alpha)

This library provides convenient access to the SFC Nodes REST API from server-side TypeScript or JavaScript.

Expand All @@ -11,7 +11,7 @@ It is generated with [Stainless](https://www.stainless.com/).
## Installation

```sh
npm install @sfc/nodes-sdk-alpha
npm install @sfcompute/nodes-sdk-alpha
```

## Usage
Expand All @@ -20,7 +20,7 @@ The full API of this library can be found in [api.md](api.md).

<!-- prettier-ignore -->
```js
import SFCNodes from '@sfc/nodes-sdk-alpha';
import SFCNodes from '@sfcompute/nodes-sdk-alpha';

const client = new SFCNodes({
apiKey: process.env['SFC_API_KEY'], // This is the default and can be omitted
Expand All @@ -35,7 +35,7 @@ This library includes TypeScript definitions for all request params and response

<!-- prettier-ignore -->
```ts
import SFCNodes from '@sfc/nodes-sdk-alpha';
import SFCNodes from '@sfcompute/nodes-sdk-alpha';

const client = new SFCNodes({
apiKey: process.env['SFC_API_KEY'], // This is the default and can be omitted
Expand Down Expand Up @@ -157,7 +157,7 @@ The log level can be configured in two ways:
2. Using the `logLevel` client option (overrides the environment variable if set)

```ts
import SFCNodes from '@sfc/nodes-sdk-alpha';
import SFCNodes from '@sfcompute/nodes-sdk-alpha';

const client = new SFCNodes({
logLevel: 'debug', // Show all log messages
Expand Down Expand Up @@ -185,7 +185,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
below the configured level will not be sent to your logger.

```ts
import SFCNodes from '@sfc/nodes-sdk-alpha';
import SFCNodes from '@sfcompute/nodes-sdk-alpha';
import pino from 'pino';

const logger = pino();
Expand Down Expand Up @@ -254,7 +254,7 @@ globalThis.fetch = fetch;
Or pass it to the client:

```ts
import SFCNodes from '@sfc/nodes-sdk-alpha';
import SFCNodes from '@sfcompute/nodes-sdk-alpha';
import fetch from 'my-fetch';

const client = new SFCNodes({ fetch });
Expand All @@ -265,7 +265,7 @@ const client = new SFCNodes({ fetch });
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)

```ts
import SFCNodes from '@sfc/nodes-sdk-alpha';
import SFCNodes from '@sfcompute/nodes-sdk-alpha';

const client = new SFCNodes({
fetchOptions: {
Expand All @@ -282,7 +282,7 @@ options to requests:
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>

```ts
import SFCNodes from '@sfc/nodes-sdk-alpha';
import SFCNodes from '@sfcompute/nodes-sdk-alpha';
import * as undici from 'undici';

const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
Expand All @@ -296,7 +296,7 @@ const client = new SFCNodes({
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>

```ts
import SFCNodes from '@sfc/nodes-sdk-alpha';
import SFCNodes from '@sfcompute/nodes-sdk-alpha';

const client = new SFCNodes({
fetchOptions: {
Expand All @@ -308,7 +308,7 @@ const client = new SFCNodes({
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>

```ts
import SFCNodes from 'npm:@sfc/nodes-sdk-alpha';
import SFCNodes from 'npm:@sfcompute/nodes-sdk-alpha';

const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
const client = new SFCNodes({
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default tseslint.config(
{
patterns: [
{
regex: '^@sfc/nodes-sdk-alpha(/.*)?',
regex: '^@sfcompute/nodes-sdk-alpha(/.*)?',
message: 'Use a relative import, not a package import.',
},
],
Expand Down
4 changes: 2 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const config: JestConfigWithTsJest = {
'^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }],
},
moduleNameMapper: {
'^@sfc/nodes-sdk-alpha$': '<rootDir>/src/index.ts',
'^@sfc/nodes-sdk-alpha/(.*)$': '<rootDir>/src/$1',
'^@sfcompute/nodes-sdk-alpha$': '<rootDir>/src/index.ts',
'^@sfcompute/nodes-sdk-alpha/(.*)$': '<rootDir>/src/$1',
},
modulePathIgnorePatterns: [
'<rootDir>/ecosystem-tests/',
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sfc/nodes-sdk-alpha",
"version": "0.1.0-alpha.2",
"name": "@sfcompute/nodes-sdk-alpha",
"version": "0.1.0-alpha.3",
"description": "The official TypeScript library for the SFC Nodes API",
"author": "SFC Nodes <hello@sfcompute.com>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -47,8 +47,8 @@
"typescript-eslint": "8.31.1"
},
"imports": {
"@sfc/nodes-sdk-alpha": ".",
"@sfc/nodes-sdk-alpha/*": "./src/*"
"@sfcompute/nodes-sdk-alpha": ".",
"@sfcompute/nodes-sdk-alpha/*": "./src/*"
},
"exports": {
".": {
Expand Down
6 changes: 3 additions & 3 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ node scripts/utils/check-version.cjs

# Build into dist and will publish the package from there,
# so that src/resources/foo.ts becomes <package root>/resources/foo.js
# This way importing from `"@sfc/nodes-sdk-alpha/resources/foo"` works
# This way importing from `"@sfcompute/nodes-sdk-alpha/resources/foo"` works
# even with `"moduleResolution": "node"`

rm -rf dist; mkdir dist
Expand Down Expand Up @@ -42,8 +42,8 @@ node scripts/utils/postprocess-files.cjs

# make sure that nothing crashes when we require the output CJS or
# import the output ESM
(cd dist && node -e 'require("@sfc/nodes-sdk-alpha")')
(cd dist && node -e 'import("@sfc/nodes-sdk-alpha")' --input-type=module)
(cd dist && node -e 'require("@sfcompute/nodes-sdk-alpha")')
(cd dist && node -e 'import("@sfcompute/nodes-sdk-alpha")' --input-type=module)

if [ -e ./scripts/build-deno ]
then
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.1.0-alpha.2'; // x-release-please-version
export const VERSION = '0.1.0-alpha.3'; // x-release-please-version
2 changes: 1 addition & 1 deletion tests/api-resources/nodes.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import SFCNodes from '@sfc/nodes-sdk-alpha';
import SFCNodes from '@sfcompute/nodes-sdk-alpha';

const client = new SFCNodes({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/vms/script.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import SFCNodes from '@sfc/nodes-sdk-alpha';
import SFCNodes from '@sfcompute/nodes-sdk-alpha';

const client = new SFCNodes({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/vms/vms.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import SFCNodes from '@sfc/nodes-sdk-alpha';
import SFCNodes from '@sfcompute/nodes-sdk-alpha';

const client = new SFCNodes({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/base64.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fromBase64, toBase64 } from '@sfc/nodes-sdk-alpha/internal/utils/base64';
import { fromBase64, toBase64 } from '@sfcompute/nodes-sdk-alpha/internal/utils/base64';

describe.each(['Buffer', 'atob'])('with %s', (mode) => {
let originalBuffer: BufferConstructor;
Expand Down
6 changes: 5 additions & 1 deletion tests/buildHeaders.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { inspect } from 'node:util';
import { buildHeaders, type HeadersLike, type NullableHeaders } from '@sfc/nodes-sdk-alpha/internal/headers';
import {
buildHeaders,
type HeadersLike,
type NullableHeaders,
} from '@sfcompute/nodes-sdk-alpha/internal/headers';

function inspectNullableHeaders(headers: NullableHeaders) {
return `NullableHeaders {${[
Expand Down
4 changes: 2 additions & 2 deletions tests/form.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { multipartFormRequestOptions, createForm } from '@sfc/nodes-sdk-alpha/internal/uploads';
import { toFile } from '@sfc/nodes-sdk-alpha/core/uploads';
import { multipartFormRequestOptions, createForm } from '@sfcompute/nodes-sdk-alpha/internal/uploads';
import { toFile } from '@sfcompute/nodes-sdk-alpha/core/uploads';

describe('form data validation', () => {
test('valid values do not error', async () => {
Expand Down
6 changes: 3 additions & 3 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { APIPromise } from '@sfc/nodes-sdk-alpha/core/api-promise';
import { APIPromise } from '@sfcompute/nodes-sdk-alpha/core/api-promise';

import util from 'node:util';
import SFCNodes from '@sfc/nodes-sdk-alpha';
import { APIUserAbortError } from '@sfc/nodes-sdk-alpha';
import SFCNodes from '@sfcompute/nodes-sdk-alpha';
import { APIUserAbortError } from '@sfcompute/nodes-sdk-alpha';
const defaultFetch = fetch;

describe('instantiate client', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/path.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createPathTagFunction, encodeURIPath } from '@sfc/nodes-sdk-alpha/internal/utils/path';
import { createPathTagFunction, encodeURIPath } from '@sfcompute/nodes-sdk-alpha/internal/utils/path';
import { inspect } from 'node:util';
import { runInNewContext } from 'node:vm';

Expand Down
2 changes: 1 addition & 1 deletion tests/stringifyQuery.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { SFCNodes } from '@sfc/nodes-sdk-alpha';
import { SFCNodes } from '@sfcompute/nodes-sdk-alpha';

const { stringifyQuery } = SFCNodes.prototype as any;

Expand Down
6 changes: 3 additions & 3 deletions tests/uploads.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs';
import type { ResponseLike } from '@sfc/nodes-sdk-alpha/internal/to-file';
import { toFile } from '@sfc/nodes-sdk-alpha/core/uploads';
import type { ResponseLike } from '@sfcompute/nodes-sdk-alpha/internal/to-file';
import { toFile } from '@sfcompute/nodes-sdk-alpha/core/uploads';
import { File } from 'node:buffer';

class MyClass {
Expand Down Expand Up @@ -97,7 +97,7 @@ describe('missing File error message', () => {
});

test('is thrown', async () => {
const uploads = await import('@sfc/nodes-sdk-alpha/core/uploads');
const uploads = await import('@sfcompute/nodes-sdk-alpha/core/uploads');
await expect(
uploads.toFile(mockResponse({ url: 'https://example.com/my/audio.mp3' })),
).rejects.toMatchInlineSnapshot(
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"compilerOptions": {
"rootDir": "./dist/src",
"paths": {
"@sfc/nodes-sdk-alpha/*": ["dist/src/*"],
"@sfc/nodes-sdk-alpha": ["dist/src/index.ts"]
"@sfcompute/nodes-sdk-alpha/*": ["dist/src/*"],
"@sfcompute/nodes-sdk-alpha": ["dist/src/index.ts"]
},
"noEmit": false,
"declaration": true,
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"esModuleInterop": true,
"baseUrl": "./",
"paths": {
"@sfc/nodes-sdk-alpha/*": ["src/*"],
"@sfc/nodes-sdk-alpha": ["src/index.ts"]
"@sfcompute/nodes-sdk-alpha/*": ["src/*"],
"@sfcompute/nodes-sdk-alpha": ["src/index.ts"]
},
"noEmit": true,

Expand Down