diff --git a/.changeset/calm-avocados-yawn.md b/.changeset/calm-avocados-yawn.md new file mode 100644 index 0000000000..8db6aae339 --- /dev/null +++ b/.changeset/calm-avocados-yawn.md @@ -0,0 +1,5 @@ +--- +"trigger.dev": patch +--- + +The `--force-local-build` flag is now renamed to just `--local-build` diff --git a/.changeset/proud-birds-change.md b/.changeset/proud-birds-change.md new file mode 100644 index 0000000000..c186324dd3 --- /dev/null +++ b/.changeset/proud-birds-change.md @@ -0,0 +1,6 @@ +--- +"trigger.dev": patch +"@trigger.dev/core": patch +--- + +Added support for native build server builds in the deploy command (`--native-build-server`) diff --git a/apps/webapp/app/env.server.ts b/apps/webapp/app/env.server.ts index 4a56bf37be..be95ce8873 100644 --- a/apps/webapp/app/env.server.ts +++ b/apps/webapp/app/env.server.ts @@ -345,6 +345,12 @@ const EnvironmentSchema = z OBJECT_STORE_SECRET_ACCESS_KEY: z.string().optional(), OBJECT_STORE_REGION: z.string().optional(), OBJECT_STORE_SERVICE: z.string().default("s3"), + + ARTIFACTS_OBJECT_STORE_BUCKET: z.string().optional(), + ARTIFACTS_OBJECT_STORE_BASE_URL: z.string().optional(), + ARTIFACTS_OBJECT_STORE_ACCESS_KEY_ID: z.string().optional(), + ARTIFACTS_OBJECT_STORE_SECRET_ACCESS_KEY: z.string().optional(), + ARTIFACTS_OBJECT_STORE_REGION: z.string().optional(), EVENTS_BATCH_SIZE: z.coerce.number().int().default(100), EVENTS_BATCH_INTERVAL: z.coerce.number().int().default(1000), EVENTS_DEFAULT_LOG_RETENTION: z.coerce.number().int().default(7), diff --git a/apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts b/apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts index 08dd0f7f86..de2f25ec74 100644 --- a/apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts +++ b/apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts @@ -163,23 +163,25 @@ export class DeploymentPresenter { ? ExternalBuildData.safeParse(deployment.externalBuildData) : undefined; - let s2Logs = undefined; + let eventStream = undefined; if (env.S2_ENABLED === "1" && gitMetadata?.source === "trigger_github_app") { const [error, accessToken] = await tryCatch(this.getS2AccessToken(project.externalRef)); if (error) { logger.error("Failed getting S2 access token", { error }); } else { - s2Logs = { - basin: env.S2_DEPLOYMENT_LOGS_BASIN_NAME, - stream: `projects/${project.externalRef}/deployments/${deployment.shortCode}`, - accessToken, + eventStream = { + s2: { + basin: env.S2_DEPLOYMENT_LOGS_BASIN_NAME, + stream: `projects/${project.externalRef}/deployments/${deployment.shortCode}`, + accessToken, + }, }; } } return { - s2Logs, + eventStream, deployment: { id: deployment.id, shortCode: deployment.shortCode, diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx index 96cd24b964..aebc934ba3 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx @@ -40,6 +40,7 @@ import { cn } from "~/utils/cn"; import { v3DeploymentParams, v3DeploymentsPath, v3RunsPath } from "~/utils/pathBuilder"; import { capitalizeWord } from "~/utils/string"; import { UserTag } from "../_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route"; +import { DeploymentEventFromString } from "@trigger.dev/core/v3/schemas"; export const loader = async ({ request, params }: LoaderFunctionArgs) => { const userId = await requireUserId(request); @@ -48,7 +49,7 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => { try { const presenter = new DeploymentPresenter(); - const { deployment, s2Logs } = await presenter.call({ + const { deployment, eventStream } = await presenter.call({ userId, organizationSlug, projectSlug: projectParam, @@ -56,7 +57,7 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => { deploymentShortCode: deploymentParam, }); - return typedjson({ deployment, s2Logs }); + return typedjson({ deployment, eventStream }); } catch (error) { console.error(error); throw new Response(undefined, { @@ -69,18 +70,18 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => { type LogEntry = { message: string; timestamp: Date; - level: "info" | "error" | "warn"; + level: "info" | "error" | "warn" | "debug"; }; export default function Page() { - const { deployment, s2Logs } = useTypedLoaderData(); + const { deployment, eventStream } = useTypedLoaderData(); const organization = useOrganization(); const project = useProject(); const environment = useEnvironment(); const location = useLocation(); const page = new URLSearchParams(location.search).get("page"); - const logsDisabled = s2Logs === undefined; + const logsDisabled = eventStream === undefined; const [logs, setLogs] = useState([]); const [isStreaming, setIsStreaming] = useState(true); const [streamError, setStreamError] = useState(null); @@ -97,9 +98,9 @@ export default function Page() { const streamLogs = async () => { try { - const s2 = new S2({ accessToken: s2Logs.accessToken }); - const basin = s2.basin(s2Logs.basin); - const stream = basin.stream(s2Logs.stream); + const s2 = new S2({ accessToken: eventStream.s2.accessToken }); + const basin = s2.basin(eventStream.s2.basin); + const stream = basin.stream(eventStream.s2.stream); const readSession = await stream.readSession( { @@ -113,27 +114,49 @@ export default function Page() { const decoder = new TextDecoder(); for await (const record of readSession) { - try { - const headers: Record = {}; - - if (record.headers) { - for (const [nameBytes, valueBytes] of record.headers) { - headers[decoder.decode(nameBytes)] = decoder.decode(valueBytes); + const decoded = decoder.decode(record.body); + const result = DeploymentEventFromString.safeParse(decoded); + + if (!result.success) { + // fallback to the previous format in s2 logs for compatibility + try { + const headers: Record = {}; + + if (record.headers) { + for (const [nameBytes, valueBytes] of record.headers) { + headers[decoder.decode(nameBytes)] = decoder.decode(valueBytes); + } } + const level = (headers["level"]?.toLowerCase() as LogEntry["level"]) ?? "info"; + + setLogs((prevLogs) => [ + ...prevLogs, + { + timestamp: new Date(record.timestamp), + message: decoded, + level, + }, + ]); + } catch (err) { + console.error("Failed to parse log record:", err); } - const level = (headers["level"]?.toLowerCase() as LogEntry["level"]) ?? "info"; - - setLogs((prevLogs) => [ - ...prevLogs, - { - timestamp: new Date(record.timestamp), - message: decoder.decode(record.body), - level, - }, - ]); - } catch (err) { - console.error("Failed to parse log record:", err); + + continue; } + + const event = result.data; + if (event.type !== "log") { + continue; + } + + setLogs((prevLogs) => [ + ...prevLogs, + { + timestamp: new Date(record.timestamp), + message: event.data.message, + level: event.data.level, + }, + ]); } } catch (error) { if (abortController.signal.aborted) return; @@ -158,7 +181,7 @@ export default function Page() { return () => { abortController.abort(); }; - }, [s2Logs?.basin, s2Logs?.stream, s2Logs?.accessToken, isPending]); + }, [eventStream?.s2?.basin, eventStream?.s2?.stream, eventStream?.s2?.accessToken, isPending]); return (
diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings/route.tsx index 788013bd45..ef36c6b430 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings/route.tsx @@ -1248,7 +1248,7 @@ function BuildSettingsForm({ buildSettings }: { buildSettings: BuildSettings }) /> Native build server builds do not rely on external build providers and will become the - default in the future. Version 4.1.0 or newer is required. + default in the future. Version 4.1.3 or newer is required. {fields.useNativeBuildServer.error} diff --git a/apps/webapp/app/routes/api.v1.artifacts.ts b/apps/webapp/app/routes/api.v1.artifacts.ts new file mode 100644 index 0000000000..f0ff332812 --- /dev/null +++ b/apps/webapp/app/routes/api.v1.artifacts.ts @@ -0,0 +1,78 @@ +import { type ActionFunctionArgs, json } from "@remix-run/server-runtime"; +import { + type CreateArtifactResponseBody, + CreateArtifactRequestBody, + tryCatch, +} from "@trigger.dev/core/v3"; +import { authenticateRequest } from "~/services/apiAuth.server"; +import { logger } from "~/services/logger.server"; +import { ArtifactsService } from "~/v3/services/artifacts.server"; + +export async function action({ request }: ActionFunctionArgs) { + if (request.method.toUpperCase() !== "POST") { + return json({ error: "Method Not Allowed" }, { status: 405 }); + } + + const authenticationResult = await authenticateRequest(request, { + apiKey: true, + organizationAccessToken: false, + personalAccessToken: false, + }); + + if (!authenticationResult || !authenticationResult.result.ok) { + logger.info("Invalid or missing api key", { url: request.url }); + return json({ error: "Invalid or Missing API key" }, { status: 401 }); + } + + const [, rawBody] = await tryCatch(request.json()); + const body = CreateArtifactRequestBody.safeParse(rawBody ?? {}); + + if (!body.success) { + return json({ error: "Invalid request body", issues: body.error.issues }, { status: 400 }); + } + + const { environment: authenticatedEnv } = authenticationResult.result; + + const service = new ArtifactsService(); + return await service + .createArtifact(body.data.type, authenticatedEnv, body.data.contentLength) + .match( + (result) => { + return json( + { + artifactKey: result.artifactKey, + uploadUrl: result.uploadUrl, + uploadFields: result.uploadFields, + expiresAt: result.expiresAt.toISOString(), + } satisfies CreateArtifactResponseBody, + { status: 201 } + ); + }, + (error) => { + switch (error.type) { + case "artifact_size_exceeds_limit": { + logger.warn("Artifact size exceeds limit", { error }); + return json( + { + error: `Artifact size (${error.contentLength} bytes) exceeds the allowed limit of ${error.sizeLimit} bytes`, + }, + { status: 400 } + ); + } + case "failed_to_create_presigned_post": { + logger.error("Failed to create presigned POST", { error }); + return json({ error: "Failed to generate artifact upload URL" }, { status: 500 }); + } + case "artifacts_bucket_not_configured": { + logger.error("Artifacts bucket not configured", { error }); + return json({ error: "Internal server error" }, { status: 500 }); + } + default: { + error satisfies never; + logger.error("Failed creating artifact", { error }); + return json({ error: "Internal server error" }, { status: 500 }); + } + } + } + ); +} diff --git a/apps/webapp/app/routes/api.v1.deployments.ts b/apps/webapp/app/routes/api.v1.deployments.ts index 8b3280cbb2..0190ba123d 100644 --- a/apps/webapp/app/routes/api.v1.deployments.ts +++ b/apps/webapp/app/routes/api.v1.deployments.ts @@ -37,7 +37,7 @@ export async function action({ request, params }: ActionFunctionArgs) { const service = new InitializeDeploymentService(); try { - const { deployment, imageRef } = await service.call(authenticatedEnv, body.data); + const { deployment, imageRef, eventStream } = await service.call(authenticatedEnv, body.data); const responseBody: InitializeDeploymentResponseBody = { id: deployment.friendlyId, @@ -48,6 +48,7 @@ export async function action({ request, params }: ActionFunctionArgs) { deployment.externalBuildData as InitializeDeploymentResponseBody["externalBuildData"], imageTag: imageRef, imagePlatform: deployment.imagePlatform, + eventStream, }; return json(responseBody, { status: 200 }); diff --git a/apps/webapp/app/services/platform.v3.server.ts b/apps/webapp/app/services/platform.v3.server.ts index f6dbcadafd..d83da275dc 100644 --- a/apps/webapp/app/services/platform.v3.server.ts +++ b/apps/webapp/app/services/platform.v3.server.ts @@ -591,6 +591,31 @@ export async function generateRegistryCredentials( return result; } +export async function enqueueBuild( + projectId: string, + deploymentId: string, + artifactKey: string, + options: { + skipPromotion?: boolean; + configFilePath?: string; + } +) { + if (!client) return undefined; + const result = await client.enqueueBuild(projectId, { deploymentId, artifactKey, options }); + if (!result.success) { + logger.error("Error enqueuing build", { + error: result.error, + projectId, + deploymentId, + artifactKey, + options, + }); + throw new Error("Failed to enqueue build"); + } + + return result; +} + function isCloud(): boolean { const acceptableHosts = [ "https://cloud.trigger.dev", diff --git a/apps/webapp/app/v3/services/artifacts.server.ts b/apps/webapp/app/v3/services/artifacts.server.ts new file mode 100644 index 0000000000..9e82af5123 --- /dev/null +++ b/apps/webapp/app/v3/services/artifacts.server.ts @@ -0,0 +1,92 @@ +import type { AuthenticatedEnvironment } from "~/services/apiAuth.server"; +import { BaseService } from "./baseService.server"; +import { env } from "~/env.server"; +import { createPresignedPost } from "@aws-sdk/s3-presigned-post"; +import { S3Client } from "@aws-sdk/client-s3"; +import { customAlphabet } from "nanoid"; +import { errAsync, fromPromise } from "neverthrow"; + +const nanoid = customAlphabet("1234567890abcdefghijklmnopqrstuvwxyz", 24); +const objectStoreClient = + env.ARTIFACTS_OBJECT_STORE_ACCESS_KEY_ID && + env.ARTIFACTS_OBJECT_STORE_SECRET_ACCESS_KEY && + env.ARTIFACTS_OBJECT_STORE_BASE_URL + ? new S3Client({ + credentials: { + accessKeyId: env.ARTIFACTS_OBJECT_STORE_ACCESS_KEY_ID, + secretAccessKey: env.ARTIFACTS_OBJECT_STORE_SECRET_ACCESS_KEY, + }, + region: env.ARTIFACTS_OBJECT_STORE_REGION, + endpoint: env.ARTIFACTS_OBJECT_STORE_BASE_URL, + forcePathStyle: true, + }) + : new S3Client(); + +const artifactKeyPrefixByType = { + deployment_context: "deployments", +} as const; +const artifactBytesSizeLimitByType = { + deployment_context: 100 * 1024 * 1024, // 100MB +} as const; + +export class ArtifactsService extends BaseService { + private readonly bucket = env.ARTIFACTS_OBJECT_STORE_BUCKET; + + public createArtifact( + type: "deployment_context", + authenticatedEnv: AuthenticatedEnvironment, + contentLength?: number + ) { + const limit = artifactBytesSizeLimitByType[type]; + + // this is just a validation using client-side data + // the actual limit will be enforced by S3 + if (contentLength && contentLength > limit) { + return errAsync({ + type: "artifact_size_exceeds_limit" as const, + contentLength, + sizeLimit: limit, + }); + } + + const uniqueId = nanoid(); + const key = `${artifactKeyPrefixByType[type]}/${authenticatedEnv.project.externalRef}/${authenticatedEnv.slug}/${uniqueId}.tar.gz`; + + return this.createPresignedPost(key, limit, contentLength).map((result) => ({ + artifactKey: key, + uploadUrl: result.url, + uploadFields: result.fields, + expiresAt: result.expiresAt, + })); + } + + private createPresignedPost(key: string, sizeLimit: number, contentLength?: number) { + if (!this.bucket) { + return errAsync({ + type: "artifacts_bucket_not_configured" as const, + }); + } + + const ttlSeconds = 300; // 5 minutes + const expiresAt = new Date(Date.now() + ttlSeconds * 1000); + + return fromPromise( + createPresignedPost(objectStoreClient, { + Bucket: this.bucket, + Key: key, + Conditions: [["content-length-range", 0, sizeLimit]], + Fields: { + "Content-Type": "application/gzip", + }, + Expires: ttlSeconds, + }), + (error) => ({ + type: "failed_to_create_presigned_post" as const, + cause: error, + }) + ).map((result) => ({ + ...result, + expiresAt, + })); + } +} diff --git a/apps/webapp/app/v3/services/deployment.server.ts b/apps/webapp/app/v3/services/deployment.server.ts index 47bf3c04fc..ec9ea293af 100644 --- a/apps/webapp/app/v3/services/deployment.server.ts +++ b/apps/webapp/app/v3/services/deployment.server.ts @@ -1,13 +1,26 @@ import { type AuthenticatedEnvironment } from "~/services/apiAuth.server"; import { BaseService } from "./baseService.server"; -import { errAsync, fromPromise, okAsync } from "neverthrow"; -import { type WorkerDeployment } from "@trigger.dev/database"; -import { logger, type GitMeta } from "@trigger.dev/core/v3"; +import { errAsync, fromPromise, okAsync, type ResultAsync } from "neverthrow"; +import { type WorkerDeployment, type Project } from "@trigger.dev/database"; +import { logger, type GitMeta, type DeploymentEvent } from "@trigger.dev/core/v3"; import { TimeoutDeploymentService } from "./timeoutDeployment.server"; import { env } from "~/env.server"; import { createRemoteImageBuild } from "../remoteImageBuilder.server"; import { FINAL_DEPLOYMENT_STATUSES } from "./failDeployment.server"; -import { generateRegistryCredentials } from "~/services/platform.v3.server"; +import { enqueueBuild, generateRegistryCredentials } from "~/services/platform.v3.server"; +import { AppendRecord, S2 } from "@s2-dev/streamstore"; +import { createRedisClient } from "~/redis.server"; + +const S2_TOKEN_KEY_PREFIX = "s2-token:read:deployment-event-stream:project:"; +const s2TokenRedis = createRedisClient("s2-token-cache", { + host: env.CACHE_REDIS_HOST, + port: env.CACHE_REDIS_PORT, + username: env.CACHE_REDIS_USERNAME, + password: env.CACHE_REDIS_PASSWORD, + tlsDisabled: env.CACHE_REDIS_TLS_DISABLED === "true", + clusterMode: env.CACHE_REDIS_CLUSTER_MODE_ENABLED === "1", +}); +const s2 = env.S2_ENABLED === "1" ? new S2({ accessToken: env.S2_ACCESS_TOKEN }) : undefined; export class DeploymentService extends BaseService { /** @@ -22,35 +35,11 @@ export class DeploymentService extends BaseService { * @param friendlyId The friendly deployment ID. * @param updates Optional deployment details to persist. */ - public progressDeployment( authenticatedEnv: AuthenticatedEnvironment, friendlyId: string, updates: Partial & { git: GitMeta }> ) { - const getDeployment = () => - fromPromise( - this._prisma.workerDeployment.findFirst({ - where: { - friendlyId, - environmentId: authenticatedEnv.id, - }, - select: { - status: true, - id: true, - }, - }), - (error) => ({ - type: "other" as const, - cause: error, - }) - ).andThen((deployment) => { - if (!deployment) { - return errAsync({ type: "deployment_not_found" as const }); - } - return okAsync(deployment); - }); - const validateDeployment = (deployment: Pick) => { if (deployment.status !== "PENDING" && deployment.status !== "INSTALLING") { logger.warn( @@ -134,7 +123,7 @@ export class DeploymentService extends BaseService { }) ); - return getDeployment() + return this.getDeployment(authenticatedEnv.projectId, friendlyId) .andThen(validateDeployment) .andThen((deployment) => { if (deployment.status === "PENDING") { @@ -160,30 +149,11 @@ export class DeploymentService extends BaseService { friendlyId: string, data?: Partial> ) { - const getDeployment = () => - fromPromise( - this._prisma.workerDeployment.findFirst({ - where: { - friendlyId, - projectId: authenticatedEnv.projectId, - }, - select: { - status: true, - id: true, - }, - }), - (error) => ({ - type: "other" as const, - cause: error, - }) - ).andThen((deployment) => { - if (!deployment) { - return errAsync({ type: "deployment_not_found" as const }); - } - return okAsync(deployment); - }); - - const validateDeployment = (deployment: Pick) => { + const validateDeployment = ( + deployment: Pick & { + environment: { project: { externalRef: string } }; + } + ) => { if (FINAL_DEPLOYMENT_STATUSES.includes(deployment.status)) { logger.warn("Attempted cancelling deployment in a final state", { deployment, @@ -194,7 +164,11 @@ export class DeploymentService extends BaseService { return okAsync(deployment); }; - const cancelDeployment = (deployment: Pick) => + const cancelDeployment = ( + deployment: Pick & { + environment: { project: { externalRef: string } }; + } + ) => fromPromise( this._prisma.workerDeployment.updateMany({ where: { @@ -217,7 +191,7 @@ export class DeploymentService extends BaseService { if (result.count === 0) { return errAsync({ type: "deployment_cannot_be_cancelled" as const }); } - return okAsync({ id: deployment.id }); + return okAsync({ deployment }); }); const deleteTimeout = (deployment: Pick) => @@ -226,9 +200,25 @@ export class DeploymentService extends BaseService { cause: error, })); - return getDeployment() + return this.getDeployment(authenticatedEnv.projectId, friendlyId) .andThen(validateDeployment) .andThen(cancelDeployment) + .andThen(({ deployment }) => + this.appendToEventLog(deployment.environment.project, deployment, [ + { + type: "finalized", + data: { + result: "canceled", + message: data?.canceledReason ?? undefined, + }, + }, + ]) + .orElse((error) => { + logger.error("Failed to append event to deployment event log", { error }); + return okAsync(deployment); + }) + .map(() => deployment) + ) .andThen(deleteTimeout) .map(() => undefined); } @@ -296,6 +286,142 @@ export class DeploymentService extends BaseService { .andThen(generateCredentials); } + public enqueueBuild( + authenticatedEnv: Pick, + deployment: Pick, + artifactKey: string, + options: { + skipPromotion?: boolean; + configFilePath?: string; + } + ) { + return fromPromise( + enqueueBuild(authenticatedEnv.projectId, deployment.friendlyId, artifactKey, options), + (error) => ({ + type: "failed_to_enqueue_build" as const, + cause: error, + }) + ); + } + + public appendToEventLog( + project: Pick, + deployment: Pick, + events: DeploymentEvent[] + ): ResultAsync< + undefined, + { type: "s2_is_disabled" } | { type: "failed_to_append_to_event_log"; cause: unknown } + > { + if (env.S2_ENABLED !== "1" || !s2) { + return errAsync({ type: "s2_is_disabled" as const }); + } + + const basin = s2.basin(env.S2_DEPLOYMENT_LOGS_BASIN_NAME); + const stream = basin.stream( + `projects/${project.externalRef}/deployments/${deployment.shortCode}` + ); + + return fromPromise( + stream.append(events.map((event) => AppendRecord.make(JSON.stringify(event)))), + (error) => ({ + type: "failed_to_append_to_event_log" as const, + cause: error, + }) + ).map(() => undefined); + } + + public createEventStream( + project: Pick, + deployment: Pick + ): ResultAsync< + { basin: string; stream: string }, + { type: "s2_is_disabled" } | { type: "failed_to_create_event_stream"; cause: unknown } + > { + if (env.S2_ENABLED !== "1" || !s2) { + return errAsync({ type: "s2_is_disabled" as const }); + } + const basin = s2.basin(env.S2_DEPLOYMENT_LOGS_BASIN_NAME); + + return fromPromise( + basin.streams.create({ + stream: `projects/${project.externalRef}/deployments/${deployment.shortCode}`, + }), + (error) => ({ + type: "failed_to_create_event_stream" as const, + cause: error, + }) + ).map(({ name }) => ({ + basin: basin.name, + stream: name, + })); + } + + public getEventStreamAccessToken( + project: Pick + ): ResultAsync { + if (env.S2_ENABLED !== "1" || !s2) { + return errAsync({ type: "s2_is_disabled" as const }); + } + const basinName = env.S2_DEPLOYMENT_LOGS_BASIN_NAME; + const redisKey = `${S2_TOKEN_KEY_PREFIX}${project.externalRef}`; + + const getTokenFromCache = () => + fromPromise(s2TokenRedis.get(redisKey), (error) => ({ + type: "other" as const, + cause: error, + })).andThen((cachedToken) => { + if (!cachedToken) { + return errAsync({ type: "s2_token_cache_not_found" as const }); + } + return okAsync(cachedToken); + }); + + const issueS2Token = () => + fromPromise( + s2.accessTokens.issue({ + id: `${project.externalRef}-${new Date().getTime()}`, + expires_at: new Date(Date.now() + 60 * 60 * 1000).toISOString(), // 1 hour + scope: { + ops: ["read"], + basins: { + exact: basinName, + }, + streams: { + prefix: `projects/${project.externalRef}/deployments/`, + }, + }, + }), + (error) => ({ + type: "other" as const, + cause: error, + }) + ).map(({ access_token }) => access_token); + + const cacheToken = (token: string) => + fromPromise( + s2TokenRedis.setex( + redisKey, + 59 * 60, // slightly shorter than the token validity period + token + ), + (error) => ({ + type: "other" as const, + cause: error, + }) + ); + + return getTokenFromCache() + .orElse(issueS2Token) + .andThen((token) => + cacheToken(token) + .map(() => token) + .orElse((error) => { + logger.error("Failed to cache S2 token", { error }); + return okAsync(token); // ignore the cache error + }) + ); + } + private getDeployment(projectId: string, friendlyId: string) { return fromPromise( this._prisma.workerDeployment.findFirst({ @@ -307,6 +433,16 @@ export class DeploymentService extends BaseService { status: true, id: true, imageReference: true, + shortCode: true, + environment: { + include: { + project: { + select: { + externalRef: true, + }, + }, + }, + }, }, }), (error) => ({ diff --git a/apps/webapp/app/v3/services/deploymentIndexFailed.server.ts b/apps/webapp/app/v3/services/deploymentIndexFailed.server.ts index fffab0af03..ad1ff09726 100644 --- a/apps/webapp/app/v3/services/deploymentIndexFailed.server.ts +++ b/apps/webapp/app/v3/services/deploymentIndexFailed.server.ts @@ -1,7 +1,8 @@ import { PerformDeploymentAlertsService } from "./alerts/performDeploymentAlerts.server"; import { BaseService } from "./baseService.server"; import { logger } from "~/services/logger.server"; -import { WorkerDeploymentStatus } from "@trigger.dev/database"; +import { type WorkerDeploymentStatus } from "@trigger.dev/database"; +import { DeploymentService } from "./deployment.server"; const FINAL_DEPLOYMENT_STATUSES: WorkerDeploymentStatus[] = [ "CANCELED", @@ -31,6 +32,13 @@ export class DeploymentIndexFailed extends BaseService { : { id: maybeFriendlyId, }, + include: { + environment: { + include: { + project: true, + }, + }, + }, }); if (!deployment) { @@ -66,6 +74,21 @@ export class DeploymentIndexFailed extends BaseService { }, }); + const deploymentService = new DeploymentService(); + await deploymentService + .appendToEventLog(deployment.environment.project, failedDeployment, [ + { + type: "finalized", + data: { + result: "failed", + message: error.message, + }, + }, + ]) + .orTee((error) => { + logger.error("Failed to append failed deployment event to event log", { error }); + }); + await PerformDeploymentAlertsService.enqueue(failedDeployment.id); return failedDeployment; diff --git a/apps/webapp/app/v3/services/failDeployment.server.ts b/apps/webapp/app/v3/services/failDeployment.server.ts index 79234b8310..b26cc77d4d 100644 --- a/apps/webapp/app/v3/services/failDeployment.server.ts +++ b/apps/webapp/app/v3/services/failDeployment.server.ts @@ -4,6 +4,7 @@ import { logger } from "~/services/logger.server"; import { type WorkerDeploymentStatus } from "@trigger.dev/database"; import { type FailDeploymentRequestBody } from "@trigger.dev/core/v3/schemas"; import { type AuthenticatedEnvironment } from "~/services/apiAuth.server"; +import { DeploymentService } from "./deployment.server"; export const FINAL_DEPLOYMENT_STATUSES: WorkerDeploymentStatus[] = [ "CANCELED", @@ -50,6 +51,21 @@ export class FailDeploymentService extends BaseService { }, }); + const deploymentService = new DeploymentService(); + await deploymentService + .appendToEventLog(authenticatedEnv.project, failedDeployment, [ + { + type: "finalized", + data: { + result: "failed", + message: params.error.message, + }, + }, + ]) + .orTee((error) => { + logger.error("Failed to append failed deployment event to event log", { error }); + }); + await PerformDeploymentAlertsService.enqueue(failedDeployment.id); return failedDeployment; diff --git a/apps/webapp/app/v3/services/finalizeDeployment.server.ts b/apps/webapp/app/v3/services/finalizeDeployment.server.ts index 175986ae04..6cbfc323e7 100644 --- a/apps/webapp/app/v3/services/finalizeDeployment.server.ts +++ b/apps/webapp/app/v3/services/finalizeDeployment.server.ts @@ -1,5 +1,5 @@ -import { FinalizeDeploymentRequestBody } from "@trigger.dev/core/v3/schemas"; -import { AuthenticatedEnvironment } from "~/services/apiAuth.server"; +import type { FinalizeDeploymentRequestBody } from "@trigger.dev/core/v3/schemas"; +import type { AuthenticatedEnvironment } from "~/services/apiAuth.server"; import { logger } from "~/services/logger.server"; import { socketIo } from "../handleSocketIo.server"; import { updateEnvConcurrencyLimits } from "../runQueue.server"; @@ -9,6 +9,7 @@ import { ChangeCurrentDeploymentService } from "./changeCurrentDeployment.server import { projectPubSub } from "./projectPubSub.server"; import { FailDeploymentService } from "./failDeployment.server"; import { TimeoutDeploymentService } from "./timeoutDeployment.server"; +import { DeploymentService } from "./deployment.server"; import { engine } from "../runEngine.server"; import { tryCatch } from "@trigger.dev/core"; @@ -77,6 +78,20 @@ export class FinalizeDeploymentService extends BaseService { }, }); + const deploymentService = new DeploymentService(); + await deploymentService + .appendToEventLog(authenticatedEnv.project, finalizedDeployment, [ + { + type: "finalized", + data: { + result: "succeeded", + }, + }, + ]) + .orTee((error) => { + logger.error("Failed to append finalized deployment event to event log", { error }); + }); + await TimeoutDeploymentService.dequeue(deployment.id, this._prisma); if (typeof body.skipPromotion === "undefined" || !body.skipPromotion) { diff --git a/apps/webapp/app/v3/services/initializeDeployment.server.ts b/apps/webapp/app/v3/services/initializeDeployment.server.ts index 0758dc231e..e88d8b9e8f 100644 --- a/apps/webapp/app/v3/services/initializeDeployment.server.ts +++ b/apps/webapp/app/v3/services/initializeDeployment.server.ts @@ -11,6 +11,8 @@ import { TimeoutDeploymentService } from "./timeoutDeployment.server"; import { getDeploymentImageRef } from "../getDeploymentImageRef.server"; import { tryCatch } from "@trigger.dev/core"; import { getRegistryConfig } from "../registryConfig.server"; +import { DeploymentService } from "./deployment.server"; +import { errAsync } from "neverthrow"; const nanoid = customAlphabet("1234567890abcdefghijklmnopqrstuvwxyz", 8); @@ -90,7 +92,7 @@ export class InitializeDeploymentService extends BaseService { // For the `PENDING` initial status, defer the creation of the Depot build until the deployment is started. // This helps avoid Depot token expiration issues. const externalBuildData = - payload.initialStatus === "PENDING" + payload.initialStatus === "PENDING" || payload.isNativeBuild ? undefined : await createRemoteImageBuild(environment.project); @@ -136,9 +138,43 @@ export class InitializeDeploymentService extends BaseService { const { imageRef, isEcr, repoCreated } = imageRefResult; - // we keep using `BUILDING` as the initial status if not explicitly set - // to avoid changing the behavior for deployments not created in the build server - const initialStatus = payload.initialStatus ?? "BUILDING"; + // We keep using `BUILDING` as the initial status if not explicitly set + // to avoid changing the behavior for deployments not created in the build server. + // Native builds always start in the `PENDING` status. + const initialStatus = + payload.initialStatus ?? (payload.isNativeBuild ? "PENDING" : "BUILDING"); + + const deploymentService = new DeploymentService(); + const s2StreamOrFail = await deploymentService + .createEventStream(environment.project, { shortCode: deploymentShortCode }) + .andThen(({ basin, stream }) => + deploymentService.getEventStreamAccessToken(environment.project).map((accessToken) => ({ + basin, + stream, + accessToken, + })) + ); + + if (s2StreamOrFail.isErr()) { + logger.error( + "Failed to create S2 event stream on deployment initialization, continuing without logs stream", + { + environmentId: environment.id, + projectId: environment.projectId, + error: s2StreamOrFail.error, + } + ); + } + + const eventStream = s2StreamOrFail.isOk() + ? { + s2: { + basin: s2StreamOrFail.value.basin, + stream: s2StreamOrFail.value.stream, + accessToken: s2StreamOrFail.value.accessToken, + }, + } + : undefined; logger.debug("Creating deployment", { environmentId: environment.id, @@ -150,6 +186,8 @@ export class InitializeDeploymentService extends BaseService { isEcr, repoCreated, initialStatus, + artifactKey: payload.isNativeBuild ? payload.artifactKey : undefined, + isNativeBuild: payload.isNativeBuild, }); const deployment = await this._prisma.workerDeployment.create({ @@ -182,9 +220,45 @@ export class InitializeDeploymentService extends BaseService { new Date(Date.now() + timeoutMs) ); + if (payload.isNativeBuild) { + const result = await deploymentService + .enqueueBuild(environment, deployment, payload.artifactKey, { + skipPromotion: payload.skipPromotion, + configFilePath: payload.configFilePath, + }) + .orElse((error) => { + logger.error("Failed to enqueue build", { + environmentId: environment.id, + projectId: environment.projectId, + deploymentId: deployment.id, + error: error.cause, + }); + + return deploymentService + .cancelDeployment(environment, deployment.friendlyId, { + canceledReason: "Failed to enqueue build, please try again shortly.", + }) + .orTee((cancelError) => + logger.error("Failed to cancel deployment after failed build enqueue", { + environmentId: environment.id, + projectId: environment.projectId, + deploymentId: deployment.id, + error: cancelError, + }) + ) + .andThen(() => errAsync(error)) + .orElse(() => errAsync(error)); + }); + + if (result.isErr()) { + throw Error("Failed to enqueue build"); + } + } + return { deployment, imageRef, + eventStream, }; }); } diff --git a/apps/webapp/app/v3/services/timeoutDeployment.server.ts b/apps/webapp/app/v3/services/timeoutDeployment.server.ts index 5cf69f76e4..efb2569a94 100644 --- a/apps/webapp/app/v3/services/timeoutDeployment.server.ts +++ b/apps/webapp/app/v3/services/timeoutDeployment.server.ts @@ -2,8 +2,9 @@ import { logger } from "~/services/logger.server"; import { BaseService } from "./baseService.server"; import { commonWorker } from "../commonWorker.server"; import { PerformDeploymentAlertsService } from "./alerts/performDeploymentAlerts.server"; -import { PrismaClientOrTransaction } from "~/db.server"; +import { type PrismaClientOrTransaction } from "~/db.server"; import { workerQueue } from "~/services/worker.server"; +import { DeploymentService } from "./deployment.server"; export class TimeoutDeploymentService extends BaseService { public async call(id: string, fromStatus: string, errorMessage: string) { @@ -12,7 +13,11 @@ export class TimeoutDeploymentService extends BaseService { id, }, include: { - environment: true, + environment: { + include: { + project: true, + }, + }, }, }); @@ -29,7 +34,7 @@ export class TimeoutDeploymentService extends BaseService { return; } - await this._prisma.workerDeployment.update({ + const timedOutDeployment = await this._prisma.workerDeployment.update({ where: { id: deployment.id, }, @@ -40,6 +45,21 @@ export class TimeoutDeploymentService extends BaseService { }, }); + const deploymentService = new DeploymentService(); + await deploymentService + .appendToEventLog(deployment.environment.project, timedOutDeployment, [ + { + type: "finalized", + data: { + result: "timed_out", + message: errorMessage, + }, + }, + ]) + .orTee((error) => { + logger.error("Failed to append timed out deployment event to event log", { error }); + }); + await PerformDeploymentAlertsService.enqueue(deployment.id); } diff --git a/apps/webapp/package.json b/apps/webapp/package.json index 5daffe8960..94b127e663 100644 --- a/apps/webapp/package.json +++ b/apps/webapp/package.json @@ -30,8 +30,12 @@ "@ariakit/react": "^0.4.6", "@ariakit/react-core": "^0.4.6", "@aws-sdk/client-ecr": "^3.931.0", + "@aws-sdk/client-s3": "^3.936.0", "@aws-sdk/client-sqs": "^3.445.0", "@aws-sdk/client-sts": "^3.840.0", + "@aws-sdk/credential-provider-node": "^3.936.0", + "@aws-sdk/s3-presigned-post": "^3.936.0", + "@aws-sdk/s3-request-presigner": "^3.936.0", "@better-auth/utils": "^0.2.6", "@codemirror/autocomplete": "^6.3.1", "@codemirror/commands": "^6.1.2", @@ -114,7 +118,7 @@ "@trigger.dev/core": "workspace:*", "@trigger.dev/database": "workspace:*", "@trigger.dev/otlp-importer": "workspace:*", - "@trigger.dev/platform": "1.0.20", + "@trigger.dev/platform": "1.0.21", "@trigger.dev/redis-worker": "workspace:*", "@trigger.dev/sdk": "workspace:*", "@types/pg": "8.6.6", diff --git a/internal-packages/database/prisma/schema.prisma b/internal-packages/database/prisma/schema.prisma index eae19bc42b..140da0d710 100644 --- a/internal-packages/database/prisma/schema.prisma +++ b/internal-packages/database/prisma/schema.prisma @@ -1748,7 +1748,7 @@ model WorkerDeployment { imageReference String? imagePlatform String @default("linux/amd64") - externalBuildData Json? + externalBuildData Json? status WorkerDeploymentStatus @default(PENDING) type WorkerDeploymentType @default(V1) diff --git a/packages/cli-v3/package.json b/packages/cli-v3/package.json index c14d284d0e..a4b9af11d5 100644 --- a/packages/cli-v3/package.json +++ b/packages/cli-v3/package.json @@ -95,6 +95,7 @@ "@trigger.dev/build": "workspace:4.1.2", "@trigger.dev/core": "workspace:4.1.2", "@trigger.dev/schema-to-json": "workspace:4.1.2", + "@s2-dev/streamstore": "^0.17.6", "ansi-escapes": "^7.0.0", "braces": "^3.0.3", "c12": "^1.11.1", @@ -112,6 +113,7 @@ "git-last-commit": "^1.0.1", "gradient-string": "^2.0.2", "has-flag": "^5.0.1", + "ignore": "^7.0.5", "import-in-the-middle": "1.11.0", "import-meta-resolve": "^4.1.0", "ini": "^5.0.0", @@ -135,6 +137,7 @@ "std-env": "^3.7.0", "strip-ansi": "^7.1.0", "supports-color": "^10.0.0", + "tar": "^7.4.3", "tiny-invariant": "^1.2.0", "tinyexec": "^0.3.1", "tinyglobby": "^0.2.10", diff --git a/packages/cli-v3/src/apiClient.ts b/packages/cli-v3/src/apiClient.ts index 4a2f6232c0..e099260203 100644 --- a/packages/cli-v3/src/apiClient.ts +++ b/packages/cli-v3/src/apiClient.ts @@ -1,5 +1,7 @@ import { CreateAuthorizationCodeResponseSchema, + CreateArtifactRequestBody, + CreateArtifactResponseBody, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, DevConfigResponseBody, @@ -360,6 +362,18 @@ export class CliApiClient { ); } + async createArtifact(body: CreateArtifactRequestBody) { + if (!this.accessToken) { + throw new Error("createArtifact: No access token"); + } + + return wrapZodFetch(CreateArtifactResponseBody, `${this.apiURL}/api/v1/artifacts`, { + method: "POST", + headers: this.getHeaders(), + body: JSON.stringify(body), + }); + } + async initializeDeployment(body: InitializeDeploymentRequestBody) { if (!this.accessToken) { throw new Error("initializeDeployment: No access token"); diff --git a/packages/cli-v3/src/build/buildWorker.ts b/packages/cli-v3/src/build/buildWorker.ts index 168fb31e86..6e818a0b1e 100644 --- a/packages/cli-v3/src/build/buildWorker.ts +++ b/packages/cli-v3/src/build/buildWorker.ts @@ -18,6 +18,7 @@ import { isWindows } from "std-env"; import { pathToFileURL } from "node:url"; import { logger } from "../utilities/logger.js"; import { SdkVersionExtractor } from "./plugins.js"; +import { spinner } from "../utilities/windows.js"; export type BuildWorkerEventListener = { onBundleStart?: () => void; @@ -34,6 +35,7 @@ export type BuildWorkerOptions = { envVars?: Record; rewritePaths?: boolean; forcedExternals?: string[]; + plain?: boolean; }; export async function buildWorker(options: BuildWorkerOptions) { @@ -48,7 +50,21 @@ export async function buildWorker(options: BuildWorkerOptions) { resolvedConfig, options.forcedExternals ); - const buildContext = createBuildContext(options.target, resolvedConfig); + const buildContext = createBuildContext(options.target, resolvedConfig, { + logger: options.plain + ? { + debug: (...args) => console.log(...args), + log: (...args) => console.log(...args), + warn: (...args) => console.log(...args), + progress: (message) => console.log(message), + spinner: (message) => { + const $spinner = spinner({ plain: true }); + $spinner.start(message); + return $spinner; + }, + } + : undefined, + }); buildContext.prependExtension(externalsExtension); await notifyExtensionOnBuildStart(buildContext); const pluginsFromExtensions = resolvePluginsForContext(buildContext); diff --git a/packages/cli-v3/src/build/extensions.ts b/packages/cli-v3/src/build/extensions.ts index 7114da03e3..e38fe903d8 100644 --- a/packages/cli-v3/src/build/extensions.ts +++ b/packages/cli-v3/src/build/extensions.ts @@ -1,4 +1,5 @@ import { + type BuildLogger, BuildContext, BuildExtension, BuildLayer, @@ -9,7 +10,8 @@ import { BuildManifest, BuildTarget } from "@trigger.dev/core/v3/schemas"; import * as esbuild from "esbuild"; import { logger } from "../utilities/logger.js"; import { resolveModule } from "./resolveModule.js"; -import { log, spinner } from "@clack/prompts"; +import { log } from "@clack/prompts"; +import { spinner } from "../utilities/windows.js"; export interface InternalBuildContext extends BuildContext { getLayers(): BuildLayer[]; @@ -54,12 +56,25 @@ export async function notifyExtensionOnBuildComplete( export function createBuildContext( target: BuildTarget, - config: ResolvedConfig + config: ResolvedConfig, + options?: { logger?: BuildLogger } ): InternalBuildContext { const layers: BuildLayer[] = []; const registeredPlugins: RegisteredPlugin[] = []; const extensions: BuildExtension[] = config.build.extensions ?? []; + const buildLogger = options?.logger ?? { + debug: (...args) => logger.debug(...args), + log: (...args) => logger.log(...args), + warn: (...args) => logger.warn(...args), + progress: (message) => log.message(message), + spinner: (message) => { + const $spinner = spinner(); + $spinner.start(message); + return $spinner; + }, + }; + return { target, config: config, @@ -99,17 +114,7 @@ export function createBuildContext( prependExtension(extension) { extensions.unshift(extension); }, - logger: { - debug: (...args) => logger.debug(...args), - log: (...args) => logger.log(...args), - warn: (...args) => logger.warn(...args), - progress: (message) => log.message(message), - spinner: (message) => { - const $spinner = spinner(); - $spinner.start(message); - return $spinner; - }, - }, + logger: buildLogger, }; } diff --git a/packages/cli-v3/src/cli/common.ts b/packages/cli-v3/src/cli/common.ts index f1508c47b9..f251e4e5ef 100644 --- a/packages/cli-v3/src/cli/common.ts +++ b/packages/cli-v3/src/cli/common.ts @@ -69,6 +69,7 @@ export async function wrapCommandAction( // do nothing } else if (e instanceof OutroCommandError) { outro(e.message ?? "Operation cancelled"); + process.exit(1); } else if (e instanceof SkipCommandError) { // do nothing } else if (e instanceof BundleError) { diff --git a/packages/cli-v3/src/commands/deploy.ts b/packages/cli-v3/src/commands/deploy.ts index 40e5f9b774..0a18e3ea70 100644 --- a/packages/cli-v3/src/commands/deploy.ts +++ b/packages/cli-v3/src/commands/deploy.ts @@ -3,19 +3,27 @@ import { getBranch, prepareDeploymentError, tryCatch } from "@trigger.dev/core/v import { InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, + GitMeta, + DeploymentFinalizedEvent, + DeploymentEventFromString, } from "@trigger.dev/core/v3/schemas"; import { Command, Option as CommandOption } from "commander"; -import { resolve } from "node:path"; +import { join, relative, resolve } from "node:path"; import { isCI } from "std-env"; import { x } from "tinyexec"; import { z } from "zod"; +import chalk from "chalk"; import { CliApiClient } from "../apiClient.js"; import { buildWorker } from "../build/buildWorker.js"; import { resolveAlwaysExternal } from "../build/externals.js"; +import { createContextArchive, getArchiveSize } from "../deploy/archiveContext.js"; +import { S2 } from "@s2-dev/streamstore"; +import { mkdir, readFile, unlink } from "node:fs/promises"; import { CommonCommandOptions, commonOptions, handleTelemetry, + OutroCommandError, SkipLoggingError, wrapCommandAction, } from "../cli/common.js"; @@ -30,6 +38,8 @@ import { } from "../deploy/logs.js"; import { chalkError, + chalkGrey, + chalkWarning, cliLink, isLinksSupported, prettyError, @@ -64,10 +74,14 @@ const DeployCommandOptions = CommonCommandOptions.extend({ envFile: z.string().optional(), // Local build options forceLocalBuild: z.boolean().optional(), + localBuild: z.boolean().optional(), useRegistryCache: z.boolean().default(false), network: z.enum(["default", "none", "host"]).optional(), push: z.boolean().optional(), builder: z.string().default("trigger"), + nativeBuildServer: z.boolean().default(false), + detach: z.boolean().default(false), + plain: z.boolean().default(false), }); type DeployCommandOptions = z.infer; @@ -143,7 +157,12 @@ export function configureDeployCommand(program: Command) { ).hideHelp() ) // Local build options - .addOption(new CommandOption("--force-local-build", "Force a local build of the image")) + .addOption( + new CommandOption("--force-local-build", "Deprecated alias for --local-build").implies({ + localBuild: true, + }) + ) + .addOption(new CommandOption("--local-build", "Build the deployment image locally")) .addOption(new CommandOption("--push", "Push the image after local builds").hideHelp()) .addOption( new CommandOption("--no-push", "Do not push the image after local builds").hideHelp() @@ -160,6 +179,19 @@ export function configureDeployCommand(program: Command) { "The builder to use when building locally" ).hideHelp() ) + .addOption( + new CommandOption( + "--native-build-server", + "Use the native build server for building the image" + ) + ) + .addOption( + new CommandOption( + "--detach", + "Return immediately after the deployment is queued, do not wait for the build to complete. Implies using the native build server." + ).implies({ nativeBuildServer: true }) + ) + .addOption(new CommandOption("--plain", "Plain output").hideHelp()) .action(async (path, options) => { await handleTelemetry(async () => { await printStandloneInitialBanner(true, options.profile); @@ -176,7 +208,9 @@ export async function deployCommand(dir: string, options: unknown) { } async function _deployCommand(dir: string, options: DeployCommandOptions) { - intro(`Deploying project${options.skipPromotion ? " (without promotion)" : ""}`); + if (!options.plain) { + intro(`Deploying project${options.skipPromotion ? " (without promotion)" : ""}`); + } if (!options.skipUpdateCheck) { await updateTriggerPackages(dir, { ...options }, true, true); @@ -191,6 +225,7 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { embedded: true, defaultApiUrl: options.apiUrl, profile: options.profile, + silent: options.plain, }); if (!authorization.ok) { @@ -280,12 +315,24 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { throw new Error("Failed to get project client"); } + if (options.nativeBuildServer) { + await handleNativeBuildServerDeploy({ + apiClient: projectClient.client, + config: resolvedConfig, + dashboardUrl: authorization.dashboardUrl, + options, + userId: authorization.auth.tokenType === "personal" ? authorization.userId : undefined, + gitMeta, + }); + return; + } + const serverEnvVars = await projectClient.client.getEnvironmentVariables(resolvedConfig.project); loadDotEnvVars(resolvedConfig.workingDir, options.envFile); const destination = getTmpDir(resolvedConfig.workingDir, "build", options.dryRun); - const $buildSpinner = spinner(); + const $buildSpinner = spinner({ plain: options.plain }); const forcedExternals = await resolveAlwaysExternal(projectClient.client); @@ -301,13 +348,13 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { rewritePaths: true, envVars: serverEnvVars.success ? serverEnvVars.data.variables : {}, forcedExternals, + plain: options.plain, listener: { onBundleStart() { $buildSpinner.start("Building trigger code"); }, onBundleComplete(result) { $buildSpinner.stop("Successfully built code"); - logger.debug("Bundle result", result); }, }, @@ -334,12 +381,13 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { gitMeta, type: features.run_engine_v2 ? "MANAGED" : "V1", runtime: buildManifest.runtime, + isNativeBuild: false, }, envVars.TRIGGER_EXISTING_DEPLOYMENT_ID ); - const isLocalBuild = options.forceLocalBuild || !deployment.externalBuildData; + const isLocalBuild = options.localBuild || !deployment.externalBuildData; // Would be best to actually store this separately in the deployment object. This is an okay proxy for now. - const remoteBuildExplicitlySkipped = options.forceLocalBuild && !!deployment.externalBuildData; + const remoteBuildExplicitlySkipped = options.localBuild && !!deployment.externalBuildData; // Fail fast if we know local builds will fail if (isLocalBuild) { @@ -366,7 +414,7 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { const vars = numberOfEnvVars === 1 ? "var" : "vars"; if (!options.skipSyncEnvVars) { - const $spinner = spinner(); + const $spinner = spinner({ plain: options.plain }); $spinner.start(`Syncing ${numberOfEnvVars} env ${vars} with the server`); const uploadResult = await syncEnvVarsWithServer( @@ -408,14 +456,16 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { const deploymentLink = cliLink("View deployment", rawDeploymentLink); const testLink = cliLink("Test tasks", rawTestLink); - const $spinner = spinner(); + const $spinner = spinner({ plain: options.plain }); const buildSuffix = - isLocalBuild && !process.env.TRIGGER_LOCAL_BUILD_LABEL_DISABLED ? " (local)" : ""; + isLocalBuild && process.env.TRIGGER_LOCAL_BUILD_LABEL_DISABLED !== "1" ? " (local)" : ""; const deploySuffix = - isLocalBuild && !process.env.TRIGGER_LOCAL_BUILD_LABEL_DISABLED ? " (local build)" : ""; + isLocalBuild && process.env.TRIGGER_LOCAL_BUILD_LABEL_DISABLED !== "1" ? " (local build)" : ""; - if (isCI) { + if (options.plain) { + $spinner.start(`Building version ${version}${buildSuffix}`); + } else if (isCI) { log.step(`Building version ${version}\n`); } else { if (isLinksSupported) { @@ -448,7 +498,7 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { compilationPath: destination.path, buildEnvVars: buildManifest.build.env, onLog: (logMessage) => { - if (isCI) { + if (options.plain || isCI) { console.log(logMessage); return; } @@ -472,7 +522,8 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { const warnings = checkLogsForWarnings(buildResult.logs); - const canShowLocalBuildHint = !isLocalBuild && !process.env.TRIGGER_LOCAL_BUILD_HINT_DISABLED; + const canShowLocalBuildHint = + !isLocalBuild && process.env.TRIGGER_LOCAL_BUILD_HINT_DISABLED !== "1"; const buildFailed = !warnings.ok || !buildResult.ok; if (buildFailed && canShowLocalBuildHint) { @@ -545,7 +596,9 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { throw new SkipLoggingError(errorData?.message ?? "Failed to get deployment with worker"); } - if (isCI) { + if (options.plain) { + $spinner.message(`Deploying version ${version}${deploySuffix}`); + } else if (isCI) { log.step(`Deploying version ${version}${deploySuffix}\n`); } else { if (isLinksSupported) { @@ -563,7 +616,7 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { skipPushToRegistry: remoteBuildExplicitlySkipped, }, (logMessage) => { - if (isCI) { + if (options.plain || isCI) { console.log(logMessage); return; } @@ -590,7 +643,9 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { throw new SkipLoggingError("Failed to finalize deployment"); } - if (isCI) { + if (options.plain) { + console.log(`Successfully deployed version ${version}${deploySuffix}`); + } else if (isCI) { log.step(`Successfully deployed version ${version}${deploySuffix}`); } else { $spinner.stop(`Successfully deployed version ${version}${deploySuffix}`); @@ -598,18 +653,29 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { const taskCount = deploymentWithWorker.worker?.tasks.length ?? 0; - outro( - `Version ${version} deployed with ${taskCount} detected task${taskCount === 1 ? "" : "s"} ${ - isLinksSupported ? `| ${deploymentLink} | ${testLink}` : "" - }` - ); + if (options.plain) { + console.log( + `Version ${version} deployed with ${taskCount} detected task${taskCount === 1 ? "" : "s"}` + ); + + if (process.env.TRIGGER_DEPLOYMENT_LINK_OUTPUT_DISABLED !== "1") { + console.log(`Deployment: ${rawDeploymentLink}`); + console.log(`Test: ${rawTestLink}`); + } + } else { + outro( + `Version ${version} deployed with ${taskCount} detected task${taskCount === 1 ? "" : "s"} ${ + isLinksSupported ? `| ${deploymentLink} | ${testLink}` : "" + }` + ); - if (!isLinksSupported) { - console.log("View deployment"); - console.log(rawDeploymentLink); - console.log(); // new line - console.log("Test tasks"); - console.log(rawTestLink); + if (!isLinksSupported) { + console.log("View deployment"); + console.log(rawDeploymentLink); + console.log(); // new line + console.log("Test tasks"); + console.log(rawTestLink); + } } if (options.saveLogs) { @@ -827,6 +893,410 @@ async function initializeOrAttachDeployment( return newDeploymentOrError.data; } +async function handleNativeBuildServerDeploy({ + apiClient, + options, + config, + dashboardUrl, + userId, + gitMeta, +}: { + apiClient: CliApiClient; + config: Awaited>; + dashboardUrl: string; + options: DeployCommandOptions; + userId?: string; + gitMeta?: GitMeta; +}) { + const tmpDir = join(config.workingDir, ".trigger", "tmp"); + await mkdir(tmpDir, { recursive: true }); + + const archivePath = join(tmpDir, `deploy-${Date.now()}.tar.gz`); + + const $deploymentSpinner = spinner(); + $deploymentSpinner.start("Preparing deployment files"); + + await createContextArchive(config.workspaceDir, archivePath); + + const archiveSize = await getArchiveSize(archivePath); + const sizeMB = (archiveSize / 1024 / 1024).toFixed(2); + $deploymentSpinner.message(`Deployment files ready (${sizeMB} MB)`); + + const artifactResult = await apiClient.createArtifact({ + type: "deployment_context", + contentType: "application/gzip", + contentLength: archiveSize, + }); + + if (!artifactResult.success) { + $deploymentSpinner.stop("Failed to upload deployment files"); + throw new Error(`Failed to create deployment artifact: ${artifactResult.error}`); + } + + const { artifactKey, uploadUrl, uploadFields } = artifactResult.data; + + logger.debug("Artifact created", { artifactKey }); + + $deploymentSpinner.message("Uploading deployment files"); + + const [readError, fileBuffer] = await tryCatch(readFile(archivePath)); + + if (readError) { + $deploymentSpinner.stop("Failed to read deployment archive"); + throw new Error(`Failed to read archive: ${readError.message}`); + } + + const formData = new FormData(); + + for (const [key, value] of Object.entries(uploadFields)) { + formData.append(key, value); + } + + const blob = new Blob([new Uint8Array(fileBuffer)], { type: "application/gzip" }); + formData.append("file", blob, "deployment.tar.gz"); + + const [uploadError, uploadResponse] = await tryCatch( + fetch(uploadUrl, { + method: "POST", + body: formData, + }) + ); + + if (uploadError || !uploadResponse?.ok) { + $deploymentSpinner.stop("Failed to upload deployment files"); + throw new Error( + `Failed to upload archive: ${uploadError?.message} ${uploadResponse?.status} ${uploadResponse?.statusText}` + ); + } + + const [unlinkError] = await tryCatch(unlink(archivePath)); + if (unlinkError) { + logger.debug("Failed to delete deployment artifact file", { archivePath, error: unlinkError }); + } + + $deploymentSpinner.message("Deployment files uploaded"); + + const configFilePath = + config.configFile !== undefined + ? relative(config.workspaceDir, config.configFile).replace(/\\/g, "/") + : undefined; + + const initializeDeploymentResult = await apiClient.initializeDeployment({ + contentHash: "-", + userId, + gitMeta, + type: config.features.run_engine_v2 ? "MANAGED" : "V1", + runtime: config.runtime, + isNativeBuild: true, + artifactKey, + skipPromotion: options.skipPromotion, + configFilePath, + }); + + if (!initializeDeploymentResult.success) { + $deploymentSpinner.stop("Failed to initialize deployment"); + log.error(chalk.bold(chalkError(initializeDeploymentResult.error))); + throw new OutroCommandError(`Deployment failed`); + } + + const deployment = initializeDeploymentResult.data; + + const rawDeploymentLink = `${dashboardUrl}/projects/v3/${config.project}/deployments/${deployment.shortCode}`; + const rawTestLink = `${dashboardUrl}/projects/v3/${config.project}/test?environment=${ + options.env === "prod" ? "prod" : "stg" + }`; + + const exposedDeploymentLink = isLinksSupported + ? cliLink(chalk.bold(rawDeploymentLink), rawDeploymentLink) + : chalk.bold(rawDeploymentLink); + $deploymentSpinner.stop("Deployment initialized"); + log.info(`View deployment: ${exposedDeploymentLink}`); + + setGithubActionsOutputAndEnvVars({ + envVars: { + TRIGGER_DEPLOYMENT_VERSION: deployment.version, + TRIGGER_VERSION: deployment.version, + TRIGGER_DEPLOYMENT_SHORT_CODE: deployment.shortCode, + TRIGGER_DEPLOYMENT_URL: rawDeploymentLink, + TRIGGER_TEST_URL: rawTestLink, + }, + outputs: { + deploymentVersion: deployment.version, + workerVersion: deployment.version, + deploymentShortCode: deployment.shortCode, + deploymentUrl: rawDeploymentLink, + testUrl: rawTestLink, + needsPromotion: options.skipPromotion ? "true" : "false", + }, + }); + + if (options.detach) { + outro(`Version ${deployment.version} is being deployed`); + return; + } + + const { eventStream } = deployment; + + if (!eventStream) { + log.warn(`Failed streaming build logs, open the deployment in the dashboard to view the logs`); + + outro(`Version ${deployment.version} is being deployed`); + + return process.exit(0); + } + + const $queuedSpinner = spinner(); + $queuedSpinner.start("Build queued"); + + const abortController = new AbortController(); + + const s2 = new S2({ accessToken: eventStream.s2.accessToken }); + const basin = s2.basin(eventStream.s2.basin); + const stream = basin.stream(eventStream.s2.stream); + + const [readSessionError, readSession] = await tryCatch( + stream.readSession( + { + seq_num: 0, + wait: 60 * 20, // 20 minutes + as: "bytes", + }, + { signal: abortController.signal } + ) + ); + + if (readSessionError) { + $queuedSpinner.stop("Failed to query build progress"); + log.warn(`Failed streaming build logs, open the deployment in the dashboard to view the logs`); + + outro( + `Version ${deployment.version} is being deployed ${ + isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : "" + }` + ); + + return process.exit(0); + } + + const decoder = new TextDecoder(); + let finalDeploymentEvent: DeploymentFinalizedEvent["data"] | undefined; + let queuedSpinnerStopped = false; + + for await (const record of readSession) { + const decoded = decoder.decode(record.body); + const result = DeploymentEventFromString.safeParse(decoded); + if (!result.success) { + logger.debug("Failed to parse deployment event, skipping", { + error: result.error, + record: decoded, + }); + continue; + } + + const event = result.data; + + switch (event.type) { + case "log": { + if (record.seq_num === 0) { + $queuedSpinner.stop("Build started"); + console.log("│"); + queuedSpinnerStopped = true; + } + + const formattedTimestamp = chalkGrey( + new Date(record.timestamp).toLocaleTimeString("en-US", { + hour12: false, + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + fractionalSecondDigits: 3, + }) + ); + + const { level, message } = event.data; + const formattedMessage = + level === "error" + ? chalk.bold(chalkError(message)) + : level === "warn" + ? chalkWarning(message) + : level === "debug" + ? chalkGrey(message) + : message; + + // We use console.log here instead of clack's logger as the current version does not support changing the line spacing. + // And the logs look verbose with the default spacing. + // We cannot upgrade because the newer versions introduced some weird issues with the spinner. + // Ideally, we'd use clack's `taskLog` to only show the recent n lines of logs as they are streamed, but that also seems brittle + // and has some issues with cursor movements/clearing lines that it shouldn't clear. + // We can revisit this on future versions of `@clack/prompts`. + console.log(`│ ${formattedTimestamp} ${formattedMessage}`); + break; + } + case "finalized": { + finalDeploymentEvent = event.data; + abortController.abort(); // stop the stream + break; + } + default: { + event satisfies never; + logger.debug("Unknown deployment event, skipping", { event }); + continue; + } + } + } + + if (!queuedSpinnerStopped && !finalDeploymentEvent) { + // unlikely that it happens in practice, only in rare corner cases + // the timeout would kick in earlier if the build server fails to dequeue the build + + $queuedSpinner.stop("Log stream stopped"); + + log.error("Failed dequeueing build, please try again shortly"); + + throw new OutroCommandError( + `Version ${deployment.version} ${ + isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : "" + }` + ); + } + + if (!finalDeploymentEvent) { + log.error( + "Stopped receiving updates from the build server, please check the deployment status in the dashboard" + ); + + if (!isLinksSupported) { + log.info(`View deployment: ${rawDeploymentLink}`); + } + + throw new OutroCommandError( + `Version ${deployment.version} ${ + isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : "" + }` + ); + } + + switch (finalDeploymentEvent.result) { + case "succeeded": { + queuedSpinnerStopped + ? log.success("Deployment completed successfully") + : $queuedSpinner.stop("Deployment completed successfully"); + + if (finalDeploymentEvent.message) { + log.success(finalDeploymentEvent.message); + } + + if (options.skipPromotion) { + log.info( + `This deployment was not automatically promoted. You can promote in the dashboard or via the promote command, e.g, \`npx trigger.dev promote ${deployment.version}\`.` + ); + } + + if (!isLinksSupported) { + log.info(`Test tasks: ${rawTestLink}`); + } + + outro( + `Version ${deployment.version} was deployed ${ + isLinksSupported + ? `| ${cliLink("Test tasks", rawTestLink)} | ${cliLink( + "View deployment", + rawDeploymentLink + )}` + : "" + }` + ); + return process.exit(0); + } + case "failed": { + if (!queuedSpinnerStopped) { + $queuedSpinner.stop("Deployment failed"); + } + + log.error( + chalk.bold( + chalkError( + "Deployment failed" + + (finalDeploymentEvent.message ? `: ${finalDeploymentEvent.message}` : "") + ) + ) + ); + + throw new OutroCommandError( + `Version ${deployment.version} deployment failed ${ + isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : "" + }` + ); + } + case "timed_out": { + if (!queuedSpinnerStopped) { + $queuedSpinner.stop("Deployment timed out"); + } + + log.error( + chalk.bold( + chalkError( + "Deployment timed out" + + (finalDeploymentEvent.message ? `: ${finalDeploymentEvent.message}` : "") + ) + ) + ); + + throw new OutroCommandError( + `Version ${deployment.version} deployment timed out ${ + isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : "" + }` + ); + } + case "canceled": { + if (!queuedSpinnerStopped) { + $queuedSpinner.stop("Deployment was canceled"); + } + + log.error( + chalk.bold( + chalkError( + "Deployment was canceled" + + (finalDeploymentEvent.message ? `: ${finalDeploymentEvent.message}` : "") + ) + ) + ); + + throw new OutroCommandError( + `Version ${deployment.version} deployment canceled ${ + isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : "" + }` + ); + } + default: { + // This case is only relevant in case we extend the enum in the future. + // New enum values will not be treated as errors in older cli versions. + queuedSpinnerStopped + ? log.success("Log stream finished") + : $queuedSpinner.stop("Log stream finished"); + if (finalDeploymentEvent.message) { + log.message(finalDeploymentEvent.message); + } + + if (!isLinksSupported) { + log.info(`Test tasks: ${rawTestLink}`); + } + + outro( + `Version ${deployment.version} ${ + isLinksSupported + ? `| ${cliLink("Test tasks", rawTestLink)} | ${cliLink( + "View deployment", + rawDeploymentLink + )}` + : "" + }` + ); + return process.exit(0); + } + } +} + export function verifyDirectory(dir: string, projectPath: string) { if (dir !== "." && !isDirectory(projectPath)) { if (dir === "staging" || dir === "prod" || dir === "preview") { diff --git a/packages/cli-v3/src/commands/workers/build.ts b/packages/cli-v3/src/commands/workers/build.ts index d1ccbb8c79..59aa8e020a 100644 --- a/packages/cli-v3/src/commands/workers/build.ts +++ b/packages/cli-v3/src/commands/workers/build.ts @@ -239,6 +239,7 @@ async function _workerBuildCommand(dir: string, options: WorkersBuildCommandOpti userId: authorization.userId, selfHosted: options.local, type: "UNMANAGED", + isNativeBuild: false, }); if (!deploymentResponse.success) { diff --git a/packages/cli-v3/src/deploy/archiveContext.ts b/packages/cli-v3/src/deploy/archiveContext.ts new file mode 100644 index 0000000000..d0000d22f9 --- /dev/null +++ b/packages/cli-v3/src/deploy/archiveContext.ts @@ -0,0 +1,154 @@ +import { existsSync } from "node:fs"; +import { readFile } from "node:fs/promises"; +import { join } from "node:path"; +import { glob } from "tinyglobby"; +import * as tar from "tar"; +import ignore from "ignore"; +import { tryCatch } from "@trigger.dev/core/v3"; +import { logger } from "../utilities/logger.js"; + +const DEFAULT_IGNORES = [ + ".git/**", + "node_modules/**", + "**/.DS_Store", + "**/.git", + "**/node_modules", + "**/*.log", + "**/npm-debug.log*", + "**/yarn-debug.log*", + "**/yarn-error.log*", + "**/.npm", + "**/.eslintcache", + "**/.node_repl_history", + "**/.yarn-integrity", + "**/coverage", + "**/.nyc_output", + "**/.cache", + "**/.parcel-cache", + "**/.next", + "**/.nuxt", + "**/dist", + "**/.turbo", + "**/.vercel", + "**/out", + "**/.temp", + "**/.tmp", + "**/.trigger", + "**/.env", + "**/.env.local", + "**/Thumbs.db", + "**/.idea", + "**/.vscode", + "**/.output", + "**/.yarn", + "**/build", + "**/__pycache__", + "**/*.pyc", + "**/.venv", + "**/venv", +]; + +async function getGitignoreContent(gitignorePath: string): Promise { + if (!existsSync(gitignorePath)) { + return ""; + } + + const [error, content] = await tryCatch(readFile(gitignorePath, "utf-8")); + + if (error) { + throw new Error(`Failed to read .gitignore at ${gitignorePath}: ${error.message}`); + } + + return content; +} + +function gitignoreToGlobs(content: string): string[] { + if (content.includes("!")) { + return []; + } + + return content + .split("\n") + .map((line) => line.trim()) + .filter((line) => line && !line.startsWith("#")) + .map((pattern) => { + if (pattern.endsWith("/")) { + const isAnchored = pattern.startsWith("/"); + const cleanPattern = pattern.replace(/^\//, ""); + + if (isAnchored) { + return `${cleanPattern}**`; + } + return `**/${cleanPattern}**`; + } + + // For files, we only pass exact root matches or simple patterns to help with root clutter + // complex wildcards are hard to map perfectly to fast-glob ignores without risk + return pattern; + }); +} + +export async function createContextArchive(workspaceDir: string, outputPath: string) { + logger.debug("Creating context archive", { workspaceDir, outputPath }); + + // read .gitignore if it exists + const gitignorePath = join(workspaceDir, ".gitignore"); + const gitignoreContent = await getGitignoreContent(gitignorePath); + + const ig = ignore(); + ig.add(DEFAULT_IGNORES); + if (gitignoreContent) { + ig.add(gitignoreContent); + } + + // performance optimization + const gitignoreGlobs = gitignoreToGlobs(gitignoreContent); + const globIgnorePatterns = [...DEFAULT_IGNORES, ...gitignoreGlobs]; + + logger.debug("Ignore patterns for glob", { count: globIgnorePatterns.length }); + + // find all files to include in the archive + const startTime = Date.now(); + const allFiles = await glob(["**/*"], { + cwd: workspaceDir, + ignore: globIgnorePatterns, + dot: true, + absolute: false, + onlyFiles: true, + followSymbolicLinks: false, // don't follow symlinks to avoid infinite loops or outside access + }); + + // filter using ignore package for correctness + const files = allFiles.filter((file) => !ig.ignores(file)); + + const scanDuration = Date.now() - startTime; + + logger.debug("Files to archive", { + count: files.length, + scanDurationMs: scanDuration, + ignoredCount: allFiles.length - files.length, + }); + + if (files.length === 0) { + throw new Error("No files found to archive. Check your .gitignore settings."); + } + + await tar.create( + { + gzip: true, + file: outputPath, + cwd: workspaceDir, + portable: true, + preservePaths: false, + mtime: new Date(0), + }, + files + ); + + logger.debug("Archive created", { outputPath, fileCount: files.length }); +} + +export async function getArchiveSize(archivePath: string): Promise { + const { statSync } = await import("node:fs"); + return statSync(archivePath).size; +} diff --git a/packages/cli-v3/src/deploy/buildImage.ts b/packages/cli-v3/src/deploy/buildImage.ts index 6f044c8a7d..91fbfced88 100644 --- a/packages/cli-v3/src/deploy/buildImage.ts +++ b/packages/cli-v3/src/deploy/buildImage.ts @@ -484,7 +484,7 @@ async function localBuildImage(options: SelfHostedBuildImageOptions): Promise ({ }, }); +const plainSpinner = () => ({ + start: (msg?: string): void => { + console.log(msg ?? ""); + }, + stop: (msg?: string, code?: number): void => { + if (msg) console.log(msg ?? ""); + }, + message: (msg?: string): void => { + if (msg) console.log(msg ?? ""); + }, +}); + // This will become unecessary with the next clack release, the bug was fixed here: // https://github.com/natemoo-re/clack/pull/182 -export const spinner = () => (isWindows ? ballmerSpinner() : wrappedClackSpinner()); +export const spinner = (options: { plain?: boolean } = { plain: false }) => + options.plain ? plainSpinner() : isWindows ? ballmerSpinner() : wrappedClackSpinner(); diff --git a/packages/core/src/v3/schemas/api.ts b/packages/core/src/v3/schemas/api.ts index 34e272276f..7b328e6125 100644 --- a/packages/core/src/v3/schemas/api.ts +++ b/packages/core/src/v3/schemas/api.ts @@ -414,6 +414,23 @@ export const UpsertBranchResponseBody = z.object({ export type UpsertBranchResponseBody = z.infer; +export const CreateArtifactRequestBody = z.object({ + type: z.enum(["deployment_context"]).default("deployment_context"), + contentType: z.string().default("application/gzip"), + contentLength: z.number().optional(), +}); + +export type CreateArtifactRequestBody = z.infer; + +export const CreateArtifactResponseBody = z.object({ + artifactKey: z.string(), + uploadUrl: z.string(), + uploadFields: z.record(z.string()), + expiresAt: z.string().datetime(), +}); + +export type CreateArtifactResponseBody = z.infer; + export const InitializeDeploymentResponseBody = z.object({ id: z.string(), contentHash: z.string(), @@ -422,20 +439,52 @@ export const InitializeDeploymentResponseBody = z.object({ imageTag: z.string(), imagePlatform: z.string(), externalBuildData: ExternalBuildData.optional().nullable(), + eventStream: z + .object({ + s2: z.object({ + basin: z.string(), + stream: z.string(), + accessToken: z.string(), + }), + }) + .optional(), }); export type InitializeDeploymentResponseBody = z.infer; -export const InitializeDeploymentRequestBody = z.object({ - contentHash: z.string(), - userId: z.string().optional(), - /** @deprecated This is now determined by the webapp. This is only used to warn users with old CLI versions. */ - selfHosted: z.boolean().optional(), - gitMeta: GitMeta.optional(), - type: z.enum(["MANAGED", "UNMANAGED", "V1"]).optional(), - runtime: z.string().optional(), - initialStatus: z.enum(["PENDING", "BUILDING"]).optional(), -}); +export const InitializeDeploymentRequestBody = z + .object({ + contentHash: z.string(), + userId: z.string().optional(), + /** @deprecated This is now determined by the webapp. This is only used to warn users with old CLI versions. */ + selfHosted: z.boolean().optional(), + gitMeta: GitMeta.optional(), + type: z.enum(["MANAGED", "UNMANAGED", "V1"]).optional(), + runtime: z.string().optional(), + initialStatus: z.enum(["PENDING", "BUILDING"]).optional(), + }) + .and( + z.preprocess( + (val) => { + const obj = val as any; + if (!obj || !obj.isNativeBuild) { + return { ...obj, isNativeBuild: false }; + } + return obj; + }, + z.discriminatedUnion("isNativeBuild", [ + z.object({ + isNativeBuild: z.literal(true), + skipPromotion: z.boolean(), + artifactKey: z.string(), + configFilePath: z.string().optional(), + }), + z.object({ + isNativeBuild: z.literal(false), + }), + ]) + ) + ); export type InitializeDeploymentRequestBody = z.infer; @@ -530,6 +579,45 @@ export const GetLatestDeploymentResponseBody = GetDeploymentResponseBody.omit({ }); export type GetLatestDeploymentResponseBody = z.infer; +export const DeploymentLogEvent = z.object({ + type: z.literal("log"), + data: z.object({ + level: z.enum(["debug", "info", "warn", "error"]).optional().default("info"), + message: z.string(), + }), +}); + +const anyString = z.custom((v) => typeof v === "string"); + +export const DeploymentFinalizedEvent = z.object({ + type: z.literal("finalized"), + data: z.object({ + result: z.enum(["succeeded", "failed", "timed_out", "canceled"]).or(anyString), + message: z.string().optional(), + }), +}); + +export const DeploymentEvent = z.discriminatedUnion("type", [ + DeploymentLogEvent, + DeploymentFinalizedEvent, +]); + +export type DeploymentEvent = z.infer; +export type DeploymentLogEvent = z.infer; +export type DeploymentFinalizedEvent = z.infer; + +export const DeploymentEventFromString = z + .string() + .transform((s, ctx) => { + try { + return JSON.parse(s); + } catch { + ctx.addIssue({ code: z.ZodIssueCode.custom, message: "Invalid JSON" }); + return z.NEVER; + } + }) + .pipe(DeploymentEvent); + export const CreateUploadPayloadUrlResponseBody = z.object({ presignedUrl: z.string(), }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0eec817879..1bd65bbb4f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -212,12 +212,24 @@ importers: '@aws-sdk/client-ecr': specifier: ^3.931.0 version: 3.931.0 + '@aws-sdk/client-s3': + specifier: ^3.936.0 + version: 3.940.0 '@aws-sdk/client-sqs': specifier: ^3.445.0 version: 3.454.0 '@aws-sdk/client-sts': specifier: ^3.840.0 version: 3.840.0 + '@aws-sdk/credential-provider-node': + specifier: ^3.936.0 + version: 3.940.0 + '@aws-sdk/s3-presigned-post': + specifier: ^3.936.0 + version: 3.940.0 + '@aws-sdk/s3-request-presigner': + specifier: ^3.936.0 + version: 3.940.0 '@better-auth/utils': specifier: ^0.2.6 version: 0.2.6 @@ -465,8 +477,8 @@ importers: specifier: workspace:* version: link:../../internal-packages/otlp-importer '@trigger.dev/platform': - specifier: 1.0.20 - version: 1.0.20 + specifier: 1.0.21 + version: 1.0.21 '@trigger.dev/redis-worker': specifier: workspace:* version: link:../../packages/redis-worker @@ -1353,6 +1365,9 @@ importers: '@opentelemetry/semantic-conventions': specifier: 1.36.0 version: 1.36.0 + '@s2-dev/streamstore': + specifier: ^0.17.6 + version: 0.17.6 '@trigger.dev/build': specifier: workspace:4.1.2 version: link:../build @@ -1413,6 +1428,9 @@ importers: has-flag: specifier: ^5.0.1 version: 5.0.1 + ignore: + specifier: ^7.0.5 + version: 7.0.5 import-in-the-middle: specifier: 1.11.0 version: 1.11.0 @@ -1482,6 +1500,9 @@ importers: supports-color: specifier: ^10.0.0 version: 10.0.0 + tar: + specifier: ^7.4.3 + version: 7.4.3 tiny-invariant: specifier: ^1.2.0 version: 1.3.1 @@ -2949,9 +2970,19 @@ packages: '@aws-crypto/crc32@3.0.0': resolution: {integrity: sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==} + '@aws-crypto/crc32@5.2.0': + resolution: {integrity: sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==} + engines: {node: '>=16.0.0'} + + '@aws-crypto/crc32c@5.2.0': + resolution: {integrity: sha512-+iWb8qaHLYKrNvGRbiYRHSdKRWhto5XlZUEBwDjYNf+ly5SVYG6zEoYIdxvf5R3zyeP16w4PLBn3rH1xc74Rag==} + '@aws-crypto/ie11-detection@3.0.0': resolution: {integrity: sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==} + '@aws-crypto/sha1-browser@5.2.0': + resolution: {integrity: sha512-OH6lveCFfcDjX4dbAvCFSYUjJZjDr/3XJ3xHtjn3Oj5b9RjojQo8npoLeA/bNwkOkrSQ0wgrHzXk4tDRxGKJeg==} + '@aws-crypto/sha256-browser@3.0.0': resolution: {integrity: sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==} @@ -2985,6 +3016,10 @@ packages: resolution: {integrity: sha512-HdW3pO3wVHSfd4G9h1E9AQ1h5H4EUunh/YvrGGswv2LCN9KwlksLhWKIvvA7Ppezj6JNtKAEaBQh+aTpS46xPA==} engines: {node: '>=18.0.0'} + '@aws-sdk/client-s3@3.940.0': + resolution: {integrity: sha512-Wi4qnBT6shRRMXuuTgjMFTU5mu2KFWisgcigEMPptjPGUtJvBVi4PTGgS64qsLoUk/obqDAyOBOfEtRZ2ddC2w==} + engines: {node: '>=18.0.0'} + '@aws-sdk/client-sesv2@3.940.0': resolution: {integrity: sha512-jDQ4x2HwB2/UXBS7CTeSDiIb+sVsYGDyxTeXdrRAtqNdGv8kC54fbwokDiJ/mnMyB2gyXWw57BqeDJNkZuLmsw==} engines: {node: '>=18.0.0'} @@ -3181,6 +3216,18 @@ packages: resolution: {integrity: sha512-9QLTIkDJHHaYL0nyymO41H8g3ui1yz6Y3GmAN1gYQa6plXisuFBnGAbmKVj7zNvjWaOKdF0dV3dd3AFKEDoJ/w==} engines: {node: '>=18.0.0'} + '@aws-sdk/middleware-bucket-endpoint@3.936.0': + resolution: {integrity: sha512-XLSVVfAorUxZh6dzF+HTOp4R1B5EQcdpGcPliWr0KUj2jukgjZEcqbBmjyMF/p9bmyQsONX80iURF1HLAlW0qg==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/middleware-expect-continue@3.936.0': + resolution: {integrity: sha512-Eb4ELAC23bEQLJmUMYnPWcjD3FZIsmz2svDiXEcxRkQU9r7NRID7pM7C5NPH94wOfiCk0b2Y8rVyFXW0lGQwbA==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/middleware-flexible-checksums@3.940.0': + resolution: {integrity: sha512-WdsxDAVj5qaa5ApAP+JbpCOMHFGSmzjs2Y2OBSbWPeR9Ew7t/Okj+kUub94QJPsgzhvU1/cqNejhsw5VxeFKSQ==} + engines: {node: '>=18.0.0'} + '@aws-sdk/middleware-host-header@3.451.0': resolution: {integrity: sha512-j8a5jAfhWmsK99i2k8oR8zzQgXrsJtgrLxc3js6U+525mcZytoiDndkWTmD5fjJ1byU1U2E5TaPq+QJeDip05Q==} engines: {node: '>=14.0.0'} @@ -3201,6 +3248,10 @@ packages: resolution: {integrity: sha512-tAaObaAnsP1XnLGndfkGWFuzrJYuk9W0b/nLvol66t8FZExIAf/WdkT2NNAWOYxljVs++oHnyHBCxIlaHrzSiw==} engines: {node: '>=18.0.0'} + '@aws-sdk/middleware-location-constraint@3.936.0': + resolution: {integrity: sha512-SCMPenDtQMd9o5da9JzkHz838w3327iqXk3cbNnXWqnNRx6unyW8FL0DZ84gIY12kAyVHz5WEqlWuekc15ehfw==} + engines: {node: '>=18.0.0'} + '@aws-sdk/middleware-logger@3.451.0': resolution: {integrity: sha512-0kHrYEyVeB2QBfP6TfbI240aRtatLZtcErJbhpiNUb+CQPgEL3crIjgVE8yYiJumZ7f0jyjo8HLPkwD1/2APaw==} engines: {node: '>=14.0.0'} @@ -3257,6 +3308,10 @@ packages: resolution: {integrity: sha512-s5ZlcIoLNg1Huj4Qp06iKniE8nJt/Pj1B/fjhWc6cCPCM7XJYUCejCnRh6C5ZJoBEYodjuwZBejPc1Wh3j+znA==} engines: {node: '>=14.0.0'} + '@aws-sdk/middleware-ssec@3.936.0': + resolution: {integrity: sha512-/GLC9lZdVp05ozRik5KsuODR/N7j+W+2TbfdFL3iS+7un+gnP6hC8RDOZd6WhpZp7drXQ9guKiTAxkZQwzS8DA==} + engines: {node: '>=18.0.0'} + '@aws-sdk/middleware-user-agent@3.451.0': resolution: {integrity: sha512-8NM/0JiKLNvT9wtAQVl1DFW0cEO7OvZyLSUBLNLTHqyvOZxKaZ8YFk7d8PL6l76LeUKRxq4NMxfZQlUIRe0eSA==} engines: {node: '>=14.0.0'} @@ -3313,6 +3368,14 @@ packages: resolution: {integrity: sha512-wOKhzzWsshXGduxO4pqSiNyL9oUtk4BEvjWm9aaq6Hmfdoydq6v6t0rAGHWPjFwy9z2haovGRi3C8IxdMB4muw==} engines: {node: '>=18.0.0'} + '@aws-sdk/s3-presigned-post@3.940.0': + resolution: {integrity: sha512-ue4MmUl9JvNmqe3kHAT0YlGHqHZ2ZB5Fog8JFu0TLZjMzxE5JfGWFJFLLntahe6OVulKD7KwwnpTjJlUnn3DtQ==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/s3-request-presigner@3.940.0': + resolution: {integrity: sha512-TgTUDM2H7revReDfkVwVtIqxV3K0cJLdyuLDIkefVHRUNKwU1Vd5FB2TaFrs6STO0kx5pTckDCOLh0iy7nW5WQ==} + engines: {node: '>=18.0.0'} + '@aws-sdk/signature-v4-multi-region@3.940.0': resolution: {integrity: sha512-ugHZEoktD/bG6mdgmhzLDjMP2VrYRAUPRPF1DpCyiZexkH7DCU7XrSJyXMvkcf0DHV+URk0q2sLf/oqn1D2uYw==} engines: {node: '>=18.0.0'} @@ -3381,6 +3444,10 @@ packages: resolution: {integrity: sha512-0Zx3Ntdpu+z9Wlm7JKUBOzS9EunwKAb4KdGUQQxDqh5Lc3ta5uBoub+FgmVuzwnmBu9U1Os8UuwVTH0Lgu+P5w==} engines: {node: '>=18.0.0'} + '@aws-sdk/util-format-url@3.936.0': + resolution: {integrity: sha512-MS5eSEtDUFIAMHrJaMERiHAvDPdfxc/T869ZjDNFAIiZhyc037REw0aoTNeimNXDNy2txRNZJaAUn/kE4RwN+g==} + engines: {node: '>=18.0.0'} + '@aws-sdk/util-locate-window@3.310.0': resolution: {integrity: sha512-qo2t/vBTnoXpjKxlsC2e1gBrRm80M3bId27r0BRB2VniSSe7bL1mmzM+/HFtujm0iAxtPM+aLEflLJlJeDPg0w==} engines: {node: '>=14.0.0'} @@ -9051,6 +9118,9 @@ packages: peerDependencies: typescript: ^5.9.3 + '@s2-dev/streamstore@0.17.6': + resolution: {integrity: sha512-ocjZfKaPKmo2yhudM58zVNHv3rBLSbTKkabVoLFn9nAxU6iLrR2CO3QmSo7/waohI3EZHAWxF/Pw8kA8d6QH2g==} + '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} @@ -9240,6 +9310,14 @@ packages: resolution: {integrity: sha512-j7HwVkBw68YW8UmFRcjZOmssE77Rvk0GWAIN1oFBhsaovQmZWYCIcGa9/pwRB0ExI8Sk9MWNALTjftjHZea7VA==} engines: {node: '>=18.0.0'} + '@smithy/chunked-blob-reader-native@4.2.1': + resolution: {integrity: sha512-lX9Ay+6LisTfpLid2zZtIhSEjHMZoAR5hHCR4H7tBz/Zkfr5ea8RcQ7Tk4mi0P76p4cN+Btz16Ffno7YHpKXnQ==} + engines: {node: '>=18.0.0'} + + '@smithy/chunked-blob-reader@5.2.0': + resolution: {integrity: sha512-WmU0TnhEAJLWvfSeMxBNe5xtbselEO8+4wG0NtZeL8oR21WgH1xiO37El+/Y+H/Ie4SCwBy3MxYWmOYaGgZueA==} + engines: {node: '>=18.0.0'} + '@smithy/config-resolver@2.0.19': resolution: {integrity: sha512-JsghnQ5zjWmjEVY8TFOulLdEOCj09SjRLugrHlkPZTIBBm7PQitCFVLThbsKPZQOP7N3ME1DU1nKUc1UaVnBog==} engines: {node: '>=14.0.0'} @@ -9279,6 +9357,26 @@ packages: '@smithy/eventstream-codec@2.0.14': resolution: {integrity: sha512-g/OU/MeWGfHDygoXgMWfG/Xb0QqDnAGcM9t2FRrVAhleXYRddGOEnfanR5cmHgB9ue52MJsyorqFjckzXsylaA==} + '@smithy/eventstream-codec@4.2.5': + resolution: {integrity: sha512-Ogt4Zi9hEbIP17oQMd68qYOHUzmH47UkK7q7Gl55iIm9oKt27MUGrC5JfpMroeHjdkOliOA4Qt3NQ1xMq/nrlA==} + engines: {node: '>=18.0.0'} + + '@smithy/eventstream-serde-browser@4.2.5': + resolution: {integrity: sha512-HohfmCQZjppVnKX2PnXlf47CW3j92Ki6T/vkAT2DhBR47e89pen3s4fIa7otGTtrVxmj7q+IhH0RnC5kpR8wtw==} + engines: {node: '>=18.0.0'} + + '@smithy/eventstream-serde-config-resolver@4.3.5': + resolution: {integrity: sha512-ibjQjM7wEXtECiT6my1xfiMH9IcEczMOS6xiCQXoUIYSj5b1CpBbJ3VYbdwDy8Vcg5JHN7eFpOCGk8nyZAltNQ==} + engines: {node: '>=18.0.0'} + + '@smithy/eventstream-serde-node@4.2.5': + resolution: {integrity: sha512-+elOuaYx6F2H6x1/5BQP5ugv12nfJl66GhxON8+dWVUEDJ9jah/A0tayVdkLRP0AeSac0inYkDz5qBFKfVp2Gg==} + engines: {node: '>=18.0.0'} + + '@smithy/eventstream-serde-universal@4.2.5': + resolution: {integrity: sha512-G9WSqbST45bmIFaeNuP/EnC19Rhp54CcVdX9PDL1zyEB514WsDVXhlyihKlGXnRycmHNmVv88Bvvt4EYxWef/Q==} + engines: {node: '>=18.0.0'} + '@smithy/fetch-http-handler@2.2.7': resolution: {integrity: sha512-iSDBjxuH9TgrtMYAr7j5evjvkvgwLY3y+9D547uep+JNkZ1ZT+BaeU20j6I/bO/i26ilCWFImrlXTPsfQtZdIQ==} @@ -9290,6 +9388,10 @@ packages: resolution: {integrity: sha512-3+RG3EA6BBJ/ofZUeTFJA7mHfSYrZtQIrDP9dI8Lf7X6Jbos2jptuLrAAteDiFVrmbEmLSuRG/bUKzfAXk7dhg==} engines: {node: '>=18.0.0'} + '@smithy/hash-blob-browser@4.2.6': + resolution: {integrity: sha512-8P//tA8DVPk+3XURk2rwcKgYwFvwGwmJH/wJqQiSKwXZtf/LiZK+hbUZmPj/9KzM+OVSwe4o85KTp5x9DUZTjw==} + engines: {node: '>=18.0.0'} + '@smithy/hash-node@2.0.16': resolution: {integrity: sha512-Wbi9A0PacMYUOwjAulQP90Wl3mQ6NDwnyrZQzFjDz+UzjXOSyQMgBrTkUBz+pVoYVlX3DUu24gWMZBcit+wOGg==} engines: {node: '>=14.0.0'} @@ -9302,6 +9404,10 @@ packages: resolution: {integrity: sha512-DpYX914YOfA3UDT9CN1BM787PcHfWRBB43fFGCYrZFUH0Jv+5t8yYl+Pd5PW4+QzoGEDvn5d5QIO4j2HyYZQSA==} engines: {node: '>=18.0.0'} + '@smithy/hash-stream-node@4.2.5': + resolution: {integrity: sha512-6+do24VnEyvWcGdHXomlpd0m8bfZePpUKBy7m311n+JuRwug8J4dCanJdTymx//8mi0nlkflZBvJe+dEO/O12Q==} + engines: {node: '>=18.0.0'} + '@smithy/invalid-dependency@2.0.14': resolution: {integrity: sha512-d8ohpwZo9RzTpGlAfsWtfm1SHBSU7+N4iuZ6MzR10xDTujJJWtmXYHK1uzcr7rggbpUTaWyHpPFgnf91q0EFqQ==} @@ -9313,18 +9419,10 @@ packages: resolution: {integrity: sha512-2L2erASEro1WC5nV+plwIMxrTXpvpfzl4e+Nre6vBVRR2HKeGGcvpJyyL3/PpiSg+cJG2KpTmZmq934Olb6e5A==} engines: {node: '>=18.0.0'} - '@smithy/is-array-buffer@2.0.0': - resolution: {integrity: sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==} - engines: {node: '>=14.0.0'} - '@smithy/is-array-buffer@2.2.0': resolution: {integrity: sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==} engines: {node: '>=14.0.0'} - '@smithy/is-array-buffer@4.0.0': - resolution: {integrity: sha512-saYhF8ZZNoJDTvJBEWgeBccCg+yvp1CX+ed12yORU3NilJScfc6gfch2oVb4QgxZrGUx3/ZJlb+c/dJbyupxlw==} - engines: {node: '>=18.0.0'} - '@smithy/is-array-buffer@4.2.0': resolution: {integrity: sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==} engines: {node: '>=18.0.0'} @@ -9332,6 +9430,10 @@ packages: '@smithy/md5-js@2.0.16': resolution: {integrity: sha512-YhWt9aKl+EMSNXyUTUo7I01WHf3HcCkPu/Hl2QmTNwrHT49eWaY7hptAMaERZuHFH0V5xHgPKgKZo2I93DFtgQ==} + '@smithy/md5-js@4.2.5': + resolution: {integrity: sha512-Bt6jpSTMWfjCtC0s79gZ/WZ1w90grfmopVOWqkI2ovhjpD5Q2XRXuecIPB9689L2+cCySMbaXDhBPU56FKNDNg==} + engines: {node: '>=18.0.0'} + '@smithy/middleware-content-length@2.0.16': resolution: {integrity: sha512-9ddDia3pp1d3XzLXKcm7QebGxLq9iwKf+J1LapvlSOhpF8EM9SjMeSrMOOFgG+2TfW5K3+qz4IAJYYm7INYCng==} engines: {node: '>=14.0.0'} @@ -9662,10 +9764,6 @@ packages: resolution: {integrity: sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==} engines: {node: '>=14.0.0'} - '@smithy/util-hex-encoding@4.0.0': - resolution: {integrity: sha512-Yk5mLhHtfIgW2W2WQZWSg5kuMZCVbvhFmC7rV4IO2QqnZdbEFPmQnCcGMAX2z/8Qj3B9hYYNjZOhWym+RwhePw==} - engines: {node: '>=18.0.0'} - '@smithy/util-hex-encoding@4.2.0': resolution: {integrity: sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw==} engines: {node: '>=18.0.0'} @@ -10098,8 +10196,8 @@ packages: react: ^18.2.0 react-dom: 18.2.0 - '@trigger.dev/platform@1.0.20': - resolution: {integrity: sha512-KyFAJFuUFxsRo/tQ+N4R1yQutdZ7DBIyjzqgNKjee2hjvozu7jZmXkFPaqVDvmUCqeK7UvfBCvjO3gUV+mNGag==} + '@trigger.dev/platform@1.0.21': + resolution: {integrity: sha512-D1p+Y5pj21Un8hhN7oS/X7c+mhHKL58w1nwI9XYxbKUK1cNIIVhEMNZ0IyYmYuLelSARUXYePlKSl0v4hlusZg==} '@types/acorn@4.0.6': resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} @@ -14155,6 +14253,10 @@ packages: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} + ignore@7.0.5: + resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} + engines: {node: '>= 4'} + import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -20036,20 +20138,41 @@ snapshots: '@aws-crypto/crc32@3.0.0': dependencies: '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.451.0 + '@aws-sdk/types': 3.936.0 tslib: 1.14.1 + '@aws-crypto/crc32@5.2.0': + dependencies: + '@aws-crypto/util': 5.2.0 + '@aws-sdk/types': 3.936.0 + tslib: 2.8.1 + + '@aws-crypto/crc32c@5.2.0': + dependencies: + '@aws-crypto/util': 5.2.0 + '@aws-sdk/types': 3.936.0 + tslib: 2.8.1 + '@aws-crypto/ie11-detection@3.0.0': dependencies: tslib: 1.14.1 + '@aws-crypto/sha1-browser@5.2.0': + dependencies: + '@aws-crypto/supports-web-crypto': 5.2.0 + '@aws-crypto/util': 5.2.0 + '@aws-sdk/types': 3.936.0 + '@aws-sdk/util-locate-window': 3.893.0 + '@smithy/util-utf8': 2.3.0 + tslib: 2.8.1 + '@aws-crypto/sha256-browser@3.0.0': dependencies: '@aws-crypto/ie11-detection': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 '@aws-crypto/supports-web-crypto': 3.0.0 '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.451.0 + '@aws-sdk/types': 3.936.0 '@aws-sdk/util-locate-window': 3.310.0 '@aws-sdk/util-utf8-browser': 3.259.0 tslib: 1.14.1 @@ -20067,7 +20190,7 @@ snapshots: '@aws-crypto/sha256-js@3.0.0': dependencies: '@aws-crypto/util': 3.0.0 - '@aws-sdk/types': 3.451.0 + '@aws-sdk/types': 3.936.0 tslib: 1.14.1 '@aws-crypto/sha256-js@5.2.0': @@ -20086,13 +20209,13 @@ snapshots: '@aws-crypto/util@3.0.0': dependencies: - '@aws-sdk/types': 3.451.0 + '@aws-sdk/types': 3.936.0 '@aws-sdk/util-utf8-browser': 3.259.0 tslib: 1.14.1 '@aws-crypto/util@5.2.0': dependencies: - '@aws-sdk/types': 3.930.0 + '@aws-sdk/types': 3.936.0 '@smithy/util-utf8': 2.3.0 tslib: 2.8.1 @@ -20186,6 +20309,66 @@ snapshots: transitivePeerDependencies: - aws-crt + '@aws-sdk/client-s3@3.940.0': + dependencies: + '@aws-crypto/sha1-browser': 5.2.0 + '@aws-crypto/sha256-browser': 5.2.0 + '@aws-crypto/sha256-js': 5.2.0 + '@aws-sdk/core': 3.940.0 + '@aws-sdk/credential-provider-node': 3.940.0 + '@aws-sdk/middleware-bucket-endpoint': 3.936.0 + '@aws-sdk/middleware-expect-continue': 3.936.0 + '@aws-sdk/middleware-flexible-checksums': 3.940.0 + '@aws-sdk/middleware-host-header': 3.936.0 + '@aws-sdk/middleware-location-constraint': 3.936.0 + '@aws-sdk/middleware-logger': 3.936.0 + '@aws-sdk/middleware-recursion-detection': 3.936.0 + '@aws-sdk/middleware-sdk-s3': 3.940.0 + '@aws-sdk/middleware-ssec': 3.936.0 + '@aws-sdk/middleware-user-agent': 3.940.0 + '@aws-sdk/region-config-resolver': 3.936.0 + '@aws-sdk/signature-v4-multi-region': 3.940.0 + '@aws-sdk/types': 3.936.0 + '@aws-sdk/util-endpoints': 3.936.0 + '@aws-sdk/util-user-agent-browser': 3.936.0 + '@aws-sdk/util-user-agent-node': 3.940.0 + '@smithy/config-resolver': 4.4.3 + '@smithy/core': 3.18.5 + '@smithy/eventstream-serde-browser': 4.2.5 + '@smithy/eventstream-serde-config-resolver': 4.3.5 + '@smithy/eventstream-serde-node': 4.2.5 + '@smithy/fetch-http-handler': 5.3.6 + '@smithy/hash-blob-browser': 4.2.6 + '@smithy/hash-node': 4.2.5 + '@smithy/hash-stream-node': 4.2.5 + '@smithy/invalid-dependency': 4.2.5 + '@smithy/md5-js': 4.2.5 + '@smithy/middleware-content-length': 4.2.5 + '@smithy/middleware-endpoint': 4.3.12 + '@smithy/middleware-retry': 4.4.12 + '@smithy/middleware-serde': 4.2.6 + '@smithy/middleware-stack': 4.2.5 + '@smithy/node-config-provider': 4.3.5 + '@smithy/node-http-handler': 4.4.5 + '@smithy/protocol-http': 5.3.5 + '@smithy/smithy-client': 4.9.8 + '@smithy/types': 4.9.0 + '@smithy/url-parser': 4.2.5 + '@smithy/util-base64': 4.3.0 + '@smithy/util-body-length-browser': 4.2.0 + '@smithy/util-body-length-node': 4.2.1 + '@smithy/util-defaults-mode-browser': 4.3.11 + '@smithy/util-defaults-mode-node': 4.2.14 + '@smithy/util-endpoints': 3.2.5 + '@smithy/util-middleware': 4.2.5 + '@smithy/util-retry': 4.2.5 + '@smithy/util-stream': 4.5.6 + '@smithy/util-utf8': 4.2.0 + '@smithy/util-waiter': 4.2.5 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + '@aws-sdk/client-sesv2@3.940.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 @@ -20313,7 +20496,7 @@ snapshots: '@smithy/util-defaults-mode-node': 2.0.26 '@smithy/util-endpoints': 1.0.5 '@smithy/util-retry': 2.0.7 - '@smithy/util-utf8': 2.0.2 + '@smithy/util-utf8': 2.3.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -20332,113 +20515,27 @@ snapshots: '@aws-sdk/util-endpoints': 3.828.0 '@aws-sdk/util-user-agent-browser': 3.821.0 '@aws-sdk/util-user-agent-node': 3.839.0 - '@smithy/config-resolver': 4.1.4 - '@smithy/core': 3.6.0 - '@smithy/fetch-http-handler': 5.0.4 - '@smithy/hash-node': 4.0.4 - '@smithy/invalid-dependency': 4.0.4 - '@smithy/middleware-content-length': 4.0.4 - '@smithy/middleware-endpoint': 4.1.13 - '@smithy/middleware-retry': 4.1.14 - '@smithy/middleware-serde': 4.0.8 - '@smithy/middleware-stack': 4.0.4 - '@smithy/node-config-provider': 4.1.3 - '@smithy/node-http-handler': 4.0.6 - '@smithy/protocol-http': 5.1.2 - '@smithy/smithy-client': 4.4.5 - '@smithy/types': 4.3.1 - '@smithy/url-parser': 4.0.4 - '@smithy/util-base64': 4.0.0 - '@smithy/util-body-length-browser': 4.0.0 - '@smithy/util-body-length-node': 4.0.0 - '@smithy/util-defaults-mode-browser': 4.0.21 - '@smithy/util-defaults-mode-node': 4.0.21 - '@smithy/util-endpoints': 3.0.6 - '@smithy/util-middleware': 4.0.4 - '@smithy/util-retry': 4.0.6 - '@smithy/util-utf8': 4.0.0 - tslib: 2.8.1 - transitivePeerDependencies: - - aws-crt - - '@aws-sdk/client-sso@3.840.0': - dependencies: - '@aws-crypto/sha256-browser': 5.2.0 - '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/core': 3.840.0 - '@aws-sdk/middleware-host-header': 3.840.0 - '@aws-sdk/middleware-logger': 3.840.0 - '@aws-sdk/middleware-recursion-detection': 3.840.0 - '@aws-sdk/middleware-user-agent': 3.840.0 - '@aws-sdk/region-config-resolver': 3.840.0 - '@aws-sdk/types': 3.840.0 - '@aws-sdk/util-endpoints': 3.840.0 - '@aws-sdk/util-user-agent-browser': 3.840.0 - '@aws-sdk/util-user-agent-node': 3.840.0 - '@smithy/config-resolver': 4.1.4 - '@smithy/core': 3.6.0 - '@smithy/fetch-http-handler': 5.0.4 - '@smithy/hash-node': 4.0.4 - '@smithy/invalid-dependency': 4.0.4 - '@smithy/middleware-content-length': 4.0.4 - '@smithy/middleware-endpoint': 4.1.13 - '@smithy/middleware-retry': 4.1.14 - '@smithy/middleware-serde': 4.0.8 - '@smithy/middleware-stack': 4.0.4 - '@smithy/node-config-provider': 4.1.3 - '@smithy/node-http-handler': 4.0.6 - '@smithy/protocol-http': 5.1.2 - '@smithy/smithy-client': 4.4.5 - '@smithy/types': 4.3.1 - '@smithy/url-parser': 4.0.4 - '@smithy/util-base64': 4.0.0 - '@smithy/util-body-length-browser': 4.0.0 - '@smithy/util-body-length-node': 4.0.0 - '@smithy/util-defaults-mode-browser': 4.0.21 - '@smithy/util-defaults-mode-node': 4.0.21 - '@smithy/util-endpoints': 3.0.6 - '@smithy/util-middleware': 4.0.4 - '@smithy/util-retry': 4.0.6 - '@smithy/util-utf8': 4.0.0 - tslib: 2.8.1 - transitivePeerDependencies: - - aws-crt - - '@aws-sdk/client-sso@3.931.0': - dependencies: - '@aws-crypto/sha256-browser': 5.2.0 - '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/core': 3.931.0 - '@aws-sdk/middleware-host-header': 3.930.0 - '@aws-sdk/middleware-logger': 3.930.0 - '@aws-sdk/middleware-recursion-detection': 3.930.0 - '@aws-sdk/middleware-user-agent': 3.931.0 - '@aws-sdk/region-config-resolver': 3.930.0 - '@aws-sdk/types': 3.930.0 - '@aws-sdk/util-endpoints': 3.930.0 - '@aws-sdk/util-user-agent-browser': 3.930.0 - '@aws-sdk/util-user-agent-node': 3.931.0 '@smithy/config-resolver': 4.4.3 - '@smithy/core': 3.18.3 + '@smithy/core': 3.18.5 '@smithy/fetch-http-handler': 5.3.6 '@smithy/hash-node': 4.2.5 '@smithy/invalid-dependency': 4.2.5 '@smithy/middleware-content-length': 4.2.5 - '@smithy/middleware-endpoint': 4.3.10 - '@smithy/middleware-retry': 4.4.10 - '@smithy/middleware-serde': 4.2.5 + '@smithy/middleware-endpoint': 4.3.12 + '@smithy/middleware-retry': 4.4.12 + '@smithy/middleware-serde': 4.2.6 '@smithy/middleware-stack': 4.2.5 '@smithy/node-config-provider': 4.3.5 '@smithy/node-http-handler': 4.4.5 '@smithy/protocol-http': 5.3.5 - '@smithy/smithy-client': 4.9.6 + '@smithy/smithy-client': 4.9.8 '@smithy/types': 4.9.0 '@smithy/url-parser': 4.2.5 '@smithy/util-base64': 4.3.0 '@smithy/util-body-length-browser': 4.2.0 '@smithy/util-body-length-node': 4.2.1 - '@smithy/util-defaults-mode-browser': 4.3.9 - '@smithy/util-defaults-mode-node': 4.2.12 + '@smithy/util-defaults-mode-browser': 4.3.11 + '@smithy/util-defaults-mode-node': 4.2.14 '@smithy/util-endpoints': 3.2.5 '@smithy/util-middleware': 4.2.5 '@smithy/util-retry': 4.2.5 @@ -20447,20 +20544,106 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sso@3.940.0': + '@aws-sdk/client-sso@3.840.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/core': 3.940.0 - '@aws-sdk/middleware-host-header': 3.936.0 - '@aws-sdk/middleware-logger': 3.936.0 - '@aws-sdk/middleware-recursion-detection': 3.936.0 - '@aws-sdk/middleware-user-agent': 3.940.0 - '@aws-sdk/region-config-resolver': 3.936.0 - '@aws-sdk/types': 3.936.0 - '@aws-sdk/util-endpoints': 3.936.0 - '@aws-sdk/util-user-agent-browser': 3.936.0 - '@aws-sdk/util-user-agent-node': 3.940.0 + '@aws-sdk/core': 3.840.0 + '@aws-sdk/middleware-host-header': 3.840.0 + '@aws-sdk/middleware-logger': 3.840.0 + '@aws-sdk/middleware-recursion-detection': 3.840.0 + '@aws-sdk/middleware-user-agent': 3.840.0 + '@aws-sdk/region-config-resolver': 3.840.0 + '@aws-sdk/types': 3.840.0 + '@aws-sdk/util-endpoints': 3.840.0 + '@aws-sdk/util-user-agent-browser': 3.840.0 + '@aws-sdk/util-user-agent-node': 3.840.0 + '@smithy/config-resolver': 4.4.3 + '@smithy/core': 3.18.5 + '@smithy/fetch-http-handler': 5.3.6 + '@smithy/hash-node': 4.2.5 + '@smithy/invalid-dependency': 4.2.5 + '@smithy/middleware-content-length': 4.2.5 + '@smithy/middleware-endpoint': 4.3.12 + '@smithy/middleware-retry': 4.4.12 + '@smithy/middleware-serde': 4.2.6 + '@smithy/middleware-stack': 4.2.5 + '@smithy/node-config-provider': 4.3.5 + '@smithy/node-http-handler': 4.4.5 + '@smithy/protocol-http': 5.3.5 + '@smithy/smithy-client': 4.9.8 + '@smithy/types': 4.9.0 + '@smithy/url-parser': 4.2.5 + '@smithy/util-base64': 4.3.0 + '@smithy/util-body-length-browser': 4.2.0 + '@smithy/util-body-length-node': 4.2.1 + '@smithy/util-defaults-mode-browser': 4.3.11 + '@smithy/util-defaults-mode-node': 4.2.14 + '@smithy/util-endpoints': 3.2.5 + '@smithy/util-middleware': 4.2.5 + '@smithy/util-retry': 4.2.5 + '@smithy/util-utf8': 4.2.0 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + + '@aws-sdk/client-sso@3.931.0': + dependencies: + '@aws-crypto/sha256-browser': 5.2.0 + '@aws-crypto/sha256-js': 5.2.0 + '@aws-sdk/core': 3.931.0 + '@aws-sdk/middleware-host-header': 3.930.0 + '@aws-sdk/middleware-logger': 3.930.0 + '@aws-sdk/middleware-recursion-detection': 3.930.0 + '@aws-sdk/middleware-user-agent': 3.931.0 + '@aws-sdk/region-config-resolver': 3.930.0 + '@aws-sdk/types': 3.930.0 + '@aws-sdk/util-endpoints': 3.930.0 + '@aws-sdk/util-user-agent-browser': 3.930.0 + '@aws-sdk/util-user-agent-node': 3.931.0 + '@smithy/config-resolver': 4.4.3 + '@smithy/core': 3.18.5 + '@smithy/fetch-http-handler': 5.3.6 + '@smithy/hash-node': 4.2.5 + '@smithy/invalid-dependency': 4.2.5 + '@smithy/middleware-content-length': 4.2.5 + '@smithy/middleware-endpoint': 4.3.12 + '@smithy/middleware-retry': 4.4.12 + '@smithy/middleware-serde': 4.2.6 + '@smithy/middleware-stack': 4.2.5 + '@smithy/node-config-provider': 4.3.5 + '@smithy/node-http-handler': 4.4.5 + '@smithy/protocol-http': 5.3.5 + '@smithy/smithy-client': 4.9.8 + '@smithy/types': 4.9.0 + '@smithy/url-parser': 4.2.5 + '@smithy/util-base64': 4.3.0 + '@smithy/util-body-length-browser': 4.2.0 + '@smithy/util-body-length-node': 4.2.1 + '@smithy/util-defaults-mode-browser': 4.3.11 + '@smithy/util-defaults-mode-node': 4.2.14 + '@smithy/util-endpoints': 3.2.5 + '@smithy/util-middleware': 4.2.5 + '@smithy/util-retry': 4.2.5 + '@smithy/util-utf8': 4.2.0 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + + '@aws-sdk/client-sso@3.940.0': + dependencies: + '@aws-crypto/sha256-browser': 5.2.0 + '@aws-crypto/sha256-js': 5.2.0 + '@aws-sdk/core': 3.940.0 + '@aws-sdk/middleware-host-header': 3.936.0 + '@aws-sdk/middleware-logger': 3.936.0 + '@aws-sdk/middleware-recursion-detection': 3.936.0 + '@aws-sdk/middleware-user-agent': 3.940.0 + '@aws-sdk/region-config-resolver': 3.936.0 + '@aws-sdk/types': 3.936.0 + '@aws-sdk/util-endpoints': 3.936.0 + '@aws-sdk/util-user-agent-browser': 3.936.0 + '@aws-sdk/util-user-agent-node': 3.940.0 '@smithy/config-resolver': 4.4.3 '@smithy/core': 3.18.5 '@smithy/fetch-http-handler': 5.3.6 @@ -20529,9 +20712,9 @@ snapshots: '@smithy/util-defaults-mode-node': 2.0.26 '@smithy/util-endpoints': 1.0.5 '@smithy/util-retry': 2.0.7 - '@smithy/util-utf8': 2.0.2 + '@smithy/util-utf8': 2.3.0 fast-xml-parser: 4.2.5 - tslib: 2.6.2 + tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -20582,7 +20765,7 @@ snapshots: '@aws-sdk/core@3.451.0': dependencies: '@smithy/smithy-client': 2.1.16 - tslib: 2.6.2 + tslib: 2.8.1 '@aws-sdk/core@3.839.0': dependencies: @@ -20606,17 +20789,17 @@ snapshots: dependencies: '@aws-sdk/types': 3.840.0 '@aws-sdk/xml-builder': 3.821.0 - '@smithy/core': 3.6.0 - '@smithy/node-config-provider': 4.1.3 - '@smithy/property-provider': 4.0.4 - '@smithy/protocol-http': 5.1.2 - '@smithy/signature-v4': 5.1.2 - '@smithy/smithy-client': 4.4.5 - '@smithy/types': 4.3.1 - '@smithy/util-base64': 4.0.0 - '@smithy/util-body-length-browser': 4.0.0 - '@smithy/util-middleware': 4.0.4 - '@smithy/util-utf8': 4.0.0 + '@smithy/core': 3.18.5 + '@smithy/node-config-provider': 4.3.5 + '@smithy/property-provider': 4.2.5 + '@smithy/protocol-http': 5.3.5 + '@smithy/signature-v4': 5.3.5 + '@smithy/smithy-client': 4.9.8 + '@smithy/types': 4.9.0 + '@smithy/util-base64': 4.3.0 + '@smithy/util-body-length-browser': 4.2.0 + '@smithy/util-middleware': 4.2.5 + '@smithy/util-utf8': 4.2.0 fast-xml-parser: 4.4.1 tslib: 2.8.1 @@ -20624,12 +20807,12 @@ snapshots: dependencies: '@aws-sdk/types': 3.930.0 '@aws-sdk/xml-builder': 3.930.0 - '@smithy/core': 3.18.3 + '@smithy/core': 3.18.5 '@smithy/node-config-provider': 4.3.5 '@smithy/property-provider': 4.2.5 '@smithy/protocol-http': 5.3.5 '@smithy/signature-v4': 5.3.5 - '@smithy/smithy-client': 4.9.6 + '@smithy/smithy-client': 4.9.8 '@smithy/types': 4.9.0 '@smithy/util-base64': 4.3.0 '@smithy/util-middleware': 4.2.5 @@ -20663,16 +20846,16 @@ snapshots: dependencies: '@aws-sdk/core': 3.839.0 '@aws-sdk/types': 3.821.0 - '@smithy/property-provider': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/property-provider': 4.2.5 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@aws-sdk/credential-provider-env@3.840.0': dependencies: '@aws-sdk/core': 3.840.0 '@aws-sdk/types': 3.840.0 - '@smithy/property-provider': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/property-provider': 4.2.5 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@aws-sdk/credential-provider-env@3.931.0': @@ -20695,26 +20878,26 @@ snapshots: dependencies: '@aws-sdk/core': 3.839.0 '@aws-sdk/types': 3.821.0 - '@smithy/fetch-http-handler': 5.0.4 - '@smithy/node-http-handler': 4.0.6 - '@smithy/property-provider': 4.0.4 - '@smithy/protocol-http': 5.1.2 - '@smithy/smithy-client': 4.4.5 - '@smithy/types': 4.3.1 - '@smithy/util-stream': 4.2.2 + '@smithy/fetch-http-handler': 5.3.6 + '@smithy/node-http-handler': 4.4.5 + '@smithy/property-provider': 4.2.5 + '@smithy/protocol-http': 5.3.5 + '@smithy/smithy-client': 4.9.8 + '@smithy/types': 4.9.0 + '@smithy/util-stream': 4.5.6 tslib: 2.8.1 '@aws-sdk/credential-provider-http@3.840.0': dependencies: '@aws-sdk/core': 3.840.0 '@aws-sdk/types': 3.840.0 - '@smithy/fetch-http-handler': 5.0.4 - '@smithy/node-http-handler': 4.0.6 - '@smithy/property-provider': 4.0.4 - '@smithy/protocol-http': 5.1.2 - '@smithy/smithy-client': 4.4.5 - '@smithy/types': 4.3.1 - '@smithy/util-stream': 4.2.2 + '@smithy/fetch-http-handler': 5.3.6 + '@smithy/node-http-handler': 4.4.5 + '@smithy/property-provider': 4.2.5 + '@smithy/protocol-http': 5.3.5 + '@smithy/smithy-client': 4.9.8 + '@smithy/types': 4.9.0 + '@smithy/util-stream': 4.5.6 tslib: 2.8.1 '@aws-sdk/credential-provider-http@3.931.0': @@ -20725,7 +20908,7 @@ snapshots: '@smithy/node-http-handler': 4.4.5 '@smithy/property-provider': 4.2.5 '@smithy/protocol-http': 5.3.5 - '@smithy/smithy-client': 4.9.6 + '@smithy/smithy-client': 4.9.8 '@smithy/types': 4.9.0 '@smithy/util-stream': 4.5.6 tslib: 2.8.1 @@ -20768,10 +20951,10 @@ snapshots: '@aws-sdk/credential-provider-web-identity': 3.839.0 '@aws-sdk/nested-clients': 3.839.0 '@aws-sdk/types': 3.821.0 - '@smithy/credential-provider-imds': 4.0.6 - '@smithy/property-provider': 4.0.4 - '@smithy/shared-ini-file-loader': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/credential-provider-imds': 4.2.5 + '@smithy/property-provider': 4.2.5 + '@smithy/shared-ini-file-loader': 4.4.0 + '@smithy/types': 4.9.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -20786,10 +20969,10 @@ snapshots: '@aws-sdk/credential-provider-web-identity': 3.840.0 '@aws-sdk/nested-clients': 3.840.0 '@aws-sdk/types': 3.840.0 - '@smithy/credential-provider-imds': 4.0.6 - '@smithy/property-provider': 4.0.4 - '@smithy/shared-ini-file-loader': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/credential-provider-imds': 4.2.5 + '@smithy/property-provider': 4.2.5 + '@smithy/shared-ini-file-loader': 4.4.0 + '@smithy/types': 4.9.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -20856,7 +21039,7 @@ snapshots: '@smithy/property-provider': 2.0.15 '@smithy/shared-ini-file-loader': 2.2.5 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -20886,10 +21069,10 @@ snapshots: '@aws-sdk/credential-provider-sso': 3.840.0 '@aws-sdk/credential-provider-web-identity': 3.840.0 '@aws-sdk/types': 3.840.0 - '@smithy/credential-provider-imds': 4.0.6 - '@smithy/property-provider': 4.0.4 - '@smithy/shared-ini-file-loader': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/credential-provider-imds': 4.2.5 + '@smithy/property-provider': 4.2.5 + '@smithy/shared-ini-file-loader': 4.4.0 + '@smithy/types': 4.9.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -20940,18 +21123,18 @@ snapshots: dependencies: '@aws-sdk/core': 3.839.0 '@aws-sdk/types': 3.821.0 - '@smithy/property-provider': 4.0.4 - '@smithy/shared-ini-file-loader': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/property-provider': 4.2.5 + '@smithy/shared-ini-file-loader': 4.4.0 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@aws-sdk/credential-provider-process@3.840.0': dependencies: '@aws-sdk/core': 3.840.0 '@aws-sdk/types': 3.840.0 - '@smithy/property-provider': 4.0.4 - '@smithy/shared-ini-file-loader': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/property-provider': 4.2.5 + '@smithy/shared-ini-file-loader': 4.4.0 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@aws-sdk/credential-provider-process@3.931.0': @@ -20990,9 +21173,9 @@ snapshots: '@aws-sdk/core': 3.839.0 '@aws-sdk/token-providers': 3.839.0 '@aws-sdk/types': 3.821.0 - '@smithy/property-provider': 4.0.4 - '@smithy/shared-ini-file-loader': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/property-provider': 4.2.5 + '@smithy/shared-ini-file-loader': 4.4.0 + '@smithy/types': 4.9.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -21003,9 +21186,9 @@ snapshots: '@aws-sdk/core': 3.840.0 '@aws-sdk/token-providers': 3.840.0 '@aws-sdk/types': 3.840.0 - '@smithy/property-provider': 4.0.4 - '@smithy/shared-ini-file-loader': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/property-provider': 4.2.5 + '@smithy/shared-ini-file-loader': 4.4.0 + '@smithy/types': 4.9.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -21048,8 +21231,8 @@ snapshots: '@aws-sdk/core': 3.839.0 '@aws-sdk/nested-clients': 3.839.0 '@aws-sdk/types': 3.821.0 - '@smithy/property-provider': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/property-provider': 4.2.5 + '@smithy/types': 4.9.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -21059,8 +21242,8 @@ snapshots: '@aws-sdk/core': 3.840.0 '@aws-sdk/nested-clients': 3.840.0 '@aws-sdk/types': 3.840.0 - '@smithy/property-provider': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/property-provider': 4.2.5 + '@smithy/types': 4.9.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -21089,12 +21272,45 @@ snapshots: transitivePeerDependencies: - aws-crt + '@aws-sdk/middleware-bucket-endpoint@3.936.0': + dependencies: + '@aws-sdk/types': 3.936.0 + '@aws-sdk/util-arn-parser': 3.893.0 + '@smithy/node-config-provider': 4.3.5 + '@smithy/protocol-http': 5.3.5 + '@smithy/types': 4.9.0 + '@smithy/util-config-provider': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/middleware-expect-continue@3.936.0': + dependencies: + '@aws-sdk/types': 3.936.0 + '@smithy/protocol-http': 5.3.5 + '@smithy/types': 4.9.0 + tslib: 2.8.1 + + '@aws-sdk/middleware-flexible-checksums@3.940.0': + dependencies: + '@aws-crypto/crc32': 5.2.0 + '@aws-crypto/crc32c': 5.2.0 + '@aws-crypto/util': 5.2.0 + '@aws-sdk/core': 3.940.0 + '@aws-sdk/types': 3.936.0 + '@smithy/is-array-buffer': 4.2.0 + '@smithy/node-config-provider': 4.3.5 + '@smithy/protocol-http': 5.3.5 + '@smithy/types': 4.9.0 + '@smithy/util-middleware': 4.2.5 + '@smithy/util-stream': 4.5.6 + '@smithy/util-utf8': 4.2.0 + tslib: 2.8.1 + '@aws-sdk/middleware-host-header@3.451.0': dependencies: '@aws-sdk/types': 3.451.0 '@smithy/protocol-http': 3.0.10 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@aws-sdk/middleware-host-header@3.821.0': dependencies: @@ -21106,8 +21322,8 @@ snapshots: '@aws-sdk/middleware-host-header@3.840.0': dependencies: '@aws-sdk/types': 3.840.0 - '@smithy/protocol-http': 5.1.2 - '@smithy/types': 4.3.1 + '@smithy/protocol-http': 5.3.5 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@aws-sdk/middleware-host-header@3.930.0': @@ -21124,11 +21340,17 @@ snapshots: '@smithy/types': 4.9.0 tslib: 2.8.1 + '@aws-sdk/middleware-location-constraint@3.936.0': + dependencies: + '@aws-sdk/types': 3.936.0 + '@smithy/types': 4.9.0 + tslib: 2.8.1 + '@aws-sdk/middleware-logger@3.451.0': dependencies: '@aws-sdk/types': 3.451.0 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@aws-sdk/middleware-logger@3.821.0': dependencies: @@ -21139,7 +21361,7 @@ snapshots: '@aws-sdk/middleware-logger@3.840.0': dependencies: '@aws-sdk/types': 3.840.0 - '@smithy/types': 4.3.1 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@aws-sdk/middleware-logger@3.930.0': @@ -21159,7 +21381,7 @@ snapshots: '@aws-sdk/types': 3.451.0 '@smithy/protocol-http': 3.0.10 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@aws-sdk/middleware-recursion-detection@3.821.0': dependencies: @@ -21171,8 +21393,8 @@ snapshots: '@aws-sdk/middleware-recursion-detection@3.840.0': dependencies: '@aws-sdk/types': 3.840.0 - '@smithy/protocol-http': 5.1.2 - '@smithy/types': 4.3.1 + '@smithy/protocol-http': 5.3.5 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@aws-sdk/middleware-recursion-detection@3.930.0': @@ -21213,8 +21435,8 @@ snapshots: '@aws-sdk/types': 3.451.0 '@smithy/types': 2.6.0 '@smithy/util-hex-encoding': 2.0.0 - '@smithy/util-utf8': 2.0.2 - tslib: 2.6.2 + '@smithy/util-utf8': 2.3.0 + tslib: 2.8.1 '@aws-sdk/middleware-sdk-sts@3.451.0': dependencies: @@ -21231,7 +21453,13 @@ snapshots: '@smithy/signature-v4': 2.0.16 '@smithy/types': 2.6.0 '@smithy/util-middleware': 2.0.7 - tslib: 2.6.2 + tslib: 2.8.1 + + '@aws-sdk/middleware-ssec@3.936.0': + dependencies: + '@aws-sdk/types': 3.936.0 + '@smithy/types': 4.9.0 + tslib: 2.8.1 '@aws-sdk/middleware-user-agent@3.451.0': dependencies: @@ -21239,7 +21467,7 @@ snapshots: '@aws-sdk/util-endpoints': 3.451.0 '@smithy/protocol-http': 3.0.10 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@aws-sdk/middleware-user-agent@3.839.0': dependencies: @@ -21256,9 +21484,9 @@ snapshots: '@aws-sdk/core': 3.840.0 '@aws-sdk/types': 3.840.0 '@aws-sdk/util-endpoints': 3.840.0 - '@smithy/core': 3.6.0 - '@smithy/protocol-http': 5.1.2 - '@smithy/types': 4.3.1 + '@smithy/core': 3.18.5 + '@smithy/protocol-http': 5.3.5 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@aws-sdk/middleware-user-agent@3.931.0': @@ -21266,7 +21494,7 @@ snapshots: '@aws-sdk/core': 3.931.0 '@aws-sdk/types': 3.930.0 '@aws-sdk/util-endpoints': 3.930.0 - '@smithy/core': 3.18.3 + '@smithy/core': 3.18.5 '@smithy/protocol-http': 5.3.5 '@smithy/types': 4.9.0 tslib: 2.8.1 @@ -21295,31 +21523,31 @@ snapshots: '@aws-sdk/util-endpoints': 3.828.0 '@aws-sdk/util-user-agent-browser': 3.821.0 '@aws-sdk/util-user-agent-node': 3.839.0 - '@smithy/config-resolver': 4.1.4 - '@smithy/core': 3.6.0 - '@smithy/fetch-http-handler': 5.0.4 - '@smithy/hash-node': 4.0.4 - '@smithy/invalid-dependency': 4.0.4 - '@smithy/middleware-content-length': 4.0.4 - '@smithy/middleware-endpoint': 4.1.13 - '@smithy/middleware-retry': 4.1.14 - '@smithy/middleware-serde': 4.0.8 - '@smithy/middleware-stack': 4.0.4 - '@smithy/node-config-provider': 4.1.3 - '@smithy/node-http-handler': 4.0.6 - '@smithy/protocol-http': 5.1.2 - '@smithy/smithy-client': 4.4.5 - '@smithy/types': 4.3.1 - '@smithy/url-parser': 4.0.4 - '@smithy/util-base64': 4.0.0 - '@smithy/util-body-length-browser': 4.0.0 - '@smithy/util-body-length-node': 4.0.0 - '@smithy/util-defaults-mode-browser': 4.0.21 - '@smithy/util-defaults-mode-node': 4.0.21 - '@smithy/util-endpoints': 3.0.6 - '@smithy/util-middleware': 4.0.4 - '@smithy/util-retry': 4.0.6 - '@smithy/util-utf8': 4.0.0 + '@smithy/config-resolver': 4.4.3 + '@smithy/core': 3.18.5 + '@smithy/fetch-http-handler': 5.3.6 + '@smithy/hash-node': 4.2.5 + '@smithy/invalid-dependency': 4.2.5 + '@smithy/middleware-content-length': 4.2.5 + '@smithy/middleware-endpoint': 4.3.12 + '@smithy/middleware-retry': 4.4.12 + '@smithy/middleware-serde': 4.2.6 + '@smithy/middleware-stack': 4.2.5 + '@smithy/node-config-provider': 4.3.5 + '@smithy/node-http-handler': 4.4.5 + '@smithy/protocol-http': 5.3.5 + '@smithy/smithy-client': 4.9.8 + '@smithy/types': 4.9.0 + '@smithy/url-parser': 4.2.5 + '@smithy/util-base64': 4.3.0 + '@smithy/util-body-length-browser': 4.2.0 + '@smithy/util-body-length-node': 4.2.1 + '@smithy/util-defaults-mode-browser': 4.3.11 + '@smithy/util-defaults-mode-node': 4.2.14 + '@smithy/util-endpoints': 3.2.5 + '@smithy/util-middleware': 4.2.5 + '@smithy/util-retry': 4.2.5 + '@smithy/util-utf8': 4.2.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -21338,31 +21566,31 @@ snapshots: '@aws-sdk/util-endpoints': 3.840.0 '@aws-sdk/util-user-agent-browser': 3.840.0 '@aws-sdk/util-user-agent-node': 3.840.0 - '@smithy/config-resolver': 4.1.4 - '@smithy/core': 3.6.0 - '@smithy/fetch-http-handler': 5.0.4 - '@smithy/hash-node': 4.0.4 - '@smithy/invalid-dependency': 4.0.4 - '@smithy/middleware-content-length': 4.0.4 - '@smithy/middleware-endpoint': 4.1.13 - '@smithy/middleware-retry': 4.1.14 - '@smithy/middleware-serde': 4.0.8 - '@smithy/middleware-stack': 4.0.4 - '@smithy/node-config-provider': 4.1.3 - '@smithy/node-http-handler': 4.0.6 - '@smithy/protocol-http': 5.1.2 - '@smithy/smithy-client': 4.4.5 - '@smithy/types': 4.3.1 - '@smithy/url-parser': 4.0.4 - '@smithy/util-base64': 4.0.0 - '@smithy/util-body-length-browser': 4.0.0 - '@smithy/util-body-length-node': 4.0.0 - '@smithy/util-defaults-mode-browser': 4.0.21 - '@smithy/util-defaults-mode-node': 4.0.21 - '@smithy/util-endpoints': 3.0.6 - '@smithy/util-middleware': 4.0.4 - '@smithy/util-retry': 4.0.6 - '@smithy/util-utf8': 4.0.0 + '@smithy/config-resolver': 4.4.3 + '@smithy/core': 3.18.5 + '@smithy/fetch-http-handler': 5.3.6 + '@smithy/hash-node': 4.2.5 + '@smithy/invalid-dependency': 4.2.5 + '@smithy/middleware-content-length': 4.2.5 + '@smithy/middleware-endpoint': 4.3.12 + '@smithy/middleware-retry': 4.4.12 + '@smithy/middleware-serde': 4.2.6 + '@smithy/middleware-stack': 4.2.5 + '@smithy/node-config-provider': 4.3.5 + '@smithy/node-http-handler': 4.4.5 + '@smithy/protocol-http': 5.3.5 + '@smithy/smithy-client': 4.9.8 + '@smithy/types': 4.9.0 + '@smithy/url-parser': 4.2.5 + '@smithy/util-base64': 4.3.0 + '@smithy/util-body-length-browser': 4.2.0 + '@smithy/util-body-length-node': 4.2.1 + '@smithy/util-defaults-mode-browser': 4.3.11 + '@smithy/util-defaults-mode-node': 4.2.14 + '@smithy/util-endpoints': 3.2.5 + '@smithy/util-middleware': 4.2.5 + '@smithy/util-retry': 4.2.5 + '@smithy/util-utf8': 4.2.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -21382,26 +21610,26 @@ snapshots: '@aws-sdk/util-user-agent-browser': 3.930.0 '@aws-sdk/util-user-agent-node': 3.931.0 '@smithy/config-resolver': 4.4.3 - '@smithy/core': 3.18.3 + '@smithy/core': 3.18.5 '@smithy/fetch-http-handler': 5.3.6 '@smithy/hash-node': 4.2.5 '@smithy/invalid-dependency': 4.2.5 '@smithy/middleware-content-length': 4.2.5 - '@smithy/middleware-endpoint': 4.3.10 - '@smithy/middleware-retry': 4.4.10 - '@smithy/middleware-serde': 4.2.5 + '@smithy/middleware-endpoint': 4.3.12 + '@smithy/middleware-retry': 4.4.12 + '@smithy/middleware-serde': 4.2.6 '@smithy/middleware-stack': 4.2.5 '@smithy/node-config-provider': 4.3.5 '@smithy/node-http-handler': 4.4.5 '@smithy/protocol-http': 5.3.5 - '@smithy/smithy-client': 4.9.6 + '@smithy/smithy-client': 4.9.8 '@smithy/types': 4.9.0 '@smithy/url-parser': 4.2.5 '@smithy/util-base64': 4.3.0 '@smithy/util-body-length-browser': 4.2.0 '@smithy/util-body-length-node': 4.2.1 - '@smithy/util-defaults-mode-browser': 4.3.9 - '@smithy/util-defaults-mode-node': 4.2.12 + '@smithy/util-defaults-mode-browser': 4.3.11 + '@smithy/util-defaults-mode-node': 4.2.14 '@smithy/util-endpoints': 3.2.5 '@smithy/util-middleware': 4.2.5 '@smithy/util-retry': 4.2.5 @@ -21459,7 +21687,7 @@ snapshots: '@smithy/types': 2.6.0 '@smithy/util-config-provider': 2.0.0 '@smithy/util-middleware': 2.0.7 - tslib: 2.6.2 + tslib: 2.8.1 '@aws-sdk/region-config-resolver@3.821.0': dependencies: @@ -21473,10 +21701,10 @@ snapshots: '@aws-sdk/region-config-resolver@3.840.0': dependencies: '@aws-sdk/types': 3.840.0 - '@smithy/node-config-provider': 4.1.3 - '@smithy/types': 4.3.1 + '@smithy/node-config-provider': 4.3.5 + '@smithy/types': 4.9.0 '@smithy/util-config-provider': 4.0.0 - '@smithy/util-middleware': 4.0.4 + '@smithy/util-middleware': 4.2.5 tslib: 2.8.1 '@aws-sdk/region-config-resolver@3.930.0': @@ -21495,6 +21723,31 @@ snapshots: '@smithy/types': 4.9.0 tslib: 2.8.1 + '@aws-sdk/s3-presigned-post@3.940.0': + dependencies: + '@aws-sdk/client-s3': 3.940.0 + '@aws-sdk/types': 3.936.0 + '@aws-sdk/util-format-url': 3.936.0 + '@smithy/middleware-endpoint': 4.3.12 + '@smithy/signature-v4': 5.3.5 + '@smithy/types': 4.9.0 + '@smithy/util-hex-encoding': 4.2.0 + '@smithy/util-utf8': 4.2.0 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + + '@aws-sdk/s3-request-presigner@3.940.0': + dependencies: + '@aws-sdk/signature-v4-multi-region': 3.940.0 + '@aws-sdk/types': 3.936.0 + '@aws-sdk/util-format-url': 3.936.0 + '@smithy/middleware-endpoint': 4.3.12 + '@smithy/protocol-http': 5.3.5 + '@smithy/smithy-client': 4.9.8 + '@smithy/types': 4.9.0 + tslib: 2.8.1 + '@aws-sdk/signature-v4-multi-region@3.940.0': dependencies: '@aws-sdk/middleware-sdk-s3': 3.940.0 @@ -21541,7 +21794,7 @@ snapshots: '@smithy/util-defaults-mode-node': 2.0.26 '@smithy/util-endpoints': 1.0.5 '@smithy/util-retry': 2.0.7 - '@smithy/util-utf8': 2.0.2 + '@smithy/util-utf8': 2.3.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -21551,9 +21804,9 @@ snapshots: '@aws-sdk/core': 3.839.0 '@aws-sdk/nested-clients': 3.839.0 '@aws-sdk/types': 3.821.0 - '@smithy/property-provider': 4.0.4 - '@smithy/shared-ini-file-loader': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/property-provider': 4.2.5 + '@smithy/shared-ini-file-loader': 4.4.0 + '@smithy/types': 4.9.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -21563,9 +21816,9 @@ snapshots: '@aws-sdk/core': 3.840.0 '@aws-sdk/nested-clients': 3.840.0 '@aws-sdk/types': 3.840.0 - '@smithy/property-provider': 4.0.4 - '@smithy/shared-ini-file-loader': 4.0.4 - '@smithy/types': 4.3.1 + '@smithy/property-provider': 4.2.5 + '@smithy/shared-ini-file-loader': 4.4.0 + '@smithy/types': 4.9.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -21597,7 +21850,7 @@ snapshots: '@aws-sdk/types@3.451.0': dependencies: '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@aws-sdk/types@3.821.0': dependencies: @@ -21606,7 +21859,7 @@ snapshots: '@aws-sdk/types@3.840.0': dependencies: - '@smithy/types': 4.3.1 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@aws-sdk/types@3.930.0': @@ -21627,7 +21880,7 @@ snapshots: dependencies: '@aws-sdk/types': 3.451.0 '@smithy/util-endpoints': 1.0.5 - tslib: 2.6.2 + tslib: 2.8.1 '@aws-sdk/util-endpoints@3.828.0': dependencies: @@ -21639,8 +21892,8 @@ snapshots: '@aws-sdk/util-endpoints@3.840.0': dependencies: '@aws-sdk/types': 3.840.0 - '@smithy/types': 4.3.1 - '@smithy/util-endpoints': 3.0.6 + '@smithy/types': 4.9.0 + '@smithy/util-endpoints': 3.2.5 tslib: 2.8.1 '@aws-sdk/util-endpoints@3.930.0': @@ -21659,6 +21912,13 @@ snapshots: '@smithy/util-endpoints': 3.2.5 tslib: 2.8.1 + '@aws-sdk/util-format-url@3.936.0': + dependencies: + '@aws-sdk/types': 3.936.0 + '@smithy/querystring-builder': 4.2.5 + '@smithy/types': 4.9.0 + tslib: 2.8.1 + '@aws-sdk/util-locate-window@3.310.0': dependencies: tslib: 2.8.1 @@ -21672,7 +21932,7 @@ snapshots: '@aws-sdk/types': 3.451.0 '@smithy/types': 2.6.0 bowser: 2.11.0 - tslib: 2.6.2 + tslib: 2.8.1 '@aws-sdk/util-user-agent-browser@3.821.0': dependencies: @@ -21684,7 +21944,7 @@ snapshots: '@aws-sdk/util-user-agent-browser@3.840.0': dependencies: '@aws-sdk/types': 3.840.0 - '@smithy/types': 4.3.1 + '@smithy/types': 4.9.0 bowser: 2.11.0 tslib: 2.8.1 @@ -21707,7 +21967,7 @@ snapshots: '@aws-sdk/types': 3.451.0 '@smithy/node-config-provider': 2.1.6 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@aws-sdk/util-user-agent-node@3.839.0': dependencies: @@ -21721,8 +21981,8 @@ snapshots: dependencies: '@aws-sdk/middleware-user-agent': 3.840.0 '@aws-sdk/types': 3.840.0 - '@smithy/node-config-provider': 4.1.3 - '@smithy/types': 4.3.1 + '@smithy/node-config-provider': 4.3.5 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@aws-sdk/util-user-agent-node@3.931.0': @@ -21747,7 +22007,7 @@ snapshots: '@aws-sdk/xml-builder@3.821.0': dependencies: - '@smithy/types': 4.3.1 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@aws-sdk/xml-builder@3.930.0': @@ -28545,6 +28805,10 @@ snapshots: '@protobuf-ts/runtime': 2.11.1 typescript: 5.9.3 + '@s2-dev/streamstore@0.17.6': + dependencies: + '@protobuf-ts/runtime': 2.11.1 + '@sec-ant/readable-stream@0.4.1': {} '@selderee/plugin-htmlparser2@0.11.0': @@ -28790,7 +29054,7 @@ snapshots: '@smithy/abort-controller@4.0.4': dependencies: - '@smithy/types': 4.3.1 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@smithy/abort-controller@4.2.5': @@ -28798,13 +29062,22 @@ snapshots: '@smithy/types': 4.9.0 tslib: 2.8.1 + '@smithy/chunked-blob-reader-native@4.2.1': + dependencies: + '@smithy/util-base64': 4.3.0 + tslib: 2.8.1 + + '@smithy/chunked-blob-reader@5.2.0': + dependencies: + tslib: 2.8.1 + '@smithy/config-resolver@2.0.19': dependencies: '@smithy/node-config-provider': 2.1.6 '@smithy/types': 2.6.0 '@smithy/util-config-provider': 2.0.0 '@smithy/util-middleware': 2.0.7 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/config-resolver@4.1.4': dependencies: @@ -28825,7 +29098,7 @@ snapshots: '@smithy/core@3.18.3': dependencies: - '@smithy/middleware-serde': 4.2.5 + '@smithy/middleware-serde': 4.2.6 '@smithy/protocol-http': 5.3.5 '@smithy/types': 4.9.0 '@smithy/util-base64': 4.3.0 @@ -28871,10 +29144,10 @@ snapshots: '@smithy/credential-provider-imds@4.0.6': dependencies: - '@smithy/node-config-provider': 4.1.3 - '@smithy/property-provider': 4.0.4 - '@smithy/types': 4.3.1 - '@smithy/url-parser': 4.0.4 + '@smithy/node-config-provider': 4.3.5 + '@smithy/property-provider': 4.2.5 + '@smithy/types': 4.9.0 + '@smithy/url-parser': 4.2.5 tslib: 2.8.1 '@smithy/credential-provider-imds@4.2.5': @@ -28892,13 +29165,43 @@ snapshots: '@smithy/util-hex-encoding': 2.0.0 tslib: 2.8.1 + '@smithy/eventstream-codec@4.2.5': + dependencies: + '@aws-crypto/crc32': 5.2.0 + '@smithy/types': 4.9.0 + '@smithy/util-hex-encoding': 4.2.0 + tslib: 2.8.1 + + '@smithy/eventstream-serde-browser@4.2.5': + dependencies: + '@smithy/eventstream-serde-universal': 4.2.5 + '@smithy/types': 4.9.0 + tslib: 2.8.1 + + '@smithy/eventstream-serde-config-resolver@4.3.5': + dependencies: + '@smithy/types': 4.9.0 + tslib: 2.8.1 + + '@smithy/eventstream-serde-node@4.2.5': + dependencies: + '@smithy/eventstream-serde-universal': 4.2.5 + '@smithy/types': 4.9.0 + tslib: 2.8.1 + + '@smithy/eventstream-serde-universal@4.2.5': + dependencies: + '@smithy/eventstream-codec': 4.2.5 + '@smithy/types': 4.9.0 + tslib: 2.8.1 + '@smithy/fetch-http-handler@2.2.7': dependencies: '@smithy/protocol-http': 3.0.10 '@smithy/querystring-builder': 2.0.14 '@smithy/types': 2.6.0 '@smithy/util-base64': 2.0.1 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/fetch-http-handler@5.0.4': dependencies: @@ -28916,12 +29219,19 @@ snapshots: '@smithy/util-base64': 4.3.0 tslib: 2.8.1 + '@smithy/hash-blob-browser@4.2.6': + dependencies: + '@smithy/chunked-blob-reader': 5.2.0 + '@smithy/chunked-blob-reader-native': 4.2.1 + '@smithy/types': 4.9.0 + tslib: 2.8.1 + '@smithy/hash-node@2.0.16': dependencies: '@smithy/types': 2.6.0 '@smithy/util-buffer-from': 2.0.0 - '@smithy/util-utf8': 2.0.2 - tslib: 2.6.2 + '@smithy/util-utf8': 2.3.0 + tslib: 2.8.1 '@smithy/hash-node@4.0.4': dependencies: @@ -28937,10 +29247,16 @@ snapshots: '@smithy/util-utf8': 4.2.0 tslib: 2.8.1 + '@smithy/hash-stream-node@4.2.5': + dependencies: + '@smithy/types': 4.9.0 + '@smithy/util-utf8': 4.2.0 + tslib: 2.8.1 + '@smithy/invalid-dependency@2.0.14': dependencies: '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/invalid-dependency@4.0.4': dependencies: @@ -28952,18 +29268,10 @@ snapshots: '@smithy/types': 4.9.0 tslib: 2.8.1 - '@smithy/is-array-buffer@2.0.0': - dependencies: - tslib: 2.8.1 - '@smithy/is-array-buffer@2.2.0': dependencies: tslib: 2.8.1 - '@smithy/is-array-buffer@4.0.0': - dependencies: - tslib: 2.8.1 - '@smithy/is-array-buffer@4.2.0': dependencies: tslib: 2.8.1 @@ -28971,14 +29279,20 @@ snapshots: '@smithy/md5-js@2.0.16': dependencies: '@smithy/types': 2.6.0 - '@smithy/util-utf8': 2.0.2 - tslib: 2.6.2 + '@smithy/util-utf8': 2.3.0 + tslib: 2.8.1 + + '@smithy/md5-js@4.2.5': + dependencies: + '@smithy/types': 4.9.0 + '@smithy/util-utf8': 4.2.0 + tslib: 2.8.1 '@smithy/middleware-content-length@2.0.16': dependencies: '@smithy/protocol-http': 3.0.10 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/middleware-content-length@4.0.4': dependencies: @@ -29000,7 +29314,7 @@ snapshots: '@smithy/types': 2.6.0 '@smithy/url-parser': 2.0.14 '@smithy/util-middleware': 2.0.7 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/middleware-endpoint@4.1.13': dependencies: @@ -29015,8 +29329,8 @@ snapshots: '@smithy/middleware-endpoint@4.3.10': dependencies: - '@smithy/core': 3.18.3 - '@smithy/middleware-serde': 4.2.5 + '@smithy/core': 3.18.5 + '@smithy/middleware-serde': 4.2.6 '@smithy/node-config-provider': 4.3.5 '@smithy/shared-ini-file-loader': 4.4.0 '@smithy/types': 4.9.0 @@ -29043,7 +29357,7 @@ snapshots: '@smithy/types': 2.6.0 '@smithy/util-middleware': 2.0.7 '@smithy/util-retry': 2.0.7 - tslib: 2.6.2 + tslib: 2.8.1 uuid: 8.3.2 '@smithy/middleware-retry@4.1.14': @@ -29063,7 +29377,7 @@ snapshots: '@smithy/node-config-provider': 4.3.5 '@smithy/protocol-http': 5.3.5 '@smithy/service-error-classification': 4.2.5 - '@smithy/smithy-client': 4.9.6 + '@smithy/smithy-client': 4.9.8 '@smithy/types': 4.9.0 '@smithy/util-middleware': 4.2.5 '@smithy/util-retry': 4.2.5 @@ -29085,7 +29399,7 @@ snapshots: '@smithy/middleware-serde@2.0.14': dependencies: '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/middleware-serde@4.0.8': dependencies: @@ -29108,7 +29422,7 @@ snapshots: '@smithy/middleware-stack@2.0.8': dependencies: '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/middleware-stack@4.0.4': dependencies: @@ -29125,7 +29439,7 @@ snapshots: '@smithy/property-provider': 2.0.15 '@smithy/shared-ini-file-loader': 2.2.5 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/node-config-provider@4.1.3': dependencies: @@ -29147,7 +29461,7 @@ snapshots: '@smithy/protocol-http': 3.0.10 '@smithy/querystring-builder': 2.0.14 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/node-http-handler@4.0.6': dependencies: @@ -29172,7 +29486,7 @@ snapshots: '@smithy/property-provider@4.0.4': dependencies: - '@smithy/types': 4.3.1 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@smithy/property-provider@4.2.5': @@ -29183,7 +29497,7 @@ snapshots: '@smithy/protocol-http@3.0.10': dependencies: '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/protocol-http@5.1.2': dependencies: @@ -29203,7 +29517,7 @@ snapshots: '@smithy/querystring-builder@4.0.4': dependencies: - '@smithy/types': 4.3.1 + '@smithy/types': 4.9.0 '@smithy/util-uri-escape': 4.0.0 tslib: 2.8.1 @@ -29220,7 +29534,7 @@ snapshots: '@smithy/querystring-parser@4.0.4': dependencies: - '@smithy/types': 4.3.1 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@smithy/querystring-parser@4.2.5': @@ -29234,7 +29548,7 @@ snapshots: '@smithy/service-error-classification@4.0.6': dependencies: - '@smithy/types': 4.3.1 + '@smithy/types': 4.9.0 '@smithy/service-error-classification@4.2.5': dependencies: @@ -29247,7 +29561,7 @@ snapshots: '@smithy/shared-ini-file-loader@4.0.4': dependencies: - '@smithy/types': 4.3.1 + '@smithy/types': 4.9.0 tslib: 2.8.1 '@smithy/shared-ini-file-loader@4.4.0': @@ -29258,23 +29572,23 @@ snapshots: '@smithy/signature-v4@2.0.16': dependencies: '@smithy/eventstream-codec': 2.0.14 - '@smithy/is-array-buffer': 2.0.0 + '@smithy/is-array-buffer': 2.2.0 '@smithy/types': 2.6.0 '@smithy/util-hex-encoding': 2.0.0 '@smithy/util-middleware': 2.0.7 '@smithy/util-uri-escape': 2.0.0 - '@smithy/util-utf8': 2.0.2 + '@smithy/util-utf8': 2.3.0 tslib: 2.8.1 '@smithy/signature-v4@5.1.2': dependencies: - '@smithy/is-array-buffer': 4.0.0 - '@smithy/protocol-http': 5.1.2 - '@smithy/types': 4.3.1 - '@smithy/util-hex-encoding': 4.0.0 - '@smithy/util-middleware': 4.0.4 + '@smithy/is-array-buffer': 4.2.0 + '@smithy/protocol-http': 5.3.5 + '@smithy/types': 4.9.0 + '@smithy/util-hex-encoding': 4.2.0 + '@smithy/util-middleware': 4.2.5 '@smithy/util-uri-escape': 4.0.0 - '@smithy/util-utf8': 4.0.0 + '@smithy/util-utf8': 4.2.0 tslib: 2.8.1 '@smithy/signature-v4@5.3.5': @@ -29293,7 +29607,7 @@ snapshots: '@smithy/middleware-stack': 2.0.8 '@smithy/types': 2.6.0 '@smithy/util-stream': 2.0.21 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/smithy-client@4.4.5': dependencies: @@ -29307,8 +29621,8 @@ snapshots: '@smithy/smithy-client@4.9.6': dependencies: - '@smithy/core': 3.18.3 - '@smithy/middleware-endpoint': 4.3.10 + '@smithy/core': 3.18.5 + '@smithy/middleware-endpoint': 4.3.12 '@smithy/middleware-stack': 4.2.5 '@smithy/protocol-http': 5.3.5 '@smithy/types': 4.9.0 @@ -29327,7 +29641,7 @@ snapshots: '@smithy/types@2.6.0': dependencies: - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/types@4.3.1': dependencies: @@ -29341,7 +29655,7 @@ snapshots: dependencies: '@smithy/querystring-parser': 2.0.14 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/url-parser@4.0.4': dependencies: @@ -29358,7 +29672,7 @@ snapshots: '@smithy/util-base64@2.0.1': dependencies: '@smithy/util-buffer-from': 2.0.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/util-base64@4.0.0': dependencies: @@ -29374,7 +29688,7 @@ snapshots: '@smithy/util-body-length-browser@2.0.0': dependencies: - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/util-body-length-browser@4.0.0': dependencies: @@ -29386,7 +29700,7 @@ snapshots: '@smithy/util-body-length-node@2.1.0': dependencies: - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/util-body-length-node@4.0.0': dependencies: @@ -29398,7 +29712,7 @@ snapshots: '@smithy/util-buffer-from@2.0.0': dependencies: - '@smithy/is-array-buffer': 2.0.0 + '@smithy/is-array-buffer': 2.2.0 tslib: 2.8.1 '@smithy/util-buffer-from@2.2.0': @@ -29408,7 +29722,7 @@ snapshots: '@smithy/util-buffer-from@4.0.0': dependencies: - '@smithy/is-array-buffer': 4.0.0 + '@smithy/is-array-buffer': 4.2.0 tslib: 2.8.1 '@smithy/util-buffer-from@4.2.0': @@ -29434,7 +29748,7 @@ snapshots: '@smithy/smithy-client': 2.1.16 '@smithy/types': 2.6.0 bowser: 2.11.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/util-defaults-mode-browser@4.0.21': dependencies: @@ -29454,7 +29768,7 @@ snapshots: '@smithy/util-defaults-mode-browser@4.3.9': dependencies: '@smithy/property-provider': 4.2.5 - '@smithy/smithy-client': 4.9.6 + '@smithy/smithy-client': 4.9.8 '@smithy/types': 4.9.0 tslib: 2.8.1 @@ -29466,7 +29780,7 @@ snapshots: '@smithy/property-provider': 2.0.15 '@smithy/smithy-client': 2.1.16 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/util-defaults-mode-node@4.0.21': dependencies: @@ -29484,7 +29798,7 @@ snapshots: '@smithy/credential-provider-imds': 4.2.5 '@smithy/node-config-provider': 4.3.5 '@smithy/property-provider': 4.2.5 - '@smithy/smithy-client': 4.9.6 + '@smithy/smithy-client': 4.9.8 '@smithy/types': 4.9.0 tslib: 2.8.1 @@ -29502,7 +29816,7 @@ snapshots: dependencies: '@smithy/node-config-provider': 2.1.6 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/util-endpoints@3.0.6': dependencies: @@ -29520,10 +29834,6 @@ snapshots: dependencies: tslib: 2.8.1 - '@smithy/util-hex-encoding@4.0.0': - dependencies: - tslib: 2.8.1 - '@smithy/util-hex-encoding@4.2.0': dependencies: tslib: 2.8.1 @@ -29547,7 +29857,7 @@ snapshots: dependencies: '@smithy/service-error-classification': 2.0.7 '@smithy/types': 2.6.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/util-retry@4.0.6': dependencies: @@ -29567,20 +29877,20 @@ snapshots: '@smithy/node-http-handler': 2.1.10 '@smithy/types': 2.6.0 '@smithy/util-base64': 2.0.1 - '@smithy/util-buffer-from': 2.0.0 + '@smithy/util-buffer-from': 2.2.0 '@smithy/util-hex-encoding': 2.0.0 - '@smithy/util-utf8': 2.0.2 + '@smithy/util-utf8': 2.3.0 tslib: 2.8.1 '@smithy/util-stream@4.2.2': dependencies: - '@smithy/fetch-http-handler': 5.0.4 - '@smithy/node-http-handler': 4.0.6 - '@smithy/types': 4.3.1 - '@smithy/util-base64': 4.0.0 + '@smithy/fetch-http-handler': 5.3.6 + '@smithy/node-http-handler': 4.4.5 + '@smithy/types': 4.9.0 + '@smithy/util-base64': 4.3.0 '@smithy/util-buffer-from': 4.0.0 - '@smithy/util-hex-encoding': 4.0.0 - '@smithy/util-utf8': 4.0.0 + '@smithy/util-hex-encoding': 4.2.0 + '@smithy/util-utf8': 4.2.0 tslib: 2.8.1 '@smithy/util-stream@4.5.6': @@ -29609,7 +29919,7 @@ snapshots: '@smithy/util-utf8@2.0.2': dependencies: '@smithy/util-buffer-from': 2.0.0 - tslib: 2.6.2 + tslib: 2.8.1 '@smithy/util-utf8@2.3.0': dependencies: @@ -29782,7 +30092,7 @@ snapshots: '@swc/helpers@0.5.2': dependencies: - tslib: 2.6.2 + tslib: 2.8.1 '@swc/helpers@0.5.5': dependencies: @@ -29961,7 +30271,7 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@trigger.dev/platform@1.0.20': + '@trigger.dev/platform@1.0.21': dependencies: zod: 3.23.8 @@ -31073,7 +31383,7 @@ snapshots: busboy: 1.6.0 fast-querystring: 1.1.2 fast-url-parser: 1.1.3 - tslib: 2.6.2 + tslib: 2.8.1 '@window-splitter/state@0.4.1': dependencies: @@ -31359,7 +31669,7 @@ snapshots: aria-hidden@1.2.3: dependencies: - tslib: 2.6.2 + tslib: 2.8.1 aria-hidden@1.2.4: dependencies: @@ -34554,7 +34864,7 @@ snapshots: debug: 4.4.0 interpret: 3.1.1 semver: 7.7.2 - tslib: 2.6.2 + tslib: 2.8.1 yargs: 17.7.2 transitivePeerDependencies: - supports-color @@ -34887,6 +35197,8 @@ snapshots: ignore@5.2.4: {} + ignore@7.0.5: {} + import-fresh@3.3.0: dependencies: parent-module: 1.0.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 6763eb357e..cdd91aa217 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,10 +7,12 @@ packages: - "!packages/cli-v3/e2e/**" minimumReleaseAge: 4320 +minimumReleaseAgeExclude: + - "@trigger.dev/platform" preferOffline: true linkWorkspacePackages: false publicHoistPattern: - "*prisma*" preferWorkspacePackages: true -sideEffectsCache: false \ No newline at end of file +sideEffectsCache: false diff --git a/references/hello-world/trigger.config.ts b/references/hello-world/trigger.config.ts index 7e0b3a3c9d..2c3751b041 100644 --- a/references/hello-world/trigger.config.ts +++ b/references/hello-world/trigger.config.ts @@ -26,7 +26,6 @@ export default defineConfig({ extensions: [ lightpanda(), syncEnvVars(async (ctx) => { - console.log("syncEnvVars", { environment: ctx.environment, branch: ctx.branch }); return [ { name: "SYNC_ENV", value: ctx.environment }, { name: "BRANCH", value: ctx.branch ?? "NO_BRANCH" },