cross-release-cli
Advanced tools
| import { ProjectCategory } from "cross-bump"; | ||
| //#region src/types.d.ts | ||
| type DefineConfigOptions = Partial<Omit<ReleaseOptions, "config">>; | ||
| type ReleaseOptions = { | ||
| /** | ||
| * Indicates whether to commit the changes. | ||
| */ | ||
| commit: boolean | CommitOptions; | ||
| /** | ||
| * Specifies the path to the configuration file. | ||
| */ | ||
| config: string; | ||
| /** | ||
| * The directory path where the operation will be performed. | ||
| * @default process.cwd() | ||
| */ | ||
| cwd: string; | ||
| /** | ||
| * Enable debug log | ||
| */ | ||
| debug: boolean; | ||
| /** | ||
| * Whether the operation is being run in a dry-run mode (simulated execution). | ||
| */ | ||
| dry: boolean; | ||
| /** | ||
| * The list of directories to exclude from the search. | ||
| * @default ["node_modules", ".git", "target", "build", "dist"] | ||
| */ | ||
| exclude: string[]; | ||
| /** | ||
| * The command to execute before pushing. | ||
| */ | ||
| execute: string[]; | ||
| /** | ||
| * Specifies the main project category. | ||
| */ | ||
| main: ProjectCategory; | ||
| /** | ||
| * Whether push changes to remote and push options | ||
| * @default false | ||
| */ | ||
| push: boolean | PushOptions; | ||
| /** | ||
| * Specifies whether the operation should be performed recursively. | ||
| * @default false | ||
| */ | ||
| recursive: boolean; | ||
| /** | ||
| * Indicates whether to create a tag for a release. | ||
| * @default false | ||
| */ | ||
| tag: boolean | TagOptions; | ||
| /** | ||
| * The version string associated with the command or operation. | ||
| */ | ||
| version: string; | ||
| /** | ||
| * Whether all prompts requiring user input will be answered with "yes". | ||
| * @default false | ||
| */ | ||
| yes: boolean; | ||
| }; | ||
| type CommitOptions = { | ||
| /** | ||
| * Whether to sign the commit. | ||
| * @default true | ||
| */ | ||
| signoff?: true; | ||
| /** | ||
| * Whether to stage all files or only modified files. | ||
| * @default false | ||
| */ | ||
| stageAll?: boolean; | ||
| /** | ||
| * The template string for the commit message. if the template contains any "%s" placeholders, | ||
| * then they are replaced with the version number; | ||
| * @default "chore: release v%s" | ||
| */ | ||
| template?: string; | ||
| /** | ||
| * Whether to enable git pre-commit and commit-msg hook. | ||
| * @default true | ||
| */ | ||
| verify?: boolean; | ||
| }; | ||
| type PushOptions = { | ||
| /** | ||
| * The branch name, Use the same branch name as the local if not specified. | ||
| */ | ||
| branch?: string; | ||
| /** | ||
| * Whether to follow tags | ||
| * @default true | ||
| */ | ||
| followTags?: boolean; | ||
| /** | ||
| * The remote name, defaults to the upstream defined in the Git repository if not specified. | ||
| */ | ||
| remote?: string; | ||
| }; | ||
| type TagOptions = { | ||
| /** | ||
| * The template for tag name, same as @type {CommitOptions.template} | ||
| * if the template contains any "%s" placeholders, | ||
| * then they are replaced with the version number; | ||
| */ | ||
| template?: string; | ||
| }; //#endregion | ||
| export { DefineConfigOptions, ReleaseOptions }; |
+23
-25
@@ -1,2 +0,2 @@ | ||
| import { ReleaseOptions } from "./types.d-PDBL5zNm.js"; | ||
| import { ReleaseOptions } from "./types-D4PQyQEq.js"; | ||
| import { ProjectFile } from "cross-bump"; | ||
@@ -6,26 +6,24 @@ | ||
| declare class App { | ||
| #private; | ||
| private _currentVersion; | ||
| private _modifiedFiles; | ||
| private _nextVersion; | ||
| private _options; | ||
| private _projectFiles; | ||
| private _taskQueue; | ||
| private _taskStatus; | ||
| constructor(argv?: string[]); | ||
| checkGitClean(): void; | ||
| confirmReleaseOptions(): Promise<void>; | ||
| executeTasks(): Promise<void>; | ||
| resolveExecutes(): void; | ||
| resolveNextVersion(): Promise<void>; | ||
| resolveProjectFiles(): void; | ||
| resolveProjects(): void; | ||
| run(): Promise<void>; | ||
| get currentVersion(): string; | ||
| get nextVersion(): string; | ||
| get options(): ReleaseOptions; | ||
| get projectFiles(): ProjectFile[]; | ||
| } | ||
| //#endregion | ||
| #private; | ||
| private _currentVersion; | ||
| private _modifiedFiles; | ||
| private _nextVersion; | ||
| private _options; | ||
| private _projectFiles; | ||
| private _taskQueue; | ||
| private _taskStatus; | ||
| constructor(argv?: string[]); | ||
| checkGitClean(): void; | ||
| confirmReleaseOptions(): Promise<void>; | ||
| executeTasks(): Promise<void>; | ||
| resolveExecutes(): void; | ||
| resolveNextVersion(): Promise<void>; | ||
| resolveProjectFiles(): void; | ||
| resolveProjects(): void; | ||
| run(): Promise<void>; | ||
| get currentVersion(): string; | ||
| get nextVersion(): string; | ||
| get options(): ReleaseOptions; | ||
| get projectFiles(): ProjectFile[]; | ||
| } //#endregion | ||
| export { App as default }; |
+4
-9
@@ -153,3 +153,3 @@ import process from "node:process"; | ||
| //#region package.json | ||
| var version = "0.2.0"; | ||
| var version = "0.2.1"; | ||
@@ -327,10 +327,5 @@ //#endregion | ||
| const { cwd = process.cwd() } = options; | ||
| const args = [ | ||
| "diff-index", | ||
| "--quiet", | ||
| "HEAD", | ||
| "--" | ||
| ]; | ||
| const { failed, message: message$1 } = execa("git", args, { cwd }); | ||
| if (message$1?.includes("bad revision")) return true; | ||
| const args = ["status", "--porcelain"]; | ||
| const { all, failed } = execa("git", args, { cwd }); | ||
| if (all) return false; | ||
| return !failed; | ||
@@ -337,0 +332,0 @@ } |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { DefineConfigOptions } from "./types.d-PDBL5zNm.js"; | ||
| import { DefineConfigOptions } from "./types-D4PQyQEq.js"; | ||
@@ -3,0 +3,0 @@ //#region src/index.d.ts |
+4
-4
| { | ||
| "name": "cross-release-cli", | ||
| "type": "module", | ||
| "version": "0.2.1", | ||
| "version": "0.2.2", | ||
| "description": "command line app for cross language bump utility", | ||
@@ -34,5 +34,5 @@ "author": { | ||
| "cac": "^6.7.14", | ||
| "debug": "^4.4.0", | ||
| "debug": "^4.4.1", | ||
| "defu": "^6.1.4", | ||
| "execa": "^9.5.2", | ||
| "execa": "^9.5.3", | ||
| "is-unicode-supported": "^2.1.0", | ||
@@ -42,3 +42,3 @@ "picocolors": "^1.1.1", | ||
| "zod": "^3.24.4", | ||
| "cross-bump": "0.2.1" | ||
| "cross-bump": "0.2.2" | ||
| }, | ||
@@ -45,0 +45,0 @@ "devDependencies": { |
| import { ProjectCategory } from "cross-bump"; | ||
| import "cac"; | ||
| //#region src/types.d.ts | ||
| type DefineConfigOptions = Partial<Omit<ReleaseOptions, "config">>; | ||
| type ReleaseOptions = { | ||
| /** | ||
| * Indicates whether to commit the changes. | ||
| */ | ||
| commit: boolean | CommitOptions | ||
| /** | ||
| * Specifies the path to the configuration file. | ||
| */ | ||
| config: string | ||
| /** | ||
| * The directory path where the operation will be performed. | ||
| * @default process.cwd() | ||
| */ | ||
| cwd: string | ||
| /** | ||
| * Enable debug log | ||
| */ | ||
| debug: boolean | ||
| /** | ||
| * Whether the operation is being run in a dry-run mode (simulated execution). | ||
| */ | ||
| dry: boolean | ||
| /** | ||
| * The list of directories to exclude from the search. | ||
| * @default ["node_modules", ".git", "target", "build", "dist"] | ||
| */ | ||
| exclude: string[] | ||
| /** | ||
| * The command to execute before pushing. | ||
| */ | ||
| execute: string[] | ||
| /** | ||
| * Specifies the main project category. | ||
| */ | ||
| main: ProjectCategory | ||
| /** | ||
| * Whether push changes to remote and push options | ||
| * @default false | ||
| */ | ||
| push: boolean | PushOptions | ||
| /** | ||
| * Specifies whether the operation should be performed recursively. | ||
| * @default false | ||
| */ | ||
| recursive: boolean | ||
| /** | ||
| * Indicates whether to create a tag for a release. | ||
| * @default false | ||
| */ | ||
| tag: boolean | TagOptions | ||
| /** | ||
| * The version string associated with the command or operation. | ||
| */ | ||
| version: string | ||
| /** | ||
| * Whether all prompts requiring user input will be answered with "yes". | ||
| * @default false | ||
| */ | ||
| yes: boolean | ||
| }; | ||
| type CommitOptions = { | ||
| /** | ||
| * Whether to sign the commit. | ||
| * @default true | ||
| */ | ||
| signoff?: true | ||
| /** | ||
| * Whether to stage all files or only modified files. | ||
| * @default false | ||
| */ | ||
| stageAll?: boolean | ||
| /** | ||
| * The template string for the commit message. if the template contains any "%s" placeholders, | ||
| * then they are replaced with the version number; | ||
| * @default "chore: release v%s" | ||
| */ | ||
| template?: string | ||
| /** | ||
| * Whether to enable git pre-commit and commit-msg hook. | ||
| * @default true | ||
| */ | ||
| verify?: boolean | ||
| }; | ||
| type PushOptions = { | ||
| /** | ||
| * The branch name, Use the same branch name as the local if not specified. | ||
| */ | ||
| branch?: string | ||
| /** | ||
| * Whether to follow tags | ||
| * @default true | ||
| */ | ||
| followTags?: boolean | ||
| /** | ||
| * The remote name, defaults to the upstream defined in the Git repository if not specified. | ||
| */ | ||
| remote?: string | ||
| }; | ||
| type TagOptions = { | ||
| /** | ||
| * The template for tag name, same as @type {CommitOptions.template} | ||
| * if the template contains any "%s" placeholders, | ||
| * then they are replaced with the version number; | ||
| */ | ||
| template?: string | ||
| }; | ||
| //#endregion | ||
| export { DefineConfigOptions, ReleaseOptions }; |
30438
0.16%809
-0.98%+ Added
- Removed
Updated
Updated
Updated