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
1 change: 1 addition & 0 deletions .eslintcache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"/home/tempuser-clrsmj/run/codegen-output/the-san-francisco-compute-company/sfc-nodes-typescript/src/resources/nodes.ts":"1"},{"size":10148,"mtime":1759206200902}]
1 change: 1 addition & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ jobs:
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.SFC_NODES_NPM_TOKEN || secrets.NPM_TOKEN }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ dist
dist-deno
/*.tgz
.idea/
.eslintcache

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.16"
".": "0.1.0-alpha.17"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 11
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company%2Fsfc-nodes-b380dba200ffcd01fb245020213f92568032554504940ecb93a361aab9bdcab9.yml
openapi_spec_hash: fd3ac511c392b3a52d718d45e561373c
config_hash: f29ebc32a45fc14e903cc9881565fcd2
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company%2Fsfc-nodes-3ed2b55187b3b17772db0e76c4007d8828b37fdf49a87fb664cdf994db49cb42.yml
openapi_spec_hash: 749a02e6ffc075b8d4e70a7a7800286a
config_hash: fae4224e6c6207c8735f6a024e50ddf5
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 0.1.0-alpha.17 (2025-09-30)

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

### Features

* **api:** api update ([fd3f8ec](https://github.com/sfcompute/nodes-typescript/commit/fd3f8ec01fc54e25b2a03cc8cce359101d46ca18))
* **api:** api update ([44078aa](https://github.com/sfcompute/nodes-typescript/commit/44078aa5e999ea92e0b8325e9409d8c1c703fdae))
* **api:** api update ([0a42c37](https://github.com/sfcompute/nodes-typescript/commit/0a42c37687b1be94725ead903b5980efebd421b2))


### Performance Improvements

* faster formatting ([51a98eb](https://github.com/sfcompute/nodes-typescript/commit/51a98eba84e5435dfba06a60eccd1fcb8456a515))


### Chores

* do not install brew dependencies in ./scripts/bootstrap by default ([d6c29b1](https://github.com/sfcompute/nodes-typescript/commit/d6c29b133f030bef7bc50063270b788d12af5c66))
* **internal:** codegen related update ([284b201](https://github.com/sfcompute/nodes-typescript/commit/284b2011f0c3a5cccc5d32332d100ad0b7306c8d))
* **internal:** codegen related update ([8660c06](https://github.com/sfcompute/nodes-typescript/commit/8660c069659bad0a924f10d2add0f2c8d3adc880))
* **internal:** fix incremental formatting in some cases ([09d1193](https://github.com/sfcompute/nodes-typescript/commit/09d1193230da0d52f06062f47dbabdec6fee8438))
* **internal:** remove deprecated `compilerOptions.baseUrl` from tsconfig.json ([1f456b3](https://github.com/sfcompute/nodes-typescript/commit/1f456b35d7ad93d26f3bea55d6881983ccf120e5))

## 0.1.0-alpha.16 (2025-09-16)

Full Changelog: [v0.1.0-alpha.15...v0.1.0-alpha.16](https://github.com/sfcompute/nodes-typescript/compare/v0.1.0-alpha.15...v0.1.0-alpha.16)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sfcompute/nodes-sdk-alpha",
"version": "0.1.0-alpha.16",
"version": "0.1.0-alpha.17",
"description": "The official TypeScript library for the SFC Nodes API",
"author": "SFC Nodes <hello@sfcompute.com>",
"types": "dist/index.d.ts",
Expand Down
14 changes: 11 additions & 3 deletions scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ set -e

cd "$(dirname "$0")/.."

if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
echo "==> Installing Homebrew dependencies…"
brew bundle
echo -n "==> Install Homebrew dependencies? (y/N): "
read -r response
case "$response" in
[yY][eE][sS]|[yY])
brew bundle
;;
*)
;;
esac
echo
}
fi

Expand Down
40 changes: 40 additions & 0 deletions scripts/fast-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash

set -euo pipefail

echo "Script started with $# arguments"
echo "Arguments: $*"
echo "Script location: $(dirname "$0")"

cd "$(dirname "$0")/.."
echo "Changed to directory: $(pwd)"

if [ $# -eq 0 ]; then
echo "Usage: $0 <file-with-paths> [additional-formatter-args...]"
echo "The file should contain one file path per line"
exit 1
fi

FILE_LIST="$1"

echo "Looking for file: $FILE_LIST"

if [ ! -f "$FILE_LIST" ]; then
echo "Error: File '$FILE_LIST' not found"
exit 1
fi

echo "==> Running eslint --fix"
ESLINT_FILES="$(grep '\.ts$' "$FILE_LIST" || true)"
if ! [ -z "$ESLINT_FILES" ]; then
echo "$ESLINT_FILES" | xargs ./node_modules/.bin/eslint --cache --fix
fi

echo "==> Running prettier --write"
# format things eslint didn't
PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)"
if ! [ -z "$PRETTIER_FILES" ]; then
echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \
--write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \
'!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs'
fi
63 changes: 52 additions & 11 deletions src/resources/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export interface CreateNodesRequest {
cloud_init_user_data?: Array<number>;

/**
* End time as Unix timestamp in seconds. If provided, end time must be aligned to
* the hour. If not provided, the node will be created as an autoreserved node.
* End time as Unix timestamp in seconds If provided, end time must be aligned to
* the hour If not provided, the node will be created as an autoreserved node
*/
end_at?: number | null;

Expand All @@ -111,15 +111,15 @@ export interface CreateNodesRequest {
image_id?: string;

/**
* Custom node names. Names cannot follow the vm\_{alpha_numeric_chars} as this is
* reserved for system-generated IDs. Names cannot be numeric strings.
* Custom node names Names cannot follow the vm\_{alpha_numeric_chars} as this is
* reserved for system-generated IDs Names cannot be numeric strings
*/
names?: Array<string>;

node_type?: NodeType | null;

/**
* Start time as Unix timestamp in seconds
* Start time as Unix timestamp in seconds Required for reserved nodes
*/
start_at?: number;
}
Expand Down Expand Up @@ -165,7 +165,8 @@ export type ErrorType =
| 'not_implemented'
| 'upgrade_required'
| 'payment_required'
| 'service_unavailable';
| 'service_unavailable'
| 'unprocessable_entity';

export interface ExtendNodeRequest {
/**
Expand Down Expand Up @@ -210,6 +211,8 @@ export namespace ListResponseNode {
*/
created_at?: number | null;

current_vm?: Data.CurrentVM | null;

/**
* Deletion time as Unix timestamp in seconds
*/
Expand Down Expand Up @@ -243,6 +246,24 @@ export namespace ListResponseNode {
}

export namespace Data {
export interface CurrentVM {
id: string;

created_at: number;

end_at: number | null;

object: string;

start_at: number | null;

status: 'Pending' | 'Running' | 'Destroyed' | 'NodeFailure' | 'Unspecified';

updated_at: number;

image_id?: string | null;
}

export interface VMs {
data: Array<VMs.Data>;

Expand Down Expand Up @@ -294,6 +315,8 @@ export interface Node {
*/
created_at?: number | null;

current_vm?: Node.CurrentVM | null;

/**
* Deletion time as Unix timestamp in seconds
*/
Expand Down Expand Up @@ -327,6 +350,24 @@ export interface Node {
}

export namespace Node {
export interface CurrentVM {
id: string;

created_at: number;

end_at: number | null;

object: string;

start_at: number | null;

status: 'Pending' | 'Running' | 'Destroyed' | 'NodeFailure' | 'Unspecified';

updated_at: number;

image_id?: string | null;
}

export interface VMs {
data: Array<VMs.Data>;

Expand Down Expand Up @@ -388,8 +429,8 @@ export interface NodeCreateParams {
cloud_init_user_data?: Array<number>;

/**
* End time as Unix timestamp in seconds. If provided, end time must be aligned to
* the hour. If not provided, the node will be created as an autoreserved node.
* End time as Unix timestamp in seconds If provided, end time must be aligned to
* the hour If not provided, the node will be created as an autoreserved node
*/
end_at?: number | null;

Expand All @@ -399,15 +440,15 @@ export interface NodeCreateParams {
image_id?: string;

/**
* Custom node names. Names cannot follow the vm\_{alpha_numeric_chars} as this is
* reserved for system-generated IDs. Names cannot be numeric strings.
* Custom node names Names cannot follow the vm\_{alpha_numeric_chars} as this is
* reserved for system-generated IDs Names cannot be numeric strings
*/
names?: Array<string>;

node_type?: NodeType | null;

/**
* Start time as Unix timestamp in seconds
* Start time as Unix timestamp in seconds Required for reserved nodes
*/
start_at?: number;
}
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.16'; // x-release-please-version
export const VERSION = '0.1.0-alpha.17'; // x-release-please-version
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": {
"@sfcompute/nodes-sdk-alpha/*": ["dist/src/*"],
"@sfcompute/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
5 changes: 2 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
"module": "commonjs",
"moduleResolution": "node",
"esModuleInterop": true,
"baseUrl": "./",
"paths": {
"@sfcompute/nodes-sdk-alpha/*": ["src/*"],
"@sfcompute/nodes-sdk-alpha": ["src/index.ts"]
"@sfcompute/nodes-sdk-alpha/*": ["./src/*"],
"@sfcompute/nodes-sdk-alpha": ["./src/index.ts"]
},
"noEmit": true,

Expand Down