Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,20 @@ version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: monday
schedule: { interval: weekly, day: monday }
open-pull-requests-limit: 5
groups:
mcp-sdk:
patterns:
- "@modelcontextprotocol/*"
patterns: ["@modelcontextprotocol/*"]
production:
dependency-type: production
update-types: [minor, patch]
dev:
dependency-type: development
update-types: [minor, patch]

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
schedule: { interval: weekly }
open-pull-requests-limit: 3
groups:
actions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
permissions:
contents: write
pull-requests: write
id-token: write # required for npm trusted publishing OIDC
id-token: write

jobs:
release-please:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Decide
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
- uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
4 changes: 1 addition & 3 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
".": "2.0.0"
}
{ ".": "2.0.0" }
4 changes: 1 addition & 3 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
".": {
"package-name": "@etymolt/mcp-server",
"changelog-path": "CHANGELOG.md",
"include-component-in-tag": false,
"draft": false,
"prerelease": false
"include-component-in-tag": false
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
Expand Down
24 changes: 24 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,30 @@ import {
import { RESOURCES, readResource } from "./resources.js";
import { PROMPTS, getPrompt } from "./prompts.js";

// --- Selftest (Adam DevRel) ---
// `node dist/index.js --selftest` or `npx -y @etymolt/mcp-server --selftest`.
// Verifies the API is reachable; prints "selftest OK"; exits 0/non-0 for CI.
// Unlocks the README's "60-second onboarding" claim.
if (process.argv.includes("--selftest")) {
const baseUrl = process.env.ETYMOLT_API_URL ?? "https://api.etymolt.com";
const t0 = Date.now();
fetch(baseUrl + "/healthz", { signal: AbortSignal.timeout(8000) })
.then((r) => {
if (!r.ok && r.status !== 404) {
console.error(`selftest: ${r.status} from ${baseUrl}/healthz`);
process.exit(1);
}
console.log(`selftest OK | base=${baseUrl} | ${Date.now() - t0}ms`);
process.exit(0);
})
.catch((e: unknown) => {
const msg = e instanceof Error ? e.message : String(e);
console.error(`selftest FAIL: ${msg}`);
process.exit(2);
});
}


// --- Selftest (Adam DevRel #1) ---
// Run with `node dist/index.js --selftest` or `npx -y @etymolt/mcp-server --selftest`.
// Verifies the API is reachable; prints "selftest OK"; exits 0/non-0 for CI.
Expand Down
Loading