Compare commits

...

3357 Commits

Author SHA1 Message Date
Eric Allam 5c64cefaf0 Fix pnpm lock file 2024-04-02 13:25:05 +01:00
github-actions[bot] dc5ed0a0cd chore: Update version for release (beta) (#995)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-02 13:24:32 +01:00
Eric Allam e7e7397ed9 Force CLI change 2024-04-02 13:20:26 +01:00
Eric Allam 49184c7189 Add trigger.dev changeset 2024-04-02 13:03:37 +01:00
Eric Allam eb60126284 Fixed batched otel in dev and made prod configurable to be batched as well 2024-04-02 12:58:56 +01:00
Eric Allam d876c358d2 Update the default env var concurrency limit and set them when orgs and envs are created 2024-04-02 11:55:00 +01:00
Eric Allam 6e9c8ab555 Fix pnpm lock file 2024-04-02 11:13:31 +01:00
github-actions[bot] 9a3eb289cd chore: Update version for release (beta) (#992)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-02 11:12:56 +01:00
nicktrn 51315fc3c8 v3: shared queue pool (#994)
* configurable retry delay checkpoint threshold

* shared queue consumer pool

* add more attributes to marqs spans

* inject trace context into queued messages
2024-04-02 10:22:52 +01:00
Eric Allam 4047f00562 Allow each service to define their own name 2024-04-01 22:01:36 +01:00
Matt Aitken 545f85b44e Fix for shared queryKey between useRunDetails and useRunStatuses 2024-04-01 13:20:39 +01:00
Eric Allam abe202e7b7 Fix pnpm lock file 2024-04-01 10:54:29 +01:00
github-actions[bot] ae27fd83af chore: Update version for release (beta) (#987)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-01 10:53:45 +01:00
Eric Allam c702d6a9ca v3: better task metadata errors (#991)
* v3: better handle task metadata parse errors, and display nicely formatted errors (dev, deploy, UI)

* Add changeset
2024-03-31 21:47:05 +01:00
Eric Allam 9af2570da6 Retry 429, 500, and connection error API requests to the trigger.dev server 2024-03-31 16:06:12 +01:00
Eric Allam a946797d95 v3: Upgrades to MarQS (#989)
* Upgrades to MarQS

- It’s “queue choosing” algorithm is now MUCH better (pretty much didn’t work before) and should be performant even when we have a bunch of prod queues
- There are now concurrency limits at the environment and organization level, as well as the task/queue level. So if any of them are at capacity the message won’t be dequeued. This means we can have an org wide concurrency limit, as well as different limits for dev/prod/staging
- I’ve added an admin API that can be used to update the org/env concurrency limits

* More MarQS upgrades

- Extract the queue priortity choosing strategy into an interface
- Implement a much better weighted average strategy
- “Slide the window” of queue candidates if the parent queue sends all at-capacity queues (so we won’t get stuck attempting to choose the same 12 full queues)
- Added some unit tests for the priority stuff
- Added some ideas for expanding the priority choosing strategy with more dynamic features

* Fixes an issue with the shared queue consumer relying on the queue name to get the env id
2024-03-31 15:58:00 +01:00
Eric Allam 8c4df326cc v3: Better dev/deploy errors and handle image build errors (#988)
* Better error output when an ESM only package is required

* Add better errors for npm package errors, and bring deploy errors to the dev CLI

* Handle depot build errors and write out a temporary file to view the build logs

* Add changeset
2024-03-29 12:46:11 +00:00
Eric Allam 11b997d2bf Make env var value input fields passwords 2024-03-29 09:05:53 +00:00
Eric Allam 8694e573f5 Fix CLI logout and add list-profiles command 2024-03-28 22:18:15 +00:00
Eric Allam b271742dca v3: implement configurable log levels via config file and env var (#985)
* v3: implement configurable log levels via config file and TRIGGER_LOG_LEVEL

Also, test runs automatically set the TRIGGER_LOG_LEVEL to debug

* Fix type error and changeset

* Added a Node.js runtime check for the CLI dev command
2024-03-28 22:00:38 +00:00
Eric Allam 6f9f25481e Update pnpm lock file 2024-03-28 19:55:14 +00:00
github-actions[bot] 67aaffb6fc chore: Update version for release (beta) (#984)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-28 19:54:21 +00:00
Eric Allam e3cf456c69 v3: fix string and non-standard outputs (#983)
* Fixed string outputs missing and incorrectly formatted

* Handle non-serializable outputs like a function

* Add changeset
2024-03-28 19:51:29 +00:00
Matt Aitken bf7827e7b8 Fix for the test latest runs showing other environments 2024-03-28 18:14:47 +00:00
Eric Allam bc020a3ffe Get the internal telemetry ready for test/prod 2024-03-28 18:12:01 +00:00
Eric Allam b361afbfe4 Update pnpm lock file 2024-03-28 16:29:17 +00:00
github-actions[bot] a3d809740d chore: Update version for release (beta) (#979)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-28 16:28:41 +00:00
Eric Allam f93eae300e v3: superjson dynamic import and deploy fixes (#982)
* v3: Dynamically import superjson and fix some bundling issues

* Added changeset

* Better error handling in the registry proxy and catch uncaught exceptions and unhandled promise rejections instead of crashing the server

* Await the prettyPrintPackage
2024-03-28 16:22:00 +00:00
Matt Aitken a2365e406d Fixed v3 docs link in the sidebar 2024-03-28 14:46:47 +00:00
Eric Allam 42d319c2d1 Remove all the v3-catalog code for triggering in code 2024-03-28 14:33:01 +00:00
nicktrn b66d5525ef v3: machine config (#978)
* add and use machine config

* assign tasks to worker nodes only

* add secure flag to zod connection

* changeset

* add pre stop hook

* don't use secure connection by default

* pass more identifiers to provider and apply labels
2024-03-28 14:21:49 +00:00
Eric Allam 719c0a0b94 v3: better clock management for spans/logs in CRIU envs (#980)
* durable clock WIP

* Fixed incorrect span timings around checkpoints by implementing a precise wall clock that resets after restores

* Add changeset
2024-03-28 14:20:44 +00:00
Matt Aitken f1c768a255 Docs for API keys, fixed links to docs from app (#981)
* Add missing API keys docs and link from the web app to them. Renamed Server API keys to Secret keys

* Correct link to env var docs

* Duplicate image fixed on environment variables docs
2024-03-28 14:00:42 +00:00
Matt Aitken d9c9e80bc4 Changed "Worker" to "Version" in the CLI dev command key 2024-03-28 12:13:58 +00:00
Matt Aitken d39932ebf7 Changed the throttle so the function fires at the end of the period, not immediately when first called 2024-03-28 12:05:48 +00:00
Matt Aitken 9bcb8cb42a Ignore the DEBUG env var when deploying 2024-03-28 11:28:34 +00:00
nicktrn 2374f8e8ac fix docs for shopify scopes 2024-03-28 09:57:04 +00:00
github-actions[bot] a22b5869e4 chore: Update version for release (beta) (#977)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-27 19:43:19 +00:00
Eric Allam f1571cbfab Fixed an issue where the trigger.dev package was not being built before publishing to npm 2024-03-27 19:39:18 +00:00
Eric Allam 222dfed4d2 Fixed pnpm lock file 2024-03-27 18:56:10 +00:00
github-actions[bot] 89c0e68fb5 chore: Update version for release (beta) (#975)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-27 18:54:28 +00:00
Eric Allam 5b745dc1a4 Improved the dev CLI output 2024-03-27 18:36:52 +00:00
Eric Allam 2dea8dec35 Implement simple 7 day log retention and blank states (#976) 2024-03-27 17:22:16 +00:00
Matt Aitken 252f5b3967 Fix for janky scrolling on the run page 2024-03-27 16:55:03 +00:00
Eric Allam 014d233339 Couple changes to better test the output/payload offloading 2024-03-27 16:27:45 +00:00
Eric Allam e398bdf859 Only use 16vcpu on e2e 2024-03-27 16:27:28 +00:00
Matt Aitken 426316aa3c There was an error about a div being in a paragraph 2024-03-27 16:23:11 +00:00
Matt Aitken 4f9b8d6721 Task that logs a lot 2024-03-27 16:22:29 +00:00
Matt Aitken a345ad2d57 Fix for the large JSON generator 2024-03-27 15:49:46 +00:00
Matt Aitken e2b67400ea TRIGGER_API_URL defaults to https://api.trigger.dev 2024-03-27 15:18:40 +00:00
Eric Allam c4dc2849af Remove changesets from the pre.json (accidentially added) 2024-03-27 15:17:42 +00:00
Eric Allam a8263dec86 Include core-apps in trigger.dev typecheck tsconfig file 2024-03-27 15:01:02 +00:00
Eric Allam 53054d0146 Enter into changesets “beta” tag for packages 2024-03-27 14:55:14 +00:00
Eric Allam 74236ae7c1 Fix changeset workflow (thought I’d already fixed this?) 2024-03-27 14:47:42 +00:00
Eric Allam 055d468b38 Setup socket.io redis adapter and fix deployment builds for superjson error 2024-03-27 14:42:10 +00:00
Matt Aitken fc473105e3 Better error messages if you haven’t set the API URL or SECRET for the v3 client 2024-03-27 14:08:13 +00:00
Matt Aitken 3a35d60091 Change the npm tag from "latest" to "beta" in docs/cli/onboarding (#974)
* The v3 init command defaults to the “@v3” tag

* Change it to beta

* Updated the docs and in-app docs

* Updated GitHub action
2024-03-27 13:39:53 +00:00
Eric Allam f11c0f991b Log out the headers and url when no key is found 2024-03-27 13:30:47 +00:00
Eric Allam 1cf181fd02 Control api rate limiter logging through env vars 2024-03-27 12:42:05 +00:00
Eric Allam 412d0149d5 Fixed release workflow 2024-03-27 12:37:23 +00:00
Eric Allam d614c8d2ca More CI fixes for node 20/pnpm 8 2024-03-27 12:33:24 +00:00
Eric Allam 4329d1130a Attempt to fix typecheck 2024-03-27 12:30:54 +00:00
Eric Allam 17f9fc8273 Upgrade to pnpm 8.15.5 to fix ERR_INVALID_THIS issue
https://github.com/pnpm/pnpm/issues/6424
2024-03-27 12:27:19 +00:00
James Ritchie db611bebba Text truncation fixes (#973)
* Span titles and code blocks truncate when window is small

* Tree view toggle arrow doesn’t have red hover state if row is an error
2024-03-27 12:16:20 +00:00
Eric Allam 215b60c742 v3: superjson output support (#971)
* superjson output support

* Better support for superjson in the task events, limiting output attributes

* Offload large outputs to object store (r2)

* Finishing up the offloading of large outputs/payloads to an object store
2024-03-27 11:57:22 +00:00
Matt Aitken 9c89ab40aa Throttle the live streaming of the run to 1 second updates (#972) 2024-03-26 14:20:10 +00:00
Matt Aitken b342e06583 Fix for scrolling with long run traces 2024-03-26 11:30:05 +00:00
Eric Allam 4418de515b Whitelist api endpoints that don’t use an authorization endpoint from the rate limiter 2024-03-25 21:18:05 +00:00
Eric Allam 0d2a71c5cf handle when traces/logs don’t have traceIds/spanIds 2024-03-25 21:10:31 +00:00
Eric Allam 9e02b45808 Fixed export 2024-03-25 17:24:23 +00:00
Eric Allam 395abe1b92 v3: Various fixes to support papermark use-case (#970)
* Adding a changeset for v3

* Add a version field to @trigger.dev/core-apps package.json

* Build trigger.dev when doing a prerelease

* bundle @trigger.dev/core-apps with trigger.dev cli

* Fix the init command config template

* Don’t use * for the @trigger.dev/core dep version specifier

* strip workspace: from the package version before installing it

* Added dependenciesToBundle config option to bundle ESM only packages

* Added logging around resolving dependency paths

* Try again

* Resolve dependencies based on the project dir first

* flip the bundled default

* Adding some logs around dev task completion notifications

* Adding some additional logs

* Add more logs

* Write out the log using process.stdout

* Store pending completion notifications and resume them when awaited (fixes race condition)

* Cleanup some of the logs

* Copy over the postinstall step from the projects package.json

* Add support for including additional files when deploying (e.g. prisma schema)

* Don’t run scripts when resolving deps

* copy all the files just in case anything is needed in postinstall

* Remove duplicate option

* Use the tag when outputting the dev command

* Remove the postinstall script

* add the trigger dir to the config if the default is not chosen

* Remove the “hud” display in the dev command

* trigger file names with dashes now work

* Better file watching in dev

* Much better duplicate ID experience now

* Much better “Project not found” error

* Export the handleError function types from sdk

* Add support for configuring instrumentation

* Upgrade and unify @opentelemetry/* packages (and remove storybook from the webapp)

* Fix typescript error in react package

* Upgrade react types in webapp

* Allow span icons to be determined based on the span name (e.g. prisma:)

* Ignore built-in env vars when checking for env vars, and allow continuing the deployment even if missing env vars were detected

* Improve the retry.fetch default behavior and option structure

* Fixed typescript errors with packages/email react types

* Update the retry.fetch docs
2024-03-25 17:02:49 +00:00
Matt Aitken b35eebb666 Rate limit API requests and changed SQS reading speed (#969)
* Trying to use the @upstash/ratelimit package with ioredis…

* WIP using the redis package instead

* Revert the action back

* Removed redis

* Started refactoring

* SQS setting for the poll interval. Set the default queue reading to be slower

* API rate limiter as Express middleware

* Organise imports

* Fixed spelling mistake “limitter”

* No authorization header response is problem+json
2024-03-25 16:39:20 +00:00
nicktrn 9ecf07731a v3: small features and fixes for prod infra (#968)
* add checkpoint restore events

* fix retries.enabledInDev

* fix tsconfig paths

* fix provider build and dev

* update kubernetes provider and fix builds again

* upgrade prod base to node 20

* update infra publish workflow

* rethrow k8s errors after logging

* shorten index container names

* fix error type assertion

* rename type assertion

* remove resource limits for now

* add missing run id on create

* add push to deploy command for self-hosting

* checkpointing fixes

* update coordinator image

* ensure valid registry login

* delete checkpoint archive after successful push

* log options on error

* structured logs for socket connections

* fix structured log merge

* exit process after checkpointing

* update restore pull secret name

* append shortcode to restore names

* log handler payload

* disable post start lifecycle hook

* pass in coordinator host via volume

* replace dapi with taskinfo

* add missing restore label

* don't restart restored containers

* remove init container from create

* atomic post-completion checkpoints

* switch to run id for container names

* improve wait accuracy

* measure basic checkpoint perf

* always log disconnect reason

* use system clock to end wait spans

* checkpoint readiness and cancel signals

* restore from checkpoint events and fix statuses

* remove attempt id env var

* restore dependencies from events

* reconnect wip

* lifecycle hooks are back

* fix hooks and improve reconnect

* make docker send postStart hook

* only checkpoint for retry if large delay

* fix a few more resume issues

* lifecycle hook fixes

* skip connection handler when waiting for post start hook

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2024-03-25 16:28:56 +00:00
Matt Aitken b890a64046 The in-progress stripes are much more subtle 2024-03-25 16:20:51 +00:00
Matt Aitken 4266b308e7 Link from trigger() to a run. Link back to the triggering run. (#967)
* Schema for SpanMessagingEvents

* RunFilters status map was missing the key

* Link from a trigger to the run

* Two-way links working
2024-03-25 11:28:35 +00:00
Matt Aitken 67c62f7d25 v3 is restricted to approved orgs (#965)
* v3 projects can only be created if the org has permissions to do it

* Admin page

* Removed unused classes

* Admin org page, with links between user and org pages

* Set v3 enabled or not
2024-03-25 11:28:21 +00:00
Matt Aitken c6d6a9191c Hide show.actions from the properties panel (#964) 2024-03-22 19:53:28 +00:00
Eugene Yaroslavtsev cd8f6b9af0 fix: [nestjs integration] fastify HTTP adapter detection now works correctly for response headers (#938)
* fix: [nestjs integration] fastify HTTP adapter detection now works correctly for response headers

- fixed a bug where Fastify responses were incorrectly processed as Express due to overlapping method names.
- introduced type guards to differentiate between Express and Fastify response objects.
- bumping @trigger.dev/nestjs patch version to 2.3.19

* fix TS type check build error
2024-03-22 14:41:21 +00:00
Kritik Jiyaviya a49b659701 feat: Ability to revoke an invite to an org (#902)
* feat: Ability to revoke an invite to an org

* Resolve a conflict with main

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-03-22 14:35:49 +00:00
Edward Fu 61c9a7c7d6 Fix opanai code example in docs (#961) 2024-03-22 14:17:37 +00:00
Matt Aitken de302858f8 v3 docs (#929)
* Started building out the docs navigation

* Drafted out a lot of the docs pages. With just titles and descriptions with a coming soon message for now.

* A ton more scaffolded pages with titles, descriptions, coming soon/incomplete docs messages

* Created the remaining page stubs

* Introduction page improvements

* Lots of docs changes, mostly the task overview page

* Moved some bits around

* Task overview fleshed out

* Triggering docs page

* Regular task page

* CLi dev docs

* Docs for debugging locally

* Environment variables docs

* Added env var images

* Deployment guides

* Updated the title of “Integrations” to “Deployment integrations” to make it less confusing

* Lots more docs pages

* Changed the language to JavaScript

* Fixed typos about queues and added a simple code sample

* Moved the local debugger docs into the CLI dev page

* Added the CLI deploy options

* Delete the local debugger page

* Updated the logging page with structured logging

* Added the new CLI deploy options

* Change to h4 for one of the options

* Errors page

* WIP on retrying

* Retrying guide

* Wait docs pages

* Queuing docs simplified, partial written

* Queuing and concurrency docs

* Run tests docs

* New combined error and retrying page

* Errors and retrying page updated

* More docs

* Added a possible configurations coming soon table

* Created a limits page

* Added warnings about how you need to get early access

* Minor fixes for the docs
2024-03-22 14:09:27 +00:00
Matt Aitken cf9d466b9e Basic JSDocs for the v3 SDK (#963)
* task(), retry and queue

* Added machine JSDocs

* Add JSdocs for the run function params
2024-03-22 14:09:06 +00:00
Eric Allam 7b3ffe040b v3: config file is now ts by default and uses named exports (#962)
* A bunch of changes to the config file:

- No more default export, the config is exported via the `config` named export
- `handleError` is moved to a separate named export
- Added the ability to include additional packages (e.g. wrangler) that aren’t included by default (think CLI usage)
- More reliably install packages in dev
- The config is now built first instead of directly imported, meaning we can now support typescript config files (`trigger.config.ts`)

* Update to trigger.config.ts in `trigger.dev init`
2024-03-21 10:40:44 +00:00
Eric Allam 737ff9928c When cancelling a run in the UI make sure the task run status is cancelled not interrupted 2024-03-20 13:22:50 +00:00
Eric Allam fc4b95d69e A bunch of deployment fixes (#960)
- Time out deployments to prevent never-ending building/deploying
- Use the CURRENT worker deployment when determining which version to execute
- Fix some of the deployment error handling logic
2024-03-20 13:15:48 +00:00
James Ritchie 6c546936f3 Improved v3 feedback button (#959)
* Removed feedback button from PageHeader

* Show a different feedback button in the side menu for v3 projects

* Fixed issue with button wrapping on smaller width browser
2024-03-20 12:16:20 +00:00
James Ritchie 08e4fc002f V3 UI improvements (#958)
* Adding a v3 feedback button top-right

* Changed paused to frozen for attempts

* Reordered and renamed run statuses

* Dropdown status menu shows tool tips on hover

* Added a new DP feedback button in the header

* Created a more useful feedback sheet

* Added loading bar animation to storybook

* Switch the integration page to point at the “feature” help instead of “integration” which has been removed

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-03-19 20:36:04 +00:00
Eric Allam 0e347b001b Don’t override TRIGGER_SECRET_KEY and TRIGGER_API_URL with local env vars 2024-03-19 16:04:31 +00:00
Matt Aitken 2e56af9742 Tasks page live-reloads with new tasks (#957)
* DevPubSub: use the schema that’s already been defined

* Publish a message to projectPubSub when a new DEV worker is created

* Live reloading of the tasks table (for dev tasks)

* Live notifications for deployed workers as well as local workers
2024-03-19 15:42:57 +00:00
Eric Allam dc5eb68a0b Fix typecheck errors because of resolveJsonModule 2024-03-19 15:33:09 +00:00
Eric Allam 891278ab1f Enable loading package.json inside of core 2024-03-19 15:24:01 +00:00
Eric Allam 41e1ac9e0b v3: nanosecond precision task events and immediate mode for dev events (#956)
* Store startTime in nanoseconds since epoch, ensure logs using nanosecond precision for their timestamp (so they are not out of order)

* export task events immediately in dev
2024-03-19 15:06:47 +00:00
Matt Aitken c5aaabdb4e The run timeline updates on the client if there's no new data (#955)
* Use “@v3” instead of “@latest” for the npx commands for v3

* Split the Timeline into a component so it can live refresh without re-rendering everything

* Timeline now live refreshes on the client every 500ms when run is executing

* The timeline bars now animate their position/width when it changes

* Export some more types from TreeView
2024-03-19 12:13:48 +00:00
Eric Allam affa3f25ee Trying beefier buildjet machines for CI 2024-03-19 11:38:48 +00:00
Eric Allam 86c24afb44 Support json traces and logs in the otel endpoints (#954) 2024-03-19 10:59:50 +00:00
Eric Allam 6afda40c35 Add depot setup action 2024-03-19 09:24:33 +00:00
nicktrn b585d1f2c5 v3: checkpoint restore events (#951)
* add checkpoint restore events

* fix retries.enabledInDev

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2024-03-19 09:02:56 +00:00
Eric Allam f26ba9a5cd Use depot.dev for docker builds (remove publishing to latest for now) 2024-03-18 20:52:08 +00:00
Eric Allam ba0ffacb15 Set the OTEL_EXPORTER_OTLP_ENDPOINT env var on dev workers 2024-03-18 20:16:25 +00:00
Eric Allam e55ca0279b Adding profile support to the v3 CLI (#953) 2024-03-18 17:35:29 +00:00
Matt Aitken 9304c447be Test, output and canceling improvements (#952)
* The vertical lines in the run tree view are now brighter

* Blank state when you click a task with no runs

* Canceling from the runs table

* Fix for styles coming through incorrectly to properties

* Fix for the OTEL output column having a $output prefix if it’s an object
2024-03-18 17:27:52 +00:00
Eric Allam ebec14093d Add healthcheck endpoint outside of remix if remix routes are disabled 2024-03-18 17:19:56 +00:00
Eric Allam 67cac97b26 Add DEPLOY_REGISTRY_HOST to allow configuring the deploy registry via the server 2024-03-18 15:56:28 +00:00
Eric Allam 0f32dee0eb Prevent depot command from displaying update message 2024-03-18 15:32:26 +00:00
Eric Allam 479d355b7b Setting DASHBOARD_AND_API_DISABLED=true will now disable the remix routes 2024-03-18 14:59:21 +00:00
Eric Allam 49e9dd8cb2 Disable fetch experimental warning and detect process resources (#950) 2024-03-18 13:46:24 +00:00
Matt Aitken cae3298564 Cancel run confirmation modal (#949)
* Tasks get the SHOW_ACTIONS property

* Override properties with the passed in ones in eventRepository

* Link from deployments to environment variables page, no need to link to docs

* “Show parent items” keeps the selected item selected

* LinkButton can accept onMouseDown, onMouseEnter and onMouseLeave

* “Show parent items” keeps any items focused and has a keyboard shortcut

* Action bar with focus button

* Canceling is working

* Nicer layout and button loading and disabled state

* US english spelling “Cancelling” -> “Canceling”

* Added a confirm modal to canceling

* Copy tweaks

* Fix for bad import

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2024-03-18 12:22:06 +00:00
nicktrn 1f190fe680 v3: fix dependency resume (#946)
* fix basic resume mechanics

* fix dependency resume

* fix deploy page sort

* remove task list console log

* checkpoint restore between attempts

* add checkpoint requirement checks to docker provider

* switch to raw execa for long statements

* catch and report pre-connection index errors

* graceful worker shutdown after completion

* fix final completion

* use same task process for each attempt

* update retry catalog entry

* add immediate return task

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2024-03-18 12:21:40 +00:00
Matt Aitken 85ec1af198 Don’t add proj_ to the front of the project ref 2024-03-18 11:05:09 +00:00
Eric Allam 52c364d691 v3: cli init command + CLI telemetry (#948)
* Adding telemetry to the deploy command

* Add ability to opt-out of telemetry in the CLI

* Remove log

* Unifying some telemetry stuff and adding it to the login command

* init command

* Remove extra trigger dirs

* Couple tweaks to the init CLI

* Don’t use npm init -y to create the package.json file
2024-03-18 10:12:11 +00:00
Matt Aitken a5d83971aa Cancel a run from the span view (#947)
* Tasks get the SHOW_ACTIONS property

* Override properties with the passed in ones in eventRepository

* Link from deployments to environment variables page, no need to link to docs

* “Show parent items” keeps the selected item selected

* LinkButton can accept onMouseDown, onMouseEnter and onMouseLeave

* “Show parent items” keeps any items focused and has a keyboard shortcut

* Action bar with focus button

* Canceling is working

* Nicer layout and button loading and disabled state

* US english spelling “Cancelling” -> “Canceling”
2024-03-17 11:42:30 +00:00
Matt Aitken 5b9c67aeef v3 deployments page (#945)
* Set the “current” deployment in WorkerDeploymentPromotion when a new deployment is completed

* Deployments page added to sidenav

* Basic deployments page working

* Pagination for deployments

* Right-align the pagination controls

* Improved the blank state

* Selected deployment panel

* Improved the side panel
2024-03-15 16:04:01 +00:00
Matt Aitken 1c98eb2b61 Use TaskRunStatus (instead of TaskRunAttemptStatus) (#944)
* Using the new run status instead of run attempt status

* The test page now uses the TaskRunStatus as well

* Organized imports

* Use TaskRun icons instead of attempt ones

* 10x zoom on the run timeline
2024-03-15 10:32:07 +00:00
Eric Allam f424c81086 No staging by default, and project external refs now are prefixed with proj_ 2024-03-14 15:11:31 +00:00
Eric Allam 0a33bf7206 v3: handle errors and customizing retrying (#943)
* Add the ability to handle errors at the task and project level

* Cancel in progress runs when disconnecting the dev CLI (in between attempts)

* unify the task executor across dev & prod
2024-03-14 14:38:13 +00:00
Matt Aitken 819b663ad7 Test page environment selection (#942)
* useLinkStatus hook

* Now you can customize the appearance of InlineCode

* Created <TaskFunctionName/>

* The test page now has an environment selector at the top
2024-03-14 13:54:47 +00:00
Eric Allam 478ce006cb v3: task run status and canceling runs (#941)
* WIP task run status, revamped resuming task dependencies

* Don’t select a span when toggling collapsing

* Cancel runs and attempts, in prod and dev
2024-03-13 15:51:43 +00:00
Eric Allam fe9435f63f Allow alternate config file names and skipping using a config file by passing —project-ref (#940) 2024-03-11 21:31:15 +00:00
Eric Allam d7cc2c9d6c v3: task payload refactor and configurable default retries (#939)
* Make the payload parameter the first argument to the task functions

* Allow configuring default retry behavior, and disabling in dev
2024-03-11 20:30:29 +00:00
Eric Allam 851b1769cb v3: use structured logging in a few places 2024-03-11 15:53:24 +00:00
Eric Allam e8381d5341 v3: Correctly handle tasks that have no output when resuming 2024-03-11 15:43:45 +00:00
nicktrn 20aa1cbe9b v3: checkpoint and restore with sim for local dev (#933)
* zod ipc connection with acks

* pass sender through to ipc handlers

* bits and bobs

* add host networking back in

* disable verbose logs

* restore after tasks and batches.. almost

* restore and resume all the things

* fix for systems without checkpoint support

* Get deployment indexing errors to work with the new ZodIpc stuff

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2024-03-11 15:20:33 +00:00
Eric Allam 883feab257 v3: various deploy improvements (#936)
* Cache the dependency resolution step of deploys

* Better deploy output and fixed an issue with deleting env vars
2024-03-11 14:31:55 +00:00
Eric Allam 83304f86f8 Capture uncaugh exceptions during indexing and fail deploys, with error output (#934) 2024-03-10 20:57:46 +00:00
Eric Allam 5d78bba5e3 Edit env var panel submit button Edit -> Save 2024-03-08 14:55:41 +00:00
Eric Allam e87a0cba1d v3: cli deploy improvements (#932)
* Add support for deploying to staging and prod

* Abort deployment if environment variables are missing

* Actually do typechecking

* Remove the build command and add a —self-hosted option to the deploy command
2024-03-08 14:52:46 +00:00
James Ritchie 8852d5b388 Callouts can handle inline children elements 2024-03-08 14:47:37 +00:00
James Ritchie 79ea8edc7c Table rows have a specified group class to fix conflicts with nested groups 2024-03-08 14:47:01 +00:00
James Ritchie 553370a9e5 secure clipboard fields show fixed number of “•••” 2024-03-08 14:45:53 +00:00
Eric Allam 47c18d9146 Fixed trigger.dev dev command 2024-03-08 11:16:56 +00:00
Eric Allam c385db63be v3: cli deploy command (#931)
* WIP proxy/deploy

* WIP, registry proxy in express working

* A couple of notes, preparing for indexing

* Move the changes to prod-worker into the new file

* Deploy command working with indexing and runs (docker provider only for now)

* Removed ts-expect-error directive

* Fixed build command
2024-03-08 10:49:42 +00:00
James Ritchie 86b2674e68 Updated login page (#928)
* WIP new login page

* Remix meta v2 implemented on the root page

* Added a spinner colour that works on our primary green

* Added new company logos

* Improvements to the login page

* Updated the meta function so the login page is responsive

* Fixed issue with the new logos not colouring correctly

* Login page now nicely responsive

* font size fix

* Spacing improvement

* Improved style of the relative time  dropdown

* Fixed viewport meta on login pages

* oranised imports

* improved the Sheet and feedback form

* Text area style update

* Feedback form tweak

* New project copy change: Project type -> Project version

* Runs filters use the correct variant

* Improved the select style

* Inputs now styled like Selects

* Removed login form from storybook

* Popover style tweak

* Popover looks like other filters

* Removed gap from filters and organized imports

* Cleanup

* Organized imports

* Made the inline code block smaller

* Fixed active badge label not being readable

* Fixed hero icon inside the button in the welcome page

* Fixed the filter button variants on the v2 runs page

* Fixed the select styles on the v3 runs page

* Improved the switch

* Fixed the filter styles on the events page

* Run page summary panels look good

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-03-07 10:35:52 +00:00
James Ritchie 161b2b3323 V3 style improvements (#926)
* Added more clipboard variants to storybook and improved styling

* Improvements to the clipboard components

* Code blocks match the design

* Improved the code block styles

* Dialog modal improvements

* Improved the free plan usage bar

* Better alignment of the shortcut icon in the button

* Side menu displays ‘v3’ next to the project header

* Page header improvements

* Project dropdown displays a badge if it’s a v3 project

* billing page now shows message

* Added the v3 badge to the project list page

* version 3 projects skip the select plan onboarding

* Added a new blank state to the runs page

* Conditionally set the blank state on the runs page

* Button padding tweak

* Updated the task and attempt icons

* Added a new blank state to the runs page

* Added more buttons variants to the button storybook

* Added new blank onboarding state for the tasks page

* Added a blank state to the test page

* Fix for bad svg attribute in TaskIcon

* Onboarding tweaks

* Add the projectRef to the init command

* Task icon is blue

* Added a v3 Project settings page

* Fix for typecheck error

* Added the new CodeBlocks with rowTitles to the span panel

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-03-06 18:06:20 +00:00
nicktrn 9b6f8f9238 v3: provider and coordinator updates (#927)
* add zod socket

* start using zod socket

* use zod socket for shared queue

* use shared provider shell

* update k8s provider task ops

* set otlp endpoint

* update docker actions and fix builds

* remove unused types

* update injected secret key env var name

* complete socket.io types to schemas migration

* update env example to new v3 key var

* fix coordinator build

* set task run label

* ensure attempt id is always set

* increase prod worker timeout

* set otlp endpoint for on runs

* pass otlp env var to prod worker

* auto-remove completed index jobs
2024-03-06 16:01:59 +00:00
Matt Aitken f50cee66d9 Upgraded to the latest Resend package 2024-03-06 15:18:56 +00:00
Matt Aitken 44d443a048 v3 live run reloading and minor style improvements (#925)
* Initial work creating the Redis publishing and subscribing

* Live view is working

* Show the live reloading status on the page

* Fixed some style issues on the run page with James

* Fix for invalid JSX attributes in the ExitIcon svg

* Some sexy shit

* The end line is now correctly coloured

* millisecondsToNanoseconds exported from core/v3 and imported correctly

* Fix for e2e tests, we changed the h1 to an h2

* Tidied imports

* Removed unused hook
2024-03-06 09:48:00 +00:00
Matt Aitken 2a1273b683 Major v3 web app update (#924)
* Added the new colours to the Tailwind config

* Fixed Tsailwind compile errors

* WIP Geist working in the app

* WIP Storybook

* Storybook is working again… ouch

* Use Geist mono for CodeMirror

* Some find/replace class changes

* Resizable colours improved

* WIP on primary button

* Minor style improvements

* Improve the side menu header styling

* Improved v2 breadcrumbs

* Account side menu tweaks

* The page now works with the NavBar and UpgradePrompt

* Removed unused import

* Refactored the buttons to be dry-er

* Removed the breadcrumbs

* WIP on nav bar

* WIP updating the button styles

* Fix for the old test page

* Fix for type errors

* Removed console.log

* Colour change in the resizable handle

* New loading bar divider

* Removed the design plugin

* Creating our own storybook pages

* Added some “storybook” pages

* Added DetailCell storybook

* WIP new animation for the loading page

* Added the new loading divider

* Fix for the time frame filter having a green border

* Style improvements to the new test page

* Small style improvements

* Improvements to the list pagination components

* Nav bar back button improved

* Improvements to the run page

* Lots of v2 style improvements

* Help looks better

* Improvements to the regenerate API key modal

* More general improvements

* Added section titles to our storybook

* Added form stories

* Fix for missing key prop

* Loading bar is working

* Fixed button submitting state

* Fix for the test button icon

* Code bg improved

* Improved oauth buttons

* Integration page header fix

* Various improvements, mainly changing button variants

* Segmented control style updates

* Added an outline of 3px for the segment control

* Fixes for the billing pages

* More pricing improvements

* Added dialog to storybook

* Typography now in storybook

* Free usage bar added to storybook

* Added inline clode to storybook

* Separated menu types into a sub section in storybook

* NamedIcon now in storybook

* Added page header to storybook

* Added pricing callout to storybook

* Added radio groups to storybook

* Added segmented controllers to storybook

* Added shortcuts to storybook

* Added switches to storybook

* Added toast to storybook

* Added tooltips to storybook

* Added tree view to storybook

* Added usage charts to storybook

* Tarted up the environment variables page

* Fix for the FreePlanUsage panel bg colours

* Added new badge variants

* Added the <TaskPath /> to the tasks table

* Span header improvements

* Started work on the timeline

* Started work on the timeline

* Fix for the run page header

* Timeline tick marks are working

* Timeline working

* Got the durations showing on hover

* Button improvements

* Experimenting with how the duration should be shown

* Lots of refinements to the timeline

* Much nicer API for the Timeline

* The switch is now purple to match the design, with inverted thumb when on

* Removed old stuff

* Export the props

* Added the span with duration back in

* Simplified more and fixed the span durations

* Put in some decent dummy data

* Rendering defaults

* Wip with the mouse cursor

* Improvements to the story

* Added Slider primitive

* Integrated the icons into the slider

* Lots of layout improvements

* Cleaned up imports

* “Root” indicator

* Animated background on partials

* Pull the styles through to the spans and log dots

* Fixed some bugs in the TreeView when nodes get created or destroyed

* Fix for incorrect parentTask reference

* Added run streaming endpoint for live refreshing

* Added the tabs to Storybook

* Fix for status font size mismatch

* Fix for the misaligned run filter status

* Set a minimum duration on the timeline

* The TreeView now re-calculates if the number of nodes has changed

* Partials now render to the end

* Improved the durations gutter

* The duration is calculated using the current time if there are partial events

* Added the environment label to storybook

* Improved the environment label style

* Removed bottom margin from badge

* Button style improvements

* Callouts style fits the new design better

* Got the scrollbars to appear on the tree/timeline

* Added scroll support

* Synced scrolling working

* Close button and exit icon for the detail panel

* secure field shows start of env

* Clipboard improvements

* Latest lockfile

* Fix for the durations wrapping

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
2024-03-04 17:33:53 +00:00
Eric Allam 64401ee8ec TRIGGER_API_KEY -> TRIGGER_SECRET_KEY in v3 2024-03-04 15:47:58 +00:00
Eric Allam b7845685eb v3: no bundle builds for the dev CLI (#923)
* WIP no bundling

* Convert dev CLI to use an unbundled build process to support otel instrumentation

* Fix pnpm lock file

* A couple of fixes to get typechecking to work
2024-03-04 15:36:09 +00:00
nicktrn 52c9d485f8 v3: cli build command, prod runs, checkpoints (#919)
* fix trailing slash in api url

* add maybe platform down error

* shorten config path

* extend protobuf compiler install instructions

* build command and image model

* new image triggers task indexing

* index support for prod builds

* shorten example provider secret

* multi-stage task prod build

* lock prod tasks to node 18 image

* extract shared build and dev command libs

* pull out more shared deps

* add coordinator and providers

* fix core-apps build

* add dev builds for new apps

* fix cwd

* enable corepack

* some build fixes

* enable buildkit for old docker versions

* coordinator image fixes

* update provider containerfile

* build dev images in parallel

* upgrade pgadmin

* fix prod facade build

* prod runs

* fix merge

* don't knock out platform on invalid attempt id

* fix prod facade

* rename to build.ts

* fix prod builds

* set to executing after fetching payload

* make prod worker listen on random port if in use

* remove experimental warnings in dev

* prod resume

* prevent execution after completion

* exit prod worker after completion

* always restart otel collector

* docker checkpoints and prod runtime messaging

* don't retry indexing without chance of success

* make platform checkpoint aware

* deploy with existing hash sets latest worker

* log restore requests

* only try to checkpoint long waits

* tidying up

* lockfile

* fix build

* prod worker merge fixes

* fix prod complete and cancel

* fix lua nil checks

* socket namespace abstraction

* cleanup

* make all build args optional

* add build script

* don't require env vars for dev

* fix schema

* prod merge

* small fix

* bind correct logger

* fix v3 ref catalog entry

* resume prod batch

* pass socket to error and disconnect handlers

* fix non-batch resume

* fix batch resume

* send connection env vars when not in dev

* create worker via socket

* move api client back into v3 cli

* fix lockfile

* fix resume with failures

* marqs replace message

* typecheck prior to build

* don't define api url in prod builds

* support prod retries after resume

* skip typecheck option
2024-03-04 13:10:07 +00:00
Eric Allam ca47e6bdcd v3: cli cancel improvements and add back in deprecating background workers (#918)
* Show runs as cancelled when killing the dev CLI

* Fixed error when waiting for a task

* Deprecated workers will no longer be able to run unlocked task runs

* Fixed selecting the latest background worker version in test list

* Don’t propogate trace context when triggering an async task

Also add batch id to the context and the task events
2024-02-29 15:34:00 +00:00
Eric Allam 933cf0f119 v3: run.isTest now propagates through child tasks and the trace (#917)
* run.isTest now propagates through child tasks and the trace

* Try to fix the pr checks docker hub rate limit error
2024-02-28 17:01:31 +00:00
Eric Allam b6517af522 v3: Cancel dev runs when the dev CLI exits (#916)
* Cancel dev runs when the dev CLI exits

* Clear out in progress attempts after cancelling them
2024-02-28 16:00:39 +00:00
Matt Aitken 479445f741 V3 Test feature (#915)
* Added isTest to TaskRun

* TriggerTaskService now accepts isTest and adds it to TaskRun if set

* Set the cliVersion and sdkVersion when indexing

* Added a test page

* Radio buttons are now circles and accept a ReactNode

* The background of the code editor is now darker

* WIP on the test task page

* Improvements to the test page

* Testing is working

* Fix typo

* Show the real isTest value in the runs table

* Added a key to the outlet so it correctly resets all the state on the sub-route
2024-02-28 15:52:24 +00:00
Eric Allam 1fabcf68fa Override local env vars with env vars in the server (#914) 2024-02-27 15:44:55 +00:00
Matt Aitken d7c79ee651 V3 API keys page and Environment Variables (#907)
* New API keys page working

* Added EnvironmentVariable and EnvironmentVariableValue tables

* Environment variables presenter and repository started

* Icon now accepts a ReactNode as well

* The create form is working

* Improvements to validation

* Getting all the environment variables is working

* Editing an env var working

* Fix for deleting a value from an env var

* Separate route for adding new env vars. Works with “Save and add another”

* Editing is working properly, and revealing all values

* Deleting env vars

* Get environment variables with the environment id

* Added th env vars count to the Environment variables page

* Removed the commented out old Env & API keys side menu item

* Fix imports in ClipboardField

* Added a storybook page for all the variants of input fields

* Upgraded Tailwind for the :has selector

* Fix for the edit button not filling the width

* Reworked the input fields so they work with a variable width icon on the left

* Improvements to the new env var modal

* Improve the style of the edit environment variable panel

* Fix for when Input is type=“text”

* Icon now works with FunctionComponents and ComponentTypes properly

* Removed a console log

* Removed unused imports

* Use a const schema for SecretValue

* Added friendlyId to EnvironmentVariable
2024-02-27 14:35:43 +00:00
Eric Allam 8d6e710dc2 V3: retry utilities (#913)
* WIP

* retry.fetch w/intercepting to test

* Fixed the incorrect renaming of limit to maxAttempts in v2

* Fixed source map support in dev

* Cleanup background worker files once they close
2024-02-27 13:54:51 +00:00
Eric Allam 90a302f9f7 v3: batch trigger (#908)
* Support for batch triggers

* Various trace fixes and improvements

* Moved trace into the logger, fixed span cardinality issues with waits and triggers

* Add support for attaching a debugger in dev with —debugger flag
2024-02-26 11:21:06 +00:00
Matt Aitken 07efef405d v3 span details (#906)
* WIP on saving the resized state in a cookie

* Progress on remembering the panel width

* The resizable panel now remembers even when closed

* Improvements to the span panel

* Hide integrations in the v3 side menu

* Added “UTC” to the times

* WIP changing how styles work

* Reference unflattenAttributes from the package

* Unflatten now correctly unflattens arrays

* Unflatten typecheck fix

* Improvements to the spans and UI for them

* Added the “events” to a span, including special styling for errors

* Unflatten doesn’t work on an array of Attributes
2024-02-23 09:54:01 +00:00
Eric Allam dd63fe6e9f v3: Implemented in-process task retries in dev w/cache support (#905)
* Implemented in-process task retries in dev w/cache support

* Improve the stack trace correction
2024-02-22 10:12:23 +00:00
Matt Aitken d8c645a3f0 Fix for projectVersion input name change 2024-02-22 09:18:52 +00:00
Eric Allam 24600d2c01 Fixed unFlattenAttributes import 2024-02-21 20:15:06 +00:00
Matt Aitken 584936fa29 Early v3 project UI (#904)
* Added ProjectVersion to projects, defaults to V2

* Moved v3Enabled to the existing feature flags

* Update to using the v3Enabled feature flag

* Allow people to choose v3 when creating a new project

* Added version to the ProjectPresenter

* v2 project and v3 project redirecting

* .env.example for the v3-catalog

* Added sdkVersion and cliVersion columns to the BackgroundWorker table

* Added additional classes for environments

* First draft of the Tasks table

* Link to the task page

* V3 side menu project items

* Moved the ListPagination component into the components folder

* Moved the TaskListPresenter to a v3 folder

* Bare bones task page with tabs

* Task page, we’re going to delete this though

* Bare bones runs table working

* Rejigged the columns

* The run table status

* Environment and status filtering working

* Added time filters

* Cursor and direction is working… I think it’s tricky to know for sure

* Added TaskRun numbers

* Selecting a task now links to the runs page with filters turned on

* Added support for the enqueued status

* Reworked the task table

* Link to the task and environment runs

* The run page is rendering a tree of the events

* Change the task table column to “Created at"

* WIP on making the run tree view look good

* Improvements to the run tree

* Removed the janky scroll bar flash

* Change the title of the task logs to just the task ID

* Live timer when a span is running

* Added “Show parent items” link

* Fixed the bug jumping to parent items

* Style improvements to the run

* Added the resizable handle to the run page

* Moved formatDuration to core/v3

* Wait for now has nice log messages

* The run detail panel is working with just a title for now

* Navigating to a span and persisting between page reloads is working

* The run detail timeline

* Wrap log dates in a paragraph

* Latest span detail view

* Scrolling in the right-hand panel

* Tweak default resizable layout for the run page

* Attempted improvements to stop a recursive issue on TreeView

* TreeView useReducer WIP

* Changed the change callback

* Add changes to the state

* Use the new onSelectedIdChanged in the app

* Don’t update the state from the outside

* Filtering fix, although navigation doesn’t work nicely

* Filtering working when changing the content and clearing it

* Don’t allow the same selectedId callback to be called twice…

* useDebounce hook

* Switch from using defer to just typedjson for now

* Latest attempt at span navigation

* Removed log

* Turn off filtering for now, it’s causing the Links to break somehow

* Fix for page height issue

* Added (Developer Preview) to the v3 project select box

* Revert "Filtering working when changing the content and clearing it"

This reverts commit 20d9fbe36ded619e9d3eb0b23d4ed0568a88a615.

# Conflicts:
#	apps/webapp/app/components/primitives/TreeView/TreeView.tsx

* Switch to using the old filtering

* Added useThrottle hook

* Instantly close the panel when deselecting a node, use debounce when navigating to a span

* Better spacing in the right hand panel

* Comment out the v3 side menu pages that don’t exist yet

* Fix for typecheck fail

* Clear the statuses too
2024-02-21 18:42:12 +00:00
Eric Allam a54bdb23bf Fixed the Docker build (error in generate-protos.mjs) 2024-02-20 13:31:16 +00:00
Eric Allam 07f7c65054 v3 queue system (#903)
* Introducing Modular Asynchronous Reliable Queueing System (MarQS). Works in dev

* Convert MarQS to using lua and dealing with concurrency

* Simplified the timeout queue and current concurrency is now a set instead of a flat value (to support idempotency)

* Implement task heartbeating and reconnect the background workers CLI when the websocket connection reconnects

* Start adding internal telemetry support for the server

* Get env vars to work in dev and implement prisma tracing in webapp

* Cleanup telemetry and implement it in the consumer

* Implement dequeuing a message from a parent shared queue

* Implement a custom logger exporter instead of using console log exporter

* Use node instead of shell for generating protocol buffer code

* Propogate trace context into debug logs, and allow turning off logger exporter through env vars

* Switch to using baselime for internal otel data

* Make orgMember optional to fix type issues

* Provide the CLI dev env vars through the CLI, don’t build dotenv into facade

* Removed the logger import

* Address Matt’s comments

* Addressing more of Matt’s comments

* Handle sending an execution after a websocket connection closes

* Remove auth from the env attributes to prevent obfuscation
2024-02-20 12:16:41 +00:00
Matt Aitken d04c8e89f6 Added a “repo-token” to the Install Protoc GitHub action steps
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 19s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2024-02-19 14:15:15 +00:00
Matt Aitken b69902dd84 Deduplicate integrations in the JobListPresenter (#901)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 6s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 1s
🚀 Publish Trigger.dev Docker / units (push) Failing after 19s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2024-02-19 13:13:28 +00:00
Eric Allam 2aabb994cf Install the protobuf compiler in the docker builder stage 2024-02-12 16:58:57 +00:00
Matt Aitken 310d51bac0 Tree view component (#900)
* WIP creating a TreeView component

* Very simple tree displaying

* WIP on TreeView types

* The state is computing properly

* Improved the state and types

* Virtualized rendering

* Added state inside the useTreeState hook

* Selection working

* Deselecting nodes

* Toggle selection

* Expanding/collapsing nodes

* Get notifications when changes are made

* Only try show the visible items

* Experiment to try getting cell animations working

* Renamed hook to useTree

* Keyboard navigation is working

* Proper focus support

* Nice selection of the parent by pressing left

* End selects the last visible node

* Showing how the TreeView can accept a selected id and expanded ids from the outside

* The useTree hook now uses selectedId and collapsedIds to make it easier to use

* Check the inputs are valid before applying them, ignore if they’re not

* Don’t allow a selected node to be hidden by collapsed parents

* Nicer API for the onChange callback

* Supports animated collapsing of the tree view

* Nice smooth scrolling

* Removed logs

* Removed unused key

* Remove intricate estimation

* StandardTreeView has lots of good defaults baked in

* Allow passing of parent class name in

* Work on scrolling to the node… needs a bit of a reshuffle

* Just make the TreeView better rather than adding StandardTreeView

* Renamed rowVirtualizer to virtualizer

* Move the virrtualizer into the hook

* Scrolling to selection is working

* Added filtering
2024-02-12 16:43:47 +00:00
Eric Allam 6be1099a12 Don’t git submodule in docker 2024-02-12 14:53:03 +00:00
Eric Allam baf3a84cda v3 dev cli command + more (#894) 2024-02-12 14:24:32 +00:00
Matt Aitken 70f9bd0d70 Latest lockfile 2024-02-12 13:11:14 +00:00
github-actions[bot] a1860dbaae chore: Update version for release (#899)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-12 13:00:14 +00:00
Matt Aitken d69e4e712d OpenAI integration: retry 400 status code because OpenAI returns this sometimes for no reason (#898) 2024-02-12 12:48:48 +00:00
Matt Aitken 7fae67c47d Fix/autoyield canceled run (#890)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 3s
🚀 Publish Trigger.dev Docker / units (push) Failing after 16s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 20s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Todo for the fix

* If the run has been canceled during execution, don’t do any further processing of the run
2024-02-09 11:06:19 +00:00
Matt Aitken 9ae0ca64af Fix edge cases with deleting last org/project (#892)
* If you have an org with no projects, it displays in the project dropdown with a “New project” button

* When creating a new org disable the button whilst it’s doing the request

* If an org already had any deleted projects it couldn’t be deleted…

* When selecting the best project, factor in deleted ones

* Don’t show the cancel button when creating a new org if there are no non-deleted projects

* If a project has already been deleted just return
2024-02-09 11:05:28 +00:00
Matt Aitken da69fa0613 Fixes #886. Removed “public” schema from the JobListPresenter query
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 4s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 20s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2024-02-07 16:48:18 +00:00
Matt Aitken 336029b842 Organization renaming, deleting and one-click email unsubscribe (#885)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 4s
🚀 Publish Trigger.dev Docker / units (push) Failing after 10s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Added the org settings page to the sidebar

* Added loading states when renaming/deleting projects

* Don’t show deleted orgs in the app

* The actual db migration file

* The Org settings page with the actions working

* Don’t remove org members, just leave them

* Don’t show invites from orgs that are deleted

* Allow disabling IntegrationConnections

* Don’t refresh IntegrationConnections that are disabled

* Set all the integrations as disabled

* Updated the unsubscribe checkbox text

* Unsubscribe route

* Use the magic link secret, not the encryption key. Also make the error message more vague

* Only members of the org or project can rename them

* Don’t throw an error if the connection can’t be refreshed, return undefined instead
2024-02-07 10:52:50 +00:00
Matt Aitken 29edcd3df9 Rename and delete projects (#880)
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Side menu: selector title changed to project. Changed section headers and made it Slack + Discord

* Added project settings page. Renaming is working

* Added project.deletedAt column

* Deleting projects WIP

* Allow clearing the project from the session

* Don’t load projects that are deleted

* Improved the project selection logic

* Clear the session project id when deleting a project

* Deleting the last project in an org now works. The new project page doesn’t have the sidebar anymore.

* Removed false code comment

* Added the JobRun index back in, using Prisma. Otherwise it tries to remove it on each migration

* Only return environments where the project isn’t deleted. This will block API calls

* Do the project deletedAt check in code, not SQL

* Made it clearer what the code does with a comment and applied the same logic to the public api key
2024-02-05 13:14:33 +00:00
Matt Aitken a9ff32418e Fix for when there are no jobs…
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 4s
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2024-01-30 17:35:04 +00:00
Matt Aitken 7358fcb891 Latest lockfile 2024-01-30 17:07:24 +00:00
Matt Aitken 28052daad9 Faster jobs page (#879)
* Optional next/previous with the list pagination

* Defer the loading of the runs table

* Only return the latest run in a separate query, then do a join in code

* Added a composite index to speed up getting the latest run from a job id
2024-01-30 17:02:04 +00:00
github-actions[bot] 364c8c5f7f chore: Update version for release (#876)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-30 13:36:36 +00:00
Matt Aitken 4b3b418abb Set endpoint URLs to null, instead of deleting them (#878)
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Added Endpoint deletedAt column

* Only show endpoints where they’re not deleted

* Don’t delete Endpoints, set the deletedAt and change their slug name

* Only perform indexing if the endpoint isn’t deleted

* Have a nullable URL for endpoints

* Deal with null URLs throughout the app

* Re-running and retrying behaves properly when there’s no endpoint URL

* Remove console.log

* Better error message when doing a run
2024-01-30 10:45:12 +00:00
Matt Aitken 2e354d342c Deleting endpoint working (#875) 2024-01-29 11:57:25 +00:00
Matt Aitken dd879c8e4a Fix api run statuses (#874)
* Added a subtask for testing

* Make it easier to run the CLI from the nextjs reference project

* Copies of the run and statuses endpoints, but without simplifying the run statuses

* Use the new v2 endpoints that give the full run statuses

* Removed unused import

* v2 events endpoint with the full run status info

* Changeset
2024-01-29 11:42:19 +00:00
Matt Aitken af485b9180 Fix custom oauth client (#872)
* A checkbox can now be readonly and not be checkable, with correct styling

* Use readOnly for the hasCustomClient checkbox, not disabled

* Better styling of the disabled state

* The update oauth form too
2024-01-26 17:25:15 +00:00
Matt Aitken a739ebaa88 Tweaked the layout of the usage runs charts so the daily runs are in the box with other run charts 2024-01-26 15:05:52 +00:00
Kritik Jiyaviya 3ebc2578e0 feat: Add daily runs graph (#865)
* feat: Add daily runs graph

* Merge branch 'main' into feat/daily-runs-graph

* update DayRunsChart

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-26 15:00:30 +00:00
Kritik Jiyaviya 0b657b33f9 Allow retrying a job run with an invalid payload (#869) 2024-01-26 12:39:23 +00:00
Erin Allison 7ac942dc0e Address unintended type coercion in PageInfoPropertyComponent (#861)
Fixes triggerdotdev/trigger.dev#858

Signed-off-by: Erin Allison <erin@eallison.us>
2024-01-26 09:44:55 +00:00
Matt Aitken 9b12016428 Improved SQL reads for some dashboard pages (#868)
* Pass subscription status into the usage bar

* Page navigation spinner is now blue (was a bit subtle before)

* Better logging of db queries, this will be commented out before the PR is merged

* Select only the required fields

* We don’t need the member count for each org

* WIP redirecting with projectId in session

* Switching projects is now working, without duplicating the project query

* Removed logs in revalidate function

* Removes some unused imports

* ProjectPresenter: removed lots of unused db selects

* Root use defaultShouldRevalidate, not just true

* Simplified the job list query and separated the deleting job modal query

* Use requireUserId instead of requireUser wherever possible

* EventListPresenter query simplified

* Simplified the RunListPresenter query

* Disable query logging

* Use the latest updated version for the job list table

* We need to use the org presenter on the select plan page
2024-01-26 09:41:11 +00:00
Matt Aitken d6b44de4ba Defer the loading of the usage data (#866)
🚀 Publish Trigger.dev Docker / units (push) Failing after 10s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 20s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 19s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Updated to the latest remix-typedjson package

* Throw an error if the org isn’t found

* Use defer. Doesn’t work because Date isn’t deserialized correctly

* Use regular defer, typeddefer isn’t working properly…

* Don’t update remix-typedjson, wasn’t needed

* Organize imports
2024-01-22 10:26:33 +00:00
Matt Aitken 17df4839d7 Latest lockfile
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 5s
🚀 Publish Trigger.dev Docker / units (push) Failing after 21s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2024-01-21 17:30:21 +00:00
github-actions[bot] e3f78178f7 chore: Update version for release (#864)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-21 17:29:23 +00:00
Kritik Jiyaviya da90ee13c3 fix: Resend integration example comment (#860) 2024-01-21 17:16:26 +00:00
Matt Aitken 583da458ec Changed the minimum interval time period from 60s to 20s (with changeset) 2024-01-21 17:06:09 +00:00
Matt Aitken dcf95c4eb2 Revert "Changeset: Changed the minimum interval time from 60s to 20s"
This reverts commit c272e38de2.
2024-01-21 17:04:11 +00:00
Matt Aitken 32cf5790cb Revert "Changed the minimum interval time from 60s to 20s"
This reverts commit ca78ddc2c2.
2024-01-21 17:04:11 +00:00
Matt Aitken c272e38de2 Changeset: Changed the minimum interval time from 60s to 20s 2024-01-21 16:29:54 +00:00
Matt Aitken ca78ddc2c2 Changed the minimum interval time from 60s to 20s 2024-01-21 16:28:28 +00:00
Matt Aitken 07ed8c346a Fix for enabled env var in docs 2024-01-20 14:01:56 +00:00
Matt Aitken d4391f2e2d Fixed link in io.logger to the run log 2024-01-20 12:54:11 +00:00
Eric Allam 2c328ba93d Fix pnmp lock file again 2024-01-17 14:50:04 +00:00
github-actions[bot] 68dbc07ee8 chore: Update version for release (#854)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-17 14:49:19 +00:00
Eric Allam 58448243af Fix pnpm i 2024-01-17 14:41:51 +00:00
Eric Allam 6c4047cf21 Fix an issue where runs were stuck executing when a child task failed and the parent task retried 2024-01-17 14:39:06 +00:00
github-actions[bot] 831860eace chore: Update version for release (#853)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-17 14:13:34 +00:00
Matt Aitken db46f2a69a Add explicit return type to deprecated sendEmail function because tsup was complaining 2024-01-17 14:07:45 +00:00
Kritik Jiyaviya 4dd6cf18dc feat: Add support for the new Resend audience API endpoints (#850)
* feat: Add support for the new Resend audience API endpoints

* update pnpm-lock.yaml

* update pnpm-lock.yaml

* Merge branch 'main' into feat/support-for-resend-audience-api

* latest pnpm-lock.yaml

* Create lovely-items-end.md

* Update pnpm-lock.yaml

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-17 14:06:45 +00:00
Eric Allam adf66d23b8 Update pnpm lock file
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 4s
🚀 Publish Trigger.dev Docker / units (push) Failing after 15s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2024-01-17 11:15:30 +00:00
github-actions[bot] 5c42831a60 chore: Update version for release (#846)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-17 11:14:52 +00:00
Eric Allam 26f5e7774d Fix yalt.dev connection timeouts by increasing timeout from 1s to 5s (#851)
* Increase the yalt tunnel connection timeout to 5 seconds

* Add changeset
2024-01-17 10:27:57 +00:00
Matt Aitken f209a3b364 Ability to disable organization runs + more obvious if you're over the free limit (#848)
* Fix for typo in error when a Job invoke fails

* Can disable runs for an Organization

* Don’t perform runs if runsEnabled === false for an Org

* Exceeded runs messages made into errors, they were very subtle

* Return the runsEnabled property for each org

* More obvious message if you’re over the free run limit

* Added a red border to the free usage panel if you’re over your run limit

* Added missing property to Storybook for the FreePlanUsage component
2024-01-17 09:42:58 +00:00
Son Yen Nguyen a93b554f8b Feat: Update cron parser human readable string (#847)
* Update cron parser human readable string

* Create hot-cobras-flow.md

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-16 17:22:35 +00:00
Matt Aitken 0f342cd1be Don't show duplicate Job warning if it's an internal job 2024-01-16 15:54:20 +00:00
Matt Aitken 7df2f85a1f Latest lockfile 2024-01-16 15:22:21 +00:00
Matt Aitken f14180d13c Also hide "dev.trigger.scheduled" events from the event list 2024-01-16 15:21:45 +00:00
github-actions[bot] ab6b9514cd chore: Update version for release (#844)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-16 15:00:28 +00:00
Matt Aitken 98345d67d9 Allow unchecked array access in the CLI tsconfig. This matches the other packages… 2024-01-16 14:46:31 +00:00
Matt Aitken 38f5a90399 Auto-yielding is skipped for tasks that are no-ops and subtasks 2024-01-16 14:01:05 +00:00
Matt Aitken 1b2635ae4a Don’t show “trigger.scheduled” events in the list 2024-01-16 12:14:08 +00:00
Matt Aitken 129f023d11 EventTrigger source wasn’t getting passed through to the class 2024-01-16 12:07:11 +00:00
Matt Aitken 795e637dec caniuse-lite updated, it was logging out an annoying message 2024-01-16 11:52:08 +00:00
Matt Aitken 5238c424fc Absolute date filtering (#845)
* WIP on absolute date filtering for runs

* Use the date hook instead

* Reworked the date field again so the state behaves nicely

* Way better date filtering

* Setting the absolute date is working well, also clearing filters

* Reverse date format

* Turn off the guide

* Added time filtering and clearing to the events page
2024-01-16 11:44:15 +00:00
Matt Aitken 1bbd7e6dc3 V3 CLI started, with Personal Access Tokens and Who Am I (#841)
* Initial CLI commit

* Hooked up the CLI so it actually shows stuff…

* Totally reworked the v3 CLI to be based on our existing CLI (Commander)

* WIP on PersonalAccessTokens and AuthorizationCodes

* WIP creating a Personal Access Tokens page. Created a new sidenav for account pages

* Creating tokens is working but the form is broken

* Tokens are created in the UI

* Creating and revoking access tokens from the UI is working

* Improved the create form and copy

* Tokens are a bit shorter and only lowercase

* API endpoint for creating AuthorizationCodes and the web page users hit to create PATs from them

* V3_ENABLED env var and hook that can be used in the UI to show/hide things

* API route to get a PAT (within 10 mins of creating an auth code). Moved some code to core

* Start to build the login command

* Nicer banner when starting the CLI

* Nicer update checking

* Update command style improved

* Removed the template step

* Login command options are now working

* The new CLI is logging in using the Personal Access TOken. But I need to save it still

* Logging in and saving the token is working

* Deal with already being logged in

* Who Am I working with PAT

* Deleted old account side menu header

* Improved the copy on the Auth code page

* Added docs for the login and whoami commands

* Added readme instructions for the update command

* Removed some unused things

* Remove fetchUseProxy for now
2024-01-15 14:45:41 +00:00
Kritik Jiyaviya 3bb82ed9a5 feat: runs filtering by relative timeframe (#832)
* feat: runs filtering by relative timeframe

* improve logic

* Used formatDateTime

* fix: logic of  determineTimeFrame() function

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-15 14:13:20 +00:00
Abhimanyu Yadav ff4ff869ab feat(logger): accepting Error objects as parameters in io.logger.error() (#797)
* feat(logger): accepting Error objects as parameters in io.logger.error()

* Allow errors for any log level

* Create silent-ties-vanish.md

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-15 14:02:41 +00:00
Matt Aitken 1dcee2b338 Changed docs analytics to PostHog EU 2024-01-15 13:51:02 +00:00
Aditya Tripathi 0a798446c8 feat: managed cloud check for search indexing (#825)
* feat: managed cloud check for search indexing

* fix: vice versa on the robots meta tag

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-15 09:35:43 +00:00
Kritik Jiyaviya 209942a63d fix: integrations list scrollbar (#829) 2024-01-15 09:29:42 +00:00
Manthan Mallikarjun 57a9b35870 Fix typo in deployment-automatic docs (#842)
Env var is wrong
2024-01-15 09:28:37 +00:00
Fabian B a16b65f666 docs: fix syntax error (#839) 2024-01-14 16:55:01 +00:00
Matt Aitken 5871745a92 Latest lockfile 2024-01-12 14:13:32 +00:00
github-actions[bot] 87b5dfbf11 chore: Update version for release (#837)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-12 14:10:42 +00:00
Michelle Rosenberger 5af2003516 Fix Stripe integration webhook validation (#836)
The SubtleCryptoProvider cannot be used in a synchronous context. This
is a problem for non-node environments where the Stripe client falls
back to SubtleCryptoProvider.

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-12 14:05:33 +00:00
Matt Aitken 85ce729bf2 Latest lockfile 2024-01-12 13:55:03 +00:00
Matt Aitken 5701d1da42 Reference the —https flag in the instructions if your endpoint isn’t found 2024-01-12 13:54:36 +00:00
Chigala bc61d83764 feat: updates CLI to use https flag (#814)
* feat: updates CLI to use https flag

* added changeset

* Added yalt to the changeset

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-12 13:53:43 +00:00
nicktrn 5bf125be0d Fix: helm chart and docs (#827)
* Improve helm chart and docs

* Minor docs changes

* Add alternative commands to specify values
2024-01-11 13:54:22 +00:00
Eric Allam babe1c0e54 Fix pnpm lock file 2024-01-10 10:58:07 +00:00
github-actions[bot] 1224fceb18 chore: Update version for release (#831)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-10 10:57:32 +00:00
Eric Allam 8277f4d249 Use correct overload param when invoking a job outside of a run (fixes #802) 2024-01-10 10:50:12 +00:00
Eric Allam 73cb8839a5 Fixed invoke inferred payload types (fix #830) 2024-01-10 10:44:35 +00:00
Matt Aitken 5d0a731cf6 Event page tweaks (#826)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 1s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 3s
🚀 Publish Trigger.dev Docker / units (push) Failing after 10s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Don’t show internal events

* Show the cancelled time

* Made the Pagination component accept any compatible list type

* Changed some wording on the event detail page
2024-01-05 12:39:27 +00:00
Kritik Jiyaviya 25a152517e feat: Events list page (#824)
* feat: add events list

* Changed the Events icon in the sidemenu

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-05 12:04:31 +00:00
Matt Aitken d1092fcd2c Run filtering now works on the job runs page too (#823)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 3s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 3s
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Run filtering is now shared: runs page and job runs page

* Use optimistic location

* Improved the type in the run status filter dropdown

* Organize imports
2024-01-03 15:50:45 +00:00
Matt Aitken 61d33ed1b8 Latest lockfile 2024-01-03 14:23:21 +00:00
github-actions[bot] 7a51612fc8 chore: Update version for release (#822)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-03 13:48:31 +00:00
Abhimanyu Yadav 4d380173c8 feat:runs filtering by status and environment (#800)
* feat: view teammates' job runs on dev env

* fix typechecks

* feat: add filter functionality on task run page

* feat:adding filter functionality on run task page

* changes filter from csr to ssr

* changing filter functionality from csr to ssr

* adding url.string() for navigation purpose

* improving state management in filtering

* When setting a filter, delete the cursor and direction

* Some design improvements for the "All" options

---------

Co-authored-by: hmacr <hmac.devo@gmail.com>
Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-03 13:37:50 +00:00
Hemachandar 8880d8afe2 feat: view teammates' dev env job runs (#708)
* feat: view teammates' job runs on dev env

* fix typechecks

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-03 13:11:22 +00:00
Jan Henning ef037af457 Add a comment explaining that JSON parse middlewares need to come after the Trigger middleware (#773)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 3s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 20s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2024-01-03 11:19:34 +00:00
Dan 390ac6101e Added new http-endpoint examples, changed examples links in the docs (#775)
* updated companyicons package

* Changed custom help so it doesn’t show code examples

* Added Asana / Instagram / Salesforce / Segment / Square / Svix / Snyk / Todoist & Zapier http endpoint examples to the integration page

* Commented out some of the apis we dont have code examples for

* Uncommented raycast and reddit

* Updated the blank state copy

* Changed the copy so it works better on examples with and without code

* Added Brex / Discoed / Google Sheets, Docs, Drive / Gmail / PagerDuty / YouTube endpoint examples

* Added more examples

* Change the top tab to ‘Examples’ and updated /examples links to point to trigger.dev/apis

* Update package.json

* Updated pnpm-lock file

* Updated pnpm-lock file

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-03 11:18:44 +00:00
Dan aa97bf4a52 Changed posthog to eu (#772)
* Updated posthog url and key

* Create clean-plums-happen.md

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-03 10:43:14 +00:00
Matt Aitken 86d6e102a4 Added documentation for cancelRunsForJob 2024-01-03 10:38:23 +00:00
Matt Aitken adf497bc3e Example in the job-catalog of canceling all runs for a Job 2024-01-03 10:31:56 +00:00
Kritik Jiyaviya f7bf25f03f feat: Add ability to cancel all runs for job from SDK (#819)
* feat: Add ability to cancel all runs for job from SDK

* Create nine-trainers-vanish.md

* Cancel runs that are executing and waiting

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-03 10:30:19 +00:00
GuyBorderless f8cab96fa2 use --env cli flag for deno (#820)
* --env cli flag

* Update hono.mdx

* Update hono.mdx
2024-01-03 10:27:39 +00:00
nicktrn 225614fea3 Feature: ARM builds (#821)
* Add native ARM runner

* Switch to arch-agnostic manifest digest

* Set correct latest tag
2024-01-02 15:48:53 +00:00
Yash Khokhaneshiya 740b7b2385 feat: Add $not to eventFilters (#815)
* feat: Add  to eventFilters

* not filter test case added for false evaluation

* Added a patch changeset for @trigger.dev/core

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-02 15:43:02 +00:00
Matt Aitken 26d223ab36 Latest lockfile 2023-12-22 15:50:13 +00:00
github-actions[bot] 0c4fd9a631 chore: Update version for release (#813)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-22 15:43:15 +00:00
Matt Aitken 5060eec01b Update Octokit to account for CVE-2023-50728 (#812) 2023-12-22 15:35:47 +00:00
Matt Aitken aaea064208 Added “graphile” to the logs when they zodWorker starts, to make it easier for self hosters to debug 2023-12-22 10:46:05 +00:00
Matt Aitken 9346e4358d Latest lockfile 2023-12-22 10:43:33 +00:00
github-actions[bot] 3aafd0480b chore: Update version for release (#798)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-22 10:40:55 +00:00
Matt Aitken 771feb5395 Awaiting completion with threads/runs now works with the "requires_action" status 2023-12-22 10:13:44 +00:00
Matt Aitken 03703af682 Only append a search param if the value is defined 2023-12-20 11:06:40 +00:00
Eric Allam 5359af1242 Add logpush true to yalt wrangler 2023-12-18 10:58:30 +00:00
Eric Allam dfa47b6201 Don't proxy certain headers across the Yalt boundary as it can mess-up proxied local requests 2023-12-18 10:52:31 +00:00
Eric Allam c01138b56e Fix pnpm lock file for release 2023-12-14 17:27:45 +00:00
github-actions[bot] 70fdedcea5 chore: Update version for release (#796)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-14 17:27:08 +00:00
Matt Aitken 49ca4c4430 Fix for #731, integrations getting stuck if OAuth then moved to API key (#732)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 1s
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-12-14 15:58:50 +00:00
Eric Allam 812b5afe6f Add support for the built-in Trigger.dev tunnel for local development (#795)
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 3s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 13s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Add support for the built-in Trigger.dev tunnel for local development

* Remove the test script from yalt

* Add to the README

* Improve the outdated packages warning
2023-12-14 15:33:56 +00:00
Matt Aitken 922520cefb Fix for the overage estimation on the usage page always being zero
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 4s
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-12-13 18:57:14 +00:00
Matt Aitken 4bd1786ae5 Billing (#789)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 5s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Initial commit - started work on new billing components

* Added a slider component

* Added features to the pricing tiers

* Small pricing tier margin tweaks

* WIP on a concurrecy chart

* Reworked the pricing tiers to include a segmented controller and tooltips

* Renamed the charts storybook page

* Made the way data is added more flexible and added some definition tool tips

* Term definitions are used properly in the tiers

* Callouts can now have an optional CTA on the right hand side

* Alignment fix for the callouts

* organize imports

* Definition tooltip now its own component

* renamed the storybook story

* WIP new volume discount table and usage sliders

* Added pricing calculator sliders

* Fixed alignment of the legend

* Breadcrumb now has an upgrade prompt and button

* New Join our Slack button in the side menu

* New progress meter in the side menu

* Use the highest of 2 values to show progress

* An attempt to fix the step count in the calculator slider

* WIP usage progress bar

* Added the 4 progress bars

* More examples of the usage bar

* Better way to include the percentage in the free plan progress meter

* The usage bar now works with the extra runs over the free limit

* Pricing calculator has better slider logic

* Moved the free plan usage bar into it’s own component and added it to storybook

* Usage bar chart now supports a paying customer option and optional billing limit. Also added more usage examples to storybook

* Added more examples of usage to storybook

* tooltip takes classname

* Format numbers nicely

* Added a tooltip to show the precise numbers in the chart

* small improvements to the billing calculator

* New onboarding choose plan page

* pricing tiers better fill the size of their container

* Removed unused code

* Usage bars animate

* Wording tweak

* Callouts fit the button size better

* Added new routes for the 2 new billing pages

* import cleanup

* Added meta info in the header for bill price, plan type and billing period

* made free a noun

* Added pricing calculator to the plans page

* Fixed some illegal markup when using tooltips

* Added container query support

* Added new concurrency chart to the usage page

* billing now has a green theme

* Simplified the plan summary info int the header

* Fixed padding alignment

* Use a custom lable for the concurrent runs chart

* Removed the Job runs table

* Latest lockfile

* Show a message if you haven’t done runs yet

* Added a layoutId to the pageTabs

* Show a message callout if you’ve exceeeded 10k runs on the free plan

* Added a callout on the plans page if you’re over the runs limit

* Fixed button inside button bug

* Removed the background gradients from the app

* The billing package is importing properly

* Getting the curent plan for an org

* Reading the current plan and usage

* Hooked up the free plan bar

* Render basic billing details

* vol discount table has optional values

* Added a new page to show new subscribers

* Created a new hook for confetti on the subscribed page

* Toast styling updated

* The Invoice and Manage card details links are working

* Meta appEnv data optional

* Data for the plans page

* Format the billing period duration in days

* Switch to 20 icons

* URL for the subscribed page now includes the org path

* New pathBuilder path for the subscribed page

* Plans are upgraded/downgraded successfully

* Fixed badly named paths

* Improved some of the display

* Deal with when the user has canceled so they can re-upgrade

* Subscribing from Stripe is working, and canceling

* Tidied up some bits, latest billing package

* The tiers are now rendering using the real data

* The onboarding screen is hooked up, but not linked to yet

* Onboarding price selection working

* Pricing slider working

* Price estimation working

* Pricing calculator working on the select a plan page

* Button copy change

* Improved the layout of the run calculator marker

* Fix for the period end when you’ve canceled

* Improved the formatting in the calculator

* Pricing table tooltip uses the vol discount pricing table

* Remove the vertical lines from the calculator

* Contact us button in Enterprise tier opens the contact us form

* Added composite index to triggerdotdev_events.run_executions for event_time and organization_id

* Concurrent run chart data

* Improves styling, fix for React error with Enterprise contact button

* Show warning box when you’ve hit the concurrency in the past 30 days

* Lots of work o the usage page

* Improvements to the usage page

* Show 31 days of data, fix for not showing the current date…

* Stripe portal links are generated when the user clicks through

* Better alignment of the reference line and x-axis label

* Readme update

* Fixed pricing button loading buttons

* Show warnings about concurrency and runs on the plans page

* Removed some storybook stories

* Join Slack channel shows if you’re subscribed with instructions

* Added a gap between the runs charts

* Improved the definitions

* Added some margin to the page loading spinner

* A wider, cleaner feedback panel

* Modal backgrounds match the Sheet style

* Fixed menu item text being clipped

* Improved icons for execution time and exclusion count

* Concurrency chart now renders the dates nicely

* Fix for plans data on the plans page

* The healthcheck doesn’t need to do a HEAD request to /

* Better disabled states and fixed the disabled hover state issue

* Improved the segmented controller style

* loading spinner now centered inside the button

* Redirect to the project page when selecting the free plan

* Fix for “Runs” and added real date to upgrade warning

* DeCAPITALIZED some things

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
2023-12-13 12:48:26 +00:00
github-actions[bot] daae6df428 chore: Update version for release (#794)
* chore: Update version for release

* Update lockfile

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>
2023-12-13 10:23:36 +00:00
nicktrn fc31c6c07a Fix: Test package run isolation (#793)
* Fix link

* Move paths to compiler options

* Add failing test case

* Fix test isolation

* Add changeset
2023-12-13 09:49:52 +00:00
Eric Allam 6d4676f204 Auto update endpoint URL on redirect (#791) 2023-12-12 13:14:25 +00:00
Andreas Thomas 0a51ef3a06 fix: typo (#788) 2023-12-10 22:24:01 +00:00
Eric Allam 772f1b41a0 Fix pnpm lock file 2023-12-08 10:20:32 +00:00
github-actions[bot] d42ba80108 chore: Update version for release (#785)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-08 10:19:57 +00:00
Eric Allam 6a3c563f14 Fixed Job.attachToClient 2023-12-08 10:15:06 +00:00
Eric Allam c04cdfde8c Fix pnpm lock file 2023-12-07 13:00:32 +00:00
github-actions[bot] 750c1ff1e3 chore: Update version for release (#783)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-07 12:59:53 +00:00
Eric Allam 0f9f010206 @trigger.dev/airtable: Removed named imports (#782) 2023-12-07 12:53:58 +00:00
Eric Allam 11f8ff1bb4 Fixing endless retrying of non-successful run executions
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-12-06 21:01:41 +00:00
Eric Allam 85b3352764 Fix pnpm lock file 2023-12-06 20:05:49 +00:00
github-actions[bot] 9fb8dceef4 chore: Update version for release (#781)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-06 20:05:29 +00:00
Eric Allam 0c14e4cdfe Stop importing subpaths in @trigger.dev/airtable (#780) 2023-12-06 20:02:37 +00:00
D-K-P 2099c6308e Latest lock file 2023-12-06 15:45:43 +00:00
github-actions[bot] 08e6cad28a chore: Update version for release (#779)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-06 15:42:36 +00:00
Eric Allam f3efcc0c28 Moved Logger to core-backend, no longer importing node:buffer in core/react (#778) 2023-12-06 15:37:50 +00:00
Eric Allam 37ef335b66 Resolve pnpm lock file 2023-12-06 11:29:58 +00:00
github-actions[bot] 33d555d00e chore: Update version for release (#776)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-06 11:28:06 +00:00
Eric Allam 17f6f29d05 Feature: Support multiple runtimes other than Node.js (#774)
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 5s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-12-06 10:23:37 +00:00
Eric Allam 08f7c639ef Maximum background fetch timeout is now 5 minutes
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 1s
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-12-04 15:02:15 +00:00
github-actions[bot] 1567239718 chore: Update version for release (#771)
* chore: Update version for release

* Release lockfile

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>
2023-12-04 14:14:41 +00:00
nicktrn de652c1dfb Fix: Shopify tasks and KV get() return types (#770)
* Improve KV get types

* Fix shopify find and all task return types

* Add changeset
2023-12-04 12:37:55 +00:00
Eric Allam 1f3733b70f Fix resuming timed out or auto-yielded executions
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / units (push) Failing after 21s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 21s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-12-04 09:20:40 +00:00
Dan b5aea6c534 Replaced showcase links -> api (#764)
* Updated the examples section with new links / changed showcase link to project showcase

* Added links to the api pages for all of our integrations

* Deleted card from the airtable tasks page
2023-12-01 17:35:54 +00:00
Eric Allam 0769dc4315 Fixed the event names for stripe docs 2023-12-01 08:42:05 +00:00
Eric Allam 5d00fc7cdb Update pnpm lock file for release 2023-11-30 21:54:43 +00:00
github-actions[bot] 00b0c3e02e chore: Update version for release (#765)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-30 21:54:13 +00:00
Eric Allam 7e3a82ef47 Issue #747: Add Stripe invoice triggers 2023-11-30 21:48:45 +00:00
James Ritchie 5dda6cd16c Added the border to the page header on the Runs page
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 3s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 21s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-11-30 10:32:38 +00:00
Matt Aitken 76b7fb2337 The status API endpoints return only the original set of statuses 2023-11-30 10:31:27 +00:00
Matt Aitken 68cbfd8d23 Log out the run status 2023-11-30 10:29:48 +00:00
Eric Allam 41a49f6bb2 Make the run list query more efficient
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-11-29 19:28:15 +00:00
Eric Allam 2f755158b4 Updated pnpm lock file 2023-11-29 11:25:27 +00:00
github-actions[bot] 419b93809d chore: Update version for release (#757)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-29 11:24:58 +00:00
Eric Allam bd4bc51daa Update plain (#762)
* updated the plain SDK

* Updated the action to support the new Threads SDK

* latest lock file

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
2023-11-29 10:58:06 +00:00
Eric Allam ff540c9e4a Revert "Update plain (#761)"
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 3s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 5s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
This reverts commit 3f217ff3e0.
2023-11-29 10:51:13 +00:00
Eric Allam 3f217ff3e0 Update plain (#761)
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* updated the plain SDK

* Updated the action to support the new Threads SDK

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
2023-11-29 10:49:37 +00:00
Eric Allam 9cb39bf7d7 Added Redis example env vars 2023-11-29 10:34:54 +00:00
Eric Allam ca05d5f603 @trigger.dev/openai: Adding additional assistant tasks 2023-11-28 22:48:31 +00:00
Hemachandar 4dc46cbbe4 fix: transform Headers object to Record type (#760) 2023-11-28 18:42:50 +00:00
nicktrn 1dcd87a2aa URI encode keys (#758) 2023-11-28 18:05:15 +00:00
Eric Allam c4cb98af5c Clarified the run execution limits 2023-11-28 16:23:35 +00:00
Eric Allam 6ebd435e81 Feature: Run execution concurrency limits (#750)
* WIP execution concurrency controls implemented via Redis

- Split up resuming a run and executing a run
- Added some new statuses to better show what is going on in a run
- Removed preprocessing runs

* WIP

* Convert to using ZSETs and adding env vars

* Removed unused import

* Improve run number generation using advistory locks, and only on start

* More execution concurrency stuff

* Add support for job concurrency limits and concurrency limit groups

* Create wild-swans-battle.md

* Increase slots refresh timeout to 10s

* Try to fix Redis connection issues

* Don’t be so strict about the APP_ENV

* Add the blank tls option to the normal redis client as well

* Add docs
2023-11-28 16:21:06 +00:00
Eric Allam caf203c084 Made webhook index stats optional
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 4s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 19s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-11-28 15:04:24 +00:00
Eric Allam dbc2e3f713 Refreshed pnpm lock 2023-11-28 14:53:37 +00:00
github-actions[bot] a5b49cb61f chore: Update version for release (#753)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-28 14:53:06 +00:00
nicktrn 096151c014 Fix: Shopify subpath imports, enhance docs (#755)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Fix invalid subpath imports

* Remove @trigger.dev/tsup dep

* Update lockfile

* Small github docs fix

* Pull runtime adaptor import out of integration

* Fix io.store docs examples

* Add sendEvents to task library

* Add KV to task library and small fixes

* Suppress duplicate http endpoint warnings

* Changeset

* Add task returns
2023-11-27 16:03:03 +00:00
Dan 5d28f1a3d6 Update github-triggers.mdx 2023-11-27 10:32:21 +00:00
Eric Allam 56ae0ed0d3 Only tag v.docker tags with the latest tag 2023-11-24 16:46:06 +00:00
Eric Allam a2f5dc8bc6 Only attempt to login to Docker if the workflow event is a push 2023-11-24 14:16:41 +00:00
Eric Allam d56b2eded5 Features: new login page (#754)
* Initial commit and WIP new login page

* added wrapper to fix layout

* Improved the layout and style of the page

* Added a new extra-large button style (and added it to storybook)

* Moved the cusom onboarding style tooltip to the Tooltip component

* Populated the bento grid with items

* Imrpoved the quote styling

* Tooltip doesn’t stay if you mouse over it

* Added more content including a list of quote that cycle on page load

* New quote mark positioning

* Added the rest of the content to the tooltips

* Made the bento grid responsive

* Moved the login page layout to a seaparte component

* Login pages now use the new layout component

* Extra large button style tweak

* Match the large input style with the large button style

* Cleaned up imports and made the Ts & Cs text the same for magic links

* Layout fix

* Quotes don’t push content off the screen as much

* Added openai integration to the grid

* Make the quote fit if the screen height is narrower

* Style update to the magic link sent state

* Icon colour updates

* fixed text centering on mobile

* Icons are more responsive

* removed unnecessary w-fulls

* Added 2 onboarding questions

* Revalidate form on submit, not input

* Typo fixes

* Name field focuses by default

* Added conform to the employees question

* Update pnpm lock file

* Implement referral source and company size on managed cloud

* Fixed some type errors

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
2023-11-24 14:08:50 +00:00
nicktrn 0ae9adafbf Fix: Shopify build and webhook indexing (#752)
* Revert to old tsup config

* Make webhooks index optional
2023-11-24 11:45:33 +00:00
Eric Allam 03403ad9cb Fix for pull request workflow (#751)
* Allow PRs that have /publish-docker in the body to cause docker images to be published

* Also ignore mdx file changes

* pr_checks now uses pull_request instead of pull_request_target
2023-11-24 11:19:06 +00:00
nicktrn 067e19fec9 Feature: New Webhook Triggers, KV Store, and Shopify integration (#745)
* Attach webhook to http endpoint

* Create internal webhook handler job

* Fix delivery

* Add webhook trigger

* Index webhooks

* Fix webhook connect

* Webhook activation

* Rename to TriggerWebhook

* Save webhooks to index

* Extend register payload

* Revert attachSource

* Add update webhook helper

* Use crud interface for registration

* Remove filter from params

* Destructure options

* Missing ohash dep

* Chainable trigger filter

* Optional request verification

* Handler call with context

* Update config on register success

* Rename to webhookData

* Add basic key-value store

* Improve kv store

* Webhook trigger UI

* Webhook delivery UI

* Some fixes

* Airtable experiments

* Fix tabs transitions

* Only run register if config differs

* Use subtasks for delivery

* Missing dep

* Error handing and fixes

* Namespace cursor

* Fix hmac verification

* Gut Airtable

* Lockfile

* Template optional api key

* Template event sources and icons

* Template remove filter from params

* Fix models template

* Template fixme

* Fix webhook trigger header

* Actually send params for registration..

* Add back oauthed client

* Verify signature header encoding param

* Fix delivery context

* Webhook create retry with prior delete

* Webhook source type fixes

* Webhook config merge

* Update webhook icon

* Verify webhook task options

* Rename handler to generateEvents

* Send event icons

* Shopify with webhooks

* Shopify job-catalog entry

* Lockfile

* Add webhook migration

* Better icons

* Type fixes

* Make param type optional

* Scope type

* More examples

* More schemas

* Trigger catalog

* Bump versions

* Just a few more events they said

* Simplify session and config

* Typed serializer

* Fix payload type

* Remove unused getters

* Reduce logging output

* Rest resource tasks

* Lockfile

* Bump version

* Remaining triggers

* Fix event types

* Fix import

* Link from webhook trigger to http endpoint

* Use rest resource tasks for crud

* Fix rest save type

* Improve KV types

* Improve attach webhook logging

* Make header schema more lenient

* Fix save type again

* Final error callback

* Shorten keys

* Remove ohash diff

* Disable Airtable webhooks

* Webhook environments

* Fix shopify error import

* Link to integration and http endpoint

* Integration catalog entry

* Disable oauth

* Require api key, simplify client secret

* Move trigger types

* Update catalog example

* Small KV endpoint refactor

* Fix custom migration

* Webhook environment migration

* Improve crud types

* Remove unused schema

* Fix crud context type

* KV limits and HTTP verbs

* KV improvements

* Jobless webhook delivery

* Airtable delivery fixes

* Make deliveries sexy again

* Some docs

* Fix payload types.. again

* Final payload pass

* Schema cleanup

* Refactor handler service

* Remove more stale schemas

* registerJobNamespace import

* Expose KV on TriggerClient

* Remove dummy click handler

* Remove unused components

* Fix delivery pagination

* Enable registration rerun button

* Comment out registration route action handler

* Rename KV as not tied to IO anymore

* Swap api with trigger client

* Disabled fields param

* KV docs

* Changeset

* Shopify docs fixes
2023-11-24 10:22:12 +00:00
nicktrn 2cce68b5f7 Revert "Remove the pg listen code to see if it’s causing DB issues" (#749)
This reverts commit e8e7c116d1.
2023-11-24 09:30:48 +00:00
Dan e3c3aa91e1 Added Clerk / Cal.com / HubSpot / Hugging Face / Mailgun / Novu / WhatsApp HTTP endpoint examples (#748)
Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-11-23 16:11:34 +00:00
Marius Vilholm 5c0ca83852 Fix wrong import in example for useRunDetails (#744)
Thanks @mariusvilholm
2023-11-23 15:35:33 +00:00
Marius Vilholm 2b24104c97 Fix wrong import in example of useEventRunDetails (#743) 2023-11-23 15:35:02 +00:00
Marius Vilholm 5977a5aa51 Fix spelling in OpenAI Assistants (#742)
Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-11-23 15:34:30 +00:00
Eric Allam 131d0dbea4 Adding an example of using OpenAI GPT 4 Vision 2023-11-21 10:23:11 +00:00
Eric Allam 59277731c4 Fix pnpm lock file 2023-11-16 16:32:14 +00:00
github-actions[bot] 742d16087b chore: Update version for release (#739)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-16 16:31:41 +00:00
Eric Allam 0ab51d62bc Don’t send notifications for internal runs and add isTest to the notification
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 19s
🚀 Publish Trigger.dev Docker / units (push) Failing after 3s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 6s
2023-11-16 14:45:39 +00:00
Eric Allam 756024da78 Add support for Run Notifications #401 (#738)
* Add support for Run Notifications #401

* Fixed typo and added changeset
2023-11-16 14:19:42 +00:00
Dan c47ad5e038 Docs improvements and added API catalog links (#737)
* integration docs various improvements

* Added optional comments to step by step guide

* Added API catalog card to the integrations intro

* Added Api catalog button to the examples job tab

* Tweaked copy of api catalog card

* Update introduction.mdx

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-11-16 11:50:26 +00:00
Dan 888344797e Added code examples and modified blank state on the integrations & APIs page (#736)
* Added more API icons

* Updated the title

* Added resources.codeexample.ts to pull in example code from github

* Added regex to remove redundant express code from the examples

* Added cal examples

* Code changes onSubmit

* Improved the code loading state

* Removed request integration button

* Improved the Customhelp copy

* Fixed styling issues and removed imports

* Added all the code examples

* Don’t show title if there’s 1 or less examples

* Updated copy for the non example version

* Added example code to the apis without examples, added a focus state

* Fixed titles

* Got rid of the phantom gap

* Made the copy more generic so it works on the integration pages as well

* Removed import

* Added view examples button to the integration pages

* Removed fetch/sdk option from integration sheet

* Apply code example regex on the server

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-11-15 17:38:24 +00:00
Eric Allam 4a7caa68b6 Record when run executions start and finish
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-11-15 15:18:32 +00:00
Matt Aitken 3bc54d36f7 SQS logging: fixed error and message, plus using tracing 2023-11-15 13:32:40 +00:00
Matt Aitken 5295a3f798 Changed SQS error callbacks to log to error 2023-11-15 13:26:57 +00:00
Eric Allam 14429b8b66 Fix “transaction already closed” error when running tasks (#735) 2023-11-14 23:22:34 +00:00
Matt Aitken 5dd1bcc589 sendEvents proxy uses batches of 10 (max for SQS) 2023-11-14 21:34:08 +00:00
Matt Aitken ed5ee16de5 Better errors now get to users of sendEvent 2023-11-14 21:33:47 +00:00
Matt Aitken 076185d19f Added a perf test for sendEvents 2023-11-14 21:32:46 +00:00
Matt Aitken 1e07964d81 The parallel perf test is now driven by numbers 2023-11-14 15:46:34 +00:00
Matt Aitken f406e59c45 Configuration and docs for deploying the proxy to Cloudflare 2023-11-14 14:04:42 +00:00
Eric Allam 75550f535c Fix undefined task outputs
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 19s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
And also fix the SSE connection getting reset on a infinite loop when runs are complete
2023-11-13 16:18:41 +00:00
Matt Aitken 2b48e6d04b Feature: sendEvent can use an AWS SQS queue to increase reliability and throughput (#729)
* Initial commit (by create-cloudflare CLI)

* Changed the prettier rules

* Started writing Readme and got dev working

* Validate the request, parse the event and respond with the correct format

* Use ulidx instead of ulid in core

* Removed some boilerplate and use new function for sendEvent

* Removed old ulid package

* When handling a webhook, it’s not an error if the HTTP endpoint environment isn’t found

* If the env vars aren’t set, log the request and pass it through

* Pass requests through. Setup the env vars

* Flipped the API key detection because we can enforce that it’s the shape of a private API key

* Progress with sendEvent proxy

* Events are being put on the SQS queue

* The SQS event queue is working

* Make sure there’s a timestamp before enqueuing the evnet

* Log the sqs_event, not API key

* Added a bit more detail to the readme

* Improved the Cloudflare logs

* We don’t need the global.window hack for AWS, just globalThis

* Removed commented out wrangler.toml values

* Reworked the proxy to make it easier to add more endpoints

* Use json utility to send Responses

* Start work on proxying bulk events
2023-11-13 15:08:01 +00:00
Matt Aitken fe14947bb0 Removed waitForEvent beta warning. Made a snippet so we can use this in future easily. 2023-11-10 18:24:48 +00:00
Matt Aitken 0afa119721 Use node-fetch for invokeEphemeralEvents instead of @whatwg-node/fetch (#734)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-11-10 17:36:21 +00:00
Eric Allam af57bc208a Update pnpm lock file 2023-11-10 16:54:06 +00:00
Eric Allam 7cbbb26038 Merge pull request #730 from triggerdotdev/changeset-release/main
chore: Update version for release
2023-11-10 16:49:47 +00:00
github-actions[bot] 2e5f8d8de3 chore: Update version for release 2023-11-10 16:05:39 +00:00
Eric Allam 9a7c08c26a Improvements: Fix dangling SSE issue and compression memory leak (#733)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 1s
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Downgrade to remix-auth-email-link to remove yarn dependency

* Turn off the pg listen service for now

* Add snapshot admin route

* A couple logger fixes

* Add ability to disable compression

* Add ability to disable SSE

* Fix SSE memory leak + DB load issue
2023-11-10 16:02:53 +00:00
Eric Allam e8e7c116d1 Remove the pg listen code to see if it’s causing DB issues 2023-11-09 21:52:48 +00:00
Matt Aitken 99dd6673f9 Test page display a message if there are no environments that the logged in user can run tests with 2023-11-09 20:12:20 +00:00
Matt Aitken a41d9b3e67 Fix for first endpoint sheet React error 2023-11-09 20:11:36 +00:00
Eric Allam cb1825bfaf Add OpenAI support for 4.16.0 (#726)
* Add OpenAI support for 4.16.0

* Add support for background polling and use that in OpenAI integration to power assistants

* Much improved OpenAI docs

* Added backgroundPoll docs

* Implements waitForEvent and added docs for more built in tasks

* Add sendEvent API referenc

* Write the task libray

* Add changeset and warning for waitForEvent
2023-11-09 16:59:58 +00:00
nicktrn d02173442c Feature: io.sendEvents() (#728)
* Add io.sendEvents

* Add examples to built-ins catalog entry

* Add docs

* Add changeset

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-11-09 16:42:23 +00:00
Matt Aitken 9f1f59cc81 Added the redirect to the invites page back in… 2023-11-09 16:30:21 +00:00
Matt Aitken e48c9b5e69 Made it clearer in the HTTP endpoints docs that we’re using Cal.com as an example 2023-11-08 10:15:42 +00:00
Eric Allam 55a9b96c88 Remove the coming soon warning 2023-11-07 16:31:44 +00:00
Matt Aitken dc8c8edf04 Latest lockfile 2023-11-07 16:27:31 +00:00
github-actions[bot] 41927edf12 chore: Update version for release (#718)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-07 16:26:41 +00:00
James Ritchie 1afba46cf0 Made the no-runs message consistent with the others
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-11-07 15:06:42 +00:00
James Ritchie 32e4fc6310 Updated our registered address on the magic link email 2023-11-07 14:57:04 +00:00
Matt Aitken 0add95e224 The auth method is now displayed correctly 2023-11-07 14:51:04 +00:00
Matt Aitken de7f133ef9 The Job List can shows jobs across projects now 2023-11-07 14:50:52 +00:00
Matt Aitken 8b13681afc Removed the project + from the sidemenu 2023-11-07 14:30:04 +00:00
Matt Aitken 88baac2144 Improved the side menu project styling 2023-11-07 13:42:56 +00:00
Matt Aitken df664ad472 Removed “New project” from the project selector. Added a + button to the Proejcts side menu 2023-11-07 12:46:41 +00:00
James Ritchie d8c53784f7 Triple dot menus now dismiss when you click an option 2023-11-07 11:45:53 +00:00
James Ritchie 3c7b2de095 Clearer state for unsupported frameworks 2023-11-07 11:45:53 +00:00
James Ritchie ae9249405c Autofocus input fields 2023-11-07 11:45:53 +00:00
James Ritchie d63f4e2451 User avatar now displays if one is set 2023-11-07 11:45:53 +00:00
Matt Aitken f4275e5054 Added a changeset for verifyRequestSignature – added an error if the passed in secret is undefined or empty 2023-11-07 10:54:08 +00:00
Matt Aitken 690b308fea verifyRequestSignature – added an error if the passed in secret is undefined or empty 2023-11-07 10:52:55 +00:00
Eric Allam a74716a1b9 Added waitForRequest built-in tasks (#725)
* Added waitForRequest built-in tasks

* Create grumpy-buttons-thank.md
2023-11-06 18:30:49 +00:00
Eric Allam 42185bc36b Upgrade resend integration to use resend-node 2.0.0 (#724)
* Upgrade resend integration to use resend-node 2.0.0, fixes issue with Next.js 14

* Create mighty-dodos-study.md
2023-11-06 18:30:37 +00:00
Eric Allam 276181b91c Fixed HttpSourceRequest import 2023-11-06 17:55:34 +00:00
Eric Allam 578d2e5410 Fixed Buffer reference error in the browser 2023-11-06 17:51:47 +00:00
Eric Allam 329944841f Fix the cancel event example in job ref 2023-11-06 17:38:18 +00:00
Eric Allam 4a0f030ebf Adding no-cache to our client fetch to fix Next.js POST caching 2023-11-06 17:38:18 +00:00
Matt Aitken 13345d0025 e2e failure was caused by… a space 2023-11-06 17:02:27 +00:00
Matt Aitken d905059915 e2e moving to project correctly 2023-11-06 16:36:05 +00:00
Matt Aitken 0d8530028f Added “test:e2e:ui” script so you can see Playwright running 2023-11-06 16:35:11 +00:00
Matt Aitken c37e7f3030 Fixed docs link 2023-11-06 16:34:33 +00:00
Matt Aitken 6d400c3b57 Fix for trigger link showing on non-http endpoint jobs 2023-11-06 16:34:12 +00:00
Matt Aitken 2b8a44aed1 Fix docs link to HTTP endpoints 2023-11-06 16:11:23 +00:00
Matt Aitken 6d842b3abb Added shortcodes to the e2e test suite 2023-11-06 15:54:55 +00:00
Matt Aitken 9c6838e5c8 HTTP endpoints, HTTP triggers and new sidebar (#720)
* Setup basic storybook page

* storybook preview pages don’t have padding

* Added a storybook story for the side menu

* WIP on a new side menu component

* New variant for the side menu button style

* Side menu items can now recieve a badge ‘count’

* Storybook side menu update

* Added a new font size

* you can now set the spacing between an icon and the text

* Moving the error and count badge to the right side of the button

* Added a menu sub item button style

* added sub items to the menu and all the rest of the items

* Proper background class used

* Added a side menu header and main org header

* Removed the no-mobile blocker overlay so you can use the site on a phone

* Better section name

* Created a cusom popover trigger that can take anything as children. Also the popover titles can now take a variant

* Added a popover for the user avatar menu item

* Removed the tool tip

* Arrow Popover can no also go full width

* neater conditiona;

* Removed unnessary div. And error icon can display an error message

* menu item buttons can take a variant

* Added placeholder items for the org dropdown

* add a max height to the org menu popover and handle scrollbars

* Added a border if the menu scrolls when you have lots of project items

* warning badges display tooltips if you give them some error text

* Removed the sticky header so the scrollbar looks better

* Fixed a layout issue from removing the sticky header

* Better spacing between lists

* Popover can take any react component icon and an icon classname

* Side menu headers now have a dropdown by clicking the ellipsis icon

* Side menu items can take an icon colour

* Updated styling for the dropdown Popover menus

* Installed Tabler icons

* Updated some icons to use Tabler

* Started defining the HttpTrigger class

* RequestFilterSchema is part of core

* Use the RequestFilterSchema from core

* EventSpecificationExample now derived from schema

* Need to define the class like EventTrigger

* Catalog reference that uses the httpTrigger

* The logic for the httpTrigger is in the separate file, just call it from the client using defineHttpTrigger

* Basic HttpTrigger

* Import fixes

* Transforming httpTrigger to the format we want

* Initial httpTrigger types working

* Added HTTP generic type

* Added some notes

* Rejigged some things to support verifying payloads

* Use new security function for verifying

* Added truncating text support if side menu names get long

* Renamed some stuff

* Removed test copy

* HttpEndpoin that isn’t a trigger

* Renamed hostname to source

* Created HttpEndpoint as a top-level concept, it produces triggers using onRequest

* Started working on registration of the httpEndpoints

* Removed the new TriggerMetadata for now, http will use static

* Added PayloadType to EventRecord. Default is JSON.

* The payload from an HTTPEndpoint is now a Request

* Initial TriggerHttpEndpoint migrations

* Initial server side work

* Migration to add shortcode to RuntimeEnvironment

* Added TriggerHttpEndpointEnvironment table

* Made the httptrigger catalog example runnable

* Progress creating/updating httpEndpoints

* HTTPEndpointEnvironment updating now works

* Added a note about EventRecord HttpEndpoint relationship

* When creating environments, create a shortcode

* Fix for secret not being retrieved correctly

* Request filtering

* Add DOM types to Core

* Early work dealing with a webhook arriving

* Added some todo notes to discuss tomorrow

* Added relations to the endpoint so we can call the user’s server

* Basic handling of immediate responses

* The immediate responses are now going back to the webhook provider

* Handling is now generating events and responding where relevant. Not yet matching filters and doing verification

* Added source to TriggerHttpEndpointEnvironment

* The event filter is now optional

* The source is passed through from the httpEndpointEnv

* Added optional payloadType when ingesting an event

* Added tabler

* Updated @remix-run/testing usage for remix 2

* Fixed org menu header width and added org and project types

* Added custom icons for Runs and Endpoints

* Updated the menu icons

* storybook side menu shows static project and org data

* Updated side menu

* Plumbed in paths

* Updated eventFilter to deal with undefined/null payloads

* Started work on filtering, but it’s not working

* Strict null

* async filtering it working

* Added environment shortcodes to the seedCloud script

* Don’t pass the secret back, added a verifyPayload function that gets called before runs start

* Fix for skipping triggering runs

* The verify callback is now passed through to the trigger so it can be called

* If verifying fails, have a reason which we can show to the user

* Don’t verify if it’s a test run

* Fixed the log in the example code

* Added loader and action to storybook preview

* Fix for svg attribute name issues in EndpointIcon

* Started work on the side menu

* This logic has moved to a separate file, in a different branch

* Don’t get the environments when getting orgs

* Lots of fixes for the new SideMenu

* Refactored some org/project things to fit the new structure better

* Some progress restructuring the app for the new sidebar

* More changes to data loading

* Deleted some old pages. The redirecting is working if you’re on the root but logged in

* Basic styling for the account page. We need a back button

* Fixes for the integrations pages

* Breadcrumb implemented

* Add a border to the bottom of the breadcrumb

* Feedback is working, not in Storybook

* Removed expandSidebar from the Handle

* Org level breadcrumbs

* Getting the project in the org route now works properly

* orgslug route before using the presenter

* More UI improvements

* Removed commented out line

* Use presenters for org and root

* Removed forceActive

* Split the project selector and user menu out

* The side menu items have correct active states

* Fixed the scrolling

* Put the org name in

* Improved the admin features

* Created the HTTP Endpoints list page

* Work on the HTTP endpoint page

* WIP on the HTTP Endpoint page

* Fix for response filter not showing

* Change page URLs to “http-endpoints” (from httpendpoints)

* Slugify the HTTP endpoint id

* Added todos for EventRecord associations

* Removed the Job/Trigger tab for now

* First draft of the help panels

* Rejigged the HTTP endpoint page so it splits out the deployed and not deployed environments

* Removed irrelevant columns

* Added a link to the deployment guide

* Removed the background image from the frameworks pages

Also…
- reordered the frameworks so supported ones come first in the list
- added logos to 3 framework pages that were missing them
- removed lots of un-used imports

* Fixed an issue where the breadcrumb could be hidden on small screens so broken the pages

The breadcrumb is always visible now

* Renamed ‘Onboarding’ to ‘Framework setup’

* Added a new http-endpoint icon to the side menu

* Side menu now has a nice looking scrollbar

* Scrollbar on the usage and billing page updated to the nice style

* Icon and colour updates to the side bar menu items

* Small copy improvement

* Fixed bug with the height of the org menu dropdown

* Page breadcrumbs now don’t include duplicate path links

* renamed uiBorder to ui-border

* Remove the padding from the small menu item if it’s used as a button

* Made the paragraph text a bit smaller

* EventRecord has relationships with TriggerHttpEndpoint/TriggerHttpEndpointEnvironment

* Improved the presenter used by the side menu. Also added the HTTP Endpoint badge count to the sidebar

* The dropdown org menu has the same badge as the side menu

* Improved the Projects page

* Fixed button style miss-match in the jobs table dropdown

* Made the popover dialogs support Headers and improved the regenerate API key popover

* Made the active status of a job more subtle

* Allow the Job to have a link on its Trigger

* Simplified loader because we ditched the Jobs menu. Also showing no runs help panel now

* Fixed type errors

* Pages that are org level can scroll if the content gets too long

* Fixed a redirect bug so you now redirect to the org page

* Updated the shortcode migration, to add additional letters to the end

* Removed the nav bar from the welcome onboarding page

* Only show the countBadge if the number is > 0

* Jobs icon now has a default colour the same as the nav menu

* Capital I for integration

* Clone the request before calling verify

* Separate the checks out so they can be easily logged

* Make the failure reason optional

* Made the verification error look better, if it’s provided

* Working WhatsApp example

* Can set the immediateResponseFilter to null in an update

* Deal with a null immediateResponseFilter

* Cal.com webhook working

* Header height reduced slightly

* Fixed button padding

* Removed un-used imports

* http endpoint table displays a message if you have no entries in the table

* Removed some duplicate text and swapped primary buttons for secondary style

* All ‘HTTP Endpoints’ now ‘HTTP endpoints’

* You have to use a RequestFilter when using HTTP Trigger

* Synchronous eventDispatcher filtering again. Better content-type check

* Stripe example

* Side menu “Usage & Billing” is just “Usage” if self-hosting

* Fix for filtering not working

* Removed filter log

* Fix for jobs being optional and null

* Removed old nav bar from the invite page

* Deleted old nav bar component

* import cleanup

* NoTask message only displays if the run has status “SUCCESS”

* Added a global page loading indicator

* Added documentation buttons to the most important pages

* Added GitHub

* Use “verifyRequestSignature” helpr

* Removed todo

* Fixed the layout of the Rerun Job popover

* Jobs table has margin bottom so it sits off the bottom of the page

* Small improvement to the search bar layout on the integration page

* HTTP endpoint and Trigger concept docs

* Reference docs and JSDocs for HTTP endpoint

* SDK reference docs for HttpEndpoint

* Added an HttpTrigger SDK reference, which mainly just point you elsewhere

* Improved the copy in the help panels

* Removed unused code

* Improved HTTP endpoint comment about setting the secret

* Delete unused asyncFilter

* Fixed the delete modal not having a title

* Always try get the arrayBuffer for an HTTP request, catch and use undefined as the default

* Add extra method to invokeTrigger

* Use a transaction for the secret store

* verifyRequestSignature docs page and JSDocs

* Added verifyRequestSignature docs page to nav

* Warn if they use the same HttpEndpoint id twice

* Added another job using the same HttpEndpoint

* Renamed the api route to http-endpoints from httpendpoints

* Debug bar for VSCode is now in the commandCenter

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
2023-11-06 15:32:40 +00:00
Abdou Belghalem 10e935b864 fix(TRI-1444): Allow only logins from WHITELISTED_EMAILS regex (fixes #685) (#721) 2023-11-06 09:06:54 +00:00
Eric Allam 02e453c3b5 Fix a ReferenceError when using OpenAI.backgroundCreateChatCompletion 2023-11-03 22:41:23 +00:00
James Ritchie 330ddb3311 NoTask message only displays if the run has status “SUCCESS” 2023-11-03 14:53:43 +00:00
Eric Allam 14a2f4cc94 Fix lock file 2023-11-03 11:26:16 +00:00
Alexandre Costa 7e57f1f3dd [TRI-1449] Display warning message when duplicate job IDs are detected (#699)
* add warning message when duplicate job IDs are detected

* fix warning message for duplicated job IDs in defineJob

* Create bright-buckets-bow.md

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2023-11-03 11:10:26 +00:00
nicktrn cf8f994604 Feature: io.random() (#716)
* Add io.random

* Add changeset

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2023-11-03 11:07:12 +00:00
Hemachandar 2ae5178479 fix: show only the current user's dev env in run-test page (#711) 2023-11-03 11:06:36 +00:00
Eric Allam 620b83832b Implement manually invokable jobs through the invokeTrigger (#700)
* Implement manually invokable jobs through the invokeTrigger

Also implemented a job run notification system, that will POST details of a run on completion. This combines with the task callbackUrl system to implement the invokeAndWait

* Document the invoke trigger

* batch invoke and wait

* background fetch timeouts

* Use @whatwg-node/fetch instead of the polyfilled fetch

* Fix some outdated dependencies in webapp

* Improved subtask error propogation messages

* Document the OpenAI changes and the batch invoke stuff

* Fix dequeuing jobs

* Don’t retry the OpenAI completion background task

* Added OpenAI changesets

* Use the new ResumeTaskService in ProcessCallbackTimeout as well
2023-11-03 11:05:00 +00:00
D-K-P c7434125e4 Removed Hacktoberfest from the readme 2023-11-01 15:12:01 +00:00
Eric Allam 67b5365d50 Fix pnpm lock 2023-11-01 10:16:52 +00:00
github-actions[bot] ea25c37a10 chore: Update version for release (#709)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-01 09:19:10 +00:00
Eric Allam c1710ae72d fix: Buffer import breaks @trigger.dev/react (#714) 2023-10-31 15:28:55 +00:00
nicktrn 9c5a7cf073 Fix: Allow errors and special values on Airtable field set (#697)
* Allow errors and special values on field set

* Add changeset
2023-10-31 10:17:05 +00:00
Eric Allam 8eedf994af Fixed call -> on 2023-10-30 21:58:04 +00:00
nicktrn 2c91c492df Feature: Cross-instance notification system (#689)
* Add notification system

* Graceful worker shutdown on migration notification

* Add notification catalog

* Rename pgListen call to on
2023-10-30 17:08:16 +00:00
Hemachandar b859abdb66 fix: remove unstable createRemixStub in storybook (#707) 2023-10-30 17:04:29 +00:00
James Ritchie 0876b87526 No Tasks in a Run warning message (#688)
* Card hover state is now grey

* Added a callout warning if you don’t have any tasks

* Conditionally show the no-task warning at the top of the run

* New job to test the no-task warning message

* Created a new example Job for the CLI that uses Tasks

* Updated the Next.js cli joke job

* Updated the Remix app cli job example

* Updated the Astro app cli job example

* Made sure the example job works in remix

* Added changeset

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2023-10-30 16:24:46 +00:00
Hemachandar 9c4be40adc fix: append nanoid for dynamic trigger reg event (#628)
* fix: append nanoid for dynamic trigger reg event

* use idempotency-key as event-id

* add changeset
2023-10-30 16:24:03 +00:00
D-K-P 2635f4bd10 typo fix 2023-10-30 14:36:17 +00:00
nicktrn 401b7ee03d Set NODE_ENV to production in supabase docs 2023-10-28 13:09:01 +00:00
Eric Allam 6881de84ab Fix pnpm lock file 2023-10-26 20:04:03 +01:00
github-actions[bot] 0ca8296b9a chore: Update version for release (#686)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-26 20:03:37 +01:00
Eric Allam 55946fcdb7 Update @trigger.dev/nextjs to support Next.js 14 (#690) 2023-10-26 19:45:19 +01:00
Eric Allam c0f9f10b07 Upgrade to Remix v2.1.0 2023-10-26 15:54:21 +01:00
Eric Allam e80aa2826d @trigger.dev/express: Remove web-fetch dependency and use native node Request/Response 2023-10-26 13:42:20 +01:00
NIXEY 1be25d7639 BlankRow centered (#678) 2023-10-26 13:35:15 +01:00
ROMIT PAL 3c3a5e1f28 added a missing CODE OF CONDUCT file (#677)
Incorporating a Code of Conduct in your GitHub repository is crucial for promoting an inclusive, respectful community. It establishes guidelines, minimizes conflicts, safeguards participants, and adheres to legal standards. Additionally, it demonstrates professionalism and aligns with GitHub's best practices, contributing to a welcoming and harmonious environment, which, in turn, enhances collaboration and the project's overall success.
2023-10-26 13:30:14 +01:00
Vineet J Karni 8e741c7218 Added warning ⚠️ - No support for long-running servers (#669) 2023-10-26 13:18:28 +01:00
Hemachandar 83455e3ad4 feat: implement API key regeneration (#649) 2023-10-26 13:15:50 +01:00
Ronit Panda f0f0420280 feat: adds helm charts (#636)
* feat: adds helm charts template and adds postgres deps

* feat: adds all depl (barebones)

* feat: adds all depl (barebones)

* fix: removes print

* fix: image pulling issue

* fix: templatisation complete

* style: cleanup

* feat: works

* feat: adds ingress and some docs

* fix: ingress bug --> routing to cluster works

* feat: completes docs v1 todo --> needs hosting of the helm chart on chosen platform
2023-10-26 11:50:59 +01:00
Hemachandar c4533c36cb fix: set error message in runTask & executeJob (#634)
* fix: set error message in runTask & executeJob

* add changeset
2023-10-26 11:46:09 +01:00
Eric Allam f8e034c190 Fixed import that was causing typecheck to fail 2023-10-26 11:43:23 +01:00
Eric Allam 21f62e780c Added tests and refactored response to use camelCase 2023-10-26 11:30:49 +01:00
hmacr c3564ca0d4 fix doc 2023-10-26 11:18:11 +01:00
hmacr 6e1b8a11d4 feat: allow cancelling job runs for an event-id 2023-10-26 11:18:11 +01:00
Matt Aitken 9900f19b70 Migration: Updates any Endpoint runChunkExecutionLimits that were 60ms to be 60000ms 2023-10-25 15:50:11 +01:00
Matt Aitken 237545754f Indexing errors weren’t being serialized to JSON properly in some cases, so the errors weren’t getting inserted
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 1s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 21s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-10-24 18:08:46 +01:00
Eric Allam d7c1e98e5e Update pnpm lock 2023-10-24 17:49:39 +01:00
github-actions[bot] 71a0afeb8d chore: Update version for release (#684)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-24 17:49:06 +01:00
Eric Allam 36a390449a @trigger.dev/openai: Upgrade to openai-node SDK 4.13.0, add support for request options and defaultQuery/defaultHeaders 2023-10-24 17:45:43 +01:00
James Ritchie 375e495423 Fixed accounts table not scrolling in the admin area 2023-10-24 17:34:33 +01:00
D-K-P 866c20cd39 Updated the Slack underlying client example 2023-10-24 16:26:14 +01:00
Eric Allam 408785b8ef Update pnpm lock file 2023-10-24 13:41:35 +01:00
github-actions[bot] f982e00997 chore: Update version for release (#618)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-24 13:40:57 +01:00
Eric Allam 7e100b8362 ignore: adding more logs to perform task operation
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 6s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-10-24 12:14:52 +01:00
Eric Allam ea052c44c7 ignore: Add durationinMs to log 2023-10-24 11:38:35 +01:00
D-K-P 76224568f4 Airtable copy updates 2023-10-24 11:31:01 +01:00
Dan 72e67981b0 Merge pull request #666 from shelar1423/patch-3
Improved the Airtable integration documentation
2023-10-24 11:08:03 +01:00
Eric Allam cc44aff24b Added some docs about using the OpenAI integration as a universal client 2023-10-24 09:35:20 +01:00
Eric Allam 07d28ee4f5 Add custom baseURL and idempotency key support to OpenAI integration (#682)
This commit introduces the ability to set custom base URLs, which allows for the use of different APIs such as Perplexity. It also ensures that any OpenAI-related task now includes an idempotency key when making requests. Works for background tasks as well.
2023-10-24 09:19:38 +01:00
D-K-P f16a2cc4e6 Added link to the api reference repo to the readme 2023-10-24 09:11:57 +01:00
D-K-P b859837564 Edited the OpenAI ovrerview and added correct links for the tasks 2023-10-23 17:19:19 +01:00
Dan 1343003efa Merge pull request #673 from Rutam21/TRI-1430
[TRI-1430] : Improve the OpenAI integration documentation
2023-10-23 16:58:22 +01:00
Eric Allam 0c4aea0338 Add execution duration for background fetch 2023-10-23 16:55:00 +01:00
Eric Allam 627c767c64 fix: fix trigger sources getting repeatedly registered
Fixes a bug where trigger sources would get re-registered on every index, no matter if they were already properly registered or not. This was causing a lot of extra “internal” runs and being overly chatty with client endpoints
2023-10-23 15:24:35 +01:00
Digvijay Shelar f3a0c3a5d1 Merge branch 'main' into patch-3 2023-10-23 17:00:57 +05:30
dhselar1423 7bca3d9c15 made suggested changes 2023-10-23 16:57:52 +05:30
D-K-P 01fc1c6634 Slack integration docs copy updates 2023-10-23 12:17:29 +01:00
Dan 2d4f85e9f4 Merge pull request #667 from shelar1423/patch-4
Improved the Slack integration documentation
2023-10-23 12:08:40 +01:00
Rutam21 8718b28949 [TRI-1430] : Improve the OpenAI integration documentation 2023-10-21 04:55:12 +05:30
dhselar1423 2caa2a5bbd Merge branch 'patch-4' of https://github.com/shelar1423/trigger.dev into patch-4 2023-10-20 23:14:43 +05:30
dhselar1423 43a10ee695 slack fixes 2023-10-20 23:11:41 +05:30
Digvijay Shelar 018005d478 Merge branch 'main' into patch-4 2023-10-20 22:33:54 +05:30
dhselar1423 4da187c4c5 Merge branch 'patch-3' of https://github.com/shelar1423/trigger.dev into patch-3 2023-10-20 22:33:15 +05:30
dhselar1423 4925424778 Oauth and overview modifications 2023-10-20 22:32:48 +05:30
dhselar1423 7ef61222ed slack editing 2023-10-20 22:26:38 +05:30
Eric Allam 044d38e390 Improvement: Auto Execution Yielding (#612)
* Auto-yield run execution to help prevent duplicate task executions

* Add auto-yield config to endpoints

* Refactor run execution with buffer and limits

Introduced constants RUN_CHUNK_EXECUTION_BUFFER and MAX_RUN_CHUNK_EXECUTION_LIMIT. Adjusted PerformRunExecutionV2Service to use the new constants to fine-tune execution timings and buffers.

* Add endpoint probing functionality

Added new `RESPONSE_TIMEOUT_STATUS_CODES` in `consts.ts` to manage timeout responses. Additional functions `detectResponseIsTimeout(response: Response)` was added in `endpoint.server.ts` to detect if a response was a timeout based on the status codes from `RESPONSE_TIMEOUT_STATUS_CODES`.

Update actions to use new endpoint probing endpoint service. This allows for the early probing of endpoints to determine if they're up and running.

A new class `ProbeEndpointService` was created in `probeEndpoint.server.ts` which makes HTTP requests to a given endpoint and updates its properties based on the result.

Finally, `detectResponseIsTimeout(response)` is used in `performRunExecutionV2.server.ts` for marking the execution as succeeded when facing a timeout.

* Refactored probe method in EndpointApi class

The probe method of the EndpointApi class has been refactored to remove the error handling part and it now takes a timeout sent from the client directly. The corresponding changes were also made in the ProbeEndpointService and TriggerClient objects to reflect the alterations in the probe method.

The error handling related to the timeout has been removed and the responsibility of handling the timeout has been shifted to the client. Thus, the probe method has been greatly simplified. The `probeEndpoint.server.ts` file was also changed to accommodate the change in behavior of the probe result.

In the `triggerClient.ts` the timeout for probe is now read from the incoming request object. For backward compatibility, if no timeout is provided in the request, the default value of 15 minutes is used.

* Remove performRunExecution v1 enqueue function
* Better document limits and add docs on increasing function timeouts
* Upgrade webapp docker container to use 18.18.2
* force clients to yield when a run is executing in a gracefully shutting down worker
* Renamed task `key` to `cacheKey` and added more task documentation
* Index the `@trigger.dev/sdk` version on Endpoints
2023-10-20 17:44:10 +01:00
James Ritchie e7768881af Admin page now full screen with now extra UI 2023-10-20 16:53:04 +01:00
James Ritchie 5ea6a49d08 Made the app work very basically on mobile devices (#668)
* Removed the no-mobile blocker overlay so you can use the site on a phone

* Removed mobile dropdown from nav

* The app works on mobile at a width of 1024px
2023-10-20 16:12:17 +01:00
D-K-P dce5578327 Improved the GitHub overview copy 2023-10-20 14:35:28 +01:00
dhselar1423 fde3f17a25 fixed typos 2023-10-20 19:00:41 +05:30
dhselar1423 a6c9cac26c slack docs 2023-10-20 18:30:03 +05:30
Digvijay Shelar 960d99461a Merge branch 'triggerdotdev:main' into patch-3 2023-10-20 17:55:25 +05:30
dhselar1423 e5307133b3 airtable docs 2023-10-20 17:55:07 +05:30
D-K-P 34bb3acc23 Removed idempotencyKey line from GH tasks 2023-10-20 12:50:27 +01:00
Hemachandar 6d3b761cd7 fix: set correct next/prev cursors in run-list-presenter (#642)
* fix: set correct next/prev cursors in run-list-presenter

* set runs to return
2023-10-20 12:00:17 +01:00
Matt Aitken abc9737a4f Tabler icons added to NamedIcon
commit 13ed268f1d6732ef28c6e4a9eeb927c1af822032
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 20 11:38:22 2023 +0100

    Added all the tabler-icons to Storybook

commit 62738d71a40f17c45c0b29332359b2b670233a97
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 20 11:38:09 2023 +0100

    Use the no-stroke version of the tabler-sprite so we can control the stroke width

commit a1b7edd57f8b2d3f2a5f4d96cbc9eb0a887f3442
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 20 11:37:54 2023 +0100

    Set the default width to 1.5, so they’re a bit thinner

commit 69ba38802b849376611678537f7d8e248b60086b
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 20 10:55:34 2023 +0100

    Added a tabler icon to an events job catalog job

commit eb3c5f649d06adcc9ce0641f50e082ecdeead7a2
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 20 10:53:40 2023 +0100

    Moved the tabler sprite to the app and use an import. This means it’ll be cached and we can move it

commit c24d76e6df9233b001a0242f8806076562ca2e90
Author: Chaturved Degloorkar <48447253+chaturrved@users.noreply.github.com>
Date:   Fri Oct 20 15:22:59 2023 +0530

    feat: Add support for tabler-icons when using the icon for Tasks  (#629)

    * Add support for tabler-icons

    * Changed the core update type from minor to a patch

    ---------

    Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-10-20 11:41:45 +01:00
Bhargav Shirin Nalamati 84af64165c changed the title for contributors (#633) 2023-10-20 10:22:13 +01:00
Alexandre Costa 0adf41c7f0 Feat: add maxDuration setting for API/Trigger route in the CLI Init Command for Next.js (#617)
* add cli init maxDuration to the api/trigger route for nextjs

* refactor createTriggerRoute

* move boxen log to createTriggerRoute function

* refine detectNextVersion and versionNumberPattern regex to match the latest nextjs version

* add tests for the detectNextVersion function

* add changeset file

* If the regex doesn't match, it returns null instead of throwing

* Tweaked message about the max duration

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-10-20 10:16:44 +01:00
Dan b7f4e40edb Merge pull request #660 from Rutam21/TRI-1425
[TRI-1425] : Improve the Plain integration documentation.
2023-10-20 10:05:18 +01:00
Rutam21 cf33396dc0 [TRI-1425] Improve the Plain integration documentation 2023-10-20 02:45:46 +05:30
Dan 51f2cd6b3f Updated posthog to 1.83.0 (#608) 2023-10-19 16:34:41 +01:00
vimode 513d0f071d fix: broken links in documentation (#602)
* fix: broken links at what is triggerdev docs

* fix: broken links for apikey

* fix: broken sdk link

* fix: broken link in concepts/triggers

* fix: broken link for zod guide at concepts/triggers/events

* fix: broken links in title for projects

* Shouldn't have /docs at the start

* Use backgroundFetch path

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-10-19 16:27:21 +01:00
Hemachandar 50e3192453 feat: add ability to use custom tunnel in dev cmd (#597)
* feat: add ability to use custom tunnel in dev cmd

* Added a short flag -t for the tunnel flag

* skip framework url resolution if tunnel-url is provided

* remove type annotation

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-10-19 16:11:08 +01:00
Dan 1524c95a7a Merge pull request #650 from shelar1423/patch2
Get help icon and twitter text modifications
2023-10-19 12:46:41 +01:00
Eric Allam c8aaea8ad0 Improvements: Gracefully shutdown to prevent locked jobs (#648)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 6s
🚀 Publish Trigger.dev Docker / units (push) Failing after 5s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 6s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* WIP

* Report ECS task info on startup and shutdown

* Fixed lifecycle name

* Re-add terminus

* Require the build dir when http server is disabled

* Remove unnecessary logs

* Implement graceful shutdown in ZodWorker

* Re-order some code

* Increase the keepAliveTimeout to 65 seconds to prevent LB 502 errors
2023-10-19 11:18:19 +01:00
dhselar1423 cf7f25abcd fix 2023-10-19 08:08:53 +05:30
dhselar1423 99453e8581 Merge branch 'patch2' of https://github.com/shelar1423/trigger.dev into patch2 2023-10-19 01:10:16 +05:30
dhselar1423 bc7206d981 x 2023-10-19 01:10:05 +05:30
Digvijay Shelar 64b8e150ea Merge branch 'triggerdotdev:main' into patch2 2023-10-19 01:03:19 +05:30
dhselar1423 b3b5852a88 fixed icons 2023-10-19 01:02:54 +05:30
Digvijay Shelar d1ecd6b99c framework icons (#635) 2023-10-17 22:00:56 +01:00
dhselar1423 0fb16a7324 framework icons 2023-10-18 01:21:47 +05:30
Matt Aitken 4f317055fd useDevEnvironment returns the current user’s dev environment, not the first 2023-10-16 16:19:16 +01:00
Eric Allam 3afd5f8cf3 Merge branch 'main' of github.com:triggerdotdev/trigger.dev 2023-10-16 16:04:09 +01:00
Eric Allam c922d24941 Adding simulate graphile job to easily debug graceful shutdown retries in docker image 2023-10-16 16:04:05 +01:00
Matt Aitken 39ec34f84f Latest lockfile 2023-10-16 13:16:02 +01:00
Ravan b9eba68078 feat: export base file (#610)
* feat: export base file

* Added a change set

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-10-13 17:44:05 +01:00
nicktrn 9df93d0798 CLI create-integration templates and shared configs (#511)
* Add tsup config package

* Add integration tsconfig to extend from

* Return correct version via cli -v

* Make create-integration use templates

* Add changeset

* Switch to liquidjs templates

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-10-13 16:55:22 +01:00
Matt Aitken 6769d6b439 Squashed commit of the following:
commit c028db229cece2bf7d7acf04e7b1c08fea61798c
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 13 16:04:54 2023 +0100

    Some fixes for getting the endpoint id

commit e31b7ac5f2d451f70e3d42a3fb3e5f718d93485b
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 13 15:39:18 2023 +0100

    Added a link in the instructions if Node isn’t detected

commit 1a59cced775fbeac3e5b94e0c151b490c838d8f8
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 13 15:39:05 2023 +0100

    Fixed some conflict issues

commit 77263ed26bcf7025071ac0faf15fb867fff245d0
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 13 15:38:56 2023 +0100

    Added a changeset

commit 1a7df3f37f0c65d68cb9a9fe7ac50328bbb4d879
Author: GuyBorderless <100129659+guy-borderless@users.noreply.github.com>
Date:   Fri Oct 13 17:31:01 2023 +0300

    feat: enable deno  (#531)

    * adding deno reference project and JSRuntime file

    * accessing runtime specific functions through JsRuntime

    * adding support for both deno.json and deno.jsonc

    * no automatic setup for deno projects currently

    ---------

    Co-authored-by: Guy Kedem <guy@propertiz.net>
    Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-10-13 16:20:18 +01:00
Eric Allam 70410d33af Ability to change the timeout of the graceful shutdown via env var 2023-10-13 15:12:05 +01:00
Hemachandar 6371dd4f95 feat: allow sendEvent to update an existing event (#607) 2023-10-13 14:46:35 +01:00
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
Eric Allam f275b47755 Fixed pnpm lock 2023-07-11 11:31:42 +01:00
Eric Allam cfb7481d7e Merge pull request #152 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-11 11:22:55 +01:00
github-actions[bot] 57fcce90d9 chore: Update version for release (next) 2023-07-11 10:22:13 +00:00
Eric Allam 2c0ea0c108 Published packages now work with 16.8 and above 2023-07-11 11:20:47 +01:00
Eric Allam e81317b72c Loosen the @trigger.dev/nextjs next version 2023-07-11 11:04:21 +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
James Ritchie 946e429906 Merge pull request #151 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-10 13:44:20 +01:00
github-actions[bot] 2e5a401ff7 chore: Update version for release (next) 2023-07-10 12:42:38 +00:00
James Ritchie b8b84d8d16 CLI: Improved the endpoint prompt 2023-07-10 13:41:04 +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 039777bf63 Merge pull request #150 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-10 10:59:15 +01:00
github-actions[bot] 3547ec13c3 chore: Update version for release (next) 2023-07-10 09:58:47 +00:00
Matt Aitken 3763577451 CLI dev: improved spinner and made port clear in logs 2023-07-10 10:57:10 +01:00
Matt Aitken c6618049f2 Merge pull request #149 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-10 10:35:07 +01:00
github-actions[bot] 28d6aa9885 chore: Update version for release (next) 2023-07-10 09:33:29 +00:00
Matt Aitken 568786e4f6 Fix when setting the url as an option 2023-07-10 10:32:07 +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
Eric Allam 38614ee526 Update pnpm lockfile 2023-07-09 20:43:27 +01:00
Eric Allam 15ad6bb5f8 Merge pull request #148 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-09 20:41:41 +01:00
github-actions[bot] 15f431ada6 chore: Update version for release (next) 2023-07-09 18:48:48 +00:00
Matt Aitken 5163acc6ef Plain changed to @latest
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-07-09 19:47:32 +01:00
Matt Aitken f9297d783a Added Plain to the integration catalog 2023-07-08 22:17:58 +01:00
Eric Allam c34a02c06f Improved OpenAI integration task errors
And also now allowing runTask.onError to also return an Error by itself if it wants to not retry the task
2023-07-08 22:14:27 +01:00
Eric Allam 61ed1fb202 Added support for output properties on tasks 2023-07-08 22:14:27 +01:00
Eric Allam 87638ba6c5 Merge pull request #147 from owen-duncan-snobel/main
Update README.md
2023-07-07 21:51:36 +01:00
owen-duncan-snobel 26b4100bb0 Update README.md
Use the permanent link to the discord
2023-07-07 15:26:34 -04:00
Matt Aitken 1157c2adf6 Merge pull request #144 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-07 19:05:26 +01:00
github-actions[bot] 8613d3288b chore: Update version for release (next) 2023-07-07 18:05:13 +00:00
Matt Aitken ab008fbdff Typeform example formId is optional 2023-07-07 19:03:17 +01:00
Matt Aitken 0b30197280 Set schema for passing in the formId 2023-07-07 19:03:17 +01:00
Matt Aitken 89a121f21e Typeform SDK getAllResponses fixed 2023-07-07 19:03:17 +01:00
Matt Aitken 045a8c56af Subtasks are now ordered correctly 2023-07-07 19:03:17 +01:00
Eric Allam d83c11db8c Add back in npm-run-all
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-07-07 16:39:29 +01:00
Eric Allam 7efe14b835 Logging in via github should work even after changing your email address 2023-07-07 16:34:41 +01:00
Matt Aitken 37116aecf9 Latest lockfile 2023-07-07 15:37:51 +01:00
Matt Aitken 9a606e8f2a Merge pull request #143 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-07 15:35:00 +01:00
github-actions[bot] b1e65ed500 chore: Update version for release (next) 2023-07-07 14:34:41 +00:00
Matt Aitken 26f3dbff06 Typeform: safeBodyParse webhook import fixed 2023-07-07 15:32:45 +01:00
Eric Allam 5ee0b188bd Improve the error display when a run cannot connect to an endpoint 2023-07-07 15:32:19 +01:00
Matt Aitken 4692cd6a55 Latest lockfile 2023-07-07 15:20:42 +01:00
Matt Aitken 7ad8c01853 Merge pull request #142 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-07 15:19:13 +01:00
github-actions[bot] bc27b45fd7 chore: Update version for release (next) 2023-07-07 14:18:55 +00:00
Matt Aitken 94cc28d377 Changeset: integration-kit uses webhook package 2023-07-07 15:17:32 +01:00
Matt Aitken 19e80cef3b Removed “internal-queue” from indexEndpoint 2023-07-07 15:16:18 +01:00
James Ritchie 5397cd3194 Added environment labels to the enironment and api keys help panel 2023-07-07 14:51:44 +01:00
Eric Allam f01af9c0ec Remove a bunch of unused webapp deps and upgrade packages to zod 3.21.4 2023-07-07 14:47:28 +01:00
James Ritchie a288010d02 Added a new help panel to the api and endpoints page 2023-07-07 14:20:35 +01:00
James Ritchie b9a7a1c32b Label component now uses the correct <label> html element 2023-07-07 14:20:35 +01:00
James Ritchie 65b9a0dce5 Improved the Header component to make it easier to add more props 2023-07-07 14:20:35 +01:00
Eric Allam 7464006e19 Associated trigger sources and dynamic triggers with their registration job 2023-07-07 13:47:19 +01:00
Matt Aitken 590d56b7e7 Merge pull request #141 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-07 12:18:57 +01:00
github-actions[bot] c75cb1e87e chore: Update version for release (next) 2023-07-07 11:16:51 +00:00
Matt Aitken 597b2f4a6f Plain example Job 2023-07-07 12:15:16 +01:00
Matt Aitken 2e84c6bbb2 Plain: Added upsertCustomTimelineEntry Task and exported the components from the plain package 2023-07-07 12:15:16 +01:00
Matt Aitken 06c0cd5297 Import plain jobs file so it gets run, also alphabetized them 2023-07-07 12:15:16 +01:00
Eric Allam 79eab3d62f Cleanup unused graphile tasks 2023-07-07 11:46:56 +01:00
Eric Allam 6527723a0e Refactor index endpoint to work sequentially so we can add associations between sources and jobs 2023-07-07 11:36:01 +01:00
Eric Allam 3d6652f132 WIP plain integration 2023-07-07 10:59:36 +01:00
Matt Aitken da5d9779d4 Check if the Highlight id is defined before attempting to send the error 2023-07-06 21:03:20 +01:00
Matt Aitken 865399e753 Enabled tracing so we can track down errors between frontend and backend 2023-07-06 20:56:50 +01:00
Matt Aitken 960ea6c8dd Removed the throw button from the NavBar… obvs should never have been committed ;) 2023-07-06 20:56:35 +01:00
Matt Aitken 39ab48f0cb Highlight server-side error tracking 2023-07-06 20:45:20 +01:00
Matt Aitken 7341b4cf61 Highlight identifies users 2023-07-06 20:45:00 +01:00
Matt Aitken 28c5acc6af Added Highlight to the project, with basic client-side tracking 2023-07-06 19:34:53 +01:00
Matt Aitken 4366eefc66 Removed unused import 2023-07-06 19:34:05 +01:00
Matt Aitken cb95e761c1 Added an error boundary to the _app route 2023-07-06 19:33:32 +01:00
Matt Aitken 7136748463 Added an error boundary to org 2023-07-06 19:29:42 +01:00
Matt Aitken b0cacfd75c Added an error boundary to project 2023-07-06 19:29:32 +01:00
Matt Aitken 81f03dac79 Better error when a job isn’t found 2023-07-06 19:29:17 +01:00
Matt Aitken e37d1eadcd Breadcrumb null checks in case error boundaries are hit deep in the app 2023-07-06 19:29:00 +01:00
Matt Aitken 23fb310374 Reusable ErrorDisplay 2023-07-06 19:28:36 +01:00
Matt Aitken 797a1732d2 Organize imports on ProjectSideMenu 2023-07-06 19:08:06 +01:00
Matt Aitken c405a417e9 If an error boundary is hit the meta function can return undefined… 2023-07-06 19:07:46 +01:00
James Ritchie 808deb1d77 Added data attributes to the side menu items 2023-07-06 17:50:44 +01:00
Eric Allam 6ac1473ec3 Merge pull request #139 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-06 15:31:53 +01:00
github-actions[bot] 9c183abf4b chore: Update version for release (next) 2023-07-06 14:27:36 +00:00
Eric Allam 33c33faae9 Adding the typeform integration to the catalog 2023-07-06 15:26:02 +01:00
Matt Aitken 4cccbc2039 PostHog updated to change hooks, also added “job” group 2023-07-06 14:58:29 +01:00
Matt Aitken cc061dedf8 Change hooks for User, Org, Project, Job 2023-07-06 14:58:29 +01:00
Matt Aitken 402ce2210f New hook that lets you trigger an action when an object changes 2023-07-06 14:58:29 +01:00
Matt Aitken 329c5c4070 Updated posthogjs 2023-07-06 14:58:29 +01:00
Matt Aitken 878aeb7a8c useOrganizationChanged 2023-07-06 14:58:29 +01:00
Eric Allam 3ee396d788 Adding the typeform integration with webhook support 2023-07-06 13:42:49 +01:00
Eric Allam 090037602c WIP create-integration CLI command 2023-07-06 13:42:49 +01:00
Matt Aitken bee77051e7 Added UI to guide you to fixing unconfigured integrations 2023-07-06 11:56:19 +01:00
Matt Aitken be6741a4a8 Example Job that has an unconfigured Integration (for testing) 2023-07-06 11:56:19 +01:00
Matt Aitken 3e9b440322 NamedIcon uses the new type 2023-07-06 11:56:19 +01:00
Matt Aitken dfea5bc77c The connection-alert trigger type has an amber icon so it doesn’t look like an error 2023-07-06 11:56:19 +01:00
Matt Aitken 1eef30e298 Callout uses to and supports internal and external links 2023-07-06 11:56:19 +01:00
James Ritchie e5b9a9de3f Noun’d up Job 2023-07-06 11:36:13 +01:00
Matt Aitken dfedd3a6e8 Consistently use “Log in” everywhere 2023-07-06 10:08:09 +01:00
Matt Aitken a19845b4ca Added a jsdoc markr to the source id 2023-07-06 09:32:15 +01:00
Matt Aitken 094f6f5a7a jsdocs for DynamicTrigger and DynamicSchedule changeset 2023-07-06 00:37:01 +01:00
Matt Aitken fa60edce2b jsdocs for DynamicTrigger and DynamicSchedule 2023-07-06 00:36:08 +01:00
Matt Aitken ba44652457 intervalTrigger() jsdocs 2023-07-05 20:17:09 +01:00
Matt Aitken 931be39912 cronTrigger jsdocs 2023-07-05 19:32:35 +01:00
James Ritchie 5048a27acb Capital J for Job 2023-07-05 18:27:04 +01:00
Matt Aitken 71fc615b31 Fix for the profile photo sizing being weird 2023-07-05 18:05:41 +01:00
Eric Allam 20ed4e22ef Implement the cloud private beta invite form
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-07-05 17:27:59 +01:00
Matt Aitken fc2d337a39 Optional trailing icon on a <TextLink> 2023-07-05 17:22:53 +01:00
Matt Aitken 31d96f3862 External icon uses the small version 2023-07-05 17:22:44 +01:00
Matt Aitken 7b43853ec6 Help content for the Job page 2023-07-05 17:11:45 +01:00
Matt Aitken 40fa913272 TextLink can have a to or an href 2023-07-05 17:10:34 +01:00
Matt Aitken cdd5482aad Capitalized Runs 2023-07-05 17:10:17 +01:00
Matt Aitken 4a3fa20ee7 Export the callout styles 2023-07-05 17:10:10 +01:00
Matt Aitken d49ed4cd47 Fix for div inside paragraph error 2023-07-05 17:09:53 +01:00
James Ritchie db3cf77f5b Updated the pagination buttons style 2023-07-05 17:08:35 +01:00
James Ritchie c4a08961d6 Added a Help Panel to the Jobs list page 2023-07-05 17:08:35 +01:00
James Ritchie 5ba1643d46 Added a new qr code named icon 2023-07-05 16:57:33 +01:00
Eric Allam d189f425e8 Limit access to the cloud product to people who have invite codes 2023-07-05 16:31:41 +01:00
Matt Aitken 0fe6fb83ac The test help panel is open when you load the page 2023-07-05 16:09:20 +01:00
Matt Aitken f15ae41f48 Help lightbulb is always yellow 2023-07-05 16:09:20 +01:00
Eric Allam 46a07fc72e Merge pull request #138 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-05 15:59:30 +01:00
github-actions[bot] 83af317739 chore: Update version for release (next) 2023-07-05 14:57:17 +00:00
Eric Allam f4db1b2735 @trigger.dev/cli init - Create a better file structure 2023-07-05 15:54:58 +01:00
Eric Allam 6d4922f419 api.trigger.dev is now the default cloud url 2023-07-05 14:47:41 +01:00
Eric Allam 6af098ee8a Default the apiUrl to cloud.trigger.dev 2023-07-05 12:29:48 +01:00
Eric Allam 1dcb2ebcac Update pnpm lock file 2023-07-05 12:25:10 +01:00
Eric Allam f65cb463cc Merge pull request #137 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-05 12:20:43 +01:00
github-actions[bot] 2b4ce97f8a chore: Update version for release (next) 2023-07-05 11:12:37 +00:00
Eric Allam 25abf319ab PageInfoProperty not puts the value inside a paragraph even if it’s a react node
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-07-05 12:11:12 +01:00
James Ritchie 77807ab42a Changed ‘Clients’ to ‘Endpoints’ on the API keys page and reordered URL in table 2023-07-05 11:38:06 +01:00
Eric Allam f21990b14f Removed the datetime logging
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-07-05 11:36:44 +01:00
Eric Allam 1873d10e95 Normalize the whitespace characters in formatted date times 2023-07-05 11:13:26 +01:00
Matt Aitken 32ff3f3136 @trigger.dev/github: Fixed some properties that had API urls instead of HTML urls 2023-07-05 11:12:27 +01:00
Matt Aitken 354b0aefb0 “This Run returned nothing.” 2023-07-05 10:59:37 +01:00
Matt Aitken aaa70a9aab eventTrigger() jsdocs 2023-07-05 10:59:37 +01:00
Eric Allam 3b90739087 Rework the DateTime component to use a Fragment and render the correct datetime timezone in a useEffect 2023-07-05 10:51:08 +01:00
Matt Aitken acaae993a5 Run context jsdocs 2023-07-04 22:55:49 +01:00
Eric Allam a74f0322e2 Attempt to fix the prisma “Transaction already closed: Could not perform operation” error
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
- Removes the transaction stuff from StartRunService (can try putting it back more granularly)
- Uses $transaction in TestJobService
- Better queue names for the startRun and deliverEvent worker job
2023-07-04 22:11:53 +01:00
Matt Aitken 1a0286f6b0 Run pnpm i 2023-07-04 18:52:54 +01:00
Matt Aitken 64182483e2 Merge pull request #136 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-04 18:37:46 +01:00
github-actions[bot] 87a25fba62 chore: Update version for release (next) 2023-07-04 17:34:44 +00:00
Matt Aitken 12803536fa OpenAI integration: listModels returns the response.data instead of response.data.data 2023-07-04 18:33:27 +01:00
Matt Aitken f160b34b34 isTriggerError jsdocs 2023-07-04 16:28:58 +01:00
Matt Aitken cca7da9da2 Better docs for io.try 2023-07-04 16:15:47 +01:00
Matt Aitken 01cf5f3bdc io.try jsdocs 2023-07-04 16:14:31 +01:00
Matt Aitken 33a928a9ea Removed new job examples from general 2023-07-04 15:30:56 +01:00
Matt Aitken c83443a41a io.runTask and io.registerTrigger jsdocs 2023-07-04 15:30:06 +01:00
Eric Allam 374007bffd Fixed incorrectly scoping job test runs to the specific selected project
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-07-04 15:23:19 +01:00
Eric Allam 092382f319 Cleanup some of the date times 2023-07-04 15:14:45 +01:00
Eric Allam 79a0532e1d Handle OS signals in the docker container
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
2023-07-04 14:36:59 +01:00
Eric Allam 56c7c8b1ee Better handle interactive transaction errors and adding increased timeouts 2023-07-04 14:36:59 +01:00
Matt Aitken 722fe7b71e registerCron and unregisterCron jsdocs 2023-07-04 12:48:32 +01:00
Eric Allam 759793b2e3 Fix hydration errors by using the LocaleProvider for all rendered dates, and always use UTC to prevent timezone mismatches 2023-07-04 12:36:42 +01:00
Matt Aitken 99c6cd0371 io.registerInterval and io.unregisterInterval jsdocs 2023-07-04 11:22:28 +01:00
Eric Allam 9fbc5ab8de Adding logging to investigate hydration errors 2023-07-04 11:09:47 +01:00
Eric Allam 75ac2c9961 Scheduled triggers are now disabled on dev env by default
Also added pk api key to the environments now
2023-07-04 10:59:05 +01:00
Eric Allam 87330dd863 Merge pull request #135 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-04 10:50:18 +01:00
github-actions[bot] 38fe9302cf chore: Update version for release (next) 2023-07-04 09:36:25 +00:00
Eric Allam 33a455c593 pnpm i 2023-07-04 10:34:29 +01:00
Eric Allam 37db0ac58d Remove @trigger.dev/internal changeset 2023-07-04 10:33:00 +01:00
Eric Allam 2cbf50b1cc @trigger.dev/sdk: deliverAt and timestamp event properties are now dates 2023-07-04 10:32:08 +01:00
Matt Aitken e26923eb19 backgroundFetch jsdocs 2023-07-04 10:31:44 +01:00
Eric Allam 3e63bcfb11 Merge pull request #134 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-03 22:50:55 +01:00
github-actions[bot] 1e1c18c4a1 chore: Update version for release (next) 2023-07-03 21:49:48 +00:00
Eric Allam 953e7fc918 Allow scheduled jobs to have their schedule updated
Also added human readable cron property to cron triggers
2023-07-03 22:48:03 +01:00
Matt Aitken 8e147dbe0c io.sendEvent jsdocs 2023-07-03 19:19:56 +01:00
Matt Aitken 86dbd5d1dc Added JSdocs for io.wait and io.logger 2023-07-03 19:02:58 +01:00
Eric Allam e85ecfacba Remove the commented out jobs 2023-07-03 17:49:00 +01:00
Eric Allam f210532870 @trigger.dev/slack: Added joinConversation task, and automatically try and join a public conversation if the bot is not in it when posting a message 2023-07-03 17:48:14 +01:00
James Ritchie 6c9ca686cb Tweaked callout icon margin 2023-07-03 16:39:21 +01:00
James Ritchie 35b556d4a3 Using the path builder for URLs on the Jobs page 2023-07-03 16:39:21 +01:00
James Ritchie c83339404a Using the path builder for the integration docs URL 2023-07-03 16:39:21 +01:00
James Ritchie 4172def1a3 Added a docs root path to the path builder 2023-07-03 16:39:21 +01:00
James Ritchie c99481ea8d Added a callout to link to the docs 2023-07-03 16:39:21 +01:00
Matt Aitken a11ddf6564 Added JSDocs related to logging 2023-07-03 16:21:14 +01:00
Matt Aitken 917a70fbe9 Docs for the Job constructor() 2023-07-03 16:12:21 +01:00
Eric Allam 486d6818ba SDK: IO Logging now respects the job and client logLevel, and only outputs locally when ioLogLocalEnabled is true 2023-07-03 16:00:18 +01:00
Matt Aitken 807b9d4c45 SDK changeset: Added jsdocs for TriggerClient() and sendEvent() 2023-07-03 15:37:36 +01:00
Matt Aitken 0013e78b1a CLI changeset: Export the client from the generated code and added code comments 2023-07-03 15:37:25 +01:00
Matt Aitken 9dd46c83fd Added code comments to the CLI generated code, and exported the client 2023-07-03 15:35:40 +01:00
Matt Aitken 1eb6bb8aa9 Added JSDocs for TriggerCient() and client.sendEvent() 2023-07-03 15:35:40 +01:00
Eric Allam 6c86946614 SDK: Fixes issue with PING response
CLI: improves how the dev command handles register errors, also doesn’t create a tunnel when hitting local trigger.dev, and improves the dev command output
2023-07-03 15:33:44 +01:00
Eric Allam 612b016a15 When registering a schedule source < 60 seconds, make it 60 seconds 2023-07-03 14:00:46 +01:00
Eric Allam be8beacaec chore: update to Remix 1.18.1 2023-07-03 13:53:38 +01:00
Eric Allam 4d316c5524 Fixed the OAuth2 callback urls by constructing URL using x-forwarded-proto header 2023-07-03 13:47:58 +01:00
Eric Allam 7fee5d6a87 Remove logging of headers and replace integration list date with DateTime component 2023-07-03 13:26:53 +01:00
Eric Allam 0dd1aa5a5b Log out the server locale context 2023-07-03 13:11:32 +01:00
Eric Allam ed65ba4a73 isManagedCloud should be true when in the test cloud 2023-07-03 11:53:23 +01:00
Matt Aitken d39020370c Merge pull request #133 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-07-03 11:43:28 +01:00
github-actions[bot] c18ba11819 chore: Update version for release (next) 2023-07-03 10:29:42 +00:00
Matt Aitken 5fbd7226eb Changeset: @trigger.dev/cli: Added retrying and better messaging 2023-07-03 11:28:22 +01:00
Matt Aitken c9e27fd586 Improved the loading state of the CLI dev command. Fail after 10 connection attempts 2023-07-03 11:27:36 +01:00
Matt Aitken 51b80eb09b Deleted old CLI createProject file 2023-07-03 11:27:22 +01:00
Matt Aitken f409e9f329 Improved the messaging when it’s connecting with a retry 2023-07-02 18:54:25 +01:00
Matt Aitken 304e6aaad5 Only triggers a refresh when a relevant file is changed, retries with exponential backoff 2023-07-02 18:45:34 +01:00
Eric Allam 3c5d02043e Merge pull request #132 from triggerdotdev/changeset-release/main 2023-06-30 22:07:19 +01:00
github-actions[bot] 63980f63d4 chore: Update version for release (next) 2023-06-30 18:45:02 +00:00
Eric Allam facd2b2131 Update lockfile 2023-06-30 19:43:20 +01:00
Matt Aitken 25452588cc Update the sdk version in peer dependencies of @trigger.dev/nextjs 2023-06-30 18:05:53 +01:00
Matt Aitken 195d8c42fc Updated posthog-js to the latest 2023-06-30 18:02:03 +01:00
Matt Aitken fe04b9d32d Next.js changeset: adaptors no longer take an options object 2023-06-30 17:44:55 +01:00
Matt Aitken d03b3aeb5f Latets lockfile 2023-06-30 17:29:04 +01:00
Matt Aitken 2ee33e70f7 Fixed Slack help line highlighting 2023-06-30 17:25:57 +01:00
Matt Aitken e9209629f7 Show contextual help for an Integration 2023-06-30 17:24:55 +01:00
Matt Aitken fa1e6bf5e6 The new fields from the Integration catalog are now in the database 2023-06-30 17:24:40 +01:00
Matt Aitken 93c3b10bf7 Improved the help text some more
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-06-30 15:43:45 +01:00
Matt Aitken 56cb2e3b07 Updated the in-app quick start instructions 2023-06-30 15:38:40 +01:00
Eric Allam eabfb2457a Remove pushing to ECR 2023-06-30 15:35:20 +01:00
Eric Allam 317ab442ee Merge pull request #131 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-06-30 15:12:43 +01:00
github-actions[bot] 2b24b36da6 chore: Update version for release (next) 2023-06-30 14:10:09 +00:00
Eric Allam 161d59d01d Added better Next Steps in the init cli command 2023-06-30 15:07:46 +01:00
Eric Allam 821b75ed26 Merge pull request #130 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-06-30 14:30:38 +01:00
github-actions[bot] 1f901e68d3 chore: Update version for release (next) 2023-06-30 13:27:31 +00:00
Eric Allam 46d94a6a8f Fixed type errors 2023-06-30 14:26:07 +01:00
Eric Allam 44c2146505 Merge pull request #129 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-06-30 14:14:32 +01:00
Matt Aitken ec2f1f5931 Support for Integrations that are incomplete on the integrations page 2023-06-30 14:13:23 +01:00
Matt Aitken e86c59f4ec If logging is on show Posthogs logs 2023-06-30 14:13:23 +01:00
James Ritchie 6df6813a17 Styled scroll bar for the test json 2023-06-30 14:06:10 +01:00
James Ritchie f73679e2a6 Updated help image 2023-06-30 14:06:10 +01:00
Eric Allam 68b866921a Remove triggering a test deploy on publishing 2023-06-30 13:48:08 +01:00
James Ritchie 35364d615a Custom scrollbars now on the Job and Project navbar menus 2023-06-30 13:18:13 +01:00
Matt Aitken f64dd2a99c Added nice scrollbar, commented out missing integration stuff for now 2023-06-30 12:56:10 +01:00
Matt Aitken a309a75a4d NamedIcon now gives autocomplete in the editor (but also accepts any string) 2023-06-30 12:18:19 +01:00
Matt Aitken c2e2f7cad9 CLI: removed —tunnel param as we currently just support ngrok 2023-06-30 12:18:19 +01:00
Matt Aitken f69b92b153 Uncommented the jobs 2023-06-30 12:18:19 +01:00
Matt Aitken f8760fdd6b Moved the jobs so they’re imported and can be easily commented out 2023-06-30 12:18:19 +01:00
Matt Aitken caa4daabe2 Use the id as the temporary name 2023-06-30 12:18:19 +01:00
github-actions[bot] 67f685af26 chore: Update version for release (next) 2023-06-30 11:11:54 +00:00
Eric Allam b2a8b5653f Adding changeset for the new dev command 2023-06-30 12:10:30 +01:00
Eric Allam 9232f019e1 Fixed a couple type errors in the @trigger.dev/cli 2023-06-30 11:29:25 +01:00
Eric Allam ac371664af Better handle input for the --trigger-url option 2023-06-30 11:26:46 +01:00
Matt Aitken e4cca81124 Integrations page: added a Connections column and deal with local auth better 2023-06-30 11:11:28 +01:00
Matt Aitken d76d2b86d2 Indexing endpoints happens in a transaction 2023-06-30 11:11:28 +01:00
Matt Aitken fcd2d6eea2 Integrations now have a setupStatus and can be missing fields 2023-06-30 11:11:28 +01:00
Matt Aitken 067064d19c Include Slack jobs 2023-06-30 11:11:28 +01:00
Matt Aitken 52cdfb98a4 Added extra error checking to the refresh endpoint call 2023-06-30 11:11:28 +01:00
Eric Allam 41261afcc4 Fix the pnpm lock file AGAIN 2023-06-30 11:10:13 +01:00
James Ritchie 77f71fdeb7 WIP adding 2 links below the api list 2023-06-30 11:09:15 +01:00
James Ritchie ce0032e7e5 Minor copy tweaks 2023-06-30 10:33:05 +01:00
Matt Aitken c97ca350ad The endpoint gets automatically refreshed when files are changed, with a throttle 2023-06-29 22:19:55 +01:00
Matt Aitken 90abcb2cf7 Improved messages 2023-06-29 21:53:16 +01:00
Matt Aitken 8626172faa Installed packages 2023-06-29 21:53:09 +01:00
Matt Aitken 44ef97c656 Set the nextjs-example packages to workspace again 🤦‍♂️ 2023-06-29 21:53:05 +01:00
Matt Aitken 7661fe5309 CLI dev command is creating a tunnel and attempting to connect to the API 2023-06-29 21:29:28 +01:00
Matt Aitken beb02c871d Added the CLI to the nextjs-example project 2023-06-29 21:12:21 +01:00
Matt Aitken 8a47320272 WIP on dev CLI command 2023-06-29 20:32:07 +01:00
Matt Aitken 114c8990a3 Change the main header to h1 to stop eslint complaining 2023-06-29 19:34:00 +01:00
Eric Allam 7e2d48ac6a Adding SDK changeset for trigger client url 2023-06-29 18:26:53 +01:00
Eric Allam dbb6667889 Couple of changes for matt 2023-06-29 18:25:31 +01:00
Eric Allam 29a02131d2 WIP converting the init into a multi-command CLI to support dev 2023-06-29 18:15:19 +01:00
James Ritchie 5d887f1cfb Improved the sheet style 2023-06-29 17:29:46 +01:00
James Ritchie 18f0e73ed4 Added yarn and pnpm options for installing the package 2023-06-29 16:41:19 +01:00
James Ritchie c4c1425c9b WIP making the 2 styles of dropdowns similar. Bare minimum for now for launch. 2023-06-29 15:55:15 +01:00
James Ritchie 00bb3934ad import cleanup 2023-06-29 15:27:59 +01:00
James Ritchie 324096e14e typo 2023-06-29 15:27:48 +01:00
James Ritchie 9cad2bb308 scopes title style update 2023-06-29 15:15:13 +01:00
James Ritchie eec537135a fixed radio button alignment 2023-06-29 15:13:04 +01:00
James Ritchie 53e42d3350 Integration page layout now uses 2 and 1 col grid layout 2023-06-29 15:01:00 +01:00
James Ritchie e74122977a logo alignment fix 2023-06-29 15:00:10 +01:00
James Ritchie f32c3ebe2c higher res help images 2023-06-29 14:48:58 +01:00
James Ritchie d07ac4fef0 Added a callout link to the docs 2023-06-29 14:42:49 +01:00
James Ritchie 183761b01f Aligned the callout icon top 2023-06-29 14:42:39 +01:00
James Ritchie 361ef70ce8 api key fields not fullwidth 2023-06-29 14:42:31 +01:00
James Ritchie 2bac0a4e5b Added content to the Test help panel and made the -t dynamic 2023-06-29 14:35:34 +01:00
James Ritchie b89a68bb9c Added a hook for appOrigin 2023-06-29 14:35:34 +01:00
James Ritchie 496dadebbd Fixed the page layout to work with 1 or 2 col grid layout 2023-06-29 14:35:34 +01:00
Eric Allam 155a4eecd4 Merge pull request #128 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-06-29 14:02:45 +01:00
github-actions[bot] 5eec1b6f7b chore: Update version for release (next) 2023-06-29 12:39:46 +00:00
Eric Allam e2ce9472cf @trigger.dev/init: a number of improvements
- 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
2023-06-29 13:37:58 +01:00
James Ritchie 06f0b69cfb Small copy correction 2023-06-29 11:52:06 +01:00
James Ritchie 0ae43fde72 Added pnpm and yarn CLI install options 2023-06-29 11:50:17 +01:00
James Ritchie 32f5b7e5c4 Updated the ngrok image 2023-06-29 11:50:04 +01:00
James Ritchie e3a804ca64 Added mac and windows tab options to the ngrok install step 2023-06-29 11:07:48 +01:00
James Ritchie 6a3ee289b3 Styled the client tabs component 2023-06-29 11:07:48 +01:00
James Ritchie 02a8605fec step number takes a classname 2023-06-29 11:07:48 +01:00
James Ritchie dbd72e6bbf Added some margin to the bottom of the scopes list so it doesn’t crop the last entries 2023-06-29 11:07:48 +01:00
Matt Aitken d629c95daf Added Resend to integrations list, got rid of Airtable (for now) 2023-06-29 10:52:55 +01:00
Eric Allam 04d6e8e7f0 Set the package manager to pnpm 7.18.1 2023-06-29 10:35:22 +01:00
James Ritchie 7caf95158d Improvements to the Jobs help text 2023-06-29 10:08:52 +01:00
James Ritchie 8245448f29 Added a new image for the Jobs help text 2023-06-29 10:08:52 +01:00
Matt Aitken 4d85bcd60e OAuth slug/id field is now visible (must be unique, errors if it’s not) 2023-06-28 22:43:13 +01:00
Matt Aitken d8d156adac Connect integration button now locked to the bottom of the sheet 2023-06-28 22:07:48 +01:00
Matt Aitken 7d02c84c47 Latest package install 2023-06-28 22:07:32 +01:00
Matt Aitken a5d70b8c37 Added Slack jobs file 2023-06-28 22:00:08 +01:00
Matt Aitken d42cd9ffac New star sends Slack message 2023-06-28 22:00:00 +01:00
Matt Aitken 1b19c83998 Changesd “Slug” to “ID” on the integration page. We call it id in the code 2023-06-28 19:21:12 +01:00
Matt Aitken c0be8bef23 Added ID to the connected integrations list 2023-06-28 19:21:12 +01:00
James Ritchie 90bc2d0b60 Added more brand colours to the confetti 2023-06-28 18:00:45 +01:00
Eric Allam 1c747f69f5 Fixing pnpm lock once again 2023-06-28 17:57:28 +01:00
Eric Allam 57914c7488 Merge pull request #127 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-06-28 17:56:11 +01:00
James Ritchie 1939222d31 Obfuscate the API key in the input 2023-06-28 17:55:44 +01:00
James Ritchie c29f5fab7a Clipboard component can now be full width or fit the content (default is full width) 2023-06-28 17:55:44 +01:00
James Ritchie adb2cda614 Copy updates to the Job help panel 2023-06-28 17:55:44 +01:00
James Ritchie c462441f9e Added a todo for the confetti 2023-06-28 17:55:44 +01:00
James Ritchie 2681f6897d Added some confetti to the Jobs page 2023-06-28 17:55:44 +01:00
github-actions[bot] 2322c67aff chore: Update version for release (next) 2023-06-28 16:55:39 +00:00
Eric Allam f645663fd8 Fixed the lockfile 2023-06-28 17:54:18 +01:00
Eric Allam f2f4d4b827 @trigger.dev/sdk, webapp: Adding more granular error messages around unauthorized requests 2023-06-28 17:53:40 +01:00
Eric Allam 85108cfcb5 @trigger.dev/init: Remove the localhost default for endpoint URL 2023-06-28 17:11:35 +01:00
Matt Aitken 308bd355e2 ClipboardField allows passing in a secure string 2023-06-28 17:05:05 +01:00
Matt Aitken 4ab032c717 Latest lockfile 2023-06-28 17:04:56 +01:00
Eric Allam 17a117d1ee Merge pull request #126 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-06-28 16:53:29 +01:00
github-actions[bot] bc43cc232d chore: Update version for release (next) 2023-06-28 15:40:08 +00:00
Eric Allam 94ae9e65f4 Fixed an issue in @trigger.dev/init that cause environment variables to be incorrectly added to .env.local 2023-06-28 16:38:51 +01:00
James Ritchie 2ed7158cf1 Fleshed out the ngrok section some more 2023-06-28 16:14:41 +01:00
James Ritchie 9d8a21a3de Added an ngrok image 2023-06-28 16:14:41 +01:00
Eric Allam d313eaa742 Update the performRunExecution import 2023-06-28 15:50:02 +01:00
Eric Allam c5d91e7cca Adding the resend package and fixing issues with the webapp 2023-06-28 15:48:23 +01:00
James Ritchie cc668a1624 Added a refresh page button 2023-06-28 15:34:31 +01:00
James Ritchie d17173ec0a Added another namedIcon 2023-06-28 15:34:21 +01:00
James Ritchie ebcd886d20 More Jobs help content 2023-06-28 15:15:48 +01:00
James Ritchie 4976bd1889 Show a callout link to the docs when you have 0 or >0 Jobs 2023-06-28 15:15:48 +01:00
James Ritchie 9da6d92fb3 useEnvironments hook now works as intended 2023-06-28 15:15:48 +01:00
Eric Allam 9dee5429d5 Move error formatting to a server file 2023-06-28 14:28:11 +01:00
James Ritchie ebe90aac5c WIP writing the setup Project help text 2023-06-28 14:08:35 +01:00
James Ritchie 289d69c79d Show 3 different CTAs for creating a Job depending on how many Jobs you currently have 2023-06-28 14:08:35 +01:00
James Ritchie 5bdaf4f662 Added a new namedIcon 2023-06-28 14:08:35 +01:00
James Ritchie 67f47bc3df Removed the Jobs skeleton and added a dashed outline version 2023-06-28 14:08:35 +01:00
James Ritchie 67ddd76ff3 Optionally set an isOpen conditional for when the Help panel is toggled open 2023-06-28 14:08:35 +01:00
James Ritchie 95de883879 Updated the terms links 2023-06-28 14:08:35 +01:00
James Ritchie 3227da122e If the integration connection is local, don’t show the irrelevant tabs 2023-06-28 14:08:35 +01:00
Eric Allam ae243c783a Merge pull request #125 from triggerdotdev/changeset-release/main
chore: Update version for release (next)
2023-06-28 14:01:17 +01:00
github-actions[bot] eb3b7f5146 chore: Update version for release (next) 2023-06-28 12:31:20 +00:00
Eric Allam 414439cac9 Upgrade to Remix 1.18.0 and try out the new dev server 2023-06-28 13:29:46 +01:00
Eric Allam 7dacccb70e Tag the main html title with the app env 2023-06-28 13:16:15 +01:00
Eric Allam a5e1d0595e Trigger a test deploy if a push to main happens 2023-06-28 12:13:44 +01:00
Eric Allam 7e8c6e92a2 Fixed seeding the cloud user github integration connection 2023-06-28 12:07:47 +01:00
Eric Allam 24542d4e21 Adding support for trigger source in the run context 2023-06-28 12:07:47 +01:00
Eric Allam b975125af5 Merge pull request #124 from triggerdotdev/changeset-release/main 2023-06-27 19:36:36 +01:00
github-actions[bot] cc8c60605b chore: Update version for release (next) 2023-06-27 16:43:11 +00:00
Eric Allam 23adc15ce3 Fixed the broken export issue with two of the new github tasks 2023-06-27 17:41:49 +01:00
Eric Allam 7204aa0c9a Push commit hash image tag to ECR
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-06-27 16:37:39 +01:00
Eric Allam 6750429cd4 Fixed the slack env vars for oauth2User 2023-06-27 16:24:10 +01:00
James Ritchie cfe0a6cbb8 Copy changes 2023-06-27 15:44:46 +01:00
James Ritchie a9f95971e8 Added an integration button image 2023-06-27 15:44:46 +01:00
James Ritchie d7eee844b7 Callout now has a docs variant which can take an href 2023-06-27 15:44:46 +01:00
James Ritchie 4c52731d16 Exported the integration icon to use in the help text 2023-06-27 15:44:46 +01:00
James Ritchie e53447d0bf Replaced all the inline help content on the route pages with components 2023-06-27 15:44:46 +01:00
James Ritchie 53ed23ac58 Initial setup for localising the help content into one component 2023-06-27 15:44:46 +01:00
Eric Allam 226fb4a349 Fallback to using the url passed in if the appHostEnvName isn’t in the environment 2023-06-27 15:30:01 +01:00
Eric Allam d89632eb9d Create latest and tagged images if in a versioned tag 2023-06-27 14:11:16 +01:00
Eric Allam 4621196993 Revert "Try publishing to ECR using good ole fashioned aws credentials"
This reverts commit 988e753c74.
2023-06-27 13:52:43 +01:00
Eric Allam 988e753c74 Try publishing to ECR using good ole fashioned aws credentials 2023-06-27 13:51:20 +01:00
Eric Allam aa49b2ca76 Do docker commands manually in publish.yml 2023-06-27 13:37:52 +01:00
Eric Allam fdcd2fdb27 Try removing logging in to the Github Container registry 2023-06-27 13:13:40 +01:00
Eric Allam 62f94206bb Fixed CLI showing undefined when not specifying a trigger-url flag 2023-06-27 13:00:06 +01:00
Eric Allam 7b6647cfd4 Fixed syntax error with publish.yml 2023-06-27 12:44:50 +01:00
Eric Allam 73828c5db7 Add a docker/login-action for logging into ECR 2023-06-27 12:36:03 +01:00
Eric Allam e1d942bb3a Add pnpm run db:studio command to open prisma studio 2023-06-27 11:27:31 +01:00
Eric Allam a764cf64b3 Remove docker hub container push and try to fix ECR 2023-06-27 11:20:16 +01:00
Eric Allam 018d51993a Need to login to ECR before pushing 2023-06-27 10:30:11 +01:00
Eric Allam 4ce51291de Try pushing to a private ECR registry 2023-06-27 09:56:34 +01:00
Eric Allam e0cd68787d Adding publishing docker images to a public ECR registry 2023-06-27 09:40:39 +01:00
James Ritchie 6601f4c505 Deleted empty old folders and files 2023-06-26 17:59:15 +01:00
James Ritchie 6f62f0e2f1 Updated docs links to the new docs URL 2023-06-26 16:53:56 +01:00
James Ritchie c00026e203 Fixed some issues with the developing readme guide 2023-06-26 16:43:55 +01:00
James Ritchie 38ac365953 Added a database .env example file 2023-06-26 16:40:30 +01:00
James Ritchie 7cfb0f7d2d Improvements to the readme, including better headings 2023-06-26 16:17:51 +01:00
James Ritchie bae194f366 Updated the README to include a development guide 2023-06-26 15:40:17 +01:00
Eric Allam 398d95528d Adding back in multiplatform support 2023-06-26 15:33:05 +01:00
Eric Allam d1b2ee5490 Remove multi-platform for now to test something 2023-06-26 15:20:22 +01:00
James Ritchie d39b9bc060 Made the default port 3030 2023-06-26 15:10:10 +01:00
James Ritchie 0c0b7d86ee Deleted old infisical files 2023-06-26 15:10:10 +01:00
Eric Allam 03c4d9504f Cleanup the docker compose services stuff 2023-06-26 15:09:31 +01:00
Eric Allam 0737bfc5fe Add QEMU for multi-arch builds 2023-06-26 14:45:21 +01:00
James Ritchie 80b4916094 docker .env links to root .env 2023-06-26 14:45:03 +01:00
James Ritchie 00845b43b4 Renamed the .example env file and added instructions for getting your Resend API 2023-06-26 14:31:27 +01:00
James Ritchie 83a74808d5 Added an example .env 2023-06-26 13:30:34 +01:00
Eric Allam 951679cc10 Fix pnpm i 2023-06-26 12:10:55 +01:00
D-K-P 3cd95f06b2 Added new companyicons 2023-06-26 11:54:15 +01:00
Eric Allam de00fa91ae Generate db client before typecheck 2023-06-26 11:53:31 +01:00
Eric Allam 25d4f0b347 Fixed CLI typescript errors 2023-06-26 11:49:01 +01:00
Eric Allam 413aa28594 Fixed typescript error 2023-06-26 11:45:50 +01:00
Eric Allam 29e153bc54 Fixed pnpm lock file OUTDATED 2023-06-26 11:42:35 +01:00
Eric Allam 7b1a2f60d0 Adding changesets workflow to automatically version/release package changes 2023-06-26 11:41:40 +01:00
Matt Aitken 2302626703 Added line highlighting to the API Key code samples 2023-06-26 11:18:26 +01:00
Matt Aitken 28b3193743 Docs links use the pathBuilder 2023-06-26 11:18:26 +01:00
Eric Allam 0fdf8d0f6a Another fix for the CI docker build caching 2023-06-26 11:17:09 +01:00
D-K-P 890c93a820 Added Resend 2023-06-26 11:16:35 +01:00
Eric Allam 3bfcde99dc Update LICENSE to Apache 2.0 2023-06-26 10:42:07 +01:00
Eric Allam d5a8d19b66 Trying to fix the cache 2023-06-26 10:18:39 +01:00
Eric Allam 7a3a9a6f7c CI: Docker improvements
- Multiple arches in the docker image
- Use the docker@metadata-action github action to create the tags and labels
- Push to Docker Hub and Github Container Repository
2023-06-24 10:15:52 +01:00
Eric Allam a816c52699 Update docs link 2023-06-23 17:32:10 +01:00
Eric Allam bdd3157a45 Merge branch 'main' into dev-q22023 2023-06-23 17:27:48 +01:00
Eric Allam 7337e75d1e Add link to the fly.io repo 2023-06-23 17:10:40 +01:00
Eric Allam b39f1694c3 Fixed the version of the @trigger.dev/nextjs package 2023-06-23 17:02:39 +01:00
Eric Allam b3a919293c Update the devDependency on nextjs to be more permissive 2023-06-23 16:59:55 +01:00
D-K-P 927eb1d0ba changed green to toxic 2023-06-23 15:27:07 +01:00
D-K-P b812c6d984 Updated gradient 2023-06-23 15:25:16 +01:00
Eric Allam 6a768c3f84 Create LICENSE 2023-06-23 15:11:00 +01:00
Eric Allam 83f4e65bc3 Remove license and update README 2023-06-23 15:08:37 +01:00
Eric Allam ad33abe6bc Use the REMIX_APP_PORT for the Remix app server port when developing locally 2023-06-23 14:53:41 +01:00
Eric Allam 2e1624235c Improved the CLI prompts 2023-06-23 14:41:58 +01:00
Eric Allam 647f09f2f3 Remove staging from flightcontrol.json and only deploy prod on pushes to v1 branch 2023-06-23 12:32:35 +01:00
Eric Allam d0ad2bd38b Fixed the init help text 2023-06-23 12:22:35 +01:00
Eric Allam 3ae4e11bbe Changeset: version 2023-06-23 12:20:20 +01:00
Eric Allam 6f19a3e750 Fix for the init CLI for next.js projects that use the src directory 2023-06-23 12:20:06 +01:00
Eric Allam e8442eedad Commenting these out for now because they break build 2023-06-23 11:59:30 +01:00
Eric Allam a606db25f6 Changeset: version 2023-06-23 11:41:11 +01:00
Eric Allam 82f715bab6 Removed cli package from todo-example 2023-06-23 11:40:53 +01:00
Eric Allam 28914b878c Adding the @trigger.dev/init CLI package 2023-06-23 11:40:26 +01:00
Eric Allam 3c2f1709cc Remove welcome email (need to add back in for cloud) 2023-06-22 22:57:09 +01:00
Eric Allam 40ffde33b6 Add isManagedCloud feature, remove sentry, and require custom oauth app on self-hosting 2023-06-22 22:48:57 +01:00
Eric Allam 8184c21a80 Build the oauth2 callback url from the server (and use env.APP_ORIGIN) 2023-06-22 21:54:01 +01:00
Eric Allam 5c13d0c2df Fixed pnpm lock file again 2023-06-22 21:37:09 +01:00
Eric Allam fd8fd22bdc Fixed https missing from url 2023-06-22 21:35:49 +01:00
Eric Allam 31d8669c9d Make github auth optional and better name the env vars 2023-06-22 17:42:51 +01:00
D-K-P 59e1fbf565 Removed import 2023-06-22 17:10:10 +01:00
D-K-P 80c9bb0317 Added new components to the to do page and lots of improvements 2023-06-22 17:09:42 +01:00
Matt Aitken 6c71bad8ef Update Job in app folder to use owner + repo 2023-06-22 17:08:10 +01:00
Eric Allam 0e82f6287a Try and fix the fly entrypoint issues 2023-06-22 16:54:14 +01:00
Matt Aitken 52aacc1e1d OpenAI: createEmbedding 2023-06-22 16:29:00 +01:00
Eric Allam 909b4a5432 More fly work 2023-06-22 16:26:55 +01:00
Matt Aitken b48b724c01 OpenAI: createImage 2023-06-22 16:12:02 +01:00
Matt Aitken 91ac1567d4 OpenAI: createEdit 2023-06-22 16:12:02 +01:00
Eric Allam c034035aba Working on deploying to fly 2023-06-22 16:09:08 +01:00
Matt Aitken cd852f9563 OpenAI: retrieveModel 2023-06-22 15:51:31 +01:00
Matt Aitken 010ac6e5b6 OpenAI tasks: createFineTune, listFineTunes, retrieveFineTune, cancelFineTune, listFineTuneEvents, deleteFineTune 2023-06-22 15:45:09 +01:00
Eric Allam 0a3cf46068 Try this for publishing public images 2023-06-22 15:17:27 +01:00
Matt Aitken 2bbeeb860d Fixed gitignore for tmp folders 2023-06-22 15:10:19 +01:00
Matt Aitken b74045fe55 Ignore tmp folders 2023-06-22 15:10:19 +01:00
Matt Aitken a940102d83 Max lines before scrolling on the task input is 35 lines 2023-06-22 15:10:19 +01:00
Matt Aitken 74e9d5eb3c New OpenAI tasks: listModels, createFile, listFiles, createFineTuneFile 2023-06-22 15:10:19 +01:00
Matt Aitken b256d66374 Subtasks should always be set to last=false so you get the line at the bottom 2023-06-22 15:10:19 +01:00
Matt Aitken 5b23e60b04 Created an OpenAI example file 2023-06-22 15:10:19 +01:00
Eric Allam 4cd71decbc Starting to build fly demo 2023-06-22 15:03:13 +01:00
Eric Allam 1ba372e2c3 Unbreak the build 2023-06-22 14:33:08 +01:00
Eric Allam d88f8c87f6 Don’t cancel in progress runs 2023-06-22 14:31:52 +01:00
D-K-P ff02ab2aa0 Updated pnpm 2023-06-22 14:29:33 +01:00
D-K-P 38c71bdb3b Added logo / to do icon and style updates 2023-06-22 14:29:33 +01:00
Eric Allam b68ce9695c Try and fix the cache-from cause of Adam 2023-06-22 14:28:15 +01:00
Eric Allam 0d3e7bd996 Use docker/build-push-action 2023-06-22 14:17:30 +01:00
Eric Allam 1e0acf4ce8 Add back in the build:server script to webapp 2023-06-22 14:05:47 +01:00
Eric Allam b9e8e084a8 chmod the wait-for-it script 2023-06-22 13:54:47 +01:00
Eric Allam 1701d4253d Remove prisma config in package.json 2023-06-22 13:53:46 +01:00
Eric Allam ff60b71321 Quiet npx output 2023-06-22 13:48:19 +01:00
Eric Allam f68439b936 Adopt buildjet for faster CI builds 2023-06-22 13:46:34 +01:00
D-K-P a3fe3944b7 Style updates 2023-06-22 13:37:03 +01:00
D-K-P 9cf44777e1 Added to do custom input 2023-06-22 13:37:03 +01:00
D-K-P 5206c2c971 Removed shadcn input 2023-06-22 13:37:03 +01:00
Eric Allam 294fd10304 Use pnpm 7.18 in the docker workflow 2023-06-22 13:36:00 +01:00
Eric Allam 32650f8b9a Fix lockfile 2023-06-22 13:34:27 +01:00
Eric Allam c5d96db9a8 WIP docker github workflow 2023-06-22 13:11:43 +01:00
D-K-P d04c66006b Updated companyicons package 2023-06-22 12:03:13 +01:00
Matt Aitken d43529dce9 Added some GitHub property helpers 2023-06-22 12:02:08 +01:00
Matt Aitken 5ba95f3cbc Link to the run trigger, so it’s selected 2023-06-22 12:02:08 +01:00
Matt Aitken 7381e5b393 GitHub addIssueAssignees and addIssueLabels 2023-06-22 12:02:08 +01:00
Eric Allam b62f00dfd7 Implemented seeding the cloud based on env vars 2023-06-22 12:00:18 +01:00
Matt Aitken 95787fcc66 Make the tasks user a separate owner and repo too 2023-06-22 10:49:50 +01:00
Matt Aitken 4ef76f72dc Separate GitHub repo into owner and repo, to match official SDK/API 2023-06-22 10:49:50 +01:00
Matt Aitken 939f33e791 Added scrolling to the Jobs menu (I have a ton) 2023-06-22 10:49:50 +01:00
D-K-P e15ade91d4 Added Trigger sync card and made lots of general improvements 2023-06-21 21:54:53 +01:00
Matt Aitken 0776cc884d Pull request review 2023-06-21 19:50:20 +01:00
Matt Aitken 0ad09eb11f Pull request event 2023-06-21 19:41:33 +01:00
Matt Aitken 9e8b37c6cf Added push event 2023-06-21 19:29:02 +01:00
Matt Aitken c2839934b4 Added branch and tag events 2023-06-21 19:04:14 +01:00
Matt Aitken e2e3c3a9b3 Latest lock file 2023-06-21 19:04:03 +01:00
Matt Aitken 9b3f4bc1a3 Next generates a weird .next/package.json when running, so need to restrict example workspaces 2023-06-21 19:03:53 +01:00
Matt Aitken cf9c34950f Show more of the comment body 2023-06-21 18:44:08 +01:00
Matt Aitken d4a2927279 Fix for integration-kit issues 2023-06-21 18:43:58 +01:00
Matt Aitken 56172b1e5c Star examples 2023-06-21 18:24:38 +01:00
Matt Aitken 7def5437fd Try and bundle up the integration-kit with the github package 2023-06-21 18:24:38 +01:00
D-K-P d21e364f11 Added trigger cards wip 2023-06-21 18:05:26 +01:00
D-K-P 7c6440fd9a Added cards / input / button / accordian and updated page 2023-06-21 18:05:04 +01:00
Matt Aitken 0b61207ecf Latest installs 2023-06-21 17:55:16 +01:00
Matt Aitken fff2f40924 Added issue commented example job 2023-06-21 17:55:16 +01:00
Matt Aitken 2166929fa8 Issue commented event, not working properly because of truncate function issue 2023-06-21 17:55:16 +01:00
Matt Aitken 5aa53da864 Next.js project using the latest eslint setup that Vercel recommend 2023-06-21 17:55:16 +01:00
Matt Aitken 21d7ff2f74 Added a function to truncate a string with an ellipsis 2023-06-21 17:55:16 +01:00
Eric Allam 8bba30e290 Initial Docker and docker compose setup 2023-06-21 17:07:17 +01:00
Eric Allam fd94a32b95 Removing a bunch of old stuff 2023-06-21 17:07:17 +01:00
Matt Aitken 25f9aa8c2d Started fleshing out GitHub events with examples and more events 2023-06-21 17:00:29 +01:00
Matt Aitken 172bb4527c Export the EventSpecificationExample type so it can be used in integrations 2023-06-21 17:00:15 +01:00
Matt Aitken 8ad769569c Spaced the properties out a bit vertically 2023-06-21 16:59:55 +01:00
Matt Aitken 32eba22628 Remove old oauth files 2023-06-21 16:59:32 +01:00
Matt Aitken 8d4179b5df Improved the coming soon billing description 2023-06-21 14:49:20 +01:00
Matt Aitken b7385825b6 Added missing auth param to GitHub integration 2023-06-21 14:11:52 +01:00
Matt Aitken 5a20528cc8 @trigger.dev/github package now uses integration-kit 2023-06-21 14:02:16 +01:00
Matt Aitken 324cf161ec Added @trigger.dev/integration-kit package 2023-06-21 14:02:16 +01:00
D-K-P 9f84e77f57 Replaced the fire icon with the td triangle on the integrations page 2023-06-21 13:56:11 +01:00
Matt Aitken beaf0a9ecb Coming soon is now nicer 2023-06-21 13:09:46 +01:00
Matt Aitken fb308e8038 Sent a notification when the feedback form is submitted, even if that custoemr is already active 2023-06-21 13:04:38 +01:00
Matt Aitken d2d15dae9f Added coming soon pages 2023-06-21 13:04:26 +01:00
Matt Aitken 977f064157 Added “background” icon 2023-06-21 10:53:46 +01:00
Matt Aitken 8d23dd0186 Set the user id in Plain 2023-06-21 10:53:41 +01:00
Matt Aitken 90ae06df2a Improved the feedback form 2023-06-21 10:33:01 +01:00
D-K-P 2cf253a914 Added new integrations / icons 2023-06-21 10:18:59 +01:00
D-K-P 9e462cc329 Minor updates 2023-06-21 10:17:59 +01:00
Matt Aitken 36ae8910b6 Added the help type 2023-06-20 22:45:09 +01:00
Matt Aitken fe0ed0bc9a The Plain feedback form is working 2023-06-20 22:43:33 +01:00
Matt Aitken ec738515b7 Initial work on feedback form 2023-06-20 22:21:36 +01:00
Matt Aitken 287b6c6bc7 Remove user agent/platform logging 2023-06-20 21:04:09 +01:00
Matt Aitken aad93b9147 Updated the replacement data format 2023-06-20 20:15:47 +01:00
Matt Aitken 31176245bd Changed the format slightly, added timestamps as further examples 2023-06-20 20:15:39 +01:00
Matt Aitken da45c7e2b9 Added support for replacements in examples, added __CURRENT_DATE__ to start 2023-06-20 20:11:06 +01:00
Matt Aitken 3c73cb3fed Example payloads are now any so we can do replacements 2023-06-20 20:10:34 +01:00
Matt Aitken 275d01421e Improved Windows shortcut modifier display 2023-06-20 17:51:19 +01:00
Matt Aitken 75edfccc31 Shortcut keys are working 2023-06-20 17:45:24 +01:00
Matt Aitken 1d230d9fed Nicely formatted shortcut in buttons 2023-06-20 15:17:29 +01:00
Matt Aitken 7d87dbf2ed Updated packages 2023-06-20 14:48:10 +01:00
Matt Aitken 44467331a2 Improved the ShortcutKey display 2023-06-20 14:47:47 +01:00
Matt Aitken 29cbfd4fb3 Use ClipboardField for Integration package installation 2023-06-20 13:48:34 +01:00
Matt Aitken d946408105 Integration sheet: show “View docs” button and the description 2023-06-20 13:48:21 +01:00
Matt Aitken 6101372ba8 Added OpenAI integration 2023-06-20 13:48:04 +01:00
Matt Aitken 4993860a18 Added optional description to an integration 2023-06-20 13:47:56 +01:00
Matt Aitken 5e29119e83 You can now only show integrations in the integrations list 2023-06-20 13:38:54 +01:00
Matt Aitken fe14664cfd Moved the logo-icon to be in alphabetical order 2023-06-20 13:38:54 +01:00
Matt Aitken f871817a2f Use geometricPrecision on Company icon svgs 2023-06-20 13:38:54 +01:00
Matt Aitken 6ccacaa92e Switch labels now supported and more complete styling 2023-06-20 13:38:54 +01:00
D-K-P 24e0f04aca Updated pnpm-lock file 2023-06-20 13:34:32 +01:00
D-K-P f878d499a7 Added ToDoRow component 2023-06-20 13:34:02 +01:00
D-K-P c24cd1c02b Added HeroIcons 2023-06-20 13:34:01 +01:00
D-K-P c6028fca44 Updated Paragraph and TextStyling 2023-06-20 13:33:45 +01:00
Matt Aitken 25daa5b358 Added Switch component with small and large variants 2023-06-20 12:20:03 +01:00
Matt Aitken 0503a2a517 Moved ClipboardField into primities 2023-06-20 12:04:49 +01:00
Matt Aitken 28fd3d9b18 Fix for re-runs linking to the incorrect detail panels 2023-06-20 12:00:17 +01:00
Matt Aitken 1a9af1dee4 Fix for Retry table not having key and header row 2023-06-20 11:55:28 +01:00
Matt Aitken ce27de1af6 Removed todo that has been done 2023-06-20 11:55:16 +01:00
Matt Aitken c9d5334a38 Improved the style of the “Rerun job” popover 2023-06-20 11:51:03 +01:00
Matt Aitken bd20b7b8e0 Show the event name in the Run Trigger cell on the left 2023-06-20 11:39:44 +01:00
Matt Aitken 52f40c8c26 Only show the retries table if there was > 1 2023-06-20 11:33:05 +01:00
Matt Aitken 622dd6aba4 Show a table of Task retries if there were some 2023-06-20 11:30:07 +01:00
Matt Aitken 969a6a1f2c Fix for the final retry 2023-06-20 11:29:51 +01:00
Matt Aitken 08eab9622d Improved the webhook instruction text 2023-06-20 10:41:37 +01:00
Matt Aitken 107960b67c Endpoint sheet shows the webhook URL 2023-06-20 10:40:01 +01:00
Matt Aitken b394f5e43f ClipboardField works when full width, has scrolling if the content is too large 2023-06-20 10:39:43 +01:00
Matt Aitken 4d71a5c9d4 Refreshing endpoints is working 2023-06-20 10:26:35 +01:00
Matt Aitken 59e2216861 Streaming working for the endpoint sheet 2023-06-20 10:26:35 +01:00
Matt Aitken 2fba5da04e sse function makes it much easier to do ServerSentEvents 2023-06-20 10:26:35 +01:00
Matt Aitken efbe2ddbf7 The AbortController approach causes the stream endpoint to be called all the time 2023-06-20 10:26:35 +01:00
Matt Aitken 7f353723eb Improved the environments form/page 2023-06-20 10:26:35 +01:00
Matt Aitken a94d50f3cd Made the sheet wider 2023-06-20 10:26:35 +01:00
Eric Allam ae66e6f01a Run pnpm i 2023-06-19 17:22:53 +01:00
Eric Allam e4b0b1e305 Add support for background task operations, starting with fetch 2023-06-19 17:22:18 +01:00
D-K-P 65ca2560fc Started adding the first col to the page 2023-06-19 17:19:16 +01:00
D-K-P bdbf04efe9 Added clsx / tailwind-merge to the package.json 2023-06-19 17:18:55 +01:00
D-K-P 4b56671d2d Added tailwind config / clsx / tailwind-merge 2023-06-19 17:18:35 +01:00
D-K-P f2b190b21a Replaced to-do folder with a blank nextjs project 2023-06-19 16:38:30 +01:00
D-K-P 4f5cf931be Duplicated the nextjs example folder for the to-do app 2023-06-19 15:28:03 +01:00
D-K-P 68beefdaf2 Added new integration logos and upped the companyicons package number 2023-06-19 15:05:15 +01:00
Matt Aitken 4a52fd2edc Added errors in the form if creating the endpoint fails 2023-06-19 12:17:58 +01:00
Matt Aitken 47fdfb344d Progress displaying endpoints and editing them 2023-06-19 11:48:33 +01:00
Matt Aitken ebbbc85d7b Added a success Callout variant 2023-06-19 11:48:14 +01:00
Matt Aitken 22ff2c36d9 Open a sheet when you click a row 2023-06-16 19:33:40 +01:00
Matt Aitken 5db2a1bb84 Improved the spacing 2023-06-16 19:19:10 +01:00
Matt Aitken 8a4ae0df20 WIP on the Environment clients 2023-06-16 19:17:30 +01:00
Matt Aitken 80c3e48f5c Tables can now have onClick events 2023-06-16 19:17:11 +01:00
Matt Aitken a7244032e4 Updated the variant for the CLipboardField 2023-06-16 16:37:50 +01:00
Matt Aitken 7fc3ff26bc Rejigged database migrate deploy scripts 2023-06-16 16:30:35 +01:00
Matt Aitken 0648d230fc WIP on environment page 2023-06-16 16:30:35 +01:00
Matt Aitken 2626608200 Renamed “Environments” to “Environments & API Keys” 2023-06-16 16:30:35 +01:00
Matt Aitken 081ef45047 Deleted org environment page, they are at the Project level 2023-06-16 16:30:35 +01:00
James Ritchie 9aa9ebc23f Minor tweak to the button min width 2023-06-16 16:26:58 +01:00
James Ritchie f664a10024 Final style improvements for the clipboard component 2023-06-16 16:22:33 +01:00
James Ritchie 52beb2f012 Removed borders on the icon 2023-06-16 16:14:03 +01:00
James Ritchie 149e3c2d84 Style updates and you can now click the icon to focus the field 2023-06-16 16:06:50 +01:00
James Ritchie 223965757c Making the clipboard component work with icons and larger sizes 2023-06-16 15:04:03 +01:00
James Ritchie 27c1d2516b More variants to the clipboard field 2023-06-16 15:04:03 +01:00
James Ritchie 014a97fcdc improved the env labels 2023-06-16 15:04:03 +01:00
James Ritchie eb85cc5c14 Adding new variants to the clipboard component 2023-06-16 15:04:03 +01:00
James Ritchie b1d49d71ea Removed import 2023-06-16 15:04:03 +01:00
James Ritchie 9a0a6305e7 Added a clipboard field story 2023-06-16 15:04:03 +01:00
James Ritchie a218bce73b Added prisma migrate deploy to package 2023-06-16 15:04:03 +01:00
Eric Allam c94ca54aff Add chat completion task 2023-06-16 15:02:24 +01:00
Eric Allam 2e8cd805fd Fixed for the new integrations stuff 2023-06-16 14:49:52 +01:00
Eric Allam 1a9bb4ddc5 Fix for seeds 2023-06-16 14:49:37 +01:00
Eric Allam e7f7c0704a Revamped the integration schema and local only integrations now work in the UI 2023-06-16 14:15:17 +01:00
Matt Aitken b5e0fb0e97 Tightened up the API grid 2023-06-16 11:53:13 +01:00
Matt Aitken f555989a5c Added a full stop 2023-06-16 11:53:03 +01:00
Matt Aitken 2e0ea4520c Updated to the latest @trigger.dev/companyicons package 2023-06-16 11:41:38 +01:00
Matt Aitken 31a9164df1 Added API integration voting functionality 2023-06-16 11:32:38 +01:00
Matt Aitken b363a1e60d Remove coming soon message from the OAuth form 2023-06-16 11:32:26 +01:00
Matt Aitken e5714f9047 Call them APIs in the list 2023-06-16 11:32:13 +01:00
Matt Aitken e9b9c77edc Added a NoIntegrationSheet 2023-06-16 10:10:06 +01:00
Matt Aitken acd49994bd WIP on showing APIs we don’t yet have an integration for 2023-06-15 17:38:56 +01:00
Matt Aitken 5264674cda Improved the spacing of the LabelValueStack 2023-06-15 17:22:49 +01:00
Matt Aitken 2825925781 Removed a ton of unused imports 2023-06-15 17:22:38 +01:00
Matt Aitken 083bd7f1cf Limit the height of the run output in the left-hand column 2023-06-15 17:03:57 +01:00
Matt Aitken 3f90fe04b4 The OAuth form is back and a coming soon for end-user OAuth 2023-06-15 17:03:57 +01:00
Matt Aitken a63a247b22 The flow is now roughly setup 2023-06-15 17:03:57 +01:00
Matt Aitken 7bb589b8f7 Multiple samples for API Keys 2023-06-15 17:03:57 +01:00
Matt Aitken 7c94ea3ec5 Added CustomHelp 2023-06-15 17:03:57 +01:00
Matt Aitken 5789ae3c73 Sheet scrolling should now work properly… painful 2023-06-15 17:03:57 +01:00
Matt Aitken 95fad3deb8 API auth help 2023-06-15 17:03:57 +01:00
Matt Aitken 2b5b8d7931 Added Paragraph spacing 2023-06-15 17:03:57 +01:00
Matt Aitken 96e0fb81ae Updated packages 2023-06-15 17:03:57 +01:00
Matt Aitken e5a568f510 Improved the radio button styling 2023-06-15 17:03:57 +01:00
Matt Aitken 8cb3155ea6 WIP on new integration flow 2023-06-15 17:03:57 +01:00
Matt Aitken 52c5d93449 Added a RadioGroup component with the same variants as Checkbox 2023-06-15 17:03:57 +01:00
Matt Aitken 5e3502f589 Removed badge prop from Checkbox (it had badges already) 2023-06-15 17:03:56 +01:00
Matt Aitken f1fd36d3a1 Checkbox description style doesn’t use mono font 2023-06-15 17:03:56 +01:00
Eric Allam 9f49b7f4c0 Move prisma to an internal database package 2023-06-15 14:18:34 +01:00
Eric Allam eca89e538b Convert to useTypedRouteLoaderData and improve the hydrateDates function 2023-06-14 21:53:04 +01:00
Eric Allam bbac63e162 Use /trigger to select the trigger details pane, and no longer redirecting when you land on the run page (can just link directly to /trigger if we want to) 2023-06-14 21:42:39 +01:00
Eric Allam ed3123470a Replaced manual hydration with using remix-typedjson (fixes error on run page) 2023-06-14 18:04:28 +01:00
Eric Allam 170bda3158 Only show the retry job button when status is failed 2023-06-14 17:09:19 +01:00
Eric Allam b5a8eec650 Implement the continue run service 2023-06-14 17:03:15 +01:00
Eric Allam 817b4ed133 Endpoint registration and indexing now is only initiated outside of clients 2023-06-14 16:07:10 +01:00
Matt Aitken e4837cea9d Run left-hand scrollbar now positioned better 2023-06-14 15:48:06 +01:00
Matt Aitken e1cdeb284f Created the ContinueRunService for Eric to implement 2023-06-14 14:18:28 +01:00
Matt Aitken f195933cb6 Rerunning from scratch is working 2023-06-14 14:16:44 +01:00
Matt Aitken 6e1d91b413 Moved the ReRunPopover to a component to make the page easier to work with 2023-06-14 12:47:52 +01:00
Matt Aitken d4e39de67e WIP on Rerun/continue functionality 2023-06-14 12:46:17 +01:00
Matt Aitken 4903cfc689 Don’t let Callout icons shrink when the space is small 2023-06-14 12:45:56 +01:00
Matt Aitken 54a8e26c7c Organized imports 2023-06-14 12:02:17 +01:00
Matt Aitken 4cc9006c8e Added test help panel. Defaults open if there haven’t been any test runs yet 2023-06-14 12:00:43 +01:00
Matt Aitken bc6492b1c4 Improved the test layout so the examples are more obvious 2023-06-14 11:52:11 +01:00
Matt Aitken afd05f93fc Tried to improve the environment label but it’s a bit fooked 2023-06-14 11:52:11 +01:00
Matt Aitken e83f5e7cca Fix for DynamicTriggerIcon non camelCase attributes 2023-06-14 11:52:11 +01:00
Matt Aitken 7b8e02023e Default icon for an example is the beaker 2023-06-14 11:52:11 +01:00
Matt Aitken 3882f531cf Environment is now in the rounded rectangle so it’s consistent 2023-06-14 11:52:11 +01:00
Matt Aitken 0ce58b5c0f Better spacing for PageHeader buttons 2023-06-14 11:52:11 +01:00
Eric Allam f36a1c60f4 Changeset: version nextjs 2023-06-14 09:55:02 +01:00
Eric Allam 98fcc5d2d4 Make sure nextjs app routes have the correct types 2023-06-14 09:55:02 +01:00
Matt Aitken 6ff2ee23f8 Hide the test button if you’re on the /test page 2023-06-14 09:15:19 +01:00
Matt Aitken e1405b140f Better test layout 2023-06-14 09:13:15 +01:00
Matt Aitken 04ab709ddd Better test styling 2023-06-14 09:09:43 +01:00
Eric Allam 0736c68d77 Fixed duplicate export issue 2023-06-14 08:08:52 +01:00
Eric Allam 34ccf345cd Changeset version: implement task errors and retrying 2023-06-14 08:07:19 +01:00
Matt Aitken 605a38d8ab Trying to make a good layout for the test page 2023-06-13 18:16:07 +01:00
Matt Aitken c9fd8ccae2 Running tests is working 2023-06-13 16:33:42 +01:00
Matt Aitken 43482b1b96 Get some errors if you’ve used invalid JSON 2023-06-13 15:52:58 +01:00
Matt Aitken 81912b2530 Test page is working with a ref 2023-06-13 15:52:58 +01:00
Matt Aitken 2db2e7a369 First version of the Test page with example and environment selection 2023-06-13 15:52:58 +01:00
Eric Allam 3589d26fb3 Implement task retrying to recording task attempts 2023-06-13 15:48:07 +01:00
Matt Aitken e5282fb264 Get the example data for the test page 2023-06-13 11:48:39 +01:00
Matt Aitken 61fddbb8af Added name and icon to the EventExamples 2023-06-13 11:48:27 +01:00
Matt Aitken e141aa3ff4 Added an GitHub Issue opened example 2023-06-13 10:57:06 +01:00
Matt Aitken 2fa1536315 EventExamples are now in a separate table (upserted on job register) 2023-06-13 10:56:57 +01:00
Matt Aitken 5607dcfae9 Created useFilterJobs which also searches the job slug 2023-06-13 10:11:34 +01:00
Eric Allam bd103802f9 Better logging of errors so we can debug delivery issues to hosts 2023-06-12 21:11:44 +01:00
Matt Aitken 0cbf427a58 Added “Test” to the breadcrumb 2023-06-12 18:18:23 +01:00
Matt Aitken e53cd477f9 Added a dynamic property to the Job page header 2023-06-12 18:15:45 +01:00
Matt Aitken df61f29a02 Added Dynamic markers to the jobs table 2023-06-12 18:12:52 +01:00
Matt Aitken feda01ab3b Don’t count internal or other project jobs in the integration table 2023-06-12 16:28:42 +01:00
Matt Aitken fb2684c0b3 Added the placeholder for help using an integration 2023-06-12 16:19:52 +01:00
Matt Aitken 89e4b80e65 Added integration breadcrumbs 2023-06-12 16:12:07 +01:00
Matt Aitken d55fe2d100 Added scopes page 2023-06-12 15:59:34 +01:00
Matt Aitken 49a510aaf9 Client Connections page is working 2023-06-12 15:34:51 +01:00
Matt Aitken 16a5504a32 Connection client jobs page 2023-06-12 14:47:47 +01:00
Matt Aitken b720c27c2a Show the slug in a ClipboardField 2023-06-12 14:12:51 +01:00
Matt Aitken cad3453e32 Created the ClipboardField 2023-06-12 14:05:38 +01:00
Matt Aitken afe0a8a159 Run page streaming runs just once if run is completed 2023-06-12 12:04:36 +01:00
Matt Aitken 2487e815a3 Use zod for integration client page params parsing 2023-06-12 12:04:36 +01:00
Eric Allam 771348dd5e Handle task errors and update the task status and add errors to the task output 2023-06-12 09:31:47 +01:00
Matt Aitken 1f76e1228a Added connection client Jobs table 2023-06-12 09:26:15 +01:00
Eric Allam fe782e5ff8 Scope finding projects and runs by the project and org 2023-06-09 21:14:40 +01:00
Eric Allam b4167a38f2 Fixed the event trigger name 2023-06-09 21:14:15 +01:00
Matt Aitken 61459a197f Started working on the Integration client page 2023-06-09 19:23:53 +01:00
Matt Aitken 30b6cc646a Improved the integrations page layout 2023-06-09 17:53:02 +01:00
Matt Aitken df95d4e29f Changed to using the job slug in the urls 2023-06-09 17:26:52 +01:00
Eric Allam 5090b64e57 Store the graphile job ID on the executions to be able to fast-forward delayed tasks 2023-06-09 16:56:45 +01:00
Matt Aitken 12d188d85a When accepting an invite it creates the RuntimeEnvironment for each project 2023-06-09 16:51:26 +01:00
Matt Aitken ab3e45d933 Import tidying 2023-06-09 16:40:47 +01:00
Matt Aitken 8c979cabd7 Added the realtime duration to the detail panel 2023-06-09 16:39:15 +01:00
Matt Aitken a617922c1d Handles closing out the realtime connection better 2023-06-09 16:37:18 +01:00
Matt Aitken fec7cd65a7 The Run page now live updates 2023-06-09 16:21:36 +01:00
Matt Aitken 10cfdb2fa2 Tweaked the countdown 2023-06-09 16:21:36 +01:00
Eric Allam 43a62d8bec Always create environments when creating a project 2023-06-09 15:40:18 +01:00
Matt Aitken 7b32b7ecd6 Delays display well now with countdowns 2023-06-09 15:25:34 +01:00
Eric Allam 2fcd166d32 Upgrade nextjs package to not require a specific next version 2023-06-09 14:42:50 +01:00
Eric Allam d8c673157b Changset: versions 2023-06-09 14:42:50 +01:00
Eric Allam 99316df879 Adding changeset for v2 2023-06-09 14:42:50 +01:00
Matt Aitken 5a4fa3d2b3 Return data from schedule job 2 2023-06-09 12:11:38 +01:00
Matt Aitken 71ececd7ce Added completed detail panel, improved panels 2023-06-09 12:09:28 +01:00
Matt Aitken 74519c08f0 Task errors are now parsed and displayed using the error component 2023-06-09 11:42:15 +01:00
Matt Aitken a85f19e016 The schedule job throws a task error 2023-06-09 11:41:58 +01:00
Matt Aitken cfe887341d Latest lockfile from running pnpm i 2023-06-09 11:22:07 +01:00
Matt Aitken eab17c3467 Added a state when there are no tasks 2023-06-09 11:20:15 +01:00
Matt Aitken 87c598627f Added a TaskCardSkeleton, it needs making good 2023-06-09 11:20:15 +01:00
Matt Aitken 30dc840144 Export the RunBasicStatus 2023-06-09 11:20:15 +01:00
Matt Aitken dd0e2d0bd2 Improved the run output 2023-06-09 11:20:15 +01:00
Eric Allam bf0da9ccff More renaming element to property 2023-06-09 11:08:21 +01:00
Eric Allam f430bcf54a Renamed elements to properties 2023-06-09 11:04:22 +01:00
Eric Allam ec4ef9ab7e Cleanup zodWorker a bit 2023-06-09 10:39:33 +01:00
Matt Aitken d01432e742 Added basic info to the completed panel 2023-06-09 10:24:15 +01:00
Matt Aitken cbb3e17e5d Added RunPanelError. Added Run complete panel with error 2023-06-09 10:10:57 +01:00
Matt Aitken 618bc927e9 Export ErrorWIthStack type 2023-06-09 10:10:57 +01:00
Matt Aitken 047c4f4baa Improved Callout 2023-06-09 10:10:57 +01:00
Eric Allam 3aea158edc Turn off bodyParser for realz 2023-06-08 17:29:06 +01:00
Eric Allam ed3b93493d Improved nextjs function names 2023-06-08 17:17:36 +01:00
Eric Allam 410efe1192 Implement @trigger.dev/nextjs package and make it work with the Next.js 13 app dir 2023-06-08 17:15:05 +01:00
Matt Aitken 58473f1cce Added properties to the event detail 2023-06-08 16:07:41 +01:00
Matt Aitken 399c9df1f3 Fix for LabelValue value just saying “value” if it didn’t have a link… 2023-06-08 16:07:32 +01:00
Matt Aitken cdfb2d1263 Added an external link icon and show the url on hover 2023-06-08 16:03:02 +01:00
Matt Aitken 9073a60ce6 Added links to properties with underline 2023-06-08 15:53:01 +01:00
Matt Aitken e9295bee2e Added a code comment explaining a redirect 2023-06-08 15:34:53 +01:00
Matt Aitken d1321106c2 Added description and improved no params for DetailView 2023-06-08 15:34:44 +01:00
Matt Aitken 8d2dec28e8 The run detail column is now a separate outlet with event and task routes 2023-06-08 15:09:08 +01:00
Matt Aitken ea426965de Remove date-fns, not being used 2023-06-08 14:20:48 +01:00
Matt Aitken 86dfeae727 Styled the subtasks and added a very simple animation 2023-06-08 00:26:58 +01:00
Matt Aitken 861cd6acee Use accurate times in the detail view 2023-06-08 00:08:43 +01:00
Matt Aitken e9055f0914 Selection is working with subtasks 2023-06-08 00:04:40 +01:00
Matt Aitken 9e4ada241c Recursive task cards are now working 2023-06-07 23:58:39 +01:00
Matt Aitken b13fc5cfe8 Added lots of subtasks to the 60s CRON job 2023-06-07 19:53:27 +01:00
Matt Aitken 35641e3af6 Added parentId and filter by it at the top-level 2023-06-07 19:53:10 +01:00
Matt Aitken df86706199 Moved TaskCard to a separate file to make it easier to work on the subtasks 2023-06-07 19:53:01 +01:00
Matt Aitken 1f3251ceea “Event name” not jiust “Name” 2023-06-07 19:03:28 +01:00
Matt Aitken a1917da1b1 Use the id logo for the Trigger name 2023-06-07 19:03:01 +01:00
Matt Aitken e9208bdeaa The trigger should be selected on page load 2023-06-07 19:02:37 +01:00
Matt Aitken 9ad86e6a62 Added the Run detail view for Triggers 2023-06-07 18:59:45 +01:00
Matt Aitken a9bcb00d8b Added new JobRunStatus cases to switches 2023-06-07 16:55:30 +01:00
Matt Aitken 1a0b2aeee1 Added Trigger elements 2023-06-07 16:51:49 +01:00
Matt Aitken 7d45996bf1 Updated Job to a new repo/id 2023-06-07 16:46:41 +01:00
Matt Aitken 594d7f94a2 Added the id icon 2023-06-07 16:40:21 +01:00
Matt Aitken 5252da6abb Merge the run and version elements 2023-06-07 16:40:16 +01:00
Matt Aitken 4fa3b2161f Display the Trigger elements 2023-06-07 16:40:01 +01:00
Matt Aitken 87732f25ba Added the Job id to the header 2023-06-07 16:39:33 +01:00
Matt Aitken a4a0958ba4 Allow a ReactNode to be used in a PopoverMenuItem 2023-06-07 16:22:51 +01:00
Matt Aitken e2c8b82ed2 Job menu now has the slug as well as the Job title 2023-06-07 16:22:38 +01:00
Matt Aitken 8f060f6868 Allow any string for popover and button icons 2023-06-07 16:07:02 +01:00
Matt Aitken 6ae783c03e Fix for the company icon collapsing to 0x0 pixels 2023-06-07 16:06:46 +01:00
Matt Aitken ed1d9d88de Added a created at column to the Runs table 2023-06-07 16:06:34 +01:00
Matt Aitken f6565eb8ea Removed blank line 2023-06-07 15:08:40 +01:00
Matt Aitken a47cdb5a15 Improved the filtered empty state for the Jobs table 2023-06-07 15:01:07 +01:00
Matt Aitken 6d45c9966e Deleted old png icons 2023-06-07 14:48:42 +01:00
Matt Aitken 77753aa5d7 Use @trigger.dev/companyicons for API icons 2023-06-07 14:48:38 +01:00
Matt Aitken 9e00992387 Jobs are now shown in a table 2023-06-07 14:33:53 +01:00
Eric Allam 2ef99d8383 Re-architect pre-processing and executing jobs, and gather run elements 2023-06-07 13:12:02 +01:00
Matt Aitken a03912b804 Added minimal styling for tasks 2023-06-06 18:19:31 +01:00
Matt Aitken d0ffedfef7 If a task succeeeded don’t show the tick 2023-06-06 17:59:58 +01:00
Matt Aitken d68f093c90 Tidied up imports 2023-06-06 17:59:45 +01:00
Matt Aitken 2fc948de76 Added log icon 2023-06-06 17:59:37 +01:00
Matt Aitken 1dc4783459 Moved the task.connection to the presenter 2023-06-06 17:40:09 +01:00
Matt Aitken 18a22001bd Job filtering now uses the filter hook too 2023-06-06 17:33:14 +01:00
Matt Aitken 1e4bf3043c Use the Filter hook for scope filtering 2023-06-06 17:30:29 +01:00
Matt Aitken ad48f9bb19 slate-1000 and slate-950 replaced with midnight-900 and midnight-850 2023-06-06 17:25:14 +01:00
Matt Aitken 0349f949c4 Improved the connection filtering 2023-06-06 16:50:33 +01:00
Matt Aitken 9b2f741df0 Added text filtering and improved the integrations page 2023-06-06 16:48:35 +01:00
Matt Aitken 0da4b43d25 Created reusable useTextFilter hook 2023-06-06 16:48:25 +01:00
Matt Aitken c8f46ed760 Fix for Tailwind config and missing slate[1000]s 2023-06-06 16:48:07 +01:00
Matt Aitken fb036e0712 Table of connected integrations 2023-06-06 15:59:53 +01:00
Matt Aitken ed966f0d18 The table now correctly scrolls horizontally if its parent is constrained and has overflow on it 2023-06-06 15:59:53 +01:00
James Ritchie 05c4076a5f A new midnight color palette for the app 2023-06-06 14:22:49 +01:00
Matt Aitken ac054705a1 Added TableCellChevron and the ability to hide a header cell label 2023-06-06 14:16:43 +01:00
Matt Aitken ab66372ebc Improved the run table blank state 2023-06-06 14:07:31 +01:00
Matt Aitken 2ff093e0ff Use smaller icons for the callout, they look a lot clearer 2023-06-06 14:07:31 +01:00
D-K-P 3a13a22f8a Updated the readme 2023-06-06 14:05:29 +01:00
Matt Aitken 24d2739480 Added loading state to the runs table 2023-06-06 13:16:52 +01:00
Matt Aitken 7f15cee11a RunsTable now uses the Table primitives 2023-06-06 12:55:45 +01:00
Matt Aitken c389fdce04 Initial work on reusable Table components 2023-06-06 12:48:22 +01:00
Matt Aitken e87d926a5a Created a presenter for the integrations page, updated the Integrations page to use it 2023-06-06 11:22:50 +01:00
Matt Aitken 0bbbc91e53 Removed getAllClients() from APIAuthenticationRepository 2023-06-06 11:22:33 +01:00
Matt Aitken d0edb4489c Custom Custom OAuth clients are working 2023-06-06 10:32:46 +01:00
Matt Aitken 4bff8b98db More work on the custom client id/secret 2023-06-05 19:15:33 +01:00
Matt Aitken 03d832ddc1 WIP on custom OAuth client 2023-06-05 19:15:33 +01:00
Matt Aitken ab01ef855b Started adding the extra fields for connections 2023-06-05 19:15:33 +01:00
Matt Aitken 9e2b2d3b42 Export the ApiConnectionType type 2023-06-05 19:15:33 +01:00
Matt Aitken ce749a0f11 Added validation to the custom OAuth app 2023-06-05 19:15:33 +01:00
Eric Allam d0e52f6186 Added style to tasks and made logs and wait minimal 2023-06-05 17:14:17 +01:00
Eric Allam 6cc5808139 Link the task to the RunConnection instead of storing the connection key 2023-06-05 17:03:37 +01:00
Eric Allam 8a2cd974fd Remove comboTrigger and add elements to JobVersion 2023-06-05 16:43:32 +01:00
Eric Allam 8e189cbf2b Rename sendEvent to sendCustomEvent and don’t use private class fields in IO because Proxy breaks 2023-06-05 14:26:03 +01:00
Matt Aitken 83b7eb8163 Created Callout component and added Storybook 2023-06-05 14:17:29 +01:00
Matt Aitken eb8350647e APIConnectionClient: added clientType and renamed credentialsReference 2023-06-05 13:35:25 +01:00
Matt Aitken 69e0f43326 The duration is calculated from the start and completed time 2023-06-05 12:05:11 +01:00
Matt Aitken 7c81259d76 Removed unused Slack scope annotations 2023-06-05 12:04:07 +01:00
Matt Aitken b1868a7e62 Removed color from the scope annotation type 2023-06-02 17:38:39 +01:00
Matt Aitken 63156f5140 Removed unnecessary tags on the Slack scopes 2023-06-02 17:36:20 +01:00
Matt Aitken 40bf79a5a2 Removed BasicConnectButton 2023-06-02 17:33:43 +01:00
James Ritchie 621350e0fc Improved the org and account page and added a logout button 2023-06-02 17:31:51 +01:00
James Ritchie b698da85d1 Badge doesn’t wrap 2023-06-02 17:31:51 +01:00
James Ritchie 36c1b30910 Added a the boxshadow colours from the marketing site 2023-06-02 17:31:51 +01:00
James Ritchie c6b208b577 Cleaned up imports 2023-06-02 17:31:51 +01:00
James Ritchie 6940e8c9c1 Small tweak to the login magic link form 2023-06-02 17:31:51 +01:00
James Ritchie 575875e807 Layout mprovements to the login 2023-06-02 17:31:51 +01:00
Matt Aitken 158504b5c9 Better error when there are no aliases in a job 2023-06-02 17:21:51 +01:00
Matt Aitken 611505d43c Prevent environments from getting deleted when team members leave 2023-06-02 17:21:20 +01:00
Matt Aitken 244efd2ae3 Prevent environments from getting deleted when team members leave 2023-06-02 17:21:02 +01:00
Matt Aitken 7cd2fae578 Fix the import of OAuthConnectSheet 2023-06-02 16:50:54 +01:00
Matt Aitken 6fa22bb7e4 Improved the error display a lot 2023-06-02 16:50:28 +01:00
Matt Aitken d0c04275f6 Renamed ConnectButton to OAuthConnectSheet 2023-06-02 16:04:14 +01:00
Matt Aitken d62eaa2e30 Check for already taken emails on the account form 2023-06-02 15:43:25 +01:00
Matt Aitken 09a40b8d36 Trimmed imports 2023-06-02 15:43:14 +01:00
Matt Aitken 9eb194bac2 Fix for incorrect message 2023-06-02 15:30:47 +01:00
Matt Aitken 1113cac7ff Confirming details prevents you from submitting an already taken email address 2023-06-02 15:29:17 +01:00
Matt Aitken 769068e93c Remove log 2023-06-02 15:29:17 +01:00
James Ritchie 881689e497 Minor fix on the login page 2023-06-02 15:01:17 +01:00
James Ritchie 1af6530888 Improvements to the magic email login page layout 2023-06-02 15:01:17 +01:00
Matt Aitken 003fa52793 Set confirmed basic details to true 2023-06-02 14:59:46 +01:00
Matt Aitken a54552c451 FormTitle can have a component icon 2023-06-02 14:58:31 +01:00
Matt Aitken 26c3a84bfd Added some named icons 2023-06-02 14:58:31 +01:00
Matt Aitken be3c060f38 Can update user with optional marketing email field 2023-06-02 14:58:31 +01:00
Matt Aitken 435f67c5ab Confirming details works 2023-06-02 14:58:31 +01:00
Matt Aitken 1ea3f3d755 Added a special big of magic 2023-06-02 14:58:31 +01:00
Matt Aitken 8a2dde52f8 Invite toasts display until closed 2023-06-02 14:58:31 +01:00
Matt Aitken 7622f48c00 WIP on user basic details 2023-06-02 14:58:31 +01:00
Matt Aitken 4876d76a49 Toast now has an option to display until closed 2023-06-02 14:58:31 +01:00
James Ritchie 0b05355e25 Fixed the layout for when you have multiple team members 2023-06-02 14:37:30 +01:00
James Ritchie 89690d76b5 Fixed name of email field 2023-06-02 14:21:23 +01:00
James Ritchie a9cf074d82 Improved the invitation accept page 2023-06-02 14:15:06 +01:00
James Ritchie 86f46f5162 Changed the icon colour 2023-06-02 14:14:46 +01:00
James Ritchie 693abac7fc Change icon to NamedIcon 2023-06-02 14:14:29 +01:00
James Ritchie f79d90bfc3 Copy tweak 2023-06-02 14:14:19 +01:00
James Ritchie bf347aa5d3 Improvements to the layout of members and pending invites 2023-06-02 13:31:26 +01:00
James Ritchie b2f350f3f7 Improvements to the members and pending invites list 2023-06-02 12:24:12 +01:00
James Ritchie d5f359d59d Renamed invite-accept file 2023-06-02 12:21:24 +01:00
James Ritchie ab4cb6d484 Fixed the focus states on input fields 2023-06-02 11:56:18 +01:00
Matt Aitken 33517b2c0e Resending invites working 2023-06-02 11:31:14 +01:00
Matt Aitken a9193cfe15 Added (You) to team page and improved the not allowed to leave team UX 2023-06-02 11:12:05 +01:00
Matt Aitken 10c2870d8a Button hover bg changes use group 2023-06-02 11:12:05 +01:00
James Ritchie 6894965575 Improved the Organization item on the Orgs and Account page 2023-06-02 10:58:40 +01:00
James Ritchie 8631a8c559 Added a back link to the Org page 2023-06-02 10:58:40 +01:00
James Ritchie a0418c7f5c Added a notification heading on accounts page 2023-06-02 10:58:40 +01:00
Matt Aitken ad86902073 User profile avatar has padding so it matches the hero icons 2023-06-02 10:51:56 +01:00
Matt Aitken c7d274117c Joining and declining invites is working 2023-06-02 10:44:24 +01:00
Matt Aitken 67606e7cee Accepting invites is working 2023-06-02 09:26:16 +01:00
Matt Aitken e0baafeb7d Improved the layout 2023-06-01 22:05:27 +01:00
Matt Aitken 795577ede0 Show the pending invites on the team page 2023-06-01 22:04:22 +01:00
Matt Aitken 9a4094d115 /accept-invite redirects with messages based on the invite and logged in status 2023-06-01 21:40:28 +01:00
Matt Aitken b3ccfeb015 A lot of work on email invites 2023-06-01 19:12:58 +01:00
Matt Aitken bfaf75c8dd Invite form with expanding fields is working 2023-06-01 17:19:30 +01:00
Matt Aitken 35b669eae8 WIP adding invite page 2023-06-01 17:19:30 +01:00
Matt Aitken 1893afbdbb Improved the remove user messaging 2023-06-01 17:19:30 +01:00
James Ritchie 17430fb921 Stop selecting the text inside a checkbox 2023-06-01 16:38:49 +01:00
James Ritchie f09d7254a7 Added a search bar to the scopes list 2023-06-01 16:36:30 +01:00
James Ritchie 4fe10eb8fa Built out the integration form 2023-06-01 15:58:17 +01:00
James Ritchie 562ba869e2 Segmented controller now has onChange prop 2023-06-01 15:58:17 +01:00
James Ritchie bcf5313498 Small form error style fix 2023-06-01 15:58:17 +01:00
James Ritchie 97bf4d00b1 Fieldset style improvement 2023-06-01 15:58:17 +01:00
James Ritchie 37486dc87e Checkbox has onChange and another style available 2023-06-01 15:58:17 +01:00
James Ritchie 2b15edb75a Added a small variant to form label 2023-06-01 15:58:17 +01:00
James Ritchie 926a9c7c78 Form labels can now have 2 sizes 2023-06-01 15:58:17 +01:00
James Ritchie 07f146e86d Added another input size per the design 2023-06-01 15:58:17 +01:00
James Ritchie cb6d412002 Improved checkbox description font size 2023-06-01 15:58:17 +01:00
James Ritchie d4fcf043ad Fixed alignment of segmented controller 2023-06-01 15:58:17 +01:00
James Ritchie 6947292adf Inline code component now has size variants to match the paragraph it’s inlined with 2023-06-01 15:58:17 +01:00
Matt Aitken 2270fcdc67 Made the form reusable for kicking other members 2023-06-01 14:42:26 +01:00
Matt Aitken cff0498646 Leaving a team works 2023-06-01 14:34:46 +01:00
Matt Aitken 62c7db3650 Made the <Button> a forwardRef so it can work with things like Alert 2023-06-01 12:23:23 +01:00
Matt Aitken 3a91f03340 Created the Org projects page 2023-06-01 11:44:21 +01:00
Matt Aitken 7bcd0b350e Added a cancel button to the New project page 2023-06-01 10:21:13 +01:00
James Ritchie 99fb735b5b input group can be full width 2023-06-01 08:47:47 +01:00
Matt Aitken 8e25e3f9a0 Improved the layout of the Help component 2023-05-31 21:51:34 +01:00
Matt Aitken a43512b117 Added help placeholder content 2023-05-31 21:47:36 +01:00
Matt Aitken da67607eda Added filtering to the Job list 2023-05-31 21:45:51 +01:00
Matt Aitken 8e98810682 No jobs blank state 2023-05-31 21:29:01 +01:00
Matt Aitken eb1804339c Added Active jobs property the the job list 2023-05-31 21:17:53 +01:00
Matt Aitken f63df323cf When creating an org, show a toast 2023-05-31 21:13:08 +01:00
Matt Aitken 468487d815 The divider in the project popover is clearer 2023-05-31 21:13:00 +01:00
Matt Aitken 0ff8f72668 Added a success toast to project creation 2023-05-31 21:09:35 +01:00
Matt Aitken 8df7018b4f Create project page working 2023-05-31 21:08:12 +01:00
Matt Aitken b5cc1b4c6d FormTitle now supports a description too (per design) 2023-05-31 21:08:05 +01:00
Matt Aitken 2b655707e4 Fix for The JobItem tooltip throwing error about div in p 2023-05-31 20:47:09 +01:00
Matt Aitken 853132453e Improve the logic for showing the background gradient 2023-05-31 20:46:53 +01:00
Matt Aitken a922f28e86 Added a dismiss button and improved the text 2023-05-31 20:14:27 +01:00
Matt Aitken 26e4f2b9f7 Styling on the toast 2023-05-31 20:11:23 +01:00
Matt Aitken 1030662c93 Tightened up the animation 2023-05-31 19:55:27 +01:00
Matt Aitken db3de3841f Updating account, including marketing prefs is working 2023-05-31 19:53:10 +01:00
Matt Aitken 3d9d6982e4 The user’s account image shouldn’t be in NamedIcon 2023-05-31 19:53:09 +01:00
Matt Aitken d8a5ad7107 Update lucide-react icons… 2023-05-31 19:53:09 +01:00
Matt Aitken e9b9bd8ff9 Restructured the routes so Orgs and Account are at the top-level under tabs 2023-05-31 19:53:09 +01:00
James Ritchie 43a94bfa2c segmented controller now takes label, value and name props 2023-05-31 18:28:53 +01:00
James Ritchie b75401bc7b New segmented control form component 2023-05-31 17:35:50 +01:00
James Ritchie 1cebf76b85 Changed the way badges work so they can be mapped over 2023-05-31 16:34:54 +01:00
James Ritchie c113e78c33 Addded an optional className 2023-05-31 15:48:08 +01:00
James Ritchie 4abdc51934 Improved the badge 2023-05-31 15:37:17 +01:00
James Ritchie a7c10e1c80 Improved the disabled and default checked checkbox 2023-05-31 15:37:09 +01:00
James Ritchie a9bb37416a Improved the way the checkbox logic works 2023-05-31 13:49:04 +01:00
James Ritchie 400836841a Got the checkbox behaviour working and new styles for the variants in 2023-05-31 13:03:09 +01:00
James Ritchie 81b37f3408 Small style update to the side menu buttons 2023-05-31 09:53:44 +01:00
James Ritchie 7fa663f1af Improved the integration button states 2023-05-31 09:05:44 +01:00
Matt Aitken b6b6005c7d Added Trigger panel, but it’s a bit light on content right now 2023-05-30 19:03:58 +01:00
James Ritchie 4015a4eac7 More WIP on the checkbox 2023-05-30 18:19:28 +01:00
Matt Aitken b458316bef Added Run breadcrumb 2023-05-30 17:57:22 +01:00
James Ritchie ec819c66d8 WIP new checkbox component 2023-05-30 17:45:32 +01:00
James Ritchie c4d678c439 Fixed shortcut positioning inside small buttons 2023-05-30 17:45:32 +01:00
Matt Aitken 6edbafff47 Fix for RunPanel title type 2023-05-30 17:43:42 +01:00
Matt Aitken 5439611d83 Slate colours updated 2023-05-30 17:43:16 +01:00
Matt Aitken b0f9fe9265 Major layout shifts to deal with scrollable areas 2023-05-30 17:32:55 +01:00
Matt Aitken f10501b9cc Added message element to slack post message 2023-05-30 16:50:15 +01:00
Matt Aitken 3400d6c9ab Detail view fleshed out 2023-05-30 16:50:05 +01:00
Matt Aitken 8aeead7e5e Padding for task description improved 2023-05-30 16:16:04 +01:00
Matt Aitken 41d9498999 Add a Task description 2023-05-30 16:14:46 +01:00
Matt Aitken 284f217163 Added a todo because logging isn’t working in the run function 2023-05-30 16:14:46 +01:00
James Ritchie b35d5e35fe Improved Sheet background visibility 2023-05-30 16:05:11 +01:00
James Ritchie 499ae4213a Made the Sheet header match the design 2023-05-30 15:59:12 +01:00
James Ritchie 9f1681a89c Improvements to positioning of the Sheet and footer button placement 2023-05-30 15:50:16 +01:00
Matt Aitken baeb11d7fb Layout improvements with flowing content 2023-05-30 15:45:28 +01:00
Matt Aitken c1907d4e00 Improved the task display with connections and task icon 2023-05-30 15:35:11 +01:00
Matt Aitken 0a898900bf Added connectionKey to Task so we can tell which connection is associated with a task 2023-05-30 14:57:33 +01:00
Matt Aitken 0258c394b6 Display the elements from the task 2023-05-29 13:19:21 +01:00
Matt Aitken 9b6991504c Moved the key to the right place 2023-05-27 19:14:38 +01:00
Matt Aitken 18d0de2366 Attempt at elements, but layout is funky 2023-05-27 19:12:12 +01:00
Matt Aitken 5f6352b123 Deal with the delay slightly differently, not sure if this is best or not 2023-05-27 18:39:55 +01:00
Matt Aitken 9a5c8cbbb7 Added TaskSeparator 2023-05-27 18:34:21 +01:00
Matt Aitken 9d7cfb39aa More progress on run page 2023-05-27 18:19:22 +01:00
Matt Aitken f3f65068fa Started work on the run page panels 2023-05-27 18:00:24 +01:00
Matt Aitken c74a456168 Status first as it’s most important 2023-05-27 13:50:54 +01:00
Matt Aitken 5806c687b6 Run header in, except the rerun button 2023-05-27 13:49:45 +01:00
Matt Aitken 3436a5ec8e Started building up the run header 2023-05-27 13:34:32 +01:00
Matt Aitken e6de29a5ab Basic run page header 2023-05-27 13:25:50 +01:00
Matt Aitken 7e2b134991 Can’t use the nested layoutless routing because it scrubs all the loading data. So instead conditional hide the Job header 2023-05-27 13:22:46 +01:00
Matt Aitken 288a891c8a useRun hook 2023-05-27 13:18:39 +01:00
Matt Aitken 25fbc80dd7 Run page placeholder 2023-05-27 13:06:07 +01:00
Matt Aitken 3e032e4fca Move the DirectionSchema so it can be accessed client-side 2023-05-27 13:04:58 +01:00
Matt Aitken b391b81209 Moved the pagination components to a separate file alongside the route 2023-05-26 18:45:10 +01:00
Matt Aitken bbd0d9d31f Pagination working with controls 2023-05-26 18:23:24 +01:00
Matt Aitken b8c09f6784 NamedIcons: chevron-left and chevron-right 2023-05-26 18:23:17 +01:00
Matt Aitken d217535fcd Added tabs for Trigger and Settings. They 404 for now 2023-05-26 16:55:40 +01:00
Matt Aitken f9b106642d PageContainer now takes up the full height 2023-05-26 16:36:29 +01:00
Matt Aitken 1dac117ed3 JobItem integrations aren’t optional 2023-05-26 16:35:14 +01:00
Matt Aitken 0392c7c6c6 Added WAITING_ON_CONNECTIONS status to the components 2023-05-26 16:24:21 +01:00
Eric Allam 5ba72a59c4 Use reverse DNS for all internal events 2023-05-26 16:18:47 +01:00
Matt Aitken bfdd3bc361 Oops I’d flipped isTest while… testing. Irony 2023-05-26 16:15:01 +01:00
Matt Aitken e06b4cfc84 Test column looked weird with zero ticks 2023-05-26 16:14:06 +01:00
Matt Aitken 0153c4f900 Nice status and environment components 2023-05-26 16:10:14 +01:00
Eric Allam 85f74ce761 Gracefully handle missing run connections and resume runs once the connections have been created 2023-05-26 16:00:04 +01:00
Matt Aitken 639c88d3c9 Nice duration formatter 2023-05-26 15:38:48 +01:00
Matt Aitken 4aac1f9662 Improved styles, using pathBuilder 2023-05-26 15:01:50 +01:00
Matt Aitken 38244b8f98 Added integrations to the Job page header 2023-05-26 14:51:34 +01:00
Matt Aitken 593372a508 useOptionalJob in Breadcrumb 2023-05-26 14:47:41 +01:00
Matt Aitken c24a9695b6 Fixed the “Rubs” breadcrumb link 2023-05-26 14:43:08 +01:00
Matt Aitken f7516db415 Very ugly run table working 2023-05-26 14:40:28 +01:00
Matt Aitken 3d520a8867 Removed extra border when showing the PageTabs 2023-05-26 13:40:30 +01:00
Matt Aitken 3a152d0d80 PageTabs have padding for use in the header 2023-05-26 13:40:08 +01:00
Matt Aitken 787cc20028 Fix for Project side menu hover area being too large when minimised 2023-05-26 13:39:55 +01:00
Matt Aitken 6d28e5f7f0 Created routing tabs that have an animating underline when page switching 2023-05-26 13:34:30 +01:00
Matt Aitken e57769d90c Renamed Tabs to ClientTabs, they’re only to be used for client side tabs 2023-05-26 13:04:30 +01:00
Matt Aitken b65aa5f9cf Improved Job page header 2023-05-26 13:04:10 +01:00
Matt Aitken a95e3855c0 Added PageHeader property display 2023-05-26 12:54:14 +01:00
Matt Aitken 50a3868c67 useJob and useOptionalJob hooks 2023-05-26 12:28:57 +01:00
Matt Aitken 4f3e314063 Split into useProject and useOptionalProject 2023-05-26 12:26:43 +01:00
Matt Aitken 885aeb542a Renamed useCurrentProject to useProject 2023-05-26 12:22:43 +01:00
Matt Aitken 933e91e45c We now have useOrganization and useOptionalOrganization hooks 2023-05-26 12:22:08 +01:00
Matt Aitken 3b8ea9b712 Renamed useCurrentOrganization to useOrganization 2023-05-26 11:58:13 +01:00
Matt Aitken 09e67dfba9 Added useOptionalOrganizations hook 2023-05-26 11:57:21 +01:00
Matt Aitken a12f464c4a Added notes for the implementation of the run list 2023-05-26 11:52:08 +01:00
Matt Aitken 08bd69ddf8 Fixed the conditional hook error in ProjectSideMenu 2023-05-26 11:51:31 +01:00
Matt Aitken 3862cc069c Started adding PageInfo rows and groups 2023-05-26 11:51:15 +01:00
Matt Aitken cb37705085 Start on the Job page 2023-05-25 19:20:06 +01:00
Matt Aitken 06785525eb Jobs menu working 2023-05-25 19:08:06 +01:00
Matt Aitken b046e4a110 Breadcrumb improvements. Also added temporary job page ready to build 2023-05-25 18:21:14 +01:00
Matt Aitken 92fba7b0b8 Added the missing icons for the different trigger types 2023-05-25 17:57:12 +01:00
Matt Aitken 976c56a6bb Upgraded Remix to 1.16.1 2023-05-25 17:45:43 +01:00
Matt Aitken 50ddfb8a2e Remove the log of the project 2023-05-25 17:30:45 +01:00
Matt Aitken 84f41eb69f The JobList is displaying 2023-05-25 17:30:33 +01:00
Matt Aitken bb18f18d22 The JobList is displaying, needs icons hooking up 2023-05-25 16:56:05 +01:00
Matt Aitken 94d17dd033 Added icon to the EventSpecificationSchema 2023-05-25 16:56:05 +01:00
Eric Allam e340abd386 Run jobs as users (custom events, and dynamic triggers/schedules) 2023-05-25 13:57:07 +01:00
Matt Aitken 2231fc23e1 Updated Sentry and Posthog to the latest 2023-05-25 13:00:46 +01:00
Matt Aitken f73ecb6898 Cast the cloned logger args 2023-05-25 13:00:34 +01:00
Matt Aitken fc33d3e2ca Cast the PostHog Sentry plugin because it’s causing typecheck issues 2023-05-25 13:00:22 +01:00
Matt Aitken 88c249299f Remove unused CacheService 2023-05-25 12:54:15 +01:00
Matt Aitken 224e5e412a Fix for JSONEditor errors 2023-05-25 12:54:09 +01:00
Matt Aitken c6545d5d6f Deleted old files (RunsTable and JobsMenu) 2023-05-25 12:53:30 +01:00
Matt Aitken e0b1e021ec Added Project slug, WIP on Jobs/Runs presenters 2023-05-25 12:53:16 +01:00
Matt Aitken 235dc6cd02 Updated the seed script so the DATABASE provider is correct and has project slugs 2023-05-25 12:52:29 +01:00
Matt Aitken 2858d742e1 Comment out unused GitHub connectiom 2023-05-25 12:52:01 +01:00
Matt Aitken df26167474 Added @uiw/react-codemirror back, we’ll need it for the Test code editor 2023-05-25 12:47:20 +01:00
Matt Aitken a11dea6e7f Added icon to the GitHub events 2023-05-25 12:46:58 +01:00
Matt Aitken 6d705e5db7 Added icon to the EventSpecification 2023-05-25 12:46:58 +01:00
Eric Allam d636360ec5 Only ever trigger scheduled events that are in the future 2023-05-25 09:59:19 +01:00
Eric Allam 3693df7ad2 Fixed getting access to the raw integration client 2023-05-24 12:59:47 +01:00
Eric Allam d15b6ac79f Dynamic schedules 2023-05-23 15:59:06 +01:00
Eric Allam 786f2e16ef Static scheduled triggers are working, and now adding graphile worker jobs are done in prisma txs 2023-05-23 14:00:26 +01:00
Eric Allam 7c5eb6a3a3 Fixed dynamic triggers to be unregisterable (and a start on scheduled triggers) 2023-05-22 11:02:58 +01:00
Eric Allam af258acf3a Dynamic triggers can now be initialize via the API 2023-05-19 11:57:41 +01:00
James Ritchie 21e6f8668d Using the simple tooltip component instead 2023-05-19 11:39:56 +01:00
Eric Allam d123d1cddd Move all API routes to v1 from v3 2023-05-19 10:08:00 +01:00
James Ritchie e4aa66e213 Integrations now have a tooltip to show the names on hover 2023-05-19 09:55:03 +01:00
Eric Allam 8e8c6641aa Adding back in the ctx functions to IO 2023-05-19 09:53:12 +01:00
James Ritchie 9e3b5707cf Added integrations into the job item 2023-05-18 17:47:10 +01:00
James Ritchie bc1e0bed1d Renamed RunStatus file 2023-05-18 17:12:25 +01:00
James Ritchie 2306650aa5 Added some responsivness to the Job item 2023-05-18 17:08:26 +01:00
James Ritchie 5136dd6698 Wrapped storybook in LocalContextProvider 2023-05-18 17:08:26 +01:00
James Ritchie 50622ff917 removed imports 2023-05-18 17:08:26 +01:00
Matt Aitken 1f217ed4a5 Connection form, lots of improvements to Sheet 2023-05-18 16:40:50 +01:00
Matt Aitken 8666358722 Improvements to the integration auth method selector 2023-05-18 16:40:50 +01:00
Eric Allam 70b850140d Refactor event dispatching to work with dynamic triggers 2023-05-18 16:25:29 +01:00
James Ritchie 2d411b4924 Data props now accessible in the Job Item component 2023-05-18 14:27:54 +01:00
James Ritchie 4a15d0e822 Removed leading overrides from paragraph component 2023-05-18 14:27:54 +01:00
James Ritchie 258c027b2d removed margin bottom from paragraph text 2023-05-18 14:27:54 +01:00
James Ritchie 114c23ab09 Removed margin bottom from headers 2023-05-18 14:27:54 +01:00
Eric Allam 396206ca03 Dynamic triggers now can be registered at runtime and trigger jobs 2023-05-18 14:00:54 +01:00
James Ritchie 1412feba15 Adding new job list and item components 2023-05-18 12:32:59 +01:00
Matt Aitken 4b1fcb7ec6 Help panel can now be undismissable 2023-05-18 08:47:32 +01:00
James Ritchie e927f5df5e small animation tweaks 2023-05-17 17:46:00 +01:00
James Ritchie f238d6bfb9 Hover state added for the popover 2023-05-17 17:31:02 +01:00
James Ritchie 2c0f3ac905 Style improvements to the select component 2023-05-17 16:58:47 +01:00
James Ritchie 7f08400432 select menus take a size and width 2023-05-17 15:35:47 +01:00
Matt Aitken f16c2ea0cf Added help panel to the integrations page 2023-05-17 15:07:28 +01:00
Matt Aitken c2d61f1011 Revert "Experiment building a Radix like component for help"
This reverts commit b50c3d8378916435d6e3d52ccaff379235e76588.
2023-05-17 15:07:28 +01:00
Matt Aitken c458ee780b Experiment building a Radix like component for help 2023-05-17 15:07:28 +01:00
Matt Aitken 10674786e2 WIP on help component 2023-05-17 15:07:28 +01:00
James Ritchie 65aa12de02 Added styling for a select component 2023-05-17 14:03:06 +01:00
James Ritchie df29a37c6c Fix for extra tailwind colors in the config 2023-05-17 14:03:06 +01:00
Eric Allam 6cafe077b4 Rename job connections to job integrations and get local integration triggers working 2023-05-17 13:52:03 +01:00
Matt Aitken 7a0c33cd49 Layout fixes for the integrations page 2023-05-17 11:00:20 +01:00
Matt Aitken 4b7c16641b More work on the integrations page 2023-05-17 09:30:13 +01:00
Matt Aitken 5cfd895f0e Updated the header for the integrations page 2023-05-16 18:49:37 +01:00
Matt Aitken 08e8ccb3f0 Integrations route moved to project path, add breadcrumb 2023-05-16 18:42:44 +01:00
Matt Aitken 973bb8a076 Fix for changes to Label and FormError 2023-05-16 18:42:44 +01:00
James Ritchie efe84d6a0c Improvements to the popover menu 2023-05-16 18:36:44 +01:00
James Ritchie 7823041b4c Improved the all caps style and font sizing 2023-05-16 18:36:44 +01:00
Eric Allam 055b742b66 Add description to clients and add orgid to params 2023-05-16 18:21:51 +01:00
Eric Allam fa0c9015ae Update the auth repository to work with the new client/connection split 2023-05-16 18:00:51 +01:00
Matt Aitken c6372bfc0b ProjectsMenu now uses some reusable components 2023-05-16 18:00:37 +01:00
Matt Aitken a46bb7c2f7 Added autodocs to a couple of Storybook pages 2023-05-16 18:00:27 +01:00
Matt Aitken 1a010b7f12 Breadcrumb changed to a component and simplified the page to just a slug 2023-05-16 17:12:39 +01:00
Matt Aitken da7b020dbb Added an animation when showing form errors, hide totally when undefined/null 2023-05-16 16:54:29 +01:00
Matt Aitken f88952d8f6 Remove log of email 2023-05-16 16:54:29 +01:00
Matt Aitken 064cbce172 Redirect to new org form if the user has no orgs 2023-05-16 16:54:29 +01:00
James Ritchie a42a1b231e Fixed button disabled states 2023-05-16 16:50:35 +01:00
Eric Allam e0e618ac1c Get webhook deliveries working again 2023-05-16 16:34:51 +01:00
Eric Allam f6ea37381a Re-work how triggers work to better support dynamic triggers 2023-05-16 16:34:51 +01:00
Eric Allam 214546d17a WIP new stuff 2023-05-16 16:34:51 +01:00
James Ritchie e851cefb39 fixed text colour 2023-05-16 16:33:42 +01:00
James Ritchie 7030acfa77 Added leading to paragraph text 2023-05-16 16:33:35 +01:00
James Ritchie efe23c01a7 Label component not using cva anymore 2023-05-16 16:27:25 +01:00
James Ritchie 45e4bf0b97 improved the field labels 2023-05-16 16:17:38 +01:00
James Ritchie b679539c0f added field hover states 2023-05-16 16:03:04 +01:00
James Ritchie de8421d966 Fix for a merge conflict 2023-05-16 15:57:58 +01:00
James Ritchie 8c6f8c3b01 Inputs now have size variants 2023-05-16 15:52:21 +01:00
Matt Aitken 504682e9bf Remove old internal event when a user was created 2023-05-16 15:31:06 +01:00
Matt Aitken f0090ca7b5 Force the User profile icon to be square 2023-05-16 14:56:41 +01:00
Matt Aitken fb862123db Delete old user menu 2023-05-16 14:56:28 +01:00
Matt Aitken 89981810d1 Login pages styled 2023-05-16 14:51:34 +01:00
Matt Aitken cd916fdca2 Lazy load integration icons 2023-05-16 13:18:00 +01:00
Matt Aitken a3ccb9950f Add NavBar to the error boundary 2023-05-16 12:21:13 +01:00
Matt Aitken 036bb523bd v2 errors and made a nicer error page 2023-05-16 12:19:28 +01:00
Matt Aitken b24317bf9b Enabled remix v2_normalizeFormMethod future flag 2023-05-16 12:19:27 +01:00
Matt Aitken 354e3090bf Remove unused useProject code 2023-05-16 12:19:27 +01:00
James Ritchie 337a0b9cb5 More Named icons 2023-05-16 11:56:39 +01:00
James Ritchie 626ee69dea Forms can take an optional shortcut icon 2023-05-16 11:56:39 +01:00
Matt Aitken bd2727415f Collapsing is determined correctly, not by a click on the menu 2023-05-16 11:34:05 +01:00
Matt Aitken ec541338b6 Tailwind formatted 2023-05-16 11:33:04 +01:00
Matt Aitken c4fbd92b49 Added a tooltip when the side menu is collapsed. Refined the icon padding 2023-05-16 11:28:02 +01:00
James Ritchie e49a392e8e Added an icon to the form error 2023-05-16 11:11:50 +01:00
James Ritchie 6374ef5e6d Inputs take an optional leading icon 2023-05-16 11:11:50 +01:00
James Ritchie c8e3894559 Updated the form focus color 2023-05-16 11:11:50 +01:00
Matt Aitken f4216b98ec Use framer motion for the menu collapsing 2023-05-16 11:09:07 +01:00
Matt Aitken 3dfecdf5d2 Installed framer motion 2023-05-16 11:08:58 +01:00
Matt Aitken fbcbd456e3 The Jobs side menu item active state works differently as it’s the root 2023-05-16 10:51:22 +01:00
Matt Aitken 18afbdec46 Use NavLink for the ProjectSideMenu 2023-05-16 10:09:27 +01:00
Matt Aitken 7db43b91f1 Created the Environments page stub 2023-05-16 10:09:18 +01:00
Matt Aitken 4071a8c280 Added NavLinkButton 2023-05-16 10:08:00 +01:00
Matt Aitken 3b7028618c Renamed handle.breadcrumb to handle.useBreadcrumbElement to stop the annoying hook naming warnings 2023-05-16 10:07:47 +01:00
Matt Aitken 0715fdaaba Added some structure to the path builder file 2023-05-16 10:07:12 +01:00
Matt Aitken 888810c5ae Removed @react-email package from webapp 2023-05-16 10:06:58 +01:00
Matt Aitken 5cef31f1bd Stripped whitespace 2023-05-16 09:17:55 +01:00
Matt Aitken 3d0ae35156 Added @typescript-eslint/strict-boolean-expressions rule for booleans, string and numbers 2023-05-16 09:17:55 +01:00
James Ritchie a3d03bdb35 Created a login form 2023-05-15 18:22:30 +01:00
James Ritchie 5d52b206c4 The divider on the form title is now optional 2023-05-15 18:22:30 +01:00
James Ritchie f05a8cd823 Added an anchor tag component 2023-05-15 18:22:30 +01:00
Matt Aitken 664f2e6623 Breadcrumb now uses the route handle 2023-05-15 17:49:10 +01:00
Matt Aitken 389d6fe9c6 Started building out the side menu 2023-05-15 16:45:19 +01:00
James Ritchie d3c767362c NamedIcons now have padding like hero icons 2023-05-15 15:35:20 +01:00
Matt Aitken 2892e3b36f Initial work on project page with side menu 2023-05-15 15:34:52 +01:00
Matt Aitken b17de99331 Set the popover background color 2023-05-15 15:34:52 +01:00
James Ritchie 9d8557fbed Added disabled button examples to storybook 2023-05-15 14:47:54 +01:00
James Ritchie 35c3a4e613 Menu items can be disabled or selected 2023-05-15 14:38:19 +01:00
Matt Aitken 00c9da8de9 Form story updated 2023-05-15 14:20:18 +01:00
Matt Aitken dfc5fec14a Storybook no longer opens a new browser window when run 2023-05-15 14:20:06 +01:00
Matt Aitken 85eca607a1 Fix for spinner white name change 2023-05-15 14:07:36 +01:00
Matt Aitken 8973001ec8 WIP on new org form 2023-05-15 14:07:05 +01:00
Matt Aitken 5a1e7412d2 Paragraph accepts all props a <p> accepts 2023-05-15 14:06:31 +01:00
Matt Aitken 8095612d30 Use a NamedIcon in the org grid 2023-05-15 14:06:31 +01:00
Matt Aitken 2259b812a2 Don’t create an org when a user first registers 2023-05-15 14:06:31 +01:00
Matt Aitken 5af6549a0f Added conform package 2023-05-15 14:06:31 +01:00
Matt Aitken 6d3a590ce8 Fix for hover states on the page header back button 2023-05-15 14:06:31 +01:00
Matt Aitken ce5be558e3 Don’t duplicate the orgs grid items 2023-05-15 14:06:31 +01:00
Matt Aitken eb6f1dadd1 Fixed the page backgrounds 2023-05-15 14:06:31 +01:00
Matt Aitken 2ed7e9f724 Show a background gradient if it’s a top-level page 2023-05-15 14:06:31 +01:00
James Ritchie ecea028fc0 Added another spinner variant to namedIcons 2023-05-15 13:57:35 +01:00
James Ritchie c76a7343f9 spinner now takes a colour 2023-05-15 13:52:50 +01:00
James Ritchie 1281a5e9aa Added loading buttons and improved the disabled states 2023-05-15 13:52:40 +01:00
James Ritchie 763d09b952 Added reduce motion support for spinner 2023-05-15 12:12:04 +01:00
James Ritchie 6d3b96aa20 Removed unused styles 2023-05-15 11:42:34 +01:00
James Ritchie 7f9447f403 Buttons now have selected state 2023-05-15 11:33:32 +01:00
James Ritchie 37836b938b Fixed icon hover state on the secondary large button 2023-05-15 11:09:16 +01:00
Matt Aitken b8605f82a8 Org grid item headers are clickable 2023-05-12 18:46:14 +01:00
Matt Aitken c81b5931c8 Brighter gradient 2023-05-12 18:43:34 +01:00
Matt Aitken 3d4aa61a3d Extended the gradient a bit 2023-05-12 18:43:16 +01:00
Matt Aitken 21ee76b6b2 Use simplur to deal with singular/plurals 2023-05-12 18:42:31 +01:00
Matt Aitken c4b65e0b96 Updated button to “menu-item” 2023-05-12 18:34:17 +01:00
Matt Aitken 11e2d2d0e1 Org grid looking ok 2023-05-12 18:33:11 +01:00
James Ritchie 149a849a7e Added a large button set and more styling for the menu item buttons 2023-05-12 18:31:58 +01:00
James Ritchie 18c4ede771 Added new menu item button 2023-05-12 17:31:19 +01:00
Matt Aitken 6c3cb7f5d1 Early org grid 2023-05-12 17:25:48 +01:00
Matt Aitken 945854c671 Upgraded Tailwind to 3.3.2 – gradient stop position support 2023-05-12 17:25:35 +01:00
James Ritchie 52460e5977 icon and style improvements to the popover 2023-05-12 16:52:38 +01:00
James Ritchie 60d571198f WIP new menu item button 2023-05-12 16:52:38 +01:00
James Ritchie 54f73a5fd5 added a menu item button to storybook 2023-05-12 16:52:38 +01:00
James Ritchie ac6d7d7a7a Improvements to the nav bar styling 2023-05-12 16:52:38 +01:00
James Ritchie 9c35cae103 added back in the shadcn background variable 2023-05-12 16:52:38 +01:00
James Ritchie ae358f9d41 Added 2 more colours for background and dividers between sections as separate variables 2023-05-12 16:52:38 +01:00
James Ritchie 786731b4e1 Increased stroke width of breadcrumb divider icon 2023-05-12 16:52:38 +01:00
James Ritchie 3af3db6a4a Added a min width do the shortcuts so narrow characters stay in a square 2023-05-12 16:52:38 +01:00
James Ritchie 4c889cf6f0 Changed the icon in the code block for copy/paste 2023-05-12 16:52:38 +01:00
Matt Aitken 89aa546b42 Added PageBody 2023-05-12 16:46:31 +01:00
Matt Aitken 695c4a928d Removed old layout components 2023-05-12 16:46:22 +01:00
Matt Aitken ec24dbeef2 Tweaked Storybook to work with <Link> elements. Added PageHeaders storybook page 2023-05-12 16:23:10 +01:00
Matt Aitken 43dc022675 Added Create new org button 2023-05-12 15:24:35 +01:00
Matt Aitken b3486a9b7f Orgs page layout started 2023-05-12 15:11:48 +01:00
Matt Aitken 46c1d2484a PageHeader supports a title, back and set of buttons 2023-05-12 15:11:48 +01:00
James Ritchie c9e402be57 Updated all buttons to use the new component props and children 2023-05-12 14:45:17 +01:00
James Ritchie cfb9fffb47 Better storybook layout for buttons 2023-05-12 14:45:17 +01:00
James Ritchie 9a531dd7f6 Improved the line height on the shortcut icno 2023-05-12 14:45:17 +01:00
James Ritchie 1f7b581208 Named icons inside buttons keep their specified colours 2023-05-12 14:45:17 +01:00
James Ritchie 7a474d45c6 Reformatted the button in Stories to take updated children 2023-05-12 14:45:17 +01:00
James Ritchie ea04d13a60 Shortcut icon style improvement 2023-05-12 14:45:17 +01:00
James Ritchie ec825ebb9d More button improvements 2023-05-12 14:45:17 +01:00
James Ritchie a873d6dfca Improved the image inside a button 2023-05-12 14:45:17 +01:00
James Ritchie fb687f3760 Added a button with an image inside 2023-05-12 14:45:17 +01:00
James Ritchie f00cf33c3a Fixed Storybook tailwind 2023-05-12 14:45:17 +01:00
James Ritchie 61a8768f9f Updated the buttons component inline with the designs 2023-05-12 14:45:17 +01:00
James Ritchie 07b4a4af73 Updated typography to use new bright/dimmed colours 2023-05-12 14:45:17 +01:00
James Ritchie 14e2829635 Added new colours to the config: “dimmed” and “bright” 2023-05-12 14:45:17 +01:00
James Ritchie 23d721a5ed WIP setting up the app buttons 2023-05-12 14:45:17 +01:00
Matt Aitken 8dc78776b3 Added breadcrumb to the nav 2023-05-12 14:14:38 +01:00
Matt Aitken 722b4b8e2d BreadcrumbIcon 2023-05-12 14:10:27 +01:00
Matt Aitken 260ed6ed8c Created MainContainer 2023-05-12 14:10:17 +01:00
Matt Aitken 4710e31c45 Added slate-650 2023-05-12 14:09:26 +01:00
Matt Aitken a1585dfa17 Hide the project menu on the Organization list page 2023-05-12 13:49:02 +01:00
Matt Aitken 34dfedd2e0 Use the pathBuilder for org/project paths 2023-05-12 13:17:36 +01:00
Matt Aitken f08c4e2354 Move path building to a file so we don’t have lots of them floating around 2023-05-12 13:17:21 +01:00
Matt Aitken 482760aeed Added a todo to the ProjectsMenu 2023-05-12 12:52:49 +01:00
Matt Aitken 5814b60370 Project menu functionality 2023-05-12 12:14:31 +01:00
Matt Aitken 21c2a7da25 Popover style with arrow 2023-05-12 11:00:26 +01:00
Matt Aitken d7e32348ee Logic for the ProjectsMenu working 2023-05-12 09:17:42 +01:00
Matt Aitken e0a824cf40 Removed useMatches log 2023-05-11 17:18:09 +01:00
Matt Aitken a85509ea80 Stripped out more old files, updated env vars file 2023-05-11 17:13:14 +01:00
Matt Aitken 5193fe0775 Updated routing to v2 2023-05-11 16:44:12 +01:00
Matt Aitken 6078d15aa1 Upgraded Remix, using new Tailwind compilation 2023-05-11 15:56:46 +01:00
Matt Aitken d6622accce Removed Nango 2023-05-11 15:31:31 +01:00
Matt Aitken 9805721498 Updated Remix packages 2023-05-11 15:10:29 +01:00
Matt Aitken 8f9a5e7009 More updated files 2023-05-11 15:04:04 +01:00
Matt Aitken 37bae77faa Deleted more old stuff 2023-05-11 14:59:52 +01:00
Matt Aitken cca8c60fbf Lots of compile fixes and deleted old stuff 2023-05-11 14:55:09 +01:00
Matt Aitken a30cc3332a Fixed some compile errors 2023-05-11 13:43:52 +01:00
Matt Aitken 77046470ea Added optional chrome to the CodeBlock 2023-05-11 13:43:42 +01:00
Matt Aitken 27c9e63e46 Fancy animated code highlight 2023-05-11 11:50:22 +01:00
James Ritchie ebe1fb516c More typography improvments 2023-05-11 11:49:14 +01:00
James Ritchie 5fda10806d Fixed tailwindMerge to work with the additional xxs font size 2023-05-11 11:49:14 +01:00
James Ritchie 92a8927162 Added more styles to Storybook 2023-05-11 11:49:14 +01:00
Eric Allam bcbb63f585 Removed trigger variants (moving to dynamic triggers instead) 2023-05-11 11:34:11 +01:00
Matt Aitken c67a465e3e Example of a CodeBlock that changes the highlighted range using buttons 2023-05-11 11:25:03 +01:00
Matt Aitken 83b79610af Line highlighting now takes ranges 2023-05-11 10:50:57 +01:00
Matt Aitken 4fa3ea2491 Improved size of clipboard icon 2023-05-11 09:48:06 +01:00
Matt Aitken 7a4742a314 Made inline code sky blue 2023-05-11 09:48:06 +01:00
Matt Aitken b24df76fca Started refactoring the index page 2023-05-11 09:48:06 +01:00
Matt Aitken 9e30d7a117 Tooltip story and created SimpleTooltip 2023-05-11 09:48:06 +01:00
Matt Aitken 789fab5b96 Added extension to the Tailwind merge plugin 2023-05-11 09:48:06 +01:00
Matt Aitken 07fa597755 Deleted old template presenters 2023-05-11 09:48:06 +01:00
Matt Aitken 62dd433de4 Zod is only being used as a type 2023-05-11 09:48:06 +01:00
Matt Aitken 713e85347c Cleaned up some hooks 2023-05-11 09:48:06 +01:00
Matt Aitken 13c2ba7dcd Deleted cloud projects folder 2023-05-11 09:48:06 +01:00
Matt Aitken 9b4d4090d7 Moved more components 2023-05-11 09:48:06 +01:00
James Ritchie f662e02cb1 Added a new xxs font size 2023-05-11 09:20:58 +01:00
Matt Aitken 35fce5a89d Inline code style updated and created a story 2023-05-11 08:38:14 +01:00
Matt Aitken 39bbf108a3 Updated more old components 2023-05-11 08:31:45 +01:00
Matt Aitken b1cf4cc042 Created a form story 2023-05-10 19:37:56 +01:00
Matt Aitken c24faa2e52 Delete old Copy buttons 2023-05-10 19:37:56 +01:00
James Ritchie 777f38a5ee Added new heading and paragraph styles 2023-05-10 19:03:18 +01:00
James Ritchie a79eb76fa9 Removed Poppins font from the import 2023-05-10 19:03:18 +01:00
Matt Aitken 22c3584988 One liner code looks good too 2023-05-10 18:46:07 +01:00
Matt Aitken 85f7ad871d You can set the max lines to display on a CodeBlock 2023-05-10 18:44:15 +01:00
Matt Aitken bfac524c75 Getting the copy button to work well 2023-05-10 18:20:30 +01:00
Matt Aitken 2a93c10828 Set the default language to TypeScript 2023-05-10 17:45:54 +01:00
Matt Aitken 833c509606 CodeBlock working well, except syntax highlighting is broken somehow 2023-05-10 17:44:49 +01:00
Matt Aitken 1b010571c9 CodeBlock is working with the @mantine/prism package 2023-05-10 15:39:40 +01:00
Matt Aitken 2765fe12cd Tidied up more old components 2023-05-10 08:44:45 +01:00
Matt Aitken 6f35b2e17d Merge pull request #123 from alexdanilowicz/patch-1
Fix storybook root alias by removing trailing slashes
2023-05-10 10:43:52 +03:00
Alex Danilowicz 35261ffc75 Fix storybook root alias by removing trailing slashes 2023-05-09 11:57:18 -07:00
Matt Aitken 60309677fe Deleted a ton of old components, started tidying things up 2023-05-09 18:50:46 +01:00
Matt Aitken 1f1cf0cb74 Added Storybook to turbo so you can call it from the root folder 2023-05-09 15:04:30 +01:00
Matt Aitken 0a1d3ed5ef Removed generate-integrations 2023-05-09 14:42:38 +01:00
Matt Aitken ab46981182 Updated pnpm-lock from the q2 branch 2023-05-09 14:36:38 +01:00
Matt Aitken b0f609dc15 Merge pull request #122 from Teddarific/teddy/storybook
Adding a component playground via Storybook
2023-05-09 16:34:41 +03:00
Matt Aitken 7ee305dfc6 Merge branch 'dev-q22023' into teddy/storybook 2023-05-09 16:34:30 +03:00
Matt Aitken 3f51835bea pnpm-lock.yaml from the q2 branch 2023-05-09 14:33:42 +01:00
Eric Allam 0a7ad96dcc Variants working in the new internal job system 2023-05-05 16:46:38 +01:00
Eric Allam 6d7f20b527 Moved over external source preparing and handling events into the internal job system 2023-05-05 16:09:42 +01:00
Eric Allam 8b7d847291 Added job queue system (needed for internal jobs but useful for our users as well) 2023-05-05 12:34:14 +01:00
Eric Allam c77dfae653 WIP new internal job system 2023-05-04 21:18:19 +01:00
Eric Allam 3e87e832c7 WIP trigger variants 2023-05-04 10:06:06 +01:00
Eric Allam eb83f941d2 Fixed Connection generic 2023-05-02 14:59:43 +01:00
Eric Allam b1a6ada443 Implement GitHub oauth and add it to the github integration 2023-05-02 13:53:37 +01:00
teddarific dc3306fb95 Lock file update 2023-05-01 11:01:02 -07:00
Alex Danilowicz faaaf253b2 Merge pull request #2 from Teddarific/alex/storybook
Clean up storybook gitignore
2023-05-01 10:58:23 -07:00
alexdanilowicz 2242ca3bf0 Cleanup gitignore 2023-05-01 10:53:40 -07:00
teddarific 258eda5bdb Storybook 2023-05-01 10:26:30 -07:00
teddarific 95ed5bacaa Initial implementation 2023-05-01 10:11:19 -07:00
Eric Allam a87fd6d4bd Create a single ApiCatalog (and keep the Api naming consistent) 2023-04-29 17:27:06 +01:00
Matt Aitken ea6bb4b467 Added a badge to indicate the name of the authentication method 2023-04-28 21:36:37 +01:00
Matt Aitken eb5d960f3a Use pointers to get data from token, support different scope param name 2023-04-28 21:30:57 +01:00
Matt Aitken 844c99ddc7 Split Slack into two separate auth methods. Added UI support for this with a popover. 2023-04-28 21:11:18 +01:00
Matt Aitken 232b9e97eb Added the User/Bot badges to the scopes list 2023-04-28 18:39:32 +01:00
Matt Aitken c288397048 Added Shadcn Badge component 2023-04-28 18:39:23 +01:00
Matt Aitken 7ec084c1a9 Added scope annotations to Slack 2023-04-28 18:29:11 +01:00
Matt Aitken b37d2a0ea2 Improved the NamedIcon to use an object and not use the API Store 2023-04-28 18:29:11 +01:00
Eric Allam 26d537867e Integrate with the new ApiConnection system to authenticate with Slack using OAuth 2023-04-28 16:44:52 +01:00
Matt Aitken c98ec1f1a8 Deal with APIs that reuse AccessTokens (like Slack)
- Re-use the same SecretReference and the actual stored secret
- Update any existing ApiConnections that are using the existing AccessToken
2023-04-28 15:27:33 +01:00
Matt Aitken ed0bc153da Added some js-doc annotations explaining when to use database secret store 2023-04-28 13:59:04 +01:00
Eric Allam 7ec4584d71 Added slug to ApiConnection (and renamed APIConnection to ApiConnection) 2023-04-28 13:49:19 +01:00
Eric Allam d75ee3a3dd 6 layers of child tasks 2023-04-28 09:30:18 +01:00
Matt Aitken ad722f1c8c Created Paragraph component with variant functionality 2023-04-27 18:30:38 +01:00
Matt Aitken 5ed5e8352d Getting credentials (with refreshing) 2023-04-27 17:28:40 +01:00
Eric Allam 51dd20424c Implemented subtasks 2023-04-27 17:25:19 +01:00
Eric Allam 1bba822e20 Added projects, moved envs to projects, and renamed executions to runs 2023-04-27 13:50:22 +01:00
Matt Aitken a119e79a49 Tokens are refreshing in a background job 2023-04-27 13:48:17 +01:00
Matt Aitken 52f9b16003 Added expiresAt column to the APIConnection table for refresh job 2023-04-26 19:31:20 +01:00
Matt Aitken 44dba712d1 Added Airtable 2023-04-26 18:17:57 +01:00
Matt Aitken e28a3566b6 Moved slack to its own file 2023-04-26 15:58:13 +01:00
Matt Aitken eb4f272d80 Add metadata and scopes to the connection 2023-04-26 14:43:50 +01:00
Eric Allam 3d38b95276 Continuing nextjs support, as well as moving event matching up to the server to support tasks that can wait for a trigger 2023-04-26 14:27:34 +01:00
Eric Allam 38e0460878 nextjs support WIP 2023-04-26 14:27:34 +01:00
Matt Aitken d8e29a9fa7 Added PKCE support (default on) 2023-04-26 11:58:42 +01:00
Matt Aitken fb36b68179 Setup the Shadcn styles, but not using CSS vars 2023-04-25 21:48:51 +01:00
Matt Aitken e14a2554ad Update Slack scope separator to be a comma 2023-04-25 19:52:17 +01:00
Matt Aitken b91a6548cb Delete credential file that was just a list of todos 2023-04-25 19:52:02 +01:00
Matt Aitken ee8aedea73 expires_in key fix 2023-04-25 18:04:04 +01:00
Matt Aitken 1fa39c875b Added scope description and use expiresIn for token payload 2023-04-25 18:03:39 +01:00
Matt Aitken 06741e14b7 db.server uses process.env directly 2023-04-25 14:26:46 +01:00
Matt Aitken 8e1929dbec Removed optional fields for Slack in app catalog 2023-04-25 14:26:39 +01:00
Matt Aitken 08abc86201 Token being stored correctly in the secret store with refresh and expire info where relevant 2023-04-25 14:08:28 +01:00
Matt Aitken 01a4ff387f The API connection icon is now visible 2023-04-24 18:35:23 +01:00
Matt Aitken cb026c51f3 OAuth connections are getting made and tokens are being stored 2023-04-24 18:34:09 +01:00
Matt Aitken 3fdb894296 Connection attempts are being created with redirects and errors 2023-04-23 15:29:07 -07:00
Eric Allam da0290e494 Adding support for connections, integrations, webhooks 2023-04-22 09:52:45 -07:00
Matt Aitken 5d081b2ef0 We’re now redirecting to the OAuth provider 2023-04-21 17:24:27 -07:00
Matt Aitken b087b5cdee More progress on oauth and started on the api UI 2023-04-21 16:00:25 -07:00
Matt Aitken cb18ee94bf WIP on oauth authorization 2023-04-19 21:05:46 +01:00
Matt Aitken 3142891b6a Stubs for authentication 2023-04-19 15:28:55 +01:00
Matt Aitken 7191697d70 Updated db schema for APIConnection and added Secret related tables 2023-04-19 15:27:42 +01:00
Matt Aitken 88f4ac7bc2 Added simple-oauth2 package 2023-04-19 15:24:39 +01:00
Matt Aitken fd9fc1f471 API store and stubs for the authentication service 2023-04-18 15:53:02 +01:00
Matt Aitken 3f6ee25fc4 First version of the info required to do OAuth2 for an external API 2023-04-18 13:42:54 +01:00
Matt Aitken c7c0f5e7f9 Removed fetch from the SDK 2023-04-18 11:45:26 +01:00
Eric Allam 98c8893046 WIP connections with authenticated tasks and http triggers 2023-04-06 16:15:17 +01:00
Eric Allam d0b8f827aa Implement better cursor pagination 2023-04-01 20:32:44 +01:00
Eric Allam d4eac626ec Removed ts in favor of ulid’s, and starting to implement the task list api #117 2023-03-31 16:38:30 +01:00
Eric Allam 43ca0b7e2a Implement sendEvent using the new Tasks API (#113 ) 2023-03-31 15:45:52 +01:00
Eric Allam 2d5c2394c8 Initial commit of the new serverless execution runtime 2023-03-31 14:32:00 +01:00
Eric Allam 746e4ae088 New serverless execution WIP 2023-03-23 20:35:56 +00:00
Eric Allam 1e12366e5a Merge pull request #81 from triggerdotdev/dev
Environment improvements
2023-03-23 10:37:41 +00:00
Eric Allam 98978a9992 Add a message about test events still working 2023-03-23 09:58:35 +00:00
Eric Allam d7dcb1bf61 Couple of copy tweats 2023-03-23 09:54:07 +00:00
James Ritchie 3bece03c7f Fixed ‘Configure connected github accounts’ button 2023-03-23 09:41:56 +00:00
James Ritchie 60fdde1919 Fixed the Request workflow and Integration typeforms on the integration page 2023-03-23 09:32:03 +00:00
James Ritchie c42d03a4a6 Made the copy text more obvious for the api key 2023-03-22 18:25:29 +00:00
James Ritchie 58a6ef436a Added a test page blank state 2023-03-22 18:19:45 +00:00
James Ritchie 3ab542b03f Small style improvements to the environments menu items 2023-03-22 17:47:40 +00:00
Eric Allam 2a760f1f2a Added conditional for test blank slate 2023-03-22 16:23:57 +00:00
Eric Allam 0a06e84350 Implement new env specific API key copy menu item 2023-03-22 16:20:27 +00:00
James Ritchie f2c07c1a31 Added a Testing message if you haven’t connected your workflow to Live yet 2023-03-22 16:14:36 +00:00
James Ritchie 829b851588 Small style tweak to the environments 2023-03-22 16:09:33 +00:00
James Ritchie 8f524f8c21 Style tweak to the environment banner 2023-03-22 15:44:50 +00:00
James Ritchie 0e2a7313c6 Toggle switch now clearer when disabled 2023-03-22 15:42:17 +00:00
Eric Allam 9ab7530070 Current environment is now workflow specific 2023-03-22 15:11:37 +00:00
Eric Allam f4833d3c1c Only show the “how to deploy cloud” section for enabled customers 2023-03-22 15:10:29 +00:00
Eric Allam 6d01f2ab0c Better logging when dispatching events 2023-03-22 15:10:29 +00:00
James Ritchie 6b5ebe79f4 Removed the Live and Cloud Deployed badges from the Workflows list 2023-03-22 12:20:50 +00:00
James Ritchie 83dece4617 Added a copy/paste api key button to the side menu of a workflow 2023-03-22 11:55:52 +00:00
James Ritchie 0b66a9ab37 Added API Keys into the Org menu if you don’t have a workflow 2023-03-21 13:01:30 +00:00
Eric Allam 4b50bf777f Prevent scheduled events from getting sent multiple times 2023-03-21 11:12:55 +00:00
Eric Allam 77a8505098 Don’t paginate logs 2023-03-21 11:12:55 +00:00
Eric Allam 1da4797835 Update server.ts 2023-03-21 11:12:55 +00:00
Eric Allam 410b282d38 Update zodPublisher to try and flush out retrying messages 2023-03-21 11:12:55 +00:00
Eric Allam 5d012a483d Prevent scheduled events from getting sent multiple times 2023-03-21 11:12:13 +00:00
Eric Allam 0feb793ce5 Don’t paginate logs 2023-03-21 11:11:33 +00:00
Eric Allam 26cccd15f9 Update server.ts 2023-03-20 23:40:09 +00:00
Eric Allam be4da5661e Update zodPublisher to try and flush out retrying messages 2023-03-20 23:03:08 +00:00
James Ritchie e5717080f2 Removed pulse animation from dropdown 2023-03-20 14:48:36 +00:00
James Ritchie de87d71e63 Made the enable workflow switcher disabled state more obvious 2023-03-20 14:05:52 +00:00
James Ritchie e93ecf4f8d Removed import 2023-03-20 14:05:23 +00:00
James Ritchie dae3edd3cd Mobile dropdown menus now work 2023-03-20 13:43:22 +00:00
James Ritchie af445a8f6d added padding to the public templates page 2023-03-20 13:16:51 +00:00
James Ritchie 02d114d6f0 Removed import 2023-03-20 12:59:18 +00:00
James Ritchie 8518531cf4 WIP added a new Cloud concertina panel to the Workflow Overview page 2023-03-17 17:29:33 +00:00
James Ritchie 192aad66b3 Moved up the API Keys page to the org level 2023-03-17 15:53:54 +00:00
James Ritchie 872b4a5e4d Added an environment disable/enable switcher to the side nav 2023-03-17 15:44:46 +00:00
James Ritchie 63a11f3f1b Added a Cloud Deployed badge to the workflows liist 2023-03-17 14:06:13 +00:00
James Ritchie 6d1bb15d46 Tools tips now takes Classname prop 2023-03-17 13:46:46 +00:00
James Ritchie aba95aaa04 Added a Live banner to the Workflows list 2023-03-17 13:46:22 +00:00
James Ritchie 338c0f0d4e Better organized the info on the repo settings screen 2023-03-16 19:40:55 +00:00
James Ritchie fd61a002a9 Moved the configure Github accounts button up to the top 2023-03-16 18:43:34 +00:00
James Ritchie fec7a0c96f Moved an if statement below the hooks 2023-03-16 17:28:15 +00:00
James Ritchie d06e9194c9 Removed the API keys from the org page 2023-03-16 16:56:11 +00:00
James Ritchie f8374783c1 Updated the layout of the Live overview page 2023-03-16 16:21:18 +00:00
James Ritchie 6f3be0138d Added the environment banner to the api key page 2023-03-16 16:13:02 +00:00
James Ritchie 15e527456d Moved API keys to their own page 2023-03-16 16:02:05 +00:00
James Ritchie 7d7e7ba078 Updated the colours for the environments (trying pink for dev) 2023-03-16 14:52:15 +00:00
D-K-P 1af020f8b8 Updated buttons from ‘grant access’ to ‘grant repo access’ 2023-03-16 14:20:30 +00:00
Eric Allam 79a1f5daea Set a max height on the KV step output 2023-03-15 16:29:57 +00:00
Eric Allam cee489025f Set a max height on the KV step output 2023-03-15 16:29:40 +00:00
Eric Allam e00a048afc Add new env vars to production env 2023-03-15 15:50:31 +00:00
Eric Allam 0ecebabd3f Add new env vars to production env 2023-03-15 15:50:12 +00:00
Eric Allam a9591ca396 Merge pull request #80 from triggerdotdev/dev
Technology Preview: Live repositories
2023-03-15 15:31:28 +00:00
Eric Allam db6be0f7cb Changeset: back to normal and cutting version @trigger.dev/sdk v0.2.22
- ab512157: Fixed an error message
- 1673d452: Added kv storage to persist data in between runs and between workflows
- 0b67b51a: Fix ESM error by dynamically importing ESM packages (chalk, terminal-link, etc.)
- f39bc44e: SDK now passes through the project ID from the env var
2023-03-15 15:05:43 +00:00
Eric Allam 683f24d4e4 Getting ready to update all templates to the newest SDK after it’s released 2023-03-15 15:05:43 +00:00
James Ritchie c4249d9e78 Made the progress icons on a deployment solid 2023-03-15 15:03:57 +00:00
James Ritchie e714b69896 Added the Refresh page button to a Pending workflow run 2023-03-15 14:56:51 +00:00
Eric Allam 378a7e390e Adding in good structured logging for the projects feature 2023-03-15 14:48:39 +00:00
James Ritchie 96a5ccd715 Fixed a layout issue with the main Org page 2023-03-15 14:25:41 +00:00
James Ritchie d3be9dc294 Fixed a bug with the layout on some pages 2023-03-15 14:23:35 +00:00
Eric Allam 3f60917d17 Disable scheduled triggers in development by default 2023-03-15 11:44:20 +00:00
James Ritchie 8430820faf Typo fixes in the custom event md files 2023-03-15 11:26:08 +00:00
D-K-P 7f5151dcf2 Added case sensitive comment to gh issues to slack 2023-03-15 11:13:44 +00:00
Eric Allam 8725a80d78 Better handle publishing messages to pulsar with a retry and better logging 2023-03-15 10:00:35 +00:00
Eric Allam fd85667515 Add UID to the workflow overview page to make my life easier 2023-03-15 09:05:17 +00:00
Eric Allam 16107fa5e6 Fixed staging webapp/wss CPU settings 2023-03-15 09:01:28 +00:00
Eric Allam ec727646fe Try out 2 min instances on staging 2023-03-15 08:59:47 +00:00
Eric Allam a7f4362a8b Unsubscribe from run command responses when a run is complete 2023-03-15 08:58:04 +00:00
James Ritchie 7c5d97c603 Uppercased a word 2023-03-14 22:11:19 +00:00
D-K-P f7850c14f9 Added more instructions to the Notion readme 2023-03-14 22:02:22 +00:00
James Ritchie a4813fe141 Changed the dev env colour back to green 2023-03-14 21:35:20 +00:00
Eric Allam 5e45309b81 Add the fixed live TRIGGER_API_KEY to project settings 2023-03-14 21:09:39 +00:00
Eric Allam 5f0cebc879 Don’t accidentally re-enable a disabled workflow if it’s registered again 2023-03-14 21:03:30 +00:00
James Ritchie 122020e66b added an environment banner to the top of every workflow page 2023-03-14 19:00:05 +00:00
Eric Allam c166ca6aa5 Show deploy logs when stopped and stopping 2023-03-14 18:49:00 +00:00
Eric Allam 7bbe42935e Got typecheck to pass 2023-03-14 18:46:25 +00:00
Eric Allam decb17c1ab Improve blank state copy (thanks to GPT-4) 2023-03-14 18:42:09 +00:00
Eric Allam 61246dcfb4 Filter out undefined steps after the Promise.all returns 2023-03-14 18:36:40 +00:00
Eric Allam 9625258394 Only show the environment picker on the workflow side menu 2023-03-14 18:27:44 +00:00
James Ritchie c051aa284a Moved the environment dropdown into the sidebar 2023-03-14 17:04:27 +00:00
Eric Allam b605ecdaaa Add sentry to WSS 2023-03-14 16:05:34 +00:00
James Ritchie 27d8742829 Fixed a Safari bug with missing arrow 2023-03-14 15:05:42 +00:00
Eric Allam 7cb350e37b Show last 3 deploys on project overview, and move deploys above workflows 2023-03-14 14:55:12 +00:00
James Ritchie e400d2f1fb Improved the header on mobile 2023-03-14 14:35:16 +00:00
Eric Allam 221370ba9e Fixed issue with handling installation.deleted github events 2023-03-14 14:32:50 +00:00
Eric Allam a446367514 Better handle redelivering messages instead of swalloing them up 2023-03-14 14:26:24 +00:00
James Ritchie 50e6d37780 Fixed 2 broken login links 2023-03-14 14:23:31 +00:00
James Ritchie 4803ad3c9a Small UI update to the Build logs layout 2023-03-14 14:18:24 +00:00
Eric Allam 7db68764ac Structure debug logs and retry workflow registration up to 4 times 2023-03-14 13:57:25 +00:00
Eric Allam ef48592a73 WorkflowRunSteps can be created in an “incomplete” state, so let’s not throw an exception when in that state 2023-03-14 12:43:31 +00:00
Eric Allam d0dd3d5acf Implement logout user tooltip 2023-03-14 11:55:51 +00:00
James Ritchie 0c74035a8f Added the username to the logout button and added a logout to the main org page 2023-03-14 11:50:59 +00:00
Eric Allam 213012b66e Implement repo blank state conditional 2023-03-14 11:27:45 +00:00
James Ritchie 2022d0ba56 Added a new state for connecting your github account to the main repo page 2023-03-14 11:16:09 +00:00
Eric Allam ae68825306 Decorate workflow registered logs 2023-03-14 10:51:32 +00:00
Eric Allam aa575b0d79 Better dockerfile 2023-03-14 10:21:50 +00:00
Eric Allam 4e83ef642d Update prerelease template deps script 2023-03-14 09:15:12 +00:00
Eric Allam e6740b5451 Remove org template code for when a workflow is created 2023-03-14 09:15:01 +00:00
Eric Allam 2e0a820518 Disable deploy buttons while the action is submitting 2023-03-13 20:46:35 +00:00
Eric Allam b5e47b7d60 Remove log logging 2023-03-13 20:28:14 +00:00
Eric Allam 3d328aeaaf Implement duration 2023-03-13 20:26:35 +00:00
Eric Allam 952fa6bc9e Handle deploying old templates with broken SDKs when built 2023-03-13 20:09:27 +00:00
Eric Allam 7d3bc03594 Allow admins to create as many projects as they wish 2023-03-13 20:09:27 +00:00
James Ritchie 19baf3f04a Updated link styling for logs blank state 2023-03-13 18:57:50 +00:00
James Ritchie 73d488f97d Added duration time to Deploy page 2023-03-13 18:54:02 +00:00
James Ritchie d6d8ca67a8 Tooltip modal colour fix 2023-03-13 18:42:24 +00:00
James Ritchie 9a93b0fee7 Fixed side nav height issue 2023-03-13 18:40:13 +00:00
James Ritchie 900eece37d Added Typeforms for request a workflow and integration 2023-03-13 18:36:52 +00:00
James Ritchie 20711ce4b2 Logout moved to the side menu 2023-03-13 17:55:20 +00:00
Eric Allam d9a43dc579 Implement the multiple hosted repo waitlist feature 2023-03-13 17:47:57 +00:00
James Ritchie f2aac62611 Small side menu width fix 2023-03-13 17:41:52 +00:00
James Ritchie 26d2392ac2 Added a cloud modal when trying to deploy a second repo 2023-03-13 17:30:57 +00:00
Eric Allam 64585b3393 Make sure repos can deploy if they are in error state 2023-03-13 17:00:17 +00:00
Eric Allam 58d919efdc Added build logs and make sure build logs are all captured 2023-03-13 16:37:18 +00:00
Eric Allam 5eeb275b32 Release template deps script 2023-03-13 15:33:23 +00:00
Eric Allam 629ee14b55 Show the latest commit in a project (even if it’s not deployed). Don’t deploy on pushes when all env vars haven’t been set 2023-03-13 15:33:23 +00:00
James Ritchie 113752e3e9 Showing a Spinner when new deploys are pending or building 2023-03-13 14:50:49 +00:00
James Ritchie 758fad8447 Removed the URL and made the Name a link instead 2023-03-13 14:29:10 +00:00
James Ritchie 3967befabd Added tooltip label to logo with a secondary nav 2023-03-13 14:17:55 +00:00
James Ritchie cbff0baf15 Fixed public page layouts 2023-03-13 13:36:30 +00:00
Eric Allam b0cccc059a Update lockfile 2023-03-13 13:36:14 +00:00
Eric Allam c879f48109 Better error message when trying to deploy an unsupported repository 2023-03-13 13:29:38 +00:00
Eric Allam fce52cee6b Changeset: prerelease next packages 2023-03-13 13:29:38 +00:00
James Ritchie aedf7e7295 Fixed layout of New Org page 2023-03-13 12:28:59 +00:00
James Ritchie c593132663 Reimplemented the impersonation banner 2023-03-13 12:23:45 +00:00
Eric Allam ff7bdd7619 Add cloud related env vars to staging env 2023-03-13 11:41:40 +00:00
Eric Allam c229fa31fc Setup posthog site feedback widget 2023-03-13 11:28:22 +00:00
James Ritchie 632f76cbb9 Added the Org nav to the Repo Coming Soon page 2023-03-13 11:27:12 +00:00
Eric Allam 5dae509aa9 Fixed up a bunch of nav issues 2023-03-13 11:22:54 +00:00
James Ritchie 1b902dabfa Updated the repository coming soon page 2023-03-13 11:01:38 +00:00
Eric Allam a1043a3b28 Added coming soon page for the cloud hosting 2023-03-13 10:35:19 +00:00
James Ritchie 22c682bf4c Added a new Org side menu 2023-03-13 10:29:04 +00:00
Eric Allam 0b67b51ae4 Fix ESM error by dynamically importing ESM packages (chalk, terminal-link, etc.) 2023-03-12 20:35:57 +00:00
Eric Allam 1673d4527a Added KV store feature 2023-03-12 20:12:18 +00:00
James Ritchie 5e762a9cbf Moved request integration button to top right of page 2023-03-12 10:26:27 +00:00
Eric Allam 406be0107e A couple side menu fixes 2023-03-11 21:16:30 +00:00
James Ritchie 4ab4174cb2 Improved the layout of the settings page 2023-03-11 18:35:54 +00:00
James Ritchie 78e6ed9bfc Added some messaging for blank states 2023-03-11 18:27:31 +00:00
James Ritchie f813e59b0c Improved the state if you haven’t granted access to github yet 2023-03-11 18:16:26 +00:00
James Ritchie 2992a855f9 Added active states to the collapsed side menu 2023-03-11 17:53:28 +00:00
James Ritchie f172a0ee1a Added titles on hover for the compact menu 2023-03-11 17:38:15 +00:00
James Ritchie 3c74e4f5f6 organized imports 2023-03-11 17:38:04 +00:00
James Ritchie bf4eefe4fd Long titles now ellipsis in the menu header 2023-03-11 17:13:21 +00:00
James Ritchie 2e81d6fe20 Fixed page layouts when they have the secondary nav in them 2023-03-11 17:07:43 +00:00
James Ritchie 77f243a14a Fixed the app layout width 2023-03-11 16:37:46 +00:00
James Ritchie 4245c21248 Added a section title to the side menu 2023-03-11 16:37:35 +00:00
James Ritchie e6d276de03 Added a title to the top of the nav 2023-03-11 16:13:26 +00:00
Eric Allam 3c09c1704d Add single run API endpoint 2023-03-11 15:40:01 +00:00
Eric Allam 0e3c3a78d7 Add single run API endpoint 2023-03-11 15:39:34 +00:00
Eric Allam fa28005f40 Move around stuff for the new nav structure 2023-03-11 15:33:03 +00:00
Eric Allam 3a956c2718 Add runs JSON endpoint 2023-03-10 18:41:10 +00:00
Eric Allam a21e9e9838 Fixes an issue where the trigger workflow ttl guard was preventing workflow runs from resuming after being disconnected 2023-03-10 18:41:10 +00:00
Eric Allam c109a9f31c Add runs JSON endpoint 2023-03-10 18:38:46 +00:00
James Ritchie c1dd5e92fe Moved the github connect button to top right 2023-03-10 18:25:26 +00:00
James Ritchie 441183975c Updated the select repo page 2023-03-10 18:23:30 +00:00
Eric Allam 0f9c0a8d06 Improve the select repo experience a little bit 2023-03-10 17:58:32 +00:00
Eric Allam 5beba8f12e Fixes an issue where the trigger workflow ttl guard was preventing workflow runs from resuming after being disconnected 2023-03-10 17:58:32 +00:00
James Ritchie 9b7102605f Fixed the create new workflow page layout 2023-03-10 17:10:12 +00:00
James Ritchie 0618cd0d7a Improved the visibility of the copy CLI text button 2023-03-10 17:09:59 +00:00
James Ritchie bc7f11fb57 Improved the API Key messaging 2023-03-10 17:06:15 +00:00
James Ritchie 19d731eebb removed unused imports 2023-03-10 16:53:32 +00:00
James Ritchie e2b183bd96 Added better buttons to the header 2023-03-10 16:53:11 +00:00
James Ritchie 80709c5415 Improved button focus states 2023-03-10 16:52:54 +00:00
James Ritchie 22e3c7f5f2 Fixed height of AppBody 2023-03-10 16:38:37 +00:00
James Ritchie 843231c410 WIP Improving the side navigation for the app 2023-03-10 16:13:40 +00:00
James Ritchie 1a33bdd3ae Updated the side menu - removed redundant items 2023-03-10 16:13:40 +00:00
Eric Allam c0300c6bec Deal with project settings and environment vars, and disabling projects 2023-03-10 15:43:40 +00:00
James Ritchie bffa5ef0e2 Improvements to the Logs page 2023-03-09 18:52:31 +00:00
James Ritchie 4e95232d59 improved the markup for the deploy page info panel 2023-03-09 18:40:32 +00:00
James Ritchie ca64356f12 Select repo now has a state for ‘relevant’ 2023-03-09 18:38:25 +00:00
James Ritchie c2c1b0feb4 Improvement to the repo page 2023-03-09 16:30:06 +00:00
James Ritchie 57afaf1995 Improvements to the repo details panel 2023-03-09 16:05:27 +00:00
Eric Allam 4c965ed5a2 Fixed issue with pending project endlessly revalidating 2023-03-09 16:01:03 +00:00
James Ritchie 0462141e1b Improvements to the Overview and deploy pages 2023-03-09 15:52:29 +00:00
Eric Allam ce39397c57 Better format log dates 2023-03-09 15:39:07 +00:00
Eric Allam 55cb81f7af Implement the log page along with the log links 2023-03-09 15:31:38 +00:00
James Ritchie f7a4e69025 status icon improvements 2023-03-09 14:23:38 +00:00
Eric Allam 55ac0019b7 Couple tweaks to the logs 2023-03-09 14:22:35 +00:00
Eric Allam b87a3dd2ba More logging work and buttons for stoppping or cancelling a deployment 2023-03-09 14:02:03 +00:00
Eric Allam 41c751c081 Changing on logs are polled, and now polling for build logs as well 2023-03-09 14:01:28 +00:00
Eric Allam 1f34a22bd8 Update how we poll for logs and add build logs back in 2023-03-09 14:01:28 +00:00
James Ritchie 10ef03eee0 Coloured the log red if it’s an error 2023-03-09 13:17:33 +00:00
James Ritchie bef6de13db Added a new logs table 2023-03-09 13:10:29 +00:00
D-K-P bd356663cc Removed .dev from Acme 2023-03-09 11:53:01 +00:00
James Ritchie 1670c3e19b Compressed the info in the overview panel 2023-03-09 11:03:35 +00:00
James Ritchie aa35555356 Added a Stop button 2023-03-09 10:48:18 +00:00
James Ritchie 1520be20c4 Added a view build logs with disabled property 2023-03-09 10:33:03 +00:00
James Ritchie 9cd49a40d5 Show spinner if status is deploying, pending, building. Also added live reload indicator 2023-03-09 10:17:21 +00:00
James Ritchie d27f11e26c More status colour updates 2023-03-09 09:51:17 +00:00
James Ritchie 9aff64183b Updated status colours 2023-03-09 09:48:49 +00:00
James Ritchie 5e32c8498b New layout for the deployment page 2023-03-09 09:42:11 +00:00
Eric Allam bd2f2d442d Implement the select repo grouping by gtihub account 2023-03-09 09:11:27 +00:00
James Ritchie 328ff206d7 Updated deployListStatus 2023-03-09 09:07:25 +00:00
James Ritchie 774a0fe9e3 Added a Header 2023-03-08 20:52:23 +00:00
James Ritchie 3eb76739cc Added type=submit 2023-03-08 20:52:05 +00:00
James Ritchie f00f6ae1bd Improvements to the deployment overview page 2023-03-08 20:32:52 +00:00
James Ritchie 7798c0166d Added a set of icons, loading indicators and titles to use for the deployment status 2023-03-08 20:28:02 +00:00
James Ritchie 9c63687d56 Initial clean up of the deploy page 2023-03-08 20:28:01 +00:00
Eric Allam 28cad34c5f Deployment logs 2023-03-08 18:19:07 +00:00
James Ritchie 86d345bffc Improved the layout for the list of github repos 2023-03-08 15:07:15 +00:00
James Ritchie 9cdab61eaf Showing a conditional state if you have no repos connected yet 2023-03-08 14:00:37 +00:00
James Ritchie 48b35c47b4 Improvements to the Repository list 2023-03-08 13:00:57 +00:00
Eric Allam 349d7f38cc Added deploy and project list (live WIP) 2023-03-07 22:13:37 +00:00
Eric Allam 7cbc279407 Manual deploy and added a deployment version number 2023-03-07 16:24:32 +00:00
Eric Allam 301d500c3d Fixing the re-exporting of routes 2023-03-07 15:37:55 +00:00
Eric Allam 4150ba8786 If a repo is already in a project, then just link to it from the select repo page 2023-03-07 15:19:43 +00:00
Eric Allam f39bc44eec Projects
- Deploy a new VM when a push event comes through
- Live updating project overview page
2023-03-07 15:12:42 +00:00
Eric Allam 4fabd481e6 The repos that are included in a workflow are the most relevant repos 2023-03-07 15:12:42 +00:00
D-K-P a374338ac5 Added repo rename instructions to gh issues to slack / gh stars to slack 2023-03-07 10:05:33 +00:00
D-K-P a7337478d0 Added Resend queue jump instructions to the readme 2023-03-07 10:03:58 +00:00
James Ritchie a7b37e9f7b impersonate banner style fix 2023-03-03 15:14:35 +00:00
James Ritchie 48e0cff123 Lots of improvements to the app layout behaviour
Main improvements:

- You can have different footer if logged in or out
- Footers aren’t fixed to the bottom of the page if logged out
2023-03-03 15:14:35 +00:00
James Ritchie 8a4cc312a1 Templates and overview pages now viewable on logged in mobile 2023-03-03 15:14:35 +00:00
Eric Allam f008f803b8 Updating github app configuration works, and paginating all repos for an installation as well, and displaying a list of repos to deploy 2023-03-03 14:35:43 +00:00
Eric Allam b43224c353 Upgrade to remix v1.11.0 for streaming and defer support 2023-03-03 14:35:43 +00:00
Eric Allam 8bb9798ff4 Fire off an app installation callback 2023-03-03 14:35:43 +00:00
James Ritchie 86ae6f927a Fixed safari bug where h-full was shunting content off the screen 2023-03-03 11:53:35 +00:00
Eric Allam c0693ac508 Cleanup old github app stuff and octokit and prepare for installing new github app for cloud 2023-03-03 11:13:07 +00:00
Eric Allam ab512157a5 Added ability to patch all template repos and push the changes 2023-03-03 08:34:15 +00:00
Eric Allam 86475d4e3c Changeset: version (@trigger.dev/sdk v0.2.21) 2023-03-02 22:31:44 +00:00
Eric Allam c5084209eb Fix for metadata capture when using npm/yarn 2023-03-02 22:30:43 +00:00
Eric Allam eada69040c Bump notion 2023-03-02 22:30:43 +00:00
Eric Allam 6deabb21ba Bump notion 2023-03-02 22:30:43 +00:00
James Ritchie 2bb324752e Removed the Product Hunt Banner but kept it commented out for later 2023-03-02 18:05:59 +00:00
Eric Allam 174954511e Changeset: version (fixing integration package versioning) 2023-03-02 15:36:56 +00:00
Eric Allam 408bd6ddc8 Added a script to automatically update template repo @trigger.dev packages instead of having to do it manually 2023-03-02 15:34:53 +00:00
Eric Allam 1789d9d215 Use the caret semver for the SDK in all the other packages 2023-03-02 14:44:33 +00:00
Eric Allam f3ac17ad91 Use caret constraint for the sdk in airtable as well 2023-03-02 13:27:19 +00:00
Eric Allam 71d78805e7 Use a caret constraint for the SDK to prevent updating integration dependencies when the SDK bumps a minor version (github only) 2023-03-02 12:43:13 +00:00
Eric Allam 3012771a21 Remove unused argument 2023-03-02 12:29:56 +00:00
Eric Allam 5ec7198046 Send additional metadata about a workflow when initializing the host 2023-03-02 12:29:47 +00:00
D-K-P 60cb8d54c4 Added tooltips to sidebar and org page 2023-03-01 18:47:31 +00:00
D-K-P 9d7186eba5 Added sendgrid template 2023-03-01 17:42:32 +00:00
D-K-P 5401fa1acb Added basic cron template 2023-03-01 14:18:32 +00:00
Matt Aitken 79f21fd94e Fix for bad documentation url in Notion spec 2023-03-01 13:47:14 +00:00
James Ritchie fa7ec12434 Added a Product Hunt banner 2023-03-01 12:54:52 +00:00
Matt Aitken c6a668a5f6 Set is constant 2023-02-28 20:52:34 +00:00
Matt Aitken dd786845b7 Removed curly bracket from the end of the combined schema 2023-02-28 20:32:30 +00:00
Matt Aitken 03e90ea48f Merge pull request #75 from triggerdotdev/dev
GitHub Issue to Notion template
2023-02-28 20:29:41 +00:00
Matt Aitken fee24168aa Revert "Added a save/cancel button for changing webhook secrets"
This reverts commit ce019c7b96.
2023-02-28 19:52:09 +00:00
Matt Aitken b344dfaaf8 Added the GitHub issue -> Notion template 2023-02-28 19:50:02 +00:00
James Ritchie ce019c7b96 Added a save/cancel button for changing webhook secrets 2023-02-28 18:19:22 +00:00
D-K-P 9a52afe1e2 Added new images for all the templates and increased their size on the template grid 2023-02-28 15:07:39 +00:00
Matt Aitken d67e429f23 Merge pull request #74 from triggerdotdev/dev
 New Integration: Notion API
2023-02-28 15:07:11 +00:00
Eric Allam 628726459a Added the supabase to loops template image 2023-02-28 15:04:44 +00:00
Matt Aitken 603c3953c6 Any action input that isn’t part of the params is put in the body 2023-02-28 14:27:55 +00:00
Matt Aitken 8a7795bd4d Don’t validate the action body 2023-02-28 14:27:55 +00:00
Matt Aitken 9202d3458a Added Notion production client id 2023-02-28 14:27:55 +00:00
Eric Allam fb98a4708f Added supabase to loops template 2023-02-28 14:07:04 +00:00
Matt Aitken b29039735b Fix for connection dropdowns only working for services (not the source) 2023-02-28 12:33:45 +00:00
Matt Aitken 4d5303b0ad Changeset version: @trigger.dev/notion@0.1.24 2023-02-28 12:33:45 +00:00
Matt Aitken c3f292a320 Changeset added: @trigger.dev/notion Far smaller SDK, by creating shared types 2023-02-28 12:33:45 +00:00
Matt Aitken cb414b448e Don’t generate intermediate schema 2023-02-28 12:33:45 +00:00
D-K-P 5ad6330868 Added discord > supabase image 2023-02-28 11:48:34 +00:00
Matt Aitken e8ee088f85 Generated Notion SDK 2023-02-28 11:13:45 +00:00
Matt Aitken 167b1d1db9 Generated Airtable 2023-02-28 11:06:44 +00:00
Matt Aitken a365b81915 Generated Sendgrid 2023-02-28 11:06:44 +00:00
Matt Aitken 697e8f930a Added Prettify to the inputs and outputs inline 2023-02-28 11:06:44 +00:00
Matt Aitken 0e0baa8af8 You can generate specific integrations now 2023-02-28 11:06:44 +00:00
Matt Aitken a82088c243 Autoreffer works deep to shallow so we get refs inside refs. Better auto-naming 2023-02-28 11:06:44 +00:00
Matt Aitken e4fc05924e Autoreffer now only refs after x occurences, works for string enums too 2023-02-28 11:06:44 +00:00
Matt Aitken b3a46212ee Generate the service and use the auto reffer, and output intermediate files for viewing 2023-02-28 11:06:44 +00:00
Matt Aitken dec790e4a3 AutoReffer improved 2023-02-28 11:06:44 +00:00
Eric Allam a146469d63 Fixed bug where a duplicate event ID would throw an error instead of returning a success 2023-02-28 09:35:19 +00:00
Matt Aitken e5a3bb8903 Automatically create references to de-duplicate objects 2023-02-27 23:12:45 +00:00
Matt Aitken b61b5054dc Type generator works with $refs 2023-02-27 23:12:35 +00:00
Matt Aitken b613f3bbfc Deal with undefined params where an endpoint has no input 2023-02-27 23:12:08 +00:00
Matt Aitken 800ae1d834 Added Notion to the list of packages 2023-02-27 23:11:53 +00:00
Matt Aitken d5d3786a97 Automatically set "Notion-Version" to "2022-06-28" so users don’t have to 2023-02-27 21:39:06 +00:00
Matt Aitken b90eeea1e8 Allow generating actions with some manipulation 2023-02-27 21:39:06 +00:00
Matt Aitken aa30013e05 Params go before body in the generated SDK 2023-02-27 21:39:06 +00:00
Matt Aitken eaf06638c3 Generating the docs and SDK now deals better with anyOf 2023-02-27 21:39:06 +00:00
Eric Allam 4834eabb9d Scroll restoration not working for some reason so need to do full reloads when going to a template page 2023-02-27 18:23:17 +00:00
Eric Allam 8aceb6418a Added supabase-to-discord template 2023-02-27 18:05:07 +00:00
Eric Allam da6062a20c Changeset: new version 2023-02-27 16:54:09 +00:00
Eric Allam b57241951b Fixed issue where default webhook schema wasn't being used which caused an error 2023-02-27 16:53:55 +00:00
Matt Aitken 6a1823b242 Installed packages 2023-02-27 15:12:45 +00:00
Matt Aitken 2ad039f867 Merge remote-tracking branch 'origin/integrations/notion' into dev
# Conflicts:
#	pnpm-lock.yaml
2023-02-27 15:12:17 +00:00
Matt Aitken 634ec6c1e3 Added Notion staging OAuth details 2023-02-27 15:11:38 +00:00
Matt Aitken a73ddb2dad Generated Notion SDK 2023-02-27 14:46:59 +00:00
Matt Aitken 0504667334 Combine allOf schemas before generating the types, much better results and docs 2023-02-27 14:46:41 +00:00
Matt Aitken 6d85eee0cd Generate the SDKs in sequence not parallel 2023-02-27 14:28:55 +00:00
Matt Aitken 1f43988ad9 Increased generate-integrations memory to 16GB… we need to optimise this at some point 2023-02-27 14:24:21 +00:00
Matt Aitken 0129cbb162 Generating docs works with allOf 2023-02-27 14:24:05 +00:00
Matt Aitken 0121e1b50d SDK input schema is now the merged object of params and body 2023-02-27 14:23:54 +00:00
Eric Allam 63b1c2237a Changeset: release new version 2023-02-27 14:03:29 +00:00
Eric Allam c72120eab0 Removed accidental log statement 2023-02-27 14:03:15 +00:00
Eric Allam 85ced7818f Merge pull request #72 from triggerdotdev/dev
Change from npm create trigger to npx create-trigger
2023-02-27 13:49:59 +00:00
Eric Allam 313b7163e8 Change from npm create trigger to npx create-trigger 2023-02-27 13:49:04 +00:00
Eric Allam 55eb81f219 Merge pull request #71 from triggerdotdev/dev
Onboarding improvements using the new create-trigger CLI
2023-02-27 13:07:30 +00:00
Eric Allam b0e64937a0 Changeset: new version 2023-02-27 13:04:15 +00:00
Eric Allam 3a2cf0ddb7 Fixed the missing error message when logging invalid API key and improved the error message 2023-02-27 13:03:14 +00:00
Matt Aitken 0f90ea9455 getComments and createComment 2023-02-27 13:01:27 +00:00
Matt Aitken 6d2217bd18 updateDatabase 2023-02-27 12:48:39 +00:00
Eric Allam 1579cdbfb2 Changeset: release new version 2023-02-27 12:11:58 +00:00
James Ritchie f1e81137b7 Improved the copy for how to trigger your workflow 2023-02-27 12:10:50 +00:00
Matt Aitken 0f51328979 createDatabase 2023-02-27 12:03:43 +00:00
Matt Aitken aea812f621 queryDatabase 2023-02-27 11:59:45 +00:00
Eric Allam 45b2bea39f Changeset: version next.3 2023-02-27 11:35:08 +00:00
Eric Allam 4f47d03114 Added changeset 2023-02-27 11:35:08 +00:00
Eric Allam 618cca3304 Validate the API key (to better work with the templates and the CLI) 2023-02-27 11:35:08 +00:00
Matt Aitken 4fe573b397 getDatabase 2023-02-27 11:32:21 +00:00
Matt Aitken d338b95e7e deleteBlock 2023-02-27 11:26:28 +00:00
Matt Aitken 2d9bdb26d4 appendBlockChildren 2023-02-27 11:23:24 +00:00
Matt Aitken b660a4c07f Update block and get block children 2023-02-27 11:16:41 +00:00
James Ritchie 5706c3ab52 Improved the API information link 2023-02-27 11:14:46 +00:00
James Ritchie e8c81cafb8 Improved some of the Template’s title copy 2023-02-27 11:14:46 +00:00
Eric Allam a0d062c977 Changeset: version next.2 2023-02-27 11:10:06 +00:00
Eric Allam 87a3bbee8e Added a more helpful message when adding an API key 2023-02-27 11:09:38 +00:00
Matt Aitken 65aa6e4e4c Get block endpoint 2023-02-27 09:26:28 +00:00
Matt Aitken 0432a64357 Update page endpoint 2023-02-27 09:19:28 +00:00
Eric Allam a5ff50f737 Implement new API key sidebar and a couple other various fixes 2023-02-26 22:15:49 +00:00
James Ritchie 763dd8b55a Improved the environment panel in the side menu to be clearer 2023-02-26 19:10:06 +00:00
Matt Aitken c2eea6c2b6 Added todos with remaining endpoints 2023-02-26 18:56:07 +00:00
Matt Aitken 81bbae977f Fix for endpoints that return void 2023-02-26 18:53:25 +00:00
Matt Aitken 37bd8f4952 Separated the bot endpoint response so it doesn’t mess the SDK generation up 2023-02-26 18:47:10 +00:00
Matt Aitken 20d6c6fdfb Added typecheck to integrations 2023-02-26 18:37:11 +00:00
Matt Aitken ebc45b7f8d Fix for typecheck error in services 2023-02-26 18:37:05 +00:00
Matt Aitken 77f146210a Fixed generating successful responses schemas 2023-02-26 18:36:58 +00:00
Matt Aitken 18cb9c6bec Fix for badly named file 2023-02-26 18:36:40 +00:00
Matt Aitken dfd4966cb0 Removed validation when doing requests, changed the way we select the success/fail on a response 2023-02-26 18:24:13 +00:00
Matt Aitken d7384bf481 Nock file for creating a page 2023-02-26 18:23:25 +00:00
James Ritchie 9e5c687174 Improvements to the Org page api keys 2023-02-26 18:04:10 +00:00
James Ritchie dcbb0f5287 small padding fix 2023-02-26 17:54:52 +00:00
James Ritchie d64cfe5add Widened the pages displaying the Template grid 2023-02-26 17:40:21 +00:00
James Ritchie 1fa52f1c8c Added padding back to the template cards 2023-02-26 17:40:00 +00:00
Matt Aitken f7dfc712b5 Added content-type to the createPage spec 2023-02-26 17:37:47 +00:00
Matt Aitken 1cfb93ada9 Remove validation of the request body and params 2023-02-26 17:29:43 +00:00
James Ritchie ea28f3dd47 Added installation instructions to the npm copy button for a template 2023-02-26 17:29:00 +00:00
James Ritchie 2c563ce998 Improvements to the Container component for mobile 2023-02-26 17:28:31 +00:00
Matt Aitken 7437d9fbd6 Create page test – this crashes Node because the schema is so massive… 2023-02-26 17:27:11 +00:00
James Ritchie 7dd0102579 Fixed the public template page on mobile 2023-02-26 17:08:29 +00:00
Matt Aitken 16c152ec26 Updated Notion Nock files 2023-02-26 17:05:02 +00:00
James Ritchie 01bc7df3e2 Template Overview page sticky left column now works 2023-02-26 16:51:37 +00:00
Matt Aitken 92d4008cc2 Notion specs updated by pointing at new generated schemas. Tests passing. 2023-02-26 16:50:57 +00:00
James Ritchie 6d4f71d22c Improvements to the template grid 2023-02-26 16:46:01 +00:00
Matt Aitken 2770df644b Imported dependencies and formatted Notion schemas 2023-02-26 16:33:21 +00:00
James Ritchie cc002ef707 Increased the width of the template overview side column so you can see more package info 2023-02-26 16:06:38 +00:00
James Ritchie f552af517b Removed redundant class 2023-02-26 15:58:57 +00:00
James Ritchie 8aff958bd3 Copy fix 2023-02-26 15:57:06 +00:00
James Ritchie ad189b1f4b Improved the scroll bars on modals 2023-02-26 15:54:48 +00:00
Matt Aitken 7bebf919e2 Fixed imports and formatted some of the files 2023-02-26 15:39:43 +00:00
James Ritchie e54ba7cbed Improved the Create workflow page and moved some info into a modal 2023-02-26 15:39:10 +00:00
Matt Aitken 4b6e21d6d4 Split Notion schemas into more sensible sized files 2023-02-26 15:32:22 +00:00
Matt Aitken 21d70821de Massive Notion schema from SDK 2023-02-26 14:38:17 +00:00
Matt Aitken a4d3f1b61c Massive generated schema 2023-02-26 14:37:08 +00:00
Matt Aitken 42e297474c Delete old schemas 2023-02-26 14:37:00 +00:00
Matt Aitken a40afd55d2 Output the schema refs when generating a schema 2023-02-26 14:34:04 +00:00
Matt Aitken 621254d0ab Fleshed out the specs some more 2023-02-26 13:26:15 +00:00
Matt Aitken 0ff568843d make functions turn properties into optional 2023-02-26 13:26:03 +00:00
James Ritchie 1d056b5328 Updated the org page styles 2023-02-26 12:26:31 +00:00
Eric Allam cf7c413c87 Combine the workflow onboarding into one component and obfuscate the api key 2023-02-24 22:16:53 +00:00
Eric Allam ac87a634a3 Add in the apiKeys in the orgs list page, obfuscated, and obfuscate them in the SideMenu as well 2023-02-24 22:09:30 +00:00
Matt Aitken 1bc9bc9244 getPage is working 2023-02-24 19:18:35 +00:00
Matt Aitken 2fea9e5a6c Use a test Notion workspace so I can test all the integration features 2023-02-24 19:12:43 +00:00
Matt Aitken 2756bfe073 Notion search is working and performance is good (when a schema is cached) 2023-02-24 19:05:19 +00:00
Matt Aitken 165ca9cb0f Option to measure performance of validation and compiling 2023-02-24 19:04:46 +00:00
James Ritchie c9e411be9b Simplified the info on the template cards 2023-02-24 18:51:38 +00:00
James Ritchie ee4e181fc3 Added ability to copy env vars from the Org page 2023-02-24 18:51:38 +00:00
James Ritchie f51f8f3ece Added more styles to the copy text panel 2023-02-24 18:51:38 +00:00
Matt Aitken 840435284b Using ajv to compile on-demand and validate using JSON Schemas 2023-02-24 18:48:03 +00:00
D-K-P 12f4f3bc68 Changed blank starter and hello world images 2023-02-24 18:02:21 +00:00
Eric Allam 894a5dcb5d Pass through command flags 2023-02-24 17:58:05 +00:00
Matt Aitken d65ef5eb87 If schema validation fails on prod and it’s a 2xx status, let it through as a success and log validation error 2023-02-24 17:49:41 +00:00
Matt Aitken 71007b5f60 Added Sentry to the integrations service 2023-02-24 17:49:02 +00:00
Eric Allam 3af9b63a9c Changeset: release next.1 version 2023-02-24 17:34:09 +00:00
Eric Allam 0932ae7d89 Log out when a run first starts, as well as completes 2023-02-24 17:32:13 +00:00
Matt Aitken 43250c444e Added Notion database schema (748 lines 😳) 2023-02-24 17:14:28 +00:00
Eric Allam 12056d888b Update the docs for the new create-trigger cli 2023-02-24 16:36:50 +00:00
Eric Allam 63e004594c No workflows in the blank starter 2023-02-24 16:20:25 +00:00
James Ritchie ec3e98ca9f Updated the Orgs with more distinct icons 2023-02-24 16:12:48 +00:00
Matt Aitken 0ccc6d3729 Search is working with pages, but not databases yet 2023-02-24 16:12:05 +00:00
Eric Allam f3ffffd50b implement the New Workflow page and add the api key to the command to copy for templates and the main one 2023-02-24 15:59:34 +00:00
Eric Allam e6550d156e Convert basic starter to hello world and added isLive to templates to filter out the existing basic starter 2023-02-24 15:29:27 +00:00
James Ritchie ae550df37d Updated the Workflows Overview page if you have no workflows 2023-02-24 15:25:45 +00:00
James Ritchie 26ac1fa57c CopyText ignores default and propagation clicks 2023-02-24 15:25:45 +00:00
James Ritchie 14031a8c6e Title component now accepts className 2023-02-24 15:25:45 +00:00
James Ritchie 719ef2a3a9 Improved the grid template styles 2023-02-24 15:25:45 +00:00
Matt Aitken e779cff42a New nock responses 2023-02-24 15:05:07 +00:00
Matt Aitken 0b3c3758a7 Switched to using oauth for Notion 2023-02-24 15:05:00 +00:00
Matt Aitken ab351cbc8e Merge remote-tracking branch 'origin/nango-upgrade' into integrations/notion
# Conflicts:
#	apps/integrations/package.json
2023-02-24 14:56:06 +00:00
Matt Aitken dd4fc8c262 Added search endpoint but the current auth token is giving no results back 2023-02-24 14:54:56 +00:00
Matt Aitken a55acb6296 More page types and fixed Notion tests 2023-02-24 13:33:46 +00:00
Eric Allam aa295134ff Changeset: prerelease the next version 2023-02-24 13:29:36 +00:00
Eric Allam b2f14cbea3 Make the SDK a patch 2023-02-24 13:29:08 +00:00
Eric Allam 26e69cb659 Added cli changeset 2023-02-24 13:15:49 +00:00
Eric Allam 51f9bc9d72 Added handy links to the SDK when logging information about the workflows 2023-02-24 13:15:49 +00:00
Eric Allam 74a6a21c35 Adding the create-trigger CLI package 2023-02-24 13:15:49 +00:00
Matt Aitken 4cae6fed63 Added a lot more schemas for the page 2023-02-24 12:51:31 +00:00
James Ritchie b69058bfcb Style tweaks 2023-02-24 12:17:00 +00:00
James Ritchie 1c5d8a4c0b Updated the template page to include the npm copy panel, link to repo and docs 2023-02-24 11:53:48 +00:00
Matt Aitken 28c70ab9d1 Upgrade to the latest Nango – this will require a manual server migrate and testing 2023-02-24 11:34:29 +00:00
James Ritchie 15ab35c816 Added a new copy npm install values to the template cards 2023-02-24 11:31:51 +00:00
James Ritchie 1218320492 Added a new copy panel 2023-02-24 11:30:41 +00:00
Matt Aitken 9d65a1a2c3 Schema for page 2023-02-24 09:55:18 +00:00
Matt Aitken fc3e85f93e Made userId user_id instead. WIP on getPage 2023-02-24 09:55:12 +00:00
James Ritchie 80373c6874 Removed file for old steps 1, 2, 3 2023-02-24 09:54:22 +00:00
James Ritchie 590dd688a9 Fixed max width 2023-02-24 09:50:19 +00:00
James Ritchie f739f49209 First workflow onboarding step is now Choose a Template 2023-02-24 09:49:43 +00:00
James Ritchie dabf26c2c9 Added a message to Test page to make it clearer how to run tests 2023-02-24 09:37:30 +00:00
Matt Aitken 8252f3ef86 Revert "Using generated schemas…"
This reverts commit 7d78089275.
2023-02-24 08:32:15 +00:00
Matt Aitken 7d78089275 Using generated schemas… 2023-02-23 20:27:19 +00:00
Matt Aitken 5ae21f28c3 Removed log from typescript-to-json-schema generator 2023-02-23 20:26:57 +00:00
Eric Allam 2614860862 Merge pull request #70 from triggerdotdev/dev
Hotfix: Fixed the issue with templates not deploying
2023-02-23 18:26:19 +00:00
Eric Allam 173f88dcad Fixed the revalidator in the useEffect deps array causing tons of requests 2023-02-23 18:23:37 +00:00
Matt Aitken c2d8934820 Generate Schema TypeScript from TypeScript Types file 2023-02-23 16:32:22 +00:00
Matt Aitken 2edff18a59 Tool to generate TypeScript JSONSchemas from TypeScript types working 2023-02-23 13:56:59 +00:00
Matt Aitken fc94c78109 Work on generating schemas from TypeScript files 2023-02-23 13:46:40 +00:00
Eric Allam ee20f9212f Make the schema an optional param for customEvent and webhookEvent 2023-02-23 12:33:51 +00:00
Matt Aitken 77a99c226d WIP on Notion schemas… pages are complex 2023-02-23 12:07:26 +00:00
Matt Aitken 50921f1307 makeStringSchema: you can set a string as a const 2023-02-23 12:07:08 +00:00
Matt Aitken 5445abeb9d Merge pull request #68 from triggerdotdev/dev
UX improvements to the workflow overview page
2023-02-22 19:34:02 +00:00
James Ritchie 566fb54615 Fixed generic webhook panel not showing when it was connected 2023-02-22 17:57:47 +00:00
Eric Allam 100edb8abd Don’t require dotenv, instead use it in the dev command 2023-02-22 16:21:04 +00:00
Matt Aitken 160ab22f70 Added getBotInfo endpoint 2023-02-22 16:06:24 +00:00
Matt Aitken 0cf3ebfae3 First two Notion endpoints working with API key 2023-02-22 14:58:47 +00:00
Eric Allam 8cb08b63d2 Recreate the original changelog for generated packages 2023-02-22 12:47:15 +00:00
Matt Aitken 8767403a44 Notion authentication setup and first endpoint, but not tested yet 2023-02-22 12:43:13 +00:00
Matt Aitken 5f1ac75044 The CLI now deals with oauth with no scopes 2023-02-22 12:42:44 +00:00
James Ritchie 4f21aaef97 Removed Intercom 2023-02-22 11:30:52 +00:00
James Ritchie 8272363069 Added absolute path for the integrations link 2023-02-22 11:03:08 +00:00
James Ritchie 3e32802fdf Warp example infisical cmd fixed 2023-02-22 10:50:47 +00:00
James Ritchie 3e1c1138e5 Fix for integrations server env variables not being loaded on local 2023-02-22 10:50:31 +00:00
Matt Aitken 7d1e64cb01 WIP on API.fetch support 2023-02-22 09:47:21 +00:00
Matt Aitken 08abf25fd9 Added base url to services, for use by fetch 2023-02-22 09:46:49 +00:00
Matt Aitken 9c9a4caa20 Merge pull request #66 from triggerdotdev/features/new-overview-page
Improved overview page
2023-02-21 22:26:13 +00:00
Matt Aitken 352b7f75ce Installed packages 2023-02-21 22:22:04 +00:00
Matt Aitken f0378fa874 Fix for incorrect types (after merge) 2023-02-21 22:21:51 +00:00
Matt Aitken 8de37d47bf Renamed new example package to @examples/generic-webhook 2023-02-21 22:16:37 +00:00
Matt Aitken 23376457e6 Merge remote-tracking branch 'origin/dev' into features/new-overview-page
# Conflicts:
#	pnpm-lock.yaml
2023-02-21 22:13:42 +00:00
James Ritchie 75589d3bae Reduced prominence of connect api message 2023-02-21 21:35:07 +00:00
James Ritchie 96c4f319e4 Label positioned better 2023-02-21 21:30:14 +00:00
James Ritchie 8587841ee4 Made the test button less prominent 2023-02-21 21:27:30 +00:00
James Ritchie 058afb40ce Copy improvement 2023-02-21 21:18:41 +00:00
Eric Allam dc058c8835 Remove webapp dep on integrations server 2023-02-21 21:15:20 +00:00
James Ritchie f80253ed1d typography improvements 2023-02-21 21:13:19 +00:00
James Ritchie 3e384ff18a Show better copy in the How to trigger your workflow panel 2023-02-21 21:05:12 +00:00
James Ritchie db9b03ca05 Link to the org integrations page 2023-02-21 21:04:17 +00:00
James Ritchie cc6adecfb4 Only show the Create workflow run panel if a workflow or non-test runs have happened 2023-02-21 20:43:46 +00:00
James Ritchie 841421bf76 Made the concertina panels open when relevant 2023-02-21 20:36:02 +00:00
Matt Aitken 0f75d15df6 Merge pull request #65 from triggerdotdev/dev
New integrations system
2023-02-21 20:06:17 +00:00
Matt Aitken f5ebde8ddb Changeset: release version 2023-02-21 16:27:10 +00:00
Matt Aitken da9e357b6d Added env vars to prod webapp 2023-02-21 16:23:18 +00:00
Matt Aitken cde0b7fcfe Increased the p-integrations resources 2023-02-21 16:21:50 +00:00
Matt Aitken 43f913e796 Prod flightcontrol for integrations 2023-02-21 16:14:54 +00:00
Matt Aitken 26ae66ad2a Add Airtable client_id for prod 2023-02-21 16:14:11 +00:00
Matt Aitken 88fe24ad67 Fix so integration requests can use api_key auth type 2023-02-21 15:53:25 +00:00
Matt Aitken da0ee481b8 Make staging webapp depend on integrations 2023-02-21 15:53:25 +00:00
Matt Aitken ff57a70a53 Added airtable to staging client ids 2023-02-21 15:53:25 +00:00
Matt Aitken 22ae2131a5 The internal CLI can now push API keys to Pizzly from our new integrations 2023-02-21 15:53:25 +00:00
Matt Aitken 5880d966ac serviceFetch basics working. Share some code with requestEndpoint 2023-02-21 15:53:25 +00:00
Eric Allam 9eeacee7c2 Fix: pass in the id from sendEvent through to the API call 2023-02-21 14:12:14 +00:00
D-K-P 6ced99fb02 Updated the healthcheck image 2023-02-21 13:12:14 +00:00
James Ritchie 28fb5d066f Updated the integrations link 2023-02-21 12:49:15 +00:00
James Ritchie 0d72b8e0c4 Added a custom webhook connection concertina 2023-02-21 12:47:51 +00:00
James Ritchie 547aab667d Added a custom plug icon 2023-02-21 12:47:20 +00:00
James Ritchie d744efdb26 Added a generic webhook example workflow 2023-02-21 12:47:07 +00:00
Matt Aitken 727a492e45 Don’t restrict access to /healthcheck 2023-02-21 12:12:28 +00:00
Matt Aitken 384752d36c Added generate script to integrations 2023-02-21 11:58:41 +00:00
Matt Aitken d699d38981 Changeset version – next: New integrations service compatibility 2023-02-21 11:51:13 +00:00
Matt Aitken 6b53aeb8c2 Changeset added: New integrations service compatibility 2023-02-21 11:49:55 +00:00
Matt Aitken b7ee8fd432 Revert "Changeset for new integrations service"
This reverts commit 5df5e30a7d.
2023-02-21 11:48:34 +00:00
Matt Aitken 8836aeae81 Latest pnpm lockfile 2023-02-21 11:46:24 +00:00
Matt Aitken 2748d9e9a6 Revert "Changeset version: created a pre-release 0.3.x"
This reverts commit 9e739a50b2.

# Conflicts:
#	apps/integrations/package.json
2023-02-21 11:45:17 +00:00
Matt Aitken f2a0f304af Removed @trigger.dev/sdk dependency from the integrations package.json 2023-02-21 11:43:01 +00:00
Matt Aitken 7659835541 Integrations docker frozen-lockfile again 2023-02-21 11:25:21 +00:00
James Ritchie 8862b563dd Added a “How to run your workflow” concertina 2023-02-21 11:22:35 +00:00
James Ritchie ed1c2da660 Added a permenant message about api connectiions 2023-02-21 11:22:13 +00:00
Matt Aitken 9e739a50b2 Changeset version: created a pre-release 0.3.x 2023-02-21 11:21:04 +00:00
Matt Aitken e4efed07e5 Improved changeset pre-release instructions and fixed a config issue 2023-02-21 11:20:47 +00:00
Matt Aitken 55644577ea no-frozen-lockfile 2023-02-21 11:17:01 +00:00
Matt Aitken 5df5e30a7d Changeset for new integrations service 2023-02-21 11:16:18 +00:00
Matt Aitken 43ceb44db9 Fixed Sendgrid version number 2023-02-21 11:16:03 +00:00
Matt Aitken 154294f86e Added more ignores to changeset config 2023-02-21 11:12:40 +00:00
Matt Aitken e20f7ba16a Installed packages 2023-02-21 11:12:35 +00:00
Matt Aitken be6954abf2 changeset config for generated-integrations 2023-02-21 11:00:17 +00:00
Matt Aitken 810996f26f Fix for type error with optional outpyt JSONSchema 2023-02-21 11:00:04 +00:00
Matt Aitken a7044511bb Doesn’t change the generated package.json file if it exists 2023-02-21 10:59:48 +00:00
Matt Aitken 0efbbece9e Changed version number for Airtable 2023-02-21 10:59:29 +00:00
Matt Aitken a38945ebcd Delete not-exported slack integration 2023-02-21 10:58:34 +00:00
James Ritchie a63ebd73fb Added a connection icon and fixed some concertina behaviour issues 2023-02-21 10:44:05 +00:00
Matt Aitken b34018eb17 Created integrations Dockerfile 2023-02-21 10:25:36 +00:00
Matt Aitken a6f9e1e35d Setup flightcontrol for integrations 2023-02-21 10:25:28 +00:00
Matt Aitken c7c5d407ef Added healthcheck 2023-02-21 10:25:00 +00:00
James Ritchie 0c6d98d353 Added margin between the sections 2023-02-21 10:19:16 +00:00
Matt Aitken f6ed5517c2 Merge branch 'features/new-integrations' into dev 2023-02-21 10:10:15 +00:00
Matt Aitken 4aae45ede2 WIP on integration.fetch 2023-02-21 10:09:56 +00:00
James Ritchie f969f03197 Now exporting the connection data for useConnectionSlots 2023-02-21 10:01:19 +00:00
James Ritchie cd8e85f85f Show hide the concertina panel for connecting the source 2023-02-21 09:29:50 +00:00
James Ritchie 3c27b3c40b Passed classnames props 2023-02-21 09:19:54 +00:00
Eric Allam df1f695f9b Merge pull request #64 from triggerdotdev/dev
The logo had a broken URL link in the marketing header + added infisical to package.json
2023-02-20 21:18:26 +00:00
Eric Allam 0a3b12d135 Make the private repo checkbox flipped to be public, and now it’s default private 2023-02-20 21:17:48 +00:00
Eric Allam aca332fffc Remove the testing instructions from the run local markdown 2023-02-20 21:09:27 +00:00
James Ritchie 350a60590d WIP adding a concertina menu to the main workflow panel 2023-02-20 18:24:06 +00:00
James Ritchie ad8a2f170a Improved the border style of the disconnected apis 2023-02-20 18:23:06 +00:00
D-K-P 67f6971601 Added github issues seed / md files 2023-02-20 17:49:59 +00:00
Eric Allam 695e4ca3f0 Split pulsar and the rest of the local docker services 2023-02-20 17:23:42 +00:00
D-K-P 4243b10683 Updated the template grid so it would preview on the signed in version better, and replaced the resend image 2023-02-20 17:10:52 +00:00
James Ritchie c9bd1812f4 Swapped over the workflow panel with the API panel 2023-02-20 17:10:18 +00:00
James Ritchie a117a3b534 APIs not connected get a red border treatment to make them stand out 2023-02-20 17:07:33 +00:00
James Ritchie 9e64f9d570 Copy changes to titles 2023-02-20 16:53:01 +00:00
D-K-P 823da44fb7 Added schedule healthcheck info 2023-02-20 16:21:32 +00:00
Matt Aitken a5a5dcbccb Generated SendGrid SDK 2023-02-20 15:35:09 +00:00
Matt Aitken e2693eb539 Removed $ref from SendGrid marketingContacts endpoint schema 2023-02-20 15:33:07 +00:00
Matt Aitken 036ffa7e5f Created marketingContacts endpoint 2023-02-20 15:23:52 +00:00
Matt Aitken 679ac99fad Added scopes to api_key authentication in the web app 2023-02-20 15:23:34 +00:00
Matt Aitken 9f6886c55b Added infisical config to the root 2023-02-20 13:45:28 +00:00
Eric Allam ad9089da57 Make sure only started runs are considered created 2023-02-20 13:43:58 +00:00
Eric Allam 9313adee12 Add the github access docs link and tweak copy 2023-02-20 13:29:07 +00:00
Matt Aitken 9bb8363643 Fix for typecheck issue 2023-02-20 13:27:11 +00:00
Matt Aitken 4e2fe3dcac Moved all presenters into the presenters folder 2023-02-20 13:25:46 +00:00
D-K-P 092b139d71 Added a second line to the github button on the template deploy page 2023-02-20 12:34:02 +00:00
Matt Aitken ab92e9515b Installed packages 2023-02-20 12:28:34 +00:00
Matt Aitken d4939c4e11 More fixes from mege conflict 2023-02-20 12:28:30 +00:00
James Ritchie ef3f075042 Added a missing noreferrer property 2023-02-20 12:26:01 +00:00
Matt Aitken c76d930f08 Fixing issues with service metadata 2023-02-20 12:22:32 +00:00
Matt Aitken 06f2fc3aeb Fix for bad import of WorkflowsPresenter 2023-02-20 12:12:13 +00:00
Matt Aitken 3cd4f2fb9f Merge remote-tracking branch 'origin/dev' into features/new-integrations
# Conflicts:
#	apps/webapp/app/env.server.ts
#	apps/webapp/app/models/integrations.server.ts
#	apps/webapp/app/models/organizationTemplatePresenter.server.ts
#	apps/webapp/app/models/templateListPresenter.server.ts
#	apps/webapp/app/models/templatePresenter.server.ts
#	apps/webapp/app/models/workflowListPresenter.server.ts
#	apps/webapp/app/models/workflowStartPresenter.server.ts
#	apps/webapp/app/models/workflowsPresenter.server.ts
#	apps/webapp/app/routes/__app/orgs/$organizationSlug/__org/index.tsx
#	apps/webapp/app/routes/__app/orgs/$organizationSlug/__org/workflows.new.tsx
#	pnpm-lock.yaml
2023-02-20 12:10:50 +00:00
D-K-P 8f011a5da3 Updated step 2 text so it’s clearer which route includes the repo templates 2023-02-20 11:59:50 +00:00
Eric Allam 067dbfc0cf Improved the template docs 2023-02-20 11:57:36 +00:00
Matt Aitken 8dfdfdb2fa Regenerated docs with default open on params 2023-02-20 11:52:08 +00:00
Matt Aitken 3b76574ef8 Make the params default open 2023-02-20 11:52:00 +00:00
Matt Aitken 3a0a6e491c Update SendGrid’s documentation 2023-02-20 11:48:48 +00:00
Matt Aitken 24203d1b8d Sanitize text for mdx (so we can display HTML tags on the page) 2023-02-20 11:48:37 +00:00
Matt Aitken 8da0f9ac01 Generated SendGrid SDK 2023-02-19 19:30:01 +00:00
Matt Aitken 011264865b Fixes for an optional body in the response 2023-02-19 19:29:52 +00:00
Matt Aitken 889d9910e2 SendGrid mailSend endpoint implemented 2023-02-19 19:18:23 +00:00
Matt Aitken 679239d9fc Added scopes to api_key authentication method 2023-02-19 19:18:08 +00:00
Matt Aitken 20d8493c3e Response body is optional 2023-02-19 19:17:56 +00:00
Matt Aitken fe598ff713 Add support for api_key authentication 2023-02-19 19:17:41 +00:00
Matt Aitken ac1354b71a Deal with validating when a schema is undefined or data is undefined 2023-02-19 19:17:27 +00:00
Matt Aitken 55f04d5d12 Fix for generateTypes test now we don’t format 2023-02-19 19:17:01 +00:00
Matt Aitken 3796ba5b07 Generated docs for Slack example and Airtable 2023-02-19 17:49:34 +00:00
Matt Aitken 86e1e7143f Generate docs with good support for oneOf and anyOf 2023-02-19 17:49:25 +00:00
Matt Aitken d32aa49020 output the response types 2023-02-19 17:27:38 +00:00
Matt Aitken 08338d15a5 Generate much nicer params 2023-02-19 17:09:46 +00:00
Matt Aitken 4b3c9b7230 Much better generated docs 2023-02-19 16:36:56 +00:00
Matt Aitken e84e43e4e1 Decent param field generation 2023-02-19 16:02:10 +00:00
Matt Aitken 584b12451d Started generating docs, with metadata first 2023-02-19 15:15:28 +00:00
Matt Aitken 0913a34174 Prepared code generation for docs 2023-02-19 14:58:41 +00:00
Matt Aitken e6d6bfced4 Newly generated SDKs using the new generator 2023-02-19 14:37:37 +00:00
Matt Aitken c7e926a8a9 Ignore missing patterns when linting 2023-02-19 14:36:09 +00:00
Matt Aitken 3ad8a0a5de Separate schema titles and descriptions so we get nice TypeNames and jsdocs 2023-02-19 14:35:58 +00:00
Matt Aitken 0d918e7bf6 Generate types by creating a combined schema 2023-02-19 14:35:27 +00:00
Matt Aitken 444996533f Deduplicated type definitions, but still has multiple interfaces 2023-02-19 13:48:51 +00:00
Matt Aitken 1b53ccbbac WIP on de-duplicating type definitions from generated SDK 2023-02-19 13:42:48 +00:00
Matt Aitken dbd4e9a68c Don’t format the types when creating them from schemas 2023-02-19 13:42:32 +00:00
Matt Aitken 0c36c3e16f When making schemas don’t add properties with undefined values, it messes up the Typescript generator 2023-02-19 12:53:27 +00:00
Matt Aitken 05af0ba2b5 Make multiple actions at once 2023-02-19 12:48:25 +00:00
Matt Aitken f2e341e753 Delete records and record 2023-02-18 17:26:27 +00:00
Matt Aitken 6e337eb144 Create mutiple and single records 2023-02-18 17:06:05 +00:00
Matt Aitken fd90e3c3d8 Update single record 2023-02-18 16:56:47 +00:00
Matt Aitken b969653f7c Added update/upsert records 2023-02-18 16:49:54 +00:00
Matt Aitken b5128abee0 listRecords is working 2023-02-18 16:26:34 +00:00
Matt Aitken 1f5053bcdb Reworked how nock works to allow updating 2023-02-18 16:07:57 +00:00
Matt Aitken 232b58daf1 Added listRecords endpoints with improvements to generating schemas 2023-02-18 15:17:50 +00:00
Matt Aitken d07a54f09b Airtable Field schema 2023-02-18 14:06:16 +00:00
Matt Aitken 2adea4cd9b Created an AirTable field schema 2023-02-18 12:30:18 +00:00
Matt Aitken 27e1d134f7 WIP Airtable schemas 2023-02-17 19:07:20 +00:00
Matt Aitken 92ca01f3c7 An easier way to write JSON Schemas 2023-02-17 19:05:48 +00:00
Matt Aitken c75181f10d Renamed the code that used open api specs 2023-02-17 19:05:25 +00:00
James Ritchie a26002c525 Improved the layout of the TemplateOverview 2023-02-17 18:45:22 +00:00
James Ritchie 5a3fdc470f The logo had a broken URL link in the marketing header 2023-02-17 17:06:00 +00:00
Matt Aitken 781a208c07 Merge pull request #60 from mv-turtle/main
Added infisical as one of the command in package.json
2023-02-17 16:12:26 +00:00
Matt Aitken 67eb592ecc Merge branch 'dev' into main 2023-02-17 16:11:20 +00:00
Matt Aitken 5fa751cd76 Merge pull request #63 from triggerdotdev/dev
Added a Todo comment to each of the samples to make it clear the id needs to be unique
2023-02-17 16:09:31 +00:00
James Ritchie efc35c6c79 Added a Todo comment to make it clear the id needs to be unique 2023-02-17 16:03:36 +00:00
Eric Allam 8961a30bf8 Merge pull request #62 from triggerdotdev/dev
Feature: Easy to use templates with better onboarding
2023-02-17 14:47:44 +00:00
Eric Allam 65649c1fc7 Merge branch 'main' into dev 2023-02-17 14:35:49 +00:00
Matt Aitken 0fa59d9387 More code comments in the examples 2023-02-17 14:25:27 +00:00
Matt Aitken aa8cd86041 Improved GitHub star example with comments 2023-02-17 14:15:06 +00:00
Matt Aitken 165bd68d2d Added nice code comments to GitHub issues example 2023-02-17 14:15:06 +00:00
Eric Allam 9b664a1af2 Added the org template repo to the workflow overview page 2023-02-17 14:10:58 +00:00
Matt Aitken 3d174f5aeb Added code comments to the custom event 2023-02-17 13:52:05 +00:00
Matt Aitken b341e7bb71 Added code comments to the webhook example 2023-02-17 13:51:42 +00:00
Matt Aitken 1dc11a39ea Improved the WhatsApp example text 2023-02-17 13:36:48 +00:00
James Ritchie 970cfcb094 Improved the copy on step 6 of the existing repo journey 2023-02-17 13:35:55 +00:00
James Ritchie c33e228b26 Small improvement to the connected workflow message 2023-02-17 13:35:55 +00:00
Matt Aitken 6ba6e20026 Improved the Shopify example 2023-02-17 13:16:52 +00:00
Matt Aitken 81b2742577 Removed new user (Resend) example as it involves too much config for now 2023-02-17 12:25:40 +00:00
Matt Aitken ccadf08bd2 Set the from email to say Trigger.dev 2023-02-17 12:11:59 +00:00
D-K-P cea1291496 Removed title dupe 2023-02-17 12:05:15 +00:00
Matt Aitken 3e6b0c747b Workflow not connected to environment: Show a message on the overview page with basic help 2023-02-17 12:01:02 +00:00
Matt Aitken affcabc36f Workflow not connected to environment: hide test and runs pages 2023-02-17 12:01:02 +00:00
D-K-P 6732015b5c Updated the welcome email 2023-02-17 11:44:19 +00:00
Eric Allam cbb50a05ad Fixed issue with expiring user-to-server access tokens 2023-02-17 11:34:49 +00:00
Eric Allam 142fa85b14 Removed unnecessary log 2023-02-17 11:34:49 +00:00
James Ritchie 857ecf1de7 Gave the connected workflow more space 2023-02-17 11:24:24 +00:00
James Ritchie df6fe919c2 Added a Waiting to connect state to the Deploy step 2023-02-17 11:19:23 +00:00
James Ritchie 579e98c7af Copy updates to the new repo journey 2023-02-17 10:48:46 +00:00
James Ritchie 4724ef00fc Fixed Safari bug where template grid cards were really long and scrolling 2023-02-17 10:40:53 +00:00
James Ritchie 77e3769dbd Removed full stop 2023-02-17 10:40:53 +00:00
James Ritchie 70a547a5c5 Button arrow now uses a heroicon 2023-02-17 10:40:53 +00:00
Matt Aitken 3c8a3c421b Make it clear a request error comes from the API being called 2023-02-17 10:31:08 +00:00
Eric Allam 842ab0cdcc Ping the connection every second to try and keep it open through CloudFront 2023-02-17 09:11:13 +00:00
James Ritchie 64e0445acb Added a github icon to the external repo link 2023-02-16 20:50:25 +00:00
Eric Allam 213d86cb1f Improve run local instructions 2023-02-16 20:49:57 +00:00
Eric Allam 66805f67fa Call examples examples, not templates 2023-02-16 20:39:21 +00:00
Eric Allam 3defbcc0ed Fill in the correct API key in the run local docs 2023-02-16 20:23:12 +00:00
Eric Allam 942e695782 Fill in the ready to deploy api keys 2023-02-16 20:21:49 +00:00
James Ritchie 4a8b977a99 Remade the Deploy step layout 2023-02-16 20:03:31 +00:00
Eric Allam 2e9875c4c6 Add loading UI state when submitting add template form 2023-02-16 19:59:13 +00:00
Eric Allam ed775706a0 Use the installation_repositories.added webhook because repository.created wasn’t reliably being delivered 2023-02-16 19:42:36 +00:00
Eric Allam 89abb57e44 Changeset: new version 2023-02-16 19:14:49 +00:00
Eric Allam f264aaa16f Added = to the .env 2023-02-16 19:10:03 +00:00
Eric Allam 2f7caab661 Link workflows with their org templates if they exist (and improve the run local docs output) 2023-02-16 19:00:08 +00:00
James Ritchie c92fec9787 Made the github connect button bigger 2023-02-16 17:48:26 +00:00
D-K-P 9211cce807 fixed images so they’re bigger on the templates page and there isn’t a gap 2023-02-16 17:45:52 +00:00
Eric Allam 26c4f5d23c Move customize sections down to the bottom of the template markdown docs 2023-02-16 17:10:33 +00:00
Matt Aitken 4c9891de90 Have a max-height on the example code block 2023-02-16 17:02:19 +00:00
D-K-P 3c706723a2 Increased the image height to 36 2023-02-16 16:54:53 +00:00
Matt Aitken 6e3778d74e Created PanelLoading 2023-02-16 16:41:03 +00:00
Eric Allam 8a10431766 Use internal pulsar to define the webapp-events topic 2023-02-16 16:37:58 +00:00
Matt Aitken 825983db77 Add PostHog Sentry integration 2023-02-16 16:28:37 +00:00
James Ritchie a79ded125e minor improvement to image heights 2023-02-16 16:11:55 +00:00
James Ritchie e05b3d633d Removed scrolling from codeblock on the examples modal 2023-02-16 15:39:20 +00:00
Matt Aitken f659d9aec6 Don’t delete the nock snapshot when a test suite fails 2023-02-16 15:34:04 +00:00
Matt Aitken 1772b0664c Added requiredPackages to Resend example 2023-02-16 15:27:11 +00:00
Matt Aitken eca961a30f Text for previous option correct after templates 2023-02-16 15:26:28 +00:00
Matt Aitken c500155d60 Fixed resend example code 2023-02-16 15:22:41 +00:00
Matt Aitken f8957423e5 Changed text on example to “Use this example" 2023-02-16 15:22:41 +00:00
Matt Aitken 9da448a21b The code block now works with jsx/tsx 2023-02-16 15:22:41 +00:00
James Ritchie 8468db0a83 Fixed the required packages so they correctly display 2023-02-16 15:06:19 +00:00
James Ritchie f0d3b12d84 Fixed padding so it displays longer names on the examples buttons 2023-02-16 15:06:19 +00:00
James Ritchie ce5a42ccd7 Removed Zod from some of the required packages and corrected Whatsapp title 2023-02-16 15:06:19 +00:00
Eric Allam fc962f50c9 Create template repositories in a way that allows users to not give full access to their gitihub accounts to our github app 2023-02-16 15:01:46 +00:00
Matt Aitken 171d16ef41 If GitHub connect fails, show an error page and log out the params 2023-02-16 14:29:44 +00:00
Matt Aitken bec76a3704 Fix for channel instead of channelName being used in new user Slack example 2023-02-16 14:14:05 +00:00
Matt Aitken 3c403c4212 Removed strange capitilization from resend template 2023-02-16 14:03:38 +00:00
Matt Aitken 97e432462d Made the ensure it runs instructions a bit clearer 2023-02-16 13:49:31 +00:00
James Ritchie 4a2e0b28f4 Fixed links in the marketing header not working 2023-02-16 13:35:55 +00:00
James Ritchie fb496b1efa Changed the dangerouslySetInnerHtml from <code> back to <divs> to fix formatting 2023-02-16 13:22:48 +00:00
Matt Aitken 6c299072cd Fix for new user analytics event 2023-02-16 13:20:42 +00:00
Matt Aitken 25f70c4574 Added a “user created” event 2023-02-16 13:13:02 +00:00
James Ritchie 7f0ad4c18a Updated dangerouslySetInnerHtml to use <code> element and added the correct background colour 2023-02-16 12:51:44 +00:00
Matt Aitken 6c50ce078a Improved nock scripts, and setup for Airtable 2023-02-16 12:46:23 +00:00
D-K-P e8d018ef9d Made the templates overview responsive 2023-02-16 12:10:19 +00:00
Matt Aitken 9dc2ec4dca WIP on AirTable failing test 2023-02-16 12:10:05 +00:00
Matt Aitken 694df6ee38 Nock records and saves a successful run’s recording from tests 2023-02-16 12:08:35 +00:00
Matt Aitken c27987c191 Created a system to record successful test suite responses and load them on the next run 2023-02-16 11:50:35 +00:00
James Ritchie 19aedf8f73 Improved the final connected workfow step 2023-02-16 11:40:50 +00:00
D-K-P 4c219a8bf8 Template overview now has a responsive width 2023-02-16 11:35:08 +00:00
James Ritchie f30037da15 Improved message while waiting to connect github 2023-02-16 11:33:33 +00:00
James Ritchie df405aa740 Children not needed on the PanelInfo component 2023-02-16 11:33:33 +00:00
Eric Allam 7465d31e28 Improved the github stars markdown docs 2023-02-16 11:27:31 +00:00
D-K-P 2876946792 Added place-content-between to move services to bottom left 2023-02-16 11:24:57 +00:00
James Ritchie ae7c1c2cec TemplateCard now sits next to the steps on the new repo journey 2023-02-16 11:13:45 +00:00
James Ritchie 10b5558dbc Improved some of the information displayed in the new repo journey 2023-02-16 11:11:24 +00:00
Eric Allam 570683446c Updated template images 2023-02-16 10:52:21 +00:00
Eric Allam 29f3504a23 Improved the basic starter and resend markdown docs 2023-02-16 10:52:21 +00:00
James Ritchie 4bc156ce04 Improvements to the Cloud modal 2023-02-16 10:48:27 +00:00
James Ritchie c055c97209 Improvements to the modal so it’s more visible against the background 2023-02-16 10:48:01 +00:00
James Ritchie bc767516b6 Moved classes out of the card component to make it more reusable 2023-02-16 10:36:26 +00:00
James Ritchie 7a19bb8381 Template card locks to left side of the form 2023-02-16 10:32:38 +00:00
James Ritchie e742486677 Back button width fix 2023-02-16 10:16:33 +00:00
James Ritchie 821af448f3 Removed unused exports 2023-02-16 10:13:37 +00:00
James Ritchie 9db2e483ef Removed the title from the Overview page and added a back button 2023-02-16 10:13:05 +00:00
Eric Allam 277108d90c Implement cloud waitlist functionality 2023-02-16 10:08:06 +00:00
James Ritchie 49068d8db1 Fixed missbehaving layout on the examples modal 2023-02-16 09:53:07 +00:00
Eric Allam 3558a76e27 Implement correct flow on the templates.add route 2023-02-16 09:33:24 +00:00
Eric Allam fde3fec37f Setup the prod github app env vars 2023-02-16 09:13:00 +00:00
Eric Allam dabb17cf51 Move template doc files into the webapp 2023-02-16 08:49:59 +00:00
James Ritchie 7a8ad5f254 Right aligned the primary buttons 2023-02-15 21:02:13 +00:00
James Ritchie ab1d283217 centered text in button 2023-02-15 21:02:13 +00:00
D-K-P 7e80c5e7f6 removed maxHeight 2023-02-15 21:00:23 +00:00
D-K-P c5a5cef9f3 Redid the template overview fixes 2023-02-15 21:00:23 +00:00
James Ritchie f51aa7b792 Removed margin from the template grid component 2023-02-15 20:43:44 +00:00
D-K-P 9175d1e541 Import fix 2023-02-15 20:39:19 +00:00
James Ritchie 38fbf41e79 Improvements to the existing repo flow 2023-02-15 20:38:48 +00:00
James Ritchie 4bd3cabad4 Fixed the layout of the Connect another Github link 2023-02-15 20:18:07 +00:00
James Ritchie 6c9d31fe1c Removed the NoMobileOverlay on the public pages 2023-02-15 20:00:05 +00:00
James Ritchie c13c52aa05 Added a back button to the template section of the login page 2023-02-15 19:35:24 +00:00
Eric Allam 260bd5f007 Add github app env vars to staging webapp 2023-02-15 17:55:26 +00:00
Matt Aitken 25cf0245a4 Tidied up the mad nock reply 2023-02-15 17:48:45 +00:00
Matt Aitken 98cac166b3 Use nock to return from the API 2023-02-15 17:42:14 +00:00
Matt Aitken c2e9accade Moved the logger below express json 2023-02-15 17:41:55 +00:00
Eric Allam dc86fc2998 Merge pull request #61 from triggerdotdev/features/workflow-hosting
Feature: Easy to use templates with better onboarding
2023-02-15 17:40:36 +00:00
Eric Allam 7a6968d0ac Merge branch 'dev' into features/workflow-hosting
# Conflicts:
#	apps/webapp/app/components/LoginPromoPanel.tsx
#	apps/webapp/app/routes/__app/orgs/$organizationSlug.tsx
#	apps/webapp/app/routes/login.magic.tsx
#	apps/webapp/app/routes/login.tsx
#	apps/webapp/app/services/messageBroker.server.ts
2023-02-15 17:39:48 +00:00
Eric Allam 2c780c976e Added resend welcome drip campaign template 2023-02-15 17:19:09 +00:00
James Ritchie fbc1b86ea0 Added ability to pass in a size to the buttons - currently only supports “large” 2023-02-15 17:05:39 +00:00
D-K-P f20b29519a Padding / breathing space tweaks 2023-02-15 15:18:26 +00:00
D-K-P 3c7f6cf9ec Added primary buttons to the examples 2023-02-15 15:05:52 +00:00
Matt Aitken 1410688499 Added morgan logging to the integrations server 2023-02-15 14:57:38 +00:00
D-K-P d583e2a8f2 Added primary button to templateoverview 2023-02-15 14:52:35 +00:00
Matt Aitken a94c8e4576 Airtable example working 2023-02-15 14:51:14 +00:00
Matt Aitken 5fc1236d2e Added nock 2023-02-15 14:50:58 +00:00
Matt Aitken 3b67a5ce10 Remove unused integrations index file 2023-02-15 14:50:52 +00:00
D-K-P 016cf05aba Added templates copy 2023-02-15 14:45:40 +00:00
D-K-P 22c8a16758 Moved the image to the top left and sorted scrolling 2023-02-15 14:45:40 +00:00
D-K-P 0955a51333 Added bottom padding 2023-02-15 14:45:40 +00:00
D-K-P 8dc5bba8ca Reduced top margins on the templates page 2023-02-15 14:45:40 +00:00
James Ritchie 3538754a76 Updated the links in the marketing header 2023-02-15 14:41:28 +00:00
James Ritchie 8ef434eb13 Added a toxic style A button 2023-02-15 14:41:16 +00:00
James Ritchie 78ecfb60dc Hopful fix for google fonts not working 2023-02-15 14:40:46 +00:00
Matt Aitken 2acd79fb36 Fix so the integration actually responds 2023-02-15 14:08:59 +00:00
Matt Aitken 8d15e9a2b9 Created Airtable example 2023-02-15 14:01:29 +00:00
Matt Aitken d99446a1b2 Added descriptions to the response fields 2023-02-15 14:01:19 +00:00
Matt Aitken 7b24248b80 Deleted slackv2 example 2023-02-15 14:01:07 +00:00
D-K-P feafa69068 Updated the viewing runs image link in the readme 2023-02-15 14:00:36 +00:00
James Ritchie 91ed853747 Updated the login page with new template card style 2023-02-15 13:58:35 +00:00
Eric Allam 76737caa47 Remove basic starter title in desc 2023-02-15 13:56:15 +00:00
Eric Allam b480fa242a All dangerouslySetInnerHTML elements should not be p tags 2023-02-15 13:53:50 +00:00
Matt Aitken 192a1d2119 Made the Airtable fields a loose schema for now 2023-02-15 13:53:46 +00:00
Matt Aitken 2261a769e4 Deleted pointless generateService test 2023-02-15 13:49:59 +00:00
Matt Aitken 7e92e8cc75 Added Airtable to the catalog 2023-02-15 13:41:25 +00:00
Matt Aitken 5a312dec55 Fix generate test to point at slackv2 2023-02-15 13:41:06 +00:00
D-K-P a1535dff70 Added title and sub to the templates page 2023-02-15 13:38:35 +00:00
Eric Allam 4a00abed46 Add import code step to existing repo 2023-02-15 13:35:40 +00:00
Matt Aitken 15316a7504 Started work on Airtable 2023-02-15 13:29:15 +00:00
Eric Allam 039f652a41 Add another github connection button 2023-02-15 13:22:21 +00:00
Matt Aitken fa80ca07b7 Make the slack example not live 2023-02-15 13:22:20 +00:00
D-K-P f2cfa17b62 Added Poppins for the titles 2023-02-15 13:19:55 +00:00
Eric Allam 77124bba78 Sorted out connected to github 2023-02-15 12:58:17 +00:00
James Ritchie 7530400a38 Removed old template card 2023-02-15 12:42:31 +00:00
James Ritchie bfd8a4f6b8 Template card sits on the right and new states for login and configure 2023-02-15 12:42:30 +00:00
Eric Allam 4a72aff4ef Render the app header when logged in __public pages 2023-02-15 12:37:06 +00:00
Eric Allam 544b9b94c1 Implement “use this template” from the public page (either logged in or out) 2023-02-15 12:18:39 +00:00
James Ritchie 6b05b84342 Added a step number to the configure github step 2023-02-15 11:56:12 +00:00
James Ritchie 2ede12c2f3 Step numbers now have a complete state so they can show numbers in future steps rather than just a tick 2023-02-15 11:55:28 +00:00
Matt Aitken b142c55fc5 The DisplayProperties are now returned properly from the API 2023-02-15 11:55:06 +00:00
Matt Aitken 454bfcc58e Add the version info to a created IntegrationRequest 2023-02-15 11:54:37 +00:00
Matt Aitken eb98f50fca Get the display properties when creating an integration request 2023-02-15 11:54:06 +00:00
Matt Aitken 81ddf597ed Debugging the webapp should use infisical 2023-02-15 11:53:45 +00:00
Matt Aitken 75d6471c9e Created an example that uses the slackv2 integration 2023-02-15 11:53:30 +00:00
Matt Aitken 68544359f1 Generate the SDK with the correct endpoint name 2023-02-15 11:53:15 +00:00
James Ritchie 187c0279b2 Margin tweak 2023-02-15 11:24:40 +00:00
James Ritchie 98cf9afd8e Made the deployed workflow item more clickable 2023-02-15 11:23:30 +00:00
Matt Aitken 3ce5d5bf1a Include generated-integrations in the workspace 2023-02-15 11:18:38 +00:00
Matt Aitken f8ac05500a Renamed the new slack integration slackv2 2023-02-15 11:17:59 +00:00
Matt Aitken 23dbeff1c6 Added .template to the end of the template files so turbo doesn’t pick up on them 2023-02-15 11:10:07 +00:00
D-K-P ba0a4727d3 Moved the button to the top and fixed the padding 2023-02-15 11:00:15 +00:00
Eric Allam 54c5c82f22 Adding template list and template slug page to public pages 2023-02-15 10:46:39 +00:00
James Ritchie 6a3f26427b Small style tweaks 2023-02-15 10:41:30 +00:00
Matt Aitken 9db77b6478 Reverted workflowRunStep.server.ts 2023-02-15 10:37:05 +00:00
Matt Aitken 08ecd288e1 DisplayProperties stored on a run step and first read from there 2023-02-15 10:33:03 +00:00
James Ritchie 10ae5601f8 Added the floating template card 2023-02-15 10:29:43 +00:00
Eric Allam 9386e19620 Fill in the ConnectedToGithub stuff 2023-02-15 10:27:15 +00:00
Eric Allam 1df18b386a Better handle errors when trying to add a template to github account 2023-02-15 10:24:42 +00:00
Matt Aitken 83201312b2 The API won’t respond with services that aren’t live 2023-02-15 10:08:52 +00:00
Matt Aitken bfa096dc4a Services metadata being pulled from old and new systems 2023-02-15 09:54:34 +00:00
James Ritchie 81debee7aa Added a Github connected first step 2023-02-15 09:52:49 +00:00
Eric Allam 02499a0e63 Add the template card to template.add and template.id 2023-02-15 09:49:11 +00:00
Matt Aitken 558b705ace Added version to the Display properties are working for v1 integrations 2023-02-15 09:49:02 +00:00
Eric Allam 803b279133 Fill in actual data to the configured github state 2023-02-15 09:38:00 +00:00
Matt Aitken 4874288db0 Added icon to the services API json 2023-02-15 09:26:50 +00:00
Matt Aitken 30c0984623 Make the api use v2 (as v1 was the old integrations system) 2023-02-15 09:23:14 +00:00
Vladyslav Matsiiako 1b675968f6 Added infisical as one of the command in package.json 2023-02-14 19:46:36 -08:00
Eric Allam e58b7ada83 Filled in the run local docs 2023-02-14 22:03:32 +00:00
Matt Aitken a96bfd3528 The display properties endpoint is working 2023-02-14 20:20:55 +00:00
D-K-P a47a9b4fd6 Styled the start from scratch modal 2023-02-14 18:45:54 +00:00
D-K-P 727ec22fee Styled the examples overview modal 2023-02-14 18:45:54 +00:00
Matt Aitken c359962b3a Removed logging in the auth middleware 2023-02-14 18:45:35 +00:00
Matt Aitken 7bc11fe41f Added test for action displayProperties and made a fix 2023-02-14 18:44:24 +00:00
James Ritchie 7af88c33da Made the fields all consistently styled 2023-02-14 18:42:02 +00:00
Matt Aitken 108bb6281e Added displayProperties functionality to the endpoints/actions 2023-02-14 18:39:29 +00:00
James Ritchie 88ff526b87 Added blank deploy state to configure github state 2023-02-14 18:37:17 +00:00
James Ritchie b88eaa2c40 Import cleanup 2023-02-14 18:30:39 +00:00
James Ritchie a46b93e29d Updated to the deploy state 2023-02-14 18:23:38 +00:00
James Ritchie 1f672d9612 Made classNames available on the WorkflowList 2023-02-14 18:23:38 +00:00
Eric Allam d489311371 Run locally, not self host (WIP run local docs) 2023-02-14 18:14:46 +00:00
Eric Allam af29669003 Fill out some github-stars-to-slack template data 2023-02-14 17:59:59 +00:00
James Ritchie 8f32446170 Added a modal to the deploy section 2023-02-14 17:35:10 +00:00
James Ritchie 7f6e03b776 Improvements to the deploy state 2023-02-14 17:11:28 +00:00
Matt Aitken 140d02f462 WIP getting the new integrations working with the old ones 2023-02-14 16:54:13 +00:00
Matt Aitken 6a3ffa6395 Added authentication middleware to the integrations service 2023-02-14 16:53:49 +00:00
James Ritchie f6363ab5b6 Added a deploy skeleton state 2023-02-14 16:42:36 +00:00
James Ritchie 60ac029220 Added a disabled button state 2023-02-14 16:42:36 +00:00
Eric Allam 1f3eb459c4 Added runLocalDocs for templates 2023-02-14 16:37:19 +00:00
Eric Allam 9388b5bbed Added markdown syntax highlighting for the template documentation 2023-02-14 16:33:30 +00:00
Eric Allam 047b011fdd Run db:seed when deploying (so needs to be safe in prod) 2023-02-14 15:59:54 +00:00
Eric Allam fa470462c4 Implement the “existing repo” flow 2023-02-14 15:46:02 +00:00
Matt Aitken d807421b40 Migrated the metadata format 2023-02-14 15:39:59 +00:00
Matt Aitken b2bd170a2c Downgraded vitest in the webapp because it caused typecheck issues 2023-02-14 15:39:43 +00:00
Matt Aitken e013c6faa9 Renamed slug to service 2023-02-14 15:09:46 +00:00
Matt Aitken d60e9ae939 Renamed IntegrationMetadata to ServiceMetadata 2023-02-14 15:09:00 +00:00
Matt Aitken 8039f326a9 Created an IntegrationsClient that’s used to communicate with the integrations service 2023-02-14 15:04:45 +00:00
Matt Aitken 259e28e13a Removed old todo 2023-02-14 15:04:27 +00:00
James Ritchie 103f77215c margins adjustment 2023-02-14 14:58:55 +00:00
James Ritchie 967b8b0053 Updated the deployed state 2023-02-14 14:56:16 +00:00
Matt Aitken 974033d5d2 Don’t export the service metadata type 2023-02-14 14:52:51 +00:00
Matt Aitken 84bd5a63a2 Added API key auth type 2023-02-14 14:52:35 +00:00
D-K-P f0a05ab4e3 Moved the integration icons to the bottom 2023-02-14 14:43:21 +00:00
D-K-P 805f675264 Padding now fixed if there are / aren’t API logos 2023-02-14 14:36:41 +00:00
Matt Aitken dfab30c901 Endpoint that returns information about the services 2023-02-14 14:33:58 +00:00
Matt Aitken 8f5474072f Added live flag to service 2023-02-14 14:33:29 +00:00
D-K-P 056bab7233 Fixed padding issue on the grid 2023-02-14 14:32:16 +00:00
James Ritchie 08c7a04b61 Updated layout for ready to deploy state 2023-02-14 14:14:36 +00:00
James Ritchie f2a96a1535 tweaked styles 2023-02-14 14:14:36 +00:00
D-K-P abc113701c Fixed styling on the grid and overview pages 2023-02-14 14:13:02 +00:00
Matt Aitken fb6953bc1d Actually we’re going to cache using connection + service 2023-02-14 13:58:54 +00:00
Matt Aitken 8a6467f4c8 The namespace for the cache includs connection id and workflow id
Connections are used across workflows, so there was a chance the same key could have been fighting
2023-02-14 13:57:14 +00:00
Matt Aitken 581068362f The integration service now returns the response in the format the webapp is expecting 2023-02-14 13:44:03 +00:00
Matt Aitken 011d7d5611 Added retryableStatusCodes to a service 2023-02-14 13:43:24 +00:00
Matt Aitken caac573a64 Added version and made response schema optional for SDK requests 2023-02-14 12:35:24 +00:00
Matt Aitken 39d02e6d00 Added the integrations service to the example Warp config 2023-02-14 12:33:17 +00:00
Matt Aitken 1e1da62b32 The API for integrations is now versioned, accepts params and build credentials 2023-02-14 12:32:21 +00:00
Eric Allam d67ab54d55 WIP on the “New Repo” side of the workflows/new flow 2023-02-14 12:24:26 +00:00
James Ritchie 8e5938cd0c Styling for the github configuration forms 2023-02-14 11:35:10 +00:00
James Ritchie 16d89c4b79 added optional classname to input component 2023-02-14 11:34:21 +00:00
James Ritchie bf9e269ff3 Changed the error to a panel warning 2023-02-14 10:12:25 +00:00
Matt Aitken a5190693c8 Use __trigger so we don’t have to change the webhooks and introduce incompatibility 2023-02-13 23:08:13 +00:00
Matt Aitken de5b2ca3d8 Add metadata to slack post message 2023-02-13 23:02:29 +00:00
Matt Aitken 5c8fc8188a Passing the cache through to requests, it’s working. Made the expected request metadata specific 2023-02-13 22:52:01 +00:00
Matt Aitken 5949c98748 Created Postgres schema with cache table and PostgresCacheService 2023-02-13 22:40:44 +00:00
Matt Aitken 4f7a8f6ae0 Created a VS Code workspace 2023-02-13 22:05:57 +00:00
Matt Aitken c01bc15622 Allow metadata to be passed to the integrations API 2023-02-13 22:05:39 +00:00
Matt Aitken 027f0210dc The input is validated and results are coming back! 2023-02-13 21:44:18 +00:00
James Ritchie da155d1378 Added a modal for the cloud hosting option 2023-02-13 19:11:12 +00:00
Matt Aitken 38f32f405f Progress on action api endpoint 2023-02-13 18:24:36 +00:00
James Ritchie 0fee3ceae5 Blank example now has a modal 2023-02-13 18:20:10 +00:00
James Ritchie 710003ebdf Added modals for the webhook, custom event etc cards 2023-02-13 18:09:00 +00:00
Matt Aitken 76a2c82d9f Fixes for CommonJS in express and tests failing because of access token 2023-02-13 17:59:17 +00:00
James Ritchie 1be2af9309 Example modal update 2023-02-13 17:50:15 +00:00
James Ritchie cdbae933b2 Exported types from sample data 2023-02-13 17:44:39 +00:00
James Ritchie 7f2c9687b7 Created an examples overview with modal 2023-02-13 17:44:39 +00:00
James Ritchie 721a32a379 Moved modal into the examples component 2023-02-13 17:44:39 +00:00
James Ritchie 2424de07ac Added typography and forms tailwind packages 2023-02-13 17:44:39 +00:00
Eric Allam 179afbbcb3 More work on the org template page (added workflows list) 2023-02-13 17:02:52 +00:00
Matt Aitken 4d6963f0e7 Added target node16 to tsup 2023-02-13 16:37:41 +00:00
Matt Aitken 73fb0f3c0d Added explicit returns types because tsup was complaining 2023-02-13 16:37:26 +00:00
D-K-P 4ed486ef93 Styled the template overview button 2023-02-13 16:18:31 +00:00
Matt Aitken 9751531cc1 Watch mode working properly with the action endpoint 2023-02-13 16:14:43 +00:00
Matt Aitken 313a8c59cf First commit of WIP generated Slack SDK 2023-02-13 16:14:31 +00:00
Matt Aitken 76c660f167 eslint ignore build folder 2023-02-13 16:10:04 +00:00
Matt Aitken 3d5bbf899e Got integrations express server up and running 2023-02-13 15:54:36 +00:00
James Ritchie 460e8aa4a7 Fixed layout issues and added a max height 2023-02-13 15:16:46 +00:00
Matt Aitken 62ab7e098d Generate integrations in the correct folder 2023-02-13 15:03:02 +00:00
D-K-P c4a441129b modal and grid updates 2023-02-13 14:57:10 +00:00
Matt Aitken 63486d21c4 Renamed command to generate-integrations 2023-02-13 14:57:09 +00:00
Matt Aitken fbdc3c799d Created the generated-integrations folder with a Readme 2023-02-13 14:56:55 +00:00
Matt Aitken fc1dd44f39 Added the new integrations system into the mono-repo 2023-02-13 14:48:12 +00:00
James Ritchie 8a1517bc7f Removed old step 2023-02-13 14:38:46 +00:00
D-K-P fb0ecb8c34 Added overflow-scrolling and fixed side bar 2023-02-13 14:37:30 +00:00
James Ritchie c091bc3326 Added a modal to the template cards 2023-02-13 14:36:51 +00:00
Eric Allam c27bdf6308 Added markdownDocs to Template 2023-02-13 14:21:21 +00:00
James Ritchie 007dc2d713 Removed styling around templateoverview 2023-02-13 14:16:07 +00:00
D-K-P ba868cbd40 Pushed markdown in the templatesdata file 2023-02-13 14:13:56 +00:00
Eric Allam 030844d905 Live update created org templates using SSE and useRevalidator. Updated remix to v1.10.1 2023-02-13 14:12:17 +00:00
James Ritchie 36e25a85f8 Blank ExampleOverview file 2023-02-13 13:52:53 +00:00
James Ritchie 4b0d03f9cc Passing in template data 2023-02-13 13:52:53 +00:00
D-K-P d6c6c71268 Added markdown to templatesoverview 2023-02-13 13:52:08 +00:00
James Ritchie 6117bcf7eb Used the existing diaglog component and added a close icon 2023-02-13 13:10:36 +00:00
D-K-P e1fb69fe44 Removed close button 2023-02-13 12:09:58 +00:00
James Ritchie bf5621b716 Added a basic modal to existing repo step 3 2023-02-13 12:00:55 +00:00
James Ritchie 1c9be1ee1d Moved misplaced imports up to the top 2023-02-13 12:00:55 +00:00
James Ritchie a020dfa036 Added @trigger.dev/sdk to the required packages 2023-02-13 12:00:55 +00:00
D-K-P 2e28bd09ca Layout for template overview 2023-02-13 11:29:52 +00:00
D-K-P 6595535b40 Added template grid and updated data 2023-02-13 11:29:52 +00:00
James Ritchie a7eac27b98 Added a blank example as the first option in the list 2023-02-13 10:33:46 +00:00
James Ritchie b98bae8588 ‘Choose an example’ now shows all the options styled into cards 2023-02-13 10:27:51 +00:00
James Ritchie 90a582f6ad Improved the tertiary link colour 2023-02-13 10:26:44 +00:00
James Ritchie c41c2e8725 Turned the old templates page into a placeholder for now 2023-02-13 09:34:18 +00:00
James Ritchie ed4d6846f7 Merged installing the packages into 1 step and added a new step 6 2023-02-12 17:51:48 +00:00
James Ritchie 952e584d68 Full workflow for existing repo 2023-02-12 16:26:00 +00:00
James Ritchie f178629b9d WIP adding new steps for the existing repo journey 2023-02-11 11:42:16 +00:00
James Ritchie eb2741708a Button tweak 2023-02-11 11:13:41 +00:00
James Ritchie fce24cc7fa Previous steps now links 2023-02-11 10:38:45 +00:00
James Ritchie 1ca8760868 Improved wording and styling 2023-02-11 10:19:03 +00:00
James Ritchie ffcdc763eb Added a cloud coming soon message 2023-02-11 10:06:31 +00:00
Matt Aitken bacd76c8e5 Improved .env.example 2023-02-10 20:05:41 +00:00
Matt Aitken cf04c3902f Added pnpm run idev command for running the webapp with Infisical secrets injected 2023-02-10 19:56:17 +00:00
James Ritchie c4ba591df0 Copy update to fix step 2 2023-02-10 19:30:53 +00:00
James Ritchie ef8431b292 Step numbers now have an active green state 2023-02-10 19:24:11 +00:00
Eric Allam b2290e3bc0 Get deploy to render working with the templates with the button pointing to the correct url 2023-02-10 18:15:18 +00:00
James Ritchie 1bb2ebc7bc Created a Template step by step guide page 2023-02-10 17:27:01 +00:00
James Ritchie 0193327f5d Added a new Overview page 2023-02-10 17:27:01 +00:00
James Ritchie 431079c894 Exported the step numbers 2023-02-10 17:27:01 +00:00
Eric Allam cc6a37bdf6 Add a specific template, and remove installations when getting the installations.delete github webhook 2023-02-10 16:51:38 +00:00
Eric Allam 9539138992 WIP creating template repos in github accounts 2023-02-10 15:24:47 +00:00
Matt Aitken dee2db231a Merge pull request #57 from triggerdotdev/dev
Workflow run created event now has the `environmentType` property
2023-02-10 14:20:04 +00:00
Matt Aitken 5e99b28ea5 Report the environment type on a workflow run event (live or development) 2023-02-10 14:18:42 +00:00
James Ritchie 038d53c7c5 Added templates data file 2023-02-10 14:11:21 +00:00
James Ritchie ad1f9346b8 Removed un-used tailwind config values 2023-02-10 13:50:06 +00:00
Eric Allam ddfce4e3c7 GitHub app installation 2023-02-10 13:07:41 +00:00
Matt Aitken 8a73e559e8 Merge pull request #56 from triggerdotdev/dev
Fixed all linting issues, almost all unused imports or type imports
2023-02-10 10:25:11 +00:00
Matt Aitken ad26302925 Fixed all liniting issues, almost all unused imports or type imports 2023-02-10 10:23:05 +00:00
Matt Aitken 2a20546e7b Merge pull request #55 from triggerdotdev/dev
Added WebHook examples for first workflow tests
2023-02-10 10:22:45 +00:00
Matt Aitken 137db98176 Removed unused GitHub example object 2023-02-10 10:21:18 +00:00
James Ritchie 94154bd96c Pricing link goes to the correct URL 2023-02-10 10:16:56 +00:00
James Ritchie c34a28b2d5 Added toxic and acid colours and button to the app 2023-02-10 10:12:03 +00:00
Matt Aitken 79622b6123 GitHub webhook schema fixes 2023-02-10 09:56:47 +00:00
Matt Aitken d329aca7e5 Added WhatsApp examples 2023-02-10 09:56:34 +00:00
D-K-P a347e5526f Added placeholder image 2023-02-09 20:50:09 +00:00
Matt Aitken 5328ba1556 Added GitHub examples that are shown on test page 2023-02-09 20:33:28 +00:00
James Ritchie 7d12d3242e Added toxic and acid colours to the app 2023-02-09 18:36:18 +00:00
James Ritchie 706024841a Added the marketing site header to the app template page 2023-02-09 18:36:18 +00:00
Matt Aitken 6e5695f873 Removed unused import 2023-02-09 17:52:02 +00:00
Matt Aitken 565aba4021 Merge pull request #54 from triggerdotdev/dev
Analytics updates (orgs, workflows and runs)
2023-02-09 17:50:50 +00:00
Matt Aitken 5a10e53de6 Merge pull request #53 from triggerdotdev/analytics
Analytics events implemented on client and server for common events
2023-02-09 16:50:59 +00:00
D-K-P c927342da3 Added basic grid layout 2023-02-09 16:45:33 +00:00
Matt Aitken 862eeb89d5 POSTHOG_PROJECT_KEY env variable for flightcontrol.json in staging
"fromParameterStore": "/Prod/webapp/POSTHOG_PROJECT_KEY"
2023-02-09 16:42:15 +00:00
Matt Aitken b88ad37b92 Turn client-side analytics logging off 2023-02-09 16:36:00 +00:00
Matt Aitken 5ff4b68bae Pass properties for new events 2023-02-09 16:35:53 +00:00
Matt Aitken a7107cf1b1 Add runCount to user properties 2023-02-09 16:04:06 +00:00
Matt Aitken 6132cdf8c0 Removed workflow run completed event 2023-02-09 15:47:50 +00:00
Matt Aitken d39fb33c70 Workflow created and Workflow run created 2023-02-09 15:47:03 +00:00
James Ritchie 5e7ff78f23 Setting up basic structure and components for the new Templates 2023-02-09 15:21:10 +00:00
James Ritchie 05289d0cb1 Merge pull request #52 from triggerdotdev/dev
The side menu now only shows the workflows tab if you have 0 workflows
2023-02-09 15:06:22 +00:00
Matt Aitken 7dbc634388 Tidied up imports 2023-02-09 14:19:59 +00:00
Matt Aitken d58add78bf Org, Workflow, Environment events sending from frontend 2023-02-09 14:10:00 +00:00
James Ritchie 0c8448c65d The side menu now only shows the workflows tab if you have 0 workflows 2023-02-09 12:55:47 +00:00
Matt Aitken eed039319e Identify workflow and remove unused environment slug 2023-02-09 11:06:42 +00:00
Matt Aitken 3542c0ed87 Identify user, organization and environments 2023-02-09 10:58:18 +00:00
Matt Aitken 162c0f5db5 Identify user’s on the backend when they login/sign up 2023-02-09 09:01:56 +00:00
Matt Aitken 5f649d1b2e Moved postAuthentication actions into a separate file 2023-02-09 08:48:39 +00:00
Matt Aitken e261149065 Reworked PostHog client implementation 2023-02-08 20:51:05 +00:00
Eric Allam 5f3d985b64 Merge pull request #51 from triggerdotdev/dev
Very simple admin area to assist with user support
2023-02-08 10:18:28 +00:00
Eric Allam 283f6d6be6 Added a very simple admin section to assist in user support 2023-02-08 09:50:36 +00:00
James Ritchie 7d1b4e71a5 Made the horizontal scrollbar visible 2023-02-07 18:17:32 +00:00
Eric Allam 29b4ba4c78 Merge pull request #50 from triggerdotdev/dev
Feb 7 2023 - Safer SDK and added log feedback
2023-02-07 15:17:42 +00:00
Eric Allam ccd89d08d9 Merge pull request #49 from triggerdotdev/dev
Feb 6 2023 Release
2023-02-06 15:45:07 +00:00
Dan bf57430b66 Merge pull request #41 from triggerdotdev/onboarding
Fixed button
2023-02-02 22:00:12 +00:00
Eric Allam ad70dbc5dd Read from the latest trigger messages when creating workflow trigger subscription 2023-02-02 15:13:03 +00:00
Eric Allam a5d8290663 New emoji and fixed the runs image 2023-02-01 14:11:33 +00:00
Eric Allam 4fa967b2b1 Merge pull request #37 from triggerdotdev/dev
Fix builds by locking turbo dep to 1.7.0
2023-02-01 13:48:29 +00:00
Eric Allam cd11246d9a Merge pull request #36 from triggerdotdev/dev
README and mobile updates
2023-02-01 11:37:09 +00:00
Eric Allam f377aba208 Merge pull request #35 from triggerdotdev/dev
Move to dual license
2023-01-31 14:33:33 +00:00
Eric Allam 55a9031526 Merge pull request #34 from triggerdotdev/dev
Create separate packages for each integration
2023-01-31 14:11:23 +00:00
3042 changed files with 245257 additions and 44627 deletions
+6
View File
@@ -0,0 +1,6 @@
---
"trigger.dev": patch
"@trigger.dev/core": patch
---
better handle task metadata parse errors, and display nicely formatted errors
+5
View File
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---
Vastly improved dev command output
+8
View File
@@ -0,0 +1,8 @@
---
"@trigger.dev/sdk": patch
"@trigger.dev/core-apps": patch
"trigger.dev": patch
"@trigger.dev/core": patch
---
add machine config and secure zod connection
+19 -3
View File
@@ -2,10 +2,26 @@
"$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": ["wss", "webapp"]
}
"ignore": [
"webapp",
"emails",
"proxy",
"yalt",
"@trigger.dev/database",
"coordinator",
"docker-provider",
"kubernetes-provider"
],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}
+7
View File
@@ -0,0 +1,7 @@
---
"@trigger.dev/sdk": patch
"trigger.dev": patch
"@trigger.dev/core": patch
---
Configurable log levels in the config file and via env var
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/core": patch
---
Fixed batch otel flushing
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/react": patch
---
Fix for shared queryKey between useRunDetails and useRunStatuses
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/core": patch
---
Retry 429, 500, and connection error API requests to the trigger.dev server
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/nestjs": patch
---
fix: [nestjs integration] fastify HTTP adapter detection now works correctly for response headers
+5
View File
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---
Changed "Worker" to "Version" in the dev command key
+6
View File
@@ -0,0 +1,6 @@
---
"trigger.dev": patch
"@trigger.dev/core": patch
---
Handle string and non-stringifiable outputs like functions
+5
View File
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---
Improve error messages during dev/deploy and handle deploy image build issues
+5
View File
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---
Added a Node.js runtime check for the CLI
+67
View File
@@ -0,0 +1,67 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"coordinator": "0.0.1",
"docker-provider": "0.0.1",
"kubernetes-provider": "0.0.1",
"proxy": "0.0.11",
"webapp": "1.0.0",
"yalt": "0.0.1",
"@trigger.dev/airtable": "2.3.18",
"@trigger.dev/github": "2.3.18",
"@trigger.dev/linear": "2.3.18",
"@trigger.dev/openai": "2.3.18",
"@trigger.dev/plain": "2.3.18",
"@trigger.dev/replicate": "2.3.18",
"@trigger.dev/resend": "2.3.18",
"@trigger.dev/sendgrid": "2.3.18",
"@trigger.dev/shopify": "2.3.18",
"@trigger.dev/slack": "2.3.18",
"@trigger.dev/stripe": "2.3.18",
"@trigger.dev/supabase": "2.3.18",
"@trigger.dev/typeform": "2.3.18",
"@trigger.dev/astro": "2.3.18",
"@trigger.dev/cli": "2.3.18",
"trigger.dev": "2.3.18",
"@trigger.dev/core": "2.3.18",
"@trigger.dev/core-apps": "0.0.0",
"@trigger.dev/core-backend": "2.3.18",
"@trigger.dev/database": "0.0.1",
"emails": "1.0.0",
"@trigger.dev/eslint-plugin": "2.3.18",
"@trigger.dev/express": "2.3.18",
"@trigger.dev/hono": "2.3.18",
"@trigger.dev/integration-kit": "2.3.18",
"@trigger.dev/nestjs": "2.3.18",
"@trigger.dev/nextjs": "2.3.18",
"@trigger.dev/otlp-importer": "2.3.11",
"@trigger.dev/react": "2.3.18",
"@trigger.dev/remix": "2.3.18",
"@trigger.dev/sveltekit": "2.3.18",
"@trigger.dev/testing": "2.3.18",
"@trigger.dev/sdk": "2.3.18",
"@trigger.dev/yalt": "2.3.18"
},
"changesets": [
"breezy-gorillas-mate",
"chilled-hornets-move",
"clean-pianos-listen",
"cool-glasses-bake",
"eight-pumas-float",
"green-bags-wink",
"khaki-apricots-design",
"lemon-jobs-repair",
"light-bulldogs-press",
"many-ligers-pump",
"mighty-camels-joke",
"odd-poets-own",
"real-planets-stare",
"sharp-zebras-serve",
"smart-olives-eat",
"strange-ghosts-matter",
"stupid-bulldogs-applaud",
"sweet-lizards-press",
"tall-bees-wave"
]
}
+7
View File
@@ -0,0 +1,7 @@
---
"@trigger.dev/sdk": patch
"trigger.dev": patch
"@trigger.dev/core": patch
---
Fixed incorrect span timings around checkpoints by implementing a precise wall clock that resets after restores
+5
View File
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---
Update trigger.dev CLI for new batch otel support
+5
View File
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---
Fix CLI logout and add list-profiles command
+5
View File
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---
Added DEBUG to the ignored env vars
+5
View File
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---
Fixed an issue where the trigger.dev package was not being built before publishing to npm
+8
View File
@@ -0,0 +1,8 @@
---
"trigger.dev": major
"@trigger.dev/core": major
"@trigger.dev/otlp-importer": major
"@trigger.dev/sdk": major
---
Updates to support Trigger.dev v3
+7
View File
@@ -0,0 +1,7 @@
---
"@trigger.dev/sdk": patch
"trigger.dev": patch
"@trigger.dev/core": patch
---
Dynamically import superjson and fix some bundling issues
-8
View File
@@ -1,8 +0,0 @@
# You need to stop and re-run docker to switch, `pnpm run docker:db`
# To login using GitHub and connect via OAuth with most integrations
AUTH_CALLBACK_URL=http://localhost:3004/oauth/callback
# To connect with Slack
# AUTH_CALLBACK_URL=https://<ngrok subdomain>.eu.ngrok.io/oauth/callback
# You only need to use this locally if you specify PIZZLY_SECRET_KEY in the webapp .env file
# PIZZLY_SECRET_KEY=<secret_key>
+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
+75
View File
@@ -0,0 +1,75 @@
# 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
# 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
# Redis is used for concurrency control
# REDIS_HOST="localhost"
# REDIS_PORT="6379"
# REDIS_TLS_DISABLED="true"
# OPTIONAL VARIABLES
# This is used for validating emails that are allowed to log in. Every email that do not match this regex will be rejected.
# WHITELISTED_EMAILS="authorized@yahoo\.com|authorized@gmail\.com"
# 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=
# Remove the following line to enable logging telemetry traces to the console
LOG_TELEMETRY="false"
# CLOUD VARIABLES
POSTHOG_PROJECT_KEY=
PLAIN_API_KEY=
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=
# v3 variables
PROVIDER_SECRET=provider-secret # generate the actual secret with `openssl rand -hex 32`
COORDINATOR_SECRET=coordinator-secret # generate the actual secret with `openssl rand -hex 32`
# Uncomment the following line to enable the registry proxy
# ENABLE_REGISTRY_PROXY=true
# DEPOT_TOKEN=<Depot org token>
# DEPOT_PROJECT_ID=<Depot project id>
# DEPLOY_REGISTRY_HOST=${APP_ORIGIN} # This is the host that the deploy CLI will use to push images to the registry
# CONTAINER_REGISTRY_ORIGIN=<Container registry origin e.g. https://registry.digitalocean.com>
# CONTAINER_REGISTRY_USERNAME=<Container registry username e.g. Digital ocean email address>
# CONTAINER_REGISTRY_PASSWORD=<Container registry password e.g. Digital ocean PAT>
# DEV_OTEL_EXPORTER_OTLP_ENDPOINT="http://0.0.0.0:4318"
# These are needed for the object store (for handling large payloads/outputs)
# OBJECT_STORE_BASE_URL="https://{bucket}.{accountId}.r2.cloudflarestorage.com"
# OBJECT_STORE_ACCESS_KEY_ID=
# OBJECT_STORE_SECRET_ACCESS_KEY=
# RUNTIME_WAIT_THRESHOLD_IN_MS=10000
# These control the server-side internal telemetry
# INTERNAL_OTEL_TRACE_EXPORTER_URL=<URL to send traces to>
# INTERNAL_OTEL_TRACE_EXPORTER_AUTH_HEADER_NAME=<Header name for the auth token>
# INTERNAL_OTEL_TRACE_EXPORTER_AUTH_HEADER_VALUE=<Auth token value>
# INTERNAL_OTEL_TRACE_LOGGING_ENABLED=1
# INTERNAL_OTEL_TRACE_SAMPING_RATE=20 # this means 1/20 traces or 5% of traces will be sampled (sampled = recorded)
# INTERNAL_OTEL_TRACE_INSTRUMENT_PRISMA_ENABLED=0,
+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.
@@ -0,0 +1,21 @@
name: OpenTelemetry Auto-Instrumentation Request
description: Suggest an SDK that you'd like to be auto-instrumented in the Run log view
title: "auto-instrumentation: "
labels: ["🌟 enhancement"]
body:
- type: textarea
attributes:
label: What API or SDK would you to have automatic spans for?
description: A clear description of which API or SDK you'd like, and links to it.
validations:
required: true
- type: textarea
attributes:
label: Is there an existing OpenTelemetry auto-instrumentation package?
description: You can search for existing ones https://opentelemetry.io/ecosystem/registry/?component=instrumentation&language=js
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]_
💯
+74
View File
@@ -0,0 +1,74 @@
name: "🧪 E2E Tests"
on:
workflow_call:
jobs:
e2e:
name: "🧪 E2E Tests"
runs-on: buildjet-16vcpu-ubuntu-2204
steps:
- name: 🐳 Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME || vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN || vars.DOCKERHUB_TOKEN }}
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: ⎔ Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 8.15.5
- name: ⎔ Setup node
uses: buildjet/setup-node@v3
with:
node-version: 20.11.1
cache: "pnpm"
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- 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^...
cd apps/webapp && pnpm run build:server
cd ../..
pnpm --filter @trigger.dev/database generate
pnpm --filter @trigger.dev/otlp-importer 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
+32
View File
@@ -0,0 +1,32 @@
name: 🤖 PR Checks
on:
pull_request:
branches:
- main
paths-ignore:
- "**.md"
- "**.mdx"
- ".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
+59
View File
@@ -0,0 +1,59 @@
name: "🐳 Publish Docker"
on:
workflow_call:
jobs:
publish:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
short_sha: ${{ steps.get_commit.outputs.sha_short }}
steps:
- name: Setup Depot CLI
uses: depot/setup-action@v1
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: 🆚 Get the version
id: get_version
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}"
elif [[ $IMAGE_TAG == build-* ]]; then
IMAGE_TAG="${IMAGE_TAG#build-}"
fi
echo "IMAGE_TAG=${IMAGE_TAG}"
elif [[ $GITHUB_REF == refs/heads/main ]]; then
# Handle main branch specifically
IMAGE_TAG="main"
echo "IMAGE_TAG=${IMAGE_TAG}"
else
echo "Invalid reference: ${GITHUB_REF}"
exit 1
fi
echo "::set-output name=version::${IMAGE_TAG}"
- name: 🔢 Get the commit hash
id: get_commit
run: |
echo ::set-output name=sha_short::$(echo ${{ github.sha }} | cut -c1-7)
- name: 🐙 Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🐳 Build image and push to GitHub Container Registry
uses: depot/build-push-action@v1
with:
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/triggerdotdev/trigger.dev:${{ steps.get_version.outputs.version }}
push: true
+94
View File
@@ -0,0 +1,94 @@
name: "🚢 Publish Infra Images"
on:
push:
tags:
- "infra-dev-*"
- "infra-test-*"
- "infra-prod-*"
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
packages: write
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
env:
AWS_REGION: us-east-1
jobs:
build:
strategy:
matrix:
package: [coordinator, kubernetes-provider]
runs-on: buildjet-16vcpu-ubuntu-2204
env:
DOCKER_BUILDKIT: "1"
steps:
- uses: actions/checkout@v4
- name: Generate image reference
id: prep
# WARNING: This step expects the workflow to have been triggered by a specific tag format of: infra-${env}-*
run: |
env=$(echo ${{ github.ref_name }} | cut -d- -f2)
sha=${GITHUB_SHA::7}
ts=$(date +%s)
if [[ "${{ matrix.package }}" == *-provider ]]; then
provider_type=$(echo ${{ matrix.package }} | cut -d- -f1)
repository=provider/${provider_type}
else
repository=${{ matrix.package }}
fi
echo "IMAGE_TAG=${env}-${sha}-${ts}" >> "$GITHUB_OUTPUT"
echo "REPOSITORY=${repository}" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# ..to avoid rate limits when pulling images
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🚢 Build Container Image
run: |
docker build -t infra_image -f ./apps/${{ matrix.package }}/Containerfile .
# ..to push image
- name: 🐙 Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🐙 Push to GitHub Container Registry
run: |
docker tag infra_image $REGISTRY/$REPOSITORY:$IMAGE_TAG
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG
env:
REGISTRY: ghcr.io/triggerdotdev
REPOSITORY: ${{ steps.prep.outputs.REPOSITORY }}
IMAGE_TAG: ${{ steps.prep.outputs.IMAGE_TAG }}
+59
View File
@@ -0,0 +1,59 @@
name: 🚀 Publish Trigger.dev Docker
on:
push:
branches:
- main
tags:
- "v.docker.*"
- "build-*"
paths:
- ".github/workflows/publish.yml"
- ".github/workflows/typecheck.yml"
- ".github/workflows/unit-tests.yml"
- ".github/workflows/e2e.yml"
- ".github/workflows/publish-docker.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
packages: write
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
env:
AWS_REGION: us-east-1
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
publish:
needs: [typecheck, units, e2e]
uses: ./.github/workflows/publish-docker.yml
secrets: inherit
+76
View File
@@ -0,0 +1,76 @@
name: 🦋 Changesets Release
on:
push:
branches:
- main
paths-ignore:
- "**.md"
- ".github/CODEOWNERS"
- ".github/ISSUE_TEMPLATE/**"
jobs:
release:
name: 🦋 Changesets Release
runs-on: buildjet-8vcpu-ubuntu-2204
if: |
github.repository == 'triggerdotdev/trigger.dev'
outputs:
published_packages: ${{ steps.changesets.outputs.publishedPackages }}
published: ${{ steps.changesets.outputs.published }}
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: ⎔ Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 8.15.5
- name: ⎔ Setup node
uses: buildjet/setup-node@v3
with:
node-version: 20.11.1
cache: "pnpm"
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: 📥 Download deps
run: pnpm install --frozen-lockfile
- name: 📀 Generate Prisma Client
run: pnpm run generate
- name: 🔎 Type check
run: pnpm run typecheck --filter "@trigger.dev/*" --filter "trigger.dev"
- name: 🔐 Setup npm auth
run: |
echo "registry=https://registry.npmjs.org" >> ~/.npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
# This action has two responsibilities. The first time the workflow runs
# (initial push to the `main` branch) it will create a new branch and
# then open a PR with the related changes for the new version. After the
# PR is merged, the workflow will run again and this action will build +
# publish to npm.
- name: 🚀 PR / Publish
id: changesets
uses: changesets/action@v1
with:
version: pnpm run changeset:version
commit: "chore: Update version for release"
title: "chore: Update version for release"
publish: pnpm run changeset:release
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+37
View File
@@ -0,0 +1,37 @@
name: "ʦ TypeScript"
on:
workflow_call:
jobs:
typecheck:
runs-on: buildjet-8vcpu-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: 8.15.5
- name: ⎔ Setup node
uses: buildjet/setup-node@v3
with:
node-version: 20.11.1
cache: "pnpm"
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- 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
+45
View File
@@ -0,0 +1,45 @@
name: "🧪 Unit Tests"
on:
workflow_call:
jobs:
unitTests:
name: "🧪 Unit Tests"
runs-on: buildjet-8vcpu-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: 8.15.5
- name: ⎔ Setup node
uses: buildjet/setup-node@v3
with:
node-version: 20.11.1
cache: "pnpm"
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: ⎔ Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: ⎔ Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "1.0.15"
- name: 📥 Download deps
run: pnpm install --frozen-lockfile
- name: Run Unit Tests
run: |
pnpm run test
+10 -1
View File
@@ -45,4 +45,13 @@ yarn-error.log*
.output
apps/**/public/build
.tests-container-id.txt
.sentryclirc
.sentryclirc
.buildt
**/tmp/
/test-results/
/playwright-report/
/playwright/.cache/
.cosine
.trigger/
+3
View File
@@ -0,0 +1,3 @@
[submodule "packages/otlp-importer/protos"]
path = packages/otlp-importer/protos
url = https://github.com/open-telemetry/opentelemetry-proto.git
+1
View File
@@ -0,0 +1 @@
{ "workspaceId": "63e5e42daf9a537ba8d9503c" }
+2 -1
View File
@@ -1 +1,2 @@
link-workspace-packages=false
link-workspace-packages=false
public-hoist-pattern[]=*prisma*
+1 -1
View File
@@ -1 +1 @@
v16.19.0
v20.11.1
+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/
+9
View File
@@ -0,0 +1,9 @@
{
"recommendations": [
"astro-build.astro-vscode",
"denoland.vscode-deno"
],
"unwantedRecommendations": [
]
}
+40 -5
View File
@@ -5,18 +5,53 @@
"version": "0.2.0",
"configurations": [
{
"command": "pnpm run dev --filter webapp",
"name": "Run webapp",
"request": "launch",
"type": "node-terminal",
"cwd": "${workspaceFolder}"
"request": "launch",
"name": "Debug WebApp",
"command": "pnpm run dev --filter webapp",
"envFile": "${workspaceFolder}/.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-terminal",
"request": "launch",
"name": "Debug BYO Auth",
"command": "pnpm run byo-auth",
"envFile": "${workspaceFolder}/references/job-catalog/.env",
"cwd": "${workspaceFolder}/references/job-catalog",
"sourceMaps": true
},
{
"type": "node-terminal",
"request": "launch",
"name": "Debug V3 Dev CLI",
"command": "pnpm exec trigger.dev dev --log-level debug",
"cwd": "${workspaceFolder}/references/v3-catalog",
"sourceMaps": true
},
{
"type": "node-terminal",
"request": "launch",
"name": "Debug V3 Deploy CLI",
"command": "pnpm exec trigger.dev deploy",
"cwd": "${workspaceFolder}/references/v3-catalog",
"sourceMaps": true
},
{
"type": "node",
"request": "attach",
"name": "Attach to Trigger.dev CLI (v3)",
"port": 9229,
"restart": true,
"skipFiles": ["<node_internals>/**"]
}
]
}
+4
View File
@@ -0,0 +1,4 @@
{
"deno.enablePaths": ["references/deno-reference", "runtime_tests/tests/deno"],
"debug.toolBarLocation": "commandCenter"
}
-61
View File
@@ -1,61 +0,0 @@
# Warp Launch Configuration
#
#
# Use this to start a certain configuration of windows, tabs, and panes
# Open the launch configuration palette to access and open any launch configuration
#
# This file defines your launch configuration
# More on how to do so here:
# https://docs.warp.dev/features/session-management/launch-configurations
#
# All launch configurations are stored under ~/.warp/launch_configurations/
# Edit them anytime!
#
# You can also add commands that run on-start for your launch configurations like so:
# ---
# name: Example with Command
# windows:
# - tabs:
# - layout:
# cwd: /Users/warp-user/project
# commands:
# - exec: code .
---
name: Triggerdotdev
windows:
- tabs:
- title: webapp
layout:
split_direction: vertical
panes:
- cwd: /Users/eric/code/triggerdotdev/trigger.dev
commands:
- exec: pnpm run dev --filter webapp
- cwd: /Users/eric/code/triggerdotdev/trigger.dev/apps/webapp
- title: ngrok
layout:
split_direction: horizontal
panes:
- cwd: /Users/eric/code/triggerdotdev/trigger.dev
commands:
- exec: ./scripts/proxy-webapp.sh <your-trigger-dev>
- cwd: /Users/eric/code/triggerdotdev/trigger.dev
commands:
- exec: ./scripts/proxy-pizzly.sh <your-pizzly-dev>
- title: wss and examples
layout:
split_direction: horizontal
panes:
- cwd: /Users/eric/code/triggerdotdev/trigger.dev/apps/wss
commands:
- exec: LOG_LEVEL=debug pnpm run dev
- cwd: /Users/eric/code/triggerdotdev/trigger.dev/examples
- title: emails
layout:
split_direction: horizontal
panes:
- cwd: /Users/eric/Work/Git/APIHero/trigger.dev/packages/emails
commands:
- exec: pnpm run dev
- cwd: /Users/eric/Work/Git/APIHero/trigger.dev/packages/emails
+42 -11
View File
@@ -4,23 +4,54 @@ Trigger.dev uses [changesets](https://github.com/changesets/changesets) to manag
## Adding a changeset
To add a changeset, use `pnpm run changeset:add` and follow the instructions [here](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md). Please only ever select one of our public packages when adding a changeset, which currently are:
To add a changeset, use `pnpm run changeset:add` and follow the instructions [here](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md). Please only ever select one of our public packages when adding a changeset.
- `@trigger.dev/sdk`
- `@trigger.dev/integration-sdk`
- `@trigger.dev/github`
- `@trigger.dev/slack`
- `@trigger.dev/shopify`
- `@trigger.dev/resend`
## Release instructions
## Release instructions (local only)
Based on the instructions [here](https://github.com/changesets/changesets/blob/main/docs/intro-to-using-changesets.md)
1. Run `pnpm run changeset:version`
2. Run `pnpm run changeset:release`
## Release instructions (CI)
Please follow the best-practice of adding changesets in the same commit as the code making the change with `pnpm run changeset:add`, as it will allow our release.yml CI workflow to function properly:
- Anytime new changesets are added in a commit in the `main` branch, the [release.yml](./.github/workflows/release.yml) workflow will run and will automatically create/update a PR with a fresh run of `pnpm run changeset:version`.
- When the version PR is merged into `main`, the release.yml workflow will automatically run `pnpm run changeset:release` to build and release packages to npm.
## Pre-release instructions
- Switch into pre-release mode by running `pnpm run changeset:next`.
- Switch back into normal mode by running `pnpm run changeset:normal`.
1. Add changesets as usual `pnpm run changeset:add`
2. Switch to pre-release mode by running `pnpm run changeset:next`
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/*" --filter "trigger.dev"
```
4. Publish the snapshot (replace "dev" with your tag)
```sh
pnpm exec changeset publish --no-git-tag --snapshot --tag prerelease
```
+43
View File
@@ -0,0 +1,43 @@
# Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct that could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the Contributor Covenant, version 2.0, available at [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
+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.
-229
View File
@@ -1,229 +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, pulsar, and pizzly server
```bash
pnpm run docker:db
```
> **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:db
```
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.
+196 -20
View File
@@ -1,25 +1,201 @@
Copyright (c) 2022 API Hero Inc.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Portions of this software are licensed as follows:
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- All content that resides under any "ee/" directory of this repository, if such directories exists, are licensed under the license defined in "ee/LICENSE".
- All third party components incorporated into the Trigger.dev Software are licensed under the original license provided by the owner of the applicable component.
- Content outside of the above mentioned directories or restrictions above is available under the "MIT Expat" license as defined below.
1. Definitions.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"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.
"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.
"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.
"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.
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.
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
(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
(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.
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.
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.
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
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 "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
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
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.
+57 -171
View File
@@ -1,205 +1,91 @@
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://imagedelivery.net/3TbraffuDZ4aEf8KWOmI_w/a45d1fa2-0ae8-4a39-4409-f4f934bfae00/public">
<source media="(prefers-color-scheme: light)" srcset="https://imagedelivery.net/3TbraffuDZ4aEf8KWOmI_w/3f5ad4c1-c4c8-4277-b622-290e7f37bd00/public">
<img alt="Trigger.dev logo" src="https://imagedelivery.net/3TbraffuDZ4aEf8KWOmI_w/a45d1fa2-0ae8-4a39-4409-f4f934bfae00/public">
</picture>
### The open source background jobs framework
![Hero](https://raw.githubusercontent.com/triggerdotdev/trigger.dev/eebe37109e33beae6390ee19029fce8a5934c84b/apps/webapp/public/images/logo-banner.png)
[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) [![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCu-PdxpWtIrrd7vW0N5T6ZA?style=social)](https://www.youtube.com/@triggerdotdev)
[![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)
[Website](https://trigger.dev) | [Community](https://discord.gg/JtBAxBr2m3) | [Docs](https://docs.trigger.dev)
</div>
# About Trigger.dev
# **⚡️ Trigger.dev**
### **The developer-first open source Zapier alternative.**
Create long-running jobs directly in your codebase with features like API integrations, webhooks, scheduling and delays.
## Long running Jobs on serverless
Trigger.dev is an open source platform that makes it easy for developers to create event-driven background tasks directly in their code. Build, test and run workflows locally using our SDK. Subscribe to webhooks, schedule jobs, run background jobs and add long delays easily and reliably. In our web app you get full visibility of every run your workflow has ever made making it easier to monitor and debug.
Reliably run jobs and dont worry about function timeouts, we handle those for you.
&nbsp;
- Auto-resume after a function timeout
- Auto-resume after a server outage
- Add delays of up to a year
# **⭐️ Features:**
## In your codebase
- 👂 Easily subscribe to [webhooks](https://docs.trigger.dev/triggers/webhooks)
— they work locally without tunnelling.
- 🔥 Fire your own [custom events](https://docs.trigger.dev/triggers/custom-events)—a single event can trigger multiple workflows.
- 📆 [Schedule workflows](https://docs.trigger.dev/triggers/scheduled)—easily repeat tasks or use CRON syntax for advanced cases.
- 🚦 Add [long delays](https://docs.trigger.dev/functions/delays) inside workflows (up to a year) and they will pick up where they left off.
- 🤝 When your server goes down [its not a problem](https://docs.trigger.dev/guides/resumability), workflows will reconnect and continue.
- 🪧 [View every step of every run](https://docs.trigger.dev/viewing-runs), with data, previews and errors.
- 👋 Connect to and authenticate with APIs using our custom integrations.
- 🚗 If you have a custom use case, we support [Fetch for calling any HTTP endpoint](https://docs.trigger.dev/functions/fetch) or [webhooks](https://docs.trigger.dev/triggers/webhooks) for subscribing to events from APIs.
- 📡 All API calls are automatically retried with exponential back off.
- 😀 TypeScript SDK, so whether youre using JavaScript or TypeScript you will have a great experience.
Create Jobs where they belong: in your codebase. Version control, localhost, test, review, and deploy like you're already used to.
&nbsp;
## Secure by design
# **🌱 Documentation:**
We only receive Triggers and the data you choose to send to us. You can even completely self-host the entire platform.
- [Getting Started with Trigger.dev](https://docs.trigger.dev/getting-started)
- Example workflows
- [Welcome email drip campaign using Resend and Slack](https://docs.trigger.dev/examples/resend)
- [Post to Slack when a GitHub issue is created or modified](https://docs.trigger.dev/examples/slack)
- [Create a new product on Shopify](https://docs.trigger.dev/examples/shopify)
- [When a GitHub repo is starred, post information about the user to Slack](https://docs.trigger.dev/examples/github)
- Triggers:
- [Webhooks](https://docs.trigger.dev/triggers/webhooks)
- [Custom events](https://docs.trigger.dev/triggers/custom-events)
- [Scheduled](https://docs.trigger.dev/triggers/scheduled)
- Functions:
- [Fetch](https://docs.trigger.dev/functions/fetch)
- [Logging](https://docs.trigger.dev/functions/logging)
- [Delays](https://docs.trigger.dev/functions/delays)
- [Send event](https://docs.trigger.dev/functions/send-event)
- [Loops, conditionals, etc](https://docs.trigger.dev/functions/loops-conditionals-etc)
## Don't worry about deployment
&nbsp;
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.
# 🔬 **Anatomy of a workflow**
## Full visibility of every job run
* You create workflows in code on your server using our SDK
* Each API integration is a separate package, e.g. `@trigger.dev/slack`
* Each workflow has an event that triggers it, e.g. `github.events.newStarEvent`, `scheduleEvent`, `customEvent`
* Each workflow has a `run` function that is called when the event is triggered
* If we don't have an integration for the API you want to use, you can use `fetch` to call any HTTP endpoint and `webhookEvent` to subscribe to webhooks
View every Task in every Run so you can tell exactly what happened.
## **Example workflows**
![image](https://www.trigger.dev/build/_assets/web-app-2QFKXFLW.png)
<details open><summary> Post to Slack when a GitHub issue is created or modified
</summary>
## Built-in integrations
_Integrations required: Slack, GitHub_
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.
```ts
import { Trigger } from "@trigger.dev/sdk";
import * as github from "@trigger.dev/github";
import * as slack from "@trigger.dev/slack";
## Our progress
new Trigger({
id: "new-github-star-to-slack",
name: "New GitHub Star: triggerdotdev/trigger.dev",
apiKey: "<my_api_key>",
on: github.events.newStarEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event) => {
await slack.postMessage("github-stars", {
channelName: "github-stars",
text: `New GitHub star from \n<${event.sender.html_url}|${event.sender.login}>`,
});
},
}).listen();
```
Were building the most comprehensive and easy-to-use background jobs framework for developers.
</details>
Click the links to join the discussions about our upcoming features.
<details><summary>Welcome email drip campaign
</summary>
| 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 | 🕝 |
_Integrations required: Slack, Resend_
# Getting started
```ts
import { customEvent, Trigger, sendEvent } from "@trigger.dev/sdk";
import * as resend from "@trigger.dev/resend";
import * as slack from "@trigger.dev/slack";
import React from "react";
import { z } from "zod";
import { getUser } from "../db";
import { InactiveEmail, TipsEmail, WelcomeEmail } from "./email-templates";
Visit our docs [here](https://trigger.dev/docs).
new Trigger({
id: "welcome-email-campaign",
name: "Welcome email drip campaign",
apiKey: "<my_api_key>",
on: customEvent({
name: "user.created",
schema: z.object({
userId: z.string(),
}),
}),
async run(event, context) {
//get the user data from the database
const user = await getUser(event.userId);
## Self-host
await slack.postMessage("send-to-slack", {
channelName: "new-users",
text: `New user signed up: ${user.name} (${user.email})`,
});
We provide an official trigger.dev docker image you can use to easily self-host the platform. We're working on more extensive guides but we currently provide a [Fly.io example repository](https://github.com/triggerdotdev/fly.io) with instructions in the README for deploying and using a self-hosted instance of Trigger.dev on Fly.io.
//Send the first email
const welcomeResponse = await resend.sendEmail("welcome-email", {
from: "Trigger.dev <james@email.trigger.dev>",
replyTo: "James <james@trigger.dev>",
to: user.email,
subject: "Welcome to Trigger.dev",
react: <WelcomeEmail name={user.name} />,
});
await context.logger.debug(
`Sent welcome email to ${welcomeResponse.to} with id ${welcomeResponse.id}`
);
## Development
//wait 1 day, check if the user has created a workflow and send the appropriate email
await context.waitFor("wait-a-while", { days: 1 });
const updatedUser = await getUser(event.userId);
To setup and develop locally or contribute to the open source project, follow our [development guide](./CONTRIBUTING.md).
if (updatedUser.hasOnboarded) {
await resend.sendEmail("onboarding-complete", {
from: "Trigger.dev <james@email.trigger.dev>",
replyTo: "James <james@trigger.dev>",
to: updatedUser.email,
subject: "Pro tips for workflows",
react: <TipsEmail name={updatedUser.name} />,
});
} else {
await resend.sendEmail("onboarding-incomplete", {
from: "Trigger.dev <james@email.trigger.dev>",
replyTo: "James <james@trigger.dev>",
to: updatedUser.email,
subject: "Help with your first workflow",
react: <InactiveEmail name={updatedUser.name} />,
});
}
},
}).listen();
```
## Meet the Amazing People Behind This Project 🚀
</details>
[More examples here](https://docs.trigger.dev/examples/examples)
&nbsp;
# 👀 **Viewing runs:**
One of the most powerful features of Trigger.dev is the [runs page](https://docs.trigger.dev/viewing-runs). All of the steps in a workflow, including the initial event, can be viewed in detail. See the status / output of each step, the logs, rich previews, errors and much more.
![Viewing runs](https://mintlify.s3-us-west-1.amazonaws.com/api-hero/images/run-succeeded.png)
&nbsp;
# **🏠 Running Trigger.dev locally:**
To run Trigger.dev locally, [follow these steps](https://github.com/triggerdotdev/trigger.dev/blob/main/DEVELOPMENT.md).
&nbsp;
# **👏 Contributing:**
We are open source and love contributions!
- Request a feature in our [Discord community](https://discord.gg/JtBAxBr2m3)
- Open a PR
&nbsp;
# **🧘‍♂️ Self-hosting guide:**
Please subscribe to the [GitHub issue](https://github.com/triggerdotdev/trigger.dev/issues/48) to be notified when it's live.
&nbsp;
# **📧 Support & contact:**
- Join our [Discord community](https://discord.gg/JtBAxBr2m3)
- If you have any other questions, get in touch at [hello@trigger.dev](mailto:hello@trigger.dev)
<a href="https://github.com/triggerdotdev/trigger.dev/graphs/contributors">
<img src="https://contrib.rocks/image?repo=triggerdotdev/trigger.dev" />
</a>
+4
View File
@@ -0,0 +1,4 @@
HTTP_SERVER_PORT=8020
PLATFORM_ENABLED=true
PLATFORM_WS_PORT=3030
SECURE_CONNECTION=false
+3
View File
@@ -0,0 +1,3 @@
dist/
node_modules/
.env
+60
View File
@@ -0,0 +1,60 @@
# syntax=docker/dockerfile:labs
FROM node:18-bullseye-slim@sha256:a4edd54dcfdcacc8a4100fee71498e8671d99556a1acf5614539214a70092426 AS node-18
WORKDIR /app
FROM node-18 AS pruner
COPY --chown=node:node . .
RUN npx -q turbo@1.10.9 prune --scope=coordinator --docker
RUN find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
FROM node-18 AS base
RUN apt-get update \
&& apt-get install -y buildah ca-certificates dumb-init \
&& rm -rf /var/lib/apt/lists/*
COPY --chown=node:node .gitignore .gitignore
COPY --from=pruner --chown=node:node /app/out/json/ .
COPY --from=pruner --chown=node:node /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=pruner --chown=node:node /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
FROM base AS dev-deps
RUN corepack enable
ENV NODE_ENV development
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm fetch --no-frozen-lockfile
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --ignore-scripts --no-frozen-lockfile
FROM base AS builder
RUN corepack enable
COPY --from=pruner --chown=node:node /app/out/full/ .
COPY --from=dev-deps --chown=node:node /app/ .
COPY --chown=node:node turbo.json turbo.json
RUN pnpm run -r --filter coordinator build:bundle
FROM alpine AS cri-tools
WORKDIR /cri-tools
ARG CRICTL_VERSION=v1.29.0
ARG CRICTL_CHECKSUM=sha256:d16a1ffb3938f5a19d5c8f45d363bd091ef89c0bc4d44ad16b933eede32fdcbb
ADD --checksum=${CRICTL_CHECKSUM} \
https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRICTL_VERSION}/crictl-${CRICTL_VERSION}-linux-amd64.tar.gz .
RUN tar zxvf crictl-${CRICTL_VERSION}-linux-amd64.tar.gz
FROM base AS runner
RUN corepack enable
ENV NODE_ENV production
COPY --from=cri-tools --chown=node:node /cri-tools/crictl /usr/local/bin
COPY --from=builder --chown=node:node /app/apps/coordinator/dist/index.mjs ./index.mjs
EXPOSE 8000
CMD [ "/usr/bin/dumb-init", "--", "/usr/local/bin/node", "./index.mjs" ]
+3
View File
@@ -0,0 +1,3 @@
# Coordinator
Sits between the platform and tasks. Facilitates communication and checkpointing, amongst other things.
+34
View File
@@ -0,0 +1,34 @@
{
"name": "coordinator",
"private": true,
"version": "0.0.1",
"description": "",
"main": "dist/index.cjs",
"scripts": {
"build": "npm run build:bundle",
"build:bundle": "esbuild src/index.ts --bundle --outfile=dist/index.mjs --platform=node --format=esm --target=esnext --banner:js=\"import { createRequire } from 'module';const require = createRequire(import.meta.url);\"",
"build:image": "docker build -f Containerfile . -t coordinator",
"dev": "tsx --no-warnings=ExperimentalWarning --require dotenv/config --watch src/index.ts",
"start": "tsx src/index.ts",
"typecheck": "tsc --noEmit"
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@trigger.dev/core": "workspace:*",
"@trigger.dev/core-apps": "workspace:*",
"execa": "^8.0.1",
"nanoid": "^5.0.6",
"prom-client": "^15.1.0",
"socket.io": "^4.7.4",
"socket.io-client": "^4.7.4"
},
"devDependencies": {
"@types/node": "^18",
"dotenv": "^16.4.2",
"esbuild": "^0.19.11",
"tsx": "^4.7.0",
"typescript": "^5.3.3"
}
}
+983
View File
@@ -0,0 +1,983 @@
import { createServer } from "node:http";
import { $ } from "execa";
import { nanoid } from "nanoid";
import { Server } from "socket.io";
import {
CoordinatorToPlatformMessages,
CoordinatorToProdWorkerMessages,
PlatformToCoordinatorMessages,
ProdWorkerSocketData,
ProdWorkerToCoordinatorMessages,
ZodNamespace,
ZodSocketConnection,
} from "@trigger.dev/core/v3";
import { HttpReply, getTextBody, SimpleLogger } from "@trigger.dev/core-apps";
import { collectDefaultMetrics, register, Gauge } from "prom-client";
collectDefaultMetrics();
const HTTP_SERVER_PORT = Number(process.env.HTTP_SERVER_PORT || 8020);
const NODE_NAME = process.env.NODE_NAME || "coordinator";
const DEFAULT_RETRY_DELAY_THRESHOLD_IN_MS = 30_000;
const REGISTRY_HOST = process.env.REGISTRY_HOST || "localhost:5000";
const CHECKPOINT_PATH = process.env.CHECKPOINT_PATH || "/checkpoints";
const REGISTRY_TLS_VERIFY = process.env.REGISTRY_TLS_VERIFY === "false" ? "false" : "true";
const PLATFORM_ENABLED = ["1", "true"].includes(process.env.PLATFORM_ENABLED ?? "true");
const PLATFORM_HOST = process.env.PLATFORM_HOST || "127.0.0.1";
const PLATFORM_WS_PORT = process.env.PLATFORM_WS_PORT || 3030;
const PLATFORM_SECRET = process.env.PLATFORM_SECRET || "coordinator-secret";
const SECURE_CONNECTION = ["1", "true"].includes(process.env.SECURE_CONNECTION ?? "false");
const logger = new SimpleLogger(`[${NODE_NAME}]`);
type CheckpointerInitializeReturn = {
canCheckpoint: boolean;
willSimulate: boolean;
};
type CheckpointAndPushOptions = {
runId: string;
leaveRunning?: boolean;
projectRef: string;
deploymentVersion: string;
};
type CheckpointData = {
location: string;
docker: boolean;
};
class Checkpointer {
#initialized = false;
#canCheckpoint = false;
#dockerMode = !process.env.KUBERNETES_PORT;
#logger = new SimpleLogger("[checkptr]");
#abortControllers = new Map<string, AbortController>();
constructor(private opts = { forceSimulate: false }) {}
async initialize(): Promise<CheckpointerInitializeReturn> {
if (this.#initialized) {
return this.#getInitializeReturn();
}
this.#logger.log(`${this.#dockerMode ? "Docker" : "Kubernetes"} mode`);
if (this.#dockerMode) {
try {
await $`criu --version`;
} catch (error) {
this.#logger.error("No checkpoint support: Missing CRIU binary");
this.#logger.error("Will simulate instead");
this.#canCheckpoint = false;
this.#initialized = true;
return this.#getInitializeReturn();
}
try {
await $`docker checkpoint`;
} catch (error) {
this.#logger.error(
"No checkpoint support: Docker needs to have experimental features enabled"
);
this.#logger.error("Will simulate instead");
this.#canCheckpoint = false;
this.#initialized = true;
return this.#getInitializeReturn();
}
} else {
try {
await $`buildah login --get-login ${REGISTRY_HOST}`;
} catch (error) {
this.#logger.error(`No checkpoint support: Not logged in to registry ${REGISTRY_HOST}`);
this.#canCheckpoint = false;
this.#initialized = true;
return this.#getInitializeReturn();
}
}
this.#logger.log(
`Full checkpoint support${
this.#dockerMode && this.opts.forceSimulate ? " with forced simulation enabled." : "!"
}`
);
this.#initialized = true;
this.#canCheckpoint = true;
return this.#getInitializeReturn();
}
#getInitializeReturn(): CheckpointerInitializeReturn {
return {
canCheckpoint: this.#canCheckpoint,
willSimulate: this.#dockerMode && (!this.#canCheckpoint || this.opts.forceSimulate),
};
}
#getImageRef(projectRef: string, deploymentVersion: string, shortCode: string) {
return `${REGISTRY_HOST}/trigger/${projectRef}:${deploymentVersion}.prod-${shortCode}`;
}
#getExportLocation(projectRef: string, deploymentVersion: string, shortCode: string) {
const basename = `${projectRef}-${deploymentVersion}-${shortCode}`;
if (this.#dockerMode) {
return basename;
} else {
return `${CHECKPOINT_PATH}/${basename}.tar`;
}
}
async checkpointAndPush(opts: CheckpointAndPushOptions): Promise<CheckpointData | undefined> {
const start = performance.now();
logger.log(`checkpointAndPush() start`, { start, opts });
const result = await this.#checkpointAndPush(opts);
const end = performance.now();
logger.log(`checkpointAndPush() end`, {
start,
end,
diff: end - start,
opts,
success: !!result,
});
return result;
}
isCheckpointing(runId: string) {
return this.#abortControllers.has(runId);
}
cancelCheckpoint(runId: string) {
const controller = this.#abortControllers.get(runId);
if (!controller) {
logger.debug("Nothing to cancel", { runId });
return;
}
controller.abort("cancelCheckpointing()");
this.#abortControllers.delete(runId);
}
async #checkpointAndPush({
runId,
leaveRunning = true, // This mirrors kubernetes behaviour more accurately
projectRef,
deploymentVersion,
}: CheckpointAndPushOptions): Promise<CheckpointData | undefined> {
await this.initialize();
if (!this.#dockerMode && !this.#canCheckpoint) {
this.#logger.error("No checkpoint support. Simulation requires docker.");
return;
}
if (this.#abortControllers.has(runId)) {
logger.error("Checkpoint procedure already in progress", {
options: {
runId,
leaveRunning,
projectRef,
deploymentVersion,
},
});
return;
}
const controller = new AbortController();
this.#abortControllers.set(runId, controller);
const $$ = $({ signal: controller.signal });
try {
const shortCode = nanoid(8);
const imageRef = this.#getImageRef(projectRef, deploymentVersion, shortCode);
const exportLocation = this.#getExportLocation(projectRef, deploymentVersion, shortCode);
this.#logger.log("Checkpointing:", {
options: {
runId,
leaveRunning,
projectRef,
deploymentVersion,
},
});
const containterName = this.#getRunContainerName(runId);
// Create checkpoint (docker)
if (this.#dockerMode) {
try {
if (this.opts.forceSimulate || !this.#canCheckpoint) {
this.#logger.log("Simulating checkpoint");
this.#logger.debug(await $$`docker pause ${containterName}`);
} else {
if (leaveRunning) {
this.#logger.debug(
await $$`docker checkpoint create --leave-running ${containterName} ${exportLocation}`
);
} else {
this.#logger.debug(
await $$`docker checkpoint create ${containterName} ${exportLocation}`
);
}
}
} catch (error: any) {
this.#logger.error(error.stderr);
return;
}
this.#logger.log("checkpoint created:", {
runId,
location: exportLocation,
});
return {
location: exportLocation,
docker: true,
};
}
// Create checkpoint (CRI)
if (!this.#canCheckpoint) {
throw new Error("No checkpoint support in kubernetes mode.");
}
const containerId = this.#logger.debug(
// @ts-expect-error
await $$`crictl ps`
.pipeStdout($$({ stdin: "pipe" })`grep ${containterName}`)
.pipeStdout($$({ stdin: "pipe" })`cut -f1 ${"-d "}`)
);
if (!containerId.stdout) {
throw new Error("could not find container id");
}
this.#logger.debug(await $$`crictl checkpoint --export=${exportLocation} ${containerId}`);
// Create image from checkpoint
const container = this.#logger.debug(await $$`buildah from scratch`);
this.#logger.debug(await $$`buildah add ${container} ${exportLocation} /`);
this.#logger.debug(
await $$`buildah config --annotation=io.kubernetes.cri-o.annotations.checkpoint.name=counter ${container}`
);
this.#logger.debug(await $$`buildah commit ${container} ${imageRef}`);
this.#logger.debug(await $$`buildah rm ${container}`);
// Push checkpoint image
this.#logger.debug(await $$`buildah push --tls-verify=${REGISTRY_TLS_VERIFY} ${imageRef}`);
this.#logger.log("Checkpointed and pushed image to:", { location: imageRef });
try {
await $$`rm ${exportLocation}`;
this.#logger.log("Deleted checkpoint archive", { exportLocation });
// Disabled for now as this will increase restore time by having to pull the image again
// await $`buildah rmi ${imageRef}`;
// this.#logger.log("Deleted checkpoint image", { imageRef });
} catch (error) {
this.#logger.error("Failed during checkpoint cleanup", { exportLocation });
this.#logger.debug(error);
}
return {
location: imageRef,
docker: false,
};
} catch (error) {
this.#logger.error("checkpoint failed", {
options: {
runId,
leaveRunning,
projectRef,
deploymentVersion,
},
error,
});
return;
} finally {
this.#abortControllers.delete(runId);
}
}
#getRunContainerName(suffix: string) {
return `task-run-${suffix}`;
}
}
class TaskCoordinator {
#httpServer: ReturnType<typeof createServer>;
#checkpointer = new Checkpointer({ forceSimulate: true });
#prodWorkerNamespace: ZodNamespace<
typeof ProdWorkerToCoordinatorMessages,
typeof CoordinatorToProdWorkerMessages,
typeof ProdWorkerSocketData
>;
#platformSocket?: ZodSocketConnection<
typeof CoordinatorToPlatformMessages,
typeof PlatformToCoordinatorMessages
>;
#checkpointableTasks = new Map<
string,
{ resolve: (value: void) => void; reject: (err?: any) => void }
>();
#delayThresholdInMs: number;
constructor(
private port: number,
private host = "0.0.0.0"
) {
this.#httpServer = this.#createHttpServer();
this.#checkpointer.initialize();
this.#delayThresholdInMs = this.#getDelayThreshold();
if (process.env.DELAY_THRESHOLD_IN_MS) {
this.#delayThresholdInMs = this.#getDelayThreshold();
}
const io = new Server(this.#httpServer);
this.#prodWorkerNamespace = this.#createProdWorkerNamespace(io);
this.#platformSocket = this.#createPlatformSocket();
const connectedTasksTotal = new Gauge({
name: "daemon_connected_tasks_total", // don't change this without updating dashboard config
help: "The number of tasks currently connected.",
collect: () => {
connectedTasksTotal.set(this.#prodWorkerNamespace.namespace.sockets.size);
},
});
register.registerMetric(connectedTasksTotal);
}
#getDelayThreshold() {
if (!process.env.RETRY_DELAY_THRESHOLD_IN_MS) {
return DEFAULT_RETRY_DELAY_THRESHOLD_IN_MS;
}
const threshold = parseInt(process.env.RETRY_DELAY_THRESHOLD_IN_MS);
if (isNaN(threshold)) {
logger.log(
"RETRY_DELAY_THRESHOLD_IN_MS parses as NaN, must supply integer. Will use default instead.",
{
RETRY_DELAY_THRESHOLD_IN_MS: process.env.RETRY_DELAY_THRESHOLD_IN_MS,
DEFAULT_DELAY_THRESHOLD_IN_MS: DEFAULT_RETRY_DELAY_THRESHOLD_IN_MS,
}
);
return DEFAULT_RETRY_DELAY_THRESHOLD_IN_MS;
}
return threshold;
}
#createPlatformSocket() {
if (!PLATFORM_ENABLED) {
console.log("INFO: platform connection disabled");
return;
}
const platformConnection = new ZodSocketConnection({
namespace: "coordinator",
host: PLATFORM_HOST,
port: Number(PLATFORM_WS_PORT),
secure: SECURE_CONNECTION,
clientMessages: CoordinatorToPlatformMessages,
serverMessages: PlatformToCoordinatorMessages,
authToken: PLATFORM_SECRET,
handlers: {
RESUME_AFTER_DEPENDENCY: async (message) => {
const taskSocket = await this.#getAttemptSocket(message.attemptFriendlyId);
if (!taskSocket) {
logger.log("Socket for attempt not found", {
attemptFriendlyId: message.attemptFriendlyId,
});
return;
}
// In case the task resumed faster than we could checkpoint
this.#cancelCheckpoint(message.runId);
taskSocket.emit("RESUME_AFTER_DEPENDENCY", message);
},
RESUME_AFTER_DURATION: async (message) => {
const taskSocket = await this.#getAttemptSocket(message.attemptFriendlyId);
if (!taskSocket) {
logger.log("Socket for attempt not found", {
attemptFriendlyId: message.attemptFriendlyId,
});
return;
}
taskSocket.emit("RESUME_AFTER_DURATION", message);
},
REQUEST_ATTEMPT_CANCELLATION: async (message) => {
const taskSocket = await this.#getAttemptSocket(message.attemptFriendlyId);
if (!taskSocket) {
logger.log("Socket for attempt not found", {
attemptFriendlyId: message.attemptFriendlyId,
});
return;
}
taskSocket.emit("REQUEST_ATTEMPT_CANCELLATION", message);
},
READY_FOR_RETRY: async (message) => {
const taskSocket = await this.#getRunSocket(message.runId);
if (!taskSocket) {
logger.log("Socket for attempt not found", {
runId: message.runId,
});
return;
}
taskSocket.emit("READY_FOR_RETRY", message);
},
},
});
return platformConnection;
}
async #getRunSocket(runId: string) {
const sockets = await this.#prodWorkerNamespace.fetchSockets();
for (const socket of sockets) {
if (socket.data.runId === runId) {
return socket;
}
}
}
async #getAttemptSocket(attemptFriendlyId: string) {
const sockets = await this.#prodWorkerNamespace.fetchSockets();
for (const socket of sockets) {
if (socket.data.attemptFriendlyId === attemptFriendlyId) {
return socket;
}
}
}
#createProdWorkerNamespace(io: Server) {
const provider = new ZodNamespace({
io,
name: "prod-worker",
clientMessages: ProdWorkerToCoordinatorMessages,
serverMessages: CoordinatorToProdWorkerMessages,
socketData: ProdWorkerSocketData,
postAuth: async (socket, next, logger) => {
function setSocketDataFromHeader(
dataKey: keyof typeof socket.data,
headerName: string,
required: boolean = true
) {
const value = socket.handshake.headers[headerName];
if (value) {
socket.data[dataKey] = Array.isArray(value) ? value[0] : value;
return;
}
if (required) {
logger.error("missing required header", { headerName });
throw new Error("missing header");
}
}
try {
setSocketDataFromHeader("podName", "x-pod-name");
setSocketDataFromHeader("contentHash", "x-trigger-content-hash");
setSocketDataFromHeader("projectRef", "x-trigger-project-ref");
setSocketDataFromHeader("runId", "x-trigger-run-id");
setSocketDataFromHeader("attemptFriendlyId", "x-trigger-attempt-friendly-id", false);
setSocketDataFromHeader("envId", "x-trigger-env-id");
setSocketDataFromHeader("deploymentId", "x-trigger-deployment-id");
setSocketDataFromHeader("deploymentVersion", "x-trigger-deployment-version");
} catch (error) {
logger.error("setSocketDataFromHeader error", { error });
socket.disconnect(true);
return;
}
logger.debug("success", socket.data);
next();
},
onConnection: async (socket, handler, sender) => {
const logger = new SimpleLogger(`[prod-worker][${socket.id}]`);
const checkpointInProgress = () => {
return this.#checkpointableTasks.has(socket.data.runId);
};
const readyToCheckpoint = async (): Promise<
{ success: true } | { success: false; reason?: string }
> => {
if (checkpointInProgress()) {
return {
success: false,
reason: "checkpoint in progress",
};
}
const isCheckpointable = new Promise((resolve, reject) => {
// We set a reasonable timeout to prevent waiting forever
// TODO: We may also want to cancel the task as it's unlikely to recover
setTimeout(() => reject("timeout"), 10_000);
this.#checkpointableTasks.set(socket.data.runId, { resolve, reject });
});
try {
await isCheckpointable;
this.#checkpointableTasks.delete(socket.data.runId);
return {
success: true,
};
} catch (error) {
logger.error("Error while waiting for checkpointable state", { error });
return {
success: false,
reason: typeof error === "string" ? error : "unknown",
};
}
};
this.#platformSocket?.send("LOG", {
metadata: socket.data,
text: "connected",
});
socket.on("LOG", (message, callback) => {
logger.log("[LOG]", message.text);
callback();
this.#platformSocket?.send("LOG", {
version: "v1",
metadata: socket.data,
text: message.text,
});
});
socket.on("READY_FOR_EXECUTION", async (message) => {
logger.log("[READY_FOR_EXECUTION]", message);
try {
const executionAck = await this.#platformSocket?.sendWithAck(
"READY_FOR_EXECUTION",
message
);
if (!executionAck) {
logger.error("no execution ack", { runId: socket.data.runId });
socket.emit("REQUEST_EXIT", {
version: "v1",
});
return;
}
if (!executionAck.success) {
logger.error("failed to get execution payload", { runId: socket.data.runId });
socket.emit("REQUEST_EXIT", {
version: "v1",
});
return;
}
socket.emit("EXECUTE_TASK_RUN", {
version: "v1",
executionPayload: executionAck.payload,
});
socket.data.attemptFriendlyId = executionAck.payload.execution.attempt.id;
} catch (error) {
logger.error("Error", { error });
}
});
socket.on("READY_FOR_RESUME", async (message) => {
logger.log("[READY_FOR_RESUME]", message);
socket.data.attemptFriendlyId = message.attemptFriendlyId;
this.#platformSocket?.send("READY_FOR_RESUME", message);
});
socket.on("TASK_RUN_COMPLETED", async ({ completion, execution }, callback) => {
logger.log("completed task", { completionId: completion.id });
const completeWithoutCheckpoint = (shouldExit: boolean) => {
this.#platformSocket?.send("TASK_RUN_COMPLETED", {
version: "v1",
execution,
completion,
});
callback({ willCheckpointAndRestore: false, shouldExit });
};
if (completion.ok) {
completeWithoutCheckpoint(true);
return;
}
if (
completion.error.type === "INTERNAL_ERROR" &&
completion.error.code === "TASK_RUN_CANCELLED"
) {
completeWithoutCheckpoint(true);
return;
}
if (completion.retry === undefined) {
completeWithoutCheckpoint(true);
return;
}
if (completion.retry.delay < this.#delayThresholdInMs) {
completeWithoutCheckpoint(false);
return;
}
const { canCheckpoint, willSimulate } = await this.#checkpointer.initialize();
const willCheckpointAndRestore = canCheckpoint || willSimulate;
if (!willCheckpointAndRestore) {
completeWithoutCheckpoint(false);
return;
}
// The worker will then put itself in a checkpointable state
callback({ willCheckpointAndRestore: true, shouldExit: false });
const ready = await readyToCheckpoint();
if (!ready.success) {
logger.error("Failed to become checkpointable", {
runId: socket.data.runId,
reason: ready.reason,
});
return;
}
const checkpoint = await this.#checkpointer.checkpointAndPush({
runId: socket.data.runId,
projectRef: socket.data.projectRef,
deploymentVersion: socket.data.deploymentVersion,
});
if (!checkpoint) {
logger.error("Failed to checkpoint", { runId: socket.data.runId });
completeWithoutCheckpoint(false);
return;
}
this.#platformSocket?.send("TASK_RUN_COMPLETED", {
version: "v1",
execution,
completion,
checkpoint,
});
if (!checkpoint.docker || !willSimulate) {
socket.emit("REQUEST_EXIT", {
version: "v1",
});
}
});
socket.on("READY_FOR_CHECKPOINT", async (message) => {
logger.log("[READY_FOR_CHECKPOINT]", message);
const checkpointable = this.#checkpointableTasks.get(socket.data.runId);
if (!checkpointable) {
logger.error("No checkpoint scheduled", { runId: socket.data.runId });
return;
}
checkpointable.resolve();
});
socket.on("CANCEL_CHECKPOINT", async (message) => {
logger.log("[CANCEL_CHECKPOINT]", message);
this.#cancelCheckpoint(socket.data.runId);
});
socket.on("WAIT_FOR_DURATION", async (message, callback) => {
logger.log("[WAIT_FOR_DURATION]", message);
if (checkpointInProgress()) {
logger.error("Checkpoint already in progress", { runId: socket.data.runId });
callback({ willCheckpointAndRestore: false });
return;
}
const { canCheckpoint, willSimulate } = await this.#checkpointer.initialize();
const willCheckpointAndRestore = canCheckpoint || willSimulate;
callback({ willCheckpointAndRestore });
if (!willCheckpointAndRestore) {
return;
}
const ready = await readyToCheckpoint();
if (!ready.success) {
logger.error("Failed to become checkpointable", {
runId: socket.data.runId,
reason: ready.reason,
});
return;
}
const checkpoint = await this.#checkpointer.checkpointAndPush({
runId: socket.data.runId,
projectRef: socket.data.projectRef,
deploymentVersion: socket.data.deploymentVersion,
});
if (!checkpoint) {
// The task container will keep running until the wait duration has elapsed
logger.error("Failed to checkpoint", { runId: socket.data.runId });
return;
}
if (!checkpoint.docker || !willSimulate) {
socket.emit("REQUEST_EXIT", {
version: "v1",
});
}
this.#platformSocket?.send("CHECKPOINT_CREATED", {
version: "v1",
attemptFriendlyId: message.attemptFriendlyId,
docker: checkpoint.docker,
location: checkpoint.location,
reason: {
type: "WAIT_FOR_DURATION",
ms: message.ms,
now: message.now,
},
});
});
socket.on("WAIT_FOR_TASK", async (message, callback) => {
logger.log("[WAIT_FOR_TASK]", message);
const { canCheckpoint, willSimulate } = await this.#checkpointer.initialize();
const willCheckpointAndRestore = canCheckpoint || willSimulate;
callback({ willCheckpointAndRestore });
if (!willCheckpointAndRestore) {
return;
}
const checkpoint = await this.#checkpointer.checkpointAndPush({
runId: socket.data.runId,
projectRef: socket.data.projectRef,
deploymentVersion: socket.data.deploymentVersion,
});
if (!checkpoint) {
logger.error("Failed to checkpoint", { runId: socket.data.runId });
return;
}
if (!checkpoint.docker || !willSimulate) {
socket.emit("REQUEST_EXIT", {
version: "v1",
});
}
this.#platformSocket?.send("CHECKPOINT_CREATED", {
version: "v1",
attemptFriendlyId: message.attemptFriendlyId,
docker: checkpoint.docker,
location: checkpoint.location,
reason: {
type: "WAIT_FOR_TASK",
friendlyId: message.friendlyId,
},
});
});
socket.on("WAIT_FOR_BATCH", async (message, callback) => {
logger.log("[WAIT_FOR_BATCH]", message);
const { canCheckpoint, willSimulate } = await this.#checkpointer.initialize();
const willCheckpointAndRestore = canCheckpoint || willSimulate;
callback({ willCheckpointAndRestore });
if (!willCheckpointAndRestore) {
return;
}
const checkpoint = await this.#checkpointer.checkpointAndPush({
runId: socket.data.runId,
projectRef: socket.data.projectRef,
deploymentVersion: socket.data.deploymentVersion,
});
if (!checkpoint) {
logger.error("Failed to checkpoint", { runId: socket.data.runId });
return;
}
if (!checkpoint.docker || !willSimulate) {
socket.emit("REQUEST_EXIT", {
version: "v1",
});
}
this.#platformSocket?.send("CHECKPOINT_CREATED", {
version: "v1",
attemptFriendlyId: message.attemptFriendlyId,
docker: checkpoint.docker,
location: checkpoint.location,
reason: {
type: "WAIT_FOR_BATCH",
batchFriendlyId: message.batchFriendlyId,
runFriendlyIds: message.runFriendlyIds,
},
});
});
socket.on("INDEX_TASKS", async (message, callback) => {
logger.log("[INDEX_TASKS]", message);
const workerAck = await this.#platformSocket?.sendWithAck("CREATE_WORKER", {
version: "v1",
projectRef: socket.data.projectRef,
envId: socket.data.envId,
deploymentId: message.deploymentId,
metadata: {
contentHash: socket.data.contentHash,
packageVersion: message.packageVersion,
tasks: message.tasks,
},
});
if (!workerAck) {
logger.debug("no worker ack while indexing", message);
}
callback({ success: !!workerAck?.success });
});
socket.on("INDEXING_FAILED", async (message) => {
logger.log("[INDEXING_FAILED]", message);
this.#platformSocket?.send("INDEXING_FAILED", {
version: "v1",
deploymentId: message.deploymentId,
error: message.error,
});
});
},
onDisconnect: async (socket, handler, sender, logger) => {
this.#platformSocket?.send("LOG", {
metadata: socket.data,
text: "disconnect",
});
},
handlers: {
TASK_HEARTBEAT: async (message) => {
this.#platformSocket?.send("TASK_HEARTBEAT", message);
},
},
});
return provider;
}
#cancelCheckpoint(runId: string) {
const checkpointWait = this.#checkpointableTasks.get(runId);
if (checkpointWait) {
// Stop waiting for task to reach checkpointable state
checkpointWait.reject("Checkpoint cancelled");
}
// Cancel checkpointing procedure
this.#checkpointer.cancelCheckpoint(runId);
}
#createHttpServer() {
const httpServer = createServer(async (req, res) => {
logger.log(`[${req.method}]`, req.url);
const reply = new HttpReply(res);
switch (req.url) {
case "/health": {
return reply.text("ok");
}
case "/metrics": {
return reply.text(await register.metrics(), 200, register.contentType);
}
case "/whoami": {
return reply.text(NODE_NAME);
}
case "/checkpoint": {
const body = await getTextBody(req);
// await this.#checkpointer.checkpointAndPush(body);
return reply.text(`sent restore request: ${body}`);
}
default: {
return reply.empty(404);
}
}
});
httpServer.on("clientError", (err, socket) => {
socket.end("HTTP/1.1 400 Bad Request\r\n\r\n");
});
httpServer.on("listening", () => {
logger.log("server listening on port", HTTP_SERVER_PORT);
});
return httpServer;
}
listen() {
this.#httpServer.listen(this.port, this.host);
}
}
const coordinator = new TaskCoordinator(HTTP_SERVER_PORT);
coordinator.listen();
+19
View File
@@ -0,0 +1,19 @@
{
"include": ["./src/**/*.ts"],
"exclude": ["node_modules"],
"compilerOptions": {
"target": "es2016",
"module": "commonjs",
"esModuleInterop": true,
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"paths": {
"@trigger.dev/core/v3": ["../../packages/core/src/v3"],
"@trigger.dev/core/v3/*": ["../../packages/core/src/v3/*"],
"@trigger.dev/core-apps": ["../../packages/core-apps/src"],
"@trigger.dev/core-apps/*": ["../../packages/core-apps/src/*"]
}
}
}
+9
View File
@@ -0,0 +1,9 @@
HTTP_SERVER_PORT=8050
PLATFORM_WS_PORT=3030
PLATFORM_SECRET=provider-secret
SECURE_CONNECTION=false
# Use this if you are on macOS
# COORDINATOR_HOST="host.docker.internal"
# OTEL_EXPORTER_OTLP_ENDPOINT="http://host.docker.internal:4318"
+3
View File
@@ -0,0 +1,3 @@
dist/
node_modules/
.env
+16
View File
@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:labs
FROM node:18-slim AS base
RUN apt-get update \
&& apt-get install -y dumb-init
FROM base
WORKDIR /app
COPY --chown=node dist/index.mjs /app/
EXPOSE 8000
ENTRYPOINT [ "/usr/bin/dumb-init", "--", "/usr/local/bin/node", "/app/index.mjs" ]
+3
View File
@@ -0,0 +1,3 @@
# Docker provider
The `docker-provider` allows the platform to be orchestrator-agnostic. The platform can perform actions such as `INDEX_TASKS` or `INVOKE_TASK` which the provider translates into Docker actions.
+31
View File
@@ -0,0 +1,31 @@
{
"name": "docker-provider",
"private": true,
"version": "0.0.1",
"description": "",
"main": "dist/index.cjs",
"scripts": {
"build": "npm run build:bundle",
"build:bundle": "esbuild src/index.ts --bundle --outfile=dist/index.mjs --platform=node --format=esm --target=esnext --banner:js=\"import { createRequire } from 'module';const require = createRequire(import.meta.url);\"",
"build:image": "docker build -f Containerfile . -t docker-provider",
"dev": "tsx --no-warnings=ExperimentalWarning --require dotenv/config --watch src/index.ts",
"start": "tsx src/index.ts",
"typecheck": "tsc --noEmit"
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@trigger.dev/core": "workspace:*",
"@trigger.dev/core-apps": "workspace:*",
"execa": "^8.0.1",
"socket.io-client": "^4.7.4"
},
"devDependencies": {
"@types/node": "^18.19.8",
"dotenv": "^16.4.2",
"esbuild": "^0.19.11",
"tsx": "^4.7.0",
"typescript": "^5.3.3"
}
}
+301
View File
@@ -0,0 +1,301 @@
import { $, type ExecaChildProcess, execa } from "execa";
import {
SimpleLogger,
TaskOperations,
ProviderShell,
TaskOperationsRestoreOptions,
TaskOperationsCreateOptions,
TaskOperationsIndexOptions,
} from "@trigger.dev/core-apps";
import { setTimeout } from "node:timers/promises";
import { PostStartCauses, PreStopCauses } from "@trigger.dev/core/v3";
const MACHINE_NAME = process.env.MACHINE_NAME || "local";
const COORDINATOR_PORT = process.env.COORDINATOR_PORT || 8020;
const COORDINATOR_HOST = process.env.COORDINATOR_HOST || "127.0.0.1";
const OTEL_EXPORTER_OTLP_ENDPOINT =
process.env.OTEL_EXPORTER_OTLP_ENDPOINT || "http://0.0.0.0:4318";
const logger = new SimpleLogger(`[${MACHINE_NAME}]`);
type InitializeReturn = {
canCheckpoint: boolean;
willSimulate: boolean;
};
function isExecaChildProcess(maybeExeca: unknown): maybeExeca is Awaited<ExecaChildProcess> {
return typeof maybeExeca === "object" && maybeExeca !== null && "escapedCommand" in maybeExeca;
}
class DockerTaskOperations implements TaskOperations {
#initialized = false;
#canCheckpoint = false;
constructor(private opts = { forceSimulate: false }) {}
async #initialize(): Promise<InitializeReturn> {
if (this.#initialized) {
return this.#getInitializeReturn();
}
logger.log("Initializing task operations");
if (this.opts.forceSimulate) {
logger.log("Forced simulation enabled. Will simulate regardless of checkpoint support.");
}
try {
await $`criu --version`;
} catch (error) {
logger.error("No checkpoint support: Missing CRIU binary. Will simulate instead.");
this.#canCheckpoint = false;
this.#initialized = true;
return this.#getInitializeReturn();
}
try {
await $`docker checkpoint`;
} catch (error) {
logger.error("No checkpoint support: Docker needs to have experimental features enabled");
logger.error("Will simulate instead");
this.#canCheckpoint = false;
this.#initialized = true;
return this.#getInitializeReturn();
}
logger.log("Full checkpoint support!");
this.#initialized = true;
this.#canCheckpoint = true;
return this.#getInitializeReturn();
}
#getInitializeReturn(): InitializeReturn {
return {
canCheckpoint: this.#canCheckpoint,
willSimulate: !this.#canCheckpoint || this.opts.forceSimulate,
};
}
async index(opts: TaskOperationsIndexOptions) {
await this.#initialize();
const containerName = this.#getIndexContainerName(opts.shortCode);
logger.log(`Indexing task ${opts.imageRef}`, {
host: COORDINATOR_HOST,
port: COORDINATOR_PORT,
});
try {
logger.debug(
await execa("docker", [
"run",
"--network=host",
"--rm",
`--env=INDEX_TASKS=true`,
`--env=TRIGGER_SECRET_KEY=${opts.apiKey}`,
`--env=TRIGGER_API_URL=${opts.apiUrl}`,
`--env=TRIGGER_ENV_ID=${opts.envId}`,
`--env=OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT}`,
`--env=POD_NAME=${containerName}`,
`--env=COORDINATOR_HOST=${COORDINATOR_HOST}`,
`--env=COORDINATOR_PORT=${COORDINATOR_PORT}`,
`--name=${containerName}`,
`${opts.imageRef}`,
])
);
} catch (error: any) {
if (!isExecaChildProcess(error)) {
throw error;
}
logger.error("Index failed:", {
opts,
exitCode: error.exitCode,
escapedCommand: error.escapedCommand,
stdout: error.stdout,
stderr: error.stderr,
});
}
}
async create(opts: TaskOperationsCreateOptions) {
await this.#initialize();
const containerName = this.#getRunContainerName(opts.runId);
try {
logger.debug(
await execa("docker", [
"run",
"--network=host",
"--detach",
`--env=TRIGGER_ENV_ID=${opts.envId}`,
`--env=TRIGGER_RUN_ID=${opts.runId}`,
`--env=OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT}`,
`--env=POD_NAME=${containerName}`,
`--env=COORDINATOR_HOST=${COORDINATOR_HOST}`,
`--env=COORDINATOR_PORT=${COORDINATOR_PORT}`,
`--name=${containerName}`,
`${opts.image}`,
])
);
} catch (error) {
if (!isExecaChildProcess(error)) {
throw error;
}
logger.error("Create failed:", {
opts,
exitCode: error.exitCode,
escapedCommand: error.escapedCommand,
stdout: error.stdout,
stderr: error.stderr,
});
}
}
async restore(opts: TaskOperationsRestoreOptions) {
await this.#initialize();
const containerName = this.#getRunContainerName(opts.runId);
if (!this.#canCheckpoint || this.opts.forceSimulate) {
logger.log("Simulating restore");
const unpause = logger.debug(await $`docker unpause ${containerName}`);
if (unpause.exitCode !== 0) {
throw new Error("docker unpause command failed");
}
await this.#sendPostStart(containerName);
return;
}
const { exitCode } = logger.debug(
await $`docker start --checkpoint=${opts.checkpointRef} ${containerName}`
);
if (exitCode !== 0) {
throw new Error("docker start command failed");
}
await this.#sendPostStart(containerName);
}
async delete(opts: { runId: string }) {
await this.#initialize();
const containerName = this.#getRunContainerName(opts.runId);
await this.#sendPreStop(containerName);
logger.log("noop: delete");
}
async get(opts: { runId: string }) {
await this.#initialize();
logger.log("noop: get");
}
#getIndexContainerName(suffix: string) {
return `task-index-${suffix}`;
}
#getRunContainerName(suffix: string) {
return `task-run-${suffix}`;
}
async #sendPostStart(containerName: string): Promise<void> {
try {
const port = await this.#getHttpServerPort(containerName);
logger.debug(await this.#runLifecycleCommand(containerName, port, "postStart", "restore"));
} catch (error) {
logger.error("postStart error", { error });
throw new Error("postStart command failed");
}
}
async #sendPreStop(containerName: string): Promise<void> {
try {
const port = await this.#getHttpServerPort(containerName);
logger.debug(await this.#runLifecycleCommand(containerName, port, "preStop", "terminate"));
} catch (error) {
logger.error("preStop error", { error });
throw new Error("preStop command failed");
}
}
async #getHttpServerPort(containerName: string): Promise<number> {
// We first get the correct port, which is random during dev as we run with host networking and need to avoid clashes
// FIXME: Skip this in prod
const logs = logger.debug(await $`docker logs ${containerName}`);
const matches = logs.stdout.match(/http server listening on port (?<port>[0-9]+)/);
const port = Number(matches?.groups?.port);
if (!port) {
throw new Error("failed to extract port from logs");
}
return port;
}
async #runLifecycleCommand<THookType extends "postStart" | "preStop">(
containerName: string,
port: number,
type: THookType,
cause: THookType extends "postStart" ? PostStartCauses : PreStopCauses,
retryCount = 0
): Promise<ExecaChildProcess> {
try {
return await execa("docker", [
"exec",
containerName,
"wget",
"-q",
"-O-",
`127.0.0.1:${port}/${type}?cause=${cause}`,
]);
} catch (error: any) {
if (type === "postStart" && retryCount < 6) {
logger.debug(`retriable ${type} error`, { retryCount, message: error?.message });
await setTimeout(exponentialBackoff(retryCount + 1, 2, 50, 1150, 50));
return this.#runLifecycleCommand(containerName, port, type, cause, retryCount + 1);
}
logger.error(`final ${type} error`, { message: error?.message });
throw new Error(`${type} command failed after ${retryCount - 1} retries`);
}
}
}
const provider = new ProviderShell({
tasks: new DockerTaskOperations({ forceSimulate: true }),
type: "docker",
});
provider.listen();
function exponentialBackoff(
retryCount: number,
exponential: number,
minDelay: number,
maxDelay: number,
jitter: number
): number {
// Calculate the delay using the exponential backoff formula
const delay = Math.min(Math.pow(exponential, retryCount) * minDelay, maxDelay);
// Calculate the jitter
const jitterValue = Math.random() * jitter;
// Return the calculated delay with jitter
return delay + jitterValue;
}
+17
View File
@@ -0,0 +1,17 @@
{
"compilerOptions": {
"target": "es2016",
"module": "commonjs",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"strict": true,
"skipLibCheck": true,
"paths": {
"@trigger.dev/core/v3": ["../../packages/core/src/v3"],
"@trigger.dev/core/v3/*": ["../../packages/core/src/v3/*"],
"@trigger.dev/core-apps": ["../../packages/core-apps/src"],
"@trigger.dev/core-apps/*": ["../../packages/core-apps/src/*"]
}
}
}
+9
View File
@@ -0,0 +1,9 @@
HTTP_SERVER_PORT=8060
PLATFORM_WS_PORT=3030
PLATFORM_SECRET=provider-secret
SECURE_CONNECTION=false
# Use this if you are on macOS
# COORDINATOR_HOST="host.docker.internal"
# OTEL_EXPORTER_OTLP_ENDPOINT="http://host.docker.internal:4318"
+3
View File
@@ -0,0 +1,3 @@
dist/
node_modules/
.env
+47
View File
@@ -0,0 +1,47 @@
FROM node:18-alpine@sha256:ca9f6cb0466f9638e59e0c249d335a07c867cd50c429b5c7830dda1bed584649 AS node-18-alpine
WORKDIR /app
FROM node-18-alpine AS pruner
COPY --chown=node:node . .
RUN npx -q turbo@1.10.9 prune --scope=kubernetes-provider --docker
RUN find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
FROM node-18-alpine AS base
RUN apk add --no-cache dumb-init
COPY --chown=node:node .gitignore .gitignore
COPY --from=pruner --chown=node:node /app/out/json/ .
COPY --from=pruner --chown=node:node /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=pruner --chown=node:node /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
FROM base AS dev-deps
RUN corepack enable
ENV NODE_ENV development
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm fetch --no-frozen-lockfile
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --ignore-scripts --no-frozen-lockfile
FROM base AS builder
RUN corepack enable
COPY --from=pruner --chown=node:node /app/out/full/ .
COPY --from=dev-deps --chown=node:node /app/ .
COPY --chown=node:node turbo.json turbo.json
RUN pnpm run -r --filter kubernetes-provider build:bundle
FROM base AS runner
RUN corepack enable
ENV NODE_ENV production
COPY --from=builder --chown=node:node /app/apps/kubernetes-provider/dist/index.mjs ./index.mjs
EXPOSE 8000
USER node
CMD [ "/usr/bin/dumb-init", "--", "/usr/local/bin/node", "./index.mjs" ]
+3
View File
@@ -0,0 +1,3 @@
# Kubernetes provider
The `kubernetes-provider` allows the platform to be orchestrator-agnostic. The platform can perform actions such as `INDEX_TASKS` or `INVOKE_TASK` which the provider translates into Kubernetes actions.
+30
View File
@@ -0,0 +1,30 @@
{
"name": "kubernetes-provider",
"private": true,
"version": "0.0.1",
"description": "",
"main": "dist/index.cjs",
"scripts": {
"build": "npm run build:bundle",
"build:bundle": "esbuild src/index.ts --bundle --outfile=dist/index.mjs --platform=node --format=esm --target=esnext --banner:js=\"import { createRequire } from 'module';const require = createRequire(import.meta.url);\"",
"build:image": "docker build -f Containerfile . -t kubernetes-provider",
"dev": "tsx --no-warnings=ExperimentalWarning --require dotenv/config --watch src/index.ts",
"start": "tsx src/index.ts",
"typecheck": "tsc --noEmit"
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@kubernetes/client-node": "^0.20.0",
"@trigger.dev/core": "workspace:*",
"@trigger.dev/core-apps": "workspace:*",
"socket.io-client": "^4.7.4"
},
"devDependencies": {
"dotenv": "^16.4.2",
"esbuild": "^0.19.11",
"tsx": "^4.7.0",
"typescript": "^5.3.3"
}
}
+518
View File
@@ -0,0 +1,518 @@
import * as k8s from "@kubernetes/client-node";
import {
ProviderShell,
SimpleLogger,
TaskOperations,
TaskOperationsCreateOptions,
TaskOperationsIndexOptions,
TaskOperationsRestoreOptions,
} from "@trigger.dev/core-apps";
import { Machine, PostStartCauses, PreStopCauses, EnvironmentType } from "@trigger.dev/core/v3";
import { randomUUID } from "crypto";
const RUNTIME_ENV = process.env.KUBERNETES_PORT ? "kubernetes" : "local";
const NODE_NAME = process.env.NODE_NAME || "local";
const OTEL_EXPORTER_OTLP_ENDPOINT =
process.env.OTEL_EXPORTER_OTLP_ENDPOINT ?? "http://0.0.0.0:4318";
const logger = new SimpleLogger(`[${NODE_NAME}]`);
logger.log(`running in ${RUNTIME_ENV} mode`);
type Namespace = {
metadata: {
name: string;
};
};
class KubernetesTaskOperations implements TaskOperations {
#namespace: Namespace;
#k8sApi: {
core: k8s.CoreV1Api;
batch: k8s.BatchV1Api;
};
constructor(namespace = "default") {
this.#namespace = {
metadata: {
name: namespace,
},
};
this.#k8sApi = this.#createK8sApi();
}
async index(opts: TaskOperationsIndexOptions) {
await this.#createJob(
{
metadata: {
name: this.#getIndexContainerName(opts.shortCode),
namespace: this.#namespace.metadata.name,
},
spec: {
completions: 1,
backoffLimit: 0,
ttlSecondsAfterFinished: 300,
template: {
metadata: {
labels: {
app: "task-index",
"app.kubernetes.io/part-of": "trigger-worker",
"app.kubernetes.io/component": "index",
env: opts.envId,
envtype: this.#envTypeToLabelValue(opts.envType),
org: opts.orgId,
project: opts.projectId,
},
},
spec: {
restartPolicy: "Never",
imagePullSecrets: [
{
name: "registry-trigger",
},
],
nodeSelector: {
nodetype: "worker",
},
containers: [
{
name: this.#getIndexContainerName(opts.shortCode),
image: opts.imageRef,
ports: [
{
containerPort: 8000,
},
],
// resources: {
// limits: {
// cpu: "100m",
// memory: "50Mi",
// },
// },
lifecycle: {
preStop: {
exec: {
command: this.#getLifecycleCommand("preStop", "terminate"),
},
},
},
env: [
{
name: "DEBUG",
value: "true",
},
{
name: "INDEX_TASKS",
value: "true",
},
{
name: "TRIGGER_SECRET_KEY",
value: opts.apiKey,
},
{
name: "TRIGGER_API_URL",
value: opts.apiUrl,
},
{
name: "TRIGGER_ENV_ID",
value: opts.envId,
},
{
name: "OTEL_EXPORTER_OTLP_ENDPOINT",
value: OTEL_EXPORTER_OTLP_ENDPOINT,
},
{
name: "HTTP_SERVER_PORT",
value: "8000",
},
{
name: "POD_NAME",
valueFrom: {
fieldRef: {
fieldPath: "metadata.name",
},
},
},
{
name: "COORDINATOR_HOST",
valueFrom: {
fieldRef: {
fieldPath: "status.hostIP",
},
},
},
{
name: "MACHINE_NAME",
valueFrom: {
fieldRef: {
fieldPath: "spec.nodeName",
},
},
},
],
},
],
},
},
},
},
this.#namespace
);
}
async create(opts: TaskOperationsCreateOptions) {
await this.#createPod(
{
metadata: {
name: this.#getRunContainerName(opts.runId),
namespace: this.#namespace.metadata.name,
labels: {
app: "task-run",
"app.kubernetes.io/part-of": "trigger-worker",
"app.kubernetes.io/component": "create",
env: opts.envId,
envtype: this.#envTypeToLabelValue(opts.envType),
org: opts.orgId,
project: opts.projectId,
run: opts.runId,
},
},
spec: {
restartPolicy: "Never",
imagePullSecrets: [
{
name: "registry-trigger",
},
],
nodeSelector: {
nodetype: "worker",
},
containers: [
{
name: this.#getRunContainerName(opts.runId),
image: opts.image,
ports: [
{
containerPort: 8000,
},
],
resources: {
limits: this.#getResourcesFromMachineConfig(opts.machine),
},
lifecycle: {
postStart: {
exec: {
command: this.#getLifecycleCommand("postStart", "create"),
},
},
preStop: {
exec: {
command: this.#getLifecycleCommand("preStop", "terminate"),
},
},
},
env: [
{
name: "DEBUG",
value: "true",
},
{
name: "HTTP_SERVER_PORT",
value: "8000",
},
{
name: "TRIGGER_ENV_ID",
value: opts.envId,
},
{
name: "TRIGGER_RUN_ID",
value: opts.runId,
},
{
name: "TRIGGER_WORKER_VERSION",
value: opts.version,
},
{
name: "OTEL_EXPORTER_OTLP_ENDPOINT",
value: OTEL_EXPORTER_OTLP_ENDPOINT,
},
{
name: "POD_NAME",
valueFrom: {
fieldRef: {
fieldPath: "metadata.name",
},
},
},
{
name: "COORDINATOR_HOST",
valueFrom: {
fieldRef: {
fieldPath: "status.hostIP",
},
},
},
{
name: "NODE_NAME",
valueFrom: {
fieldRef: {
fieldPath: "spec.nodeName",
},
},
},
],
volumeMounts: [
{
name: "taskinfo",
mountPath: "/etc/taskinfo",
},
],
},
],
volumes: [
{
name: "taskinfo",
emptyDir: {},
},
],
},
},
this.#namespace
);
}
async restore(opts: TaskOperationsRestoreOptions) {
await this.#createPod(
{
metadata: {
name: `${this.#getRunContainerName(opts.runId)}-${randomUUID().slice(0, 8)}`,
namespace: this.#namespace.metadata.name,
labels: {
app: "task-run",
"app.kubernetes.io/part-of": "trigger-worker",
"app.kubernetes.io/component": "restore",
env: opts.envId,
envtype: this.#envTypeToLabelValue(opts.envType),
org: opts.orgId,
project: opts.projectId,
run: opts.runId,
checkpoint: opts.checkpointId,
},
},
spec: {
restartPolicy: "Never",
imagePullSecrets: [
{
name: "registry-trigger",
},
],
nodeSelector: {
nodetype: "worker",
},
initContainers: [
{
name: "pull-base-image",
image: opts.imageRef,
command: ["sleep", "0"],
},
{
name: "populate-taskinfo",
image: "busybox",
command: ["/bin/sh", "-c"],
args: ["printenv COORDINATOR_HOST | tee /etc/taskinfo/coordinator-host"],
env: [
{
name: "COORDINATOR_HOST",
valueFrom: {
fieldRef: {
fieldPath: "status.hostIP",
},
},
},
],
volumeMounts: [
{
name: "taskinfo",
mountPath: "/etc/taskinfo",
},
],
},
],
containers: [
{
name: this.#getRunContainerName(opts.runId),
image: opts.checkpointRef,
ports: [
{
containerPort: 8000,
},
],
resources: {
limits: this.#getResourcesFromMachineConfig(opts.machine),
},
lifecycle: {
postStart: {
exec: {
command: this.#getLifecycleCommand("postStart", "restore"),
},
},
preStop: {
exec: {
command: this.#getLifecycleCommand("preStop", "terminate"),
},
},
},
volumeMounts: [
{
name: "taskinfo",
mountPath: "/etc/taskinfo",
},
],
},
],
volumes: [
{
name: "taskinfo",
emptyDir: {},
},
],
},
},
this.#namespace
);
}
async delete(opts: { runId: string }) {
await this.#deletePod({
runId: opts.runId,
namespace: this.#namespace,
});
}
async get(opts: { runId: string }) {
await this.#getPod(opts.runId, this.#namespace);
}
#envTypeToLabelValue(type: EnvironmentType) {
switch (type) {
case "PRODUCTION":
return "prod";
case "STAGING":
return "stg";
case "DEVELOPMENT":
return "dev";
case "PREVIEW":
return "preview";
}
}
#getResourcesFromMachineConfig(config: Machine) {
return {
cpu: `${config.cpu}`,
memory: `${config.memory}G`,
};
}
#getLifecycleCommand<THookType extends "postStart" | "preStop">(
type: THookType,
cause: THookType extends "postStart" ? PostStartCauses : PreStopCauses
) {
return ["/bin/sh", "-c", `sleep 1; wget -q -O- 127.0.0.1:8000/${type}?cause=${cause}`];
}
#getIndexContainerName(suffix: string) {
return `task-index-${suffix}`;
}
#getRunContainerName(suffix: string) {
return `task-run-${suffix}`;
}
#createK8sApi() {
const kubeConfig = new k8s.KubeConfig();
if (RUNTIME_ENV === "local") {
kubeConfig.loadFromDefault();
} else if (RUNTIME_ENV === "kubernetes") {
kubeConfig.loadFromCluster();
} else {
throw new Error(`Unsupported runtime environment: ${RUNTIME_ENV}`);
}
return {
core: kubeConfig.makeApiClient(k8s.CoreV1Api),
batch: kubeConfig.makeApiClient(k8s.BatchV1Api),
};
}
async #createPod(pod: k8s.V1Pod, namespace: Namespace) {
try {
const res = await this.#k8sApi.core.createNamespacedPod(namespace.metadata.name, pod);
logger.debug(res.body);
} catch (err: unknown) {
this.#handleK8sError(err);
}
}
async #deletePod(opts: { runId: string; namespace: Namespace }) {
try {
const res = await this.#k8sApi.core.deleteNamespacedPod(
opts.runId,
opts.namespace.metadata.name
);
logger.debug(res.body);
} catch (err: unknown) {
this.#handleK8sError(err);
}
}
async #getPod(runId: string, namespace: Namespace) {
try {
const res = await this.#k8sApi.core.readNamespacedPod(runId, namespace.metadata.name);
logger.debug(res.body);
return res.body;
} catch (err: unknown) {
this.#handleK8sError(err);
}
}
async #createJob(job: k8s.V1Job, namespace: Namespace) {
try {
const res = await this.#k8sApi.batch.createNamespacedJob(namespace.metadata.name, job);
logger.debug(res.body);
} catch (err: unknown) {
this.#handleK8sError(err);
}
}
#throwUnlessRecord(candidate: unknown): asserts candidate is Record<string, unknown> {
if (typeof candidate !== "object" || candidate === null) {
throw candidate;
}
}
#handleK8sError(err: unknown) {
this.#throwUnlessRecord(err);
if ("body" in err && err.body) {
logger.error(err.body);
this.#throwUnlessRecord(err.body);
if (typeof err.body.message === "string") {
throw new Error(err.body?.message);
} else {
throw err.body;
}
} else {
logger.error(err);
throw err;
}
}
}
const provider = new ProviderShell({
tasks: new KubernetesTaskOperations(),
type: "kubernetes",
});
provider.listen();
+17
View File
@@ -0,0 +1,17 @@
{
"compilerOptions": {
"target": "es2016",
"module": "commonjs",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"strict": true,
"skipLibCheck": true,
"paths": {
"@trigger.dev/core/v3": ["../../packages/core/src/v3"],
"@trigger.dev/core/v3/*": ["../../packages/core/src/v3/*"],
"@trigger.dev/core-apps": ["../../packages/core-apps/src"],
"@trigger.dev/core-apps/*": ["../../packages/core-apps/src/*"]
}
}
}
+7
View File
@@ -0,0 +1,7 @@
REWRITE_HOSTNAME=
AWS_SQS_ACCESS_KEY_ID=
AWS_SQS_SECRET_ACCESS_KEY=
AWS_SQS_QUEUE_URL=
AWS_SQS_REGION=
#optional
#REWRITE_PORT=
+13
View File
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true
[*]
indent_style = tab
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.yml]
indent_style = space
+172
View File
@@ -0,0 +1,172 @@
# Logs
logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
# Runtime data
pids
_.pid
_.seed
\*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
\*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
\*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
\*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
.cache
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.\*
# wrangler project
.dev.vars
.wrangler/
+11
View File
@@ -0,0 +1,11 @@
{
"semi": true,
"singleQuote": false,
"jsxSingleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false
}
+72
View File
@@ -0,0 +1,72 @@
# proxy
## 0.0.11
### Patch Changes
- @trigger.dev/core@2.3.5
## 0.0.10
### Patch Changes
- @trigger.dev/core@2.3.4
## 0.0.9
### Patch Changes
- @trigger.dev/core@2.3.3
## 0.0.8
### Patch Changes
- @trigger.dev/core@2.3.2
## 0.0.7
### Patch Changes
- Updated dependencies [f3efcc0c]
- @trigger.dev/core@2.3.1
## 0.0.6
### Patch Changes
- Updated dependencies [17f6f29d]
- @trigger.dev/core@2.3.0
## 0.0.5
### Patch Changes
- @trigger.dev/core@2.2.11
## 0.0.4
### Patch Changes
- @trigger.dev/core@2.2.10
## 0.0.3
### Patch Changes
- Updated dependencies [6ebd435e]
- @trigger.dev/core@2.2.9
## 0.0.2
### Patch Changes
- Updated dependencies [067e19fe]
- @trigger.dev/core@2.2.8
## 0.0.1
### Patch Changes
- Updated dependencies [756024da]
- @trigger.dev/core@2.2.7
+68
View File
@@ -0,0 +1,68 @@
# Trigger.dev proxy
This is an optional module that can be used to proxy and queue requests to the Trigger.dev API.
## Why?
The Trigger.dev API is designed to be fast and reliable. However, if you have a lot of traffic, you may want to use this proxy to queue requests to the API. It intercepts some requests to the API and adds them to an AWS SQS queue, then the webapp can be setup to process the queue.
## Current features
- Intercepts `sendEvent` requests and adds them to an AWS SQS queue. The webapp then reads from the queue and creates the events.
## Setup
### Create an AWS SQS queue
In AWS you should create a new AWS SQS queue with appropriate security settings. You will need the queue URL for the next step.
### Environment variables
#### Cloudflare secrets
Locally you should copy the `.dev.var.example` file to `.dev.var` and fill in the values.
When deploying you should use `wrangler` (the Cloudflare CLI tool) to set secrets. Make sure you set the correct --env ("staging" or "prod")
```bash
wrangler secret put REWRITE_HOSTNAME --env staging
wrangler secret put AWS_SQS_ACCESS_KEY_ID --env staging
wrangler secret put AWS_SQS_SECRET_ACCESS_KEY --env staging
wrangler secret put AWS_SQS_QUEUE_URL --env staging
wrangler secret put AWS_SQS_REGION --env staging
```
You need to set your API CNAME entry to be proxied by Cloudflare. You can do this in the Cloudflare dashboard.
#### Webapp
These env vars also need setting in the webapp.
```bash
AWS_SQS_REGION
AWS_SQS_ACCESS_KEY_ID
AWS_SQS_SECRET_ACCESS_KEY
AWS_SQS_QUEUE_URL
AWS_SQS_BATCH_SIZE
```
## Deployment
Staging:
```bash
npx wrangler@latest deploy --route "<your-api-subdomain>/*" --env staging
```
Prod:
```bash
npx wrangler@latest deploy --route "<your-api-subdomain>/*" --env prod
```
## Development
Set the environment variables as described above.
1. `pnpm install`
2. `pnpm run dev --filter proxy`
+21
View File
@@ -0,0 +1,21 @@
{
"name": "proxy",
"version": "0.0.11",
"private": true,
"scripts": {
"deploy": "wrangler deploy",
"dev": "wrangler dev"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20230419.0",
"typescript": "^5.0.4",
"wrangler": "^3.0.0"
},
"dependencies": {
"@aws-sdk/client-sqs": "^3.445.0",
"@trigger.dev/core": "workspace:*",
"ulidx": "^2.2.1",
"zod": "3.22.3",
"zod-error": "1.5.0"
}
}
+20
View File
@@ -0,0 +1,20 @@
import { z } from "zod";
const AuthorizationHeaderSchema = z.string().regex(/^Bearer .+$/);
export function getApiKeyFromRequest(request: Request) {
const rawAuthorization = request.headers.get("Authorization");
const authorization = AuthorizationHeaderSchema.safeParse(rawAuthorization);
if (!authorization.success) {
return;
}
const apiKey = authorization.data.replace(/^Bearer /, "");
const type = isPrivateApiKey(apiKey) ? ("PRIVATE" as const) : ("PUBLIC" as const);
return { apiKey, type };
}
function isPrivateApiKey(key: string) {
return key.startsWith("tr_");
}
+87
View File
@@ -0,0 +1,87 @@
import { SQSClient, SendMessageCommand } from "@aws-sdk/client-sqs";
import { ApiEventLog, SendEventBodySchema } from "@trigger.dev/core";
import { generateErrorMessage } from "zod-error";
import { Env } from "..";
import { getApiKeyFromRequest } from "../apikey";
import { json } from "../json";
import { calculateDeliverAt } from "./utils";
/** Adds the event to an AWS SQS queue, so it can be consumed from the main Trigger.dev API */
export async function queueEvent(request: Request, env: Env): Promise<Response> {
//check there's a private API key
const apiKeyResult = getApiKeyFromRequest(request);
if (!apiKeyResult || apiKeyResult.type !== "PRIVATE") {
return json(
{ error: "Invalid or Missing API key" },
{
status: 401,
}
);
}
//parse the request body
try {
const anyBody = await request.json();
const body = SendEventBodySchema.safeParse(anyBody);
if (!body.success) {
return json(
{ error: generateErrorMessage(body.error.issues) },
{
status: 422,
}
);
}
// The AWS SDK tries to use crypto from off of the window,
// so we need to trick it into finding it where it expects it
globalThis.global = globalThis;
const client = new SQSClient({
region: env.AWS_SQS_REGION,
credentials: {
accessKeyId: env.AWS_SQS_ACCESS_KEY_ID,
secretAccessKey: env.AWS_SQS_SECRET_ACCESS_KEY,
},
});
const timestamp = body.data.event.timestamp ?? new Date();
//add the event to the queue
const send = new SendMessageCommand({
// use wrangler secrets to provide this global variable
QueueUrl: env.AWS_SQS_QUEUE_URL,
MessageBody: JSON.stringify({
event: { ...body.data.event, timestamp },
options: body.data.options,
apiKey: apiKeyResult.apiKey,
}),
});
const queuedEvent = await client.send(send);
console.log("Queued event", queuedEvent);
//respond with the event
const event: ApiEventLog = {
id: body.data.event.id,
name: body.data.event.name,
payload: body.data.event.payload,
context: body.data.event.context,
timestamp,
deliverAt: calculateDeliverAt(body.data.options),
};
return json(event, {
status: 200,
});
} catch (e) {
console.error("queueEvent error", e);
return json(
{
error: `Failed to send event: ${e instanceof Error ? e.message : JSON.stringify(e)}`,
},
{
status: 422,
}
);
}
}
+112
View File
@@ -0,0 +1,112 @@
import { SQSClient, SendMessageBatchCommand } from "@aws-sdk/client-sqs";
import { ApiEventLog, SendBulkEventsBodySchema } from "@trigger.dev/core";
import { generateErrorMessage } from "zod-error";
import { Env } from "..";
import { getApiKeyFromRequest } from "../apikey";
import { json } from "../json";
import { calculateDeliverAt } from "./utils";
/** Adds the event to an AWS SQS queue, so it can be consumed from the main Trigger.dev API */
export async function queueEvents(request: Request, env: Env): Promise<Response> {
//check there's a private API key
const apiKeyResult = getApiKeyFromRequest(request);
if (!apiKeyResult || apiKeyResult.type !== "PRIVATE") {
return json(
{ error: "Invalid or Missing API key" },
{
status: 401,
}
);
}
//parse the request body
try {
const anyBody = await request.json();
const body = SendBulkEventsBodySchema.safeParse(anyBody);
if (!body.success) {
return json(
{ error: generateErrorMessage(body.error.issues) },
{
status: 422,
}
);
}
// The AWS SDK tries to use crypto from off of the window,
// so we need to trick it into finding it where it expects it
globalThis.global = globalThis;
const client = new SQSClient({
region: env.AWS_SQS_REGION,
credentials: {
accessKeyId: env.AWS_SQS_ACCESS_KEY_ID,
secretAccessKey: env.AWS_SQS_SECRET_ACCESS_KEY,
},
});
const updatedEvents: ApiEventLog[] = body.data.events.map((event) => {
const timestamp = event.timestamp ?? new Date();
return {
...event,
payload: event.payload,
timestamp,
};
});
//divide updatedEvents into multiple batches of 10 (max size SQS accepts)
const batches: ApiEventLog[][] = [];
let currentBatch: ApiEventLog[] = [];
for (let i = 0; i < updatedEvents.length; i++) {
currentBatch.push(updatedEvents[i]);
if (currentBatch.length === 10) {
batches.push(currentBatch);
currentBatch = [];
}
}
if (currentBatch.length > 0) {
batches.push(currentBatch);
}
//loop through the batches and send them
for (let i = 0; i < batches.length; i++) {
const batch = batches[i];
//add the event to the queue
const send = new SendMessageBatchCommand({
// use wrangler secrets to provide this global variable
QueueUrl: env.AWS_SQS_QUEUE_URL,
Entries: batch.map((event, index) => ({
Id: `event-${index}`,
MessageBody: JSON.stringify({
event,
options: body.data.options,
apiKey: apiKeyResult.apiKey,
}),
})),
});
const queuedEvent = await client.send(send);
console.log("Queued events", queuedEvent);
}
//respond with the events
const events: ApiEventLog[] = updatedEvents.map((event) => ({
...event,
payload: event.payload,
deliverAt: calculateDeliverAt(body.data.options),
}));
return json(events, {
status: 200,
});
} catch (e) {
console.error("queueEvents error", e);
return json(
{
error: `Failed to send events: ${e instanceof Error ? e.message : JSON.stringify(e)}`,
},
{
status: 422,
}
);
}
}
+15
View File
@@ -0,0 +1,15 @@
import { SendEventOptions } from "@trigger.dev/core";
export function calculateDeliverAt(options?: SendEventOptions) {
// If deliverAt is a string and a valid date, convert it to a Date object
if (options?.deliverAt) {
return options?.deliverAt;
}
// deliverAfter is the number of seconds to wait before delivering the event
if (options?.deliverAfter) {
return new Date(Date.now() + options.deliverAfter * 1000);
}
return undefined;
}
+67
View File
@@ -0,0 +1,67 @@
import { queueEvent } from "./events/queueEvent";
import { queueEvents } from "./events/queueEvents";
export interface Env {
/** The hostname needs to be changed to allow requests to pass to the Trigger.dev platform */
REWRITE_HOSTNAME: string;
REWRITE_PORT?: string;
AWS_SQS_ACCESS_KEY_ID: string;
AWS_SQS_SECRET_ACCESS_KEY: string;
AWS_SQS_QUEUE_URL: string;
AWS_SQS_REGION: string;
}
export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
if (!env.REWRITE_HOSTNAME) throw new Error("Missing REWRITE_HOSTNAME");
console.log("url", request.url);
if (!queueingIsEnabled(env)) {
console.log("Missing AWS credentials. Passing through to the origin.");
return redirectToOrigin(request, env);
}
const url = new URL(request.url);
switch (url.pathname) {
case "/api/v1/events": {
if (request.method === "POST") {
return queueEvent(request, env);
}
break;
}
case "/api/v1/events/bulk": {
if (request.method === "POST") {
return queueEvents(request, env);
}
break;
}
}
//the same request but with the hostname (and port) changed
return redirectToOrigin(request, env);
},
};
function redirectToOrigin(request: Request, env: Env) {
const newUrl = new URL(request.url);
newUrl.hostname = env.REWRITE_HOSTNAME;
newUrl.port = env.REWRITE_PORT || newUrl.port;
const requestInit: RequestInit = {
method: request.method,
headers: request.headers,
body: request.body,
};
console.log("rewritten url", newUrl.toString());
return fetch(newUrl.toString(), requestInit);
}
function queueingIsEnabled(env: Env) {
return (
env.AWS_SQS_ACCESS_KEY_ID &&
env.AWS_SQS_SECRET_ACCESS_KEY &&
env.AWS_SQS_QUEUE_URL &&
env.AWS_SQS_REGION
);
}
+13
View File
@@ -0,0 +1,13 @@
export function json(body: any, init?: ResponseInit) {
const headers = {
"content-type": "application/json",
...(init?.headers ?? {}),
};
const responseInit: ResponseInit = {
...(init ?? {}),
headers,
};
return new Response(JSON.stringify(body), responseInit);
}
+35
View File
@@ -0,0 +1,35 @@
{
"compilerOptions": {
"target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
"lib": [
"es2021"
] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
"jsx": "react" /* Specify what JSX code is generated. */,
"module": "es2022" /* Specify what module code is generated. */,
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
"types": [
"@cloudflare/workers-types"
] /* Specify type package names to be included without being referenced in a source file. */,
"resolveJsonModule": true /* Enable importing .json files */,
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */,
"checkJs": false /* Enable error reporting in type-checked JavaScript files. */,
"noEmit": true /* Disable emitting files from a compilation. */,
"isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */,
"allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
"strict": true /* Enable all strict type-checking options. */,
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"baseUrl": ".",
"paths": {
"@trigger.dev/core": ["../../packages/core/src/index"],
"@trigger.dev/core/*": ["../../packages/core/src/*"]
}
}
}
+7
View File
@@ -0,0 +1,7 @@
name = "proxy"
main = "src/index.ts"
compatibility_date = "2023-10-30"
compatibility_flags = [ "nodejs_compat" ]
[env.staging]
[env.prod]
+16
View File
@@ -0,0 +1,16 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": []
}
-24
View File
@@ -1,24 +0,0 @@
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
SESSION_SECRET=<random string>
MAGIC_LINK_SECRET=<random string>
GITHUB_CLIENT_ID=<random string>
GITHUB_SECRET=<random string>
FROM_EMAIL=<your email address>
REPLY_TO_EMAIL=<your email address>
RESEND_API_KEY=<RESEND_API_KEY>
MERGENT_KEY=<Mergent key>
LOGIN_ORIGIN=http://localhost:3000
APP_ORIGIN=http://localhost:3000
# Production Pulsar
# PULSAR_SERVICE_URL="pulsar+ssl://<cluster>.<orgId>.snio.cloud:6651"
# PULSAR_CLIENT_ID="<client id>"
# PULSAR_CLIENT_SECRET="<client secret>"
# PULSAR_ISSUER_URL="https://auth.streamnative.cloud/"
# PULSAR_AUDIENCE="urn:sn:pulsar:<orgId>:<instanceName>"
# PULSAR_TENANT="triggerdotdev"
# PULSAR_WORKFLOWS_NAMESPACE="workflows"
# PULSAR_QUEUES_NAMESPACE="queues"
# Dev Pulsar
PULSAR_SERVICE_URL="pulsar://localhost:6650"
+11 -5
View File
@@ -1,7 +1,13 @@
{
"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",
{
"allowNullableBoolean": true,
"allowNullableString": true,
"allowNullableNumber": true
}
]
}
}
+11 -1
View File
@@ -7,4 +7,14 @@ node_modules
/cypress/screenshots
/cypress/videos
/app/styles/tailwind.css
/app/styles/tailwind.css
# Storybook build outputs
build-storybook.log
.out
.storybook-out
storybook-static
/prisma/seed.js
-73
View File
@@ -1,73 +0,0 @@
FROM node:16-bullseye AS pruner
RUN apt-get update && apt-get install openssl -y
WORKDIR /app
RUN npm install turbo@1.7.0 -g
COPY . .
RUN turbo prune --scope=webapp --docker
RUN find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
# Base strategy to have layer caching
FROM node:16-bullseye AS base
RUN apt-get update && apt-get install openssl ca-certificates g++ make wget python3 -y
ENV PULSAR_CPP_CLIENT_VERSION=2.10.3
RUN wget https://archive.apache.org/dist/pulsar/pulsar-${PULSAR_CPP_CLIENT_VERSION}/DEB/apache-pulsar-client.deb -q
RUN wget https://archive.apache.org/dist/pulsar/pulsar-${PULSAR_CPP_CLIENT_VERSION}/DEB/apache-pulsar-client-dev.deb -q
RUN dpkg -i ./apache-pulsar-client*.deb
WORKDIR /app
COPY .gitignore .gitignore
COPY --from=pruner /app/out/json/ .
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=pruner /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
FROM base AS production-deps
WORKDIR /app
RUN npm install turbo@1.7.0 -g
RUN corepack enable
ENV NODE_ENV production
RUN npm config set python /usr/bin/python3
COPY --from=pruner /app/out/full/apps/webapp/prisma/schema.prisma /app/apps/webapp/prisma/schema.prisma
RUN pnpm install --prod --frozen-lockfile
RUN pnpx prisma generate --schema /app/apps/webapp/prisma/schema.prisma
FROM base AS builder
WORKDIR /app
RUN npm install turbo@1.7.0 -g
COPY turbo.json turbo.json
RUN corepack enable
COPY --from=pruner /app/out/full/ .
RUN npm config set python /usr/bin/python3
ENV NODE_ENV development
RUN pnpm install --ignore-scripts --frozen-lockfile
ENV NODE_ENV production
RUN pnpm run generate
RUN pnpm run build --filter=webapp...
RUN pnpx prisma migrate deploy --schema apps/webapp/prisma/schema.prisma
# Runner
FROM node:16-bullseye AS runner
RUN apt-get update && apt-get install openssl ca-certificates g++ make wget python3 -y
ENV PULSAR_CPP_CLIENT_VERSION=2.10.3
RUN wget https://archive.apache.org/dist/pulsar/pulsar-${PULSAR_CPP_CLIENT_VERSION}/DEB/apache-pulsar-client.deb -q
RUN wget https://archive.apache.org/dist/pulsar/pulsar-${PULSAR_CPP_CLIENT_VERSION}/DEB/apache-pulsar-client-dev.deb -q
RUN dpkg -i ./apache-pulsar-client*.deb
RUN npm install turbo -g
WORKDIR /app
RUN corepack enable
ENV NODE_ENV production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 remixjs
RUN chown -R remixjs:nodejs /app
USER remixjs
COPY --from=pruner --chown=remixjs:nodejs /app/out/full/ .
COPY --from=production-deps --chown=remixjs:nodejs /app .
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/app/styles/tailwind.css ./apps/webapp/app/styles/tailwind.css
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/build/server.js ./apps/webapp/build/server.js
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/build ./apps/webapp/build
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/public ./apps/webapp/public
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/prisma/schema.prisma ./apps/webapp/build/schema.prisma
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/prisma/migrations ./apps/webapp/build/migrations
COPY --from=builder --chown=remixjs:nodejs /app/apps/webapp/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node ./apps/webapp/build/libquery_engine-debian-openssl-1.1.x.so.node
# release_command = "pnpx prisma migrate deploy --schema apps/webapp/prisma/schema.prisma"
ENTRYPOINT ["pnpm", "--filter", "webapp", "run", "start"]
+15
View File
@@ -0,0 +1,15 @@
import { ApiEventLog } from "@trigger.dev/core";
import { EventRecord } from "@trigger.dev/database";
export function eventRecordToApiJson(eventRecord: EventRecord): ApiEventLog {
return {
id: eventRecord.eventId,
name: eventRecord.name,
payload: eventRecord.payload as any,
context: eventRecord.context as any,
timestamp: eventRecord.timestamp,
deliverAt: eventRecord.deliverAt,
deliveredAt: eventRecord.deliveredAt,
cancelledAt: eventRecord.cancelledAt,
};
}
@@ -0,0 +1,29 @@
export function AttemptIcon({ className }: { className?: string }) {
return (
<svg
className={className}
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0_9964_113464)">
<path
fillRule="evenodd"
clipRule="evenodd"
d="M16 0H0V16H16V0ZM7.09906 4.4L4.53906 11.5H6.11906L6.63906 10H9.35906L9.87906 11.5H11.4591L8.89906 4.4H7.09906ZM7.99906 6L8.92906 8.73H7.06906L7.99906 6Z"
fill="currentColor"
/>
</g>
<defs>
<clipPath id="clip0_9964_113464">
<path
d="M0 2C0 0.895431 0.895431 0 2 0H14C15.1046 0 16 0.895431 16 2V14C16 15.1046 15.1046 16 14 16H2C0.895431 16 0 15.1046 0 14V2Z"
fill="white"
/>
</clipPath>
</defs>
</svg>
);
}
@@ -0,0 +1,12 @@
export function DynamicTriggerIcon({ className }: { className?: string }) {
return (
<svg viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg" className={className}>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M2.0151 4C2.01629 2.89543 2.91269 2.00097 4.01726 2.00216L16.0172 2.0151C17.1218 2.01629 18.0163 2.91269 18.0151 4.01726L18.0021 16.0172C18.001 17.1218 17.1046 18.0163 16 18.0151L4 18.0021C2.89543 18.001 2.00097 17.1046 2.00216 16L2.0151 4ZM9.26429 4.75782C9.26473 4.34361 9.60088 4.00818 10.0151 4.00863C10.4293 4.00907 10.7647 4.34522 10.7643 4.75944L10.7606 8.1988L13.1952 5.76942C13.4884 5.47684 13.9633 5.47735 14.2559 5.77056C14.5484 6.06377 14.5479 6.53864 14.2547 6.83122L11.8201 9.26058L15.2594 9.26429C15.6736 9.26473 16.0091 9.60088 16.0086 10.0151C16.0082 10.4293 15.672 10.7647 15.2578 10.7643L11.8185 10.7606L14.2478 13.1952C14.5404 13.4884 14.5399 13.9633 14.2467 14.2558C13.9535 14.5484 13.4786 14.5479 13.186 14.2547L10.7567 11.8201L10.753 15.2594C10.7525 15.6736 10.4164 16.0091 10.0022 16.0086C9.58794 16.0082 9.25252 15.672 9.25296 15.2578L9.25667 11.8185L6.82209 14.2478C6.52888 14.5404 6.05401 14.5399 5.76143 14.2467C5.46885 13.9535 5.46937 13.4786 5.76258 13.186L8.19718 10.7567L4.75782 10.753C4.34361 10.7525 4.00818 10.4164 4.00863 10.0022C4.00907 9.58794 4.34522 9.25252 4.75944 9.25296L8.19877 9.25667L5.76942 6.82207C5.47684 6.52886 5.47735 6.05399 5.77056 5.76141C6.06377 5.46883 6.53864 5.46935 6.83122 5.76255L9.26058 8.19716L9.26429 4.75782Z"
fill="currentColor"
/>
</svg>
);
}

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