declapract-typescript-ehmpathy 0.35.2 → 0.35.4
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.
- package/dist/practices/commands/best-practice/package.json +1 -1
- package/dist/practices/environments/best-practice/src/utils/environment.ts +4 -1
- package/dist/practices/{testing → tests}/best-practice/package.json +1 -3
- package/dist/practices/tests/best-practice/package.json.declapract.ts +3 -0
- package/dist/practices/tests/best-practice/src/<star><star>/<star>.integration.test.ts.declapract.ts +3 -0
- package/dist/practices/tests/best-practice/src/<star><star>/<star>.test.ts.declapract.ts +3 -0
- package/dist/practices/tests-service/best-practice/package.json +5 -0
- package/dist/useCases.yml +4 -3
- package/package.json +6 -4
- package/dist/practices/testing/best-practice/acceptance/environment.ts +0 -5
- package/dist/practices/testing/best-practice/src/utils/environment.ts +0 -3
- package/dist/practices/testing/best-practice/src/utils/environment.ts.declapract.ts +0 -3
- /package/dist/practices/{testing → tests}/bad-practices/javascript-config-files/.declapract.readme.md +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/javascript-config-files/jest.<star>.js.declapract.ts +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/mocks/.declapract.readme.md +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/mocks/<star><star>/__mock__/<star>.js +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/mocks/<star><star>/__mock__/<star>.ts +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/old-acceptance-test-utils/acceptance/_utils/getDataFromLastOpenBracketAtStartOfLine.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/old-acceptance-test-utils/acceptance/_utils/invokeLambda.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/old-acceptance-test-utils/acceptance/lambdas/<star>.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/old-acceptance-test-utils-2/acceptance/__test_utils__/environment.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/old-acceptance-test-utils-2/acceptance/lambdas/<star>.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/old-acceptance-test-utils-3/acceptance/_utils/environment.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/old-acceptance-test-utils-3/acceptance/lambdas/<star>.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/old-extension-pattern/.declapract.readme.md +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/old-extension-pattern/<star><star>/<star>.test.acceptance.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests}/bad-practices/old-extension-pattern/<star><star>/<star>.test.integration.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests}/best-practice/.declapract.readme.md +0 -0
- /package/dist/practices/{testing → tests}/best-practice/jest.acceptance.config.ts +0 -0
- /package/dist/practices/{testing → tests}/best-practice/jest.acceptance.env.ts +0 -0
- /package/dist/practices/{testing → tests}/best-practice/jest.config.ts +0 -0
- /package/dist/practices/{testing → tests}/best-practice/jest.integration.config.ts +0 -0
- /package/dist/practices/{testing → tests}/best-practice/jest.integration.env.ts +0 -0
- /package/dist/practices/{testing → tests}/best-practice/jest.unit.config.ts +0 -0
- /package/dist/practices/{testing → tests}/best-practice/jest.unit.env.ts +0 -0
- /package/dist/practices/{testing → tests}/best-practice/jest.unit.env.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests-service}/best-practice/acceptance/<star><star>/<star>.acceptance.test.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests-service}/best-practice/acceptance/lambdas/<star>.acceptance.test.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests-service}/best-practice/package.json.declapract.ts +0 -0
- /package/dist/practices/{testing → tests-service}/best-practice/src/<star><star>/<star>.integration.test.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests-service}/best-practice/src/<star><star>/<star>.test.ts.declapract.ts +0 -0
- /package/dist/practices/{testing → tests-service}/defineFunctionNameFromTestFileName.ts +0 -0
|
@@ -50,9 +50,12 @@ const getEnvironment = () => {
|
|
|
50
50
|
return { stage };
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
// export stage immediately, since it does not change
|
|
53
|
+
// export stage immediately, since it does not change; // todo: replace this with env.access
|
|
54
54
|
export const { stage } = getEnvironment();
|
|
55
55
|
|
|
56
56
|
// export service client stage
|
|
57
57
|
export const serviceClientStage =
|
|
58
58
|
stage === Stage.PRODUCTION ? Stage.PRODUCTION : Stage.DEVELOPMENT; // i.e., if its prod, hit prod. otherwise, dev
|
|
59
|
+
|
|
60
|
+
// export whether we were asked to run locally; // todo, replace this with env.server
|
|
61
|
+
export const locally = process.env.LOCALLY === 'true'; // whether we want to acceptance test locally or deployed lambda
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
"jest": "@declapract{check.minVersion('29.3.1')}",
|
|
5
5
|
"test-fns": "@declapract{check.minVersion('1.4.2')}",
|
|
6
6
|
"ts-jest": "@declapract{check.minVersion('29.1.3')}",
|
|
7
|
-
"
|
|
8
|
-
"core-js": "@declapract{check.minVersion('3.26.1')}",
|
|
9
|
-
"simple-lambda-testing-methods": "@declapract{check.minVersion('0.4.2')}"
|
|
7
|
+
"core-js": "@declapract{check.minVersion('3.26.1')}"
|
|
10
8
|
},
|
|
11
9
|
"scripts": {
|
|
12
10
|
"test:unit": "jest -c ./jest.unit.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')",
|
package/dist/useCases.yml
CHANGED
|
@@ -7,7 +7,6 @@ use-cases:
|
|
|
7
7
|
- husky
|
|
8
8
|
- directory-structure-src
|
|
9
9
|
- domain
|
|
10
|
-
- environments
|
|
11
10
|
- errors
|
|
12
11
|
- format
|
|
13
12
|
- git
|
|
@@ -16,9 +15,8 @@ use-cases:
|
|
|
16
15
|
- nonpublished-modules
|
|
17
16
|
- package-json-order
|
|
18
17
|
- prettier
|
|
19
|
-
-
|
|
18
|
+
- tests
|
|
20
19
|
- typescript
|
|
21
|
-
- uuid
|
|
22
20
|
npm-package:
|
|
23
21
|
extends:
|
|
24
22
|
- typescript-project
|
|
@@ -34,6 +32,7 @@ use-cases:
|
|
|
34
32
|
- config
|
|
35
33
|
- commands
|
|
36
34
|
- dates-and-times
|
|
35
|
+
- environments
|
|
37
36
|
- environments-aws
|
|
38
37
|
- lambda-clients
|
|
39
38
|
- lambda-handlers
|
|
@@ -42,6 +41,8 @@ use-cases:
|
|
|
42
41
|
- runtime-type-checking
|
|
43
42
|
- serverless
|
|
44
43
|
- terraform
|
|
44
|
+
- tests-service
|
|
45
|
+
- uuid
|
|
45
46
|
lambda-service-with-rds:
|
|
46
47
|
extends:
|
|
47
48
|
- typescript-project # https://github.com/ehmpathy/declapract/issues/17
|
package/package.json
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
"name": "declapract-typescript-ehmpathy",
|
|
3
3
|
"author": "ehmpathy",
|
|
4
4
|
"description": "declapract best practices declarations for typescript",
|
|
5
|
-
"version": "0.35.
|
|
5
|
+
"version": "0.35.4",
|
|
6
|
+
"license": "MIT",
|
|
6
7
|
"main": "src/index.js",
|
|
7
8
|
"repository": "ehmpathy/declapract-typescript-ehmpathy",
|
|
8
9
|
"homepage": "https://github.com/ehmpathy/declapract-typescript-ehmpathy",
|
|
@@ -35,7 +36,8 @@
|
|
|
35
36
|
"prepush": "npm run test && npm run build",
|
|
36
37
|
"preversion": "npm run prepush",
|
|
37
38
|
"postversion": "git push origin HEAD --tags --no-verify",
|
|
38
|
-
"postinstall": "[ -d .git ] &&
|
|
39
|
+
"postinstall": "[ -d .git ] && npm run prepare:husky || exit 0",
|
|
40
|
+
"prepare:husky": "npx husky install && chmod ug+x .husky/*"
|
|
39
41
|
},
|
|
40
42
|
"dependencies": {
|
|
41
43
|
"domain-objects": "0.22.1",
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
"declapract": "0.11.5"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
49
|
-
"@commitlint/cli": "
|
|
51
|
+
"@commitlint/cli": "19.3.0",
|
|
50
52
|
"@commitlint/config-conventional": "13.1.0",
|
|
51
53
|
"@ehmpathy/as-command": "1.0.1",
|
|
52
54
|
"@trivago/prettier-plugin-sort-imports": "4.3.0",
|
|
@@ -71,7 +73,7 @@
|
|
|
71
73
|
"ts-node": "10.9.2",
|
|
72
74
|
"type-fns": "0.8.1",
|
|
73
75
|
"typescript": "5.4.5",
|
|
74
|
-
"visualogic": "1.2.
|
|
76
|
+
"visualogic": "1.2.3"
|
|
75
77
|
},
|
|
76
78
|
"config": {
|
|
77
79
|
"commitizen": {
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Stage, stage } from '../src/utils/environment';
|
|
2
|
-
|
|
3
|
-
export const locally = process.env.LOCALLY === 'true'; // whether we want to acceptance test locally or deployed lambda
|
|
4
|
-
|
|
5
|
-
export const testInProdOnly = stage === Stage.PRODUCTION ? test : test.skip; // allow testing in prod env only (sometimes we don't deploy certain things in dev / test)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/practices/{testing → tests}/bad-practices/mocks/<star><star>/__mock__/<star>.js
RENAMED
|
File without changes
|
/package/dist/practices/{testing → tests}/bad-practices/mocks/<star><star>/__mock__/<star>.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/practices/{testing → tests}/bad-practices/old-extension-pattern/.declapract.readme.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|