serverless-offline 14.3.3 → 14.4.0

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.
package/README.md CHANGED
@@ -9,6 +9,14 @@
9
9
  <sup>
10
10
  Special thanks to:
11
11
  </sup>
12
+ <a href="https://airfriend.app?ref=so">
13
+ <div>
14
+ <img src="https://airfriend.app/images/logotype.png" height="64" alt="Airfriend">
15
+ </div>
16
+ <b>
17
+ An AI friend on WhatsApp.
18
+ </b>
19
+ </a>
12
20
  <a href="https://arccode.dev?ref=so">
13
21
  <div>
14
22
  <img src="https://arccode.dev/images/logotype.png" height="64" alt="Arccode">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "serverless-offline",
3
- "version": "14.3.3",
3
+ "version": "14.4.0",
4
4
  "description": "Emulate AWS λ and API Gateway locally when developing your Serverless project",
5
5
  "license": "MIT",
6
6
  "exports": {
@@ -90,10 +90,11 @@
90
90
  "java-invoke-local": "0.0.6",
91
91
  "jose": "^5.7.0",
92
92
  "js-string-escape": "^1.0.1",
93
- "jsonpath-plus": "^10.0.0",
93
+ "jsonpath-plus": "^10.2.0",
94
94
  "jsonschema": "^1.4.1",
95
95
  "jszip": "^3.10.1",
96
96
  "luxon": "^3.5.0",
97
+ "nock": "^13.5.6",
97
98
  "node-fetch": "^3.3.2",
98
99
  "node-schedule": "^2.1.1",
99
100
  "p-memoize": "^7.1.1",
@@ -15,6 +15,7 @@ export const supportedRuntimesArchitecture = {
15
15
  "nodejs16.x": [ARM64, X86_64],
16
16
  "nodejs18.x": [ARM64, X86_64],
17
17
  "nodejs20.x": [ARM64, X86_64],
18
+ "nodejs22.x": [ARM64, X86_64],
18
19
  "python3.7": [X86_64],
19
20
  "python3.8": [ARM64, X86_64],
20
21
  "python3.9": [ARM64, X86_64],
@@ -47,6 +48,7 @@ export const supportedNodejs = new Set([
47
48
  "nodejs16.x",
48
49
  "nodejs18.x",
49
50
  "nodejs20.x",
51
+ "nodejs22.x",
50
52
  ])
51
53
 
52
54
  // PROVIDED
@@ -1,69 +1,66 @@
1
1
  /* eslint-disable no-use-before-define */
2
2
  /* eslint-disable no-console */
3
- import process from "node:process"
3
+ // import process from "node:process"
4
4
 
5
- import boxen from "boxen"
6
- import { gray, dodgerblue } from "../config/colors.js"
5
+ // const boxenOptions = {
6
+ // borderColor: "blue",
7
+ // margin: 1,
8
+ // padding: 1,
9
+ // }
7
10
 
8
- const boxenOptions = {
9
- borderColor: "blue",
10
- margin: 1,
11
- padding: 1,
12
- }
13
-
14
- // Promotion starts on August 22, 2024
15
- const startAt = new Date("2024-08-22T00:00:00.000Z")
16
- // By October 22, 2024, the promotion will be displayed to 100% of users
17
- const endAt = new Date("2024-10-22T00:00:00.000Z")
18
- const nDays = diffDays(startAt, endAt)
11
+ // // Promotion starts on August 22, 2024
12
+ // const startAt = new Date("2024-08-22T00:00:00.000Z")
13
+ // // By October 22, 2024, the promotion will be displayed to 100% of users
14
+ // const endAt = new Date("2024-10-22T00:00:00.000Z")
15
+ // const nDays = diffDays(startAt, endAt)
19
16
 
20
17
  function logSponsor() {
21
- if (!shouldDisplaySponsor()) {
22
- console.log()
23
-
24
- return
25
- }
26
-
27
- console.log(
28
- boxen(
29
- `Sponsored by ${dodgerblue("Arccode, the RPG for developers")}\nhttps://arccode.dev?ref=so\n${gray.dim(
30
- "Disable with --noSponsor",
31
- )}`,
32
- boxenOptions,
33
- ),
34
- )
18
+ console.log()
19
+ // if (!shouldDisplaySponsor()) {
20
+ // console.log()
21
+ // return
22
+ // }
23
+ // console.log(
24
+ // boxen(
25
+ // `Sponsored by ${dodgerblue("Arccode, the RPG for developers")}\nhttps://arccode.dev?ref=so\n${gray.dim(
26
+ // "Disable with --noSponsor",
27
+ // )}`,
28
+ // boxenOptions,
29
+ // ),
30
+ // )
35
31
  }
36
32
 
37
33
  // Display the message progressively over time to 100% of users
38
- function shouldDisplaySponsor() {
39
- const ratio = diffDays(startAt, new Date()) / nDays
34
+ // function shouldDisplaySponsor() {
35
+ // const ratio = diffDays(startAt, new Date()) / nDays
40
36
 
41
- if (ratio >= 1) return true
37
+ // if (ratio >= 1) return true
42
38
 
43
- try {
44
- const nonce = Number(
45
- encodeStringToNumber(process.cwd()).toString().padStart(2, "0").slice(-2),
46
- )
39
+ // try {
40
+ // const nonce = Number(
41
+ // encodeStringToNumber(process.cwd()).toString().padStart(2, "0").slice(-2),
42
+ // )
47
43
 
48
- return nonce <= ratio * 100
49
- } catch {
50
- //
51
- }
44
+ // return nonce <= ratio * 100
45
+ // } catch {
46
+ // //
47
+ // }
52
48
 
53
- return false
54
- }
49
+ // return false
50
+ // }
55
51
 
56
- function encodeStringToNumber(string) {
57
- let sum = 0
52
+ // function encodeStringToNumber(string) {
53
+ // let sum = 0
58
54
 
59
- for (let i = 0; i < string.length; i += 1) {
60
- sum += Number(string.codePointAt(i).toString(10))
61
- }
55
+ // for (let i = 0; i < string.length; i += 1) {
56
+ // sum += Number(string.codePointAt(i).toString(10))
57
+ // }
62
58
 
63
- return sum
64
- }
59
+ // return sum
60
+ // }
61
+
62
+ // function diffDays(a, b) {
63
+ // return Math.round((b - a) / (1000 * 60 * 60 * 24))
64
+ // }
65
65
 
66
- function diffDays(a, b) {
67
- return Math.round((b - a) / (1000 * 60 * 60 * 24))
68
- }
69
66
  export default logSponsor