@wraps.dev/cli 1.1.3 → 1.1.4

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/cli.js CHANGED
@@ -2225,7 +2225,9 @@ import * as aws from "@pulumi/aws";
2225
2225
  async function tableExists(tableName) {
2226
2226
  try {
2227
2227
  const { DynamoDBClient: DynamoDBClient4, DescribeTableCommand: DescribeTableCommand2 } = await import("@aws-sdk/client-dynamodb");
2228
- const dynamodb2 = new DynamoDBClient4({});
2228
+ const dynamodb2 = new DynamoDBClient4({
2229
+ region: process.env.AWS_REGION || "us-east-1"
2230
+ });
2229
2231
  await dynamodb2.send(new DescribeTableCommand2({ TableName: tableName }));
2230
2232
  return true;
2231
2233
  } catch (error) {
@@ -2362,7 +2364,9 @@ import * as pulumi2 from "@pulumi/pulumi";
2362
2364
  async function roleExists(roleName) {
2363
2365
  try {
2364
2366
  const { IAMClient: IAMClient2, GetRoleCommand } = await import("@aws-sdk/client-iam");
2365
- const iam4 = new IAMClient2({});
2367
+ const iam4 = new IAMClient2({
2368
+ region: process.env.AWS_REGION || "us-east-1"
2369
+ });
2366
2370
  await iam4.send(new GetRoleCommand({ RoleName: roleName }));
2367
2371
  return true;
2368
2372
  } catch (error) {
@@ -2545,7 +2549,9 @@ function getPackageRoot() {
2545
2549
  async function lambdaFunctionExists(functionName) {
2546
2550
  try {
2547
2551
  const { LambdaClient: LambdaClient2, GetFunctionCommand } = await import("@aws-sdk/client-lambda");
2548
- const lambda2 = new LambdaClient2({});
2552
+ const lambda2 = new LambdaClient2({
2553
+ region: process.env.AWS_REGION || "us-east-1"
2554
+ });
2549
2555
  await lambda2.send(new GetFunctionCommand({ FunctionName: functionName }));
2550
2556
  return true;
2551
2557
  } catch (error) {
@@ -2559,7 +2565,9 @@ async function lambdaFunctionExists(functionName) {
2559
2565
  async function findEventSourceMapping(functionName, queueArn) {
2560
2566
  try {
2561
2567
  const { LambdaClient: LambdaClient2, ListEventSourceMappingsCommand } = await import("@aws-sdk/client-lambda");
2562
- const lambda2 = new LambdaClient2({});
2568
+ const lambda2 = new LambdaClient2({
2569
+ region: process.env.AWS_REGION || "us-east-1"
2570
+ });
2563
2571
  const response = await lambda2.send(
2564
2572
  new ListEventSourceMappingsCommand({
2565
2573
  FunctionName: functionName,
@@ -2969,7 +2977,9 @@ import * as aws7 from "@pulumi/aws";
2969
2977
  async function getExistingOIDCProviderArn(url) {
2970
2978
  try {
2971
2979
  const { IAMClient: IAMClient2, ListOpenIDConnectProvidersCommand } = await import("@aws-sdk/client-iam");
2972
- const iam4 = new IAMClient2({});
2980
+ const iam4 = new IAMClient2({
2981
+ region: process.env.AWS_REGION || "us-east-1"
2982
+ });
2973
2983
  const response = await iam4.send(new ListOpenIDConnectProvidersCommand({}));
2974
2984
  const expectedArnSuffix = url.replace("https://", "");
2975
2985
  const provider = response.OpenIDConnectProviderList?.find(
@@ -3771,7 +3781,8 @@ ${pc3.bold("Current Configuration:")}
3771
3781
  {
3772
3782
  workDir: getPulumiWorkDir(),
3773
3783
  envVars: {
3774
- PULUMI_CONFIG_PASSPHRASE: ""
3784
+ PULUMI_CONFIG_PASSPHRASE: "",
3785
+ AWS_REGION: region
3775
3786
  },
3776
3787
  secretsProvider: "passphrase"
3777
3788
  }
@@ -4146,6 +4157,10 @@ async function connect(options) {
4146
4157
  const emailConfig = preset === "custom" ? await Promise.resolve().then(() => (init_prompts(), prompts_exports)).then(
4147
4158
  (m) => m.promptCustomConfig()
4148
4159
  ) : getPreset(preset);
4160
+ const domainIdentities = selectedIdentities.filter((id) => !id.includes("@"));
4161
+ if (domainIdentities.length > 0) {
4162
+ emailConfig.domain = domainIdentities[0];
4163
+ }
4149
4164
  if (!options.yes) {
4150
4165
  const confirmed = await confirmConnect();
4151
4166
  if (!confirmed) {
@@ -4186,7 +4201,8 @@ async function connect(options) {
4186
4201
  {
4187
4202
  workDir: getPulumiWorkDir(),
4188
4203
  envVars: {
4189
- PULUMI_CONFIG_PASSPHRASE: ""
4204
+ PULUMI_CONFIG_PASSPHRASE: "",
4205
+ AWS_REGION: region
4190
4206
  },
4191
4207
  secretsProvider: "passphrase"
4192
4208
  }
@@ -4818,8 +4834,9 @@ ${pc7.yellow(pc7.bold("Configuration Warnings:"))}`);
4818
4834
  workDir: getPulumiWorkDir(),
4819
4835
  // Use local file-based backend (no Pulumi Cloud login required)
4820
4836
  envVars: {
4821
- PULUMI_CONFIG_PASSPHRASE: ""
4837
+ PULUMI_CONFIG_PASSPHRASE: "",
4822
4838
  // Use empty passphrase for local state
4839
+ AWS_REGION: region
4823
4840
  },
4824
4841
  secretsProvider: "passphrase"
4825
4842
  }
@@ -4988,7 +5005,8 @@ ${pc8.bold("The following Wraps resources will be removed:")}
4988
5005
  {
4989
5006
  workDir: getPulumiWorkDir(),
4990
5007
  envVars: {
4991
- PULUMI_CONFIG_PASSPHRASE: ""
5008
+ PULUMI_CONFIG_PASSPHRASE: "",
5009
+ AWS_REGION: region
4992
5010
  },
4993
5011
  secretsProvider: "passphrase"
4994
5012
  }
@@ -5712,7 +5730,8 @@ ${pc9.bold("Cost Impact:")}`);
5712
5730
  {
5713
5731
  workDir: getPulumiWorkDir(),
5714
5732
  envVars: {
5715
- PULUMI_CONFIG_PASSPHRASE: ""
5733
+ PULUMI_CONFIG_PASSPHRASE: "",
5734
+ AWS_REGION: region
5716
5735
  },
5717
5736
  secretsProvider: "passphrase"
5718
5737
  }