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AAG,EAAgB,MAAQ,OACrE,QAAQ,IAAK,EAAgB,cAR5B,QAAQ,UAAY,CAStB,CApIA","file":"/npm/mgit2@0.11.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/mgit2@0.11.1/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#!/usr/bin/env node\n\n/**\n * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n'use strict';\n\nconst chalk = require( 'chalk' );\nconst meow = require( 'meow' );\nconst mgit = require( './lib/index' );\nconst getCommandInstance = require( './lib/utils/getcommandinstance' );\n\nhandleCli();\n\nfunction handleCli() {\n\tconst meowOptions = {\n\t\tautoHelp: false,\n\t\tflags: {\n\t\t\tversion: {\n\t\t\t\talias: 'v'\n\t\t\t},\n\t\t\thelp: {\n\t\t\t\talias: 'h'\n\t\t\t},\n\t\t\tbranch: {\n\t\t\t\talias: 'b'\n\t\t\t},\n\t\t\tmessage: {\n\t\t\t\talias: 'm'\n\t\t\t}\n\t\t}\n\t};\n\n\tconst mgitLogo = `\n                     _ _\n                    (_) |\n     _ __ ___   __ _ _| |_\n    | '_ \\` _ \\\\ / _\\` | | __|\n    | | | | | | (_| | | |_\n    |_| |_| |_|\\\\__, |_|\\\\__|\n                __/ |\n               |___/\n`;\n\n\tconst {\n\t\tcyan: c,\n\t\tgray: g,\n\t\tmagenta: m,\n\t\tunderline: u,\n\t\tyellow: y,\n\t} = chalk;\n\n\tconst cli = meow( `${ mgitLogo }\n    ${ u( 'Usage:' ) }\n        $ mgit ${ c( 'command' ) } ${ y( '[--options]' ) } -- ${ m( '[--git-options]' ) }\n\n    ${ u( 'Commands:' ) }\n        ${ c( 'checkout' ) }                    Changes branches in repositories according to the configuration file.\n        ${ c( 'close' ) }                       Merges specified branch with the current one and remove merged branch from the remote.\n        ${ c( 'commit' ) }                      Commits all changes. A shorthand for \"mgit exec 'git commit -a'\".\n        ${ c( 'diff' ) }                        Prints changes from packages where something has changed. \n        ${ c( 'exec' ) }                        Executes shell command in each package.\n        ${ c( 'fetch' ) }                       Fetches existing repositories.\n        ${ c( 'pull' ) }                        Pulls changes in existing repositories.\n        ${ c( 'push' ) }                        Pushes changes in existing repositories to remotes.\n        ${ c( 'save' ) }                        Saves hashes of packages in mgit.json. It allows to easily fix project to a specific state.\n        ${ c( 'status' ) }                      Prints a table which contains useful information about the status of repositories.\n        ${ c( 'sync' ) }                        Updates packages to the latest versions or install missing ones.\n                                                \n\n    ${ u( 'Options:' ) }\n        ${ y( '--branch' ) }                    For \"${ u( 'save' ) }\" command: whether to save branch names.\n                                    For \"${ u( 'checkout' ) }\" command: name of branch that would be created.\n\n        ${ y( '--hash' ) }                      Whether to save current commit hashes. Used only by \"${ u( 'save' ) }\" command.\n\n        ${ y( '--ignore' ) }                    Ignores packages which names match the given glob pattern. E.g.:\n                                    ${ g( '> mgit exec --ignore=\"foo*\" \"git status\"' ) }\n\n                                    Will ignore all packages which names start from \"foo\".\n                                    ${ g( 'Default: null' ) }\n                                    \n        ${ y( '--message' ) }                   Message that will be used as an option for git command. Required for \"${ u( 'commit' ) }\"\n                                    command but it is also used by \"${ u( 'close' ) }\" command (append the message to the default).\n\n        ${ y( '--packages' ) }                  Directory to which all repositories will be cloned or are already installed.\n                                    ${ g( 'Default: \\'<cwd>/packages/\\'' ) }\n\n        ${ y( '--recursive' ) }                 Whether to install dependencies recursively. Used only by \"${ u( 'sync' ) }\" command.\n\n        ${ y( '--resolver-path' ) }             Path to a custom repository resolver function.\n                                    ${ g( 'Default: \\'@mgit2/lib/default-resolver.js\\'' ) }\n\n        ${ y( '--resolver-url-template' ) }     Template used to generate repository URL out of a\n                                    simplified 'organization/repository' format of the dependencies option.\n                                    ${ g( 'Default: \\'git@github.com:${ path }.git\\'.' ) }\n\n        ${ y( '--resolver-directory-name' ) }   Defines how the target directory (where the repository will be cloned)\n                                    is resolved. Supported options are: 'git' (default), 'npm'.\n\n                                    * If 'git' was specified, then the directory name will be extracted from\n                                    the git URL (e.g. for 'git@github.com:a/b.git' it will be 'b').\n                                    * If 'npm' was specified, then the package name will be used as a directory name.\n\n                                    This option can be useful when scoped npm packages are used and one wants to decide\n                                    whether the repository will be cloned to packages/@scope/pkgname' or 'packages/pkgname'.\n                                    ${ g( 'Default: \\'git\\'' ) }\n\n        ${ y( '--resolver-default-branch' ) }   The branch name to use if not specified in mgit.json dependencies.\n                                    ${ g( 'Default: master' ) }\n\n        ${ y( '--scope' ) }                     Restricts the command to packages which names match the given glob pattern.\n                                    ${ g( 'Default: null' ) }\n\n    ${ u( 'Git Options:' ) }\n        Git options are supported by the following commands: commit, diff, fetch, push.\n        Type \"mgit [command] -h\" in order to see which options are supported.\n`, meowOptions );\n\n\tconst commandName = cli.input[ 0 ];\n\n\t// If user specified a command and `--help` flag wasn't active.\n\tif ( commandName && !cli.flags.help ) {\n\t\treturn mgit( cli.input, cli.flags );\n\t}\n\n\t// A user wants to see \"help\" screen.\n\t// Missing command. Displays help screen for the entire Mgit.\n\tif ( !commandName ) {\n\t\treturn cli.showHelp( 0 );\n\t}\n\n\tconst commandInstance = getCommandInstance( commandName );\n\n\tif ( !commandInstance ) {\n\t\tprocess.errorCode = 1;\n\n\t\treturn;\n\t}\n\n\t// Specified command is is available, displays the command's help.\n\tconsole.log( mgitLogo );\n\tconsole.log( `    ${ u( 'Command:' ) } ${ c( commandInstance.name || commandName ) } ` );\n\tconsole.log( commandInstance.helpMessage );\n}\n"]}