# @api-components/api-console-sources-resolver

> A module to download Mulesoft's API console sources.

Latest version **2.0.0** (published 2020-01-11) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @api-components/api-console-sources-resolver
pnpm add @api-components/api-console-sources-resolver
yarn add @api-components/api-console-sources-resolver
bun add @api-components/api-console-sources-resolver
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-01-11 |
| First published | 2018-10-31 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=12.0.0 |
| Dependencies | 5 |
| Unpacked size | 38 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Pawel Psztyc, Advanced Rest Client Authors |
| Maintainers | jarrodek |
| Keywords | api-console, builder, node, sources |

## Links

- npm: https://www.npmjs.com/package/@api-components/api-console-sources-resolver
- Repository: https://github.com/mulesoft-labs/api-console-sources-resolver
- Homepage: https://github.com/mulesoft-labs/api-console-sources-resolver#readme
- Issues: https://github.com/mulesoft-labs/api-console-sources-resolver/issues
- npm.io page: https://npm.io/package/@api-components/api-console-sources-resolver

## Dependencies (5)

- [esm](https://npm.io/package/esm.md) ^3.2.25
- [tmp](https://npm.io/package/tmp.md) 0.1.0
- [winston](https://npm.io/package/winston.md) 3.2.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.1.0
- [unzipper](https://npm.io/package/unzipper.md) ^0.10.5

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2020-01-11
- 1.0.3 — 2019-05-29
- 1.0.2 — 2018-10-31

## README

# api-console-sources-resolver

[![Build Status](https://travis-ci.org/mulesoft-labs/api-console-sources-resolver.svg?branch=master)](https://travis-ci.org/mulesoft-labs/api-console-sources-resolver)

A module that takes care of copying API Console's sources to a working dir from various sources like GitHub release, any URL, or local filesystem.

## API

The module exposes the following classes:

-   [SourcesResolver](lib/SourcesResolver.js)
-   [SourceOptions](lib/SourceOptions.js)
-   [Cache](lib/Cache.js)

### Example

```javascript
import { SourcesResolver } from '@api-components/api-console-sources-resolver';
import { Transport, GithubResolver } from '@api-components/api-console-github-resolver';

const resolver = new GithubResolver();
const transport = new Transport();

const sources = new SourcesResolver({
  tagVersion: 'v6.0.0'
}, resolver, transport, console);

await sources.sourcesTo('./temp/');
```

### SourcesResolver

A class responsible for getting API Console's correct sources and copy it to
desired location.

#### Constructor

**opts** [SourceOptions](lib/SourceOptions.js)

**resolver** `Object` - A class used to resolve console's versions and download
release information

**transport** `Object` - Remote files downloader.

#### `sourcesTo(destination)`

Resolves and copies API console's sources from set in options source location to
`destination`.

Console can be downloaded from Mulesoft's main repository as a latest release
or tagged release. It can be copied from a local path or downloaded as a zip
file. This is controlled by the options.

**destination** `String` - Local destination where copied or downloaded and
extracted files will be placed.

##### Returns `<Promise>`

A promise resolved when operation succeeded.

---
_Source: https://npm.io/package/@api-components/api-console-sources-resolver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
