chore: sync source updates

This commit is contained in:
Peter Steinberger
2025-11-25 12:12:13 +01:00
parent ea745764d7
commit 800c7a1e1f
26 changed files with 462 additions and 376 deletions

View File

@@ -1,7 +1,7 @@
import { info } from "../globals.js";
import type { CliDeps } from "../cli/deps.js";
import type { Provider } from "../utils.js";
import { info } from "../globals.js";
import type { RuntimeEnv } from "../runtime.js";
import type { Provider } from "../utils.js";
export async function sendCommand(
opts: {
@@ -40,14 +40,10 @@ export async function sendCommand(
runtime.log(info("Wait/poll are Twilio-only; ignored for provider=web."));
}
const res = await deps
.sendMessageWeb(
opts.to,
opts.message,
{
verbose: false,
mediaUrl: opts.media,
},
)
.sendMessageWeb(opts.to, opts.message, {
verbose: false,
mediaUrl: opts.media,
})
.catch((err) => {
runtime.error(`❌ Web send failed: ${String(err)}`);
throw err;
@@ -76,7 +72,7 @@ export async function sendCommand(
return;
}
let mediaUrl: string | undefined = undefined;
let mediaUrl: string | undefined;
if (opts.media) {
mediaUrl = await deps.resolveTwilioMediaUrl(opts.media, {
serveMedia: Boolean(opts.serveMedia),

View File

@@ -1,10 +1,16 @@
import type { CliDeps } from "../cli/deps.js";
import type { RuntimeEnv } from "../runtime.js";
import { waitForever as defaultWaitForever } from "../cli/wait.js";
import { retryAsync } from "../infra/retry.js";
import type { RuntimeEnv } from "../runtime.js";
export async function upCommand(
opts: { port: string; path: string; verbose?: boolean; yes?: boolean; dryRun?: boolean },
opts: {
port: string;
path: string;
verbose?: boolean;
yes?: boolean;
dryRun?: boolean;
},
deps: CliDeps,
runtime: RuntimeEnv,
waiter: typeof defaultWaitForever = defaultWaitForever,

View File

@@ -1,6 +1,6 @@
import type { CliDeps } from "../cli/deps.js";
import type { RuntimeEnv } from "../runtime.js";
import { retryAsync } from "../infra/retry.js";
import type { RuntimeEnv } from "../runtime.js";
export async function webhookCommand(
opts: {
@@ -19,7 +19,9 @@ export async function webhookCommand(
}
await deps.ensurePortAvailable(port);
if (opts.reply === "dry-run") {
runtime.log(`[dry-run] would start webhook on port ${port} path ${opts.path}`);
runtime.log(
`[dry-run] would start webhook on port ${port} path ${opts.path}`,
);
return undefined;
}
const server = await retryAsync(