node 18 on lambda support
This commit is contained in:
parent
f599eeede1
commit
e0b050dacf
|
|
@ -17,7 +17,7 @@ jobs:
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 18.x
|
||||||
|
|
||||||
- name: Install Packages
|
- name: Install Packages
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
@ -42,6 +42,7 @@ jobs:
|
||||||
version:
|
version:
|
||||||
- 14
|
- 14
|
||||||
- 16
|
- 16
|
||||||
|
- 18
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
|
||||||
|
|
@ -37,3 +37,14 @@ Resources:
|
||||||
- AWSLambdaBasicExecutionRole
|
- AWSLambdaBasicExecutionRole
|
||||||
- AWSXRayDaemonWriteAccess
|
- AWSXRayDaemonWriteAccess
|
||||||
Tracing: Active
|
Tracing: Active
|
||||||
|
node18:
|
||||||
|
Type: AWS::Serverless::Function
|
||||||
|
Properties:
|
||||||
|
Layers:
|
||||||
|
- !Ref layer
|
||||||
|
Handler: handlers/index.handler
|
||||||
|
Runtime: nodejs18.x
|
||||||
|
Policies:
|
||||||
|
- AWSLambdaBasicExecutionRole
|
||||||
|
- AWSXRayDaemonWriteAccess
|
||||||
|
Tracing: Active
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ interface Viewport {
|
||||||
hasTouch?: boolean;
|
hasTouch?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/^AWS_Lambda_nodejs(?:10|12|14|16)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
|
if (/^AWS_Lambda_nodejs(?:10|12|14|16|18)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
|
||||||
if (process.env.FONTCONFIG_PATH === undefined) {
|
if (process.env.FONTCONFIG_PATH === undefined) {
|
||||||
process.env.FONTCONFIG_PATH = '/tmp/aws';
|
process.env.FONTCONFIG_PATH = '/tmp/aws';
|
||||||
}
|
}
|
||||||
|
|
@ -196,7 +196,7 @@ class Chromium {
|
||||||
LambdaFS.inflate(`${input}/swiftshader.tar.br`),
|
LambdaFS.inflate(`${input}/swiftshader.tar.br`),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (/^AWS_Lambda_nodejs(?:10|12|14|16)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
|
if (/^AWS_Lambda_nodejs(?:10|12|14|16|18)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
|
||||||
promises.push(LambdaFS.inflate(`${input}/aws.tar.br`));
|
promises.push(LambdaFS.inflate(`${input}/aws.tar.br`));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue