advanced-lambda-context 1.2.12 → 2.0.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.
@@ -0,0 +1,29 @@
1
+ name: publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ concurrency:
8
+ group: release
9
+ cancel-in-progress: false
10
+
11
+ jobs:
12
+ publish:
13
+
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+
19
+ - uses: actions/setup-node@v3
20
+ with:
21
+ node-version: 18.17.0
22
+ cache: npm
23
+
24
+ - name: Dependencies
25
+ run: make install
26
+
27
+ - uses: JS-DevTools/npm-publish@v3
28
+ with:
29
+ token: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,26 @@
1
+ name: test
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ test:
8
+
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+
14
+ - uses: actions/setup-node@v3
15
+ with:
16
+ node-version: 18.17.0
17
+ cache: npm
18
+
19
+ - name: Dependencies
20
+ run: make install
21
+
22
+ - name: env check
23
+ run: env
24
+
25
+ - name: Unit Tests
26
+ run: make test
package/Makefile ADDED
@@ -0,0 +1,17 @@
1
+ .PHONY: install test publish
2
+
3
+ ROOT_DIR :=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
4
+ OS := $(shell uname | tr '[:upper:]' '[:lower:]')
5
+
6
+ #
7
+ # Common Repositry Activities
8
+ #
9
+
10
+ install:
11
+ @npm install
12
+
13
+ test:
14
+ @npm test
15
+
16
+ publish:
17
+ @npm publish
package/README.md CHANGED
@@ -16,12 +16,12 @@ npm install bunyan-prettystream-circularsafe --no-save
16
16
  - [ ] generate docs
17
17
  - [ ] publish script
18
18
  - [ ] support alternate serialized config (only supports yml)
19
- - [ ] consider writting in google cloud version
20
- - [ ] consider azure version
19
+ - [x] ~~consider writting in google cloud version~~
20
+ - [x] ~~consider azure version~~
21
21
  - [ ] include event schemas
22
22
  - [ ] write other event parsers as needed
23
23
  - [ ] sqs
24
24
  - [ ] sns -> sqs
25
25
  - [ ] write unit test for ssm.expandParamStoreVariables
26
- - [ ] unhappy path unit test for snsn event parse
26
+ - [ ] unhappy path unit test for sns event parse
27
27
  - [ ] unit tests for 3rd party peer dependencies
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "advanced-lambda-context",
3
- "version": "1.2.12",
3
+ "version": "2.0.0",
4
4
  "description": "A flexible wrapper function for various common lambda use-cases.",
5
5
  "engines": {
6
- "node": ">=14.19.0"
6
+ "node": ">=18.17.0"
7
7
  },
8
8
  "main": "./index.js",
9
9
  "module": "./esm/index.js",
@@ -24,9 +24,10 @@
24
24
  "require": "./with/logger/bunyan.js",
25
25
  "import": "./with/logger/bunyan.mjs"
26
26
  },
27
- "./with/database": "./with/database/database.mjs",
28
- "./with/database/mysql": "./with/database/serverless-mysql.js",
29
- "./with/database/dataApi": "./with/database/data-api.js",
27
+ "./with/database": {
28
+ "require": "./with/database/database.js",
29
+ "import": "./with/database/database.mjs"
30
+ },
30
31
  "./package.json": "./package.json"
31
32
  },
32
33
  "repository": {
@@ -34,8 +35,7 @@
34
35
  "url": "https://github.com/wambosa/advanced-lambda-context"
35
36
  },
36
37
  "scripts": {
37
- "test": "c8 --exclude **/spec/** --reports-dir ./.build/ jasmine",
38
- "lint": "eslint -c ./config/.eslintrc.yml src"
38
+ "test": "npx c8 --exclude **/spec/** --reports-dir ./.build/ jasmine"
39
39
  },
40
40
  "dependencies": {
41
41
  "argparse": "^1.0.10",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "aws-sdk": "^2.1094.0",
46
- "axios": "^0.26.1",
46
+ "axios": "^1.7.7",
47
47
  "bunyan": "^1.8.12",
48
48
  "bunyan-prettystream-circularsafe": "^0.3.1",
49
49
  "c8": "^7.3.1",
@@ -54,7 +54,7 @@
54
54
  "walk-sync": "^2.0.2"
55
55
  },
56
56
  "peerDependencies": {
57
- "axios": "^0.21.0",
57
+ "axios": "^1.7.7",
58
58
  "bunyan": "^1.8.12",
59
59
  "bunyan-prettystream-circularsafe": "^0.3.1",
60
60
  "serverless-mysql": "^1.5.4",
@@ -8,8 +8,8 @@ describe('GIVEN common environment variables', () => {
8
8
  expect(envVars.path).toBeDefined()
9
9
  })
10
10
 
11
- it('THEN expect NODE_PATH toBe present', () => {
12
- expect(envVars.nodePath).toBeDefined()
11
+ it('THEN expect NVM_DIR toBe present', () => {
12
+ expect(envVars.nvmDir).toBeDefined()
13
13
  })
14
14
  })
15
15
  })
@@ -0,0 +1,7 @@
1
+ const dataApi = require('./data-api')
2
+ const mysql = require('./serverless-mysql')
3
+
4
+ module.exports = {
5
+ mysql,
6
+ dataApi,
7
+ }