@adobe/aio-cli-lib-app-config

node lib to provide a consistent interface to various config files that make up Adobe Developer App Builder applications and extensions

Usage no npm install needed!

<script type="module">
  import adobeAioCliLibAppConfig from 'https://cdn.skypack.dev/@adobe/aio-cli-lib-app-config';
</script>

README

Version Downloads/week Node.js CI License Codecov Coverage

aio-cli-lib-app-config

node lib to provide a consistent interface to various config files that make up Adobe Developer App Builder applications and extensions

Loading the app config returns an object that describes the entire applications.

Including:

  • extensions
  • credentials
  • paths to components

Here is an example object:

 {
   aio: {...aioConfig...},
   packagejson: {...package.json...},
   all: {
      /*
      OPTIONAL: newer projects are organized by extensions. `application` is a placeholder used by older apps which to not explictly define extensions
      */
     'application': {
       app: {
         name, /* Name from package.json, stripped of @scope */
         version, /* version from package.json OR 0.1.0 */
         hasFrontend, /* does this app/extension have static assets to be deployed to CDN */
         hasBackend, /* does this app/extension include actions */
         dist  /* output directory, default is 'dist/'
       },
       ow: {
           /* Only relevant if hasBackend is true, these are the credentials used to deploy/invoke actions */
         apihost,
         apiversion,
         auth,
         namespace,
         package
       },
       s3: {
         creds || tvmUrl,
         credsCacheFile,
         folder,
       },
       web: {
         src,
         injectedConfig,
         distDev,
         distProd,
       },
       manifest: {
         full,
         package,
         packagePlaceholder,
         src,
       },
       actions: {
         src,
         dist,
         remote,
         urls
       }
     }
   },
   OPTIONAL:'dx/asset-compute/worker/1': {
      ...same as above...
   },
   OPTIONAL:'dx/excshell/1': {
      ...same as above...
   },
 }