diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c1a3dd5..9200b48 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,6 +19,7 @@ on: description: "Package to publish" options: - federation + - client type: choice required: true @@ -50,8 +51,14 @@ jobs: - 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' + - name: CD to package directory + run: cd ${{ github.event.inputs.package }} + + - name: Patch Bunpublish to not break + run: sed -i --follow-symlinks 's/getHeapStatistics().heap_size_limit/99999999/g' "node_modules/@npmcli/arborist/lib/packument-cache.js" + - name: Publish to NPM run: bunx @morlay/bunpublish --provenance --tag ${{ github.event.inputs.tag }} - name: Publish to JSR - run: cd ${{ github.event.inputs.package }} && bunx jsr publish --allow-slow-types --allow-dirty + run: bunx jsr publish --allow-slow-types --allow-dirty diff --git a/bun.lockb b/bun.lockb index e639731..6746d4b 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/client/bun.lockb b/client/bun.lockb index cb3a04f..b9a516d 100755 Binary files a/client/bun.lockb and b/client/bun.lockb differ diff --git a/client/jsr.jsonc b/client/jsr.jsonc new file mode 100644 index 0000000..c0f866f --- /dev/null +++ b/client/jsr.jsonc @@ -0,0 +1,8 @@ +{ + "$schema": "https://jsr.io/schema/config-file.v1.json", + "name": "@lysand-org/client", + "version": "0.0.0", + "exports": { + ".": "./index.ts" + } +} diff --git a/client/lysand/lysand.ts b/client/lysand/lysand.ts index a25e808..b060479 100644 --- a/client/lysand/lysand.ts +++ b/client/lysand/lysand.ts @@ -33,6 +33,17 @@ type StatusContentType = | "text/html" | "text/x.misskeymarkdown"; +/** + * LysandClient is a client for interacting with the Lysand API. + * + * @extends BaseClient + * @example + * const client = new LysandClient(new URL("https://example.com")); + * + * const { data } = await client.getInstance(); + * + * console.log(data); + */ export class LysandClient extends BaseClient { /** * POST /api/v1/follow_requests/:id/authorize diff --git a/client/package.json b/client/package.json index 0346c7f..fb64bd1 100644 --- a/client/package.json +++ b/client/package.json @@ -55,5 +55,8 @@ "@types/mime-types": "^2.1.4", "magic-regexp": "^0.8.0", "mime-types": "^2.1.35" + }, + "devDependencies": { + "@morlay/bunpublish": "^0.4.1" } } diff --git a/federation/package.json b/federation/package.json index 4e7916e..928fde5 100644 --- a/federation/package.json +++ b/federation/package.json @@ -64,5 +64,8 @@ "mime-types": "^2.1.35", "zod": "^3.23.8", "zod-validation-error": "^3.3.0" + }, + "devDependencies": { + "@morlay/bunpublish": "^0.4.1" } }