carlin 1.32.1 → 1.33.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/dist/index.js +25 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -202,6 +202,9 @@ var BASE_STACK_VPC_PUBLIC_SUBNET_0_EXPORTED_NAME = `${pascalCaseName}VPCPublicSu
|
|
|
202
202
|
var BASE_STACK_VPC_PUBLIC_SUBNET_1_EXPORTED_NAME = `${pascalCaseName}VPCPublicSubnet1ExportedName`;
|
|
203
203
|
var BASE_STACK_VPC_PUBLIC_SUBNET_2_EXPORTED_NAME = `${pascalCaseName}VPCPublicSubnet2ExportedName`;
|
|
204
204
|
|
|
205
|
+
// src/deploy/config.ts
|
|
206
|
+
var LATEST_DEPLOY_OUTPUTS_FILENAME = "latest-deploy.json";
|
|
207
|
+
|
|
205
208
|
// src/deploy/addDefaults.cloudformation.ts
|
|
206
209
|
var addDefaultsParametersAndTagsToParams = async (params) => {
|
|
207
210
|
const branchName = await getCurrentBranch();
|
|
@@ -639,7 +642,12 @@ var saveEnvironmentOutput = async ({
|
|
|
639
642
|
outputs,
|
|
640
643
|
stackName
|
|
641
644
|
}) => {
|
|
642
|
-
const envFile = {
|
|
645
|
+
const envFile = {
|
|
646
|
+
stackName,
|
|
647
|
+
environment: getEnvironment(),
|
|
648
|
+
projectName: getProjectName(),
|
|
649
|
+
packageName: getPackageName()
|
|
650
|
+
};
|
|
643
651
|
envFile.outputs = outputs.reduce((acc, output) => {
|
|
644
652
|
if (!output.OutputKey || !output) {
|
|
645
653
|
return acc;
|
|
@@ -655,6 +663,11 @@ var saveEnvironmentOutput = async ({
|
|
|
655
663
|
}
|
|
656
664
|
const filePath = path.join(dotCarlinFolderPath, `${stackName}.json`);
|
|
657
665
|
await fs3.promises.writeFile(filePath, JSON.stringify(envFile, null, 2));
|
|
666
|
+
const latestFilePath = path.join(
|
|
667
|
+
dotCarlinFolderPath,
|
|
668
|
+
LATEST_DEPLOY_OUTPUTS_FILENAME
|
|
669
|
+
);
|
|
670
|
+
await fs3.promises.writeFile(latestFilePath, JSON.stringify(envFile, null, 2));
|
|
658
671
|
};
|
|
659
672
|
var printStackOutputsAfterDeploy = async ({
|
|
660
673
|
stackName
|
|
@@ -4315,7 +4328,6 @@ var options8 = {
|
|
|
4315
4328
|
},
|
|
4316
4329
|
region: {
|
|
4317
4330
|
alias: "r",
|
|
4318
|
-
// coerce: coerceSetEnvVar('REGION'),
|
|
4319
4331
|
default: AWS_DEFAULT_REGION,
|
|
4320
4332
|
describe: "AWS region.",
|
|
4321
4333
|
type: "string"
|
|
@@ -4369,7 +4381,17 @@ var cli = () => {
|
|
|
4369
4381
|
});
|
|
4370
4382
|
}
|
|
4371
4383
|
};
|
|
4372
|
-
return yargs(hideBin(process.argv)).strictCommands().scriptName(NAME).env(getEnv()).options(addGroupToOptions(options8, "Common Options")).middleware(
|
|
4384
|
+
return yargs(hideBin(process.argv)).strictCommands().scriptName(NAME).env(getEnv()).options(addGroupToOptions(options8, "Common Options")).middleware((argv) => {
|
|
4385
|
+
const finalEnvironment = argv.environment || process.env.ENVIRONMENT;
|
|
4386
|
+
if (finalEnvironment) {
|
|
4387
|
+
setEnvVar("ENVIRONMENT", finalEnvironment);
|
|
4388
|
+
const envKeys = ["environment", ...options8.environment.alias];
|
|
4389
|
+
const envEntries = envKeys.map((key) => {
|
|
4390
|
+
return [key, finalEnvironment];
|
|
4391
|
+
});
|
|
4392
|
+
Object.assign(argv, Object.fromEntries(envEntries));
|
|
4393
|
+
}
|
|
4394
|
+
}).middleware(handleEnvironments).middleware(({ environment }) => {
|
|
4373
4395
|
if (!["string", "undefined"].includes(typeof environment)) {
|
|
4374
4396
|
throw new Error(
|
|
4375
4397
|
`environment type is invalid. The value: ${JSON.stringify(
|