Repository: twilio-labs/serverless-toolkit
Pull request #224 (2021-03-05 07:16:08)

feat!: change credential handling
Implementing option 1 changes from #163.

**Contributing to Twilio**

> All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

- [x] I acknowledge that all my contributions will be made under the project's license.


dkundel: Can you also change the `Account` and `Token` output in the deploy command to use `Username` and `Password` for consistency?
philnash: Where have the Actions CI runs gone?
dkundel: They might be gone because of your merge conflict
philnash: Rebased and the Actions are back!

Patch:
diff --git a/packages/plugin-serverless/src/commands/serverless/init.js b/packages/plugin-serverless/src/commands/serverless/init.js
index 3d3e9ba..e9d7436 100644
--- a/packages/plugin-serverless/src/commands/serverless/init.js
+++ b/packages/plugin-serverless/src/commands/serverless/init.js
@@ -18,8 +18,8 @@ class FunctionsInit extends TwilioClientCommand {
     flags = normalizeFlags(flags);
 
     const opts = Object.assign({}, flags, args);
-    opts.accountSid = flags.accountSid || this.twilioClient.username;
-    opts.authToken = flags.authToken || this.twilioClient.password;
+    opts.accountSid = flags.accountSid || this.twilioClient.accountSid;
+    opts.authToken = flags.authToken || '';
 
     opts.path = process.cwd();
     opts.skipCredentials = true;
@@ -33,7 +33,8 @@ FunctionsInit.args = [
   {
     name: 'name',
     required: true,
-    description: 'Name of Serverless project and directory that will be created',
+    description:
+      'Name of Serverless project and directory that will be created',
   },
 ];
 
diff --git a/packages/runtime-handler/CHANGELOG.md b/packages/runtime-handler/CHANGELOG.md
new file mode 100644
index 0000000..27305e6
--- /dev/null
+++ b/packages/runtime-handler/CHANGELOG.md
@@ -0,0 +1,10 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+<a name="1.0.1"></a>
+## 1.0.1 (2021-04-16)
+
+
+
diff --git a/packages/runtime-handler/README.md b/packages/runtime-handler/README.md
new file mode 100644
index 0000000..4635665
--- /dev/null
+++ b/packages/runtime-handler/README.md
@@ -0,0 +1,7 @@
+# `@twilio/runtime-handler`
+
+This package defines the Twilio Functions Runtime version.
+
+## License
+
+MIT
diff --git a/packages/runtime-handler/jest.config.js b/packages/runtime-handler/jest.config.js
new file mode 100644
index 0000000..b016a21
--- /dev/null
+++ b/packages/runtime-handler/jest.config.js
@@ -0,0 +1,12 @@
+const base = require('../../jest.config.base.js');
+
+module.exports = {
+  ...base,
+  globals: {
+    'ts-jest': {
+      tsConfig: './tsconfig.test.json',
+    },
+  },
+  name: 'serverless-api',
+  displayName: 'serverless-api',
+};
diff --git a/packages/runtime-handler/package.json b/packages/runtime-handler/package.json
new file mode 100644
index 0000000..7a8d124
--- /dev/null
+++ b/packages/runtime-handler/package.json
@@ -0,0 +1,51 @@
+{
+  "name": "@twilio/runtime-handler",
+  "version": "1.0.1",
+  "description": "Stub runtime for Twilio Functions",
+  "keywords": [
+    "twilio",
+    "twilio-functions"
+  ],
+  "author": "Twilio Inc. <open-source@twilio.com> (https://www.twilio.com/labs)",
+  "homepage": "https://github.com/twilio-labs/serverless-toolkit/tree/main/packages/runtime-handler#readme",
+  "license": "MIT",
+  "main": "dist/index.js",
+  "types": "dist/index.d.ts",
+  "directories": {
+    "src": "src",
+    "test": "__tests__",
+    "dist": "dist"
+  },
+  "files": [
+    "dist",
+    "!dist/**/__tests__/*"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/twilio-labs/serverless-toolkit.git"
+  },
+  "scripts": {
+    "jest": "jest",
+    "test": "run-s build:noemit jest",
+    "build": "tsc",
+    "watch": "tsc --watch",
+    "build:noemit": "tsc --noEmit",
+    "docs": "typedoc --options typedoc.json",
+    "clean": "rimraf ./dist",
+    "prepack": "run-s clean build"
+  },
+  "devDependencies": {
+    "@types/jest": "^24.0.16",
+    "jest": "^24.8.0",
+    "npm-run-all": "^4.1.5",
+    "rimraf": "^2.6.3",
+    "ts-jest": "^24.0.2",
+    "typescript": "^3.8.3"
+  },
+  "bugs": {
+    "url": "https://github.com/twilio-labs/serverless-toolkit/issues"
+  }
+}
diff --git a/packages/runtime-handler/src/index.ts b/packages/runtime-handler/src/index.ts
new file mode 100644
index 0000000..ff7bd09
--- /dev/null
+++ b/packages/runtime-handler/src/index.ts
@@ -0,0 +1,1 @@
+// placeholder
diff --git a/packages/runtime-handler/tsconfig.json b/packages/runtime-handler/tsconfig.json
new file mode 100644
index 0000000..9d37ca3
--- /dev/null
+++ b/packages/runtime-handler/tsconfig.json
@@ -0,0 +1,8 @@
+{
+  "extends": "../../tsconfig.base.json",
+  "compilerOptions": {
+    "declaration": true,
+    "outDir": "./dist" /* Redirect output structure to the directory. */
+  },
+  "exclude": ["node_modules", "**/*.test.ts", "dist", "**/__mocks__/*.ts"]
+}
diff --git a/packages/serverless-api/src/utils/error.ts b/packages/serverless-api/src/utils/error.ts
index bc4b0ca..bd7c242 100644
--- a/packages/serverless-api/src/utils/error.ts
+++ b/packages/serverless-api/src/utils/error.ts
@@ -22,7 +22,7 @@ function toTwilioApiError(response: unknown): TwilioApiError | undefined {
  * Explictly removes username and password from a URL.
  * @param unfilteredUrl any URL string
  */
-function filterUrl(unfilteredUrl: string | undefined): string {
+export function filterUrl(unfilteredUrl: string | undefined): string {
   if (!unfilteredUrl) {
     return '';
   }
@@ -49,8 +49,9 @@ export function convertApiErrorsAndThrow(err: any): never {
  * An Error wrapper to provide more useful error information without exposing credentials
  */
 export class ClientApiError extends Error {
-  public details?: TwilioApiError & { request_url?: string };
+  public details?: TwilioApiError;
   public code?: number | string;
+  public url?: string;
 
   constructor(requestError: RequestError) {
     const twilioApiErrorInfo = toTwilioApiError(requestError.response?.body);
@@ -59,13 +60,13 @@ export class ClientApiError extends Error {
     Error.captureStackTrace(this, this.constructor);
     this.name = requestError.name;
     this.message = message;
-    this.code = twilioApiErrorInfo?.code || requestError.code;
+    this.code = twilioApiErrorInfo?.code || requestError.response?.statusCode;
+    this.url = filterUrl(requestError.response?.requestUrl);
 
     if (requestError.name === 'HTTPError' && twilioApiErrorInfo) {
       this.name = 'TwilioApiError';
       this.details = {
         ...twilioApiErrorInfo,
-        request_url: filterUrl(requestError.response?.requestUrl),
       };
     }
   }
diff --git a/packages/serverless-runtime-types/package.json b/packages/serverless-runtime-types/package.json
index 02a7161..aedba6a 100644
--- a/packages/serverless-runtime-types/package.json
+++ b/packages/serverless-runtime-types/package.json
@@ -28,7 +28,7 @@
   "dependencies": {
     "@types/express": "^4.17.11",
     "@types/qs": "^6.9.4",
-    "twilio": "^3.58.0"
+    "twilio": "^3.60.0"
   },
   "devDependencies": {
     "@types/express": "^4.17.11",
diff --git a/packages/twilio-run/package.json b/packages/twilio-run/package.json
index 88d99b4..a3fdbfa 100644
--- a/packages/twilio-run/package.json
+++ b/packages/twilio-run/package.json
@@ -74,7 +74,7 @@
     "serialize-error": "^7.0.1",
     "terminal-link": "^1.3.0",
     "title": "^3.4.1",
-    "twilio": "^3.58.0",
+    "twilio": "^3.60.0",
     "type-fest": "^0.15.1",
     "window-size": "^1.1.1",
     "wrap-ansi": "^5.1.0",
diff --git a/packages/twilio-run/src/checks/check-auth-token.ts b/packages/twilio-run/src/checks/check-auth-token.ts
new file mode 100644
index 0000000..a036fcb
--- /dev/null
+++ b/packages/twilio-run/src/checks/check-auth-token.ts
@@ -0,0 +1,54 @@
+import { stripIndent } from 'common-tags';
+import { logger } from '../utils/logger';
+import chalk = require('chalk');
+
+type Options = {
+  shouldPrintMessage: boolean;
+  shouldThrowError: boolean;
+  functionName?: string;
+};
+
+export function checkForValidAuthToken(
+  authToken: string | undefined,
+  options: Options = { shouldPrintMessage: false, shouldThrowError: false }
+): boolean {
+  if (authToken && authToken.length === 32) {
+    return true;
+  }
+
+  let message = '';
+  let title = '';
+  if (!authToken) {
+    title = 'Missing Auth Token';
+    message = stripIndent`
+      You are missing a Twilio Auth Token. You can add one into your .env file:
+
+      ${chalk.bold('AUTH_TOKEN=')}xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+    `;
+  } else {
+    title = 'Invalid Auth Token';
+    message = stripIndent`
+      The value for your AUTH_TOKEN in your .env file is not a valid Twilio Auth Token.
+
+      It should be 32 characters long and made of letters and numbers.
+    `;
+  }
+
+  if (options.shouldPrintMessage && message) {
+    logger.error(message, title);
+  }
+
+  if (options.shouldThrowError && message) {
+    const err = new Error(title);
+    err.name = 'INVALID_CONFIG';
+    err.message = `${title}\n${message}`;
+    let meta = '';
+    if (options.functionName) {
+      meta = `\n--- at ${options.functionName}`;
+    }
+    err.stack = `${err.message}${meta}`;
+    throw err;
+  }
+
+  return false;
+}
diff --git a/packages/twilio-run/src/checks/check-credentials.ts b/packages/twilio-run/src/checks/check-credentials.ts
index d052e28..bd05024 100644
--- a/packages/twilio-run/src/checks/check-credentials.ts
+++ b/packages/twilio-run/src/checks/check-credentials.ts
@@ -15,11 +15,11 @@ export function checkConfigForCredentials(
   }
 
   const msg = stripIndent`
-      We couldn't find any Twilio credentials for you. 
-      
+      We couldn't find any Twilio credentials for you.
+
       Please enter ACCOUNT_SID and AUTH_TOKEN in your .env file.
-      
-      Alternatively you can specify them via the command-line using "--account-sid" and "--auth-token"
+
+      Alternatively you can specify them via the command-line using "--username" and "--password"
 
       For more information use "--help"
     `;
diff --git a/packages/twilio-run/src/commands/start.ts b/packages/twilio-run/src/commands/start.ts
index 7ae07f4..1d6d5d6 100644
--- a/packages/twilio-run/src/commands/start.ts
+++ b/packages/twilio-run/src/commands/start.ts
@@ -1,6 +1,6 @@
+import { Server } from 'http';
 import inquirer from 'inquirer';
 import { Argv } from 'yargs';
-import { Server } from 'http';
 import checkNodejsVersion from '../checks/nodejs-version';
 import checkProjectStructure from '../checks/project-structure';
 import { getConfigFromCli, getUrl, StartCliFlags } from '../config/start';
@@ -149,7 +149,7 @@ export const cliInfo: CliInfo = {
       'legacy-mode',
       'assets-folder',
       'functions-folder',
-      'experimental-fork-process',
+      'fork-process',
     ]),
     cwd: {
       ...ALL_FLAGS['cwd'],
diff --git a/packages/twilio-run/src/config/__mocks__/utils.ts b/packages/twilio-run/src/config/__mocks__/utils.ts
index 1a0f15a..fdf8890 100644
--- a/packages/twilio-run/src/config/__mocks__/utils.ts
+++ b/packages/twilio-run/src/config/__mocks__/utils.ts
@@ -12,8 +12,8 @@ export let _envPath = '/some/path/to/env';
 export let _serviceName = 'test_service_name';
 
 export let _credentials = {
-  accountSid: 'ACyyyyyyyy',
-  authToken: 'test_auth_token',
+  username: 'ACyyyyyyyy',
+  password: 'test_auth_token',
 };
 
 export const getServiceNameFromFlags = jest.fn(() => {
diff --git a/packages/twilio-run/src/config/deploy.ts b/packages/twilio-run/src/config/deploy.ts
index 61afbc8..0095711 100644
--- a/packages/twilio-run/src/config/deploy.ts
+++ b/packages/twilio-run/src/config/deploy.ts
@@ -66,8 +66,8 @@ export async function getConfigFromFlags(
   }
 
   const configFlags = readSpecializedConfig(cwd, flags.config, 'deploy', {
-    accountSid:
-      flags.accountSid ||
+    username:
+      flags.username ||
       (externalCliOptions && externalCliOptions.accountSid) ||
       undefined,
     environmentSuffix: flags.environment,
@@ -77,7 +77,7 @@ export async function getConfigFromFlags(
   cwd = flags.cwd || cwd;
 
   const { localEnv: envFileVars, envPath } = await readLocalEnvFile(flags);
-  const { accountSid, authToken } = await getCredentialsFromFlags(
+  const { username, password } = await getCredentialsFromFlags(
     flags,
     envFileVars,
     externalCliOptions
@@ -91,10 +91,10 @@ export async function getConfigFromFlags(
       cwd,
       flags.config,
       'deploy',
-      flags.accountSid && flags.accountSid.startsWith('AC')
-        ? flags.accountSid
-        : accountSid.startsWith('AC')
-        ? accountSid
+      flags.username && flags.username.startsWith('AC')
+        ? flags.username
+        : username.startsWith('AC')
+        ? username
         : externalCliOptions?.accountSid
     ));
 
@@ -113,8 +113,8 @@ export async function getConfigFromFlags(
   return {
     cwd,
     envPath,
-    username: accountSid,
-    password: authToken,
+    username,
+    password,
     env,
     serviceSid,
     pkgJson,
diff --git a/packages/twilio-run/src/config/global.ts b/packages/twilio-run/src/config/global.ts
index 7219b23..d66b936 100644
--- a/packages/twilio-run/src/config/global.ts
+++ b/packages/twilio-run/src/config/global.ts
@@ -5,7 +5,7 @@ import {
 import { getConfig } from './utils/configLoader';
 
 export type SpecializedConfigOptions = {
-  accountSid: string;
+  username: string;
   environmentSuffix: string;
 };
 
@@ -57,13 +57,13 @@ export function readSpecializedConfig<T extends CommandConfigurationNames>(
   // override if project specific config exists
   if (
     opts &&
-    opts.accountSid &&
+    opts.username &&
     projectsConfig &&
-    projectsConfig[opts.accountSid]
+    projectsConfig[opts.username]
   ) {
     result = {
       ...result,
-      ...projectsConfig[opts.accountSid],
+      ...projectsConfig[opts.username],
     };
   }
 
diff --git a/packages/twilio-run/src/config/list.ts b/packages/twilio-run/src/config/list.ts
index a9fb05f..8416496 100644
--- a/packages/twilio-run/src/config/list.ts
+++ b/packages/twilio-run/src/config/list.ts
@@ -55,8 +55,8 @@ export async function getConfigFromFlags(
   flags.cwd = cwd;
 
   const configFlags = readSpecializedConfig(cwd, flags.config, 'list', {
-    accountSid:
-      flags.accountSid ||
+    username:
+      flags.username ||
       (externalCliOptions && externalCliOptions.accountSid) ||
       undefined,
     environmentSuffix: flags.environment,
@@ -66,7 +66,7 @@ export async function getConfigFromFlags(
   cwd = flags.cwd || cwd;
 
   const { localEnv: envFileVars, envPath } = await readLocalEnvFile(flags);
-  const { accountSid, authToken } = await getCredentialsFromFlags(
+  const { username, password } = await getCredentialsFromFlags(
     flags,
     envFileVars,
     externalCliOptions
@@ -78,10 +78,10 @@ export async function getConfigFromFlags(
       cwd,
       flags.config,
       'list',
-      flags.accountSid?.startsWith('AC')
-        ? flags.accountSid
-        : accountSid.startsWith('AC')
-        ? accountSid
+      flags.username?.startsWith('AC')
+        ? flags.username
+        : username.startsWith('AC')
+        ? username
         : externalCliOptions?.accountSid
     ));
 
@@ -93,8 +93,8 @@ export async function getConfigFromFlags(
 
   return {
     cwd,
-    username: accountSid,
-    password: authToken,
+    username,
+    password,
     serviceSid,
     serviceName,
     environment: flags.environment,
diff --git a/packages/twilio-run/src/config/logs.ts b/packages/twilio-run/src/config/logs.ts
index 8dda687..23524ef 100644
--- a/packages/twilio-run/src/config/logs.ts
+++ b/packages/twilio-run/src/config/logs.ts
@@ -49,8 +49,8 @@ export async function getConfigFromFlags(
   flags.environment = environment;
 
   const configFlags = readSpecializedConfig(cwd, flags.config, 'logs', {
-    accountSid:
-      flags.accountSid ||
+    username:
+      flags.username ||
       (externalCliOptions && externalCliOptions.accountSid) ||
       undefined,
     environmentSuffix: environment,
@@ -61,7 +61,7 @@ export async function getConfigFromFlags(
   environment = flags.environment || environment;
 
   const { localEnv: envFileVars, envPath } = await readLocalEnvFile(flags);
-  const { accountSid, authToken } = await getCredentialsFromFlags(
+  const { username, password } = await getCredentialsFromFlags(
     flags,
     envFileVars,
     externalCliOptions
@@ -75,10 +75,10 @@ export async function getConfigFromFlags(
       cwd,
       flags.config,
       'logs',
-      flags.accountSid?.startsWith('AC')
-        ? flags.accountSid
-        : accountSid.startsWith('AC')
-        ? accountSid
+      flags.username?.startsWith('AC')
+        ? flags.username
+        : username.startsWith('AC')
+        ? username
         : externalCliOptions?.accountSid
     ));
 
@@ -89,8 +89,8 @@ export async function getConfigFromFlags(
 
   return {
     cwd,
-    username: accountSid,
-    password: authToken,
+    username,
+    password,
     environment,
     serviceSid,
     outputFormat,
diff --git a/packages/twilio-run/src/config/promote.ts b/packages/twilio-run/src/config/promote.ts
index c8438f2..b6466b9 100644
--- a/packages/twilio-run/src/config/promote.ts
+++ b/packages/twilio-run/src/config/promote.ts
@@ -49,8 +49,8 @@ export async function getConfigFromFlags(
   }
 
   const configFlags = readSpecializedConfig(cwd, flags.config, 'promote', {
-    accountSid:
-      flags.accountSid ||
+    username:
+      flags.username ||
       (externalCliOptions && externalCliOptions.accountSid) ||
       undefined,
     environmentSuffix: flags.environment,
@@ -60,7 +60,7 @@ export async function getConfigFromFlags(
   cwd = flags.cwd || cwd;
 
   const { localEnv: envVariables } = await readLocalEnvFile(flags);
-  const { accountSid, authToken } = await getCredentialsFromFlags(
+  const { username, password } = await getCredentialsFromFlags(
     flags,
     envVariables,
     externalCliOptions
@@ -75,10 +75,10 @@ export async function getConfigFromFlags(
       cwd,
       flags.config,
       'promote',
-      flags.accountSid?.startsWith('AC')
-        ? flags.accountSid
-        : accountSid.startsWith('AC')
-        ? accountSid
+      flags.username?.startsWith('AC')
+        ? flags.username
+        : username.startsWith('AC')
+        ? username
         : externalCliOptions?.accountSid
     ));
 
@@ -88,8 +88,8 @@ export async function getConfigFromFlags(
 
   return {
     cwd,
-    username: accountSid,
-    password: authToken,
+    username,
+    password,
     serviceSid,
     force: flags.force,
     createEnvironment: flags.createEnvironment,
diff --git a/packages/twilio-run/src/config/start.ts b/packages/twilio-run/src/config/start.ts
index f179b3d..56f537f 100644
--- a/packages/twilio-run/src/config/start.ts
+++ b/packages/twilio-run/src/config/start.ts
@@ -54,7 +54,7 @@ export type ConfigurableStartCliFlags = Pick<
   | 'legacyMode'
   | 'assetsFolder'
   | 'functionsFolder'
-  | 'experimentalForkProcess'
+  | 'forkProcess'
 >;
 export type StartCliFlags = Arguments<
   ConfigurableStartCliFlags & { dir?: string }
@@ -158,7 +158,7 @@ export async function getConfigFromCli(
     flags.config,
     'start',
     {
-      accountSid:
+      username:
         (externalCliOptions && externalCliOptions.accountSid) || undefined,
     }
   ) as StartCliFlags;
@@ -176,7 +176,7 @@ export async function getConfigFromCli(
   config.appName = 'twilio-run';
   config.assetsFolderName = cli.assetsFolder;
   config.functionsFolderName = cli.functionsFolder;
-  config.forkProcess = cli.experimentalForkProcess;
+  config.forkProcess = cli.forkProcess;
 
   return config;
 }
diff --git a/packages/twilio-run/src/config/utils/credentials.ts b/packages/twilio-run/src/config/utils/credentials.ts
index 0608c01..a2991af 100644
--- a/packages/twilio-run/src/config/utils/credentials.ts
+++ b/packages/twilio-run/src/config/utils/credentials.ts
@@ -6,18 +6,21 @@ import { getDebugFunction } from '../../utils/logger';
 const debug = getDebugFunction('twilio-run:config:credentials');
 
 export type Credentials = {
-  accountSid: string;
-  authToken: string;
+  username: string;
+  password: string;
 };
 
 /**
  * Determines the credentials by the following order of preference:
  * 1. value via explicit flags
- * 2. value passed in through externalCliOptions if `profile` exists
- * 3. value passed in through externalCliOptions if `project` (deprecated and removed in `@twilio/cli-core` v3) exists
- * 4. value in .env file
- * 5. value passed in through externalCliOptions
- * 6. empty string
+ * If the command is twilio-run deploy
+ *   2. value in .env file
+ *   3. empty string
+ * Else if the plugin is run from the Twilio CLI then
+ *   2. value passed in through externalCliOptions if `profile` exists
+ *   3. value passed in through externalCliOptions if `project` (deprecated and removed in `@twilio/cli-core` v3) exists
+ *   4. value passed in through externalCliOptions
+ *   5. empty string
  * @param flags Flags passed into command
  * @param envVariables Environment variables from (.env or system environment)
  * @param externalCliOptions Any external information for example passed by the Twilio CLI
@@ -30,49 +33,36 @@ export async function getCredentialsFromFlags<
   externalCliOptions?: ExternalCliOptions
 ): Promise<Credentials> {
   // default Twilio CLI credentials (4) or empty string (5)
-  let accountSid =
-    (externalCliOptions &&
-      !(externalCliOptions.profile || externalCliOptions.project) &&
-      externalCliOptions.username) ||
-    '';
-  let authToken =
-    (externalCliOptions &&
-      !(externalCliOptions.profile || externalCliOptions.project) &&
-      externalCliOptions.password) ||
-    '';
+  let username = '';
+  let password = '';
 
-  // env file content (3)
-  if (envVariables.ACCOUNT_SID) {
-    debug('Override value with .env ACCOUNT_SID value');
-    accountSid = envVariables.ACCOUNT_SID;
-  }
-  if (envVariables.AUTH_TOKEN) {
-    debug('Override value with .env AUTH_TOKEN value');
-    authToken = envVariables.AUTH_TOKEN;
-  }
-
-  // specific profile specified. override both credentials (2)
-  if (
-    externalCliOptions &&
-    (externalCliOptions.profile || externalCliOptions.project)
-  ) {
-    debug('Values read from explicit CLI profile');
-    accountSid = externalCliOptions.username;
-    authToken = externalCliOptions.password;
+  if (externalCliOptions) {
+    debug('Using account credentials from Twilio CLI');
+    username = externalCliOptions.username;
+    password = externalCliOptions.password;
+  } else {
+    if (envVariables.ACCOUNT_SID) {
+      debug('Using Account SID from env variables');
+      username = envVariables.ACCOUNT_SID;
+    }
+    if (envVariables.AUTH_TOKEN) {
+      debug('Using Auth Token from env variables');
+      password = envVariables.AUTH_TOKEN;
+    }
   }
 
   // specific flag passed. override for that flag (1)
-  if (flags.accountSid) {
+  if (flags.username) {
     debug('Override accountSid with value from flag');
-    accountSid = flags.accountSid;
+    username = flags.username;
   }
-  if (flags.authToken) {
+  if (flags.password) {
     debug('Override authToken with value from flag');
-    authToken = flags.authToken;
+    password = flags.password;
   }
 
   return {
-    accountSid,
-    authToken,
+    username,
+    password,
   };
 }
diff --git a/packages/twilio-run/src/flags.ts b/packages/twilio-run/src/flags.ts
index 32a6004..eff0643 100644
--- a/packages/twilio-run/src/flags.ts
+++ b/packages/twilio-run/src/flags.ts
@@ -42,16 +42,16 @@ export const sharedApiRelatedCliOptions = {
     hidden: true,
     describe: 'Twilio API Region',
   } as Options,
-  'account-sid': {
+  username: {
     type: 'string',
     alias: 'u',
     describe:
-      'A specific account SID to be used for deployment. Uses fields in .env otherwise',
+      'A specific API key or account SID to be used for deployment. Uses fields in .env otherwise',
   } as Options,
-  'auth-token': {
+  password: {
     type: 'string',
     describe:
-      'Use a specific auth token for deployment. Uses fields from .env otherwise',
+      'A specific API secret or auth token for deployment. Uses fields from .env otherwise',
   } as Options,
   'load-system-env': {
     default: false,
@@ -220,11 +220,11 @@ export const ALL_FLAGS = {
     describe:
       'Enables legacy mode, it will prefix your asset paths with /assets',
   } as Options,
-  'experimental-fork-process': {
+  'fork-process': {
     type: 'boolean',
     describe:
-      'Enable forking function processes to emulate production environment',
-    default: false,
+      'Disable forking function processes to emulate production environment',
+    default: true,
   } as Options,
   runtime: {
     type: 'string',
@@ -257,8 +257,8 @@ export type SharedFlags = BaseFlags & {
 export type SharedFlagNames = keyof SharedFlags;
 
 export type SharedFlagsWithCredentials = SharedFlags & {
-  accountSid?: string;
-  authToken?: string;
+  username?: string;
+  password?: string;
   region?: string;
   edge?: string;
   loadSystemEnv: boolean;
@@ -295,6 +295,6 @@ export type AllAvailableFlagTypes = SharedFlagsWithCredentials & {
   inspect?: string;
   inspectBrk?: string;
   legacyMode: boolean;
-  experimentalForkProcess: boolean;
+  forkProcess: boolean;
   runtime?: string;
 };
diff --git a/packages/twilio-run/src/printers/activate.ts b/packages/twilio-run/src/printers/activate.ts
index c2711bc..b7586a0 100644
--- a/packages/twilio-run/src/printers/activate.ts
+++ b/packages/twilio-run/src/printers/activate.ts
@@ -9,8 +9,8 @@ import terminalLink = require('terminal-link');
 
 export function printActivateConfig(config: PromoteConfig) {
   const message = chalk`
-    {cyan.bold Account} ${config.username}
-    {cyan.bold Token}   ${redactPartOfString(config.password)}
+    {cyan.bold Username} ${config.username}
+    {cyan.bold Password} ${redactPartOfString(config.password)}
   `;
   logger.info(stripIndent(message) + '\n');
 }
diff --git a/packages/twilio-run/src/printers/deploy.ts b/packages/twilio-run/src/printers/deploy.ts
index e3c72cd..942aeb0 100644
--- a/packages/twilio-run/src/printers/deploy.ts
+++ b/packages/twilio-run/src/printers/deploy.ts
@@ -86,8 +86,8 @@ function prettyPrintConfigInfo(config: DeployLocalProjectConfig) {
   logger.info('\nDeploying functions & assets to the Twilio Runtime');
   writeOutput(
     chalk`
-{bold.cyan Account}\t\t${config.username}
-{bold.cyan Token}\t\t${redactPartOfString(config.password)}
+{bold.cyan Username}\t\t${config.username}
+{bold.cyan Password}\t\t${redactPartOfString(config.password)}
 {bold.cyan Service Name}\t${config.serviceName}
 {bold.cyan Environment}\t${config.functionsEnv}
 {bold.cyan Root Directory}\t${config.cwd}
diff --git a/packages/twilio-run/src/printers/list.ts b/packages/twilio-run/src/printers/list.ts
index e88507b..46daa38 100644
--- a/packages/twilio-run/src/printers/list.ts
+++ b/packages/twilio-run/src/printers/list.ts
@@ -296,8 +296,8 @@ function printListResultTerminal(result: ListResult, config: ListConfig): void {
     .join(`\n\n${chalk.dim(LONG_LINE)}\n\n`);
 
   let metaInfo = stripIndent(chalk`
-    {cyan.bold Account}      ${config.username}
-    {cyan.bold Token}        ${redactPartOfString(config.password)}
+    {cyan.bold Username}     ${config.username}
+    {cyan.bold Password}     ${redactPartOfString(config.password)}
   `);
 
   if (config.serviceSid || config.serviceName) {
diff --git a/packages/twilio-run/src/runtime/route.ts b/packages/twilio-run/src/runtime/route.ts
index 173d48b..4977450 100644
--- a/packages/twilio-run/src/runtime/route.ts
+++ b/packages/twilio-run/src/runtime/route.ts
@@ -11,6 +11,7 @@ import {
 } from 'express';
 import twilio, { twiml } from 'twilio';
 import { checkForValidAccountSid } from '../checks/check-account-sid';
+import { checkForValidAuthToken } from '../checks/check-auth-token';
 import { StartCliConfig } from '../config/start';
 import { wrapErrorInHtml } from '../utils/error-html';
 import { getDebugFunction } from '../utils/logger';
@@ -46,6 +47,11 @@ export function constructContext<T extends {} = {}>(
       shouldThrowError: true,
       functionName: 'context.getTwilioClient()',
     });
+    checkForValidAuthToken(env.AUTH_TOKEN, {
+      shouldPrintMessage: true,
+      shouldThrowError: true,
+      functionName: 'context.getTwilioClient()',
+    });
 
     return twilio(env.ACCOUNT_SID, env.AUTH_TOKEN);
   }
diff --git a/packages/twilio-run/src/serverless-api/utils.ts b/packages/twilio-run/src/serverless-api/utils.ts
index ad74dd2..93992e4 100644
--- a/packages/twilio-run/src/serverless-api/utils.ts
+++ b/packages/twilio-run/src/serverless-api/utils.ts
@@ -22,29 +22,29 @@ export async function getFunctionServiceSid(
   cwd: string,
   configName: string,
   commandConfig: 'deploy' | 'list' | 'logs' | 'promote',
-  accountSid?: string
+  username?: string
 ): Promise<string | undefined> {
   const twilioConfig = readSpecializedConfig(cwd, configName, commandConfig, {
-    accountSid,
+    username,
   });
   if (twilioConfig.serviceSid) {
     debug('Found serviceSid in config, "%s"', twilioConfig.serviceSid);
     return twilioConfig.serviceSid;
   }
 
-  if (accountSid) {
+  if (username) {
     debug('Attempting to read serviceSid from a deployinfo file');
     const deployInfoCache = getDeployInfoCache(cwd);
     if (
       deployInfoCache &&
-      deployInfoCache[accountSid] &&
-      deployInfoCache[accountSid].serviceSid
+      deployInfoCache[username] &&
+      deployInfoCache[username].serviceSid
     ) {
       debug(
         'Found service sid from debug info, "%s"',
-        deployInfoCache[accountSid].serviceSid
+        deployInfoCache[username].serviceSid
       );
-      return deployInfoCache[accountSid].serviceSid;
+      return deployInfoCache[username].serviceSid;
     }
   }
 
@@ -56,13 +56,13 @@ export async function saveLatestDeploymentData(
   cwd: string,
   serviceSid: string,
   buildSid: string,
-  accountSid?: string
+  username?: string
 ): Promise<void> {
-  if (!accountSid) {
+  if (!username) {
     return;
   }
 
-  return updateDeployInfoCache(cwd, accountSid, {
+  return updateDeployInfoCache(cwd, username, {
     serviceSid,
     latestBuild: buildSid,
   });
diff --git a/packages/twilio-run/src/utils/deployInfoCache.ts b/packages/twilio-run/src/utils/deployInfoCache.ts
index 9991a38..115348a 100644
--- a/packages/twilio-run/src/utils/deployInfoCache.ts
+++ b/packages/twilio-run/src/utils/deployInfoCache.ts
@@ -12,7 +12,7 @@ export type DeployInfo = {
 };
 
 export type DeployInfoCache = {
-  [accountSid: string]: DeployInfo;
+  [username: string]: DeployInfo;
 };
 
 function validDeployInfoCache(data: unknown): data is DeployInfoCache {
@@ -60,7 +60,7 @@ export function getDeployInfoCache(
 
 export function updateDeployInfoCache(
   baseDir: string,
-  accountSid: string,
+  username: string,
   deployInfo: DeployInfo,
   deployInfoCacheFileName: string = '.twiliodeployinfo'
 ): void {
@@ -73,7 +73,7 @@ export function updateDeployInfoCache(
 
   const newDeployInfoCache = {
     ...currentDeployInfoCache,
-    [accountSid]: deployInfo,
+    [username]: deployInfo,
   };
 
   if (!validDeployInfoCache(newDeployInfoCache)) {


Test patch:
diff --git a/packages/runtime-handler/__tests__/runtime-handler.test.ts b/packages/runtime-handler/__tests__/runtime-handler.test.ts
new file mode 100644
index 0000000..88e7da8
--- /dev/null
+++ b/packages/runtime-handler/__tests__/runtime-handler.test.ts
@@ -0,0 +1,9 @@
+'use strict';
+
+const runtimeHandler = require('..');
+
+describe('@twilio/runtime-handler', () => {
+  test('exports nothing', () => {
+    expect(runtimeHandler).toEqual({});
+  });
+});
diff --git a/packages/runtime-handler/tsconfig.test.json b/packages/runtime-handler/tsconfig.test.json
new file mode 100644
index 0000000..8dabc9e
--- /dev/null
+++ b/packages/runtime-handler/tsconfig.test.json
@@ -0,0 +1,6 @@
+{
+  "extends": "../../tsconfig.base.json",
+  "compilerOptions": {
+    "incremental": true
+  }
+}
diff --git a/packages/serverless-api/src/utils/__tests__/error.test.ts b/packages/serverless-api/src/utils/__tests__/error.test.ts
index 29eaadb..f64b8fd 100644
--- a/packages/serverless-api/src/utils/__tests__/error.test.ts
+++ b/packages/serverless-api/src/utils/__tests__/error.test.ts
@@ -1,16 +1,23 @@
 import nock from 'nock';
 import util from 'util';
+import { AccountSidConfig, UsernameConfig } from '../../../dist';
 import { createGotClient } from '../../client';
+import {
+  DEFAULT_TEST_CLIENT_CONFIG,
+  DEFAULT_TEST_CLIENT_CONFIG_USERNAME_PASSWORD,
+} from '../../__fixtures__/base-fixtures';
 import { ClientApiError } from '../error';
-import { DEFAULT_TEST_CLIENT_CONFIG } from '../../__fixtures__/base-fixtures';
 
 describe('ClientApiError', () => {
   let apiNock = nock('https://serverless.twilio.com');
-  let config = DEFAULT_TEST_CLIENT_CONFIG;
+  let config:
+    | UsernameConfig
+    | AccountSidConfig = DEFAULT_TEST_CLIENT_CONFIG_USERNAME_PASSWORD;
   let apiClient = createGotClient(config);
 
   beforeEach(() => {
     apiNock = nock('https://serverless.twilio.com');
+    config = DEFAULT_TEST_CLIENT_CONFIG_USERNAME_PASSWORD;
     apiClient = createGotClient(config);
   });
 
@@ -40,12 +47,73 @@ describe('ClientApiError', () => {
       status: 400,
     });
 
+    config = DEFAULT_TEST_CLIENT_CONFIG;
+    apiClient = createGotClient(config);
+
+    try {
+      const resp = await apiClient.get('Services');
+    } catch (err) {
+      const newError = new ClientApiError(err);
+      const stringVersion = util.inspect(newError);
+      expect(stringVersion.includes(config.authToken)).toBe(false);
+    }
+  });
+
+  test('does not contain any password', async () => {
+    const scope = apiNock.get('/v1/Services').reply(400, {
+      code: 20001,
+      message: 'Services are limited to less than or equal to 9000',
+      more_info: 'https://www.twilio.com/docs/errors/20001',
+      status: 400,
+    });
+
     try {
       const resp = await apiClient.get('Services');
     } catch (err) {
       const newError = new ClientApiError(err);
       const stringVersion = util.inspect(newError);
-      expect(stringVersion).not.toContain(config.authToken);
+      expect(stringVersion.includes((config as UsernameConfig).password)).toBe(
+        false
+      );
+    }
+  });
+
+  test('contains URL and status code for basic HTTP Errors', async () => {
+    const scope = apiNock.get('/v1/Services/ZS1111').reply(404, {});
+
+    try {
+      const resp = await apiClient.get('Services/ZS1111');
+    } catch (err) {
+      const newError = new ClientApiError(err);
+      const expectedUrl = 'https://serverless.twilio.com/v1/Services/ZS1111';
+      expect(newError.code).toEqual(404);
+      expect(newError.url).toEqual(expectedUrl);
+
+      const stringVersion = util.inspect(newError);
+      expect(stringVersion.includes(expectedUrl)).toBe(true);
+      expect(stringVersion.includes('404')).toBe(true);
+    }
+  });
+
+  test('contains URL and API code for Twilio API Errrors', async () => {
+    const scope = apiNock.get('/v1/Services/ZS1111').reply(400, {
+      code: 20001,
+      message: 'Services are limited to less than or equal to 9000',
+      more_info: 'https://www.twilio.com/docs/errors/20001',
+      status: 400,
+    });
+
+    try {
+      const resp = await apiClient.get('Services/ZS1111');
+    } catch (err) {
+      const newError = new ClientApiError(err);
+      const expectedUrl = 'https://serverless.twilio.com/v1/Services/ZS1111';
+      expect(newError.code).toEqual(20001);
+      expect(newError.url).toEqual(expectedUrl);
+
+      const stringVersion = util.inspect(newError);
+      expect(stringVersion.includes(expectedUrl)).toBe(true);
+      expect(stringVersion.includes('20001')).toBe(true);
     }
   });
 });
diff --git a/packages/twilio-run/__tests__/config/global.test.ts b/packages/twilio-run/__tests__/config/global.test.ts
index 177bc5b..4cd292d 100644
--- a/packages/twilio-run/__tests__/config/global.test.ts
+++ b/packages/twilio-run/__tests__/config/global.test.ts
@@ -120,7 +120,7 @@ describe('readSpecializedConfig', () => {
     expect(
       readSpecializedConfig('/tmp', '.twilioserverlessrc', 'deploy', {
         environmentSuffix: 'stage',
-        accountSid: 'AC11112222111122221111222211114444',
+        username: 'AC11112222111122221111222211114444',
       })
     ).toEqual({
       serviceSid: 'ZS11112222111122221111222211114444',
diff --git a/packages/twilio-run/__tests__/config/utils/credentials.test.ts b/packages/twilio-run/__tests__/config/utils/credentials.test.ts
index 5b34fb5..b18f2d0 100644
--- a/packages/twilio-run/__tests__/config/utils/credentials.test.ts
+++ b/packages/twilio-run/__tests__/config/utils/credentials.test.ts
@@ -11,20 +11,20 @@ describe('getCredentialsFromFlags', () => {
   test('should return empty if nothing is passed', async () => {
     const credentials = await getCredentialsFromFlags(baseFlags, {}, undefined);
     expect(credentials).toEqual({
-      accountSid: '',
-      authToken: '',
+      username: '',
+      password: '',
     });
   });
 
   test('should return flag values if passed', async () => {
     const credentials = await getCredentialsFromFlags(
-      { ...baseFlags, accountSid: 'ACxxxxx', authToken: 'some-token' },
+      { ...baseFlags, username: 'ACxxxxx', password: 'some-token' },
       {},
       undefined
     );
     expect(credentials).toEqual({
-      accountSid: 'ACxxxxx',
-      authToken: 'some-token',
+      username: 'ACxxxxx',
+      password: 'some-token',
     });
   });
 
@@ -38,8 +38,8 @@ describe('getCredentialsFromFlags', () => {
       undefined
     );
     expect(credentials).toEqual({
-      accountSid: 'ACyyyyyyyyy',
-      authToken: 'example-token',
+      username: 'ACyyyyyyyyy',
+      password: 'example-token',
     });
   });
 
@@ -50,12 +50,12 @@ describe('getCredentialsFromFlags', () => {
       { username: 'ACzzzzzzz', password: 'api-secret', profile: undefined }
     );
     expect(credentials).toEqual({
-      accountSid: 'ACzzzzzzz',
-      authToken: 'api-secret',
+      username: 'ACzzzzzzz',
+      password: 'api-secret',
     });
   });
 
-  test('env variables should override external default options', async () => {
+  test('env variables should not override external default options', async () => {
     const credentials = await getCredentialsFromFlags(
       { ...baseFlags },
       {
@@ -65,8 +65,8 @@ describe('getCredentialsFromFlags', () => {
       { username: 'ACzzzzzzz', password: 'api-secret', profile: undefined }
     );
     expect(credentials).toEqual({
-      accountSid: 'ACyyyyyyyyy',
-      authToken: 'example-token',
+      username: 'ACzzzzzzz',
+      password: 'api-secret',
     });
   });
 
@@ -80,8 +80,8 @@ describe('getCredentialsFromFlags', () => {
       { username: 'ACzzzzzzz', password: 'api-secret', profile: 'demo' }
     );
     expect(credentials).toEqual({
-      accountSid: 'ACzzzzzzz',
-      authToken: 'api-secret',
+      username: 'ACzzzzzzz',
+      password: 'api-secret',
     });
   });
 
@@ -104,8 +104,8 @@ describe('getCredentialsFromFlags', () => {
       }
     );
     expect(credentials).toEqual({
-      accountSid: 'ACzzzzzzz',
-      authToken: 'api-secret',
+      username: 'ACzzzzzzz',
+      password: 'api-secret',
     });
   });
 
@@ -119,8 +119,8 @@ describe('getCredentialsFromFlags', () => {
       { username: 'ACzzzzzzz', password: 'api-secret', profile: 'demo' }
     );
     expect(credentials).toEqual({
-      accountSid: 'ACzzzzzzz',
-      authToken: 'api-secret',
+      username: 'ACzzzzzzz',
+      password: 'api-secret',
     });
   });
 
@@ -136,14 +136,14 @@ describe('getCredentialsFromFlags', () => {
       { username: 'ACzzzzzzz', password: 'api-secret', project: 'demo' }
     );
     expect(credentials).toEqual({
-      accountSid: 'ACzzzzzzz',
-      authToken: 'api-secret',
+      username: 'ACzzzzzzz',
+      password: 'api-secret',
     });
   });
 
   test('should prefer flag over everything', async () => {
     const credentials = await getCredentialsFromFlags(
-      { ...baseFlags, accountSid: 'ACxxxxx', authToken: 'some-token' },
+      { ...baseFlags, username: 'ACxxxxx', password: 'some-token' },
       {
         ACCOUNT_SID: 'ACyyyyyyyyy',
         AUTH_TOKEN: 'example-token',
@@ -156,8 +156,8 @@ describe('getCredentialsFromFlags', () => {
       }
     );
     expect(credentials).toEqual({
-      accountSid: 'ACxxxxx',
-      authToken: 'some-token',
+      username: 'ACxxxxx',
+      password: 'some-token',
     });
   });
 });
diff --git a/packages/twilio-run/__tests__/runtime/route.test.ts b/packages/twilio-run/__tests__/runtime/route.test.ts
index 2fecb17..824ed46 100644
--- a/packages/twilio-run/__tests__/runtime/route.test.ts
+++ b/packages/twilio-run/__tests__/runtime/route.test.ts
@@ -199,22 +199,22 @@ describe('constructContext function', () => {
     const config = {
       url: 'http://localhost:8000',
       env: {
-        ACCOUNT_SID: 'ACxxxxxxxxxxx',
-        AUTH_TOKEN: 'xyz',
+        ACCOUNT_SID: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
+        AUTH_TOKEN: 'authauthauthauthauthauthauthauth',
       },
     } as StartCliConfig;
     const context = constructContext(config, '/test');
     expect(context.DOMAIN_NAME).toBe('localhost:8000');
     expect(context.PATH).toBe('/test');
-    expect(context.ACCOUNT_SID).toBe('ACxxxxxxxxxxx');
-    expect(context.AUTH_TOKEN).toBe('xyz');
+    expect(context.ACCOUNT_SID).toBe('ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
+    expect(context.AUTH_TOKEN).toBe('authauthauthauthauthauthauthauth');
     expect(typeof context.getTwilioClient).toBe('function');
   });
 
   test('does not override existing PATH values', () => {
     const env: EnvironmentVariablesWithAuth = {
-      ACCOUNT_SID: 'ACxxxxxxxxxxx',
-      AUTH_TOKEN: 'xyz',
+      ACCOUNT_SID: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
+      AUTH_TOKEN: 'authauthauthauthauthauthauthauth',
       PATH: '/usr/bin:/bin',
     };
 
@@ -228,8 +228,8 @@ describe('constructContext function', () => {
 
   test('does not override existing DOMAIN_NAME values', () => {
     const env: EnvironmentVariablesWithAuth = {
-      ACCOUNT_SID: 'ACxxxxxxxxxxx',
-      AUTH_TOKEN: 'xyz',
+      ACCOUNT_SID: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
+      AUTH_TOKEN: 'authauthauthauthauthauthauthauth',
       DOMAIN_NAME: 'hello.world',
     };
 
@@ -243,7 +243,7 @@ describe('constructContext function', () => {
 
   test('getTwilioClient calls twilio constructor', () => {
     const ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
-    const AUTH_TOKEN = 'xyz';
+    const AUTH_TOKEN = 'authauthauthauthauthauthauthauth';
 
     const config = {
       url: 'http://localhost:8000',
@@ -254,14 +254,14 @@ describe('constructContext function', () => {
     context.getTwilioClient();
     expect(twilioFn).toHaveBeenCalledWith(
       'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
-      'xyz'
+      'authauthauthauthauthauthauthauth'
     );
   });
 });
 
 describe('constructGlobalScope function', () => {
   const ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
-  const AUTH_TOKEN = 'xyz';
+  const AUTH_TOKEN = 'authauthauthauthauthauthauthauth';
   let config: StartCliConfig;
 
   function resetGlobals() {
diff --git a/packages/twilio-run/__tests__/templating/__snapshots__/defaultConfig.test.ts.snap b/packages/twilio-run/__tests__/templating/__snapshots__/defaultConfig.test.ts.snap
index 475c496..6d58602 100644
--- a/packages/twilio-run/__tests__/templating/__snapshots__/defaultConfig.test.ts.snap
+++ b/packages/twilio-run/__tests__/templating/__snapshots__/defaultConfig.test.ts.snap
@@ -5,10 +5,8 @@ exports[`writeDefaultConfigFile default file should match snapshot 1`] = `
 	\\"commands\\": {},
 	\\"environments\\": {},
 	\\"projects\\": {},
-	// \\"accountSid\\": null 	/* A specific account SID to be used for deployment. Uses fields in .env otherwise */,
 	// \\"assets\\": true 	/* Upload assets. Can be turned off with --no-assets */,
 	// \\"assetsFolder\\": null 	/* Specific folder name to be used for static assets */,
-	// \\"authToken\\": null 	/* Use a specific auth token for deployment. Uses fields from .env otherwise */,
 	// \\"buildSid\\": null 	/* An existing Build SID to deploy to the new environment */,
 	// \\"config\\": null 	/* Location of the config file. Absolute path or relative to current working directory (cwd) */,
 	// \\"createEnvironment\\": false 	/* Creates environment if it couldn't find it. */,
@@ -17,9 +15,9 @@ exports[`writeDefaultConfigFile default file should match snapshot 1`] = `
 	// \\"edge\\": null 	/* Twilio API Region */,
 	// \\"env\\": null 	/* Path to .env file for environment variables that should be installed */,
 	// \\"environment\\": \\"dev\\" 	/* The environment name (domain suffix) you want to use for your deployment */,
-	// \\"experimentalForkProcess\\": false 	/* Enable forking function processes to emulate production environment */,
 	// \\"extendedOutput\\": false 	/* Show an extended set of properties on the output */,
 	// \\"force\\": false 	/* Will run deployment in force mode. Can be dangerous. */,
+	// \\"forkProcess\\": true 	/* Disable forking function processes to emulate production environment */,
 	// \\"functionSid\\": null 	/* Specific Function SID to retrieve logs for */,
 	// \\"functions\\": true 	/* Upload functions. Can be turned off with --no-functions */,
 	// \\"functionsFolder\\": null 	/* Specific folder name to be used for static functions */,
@@ -35,6 +33,7 @@ exports[`writeDefaultConfigFile default file should match snapshot 1`] = `
 	// \\"ngrok\\": null 	/* Uses ngrok to create a public url. Pass a string to set the subdomain (requires a paid-for ngrok account). */,
 	// \\"outputFormat\\": \\"\\" 	/* Output the log in a different format */,
 	// \\"overrideExistingProject\\": false 	/* Deploys Serverless project to existing service if a naming conflict has been found. */,
+	// \\"password\\": null 	/* A specific API secret or auth token for deployment. Uses fields from .env otherwise */,
 	// \\"port\\": \\"3000\\" 	/* Override default port of 3000 */,
 	// \\"production\\": false 	/* Promote build to the production environment (no domain suffix). Overrides environment flag */,
 	// \\"properties\\": null 	/* Specify the output properties you want to see. Works best on single types */,
@@ -45,5 +44,6 @@ exports[`writeDefaultConfigFile default file should match snapshot 1`] = `
 	// \\"sourceEnvironment\\": null 	/* SID or suffix of an existing environment you want to deploy from. */,
 	// \\"tail\\": false 	/* Continuously stream the logs */,
 	// \\"template\\": null 	/* undefined */,
+	// \\"username\\": null 	/* A specific API key or account SID to be used for deployment. Uses fields in .env otherwise */,
 }"
 `;