-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
68 lines (68 loc) · 3.56 KB
/
package.json
File metadata and controls
68 lines (68 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
"name": "localstack-ts-api-gateway-lambda-dynamodb-crud-example",
"version": "1.0.0",
"description": "An example of a serverless CRUD API built with TypeScript, integrating API Gateway, Lambda, and DynamoDB, all simulated locally with LocalStack for local development and testing.",
"main": "src/index.ts",
"scripts": {
"test:e2e": "cross-env NODE_ENV=automated_tests jest --testRegex='.*\\.e2e\\.spec\\.ts$'",
"test:handler": "cross-env NODE_ENV=automated_tests jest --testRegex='.*\\.handler\\.spec\\.ts$' --coverage --coverageReporters=json-summary",
"prebuild": "rimraf dist",
"create-package": "node -e \"require('fs').writeFileSync('temp-dependencies-layer/package.json', JSON.stringify({ name: 'temp-dependencies-layer', version: '1.0.0', dependencies: {} }))\"",
"build:index": "esbuild src/index.ts --banner:js=\"/* global handler */\" --bundle --minify --sourcemap --platform=node --target=es2020 --outdir=temp-index",
"build:src": "esbuild \"src/**/*.ts\" --bundle --minify --sourcemap --platform=node --target=es2020 --outdir=temp-index",
"build:dependencies": "mkdir temp-dependencies-layer && node -e \"const fs = require('fs'); const pkg = require('./package.json'); fs.writeFileSync('temp-dependencies-layer/package.json', JSON.stringify({ name: 'temp-dependencies-layer', version: '1.0.0', dependencies: pkg.dependencies }, null, 2));\" && cd temp-dependencies-layer && npm install --omit=dev",
"build": "npm run build:index && npm run build:src && npm run build:dependencies",
"postbuild": "cd temp-index && 7z a -tzip ../dist/index.zip * && cd ../temp-dependencies-layer && 7z a ../dist/dependencies-layer.zip node_modules/* && cd .. && rimraf temp-index temp-dependencies-layer",
"start:local-db": "cross-env-shell data/scripts/start_local_dynamodb.sh",
"seed:local-db": "cross-env-shell data/scripts/seed_local_dynamodb.sh",
"start:local-api": "cross-env-shell data/scripts/start_local_api_gateway_and_lambda.sh",
"wait-for-docker": "cross-env-shell data/scripts/wait-for-docker.sh",
"start:dev": "docker compose down && npm run build && docker compose up -d && npm run wait-for-docker && npm run start:local-db && npm run seed:local-db && npm run start:local-api && docker-compose logs -f",
"test:dev": "docker compose down && npm run build && docker compose up -d && npm run wait-for-docker && npm run start:local-db && npm run seed:local-db && npm run start:local-api && npm run test:e2e"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Mipmipp/localstack-ts-api-gateway-lambda-dynamodb-crud-example.git"
},
"author": "Mipmipp",
"license": "MIT",
"bugs": {
"url": "https://github.com/Mipmipp/localstack-ts-api-gateway-lambda-dynamodb-crud-example/issues"
},
"homepage": "https://github.com/Mipmipp/localstack-ts-api-gateway-lambda-dynamodb-crud-example#readme",
"keywords": [
"docker",
"lambda",
"crud",
"typescript",
"jest",
"docker-compose",
"api-gateway",
"example",
"dynamodb",
"supertest",
"dynamoose",
"localstack"
],
"type": "commonjs",
"devDependencies": {
"@jest/types": "^29.6.3",
"@types/aws-lambda": "^8.10.145",
"@types/node": "^22.7.4",
"@types/supertest": "^6.0.2",
"@types/uuid": "^10.0.0",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"esbuild": "^0.24.0",
"jest": "^29.7.0",
"rimraf": "^6.0.1",
"supertest": "^7.0.0",
"ts-jest": "^29.2.5",
"typescript": "^5.6.2"
},
"dependencies": {
"dynamoose": "^4.0.1",
"http-status-codes": "^2.3.0",
"uuid": "^10.0.0"
}
}