@capraconsulting/cals-cli 3.2.11 → 3.4.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.
- package/lib/cals-cli.js +2 -2
- package/lib/index.es.js +50 -2
- package/lib/index.es.js.map +1 -1
- package/lib/index.js +49 -1
- package/lib/index.js.map +1 -1
- package/lib/load-secrets/types.d.ts +13 -1
- package/package.json +2 -2
package/lib/cals-cli.js
CHANGED
|
@@ -68,7 +68,7 @@ var read__default = /*#__PURE__*/_interopDefaultLegacy(read);
|
|
|
68
68
|
var findUp__default = /*#__PURE__*/_interopDefaultLegacy(findUp);
|
|
69
69
|
var execa__default = /*#__PURE__*/_interopDefaultLegacy(execa);
|
|
70
70
|
|
|
71
|
-
var version = "3.
|
|
71
|
+
var version = "3.4.0";
|
|
72
72
|
var engines = {
|
|
73
73
|
node: ">=12.0.0"
|
|
74
74
|
};
|
|
@@ -3417,7 +3417,7 @@ async function main() {
|
|
|
3417
3417
|
/ /___/ ___ |/ /______/ /
|
|
3418
3418
|
\\____/_/ |_/_____/____/
|
|
3419
3419
|
cli ${version}
|
|
3420
|
-
built ${"2023-11-
|
|
3420
|
+
built ${"2023-11-28T14:57:22+0000"}
|
|
3421
3421
|
|
|
3422
3422
|
https://github.com/capralifecycle/cals-cli/
|
|
3423
3423
|
|
package/lib/index.es.js
CHANGED
|
@@ -16,14 +16,14 @@ import pLimit from 'p-limit';
|
|
|
16
16
|
import keytar from 'keytar';
|
|
17
17
|
import * as process$1 from 'process';
|
|
18
18
|
import { performance } from 'perf_hooks';
|
|
19
|
-
import { SecretsManagerClient, DescribeSecretCommand, UntagResourceCommand, TagResourceCommand, GetSecretValueCommand, CreateSecretCommand, RestoreSecretCommand, PutSecretValueCommand } from '@aws-sdk/client-secrets-manager';
|
|
19
|
+
import { SecretsManagerClient, DescribeSecretCommand, UntagResourceCommand, TagResourceCommand, GetSecretValueCommand, CreateSecretCommand, RestoreSecretCommand, PutSecretValueCommand, ReplicateSecretToRegionsCommand, RemoveRegionsFromReplicationCommand } from '@aws-sdk/client-secrets-manager';
|
|
20
20
|
import { STSClient, GetCallerIdentityCommand } from '@aws-sdk/client-sts';
|
|
21
21
|
import read from 'read';
|
|
22
22
|
import { strict } from 'assert';
|
|
23
23
|
import execa from 'execa';
|
|
24
24
|
import { Transform } from 'stream';
|
|
25
25
|
|
|
26
|
-
var version = "3.
|
|
26
|
+
var version = "3.4.0";
|
|
27
27
|
|
|
28
28
|
class CacheProvider {
|
|
29
29
|
constructor(config) {
|
|
@@ -1193,6 +1193,12 @@ class LoadSecrets {
|
|
|
1193
1193
|
throw e;
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
|
+
async handleStringUpdate() {
|
|
1197
|
+
return await this.getInput({
|
|
1198
|
+
prompt: "Enter value (Ctrl+C to abort): ",
|
|
1199
|
+
silent: this.silent,
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
1196
1202
|
async handleJsonUpdate(secret) {
|
|
1197
1203
|
this.reporter.log("The secret is of type JSON with these expected fields:");
|
|
1198
1204
|
for (const field of secret.fields) {
|
|
@@ -1258,6 +1264,7 @@ class LoadSecrets {
|
|
|
1258
1264
|
return result.SecretString;
|
|
1259
1265
|
}
|
|
1260
1266
|
async handleUpdate(secretGroup, secret) {
|
|
1267
|
+
var _a, _b, _c, _d, _e;
|
|
1261
1268
|
const client = this.getSmClient(secretGroup.region);
|
|
1262
1269
|
const fullName = this.getFullName(secretGroup, secret);
|
|
1263
1270
|
const describeSecret = await this.getSecretDetails(client, fullName);
|
|
@@ -1283,6 +1290,9 @@ class LoadSecrets {
|
|
|
1283
1290
|
throw e;
|
|
1284
1291
|
}
|
|
1285
1292
|
}
|
|
1293
|
+
else if (secret.type === "string") {
|
|
1294
|
+
secretValue = await this.handleStringUpdate();
|
|
1295
|
+
}
|
|
1286
1296
|
else {
|
|
1287
1297
|
throw new Error(`Unsupported type`);
|
|
1288
1298
|
}
|
|
@@ -1296,9 +1306,17 @@ class LoadSecrets {
|
|
|
1296
1306
|
];
|
|
1297
1307
|
let arn;
|
|
1298
1308
|
let version;
|
|
1309
|
+
let newReplicaRegions = [];
|
|
1310
|
+
let removedReplicaRegions = [];
|
|
1299
1311
|
if (describeSecret == null) {
|
|
1312
|
+
newReplicaRegions = (_a = secret.replicaRegions) !== null && _a !== void 0 ? _a : [];
|
|
1300
1313
|
const createResult = await client.send(new CreateSecretCommand({
|
|
1301
1314
|
Name: fullName,
|
|
1315
|
+
AddReplicaRegions: secret.replicaRegions
|
|
1316
|
+
? secret.replicaRegions.map((replicaRegion) => ({
|
|
1317
|
+
Region: replicaRegion,
|
|
1318
|
+
}))
|
|
1319
|
+
: undefined,
|
|
1302
1320
|
Description: "Created by load-secrets",
|
|
1303
1321
|
SecretString: secretValue,
|
|
1304
1322
|
Tags: tags,
|
|
@@ -1319,6 +1337,26 @@ class LoadSecrets {
|
|
|
1319
1337
|
SecretId: fullName,
|
|
1320
1338
|
SecretString: secretValue,
|
|
1321
1339
|
}));
|
|
1340
|
+
const currentReplicaRegions = (_c = (_b = describeSecret.ReplicationStatus) === null || _b === void 0 ? void 0 : _b.map((replicationStatus) => replicationStatus.Region)) !== null && _c !== void 0 ? _c : [];
|
|
1341
|
+
newReplicaRegions =
|
|
1342
|
+
(_e = (_d = secret.replicaRegions) === null || _d === void 0 ? void 0 : _d.filter((region) => !currentReplicaRegions.includes(region))) !== null && _e !== void 0 ? _e : [];
|
|
1343
|
+
removedReplicaRegions = currentReplicaRegions
|
|
1344
|
+
.filter((region) => !!region && typeof region === "string")
|
|
1345
|
+
.filter((region) => !(secret.replicaRegions || []).includes(region));
|
|
1346
|
+
if (newReplicaRegions.length > 0) {
|
|
1347
|
+
await client.send(new ReplicateSecretToRegionsCommand({
|
|
1348
|
+
SecretId: fullName,
|
|
1349
|
+
AddReplicaRegions: newReplicaRegions.map((region) => ({
|
|
1350
|
+
Region: region,
|
|
1351
|
+
})),
|
|
1352
|
+
}));
|
|
1353
|
+
}
|
|
1354
|
+
if (removedReplicaRegions.length > 0) {
|
|
1355
|
+
await client.send(new RemoveRegionsFromReplicationCommand({
|
|
1356
|
+
SecretId: fullName,
|
|
1357
|
+
RemoveReplicaRegions: removedReplicaRegions,
|
|
1358
|
+
}));
|
|
1359
|
+
}
|
|
1322
1360
|
if (updateResult.VersionId == null) {
|
|
1323
1361
|
throw new Error("Expected versionId");
|
|
1324
1362
|
}
|
|
@@ -1330,6 +1368,16 @@ class LoadSecrets {
|
|
|
1330
1368
|
this.reporter.log("Secret stored:");
|
|
1331
1369
|
this.reporter.log(`ARN: ${this.reporter.format.greenBright(arn)}`);
|
|
1332
1370
|
this.reporter.log(`Version: ${this.reporter.format.greenBright(version)}`);
|
|
1371
|
+
if (newReplicaRegions.length > 0) {
|
|
1372
|
+
this.reporter.log(`Read replicas added to regions: ${newReplicaRegions
|
|
1373
|
+
.map((r) => this.reporter.format.greenBright(r))
|
|
1374
|
+
.join(", ")}`);
|
|
1375
|
+
}
|
|
1376
|
+
if (removedReplicaRegions.length > 0) {
|
|
1377
|
+
this.reporter.log(`Read replicas removed from regions: ${removedReplicaRegions
|
|
1378
|
+
.map((r) => this.reporter.format.redBright(r))
|
|
1379
|
+
.join(", ")}`);
|
|
1380
|
+
}
|
|
1333
1381
|
}
|
|
1334
1382
|
checkSecretGroup(secretGroup) {
|
|
1335
1383
|
if (!secretGroup.namePrefix.startsWith("/") ||
|
package/lib/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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URE__*/_interopNamespace(process$1);
|
|
|
64
64
|
var read__default = /*#__PURE__*/_interopDefaultLegacy(read);
|
|
65
65
|
var execa__default = /*#__PURE__*/_interopDefaultLegacy(execa);
|
|
66
66
|
|
|
67
|
-
var version = "3.
|
|
67
|
+
var version = "3.4.0";
|
|
68
68
|
|
|
69
69
|
class CacheProvider {
|
|
70
70
|
constructor(config) {
|
|
@@ -1234,6 +1234,12 @@ class LoadSecrets {
|
|
|
1234
1234
|
throw e;
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
|
+
async handleStringUpdate() {
|
|
1238
|
+
return await this.getInput({
|
|
1239
|
+
prompt: "Enter value (Ctrl+C to abort): ",
|
|
1240
|
+
silent: this.silent,
|
|
1241
|
+
});
|
|
1242
|
+
}
|
|
1237
1243
|
async handleJsonUpdate(secret) {
|
|
1238
1244
|
this.reporter.log("The secret is of type JSON with these expected fields:");
|
|
1239
1245
|
for (const field of secret.fields) {
|
|
@@ -1299,6 +1305,7 @@ class LoadSecrets {
|
|
|
1299
1305
|
return result.SecretString;
|
|
1300
1306
|
}
|
|
1301
1307
|
async handleUpdate(secretGroup, secret) {
|
|
1308
|
+
var _a, _b, _c, _d, _e;
|
|
1302
1309
|
const client = this.getSmClient(secretGroup.region);
|
|
1303
1310
|
const fullName = this.getFullName(secretGroup, secret);
|
|
1304
1311
|
const describeSecret = await this.getSecretDetails(client, fullName);
|
|
@@ -1324,6 +1331,9 @@ class LoadSecrets {
|
|
|
1324
1331
|
throw e;
|
|
1325
1332
|
}
|
|
1326
1333
|
}
|
|
1334
|
+
else if (secret.type === "string") {
|
|
1335
|
+
secretValue = await this.handleStringUpdate();
|
|
1336
|
+
}
|
|
1327
1337
|
else {
|
|
1328
1338
|
throw new Error(`Unsupported type`);
|
|
1329
1339
|
}
|
|
@@ -1337,9 +1347,17 @@ class LoadSecrets {
|
|
|
1337
1347
|
];
|
|
1338
1348
|
let arn;
|
|
1339
1349
|
let version;
|
|
1350
|
+
let newReplicaRegions = [];
|
|
1351
|
+
let removedReplicaRegions = [];
|
|
1340
1352
|
if (describeSecret == null) {
|
|
1353
|
+
newReplicaRegions = (_a = secret.replicaRegions) !== null && _a !== void 0 ? _a : [];
|
|
1341
1354
|
const createResult = await client.send(new clientSecretsManager.CreateSecretCommand({
|
|
1342
1355
|
Name: fullName,
|
|
1356
|
+
AddReplicaRegions: secret.replicaRegions
|
|
1357
|
+
? secret.replicaRegions.map((replicaRegion) => ({
|
|
1358
|
+
Region: replicaRegion,
|
|
1359
|
+
}))
|
|
1360
|
+
: undefined,
|
|
1343
1361
|
Description: "Created by load-secrets",
|
|
1344
1362
|
SecretString: secretValue,
|
|
1345
1363
|
Tags: tags,
|
|
@@ -1360,6 +1378,26 @@ class LoadSecrets {
|
|
|
1360
1378
|
SecretId: fullName,
|
|
1361
1379
|
SecretString: secretValue,
|
|
1362
1380
|
}));
|
|
1381
|
+
const currentReplicaRegions = (_c = (_b = describeSecret.ReplicationStatus) === null || _b === void 0 ? void 0 : _b.map((replicationStatus) => replicationStatus.Region)) !== null && _c !== void 0 ? _c : [];
|
|
1382
|
+
newReplicaRegions =
|
|
1383
|
+
(_e = (_d = secret.replicaRegions) === null || _d === void 0 ? void 0 : _d.filter((region) => !currentReplicaRegions.includes(region))) !== null && _e !== void 0 ? _e : [];
|
|
1384
|
+
removedReplicaRegions = currentReplicaRegions
|
|
1385
|
+
.filter((region) => !!region && typeof region === "string")
|
|
1386
|
+
.filter((region) => !(secret.replicaRegions || []).includes(region));
|
|
1387
|
+
if (newReplicaRegions.length > 0) {
|
|
1388
|
+
await client.send(new clientSecretsManager.ReplicateSecretToRegionsCommand({
|
|
1389
|
+
SecretId: fullName,
|
|
1390
|
+
AddReplicaRegions: newReplicaRegions.map((region) => ({
|
|
1391
|
+
Region: region,
|
|
1392
|
+
})),
|
|
1393
|
+
}));
|
|
1394
|
+
}
|
|
1395
|
+
if (removedReplicaRegions.length > 0) {
|
|
1396
|
+
await client.send(new clientSecretsManager.RemoveRegionsFromReplicationCommand({
|
|
1397
|
+
SecretId: fullName,
|
|
1398
|
+
RemoveReplicaRegions: removedReplicaRegions,
|
|
1399
|
+
}));
|
|
1400
|
+
}
|
|
1363
1401
|
if (updateResult.VersionId == null) {
|
|
1364
1402
|
throw new Error("Expected versionId");
|
|
1365
1403
|
}
|
|
@@ -1371,6 +1409,16 @@ class LoadSecrets {
|
|
|
1371
1409
|
this.reporter.log("Secret stored:");
|
|
1372
1410
|
this.reporter.log(`ARN: ${this.reporter.format.greenBright(arn)}`);
|
|
1373
1411
|
this.reporter.log(`Version: ${this.reporter.format.greenBright(version)}`);
|
|
1412
|
+
if (newReplicaRegions.length > 0) {
|
|
1413
|
+
this.reporter.log(`Read replicas added to regions: ${newReplicaRegions
|
|
1414
|
+
.map((r) => this.reporter.format.greenBright(r))
|
|
1415
|
+
.join(", ")}`);
|
|
1416
|
+
}
|
|
1417
|
+
if (removedReplicaRegions.length > 0) {
|
|
1418
|
+
this.reporter.log(`Read replicas removed from regions: ${removedReplicaRegions
|
|
1419
|
+
.map((r) => this.reporter.format.redBright(r))
|
|
1420
|
+
.join(", ")}`);
|
|
1421
|
+
}
|
|
1374
1422
|
}
|
|
1375
1423
|
checkSecretGroup(secretGroup) {
|
|
1376
1424
|
if (!secretGroup.namePrefix.startsWith("/") ||
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
2
2
|
name: string;
|
|
3
3
|
description?: string;
|
|
4
|
+
/**
|
|
5
|
+
* A list of regions to create read replicas
|
|
6
|
+
* of the secret in.
|
|
7
|
+
*/
|
|
8
|
+
replicaRegions?: string[];
|
|
4
9
|
}
|
|
5
10
|
export type JsonSecretSimpleField = string;
|
|
6
11
|
export interface JsonSecretDescribedField {
|
|
@@ -8,11 +13,18 @@ export interface JsonSecretDescribedField {
|
|
|
8
13
|
description?: string;
|
|
9
14
|
example?: string;
|
|
10
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Used for secrets that are a single plaintext string,
|
|
18
|
+
* and do not require JSON formating.
|
|
19
|
+
*/
|
|
20
|
+
export interface StringSecret extends BaseSecret {
|
|
21
|
+
type: "string";
|
|
22
|
+
}
|
|
11
23
|
export interface JsonSecret extends BaseSecret {
|
|
12
24
|
type: "json";
|
|
13
25
|
fields: (JsonSecretSimpleField | JsonSecretDescribedField)[];
|
|
14
26
|
}
|
|
15
|
-
export type Secret = JsonSecret;
|
|
27
|
+
export type Secret = JsonSecret | StringSecret;
|
|
16
28
|
export interface SecretGroup {
|
|
17
29
|
accountId: string;
|
|
18
30
|
region: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capraconsulting/cals-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "CLI for repeatable tasks in CALS",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepare": "node scripts/create-definition-schema.js && husky install",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@typescript-eslint/parser": "5.62.0",
|
|
63
63
|
"dateformat": "4.6.3",
|
|
64
64
|
"del": "6.1.1",
|
|
65
|
-
"eslint": "8.
|
|
65
|
+
"eslint": "8.54.0",
|
|
66
66
|
"eslint-config-prettier": "9.0.0",
|
|
67
67
|
"eslint-plugin-prettier": "5.0.1",
|
|
68
68
|
"husky": "8.0.3",
|