Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Use presigned urls for all s3/cloudfront access (#594)
Brendan Allan3513a7058563
diff --git a/apps/desktop/package.json b/apps/desktop/package.jsonindex 0e8410872..20d833e04 100644--- a/apps/desktop/package.json+++ b/apps/desktop/package.json@@ -76,7 +76,7 @@"@types/dom-webcodecs": "^0.1.11","@types/uuid": "^9.0.8","cross-env": "^7.0.3",- "typescript": "^5.7.2",+ "typescript": "^5.8.3","vite": "^6.3.5","vite-tsconfig-paths": "^5.0.1"}diff --git a/apps/discord-bot/package.json b/apps/discord-bot/package.jsonindex 2c7afb8a7..dbb8c6950 100644--- a/apps/discord-bot/package.json+++ b/apps/discord-bot/package.json@@ -11,7 +11,7 @@"devDependencies": {"@cloudflare/vitest-pool-workers": "^0.6.4","@cloudflare/workers-types": "^4.20250214.0",- "typescript": "^5.5.2",+ "typescript": "^5.8.3","vitest": "~2.1.9","wrangler": "^3.109.1"},diff --git a/apps/storybook/package.json b/apps/storybook/package.jsonindex 2ca3f77b3..aa7cbaae0 100644--- a/apps/storybook/package.json+++ b/apps/storybook/package.json@@ -22,7 +22,7 @@"storybook": "^8.2.7","storybook-solidjs": "^1.0.0-beta.2","storybook-solidjs-vite": "^1.0.0-beta.2",- "typescript": "^5.7.2",+ "typescript": "^5.8.3","vite": "^6.3.5","vite-plugin-solid": "^2.10.2"}diff --git a/apps/tasks/package.json b/apps/tasks/package.jsonindex b7a3d1fd0..c0327622f 100644--- a/apps/tasks/package.json+++ b/apps/tasks/package.json@@ -27,7 +27,7 @@"helmet": "^7.1.0","morgan": "^1.10.0","ts-node": "^10.9.2",- "typescript": "^5.7.2"+ "typescript": "^5.8.3"},"devDependencies": {"@typescript-eslint/eslint-plugin": "^7.6.0",diff --git a/apps/web/.eslintrc.cjs b/apps/web/.eslintrc.cjsindex 625ebb14b..40c42c1d7 100644--- a/apps/web/.eslintrc.cjs+++ b/apps/web/.eslintrc.cjs@@ -1,5 +1,5 @@module.exports = {- extends: [require.resolve("config/eslint/web.js")],+ extends: [],parserOptions: {tsconfigRootDir: __dirname,project: "./tsconfig.json",diff --git a/apps/web/app/api/desktop/[...route]/video.ts b/apps/web/app/api/desktop/[...route]/video.tsindex d5f8e52ff..fa16688b1 100644--- a/apps/web/app/api/desktop/[...route]/video.ts+++ b/apps/web/app/api/desktop/[...route]/video.ts@@ -35,8 +35,14 @@ app.get(c.req.valid("query");const user = c.get("user");- console.log("Video create request:", { duration, recordingMode, isScreenshot, videoId, userId: user.id });-+ console.log("Video create request:", {+ duration,+ recordingMode,+ isScreenshot,+ videoId,+ userId: user.id,+ });+const isUpgraded = user.stripeSubscriptionStatus === "active";if (!isUpgraded && duration && duration > 300)@@ -54,102 +60,108 @@ app.get(console.log("S3 Config:", { region: s3Config.region, bucketName });- const date = new Date();- const formattedDate = `${date.getDate()} ${date.toLocaleString("default", {- month: "long",- })} ${date.getFullYear()}`;-- if (videoId !== undefined) {- const [video] = await db()- .select()- .from(videos)- .where(eq(videos.id, videoId));-- if (video) {- return c.json({- id: video.id,- user_id: user.id,- aws_region: video.awsRegion,- aws_bucket: video.awsBucket,- });+ const date = new Date();+ const formattedDate = `${date.getDate()} ${date.toLocaleString(+ "default",+ {+ month: "long",+ }+ )} ${date.getFullYear()}`;++ if (videoId !== undefined) {+ const [video] = await db()+ .select()+ .from(videos)+ .where(eq(videos.id, videoId));++ if (video) {+ return c.json({+ id: video.id,+ user_id: user.id,+ aws_region: video.awsRegion,+ aws_bucket: video.awsBucket,+ });+ }}- }-- const idToUse = videoId !== undefined ? videoId : nanoId();-- const videoData = {- id: idToUse,- name:- name ??- `Cap ${isScreenshot ? "Screenshot" : "Recording"} - ${formattedDate}`,- ownerId: user.id,- awsRegion: s3Config.region,- awsBucket: bucketName,- source:- recordingMode === "hls"- ? { type: "local" as const }- : recordingMode === "desktopMP4"- ? { type: "desktopMP4" as const }- : undefined,- isScreenshot,- bucket: bucket?.id,- };-- await db().insert(videos).values(videoData);-- if (buildEnv.NEXT_PUBLIC_IS_CAP && NODE_ENV === "production")- await dub().links.create({- url: `${serverEnv().WEB_URL}/s/${idToUse}`,- domain: "cap.link",- key: idToUse,- });- try {- const videoCount = await db()- .select({ count: count() })- .from(videos)- .where(eq(videos.ownerId, user.id));-- if (- videoCount &&- videoCount[0] &&- videoCount[0].count === 1 &&- user.email- ) {- console.log(- "[SendFirstShareableLinkEmail] Sending first shareable link email with 5-minute delay"- );-- const videoUrl = buildEnv.NEXT_PUBLIC_IS_CAP- ? `https://cap.link/${idToUse}`- : `${serverEnv().WEB_URL}/s/${idToUse}`;-- await sendEmail({- email: user.email,- subject: "You created your first Cap! 🥳",- react: FirstShareableLink({- email: user.email,- url: videoUrl,- videoName: videoData.name,- }),- marketing: true,- scheduledAt: "in 5 min",+ const idToUse = videoId !== undefined ? videoId : nanoId();++ const videoData = {+ id: idToUse,+ name:+ name ??+ `Cap ${isScreenshot ? "Screenshot" : "Recording"} - ${formattedDate}`,+ ownerId: user.id,+ awsRegion: s3Config.region,+ awsBucket: bucketName,+ source:+ recordingMode === "hls"+ ? { type: "local" as const }+ : recordingMode === "desktopMP4"+ ? { type: "desktopMP4" as const }+ : undefined,+ isScreenshot,+ bucket: bucket?.id,+ };++ await db().insert(videos).values(videoData);++ if (buildEnv.NEXT_PUBLIC_IS_CAP && NODE_ENV === "production")+ await dub().links.create({+ url: `${serverEnv().WEB_URL}/s/${idToUse}`,+ domain: "cap.link",+ key: idToUse,});- console.log(- "[SendFirstShareableLinkEmail] First shareable link email scheduled to be sent in 5 minutes"+ try {+ const videoCount = await db()+ .select({ count: count() })+ .from(videos)+ .where(eq(videos.ownerId, user.id));++ if (+ videoCount &&+ videoCount[0] &&+ videoCount[0].count === 1 &&+ user.email+ ) {+ console.log(+ "[SendFirstShareableLinkEmail] Sending first shareable link email with 5-minute delay"+ );++ const videoUrl = buildEnv.NEXT_PUBLIC_IS_CAP+ ? `https://cap.link/${idToUse}`+ : `${serverEnv().WEB_URL}/s/${idToUse}`;++ await sendEmail({+ email: user.email,+ subject: "You created your first Cap! 🥳",+ react: FirstShareableLink({+ email: user.email,+ url: videoUrl,+ videoName: videoData.name,+ }),+ marketing: true,+ scheduledAt: "in 5 min",+ });++ console.log(+ "[SendFirstShareableLinkEmail] First shareable link email scheduled to be sent in 5 minutes"+ );+ }+ } catch (error) {+ console.error(+ "Error checking for first video or sending email:",+ error);}- } catch (error) {- console.error("Error checking for first video or sending email:", error);- }- return c.json({- id: idToUse,- user_id: user.id,- aws_region: s3Config.region,- aws_bucket: bucketName,- });+ return c.json({+ id: idToUse,+ user_id: user.id,+ aws_region: s3Config.region,+ aws_bucket: bucketName,+ });} catch (error) {console.error("Error in video create endpoint:", error);return c.json({ error: "Internal server error" }, { status: 500 });diff --git a/apps/web/app/api/playlist/route.ts b/apps/web/app/api/playlist/route.tsindex 09b75e7a7..e4641f315 100644--- a/apps/web/app/api/playlist/route.ts+++ b/apps/web/app/api/playlist/route.ts@@ -1,355 +1,256 @@-import { type NextRequest } from "next/server";import { db } from "@cap/database";import { s3Buckets, videos } from "@cap/database/schema";import { eq } from "drizzle-orm";-import {- ListObjectsV2Command,- GetObjectCommand,- HeadObjectCommand,-} from "@aws-sdk/client-s3";-import { getSignedUrl } from "@aws-sdk/s3-request-presigner";import { getCurrentUser } from "@cap/database/auth/session";import {generateM3U8Playlist,generateMasterPlaylist,} from "@/utils/video/ffmpeg/helpers";-import { getHeaders, CACHE_CONTROL_HEADERS } from "@/utils/helpers";-import { createS3Client, getS3Bucket } from "@/utils/s3";-import { S3_BUCKET_URL } from "@cap/utils";+import { CACHE_CONTROL_HEADERS } from "@/utils/helpers";+import { createBucketProvider } from "@/utils/s3";import { serverEnv } from "@cap/env";--export const revalidate = 3599;--export async function OPTIONS(request: NextRequest) {- const origin = request.headers.get("origin") as string;-- return new Response(null, {- status: 200,- headers: getHeaders(origin),- });-}--export async function GET(request: NextRequest) {- const searchParams = request.nextUrl.searchParams;- const userId = searchParams.get("userId") || "";- const videoId = searchParams.get("videoId") || "";- const videoType = searchParams.get("videoType") || "";- const thumbnail = searchParams.get("thumbnail") || "";- const fileType = searchParams.get("fileType") || "";- const origin = request.headers.get("origin") as string;-- if (!userId || !videoId) {- return new Response(- JSON.stringify({- error: true,- message: "userId or videoId not supplied",- }),- { status: 401, headers: getHeaders(origin) }- );- }-- const query = await db()- .select({ video: videos, bucket: s3Buckets })- .from(videos)- .leftJoin(s3Buckets, eq(videos.bucket, s3Buckets.id))- .where(eq(videos.id, videoId));-- if (!query[0]) {- return new Response(- JSON.stringify({ error: true, message: "Video does not exist" }),- {- status: 401,- headers: getHeaders(origin),+import { Hono } from "hono";+import { zValidator } from "@hono/zod-validator";+import z from "zod";+import { handle } from "hono/vercel";++import { corsMiddleware, withOptionalAuth } from "../utils";++export const revalidate = "force-dynamic";++const app = new Hono()+ .basePath("/api/playlist")+ .use(corsMiddleware)+ .use(withOptionalAuth)+ .get(+ "/",+ zValidator(+ "query",+ z.object({+ videoId: z.string(),+ videoType: z+ .union([+ z.literal("video"),+ z.literal("audio"),+ z.literal("master"),+ z.literal("mp4"),+ ])+ .optional(),+ thumbnail: z.string().optional(),+ fileType: z.string().optional(),+ })+ ),+ async (c) => {+ const { videoId, videoType, thumbnail, fileType } = c.req.valid("query");++ const query = await db()+ .select({ video: videos, bucket: s3Buckets })+ .from(videos)+ .leftJoin(s3Buckets, eq(videos.bucket, s3Buckets.id))+ .where(eq(videos.id, videoId));++ if (!query[0]) {+ return c.json(+ JSON.stringify({ error: true, message: "Video does not exist" }),+ 404+ );}- );- }- const { video, bucket } = query[0];+ const { video, bucket: customBucket } = query[0];- if (video.public === false) {- const user = await getCurrentUser();+ if (video.public === false) {+ const user = await getCurrentUser();- if (!user || user.id !== video.ownerId) {- return new Response(- JSON.stringify({ error: true, message: "Video is not public" }),- {- status: 401,- headers: getHeaders(origin),+ if (!user || user.id !== video.ownerId) {+ return c.json(+ JSON.stringify({ error: true, message: "Video is not public" }),+ 401+ );}- );- }- }-- const Bucket = await getS3Bucket(bucket);- const [s3Client] = await createS3Client(bucket);-- if (!bucket || video.awsBucket === serverEnv().CAP_AWS_BUCKET) {- if (video.source.type === "desktopMP4") {- return new Response(null, {- status: 302,- headers: {- ...getHeaders(origin),- Location: `${S3_BUCKET_URL}/${userId}/${videoId}/result.mp4`,- ...CACHE_CONTROL_HEADERS,- },- });- }+ }- if (video.source.type === "MediaConvert") {- return new Response(null, {- status: 302,- headers: {- ...getHeaders(origin),- Location: `${S3_BUCKET_URL}/${userId}/${videoId}/output/video_recording_000.m3u8`,- ...CACHE_CONTROL_HEADERS,- },- });- }+ const bucket = await createBucketProvider(customBucket);- const playlistUrl = `${S3_BUCKET_URL}/${userId}/${videoId}/combined-source/stream.m3u8`;- return new Response(null, {- status: 302,- headers: {- ...getHeaders(origin),- Location: playlistUrl,- ...CACHE_CONTROL_HEADERS,- },- });- }-- // Handle transcription file request first- if (fileType === "transcription") {- try {- const transcriptionUrl = await getSignedUrl(- s3Client,- new GetObjectCommand({- Bucket,- Key: `${userId}/${videoId}/transcription.vtt`,- }),- { expiresIn: 3600 }- );-- const response = await fetch(transcriptionUrl);- const transcriptionContent = await response.text();-- return new Response(transcriptionContent, {- status: 200,- headers: {- ...getHeaders(origin),- ...CACHE_CONTROL_HEADERS,- "Content-Type": "text/vtt",- },- });- } catch (error) {- console.error("Error fetching transcription file:", error);- return new Response(- JSON.stringify({- error: true,- message: "Transcription file not found",- }),- {- status: 404,- headers: getHeaders(origin),+ if (!customBucket || video.awsBucket === serverEnv().CAP_AWS_BUCKET) {+ if (video.source.type === "desktopMP4") {+ return c.redirect(+ await bucket.getSignedObjectUrl(+ `${video.ownerId}/${videoId}/result.mp4`+ )+ );}- );- }- }-- // Handle video/audio files- const videoPrefix = `${userId}/${videoId}/video/`;- const audioPrefix = `${userId}/${videoId}/audio/`;-- try {- if (video.source.type === "local") {- const playlistUrl = await getSignedUrl(- s3Client,- new GetObjectCommand({- Bucket,- Key: `${userId}/${videoId}/combined-source/stream.m3u8`,- }),- { expiresIn: 3600 }- );- const playlistResp = await fetch(playlistUrl);- const playlistText = await playlistResp.text();-- const lines = playlistText.split("\n");-- for (const [index, line] of lines.entries()) {- if (line.endsWith(".ts")) {- lines[index] = await getSignedUrl(- s3Client,- new GetObjectCommand({- Bucket,- Key: `${userId}/${videoId}/combined-source/${line}`,- }),- { expiresIn: 3600 }++ if (video.source.type === "MediaConvert") {+ return c.redirect(+ await bucket.getSignedObjectUrl(+ `${video.ownerId}/${videoId}/output/video_recording_000.m3u8`+ ));}- }- const playlist = lines.join("\n");+ return c.redirect(+ await bucket.getSignedObjectUrl(+ `${video.ownerId}/${videoId}/combined-source/stream.m3u8`+ )+ );+ }- return new Response(playlist, {- status: 200,- headers: {- ...getHeaders(origin),- ...CACHE_CONTROL_HEADERS,- },- });- }+ // Handle transcription file request first+ if (fileType === "transcription") {+ try {+ const transcriptionContent = await bucket.getObject(+ `${video.ownerId}/${videoId}/transcription.vtt`+ );- if (video.source.type === "desktopMP4") {- const playlistUrl = await getSignedUrl(- s3Client,- new GetObjectCommand({- Bucket,- Key: `${userId}/${videoId}/result.mp4`,- }),- { expiresIn: 3600 }- );-- return new Response(null, {- status: 302,- headers: {- ...getHeaders(origin),- Location: playlistUrl,- ...CACHE_CONTROL_HEADERS,- },- });- }+ return c.body(transcriptionContent ?? "", {+ headers: {+ ...CACHE_CONTROL_HEADERS,+ "Content-Type": "text/vtt",+ },+ });+ } catch (error) {+ console.error("Error fetching transcription file:", error);+ return c.json(+ {+ error: true,+ message: "Transcription file not found",+ },+ 404+ );+ }+ }- // Handle screen, video, and now audio types- let objectsCommand, prefix;- switch (videoType) {- case "video":- prefix = videoPrefix;- break;- case "audio":- prefix = audioPrefix;- break;- case "master":- prefix = null;- break;- default:- return new Response(- JSON.stringify({ error: true, message: "Invalid video type" }),- { status: 401, headers: getHeaders(origin) }- );- }+ // Handle video/audio files+ const videoPrefix = `${video.ownerId}/${videoId}/video/`;+ const audioPrefix = `${video.ownerId}/${videoId}/audio/`;- if (prefix === null) {- const videoSegmentCommand = new ListObjectsV2Command({- Bucket,- Prefix: videoPrefix,- MaxKeys: 1,- });+ try {+ if (video.source.type === "local") {+ const playlistText =+ (await bucket.getObject(+ `${video.ownerId}/${videoId}/combined-source/stream.m3u8`+ )) ?? "";++ const lines = playlistText.split("\n");++ for (const [index, line] of lines.entries()) {+ if (line.endsWith(".ts")) {+ const url = await bucket.getObject(+ `${video.ownerId}/${videoId}/combined-source/${line}`+ );+ if (!url) continue;+ lines[index] = url;+ }+ }++ const playlist = lines.join("\n");++ return c.text(playlist, {+ headers: CACHE_CONTROL_HEADERS,+ });+ }- let audioSegment;- const audioSegmentCommand = new ListObjectsV2Command({- Bucket,- Prefix: audioPrefix,- MaxKeys: 1,- });+ if (video.source.type === "desktopMP4") {+ const playlistUrl = await bucket.getSignedObjectUrl(+ `${video.ownerId}/${videoId}/result.mp4`+ );+ if (!playlistUrl) return new Response(null, { status: 404 });- try {- audioSegment = await s3Client.send(audioSegmentCommand);- } catch (error) {- console.warn("No audio segment found for this video", error);- }+ console.log(`Got signed url for desktop: ${playlistUrl}`);- const [videoSegment] = await Promise.all([- s3Client.send(videoSegmentCommand),- ]);+ return c.redirect(playlistUrl);+ }- let audioMetadata;- const [videoMetadata] = await Promise.all([- s3Client.send(- new HeadObjectCommand({- Bucket,- Key: videoSegment.Contents?.[0]?.Key ?? "",- })- ),- ]);-- if (audioSegment?.KeyCount && audioSegment?.KeyCount > 0) {- audioMetadata = await s3Client.send(- new HeadObjectCommand({- Bucket,- Key: audioSegment.Contents?.[0]?.Key ?? "",- })- );- }+ // Handle screen, video, and now audio types+ let prefix;+ switch (videoType) {+ case "video":+ prefix = videoPrefix;+ break;+ case "audio":+ prefix = audioPrefix;+ break;+ case "master":+ prefix = null;+ break;+ default:+ return c.json({ error: true, message: "Invalid video type" }, 401);+ }- const generatedPlaylist = await generateMasterPlaylist(- videoMetadata?.Metadata?.resolution ?? "",- videoMetadata?.Metadata?.bandwidth ?? "",- `${- serverEnv().WEB_URL- }/api/playlist?userId=${userId}&videoId=${videoId}&videoType=video`,- audioMetadata- ? `${- serverEnv().WEB_URL- }/api/playlist?userId=${userId}&videoId=${videoId}&videoType=audio`- : null,- video.xStreamInfo ?? ""- );-- return new Response(generatedPlaylist, {- status: 200,- headers: {- ...getHeaders(origin),- ...CACHE_CONTROL_HEADERS,- },- });- }+ if (prefix === null) {+ const [videoSegment, audioSegment] = await Promise.all([+ bucket.listObjects({ prefix: videoPrefix, maxKeys: 1 }),+ bucket.listObjects({ prefix: audioPrefix, maxKeys: 1 }),+ ]);- objectsCommand = new ListObjectsV2Command({- Bucket,- Prefix: prefix,- MaxKeys: thumbnail ? 1 : undefined,- });+ let audioMetadata;+ const videoMetadata = await bucket.headObject(+ videoSegment.Contents?.[0]?.Key ?? ""+ );+ if (audioSegment?.KeyCount && audioSegment?.KeyCount > 0) {+ audioMetadata = await bucket.headObject(+ audioSegment.Contents?.[0]?.Key ?? ""+ );+ }++ const generatedPlaylist = await generateMasterPlaylist(+ videoMetadata?.Metadata?.resolution ?? "",+ videoMetadata?.Metadata?.bandwidth ?? "",+ `${serverEnv().WEB_URL}/api/playlist?userId=${+ video.ownerId+ }&videoId=${videoId}&videoType=video`,+ audioMetadata+ ? `${serverEnv().WEB_URL}/api/playlist?userId=${+ video.ownerId+ }&videoId=${videoId}&videoType=audio`+ : null,+ video.xStreamInfo ?? ""+ );- const objects = await s3Client.send(objectsCommand);+ return c.text(generatedPlaylist, {+ headers: CACHE_CONTROL_HEADERS,+ });+ }- const chunksUrls = await Promise.all(- (objects.Contents || []).map(async (object) => {- const url = await getSignedUrl(- s3Client,- new GetObjectCommand({ Bucket, Key: object.Key }),- { expiresIn: 3600 }- );- const metadata = await s3Client.send(- new HeadObjectCommand({ Bucket, Key: object.Key })+ const objects = await bucket.listObjects({+ prefix,+ maxKeys: thumbnail ? 1 : undefined,+ });++ const chunksUrls = await Promise.all(+ (objects.Contents || []).map(async (object) => {+ const url = await bucket.getSignedObjectUrl(object.Key ?? "");+ const metadata = await bucket.headObject(object.Key ?? "");++ return {+ url: url,+ duration: metadata?.Metadata?.duration ?? "",+ bandwidth: metadata?.Metadata?.bandwidth ?? "",+ resolution: metadata?.Metadata?.resolution ?? "",+ videoCodec: metadata?.Metadata?.videocodec ?? "",+ audioCodec: metadata?.Metadata?.audiocodec ?? "",+ };+ }));- return {- url: url,- duration: metadata?.Metadata?.duration ?? "",- bandwidth: metadata?.Metadata?.bandwidth ?? "",- resolution: metadata?.Metadata?.resolution ?? "",- videoCodec: metadata?.Metadata?.videocodec ?? "",- audioCodec: metadata?.Metadata?.audiocodec ?? "",- };- })- );-- const generatedPlaylist = generateM3U8Playlist(chunksUrls);-- return new Response(generatedPlaylist, {- status: 200,- headers: {- ...getHeaders(origin),- ...CACHE_CONTROL_HEADERS,- },- });- } catch (error) {- console.error("Error generating video segment URLs", error);- return new Response(- JSON.stringify({ error: error, message: "Error generating video URLs" }),- {- status: 500,- headers: getHeaders(origin),+ const generatedPlaylist = generateM3U8Playlist(chunksUrls);++ return c.text(generatedPlaylist, {+ headers: CACHE_CONTROL_HEADERS,+ });+ } catch (error) {+ console.error("Error generating video segment URLs", error);+ return c.json(+ {+ error: error,+ message: "Error generating video URLs",+ },+ 500+ );}- );- }-}+ }+ );++export const GET = handle(app);+export const OPTIONS = handle(app);+export const HEAD = handle(app);diff --git a/apps/web/app/s/[videoId]/Share.tsx b/apps/web/app/s/[videoId]/Share.tsxindex f09fa182a..fef184e5e 100644--- a/apps/web/app/s/[videoId]/Share.tsx+++ b/apps/web/app/s/[videoId]/Share.tsx@@ -3,7 +3,6 @@import { getVideoAnalytics } from "@/actions/videos/get-analytics";import { userSelectProps } from "@cap/database/auth/session";import { comments as commentsSchema, videos } from "@cap/database/schema";-import { Logo } from "@cap/ui";import { useQuery } from "@tanstack/react-query";import { useMemo, useRef } from "react";import { ShareHeader } from "./_components/ShareHeader";@@ -150,18 +149,15 @@ const useVideoAnalytics = (videoId: string, initialCount: number) => {});};-export const Share: React.FC<ShareProps> = ({+export const Share = ({data,user,comments,initialAnalytics,- customDomain,- domainVerified,- userOrganizations = [],initialAiData,aiGenerationEnabled,aiUiEnabled,-}) => {+}: ShareProps) => {const effectiveDate: Date = data.metadata?.customCreatedAt? new Date(data.metadata.customCreatedAt): data.createdAt;@@ -239,146 +235,121 @@ export const Share: React.FC<ShareProps> = ({: { ...data, createdAt: effectiveDate };return (- <>- <div className="container flex-1 px-4 py-4 mx-auto">- <ShareHeader- data={headerData}- user={user}- customDomain={customDomain}- domainVerified={domainVerified}- sharedOrganizations={data.sharedOrganizations || []}- userOrganizations={userOrganizations}- />-- <div className="mt-4">- <div className="flex flex-col gap-4 lg:flex-row">- <div className="flex-1">- <div className="overflow-hidden relative p-3 aspect-video new-card-style">- <ShareVideo- data={{ ...data, transcriptionStatus }}- user={user}- comments={comments}- chapters={aiData?.chapters || []}- aiProcessing={aiData?.processing || false}- ref={videoRef}- />- </div>- <div className="mt-4 lg:hidden">- <Toolbar data={data} user={user} />- </div>- </div>-- <div className="flex flex-col lg:w-80">- <Sidebar- data={{- ...data,- createdAt: effectiveDate,- transcriptionStatus,- }}- user={user}- comments={comments}- analytics={analytics}- onSeek={handleSeek}- videoId={data.id}- aiData={aiData}- aiGenerationEnabled={aiGenerationEnabled}- aiUiEnabled={aiUiEnabled}- />- </div>+ <div className="mt-4">+ <div className="flex flex-col gap-4 lg:flex-row">+ <div className="flex-1">+ <div className="overflow-hidden relative p-3 aspect-video new-card-style">+ <ShareVideo+ data={{ ...data, transcriptionStatus }}+ user={user}+ comments={comments}+ chapters={aiData?.chapters || []}+ aiProcessing={aiData?.processing || false}+ ref={videoRef}+ /></div>-- <div className="hidden mt-4 lg:block">+ <div className="mt-4 lg:hidden"><Toolbar data={data} user={user} /></div>+ </div>- <div className="mt-4 hidden lg:block">- {aiLoading &&- (transcriptionStatus === "PROCESSING" ||- transcriptionStatus === "COMPLETE" ||- transcriptionStatus === "ERROR") && (- <div className="p-4 new-card-style animate-pulse">- <div className="space-y-6">- <div>- <div className="h-6 w-24 bg-gray-200 rounded mb-3"></div>- <div className="h-3 w-32 bg-gray-100 rounded mb-4"></div>- <div className="space-y-3">- <div className="h-4 bg-gray-200 rounded w-full"></div>- <div className="h-4 bg-gray-200 rounded w-5/6"></div>- <div className="h-4 bg-gray-200 rounded w-4/5"></div>- <div className="h-4 bg-gray-200 rounded w-full"></div>- <div className="h-4 bg-gray-200 rounded w-3/4"></div>- </div>- </div>-- <div>- <div className="h-6 w-24 bg-gray-200 rounded mb-4"></div>- <div className="space-y-2">- {[1, 2, 3, 4].map((i) => (- <div key={i} className="flex items-center p-2">- <div className="h-4 w-12 bg-gray-200 rounded mr-3"></div>- <div className="h-4 bg-gray-200 rounded flex-1"></div>- </div>- ))}+ <div className="flex flex-col lg:w-80">+ <Sidebar+ data={{+ ...data,+ createdAt: effectiveDate,+ transcriptionStatus,+ }}+ user={user}+ comments={comments}+ analytics={analytics}+ onSeek={handleSeek}+ videoId={data.id}+ aiData={aiData}+ aiGenerationEnabled={aiGenerationEnabled}+ aiUiEnabled={aiUiEnabled}+ />+ </div>+ </div>++ <div className="hidden mt-4 lg:block">+ <Toolbar data={data} user={user} />+ </div>++ <div className="mt-4 hidden lg:block">+ {aiLoading &&+ (transcriptionStatus === "PROCESSING" ||+ transcriptionStatus === "COMPLETE" ||+ transcriptionStatus === "ERROR") && (+ <div className="p-4 new-card-style animate-pulse">+ <div className="space-y-6">+ <div>+ <div className="h-6 w-24 bg-gray-200 rounded mb-3"></div>+ <div className="h-3 w-32 bg-gray-100 rounded mb-4"></div>+ <div className="space-y-3">+ <div className="h-4 bg-gray-200 rounded w-full"></div>+ <div className="h-4 bg-gray-200 rounded w-5/6"></div>+ <div className="h-4 bg-gray-200 rounded w-4/5"></div>+ <div className="h-4 bg-gray-200 rounded w-full"></div>+ <div className="h-4 bg-gray-200 rounded w-3/4"></div>+ </div>+ </div>++ <div>+ <div className="h-6 w-24 bg-gray-200 rounded mb-4"></div>+ <div className="space-y-2">+ {[1, 2, 3, 4].map((i) => (+ <div key={i} className="flex items-center p-2">+ <div className="h-4 w-12 bg-gray-200 rounded mr-3"></div>+ <div className="h-4 bg-gray-200 rounded flex-1"></div></div>- </div>+ ))}</div></div>+ </div>+ </div>+ )}++ {!aiLoading &&+ (aiData?.summary ||+ (aiData?.chapters && aiData.chapters.length > 0)) && (+ <div className="p-4 new-card-style">+ {aiData?.summary && (+ <>+ <h3 className="text-lg font-medium">Summary</h3>+ <div className="mb-2">+ <span className="text-xs font-semibold text-gray-8">+ Generated by Cap AI+ </span>+ </div>+ <p className="text-sm whitespace-pre-wrap">+ {aiData.summary}+ </p>+ </>)}- {!aiLoading &&- (aiData?.summary ||- (aiData?.chapters && aiData.chapters.length > 0)) && (- <div className="p-4 new-card-style">- {aiData?.summary && (- <>- <h3 className="text-lg font-medium">Summary</h3>- <div className="mb-2">- <span className="text-xs font-semibold text-gray-8">- Generated by Cap AI+ {aiData?.chapters && aiData.chapters.length > 0 && (+ <div className={aiData?.summary ? "mt-6" : ""}>+ <h3 className="mb-2 text-lg font-medium">Chapters</h3>+ <div className="divide-y">+ {aiData.chapters.map((chapter) => (+ <div+ key={chapter.start}+ className="p-2 cursor-pointer hover:bg-gray-100 rounded transition-colors flex items-center"+ onClick={() => handleSeek(chapter.start)}+ >+ <span className="text-xs text-gray-500 w-16">+ {formatTime(chapter.start)}</span>+ <span className="ml-2 text-sm">{chapter.title}</span></div>- <p className="text-sm whitespace-pre-wrap">- {aiData.summary}- </p>- </>- )}-- {aiData?.chapters && aiData.chapters.length > 0 && (- <div className={aiData?.summary ? "mt-6" : ""}>- <h3 className="mb-2 text-lg font-medium">Chapters</h3>- <div className="divide-y">- {aiData.chapters.map((chapter) => (- <div- key={chapter.start}- className="p-2 cursor-pointer hover:bg-gray-100 rounded transition-colors flex items-center"- onClick={() => handleSeek(chapter.start)}- >- <span className="text-xs text-gray-500 w-16">- {formatTime(chapter.start)}- </span>- <span className="ml-2 text-sm">- {chapter.title}- </span>- </div>- ))}- </div>- </div>- )}+ ))}+ </div></div>)}- </div>- </div>- </div>- <div className="py-4 mt-auto">- <a- target="_blank"- href={`/?ref=video_${data.id}`}- className="flex justify-center items-center px-4 py-2 mx-auto space-x-2 bg-gray-1 rounded-full new-card-style w-fit"- >- <span className="text-sm">Recorded with</span>- <Logo className="w-14 h-auto" />- </a>+ </div>+ )}</div>- </>+ </div>);};diff --git a/apps/web/app/s/[videoId]/_components/MP4VideoPlayer.tsx b/apps/web/app/s/[videoId]/_components/MP4VideoPlayer.tsxindex bdf8ffd9a..bcc416b1a 100644--- a/apps/web/app/s/[videoId]/_components/MP4VideoPlayer.tsx+++ b/apps/web/app/s/[videoId]/_components/MP4VideoPlayer.tsx@@ -36,6 +36,7 @@ export const MP4VideoPlayer = memo(const response = await fetch(urlWithTimestamp, { method: "HEAD" });if (response.redirected) {+ console.log({ response });// If the API redirected us, use the redirected URLsetCurrentSrc(response.url);return response.url;diff --git a/apps/web/app/s/[videoId]/_components/ShareHeader.tsx b/apps/web/app/s/[videoId]/_components/ShareHeader.tsxindex 8147beca9..70f175288 100644--- a/apps/web/app/s/[videoId]/_components/ShareHeader.tsx+++ b/apps/web/app/s/[videoId]/_components/ShareHeader.tsx@@ -1,3 +1,5 @@+"use client";+import { Button } from "@cap/ui";import { videos } from "@cap/database/schema";import moment from "moment";diff --git a/apps/web/app/s/[videoId]/page.tsx b/apps/web/app/s/[videoId]/page.tsxindex deb6dc7b0..148d68acd 100644--- a/apps/web/app/s/[videoId]/page.tsx+++ b/apps/web/app/s/[videoId]/page.tsx@@ -1,6 +1,6 @@-import { Share } from "./Share";import { db } from "@cap/database";import { eq, desc, sql, count } from "drizzle-orm";+import { Logo } from "@cap/ui";import {videos,comments,@@ -13,7 +13,6 @@ import { VideoMetadata } from "@cap/database/types";import { getCurrentUser, userSelectProps } from "@cap/database/auth/session";import type { Metadata, ResolvingMetadata } from "next";import { notFound } from "next/navigation";-import { ImageViewer } from "./_components/ImageViewer";import { buildEnv } from "@cap/env";import { getVideoAnalytics } from "@/actions/videos/get-analytics";import { transcribeVideo } from "@/actions/videos/transcribe";@@ -21,8 +20,12 @@ import { getScreenshot } from "@/actions/screenshots/get-screenshot";import { cookies, headers } from "next/headers";import { generateAiMetadata } from "@/actions/videos/generate-ai-metadata";import { isAiGenerationEnabled, isAiUiEnabled } from "@/utils/flags";++import { Share } from "./Share";import { PasswordOverlay } from "./_components/PasswordOverlay";+import { ImageViewer } from "./_components/ImageViewer";import { decrypt } from "@cap/database/crypto";+import { ShareHeader } from "./_components/ShareHeader";export const dynamic = "auto";export const dynamicParams = true;@@ -590,18 +593,48 @@ export default async function ShareVideoPage(props: Props) {videoId={videoWithOrganizationInfo.id}/>{authorized && (- <Share- data={videoWithOrganizationInfo}- user={user}- comments={commentsQuery}- initialAnalytics={initialAnalytics}- customDomain={customDomain}- domainVerified={domainVerified}- userOrganizations={userOrganizations}- initialAiData={initialAiData}- aiGenerationEnabled={aiGenerationEnabled}- aiUiEnabled={aiUiEnabled}- />+ <>+ <div className="container flex-1 px-4 py-4 mx-auto">+ <ShareHeader+ data={{+ ...videoWithOrganizationInfo,+ createdAt: video.metadata?.customCreatedAt+ ? new Date(video.metadata.customCreatedAt)+ : video.createdAt,+ }}+ user={user}+ customDomain={customDomain}+ domainVerified={domainVerified}+ sharedOrganizations={+ videoWithOrganizationInfo.sharedOrganizations || []+ }+ userOrganizations={userOrganizations}+ />++ <Share+ data={videoWithOrganizationInfo}+ user={user}+ comments={commentsQuery}+ initialAnalytics={initialAnalytics}+ customDomain={customDomain}+ domainVerified={domainVerified}+ userOrganizations={userOrganizations}+ initialAiData={initialAiData}+ aiGenerationEnabled={aiGenerationEnabled}+ aiUiEnabled={aiUiEnabled}+ />+ </div>+ <div className="py-4 mt-auto">+ <a+ target="_blank"+ href={`/?ref=video_${video.id}`}+ className="flex justify-center items-center px-4 py-2 mx-auto space-x-2 bg-gray-1 rounded-full new-card-style w-fit"+ >+ <span className="text-sm">Recorded with</span>+ <Logo className="w-14 h-auto" />+ </a>+ </div>+ </>)}</div>);diff --git a/apps/web/package.json b/apps/web/package.jsonindex 324cb70e4..66e8cb475 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -15,6 +15,7 @@"@aws-sdk/client-cloudfront": "^3.565.0","@aws-sdk/client-mediaconvert": "^3.565.0","@aws-sdk/client-s3": "^3.485.0",+ "@aws-sdk/cloudfront-signer": "^3.821.0","@aws-sdk/s3-presigned-post": "^3.485.0","@aws-sdk/s3-request-presigner": "^3.485.0","@cap/database": "workspace:*",@@ -107,7 +108,7 @@"eslint-config-next": "14.1.0","postcss": "^8.4.23","tailwindcss": "^3",- "typescript": "^5.7.2"+ "typescript": "^5.8.3"},"engines": {"node": "20"diff --git a/apps/web/utils/s3.ts b/apps/web/utils/s3.tsindex e7c0cf971..aeb867238 100644--- a/apps/web/utils/s3.ts+++ b/apps/web/utils/s3.ts@@ -1,8 +1,18 @@-import { S3Client } from "@aws-sdk/client-s3";+import {+ GetObjectCommand,+ HeadObjectCommand,+ HeadObjectOutput,+ ListObjectsV2Command,+ ListObjectsV2Output,+ S3Client,+} from "@aws-sdk/client-s3";import type { s3Buckets } from "@cap/database/schema";import type { InferSelectModel } from "drizzle-orm";import { decrypt } from "@cap/database/crypto";-import { serverEnv } from "@cap/env";+import { buildEnv, serverEnv } from "@cap/env";+import * as S3Presigner from "@aws-sdk/s3-request-presigner";+import * as CloudFrontPresigner from "@aws-sdk/cloudfront-signer";+import { S3_BUCKET_URL } from "@cap/utils";type S3Config = {endpoint?: string | null;@@ -97,3 +107,105 @@ export async function createS3Client(config?: S3Config) {s3Config,] as const;}++interface S3BucketProvider {+ getSignedObjectUrl(key: string): Promise<string>;+ getObject(key: string): Promise<string | undefined>;+ listObjects(config?: {+ prefix?: string;+ maxKeys?: number;+ }): Promise<ListObjectsV2Output>;+ headObject(key: string): Promise<HeadObjectOutput>;+}++function createCloudFrontProvider(config: {+ s3: S3Client;+ bucket: string;+ keyPairId: string;+ privateKey: string;+}): S3BucketProvider {+ const s3 = createS3Provider(config.s3, config.bucket);+ return {+ ...s3,+ async getSignedObjectUrl(key: string) {+ const url = `${S3_BUCKET_URL}/${key}`;+ const expires = Math.floor((Date.now() + 3600 * 1000) / 1000);++ const policy = {+ Statement: [+ {+ Resource: url,+ Condition: {+ DateLessThan: { "AWS:EpochTime": Math.floor(expires) },+ },+ },+ ],+ };++ return CloudFrontPresigner.getSignedUrl({+ url,+ keyPairId: config.keyPairId,+ privateKey: config.privateKey,+ policy: JSON.stringify(policy),+ });+ },+ };+}++function createS3Provider(client: S3Client, bucket: string): S3BucketProvider {+ return {+ getSignedObjectUrl(key: string) {+ return S3Presigner.getSignedUrl(+ client,+ new GetObjectCommand({ Bucket: bucket, Key: key }),+ { expiresIn: 3600 }+ );+ },+ async getObject(key: string, format = "string") {+ const resp = await client.send(+ new GetObjectCommand({ Bucket: bucket, Key: key })+ );+ if (format === "string") {+ return await resp.Body?.transformToString();+ }+ },+ async listObjects(config) {+ return await client.send(+ new ListObjectsV2Command({+ Bucket: bucket,+ Prefix: config?.prefix,+ MaxKeys: config?.maxKeys,+ })+ );+ },+ async headObject(key) {+ return await client.send(+ new HeadObjectCommand({ Bucket: bucket, Key: key })+ );+ },+ };+}++export async function createBucketProvider(+ customBucket?: InferSelectModel<typeof s3Buckets> | null+) {+ const bucket = await getS3Bucket(customBucket);+ const [s3Client] = await createS3Client(customBucket);++ if (serverEnv().CAP_CLOUDFRONT_DISTRIBUTION_ID) {+ const keyPairId = serverEnv().CLOUDFRONT_KEYPAIR_ID;+ const privateKey = serverEnv().CLOUDFRONT_KEYPAIR_PRIVATE_KEY;++ if (!keyPairId || !privateKey)+ throw new Error("Missing CloudFront keypair ID or private key");++ return createCloudFrontProvider({+ s3: s3Client,+ bucket,+ keyPairId,+ privateKey,+ });+ } else {+ return createS3Provider(s3Client, bucket);+ }+}diff --git a/package.json b/package.jsonindex fe25a5c9a..14d80e9db 100644--- a/package.json+++ b/package.json@@ -29,7 +29,7 @@"dotenv-cli": "latest","prettier": "^2.5.1","turbo": "^2.3.4",- "typescript": "^5.7.2"+ "typescript": "^5.8.3"},"packageManager": "[email protected]","name": "cap",diff --git a/packages/database/package.json b/packages/database/package.jsonindex 17770104e..c6b31d28c 100644--- a/packages/database/package.json+++ b/packages/database/package.json@@ -38,7 +38,7 @@"react-dom": "^18.2.0","react-router-dom": "^6.18.0","tsconfig": "workspace:*",- "typescript": "^5.7.2"+ "typescript": "^5.8.3"},"engines": {"node": "20"diff --git a/packages/env/server.ts b/packages/env/server.tsindex ee0f58a46..0e5b911d5 100644--- a/packages/env/server.ts+++ b/packages/env/server.ts@@ -51,6 +51,8 @@ function createServerEnv() {VERCEL_PROJECT_PRODUCTION_URL_HOST: z.string().optional(),DOCKER_BUILD: z.string().optional(),POSTHOG_PERSONAL_API_KEY: z.string().optional(),+ CLOUDFRONT_KEYPAIR_ID: z.string().optional(),+ CLOUDFRONT_KEYPAIR_PRIVATE_KEY: z.string().optional(),},experimental__runtimeEnv: {...process.env,diff --git a/packages/ui/package.json b/packages/ui/package.jsonindex a166aac1e..636de0a8c 100644--- a/packages/ui/package.json+++ b/packages/ui/package.json@@ -31,7 +31,7 @@"tauri-plugin-context-menu": "^0.5.0","tauri-plugin-positioner-api": "^0.2.7","tsconfig": "workspace:*",- "typescript": "^5.7.2",+ "typescript": "^5.8.3","vite": "^6.3.5","vite-tsconfig-paths": "^4.2.1"},diff --git a/packages/utils/package.json b/packages/utils/package.jsonindex 0cfb30fae..4f0835ca9 100644--- a/packages/utils/package.json+++ b/packages/utils/package.json@@ -15,7 +15,7 @@"react-dom": "^18.2.0","react-router-dom": "^6.18.0","tsconfig": "workspace:*",- "typescript": "^5.7.2"+ "typescript": "^5.8.3"},"dependencies": {"@aws-sdk/client-s3": "^3.485.0",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex e9595fd2a..9d51a99d0 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -21,7 +21,7 @@ importers:specifier: ^2.3.4version: 2.5.3typescript:- specifier: ^5.7.2+ specifier: ^5.8.3version: 5.8.3apps/desktop:@@ -220,7 +220,7 @@ importers:specifier: ^7.0.3version: 7.0.3typescript:- specifier: ^5.7.2+ specifier: ^5.8.3version: 5.8.3vite:specifier: ^6.3.5@@ -260,7 +260,7 @@ importers:specifier: ^4.20250214.0version: 4.20250507.0typescript:- specifier: ^5.5.2+ specifier: ^5.8.3version: 5.8.3vitest:specifier: ~2.1.9@@ -312,7 +312,7 @@ importers:specifier: ^1.0.0-beta.2version: 1.0.0-beta.7(@storybook/[email protected]([email protected]([email protected])))([email protected])([email protected]([email protected]))([email protected](@testing-library/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])))([email protected](@types/[email protected])([email protected])([email protected])([email protected]))typescript:- specifier: ^5.7.2+ specifier: ^5.8.3version: 5.8.3vite:specifier: ^6.3.5@@ -366,7 +366,7 @@ importers:specifier: ^10.9.2version: 10.9.2(@types/[email protected])([email protected])typescript:- specifier: ^5.7.2+ specifier: ^5.8.3version: 5.8.3devDependencies:'@typescript-eslint/eslint-plugin':@@ -411,6 +411,9 @@ importers:'@aws-sdk/client-s3':specifier: ^3.485.0version: 3.804.0+ '@aws-sdk/cloudfront-signer':+ specifier: ^3.821.0+ version: 3.821.0'@aws-sdk/s3-presigned-post':specifier: ^3.485.0version: 3.804.0@@ -683,7 +686,7 @@ importers:specifier: ^3typescript:- specifier: ^5.7.2+ specifier: ^5.8.3version: 5.8.3infra:@@ -824,7 +827,7 @@ importers:specifier: workspace:*version: link:../tsconfigtypescript:- specifier: ^5.7.2+ specifier: ^5.8.3version: 5.8.3packages/env:@@ -944,7 +947,7 @@ importers:specifier: workspace:*version: link:../tsconfigtypescript:- specifier: ^5.7.2+ specifier: ^5.8.3version: 5.8.3vite:specifier: ^6.3.5@@ -1036,7 +1039,7 @@ importers:specifier: workspace:*version: link:../tsconfigtypescript:- specifier: ^5.7.2+ specifier: ^5.8.3version: 5.8.3packages/web-api-contract:@@ -1115,6 +1118,10 @@ packages:resolution: {integrity: sha512-6D5iQbL0MqlJ7B5aaHdP21k9+3H/od0jHjHSXegvFd4h2KQbD+QVTdEOSLeakgBGgHYRfiQXsrdMMzUz8vcpsw==}engines: {node: '>=18.0.0'}+ '@aws-sdk/[email protected]':+ resolution: {integrity: sha512-5sDWEB23+eAzGklyjV1rYi4bSPWpG42N2+1WQhxF0491g5cElXwKN+eLgh/zT4Im3fq3Pum4Oj7P7SmMJLbATw==}+ engines: {node: '>=18.0.0'}+'@aws-sdk/[email protected]':resolution: {integrity: sha512-KrYDEc6HaJE+Mx5lrwq6uhJxj1RYYfggQ+X+zQeKRyrZHl2GOxFl7PdnpdwtnaQIjX0gNkDzquhZSdyT0ar5rA==}engines: {node: '>=18.0.0'}@@ -4714,6 +4721,10 @@ packages:resolution: {integrity: sha512-v6w8wnmZcVXjfVLjxw8qF7OwESD9wnpjp0Dqry/Pod0/5vcEA3qxCr+BhbOHlxS8O+29eLpT3aagxXGwIoEk7Q==}engines: {node: '>=18.0.0'}+ '@smithy/[email protected]':+ resolution: {integrity: sha512-6yZf53i/qB8gRHH/l2ZwUG5xgkPgQF15/KxH0DdXMDHjesA9MeZje/853ifkSY0x4m5S+dfDZ+c4x439PF0M2w==}+ engines: {node: '>=18.0.0'}+'@smithy/[email protected]':resolution: {integrity: sha512-FTbcajmltovWMjj3tksDQdD23b2w6gH+A0DYA1Yz3iSpjDj8fmkwy62UnXcWMy4d5YoMoSyLFHMfkEVEzbiN8Q==}engines: {node: '>=18.0.0'}@@ -4734,10 +4745,18 @@ packages:resolution: {integrity: sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==}engines: {node: '>=18.0.0'}+ '@smithy/[email protected]':+ resolution: {integrity: sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==}+ engines: {node: '>=18.0.0'}+'@smithy/[email protected]':resolution: {integrity: sha512-Bm8n3j2ScqnT+kJaClSVCMeiSenK6jVAzZCNewsYWuZtnBehEz4r2qP0riZySZVfzB+03XZHJeqfmJDkeeSLiQ==}engines: {node: '>=18.0.0'}+ '@smithy/[email protected]':+ resolution: {integrity: sha512-eMkc144MuN7B0TDA4U2fKs+BqczVbk3W+qIvcoCY6D1JY3hnAdCuhCZODC+GAeaxj0p6Jroz4+XMUn3PCxQQeQ==}+ engines: {node: '>=18.0.0'}+'@smithy/[email protected]':resolution: {integrity: sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==}engines: {node: '>=18.0.0'}@@ -8588,8 +8607,8 @@ packages:resolution: {integrity: sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==}engines: {node: '>= 4'}- resolution: {integrity: sha512-lCYzQrWzdnA68K03oMj/BUlBJrVBnslzDOgGFymAp49NmdGEJxGeN7sHh5mCva0nQkq+kkKSuru2zLf1m04+3A==}+ resolution: {integrity: sha512-ue/zxSyEzj7je8Nlt2vjY9GEa2BbScFSRZJq7OTVDZFp0r57fyuxrlsF8qWgxTP+kP8WklTw4by/ZEYVX5S13w==}engines: {node: '>=14.0.0'}@@ -13117,6 +13136,9 @@ packages:resolution: {integrity: sha512-z03fqpTMDF1G02VLKUMt6vyACE7rNWkh3gpXVHgPTw28NPtDFRGvcpTtPwn2kMKtQ0idtYJUTxchytmnqYswcw==}+ resolution: {integrity: sha512-TQSnBldh+XSGL+opiSIq0575wvDPqu09AqWe1F7JhUMKY+M91/aGlK4MhpVNO7MgYfHcVCB1ffwAUTJzllKJqg==}+resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}@@ -13394,6 +13416,11 @@ snapshots:transitivePeerDependencies:- aws-crt+ '@aws-sdk/[email protected]':+ dependencies:+ '@smithy/url-parser': 4.0.4+ tslib: 2.8.1+'@aws-sdk/[email protected]':dependencies:'@aws-sdk/types': 3.804.0@@ -14099,12 +14126,12 @@ snapshots:chokidar: 3.6.0fast-glob: 3.3.3gray-matter: 4.0.3- imagescript: 1.3.0+ imagescript: 1.3.1micromatch: 4.0.8ts-pattern: 5.7.1unified: 11.0.5yaml: 2.8.0- zod: 3.25.20+ zod: 3.25.51transitivePeerDependencies:- '@effect-ts/otel-node'- acorn@@ -17422,6 +17449,11 @@ snapshots:'@smithy/types': 4.2.0tslib: 2.8.1+ '@smithy/[email protected]':+ dependencies:+ '@smithy/types': 4.3.1+ tslib: 2.8.1+'@smithy/[email protected]':dependencies:'@smithy/types': 4.2.0@@ -17456,12 +17488,22 @@ snapshots:dependencies:tslib: 2.8.1+ '@smithy/[email protected]':+ dependencies:+ tslib: 2.8.1+'@smithy/[email protected]':dependencies:'@smithy/querystring-parser': 4.0.2'@smithy/types': 4.2.0tslib: 2.8.1+ '@smithy/[email protected]':+ dependencies:+ '@smithy/querystring-parser': 4.0.4+ '@smithy/types': 4.3.1+ tslib: 2.8.1+'@smithy/[email protected]':dependencies:'@smithy/util-buffer-from': 4.0.0@@ -22213,7 +22255,7 @@ snapshots:- [email protected]: {}+ [email protected]: {}@@ -27937,4 +27979,6 @@ snapshots:+ [email protected]: {}+