@wraps.dev/cli 2.17.7 → 2.17.8
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
|
@@ -5464,14 +5464,14 @@ async function withLockRetry(fn, options) {
|
|
|
5464
5464
|
throw error;
|
|
5465
5465
|
}
|
|
5466
5466
|
const clack51 = await import("@clack/prompts");
|
|
5467
|
-
const
|
|
5467
|
+
const pc55 = (await import("picocolors")).default;
|
|
5468
5468
|
if (options.autoConfirm) {
|
|
5469
5469
|
clack51.log.warn(
|
|
5470
5470
|
"Stack is locked from a previous interrupted run. Auto-clearing..."
|
|
5471
5471
|
);
|
|
5472
5472
|
} else {
|
|
5473
5473
|
const shouldClear = await clack51.confirm({
|
|
5474
|
-
message: `Stack is locked from a previous interrupted run. ${
|
|
5474
|
+
message: `Stack is locked from a previous interrupted run. ${pc55.yellow("Clear the stale lock and retry?")}`,
|
|
5475
5475
|
initialValue: true
|
|
5476
5476
|
});
|
|
5477
5477
|
if (clack51.isCancel(shouldClear) || !shouldClear) {
|
|
@@ -9107,14 +9107,173 @@ var init_dynamodb_metrics = __esm({
|
|
|
9107
9107
|
}
|
|
9108
9108
|
});
|
|
9109
9109
|
|
|
9110
|
+
// src/commands/update.ts
|
|
9111
|
+
var update_exports = {};
|
|
9112
|
+
__export(update_exports, {
|
|
9113
|
+
update: () => update
|
|
9114
|
+
});
|
|
9115
|
+
import { execSync as execSync2 } from "child_process";
|
|
9116
|
+
import { createWriteStream, mkdtempSync, rmSync } from "fs";
|
|
9117
|
+
import { homedir as homedir4, tmpdir as tmpdir2 } from "os";
|
|
9118
|
+
import { join as join21 } from "path";
|
|
9119
|
+
import { Readable } from "stream";
|
|
9120
|
+
import { pipeline } from "stream/promises";
|
|
9121
|
+
import { cancel as cancel29, confirm as confirm22, intro as intro49, isCancel as isCancel31, log as log46 } from "@clack/prompts";
|
|
9122
|
+
import pc53 from "picocolors";
|
|
9123
|
+
function isStandaloneInstall() {
|
|
9124
|
+
return process.execPath.includes(".wraps/runtime");
|
|
9125
|
+
}
|
|
9126
|
+
async function fetchLatestVersion() {
|
|
9127
|
+
const res = await fetch(
|
|
9128
|
+
`https://api.github.com/repos/${REPO}/releases?per_page=20`,
|
|
9129
|
+
{
|
|
9130
|
+
headers: { Accept: "application/vnd.github+json" }
|
|
9131
|
+
}
|
|
9132
|
+
);
|
|
9133
|
+
if (!res.ok) {
|
|
9134
|
+
throw new Error(`GitHub API returned ${res.status}`);
|
|
9135
|
+
}
|
|
9136
|
+
const releases = await res.json();
|
|
9137
|
+
for (const release of releases) {
|
|
9138
|
+
if (release.tag_name.startsWith("cli@")) {
|
|
9139
|
+
const version = release.tag_name.replace("cli@", "");
|
|
9140
|
+
return { version, release };
|
|
9141
|
+
}
|
|
9142
|
+
}
|
|
9143
|
+
return null;
|
|
9144
|
+
}
|
|
9145
|
+
function detectPlatformArch() {
|
|
9146
|
+
const platform2 = process.platform === "darwin" ? "darwin" : "linux";
|
|
9147
|
+
const arch = process.arch === "arm64" ? "arm64" : "x64";
|
|
9148
|
+
return { platform: platform2, arch };
|
|
9149
|
+
}
|
|
9150
|
+
async function update(currentVersion) {
|
|
9151
|
+
intro49(pc53.bold("Wraps CLI Update"));
|
|
9152
|
+
const progress = new DeploymentProgress();
|
|
9153
|
+
const result = await progress.execute(
|
|
9154
|
+
"Checking for updates...",
|
|
9155
|
+
() => fetchLatestVersion()
|
|
9156
|
+
);
|
|
9157
|
+
if (!result) {
|
|
9158
|
+
progress.fail("Could not determine latest version from GitHub releases.");
|
|
9159
|
+
return;
|
|
9160
|
+
}
|
|
9161
|
+
const { version: latestVersion, release } = result;
|
|
9162
|
+
if (currentVersion === latestVersion) {
|
|
9163
|
+
progress.succeed(`Already up to date ${pc53.dim(`(v${currentVersion})`)}`);
|
|
9164
|
+
return;
|
|
9165
|
+
}
|
|
9166
|
+
console.log();
|
|
9167
|
+
log46.info(
|
|
9168
|
+
`Current version: ${pc53.dim(`v${currentVersion}`)}
|
|
9169
|
+
Latest version: ${pc53.cyan(`v${latestVersion}`)}`
|
|
9170
|
+
);
|
|
9171
|
+
console.log();
|
|
9172
|
+
if (!isStandaloneInstall()) {
|
|
9173
|
+
log46.info(
|
|
9174
|
+
`You installed Wraps via npm. Update with:
|
|
9175
|
+
|
|
9176
|
+
${pc53.cyan("npm update -g @wraps.dev/cli")}`
|
|
9177
|
+
);
|
|
9178
|
+
return;
|
|
9179
|
+
}
|
|
9180
|
+
const shouldUpdate = await confirm22({
|
|
9181
|
+
message: `Update to v${latestVersion}?`
|
|
9182
|
+
});
|
|
9183
|
+
if (isCancel31(shouldUpdate) || !shouldUpdate) {
|
|
9184
|
+
cancel29("Update cancelled.");
|
|
9185
|
+
return;
|
|
9186
|
+
}
|
|
9187
|
+
const { platform: platform2, arch } = detectPlatformArch();
|
|
9188
|
+
const tarballName = `wraps-${latestVersion}-${platform2}-${arch}.tar.gz`;
|
|
9189
|
+
const tarballAsset = release.assets.find((a) => a.name === tarballName);
|
|
9190
|
+
const checksumAsset = release.assets.find(
|
|
9191
|
+
(a) => a.name === "CHECKSUMS.sha256"
|
|
9192
|
+
);
|
|
9193
|
+
if (!tarballAsset) {
|
|
9194
|
+
progress.fail(
|
|
9195
|
+
`No release asset found for ${platform2}-${arch}. Download manually from GitHub.`
|
|
9196
|
+
);
|
|
9197
|
+
return;
|
|
9198
|
+
}
|
|
9199
|
+
const tmp = mkdtempSync(join21(tmpdir2(), "wraps-update-"));
|
|
9200
|
+
try {
|
|
9201
|
+
const tarballPath = join21(tmp, tarballName);
|
|
9202
|
+
await progress.execute(`Downloading ${tarballName}...`, async () => {
|
|
9203
|
+
const res = await fetch(tarballAsset.browser_download_url, {
|
|
9204
|
+
redirect: "follow"
|
|
9205
|
+
});
|
|
9206
|
+
if (!(res.ok && res.body)) {
|
|
9207
|
+
throw new Error(`Download failed: ${res.status}`);
|
|
9208
|
+
}
|
|
9209
|
+
const nodeStream = Readable.fromWeb(
|
|
9210
|
+
res.body
|
|
9211
|
+
);
|
|
9212
|
+
await pipeline(nodeStream, createWriteStream(tarballPath));
|
|
9213
|
+
});
|
|
9214
|
+
if (checksumAsset) {
|
|
9215
|
+
await progress.execute("Verifying checksum...", async () => {
|
|
9216
|
+
const res = await fetch(checksumAsset.browser_download_url, {
|
|
9217
|
+
redirect: "follow"
|
|
9218
|
+
});
|
|
9219
|
+
if (!res.ok) {
|
|
9220
|
+
throw new Error(`Checksum download failed: ${res.status}`);
|
|
9221
|
+
}
|
|
9222
|
+
const checksumText = await res.text();
|
|
9223
|
+
const line = checksumText.split("\n").find((l) => l.includes(tarballName));
|
|
9224
|
+
if (!line) {
|
|
9225
|
+
throw new Error("Tarball not found in CHECKSUMS.sha256");
|
|
9226
|
+
}
|
|
9227
|
+
const expected = line.split(WHITESPACE_RE)[0];
|
|
9228
|
+
const shaCmd = process.platform === "darwin" ? "shasum -a 256" : "sha256sum";
|
|
9229
|
+
const actual = execSync2(`${shaCmd} "${tarballPath}"`).toString().split(WHITESPACE_RE)[0];
|
|
9230
|
+
if (expected !== actual) {
|
|
9231
|
+
throw new Error(
|
|
9232
|
+
`Checksum mismatch (expected ${expected}, got ${actual})`
|
|
9233
|
+
);
|
|
9234
|
+
}
|
|
9235
|
+
});
|
|
9236
|
+
}
|
|
9237
|
+
await progress.execute("Installing update...", async () => {
|
|
9238
|
+
const extractDir = join21(tmp, "extract");
|
|
9239
|
+
execSync2(`mkdir -p "${extractDir}"`);
|
|
9240
|
+
execSync2(`tar xzf "${tarballPath}" -C "${extractDir}"`);
|
|
9241
|
+
const source = join21(extractDir, "wraps");
|
|
9242
|
+
for (const dir of ["bin", "runtime", "lib"]) {
|
|
9243
|
+
execSync2(`rm -rf "${join21(INSTALL_DIR, dir)}"`);
|
|
9244
|
+
execSync2(`cp -R "${join21(source, dir)}" "${join21(INSTALL_DIR, dir)}"`);
|
|
9245
|
+
}
|
|
9246
|
+
execSync2(`chmod +x "${join21(INSTALL_DIR, "bin", "wraps")}"`);
|
|
9247
|
+
execSync2(`chmod +x "${join21(INSTALL_DIR, "runtime", "node")}"`);
|
|
9248
|
+
});
|
|
9249
|
+
console.log();
|
|
9250
|
+
progress.succeed(
|
|
9251
|
+
`Updated to ${pc53.cyan(`v${latestVersion}`)} successfully!`
|
|
9252
|
+
);
|
|
9253
|
+
} finally {
|
|
9254
|
+
rmSync(tmp, { recursive: true, force: true });
|
|
9255
|
+
}
|
|
9256
|
+
}
|
|
9257
|
+
var REPO, INSTALL_DIR, WHITESPACE_RE;
|
|
9258
|
+
var init_update = __esm({
|
|
9259
|
+
"src/commands/update.ts"() {
|
|
9260
|
+
"use strict";
|
|
9261
|
+
init_esm_shims();
|
|
9262
|
+
init_output();
|
|
9263
|
+
REPO = "wraps-team/wraps";
|
|
9264
|
+
INSTALL_DIR = join21(homedir4(), ".wraps");
|
|
9265
|
+
WHITESPACE_RE = /\s+/;
|
|
9266
|
+
}
|
|
9267
|
+
});
|
|
9268
|
+
|
|
9110
9269
|
// src/cli.ts
|
|
9111
9270
|
init_esm_shims();
|
|
9112
9271
|
import { readFileSync as readFileSync3 } from "fs";
|
|
9113
|
-
import { dirname as dirname5, join as
|
|
9272
|
+
import { dirname as dirname5, join as join22 } from "path";
|
|
9114
9273
|
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
9115
9274
|
import * as clack50 from "@clack/prompts";
|
|
9116
9275
|
import args from "args";
|
|
9117
|
-
import
|
|
9276
|
+
import pc54 from "picocolors";
|
|
9118
9277
|
|
|
9119
9278
|
// src/commands/auth/login.ts
|
|
9120
9279
|
init_esm_shims();
|
|
@@ -22246,8 +22405,8 @@ async function templatesInit(options) {
|
|
|
22246
22405
|
} catch {
|
|
22247
22406
|
}
|
|
22248
22407
|
try {
|
|
22249
|
-
const { homedir:
|
|
22250
|
-
const connectionsDir = join11(
|
|
22408
|
+
const { homedir: homedir5 } = await import("os");
|
|
22409
|
+
const connectionsDir = join11(homedir5(), ".wraps", "connections");
|
|
22251
22410
|
if (existsSync9(connectionsDir)) {
|
|
22252
22411
|
const { readdir: readdir5 } = await import("fs/promises");
|
|
22253
22412
|
const files = await readdir5(connectionsDir);
|
|
@@ -30412,13 +30571,13 @@ function createMetricsRouter(config2) {
|
|
|
30412
30571
|
const router = createRouter5();
|
|
30413
30572
|
router.get("/stream", async (req, res) => {
|
|
30414
30573
|
const connectionId = randomUUID().slice(0, 8);
|
|
30415
|
-
const
|
|
30574
|
+
const log48 = (msg, data) => {
|
|
30416
30575
|
console.log(JSON.stringify({ connectionId, msg, ...data }));
|
|
30417
30576
|
};
|
|
30418
30577
|
res.setHeader("Content-Type", "text/event-stream");
|
|
30419
30578
|
res.setHeader("Cache-Control", "no-cache");
|
|
30420
30579
|
res.setHeader("Connection", "keep-alive");
|
|
30421
|
-
|
|
30580
|
+
log48("SSE connected");
|
|
30422
30581
|
res.write('data: {"type":"connected"}\n\n');
|
|
30423
30582
|
const { startTime, endTime } = req.query;
|
|
30424
30583
|
const getTimeRange = () => ({
|
|
@@ -30428,7 +30587,7 @@ function createMetricsRouter(config2) {
|
|
|
30428
30587
|
const sendMetrics = async () => {
|
|
30429
30588
|
try {
|
|
30430
30589
|
const timeRange = getTimeRange();
|
|
30431
|
-
|
|
30590
|
+
log48("Fetching metrics", {
|
|
30432
30591
|
start: timeRange.start.toISOString(),
|
|
30433
30592
|
end: timeRange.end.toISOString()
|
|
30434
30593
|
});
|
|
@@ -30441,7 +30600,7 @@ function createMetricsRouter(config2) {
|
|
|
30441
30600
|
),
|
|
30442
30601
|
fetchSendQuota(config2.roleArn, config2.region)
|
|
30443
30602
|
]);
|
|
30444
|
-
|
|
30603
|
+
log48("Metrics fetched successfully");
|
|
30445
30604
|
const data = {
|
|
30446
30605
|
type: "metrics",
|
|
30447
30606
|
timestamp: Date.now(),
|
|
@@ -30471,7 +30630,7 @@ function createMetricsRouter(config2) {
|
|
|
30471
30630
|
const interval = setInterval(sendMetrics, 6e4);
|
|
30472
30631
|
req.on("close", () => {
|
|
30473
30632
|
clearInterval(interval);
|
|
30474
|
-
|
|
30633
|
+
log48("SSE disconnected");
|
|
30475
30634
|
});
|
|
30476
30635
|
});
|
|
30477
30636
|
router.get("/snapshot", async (_req, res) => {
|
|
@@ -32888,18 +33047,18 @@ async function createSMSProtectConfigurationWithSDK(configurationSetName, region
|
|
|
32888
33047
|
const existing = await client.send(
|
|
32889
33048
|
new DescribeProtectConfigurationsCommand({})
|
|
32890
33049
|
);
|
|
32891
|
-
for (const
|
|
32892
|
-
if (!(
|
|
33050
|
+
for (const pc55 of existing.ProtectConfigurations || []) {
|
|
33051
|
+
if (!(pc55.ProtectConfigurationArn && pc55.ProtectConfigurationId)) {
|
|
32893
33052
|
continue;
|
|
32894
33053
|
}
|
|
32895
33054
|
const tagsResponse = await client.send(
|
|
32896
33055
|
new ListTagsForResourceCommand({
|
|
32897
|
-
ResourceArn:
|
|
33056
|
+
ResourceArn: pc55.ProtectConfigurationArn
|
|
32898
33057
|
})
|
|
32899
33058
|
);
|
|
32900
33059
|
const nameTag = tagsResponse.Tags?.find((t) => t.Key === "Name");
|
|
32901
33060
|
if (nameTag?.Value === protectConfigName) {
|
|
32902
|
-
existingProtectConfigId =
|
|
33061
|
+
existingProtectConfigId = pc55.ProtectConfigurationId;
|
|
32903
33062
|
break;
|
|
32904
33063
|
}
|
|
32905
33064
|
}
|
|
@@ -32995,13 +33154,13 @@ async function deleteSMSProtectConfigurationWithSDK(region) {
|
|
|
32995
33154
|
new DescribeProtectConfigurationsCommand({})
|
|
32996
33155
|
);
|
|
32997
33156
|
if (existing.ProtectConfigurations) {
|
|
32998
|
-
for (const
|
|
32999
|
-
if (!(
|
|
33157
|
+
for (const pc55 of existing.ProtectConfigurations) {
|
|
33158
|
+
if (!(pc55.ProtectConfigurationArn && pc55.ProtectConfigurationId)) {
|
|
33000
33159
|
continue;
|
|
33001
33160
|
}
|
|
33002
33161
|
const tagsResponse = await client.send(
|
|
33003
33162
|
new ListTagsForResourceCommand({
|
|
33004
|
-
ResourceArn:
|
|
33163
|
+
ResourceArn: pc55.ProtectConfigurationArn
|
|
33005
33164
|
})
|
|
33006
33165
|
);
|
|
33007
33166
|
const isWrapsManaged = tagsResponse.Tags?.some(
|
|
@@ -33010,7 +33169,7 @@ async function deleteSMSProtectConfigurationWithSDK(region) {
|
|
|
33010
33169
|
if (isWrapsManaged) {
|
|
33011
33170
|
await client.send(
|
|
33012
33171
|
new DeleteProtectConfigurationCommand({
|
|
33013
|
-
ProtectConfigurationId:
|
|
33172
|
+
ProtectConfigurationId: pc55.ProtectConfigurationId
|
|
33014
33173
|
})
|
|
33015
33174
|
);
|
|
33016
33175
|
}
|
|
@@ -36575,7 +36734,7 @@ if (nodeMajorVersion < 20) {
|
|
|
36575
36734
|
var __filename2 = fileURLToPath6(import.meta.url);
|
|
36576
36735
|
var __dirname3 = dirname5(__filename2);
|
|
36577
36736
|
var packageJson = JSON.parse(
|
|
36578
|
-
readFileSync3(
|
|
36737
|
+
readFileSync3(join22(__dirname3, "../package.json"), "utf-8")
|
|
36579
36738
|
);
|
|
36580
36739
|
var VERSION = packageJson.version;
|
|
36581
36740
|
setupTabCompletion();
|
|
@@ -36584,187 +36743,188 @@ function showVersion() {
|
|
|
36584
36743
|
process.exit(0);
|
|
36585
36744
|
}
|
|
36586
36745
|
function showHelp() {
|
|
36587
|
-
clack50.intro(
|
|
36746
|
+
clack50.intro(pc54.bold(`WRAPS CLI v${VERSION}`));
|
|
36588
36747
|
console.log("Deploy AWS infrastructure to your account\n");
|
|
36589
36748
|
console.log("Usage: wraps [service] <command> [options]\n");
|
|
36590
36749
|
console.log("Services:");
|
|
36591
|
-
console.log(` ${
|
|
36750
|
+
console.log(` ${pc54.cyan("email")} Email infrastructure (AWS SES)`);
|
|
36592
36751
|
console.log(
|
|
36593
|
-
` ${
|
|
36752
|
+
` ${pc54.cyan("sms")} SMS infrastructure (AWS End User Messaging)`
|
|
36594
36753
|
);
|
|
36595
36754
|
console.log(
|
|
36596
|
-
` ${
|
|
36755
|
+
` ${pc54.cyan("cdn")} CDN infrastructure (AWS S3 + CloudFront)
|
|
36597
36756
|
`
|
|
36598
36757
|
);
|
|
36599
36758
|
console.log("Email Commands:");
|
|
36600
36759
|
console.log(
|
|
36601
|
-
` ${
|
|
36760
|
+
` ${pc54.cyan("email init")} Deploy new email infrastructure`
|
|
36602
36761
|
);
|
|
36603
36762
|
console.log(
|
|
36604
|
-
` ${
|
|
36763
|
+
` ${pc54.cyan("email check")} Check email deliverability for a domain`
|
|
36605
36764
|
);
|
|
36606
36765
|
console.log(
|
|
36607
|
-
` ${
|
|
36766
|
+
` ${pc54.cyan("email connect")} Connect to existing AWS SES`
|
|
36608
36767
|
);
|
|
36609
36768
|
console.log(
|
|
36610
|
-
` ${
|
|
36769
|
+
` ${pc54.cyan("email status")} Show email infrastructure details`
|
|
36611
36770
|
);
|
|
36612
|
-
console.log(` ${
|
|
36613
|
-
console.log(` ${
|
|
36771
|
+
console.log(` ${pc54.cyan("email test")} Send a test email`);
|
|
36772
|
+
console.log(` ${pc54.cyan("email verify")} Verify domain DNS records`);
|
|
36614
36773
|
console.log(
|
|
36615
|
-
` ${
|
|
36774
|
+
` ${pc54.cyan("email sync")} Apply CLI updates to infrastructure`
|
|
36616
36775
|
);
|
|
36617
|
-
console.log(` ${
|
|
36776
|
+
console.log(` ${pc54.cyan("email upgrade")} Add features`);
|
|
36618
36777
|
console.log(
|
|
36619
|
-
` ${
|
|
36778
|
+
` ${pc54.cyan("email restore")} Restore original configuration`
|
|
36620
36779
|
);
|
|
36621
36780
|
console.log(
|
|
36622
|
-
` ${
|
|
36781
|
+
` ${pc54.cyan("email destroy")} Remove email infrastructure`
|
|
36623
36782
|
);
|
|
36624
|
-
console.log(` ${
|
|
36625
|
-
console.log(` ${
|
|
36626
|
-
console.log(` ${
|
|
36783
|
+
console.log(` ${pc54.cyan("email domains add")} Add a domain to SES`);
|
|
36784
|
+
console.log(` ${pc54.cyan("email domains list")} List all domains`);
|
|
36785
|
+
console.log(` ${pc54.cyan("email domains remove")} Remove a domain`);
|
|
36627
36786
|
console.log(
|
|
36628
|
-
` ${
|
|
36787
|
+
` ${pc54.cyan("email inbound init")} Enable inbound email receiving`
|
|
36629
36788
|
);
|
|
36630
|
-
console.log(` ${
|
|
36789
|
+
console.log(` ${pc54.cyan("email inbound status")} Show inbound email status`);
|
|
36631
36790
|
console.log(
|
|
36632
|
-
` ${
|
|
36791
|
+
` ${pc54.cyan("email inbound verify")} Verify inbound DNS records`
|
|
36633
36792
|
);
|
|
36634
36793
|
console.log(
|
|
36635
|
-
` ${
|
|
36794
|
+
` ${pc54.cyan("email inbound test")} Send test email and verify receipt`
|
|
36636
36795
|
);
|
|
36637
36796
|
console.log(
|
|
36638
|
-
` ${
|
|
36797
|
+
` ${pc54.cyan("email inbound destroy")} Remove inbound email infrastructure
|
|
36639
36798
|
`
|
|
36640
36799
|
);
|
|
36641
36800
|
console.log("Template Commands:");
|
|
36642
36801
|
console.log(
|
|
36643
|
-
` ${
|
|
36802
|
+
` ${pc54.cyan("email templates init")} Initialize templates-as-code`
|
|
36644
36803
|
);
|
|
36645
36804
|
console.log(
|
|
36646
|
-
` ${
|
|
36805
|
+
` ${pc54.cyan("email templates push")} Push templates to SES + dashboard`
|
|
36647
36806
|
);
|
|
36648
36807
|
console.log(
|
|
36649
|
-
` ${
|
|
36808
|
+
` ${pc54.cyan("email templates preview")} Preview templates in browser`
|
|
36650
36809
|
);
|
|
36651
36810
|
console.log(
|
|
36652
|
-
` ${
|
|
36811
|
+
` ${pc54.cyan("push")} ${pc54.dim("(alias for email templates push)")}
|
|
36653
36812
|
`
|
|
36654
36813
|
);
|
|
36655
36814
|
console.log("Workflow Commands:");
|
|
36656
36815
|
console.log(
|
|
36657
|
-
` ${
|
|
36816
|
+
` ${pc54.cyan("email workflows init")} Initialize workflows-as-code`
|
|
36658
36817
|
);
|
|
36659
36818
|
console.log(
|
|
36660
|
-
` ${
|
|
36819
|
+
` ${pc54.cyan("email workflows validate")} Validate workflow files`
|
|
36661
36820
|
);
|
|
36662
36821
|
console.log(
|
|
36663
|
-
` ${
|
|
36822
|
+
` ${pc54.cyan("email workflows push")} Push workflows to dashboard
|
|
36664
36823
|
`
|
|
36665
36824
|
);
|
|
36666
36825
|
console.log("SMS Commands:");
|
|
36667
|
-
console.log(` ${
|
|
36826
|
+
console.log(` ${pc54.cyan("sms init")} Deploy SMS infrastructure`);
|
|
36668
36827
|
console.log(
|
|
36669
|
-
` ${
|
|
36828
|
+
` ${pc54.cyan("sms status")} Show SMS infrastructure details`
|
|
36670
36829
|
);
|
|
36671
|
-
console.log(` ${
|
|
36830
|
+
console.log(` ${pc54.cyan("sms test")} Send a test SMS message`);
|
|
36672
36831
|
console.log(
|
|
36673
|
-
` ${
|
|
36832
|
+
` ${pc54.cyan("sms verify-number")} Verify a destination phone number`
|
|
36674
36833
|
);
|
|
36675
36834
|
console.log(
|
|
36676
|
-
` ${
|
|
36835
|
+
` ${pc54.cyan("sms sync")} Sync infrastructure (update Lambda, etc.)`
|
|
36677
36836
|
);
|
|
36678
|
-
console.log(` ${
|
|
36679
|
-
console.log(` ${
|
|
36837
|
+
console.log(` ${pc54.cyan("sms upgrade")} Upgrade SMS features`);
|
|
36838
|
+
console.log(` ${pc54.cyan("sms register")} Register toll-free number`);
|
|
36680
36839
|
console.log(
|
|
36681
|
-
` ${
|
|
36840
|
+
` ${pc54.cyan("sms destroy")} Remove SMS infrastructure
|
|
36682
36841
|
`
|
|
36683
36842
|
);
|
|
36684
36843
|
console.log("CDN Commands:");
|
|
36685
36844
|
console.log(
|
|
36686
|
-
` ${
|
|
36845
|
+
` ${pc54.cyan("cdn init")} Deploy CDN infrastructure (S3 + CloudFront)`
|
|
36687
36846
|
);
|
|
36688
36847
|
console.log(
|
|
36689
|
-
` ${
|
|
36848
|
+
` ${pc54.cyan("cdn status")} Show CDN infrastructure details`
|
|
36690
36849
|
);
|
|
36691
36850
|
console.log(
|
|
36692
|
-
` ${
|
|
36851
|
+
` ${pc54.cyan("cdn verify")} Check DNS and certificate status`
|
|
36693
36852
|
);
|
|
36694
36853
|
console.log(
|
|
36695
|
-
` ${
|
|
36854
|
+
` ${pc54.cyan("cdn upgrade")} Add custom domain after cert validation`
|
|
36696
36855
|
);
|
|
36697
36856
|
console.log(
|
|
36698
|
-
` ${
|
|
36857
|
+
` ${pc54.cyan("cdn sync")} Sync infrastructure with current config`
|
|
36699
36858
|
);
|
|
36700
36859
|
console.log(
|
|
36701
|
-
` ${
|
|
36860
|
+
` ${pc54.cyan("cdn destroy")} Remove CDN infrastructure
|
|
36702
36861
|
`
|
|
36703
36862
|
);
|
|
36704
36863
|
console.log("Local Development:");
|
|
36705
36864
|
console.log(
|
|
36706
|
-
` ${
|
|
36865
|
+
` ${pc54.cyan("console")} Start local web console
|
|
36707
36866
|
`
|
|
36708
36867
|
);
|
|
36709
36868
|
console.log("Platform:");
|
|
36710
36869
|
console.log(
|
|
36711
|
-
` ${
|
|
36870
|
+
` ${pc54.cyan("platform")} Show platform info and pricing`
|
|
36712
36871
|
);
|
|
36713
36872
|
console.log(
|
|
36714
|
-
` ${
|
|
36873
|
+
` ${pc54.cyan("platform connect")} Connect to Wraps Platform (events + IAM)`
|
|
36715
36874
|
);
|
|
36716
36875
|
console.log(
|
|
36717
|
-
` ${
|
|
36876
|
+
` ${pc54.cyan("platform update-role")} Update platform IAM permissions
|
|
36718
36877
|
`
|
|
36719
36878
|
);
|
|
36720
36879
|
console.log("Auth:");
|
|
36721
36880
|
console.log(
|
|
36722
|
-
` ${
|
|
36881
|
+
` ${pc54.cyan("auth login")} Sign in to wraps.dev (device flow)`
|
|
36723
36882
|
);
|
|
36724
|
-
console.log(` ${
|
|
36883
|
+
console.log(` ${pc54.cyan("auth status")} Show current auth state`);
|
|
36725
36884
|
console.log(
|
|
36726
|
-
` ${
|
|
36885
|
+
` ${pc54.cyan("auth logout")} Sign out and remove stored token
|
|
36727
36886
|
`
|
|
36728
36887
|
);
|
|
36729
36888
|
console.log("AWS Setup:");
|
|
36730
36889
|
console.log(
|
|
36731
|
-
` ${
|
|
36890
|
+
` ${pc54.cyan("aws setup")} Interactive AWS setup wizard`
|
|
36732
36891
|
);
|
|
36733
36892
|
console.log(
|
|
36734
|
-
` ${
|
|
36893
|
+
` ${pc54.cyan("aws doctor")} Diagnose AWS configuration issues
|
|
36735
36894
|
`
|
|
36736
36895
|
);
|
|
36737
36896
|
console.log("Global Commands:");
|
|
36738
|
-
console.log(` ${
|
|
36739
|
-
console.log(` ${
|
|
36740
|
-
console.log(` ${
|
|
36741
|
-
console.log(` ${
|
|
36897
|
+
console.log(` ${pc54.cyan("status")} Show overview of all services`);
|
|
36898
|
+
console.log(` ${pc54.cyan("destroy")} Remove deployed infrastructure`);
|
|
36899
|
+
console.log(` ${pc54.cyan("permissions")} Show required AWS IAM permissions`);
|
|
36900
|
+
console.log(` ${pc54.cyan("completion")} Generate shell completion script`);
|
|
36742
36901
|
console.log(
|
|
36743
|
-
` ${
|
|
36902
|
+
` ${pc54.cyan("telemetry")} Manage anonymous telemetry settings`
|
|
36744
36903
|
);
|
|
36745
|
-
console.log(` ${
|
|
36904
|
+
console.log(` ${pc54.cyan("update")} Update CLI to latest version`);
|
|
36905
|
+
console.log(` ${pc54.cyan("news")} Show recent Wraps updates`);
|
|
36746
36906
|
console.log(
|
|
36747
|
-
` ${
|
|
36907
|
+
` ${pc54.cyan("support")} Get help and support contact info
|
|
36748
36908
|
`
|
|
36749
36909
|
);
|
|
36750
36910
|
console.log("Options:");
|
|
36751
36911
|
console.log(
|
|
36752
|
-
` ${
|
|
36753
|
-
);
|
|
36754
|
-
console.log(` ${
|
|
36755
|
-
console.log(` ${
|
|
36756
|
-
console.log(` ${
|
|
36757
|
-
console.log(` ${
|
|
36758
|
-
console.log(` ${
|
|
36759
|
-
console.log(` ${
|
|
36760
|
-
console.log(` ${
|
|
36912
|
+
` ${pc54.dim("-p, --provider")} Hosting provider (vercel, aws, railway, other)`
|
|
36913
|
+
);
|
|
36914
|
+
console.log(` ${pc54.dim("-r, --region")} AWS region`);
|
|
36915
|
+
console.log(` ${pc54.dim("-d, --domain")} Domain name`);
|
|
36916
|
+
console.log(` ${pc54.dim("--account")} AWS account ID or alias`);
|
|
36917
|
+
console.log(` ${pc54.dim("--preset")} Configuration preset`);
|
|
36918
|
+
console.log(` ${pc54.dim("--token")} API key or token for auth`);
|
|
36919
|
+
console.log(` ${pc54.dim("-y, --yes")} Skip confirmation prompts`);
|
|
36920
|
+
console.log(` ${pc54.dim("-f, --force")} Force destructive operations`);
|
|
36761
36921
|
console.log(
|
|
36762
|
-
` ${
|
|
36922
|
+
` ${pc54.dim("--preview")} Preview changes without deploying`
|
|
36763
36923
|
);
|
|
36764
|
-
console.log(` ${
|
|
36924
|
+
console.log(` ${pc54.dim("-v, --version")} Show version number
|
|
36765
36925
|
`);
|
|
36766
36926
|
console.log(
|
|
36767
|
-
`Run ${
|
|
36927
|
+
`Run ${pc54.cyan("wraps <service> <command> --help")} for more information.
|
|
36768
36928
|
`
|
|
36769
36929
|
);
|
|
36770
36930
|
}
|
|
@@ -36990,25 +37150,25 @@ if (!primaryCommand) {
|
|
|
36990
37150
|
const telemetry = getTelemetryClient();
|
|
36991
37151
|
if (telemetry.shouldShowNotification()) {
|
|
36992
37152
|
console.log();
|
|
36993
|
-
clack50.log.info(
|
|
37153
|
+
clack50.log.info(pc54.bold("Anonymous Telemetry"));
|
|
36994
37154
|
console.log(
|
|
36995
|
-
` Wraps collects ${
|
|
37155
|
+
` Wraps collects ${pc54.cyan("anonymous usage data")} to improve the CLI.`
|
|
36996
37156
|
);
|
|
36997
37157
|
console.log(
|
|
36998
|
-
` We ${
|
|
37158
|
+
` We ${pc54.bold("never")} collect: domains, AWS credentials, email content, or PII.`
|
|
36999
37159
|
);
|
|
37000
37160
|
console.log(
|
|
37001
|
-
` We ${
|
|
37161
|
+
` We ${pc54.bold("only")} collect: command names, success/failure, CLI version, OS.`
|
|
37002
37162
|
);
|
|
37003
37163
|
console.log();
|
|
37004
|
-
console.log(` Opt-out anytime: ${
|
|
37005
|
-
console.log(` Or set: ${
|
|
37006
|
-
console.log(` Learn more: ${
|
|
37164
|
+
console.log(` Opt-out anytime: ${pc54.cyan("wraps telemetry disable")}`);
|
|
37165
|
+
console.log(` Or set: ${pc54.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
|
|
37166
|
+
console.log(` Learn more: ${pc54.cyan("https://wraps.dev/docs")}`);
|
|
37007
37167
|
console.log();
|
|
37008
37168
|
telemetry.markNotificationShown();
|
|
37009
37169
|
}
|
|
37010
37170
|
trackCommand("interactive:menu", { success: true, duration_ms: 0 });
|
|
37011
|
-
clack50.intro(
|
|
37171
|
+
clack50.intro(pc54.bold(`WRAPS CLI v${VERSION}`));
|
|
37012
37172
|
console.log(" Deploy AWS infrastructure to your account.\n");
|
|
37013
37173
|
const action = await clack50.select({
|
|
37014
37174
|
message: "What would you like to do?",
|
|
@@ -37145,20 +37305,20 @@ async function run() {
|
|
|
37145
37305
|
const telemetry = getTelemetryClient();
|
|
37146
37306
|
if (telemetry.shouldShowNotification()) {
|
|
37147
37307
|
console.log();
|
|
37148
|
-
clack50.log.info(
|
|
37308
|
+
clack50.log.info(pc54.bold("Anonymous Telemetry"));
|
|
37149
37309
|
console.log(
|
|
37150
|
-
` Wraps collects ${
|
|
37310
|
+
` Wraps collects ${pc54.cyan("anonymous usage data")} to improve the CLI.`
|
|
37151
37311
|
);
|
|
37152
37312
|
console.log(
|
|
37153
|
-
` We ${
|
|
37313
|
+
` We ${pc54.bold("never")} collect: domains, AWS credentials, email content, or PII.`
|
|
37154
37314
|
);
|
|
37155
37315
|
console.log(
|
|
37156
|
-
` We ${
|
|
37316
|
+
` We ${pc54.bold("only")} collect: command names, success/failure, CLI version, OS.`
|
|
37157
37317
|
);
|
|
37158
37318
|
console.log();
|
|
37159
|
-
console.log(` Opt-out anytime: ${
|
|
37160
|
-
console.log(` Or set: ${
|
|
37161
|
-
console.log(` Learn more: ${
|
|
37319
|
+
console.log(` Opt-out anytime: ${pc54.cyan("wraps telemetry disable")}`);
|
|
37320
|
+
console.log(` Or set: ${pc54.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
|
|
37321
|
+
console.log(` Learn more: ${pc54.cyan("https://wraps.dev/docs")}`);
|
|
37162
37322
|
console.log();
|
|
37163
37323
|
telemetry.markNotificationShown();
|
|
37164
37324
|
}
|
|
@@ -37245,7 +37405,7 @@ async function run() {
|
|
|
37245
37405
|
clack50.log.error("--domain flag is required");
|
|
37246
37406
|
console.log(
|
|
37247
37407
|
`
|
|
37248
|
-
Usage: ${
|
|
37408
|
+
Usage: ${pc54.cyan("wraps email verify --domain yourapp.com")}
|
|
37249
37409
|
`
|
|
37250
37410
|
);
|
|
37251
37411
|
throw new Error("Missing required flag: --domain");
|
|
@@ -37320,7 +37480,7 @@ Usage: ${pc53.cyan("wraps email verify --domain yourapp.com")}
|
|
|
37320
37480
|
);
|
|
37321
37481
|
console.log(
|
|
37322
37482
|
`
|
|
37323
|
-
Available commands: ${
|
|
37483
|
+
Available commands: ${pc54.cyan("init")}, ${pc54.cyan("destroy")}, ${pc54.cyan("status")}, ${pc54.cyan("verify")}, ${pc54.cyan("test")}, ${pc54.cyan("add")}, ${pc54.cyan("remove")}
|
|
37324
37484
|
`
|
|
37325
37485
|
);
|
|
37326
37486
|
throw new Error(
|
|
@@ -37348,7 +37508,7 @@ Available commands: ${pc53.cyan("init")}, ${pc53.cyan("destroy")}, ${pc53.cyan("
|
|
|
37348
37508
|
clack50.log.error("--domain flag is required");
|
|
37349
37509
|
console.log(
|
|
37350
37510
|
`
|
|
37351
|
-
Usage: ${
|
|
37511
|
+
Usage: ${pc54.cyan("wraps email domains verify --domain yourapp.com")}
|
|
37352
37512
|
`
|
|
37353
37513
|
);
|
|
37354
37514
|
throw new Error("Missing required flag: --domain");
|
|
@@ -37361,7 +37521,7 @@ Usage: ${pc53.cyan("wraps email domains verify --domain yourapp.com")}
|
|
|
37361
37521
|
clack50.log.error("--domain flag is required");
|
|
37362
37522
|
console.log(
|
|
37363
37523
|
`
|
|
37364
|
-
Usage: ${
|
|
37524
|
+
Usage: ${pc54.cyan("wraps email domains get-dkim --domain yourapp.com")}
|
|
37365
37525
|
`
|
|
37366
37526
|
);
|
|
37367
37527
|
throw new Error("Missing required flag: --domain");
|
|
@@ -37374,7 +37534,7 @@ Usage: ${pc53.cyan("wraps email domains get-dkim --domain yourapp.com")}
|
|
|
37374
37534
|
clack50.log.error("--domain flag is required");
|
|
37375
37535
|
console.log(
|
|
37376
37536
|
`
|
|
37377
|
-
Usage: ${
|
|
37537
|
+
Usage: ${pc54.cyan("wraps email domains remove --domain yourapp.com --force")}
|
|
37378
37538
|
`
|
|
37379
37539
|
);
|
|
37380
37540
|
throw new Error("Missing required flag: --domain");
|
|
@@ -37391,7 +37551,7 @@ Usage: ${pc53.cyan("wraps email domains remove --domain yourapp.com --force")}
|
|
|
37391
37551
|
);
|
|
37392
37552
|
console.log(
|
|
37393
37553
|
`
|
|
37394
|
-
Available commands: ${
|
|
37554
|
+
Available commands: ${pc54.cyan("add")}, ${pc54.cyan("list")}, ${pc54.cyan("verify")}, ${pc54.cyan("get-dkim")}, ${pc54.cyan("remove")}
|
|
37395
37555
|
`
|
|
37396
37556
|
);
|
|
37397
37557
|
throw new Error(
|
|
@@ -37436,7 +37596,7 @@ Available commands: ${pc53.cyan("add")}, ${pc53.cyan("list")}, ${pc53.cyan("veri
|
|
|
37436
37596
|
);
|
|
37437
37597
|
console.log(
|
|
37438
37598
|
`
|
|
37439
|
-
Available commands: ${
|
|
37599
|
+
Available commands: ${pc54.cyan("init")}, ${pc54.cyan("push")}, ${pc54.cyan("preview")}
|
|
37440
37600
|
`
|
|
37441
37601
|
);
|
|
37442
37602
|
throw new Error(
|
|
@@ -37480,7 +37640,7 @@ Available commands: ${pc53.cyan("init")}, ${pc53.cyan("push")}, ${pc53.cyan("pre
|
|
|
37480
37640
|
);
|
|
37481
37641
|
console.log(
|
|
37482
37642
|
`
|
|
37483
|
-
Available commands: ${
|
|
37643
|
+
Available commands: ${pc54.cyan("init")}, ${pc54.cyan("validate")}, ${pc54.cyan("push")}
|
|
37484
37644
|
`
|
|
37485
37645
|
);
|
|
37486
37646
|
throw new Error(
|
|
@@ -37501,7 +37661,7 @@ Available commands: ${pc53.cyan("init")}, ${pc53.cyan("validate")}, ${pc53.cyan(
|
|
|
37501
37661
|
clack50.log.error(`Unknown email command: ${subCommand}`);
|
|
37502
37662
|
console.log(
|
|
37503
37663
|
`
|
|
37504
|
-
Run ${
|
|
37664
|
+
Run ${pc54.cyan("wraps --help")} for available commands.
|
|
37505
37665
|
`
|
|
37506
37666
|
);
|
|
37507
37667
|
throw new Error(`Unknown email command: ${subCommand}`);
|
|
@@ -37579,7 +37739,7 @@ Run ${pc53.cyan("wraps --help")} for available commands.
|
|
|
37579
37739
|
clack50.log.error(`Unknown sms command: ${subCommand}`);
|
|
37580
37740
|
console.log(
|
|
37581
37741
|
`
|
|
37582
|
-
Run ${
|
|
37742
|
+
Run ${pc54.cyan("wraps --help")} for available commands.
|
|
37583
37743
|
`
|
|
37584
37744
|
);
|
|
37585
37745
|
throw new Error(`Unknown sms command: ${subCommand}`);
|
|
@@ -37643,7 +37803,7 @@ Run ${pc53.cyan("wraps --help")} for available commands.
|
|
|
37643
37803
|
clack50.log.error(`Unknown cdn command: ${subCommand}`);
|
|
37644
37804
|
console.log(
|
|
37645
37805
|
`
|
|
37646
|
-
Run ${
|
|
37806
|
+
Run ${pc54.cyan("wraps --help")} for available commands.
|
|
37647
37807
|
`
|
|
37648
37808
|
);
|
|
37649
37809
|
throw new Error(`Unknown cdn command: ${subCommand}`);
|
|
@@ -37669,9 +37829,9 @@ Run ${pc53.cyan("wraps --help")} for available commands.
|
|
|
37669
37829
|
`Unknown workflow command: ${subCommand || "(none)"}`
|
|
37670
37830
|
);
|
|
37671
37831
|
console.log(`
|
|
37672
|
-
Available commands: ${
|
|
37832
|
+
Available commands: ${pc54.cyan("init")}
|
|
37673
37833
|
`);
|
|
37674
|
-
console.log(`Run ${
|
|
37834
|
+
console.log(`Run ${pc54.cyan("wraps --help")} for more information.
|
|
37675
37835
|
`);
|
|
37676
37836
|
throw new Error(
|
|
37677
37837
|
`Unknown workflow command: ${subCommand || "(none)"}`
|
|
@@ -37716,11 +37876,11 @@ Available commands: ${pc53.cyan("init")}
|
|
|
37716
37876
|
clack50.log.error(`Unknown platform command: ${subCommand}`);
|
|
37717
37877
|
console.log(
|
|
37718
37878
|
`
|
|
37719
|
-
Available commands: ${
|
|
37879
|
+
Available commands: ${pc54.cyan("connect")}, ${pc54.cyan("update-role")}
|
|
37720
37880
|
`
|
|
37721
37881
|
);
|
|
37722
37882
|
console.log(
|
|
37723
|
-
`Run ${
|
|
37883
|
+
`Run ${pc54.cyan("wraps platform")} for more information.
|
|
37724
37884
|
`
|
|
37725
37885
|
);
|
|
37726
37886
|
throw new Error(`Unknown platform command: ${subCommand}`);
|
|
@@ -37748,7 +37908,7 @@ Available commands: ${pc53.cyan("connect")}, ${pc53.cyan("update-role")}
|
|
|
37748
37908
|
clack50.log.error(`Unknown auth command: ${subCommand || "(none)"}`);
|
|
37749
37909
|
console.log(
|
|
37750
37910
|
`
|
|
37751
|
-
Available commands: ${
|
|
37911
|
+
Available commands: ${pc54.cyan("login")}, ${pc54.cyan("status")}, ${pc54.cyan("logout")}
|
|
37752
37912
|
`
|
|
37753
37913
|
);
|
|
37754
37914
|
throw new Error(`Unknown auth command: ${subCommand || "(none)"}`);
|
|
@@ -37769,10 +37929,10 @@ Available commands: ${pc53.cyan("login")}, ${pc53.cyan("status")}, ${pc53.cyan("
|
|
|
37769
37929
|
clack50.log.error(`Unknown aws command: ${subCommand}`);
|
|
37770
37930
|
console.log(
|
|
37771
37931
|
`
|
|
37772
|
-
Available commands: ${
|
|
37932
|
+
Available commands: ${pc54.cyan("setup")}, ${pc54.cyan("doctor")}
|
|
37773
37933
|
`
|
|
37774
37934
|
);
|
|
37775
|
-
console.log(`Run ${
|
|
37935
|
+
console.log(`Run ${pc54.cyan("wraps --help")} for more information.
|
|
37776
37936
|
`);
|
|
37777
37937
|
throw new Error(`Unknown aws command: ${subCommand}`);
|
|
37778
37938
|
}
|
|
@@ -37819,6 +37979,11 @@ Available commands: ${pc53.cyan("setup")}, ${pc53.cyan("doctor")}
|
|
|
37819
37979
|
case "completion":
|
|
37820
37980
|
printCompletionScript();
|
|
37821
37981
|
break;
|
|
37982
|
+
case "update": {
|
|
37983
|
+
const { update: update2 } = await Promise.resolve().then(() => (init_update(), update_exports));
|
|
37984
|
+
await update2(VERSION);
|
|
37985
|
+
break;
|
|
37986
|
+
}
|
|
37822
37987
|
case "news":
|
|
37823
37988
|
await news();
|
|
37824
37989
|
break;
|
|
@@ -37848,7 +38013,7 @@ Available commands: ${pc53.cyan("setup")}, ${pc53.cyan("doctor")}
|
|
|
37848
38013
|
clack50.log.error(`Unknown telemetry command: ${subCommand}`);
|
|
37849
38014
|
console.log(
|
|
37850
38015
|
`
|
|
37851
|
-
Available commands: ${
|
|
38016
|
+
Available commands: ${pc54.cyan("enable")}, ${pc54.cyan("disable")}, ${pc54.cyan("status")}
|
|
37852
38017
|
`
|
|
37853
38018
|
);
|
|
37854
38019
|
throw new Error(`Unknown telemetry command: ${subCommand}`);
|
|
@@ -37875,7 +38040,7 @@ Please specify a command for ${primaryCommand} service.
|
|
|
37875
38040
|
clack50.log.error(`Unknown command: ${primaryCommand}`);
|
|
37876
38041
|
console.log(
|
|
37877
38042
|
`
|
|
37878
|
-
Run ${
|
|
38043
|
+
Run ${pc54.cyan("wraps --help")} for available commands.
|
|
37879
38044
|
`
|
|
37880
38045
|
);
|
|
37881
38046
|
throw new Error(`Unknown command: ${primaryCommand}`);
|