{"version":3,"sources":["jsdelivr-header.js","/npm/gci-command@1.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;ACJA,MAAM,SAAW,QAAQ,aACnB,KAAE,MAAS,QAAQ,iBAEnB,iBAAmB,QAAQ,MAE3B,kBAAqB,IACvB,MAAM,EAAM,EAAc,MAAM,KAChC,OAAO,EAAI,EAAI,OAAS,GAAG,MAAM,KAAK,EAAE,EAGtC,GAAK,SAAS,gBAAgB,CAChC,MAAO,QAAQ,MACf,OAAQ,QAAQ,SAGpB,GAAG,SAAS,cAAe,IACvB,KAAK,aAAa,KAAe,CAAC,EAAK,EAAQ,KAE3C,GADA,QAAQ,IAAI,GACR,EAEA,OADA,QAAQ,MAAM,oBAAoB,KAC3B,GAAG,QAGd,QAAQ,IAAI,UACZ,MAAM,EAAiB,kBAAkB,GACnC,EAAM,GAAG,oBAAoB,IACnC,KAAK,SAAU,CAAE,QAAO,CAAC,EAAK,EAAQ,KAC9B,GACA,QAAQ,MAAM,eAAe,KAEjC,QAAQ,IAAI,GACZ,KAAK,QAAS,CAAE,QAAO,CAAC,EAAK,EAAQ,KAC7B,GACA,QAAQ,MAAM,gBAAgB,KAElC,QAAQ,IAAI,GACZ,GAAG,OAAO,GACZ,GACJ,GACJ","file":"/npm/gci-command@1.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/gci-command@1.0.0/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\nconst readline = require('readline');\nconst { exec } = require('child_process');\n\nconst currentDirectory = process.cwd();\n\nconst getRepositoryName = (repositoryUrl) => {\n    const url = repositoryUrl.split('/');\n    return url[url.length - 1].split('.')[0];\n}\n\nconst rl = readline.createInterface({\n    input: process.stdin,\n    output: process.stdout,\n});\n\nrl.question(\"git clone \", (respository) => {\n    exec(`git clone ${respository}`, (err, stdout, stderr) => {\n        console.log(stderr);\n        if (err) {\n            console.error(`git clone error: ${err}`);\n            return rl.close();\n        }\n\n        console.log(\"code .\");\n        const repositoryName = getRepositoryName(respository);\n        const cwd = `${currentDirectory}/${repositoryName}`;\n        exec(\"code .\", { cwd }, (err, stdout, stderr) => {\n            if (err) {\n                console.error(`code error: ${err}`);\n            }\n            console.log(stderr);\n            exec(\"npm i\", { cwd }, (err, stdout, stderr) => {\n                if (err) {\n                    console.error(`npm i error: ${err}`);\n                }\n                console.log(stderr);\n                rl.close();\n            });\n        });\n    });\n});"]}