|
1 | 1 | import boxen from 'boxen';
|
2 | 2 | import chalk from 'chalk';
|
3 | 3 | import { stripIndent } from 'common-tags';
|
4 |
| -import wrapAnsi from 'wrap-ansi'; |
5 |
| -import size from 'window-size'; |
6 | 4 | import logSymbols from 'log-symbols';
|
| 5 | +import size from 'window-size'; |
| 6 | +import wrapAnsi from 'wrap-ansi'; |
| 7 | +import { StartCliConfig } from '../runtime/cli/config'; |
7 | 8 | import {
|
8 |
| - getFunctionsAndAssets, |
9 |
| - FunctionInfo, |
10 | 9 | AssetInfo,
|
| 10 | + FunctionInfo, |
| 11 | + getFunctionsAndAssets, |
11 | 12 | } from '../runtime/internal/runtime-paths';
|
12 | 13 | import { shouldPrettyPrint, terminalLink } from './utils';
|
13 |
| -import { StartCliConfig } from '../runtime/cli/config'; |
14 | 14 |
|
15 | 15 | function printAsset(asset: AssetInfo, config: StartCliConfig): string {
|
16 | 16 | const prefix = config.legacyMode ? '/asset' : '';
|
@@ -138,13 +138,16 @@ export async function printRouteInfo(config: StartCliConfig): Promise<void> {
|
138 | 138 | console.log(output);
|
139 | 139 | }
|
140 | 140 |
|
141 |
| -export function printVersionWarning(nodeVersion: string): void { |
| 141 | +export function printVersionWarning( |
| 142 | + nodeVersion: string, |
| 143 | + expectedVersion: string |
| 144 | +): void { |
142 | 145 | const msg = chalk`
|
143 | 146 | {underline.bold {yellow WARNING!} {bold Different Node.js version}}
|
144 | 147 |
|
145 |
| - You are currently running ${nodeVersion} but the Twilio Runtime is runnning version 8.10. |
| 148 | + You are currently running Node.js ${nodeVersion} on this local machine. The production environment for Twilio Serverless is currently on ${expectedVersion}. |
146 | 149 |
|
147 |
| - You might encounter differences between local development and production. |
| 150 | + When you deploy to Twilio Serverless, you may encounter differences between local development and production. |
148 | 151 |
|
149 | 152 | For a more accurate local development experience, please switch your Node.js version.
|
150 | 153 | A tool like nvm (https://github.com/creationix/nvm) can help.
|
|
0 commit comments