@emartech/aggregate-metric-logger 6.1.1 → 6.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.
@@ -3,7 +3,8 @@ name: Aggregate Metric Logger Build
3
3
  on: push
4
4
 
5
5
  env:
6
- NPM_TOKEN: ${{ secrets.NPM_PUBLISHER_TOKEN }}
6
+ NPM_TOKEN: ${{ secrets.NPM_DEPLOYER_TOKEN }}
7
+ NPM_PUBLISHER_TOKEN: ${{ secrets.NPM_PUBLISHER_TOKEN }}
7
8
  GH_TOKEN: ${{ secrets.GH_TOKEN }}
8
9
  SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9
10
 
@@ -13,61 +14,74 @@ jobs:
13
14
  runs-on: ubuntu-latest
14
15
  steps:
15
16
  - name: Check out repository
16
- uses: actions/checkout@v6
17
+ uses: actions/checkout@v7
17
18
  - name: Use correct Node version
18
- uses: actions/setup-node@v6
19
+ uses: actions/setup-node@v7
19
20
  with:
20
21
  node-version-file: '.nvmrc'
21
22
  - name: Cache node_modules
22
23
  id: cache_node_modules
23
- uses: actions/cache@v5
24
+ uses: actions/cache@v6
24
25
  with:
25
26
  path: node_modules
26
- key: node_modules-${{ hashFiles('**/package-lock.json') }}
27
+ key: node_modules-${{ hashFiles('**/package.json') }}
27
28
  - name: Install dependencies
28
29
  if: ${{ steps.cache_node_modules.outputs.cache-hit != 'true' }}
29
30
  continue-on-error: true
30
31
  run: |
32
+ npm install -g npm@latest
33
+ npm -v
31
34
  npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
32
35
  npm i
36
+
33
37
  - name: Run tests
34
38
  run: npm test
35
39
  - name: Slack notification
36
- uses: 8398a7/action-slack@v3
37
- if: ${{ failure() }}
40
+ uses: slackapi/slack-github-action@v4
41
+ if: failure()
38
42
  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 }}
43
+ webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
44
+ webhook-type: incoming-webhook
45
+ payload: |
46
+ text: "*GitHub Action build result*: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
44
47
 
45
48
  deploy:
46
49
  name: Deploy 🚢
47
50
  needs: [test]
48
51
  runs-on: ubuntu-latest
52
+ permissions:
53
+ contents: write
49
54
  steps:
50
55
  - name: Check out repository
51
- uses: actions/checkout@v6
56
+ uses: actions/checkout@v7
52
57
  - name: Use correct Node version
53
- uses: actions/setup-node@v6
58
+ uses: actions/setup-node@v7
54
59
  with:
55
60
  node-version-file: '.nvmrc'
56
61
  - name: Cache node_modules
57
62
  id: cache_node_modules
58
- uses: actions/cache@v5
63
+ uses: actions/cache@v6
59
64
  with:
60
65
  path: node_modules
61
- key: node_modules-${{ hashFiles('**/package-lock.json') }}
66
+ key: node_modules-${{ hashFiles('**/package.json') }}
67
+ - name: Install dependencies
68
+ if: ${{ steps.cache_node_modules.outputs.cache-hit != 'true' }}
69
+ continue-on-error: true
70
+ run: |
71
+ npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
72
+ npm i
62
73
  - name: Release package
63
74
  if: github.ref_name == 'master'
64
- run: CI=true npm run semantic-release
65
- - name: Slack notification
66
- uses: 8398a7/action-slack@v3
67
- with:
68
- status: ${{ job.status }}
69
- fields: repo,message,author,job,ref
70
- job_name: Deploy 🚢
71
75
  env:
72
- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
76
+ GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GH_TOKEN_CS }}
77
+ NPM_TOKEN: ${{ secrets.NPM_PUBLISHER_TOKEN }}
78
+ run:
79
+ CI=true npm run semantic-release
80
+ - name: Slack notification
81
+ uses: slackapi/slack-github-action@v4
73
82
  if: always()
83
+ with:
84
+ webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
85
+ webhook-type: incoming-webhook
86
+ payload: |
87
+ text: "*GitHub Action build result*: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 24.16.0
1
+ 24.19.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emartech/aggregate-metric-logger",
3
- "version": "6.1.1",
3
+ "version": "6.4.0",
4
4
  "description": "aggregate metrics in memory for logging",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -30,19 +30,19 @@
30
30
  "access": "public"
31
31
  },
32
32
  "dependencies": {
33
- "@emartech/json-logger": "^9.0.0",
34
- "@google-cloud/monitoring": "^5.0.0",
35
- "json-stable-stringify": "^1.1.1",
36
- "lodash": "^4.17.15",
37
- "ms": "^2.1.3"
33
+ "@emartech/json-logger": "9.2.5",
34
+ "@google-cloud/monitoring": "6.0.0",
35
+ "json-stable-stringify": "1.3.0",
36
+ "lodash": "4.18.1",
37
+ "ms": "2.1.3"
38
38
  },
39
39
  "devDependencies": {
40
- "@emartech/rti-server-tools": "^10.0.0",
41
- "@types/jest": "^30.0.0",
42
- "dotenv-haphap": "^3.1.2",
43
- "eslint": "^10.0.0",
44
- "globals": "17.6.0",
45
- "jest": "^30.0.0",
46
- "semantic-release": "^25.0.0"
40
+ "@emartech/rti-server-tools": "11.5.0",
41
+ "@types/jest": "30.0.0",
42
+ "dotenv-haphap": "3.1.2",
43
+ "eslint": "10.8.1",
44
+ "globals": "17.11.0",
45
+ "jest": "30.4.2",
46
+ "semantic-release": "25.0.9"
47
47
  }
48
48
  }
@@ -52,6 +52,7 @@ class GcpTimeSeriesPublisher {
52
52
  };
53
53
  }
54
54
 
55
+
55
56
  exports.createGcpTimeSeriesPublisher = projectId => new GcpTimeSeriesPublisher(projectId);
56
57
 
57
58
  exports.publishTimeSeries = async timeSeries => {