Commit Graph

45 Commits

Author SHA1 Message Date
Eric Allam 53363711bb Fixed type errors in the cli 2023-08-02 11:50:50 +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
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
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
Sai Hari d7c4b24203 chore: 🤖 replace tsconfig package with tsconfck package (#218) 2023-07-26 07:22:16 +01:00
D-K-P 454ad25b1d Updated the ID question in the CLI 2023-07-25 16:30:28 +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
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 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
Dylan Rodriguez bf0a0a17a0 normalizing path in detectPagesOrAppDir 2023-07-19 17:14:25 -04: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 1bf2802b67 @trigger.dev/cli: Parse .env files using dotenv instead of hand-parsing 2023-07-17 16:45:12 +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
Akhil d6e43c40c9 feat: added defineJob method in TriggerClient 2023-07-15 15:55:53 +00:00
Eric Allam 5e36ad961f @trigger.dev/cli: create-integration - Generate the README.md file 2023-07-12 15:34:33 +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
James Ritchie b8b84d8d16 CLI: Improved the endpoint prompt 2023-07-10 13:41:04 +01:00
Matt Aitken 3763577451 CLI dev: improved spinner and made port clear in logs 2023-07-10 10:57:10 +01:00
Matt Aitken 568786e4f6 Fix when setting the url as an option 2023-07-10 10:32:07 +01:00
Eric Allam 090037602c WIP create-integration CLI command 2023-07-06 13:42:49 +01: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
Matt Aitken 9dd46c83fd Added code comments to the CLI generated code, and exported the client 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
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 161d59d01d Added better Next Steps in the init cli command 2023-06-30 15:07:46 +01:00
Eric Allam 46d94a6a8f Fixed type errors 2023-06-30 14:26:07 +01:00
Matt Aitken c2e2f7cad9 CLI: removed —tunnel param as we currently just support ngrok 2023-06-30 12:18:19 +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 52cdfb98a4 Added extra error checking to the refresh endpoint call 2023-06-30 11:11:28 +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 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 8a47320272 WIP on dev CLI command 2023-06-29 20:32:07 +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