diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a2a74c6..ac039a5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,8 +45,9 @@ jobs: - name: Install dependencies run: bun install --frozen-lockfile - - name: Build - run: bun run build + # Code is not minified and bundled anymore + #- name: Build + # run: bun run build - name: Change version in package.json to ${{ github.event.inputs.version }}, defaulting to the truncated commit hash run: 'sed -i ''s/"version": ".*"/"version": "${{ github.event.inputs.version }}"/'' package.json ${{ github.event.inputs.package }}/package.json ${{ github.event.inputs.package }}/jsr.jsonc' diff --git a/client/lysand/base.ts b/client/lysand/base.ts index b54e327..bd5bde8 100644 --- a/client/lysand/base.ts +++ b/client/lysand/base.ts @@ -13,6 +13,10 @@ type ConvertibleObject = { | ConvertibleObject; }; +/** + * Output of a request. Contains the data and headers. + * @template ReturnType The type of the data returned by the request. + */ export interface Output { data: ReturnType; headers: Headers; @@ -50,6 +54,12 @@ const objectToFormData = (obj: ConvertibleObject): FormData => { }, new FormData()); }; +/** + * Wrapper around Error, useful for detecting if an error + * is due to a failed request. + * + * Throws if the request returns invalid or unexpected data. + */ export class ResponseError extends Error {} export class BaseClient { diff --git a/client/types/token.ts b/client/types/token.ts index 0021a49..b3121df 100644 --- a/client/types/token.ts +++ b/client/types/token.ts @@ -1,3 +1,6 @@ +/** + * Mastodon API Access Token + */ export type Token = { access_token: string; token_type: string; diff --git a/federation/package.json b/federation/package.json index 928fde5..3275621 100644 --- a/federation/package.json +++ b/federation/package.json @@ -39,9 +39,8 @@ }, "exports": { ".": { - "import": "./dist/index.js", - "default": "./dist/index.js", - "types": "./dist/index.d.ts" + "import": "./index.ts", + "default": "./index.ts" } }, "funding": {