declapract-typescript-ehmpathy 0.43.16 → 0.43.18
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/provision-github/best-practice/provision/github/declastruct.resources.ts +5 -5
- 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
package/dist/practices/provision-github/best-practice/provision/github/declastruct.resources.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { DeclastructProvider } from 'declastruct';
|
|
1
|
+
import type { DeclastructProvider } from 'declastruct';
|
|
2
2
|
import {
|
|
3
|
-
DeclaredGithubBranch,
|
|
3
|
+
type DeclaredGithubBranch,
|
|
4
4
|
DeclaredGithubBranchProtection,
|
|
5
5
|
DeclaredGithubRepo,
|
|
6
6
|
DeclaredGithubRepoConfig,
|
|
7
7
|
getDeclastructGithubProvider,
|
|
8
8
|
} from 'declastruct-github';
|
|
9
|
-
import { DomainEntity, RefByUnique } from 'domain-objects';
|
|
9
|
+
import { type DomainEntity, RefByUnique } from 'domain-objects';
|
|
10
10
|
import { UnexpectedCodePathError } from 'helpful-errors';
|
|
11
11
|
|
|
12
12
|
import pkg from '../../package.json';
|
|
@@ -34,8 +34,8 @@ export const getProviders = async (): Promise<DeclastructProvider[]> => [
|
|
|
34
34
|
export const getResources = async (): Promise<DomainEntity<any>[]> => {
|
|
35
35
|
// declare the repo
|
|
36
36
|
const repo = DeclaredGithubRepo.as({
|
|
37
|
-
owner: '
|
|
38
|
-
name: '
|
|
37
|
+
owner: 'ehmpathy',
|
|
38
|
+
name: 'rhachet-roles-ehmpathy',
|
|
39
39
|
description: (pkg as any).description ?? null,
|
|
40
40
|
visibility: (pkg as any).private === true ? 'private' : 'public',
|
|
41
41
|
private: (pkg as any).private ?? false, // todo: why do we have to specify this twice?
|
|
@@ -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.18",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"repository": "ehmpathy/declapract-typescript-ehmpathy",
|