Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Create a package manager for REST API extensions and transforms #133

@dmcassel

Description

@dmcassel

Analogous to npm.

Motivation: make it easy to share REST API service extensions and transformations.

$ ml pm install tagger

  • downloads the tagger extension, puts it into the rest/ext directory of the current Roxy project.
  • downloads any dependent libraries, sets up the path under your src directory. Convention: src/lib/{extension-name}/{libraries}. enforced?
  • downloading happens by "git clone" to a tmp directory, then files are moved to the appropriate locations.
  • stores information about what was installed. where?

$ ml pm remove tagger

  • lists files to be removed from the current Roxy project, prompts to confirm

$ ml pm publish tagger.xml

  • sends tagger.xml to package registry (a public-facing web site hosted by MarkLogic registry.marklogic.com).
<package>
  <extension>
    <name>tagger</name>
    <location>https://github.com/dmcassel/tagger</location>
    <description>Takes parameters "uri", "tag", and "path". Inserts a &amp;lt;tag&amp;gt; element with the value of the tag parameter at the specified path.<description>
    <works-with-ml>6</works-with-ml>
    <license url="http://opensource.org/licenses/MIT">MIT</license>
  </extension>
</package>
<package>
  <transform>
    <name>flatten-meta</name>
    <location>https://github.com/dmcassel/flatten-meta</location>
    <description>Converts elements of the form &amp;amp;lt;meta name="foo" value="bar"/&amp;gt; to &amp;lt;foo&amp;gt;bar&amp;lt;/foo&amp;gt;</description>
    <works-with-ml>6</works-with-ml>
    <works-with-ml>7</works-with-ml>
    <license url="http://opensource.org/licenses/MIT">MIT</license>
  </transform>
</package>

registry.marklogic.com would provide services to the "ml pm" command and allow for package browsing, like https://npmjs.org/.

This ticket lists first-cut functionality.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions