Skip to content

Commit f1d8a41

Browse files
authored
Merge pull request #2 from ZoriHQ/release-please--branches--main--changes--next--components--zorihq
release: 0.0.3
2 parents acb1fef + b9c7db6 commit f1d8a41

23 files changed

Lines changed: 100 additions & 44 deletions

.github/workflows/publish-npm.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow is triggered when a GitHub release is created.
2+
# It can also be run manually to re-publish to NPM in case it failed for some reason.
3+
# You can run this workflow by navigating to https://www.github.com/ZoriHQ/typescript-api-sdk/actions/workflows/publish-npm.yml
4+
name: Publish NPM
5+
on:
6+
workflow_dispatch:
7+
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
publish:
13+
name: publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: '20'
23+
24+
- name: Install dependencies
25+
run: |
26+
yarn install
27+
28+
- name: Publish to NPM
29+
run: |
30+
bash ./bin/publish-npm
31+
env:
32+
NPM_TOKEN: ${{ secrets.ZORIAPI_NPM_TOKEN || secrets.NPM_TOKEN }}

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ jobs:
1818
run: |
1919
bash ./bin/check-release-environment
2020
env:
21+
NPM_TOKEN: ${{ secrets.ZORIAPI_NPM_TOKEN || secrets.NPM_TOKEN }}
2122

.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.0.2"
2+
".": "0.0.3"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 6
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zorihq%2Fzoriapi-38511cdba7b2c6eb603810bf857ac41f35d3fc2de66778c1145dfd89bc2fab1c.yml
33
openapi_spec_hash: ea2c1947c7ff031dd1a35f1d7d7f711c
4-
config_hash: 998fdbdb4a444a085ed4faab91006787
4+
config_hash: 257877294672d7b8ae6868ea3eed6e0c

CHANGELOG.md

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

3+
## 0.0.3 (2025-10-05)
4+
5+
Full Changelog: [v0.0.2...v0.0.3](https://github.com/ZoriHQ/typescript-api-sdk/compare/v0.0.2...v0.0.3)
6+
7+
### Chores
8+
9+
* update SDK settings ([2883221](https://github.com/ZoriHQ/typescript-api-sdk/commit/2883221b67a8a506fa310a25e237b2ec0833ea10))
10+
311
## 0.0.2 (2025-10-05)
412

513
Full Changelog: [v0.0.1...v0.0.2](https://github.com/ZoriHQ/typescript-api-sdk/compare/v0.0.1...v0.0.2)

CONTRIBUTING.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ $ cd typescript-api-sdk
5555
# With yarn
5656
$ yarn link
5757
$ cd ../my-package
58-
$ yarn link zoriapi
58+
$ yarn link zorihq
5959

6060
# With pnpm
6161
$ pnpm link --global
6262
$ cd ../my-package
63-
$ pnpm link -—global zoriapi
63+
$ pnpm link -—global zorihq
6464
```
6565

6666
## Running tests
@@ -91,3 +91,17 @@ To format and fix all lint issues automatically:
9191
```sh
9292
$ yarn fix
9393
```
94+
95+
## Publishing and releases
96+
97+
Changes made to this repository via the automated release PR pipeline should publish to npm automatically. If
98+
the changes aren't made through the automated pipeline, you may want to make releases manually.
99+
100+
### Publish with a GitHub workflow
101+
102+
You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/ZoriHQ/typescript-api-sdk/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up.
103+
104+
### Publish manually
105+
106+
If you need to manually release a package, you can run the `bin/publish-npm` script with an `NPM_TOKEN` set on
107+
the environment.

README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Zoriapi TypeScript API Library
22

3-
[![NPM version](<https://img.shields.io/npm/v/zoriapi.svg?label=npm%20(stable)>)](https://npmjs.org/package/zoriapi) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/zoriapi)
3+
[![NPM version](<https://img.shields.io/npm/v/zorihq.svg?label=npm%20(stable)>)](https://npmjs.org/package/zorihq) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/zorihq)
44

55
This library provides convenient access to the Zoriapi REST API from server-side TypeScript or JavaScript.
66

@@ -11,19 +11,16 @@ It is generated with [Stainless](https://www.stainless.com/).
1111
## Installation
1212

1313
```sh
14-
npm install git+ssh://git@github.com:ZoriHQ/typescript-api-sdk.git
14+
npm install zorihq
1515
```
1616

17-
> [!NOTE]
18-
> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npm install zoriapi`
19-
2017
## Usage
2118

2219
The full API of this library can be found in [api.md](api.md).
2320

2421
<!-- prettier-ignore -->
2522
```js
26-
import Zoriapi from 'zoriapi';
23+
import Zoriapi from 'zorihq';
2724

2825
const client = new Zoriapi({
2926
apiKey: process.env['ZORIAPI_API_KEY'], // This is the default and can be omitted
@@ -43,7 +40,7 @@ This library includes TypeScript definitions for all request params and response
4340

4441
<!-- prettier-ignore -->
4542
```ts
46-
import Zoriapi from 'zoriapi';
43+
import Zoriapi from 'zorihq';
4744

4845
const client = new Zoriapi({
4946
apiKey: process.env['ZORIAPI_API_KEY'], // This is the default and can be omitted
@@ -172,7 +169,7 @@ The log level can be configured in two ways:
172169
2. Using the `logLevel` client option (overrides the environment variable if set)
173170

174171
```ts
175-
import Zoriapi from 'zoriapi';
172+
import Zoriapi from 'zorihq';
176173

177174
const client = new Zoriapi({
178175
logLevel: 'debug', // Show all log messages
@@ -200,7 +197,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
200197
below the configured level will not be sent to your logger.
201198

202199
```ts
203-
import Zoriapi from 'zoriapi';
200+
import Zoriapi from 'zorihq';
204201
import pino from 'pino';
205202

206203
const logger = pino();
@@ -269,7 +266,7 @@ globalThis.fetch = fetch;
269266
Or pass it to the client:
270267

271268
```ts
272-
import Zoriapi from 'zoriapi';
269+
import Zoriapi from 'zorihq';
273270
import fetch from 'my-fetch';
274271

275272
const client = new Zoriapi({ fetch });
@@ -280,7 +277,7 @@ const client = new Zoriapi({ fetch });
280277
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.)
281278

282279
```ts
283-
import Zoriapi from 'zoriapi';
280+
import Zoriapi from 'zorihq';
284281

285282
const client = new Zoriapi({
286283
fetchOptions: {
@@ -297,7 +294,7 @@ options to requests:
297294
<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>
298295

299296
```ts
300-
import Zoriapi from 'zoriapi';
297+
import Zoriapi from 'zorihq';
301298
import * as undici from 'undici';
302299

303300
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
@@ -311,7 +308,7 @@ const client = new Zoriapi({
311308
<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>
312309

313310
```ts
314-
import Zoriapi from 'zoriapi';
311+
import Zoriapi from 'zorihq';
315312

316313
const client = new Zoriapi({
317314
fetchOptions: {
@@ -323,7 +320,7 @@ const client = new Zoriapi({
323320
<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>
324321

325322
```ts
326-
import Zoriapi from 'npm:zoriapi';
323+
import Zoriapi from 'npm:zorihq';
327324

328325
const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
329326
const client = new Zoriapi({

bin/check-release-environment

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
errors=()
44

5+
if [ -z "${NPM_TOKEN}" ]; then
6+
errors+=("The NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
7+
fi
8+
59
lenErrors=${#errors[@]}
610

711
if [[ lenErrors -gt 0 ]]; then

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default tseslint.config(
2525
{
2626
patterns: [
2727
{
28-
regex: '^zoriapi(/.*)?',
28+
regex: '^zorihq(/.*)?',
2929
message: 'Use a relative import, not a package import.',
3030
},
3131
],

jest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const config: JestConfigWithTsJest = {
77
'^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }],
88
},
99
moduleNameMapper: {
10-
'^zoriapi$': '<rootDir>/src/index.ts',
11-
'^zoriapi/(.*)$': '<rootDir>/src/$1',
10+
'^zorihq$': '<rootDir>/src/index.ts',
11+
'^zorihq/(.*)$': '<rootDir>/src/$1',
1212
},
1313
modulePathIgnorePatterns: [
1414
'<rootDir>/ecosystem-tests/',

0 commit comments

Comments
 (0)