declapract-typescript-ehmpathy 0.32.0 → 0.33.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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": {
3
+ "visualogic": "@declapract{check.minVersion('1.0.1')}",
4
+ "@ehmpathy/as-command": "@declapract{check.minVersion('1.2.1')}"
5
+ }
6
+ }
@@ -0,0 +1,3 @@
1
+ import { FileCheckType } from 'declapract';
2
+
3
+ export const check = FileCheckType.CONTAINS;
@@ -0,0 +1,4 @@
1
+ export const COMMANDS_OUTPUT_DIRECTORY = __dirname
2
+ .split('/')
3
+ .slice(0, -1)
4
+ .join('/');
@@ -0,0 +1,20 @@
1
+ import { asCommand } from '@ehmpathy/as-command';
2
+ import { UnexpectedCodePathError } from '@ehmpathy/error-fns';
3
+ import { ProcedureInput, getResourceNameFromFileName } from 'visualogic';
4
+
5
+ import { stage } from '../../utils/environment';
6
+ import { log } from '../../utils/logger';
7
+ import { COMMANDS_OUTPUT_DIRECTORY } from './__tmp__/directory';
8
+
9
+ const command = asCommand(
10
+ {
11
+ name: getResourceNameFromFileName(__filename),
12
+ stage,
13
+ dir: COMMANDS_OUTPUT_DIRECTORY,
14
+ log,
15
+ },
16
+ async () => console.log('hello world'),
17
+ );
18
+
19
+ // STAGE=prod npx tsx src/contract/commands/sayHello.ts
20
+ if (require.main === module) void command({});
package/dist/useCases.yml CHANGED
@@ -32,6 +32,7 @@ use-cases:
32
32
  - artifact
33
33
  - cicd-service
34
34
  - config
35
+ - commands
35
36
  - dates-and-times
36
37
  - environments-aws
37
38
  - lambda-clients
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.32.0",
5
+ "version": "0.33.0",
6
6
  "main": "src/index.js",
7
7
  "repository": "ehmpathy/declapract-typescript-ehmpathy",
8
8
  "homepage": "https://github.com/ehmpathy/declapract-typescript-ehmpathy",
@@ -41,8 +41,7 @@
41
41
  "@ehmpathy/error-fns": "1.3.1",
42
42
  "expect": "29.4.2",
43
43
  "flat": "5.0.2",
44
- "lodash.uniq": "4.5.0",
45
- "type-fns": "0.8.1"
44
+ "lodash.uniq": "4.5.0"
46
45
  },
47
46
  "peerDependencies": {
48
47
  "declapract": "0.11.2"
@@ -70,6 +69,9 @@
70
69
  "prettier": "2.8.1",
71
70
  "ts-jest": "29.0.3",
72
71
  "ts-node": "10.9.1",
72
+ "type-fns": "0.8.1",
73
+ "@ehmpathy/as-command": "1.0.1",
74
+ "visualogic": "1.2.1",
73
75
  "typescript": "4.9.4"
74
76
  },
75
77
  "config": {