declapract-typescript-ehmpathy 0.33.14 → 0.34.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.
@@ -34,6 +34,9 @@ on:
34
34
  open-vpn-config:
35
35
  required: false
36
36
  description: complete openvpn config required to enter the vpn, if needed
37
+ pagerduty-integration-key:
38
+ required: false
39
+ description: enables sending pagerduty alarms on failure
37
40
 
38
41
  jobs:
39
42
  install:
@@ -143,6 +146,15 @@ jobs:
143
146
  if: inputs.needs-vpn-for-acceptance
144
147
  run: sudo killall openvpn
145
148
 
149
+ - name: alarm on failure
150
+ env:
151
+ PAGERDUTY_INTEGRATION_KEY: ${{ secrets.pagerduty-integration-key }}
152
+ if: failure() && env.PAGERDUTY_INTEGRATION_KEY
153
+ uses: Entle/action-pagerduty-alert@0.2.0 # https://github.com/marketplace/actions/pagerduty-alert
154
+ with:
155
+ pagerduty-integration-key: '${{ secrets.pagerduty-integration-key }}'
156
+ pagerduty-dedup-key: github_workflow_failed
157
+
146
158
  prune:
147
159
  runs-on: ubuntu-20.04
148
160
  needs: [install, deploy]
@@ -70,3 +70,4 @@ jobs:
70
70
  secrets:
71
71
  aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
72
72
  aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
73
+ pagerduty-integration-key: ${{ secrets.PAGERDUTY_INTEGRATION_KEY }}
@@ -1,6 +1,5 @@
1
1
  import { asCommand } from '@ehmpathy/as-command';
2
- import { UnexpectedCodePathError } from '@ehmpathy/error-fns';
3
- import { ProcedureInput, getResourceNameFromFileName } from 'visualogic';
2
+ import { getResourceNameFromFileName } from 'visualogic';
4
3
 
5
4
  import { stage } from '../../utils/environment';
6
5
  import { log } from '../../utils/logger';
@@ -7,7 +7,7 @@
7
7
  "devDependencies": {
8
8
  "sql-code-generator": "@declapract{check.minVersion('0.10.1')}",
9
9
  "sql-dao-generator": "@declapract{check.minVersion('0.10.0')}",
10
- "sql-schema-control": "@declapract{check.minVersion('1.5.2')}",
10
+ "sql-schema-control": "@declapract{check.minVersion('1.5.3')}",
11
11
  "sql-schema-generator": "@declapract{check.minVersion('0.25.2')}",
12
12
  "@types/yesql": "@declapract{check.minVersion('3.2.2')}",
13
13
  "@types/pg": "@declapract{check.minVersion('8.6.1')}"
@@ -18,6 +18,10 @@ export const fix: FileFixFunction = (contents) => {
18
18
  '## allow invocation of other lambdas',
19
19
  '# allow invocation of other lambdas',
20
20
  )
21
+ .replace(
22
+ 'environment:\n NODE_ENV:',
23
+ 'environment:\n TZ: UTC # guarantee that utc timezone will be used explicitly, to facilitate a pit of success\n NODE_ENV:',
24
+ )
21
25
  .replace(
22
26
  'NODE_ENV: ${self:custom.stageToNodeEnvMapping.${self:provider.stage}}\n deploymentBucket',
23
27
  'NODE_ENV: ${self:custom.stageToNodeEnvMapping.${self:provider.stage}}\n AWS_NODEJS_CONNECTION_REUSE_ENABLED: true # https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html\n deploymentBucket',
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "declapract-typescript-ehmpathy",
3
3
  "author": "ehmpathy",
4
4
  "description": "declapract best practices declarations for typescript",
5
- "version": "0.33.14",
5
+ "version": "0.34.0",
6
6
  "main": "src/index.js",
7
7
  "repository": "ehmpathy/declapract-typescript-ehmpathy",
8
8
  "homepage": "https://github.com/ehmpathy/declapract-typescript-ehmpathy",
@@ -67,6 +67,7 @@
67
67
  "husky": "8.0.3",
68
68
  "jest": "29.3.1",
69
69
  "prettier": "2.8.1",
70
+ "test-fns": "1.4.2",
70
71
  "ts-jest": "29.1.3",
71
72
  "ts-node": "10.9.2",
72
73
  "type-fns": "0.8.1",