@artifacter/api
Artifacter's api module (artifact generation management)
Last updated 2 years ago by arth .
GPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @artifacter/api 
SYNC missed versions from official npm registry.

artifacter-logo@artifacter/worker

Artifacter's artifacts generation service

What's this? - Intro

This is Artifacter's worker module, it makes use of the template engine to build all the artifacts required by the UI via a REST service, of course this service can be consumed by other users, but must be aware of its configuration available (a future major version of this module will provide this through another REST service). Worker will take its input and process it through its configuration, this could be several atmpl files, folders and static files, all of this is packaged into a zip file and stored in wait until a get request is issued to retrieve this file.

What's in here? - API

The worker is meant to be run as a server, via npm start, there are 2 REST services available in the API.

[POST] /artifactGenerationRequest
Request ContentType Response ContentType
application/json application/json

Sends an artifact generation request, the data provided must match the worker's own configuration. Responds synchronously with an UUID for the zip file retrieval.

[GET] /generatedArtifacts
Request ContentType Response ContentType
application/x-www-form-urlencoded application/zip

Given an UUID, it will fetch a generated artifacts zip file that matches with it, once it is retrieved, the stored file will be deleted on the server and any subsequent calls to this service with the same uuid will return a 410 code, if something that is not a UUID is sent a 403 code will be returned.

What's wrong here? - Known Issues

Currently this module has a design flaw, because it has a tight coupling with @artifacter/ui module when it comes down to the configuration and the values map that must be sent to the worker, a major release will fix this flaw by making Worker the master of this configuration and providing a REST API for it.

What's coming next? - Planned features for a future release

A lot, I want to implement asynchronous generation requests using any queue provider, also I want to improve its tightened coupling with @artifacter/ui.

How do I run this?

Just do a npm start, which will start the server.

Current Tags

  • 0.0.4                                ...           latest (2 years ago)

1 Versions

  • 0.0.4                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 4
Dependencies (18)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |