Compare commits

...

724 Commits

Author SHA1 Message Date
Eric Allam ebe78017ef Update pnpm lock file after package release merge 2023-10-13 13:21:52 +01:00
github-actions[bot] b697a19954 chore: Update version for release (#579)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-13 13:21:10 +01:00
Eric Allam 29ca09e42d Fixes #611: intervalTriggers of >10 never starting
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 6s
🚀 Publish Trigger.dev Docker / units (push) Failing after 21s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-10-13 09:38:25 +01:00
Eric Allam 375b788ab0 Add row locking with FOR UPDATE in delete query 2023-10-13 09:23:05 +01:00
Matt Aitken d6b44d13f7 Show magic link errors in the UI, switch to useNavigation hook, and return using the authenticator 2023-10-12 18:15:46 +01:00
Matt Aitken c6784ba7b8 Added logging when the magic link authentication function is called 2023-10-12 18:12:26 +01:00
James Ritchie 6b8b1c7cae Added data-action tracking to all the login buttons 2023-10-12 17:38:37 +01:00
Eric Allam 0c20756624 Remove reporter because of https://github.com/graphile/worker/issues/349 2023-10-12 17:06:06 +01:00
Matt Aitken 3d387d602d Added additional log after a magic link user has done verification 2023-10-12 16:48:51 +01:00
Matt Aitken 5d45dea0e1 Added some logging when sending magic link emails 2023-10-12 16:45:05 +01:00
James Ritchie a25751e805 Added some better messaging to the login pages
- Better login page title and subtitle
- Better title and new ‘having issues’ panel on the magic link pages
2023-10-12 16:16:20 +01:00
D-K-P 659be8cbc1 Added Hacktoberfest info to our readme 2023-10-12 13:41:15 +01:00
Matt Aitken 50e3d9e43a Indexing errors don't get displayed anywhere (#605)
* Added EndpointIndex status. Default is PENDING, existing rows are SUCCESS

* Made it easier to create a migration SQL file

* Created a job-catalog file for misconfigured Jobs that should error when running the CLI

* EndpointIndex data and state are now optional

* The Environments page now shows the status of the last refresh

* Improved the UI about endpoints

* Added EndpointIndex error column

* WIP making the endpoint indexing more robust

* Indexing errors are now surfaced

* Improved the error show it shows the job id

* Use “performEndpointIndexing” when you create your first endpoint from the UI

* Use “performEndpointIndexing” for the recurring endpoint checker

* Staging is now auto-indexed every 10 mins too

* Use “performEndpointIndexing” for the webhook

* Moved the throttling to a util

* Removed instructional comments

* Created a reusable retry system with exponential backoff

* Use p-retry for retrying with backoff

* The CLI gets indexing results and displays errors

* Improved the indexing error messages and display in the console

* Use a pre so the Indexing error is correctly split over multiple lines

* Use a db transaction for webhook that triggers endpoint indexing

* Tidied up imports

* Support older versions of the server

* Improved the comment on the misconfigured job

* Changeset: When indexing user's jobs errors are now stored and displayed
2023-10-11 17:31:19 +01:00
Eric Allam 203a431350 Add stripe and airtable to the integrations catalog 2023-10-11 11:55:35 +01:00
Hemachandar 39a332eff1 feat: add filter for active jobs in the dashboard (#601)
* feat: add filter for active jobs in the dashboard

* use cursor-pointer when hovering Switch label

* remove unused import

* remove unnecessary span

* add flex-gap
2023-10-11 11:24:24 +01:00
Arjun S 498f56de3e Feat: Replaicing react hot toast with Sonner toasts (#600)
* Feat: Replaicing react hot toast with  Sonner toasts

* pnpm lock file fix

* Quickfix
2023-10-11 10:52:10 +01:00
Eric Allam b23696b255 Move to reporting worker stats through logs 2023-10-11 10:43:37 +01:00
Eric Allam f3a7e2aa20 Add APP_ENV to worker reporter email 2023-10-10 23:15:06 +01:00
Eric Allam b737f7af92 Report worker metrics when WORKER_REPORTER_EMAIL env var is set 2023-10-10 23:06:07 +01:00
Eric Allam f54a9ff5fc Fixed broken link in runTask description 2023-10-10 16:12:30 +01:00
Eric Allam 067c0db543 Merge branch 'main' of github.com:triggerdotdev/trigger.dev 2023-10-10 15:47:57 +01:00
Eric Allam 773765f82d Cleanup finished graphile_worker.jobs last run more than 7 days ago 2023-10-10 15:47:53 +01:00
Eric Allam 624072c23b Update release.yml 2023-10-10 15:04:13 +01:00
Eric Allam d37576f814 Update release.yml 2023-10-10 15:03:30 +01:00
Eric Allam 476e2f035f Don’t typecheck the workspace packages inside the webapp 2023-10-10 12:02:01 +01:00
Eric Allam ad71964d30 Upgrade local development Node to v18.18.0 using nvm 2023-10-10 11:53:42 +01:00
Rutam Prita Mishra 975c5f1d3c [TRI-1333] : Upgrade all packages to use Node18 and use fetch instead node-fetch (#581)
* [TRI-1333] : Upgrade all packages to use Node18 and use fetch instead of node-fetch

* Changeset Added

* Update pnpm-lock to compatible pnpm v7.18.1

* Restored pnpm-lock to the last known good point compatible with pnpm v7.18.1

* Update chilled-plants-exercise.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-10-10 11:42:02 +01:00
D-K-P 916ed4e366 Updated features table 2023-10-10 09:50:48 +01:00
Ikko Eltociear Ashimine df4667b7f5 Fix typo in sse.ts (#591)
Uknown -> Unknown
2023-10-09 22:08:53 +01:00
md d663ba8985 Fixed #593 Added Contributors Section to readme.md (#594)
* Fixed #593 Added Contributors Section to readme.md 

Fixed #593 Added Contributors Section to readme.md

* Update README.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-10-09 22:08:32 +01:00
Eric Allam 8c8d1598e3 Reuse common workflow jobs in publish workflow 2023-10-09 18:30:55 +01:00
Eric Allam 646bfd37bd Pushing a commit to the branch so I can open a PR (#592)
* Pushing a commit to the branch so I can open a PR

* Couple improvements to the pr checks workflow
2023-10-09 18:28:49 +01:00
Eric Allam c0d5292b06 Attempt to fix pgadmin error in tests 2023-10-09 18:22:38 +01:00
Eric Allam 8c383bdc69 Add a PR checks github workflow to run typecheck, unit tests, and e2e tests on PRs 2023-10-09 18:19:06 +01:00
Hemachandar 97e63d1222 Event Trigger Example Payload: Fix unsetting icon, and Use fallback icon in case of invalid icon-name. (#576)
* fix: unset event-trigger example icon

* fix: use fallback icon when an invalid icon is used (example payload page)
2023-10-09 17:33:08 +01:00
D-K-P 87ee98aff1 Added NestJS to the quick starts side menu 2023-10-09 17:28:57 +01:00
Hemachandar c070e78d06 feat: allow CLI update to accept a version for trigger-dev package (#536)
* feat: allow CLI update to accept a version for trigger-dev package

* remove console log
2023-10-09 17:15:24 +01:00
Eric Allam 1c4f9ff1ff Add pgAdmin instructions to contributing guide 2023-10-09 17:14:40 +01:00
nicktrn ca031a72e7 Add pgAdmin (#533) 2023-10-09 16:57:28 +01:00
Dan cbc976188e GitHub docs improvements (#568)
* Updated github-triggers and intro

* Edited tasks / triggers and main overview page

* Added links to scopes docs and improved copy

* Added an overview, side bar title and improved the ordering / wording

* Added the underlying Github client section and some formatting updates

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
Co-authored-by: Eric Allam <eallam@icloud.com>
2023-10-09 16:48:38 +01:00
Eric Allam 59a94c710e Fixes #583 by filtering out properties with missing values (#584)
This also improves the retrying behavior of the resend integration by skipping retrying certain client errors
2023-10-09 16:04:32 +01:00
James Ritchie 4cd97c81ea Swapped out the Integration page skeleton state for a simpler message 2023-10-09 15:20:17 +01:00
Matt Aitken d0d5a698ec Added versions to Supabase management docs examples that are missing them 2023-10-09 14:03:17 +01:00
Matt Aitken ee033a1fd4 Onboarding, don’t show undefined if there are no extra params for dev command 2023-10-09 11:21:44 +01:00
D-K-P 2394fcdf35 Added line about Stripe Shell to the Stripe docs 2023-10-09 09:58:20 +01:00
Matt Aitken 6edaffeb7e Try and determine an error some HTTP requests are causing (#586) 2023-10-08 17:20:07 +01:00
Matt Aitken 0558b2c595 feat: sveltekit adaptor (#575)
* Feat/svelte kit support (#467)

* feat: implemented svelte-kit adapter

* feat: implemented the @trigger.dev/svelte package

* scaffolded a sveltekit example project with trigger.dev

* added the convertToStandardRequest function in the sveltekit package

* example sveltekit project with the @trigger.dev/svelte package

* doc: added the manual setup guide for sveltekit

* updated the web app onboard for sveltekit

* formatted the manual setup guide for sveltekit

* added a link to webapp sveltekit onboarding

* added a wait function to the sveltekit example app job

* typo fix

* removed comments from the @trigger.dev/svelte

- commented out the useEventRunDetails

* updated package.json to use internal packages

* added a .env.example file

* updated the example-svelte-app

* updated the svelte-example

* updated the onboarding page to reflect requested changes

* made the manual setup guide more specific

* created a .env.example file for svelte-example

* added import aliases

* updated the tsconfig and svelte.config file

* updated to use uint8Array

* added missing paths in the tsconfig

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>

* Moved examples to references

* Tweaked the SveleteKit manual setup guide

* Updated zod, and set the svelte/sveltekit package versions to match other packages

* Added the headers to the response from the SvelteKit api/trigger route

* Changeset for Svelte and SvelteKit packages

* Revert change to rawBody

* Remove core from changeset packages

* Delete svelte .npmrc file

* Build svelte package to build, not build/lib

* Made the snapshot instructions easier to copy

* Delete the svelte package

* Latest lockfile

* Updated the SvelteKit docs

* Attempt to get Svelte to import the package

* Updates for port and host options

* Updated lockfile from main

* Update neat-feet-wait.md

---------

Co-authored-by: Chigala <92148630+Chigala@users.noreply.github.com>
2023-10-06 17:12:52 +01:00
Hemachandar b12bc6042f (regression) fix: remove invalid envFile response field in sendEvent cmd (#577)
* fix: remove invalid envFile response field in sendEvent cmd

* add changeset
2023-10-06 16:55:26 +01:00
Eric Allam a7bc5df754 use the new JobRun.internal flag in usage stats 2023-10-06 16:15:13 +01:00
Hemachandar 1c524c5acc feat: add internal flag to job-run table (#563)
* feat: add internal flag to job-run table

* add backfill SQL

* Update internal backfill to only update internal jobs

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-10-06 15:46:09 +01:00
Eric Allam 65ad98c20d Add docs for yield and brb 2023-10-06 15:13:45 +01:00
Eric Allam 24d892e322 Merges 573 with fix for Dockerfile (#578)
* update prisma to 5.4.1 (#573)

* Get prisma 5.4.1 to work in the Dockerfile

---------

Co-authored-by: Karthik <kartim316@gmail.com>
2023-10-06 15:10:43 +01:00
Hemachandar be9b51131d feat: allow CLI dev to use injected environment variables (#532)
* feat: allow CLI dev to use injected environment variables

* Remove console.log

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-10-06 14:18:58 +01:00
Hemachandar 63a65dabe4 chore: add example for eventTrigger() doc (#541)
* chore: add example for eventTrigger() doc

* add documentation to the options parameter
2023-10-06 13:56:28 +01:00
Matt Aitken 1f3b423c22 Removed testing dependencies from nestjs example 2023-10-06 13:18:47 +01:00
Matt Aitken a69a5019f1 Removed NestJS example project tests 2023-10-06 13:16:40 +01:00
Matt Aitken 5910339bf4 Latest lockfile 2023-10-06 12:56:56 +01:00
github-actions[bot] 4b641b25a6 chore: Update version for release (#571)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-06 12:54:07 +01:00
Matt Aitken a847b492bc NestJS framework suport (from @H4ad) (#574)
* feat: added nestjs package adapter

* Latest lockfile

* Updated Astro setup docs: env import

* Astro docs improvements

* Docs: improved the limitations

* Bumped package versions to 2.1.3

* Updated the Astro docs with SSR notes

* test/368/use vitest instead of jest (#470)

* chore: add vitest dependencies

* refactor: replace jest by vitest

* test: disable broken test

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>

* Created Temp for pull req, bugreport & feature req

* A few teaks to the templates

* Added instructions for how to do Changeset snapshots

* Redirect people to discord to ask a question

* Documentation Update: Added <github_username> instead of triggerdotdev to avoid confusion while cloning the repository (#477)

* Added a link to the homepage from the side menu (#479)

* Added 2 new named icons

* New side menu link to the homepage

* Updated lock file

* Removed un-used import

* Renamed the examples dir to references (true examples are in another repo and this was confusing)

* Add a references README

* Fixes broken pnpm lock file

* Improve the Astro manual setup guide

* Fixed cal.com link

* Upgrade to the latest remix (pre v2)

* React status hooks (#493)

* Added stripInternal to SDK tsconfig

* Statuses can now be set from a run, and are stored in the database

* Added the key to the returned status

* Made the test job have an extra step and only pass in some of the options

* client.getRunStatuses() and the corresponding endpoint

* client.getRun() now includes status info

* Fixed circular dependency schema

* Translate null to undefined

* Added the react package to the nextjs-reference tsconfig

* Removed unused OpenAI integration from nextjs-reference project

* New hooks for getting the statuses

* Disabled most of the nextjs-reference jobs

* Updated the hooks UI

* Updated the endpoints to deal with null statuses values

* The hook is working, with an example

* Changeset: “You can create statuses in your Jobs that can then be read using React hooks”

* Changeset config is back to the old changelog style

* WIP on new React hooks guide

* Guide docs for the new hooks

* Added the status hooks to the React hooks guide

* Removed the links to the status hooks reference for now

* Re-ordered the hooks

* Fix for an error in the docs

* Set a default of a blank array for the GetRunSchema

* Fixed dependency

* Revert "Upgrade to the latest remix (pre v2)"

This reverts commit 4edc7112ab.

* Update introduction.mdx (#498)

Changed https://github.com/triggerdotdev/examples/tree/main/resend (which was a 404) to https://github.com/triggerdotdev/examples/tree/main/resend-email-form

* Use the bell icon for the new status Tasks

* Going exponential with `Linear` (#478)

* Unleash GPT magic

* Clean up after GPT

* All the hooks

* Provisional integration catalog entry

* Sample webhook jobs

* Attachments with alpha warnings

* Remove some verbose logs

* Fix IP restrictions

* Remove tunnel

* Revert "Remove tunnel"

This reverts commit c5b69ce6524e3b40c26b66cdc56e087b8576b8c6.

* Resolve event name clashes

* Remove circular dependency

* Use correct payload uuid

* Schema fixes

* Fix webhook event name

* Start to Linearify catalog entry

* Remove todo

* More catalog updates

* Make OAuth work

* Rename webhook helper

* Schema juggling

* More discrimination

* Add Issue SLA event

* Simplify triggers

* Handle rate limits

* Fix Project schema

* Payload examples

* Improve event props

* Remove redundant source metadata

* One type to rule them all

* Recursive WithoutFunctions type

* Linear output serializer

* Some tasks

* Update catalog entry

* Dynamic usage sample

* Bump version

* Remove tunnel

* More tasks

* Add optional skipRetrying on runTask errors

* Fail fast on user errors

* Entity getter tasks

* Another couple of tasks

* Token to apiKey

* Sort tasks

* Add filtered issue SLA triggers

* Add docs

* Type fixes

* Job catalog examples

* Serialization helper docs

* Add changeset

* Refactor webhooks

* Enhance properties

* Pagination helper and docs

* Clean up imports

* Change misc catalog job

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>

* Use absolute image paths (#490)

* Update sendevent.mdx

* fix: Fail client-side on invalid Stripe event names (#492)

* Parse event names

* Add changeset

* feat: BYO Auth (#491)

* feat: BYO Auth

Define client-side auth resolvers to be able to supply custom authentication credentials for integrations before a run is performed

- Added new defineAuthResolver
- Update all integrations to support the new auth resolvers
- Strip internal symbols from .d.ts in integrations and trigger-sdk
- Added BYO Auth docs
- Update Dynamic Schedule to support associated account IDs
- Create external accounts just-in-time
- Added Account ID field to test job when there are external auth integrations
- Show Account ID on run dashboard
- Added new Run error state called “Unresolved auth”

* Added changeset

* Remove @internal from TriggerIntegration public methods

* Add void to the result union

* DynamicTriggers now work with the new BYO auth system, and added a bunch of docs and docs changes

* Add additional key material for registering dynamic trigger task

* Add new define* instance methods to the overview

* CLI now supports multiple frameworks (with tests) (#480)

* Early work defining CLI framework support

* WIP moving CLI init logic to the Framework class

* Installing files should now work for Nextjs

* Some fixes

* WIP creating unit tests for Next.js project detection

* Delete old jest config

* Latest lockfile

* Detect use of src directory test

* Tests for detection pages/app directory

* Correct detection of Next.js project

* Renamed test file

* Create install files from template files with replacements. With tests

* Added multiple uses of the same replacement

* Created a test for the install step (it fails right now with JS)

* Removed unused import

* Another test that should pass but currently fails…

* Path alias fixed and now has tests

* New pathAlias function used

* Nextjs page install tests

* Fixed app directory install (with tests)

* Removed e2e CLI test, switched to unit testing strategy instead

* Latest lockfile

* The install files are now actual files that are copied and transformed

* Got the template files working correctly after building

* Next steps are now framework specific

* createFileFromTemplate now works with a path again. Uses mock if specified.

* Renamed apiRoute.js to pagesApiRoute.js

* Simplified pages file generation

* Next.js app API route template

* Next.js App routing support, with common files logic shared

* Dev command now uses framework default values if they exist and aren’t overridden

* Unused import

* pathAlias now works for all frameworks

* Added a test to detect Next from the next.config.js

* WIP on Remix framework support

* Tests for Remix install

* Replaced references to Next.js

* Use a green ✔️ instead of  in the CLI

* Support for multiple hostnames

* Tunneling can now use the hostname and port

* Work on multiple ports

* Improved the error messages. Added some extra pots to Next.js

* Update the Remix templates to have .server in the imports

* Remix updated to use server-runtime instead of node. Node v18+

* Frameworks can specify the watch paths and ignore paths

* Define the watch variables above, so we can easily log them for debugging

* Don’t wait for outdated package checking when running the dev command

* Improved the Remix manual setup guide

* Rewriting docs for quickstart

* Updated the Next.js quickstart

* Remix quick start

* Added a changeset

* Improved the Next.js manual setup

* Tweaked the Linear scopes

* Latest lockfile

* Fix for getPathAlias typecheck failure

* Linear getAll type error (weirdly not in VSCode…) and removed the pagination example that uses the SDK as won’t work with timeouts

* Add BYO auth for oauth options

* Add back in Job.toJSON to fix the testing package

* Removed dynamicTrigger @internal from toJSON

* The CLI now checks for a dev server API key in init and dev commands

* Remix onboarding now uses the CLI init command

* Decouple zod (#500)

Zod Schemas is no longer required for validating/inferring event triggers. We’ve taken inspiration from how domain-functions did it: https://github.com/seasonedcc/domain-functions/pull/114

* chore: Update version for release (#481)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Latest lockfile

* feat: Basic usage dashboard to show run volume (#501)

* New usage dashboard with static data

* Implement org usage dash

* Grab chart data for the last 12 months

* If no org is found just return undefined so a 404 will be shown

* Remove mock data

* Fill in missing months with 0s

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>

* Fixed duplicate end month

* hotfix

* hotfix 2

* Astro CLI support (#506)

* Astro framework CLI support

* Changeset: Added Astro automatic installation

* Fixed the package name – was remix, now astro

* Fixed the export of the example

* Added IPv6 localhost to Astro hostnames

* Updated Astro onboarding to show the CLI init command, instead of manual instructions

* Astro quickstart

* Fix for type in Remix quickstart

* Next.js framework detection allows different config file extensions and “next” devDependency

* Made the dev command port more general so it works with various frameworks

* chore: Update version for release (#508)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix for incorrectly named Next.js package in manual setup

* Latest lockfile

* Increased the intervalTrigger max from 1 day to 30 days

* Implement the task output redacting to prevent redacted values from showing in the logs

* Express frameworks docs + CLI (#512)

* Manual setup docs

* Added the onboarding

* The emails package now works with Node > 18

* Added CLi support for Express, including custom init command finished messages

* Need to actually log out the installation complete message…

* Fix for an old Remix reference

* Renamed the page export

* Use resolvedOptions.triggerUrl

* Typo in manual instructions

* chore: Update version for release (#513)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Latest lockfile

* Add the STAGING environment by default

* Fixed sparodically failed run creations

- Use a better way of getting the latest job run number to increment
- Make the CreateRunService transaction more reliable
- Invoke dispatchers in parallel
- No longer swallow prisma errors in $transaction

* Swapped out the Homepage link in the side menu for a link to the Changelog

* Youtube embedded video fits its aspect ratio instead of going full width

* Improved CLI init Next.js middleware detection

* CLI init: adds public key as “TRIGGER_PUBLIC_API_KEY” except for Next which overrides this

* Updated the docs for the React hooks

* chore: Update version for release (#521)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Display framework logos on the onboarding setup pages (#519)

* autofocus the search field on the Job page

* Add some documentation around canceling scheduled events

* Updated outdated lockfile

* Updated docs README.md

* Improves the performance of run resuming (#522)

* Improves the perform of run resuming

When runs resume, we try and make sure that tasks that have already been completed are cached and reused. Worst case scenario the client needs to hit the API server once for a non-cached task that is indeed completed on the server, but this can get pretty expensive when there are a larger number of tasks.

This commit does 2 different things to help:

- noop tasks are no longer “cached” using the cachedTasks strategy, instead their idempotency keys are shoved into a bloom filter and the client tests for their inclusion in the bloom filter before running them (since they don’t have any concept of output, this works)
- Additional cached tasks are lazy loaded when a task is run. This allows us to progressively fetch additional tasks to be cached on the client, which will cut down on cache misses by a decent amount

* Create warm-carrots-float.md

* Make io.yield backwards compat with older platform versions

* Better support old clients connecting to server versions that support lazy loading cached tasks

* Fixed type errors when settings headers with unknown value

* Better yield not support error message

* Rename _version to _serverVersion to be more clear

* Add typed filters to `Linear` getAll helper (#517)

* Fix getAll params type

* Changeset

* Search param types

* Update changeset

* `Replicate` integration and remote callbacks (#507)

* Support tasks with remote callbacks

* Add common integration tsconfig

* Add Replicate integration

* Basic job catalog example

* Integration catalog entry

* Check for callbackUrl during executeTask

* Fix getAll

* Improve JSDoc

* Bump version

* Remove named queue

* Simplify runTask types

* Trust the types

* Fail tasks on timeout

* Callback timeout as param

* Mess with types

* performRunExecutionV1

* Update runTask docs

* Shorten callback task methods

* Fix run method return type

* Image processing jobs

* Replicate docs

* Text output example

* Changeset

* Version bump

* Roll back ugly types

* Remove missing types

* Quicker return when waiting on remote callback

* Remote callback example

* Bump version

* Remove schema parsing

* Only schedule positive callback timeout

* Decrease callback secret length

* Explicit default timeouts

* Import deployments tasks

* JSDoc

* Deployments docs

* Fix runTask examples, mention wrappers

---------

Co-authored-by: Eric Allam <eric@trigger.dev>

* Update pnpm lock file

* Allow blank issues

* chore: Update version for release (#538)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix pnpm lock file

* feat: New Test page (#558)

* Improvements to the shortcut keys

* Updated code mirror theme to the new dark mode style

* Removed the old test page help panel copy

* WIP new structure for the test page

* Added some of the side panel options for examples and account ID

* Conditionally hide the side panel components if they’re blank

* Example with selected state working

* Allow selecting the example again to overwrite any edits

* Previous run payloads working

* Select a recent payload if there’s no example

* Created Icon and DetailCell components

* The integrations now use the DetailCell

* Use DetailCell on the integrations page

* Added support for description to DetailCell. With proper variants now

* DateTimeAccurate and formatDateTimeAccurate weren’t displaying correctly.

fractionalSecondDigits isn’t in the types, but is supported for 92.5% of users

* DetailCell now allows label and description to be React components

* Using the DetailCell on the Test page

* Styled the CodeMirror scrollbars to match elsewhere

* Adding copy and clear to the JSONEditor, not working properly yet though

* Removed the copy/clear buttons from the Test route

* Delete the light color theme

* The editor now supports copying/clearing etc

* Made it clear when text is copied

* Changed the learn link to a tertiary button

* Fixed CMD shortcut keys

* Run test button now works with ⌘ Enter

* CodeMirror now allows ⌘Enter to escape the field

* Added JSON linter to the test editor

* Fix for buttons not being aligned correctly

* Copy/clear buttons now aligned

* Made the integration DetailCell text smaller

* The test recent payloads now have colored text to help identify the status

* DetailCell descriptions are dimmer

* Added link to docs for BYOA

* Fix for buttons going full width when they shouldn’t

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>

* chore: update doc title for groups (#539)

* chore: update doc title for groups

* update docs for sdk and integrations

* Add instructions for triggering job runs to the job catalog readme

* Updated the Test docs

* Removed a console.log when a user’s file is changed that CLI dev is listening for

* feat: allow cancelling jobs from trigger-client sdk (#562)

* feat: allow cancelling jobs from trigger-client sdk

* use presenter instead of service for non-mutating logic

* chore: upgrade zod to 3.22.3 (#570)

* chore: upgrade zod to 3.22.3

* add changeset

* Created a changeset with the correct starting package version

* Added headers to NestJS response

* Added some types to the NestJS project

* Added fastify types

* Removed log from CodeMirror

* Added InstallPackages component

* Improved the NestJS onboarding instructions

* Updated the onboarding instructions

* Made all the quickstart framework cards snippets, so the page isn’t a nightmare to edit

* NestJS docs updates

* Added dotenv to the earlier code sample

* Latest lockfile

* Moved the nestjs-example to the reference folder

---------

Co-authored-by: Vinícius Lourenço <contact@viniciusl.com.br>
Co-authored-by: Wesley <100464352+ologbonowiwi@users.noreply.github.com>
Co-authored-by: Vishesh Rawal <92795514+visheshrwl@users.noreply.github.com>
Co-authored-by: Eric Allam <eallam@icloud.com>
Co-authored-by: Aniket Bindhani <aniketbindhani44@gmail.com>
Co-authored-by: James Ritchie <james@trigger.dev>
Co-authored-by: D-K-P <dkp.github@pm.me>
Co-authored-by: Gregory <93215236+gjohnsx@users.noreply.github.com>
Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>
Co-authored-by: Eric Allam <eric@trigger.dev>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
Co-authored-by: Hemachandar <132386067+hmacr@users.noreply.github.com>
2023-10-06 12:27:15 +01:00
Eric Allam 0df6410561 Need to properly format the payload JSON
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-10-06 11:53:12 +01:00
Eric Allam c17faabe9f Stringify event payload and context before serialization
This fixes an issue where an event payload was being serialized through remix-typedjson and was causing issues with incorrect meta keys and so deserialization was failing. See https://github.com/kiliman/remix-typedjson/pull/33 for more
2023-10-06 11:21:14 +01:00
Hemachandar 9a187f9eda chore: upgrade zod to 3.22.3 (#570)
* chore: upgrade zod to 3.22.3

* add changeset
2023-10-05 17:00:33 +01:00
Hemachandar 2e9452ab7c feat: allow cancelling jobs from trigger-client sdk (#562)
* feat: allow cancelling jobs from trigger-client sdk

* use presenter instead of service for non-mutating logic
2023-10-05 16:51:59 +01:00
Matt Aitken 914745f642 Removed a console.log when a user’s file is changed that CLI dev is listening for
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-10-05 16:49:06 +01:00
Matt Aitken 9189bdf50f Updated the Test docs 2023-10-05 14:42:32 +01:00
Eric Allam 3e5a97c4b5 Add instructions for triggering job runs to the job catalog readme 2023-10-05 12:47:40 +01:00
Hemachandar c0aa6633d2 chore: update doc title for groups (#539)
* chore: update doc title for groups

* update docs for sdk and integrations
2023-10-05 11:54:09 +01:00
Matt Aitken 4e35871861 feat: New Test page (#558)
* Improvements to the shortcut keys

* Updated code mirror theme to the new dark mode style

* Removed the old test page help panel copy

* WIP new structure for the test page

* Added some of the side panel options for examples and account ID

* Conditionally hide the side panel components if they’re blank

* Example with selected state working

* Allow selecting the example again to overwrite any edits

* Previous run payloads working

* Select a recent payload if there’s no example

* Created Icon and DetailCell components

* The integrations now use the DetailCell

* Use DetailCell on the integrations page

* Added support for description to DetailCell. With proper variants now

* DateTimeAccurate and formatDateTimeAccurate weren’t displaying correctly.

fractionalSecondDigits isn’t in the types, but is supported for 92.5% of users

* DetailCell now allows label and description to be React components

* Using the DetailCell on the Test page

* Styled the CodeMirror scrollbars to match elsewhere

* Adding copy and clear to the JSONEditor, not working properly yet though

* Removed the copy/clear buttons from the Test route

* Delete the light color theme

* The editor now supports copying/clearing etc

* Made it clear when text is copied

* Changed the learn link to a tertiary button

* Fixed CMD shortcut keys

* Run test button now works with ⌘ Enter

* CodeMirror now allows ⌘Enter to escape the field

* Added JSON linter to the test editor

* Fix for buttons not being aligned correctly

* Copy/clear buttons now aligned

* Made the integration DetailCell text smaller

* The test recent payloads now have colored text to help identify the status

* DetailCell descriptions are dimmer

* Added link to docs for BYOA

* Fix for buttons going full width when they shouldn’t

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
2023-10-05 10:38:28 +01:00
Eric Allam 90f52de147 Fix pnpm lock file 2023-10-04 14:01:48 +01:00
github-actions[bot] 28b05a82d8 chore: Update version for release (#538)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-04 14:00:20 +01:00
Eric Allam b9ed7e2ced Allow blank issues 2023-10-04 13:21:38 +01:00
Eric Allam 5e651d84af Update pnpm lock file
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-10-04 11:00:55 +01:00
nicktrn 6a992a1995 Replicate integration and remote callbacks (#507)
* Support tasks with remote callbacks

* Add common integration tsconfig

* Add Replicate integration

* Basic job catalog example

* Integration catalog entry

* Check for callbackUrl during executeTask

* Fix getAll

* Improve JSDoc

* Bump version

* Remove named queue

* Simplify runTask types

* Trust the types

* Fail tasks on timeout

* Callback timeout as param

* Mess with types

* performRunExecutionV1

* Update runTask docs

* Shorten callback task methods

* Fix run method return type

* Image processing jobs

* Replicate docs

* Text output example

* Changeset

* Version bump

* Roll back ugly types

* Remove missing types

* Quicker return when waiting on remote callback

* Remote callback example

* Bump version

* Remove schema parsing

* Only schedule positive callback timeout

* Decrease callback secret length

* Explicit default timeouts

* Import deployments tasks

* JSDoc

* Deployments docs

* Fix runTask examples, mention wrappers

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2023-10-04 10:46:17 +01:00
nicktrn 81e886a1ba Add typed filters to Linear getAll helper (#517)
* Fix getAll params type

* Changeset

* Search param types

* Update changeset
2023-10-03 16:48:21 +01:00
Eric Allam ab9e4a989c Improves the performance of run resuming (#522)
* Improves the perform of run resuming

When runs resume, we try and make sure that tasks that have already been completed are cached and reused. Worst case scenario the client needs to hit the API server once for a non-cached task that is indeed completed on the server, but this can get pretty expensive when there are a larger number of tasks.

This commit does 2 different things to help:

- noop tasks are no longer “cached” using the cachedTasks strategy, instead their idempotency keys are shoved into a bloom filter and the client tests for their inclusion in the bloom filter before running them (since they don’t have any concept of output, this works)
- Additional cached tasks are lazy loaded when a task is run. This allows us to progressively fetch additional tasks to be cached on the client, which will cut down on cache misses by a decent amount

* Create warm-carrots-float.md

* Make io.yield backwards compat with older platform versions

* Better support old clients connecting to server versions that support lazy loading cached tasks

* Fixed type errors when settings headers with unknown value

* Better yield not support error message

* Rename _version to _serverVersion to be more clear
2023-10-03 16:44:18 +01:00
Matt Aitken e350659e24 Updated docs README.md 2023-10-02 14:26:54 +01:00
Eric Allam f888a49555 Updated outdated lockfile 2023-09-30 22:20:34 +01:00
Eric Allam 421c249e50 Add some documentation around canceling scheduled events 2023-09-30 22:18:52 +01:00
James Ritchie a8a6f51387 autofocus the search field on the Job page 2023-09-29 18:23:22 +01:00
James Ritchie 12e73eef22 Display framework logos on the onboarding setup pages (#519) 2023-09-29 16:44:35 +01:00
github-actions[bot] 2e33fcb16b chore: Update version for release (#521)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-29 16:42:53 +01:00
Matt Aitken 5912cdd11c Updated the docs for the React hooks 2023-09-29 15:37:53 +01:00
Matt Aitken cc016b3ae3 CLI init: adds public key as “TRIGGER_PUBLIC_API_KEY” except for Next which overrides this 2023-09-29 15:14:52 +01:00
Matt Aitken 7760e09462 Improved CLI init Next.js middleware detection 2023-09-29 11:26:29 +01:00
James Ritchie 3ca4456c88 Youtube embedded video fits its aspect ratio instead of going full width
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-09-28 17:37:07 +01:00
James Ritchie 618b7f22da Swapped out the Homepage link in the side menu for a link to the Changelog 2023-09-28 17:27:21 +01:00
Eric Allam a12c7c3b0a Fixed sparodically failed run creations
- Use a better way of getting the latest job run number to increment
- Make the CreateRunService transaction more reliable
- Invoke dispatchers in parallel
- No longer swallow prisma errors in $transaction
2023-09-28 17:08:26 +01:00
Eric Allam a42e94c75f Add the STAGING environment by default
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-09-27 18:17:19 +01:00
Matt Aitken bc757c8ddb Latest lockfile 2023-09-27 18:12:54 +01:00
github-actions[bot] 6e11ab9183 chore: Update version for release (#513)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-27 18:09:16 +01:00
Matt Aitken 2397fcb640 Express frameworks docs + CLI (#512)
* Manual setup docs

* Added the onboarding

* The emails package now works with Node > 18

* Added CLi support for Express, including custom init command finished messages

* Need to actually log out the installation complete message…

* Fix for an old Remix reference

* Renamed the page export

* Use resolvedOptions.triggerUrl

* Typo in manual instructions
2023-09-27 17:44:50 +01:00
Eric Allam 35d0c2a06f Implement the task output redacting to prevent redacted values from showing in the logs 2023-09-27 16:38:30 +01:00
Matt Aitken 813ec74672 Increased the intervalTrigger max from 1 day to 30 days
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-09-26 17:23:36 +01:00
Matt Aitken 03db13171a Latest lockfile 2023-09-26 16:46:41 +01:00
Matt Aitken 0ecb5129e8 Fix for incorrectly named Next.js package in manual setup 2023-09-26 12:47:49 +01:00
github-actions[bot] 44cb28c1c4 chore: Update version for release (#508)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-26 11:49:03 +01:00
Matt Aitken 4578f6bd64 Astro CLI support (#506)
* Astro framework CLI support

* Changeset: Added Astro automatic installation

* Fixed the package name – was remix, now astro

* Fixed the export of the example

* Added IPv6 localhost to Astro hostnames

* Updated Astro onboarding to show the CLI init command, instead of manual instructions

* Astro quickstart

* Fix for type in Remix quickstart

* Next.js framework detection allows different config file extensions and “next” devDependency

* Made the dev command port more general so it works with various frameworks
2023-09-26 11:44:35 +01:00
Eric Allam 8b25e57613 hotfix 2 2023-09-24 14:43:02 -07:00
Eric Allam 8fb9ea19a3 hotfix 2023-09-24 14:04:46 -07:00
Eric Allam eb4ca0ce2d Fixed duplicate end month
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-09-22 17:24:55 -07:00
Eric Allam df24cd5b71 feat: Basic usage dashboard to show run volume (#501)
* New usage dashboard with static data

* Implement org usage dash

* Grab chart data for the last 12 months

* If no org is found just return undefined so a 404 will be shown

* Remove mock data

* Fill in missing months with 0s

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
2023-09-22 17:02:53 -07:00
Matt Aitken 284324031c Latest lockfile 2023-09-22 16:23:21 -07:00
github-actions[bot] 2fdf42d444 chore: Update version for release (#481)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-22 16:20:21 -07:00
Eric Allam 50137a6f24 Decouple zod (#500)
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
Zod Schemas is no longer required for validating/inferring event triggers. We’ve taken inspiration from how domain-functions did it: https://github.com/seasonedcc/domain-functions/pull/114
2023-09-22 14:44:03 -07:00
Matt Aitken 3703f989fa Remix onboarding now uses the CLI init command 2023-09-22 14:39:21 -07:00
Matt Aitken 2a42942b01 The CLI now checks for a dev server API key in init and dev commands 2023-09-22 13:37:59 -07:00
Matt Aitken 7b29a92f6a Removed dynamicTrigger @internal from toJSON 2023-09-22 12:24:07 -07:00
Eric Allam 24465c9a7b Add back in Job.toJSON to fix the testing package 2023-09-22 11:21:37 -07:00
Eric Allam 42022b6ba4 Add BYO auth for oauth options 2023-09-22 10:31:40 -07:00
Matt Aitken dcc807d716 Linear getAll type error (weirdly not in VSCode…) and removed the pagination example that uses the SDK as won’t work with timeouts 2023-09-22 10:23:24 -07:00
Matt Aitken b5e37bfa61 Fix for getPathAlias typecheck failure 2023-09-22 09:59:59 -07:00
Matt Aitken 5681ebc756 Latest lockfile 2023-09-22 09:53:30 -07:00
Matt Aitken 886d6fda36 Tweaked the Linear scopes 2023-09-22 09:51:49 -07:00
Matt Aitken 1a4952720f CLI now supports multiple frameworks (with tests) (#480)
* Early work defining CLI framework support

* WIP moving CLI init logic to the Framework class

* Installing files should now work for Nextjs

* Some fixes

* WIP creating unit tests for Next.js project detection

* Delete old jest config

* Latest lockfile

* Detect use of src directory test

* Tests for detection pages/app directory

* Correct detection of Next.js project

* Renamed test file

* Create install files from template files with replacements. With tests

* Added multiple uses of the same replacement

* Created a test for the install step (it fails right now with JS)

* Removed unused import

* Another test that should pass but currently fails…

* Path alias fixed and now has tests

* New pathAlias function used

* Nextjs page install tests

* Fixed app directory install (with tests)

* Removed e2e CLI test, switched to unit testing strategy instead

* Latest lockfile

* The install files are now actual files that are copied and transformed

* Got the template files working correctly after building

* Next steps are now framework specific

* createFileFromTemplate now works with a path again. Uses mock if specified.

* Renamed apiRoute.js to pagesApiRoute.js

* Simplified pages file generation

* Next.js app API route template

* Next.js App routing support, with common files logic shared

* Dev command now uses framework default values if they exist and aren’t overridden

* Unused import

* pathAlias now works for all frameworks

* Added a test to detect Next from the next.config.js

* WIP on Remix framework support

* Tests for Remix install

* Replaced references to Next.js

* Use a green ✔️ instead of  in the CLI

* Support for multiple hostnames

* Tunneling can now use the hostname and port

* Work on multiple ports

* Improved the error messages. Added some extra pots to Next.js

* Update the Remix templates to have .server in the imports

* Remix updated to use server-runtime instead of node. Node v18+

* Frameworks can specify the watch paths and ignore paths

* Define the watch variables above, so we can easily log them for debugging

* Don’t wait for outdated package checking when running the dev command

* Improved the Remix manual setup guide

* Rewriting docs for quickstart

* Updated the Next.js quickstart

* Remix quick start

* Added a changeset

* Improved the Next.js manual setup
2023-09-22 08:55:04 -07:00
Eric Allam c0dfa8048a feat: BYO Auth (#491)
* feat: BYO Auth

Define client-side auth resolvers to be able to supply custom authentication credentials for integrations before a run is performed

- Added new defineAuthResolver
- Update all integrations to support the new auth resolvers
- Strip internal symbols from .d.ts in integrations and trigger-sdk
- Added BYO Auth docs
- Update Dynamic Schedule to support associated account IDs
- Create external accounts just-in-time
- Added Account ID field to test job when there are external auth integrations
- Show Account ID on run dashboard
- Added new Run error state called “Unresolved auth”

* Added changeset

* Remove @internal from TriggerIntegration public methods

* Add void to the result union

* DynamicTriggers now work with the new BYO auth system, and added a bunch of docs and docs changes

* Add additional key material for registering dynamic trigger task

* Add new define* instance methods to the overview
2023-09-22 08:54:31 -07:00
nicktrn 3e63a7e7a0 fix: Fail client-side on invalid Stripe event names (#492)
* Parse event names

* Add changeset
2023-09-22 08:53:04 -07:00
Eric Allam 4cc690a6ce Update sendevent.mdx 2023-09-22 08:44:14 -07:00
nicktrn 537447e318 Use absolute image paths (#490) 2023-09-21 15:45:40 -07:00
nicktrn 15f17d27e0 Going exponential with Linear (#478)
* Unleash GPT magic

* Clean up after GPT

* All the hooks

* Provisional integration catalog entry

* Sample webhook jobs

* Attachments with alpha warnings

* Remove some verbose logs

* Fix IP restrictions

* Remove tunnel

* Revert "Remove tunnel"

This reverts commit c5b69ce6524e3b40c26b66cdc56e087b8576b8c6.

* Resolve event name clashes

* Remove circular dependency

* Use correct payload uuid

* Schema fixes

* Fix webhook event name

* Start to Linearify catalog entry

* Remove todo

* More catalog updates

* Make OAuth work

* Rename webhook helper

* Schema juggling

* More discrimination

* Add Issue SLA event

* Simplify triggers

* Handle rate limits

* Fix Project schema

* Payload examples

* Improve event props

* Remove redundant source metadata

* One type to rule them all

* Recursive WithoutFunctions type

* Linear output serializer

* Some tasks

* Update catalog entry

* Dynamic usage sample

* Bump version

* Remove tunnel

* More tasks

* Add optional skipRetrying on runTask errors

* Fail fast on user errors

* Entity getter tasks

* Another couple of tasks

* Token to apiKey

* Sort tasks

* Add filtered issue SLA triggers

* Add docs

* Type fixes

* Job catalog examples

* Serialization helper docs

* Add changeset

* Refactor webhooks

* Enhance properties

* Pagination helper and docs

* Clean up imports

* Change misc catalog job

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-09-21 15:14:54 -07:00
Matt Aitken 91fc1e80f3 Use the bell icon for the new status Tasks
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-09-21 15:01:35 -07:00
Gregory dfe680a390 Update introduction.mdx (#498)
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
Changed https://github.com/triggerdotdev/examples/tree/main/resend (which was a 404) to https://github.com/triggerdotdev/examples/tree/main/resend-email-form
2023-09-21 14:06:14 -07:00
Matt Aitken f73a2a424b Revert "Upgrade to the latest remix (pre v2)"
This reverts commit 4edc7112ab.
2023-09-21 13:19:03 -07:00
Matt Aitken 6ce87f169a Fixed dependency 2023-09-21 11:35:12 -07:00
Matt Aitken ad14983e21 React status hooks (#493)
* Added stripInternal to SDK tsconfig

* Statuses can now be set from a run, and are stored in the database

* Added the key to the returned status

* Made the test job have an extra step and only pass in some of the options

* client.getRunStatuses() and the corresponding endpoint

* client.getRun() now includes status info

* Fixed circular dependency schema

* Translate null to undefined

* Added the react package to the nextjs-reference tsconfig

* Removed unused OpenAI integration from nextjs-reference project

* New hooks for getting the statuses

* Disabled most of the nextjs-reference jobs

* Updated the hooks UI

* Updated the endpoints to deal with null statuses values

* The hook is working, with an example

* Changeset: “You can create statuses in your Jobs that can then be read using React hooks”

* Changeset config is back to the old changelog style

* WIP on new React hooks guide

* Guide docs for the new hooks

* Added the status hooks to the React hooks guide

* Removed the links to the status hooks reference for now

* Re-ordered the hooks

* Fix for an error in the docs

* Set a default of a blank array for the GetRunSchema
2023-09-21 10:24:37 -07:00
Eric Allam 4edc7112ab Upgrade to the latest remix (pre v2) 2023-09-18 22:20:41 +01:00
D-K-P c2ce707f3d Fixed cal.com link 2023-09-18 13:54:53 +01:00
Eric Allam cd70a29970 Improve the Astro manual setup guide 2023-09-15 17:40:36 +01:00
Eric Allam cd94d8fee2 Fixes broken pnpm lock file 2023-09-15 16:17:53 +01:00
Eric Allam 241e40e3e2 Add a references README 2023-09-15 16:12:50 +01:00
Eric Allam 486ed20ae7 Renamed the examples dir to references (true examples are in another repo and this was confusing) 2023-09-15 16:09:04 +01:00
James Ritchie e5ffc3a3f3 Added a link to the homepage from the side menu (#479)
* Added 2 new named icons

* New side menu link to the homepage

* Updated lock file

* Removed un-used import
2023-09-15 15:11:40 +01:00
Aniket Bindhani 363c74c6da Documentation Update: Added <github_username> instead of triggerdotdev to avoid confusion while cloning the repository (#477) 2023-09-15 12:55:56 +01:00
Eric Allam f98c425186 Redirect people to discord to ask a question 2023-09-15 12:54:54 +01:00
Matt Aitken da10ba907f Added instructions for how to do Changeset snapshots 2023-09-15 12:54:38 +01:00
Eric Allam 5aeef1233b A few teaks to the templates 2023-09-15 12:52:29 +01:00
Vishesh Rawal fb5f4e308f Created Temp for pull req, bugreport & feature req 2023-09-15 12:52:29 +01:00
Wesley 6ccb4fbc63 test/368/use vitest instead of jest (#470)
* chore: add vitest dependencies

* refactor: replace jest by vitest

* test: disable broken test

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-09-15 12:51:25 +01:00
Matt Aitken 88ebf4a1a0 Updated the Astro docs with SSR notes 2023-09-14 15:25:43 +01:00
Matt Aitken 9a0e6412e9 Bumped package versions to 2.1.3 2023-09-14 13:37:02 +01:00
Matt Aitken a68a912d56 Docs: improved the limitations 2023-09-14 11:55:51 +01:00
Matt Aitken dde51d6d25 Astro docs improvements 2023-09-14 11:55:38 +01:00
Matt Aitken dbd094216d Updated Astro setup docs: env import 2023-09-14 11:14:35 +01:00
Matt Aitken dc7f335beb Latest lockfile 2023-09-14 09:22:05 +01:00
github-actions[bot] 454cad69b4 chore: Update version for release (#473)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-13 18:07:22 +01:00
Matt Aitken f86117f92b Some improvements to the docs platforms section 2023-09-13 18:05:34 +01:00
Matt Aitken b4c67984bc Latest lockfile 2023-09-13 17:57:22 +01:00
Chigala 1b4db79885 Feat/astro support (#466)
* updated the @trigger.dev/astro package to support typescript

* set up a example astro project

* docs: manual setup of Trigger.dev in an Astro project

* doc: updated the manual setup docs for astro

* updated the webapp onboarding for astro

* cleaned up the example astro project

* removed next from dependency 😅

* updated the readme

* moved trigger.ts file and job folder to src directory

* created a .env.example file

* updated tsconfig

* updated to use aliases

* updated package.json

* updated the astro onboarding page

* updated the manual installation guide for astro

* updated to use alias

* added astro as  a dev dependency

* Remove extra comma I left in

* Changed Object.create() to a Record, so we have some type safety

* Added the localhost URL to the API in the Astro example

* Added the TRIGGER_API_URL to the trigger client in the example

* Added the CLI dev dependency to the Astro example

* Update the running instructions to be closer to Remix's

* Create friendly-carpets-collect.md

* Fix bad package name for Astro

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-09-13 17:55:33 +01:00
Matt Aitken e1e60499b2 Fix for incorrect remix package name in docs
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-09-13 15:41:24 +01:00
Matt Aitken 4eb2439d64 Don’t check for the page title in verify jobs e2e test 2023-09-13 13:57:35 +01:00
Matt Aitken 2895ad52fd Re-run the publish workflow when the test have been updated 2023-09-13 13:56:44 +01:00
Matt Aitken a73b842c60 Latest lockfile 2023-09-13 13:42:00 +01:00
github-actions[bot] cfa3e24123 chore: Update version for release (#444)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-13 13:38:03 +01:00
Matt Aitken b2670f5948 @examples/unit-testing shouldn’t be in a changeset 2023-09-13 13:34:01 +01:00
Matt Aitken 5a93aa6fa1 Updated e2e tests because of text changes 2023-09-13 13:29:56 +01:00
Matt Aitken 6b471489b0 Fix for typecheck problem with Remix example 2023-09-13 12:09:51 +01:00
Matt Aitken 07d68a3289 Latest lockfile 2023-09-13 11:19:09 +01:00
Ravan bf24593b7f fix: Added retry config and showed error from subtask in web (#468)
* fix: Added retry config and showed error from subtask in web

* Still fallback to "Task errored" if there's no output

* Create rude-carrots-enjoy.md

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-09-12 16:25:29 +01:00
Matt Aitken f52ecb9a84 Removed unused component 2023-09-11 19:20:35 +01:00
Matt Aitken 711019032f Added the SDK to webapp tsconfig 2023-09-11 19:20:30 +01:00
Matt Aitken 68c3c89824 Added className to StepContentContainer. Was missing in a PR I merged… agh 2023-09-11 19:12:42 +01:00
Chigala b00717748b Feat/remix support (#465)
* init remix project

* feat: implemented the remix adapter package

* updated the remix package to return the action variable

* added an example job to the example remix project

* fix: Ensure Side Effects Execution in Remix API Routes

* updated the readme in @trigger.dev/remix package

* doc: added the manual setup guide for remix

* updated the webapp onboarding for remix

* updated the manual setup guide

* added a license to the @trigger.dev/remix package

* added a wait function to the example job

* added a link to the remix webapp onboarding

* Updated the onboarding page

For now, we'll only support existing projects. The button that links to the manual installation was just a blank rectangle – added some text to it.

* Added the Server API key to the instructions

* Remix manual docs

Made some things a bit clearer
- file paths
- exporting the job rather than using a function wrapper
- how to run the app and CLI dev command

* Export the job

* Update api.trigger.ts

* Added tsconfig.json paths

* Remove next dependency

* Package set to 2.1.0 and set dependencies

Shouldn't rely on a specific version in main dependencies. In this case we can just have devDependency for @remix/node

* Changeset

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-09-11 18:09:43 +01:00
arika 7833db45d7 feat: add proxy support to the CLI (#404)
* feat: add proxy support for node-fetch

This process is expected to allow the CLI and SDK to work in environments where proxy is enabled.

* Revert "feat: add proxy support for node-fetch"

This reverts commit c850030b5927c562921409fc5b798af353a7ac6b.

* feat: add proxy support for node-fetch (CLI only)

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-09-11 13:56:55 +01:00
nicktrn 6de8bd470b Add @trigger.dev/testing package (#432)
* feat: add testing package

* feat: add unit testing example

* Delete examples/unit-testing/dummy-integration/tasks.ts

* Delete examples/unit-testing/dummy-integration/types.ts

* Update DummyIntegration to new format

* Update testing package to new integration format

* Update readme to new task spy format

* Create rotten-meals-cough.md

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-09-11 13:38:05 +01:00
hrutik7 1d4e31138e Update nextjs.mdx (#458)
note about next 13.4.4 #423
2023-09-10 18:01:31 +01:00
Matt Aitken a93fba932c Caught another runTask param order update 2023-09-10 17:54:58 +01:00
Matt Aitken 6d29914327 Clarified the webhook response 2023-09-10 17:48:19 +01:00
Matt Aitken bd0b335c1e Added docs on how to create a webhook handler 2023-09-10 17:41:33 +01:00
Matt Aitken 82c5965e8a Some docs on how to create Triggers in integrations 2023-09-08 20:09:15 +01:00
James Ritchie 65fa8300ad Support for more frameworks (#446)
* Removed next references in the ReadMe

* FAQ improvements to update Next.js references

* Added a new Frameworks page with logos to link to the quick start guides

* Renamed the mdx file so the link works

* Added basic platform guides

* Introduction doesn’t reference next.js only

* Added a note about serverless and restructured the side menu

* Added more frameworks pages to the manual install section

* Fixed SVG error

* Coming soon guides now using snippets so they can be in 2 places while we work on them

* Removed redirects

* Added a new named icon

* increased fireworks particle count slightly

* Creating a route for the onboarding and link to access it anytime from the side menu

* Moved the onboarding into new components

* Updated the routes for the onboarding page

* Onboarding is now Setup and the frameworks overview page now links to different framework page in the onboarding side nav

* URLs and pages renamed to ‘setup’

* URLs and pages renamed to ‘setup’

* Fixed some old named component imports

* WIP on a new less hacked-in background image

* Added svg logos for all the frameworks

* New paths for the new framework pages

* Side menu collapses once you selected a framework

* Temporary Nuxt page

* New routes for the new frameworks

* New ‘framework coming soon’ component - now used in the coming soon framework pages

* Moved/removed files

* Moved all svg framework logos into a new folder and file

* balanced the logo sizes

* Framework coming soon pages take a name and url

* New express svg logo

* New component for a Framework item in the grid

* Added information and design for the coming soon frameworks

* Change the grid to 1 row if jobs === 0

* Updated the framework coming soon snippet and added it to the relevant pages

* Express now 2nd in all lists

* Added link to long running server support discussion

* New logo to include next.js + supabase quick start

* roadmap now links to homepage with page anchor to roadmap section

* changelog now links to Github releases page

* Removed reference to Next.js

* Docs pages with coming soon info all share the same framework snippets

* Fixed issue of missing props

* Moved the fireworks effect into a separate file to make it easier for adding more framework onboarding pages

* Info callouts have a more muted style

* Added a callout to the top of the next onboarding to reference Serverless-only support

* Moved the callout explaining scheduled triggers not working in dev to the bottom of the test panel

This is to resolve eric’s UX ticket: https://github.com/triggerdotdev/trigger.dev/issues/416

* Added groundwork for Nest.js framework

* Using framer motion for the menu transition instead of css - now has a slight spring and is snappier

* redirect the manual setup page to the new nextjs setup page

* Fixed broken docs link

* Added a readme.md to next.js package

* Capital I for integration

* Renamed component: NextDevCommand to RunDevCommand

* Made required props non-optional

* CLI now points at manual install guides if no Next project detected

* Explicitly made supported default to false (it was working but a bit hard to read)

* Added links to all github issues for the frameworks coming soon component

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-09-08 17:26:08 +01:00
D-K-P aae143d96e Changed examples job / project table 2023-09-08 12:33:18 +01:00
Bryan Eaton 315b94d05b Fix crontrigger.mdx link to /docs/sdk/job (#433) 2023-09-08 11:52:51 +01:00
Dan 440560976d Added progress table to the readme (#438)
* Added ‘our progress’ table to the readme

* Added link to the connect discussion to the progress table

* Removed link from "Polling Triggers"

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-09-08 11:50:40 +01:00
arika 5c1e002233 Fix: Magic link login not working properly when booted from docker (#390)
* fix: use NODE_ENV when starting from docker image

When starting from `pnpm run start`, NODE_ENV is fixed to production, causing problems like #186.
So, I added `start_docker`, a process dedicated to docker, and started from it.
The process is exactly the same as `start` except that NODE_ENV is not overwritten.

* fix: align execution name with others

* Change: command name to match review
2023-09-08 11:06:06 +01:00
Matt Aitken 36f2ece44c Latest lockfile 2023-09-07 17:54:09 +01:00
Matt Aitken 316bf9f3c2 Updated the create integration docs for the new integration structure (no trigger docs yet) 2023-09-07 17:52:27 +01:00
Matt Aitken a57221bbfe Removed the log 2023-09-07 14:04:41 +01:00
Matt Aitken 39b8445e06 CLI create-integration command updated with new OpenAI prompts to match new integrations 2023-09-07 14:03:55 +01:00
Matt Aitken 33ecb36be1 Updating the create-integration command for new integrations 2023-09-07 13:10:56 +01:00
Matt Aitken a00fbe421a Fixed GitHub usage example
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-09-07 10:49:38 +01:00
Matt Aitken c0edeca5cc Airtable docs page 2023-09-07 09:35:22 +01:00
Matt Aitken 7ac7d83c3e Docs: integrations alphabetical in the sidebar, and removed folders where they weren’t used 2023-09-07 09:16:22 +01:00
Matt Aitken 3d1b6c236a Added Typescript devDependency to react, nextjs and integration-kit so they pass a typecheck 2023-09-06 18:35:12 +01:00
Matt Aitken 8ddd151051 Re-ordered runTask params in docs, and example Jobs in the app. 2023-09-06 18:31:50 +01:00
Matt Aitken 9947383f5a Updated lockfile for package release 2023-09-06 16:07:43 +01:00
github-actions[bot] 46e1a1493b chore: Update version for release (#440)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-06 16:06:53 +01:00
Matt Aitken b1cdbf52d6 Exited package prerelease mode 2023-09-06 15:53:40 +01:00
Matt Aitken 1491d4251d Set the Airtable integration examples to something useful 2023-09-06 15:50:52 +01:00
Eric Allam 62ac5dd137 Fixed the healthcheck endpoint (hopefully) on https
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-09-06 13:35:43 +01:00
Matt Aitken 23c93a5712 Latest lockfile 2023-09-05 19:12:56 +01:00
github-actions[bot] 208907e10e chore: Update version for release (beta) (#437)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-05 18:55:35 +01:00
Matt Aitken 3ef588e4e5 Supabase changeset: Don't retry enableDatabaseWebhooks 2023-09-05 18:01:11 +01:00
Matt Aitken 10836735be Supabase SDK tsconfig now matches OpenAI. enableDatabaseWebhooks doesn’t retry 2023-09-05 18:00:25 +01:00
Matt Aitken 090bc2e7d2 OverridableRunTaskOptions allows integrations to expose override task options to users 2023-09-05 17:59:46 +01:00
Matt Aitken 4fe2fd63de Latest lockfile 2023-09-05 17:00:27 +01:00
github-actions[bot] 145fb24e4d chore: Update version for release (beta) (#434)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-05 16:48:28 +01:00
Matt Aitken 2382d4a5c5 Added patch back in 2023-09-05 16:29:23 +01:00
Matt Aitken adbcfe6f20 Use experimental changeset peer dependency flag 2023-09-05 15:57:49 +01:00
Matt Aitken 0754e99507 Removed changeset patch (it didn’t work) and instead use the documented experimental flag 2023-09-05 15:57:37 +01:00
Matt Aitken dfb0a79abc Delete changeset 2023-09-05 15:40:15 +01:00
Matt Aitken c808e40f61 Changset onlyUpdatePeerDependentsWhenOutOfRange flag on 2023-09-05 15:28:45 +01:00
Matt Aitken a9bb53b529 Use patched changeset package, to get unreleased feature with peer dependencies 2023-09-05 15:28:33 +01:00
Matt Aitken 2636d9091e Release workflow: the changeset folder wasn’t set correctly 2023-09-05 15:14:46 +01:00
Matt Aitken 878da3c01f The changeset for the integrations changes 2023-09-05 14:53:21 +01:00
Matt Aitken 588461188f Removed old changeset 2023-09-05 14:43:02 +01:00
Matt Aitken d4145de9a7 Bumped Airtable starting version to match others 2023-09-05 14:40:41 +01:00
Matt Aitken 188c4b0e24 Trying Changeset experimental option to prevent minor + patch resulting in a major 2023-09-05 14:37:52 +01:00
Matt Aitken ecd050bece Airtable integration with webhook and integration changes (#399)
* CLI create-integration command now accepts an Open AI api key

* Create integration docs separated into multiple pages

* Initial Airtable integration commit, with OpenAI generated code

* OAuth page coming soon

* Export DisplayProperty from the SDK

* TSConfig made to match GitHub’s with paths

* getRecords

* Removed duplicate Stripe job from the catalog

* Renamed Airtable apiKey option to token

* First Airtable job

* Export Collaborator and Attachment field types

* A typesafe example that uses runTask

* WIP on new integration tasks… not working yet

* Attempt with class

* Revert "Attempt with class"

This reverts commit 93a48330019f754c3216c5b49964fa4b0218bd3f.

* WIP changing how tasks work

* Mock of async local storage

* Moved client creation from constructor

* New approach with a clone method on TriggerIntegration

* Added runTask to Airtable which is used by integration tasks

* Added the Airtable icon and connection when using runTask

* base().table() is working

* runTask options moved to the 3rd param, made optional with optional name

* Added some generic arguments

* Added generic type to table

* Removed old comment

* We don’t need to repeat the icon

* getRecords and getRecord now returning the right data and types

* Creating records

* Update records

* Delete records

* The internal properties of integrations are now hidden by the TypeScript types

* Sprinkled a Prettify in there

* Improved the types

* Added Airtable to the integration catalog

* Early work on Airtable webhook registration

* More progress with webhooks

* connectionKey needs to be cloned for webhooks to work

* connectionKey needs to be cloned for webhooks to work

* It was unclear that the ActivateSourceService was using a graphileJob id

* ActivateSourceService optionally takes a jobId, if missing it generate a unique id

* When retrying trigger registration, don’t pass an id so it is generated

* Removed Airtable webhooks tasks from the job-catalog example

* Added TriggerSourceOption, removed TriggerSourceEvent

* WIP with new ExternalSource options

* ExternalSourceTrigger setup

* DynamicTrigger changed to options, will need some more work

* filter gets options passed to it

* SourceMetadata v2 renamed to SourceMetadataV2, kept original

* Started versioning the backend

* Moved param order on io.getEvent and io.cancelEvent

* The runTask stuff that allows unknown to work is back

* Indexing for v1 and v2, with version on “activateSource” schema

* Added todos, to deal with Airtable SDK calls inside the webhook handler

* “deliverHttpSourceRequest” queueName changed to the source id so they process in order

* ActivateSource changes to deal with old and new data formats

* Update existing TriggerSources to v2

* Fix for dynamic.ts typescript errors, need to revisit this later

* UpdateSourceService v1 and v2, with new v2 API endpoint

* Removed unused imports

* More progress on v1 and v2

* Airtable webhooks are now triggering a job

* Moved webhooks to a new file

* You can do API calls in the webhook handler now, Airtable webhook data is being processed

* Airtable events coming through

* Defined the Airtable table payload type

* TriggerSource metadata is being stored and used

* Removed some logs

* Added filtering and don’t allow any webhooks that use automated sources

* Resend switched to new integration

* Moved Resend test jobs to the catalog, and tested it worked

* WIP on Slack, there are compile errors

* Created a generic type that strips out indexes

* Slack updated to use new integration

* SendGrid migrated over

* Integration runTask is now allowing regular types

* Changed io.runTask types so it only allows Json-able types

* OpenAI models tasks working

* Added Airtable changes to runTask

* Removed the index signature crap from the Slack integration

* Don’t need to cast the callback result

* Updated Resend

* Re-ordered runTask params

* WIP on openai

* onAccountUpdated is Connect only

* Removed RunTaskResult

* Handle Resend errors, the official SDK doesn’t expose them properly at the moment

* Removed OmitIndexSignature

* OpenAI converted to new integration, with backwards compatible functions

* Put the openai catalog back to what it was originally

* Export a standard retry with backoff, to be used

* Use the standard exponential backoff in the integrations

* Retry options moved earlier so they can be overriden by a task

* GitHub tasks migrated

* Added sources, fixed one bundling issue

* Added GitHub jobs to catalog

* Remove duplicate options

* Deduplicate events

* Removed duplicate Job

* Switched Plain over

* Set the Plain icon

* Converted Stripe over

* Supabase adapted

* Typeform working

* Added dynamic-schedule to catalog

* Added background-fetch job catalog

* Created dynamic-triggers catalog file

* Fixed old general file with runTask param order

* Dynamic triggers working

* SendGrid updated to use the same tsconfig as other integrations

* Removed Airtable webhook, until we have batch support

* Added OAuth airtable auth example

* Created beta changeset tag

* Beta changesets for most packages

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-09-05 14:21:42 +01:00
Eric Allam b24aeea592 Added a long running job to stress tests 2023-09-05 12:24:58 +01:00
Eric Allam 30ba73c4f1 Various run execution fixes (incl massive memory bloat issue)
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
This commit fixes various issues with run executions, including a pretty gnarly memory bloat issue when resuming a run that had a decent number of completed tasks (e.g. anything over a few). Other issues fixed:

- Run executions no longer are bound to a queue, which will allow more parallel runs in a single job (instead of 1).
- Serverless function timeouts (504) errors are now handled better, and no longer are retried using the graphile worker failure/retry mechanism (causing massive delays).
- Fixed the job_key design of the performRunExecutionV2 task, which will ensure resumed runs are executed
- Added a mechanism to measure the amount of execution time a given run has accrued, and added a maximum execution duration on the org to be able to limit total execution time for a single run
2023-09-05 09:51:43 +01:00
Matt Aitken bf6a2a0319 Fix for seedCloud script having a duplicate pkApiKey in it 2023-09-04 20:19:53 +01:00
James Ritchie 4fc5de0dac Fixed console errors 2023-09-04 16:48:39 +01:00
Eric Allam 11ff63a9d2 Fix pnpm lock file 2023-09-02 07:08:36 +01:00
Eric Allam 0d1bdac8ab Merge branch 'main' of https://github.com/triggerdotdev/trigger.dev 2023-09-01 22:05:09 +01:00
Eric Allam 9f076631ae #346 Improve run dashboard perf when tasks have large outputs
Performance degradation came from the syntax highlighting of large code blocks and from doing that on the server and the client, so fixed this in a couple of ways:

1. Stream the task details data using defer and Suspense/Await
2. Skipped syntax highlighting code blocks with more than 1k lines
2023-09-01 22:05:06 +01:00
Matt Aitken a0d663c0fb Setup debugging for VSCode 2023-09-01 16:41:11 +01:00
D-K-P 8fd68e30e9 Removed typeform line 2023-08-31 11:15:47 +01:00
Akshay Patel 5c13512091 Better handle retrying rate-limited resend requests (#320)
* Better handle retrying rate-limited resend requests

* Better handle Retrying  Rate Request

* update try of better handle Resend Email retry

* added  retry options for when  the onError callback returns undefined

* Changed header to ratelimit-reset

* Create three-pots-flow.md

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-08-30 10:09:57 +01:00
Eric Allam 1d7e5737a0 Fix pnpm lock 2023-08-28 16:07:18 +01:00
github-actions[bot] 305e3b7ef2 chore: Update version for release (#417)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-28 16:06:35 +01:00
Eric Allam 03721cb18d Merge branch 'Chigala-refactor/lower-max-retries-for-specific-tasks' 2023-08-28 14:25:59 +01:00
Eric Allam 773a6e2c81 A couple of fixes 2023-08-28 14:25:41 +01:00
Eric Allam 2f13ac100f Merge branch 'refactor/lower-max-retries-for-specific-tasks' of https://github.com/Chigala/trigger.dev into Chigala-refactor/lower-max-retries-for-specific-tasks 2023-08-28 14:02:03 +01:00
Eric Allam a10782490f @trigger.dev/stripe: Added PaymentIntent and Payout trigger events 2023-08-28 12:40:02 +01:00
Eric Allam 6ad91123f2 Turned off automatic github releases 2023-08-28 10:49:24 +01:00
Eric Allam 81f2d5e4ec Fix pnpm lock 2023-08-28 10:45:16 +01:00
github-actions[bot] f249d8defa chore: Update version for release (#414)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-28 10:43:25 +01:00
Eric Allam 09aef5cda7 Merge branch 'main' of https://github.com/triggerdotdev/trigger.dev 2023-08-28 10:38:12 +01:00
Eric Allam 3028b6ad9d Try to automatically create github releases when packages are updated 2023-08-28 10:38:01 +01:00
Wesley 060b650845 fix/TRI 1149/cover all duplicated cases (#398)
* feat: select node by property key name

* feat: get `IfStatement`s recursively

* refactor: make `getNodeBody` more readable

* refactor: enshorter rule code

* refactor: remove additional spaces

* Create lovely-teachers-taste.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-28 10:26:31 +01:00
Chigala 6186a14398 fix: CLI init doesn't work outside of a GIT repo (#405) 2023-08-28 10:25:30 +01:00
Eric Allam 916a353660 bugfix: retrying tasks no longer incorrectly complete successfully 2023-08-28 10:16:47 +01:00
neo773 699878a5b1 feat: Add update checker for CLI (#412)
* feat: Add update checker for CLI

* Create soft-hounds-clap.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-28 09:36:53 +01:00
Chigala d2c9b64212 fix: CLI dev command doesn't work if you're already running ngrok (#407)
* fix: CLI dev command doesn't work if you're already running ngrok

* added changeset
2023-08-28 09:26:26 +01:00
Eric Allam 3102deccfb Add onAccountUpdated to the list of stripe triggers in the docs 2023-08-27 21:54:22 +01:00
Eric Allam 97c1b51332 Fix pnpm lock 2023-08-27 14:13:08 +01:00
github-actions[bot] 4ab7082954 chore: Update version for release (#408)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-27 14:12:33 +01:00
Eric Allam 760f5de248 Adding additional stripe triggers and added initial stripe integration docs 2023-08-27 14:09:24 +01:00
nicktrn de7e8c783e docs: fix fly.io direct connection url (#397) 2023-08-25 10:22:56 +01:00
Sondreal 45b7af53e6 Update self-hosting.mdx (#395) 2023-08-25 08:42:08 +01:00
Chigala aa7458fe37 refactor: reduced max retries on some task to 1 on development 2023-08-24 23:50:33 +01:00
James Ritchie 1fd1d26780 Made jobs and runs into nouns 2023-08-24 15:36:14 +01:00
Eric Allam 6979eb6e66 Fixed pnpm lock 2023-08-24 15:27:08 +01:00
github-actions[bot] b0f926d28d chore: Update version for release (#375)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-24 15:26:42 +01:00
Eric Allam 82d8e7d3f3 Added the new tasks to the openai docs 2023-08-24 15:24:30 +01:00
James Ritchie a214411218 Changed the button text for Delete Job on the settings page
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-24 15:04:28 +01:00
James Ritchie 2806cee7de Conditionally show the disable Job text by the Delete button 2023-08-24 14:36:02 +01:00
James Ritchie bd28556bf3 Made the loading spinner white 2023-08-24 14:25:59 +01:00
James Ritchie 19a8d39fb0 The Delete button displays full width again 2023-08-24 14:11:55 +01:00
Chigala a907e2a988 chore: updated the type in the eventId argument (#389)
* chore: updated the type in the eventId argument

* Create nervous-masks-rest.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-24 11:51:06 +01:00
Eric Allam 403acac5ef #344 Upgrading the openai package to v4 (#383)
* #344 Upgrading the openai package to v4

* Create neat-roses-wait.md

* Fixed a couple of issues with the openai v4 upgrade

* Added fine tuning job tasks
2023-08-24 11:48:39 +01:00
James Ritchie 708ebbde14 Features: Disabling and deleting jobs (#381)
* Don’t show the Ready To Run Job prompt if you have an Integration that needs attention

* Don’t highlight the row red or green

* Improvements to the contrast of the app sections and dividers

* Removed the Jobs page title as it’s duped info

* using the new border variable

* Sticky last table cell

* Improved the sticky last table cell

* Make any last cell in a table sticky by adding isSticky to it

* Added a dropdown menu to the menu table cell

* table rows can be marked as disabled by adding disabled

* Using the jobTestPath function for the test path

* tidy up imports

* Removed un-used props

* Removed the green badge variant

* Added a new status badge to the Runs table

* Clicking the gradient clicks the row

* Delete Job triggers a modal popup

* Added a large danger button type

* Added some modal styling and started adding data

* Added more styling and data to the delete job modal

* A table can now be given a full width prop

* Large danger button added to Storybook

* Danger button disabled state looks disabled now

* New active badge component to display in the table and logic for showing the env data

* Style updates to the dialog component

* active and job status badges can now have a small size

* Added a new named icon

* The Job page shows the Job status in the PageInfoRow

* Small badge style update

* Runs table has a sticky right cell

* Created a JobStatusTable component

* Added some placeholder help panel content for disabling a Job

* WIP creating a Settings page

* Added a delete button that triggers the delete modal – just need data hooking up

* Implemented deleting jobs from the dashboard

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-24 10:30:00 +01:00
Eric Allam 3ce5397072 Implement the disable job feature backend when indexing endpoints (#382) 2023-08-23 10:30:06 +01:00
Liran Tal ee79ab30a9 feat: introduce support for native astro integration package (#354)
* feat: introduce support for native astro integration package

Signed-off-by: Liran Tal <liran.tal@gmail.com>

* fix: update license copyright to match other packages from trigger

Signed-off-by: Liran Tal <liran.tal@gmail.com>

* fix: doc update to refer to the official astro package from trigger

Signed-off-by: Liran Tal <liran.tal@gmail.com>

* fix: repo URLs update accordingly to official repo

Signed-off-by: Liran Tal <liran.tal@gmail.com>

* fix: remove myself as author of the package to not confuse people

Signed-off-by: Liran Tal <liran.tal@gmail.com>

* Remove package-lock because this is now in the pnpm monorepo

---------

Signed-off-by: Liran Tal <liran.tal@gmail.com>
Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-23 10:29:10 +01:00
Eric Allam 2b21f5ba8a bugfix: specifiying an alternate WORKER_SCHEMA now works 2023-08-22 13:15:12 +01:00
Eric Allam 8c27236bc9 Merge branch 'rishi-raj-jain-main' 2023-08-22 11:51:02 +01:00
Eric Allam b8d191052b A couple tweaks to the update command 2023-08-22 11:50:52 +01:00
Eric Allam 979f5f88ae Merge branch 'main' of https://github.com/rishi-raj-jain/trigger.dev into rishi-raj-jain-main
# Conflicts:
#	pnpm-lock.yaml
2023-08-22 11:32:31 +01:00
Eric Allam fef1670533 Improved the testing CLI contributing guide 2023-08-22 11:28:03 +01:00
Eric Allam 3897e6e695 @trigger.dev/cli ini: Make it more clear which API key the init command expects 2023-08-22 11:16:29 +01:00
Eric Allam fc083de102 Merge branch 'Chigala-bugfix/cli-init' 2023-08-22 11:06:44 +01:00
Eric Allam c7c5fd7fac Fixed the examples job path 2023-08-22 11:06:32 +01:00
Eric Allam 4630960478 Merge branch 'bugfix/cli-init' of https://github.com/Chigala/trigger.dev into Chigala-bugfix/cli-init 2023-08-22 10:57:05 +01:00
Eric Allam 302bd02ff1 Issue #377: only expose the external eventId in the API (#380)
* Issue #377: only expose the external eventId in the API

* Create eighty-zebras-bow.md
2023-08-22 10:46:46 +01:00
Eric Allam b5db9f5e5c Added MIT license to all public packages 2023-08-21 22:38:11 +01:00
Rishi Raj Jain 4b64c2d020 remove Index type 2023-08-22 02:19:36 +05:30
Rishi Raj Jain 0c01e58db9 await 2023-08-22 02:15:43 +05:30
Rishi Raj Jain 367ce2e412 use exitsing methods 2023-08-22 02:07:14 +05:30
Rishi Raj Jain 92f80fd87c Merge branch 'triggerdotdev:main' into main 2023-08-22 02:03:43 +05:30
Chigala 135cb4921f added changeset 2023-08-21 19:02:52 +01:00
Chigala 6cbc4f1190 fix: CLI init now logs the correct app route path. 2023-08-21 18:59:31 +01:00
Rishi Raj Jain 1bf84548d7 add types 2023-08-21 23:19:03 +05:30
Rishi Raj Jain ce95744e98 use npm-check-updates 2023-08-21 23:11:15 +05:30
Eric Allam 0493cebaed Merge branch 'Chigala-feat/cancelEvent-function' 2023-08-21 17:49:48 +01:00
Eric Allam ac98219b76 adding changeset 2023-08-21 17:49:28 +01:00
Eric Allam c8ddc19d5a Fixed an issue with IngestSendEvent not returning an existing event 2023-08-21 17:48:34 +01:00
Eric Allam c6df574689 Fixed io.cancelEvent (shouldn’t be a noop) 2023-08-21 17:48:21 +01:00
Rishi Raj Jain 232b7cd26a Merge branch 'triggerdotdev:main' into main 2023-08-21 21:49:35 +05:30
Eric Allam b9dc7ce89e Merge branch 'feat/cancelEvent-function' of https://github.com/Chigala/trigger.dev into Chigala-feat/cancelEvent-function
# Conflicts:
#	apps/webapp/app/platform/zodWorker.server.ts
2023-08-21 16:57:36 +01:00
Chigala 8cf85443d5 bugfix: jsx extensions breaks cli init (#374)
* bugfix: jsx extensions breaks cli init

* Update init.ts (adding ts extension to check)

* Create rude-spoons-compete.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-21 16:03:10 +01:00
Hugo Nogueira dd10717628 feat: add hostname option to the dev command (#370)
* feat: add hostname option to the dev command

- This commit adds a `hostname` option to the cli `dev` command, to allow the cli to point to nextjs applications running on different hostnames other than `localhost`. Example: the nextjs app was started using a --hostname 0.0.0.0 option to be able to be visible from inside docker containers. So adding --hostname 0.0.0.0 to `trigger-cli dev` would make it work.

* docs: add dev cli command hostname option documentation

* feat: add hostname option to the dev command

- This commit adds a `hostname` option to the cli `dev` command, to allow the cli to point to nextjs applications running on different hostnames other than `localhost`. Example: the nextjs app was started using a --hostname 0.0.0.0 option to be able to be visible from inside docker containers. So adding --hostname 0.0.0.0 to `trigger-cli dev` would make it work.

* docs: add dev cli command hostname option documentation

* Update hip-coins-reply.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-21 15:46:16 +01:00
Eric Allam 8bd1ca8b66 Fix pnpm lock file 2023-08-21 14:01:38 +01:00
github-actions[bot] 7f5ce165a0 chore: Update version for release (#361)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-21 13:45:35 +01:00
Eric Allam 7df1b90928 Tweak some of the task max attempts
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-21 09:52:55 +01:00
Atharva Deshpande 57a7e00bfa Fix spelling mistake in README.md (#371) 2023-08-19 15:23:22 +01:00
Eric Allam 7362feed71 Fix for old clients missing the cached tasks 2023-08-19 07:32:34 +01:00
Eric Allam b1b9321ad2 Job run performance improvements and adding "worker only" mode (#360)
* WIP job run performance improvements

- Added a `perf` tool to better measure job run performance under heavy load
- Removed `runFinished` job (not really needed)
- startQueuedRuns now uses a jobKey with replace
- Fixed an issue with ZodWorker when using jobKey

* Publish improvement docker images

* fixed the improvement docker publishing

* Downgrade back to prisma 4.16.0 because 5.1.x broke docker builds

* Changes to how queued runs work

- Split the worker into two different workers, one dedicated to performRunExecution
- Schedule performRunExecution in a single place, with a queue and using a round robin manually controlled concurrency
- Remove startQueuedRuns
- All runs are queued before they are started
- Setting the worker maxPoolSize to the same as the worker concurrency
- Starting to be able to split the docker image

* Remove queue name from startRun graphile job

* Make the prisma connection pool stuff configurable through env vars

* Hardcode (for now) the max concurrent runs limit

* Rewrite performRunExecution to be more performant

PerformRunExecutionV2:

- Does not create and manage jobRunExecution records
- Does not reimplement retrying, uses graphile worker retrying instead

I’ve kept around PerformRunExecutionV1 so this works when deploying. Definitely needs LOTS of testing

* Fix issues with cached tasks

- Limit the size of the cached tasks sent when executing a run, using the knapsack problem dynamic programming approach
- Actually USE the cached tasks in IO by using the idempotencyKey instead of the task ID
- Remove output from all logs
- Added a stress test job catalog

* Forgot to commit the logger updates

* Never log connectionString

* Login to docker hub to get around rate limits

* Add additional logging to the graphile workers

* Fix the *_ENABLED  env vars

* Allow adding and removing jobs to be done from the webapp

* Don’t set the job to failed if it’s being retried

* Deprecated queue options in the job and removed startPosition. Now using the job/env combo as the job queue name

* Dequeung jobs doesn’t check if the runner is initialized

* Fixed issues with retrying a run getting stuck on a cancelled task, and errors from parsing the results of dequeing a job

* Remove queued round robin thing that isn’t used anymore

* Added slack to job catalog

* Better forwards compat

* Added long delay

* Fixed lock file
2023-08-18 15:25:26 +01:00
Dan a69f756e34 Added delay example to init.ts so it works with the pages router (#363) 2023-08-18 15:22:18 +01:00
Chigala 18a02829e3 set the jobkey as event:event.id 2023-08-18 15:21:09 +01:00
Matt Aitken 0f6e580641 Added SendGrid to the integrations table in docs 2023-08-18 15:13:16 +01:00
Chigala 796f1209f2 Docs/sendgrid doc (#359)
* added sengrid integration to the catalog

* added documention for sendgrid integration

* updated the mint.json file
2023-08-18 15:09:04 +01:00
Liran Tal 4ce96b7d28 fix: avoid code duplication by repostioning the default switch case (#356) 2023-08-18 14:48:07 +01:00
Wesley b86ffa0d3d test/add test on get user pkg manager (#349)
* chore: make possible to write tests aside with implementations

* test: write getUserPkgManager test TO-DOs

* test: add test to building the path

* test: add tests to manual file checking

* test: add tests to npm_config_user_agent

* Update packages/cli/src/utils/getUserPkgManager.spec.ts
2023-08-18 14:43:19 +01:00
Wesley 3ee7cd6ff6 feat: parse callback result with zod before return (#342) 2023-08-18 14:33:42 +01:00
Wesley 74686c00cb feature/TRI 712/create eslint plugin to ensure uniqueness on task keys (#324)
* test: add test to no-duplicated-task-keys rule

* feat: implement no-duplicated-task-keys

* chore: create testing scripts

* refactor: fill in rule meta

* feat: export no-duplicated-task-keys rule

* chore: bump package version to 0.0.1

* chore: create eslint plugin

* feat: create no-duplicated-task-keys rule

* refactor: delete no-duplicated-task-keys from config-custom

* refactor: rename eslint-plugin folder

* feat: cover case from nextjs-example

* feat: cover additional cases from examples/package-tester

* chore: add eslint-plugin on nextjs-example

* feat: add more cases from `nextjs-example`

* revert: rollback changes on eslint-config-custom

* Set version to 2.0.9, inline with other packages

* Create chilly-pianos-try.md

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-08-18 12:57:12 +01:00
Liran Tal 8f3e550d03 fix: small typo in function docblocks (#362) 2023-08-18 12:17:45 +01:00
Matt Aitken 65cff19ead Merge branch 'main' into main 2023-08-18 11:20:44 +01:00
Matt Aitken 591422b8cf CLI: added whoami command, fixed TypeScript error 2023-08-18 11:18:51 +01:00
neo773 bbaa6ba156 [TRI-1006] New @trigger.dev/cli whoami command. (#316)
* FIx: [TRI-1006] New @trigger.dev/cli whoami command.

* revert dev.ts zod schema to original

* Removed telemetry

* remove all telemetry

* Made the clientId optional again

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-08-18 10:41:06 +01:00
Liran Tal e20fa3c2ec fix: explicitly set a charset for rendered HTML documents (#355) 2023-08-18 06:49:39 +01:00
Liran Tal 57514f8771 fix: code quality nitpicks for some issues spotted (#357) 2023-08-18 06:48:48 +01:00
Chigala ef1a1ff343 added io.cancelEvent support and fixed other requested changes 2023-08-18 06:21:57 +01:00
Rishi Raj Jain 2fbaa30b9f Update index.ts 2023-08-17 23:45:44 +05:30
Rishi Raj Jain 1199e934c2 Merge branch 'main' into main 2023-08-17 23:45:12 +05:30
Wesley 83bcefe10c refactor: remove .js extension from cli package (#350)
* refactor: remove `.js` extension from cli package

* revert: rollback changes

* revert: rollback unnecessary changes

* Update createIntegration.ts

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-17 16:03:00 +01:00
Wesley 4ca9f182d7 test/TRI 887/setup jest on cli package (#326)
* chore: run `pnpm install --prefer-frozen-lockfile`

* chore: install `jest` and `ts-jest`

* test: create `jest.config.js`

* chore: install `@types/jest`

* chore: add `jest` on `tsconfig.json` `types` property

* chore: create test script

* test: create example test 🎉🎊🕺🏼

* chore: install `@gmrchk/cli-testing-library`

* chore: override `tsconfig` with `@trigger.dev/tsconfig`

* test: make poc of cli test

* chore: run build before test

* docs: improve comment

* Added a changeset

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-08-16 22:35:23 +01:00
Matt Aitken 5dec3ed4e6 Latest lockfile 2023-08-16 15:56:30 +01:00
github-actions[bot] 955961eb5f chore: Update version for release (#329)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-16 15:53:53 +01:00
Matt Aitken 33184a8130 Add subtasks to the schema/types when getting an individual run (#343)
* Add subtasks to the schema/types when getting an individual run

* Added a changeset
2023-08-16 15:49:08 +01:00
Eric Allam 5611768854 Improve the job reference 2023-08-15 10:20:30 +01:00
Chigala a3278cb8a2 bug fixes 2023-08-15 00:16:38 +01:00
Eric Allam d0e6442872 Add additional sendEvent exampels 2023-08-14 22:04:40 +01:00
Rishi Raj Jain 05b5ed6973 Update update.ts 2023-08-14 21:42:08 +05:30
Rishi Raj Jain 859425f093 Update update.ts 2023-08-14 21:32:55 +05:30
Matt Aitken 1e374d30d0 Latest lockfile… 2023-08-14 16:54:40 +01:00
Matt Aitken 9f649d2a27 Lock prisma to 5.1.1 2023-08-14 16:52:30 +01:00
Chigala 0a20b6e05a chore: updated prisma from version 4.16.0 to 5.1.0 (#254)
* chore: update prisma from version 4.16.0 to 5.1.0

* fixed the ts-errors due to the prisma update

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-08-14 16:36:40 +01:00
Eric Allam 78e2d0e9f9 Fix SSE causing app crashes when inner async loop takes too long
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-14 16:21:45 +01:00
Chigala 24c8f08267 feat: added the ability to cancel Events based on the event ID 2023-08-14 14:56:48 +01:00
Eric Allam 12de1b0d34 Update docs to reference @trigger.dev/react@latest instead of @next 2023-08-14 13:46:58 +01:00
Eric Allam b62df731fc Fixed the example Job trigger file import path when using Pages Router with no path alias 2023-08-14 13:40:59 +01:00
Liran Tal e347389b64 docs: Update integrations.mdx (#328)
* Update integrations.mdx

The first sentence in this paragraph for `### API Keys and Tokens` was missing a word or two and it wasn't entirely clear what did the original author of this docs page intended.

I've entered what seems to be the missing context but happy to re-phrase too if another wording makes better sense here.

* Made it clear that API keys are provided by you in your code

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-08-14 13:24:31 +01:00
Liran Tal 10f92a6124 docs: Update runs.mdx (#327)
* docs: Update runs.mdx

From what I can tell, it is expected for run functions to return with some sort of payload. Providing an example here as a reference and guideline.

* Made it clear returning data is optional and added some more detail below

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-08-14 13:22:14 +01:00
Eric Allam b957aa1752 Remove deprecated invitation-code route 2023-08-14 09:41:05 +01:00
Rishi Raj Jain 3159619852 revert pnpm changes 2023-08-12 11:28:27 +05:30
Rishi Raj Jain 300c102b31 remvoe axios and use node-fetch 2023-08-12 11:26:08 +05:30
Rishi Raj Jain 9e0b152c0e Update package.json 2023-08-12 11:19:18 +05:30
Arshad Jamal a998d6c505 Corrected clone link for Windows (#319) 2023-08-12 06:23:45 +01:00
Rishi Raj Jain 4e78da319c Create swift-eagles-float.md 2023-08-11 23:54:06 +05:30
Rishi Raj Jain 2c37091b08 complete the script 2023-08-11 23:48:37 +05:30
James Ritchie 5f739ee312 Removed ts-ignore and added types 2023-08-11 16:11:27 +01:00
James Ritchie fccba7db98 Upgraded the confetti to fireworks 2023-08-11 16:09:47 +01:00
Eric Allam 0f7b7ff6d6 Fix pnpm lock
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-11 15:52:52 +01:00
nicktrn 603ffbc426 docs: add supabase guide (#297)
* docs: add supabase guide

* feat: add support for external connection poolers

* chore: use .env symlink in database package

* chore: remove database .env.example

* docs: finish supabase pooling section

* docs: fix small typo

* docs: replace prisma with app wording

* docs: fix up supabase pooling section

* fix: deleted too much in contributing docs

* docs: change pooling heading

* docs: reduce linux shaming

* docs: include direct connection url in fly.io
2023-08-11 15:51:54 +01:00
github-actions[bot] beef7769c6 chore: Update version for release (#304)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-11 15:48:41 +01:00
Eric Allam e9088cf08c Supabase quickstart guide (#311)
* Added docs images for supabase

* Compressed some existing images

* Improved some of the main quickstart wording

* First draft of the Supabase quickstart

* Tweaks to the Supabase quickstart and the supabase integration docs

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
2023-08-11 15:29:53 +01:00
Eric Allam 390bed0b9a Some tweaks to the Event Filter guide 2023-08-11 14:38:43 +01:00
Eric Allam e3e3dab525 Fixed missing } in the express package 2023-08-11 14:34:31 +01:00
Chigala b884a0ab53 doc: added a new documentation for event filters (#300)
* doc: added a new documentation for event filters

* removed typos from the event filter doc and formatted it better.

* made new changes

- moved the eventfilter doc to the guides section
- linked the old eventfilter doc to the new one

* updated the eventfilter doc based on the requested changes
2023-08-11 14:25:04 +01:00
Liran Tal 871d6e1d52 fix: support express jsonParser middleware if used in the Express app (#309)
* fix: support express jsonParser middleware if used in the Express app

* Create sixty-windows-run.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-11 14:23:29 +01:00
Liran Tal 7daa82fc7a fix: avoid crashing the Node.js app on uncaught exceptions (#307)
* fix: avoid crashing the Node.js app on uncaught exceptions

* Create smooth-dodos-obey.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-11 14:18:31 +01:00
Eric Allam 9dd7fb2748 Improved the onboarding experience
- Automatically refresh the jobs page when there are no jobs
 - Celebrate 🎊
2023-08-11 14:08:39 +01:00
James Ritchie c246578a81 Made the CLI error more helpful if you’re not running your Next.js app 2023-08-11 11:24:52 +01:00
Chigala d395b95762 fix: Handle ngrok config upgrade error in createTunnel function (#295)
* fix: Handle ngrok config upgrade error in createTunnel function

* Improved the output when upgrading the ngrok configuration

* Create three-flies-sneeze.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-11 10:39:58 +01:00
Eric Allam f3bda59617 Fixed the sendgrid tsconfig 2023-08-11 10:16:24 +01:00
Eric Allam ef8b52c20f Fixed outdated lockfile issue 2023-08-11 10:15:08 +01:00
Chigala 2bedc779b9 feature: initial work for sendgrid integration (#264)
* feature: initial work for sendgrid integration

* fix: fixed the ts-error and added sendgrid integration to the job-catalogue

* SendGrid added to dependencies

* Made the from email an env var so it can be tested by non-Trigger.dev team members

* Refactor: Modify sendEmail function to return void and remove SendEmailResponse type

Co-authored-by: Matt Aitken <matt@mattaitken.com>

* Create funny-kangaroos-glow.md

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-11 10:12:19 +01:00
Eric Allam a5b5912270 Change the default max concurrent runs from 100 to 1000
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-10 17:21:37 +01:00
D-K-P 275318d2df Docs updates, including added Supabase to the examples table 2023-08-10 14:54:03 +01:00
nicktrn 8d48ebdee8 docs: supabase guide without pooling section (#299)
* docs: add supabase guide

* docs: add supabase to mint.json

* docs: change supabase schema from public

* docs: supabase pooling coming soon
2023-08-10 14:16:54 +01:00
Eric Allam 7ef0fe79b5 Update manual.mdx - spelling mistake 2023-08-10 11:21:06 +01:00
Yaswanth 921957958e Adds Missing syntax highlight to manual setup documentation (#298) 2023-08-10 10:30:22 +01:00
Eric Allam 73721fc55c Remove private beta mention in the docs 2023-08-10 09:33:50 +01:00
Eric Allam 4fcec3bd0d Organized imports
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-09 21:19:57 +01:00
Eric Allam 7f4b6b9974 Remove the invite code guard 2023-08-09 21:19:25 +01:00
Eric Allam 950ab24e7f Add the placeholder supabase quickstart 2023-08-09 21:14:34 +01:00
James Ritchie c4da1b4a9a Updated the discord link
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-09 16:09:33 +01:00
Eric Allam 24debf0cee Slight change to the supabase job catalog 2023-08-09 16:02:31 +01:00
James Ritchie 645643ea41 Improved onboarding (#292)
* Only show the Example Jobs list when you have 1 job

* Updated the logic for displaying the different information depending on the no. of jobs you have

* Removed some unnecessary markup

* Clicking on a radio option toggles the content

* Improved the centering of the help panel

* Conetent updates to the 2 onboarding paths

* Added a prompt so you click through to run your job

* More content updates to the help panel

* Only show the prompt if the Job has never been run

* Added back in the help panel which shows the examples table if you have > 0 jobs

* Added a dialog for the I am Stuck button

* Added the new ‘new-next-app’ text for the cli command

* Refactored the ternary logic so it’s simpler

* Removed I’m stuck button and cleaned up imports

* Added in feedback button

* Added margin bottom to the Callout on the Test popover

* WIP adding a new radio button variant that takes an icon

* Added a new step to create a new next app

* The state of the tabs is stored as a URL param

* Small shadow tweak to the side panel

* Added a Discord button to the feedback menu

* Added new icons to the Named icons component

* Added a gradient to the background of the jobs page

* Made the icons take on color outside of component

* Added another NamedIcon for tree

* Fixed number

* Improved some of the typography styles

* Updated the icons

* Fixed issue with radio buttons alignment

* Added a missing step to the new next app onboarding

* Refactored example code and added all the examples to the panel

* Small icon update

* Made the title white again

* Added an icon to the storybook radiogroup

* Added a badges storybook

* Chevron table cell now takes children

* import cleanup

* Changed the background image from an arbirary value to an import

* Added a NEW badge which shows if you have a new job

* Improved the copy on the Examples help panel and updated some of the layout

* Removed defaultOpen on the help panel

* Stop the icons getting smaller

---------

Co-authored-by: D-K-P <dkp.github@pm.me>
2023-08-09 15:00:08 +01:00
Eric Allam 321378db4f Run pnpm i to fix lock file
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-09 12:40:48 +01:00
github-actions[bot] c8b10ce188 chore: Update version for release (#291)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-09 12:40:15 +01:00
Eric Allam 57ed2b2d0d Fixed cli type errors 2023-08-09 12:37:22 +01:00
Eric Allam fa3a22eb78 Added an $isNull EventFilter condition matcher 2023-08-09 12:35:47 +01:00
Dan a1bc15d18b Updated the example job (#288)
* Changed the example job to include a delay

* Improved the example job copy and added ‘in a separate terminal’ to 2.

* Create kind-eggs-pump.md

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-08-09 12:21:46 +01:00
Yaswanth 3f48dd0a68 [TRI-945]: Adds manual project setup guide to the docs (#286)
Co-authored-by: Crossover <crossover@MacBook-Pro.local>
2023-08-09 12:18:05 +01:00
Eric Allam 5c71868a73 Fix the examples in the supabase integration 2023-08-09 12:16:27 +01:00
Chigala 3ce6decef4 Feat/scaffold job catalog file (#283)
* feat: adds a job catalog file when an integration is created via the CLI

* added a changeset

* fix: create-integration CLI throws an error when it tries to install dependencies

* Update getUserPkgManager.ts to main

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-08-09 10:42:20 +01:00
Eric Allam ab007f2708 Fix the CLI typecheck error 2023-08-09 10:41:06 +01:00
Eric Allam 8412680863 Adding createImageEdit and createImageVariation tasks to openai 2023-08-09 10:39:17 +01:00
Matt Aitken a90908df6e CLI init fixes: don't ask for endpoint slug, fix for next.config and package manager artifact issue (#287)
* If an endpointId isn’t in the arguments or package, then use the project slug. Don’t ask for it.

* Should await the package artifact detection

* Catch error thrown if there’s no next.config file when detecting the type of Next project

* Create long-carrots-camp.md
2023-08-09 10:37:10 +01:00
Eric Allam a82b86210f Fix pnpm lock file for package release 2023-08-08 22:08:40 +01:00
github-actions[bot] 0367a92731 chore: Update version for release (#281)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-08 22:08:12 +01:00
Eric Allam d230cf622f Treat @trigger.dev/sdk the same as @trigger.dev/core in the webapp
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-08 15:52:14 +01:00
Eric Allam a1bf073b43 Trigger another release run 2023-08-08 15:18:13 +01:00
Eric Allam 5588108b97 Add unit test running to the public CI 2023-08-08 15:04:15 +01:00
Eric Allam b9bcecffe3 Added some Supabase storage and auth triggers to the job catalog 2023-08-08 15:02:07 +01:00
Eric Allam 59075f5fc2 EventFilter now supports more complex condition filters #271 2023-08-08 15:02:07 +01:00
Sai Hari fa942fc9f5 feat: 🎸 add end-to-end test harness (#253)
* feat: 🎸 add end-to-end test harness

* Address PR comments
2023-08-08 13:55:25 +01:00
D-K-P 47a8a557cf Replaced all the screenshots of the environments page 2023-08-08 11:47:25 +01:00
Yaswanth b51d0b5399 Fix:[TRI-879]-Hides help panel when endpoints exists on the Environme… (#256)
* Fix:[TRI-879]-Hides help panel when endpoints exists on the Environments & API Keys page

* fix: adds check for fully configured client

g

---------

Co-authored-by: Crossover <crossover@MacBook-Pro.local>
2023-08-08 11:15:58 +01:00
D-K-P 763c84e3b3 Replaced api key screenshot and text 2023-08-08 10:41:33 +01:00
Eric Allam dfb00e84e9 Fixing pnpm lock file 2023-08-08 07:35:25 +01:00
github-actions[bot] b5a64545bb chore: Update version for release (#273)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-08 07:32:24 +01:00
Eric Allam 3cf3eaff48 @trigger.dev/supabase: You can now trigger on multiple database events in the same job 2023-08-07 17:27:49 +01:00
Matt Aitken 4ca758a3de job-catalog: added initial setup and CLI build step
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-07 15:07:58 +01:00
Matt Aitken da81537009 Update job-catalog instructions
`pnpm run trigger:dev` should be `pnpm run dev:trigger`
2023-08-07 14:57:08 +01:00
Eric Allam 7c1b13ba3b Increase webhook delivery attempts to the max 25 attempts over 3 days 2023-08-07 14:25:23 +01:00
D-K-P 4b654e5b3b Fixed broken docs link 2023-08-07 13:29:11 +01:00
Eric Allam 726a50ace7 Point to the workspace version of @trigger.dev/sdk 2023-08-07 13:17:36 +01:00
github-actions[bot] 9deffb67c4 chore: Update version for release (#267)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-07 13:08:27 +01:00
Matt Aitken ff04bf44ee CLI: detect package manager using artifacts if they exist (#261)
* Detect package manager from artifacts (e.g. package-lock.json) and fallback to process.env.npm_config_user_agent

* Added a changeset
2023-08-07 13:01:22 +01:00
Matt Aitken e740297829 Cli: improve Next.js project detection (#262)
* Detect presence of a “next” dependency

* Use a strict undefined check instead

* Changeset: Detect Next.js project by looking at dependencies, not next.config.js

* Read a package json file

* First check for next.config file, otherwise use next dependency

* Update changeset description
2023-08-07 13:01:03 +01:00
D-K-P a31705e198 Added text summarizer / github issue reminder jobs to the examples table 2023-08-07 12:58:43 +01:00
Eric Allam f0bdf53364 Auto index production endpoints every 10 minutes 2023-08-07 12:49:37 +01:00
Matt Aitken 9638499163 Add your first endpoint in the dashboard (#269)
* Created the sheet

* Started work on the resource route

* Created ValidateCreateEndpointService and the EndpointValidateApi (name TBC)

* The TriggerClient responds with the id

* Tidied some stuff up

* Alternative: EndpointApi doesn’t take endpointSlug. Instead just Ping() does

* Create cool-snakes-deny.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-07 11:28:34 +01:00
Matt Aitken 9104c252b7 Telemetry (new user) (#268)
* Removed old telemetry

* Started adding TriggerClient telemetry

* Added a log if the telemetry client is created, event renamed to “user.created”
2023-08-07 11:28:13 +01:00
Matt Aitken 72cf345602 Added “thumbsRating” to docs pages 2023-08-07 10:50:02 +01:00
jemiluv8 d5b8f8299d update cli init to create index file in examples folder (#225)
* update cli init to create index file in examples folder

* add patch changeset

* Create silly-baboons-join.md

* remove comment in router file
add comment in jobs index to instruct them to

* rename examplesIndex to examplesIndexFileName

* import jobs module in routeContent for createTriggerPageRoute just as we did for createTriggerAppRoute

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-08-06 16:42:32 +01:00
Matt Aitken dd22b88d25 Latest lockfile… 🙄 2023-08-03 22:52:46 +01:00
github-actions[bot] 62b9c5879c chore: Update version for release (#248) 2023-08-03 22:47:23 +01:00
Eric Allam 1b0973fbc1 Fixed error when configuring a new endpoint failed and fixed ping to now throw an error when parsing JSON
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-03 16:02:16 +01:00
Eric Allam fc78854ed4 @trigger.dev/cli: Don't require the TRIGGER_API_URL to be set (it has a default) 2023-08-03 14:49:46 +01:00
Eric Allam ed15bb0618 Another small supabase tweak 2023-08-03 13:09:56 +01:00
Eric Allam ced9034428 Another small supabase doc fix 2023-08-03 13:08:42 +01:00
Eric Allam 7ec329d5d6 Fixed broken image in supabase docs 2023-08-03 13:06:23 +01:00
Eric Allam 81180999de The dev command should use a POST request when doing the PING to the local server 2023-08-03 13:01:08 +01:00
Eric Allam feaa79ecf3 @trigger.dev/supabase: Automatically enable database webhooks when using triggers 2023-08-03 13:00:29 +01:00
Eric Allam d34dc0847c More OpenAI examples 2023-08-03 09:55:07 +01:00
Eric Allam 1b7c7520b4 new Job -> client.defineJob 2023-08-03 09:53:15 +01:00
Eric Allam 34d77e830c Incorporate improved OpenAI docs from old repo 2023-08-03 09:51:25 +01:00
Eric Allam 87c302bf26 Document how to enable supabase database webhooks 2023-08-03 09:39:58 +01:00
Eric Allam d462c901f5 A couple of quickstart tweaks 2023-08-02 17:16:39 +01:00
D-K-P 55c3d79cc8 Deleted the info box on the integration pages 2023-08-02 17:11:41 +01:00
Eric Allam ce901c92e4 Update @trigger.dev/supabase to the latest supabase-management-js 2023-08-02 17:01:02 +01:00
Matt Aitken 0fd409c6dc Latest lockfile 2023-08-02 16:08:50 +01:00
github-actions[bot] f4e7379768 chore: Update version for release (#247)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-02 16:06:27 +01:00
Matt Aitken ee99191fb4 Sync all package version numbers 2023-08-02 15:58:56 +01:00
Matt Aitken 18124ae32a Sync all of the package version numbers 2023-08-02 15:45:20 +01:00
Eric Allam de3373b8f9 Fixed pnpm lock file
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-02 15:40:26 +01:00
Eric Allam bdb4e6e2bd Only publish latest docker images when tagged with v.docker.x.y.z 2023-08-02 15:38:53 +01:00
Matt Aitken 0a790de2c1 core version changed to 1.0.0. Dependencies for core set to ^1.0.0 2023-08-02 15:21:19 +01:00
Eric Allam ffb55bfde6 Add react package docs 2023-08-02 15:18:03 +01:00
github-actions[bot] c0fbe56f79 chore: Update version for release (#246)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-02 15:10:36 +01:00
Eric Allam 342ab0d471 Adding docs back into this repo 2023-08-02 15:09:35 +01:00
Matt Aitken aa9fe7d408 core made public, react and sdk now have it as a dependency (not dev) 2023-08-02 15:07:14 +01:00
Eric Allam f499c10f09 Run pnpm i to fix pnpm-lock
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-02 14:19:46 +01:00
github-actions[bot] 45ed7cdf38 chore: Update version for release (#238)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-02 14:18:12 +01:00
Eric Allam fa271aaed2 Tweaked the SDK package readme 2023-08-02 13:42:45 +01:00
Eric Allam 8883476dcb Specify limited paths that will cause our github workflows to run 2023-08-02 13:27:44 +01:00
Eric Allam c1755ff85b Removed error logging from the stripe integration 2023-08-02 11:53:42 +01:00
Eric Allam 6d04f6c62a Added default retry settings for all integration tasks 2023-08-02 11:53:09 +01:00
Eric Allam 53363711bb Fixed type errors in the cli 2023-08-02 11:50:50 +01:00
Eric Allam 442ee45e97 Upgrade to Remix 1.19.2-pre.0 to try and fix premature close issue
https://github.com/remix-run/remix/issues/4993#issuecomment-1661221726
2023-08-02 11:49:04 +01:00
Eric Allam 8405b337f9 Fix seed files by copying any .node query engine file in entrypoint.sh 2023-08-02 10:21:41 +01:00
Matt Aitken facae926ce Added telemetry to the CLI (#242)
* Basic CLI telemetry

* Telemetry for init command

* Better error handling

* Fix for “Module not found: Can't resolve 'encoding' in” node-fetch warning

* Telemetry for dev and tidied up init

* Minor improvements to the telemetry

* Latest package lock file

* Set the PostHog key to the prod one

* Changesets

* Formatted
2023-08-02 09:47:08 +01:00
Eric Allam 9544624e00 Adding compound triggers to Stripe and added a WIP express adapter 2023-08-01 16:06:42 +01:00
Matt Aitken a489fd465f @trigger.dev/init and @trigger.dev/internal references updated to the new package names 2023-08-01 12:10:49 +01:00
Matt Aitken 9ff4c0dbd5 Project-wide Prettier setup (#237)
* Setup project-wide prettier

* Remove old workspace file

* Remove old debugging directives

* New top-level .prettierignore

* Updated Prettier config settings

* Contrubuting guide: Fix for some bad code blocks

* Added more ignores

* Improved the format script command

* printWidth set to 100

* Formatted entire repo (pnpm run format)
2023-08-01 10:21:22 +01:00
Eric Allam 36ec16babe feat: encrypt values in SecretStore using an encryption key (#240)
* feat: encrypt values in SecretStore using an encryption key and `aes-256-gcm`

* Stopped using apiCors in the connectionId API endpoint
2023-08-01 10:11:47 +01:00
Matt Aitken 92233f2e90 Core package and move to @latest (#235)
* Changeset should ignore the example projects

* Removed note in Contributing instructions about not adding a changeset for internal

* Renamed @trigger.dev/internal to @trigger.dev/core. Set sdk and internal to be ES2020, so we don’t get errors about private identifiers

* Env vars in nextjs-example use square bracket syntax to avoid Turbo Repo errors

* Set the tsconfigs back for core and sdk

* @examples/nextjs compile error with undefined tasks

* Set the example projects to use ES2015 to avoid private modifier complaints

* package-tester example, which will use built packages

* package-tester package.json

* Created a readme for the package-tester

* Added all the packages to package-tester

* Create .env.local.example and readme instructions

* Added name to the package.json

* Upgraded @types/react and @types/react-dom everywhrre, so we can use server actions

* Upgraded @types/react and @types/react-dom everywhrre, so we can use server actions

* Reworked the react package build, so it generates separate files

* The SDK no longer bundles core

* package-tester setup with a server action and react hooks

* Added new SDK methods with logging

* Working tsup settings for client and server

* Explicit react hooks return types

* Added all the hooks for testing

* Added OpenAI step to the job to check types are still ok in integrations

* Get rid of rogue Changeset ignores

* Changeset: @trigger.dev/core is now a separate package

* Exited prerelease mode, added a changeset

* Changed @next to @latest

* Deleted seed.js, this shouldn’t be committed

* Ignore seed.js

* The webapp was importing @trigger.dev/core with a folder path rather package name…

* More webapp imports instead of @trigger.dev/core were a folder path

* Accidentally edited Stripe internal API url in the comment

* Added “sideEffects”: false so @trigger.dev/core is tree shaken by Remix
2023-07-31 18:47:34 +01:00
Ashutosh Bhadauriya efd590976c Feat: Detect if a Next.js project is running on the specified port before opening a tunnel (#214)
* Feat: Detect nextjs project

* Add check before opening tunnel

* Update dev.ts

* Add changeset
2023-07-31 16:43:44 +01:00
Matt Aitken 463cbed7df Merge pull request #226 from Chigala/feature/multiple-eventname-support
Feature/multiple eventname support in eventDispatcher
2023-07-31 16:14:25 +01:00
Matt Aitken 9138976dad Changeset: Multiple eventname support in eventDispatcher 2023-07-31 16:13:35 +01:00
Matt Aitken ace4d5f6ce Merge pull request #228 from jemiluv8/migration-contribution-guide
chore: add instructions for adding migrations to the project
2023-07-31 16:07:05 +01:00
Matt Aitken b09ecb0b06 Update CONTRIBUTING.md 2023-07-31 16:06:39 +01:00
Matt Aitken 10fef0f667 Improved the migration instructions 2023-07-31 16:06:12 +01:00
Eric Allam 3e5945fb9e Stop storing github access tokens for github authenticated users 2023-07-31 15:41:44 +01:00
Akhil fdf1b2148c feat: added git database tasks for github integration (#204)
* feat: added git database tasks for github integration

* feat: added examples for git database tasks
2023-07-31 09:50:41 +01:00
Eric Allam 7e4d72f959 Made the migration non-destructive and fixed other typechecking issues 2023-07-28 18:19:41 +01:00
Chigala 3e203ea967 Merge branch 'main' into feature/multiple-eventname-support 2023-07-28 17:53:31 +01:00
github-actions[bot] af56598a58 chore: Update version for release (next) (#234)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-28 16:27:36 +01:00
Eric Allam 1fef1fa5f8 Adding native property to get access to underlying client in local auth only integrations 2023-07-28 16:12:41 +01:00
github-actions[bot] bd2f68a51d chore: Update version for release (next) (#233)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-28 14:48:57 +01:00
Eric Allam 64477f6b3a @trigger.dev/sdk: Adding some type helpers for getting the payload and IO types from jobs and triggers 2023-07-28 14:42:28 +01:00
Eric Allam 8b09dfd697 Fix pnpm lock file 2023-07-27 22:14:40 +01:00
github-actions[bot] f330673143 chore: Update version for release (next) (#232)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-27 22:14:06 +01:00
Eric Allam 9351c05126 Initial @trigger.dev/stripe integration, with support for triggers and tasks (#231)
* Initial Stripe integration, with support for triggers and tasks

* Adding stripe integration to the catalog
2023-07-27 22:09:07 +01:00
Matt Aitken af722e54d8 Made the integration items capable of fitting more text 2023-07-27 19:59:20 +01:00
Matt Aitken 1eb89844f4 Added a description to the Supabase Management integration so the differences are obvious 2023-07-27 19:57:03 +01:00
Matt Aitken 004423aea3 Merge pull request #229 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-27 17:14:03 +01:00
github-actions[bot] 369c6245ab chore: Update version for release (next) 2023-07-27 16:07:50 +00:00
Matt Aitken b8ae937966 TSUP working properly 2023-07-27 17:05:43 +01:00
Matt Aitken 3b510a4f3d Put paths back 2023-07-27 16:30:56 +01:00
Matt Aitken b3e609d53d Experimenting with bundling 2023-07-27 16:10:19 +01:00
Matt Aitken 2f07a792e9 Removed some unused vars 2023-07-27 16:10:05 +01:00
Matt Aitken 078bf2bc9c React package bundling changed 2023-07-27 15:14:01 +01:00
Matt Aitken a7c8f0b90e Merge pull request #227 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-27 11:18:56 +01:00
Jemilu Mohammed 495acf4319 modify step 3 of migrations instructions 2023-07-27 10:17:40 +00:00
Jemilu Mohammed dce86119d4 add instructions for adding migrations to the project 2023-07-27 10:14:49 +00:00
github-actions[bot] 2c70b7a360 chore: Update version for release (next) 2023-07-27 10:00:21 +00:00
Matt Aitken c518185947 Merge pull request #221 from triggerdotdev/react-hooks
Get the status of runs and events, using the SDK or @trigger.dev/react hooks
2023-07-27 10:58:37 +01:00
Matt Aitken b314178de2 SDK Changeset: Added getEvent(), getRun() and getRuns() methods to the client 2023-07-27 10:22:52 +01:00
Chigala e0a2cec978 Chore: Modified eventTrigger to accept a string and an array of strings. 2023-07-27 00:09:03 +01:00
Matt Aitken d3608be1a0 Improved the environments help text – it now references server API keys 2023-07-26 22:00:16 +01:00
Matt Aitken 4c79129242 authenticateApiRequest() now returns an object with the apiKey, type and environment 2023-07-26 21:54:20 +01:00
Chigala 8ac83f1d59 added multiple event name support to the eventDispatcher 2023-07-26 21:18:03 +01:00
Matt Aitken 17e6d42989 Removed unused const in RunPresenter 2023-07-26 20:49:09 +01:00
Matt Aitken 0a3bbc1caf Merge remote-tracking branch 'origin/main' into react-hooks
# Conflicts:
#	apps/webapp/app/presenters/RunPresenter.server.ts
#	examples/nextjs-example/src/app/api/trigger/route.ts
#	examples/nextjs-example/tsconfig.json
2023-07-26 20:47:07 +01:00
Matt Aitken 89e1331e49 Better error handling for the job runs endpoint 2023-07-26 18:57:11 +01:00
Matt Aitken d934a53e6d Better error handling for the runs endpoint 2023-07-26 18:57:02 +01:00
Matt Aitken 2398d60b1a Added noExternal for the @trigger.dev/internal package 2023-07-26 18:54:12 +01:00
Matt Aitken 1bd755b628 Example project: Use POST for the test event 2023-07-26 18:52:07 +01:00
Eric Allam 861d5fa1b9 Fixed pnpm lock why does this happen 2023-07-26 18:22:20 +01:00
github-actions[bot] 0239fc6773 chore: Update version for release (next) (#222)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-26 18:20:42 +01:00
Eric Allam de57592d79 @trigger.dev/resend now retries failed email sends 2023-07-26 18:17:27 +01:00
Eric Allam f70f3a0a5d Fixed doubling of the params option 2023-07-26 18:14:07 +01:00
Matt Aitken 6c96b331dd Event API endpoint safe parsing and better error handling/responses 2023-07-26 18:03:32 +01:00
Eric Allam 767e09ee18 New integration: @trigger.dev/supabase (#203)
* WIP supabase integration

* supabase oauth working

* Supabase database triggers

* Specify postgres:14

* Limit refreshOAuthToken jobs to 10 attempts

* Better displaying types and removing onChange for now

* WIP on the supabase db client

* Finishing the supabase-js integration

* Adding changeset

* Added supabase to the integration catalogs, and added an optional icon to Integrations

* Reworking how we handle types for the triggers (wip)

* Update fully over to the new way to define supabase triggers

* Go back to using the type for the event name

* Add back in the icon to the JobListPresenter since it was moved from the ProjectPresenter

* Remove unused import
2023-07-26 18:01:27 +01:00
Matt Aitken b2f3ade7c7 Renamed Secret API keys to Server API keys 2023-07-26 17:55:34 +01:00
alubọsa 8f050b40c1 chore(docs): add changeset guide to contributing.md (#219)
* chore(docs): add changeset guide to contributing.md

* chore: text changes to changeset guide

* Update CONTRIBUTING.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-07-26 17:30:58 +01:00
Ashutosh Bhadauriya 3cf01ff14c Add testing CLI changes guide to contributing.md (#220)
* Add testing CLI changes guide to contributing.md

* Update backticks
2023-07-26 17:18:42 +01:00
Matt Aitken 73e0084125 New lock file after main merge 2023-07-26 16:44:37 +01:00
Matt Aitken 093c9ec015 Merge remote-tracking branch 'origin/main' into react-hooks
# Conflicts:
#	pnpm-lock.yaml
2023-07-26 16:44:09 +01:00
Matt Aitken 475dddfbe4 Added private API keys to the environment page, with some explanatory text 2023-07-26 16:41:17 +01:00
Matt Aitken 188e4f2740 Added an outline styled for badges 2023-07-26 16:40:51 +01:00
Matt Aitken 4dc2b3184b Fix for missing pkApiKey in seedCloud script 2023-07-26 16:23:40 +01:00
Matt Aitken 139d541d86 Return the pkApiKey and sort the environments correctly (dev, preview, staging, prod) 2023-07-26 15:32:35 +01:00
Eric Allam 10798c0a05 Fixed the pnpm lock file 2023-07-26 14:45:42 +01:00
Matt Aitken 9c6ad11479 Latest lockfile 2023-07-26 14:43:54 +01:00
Matt Aitken 5527ef17f4 Merge remote-tracking branch 'origin/main' into react-hooks 2023-07-26 14:38:55 +01:00
Matt Aitken 981f4010a9 Shortened the delays in the hooks example to make it less annoying when testing 2023-07-26 14:38:05 +01:00
github-actions[bot] db7e8923c0 chore: Update version for release (next) (#212)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-26 14:37:48 +01:00
Hans Bignon K. Tognon 0eef5c2f01 Adds steps to contributing guide for running some jobs locally (#209)
* chore(contrib): added a few jobs

* chore(contrib): adds sample jobs for repo setup

* chore(contrib): refactor examples/jobs-starter

* docs(contrib): add steps to add starter jobs

* fix(contrib): typo

* chore(contrib): minor edits

* chore(contrib): update guide and starter code
2023-07-26 14:27:27 +01:00
Matt Aitken 08901f2e8a Merge remote-tracking branch 'origin/main' into react-hooks 2023-07-26 14:07:09 +01:00
Matt Aitken 51b365226d In the Job list, show the latest run across all environments
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-07-26 13:37:48 +01:00
Matt Aitken 0b89ee7eb5 ProjectsMenu truncates long titles and the badge is right-aligned 2023-07-26 13:37:18 +01:00
Sai Hari d7c4b24203 chore: 🤖 replace tsconfig package with tsconfck package (#218) 2023-07-26 07:22:16 +01:00
Matt Aitken d7352867ec Merge pull request #215 from katrieltsepelevish/fix/contributing-readme-running
Fix: Updated contributing README for running in development
2023-07-25 20:31:43 +01:00
Matt Aitken a2b97bd918 First changeset for the react package 2023-07-25 20:08:54 +01:00
Matt Aitken 5991a767f7 TriggerClient method for getRuns with a jobSlug. This will only work with the private API key 2023-07-25 20:00:19 +01:00
Matt Aitken 643eba263e Default to returning 20 tasks and set max to 50 2023-07-25 19:59:42 +01:00
Matt Aitken 4db8a3992b We don’t need the environmentId 2023-07-25 19:26:34 +01:00
Matt Aitken 03f7156749 API endpoint for getting the latest runs 2023-07-25 19:15:15 +01:00
Matt Aitken d9912e5548 jsdocs for the getEvent output 2023-07-25 18:13:14 +01:00
Matt Aitken 3c85c985d9 Added getEvent and getRun methods to TriggerClient. Added JSDocs to the types 2023-07-25 18:11:28 +01:00
Matt Aitken 0cf848b9b9 Show the job output in the example 2023-07-25 17:52:49 +01:00
Matt Aitken ef4056abde Only allow showing the task details if it’s a private API key 2023-07-25 17:52:40 +01:00
Matt Aitken 3a6c25d42d API authentication updated to work correctly with public and private keys 2023-07-25 17:52:20 +01:00
Matt Aitken 642c95027c Return an output from the hook test job 2023-07-25 17:51:25 +01:00
Matt Aitken 8a66a5c6c7 Migrate: Make the pkApiKey unique and non-null 2023-07-25 17:51:14 +01:00
Katriel Tsepelevish 7dcc55a083 Updated README 2023-07-25 19:33:16 +03:00
Matt Aitken 6989fec9d0 New API keys (public or private) now have 20 random characters 2023-07-25 17:06:01 +01:00
Matt Aitken bba190e4e9 Use apiCors function for the event endpoint too 2023-07-25 16:36:19 +01:00
Matt Aitken 6f670c8cc6 Use v5 react-query so we don’t need a QueryClientProvider. Improved the retrying behaviour 2023-07-25 16:36:09 +01:00
Katriel Tsepelevish d8626c624f Updated contributing README 2023-07-25 18:35:18 +03:00
D-K-P 454ad25b1d Updated the ID question in the CLI 2023-07-25 16:30:28 +01:00
D-K-P 4dce703b20 Changed the create a job in code callout from Quick start to Create a Job 2023-07-25 16:17:57 +01:00
D-K-P ce1e911c90 Fixed the github link on the examples job table 2023-07-25 16:13:08 +01:00
D-K-P f84f4dcee6 Updated the blank jobs page instructions 2023-07-25 16:02:03 +01:00
D-K-P bfa3757ee0 Updated the help & feedback copy 2023-07-25 15:16:33 +01:00
Matt Aitken 1fea5d7af3 React hooks are working in the example 2023-07-25 14:38:39 +01:00
Matt Aitken dd33bbf6a8 Reworked the next-js project to just have the app directory 2023-07-25 13:38:46 +01:00
Matt Aitken 74640b1a82 Custom react query context for the package 2023-07-25 13:38:32 +01:00
Eric Allam 51e6a74eda Lock turborepo to a specific version (1.10.10 breaks our Docker builds) 2023-07-25 13:37:40 +01:00
alubọsa 27a9812194 chore: use endpointId if it exists in package.json (#200)
* chore: use endpointId if package.json has it

* minor

* add changeset

* chore: include changeset

* chore: add proper summary to changeset

* chore: remove redundant changeset file
2023-07-25 13:27:35 +01:00
Eric Allam ba03a9ed20 Merge pull request #207 from jemiluv8/js-support-for-init-command
feat: Add Javascript support for init command
2023-07-25 13:09:56 +01:00
Matt Aitken f5c1c62a09 export SentEvent from the SDK 2023-07-24 17:48:07 +01:00
Matt Aitken 420e719db2 useEventRunDetails combines the two hooks 2023-07-24 17:23:32 +01:00
Matt Aitken c448f53964 Run hook fixes 2023-07-24 17:12:16 +01:00
Matt Aitken 72230f67d8 Improved the hook 2023-07-24 17:03:11 +01:00
Matt Aitken 4bdc28d7fc apiCors has 5 min maxAge 2023-07-24 17:03:02 +01:00
Matt Aitken eb5195768b Moved the run query to runs/$runId, instead of /tasks 2023-07-24 13:28:33 +01:00
Matt Aitken 5b6539d799 Improved the display of the react hooks in the example 2023-07-24 13:13:19 +01:00
Matt Aitken b1b471cf63 Removed the optional stuff from react zodfetch function 2023-07-24 13:13:09 +01:00
Matt Aitken bcd80463f3 Removed the parentId from the RunTaskSchema 2023-07-24 13:12:34 +01:00
Matt Aitken e2781cb090 Don’t return the task details unless they’re asked for, fix so the child tasks aren’t returned if they’re not asked for 2023-07-24 13:12:19 +01:00
D-K-P 09f906f7a1 Updated the invitation code page copy 2023-07-24 10:18:11 +01:00
Jemilu Mohammed 706ab20ced add "patch" change set for feature to support nextjs projects using javascript 2023-07-23 19:04:18 +00:00
Jemilu Mohammed 1dde615686 add change set for feature to support nextjs projects using javascript 2023-07-23 18:49:14 +00:00
Matt Aitken dda8be1fd0 Remove log 2023-07-23 19:26:25 +01:00
Matt Aitken 2888877463 Missed a cors response wrapper 2023-07-23 19:26:13 +01:00
Matt Aitken ac4253a187 Only refetch the run if it’s not complete 2023-07-23 19:26:00 +01:00
Matt Aitken a6f79d77d1 Run hook 2023-07-23 19:18:19 +01:00
Matt Aitken 4ca841a1d5 Query to get environment from either the apiKey or the pkApiKey 2023-07-23 19:06:34 +01:00
Matt Aitken 4d2a8728be Getting events is allowed with allowPublicKey 2023-07-23 19:06:18 +01:00
Matt Aitken ae3afdfc7e Allow public key api requests, if the flag is passed 2023-07-23 19:05:30 +01:00
Matt Aitken e135b06e2c Show errors, not working properly yet 2023-07-23 18:42:36 +01:00
Matt Aitken 106843be09 Checks for the correct public key format 2023-07-23 18:42:20 +01:00
Matt Aitken 022021dc4b Allow CORS for the GET events endpoint 2023-07-23 18:27:23 +01:00
Matt Aitken 8815b1608e Set the api url to localhost:3030 2023-07-23 18:26:59 +01:00
Matt Aitken 3dcd7743be Requests are happening but failing CORS 2023-07-23 18:03:39 +01:00
Matt Aitken 66fd838085 Setup the Nextjs example homepage with the TriggerProvider 2023-07-23 17:51:24 +01:00
Matt Aitken b04852c98c useQueryEvent 2023-07-23 17:51:03 +01:00
Matt Aitken ad19bfa283 Added zod fetch function 2023-07-23 17:50:51 +01:00
Matt Aitken ee86910caa Pass in default api url 2023-07-23 17:50:36 +01:00
Matt Aitken 9a4daaf024 Better errors for api key 2023-07-23 17:40:04 +01:00
Matt Aitken fcf1202af3 Added React package to Next.js example project 2023-07-23 17:36:55 +01:00
Matt Aitken 43c402ccae Initial React package with provider 2023-07-23 17:36:20 +01:00
Matt Aitken 24334a1e78 API client methods for getting event and run data 2023-07-23 16:25:13 +01:00
Matt Aitken 37e27510de Return some run info as well 2023-07-23 16:24:11 +01:00
Matt Aitken fe35e8ea39 Return the updatedAt time as well 2023-07-23 16:03:15 +01:00
Matt Aitken db49879584 API endpoint for getting event details 2023-07-23 16:02:02 +01:00
Matt Aitken df68305f28 Don’t get subtasks by default when using GET on API tasks 2023-07-23 15:41:13 +01:00
Matt Aitken 078b10ccea API endpoint for getting tasks changed to return more selective info. Use taskListToTree 2023-07-23 15:34:05 +01:00
Matt Aitken 1f8a36efb4 Changed task query from getting children to creating tree afterwards from all the tasks 2023-07-23 14:27:31 +01:00
Jemilu Mohammed b0c386ff87 fix bug when detecting app dir for js project
fix typo in createTriggerAppRoute
2023-07-22 20:38:10 +00:00
Jemilu Mohammed 8b69e06f79 rely on jsconfig.json file if javascript project revert unnecessary workarounds 2023-07-22 17:39:19 +00:00
Jemilu Mohammed 24aa4c7406 fix error in jobsPathPrefix and routePathPrefix for Javascript projects 2023-07-22 16:38:24 +00:00
Jemilu Mohammed 621c45aaf1 remove redundant Job import from @trigger.dev/sdk in jobsContent template string 2023-07-22 16:09:16 +00:00
Jemilu Mohammed 9f67b83bc5 fix formatting 2023-07-22 16:03:03 +00:00
Jemilu Mohammed da7dfd4bca revert files added wrongly 2023-07-22 16:01:44 +00:00
Jemilu Mohammed 07250f4ace Add support for Javascript nextjs projects in
removed assertion for whether the next project is using typescript
modify getPathAlias to work with non ts projects
2023-07-22 15:58:42 +00:00
Jemilu Mohammed 8b5055d9d3 initial commit for js example 2023-07-22 14:50:22 +00:00
Eric Allam ec36918061 Merge pull request #188 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-21 09:34:04 +01:00
github-actions[bot] c895722ffc chore: Update version for release (next) 2023-07-21 08:26:49 +00:00
James Ritchie 7df34db36b Merge remote-tracking branch 'origin/blank-jobs-page-improvements' 2023-07-21 09:25:14 +01:00
James Ritchie 3008909f02 Moved the example jobs list to the left column and only shows when 1 job is visible 2023-07-20 18:37:01 +01:00
D-K-P 8af381729c Added example projects to the blank jobs page 2023-07-20 17:36:23 +01:00
D-K-P 8ca0aeb1bd Updated the side panel copy 2023-07-20 14:48:33 +01:00
Eric Allam 99f8ec935b Fixed pnpm lock 2023-07-20 14:39:42 +01:00
Eric Allam d07cfe8fdb Merge pull request #194 from dylanrod21/main
[TRI-699] using pathToFileURL on path used in detectPagesOrAppDir
2023-07-20 14:37:36 +01:00
Dylan Rodriguez 2f1b2a32c3 adding changeset 2023-07-20 09:09:21 -04:00
D-K-P b6fd62eb54 Changed ‘Send us feedback’ to ‘Help & feedback’ 2023-07-20 12:17:34 +01:00
Eric Allam 1dfe7e0ab5 Updated dev-compose.yml and added some scripts to run it in package.json 2023-07-20 10:31:39 +01:00
Eric Allam 17c7e9765e Merge pull request #197 from SSHari/patch-700
chore: 🤖 improve migrations for docker container startup
2023-07-20 10:31:22 +01:00
Eric Allam 0ae03477df Merge pull request #196 from SSHari/patch-702
feat: 🎸 filter organization > project > jobs to internal=false
2023-07-20 10:11:48 +01:00
Eric Allam 2348e95b6c Merge pull request #195 from SSHari/patch-701
feat: 🎸 add project job count pill to breadcrumb project menu
2023-07-20 10:10:47 +01:00
SSHari 439ecf4a7f chore: 🤖 improve migrations for docker container startup 2023-07-19 21:34:16 -04:00
Dylan Rodriguez 68750da731 Revert "adding where condition on job count"
This reverts commit 61de39712a.
2023-07-19 19:23:40 -04:00
Dylan Rodriguez 61de39712a adding where condition on job count 2023-07-19 19:11:57 -04:00
SSHari d32e6f9839 feat: 🎸 filter organization > project > jobs to internal=false 2023-07-19 19:05:37 -04:00
SSHari 0cda4621c7 feat: 🎸 add project count pill to breadcrumb project menu 2023-07-19 18:48:07 -04:00
Eric Allam 4bcd654e49 Merge pull request #185 from SSHari/patch-573
feat: 🎸 move get project jobs to lower level in app hierarchy
2023-07-19 22:22:37 +01:00
Dylan Rodriguez bf0a0a17a0 normalizing path in detectPagesOrAppDir 2023-07-19 17:14:25 -04:00
SSHari ca59b6b236 Fix requested changes 2023-07-19 12:24:31 -04:00
Eric Allam 2a6cd98d4e Merge pull request #187 from SSHari/patch-445
feat: 🎸 update Docker image to use best practices
2023-07-19 16:56:36 +01:00
Matt Aitken d4da2f322b Added GitHub getIssue Task (with example Job) 2023-07-19 16:31:55 +01:00
SSHari 04ce02bb5d feat: 🎸 update Docker image to use best practices 2023-07-18 16:10:13 -04:00
SSHari 62e3bb93c1 feat: 🎸 move get project jobs to lower level in app hierarchy 2023-07-18 12:10:45 -04:00
Eric Allam 7da6b94daf Add linux header 2023-07-18 16:14:43 +01:00
Eric Allam e95bd3b6fe Rename docker-setup to DOCKER_INSTALLATION and link to our Docker repo 2023-07-18 16:13:42 +01:00
Eric Allam 8e4c70468d Merge pull request #182 from kaf-lamed-beyt/docker-setup
chore(docs): docker-setup guide
2023-07-18 16:11:07 +01:00
Eric Allam 1ea5082314 Use the typesafe env vars instead of process.env directly
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-07-18 15:43:27 +01:00
Eric Allam 267cbc751c Automatically re-write endpoint url from localhost to host.docker.internal when running in Docker Compose
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-07-18 14:20:52 +01:00
James Ritchie 5e522e1f3e Updated the yarn install to yarn dlx 2023-07-18 10:51:50 +01:00
Eric Allam ba7ef25bcb Merge pull request #184 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-17 17:20:37 +01:00
github-actions[bot] e132ea33f2 chore: Update version for release (next) 2023-07-17 16:18:09 +00:00
Eric Allam d0b19d50e4 @trigger.dev/cli: Add option to specify the path to the handler function in the dev command 2023-07-17 17:16:24 +01:00
Eric Allam 226ded6156 Merge pull request #183 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-17 16:47:31 +01:00
github-actions[bot] 8f5abfd0a6 chore: Update version for release (next) 2023-07-17 15:47:03 +00:00
Eric Allam 1bf2802b67 @trigger.dev/cli: Parse .env files using dotenv instead of hand-parsing 2023-07-17 16:45:12 +01:00
Eric Allam b95826840a Merge pull request #181 from triggerdotdev/changeset-release/main
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
chore: Update version for release (next)
2023-07-17 16:34:23 +01:00
github-actions[bot] 584e2b3ffb chore: Update version for release (next) 2023-07-17 15:29:22 +00:00
Eric Allam 69af845ad1 Make isRetry context property backwards compatible and add it to the TriggerContext type 2023-07-17 16:27:53 +01:00
Eric Allam fba8eec319 Don’t include application/json Content-Type when pinging with no body (fastify doesn’t like that) 2023-07-17 16:23:50 +01:00
Eric Allam 01c0f9b324 Allow the CLI dev command to work outside of a Next.js project 2023-07-17 16:21:21 +01:00
Matt Aitken 86e8ccbbd6 If the run info is missing then don’t render that part of the breadcrumb
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-07-17 14:08:35 +01:00
Eric Allam 0b45338300 Remove the bad RESEND_API_KEY from .env.example 2023-07-17 13:00:38 +01:00
kaf-lamed-beyt eafe6a0d7b chore(docs): add docker setup guide. remove prev code implementation 2023-07-17 12:17:09 +01:00
Eric Allam 3fb41f68fb Merge pull request #180 from SSHari/patch-409
feat: 🎸 add live refreshing to Environments & API key page
2023-07-17 11:52:15 +01:00
Eric Allam f5c819a489 Merge pull request #177 from akhill10/feat/isRetry-on-context-run
feat: added isRetry in context.run
2023-07-17 11:48:33 +01:00
Eric Allam 5336317dbb Merge pull request #176 from akhill10/feat/client-define-job
feat: added defineJob method in TriggerClient
2023-07-17 11:40:44 +01:00
kaf-lamed-beyt 6099e06a71 update JobPresenter query to use findFirst. 2023-07-16 15:21:19 +01:00
Akhil 0066971b77 chore: added changeset 2023-07-16 10:36:27 +00:00
Akhil c417a7f9ab feat: added isRetry in jobRunExecution 2023-07-16 07:19:37 +00:00
Akhil 1961b994d7 chore: added changeset 2023-07-16 05:19:30 +00:00
SSHari 5288ca3840 feat: 🎸 add live refreshing to Environments & API key page 2023-07-15 18:24:33 -04:00
Akhil f985dc93aa fix: defineJob with generic for triggerType 2023-07-15 16:30:11 +00:00
Akhil d6e43c40c9 feat: added defineJob method in TriggerClient 2023-07-15 15:55:53 +00:00
kaf-lamed-beyt 184c24cace refactor: use userId instaed of jobId in JobsPresenter 2023-07-15 13:41:44 +01:00
kaf-lamed-beyt 9861cb9aa7 refactor: rewrite JobsPresenter to return a list of Jobs for the project and direct new contributors to the docker setup guide 2023-07-14 19:23:51 +01:00
Matt Aitken 2d722b94bd Latest lockfile 2023-07-14 17:33:24 +01:00
Matt Aitken 2db67e3b4d Merge pull request #171 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-14 17:29:43 +01:00
github-actions[bot] 6290232858 chore: Update version for release (next) 2023-07-14 16:22:31 +00:00
Matt Aitken 7f6bf992a2 Better visibility into webhook registering, fix for Typeform SDK updating webhook 2023-07-14 17:16:28 +01:00
James Ritchie 1f5bd8d6bb Added some copy and a link to let people join the waitlist if they find themselves on cloud.trigger.dev 2023-07-14 16:59:18 +01:00
kaf-lamed-beyt 46383e57d2 chore: update guide 2023-07-14 16:55:00 +01:00
kaf-lamed-beyt 2611b2c171 chore(docs): add docker setup guideline 2023-07-14 16:49:46 +01:00
kaf-lamed-beyt 229207c8f8 chore: create and consume JobPresenter class 2023-07-14 16:40:06 +01:00
Matt Aitken 2eb0b3abce Merge pull request #168 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-14 15:33:44 +01:00
github-actions[bot] 8b6909b486 chore: Update version for release (next) 2023-07-14 14:32:26 +00:00
Matt Aitken dbb9fe44d8 Fix #158 – @trigger.dev/typeform: Check that webhook has a matching url 2023-07-14 15:30:56 +01:00
James Ritchie bb11001fb7 Added 2 buttons below the list of Integrations
2 CTA to request a missing API and to link to the docs to create your own integration
2023-07-13 18:07:19 +01:00
James Ritchie b35457bb53 export type and fixed typo 2023-07-13 18:07:19 +01:00
James Ritchie 1ea0d39fa2 Added an iconClassName to the NamedIcon component so you can override the colour 2023-07-13 18:07:19 +01:00
Matt Aitken 9193b3c90b Merge pull request #157 from triggerdotdev/changeset-release/main
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
chore: Update version for release (next)
2023-07-13 16:38:10 +01:00
github-actions[bot] c349b50164 chore: Update version for release (next) 2023-07-13 15:36:48 +00:00
Matt Aitken fe3bc6efe4 Missing token/apikey error improved for display in Next.js logs 2023-07-13 16:35:21 +01:00
Matt Aitken df138ee96e Latest lockfile 2023-07-13 16:11:37 +01:00
Matt Aitken d0b8e560c9 Merge pull request #153 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-13 16:09:51 +01:00
github-actions[bot] 537409cec1 chore: Update version for release (next) 2023-07-13 14:36:23 +00:00
Matt Aitken bac8ad1040 Throw if the clients are passed an undefined apikey or token 2023-07-13 15:34:35 +01:00
James Ritchie cc26cbeb7b Fixed nintendo related typo 2023-07-13 15:23:37 +01:00
James Ritchie 3b6c2bd0e8 Update CONTRIBUTING.md to include new steps to login when developing locally 2023-07-13 13:50:46 +01:00
Eric Allam 0b004fbcaf Print out emails instead of sending them through resend if missing resend API key 2023-07-13 12:20:54 +01:00
Eric Allam c72c21e2a9 Only retry runs when the response is a non-400 2023-07-13 11:21:14 +01:00
Eric Allam d6310a79fa @trigger.dev/nextjs and @trigger.dev/sdk: Set duplex "half" when creating fetch based Request objects when they have a body 2023-07-12 21:40:13 +01:00
Eric Allam 953354f367 @trigger.dev/typeform: Update how tasks are exported 2023-07-12 21:01:34 +01:00
James Ritchie f8ddb21510 Added env var instructions to CONTRIBUTING.md 2023-07-12 17:53:09 +01:00
Matt Aitken 761e89108b Docker prisma generate uses the same semver as the package.json 2023-07-12 17:35:27 +01:00
James Ritchie ec34a84d6d Removed the Development guide and pointing to CONTRIBUTING.md instead 2023-07-12 16:45:36 +01:00
Eric Allam 9cb5e6847b Update CONTRIBUTING.md
Remove the Next.js prereq
2023-07-12 16:44:28 +01:00
James Ritchie 43f0c6f7f2 Deleted old file 2023-07-12 16:40:52 +01:00
James Ritchie ffcad81498 Deleted old file 2023-07-12 16:40:28 +01:00
James Ritchie f16a337c50 Created a CONTRIBUTING.md guide 2023-07-12 16:39:19 +01:00
Matt Aitken 30e5303c36 Removed eventTrigger.example idea from the example 2023-07-12 16:36:12 +01:00
Matt Aitken 19d5cb596f Merge remote-tracking branch 'origin/triggers-page' 2023-07-12 15:45:54 +01:00
Matt Aitken ff58925606 The Project side menu now shows an error icon on Triggers and Integrations if action is required 2023-07-12 15:44:13 +01:00
Matt Aitken 12b16a0030 Removed unused imports/code 2023-07-12 15:43:54 +01:00
Matt Aitken b08c10a716 Warnings are triangles, errors are circles 2023-07-12 15:43:40 +01:00
Matt Aitken b878561f65 Added custom ErrorIcon that has a white exclamation so it can be seen on busy backgrounds 2023-07-12 15:43:28 +01:00
Eric Allam 5e36ad961f @trigger.dev/cli: create-integration - Generate the README.md file 2023-07-12 15:34:33 +01:00
Matt Aitken 3dc2f0cfff Scheduled Triggers table 2023-07-12 15:06:52 +01:00
Matt Aitken 073c4fb76e TextLink moved to a separate file, and added a secondary style to it 2023-07-12 15:06:46 +01:00
Matt Aitken cef0bd172d Scheduled Triggers tab 2023-07-12 14:43:48 +01:00
Matt Aitken 23eed197ee Don’t show other user’s Dev external triggers 2023-07-12 14:43:33 +01:00
Matt Aitken 3f8f76df76 Interval Trigger icon is a clock, instead of a calendar to differentiate from CRON 2023-07-12 14:43:16 +01:00
Matt Aitken b047023d9c When registering a ScheduleSource you can associate a DynamicTrigger 2023-07-12 14:43:02 +01:00
Matt Aitken 420655f231 Database migration: relationship between ScheduleSource and DynamicTrigger 2023-07-12 14:42:35 +01:00
Eric Allam 520ab88a97 Adding the create-integration command to scaffold out new integration packages (inside or outside of the monorepo) 2023-07-12 13:38:43 +01:00
Eric Allam f96da50e6a Update the typeform integration package
Now uses a dependency free tsconfig file, and updated the typescript and tsup dev deps
2023-07-12 13:35:19 +01:00
Matt Aitken 1dc42daed4 Added SDK and API support to stop runs when they’re canceled 2023-07-12 13:14:23 +01:00
Matt Aitken 0a80e2f5ec Added CANCELED TaskStatus to the server 2023-07-12 09:18:59 +01:00
Matt Aitken 4661d2019c Canceling runs 2023-07-11 19:50:06 +01:00
Matt Aitken 4e4e7b705d Rerun moved to a resource route 2023-07-11 18:49:00 +01:00
Matt Aitken bae1b0be72 Added action to retry registration 2023-07-11 18:06:42 +01:00
Matt Aitken e890ee01a3 renamed pathBuilder functions to external 2023-07-11 18:06:36 +01:00
Matt Aitken af4b0757a9 Improved spacing and copy 2023-07-11 16:30:39 +01:00
Matt Aitken 6ef62d82c4 You can add containerClassName to a Table 2023-07-11 16:27:05 +01:00
Matt Aitken 44df509b62 Added a code comment to explain the complicated breadcrumb for the extrnal trigger page 2023-07-11 15:56:18 +01:00
Matt Aitken 5d3fe2a5ea Changed paths from “triggersources” to “external” 2023-07-11 15:53:15 +01:00
Matt Aitken 076e6dce73 Cloud seed updates existing secret store values 2023-07-11 15:35:04 +01:00
Matt Aitken f745320456 Added DynamicTrigger column 2023-07-11 14:46:26 +01:00
Matt Aitken 6e64aaa1ee Better explanations of triggers 2023-07-11 14:46:21 +01:00
Matt Aitken 8b68edfc05 Get only the required DynamicTrigger info 2023-07-11 14:46:06 +01:00
Matt Aitken 0a7bae4dac Use the handle to determine if the side menu is expanded 2023-07-11 14:35:14 +01:00
Matt Aitken b925a573f3 Added paginated runs 2023-07-11 13:24:38 +01:00
Eric Allam 0012bb21ce All logs are now structured logs 2023-07-11 13:11:30 +01:00
Matt Aitken 3b3ec9fc4a Run streaming logic moved to a presenter, shared with the External Trigger run page 2023-07-11 13:04:56 +01:00
Matt Aitken 396663d65c Hooks can use passed in matches. Breadcrumb updated to be in the route 2023-07-11 12:46:39 +01:00
Matt Aitken 686cf9dc7e Trigger registration runs displaying 2023-07-10 16:35:48 +01:00
Matt Aitken a9e7cda37d Run page turned into components so it can be shared 2023-07-10 15:47:13 +01:00
Matt Aitken eae0b8a95e The Run page now uses a component so it can be shared 2023-07-10 15:20:01 +01:00
Matt Aitken 1b65b1d596 Deleted legal pages from the app 2023-07-10 15:19:45 +01:00
Matt Aitken d85b1fe2fd Moved components to the components/run folder ready for sharing 2023-07-10 15:02:03 +01:00
Matt Aitken f00006af1b Run summary title made the same size as the others 2023-07-10 14:58:01 +01:00
Matt Aitken 75a07fe4ef RunsTable displaying for registration attempts 2023-07-10 14:40:10 +01:00
Matt Aitken 4373538476 ClipboardField changed to spans so it can work inside a paragraph 2023-07-10 12:24:11 +01:00
Matt Aitken af79ea2f72 Triggers page now has tabs 2023-07-10 11:49:19 +01:00
Matt Aitken aab859bc20 Added scheduled path 2023-07-10 11:48:58 +01:00
Matt Aitken c692c16183 Trigger red table row and added slug to the Integration 2023-07-10 11:07:08 +01:00
Matt Aitken cb59808be2 Better type for LabelValueStack variations 2023-07-10 11:06:51 +01:00
Matt Aitken 2aad2d29de Early work on Trigger detail page 2023-07-10 10:16:44 +01:00
Matt Aitken 400354ee9e Improved the layout 2023-07-09 21:12:46 +01:00
Matt Aitken ea3ba78d1a Started the Triggers page 2023-07-09 20:56:33 +01:00
1394 changed files with 87321 additions and 19153 deletions
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
run context jsdocs
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Better docs for io.try
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/cli": patch
---
Added retrying and better messaging
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
IO Logging now respects the job and client logLevel, and only outputs locally when ioLogLocalEnabled is true
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Adding support for trigger source in the run context, and make sure dynamic trigger runs are preprocessed so they have a chance of populating run properties
-6
View File
@@ -1,6 +0,0 @@
---
"@trigger.dev/sdk": patch
"@trigger.dev/openai": patch
---
Improved OpenAI task errors
-9
View File
@@ -1,9 +0,0 @@
---
"@trigger.dev/init": patch
---
A number of improvements to the initialization experience:
- Detect middleware usage and warn about how it could conflict with Trigger.dev and with a link to the docs
- Lookup package versions and use the latest versions
- Better error messages when registering an endpoint doesn't work
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/github": patch
---
Fixed the broken export issue with two of the new tasks
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/init": patch
---
Fix for Next.js projects using the src dir
+11 -3
View File
@@ -2,13 +2,21 @@
"$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"fixed": [
[
"@trigger.dev/*"
]
],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [
"webapp",
"emails"
]
"emails",
"@trigger.dev/database"
],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Don't return the apiKey when they don't match
-11
View File
@@ -1,11 +0,0 @@
---
"@trigger.dev/integration-kit": patch
"@trigger.dev/sdk": patch
"@trigger.dev/github": patch
"@trigger.dev/openai": patch
"@trigger.dev/slack": patch
"@trigger.dev/nextjs": patch
"@trigger.dev/init": patch
---
Creating the init CLI package
-8
View File
@@ -1,8 +0,0 @@
---
"@trigger.dev/sdk": major
"@trigger.dev/github": major
"@trigger.dev/slack": major
"@trigger.dev/nextjs": major
---
Preparing packages for V2
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/typeform": patch
---
getAllResponses fixed
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/init": patch
---
Remove the localhost default for endpoint URL
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/init": patch
---
Fixed the version of the @trigger.dev/nextjs package
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
registerCron and unregisterCron jsdocs
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Endpoint registration and indexing now is only initiated outside of clients
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/cli": patch
---
Split the CLI into two commands, init and a new dev command
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/plain": patch
---
Added upsertCustomTimelineEntry Task and exported the components from the plain package
-10
View File
@@ -1,10 +0,0 @@
---
"@trigger.dev/typeform": patch
"@trigger.dev/sdk": patch
"@trigger.dev/github": patch
"@trigger.dev/openai": patch
"@trigger.dev/slack": patch
"@trigger.dev/cli": patch
---
Upgrade to zod 3.21.4
-6
View File
@@ -1,6 +0,0 @@
---
"@trigger.dev/sdk": patch
"@trigger.dev/cli": patch
---
api.trigger.dev is now the default cloud url
-7
View File
@@ -1,7 +0,0 @@
---
"@trigger.dev/sdk": patch
"@trigger.dev/github": patch
"@trigger.dev/nextjs": patch
---
Add support for task errors and task retrying
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
io.runTask jsdocs
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/cli": patch
---
[dev] Better handle errors when registering endpoint
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/init": patch
---
Improved the CLI prompts
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
io.sendEvent jsdocs
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
deliverAt and timestamp event properties are now dates
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/openai": patch
---
listModels returns the response.data instead of response.data.data
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Fixed the eventTrigger name
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
cronTrigger jsdocs
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Added JSDocs related to logging
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/cli": patch
---
Removed --tunnel option, currently we just support ngrok
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
intervalTrigger() jsdocs
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Fixed responses from the PING action to match expected schema
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Adding more granular error messages around unauthorized requests
-8
View File
@@ -1,8 +0,0 @@
---
"@trigger.dev/sdk": patch
"@trigger.dev/github": patch
"@trigger.dev/openai": patch
"@trigger.dev/slack": patch
---
Added support for backgroundFetch
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
jsdocs for DynamicTrigger and DynamicSchedule
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/cli": patch
---
Export the client from the generated code and added code comments
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/github": patch
---
Fixed some properties that had API urls instead of HTML urls
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/nextjs": patch
---
Adaptors no longer take an options object
-14
View File
@@ -1,14 +0,0 @@
---
"@trigger.dev/integration-kit": patch
"@trigger.dev/typeform": patch
"@trigger.dev/sdk": patch
"@trigger.dev/github": patch
"@trigger.dev/openai": patch
"@trigger.dev/resend": patch
"@trigger.dev/plain": patch
"@trigger.dev/slack": patch
"@trigger.dev/nextjs": patch
"@trigger.dev/cli": patch
---
Set Node version to 16.8 and above
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/nextjs": patch
---
Loosen the Next.js dependency version
-6
View File
@@ -1,6 +0,0 @@
---
"@trigger.dev/sdk": patch
"@trigger.dev/internal": patch
---
backgroundFetch jsdocs
-95
View File
@@ -1,95 +0,0 @@
{
"mode": "pre",
"tag": "next",
"initialVersions": {
"webapp": "1.0.0",
"@trigger.dev/github": "0.2.0",
"@trigger.dev/slack": "0.2.0",
"create-trigger": "0.2.0",
"emails": "1.0.0",
"@trigger.dev/internal": "0.0.1",
"@trigger.dev/nextjs": "0.1.0",
"@trigger.dev/sdk": "1.0.0",
"@trigger.dev/openai": "1.0.0-next.0",
"@trigger.dev/database": "0.0.0",
"@trigger.dev/init": "0.2.0",
"@trigger.dev/integration-kit": "2.0.0-next.1",
"@trigger.dev/resend": "1.0.0-next.1",
"@trigger.dev/cli": "0.2.1-next.8",
"@trigger.dev/typeform": "1.0.0-next.2",
"@trigger.dev/plain": "1.0.0-next.2"
},
"changesets": [
"afraid-hornets-cheer",
"beige-maps-hug",
"big-tables-search",
"bright-buses-join",
"bright-horses-bathe",
"brown-bikes-bathe",
"chatty-cars-agree",
"chilly-meals-warn",
"clever-bats-learn",
"cuddly-pets-arrive",
"curly-hornets-sort",
"dirty-needles-kneel",
"dull-bulldogs-design",
"eight-buckets-agree",
"eighty-queens-prove",
"fast-ligers-wink",
"four-ligers-perform",
"friendly-parents-clean",
"funny-elephants-sing",
"gentle-dogs-end",
"gentle-guests-leave",
"great-meals-listen",
"healthy-rockets-cry",
"heavy-eyes-own",
"heavy-mails-explain",
"hot-eggs-protect",
"hot-seals-press",
"itchy-cars-count",
"itchy-rockets-provide",
"khaki-needles-wait",
"long-clocks-hide",
"lovely-hounds-accept",
"lovely-plants-brake",
"lucky-crews-matter",
"metal-donkeys-relate",
"modern-emus-suffer",
"modern-turtles-eat",
"moody-islands-melt",
"odd-colts-smash",
"pink-islands-pay",
"pink-numbers-jam",
"plenty-ties-raise",
"popular-cooks-boil",
"pretty-bats-obey",
"quick-stingrays-own",
"quiet-berries-tickle",
"quiet-dryers-collect",
"rich-clocks-attack",
"rude-bees-taste",
"shiny-mirrors-beam",
"shy-bobcats-hear",
"silent-mirrors-lay",
"silver-insects-sneeze",
"six-humans-happen",
"sixty-pandas-deliver",
"sixty-squids-wink",
"strange-jobs-shout",
"strong-cars-visit",
"stupid-files-cough",
"sweet-adults-applaud",
"sweet-cups-rescue",
"sweet-snails-refuse",
"tame-flowers-invite",
"tasty-bats-flow",
"ten-birds-confess",
"thirty-apes-happen",
"tidy-planes-compete",
"tough-walls-share",
"two-tools-hide",
"wild-rats-mix",
"young-birds-unite"
]
}
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/typeform": patch
---
safeBodyParse webhook import fixed
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/init": patch
---
Fixed the help defaults
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/cli": patch
---
Initializing a next.js project now creates a better file structure
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
registerTrigger jsdocs
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
io.registerInterval and io.unregisterInterval jsdocs
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/cli": patch
---
Fix when setting the url as an option
-7
View File
@@ -1,7 +0,0 @@
---
"@trigger.dev/integration-kit": patch
"@trigger.dev/sdk": patch
"@trigger.dev/typeform": patch
---
Creating the typeform integration package
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Removed the url option for TriggerClient
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Added JSdocs for io.wait and io.logger
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
isTriggerError jsdocs
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
eventTrigger() jsdocs
-6
View File
@@ -1,6 +0,0 @@
---
"@trigger.dev/sdk": patch
"@trigger.dev/openai": patch
---
Adding support for output properties on tasks
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
io.try jsdocs
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/cli": patch
---
Added better Next Steps in the init cli command
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/init": patch
---
Fixed an issue that cause environment variables to be incorrectly added to .env.local
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/nextjs": patch
---
Loosen the peer dep requirement on next
-6
View File
@@ -1,6 +0,0 @@
---
"@trigger.dev/typeform": patch
"@trigger.dev/integration-kit": patch
---
integration-kit uses webhook package
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Added human readable cron expression property to cron triggers
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/init": patch
---
Fixed CLI showing undefined when not specifying a trigger-url flag
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/resend": patch
---
Adding the resend integration package
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Added jsdocs for TriggerClient() and sendEvent()
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/cli": patch
---
Better handle input for the --trigger-url option
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/cli": patch
---
Improved the endpoint prompt
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/slack": patch
---
Added joinConversation task, and automatically try and join a public conversation if the bot is not in it when posting a message
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/nextjs": patch
---
Make sure nextjs app routes have the correct types
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/cli": patch
---
Improved spinner and made port clear in logs
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/nextjs": patch
---
Update the devDependency on nextjs to be more permissive
-5
View File
@@ -1,5 +0,0 @@
---
"@trigger.dev/sdk": patch
---
Added JSdocs for Job
+22 -5
View File
@@ -1,37 +1,54 @@
*.log
\*.log
.git
.github
# editor
.idea
.vscode
# dependencies
node_modules
.pnp
.pnp.js
# testing
coverage
# next.js
.next/
build
# packages
build
dist
packages/**/dist
packages/\*\*/dist
# misc
.DS_Store
*.pem
\*.pem
.turbo
.vercel
.cache
.output
apps/**/public/build
apps/\*\*/public/build
cypress/screenshots
cypress/videos
apps/**/styles/tailwind.css
packages/**/styles/tailwind.css
packages/**/styles/tailwind.css
.changeset
references
examples
CHANGESETS.md
CONTRIBUTING.md
README.md
LICENSE
+17 -15
View File
@@ -1,36 +1,38 @@
# YOU MUST SET THESE VARIABLES
# Resend is an email service used for signing in to Trigger.dev via a Magic Link.
### Visit https://resend.com, create an account and get your API key. Then insert it below along with your From and Reply To email addresses. Visit https://resend.com/docs for more information.
RESEND_API_KEY=<api_key>
FROM_EMAIL=
REPLY_TO_EMAIL=
# YOU MIGHT LIKE TO MODIFY THESE VARIABLES
SESSION_SECRET=abcdef1234
MAGIC_LINK_SECRET=abcdef1234
ENCRYPTION_KEY=ae13021afef0819c3a307ad487071c06 # Must be a random 16 byte hex string. You can generate an encryption key by running `openssl rand -hex 16` in your terminal
LOGIN_ORIGIN=http://localhost:3030
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres?schema=public
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres?schema=public
# This sets the URL used for direct connections to the database and should only be needed in limited circumstances
# See: https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#fields:~:text=the%20shadow%20database.-,directUrl,-No
DIRECT_URL=${DATABASE_URL}
REMIX_APP_PORT=3030
APP_ENV=development
APP_ORIGIN=http://localhost:3030
NODE_ENV=development
# OPTIONAL VARIABLES
AUTH_GITHUB_CLIENT_ID=
AUTH_GITHUB_CLIENT_SECRET=
# This is used for logging in via GitHub. You can leave these commented out if you don't want to use GitHub for authentication.
# AUTH_GITHUB_CLIENT_ID=
# AUTH_GITHUB_CLIENT_SECRET=
# Resend is an email service used for signing in to Trigger.dev via a Magic Link.
# Emails will print to the console if you leave these commented out
### Visit https://resend.com, create an account and get your API key. Then insert it below along with your From and Reply To email addresses. Visit https://resend.com/docs for more information.
# RESEND_API_KEY=<api_key>
# FROM_EMAIL=
# REPLY_TO_EMAIL=
# CLOUD VARIABLES
POSTHOG_PROJECT_KEY=
PLAIN_API_KEY=
SEED_CLOUD=
SEED_CLOUD_EMAIL=
SEED_CLOUD_GITHUB_ACCESS_TOKEN=
SEED_CLOUD_SLACK_ACCESS_TOKEN=
SEED_CLOUD_USER_GITHUB_ACCESS_TOKEN=
CLOUD_AIRTABLE_CLIENT_ID=
CLOUD_AIRTABLE_CLIENT_SECRET=
CLOUD_GITHUB_CLIENT_ID=
CLOUD_GITHUB_CLIENT_SECRET=
CLOUD_LINEAR_CLIENT_ID=
CLOUD_LINEAR_CLIENT_SECRET=
CLOUD_SLACK_APP_HOST=
CLOUD_SLACK_CLIENT_ID=
CLOUD_SLACK_CLIENT_SECRET=
+38
View File
@@ -0,0 +1,38 @@
name: 🐞 Bug Report
description: Create a bug report to help us improve
title: "bug: "
labels: ["🐞 unconfirmed bug"]
body:
- type: textarea
attributes:
label: Provide environment information
description: |
Run this command in your project root and paste the results:
```bash
npx envinfo --system --binaries
```
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of the bug, as well as what you expected to happen when encountering it.
validations:
required: true
- type: input
attributes:
label: Reproduction repo
description: If applicable, please provide a link to a reproduction repo or a Stackblitz / CodeSandbox project. Your issue may be closed if this is not provided and we are unable to reproduce the issue. If your bug is a docs issue, link the appropriate page.
validations:
required: true
- type: textarea
attributes:
label: To reproduce
description: Describe how to reproduce your bug. Steps, code snippets, reproduction repos etc.
validations:
required: true
- type: textarea
attributes:
label: Additional information
description: Add any other information related to the bug here, screenshots if applicable.
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Ask a Question
url: https://trigger.dev/discord
about: Ask questions and discuss with other community members
@@ -0,0 +1,27 @@
name: Feature Request
description: Suggest an idea for this project
title: "feat: "
labels: ["🌟 enhancement"]
body:
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like to see
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Describe alternate solutions
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true
- type: textarea
attributes:
label: Additional information
description: Add any other information related to the feature here. If your feature request is related to any issues or discussions, link them here.
+12
View File
@@ -0,0 +1,12 @@
"📌 area: cli":
- any: ["cli/**/*"]
"📌 area: t3-app":
- any: ["cli/template/**/*"]
"📚 documentation":
- any: ["www/**/*"]
- any: ["**/*.md"]
"📌 area: ci":
- any: [".github/**/*"]
+27
View File
@@ -0,0 +1,27 @@
Closes #<issue>
## ✅ Checklist
- [ ] I have followed every step in the [contributing guide](https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md)
- [ ] The PR title follows the convention.
- [ ] I ran and tested the code works
---
## Testing
_[Describe the steps you took to test this change]_
---
## Changelog
_[Short description of what has changed]_
---
## Screenshots
_[Screenshots]_
💯
+65
View File
@@ -0,0 +1,65 @@
name: "🧪 E2E Tests"
on:
workflow_call:
jobs:
e2e:
name: "🧪 E2E Tests"
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: 🐳 Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: ⎔ Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 7.18
- name: ⎔ Setup node
uses: buildjet/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: 📥 Download deps
run: pnpm install --frozen-lockfile
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: |
# Setup environment variables
cp ./.env.example ./.env
cp ./references/nextjs-test/.env.example ./references/nextjs-test/.env.local
# Build packages
pnpm run build --filter @references/nextjs-test^...
pnpm --filter @trigger.dev/database generate
# Move trigger-cli bin to correct place
pnpm install --frozen-lockfile
# Execute tests
pnpm run docker
pnpm run db:migrate
pnpm run db:seed
pnpm run test:e2e
# Cleanup
pnpm run docker:stop
- name: Upload Playwright report
uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
+31
View File
@@ -0,0 +1,31 @@
name: 🤖 PR Checks
on:
pull_request_target:
branches:
- main
paths-ignore:
- "**.md"
- ".github/CODEOWNERS"
- ".github/ISSUE_TEMPLATE/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
id-token: write
jobs:
typecheck:
uses: ./.github/workflows/typecheck.yml
secrets: inherit
units:
uses: ./.github/workflows/unit-tests.yml
secrets: inherit
e2e:
uses: ./.github/workflows/e2e.yml
secrets: inherit
+42 -29
View File
@@ -4,8 +4,26 @@ on:
push:
branches:
- main
- improvements/*
tags:
- "v*"
- "v.docker.*"
paths:
- ".github/workflows/publish.yml"
- "packages/**"
- "!packages/**/*.md"
- "!packages/**/*.eslintrc"
- "apps/**"
- "!apps/**/*.md"
- "!apps/**/*.eslintrc"
- "integrations/**"
- "!integrations/**/*.md"
- "!integrations/**/*.eslintrc"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- "turbo.json"
- "docker/Dockerfile"
- "docker/scripts/**"
- "tests/**"
permissions:
id-token: write
@@ -20,41 +38,29 @@ env:
jobs:
typecheck:
name: ʦ TypeScript
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
uses: ./.github/workflows/typecheck.yml
secrets: inherit
- name: ⎔ Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 7.18
units:
uses: ./.github/workflows/unit-tests.yml
secrets: inherit
- name: ⎔ Setup node
uses: buildjet/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: 📥 Download deps
run: pnpm install --frozen-lockfile
- name: 📀 Generate Prisma Client
run: pnpm run generate
- name: 🔎 Type check
run: pnpm run typecheck --filter webapp
e2e:
uses: ./.github/workflows/e2e.yml
secrets: inherit
publish:
needs: [typecheck]
needs: [typecheck, units, e2e]
runs-on: buildjet-4vcpu-ubuntu-2204
outputs:
version: ${{ steps.get_version.outputs.version }}
short_sha: ${{ steps.get_commit.outputs.sha_short }}
steps:
- name: 🐳 Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
@@ -63,6 +69,14 @@ jobs:
run: |
IMAGE_TAG="${GITHUB_REF#refs/tags/}"
if [[ $GITHUB_REF == refs/tags/* ]]; then
if [[ $IMAGE_TAG == v.docker.* ]]; then
ORIGINAL_VERSION="${IMAGE_TAG#v.docker.}"
IMAGE_TAG="v${ORIGINAL_VERSION}"
fi
echo "IMAGE_TAG=${IMAGE_TAG}"
elif [[ $GITHUB_REF == refs/heads/improvements/* ]]; then
ORIGINAL_VERSION="${GITHUB_REF#refs/heads/improvements/}"
IMAGE_TAG="${ORIGINAL_VERSION}.rc"
echo "IMAGE_TAG=${IMAGE_TAG}"
elif [[ $GITHUB_REF == refs/heads/* ]]; then
IMAGE_TAG="${GITHUB_REF#refs/heads/}"
@@ -71,8 +85,7 @@ jobs:
echo "Invalid reference: ${GITHUB_REF}"
exit 1
fi
echo ::set-output name=version::${IMAGE_TAG}
echo "::set-output name=version::${IMAGE_TAG}"
- name: 🔢 Get the commit hash
id: get_commit
run: |
+5
View File
@@ -4,6 +4,11 @@ on:
push:
branches:
- main
paths-ignore:
- "**.md"
- ".github/CODEOWNERS"
- ".github/ISSUE_TEMPLATE/**"
jobs:
release:
+32
View File
@@ -0,0 +1,32 @@
name: "ʦ TypeScript"
on:
workflow_call:
jobs:
typecheck:
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: ⎔ Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 7.18
- name: ⎔ Setup node
uses: buildjet/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: 📥 Download deps
run: pnpm install --frozen-lockfile
- name: 📀 Generate Prisma Client
run: pnpm run generate
- name: 🔎 Type check
run: pnpm run typecheck --filter webapp
+30
View File
@@ -0,0 +1,30 @@
name: "🧪 Unit Tests"
on:
workflow_call:
jobs:
unitTests:
name: "🧪 Unit Tests"
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: ⎔ Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 7.18
- name: ⎔ Setup node
uses: buildjet/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: 📥 Download deps
run: pnpm install --frozen-lockfile
- name: Run Unit Tests
run: |
pnpm run test
+4 -1
View File
@@ -48,4 +48,7 @@ apps/**/public/build
.sentryclirc
.buildt
**/tmp/
**/tmp/
/test-results/
/playwright-report/
/playwright/.cache/
+1 -1
View File
@@ -1 +1 @@
{"workspaceId":"63e5e42daf9a537ba8d9503c"}
{ "workspaceId": "63e5e42daf9a537ba8d9503c" }
+1 -1
View File
@@ -1 +1 @@
v18.12.1
v18.18.0
+11
View File
@@ -0,0 +1,11 @@
node_modules
.env
.env.local
pnpm-lock.yaml
tailwind.css
.babelrc.json
**/.react-email/
**/storybook-static/
**/.changeset/
**/build/
**/dist/
+12 -19
View File
@@ -5,36 +5,29 @@
"version": "0.2.0",
"configurations": [
{
"command": "pnpm run idev --filter webapp",
"name": "Run webapp",
"request": "launch",
"type": "node-terminal",
"cwd": "${workspaceFolder}"
},
{
"command": "pnpm run dev --filter integrations",
"name": "Run integrations",
"request": "launch",
"type": "node-terminal",
"cwd": "${workspaceFolder}"
"name": "Debug WebApp",
"command": "pnpm run dev --filter webapp",
"envFile": "${workspaceFolder}/apps/webapp/.env",
"cwd": "${workspaceFolder}",
"sourceMaps": true
},
{
"type": "chrome",
"request": "launch",
"name": "Chrome webapp",
"url": "http://localhost:3000",
"url": "http://localhost:3030",
"webRoot": "${workspaceFolder}/apps/webapp/app"
},
{
"type": "node",
"type": "node-terminal",
"request": "launch",
"name": "Debug Current Test File",
"autoAttachChildProcesses": true,
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
"args": ["run", "${relativeFile}"],
"smartStep": true,
"console": "integratedTerminal"
"name": "Debug BYO Auth",
"command": "pnpm run byo-auth",
"envFile": "${workspaceFolder}/references/job-catalog/.env",
"cwd": "${workspaceFolder}/references/job-catalog",
"sourceMaps": true
}
]
}
-19
View File
@@ -1,19 +0,0 @@
{
"folders": [
{
"name": "trigger.dev",
"path": "../"
},
{
"name": "Webapp",
"path": "../apps/webapp"
},
{
"name": "Integrations",
"path": "../apps/integrations"
}
],
"settings": {
"vitest.commandLine": "pnpm exec vitest"
}
}
+28
View File
@@ -27,3 +27,31 @@ Please follow the best-practice of adding changesets in the same commit as the c
3. Create version `pnpm run changeset:version`
4. Release `pnpm run changeset:release`
5. Switch back to normal mode by running `pnpm run changeset:normal`
## Snapshot instructions
!MAKE SURE TO UPDATE THE TAG IN THE INSTRUCTIONS BELOW!
1. Add changesets as usual
```sh
pnpm run changeset:add
```
2. Create a snapshot version (replace "prerelease" with your tag)
```sh
pnpm exec changeset version --snapshot prerelease
```
3. Build the packages:
```sh
pnpm run build --filter "@trigger.dev/*"
```
4. Publish the snapshot (replace "dev" with your tag)
```sh
pnpm exec changeset publish --no-git-tag --snapshot --tag prerelease
```
+307
View File
@@ -0,0 +1,307 @@
# Contributing to Trigger.dev
Thank you for taking the time to contribute to Trigger.dev. Your involvement is not just welcomed, but we encourage it! 🚀
Please take some time to read this guide to understand contributing best practices for Trigger.dev.
Thank you for helping us make Trigger.dev even better! 🤩
## Developing
The development branch is `main`. This is the branch that all pull
requests should be made against. The changes on the `main`
branch are tagged into a release monthly.
### Prerequisites
- [Node.js](https://nodejs.org/en) version >=16.x
- [pnpm package manager](https://pnpm.io/installation) version 7
- [Docker](https://www.docker.com/get-started/)
### Setup
1. Clone the repo into a public GitHub repository or [fork the repo](https://github.com/triggerdotdev/trigger.dev/fork). If you plan to distribute the code, keep the source code public to comply with the [Apache Licence 2.0](https://github.com/triggerdotdev/trigger.dev/blob/main/LICENSE).
```
git clone https://github.com/<github_username>/trigger.dev.git
```
> If you are on windows, run the following command on gitbash with admin privileges:
> `git clone -c core.symlinks=true https://github.com/<github_username>/trigger.dev.git`
2. Navigate to the project folder
```
cd trigger.dev
```
3. Install the required packages using pnpm.
```
pnpm i
```
4. Create your `.env` file
```
cp .env.example .env
```
5. Open it and generate a new value for `ENCRYPTION_KEY`:
`ENCRYPTION_KEY` is used to two-way encrypt OAuth access tokens and so you'll probably want to actually generate a unique value, and it must be a random 16 byte hex string. You can generate one with the following command:
```sh
openssl rand -hex 16
```
Feel free to update `SESSION_SECRET` and `MAGIC_LINK_SECRET` as well using the same method.
6. Start Docker. This starts the required services like Postgres. If this is your first time using Docker, consider going through this [guide](DOCKER_INSTALLATION.md)
```
pnpm run docker
```
This will also start and run a local instance of [pgAdmin](https://www.pgadmin.org/) on [localhost:5480](http://localhost:5480), preconfigured with email `admin@example.com` and pwd `admin`. Then use `postgres` as the password to the Trigger.dev server.
7. Migrate the database
```
pnpm run db:migrate
```
8. Build the app
```
pnpm run build --filter webapp
```
9. Run the seed script
```
pnpm run db:seed
```
10. Run the app. See the section below.
## Running
1. You can run the app with:
```
pnpm run dev --filter webapp
```
It should run on port `3030`: [http://localhost:3030](http://localhost:3030/)
2. Once the app is running click the magic link button and enter your email.
3. Check your terminal, the magic link email should have printed out as following:
```sh
webapp:dev: Log in to Trigger.dev
webapp:dev:
webapp:dev: Click here to log in with this magic link
webapp:dev: [http://localhost:3030/magic?token=U2FsdGVkX18OvB0JxgaswTLCSbaRz%2FY82TN0EZWhSzFyZYwgG%2BIzKVTkeiaOtWfotPw7F8RwFzCHh53aBpMEu%2B%2B%2FItb%2FcJYh89MSjc3Pz92bevoEjqxSQ%2Ff%2BZbks09JOpqlBbYC3FzGWC8vuSVFBlxqLXxteSDLthZSUaC%2BS2LaA%2BJgp%2BLO7hgjAaC2lXbCHrM7MTgTdXOFt7i0Dvvuwz6%2BWY25RnfomZOPqDsyH0xz8Q2rzPTz0Xu53WSXrZ1hd]
webapp:dev:
webapp:dev: If you didn't try to log in, you can safely ignore this email.
```
Paste the magic link shown in your terminal into your browser to login.
## Adding and running migrations
1. Modify packages/database/prisma/schema.prisma file
2. Change directory to the packages/database folder
```sh
cd packages/database
```
3. Generate the Prisma client
```sh
pnpm run generate
```
The above updates the prisma client generated into node_modules/.prisma/client folder. This helps with typing of relevant prisma models. It ensures typescript
recognizes fields added or removed from a model and type-checks appropriately.
4. Create and apply the migrations
```
pnpm run db:migrate:dev
```
This creates a migration file and executes the migrations against your database and applies changes to the database schema(s)
5. Commit generated migrations as well as changes to the schema.prisma file
6. If you're using VSCode you may need to restart the Typescript server in the webapp to get updated type inference. Open a TypeScript file, then open the Command Palette (View > Command Palette) and run `TypeScript: Restart TS server`.
## Testing CLI changes
To test CLI changes, follow the steps below:
1. Build the CLI and watch for changes
```sh
cd packages/cli
pnpm run dev
```
2. Open a new Terminal window and run the webapp locally and then create a new project in the dashboard. Copy out the dev API key.
3. Create a new temporary Next.js app in references directory
```sh
cd ./references
pnpm create next-app@latest test-cli --ts --no-eslint --tailwind --app --src-dir --import-alias "@/*"
```
4. Then once that's finished, add the `@trigger.dev/cli` to the `devDependencies` of the newly created Next.js app's `package.json` file, like so:
```json
{
// other package.json properties
"devDependencies": { "@trigger.dev/cli": "workspace:*" }
}
```
5. Back in the terminal, navigate into the reference, and initialize the CLI. When prompted, select `self-hosted` and enter `localhost:3030` if you are testing against the local instance of Trigger.dev, or you can just use the Trigger.dev cloud. When asked for an API key, use the key you copied earlier.
```sh
cd ./test-cli
pnpm i
pnpm exec trigger-cli init
```
6. If you are just testing the `init` command, you can stop here. If you'd like to test the `dev` command, first start the Next.js app on port 3000:
```sh
pnpm run dev
```
7. Open a new terminal window, and then run the `dev` command like so:
```sh
pnpm exec trigger-cli dev
```
8. Please remember to delete the temporary project you created after you've tested the changes, and before you raise a PR.
## Running end-to-end webapp tests
To run the end-to-end tests, follow the steps below:
1. Set up environment variables (copy example envs into the correct place)
```sh
cp ./.env.example ./.env
cp ./references/nextjs-test/.env.example ./references/nextjs-test/.env.local
```
2. Set up dependencies
```sh
# Build packages
pnpm run build --filter @references/nextjs-test^...
pnpm --filter @trigger.dev/database generate
# Move trigger-cli bin to correct place
pnpm install --frozen-lockfile
# Install playwrite browsers (ONE TIME ONLY)
npx playwright install
```
3. Set up the database
```sh
pnpm run docker
pnpm run db:migrate
pnpm run db:seed
```
4. Run the end-to-end tests
```sh
pnpm run test:e2e
```
### Cleanup
The end-to-end tests use a `setup` and `teardown` script to seed the database with test data. If the test runner doesn't exit cleanly, then the database can be left in a state where the tests can't run because the `setup` script will try to create data that already exists. If this happens, you can manually delete the `users` and `organizations` from the database using prisma studio:
```sh
# With the database running (i.e. pnpm run docker)
pnpm run db:studio
```
## Add sample jobs
The [references/job-catalog](./references/job-catalog/) project defines simple jobs you can get started with.
1. `cd` into `references/job-catalog`
2. Create a `.env` file with the following content,
replacing `<TRIGGER_DEV_API_KEY>` with an actual key:
```env
TRIGGER_API_KEY=[TRIGGER_DEV_API_KEY]
TRIGGER_API_URL=http://localhost:3030
```
`TRIGGER_API_URL` is used to configure the URL for your Trigger.dev instance,
where the jobs will be registered.
3. Run one of the the `job-catalog` files:
```sh
pnpm run events
```
This will open up a local server using `express` on port 8080. Then in a new terminal window you can run the trigger-cli dev command:
```sh
pnpm run dev:trigger
```
See the [Job Catalog](./references/job-catalog/README.md) file for more.
4. Navigate to your trigger.dev instance ([http://localhost:3030](http://localhost:3030/)), to see the jobs.
You can use the test feature to trigger them.
## Making a pull request
**If you get errors, be sure to fix them before committing.**
- Be sure to [check the "Allow edits from maintainers" option](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) while creating you PR.
- If your PR refers to or fixes an issue, be sure to add `refs #XXX` or `fixes #XXX` to the PR description. Replacing `XXX` with the respective issue number. See more about [Linking a pull request to an issue
](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
- Be sure to fill the PR Template accordingly.
## Adding changesets
We use [changesets](https://github.com/changesets/changesets) to manage our package versions and changelogs. If you've never used changesets before, first read [their guide here](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).
If you are contributing a change to any packages in this monorepo (anything in either the `/packages` or `/integrations` directories), then you will need to add a changeset to your Pull Requests before they can be merged.
To add a changeset, run the following command in the root of the repo
```sh
pnpm run changeset:add
```
Here's an example of creating a `patch` changeset for the `@trigger.dev/github` and `@trigger.dev/slack` packages (click to view):
[![asciicast](https://asciinema.org/a/599228.svg)](https://asciinema.org/a/599228)
You will be prompted to select which packages to include in the changeset. Only select the packages that you have made changes for.
Most of the time the changes you'll make are likely to be categorized as patch releases. If you feel like there is the need for a minor or major release of the package based on the changes being made, add the changeset as such and it will be discussed during PR review.
## Troubleshooting
### EADDRINUSE: address already in use :::3030
When receiving the following error message:
```sh
webapp:dev: Error: listen EADDRINUSE: address already in use :::3030
```
The process running on port `3030` should be destroyed.
1. Get the `PID` of the process running on PORT `3030`
```sh
lsof -i :3030
```
2. Kill the process
```sh
sudo kill -9 <PID>
```
-32
View File
@@ -1,32 +0,0 @@
# Trigger.dev Deployment Guide
## StreamNative Cloud - Hosted Pulsar
### Generic client credentials
```sh
snctl auth export-service-account webapp --key-file webapp-credentials.json
snctl auth export-service-account websocketserver --key-file wss-credentials.json
```
### Topics
#### Triggers (`persistent://triggerdotdev/workflows/triggers`)
Events that trigger workflows to run. These are sent by the "platform" and read by the Web Socket Servers, which then coordinate with the hosts for running the workflows
#### Run Commands (`persistent://triggerdotdev/workflows/run-commands`)
These are events that come from hosts and are published by the Web Socket Servers, e.g. Sending Integration Requests, Sending Logs, Initializing a Delay
#### Run Command Responses (`persistent://triggerdotdev/workflows/run-command-responses`)
These are events that come from the platform and are read by the Web Socket Servers, to resolve or reject a previous Run Command
#### Integration Requests (`persistent://triggerdotdev/queues/integration-requests`)
This is an internal queue used by the platform to perform integration requests, and retry them.
#### App Task Queue (`persistent://triggerdotdev/queues/background-tasks`)
This is an internal queue used by the platform to do tasks in a queue. Basically a background job system.
-231
View File
@@ -1,231 +0,0 @@
# Initial setup
## Prerequisites
### Pulsar requirements
1. Ensure you have Homebrew installed by running `which brew` in terminal. If it's not found then you should install it: https://brew.sh/. Run `which brew` again to check it's found. If it's not you may need to [add it your path](https://stackoverflow.com/questions/36657321/after-installing-homebrew-i-get-zsh-command-not-found-brew)
2. Run `brew install libpulsar` to install the C++ libraries that the pulsar-client depends on
3. Make sure you have Python installed on your machine by running `which python3` in terminal.
4. If python isn't found then you should install it: https://www.python.org/downloads/. In a new terminal window run `which python3` again.
5. Run `npm config set python /the/path/from/the/which/python3/command` inserting the path from step 2 or 3
6. Install node-gyp: `npm install -g node-gyp`
7. Make sure you have the Xcode command line tools installed by running `xcode-select --install` from the terminal. If it says they're already installed then you're set.
8. Run this in the terminal:
```sh
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:$(brew --prefix)/include"
export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib"
export PULSAR_CPP_DIR=/opt/homebrew/Cellar/libpulsar/3.1.0
```
9. Run `pnpm install` in the same terminal window.
## Building and running the webapp
> **Warning**
> All the following commands should be launched from the **monorepo root directory**
1. Install the dependencies.
```bash
pnpm install
```
2. Optionally, if you are testing auth (pizzly) or webhooks (webapp) then you'll need to use ngrok to proxy internet traffic to your local machine
Get access to ngrok and then follow the instructions here to get it setup: https://ngrok.com/download (use homebrew) and make sure to authenticate.
Then run the following scripts to start proxying:
```sh
./scripts/proxy-pizzly.sh dan-pizzly-dev
./scripts/proxy-webapp.sh dan-trigger-dev
```
3. Environment variables. You will need to create copies of the `.env.example` files in `app/webapp`
```sh
cp ./apps/webapp/.env.example ./apps/webapp/.env
```
Then you will need to fill in the fields with real values.
You also need to create the `pizzly-server.env` files under the `.docker` directory:
```sh
cp ./.docker/pizzly-server.env.example ./.docker/pizzly-server.env
```
Next, update the `AUTH_CALLBACK_URL` env var in the `pizzly-server.env` env file with the value provided to the `./scripts/proxy-pizzly.sh` command. Using the example above the `AUTH_CALLBACK_URL` would be `AUTH_CALLBACK_URL=https://dan-pizzly-dev.eu.ngrok.io/oauth/callback`.
If you aren't proxying pizzly according to step 2, then leave the `pizzly-server.env` file empty.
If you are proxying the webapp according to step 2 then in `webapp/.env`, set the `APP_ORIGIN` to the `NGROK_SUBDOMAIN` provided to the `./scripts/proxy-webapp.sh` command, e.g. `APP_ORIGIN=https://dan-trigger-dev.eu.ngrok.io`
4. Start postgresql, redis, pizzly server, followed by pulsar standalone
```bash
pnpm run docker:services
pnpm run docker:pulsar
```
> **Note:** The npm script will complete while Docker sets up the container in the background. Ensure that Docker has finished and your container is running before proceeding.
5. Generate prisma schema
```bash
pnpm run generate
```
6. Run the Prisma migration to the database
```bash
pnpm run db:migrate:deploy
```
7. Run the first build (with dependencies via the `...` option)
```bash
pnpm run build --filter=webapp...
```
**Running simply `pnpm run build` will build everything, including the Remix app.**
8. Run the Remix dev server
```bash
pnpm run dev --filter=webapp
```
## Attaching an API integration using Pizzly
```bash
PIZZLY_HOSTPORT=http://localhost:3004 npx pizzly config:create github github <client-id> <client-secret> "repo,user"
```
## Tests, Typechecks, Lint, Install packages...
Check the `turbo.json` file to see the available pipelines.
- Run the Cypress tests and Dev
```bash
pnpm run test:e2e:dev --filter=webapp
```
- Lint everything
```bash
pnpm run lint
```
- Typecheck the whole monorepo
```bash
pnpm run typecheck
```
- Test the whole monorepo
```bash
pnpm run test
or
pnpm run test:dev
```
- How to install an npm package in the Remix app ?
```bash
pnpm add dayjs --filter webapp
```
- Tweak the tsconfigs, eslint configs in the `config-package` folder. Any package or app will then extend from these configs.
# Running a workflow locally
## After pulling a change
1. Ensure there are no database migrations to run
```bash
pnpm run db:migrate:dev
```
2. Generate the Prisma database client
```bash
pnpm run generate
```
3. Install packages
```bash
pnpm install
```
4. Build everything
```bash
pnpm run build
```
5. Install packages again, this makes sure the local packages are linked
```bash
pnpm install
```
## Running the servers
1. Ensure the docker containers are running
```bash
pnpm run docker:services
pnpm run docker:pulsar
```
2. Run the webapp
```bash
pnpm run dev --filter=webapp
```
3. Run the Web Socket Server
```bash
pnpm run dev --filter=wss
```
4. Build all the @trigger.dev/\* packages
```bash
pnpm run dev --filter="@trigger.dev/*"
```
## Running the smoke test
1. Run the smoke test workflow
```bash
cd ./examples/smoke-test
pnpm run dev
```
2. Running the workflow requires you to send data to the local API.
You can use this cURL command to send a `user.created` event. This will run the workflow and generate the corresponding logs.
```bash
curl --request POST \
--url http://localhost:3000/api/v1/events \
--header 'Authorization: Bearer trigger_dev_zC25mKNn6c0q' \
--header 'Content-Type: application/json' \
--data '{
"name": "user.created",
"payload": {
"id": "123"
}
}'
```
## Dependency & Package graph
![Dependency Graph](assets/dependencyGraph.png)
## Warp Launch Configuration
Setup a custom launch configuration for the Warp terminal ([docs here](https://docs.warp.dev/features/sessions/launch-configurations)) by copying the `.warp/triggerdotdev.yaml.example` file to `~/.warp/launch_configurations/triggerdotdev.yaml`. Make sure you edit the file and replace `<your-trigger-dev>` and `<your-pizzly-dev>` with your custom ngrok subdomains.
+126
View File
@@ -0,0 +1,126 @@
This guide covers installing Docker and Docker Compose. If you're looking for instructions for running Trigger.dev in docker, [see here](https://github.com/triggerdotdev/docker).
## Setting up Docker for the first time.
In the contributing guide of Trigger.dev, there's a section that requires you to start Docker.
If you don't have Docker installed on your machine, you'll run into some complications (errors).
Below are the steps on how you can avoid that.
First you need to setup docker-compose as it is an underlying tool that this command: `pnpm run docker` fires behind the scene.
## Linux
To install Docker Compose on Linux Ubuntu via the terminal, you can follow these steps:
1. Update the package index on your system by running the following command:
```shell
sudo apt update
```
2. Install the required dependencies by running the following command:
```shell
sudo apt install curl
```
3. Download the Docker Compose binary into the `/usr/local/bin` directory using the `curl` command:
```shell
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
```
4. Set the appropriate permissions to make the `docker-compose` binary executable:
```shell
sudo chmod +x /usr/local/bin/docker-compose
```
5. Verify that Docker Compose has been successfully installed by running the following command:
```shell
docker-compose --version
```
This command should display the version information of Docker Compose without any errors.
After following these steps, you should have Docker Compose installed on your Ubuntu system, and you can use it by running `docker-compose` commands in the terminal.
When you've verified that the `docker-compose` package is installed and you proceed to start Docker with `pnpm run docker`.
You'll probably get an error similar to the one below:
```shell
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
ELIFECYCLE Command failed with exit code 1.
```
The error message suggests that the Docker daemon is not running on your system. The Docker daemon is responsible for managing and running Docker containers.
To resolve this issue, you may need to install Docker properly on your Ubuntu system. Here are the steps to install Docker on Ubuntu:
1. Update the package index on your system by running the following command:
```shell
sudo apt update
```
2. Install the necessary packages to allow apt to use repositories over HTTPS:
```shell
sudo apt install apt-transport-https ca-certificates curl software-properties-common
```
3. Add the official Docker GPG key to your system by running the following command:
```shell
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
```
4. Add the Docker repository to the APT sources list:
```shell
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
```
5. Update the package index again:
```shell
sudo apt update
```
6. Install Docker by running the following command:
```shell
sudo apt install docker-ce docker-ce-cli containerd.io
```
7. After the installation is complete, verify that Docker is installed correctly by running the following command:
```shell
docker --version
```
This command should display the version information of Docker without any errors.
Once Docker is installed and verified, you should be able to start the Docker daemon and run the `pnpm run docker` command without encountering any issues.
## Windows
1. Download the Docker Desktop installer from the Docker website: [Docker Desktop for Windows](https://www.docker.com/products/docker-desktop)
2. Run the installer and follow the instructions to install Docker Desktop.
3. After installation, Docker Desktop should be running automatically.
## macOS
1. Download the Docker Desktop installer from the Docker website: [Docker Desktop for Mac](https://www.docker.com/products/docker-desktop)
2. Run the installer and follow the instructions to install Docker Desktop.
3. After installation, Docker Desktop should be running automatically.
Please note that the instructions provided above are for the most common scenarios. For specific versions or different distributions, it's always a good idea to consult the official Docker documentation for the respective operating systems.
+157 -157
View File
@@ -2,180 +2,180 @@
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
@@ -186,16 +186,16 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Copyright [2023] [Trigger.dev]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+49 -51
View File
@@ -5,18 +5,32 @@
<img alt="Trigger.dev logo" src="https://imagedelivery.net/3TbraffuDZ4aEf8KWOmI_w/a45d1fa2-0ae8-4a39-4409-f4f934bfae00/public">
</picture>
### The background jobs framework for Next.js
### The open source background jobs framework
[Discord](https://discord.gg/JtBAxBr2m3) | [Website](https://trigger.dev) | [Issues](https://github.com/triggerdotdev/trigger.dev/issues) | [Docs](https://trigger.dev/docs)
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/triggerdotdev.svg?style=social&label=Follow%20%40trigger.dev)](https://twitter.com/triggerdotdev)
[![GitHub Repo stars](https://img.shields.io/github/stars/triggerdotdev/trigger.dev?style=social)](https://github.com/triggerdotdev/trigger.dev)
</div>
# ✨🎃 Get involved with Hacktoberfest 2023! 🎃✨
All of October we're participating in Hacktoberfest and invite you to join us! We have a bunch of issues labeled `🎃 Hacktoberfest` that are ready for you to work on which will count towards Hacktoberfest. We are also running our own game, earn 💎 points to win swag!
- Check out our [Hacktoberfest landing page](https://trigger.dev/hacktoberfest) for how to participate and win swag.
- Contribute to either our [/trigger.dev](https://github.com/triggerdotdev/trigger.dev/labels/%F0%9F%8E%83%20hacktoberfest) or [/jobs-showcase](https://github.com/triggerdotdev/jobs-showcase/labels/%F0%9F%8E%83%20hacktoberfest) repositories and complete issues marked `🎃 Hacktoberfest` to be eligible for swag.
- Join our [Discord](https://discord.gg/JtBAxBr2m3) and get involved in with the community.
_New to Hacktober? Check out the [Hacktoberfest website](https://hacktoberfest.digitalocean.com/) for more information._
🎃 **Happy Hacking!** 🎃
# About Trigger.dev
Create long-running jobs directly in your codebase with features like API integrations, webhooks, scheduling and delays.
### Long running Jobs on serverless
## Long running Jobs on serverless
Reliably run jobs and dont worry about function timeouts, we handle those for you.
@@ -24,31 +38,51 @@ Reliably run jobs and dont worry about function timeouts, we handle those for
- Auto-resume after a server outage
- Add delays of up to a year
### In your codebase
## In your codebase
Create Jobs where they belong: in your codebase. Version control, localhost, test, review, and deploy like you're already used to.
### Secure by design
## Secure by design
We only receive Triggers and the data you choose to send to us. You can even completely self-host the entire platform.
### Don't worry about deployment
## Don't worry about deployment
Just use our SDK to write Jobs in your Next.js codebase. There's nothing extra to deploy and no CI to configure, your Jobs just connect to our cloud. Or you can always self-host.
Just use our SDK to write Jobs in your codebase. There's nothing extra to deploy and no CI to configure, your Jobs just connect to our cloud. Or you can always self-host.
### Full visibility of every job run
## Full visibility of every job run
View every Task in every Run so you can tell exactly what happened.
![image](https://www.trigger.dev/build/_assets/web-app-2QFKXFLW.png)
### Built-in integrations
## Built-in integrations
Easily integrate with hundreds of third-party APIs including your own. Use API keys (which never leave your server) or let us handle OAuth for you. Install our integration packages and easily subscribe to webhooks and perform common tasks, or you can easily use your existing favorite Node.JS SDKs and get resumability and idempotency through our `runTask` function.
### Trigger.dev Connect (coming soon)
## Our progress
Easily add integrations for your users.
Were building the most comprehensive and easy-to-use background jobs framework for developers.
Click the links to join the discussions about our upcoming features.
| Feature | What it does | Status |
| ------------------------------------------------------------------------------------ | --------------------------------------------------- | ------ |
| Integration kit | Official Trigger.dev integrations or build your own | ✅ |
| Self-hosting | Host the platform yourself | ✅ |
| Cloud | Just write code, no deployment required | ✅ |
| Dashboard | View every Task in every Run | ✅ |
| Serverless | Long-running Jobs on your serverless backend | ✅ |
| React hooks | Easily update your UI with Job progress | ✅ |
| React frameworks | Support for Remix, Astro, RedwoodJS & more | ✅ |
| [Background tasks](https://github.com/triggerdotdev/trigger.dev/discussions/400) | Offload long or intense Tasks to our infrastructure | 🛠️ |
| [Long-running servers](https://github.com/triggerdotdev/trigger.dev/discussions/430) | Run Jobs on your long-running backend | 🛠️ |
| Polling Triggers | Subscribe to changes without webhooks | 🕝 |
| Vercel integration | Easy deploy and preview environment support | 🕝 |
| Streaming | Receive data from your Jobs in realtime | 🕝 |
| 100+ integrations | Comprehensive support for popular APIs | 🕝 |
| [Trigger.dev Connect](https://github.com/triggerdotdev/trigger.dev/discussions/441) | Use integrations signed in as your users | 🕝 |
| File IO | Create Tasks that have file outputs | 🕝 |
# Getting started
@@ -60,46 +94,10 @@ We provide an official trigger.dev docker image you can use to easily self-host
## Development
### Prerequisites
- [Node.js](https://nodejs.org/en) version >=18.x
- [pnpm package manager](https://pnpm.io/installation) version 7
- [Docker](https://www.docker.com/get-started/)
To setup and develop locally or contribute to the open source project, follow our [development guide](./CONTRIBUTING.md).
### Setup
## 🙏 to our contributors
1. Clone the repo into a public GitHub repository or [fork the repo](https://github.com/triggerdotdev/trigger.dev/fork). If you plan to distribute the code, keep the source code public to comply with the [Apache Licence 2.0](https://github.com/triggerdotdev/trigger.dev/blob/main/LICENSE).
```
git clone https://github.com/triggerdotdev/trigger.dev.git
```
> If you are on windows, run the following command on gitbash with admin privileges:
> `git clone -c core.symlinks=true https://triggerdotdev/trigger.dev.git`
2. Navigate to the project folder
```
cd trigger.dev
```
3. Install the required packages using pnpm.
```
pnpm i
```
4. Create your `.env` files
```
cp .env.example .env && cp packages/database/.env.example packages/database/.env
```
Open the root `.env` file and fill in the required values.
6. Start Docker. This starts the required services like Postgres.
```
pnpm run docker
```
7. Migrate the database
```
pnpm run db:migrate
```
8. Run the seed script
```
pnpm run db:seed
```
5. Run the project. It should run on `port:3030`
```
pnpm run dev --filter webapp
```
<a href="https://github.com/triggerdotdev/trigger.dev/graphs/contributors">
<img src="https://contrib.rocks/image?repo=triggerdotdev/trigger.dev" />
</a>
+1 -5
View File
@@ -1,9 +1,5 @@
{
"extends": [
"@remix-run/eslint-config",
"@remix-run/eslint-config/node",
"prettier"
],
"extends": ["@remix-run/eslint-config", "@remix-run/eslint-config/node", "prettier"],
"rules": {
"@typescript-eslint/strict-boolean-expressions": [
"error",

Some files were not shown because too many files have changed in this diff Show More