-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs for INNGEST_DEV
and isDev
#679
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
4 tasks
jpwilliams
added a commit
to inngest/inngest-js
that referenced
this pull request
Feb 23, 2024
## Summary <!-- Succinctly describe your change, providing context, what you've changed, and why. --> Adds support for `INNGEST_DEV` and a new `isDev` option on the client. This lightly refactors the current checks based around `isProd` and `skipDevServer()`, which were getting a little difficult to read. - The SDK now has two "modes:" `"dev"` and `"cloud"`. - Each mode is either **explicit** or **inferred**. An inferred mode means that the current (`v3.x.x`) version of the SDK can make a decision to attempt to contact the Dev Server. Future versions will remove this and default to `"cloud"` mode. - Setting the `INNGEST_DEV` environment variable or the `isDev` client option **explicitly** sets the mode to either `"cloud"` or `"dev"`. - `INNGEST_DEV` accepts some sensible defaults. We'll recommend `1` to explicitly set `"dev"` mode and `0` to explicitly set `"cloud"` mode, though it also accepts `"true"`, `"y"`, `"no"`, etc. - Explicitly setting either mode also sets the event ingestion and syncing URLs. They continue to be further overwritten by passing `INNGEST_BASE_URL`, `INNGEST_API_BASE_URL`, and `INNGEST_EVENT_API_BASE_URL`. > [!NOTE] > To support many runtimes and environments, environment variables are not always accessible a) at all times, and b) on `process.env`. Sometimes environment variables are accessed via different global objects, or sometimes runtime objects that are passed to requests. > > For this reason, handling environment variables is more complex and relies on making best guesses during instantiation, then later making another decision when we have access to the environment. Supersedes both #424 and #425. ## Checklist <!-- Tick these items off as you progress. --> <!-- If an item isn't applicable, ideally please strikeout the item by wrapping it in "~~"" and suffix it with "N/A My reason for skipping this." --> <!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" --> - [x] Added a [docs PR](https://github.com/inngest/website) documenting these modes and the new environment variables that references this PR - [x] Added unit/integration tests - [x] Added changesets if applicable - [x] Push env-related changes to the OS SDK Spec ## Related <!-- A space for any related links, issues, or PRs. --> <!-- Linear issues are autolinked. --> <!-- e.g. - INN-123 --> <!-- GitHub issues/PRs can be linked using shorthand. --> <!-- e.g. "- inngest/inngest#123" --> <!-- Feel free to remove this section if there are no applicable related links.--> - INN-2754 - Supersedes #424 - Supersedes #425 - inngest/website#679
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds docs for
INNGEST_DEV
andisDev
for the release of inngest/inngest-js#488.INNGEST_DEV
to the Environment Variables pageisDev
to the Create the Inngest Client pageRelated
INNGEST_DEV
inngest-js#488