# liferay-hotfix-doc

> A nodejs wrapper for a service that reads a liferay hotfix documentation (contained in the file fixpack_documentation.xml) and converts it to json format without the need to download the entire hotfix.

Latest version **1.0.2** (published 2019-07-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install liferay-hotfix-doc
pnpm add liferay-hotfix-doc
yarn add liferay-hotfix-doc
bun add liferay-hotfix-doc
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-07-06 |
| First published | 2018-02-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | Cleydyr de Albuquerque |
| Maintainers | cleydyr |
| Keywords | liferay, hotfix, documentation |

## Links

- npm: https://www.npmjs.com/package/liferay-hotfix-doc
- Repository: https://github.com/cleydyr/liferay-hotfix-doc
- Homepage: https://github.com/cleydyr/liferay-hotfix-doc#readme
- Issues: https://github.com/cleydyr/liferay-hotfix-doc/issues
- npm.io page: https://npm.io/package/liferay-hotfix-doc

## Dependencies (5)

- [debug](https://npm.io/package/debug.md) ^3.1.0
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.19
- [base-64](https://npm.io/package/base-64.md) ^0.1.0
- [request](https://npm.io/package/request.md) ^2.88.0
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.5

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2019-07-06
- 1.0.0 — 2018-02-24

## README

# liferay-hotfix-doc
A NodeJS wrapper for a service that reads a liferay hotfix documentation (contained in the file fixpack_documentation.xml) and converts it to JSON format without the need to download the entire hotfix.

## Installation
`npm i liferay-hotfix-doc`

## Usage

First, you have to instantiate the HotfixDoc object.

```
const HotfixDoc = require('liferay-hotfix-doc');

const hd = new HotfixDoc({
  user: 'my liferay.com user',
  password: 'my liferay.com password',
  server: 'the secret service url',
});
```

After that, you can use the exposed method `getDocumentation`. There are two ways of using it.
```
// To get hotfix-405-7010
// #1
hd.getDocumentation('405', '7010')
  .then(console.log)
  .catch(console.error);

// #2
hd.getDocumenation('405-7010')
  .then(console.log)
  .catch(console.error);
```

`getDocumentation` will return a native Promise.
The promise will
* resolve
    If the hotfix is found. Then its metadata as an object is returne as a value.
* reject
    If the hotfix is not found. An Error will be raised. The Error object will wrap a string (JSON format) containing error 404 and a message.
    If there is any other unrelated error.

# Result format
The result format will vary depending on the product version. You'll have to figure out how to find the information you need.  :)
Elements attributes are key-value pairs that can be accessed with `elementName.$`. Element value will be accessible with `elementName._`.

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