Skip to content

Commit 61c3691

Browse files
committed
update readme
1 parent ffb9284 commit 61c3691

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Available constructs and helpers include:
2626
- `TypescriptLambdaFunction` – A reusable construct for TypeScript Lambda functions
2727
- `createApp` – Helper for creating a CDK `App` pre-configured with standard EPS tags and stack props
2828
- `deleteUnusedStacks` – Helper functions for cleaning up superseded or PR-based CloudFormation stacks and their Route 53 records
29+
- `checkDestructiveChangeSet` – Describes a CloudFormation change set, filters out replacements and removals (optionally applying time-bound waivers) and throws if anything destructive remains.
2930

3031
### CDK app bootstrap (`createApp`)
3132

@@ -63,22 +64,13 @@ These functions are designed to be invoked from scheduled jobs (for example, a n
6364

6465
Refer to [packages/cdkConstructs/tests/stacks/deleteUnusedStacks.test.ts](packages/cdkConstructs/tests/stacks/deleteUnusedStacks.test.ts) for example scenarios.
6566

66-
## Deployment utilities (`packages/deploymentUtils`)
67-
68-
The [packages/deploymentUtils](packages/deploymentUtils) package contains utilities for working with OpenAPI specifications and Proxygen-based API deployments.
69-
70-
It exposes the following main entry points via [packages/deploymentUtils/src/index.ts](packages/deploymentUtils/src/index.ts):
71-
72-
- `deployApi` – Normalises an OpenAPI specification and deploys it via Proxygen Lambda functions, optionally performing blue/green deployments and publishing documentation to the appropriate catalogue.
73-
- `writeSchemas` – Writes JSON Schemas to disk, collapsing `examples` arrays into a single `example` value to be compatible with OAS.
74-
- `deleteProxygenDeployments` – Removes Proxygen PTL instances that correspond to closed GitHub pull requests for a given API.
75-
- Config helpers from `config/index` – used to resolve configuration and CloudFormation export values.
76-
- `checkDestructiveChangeSet` – Describes a CloudFormation change set, filters out replacements and removals (optionally applying time-bound waivers) and throws if anything destructive remains.
67+
### Check destructive change sets
68+
This is used for stateful stack deployments where we want confirmation before doing any potentially destructive changes.
7769

7870
`checkDestructiveChangeSet(changeSetName, stackName, region, allowedChanges?)` is useful in CI pipelines for blocking deployments that would recreate or delete infrastructure. The optional `allowedChanges` array lets you provide short-lived waivers, for example:
7971

8072
```ts
81-
import {checkDestructiveChangeSet} from "@nhsdigital/eps-deployment-utils"
73+
import {checkDestructiveChangeSet} from "@nhsdigital/eps-cdk-constructs"
8274

8375
await checkDestructiveChangeSet(
8476
process.env.CDK_CHANGE_SET_NAME,
@@ -99,6 +91,18 @@ await checkDestructiveChangeSet(
9991

10092
Each waiver is effective only when the stack name, logical ID, physical ID, and resource type all match and the waiver’s `ExpiryDate` is later than the change set’s `CreationTime`. When no destructive changes remain, the helper logs a confirmation message; otherwise it prints the problematic resources and throws.
10193

94+
95+
## Deployment utilities (`packages/deploymentUtils`)
96+
97+
The [packages/deploymentUtils](packages/deploymentUtils) package contains utilities for working with OpenAPI specifications and Proxygen-based API deployments.
98+
99+
It exposes the following main entry points via [packages/deploymentUtils/src/index.ts](packages/deploymentUtils/src/index.ts):
100+
101+
- `deployApi` – Normalises an OpenAPI specification and deploys it via Proxygen Lambda functions, optionally performing blue/green deployments and publishing documentation to the appropriate catalogue.
102+
- `writeSchemas` – Writes JSON Schemas to disk, collapsing `examples` arrays into a single `example` value to be compatible with OAS.
103+
- `deleteProxygenDeployments` – Removes Proxygen PTL instances that correspond to closed GitHub pull requests for a given API.
104+
- Config helpers from `config/index` – used to resolve configuration and CloudFormation export values.
105+
102106
Typical usage pattern (pseudo-code):
103107

104108
```ts

0 commit comments

Comments
 (0)