Skip to content

Commit 7fd9f89

Browse files
Matt-Dionisclaude
andcommitted
Fix settings.json generation in claude-config-composer
- Remove _metadata property from settings.json (not allowed in Claude Code schema) - Fix StatusLine interface to use proper type and command properties - Update mergeStatusLine to handle correct structure - Remove _metadata validation from SettingsSchema - Ensure generated settings.json files are valid for Claude Code 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 81968d0 commit 7fd9f89

224 files changed

Lines changed: 39938 additions & 3007 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/workflows/ci.yml

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: 'npm'
26+
cache-dependency-path: claude-config-composer/package-lock.json
27+
28+
- name: Install dependencies
29+
run: |
30+
cd claude-config-composer
31+
npm ci
32+
33+
- name: Run tests
34+
run: |
35+
cd claude-config-composer
36+
npm test
37+
38+
- name: Build package
39+
run: |
40+
cd claude-config-composer
41+
npm run build
42+
43+
- name: Test CLI functionality
44+
run: |
45+
cd claude-config-composer
46+
node dist/cli.js --version
47+
node dist/cli.js list
48+
49+
- name: Test config generation
50+
run: |
51+
cd /tmp
52+
node $GITHUB_WORKSPACE/claude-config-composer/dist/cli.js nextjs-15 shadcn
53+
test -d .claude
54+
test -f .claude/settings.json
55+
test -d .claude/agents
56+
test -d .claude/commands
57+
test -d .claude/hooks
58+
59+
- name: Security audit
60+
run: |
61+
cd claude-config-composer
62+
npm audit --audit-level=high
63+
continue-on-error: true
64+
65+
lint:
66+
runs-on: ubuntu-latest
67+
68+
steps:
69+
- name: Checkout code
70+
uses: actions/checkout@v4
71+
72+
- name: Setup Node.js
73+
uses: actions/setup-node@v4
74+
with:
75+
node-version: '20'
76+
cache: 'npm'
77+
cache-dependency-path: claude-config-composer/package-lock.json
78+
79+
- name: Install dependencies
80+
run: |
81+
cd claude-config-composer
82+
npm ci
83+
84+
- name: TypeScript type checking
85+
run: |
86+
cd claude-config-composer
87+
npx tsc --noEmit
88+
89+
- name: Check for TypeScript errors
90+
run: |
91+
cd claude-config-composer
92+
npm run build
93+
94+
test-configs:
95+
runs-on: ubuntu-latest
96+
97+
steps:
98+
- name: Checkout code
99+
uses: actions/checkout@v4
100+
101+
- name: Setup Node.js
102+
uses: actions/setup-node@v4
103+
with:
104+
node-version: '20'
105+
cache: 'npm'
106+
cache-dependency-path: claude-config-composer/package-lock.json
107+
108+
- name: Install and build
109+
run: |
110+
cd claude-config-composer
111+
npm ci
112+
npm run build
113+
114+
- name: Test all individual configs
115+
run: |
116+
cd /tmp
117+
for config in nextjs-15 shadcn tailwindcss drizzle vercel-ai-sdk memory-mcp-server token-gated-mcp-server; do
118+
echo "Testing $config configuration..."
119+
rm -rf .claude
120+
node $GITHUB_WORKSPACE/claude-config-composer/dist/cli.js $config
121+
test -d .claude || exit 1
122+
done
123+
124+
- name: Test common combinations
125+
run: |
126+
cd /tmp
127+
128+
echo "Testing Next.js + shadcn combination..."
129+
rm -rf .claude
130+
node $GITHUB_WORKSPACE/claude-config-composer/dist/cli.js nextjs-15 shadcn
131+
test -d .claude || exit 1
132+
133+
echo "Testing full-stack combination..."
134+
rm -rf .claude
135+
node $GITHUB_WORKSPACE/claude-config-composer/dist/cli.js nextjs-15 shadcn tailwindcss drizzle
136+
test -d .claude || exit 1
137+
138+
release-check:
139+
if: github.ref == 'refs/heads/main'
140+
runs-on: ubuntu-latest
141+
needs: [test, lint, test-configs]
142+
143+
steps:
144+
- name: Checkout code
145+
uses: actions/checkout@v4
146+
147+
- name: Setup Node.js
148+
uses: actions/setup-node@v4
149+
with:
150+
node-version: '20'
151+
cache: 'npm'
152+
cache-dependency-path: claude-config-composer/package-lock.json
153+
154+
- name: Check package version
155+
run: |
156+
cd claude-config-composer
157+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
158+
echo "Package version: $PACKAGE_VERSION"
159+
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
160+
161+
- name: Dry run npm publish
162+
run: |
163+
cd claude-config-composer
164+
npm ci
165+
npm run build
166+
npm pack --dry-run

.github/workflows/publish.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Publish to NPM
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version to publish (e.g., v1.0.0)'
11+
required: true
12+
default: 'v1.0.0'
13+
14+
jobs:
15+
publish:
16+
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
working-directory: ./claude-config-composer
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '18'
29+
registry-url: 'https://registry.npmjs.org'
30+
31+
- name: Cache dependencies
32+
uses: actions/cache@v3
33+
with:
34+
path: ./claude-config-composer/node_modules
35+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
36+
restore-keys: |
37+
${{ runner.os }}-node-
38+
39+
- name: Install dependencies
40+
run: npm ci
41+
42+
- name: Run tests
43+
run: npm test
44+
45+
- name: Build project
46+
run: npm run build
47+
48+
- name: Validate configurations
49+
run: node dist/cli.js list
50+
51+
- name: Check package files
52+
run: npm pack --dry-run
53+
54+
- name: Publish to NPM
55+
run: npm publish
56+
env:
57+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
58+
59+
- name: Create GitHub Release
60+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
61+
uses: softprops/action-gh-release@v1
62+
with:
63+
tag_name: ${{ github.ref_name }}
64+
name: Release ${{ github.ref_name }}
65+
body: |
66+
## 🚀 New Release: ${{ github.ref_name }}
67+
68+
### 📦 Installation
69+
```bash
70+
npx claude-config-composer@latest
71+
```
72+
73+
### ✨ What's New
74+
- Check the changelog for detailed changes
75+
- Updated configurations and bug fixes
76+
- Performance improvements
77+
78+
### 🔧 Usage Examples
79+
```bash
80+
# Full-stack Next.js
81+
npx claude-config-composer nextjs-15 shadcn tailwindcss drizzle vercel-ai-sdk
82+
83+
# AI Development
84+
npx claude-config-composer vercel-ai-sdk drizzle
85+
86+
# Interactive mode
87+
npx claude-config-composer
88+
```
89+
generate_release_notes: true
90+
draft: false
91+
prerelease: false
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)