<commit_before>const path = require('path');
const jsforce = require('jsforce');


const almPath = path.dirname(require.resolve('salesforce-alm'));
const Org = require(path.join(almPath, 'lib', 'scratchOrgApi'));

(function() {
  'use strict';

  module.exports = {
    topic: 'auth',
    command: 'username:login',
    description: 'authorize an org using the username password flow',
    help: 'help text for waw:auth:username:login',
    flags: [
      {
        name: 'instanceurl',
        char: 'r',
        description: 'the login URL of the instance the org lives on',
        hasValue: true,
        required: false
      },
      {
        name: 'username',
        char: 'u',
        description: 'username for org',
        hasValue: true,
        required: true
      },
      {
        name: 'password',
        char: 'p',
        description: 'password for org',
        hasValue: true,
        required: true
      }
    ],
    run(context) {
      const username = context.flags.username;
      const password = context.flags.password;
      let instanceUrl = context.flags.instanceurl;

      if (!instanceUrl) {
        instanceUrl = 'https://login.salesforce.com';
      }

      const saveAsDefault = false;

      const conn = new jsforce.Connection({
        // you can change loginUrl to connect to sandbox or prerelease env.
        loginUrl: instanceUrl
      });

      conn.login(username, password, (err, userInfo) => {
        if (err) {
          return console.error(err);
        }

        const orgSaveData = [];
        orgSaveData.orgId = userInfo.organizationId;
        orgSaveData.accessToken = conn.accessToken;
        orgSaveData.instanceUrl = conn.instanceUrl;
        orgSaveData.username = username;
        orgSaveData.loginUrl = instanceUrl;

        const orgApi = new Org(this.force);

        console.log(orgSaveData);

        orgApi.saveConfig(orgSaveData, saveAsDefault);
      });
    }
  };
})();<commit_msg>Minor updates to formatting<commit_after>const path = require('path');
const jsforce = require('jsforce');

const almPath = path.dirname(require.resolve('salesforce-alm'));
const Org = require(path.join(almPath, 'lib', 'scratchOrgApi'));

(function() {
  'use strict';

  module.exports = {
    topic: 'auth',
    command: 'username:login',
    description: 'authorize an org using the username password flow',
    help: 'help text for waw:auth:username:login',
    flags: [
      {
        name: 'instanceurl',
        char: 'r',
        description: 'the login URL of the instance the org lives on',
        hasValue: true,
        required: false
      },
      {
        name: 'username',
        char: 'u',
        description: 'username for org',
        hasValue: true,
        required: true
      },
      {
        name: 'password',
        char: 'p',
        description: 'password for org',
        hasValue: true,
        required: true
      }
    ],
    run(context) {
      const username = context.flags.username;
      const password = <PASSWORD>.flags.password;
      let instanceUrl = context.flags.instanceurl;

      if (!instanceUrl) {
        instanceUrl = 'https://login.salesforce.com';
      }

      const saveAsDefault = false;

      const conn = new jsforce.Connection({
        // you can change loginUrl to connect to sandbox or prerelease env.
        loginUrl: instanceUrl
      });

      conn.login(username, password, (err, userInfo) => {
        if (err) {
          return console.error(err);
        }

        const orgSaveData = [];
        orgSaveData.orgId = userInfo.organizationId;
        orgSaveData.accessToken = conn.accessToken;
        orgSaveData.instanceUrl = conn.instanceUrl;
        orgSaveData.username = username;
        orgSaveData.loginUrl = instanceUrl;

        const orgApi = new Org();

        console.log(orgSaveData);

        orgApi.saveConfig(orgSaveData, saveAsDefault);
      });
    }
  };
})();
{'fraction_non_alphanumeric': 0.11870869344178953, 'fraction_numerical': 0.0, 'mean_word_length': 2.2628524046434495, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 2, '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': '2739024', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1106, 'n_words': 285}