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
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Release Pipeline

on:
push:
branches:
- '**/*'

jobs:
publish:
strategy:
matrix:
include:
- NodeVersion: 20.14.x
NodeVersionDisplayName: 20
OS: ubuntu-latest
name: Node.js v${{ matrix.NodeVersionDisplayName }} (${{ matrix.OS }})
runs-on: ${{ matrix.OS }}
if: github.repository == 'coze-dev/rush-arch'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check Release Tag
id: check_tag
run: |
HAS_VALID_TAG=$(git tag --points-at HEAD | grep -E "^v/.+/.+$" || true)
if [ ! -z "$HAS_VALID_TAG" ]; then
echo "has_valid_tag=true" >> $GITHUB_OUTPUT
echo "Found valid tag: $HAS_VALID_TAG"
else
echo "has_valid_tag=false" >> $GITHUB_OUTPUT
echo "No valid tag found"
fi

- name: Config Git User
if: steps.check_tag.outputs.has_valid_tag == 'true'
run: |
git config --local user.name "tecvan"
git config --local user.email "[email protected]"

- uses: actions/setup-node@v3
if: steps.check_tag.outputs.has_valid_tag == 'true'
with:
node-version: ${{ matrix.NodeVersion }}
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'

- name: Cache
if: steps.check_tag.outputs.has_valid_tag == 'true'
uses: actions/cache@v4
with:
path: |
common/temp/pnpm-local
common/temp/pnpm-store
common/temp/install-run
key: ${{ runner.os }}-rush-store-${{ hashFiles('common/config/subspaces/**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-rush-store-main
${{ runner.os }}-rush-store

- name: Install Dependencies
if: steps.check_tag.outputs.has_valid_tag == 'true'
run: |
npm i -g @microsoft/[email protected]
sudo apt-get update
sudo apt-get install -y libasound2-dev
node common/scripts/install-run-rush.js install

- name: Run Release
if: steps.check_tag.outputs.has_valid_tag == 'true'
run: node common/scripts/install-run-rush.js release --commit ${{ github.event.head_commit.id }}
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
9 changes: 7 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@
"**/.git": true,
"**/.DS_Store": true,
"**/.swc": true,
"**/rush-logs": true,
"**/.rush": true
},
"files.watcherExclude": {
"**/rush-logs": true,
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true
"**/node_modules/*/**": true,
"common/temp": true
},
"files.defaultLanguage": "plaintext",
"files.associations": {
Expand All @@ -53,7 +56,9 @@
"CODEOWNERS": "ini",
"**/coverage/**/*.*": "plaintext",
"**/pnpm-lock.yaml": "plaintext",
"**/*.yml": "yaml"
"**/*.yml": "yaml",
"**/.npmrc": "ini",
"**/.npmrc-*": "ini"
},
"search.useIgnoreFiles": true,
"files.eol": "\n",
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Rush Architecture is a monorepo template for building and managing Model Context
You can directly use the NPM MCP Server without cloning this repository:

```sh
npx @coze-infra/npm-mcp-server@latest serve
npx @coze-arch/npm-mcp-server@latest serve
```

This will start the MCP server on port 3000 by default. You can access it at `http://localhost:3000/sse`.
Expand Down Expand Up @@ -74,7 +74,7 @@ The repository includes an MCP server for npm. You can run it in two modes:
#### HTTP Server Mode
Using npx:
```sh
npx @coze-infra/npm-mcp-server@latest serve
npx @coze-arch/npm-mcp-server@latest serve
# Access the server at http://localhost:3000/sse
```

Expand All @@ -87,7 +87,7 @@ npm run serve
#### Terminal Mode
Using npx:
```sh
npx @coze-infra/npm-mcp-server@latest start
npx @coze-arch/npm-mcp-server@latest start
```

Or if developing locally:
Expand Down
2 changes: 1 addition & 1 deletion common/_templates/component-core/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { defineConfig } = require('@coze-infra/eslint-config');
const { defineConfig } = require('@coze-arch/eslint-config');

module.exports = defineConfig({
packageRoot: __dirname,
Expand Down
6 changes: 3 additions & 3 deletions common/_templates/component-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"dependencies": {
},
"devDependencies": {
"@coze-infra/eslint-config": "workspace:*",
"@coze-infra/ts-config": "workspace:*",
"@coze-infra/vitest-config": "workspace:*",
"@coze-arch/eslint-config": "workspace:*",
"@coze-arch/ts-config": "workspace:*",
"@coze-arch/vitest-config": "workspace:*",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.2.0",
"@testing-library/react-hooks": "^8.0.1",
Expand Down
2 changes: 1 addition & 1 deletion common/_templates/component-core/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@coze-infra/ts-config/tsconfig.web.json",
"extends": "@coze-arch/ts-config/tsconfig.web.json",
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"outDir": "dist",
Expand Down
2 changes: 1 addition & 1 deletion common/_templates/component-core/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from '@coze-infra/vitest-config';
import { defineConfig } from '@coze-arch/vitest-config';

export default defineConfig({
dirname: __dirname,
Expand Down
2 changes: 1 addition & 1 deletion common/_templates/node-core/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { defineConfig } = require('@coze-infra/eslint-config');
const { defineConfig } = require('@coze-arch/eslint-config');

module.exports = defineConfig({
packageRoot: __dirname,
Expand Down
8 changes: 4 additions & 4 deletions common/_templates/node-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
},
"dependencies": {},
"devDependencies": {
"@coze-infra/eslint-config": "workspace:*",
"@coze-infra/ts-config": "workspace:*",
"@coze-infra/vitest-config": "workspace:*",
"@coze-arch/eslint-config": "workspace:*",
"@coze-arch/ts-config": "workspace:*",
"@coze-arch/vitest-config": "workspace:*",
"@types/node": "^22.13.13",
"@vitest/coverage-v8": "^3.0.9",
"tsx": "^4.19.2",
"tsx": "^4.19.3",
"vitest": "^3.0.9"
}
}
2 changes: 1 addition & 1 deletion common/_templates/node-core/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@coze-infra/ts-config/tsconfig.node.json",
"extends": "@coze-arch/ts-config/tsconfig.node.json",
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"outDir": "dist",
Expand Down
2 changes: 1 addition & 1 deletion common/_templates/node-core/tsconfig.misc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@coze-infra/ts-config/tsconfig.node.json",
"extends": "@coze-arch/ts-config/tsconfig.node.json",
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"rootDir": "./",
Expand Down
2 changes: 1 addition & 1 deletion common/_templates/node-core/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from '@coze-infra/vitest-config';
import { defineConfig } from '@coze-arch/vitest-config';

export default defineConfig({
dirname: __dirname,
Expand Down
1 change: 1 addition & 0 deletions common/_templates/rush-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# {{ packageName }}
Empty file.
6 changes: 6 additions & 0 deletions common/_templates/rush-plugin/command-line.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
"commands": [
],
"parameters": []
}
12 changes: 12 additions & 0 deletions common/_templates/rush-plugin/config/rush-project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"operationSettings": [
{
"operationName": "test:cov",
"outputFolderNames": ["coverage"]
},
{
"operationName": "ts-check",
"outputFolderNames": ["dist"]
}
]
}
7 changes: 7 additions & 0 deletions common/_templates/rush-plugin/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { defineConfig } = require('@coze-arch/eslint-config');

module.exports = defineConfig({
packageRoot: __dirname,
preset: 'node',
rules: {},
});
11 changes: 11 additions & 0 deletions common/_templates/rush-plugin/init.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { IConfig } from '../../autoinstallers/plugins/node_modules/rush-init-project-plugin';
import SetDefaultAuthorPlugin from '../_plugins/SetDefaultAuthorPlugin';

const config: IConfig = {
plugins: [new SetDefaultAuthorPlugin()],
defaultProjectConfiguration: {
tags:['level-3']
}
};

export default config;
32 changes: 32 additions & 0 deletions common/_templates/rush-plugin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "{{ packageName }}",
"version": "0.0.1",
"description": "{{ description }}",
"license": "ISC",
"author": "{{ authorName }}",
"maintainers": [],
"main": "src/index.ts",
"files": [
"dist",
"!**/*.tsbuildinfo",
"!**/*.map",
"command-line.json",
"rush-plugin-manifest.json"
],
"scripts": {
"build": "exit 0",
"lint": "eslint ./ --cache",
"test": "vitest --run --passWithNoTests",
"test:cov": "npm run test -- --coverage"
},
"dependencies": {},
"devDependencies": {
"@coze-arch/eslint-config": "workspace:*",
"@coze-arch/ts-config": "workspace:*",
"@coze-arch/vitest-config": "workspace:*",
"@types/node": "^22.13.13",
"@vitest/coverage-v8": "^3.0.9",
"tsx": "^4.19.3",
"vitest": "^3.0.9"
}
}
10 changes: 10 additions & 0 deletions common/_templates/rush-plugin/rush-plugin-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugin-manifest.schema.json",
"plugins": [
{
"pluginName": "{{ packageName }}",
"description": "{{ description }}",
"commandLineJsonFilePath": "./command-line.json"
}
]
}
1 change: 1 addition & 0 deletions common/_templates/rush-plugin/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const foo = 'bar';
13 changes: 13 additions & 0 deletions common/_templates/rush-plugin/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "@coze-arch/ts-config/tsconfig.node.json",
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"module": "CommonJS",
"target": "ES2020",
"moduleResolution": "node"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
15 changes: 15 additions & 0 deletions common/_templates/rush-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"exclude": ["**/*"],
"compilerOptions": {
"composite": true
},
"references": [
{
"path": "./tsconfig.build.json"
},
{
"path": "./tsconfig.misc.json"
}
]
}
18 changes: 18 additions & 0 deletions common/_templates/rush-plugin/tsconfig.misc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "@coze-arch/ts-config/tsconfig.node.json",
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"rootDir": "./",
"outDir": "./dist",
"module": "CommonJS",
"target": "ES2020",
"moduleResolution": "node"
},
"include": ["__tests__", "vitest.config.ts"],
"exclude": ["./dist"],
"references": [
{
"path": "./tsconfig.build.json"
}
]
}
6 changes: 6 additions & 0 deletions common/_templates/rush-plugin/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineConfig } from '@coze-arch/vitest-config';

export default defineConfig({
dirname: __dirname,
preset: 'node',
});
3 changes: 2 additions & 1 deletion common/autoinstallers/plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"[email protected]"
],
"dependencies": {
"@coze-infra/rush-run-tsc-plugin": "../../../packages/rush-plugins/run-tsc-plugin",
"@coze-arch/rush-publish-plugin": "../../../packages/rush-plugins/publish",
"@coze-arch/rush-run-tsc-plugin": "../../../packages/rush-plugins/run-tsc-plugin",
"json5": "^2.2.3",
"rush-init-project-plugin": "^0.11.0",
"typescript": "~5.7.2"
Expand Down
5 changes: 4 additions & 1 deletion common/autoinstallers/plugins/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading