serverless-http-invoker 3.0.15 → 3.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,25 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
name: build
|
|
2
|
+
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches: [main, beta, alpha]
|
|
6
|
-
|
|
7
6
|
pull_request:
|
|
8
7
|
branches: [main, beta, alpha]
|
|
9
8
|
|
|
10
9
|
jobs:
|
|
11
10
|
test:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
node: [14, 16, 18, 20]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Use Node.js ${{ matrix.node }}
|
|
20
|
+
uses: actions/setup-node@v4
|
|
21
|
+
with:
|
|
22
|
+
node-version: ${{ matrix.node }}
|
|
23
|
+
cache: "npm"
|
|
24
|
+
|
|
25
|
+
- name: install dependencies
|
|
26
|
+
run: npm ci
|
|
27
|
+
|
|
28
|
+
- name: test
|
|
29
|
+
env:
|
|
30
|
+
CI_NODE_VERSION: ${{ matrix.node }}
|
|
31
|
+
run: npm test
|
|
32
|
+
|
|
33
|
+
- name: publish coverage
|
|
34
|
+
uses: coverallsapp/github-action@v2
|
|
35
|
+
continue-on-error: true
|
|
36
|
+
with:
|
|
37
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
38
|
+
flag-name: nodejs-${{ matrix.node }}
|
|
39
|
+
parallel: true
|
|
40
|
+
|
|
41
|
+
coveralls_finished:
|
|
42
|
+
needs: test
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
steps:
|
|
45
|
+
- name: coveralls finished
|
|
46
|
+
uses: coverallsapp/github-action@v2
|
|
47
|
+
continue-on-error: true
|
|
48
|
+
with:
|
|
49
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
50
|
+
parallel-finished: true
|
|
17
51
|
|
|
18
52
|
publish:
|
|
19
53
|
if: ${{ github.event_name != 'pull_request' }}
|
|
20
54
|
needs: [test]
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
environment: npm
|
|
57
|
+
permissions:
|
|
58
|
+
id-token: write # Required for npm provenance / OIDC
|
|
59
|
+
contents: write # Required for semantic-release to push tags and create releases
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@v4
|
|
62
|
+
|
|
63
|
+
- name: Use Node.js
|
|
64
|
+
uses: actions/setup-node@v4
|
|
65
|
+
with:
|
|
66
|
+
node-version: 22
|
|
67
|
+
registry-url: "https://registry.npmjs.org"
|
|
68
|
+
|
|
69
|
+
- name: Update npm
|
|
70
|
+
run: npm install -g npm@latest
|
|
71
|
+
|
|
72
|
+
- name: publish to npm
|
|
73
|
+
env:
|
|
74
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
75
|
+
run: |
|
|
76
|
+
npm ci
|
|
77
|
+
npx semantic-release@25
|
package/README.md
CHANGED
|
@@ -11,6 +11,8 @@ Locally invoke [Serverless](https://github.com/serverless/serverless) functions
|
|
|
11
11
|
|
|
12
12
|
It makes it easy to test not only your handler logic, but also ensures that you have your http events setup properly in serverless.yml without deploying.
|
|
13
13
|
|
|
14
|
+
> **Note on Serverless Framework & Node.js version support:** This project currently supports **Serverless Framework v3** and **Node.js 20** (the `nodejs20.x` Lambda runtime). Supporting the `nodejs22.x` Lambda runtime [requires upgrading to Serverless Framework v4](https://github.com/serverless/serverless/issues/12922#issuecomment-2563870220), which I haven't done yet. I maintain a number of open source projects and want to dedicate my time to the ones people are actively using. If you'd like to see support for Serverless v4 and Node.js 22, please [open an issue](https://github.com/activescott/serverless-http-invoker/issues) requesting it or submit a pull request — I'm happy to support it! — _Scott Willeke_
|
|
15
|
+
|
|
14
16
|
<!-- TOC -->
|
|
15
17
|
|
|
16
18
|
- [Usage / Quick Start](#usage--quick-start)
|
|
@@ -48,11 +50,9 @@ An exhaustive list of what is supported in Some of the more common use cases are
|
|
|
48
50
|
|
|
49
51
|
## Prerequisites / Usage Requirements
|
|
50
52
|
|
|
51
|
-
Requires Node.js
|
|
52
|
-
|
|
53
|
-
If you need Node.js v6.x - v9.x support you can use [serverless-http-invoker@0.8.6](https://www.npmjs.com/package/serverless-http-invoker/v/0.8.6).
|
|
53
|
+
Requires Node.js 20 ([tested](https://github.com/activescott/serverless-http-invoker/actions)).
|
|
54
54
|
|
|
55
|
-
Requires Serverless Framework
|
|
55
|
+
Requires Serverless Framework v3.
|
|
56
56
|
If you are new to the Serverless Framework, check out the [Serverless Framework Getting Started Guide](https://serverless.com/framework/docs/getting-started/).
|
|
57
57
|
|
|
58
58
|
## Install
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "serverless-http-invoker",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.16",
|
|
4
4
|
"description": "Locally invoke Serverless functions via their HTTP event as specified in Serverless.yml for testing.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Scott Willeke <scott@willeke.com> (https:/scott.willeke.com/)",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"serverless": "^3.22.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"chai": "^4.
|
|
51
|
-
"chai-as-promised": "^7.1.
|
|
52
|
-
"mocha": "^
|
|
50
|
+
"chai": "^4.5.0",
|
|
51
|
+
"chai-as-promised": "^7.1.2",
|
|
52
|
+
"mocha": "^11.7.5",
|
|
53
53
|
"nyc": "^15.1.0",
|
|
54
54
|
"prettier": "^2.7.1",
|
|
55
55
|
"serverless": "^3.31.0"
|
package/test/support/setup.js
CHANGED