Skip to content

Commit

Permalink
Rename manifest fields, add example setting (#8)
Browse files Browse the repository at this point in the history
* rename manifest fields, add example setting

* use example setting
  • Loading branch information
alexcasalboni authored Feb 13, 2025
1 parent b0f6b82 commit 31dc0df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions edgee-component.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
manifest_version = 1

[package]
[component]
name = "example-js-component"
version = "1.0.0"
category = "data-collection"
Expand All @@ -10,6 +10,10 @@ documentation = "https://github.com/edgee-cloud/example-js-component"
repository = "https://github.com/edgee-cloud/example-js-component"
wit-world-version = "0.4.0"

[package.build]
[component.build]
command = "npm install && npm run generate && npm run build"
output_path = "./example-js-component.wasm"

[component.settings.example]
title = "Example Config Field"
type = "string"
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const dataCollection = {
const payload = buildPagePayload(e.data.val, e.context);

// build and return EdgeeRequest
return buildEdgeeRequest(payload, settings['your_api_key']);
return buildEdgeeRequest(payload, settings['example']);
},

/**
Expand All @@ -135,7 +135,7 @@ export const dataCollection = {
const payload = buildTrackPayload(e.data.val, e.context);

// build and return EdgeeRequest
return buildEdgeeRequest(payload, settings['your_api_key']);
return buildEdgeeRequest(payload, settings['example']);
},

/**
Expand All @@ -154,6 +154,6 @@ export const dataCollection = {
const payload = buildUserPayload(e.data.val, e.context);

// build and return EdgeeRequest
return buildEdgeeRequest(payload, settings['your_api_key']);
return buildEdgeeRequest(payload, settings['example']);
},
};

0 comments on commit 31dc0df

Please sign in to comment.