Skip to content

[FEATURE] Add apm marketplace generate command to pack all plugins and produce a marketplace.json #722

@Antonin-Rouxel-LaPoste-BGPN

Description

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

The apm pack --format plugin command can produce a self-contained plugin bundle from a single apm.yml project. However, there is no way to do this for an entire collection of plugins at once, nor to generate the resulting marketplace.json that aggregates them for discovery and governance.

The apm marketplace command group exists but only covers consuming marketplaces (add, browse, list, remove, update). There is no way to produce a marketplace index from a set of local plugin projects without writing custom scripts.

This forces teams to maintain their own generation scripts (e.g. a Node.js script that walks a plugins/ directory, calls apm pack --format plugin on each, and assembles marketplace.json by hand), which is error-prone and not portable.

Describe the solution you'd like

Introduce a dedicated marketplace.yml definition file at the root of the repository that declares which plugin projects to include in the marketplace. apm marketplace generate would read this file to know what to compile, then pack each plugin and assemble the resulting marketplace.json.

Example marketplace.yml:

name: my-org-marketplace
version: 1.0.0
description: Internal plugin marketplace for my organization

plugins:
  - path: plugins/halo-angular/
  - path: plugins/other-plugin/

Add a new apm marketplace generate subcommand that:

  1. Reads marketplace.yml (or a path passed via --config) to determine which plugin projects to include.
  2. Runs apm pack --format plugin on each declared plugin path, which produces each plugin's plugin.json and associated build artifacts.
  3. Reads each generated plugin.json to collect resolved metadata.
  4. Produces the marketplace.json file defined in the output field, aggregating all plugins — meaning a single command indirectly generates all plugin.json files and the final marketplace.json.

Proposed usage:

# Generate marketplace.json using marketplace.yml at current directory
apm marketplace generate

# Or with an explicit config path
apm marketplace generate --config ./marketplace.yml

This single command would replace the following manual sequence:

cd plugins/halo-angular && apm pack --format plugin
cd plugins/other-plugin  && apm pack --format plugin
# ... then manually assemble marketplace.json

Expected output (marketplace.json):

{
  "name": "my-org-marketplace",
  "metadata": {
    "description": "Internal plugin marketplace for my organization",
    "version": "1.0.0",
    "pluginRoot": "./plugins"
  },
  "owner": {
    "name": "La Poste Groupe",
    "email": "jerome.biabiany@laposte.fr"
  },
  "plugins": [
    {
      "name": "halo-angular",
      "version": "1.0.0",
      "description": "APM project for halo-angular",
      "source": { "source": "github", "repo": "org/repo" }
    }
  ]
}

Describe alternatives you've considered

  • Custom scripts: Writing a Node.js/Python script per repository to walk plugin directories, invoke apm pack, and assemble marketplace.json. This works but is not portable and must be duplicated across every team using APM.
  • Manual editing: Maintaining marketplace.json by hand. This is error-prone and breaks as soon as plugin versions are bumped.
  • apm marketplace add + apm marketplace update: These commands manage the local marketplace registry for consuming plugins, not for publishing/generating a marketplace index file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageNew issue, not yet reviewed by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions