<commit_before>var Fiber = require('fibers');
Fiber(function () {

  var path = require('path');
  var files = require(path.join(__dirname, '..', 'lib', 'files.js'));
  var _ = require('underscore');
  var deploy = require(path.join(__dirname, 'deploy'));
  var fs = require("fs");
  var runner = require(path.join(__dirname, 'run.js'));

  // This code is duplicated in app/server/server.js.
  var MIN_NODE_VERSION = 'v0.8.11';
  if (require('semver').lt(process.version, MIN_NODE_VERSION)) {
    process.stderr.write(
      'Meteor requires Node ' + MIN_NODE_VERSION + ' or later.\n');
    process.exit(1);
  }

  var usage = function() {
    process.stdout.write(
      "Usage: meteor [--version] [--help] <command> [<args>]\n" +
        "\n" +
        "With no arguments, 'meteor' runs the project in the current\n" +
        "directory in local development mode. You can run it from the root\n" +
        "directory of the project or from any subdirectory.\n" +
        "\n" +
        "Use 'meteor create <name>' to create a new Meteor project.\n" +
        "\n" +
        "Commands:\n");
    _.each(Commands, function (cmd) {
      if (cmd.help) {
        var name = cmd.name + "           ".substr(cmd.name.length);
        process.stdout.write("   " + name + cmd.help + "\n");
      }
    });
    process.stdout.write("\n");
    process.stdout.write(
      "See 'meteor help <command>' for details on a command.\n");
    process.exit(1);
  };

  var require_project = function (cmd, accept_package) {
    var app_dir = files.find_upwards(files.is_app_dir);
    if (app_dir)
      return app_dir;

    var package_dir = files.find_upwards(function (p) {
      return files.is_package_dir(p) || files.is_package_collection_dir(p);
    });
    if (package_dir) {
      if (accept_package)
        return package_dir;

      process.stdout.write(cmd + ": Only works on applications, not packages\n");
      process.exit(1);
    }

    // This is where you end up if you type 'meteor' with no
    // args. Be gentle to the noobs..
    process.stdout.write(
      cmd + ": You're not in a Meteor project directory.\n" +
        "\n" +
        "To create a new Meteor project:\n" +
        "   meteor create <project name>\n" +
        "For example:\n" +
        "   meteor create myapp\n" +
        "\n" +
        "For more help, see 'meteor --help'.\n");
    process.exit(1);
  };

  var find_mongo_port = function (cmd, callback) {
    var app_dir = require_project(cmd);
    var mongo_runner = require(path.join(__dirname, '..', 'lib', 'mongo_runner.js'));
    mongo_runner.find_mongo_port(app_dir, callback);
  };

  Commands = [];

  var findCommand = function (name) {
    for (var i = 0; i < Commands.length; i++)
      if (Commands[i].name === name)
        return Commands[i];
    process.stdout.write("'" + name + "' is not a Meteor command. See " +
                         "'meteor --help'.\n");
    process.exit(1);
  };

  // XXX when the pass unexpected argument or unrecognized flags, print
  // an error and fail out

  Commands.push({
    name: "run",
    help: "[default] Run this project in local development mode",
    func: function (argv) {
      // reparse args
      // This help logic should probably move to run.js eventually
      var opt = require('optimist')
            .alias('port', 'p').default('port', 3000)
            .describe('port', 'Port to listen on. NOTE: Also uses port N+1 and N+2.')
            .boolean('production')
            .describe('production', 'Run in production mode. Minify and bundle CSS and JS files.')
            .describe('settings',  'Set optional data for Meteor.settings on the server')
            .boolean('once')
            .usage(
              "Usage: meteor run [options]\n" +
                "\n" +
                "Searches upward from the current directory for the root directory of a\n" +
                "Meteor project, then runs that project in local development\n" +
                "mode. You can use the application by pointing your web browser at\n" +
                "localhost:3000. No internet connection is required.\n" +
                "\n" +
                "Whenever you change any of the application's source files, the changes\n" +
                "are automatically detected and applied to the running application.\n" +
                "\n" +
                "The application's database persists between runs. It's stored under\n" +
                "the .meteor directory in the root of the project.\n");

      var new_argv = opt.argv;
      var settings = "";

      if (argv.help) {<commit_msg>Add a comment about the now-undocumented `meteor run --once`.<commit_after>var Fiber = require('fibers');
Fiber(function () {

  var path = require('path');
  var files = require(path.join(__dirname, '..', 'lib', 'files.js'));
  var _ = require('underscore');
  var deploy = require(path.join(__dirname, 'deploy'));
  var fs = require("fs");
  var runner = require(path.join(__dirname, 'run.js'));

  // This code is duplicated in app/server/server.js.
  var MIN_NODE_VERSION = 'v0.8.11';
  if (require('semver').lt(process.version, MIN_NODE_VERSION)) {
    process.stderr.write(
      'Meteor requires Node ' + MIN_NODE_VERSION + ' or later.\n');
    process.exit(1);
  }

  var usage = function() {
    process.stdout.write(
      "Usage: meteor [--version] [--help] <command> [<args>]\n" +
        "\n" +
        "With no arguments, 'meteor' runs the project in the current\n" +
        "directory in local development mode. You can run it from the root\n" +
        "directory of the project or from any subdirectory.\n" +
        "\n" +
        "Use 'meteor create <name>' to create a new Meteor project.\n" +
        "\n" +
        "Commands:\n");
    _.each(Commands, function (cmd) {
      if (cmd.help) {
        var name = cmd.name + "           ".substr(cmd.name.length);
        process.stdout.write("   " + name + cmd.help + "\n");
      }
    });
    process.stdout.write("\n");
    process.stdout.write(
      "See 'meteor help <command>' for details on a command.\n");
    process.exit(1);
  };

  var require_project = function (cmd, accept_package) {
    var app_dir = files.find_upwards(files.is_app_dir);
    if (app_dir)
      return app_dir;

    var package_dir = files.find_upwards(function (p) {
      return files.is_package_dir(p) || files.is_package_collection_dir(p);
    });
    if (package_dir) {
      if (accept_package)
        return package_dir;

      process.stdout.write(cmd + ": Only works on applications, not packages\n");
      process.exit(1);
    }

    // This is where you end up if you type 'meteor' with no
    // args. Be gentle to the noobs..
    process.stdout.write(
      cmd + ": You're not in a Meteor project directory.\n" +
        "\n" +
        "To create a new Meteor project:\n" +
        "   meteor create <project name>\n" +
        "For example:\n" +
        "   meteor create myapp\n" +
        "\n" +
        "For more help, see 'meteor --help'.\n");
    process.exit(1);
  };

  var find_mongo_port = function (cmd, callback) {
    var app_dir = require_project(cmd);
    var mongo_runner = require(path.join(__dirname, '..', 'lib', 'mongo_runner.js'));
    mongo_runner.find_mongo_port(app_dir, callback);
  };

  Commands = [];

  var findCommand = function (name) {
    for (var i = 0; i < Commands.length; i++)
      if (Commands[i].name === name)
        return Commands[i];
    process.stdout.write("'" + name + "' is not a Meteor command. See " +
                         "'meteor --help'.\n");
    process.exit(1);
  };

  // XXX when the pass unexpected argument or unrecognized flags, print
  // an error and fail out

  Commands.push({
    name: "run",
    help: "[default] Run this project in local development mode",
    func: function (argv) {
      // reparse args
      // This help logic should probably move to run.js eventually
      var opt = require('optimist')
            .alias('port', 'p').default('port', 3000)
            .describe('port', 'Port to listen on. NOTE: Also uses port N+1 and N+2.')
            .boolean('production')
            .describe('production', 'Run in production mode. Minify and bundle CSS and JS files.')
            .describe('settings',  'Set optional data for Meteor.settings on the server')
            // With --once, meteor does not re-run the project if it crashes and
            // does not monitor for file changes. Intentionally undocumented:
            // intended for automated testing (eg, cli-test.sh), not end-user
            // use.
            .boolean('once')
            .usage(
              "Usage: meteor run [options]\n" +
                "\n" +
                "Searches upward from the current directory for the root directory of a\n" +
                "Meteor project, then runs that project in local development\n" +
                "mode. You can use the application by pointing your web browser at\n" +
                "localhost:3000. No internet connection is required.\n" +
                "\n" +
                "Whenever you change any of the application's source files, the changes\n" +
                "are automatically detected and applied to the running application.\n" +
                "\n" +
                "The application's database persists between runs. It's stored under\n" +
                "the .meteor directory in the root of the project.\n");

      var new_argv = opt.argv;
      var settings = "";

      if (argv.help) {
{'fraction_non_alphanumeric': 0.13483619509111977, 'fraction_numerical': 0.004213631096597493, 'mean_word_length': 2.218305084745763, 'pattern_counts': {'":': 4, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2443744', 'n_tokens_mistral': 2925, 'n_tokens_neox': 2782, 'n_words': 887}