Skip to content

feat: add configurable fetch pattern from template #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 56 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
f265ed8
feat: initial project setup with plan for Wayback Machine MCP server
Mearman Jun 4, 2025
b9bf8f1
chore: update .gitignore for Node.js/TypeScript project
Mearman Jun 4, 2025
c21c134
build: add Yarn 2+ configuration
Mearman Jun 4, 2025
4533bc5
build: specify Yarn packageManager version in package.json
Mearman Jun 4, 2025
6e3c275
chore: ignore all .vscode files
Mearman Jun 4, 2025
709f2a5
docs: add API documentation links and expand tool capabilities
Mearman Jun 4, 2025
76aab9a
docs: add section for authenticated APIs (not implemented)
Mearman Jun 4, 2025
adb834e
docs: add comprehensive documentation links for authenticated APIs
Mearman Jun 4, 2025
e8c9980
feat: apply CC BY-NC-SA 4.0 license with full license file and README…
Mearman Jun 4, 2025
d55e5b0
chore: update package.json license to match CC BY-NC-SA 4.0
Mearman Jun 4, 2025
e9dddc9
chore(dependencies): update dependencies to latest versions
Mearman Jun 4, 2025
1c48881
feat: add bin field to enable npx invocation
Mearman Jun 4, 2025
eb99725
build: add conventional commits and automated versioning
Mearman Jun 4, 2025
0822309
ci: add GitHub Actions for automated releases with attestation
Mearman Jun 4, 2025
956d065
chore: configure Biome and EditorConfig for code quality
Mearman Jun 4, 2025
43a0d06
style: switch to tab indentation for all files except YAML
Mearman Jun 4, 2025
58b359b
fix: use space indentation for markdown files
Mearman Jun 4, 2025
9f5ee8a
fix: convert bin field to object format for npm compatibility
Mearman Jun 4, 2025
9bbe5e8
build: refine npm package files to include TypeScript definitions
Mearman Jun 4, 2025
377b6e0
feat: implement initial MCP server with tool definitions
Mearman Jun 4, 2025
1908b07
docs: add visual badges for npm, license, and CI status
Mearman Jun 4, 2025
6fd79ba
build: configure semantic-release for automated versioning
Mearman Jun 4, 2025
1db91b2
ci: add semantic-release workflow for automated releases
Mearman Jun 4, 2025
0478778
docs: initialize CHANGELOG.md for semantic versioning
Mearman Jun 4, 2025
dc1de05
fix: add packageManager field for Yarn 4 compatibility
Mearman Jun 4, 2025
ef8cd3a
ci: enable corepack in all workflows for Yarn 4 support
Mearman Jun 4, 2025
14d70c1
feat: implement Wayback Machine API integration
Mearman Jun 4, 2025
8a6dea1
fix: resolve timeout test race condition
Mearman Jun 4, 2025
fc7e639
docs: update README with actual implementation details and fix mcpSer…
Mearman Jun 4, 2025
93b2c20
test: add integration and package configuration tests
Mearman Jun 4, 2025
35c099c
test: add comprehensive unit tests for all tools
Mearman Jun 4, 2025
8e0b7fc
fix: resolve TypeScript errors in test files
Mearman Jun 4, 2025
660663d
fix: resolve test failures and version compatibility issues
Mearman Jun 4, 2025
5ad2bff
test: add better assertions for bin configuration test
Mearman Jun 4, 2025
b65e1b2
test: handle both string and object bin formats in package test
Mearman Jun 4, 2025
f26ce2b
chore(release): 1.0.0 [skip ci]
semantic-release-bot Jun 4, 2025
14a3c69
fix: restore bin field as object for proper CLI naming
Mearman Jun 4, 2025
6cd7819
chore(release): 1.0.1 [skip ci]
semantic-release-bot Jun 4, 2025
9eecb8b
fix: add version detection for GitHub Packages publishing
Mearman Jun 4, 2025
e3b3587
chore(release): 1.0.2 [skip ci]
semantic-release-bot Jun 4, 2025
9e4513b
fix: skip prepublishOnly script for GitHub Packages publish
Mearman Jun 4, 2025
22b4889
chore(release): 1.0.3 [skip ci]
semantic-release-bot Jun 4, 2025
8a8d353
fix: use lowercase package name and correct registry for GitHub Packages
Mearman Jun 4, 2025
7b16208
chore(release): 1.0.4 [skip ci]
semantic-release-bot Jun 4, 2025
cf7ab50
feat: add CLI support for direct command-line usage
Mearman Jun 5, 2025
87a8c91
fix: replace GitHub license badge with CC BY-NC-SA 4.0 badge
Mearman Jun 5, 2025
c3126d6
chore: update yarn.lock for wayback bin entry
Mearman Jun 5, 2025
8e094a7
chore(release): 2.0.0 [skip ci]
semantic-release-bot Jun 5, 2025
2c87de7
docs: add separate badges for build, tests, and publish status
Mearman Jun 5, 2025
5d15346
ci: add automatic lint fixing to CI workflow
Mearman Jun 5, 2025
c87f45e
chore: update copyright holder name
Mearman Jun 5, 2025
f2fa7c2
fix: resolve all linting issues
Mearman Jun 5, 2025
7d72c12
chore(release): 1.0.0 [skip ci]
semantic-release-bot Jun 5, 2025
34cc7b5
fix: add missing biome and husky devDependencies for CI
Mearman Jun 5, 2025
c5d0572
docs: enhance Wayback Machine README with examples and troubleshooting
Mearman Jun 5, 2025
64193f7
feat: add configurable fetch pattern from template
Mearman Jun 5, 2025
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
29 changes: 29 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4
tab_width = 4

# YAML files (must use spaces)
[*.{yml,yaml}]
indent_style = space
indent_size = 2

# Markdown files (spaces required for lists and code blocks)
[*.md]
indent_style = space
indent_size = 2
trim_trailing_whitespace = false

# Makefile (must use tabs)
[Makefile]
indent_style = tab
106 changes: 106 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 18
- 20
- 22

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Lint commit messages
if: github.event_name == 'pull_request'
run: |
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }}

- name: Lint and auto-fix code
id: lint
run: |
# First try to apply fixes
yarn format || true
yarn lint:fix || true

# Check if there are any changes
if [[ -n $(git status --porcelain) ]]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
else
echo "has_changes=false" >> $GITHUB_OUTPUT
fi

# Run lint check to see if issues remain
yarn lint

- name: Commit and push lint fixes
if: steps.lint.outputs.has_changes == 'true' && github.event_name == 'push' && matrix.node-version == '20'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "style: apply automatic lint fixes [skip ci]"
git push

- name: Commit lint fixes to PR
if: steps.lint.outputs.has_changes == 'true' && github.event_name == 'pull_request' && matrix.node-version == '20'
uses: EndBug/add-and-commit@v9
with:
author_name: github-actions[bot]
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: 'style: apply automatic lint fixes'
push: true

- name: Type check
run: npx tsc --noEmit

- name: Run tests with coverage
run: yarn test:ci

- name: Upload coverage reports
if: matrix.node-version == '20'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/coverage-final.json
flags: unittests
name: codecov-umbrella

- name: Build
run: yarn build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist-node-${{ matrix.node-version }}
path: dist/
retention-days: 7
122 changes: 122 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write
packages: write
id-token: write
attestations: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run tests
run: yarn test

- name: Build
run: yarn build

- name: Generate SBOM
uses: anchore/sbom-action@v0
with:
format: spdx-json
output-file: sbom.spdx.json

- name: Attest Build Provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: |
./dist
./sbom.spdx.json

- name: Attest SBOM
uses: actions/attest-sbom@v1
with:
subject-path: './dist'
sbom-path: './sbom.spdx.json'

- name: Generate Release Notes
id: changelog
run: |
# Extract version changelog
VERSION=${GITHUB_REF#refs/tags/}
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT

# Extract changelog for this version
if [ -f "CHANGELOG.md" ]; then
CHANGELOG=$(awk -v ver="$VERSION" '
/^##? \[?v?[0-9]+\.[0-9]+\.[0-9]+/ {
if (p) exit;
if ($0 ~ ver) p=1;
next;
}
p && /^##? \[?v?[0-9]+\.[0-9]+\.[0-9]+/ {exit}
p {print}
' CHANGELOG.md)

echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
else
echo "CHANGELOG=No changelog found" >> $GITHUB_OUTPUT
fi

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ steps.changelog.outputs.VERSION }}
body: |
## What's Changed
${{ steps.changelog.outputs.CHANGELOG }}

## Attestations
This release includes build provenance attestation and SBOM (Software Bill of Materials).

You can verify the attestation using:
```bash
gh attestation verify <artifact> --owner ${{ github.repository_owner }}
```
files: |
sbom.spdx.json
generate_release_notes: true

- name: Publish to NPM
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Setup Node.js for GitHub Packages
uses: actions/setup-node@v4
with:
registry-url: 'https://npm.pkg.github.com'
scope: '@${{ github.repository_owner }}'

- name: Publish to GitHub Packages
run: |
# Update package name for GitHub Packages
npm pkg set name="@${{ github.repository_owner }}/mcp-wayback-machine"
npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106 changes: 106 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Semantic Release

on:
push:
branches:
- main

permissions:
contents: write
packages: write
id-token: write
attestations: write
issues: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run tests
run: yarn test

- name: Build
run: yarn build

- name: Run semantic-release
id: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
# Capture the current version before release
CURRENT_VERSION=$(node -p "require('./package.json').version")

# Run semantic-release
npx semantic-release

# Check if version changed (indicating a release was made)
NEW_VERSION=$(node -p "require('./package.json').version")
if [ "$CURRENT_VERSION" != "$NEW_VERSION" ]; then
echo "new-release-published=true" >> $GITHUB_OUTPUT
echo "new-version=$NEW_VERSION" >> $GITHUB_OUTPUT
else
echo "new-release-published=false" >> $GITHUB_OUTPUT
fi

- name: Generate SBOM
if: steps.semantic-release.outputs.new-release-published == 'true'
uses: anchore/sbom-action@v0
with:
format: spdx-json
output-file: sbom.spdx.json

- name: Attest Build Provenance
if: steps.semantic-release.outputs.new-release-published == 'true'
uses: actions/attest-build-provenance@v1
with:
subject-path: |
./dist
./sbom.spdx.json

- name: Attest SBOM
if: steps.semantic-release.outputs.new-release-published == 'true'
uses: actions/attest-sbom@v1
with:
subject-path: './dist'
sbom-path: './sbom.spdx.json'

- name: Setup Node.js for GitHub Packages
if: steps.semantic-release.outputs.new-release-published == 'true'
uses: actions/setup-node@v4
with:
registry-url: 'https://npm.pkg.github.com'
scope: '@${{ github.repository_owner }}'

- name: Publish to GitHub Packages
if: steps.semantic-release.outputs.new-release-published == 'true'
run: |
# Update package name for GitHub Packages (must be lowercase)
npm pkg set name="@mearman/mcp-wayback-machine"
# Ensure we're publishing to GitHub Packages registry
npm config set registry https://npm.pkg.github.com/
# Skip prepublishOnly script to avoid running tests with modified package name
npm publish --access public --provenance --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading