Skip to content

Commit bd607d4

Browse files
committed
added python3.7 runtime
1 parent d2f9fe0 commit bd607d4

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To do so, it starts an HTTP server that handles the request's lifecycle like API
1010

1111
**Features:**
1212

13-
* Nodejs λ, Python 2.7, Python 3.6, and Ruby only.
13+
* Nodejs λ, Python 2.7, Python 3.6, Python 3.7, and Ruby only.
1414
* Velocity templates support.
1515
* Lazy loading of your files with require cache invalidation: no need for a reloading tool like Nodemon.
1616
* And more: integrations, authorizers, proxies, timeouts, responseParameters, HTTPS, Babel runtime, CORS, etc...

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,10 @@ class Offline {
324324
const apiKeys = this.service.provider.apiKeys;
325325
const protectedRoutes = [];
326326

327-
if (['nodejs', 'nodejs4.3', 'nodejs6.10', 'nodejs8.10', 'babel', 'python2.7', 'python3.6', 'ruby2.5'].indexOf(serviceRuntime) === -1) {
327+
if (utils.supportedRuntimes.indexOf(serviceRuntime) === -1) {
328328
this.printBlankLine();
329329
this.serverlessLog(`Warning: found unsupported runtime '${serviceRuntime}'`);
330+
this.serverlessLog(`Supported runtimes: ${utils.supportedRuntimes}`);
330331

331332
return;
332333
}

src/utils.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,16 @@ module.exports = {
1717
// Detect the toString encoding from the request headers content-type
1818
// enhance if further content types need to be non utf8 encoded.
1919
detectEncoding: request => _.includes(request.headers['content-type'], 'multipart/form-data') ? 'binary' : 'utf8',
20-
isProxyRuntime: runtime => { return runtime.startsWith('python') || runtime.startsWith('ruby') }
20+
isProxyRuntime: runtime => { return runtime.startsWith('python') || runtime.startsWith('ruby') },
21+
supportedRuntimes: [
22+
'nodejs',
23+
'nodejs4.3',
24+
'nodejs6.10',
25+
'nodejs8.10',
26+
'babel',
27+
'python2.7',
28+
'python3.6',
29+
'python3.7',
30+
'ruby2.5',
31+
],
2132
};

0 commit comments

Comments
 (0)