Skip to content

Commit 9eba1f2

Browse files
authored
Merge pull request #29 from zeroentropy-ai/release-please--branches--main--changes--next--components--zeroentropy
release: 0.1.0-alpha.4
2 parents 736d877 + 0e73167 commit 9eba1f2

25 files changed

+329
-130
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 23 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
33
{
4-
"name": "Debian",
5-
"build": {
6-
"dockerfile": "Dockerfile"
4+
"name": "Development",
5+
"image": "mcr.microsoft.com/devcontainers/typescript-node:latest",
6+
"features": {
7+
"ghcr.io/devcontainers/features/node:1": {}
8+
},
9+
"postCreateCommand": "yarn install",
10+
"customizations": {
11+
"vscode": {
12+
"extensions": [
13+
"esbenp.prettier-vscode"
14+
]
15+
}
716
}
8-
9-
// Features to add to the dev container. More info: https://containers.dev/features.
10-
// "features": {},
11-
12-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13-
// "forwardPorts": [],
14-
15-
// Configure tool-specific properties.
16-
// "customizations": {},
17-
18-
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
19-
// "remoteUser": "root"
2017
}

.github/workflows/ci.yml

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
name: CI
22
on:
33
push:
4-
branches:
5-
- main
6-
pull_request:
7-
branches:
8-
- main
9-
- next
4+
branches-ignore:
5+
- 'generated'
6+
- 'codegen/**'
7+
- 'integrated/**'
8+
- 'stl-preview-head/**'
9+
- 'stl-preview-base/**'
1010

1111
jobs:
1212
lint:
13+
timeout-minutes: 10
1314
name: lint
14-
runs-on: ubuntu-latest
15-
16-
15+
runs-on: ${{ github.repository == 'stainless-sdks/zeroentropy-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
1716
steps:
1817
- uses: actions/checkout@v4
1918

@@ -29,10 +28,12 @@ jobs:
2928
run: ./scripts/lint
3029

3130
build:
31+
timeout-minutes: 5
3232
name: build
33-
runs-on: ubuntu-latest
34-
35-
33+
runs-on: ${{ github.repository == 'stainless-sdks/zeroentropy-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
34+
permissions:
35+
contents: read
36+
id-token: write
3637
steps:
3738
- uses: actions/checkout@v4
3839

@@ -46,21 +47,35 @@ jobs:
4647

4748
- name: Check build
4849
run: ./scripts/build
50+
51+
- name: Get GitHub OIDC Token
52+
if: github.repository == 'stainless-sdks/zeroentropy-node'
53+
id: github-oidc
54+
uses: actions/github-script@v6
55+
with:
56+
script: core.setOutput('github_token', await core.getIDToken());
57+
58+
- name: Upload tarball
59+
if: github.repository == 'stainless-sdks/zeroentropy-node'
60+
env:
61+
URL: https://pkg.stainless.com/s
62+
AUTH: ${{ steps.github-oidc.outputs.github_token }}
63+
SHA: ${{ github.sha }}
64+
run: ./scripts/utils/upload-artifact.sh
4965
test:
66+
timeout-minutes: 10
5067
name: test
51-
runs-on: ubuntu-latest
52-
68+
runs-on: ${{ github.repository == 'stainless-sdks/zeroentropy-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
5369
steps:
5470
- uses: actions/checkout@v4
5571

5672
- name: Set up Node
5773
uses: actions/setup-node@v4
5874
with:
59-
node-version: '18'
75+
node-version: '20'
6076

6177
- name: Bootstrap
6278
run: ./scripts/bootstrap
6379

6480
- name: Run tests
6581
run: ./scripts/test
66-

.github/workflows/publish-npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Node
2020
uses: actions/setup-node@v3
2121
with:
22-
node-version: '18'
22+
node-version: '20'
2323

2424
- name: Install dependencies
2525
run: |

.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.3"
2+
".": "0.1.0-alpha.4"
33
}

.stats.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
configured_endpoints: 15
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zeroentropy%2Fzeroentropy-99a41bb73e432cb47fe1937219b3c7b109ae534456e8dd019cc00cc1e6018a16.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zeroentropy%2Fzeroentropy-f06c49dfd4b38a4f9d5bcad56348156bbf641aa8b7968acfbf655ad6ceff2126.yml
3+
openapi_spec_hash: cac52dd65fbcb65ffa7a183e764b7f06
4+
config_hash: beba80a17ba64c5439712e85129ab5ad

CHANGELOG.md

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

3+
## 0.1.0-alpha.4 (2025-06-04)
4+
5+
Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/zeroentropy-ai/zeroentropy-node/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)
6+
7+
### Features
8+
9+
* add SKIP_BREW env var to ./scripts/bootstrap ([#34](https://github.com/zeroentropy-ai/zeroentropy-node/issues/34)) ([1db65f9](https://github.com/zeroentropy-ai/zeroentropy-node/commit/1db65f912a1a5f23668ea2519ac8e1f379f0a806))
10+
* **api:** manual updates ([188e90a](https://github.com/zeroentropy-ai/zeroentropy-node/commit/188e90a6a7008044bd3a88baa76433b86e1bafa9))
11+
* **api:** manual updates ([4f364c5](https://github.com/zeroentropy-ai/zeroentropy-node/commit/4f364c5925cf3203ec0cfefbd30f28280019ac13))
12+
* **api:** manual updates ([d68a8eb](https://github.com/zeroentropy-ai/zeroentropy-node/commit/d68a8eb68f20f0e2735b0a74d74593f92265cd03))
13+
* **api:** manual updates ([a9ac415](https://github.com/zeroentropy-ai/zeroentropy-node/commit/a9ac4152f59d0fabb2866c628a9d87155b2a471d))
14+
* **api:** manual updates ([6c6d3e1](https://github.com/zeroentropy-ai/zeroentropy-node/commit/6c6d3e19561559312962e5b0e0d14c0127519418))
15+
* **client:** accept RFC6838 JSON content types ([#35](https://github.com/zeroentropy-ai/zeroentropy-node/issues/35)) ([5175743](https://github.com/zeroentropy-ai/zeroentropy-node/commit/5175743984e1379e05c4baaa5dded94dc1ae6b85))
16+
* **client:** send `X-Stainless-Timeout` header ([#28](https://github.com/zeroentropy-ai/zeroentropy-node/issues/28)) ([ecd0912](https://github.com/zeroentropy-ai/zeroentropy-node/commit/ecd0912273945a262c29c7520410d6ae927ff177))
17+
18+
19+
### Bug Fixes
20+
21+
* avoid type error in certain environments ([#39](https://github.com/zeroentropy-ai/zeroentropy-node/issues/39)) ([5be66ff](https://github.com/zeroentropy-ai/zeroentropy-node/commit/5be66ffd2783b79bda15848632f46c1a2b0bd53c))
22+
* **client:** fix export map for index exports ([#30](https://github.com/zeroentropy-ai/zeroentropy-node/issues/30)) ([1518181](https://github.com/zeroentropy-ai/zeroentropy-node/commit/1518181a12687feeb94e7634194f73f7c6d2a92b))
23+
* **internal:** work around https://github.com/vercel/next.js/issues/76881 ([#41](https://github.com/zeroentropy-ai/zeroentropy-node/issues/41)) ([a78fd51](https://github.com/zeroentropy-ai/zeroentropy-node/commit/a78fd51e969d8ab08858b5871a86609c8067b8ce))
24+
25+
26+
### Chores
27+
28+
* **exports:** cleaner resource index imports ([#37](https://github.com/zeroentropy-ai/zeroentropy-node/issues/37)) ([e447d3b](https://github.com/zeroentropy-ai/zeroentropy-node/commit/e447d3b306acdcd7460b8329dd31cc78fedc4388))
29+
* **exports:** stop using path fallbacks ([#38](https://github.com/zeroentropy-ai/zeroentropy-node/issues/38)) ([f7460de](https://github.com/zeroentropy-ai/zeroentropy-node/commit/f7460de48f5deaead21c777199dfb6acacfdf4ff))
30+
* **internal:** codegen related update ([#40](https://github.com/zeroentropy-ai/zeroentropy-node/issues/40)) ([d60d321](https://github.com/zeroentropy-ai/zeroentropy-node/commit/d60d3218f82dc4782cfddb2e164b1e3eb05835c7))
31+
* **internal:** fix devcontainers setup ([#31](https://github.com/zeroentropy-ai/zeroentropy-node/issues/31)) ([0de15d2](https://github.com/zeroentropy-ai/zeroentropy-node/commit/0de15d2ba4cfc81f769646ade15a88c3f30fcaa9))
32+
* **internal:** remove extra empty newlines ([#36](https://github.com/zeroentropy-ai/zeroentropy-node/issues/36)) ([5b8b92f](https://github.com/zeroentropy-ai/zeroentropy-node/commit/5b8b92f2a64634a3a792b705c066c01132368d3d))
33+
34+
35+
### Documentation
36+
37+
* update URLs from stainlessapi.com to stainless.com ([#32](https://github.com/zeroentropy-ai/zeroentropy-node/issues/32)) ([f8ec234](https://github.com/zeroentropy-ai/zeroentropy-node/commit/f8ec2343b8ac63893220f698353a5e127899523f))
38+
339
## 0.1.0-alpha.3 (2025-01-28)
440

541
Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/zeroentropy-ai/zeroentropy-node/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)

README.md

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
# ZeroEntropy Node API Library
1+
# ZeroEntropy Node SDK
22

33
[![NPM version](https://img.shields.io/npm/v/zeroentropy.svg)](https://npmjs.org/package/zeroentropy) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/zeroentropy)
44

5-
This library provides convenient access to the ZeroEntropy REST API from server-side TypeScript or JavaScript.
5+
The ZeroEntropy Node SDK provides convenient access to the [ZeroEntropy REST API](https://docs.zeroentropy.dev/api-reference/) from any TypeScript or JavaScript application.
66

77
The REST API documentation can be found on [docs.zeroentropy.dev](https://docs.zeroentropy.dev/api-reference). The full API of this library can be found in [api.md](api.md).
88

9+
In order to get an API Key, you can visit our [dashboard](https://dashboard.zeroentropy.dev/).
10+
911
## Installation
1012

1113
```sh
@@ -24,17 +26,13 @@ const client = new ZeroEntropy({
2426
apiKey: process.env['ZEROENTROPY_API_KEY'], // This is the default and can be omitted
2527
});
2628

27-
async function main() {
28-
const response = await client.documents.add({
29-
collection_name: 'example_collection',
30-
content: { type: 'text', text: 'Example Content' },
31-
path: 'my_document.txt',
32-
});
33-
34-
console.log(response.message);
35-
}
29+
const response = await client.documents.add({
30+
collection_name: 'example_collection',
31+
content: { type: 'text', text: 'Example Content' },
32+
path: 'my_document.txt',
33+
});
3634

37-
main();
35+
console.log(response.message);
3836
```
3937

4038
### Request & Response types
@@ -49,11 +47,7 @@ const client = new ZeroEntropy({
4947
apiKey: process.env['ZEROENTROPY_API_KEY'], // This is the default and can be omitted
5048
});
5149

52-
async function main() {
53-
const response: ZeroEntropy.StatusGetStatusResponse = await client.status.getStatus();
54-
}
55-
56-
main();
50+
const response: ZeroEntropy.StatusGetStatusResponse = await client.status.getStatus();
5751
```
5852

5953
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
@@ -66,22 +60,18 @@ a subclass of `APIError` will be thrown:
6660

6761
<!-- prettier-ignore -->
6862
```ts
69-
async function main() {
70-
const response = await client.status.getStatus().catch(async (err) => {
71-
if (err instanceof ZeroEntropy.APIError) {
72-
console.log(err.status); // 400
73-
console.log(err.name); // BadRequestError
74-
console.log(err.headers); // {server: 'nginx', ...}
75-
} else {
76-
throw err;
77-
}
78-
});
79-
}
80-
81-
main();
63+
const response = await client.status.getStatus().catch(async (err) => {
64+
if (err instanceof ZeroEntropy.APIError) {
65+
console.log(err.status); // 400
66+
console.log(err.name); // BadRequestError
67+
console.log(err.headers); // {server: 'nginx', ...}
68+
} else {
69+
throw err;
70+
}
71+
});
8272
```
8373

84-
Error codes are as followed:
74+
Error codes are as follows:
8575

8676
| Status Code | Error Type |
8777
| ----------- | -------------------------- |
@@ -142,15 +132,15 @@ List methods in the ZeroEntropy API are paginated.
142132
You can use the `for await … of` syntax to iterate through items across all pages:
143133

144134
```ts
145-
async function fetchAllDocuments(params) {
146-
const allDocuments = [];
135+
async function fetchAllDocumentGetInfoListResponses(params) {
136+
const allDocumentGetInfoListResponses = [];
147137
// Automatically fetches more pages as needed.
148138
for await (const documentGetInfoListResponse of client.documents.getInfoList({
149139
collection_name: 'example_collection',
150140
})) {
151-
allDocuments.push(documentGetInfoListResponse);
141+
allDocumentGetInfoListResponses.push(documentGetInfoListResponse);
152142
}
153-
return allDocuments;
143+
return allDocumentGetInfoListResponses;
154144
}
155145
```
156146

SECURITY.md

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

33
## Reporting Security Issues
44

5-
This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
5+
This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
66

7-
To report a security issue, please contact the Stainless team at security@stainlessapi.com.
7+
To report a security issue, please contact the Stainless team at security@stainless.com.
88

99
## Responsible Disclosure
1010

@@ -16,11 +16,11 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by ZeroEntropy please follow the respective company's security reporting guidelines.
19+
or products provided by ZeroEntropy, please follow the respective company's security reporting guidelines.
2020

2121
### ZeroEntropy Terms and Policies
2222

23-
Please contact [email protected] for any questions or concerns regarding security of our services.
23+
Please contact [email protected] for any questions or concerns regarding the security of our services.
2424

2525
---
2626

bin/publish-npm

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,35 @@ set -eux
44

55
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
66

7-
# Build the project
87
yarn build
9-
10-
# Navigate to the dist directory
118
cd dist
129

13-
# Get the version from package.json
10+
# Get latest version from npm
11+
#
12+
# If the package doesn't exist, yarn will return
13+
# {"type":"error","data":"Received invalid response from npm."}
14+
# where .data.version doesn't exist so LAST_VERSION will be an empty string.
15+
LAST_VERSION="$(yarn info --json 2> /dev/null | jq -r '.data.version')"
16+
17+
# Get current version from package.json
1418
VERSION="$(node -p "require('./package.json').version")"
1519

16-
# Extract the pre-release tag if it exists
20+
# Check if current version is pre-release (e.g. alpha / beta / rc)
21+
CURRENT_IS_PRERELEASE=false
1722
if [[ "$VERSION" =~ -([a-zA-Z]+) ]]; then
18-
# Extract the part before any dot in the pre-release identifier
19-
TAG="${BASH_REMATCH[1]}"
23+
CURRENT_IS_PRERELEASE=true
24+
CURRENT_TAG="${BASH_REMATCH[1]}"
25+
fi
26+
27+
# Check if last version is a stable release
28+
LAST_IS_STABLE_RELEASE=true
29+
if [[ -z "$LAST_VERSION" || "$LAST_VERSION" =~ -([a-zA-Z]+) ]]; then
30+
LAST_IS_STABLE_RELEASE=false
31+
fi
32+
33+
# Use a corresponding alpha/beta tag if there already is a stable release and we're publishing a prerelease.
34+
if $CURRENT_IS_PRERELEASE && $LAST_IS_STABLE_RELEASE; then
35+
TAG="$CURRENT_TAG"
2036
else
2137
TAG="latest"
2238
fi

0 commit comments

Comments
 (0)