feat: manually mirror opencoze's code from bytedance
Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
25
common/config/rush/.npmrc-publish
Normal file
25
common/config/rush/.npmrc-publish
Normal file
@@ -0,0 +1,25 @@
|
||||
# Rush uses this file to configure the NPM package registry during installation. It is applicable
|
||||
# to PNPM, NPM, and Yarn package managers. It is used by operations such as "rush install",
|
||||
# "rush update", and the "install-run.js" scripts.
|
||||
#
|
||||
# NOTE: The "rush publish" command uses .npmrc-publish instead.
|
||||
#
|
||||
# Before invoking the package manager, Rush will copy this file to the folder where installation
|
||||
# is performed. The copied file will omit any config lines that reference environment variables
|
||||
# that are undefined in that session; this avoids problems that would otherwise result due to
|
||||
# a missing variable being replaced by an empty string.
|
||||
#
|
||||
# * * * SECURITY WARNING * * *
|
||||
#
|
||||
# It is NOT recommended to store authentication tokens in a text file on a lab machine, because
|
||||
# other unrelated processes may be able to read the file. Also, the file may persist indefinitely,
|
||||
# for example if the machine loses power. A safer practice is to pass the token via an
|
||||
# environment variable, which can be referenced from .npmrc using ${} expansion. For example:
|
||||
#
|
||||
# //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
|
||||
#
|
||||
registry=https://registry.npmjs.org
|
||||
always-auth=false
|
||||
prefer-frozen-lockfile=true
|
||||
|
||||
public-hoist-pattern[]=*storybook*
|
||||
109
common/config/rush/artifactory.json
Normal file
109
common/config/rush/artifactory.json
Normal file
@@ -0,0 +1,109 @@
|
||||
/**
|
||||
* This configuration file manages Rush integration with JFrog Artifactory services.
|
||||
* More documentation is available on the Rush website: https://rushjs.io
|
||||
*/
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/artifactory.schema.json",
|
||||
|
||||
"packageRegistry": {
|
||||
/**
|
||||
* (Required) Set this to "true" to enable Rush to manage tokens for an Artifactory NPM registry.
|
||||
* When enabled, "rush install" will automatically detect when the user's ~/.npmrc
|
||||
* authentication token is missing or expired. And "rush setup" will prompt the user to
|
||||
* renew their token.
|
||||
*
|
||||
* The default value is false.
|
||||
*/
|
||||
"enabled": false,
|
||||
|
||||
/**
|
||||
* (Required) Specify the URL of your NPM registry. This is the same URL that appears in
|
||||
* your .npmrc file. It should look something like this example:
|
||||
*
|
||||
* https://your-company.jfrog.io/your-project/api/npm/npm-private/
|
||||
*/
|
||||
"registryUrl": "",
|
||||
|
||||
/**
|
||||
* A list of custom strings that "rush setup" should add to the user's ~/.npmrc file at the time
|
||||
* when the token is updated. This could be used for example to configure the company registry
|
||||
* to be used whenever NPM is invoked as a standalone command (but it's not needed for Rush
|
||||
* operations like "rush add" and "rush install", which get their mappings from the monorepo's
|
||||
* common/config/rush/.npmrc file).
|
||||
*
|
||||
* NOTE: The ~/.npmrc settings are global for the user account on a given machine, so be careful
|
||||
* about adding settings that may interfere with other work outside the monorepo.
|
||||
*/
|
||||
"userNpmrcLinesToAdd": [
|
||||
// "@example:registry=https://your-company.jfrog.io/your-project/api/npm/npm-private/"
|
||||
],
|
||||
|
||||
/**
|
||||
* (Required) Specifies the URL of the Artifactory control panel where the user can generate
|
||||
* an API key. This URL is printed after the "visitWebsite" message.
|
||||
* It should look something like this example: https://your-company.jfrog.io/
|
||||
* Specify an empty string to suppress this line entirely.
|
||||
*/
|
||||
"artifactoryWebsiteUrl": "",
|
||||
|
||||
/**
|
||||
* Uncomment this line to specify the type of credential to save in the user's ~/.npmrc file.
|
||||
* The default is "password", which means the user's API token will be traded in for an
|
||||
* npm password specific to that registry. Optionally you can specify "authToken", which
|
||||
* will save the user's API token as credentials instead.
|
||||
*/
|
||||
// "credentialType": "password",
|
||||
|
||||
/**
|
||||
* These settings allow the "rush setup" interactive prompts to be customized, for
|
||||
* example with messages specific to your team or configuration. Specify an empty string
|
||||
* to suppress that message entirely.
|
||||
*/
|
||||
"messageOverrides": {
|
||||
/**
|
||||
* Overrides the message that normally says:
|
||||
* "This monorepo consumes packages from an Artifactory private NPM registry."
|
||||
*/
|
||||
// "introduction": "",
|
||||
|
||||
/**
|
||||
* Overrides the message that normally says:
|
||||
* "Please contact the repository maintainers for help with setting up an Artifactory user account."
|
||||
*/
|
||||
// "obtainAnAccount": "",
|
||||
|
||||
/**
|
||||
* Overrides the message that normally says:
|
||||
* "Please open this URL in your web browser:"
|
||||
*
|
||||
* The "artifactoryWebsiteUrl" string is printed after this message.
|
||||
*/
|
||||
// "visitWebsite": "",
|
||||
|
||||
/**
|
||||
* Overrides the message that normally says:
|
||||
* "Your user name appears in the upper-right corner of the JFrog website."
|
||||
*/
|
||||
// "locateUserName": "",
|
||||
|
||||
/**
|
||||
* Overrides the message that normally says:
|
||||
* "Click 'Edit Profile' on the JFrog website. Click the 'Generate API Key'
|
||||
* button if you haven't already done so previously."
|
||||
*/
|
||||
// "locateApiKey": ""
|
||||
|
||||
/**
|
||||
* Overrides the message that normally prompts:
|
||||
* "What is your Artifactory user name?"
|
||||
*/
|
||||
// "userNamePrompt": ""
|
||||
|
||||
/**
|
||||
* Overrides the message that normally prompts:
|
||||
* "What is your Artifactory API key?"
|
||||
*/
|
||||
// "apiKeyPrompt": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
100
common/config/rush/build-cache.json
Normal file
100
common/config/rush/build-cache.json
Normal file
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
* This configuration file manages Rush's build cache feature.
|
||||
* More documentation is available on the Rush website: https://rushjs.io
|
||||
*/
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/build-cache.schema.json",
|
||||
|
||||
/**
|
||||
* (Required) EXPERIMENTAL - Set this to true to enable the build cache feature.
|
||||
*
|
||||
* See https://rushjs.io/pages/maintainer/build_cache/ for details about this experimental feature.
|
||||
*/
|
||||
"buildCacheEnabled": false,
|
||||
|
||||
/**
|
||||
* (Required) Choose where project build outputs will be cached.
|
||||
*
|
||||
* Possible values: "local-only", "azure-blob-storage", "amazon-s3"
|
||||
*/
|
||||
"cacheProvider": "local-only",
|
||||
|
||||
/**
|
||||
* Setting this property overrides the cache entry ID. If this property is set, it must contain
|
||||
* a [hash] token.
|
||||
*
|
||||
* Other available tokens:
|
||||
* - [projectName]
|
||||
* - [projectName:normalize]
|
||||
* - [phaseName]
|
||||
* - [phaseName:normalize]
|
||||
* - [phaseName:trimPrefix]
|
||||
*/
|
||||
"cacheEntryNamePattern": "[projectName:normalize]-[phaseName:normalize]-[hash]",
|
||||
|
||||
/**
|
||||
* Use this configuration with "cacheProvider"="azure-blob-storage"
|
||||
*/
|
||||
"azureBlobStorageConfiguration": {
|
||||
/**
|
||||
* (Required) The name of the the Azure storage account to use for build cache.
|
||||
*/
|
||||
// "storageAccountName": "example",
|
||||
|
||||
/**
|
||||
* (Required) The name of the container in the Azure storage account to use for build cache.
|
||||
*/
|
||||
// "storageContainerName": "my-container",
|
||||
|
||||
/**
|
||||
* The Azure environment the storage account exists in. Defaults to AzurePublicCloud.
|
||||
*
|
||||
* Possible values: "AzurePublicCloud", "AzureChina", "AzureGermany", "AzureGovernment"
|
||||
*/
|
||||
// "azureEnvironment": "AzurePublicCloud",
|
||||
|
||||
/**
|
||||
* An optional prefix for cache item blob names.
|
||||
*/
|
||||
// "blobPrefix": "my-prefix",
|
||||
|
||||
/**
|
||||
* If set to true, allow writing to the cache. Defaults to false.
|
||||
*/
|
||||
// "isCacheWriteAllowed": true
|
||||
},
|
||||
|
||||
/**
|
||||
* Use this configuration with "cacheProvider"="amazon-s3"
|
||||
*/
|
||||
"amazonS3Configuration": {
|
||||
/**
|
||||
* (Required unless s3Endpoint is specified) The name of the bucket to use for build cache.
|
||||
* Example: "my-bucket"
|
||||
*/
|
||||
// "s3Bucket": "my-bucket",
|
||||
|
||||
/**
|
||||
* (Required unless s3Bucket is specified) The Amazon S3 endpoint of the bucket to use for build cache.
|
||||
* This should not include any path; use the s3Prefix to set the path.
|
||||
* Examples: "my-bucket.s3.us-east-2.amazonaws.com" or "http://localhost:9000"
|
||||
*/
|
||||
// "s3Endpoint": "https://my-bucket.s3.us-east-2.amazonaws.com",
|
||||
|
||||
/**
|
||||
* (Required) The Amazon S3 region of the bucket to use for build cache.
|
||||
* Example: "us-east-1"
|
||||
*/
|
||||
// "s3Region": "us-east-1",
|
||||
|
||||
/**
|
||||
* An optional prefix ("folder") for cache items. It should not start with "/".
|
||||
*/
|
||||
// "s3Prefix": "my-prefix",
|
||||
|
||||
/**
|
||||
* If set to true, allow writing to the cache. Defaults to false.
|
||||
*/
|
||||
// "isCacheWriteAllowed": true
|
||||
}
|
||||
}
|
||||
22
common/config/rush/cobuild.json
Normal file
22
common/config/rush/cobuild.json
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* This configuration file manages Rush's cobuild feature.
|
||||
* More documentation is available on the Rush website: https://rushjs.io
|
||||
*/
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/cobuild.schema.json",
|
||||
|
||||
/**
|
||||
* (Required) EXPERIMENTAL - Set this to true to enable the cobuild feature.
|
||||
* RUSH_COBUILD_CONTEXT_ID should always be specified as an environment variable with an non-empty string,
|
||||
* otherwise the cobuild feature will be disabled.
|
||||
*/
|
||||
"cobuildFeatureEnabled": false,
|
||||
|
||||
/**
|
||||
* (Required) Choose where cobuild lock will be acquired.
|
||||
*
|
||||
* The lock provider is registered by the rush plugins.
|
||||
* For example, @rushstack/rush-redis-cobuild-plugin registers the "redis" lock provider.
|
||||
*/
|
||||
"cobuildLockProvider": "redis"
|
||||
}
|
||||
102
common/config/rush/command-line.json
Normal file
102
common/config/rush/command-line.json
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
|
||||
"commands": [
|
||||
{
|
||||
"name": "lint-staged",
|
||||
"commandKind": "global",
|
||||
"summary": "⭐️️ Use to run some task before commit",
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
"autoinstallerName": "rush-lint-staged",
|
||||
"shellCommand": "lint-staged --config common/autoinstallers/rush-lint-staged/.lintstagedrc.js --shell '/bin/bash' --concurrent 8"
|
||||
},
|
||||
{
|
||||
"commandKind": "bulk",
|
||||
"name": "lint",
|
||||
"ignoreMissingScript": true,
|
||||
"enableParallelism": true,
|
||||
"incremental": true,
|
||||
"shellCommand": "eslint ./ --cache",
|
||||
"allowWarningsInSuccessfulBuild": true,
|
||||
"summary": "⭐️️ Run lint command for each package",
|
||||
"safeForSimultaneousRushProcesses": true
|
||||
},
|
||||
{
|
||||
"name": "commitlint",
|
||||
"commandKind": "global",
|
||||
"summary": "⭐️️ Used by the pre-commit Git hook. This command invokes commitlint to ensure that the commit messages meet the conventional commit format",
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
"autoinstallerName": "rush-commitlint",
|
||||
"shellCommand": "commitlint"
|
||||
},
|
||||
{
|
||||
"commandKind": "bulk",
|
||||
"name": "test",
|
||||
"description": "Executes automated tests.",
|
||||
"allowWarningsInSuccessfulBuild": true,
|
||||
"ignoreMissingScript": true,
|
||||
"enableParallelism": true,
|
||||
"summary": "⭐️️ Run test command for each package"
|
||||
},
|
||||
{
|
||||
"commandKind": "bulk",
|
||||
"name": "test:cov",
|
||||
"description": "Executes automated tests with coverage collection.",
|
||||
"allowWarningsInSuccessfulBuild": true,
|
||||
"ignoreMissingScript": true,
|
||||
"enableParallelism": true,
|
||||
"incremental": true,
|
||||
"ignoreDependencyOrder": true,
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
"summary": "⭐️️ Run coverage command for each package"
|
||||
},
|
||||
{
|
||||
"commandKind": "bulk",
|
||||
"name": "build",
|
||||
"allowWarningsInSuccessfulBuild": true,
|
||||
"ignoreMissingScript": true,
|
||||
"enableParallelism": true,
|
||||
"ignoreDependencyOrder": false,
|
||||
"summary": "⭐️️ Run build command for each package"
|
||||
},
|
||||
{
|
||||
"commandKind": "bulk",
|
||||
"name": "pre-build",
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
"allowWarningsInSuccessfulBuild": true,
|
||||
"ignoreMissingScript": true,
|
||||
"enableParallelism": true,
|
||||
"summary": "⭐️️ Run pre-build command for packages with tag:phase-prebuild"
|
||||
},
|
||||
{
|
||||
"name": "commit",
|
||||
"commandKind": "global",
|
||||
"summary": "⭐️️ Commit lint hook",
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
"autoinstallerName": "rush-commitlint",
|
||||
"shellCommand": "export PRE_LINT='1' && rush lint-staged && cd common/autoinstallers/rush-commitlint && git cz"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"parameterKind": "string",
|
||||
"argumentName": "MESSAGE",
|
||||
"longName": "--edit",
|
||||
"description": "",
|
||||
"associatedCommands": ["commitlint"]
|
||||
},
|
||||
{
|
||||
"parameterKind": "string",
|
||||
"argumentName": "MESSAGE",
|
||||
"longName": "--config",
|
||||
"description": "",
|
||||
"associatedCommands": ["commitlint"]
|
||||
},
|
||||
{
|
||||
"parameterKind": "flag",
|
||||
"longName": "--no-verify",
|
||||
"shortName": "-n",
|
||||
"description": "use no verify",
|
||||
"associatedCommands": ["commit"]
|
||||
}
|
||||
]
|
||||
}
|
||||
27
common/config/rush/custom-tips.json
Normal file
27
common/config/rush/custom-tips.json
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* This configuration file allows repo maintainers to configure extra details to be
|
||||
* printed alongside certain Rush messages. More documentation is available on the
|
||||
* Rush website: https://rushjs.io
|
||||
*/
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/custom-tips.schema.json",
|
||||
|
||||
/**
|
||||
* Specifies the custom tips to be displayed by Rush.
|
||||
*/
|
||||
"customTips": [
|
||||
// {
|
||||
// /**
|
||||
// * (REQUIRED) An identifier indicating a message that may be printed by Rush.
|
||||
// * If that message is printed, then this custom tip will be shown.
|
||||
// * Consult the Rush documentation for the current list of possible identifiers.
|
||||
// */
|
||||
// "tipId": "TIP_RUSH_INCONSISTENT_VERSIONS",
|
||||
//
|
||||
// /**
|
||||
// * (REQUIRED) The message text to be displayed for this tip.
|
||||
// */
|
||||
// "message": "For additional troubleshooting information, refer this wiki article:\n\nhttps://intranet.contoso.com/docs/pnpm-mismatch"
|
||||
// }
|
||||
]
|
||||
}
|
||||
74
common/config/rush/deploy.json
Normal file
74
common/config/rush/deploy.json
Normal file
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* This configuration file defines a deployment scenario for use with the "rush deploy" command.
|
||||
* The default scenario file path is "deploy.json"; additional files use the naming pattern
|
||||
* "deploy-<scenario-name>.json". For full documentation, please see https://rushjs.io
|
||||
*/
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/deploy-scenario.schema.json",
|
||||
|
||||
/**
|
||||
* The "rush deploy" command prepares a deployment folder, starting from the main project and collecting
|
||||
* all of its dependencies (both NPM packages and other Rush projects). The main project is specified
|
||||
* using the "--project" parameter. The "deploymentProjectNames" setting lists the allowable choices for
|
||||
* the "--project" parameter; this documents the intended deployments for your monorepo and helps validate
|
||||
* that "rush deploy" is invoked correctly. If there is only one item in the "deploymentProjectNames" array,
|
||||
* then "--project" can be omitted. The names should be complete package names as declared in rush.json.
|
||||
*
|
||||
* If the main project should include other unrelated Rush projects, add it to the "projectSettings" section,
|
||||
* and then specify those projects in the "additionalProjectsToInclude" list.
|
||||
*/
|
||||
"deploymentProjectNames": [
|
||||
"@coze-studio/app"
|
||||
],
|
||||
// solve deploy error: ERROR: Symlink targets not under folder
|
||||
"dependencySettings": [],
|
||||
|
||||
/**
|
||||
* When deploying a local Rush project, the package.json "devDependencies" are normally excluded.
|
||||
* If you want to include them, set "includeDevDependencies" to true.
|
||||
*
|
||||
* The default value is false.
|
||||
*/
|
||||
// "includeDevDependencies": true,
|
||||
|
||||
/**
|
||||
* When deploying a local Rush project, normally the .npmignore filter is applied so that Rush only copies
|
||||
* files that would be packaged by "npm pack". Setting "includeNpmIgnoreFiles" to true will disable this
|
||||
* filtering so that all files are copied (with a few trivial exceptions such as the "node_modules" folder).
|
||||
*
|
||||
* The default value is false.
|
||||
*/
|
||||
"includeNpmIgnoreFiles": false,
|
||||
|
||||
/**
|
||||
* To improve backwards compatibility with legacy packages, the PNPM package manager installs extra links in the
|
||||
* node_modules folder that enable packages to import undeclared dependencies. In some cases this workaround may
|
||||
* double the number of links created. If your deployment does not require this workaround, you can set
|
||||
* "omitPnpmWorkaroundLinks" to true to avoid creating the extra links.
|
||||
*
|
||||
* The default value is false.
|
||||
*/
|
||||
// "omitPnpmWorkaroundLinks": true,
|
||||
|
||||
/**
|
||||
* Specify how links (symbolic links, hard links, and/or NTFS junctions) will be created in the deployed folder:
|
||||
*
|
||||
* - "default": Create the links while copying the files; this is the default behavior.
|
||||
* - "script": A Node.js script called "create-links.js" will be written. When executed, this script will
|
||||
* create the links described in the "deploy-metadata.json" output file.
|
||||
* - "none": Do nothing; some other tool may create the links later.
|
||||
*/
|
||||
// "linkCreation": "script",
|
||||
|
||||
/**
|
||||
* If this path is specified, then after "rush deploy", recursively copy the files from this folder to
|
||||
* the deployment target folder (common/deploy). This can be used to provide additional configuration files
|
||||
* or scripts needed by the server when deploying. The path is resolved relative to the repository root.
|
||||
*/
|
||||
// "folderToCopy": "repo-tools/assets/deploy-config",
|
||||
|
||||
/**
|
||||
* Customize how Rush projects are processed during deployment.
|
||||
*/
|
||||
"projectSettings": []
|
||||
}
|
||||
67
common/config/rush/experiments.json
Normal file
67
common/config/rush/experiments.json
Normal file
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* This configuration file allows repo maintainers to enable and disable experimental
|
||||
* Rush features. More documentation is available on the Rush website: https://rushjs.io
|
||||
*/
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/experiments.schema.json",
|
||||
|
||||
/**
|
||||
* By default, 'rush install' passes --no-prefer-frozen-lockfile to 'pnpm install'.
|
||||
* Set this option to true to pass '--frozen-lockfile' instead for faster installs.
|
||||
*/
|
||||
"usePnpmFrozenLockfileForRushInstall": true,
|
||||
|
||||
/**
|
||||
* By default, 'rush update' passes --no-prefer-frozen-lockfile to 'pnpm install'.
|
||||
* Set this option to true to pass '--prefer-frozen-lockfile' instead to minimize shrinkwrap changes.
|
||||
*/
|
||||
"usePnpmPreferFrozenLockfileForRushUpdate": true,
|
||||
|
||||
/**
|
||||
* By default, 'rush update' runs as a single operation.
|
||||
* Set this option to true to instead update the lockfile with `--lockfile-only`, then perform a `--frozen-lockfile` install.
|
||||
* Necessary when using the `afterAllResolved` hook in .pnpmfile.cjs.
|
||||
*/
|
||||
// "usePnpmLockfileOnlyThenFrozenLockfileForRushUpdate": true,
|
||||
|
||||
/**
|
||||
* If using the 'preventManualShrinkwrapChanges' option, restricts the hash to only include the layout of external dependencies.
|
||||
* Used to allow links between workspace projects or the addition/removal of references to existing dependency versions to not
|
||||
* cause hash changes.
|
||||
*/
|
||||
// "omitImportersFromPreventManualShrinkwrapChanges": true,
|
||||
|
||||
/**
|
||||
* If true, the chmod field in temporary project tar headers will not be normalized.
|
||||
* This normalization can help ensure consistent tarball integrity across platforms.
|
||||
*/
|
||||
// "noChmodFieldInTarHeaderNormalization": true,
|
||||
|
||||
/**
|
||||
* If true, build caching will respect the allowWarningsInSuccessfulBuild flag and cache builds with warnings.
|
||||
* This will not replay warnings from the cached build.
|
||||
*/
|
||||
"buildCacheWithAllowWarningsInSuccessfulBuild": true,
|
||||
|
||||
/**
|
||||
* If true, the phased commands feature is enabled. To use this feature, create a "phased" command
|
||||
* in common/config/rush/command-line.json.
|
||||
*/
|
||||
// "phasedCommands": true,
|
||||
|
||||
/**
|
||||
* If true, perform a clean install after when running `rush install` or `rush update` if the
|
||||
* `.npmrc` file has changed since the last install.
|
||||
*/
|
||||
// "cleanInstallAfterNpmrcChanges": true,
|
||||
|
||||
/**
|
||||
* If true, print the outputs of shell commands defined in event hooks to the console.
|
||||
*/
|
||||
"printEventHooksOutputToConsole": false,
|
||||
|
||||
/**
|
||||
* If true, Rush will not allow node_modules in the repo folder or in parent folders.
|
||||
*/
|
||||
"forbidPhantomResolvableNodeModulesFolders": true
|
||||
}
|
||||
36
common/config/rush/pnpm-config.json
Normal file
36
common/config/rush/pnpm-config.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/pnpm-config.schema.json",
|
||||
"useWorkspaces": true,
|
||||
"autoInstallPeers": true,
|
||||
"strictPeerDependencies": false,
|
||||
"environmentVariables": {
|
||||
"NODE_OPTIONS": {
|
||||
"value": "--max-old-space-size=4096",
|
||||
"override": false
|
||||
}
|
||||
},
|
||||
"globalOverrides": {
|
||||
"sass@1.74.1>immutable": "3.8.2",
|
||||
"web-streams-polyfill": "3.3.2",
|
||||
"vitest@1.4.0>vite": "5.1.6",
|
||||
"debug": "4.3.3",
|
||||
"type-fest": "3.13.1",
|
||||
"@types/node": "18.18.9",
|
||||
"leveldown": "6.1.1",
|
||||
"ahooks": "3.7.8",
|
||||
"terser-webpack-plugin@5.3.10>webpack": "5.89.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"tailwindcss@3.3.6>postcss": "8.4.49",
|
||||
"@types/react": "18.2.37",
|
||||
"@types/react-dom": "18.2.15",
|
||||
"@coze-arch/coze-design": "0.0.6-alpha.101d0c",
|
||||
"typescript": "5.8.2"
|
||||
},
|
||||
"globalPeerDependencyRules": {},
|
||||
"globalPackageExtensions": {},
|
||||
"globalNeverBuiltDependencies": ["canvas", "better-sqlite3"],
|
||||
"globalAllowedDeprecatedVersions": {},
|
||||
"globalPatchedDependencies": {},
|
||||
"unsupportedPackageJsonSettings": {}
|
||||
}
|
||||
4
common/config/rush/repo-state.json
Normal file
4
common/config/rush/repo-state.json
Normal file
@@ -0,0 +1,4 @@
|
||||
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
|
||||
{
|
||||
"preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"
|
||||
}
|
||||
40
common/config/rush/rush-plugins.json
Normal file
40
common/config/rush/rush-plugins.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugins.schema.json",
|
||||
"plugins": [
|
||||
{
|
||||
"packageName": "rush-init-project-plugin",
|
||||
"pluginName": "rush-init-project-plugin",
|
||||
"autoinstallerName": "plugins"
|
||||
},
|
||||
{
|
||||
"packageName": "@coze-arch/rush-run-tsc-plugin",
|
||||
"pluginName": "@coze-arch/rush-run-tsc-plugin",
|
||||
"autoinstallerName": "plugins"
|
||||
},
|
||||
{
|
||||
"packageName": "@coze-arch/rush-publish-plugin",
|
||||
"pluginName": "@coze-arch/rush-publish-plugin",
|
||||
"autoinstallerName": "plugins"
|
||||
},
|
||||
{
|
||||
"packageName": "@coze-arch/rush-fix-ts-refers-plugin",
|
||||
"pluginName": "@coze-arch/rush-fix-ts-refers-plugin",
|
||||
"autoinstallerName": "plugins"
|
||||
},
|
||||
{
|
||||
"packageName": "@coze-arch/rush-increment-run-plugin",
|
||||
"pluginName": "@coze-arch/rush-increment-run-plugin",
|
||||
"autoinstallerName": "plugins"
|
||||
},
|
||||
{
|
||||
"packageName": "@coze-arch/rush-dep-level-check-plugin",
|
||||
"pluginName": "@coze-arch/rush-dep-level-check-plugin",
|
||||
"autoinstallerName": "plugins"
|
||||
},
|
||||
{
|
||||
"packageName": "@coze-arch/rush-clear-build-cache-plugin",
|
||||
"pluginName": "@coze-arch/rush-clear-build-cache-plugin",
|
||||
"autoinstallerName": "plugins"
|
||||
}
|
||||
]
|
||||
}
|
||||
30
common/config/rush/subspaces.json
Normal file
30
common/config/rush/subspaces.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/subspaces.schema.json",
|
||||
|
||||
/**
|
||||
* Set this flag to "true" to enable usage of subspaces.
|
||||
*/
|
||||
"subspacesEnabled": true,
|
||||
|
||||
/**
|
||||
* When a command such as "rush update" is invoked without the "--subspace" or "--to"
|
||||
* parameters, Rush will install all subspaces. In a huge monorepo with numerous subspaces,
|
||||
* this would be extremely slow. Set "preventSelectingAllSubspaces" to true to avoid this
|
||||
* mistake by always requiring selection parameters for commands such as "rush update".
|
||||
*/
|
||||
"preventSelectingAllSubspaces": false,
|
||||
|
||||
/**
|
||||
* The list of subspace names, which should be lowercase alphanumeric words separated by
|
||||
* hyphens, for example "my-subspace". The corresponding config files will have paths
|
||||
* such as "common/config/subspaces/my-subspace/package-lock.yaml".
|
||||
*/
|
||||
"subspaceNames": [
|
||||
// The "default" subspace always exists even if you don't define it,
|
||||
// but let's include it for clarity
|
||||
"default",
|
||||
|
||||
"e2e", // 👈👈👈 Our secondary subspace name
|
||||
"e2e-opencoze"
|
||||
]
|
||||
}
|
||||
102
common/config/rush/version-policies.json
Normal file
102
common/config/rush/version-policies.json
Normal file
@@ -0,0 +1,102 @@
|
||||
/**
|
||||
* This is configuration file is used for advanced publishing configurations with Rush.
|
||||
* More documentation is available on the Rush website: https://rushjs.io
|
||||
*/
|
||||
|
||||
/**
|
||||
* A list of version policy definitions. A "version policy" is a custom package versioning
|
||||
* strategy that affects "rush change", "rush version", and "rush publish". The strategy applies
|
||||
* to a set of projects that are specified using the "versionPolicyName" field in rush.json.
|
||||
*/
|
||||
[
|
||||
// {
|
||||
// /**
|
||||
// * (Required) Indicates the kind of version policy being defined ("lockStepVersion" or "individualVersion").
|
||||
// *
|
||||
// * The "lockStepVersion" mode specifies that the projects will use "lock-step versioning". This
|
||||
// * strategy is appropriate for a set of packages that act as selectable components of a
|
||||
// * unified product. The entire set of packages are always published together, and always share
|
||||
// * the same NPM version number. When the packages depend on other packages in the set, the
|
||||
// * SemVer range is usually restricted to a single version.
|
||||
// */
|
||||
// "definitionName": "lockStepVersion",
|
||||
//
|
||||
// /**
|
||||
// * (Required) The name that will be used for the "versionPolicyName" field in rush.json.
|
||||
// * This name is also used command-line parameters such as "--version-policy"
|
||||
// * and "--to-version-policy".
|
||||
// */
|
||||
// "policyName": "MyBigFramework",
|
||||
//
|
||||
// /**
|
||||
// * (Required) The current version. All packages belonging to the set should have this version
|
||||
// * in the current branch. When bumping versions, Rush uses this to determine the next version.
|
||||
// * (The "version" field in package.json is NOT considered.)
|
||||
// */
|
||||
// "version": "1.0.0",
|
||||
//
|
||||
// /**
|
||||
// * (Required) The type of bump that will be performed when publishing the next release.
|
||||
// * When creating a release branch in Git, this field should be updated according to the
|
||||
// * type of release.
|
||||
// *
|
||||
// * Valid values are: "prerelease", "minor", "patch", "major"
|
||||
// */
|
||||
// "nextBump": "prerelease",
|
||||
//
|
||||
// /**
|
||||
// * (Optional) If specified, all packages in the set share a common CHANGELOG.md file.
|
||||
// * This file is stored with the specified "main" project, which must be a member of the set.
|
||||
// *
|
||||
// * If this field is omitted, then a separate CHANGELOG.md file will be maintained for each
|
||||
// * package in the set.
|
||||
// */
|
||||
// "mainProject": "my-app",
|
||||
//
|
||||
// /**
|
||||
// * (Optional) If enabled, the "rush change" command will prompt the user for their email address
|
||||
// * and include it in the JSON change files. If an organization maintains multiple repos, tracking
|
||||
// * this contact information may be useful for a service that automatically upgrades packages and
|
||||
// * needs to notify engineers whose change may be responsible for a downstream build break. It might
|
||||
// * also be useful for crediting contributors. Rush itself does not do anything with the collected
|
||||
// * email addresses. The default value is "false".
|
||||
// */
|
||||
// // "includeEmailInChangeFile": true
|
||||
// },
|
||||
//
|
||||
// {
|
||||
// /**
|
||||
// * (Required) Indicates the kind of version policy being defined ("lockStepVersion" or "individualVersion").
|
||||
// *
|
||||
// * The "individualVersion" mode specifies that the projects will use "individual versioning".
|
||||
// * This is the typical NPM model where each package has an independent version number
|
||||
// * and CHANGELOG.md file. Although a single CI definition is responsible for publishing the
|
||||
// * packages, they otherwise don't have any special relationship. The version bumping will
|
||||
// * depend on how developers answer the "rush change" questions for each package that
|
||||
// * is changed.
|
||||
// */
|
||||
// "definitionName": "individualVersion",
|
||||
//
|
||||
// "policyName": "MyRandomLibraries",
|
||||
//
|
||||
// /**
|
||||
// * (Optional) This can be used to enforce that all packages in the set must share a common
|
||||
// * major version number, e.g. because they are from the same major release branch.
|
||||
// * It can also be used to discourage people from accidentally making "MAJOR" SemVer changes
|
||||
// * inappropriately. The minor/patch version parts will be bumped independently according
|
||||
// * to the types of changes made to each project, according to the "rush change" command.
|
||||
// */
|
||||
// "lockedMajor": 3,
|
||||
//
|
||||
// /**
|
||||
// * (Optional) When publishing is managed by Rush, by default the "rush change" command will
|
||||
// * request changes for any projects that are modified by a pull request. These change entries
|
||||
// * will produce a CHANGELOG.md file. If you author your CHANGELOG.md manually or announce updates
|
||||
// * in some other way, set "exemptFromRushChange" to true to tell "rush change" to ignore the projects
|
||||
// * belonging to this version policy.
|
||||
// */
|
||||
// "exemptFromRushChange": false,
|
||||
//
|
||||
// // "includeEmailInChangeFile": true
|
||||
// }
|
||||
]
|
||||
Reference in New Issue
Block a user