mirror of
https://github.com/lukaszraczylo/cloudflare-crawl-mcp.git
synced 2026-06-11 23:29:21 +00:00
fixup! - [x] Remove npm ci and version steps from release.yml - [x] Add .goreleaser-dist to .gitignore - [x] Configure dist dir and before hook in goreleaser.yaml
This commit is contained in:
@@ -27,6 +27,8 @@ jobs:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run typecheck
|
||||
- run: npm run lint
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
|
||||
@@ -56,16 +58,15 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
if: steps.version.outputs.version_tag != ''
|
||||
with:
|
||||
node-version: '24'
|
||||
node-version: '20'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Run GoReleaser
|
||||
- name: Publish to npm
|
||||
if: steps.version.outputs.version_tag != ''
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --clean
|
||||
run: |
|
||||
npm ci
|
||||
npm version ${{ steps.version.outputs.version }} --no-git-tag-version
|
||||
npm publish --access public
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
node_modules
|
||||
.envrc
|
||||
.goreleaser-dist
|
||||
.beep
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
project_name: cloudflare-crawl-mcp
|
||||
|
||||
builds:
|
||||
- skip: true
|
||||
|
||||
dist: .goreleaser-dist
|
||||
|
||||
before:
|
||||
|
||||
@@ -213,12 +213,17 @@ Examples:
|
||||
### Commands
|
||||
|
||||
```bash
|
||||
npm run build # Build TypeScript
|
||||
npm start # Run server
|
||||
npm test # Run tests
|
||||
npm run test:watch # Run tests in watch mode
|
||||
npm install # Install dependencies
|
||||
npm run typecheck # Type check with tsc
|
||||
npm run lint # Lint with ESLint
|
||||
npm run build # Build TypeScript
|
||||
npm start # Run server
|
||||
npm test # Run tests
|
||||
npm run test:watch # Run tests in watch mode
|
||||
```
|
||||
|
||||
CI runs typecheck, lint, build and test.
|
||||
|
||||
### Testing
|
||||
|
||||
The project includes comprehensive tests covering:
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import js from '@eslint/js';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
export default tseslint.config(
|
||||
{ ignores: ['dist/**', 'node_modules/**'] },
|
||||
js.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
project: true,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
||||
},
|
||||
},
|
||||
);
|
||||
Generated
+1007
-3901
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,8 @@
|
||||
"start": "node dist/index.js",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"lint": "eslint src --ext .ts",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -17,9 +19,17 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^25.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.26.1",
|
||||
"@typescript-eslint/parser": "^8.26.1",
|
||||
"eslint": "^9.25.0",
|
||||
"eslint-formatter-compact": "^9.0.1",
|
||||
"typescript": "^5.9.3",
|
||||
"typescript-eslint": "^8.26.1",
|
||||
"vitest": "^4.0.18"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||
|
||||
const API_BASE = "https://api.cloudflare.com/client/v4";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user