feat: manually mirror opencoze's code from bytedance

Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
fanlv
2025-07-20 17:36:12 +08:00
commit 890153324f
14811 changed files with 1923430 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
"commands": [
{
"name": "clear-build-cache",
"description": "清理构建缓存",
"commandKind": "global",
"summary": "🚀 清理构建缓存",
"shellCommand": "rush-clear-build-cache",
"safeForSimultaneousRushProcesses": true
}
],
"parameters": []
}

View File

@@ -0,0 +1,10 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugin-manifest.schema.json",
"plugins": [
{
"pluginName": "@coze-arch/rush-clear-build-cache-plugin",
"description": "@coze-arch/rush-clear-build-cache-plugin",
"commandLineJsonFilePath": "./command-line.json"
}
]
}

View File

@@ -0,0 +1,11 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugin-manifest.schema.json",
"plugins": [
{
"pluginName": "@coze-arch/rush-dep-level-check-plugin",
"description": "@coze-arch/rush-dep-level-check-plugin",
"entryPoint": "./lib/index.js",
"associatedCommands": ["install", "update"]
}
]
}

View File

@@ -0,0 +1,47 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
"commands": [
{
"name": "fix-ts-refers",
"description": "Fix common project issues",
"commandKind": "global",
"summary": "⭐️️ Fix tsconfig.json and tsconfig.build.json",
"shellCommand": "rush-fix-ts-refers fix",
"safeForSimultaneousRushProcesses": true
}
],
"parameters": [
{
"parameterKind": "string",
"description": "Specify the package to fix",
"shortName": "-p",
"longName": "--package",
"argumentName": "PACKAGE",
"associatedCommands": ["fix-ts-refers"],
"required": false
},
{
"parameterKind": "flag",
"description": "Use cached files",
"shortName": "-c",
"longName": "--use-cached-files",
"associatedCommands": ["fix-ts-refers"],
"required": false
},
{
"parameterKind": "flag",
"description": "Submit changes",
"shortName": "-s",
"longName": "--submit-changes",
"associatedCommands": ["fix-ts-refers"],
"required": false
},
{
"parameterKind": "flag",
"description": "Shallow fix",
"longName": "--shallow",
"associatedCommands": ["fix-ts-refers"],
"required": false
}
]
}

View File

@@ -0,0 +1,10 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugin-manifest.schema.json",
"plugins": [
{
"pluginName": "@coze-arch/rush-fix-ts-refers-plugin",
"description": "rush plugin for auto fix ts references in ts projects",
"commandLineJsonFilePath": "./command-line.json"
}
]
}

View File

@@ -0,0 +1,68 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
"commands": [
{
"name": "increment",
"description": "增量运行指定的操作命令,基于变更文件分析影响的项目",
"commandKind": "global",
"summary": "🚀 增量运行操作命令",
"shellCommand": "rush-increment-run increment",
"safeForSimultaneousRushProcesses": true
}
],
"parameters": [
{
"parameterKind": "string",
"description": "变更文件列表,使用逗号分隔",
"shortName": "-f",
"longName": "--changed-files",
"argumentName": "FILES",
"associatedCommands": ["increment"],
"required": false
},
{
"parameterKind": "string",
"description": "变更文件列表所在文件路径",
"shortName": "-p",
"longName": "--changed-path",
"argumentName": "PATH",
"associatedCommands": ["increment"],
"required": false
},
{
"parameterKind": "string",
"description": "需要作对比的目标分支,使用该参数前建议先执行 `git fetch`,确保对比结果的正确性",
"shortName": "-b",
"longName": "--branch",
"argumentName": "BRANCH",
"associatedCommands": ["increment"],
"required": false
},
{
"parameterKind": "flag",
"description": "是否打印详细日志",
"shortName": "-v",
"longName": "--verbose",
"associatedCommands": ["increment"],
"required": false
},
{
"parameterKind": "string",
"description": "支持的增量操作命令",
"shortName": "-a",
"longName": "--action",
"argumentName": "ACTION",
"associatedCommands": ["increment"],
"required": true
},
{
"parameterKind": "string",
"description": "变更文件列表的分隔符",
"shortName": "-s",
"longName": "--separator",
"argumentName": "SEPARATOR",
"associatedCommands": ["increment"],
"required": false
}
]
}

View File

@@ -0,0 +1,10 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugin-manifest.schema.json",
"plugins": [
{
"pluginName": "@coze-arch/rush-increment-run-plugin",
"description": "incremently run commands for ci",
"commandLineJsonFilePath": "./command-line.json"
}
]
}

View File

@@ -0,0 +1,140 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
"commands": [
{
"name": "pub",
"commandKind": "global",
"summary": "⭐️️ Publish packages to npm",
"shellCommand": "rush-publish pub",
"safeForSimultaneousRushProcesses": true
},
{
"name": "change-x",
"commandKind": "global",
"summary": "⭐️️ generate change log",
"shellCommand": "rush-publish change",
"safeForSimultaneousRushProcesses": true
},
{
"name": "release",
"commandKind": "global",
"summary": "⭐️️ release packages",
"shellCommand": "rush-publish release",
"safeForSimultaneousRushProcesses": true
}
],
"parameters": [
{
"parameterKind": "string",
"description": "Enable dry run mode",
"shortName": "-d",
"longName": "--dry-run",
"argumentName": "DRY_RUN",
"associatedCommands": ["pub"],
"required": false
},
{
"parameterKind": "string",
"shortName": "-t",
"longName": "--to",
"description": "Publish specified packages and their downstream dependencies",
"argumentName": "TO",
"associatedCommands": ["pub"],
"required": false
},
{
"parameterKind": "string",
"shortName": "-f",
"longName": "--from",
"description": "Publish specified packages and their upstream/downstream dependencies",
"argumentName": "FROM",
"associatedCommands": ["pub"],
"required": false
},
{
"parameterKind": "string",
"shortName": "-o",
"longName": "--only",
"description": "Only publish specified packages",
"argumentName": "ONLY",
"associatedCommands": ["pub"],
"required": false
},
{
"parameterKind": "flag",
"shortName": "-s",
"longName": "--skip-commit",
"description": "Skip git commit",
"associatedCommands": ["pub"],
"required": false
},
{
"parameterKind": "flag",
"shortName": "-p",
"longName": "--skip-push",
"description": "Skip git push",
"associatedCommands": ["pub"],
"required": false
},
{
"parameterKind": "choice",
"alternatives": [
{
"name": "alpha",
"description": "Alpha version"
},
{
"name": "beta",
"description": "Beta version"
},
{
"name": "patch",
"description": "Patch version"
},
{
"name": "minor",
"description": "Minor version"
},
{
"name": "major",
"description": "Major version"
}
],
"shortName": "-b",
"longName": "--bump-type",
"description": "Version bump type (alpha/beta/patch/minor/major)",
"associatedCommands": ["pub"],
"required": false
},
{
"parameterKind": "flag",
"longName": "--amend-commit",
"shortName": "-a",
"description": "是否 amend commit 阶段",
"associatedCommands": ["change-x"]
},
{
"parameterKind": "flag",
"longName": "--ci",
"shortName": "-i",
"description": "是否在 CI 环境",
"associatedCommands": ["change-x"]
},
{
"parameterKind": "string",
"argumentName": "COMMIT_MSG",
"longName": "--commit-msg",
"shortName": "-c",
"description": "本次提交信息,默认读取 .git/COMMIT_EDITMSG",
"associatedCommands": ["change-x"]
},
{
"parameterKind": "string",
"argumentName": "COMMIT",
"longName": "--commit",
"shortName": "-c",
"description": "Git commit hash",
"associatedCommands": ["release"]
}
]
}

View File

@@ -0,0 +1,10 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugin-manifest.schema.json",
"plugins": [
{
"pluginName": "@coze-arch/rush-publish-plugin",
"description": "rush plugin to generate change log and publish packages",
"commandLineJsonFilePath": "./command-line.json"
}
]
}

View File

@@ -0,0 +1,17 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
"commands": [
{
"commandKind": "bulk",
"name": "ts-check",
"ignoreMissingScript": false,
"enableParallelism": true,
"shellCommand": "npm run prets-check --if-present && NODE_OPTIONS='--max-old-space-size=16384' tsc -b tsconfig.build.json",
"allowWarningsInSuccessfulBuild": true,
"summary": "⭐️️ Run tsc command for each package",
"safeForSimultaneousRushProcesses": true
// "incremental": true
}
],
"parameters": []
}

View File

@@ -0,0 +1,10 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugin-manifest.schema.json",
"plugins": [
{
"pluginName": "@coze-arch/rush-run-tsc-plugin",
"description": "Rush plugin for run tsc",
"commandLineJsonFilePath": "./command-line.json"
}
]
}

View File

@@ -0,0 +1,45 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
"commands": [
{
"name": "init-project",
"commandKind": "global",
"summary": "Initialize project in this monorepo",
"shellCommand": "rush-init-project",
"safeForSimultaneousRushProcesses": true
}
],
"parameters": [
{
"parameterKind": "string",
"description": "Provide predefined answers with JSON string",
"shortName": "-a",
"longName": "--answer",
"argumentName": "ANSWER",
"associatedCommands": ["init-project"],
"required": false
},
{
"parameterKind": "flag",
"description": "Provide the option isDryRun in plugin context",
"longName": "--dry-run",
"associatedCommands": ["init-project"],
"required": false
},
{
"parameterKind": "flag",
"description": "Provide verbose log output",
"shortName": "-v",
"longName": "--verbose",
"associatedCommands": ["init-project"],
"required": false
},
{
"parameterKind": "flag",
"description": "Provide terminal ui operation",
"longName": "--ui",
"associatedCommands": ["init-project"],
"required": false
}
]
}

View File

@@ -0,0 +1,10 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugin-manifest.schema.json",
"plugins": [
{
"pluginName": "rush-init-project-plugin",
"description": "Rush plugin for initialize project in monorepo",
"commandLineJsonFilePath": "command-line.json"
}
]
}