-
Notifications
You must be signed in to change notification settings - Fork 0
release: 0.0.2 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # 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/onkernel/hypeman-ts/actions/workflows/publish-npm.yml | ||
| name: Publish NPM | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| release: | ||
| types: [published] | ||
|
|
||
| jobs: | ||
| publish: | ||
| name: publish | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: '20' | ||
|
|
||
| - name: Set up pnpm | ||
| uses: pnpm/action-setup@v4 | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| pnpm install | ||
|
|
||
| - name: Publish to NPM | ||
| run: | | ||
| bash ./bin/publish-npm | ||
| env: | ||
| NPM_TOKEN: ${{ secrets.HYPEMAN_NPM_TOKEN || secrets.NPM_TOKEN }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Release Doctor | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| release_doctor: | ||
| name: release doctor | ||
| runs-on: ubuntu-latest | ||
| if: github.repository == 'onkernel/hypeman-ts' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Check release environment | ||
| run: | | ||
| bash ./bin/check-release-environment | ||
| env: | ||
| NPM_TOKEN: ${{ secrets.HYPEMAN_NPM_TOKEN || secrets.NPM_TOKEN }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| ".": "0.0.2" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| configured_endpoints: 29 | ||
| openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-95df8b193133def744aa61dc372f286663ffc20d833488d242fa288af65adc39.yml | ||
| openapi_spec_hash: 833120a235ecb298688c2fb1122b3574 | ||
| config_hash: 934c902d7a6d54ba8deccc794b3e9284 | ||
| config_hash: 48d3be2bdbf56b770c9695a338382558 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Changelog | ||
|
|
||
| ## 0.0.2 (2025-12-22) | ||
|
|
||
| Full Changelog: [v0.0.1...v0.0.2](https://github.com/onkernel/hypeman-ts/compare/v0.0.1...v0.0.2) | ||
|
|
||
| ### Chores | ||
|
|
||
| * configure new SDK language ([9eba465](https://github.com/onkernel/hypeman-ts/commit/9eba465b84418dc70994a43eb6b28e498841d8a6)) | ||
| * update SDK settings ([8a8e921](https://github.com/onkernel/hypeman-ts/commit/8a8e92120eea2a6cd22182555ec2caa2d159fca0)) | ||
| * update SDK settings ([523dcfd](https://github.com/onkernel/hypeman-ts/commit/523dcfdff90593e47211b52a05f8d3bed1433780)) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,25 +42,25 @@ 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://[email protected]:stainless-sdks/hypeman-typescript.git | ||
| $ npm install git+ssh://[email protected]:onkernel/hypeman-ts.git | ||
| ``` | ||
|
|
||
| Alternatively, to link a local copy of the repo: | ||
|
|
||
| ```sh | ||
| # Clone | ||
| $ git clone https://www.github.com/stainless-sdks/hypeman-typescript | ||
| $ cd hypeman-typescript | ||
| $ git clone https://www.github.com/onkernel/hypeman-ts | ||
| $ cd hypeman-ts | ||
|
|
||
| # With yarn | ||
| $ yarn link | ||
| $ cd ../my-package | ||
| $ yarn link hypeman | ||
| $ yarn link @onkernel/hypeman | ||
|
|
||
| # With pnpm | ||
| $ pnpm link --global | ||
| $ cd ../my-package | ||
| $ pnpm link -—global hypeman | ||
| $ pnpm link -—global @onkernel/hypeman | ||
| ``` | ||
|
|
||
| ## Running tests | ||
|
|
@@ -91,3 +91,17 @@ To format and fix all lint issues automatically: | |
| ```sh | ||
| $ pnpm fix | ||
| ``` | ||
|
|
||
| ## Publishing and releases | ||
|
|
||
| Changes made to this repository via the automated release PR pipeline should publish to npm automatically. If | ||
| the changes aren't made through the automated pipeline, you may want to make releases manually. | ||
|
|
||
| ### Publish with a GitHub workflow | ||
|
|
||
| You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/onkernel/hypeman-ts/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up. | ||
|
|
||
| ### Publish manually | ||
|
|
||
| If you need to manually release a package, you can run the `bin/publish-npm` script with an `NPM_TOKEN` set on | ||
| the environment. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # Hypeman TypeScript API Library | ||
|
|
||
| [>)](https://npmjs.org/package/hypeman)  | ||
| [>)](https://npmjs.org/package/@onkernel/hypeman)  | ||
|
|
||
| This library provides convenient access to the Hypeman REST API from server-side TypeScript or JavaScript. | ||
|
|
||
|
|
@@ -11,19 +11,16 @@ It is generated with [Stainless](https://www.stainless.com/). | |
| ## Installation | ||
|
|
||
| ```sh | ||
| npm install git+ssh://[email protected]:stainless-sdks/hypeman-typescript.git | ||
| npm install @onkernel/hypeman | ||
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npm install hypeman` | ||
|
|
||
| ## Usage | ||
|
|
||
| The full API of this library can be found in [api.md](api.md). | ||
|
|
||
| <!-- prettier-ignore --> | ||
| ```js | ||
| import Hypeman from 'hypeman'; | ||
| import Hypeman from '@onkernel/hypeman'; | ||
|
|
||
| const client = new Hypeman({ | ||
| apiKey: process.env['HYPEMAN_API_KEY'], // This is the default and can be omitted | ||
|
|
@@ -40,7 +37,7 @@ This library includes TypeScript definitions for all request params and response | |
|
|
||
| <!-- prettier-ignore --> | ||
| ```ts | ||
| import Hypeman from 'hypeman'; | ||
| import Hypeman from '@onkernel/hypeman'; | ||
|
|
||
| const client = new Hypeman({ | ||
| apiKey: process.env['HYPEMAN_API_KEY'], // This is the default and can be omitted | ||
|
|
@@ -162,7 +159,7 @@ The log level can be configured in two ways: | |
| 2. Using the `logLevel` client option (overrides the environment variable if set) | ||
|
|
||
| ```ts | ||
| import Hypeman from 'hypeman'; | ||
| import Hypeman from '@onkernel/hypeman'; | ||
|
|
||
| const client = new Hypeman({ | ||
| logLevel: 'debug', // Show all log messages | ||
|
|
@@ -190,7 +187,7 @@ When providing a custom logger, the `logLevel` option still controls which messa | |
| below the configured level will not be sent to your logger. | ||
|
|
||
| ```ts | ||
| import Hypeman from 'hypeman'; | ||
| import Hypeman from '@onkernel/hypeman'; | ||
| import pino from 'pino'; | ||
|
|
||
| const logger = pino(); | ||
|
|
@@ -259,7 +256,7 @@ globalThis.fetch = fetch; | |
| Or pass it to the client: | ||
|
|
||
| ```ts | ||
| import Hypeman from 'hypeman'; | ||
| import Hypeman from '@onkernel/hypeman'; | ||
| import fetch from 'my-fetch'; | ||
|
|
||
| const client = new Hypeman({ fetch }); | ||
|
|
@@ -270,7 +267,7 @@ const client = new Hypeman({ fetch }); | |
| 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.) | ||
|
|
||
| ```ts | ||
| import Hypeman from 'hypeman'; | ||
| import Hypeman from '@onkernel/hypeman'; | ||
|
|
||
| const client = new Hypeman({ | ||
| fetchOptions: { | ||
|
|
@@ -287,7 +284,7 @@ options to requests: | |
| <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> | ||
|
|
||
| ```ts | ||
| import Hypeman from 'hypeman'; | ||
| import Hypeman from '@onkernel/hypeman'; | ||
| import * as undici from 'undici'; | ||
|
|
||
| const proxyAgent = new undici.ProxyAgent('http://localhost:8888'); | ||
|
|
@@ -301,7 +298,7 @@ const client = new Hypeman({ | |
| <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> | ||
|
|
||
| ```ts | ||
| import Hypeman from 'hypeman'; | ||
| import Hypeman from '@onkernel/hypeman'; | ||
|
|
||
| const client = new Hypeman({ | ||
| fetchOptions: { | ||
|
|
@@ -313,7 +310,7 @@ const client = new Hypeman({ | |
| <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> | ||
|
|
||
| ```ts | ||
| import Hypeman from 'npm:hypeman'; | ||
| import Hypeman from 'npm:@onkernel/hypeman'; | ||
|
|
||
| const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } }); | ||
| const client = new Hypeman({ | ||
|
|
@@ -335,7 +332,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/stainless-sdks/hypeman-typescript/issues) with questions, bugs, or suggestions. | ||
| We are keen for your feedback; please open an [issue](https://www.github.com/onkernel/hypeman-ts/issues) with questions, bugs, or suggestions. | ||
|
|
||
| ## Requirements | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| errors=() | ||
|
|
||
| if [ -z "${NPM_TOKEN}" ]; then | ||
| errors+=("The NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets") | ||
| fi | ||
|
|
||
| lenErrors=${#errors[@]} | ||
|
|
||
| if [[ lenErrors -gt 0 ]]; then | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing
|
||
| echo -e "Found the following errors in the release environment:\n" | ||
|
|
||
| for error in "${errors[@]}"; do | ||
| echo -e "- $error\n" | ||
| done | ||
|
|
||
| exit 1 | ||
| fi | ||
|
|
||
| echo "The environment is ready to push releases!" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| { | ||
| "name": "hypeman", | ||
| "version": "0.0.1", | ||
| "name": "@onkernel/hypeman", | ||
| "version": "0.0.2", | ||
| "description": "The official TypeScript library for the Hypeman API", | ||
| "author": "Hypeman <>", | ||
| "types": "dist/index.d.ts", | ||
| "main": "dist/index.js", | ||
| "type": "commonjs", | ||
| "repository": "github:stainless-sdks/hypeman-typescript", | ||
| "repository": "github:onkernel/hypeman-ts", | ||
| "license": "Apache-2.0", | ||
| "packageManager": "[email protected]", | ||
| "files": [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| { | ||
| "packages": { | ||
| ".": {} | ||
| }, | ||
| "$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json", | ||
| "include-v-in-tag": true, | ||
| "include-component-in-tag": false, | ||
| "versioning": "prerelease", | ||
| "prerelease": true, | ||
| "bump-minor-pre-major": true, | ||
| "bump-patch-for-minor-pre-major": false, | ||
| "pull-request-header": "Automated Release PR", | ||
| "pull-request-title-pattern": "release: ${version}", | ||
| "changelog-sections": [ | ||
| { | ||
| "type": "feat", | ||
| "section": "Features" | ||
| }, | ||
| { | ||
| "type": "fix", | ||
| "section": "Bug Fixes" | ||
| }, | ||
| { | ||
| "type": "perf", | ||
| "section": "Performance Improvements" | ||
| }, | ||
| { | ||
| "type": "revert", | ||
| "section": "Reverts" | ||
| }, | ||
| { | ||
| "type": "chore", | ||
| "section": "Chores" | ||
| }, | ||
| { | ||
| "type": "docs", | ||
| "section": "Documentation" | ||
| }, | ||
| { | ||
| "type": "style", | ||
| "section": "Styles" | ||
| }, | ||
| { | ||
| "type": "refactor", | ||
| "section": "Refactors" | ||
| }, | ||
| { | ||
| "type": "test", | ||
| "section": "Tests", | ||
| "hidden": true | ||
| }, | ||
| { | ||
| "type": "build", | ||
| "section": "Build System" | ||
| }, | ||
| { | ||
| "type": "ci", | ||
| "section": "Continuous Integration", | ||
| "hidden": true | ||
| } | ||
| ], | ||
| "release-type": "node", | ||
| "extra-files": ["src/version.ts", "README.md"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export const VERSION = '0.0.1'; | ||
| export const VERSION = '0.0.2'; // x-release-please-version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workflow condition checks for impossible push event
The
ifcondition checks forgithub.event_name == 'push', but the workflow only triggers onpull_requestandworkflow_dispatchevents. Thepushcondition will never be true. This appears to be a copy-paste error - the condition likely should check forpull_requestinstead ofpushto correctly match the workflow triggers.