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-lib-console-project-installation

v3.0.1

Published

A library to configure Adobe Console Projects from a file.

Downloads

13,583

Readme

License

Adobe I/O Lib Console Project Installation

This is an internal helper library to create and configure remote Developer Console resources, like services and credentials, based on a template's install.yaml configuration file.

The following keys are supported in the install.yaml file:

  • categories: (Required) Categories are informational and at least one category must be defined. See a list of supported categories here.
  • workspaces: (Optional) A list of workspace names to create. Runtime namespaces are added by default for each workspace, if the runtime key is set to true. Staging and Production workspaces are created by default if not defined.
  • runtime: (Optional) Defines whether Runtime should be configured for each workspace. If not defined, the default is false.
  • apis: (Optional) A list of Adobe services, identified by their SDK code required by the template to work. By default, all services are attached to all configured workspaces.

A note on apis: Developer Console supports three types of services: AdobeIO, Enterprise and Analytics. Currently, only AdobeIO and Enterprise services are supported for configuration by this library.

Installing

$ npm install @adobe/aio-lib-console-project-installation

Usage

  1. Initialize the template handler
const { getToken } = require('@adobe/aio-lib-ims')
const { CLI } = require('@adobe/aio-lib-ims/src/context')
const templateHandler = require('@adobe/aio-lib-console-project-installation')

// Instantiate Adobe Developer Console SDK
const accessToken = await getToken(CLI)

// Instantiate App Builder Template Manager
const installConfigFile = 'install.yml'
const templateManager = await templateHandler.init(accessToken, installConfigFile)
  1. Call methods using the initialized Template Manager
  // Install the template
  try {
    const orgId = 'org-id'
    const templateId = 'template-id'
    const result = await templateManager.installTemplate(orgId, templateId)
    console.log(result)

  } catch (e) {
    console.error(e)
  }

Template validation

You can use this library to validate the App Builder application install.yaml file.

const templateHandler = require('@adobe/aio-lib-console-project-installation')

const pathToInstallConfigFile = 'install.yml'

// Second parameter is optional. Set it to `true` if you want to get prettified errors.
const { valid, errors } = await templateHandler.validate(path, true)

Functions

init(accessToken, templateConfigurationFile) ⇒ TemplateInstallManager

Returns a new TemplateInstallManager object.

Kind: global function
Returns: TemplateInstallManager - A new TemplateInstallManager object.

| Param | Type | Description | | --- | --- | --- | | accessToken | string | The Adobe Console API client. | | templateConfigurationFile | string | The path to the configuration file. |

validate(templateConfigurationFile, pretty) ⇒ object

Kind: global function
Returns: object - Object with properties valid, configuration and errors

| Param | Type | Default | Description | | --- | --- | --- | --- | | templateConfigurationFile | string | | The path to the configuration file. | | pretty | boolean | false | Prettify errors. |

Debug Logs

LOG_LEVEL=debug <your_call_here>

Prepend the LOG_LEVEL environment variable and debug value to the call that invokes your function, on the command line. This should output a lot of debug data for your SDK calls.

Contributing

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

Licensing

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