From 50e3192453500be1f7b985dfb9a7f8871f7945ee Mon Sep 17 00:00:00 2001 From: Hemachandar <132386067+hmacr@users.noreply.github.com> Date: Thu, 19 Oct 2023 20:41:08 +0530 Subject: [PATCH 01/19] feat: add ability to use custom tunnel in dev cmd (#597) * feat: add ability to use custom tunnel in dev cmd * Added a short flag -t for the tunnel flag * skip framework url resolution if tunnel-url is provided * remove type annotation --------- Co-authored-by: Eric Allam Co-authored-by: Matt Aitken --- .changeset/orange-cows-tease.md | 5 ++ packages/cli/src/cli/index.ts | 4 + packages/cli/src/commands/dev.ts | 140 +++++++++++++++++++++---------- 3 files changed, 104 insertions(+), 45 deletions(-) create mode 100644 .changeset/orange-cows-tease.md diff --git a/.changeset/orange-cows-tease.md b/.changeset/orange-cows-tease.md new file mode 100644 index 000000000..a37f2ee7a --- /dev/null +++ b/.changeset/orange-cows-tease.md @@ -0,0 +1,5 @@ +--- +"@trigger.dev/cli": patch +--- + +add ability to use custom tunnel in dev command diff --git a/packages/cli/src/cli/index.ts b/packages/cli/src/cli/index.ts index cc3bc8713..b55243de4 100644 --- a/packages/cli/src/cli/index.ts +++ b/packages/cli/src/cli/index.ts @@ -59,6 +59,10 @@ program "The URI path to the API handler function to use for this project.", "/api/trigger" ) + .option( + "-t, --tunnel ", + "An optional custom tunnel URL. Use only if you already have an open tunnel to your local dev server." + ) .version(getVersion(), "-v, --version", "Display the version number") .action(async (path, options) => { try { diff --git a/packages/cli/src/commands/dev.ts b/packages/cli/src/commands/dev.ts index 3224c24d3..0d92526e1 100644 --- a/packages/cli/src/commands/dev.ts +++ b/packages/cli/src/commands/dev.ts @@ -28,6 +28,11 @@ export const DevCommandOptionsSchema = z.object({ envFile: z.string().optional(), handlerPath: z.string(), clientId: z.string().optional(), + tunnel: z + .string() + .url() + .regex(/^(http|https).+/, "only http/https URLs are accepted") + .optional(), }); export type DevCommandOptions = z.infer; @@ -43,6 +48,29 @@ const formattedDate = new Intl.DateTimeFormat("en", { let runtime: JsRuntime; +type TunnelUrl = { + type: "tunnel"; + url: string; +}; + +type ResolvedUrl = { + type: "resolved"; + hostname: string; + port: number; +}; + +type ServerUrl = TunnelUrl | ResolvedUrl; + +type TunnelEndpoint = TunnelUrl & { + handlerPath: string; +}; + +type ResolvedEndpoint = ResolvedUrl & { + handlerPath: string; +}; + +type ServerEndpoint = TunnelEndpoint | ResolvedEndpoint; + export async function devCommand(path: string, anyOptions: any) { telemetryClient.dev.started(path, anyOptions); @@ -90,23 +118,23 @@ export async function devCommand(path: string, anyOptions: any) { logger.error( `โœ– [trigger.dev] Your endpoint couldn't be verified. Make sure your app is running and try again. ${resolvedOptions.handlerPath}` ); - logger.info(` [trigger.dev] You can use -H to specify a hostname, or -p to specify a port.`); + logger.info( + ` [trigger.dev] You can use -H to specify a hostname, or -p to specify a port, or -t to specify the tunnel-url pointing to the local dev server.` + ); telemetryClient.dev.failed("no_server_found", resolvedOptions); return; } - const { hostname, port, handlerPath } = verifiedEndpoint; - telemetryClient.dev.serverRunning(path, resolvedOptions); // Setup tunnel - const endpointUrl = await resolveEndpointUrl(apiUrl, port, hostname); + const endpointUrl = await resolveEndpointUrl(apiUrl, verifiedEndpoint); if (!endpointUrl) { telemetryClient.dev.failed("failed_to_create_tunnel", resolvedOptions); return; } - const endpointHandlerUrl = `${endpointUrl}${handlerPath}`; + const endpointHandlerUrl = `${endpointUrl}${verifiedEndpoint.handlerPath}`; telemetryClient.dev.tunnelRunning(path, resolvedOptions); // Watch for changes to files and refresh endpoints @@ -306,6 +334,7 @@ async function resolveOptions( envFile: unresolvedOptions.envFile ?? ".env", handlerPath: unresolvedOptions.handlerPath, clientId: unresolvedOptions.clientId, + tunnel: unresolvedOptions.tunnel, }; } @@ -318,6 +347,7 @@ async function resolveOptions( envFile: unresolvedOptions.envFile ?? envName ?? ".env", handlerPath: unresolvedOptions.handlerPath, clientId: unresolvedOptions.clientId, + tunnel: unresolvedOptions.tunnel, }; } @@ -327,40 +357,15 @@ async function verifyEndpoint( apiKey: string, framework?: Framework ) { - //create list of hostnames to try - const hostnames = []; - if (resolvedOptions.hostname) { - hostnames.push(resolvedOptions.hostname); - } - if (framework) { - hostnames.push(...framework.defaultHostnames); - } else { - hostnames.push("localhost"); - } + const serverUrls = findServerUrls(resolvedOptions, framework); - //create list of ports to try - const ports = []; - if (resolvedOptions.port) { - ports.push(resolvedOptions.port); - } - if (framework) { - ports.push(...framework.defaultPorts); - } else { - ports.push(3000); - } - - //create list of urls to try - const urls: { hostname: string; port: number }[] = []; - for (const hostname of hostnames) { - for (const port of ports) { - urls.push({ hostname, port }); - } - } - - //try each hostname - for (const url of urls) { - const { hostname, port } = url; - const localEndpointHandlerUrl = `http://${hostname}:${port}${resolvedOptions.handlerPath}`; + //try each url + for (const serverUrl of serverUrls) { + const url = + serverUrl.type === "tunnel" + ? serverUrl.url + : `http://${serverUrl.hostname}:${serverUrl.port}`; + const localEndpointHandlerUrl = `${url}${resolvedOptions.handlerPath}`; const spinner = ora( `[trigger.dev] Looking for your trigger endpoint: ${localEndpointHandlerUrl}` @@ -384,7 +389,8 @@ async function verifyEndpoint( } spinner.succeed(`[trigger.dev] Found your trigger endpoint: ${localEndpointHandlerUrl}`); - return { hostname, port, handlerPath: resolvedOptions.handlerPath }; + + return { ...serverUrl, handlerPath: resolvedOptions.handlerPath }; } catch (err) { spinner.fail(`[trigger.dev] No server found (${localEndpointHandlerUrl}).`); } @@ -399,17 +405,61 @@ export function getEndpointId(runtime: JsRuntime, clientId?: string) { } else return runtime.getEndpointId(); } -async function resolveEndpointUrl(apiUrl: string, port: number, hostname: string) { +function findServerUrls(resolvedOptions: ResolvedOptions, framework?: Framework): ServerUrl[] { + if (resolvedOptions.tunnel) { + logger.info(` Using provided tunnel URL: ${resolvedOptions.tunnel}`); + return [{ type: "tunnel", url: resolvedOptions.tunnel }]; + } + + //create list of hostnames to try + const hostnames = []; + if (resolvedOptions.hostname) { + hostnames.push(resolvedOptions.hostname); + } + if (framework) { + hostnames.push(...framework.defaultHostnames); + } else { + hostnames.push("localhost"); + } + + //create list of ports to try + const ports = []; + if (resolvedOptions.port) { + ports.push(resolvedOptions.port); + } + if (framework) { + ports.push(...framework.defaultPorts); + } else { + ports.push(3000); + } + + //create list of urls to try + const urls: ResolvedUrl[] = []; + for (const hostname of hostnames) { + for (const port of ports) { + urls.push({ type: "resolved", hostname, port }); + } + } + + return urls; +} + +async function resolveEndpointUrl(apiUrl: string, endpoint: ServerEndpoint) { + // use tunnel URL if provided + if (endpoint.type === "tunnel") { + return endpoint.url; + } + const apiURL = new URL(apiUrl); - //if the API is localhost and the hostname is localhost - if (apiURL.hostname === "localhost" && hostname === "localhost") { - return `http://${hostname}:${port}`; + // if the API is localhost and the hostname is localhost + if (apiURL.hostname === "localhost" && endpoint.hostname === "localhost") { + return `http://${endpoint.hostname}:${endpoint.port}`; } // Setup tunnel const tunnelSpinner = ora(`๐Ÿš‡ Creating tunnel`).start(); - const tunnelUrl = await createTunnel(hostname, port, tunnelSpinner); + const tunnelUrl = await createTunnel(endpoint.hostname, endpoint.port, tunnelSpinner); if (tunnelUrl) { tunnelSpinner.succeed(`๐Ÿš‡ Created tunnel: ${tunnelUrl}`); @@ -442,7 +492,7 @@ async function createTunnel(hostname: string, port: number, spinner: Ora) { error.message.includes("connect ECONNREFUSED 127.0.0.1:4041") ) { spinner.fail( - `Ngrok failed to create a tunnel for port ${port} because ngrok is already running` + `Ngrok failed to create a tunnel for port ${port} because ngrok is already running.\n You may want to use -t flag to use an existing URL that points to the local dev server.` ); return; } From 513d0f071d46c52c12947e6944dec0108fd02c9d Mon Sep 17 00:00:00 2001 From: vimode <39148877+vimode@users.noreply.github.com> Date: Thu, 19 Oct 2023 20:57:21 +0530 Subject: [PATCH 02/19] fix: broken links in documentation (#602) * fix: broken links at what is triggerdev docs * fix: broken links for apikey * fix: broken sdk link * fix: broken link in concepts/triggers * fix: broken link for zod guide at concepts/triggers/events * fix: broken links in title for projects * Shouldn't have /docs at the start * Use backgroundFetch path --------- Co-authored-by: Matt Aitken --- docs/documentation/concepts/client-adaptors.mdx | 2 +- docs/documentation/concepts/projects.mdx | 2 +- docs/documentation/concepts/runs.mdx | 2 +- docs/documentation/concepts/triggers/events.mdx | 2 +- docs/documentation/concepts/triggers/webhooks.mdx | 2 +- docs/documentation/concepts/what-is-triggerdotdev.mdx | 8 ++++---- docs/sdk/triggerclient/overview.mdx | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/documentation/concepts/client-adaptors.mdx b/docs/documentation/concepts/client-adaptors.mdx index 7cd7c3a90..5d0201559 100644 --- a/docs/documentation/concepts/client-adaptors.mdx +++ b/docs/documentation/concepts/client-adaptors.mdx @@ -5,7 +5,7 @@ description: "The Client is how you interact with the API, through an Adaptor." ## Client -A Client is used to connect to a specific [Project](/documentation/concepts/projects) by using an [API Key](/documentation/concepts/environments-apikeys). +A Client is used to connect to a specific [Project](/documentation/concepts/projects) by using an [API Key](/documentation/concepts/environments-endpoints). Clients are created using the `TriggerClient` class. diff --git a/docs/documentation/concepts/projects.mdx b/docs/documentation/concepts/projects.mdx index 83f81ac6b..f20fc6b7f 100644 --- a/docs/documentation/concepts/projects.mdx +++ b/docs/documentation/concepts/projects.mdx @@ -1,6 +1,6 @@ --- title: "Projects" -description: "Projects are a group of [Jobs](/documentation/concepts/jobs-runs-tasks) with [Environments](/documentation/concepts/environments-apikeys)" +description: "Projects are a group of [Jobs](/documentation/concepts/jobs) with [Environments](/documentation/concepts/environments-endpoints)" --- User's are members of one or more Organizations. Each Organization can have many Projects. diff --git a/docs/documentation/concepts/runs.mdx b/docs/documentation/concepts/runs.mdx index d45a88689..e65ebb870 100644 --- a/docs/documentation/concepts/runs.mdx +++ b/docs/documentation/concepts/runs.mdx @@ -56,7 +56,7 @@ A few things you can do with `io`: - Use [Integrations](/documentation/concepts/integrations). - Add [delays](/documentation/concepts/delays) (that can be longer than your server timeout). - Log messages to the [Run log](/documentation/guides/viewing-runs). -- Perform [background fetch requests](/documentation/sdk/io) (that can be longer than your server timeout). +- Perform [background fetch requests](/sdk/io/backgroundfetch) (that can be longer than your server timeout). - [Send events](/documentation/concepts/triggers/events) to Trigger other Jobs. - Create a [Task](/documentation/concepts/tasks) manually by wrapping code in `io.runTask`. diff --git a/docs/documentation/concepts/triggers/events.mdx b/docs/documentation/concepts/triggers/events.mdx index 4373d0235..f2da21a63 100644 --- a/docs/documentation/concepts/triggers/events.mdx +++ b/docs/documentation/concepts/triggers/events.mdx @@ -18,7 +18,7 @@ Event triggers take a [Zod](https://github.com/colinhacks/zod) schema. This is u It also means that inside your run function the payload will be typed correctly. We use [Zod](https://github.com/colinhacks/zod#installation) for our schemas โ€“ it's a fantastic library that allows you to define schemas in a very simple way. -You can always start out by using `z.any()` as your schema, and then later on you can add more strict validation. See our [Zod guide](/guides/zod) for more information. +You can always start out by using `z.any()` as your schema, and then later on you can add more strict validation. See our [Zod guide](/documentation/guides/zod) for more information. ## Example diff --git a/docs/documentation/concepts/triggers/webhooks.mdx b/docs/documentation/concepts/triggers/webhooks.mdx index 76579a8a5..397b67f6a 100644 --- a/docs/documentation/concepts/triggers/webhooks.mdx +++ b/docs/documentation/concepts/triggers/webhooks.mdx @@ -17,7 +17,7 @@ Webhooks can be difficult to work with, especially when developing locally. We m There are two ways to use webhooks with Trigger.dev: -1. Use one of our built-in Integrations, such as [GitHub](/integrations/github). We'll take care of registering the webhook for you. +1. Use one of our built-in Integrations, such as [GitHub](/integrations/apis/github). We'll take care of registering the webhook for you. 2. [Create your own Integration](/integrations/create) that registers for webhooks, this is useful if you want to use a service that we don't have an Integration for. ## Example diff --git a/docs/documentation/concepts/what-is-triggerdotdev.mdx b/docs/documentation/concepts/what-is-triggerdotdev.mdx index a456f017b..7793e5090 100644 --- a/docs/documentation/concepts/what-is-triggerdotdev.mdx +++ b/docs/documentation/concepts/what-is-triggerdotdev.mdx @@ -10,7 +10,7 @@ It can be used from _any_ Node.js (support versions) or TypeScript backend appli ## What we take care of for you: - We make it possible to run long-running Jobs on serverless platforms that have short timeouts (e.g. 30 seconds). -- We provide an SDK for building Jobs in your codebase, triggered by various sources such as [events](/triggers/events), [scheduled events](/triggers/scheduled-events), and [webhooks](/triggers/webhooks). +- We provide an SDK for building Jobs in your codebase, triggered by various sources such as [events](/documentation/concepts/triggers/events), [scheduled events](/documentation/concepts/triggers/scheduled), and [webhooks](/documentation/concepts/triggers/webhooks). - We provide an orchestration platform for running Jobs in your codebase. - We provide out-of-the-box Integrations with popular services such as [Slack](/integrations/apis/slack), [OpenAI](/integrations/apis/openai), [GitHub](/integrations/apis/github) and [more](/integrations), which vastly simplifies the process interacting with 3rd-party services. - We handle OAuth for you @@ -73,16 +73,16 @@ client.defineJob({ This code lives in a file inside your project repo. -It is listening for the [issueEvent](/integrations/apis/github/triggers) GitHub webhook, and when it receives one, we will take care of calling the `run` function supplied to the `Job` constructor with the webhook payload. This gives you the following advantages over traditional webhooks: +It is listening for the [issueEvent](/integrations/apis/github-triggers#onissue) GitHub webhook, and when it receives one, we will take care of calling the `run` function supplied to the `Job` constructor with the webhook payload. This gives you the following advantages over traditional webhooks: - We will automatically register the webhook with GitHub for you, and verify the payload signature. - We provide a nicely typed `event` payload to your `run` function, so you don't have to setup webhook payload types. - If your server isn't running, we will wait until it's back online before attempting to run the Job. -- It is very easy to test your Job locally using our [Test Run](/guides/running-tests) feature. +- It is very easy to test your Job locally using our [Test Run](/documentation/guides/testing-jobs) feature. As you can see the above Job also makes a call to our Slack [postMessage](/integrations/apis/slack) function, which provides the following advantages over using the raw Slack API: -- We automatically handle the OAuth flow for you, so you don't have to worry about setting up a Slack app and dealing with credentials in your code (see our [Authentication](/concepts/authentication) guide for more details). +- We automatically handle the OAuth flow for you, so you don't have to worry about setting up a Slack app and dealing with credentials in your code (see our [Authentication](/documentation/concepts/integrations#authentication) guide for more details). - We will automatically retry the request if the Slack API returns an error. - We provide a nicely typed `response` object from your `postMessage` function, so you don't have to setup Slack API types. diff --git a/docs/sdk/triggerclient/overview.mdx b/docs/sdk/triggerclient/overview.mdx index 6d263dd0b..44b9e3311 100644 --- a/docs/sdk/triggerclient/overview.mdx +++ b/docs/sdk/triggerclient/overview.mdx @@ -4,7 +4,7 @@ sidebarTitle: "Overview" description: "TriggerClient is used to create a client that connects to the Trigger.dev platform" --- -A [TriggerClient](/documentation/concepts/client-adaptors) is used to connect to a specific [Project](/documentation/concepts/projects) by using an [API Key](/documentation/concepts/environments-apikeys). +A [TriggerClient](/documentation/concepts/client-adaptors) is used to connect to a specific [Project](/documentation/concepts/projects) by using an [API Key](/documentation/concepts/environments-endpoints). ```ts Example export const client = new TriggerClient({ From 51f2cd6b3f1a8e72b6dd3a11891d6966e79fadd9 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 19 Oct 2023 16:34:41 +0100 Subject: [PATCH 03/19] Updated posthog to 1.83.0 (#608) --- apps/webapp/package.json | 4 ++-- pnpm-lock.yaml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/webapp/package.json b/apps/webapp/package.json index 5cf5eacef..b9fcc6f95 100644 --- a/apps/webapp/package.json +++ b/apps/webapp/package.json @@ -87,7 +87,7 @@ "morgan": "^1.10.0", "nanoid": "^3.3.4", "postcss-import": "^14.1.0", - "posthog-js": "^1.69.0", + "posthog-js": "^1.83.0", "posthog-node": "^3.1.1", "prism-react-renderer": "^1.3.5", "prismjs": "^1.29.0", @@ -180,4 +180,4 @@ "engines": { "node": ">=16.0.0" } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3738f06f9..870043aab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -159,7 +159,7 @@ importers: npm-run-all: ^4.1.5 postcss: ^8.4.21 postcss-import: ^14.1.0 - posthog-js: ^1.69.0 + posthog-js: ^1.83.0 posthog-node: ^3.1.1 prettier: ^2.8.8 prettier-plugin-tailwindcss: ^0.3.0 @@ -258,7 +258,7 @@ importers: morgan: 1.10.0 nanoid: 3.3.4 postcss-import: 14.1.0_postcss@8.4.21 - posthog-js: 1.69.0 + posthog-js: 1.83.0 posthog-node: 3.1.1 prism-react-renderer: 1.3.5_react@18.2.0 prismjs: 1.29.0 @@ -26479,8 +26479,8 @@ packages: xtend: 4.0.2 dev: false - /posthog-js/1.69.0: - resolution: {integrity: sha512-VaeKxbwCBGG3cN1UdFOdb9DBnTHAT3ZoDVubUV3irr0kjB8jIQjWYlnBLkdg++RLPQwAFfsiAGam7EFvXJrZiw==} + /posthog-js/1.83.0: + resolution: {integrity: sha512-3dp/yNbRCYsOgvJovFUMCLv9/KxnwmGBy5Ft27Q7/rbW++iJXVR64liX7i0NrXkudjoL9j1GW1LGh84rV7kv8Q==} dependencies: fflate: 0.4.8 dev: false From cf33396dc0ed956e95be6456a441e5e44a0f1690 Mon Sep 17 00:00:00 2001 From: Rutam21 Date: Fri, 20 Oct 2023 02:45:46 +0530 Subject: [PATCH 04/19] [TRI-1425] Improve the Plain integration documentation --- docs/integrations/apis/plain-tasks.mdx | 213 +++++++++++++++++++++++++ docs/integrations/apis/plain.mdx | 150 +++-------------- docs/mint.json | 8 +- 3 files changed, 242 insertions(+), 129 deletions(-) create mode 100644 docs/integrations/apis/plain-tasks.mdx diff --git a/docs/integrations/apis/plain-tasks.mdx b/docs/integrations/apis/plain-tasks.mdx new file mode 100644 index 000000000..224a35bdb --- /dev/null +++ b/docs/integrations/apis/plain-tasks.mdx @@ -0,0 +1,213 @@ +--- +title: Plain tasks +sidebarTitle: Tasks +--- + +Tasks are executed after the job is triggered and are the main building blocks of a job. You can string together as many tasks as you want. + +--- + +## All tasks + +### `getCustomerById` + +Gets a customer using their id. [Official Plain Docs](https://plain-typescript-sdk-docs.vercel.app/classes/PlainClient.html#getCustomerById) + +```ts example.ts +const getCustomer = await io.plain.getCustomerById("get-customer", { + customerId: customer.id, // The customer's unique identifier, likely an ID. + }); +``` + +### `upsertCustomer` + +Creates or updates a customer. [Official Plain Docs](https://plain-typescript-sdk-docs.vercel.app/classes/PlainClient.html#upsertCustomer) + +```ts example.ts +run: async (payload, io, ctx) => { + // Inside this function, a new customer record is being upserted (inserted or updated). + + // Using object destructuring to extract the 'customer' object from the result of the asynchronous 'upsertCustomer' function. + const { customer } = await io.plain.upsertCustomer("upsert-customer", { + // Configuration for upserting a customer record: + + // Unique identifier for the customer record, in this case, based on the email address. + identifier: { + emailAddress: "rick.astley@gmail.com", + }, + + // 'onCreate' block defines what to do when a new customer gets created with the given identifier. + onCreate: { + email: { + email: "rick.astley@gmail.com", // Setting the email address. + isVerified: true, // Marking the email as verified. + }, + fullName: "Rick Astley", // Setting the full name. + externalId: "u_123", // Assigning an external identifier. + }, + + // 'onUpdate' block defines what to do when a customer with the given identifier already exists. + onUpdate: { + fullName: { + value: "Rick Astley", // Updating the full name. + }, + externalId: { + value: "u_123", // Updating the external identifier. + }, + }, + }); +} +``` + + +### `upsertCustomTimelineEntry` + +Creates or updates a timeline entry. [Official Plain Docs](https://plain-typescript-sdk-docs.vercel.app/classes/PlainClient.html#upsertCustomTimelineEntry) + +```ts example.ts +// Declaring a constant 'timelineEntry' and using 'await' to asynchronously execute the 'upsertCustomTimelineEntry' function. +const timelineEntry = await io.plain.upsertCustomTimelineEntry("upsert-timeline-entry", { + // Specifying properties for the timeline entry: + customerId: customer.id, // Assigning the 'customer.id' to the 'customerId' property. + title: "My timeline entry", // Assigning the title for the timeline entry. + + // Defining an array of 'components' that make up the timeline entry. + components: [ + { + // First component: A text component. + componentText: { + text: `This is a nice title`, // The text to display in this component. + }, + }, + { + // Second component: A divider component. + componentDivider: { + dividerSpacingSize: ComponentDividerSpacingSize.M, // Configuring the size of the divider. + }, + }, + { + // Third component: Another text component with additional properties. + componentText: { + textSize: ComponentTextSize.S, // Configuring the text size. + textColor: ComponentTextColor.Muted, // Configuring the text color. + text: "External id", // The text to display in this component. + }, + }, + { + // Fourth component: A text component that displays the 'externalId' property. + componentText: { + text: foundCustomer?.externalId ?? "", // Displaying the 'externalId' if available; otherwise, an empty string. + }, + }, + ], +}); + +``` + +## Using the underlying client + +You can also use the underlying client to do anything [@team-plain/typescript-sdk](https://github.com/team-plain/typescript-sdk) supports by using runTask: + +```ts example.ts +import { Plain } from "@trigger.dev/plain"; + +// Creating a new instance of the 'Plain' class and exporting it as 'plain'. +export const plain = new Plain({ + id: "plain", // Unique identifier for this 'Plain' instance. + apiKey: process.env.PLAIN_API_KEY!, // API key obtained from an environment variable. +}); + +// Defining a job using the 'defineJob' method on the 'client' object. +client.defineJob({ + id: "plain-client", // Unique identifier for this job. + name: "Plain Client", // Setting a name for the job. + version: "0.1.0", // Version number for this job. + integrations: { plain }, // Integrating the 'plain' object into this job. + trigger: eventTrigger({ + name: "plain.client", // Setting an event trigger with a name. + }), + run: async (payload, io, ctx) => { + // Inside the 'run' function, a task is being executed asynchronously. + + // Executing a task using the 'io.plain.runTask' method. + const result = await io.plain.runTask( + "create-issue", // Task name. + async (client) => + client.createIssue({ + customerId: "abcdefghij", + issueTypeId: "123456", + }), + { name: "Create issue" } + ); + }, +}); + +``` + +## Example usage + +In this example we'll create a task that updates or creates customer information based on an identifier. + +```ts example.ts +import { Job, TriggerClient, eventTrigger } from "@trigger.dev/sdk"; +import { + ComponentDividerSpacingSize, + ComponentTextColor, + ComponentTextSize, + Plain, +} from "@trigger.dev/plain"; + +// Creating an instance of the TriggerClient with a unique identifier "jobs-showcase." +const client = new TriggerClient({ id: "jobs-showcase" }); + +// Creating an instance of the Plain client. It uses an API key from an environment variable. +export const plain = new Plain({ + id: "plain", + apiKey: process.env.PLAIN_API_KEY!, +}); + +// Defining a job for updating customer information. +client.defineJob({ + id: "plain-update-customer", // Unique identifier for the job. + name: "Plain: update customer", // A specific name for the job. + version: "1.0.0", // Version number for the job. + integrations: { + plain, // Integrating the Plain client into this job. + }, + trigger: eventTrigger({ + name: "plain.update.customer", // Setting an event trigger with a specific name. + }), + run: async (payload, io, ctx) => { + // Inside the 'run' function, an operation is performed to update customer information. + + // Retrieving the 'customer' object using the 'io.plain.upsertCustomer' method. + const { customer } = await io.plain.upsertCustomer("upsert-customer", { + identifier: { + emailAddress: "rick.astley@gmail.com", + }, + // If the customer isn't found, they will be created with the following details. + onCreate: { + email: { + email: "rick.astley@gmail.com", + isVerified: true, + }, + fullName: "Rick Astley", + externalId: "u_123", + }, + // If the customer is found, their details will be updated. + onUpdate: { + fullName: { + value: "Rick Astley", + }, + externalId: { + value: "u_123", + }, + }, + }); + }, +}); + +// If you're not using Express, you can remove these lines. +import { createExpressServer } from "@trigger.dev/express"; +createExpressServer(client); +``` diff --git a/docs/integrations/apis/plain.mdx b/docs/integrations/apis/plain.mdx index a98f215a4..ee20c32f8 100644 --- a/docs/integrations/apis/plain.mdx +++ b/docs/integrations/apis/plain.mdx @@ -1,11 +1,23 @@ --- -title: Plain -description: Plain is customer support for developer tools +title: Plain overview & authentication +sidebarTitle: Overview & authentication --- - +## Overview -## Installation +Plain is the customer support tool for technical teams and products. +It aims to bring engineering and customer service teams together by creating a modern opinionated platform that's fantastic to build with. + + + + Check out pre-built Plain jobs in our showcase. + + +## Installing the Plain packages @@ -36,130 +48,12 @@ export const plain = new Plain({ }); ``` -## Create customers and timeline entries - -The Plain Integration allows you to create/update customers and add timeline entries. - -```ts -import { client } from "@/trigger"; -import { Job } from "@trigger.dev/sdk"; -import { Plain } from "@trigger.dev/plain"; - -export const plain = new Plain({ - id: "plain", - apiKey: process.env.PLAIN_API_KEY!, -}); - -client.defineJob({ - id: "plain-playground", - name: "Plain Playground", - version: "0.1.1", - integrations: { - plain, - }, - trigger: eventTrigger({ - name: "plain.playground", - }), - run: async (payload, io, ctx) => { - const { customer } = await io.plain.upsertCustomer("upsert-customer", { - identifier: { - emailAddress: "rick.astley@gmail.com", - }, - onCreate: { - email: { - email: "rick.astley@gmail.com", - isVerified: true, - }, - fullName: "Rick Astley", - externalId: "u_123", - }, - onUpdate: { - fullName: { - value: "Rick Astley", - }, - externalId: { - value: "u_123", - }, - }, - }); - - const foundCustomer = await io.plain.getCustomerById("get-customer", { - customerId: customer.id, - }); - - const timelineEntry = await io.plain.upsertCustomTimelineEntry("upsert-timeline-entry", { - customerId: customer.id, - title: "My timeline entry", - components: [ - { - componentText: { - text: `This is a nice title`, - }, - }, - { - componentDivider: { - dividerSpacingSize: ComponentDividerSpacingSize.M, - }, - }, - { - componentText: { - textSize: ComponentTextSize.S, - textColor: ComponentTextColor.Muted, - text: "External id", - }, - }, - { - componentText: { - text: foundCustomer?.externalId ?? "", - }, - }, - ], - }); - }, -}); -``` - ## Tasks -## All tasks +Once you have set up a Plain client, you can use it to create tasks. -| Function Name | Description | -| --------------------------- | ----------------------------------- | -| `getCustomerById` | Gets a customer using their id | -| `upsertCustomer` | Creates or updates a customer | -| `upsertCustomTimelineEntry` | Creates or updates a timeline entry | - -## Using the underlying client - -You can use the underlying client to do anything [@team-plain/typescript-sdk](https://github.com/team-plain/typescript-sdk) supports by using runTask: - -```ts -import { Plain } from "@trigger.dev/plain"; - -//create client -export const plain = new Plain({ - id: "plain", - apiKey: process.env.PLAIN_API_KEY!, -}); - -client.defineJob({ - id: "plain-client", - name: "Plain Client", - version: "0.1.0", - integrations: { plain }, - trigger: eventTrigger({ - name: "plain.client", - }), - run: async (payload, io, ctx) => { - const result = await io.plain.runTask( - "create-issue", - async (client) => - client.createIssue({ - customerId: "abcdefghij", - issueTypeId: "123456", - }), - { name: "Create issue" } - ); - }, -}); -``` + + + Perform tasks such as creating/updating customers and adding timeline entries. + + diff --git a/docs/mint.json b/docs/mint.json index 5abf8aa9e..8c1399778 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -248,7 +248,13 @@ }, "integrations/apis/linear", "integrations/apis/openai", - "integrations/apis/plain", + { + "group": "Plain", + "pages": [ + "integrations/apis/plain", + "integrations/apis/plain-tasks" + ] + }, "integrations/apis/replicate", "integrations/apis/resend", "integrations/apis/sendgrid", From 0adf41c7f063f72ba81ccfa8192fda5b6c01882b Mon Sep 17 00:00:00 2001 From: Alexandre Costa Date: Fri, 20 Oct 2023 06:16:44 -0300 Subject: [PATCH 05/19] Feat: add `maxDuration` setting for API/Trigger route in the CLI Init Command for Next.js (#617) * add cli init maxDuration to the api/trigger route for nextjs * refactor createTriggerRoute * move boxen log to createTriggerRoute function * refine detectNextVersion and versionNumberPattern regex to match the latest nextjs version * add tests for the detectNextVersion function * add changeset file * If the regex doesn't match, it returns null instead of throwing * Tweaked message about the max duration --------- Co-authored-by: Matt Aitken --- .changeset/twenty-mangos-hide.md | 5 + packages/cli/src/frameworks/nextjs/index.ts | 91 ++++++++++++------- .../cli/src/frameworks/nextjs/nextjs.test.ts | 31 ++++++- .../cli/src/templates/nextjs/appApiRoute.js | 3 + .../nextjs/pagesApiRouteWithConfigObject.js | 15 +++ 5 files changed, 112 insertions(+), 33 deletions(-) create mode 100644 .changeset/twenty-mangos-hide.md create mode 100644 packages/cli/src/templates/nextjs/pagesApiRouteWithConfigObject.js diff --git a/.changeset/twenty-mangos-hide.md b/.changeset/twenty-mangos-hide.md new file mode 100644 index 000000000..32ee48b9d --- /dev/null +++ b/.changeset/twenty-mangos-hide.md @@ -0,0 +1,5 @@ +--- +"@trigger.dev/cli": patch +--- + +Added Next.js `maxDuration` commented out to the api/trigger file using CLI init diff --git a/packages/cli/src/frameworks/nextjs/index.ts b/packages/cli/src/frameworks/nextjs/index.ts index d40710753..ffb1b625a 100644 --- a/packages/cli/src/frameworks/nextjs/index.ts +++ b/packages/cli/src/frameworks/nextjs/index.ts @@ -1,5 +1,6 @@ import fs from "fs/promises"; import pathModule from "path"; +import boxen from "boxen"; import { Framework } from ".."; import { templatesPath } from "../../paths"; import { InstallPackage } from "../../utils/addDependencies"; @@ -50,17 +51,46 @@ export class NextJs implements Framework { } const nextJsDir = await detectPagesOrAppDir(path); + const nextJsVersion = await detectNextVersion(path); const routeDir = pathModule.join(path, usesSrcDir ? "src" : ""); const pathAlias = await getPathAlias({ projectPath: path, isTypescriptProject: options.typescript, extraDirectories: usesSrcDir ? ["src"] : undefined, }); + const fileExtension = options.typescript ? ".ts" : ".js"; if (nextJsDir === "pages") { - await createTriggerPageRoute(routeDir, options.endpointSlug, options.typescript, pathAlias); + const apiRoutePath = pathModule.join(routeDir, "pages", "api", `trigger${fileExtension}`); + if (nextJsVersion && nextJsVersion !== 'latest' && nextJsVersion < "13.5") { + await createTriggerRoute({ + path: routeDir, + apiRoutePath, + template: "pagesApiRoute.js", + fileExtension, + endpointSlug: options.endpointSlug, + pathAlias + }); + } else { + await createTriggerRoute({ + path: routeDir, + apiRoutePath, + template: "pagesApiRouteWithConfigObject.js", + fileExtension, + endpointSlug: options.endpointSlug, + pathAlias + }); + } } else { - await createTriggerAppRoute(routeDir, options.endpointSlug, options.typescript, pathAlias); + const apiRoutePath = pathModule.join(routeDir, "app", "api", "trigger", `route${fileExtension}`); + await createTriggerRoute({ + path: routeDir, + apiRoutePath, + template: "appApiRoute.js", + fileExtension, + endpointSlug: options.endpointSlug, + pathAlias + }); } } @@ -144,45 +174,34 @@ export async function detectPagesOrAppDir(path: string): Promise<"pages" | "app" return "pages"; } -async function createTriggerPageRoute( - path: string, - endpointSlug: string, - isTypescriptProject: boolean, - pathAlias: string | undefined -) { - const templatesDir = pathModule.join(templatesPath(), "nextjs"); - const fileExtension = isTypescriptProject ? ".ts" : ".js"; - - //pages/api/trigger.js or src/pages/api/trigger.js - const apiRoutePath = pathModule.join(path, "pages", "api", `trigger${fileExtension}`); - const apiRouteResult = await createFileFromTemplate({ - templatePath: pathModule.join(templatesDir, "pagesApiRoute.js"), - replacements: { - routePathPrefix: pathAlias ? pathAlias + "/" : "../../", - }, - outputPath: apiRoutePath, - }); - if (!apiRouteResult.success) { - throw new Error("Failed to create API route file"); +export async function detectNextVersion(path: string) { + const packageJsonContent = await readPackageJson(path); + if (!packageJsonContent) { + return null; } - logger.success(`โœ” Created API route at ${apiRoutePath}`); - await createJobsAndTriggerFile(path, endpointSlug, fileExtension, pathAlias, templatesDir); + const versionNumberPattern = /[\d.]+|latest/; + if (packageJsonContent.dependencies?.next !== undefined) + return packageJsonContent.dependencies?.next?.match(versionNumberPattern)?.at(0) ?? null; + if (packageJsonContent.devDependencies?.next !== undefined) + return packageJsonContent.devDependencies?.next?.match(versionNumberPattern)?.at(0) ?? null; + + return null; } -async function createTriggerAppRoute( +async function createTriggerRoute(options: { path: string, + apiRoutePath: string, + template: string, + fileExtension: string, endpointSlug: string, - isTypescriptProject: boolean, pathAlias: string | undefined -) { - const templatesDir = pathModule.join(templatesPath(), "nextjs"); - const fileExtension = isTypescriptProject ? ".ts" : ".js"; +}) { + const { path, apiRoutePath, template, pathAlias, endpointSlug, fileExtension } = options; - //app/api/trigger/route.js or src/app/api/trigger/route.js - const apiRoutePath = pathModule.join(path, "app", "api", "trigger", `route${fileExtension}`); + const templatesDir = pathModule.join(templatesPath(), "nextjs"); const apiRouteResult = await createFileFromTemplate({ - templatePath: pathModule.join(templatesDir, "appApiRoute.js"), + templatePath: pathModule.join(templatesDir, template), replacements: { routePathPrefix: pathAlias ? pathAlias + "/" : "../../", }, @@ -192,6 +211,14 @@ async function createTriggerAppRoute( throw new Error("Failed to create API route file"); } logger.success(`โœ” Created API route at ${apiRoutePath}`); + logger.info( + boxen(`If you're deploying to Vercel, configure your max duration in ${apiRoutePath}`, { + padding: 1, + margin: 1, + borderStyle: "double", + borderColor: "magenta", + }) + ); await createJobsAndTriggerFile(path, endpointSlug, fileExtension, pathAlias, templatesDir); } diff --git a/packages/cli/src/frameworks/nextjs/nextjs.test.ts b/packages/cli/src/frameworks/nextjs/nextjs.test.ts index 38342637b..4af4263e2 100644 --- a/packages/cli/src/frameworks/nextjs/nextjs.test.ts +++ b/packages/cli/src/frameworks/nextjs/nextjs.test.ts @@ -1,5 +1,5 @@ import mock from "mock-fs"; -import { NextJs, detectPagesOrAppDir, detectUseOfSrcDir } from "."; +import { NextJs, detectPagesOrAppDir, detectUseOfSrcDir, detectNextVersion } from "."; import { getFramework } from ".."; import { pathExists } from "../../utils/fileSystem"; import { detectMiddlewareUsage } from "./middleware"; @@ -57,6 +57,35 @@ describe("Next project detection", () => { }); }); +describe("Next version detection", () => { + test("detect Nextjs latest version", async () => { + mock({ + "package.json": JSON.stringify({ dependencies: { next: "latest" } }), + }); + + const nextJsVersion = await detectNextVersion(""); + expect(nextJsVersion).toEqual("latest"); + }); + + test("detect Nextjs 13.0.0 version", async () => { + mock({ + "package.json": JSON.stringify({ dependencies: { next: "13.0.0" } }), + }); + + const nextJsVersion = await detectNextVersion(""); + expect(nextJsVersion).toEqual("13.0.0"); + }); + + test("detect Nextjs version as a dev dependency", async () => { + mock({ + "package.json": JSON.stringify({ devDependencies: { next: "^12.0.0" } }), + }); + + const nextJsVersion = await detectNextVersion(""); + expect(nextJsVersion).toEqual("12.0.0"); + }); +}); + describe("src directory", () => { test("has src directory", async () => { mock({ diff --git a/packages/cli/src/templates/nextjs/appApiRoute.js b/packages/cli/src/templates/nextjs/appApiRoute.js index 546336103..6c81a628c 100644 --- a/packages/cli/src/templates/nextjs/appApiRoute.js +++ b/packages/cli/src/templates/nextjs/appApiRoute.js @@ -5,3 +5,6 @@ import "${routePathPrefix}jobs"; //this route is used to send and receive data with Trigger.dev export const { POST, dynamic } = createAppRoute(client); + +//uncomment this to set a higher max duration (it must be inside your plan limits). Full docs: https://vercel.com/docs/functions/serverless-functions/runtimes#max-duration +//export const maxDuration = 60; \ No newline at end of file diff --git a/packages/cli/src/templates/nextjs/pagesApiRouteWithConfigObject.js b/packages/cli/src/templates/nextjs/pagesApiRouteWithConfigObject.js new file mode 100644 index 000000000..64d1c54cd --- /dev/null +++ b/packages/cli/src/templates/nextjs/pagesApiRouteWithConfigObject.js @@ -0,0 +1,15 @@ +import { createPagesRoute } from "@trigger.dev/nextjs"; +import { client } from "${routePathPrefix}trigger"; + +import "${routePathPrefix}jobs"; + +//uncomment this to set a higher max duration (it must be inside your plan limits). Full docs: https://vercel.com/docs/functions/serverless-functions/runtimes#max-duration +//export const config = { +// maxDuration: 60, +//}; + +//this route is used to send and receive data with Trigger.dev +const { handler, config } = createPagesRoute(client); +export { config }; + +export default handler; From 84af64165c36f93df8ce6744c44c73a02b2f8e3c Mon Sep 17 00:00:00 2001 From: Bhargav Shirin Nalamati Date: Fri, 20 Oct 2023 14:52:13 +0530 Subject: [PATCH 06/19] changed the title for contributors (#633) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 609dfd8ab..67aacddea 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ We provide an official trigger.dev docker image you can use to easily self-host To setup and develop locally or contribute to the open source project, follow our [development guide](./CONTRIBUTING.md). -## ๐Ÿ™ to our contributors +## Meet the Amazing People Behind This Project ๐Ÿš€ From abc9737a4f327107ca2c646b2c361d0b1fa149ff Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 20 Oct 2023 11:41:45 +0100 Subject: [PATCH 07/19] Tabler icons added to NamedIcon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 13ed268f1d6732ef28c6e4a9eeb927c1af822032 Author: Matt Aitken Date: Fri Oct 20 11:38:22 2023 +0100 Added all the tabler-icons to Storybook commit 62738d71a40f17c45c0b29332359b2b670233a97 Author: Matt Aitken Date: Fri Oct 20 11:38:09 2023 +0100 Use the no-stroke version of the tabler-sprite so we can control the stroke width commit a1b7edd57f8b2d3f2a5f4d96cbc9eb0a887f3442 Author: Matt Aitken Date: Fri Oct 20 11:37:54 2023 +0100 Set the default width to 1.5, so theyโ€™re a bit thinner commit 69ba38802b849376611678537f7d8e248b60086b Author: Matt Aitken Date: Fri Oct 20 10:55:34 2023 +0100 Added a tabler icon to an events job catalog job commit eb3c5f649d06adcc9ce0641f50e082ecdeead7a2 Author: Matt Aitken Date: Fri Oct 20 10:53:40 2023 +0100 Moved the tabler sprite to the app and use an import. This means itโ€™ll be cached and we can move it commit c24d76e6df9233b001a0242f8806076562ca2e90 Author: Chaturved Degloorkar <48447253+chaturrved@users.noreply.github.com> Date: Fri Oct 20 15:22:59 2023 +0530 feat: Add support for tabler-icons when using the icon for Tasks (#629) * Add support for tabler-icons * Changed the core update type from minor to a patch --------- Co-authored-by: Matt Aitken --- .changeset/slimy-moles-smash.md | 5 + .../app/components/primitives/NamedIcon.tsx | 16 + .../components/primitives/tabler-sprite.svg | 1 + .../components/stories/NamedIcon.stories.tsx | 40 +- apps/webapp/app/utils/icon.ts | 3 +- apps/webapp/app/utils/tablerIcons.ts | 4822 +++++++++++++++++ docs/sdk/io/runtask.mdx | 3 +- packages/core/src/schemas/api.ts | 2 +- references/job-catalog/src/events.ts | 14 +- 9 files changed, 4887 insertions(+), 19 deletions(-) create mode 100644 .changeset/slimy-moles-smash.md create mode 100644 apps/webapp/app/components/primitives/tabler-sprite.svg create mode 100644 apps/webapp/app/utils/tablerIcons.ts diff --git a/.changeset/slimy-moles-smash.md b/.changeset/slimy-moles-smash.md new file mode 100644 index 000000000..8dea53715 --- /dev/null +++ b/.changeset/slimy-moles-smash.md @@ -0,0 +1,5 @@ +--- +"@trigger.dev/core": patch +--- + +Updated icon documentation in runTasks diff --git a/apps/webapp/app/components/primitives/NamedIcon.tsx b/apps/webapp/app/components/primitives/NamedIcon.tsx index e06656e90..e0b7a5c0a 100644 --- a/apps/webapp/app/components/primitives/NamedIcon.tsx +++ b/apps/webapp/app/components/primitives/NamedIcon.tsx @@ -68,6 +68,8 @@ import { Spinner } from "./Spinner"; import { SaplingIcon } from "~/assets/icons/SaplingIcon"; import { TwoTreesIcon } from "~/assets/icons/TwoTreesIcon"; import { OneTreeIcon } from "~/assets/icons/OneTreeIcon"; +import { tablerIcons } from "~/utils/tablerIcons"; +import tablerSpritePath from "./tabler-sprite.svg"; const icons = { account: (className: string) => , @@ -215,6 +217,12 @@ export function NamedIcon({ ); } + if (tablerIcons.has("tabler-" + name)) { + return ; + } else if (name.startsWith("tabler-") && tablerIcons.has(name)) { + return ; + } + console.log(`Icon ${name} not found`); if (fallback) { @@ -247,3 +255,11 @@ export function NamedIconInBox({ ); } + +export function TablerIcon({ name, className }: { name: string; className?: string }) { + return ( + + + + ); +} diff --git a/apps/webapp/app/components/primitives/tabler-sprite.svg b/apps/webapp/app/components/primitives/tabler-sprite.svg new file mode 100644 index 000000000..1587c16d4 --- /dev/null +++ b/apps/webapp/app/components/primitives/tabler-sprite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/webapp/app/components/stories/NamedIcon.stories.tsx b/apps/webapp/app/components/stories/NamedIcon.stories.tsx index 2d7c6a4ba..658b6802e 100644 --- a/apps/webapp/app/components/stories/NamedIcon.stories.tsx +++ b/apps/webapp/app/components/stories/NamedIcon.stories.tsx @@ -1,6 +1,8 @@ import type { Meta, StoryObj } from "@storybook/react"; import { withDesign } from "storybook-addon-designs"; import { NamedIcon, iconNames } from "../primitives/NamedIcon"; +import { tablerIcons } from "~/utils/tablerIcons"; +import { Header1 } from "../primitives/Headers"; const meta: Meta = { title: "Icons", @@ -25,17 +27,35 @@ export const Basic: Story = { function NamedIcons() { return ( -
- {iconNames - .sort((a, b) => a.localeCompare(b)) - .map((iconName) => ( -
-
- +
+
+ Internal +
+ {iconNames + .sort((a, b) => a.localeCompare(b)) + .map((iconName) => ( +
+
+ +
+ {iconName} +
+ ))} +
+
+
+ Tabler +
+ {Array.from(tablerIcons).map((iconName) => ( +
+
+ +
+ {iconName}
- {iconName} -
- ))} + ))} +
+
); } diff --git a/apps/webapp/app/utils/icon.ts b/apps/webapp/app/utils/icon.ts index d3ee34bcc..ac36bd1cb 100644 --- a/apps/webapp/app/utils/icon.ts +++ b/apps/webapp/app/utils/icon.ts @@ -1,9 +1,10 @@ import { hasIcon } from "@trigger.dev/companyicons"; import { iconNames as namedIcons } from "~/components/primitives/NamedIcon"; +import { tablerIcons } from "~/utils/tablerIcons"; export const isValidIcon = (icon?: string): boolean => { if (!icon) { return false; } - return namedIcons.includes(icon) || hasIcon(icon); + return namedIcons.includes(icon) || hasIcon(icon) || tablerIcons.has(icon); }; diff --git a/apps/webapp/app/utils/tablerIcons.ts b/apps/webapp/app/utils/tablerIcons.ts new file mode 100644 index 000000000..559f08356 --- /dev/null +++ b/apps/webapp/app/utils/tablerIcons.ts @@ -0,0 +1,4822 @@ +const tablerIconNames = [ + "tabler-12-hours", + "tabler-123", + "tabler-24-hours", + "tabler-2fa", + "tabler-360-view", + "tabler-360", + "tabler-3d-cube-sphere-off", + "tabler-3d-cube-sphere", + "tabler-3d-rotate", + "tabler-a-b-2", + "tabler-a-b-off", + "tabler-a-b", + "tabler-abacus-off", + "tabler-abacus", + "tabler-abc", + "tabler-access-point-off", + "tabler-access-point", + "tabler-accessible-off-filled", + "tabler-accessible-off", + "tabler-accessible", + "tabler-activity-heartbeat", + "tabler-activity", + "tabler-ad-2", + "tabler-ad-circle-filled", + "tabler-ad-circle-off", + "tabler-ad-circle", + "tabler-ad-filled", + "tabler-ad-off", + "tabler-ad", + "tabler-address-book-off", + "tabler-address-book", + "tabler-adjustments-alt", + "tabler-adjustments-bolt", + "tabler-adjustments-cancel", + "tabler-adjustments-check", + "tabler-adjustments-code", + "tabler-adjustments-cog", + "tabler-adjustments-dollar", + "tabler-adjustments-down", + "tabler-adjustments-exclamation", + "tabler-adjustments-filled", + "tabler-adjustments-heart", + "tabler-adjustments-horizontal", + "tabler-adjustments-minus", + "tabler-adjustments-off", + "tabler-adjustments-pause", + "tabler-adjustments-pin", + "tabler-adjustments-plus", + "tabler-adjustments-question", + "tabler-adjustments-search", + "tabler-adjustments-share", + "tabler-adjustments-star", + "tabler-adjustments-up", + "tabler-adjustments-x", + "tabler-adjustments", + "tabler-aerial-lift", + "tabler-affiliate-filled", + "tabler-affiliate", + "tabler-air-balloon", + "tabler-air-conditioning-disabled", + "tabler-air-conditioning", + "tabler-air-traffic-control", + "tabler-alarm-average", + "tabler-alarm-filled", + "tabler-alarm-minus-filled", + "tabler-alarm-minus", + "tabler-alarm-off", + "tabler-alarm-plus-filled", + "tabler-alarm-plus", + "tabler-alarm-snooze-filled", + "tabler-alarm-snooze", + "tabler-alarm", + "tabler-album-off", + "tabler-album", + "tabler-alert-circle-filled", + "tabler-alert-circle-off", + "tabler-alert-circle", + "tabler-alert-hexagon-filled", + "tabler-alert-hexagon-off", + "tabler-alert-hexagon", + "tabler-alert-octagon-filled", + "tabler-alert-octagon", + "tabler-alert-small-off", + "tabler-alert-small", + "tabler-alert-square-filled", + "tabler-alert-square-rounded-filled", + "tabler-alert-square-rounded-off", + "tabler-alert-square-rounded", + "tabler-alert-square", + "tabler-alert-triangle-filled", + "tabler-alert-triangle-off", + "tabler-alert-triangle", + "tabler-alien-filled", + "tabler-alien", + "tabler-align-box-bottom-center-filled", + "tabler-align-box-bottom-center", + "tabler-align-box-bottom-left-filled", + "tabler-align-box-bottom-left", + "tabler-align-box-bottom-right-filled", + "tabler-align-box-bottom-right", + "tabler-align-box-center-bottom", + "tabler-align-box-center-middle-filled", + "tabler-align-box-center-middle", + "tabler-align-box-center-stretch", + "tabler-align-box-center-top", + "tabler-align-box-left-bottom-filled", + "tabler-align-box-left-bottom", + "tabler-align-box-left-middle-filled", + "tabler-align-box-left-middle", + "tabler-align-box-left-stretch", + "tabler-align-box-left-top-filled", + "tabler-align-box-left-top", + "tabler-align-box-right-bottom-filled", + "tabler-align-box-right-bottom", + "tabler-align-box-right-middle-filled", + "tabler-align-box-right-middle", + "tabler-align-box-right-stretch", + "tabler-align-box-right-top-filled", + "tabler-align-box-right-top", + "tabler-align-box-top-center-filled", + "tabler-align-box-top-center", + "tabler-align-box-top-left-filled", + "tabler-align-box-top-left", + "tabler-align-box-top-right-filled", + "tabler-align-box-top-right", + "tabler-align-center", + "tabler-align-justified", + "tabler-align-left", + "tabler-align-right", + "tabler-alpha", + "tabler-alphabet-cyrillic", + "tabler-alphabet-greek", + "tabler-alphabet-latin", + "tabler-alt", + "tabler-ambulance", + "tabler-ampersand", + "tabler-analyze-filled", + "tabler-analyze-off", + "tabler-analyze", + "tabler-anchor-off", + "tabler-anchor", + "tabler-angle", + "tabler-ankh", + "tabler-antenna-bars-1", + "tabler-antenna-bars-2", + "tabler-antenna-bars-3", + "tabler-antenna-bars-4", + "tabler-antenna-bars-5", + "tabler-antenna-bars-off", + "tabler-antenna-off", + "tabler-antenna", + "tabler-aperture-off", + "tabler-aperture", + "tabler-api-app-off", + "tabler-api-app", + "tabler-api-off", + "tabler-api", + "tabler-app-window-filled", + "tabler-app-window", + "tabler-apple", + "tabler-apps-filled", + "tabler-apps-off", + "tabler-apps", + "tabler-archery-arrow", + "tabler-archive-filled", + "tabler-archive-off", + "tabler-archive", + "tabler-armchair-2-off", + "tabler-armchair-2", + "tabler-armchair-off", + "tabler-armchair", + "tabler-arrow-autofit-content-filled", + "tabler-arrow-autofit-content", + "tabler-arrow-autofit-down", + "tabler-arrow-autofit-height", + "tabler-arrow-autofit-left", + "tabler-arrow-autofit-right", + "tabler-arrow-autofit-up", + "tabler-arrow-autofit-width", + "tabler-arrow-back-up-double", + "tabler-arrow-back-up", + "tabler-arrow-back", + "tabler-arrow-badge-down-filled", + "tabler-arrow-badge-down", + "tabler-arrow-badge-left-filled", + "tabler-arrow-badge-left", + "tabler-arrow-badge-right-filled", + "tabler-arrow-badge-right", + "tabler-arrow-badge-up-filled", + "tabler-arrow-badge-up", + "tabler-arrow-bar-both", + "tabler-arrow-bar-down", + "tabler-arrow-bar-left", + "tabler-arrow-bar-right", + "tabler-arrow-bar-to-down", + "tabler-arrow-bar-to-left", + "tabler-arrow-bar-to-right", + "tabler-arrow-bar-to-up", + "tabler-arrow-bar-up", + "tabler-arrow-bear-left-2", + "tabler-arrow-bear-left", + "tabler-arrow-bear-right-2", + "tabler-arrow-bear-right", + "tabler-arrow-big-down-filled", + "tabler-arrow-big-down-line-filled", + "tabler-arrow-big-down-line", + "tabler-arrow-big-down-lines-filled", + "tabler-arrow-big-down-lines", + "tabler-arrow-big-down", + "tabler-arrow-big-left-filled", + "tabler-arrow-big-left-line-filled", + "tabler-arrow-big-left-line", + "tabler-arrow-big-left-lines-filled", + "tabler-arrow-big-left-lines", + "tabler-arrow-big-left", + "tabler-arrow-big-right-filled", + "tabler-arrow-big-right-line-filled", + "tabler-arrow-big-right-line", + "tabler-arrow-big-right-lines-filled", + "tabler-arrow-big-right-lines", + "tabler-arrow-big-right", + "tabler-arrow-big-up-filled", + "tabler-arrow-big-up-line-filled", + "tabler-arrow-big-up-line", + "tabler-arrow-big-up-lines-filled", + "tabler-arrow-big-up-lines", + "tabler-arrow-big-up", + "tabler-arrow-bounce", + "tabler-arrow-capsule", + "tabler-arrow-curve-left", + "tabler-arrow-curve-right", + "tabler-arrow-down-bar", + "tabler-arrow-down-circle", + "tabler-arrow-down-left-circle", + "tabler-arrow-down-left", + "tabler-arrow-down-rhombus", + "tabler-arrow-down-right-circle", + "tabler-arrow-down-right", + "tabler-arrow-down-square", + "tabler-arrow-down-tail", + "tabler-arrow-down", + "tabler-arrow-elbow-left", + "tabler-arrow-elbow-right", + "tabler-arrow-fork", + "tabler-arrow-forward-up-double", + "tabler-arrow-forward-up", + "tabler-arrow-forward", + "tabler-arrow-guide", + "tabler-arrow-iteration", + "tabler-arrow-left-bar", + "tabler-arrow-left-circle", + "tabler-arrow-left-rhombus", + "tabler-arrow-left-right", + "tabler-arrow-left-square", + "tabler-arrow-left-tail", + "tabler-arrow-left", + "tabler-arrow-loop-left-2", + "tabler-arrow-loop-left", + "tabler-arrow-loop-right-2", + "tabler-arrow-loop-right", + "tabler-arrow-merge-alt-left", + "tabler-arrow-merge-alt-right", + "tabler-arrow-merge-both", + "tabler-arrow-merge-left", + "tabler-arrow-merge-right", + "tabler-arrow-merge", + "tabler-arrow-move-down", + "tabler-arrow-move-left", + "tabler-arrow-move-right", + "tabler-arrow-move-up", + "tabler-arrow-narrow-down", + "tabler-arrow-narrow-left", + "tabler-arrow-narrow-right", + "tabler-arrow-narrow-up", + "tabler-arrow-ramp-left-2", + "tabler-arrow-ramp-left-3", + "tabler-arrow-ramp-left", + "tabler-arrow-ramp-right-2", + "tabler-arrow-ramp-right-3", + "tabler-arrow-ramp-right", + "tabler-arrow-right-bar", + "tabler-arrow-right-circle", + "tabler-arrow-right-rhombus", + "tabler-arrow-right-square", + "tabler-arrow-right-tail", + "tabler-arrow-right", + "tabler-arrow-rotary-first-left", + "tabler-arrow-rotary-first-right", + "tabler-arrow-rotary-last-left", + "tabler-arrow-rotary-last-right", + "tabler-arrow-rotary-left", + "tabler-arrow-rotary-right", + "tabler-arrow-rotary-straight", + "tabler-arrow-roundabout-left", + "tabler-arrow-roundabout-right", + "tabler-arrow-sharp-turn-left", + "tabler-arrow-sharp-turn-right", + "tabler-arrow-up-bar", + "tabler-arrow-up-circle", + "tabler-arrow-up-left-circle", + "tabler-arrow-up-left", + "tabler-arrow-up-rhombus", + "tabler-arrow-up-right-circle", + "tabler-arrow-up-right", + "tabler-arrow-up-square", + "tabler-arrow-up-tail", + "tabler-arrow-up", + "tabler-arrow-wave-left-down", + "tabler-arrow-wave-left-up", + "tabler-arrow-wave-right-down", + "tabler-arrow-wave-right-up", + "tabler-arrow-zig-zag", + "tabler-arrows-cross", + "tabler-arrows-diagonal-2", + "tabler-arrows-diagonal-minimize-2", + "tabler-arrows-diagonal-minimize", + "tabler-arrows-diagonal", + "tabler-arrows-diff", + "tabler-arrows-double-ne-sw", + "tabler-arrows-double-nw-se", + "tabler-arrows-double-se-nw", + "tabler-arrows-double-sw-ne", + "tabler-arrows-down-up", + "tabler-arrows-down", + "tabler-arrows-exchange-2", + "tabler-arrows-exchange", + "tabler-arrows-horizontal", + "tabler-arrows-join-2", + "tabler-arrows-join", + "tabler-arrows-left-down", + "tabler-arrows-left-right", + "tabler-arrows-left", + "tabler-arrows-maximize", + "tabler-arrows-minimize", + "tabler-arrows-move-horizontal", + "tabler-arrows-move-vertical", + "tabler-arrows-move", + "tabler-arrows-random", + "tabler-arrows-right-down", + "tabler-arrows-right-left", + "tabler-arrows-right", + "tabler-arrows-shuffle-2", + "tabler-arrows-shuffle", + "tabler-arrows-sort", + "tabler-arrows-split-2", + "tabler-arrows-split", + "tabler-arrows-transfer-down", + "tabler-arrows-transfer-up", + "tabler-arrows-up-down", + "tabler-arrows-up-left", + "tabler-arrows-up-right", + "tabler-arrows-up", + "tabler-arrows-vertical", + "tabler-artboard-filled", + "tabler-artboard-off", + "tabler-artboard", + "tabler-article-filled-filled", + "tabler-article-off", + "tabler-article", + "tabler-aspect-ratio-filled", + "tabler-aspect-ratio-off", + "tabler-aspect-ratio", + "tabler-assembly-off", + "tabler-assembly", + "tabler-asset", + "tabler-asterisk-simple", + "tabler-asterisk", + "tabler-at-off", + "tabler-at", + "tabler-atom-2-filled", + "tabler-atom-2", + "tabler-atom-off", + "tabler-atom", + "tabler-augmented-reality-2", + "tabler-augmented-reality-off", + "tabler-augmented-reality", + "tabler-automatic-gearbox", + "tabler-award-filled", + "tabler-award-off", + "tabler-award", + "tabler-axe", + "tabler-axis-x", + "tabler-axis-y", + "tabler-baby-bottle", + "tabler-baby-carriage", + "tabler-backhoe", + "tabler-backpack-off", + "tabler-backpack", + "tabler-backslash", + "tabler-backspace-filled", + "tabler-backspace", + "tabler-badge-3d", + "tabler-badge-4k", + "tabler-badge-8k", + "tabler-badge-ad", + "tabler-badge-ar", + "tabler-badge-cc", + "tabler-badge-filled", + "tabler-badge-hd", + "tabler-badge-off", + "tabler-badge-sd", + "tabler-badge-tm", + "tabler-badge-vo", + "tabler-badge-vr", + "tabler-badge-wc", + "tabler-badge", + "tabler-badges-filled", + "tabler-badges-off", + "tabler-badges", + "tabler-baguette", + "tabler-ball-american-football-off", + "tabler-ball-american-football", + "tabler-ball-baseball", + "tabler-ball-basketball", + "tabler-ball-bowling", + "tabler-ball-football-off", + "tabler-ball-football", + "tabler-ball-tennis", + "tabler-ball-volleyball", + "tabler-balloon-filled", + "tabler-balloon-off", + "tabler-balloon", + "tabler-ballpen-filled", + "tabler-ballpen-off", + "tabler-ballpen", + "tabler-ban", + "tabler-bandage-filled", + "tabler-bandage-off", + "tabler-bandage", + "tabler-barbell-off", + "tabler-barbell", + "tabler-barcode-off", + "tabler-barcode", + "tabler-barrel-off", + "tabler-barrel", + "tabler-barrier-block-off", + "tabler-barrier-block", + "tabler-baseline-density-large", + "tabler-baseline-density-medium", + "tabler-baseline-density-small", + "tabler-baseline", + "tabler-basket-bolt", + "tabler-basket-cancel", + "tabler-basket-check", + "tabler-basket-code", + "tabler-basket-cog", + "tabler-basket-discount", + "tabler-basket-dollar", + "tabler-basket-down", + "tabler-basket-exclamation", + "tabler-basket-filled", + "tabler-basket-heart", + "tabler-basket-minus", + "tabler-basket-off", + "tabler-basket-pause", + "tabler-basket-pin", + "tabler-basket-plus", + "tabler-basket-question", + "tabler-basket-search", + "tabler-basket-share", + "tabler-basket-star", + "tabler-basket-up", + "tabler-basket-x", + "tabler-basket", + "tabler-bat", + "tabler-bath-filled", + "tabler-bath-off", + "tabler-bath", + "tabler-battery-1-filled", + "tabler-battery-1", + "tabler-battery-2-filled", + "tabler-battery-2", + "tabler-battery-3-filled", + "tabler-battery-3", + "tabler-battery-4-filled", + "tabler-battery-4", + "tabler-battery-automotive", + "tabler-battery-charging-2", + "tabler-battery-charging", + "tabler-battery-eco", + "tabler-battery-filled", + "tabler-battery-off", + "tabler-battery", + "tabler-beach-off", + "tabler-beach", + "tabler-bed-filled", + "tabler-bed-flat", + "tabler-bed-off", + "tabler-bed", + "tabler-beer-filled", + "tabler-beer-off", + "tabler-beer", + "tabler-bell-bolt", + "tabler-bell-cancel", + "tabler-bell-check", + "tabler-bell-code", + "tabler-bell-cog", + "tabler-bell-dollar", + "tabler-bell-down", + "tabler-bell-exclamation", + "tabler-bell-filled", + "tabler-bell-heart", + "tabler-bell-minus-filled", + "tabler-bell-minus", + "tabler-bell-off", + "tabler-bell-pause", + "tabler-bell-pin", + "tabler-bell-plus-filled", + "tabler-bell-plus", + "tabler-bell-question", + "tabler-bell-ringing-2-filled", + "tabler-bell-ringing-2", + "tabler-bell-ringing-filled", + "tabler-bell-ringing", + "tabler-bell-school", + "tabler-bell-search", + "tabler-bell-share", + "tabler-bell-star", + "tabler-bell-up", + "tabler-bell-x-filled", + "tabler-bell-x", + "tabler-bell-z-filled", + "tabler-bell-z", + "tabler-bell", + "tabler-beta", + "tabler-bible", + "tabler-bike-off", + "tabler-bike", + "tabler-binary-off", + "tabler-binary-tree-2", + "tabler-binary-tree", + "tabler-binary", + "tabler-biohazard-off", + "tabler-biohazard", + "tabler-blade-filled", + "tabler-blade", + "tabler-bleach-chlorine", + "tabler-bleach-no-chlorine", + "tabler-bleach-off", + "tabler-bleach", + "tabler-blender", + "tabler-blockquote", + "tabler-bluetooth-connected", + "tabler-bluetooth-off", + "tabler-bluetooth-x", + "tabler-bluetooth", + "tabler-blur-off", + "tabler-blur", + "tabler-bmp", + "tabler-body-scan", + "tabler-bold-off", + "tabler-bold", + "tabler-bolt-off", + "tabler-bolt", + "tabler-bomb-filled", + "tabler-bomb", + "tabler-bone-off", + "tabler-bone", + "tabler-bong-off", + "tabler-bong", + "tabler-book-2", + "tabler-book-download", + "tabler-book-filled", + "tabler-book-off", + "tabler-book-upload", + "tabler-book", + "tabler-bookmark-ai", + "tabler-bookmark-edit", + "tabler-bookmark-filled", + "tabler-bookmark-minus", + "tabler-bookmark-off", + "tabler-bookmark-plus", + "tabler-bookmark-question", + "tabler-bookmark", + "tabler-bookmarks-filled", + "tabler-bookmarks-off", + "tabler-bookmarks", + "tabler-books-off", + "tabler-books", + "tabler-border-all", + "tabler-border-bottom", + "tabler-border-corners", + "tabler-border-horizontal", + "tabler-border-inner", + "tabler-border-left", + "tabler-border-none", + "tabler-border-outer", + "tabler-border-radius", + "tabler-border-right", + "tabler-border-sides", + "tabler-border-style-2", + "tabler-border-style", + "tabler-border-top", + "tabler-border-vertical", + "tabler-bottle-filled", + "tabler-bottle-off", + "tabler-bottle", + "tabler-bounce-left-filled", + "tabler-bounce-left", + "tabler-bounce-right-filled", + "tabler-bounce-right", + "tabler-bow", + "tabler-bowl-filled", + "tabler-bowl", + "tabler-box-align-bottom-filled", + "tabler-box-align-bottom-left-filled", + "tabler-box-align-bottom-left", + "tabler-box-align-bottom-right-filled", + "tabler-box-align-bottom-right", + "tabler-box-align-bottom", + "tabler-box-align-left-filled", + "tabler-box-align-left", + "tabler-box-align-right-filled", + "tabler-box-align-right", + "tabler-box-align-top-filled", + "tabler-box-align-top-left-filled", + "tabler-box-align-top-left", + "tabler-box-align-top-right-filled", + "tabler-box-align-top-right", + "tabler-box-align-top", + "tabler-box-margin", + "tabler-box-model-2-off", + "tabler-box-model-2", + "tabler-box-model-off", + "tabler-box-model", + "tabler-box-multiple-0", + "tabler-box-multiple-1", + "tabler-box-multiple-2", + "tabler-box-multiple-3", + "tabler-box-multiple-4", + "tabler-box-multiple-5", + "tabler-box-multiple-6", + "tabler-box-multiple-7", + "tabler-box-multiple-8", + "tabler-box-multiple-9", + "tabler-box-multiple", + "tabler-box-off", + "tabler-box-padding", + "tabler-box-seam", + "tabler-box", + "tabler-braces-off", + "tabler-braces", + "tabler-brackets-angle-off", + "tabler-brackets-angle", + "tabler-brackets-contain-end", + "tabler-brackets-contain-start", + "tabler-brackets-contain", + "tabler-brackets-off", + "tabler-brackets", + "tabler-braille", + "tabler-brain", + "tabler-brand-4chan", + "tabler-brand-abstract", + "tabler-brand-adobe", + "tabler-brand-adonis-js", + "tabler-brand-airbnb", + "tabler-brand-airtable", + "tabler-brand-algolia", + "tabler-brand-alipay", + "tabler-brand-alpine-js", + "tabler-brand-amazon", + "tabler-brand-amd", + "tabler-brand-amigo", + "tabler-brand-among-us", + "tabler-brand-android", + "tabler-brand-angular", + "tabler-brand-ansible", + "tabler-brand-ao3", + "tabler-brand-appgallery", + "tabler-brand-apple-arcade", + "tabler-brand-apple-podcast", + "tabler-brand-apple", + "tabler-brand-appstore", + "tabler-brand-asana", + "tabler-brand-auth0", + "tabler-brand-aws", + "tabler-brand-azure", + "tabler-brand-backbone", + "tabler-brand-badoo", + "tabler-brand-baidu", + "tabler-brand-bandcamp", + "tabler-brand-bandlab", + "tabler-brand-beats", + "tabler-brand-behance", + "tabler-brand-bilibili", + "tabler-brand-binance", + "tabler-brand-bing", + "tabler-brand-bitbucket", + "tabler-brand-blackberry", + "tabler-brand-blender", + "tabler-brand-blogger", + "tabler-brand-booking", + "tabler-brand-bootstrap", + "tabler-brand-bulma", + "tabler-brand-bumble", + "tabler-brand-bunpo", + "tabler-brand-c-sharp", + "tabler-brand-cake", + "tabler-brand-cakephp", + "tabler-brand-campaignmonitor", + "tabler-brand-carbon", + "tabler-brand-cashapp", + "tabler-brand-chrome", + "tabler-brand-cinema-4d", + "tabler-brand-citymapper", + "tabler-brand-cloudflare", + "tabler-brand-codecov", + "tabler-brand-codepen", + "tabler-brand-codesandbox", + "tabler-brand-cohost", + "tabler-brand-coinbase", + "tabler-brand-comedy-central", + "tabler-brand-coreos", + "tabler-brand-couchdb", + "tabler-brand-couchsurfing", + "tabler-brand-cpp", + "tabler-brand-craft", + "tabler-brand-crunchbase", + "tabler-brand-css3", + "tabler-brand-ctemplar", + "tabler-brand-cucumber", + "tabler-brand-cupra", + "tabler-brand-cypress", + "tabler-brand-d3", + "tabler-brand-databricks", + "tabler-brand-days-counter", + "tabler-brand-dcos", + "tabler-brand-debian", + "tabler-brand-deezer", + "tabler-brand-deliveroo", + "tabler-brand-deno", + "tabler-brand-denodo", + "tabler-brand-deviantart", + "tabler-brand-digg", + "tabler-brand-dingtalk", + "tabler-brand-discord-filled", + "tabler-brand-discord", + "tabler-brand-disney", + "tabler-brand-disqus", + "tabler-brand-django", + "tabler-brand-docker", + "tabler-brand-doctrine", + "tabler-brand-dolby-digital", + "tabler-brand-douban", + "tabler-brand-dribbble-filled", + "tabler-brand-dribbble", + "tabler-brand-drops", + "tabler-brand-drupal", + "tabler-brand-edge", + "tabler-brand-elastic", + "tabler-brand-electronic-arts", + "tabler-brand-ember", + "tabler-brand-envato", + "tabler-brand-etsy", + "tabler-brand-evernote", + "tabler-brand-facebook-filled", + "tabler-brand-facebook", + "tabler-brand-feedly", + "tabler-brand-figma", + "tabler-brand-filezilla", + "tabler-brand-finder", + "tabler-brand-firebase", + "tabler-brand-firefox", + "tabler-brand-fiverr", + "tabler-brand-flickr", + "tabler-brand-flightradar24", + "tabler-brand-flipboard", + "tabler-brand-flutter", + "tabler-brand-fortnite", + "tabler-brand-foursquare", + "tabler-brand-framer-motion", + "tabler-brand-framer", + "tabler-brand-funimation", + "tabler-brand-gatsby", + "tabler-brand-git", + "tabler-brand-github-copilot", + "tabler-brand-github-filled", + "tabler-brand-github", + "tabler-brand-gitlab", + "tabler-brand-gmail", + "tabler-brand-golang", + "tabler-brand-google-analytics", + "tabler-brand-google-big-query", + "tabler-brand-google-drive", + "tabler-brand-google-fit", + "tabler-brand-google-home", + "tabler-brand-google-maps", + "tabler-brand-google-one", + "tabler-brand-google-photos", + "tabler-brand-google-play", + "tabler-brand-google-podcasts", + "tabler-brand-google", + "tabler-brand-grammarly", + "tabler-brand-graphql", + "tabler-brand-gravatar", + "tabler-brand-grindr", + "tabler-brand-guardian", + "tabler-brand-gumroad", + "tabler-brand-hbo", + "tabler-brand-headlessui", + "tabler-brand-hexo", + "tabler-brand-hipchat", + "tabler-brand-html5", + "tabler-brand-inertia", + "tabler-brand-instagram", + "tabler-brand-intercom", + "tabler-brand-itch", + "tabler-brand-javascript", + "tabler-brand-juejin", + "tabler-brand-kbin", + "tabler-brand-kick", + "tabler-brand-kickstarter", + "tabler-brand-kotlin", + "tabler-brand-laravel", + "tabler-brand-lastfm", + "tabler-brand-leetcode", + "tabler-brand-letterboxd", + "tabler-brand-line", + "tabler-brand-linkedin", + "tabler-brand-linktree", + "tabler-brand-linqpad", + "tabler-brand-loom", + "tabler-brand-mailgun", + "tabler-brand-mantine", + "tabler-brand-mastercard", + "tabler-brand-mastodon", + "tabler-brand-matrix", + "tabler-brand-mcdonalds", + "tabler-brand-medium", + "tabler-brand-meetup", + "tabler-brand-mercedes", + "tabler-brand-messenger", + "tabler-brand-meta", + "tabler-brand-minecraft", + "tabler-brand-miniprogram", + "tabler-brand-mixpanel", + "tabler-brand-monday", + "tabler-brand-mongodb", + "tabler-brand-my-oppo", + "tabler-brand-mysql", + "tabler-brand-national-geographic", + "tabler-brand-nem", + "tabler-brand-netbeans", + "tabler-brand-netease-music", + "tabler-brand-netflix", + "tabler-brand-nexo", + "tabler-brand-nextcloud", + "tabler-brand-nextjs", + "tabler-brand-nodejs", + "tabler-brand-nord-vpn", + "tabler-brand-notion", + "tabler-brand-npm", + "tabler-brand-nuxt", + "tabler-brand-nytimes", + "tabler-brand-oauth", + "tabler-brand-office", + "tabler-brand-ok-ru", + "tabler-brand-onedrive", + "tabler-brand-onlyfans", + "tabler-brand-open-source", + "tabler-brand-openai", + "tabler-brand-openvpn", + "tabler-brand-opera", + "tabler-brand-pagekit", + "tabler-brand-parsinta", + "tabler-brand-patreon-filled", + "tabler-brand-patreon", + "tabler-brand-paypal-filled", + "tabler-brand-paypal", + "tabler-brand-paypay", + "tabler-brand-peanut", + "tabler-brand-pepsi", + "tabler-brand-php", + "tabler-brand-picsart", + "tabler-brand-pinterest", + "tabler-brand-planetscale", + "tabler-brand-pocket", + "tabler-brand-polymer", + "tabler-brand-powershell", + "tabler-brand-prisma", + "tabler-brand-producthunt", + "tabler-brand-pushbullet", + "tabler-brand-pushover", + "tabler-brand-python", + "tabler-brand-qq", + "tabler-brand-radix-ui", + "tabler-brand-react-native", + "tabler-brand-react", + "tabler-brand-reason", + "tabler-brand-reddit", + "tabler-brand-redhat", + "tabler-brand-redux", + "tabler-brand-revolut", + "tabler-brand-rumble", + "tabler-brand-rust", + "tabler-brand-safari", + "tabler-brand-samsungpass", + "tabler-brand-sass", + "tabler-brand-sentry", + "tabler-brand-sharik", + "tabler-brand-shazam", + "tabler-brand-shopee", + "tabler-brand-sketch", + "tabler-brand-skype", + "tabler-brand-slack", + "tabler-brand-snapchat", + "tabler-brand-snapseed", + "tabler-brand-snowflake", + "tabler-brand-socket-io", + "tabler-brand-solidjs", + "tabler-brand-soundcloud", + "tabler-brand-spacehey", + "tabler-brand-speedtest", + "tabler-brand-spotify", + "tabler-brand-stackoverflow", + "tabler-brand-stackshare", + "tabler-brand-steam", + "tabler-brand-storj", + "tabler-brand-storybook", + "tabler-brand-storytel", + "tabler-brand-strava", + "tabler-brand-stripe", + "tabler-brand-sublime-text", + "tabler-brand-sugarizer", + "tabler-brand-supabase", + "tabler-brand-superhuman", + "tabler-brand-supernova", + "tabler-brand-surfshark", + "tabler-brand-svelte", + "tabler-brand-swift", + "tabler-brand-symfony", + "tabler-brand-tabler", + "tabler-brand-tailwind", + "tabler-brand-taobao", + "tabler-brand-teams", + "tabler-brand-ted", + "tabler-brand-telegram", + "tabler-brand-terraform", + "tabler-brand-tether", + "tabler-brand-threads", + "tabler-brand-threejs", + "tabler-brand-tidal", + "tabler-brand-tiktok-filled", + "tabler-brand-tiktok", + "tabler-brand-tinder", + "tabler-brand-topbuzz", + "tabler-brand-torchain", + "tabler-brand-toyota", + "tabler-brand-trello", + "tabler-brand-tripadvisor", + "tabler-brand-tumblr", + "tabler-brand-twilio", + "tabler-brand-twitch", + "tabler-brand-twitter-filled", + "tabler-brand-twitter", + "tabler-brand-typescript", + "tabler-brand-uber", + "tabler-brand-ubuntu", + "tabler-brand-unity", + "tabler-brand-unsplash", + "tabler-brand-upwork", + "tabler-brand-valorant", + "tabler-brand-vercel", + "tabler-brand-vimeo", + "tabler-brand-vinted", + "tabler-brand-visa", + "tabler-brand-visual-studio", + "tabler-brand-vite", + "tabler-brand-vivaldi", + "tabler-brand-vk", + "tabler-brand-vlc", + "tabler-brand-volkswagen", + "tabler-brand-vsco", + "tabler-brand-vscode", + "tabler-brand-vue", + "tabler-brand-walmart", + "tabler-brand-waze", + "tabler-brand-webflow", + "tabler-brand-wechat", + "tabler-brand-weibo", + "tabler-brand-whatsapp", + "tabler-brand-wikipedia", + "tabler-brand-windows", + "tabler-brand-windy", + "tabler-brand-wish", + "tabler-brand-wix", + "tabler-brand-wordpress", + "tabler-brand-x-filled", + "tabler-brand-x", + "tabler-brand-xamarin", + "tabler-brand-xbox", + "tabler-brand-xdeep", + "tabler-brand-xing", + "tabler-brand-yahoo", + "tabler-brand-yandex", + "tabler-brand-yatse", + "tabler-brand-ycombinator", + "tabler-brand-youtube-filled", + "tabler-brand-youtube-kids", + "tabler-brand-youtube", + "tabler-brand-zalando", + "tabler-brand-zapier", + "tabler-brand-zeit", + "tabler-brand-zhihu", + "tabler-brand-zoom", + "tabler-brand-zulip", + "tabler-brand-zwift", + "tabler-bread-off", + "tabler-bread", + "tabler-briefcase-2", + "tabler-briefcase-filled", + "tabler-briefcase-off", + "tabler-briefcase", + "tabler-brightness-2", + "tabler-brightness-down-filled", + "tabler-brightness-down", + "tabler-brightness-half", + "tabler-brightness-off", + "tabler-brightness-up-filled", + "tabler-brightness-up", + "tabler-brightness", + "tabler-broadcast-off", + "tabler-broadcast", + "tabler-browser-check", + "tabler-browser-off", + "tabler-browser-plus", + "tabler-browser-x", + "tabler-browser", + "tabler-brush-off", + "tabler-brush", + "tabler-bucket-droplet", + "tabler-bucket-off", + "tabler-bucket", + "tabler-bug-filled", + "tabler-bug-off", + "tabler-bug", + "tabler-building-arch", + "tabler-building-bank", + "tabler-building-bridge-2", + "tabler-building-bridge", + "tabler-building-broadcast-tower", + "tabler-building-carousel", + "tabler-building-castle", + "tabler-building-church", + "tabler-building-circus", + "tabler-building-community", + "tabler-building-cottage", + "tabler-building-estate", + "tabler-building-factory-2", + "tabler-building-factory", + "tabler-building-fortress", + "tabler-building-hospital", + "tabler-building-lighthouse", + "tabler-building-monument", + "tabler-building-mosque", + "tabler-building-pavilion", + "tabler-building-skyscraper", + "tabler-building-stadium", + "tabler-building-store", + "tabler-building-tunnel", + "tabler-building-warehouse", + "tabler-building-wind-turbine", + "tabler-building", + "tabler-bulb-filled", + "tabler-bulb-off", + "tabler-bulb", + "tabler-bulldozer", + "tabler-burger", + "tabler-bus-off", + "tabler-bus-stop", + "tabler-bus", + "tabler-businessplan", + "tabler-butterfly", + "tabler-cactus-filled", + "tabler-cactus-off", + "tabler-cactus", + "tabler-cake-off", + "tabler-cake", + "tabler-calculator-filled", + "tabler-calculator-off", + "tabler-calculator", + "tabler-calendar-bolt", + "tabler-calendar-cancel", + "tabler-calendar-check", + "tabler-calendar-code", + "tabler-calendar-cog", + "tabler-calendar-dollar", + "tabler-calendar-down", + "tabler-calendar-due", + "tabler-calendar-event", + "tabler-calendar-exclamation", + "tabler-calendar-filled", + "tabler-calendar-heart", + "tabler-calendar-minus", + "tabler-calendar-off", + "tabler-calendar-pause", + "tabler-calendar-pin", + "tabler-calendar-plus", + "tabler-calendar-question", + "tabler-calendar-repeat", + "tabler-calendar-search", + "tabler-calendar-share", + "tabler-calendar-star", + "tabler-calendar-stats", + "tabler-calendar-time", + "tabler-calendar-up", + "tabler-calendar-x", + "tabler-calendar", + "tabler-camera-bolt", + "tabler-camera-cancel", + "tabler-camera-check", + "tabler-camera-code", + "tabler-camera-cog", + "tabler-camera-dollar", + "tabler-camera-down", + "tabler-camera-exclamation", + "tabler-camera-filled", + "tabler-camera-heart", + "tabler-camera-minus", + "tabler-camera-off", + "tabler-camera-pause", + "tabler-camera-pin", + "tabler-camera-plus", + "tabler-camera-question", + "tabler-camera-rotate", + "tabler-camera-search", + "tabler-camera-selfie", + "tabler-camera-share", + "tabler-camera-star", + "tabler-camera-up", + "tabler-camera-x", + "tabler-camera", + "tabler-camper", + "tabler-campfire-filled", + "tabler-campfire", + "tabler-candle-filled", + "tabler-candle", + "tabler-candy-off", + "tabler-candy", + "tabler-cane", + "tabler-cannabis", + "tabler-capsule-filled", + "tabler-capsule-horizontal-filled", + "tabler-capsule-horizontal", + "tabler-capsule", + "tabler-capture-filled", + "tabler-capture-off", + "tabler-capture", + "tabler-car-crane", + "tabler-car-crash", + "tabler-car-garage", + "tabler-car-off", + "tabler-car-suv", + "tabler-car-turbine", + "tabler-car", + "tabler-caravan", + "tabler-cardboards-off", + "tabler-cardboards", + "tabler-cards-filled", + "tabler-cards", + "tabler-caret-down-filled", + "tabler-caret-down", + "tabler-caret-left-filled", + "tabler-caret-left-right-filled", + "tabler-caret-left-right", + "tabler-caret-left", + "tabler-caret-right-filled", + "tabler-caret-right", + "tabler-caret-up-down-filled", + "tabler-caret-up-down", + "tabler-caret-up-filled", + "tabler-caret-up", + "tabler-carousel-horizontal-filled", + "tabler-carousel-horizontal", + "tabler-carousel-vertical-filled", + "tabler-carousel-vertical", + "tabler-carrot-off", + "tabler-carrot", + "tabler-cash-banknote-off", + "tabler-cash-banknote", + "tabler-cash-off", + "tabler-cash", + "tabler-cast-off", + "tabler-cast", + "tabler-cat", + "tabler-category-2", + "tabler-category-filled", + "tabler-category", + "tabler-ce-off", + "tabler-ce", + "tabler-cell-signal-1", + "tabler-cell-signal-2", + "tabler-cell-signal-3", + "tabler-cell-signal-4", + "tabler-cell-signal-5", + "tabler-cell-signal-off", + "tabler-cell", + "tabler-certificate-2-off", + "tabler-certificate-2", + "tabler-certificate-off", + "tabler-certificate", + "tabler-chair-director", + "tabler-chalkboard-off", + "tabler-chalkboard", + "tabler-charging-pile", + "tabler-chart-arcs-3", + "tabler-chart-arcs", + "tabler-chart-area-filled", + "tabler-chart-area-line-filled", + "tabler-chart-area-line", + "tabler-chart-area", + "tabler-chart-arrows-vertical", + "tabler-chart-arrows", + "tabler-chart-bar-off", + "tabler-chart-bar", + "tabler-chart-bubble-filled", + "tabler-chart-bubble", + "tabler-chart-candle-filled", + "tabler-chart-candle", + "tabler-chart-circles", + "tabler-chart-donut-2", + "tabler-chart-donut-3", + "tabler-chart-donut-4", + "tabler-chart-donut-filled", + "tabler-chart-donut", + "tabler-chart-dots-2", + "tabler-chart-dots-3", + "tabler-chart-dots-filled", + "tabler-chart-dots", + "tabler-chart-grid-dots-filled", + "tabler-chart-grid-dots", + "tabler-chart-histogram", + "tabler-chart-infographic", + "tabler-chart-line", + "tabler-chart-pie-2", + "tabler-chart-pie-3", + "tabler-chart-pie-4", + "tabler-chart-pie-filled", + "tabler-chart-pie-off", + "tabler-chart-pie", + "tabler-chart-ppf", + "tabler-chart-radar", + "tabler-chart-sankey", + "tabler-chart-treemap", + "tabler-check", + "tabler-checkbox", + "tabler-checklist", + "tabler-checks", + "tabler-checkup-list", + "tabler-cheese", + "tabler-chef-hat-off", + "tabler-chef-hat", + "tabler-cherry-filled", + "tabler-cherry", + "tabler-chess-bishop-filled", + "tabler-chess-bishop", + "tabler-chess-filled", + "tabler-chess-king-filled", + "tabler-chess-king", + "tabler-chess-knight-filled", + "tabler-chess-knight", + "tabler-chess-queen-filled", + "tabler-chess-queen", + "tabler-chess-rook-filled", + "tabler-chess-rook", + "tabler-chess", + "tabler-chevron-compact-down", + "tabler-chevron-compact-left", + "tabler-chevron-compact-right", + "tabler-chevron-compact-up", + "tabler-chevron-down-left", + "tabler-chevron-down-right", + "tabler-chevron-down", + "tabler-chevron-left-pipe", + "tabler-chevron-left", + "tabler-chevron-right-pipe", + "tabler-chevron-right", + "tabler-chevron-up-left", + "tabler-chevron-up-right", + "tabler-chevron-up", + "tabler-chevrons-down-left", + "tabler-chevrons-down-right", + "tabler-chevrons-down", + "tabler-chevrons-left", + "tabler-chevrons-right", + "tabler-chevrons-up-left", + "tabler-chevrons-up-right", + "tabler-chevrons-up", + "tabler-chisel", + "tabler-christmas-tree-off", + "tabler-christmas-tree", + "tabler-circle-0-filled", + "tabler-circle-1-filled", + "tabler-circle-2-filled", + "tabler-circle-3-filled", + "tabler-circle-4-filled", + "tabler-circle-5-filled", + "tabler-circle-6-filled", + "tabler-circle-7-filled", + "tabler-circle-8-filled", + "tabler-circle-9-filled", + "tabler-circle-arrow-down-filled", + "tabler-circle-arrow-down-left-filled", + "tabler-circle-arrow-down-left", + "tabler-circle-arrow-down-right-filled", + "tabler-circle-arrow-down-right", + "tabler-circle-arrow-down", + "tabler-circle-arrow-left-filled", + "tabler-circle-arrow-left", + "tabler-circle-arrow-right-filled", + "tabler-circle-arrow-right", + "tabler-circle-arrow-up-filled", + "tabler-circle-arrow-up-left-filled", + "tabler-circle-arrow-up-left", + "tabler-circle-arrow-up-right-filled", + "tabler-circle-arrow-up-right", + "tabler-circle-arrow-up", + "tabler-circle-caret-down", + "tabler-circle-caret-left", + "tabler-circle-caret-right", + "tabler-circle-caret-up", + "tabler-circle-check-filled", + "tabler-circle-check", + "tabler-circle-chevron-down", + "tabler-circle-chevron-left", + "tabler-circle-chevron-right", + "tabler-circle-chevron-up", + "tabler-circle-chevrons-down", + "tabler-circle-chevrons-left", + "tabler-circle-chevrons-right", + "tabler-circle-chevrons-up", + "tabler-circle-dashed-number-0", + "tabler-circle-dashed-number-1", + "tabler-circle-dashed-number-2", + "tabler-circle-dashed-number-3", + "tabler-circle-dashed-number-4", + "tabler-circle-dashed-number-5", + "tabler-circle-dashed-number-6", + "tabler-circle-dashed-number-7", + "tabler-circle-dashed-number-8", + "tabler-circle-dashed-number-9", + "tabler-circle-dashed-x", + "tabler-circle-dashed", + "tabler-circle-dot-filled", + "tabler-circle-dot", + "tabler-circle-dotted", + "tabler-circle-filled", + "tabler-circle-half-2", + "tabler-circle-half-vertical", + "tabler-circle-half", + "tabler-circle-key-filled", + "tabler-circle-key", + "tabler-circle-letter-a", + "tabler-circle-letter-b", + "tabler-circle-letter-c", + "tabler-circle-letter-d", + "tabler-circle-letter-e", + "tabler-circle-letter-f", + "tabler-circle-letter-g", + "tabler-circle-letter-h", + "tabler-circle-letter-i", + "tabler-circle-letter-j", + "tabler-circle-letter-k", + "tabler-circle-letter-l", + "tabler-circle-letter-m", + "tabler-circle-letter-n", + "tabler-circle-letter-o", + "tabler-circle-letter-p", + "tabler-circle-letter-q", + "tabler-circle-letter-r", + "tabler-circle-letter-s", + "tabler-circle-letter-t", + "tabler-circle-letter-u", + "tabler-circle-letter-v", + "tabler-circle-letter-w", + "tabler-circle-letter-x", + "tabler-circle-letter-y", + "tabler-circle-letter-z", + "tabler-circle-minus-2", + "tabler-circle-minus", + "tabler-circle-number-0", + "tabler-circle-number-1", + "tabler-circle-number-2", + "tabler-circle-number-3", + "tabler-circle-number-4", + "tabler-circle-number-5", + "tabler-circle-number-6", + "tabler-circle-number-7", + "tabler-circle-number-8", + "tabler-circle-number-9", + "tabler-circle-off", + "tabler-circle-plus-2", + "tabler-circle-plus", + "tabler-circle-rectangle-off", + "tabler-circle-rectangle", + "tabler-circle-square", + "tabler-circle-triangle", + "tabler-circle-x-filled", + "tabler-circle-x", + "tabler-circle", + "tabler-circles-filled", + "tabler-circles-relation", + "tabler-circles", + "tabler-circuit-ammeter", + "tabler-circuit-battery", + "tabler-circuit-bulb", + "tabler-circuit-capacitor-polarized", + "tabler-circuit-capacitor", + "tabler-circuit-cell-plus", + "tabler-circuit-cell", + "tabler-circuit-changeover", + "tabler-circuit-diode-zener", + "tabler-circuit-diode", + "tabler-circuit-ground-digital", + "tabler-circuit-ground", + "tabler-circuit-inductor", + "tabler-circuit-motor", + "tabler-circuit-pushbutton", + "tabler-circuit-resistor", + "tabler-circuit-switch-closed", + "tabler-circuit-switch-open", + "tabler-circuit-voltmeter", + "tabler-clear-all", + "tabler-clear-formatting", + "tabler-click", + "tabler-clipboard-check", + "tabler-clipboard-copy", + "tabler-clipboard-data", + "tabler-clipboard-heart", + "tabler-clipboard-list", + "tabler-clipboard-off", + "tabler-clipboard-plus", + "tabler-clipboard-text", + "tabler-clipboard-typography", + "tabler-clipboard-x", + "tabler-clipboard", + "tabler-clock-12", + "tabler-clock-2", + "tabler-clock-24", + "tabler-clock-bolt", + "tabler-clock-cancel", + "tabler-clock-check", + "tabler-clock-code", + "tabler-clock-cog", + "tabler-clock-dollar", + "tabler-clock-down", + "tabler-clock-edit", + "tabler-clock-exclamation", + "tabler-clock-filled", + "tabler-clock-heart", + "tabler-clock-hour-1", + "tabler-clock-hour-10", + "tabler-clock-hour-11", + "tabler-clock-hour-12", + "tabler-clock-hour-2", + "tabler-clock-hour-3", + "tabler-clock-hour-4", + "tabler-clock-hour-5", + "tabler-clock-hour-6", + "tabler-clock-hour-7", + "tabler-clock-hour-8", + "tabler-clock-hour-9", + "tabler-clock-minus", + "tabler-clock-off", + "tabler-clock-pause", + "tabler-clock-pin", + "tabler-clock-play", + "tabler-clock-plus", + "tabler-clock-question", + "tabler-clock-record", + "tabler-clock-search", + "tabler-clock-share", + "tabler-clock-shield", + "tabler-clock-star", + "tabler-clock-stop", + "tabler-clock-up", + "tabler-clock-x", + "tabler-clock", + "tabler-clothes-rack-off", + "tabler-clothes-rack", + "tabler-cloud-bolt", + "tabler-cloud-cancel", + "tabler-cloud-check", + "tabler-cloud-code", + "tabler-cloud-cog", + "tabler-cloud-computing", + "tabler-cloud-data-connection", + "tabler-cloud-dollar", + "tabler-cloud-down", + "tabler-cloud-download", + "tabler-cloud-exclamation", + "tabler-cloud-filled", + "tabler-cloud-fog", + "tabler-cloud-heart", + "tabler-cloud-lock-open", + "tabler-cloud-lock", + "tabler-cloud-minus", + "tabler-cloud-network", + "tabler-cloud-off", + "tabler-cloud-pause", + "tabler-cloud-pin", + "tabler-cloud-plus", + "tabler-cloud-question", + "tabler-cloud-rain", + "tabler-cloud-search", + "tabler-cloud-share", + "tabler-cloud-snow", + "tabler-cloud-star", + "tabler-cloud-storm", + "tabler-cloud-up", + "tabler-cloud-upload", + "tabler-cloud-x", + "tabler-cloud", + "tabler-clover-2", + "tabler-clover", + "tabler-clubs-filled", + "tabler-clubs", + "tabler-code-asterix", + "tabler-code-circle-2", + "tabler-code-circle", + "tabler-code-dots", + "tabler-code-minus", + "tabler-code-off", + "tabler-code-plus", + "tabler-code", + "tabler-coffee-off", + "tabler-coffee", + "tabler-coffin", + "tabler-coin-bitcoin-filled", + "tabler-coin-bitcoin", + "tabler-coin-euro-filled", + "tabler-coin-euro", + "tabler-coin-filled", + "tabler-coin-monero-filled", + "tabler-coin-monero", + "tabler-coin-off", + "tabler-coin-pound-filled", + "tabler-coin-pound", + "tabler-coin-rupee-filled", + "tabler-coin-rupee", + "tabler-coin-taka-filled", + "tabler-coin-taka", + "tabler-coin-yen-filled", + "tabler-coin-yen", + "tabler-coin-yuan-filled", + "tabler-coin-yuan", + "tabler-coin", + "tabler-coins", + "tabler-color-filter", + "tabler-color-picker-off", + "tabler-color-picker", + "tabler-color-swatch-off", + "tabler-color-swatch", + "tabler-column-insert-left", + "tabler-column-insert-right", + "tabler-column-remove", + "tabler-columns-1", + "tabler-columns-2", + "tabler-columns-3", + "tabler-columns-off", + "tabler-columns", + "tabler-comet", + "tabler-command-off", + "tabler-command", + "tabler-compass-filled", + "tabler-compass-off", + "tabler-compass", + "tabler-components-off", + "tabler-components", + "tabler-cone-2", + "tabler-cone-off", + "tabler-cone-plus", + "tabler-cone", + "tabler-confetti-off", + "tabler-confetti", + "tabler-confucius", + "tabler-container-off", + "tabler-container", + "tabler-contrast-2-off", + "tabler-contrast-2", + "tabler-contrast-off", + "tabler-contrast", + "tabler-cooker", + "tabler-cookie-man", + "tabler-cookie-off", + "tabler-cookie", + "tabler-copy-off", + "tabler-copy", + "tabler-copyleft-filled", + "tabler-copyleft-off", + "tabler-copyleft", + "tabler-copyright-filled", + "tabler-copyright-off", + "tabler-copyright", + "tabler-corner-down-left-double", + "tabler-corner-down-left", + "tabler-corner-down-right-double", + "tabler-corner-down-right", + "tabler-corner-left-down-double", + "tabler-corner-left-down", + "tabler-corner-left-up-double", + "tabler-corner-left-up", + "tabler-corner-right-down-double", + "tabler-corner-right-down", + "tabler-corner-right-up-double", + "tabler-corner-right-up", + "tabler-corner-up-left-double", + "tabler-corner-up-left", + "tabler-corner-up-right-double", + "tabler-corner-up-right", + "tabler-cpu-2", + "tabler-cpu-off", + "tabler-cpu", + "tabler-crane-off", + "tabler-crane", + "tabler-creative-commons-by", + "tabler-creative-commons-nc", + "tabler-creative-commons-nd", + "tabler-creative-commons-off", + "tabler-creative-commons-sa", + "tabler-creative-commons-zero", + "tabler-creative-commons", + "tabler-credit-card-filled", + "tabler-credit-card-off", + "tabler-credit-card", + "tabler-cricket", + "tabler-crop", + "tabler-cross-filled", + "tabler-cross-off", + "tabler-cross", + "tabler-crosshair", + "tabler-crown-off", + "tabler-crown", + "tabler-crutches-off", + "tabler-crutches", + "tabler-crystal-ball", + "tabler-csv", + "tabler-cube-off", + "tabler-cube-plus", + "tabler-cube-send", + "tabler-cube-unfolded", + "tabler-cube", + "tabler-cup-off", + "tabler-cup", + "tabler-curling", + "tabler-curly-loop", + "tabler-currency-afghani", + "tabler-currency-bahraini", + "tabler-currency-baht", + "tabler-currency-bitcoin", + "tabler-currency-cent", + "tabler-currency-dinar", + "tabler-currency-dirham", + "tabler-currency-dogecoin", + "tabler-currency-dollar-australian", + "tabler-currency-dollar-brunei", + "tabler-currency-dollar-canadian", + "tabler-currency-dollar-guyanese", + "tabler-currency-dollar-off", + "tabler-currency-dollar-singapore", + "tabler-currency-dollar-zimbabwean", + "tabler-currency-dollar", + "tabler-currency-dong", + "tabler-currency-dram", + "tabler-currency-ethereum", + "tabler-currency-euro-off", + "tabler-currency-euro", + "tabler-currency-florin", + "tabler-currency-forint", + "tabler-currency-frank", + "tabler-currency-guarani", + "tabler-currency-hryvnia", + "tabler-currency-iranian-rial", + "tabler-currency-kip", + "tabler-currency-krone-czech", + "tabler-currency-krone-danish", + "tabler-currency-krone-swedish", + "tabler-currency-lari", + "tabler-currency-leu", + "tabler-currency-lira", + "tabler-currency-litecoin", + "tabler-currency-lyd", + "tabler-currency-manat", + "tabler-currency-monero", + "tabler-currency-naira", + "tabler-currency-nano", + "tabler-currency-off", + "tabler-currency-paanga", + "tabler-currency-peso", + "tabler-currency-pound-off", + "tabler-currency-pound", + "tabler-currency-quetzal", + "tabler-currency-real", + "tabler-currency-renminbi", + "tabler-currency-ripple", + "tabler-currency-riyal", + "tabler-currency-rubel", + "tabler-currency-rufiyaa", + "tabler-currency-rupee-nepalese", + "tabler-currency-rupee", + "tabler-currency-shekel", + "tabler-currency-solana", + "tabler-currency-som", + "tabler-currency-taka", + "tabler-currency-tenge", + "tabler-currency-tugrik", + "tabler-currency-won", + "tabler-currency-yen-off", + "tabler-currency-yen", + "tabler-currency-yuan", + "tabler-currency-zloty", + "tabler-currency", + "tabler-current-location-off", + "tabler-current-location", + "tabler-cursor-off", + "tabler-cursor-text", + "tabler-cut", + "tabler-cylinder-off", + "tabler-cylinder-plus", + "tabler-cylinder", + "tabler-dashboard-off", + "tabler-dashboard", + "tabler-database-cog", + "tabler-database-dollar", + "tabler-database-edit", + "tabler-database-exclamation", + "tabler-database-export", + "tabler-database-heart", + "tabler-database-import", + "tabler-database-leak", + "tabler-database-minus", + "tabler-database-off", + "tabler-database-plus", + "tabler-database-search", + "tabler-database-share", + "tabler-database-star", + "tabler-database-x", + "tabler-database", + "tabler-decimal", + "tabler-deer", + "tabler-delta", + "tabler-dental-broken", + "tabler-dental-off", + "tabler-dental", + "tabler-deselect", + "tabler-details-off", + "tabler-details", + "tabler-device-airpods-case", + "tabler-device-airpods", + "tabler-device-airtag", + "tabler-device-analytics", + "tabler-device-audio-tape", + "tabler-device-camera-phone", + "tabler-device-cctv-off", + "tabler-device-cctv", + "tabler-device-computer-camera-off", + "tabler-device-computer-camera", + "tabler-device-desktop-analytics", + "tabler-device-desktop-bolt", + "tabler-device-desktop-cancel", + "tabler-device-desktop-check", + "tabler-device-desktop-code", + "tabler-device-desktop-cog", + "tabler-device-desktop-dollar", + "tabler-device-desktop-down", + "tabler-device-desktop-exclamation", + "tabler-device-desktop-heart", + "tabler-device-desktop-minus", + "tabler-device-desktop-off", + "tabler-device-desktop-pause", + "tabler-device-desktop-pin", + "tabler-device-desktop-plus", + "tabler-device-desktop-question", + "tabler-device-desktop-search", + "tabler-device-desktop-share", + "tabler-device-desktop-star", + "tabler-device-desktop-up", + "tabler-device-desktop-x", + "tabler-device-desktop", + "tabler-device-floppy", + "tabler-device-gamepad-2", + "tabler-device-gamepad-3", + "tabler-device-gamepad", + "tabler-device-heart-monitor-filled", + "tabler-device-heart-monitor", + "tabler-device-imac-bolt", + "tabler-device-imac-cancel", + "tabler-device-imac-check", + "tabler-device-imac-code", + "tabler-device-imac-cog", + "tabler-device-imac-dollar", + "tabler-device-imac-down", + "tabler-device-imac-exclamation", + "tabler-device-imac-heart", + "tabler-device-imac-minus", + "tabler-device-imac-off", + "tabler-device-imac-pause", + "tabler-device-imac-pin", + "tabler-device-imac-plus", + "tabler-device-imac-question", + "tabler-device-imac-search", + "tabler-device-imac-share", + "tabler-device-imac-star", + "tabler-device-imac-up", + "tabler-device-imac-x", + "tabler-device-imac", + "tabler-device-ipad-bolt", + "tabler-device-ipad-cancel", + "tabler-device-ipad-check", + "tabler-device-ipad-code", + "tabler-device-ipad-cog", + "tabler-device-ipad-dollar", + "tabler-device-ipad-down", + "tabler-device-ipad-exclamation", + "tabler-device-ipad-heart", + "tabler-device-ipad-horizontal-bolt", + "tabler-device-ipad-horizontal-cancel", + "tabler-device-ipad-horizontal-check", + "tabler-device-ipad-horizontal-code", + "tabler-device-ipad-horizontal-cog", + "tabler-device-ipad-horizontal-dollar", + "tabler-device-ipad-horizontal-down", + "tabler-device-ipad-horizontal-exclamation", + "tabler-device-ipad-horizontal-heart", + "tabler-device-ipad-horizontal-minus", + "tabler-device-ipad-horizontal-off", + "tabler-device-ipad-horizontal-pause", + "tabler-device-ipad-horizontal-pin", + "tabler-device-ipad-horizontal-plus", + "tabler-device-ipad-horizontal-question", + "tabler-device-ipad-horizontal-search", + "tabler-device-ipad-horizontal-share", + "tabler-device-ipad-horizontal-star", + "tabler-device-ipad-horizontal-up", + "tabler-device-ipad-horizontal-x", + "tabler-device-ipad-horizontal", + "tabler-device-ipad-minus", + "tabler-device-ipad-off", + "tabler-device-ipad-pause", + "tabler-device-ipad-pin", + "tabler-device-ipad-plus", + "tabler-device-ipad-question", + "tabler-device-ipad-search", + "tabler-device-ipad-share", + "tabler-device-ipad-star", + "tabler-device-ipad-up", + "tabler-device-ipad-x", + "tabler-device-ipad", + "tabler-device-landline-phone", + "tabler-device-laptop-off", + "tabler-device-laptop", + "tabler-device-mobile-bolt", + "tabler-device-mobile-cancel", + "tabler-device-mobile-charging", + "tabler-device-mobile-check", + "tabler-device-mobile-code", + "tabler-device-mobile-cog", + "tabler-device-mobile-dollar", + "tabler-device-mobile-down", + "tabler-device-mobile-exclamation", + "tabler-device-mobile-filled", + "tabler-device-mobile-heart", + "tabler-device-mobile-message", + "tabler-device-mobile-minus", + "tabler-device-mobile-off", + "tabler-device-mobile-pause", + "tabler-device-mobile-pin", + "tabler-device-mobile-plus", + "tabler-device-mobile-question", + "tabler-device-mobile-rotated", + "tabler-device-mobile-search", + "tabler-device-mobile-share", + "tabler-device-mobile-star", + "tabler-device-mobile-up", + "tabler-device-mobile-vibration", + "tabler-device-mobile-x", + "tabler-device-mobile", + "tabler-device-nintendo-off", + "tabler-device-nintendo", + "tabler-device-projector", + "tabler-device-remote", + "tabler-device-sd-card", + "tabler-device-sim-1", + "tabler-device-sim-2", + "tabler-device-sim-3", + "tabler-device-sim", + "tabler-device-speaker-off", + "tabler-device-speaker", + "tabler-device-tablet-bolt", + "tabler-device-tablet-cancel", + "tabler-device-tablet-check", + "tabler-device-tablet-code", + "tabler-device-tablet-cog", + "tabler-device-tablet-dollar", + "tabler-device-tablet-down", + "tabler-device-tablet-exclamation", + "tabler-device-tablet-filled", + "tabler-device-tablet-heart", + "tabler-device-tablet-minus", + "tabler-device-tablet-off", + "tabler-device-tablet-pause", + "tabler-device-tablet-pin", + "tabler-device-tablet-plus", + "tabler-device-tablet-question", + "tabler-device-tablet-search", + "tabler-device-tablet-share", + "tabler-device-tablet-star", + "tabler-device-tablet-up", + "tabler-device-tablet-x", + "tabler-device-tablet", + "tabler-device-tv-off", + "tabler-device-tv-old", + "tabler-device-tv", + "tabler-device-usb", + "tabler-device-vision-pro", + "tabler-device-watch-bolt", + "tabler-device-watch-cancel", + "tabler-device-watch-check", + "tabler-device-watch-code", + "tabler-device-watch-cog", + "tabler-device-watch-dollar", + "tabler-device-watch-down", + "tabler-device-watch-exclamation", + "tabler-device-watch-heart", + "tabler-device-watch-minus", + "tabler-device-watch-off", + "tabler-device-watch-pause", + "tabler-device-watch-pin", + "tabler-device-watch-plus", + "tabler-device-watch-question", + "tabler-device-watch-search", + "tabler-device-watch-share", + "tabler-device-watch-star", + "tabler-device-watch-stats-2", + "tabler-device-watch-stats", + "tabler-device-watch-up", + "tabler-device-watch-x", + "tabler-device-watch", + "tabler-devices-2", + "tabler-devices-bolt", + "tabler-devices-cancel", + "tabler-devices-check", + "tabler-devices-code", + "tabler-devices-cog", + "tabler-devices-dollar", + "tabler-devices-down", + "tabler-devices-exclamation", + "tabler-devices-heart", + "tabler-devices-minus", + "tabler-devices-off", + "tabler-devices-pause", + "tabler-devices-pc-off", + "tabler-devices-pc", + "tabler-devices-pin", + "tabler-devices-plus", + "tabler-devices-question", + "tabler-devices-search", + "tabler-devices-share", + "tabler-devices-star", + "tabler-devices-up", + "tabler-devices-x", + "tabler-devices", + "tabler-diabolo-off", + "tabler-diabolo-plus", + "tabler-diabolo", + "tabler-dialpad-filled", + "tabler-dialpad-off", + "tabler-dialpad", + "tabler-diamond-filled", + "tabler-diamond-off", + "tabler-diamond", + "tabler-diamonds-filled", + "tabler-diamonds", + "tabler-dice-1-filled", + "tabler-dice-1", + "tabler-dice-2-filled", + "tabler-dice-2", + "tabler-dice-3-filled", + "tabler-dice-3", + "tabler-dice-4-filled", + "tabler-dice-4", + "tabler-dice-5-filled", + "tabler-dice-5", + "tabler-dice-6-filled", + "tabler-dice-6", + "tabler-dice-filled", + "tabler-dice", + "tabler-dimensions", + "tabler-direction-horizontal", + "tabler-direction-sign-filled", + "tabler-direction-sign-off", + "tabler-direction-sign", + "tabler-direction", + "tabler-directions-off", + "tabler-directions", + "tabler-disabled-2", + "tabler-disabled-off", + "tabler-disabled", + "tabler-disc-golf", + "tabler-disc-off", + "tabler-disc", + "tabler-discount-2-off", + "tabler-discount-2", + "tabler-discount-check-filled", + "tabler-discount-check", + "tabler-discount-off", + "tabler-discount", + "tabler-divide", + "tabler-dna-2-off", + "tabler-dna-2", + "tabler-dna-off", + "tabler-dna", + "tabler-dog-bowl", + "tabler-dog", + "tabler-door-enter", + "tabler-door-exit", + "tabler-door-off", + "tabler-door", + "tabler-dots-circle-horizontal", + "tabler-dots-diagonal-2", + "tabler-dots-diagonal", + "tabler-dots-vertical", + "tabler-dots", + "tabler-download-off", + "tabler-download", + "tabler-drag-drop-2", + "tabler-drag-drop", + "tabler-drone-off", + "tabler-drone", + "tabler-drop-circle", + "tabler-droplet-bolt", + "tabler-droplet-cancel", + "tabler-droplet-check", + "tabler-droplet-code", + "tabler-droplet-cog", + "tabler-droplet-dollar", + "tabler-droplet-down", + "tabler-droplet-exclamation", + "tabler-droplet-filled", + "tabler-droplet-half-2-filled", + "tabler-droplet-half-2", + "tabler-droplet-half-filled", + "tabler-droplet-half", + "tabler-droplet-heart", + "tabler-droplet-minus", + "tabler-droplet-off", + "tabler-droplet-pause", + "tabler-droplet-pin", + "tabler-droplet-plus", + "tabler-droplet-question", + "tabler-droplet-search", + "tabler-droplet-share", + "tabler-droplet-star", + "tabler-droplet-up", + "tabler-droplet-x", + "tabler-droplet", + "tabler-droplets", + "tabler-dual-screen", + "tabler-e-passport", + "tabler-ear-off", + "tabler-ear", + "tabler-ease-in-control-point", + "tabler-ease-in-out-control-points", + "tabler-ease-in-out", + "tabler-ease-in", + "tabler-ease-out-control-point", + "tabler-ease-out", + "tabler-edit-circle-off", + "tabler-edit-circle", + "tabler-edit-off", + "tabler-edit", + "tabler-egg-cracked", + "tabler-egg-filled", + "tabler-egg-fried", + "tabler-egg-off", + "tabler-egg", + "tabler-eggs", + "tabler-elevator-off", + "tabler-elevator", + "tabler-emergency-bed", + "tabler-empathize-off", + "tabler-empathize", + "tabler-emphasis", + "tabler-engine-off", + "tabler-engine", + "tabler-equal-double", + "tabler-equal-not", + "tabler-equal", + "tabler-eraser-off", + "tabler-eraser", + "tabler-error-404-off", + "tabler-error-404", + "tabler-escalator-down", + "tabler-escalator-up", + "tabler-escalator", + "tabler-exchange-off", + "tabler-exchange", + "tabler-exclamation-circle", + "tabler-exclamation-mark-off", + "tabler-exclamation-mark", + "tabler-explicit-off", + "tabler-explicit", + "tabler-exposure-0", + "tabler-exposure-minus-1", + "tabler-exposure-minus-2", + "tabler-exposure-off", + "tabler-exposure-plus-1", + "tabler-exposure-plus-2", + "tabler-exposure", + "tabler-external-link-off", + "tabler-external-link", + "tabler-eye-bolt", + "tabler-eye-cancel", + "tabler-eye-check", + "tabler-eye-closed", + "tabler-eye-code", + "tabler-eye-cog", + "tabler-eye-discount", + "tabler-eye-dollar", + "tabler-eye-down", + "tabler-eye-edit", + "tabler-eye-exclamation", + "tabler-eye-filled", + "tabler-eye-heart", + "tabler-eye-minus", + "tabler-eye-off", + "tabler-eye-pause", + "tabler-eye-pin", + "tabler-eye-plus", + "tabler-eye-question", + "tabler-eye-search", + "tabler-eye-share", + "tabler-eye-star", + "tabler-eye-table", + "tabler-eye-up", + "tabler-eye-x", + "tabler-eye", + "tabler-eyeglass-2", + "tabler-eyeglass-off", + "tabler-eyeglass", + "tabler-face-id-error", + "tabler-face-id", + "tabler-face-mask-off", + "tabler-face-mask", + "tabler-fall", + "tabler-feather-off", + "tabler-feather", + "tabler-fence-off", + "tabler-fence", + "tabler-fidget-spinner", + "tabler-file-3d", + "tabler-file-alert", + "tabler-file-analytics", + "tabler-file-arrow-left", + "tabler-file-arrow-right", + "tabler-file-barcode", + "tabler-file-broken", + "tabler-file-certificate", + "tabler-file-chart", + "tabler-file-check", + "tabler-file-code-2", + "tabler-file-code", + "tabler-file-cv", + "tabler-file-database", + "tabler-file-delta", + "tabler-file-description", + "tabler-file-diff", + "tabler-file-digit", + "tabler-file-dislike", + "tabler-file-dollar", + "tabler-file-dots", + "tabler-file-download", + "tabler-file-euro", + "tabler-file-export", + "tabler-file-filled", + "tabler-file-function", + "tabler-file-horizontal", + "tabler-file-import", + "tabler-file-infinity", + "tabler-file-info", + "tabler-file-invoice", + "tabler-file-lambda", + "tabler-file-like", + "tabler-file-minus", + "tabler-file-music", + "tabler-file-off", + "tabler-file-orientation", + "tabler-file-pencil", + "tabler-file-percent", + "tabler-file-phone", + "tabler-file-plus", + "tabler-file-power", + "tabler-file-report", + "tabler-file-rss", + "tabler-file-scissors", + "tabler-file-search", + "tabler-file-settings", + "tabler-file-shredder", + "tabler-file-signal", + "tabler-file-spreadsheet", + "tabler-file-stack", + "tabler-file-star", + "tabler-file-symlink", + "tabler-file-text-ai", + "tabler-file-text", + "tabler-file-time", + "tabler-file-type-bmp", + "tabler-file-type-css", + "tabler-file-type-csv", + "tabler-file-type-doc", + "tabler-file-type-docx", + "tabler-file-type-html", + "tabler-file-type-jpg", + "tabler-file-type-js", + "tabler-file-type-jsx", + "tabler-file-type-pdf", + "tabler-file-type-php", + "tabler-file-type-png", + "tabler-file-type-ppt", + "tabler-file-type-rs", + "tabler-file-type-sql", + "tabler-file-type-svg", + "tabler-file-type-ts", + "tabler-file-type-tsx", + "tabler-file-type-txt", + "tabler-file-type-vue", + "tabler-file-type-xls", + "tabler-file-type-xml", + "tabler-file-type-zip", + "tabler-file-typography", + "tabler-file-unknown", + "tabler-file-upload", + "tabler-file-vector", + "tabler-file-x-filled", + "tabler-file-x", + "tabler-file-zip", + "tabler-file", + "tabler-files-off", + "tabler-files", + "tabler-filter-bolt", + "tabler-filter-cancel", + "tabler-filter-check", + "tabler-filter-code", + "tabler-filter-cog", + "tabler-filter-discount", + "tabler-filter-dollar", + "tabler-filter-down", + "tabler-filter-edit", + "tabler-filter-exclamation", + "tabler-filter-filled", + "tabler-filter-heart", + "tabler-filter-minus", + "tabler-filter-off", + "tabler-filter-pause", + "tabler-filter-pin", + "tabler-filter-plus", + "tabler-filter-question", + "tabler-filter-search", + "tabler-filter-share", + "tabler-filter-star", + "tabler-filter-up", + "tabler-filter-x", + "tabler-filter", + "tabler-filters", + "tabler-fingerprint-off", + "tabler-fingerprint-scan", + "tabler-fingerprint", + "tabler-fire-extinguisher", + "tabler-fire-hydrant-off", + "tabler-fire-hydrant", + "tabler-firetruck", + "tabler-first-aid-kit-off", + "tabler-first-aid-kit", + "tabler-fish-bone", + "tabler-fish-christianity", + "tabler-fish-hook-off", + "tabler-fish-hook", + "tabler-fish-off", + "tabler-fish", + "tabler-flag-2-filled", + "tabler-flag-2-off", + "tabler-flag-2", + "tabler-flag-3-filled", + "tabler-flag-3", + "tabler-flag-bolt", + "tabler-flag-cancel", + "tabler-flag-check", + "tabler-flag-code", + "tabler-flag-cog", + "tabler-flag-discount", + "tabler-flag-dollar", + "tabler-flag-down", + "tabler-flag-exclamation", + "tabler-flag-filled", + "tabler-flag-heart", + "tabler-flag-minus", + "tabler-flag-off", + "tabler-flag-pause", + "tabler-flag-pin", + "tabler-flag-plus", + "tabler-flag-question", + "tabler-flag-search", + "tabler-flag-share", + "tabler-flag-star", + "tabler-flag-up", + "tabler-flag-x", + "tabler-flag", + "tabler-flame-off", + "tabler-flame", + "tabler-flare", + "tabler-flask-2-filled", + "tabler-flask-2-off", + "tabler-flask-2", + "tabler-flask-filled", + "tabler-flask-off", + "tabler-flask", + "tabler-flip-flops", + "tabler-flip-horizontal", + "tabler-flip-vertical", + "tabler-float-center", + "tabler-float-left", + "tabler-float-none", + "tabler-float-right", + "tabler-flower-off", + "tabler-flower", + "tabler-focus-2", + "tabler-focus-auto", + "tabler-focus-centered", + "tabler-focus", + "tabler-fold-down", + "tabler-fold-up", + "tabler-fold", + "tabler-folder-bolt", + "tabler-folder-cancel", + "tabler-folder-check", + "tabler-folder-code", + "tabler-folder-cog", + "tabler-folder-dollar", + "tabler-folder-down", + "tabler-folder-exclamation", + "tabler-folder-filled", + "tabler-folder-heart", + "tabler-folder-minus", + "tabler-folder-off", + "tabler-folder-open", + "tabler-folder-pause", + "tabler-folder-pin", + "tabler-folder-plus", + "tabler-folder-question", + "tabler-folder-search", + "tabler-folder-share", + "tabler-folder-star", + "tabler-folder-symlink", + "tabler-folder-up", + "tabler-folder-x", + "tabler-folder", + "tabler-folders-off", + "tabler-folders", + "tabler-forbid-2-filled", + "tabler-forbid-2", + "tabler-forbid-filled", + "tabler-forbid", + "tabler-forklift", + "tabler-forms", + "tabler-fountain-filled", + "tabler-fountain-off", + "tabler-fountain", + "tabler-frame-off", + "tabler-frame", + "tabler-free-rights", + "tabler-freeze-column", + "tabler-freeze-row-column", + "tabler-freeze-row", + "tabler-fridge-off", + "tabler-fridge", + "tabler-friends-off", + "tabler-friends", + "tabler-frustum-off", + "tabler-frustum-plus", + "tabler-frustum", + "tabler-function-filled", + "tabler-function-off", + "tabler-function", + "tabler-galaxy", + "tabler-garden-cart-off", + "tabler-garden-cart", + "tabler-gas-station-off", + "tabler-gas-station", + "tabler-gauge-filled", + "tabler-gauge-off", + "tabler-gauge", + "tabler-gavel", + "tabler-gender-agender", + "tabler-gender-androgyne", + "tabler-gender-bigender", + "tabler-gender-demiboy", + "tabler-gender-demigirl", + "tabler-gender-epicene", + "tabler-gender-female", + "tabler-gender-femme", + "tabler-gender-genderfluid", + "tabler-gender-genderless", + "tabler-gender-genderqueer", + "tabler-gender-hermaphrodite", + "tabler-gender-intergender", + "tabler-gender-male", + "tabler-gender-neutrois", + "tabler-gender-third", + "tabler-gender-transgender", + "tabler-gender-trasvesti", + "tabler-geometry", + "tabler-ghost-2-filled", + "tabler-ghost-2", + "tabler-ghost-3", + "tabler-ghost-filled", + "tabler-ghost-off", + "tabler-ghost", + "tabler-gif", + "tabler-gift-card-filled", + "tabler-gift-card", + "tabler-gift-filled", + "tabler-gift-off", + "tabler-gift", + "tabler-git-branch-deleted", + "tabler-git-branch", + "tabler-git-cherry-pick", + "tabler-git-commit", + "tabler-git-compare", + "tabler-git-fork", + "tabler-git-merge", + "tabler-git-pull-request-closed", + "tabler-git-pull-request-draft", + "tabler-git-pull-request", + "tabler-gizmo", + "tabler-glass-full-filled", + "tabler-glass-full", + "tabler-glass-off", + "tabler-glass", + "tabler-globe-filled", + "tabler-globe-off", + "tabler-globe", + "tabler-go-game", + "tabler-golf-off", + "tabler-golf", + "tabler-gps", + "tabler-gradienter", + "tabler-grain", + "tabler-graph-filled", + "tabler-graph-off", + "tabler-graph", + "tabler-grave-2", + "tabler-grave", + "tabler-grid-3x3", + "tabler-grid-4x4", + "tabler-grid-dots", + "tabler-grid-goldenratio", + "tabler-grid-pattern", + "tabler-grid-scan", + "tabler-grill-fork", + "tabler-grill-off", + "tabler-grill-spatula", + "tabler-grill", + "tabler-grip-horizontal", + "tabler-grip-vertical", + "tabler-growth", + "tabler-guitar-pick-filled", + "tabler-guitar-pick", + "tabler-h-1", + "tabler-h-2", + "tabler-h-3", + "tabler-h-4", + "tabler-h-5", + "tabler-h-6", + "tabler-hammer-off", + "tabler-hammer", + "tabler-hand-click", + "tabler-hand-finger-off", + "tabler-hand-finger", + "tabler-hand-grab", + "tabler-hand-little-finger", + "tabler-hand-middle-finger", + "tabler-hand-move", + "tabler-hand-off", + "tabler-hand-ring-finger", + "tabler-hand-rock", + "tabler-hand-sanitizer", + "tabler-hand-stop", + "tabler-hand-three-fingers", + "tabler-hand-two-fingers", + "tabler-hanger-2", + "tabler-hanger-off", + "tabler-hanger", + "tabler-hash", + "tabler-haze-moon", + "tabler-haze", + "tabler-hdr", + "tabler-heading-off", + "tabler-heading", + "tabler-headphones-filled", + "tabler-headphones-off", + "tabler-headphones", + "tabler-headset-off", + "tabler-headset", + "tabler-health-recognition", + "tabler-heart-bolt", + "tabler-heart-broken", + "tabler-heart-cancel", + "tabler-heart-check", + "tabler-heart-code", + "tabler-heart-cog", + "tabler-heart-discount", + "tabler-heart-dollar", + "tabler-heart-down", + "tabler-heart-exclamation", + "tabler-heart-filled", + "tabler-heart-handshake", + "tabler-heart-minus", + "tabler-heart-off", + "tabler-heart-pause", + "tabler-heart-pin", + "tabler-heart-plus", + "tabler-heart-question", + "tabler-heart-rate-monitor", + "tabler-heart-search", + "tabler-heart-share", + "tabler-heart-star", + "tabler-heart-up", + "tabler-heart-x", + "tabler-heart", + "tabler-heartbeat", + "tabler-hearts-off", + "tabler-hearts", + "tabler-helicopter-landing", + "tabler-helicopter", + "tabler-helmet-off", + "tabler-helmet", + "tabler-help-circle-filled", + "tabler-help-circle", + "tabler-help-hexagon-filled", + "tabler-help-hexagon", + "tabler-help-octagon-filled", + "tabler-help-octagon", + "tabler-help-off", + "tabler-help-small", + "tabler-help-square-filled", + "tabler-help-square-rounded-filled", + "tabler-help-square-rounded", + "tabler-help-square", + "tabler-help-triangle-filled", + "tabler-help-triangle", + "tabler-help", + "tabler-hemisphere-off", + "tabler-hemisphere-plus", + "tabler-hemisphere", + "tabler-hexagon-0-filled", + "tabler-hexagon-1-filled", + "tabler-hexagon-2-filled", + "tabler-hexagon-3-filled", + "tabler-hexagon-3d", + "tabler-hexagon-4-filled", + "tabler-hexagon-5-filled", + "tabler-hexagon-6-filled", + "tabler-hexagon-7-filled", + "tabler-hexagon-8-filled", + "tabler-hexagon-9-filled", + "tabler-hexagon-filled", + "tabler-hexagon-letter-a", + "tabler-hexagon-letter-b", + "tabler-hexagon-letter-c", + "tabler-hexagon-letter-d", + "tabler-hexagon-letter-e", + "tabler-hexagon-letter-f", + "tabler-hexagon-letter-g", + "tabler-hexagon-letter-h", + "tabler-hexagon-letter-i", + "tabler-hexagon-letter-j", + "tabler-hexagon-letter-k", + "tabler-hexagon-letter-l", + "tabler-hexagon-letter-m", + "tabler-hexagon-letter-n", + "tabler-hexagon-letter-o", + "tabler-hexagon-letter-p", + "tabler-hexagon-letter-q", + "tabler-hexagon-letter-r", + "tabler-hexagon-letter-s", + "tabler-hexagon-letter-t", + "tabler-hexagon-letter-u", + "tabler-hexagon-letter-v", + "tabler-hexagon-letter-w", + "tabler-hexagon-letter-x", + "tabler-hexagon-letter-y", + "tabler-hexagon-letter-z", + "tabler-hexagon-minus-2", + "tabler-hexagon-minus", + "tabler-hexagon-number-0", + "tabler-hexagon-number-1", + "tabler-hexagon-number-2", + "tabler-hexagon-number-3", + "tabler-hexagon-number-4", + "tabler-hexagon-number-5", + "tabler-hexagon-number-6", + "tabler-hexagon-number-7", + "tabler-hexagon-number-8", + "tabler-hexagon-number-9", + "tabler-hexagon-off", + "tabler-hexagon-plus-2", + "tabler-hexagon-plus", + "tabler-hexagon", + "tabler-hexagonal-prism-off", + "tabler-hexagonal-prism-plus", + "tabler-hexagonal-prism", + "tabler-hexagonal-pyramid-off", + "tabler-hexagonal-pyramid-plus", + "tabler-hexagonal-pyramid", + "tabler-hexagons-off", + "tabler-hexagons", + "tabler-hierarchy-2", + "tabler-hierarchy-3", + "tabler-hierarchy-off", + "tabler-hierarchy", + "tabler-highlight-off", + "tabler-highlight", + "tabler-history-off", + "tabler-history-toggle", + "tabler-history", + "tabler-home-2", + "tabler-home-bolt", + "tabler-home-cancel", + "tabler-home-check", + "tabler-home-cog", + "tabler-home-dollar", + "tabler-home-dot", + "tabler-home-down", + "tabler-home-eco", + "tabler-home-edit", + "tabler-home-exclamation", + "tabler-home-hand", + "tabler-home-heart", + "tabler-home-infinity", + "tabler-home-link", + "tabler-home-minus", + "tabler-home-move", + "tabler-home-off", + "tabler-home-plus", + "tabler-home-question", + "tabler-home-ribbon", + "tabler-home-search", + "tabler-home-share", + "tabler-home-shield", + "tabler-home-signal", + "tabler-home-star", + "tabler-home-stats", + "tabler-home-up", + "tabler-home-x", + "tabler-home", + "tabler-horse-toy", + "tabler-horse", + "tabler-horseshoe", + "tabler-hotel-service", + "tabler-hourglass-empty", + "tabler-hourglass-filled", + "tabler-hourglass-high", + "tabler-hourglass-low", + "tabler-hourglass-off", + "tabler-hourglass", + "tabler-html", + "tabler-http-connect", + "tabler-http-delete", + "tabler-http-get", + "tabler-http-head", + "tabler-http-options", + "tabler-http-patch", + "tabler-http-post", + "tabler-http-put", + "tabler-http-que", + "tabler-http-trace", + "tabler-ice-cream-2", + "tabler-ice-cream-off", + "tabler-ice-cream", + "tabler-ice-skating", + "tabler-icons-off", + "tabler-icons", + "tabler-id-badge-2", + "tabler-id-badge-off", + "tabler-id-badge", + "tabler-id-off", + "tabler-id", + "tabler-inbox-off", + "tabler-inbox", + "tabler-indent-decrease", + "tabler-indent-increase", + "tabler-infinity-off", + "tabler-infinity", + "tabler-info-circle-filled", + "tabler-info-circle", + "tabler-info-hexagon-filled", + "tabler-info-hexagon", + "tabler-info-octagon-filled", + "tabler-info-octagon", + "tabler-info-small", + "tabler-info-square-filled", + "tabler-info-square-rounded-filled", + "tabler-info-square-rounded", + "tabler-info-square", + "tabler-info-triangle-filled", + "tabler-info-triangle", + "tabler-inner-shadow-bottom-filled", + "tabler-inner-shadow-bottom-left-filled", + "tabler-inner-shadow-bottom-left", + "tabler-inner-shadow-bottom-right-filled", + "tabler-inner-shadow-bottom-right", + "tabler-inner-shadow-bottom", + "tabler-inner-shadow-left-filled", + "tabler-inner-shadow-left", + "tabler-inner-shadow-right-filled", + "tabler-inner-shadow-right", + "tabler-inner-shadow-top-filled", + "tabler-inner-shadow-top-left-filled", + "tabler-inner-shadow-top-left", + "tabler-inner-shadow-top-right-filled", + "tabler-inner-shadow-top-right", + "tabler-inner-shadow-top", + "tabler-input-ai", + "tabler-input-check", + "tabler-input-search", + "tabler-input-x", + "tabler-ironing-1", + "tabler-ironing-2", + "tabler-ironing-3", + "tabler-ironing-off", + "tabler-ironing-steam-off", + "tabler-ironing-steam", + "tabler-ironing", + "tabler-irregular-polyhedron-off", + "tabler-irregular-polyhedron-plus", + "tabler-irregular-polyhedron", + "tabler-italic", + "tabler-jacket", + "tabler-jetpack", + "tabler-jewish-star-filled", + "tabler-jewish-star", + "tabler-jpg", + "tabler-json", + "tabler-jump-rope", + "tabler-karate", + "tabler-kayak", + "tabler-kering", + "tabler-key-off", + "tabler-key", + "tabler-keyboard-hide", + "tabler-keyboard-off", + "tabler-keyboard-show", + "tabler-keyboard", + "tabler-keyframe-align-center-filled", + "tabler-keyframe-align-center", + "tabler-keyframe-align-horizontal-filled", + "tabler-keyframe-align-horizontal", + "tabler-keyframe-align-vertical-filled", + "tabler-keyframe-align-vertical", + "tabler-keyframe-filled", + "tabler-keyframe", + "tabler-keyframes-filled", + "tabler-keyframes", + "tabler-ladder-off", + "tabler-ladder", + "tabler-ladle", + "tabler-lambda", + "tabler-lamp-2", + "tabler-lamp-off", + "tabler-lamp", + "tabler-lane", + "tabler-language-hiragana", + "tabler-language-katakana", + "tabler-language-off", + "tabler-language", + "tabler-lasso-off", + "tabler-lasso-polygon", + "tabler-lasso", + "tabler-layers-difference", + "tabler-layers-intersect-2", + "tabler-layers-intersect", + "tabler-layers-linked", + "tabler-layers-off", + "tabler-layers-subtract", + "tabler-layers-union", + "tabler-layout-2", + "tabler-layout-align-bottom", + "tabler-layout-align-center", + "tabler-layout-align-left", + "tabler-layout-align-middle", + "tabler-layout-align-right", + "tabler-layout-align-top", + "tabler-layout-board-split", + "tabler-layout-board", + "tabler-layout-bottombar-collapse-filled", + "tabler-layout-bottombar-collapse", + "tabler-layout-bottombar-expand-filled", + "tabler-layout-bottombar-expand", + "tabler-layout-bottombar-filled", + "tabler-layout-bottombar", + "tabler-layout-cards", + "tabler-layout-collage", + "tabler-layout-columns", + "tabler-layout-dashboard", + "tabler-layout-distribute-horizontal", + "tabler-layout-distribute-vertical", + "tabler-layout-grid-add", + "tabler-layout-grid-remove", + "tabler-layout-grid", + "tabler-layout-kanban", + "tabler-layout-list", + "tabler-layout-navbar-collapse-filled", + "tabler-layout-navbar-collapse", + "tabler-layout-navbar-expand-filled", + "tabler-layout-navbar-expand", + "tabler-layout-navbar-filled", + "tabler-layout-navbar", + "tabler-layout-off", + "tabler-layout-rows", + "tabler-layout-sidebar-left-collapse-filled", + "tabler-layout-sidebar-left-collapse", + "tabler-layout-sidebar-left-expand-filled", + "tabler-layout-sidebar-left-expand", + "tabler-layout-sidebar-right-collapse-filled", + "tabler-layout-sidebar-right-collapse", + "tabler-layout-sidebar-right-expand-filled", + "tabler-layout-sidebar-right-expand", + "tabler-layout-sidebar-right", + "tabler-layout-sidebar", + "tabler-layout", + "tabler-leaf-off", + "tabler-leaf", + "tabler-lego-off", + "tabler-lego", + "tabler-lemon-2", + "tabler-lemon", + "tabler-letter-a-small", + "tabler-letter-a", + "tabler-letter-b-small", + "tabler-letter-b", + "tabler-letter-c-small", + "tabler-letter-c", + "tabler-letter-case-lower", + "tabler-letter-case-toggle", + "tabler-letter-case-upper", + "tabler-letter-case", + "tabler-letter-d-small", + "tabler-letter-d", + "tabler-letter-e-small", + "tabler-letter-e", + "tabler-letter-f-small", + "tabler-letter-f", + "tabler-letter-g-small", + "tabler-letter-g", + "tabler-letter-h-small", + "tabler-letter-h", + "tabler-letter-i-small", + "tabler-letter-i", + "tabler-letter-j-small", + "tabler-letter-j", + "tabler-letter-k-small", + "tabler-letter-k", + "tabler-letter-l-small", + "tabler-letter-l", + "tabler-letter-m-small", + "tabler-letter-m", + "tabler-letter-n-small", + "tabler-letter-n", + "tabler-letter-o-small", + "tabler-letter-o", + "tabler-letter-p-small", + "tabler-letter-p", + "tabler-letter-q-small", + "tabler-letter-q", + "tabler-letter-r-small", + "tabler-letter-r", + "tabler-letter-s-small", + "tabler-letter-s", + "tabler-letter-spacing", + "tabler-letter-t-small", + "tabler-letter-t", + "tabler-letter-u-small", + "tabler-letter-u", + "tabler-letter-v-small", + "tabler-letter-v", + "tabler-letter-w-small", + "tabler-letter-w", + "tabler-letter-x-small", + "tabler-letter-x", + "tabler-letter-y-small", + "tabler-letter-y", + "tabler-letter-z-small", + "tabler-letter-z", + "tabler-license-off", + "tabler-license", + "tabler-lifebuoy-off", + "tabler-lifebuoy", + "tabler-lighter", + "tabler-line-dashed", + "tabler-line-dotted", + "tabler-line-height", + "tabler-line-scan", + "tabler-line", + "tabler-link-minus", + "tabler-link-off", + "tabler-link-plus", + "tabler-link", + "tabler-list-check", + "tabler-list-details", + "tabler-list-letters", + "tabler-list-numbers", + "tabler-list-search", + "tabler-list-tree", + "tabler-list", + "tabler-live-photo-off", + "tabler-live-photo", + "tabler-live-view", + "tabler-load-balancer", + "tabler-loader-2", + "tabler-loader-3", + "tabler-loader-quarter", + "tabler-loader", + "tabler-location-bolt", + "tabler-location-broken", + "tabler-location-cancel", + "tabler-location-check", + "tabler-location-code", + "tabler-location-cog", + "tabler-location-discount", + "tabler-location-dollar", + "tabler-location-down", + "tabler-location-exclamation", + "tabler-location-filled", + "tabler-location-heart", + "tabler-location-minus", + "tabler-location-off", + "tabler-location-pause", + "tabler-location-pin", + "tabler-location-plus", + "tabler-location-question", + "tabler-location-search", + "tabler-location-share", + "tabler-location-star", + "tabler-location-up", + "tabler-location-x", + "tabler-location", + "tabler-lock-access-off", + "tabler-lock-access", + "tabler-lock-bolt", + "tabler-lock-cancel", + "tabler-lock-check", + "tabler-lock-code", + "tabler-lock-cog", + "tabler-lock-dollar", + "tabler-lock-down", + "tabler-lock-exclamation", + "tabler-lock-heart", + "tabler-lock-minus", + "tabler-lock-off", + "tabler-lock-open-off", + "tabler-lock-open", + "tabler-lock-pause", + "tabler-lock-pin", + "tabler-lock-plus", + "tabler-lock-question", + "tabler-lock-search", + "tabler-lock-share", + "tabler-lock-square-rounded-filled", + "tabler-lock-square-rounded", + "tabler-lock-square", + "tabler-lock-star", + "tabler-lock-up", + "tabler-lock-x", + "tabler-lock", + "tabler-logic-and", + "tabler-logic-buffer", + "tabler-logic-nand", + "tabler-logic-nor", + "tabler-logic-not", + "tabler-logic-or", + "tabler-logic-xnor", + "tabler-logic-xor", + "tabler-login-2", + "tabler-login", + "tabler-logout-2", + "tabler-logout", + "tabler-lollipop-off", + "tabler-lollipop", + "tabler-luggage-off", + "tabler-luggage", + "tabler-lungs-off", + "tabler-lungs", + "tabler-macro-off", + "tabler-macro", + "tabler-magnet-off", + "tabler-magnet", + "tabler-magnetic", + "tabler-mail-ai", + "tabler-mail-bolt", + "tabler-mail-cancel", + "tabler-mail-check", + "tabler-mail-code", + "tabler-mail-cog", + "tabler-mail-dollar", + "tabler-mail-down", + "tabler-mail-exclamation", + "tabler-mail-fast", + "tabler-mail-filled", + "tabler-mail-forward", + "tabler-mail-heart", + "tabler-mail-minus", + "tabler-mail-off", + "tabler-mail-opened-filled", + "tabler-mail-opened", + "tabler-mail-pause", + "tabler-mail-pin", + "tabler-mail-plus", + "tabler-mail-question", + "tabler-mail-search", + "tabler-mail-share", + "tabler-mail-star", + "tabler-mail-up", + "tabler-mail-x", + "tabler-mail", + "tabler-mailbox-off", + "tabler-mailbox", + "tabler-man", + "tabler-manual-gearbox", + "tabler-map-2", + "tabler-map-bolt", + "tabler-map-cancel", + "tabler-map-check", + "tabler-map-code", + "tabler-map-cog", + "tabler-map-discount", + "tabler-map-dollar", + "tabler-map-down", + "tabler-map-east", + "tabler-map-exclamation", + "tabler-map-heart", + "tabler-map-minus", + "tabler-map-north", + "tabler-map-off", + "tabler-map-pause", + "tabler-map-pin-2", + "tabler-map-pin-bolt", + "tabler-map-pin-cancel", + "tabler-map-pin-check", + "tabler-map-pin-code", + "tabler-map-pin-cog", + "tabler-map-pin-dollar", + "tabler-map-pin-down", + "tabler-map-pin-exclamation", + "tabler-map-pin-filled", + "tabler-map-pin-heart", + "tabler-map-pin-minus", + "tabler-map-pin-off", + "tabler-map-pin-pause", + "tabler-map-pin-pin", + "tabler-map-pin-plus", + "tabler-map-pin-question", + "tabler-map-pin-search", + "tabler-map-pin-share", + "tabler-map-pin-star", + "tabler-map-pin-up", + "tabler-map-pin-x", + "tabler-map-pin", + "tabler-map-pins", + "tabler-map-plus", + "tabler-map-question", + "tabler-map-route", + "tabler-map-search", + "tabler-map-share", + "tabler-map-south", + "tabler-map-star", + "tabler-map-up", + "tabler-map-west", + "tabler-map-x", + "tabler-map", + "tabler-markdown-off", + "tabler-markdown", + "tabler-marquee-2", + "tabler-marquee-off", + "tabler-marquee", + "tabler-mars", + "tabler-mask-off", + "tabler-mask", + "tabler-masks-theater-off", + "tabler-masks-theater", + "tabler-massage", + "tabler-matchstick", + "tabler-math-1-divide-2", + "tabler-math-1-divide-3", + "tabler-math-avg", + "tabler-math-equal-greater", + "tabler-math-equal-lower", + "tabler-math-function-off", + "tabler-math-function-y", + "tabler-math-function", + "tabler-math-greater", + "tabler-math-integral-x", + "tabler-math-integral", + "tabler-math-integrals", + "tabler-math-lower", + "tabler-math-max", + "tabler-math-min", + "tabler-math-not", + "tabler-math-off", + "tabler-math-pi-divide-2", + "tabler-math-pi", + "tabler-math-symbols", + "tabler-math-x-divide-2", + "tabler-math-x-divide-y-2", + "tabler-math-x-divide-y", + "tabler-math-x-minus-x", + "tabler-math-x-minus-y", + "tabler-math-x-plus-x", + "tabler-math-x-plus-y", + "tabler-math-xy", + "tabler-math-y-minus-y", + "tabler-math-y-plus-y", + "tabler-math", + "tabler-maximize-off", + "tabler-maximize", + "tabler-meat-off", + "tabler-meat", + "tabler-medal-2", + "tabler-medal", + "tabler-medical-cross-circle", + "tabler-medical-cross-filled", + "tabler-medical-cross-off", + "tabler-medical-cross", + "tabler-medicine-syrup", + "tabler-meeple", + "tabler-melon", + "tabler-menorah", + "tabler-menu-2", + "tabler-menu-deep", + "tabler-menu-order", + "tabler-menu", + "tabler-message-2-bolt", + "tabler-message-2-cancel", + "tabler-message-2-check", + "tabler-message-2-code", + "tabler-message-2-cog", + "tabler-message-2-dollar", + "tabler-message-2-down", + "tabler-message-2-exclamation", + "tabler-message-2-heart", + "tabler-message-2-minus", + "tabler-message-2-off", + "tabler-message-2-pause", + "tabler-message-2-pin", + "tabler-message-2-plus", + "tabler-message-2-question", + "tabler-message-2-search", + "tabler-message-2-share", + "tabler-message-2-star", + "tabler-message-2-up", + "tabler-message-2-x", + "tabler-message-2", + "tabler-message-bolt", + "tabler-message-cancel", + "tabler-message-chatbot", + "tabler-message-check", + "tabler-message-circle-2-filled", + "tabler-message-circle-2", + "tabler-message-circle-bolt", + "tabler-message-circle-cancel", + "tabler-message-circle-check", + "tabler-message-circle-code", + "tabler-message-circle-cog", + "tabler-message-circle-dollar", + "tabler-message-circle-down", + "tabler-message-circle-exclamation", + "tabler-message-circle-heart", + "tabler-message-circle-minus", + "tabler-message-circle-off", + "tabler-message-circle-pause", + "tabler-message-circle-pin", + "tabler-message-circle-plus", + "tabler-message-circle-question", + "tabler-message-circle-search", + "tabler-message-circle-share", + "tabler-message-circle-star", + "tabler-message-circle-up", + "tabler-message-circle-x", + "tabler-message-circle", + "tabler-message-code", + "tabler-message-cog", + "tabler-message-dollar", + "tabler-message-dots", + "tabler-message-down", + "tabler-message-exclamation", + "tabler-message-forward", + "tabler-message-heart", + "tabler-message-language", + "tabler-message-minus", + "tabler-message-off", + "tabler-message-pause", + "tabler-message-pin", + "tabler-message-plus", + "tabler-message-question", + "tabler-message-report", + "tabler-message-search", + "tabler-message-share", + "tabler-message-star", + "tabler-message-up", + "tabler-message-x", + "tabler-message", + "tabler-messages-off", + "tabler-messages", + "tabler-meteor-off", + "tabler-meteor", + "tabler-michelin-bib-gourmand", + "tabler-michelin-star-green", + "tabler-michelin-star", + "tabler-mickey-filled", + "tabler-mickey", + "tabler-microphone-2-off", + "tabler-microphone-2", + "tabler-microphone-off", + "tabler-microphone", + "tabler-microscope-off", + "tabler-microscope", + "tabler-microwave-off", + "tabler-microwave", + "tabler-military-award", + "tabler-military-rank", + "tabler-milk-off", + "tabler-milk", + "tabler-milkshake", + "tabler-minimize", + "tabler-minus-vertical", + "tabler-minus", + "tabler-mist-off", + "tabler-mist", + "tabler-mobiledata-off", + "tabler-mobiledata", + "tabler-moneybag", + "tabler-mood-angry", + "tabler-mood-annoyed-2", + "tabler-mood-annoyed", + "tabler-mood-boy", + "tabler-mood-check", + "tabler-mood-cog", + "tabler-mood-confuzed-filled", + "tabler-mood-confuzed", + "tabler-mood-crazy-happy", + "tabler-mood-cry", + "tabler-mood-dollar", + "tabler-mood-edit", + "tabler-mood-empty-filled", + "tabler-mood-empty", + "tabler-mood-happy-filled", + "tabler-mood-happy", + "tabler-mood-heart", + "tabler-mood-kid-filled", + "tabler-mood-kid", + "tabler-mood-look-left", + "tabler-mood-look-right", + "tabler-mood-minus", + "tabler-mood-nerd", + "tabler-mood-nervous", + "tabler-mood-neutral-filled", + "tabler-mood-neutral", + "tabler-mood-off", + "tabler-mood-pin", + "tabler-mood-plus", + "tabler-mood-sad-2", + "tabler-mood-sad-dizzy", + "tabler-mood-sad-filled", + "tabler-mood-sad-squint", + "tabler-mood-sad", + "tabler-mood-search", + "tabler-mood-share", + "tabler-mood-sick", + "tabler-mood-silence", + "tabler-mood-sing", + "tabler-mood-smile-beam", + "tabler-mood-smile-dizzy", + "tabler-mood-smile-filled", + "tabler-mood-smile", + "tabler-mood-suprised", + "tabler-mood-tongue-wink-2", + "tabler-mood-tongue-wink", + "tabler-mood-tongue", + "tabler-mood-unamused", + "tabler-mood-up", + "tabler-mood-wink-2", + "tabler-mood-wink", + "tabler-mood-wrrr", + "tabler-mood-x", + "tabler-mood-xd", + "tabler-moon-2", + "tabler-moon-filled", + "tabler-moon-off", + "tabler-moon-stars", + "tabler-moon", + "tabler-moped", + "tabler-motorbike", + "tabler-mountain-off", + "tabler-mountain", + "tabler-mouse-2", + "tabler-mouse-filled", + "tabler-mouse-off", + "tabler-mouse", + "tabler-moustache", + "tabler-movie-off", + "tabler-movie", + "tabler-mug-off", + "tabler-mug", + "tabler-multiplier-0-5x", + "tabler-multiplier-1-5x", + "tabler-multiplier-1x", + "tabler-multiplier-2x", + "tabler-mushroom-filled", + "tabler-mushroom-off", + "tabler-mushroom", + "tabler-music-bolt", + "tabler-music-cancel", + "tabler-music-check", + "tabler-music-code", + "tabler-music-cog", + "tabler-music-discount", + "tabler-music-dollar", + "tabler-music-down", + "tabler-music-exclamation", + "tabler-music-heart", + "tabler-music-minus", + "tabler-music-off", + "tabler-music-pause", + "tabler-music-pin", + "tabler-music-plus", + "tabler-music-question", + "tabler-music-search", + "tabler-music-share", + "tabler-music-star", + "tabler-music-up", + "tabler-music-x", + "tabler-music", + "tabler-navigation-bolt", + "tabler-navigation-cancel", + "tabler-navigation-check", + "tabler-navigation-code", + "tabler-navigation-cog", + "tabler-navigation-discount", + "tabler-navigation-dollar", + "tabler-navigation-down", + "tabler-navigation-east", + "tabler-navigation-exclamation", + "tabler-navigation-filled", + "tabler-navigation-heart", + "tabler-navigation-minus", + "tabler-navigation-north", + "tabler-navigation-off", + "tabler-navigation-pause", + "tabler-navigation-pin", + "tabler-navigation-plus", + "tabler-navigation-question", + "tabler-navigation-search", + "tabler-navigation-share", + "tabler-navigation-south", + "tabler-navigation-star", + "tabler-navigation-top", + "tabler-navigation-up", + "tabler-navigation-west", + "tabler-navigation-x", + "tabler-navigation", + "tabler-needle-thread", + "tabler-needle", + "tabler-network-off", + "tabler-network", + "tabler-new-section", + "tabler-news-off", + "tabler-news", + "tabler-nfc-off", + "tabler-nfc", + "tabler-no-copyright", + "tabler-no-creative-commons", + "tabler-no-derivatives", + "tabler-north-star", + "tabler-note-off", + "tabler-note", + "tabler-notebook-off", + "tabler-notebook", + "tabler-notes-off", + "tabler-notes", + "tabler-notification-off", + "tabler-notification", + "tabler-number-0-small", + "tabler-number-0", + "tabler-number-1-small", + "tabler-number-1", + "tabler-number-10-small", + "tabler-number-11-small", + "tabler-number-12-small", + "tabler-number-13-small", + "tabler-number-14-small", + "tabler-number-15-small", + "tabler-number-16-small", + "tabler-number-17-small", + "tabler-number-18-small", + "tabler-number-19-small", + "tabler-number-2-small", + "tabler-number-2", + "tabler-number-20-small", + "tabler-number-21-small", + "tabler-number-22-small", + "tabler-number-23-small", + "tabler-number-24-small", + "tabler-number-25-small", + "tabler-number-26-small", + "tabler-number-27-small", + "tabler-number-28-small", + "tabler-number-29-small", + "tabler-number-3-small", + "tabler-number-3", + "tabler-number-4-small", + "tabler-number-4", + "tabler-number-5-small", + "tabler-number-5", + "tabler-number-6-small", + "tabler-number-6", + "tabler-number-7-small", + "tabler-number-7", + "tabler-number-8-small", + "tabler-number-8", + "tabler-number-9-small", + "tabler-number-9", + "tabler-number", + "tabler-numbers", + "tabler-nurse", + "tabler-nut", + "tabler-octagon-filled", + "tabler-octagon-minus-2", + "tabler-octagon-minus", + "tabler-octagon-off", + "tabler-octagon-plus-2", + "tabler-octagon-plus", + "tabler-octagon", + "tabler-octahedron-off", + "tabler-octahedron-plus", + "tabler-octahedron", + "tabler-old", + "tabler-olympics-off", + "tabler-olympics", + "tabler-om", + "tabler-omega", + "tabler-outbound", + "tabler-outlet", + "tabler-oval-filled", + "tabler-oval-vertical-filled", + "tabler-oval-vertical", + "tabler-oval", + "tabler-overline", + "tabler-package-export", + "tabler-package-import", + "tabler-package-off", + "tabler-package", + "tabler-packages", + "tabler-pacman", + "tabler-page-break", + "tabler-paint-filled", + "tabler-paint-off", + "tabler-paint", + "tabler-palette-off", + "tabler-palette", + "tabler-panorama-horizontal-off", + "tabler-panorama-horizontal", + "tabler-panorama-vertical-off", + "tabler-panorama-vertical", + "tabler-paper-bag-off", + "tabler-paper-bag", + "tabler-paperclip", + "tabler-parachute-off", + "tabler-parachute", + "tabler-parentheses-off", + "tabler-parentheses", + "tabler-parking-off", + "tabler-parking", + "tabler-password-fingerprint", + "tabler-password-mobile-phone", + "tabler-password-user", + "tabler-password", + "tabler-paw-filled", + "tabler-paw-off", + "tabler-paw", + "tabler-pdf", + "tabler-peace", + "tabler-pencil-bolt", + "tabler-pencil-cancel", + "tabler-pencil-check", + "tabler-pencil-code", + "tabler-pencil-cog", + "tabler-pencil-discount", + "tabler-pencil-dollar", + "tabler-pencil-down", + "tabler-pencil-exclamation", + "tabler-pencil-heart", + "tabler-pencil-minus", + "tabler-pencil-off", + "tabler-pencil-pause", + "tabler-pencil-pin", + "tabler-pencil-plus", + "tabler-pencil-question", + "tabler-pencil-search", + "tabler-pencil-share", + "tabler-pencil-star", + "tabler-pencil-up", + "tabler-pencil-x", + "tabler-pencil", + "tabler-pennant-2-filled", + "tabler-pennant-2", + "tabler-pennant-filled", + "tabler-pennant-off", + "tabler-pennant", + "tabler-pentagon-filled", + "tabler-pentagon-number-0", + "tabler-pentagon-number-1", + "tabler-pentagon-number-2", + "tabler-pentagon-number-3", + "tabler-pentagon-number-4", + "tabler-pentagon-number-5", + "tabler-pentagon-number-6", + "tabler-pentagon-number-7", + "tabler-pentagon-number-8", + "tabler-pentagon-number-9", + "tabler-pentagon-off", + "tabler-pentagon-plus", + "tabler-pentagon-x", + "tabler-pentagon", + "tabler-pentagram", + "tabler-pepper-off", + "tabler-pepper", + "tabler-percentage", + "tabler-perfume", + "tabler-perspective-off", + "tabler-perspective", + "tabler-phone-call", + "tabler-phone-calling", + "tabler-phone-check", + "tabler-phone-filled", + "tabler-phone-incoming", + "tabler-phone-off", + "tabler-phone-outgoing", + "tabler-phone-pause", + "tabler-phone-plus", + "tabler-phone-x", + "tabler-phone", + "tabler-photo-ai", + "tabler-photo-bolt", + "tabler-photo-cancel", + "tabler-photo-check", + "tabler-photo-circle-minus", + "tabler-photo-circle-plus", + "tabler-photo-circle", + "tabler-photo-code", + "tabler-photo-cog", + "tabler-photo-dollar", + "tabler-photo-down", + "tabler-photo-edit", + "tabler-photo-exclamation", + "tabler-photo-filled", + "tabler-photo-heart", + "tabler-photo-hexagon", + "tabler-photo-minus", + "tabler-photo-off", + "tabler-photo-pause", + "tabler-photo-pentagon", + "tabler-photo-pin", + "tabler-photo-plus", + "tabler-photo-question", + "tabler-photo-scan", + "tabler-photo-search", + "tabler-photo-sensor-2", + "tabler-photo-sensor-3", + "tabler-photo-sensor", + "tabler-photo-share", + "tabler-photo-shield", + "tabler-photo-square-rounded", + "tabler-photo-star", + "tabler-photo-up", + "tabler-photo-video", + "tabler-photo-x", + "tabler-photo", + "tabler-physotherapist", + "tabler-piano", + "tabler-pick", + "tabler-picture-in-picture-off", + "tabler-picture-in-picture-on", + "tabler-picture-in-picture-top", + "tabler-picture-in-picture", + "tabler-pig-money", + "tabler-pig-off", + "tabler-pig", + "tabler-pilcrow", + "tabler-pill-off", + "tabler-pill", + "tabler-pills", + "tabler-pin-filled", + "tabler-pin", + "tabler-ping-pong", + "tabler-pinned-filled", + "tabler-pinned-off", + "tabler-pinned", + "tabler-pizza-off", + "tabler-pizza", + "tabler-placeholder", + "tabler-plane-arrival", + "tabler-plane-departure", + "tabler-plane-inflight", + "tabler-plane-off", + "tabler-plane-tilt", + "tabler-plane", + "tabler-planet-off", + "tabler-planet", + "tabler-plant-2-off", + "tabler-plant-2", + "tabler-plant-off", + "tabler-plant", + "tabler-play-basketball", + "tabler-play-card-off", + "tabler-play-card", + "tabler-play-football", + "tabler-play-handball", + "tabler-play-volleyball", + "tabler-player-eject-filled", + "tabler-player-eject", + "tabler-player-pause-filled", + "tabler-player-pause", + "tabler-player-play-filled", + "tabler-player-play", + "tabler-player-record-filled", + "tabler-player-record", + "tabler-player-skip-back-filled", + "tabler-player-skip-back", + "tabler-player-skip-forward-filled", + "tabler-player-skip-forward", + "tabler-player-stop-filled", + "tabler-player-stop", + "tabler-player-track-next-filled", + "tabler-player-track-next", + "tabler-player-track-prev-filled", + "tabler-player-track-prev", + "tabler-playlist-add", + "tabler-playlist-off", + "tabler-playlist-x", + "tabler-playlist", + "tabler-playstation-circle", + "tabler-playstation-square", + "tabler-playstation-triangle", + "tabler-playstation-x", + "tabler-plug-connected-x", + "tabler-plug-connected", + "tabler-plug-off", + "tabler-plug-x", + "tabler-plug", + "tabler-plus-equal", + "tabler-plus-minus", + "tabler-plus", + "tabler-png", + "tabler-podium-off", + "tabler-podium", + "tabler-point-filled", + "tabler-point-off", + "tabler-point", + "tabler-pointer-bolt", + "tabler-pointer-cancel", + "tabler-pointer-check", + "tabler-pointer-code", + "tabler-pointer-cog", + "tabler-pointer-dollar", + "tabler-pointer-down", + "tabler-pointer-exclamation", + "tabler-pointer-filled", + "tabler-pointer-heart", + "tabler-pointer-minus", + "tabler-pointer-off", + "tabler-pointer-pause", + "tabler-pointer-pin", + "tabler-pointer-plus", + "tabler-pointer-question", + "tabler-pointer-search", + "tabler-pointer-share", + "tabler-pointer-star", + "tabler-pointer-up", + "tabler-pointer-x", + "tabler-pointer", + "tabler-pokeball-off", + "tabler-pokeball", + "tabler-poker-chip", + "tabler-polaroid-filled", + "tabler-polaroid", + "tabler-polygon-off", + "tabler-polygon", + "tabler-poo", + "tabler-pool-off", + "tabler-pool", + "tabler-power", + "tabler-pray", + "tabler-premium-rights", + "tabler-prescription", + "tabler-presentation-analytics", + "tabler-presentation-off", + "tabler-presentation", + "tabler-printer-off", + "tabler-printer", + "tabler-prism-off", + "tabler-prism-plus", + "tabler-prism", + "tabler-prison", + "tabler-progress-alert", + "tabler-progress-bolt", + "tabler-progress-check", + "tabler-progress-down", + "tabler-progress-help", + "tabler-progress-x", + "tabler-progress", + "tabler-prompt", + "tabler-propeller-off", + "tabler-propeller", + "tabler-pumpkin-scary", + "tabler-puzzle-2", + "tabler-puzzle-filled", + "tabler-puzzle-off", + "tabler-puzzle", + "tabler-pyramid-off", + "tabler-pyramid-plus", + "tabler-pyramid", + "tabler-qrcode-off", + "tabler-qrcode", + "tabler-question-mark", + "tabler-quote-off", + "tabler-quote", + "tabler-quotes", + "tabler-radar-2", + "tabler-radar-off", + "tabler-radar", + "tabler-radio-off", + "tabler-radio", + "tabler-radioactive-filled", + "tabler-radioactive-off", + "tabler-radioactive", + "tabler-radius-bottom-left", + "tabler-radius-bottom-right", + "tabler-radius-top-left", + "tabler-radius-top-right", + "tabler-rainbow-off", + "tabler-rainbow", + "tabler-rating-12-plus", + "tabler-rating-14-plus", + "tabler-rating-16-plus", + "tabler-rating-18-plus", + "tabler-rating-21-plus", + "tabler-razor-electric", + "tabler-razor", + "tabler-receipt-2", + "tabler-receipt-off", + "tabler-receipt-refund", + "tabler-receipt-tax", + "tabler-receipt", + "tabler-recharging", + "tabler-record-mail-off", + "tabler-record-mail", + "tabler-rectangle-filled", + "tabler-rectangle-rounded-bottom", + "tabler-rectangle-rounded-top", + "tabler-rectangle-vertical-filled", + "tabler-rectangle-vertical", + "tabler-rectangle", + "tabler-rectangular-prism-off", + "tabler-rectangular-prism-plus", + "tabler-rectangular-prism", + "tabler-recycle-off", + "tabler-recycle", + "tabler-refresh-alert", + "tabler-refresh-dot", + "tabler-refresh-off", + "tabler-refresh", + "tabler-regex-off", + "tabler-regex", + "tabler-registered", + "tabler-relation-many-to-many", + "tabler-relation-one-to-many", + "tabler-relation-one-to-one", + "tabler-reload", + "tabler-reorder", + "tabler-repeat-off", + "tabler-repeat-once", + "tabler-repeat", + "tabler-replace-filled", + "tabler-replace-off", + "tabler-replace", + "tabler-report-analytics", + "tabler-report-medical", + "tabler-report-money", + "tabler-report-off", + "tabler-report-search", + "tabler-report", + "tabler-reserved-line", + "tabler-resize", + "tabler-restore", + "tabler-rewind-backward-10", + "tabler-rewind-backward-15", + "tabler-rewind-backward-20", + "tabler-rewind-backward-30", + "tabler-rewind-backward-40", + "tabler-rewind-backward-5", + "tabler-rewind-backward-50", + "tabler-rewind-backward-60", + "tabler-rewind-forward-10", + "tabler-rewind-forward-15", + "tabler-rewind-forward-20", + "tabler-rewind-forward-30", + "tabler-rewind-forward-40", + "tabler-rewind-forward-5", + "tabler-rewind-forward-50", + "tabler-rewind-forward-60", + "tabler-ribbon-health", + "tabler-rings", + "tabler-ripple-off", + "tabler-ripple", + "tabler-road-off", + "tabler-road-sign", + "tabler-road", + "tabler-robot-face", + "tabler-robot-off", + "tabler-robot", + "tabler-rocket-off", + "tabler-rocket", + "tabler-roller-skating", + "tabler-rollercoaster-off", + "tabler-rollercoaster", + "tabler-rosette-filled", + "tabler-rosette-number-0", + "tabler-rosette-number-1", + "tabler-rosette-number-2", + "tabler-rosette-number-3", + "tabler-rosette-number-4", + "tabler-rosette-number-5", + "tabler-rosette-number-6", + "tabler-rosette-number-7", + "tabler-rosette-number-8", + "tabler-rosette-number-9", + "tabler-rosette", + "tabler-rotate-2", + "tabler-rotate-360", + "tabler-rotate-clockwise-2", + "tabler-rotate-clockwise", + "tabler-rotate-dot", + "tabler-rotate-rectangle", + "tabler-rotate", + "tabler-route-2", + "tabler-route-alt-left", + "tabler-route-alt-right", + "tabler-route-off", + "tabler-route-scan", + "tabler-route-square-2", + "tabler-route-square", + "tabler-route-x-2", + "tabler-route-x", + "tabler-route", + "tabler-router-off", + "tabler-router", + "tabler-row-insert-bottom", + "tabler-row-insert-top", + "tabler-row-remove", + "tabler-rss", + "tabler-rubber-stamp-off", + "tabler-rubber-stamp", + "tabler-ruler-2-off", + "tabler-ruler-2", + "tabler-ruler-3", + "tabler-ruler-measure", + "tabler-ruler-off", + "tabler-ruler", + "tabler-run", + "tabler-rv-truck", + "tabler-s-turn-down", + "tabler-s-turn-left", + "tabler-s-turn-right", + "tabler-s-turn-up", + "tabler-sailboat-2", + "tabler-sailboat-off", + "tabler-sailboat", + "tabler-salad", + "tabler-salt", + "tabler-satellite-off", + "tabler-satellite", + "tabler-sausage", + "tabler-scale-off", + "tabler-scale-outline-off", + "tabler-scale-outline", + "tabler-scale", + "tabler-scan-eye", + "tabler-scan", + "tabler-schema-off", + "tabler-schema", + "tabler-school-bell", + "tabler-school-off", + "tabler-school", + "tabler-scissors-off", + "tabler-scissors", + "tabler-scooter-electric", + "tabler-scooter", + "tabler-scoreboard", + "tabler-screen-share-off", + "tabler-screen-share", + "tabler-screenshot", + "tabler-scribble-off", + "tabler-scribble", + "tabler-script-minus", + "tabler-script-plus", + "tabler-script-x", + "tabler-script", + "tabler-scuba-mask-off", + "tabler-scuba-mask", + "tabler-sdk", + "tabler-search-off", + "tabler-search", + "tabler-section-sign", + "tabler-section", + "tabler-seeding-off", + "tabler-seeding", + "tabler-select-all", + "tabler-select", + "tabler-selector", + "tabler-send-off", + "tabler-send", + "tabler-seo", + "tabler-separator-horizontal", + "tabler-separator-vertical", + "tabler-separator", + "tabler-server-2", + "tabler-server-bolt", + "tabler-server-cog", + "tabler-server-off", + "tabler-server", + "tabler-servicemark", + "tabler-settings-2", + "tabler-settings-automation", + "tabler-settings-bolt", + "tabler-settings-cancel", + "tabler-settings-check", + "tabler-settings-code", + "tabler-settings-cog", + "tabler-settings-dollar", + "tabler-settings-down", + "tabler-settings-exclamation", + "tabler-settings-filled", + "tabler-settings-heart", + "tabler-settings-minus", + "tabler-settings-off", + "tabler-settings-pause", + "tabler-settings-pin", + "tabler-settings-plus", + "tabler-settings-question", + "tabler-settings-search", + "tabler-settings-share", + "tabler-settings-star", + "tabler-settings-up", + "tabler-settings-x", + "tabler-settings", + "tabler-shadow-off", + "tabler-shadow", + "tabler-shape-2", + "tabler-shape-3", + "tabler-shape-off", + "tabler-shape", + "tabler-share-2", + "tabler-share-3", + "tabler-share-off", + "tabler-share", + "tabler-shi-jumping", + "tabler-shield-bolt", + "tabler-shield-cancel", + "tabler-shield-check-filled", + "tabler-shield-check", + "tabler-shield-checkered-filled", + "tabler-shield-checkered", + "tabler-shield-chevron", + "tabler-shield-code", + "tabler-shield-cog", + "tabler-shield-dollar", + "tabler-shield-down", + "tabler-shield-exclamation", + "tabler-shield-filled", + "tabler-shield-half-filled", + "tabler-shield-half", + "tabler-shield-heart", + "tabler-shield-lock-filled", + "tabler-shield-lock", + "tabler-shield-minus", + "tabler-shield-off", + "tabler-shield-pause", + "tabler-shield-pin", + "tabler-shield-plus", + "tabler-shield-question", + "tabler-shield-search", + "tabler-shield-share", + "tabler-shield-star", + "tabler-shield-up", + "tabler-shield-x", + "tabler-shield", + "tabler-ship-off", + "tabler-ship", + "tabler-shirt-filled", + "tabler-shirt-off", + "tabler-shirt-sport", + "tabler-shirt", + "tabler-shoe-off", + "tabler-shoe", + "tabler-shopping-bag-check", + "tabler-shopping-bag-discount", + "tabler-shopping-bag-edit", + "tabler-shopping-bag-exclamation", + "tabler-shopping-bag-minus", + "tabler-shopping-bag-plus", + "tabler-shopping-bag-search", + "tabler-shopping-bag-x", + "tabler-shopping-bag", + "tabler-shopping-cart-bolt", + "tabler-shopping-cart-cancel", + "tabler-shopping-cart-check", + "tabler-shopping-cart-code", + "tabler-shopping-cart-cog", + "tabler-shopping-cart-copy", + "tabler-shopping-cart-discount", + "tabler-shopping-cart-dollar", + "tabler-shopping-cart-down", + "tabler-shopping-cart-exclamation", + "tabler-shopping-cart-filled", + "tabler-shopping-cart-heart", + "tabler-shopping-cart-minus", + "tabler-shopping-cart-off", + "tabler-shopping-cart-pause", + "tabler-shopping-cart-pin", + "tabler-shopping-cart-plus", + "tabler-shopping-cart-question", + "tabler-shopping-cart-search", + "tabler-shopping-cart-share", + "tabler-shopping-cart-star", + "tabler-shopping-cart-up", + "tabler-shopping-cart-x", + "tabler-shopping-cart", + "tabler-shovel", + "tabler-shredder", + "tabler-sign-left-filled", + "tabler-sign-left", + "tabler-sign-right-filled", + "tabler-sign-right", + "tabler-signal-2g", + "tabler-signal-3g", + "tabler-signal-4g-plus", + "tabler-signal-4g", + "tabler-signal-5g", + "tabler-signal-6g", + "tabler-signal-e", + "tabler-signal-g", + "tabler-signal-h-plus", + "tabler-signal-h", + "tabler-signal-lte", + "tabler-signature-off", + "tabler-signature", + "tabler-sitemap-off", + "tabler-sitemap", + "tabler-skateboard-off", + "tabler-skateboard", + "tabler-skateboarding", + "tabler-skull", + "tabler-slash", + "tabler-slashes", + "tabler-sleigh", + "tabler-slice", + "tabler-slideshow", + "tabler-smart-home-off", + "tabler-smart-home", + "tabler-smoking-no", + "tabler-smoking", + "tabler-snowflake-off", + "tabler-snowflake", + "tabler-snowman", + "tabler-soccer-field", + "tabler-social-off", + "tabler-social", + "tabler-sock", + "tabler-sofa-off", + "tabler-sofa", + "tabler-solar-electricity", + "tabler-solar-panel-2", + "tabler-solar-panel", + "tabler-sort-0-9", + "tabler-sort-9-0", + "tabler-sort-a-z", + "tabler-sort-ascending-2", + "tabler-sort-ascending-letters", + "tabler-sort-ascending-numbers", + "tabler-sort-ascending", + "tabler-sort-descending-2", + "tabler-sort-descending-letters", + "tabler-sort-descending-numbers", + "tabler-sort-descending", + "tabler-sort-z-a", + "tabler-sos", + "tabler-soup-off", + "tabler-soup", + "tabler-source-code", + "tabler-space-off", + "tabler-space", + "tabler-spacing-horizontal", + "tabler-spacing-vertical", + "tabler-spade-filled", + "tabler-spade", + "tabler-sparkles", + "tabler-speakerphone", + "tabler-speedboat", + "tabler-sphere-off", + "tabler-sphere-plus", + "tabler-sphere", + "tabler-spider", + "tabler-spiral-off", + "tabler-spiral", + "tabler-sport-billard", + "tabler-spray", + "tabler-spy-off", + "tabler-spy", + "tabler-sql", + "tabler-square-0-filled", + "tabler-square-1-filled", + "tabler-square-2-filled", + "tabler-square-3-filled", + "tabler-square-4-filled", + "tabler-square-5-filled", + "tabler-square-6-filled", + "tabler-square-7-filled", + "tabler-square-8-filled", + "tabler-square-9-filled", + "tabler-square-arrow-down-filled", + "tabler-square-arrow-down", + "tabler-square-arrow-left-filled", + "tabler-square-arrow-left", + "tabler-square-arrow-right-filled", + "tabler-square-arrow-right", + "tabler-square-arrow-up-filled", + "tabler-square-arrow-up", + "tabler-square-asterisk-filled", + "tabler-square-asterisk", + "tabler-square-check-filled", + "tabler-square-check", + "tabler-square-chevron-down-filled", + "tabler-square-chevron-down", + "tabler-square-chevron-left-filled", + "tabler-square-chevron-left", + "tabler-square-chevron-right-filled", + "tabler-square-chevron-right", + "tabler-square-chevron-up-filled", + "tabler-square-chevron-up", + "tabler-square-chevrons-down-filled", + "tabler-square-chevrons-down", + "tabler-square-chevrons-left-filled", + "tabler-square-chevrons-left", + "tabler-square-chevrons-right-filled", + "tabler-square-chevrons-right", + "tabler-square-chevrons-up-filled", + "tabler-square-chevrons-up", + "tabler-square-dot-filled", + "tabler-square-dot", + "tabler-square-f0-filled", + "tabler-square-f0", + "tabler-square-f1-filled", + "tabler-square-f1", + "tabler-square-f2-filled", + "tabler-square-f2", + "tabler-square-f3-filled", + "tabler-square-f3", + "tabler-square-f4-filled", + "tabler-square-f4", + "tabler-square-f5-filled", + "tabler-square-f5", + "tabler-square-f6-filled", + "tabler-square-f6", + "tabler-square-f7-filled", + "tabler-square-f7", + "tabler-square-f8-filled", + "tabler-square-f8", + "tabler-square-f9-filled", + "tabler-square-f9", + "tabler-square-filled", + "tabler-square-forbid-2", + "tabler-square-forbid", + "tabler-square-half", + "tabler-square-key", + "tabler-square-letter-a", + "tabler-square-letter-b", + "tabler-square-letter-c", + "tabler-square-letter-d", + "tabler-square-letter-e", + "tabler-square-letter-f", + "tabler-square-letter-g", + "tabler-square-letter-h", + "tabler-square-letter-i", + "tabler-square-letter-j", + "tabler-square-letter-k", + "tabler-square-letter-l", + "tabler-square-letter-m", + "tabler-square-letter-n", + "tabler-square-letter-o", + "tabler-square-letter-p", + "tabler-square-letter-q", + "tabler-square-letter-r", + "tabler-square-letter-s", + "tabler-square-letter-t", + "tabler-square-letter-u", + "tabler-square-letter-v", + "tabler-square-letter-w", + "tabler-square-letter-x", + "tabler-square-letter-y", + "tabler-square-letter-z", + "tabler-square-minus-filled", + "tabler-square-minus", + "tabler-square-number-0", + "tabler-square-number-1", + "tabler-square-number-2", + "tabler-square-number-3", + "tabler-square-number-4", + "tabler-square-number-5", + "tabler-square-number-6", + "tabler-square-number-7", + "tabler-square-number-8", + "tabler-square-number-9", + "tabler-square-off", + "tabler-square-plus-2", + "tabler-square-plus", + "tabler-square-root-2", + "tabler-square-root", + "tabler-square-rotated-filled", + "tabler-square-rotated-forbid-2", + "tabler-square-rotated-forbid", + "tabler-square-rotated-off", + "tabler-square-rotated", + "tabler-square-rounded-arrow-down-filled", + "tabler-square-rounded-arrow-down", + "tabler-square-rounded-arrow-left-filled", + "tabler-square-rounded-arrow-left", + "tabler-square-rounded-arrow-right-filled", + "tabler-square-rounded-arrow-right", + "tabler-square-rounded-arrow-up-filled", + "tabler-square-rounded-arrow-up", + "tabler-square-rounded-check-filled", + "tabler-square-rounded-check", + "tabler-square-rounded-chevron-down-filled", + "tabler-square-rounded-chevron-down", + "tabler-square-rounded-chevron-left-filled", + "tabler-square-rounded-chevron-left", + "tabler-square-rounded-chevron-right-filled", + "tabler-square-rounded-chevron-right", + "tabler-square-rounded-chevron-up-filled", + "tabler-square-rounded-chevron-up", + "tabler-square-rounded-chevrons-down-filled", + "tabler-square-rounded-chevrons-down", + "tabler-square-rounded-chevrons-left-filled", + "tabler-square-rounded-chevrons-left", + "tabler-square-rounded-chevrons-right-filled", + "tabler-square-rounded-chevrons-right", + "tabler-square-rounded-chevrons-up-filled", + "tabler-square-rounded-chevrons-up", + "tabler-square-rounded-filled", + "tabler-square-rounded-letter-a", + "tabler-square-rounded-letter-b", + "tabler-square-rounded-letter-c", + "tabler-square-rounded-letter-d", + "tabler-square-rounded-letter-e", + "tabler-square-rounded-letter-f", + "tabler-square-rounded-letter-g", + "tabler-square-rounded-letter-h", + "tabler-square-rounded-letter-i", + "tabler-square-rounded-letter-j", + "tabler-square-rounded-letter-k", + "tabler-square-rounded-letter-l", + "tabler-square-rounded-letter-m", + "tabler-square-rounded-letter-n", + "tabler-square-rounded-letter-o", + "tabler-square-rounded-letter-p", + "tabler-square-rounded-letter-q", + "tabler-square-rounded-letter-r", + "tabler-square-rounded-letter-s", + "tabler-square-rounded-letter-t", + "tabler-square-rounded-letter-u", + "tabler-square-rounded-letter-v", + "tabler-square-rounded-letter-w", + "tabler-square-rounded-letter-x", + "tabler-square-rounded-letter-y", + "tabler-square-rounded-letter-z", + "tabler-square-rounded-minus-2", + "tabler-square-rounded-minus-filled", + "tabler-square-rounded-minus", + "tabler-square-rounded-number-0-filled", + "tabler-square-rounded-number-0", + "tabler-square-rounded-number-1-filled", + "tabler-square-rounded-number-1", + "tabler-square-rounded-number-2-filled", + "tabler-square-rounded-number-2", + "tabler-square-rounded-number-3-filled", + "tabler-square-rounded-number-3", + "tabler-square-rounded-number-4-filled", + "tabler-square-rounded-number-4", + "tabler-square-rounded-number-5-filled", + "tabler-square-rounded-number-5", + "tabler-square-rounded-number-6-filled", + "tabler-square-rounded-number-6", + "tabler-square-rounded-number-7-filled", + "tabler-square-rounded-number-7", + "tabler-square-rounded-number-8-filled", + "tabler-square-rounded-number-8", + "tabler-square-rounded-number-9-filled", + "tabler-square-rounded-number-9", + "tabler-square-rounded-plus-2", + "tabler-square-rounded-plus-filled", + "tabler-square-rounded-plus", + "tabler-square-rounded-x-filled", + "tabler-square-rounded-x", + "tabler-square-rounded", + "tabler-square-toggle-horizontal", + "tabler-square-toggle", + "tabler-square-x-filled", + "tabler-square-x", + "tabler-square", + "tabler-squares-diagonal", + "tabler-squares-filled", + "tabler-stack-2", + "tabler-stack-3", + "tabler-stack-pop", + "tabler-stack-push", + "tabler-stack", + "tabler-stairs-down", + "tabler-stairs-up", + "tabler-stairs", + "tabler-star-filled", + "tabler-star-half-filled", + "tabler-star-half", + "tabler-star-off", + "tabler-star", + "tabler-stars-filled", + "tabler-stars-off", + "tabler-stars", + "tabler-status-change", + "tabler-steam", + "tabler-steering-wheel-off", + "tabler-steering-wheel", + "tabler-step-into", + "tabler-step-out", + "tabler-stereo-glasses", + "tabler-stethoscope-off", + "tabler-stethoscope", + "tabler-sticker", + "tabler-storm-off", + "tabler-storm", + "tabler-stretching-2", + "tabler-stretching", + "tabler-strikethrough", + "tabler-submarine", + "tabler-subscript", + "tabler-subtask", + "tabler-sum-off", + "tabler-sum", + "tabler-sun-electricity", + "tabler-sun-filled", + "tabler-sun-high", + "tabler-sun-low", + "tabler-sun-moon", + "tabler-sun-off", + "tabler-sun-wind", + "tabler-sun", + "tabler-sunglasses", + "tabler-sunrise", + "tabler-sunset-2", + "tabler-sunset", + "tabler-superscript", + "tabler-svg", + "tabler-swimming", + "tabler-swipe", + "tabler-switch-2", + "tabler-switch-3", + "tabler-switch-horizontal", + "tabler-switch-vertical", + "tabler-switch", + "tabler-sword-off", + "tabler-sword", + "tabler-swords", + "tabler-table-alias", + "tabler-table-column", + "tabler-table-down", + "tabler-table-export", + "tabler-table-filled", + "tabler-table-heart", + "tabler-table-import", + "tabler-table-minus", + "tabler-table-off", + "tabler-table-options", + "tabler-table-plus", + "tabler-table-row", + "tabler-table-share", + "tabler-table-shortcut", + "tabler-table", + "tabler-tag-off", + "tabler-tag-starred", + "tabler-tag", + "tabler-tags-off", + "tabler-tags", + "tabler-tallymark-1", + "tabler-tallymark-2", + "tabler-tallymark-3", + "tabler-tallymark-4", + "tabler-tallymarks", + "tabler-tank", + "tabler-target-arrow", + "tabler-target-off", + "tabler-target", + "tabler-teapot", + "tabler-telescope-off", + "tabler-telescope", + "tabler-temperature-celsius", + "tabler-temperature-fahrenheit", + "tabler-temperature-minus", + "tabler-temperature-off", + "tabler-temperature-plus", + "tabler-temperature", + "tabler-template-off", + "tabler-template", + "tabler-tent-off", + "tabler-tent", + "tabler-terminal-2", + "tabler-terminal", + "tabler-test-pipe-2", + "tabler-test-pipe-off", + "tabler-test-pipe", + "tabler-tex", + "tabler-text-caption", + "tabler-text-color", + "tabler-text-decrease", + "tabler-text-direction-ltr", + "tabler-text-direction-rtl", + "tabler-text-increase", + "tabler-text-orientation", + "tabler-text-plus", + "tabler-text-recognition", + "tabler-text-resize", + "tabler-text-scan-2", + "tabler-text-size", + "tabler-text-spellcheck", + "tabler-text-wrap-disabled", + "tabler-text-wrap", + "tabler-texture", + "tabler-theater", + "tabler-thermometer", + "tabler-thumb-down-filled", + "tabler-thumb-down-off", + "tabler-thumb-down", + "tabler-thumb-up-filled", + "tabler-thumb-up-off", + "tabler-thumb-up", + "tabler-tic-tac", + "tabler-ticket-off", + "tabler-ticket", + "tabler-tie", + "tabler-tilde", + "tabler-tilt-shift-off", + "tabler-tilt-shift", + "tabler-time-duration-0", + "tabler-time-duration-10", + "tabler-time-duration-15", + "tabler-time-duration-30", + "tabler-time-duration-45", + "tabler-time-duration-5", + "tabler-time-duration-60", + "tabler-time-duration-90", + "tabler-time-duration-off", + "tabler-timeline-event-exclamation", + "tabler-timeline-event-filled", + "tabler-timeline-event-minus", + "tabler-timeline-event-plus", + "tabler-timeline-event-text", + "tabler-timeline-event-x", + "tabler-timeline-event", + "tabler-timeline", + "tabler-tir", + "tabler-toggle-left", + "tabler-toggle-right", + "tabler-toilet-paper-off", + "tabler-toilet-paper", + "tabler-toml", + "tabler-tool", + "tabler-tools-kitchen-2-off", + "tabler-tools-kitchen-2", + "tabler-tools-kitchen-off", + "tabler-tools-kitchen", + "tabler-tools-off", + "tabler-tools", + "tabler-tooltip", + "tabler-topology-bus", + "tabler-topology-complex", + "tabler-topology-full-hierarchy", + "tabler-topology-full", + "tabler-topology-ring-2", + "tabler-topology-ring-3", + "tabler-topology-ring", + "tabler-topology-star-2", + "tabler-topology-star-3", + "tabler-topology-star-ring-2", + "tabler-topology-star-ring-3", + "tabler-topology-star-ring", + "tabler-topology-star", + "tabler-torii", + "tabler-tornado", + "tabler-tournament", + "tabler-tower-off", + "tabler-tower", + "tabler-track", + "tabler-tractor", + "tabler-trademark", + "tabler-traffic-cone-off", + "tabler-traffic-cone", + "tabler-traffic-lights-off", + "tabler-traffic-lights", + "tabler-train", + "tabler-transfer-in", + "tabler-transfer-out", + "tabler-transfer-vertical", + "tabler-transfer", + "tabler-transform-filled", + "tabler-transform", + "tabler-transition-bottom", + "tabler-transition-left", + "tabler-transition-right", + "tabler-transition-top", + "tabler-trash-filled", + "tabler-trash-off", + "tabler-trash-x-filled", + "tabler-trash-x", + "tabler-trash", + "tabler-treadmill", + "tabler-tree", + "tabler-trees", + "tabler-trekking", + "tabler-trending-down-2", + "tabler-trending-down-3", + "tabler-trending-down", + "tabler-trending-up-2", + "tabler-trending-up-3", + "tabler-trending-up", + "tabler-triangle-filled", + "tabler-triangle-inverted-filled", + "tabler-triangle-inverted", + "tabler-triangle-minus-2", + "tabler-triangle-minus", + "tabler-triangle-off", + "tabler-triangle-plus-2", + "tabler-triangle-plus", + "tabler-triangle-square-circle-filled", + "tabler-triangle-square-circle", + "tabler-triangle", + "tabler-triangles", + "tabler-trident", + "tabler-trolley", + "tabler-trophy-filled", + "tabler-trophy-off", + "tabler-trophy", + "tabler-trowel", + "tabler-truck-delivery", + "tabler-truck-loading", + "tabler-truck-off", + "tabler-truck-return", + "tabler-truck", + "tabler-txt", + "tabler-typography-off", + "tabler-typography", + "tabler-ufo-off", + "tabler-ufo", + "tabler-umbrella-filled", + "tabler-umbrella-off", + "tabler-umbrella", + "tabler-underline", + "tabler-universe", + "tabler-unlink", + "tabler-upload", + "tabler-urgent", + "tabler-usb", + "tabler-user-bolt", + "tabler-user-cancel", + "tabler-user-check", + "tabler-user-circle", + "tabler-user-code", + "tabler-user-cog", + "tabler-user-dollar", + "tabler-user-down", + "tabler-user-edit", + "tabler-user-exclamation", + "tabler-user-filled", + "tabler-user-heart", + "tabler-user-hexagon", + "tabler-user-minus", + "tabler-user-off", + "tabler-user-pause", + "tabler-user-pentagon", + "tabler-user-pin", + "tabler-user-plus", + "tabler-user-question", + "tabler-user-scan", + "tabler-user-search", + "tabler-user-share", + "tabler-user-shield", + "tabler-user-square-rounded", + "tabler-user-square", + "tabler-user-star", + "tabler-user-up", + "tabler-user-x", + "tabler-user", + "tabler-users-group", + "tabler-users-minus", + "tabler-users-plus", + "tabler-users", + "tabler-uv-index", + "tabler-ux-circle", + "tabler-vaccine-bottle-off", + "tabler-vaccine-bottle", + "tabler-vaccine-off", + "tabler-vaccine", + "tabler-vacuum-cleaner", + "tabler-variable-minus", + "tabler-variable-off", + "tabler-variable-plus", + "tabler-variable", + "tabler-vector-bezier-2", + "tabler-vector-bezier-arc", + "tabler-vector-bezier-circle", + "tabler-vector-bezier", + "tabler-vector-off", + "tabler-vector-spline", + "tabler-vector-triangle-off", + "tabler-vector-triangle", + "tabler-vector", + "tabler-venus", + "tabler-versions-filled", + "tabler-versions-off", + "tabler-versions", + "tabler-video-minus", + "tabler-video-off", + "tabler-video-plus", + "tabler-video", + "tabler-view-360-off", + "tabler-view-360", + "tabler-viewfinder-off", + "tabler-viewfinder", + "tabler-viewport-narrow", + "tabler-viewport-wide", + "tabler-vinyl", + "tabler-vip-off", + "tabler-vip", + "tabler-virus-off", + "tabler-virus-search", + "tabler-virus", + "tabler-vocabulary-off", + "tabler-vocabulary", + "tabler-volcano", + "tabler-volume-2", + "tabler-volume-3", + "tabler-volume-off", + "tabler-volume", + "tabler-vs", + "tabler-walk", + "tabler-wall-off", + "tabler-wall", + "tabler-wallet-off", + "tabler-wallet", + "tabler-wallpaper-off", + "tabler-wallpaper", + "tabler-wand-off", + "tabler-wand", + "tabler-wash-dry-1", + "tabler-wash-dry-2", + "tabler-wash-dry-3", + "tabler-wash-dry-a", + "tabler-wash-dry-dip", + "tabler-wash-dry-f", + "tabler-wash-dry-flat", + "tabler-wash-dry-hang", + "tabler-wash-dry-off", + "tabler-wash-dry-p", + "tabler-wash-dry-shade", + "tabler-wash-dry-w", + "tabler-wash-dry", + "tabler-wash-dryclean-off", + "tabler-wash-dryclean", + "tabler-wash-eco", + "tabler-wash-gentle", + "tabler-wash-hand", + "tabler-wash-machine", + "tabler-wash-off", + "tabler-wash-press", + "tabler-wash-temperature-1", + "tabler-wash-temperature-2", + "tabler-wash-temperature-3", + "tabler-wash-temperature-4", + "tabler-wash-temperature-5", + "tabler-wash-temperature-6", + "tabler-wash-tumble-dry", + "tabler-wash-tumble-off", + "tabler-wash", + "tabler-waterpolo", + "tabler-wave-saw-tool", + "tabler-wave-sine", + "tabler-wave-square", + "tabler-waves-electricity", + "tabler-webhook-off", + "tabler-webhook", + "tabler-weight", + "tabler-wheel", + "tabler-wheelchair-off", + "tabler-wheelchair", + "tabler-whirl", + "tabler-wifi-0", + "tabler-wifi-1", + "tabler-wifi-2", + "tabler-wifi-off", + "tabler-wifi", + "tabler-wind-electricity", + "tabler-wind-off", + "tabler-wind", + "tabler-windmill-filled", + "tabler-windmill-off", + "tabler-windmill", + "tabler-window-maximize", + "tabler-window-minimize", + "tabler-window-off", + "tabler-window", + "tabler-windsock", + "tabler-wiper-wash", + "tabler-wiper", + "tabler-woman", + "tabler-wood", + "tabler-world-bolt", + "tabler-world-cancel", + "tabler-world-check", + "tabler-world-code", + "tabler-world-cog", + "tabler-world-dollar", + "tabler-world-down", + "tabler-world-download", + "tabler-world-exclamation", + "tabler-world-heart", + "tabler-world-latitude", + "tabler-world-longitude", + "tabler-world-minus", + "tabler-world-off", + "tabler-world-pause", + "tabler-world-pin", + "tabler-world-plus", + "tabler-world-question", + "tabler-world-search", + "tabler-world-share", + "tabler-world-star", + "tabler-world-up", + "tabler-world-upload", + "tabler-world-www", + "tabler-world-x", + "tabler-world", + "tabler-wrecking-ball", + "tabler-writing-off", + "tabler-writing-sign-off", + "tabler-writing-sign", + "tabler-writing", + "tabler-x", + "tabler-xbox-a", + "tabler-xbox-b", + "tabler-xbox-x", + "tabler-xbox-y", + "tabler-xd", + "tabler-xxx", + "tabler-yin-yang-filled", + "tabler-yin-yang", + "tabler-yoga", + "tabler-zeppelin-off", + "tabler-zeppelin", + "tabler-zip", + "tabler-zodiac-aquarius", + "tabler-zodiac-aries", + "tabler-zodiac-cancer", + "tabler-zodiac-capricorn", + "tabler-zodiac-gemini", + "tabler-zodiac-leo", + "tabler-zodiac-libra", + "tabler-zodiac-pisces", + "tabler-zodiac-sagittarius", + "tabler-zodiac-scorpio", + "tabler-zodiac-taurus", + "tabler-zodiac-virgo", + "tabler-zoom-cancel", + "tabler-zoom-check-filled", + "tabler-zoom-check", + "tabler-zoom-code", + "tabler-zoom-exclamation", + "tabler-zoom-filled", + "tabler-zoom-in-area-filled", + "tabler-zoom-in-area", + "tabler-zoom-in-filled", + "tabler-zoom-in", + "tabler-zoom-money", + "tabler-zoom-out-area", + "tabler-zoom-out-filled", + "tabler-zoom-out", + "tabler-zoom-pan", + "tabler-zoom-question", + "tabler-zoom-replace", + "tabler-zoom-reset", + "tabler-zoom-scan", + "tabler-zzz-off", + "tabler-zzz", +]; + +export const tablerIcons = new Set(tablerIconNames); diff --git a/docs/sdk/io/runtask.mdx b/docs/sdk/io/runtask.mdx index eca598386..1b619e0eb 100644 --- a/docs/sdk/io/runtask.mdx +++ b/docs/sdk/io/runtask.mdx @@ -60,8 +60,7 @@ The wrappers at `io.integration.runTask()` expose the underlying Integration cli The icon for the Task, it will appear in the logs. You can use the name of a - company in lowercase, e.g. "github". Or any icon name that [Font - Awesome](https://fontawesome.com/icons) supports. + company in lowercase, e.g. "github". Or any icon name that [Tabler Icons](https://tabler-icons.io/) supports. A description of the Task. diff --git a/packages/core/src/schemas/api.ts b/packages/core/src/schemas/api.ts index 4e16cbfc5..d95ebf65e 100644 --- a/packages/core/src/schemas/api.ts +++ b/packages/core/src/schemas/api.ts @@ -664,7 +664,7 @@ export const RunTaskOptionsSchema = z.object({ retry: RetryOptionsSchema.optional(), /** The icon for the Task, it will appear in the logs. * You can use the name of a company in lowercase, e.g. "github". - * Or any icon name that [Font Awesome](https://fontawesome.com/icons) supports. */ + * Or any icon name that [Tabler Icons](https://tabler-icons.io/) supports. */ icon: z.string().optional(), /** The key for the Task that you want to appear in the logs */ displayKey: z.string().optional(), diff --git a/references/job-catalog/src/events.ts b/references/job-catalog/src/events.ts index 7bd9d9a08..8e4cb660b 100644 --- a/references/job-catalog/src/events.ts +++ b/references/job-catalog/src/events.ts @@ -19,11 +19,15 @@ client.defineJob({ name: "event.example", }), run: async (payload, io, ctx) => { - await io.runTask("task-example-1", async () => { - return { - message: "Hello World", - }; - }); + await io.runTask( + "task-example-1", + async () => { + return { + message: "Hello World", + }; + }, + { icon: "360" } + ); await io.wait("wait-1", 1); From 6d3b761cd7ce398b8e050bb86b8b03893ddcdf34 Mon Sep 17 00:00:00 2001 From: Hemachandar <132386067+hmacr@users.noreply.github.com> Date: Fri, 20 Oct 2023 16:30:17 +0530 Subject: [PATCH 08/19] fix: set correct next/prev cursors in run-list-presenter (#642) * fix: set correct next/prev cursors in run-list-presenter * set runs to return --- apps/webapp/app/presenters/RunListPresenter.server.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/webapp/app/presenters/RunListPresenter.server.ts b/apps/webapp/app/presenters/RunListPresenter.server.ts index bace18a9c..63a1df2b5 100644 --- a/apps/webapp/app/presenters/RunListPresenter.server.ts +++ b/apps/webapp/app/presenters/RunListPresenter.server.ts @@ -100,21 +100,24 @@ export class RunListPresenter { let previous: string | undefined; switch (direction) { case "forward": + previous = cursor ? runs.at(0)?.id : undefined; if (hasMore) { next = runs[PAGE_SIZE - 1]?.id; } - previous = cursor ? runs.at(1)?.id : undefined; break; case "backward": if (hasMore) { - next = runs[PAGE_SIZE - 1]?.id; + previous = runs[1]?.id; } - previous = runs.at(1)?.id; + next = runs[PAGE_SIZE - 1]?.id; break; } + const runsToReturn = + direction === "backward" && hasMore ? runs.slice(1, PAGE_SIZE + 1) : runs.slice(0, PAGE_SIZE); + return { - runs: runs.slice(0, PAGE_SIZE).map((run) => ({ + runs: runsToReturn.map((run) => ({ id: run.id, number: run.number, startedAt: run.startedAt, From 34bb3acc235fdc1ea74bda93b2e1952281a49a40 Mon Sep 17 00:00:00 2001 From: D-K-P Date: Fri, 20 Oct 2023 12:50:27 +0100 Subject: [PATCH 09/19] Removed idempotencyKey line from GH tasks --- docs/integrations/apis/github-tasks.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/integrations/apis/github-tasks.mdx b/docs/integrations/apis/github-tasks.mdx index 2dbc2e33d..2cf9c9a31 100644 --- a/docs/integrations/apis/github-tasks.mdx +++ b/docs/integrations/apis/github-tasks.mdx @@ -259,5 +259,3 @@ client.defineJob({ }, }); ``` - -Make sure to pass the `idempotencyKey` to the underlying client to ensure that the API call is only executed once. This is only needed for mutating API calls. From a6c9cac26cc73842719c141b71876b02bf02d051 Mon Sep 17 00:00:00 2001 From: dhselar1423 Date: Fri, 20 Oct 2023 18:30:03 +0530 Subject: [PATCH 10/19] slack docs --- docs/integrations/apis/slack-tasks.mdx | 26 +++++++++++++ docs/integrations/apis/slack.mdx | 51 +++++++++++--------------- docs/mint.json | 24 +++++++++--- 3 files changed, 67 insertions(+), 34 deletions(-) create mode 100644 docs/integrations/apis/slack-tasks.mdx diff --git a/docs/integrations/apis/slack-tasks.mdx b/docs/integrations/apis/slack-tasks.mdx new file mode 100644 index 000000000..a23f8b2eb --- /dev/null +++ b/docs/integrations/apis/slack-tasks.mdx @@ -0,0 +1,26 @@ +--- +title: Slack tasks +sidebarTitle: Tasks +--- + +Tasks are executed after the job is triggered and are the main building blocks of a job. You can string together as many tasks as you want. + +--- + +## All tasks + +### `postMessage` + +Post a message to a channel. [Official Slack Docs](https://api.slack.com/methods/chat.postMessage) + +```ts example.ts +// Send a Slack message using the io.slack.postMessage function +const response = await io.slack.postMessage("post message", { + // Specify the target channel by providing its ID + channel: "C04GWUTDC3W", + // Set the text content of the message + text: "My first Slack message", +}); + +``` + diff --git a/docs/integrations/apis/slack.mdx b/docs/integrations/apis/slack.mdx index 53e6cbadf..848aed47c 100644 --- a/docs/integrations/apis/slack.mdx +++ b/docs/integrations/apis/slack.mdx @@ -1,8 +1,20 @@ --- -title: Slack +title: Plain overview & authentication +sidebarTitle: Overview & authentication --- - +## Overview + +The Slack platform allows you to extend and automate your workspaces to cultivate conversation, inspire action, and synergize services. + + + + Check out pre-built Plain jobs in our showcase. + ## Installation @@ -33,32 +45,13 @@ const slack = new Slack({ id: "slack", }); ``` - -## Example - -```ts -client.defineJob({ - id: "slack-test", - name: "Slack test", - version: "0.0.1", - trigger: eventTrigger({ - name: "slack.test", - schema: z.object({}), - }), - integrations: { - slack, - }, - run: async (payload, io, ctx) => { - const response = await io.slack.postMessage("post message", { - channel: "C04GWUTDC3W", - text: "My first Slack message", - }); - }, -}); -``` - ## Tasks -| Function Name | Description | -| ------------- | --------------------------- | -| `postMessage` | Post a message to a channel | +Once you have set up a Slack client, you can use it to create tasks. + + + + Perform tasks such as posting message to a channel. + + + diff --git a/docs/mint.json b/docs/mint.json index 8c1399778..a402df803 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -258,7 +258,13 @@ "integrations/apis/replicate", "integrations/apis/resend", "integrations/apis/sendgrid", - "integrations/apis/slack", + { + "group": "Slack", + "pages": [ + "integrations/apis/slack", + "integrations/apis/slack-tasks" + ] + }, "integrations/apis/stripe", { "group": "Supabase", @@ -325,7 +331,10 @@ "sdk/dynamictrigger/constructor", { "group": "Instance methods", - "pages": ["sdk/dynamictrigger/register", "sdk/dynamictrigger/unregister"] + "pages": [ + "sdk/dynamictrigger/register", + "sdk/dynamictrigger/unregister" + ] } ] }, @@ -336,7 +345,10 @@ "sdk/dynamicschedule/constructor", { "group": "Instance methods", - "pages": ["sdk/dynamicschedule/register", "sdk/dynamicschedule/unregister"] + "pages": [ + "sdk/dynamicschedule/register", + "sdk/dynamicschedule/unregister" + ] } ] }, @@ -357,7 +369,9 @@ }, { "group": "Overview", - "pages": ["examples/introduction"] + "pages": [ + "examples/introduction" + ] } ], "footerSocials": { @@ -370,4 +384,4 @@ "apiKey": "phc_hwYmedO564b3Ik8nhA4Csrb5SueY0EwFJWCbseGwWW" } } -} +} \ No newline at end of file From fde3f17a251b78de4f37e853358202dc99f6a41f Mon Sep 17 00:00:00 2001 From: dhselar1423 Date: Fri, 20 Oct 2023 19:00:41 +0530 Subject: [PATCH 11/19] fixed typos --- docs/integrations/apis/slack.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/integrations/apis/slack.mdx b/docs/integrations/apis/slack.mdx index 848aed47c..23aedd31d 100644 --- a/docs/integrations/apis/slack.mdx +++ b/docs/integrations/apis/slack.mdx @@ -1,5 +1,5 @@ --- -title: Plain overview & authentication +title: Slack overview & authentication sidebarTitle: Overview & authentication --- @@ -13,7 +13,7 @@ The Slack platform allows you to extend and automate your workspaces to cultivat icon="rocket" href="https://trigger.dev/showcase?tags=&integrations=slack" > - Check out pre-built Plain jobs in our showcase. + Check out pre-built Slack jobs in our showcase. ## Installation From dce5578327cd7b13175dd5846d8b4def5219994b Mon Sep 17 00:00:00 2001 From: D-K-P Date: Fri, 20 Oct 2023 14:35:28 +0100 Subject: [PATCH 12/19] Improved the GitHub overview copy --- docs/integrations/apis/github.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/integrations/apis/github.mdx b/docs/integrations/apis/github.mdx index 4b00021be..a3ee2e175 100644 --- a/docs/integrations/apis/github.mdx +++ b/docs/integrations/apis/github.mdx @@ -5,7 +5,11 @@ sidebarTitle: Overview & authentication ## Overview -Our GitHub integration allows you to create triggers and tasks that interact with GitHub. For examples of some of the things you can do with it, check out our Jobs Showcase: +Our GitHub integration allows you to create triggers and tasks that interact with GitHub. + +Trigger jobs when events happen, such as when a new issue is added to a repo, a commit is pushed, or a pull request is opened. You can also use the integration to perform tasks such as creating issues, getting information about a repo, adding comments, and much more. + +For examples of some of the things you can do with it, check out our Jobs Showcase: Date: Fri, 20 Oct 2023 16:12:17 +0100 Subject: [PATCH 13/19] Made the app work very basically on mobile devices (#668) * Removed the no-mobile blocker overlay so you can use the site on a phone * Removed mobile dropdown from nav * The app works on mobile at a width of 1024px --- .../app/components/navigation/NavBar.tsx | 81 ------------------- apps/webapp/app/root.tsx | 2 +- apps/webapp/app/routes/_app/route.tsx | 2 - 3 files changed, 1 insertion(+), 84 deletions(-) diff --git a/apps/webapp/app/components/navigation/NavBar.tsx b/apps/webapp/app/components/navigation/NavBar.tsx index 6529cb4f2..9f09cd72b 100644 --- a/apps/webapp/app/components/navigation/NavBar.tsx +++ b/apps/webapp/app/components/navigation/NavBar.tsx @@ -17,7 +17,6 @@ export function NavBar() { -
@@ -46,83 +45,3 @@ export function BreadcrumbLink({ title, to }: { title: string; to: string }) { ); } - -function MobileDropdownMenu() { - return ( - - - {({ open }) => } - - - - - - - - {/* - - Documentation - - - - Send us feedback - - - Logout - */} - - - - - ); -} - -function MobileNavIcon({ open }: { open: boolean }) { - return ( - - ); -} diff --git a/apps/webapp/app/root.tsx b/apps/webapp/app/root.tsx index 589878a20..9819685cb 100644 --- a/apps/webapp/app/root.tsx +++ b/apps/webapp/app/root.tsx @@ -25,7 +25,7 @@ export const links: LinksFunction = () => { export const meta: TypedMetaFunction = ({ data }) => ({ title: `Trigger.dev${appEnvTitleTag(data?.appEnv)}`, charset: "utf-8", - viewport: "width=device-width,initial-scale=1", + viewport: "width=1024, initial-scale=1", }); export const loader = async ({ request }: LoaderArgs) => { diff --git a/apps/webapp/app/routes/_app/route.tsx b/apps/webapp/app/routes/_app/route.tsx index 44d8970e9..582008cb4 100644 --- a/apps/webapp/app/routes/_app/route.tsx +++ b/apps/webapp/app/routes/_app/route.tsx @@ -60,7 +60,6 @@ export default function App() { return ( <> {impersonationId && } - @@ -72,7 +71,6 @@ export default function App() { export function ErrorBoundary() { return ( <> - From e7768881afe355c265c332e0ef107e336ab9ec3a Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Fri, 20 Oct 2023 16:53:01 +0100 Subject: [PATCH 14/19] Admin page now full screen with now extra UI --- apps/webapp/app/routes/admin._index.tsx | 18 +-- apps/webapp/app/routes/admin.tsx | 167 +----------------------- 2 files changed, 10 insertions(+), 175 deletions(-) diff --git a/apps/webapp/app/routes/admin._index.tsx b/apps/webapp/app/routes/admin._index.tsx index 77f30bbe4..3b98900e6 100644 --- a/apps/webapp/app/routes/admin._index.tsx +++ b/apps/webapp/app/routes/admin._index.tsx @@ -30,9 +30,8 @@ export async function action({ request }: ActionArgs) { }); } -const headerClassName = - "py-3 px-2 pr-3 text-xs font-semibold leading-tight text-slate-900 text-left"; -const cellClassName = "whitespace-nowrap px-2 py-2 text-xs text-slate-500"; +const headerClassName = "py-3 px-2 pr-3 text-xs font-semibold leading-tight text-bright text-left"; +const cellClassName = "whitespace-nowrap px-2 py-2 text-xs text-bright"; export default function AdminDashboardRoute() { const { users } = useTypedLoaderData(); @@ -46,8 +45,8 @@ export default function AdminDashboardRoute() { >

Accounts ({users.length})

- - +
+ - + {users.map((user) => { return ( - +
Email @@ -69,10 +68,10 @@ export default function AdminDashboardRoute() {
{user.email}
- - {/* Secondary column (hidden on smaller screens) */} - ); } diff --git a/apps/webapp/app/routes/admin.tsx b/apps/webapp/app/routes/admin.tsx index 9b83ce228..97091a28d 100644 --- a/apps/webapp/app/routes/admin.tsx +++ b/apps/webapp/app/routes/admin.tsx @@ -1,15 +1,8 @@ -import { Dialog, Transition } from "@headlessui/react"; -import { HomeIcon, XMarkIcon } from "@heroicons/react/24/outline"; -import { UserCircleIcon } from "@heroicons/react/24/solid"; +import { HomeIcon } from "@heroicons/react/24/outline"; import { Outlet } from "@remix-run/react"; import type { LoaderArgs } from "@remix-run/server-runtime"; -import { Fragment, useState } from "react"; import { redirect, typedjson, useTypedLoaderData } from "remix-typedjson"; -import type { User } from "~/models/user.server"; import { getUser, requireUserId } from "~/services/session.server"; -import { cn } from "~/utils/cn"; - -const navigation = [{ name: "Home", href: "/admin", icon: HomeIcon }]; export async function loader({ request }: LoaderArgs) { await requireUserId(request); @@ -27,162 +20,10 @@ export async function loader({ request }: LoaderArgs) { export default function Page() { const data = useTypedLoaderData(); - const [mobileMenuOpen, setMobileMenuOpen] = useState(false); return ( - <> -
- - - - - - ); -} - -function UserProfilePhoto({ user, className }: { user: User; className?: string }) { - return user.avatarUrl ? ( - {user.name - ) : ( - +
+ +
); } From 044d38e3903f8f61dbcf5fb5a36f01d74f45725a Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Fri, 20 Oct 2023 17:44:10 +0100 Subject: [PATCH 15/19] Improvement: Auto Execution Yielding (#612) * Auto-yield run execution to help prevent duplicate task executions * Add auto-yield config to endpoints * Refactor run execution with buffer and limits Introduced constants RUN_CHUNK_EXECUTION_BUFFER and MAX_RUN_CHUNK_EXECUTION_LIMIT. Adjusted PerformRunExecutionV2Service to use the new constants to fine-tune execution timings and buffers. * Add endpoint probing functionality Added new `RESPONSE_TIMEOUT_STATUS_CODES` in `consts.ts` to manage timeout responses. Additional functions `detectResponseIsTimeout(response: Response)` was added in `endpoint.server.ts` to detect if a response was a timeout based on the status codes from `RESPONSE_TIMEOUT_STATUS_CODES`. Update actions to use new endpoint probing endpoint service. This allows for the early probing of endpoints to determine if they're up and running. A new class `ProbeEndpointService` was created in `probeEndpoint.server.ts` which makes HTTP requests to a given endpoint and updates its properties based on the result. Finally, `detectResponseIsTimeout(response)` is used in `performRunExecutionV2.server.ts` for marking the execution as succeeded when facing a timeout. * Refactored probe method in EndpointApi class The probe method of the EndpointApi class has been refactored to remove the error handling part and it now takes a timeout sent from the client directly. The corresponding changes were also made in the ProbeEndpointService and TriggerClient objects to reflect the alterations in the probe method. The error handling related to the timeout has been removed and the responsibility of handling the timeout has been shifted to the client. Thus, the probe method has been greatly simplified. The `probeEndpoint.server.ts` file was also changed to accommodate the change in behavior of the probe result. In the `triggerClient.ts` the timeout for probe is now read from the incoming request object. For backward compatibility, if no timeout is provided in the request, the default value of 15 minutes is used. * Remove performRunExecution v1 enqueue function * Better document limits and add docs on increasing function timeouts * Upgrade webapp docker container to use 18.18.2 * force clients to yield when a run is executing in a gracefully shutting down worker * Renamed task `key` to `cacheKey` and added more task documentation * Index the `@trigger.dev/sdk` version on Endpoints --- .changeset/cyan-brooms-cheat.md | 6 + apps/webapp/app/consts.ts | 3 + apps/webapp/app/models/endpoint.server.ts | 12 + .../app/models/jobRunExecution.server.ts | 21 - apps/webapp/app/models/task.server.ts | 5 +- apps/webapp/app/platform/zodWorker.server.ts | 34 +- .../routes/api.v1.runs.$runId.statuses.$id.ts | 9 +- .../api.v1.runs.$runId.tasks.$id.complete.ts | 9 +- .../api.v1.runs.$runId.tasks.$id.fail.ts | 1 + .../app/routes/api.v1.runs.$runId.tasks.ts | 1 + ...nvironmentParam.endpoint.$endpointParam.ts | 16 +- .../webapp/app/services/endpointApi.server.ts | 22 + .../endpoints/performEndpointIndexService.ts | 9 +- .../endpoints/probeEndpoint.server.ts | 64 ++ .../runs/forceYieldCoordinator.server.ts | 47 ++ .../runs/performRunExecutionV1.server.ts | 771 ------------------ .../runs/performRunExecutionV2.server.ts | 643 ++++++++++----- apps/webapp/app/services/worker.server.ts | 28 +- apps/webapp/package.json | 1 - apps/webapp/server.ts | 26 +- docker/Dockerfile | 6 +- docker/services-compose.yml | 65 ++ docs/_snippets/stable-key-param.mdx | 4 +- docs/documentation/concepts/limitations.mdx | 31 - docs/documentation/concepts/limits.mdx | 116 +++ docs/documentation/concepts/resumability.mdx | 19 +- docs/documentation/concepts/tasks.mdx | 270 +++++- .../concepts/what-is-triggerdotdev.mdx | 16 + docs/documentation/guides/create-a-job.mdx | 270 ------ .../documentation/guides/platforms/nextjs.mdx | 8 + .../guides/writing-jobs-step-by-step.mdx | 382 +++++++++ docs/images/task.png | Bin 0 -> 51335 bytes docs/mint.json | 36 +- docs/sdk/io/overview.mdx | 12 +- docs/sdk/io/runtask.mdx | 47 +- packages/core/src/schemas/api.ts | 43 + packages/core/src/schemas/tasks.ts | 1 + .../migration.sql | 2 + .../migration.sql | 14 + .../migration.sql | 8 + .../migration.sql | 2 + .../migration.sql | 5 + .../migration.sql | 2 + .../migration.sql | 2 + packages/database/prisma/schema.prisma | 24 + packages/trigger-sdk/src/errors.ts | 30 +- packages/trigger-sdk/src/io.ts | 168 +++- packages/trigger-sdk/src/triggerClient.ts | 86 +- pnpm-lock.yaml | 17 +- references/job-catalog/package.json | 3 +- references/job-catalog/src/auto-yield.ts | 83 ++ 51 files changed, 1975 insertions(+), 1525 deletions(-) create mode 100644 .changeset/cyan-brooms-cheat.md create mode 100644 apps/webapp/app/services/endpoints/probeEndpoint.server.ts create mode 100644 apps/webapp/app/services/runs/forceYieldCoordinator.server.ts delete mode 100644 apps/webapp/app/services/runs/performRunExecutionV1.server.ts create mode 100644 docker/services-compose.yml delete mode 100644 docs/documentation/concepts/limitations.mdx create mode 100644 docs/documentation/concepts/limits.mdx delete mode 100644 docs/documentation/guides/create-a-job.mdx create mode 100644 docs/documentation/guides/writing-jobs-step-by-step.mdx create mode 100644 docs/images/task.png create mode 100644 packages/database/prisma/migrations/20231011104302_add_run_chunk_column/migration.sql create mode 100644 packages/database/prisma/migrations/20231011134840_add_auto_yielded_executions/migration.sql create mode 100644 packages/database/prisma/migrations/20231011141302_add_location_to_auto_yield_executions/migration.sql create mode 100644 packages/database/prisma/migrations/20231011145406_change_run_chunk_execution_limit_default/migration.sql create mode 100644 packages/database/prisma/migrations/20231011213532_add_auto_yield_threshold_settings_to_endpoints/migration.sql create mode 100644 packages/database/prisma/migrations/20231019123406_add_force_yield_immediately_to_runs/migration.sql create mode 100644 packages/database/prisma/migrations/20231020145127_add_sdk_version_to_endpoints/migration.sql create mode 100644 references/job-catalog/src/auto-yield.ts diff --git a/.changeset/cyan-brooms-cheat.md b/.changeset/cyan-brooms-cheat.md new file mode 100644 index 000000000..5d3b310fa --- /dev/null +++ b/.changeset/cyan-brooms-cheat.md @@ -0,0 +1,6 @@ +--- +"@trigger.dev/sdk": patch +"@trigger.dev/core": patch +--- + +Auto-yield run execution to help prevent duplicate task executions diff --git a/apps/webapp/app/consts.ts b/apps/webapp/app/consts.ts index 51ab2cc44..f81d96109 100644 --- a/apps/webapp/app/consts.ts +++ b/apps/webapp/app/consts.ts @@ -6,3 +6,6 @@ export const MAX_CONCURRENT_RUNS_LIMIT = 20; export const PREPROCESS_RETRY_LIMIT = 2; export const EXECUTE_JOB_RETRY_LIMIT = 10; export const MAX_RUN_YIELDED_EXECUTIONS = 100; +export const RUN_CHUNK_EXECUTION_BUFFER = 350; +export const MAX_RUN_CHUNK_EXECUTION_LIMIT = 120000; // 2 minutes +export const RESPONSE_TIMEOUT_STATUS_CODES = [408, 504]; diff --git a/apps/webapp/app/models/endpoint.server.ts b/apps/webapp/app/models/endpoint.server.ts index 0581d87ca..25c7aa945 100644 --- a/apps/webapp/app/models/endpoint.server.ts +++ b/apps/webapp/app/models/endpoint.server.ts @@ -1,3 +1,4 @@ +import { RESPONSE_TIMEOUT_STATUS_CODES } from "~/consts"; import { prisma } from "~/db.server"; import { Prettify } from "~/lib.es5"; @@ -18,3 +19,14 @@ export async function findEndpoint(id: string) { }, }); } + +export function detectResponseIsTimeout(response?: Response) { + if (!response) { + return false; + } + + return ( + RESPONSE_TIMEOUT_STATUS_CODES.includes(response.status) || + response.headers.get("x-vercel-error") === "FUNCTION_INVOCATION_TIMEOUT" + ); +} diff --git a/apps/webapp/app/models/jobRunExecution.server.ts b/apps/webapp/app/models/jobRunExecution.server.ts index 933463c6a..0a4422e07 100644 --- a/apps/webapp/app/models/jobRunExecution.server.ts +++ b/apps/webapp/app/models/jobRunExecution.server.ts @@ -2,27 +2,6 @@ import { JobRun, JobRunExecution } from "@trigger.dev/database"; import { PrismaClientOrTransaction } from "~/db.server"; import { executionWorker } from "~/services/worker.server"; -export async function enqueueRunExecutionV1( - execution: JobRunExecution, - queueId: string, - concurrency: number, - tx: PrismaClientOrTransaction, - runAt?: Date -) { - const job = await executionWorker.enqueue( - "performRunExecution", - { - id: execution.id, - }, - { - queueName: `job:queue:${queueId}`, - tx, - runAt, - jobKey: `execution:${execution.runId}`, - } - ); -} - export type EnqueueRunExecutionV2Options = { runAt?: Date; resumeTaskId?: string; diff --git a/apps/webapp/app/models/task.server.ts b/apps/webapp/app/models/task.server.ts index b674dd0a4..f2df0a060 100644 --- a/apps/webapp/app/models/task.server.ts +++ b/apps/webapp/app/models/task.server.ts @@ -1,7 +1,7 @@ -import type { Task, TaskAttempt } from "@trigger.dev/database"; +import type { JobRun, Task, TaskAttempt } from "@trigger.dev/database"; import { CachedTask, ServerTask } from "@trigger.dev/core"; -export type TaskWithAttempts = Task & { attempts: TaskAttempt[] }; +export type TaskWithAttempts = Task & { attempts: TaskAttempt[]; run: JobRun }; export function taskWithAttemptsToServerTask(task: TaskWithAttempts): ServerTask { return { @@ -24,6 +24,7 @@ export function taskWithAttemptsToServerTask(task: TaskWithAttempts): ServerTask idempotencyKey: task.idempotencyKey, operation: task.operation, callbackUrl: task.callbackUrl, + forceYield: task.run.forceYieldImmediately, }; } diff --git a/apps/webapp/app/platform/zodWorker.server.ts b/apps/webapp/app/platform/zodWorker.server.ts index 2a9e823ff..d4480286d 100644 --- a/apps/webapp/app/platform/zodWorker.server.ts +++ b/apps/webapp/app/platform/zodWorker.server.ts @@ -204,34 +204,32 @@ export class ZodWorker { this.#logDebug("stop"); }); - process.on("SIGTERM", this._handleSignal("SIGTERM").bind(this)); - process.on("SIGINT", this._handleSignal("SIGINT").bind(this)); + process.on("SIGTERM", this._handleSignal.bind(this)); + process.on("SIGINT", this._handleSignal.bind(this)); return true; } private _handleSignal(signal: string) { - return () => { - if (this.#shuttingDown) { - return; - } + if (this.#shuttingDown) { + return; + } - this.#shuttingDown = true; + this.#shuttingDown = true; - if (this.#shutdownTimeoutInMs) { - setTimeout(() => { - this.#logDebug("Shutdown timeout reached, exiting process"); + if (this.#shutdownTimeoutInMs) { + setTimeout(() => { + this.#logDebug("Shutdown timeout reached, exiting process"); - process.exit(0); - }, this.#shutdownTimeoutInMs); - } + process.exit(0); + }, this.#shutdownTimeoutInMs); + } - this.#logDebug(`Received ${signal}, shutting down zodWorker...`); + this.#logDebug(`Received ${signal}, shutting down zodWorker...`); - this.stop().finally(() => { - this.#logDebug("zodWorker stopped"); - }); - }; + this.stop().finally(() => { + this.#logDebug("zodWorker stopped"); + }); } public async stop() { diff --git a/apps/webapp/app/routes/api.v1.runs.$runId.statuses.$id.ts b/apps/webapp/app/routes/api.v1.runs.$runId.statuses.$id.ts index e54753423..ca8bf9fb2 100644 --- a/apps/webapp/app/routes/api.v1.runs.$runId.statuses.$id.ts +++ b/apps/webapp/app/routes/api.v1.runs.$runId.statuses.$id.ts @@ -1,10 +1,7 @@ import type { ActionArgs } from "@remix-run/server-runtime"; import { json } from "@remix-run/server-runtime"; -import { TaskStatus } from "@trigger.dev/database"; import { - RunTaskBodyOutput, - RunTaskBodyOutputSchema, - ServerTask, + JobRunStatusRecordSchema, StatusHistory, StatusHistorySchema, StatusUpdate, @@ -14,12 +11,8 @@ import { } from "@trigger.dev/core"; import { z } from "zod"; import { $transaction, PrismaClient, prisma } from "~/db.server"; -import { taskWithAttemptsToServerTask } from "~/models/task.server"; import { authenticateApiRequest } from "~/services/apiAuth.server"; import { logger } from "~/services/logger.server"; -import { ulid } from "~/services/ulid.server"; -import { workerQueue } from "~/services/worker.server"; -import { JobRunStatusRecordSchema } from "@trigger.dev/core"; const ParamsSchema = z.object({ runId: z.string(), diff --git a/apps/webapp/app/routes/api.v1.runs.$runId.tasks.$id.complete.ts b/apps/webapp/app/routes/api.v1.runs.$runId.tasks.$id.complete.ts index f116261cb..c84a7af3d 100644 --- a/apps/webapp/app/routes/api.v1.runs.$runId.tasks.$id.complete.ts +++ b/apps/webapp/app/routes/api.v1.runs.$runId.tasks.$id.complete.ts @@ -3,7 +3,7 @@ import { json } from "@remix-run/server-runtime"; import type { CompleteTaskBodyOutput, ServerTask } from "@trigger.dev/core"; import { CompleteTaskBodyInputSchema } from "@trigger.dev/core"; import { z } from "zod"; -import { PrismaClient, prisma } from "~/db.server"; +import { $transaction, PrismaClient, PrismaClientOrTransaction, prisma } from "~/db.server"; import { taskWithAttemptsToServerTask } from "~/models/task.server"; import type { AuthenticatedEnvironment } from "~/services/apiAuth.server"; import { authenticateApiRequest } from "~/services/apiAuth.server"; @@ -72,9 +72,9 @@ export async function action({ request, params }: ActionArgs) { } export class CompleteRunTaskService { - #prismaClient: PrismaClient; + #prismaClient: PrismaClientOrTransaction; - constructor(prismaClient: PrismaClient = prisma) { + constructor(prismaClient: PrismaClientOrTransaction = prisma) { this.#prismaClient = prismaClient; } @@ -86,7 +86,7 @@ export class CompleteRunTaskService { ): Promise { // Using a transaction, we'll first check to see if the task already exists and return if if it does // If it doesn't exist, we'll create it and return it - const task = await this.#prismaClient.$transaction(async (tx) => { + const task = await $transaction(this.#prismaClient, async (tx) => { const existingTask = await tx.task.findUnique({ where: { id, @@ -152,6 +152,7 @@ export class CompleteRunTaskService { }, include: { attempts: true, + run: true, }, }); }); diff --git a/apps/webapp/app/routes/api.v1.runs.$runId.tasks.$id.fail.ts b/apps/webapp/app/routes/api.v1.runs.$runId.tasks.$id.fail.ts index 8bdfb4f44..56bef530e 100644 --- a/apps/webapp/app/routes/api.v1.runs.$runId.tasks.$id.fail.ts +++ b/apps/webapp/app/routes/api.v1.runs.$runId.tasks.$id.fail.ts @@ -152,6 +152,7 @@ export class FailRunTaskService { }, include: { attempts: true, + run: true, }, }); }); diff --git a/apps/webapp/app/routes/api.v1.runs.$runId.tasks.ts b/apps/webapp/app/routes/api.v1.runs.$runId.tasks.ts index 871a48d92..e19796b18 100644 --- a/apps/webapp/app/routes/api.v1.runs.$runId.tasks.ts +++ b/apps/webapp/app/routes/api.v1.runs.$runId.tasks.ts @@ -184,6 +184,7 @@ export class RunTaskService { }, include: { attempts: true, + run: true, }, }); diff --git a/apps/webapp/app/routes/resources.environments.$environmentParam.endpoint.$endpointParam.ts b/apps/webapp/app/routes/resources.environments.$environmentParam.endpoint.$endpointParam.ts index df8fcf927..b4033d9dd 100644 --- a/apps/webapp/app/routes/resources.environments.$environmentParam.endpoint.$endpointParam.ts +++ b/apps/webapp/app/routes/resources.environments.$environmentParam.endpoint.$endpointParam.ts @@ -1,20 +1,26 @@ import { ActionArgs, json } from "@remix-run/server-runtime"; import { z } from "zod"; import { IndexEndpointService } from "~/services/endpoints/indexEndpoint.server"; -import { requireUserId } from "~/services/session.server"; +import { workerQueue } from "~/services/worker.server"; const ParamsSchema = z.object({ environmentParam: z.string(), endpointParam: z.string(), }); -export async function action({ request, params }: ActionArgs) { - const userId = await requireUserId(request); - const { environmentParam, endpointParam } = ParamsSchema.parse(params); +export async function action({ params }: ActionArgs) { + const { endpointParam } = ParamsSchema.parse(params); try { const service = new IndexEndpointService(); - const result = await service.call(endpointParam, "MANUAL"); + await service.call(endpointParam, "MANUAL"); + + // Enqueue the endpoint to be probed in 10 seconds + await workerQueue.enqueue( + "probeEndpoint", + { id: endpointParam }, + { jobKey: `probe:${endpointParam}`, runAt: new Date(Date.now() + 10000) } + ); return json({ success: true }); } catch (e) { diff --git a/apps/webapp/app/services/endpointApi.server.ts b/apps/webapp/app/services/endpointApi.server.ts index 708a62ee7..af2c04d02 100644 --- a/apps/webapp/app/services/endpointApi.server.ts +++ b/apps/webapp/app/services/endpointApi.server.ts @@ -97,6 +97,7 @@ export class EndpointApi { return { ...pongResponse.data, triggerVersion: headers.data["trigger-version"], + triggerSdkVersion: headers.data["trigger-sdk-version"], }; } @@ -308,6 +309,27 @@ export class EndpointApi { return validateResponse.data; } + + async probe(timeout: number) { + const startTimeInMs = performance.now(); + + const response = await safeFetch(this.url, { + method: "POST", + headers: { + "content-type": "application/json", + "x-trigger-api-key": this.apiKey, + "x-trigger-action": "PROBE_EXECUTION_TIMEOUT", + }, + body: JSON.stringify({ + timeout, + }), + }); + + return { + response, + durationInMs: Math.floor(performance.now() - startTimeInMs), + }; + } } async function safeFetch(url: string, options: RequestInit) { diff --git a/apps/webapp/app/services/endpoints/performEndpointIndexService.ts b/apps/webapp/app/services/endpoints/performEndpointIndexService.ts index ca1c0bcd1..3457fa466 100644 --- a/apps/webapp/app/services/endpoints/performEndpointIndexService.ts +++ b/apps/webapp/app/services/endpoints/performEndpointIndexService.ts @@ -127,16 +127,21 @@ export class PerformEndpointIndexService { } const { jobs, sources, dynamicTriggers, dynamicSchedules } = bodyResult.data; - const { "trigger-version": triggerVersion } = headerResult.data; + const { "trigger-version": triggerVersion, "trigger-sdk-version": triggerSdkVersion } = + headerResult.data; const { endpoint } = endpointIndex; - if (triggerVersion && triggerVersion !== endpoint.version) { + if ( + (triggerVersion && triggerVersion !== endpoint.version) || + (triggerSdkVersion && triggerSdkVersion !== endpoint.sdkVersion) + ) { await this.#prismaClient.endpoint.update({ where: { id: endpoint.id, }, data: { version: triggerVersion, + sdkVersion: triggerSdkVersion, }, }); } diff --git a/apps/webapp/app/services/endpoints/probeEndpoint.server.ts b/apps/webapp/app/services/endpoints/probeEndpoint.server.ts new file mode 100644 index 000000000..ad8726d74 --- /dev/null +++ b/apps/webapp/app/services/endpoints/probeEndpoint.server.ts @@ -0,0 +1,64 @@ +import { MAX_RUN_CHUNK_EXECUTION_LIMIT, RESPONSE_TIMEOUT_STATUS_CODES } from "~/consts"; +import { prisma, PrismaClient } from "~/db.server"; +import { EndpointApi } from "../endpointApi.server"; +import { logger } from "../logger.server"; +import { detectResponseIsTimeout } from "~/models/endpoint.server"; + +export class ProbeEndpointService { + #prismaClient: PrismaClient; + + constructor(prismaClient: PrismaClient = prisma) { + this.#prismaClient = prismaClient; + } + + public async call(id: string) { + const endpoint = await this.#prismaClient.endpoint.findUnique({ + where: { + id, + }, + include: { + environment: true, + }, + }); + + if (!endpoint) { + return; + } + + logger.debug(`Probing endpoint`, { + id, + }); + + const client = new EndpointApi(endpoint.environment.apiKey, endpoint.url); + + const { response, durationInMs } = await client.probe(MAX_RUN_CHUNK_EXECUTION_LIMIT); + + if (!response) { + return; + } + + logger.debug(`Probing endpoint complete`, { + id, + durationInMs, + response: { + status: response.status, + headers: Object.fromEntries(response.headers.entries()), + }, + }); + + // If the response is a 200, or it was a timeout, we can assume the endpoint is up and update the runChunkExecutionLimit + if (response.status === 200 || detectResponseIsTimeout(response)) { + await this.#prismaClient.endpoint.update({ + where: { + id, + }, + data: { + runChunkExecutionLimit: Math.min( + Math.max(durationInMs, 10000), + MAX_RUN_CHUNK_EXECUTION_LIMIT + ), + }, + }); + } + } +} diff --git a/apps/webapp/app/services/runs/forceYieldCoordinator.server.ts b/apps/webapp/app/services/runs/forceYieldCoordinator.server.ts new file mode 100644 index 000000000..c6565424d --- /dev/null +++ b/apps/webapp/app/services/runs/forceYieldCoordinator.server.ts @@ -0,0 +1,47 @@ +import { PrismaClient } from "@trigger.dev/database"; +import { prisma } from "~/db.server"; +import { logger } from "../logger.server"; + +class ForceYieldCoordinator { + private inFlightRuns: Set = new Set(); + private prismaClient: PrismaClient; + + constructor(prismaClient: PrismaClient) { + this.prismaClient = prismaClient; + + process.on("SIGTERM", this.handleForceYield); + } + + // Add a run to the in-flight set + public registerRun(runId: string): void { + this.inFlightRuns.add(runId); + } + + // Remove a run from the in-flight set + public deregisterRun(runId: string): void { + this.inFlightRuns.delete(runId); + } + + // Handle forced yield on SIGTERM + private handleForceYield = async (): Promise => { + const runIds = Array.from(this.inFlightRuns); + + const results = await this.prismaClient.jobRun.updateMany({ + where: { + id: { + in: runIds, + }, + forceYieldImmediately: false, + }, + data: { + forceYieldImmediately: true, + }, + }); + + logger.debug( + `ForceYieldCoordinator: ${results.count}/${runIds.length} runs set to immediately force yield` + ); + }; +} + +export const forceYieldCoordinator = new ForceYieldCoordinator(prisma); diff --git a/apps/webapp/app/services/runs/performRunExecutionV1.server.ts b/apps/webapp/app/services/runs/performRunExecutionV1.server.ts deleted file mode 100644 index c67a9dd18..000000000 --- a/apps/webapp/app/services/runs/performRunExecutionV1.server.ts +++ /dev/null @@ -1,771 +0,0 @@ -import { - CachedTaskSchema, - RunJobError, - RunJobInvalidPayloadError, - RunJobResumeWithTask, - RunJobRetryWithTask, - RunJobSuccess, - RunJobUnresolvedAuthError, - RunSourceContextSchema, -} from "@trigger.dev/core"; -import type { Task } from "@trigger.dev/database"; -import { generateErrorMessage } from "zod-error"; -import { eventRecordToApiJson } from "~/api.server"; -import { EXECUTE_JOB_RETRY_LIMIT } from "~/consts"; -import { $transaction, PrismaClient, PrismaClientOrTransaction, prisma } from "~/db.server"; -import { enqueueRunExecutionV1 } from "~/models/jobRunExecution.server"; -import { resolveRunConnections } from "~/models/runConnection.server"; -import { formatError } from "~/utils/formatErrors.server"; -import { safeJsonZodParse } from "~/utils/json"; -import { EndpointApi } from "../endpointApi.server"; -import { logger } from "../logger.server"; - -type FoundRunExecution = NonNullable>>; - -export class PerformRunExecutionV1Service { - #prismaClient: PrismaClient; - - constructor(prismaClient: PrismaClient = prisma) { - this.#prismaClient = prismaClient; - } - - public async call(id: string) { - const runExecution = await findRunExecution(this.#prismaClient, id); - - if (!runExecution) { - return; - } - - switch (runExecution.reason) { - case "PREPROCESS": { - await this.#executePreprocessing(runExecution); - break; - } - case "EXECUTE_JOB": { - await this.#executeJob(runExecution); - break; - } - } - } - - // Execute the preprocessing step of a run, which will send the payload to the endpoint and give the job - // an opportunity to generate run properties based on the payload. - // If the endpoint is not available, or the response is not ok, - // the run execution will be marked as failed and the run will start - async #executePreprocessing(execution: FoundRunExecution) { - const { run } = execution; - - const client = new EndpointApi(run.environment.apiKey, run.endpoint.url); - const event = eventRecordToApiJson(run.event); - const startedAt = new Date(); - - await this.#prismaClient.jobRunExecution.update({ - where: { - id: execution.id, - }, - data: { - status: "STARTED", - startedAt, - }, - }); - - const { response, parser } = await client.preprocessRunRequest({ - event, - job: { - id: run.version.job.slug, - version: run.version.version, - }, - run: { - id: run.id, - isTest: run.isTest, - }, - environment: { - id: run.environment.id, - slug: run.environment.slug, - type: run.environment.type, - }, - organization: { - id: run.organization.id, - slug: run.organization.slug, - title: run.organization.title, - }, - account: run.externalAccount - ? { - id: run.externalAccount.identifier, - metadata: run.externalAccount.metadata, - } - : undefined, - }); - - if (!response) { - return await this.#failRunExecutionWithRetry(execution, { - message: "Could not connect to the endpoint", - }); - } - - if (!response.ok) { - return await this.#failRunExecutionWithRetry(execution, { - message: `Endpoint responded with ${response.status} status code`, - }); - } - - const rawBody = await response.text(); - const safeBody = safeJsonZodParse(parser, rawBody); - - if (!safeBody) { - return await this.#failRunExecution(this.#prismaClient, execution, { - message: "Endpoint responded with invalid JSON", - }); - } - - if (!safeBody.success) { - return await this.#failRunExecution(this.#prismaClient, execution, { - message: generateErrorMessage(safeBody.error.issues), - }); - } - - if (safeBody.data.abort) { - return this.#failRunExecution( - this.#prismaClient, - execution, - { message: "Endpoint aborted the run" }, - "ABORTED" - ); - } else { - await $transaction(this.#prismaClient, async (tx) => { - await tx.jobRun.update({ - where: { - id: run.id, - }, - data: { - status: "STARTED", - startedAt: new Date(), - properties: safeBody.data.properties, - }, - }); - - await tx.jobRunExecution.update({ - where: { - id: execution.id, - }, - data: { - status: "SUCCESS", - completedAt: new Date(), - }, - }); - - const runExecution = await tx.jobRunExecution.create({ - data: { - runId: run.id, - reason: "EXECUTE_JOB", - status: "PENDING", - retryLimit: EXECUTE_JOB_RETRY_LIMIT, - }, - }); - - await enqueueRunExecutionV1(runExecution, run.queue.id, run.queue.maxJobs, tx); - }); - } - } - async #executeJob(execution: FoundRunExecution) { - const { run, isRetry } = execution; - - if (run.status === "CANCELED") { - await this.#cancelExecution(execution); - return; - } - - const client = new EndpointApi(run.environment.apiKey, run.endpoint.url); - const event = eventRecordToApiJson(run.event); - - const startedAt = new Date(); - - await this.#prismaClient.jobRunExecution.update({ - where: { - id: execution.id, - }, - data: { - status: "STARTED", - startedAt, - run: { - update: { - status: run.status === "QUEUED" ? "STARTED" : run.status, - startedAt: run.startedAt ?? new Date(), - }, - }, - }, - }); - - const connections = await resolveRunConnections(run.runConnections); - - if (!connections.success) { - return this.#failRunExecutionWithRetry(execution, { - message: `Could not resolve all connections for run ${run.id}, attempting to retry`, - }); - } - - let resumedTask: Task | undefined; - - if (execution.resumeTaskId) { - resumedTask = - (await this.#prismaClient.task.findUnique({ - where: { - id: execution.resumeTaskId, - }, - })) ?? undefined; - - if (resumedTask) { - resumedTask = await this.#prismaClient.task.update({ - where: { - id: execution.resumeTaskId, - }, - data: { - status: resumedTask.noop ? "COMPLETED" : "RUNNING", - completedAt: resumedTask.noop ? new Date() : undefined, - }, - }); - } - } - - const sourceContext = RunSourceContextSchema.safeParse(run.event.sourceContext); - - const { response, parser, errorParser } = await client.executeJobRequest({ - event, - job: { - id: run.version.job.slug, - version: run.version.version, - }, - run: { - id: run.id, - isTest: run.isTest, - startedAt, - isRetry, - }, - environment: { - id: run.environment.id, - slug: run.environment.slug, - type: run.environment.type, - }, - organization: { - id: run.organization.id, - slug: run.organization.slug, - title: run.organization.title, - }, - account: run.externalAccount - ? { - id: run.externalAccount.identifier, - metadata: run.externalAccount.metadata, - } - : undefined, - connections: connections.auth, - source: sourceContext.success ? sourceContext.data : undefined, - tasks: [run.tasks, resumedTask] - .flat() - .filter(Boolean) - .map((t) => CachedTaskSchema.parse(t)), - yieldedExecutions: run.yieldedExecutions, - }); - - if (!response) { - return await this.#failRunExecutionWithRetry(execution, { - message: `Connection could not be established to the endpoint (${run.endpoint.url})`, - }); - } - - const rawBody = await response.text(); - - if (!response.ok) { - logger.debug("Endpoint responded with non-200 status code", { - status: response.status, - runId: run.id, - endpoint: run.endpoint.url, - }); - - const errorBody = safeJsonZodParse(errorParser, rawBody); - - if (errorBody && errorBody.success) { - // Only retry if the error isn't a 4xx - if (response.status >= 400 && response.status <= 499) { - return await this.#failRunExecution(this.#prismaClient, execution, errorBody.data); - } else { - return await this.#failRunExecutionWithRetry(execution, errorBody.data); - } - } - - // Only retry if the error isn't a 4xx - if (response.status >= 400 && response.status <= 499) { - return await this.#failRunExecution(this.#prismaClient, execution, { - message: `Endpoint responded with ${response.status} status code`, - }); - } else { - return await this.#failRunExecutionWithRetry(execution, { - message: `Endpoint responded with ${response.status} status code`, - }); - } - } - - const safeBody = safeJsonZodParse(parser, rawBody); - - if (!safeBody) { - return await this.#failRunExecution(this.#prismaClient, execution, { - message: "Endpoint responded with invalid JSON", - }); - } - - if (!safeBody.success) { - return await this.#failRunExecution(this.#prismaClient, execution, { - message: generateErrorMessage(safeBody.error.issues), - }); - } - - const status = safeBody.data.status; - - switch (status) { - case "SUCCESS": { - await this.#completeRunWithSuccess(execution, safeBody.data); - - break; - } - case "RESUME_WITH_TASK": { - await this.#resumeRunWithTask(execution, safeBody.data); - - break; - } - case "ERROR": { - await this.#failRunWithError(execution, safeBody.data); - - break; - } - case "RETRY_WITH_TASK": { - await this.#retryRunWithTask(execution, safeBody.data); - - break; - } - case "CANCELED": { - await this.#cancelExecution(execution); - break; - } - case "UNRESOLVED_AUTH_ERROR": { - await this.#failRunWithUnresolvedAuthError(execution, safeBody.data); - - break; - } - case "INVALID_PAYLOAD": { - await this.#failRunWithInvalidPayloadError(execution, safeBody.data); - - break; - } - case "YIELD_EXECUTION": { - await this.#resumeYieldedExecution(execution, safeBody.data.key); - - break; - } - default: { - const _exhaustiveCheck: never = status; - throw new Error(`Non-exhaustive match for value: ${status}`); - } - } - } - - async #completeRunWithSuccess(execution: FoundRunExecution, data: RunJobSuccess) { - const { run } = execution; - - return await $transaction(this.#prismaClient, async (tx) => { - await tx.jobRun.update({ - where: { id: run.id }, - data: { - completedAt: new Date(), - status: "SUCCESS", - output: data.output ?? undefined, - queue: { - update: { - jobCount: { - decrement: 1, - }, - }, - }, - }, - }); - - await tx.jobRunExecution.update({ - where: { - id: execution.id, - }, - data: { - status: "SUCCESS", - completedAt: new Date(), - }, - }); - }); - } - - async #resumeYieldedExecution(execution: FoundRunExecution, key: string) { - const { run } = execution; - - return await $transaction(this.#prismaClient, async (tx) => { - await tx.jobRunExecution.update({ - where: { - id: execution.id, - }, - data: { - status: "SUCCESS", - completedAt: new Date(), - run: { - update: { - yieldedExecutions: { - push: key, - }, - }, - }, - }, - }); - - const newJobExecution = await tx.jobRunExecution.create({ - data: { - runId: run.id, - reason: "EXECUTE_JOB", - status: "PENDING", - retryLimit: EXECUTE_JOB_RETRY_LIMIT, - }, - }); - - await enqueueRunExecutionV1(newJobExecution, run.queue.id, run.queue.maxJobs, tx); - }); - } - - async #resumeRunWithTask(execution: FoundRunExecution, data: RunJobResumeWithTask) { - const { run } = execution; - - return await $transaction(this.#prismaClient, async (tx) => { - await tx.jobRunExecution.update({ - where: { - id: execution.id, - }, - data: { - status: "SUCCESS", - completedAt: new Date(), - }, - }); - - // If the task has an operation, then the next performRunExecution will occur - // when that operation has finished - // Tasks with callbacks enabled will also get processed separately, i.e. when - // they time out, or on valid requests to their callbackUrl - if (!data.task.operation && !data.task.callbackUrl) { - const newJobExecution = await tx.jobRunExecution.create({ - data: { - runId: run.id, - reason: "EXECUTE_JOB", - status: "PENDING", - retryLimit: EXECUTE_JOB_RETRY_LIMIT, - resumeTaskId: data.task.id, - }, - }); - - await enqueueRunExecutionV1( - newJobExecution, - run.queue.id, - run.queue.maxJobs, - tx, - data.task.delayUntil ?? undefined - ); - } - }); - } - - async #failRunWithError(execution: FoundRunExecution, data: RunJobError) { - return await $transaction(this.#prismaClient, async (tx) => { - if (data.task) { - await tx.task.update({ - where: { - id: data.task.id, - }, - data: { - status: "ERRORED", - completedAt: new Date(), - output: data.error ?? undefined, - }, - }); - } - - await this.#failRunExecution(tx, execution, data.error ?? undefined); - }); - } - - async #failRunWithUnresolvedAuthError( - execution: FoundRunExecution, - data: RunJobUnresolvedAuthError - ) { - return await $transaction(this.#prismaClient, async (tx) => { - await this.#failRunExecution(tx, execution, data.issues, "UNRESOLVED_AUTH"); - }); - } - - async #failRunWithInvalidPayloadError( - execution: FoundRunExecution, - data: RunJobInvalidPayloadError - ) { - return await $transaction(this.#prismaClient, async (tx) => { - await this.#failRunExecution(tx, execution, data.errors, "INVALID_PAYLOAD"); - }); - } - - async #retryRunWithTask(execution: FoundRunExecution, data: RunJobRetryWithTask) { - const { run } = execution; - - return await $transaction(this.#prismaClient, async (tx) => { - // We need to check for an existing task attempt - const existingAttempt = await tx.taskAttempt.findFirst({ - where: { - taskId: data.task.id, - status: "PENDING", - }, - orderBy: { - number: "desc", - }, - }); - - if (existingAttempt) { - await tx.taskAttempt.update({ - where: { - id: existingAttempt.id, - }, - data: { - status: "ERRORED", - error: formatError(data.error), - }, - }); - } - - // We need to create a new task attempt - await tx.taskAttempt.create({ - data: { - taskId: data.task.id, - number: existingAttempt ? existingAttempt.number + 1 : 1, - status: "PENDING", - runAt: data.retryAt, - }, - }); - - await tx.task.update({ - where: { - id: data.task.id, - }, - data: { - status: "WAITING", - }, - }); - - // Now we need to create a new job execution - const newJobExecution = await tx.jobRunExecution.create({ - data: { - runId: run.id, - reason: "EXECUTE_JOB", - status: "PENDING", - retryLimit: EXECUTE_JOB_RETRY_LIMIT, - resumeTaskId: data.task.id, - }, - }); - - await enqueueRunExecutionV1( - newJobExecution, - run.queue.id, - run.queue.maxJobs, - tx, - data.retryAt - ); - }); - } - - async #failRunExecutionWithRetry( - execution: FoundRunExecution, - output: Record - ): Promise { - await $transaction(this.#prismaClient, async (tx) => { - if (execution.retryCount + 1 > execution.retryLimit) { - // We've reached the retry limit, so we need to fail the execution and stop retrying - return await this.#failRunExecution(tx, execution, output); - } - - // We need to retry execution - const retryCount = execution.retryCount + 1; - // Use an exponential backoff strategy with the exponent being 1.5 - // So when retryCount is 1, retryDelayInMs is 500ms - // When retryCount is 2, retryDelayInMs is 750ms - // When retryCount is 3, retryDelayInMs is 1125ms - // When retryCount is 4, retryDelayInMs is 1687ms - // When retryCount is 5, retryDelayInMs is 2531ms - // When retryCount is 6, retryDelayInMs is 3796ms - // When retryCount is 7, retryDelayInMs is 5694ms - // When retryCount is 8, retryDelayInMs is 8541ms - // When retryCount is 9, retryDelayInMs is 12812ms - // When retryCount is 10, retryDelayInMs is 19218ms - const retryDelayInMs = Math.round(500 * Math.pow(1.5, retryCount - 1)); - - await tx.jobRunExecution.update({ - where: { - id: execution.id, - }, - data: { - retryCount, - retryDelayInMs, - error: JSON.stringify(output), - }, - }); - - const runAt = new Date(Date.now() + retryDelayInMs); - - await enqueueRunExecutionV1( - execution, - execution.run.queue.id, - execution.run.queue.maxJobs, - tx, - runAt - ); - }); - } - - async #failRunExecution( - prisma: PrismaClientOrTransaction, - execution: FoundRunExecution, - output: Record, - status: "FAILURE" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" = "FAILURE" - ): Promise { - const { run } = execution; - - await $transaction(prisma, async (tx) => { - switch (execution.reason) { - case "EXECUTE_JOB": { - // If the execution is an EXECUTE_JOB reason, we need to fail the run - await tx.jobRun.update({ - where: { id: run.id }, - data: { - completedAt: new Date(), - status, - output, - queue: { - update: { - jobCount: { - decrement: 1, - }, - }, - }, - }, - }); - - break; - } - case "PREPROCESS": { - // If the status is ABORTED, we need to fail the run - if (status === "ABORTED") { - await tx.jobRun.update({ - where: { id: run.id }, - data: { - completedAt: new Date(), - status, - output, - queue: { - update: { - jobCount: { - decrement: 1, - }, - }, - }, - }, - }); - - break; - } - - await tx.jobRun.update({ - where: { - id: run.id, - }, - data: { - status: "STARTED", - startedAt: new Date(), - }, - }); - - const runExecution = await tx.jobRunExecution.create({ - data: { - runId: run.id, - reason: "EXECUTE_JOB", - status: "PENDING", - retryLimit: EXECUTE_JOB_RETRY_LIMIT, - }, - }); - - await enqueueRunExecutionV1(runExecution, run.queue.id, run.queue.maxJobs, tx); - - break; - } - } - - await tx.jobRunExecution.update({ - where: { - id: execution.id, - }, - data: { - status: "FAILURE", - completedAt: new Date(), - error: JSON.stringify(output), - }, - }); - }); - } - - async #cancelExecution(execution: FoundRunExecution) { - await this.#prismaClient.jobRunExecution.update({ - where: { - id: execution.id, - }, - data: { - status: "FAILURE", - completedAt: new Date(), - error: "This never ran because it was canceled by the user.", - }, - }); - } -} - -async function findRunExecution(prisma: PrismaClientOrTransaction, id: string) { - return await prisma.jobRunExecution.findUnique({ - where: { id }, - include: { - run: { - include: { - environment: true, - endpoint: true, - organization: true, - externalAccount: true, - queue: true, - runConnections: { - include: { - integration: true, - connection: { - include: { - dataReference: true, - }, - }, - }, - }, - tasks: { - where: { - status: { - in: ["COMPLETED"], - }, - }, - }, - event: true, - version: { - include: { - job: true, - organization: true, - }, - }, - }, - }, - }, - }); -} diff --git a/apps/webapp/app/services/runs/performRunExecutionV2.server.ts b/apps/webapp/app/services/runs/performRunExecutionV2.server.ts index f22d13edb..ec9318181 100644 --- a/apps/webapp/app/services/runs/performRunExecutionV2.server.ts +++ b/apps/webapp/app/services/runs/performRunExecutionV2.server.ts @@ -3,6 +3,7 @@ import { BloomFilter, ConnectionAuth, EndpointHeadersSchema, + RunJobAutoYieldWithCompletedTaskExecutionError, RunJobError, RunJobInvalidPayloadError, RunJobResumeWithTask, @@ -24,9 +25,17 @@ import { safeJsonZodParse } from "~/utils/json"; import { EndpointApi } from "../endpointApi.server"; import { logger } from "../logger.server"; import { prepareTasksForCaching, prepareTasksForCachingLegacy } from "~/models/task.server"; -import { MAX_RUN_YIELDED_EXECUTIONS } from "~/consts"; +import { + MAX_RUN_CHUNK_EXECUTION_LIMIT, + MAX_RUN_YIELDED_EXECUTIONS, + RESPONSE_TIMEOUT_STATUS_CODES, + RUN_CHUNK_EXECUTION_BUFFER, +} from "~/consts"; import { ApiEventLog } from "@trigger.dev/core"; import { RunJobBody } from "@trigger.dev/core"; +import { CompleteRunTaskService } from "~/routes/api.v1.runs.$runId.tasks.$id.complete"; +import { detectResponseIsTimeout } from "~/models/endpoint.server"; +import { forceYieldCoordinator } from "./forceYieldCoordinator.server"; type FoundRun = NonNullable>>; type FoundTask = FoundRun["tasks"][number]; @@ -148,6 +157,7 @@ export class PerformRunExecutionV2Service { status: "STARTED", startedAt: new Date(), properties: safeBody.data.properties, + forceYieldImmediately: false, }, }); @@ -158,257 +168,291 @@ export class PerformRunExecutionV2Service { } } async #executeJob(run: FoundRun, input: PerformRunExecutionV2Input) { - const { isRetry, resumeTaskId } = input; - - if (run.status === "CANCELED") { - await this.#cancelExecution(run); - return; - } - try { - if ( - typeof process.env.BLOCKED_ORGS === "string" && - process.env.BLOCKED_ORGS.includes(run.organizationId) - ) { - logger.debug("Skipping execution for blocked org", { - orgId: run.organizationId, - }); - - await this.#prismaClient.jobRun.update({ - where: { - id: run.id, - }, - data: { - status: "CANCELED", - completedAt: new Date(), - }, - }); + const { isRetry, resumeTaskId } = input; + if (run.status === "CANCELED") { + await this.#cancelExecution(run); return; } - } catch (e) {} - const client = new EndpointApi(run.environment.apiKey, run.endpoint.url); - const event = eventRecordToApiJson(run.event); + try { + if ( + typeof process.env.BLOCKED_ORGS === "string" && + process.env.BLOCKED_ORGS.includes(run.organizationId) + ) { + logger.debug("Skipping execution for blocked org", { + orgId: run.organizationId, + }); - const startedAt = new Date(); + await this.#prismaClient.jobRun.update({ + where: { + id: run.id, + }, + data: { + status: "CANCELED", + completedAt: new Date(), + }, + }); - const { executionCount } = await this.#prismaClient.jobRun.update({ - where: { - id: run.id, - }, - data: { - status: run.status === "QUEUED" ? "STARTED" : run.status, - startedAt: run.startedAt ?? new Date(), - executionCount: { - increment: 1, + return; + } + } catch (e) {} + + const client = new EndpointApi(run.environment.apiKey, run.endpoint.url); + const event = eventRecordToApiJson(run.event); + + const startedAt = new Date(); + + const { executionCount } = await this.#prismaClient.jobRun.update({ + where: { + id: run.id, }, - }, - select: { - executionCount: true, - }, - }); - - const connections = await resolveRunConnections(run.runConnections); - - if (!connections.success) { - return this.#failRunExecution(this.#prismaClient, "EXECUTE_JOB", run, { - message: `Could not resolve all connections for run ${run.id}. This should not happen`, - }); - } - - let resumedTask: Task | undefined; - - if (resumeTaskId) { - resumedTask = - (await this.#prismaClient.task.findUnique({ - where: { - id: resumeTaskId, + data: { + status: run.status === "QUEUED" ? "STARTED" : run.status, + startedAt: run.startedAt ?? new Date(), + executionCount: { + increment: 1, }, - })) ?? undefined; + }, + select: { + executionCount: true, + }, + }); - if (resumedTask) { - resumedTask = await this.#prismaClient.task.update({ + const connections = await resolveRunConnections(run.runConnections); + + if (!connections.success) { + return this.#failRunExecution(this.#prismaClient, "EXECUTE_JOB", run, { + message: `Could not resolve all connections for run ${run.id}. This should not happen`, + }); + } + + let resumedTask: Task | undefined; + + if (resumeTaskId) { + resumedTask = + (await this.#prismaClient.task.findUnique({ + where: { + id: resumeTaskId, + }, + })) ?? undefined; + + if (resumedTask) { + resumedTask = await this.#prismaClient.task.update({ + where: { + id: resumeTaskId, + }, + data: { + status: resumedTask.noop ? "COMPLETED" : "RUNNING", + completedAt: resumedTask.noop ? new Date() : undefined, + }, + }); + } + } + + const sourceContext = RunSourceContextSchema.safeParse(run.event.sourceContext); + + const executionBody = await this.#createExecutionBody( + run, + [run.tasks, resumedTask].flat().filter(Boolean), + startedAt, + isRetry, + connections.auth, + event, + sourceContext.success ? sourceContext.data : undefined + ); + + forceYieldCoordinator.registerRun(run.id); + + const { response, parser, errorParser, durationInMs } = await client.executeJobRequest( + executionBody + ); + + forceYieldCoordinator.deregisterRun(run.id); + + if (!response) { + return await this.#failRunExecutionWithRetry({ + message: `Connection could not be established to the endpoint (${run.endpoint.url})`, + }); + } + + // Update the endpoint version if it has changed + const rawHeaders = Object.fromEntries(response.headers.entries()); + const headers = EndpointHeadersSchema.safeParse(rawHeaders); + + if ( + headers.success && + headers.data["trigger-version"] && + headers.data["trigger-version"] !== run.endpoint.version + ) { + await this.#prismaClient.endpoint.update({ where: { - id: resumeTaskId, + id: run.endpoint.id, }, data: { - status: resumedTask.noop ? "COMPLETED" : "RUNNING", - completedAt: resumedTask.noop ? new Date() : undefined, + version: headers.data["trigger-version"], }, }); } - } - const sourceContext = RunSourceContextSchema.safeParse(run.event.sourceContext); + const rawBody = await response.text(); - const executionBody = await this.#createExecutionBody( - run, - [run.tasks, resumedTask].flat().filter(Boolean), - startedAt, - isRetry, - connections.auth, - event, - sourceContext.success ? sourceContext.data : undefined - ); + if (!response.ok) { + logger.debug("Endpoint responded with non-200 status code", { + status: response.status, + runId: run.id, + endpoint: run.endpoint.url, + }); - const { response, parser, errorParser, durationInMs } = await client.executeJobRequest( - executionBody - ); + const errorBody = safeJsonZodParse(errorParser, rawBody); - if (!response) { - return await this.#failRunExecutionWithRetry({ - message: `Connection could not be established to the endpoint (${run.endpoint.url})`, - }); - } + if (errorBody && errorBody.success) { + // Only retry if the error isn't a 4xx + if (response.status >= 400 && response.status <= 499) { + return await this.#failRunExecution( + this.#prismaClient, + "EXECUTE_JOB", + run, + errorBody.data + ); + } else { + return await this.#failRunExecutionWithRetry(errorBody.data); + } + } - // Update the endpoint version if it has changed - const rawHeaders = Object.fromEntries(response.headers.entries()); - const headers = EndpointHeadersSchema.safeParse(rawHeaders); - - if ( - headers.success && - headers.data["trigger-version"] && - headers.data["trigger-version"] !== run.endpoint.version - ) { - await this.#prismaClient.endpoint.update({ - where: { - id: run.endpoint.id, - }, - data: { - version: headers.data["trigger-version"], - }, - }); - } - - const rawBody = await response.text(); - - if (!response.ok) { - logger.debug("Endpoint responded with non-200 status code", { - status: response.status, - runId: run.id, - endpoint: run.endpoint.url, - }); - - const errorBody = safeJsonZodParse(errorParser, rawBody); - - if (errorBody && errorBody.success) { // Only retry if the error isn't a 4xx - if (response.status >= 400 && response.status <= 499) { + if (response.status >= 400 && response.status <= 499 && response.status !== 408) { return await this.#failRunExecution( this.#prismaClient, "EXECUTE_JOB", run, - errorBody.data + { + message: `Endpoint responded with ${response.status} status code`, + }, + "FAILURE", + durationInMs ); } else { - return await this.#failRunExecutionWithRetry(errorBody.data); + // If the error is a timeout, we should mark this execution as succeeded (by not throwing an error) and enqueue a new execution + if (detectResponseIsTimeout(response)) { + return await this.#resumeRunExecutionAfterTimeout( + this.#prismaClient, + run, + input, + durationInMs, + executionCount + ); + } else { + return await this.#failRunExecutionWithRetry({ + message: `Endpoint responded with ${response.status} status code`, + }); + } } } - // Only retry if the error isn't a 4xx - if (response.status >= 400 && response.status <= 499 && response.status !== 408) { + const safeBody = safeJsonZodParse(parser, rawBody); + + if (!safeBody) { return await this.#failRunExecution( this.#prismaClient, "EXECUTE_JOB", run, { - message: `Endpoint responded with ${response.status} status code`, + message: "Endpoint responded with invalid JSON", }, "FAILURE", durationInMs ); - } else { - // If the error is a 504 timeout, we should mark this execution as succeeded (by not throwing an error) and enqueue a new execution - if (response.status === 504) { - return await this.#resumeRunExecutionAfterTimeout( - this.#prismaClient, + } + + if (!safeBody.success) { + return await this.#failRunExecution( + this.#prismaClient, + "EXECUTE_JOB", + run, + { + message: generateErrorMessage(safeBody.error.issues), + }, + "FAILURE", + durationInMs + ); + } + + const status = safeBody.data.status; + + switch (status) { + case "SUCCESS": { + await this.#completeRunWithSuccess(run, safeBody.data, durationInMs); + + break; + } + case "RESUME_WITH_TASK": { + await this.#resumeRunWithTask(run, safeBody.data, isRetry, durationInMs, executionCount); + + break; + } + case "ERROR": { + await this.#failRunWithError(run, safeBody.data, durationInMs); + + break; + } + case "RETRY_WITH_TASK": { + await this.#retryRunWithTask(run, safeBody.data, isRetry, durationInMs, executionCount); + + break; + } + case "CANCELED": { + await this.#cancelExecution(run); + break; + } + case "UNRESOLVED_AUTH_ERROR": { + await this.#failRunWithUnresolvedAuthError(run, safeBody.data, durationInMs); + + break; + } + case "INVALID_PAYLOAD": { + await this.#failRunWithInvalidPayloadError(run, safeBody.data, durationInMs); + + break; + } + case "YIELD_EXECUTION": { + await this.#resumeYieldedRun( run, - input, + safeBody.data.key, + isRetry, durationInMs, executionCount ); - } else { - return await this.#failRunExecutionWithRetry({ - message: `Endpoint responded with ${response.status} status code`, - }); + break; + } + case "AUTO_YIELD_EXECUTION": { + await this.#resumeAutoYieldedRun( + run, + safeBody.data, + isRetry, + durationInMs, + executionCount + ); + break; + } + case "AUTO_YIELD_EXECUTION_WITH_COMPLETED_TASK": { + await this.#resumeAutoYieldedRunWithCompletedTask( + run, + safeBody.data, + isRetry, + durationInMs, + executionCount + ); + break; + } + default: { + const _exhaustiveCheck: never = status; + throw new Error(`Non-exhaustive match for value: ${status}`); } } - } - - const safeBody = safeJsonZodParse(parser, rawBody); - - if (!safeBody) { - return await this.#failRunExecution( - this.#prismaClient, - "EXECUTE_JOB", - run, - { - message: "Endpoint responded with invalid JSON", - }, - "FAILURE", - durationInMs - ); - } - - if (!safeBody.success) { - return await this.#failRunExecution( - this.#prismaClient, - "EXECUTE_JOB", - run, - { - message: generateErrorMessage(safeBody.error.issues), - }, - "FAILURE", - durationInMs - ); - } - - const status = safeBody.data.status; - - switch (status) { - case "SUCCESS": { - await this.#completeRunWithSuccess(run, safeBody.data, durationInMs); - - break; - } - case "RESUME_WITH_TASK": { - await this.#resumeRunWithTask(run, safeBody.data, isRetry, durationInMs, executionCount); - - break; - } - case "ERROR": { - await this.#failRunWithError(run, safeBody.data, durationInMs); - - break; - } - case "RETRY_WITH_TASK": { - await this.#retryRunWithTask(run, safeBody.data, isRetry, durationInMs, executionCount); - - break; - } - case "CANCELED": { - await this.#cancelExecution(run); - break; - } - case "UNRESOLVED_AUTH_ERROR": { - await this.#failRunWithUnresolvedAuthError(run, safeBody.data, durationInMs); - - break; - } - case "INVALID_PAYLOAD": { - await this.#failRunWithInvalidPayloadError(run, safeBody.data, durationInMs); - - break; - } - case "YIELD_EXECUTION": { - await this.#resumeYieldedRun(run, safeBody.data.key, isRetry, durationInMs, executionCount); - break; - } - default: { - const _exhaustiveCheck: never = status; - throw new Error(`Non-exhaustive match for value: ${status}`); - } + } finally { + forceYieldCoordinator.deregisterRun(run.id); } } @@ -458,6 +502,13 @@ export class PerformRunExecutionV2Service { cachedTaskCursor: preparedTasks.cursor, noopTasksSet: prepareNoOpTasksBloomFilter(tasks), yieldedExecutions: run.yieldedExecutions, + runChunkExecutionLimit: run.endpoint.runChunkExecutionLimit - RUN_CHUNK_EXECUTION_BUFFER, + autoYieldConfig: { + startTaskThreshold: run.endpoint.startTaskThreshold, + beforeExecuteTaskThreshold: run.endpoint.beforeExecuteTaskThreshold, + beforeCompleteTaskThreshold: run.endpoint.beforeCompleteTaskThreshold, + afterCompleteTaskThreshold: run.endpoint.afterCompleteTaskThreshold, + }, }; } @@ -639,6 +690,7 @@ export class PerformRunExecutionV2Service { yieldedExecutions: { push: key, }, + forceYieldImmediately: false, }, select: { yieldedExecutions: true, @@ -654,6 +706,101 @@ export class PerformRunExecutionV2Service { }); } + async #resumeAutoYieldedRun( + run: FoundRun, + data: { location: string; timeRemaining: number; timeElapsed: number; limit?: number }, + isRetry: boolean, + durationInMs: number, + executionCount: number + ) { + await $transaction(this.#prismaClient, async (tx) => { + await tx.jobRun.update({ + where: { + id: run.id, + }, + data: { + executionDuration: { + increment: durationInMs, + }, + executionCount: { + increment: 1, + }, + autoYieldExecution: { + create: [ + { + location: data.location, + timeRemaining: data.timeRemaining, + timeElapsed: data.timeElapsed, + limit: data.limit ?? 0, + }, + ], + }, + forceYieldImmediately: false, + }, + select: { + executionCount: true, + }, + }); + + await enqueueRunExecutionV2(run, tx, { + isRetry, + skipRetrying: run.environment.type === RuntimeEnvironmentType.DEVELOPMENT, + executionCount, + }); + }); + } + + async #resumeAutoYieldedRunWithCompletedTask( + run: FoundRun, + data: RunJobAutoYieldWithCompletedTaskExecutionError, + isRetry: boolean, + durationInMs: number, + executionCount: number + ) { + await $transaction(this.#prismaClient, async (tx) => { + await tx.jobRun.update({ + where: { + id: run.id, + }, + data: { + executionDuration: { + increment: durationInMs, + }, + executionCount: { + increment: 1, + }, + autoYieldExecution: { + create: [ + { + location: data.data.location, + timeRemaining: data.data.timeRemaining, + timeElapsed: data.data.timeElapsed, + limit: data.data.limit ?? 0, + }, + ], + }, + forceYieldImmediately: false, + }, + select: { + executionCount: true, + }, + }); + + const service = new CompleteRunTaskService(tx); + + await service.call(run.environment, run.id, data.id, { + properties: data.properties, + output: data.output, + }); + + await enqueueRunExecutionV2(run, tx, { + isRetry, + skipRetrying: run.environment.type === RuntimeEnvironmentType.DEVELOPMENT, + executionCount, + }); + }); + } + async #retryRunWithTask( run: FoundRun, data: RunJobRetryWithTask, @@ -748,6 +895,54 @@ export class PerformRunExecutionV2Service { return; } + const runWithLatestTask = await tx.jobRun.findUniqueOrThrow({ + where: { + id: run.id, + }, + select: { + tasks: { + select: { + id: true, + name: true, + status: true, + displayKey: true, + }, + take: 1, + orderBy: { createdAt: "desc" }, + }, + _count: { + select: { + tasks: true, + }, + }, + }, + }); + + if (runWithLatestTask._count.tasks === run._count.tasks) { + const latestTask = runWithLatestTask.tasks[0]; + + const cause = + latestTask?.status === "RUNNING" + ? `This is likely caused by task "${ + latestTask.displayKey ?? latestTask.name + }" execution exceeding the function timeout` + : "This is likely caused by executing code outside of a task that exceeded the function timeout"; + + await this.#failRunExecution( + tx, + "EXECUTE_JOB", + run, + { + message: `Function timeout detected in ${ + durationInMs / 1000.0 + }s without any task creation. This is unexpected behavior and could lead to an infinite execution error because the run will never finish. ${cause}`, + }, + "TIMED_OUT", + durationInMs + ); + return; + } + await tx.jobRun.update({ where: { id: run.id, @@ -756,6 +951,16 @@ export class PerformRunExecutionV2Service { executionDuration: { increment: durationInMs, }, + endpoint: { + update: { + // Never allow the execution limit to be less than 10 seconds or more than MAX_RUN_CHUNK_EXECUTION_LIMIT + runChunkExecutionLimit: Math.min( + Math.max(durationInMs, 10000), + MAX_RUN_CHUNK_EXECUTION_LIMIT + ), + }, + }, + forceYieldImmediately: false, }, }); @@ -794,6 +999,20 @@ export class PerformRunExecutionV2Service { executionDuration: { increment: durationInMs, }, + tasks: { + updateMany: { + where: { + status: { + in: ["WAITING", "RUNNING", "PENDING"], + }, + }, + data: { + status: status === "TIMED_OUT" ? "CANCELED" : "ERRORED", + completedAt: new Date(), + }, + }, + }, + forceYieldImmediately: false, }, }); @@ -855,7 +1074,12 @@ async function findRun(prisma: PrismaClientOrTransaction, id: string) { return await prisma.jobRun.findUnique({ where: { id }, include: { - environment: true, + environment: { + include: { + project: true, + organization: true, + }, + }, endpoint: true, organization: true, externalAccount: true, @@ -894,6 +1118,11 @@ async function findRun(prisma: PrismaClientOrTransaction, id: string) { organization: true, }, }, + _count: { + select: { + tasks: true, + }, + }, }, }); } diff --git a/apps/webapp/app/services/worker.server.ts b/apps/webapp/app/services/worker.server.ts index cb9b4d6b0..15f2534a2 100644 --- a/apps/webapp/app/services/worker.server.ts +++ b/apps/webapp/app/services/worker.server.ts @@ -13,7 +13,6 @@ import { InvokeDispatcherService } from "./events/invokeDispatcher.server"; import { integrationAuthRepository } from "./externalApis/integrationAuthRepository.server"; import { IntegrationConnectionCreatedService } from "./externalApis/integrationConnectionCreated.server"; import { MissingConnectionCreatedService } from "./runs/missingConnectionCreated.server"; -import { PerformRunExecutionV1Service } from "./runs/performRunExecutionV1.server"; import { PerformRunExecutionV2Service } from "./runs/performRunExecutionV2.server"; import { StartRunService } from "./runs/startRun.server"; import { DeliverScheduledEventService } from "./schedules/deliverScheduledEvent.server"; @@ -21,6 +20,7 @@ import { ActivateSourceService } from "./sources/activateSource.server"; import { DeliverHttpSourceRequestService } from "./sources/deliverHttpSourceRequest.server"; import { PerformTaskOperationService } from "./tasks/performTaskOperation.server"; import { ProcessCallbackTimeoutService } from "./tasks/processCallbackTimeout"; +import { ProbeEndpointService } from "./endpoints/probeEndpoint.server"; const workerCatalog = { indexEndpoint: z.object({ @@ -75,15 +75,15 @@ const workerCatalog = { connectionCreated: z.object({ id: z.string(), }), + probeEndpoint: z.object({ + id: z.string(), + }), simulate: z.object({ seconds: z.number(), }), }; const executionWorkerCatalog = { - performRunExecution: z.object({ - id: z.string(), - }), performRunExecutionV2: z.object({ id: z.string(), reason: z.enum(["EXECUTE_JOB", "PREPROCESS"]), @@ -316,6 +316,15 @@ function getWorkerQueue() { }); }, }, + probeEndpoint: { + priority: 10, + maxAttempts: 1, + handler: async (payload, job) => { + const service = new ProbeEndpointService(); + + await service.call(payload.id); + }, + }, simulate: { maxAttempts: 5, handler: async (payload, job) => { @@ -341,17 +350,6 @@ function getExecutionWorkerQueue() { shutdownTimeoutInMs: env.GRACEFUL_SHUTDOWN_TIMEOUT, schema: executionWorkerCatalog, tasks: { - performRunExecution: { - priority: 0, // smaller number = higher priority - maxAttempts: 1, - handler: async (payload, job) => { - // This is a legacy task that we don't use anymore, but needs to be here for backwards compatibility - // TODO: remove this once all performRunExecution tasks have been processed - const service = new PerformRunExecutionV1Service(); - - await service.call(payload.id); - }, - }, performRunExecutionV2: { priority: 0, // smaller number = higher priority maxAttempts: 12, diff --git a/apps/webapp/package.json b/apps/webapp/package.json index b9fcc6f95..675b49e86 100644 --- a/apps/webapp/package.json +++ b/apps/webapp/package.json @@ -40,7 +40,6 @@ "@codemirror/view": "^6.5.0", "@conform-to/react": "^0.6.1", "@conform-to/zod": "^0.6.1", - "@godaddy/terminus": "^4.12.1", "@headlessui/react": "^1.7.8", "@heroicons/react": "^2.0.12", "@highlight-run/node": "^3.1.0", diff --git a/apps/webapp/server.ts b/apps/webapp/server.ts index e40b0a5bc..ac31b4ee2 100644 --- a/apps/webapp/server.ts +++ b/apps/webapp/server.ts @@ -3,7 +3,6 @@ import express from "express"; import compression from "compression"; import morgan from "morgan"; import { createRequestHandler } from "@remix-run/express"; -import { createTerminus } from "@godaddy/terminus"; const app = express(); @@ -63,23 +62,14 @@ if (process.env.HTTP_SERVER_DISABLED !== "true") { server.keepAliveTimeout = 65 * 1000; - // Handle shutdowns gracefully - createTerminus(server, { - signals: ["SIGINT", "SIGTERM"], - timeout: process.env.GRACEFUL_SHUTDOWN_TIMEOUT - ? Number(process.env.GRACEFUL_SHUTDOWN_TIMEOUT) - : 5000, - onSignal: async () => { - console.log("[terminus] onSignal: starting cleanup"); - }, - onShutdown: async () => { - console.log("[terminus] onShutdown: cleanup finished, server is shutting down"); - }, - onSendFailureDuringShutdown: async () => { - console.log( - "[terminus] onSendFailureDuringShutdown: cleanup finished, server is shutting down" - ); - }, + process.on("SIGTERM", () => { + server.close((err) => { + if (err) { + console.error("Error closing express server:", err); + } else { + console.log("Express server closed gracefully."); + } + }); }); } else { require(BUILD_DIR); diff --git a/docker/Dockerfile b/docker/Dockerfile index cf12ecd6a..ce185f9ea 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18.16.1-bullseye-slim AS pruner +FROM node:18.18.2-bullseye-slim@sha256:a50436b44fe3eb2ff72696fb394ad3cae45f06cb2a7468c5ef3f012d23d9888f AS pruner WORKDIR /triggerdotdev @@ -7,7 +7,7 @@ RUN npx -q turbo@1.10.9 prune --scope=webapp --docker RUN find . -name "node_modules" -type d -prune -exec rm -rf '{}' + # Base strategy to have layer caching -FROM node:18.16.1-bullseye-slim AS base +FROM node:18.18.2-bullseye-slim@sha256:a50436b44fe3eb2ff72696fb394ad3cae45f06cb2a7468c5ef3f012d23d9888f AS base RUN apt-get update && apt-get install -y openssl dumb-init WORKDIR /triggerdotdev COPY --chown=node:node .gitignore .gitignore @@ -50,7 +50,7 @@ RUN pnpm run generate RUN pnpm run build --filter=webapp... # Runner -FROM node:18.16.1-bullseye-slim AS runner +FROM node:18.18.2-bullseye-slim@sha256:a50436b44fe3eb2ff72696fb394ad3cae45f06cb2a7468c5ef3f012d23d9888f AS runner RUN apt-get update && apt-get install -y openssl WORKDIR /triggerdotdev RUN corepack enable diff --git a/docker/services-compose.yml b/docker/services-compose.yml new file mode 100644 index 000000000..b2ec2bdb7 --- /dev/null +++ b/docker/services-compose.yml @@ -0,0 +1,65 @@ +version: "3" + +volumes: + database-data: + +networks: + app_network: + external: false + +services: + db: + container_name: devdb + image: postgres:14 + restart: always + volumes: + - database-data:/var/lib/postgresql/data/ + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: postgres + networks: + - app_network + ports: + - 5432:5432 + app: + build: + context: ../ + dockerfile: ./docker/Dockerfile + ports: + - 3030:3030 + depends_on: + - db + env_file: + - ../.env + environment: + DATABASE_URL: postgres://postgres:postgres@db:5432/postgres?schema=public + DIRECT_URL: postgres://postgres:postgres@db:5432/postgres?schema=public + SESSION_SECRET: secret123 + MAGIC_LINK_SECRET: secret123 + ENCRYPTION_KEY: secret123 + REMIX_APP_PORT: 3030 + PORT: 3030 + WORKER_ENABLED: "false" + EXECUTION_WORKER_ENABLED: "false" + networks: + - app_network + worker: + build: + context: ../ + dockerfile: ./docker/Dockerfile + depends_on: + - db + env_file: + - ../.env + environment: + DATABASE_URL: postgres://postgres:postgres@db:5432/postgres?schema=public + DIRECT_URL: postgres://postgres:postgres@db:5432/postgres?schema=public + SESSION_SECRET: secret123 + MAGIC_LINK_SECRET: secret123 + ENCRYPTION_KEY: secret123 + REMIX_APP_PORT: 3030 + PORT: 3030 + HTTP_SERVER_DISABLED: "true" + networks: + - app_network diff --git a/docs/_snippets/stable-key-param.mdx b/docs/_snippets/stable-key-param.mdx index 1053571c7..37227f417 100644 --- a/docs/_snippets/stable-key-param.mdx +++ b/docs/_snippets/stable-key-param.mdx @@ -1,4 +1,4 @@ - - Should be a stable and unique key inside the `run()`. See + + Should be a stable and unique cache key inside the `run()`. See [resumability](/documentation/concepts/resumability) for more information. diff --git a/docs/documentation/concepts/limitations.mdx b/docs/documentation/concepts/limitations.mdx deleted file mode 100644 index ab9b80a8c..000000000 --- a/docs/documentation/concepts/limitations.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "Limitations" ---- - -There are a few limitations that are important to understand. - -In the latest version: - -- Runs on localhost are limited to 5 minutes. -- On long-running servers (not serverless) Runs can be retried erroneously. -- Compute intensive jobs are not well supported. - -## Runs on localhost are limited to 5 minutes - -When developing locally the [CLI dev command](/documentation/guides/cli#dev-command) uses [ngrok](https://ngrok.com/) so messages can be sent to your machine. - -Ngrok has a timeout of 5 minutes on a Request/Response cycle. so, if a localhost Run takes longer than 5 minutes to complete, the Run will fail. - -This limitation will be removed in the future by adding an alternative run strategy that works well on localhost and long-running servers. This won't use the request/response cycle. - -## On long-running servers (not serverless) Runs can be retried erroneously - -Currently the only way that Runs are performed is by a Request/Response cycle when `run` is called on a Job. This is optimized for serverless functions (where you have to use a Request/Response cycle), but not for long-running servers. - -This limitation will be removed in the future by adding an alternative mode so Jobs works well on localhost and long-running servers. This won't use the request/response cycle. - -## Compute intensive jobs are not well supported - -Currently the only way that Runs are performed is inside a Request/Response cycle when `run` is called on a Job. This is not a good way to perform compute intensive jobs. - -In the future we will add good support for compute intensive jobs. diff --git a/docs/documentation/concepts/limits.mdx b/docs/documentation/concepts/limits.mdx new file mode 100644 index 000000000..1bb7b0d0f --- /dev/null +++ b/docs/documentation/concepts/limits.mdx @@ -0,0 +1,116 @@ +--- +title: "Limits" +--- + +## General Limits + +The following limits apply to the Trigger.dev Cloud service and users of the self-hosted version of Trigger.dev. + +| | Hobby | Team | Self-hosted / Enterprise | +| ----------------------------------------------------------------------- | --------- | ----------- | ------------------------- | +| Team Members | Up to 2 | Up to 5 | Custom | +| Projects | 1 | Up to 5 | Custom | +| Jobs per Project | Up to 10 | Up to 50 | Custom | +| Runs (per Month) | 5,000 | Up to 1m | Custom | +| Run Log retention | 24 hours | 7 days | Custom | +| Connected Integrations | Up to 50 | Up to 1000 | Custom | +| [Tasks per Run](#tasks-per-runs) | Up to 250 | Up to 1000 | Custom | +| [Concurrent Run Executions](#concurrent-run-executions) | Up to 10 | Up to 10 | Custom | +| [Maximum Task Duration](#maximum-task-duration) | < 2m | < 2m | < Deployment Grace Period | +| [Maximum Run Execution Duration](#maximum-total-run-execution-duration) | up to 15m | up to 2 hrs | Custom | +| [Yielded Executions per Run](#yielded-executions-per-run) | Up to 100 | Up to 100 | Custom | + +### Tasks per Run + +For any individual Job Run, the number of Tasks that can be executed is limited to 250 for Hobby and 1000 for Team plans. This limit is enforced to prevent runaway Jobs from consuming excessive resources. + +#### What is a Task? + +Tasks are the fundamental building blocks on which the Trigger.dev service is constructed. You can create and run a task using [io.runTask()](/sdk/io/runtask): + +```ts +client.defineJob({ + id: "task-example", + name: "Task Example", + version: "1.0.0", + trigger: eventTrigger({ name: "task.example" }), + run: async (payload, io, ctx) => { + const response = await io.runTask("task-1", async (task) => { + // Do some work here + return { foo: "bar" }; + }); + }, +}); +``` + +Tasks power the following features as well: + +- [io.wait()](/sdk/io/wait) +- [io.sendEvent()](/sdk/io/sendevent) +- [io.backgroundFetch()](/sdk/io/backgroundfetch) +- [io.logger](/sdk/io/logger) + +Our integration clients are also built on top of Tasks, so any time you call an integration client method, you are creating a Task. e.g.: + +```ts +client.defineJob({ + id: "send-resend-email", + name: "Send Resend Email", + version: "0.1.0", + trigger: eventTrigger({ + name: "send.email", + }), + integrations: { + resend, + }, + run: async (payload, io, ctx) => { + // This creates a Task + await io.resend.sendEmail("send-email", { + to: payload.to, + subject: payload.subject, + text: payload.text, + from: "Trigger.dev ", + }); + }, +}); +``` + +Anything that shows up as an item on the [Run Log](/documentation/guides/viewing-runs#run-page) is a Task: + +![Task](/images/task.png) + +### Concurrent Run Executions + +A Run Execution is a single HTTP request from the Trigger.dev server to your endpoint to execute a run. The number of concurrent Run Executions is limited to 10 for Hobby and Team plans. + +This does not include runs that are waiting for a [io.wait()](/sdk/io/wait) to complete, so you could in theory have 1000s of "In Progress" jobs at a given time with no current run executions. + +Going over this limit does not abort or cancel runs, but it will prevent new run executions until the number of concurrent executions drops below the limit. + +### Maximum Task Duration + +The Maximum Task Duration is the maximum amount of time a single Task can run for. This limit is partly enforced by the Trigger.dev server, but also by the execution runtime of your deployed serverless function. + +For example, if you're deploying to Vercel and using their Node.js Serverless functions, the maximum execution time is anywhere from 1 second to 5 minutes. If you have a single task that can run for longer than your maximum function execution time, it will never complete. + +We will retry tasks that never complete due to a timeout, but if the task continues to not complete, it will be marked as cancelled and the run will be timed out with an output like the following: + +```json +{ + "message": "Function timeout detected in 10s without any task creation. This is unexpected behavior and could lead to an infinite execution error because the run will never finish. This is likely caused by task \"initial-long-task\" execution exceeding the function timeout" +} +``` + +See our Next.js section on [Deployment](/documentation/guides/platforms/nextjs#deployment) for more information on how to configure your function timeout. + +Additionally, the Trigger.dev enforces a soft-cap of 2 minutes. Tasks that take longer than 2 minutes will be allowed to complete but we cannot guarentee that they won't be retried erroneously or cause your run execution to be locked for up to 4 hours. This is because of a current limitation of [Graphile Worker](https://github.com/graphile/worker) and our deployment platform. + +### Maximum Total Run Execution Duration + +The Maximum Total Run Execution Duration is the maximum amount of time a single run can execute for. Runs are completed over 1 or more executions, depending on many factors like the number of tasks, the serverless function timeout, task errors and delays. The Trigger.dev measures the total time spent across all run executions and will cancel the run if it exceeds the limit. + +Hobby plans have a limit of 15 minutes, Team plans have a limit of 2 hours, and Enterprise plans can set a custom limit. + +### Yielded Executions per Run + +You can manually yield a run execution using `io.yield()`, which will exit the current run execution and schedule a new run execution to continue the run. You do this at most 100 times per run. diff --git a/docs/documentation/concepts/resumability.mdx b/docs/documentation/concepts/resumability.mdx index e6e9b5c84..675cfc0f8 100644 --- a/docs/documentation/concepts/resumability.mdx +++ b/docs/documentation/concepts/resumability.mdx @@ -8,14 +8,14 @@ description: "Runs are resumable by returning Task stored data" ## How does this work? 1. When a Run is created, it is given a unique ID. This ID is used to identify the Run. -2. [Tasks](/documentation/concepts/tasks) have a `key` which is a string and is the first parameter. This should be stable and unique inside that `run` function. +2. [Tasks](/documentation/concepts/tasks) have a `cacheKey` which is a string and is the first parameter. This should be stable and unique inside that `run` function. 3. When a Task is completed, its output is stored. 4. If a Run exceeds the timeout, or your server restarts, the Run will be "replayed". 5. The second+ time it is run, Tasks that have already successfully completed will immediately return their first output. The code inside them won't re-run. -## How to use keys +## How to use cache keys -Like we mentioned above, we use Task keys to determine which Tasks have already been executed. They are defined by you inside your `run` function, for example when you call `io.slack.postMessage`: +Like we mentioned above, we use Task cache keys to determine which Tasks have already been executed. They are defined by you inside your `run` function, for example when you call `io.slack.postMessage`: ```ts await io.slack.postMessage("โญ๏ธ New Star", { @@ -24,9 +24,9 @@ await io.slack.postMessage("โญ๏ธ New Star", { }); ``` -In this example, the key is the string `"โญ๏ธ New Star"`. This means that if the Job is interrupted and then resumed, the `slack.postMessage` Task will be skipped because it has already been executed. +In this example, the cache key is the string `"โญ๏ธ New Star"`. This means that if the Job is interrupted and then resumed, the `slack.postMessage` Task will be skipped because it has already been executed. -If you make multiple calls to `slack.postMessage`, you should use different keys for each call. For example: +If you make multiple calls to `slack.postMessage`, you should use different cache keys for each call. For example: ```ts await io.slack.postMessage("โญ๏ธ New Star", { @@ -42,7 +42,9 @@ await io.slack.postMessage("๐Ÿšจ Critical Issue", { If you are calling a Task multiple times with the same key, it will only be executed once. For example, if you call `slack.postMessage` with the key `"โญ๏ธ New Star"` twice, it will only be executed once. -## How to use keys with loops +See our [Task concept guide](/documentation/concepts/tasks) for more information about tasks and how they are crucial to the resumability of your Jobs. + +## How to use cache keys with loops If you are using a loop, you should use the loop index as the key. For example: @@ -56,3 +58,8 @@ for (let i = 0; i < 10; i++) { }); } ``` + + + We don't currently support running tasks in parallel so `Promise.all` will not work correctly. + This is something on our roadmap that we hope to support soon. + diff --git a/docs/documentation/concepts/tasks.mdx b/docs/documentation/concepts/tasks.mdx index 288872f60..31539a6d9 100644 --- a/docs/documentation/concepts/tasks.mdx +++ b/docs/documentation/concepts/tasks.mdx @@ -3,17 +3,24 @@ title: "Tasks" description: "Tasks are individual building blocks of a Run." --- -> A Task is a resumable unit of a Run that can be retried, resumed and is logged. +A [Task](/documentation/concepts/tasks) is a cached unit of work in a Job Run that are logged to the Trigger.dev UI. -## Tasks vs regular code + + Any interaction with an external service (database or API) should be wrapped in a Task. Failing to + do so could result in repeated work when runs are resumed. + -In the `run()` function you can use regular code and you can use Tasks. +## Why do you need tasks? + +Tasks are a key building block of how Trigger.dev works, and failing to use them will result in unpredictable results. Tasks allow bits of work inside a Job Run to be cached and the results of those tasks to be reused. + +This is **very important** because for a Job Run to be resumable (e.g. after a serverless function timeout, or because of a call to `io.wait()`), we need to call the `Job.run` function multiple times. If we didn't cache the results of Tasks, then we would be repeating work on each run. ```ts client.defineJob({ id: "new-user", name: "Run when a new user signs up", - version: "0.0.1", + version: "1.0.0", trigger: eventTrigger({ name: "new.user", schema: z.object({ @@ -24,26 +31,24 @@ client.defineJob({ resend, }, run: async (payload, io, ctx) => { - // regular code, not a Task - // the inputs/outputs of this function are not sent to the Trigger.dev platform - const user = await prisma.user.findUnique({ + // This code will run twice. Once when the run first starts, and once after the wait + const user = await prisma.user.findUniqueOrThrow({ where: { id: payload.userId }, select: { email: true, name: true }, }); - if (!user) throw new Error(`User not found: ${payload.userId}`); - // Integration functions are Tasks - await io.resend.sendEmail("Welcome email", { + // This code will run once, because the resend integration creates a task with the "welcome-email" cacheKey + await io.resend.sendEmail("welcome-email", { to: user.email, from: "jane@acme.inc", subject: "Welcome!", html: welcomeEmail(user.name), }); - // built-in io functions are Tasks + // This code will run once, because io.wait creates a task with the "wait" cacheKey await io.wait("wait", 60 * 60 * 3); // wait for 3 hours - // You can wrap your own code in a Task, for retrying, resumability and logging + // This code will run once, because we're manually creating a task with the "my-task" cacheKey const response = await io.runTask( "my-task", async () => { @@ -57,21 +62,246 @@ client.defineJob({ }); ``` -## The benefits of Tasks +As well as powering the resumable nature of Trigger.dev, Tasks also provide: -Tasks are a powerful concept that gives you a lot of benefits: - -- **Resumability** โ€“ Runs can exceed the maximum timeout on serverless platforms. If a Run exceeds this limit, it will be re-run. When it is re-run, any completed Tasks return their original output and they aren't re-run. Read more about [Resumability](/documentation/concepts/resumability). -- **Retryable** โ€“ If a Task fails, it will be retried. You can configure how (or if) a Task is retried. Full details in the [io SDK reference](/sdk/io). +- **Retryable** โ€“ If a Task fails, it can be retried. You can configure how (or if) a Task is retried. Full details in the [io.runTask() SDK reference](/sdk/io/runtask). - **Logging** โ€“ Tasks are logged, so you can see what happened in a Run. Find out more about [viewing runs](/documentation/guides/viewing-runs). +## Task Cache Keys + +The first param of all Tasks is a `cacheKey`. This is a unique identifier for the Task inside that Run. It is used for storing the cached result of a task. It is also used to identify the Task in the [Viewing Runs Dashboard](/documentation/guides/viewing-runs). + +It's important that cacheKey's are unique inside an individual Job Run. + +## Creating Tasks + +There are **3** ways of using tasks in your code: + +- Using the [io.runTask()](/sdk/io/runtask) function +- Using one of our [Integration packages](/documentation/concepts/integrations) and calling the `io.integration.runTask()` wrapper +- Using one of our [Integration packages](/documentation/concepts/integrations) and calling a task wrapper function, such as [io.slack.postMessage()](/integrations/apis/slack) + +### Using `io.runTask()` + +The `io.runTask()` function allows you to run a Task manually. It takes a `cacheKey` and a function to run. The function will only be run if the Task is not already cached. + +```ts +const response = await io.runTask("my-task", async (task) => { + return await longRunningCode(payload.userId); +}); +``` + +The callback function is passed a `task` object, which can be useful for providing an idempotency key to an external service. For example, Stripe: + + + Our [Stripe Integration](integrations/apis/stripe) handles this for you automatically, this is + just for documentation purposes + + +```ts +const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { + apiVersion: "2020-08-27", +}); + +await io.runTask("create-customer", async (task) => { + await stripe.customers.create( + { + email: "eric@trigger.dev", + }, + { + idempotencyKey: task.idempotencyKey, + } + ); +}); +``` + +`runTask` also takes an optional 3rd argument, which allows you to customize how the Task is displayed and run. For example, you can supply a name and some properties to be displayed in the Viewing Runs Dashboard: + +```ts +const response = await io.runTask( + "my-task", + async (task) => { + return await longRunningCode(payload.userId); + }, + { + name: "My Task", + properties: [ + { + label: "User ID", + value: payload.userId, + }, + ], + icon: "user", + } +); +``` + +See the [io.runTask() SDK reference](/sdk/io/runtask) for more information. + +### Using `io.integration.runTask()` + +All of our [Integration packages](/documentation/concepts/integrations) expose a `runTask()` function. The main differences between this and `io.runTask()` are: + +- Adds an additional callback parameter which provides the underlying authenticated integration client +- Automatically sets the `icon` property on the Task. +- Configures sensible defaults for retries and error handling. + +An example here demonstrates using the GitHub integration's `runTask` function to create a project card when a new user signs up: + +```ts +import { Github } from "@trigger.dev/github"; + +const github = new Github({ + id: "github", +}); + +client.defineJob({ + id: "create-project-card", + name: "Create Project Card", + version: "1.0.0", + trigger: eventTrigger({ + name: "new.user", + }), + integrations: { + github, + }, + run: async (payload, io, ctx) => { + await io.github.runTask( + "create-card", + async (client, task) => { + // client is an authenticated GitHub client (https://github.com/octokit/octokit.js) + return client.rest.projects.createCard({ + column_id: process.env.GITHUB_PROJECT_COLUMN_ID, + note: `New User ${payload.user.name} signed up!`, + }); + }, + { name: "Create card" } + ); + }, +}); +``` + +### Using an Integration Task Wrapper Function + +Our [Integration packages](/documentation/concepts/integrations) also expose a number of task wrapper functions. These are functions that wrap a common task for that integration. For example, the [Slack integration](/integrations/apis/slack) exposes a `postMessage()` function: + +```ts +import { Slack } from "@trigger.dev/slack"; + +const slack = new Slack({ + id: "slack", +}); + +client.defineJob({ + id: "send-welcome-message", + name: "Send welcome message", + version: "1.0.0", + trigger: eventTrigger({ + name: "new.user", + }), + integrations: { + slack, + }, + run: async (payload, io, ctx) => { + await io.slack.postMessage("send-message", { + channel: process.env.SLACK_CHANNEL_ID, + text: `New user ${payload.user.name} signed up!`, + }); + }, +}); +``` + +All task wrapper functions take a `cacheKey` as the first argument, because they are Tasks under the hood. Think of them as a convenience wrapper around `io.runTask()`. + +We strive to document all of the task wrapper functions in our [Integration packages](/documentation/concepts/integrations). For example, checkout our [GitHub integration task](/integrations/apis/github-tasks) docs. + ## Subtasks -A Task can have multiple subtasks, and so on. This is useful for breaking down a large Task into smaller Tasks. We currently support nesting 5 levels deep. +You can break up a task into multiple subtasks. This is useful for breaking up a long-running task into smaller chunks, while consolidating the logging into a single task in the dashboard with children. -## Task Keys +We currently support nesting up to 5 levels -The first param of all Tasks is a `key`. This is a unique identifier for the Task inside that Run. It is used for resumability and logging. It is also used to identify the Task in the [Viewing Runs Dashboard](/documentation/guides/viewing-runs). +```ts +const response = await io.runTask("parent-task", async (task) => { + await io.runTask("child-1", async () => { + // do something + }); + + await io.runTask("child-2", async () => { + // do something + }); +}); +``` + +Task cacheKey's are automatically scoped to the parent task. So for example, you can reuse a cacheKey inside a parent task and it will not conflict with another top-level task. + +```ts +const response = await io.runTask("parent-task", async (task) => { + await io.runTask("child-1", async () => { + // do something + }); + + await io.runTask("child-2", async () => { + // do something + }); +}); + +// This will not conflict with the child-1 task above +const response = await io.runTask("child-1", async (task) => { + // do something +}); +``` + +### Extracting Common Tasks + +Subtasks allow you to DRY up any repeating task code into a single function. For example, if you have a common task that sends a welcome email, you can extract that into a function: + +```ts +const sendWelcomeEmail = async (cacheKey: string, io: IO, resend: Resend, userId: string) => { + return await io.runTask(cacheKey, async () => { + const user = await io.runTask("fetch-user", async () => { + return prisma.user.findUniqueOrThrow({ + where: { id: userId }, + select: { email: true, name: true }, + }); + }); + + await io.resend.sendEmail("๐Ÿ“ง", { + to: user.email, + from: "eric@trigger.dev", + subject: "Welcome!", + html: welcomeEmail(user.name), + }); + }); +}; + +client.defineJob({ + id: "new-user", + name: "Run when a new user signs up", + version: "1.0.0", + trigger: eventTrigger({ + name: "new.user", + schema: z.object({ + userId: z.string(), + }), + }), + integrations: { + resend, + }, + run: async (payload, io, ctx) => { + await sendWelcomeEmail("๐Ÿซก", io, io.resend, payload.userId); + }, +}); +``` + + + Always make sure you are allow passing a unique cacheKey to the `runTask` function, so the tasks + inside the function are not accidentally reused. + + +## Limitations + +A single task has an upper-bound on it's execution duration, which must be less than the serverless function execution timeout of your deployed platform. For more information see our [Limits docs](/documentation/concepts/limits#maximum-task-duration) ## References diff --git a/docs/documentation/concepts/what-is-triggerdotdev.mdx b/docs/documentation/concepts/what-is-triggerdotdev.mdx index 7793e5090..4be93be5b 100644 --- a/docs/documentation/concepts/what-is-triggerdotdev.mdx +++ b/docs/documentation/concepts/what-is-triggerdotdev.mdx @@ -103,3 +103,19 @@ Below is a simplified architecture diagram of how Trigger.dev works: ![Architecture](/images/architecture.png) As you can see above, we communicate between your code and the Trigger.dev platform. This allows us to send events to your code, and receive tasks from your code. + +## Limitations + +There are a few limitations that are important to understand. + +In the latest version the following are not supported: + +### Long-running servers + +Currently Trigger.dev is optimized for deployment to serverless functions, but not for long-running servers. + +This limitation will be removed in the future by adding an alternative mode so Jobs works well on localhost and long-running servers. + +### Compute intensive tasks + +Because Trigger.dev is optimized for serverless functions, it is not well suited for compute intensive jobs as each individual task is limited to the [Maximum Run Chunk Execution Duration](/placeholder) diff --git a/docs/documentation/guides/create-a-job.mdx b/docs/documentation/guides/create-a-job.mdx deleted file mode 100644 index c89c05dfd..000000000 --- a/docs/documentation/guides/create-a-job.mdx +++ /dev/null @@ -1,270 +0,0 @@ ---- -title: "Create a Job" -description: "How to create a Job in your codebase" ---- - -> Jobs are the core of the system. They allow you to run code when some event occurs. They are built using a combination of Triggers and Tasks. - -### Pre-requisites - -Make sure your Project is set up with Trigger.dev. We recommend [using the CLI](/documentation/quickstart) to do this. - -## How to write a Job in code - -### 1. Create a Job file in your Project - -This is where you will write your Job code. E.g. `my-job.ts`. - -```ts -//this path might be different depending on your project -import { client } from "@/trigger"; - -client.defineJob({ - // This is the unique ID for your Job's end-point - id: "your-job-id", - // This is the name of your Job - name: "Your Job name", - // This is the version of our SDK you are using - version: "0.0.1", - ... -``` - -The `id` and `name` are important because they are used to create and identify your Job in the app. - - - This Job must be imported in the `trigger` file in order to be registered when the CLI dev command - is run. If you're using Next.js, this can be found in either the `app/api/trigger/route.ts` file - for projects using the App Router, or `pages/api/trigger.ts` if you're using the Pages Router. - - -### 2. Choose a Trigger - -This is what kicks-off a Job. There are a few different types of Triggers you can use: - - - - Run a Job on a repeating schedule, using [intervalTrigger](/documentation/concepts/triggers/scheduled#interval) - ```ts - client.defineJob({ - ... - trigger: intervalTrigger({ - seconds: 60, - }), - ... - ``` - Or with CRON syntax, using [cronTrigger](/documentation/concepts/triggers/scheduled#using-cron-syntax): - ```ts - client.defineJob({ - ... - trigger: cronTrigger({ - cron: "30 14 * * 1", - }), - ... - ``` - - - - Start your Jobs when an event happens in another API. You'll need to use [Integrations](/integrations) to do this. - - Here's an example with the GitHub integration. - - ```ts - client.defineJob({ - ... - //E.g. When a GitHub issue is modified on the triggerdotdev/trigger.dev repo - trigger: github.triggers.repo({ - event: events.onIssue, - owner: "triggerdotdev", - repo: "trigger.dev", - }), - ... - ``` - - - - The [eventTrigger](/documentation/concepts/triggers/events) allows you to define an event that your Job listens for. - - When you [send an event](/documentation/concepts/triggers/events#sending-events) with the same name the Job will run. - - ``` ts - client.defineJob({ - ... - //E.g. when a user is created in your app (you send the event) - trigger: eventTrigger({ - name: "user.created", - schema: z.object({ - name: z.string(), - email: z.string(), - paidPlan: z.boolean(), - }), - ... - ``` - - - - These are advanced features that allows you to attach dynamic triggers to a Job. Full information [here](/documentation/concepts/triggers/dynamic). - - - -### 3. Create the Job Tasks - -> A Task is a resumable unit of a Run that can be retried, resumed and is logged. - - - You can use just regular code in your Jobs. But you don't get the benefits of retrying, logging - and resumability. More info on [Tasks vs regular - code](/documentation/concepts/tasks#tasks-vs-regular-code). - - -You can string together multiple Tasks and regular code in any order you want. - -**Useful built-in Tasks:** - -| Task | Description | Task code | -| ------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| [Delay](/documentation/concepts/delays) | Wait for a period of time | `await io.wait("wait", 60);` | -| [Log](/sdk/io/logger) | Log a message | `await io.logger.log("Hello");` | -| [Send Event](/sdk/io/sendevent) | Send an event (for eventTrigger) | `await io.sendEvent("my-event", { name: "my.event", payload: { hello: "world" } });` | -| [Run task](/sdk/io/runtask) | Wrap your own code in this to create a Task | `await io.runTask("My Task", async () => { console.log("Hello"); });` | -| [Background fetch](/sdk/io/backgroundfetch) | Fetch data from a URL that can take longer that the serverless timeout. | `await io.backgroundFetch("fetch-some-data", { url: "https://example.com" });` | - -For a full list of built-in Tasks, see the [io SDK reference](/sdk/io). - -**Integration Task examples:** - - - To use our integrations you will need to set them up in the app first. Our guide is - [here](/documentation/guides/using-integrations). - - - - - -**Task:** [backgroundCreateCompletion](/integrations/apis/openai) - -```ts -await io.openai.backgroundCreateChatCompletion("background-chat-completion", { - model: "gpt-3.5-turbo", - messages: [ - { - role: "user", - content: "Create a good programming joke about background jobs", - }, - ], -}); -``` - -View more OpenAI tasks [here](/integrations/apis/openai). - - - - -**Task:** [addIssueLabels](/integrations/apis/github-tasks) - -```ts -await io.github.addIssueLabels("add label", { - owner: payload.repository.owner.login, - repo: payload.repository.name, - issueNumber: payload.issue.number, - labels: ["bug"], -}); -``` - -View more GitHub tasks [here](/integrations/apis/github-tasks). - - - - -**Task:** [sendEmail](/integrations/apis/resend) - -```ts -await io.resend.sendEmail("send-email", { - to: payload.to, - subject: payload.subject, - text: payload.text, - from: "Trigger.dev ", -}); -``` - - - - -**Task:** [postMessage](/integrations/apis/slack) - -```ts -await io.slack.postMessage("post message", { - channel: "C04GWUTDC3W", - text: "My first Slack message", -}); -``` - -View more Slack tasks [here](/integrations/apis/slack). - - - - -These are just a few examples of Integration Tasks. For many more, browse our [Integrations section](/integrations/). - -### 4. Register your Jobs - -While your app is running, open a **new terminal window or tab** and run: - - - -```bash npm -npx @trigger.dev/cli@latest dev -``` - -```bash pnpm -pnpm dlx @trigger.dev/cli@latest dev -``` - -```bash yarn -yarn dlx @trigger.dev/cli@latest dev -``` - - - -This will register all of your Jobs, they should appear in your dashboard. - - - Not seeing your Job in the web app? It might be because you forgot to import it. This will need to - be either in `app/api/trigger/route.ts` file if you're using the Next,js App Router, or - `pages/api/trigger.ts` if you're using the Next,js Pages Router. - - -If you are having trouble getting your job running, please reach out to us and we will help you fix any issues: - -- [Join our Discord](https://discord.gg/kA47vcd8P6) -- [Email us](mailto:help@trigger.dev) - ---- - -## Next steps - -We recommend exploring all of the below sections to fully understand how to create and run Jobs using Trigger.dev. - - - - A guide for how to run your Jobs. Triggering a test Run and Triggering your Job for real - - - - - View example Jobs / the example jobs repo. These are a great starting - point for creating your own Jobs. - - - How to use the SDK. This includes all the available Tasks, triggers and - actions you can use. - - - - Integrations make it easy to authenticate and use APIs. -Learn how to use and create integrations. - - diff --git a/docs/documentation/guides/platforms/nextjs.mdx b/docs/documentation/guides/platforms/nextjs.mdx index 06685f8fe..dfca5a234 100644 --- a/docs/documentation/guides/platforms/nextjs.mdx +++ b/docs/documentation/guides/platforms/nextjs.mdx @@ -17,6 +17,14 @@ View our [guide for writing Jobs](/documentation/guides/create-a-job). View our [deployment guide](/documentation/guides/deployment) to learn how to deploy your Jobs. +### Serverless function timeouts + +If you are deploying your Next.js app to Vercel, you may need to configure a larger max function duration. By default, Vercel has a max function duration of 10 seconds. As outlined in our [Limits docs](/documentation/concepts/limits#maximum-task-duration), the max function duration effects the maximum [Task](/documentation/concepts/tasks) duration. + +So if you have any tasks that may take longer than 10 seconds to run (or close to 10 seconds), you should increase the max function duration to a higher value (only available to paid Vercel plans). + +See the [Vercel docs](https://vercel.com/docs/functions/serverless-functions/runtimes#max-duration) for more information on increasing the `maxDuration` for your Vercel Serverless Functions. + ## Middleware Next.js Middleware allows you to run code before a request is completed, and if you are using it currently in your Next.js project (or you add it later), you might need to guard against altering requests to the `/api/trigger` endpoint, which needs to be exposed to the Trigger.dev installation (either your self-hosted one or the Trigger.dev Cloud). diff --git a/docs/documentation/guides/writing-jobs-step-by-step.mdx b/docs/documentation/guides/writing-jobs-step-by-step.mdx new file mode 100644 index 000000000..438049da0 --- /dev/null +++ b/docs/documentation/guides/writing-jobs-step-by-step.mdx @@ -0,0 +1,382 @@ +--- +title: "Writing Jobs - Step by Step" +description: "Best practices for writing well-behaving Jobs in your codebase" +--- + +## Pre-requisites + +This guide assumes you already have a project setup and working with Trigger.dev. If not, head over to our [Quick Start guides](/documentation/quickstarts/introduction) to get up and running in a few minutes. + +## 1. Define your Job + +A Job is a collection of Tasks that are run in a specific order. You can think of it as a function that you can run on a schedule, or when an event happens. Jobs are defined by calling the `TriggerClient.defineJob` function + +```ts +//this path might be different depending on your project +import { client } from "@/trigger"; + +client.defineJob({ + // ... job definition +}); +``` + + + If you aren't seeing defined jobs in your Trigger.dev dashboard, it might be because the job file + isn't being imported in your app. + + +## 2. Choose a name and ID + +Each job must have a unique and stable `id` and `name`. The `id` is used to identify the Job in the database, and the `name` is used to identify the Job in the UI. + +```ts +client.defineJob({ + id: "my-job", + name: "My Job", + // ... job definition +}); +``` + +We will pass the value of the `id` property through a slugifier because we use it in URLs in our Dashboard. This means you can use any characters you want, but we recommend using only lowercase letters, numbers and dashes. + +## 3. Set the current version + +The `version` property is used to track changes to your Job. It's required to be a [semantic version](https://semver.org/) string. You can track changes to your Job by incrementing the version number, and we will display in the Dashboard which version each Job Run was created with. + +```ts +client.defineJob({ + id: "my-job", + name: "My Job", + version: "1.0.0", + // ... job definition +}); +``` + +## 4. Choose a Trigger + +The trigger you choose determines how and when a job will run. See our [Triggers guide](/documentation/concepts/triggers/introduction) for more information. The Trigger you choose also defines the type of the run `payload` argument (more in this below) + +```ts +client.defineJob({ + id: "my-job", + name: "My Job", + version: "1.0.0", + trigger: eventTrigger({ + name: "my.event", + }), + // ... job definition +}); +``` + +## 5. Add integrations + +Integrations provide a convienent way to create and run tasks against authenticated APIs inside your Job's run function. You'll need to pass them in the `integrations` option when defining your Job. + +```ts +import { Slack } from "@trigger.dev/slack"; + +const slack = new Slack({ id: "slack" }); + +client.defineJob({ + id: "my-job", + name: "My Job", + version: "1.0.0", + trigger: eventTrigger({ + name: "my.event", + }), + integrations: { slack }, + // ... job definition +}); +``` + +## 6. Implement the run function + +The `run` function implements your custom code that will be executed when your Job is run. It's an async function that takes three arguments: + +- The run `payload` - The type of the `payload` argument is determined by the Trigger you choose. +- An instance of `IO`, which exposes built-in tasks and allows you to create your own, as well as interact with integrations. +- A `context` object, which contains information about the current run, such as the run ID, the Job ID, and the Job version. [Context reference](/sdk/context) + +```ts +import { Slack } from "@trigger.dev/slack"; + +const slack = new Slack({ id: "slack" }); + +client.defineJob({ + id: "my-job", + name: "My Job", + version: "1.0.0", + trigger: eventTrigger({ + name: "my.event", + }), + integrations: { slack }, + run: async (payload, io, context) => { + // ... your code + }, +}); +``` + + + We do not compile and ship your code to run on the Trigger.dev server. It runs exactly where + you've deployed your code (e.g. Vercel). + + +The `run` function you define is like a normal JavaScript function in all respects except one: it will be called one or more times to complete a single Job Run. + +This means that you can't rely on any state that is not persisted between runs, and you must **create tasks** to ensure that work is not repeated. + + + The run function is called multiple times to ensure that your Job is resilient to failure and can finish running even if it is interrupted. There are many reasons why a run could be interrupted and resumed later, including: + +- The serverless function times out +- A task fails and needs to be retried +- A wait task is used to delay continuing the run until a later time +- A run yields execution to prevent the serverless function from timing out +- Waiting for a [backgroundFetch](/sdk/io/backgroundfetch) to complete +- Waiting for a task callback to be called (like the ones used in our [Replicate integration](/integrations/apis/replicate#predictions)) +- Waiting for [another event](https://github.com/triggerdotdev/trigger.dev/issues/472) to fire. + + + +Tasks are so important that we've dedicated a whole section to them. See our [Tasks guide](/documentation/concepts/tasks) for more information. + +### Built in tasks + +We provide some built-in tasks that you can use in your run function: + +| Task | Description | Task code | +| ------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | +| [Delay](/documentation/concepts/delays) | Wait for a period of time | `await io.wait("wait", 60);` | +| [Log](/sdk/io/logger) | Log a message | `await io.logger.log("Hello");` | +| [Send Event](/sdk/io/sendevent) | Send an event (for eventTrigger) | `await io.sendEvent("my-event", { name: "my.event", payload: { hello: "world" } });` | +| [Background fetch](/sdk/io/backgroundfetch) | Fetch data from a URL that can take longer that the serverless timeout. | `await io.backgroundFetch("fetch-some-data", { url: "https://example.com" });` | + +For a full list of built-in Tasks, see the [io SDK reference](/sdk/io). The below example makes use a few of these built-in tasks: + +```ts +import { Slack } from "@trigger.dev/slack"; + +const slack = new Slack({ id: "slack" }); + +client.defineJob({ + id: "my-job", + name: "My Job", + version: "1.0.0", + trigger: eventTrigger({ + name: "my.event", + }), + integrations: { slack }, + run: async (payload, io, context) => { + await io.logger.info("Received the my.event event", { payload }); + await io.sendEvent("send-event", { + name: "other.event", + payload: { hello: "world" }, + }); + + await io.wait("wait for 60 seconds", 60); + + await io.backgroundFetch("fetch-some-data", { + url: "https://example.com", + }); + }, +}); +``` + +### Create your own tasks + +You can also create your own tasks or use tasks provided by our integration packages. See [Creating Tasks](/documentation/concepts/tasks#creating-tasks) for more information. The example below demonstrates creating tasks in 3 different ways: + +```ts +import { Slack } from "@trigger.dev/slack"; + +const slack = new Slack({ id: "slack" }); + +client.defineJob({ + id: "my-job", + name: "My Job", + version: "1.0.0", + trigger: eventTrigger({ + name: "my.event", + }), + integrations: { slack }, + run: async (payload, io, context) => { + // Use runTask with the "get-user" cacheKey, and return the user + const user = await io.runTask("get-user", async () => { + return prisma.user.findUniqueOrThrow({ + where: { + id: payload.id, + }, + }); + }); + + // Use the Slack integration to create a task using the "post-message" cacheKey + const message = await io.slack.postMessage("post-message", { + channel: process.env.SLACK_CHANNEL_ID, + message: `Hello ${user.name}`, + }); + + await io.wait("wait for 10 seconds", 10); + + // Use the Slack integration's runTask method to add a reaction to the message + await io.slack.runTask("add-reaction", async (client) => { + // client here is an authenticated instance of the Slack SDK + await client.reactions.add({ + channel: process.env.SLACK_CHANNEL_ID, + name: "thumbsup", + timestamp: message.ts, + }); + }); + }, +}); +``` + +## 7. Handling errors + +If your run function throws an error, the Job Run will fail and the error will be displayed in the Dashboard. If you'd like to retry on an error, you can do so using tasks and the `retry` option. + +```ts +const user = await io.runTask( + "get-user", + async () => { + return prisma.user.findUniqueOrThrow({ + where: { + id: payload.id, + }, + }); + }, + { + retry: { + limit: 3, + factor: 2, + minTimeoutInMs: 1000, + }, + } +); +``` + +See the [retry options](/sdk/io/runtask) for more information. + +## 8. Skip catching internal errors + +We will throw some errors internally to interrupt run execution so they can be resumed later. If you put a `try/catch` block in your run code and catch these errors, your job will not work correctly. You can check if an error is an internal error using [isTriggerError()](/sdk/istriggererror): + +```ts +client.defineJob({ + run: async (payload, io, context) => { + try { + // Use runTask with the "get-user" cacheKey, and return the user + const user = await io.runTask("get-user", async () => { + return prisma.user.findUniqueOrThrow({ + where: { + id: payload.id, + }, + }); + }); + } catch (error) { + if (isTriggerError(error)) throw error; + + // do something with your error here + } + }, +}); +``` + +Alternatively, you can use the [io.try()](/sdk/io/try) function: + +```ts +client.defineJob({ + run: async (payload, io, context) => { + const result = io.try( + () => { + return io.runTask("get-user", async () => { + return prisma.user.findUniqueOrThrow({ + where: { + id: payload.id, + }, + }); + }); + }, + async (error) => { + //you can return data from the error handler, + //if you wish to elegantly deal with errors + return { + success: false as const, + error, + }; + } + ); + }, +}); +``` + +## 9. Creating tasks in a loop + +If you want to create tasks in a loop, you should use `for const ... of` to ensure that the tasks are created in the correct order. + +```ts +client.defineJob({ + run: async (payload, io, context) => { + for (const user of payload.users) { + await io.runTask(`update-user-${user.id}`, async () => { + return prisma.user.update({ + where: { + id: user.id, + }, + data: { + name: user.name, + }, + }); + }); + } + }, +}); +``` + + + We don't currently support running tasks in parallel so `Promise.all` will not work correctly. + This is something on our roadmap that we hope to support soon. + + +## 10. Return data from your Job + +Anything you return from the `run` function will be automatically set as the run output and displayed in the Dashboard. + +```ts +client.defineJob({ + run: async (payload, io, context) => { + return { + success: true, + message: "Hello world", + }; + }, +}); +``` + +## Next steps + +We recommend exploring all of the below sections to fully understand how to create and run Jobs using Trigger.dev. + + + + A guide for how to run your Jobs. Triggering a test Run and Triggering your Job for real + + + + + View example Jobs / the example jobs repo. These are a great starting + point for creating your own Jobs. + + + How to use the SDK. This includes all the available Tasks, triggers and + actions you can use. + + + + Integrations make it easy to authenticate and use APIs. +Learn how to use and create integrations. + + diff --git a/docs/images/task.png b/docs/images/task.png new file mode 100644 index 0000000000000000000000000000000000000000..e45068d3f910b0cc13e54d30d6ed0cc24dbdef0a GIT binary patch literal 51335 zcmeFYbzD^2+c%5|f*>L7&>&qR-K8Lngn*Rv&?4QSAUSk5A|Ob2qf*k{C7na}FwDC- z=Xc-t@yPq<`##Sf_k3p9o4xj4YhCN=@3nTYijoW#1_%QQ2?62lL&gyS~%*;V)tX3+_g8uo86MgN?+fscwGG^L_9{968&MDNu*XNLnWF zuGYutmIRlHJ2W;Wlk!#9QwW35dl3fTP?3T^@_*3$))#nAh2%=8`IsHWmvOZ(mmuUb z$*WAdk9Q;+RYEFOYUM(>R$NPZ=|$sF?S+u!n90KVF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W)Znoz?Ig zw8<8cvt6o%LyEuD=c*ocC=hf&{`fFGPB7oM>D?(rfh#6bms5TzSRolnMv@B$JsotW zbNSxVkl0a{%yRS3^L6_=lFicCI7TxR&aUf#17J7n-W0UQw?HVg>3?xexM=ViW(_xW&gi-1pDJIXT&hz z;NV^;$;s&W9l_*(zYufozct?Y1B~JR@=K-73^y*&YQkG0_mcc0dc%yTT;b^FzjgHA zM)dePppY7WtU@t=T$b#q3t$9~#65J^HKMj{$n%NNO zRyCR1pLvEk9H1rTbFPrTkMv)Z?E|`%6p$M8=hpv`Q@nfm`3#qYPTvND1N@ZaU&xg| HGY|Pc39NDF literal 0 HcmV?d00001 diff --git a/docs/mint.json b/docs/mint.json index 8c1399778..597903b83 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -58,6 +58,14 @@ { "source": "/documentation/guides/manual", "destination": "/documentation/guides/manual/nextjs" + }, + { + "source": "/documentation/concepts/limitations", + "destination": "/documentation/concepts/limits" + }, + { + "source": "/documentation/guides/create-a-job", + "destination": "/documentation/guides/writing-jobs-step-by-step" } ], "navigation": [ @@ -86,7 +94,7 @@ "documentation/quickstarts/supabase" ] }, - "documentation/guides/create-a-job", + "documentation/guides/writing-jobs-step-by-step", "documentation/guides/video-walkthrough" ] }, @@ -94,7 +102,7 @@ "group": "Concepts", "pages": [ "documentation/concepts/what-is-triggerdotdev", - "documentation/concepts/limitations", + "documentation/concepts/limits", "documentation/concepts/projects", "documentation/concepts/client-adaptors", { @@ -301,12 +309,12 @@ "group": "IO", "pages": [ "sdk/io/overview", - "sdk/io/logger", - "sdk/io/wait", - "sdk/io/sendevent", "sdk/io/runtask", - "sdk/io/try", + "sdk/io/wait", + "sdk/io/logger", + "sdk/io/sendevent", "sdk/io/backgroundfetch", + "sdk/io/try", "sdk/io/registerinterval", "sdk/io/unregisterinterval", "sdk/io/registercron", @@ -325,7 +333,10 @@ "sdk/dynamictrigger/constructor", { "group": "Instance methods", - "pages": ["sdk/dynamictrigger/register", "sdk/dynamictrigger/unregister"] + "pages": [ + "sdk/dynamictrigger/register", + "sdk/dynamictrigger/unregister" + ] } ] }, @@ -336,7 +347,10 @@ "sdk/dynamicschedule/constructor", { "group": "Instance methods", - "pages": ["sdk/dynamicschedule/register", "sdk/dynamicschedule/unregister"] + "pages": [ + "sdk/dynamicschedule/register", + "sdk/dynamicschedule/unregister" + ] } ] }, @@ -357,7 +371,9 @@ }, { "group": "Overview", - "pages": ["examples/introduction"] + "pages": [ + "examples/introduction" + ] } ], "footerSocials": { @@ -370,4 +386,4 @@ "apiKey": "phc_hwYmedO564b3Ik8nhA4Csrb5SueY0EwFJWCbseGwWW" } } -} +} \ No newline at end of file diff --git a/docs/sdk/io/overview.mdx b/docs/sdk/io/overview.mdx index c44a34fc6..ae9058883 100644 --- a/docs/sdk/io/overview.mdx +++ b/docs/sdk/io/overview.mdx @@ -22,6 +22,10 @@ Used to send log messages to the [Run log](/documentation/guides/viewing-runs). ## Instance methods +### [runTask()](/sdk/io/runtask) + +`io.runTask()` allows you to run a [Task](/documentation/concepts/tasks) from inside a Job run. A Task is a resumable unit of a Run that can be retried, resumed and is logged. [Integrations](/integrations) use Tasks internally to perform their actions. + ### [wait()](/sdk/io/wait) Waits for a certain amount of time before continuing the Job. Delays works even if you're on a serverless platform with timeouts, or if your server goes down. They utilize [resumability](/documentation/concepts/resumability) to ensure that the Run can be resumed after the delay. @@ -32,18 +36,14 @@ Waits for a certain amount of time before continuing the Job. Delays works even If you want to send an event from outside a run (e.g. just from your backend) you can use [client.sendEvent()](/sdk/triggerclient/instancemethods/sendevent). -### [runTask()](/sdk/io/runtask) +### [backgroundFetch()](/sdk/io/backgroundfetch) -`io.runTask()` allows you to run a [Task](/documentation/concepts/tasks) from inside a Job run. A Task is a resumable unit of a Run that can be retried, resumed and is logged. [Integrations](/integrations) use Tasks internally to perform their actions. +`io.backgroundFetch()` allows you to fetch data from a URL that can take longer that the serverless timeout. The actual `fetch` request is performed on the Trigger.dev platform, and the response is sent back to you. An example use case is fetching data from a slow API, like some AI endpoints. ### [try()](/sdk/io/try) `io.try()` allows you to run Tasks and catch any errors that are thrown, it's similar to a normal `try/catch` block but works with [io.runTask()](/sdk/io/runtask). -### [backgroundFetch()](/sdk/io/backgroundfetch) - -`io.backgroundFetch()` allows you to fetch data from a URL that can take longer that the serverless timeout. The actual `fetch` request is performed on the Trigger.dev platform, and the response is sent back to you. An example use case is fetching data from a slow API, like some AI endpoints. - ### [registerInterval()](/sdk/io/registerinterval) `io.registerInterval()` allows you to register a [DynamicSchedule](/sdk/dynamicschedule) that will run on a regular interval. diff --git a/docs/sdk/io/runtask.mdx b/docs/sdk/io/runtask.mdx index 1b619e0eb..27e862e17 100644 --- a/docs/sdk/io/runtask.mdx +++ b/docs/sdk/io/runtask.mdx @@ -4,9 +4,12 @@ sidebarTitle: "runTask()" description: "Creates and runs a Task inside a Run." --- -A [Task](/documentation/concepts/tasks) is a resumable unit of a Run that can be retried, resumed and is logged. [Integrations](/integrations) use Tasks internally to perform their actions. +A [Task](/documentation/concepts/tasks) is a cached unit of work in a Job Run that are logged to the Trigger.dev UI. You can use `io.runTask()` to create and run a Task inside a Run. -The wrappers at `io.integration.runTask()` expose the underlying Integration client as the first callback parameter (see examples on the right). They will have defaults set for options and `onError` handlers, but should otherwise be considered identical to raw `io.runTask()`. + + Any interaction with an external service (database or API) should be wrapped in a Task. Failing to + do so could result in repeated work when runs are resumed. + ## Parameters @@ -159,32 +162,30 @@ If the remote callback feature `options.callback` is enabled, the Promise will i client.defineJob({ id: "alert-on-new-github-issues", name: "Alert on new GitHub issues", - version: "0.1.1", + version: "1.0.0", trigger: github.triggers.repo({ event: events.onIssueOpened, owner: "triggerdotdev", repo: "trigger.dev", }), - integrations: { - github, - }, run: async (payload, io, ctx) => { - //runTask - const response = await io.github.runTask( - "create-card", - async (client) => { - //create a project card using the underlying GitHub Integration client - return client.rest.projects.createCard({ - column_id: 123, - note: "test", + const record = await io.runTask( + "sync-github-issue", + async (task) => { + return prisma.githubIssues.create({ + data: { + number: payload.issue.number, + title: payload.issue.title, + body: payload.issue.body, + url: payload.issue.html_url, + repo: payload.repository.full_name, + owner: payload.repository.owner.login, + }, }); }, //this is optional - { name: "Create card", icon: "github" } + { name: "Sync GitHub Issue", icon: "github" } ); - - //log the url of the created card - await io.logger.info(response.data.url); }, }); ``` @@ -227,14 +228,12 @@ client.defineJob({ name: "Remote Callback example", version: "0.1.1", trigger: eventTrigger({ name: "predict" }), - integrations: { replicate }, run: async (payload, io, ctx) => { - //runTask - const prediction = await io.replicate.runTask( + const prediction = await io.runTask( "create-and-await-prediction", - async (client, task) => { - //create a prediction using the underlying Replicate Integration client - await client.predictions.create({ + async (task) => { + //create a prediction using a Replicate SDK instance + await replicate.predictions.create({ ...payload, webhook: task.callbackUrl ?? "", webhook_events_filter: ["completed"], diff --git a/packages/core/src/schemas/api.ts b/packages/core/src/schemas/api.ts index d95ebf65e..57dd99843 100644 --- a/packages/core/src/schemas/api.ts +++ b/packages/core/src/schemas/api.ts @@ -177,12 +177,14 @@ export type HttpSourceRequestHeaders = z.output; +export const AutoYieldConfigSchema = z.object({ + startTaskThreshold: z.number(), + beforeExecuteTaskThreshold: z.number(), + beforeCompleteTaskThreshold: z.number(), + afterCompleteTaskThreshold: z.number(), +}); + +export type AutoYieldConfig = z.infer; + export const RunJobBodySchema = z.object({ event: ApiEventLogSchema, job: z.object({ @@ -485,6 +497,8 @@ export const RunJobBodySchema = z.object({ noopTasksSet: z.string().optional(), connections: z.record(ConnectionAuthSchema).optional(), yieldedExecutions: z.string().array().optional(), + runChunkExecutionLimit: z.number().optional(), + autoYieldConfig: AutoYieldConfigSchema.optional(), }); export type RunJobBody = z.infer; @@ -504,6 +518,33 @@ export const RunJobYieldExecutionErrorSchema = z.object({ export type RunJobYieldExecutionError = z.infer; +export const RunJobAutoYieldExecutionErrorSchema = z.object({ + status: z.literal("AUTO_YIELD_EXECUTION"), + location: z.string(), + timeRemaining: z.number(), + timeElapsed: z.number(), + limit: z.number().optional(), +}); + +export type RunJobAutoYieldExecutionError = z.infer; + +export const RunJobAutoYieldWithCompletedTaskExecutionErrorSchema = z.object({ + status: z.literal("AUTO_YIELD_EXECUTION_WITH_COMPLETED_TASK"), + id: z.string(), + properties: z.array(DisplayPropertySchema).optional(), + output: z.any(), + data: z.object({ + location: z.string(), + timeRemaining: z.number(), + timeElapsed: z.number(), + limit: z.number().optional(), + }), +}); + +export type RunJobAutoYieldWithCompletedTaskExecutionError = z.infer< + typeof RunJobAutoYieldWithCompletedTaskExecutionErrorSchema +>; + export const RunJobInvalidPayloadErrorSchema = z.object({ status: z.literal("INVALID_PAYLOAD"), errors: z.array(SchemaErrorSchema), @@ -549,6 +590,8 @@ export const RunJobSuccessSchema = z.object({ export type RunJobSuccess = z.infer; export const RunJobResponseSchema = z.discriminatedUnion("status", [ + RunJobAutoYieldExecutionErrorSchema, + RunJobAutoYieldWithCompletedTaskExecutionErrorSchema, RunJobYieldExecutionErrorSchema, RunJobErrorSchema, RunJobUnresolvedAuthErrorSchema, diff --git a/packages/core/src/schemas/tasks.ts b/packages/core/src/schemas/tasks.ts index 559dc4bab..15744bfc2 100644 --- a/packages/core/src/schemas/tasks.ts +++ b/packages/core/src/schemas/tasks.ts @@ -37,6 +37,7 @@ export const TaskSchema = z.object({ export const ServerTaskSchema = TaskSchema.extend({ idempotencyKey: z.string(), attempts: z.number(), + forceYield: z.boolean().optional().nullable(), }); export type ServerTask = z.infer; diff --git a/packages/database/prisma/migrations/20231011104302_add_run_chunk_column/migration.sql b/packages/database/prisma/migrations/20231011104302_add_run_chunk_column/migration.sql new file mode 100644 index 000000000..3e28ece9a --- /dev/null +++ b/packages/database/prisma/migrations/20231011104302_add_run_chunk_column/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "Endpoint" ADD COLUMN "runChunkExecutionLimit" INTEGER NOT NULL DEFAULT 60; diff --git a/packages/database/prisma/migrations/20231011134840_add_auto_yielded_executions/migration.sql b/packages/database/prisma/migrations/20231011134840_add_auto_yielded_executions/migration.sql new file mode 100644 index 000000000..be62509c2 --- /dev/null +++ b/packages/database/prisma/migrations/20231011134840_add_auto_yielded_executions/migration.sql @@ -0,0 +1,14 @@ +-- CreateTable +CREATE TABLE "JobRunAutoYieldExecution" ( + "id" TEXT NOT NULL, + "runId" TEXT NOT NULL, + "timeRemaining" INTEGER NOT NULL, + "timeElapsed" INTEGER NOT NULL, + "limit" INTEGER NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "JobRunAutoYieldExecution_pkey" PRIMARY KEY ("id") +); + +-- AddForeignKey +ALTER TABLE "JobRunAutoYieldExecution" ADD CONSTRAINT "JobRunAutoYieldExecution_runId_fkey" FOREIGN KEY ("runId") REFERENCES "JobRun"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/packages/database/prisma/migrations/20231011141302_add_location_to_auto_yield_executions/migration.sql b/packages/database/prisma/migrations/20231011141302_add_location_to_auto_yield_executions/migration.sql new file mode 100644 index 000000000..f8f1775b4 --- /dev/null +++ b/packages/database/prisma/migrations/20231011141302_add_location_to_auto_yield_executions/migration.sql @@ -0,0 +1,8 @@ +/* + Warnings: + + - Added the required column `location` to the `JobRunAutoYieldExecution` table without a default value. This is not possible if the table is not empty. + +*/ +-- AlterTable +ALTER TABLE "JobRunAutoYieldExecution" ADD COLUMN "location" TEXT NOT NULL; diff --git a/packages/database/prisma/migrations/20231011145406_change_run_chunk_execution_limit_default/migration.sql b/packages/database/prisma/migrations/20231011145406_change_run_chunk_execution_limit_default/migration.sql new file mode 100644 index 000000000..bd19a6bb1 --- /dev/null +++ b/packages/database/prisma/migrations/20231011145406_change_run_chunk_execution_limit_default/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "Endpoint" ALTER COLUMN "runChunkExecutionLimit" SET DEFAULT 60000; diff --git a/packages/database/prisma/migrations/20231011213532_add_auto_yield_threshold_settings_to_endpoints/migration.sql b/packages/database/prisma/migrations/20231011213532_add_auto_yield_threshold_settings_to_endpoints/migration.sql new file mode 100644 index 000000000..260f0fcdf --- /dev/null +++ b/packages/database/prisma/migrations/20231011213532_add_auto_yield_threshold_settings_to_endpoints/migration.sql @@ -0,0 +1,5 @@ +-- AlterTable +ALTER TABLE "Endpoint" ADD COLUMN "afterCompleteTaskThreshold" INTEGER NOT NULL DEFAULT 750, +ADD COLUMN "beforeCompleteTaskThreshold" INTEGER NOT NULL DEFAULT 750, +ADD COLUMN "beforeExecuteTaskThreshold" INTEGER NOT NULL DEFAULT 1500, +ADD COLUMN "startTaskThreshold" INTEGER NOT NULL DEFAULT 750; diff --git a/packages/database/prisma/migrations/20231019123406_add_force_yield_immediately_to_runs/migration.sql b/packages/database/prisma/migrations/20231019123406_add_force_yield_immediately_to_runs/migration.sql new file mode 100644 index 000000000..4ede43f10 --- /dev/null +++ b/packages/database/prisma/migrations/20231019123406_add_force_yield_immediately_to_runs/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "JobRun" ADD COLUMN "forceYieldImmediately" BOOLEAN NOT NULL DEFAULT false; diff --git a/packages/database/prisma/migrations/20231020145127_add_sdk_version_to_endpoints/migration.sql b/packages/database/prisma/migrations/20231020145127_add_sdk_version_to_endpoints/migration.sql new file mode 100644 index 000000000..3180c6531 --- /dev/null +++ b/packages/database/prisma/migrations/20231020145127_add_sdk_version_to_endpoints/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "Endpoint" ADD COLUMN "sdkVersion" TEXT NOT NULL DEFAULT 'unknown'; diff --git a/packages/database/prisma/schema.prisma b/packages/database/prisma/schema.prisma index 7f1d21918..302be3bf8 100644 --- a/packages/database/prisma/schema.prisma +++ b/packages/database/prisma/schema.prisma @@ -368,6 +368,13 @@ model Endpoint { indexingHookIdentifier String? version String @default("unknown") + sdkVersion String @default("unknown") + + runChunkExecutionLimit Int @default(60000) + startTaskThreshold Int @default(750) + beforeExecuteTaskThreshold Int @default(1500) + beforeCompleteTaskThreshold Int @default(750) + afterCompleteTaskThreshold Int @default(750) jobVersions JobVersion[] jobRuns JobRun[] @@ -726,11 +733,14 @@ model JobRun { yieldedExecutions String[] + forceYieldImmediately Boolean @default(false) + tasks Task[] runConnections RunConnection[] missingConnections MissingConnection[] executions JobRunExecution[] statuses JobRunStatusRecord[] + autoYieldExecution JobRunAutoYieldExecution[] } enum JobRunStatus { @@ -748,6 +758,20 @@ enum JobRunStatus { INVALID_PAYLOAD } +model JobRunAutoYieldExecution { + id String @id @default(cuid()) + + run JobRun @relation(fields: [runId], references: [id], onDelete: Cascade, onUpdate: Cascade) + runId String + + timeRemaining Int + timeElapsed Int + limit Int + location String + + createdAt DateTime @default(now()) +} + model JobRunExecution { id String @id @default(cuid()) diff --git a/packages/trigger-sdk/src/errors.ts b/packages/trigger-sdk/src/errors.ts index 9e2aeec0e..d8fcf404d 100644 --- a/packages/trigger-sdk/src/errors.ts +++ b/packages/trigger-sdk/src/errors.ts @@ -1,3 +1,4 @@ +import { DisplayProperty } from "@trigger.dev/core"; import { ErrorWithStack, SchemaError, ServerTask } from "@trigger.dev/core"; export class ResumeWithTaskError { @@ -20,6 +21,23 @@ export class YieldExecutionError { constructor(public key: string) {} } +export class AutoYieldExecutionError { + constructor( + public location: string, + public timeRemaining: number, + public timeElapsed: number + ) {} +} + +export class AutoYieldWithCompletedTaskExecutionError { + constructor( + public id: string, + public properties: DisplayProperty[] | undefined, + public output: any, + public data: { location: string; timeRemaining: number; timeElapsed: number } + ) {} +} + export class ParsedPayloadSchemaError { constructor(public schemaErrors: SchemaError[]) {} } @@ -32,11 +50,19 @@ export class ParsedPayloadSchemaError { */ export function isTriggerError( err: unknown -): err is ResumeWithTaskError | RetryWithTaskError | CanceledWithTaskError { +): err is + | ResumeWithTaskError + | RetryWithTaskError + | CanceledWithTaskError + | YieldExecutionError + | AutoYieldExecutionError + | AutoYieldWithCompletedTaskExecutionError { return ( err instanceof ResumeWithTaskError || err instanceof RetryWithTaskError || err instanceof CanceledWithTaskError || - err instanceof YieldExecutionError + err instanceof YieldExecutionError || + err instanceof AutoYieldExecutionError || + err instanceof AutoYieldWithCompletedTaskExecutionError ); } diff --git a/packages/trigger-sdk/src/io.ts b/packages/trigger-sdk/src/io.ts index b4dacfc5e..de9a77531 100644 --- a/packages/trigger-sdk/src/io.ts +++ b/packages/trigger-sdk/src/io.ts @@ -23,6 +23,8 @@ import { AsyncLocalStorage } from "node:async_hooks"; import { webcrypto } from "node:crypto"; import { ApiClient } from "./apiClient"; import { + AutoYieldExecutionError, + AutoYieldWithCompletedTaskExecutionError, CanceledWithTaskError, ResumeWithTaskError, RetryWithTaskError, @@ -45,6 +47,7 @@ export type IOOptions = { apiClient: ApiClient; client: TriggerClient; context: TriggerContext; + timeOrigin: number; logger?: Logger; logLevel?: LogLevel; jobLogger?: Logger; @@ -54,6 +57,7 @@ export type IOOptions = { yieldedExecutions?: Array; noopTasksSet?: string; serverVersion?: string | null; + executionTimeout?: number; }; type JsonPrimitive = string | number | boolean | null | undefined | Date | symbol; @@ -96,6 +100,8 @@ export class IO { private _noopTasksBloomFilter: BloomFilter | undefined; private _stats: IOStats; private _serverVersion: string; + private _timeOrigin: number; + private _executionTimeout?: number; get stats() { return this._stats; @@ -109,6 +115,8 @@ export class IO { this._cachedTasks = new Map(); this._jobLogger = options.jobLogger; this._jobLogLevel = options.jobLogLevel; + this._timeOrigin = options.timeOrigin; + this._executionTimeout = options.executionTimeout; this._stats = { initialCachedTasks: 0, @@ -205,11 +213,11 @@ export class IO { } /** `io.wait()` waits for the specified amount of time before continuing the Job. Delays work even if you're on a serverless platform with timeouts, or if your server goes down. They utilize [resumability](https://trigger.dev/docs/documentation/concepts/resumability) to ensure that the Run can be resumed after the delay. - * @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. + * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. * @param seconds The number of seconds to wait. This can be very long, serverless timeouts are not an issue. */ - async wait(key: string | any[], seconds: number) { - return await this.runTask(key, async (task) => {}, { + async wait(cacheKey: string | any[], seconds: number) { + return await this.runTask(cacheKey, async (task) => {}, { name: "wait", icon: "clock", params: { seconds }, @@ -220,7 +228,7 @@ export class IO { } /** `io.createStatus()` allows you to set a status with associated data during the Run. Statuses can be used by your UI using the react package - * @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. + * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. * @param initialStatus The initial status you want this status to have. You can update it during the rub using the returned object. * @returns a TriggerStatus object that you can call `update()` on, to update the status. * @example @@ -252,17 +260,17 @@ export class IO { * ``` */ async createStatus( - key: IntegrationTaskKey, + cacheKey: IntegrationTaskKey, initialStatus: InitialStatusUpdate ): Promise { - const id = typeof key === "string" ? key : key.join("-"); + const id = typeof cacheKey === "string" ? cacheKey : cacheKey.join("-"); const status = new TriggerStatus(id, this); - await status.update(key, initialStatus); + await status.update(cacheKey, initialStatus); return status; } /** `io.backgroundFetch()` fetches data from a URL that can take longer that the serverless timeout. The actual `fetch` request is performed on the Trigger.dev platform, and the response is sent back to you. - * @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. + * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. * @param url The URL to fetch from. * @param requestInit The options for the request * @param retry The options for retrying the request if it fails @@ -273,7 +281,7 @@ export class IO { * - Wildcards: 2xx, 3xx, 4xx, 5xx */ async backgroundFetch( - key: string | any[], + cacheKey: string | any[], url: string, requestInit?: FetchRequestInit, retry?: FetchRetryOptions @@ -281,7 +289,7 @@ export class IO { const urlObject = new URL(url); return (await this.runTask( - key, + cacheKey, async (task) => { return task.output; }, @@ -311,13 +319,13 @@ export class IO { } /** `io.sendEvent()` allows you to send an event from inside a Job run. The sent even will trigger any Jobs that are listening for that event (based on the name). - * @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. + * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. * @param event The event to send. The event name must match the name of the event that your Jobs are listening for. * @param options Options for sending the event. */ - async sendEvent(key: string | any[], event: SendEvent, options?: SendEventOptions) { + async sendEvent(cacheKey: string | any[], event: SendEvent, options?: SendEventOptions) { return await this.runTask( - key, + cacheKey, async (task) => { return await this._triggerClient.sendEvent(event, options); }, @@ -335,9 +343,9 @@ export class IO { ); } - async getEvent(key: string | any[], id: string) { + async getEvent(cacheKey: string | any[], id: string) { return await this.runTask( - key, + cacheKey, async (task) => { return await this._triggerClient.getEvent(id); }, @@ -355,13 +363,13 @@ export class IO { } /** `io.cancelEvent()` allows you to cancel an event that was previously sent with `io.sendEvent()`. This will prevent any Jobs from running that are listening for that event if the event was sent with a delay - * @param key + * @param cacheKey * @param eventId * @returns */ - async cancelEvent(key: string | any[], eventId: string) { + async cancelEvent(cacheKey: string | any[], eventId: string) { return await this.runTask( - key, + cacheKey, async (task) => { return await this._triggerClient.cancelEvent(eventId); }, @@ -380,9 +388,12 @@ export class IO { ); } - async updateSource(key: string | any[], options: { key: string } & UpdateTriggerSourceBodyV2) { + async updateSource( + cacheKey: string | any[], + options: { key: string } & UpdateTriggerSourceBodyV2 + ) { return this.runTask( - key, + cacheKey, async (task) => { return await this._apiClient.updateSource(this._triggerClient.id, options.key, options); }, @@ -404,7 +415,7 @@ export class IO { } /** `io.registerInterval()` allows you to register a [DynamicSchedule](https://trigger.dev/docs/sdk/dynamicschedule) that will trigger any jobs it's attached to on a regular interval. - * @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. + * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. * @param dynamicSchedule The [DynamicSchedule](https://trigger.dev/docs/sdk/dynamicschedule) to register a new schedule on. * @param id A unique id for the interval. This is used to identify and unregister the interval later. * @param options The options for the interval. @@ -412,13 +423,13 @@ export class IO { * @deprecated Use `DynamicSchedule.register` instead. */ async registerInterval( - key: string | any[], + cacheKey: string | any[], dynamicSchedule: DynamicSchedule, id: string, options: IntervalOptions ) { return await this.runTask( - key, + cacheKey, async (task) => { return dynamicSchedule.register(id, { type: "interval", @@ -438,14 +449,14 @@ export class IO { } /** `io.unregisterInterval()` allows you to unregister a [DynamicSchedule](https://trigger.dev/docs/sdk/dynamicschedule) that was previously registered with `io.registerInterval()`. - * @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. + * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. * @param dynamicSchedule The [DynamicSchedule](https://trigger.dev/docs/sdk/dynamicschedule) to unregister a schedule on. * @param id A unique id for the interval. This is used to identify and unregister the interval later. * @deprecated Use `DynamicSchedule.unregister` instead. */ - async unregisterInterval(key: string | any[], dynamicSchedule: DynamicSchedule, id: string) { + async unregisterInterval(cacheKey: string | any[], dynamicSchedule: DynamicSchedule, id: string) { return await this.runTask( - key, + cacheKey, async (task) => { return dynamicSchedule.unregister(id); }, @@ -460,20 +471,20 @@ export class IO { } /** `io.registerCron()` allows you to register a [DynamicSchedule](https://trigger.dev/docs/sdk/dynamicschedule) that will trigger any jobs it's attached to on a regular CRON schedule. - * @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. + * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. * @param dynamicSchedule The [DynamicSchedule](https://trigger.dev/docs/sdk/dynamicschedule) to register a new schedule on. * @param id A unique id for the schedule. This is used to identify and unregister the schedule later. * @param options The options for the CRON schedule. * @deprecated Use `DynamicSchedule.register` instead. */ async registerCron( - key: string | any[], + cacheKey: string | any[], dynamicSchedule: DynamicSchedule, id: string, options: CronOptions ) { return await this.runTask( - key, + cacheKey, async (task) => { return dynamicSchedule.register(id, { type: "cron", @@ -493,14 +504,14 @@ export class IO { } /** `io.unregisterCron()` allows you to unregister a [DynamicSchedule](https://trigger.dev/docs/sdk/dynamicschedule) that was previously registered with `io.registerCron()`. - * @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. + * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. * @param dynamicSchedule The [DynamicSchedule](https://trigger.dev/docs/sdk/dynamicschedule) to unregister a schedule on. * @param id A unique id for the interval. This is used to identify and unregister the interval later. * @deprecated Use `DynamicSchedule.unregister` instead. */ - async unregisterCron(key: string | any[], dynamicSchedule: DynamicSchedule, id: string) { + async unregisterCron(cacheKey: string | any[], dynamicSchedule: DynamicSchedule, id: string) { return await this.runTask( - key, + cacheKey, async (task) => { return dynamicSchedule.unregister(id); }, @@ -515,7 +526,7 @@ export class IO { } /** `io.registerTrigger()` allows you to register a [DynamicTrigger](https://trigger.dev/docs/sdk/dynamictrigger) with the specified trigger params. - * @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. + * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. * @param trigger The [DynamicTrigger](https://trigger.dev/docs/sdk/dynamictrigger) to register. * @param id A unique id for the trigger. This is used to identify and unregister the trigger later. * @param params The params for the trigger. @@ -524,13 +535,13 @@ export class IO { async registerTrigger< TTrigger extends DynamicTrigger, ExternalSource>, >( - key: string | any[], + cacheKey: string | any[], trigger: TTrigger, id: string, params: ExternalSourceParams ): Promise<{ id: string; key: string } | undefined> { return await this.runTask( - key, + cacheKey, async (task) => { const registration = await this.runTask( "register-source", @@ -558,13 +569,13 @@ export class IO { ); } - async getAuth(key: string | any[], clientId?: string): Promise { + async getAuth(cacheKey: string | any[], clientId?: string): Promise { if (!clientId) { return; } return this.runTask( - key, + cacheKey, async (task) => { return await this._triggerClient.getAuth(clientId); }, @@ -574,29 +585,33 @@ export class IO { /** `io.runTask()` allows you to run a [Task](https://trigger.dev/docs/documentation/concepts/tasks) from inside a Job run. A Task is a resumable unit of a Run that can be retried, resumed and is logged. [Integrations](https://trigger.dev/docs/integrations) use Tasks internally to perform their actions. * - * @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. + * @param cacheKey Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information. * @param callback The callback that will be called when the Task is run. The callback receives the Task and the IO as parameters. * @param options The options of how you'd like to run and log the Task. * @param onError The callback that will be called when the Task fails. The callback receives the error, the Task and the IO as parameters. If you wish to retry then return an object with a `retryAt` property. * @returns A Promise that resolves with the returned value of the callback. */ async runTask | void>( - key: string | any[], + cacheKey: string | any[], callback: (task: ServerTask, io: IO) => Promise, options?: RunTaskOptions, onError?: RunTaskErrorCallback ): Promise { + this.#detectAutoYield("start_task", 500); + const parentId = this._taskStorage.getStore()?.taskId; if (parentId) { this._logger.debug("Using parent task", { parentId, - key, + cacheKey, options, }); } - const idempotencyKey = await generateIdempotencyKey([this._id, parentId ?? "", key].flat()); + const idempotencyKey = await generateIdempotencyKey( + [this._id, parentId ?? "", cacheKey].flat() + ); const cachedTask = this._cachedTasks.get(idempotencyKey); @@ -626,7 +641,7 @@ export class IO { this._id, { idempotencyKey, - displayKey: typeof key === "string" ? key : undefined, + displayKey: typeof cacheKey === "string" ? cacheKey : undefined, noop: false, ...(options ?? {}), parentId, @@ -641,6 +656,14 @@ export class IO { ? response.body.task : response.body; + if (task.forceYield) { + this._logger.debug("Forcing yield after run task", { + idempotencyKey, + }); + + this.#forceYield("after_run_task"); + } + if (response.version === API_VERSIONS.LAZY_LOADED_CACHED_TASKS) { this._cachedTasksCursor = response.body.cachedTasks?.cursor; @@ -694,6 +717,8 @@ export class IO { throw new Error(task.error ?? task?.output ? JSON.stringify(task.output) : "Task errored"); } + this.#detectAutoYield("before_execute_task", 1500); + const executeTask = async () => { try { const result = await callback(task, this); @@ -713,17 +738,29 @@ export class IO { task, }); + this.#detectAutoYield("before_complete_task", 500, task, output); + const completedTask = await this._apiClient.completeTask(this._id, task.id, { output: output ?? undefined, properties: task.outputProperties ?? undefined, }); + if (completedTask.forceYield) { + this._logger.debug("Forcing yield after task completed", { + idempotencyKey, + }); + + this.#forceYield("after_complete_task"); + } + this._stats.executedTasks++; if (completedTask.status === "CANCELED") { throw new CanceledWithTaskError(completedTask); } + this.#detectAutoYield("after_complete_task", 500); + return output; } catch (error) { if (isTriggerError(error)) { @@ -818,7 +855,7 @@ export class IO { /** * `io.yield()` allows you to yield execution of the current run and resume it in a new function execution. Similar to `io.wait()` but does not create a task and resumes execution immediately. */ - yield(key: string) { + yield(cacheKey: string) { if (!supportsFeature("yieldExecution", this._serverVersion)) { console.warn( "[trigger.dev] io.yield() is not support by the version of the Trigger.dev server you are using, you will need to upgrade your self-hosted Trigger.dev instance." @@ -827,11 +864,11 @@ export class IO { return; } - if (this._yieldedExecutions.includes(key)) { + if (this._yieldedExecutions.includes(cacheKey)) { return; } - throw new YieldExecutionError(key); + throw new YieldExecutionError(cacheKey); } /** @@ -863,6 +900,47 @@ export class IO { #addToCachedTasks(task: ServerTask) { this._cachedTasks.set(task.idempotencyKey, task); } + + #detectAutoYield(location: string, threshold: number = 1500, task?: ServerTask, output?: any) { + const timeRemaining = this.#getRemainingTimeInMillis(); + + if (timeRemaining && timeRemaining < threshold) { + if (task) { + throw new AutoYieldWithCompletedTaskExecutionError( + task.id, + task.outputProperties ?? [], + output, + { + location, + timeRemaining, + timeElapsed: this.#getTimeElapsed(), + } + ); + } else { + throw new AutoYieldExecutionError(location, timeRemaining, this.#getTimeElapsed()); + } + } + } + + #forceYield(location: string) { + const timeRemaining = this.#getRemainingTimeInMillis(); + + if (timeRemaining) { + throw new AutoYieldExecutionError(location, timeRemaining, this.#getTimeElapsed()); + } + } + + #getTimeElapsed() { + return performance.now() - this._timeOrigin; + } + + #getRemainingTimeInMillis() { + if (this._executionTimeout) { + return this._executionTimeout - (performance.now() - this._timeOrigin); + } + + return undefined; + } } // Generate a stable idempotency key for the key material, using a stable json stringification diff --git a/packages/trigger-sdk/src/triggerClient.ts b/packages/trigger-sdk/src/triggerClient.ts index b1766f164..bbb5e8b21 100644 --- a/packages/trigger-sdk/src/triggerClient.ts +++ b/packages/trigger-sdk/src/triggerClient.ts @@ -33,6 +33,8 @@ import { } from "@trigger.dev/core"; import { ApiClient } from "./apiClient"; import { + AutoYieldExecutionError, + AutoYieldWithCompletedTaskExecutionError, CanceledWithTaskError, ParsedPayloadSchemaError, ResumeWithTaskError, @@ -63,6 +65,8 @@ const registerSourceEvent: EventSpecification = { parsePayload: RegisterSourceEventSchemaV2.parse, }; +import * as packageJson from "../package.json"; + export type TriggerClientOptions = { /** The `id` property is used to uniquely identify the client. */ @@ -132,7 +136,10 @@ export class TriggerClient { ]); } - async handleRequest(request: Request): Promise { + async handleRequest( + request: Request, + timeOrigin: number = performance.now() + ): Promise { this.#internalLogger.debug("handling request", { url: request.url, headers: Object.fromEntries(request.headers.entries()), @@ -154,7 +161,7 @@ export class TriggerClient { body: { message: "Unauthorized: client missing apiKey", }, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } case "missing-header": { @@ -163,7 +170,7 @@ export class TriggerClient { body: { message: "Unauthorized: missing x-trigger-api-key header", }, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } case "unauthorized": { @@ -172,7 +179,7 @@ export class TriggerClient { body: { message: `Forbidden: client apiKey mismatch: Make sure you are using the correct API Key for your environment`, }, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } } @@ -183,7 +190,7 @@ export class TriggerClient { body: { message: "Method not allowed (only POST is allowed)", }, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } @@ -195,7 +202,7 @@ export class TriggerClient { body: { message: "Missing x-trigger-action header", }, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } @@ -210,7 +217,7 @@ export class TriggerClient { ok: false, error: "Missing endpoint ID", }, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } @@ -221,7 +228,7 @@ export class TriggerClient { ok: false, error: `Endpoint ID mismatch error. Expected ${this.id}, got ${endpointId}`, }, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } @@ -230,7 +237,7 @@ export class TriggerClient { body: { ok: true, }, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } case "INDEX_ENDPOINT": { @@ -255,7 +262,7 @@ export class TriggerClient { return { status: 200, body, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } case "INITIALIZE_TRIGGER": { @@ -285,7 +292,7 @@ export class TriggerClient { return { status: 200, body: dynamicTrigger.registeredTriggerForParams(body.data.params), - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } case "EXECUTE_JOB": { @@ -312,12 +319,12 @@ export class TriggerClient { }; } - const results = await this.#executeJob(execution.data, job, triggerVersion); + const results = await this.#executeJob(execution.data, job, timeOrigin, triggerVersion); return { status: 200, body: results, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } case "PREPROCESS_RUN": { @@ -352,7 +359,7 @@ export class TriggerClient { abort: results.abort, properties: results.properties, }, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } case "DELIVER_HTTP_SOURCE_REQUEST": { @@ -418,7 +425,7 @@ export class TriggerClient { response, metadata, }, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } case "VALIDATE": { @@ -428,7 +435,22 @@ export class TriggerClient { ok: true, endpointId: this.id, }, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), + }; + } + case "PROBE_EXECUTION_TIMEOUT": { + const json = await request.json(); + // Keep this request open for max 15 minutes so the server can detect when the function execution limit is exceeded + const timeout = json?.timeout ?? 15 * 60 * 1000; + + await new Promise((resolve) => setTimeout(resolve, timeout)); + + return { + status: 200, + body: { + ok: true, + }, + headers: this.#standardResponseHeaders(timeOrigin), }; } } @@ -438,7 +460,7 @@ export class TriggerClient { body: { message: "Method not allowed", }, - headers: this.#standardResponseHeaders, + headers: this.#standardResponseHeaders(timeOrigin), }; } @@ -690,6 +712,7 @@ export class TriggerClient { async #executeJob( body: RunJobBody, job: Job, Record>, + timeOrigin: number, triggerVersion: string | null ): Promise { this.#internalLogger.debug("executing job", { @@ -716,6 +739,8 @@ export class TriggerClient { ? new Logger(job.id, job.logLevel ?? this.#options.logLevel ?? "info") : undefined, serverVersion: triggerVersion, + timeOrigin, + executionTimeout: body.runChunkExecutionLimit, }); const resolvedConnections = await this.#resolveConnections( @@ -756,6 +781,29 @@ export class TriggerClient { this.#logIOStats(io.stats); } + if (error instanceof AutoYieldExecutionError) { + return { + status: "AUTO_YIELD_EXECUTION", + location: error.location, + timeRemaining: error.timeRemaining, + timeElapsed: error.timeElapsed, + limit: body.runChunkExecutionLimit, + }; + } + + if (error instanceof AutoYieldWithCompletedTaskExecutionError) { + return { + status: "AUTO_YIELD_EXECUTION_WITH_COMPLETED_TASK", + id: error.id, + properties: error.properties, + output: error.output, + data: { + ...error.data, + limit: body.runChunkExecutionLimit, + }, + }; + } + if (error instanceof YieldExecutionError) { return { status: "YIELD_EXECUTION", key: error.key }; } @@ -1158,9 +1206,11 @@ export class TriggerClient { }); } - get #standardResponseHeaders() { + #standardResponseHeaders(start: number) { return { "Trigger-Version": API_VERSIONS.LAZY_LOADED_CACHED_TASKS, + "Trigger-SDK-Version": packageJson.version, + "X-Trigger-Request-Timing": `dur=${performance.now() - start / 1000.0}`, }; } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 870043aab..6d4c913c4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -65,7 +65,6 @@ importers: '@codemirror/view': ^6.5.0 '@conform-to/react': ^0.6.1 '@conform-to/zod': ^0.6.1 - '@godaddy/terminus': ^4.12.1 '@headlessui/react': ^1.7.8 '@heroicons/react': ^2.0.12 '@highlight-run/node': ^3.1.0 @@ -211,7 +210,6 @@ importers: '@codemirror/view': 6.7.2 '@conform-to/react': 0.6.1_react@18.2.0 '@conform-to/zod': 0.6.1_zod@3.22.3 - '@godaddy/terminus': 4.12.1 '@headlessui/react': 1.7.8_biqbaboplfbrettd7655fr4n2y '@heroicons/react': 2.0.13_react@18.2.0 '@highlight-run/node': 3.1.0 @@ -6906,12 +6904,6 @@ packages: resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} dev: true - /@godaddy/terminus/4.12.1: - resolution: {integrity: sha512-Tm+wVu1/V37uZXcT7xOhzdpFoovQReErff8x3y82k6YyWa1gzxWBjTyrx4G2enjEqoXPnUUmJ3MOmwH+TiP6Sw==} - dependencies: - stoppable: 1.1.0 - dev: false - /@graphile/logger/0.2.0: resolution: {integrity: sha512-jjcWBokl9eb1gVJ85QmoaQ73CQ52xAaOCF29ukRbYNl6lY+ts0ErTaDYOBlejcbUs2OpaiqYLO5uDhyLFzWw4w==} dev: false @@ -18795,7 +18787,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.59.6_eslint@8.42.0 + '@typescript-eslint/parser': 5.59.6_binxsscxvozjxebftqdoazsxm4 debug: 3.2.7 eslint: 8.42.0 eslint-import-resolver-node: 0.3.7 @@ -18880,7 +18872,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.59.6_eslint@8.42.0 + '@typescript-eslint/parser': 5.59.6_binxsscxvozjxebftqdoazsxm4 array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 @@ -28918,11 +28910,6 @@ packages: dependencies: bl: 5.1.0 - /stoppable/1.1.0: - resolution: {integrity: sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==} - engines: {node: '>=4', npm: '>=6'} - dev: false - /store2/2.14.2: resolution: {integrity: sha512-siT1RiqlfQnGqgT/YzXVUNsom9S0H1OX+dpdGN1xkyYATo4I6sep5NmsRD/40s3IIOvlCq6akxkqG82urIZW1w==} dev: true diff --git a/references/job-catalog/package.json b/references/job-catalog/package.json index 0fcca5422..0059ee0e2 100644 --- a/references/job-catalog/package.json +++ b/references/job-catalog/package.json @@ -27,6 +27,7 @@ "redacted": "nodemon --watch src/redacted.ts -r tsconfig-paths/register -r dotenv/config src/redacted.ts", "replicate": "nodemon --watch src/replicate.ts -r tsconfig-paths/register -r dotenv/config src/replicate.ts", "misconfigured": "nodemon --watch src/misconfigured.ts -r tsconfig-paths/register -r dotenv/config src/misconfigured.ts", + "auto-yield": "nodemon --watch src/auto-yield.ts -r tsconfig-paths/register -r dotenv/config src/auto-yield.ts", "dev:trigger": "trigger-cli dev --port 8080" }, "dependencies": { @@ -61,4 +62,4 @@ "ts-node": "^10.9.1", "tsconfig-paths": "^3.14.1" } -} +} \ No newline at end of file diff --git a/references/job-catalog/src/auto-yield.ts b/references/job-catalog/src/auto-yield.ts new file mode 100644 index 000000000..b097979af --- /dev/null +++ b/references/job-catalog/src/auto-yield.ts @@ -0,0 +1,83 @@ +import { createExpressServer } from "@trigger.dev/express"; +import { TriggerClient, eventTrigger } from "@trigger.dev/sdk"; + +export const client = new TriggerClient({ + id: "job-catalog", + apiKey: process.env["TRIGGER_API_KEY"], + apiUrl: process.env["TRIGGER_API_URL"], + verbose: true, + ioLogLocalEnabled: true, +}); + +client.defineJob({ + id: "auto-yield-1", + name: "Auto Yield 1", + version: "1.0.0", + trigger: eventTrigger({ + name: "auto.yield.1", + }), + run: async (payload, io, ctx) => { + await io.runTask("initial-long-task", async (task) => { + await new Promise((resolve) => setTimeout(resolve, 51000)); // 51 seconds + + return { + message: "initial-long-task", + }; + }); + + for (let i = 0; i < payload.iterations; i++) { + await io.runTask(`task.${i}`, async (task) => { + // Create a random number between 250 and 1250 + const random = Math.floor(Math.random() * 1000) + 250; + + await new Promise((resolve) => setTimeout(resolve, random)); + + await fetch(payload.url, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + message: `task.${i}`, + random, + idempotencyKey: task.idempotencyKey, + runId: ctx.run.id, + }), + }); + + return { + message: `task.${i}`, + random, + }; + }); + } + }, +}); + +client.defineJob({ + id: "auto-yield-2", + name: "Auto Yield 2", + version: "1.0.0", + trigger: eventTrigger({ + name: "auto.yield.2", + }), + run: async (payload, io, ctx) => { + await io.runTask("long-task-1", async (task) => { + await new Promise((resolve) => setTimeout(resolve, 10000)); + + return { + message: "long-task-1", + }; + }); + + await io.runTask("long-task-2", async (task) => { + await new Promise((resolve) => setTimeout(resolve, 10000)); + + return { + message: "long-task-2", + }; + }); + }, +}); + +createExpressServer(client); From 7ef61222ed2f83fac6b74e97ef2fd5e7acf02373 Mon Sep 17 00:00:00 2001 From: dhselar1423 Date: Fri, 20 Oct 2023 22:26:38 +0530 Subject: [PATCH 16/19] slack editing --- docs/integrations/apis/slack.mdx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/integrations/apis/slack.mdx b/docs/integrations/apis/slack.mdx index 23aedd31d..218d3861d 100644 --- a/docs/integrations/apis/slack.mdx +++ b/docs/integrations/apis/slack.mdx @@ -5,8 +5,11 @@ sidebarTitle: Overview & authentication ## Overview -The Slack platform allows you to extend and automate your workspaces to cultivate conversation, inspire action, and synergize services. +Our Slack integration provides a powerful way to streamline communication and workflows within your organization, making it easier to stay informed, collaborate efficiently, and automate routine tasks. +You can tailor triggers and tasks to your specific needs, ensuring that your team and processes are more productive and responsive. + +For examples of some of the things you can do with it, check out our Jobs Showcase: Date: Fri, 20 Oct 2023 23:11:41 +0530 Subject: [PATCH 17/19] slack fixes --- docs/integrations/apis/slack-tasks.mdx | 24 +++++++++++++++++++++++- docs/integrations/apis/slack.mdx | 2 +- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/integrations/apis/slack-tasks.mdx b/docs/integrations/apis/slack-tasks.mdx index a23f8b2eb..04ebd85f6 100644 --- a/docs/integrations/apis/slack-tasks.mdx +++ b/docs/integrations/apis/slack-tasks.mdx @@ -17,10 +17,32 @@ Post a message to a channel. [Official Slack Docs](https://api.slack.com/methods // Send a Slack message using the io.slack.postMessage function const response = await io.slack.postMessage("post message", { // Specify the target channel by providing its ID - channel: "C04GWUTDC3W", + channel: "< your-channel-id >", // Set the text content of the message text: "My first Slack message", }); ``` +## Example Usage + +```ts +client.defineJob({ + id: "slack-test", + name: "Slack test", + version: "0.0.1", + trigger: eventTrigger({ + name: "slack.test", + schema: z.object({}), + }), + integrations: { + slack, + }, + run: async (payload, io, ctx) => { + const response = await io.slack.postMessage("post message", { + channel: "C04GWUTDC3W", + text: "My first Slack message", + }); + }, +}); +``` diff --git a/docs/integrations/apis/slack.mdx b/docs/integrations/apis/slack.mdx index 218d3861d..8b0102022 100644 --- a/docs/integrations/apis/slack.mdx +++ b/docs/integrations/apis/slack.mdx @@ -43,7 +43,7 @@ Slack supports OAuth ## OAuth -To use OAuth you can connect to Slack via the Trigger.dev [web app](https://cloud.trigger.dev). Click 'Integrations' in the side panel of any project, and configure Slack with the ID you want to use in your job and the required [scopes](https://api.slack.com/legacy/oauth-scopes). +To use OAuth you can connect to Slack via the Trigger.dev [web app](https://cloud.trigger.dev). Click 'Integrations' in the side panel of any project, and configure Slack with the ID you want to use in your job and the required [scopes](https://api.slack.com/scopes). ```ts import { Slack } from "@trigger.dev/slack"; From 01fc1c6634e54d25b60d879e0f20fd3dc71e7574 Mon Sep 17 00:00:00 2001 From: D-K-P Date: Mon, 23 Oct 2023 12:17:29 +0100 Subject: [PATCH 18/19] Slack integration docs copy updates --- docs/integrations/apis/slack-tasks.mdx | 60 +++++++++++++++++++++----- docs/integrations/apis/slack.mdx | 14 +++--- 2 files changed, 56 insertions(+), 18 deletions(-) diff --git a/docs/integrations/apis/slack-tasks.mdx b/docs/integrations/apis/slack-tasks.mdx index 04ebd85f6..863dc4a04 100644 --- a/docs/integrations/apis/slack-tasks.mdx +++ b/docs/integrations/apis/slack-tasks.mdx @@ -15,23 +15,23 @@ Post a message to a channel. [Official Slack Docs](https://api.slack.com/methods ```ts example.ts // Send a Slack message using the io.slack.postMessage function -const response = await io.slack.postMessage("post message", { +await io.slack.postMessage("post message", { // Specify the target channel by providing its ID - channel: "< your-channel-id >", + channel: "", // Set the text content of the message - text: "My first Slack message", + text: "", }); - ``` + ## Example Usage ```ts client.defineJob({ - id: "slack-test", - name: "Slack test", - version: "0.0.1", + id: "send-slack-message", + name: "Send a Slack message", + version: "1.0.0", trigger: eventTrigger({ - name: "slack.test", + name: "send.slack.message", schema: z.object({}), }), integrations: { @@ -39,10 +39,50 @@ client.defineJob({ }, run: async (payload, io, ctx) => { const response = await io.slack.postMessage("post message", { - channel: "C04GWUTDC3W", - text: "My first Slack message", + channel: "", + text: "", }); }, }); ``` +## How to post rich messages to Slack + +Use their [Block kit builder](https://api.slack.com/block-kit), and then use the `blocks` property to send the message. + +To see this in action, check out our 'Daily Slack alert for Linear issues' [example job](https://trigger.dev/showcase/jobs/linearIssuesDailySlackAlert). + +```ts linearIssuesDailySlackAlert.ts +... +await io.slack.postMessage("post message", { + channel: process.env.SLACK_CHANNEL_ID!, + // Include text for notifications and blocks to get a rich Slack message in the channel + text: `You have ${inProgressIssues.nodes.length} 'In Progress' issues in Linear!`, + // Create rich Slack messages with the Block Kit builder https://app.slack.com/block-kit-builder/ + blocks: inProgressIssues.nodes.flatMap((issue) => [ + { + type: "section", + text: { + type: "mrkdwn", + text: `โณ *${issue.title}*`, + }, + accessory: { + type: "button", + text: { + type: "plain_text", + text: "View issue", + emoji: true, + }, + value: "click_me_123", + url: issue.url, + action_id: "button-action", + }, + }, + { + type: "divider", + }, + ]), + }); + }, +}); +``` diff --git a/docs/integrations/apis/slack.mdx b/docs/integrations/apis/slack.mdx index 8b0102022..93e98d3c5 100644 --- a/docs/integrations/apis/slack.mdx +++ b/docs/integrations/apis/slack.mdx @@ -5,11 +5,9 @@ sidebarTitle: Overview & authentication ## Overview -Our Slack integration provides a powerful way to streamline communication and workflows within your organization, making it easier to stay informed, collaborate efficiently, and automate routine tasks. +Our Slack integration allows you to connect to the Slack API and post messages to Slack. -You can tailor triggers and tasks to your specific needs, ensuring that your team and processes are more productive and responsive. - -For examples of some of the things you can do with it, check out our Jobs Showcase: +For examples of some of the things you can do with Slack, check out our Jobs Showcase: - Perform tasks such as posting message to a channel. + Perform tasks such as posting messages to a channel. - From 627c767c644fb08315532762dedeac89d58867f2 Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Mon, 23 Oct 2023 15:24:35 +0100 Subject: [PATCH 19/19] fix: fix trigger sources getting repeatedly registered MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes a bug where trigger sources would get re-registered on every index, no matter if they were already properly registered or not. This was causing a lot of extra โ€œinternalโ€ runs and being overly chatty with client endpoints --- .../app/components/primitives/NamedIcon.tsx | 4 +- .../sources/registerSourceV2.server.ts | 52 +++++++++++++++---- 2 files changed, 46 insertions(+), 10 deletions(-) diff --git a/apps/webapp/app/components/primitives/NamedIcon.tsx b/apps/webapp/app/components/primitives/NamedIcon.tsx index e0b7a5c0a..523fade79 100644 --- a/apps/webapp/app/components/primitives/NamedIcon.tsx +++ b/apps/webapp/app/components/primitives/NamedIcon.tsx @@ -223,7 +223,9 @@ export function NamedIcon({ return ; } - console.log(`Icon ${name} not found`); + if (name === "supabase-management") { + return ; + } if (fallback) { return fallback; diff --git a/apps/webapp/app/services/sources/registerSourceV2.server.ts b/apps/webapp/app/services/sources/registerSourceV2.server.ts index 4b6bea252..f13e435ef 100644 --- a/apps/webapp/app/services/sources/registerSourceV2.server.ts +++ b/apps/webapp/app/services/sources/registerSourceV2.server.ts @@ -6,6 +6,7 @@ import type { AuthenticatedEnvironment } from "../apiAuth.server"; import { workerQueue } from "../worker.server"; import { generateSecret } from "./utils.server"; import { ExtendedEndpoint, findEndpoint } from "~/models/endpoint.server"; +import { logger } from "../logger.server"; export class RegisterSourceServiceV2 { #prismaClient: PrismaClientOrTransaction; @@ -211,16 +212,22 @@ export class RegisterSourceServiceV2 { // Collect the options that are no longer being used so we can remove them const newOptions = metadata.options; - const orphanedOptions: Record = {}; - for (const event of triggerSource.options) { - const values = newOptions[event.name]; - if (values === undefined) { - orphanedOptions[event.name] = [event.value]; + const orphanedOptions: Record> = {}; + for (const option of triggerSource.options) { + const newValues = newOptions[option.name]; + + // initialize the set + if (!orphanedOptions[option.name]) { + orphanedOptions[option.name] = new Set(); + } + + if (newValues === undefined) { + orphanedOptions[option.name] = new Set([...orphanedOptions[option.name], option.value]); continue; } - if (values!.includes(event.value)) { - orphanedOptions[event.name] = [...values, event.value]; + if (!newValues.includes(option.value)) { + orphanedOptions[option.name] = new Set([...orphanedOptions[option.name], option.value]); } } @@ -250,9 +257,26 @@ export class RegisterSourceServiceV2 { }); } + // Delete the orphaned options + for (const [name, values] of Object.entries(orphanedOptions)) { + for (const value of values) { + await tx.triggerSourceOption.delete({ + where: { + name_value_sourceId: { + name, + value, + sourceId: triggerSource.id, + }, + }, + }); + } + } + return { id: triggerSource.id, - orphanedOptions, + orphanedOptions: Object.fromEntries( + Object.entries(orphanedOptions).map(([name, values]) => [name, Array.from(values)]) + ), }; }, { timeout: 15000 } @@ -284,9 +308,19 @@ export class RegisterSourceServiceV2 { } const triggerIsActive = triggerSource.active; - const triggerHasOrphanedEvents = Object.keys(orphanedOptions).length > 0; + const triggerHasOrphanedEvents = Object.values(orphanedOptions).some( + (values) => values.length > 0 + ); const triggerHasUnregisteredEvents = triggerSource.options.some((option) => !option.registered); + logger.debug("Deciding whether to activate source", { + triggerIsActive, + triggerHasOrphanedEvents, + triggerHasUnregisteredEvents, + orphanedOptions, + options: triggerSource.options, + }); + if (!triggerIsActive || triggerHasOrphanedEvents || triggerHasUnregisteredEvents) { // We need to re-activate the source, and there could be orphaned events await workerQueue.enqueue("activateSource", {