inngest-cli 0.5.1 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +125 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,125 @@
1
+ # Inngest
2
+
3
+ ![Latest release](https://img.shields.io/github/v/release/inngest/inngest?include_prereleases&sort=semver)
4
+ ![Test Status](https://img.shields.io/github/workflow/status/inngest/inngest/Go/main?label=tests)
5
+ ![Discord](https://img.shields.io/discord/842170679536517141?label=discord)
6
+ ![Twitter Follow](https://img.shields.io/twitter/follow/inngest?style=social)
7
+
8
+ Inngest is an open-source, event-driven platform which makes it easy for developers to build, test, and deploy serverless functions without worrying about infrastructure, queues, or stateful services.
9
+
10
+ Using Inngest, you can write and deploy serverless step functions which are triggered by events without writing any boilerplate code or infra. Learn more at https://www.inngest.com.
11
+
12
+ - [Overview](#overview)
13
+ - [Quick Start](#quick-start)
14
+ - [Project Architecture](#project-architecture)
15
+ - [Community](#community)
16
+
17
+ <br />
18
+
19
+ ## Overview
20
+
21
+ Inngest makes it simple for you to write delayed or background jobs by triggering functions from events — decoupling your code from your application.
22
+
23
+ - You send events from your application via HTTP (or via third party webhooks, e.g. Stripe)
24
+ - Inngest runs your serverless functions that are configured to be triggered by those events, either immediately, or delayed.
25
+
26
+ Inngest abstracts the complex parts of building a robust, reliable, and scalable architecture away from you so you can focus on writing amazing code and building applications for your users.
27
+
28
+ We created Inngest to bring the benefits of event-driven systems to all developers, without having to write any code themselves. We believe that:
29
+
30
+ - Event-driven systems should be _easy_ to build and adopt
31
+ - Event-driven systems are better than regular, procedural systems and queues
32
+ - Developer experience matters
33
+ - Serverless scheduling enables scalable, reliable systems that are both cheaper and better for compliance
34
+
35
+ [Read more about our vision and why this project exists](https://www.inngest.com/blog/open-source-event-driven-queue)
36
+
37
+ <br />
38
+
39
+ ## Quick Start
40
+
41
+ 1. Install the Inngest CLI to get started:
42
+
43
+ ```bash
44
+ curl -sfL https://cli.inngest.com/install.sh | sh \
45
+ && sudo mv ./inngest /usr/local/bin/inngest
46
+ # or via npm
47
+ npm install -g inngest-cli
48
+ ```
49
+
50
+ 2. Create a new function. It will prompt you to select a programming language and what event will trigger your function. Optionally use the `--trigger` flag to specify the event name:
51
+
52
+ ```shell
53
+ inngest init --trigger demo/event.sent
54
+ ```
55
+
56
+ 3. Run your new hello world function with dummy data:
57
+
58
+ ```shell
59
+ inngest run
60
+ ```
61
+
62
+ 4. Run the Inngest DevServer. This starts a local "Event API" which can receive events. When events are received, functions with matching triggers will automatically be run. Optionally use the `-p` flag to specify the sport for the Event API.
63
+
64
+ ```shell
65
+ inngest dev -p 9999
66
+ ```
67
+
68
+ 5. Send events to the DevServer. Send right from your application using HTTP + JSON or simply, as a curl with a dummy key of `KEY`.
69
+
70
+ ```shell
71
+ curl -X POST --data '{"name":"demo/event.sent","data":{"test":true}}' http://127.0.0.1:9999/e/KEY
72
+ ```
73
+
74
+ That's it - your hello world function should run automatically! When you `inngest deploy` your function to Inngest Cloud or your self-hosted Inngest. Here are some more resources to get you going:
75
+
76
+ - [Full Quick Start Guide](https://www.inngest.com/docs/quick-start?ref=github)
77
+ - [Function arguments & responses](https://www.inngest.com/docs/functions/function-input-and-output?ref=github)
78
+ - [Sending Events to Inngest](https://www.inngest.com/docs/event-format-and-structure?ref=github)
79
+ - [Inngest Cloud: Managing Secrets](https://www.inngest.com/docs/cloud/managing-secrets?ref=github)
80
+ - [Self-hosting Inngest](https://www.inngest.com/docs/self-hosting?ref=github)
81
+
82
+ <br />
83
+
84
+ ## Project Architecture
85
+
86
+ Fundamentally, there are two core pieces to Inngest: _events_ and _functions_. Functions have several sub-components for managing complex functionality (eg. steps, edges, triggers), but high level an event triggers a function, much like you schedule a job via an RPC call to a queue. Except, in Inngest, **functions are declarative**. They specify which events they react to, their schedules and delays, and the steps in their sequence.
87
+
88
+ <br />
89
+
90
+ <p align="center">
91
+ <img src=".github/assets/architecture-0.5.0.png" alt="Open Source Architecture" width="660" />
92
+ </p>
93
+
94
+ Inngest's architecture is made up of 6 core components:
95
+
96
+ - **Event API** receives events from clients through a simple POST request, pushing them to the **message queue**.
97
+ - **Event Stream** acts as a buffer between the **API** and the **Runner**, buffering incoming messages to ensure QoS before passing messages to be executed.<br />
98
+ - A **Runner** coordinates the execution of functions and a specific run’s **State**. When a new function execution is required, this schedules running the function’s steps from the trigger via the **executor.** Upon each step’s completion, this schedules execution of subsequent steps via iterating through the function’s **Edges.**
99
+ - **Executor** manages executing the individual steps of a function, via _drivers_ for each step’s runtime. It loads the specific code to execute via the **DataStore.** It also interfaces over the **State** store to save action data as each finishes or fails.
100
+ - **Drivers** run the specific action code for a step, eg. within Docker or WASM. This allows us to support a variety of runtimes.
101
+ - **State** stores data about events and given function runs, including the outputs and errors of individual actions, and what’s enqueued for the future.
102
+ - **DataStore** stores persisted system data including Functions and Actions version metadata.
103
+ - **Core API** is the main interface for writing to the DataStore. The CLI uses this to deploy new funtions and manage other key resources.
104
+
105
+ And, in this CLI:
106
+
107
+ - The **DevServer** combines all of the components and basic drivers for each into a single system which loads all functions on disk, handles incoming events via the API and executes functions, all returning a readable output to the developer. (_Note - the DevServer does not run a Core API as functions are loaded directly from disk_)
108
+
109
+ To learn how these components all work together, [check out the in-depth architecture doc](To learn how these components all work together, [check out the in-depth architecture doc](/docs/ARCHITECTURE.md). For specific information on how the DevServer works and how it compares to production [read this doc](/docs/DEVSERVER_ARCHITECTURE.md).
110
+ ).
111
+
112
+ <br />
113
+
114
+ ## Community
115
+
116
+ - [**Join our online community for support, to give us feedback, or chat with us**](https://www.inngest.com/discord).
117
+ - [Post a question or idea to our Github discussion board](https://github.com/orgs/inngest/discussions)
118
+ - [Read the documentation](https://www.inngest.com/docs)
119
+ - [Explore our public roadmap](https://github.com/orgs/inngest/projects/1/)
120
+ - [Follow us on Twitter](https://twitter.com/inngest)
121
+ - [Join our mailing list](https://www.inngest.com/mailing-list) for release notes and project updates
122
+
123
+ ## Contributing
124
+
125
+ We’re excited to embrace the community! We’re happy for any and all contributions, whether they’re feature requests, ideas, bug reports, or PRs. While we’re open source, we don’t have expectations that people do our work for us — so any contributions are indeed very much appreciated. Feel free to hack on anything and submit a PR.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "inngest-cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.4",
4
4
  "description": "The event-driven queue for any language.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
7
- "prepublishOnly": "mkdir bin && touch bin/inngest",
7
+ "prepublishOnly": "mkdir bin && touch bin/inngest && cp ../README.md .",
8
8
  "postinstall": "node postinstall.js",
9
9
  "build": "tsc"
10
10
  },