@coze-arch/rush-publish-plugin 0.0.4 → 0.0.5-alpha.1ae01f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/command-line.json +35 -3
- package/lib/action/publish/confirm.d.ts +5 -1
- package/lib/action/publish/git.d.ts +1 -5
- package/lib/action/publish/packages.d.ts +1 -1
- package/lib/action/publish/push-to-remote.d.ts +1 -0
- package/lib/action/publish/types.d.ts +3 -0
- package/lib/action/publish/version.d.ts +1 -1
- package/lib/action/release/plan.d.ts +1 -1
- package/lib/action/release/types.d.ts +3 -1
- package/lib/const/index.d.ts +12 -0
- package/lib/index.js +696 -133
- package/lib/utils/ci.d.ts +86 -0
- package/lib/utils/get-plugin-config.d.ts +8 -0
- package/lib/utils/git.d.ts +27 -0
- package/package.json +6 -10
package/command-line.json
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"required": false
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
|
-
"parameterKind": "
|
|
37
|
+
"parameterKind": "stringList",
|
|
38
38
|
"shortName": "-t",
|
|
39
39
|
"longName": "--to",
|
|
40
40
|
"description": "Publish specified packages and their downstream dependencies",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"required": false
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
"parameterKind": "
|
|
46
|
+
"parameterKind": "stringList",
|
|
47
47
|
"shortName": "-f",
|
|
48
48
|
"longName": "--from",
|
|
49
49
|
"description": "Publish specified packages and their upstream/downstream dependencies",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"required": false
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
"parameterKind": "
|
|
55
|
+
"parameterKind": "stringList",
|
|
56
56
|
"shortName": "-o",
|
|
57
57
|
"longName": "--only",
|
|
58
58
|
"description": "Only publish specified packages",
|
|
@@ -106,6 +106,22 @@
|
|
|
106
106
|
"associatedCommands": ["pub"],
|
|
107
107
|
"required": false
|
|
108
108
|
},
|
|
109
|
+
{
|
|
110
|
+
"parameterKind": "string",
|
|
111
|
+
"longName": "--branch-prefix",
|
|
112
|
+
"description": "Git branch name prefix (default: 'release')",
|
|
113
|
+
"argumentName": "BRANCH_PREFIX",
|
|
114
|
+
"associatedCommands": ["pub"],
|
|
115
|
+
"required": false
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"parameterKind": "flag",
|
|
119
|
+
"longName": "--release",
|
|
120
|
+
"shortName": "-l",
|
|
121
|
+
"description": "Directly publish packages (only for alpha/beta versions)",
|
|
122
|
+
"associatedCommands": ["pub"],
|
|
123
|
+
"required": false
|
|
124
|
+
},
|
|
109
125
|
{
|
|
110
126
|
"parameterKind": "flag",
|
|
111
127
|
"longName": "--amend-commit",
|
|
@@ -135,6 +151,22 @@
|
|
|
135
151
|
"shortName": "-c",
|
|
136
152
|
"description": "Git commit hash",
|
|
137
153
|
"associatedCommands": ["release"]
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"parameterKind": "string",
|
|
157
|
+
"argumentName": "REGISTRY",
|
|
158
|
+
"longName": "--registry",
|
|
159
|
+
"shortName": "-r",
|
|
160
|
+
"description": "NPM registry URL (default: https://registry.npmjs.org)",
|
|
161
|
+
"associatedCommands": ["release", "pub"]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"parameterKind": "stringList",
|
|
165
|
+
"argumentName": "ALLOW_BRANCHES",
|
|
166
|
+
"longName": "--allow-branches",
|
|
167
|
+
"description": "Branches allowed for LATEST release (default: main, feat/auto-publish)",
|
|
168
|
+
"associatedCommands": ["release"],
|
|
169
|
+
"required": false
|
|
138
170
|
}
|
|
139
171
|
]
|
|
140
172
|
}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { type PublishManifest } from './types';
|
|
2
|
-
export
|
|
2
|
+
export interface ConfirmForPublishOptions {
|
|
3
|
+
isReleaseMode?: boolean;
|
|
4
|
+
registry?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const confirmForPublish: (publishManifest: PublishManifest[], dryRun: boolean, options?: ConfirmForPublishOptions) => Promise<boolean>;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { type PublishManifest } from './types';
|
|
2
1
|
export declare function createAndPushBranch(branchName: string, cwd: string): Promise<void>;
|
|
3
2
|
interface CommitChangesOptions {
|
|
4
|
-
sessionId: string;
|
|
5
3
|
files: string[];
|
|
6
4
|
cwd: string;
|
|
7
|
-
publishManifests: PublishManifest[];
|
|
8
5
|
branchName: string;
|
|
9
|
-
createTags: boolean;
|
|
10
6
|
}
|
|
11
|
-
export declare function commitChanges({
|
|
7
|
+
export declare function commitChanges({ files, cwd, branchName, }: CommitChangesOptions): Promise<{
|
|
12
8
|
effects: string[];
|
|
13
9
|
branchName: string;
|
|
14
10
|
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type RushConfigurationProject } from '@rushstack/rush-sdk';
|
|
2
2
|
import { type PublishOptions } from './types';
|
|
3
|
-
export declare const validateAndGetPackages: (options: PublishOptions) =>
|
|
3
|
+
export declare const validateAndGetPackages: (options: PublishOptions) => RushConfigurationProject[];
|
|
@@ -9,7 +9,7 @@ interface VersionOptions {
|
|
|
9
9
|
/**
|
|
10
10
|
* 生成发布清单
|
|
11
11
|
*/
|
|
12
|
-
export declare const generatePublishManifest: (packages:
|
|
12
|
+
export declare const generatePublishManifest: (packages: RushConfigurationProject[], options: VersionOptions) => Promise<{
|
|
13
13
|
manifests: PublishManifest[];
|
|
14
14
|
bumpPolicy: BumpType | string | undefined;
|
|
15
15
|
}>;
|
|
@@ -5,4 +5,4 @@ export declare enum ReleaseType {
|
|
|
5
5
|
LATEST = "latest"
|
|
6
6
|
}
|
|
7
7
|
export declare const calReleaseType: (version: string) => ReleaseType;
|
|
8
|
-
export declare const checkReleasePlan: (releaseManifests: ReleaseManifest[], branchName: string) => boolean;
|
|
8
|
+
export declare const checkReleasePlan: (releaseManifests: ReleaseManifest[], branchName: string, allowBranches?: string[]) => boolean;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type RushConfigurationProject } from '@rushstack/rush-sdk';
|
|
2
2
|
export interface ReleaseOptions {
|
|
3
|
-
commit
|
|
3
|
+
commit?: string;
|
|
4
4
|
dryRun?: boolean;
|
|
5
5
|
registry: string;
|
|
6
|
+
packages?: PackageToPublish[];
|
|
7
|
+
allowBranches?: string[];
|
|
6
8
|
}
|
|
7
9
|
export interface PackageToPublish {
|
|
8
10
|
packageName: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 默认的 NPM registry 地址
|
|
3
|
+
*/
|
|
4
|
+
export declare const DEFAULT_NPM_REGISTRY = "https://registry.npmjs.org";
|
|
5
|
+
/**
|
|
6
|
+
* 默认的 Git 分支名前缀
|
|
7
|
+
*/
|
|
8
|
+
export declare const DEFAULT_BRANCH_PREFIX = "bump";
|
|
9
|
+
/**
|
|
10
|
+
* 默认允许发布正式版本的分支列表
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_ALLOW_BRANCHES: string[];
|