Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: update appevent-transformation example [EXT-6286] #9610

Merged
merged 3 commits into from
Mar 27, 2025

Conversation

whitelisab
Copy link
Contributor

Purpose

Since creating the new function templates, some of our function examples were not working properly due to the sub-directory setup. This PR changes the App Event Transformation Function example to be a single frontendless app example that can be bootstrapped via the CCA using npx create-contentful-app@latest --example function-appevent-transformation.

Approach

The example originally used a google maps api for geocoding. I changed this to a free opensource geocoding api (Nominatim) so that users wouldn't need to set up an API Key.

Here is a summary of the changes:

  • Removed the TS/JS sub-directories in favor of a singular app example
  • This example has no frontend; the only code is for functions and some setup scripts
  • Add more details to the INSTRUCTIONS file, including how to use the scripts to easily get setup
  • Added a script for creating an app event subscription that links to the transformation function and a script to create a content type with the correct latitude and longitude fields and publish an entry
  • Bumped @contentful/node-apps-toolkit and use the FunctionTypeEnum

I also made a small update to the comments in the filter example 😄

Testing steps

I tested this app locally and also via the CCA by pointing the local CCA to this branch. I ran through all the scripts in the instructions to ensure that they work properly.

Breaking Changes

Dependencies and/or References

Deployment

@whitelisab whitelisab requested a review from a team as a code owner March 27, 2025 14:28
Copy link

netlify bot commented Mar 27, 2025

Deploy Preview for ecommerce-app-base-components canceled.

Name Link
🔨 Latest commit 7b5bbf3
🔍 Latest deploy log https://app.netlify.com/sites/ecommerce-app-base-components/deploys/67e56c54033413000889fd89

@whitelisab whitelisab force-pushed the fix/ext-6286-transformation branch from cc2b704 to 7b5bbf3 Compare March 27, 2025 15:18
@whitelisab whitelisab merged commit 0729b30 into master Mar 27, 2025
17 checks passed
@whitelisab whitelisab deleted the fix/ext-6286-transformation branch March 27, 2025 17:16
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants