@bifravst/http-api-mock 2.1.87 → 2.1.89
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/cdk/Stack.ts
CHANGED
|
@@ -31,11 +31,11 @@ export class HTTPAPIMockStack extends Stack {
|
|
|
31
31
|
layerVersionName: `${Stack.of(this).stackName}-baseLayer`,
|
|
32
32
|
code: new LambdaSource(this, {
|
|
33
33
|
id: 'baseLayer',
|
|
34
|
-
|
|
34
|
+
zipFilePath: layer.layerZipFilePath,
|
|
35
35
|
hash: layer.hash,
|
|
36
36
|
}).code,
|
|
37
37
|
compatibleArchitectures: [Lambda.Architecture.ARM_64],
|
|
38
|
-
compatibleRuntimes: [Lambda.Runtime.
|
|
38
|
+
compatibleRuntimes: [Lambda.Runtime.NODEJS_22_X],
|
|
39
39
|
})
|
|
40
40
|
|
|
41
41
|
const httpMockApi = new HttpApiMock(this, {
|
package/cdk/http-api-mock.ts
CHANGED
|
@@ -5,7 +5,7 @@ import fs from 'node:fs/promises'
|
|
|
5
5
|
import os from 'node:os'
|
|
6
6
|
import path from 'node:path'
|
|
7
7
|
import { fileURLToPath } from 'node:url'
|
|
8
|
-
import
|
|
8
|
+
import pJSON from '../package.json' assert { type: 'json' }
|
|
9
9
|
import { HTTPAPIMockApp } from './App.js'
|
|
10
10
|
|
|
11
11
|
const { stackName } = fromEnv({ stackName: 'HTTP_API_MOCK_STACK_NAME' })(
|
|
@@ -25,13 +25,12 @@ const dependencies: Array<keyof (typeof pJSON)['dependencies']> = [
|
|
|
25
25
|
|
|
26
26
|
new HTTPAPIMockApp(stackName, {
|
|
27
27
|
lambdaSources: {
|
|
28
|
-
httpApiMock: await packLambdaFromPath(
|
|
29
|
-
'httpApiMock',
|
|
30
|
-
'cdk/resources/http-api-mock-lambda.ts',
|
|
31
|
-
undefined,
|
|
28
|
+
httpApiMock: await packLambdaFromPath({
|
|
29
|
+
id: 'httpApiMock',
|
|
30
|
+
sourceFilePath: 'cdk/resources/http-api-mock-lambda.ts',
|
|
32
31
|
baseDir,
|
|
33
|
-
lambdasDir,
|
|
34
|
-
),
|
|
32
|
+
distDir: lambdasDir,
|
|
33
|
+
}),
|
|
35
34
|
},
|
|
36
35
|
layer: await packLayer({
|
|
37
36
|
id: 'testResources',
|
|
@@ -89,7 +89,7 @@ export class HttpApiMock extends Resource {
|
|
|
89
89
|
layers,
|
|
90
90
|
handler: lambdaSources.httpApiMock.handler,
|
|
91
91
|
architecture: Lambda.Architecture.ARM_64,
|
|
92
|
-
runtime: Lambda.Runtime.
|
|
92
|
+
runtime: Lambda.Runtime.NODEJS_22_X,
|
|
93
93
|
timeout: Duration.seconds(5),
|
|
94
94
|
environment: {
|
|
95
95
|
REQUESTS_TABLE_NAME: this.requestsTable.tableName,
|
package/dist/cdk/Stack.js
CHANGED
|
@@ -13,11 +13,11 @@ export class HTTPAPIMockStack extends Stack {
|
|
|
13
13
|
layerVersionName: `${Stack.of(this).stackName}-baseLayer`,
|
|
14
14
|
code: new LambdaSource(this, {
|
|
15
15
|
id: 'baseLayer',
|
|
16
|
-
|
|
16
|
+
zipFilePath: layer.layerZipFilePath,
|
|
17
17
|
hash: layer.hash,
|
|
18
18
|
}).code,
|
|
19
19
|
compatibleArchitectures: [Lambda.Architecture.ARM_64],
|
|
20
|
-
compatibleRuntimes: [Lambda.Runtime.
|
|
20
|
+
compatibleRuntimes: [Lambda.Runtime.NODEJS_22_X],
|
|
21
21
|
});
|
|
22
22
|
const httpMockApi = new HttpApiMock(this, {
|
|
23
23
|
lambdaSources,
|
|
@@ -5,6 +5,7 @@ import fs from 'node:fs/promises';
|
|
|
5
5
|
import os from 'node:os';
|
|
6
6
|
import path from 'node:path';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import pJSON from '../package.json' assert { type: 'json' };
|
|
8
9
|
import { HTTPAPIMockApp } from './App.js';
|
|
9
10
|
const { stackName } = fromEnv({ stackName: 'HTTP_API_MOCK_STACK_NAME' })(process.env);
|
|
10
11
|
const baseDir = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
@@ -18,7 +19,12 @@ const dependencies = [
|
|
|
18
19
|
];
|
|
19
20
|
new HTTPAPIMockApp(stackName, {
|
|
20
21
|
lambdaSources: {
|
|
21
|
-
httpApiMock: await packLambdaFromPath(
|
|
22
|
+
httpApiMock: await packLambdaFromPath({
|
|
23
|
+
id: 'httpApiMock',
|
|
24
|
+
sourceFilePath: 'cdk/resources/http-api-mock-lambda.ts',
|
|
25
|
+
baseDir,
|
|
26
|
+
distDir: lambdasDir,
|
|
27
|
+
}),
|
|
22
28
|
},
|
|
23
29
|
layer: await packLayer({
|
|
24
30
|
id: 'testResources',
|
|
@@ -58,7 +58,7 @@ export class HttpApiMock extends Resource {
|
|
|
58
58
|
layers,
|
|
59
59
|
handler: lambdaSources.httpApiMock.handler,
|
|
60
60
|
architecture: Lambda.Architecture.ARM_64,
|
|
61
|
-
runtime: Lambda.Runtime.
|
|
61
|
+
runtime: Lambda.Runtime.NODEJS_22_X,
|
|
62
62
|
timeout: Duration.seconds(5),
|
|
63
63
|
environment: {
|
|
64
64
|
REQUESTS_TABLE_NAME: this.requestsTable.tableName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifravst/http-api-mock",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.89",
|
|
4
4
|
"description": "Helper functions for AWS lambdas written in TypeScript.",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./*": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@aws-sdk/client-dynamodb": "3.699.0",
|
|
84
84
|
"@aws-sdk/client-sts": "3.699.0",
|
|
85
85
|
"@aws-sdk/util-dynamodb": "3.699.0",
|
|
86
|
-
"@bifravst/aws-cdk-lambda-helpers": "
|
|
86
|
+
"@bifravst/aws-cdk-lambda-helpers": "2.2.19",
|
|
87
87
|
"@bifravst/cloudformation-helpers": "9.1.1",
|
|
88
88
|
"@bifravst/from-env": "3.0.2",
|
|
89
89
|
"@bifravst/run": "1.2.0",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"@bifravst/prettier-config": "1.1.1",
|
|
98
98
|
"@commitlint/config-conventional": "19.6.0",
|
|
99
99
|
"@types/aws-lambda": "8.10.145",
|
|
100
|
-
"@types/node": "22.9.
|
|
100
|
+
"@types/node": "22.9.3",
|
|
101
101
|
"commitlint": "19.6.0",
|
|
102
102
|
"globstar": "1.0.0",
|
|
103
103
|
"husky": "9.1.7"
|