@nemo-cli/git 0.0.1-beta.4

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["HELP_MESSAGE","formatBranch","HELP_MESSAGE","commitTypeOption","commitScopeOption","HELP_MESSAGE"],"sources":["../src/constants/index.ts","../src/utils.ts","../src/commands/branch.ts","../src/commands/checkout.ts","../src/commands/commit-options.ts","../src/commands/push.ts","../src/commands/commit.ts","../src/commands/diff.ts","../src/commands/list.ts","../src/commands/merge.ts","../src/commands/pull.ts","../src/constants/stash.ts","../src/commands/stash.ts","../src/index.ts"],"sourcesContent":["import { createHelpExample } from '@nemo-cli/shared'\n\nexport const HELP_MESSAGE = {\n main: createHelpExample('ng --version', 'ng --help', 'ng <command> [option]'),\n branch: createHelpExample('ng branch --version', 'ng branch --help', 'ng branch <command> [option]'),\n branchDelete: createHelpExample(\n 'ng branch delete --version',\n 'ng branch delete --help',\n 'ng branch delete <command> [option]'\n ),\n branchClean: createHelpExample('ng branch clean --version', 'ng branch clean --help'),\n}\n","import { spawn } from 'node:child_process'\nimport { unlinkSync, writeFileSync } from 'node:fs'\nimport { tmpdir } from 'node:os'\nimport { join } from 'node:path'\n\nimport {\n colors,\n createConfirm,\n createNote,\n createSpinner,\n getCurrentBranch,\n handleError,\n log,\n x,\n xASync,\n} from '@nemo-cli/shared'\n\nconst remotePrefix = /^origin\\//\n\n// creatordate committerdate authordate\nexport const getRemoteBranches = async (): Promise<{ branches: string[] }> => {\n const originBranches = await x('git', ['branch', '-r', '--sort=-committerdate'])\n const branches = originBranches.stdout\n .split('\\n')\n .filter((line) => line.trim() && !line.includes('->'))\n .map((line) => line.trim().replace(remotePrefix, ''))\n\n return { branches }\n}\n\nconst currentBranchPrefix = /^\\* /\nconst formatBranch = (branch?: string) => branch?.trim().replace(currentBranchPrefix, '')\n\nexport const getLocalBranches = async (): Promise<{ branches: string[]; currentBranch: string | undefined }> => {\n const originBranches = await x('git', ['branch', '--sort=-committerdate'])\n const list = originBranches.stdout.split('\\n')\n const currentBranch = list.find((line) => line.includes('*'))\n\n const branches = list\n .filter((line) => line.trim() && !line.includes('->'))\n .map((line) => line.trim().replace(currentBranchPrefix, ''))\n\n return {\n branches,\n currentBranch: formatBranch(currentBranch),\n }\n}\n\nexport const getRemoteOptions = async () => {\n const { branches } = await getRemoteBranches()\n const currentBranch = await getCurrentBranch()\n const options = branches.map((branch) => ({\n label: branch,\n value: branch,\n hint: branch === currentBranch ? 'current branch' : undefined,\n }))\n return {\n options,\n currentBranch,\n } as const\n}\n\nexport const getLocalOptions = async () => {\n const { branches, currentBranch } = await getLocalBranches()\n const options = branches.map((branch) => ({\n label: branch,\n value: branch,\n hint: branch === currentBranch ? 'current branch' : undefined,\n }))\n return {\n options,\n currentBranch,\n } as const\n}\n\nexport const getGitDiffFiles = async (branch: string) => {\n const [error, result] = await xASync('git', ['diff', branch, '--name-only'])\n if (error) return []\n return result.stdout.split('\\n').filter((line) => line.trim())\n}\n\n/**\n * 处理合并提交信息\n */\nconst handleMergeCommit = async () => {\n try {\n // 检查是否有待提交的合并\n const [error, result] = await xASync('git', ['status', '--porcelain'])\n if (error) return\n const statusOutput = result.stdout\n const hasUncommittedChanges = statusOutput.trim().length > 0\n\n if (!hasUncommittedChanges) {\n return\n }\n\n log.show('\\n📝 Merge commit detected. You can customize the commit message.', { type: 'info' })\n\n const shouldCustomize = await createConfirm({\n message: 'Do you want to customize the merge commit message?',\n })\n\n if (!shouldCustomize) {\n // 使用默认的合并提交信息\n await xASync('git', ['commit', '--no-edit'])\n log.show('Using default merge commit message.', { type: 'info' })\n return\n }\n\n // 获取默认的合并提交信息\n const [processError, processResult] = await xASync('git', ['log', '--format=%B', '-n', '1', 'HEAD'])\n if (processError) return\n const defaultMessage = processResult.stdout\n\n // 创建临时文件用于编辑\n const tempFile = join(tmpdir(), `merge-commit-${Date.now()}.txt`)\n writeFileSync(tempFile, defaultMessage)\n\n // 打开编辑器让用户编辑\n const editor = process.env.EDITOR || process.env.VISUAL || 'vim'\n\n log.show(`Opening ${editor} to edit commit message...`, { type: 'info' })\n log.show('Save and close the editor to continue, or close without saving to cancel.', { type: 'info' })\n\n const editProcess = spawn(editor, [tempFile], {\n stdio: 'inherit',\n shell: true,\n })\n\n const editExitCode = await new Promise<number>((resolve) => {\n editProcess.on('close', (code) => {\n resolve(code || 0)\n })\n })\n\n if (editExitCode !== 0) {\n log.show('Editor was closed without saving. Using default commit message.', { type: 'warn' })\n await xASync('git', ['commit', '--no-edit'])\n unlinkSync(tempFile)\n return\n }\n\n // 读取编辑后的提交信息\n const { readFileSync } = await import('node:fs')\n const editedMessage = readFileSync(tempFile, 'utf-8')\n unlinkSync(tempFile)\n\n if (!editedMessage.trim()) {\n log.show('Commit message is empty. Using default commit message.', { type: 'warn' })\n await xASync('git', ['commit', '--no-edit'])\n return\n }\n\n // 使用编辑后的提交信息进行提交\n const commitProcess = spawn('git', ['commit', '-F', '-'], {\n stdio: ['pipe', 'pipe', 'pipe'],\n shell: true,\n })\n\n commitProcess.stdin?.write(editedMessage)\n commitProcess.stdin?.end()\n\n const commitExitCode = await new Promise<number>((resolve) => {\n commitProcess.on('close', (code) => {\n resolve(code || 0)\n })\n })\n\n if (commitExitCode === 0) {\n log.show('Merge commit completed with custom message.', { type: 'success' })\n } else {\n throw new Error('Failed to create merge commit with custom message')\n }\n } catch (error) {\n log.show('Error handling merge commit:', { type: 'error' })\n log.error(error)\n\n // 如果出错,尝试使用默认提交\n try {\n await xASync('git', ['commit', '--no-edit'])\n log.show('Fallback: Using default merge commit message.', { type: 'info' })\n } catch (fallbackError) {\n log.show('Failed to create merge commit. Please handle manually.', { type: 'error' })\n throw fallbackError\n }\n }\n}\n\nexport type PullOptions = {\n rebase?: boolean\n}\n\nexport const handleGitPull = async (branch: string, options: PullOptions = {}) => {\n const { rebase = false } = options\n const modeText = rebase ? 'rebase' : 'merge'\n log.show(`Pulling from remote (${modeText} mode)...`, { type: 'step' })\n\n try {\n // 构建 git pull 命令参数\n const args = rebase ? ['pull', '--rebase', 'origin', branch] : ['pull', 'origin', branch]\n\n const [error, result] = await xASync('git', args, {\n nodeOptions: {\n stdio: 'inherit',\n },\n })\n if (error) {\n log.show(`Failed to pull from remote. Command exited with code ${error.message}.`, { type: 'error' })\n return\n }\n\n if (!rebase && (result.stdout.includes('Merge branch') || result.stdout.includes('Merge made by'))) {\n // 仅在 merge 模式下检查合并提交\n await handleMergeCommit()\n }\n\n log.show(`Successfully pulled from remote: ${colors.bgGreen(branch)} (${modeText})`, { type: 'success' })\n } catch (error) {\n log.error(error)\n return\n }\n}\nexport const _handleGitPull = async (branch: string, _stash = false) => {\n const spinner = createSpinner('Pulling from remote')\n try {\n // 使用 stdio: 'inherit' 来支持交互式操作\n const process = spawn('git', ['pull', 'origin', branch], {\n stdio: ['inherit', 'pipe', 'pipe'],\n shell: true,\n })\n\n let stdout = ''\n let stderr = ''\n\n process.stdout?.on('data', (data) => {\n const output = data.toString()\n stdout += output\n log.show(output)\n spinner.message(output)\n })\n\n process.stderr?.on('data', (data) => {\n const output = data.toString()\n stderr += output\n log.show(output, { type: 'warn' })\n })\n\n const exitCode = await new Promise<number>((resolve) => {\n process.on('close', (code) => {\n resolve(code || 0)\n })\n })\n\n if (exitCode) {\n log.show(`Failed to pull from remote. Command exited with code ${exitCode}.`, { type: 'error' })\n spinner.stop('Pull failed')\n throw new Error(stderr)\n }\n\n if (stdout.includes('Merge branch') || stdout.includes('Merge made by')) {\n // 检查是否有合并提交信息需要处理\n await handleMergeCommit()\n }\n\n spinner.stop(colors.green(`Successfully pulled from remote: ${colors.bgGreen(branch)}`))\n } catch (error) {\n spinner.stop('Pull failed')\n log.error(error)\n throw error\n }\n}\n\nconst createStashName = () => `NEMO-CLI-STASH:${Date.now()}`\nexport const handleGitStash = async (name: string = createStashName()): Promise<null | string> => {\n const [error, result] = await xASync('git', ['stash', 'save', name])\n if (error) {\n log.show(`Failed to stash changes. ${name}`, { type: 'error' })\n return null\n }\n if (result?.stdout.includes(name)) {\n log.show(`Successfully stashed changes. ${name}`, { type: 'success' })\n return name\n }\n log.show('No file changes.')\n return null\n}\n\nexport const handleGitStashCheck = async (): Promise<string[]> => {\n const [error, result] = await xASync('git', ['stash', 'list'])\n if (error) return []\n return result.stdout.split('\\n').filter((line) => line.trim())\n}\n\nexport const handleGitPop = async (branch: string) => {\n const stashes = await handleGitStashCheck()\n const stashName = stashes.find((stash) => stash.includes(branch))\n if (!stashName) {\n log.show(`No stash found for this branch: ${colors.bgRed(branch)}.`, { type: 'warn' })\n return\n }\n const name = stashName.split(':')[0]\n if (!name) {\n log.error(name, 'is not valid')\n return\n }\n const [error, result] = await xASync('git', ['stash', 'pop', name])\n if (!error) {\n createNote({ message: result.stdout, title: 'Successfully popped changes.' })\n }\n}\n\n/**\n * Check if a branch has been merged into remote main branch\n * @param branch - The branch name to check\n * @returns Promise<boolean> - true if merged, false if not merged\n */\nexport type BranchInfo = { isMerged: boolean; branch: string }\nexport const isBranchMergedToMain = async (branches: string[]): Promise<BranchInfo[]> => {\n const spinner = createSpinner('Fetching latest changes from remote')\n const [fetchError] = await xASync('git', ['fetch', 'origin', '--prune'])\n if (fetchError) {\n spinner.stop('Failed to fetch latest changes from remote. Proceeding with local information.')\n } else {\n spinner.stop('Fetching latest changes from remote Done')\n }\n\n // const [error, result] = await xASync('git', ['branch', '--merged', 'origin/main'])\n const remoteMainBranch = await getRemoteMainBranch()\n\n if (!remoteMainBranch) return []\n return Promise.all<BranchInfo>(\n branches.map(async (branch) => {\n const [error, result] = await xASync('git', ['log', `${remoteMainBranch}..${branch}`], { quiet: true })\n if (error) return { branch, isMerged: false }\n // const [_, result] = await xASync('git', ['merge-base', '--is-ancestor', branch, remoteMainBranch], {\n // quiet: true,\n // })\n return { branch, isMerged: !result?.stdout.trim() }\n })\n )\n}\n\nexport const getGitRoot = async () => {\n const [error, result] = await xASync('git', ['rev-parse', '--show-toplevel'])\n if (error) return ''\n return result.stdout.trim()\n}\nexport const checkGitRepository = async () => {\n try {\n const [error, result] = await xASync('git', ['rev-parse', '--is-inside-work-tree'], { quiet: true })\n if (error) return false\n const output = result.stdout.trim()\n return output === 'true'\n } catch (err) {\n return false\n }\n}\n\nexport const getRemoteMainBranch = async () => {\n const [error, result] = await xASync('git', ['symbolic-ref', 'refs/remotes/origin/HEAD'])\n if (error) return null\n const branches = result.stdout.trim().split('/')\n return branches.splice(2).join('/')\n}\n\nexport const guessLocalMainBranch = async () => {\n try {\n // 获取所有本地分支列表\n const [error, result] = await xASync('git', ['branch', '--list'])\n if (error) return null\n const branches = result.stdout.trim().split('\\n')\n if (branches.includes('main')) {\n return 'main'\n }\n if (branches.includes('master')) {\n return 'master'\n }\n return null\n } catch (error) {\n handleError(error, 'Failed to guess local main branch')\n return null\n }\n}\n\nexport const getBranchCommitTime = async (branch: string) => {\n const [_, result] = await xASync('git', ['show', '--format=%at', `${branch}`])\n return result?.stdout.split('\\n')[0] ?? Date.now()\n}\n","import {\n type Command,\n colors,\n createCheckbox,\n createConfirm,\n createNote,\n createSelect,\n createSpinner,\n log,\n type Result,\n x,\n} from '@nemo-cli/shared'\nimport { ErrorMessage, Message } from '@nemo-cli/ui'\nimport { HELP_MESSAGE } from '../constants'\nimport {\n type BranchInfo,\n getBranchCommitTime,\n getLocalBranches,\n getRemoteBranches,\n isBranchMergedToMain,\n} from '../utils'\n\nconst formatTime = (time: number) => new Date(time * 1000).toLocaleString()\nconst formatBranch = (branch: string) => (branch.startsWith('origin/') ? branch.slice(7) : branch)\n\nconst handleDelete = async (branch: BranchInfo, { isRemote }: { isRemote: boolean }) => {\n if (!branch.isMerged) {\n const confirm = await createConfirm({\n message: `Branch ${branch.branch} is not merged to main. Are you sure you want to delete it?`,\n })\n if (!confirm) return\n }\n\n const spinner = createSpinner(`Deleting branch ${branch.branch}...`)\n const process: Result = x(\n 'git',\n isRemote ? ['push', 'origin', '--delete', formatBranch(branch.branch)] : ['branch', '-D', branch.branch]\n )\n\n for await (const line of process) {\n spinner.message(line)\n }\n\n const code = process.exitCode\n if (code) {\n spinner.stop(`Failed to delete branch ${branch}. Command exited with code ${process.exitCode}.`)\n } else {\n spinner.stop(`Successfully deleted branch ${branch.branch}`)\n }\n}\n\nconst excludeBranch = ['main', 'master', 'develop']\nconst oneDay = 60 * 60 * 24 // 秒\nexport function branchCommand(command: Command) {\n const subCommand = command\n .command('branch')\n .description('Git branch management')\n .addHelpText('after', HELP_MESSAGE.branch)\n\n subCommand\n .command('clean')\n .description('Git branch clean merged to main')\n .addHelpText('after', HELP_MESSAGE.branchClean)\n .action(async () => {\n // 1. 选择时间范围: 1个月, 1年, 3个月\n const timeRange = await createSelect({\n message: 'Select the time range',\n options: [\n { label: 'all', value: 0 },\n { label: '1 month', value: oneDay * 30 },\n { label: '1 year', value: oneDay * 365 },\n { label: '3 months', value: oneDay * 90 },\n ],\n })\n // 2. 获得所有已经合并的分支\n const { branches } = await getLocalBranches()\n const mergeInfoList: BranchInfo[] = await isBranchMergedToMain(\n branches.filter((branch) => !excludeBranch.includes(branch))\n )\n // 3. 获取分支最后提交时间, 并过滤掉时间范围内的分支\n const mergedBranches = mergeInfoList.filter((branch) => branch.isMerged).map((branch) => branch.branch)\n\n const lastCommitBranches = await Promise.all(\n mergedBranches.map(async (branch) => {\n const time = await getBranchCommitTime(branch)\n return {\n branch,\n lastCommitTime: Number(time),\n }\n })\n )\n const now = Date.now() / 1000\n const deleteBranches = lastCommitBranches.filter((branch) => now - branch.lastCommitTime >= timeRange)\n if (deleteBranches.length === 0) {\n Message({ text: 'No branches to delete. Please check your git repository.' })\n return\n }\n // 4. 创建提示\n createNote({\n message: `Found ${deleteBranches.length} branches, will delete\\n${deleteBranches.map((branch) => colors.red(branch.branch)).join('\\n')}`,\n title: 'Delete Branches',\n })\n // 5. 确认删除\n const confirm = await createConfirm({ message: 'Are you sure you want to delete these branches?' })\n if (!confirm) return\n // 6. 删除分支\n await Promise.all(\n deleteBranches.map((branch) => handleDelete({ branch: branch.branch, isMerged: true }, { isRemote: false }))\n )\n Message({ text: 'Successfully deleted branches' })\n })\n\n subCommand\n .command('delete')\n .description('Git branch delete')\n .addHelpText('after', HELP_MESSAGE.branchDelete)\n .option('-r, --remote', 'remote branch')\n .action(async (options: { remote?: boolean }) => {\n const { branches } = options.remote ? await getRemoteBranches() : await getLocalBranches()\n if (!branches || branches.length === 0) {\n ErrorMessage({ text: 'No branches found. Please check your git repository.' })\n return\n }\n const mergeInfoList: BranchInfo[] = await isBranchMergedToMain(\n (options.remote ? branches.map((branch) => `origin/${branch}`) : branches).filter(\n (branch) => !excludeBranch.includes(branch)\n )\n )\n\n if (mergeInfoList.length === 0) {\n ErrorMessage({ text: 'No branches to delete. Please check your git repository.' })\n return\n }\n\n const enhancedOptions = await Promise.all(\n mergeInfoList.map(async (branch) => {\n const lastCommitTime = await getBranchCommitTime(branch.branch)\n return {\n label: `${branch.branch} ${branch.isMerged ? colors.green('(merged)') : colors.yellow('(not merged)')}`,\n value: {\n lastCommitTime,\n branch: branch.branch,\n isMerged: branch.isMerged,\n },\n hint: `last commit: ${formatTime(Number(lastCommitTime))}`,\n }\n })\n )\n\n const deleteBranches = await createCheckbox({\n message: 'Select the branch to delete',\n options: enhancedOptions,\n })\n\n if (!deleteBranches.length) {\n log.error('No branch selected. Aborting delete operation.')\n return\n }\n await Promise.all(\n deleteBranches.map((branch) =>\n handleDelete({ branch: branch.branch, isMerged: true }, { isRemote: options.remote ?? false })\n )\n )\n Message({ text: 'Successfully deleted branches' })\n })\n}\n","import type { Command } from '@nemo-cli/shared'\nimport {\n colors,\n createConfirm,\n createInput,\n createOptions,\n createSelect,\n isEmpty,\n isString,\n log,\n x,\n} from '@nemo-cli/shared'\nimport { getLocalOptions, getRemoteOptions, handleGitPop, handleGitStash } from '../utils'\n\nconst handleCheckout = async (\n branch: string,\n { isNew = false, isRemote = false }: { isNew?: boolean; isRemote?: boolean } = {}\n) => {\n const args = ['checkout']\n\n if (isNew || isRemote) {\n args.push('-b')\n }\n\n args.push(branch)\n\n if (isRemote) {\n args.push(`origin/${branch}`)\n }\n\n const stashName = await handleGitStash(branch)\n\n const process = x('git', args)\n\n for await (const line of process) {\n log.show(line)\n }\n\n const { exitCode, stderr } = await process\n if (exitCode) {\n log.show(`Failed to checkout branch ${branch}. Command exited with code ${exitCode}.`, { type: 'error' })\n log.show(stderr, { type: 'error' })\n } else {\n log.show(`Successfully checked out branch ${branch}.`, { type: 'success' })\n }\n\n stashName && handleGitPop(stashName)\n}\n\nexport function checkoutCommand(command: Command) {\n command\n .command('checkout')\n .alias('co')\n .option('-l, --local', 'Checkout a local branch', true)\n .option('-r, --remote', 'Checkout a remote branch')\n .option('-b, --branch [branch]', 'Create and checkout a new branch')\n .description('Checkout a branch')\n .action(async (params: { local?: boolean; remote?: boolean; branch?: string | true }) => {\n let isLocal = params.local && !params.remote\n const branch = params.branch\n if (branch) {\n if (isString(branch)) {\n handleCheckout(branch, { isNew: true })\n return\n }\n const branchType = await createSelect({\n message: 'Enter the new branch name:',\n options: createOptions(['feature/PRIME-', 'feature/', 'bugfix/']),\n })\n const branchName = await createInput({\n message: 'Enter the new branch name:',\n validate: (value) => {\n if (!value?.trim()) return 'Branch name is required'\n if (value.length > 15) return 'Branch name must be less than 15 characters'\n },\n })\n handleCheckout(`${branchType}${branchName}`, { isNew: true })\n return\n }\n\n if (isEmpty(params)) {\n isLocal = await createSelect({\n message: 'Select the branch type',\n options: [\n { label: 'Remote', value: false },\n { label: 'Local', value: true },\n ],\n initialValue: true,\n })\n }\n\n if (isLocal) {\n const { options } = await getLocalOptions()\n const selectedBranch = await createSelect({\n message: `Select the ${colors.bgGreen(' local ')} branch to checkout`,\n options,\n })\n handleCheckout(selectedBranch)\n } else {\n const { options } = await getRemoteOptions()\n const selectedBranch = await createSelect({\n message: `Select the ${colors.bgYellow(' remote ')} branch to checkout`,\n options,\n })\n\n const check = await createConfirm({\n message: `Do you want to checkout ${colors.bgRed(selectedBranch)}?`,\n })\n\n if (check) handleCheckout(selectedBranch, { isRemote: true })\n }\n })\n}\n","const commitScopeOptions = [\n {\n value: 'app',\n label: 'app',\n },\n {\n value: 'shared',\n label: 'shared',\n },\n {\n value: 'server',\n label: 'server',\n },\n {\n value: 'tools',\n label: 'tools',\n },\n {\n value: '',\n label: 'none',\n },\n]\nconst commitTypeOptions = [\n {\n value: 'feat',\n label: 'feat',\n hint: 'A new feature',\n emoji: '🌟',\n trailer: 'Changelog: feature',\n },\n {\n value: 'fix',\n label: 'fix',\n hint: 'A bug fix',\n emoji: '🐛',\n trailer: 'Changelog: fix',\n },\n {\n value: 'docs',\n label: 'docs',\n hint: 'Documentation only changes',\n emoji: '📚',\n trailer: 'Changelog: documentation',\n },\n {\n value: 'refactor',\n label: 'refactor',\n hint: 'A code change that neither fixes a bug nor adds a feature',\n emoji: '🔨',\n trailer: 'Changelog: refactor',\n },\n {\n value: 'perf',\n label: 'perf',\n hint: 'A code change that improves performance',\n emoji: '🚀',\n trailer: 'Changelog: performance',\n },\n {\n value: 'test',\n label: 'test',\n hint: 'Adding missing tests or correcting existing tests',\n emoji: '🚨',\n trailer: 'Changelog: test',\n },\n {\n value: 'build',\n label: 'build',\n hint: 'Changes that affect the build system or external dependencies',\n emoji: '🚧',\n trailer: 'Changelog: build',\n },\n {\n value: 'ci',\n label: 'ci',\n hint: 'Changes to our CI configuration files and scripts',\n emoji: '🤖',\n trailer: 'Changelog: ci',\n },\n {\n value: 'chore',\n label: 'chore',\n hint: 'Other changes that do not modify src or test files',\n emoji: '🧹',\n trailer: 'Changelog: chore',\n },\n {\n value: 'revert',\n label: 'revert',\n hint: 'Revert a previous commit',\n emoji: '🔙',\n trailer: 'Changelog: revert',\n },\n {\n value: '',\n label: 'none',\n },\n]\nexport const commitOptions = {\n check_status: true,\n commit_type: {\n enable: true,\n initial_value: 'feat',\n max_items: 20,\n infer_type_from_branch: true,\n append_emoji_to_label: false,\n append_emoji_to_commit: false,\n emoji_commit_position: 'Start',\n options: commitTypeOptions,\n },\n commit_scope: {\n enable: true,\n custom_scope: false,\n max_items: 20,\n initial_value: 'app',\n options: commitScopeOptions,\n },\n check_ticket: {\n infer_ticket: true,\n confirm_ticket: true,\n add_to_title: true,\n append_hashtag: false,\n prepend_hashtag: 'Never',\n surround: '',\n title_position: 'start',\n },\n commit_title: {\n max_size: 70,\n },\n commit_body: {\n enable: true,\n required: false,\n },\n commit_footer: {\n enable: true,\n initial_value: [],\n options: ['closes', 'trailer', 'breaking-change', 'deprecated', 'custom'],\n },\n breaking_change: {\n add_exclamation_to_title: false,\n },\n cache_last_value: true,\n confirm_with_editor: false,\n confirm_commit: true,\n print_commit_output: true,\n branch_pre_commands: [],\n branch_post_commands: [],\n worktree_pre_commands: [],\n worktree_post_commands: [],\n branch_user: {\n enable: true,\n required: false,\n separator: '/',\n },\n branch_type: {\n enable: true,\n separator: '/',\n },\n branch_version: {\n enable: false,\n required: false,\n separator: '/',\n },\n branch_ticket: {\n enable: true,\n required: false,\n separator: '-',\n },\n branch_description: {\n max_length: 70,\n separator: '',\n },\n branch_action_default: 'branch',\n branch_order: ['user', 'version', 'type', 'ticket', 'description'],\n enable_worktrees: true,\n overrides: {},\n}\n\nexport const commitlintConfig = {\n extends: ['@commitlint/config-conventional'],\n rules: {\n 'subject-empty': [2, 'never'], // subject不能为空\n 'type-empty': [2, 'never'], // type不能为空\n 'type-enum': [\n 2,\n 'always',\n ['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore', 'revert', 'wip', 'release'],\n ],\n 'scope-empty': [1, 'always'], // scop 可选\n 'scope-enum': [1, 'always', ['app', 'shared', 'server', 'tools', '']],\n },\n}\n\nexport type CommitlintConfigType = typeof commitlintConfig\nexport const mergeCommitTypeEnumOptions = (options: string[]) => {\n // 与 commitTypeOptions 进行对比,如果 options 中存在,则返回 options 中的 value 和 label\n return options.map((option) => {\n const commitTypeOption = commitTypeOptions.find((commitTypeOption) => commitTypeOption.value === option)\n return {\n value: commitTypeOption?.value ?? option,\n label: commitTypeOption?.label ?? option,\n hint: commitTypeOption?.hint,\n emoji: commitTypeOption?.emoji,\n trailer: commitTypeOption?.trailer,\n }\n })\n}\n\nexport const mergeCommitScopeEnumOptions = (options: string[]) => {\n // 与 commitScopeOptions 进行对比,如果 options 中存在,则返回 options 中的 value 和 label\n const result = options.includes('none') ? options : options.concat('none')\n return result.map((option) => {\n const commitScopeOption = commitScopeOptions.find((commitScopeOption) => commitScopeOption.label === option)\n return {\n value: commitScopeOption?.value ?? option,\n label: commitScopeOption?.label ?? option,\n }\n })\n}\n","import type { Command } from '@nemo-cli/shared'\nimport { colors, createConfirm, createSelect, createSpinner, getCurrentBranch, log, x } from '@nemo-cli/shared'\nimport { BigText } from '@nemo-cli/ui'\nimport { getRemoteOptions } from '../utils'\n\nconst handlePush = async (branch: string) => {\n const spinner = createSpinner(`Pushing branch ${branch} to remote...`)\n try {\n const process = x('git', ['push', 'origin', branch])\n for await (const line of process) {\n spinner.message(line)\n }\n\n const code = process.exitCode\n if (code) {\n throw new Error(`Failed code ${code}`)\n }\n spinner.stop(colors.green(`Successfully pushed branch ${colors.bgGreen(branch)} to remote.`))\n } catch (error) {\n spinner.stop()\n BigText({ text: `Failed to push branch ${branch}.` })\n log.error(error)\n }\n}\n\nexport function pushCommand(command: Command) {\n command\n .command('push')\n .alias('ps')\n .description('Push current branch to remote')\n .action(async () => {\n await pushInteractive()\n })\n}\n\nexport const pushInteractive = async () => {\n const currentBranch = await getCurrentBranch()\n if (!currentBranch) {\n log.error('No branch selected. Aborting push operation.')\n return\n }\n const check = await createConfirm({\n message: `Do you want to push ${colors.bgGreen(currentBranch)} to remote?`,\n })\n\n if (check) {\n await handlePush(currentBranch)\n return\n }\n\n const { options } = await getRemoteOptions()\n const selectedBranch = await createSelect({\n message: 'Select the branch to push',\n options,\n initialValue: 'main',\n })\n await handlePush(selectedBranch)\n}\n","import type { LoadConfigResult } from 'unconfig'\n\nimport type { Command } from '@nemo-cli/shared'\nimport {\n addFiles,\n colors,\n createCheckbox,\n createConfirm,\n createInput,\n createNote,\n createOptions,\n createSelect,\n createSpinner,\n exit,\n getCurrentBranch,\n getGitStatus,\n intro,\n loadConfig,\n log,\n outro,\n xASync,\n} from '@nemo-cli/shared'\nimport { ErrorMessage } from '@nemo-cli/ui'\nimport {\n type CommitlintConfigType,\n commitlintConfig,\n mergeCommitScopeEnumOptions,\n mergeCommitTypeEnumOptions,\n} from './commit-options'\nimport { pushInteractive } from './push'\n\nconst lintHandle = async () => {\n const [error, result] = await xASync('lint-staged')\n if (error?.message === 'spawn lint-staged ENOENT') return true\n if (error) return false\n return true\n}\nconst handleCommit = async (message: string) => {\n const spinner = createSpinner('Committing...')\n const [error, _result] = await xASync('git', ['commit', '-m', message])\n if (error) {\n spinner.stop('Failed to commit')\n } else {\n spinner.stop('Committed')\n }\n}\nconst handleLint = async () => {\n const spinner = createSpinner('run lint-staged linting...')\n const lintResult = await lintHandle()\n if (!lintResult) {\n const confirm = await createConfirm({\n message: 'Lint failed. Do you want to continue?',\n initialValue: false,\n })\n !confirm && exit(0)\n }\n spinner.stop('lint-staged done')\n}\n\nexport const commitCommand = (command: Command) => {\n command\n .command('commit')\n .description('Commit a message')\n .action(async () => {\n console.clear()\n const title = colors.bgRed(` ${await getCurrentBranch()} `)\n intro(`${colors.bgCyan(' Current Branch: ')} ${title}`)\n\n // 1. 获取Git状态并展示工作区和暂存区文件\n const { staged, unstaged } = await getGitStatus()\n\n if (staged.length === 0 && unstaged.length === 0) {\n // 如果没有任何文件变更,提示用户\n ErrorMessage({ text: 'No changes detected. Nothing to commit.' })\n exit(0)\n }\n\n // 创建选项对象,用于分组多选\n\n log.show(`Changes to be committed:\\n${staged.map((text) => colors.green(text)).join('\\n')}`, { type: 'success' })\n const selectedStaged = staged\n\n if (unstaged.length > 0) {\n // 工作区文件组(可选择)\n const selectedFiles = await createCheckbox({\n message: 'Select files to stage for commit (optional):',\n options: createOptions(unstaged),\n required: false,\n })\n\n selectedStaged.push(...selectedFiles)\n\n if (selectedFiles.length > 0) {\n // 2. 将选择的工作区文件添加到暂存区\n await addFiles(selectedFiles)\n createNote({\n message: `Added ${selectedFiles.length} unstaged file(s) to staging area.\\n${selectedFiles.map((file) => colors.green(file)).join('\\n')}`,\n title: 'Add Files',\n })\n }\n }\n\n if (selectedStaged.length === 0) {\n ErrorMessage({ text: 'No staged files. Nothing to commit.' })\n exit(0)\n }\n\n await handleLint()\n\n const options: LoadConfigResult<CommitlintConfigType> = await loadConfig({\n sources: [\n {\n files: 'commitlint.config',\n extensions: ['js', 'ts', 'cjs', 'mjs', 'json', ''],\n },\n ],\n })\n\n //3. 获取当前cwd文件夹下 commitlint 文件中的 type-enum 进行选择\n const commitType = await createSelect({\n message: 'Select type:',\n options: mergeCommitTypeEnumOptions((options.config ?? commitlintConfig)!.rules['type-enum'][2] as string[]),\n })\n // 4. 获取当前cwd文件夹下 commitlint 文件中的 scope-enum 进行选择\n const commitScope = await createSelect({\n message: 'Select scope:',\n options: mergeCommitScopeEnumOptions((options.config ?? commitlintConfig)!.rules['scope-enum'][2] as string[]),\n })\n //5. 用户输入 Write a brief title describing the commit , 限制 80个字符\n const commitTitle = await createInput({\n message: 'Write a brief title describing the commit:',\n validate(value) {\n if (!value?.trim()) return 'Title is required'\n if (value.length > 80) return 'Title must be less than 80 characters'\n },\n })\n //6. 用户输入 Write a detailed description of the changes (optional), 无字数限制\n const commitBody = await createInput({\n message: 'Write a detailed description of the changes (optional):',\n })\n const ticket = await getTicket()\n\n const scopeMessage = commitScope ? `(${commitScope})` : ''\n const message = `${commitType}${scopeMessage}: ${ticket} ${commitTitle}\\n${commitBody}`\n const previewMessage = `${colors.blue(commitType)}${colors.green(scopeMessage)}: ${colors.redBright(ticket)} ${commitTitle}\\n${commitBody}`\n createNote({ message: previewMessage, title: 'Commit Message' })\n\n const confirm = await createConfirm({ message: 'Are you sure you want to commit?' })\n\n // 7. 发送 git commit 命令\n if (!confirm) return\n await handleCommit(message)\n\n // 8. 发送 git push 命令\n const confirmPush = await createConfirm({ message: 'Do you want to push to remote?' })\n confirmPush && (await pushInteractive())\n outro(colors.bgGreen(' Git Commit Success '))\n })\n}\n\nexport const REGEX_SLASH_TAG = new RegExp(/\\/(\\w+-\\d+)/)\nexport const REGEX_START_TAG = new RegExp(/^(\\w+-\\d+)/)\nexport const REGEX_START_UND = new RegExp(/^([A-Z]+-[[a-zA-Z\\]\\d]+)_/)\nexport const REGEX_SLASH_UND = new RegExp(/\\/([A-Z]+-[[a-zA-Z\\]\\d]+)_/)\nexport const REGEX_SLASH_NUM = new RegExp(/\\/(\\d+)/)\nexport const REGEX_START_NUM = new RegExp(/^(\\d+)/)\n\nconst getTicket = async () => {\n const branch = await getCurrentBranch()\n const chain = [REGEX_START_UND, REGEX_SLASH_UND, REGEX_SLASH_TAG, REGEX_SLASH_NUM, REGEX_START_TAG, REGEX_START_NUM]\n for (const regex of chain) {\n const match = branch.match(regex)\n if (match) return match[1]\n }\n return branch\n}\n","import { type Command, createOptions, createSelect, getCurrentBranch, log, type Result, x } from '@nemo-cli/shared'\nimport { getLocalBranches, getRemoteBranches } from '../utils'\n\nconst handleDiff = async (branch: string, { isLocal }: { isLocal: boolean }) => {\n console.log('🚀 : handleDiff : branch:', branch, isLocal)\n\n // Get current branch for comparison\n const currentBranch = await getCurrentBranch()\n if (!currentBranch) {\n log.error('Could not determine current branch')\n return\n }\n\n // If selected branch is the same as current, show diff with working directory\n const diffArgs = branch === currentBranch ? ['diff'] : ['diff', `${branch}...${currentBranch}`]\n\n log.show(\n `Showing diff between ${branch === currentBranch ? 'working directory and HEAD' : `${branch} and ${currentBranch}`}`\n )\n\n const process: Result = x('git', diffArgs)\n\n let hasOutput = false\n for await (const line of process) {\n hasOutput = true\n log.show(line)\n }\n\n const { exitCode, stderr } = await process\n\n if (exitCode) {\n log.error(`Failed to diff. Command exited with code ${exitCode}.`)\n if (stderr) {\n log.error(stderr)\n }\n } else if (!hasOutput) {\n log.show('No differences found.', { type: 'info' })\n }\n}\n\nexport function diffCommand(command: Command) {\n command\n .command('diff')\n .alias('di')\n .description('Show differences between branches or working directory')\n .option('-l, --local', 'Diff local branch', true)\n .option('-r, --remote', 'Diff remote branch')\n .action(async (options: { local?: boolean; remote?: boolean }) => {\n const { branches } = options.remote ? await getRemoteBranches() : await getLocalBranches()\n if (!branches || branches.length === 0) {\n log.error('No branches found. Please check your git repository.')\n return\n }\n const selectedBranch = await createSelect({\n message: 'Select the branch to diff',\n options: createOptions(branches),\n })\n if (!selectedBranch) {\n log.error('No branch selected. Aborting diff operation.')\n return\n }\n await handleDiff(selectedBranch, { isLocal: !options.remote })\n })\n}\n","import { type Command, colors, log } from '@nemo-cli/shared'\n\nimport { getLocalBranches, getRemoteBranches } from '../utils'\n\nexport function listCommand(command: Command) {\n command\n .command('list')\n .alias('ls')\n .description('List git branches')\n .option('-l, --local', 'List local branches')\n .option('-r, --remote', 'List remote branches')\n .option('-a, --all', 'List all branches', true)\n .action(async (options: { local?: boolean; remote?: boolean; all?: boolean }) => {\n if (options.all) {\n const { branches: localBranches, currentBranch } = await getLocalBranches()\n const { branches: remoteBranches } = await getRemoteBranches()\n if (!localBranches.length && !remoteBranches.length) {\n log.error('No branches found. Please check your git repository.')\n return\n }\n\n log.show(`Local ${localBranches.length} branches`, { symbol: '🔖', colors: colors.bgGreen })\n for (const branch of localBranches) {\n if (branch === currentBranch) {\n log.show(`${branch} (current)`, { type: 'info' })\n } else {\n log.show(branch, { type: 'step' })\n }\n }\n log.show(`Remote ${remoteBranches.length} branches`, { symbol: '🔖', colors: colors.bgYellow })\n for (const branch of remoteBranches) {\n if (branch === currentBranch) {\n log.show(`${branch} (current)`, { type: 'info' })\n } else {\n log.show(branch, { type: 'step' })\n }\n }\n } else if (options.local) {\n const { branches } = await getLocalBranches()\n if (!branches || branches.length === 0) {\n log.error('No local branches found. Please check your git repository.')\n return\n }\n log.info(`Found ${branches.length} local branches:`)\n for (const branch of branches) {\n log.info(branch)\n }\n } else {\n const { branches } = await getRemoteBranches()\n if (!branches || branches.length === 0) {\n log.error('No remote branches found. Please check your git repository.')\n return\n }\n log.info(`Found ${branches.length} remote branches:`)\n for (const branch of branches) {\n log.info(branch)\n }\n }\n })\n}\n","import type { Command } from '@nemo-cli/shared'\nimport { colors, createConfirm, createSearch, createSelect, createSpinner, isEmpty, xASync } from '@nemo-cli/shared'\n\nimport { getLocalOptions, getRemoteOptions, handleGitPop, handleGitStash } from '../utils'\n\nconst handleMerge = async (branch: string) => {\n const spinner = createSpinner(`Merging branch ${branch}...`)\n const args = ['merge', branch]\n\n const stashName = await handleGitStash()\n\n // 使用 stdio: 'inherit' 来支持交互式合并确认\n const [error] = await xASync('git', args, {\n nodeOptions: {\n stdio: 'inherit',\n },\n })\n if (error) return\n\n spinner.stop(`Successfully merged branch ${branch}.`)\n\n stashName && handleGitPop(stashName)\n}\n\nexport function mergeCommand(command: Command) {\n command\n .command('merge')\n .alias('mg')\n .argument('[branch]', 'The branch to merge')\n .option('-l, --local', 'Merge a local branch')\n .option('-r, --remote', 'Merge a remote branch')\n .option('-b, --branch <branch>', 'Create and merge a new branch')\n .description('Merge a branch')\n .action(async (branch, params: { local?: boolean; remote?: boolean }) => {\n let isLocal = params.local\n\n if (branch) {\n handleMerge(branch)\n return\n }\n\n if (isEmpty(params)) {\n isLocal = await createSelect({\n message: 'Select the branch type',\n options: [\n { label: 'Remote', value: false },\n { label: 'Local', value: true },\n ],\n initialValue: false,\n })\n }\n\n if (isLocal) {\n const { options } = await getLocalOptions()\n const selectedBranch = await createSearch({\n message: 'Select the branch to merge',\n options,\n })\n handleMerge(selectedBranch)\n } else {\n const { options } = await getRemoteOptions()\n const selectedBranch = await createSearch({\n message: 'Select the branch to merge',\n options,\n })\n\n const check = await createConfirm({\n message: `Do you want to merge ${colors.bgRed(selectedBranch)}?`,\n })\n\n if (check) handleMerge(selectedBranch)\n }\n })\n}\n","import { type Command, createSelect, log } from '@nemo-cli/shared'\nimport { getRemoteOptions, handleGitPop, handleGitPull, handleGitStash } from '../utils'\n\nexport function pullCommand(command: Command) {\n command\n .command('pull')\n .alias('pl')\n .description('Pull git branch')\n .option('-r, --rebase', 'Use rebase mode instead of merge')\n .option('-m, --merge', 'Use merge mode (default)')\n .action(async (options: { rebase?: boolean; merge?: boolean }) => {\n const { options: branchOptions, currentBranch } = await getRemoteOptions()\n if (!branchOptions.length) {\n log.error('No branches found. Please check your git repository.')\n return\n }\n\n const selectedBranch = await createSelect({\n message: 'Select the branch to pull',\n options: branchOptions,\n initialValue: currentBranch,\n })\n if (!selectedBranch) {\n log.error('No branch selected. Aborting pull operation.')\n return\n }\n\n // 确定 pull 模式:如果命令行指定了 --rebase 或 --merge,直接使用;否则询问用户\n let useRebase = options.rebase === true\n\n if (!options.rebase && !options.merge) {\n const pullMode = await createSelect({\n message: 'Select pull mode',\n options: [\n { label: 'Merge (default)', value: 'merge', hint: 'git pull origin <branch>' },\n { label: 'Rebase', value: 'rebase', hint: 'git pull --rebase origin <branch>' },\n ],\n initialValue: 'merge',\n })\n useRebase = pullMode === 'rebase'\n }\n\n const stashName = await handleGitStash()\n\n await handleGitPull(selectedBranch, { rebase: useRebase })\n\n stashName && handleGitPop(stashName)\n })\n}\n","import { createHelpExample } from '@nemo-cli/shared'\n\nexport const HELP_MESSAGE = {\n main: createHelpExample(\n 'ng stash',\n 'ng stash save \"work in progress\"',\n 'ng stash ls',\n 'ng stash pop',\n 'ng stash drop'\n ),\n save: createHelpExample('ng stash save \"work in progress\"'),\n list: createHelpExample('ng stash ls'),\n pop: createHelpExample('ng stash pop'),\n drop: createHelpExample('ng stash drop'),\n}\n\nexport const ERROR_MESSAGE = {\n notRootWorkspace: \"It's not workspace root directory, Please open this command in the workspace root directory\",\n}\n","import type { Command } from '@nemo-cli/shared'\nimport { colors, createCheckbox, createOptions, exit, log, xASync } from '@nemo-cli/shared'\nimport { HELP_MESSAGE } from '../constants/stash'\nimport { handleGitStash, handleGitStashCheck } from '../utils'\n\nenum StashCommand {\n POP = 'pop',\n LIST = 'list',\n SAVE = 'save',\n DROP = 'drop',\n}\n\nconst handleCheck =\n <T extends (stashes: string[]) => unknown>(callback: T) =>\n async () => {\n const stashes = await handleGitStashCheck()\n if (stashes.length === 0) {\n log.show('No stash found.', { type: 'error' })\n return\n }\n return callback(stashes)\n }\n\n/**\n * 获取 stash 中的文件列表\n * @param stashRef - stash 引用,如 \"stash@{0}\"\n */\nconst getStashFiles = async (stashRef: string): Promise<string[]> => {\n const [error, result] = await xASync('git', ['stash', 'show', stashRef, '--name-only'], { quiet: true })\n if (error) return []\n return result.stdout.split('\\n').filter((line) => line.trim())\n}\n\n/**\n * 从 stash 条目中提取 stash 引用\n * @param stashEntry - 完整的 stash 条目,如 \"stash@{0}: On main: message\"\n */\nconst extractStashRef = (stashEntry: string): string => {\n const match = stashEntry.match(/^(stash@\\{\\d+\\})/)\n if (match?.[1]) return match[1]\n return stashEntry.split(':')[0] ?? stashEntry\n}\n\nconst handlePop = handleCheck(async (stashes: string[]) => {\n const selectedStashes = await createCheckbox({\n message: 'Select the stash to pop',\n options: stashes.map((stash) => ({ label: stash, value: stash })),\n })\n for await (const stash of selectedStashes) {\n const stashRef = extractStashRef(stash)\n const [error] = await xASync('git', ['stash', 'pop', stashRef])\n if (error) {\n log.show('Failed to pop stash.', { type: 'error' })\n } else {\n log.show('Successfully popped changes.', { type: 'success' })\n }\n }\n})\n\nconst handleList = handleCheck(async (stashes: string[]) => {\n log.show(`\\n${colors.bold(`📦 Found ${stashes.length} stash(es)`)}\\n`)\n\n for await (const stash of stashes) {\n const stashRef = extractStashRef(stash)\n const files = await getStashFiles(stashRef)\n\n // 显示 stash 标题\n log.show(colors.cyan(`━━━ ${stash} ━━━`))\n\n if (files.length > 0) {\n log.show(colors.dim(` ${files.length} file(s) changed:`))\n for (const file of files) {\n log.show(colors.yellow(` • ${file}`))\n }\n } else {\n log.show(colors.dim(' (no files)'))\n }\n log.show('') // 空行分隔\n }\n})\n\nconst handleDrop = handleCheck(async (stashes: string[]) => {\n const selectedStashes = await createCheckbox({\n message: 'Select the stash to clear',\n options: createOptions(stashes),\n })\n\n for await (const stash of selectedStashes) {\n const stashRef = extractStashRef(stash)\n if (!stashRef) {\n log.show('Invalid stash name.', { type: 'error' })\n exit(0)\n }\n\n const [error] = await xASync('git', ['stash', StashCommand.DROP, stashRef])\n if (error) {\n log.show('Failed to drop stash.', { type: 'error' })\n } else {\n log.show(`Successfully dropped stash: ${stashRef}`, { type: 'success' })\n }\n }\n})\n\nconst handleClear = handleCheck(async () => {\n const [error] = await xASync('git', ['stash', 'clear'])\n if (error) {\n log.show('Failed to clear stashes.', { type: 'error' })\n } else {\n log.show('Successfully cleared stashes.', { type: 'success' })\n }\n})\n\nexport const stashCommand = (command: Command) => {\n // 创建主 stash 命令\n const stashCmd = command\n .command('stash')\n .alias('st')\n .description('Git stash management')\n .addHelpText('after', HELP_MESSAGE.main)\n\n // 子命令:保存 stash\n stashCmd\n .command('save [message]')\n .alias('s')\n .description('Save current changes to stash')\n .action(async (message: string) => {\n await handleGitStash(message)\n })\n\n // 子命令:列出 stash\n stashCmd\n .command('list')\n .alias('ls')\n .alias('l')\n .description('List all stashes')\n .action(async () => {\n await handleList()\n })\n\n // 子命令:弹出 stash\n stashCmd\n .command('pop')\n .alias('p')\n .description('Pop the most recent stash')\n .action(async () => {\n await handlePop()\n })\n\n // 子命令:删除 stash\n stashCmd\n .command('drop')\n .alias('d')\n .description('Drop/clear stashes')\n .action(async () => {\n await handleDrop()\n })\n\n stashCmd\n .command('clear')\n .alias('c')\n .description('clear stashes')\n .action(async () => {\n await handleClear()\n })\n\n return stashCmd\n}\n","import { createCommand, exit, readPackage } from '@nemo-cli/shared'\nimport { ErrorMessage } from '@nemo-cli/ui'\n\nimport { branchCommand } from './commands/branch'\nimport { checkoutCommand } from './commands/checkout'\nimport { commitCommand } from './commands/commit'\nimport { diffCommand } from './commands/diff'\nimport { listCommand } from './commands/list'\nimport { mergeCommand } from './commands/merge'\nimport { pullCommand } from './commands/pull'\nimport { pushCommand } from './commands/push'\nimport { stashCommand } from './commands/stash'\nimport { HELP_MESSAGE } from './constants'\nimport { checkGitRepository } from './utils'\n\nexport const pkg = readPackage(import.meta, '..')\n\nexport const init = () => {\n const command = createCommand('ng')\n .version(pkg.version)\n .description(`${pkg.name} CLI helper for git`)\n .addHelpText('after', HELP_MESSAGE.main)\n\n pullCommand(command)\n listCommand(command)\n pushCommand(command)\n checkoutCommand(command)\n branchCommand(command)\n diffCommand(command)\n mergeCommand(command)\n stashCommand(command)\n commitCommand(command)\n\n return command\n}\n\nexport const run = async () => {\n const isGitRepository = await checkGitRepository()\n if (!isGitRepository) {\n ErrorMessage({ text: 'Not a git repository' })\n exit(0)\n }\n\n const command = init()\n command.parse(process.argv)\n}\n"],"mappings":";;;;;;;;AAEA,MAAaA,iBAAe;CAC1B,MAAM,kBAAkB,gBAAgB,aAAa,wBAAwB;CAC7E,QAAQ,kBAAkB,uBAAuB,oBAAoB,+BAA+B;CACpG,cAAc,kBACZ,8BACA,2BACA,sCACD;CACD,aAAa,kBAAkB,6BAA6B,yBAAyB;CACtF;;;;ACMD,MAAM,eAAe;AAGrB,MAAa,oBAAoB,YAA6C;AAO5E,QAAO,EAAE,WANc,MAAM,EAAE,OAAO;EAAC;EAAU;EAAM;EAAwB,CAAC,EAChD,OAC7B,MAAM,KAAK,CACX,QAAQ,SAAS,KAAK,MAAM,IAAI,CAAC,KAAK,SAAS,KAAK,CAAC,CACrD,KAAK,SAAS,KAAK,MAAM,CAAC,QAAQ,cAAc,GAAG,CAAC,EAEpC;;AAGrB,MAAM,sBAAsB;AAC5B,MAAMC,kBAAgB,WAAoB,QAAQ,MAAM,CAAC,QAAQ,qBAAqB,GAAG;AAEzF,MAAa,mBAAmB,YAAgF;CAE9G,MAAM,QADiB,MAAM,EAAE,OAAO,CAAC,UAAU,wBAAwB,CAAC,EAC9C,OAAO,MAAM,KAAK;CAC9C,MAAM,gBAAgB,KAAK,MAAM,SAAS,KA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M,oBAAoB,EAC5B;AACpB,eAAa,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAK,EAAE;;AAIT,CADgB,MAAM,CACd,MAAM,QAAQ,KAAK"}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@nemo-cli/git",
3
+ "version": "0.0.1-beta.4",
4
+ "description": "git flow handle",
5
+ "author": "gaozimeng <gaozimeng0425@gmail.com>",
6
+ "homepage": "https://github.com/GaoZimeng0425/nemo-cli#readme",
7
+ "license": "ISC",
8
+ "directories": {
9
+ "lib": "dist",
10
+ "test": "__tests__"
11
+ },
12
+ "bin": {
13
+ "ng": "./bin/index.mjs"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/GaoZimeng0425/nemo-cli.git"
21
+ },
22
+ "type": "module",
23
+ "engines": {
24
+ "node": "^20.19.0 || >=22.12.0"
25
+ },
26
+ "scripts": {
27
+ "dev": "rolldown --watch -c ./rolldown.config.ts",
28
+ "build": "rolldown -c ./rolldown.config.ts",
29
+ "test": "vitest",
30
+ "coverage": "vitest run --coverage",
31
+ "check": "tsc --incremental --noEmit",
32
+ "prepublish": "npm run build",
33
+ "prepack": "rolldown"
34
+ },
35
+ "exports": {
36
+ ".": {
37
+ "import": "./dist/index.mjs"
38
+ }
39
+ },
40
+ "main": "./dist/index.mjs",
41
+ "types": "./dist/index.d.ts",
42
+ "files": [
43
+ "dist"
44
+ ],
45
+ "bugs": {
46
+ "url": "https://github.com/GaoZimeng0425/nemo-cli/issues"
47
+ },
48
+ "dependencies": {
49
+ "@nemo-cli/shared": "workspace:*",
50
+ "@nemo-cli/ui": "workspace:*"
51
+ }
52
+ }