From dd433e231b0669ef1d0ed49957e6ffbdf84b00f6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 21:37:06 +0000 Subject: [PATCH 1/2] feat(api): api update (#1) --- .github/workflows/publish-npm.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- CONTRIBUTING.md | 6 +++--- README.md | 4 ++-- package.json | 2 +- src/_shims/index-deno.ts | 2 +- src/_shims/web-runtime.ts | 2 +- src/core.ts | 6 ++++-- 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index e11e9ff..88c020f 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -1,6 +1,6 @@ # This workflow is triggered when a GitHub release is created. # It can also be run manually to re-publish to NPM in case it failed for some reason. -# You can run this workflow by navigating to https://www.github.com/0xnenlabs/steel-node/actions/workflows/publish-npm.yml +# You can run this workflow by navigating to https://www.github.com/steel-dev/steel-node/actions/workflows/publish-npm.yml name: Publish NPM on: workflow_dispatch: diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 90ff6bb..7adc051 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -9,7 +9,7 @@ jobs: release_doctor: name: release doctor runs-on: ubuntu-latest - if: github.repository == '0xnenlabs/steel-node' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + if: github.repository == 'steel-dev/steel-node' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - uses: actions/checkout@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4cce22..0ab0a2a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,14 +42,14 @@ If you’d like to use the repository from source, you can either install from g To install via git: ```sh -$ npm install git+ssh://git@github.com:0xnenlabs/steel-node.git +$ npm install git+ssh://git@github.com:steel-dev/steel-node.git ``` Alternatively, to link a local copy of the repo: ```sh # Clone -$ git clone https://www.github.com/0xnenlabs/steel-node +$ git clone https://www.github.com/steel-dev/steel-node $ cd steel-node # With yarn @@ -99,7 +99,7 @@ the changes aren't made through the automated pipeline, you may want to make rel ### Publish with a GitHub workflow -You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/0xnenlabs/steel-node/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up. +You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/steel-dev/steel-node/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up. ### Publish manually diff --git a/README.md b/README.md index 1af6561..15927a9 100644 --- a/README.md +++ b/README.md @@ -256,7 +256,7 @@ import Steel from 'steel-sdk'; ``` To do the inverse, add `import "steel-sdk/shims/node"` (which does import polyfills). -This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/0xnenlabs/steel-node/tree/main/src/_shims#readme)). +This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/steel-dev/steel-node/tree/main/src/_shims#readme)). ### Logging and middleware @@ -315,7 +315,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. -We are keen for your feedback; please open an [issue](https://www.github.com/0xnenlabs/steel-node/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/steel-dev/steel-node/issues) with questions, bugs, or suggestions. ## Requirements diff --git a/package.json b/package.json index 3237807..689f24b 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "types": "dist/index.d.ts", "main": "dist/index.js", "type": "commonjs", - "repository": "github:0xnenlabs/steel-node", + "repository": "github:steel-dev/steel-node", "license": "Apache-2.0", "packageManager": "yarn@1.22.22", "files": [ diff --git a/src/_shims/index-deno.ts b/src/_shims/index-deno.ts index 3a9fcfe..c85ddb1 100644 --- a/src/_shims/index-deno.ts +++ b/src/_shims/index-deno.ts @@ -79,7 +79,7 @@ export function getDefaultAgent(url: string) { } export function fileFromPath() { throw new Error( - 'The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/0xnenlabs/steel-node#file-uploads', + 'The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/steel-dev/steel-node#file-uploads', ); } diff --git a/src/_shims/web-runtime.ts b/src/_shims/web-runtime.ts index e989bed..5e3f5df 100644 --- a/src/_shims/web-runtime.ts +++ b/src/_shims/web-runtime.ts @@ -95,7 +95,7 @@ export function getRuntime({ manuallyImported }: { manuallyImported?: boolean } getDefaultAgent: (url: string) => undefined, fileFromPath: () => { throw new Error( - 'The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/0xnenlabs/steel-node#file-uploads', + 'The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/steel-dev/steel-node#file-uploads', ); }, isFsReadStream: (value: any) => false, diff --git a/src/core.ts b/src/core.ts index 557ffe9..8f87e1f 100644 --- a/src/core.ts +++ b/src/core.ts @@ -84,8 +84,10 @@ export class APIPromise extends Promise { }); } - _thenUnwrap(transform: (data: T) => U): APIPromise { - return new APIPromise(this.responsePromise, async (props) => transform(await this.parseResponse(props))); + _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise { + return new APIPromise(this.responsePromise, async (props) => + transform(await this.parseResponse(props), props), + ); } /** From c0c015153b577978aff0d39d1ac0effcd05616ee Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 21:37:20 +0000 Subject: [PATCH 2/2] release: 0.1.0-alpha.4 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 17473a2..b3b5e58 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.3" + ".": "0.1.0-alpha.4" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 1923ac4..956c4bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.4 (2024-10-16) + +Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/steel-dev/steel-node/compare/v0.1.0-alpha.3...v0.1.0-alpha.4) + +### Features + +* **api:** api update ([#1](https://github.com/steel-dev/steel-node/issues/1)) ([dd433e2](https://github.com/steel-dev/steel-node/commit/dd433e231b0669ef1d0ed49957e6ffbdf84b00f6)) + ## 0.1.0-alpha.3 (2024-10-06) Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/0xnenlabs/steel-node/compare/v0.1.0-alpha.2...v0.1.0-alpha.3) diff --git a/package.json b/package.json index 689f24b..50e6daf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "steel-sdk", - "version": "0.1.0-alpha.3", + "version": "0.1.0-alpha.4", "description": "The official TypeScript library for the Steel API", "author": "Steel ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index a64b06c..fe6d1df 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.1.0-alpha.3'; // x-release-please-version +export const VERSION = '0.1.0-alpha.4'; // x-release-please-version