@wraps.dev/cli 2.21.13 → 2.21.15

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.
Binary file
package/dist/cli.js CHANGED
@@ -32159,6 +32159,7 @@ var WRAPS_PLATFORM_ACCOUNT_ID = "905130073023";
32159
32159
  async function updatePlatformRole(metadata, progress, externalId) {
32160
32160
  const roleName = "wraps-console-access-role";
32161
32161
  const iam11 = new IAMClient3({ region: "us-east-1" });
32162
+ const trustedAccountId = metadata.services?.selfhost ? metadata.accountId : WRAPS_PLATFORM_ACCOUNT_ID;
32162
32163
  let roleExists2 = false;
32163
32164
  try {
32164
32165
  await iam11.send(new GetRoleCommand({ RoleName: roleName }));
@@ -32189,7 +32190,7 @@ async function updatePlatformRole(metadata, progress, externalId) {
32189
32190
  {
32190
32191
  Effect: "Allow",
32191
32192
  Principal: {
32192
- AWS: `arn:aws:iam::${WRAPS_PLATFORM_ACCOUNT_ID}:root`
32193
+ AWS: `arn:aws:iam::${trustedAccountId}:root`
32193
32194
  },
32194
32195
  Action: "sts:AssumeRole",
32195
32196
  Condition: {
@@ -32218,7 +32219,7 @@ async function updatePlatformRole(metadata, progress, externalId) {
32218
32219
  {
32219
32220
  Effect: "Allow",
32220
32221
  Principal: {
32221
- AWS: `arn:aws:iam::${WRAPS_PLATFORM_ACCOUNT_ID}:root`
32222
+ AWS: `arn:aws:iam::${trustedAccountId}:root`
32222
32223
  },
32223
32224
  Action: "sts:AssumeRole",
32224
32225
  Condition: {
@@ -33569,6 +33570,18 @@ async function selfhostDeploy(options) {
33569
33570
  neonApiKey = neonApiKeyAnswer;
33570
33571
  }
33571
33572
  neonOrgId = options.neonOrgId;
33573
+ if (!neonOrgId) {
33574
+ const neonOrgIdAnswer = await clack43.text({
33575
+ message: "Neon organization ID (find at console.neon.tech/app/settings \u2014 leave blank for personal account):",
33576
+ placeholder: "org-..."
33577
+ });
33578
+ if (clack43.isCancel(neonOrgIdAnswer)) {
33579
+ clack43.cancel("Operation cancelled.");
33580
+ process.exit(0);
33581
+ }
33582
+ const trimmed = neonOrgIdAnswer.trim();
33583
+ if (trimmed) neonOrgId = trimmed;
33584
+ }
33572
33585
  }
33573
33586
  let licenseKey = options.licenseKey;
33574
33587
  if (!licenseKey) {