diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..fdc235b --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,33 @@ +on: + push: + branches: + - '**' # Run on all branches + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 'latest' + - run: npm ci + - run: npm install -g tsx + - run: npm run build # Add build step if needed + - run: npm test + + publish: + needs: test + if: github.ref == 'refs/heads/main' # Only run this job on main branch + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 'latest' + - run: npm ci + - run: npm install -g tsx + - run: npm run build # Add build step here too + - uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/index.ts b/index.ts index 1956aaa..8b02d91 100644 --- a/index.ts +++ b/index.ts @@ -10,7 +10,7 @@ import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprot const server = new Server( { name: "task-manager-server", - version: "1.0.5" + version: "1.0.6" }, { capabilities: { diff --git a/package-lock.json b/package-lock.json index a76bacb..65cb4a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "taskqueue-mcp", - "version": "1.0.5", + "version": "1.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "taskqueue-mcp", - "version": "1.0.5", + "version": "1.0.6", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.7.0", diff --git a/package.json b/package.json index e6aebd5..750a0c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "taskqueue-mcp", - "version": "1.0.5", + "version": "1.0.6", "description": "Task Queue MCP Server", "author": "Christopher C. Smith (christopher.smith@promptlytechnologies.com)", "main": "dist/index.js", @@ -19,7 +19,7 @@ "build": "tsc", "start": "node dist/index.js", "dev": "tsc && node dist/index.js", - "test": "NODE_OPTIONS=--experimental-vm-modules jest", + "test": "tsc && NODE_OPTIONS=--experimental-vm-modules jest", "approve-task": "node dist/src/cli.js approve-task", "list-tasks": "node dist/src/cli.js list" }, diff --git a/tests/integration/mcp-client.test.ts b/tests/integration/mcp-client.test.ts index 922df76..7ad60c4 100644 --- a/tests/integration/mcp-client.test.ts +++ b/tests/integration/mcp-client.test.ts @@ -4,7 +4,7 @@ import { describe, it, expect, beforeAll, afterAll } from '@jest/globals'; import * as path from 'node:path'; import * as os from 'node:os'; import * as fs from 'node:fs/promises'; -import { Tool } from "@modelcontextprotocol/sdk/types.js"; +import process from 'node:process'; interface ToolResponse { isError: boolean; @@ -29,7 +29,7 @@ describe('MCP Client Integration', () => { // Set up the transport with environment variable for test file transport = new StdioClientTransport({ - command: "node", + command: process.execPath, // Use full path to current Node.js executable args: ["dist/index.js"], env: { TASK_MANAGER_FILE_PATH: testFilePath, @@ -38,7 +38,7 @@ describe('MCP Client Integration', () => { } }); - console.log('Created transport with command:', 'node', 'dist/index.js'); + console.log('Created transport with command:', process.execPath, 'dist/index.js'); // Set up the client client = new Client(