npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@adobe/aio-cli-plugin-asset-compute

v4.0.4

Published

Tool to develop and test Adobe Asset Compute workers

Downloads

588

Readme

oclif Version License codecov Travis

@adobe/aio-cli-plugin-asset-compute

Asset Compute Plugin for the Adobe I/O CLI. This plugin supports developing and testing of Asset Compute custom workers.

Documentation

Further documentation:

Installation and Usage

For interactive use as developer, install this as aio-cli plugin using:

aio plugins:install @adobe/aio-cli-plugin-asset-compute

To list available commands, run

aio asset-compute

See commands for a description of all commands.

When aio asset-compute is run inside a project directory with a package.json with the plugin installed as devDependency (see below), then it will use exactly that dependency version (available since 1.4.0). This ensures test execution behaves the same as with aio app test in e.g. CI builds, even if the plugin version installed by the developer in aio is different. In other directories it will simply use its own command implementations.

Use as project Dependency

Inside Asset Compute App Builder projects, @adobe/aio-cli-plugin-asset-compute will also be present as npm devDependency. This is used by aio app test and aio app run.

Projects created using aio app init with the Asset Compute Worker generator will automatically be include this dependency in their package.json, so no separate installation is required.

In case of creating a project setup from scratch, install it as devDependency using:

npm install --save-dev @adobe/aio-cli-plugin-asset-compute

Then it can be used with aio app test or npm test by adding a test script to the package.json. Or an aio app hook such as post-app-run. Note that the bin name is adobe-asset-compute in this case:

    "scripts": {
        "test": "adobe-asset-compute test-worker",
        "post-app-run": "adobe-asset-compute devtool"
    }

Debugging workers

If you use the debug library inside your worker code, you can enable it in test-worker and run-worker commands by setting the WORKER_DEBUG environment variable just like the standard DEBUG variable:

WORKER_DEBUG=mystuff aio asset-compute test-worker

Commands

aio devtool

Starts the Asset Compute Developer Tool

USAGE
  $ aio devtool [-v] [--version] [--port <value>]

FLAGS
  -v, --verbose   Verbose output
  --port=<value>  [default: 9000] Http port of the Asset Compute Developer Tool Server
  --version       Show version

DESCRIPTION
  Starts the Asset Compute Developer Tool

aio run-worker FILE RENDITION

Run worker from local project using Docker

USAGE
  $ aio run-worker [FILE] [RENDITION] [-v] [--version] [-a <value>] [-d <value> | -P <value> | -p <value>]

ARGUMENTS
  FILE       Path to input file for worker
  RENDITION  Path where to create output rendition.
             Single file for single rendition, or directory to create multiple renditions, in which case the full
             parameter json including rendition names must be provided using --data.

FLAGS
  -P, --paramFile=<value>  Path to parameter json file.
  -a, --action=<value>     Worker to run. Use action name from manifest. Not required if there is only one.
  -d, --data=<value>       Complete input parameters as JSON string. Allows multiple renditions.
  -p, --param=<value>...   <key> <value> - Set parameters for rendition, can be used multiple times
  -v, --verbose            Verbose output
  --version                Show version

DESCRIPTION
  Run worker from local project using Docker

aio test-worker [TESTCASE]

Run tests from local project

USAGE
  $ aio test-worker [TESTCASE] [-v] [--version] [-a <value>] [-u]

ARGUMENTS
  TESTCASE  Test case(s) to run. Supports glob patterns. If not set, runs all tests.

FLAGS
  -a, --action=<value>    Worker to test. Use action name from manifest. If not set, runs tests for all workers.
  -u, --updateRenditions  Replace expected renditions of failing test cases with the generated rendition.
  -v, --verbose           Verbose output
  --version               Show version

DESCRIPTION
  Run tests from local project

ALIASES
  $ aio tw

Contributing

Contributions are welcomed! Read the Contributing Guide for more information.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.