@emartech/aggregate-metric-logger 3.3.0 → 3.3.1

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,73 @@
1
+ name: Aggregate Metric Logger Build
2
+
3
+ on: push
4
+
5
+ env:
6
+ NPM_TOKEN: ${{ secrets.NPM_PUBLISHER_TOKEN }}
7
+ GH_TOKEN: ${{ secrets.GH_TOKEN }}
8
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9
+
10
+ jobs:
11
+ test:
12
+ name: Tests 🚦
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Check out repository
16
+ uses: actions/checkout@v3
17
+ - name: Use correct Node version
18
+ uses: actions/setup-node@v3
19
+ with:
20
+ node-version-file: '.nvmrc'
21
+ - name: Cache node_modules
22
+ id: cache_node_modules
23
+ uses: actions/cache@v3
24
+ with:
25
+ path: node_modules
26
+ key: node_modules-${{ hashFiles('**/package-lock.json') }}
27
+ - name: Install dependencies
28
+ if: ${{ steps.cache_node_modules.outputs.cache-hit != 'true' }}
29
+ continue-on-error: true
30
+ run: |
31
+ npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
32
+ npm i
33
+ - name: Run tests
34
+ run: npm test
35
+ - name: Slack notification
36
+ uses: 8398a7/action-slack@a189acbf0b7ea434558662ae25a0de71df69a435
37
+ if: ${{ failure() }}
38
+ with:
39
+ status: ${{ job.status }}
40
+ fields: repo,message,author,job,ref
41
+ job_name: Test 🚦
42
+ env:
43
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
44
+
45
+ deploy:
46
+ name: Deploy 🚢
47
+ needs: [test]
48
+ runs-on: ubuntu-latest
49
+ steps:
50
+ - name: Check out repository
51
+ uses: actions/checkout@v3
52
+ - name: Use correct Node version
53
+ uses: actions/setup-node@v3
54
+ with:
55
+ node-version-file: '.nvmrc'
56
+ - name: Cache node_modules
57
+ id: cache_node_modules
58
+ uses: actions/cache@v3
59
+ with:
60
+ path: node_modules
61
+ key: node_modules-${{ hashFiles('**/package-lock.json') }}
62
+ - name: Release package
63
+ if: github.ref_name == 'master'
64
+ run: CI=true npm run semantic-release
65
+ - name: Slack notification
66
+ uses: 8398a7/action-slack@a189acbf0b7ea434558662ae25a0de71df69a435
67
+ with:
68
+ status: ${{ job.status }}
69
+ fields: repo,message,author,job,ref
70
+ job_name: Deploy 🚢
71
+ env:
72
+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
73
+ if: always()
package/README.md CHANGED
@@ -34,7 +34,7 @@ const metricLogger = require('@emartech/aggregate-metric-logger')
34
34
  metricLogger.warn('etwas-went-wrong', { customer_id: 11 });
35
35
  metricLogger.warn('etwas-went-wrong', { customer_id: 11 });
36
36
 
37
- // will aggrete these to a single warning log
37
+ // will aggregate these to a single warning log
38
38
  ```
39
39
 
40
40
  ### Measure values
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emartech/aggregate-metric-logger",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "aggregate metrics in memory for logging",
5
5
  "main": "src/index.js",
6
6
  "scripts": {