From 0a6ec001c489c53040ea197d6c864f8b96fa8ac4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 21 Sep 2025 03:10:14 +0000 Subject: [PATCH 1/2] chore: update SDK settings --- .github/workflows/publish-npm.yml | 50 ++++++++++++++++++++++++++++ .github/workflows/release-doctor.yml | 1 + .stats.yml | 2 +- CONTRIBUTING.md | 14 ++++++++ README.md | 5 +-- bin/check-release-environment | 4 +++ packages/mcp-server/README.md | 25 +++----------- 7 files changed, 76 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/publish-npm.yml diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 00000000..e70ffc9f --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,50 @@ +# 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/imagekit-developer/imagekit-nodejs/actions/workflows/publish-npm.yml +name: Publish NPM +on: + workflow_dispatch: + inputs: + path: + description: The path to run the release in, e.g. '.' or 'packages/mcp-server' + required: true + + release: + types: [published] + +jobs: + publish: + name: publish + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name: Install dependencies + run: | + yarn install + + - name: Publish to NPM + run: | + if [ -n "${{ github.event.inputs.path }}" ]; then + PATHS_RELEASED='[\"${{ github.event.inputs.path }}\"]' + else + PATHS_RELEASED='[\".\", \"packages/mcp-server\"]' + fi + yarn tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }" + env: + NPM_TOKEN: ${{ secrets.IMAGE_KIT_NPM_TOKEN || secrets.NPM_TOKEN }} + + - name: Upload MCP Server DXT GitHub release asset + run: | + gh release upload ${{ github.event.release.tag_name }} \ + packages/mcp-server/imagekit_nodejs_api.mcpb + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 678e0297..949a0a1a 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -18,3 +18,4 @@ jobs: run: | bash ./bin/check-release-environment env: + NPM_TOKEN: ${{ secrets.IMAGE_KIT_NPM_TOKEN || secrets.NPM_TOKEN }} diff --git a/.stats.yml b/.stats.yml index e1604c7a..031fed99 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 42 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-d1a3e6dfc45ae832b6b14a0aef25878985c679fa9f48c1470df188b1578ba648.yml openapi_spec_hash: 1d382866fce3284f26d341f112988d9d -config_hash: ff23f46fe08ef3f43c57c8cf13eff3a1 +config_hash: d57f3c7c581048428b41398f30da8b9b diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b7920529..61483a34 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -91,3 +91,17 @@ To format and fix all lint issues automatically: ```sh $ yarn 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/imagekit-developer/imagekit-nodejs/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. diff --git a/README.md b/README.md index b40708e7..b565959a 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,9 @@ If you are looking to integrate file uploads in browsers, use one of our [fronte ## Installation ```sh -npm install git+ssh://git@github.com:imagekit-developer/imagekit-nodejs.git +npm install @imagekit/nodejs ``` -> [!NOTE] -> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npm install @imagekit/nodejs` - ## Usage The full API of this library can be found in [api.md](api.md). diff --git a/bin/check-release-environment b/bin/check-release-environment index 6b43775a..e4b6d58e 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -2,6 +2,10 @@ 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 diff --git a/packages/mcp-server/README.md b/packages/mcp-server/README.md index 95170839..1b8f2944 100644 --- a/packages/mcp-server/README.md +++ b/packages/mcp-server/README.md @@ -2,34 +2,19 @@ ## Installation -### Building +### Direct invocation -Because it's not published yet, clone the repo and build it: +You can run the MCP Server directly via `npx`: ```sh -git clone git@github.com:imagekit-developer/imagekit-nodejs.git -cd imagekit-nodejs -./scripts/bootstrap -./scripts/build -``` - -### Running - -```sh -# set env vars as needed export IMAGEKIT_PRIVATE_KEY="My Private Key" export OPTIONAL_IMAGEKIT_IGNORES_THIS="My Password" export IMAGEKIT_WEBHOOK_SECRET="My Webhook Secret" -node ./packages/mcp-server/dist/index.js +npx -y imagekit-api-mcp@latest ``` -> [!NOTE] -> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npx -y imagekit-api-mcp` - ### Via MCP Client -[Build the project](#building) as mentioned above. - There is a partial list of existing clients at [modelcontextprotocol.io](https://modelcontextprotocol.io/clients). If you already have a client, consult their documentation to install the MCP server. @@ -39,8 +24,8 @@ For clients with a configuration JSON, it might look something like this: { "mcpServers": { "imagekit_nodejs_api": { - "command": "node", - "args": ["/path/to/local/imagekit-nodejs/packages/mcp-server", "--client=claude", "--tools=dynamic"], + "command": "npx", + "args": ["-y", "imagekit-api-mcp", "--client=claude", "--tools=dynamic"], "env": { "IMAGEKIT_PRIVATE_KEY": "My Private Key", "OPTIONAL_IMAGEKIT_IGNORES_THIS": "My Password", From be4613ada805f41f9b1d26aa7de1195d7e560f13 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 21 Sep 2025 03:10:44 +0000 Subject: [PATCH 2/2] release: 7.0.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ package.json | 2 +- packages/mcp-server/package.json | 2 +- packages/mcp-server/src/server.ts | 2 +- src/version.ts | 2 +- 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index aeda91d8..9995fe5e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "7.0.0" + ".": "7.0.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d4f73e1..143bae8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 7.0.1 (2025-09-21) + +Full Changelog: [v7.0.0...v7.0.1](https://github.com/imagekit-developer/imagekit-nodejs/compare/v7.0.0...v7.0.1) + +### Chores + +* update SDK settings ([0a6ec00](https://github.com/imagekit-developer/imagekit-nodejs/commit/0a6ec001c489c53040ea197d6c864f8b96fa8ac4)) + ## 7.0.0 (2025-09-21) Full Changelog: [v0.0.1-alpha.0...v7.0.0](https://github.com/imagekit-developer/imagekit-nodejs/compare/v0.0.1-alpha.0...v7.0.0) diff --git a/package.json b/package.json index d250a709..b638d05d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@imagekit/nodejs", - "version": "7.0.0", + "version": "7.0.1", "description": "Offical NodeJS SDK for ImageKit.io integration", "author": "Image Kit ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index d9d27302..a5b18f9e 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -1,6 +1,6 @@ { "name": "imagekit-api-mcp", - "version": "7.0.0", + "version": "7.0.1", "description": "The official MCP Server for the Image Kit API", "author": "Image Kit ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 789f894f..d8b13fc5 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -33,7 +33,7 @@ export const newMcpServer = () => new McpServer( { name: 'imagekit_nodejs_api', - version: '7.0.0', + version: '7.0.1', }, { capabilities: { tools: {}, logging: {} } }, ); diff --git a/src/version.ts b/src/version.ts index e1f023d3..1ed227e2 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '7.0.0'; // x-release-please-version +export const VERSION = '7.0.1'; // x-release-please-version