Skip to content
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

Registry updates #49

Merged
merged 2 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 20 additions & 5 deletions services/registry/developer-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,16 @@ options ["value1", "value2", "value3"]
```

<Note>
Note: only `title` and `type` are mandatory to define a setting. In this example `example-name` is the key your business logic
will use to get its value from the `settings` dict.
Note: only `title` and `type` are mandatory to define a setting.
In this case, `example-name` is the key your business logic will use to get its value from the `settings` dict.
</Note>

<Warning>
BETA: even if defined as number or bool, all settings are treated as strings when you receive them in the
business logic. For now, it's your responsibility to parse them into the correct type. In the future, the WIT
definition will handle types automatically as well.
</Warning>

### Step 3: Build and test locally

When the implementation is ready, build your component locally:
Expand All @@ -281,12 +287,16 @@ When the implementation is ready, build your component locally:
$ edgee components build
```



You can customize the behavior of the build command in the manifest file by changing the target file name
and the default build script. If you've created a new component with `edgee component new` the default build script
and the default build script. If you've created a new component with `edgee components new` the default build script
should be a great starting point. By default, the output of this command will be a new Wasm file in the current folder.

<Warning>
BETA: the Edgee CLI is intended to simplify and make local development uniform across programming languages.
While some of the complexity is still visible today (with long multi-step commands and additional Makefiles or npm scripts),
our goal is to hide most of that complexity behind `edgee components build` in the future.
</Warning>

Before pushing your component to the Edgee Component Registry, it's highly recommended to validate and test the Wasm file locally:

```bash
Expand All @@ -303,6 +313,11 @@ Use the test command to run your local Wasm file with a sample event and provide
If no `--event-type` is provided, it will run the Wasm file with all event types (page, track, and user).
This helps ensure your component behaves as expected from the proxy's perspective, in addition to your unit tests.

<Note>
Note: the test command needs a local Wasm file, so don't forget to re-compile your component to Wasm after
updating your code.
</Note>

#### Test events

Test events represent the typical structure of an Edgee event.
Expand Down
Loading