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AAU,MAAM,QAAQ,MAAM,KAAK,SAAS,IAGlF,YAAY,MAAK,IACa,IAAxB,QAAQ,KAAK,OAEf,KAAK,MAAM,QAAQ,MAAM,KAAK,UAE9B,QAAQ,MAAM,QAAQ,KACxB","file":"/npm/biome@0.3.3/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/biome@0.3.3/src/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\nimport program from 'commander';\nimport preflight from './preflight';\nimport chalk from 'chalk';\n\nimport use, {vars} from './use';\nimport add from './add';\nimport init from './init';\nimport ls from './ls';\nimport edit from './edit';\n\nprogram.version(require(\"../package\").version);\n\n// ----------------------------------------------------------------------------\n// biome init <project>\n// Create a new project\n// ----------------------------------------------------------------------------\nprogram\n.command('init [project] [template]')\n.description(`Create a new project with the specified name, and save an alias to this folder. If project is omitted, try to rehydrate a preexisting environment from a Biomefile.`)\n.action((project, template) => {\n  init(project, template).then(project => {\n    console.log(`Created new project ${project}. Add new vars with ${chalk.green(\"biome add\")} or fire it up with ${chalk.green(\"biome use\")}.`.replace('\\n', ''));\n  }).catch(console.error.bind(console));\n});\n\n// ----------------------------------------------------------------------------\n// biome add [COMMAND]=[value]\n// add an environment variable to the project's variables\n// ----------------------------------------------------------------------------\nprogram\n.command('add [project]')\n.description(\"Add a variable to a project. Specify like NAME=value.\")\n.action(project => {\n  // if the first part was not a project, reset the variable\n  if (project.indexOf('=') !== -1) { project = undefined; }\n\n  // get variables, strip out project if it was passed\n  let args = process.argv.slice(3);\n  if (args[0].indexOf('=') === -1) {\n    args = args.slice(1);\n  }\n\n  if (args.length === 0) {\n    console.error(\"No args were passed. Pass variables like NAME=value.\")\n  } else {\n    // collect all matches\n    let allMatches = args.map(arg => arg.split('='));\n    add(project, allMatches).then(out => {\n      console.log(`Sourced all variables. Try ${chalk.green(\"biome use\")} to try out what you just added.`);\n    }).catch(console.log.error.bind(console))\n  }\n});\n\n// ----------------------------------------------------------------------------\n// biome use [project]\n// Open a shell containing a project's variables\n// ----------------------------------------------------------------------------\nprogram\n.command('use [project]')\n.description(\"Open a shell with a project's associated variables included.\")\n.action(project => {\n  use(project).catch(console.error.bind(console));\n});\n\n// ----------------------------------------------------------------------------\n// biome edit [project]\n// Open $EDITOR with the project's global json.\n// ----------------------------------------------------------------------------\nprogram\n.command('edit <project>')\n.description(\"Open $EDITOR with the project's associated environment variables.\")\n.action(project => {\n  edit(project).catch(console.error.bind(console));\n});\n\n// ----------------------------------------------------------------------------\n// biome vars [project]\n// Echo all variables to stdout for a project.\n// ----------------------------------------------------------------------------\nprogram\n.command('vars [project]')\n.description(\"Echo all variables.\")\n.option('--only-vars', \"Only log out a shell script that can be parsed\")\n.action((project, {options}) => {\n  if (options.find(i => i.long === '--only-vars')) {\n    console.info = function() {};\n  }\n  vars(project).then(console.log.bind(console)).catch(console.error.bind(console));\n});\n\npreflight().then(out => {\n  if (process.argv.length === 2) {\n    // list status if no args were specified\n    ls().catch(console.error.bind(console));\n  } else {\n    program.parse(process.argv)\n  }\n});\n"]}