Skip to content

Commit

Permalink
Release 1.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
polytomic-sdk-bot committed Jul 10, 2024
1 parent 5196665 commit d9b017f
Show file tree
Hide file tree
Showing 164 changed files with 1,520 additions and 566 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- name: Compile
run: yarn && yarn build

test:
runs-on: ubuntu-latest

Expand All @@ -27,29 +27,31 @@ jobs:
uses: actions/setup-node@v3

- name: Compile
run: yarn && yarn test
run: yarn && yarn test

publish:
needs: [ compile, test ]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build

- name: Publish to npm
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
npm publish --access public
if [[ ${GITHUB_REF} == *alpha* ]]; then
npm publish --access public --tag alpha
elif [[ ${GITHUB_REF} == *beta* ]]; then
npm publish --access public --tag beta
else
npm publish --access public
fi
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 1 addition & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
node_modules
.DS_Store
/dist
/Client.d.ts
/Client.js
/environments.d.ts
/environments.js
/index.d.ts
/index.js
/api
/core
/errors
/dist
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
src
tests
.gitignore
.github
.fernignore
Expand Down
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
/** @type {import('jest').Config} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
};
};
19 changes: 13 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"name": "polytomic",
"version": "1.8.0",
"version": "1.8.2",
"private": false,
"repository": "https://github.com/polytomic/polytomic-typescript",
"license": "MIT",
"main": "./index.js",
"types": "./index.d.ts",
"scripts": {
"format": "prettier --write 'src/**/*.ts'",
"format": "prettier . --write --ignore-unknown",
"build": "tsc",
"prepack": "cp -rv dist/. .",
"test": "jest"
},
"dependencies": {
"url-join": "4.0.1",
"form-data": "4.0.0",
"formdata-node": "^6.0.3",
"node-fetch": "2.7.0",
"qs": "6.11.2",
"js-base64": "3.7.2"
Expand All @@ -23,11 +24,17 @@
"@types/url-join": "4.0.1",
"@types/qs": "6.9.8",
"@types/node-fetch": "2.6.9",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1",
"jest": "29.7.0",
"@types/jest": "29.5.5",
"ts-jest": "29.1.1",
"jest-environment-jsdom": "29.7.0",
"@types/node": "17.0.33",
"prettier": "2.7.1",
"typescript": "4.6.4"
},
"browser": {
"fs": false,
"os": false,
"path": false
}
}
}
6 changes: 6 additions & 0 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ export declare namespace PolytomicClient {
}

interface RequestOptions {
/** The maximum time to wait for a response in seconds. */
timeoutInSeconds?: number;
/** The number of times to retry the request. Defaults to 2. */
maxRetries?: number;
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the X-Polytomic-Version header */
version?: string | undefined;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/api/errors/BadRequestError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* This file was auto-generated from our API Definition.
*/

import * as errors from "../../errors";
import * as Polytomic from "..";
import * as errors from "../../errors/index";
import * as Polytomic from "../index";

export class BadRequestError extends errors.PolytomicError {
constructor(body: Polytomic.ApiError) {
Expand Down
4 changes: 2 additions & 2 deletions src/api/errors/ForbiddenError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* This file was auto-generated from our API Definition.
*/

import * as errors from "../../errors";
import * as Polytomic from "..";
import * as errors from "../../errors/index";
import * as Polytomic from "../index";

export class ForbiddenError extends errors.PolytomicError {
constructor(body: Polytomic.ApiError) {
Expand Down
4 changes: 2 additions & 2 deletions src/api/errors/InternalServerError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* This file was auto-generated from our API Definition.
*/

import * as errors from "../../errors";
import * as Polytomic from "..";
import * as errors from "../../errors/index";
import * as Polytomic from "../index";

export class InternalServerError extends errors.PolytomicError {
constructor(body: Polytomic.ApiError) {
Expand Down
4 changes: 2 additions & 2 deletions src/api/errors/NotFoundError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* This file was auto-generated from our API Definition.
*/

import * as errors from "../../errors";
import * as Polytomic from "..";
import * as errors from "../../errors/index";
import * as Polytomic from "../index";

export class NotFoundError extends errors.PolytomicError {
constructor(body: Polytomic.ApiError) {
Expand Down
4 changes: 2 additions & 2 deletions src/api/errors/UnauthorizedError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* This file was auto-generated from our API Definition.
*/

import * as errors from "../../errors";
import * as Polytomic from "..";
import * as errors from "../../errors/index";
import * as Polytomic from "../index";

export class UnauthorizedError extends errors.PolytomicError {
constructor(body: Polytomic.RestErrResponse) {
Expand Down
4 changes: 2 additions & 2 deletions src/api/errors/UnprocessableEntityError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* This file was auto-generated from our API Definition.
*/

import * as errors from "../../errors";
import * as Polytomic from "..";
import * as errors from "../../errors/index";
import * as Polytomic from "../index";

export class UnprocessableEntityError extends errors.PolytomicError {
constructor(body: Polytomic.ApiError) {
Expand Down
Loading

0 comments on commit d9b017f

Please sign in to comment.