@valentine-efagene/qshelter-common 2.0.129 → 2.0.131

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.
@@ -39,13 +39,22 @@ export class ConfigService {
39
39
  return cached;
40
40
  const pathPrefix = `/qshelter/${stage}/`;
41
41
  try {
42
- const command = new GetParametersByPathCommand({
43
- Path: pathPrefix,
44
- Recursive: true,
45
- WithDecryption: false,
46
- });
47
- const response = await this.ssmClient.send(command);
48
- const params = response.Parameters || [];
42
+ // Paginate through all SSM parameters
43
+ const params = [];
44
+ let nextToken;
45
+ do {
46
+ const command = new GetParametersByPathCommand({
47
+ Path: pathPrefix,
48
+ Recursive: true,
49
+ WithDecryption: false,
50
+ NextToken: nextToken,
51
+ });
52
+ const response = await this.ssmClient.send(command);
53
+ if (response.Parameters) {
54
+ params.push(...response.Parameters);
55
+ }
56
+ nextToken = response.NextToken;
57
+ } while (nextToken);
49
58
  const config = {
50
59
  vpcId: this.getParamValue(params, `${pathPrefix}vpc-id`),
51
60
  dbSecurityGroupId: this.getParamValue(params, `${pathPrefix}db-security-group-id`),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valentine-efagene/qshelter-common",
3
- "version": "2.0.129",
3
+ "version": "2.0.131",
4
4
  "description": "Shared database schemas and utilities for QShelter services",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",