Skip to content

Commit

Permalink
release: 0.3.0 (#65)
Browse files Browse the repository at this point in the history
* chore: rebuild project due to codegen change (#64)

* feat(api): api update (#66)

* chore: rebuild project due to codegen change (#67)

* chore: rebuild project due to codegen change (#68)

* chore: rebuild project due to codegen change (#69)

* docs: remove suggestion to use `npm` call out (#70)

* chore: remove redundant word in comment (#71)

* feat(internal): make git install file structure match npm (#72)

* feat(api): api update (#73)

* release: 0.3.0

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
  • Loading branch information
stainless-app[bot] authored Dec 5, 2024
1 parent d39e02e commit 0117ca8
Show file tree
Hide file tree
Showing 13 changed files with 77 additions and 97 deletions.
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.2.0"
".": "0.3.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/riza%2Friza-api-6a6ef20cc3e9d270a1ddd031d63f754cfec74c877c184161a7996249a5cffae6.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/riza%2Friza-api-9a6cae8060b4218d0c77f439b226c60ee21f22d0ec5846c4ed3f20b5e9543046.yml
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 0.3.0 (2024-12-02)

Full Changelog: [v0.2.0...v0.3.0](https://github.com/riza-io/riza-api-node/compare/v0.2.0...v0.3.0)

### Features

* **api:** api update ([#66](https://github.com/riza-io/riza-api-node/issues/66)) ([8b9ea4e](https://github.com/riza-io/riza-api-node/commit/8b9ea4e5cc6d7c77fdfb0d3a678952679e8d5ecf))
* **api:** api update ([#73](https://github.com/riza-io/riza-api-node/issues/73)) ([0233f64](https://github.com/riza-io/riza-api-node/commit/0233f64ee49306a2db9e1f1d2660e61bb799095a))
* **internal:** make git install file structure match npm ([#72](https://github.com/riza-io/riza-api-node/issues/72)) ([1bc5c1f](https://github.com/riza-io/riza-api-node/commit/1bc5c1f27b83966b79b92f814b5bd545cf31e155))


### Chores

* rebuild project due to codegen change ([#64](https://github.com/riza-io/riza-api-node/issues/64)) ([1ee15f3](https://github.com/riza-io/riza-api-node/commit/1ee15f381194a5efe0a12aa64222e420b022f310))
* rebuild project due to codegen change ([#67](https://github.com/riza-io/riza-api-node/issues/67)) ([53df425](https://github.com/riza-io/riza-api-node/commit/53df425c5080662e12ced02e5cade5f992efeb1e))
* rebuild project due to codegen change ([#68](https://github.com/riza-io/riza-api-node/issues/68)) ([b0df832](https://github.com/riza-io/riza-api-node/commit/b0df8329029174670c8d38294444c25e60d74fbd))
* rebuild project due to codegen change ([#69](https://github.com/riza-io/riza-api-node/issues/69)) ([921638c](https://github.com/riza-io/riza-api-node/commit/921638c9629f5bf7dc7f08fef9debaa8a53793ce))
* remove redundant word in comment ([#71](https://github.com/riza-io/riza-api-node/issues/71)) ([9965611](https://github.com/riza-io/riza-api-node/commit/9965611583ecb1d7df5ac19063f6039c47712a23))


### Documentation

* remove suggestion to use `npm` call out ([#70](https://github.com/riza-io/riza-api-node/issues/70)) ([30808da](https://github.com/riza-io/riza-api-node/commit/30808da56c5ffd2b75319cc2ea21652ad4df6ad5))

## 0.2.0 (2024-11-07)

Full Changelog: [v0.1.1...v0.2.0](https://github.com/riza-io/riza-api-node/compare/v0.1.1...v0.2.0)
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,15 @@ TypeScript >= 4.5 is supported.

The following runtimes are supported:

- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
- Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
- Deno v1.28.0 or higher.
- Bun 1.0 or later.
- Cloudflare Workers.
- Vercel Edge Runtime.
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
- Nitro v2.6 or greater.

Note that React Native is not supported at this time.

If you are interested in other runtime environments, please open or upvote an issue on GitHub.
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@riza-io/api",
"version": "0.2.0",
"version": "0.3.0",
"description": "The official TypeScript library for the Riza API",
"author": "Riza <[email protected]>",
"types": "dist/index.d.ts",
Expand All @@ -18,7 +18,7 @@
"build": "./scripts/build",
"prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1",
"format": "prettier --write --cache --cache-strategy metadata . !dist",
"prepare": "if ./scripts/utils/check-is-in-git-install.sh; then ./scripts/build; fi",
"prepare": "if ./scripts/utils/check-is-in-git-install.sh; then ./scripts/build && ./scripts/utils/git-swap.sh; fi",
"tsn": "ts-node -r tsconfig-paths/register",
"lint": "./scripts/lint",
"fix": "./scripts/format"
Expand All @@ -45,7 +45,6 @@
"jest": "^29.4.0",
"prettier": "^3.0.0",
"ts-jest": "^29.1.0",
"ts-morph": "^19.0.0",
"ts-node": "^10.5.0",
"tsc-multi": "^1.1.0",
"tsconfig-paths": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ npm exec tsc-multi
# copy over handwritten .js/.mjs/.d.ts files
cp src/_shims/*.{d.ts,js,mjs,md} dist/_shims
cp src/_shims/auto/*.{d.ts,js,mjs} dist/_shims/auto
# we need to add exports = module.exports = Riza Node to index.js;
# we need to add exports = module.exports = Riza to index.js;
# No way to get that from index.ts because it would cause compile errors
# when building .mjs
node scripts/utils/fix-index-exports.cjs
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/check-is-in-git-install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Check if you happen to call prepare for a repository that's already in node_modules.
[ "$(basename "$(dirname "$PWD")")" = 'node_modules' ] ||
# The name of the containing directory that 'npm` uses, which looks like
Expand Down
13 changes: 13 additions & 0 deletions scripts/utils/git-swap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -exuo pipefail
# the package is published to NPM from ./dist
# we want the final file structure for git installs to match the npm installs, so we

# delete everything except ./dist and ./node_modules
find . -maxdepth 1 -mindepth 1 ! -name 'dist' ! -name 'node_modules' -exec rm -rf '{}' +

# move everything from ./dist to .
mv dist/* .

# delete the now-empty ./dist
rmdir dist
37 changes: 17 additions & 20 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,29 +170,9 @@ export class Riza extends Core.APIClient {
static fileFromPath = Uploads.fileFromPath;
}

export {
RizaError,
APIError,
APIConnectionError,
APIConnectionTimeoutError,
APIUserAbortError,
NotFoundError,
ConflictError,
RateLimitError,
BadRequestError,
AuthenticationError,
InternalServerError,
PermissionDeniedError,
UnprocessableEntityError,
} from './error';

export import toFile = Uploads.toFile;
export import fileFromPath = Uploads.fileFromPath;

Riza.Secrets = Secrets;
Riza.Tools = Tools;
Riza.Command = Command;

export declare namespace Riza {
export type RequestOptions = Core.RequestOptions;

Expand Down Expand Up @@ -220,4 +200,21 @@ export declare namespace Riza {
};
}

export { toFile, fileFromPath } from './uploads';
export {
RizaError,
APIError,
APIConnectionError,
APIConnectionTimeoutError,
APIUserAbortError,
NotFoundError,
ConflictError,
RateLimitError,
BadRequestError,
AuthenticationError,
InternalServerError,
PermissionDeniedError,
UnprocessableEntityError,
} from './error';

export default Riza;
8 changes: 4 additions & 4 deletions src/resources/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface Tool {

input_schema: unknown;

language: 'PYTHON' | 'JAVASCRIPT' | 'TYPESCRIPT' | 'RUBY' | 'PHP';
language: 'PYTHON' | 'JAVASCRIPT' | 'TYPESCRIPT';

name: string;

Expand All @@ -64,7 +64,7 @@ export interface ToolListResponse {
export interface ToolExecResponse {
execution: ToolExecResponse.Execution;

output?: string;
output?: unknown;
}

export namespace ToolExecResponse {
Expand All @@ -86,7 +86,7 @@ export interface ToolCreateParams {

input_schema?: unknown;

language?: 'PYTHON' | 'JAVASCRIPT' | 'TYPESCRIPT' | 'RUBY' | 'PHP';
language?: 'PYTHON' | 'JAVASCRIPT' | 'TYPESCRIPT';
}

export interface ToolUpdateParams {
Expand All @@ -96,7 +96,7 @@ export interface ToolUpdateParams {

input_schema?: unknown | null;

language?: 'PYTHON' | 'JAVASCRIPT' | 'TYPESCRIPT' | 'RUBY' | 'PHP';
language?: 'PYTHON' | 'JAVASCRIPT' | 'TYPESCRIPT';

name?: string | null;
}
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.2.0'; // x-release-please-version
export const VERSION = '0.3.0'; // x-release-please-version
28 changes: 3 additions & 25 deletions tests/api-resources/command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@ describe('resource command', () => {
test('exec: required and optional params', async () => {
const response = await client.command.exec({
code: 'print("Hello world!")',
allow_http_hosts: ['string', 'string', 'string'],
args: ['string', 'string', 'string'],
allow_http_hosts: ['string'],
args: ['string'],
env: { foo: 'string' },
files: [
{ contents: 'contents', path: 'path' },
{ contents: 'contents', path: 'path' },
{ contents: 'contents', path: 'path' },
],
files: [{ contents: 'contents', path: 'path' }],
http: {
allow: [
{
Expand All @@ -42,24 +38,6 @@ describe('resource command', () => {
},
host: 'host',
},
{
auth: {
basic: { password: 'password', user_id: 'user_id' },
bearer: { token: 'token' },
header: { name: 'name', value: 'value' },
query: { key: 'key', value: 'value' },
},
host: 'host',
},
{
auth: {
basic: { password: 'password', user_id: 'user_id' },
bearer: { token: 'token' },
header: { name: 'name', value: 'value' },
query: { key: 'key', value: 'value' },
},
host: 'host',
},
],
},
language: 'PYTHON',
Expand Down
40 changes: 0 additions & 40 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -759,16 +759,6 @@
dependencies:
"@swc/counter" "^0.1.3"

"@ts-morph/common@~0.20.0":
version "0.20.0"
resolved "https://registry.yarnpkg.com/@ts-morph/common/-/common-0.20.0.tgz#3f161996b085ba4519731e4d24c35f6cba5b80af"
integrity sha512-7uKjByfbPpwuzkstL3L5MQyuXPSKdoNG93Fmi2JoDcTf3pEP731JdRFAduRVkOs8oqxPsXKA+ScrWkdQ8t/I+Q==
dependencies:
fast-glob "^3.2.12"
minimatch "^7.4.3"
mkdirp "^2.1.6"
path-browserify "^1.0.1"

"@tsconfig/node10@^1.0.7":
version "1.0.8"
resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9"
Expand Down Expand Up @@ -1315,11 +1305,6 @@ co@^4.6.0:
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==

code-block-writer@^12.0.0:
version "12.0.0"
resolved "https://registry.yarnpkg.com/code-block-writer/-/code-block-writer-12.0.0.tgz#4dd58946eb4234105aff7f0035977b2afdc2a770"
integrity sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==

collect-v8-coverage@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9"
Expand Down Expand Up @@ -2680,23 +2665,11 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
dependencies:
brace-expansion "^1.1.7"

minimatch@^7.4.3:
version "7.4.6"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.6.tgz#845d6f254d8f4a5e4fd6baf44d5f10c8448365fb"
integrity sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==
dependencies:
brace-expansion "^2.0.1"

minimist@^1.2.6:
version "1.2.6"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==

mkdirp@^2.1.6:
version "2.1.6"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-2.1.6.tgz#964fbcb12b2d8c5d6fbc62a963ac95a273e2cc19"
integrity sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==

[email protected]:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
Expand Down Expand Up @@ -2860,11 +2833,6 @@ parse-json@^5.2.0:
json-parse-even-better-errors "^2.3.0"
lines-and-columns "^1.1.6"

path-browserify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd"
integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==

path-exists@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
Expand Down Expand Up @@ -3283,14 +3251,6 @@ ts-jest@^29.1.0:
semver "^7.5.3"
yargs-parser "^21.0.1"

ts-morph@^19.0.0:
version "19.0.0"
resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-19.0.0.tgz#43e95fb0156c3fe3c77c814ac26b7d0be2f93169"
integrity sha512-D6qcpiJdn46tUqV45vr5UGM2dnIEuTGNxVhg0sk5NX11orcouwj6i1bMqZIz2mZTZB1Hcgy7C3oEVhAT+f6mbQ==
dependencies:
"@ts-morph/common" "~0.20.0"
code-block-writer "^12.0.0"

ts-node@^10.5.0:
version "10.7.0"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.7.0.tgz#35d503d0fab3e2baa672a0e94f4b40653c2463f5"
Expand Down

0 comments on commit 0117ca8

Please sign in to comment.