Skip to content

Commit fc82417

Browse files
committed
chore: update lock file deps
2 parents f122c60 + 955efbe commit fc82417

File tree

12 files changed

+3543
-3622
lines changed

12 files changed

+3543
-3622
lines changed

.github/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ newIssueWelcomeComment: |
66
firstPRMergeComment: >
77
Congratulations on your first contribution to the Serverless Toolkit!
88
9-
We'd love to say thank you and send you some swag. If you are interested please fill out this form at https://twil.io/hacktoberfest-swag
10-
119
If you are on the look out for more ways to contribute to open-source,
1210
check out a list of some of our repositories at https://github.com/twilio/opensource.
1311
12+
If you want to stay up-to-date with Twilio's OSS activities, subscribe here: https://twil.io/oss-updates
13+
1414
And if you love Twilio as much as we do, make sure to check out our
1515
[Twilio Champions program](https://www.twilio.com/champions)!

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,5 @@ typings/
6363
.vscode/settings.json
6464
dist/
6565

66-
*.tsbuildinfo
66+
*.tsbuildinfo
67+
.twilio-functions

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.10
1+
10.17

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ language: node_js
22

33
node_js:
44
- 'stable'
5-
- '8'
6-
- '9'
75
- '10'
6+
- '12'
87

98
sudo: false
109

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ This project contains the CLI aspects of deploying Twilio Serverless as well as
1212

1313
## Requirements
1414

15-
Make sure you have Node.js 8.10 or newer installed. Due to compatibility with Twilio
16-
Functions this project has to support at least Node.js 8.10.
15+
Make sure you have Node.js 10.17 or newer installed. Due to compatibility with Twilio
16+
Functions this project has to support at least Node.js 10.17.
1717

1818
## Setup
1919

@@ -28,7 +28,7 @@ npm install
2828

2929
1. Perform changes
3030
2. Make sure tests pass by running `npm test`
31-
3. Run `git commit` to kick off validation and enter your commit message. We are using [conventional commits](https://www.conventionalcommits.org/en/) for this project. When you run `git commit` it will trigger [`commitizen`](https://npm.im/commitizen) to assist you with your commit message.
31+
3. Run `git commit` to kick off validation and enter your commit message. We are using [conventional commits](https://www.conventionalcommits.org/en/) for this project. When you run `npm run cm` it will trigger [`commitizen`](https://npm.im/commitizen) to assist you with your commit message.
3232
4. Submit a Pull Request
3333

3434
**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)

__tests__/runtime/route.test.ts

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
handleSuccess,
1919
isTwiml,
2020
} from '../../src/runtime/route';
21+
import { EnvironmentVariablesWithAuth } from '../../src/types/generic';
2122
import { wrapErrorInHtml } from '../../src/utils/error-html';
2223

2324
const { VoiceResponse, MessagingResponse, FaxResponse } = twiml;
@@ -182,13 +183,44 @@ describe('constructContext function', () => {
182183
AUTH_TOKEN: 'xyz',
183184
},
184185
} as StartCliConfig;
185-
const context = constructContext(config);
186+
const context = constructContext(config, '/test');
186187
expect(context.DOMAIN_NAME).toBe('localhost:8000');
188+
expect(context.PATH).toBe('/test');
187189
expect(context.ACCOUNT_SID).toBe('ACxxxxxxxxxxx');
188190
expect(context.AUTH_TOKEN).toBe('xyz');
189191
expect(typeof context.getTwilioClient).toBe('function');
190192
});
191193

194+
test('does not override existing PATH values', () => {
195+
const env: EnvironmentVariablesWithAuth = {
196+
ACCOUNT_SID: 'ACxxxxxxxxxxx',
197+
AUTH_TOKEN: 'xyz',
198+
PATH: '/usr/bin:/bin',
199+
};
200+
201+
const config = {
202+
url: 'http://localhost:8000',
203+
env,
204+
} as StartCliConfig;
205+
const context = constructContext(config, '/test2');
206+
expect(context.PATH).toBe('/usr/bin:/bin');
207+
});
208+
209+
test('does not override existing DOMAIN_NAME values', () => {
210+
const env: EnvironmentVariablesWithAuth = {
211+
ACCOUNT_SID: 'ACxxxxxxxxxxx',
212+
AUTH_TOKEN: 'xyz',
213+
DOMAIN_NAME: 'hello.world',
214+
};
215+
216+
const config = {
217+
url: 'http://localhost:8000',
218+
env,
219+
} as StartCliConfig;
220+
const context = constructContext(config, '/test2');
221+
expect(context.DOMAIN_NAME).toBe('hello.world');
222+
});
223+
192224
test('getTwilioClient calls twilio constructor', () => {
193225
const ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
194226
const AUTH_TOKEN = 'xyz';
@@ -197,7 +229,7 @@ describe('constructContext function', () => {
197229
url: 'http://localhost:8000',
198230
env: { ACCOUNT_SID, AUTH_TOKEN },
199231
} as StartCliConfig;
200-
const context = constructContext(config);
232+
const context = constructContext(config, '/test');
201233
const twilioFn = require('twilio');
202234
context.getTwilioClient();
203235
expect(twilioFn).toHaveBeenCalledWith(

0 commit comments

Comments
 (0)