Skip to content

[Addons] Add 'message' field to addon create, config, & delete  #13

@DavidWells

Description

@DavidWells

Is your feature request related to a problem? Please describe.

When addons are created, updated, or deleted the user sees a generic message without additional context on what to do next.

Example CLI output with no additional context:

image

VGS needs to tell the user to complete some additional steps to finish setup and would like to log out instructions after creation/updating

A couple of addon providers have requested being able to show a message after netlify addons:create/update/delete

This would be an extra field passed back from their API in the provisioning calls. Example from create

{
  // `id` (required) - A unique ID generated by you, for reference within your own API
  id: uuid(),
+ message: "My custom message for the user to see in the CLI or the UI"
  // `endpoint` (optional) - Proxied endpoint.
  // This will be callable at https://user-netlify-site.com/.netlify/your-addon-namespace
  endpoint: "https://my-endpoint.example.com",
  /* `config` (optional) - This can return back exactly what was received in the POST request, or include additional fields or altered values. This should also be what is returned in response to a GET request to /instances/:id */
  config: {},
  // `env` (optional) - Environment Keys accessible by Netlify user in build context & in functions
  env: {
    'YOUR_SERVICE_API_SECRET': 'value'
  },
  // `snippets` (optional) - JS Snippet content to inject into the calling Netlify site
  snippets: [
    {
      title: 'Snippet From Demo App',
      position: 'head',
      html: `<script>console.log("Hello from ${logValue}")</script>`
    }
  ]
}

Proposed Solution

Add message field to allowed values back from addon endpoints and pass those down to the client (CLI & UI)

Show message here in CLI https://github.com/netlify/cli/blob/master/src/commands/addons/create.js#L65

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions