declapract-typescript-ehmpathy 0.37.5 → 0.37.7

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.
@@ -1,5 +1,5 @@
1
- import { UnexpectedCodePathError } from '@ehmpathy/error-fns';
2
1
  import { FileCheckType, FileFixFunction } from 'declapract';
2
+ import { UnexpectedCodePathError } from 'helpful-errors';
3
3
 
4
4
  export const check = FileCheckType.CONTAINS;
5
5
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "dependencies": {
3
- "@ehmpathy/error-fns": "@declapract{check.minVersion('1.3.7')}"
3
+ "helpful-errors": "@declapract{check.minVersion('1.3.8')}"
4
4
  }
5
5
  }
@@ -9,6 +9,6 @@ ignores:
9
9
  - ts-jest
10
10
  - ts-node
11
11
  - test-fns
12
- - '@ehmpathy/error-fns'
12
+ - helpful-errors
13
13
  - husky
14
14
  - if-env
@@ -13,3 +13,15 @@ if (
13
13
  process.env.I_KNOW_WHAT_IM_DOING !== 'true'
14
14
  )
15
15
  throw new Error(`integration.test is not targeting stage 'test'`);
16
+
17
+ /**
18
+ * .what = verify that the env has sufficient auth to run the tests; otherwise, fail fast
19
+ * .why =
20
+ * - prevent time wasted waiting on tests to fail due to lack of credentials
21
+ * - prevent time wasted debugging tests which are failing due to hard-to-read missed credential errors
22
+ */
23
+ const isAuthed = process.env.AWS_PROFILE || process.env.AWS_ACCESS_KEY_ID;
24
+ if (!isAuthed)
25
+ throw new Error(
26
+ 'no aws credentials present. please authenticate with aws to run integration tests',
27
+ );
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.37.5",
5
+ "version": "0.37.7",
6
6
  "license": "MIT",
7
7
  "main": "src/index.js",
8
8
  "repository": "ehmpathy/declapract-typescript-ehmpathy",
@@ -43,7 +43,8 @@
43
43
  "dependencies": {
44
44
  "domain-objects": "0.22.1",
45
45
  "expect": "29.4.2",
46
- "flat": "5.0.2"
46
+ "flat": "5.0.2",
47
+ "helpful-errors": "1.3.8"
47
48
  },
48
49
  "peerDependencies": {
49
50
  "declapract": ">=0.11.5"