Skip to content

NASA-AMMOS/aerie-action-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aerie-action-examples

Tests

This repository contains runnable examples of Aerie actions.
Use them as references or starting points for building your own actions.

For more about actions and how they fit into the Aerie system, see the Aerie docs.

Prerequisites

Node.js is required to test and build the examples (version 22.x recommended, 18.x+ required). To verify your installation:

node --version

If you use nvm to manage node versions, you can run nvm use to automatically use the correct version of Node.

Structure

Each example action is an independent node.js package located under examples/, and typically includes:

  • A package.json file defining the action's metadata and dependencies
  • A rollup.config.js specifying how the action is bundled (usually unchanged)
  • A src directory containing the source code of the action
  • A test directory containing unit tests (optional)

Usage

To use the examples in this repository:

  1. Install dependencies for all examples, from the root of this project:

    npm install
  2. Navigate to an example:

    cd examples/basic-action
  3. Build the action:

    npm run build

    This generates a bundled file at dist/action.js, which you can upload to Aerie.

  4. Optionally, run unit tests for the example:

    npm run test

Creating an action

For small experiments, you can modify example files directly, rebuild, and re-upload to Aerie to see the effects. When you are ready to create your own action, it is usually easiest to start from one of the examples:

  1. Copy one of the example folders to a new location on your machine

  2. Inside the new folder, reset the environment:

    rm -rf node_modules
    npm install
    npm run build

This will reinstall dependencies and verify that the action builds independently. At this point, you can begin making modifications or initialize a git repository to track your changes.

Future work

This repository may be expanded over time with additional example actions demonstrating:

  • More complex input and output types
  • Best practices for validation, testing, and error handling
  • Utils for writing action unit tests

Contributions are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •