declapract-typescript-ehmpathy 0.43.16 → 0.43.17
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/runtime-type-checking/bad-practices/joi/.declapract.readme.md +3 -0
- package/dist/practices/runtime-type-checking/bad-practices/joi/package.json +5 -0
- package/dist/practices/runtime-type-checking/bad-practices/joi/package.json.declapract.ts +19 -0
- package/dist/practices/runtime-type-checking/best-practice/package.json +1 -1
- package/dist/practices/serverless/best-practice/serverless.yml +1 -1
- package/package.json +1 -1
|
@@ -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
|
+
joi: undefined,
|
|
13
|
+
zod: packageJSON.dependencies?.zod ?? '^3.24.0',
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
contents: JSON.stringify(updatedPackageJSON, null, 2),
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -8,7 +8,7 @@ plugins:
|
|
|
8
8
|
|
|
9
9
|
provider:
|
|
10
10
|
name: aws
|
|
11
|
-
runtime:
|
|
11
|
+
runtime: nodejs22.x
|
|
12
12
|
memorySize: 1024 # optional, in mb, default is 1024
|
|
13
13
|
timeout: 60 # default timeout to 1min, for resilience against increased cold start times; individual functions can override this
|
|
14
14
|
stage: ${opt:stage}
|
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.43.
|
|
5
|
+
"version": "0.43.17",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"repository": "ehmpathy/declapract-typescript-ehmpathy",
|