@defra/grants-config-utils 0.0.16 → 0.1.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.
@@ -1,9 +1,6 @@
1
1
  {
2
2
  "$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json",
3
- "changelog": [
4
- "@changesets/changelog-github",
5
- { "repo": "DEFRA/grants-config-utils" }
6
- ],
3
+ "changelog": "@changesets/cli/changelog",
7
4
  "commit": false,
8
5
  "fixed": [],
9
6
  "linked": [],
@@ -1,7 +1,7 @@
1
1
  name: Check Pull Request
2
2
 
3
3
  on:
4
- pull_request:
4
+ pull_request_target:
5
5
  branches:
6
6
  - main
7
7
  types:
@@ -10,6 +10,9 @@ on:
10
10
  - synchronize
11
11
  - ready_for_review
12
12
 
13
+ permissions:
14
+ contents: read
15
+
13
16
  jobs:
14
17
  cdp-workflows:
15
18
  name: Run Pull Request Checks
package/CHANGELOG.md CHANGED
@@ -1,67 +1,13 @@
1
1
  # @defra/grants-config-utils
2
2
 
3
- ## 0.0.16
3
+ ## 0.1.0
4
4
 
5
- ### Patch Changes
5
+ ### Minor Changes
6
6
 
7
- - [#22](https://github.com/DEFRA/grants-config-utils/pull/22) [`5e176da`](https://github.com/DEFRA/grants-config-utils/commit/5e176da89e1ba37dd419d719232eae247087d954) Thanks [@aaroncarroll82](https://github.com/aaroncarroll82)! - Allow check job to run on bot PR
7
+ - bce7478: Create limited config set for module use
8
8
 
9
- ## 0.0.15
9
+ ## pre-0.0.17
10
10
 
11
- ### Patch Changes
11
+ ### Changes
12
12
 
13
- - [#20](https://github.com/DEFRA/grants-config-utils/pull/20) [`a99b614`](https://github.com/DEFRA/grants-config-utils/commit/a99b61405ec43c4371e066af342d29d3224708d5) Thanks [@aaroncarroll82](https://github.com/aaroncarroll82)! - Skips some check steps on bot raised PR
14
-
15
- ## 0.0.14
16
-
17
- ### Patch Changes
18
-
19
- - [`05f2ca6`](https://github.com/DEFRA/grants-config-utils/commit/05f2ca64700ee0f6dc7d791dcea080ae22168ef1) Thanks [@aaroncarroll82](https://github.com/aaroncarroll82)! - Invoke publish mechanism
20
-
21
- ## 0.0.13
22
-
23
- ### Patch Changes
24
-
25
- - [#17](https://github.com/DEFRA/grants-config-utils/pull/17) [`91e030a`](https://github.com/DEFRA/grants-config-utils/commit/91e030ac2834ac0d4ae8c8b56f95f20048a8840a) Thanks [@aaroncarroll82](https://github.com/aaroncarroll82)! - Ensure npm publish happens too
26
-
27
- ## 0.0.12
28
-
29
- ### Patch Changes
30
-
31
- - [#15](https://github.com/DEFRA/grants-config-utils/pull/15) [`2172acd`](https://github.com/DEFRA/grants-config-utils/commit/2172acd0198efdc5df24e12b1f33d0ba24511427) Thanks [@aaroncarroll82](https://github.com/aaroncarroll82)! - Prevent sonarcloud interfering with release
32
-
33
- ## 0.0.11
34
-
35
- ### Patch Changes
36
-
37
- - [#13](https://github.com/DEFRA/grants-config-utils/pull/13) [`29ba4f3`](https://github.com/DEFRA/grants-config-utils/commit/29ba4f312943f1a54d2e4867b1529c8534bc5ce7) Thanks [@aaroncarroll82](https://github.com/aaroncarroll82)! - Build mechanism
38
-
39
- ## 0.0.10
40
-
41
- ### Patch Changes
42
-
43
- - [#8](https://github.com/DEFRA/grants-config-utils/pull/8) [`d6f369e`](https://github.com/DEFRA/grants-config-utils/commit/d6f369ebc4c4815f57b9ce07eff455d66b3cbf42) Thanks [@aaroncarroll82](https://github.com/aaroncarroll82)! - build: Change to PR based mechanism
44
-
45
- ## 0.0.6
46
-
47
- ### Patch Changes
48
-
49
- - [#5](https://github.com/DEFRA/grants-config-utils/pull/5) [`8dce91a`](https://github.com/DEFRA/grants-config-utils/commit/8dce91af68ace1d17faefe01d0b315f19193c940) Thanks [@bendef-24](https://github.com/bendef-24)! - feat(GRAN-20): add config already published check
50
-
51
- ## 0.0.5
52
-
53
- ### Patch Changes
54
-
55
- - [#7](https://github.com/DEFRA/grants-config-utils/pull/7) [`c9dd9db`](https://github.com/DEFRA/grants-config-utils/commit/c9dd9db4bb2e1f08cdcf042cb0c35a4f08224454) Thanks [@aaroncarroll82](https://github.com/aaroncarroll82)! - docs: Update documentation
56
-
57
- ## 0.0.4
58
-
59
- ### Patch Changes
60
-
61
- - [`0872722`](https://github.com/DEFRA/grants-config-utils/commit/087272224854f3782b0bc4cc5e7c4123e9ab5e59) Thanks [@aaroncarroll82](https://github.com/aaroncarroll82)! - build: Switch order around in workflow
62
-
63
- ## 0.0.3
64
-
65
- ### Patch Changes
66
-
67
- - [#6](https://github.com/DEFRA/grants-config-utils/pull/6) [`968228f`](https://github.com/DEFRA/grants-config-utils/commit/968228fae0e02db1a0570be9fc3b693d390e76a5) Thanks [@aaroncarroll82](https://github.com/aaroncarroll82)! - Create new version via CI with trusted publishing
13
+ Changes squashed prior to new formatting of changelog.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/grants-config-utils",
3
- "version": "0.0.16",
3
+ "version": "0.1.0",
4
4
  "description": "NPM module for providing utils for publishing grants config",
5
5
  "engines": {
6
6
  "node": ">=24",
@@ -3,9 +3,6 @@ import convictFormatWithValidator from "convict-format-with-validator";
3
3
 
4
4
  convict.addFormats(convictFormatWithValidator);
5
5
 
6
- const isProduction = process.env.NODE_ENV === "production";
7
- const isTest = process.env.NODE_ENV === "test";
8
-
9
6
  export const config = convict({
10
7
  serviceVersion: {
11
8
  doc: "The service version, this variable is injected into your docker container in CDP environments",
@@ -14,80 +11,6 @@ export const config = convict({
14
11
  default: null,
15
12
  env: "SERVICE_VERSION",
16
13
  },
17
- host: {
18
- doc: "The IP address to bind",
19
- format: "ipaddress",
20
- default: "0.0.0.0",
21
- env: "HOST",
22
- },
23
- port: {
24
- doc: "The port to bind",
25
- format: "port",
26
- default: 3001,
27
- env: "PORT",
28
- },
29
- serviceName: {
30
- doc: "Api Service Name",
31
- format: String,
32
- default: "grants-config-playground",
33
- },
34
- cdpEnvironment: {
35
- doc: 'The CDP environment the app is running in. With the addition of "local" for local development',
36
- format: [
37
- "local",
38
- "infra-dev",
39
- "management",
40
- "dev",
41
- "test",
42
- "perf-test",
43
- "ext-test",
44
- "prod",
45
- ],
46
- default: "local",
47
- env: "ENVIRONMENT",
48
- },
49
- log: {
50
- isEnabled: {
51
- doc: "Is logging enabled",
52
- format: Boolean,
53
- default: !isTest,
54
- env: "LOG_ENABLED",
55
- },
56
- level: {
57
- doc: "Logging level",
58
- format: ["fatal", "error", "warn", "info", "debug", "trace", "silent"],
59
- default: "info",
60
- env: "LOG_LEVEL",
61
- },
62
- format: {
63
- doc: "Format to output logs in",
64
- format: ["ecs", "pino-pretty"],
65
- default: isProduction ? "ecs" : "pino-pretty",
66
- env: "LOG_FORMAT",
67
- },
68
- redact: {
69
- doc: "Log paths to redact",
70
- format: Array,
71
- default: isProduction
72
- ? ["req.headers.authorization", "req.headers.cookie", "res.headers"]
73
- : ["req", "res", "responseTime"],
74
- },
75
- },
76
- httpProxy: {
77
- doc: "HTTP Proxy URL",
78
- format: String,
79
- nullable: true,
80
- default: null,
81
- env: "HTTP_PROXY",
82
- },
83
- tracing: {
84
- header: {
85
- doc: "CDP tracing header name",
86
- format: String,
87
- default: "x-cdp-request-id",
88
- env: "TRACING_HEADER",
89
- },
90
- },
91
14
  aws: {
92
15
  endpointUrl: {
93
16
  doc: "AWS Endpoint URL used for LocalStack",