Skip to content

Commit 20f83e7

Browse files
authored
Merge pull request #1 from Encryptioner/pre/release/1.0.0
Pre/release/1.0.0
2 parents ffe2d02 + b5808eb commit 20f83e7

96 files changed

Lines changed: 30022 additions & 684 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PUBLISHING.md

Lines changed: 585 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: ['18.20.0', '20', '22']
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 9.0.0
27+
28+
- name: Setup Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
cache: 'pnpm'
33+
34+
- name: Install dependencies
35+
run: pnpm install --frozen-lockfile
36+
37+
- name: Run type check
38+
run: pnpm run typecheck
39+
40+
- name: Run tests
41+
run: pnpm test -- run --passWithNoTests
42+
43+
# TODO: Re-enable once ESLint is properly configured for v9
44+
# - name: Run linter
45+
# run: pnpm run lint
46+
47+
- name: Build package
48+
run: pnpm run build
49+
50+
- name: Verify build outputs
51+
run: |
52+
echo "Checking dist/ directory..."
53+
ls -la dist/
54+
echo "Checking mcp/dist/ directory..."
55+
ls -la mcp/dist/

.github/workflows/publish.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Publish to NPM
2+
3+
on:
4+
# Trigger on version tags (e.g., v1.0.0, v1.2.3)
5+
push:
6+
tags:
7+
- 'v*'
8+
9+
# Allow manual trigger from Actions tab
10+
workflow_dispatch:
11+
inputs:
12+
tag:
13+
description: 'Tag to publish (e.g., v1.0.0)'
14+
required: false
15+
type: string
16+
17+
jobs:
18+
publish:
19+
runs-on: ubuntu-latest
20+
21+
permissions:
22+
contents: read
23+
id-token: write # Required for NPM provenance
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
31+
- name: Setup pnpm
32+
uses: pnpm/action-setup@v4
33+
with:
34+
version: 9.0.0
35+
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: '18.20.0'
40+
cache: 'pnpm'
41+
registry-url: 'https://registry.npmjs.org'
42+
43+
- name: Install dependencies
44+
run: pnpm install --frozen-lockfile
45+
46+
- name: Run type check
47+
run: pnpm run typecheck
48+
49+
- name: Run tests
50+
run: pnpm test -- run --passWithNoTests
51+
52+
# TODO: Re-enable once ESLint is properly configured for v9
53+
# - name: Run linter
54+
# run: pnpm run lint
55+
56+
- name: Build package
57+
run: pnpm run build
58+
59+
- name: Verify build outputs
60+
run: |
61+
echo "Checking dist/ directory..."
62+
ls -la dist/
63+
echo "Checking mcp/dist/ directory..."
64+
ls -la mcp/dist/
65+
66+
- name: Extract version from tag
67+
id: extract_version
68+
run: |
69+
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ inputs.tag }}" ]; then
70+
TAG="${{ inputs.tag }}"
71+
else
72+
TAG="${GITHUB_REF#refs/tags/}"
73+
fi
74+
VERSION="${TAG#v}"
75+
echo "tag=$TAG" >> $GITHUB_OUTPUT
76+
echo "version=$VERSION" >> $GITHUB_OUTPUT
77+
echo "Publishing version: $VERSION"
78+
79+
- name: Verify package.json version matches tag
80+
run: |
81+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
82+
TAG_VERSION="${{ steps.extract_version.outputs.version }}"
83+
echo "package.json version: $PACKAGE_VERSION"
84+
echo "Tag version: $TAG_VERSION"
85+
if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then
86+
echo "Error: package.json version ($PACKAGE_VERSION) does not match tag version ($TAG_VERSION)"
87+
exit 1
88+
fi
89+
90+
- name: Create .npmrc
91+
run: |
92+
cat << EOF > "$HOME/.npmrc"
93+
//registry.npmjs.org/:_authToken=\$NPM_TOKEN
94+
EOF
95+
96+
- name: Publish to NPM
97+
env:
98+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
99+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
100+
run: |
101+
# Publish with provenance for supply chain security
102+
pnpm publish --no-git-checks --access public --provenance
103+
104+
- name: Create GitHub Release
105+
uses: softprops/action-gh-release@v2
106+
if: startsWith(github.ref, 'refs/tags/')
107+
with:
108+
generate_release_notes: true
109+
draft: false
110+
prerelease: false
111+
env:
112+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dependencies
22
node_modules/
33
.pnpm-store/
4-
pnpm-lock.yaml
4+
# pnpm-lock.yaml should be committed for reproducible builds
55

66
# Build outputs
77
dist/

.npmignore

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
# Source files (only publish dist/)
1+
# This file is mostly informational since package.json "files" array controls what's published
2+
# The "files" array whitelists: dist/, mcp/dist/, documentation/, README.md, LICENSE.md, CHANGELOG.md
3+
4+
# Exclude development files
25
src/
36
*.ts
47
*.tsx
58
!*.d.ts
69

7-
# Configuration files
10+
# Exclude config files
811
tsconfig.json
912
tsup.config.ts
1013
.prettierrc
1114
.prettierignore
1215
.editorconfig
16+
.npmrc
1317

14-
# Development files
18+
# Exclude test files
1519
*.test.ts
1620
*.test.tsx
1721
*.spec.ts
@@ -21,41 +25,30 @@ test/
2125
tests/
2226
coverage/
2327

24-
# Documentation (keep README.md)
28+
# Exclude development docs (docs/ is for internal notes, documentation/ is for users)
2529
docs/
26-
examples/
27-
EXAMPLE.tsx
28-
*.md
29-
!README.md
30-
!LICENSE.md
30+
CLAUDE.md
3131

32-
# Build artifacts
32+
# Exclude build artifacts
3333
node_modules/
3434
.pnpm-store/
3535
pnpm-lock.yaml
3636
*.log
3737
*.tgz
38-
.DS_Store
39-
.env
40-
.env.*
4138

42-
# Git files
39+
# Exclude version control
4340
.git/
4441
.gitignore
4542
.gitattributes
4643

47-
# IDE files
44+
# Exclude IDE files
4845
.vscode/
4946
.idea/
5047
*.swp
5148
*.swo
5249
*~
5350

54-
# CI/CD
51+
# Exclude CI/CD
5552
.github/
5653
.gitlab-ci.yml
5754
.travis.yml
58-
59-
# Other
60-
*.orig
61-
.npmrc

0 commit comments

Comments
 (0)