# @artifacter/worker

> Artifacter's worker module (artifact generation management)

Latest version **0.0.1** (published 2017-07-21) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @artifacter/worker
pnpm add @artifacter/worker
yarn add @artifacter/worker
bun add @artifacter/worker
```

Provides the commands `$`, `artifacter`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-07-21 |
| First published | 2017-07-21 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 18 |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | arthmoeros |
| Maintainers | arth |
| Keywords | artifacter, artifact, generation, worker |

## Links

- npm: https://www.npmjs.com/package/@artifacter/worker
- Repository: https://github.com/arthmoeros/artifacter-worker
- Homepage: https://github.com/arthmoeros/artifacter-worker#readme
- Issues: https://github.com/arthmoeros/artifacter-worker/issues
- npm.io page: https://npm.io/package/@artifacter/worker

## Dependencies (18)

- [cors](https://npm.io/package/cors.md) ^2.8.3
- [uuid](https://npm.io/package/uuid.md) ^3.0.1
- [colors](https://npm.io/package/colors.md) ^1.1.2
- [morgan](https://npm.io/package/morgan.md) ^1.8.1
- [express](https://npm.io/package/express.md) ^4.15.2
- [shelljs](https://npm.io/package/shelljs.md) ^0.7.7
- [diskette](https://npm.io/package/diskette.md) ^1.2.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^3.0.0
- [@types/uuid](https://npm.io/package/@types/uuid.md) ^2.0.29
- [body-parser](https://npm.io/package/body-parser.md) ^1.17.1
- [@types/express](https://npm.io/package/@types/express.md) ^4.0.35
- [@types/shelljs](https://npm.io/package/@types/shelljs.md) ^0.7.1
- [@types/fs-extra](https://npm.io/package/@types/fs-extra.md) ^2.1.0
- [folder-zip-sync](https://npm.io/package/folder-zip-sync.md) ^1.0.4
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.10
- [@artifacter/common](https://npm.io/package/@artifacter/common.md) ^1.0.0
- [@types/body-parser](https://npm.io/package/@types/body-parser.md) ^1.16.3
- [@artifacter/template-engine](https://npm.io/package/@artifacter/template-engine.md) ^2.0.0

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2017-07-21

## README

# ![artifacter-logo](https://raw.githubusercontent.com/arthmoeros/artifacter-ui/master/src/rsz_artifacter-logo.png)@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.

---
_Source: https://npm.io/package/@artifacter/worker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
