declapract-typescript-ehmpathy 0.48.2 → 0.48.3

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,5 @@
1
+ {
2
+ "dependencies": {
3
+ "bottleneck": "@declapract{check.minVersion('0.0.0')}"
4
+ }
5
+ }
@@ -0,0 +1,19 @@
1
+ import { FileCheckType, type FileFixFunction } from 'declapract';
2
+
3
+ export const check = FileCheckType.CONTAINS;
4
+
5
+ export const fix: FileFixFunction = (contents) => {
6
+ if (!contents) return { contents };
7
+ const packageJSON = JSON.parse(contents);
8
+ const updatedPackageJSON = {
9
+ ...packageJSON,
10
+ dependencies: {
11
+ ...packageJSON.dependencies,
12
+ bottleneck: undefined,
13
+ 'with-bottleneck': packageJSON.dependencies?.bottleneck,
14
+ },
15
+ };
16
+ return {
17
+ contents: JSON.stringify(updatedPackageJSON, null, 2),
18
+ };
19
+ };
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
- "sdk-environment": "@declapract{check.minVersion('0.1.3')}"
3
+ "@aws-sdk/client-account": "@declapract{check.minVersion('3.1042.0')}",
4
+ "@aws-sdk/client-iam": "@declapract{check.minVersion('3.1042.0')}",
5
+ "sdk-environment": "@declapract{check.minVersion('0.1.4')}"
4
6
  }
5
7
  }
@@ -0,0 +1,5 @@
1
+ {
2
+ "dependencies": {
3
+ "simple-log-methods": "@declapract{check.minVersion('0.0.0')}"
4
+ }
5
+ }
@@ -0,0 +1,18 @@
1
+ import { FileCheckType, type FileFixFunction } from 'declapract';
2
+
3
+ export const check = FileCheckType.CONTAINS;
4
+
5
+ export const fix: FileFixFunction = (contents) => {
6
+ if (!contents) return { contents };
7
+ const packageJSON = JSON.parse(contents);
8
+ const updatedPackageJSON = {
9
+ ...packageJSON,
10
+ dependencies: {
11
+ ...packageJSON.dependencies,
12
+ 'simple-log-methods': undefined,
13
+ },
14
+ };
15
+ return {
16
+ contents: JSON.stringify(updatedPackageJSON, null, 2),
17
+ };
18
+ };
@@ -0,0 +1,15 @@
1
+ import type { FileCheckFunction, FileFixFunction } from 'declapract';
2
+
3
+ export const check: FileCheckFunction = (contents) => {
4
+ if (contents?.includes("from 'simple-log-methods'")) return;
5
+ throw new Error('does not match bad practice');
6
+ };
7
+
8
+ export const fix: FileFixFunction = (contents) => {
9
+ if (!contents) return {};
10
+ return {
11
+ contents: contents
12
+ .replace(/from 'simple-log-methods'/g, "from 'sdk-logs'")
13
+ .replace(/generateLogMethods/g, 'genLogMethods'),
14
+ };
15
+ };
@@ -0,0 +1,5 @@
1
+ {
2
+ "dependencies": {
3
+ "sdk-logs": "@declapract{check.minVersion('0.9.2')}"
4
+ }
5
+ }
@@ -0,0 +1,3 @@
1
+ import { genLogMethods } from 'sdk-logs';
2
+
3
+ export const log = genLogMethods();
@@ -6,7 +6,8 @@
6
6
  "rhachet-brains-xai": "@declapract{check.minVersion('0.3.3')}",
7
7
  "rhachet-roles-bhrain": "@declapract{check.minVersion('0.29.0')}",
8
8
  "rhachet-roles-bhuild": "@declapract{check.minVersion('0.21.15')}",
9
- "rhachet-roles-ehmpathy": "@declapract{check.minVersion('1.35.12')}"
9
+ "rhachet-roles-ehmpathy": "@declapract{check.minVersion('1.35.12')}",
10
+ "rhachet-roles-rhachet": "@declapract{check.minVersion('0.1.7')}"
10
11
  },
11
12
  "scripts": {
12
13
  "prepare:rhachet": "rhachet init --keys --hooks --roles mechanic behaver driver reviewer librarian ergonomist architect dispatcher",
package/dist/useCases.yml CHANGED
@@ -19,6 +19,7 @@ use-cases:
19
19
  - tests
20
20
  - typescript
21
21
  - pnpm
22
+ - bottleneck
22
23
  npm-package:
23
24
  extends:
24
25
  - typescript-project
@@ -39,7 +40,7 @@ use-cases:
39
40
  - environments-aws
40
41
  - lambda-clients
41
42
  - lambda-handlers
42
- - logging
43
+ - logs
43
44
  - node-service
44
45
  - runtime-type-checking
45
46
  - serverless
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.48.2",
5
+ "version": "0.48.3",
6
6
  "license": "MIT",
7
7
  "main": "src/index.js",
8
8
  "repository": "ehmpathy/declapract-typescript-ehmpathy",
@@ -47,10 +47,10 @@
47
47
  "prepare": "if [ -e .git ] && [ -z \"${CI:-}\" ]; then npm run prepare:husky && npm run prepare:rhachet; fi"
48
48
  },
49
49
  "dependencies": {
50
- "domain-objects": "0.31.9",
50
+ "domain-objects": "0.31.13",
51
51
  "expect": "29.4.2",
52
52
  "flat": "5.0.2",
53
- "helpful-errors": "1.5.3",
53
+ "helpful-errors": "1.7.3",
54
54
  "test-fns": "1.15.7",
55
55
  "yaml": "2.8.2"
56
56
  },
package/readme.md CHANGED
@@ -123,7 +123,7 @@ React Native mobile apps with Expo
123
123
  - **lambda-handlers** - Standard Lambda function structure
124
124
  - **lambda-clients** - Type-safe Lambda client wrappers
125
125
  - **config** - Environment configuration with AWS Parameter Store
126
- - **logs** - Structured logging with `simple-log-methods`
126
+ - **logs** - Structured logging with `sdk-logs`
127
127
  - **uuid** - UUID generation standards
128
128
  - etc
129
129
 
@@ -1,5 +0,0 @@
1
- {
2
- "dependencies": {
3
- "simple-log-methods": "@declapract{check.minVersion('0.5.0')}"
4
- }
5
- }
@@ -1,3 +0,0 @@
1
- import { generateLogMethods } from 'simple-log-methods';
2
-
3
- export const log = generateLogMethods();