cross-release-cli 0.1.0 → 0.2.1
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/bin/cross-release.js +1 -1
- package/dist/app.d.ts +26 -25
- package/dist/app.js +629 -573
- package/dist/index.d.ts +4 -3
- package/dist/index.js +5 -5
- package/dist/types.d-PDBL5zNm.d.ts +114 -0
- package/package.json +16 -11
- package/dist/types.d.ts +0 -127
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DefineConfigOptions } from
|
|
2
|
-
import 'cross-bump';
|
|
1
|
+
import { DefineConfigOptions } from "./types.d-PDBL5zNm.js";
|
|
3
2
|
|
|
3
|
+
//#region src/index.d.ts
|
|
4
4
|
declare function defineConfig(config: DefineConfigOptions): DefineConfigOptions;
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
//#endregion
|
|
7
|
+
export { defineConfig };
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ProjectCategory } from "cross-bump";
|
|
2
|
+
import "cac";
|
|
3
|
+
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
type DefineConfigOptions = Partial<Omit<ReleaseOptions, "config">>;
|
|
6
|
+
type ReleaseOptions = {
|
|
7
|
+
/**
|
|
8
|
+
* Indicates whether to commit the changes.
|
|
9
|
+
*/
|
|
10
|
+
commit: boolean | CommitOptions
|
|
11
|
+
/**
|
|
12
|
+
* Specifies the path to the configuration file.
|
|
13
|
+
*/
|
|
14
|
+
config: string
|
|
15
|
+
/**
|
|
16
|
+
* The directory path where the operation will be performed.
|
|
17
|
+
* @default process.cwd()
|
|
18
|
+
*/
|
|
19
|
+
cwd: string
|
|
20
|
+
/**
|
|
21
|
+
* Enable debug log
|
|
22
|
+
*/
|
|
23
|
+
debug: boolean
|
|
24
|
+
/**
|
|
25
|
+
* Whether the operation is being run in a dry-run mode (simulated execution).
|
|
26
|
+
*/
|
|
27
|
+
dry: boolean
|
|
28
|
+
/**
|
|
29
|
+
* The list of directories to exclude from the search.
|
|
30
|
+
* @default ["node_modules", ".git", "target", "build", "dist"]
|
|
31
|
+
*/
|
|
32
|
+
exclude: string[]
|
|
33
|
+
/**
|
|
34
|
+
* The command to execute before pushing.
|
|
35
|
+
*/
|
|
36
|
+
execute: string[]
|
|
37
|
+
/**
|
|
38
|
+
* Specifies the main project category.
|
|
39
|
+
*/
|
|
40
|
+
main: ProjectCategory
|
|
41
|
+
/**
|
|
42
|
+
* Whether push changes to remote and push options
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
push: boolean | PushOptions
|
|
46
|
+
/**
|
|
47
|
+
* Specifies whether the operation should be performed recursively.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
recursive: boolean
|
|
51
|
+
/**
|
|
52
|
+
* Indicates whether to create a tag for a release.
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
tag: boolean | TagOptions
|
|
56
|
+
/**
|
|
57
|
+
* The version string associated with the command or operation.
|
|
58
|
+
*/
|
|
59
|
+
version: string
|
|
60
|
+
/**
|
|
61
|
+
* Whether all prompts requiring user input will be answered with "yes".
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
yes: boolean
|
|
65
|
+
};
|
|
66
|
+
type CommitOptions = {
|
|
67
|
+
/**
|
|
68
|
+
* Whether to sign the commit.
|
|
69
|
+
* @default true
|
|
70
|
+
*/
|
|
71
|
+
signoff?: true
|
|
72
|
+
/**
|
|
73
|
+
* Whether to stage all files or only modified files.
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
stageAll?: boolean
|
|
77
|
+
/**
|
|
78
|
+
* The template string for the commit message. if the template contains any "%s" placeholders,
|
|
79
|
+
* then they are replaced with the version number;
|
|
80
|
+
* @default "chore: release v%s"
|
|
81
|
+
*/
|
|
82
|
+
template?: string
|
|
83
|
+
/**
|
|
84
|
+
* Whether to enable git pre-commit and commit-msg hook.
|
|
85
|
+
* @default true
|
|
86
|
+
*/
|
|
87
|
+
verify?: boolean
|
|
88
|
+
};
|
|
89
|
+
type PushOptions = {
|
|
90
|
+
/**
|
|
91
|
+
* The branch name, Use the same branch name as the local if not specified.
|
|
92
|
+
*/
|
|
93
|
+
branch?: string
|
|
94
|
+
/**
|
|
95
|
+
* Whether to follow tags
|
|
96
|
+
* @default true
|
|
97
|
+
*/
|
|
98
|
+
followTags?: boolean
|
|
99
|
+
/**
|
|
100
|
+
* The remote name, defaults to the upstream defined in the Git repository if not specified.
|
|
101
|
+
*/
|
|
102
|
+
remote?: string
|
|
103
|
+
};
|
|
104
|
+
type TagOptions = {
|
|
105
|
+
/**
|
|
106
|
+
* The template for tag name, same as @type {CommitOptions.template}
|
|
107
|
+
* if the template contains any "%s" placeholders,
|
|
108
|
+
* then they are replaced with the version number;
|
|
109
|
+
*/
|
|
110
|
+
template?: string
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
//#endregion
|
|
114
|
+
export { DefineConfigOptions, ReleaseOptions };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cross-release-cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"description": "command line app for cross language bump utility",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "rainbowatcher",
|
|
@@ -26,20 +26,25 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@clack/prompts": "^0.
|
|
30
|
-
"@rainbowatcher/
|
|
31
|
-
"@rainbowatcher/
|
|
32
|
-
"
|
|
33
|
-
"
|
|
29
|
+
"@clack/prompts": "^0.10.1",
|
|
30
|
+
"@rainbowatcher/common": "^0.7.0",
|
|
31
|
+
"@rainbowatcher/fs-extra": "^0.7.0",
|
|
32
|
+
"@rainbowatcher/path-extra": "^0.7.0",
|
|
33
|
+
"cac": "^6.7.14",
|
|
34
|
+
"debug": "^4.4.0",
|
|
34
35
|
"defu": "^6.1.4",
|
|
35
|
-
"execa": "^9.
|
|
36
|
+
"execa": "^9.5.2",
|
|
36
37
|
"is-unicode-supported": "^2.1.0",
|
|
37
|
-
"picocolors": "^1.1.
|
|
38
|
-
"unconfig": "^
|
|
39
|
-
"
|
|
38
|
+
"picocolors": "^1.1.1",
|
|
39
|
+
"unconfig": "^7.3.2",
|
|
40
|
+
"zod": "^3.24.4",
|
|
41
|
+
"cross-bump": "0.2.1"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@rainbowatcher/maybe": "^0.7.0"
|
|
40
45
|
},
|
|
41
46
|
"scripts": {
|
|
42
47
|
"clean": "rimraf dist/*",
|
|
43
|
-
"build": "
|
|
48
|
+
"build": "tsdown"
|
|
44
49
|
}
|
|
45
50
|
}
|
package/dist/types.d.ts
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { ProjectCategory } from 'cross-bump';
|
|
2
|
-
|
|
3
|
-
type Arrayable<T> = T | T[];
|
|
4
|
-
type CliPrimitive = boolean | string | string[];
|
|
5
|
-
type ExcludeType<T, U> = {
|
|
6
|
-
[K in keyof T]: T[K] extends U ? T[K] : Exclude<T[K], U>;
|
|
7
|
-
};
|
|
8
|
-
type KeysOf<T, KeyType = string> = keyof {
|
|
9
|
-
[K in keyof T as T[K] extends KeyType ? K : never]: T[K];
|
|
10
|
-
};
|
|
11
|
-
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
12
|
-
type Status = "failed" | "finished" | "pending" | "running";
|
|
13
|
-
type ExtractBooleanKeys<T> = keyof Pick<T, {
|
|
14
|
-
[K in keyof T]: T[K] extends boolean | Record<string, unknown> ? K : never;
|
|
15
|
-
}[keyof T]>;
|
|
16
|
-
type Task = {
|
|
17
|
-
exec: () => boolean | boolean[] | Promise<boolean | boolean[]>;
|
|
18
|
-
name: string;
|
|
19
|
-
};
|
|
20
|
-
type ReleaseOptionsDefault = Omit<ExcludeType<ReleaseOptions, CliPrimitive>, "config" | "version">;
|
|
21
|
-
type DefineConfigOptions = Partial<Omit<ReleaseOptions, "config">>;
|
|
22
|
-
type CliReleaseOptions = ExcludeType<ReleaseOptions, Record<string, unknown>>;
|
|
23
|
-
type ReleaseOptions = {
|
|
24
|
-
/**
|
|
25
|
-
* Wethere add all changed files to staged, shorthand for @type {CommitOptions.stageAll}
|
|
26
|
-
*/
|
|
27
|
-
all: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Indicates whether to commit the changes.
|
|
30
|
-
* @default false
|
|
31
|
-
*/
|
|
32
|
-
commit: boolean | CommitOptions;
|
|
33
|
-
/**
|
|
34
|
-
* Specifies the path to the configuration file.
|
|
35
|
-
*/
|
|
36
|
-
config: string;
|
|
37
|
-
/**
|
|
38
|
-
* The directory path where the operation will be performed.
|
|
39
|
-
* @default process.cwd()
|
|
40
|
-
*/
|
|
41
|
-
cwd: string;
|
|
42
|
-
/**
|
|
43
|
-
* Enable debug log
|
|
44
|
-
*/
|
|
45
|
-
debug: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Whether the operation is being run in a dry-run mode (simulated execution).
|
|
48
|
-
*/
|
|
49
|
-
dry: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* The list of directories to exclude from the search.
|
|
52
|
-
* @default ["node_modules", ".git", "target", "build", "dist"]
|
|
53
|
-
*/
|
|
54
|
-
exclude: string[];
|
|
55
|
-
/**
|
|
56
|
-
* The command to execute before pushing.
|
|
57
|
-
*/
|
|
58
|
-
execute: string[];
|
|
59
|
-
/**
|
|
60
|
-
* Specifies the main project category.
|
|
61
|
-
*/
|
|
62
|
-
main: ProjectCategory;
|
|
63
|
-
/**
|
|
64
|
-
* Whether push changes to remote and push options
|
|
65
|
-
* @default false
|
|
66
|
-
*/
|
|
67
|
-
push: boolean | PushOptions;
|
|
68
|
-
/**
|
|
69
|
-
* Specifies whether the operation should be performed recursively.
|
|
70
|
-
* @default false
|
|
71
|
-
*/
|
|
72
|
-
recursive: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Indicates whether to create a tag for a release.
|
|
75
|
-
* @default false
|
|
76
|
-
*/
|
|
77
|
-
tag: boolean | TagOptions;
|
|
78
|
-
/**
|
|
79
|
-
* The version string associated with the command or operation.
|
|
80
|
-
*/
|
|
81
|
-
version: string;
|
|
82
|
-
/**
|
|
83
|
-
* Whether all prompts requiring user input will be answered with "yes".
|
|
84
|
-
* @default false
|
|
85
|
-
*/
|
|
86
|
-
yes: boolean;
|
|
87
|
-
};
|
|
88
|
-
type CommitOptions = {
|
|
89
|
-
/**
|
|
90
|
-
* Whether to stage all files or only modified files.
|
|
91
|
-
*/
|
|
92
|
-
stageAll?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* The template string for the commit message. if the template contains any "%s" placeholders,
|
|
95
|
-
* then they are replaced with the version number;
|
|
96
|
-
*/
|
|
97
|
-
template?: string;
|
|
98
|
-
/**
|
|
99
|
-
* Whether to enable git pre-commit and commit-msg hook.
|
|
100
|
-
* @default true
|
|
101
|
-
*/
|
|
102
|
-
verify?: boolean;
|
|
103
|
-
};
|
|
104
|
-
type PushOptions = {
|
|
105
|
-
/**
|
|
106
|
-
* The branch name
|
|
107
|
-
*/
|
|
108
|
-
branch?: string;
|
|
109
|
-
/**
|
|
110
|
-
* Whether to follow tags
|
|
111
|
-
*/
|
|
112
|
-
followTags?: boolean;
|
|
113
|
-
/**
|
|
114
|
-
* The remote name
|
|
115
|
-
*/
|
|
116
|
-
remote?: string;
|
|
117
|
-
};
|
|
118
|
-
type TagOptions = {
|
|
119
|
-
/**
|
|
120
|
-
* The template for tag name, same as @type {CommitOptions.template}
|
|
121
|
-
* if the template contains any "%s" placeholders,
|
|
122
|
-
* then they are replaced with the version number;
|
|
123
|
-
*/
|
|
124
|
-
template?: string;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export type { Arrayable, CliPrimitive, CliReleaseOptions, CommitOptions, DefineConfigOptions, ExcludeType, ExtractBooleanKeys, KeysOf, PushOptions, ReleaseOptions, ReleaseOptionsDefault, ResolvedOptions, Status, TagOptions, Task };
|