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

Commit d38c6e7

Browse files
authored
Merge pull request #3 from mocks-server/release
Release
2 parents 5ef585c + 839fc26 commit d38c6e7

31 files changed

+5834
-3238
lines changed

.travis.yml

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,2 @@
1-
language: node_js
2-
3-
node_js:
4-
- 10.8
5-
6-
cache:
7-
directories:
8-
- ~/.npm
9-
- ~/.cache
10-
- ~/.sonar/cache
11-
12-
addons:
13-
apt:
14-
packages:
15-
- libgconf-2-4
16-
sonarcloud:
17-
organization: "mocks-server"
18-
branch:
19-
name: "$TRAVIS_CURRENT_BRANCH"
20-
21-
script:
22-
- npm run lint
23-
- npm run test
24-
- npm run build
25-
- npm run test:e2e:ci
26-
- npm run coveralls
27-
- 'if [ -n "$SONAR_TOKEN" ]; then sonar-scanner -Dsonar.login=${SONAR_TOKEN}; fi'
28-
29-
deploy:
30-
provider: npm
31-
32-
api_key: "$NPM_TOKEN"
33-
edge: true
34-
on:
35-
tags: true
36-
skip_cleanup: true
1+
version: ~> 1.0
2+
import: mocks-server/ci-cd:.travis-build-deploy.yml@master

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
### Fixed
1111
### Removed
1212

13+
## [2.0.0] - 2020-03-01
14+
### Changed
15+
- chore: Project migrated from @mocks-server/admin-api-client
16+
- chore(deps): [BREAKING CHANGE] Updated @data-provider/core to v2. Not compatible with projects using v1.
17+
- chore(deps): [BREAKING CHANGE] Moved @data-provider/axios dependency to peer-dependencies.
18+
- chore(umd): [BREAKING CHANGE] Renamed umd global variable to "mocksServerAdminApiClientDataProvider"
19+
20+
## [1.0.3] - 2020-01-26
21+
### Changed
22+
- Update dependencies
23+
1324
## [1.0.2] - 2020-01-12
1425
### Changed
1526
- Update dependencies

README.md

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
[![Build status][travisci-image]][travisci-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Quality Gate][quality-gate-image]][quality-gate-url]
22

3-
[![NPM dependencies][npm-dependencies-image]][npm-dependencies-url] [![Greenkeeper badge](https://badges.greenkeeper.io/mocks-server/admin-api-client.svg)](https://greenkeeper.io/) [![Last commit][last-commit-image]][last-commit-url] [![Last release][release-image]][release-url]
3+
[![NPM dependencies][npm-dependencies-image]][npm-dependencies-url] [![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com) [![Last commit][last-commit-image]][last-commit-url] [![Last release][release-image]][release-url]
44

55
[![NPM downloads][npm-downloads-image]][npm-downloads-url] [![License][license-image]][license-url]
66

77

8-
# Mocks-server administration api client
8+
# Mocks-server administration api client built with @data-provider
99

1010
This package contains methods for administrating the mocks-server _(through the [@mocks-server/plugin-admin-api](https://github.com/mocks-server/plugin-admin-api) RESTful API)_.
1111

12-
Built using [@data-provider](https://github.com/data-provider), it can be used in Node.js, browsers, and is also compatible with @data-provider connectors, such as [@data-provider/connector-react](https://github.com/data-provider/connector-react), so can be easily integrated with frameworks.
12+
Built using [@data-provider](https://github.com/data-provider), it can be used in Node.js, browsers, and it is also compatible with other @data-provider packages, such as [@data-provider/react](https://github.com/data-provider/react), so can be easily integrated with frameworks.
13+
14+
## Installation
15+
16+
```bash
17+
npm i --save redux @data-provider/core @data-provider/axios @mocks-server/admin-api-client-data-provider
18+
```
1319

1420
## Usage with promises
1521

1622
All methods described in the [Api](#api) (expect the `config` method) return Promises when executed:
1723

1824
```js
19-
import { about, settings } from "@mocks-server/admin-api-client";
25+
import { about, settings } from "@mocks-server/admin-api-client-data-provider";
2026

2127
const example = async () => {
2228
const { version } = await about.read();
@@ -37,7 +43,7 @@ example();
3743

3844
## Usage with data-provider
3945

40-
Exported properties `about`, `settings`, `behaviors`, `behaviorsModel`, `fixtures` and `fixturesModel` are [@data-provider/axios](https://github.com/data-provider/axios) providers, so can be used to define @data-provider Selectors. Methods can also be connected to frameworks using @data-provider connectors, such as [@data-provider/connector-react](https://github.com/data-provider/connector-react).
46+
Exported properties `about`, `settings`, `behaviors`, `behaviorsModel`, `fixtures` and `fixturesModel` are [@data-provider/axios](https://github.com/data-provider/axios) providers, so can be used to define @data-provider Selectors. Methods can also be connected to frameworks using another @data-provider packages, such as [@data-provider/react](https://github.com/data-provider/react).
4147

4248
## Api
4349

@@ -46,10 +52,10 @@ Exported properties `about`, `settings`, `behaviors`, `behaviorsModel`, `fixture
4652
* `settings.update(settingsObject)` - Updates @mocks-server settings. A settings object has to be provided. Read the [@mocks-server configuration documentation](https://www.mocks-server.org/docs/configuration-options) for further info.
4753
* `behaviors.read()` - Returns collection of available behaviors.
4854
* `behavior(behaviorName).read()` - Returns an specific behavior.
49-
* `behaviorsModel.byName(behaviorName).read()` - Returns an specific behavior.
55+
* `behaviorsModel.queries.byName(behaviorName).read()` - Returns an specific behavior.
5056
* `fixtures.read()` - Returns collection of available fixtures.
5157
* `fixture(fixtureId).read()` - Returns an specific fixture.
52-
* `fixturesModel.byId(fixtureId).read()` - Returns an specific fixture.
58+
* `fixturesModel.queries.byId(fixtureId).read()` - Returns an specific fixture.
5359

5460
## Configuration
5561

@@ -58,7 +64,7 @@ By default, the client is configured to request to http://localhost:3100/admin,
5864
You can change both the base url of the "@mocks-server", and the base api path of the "@mocks-server/plugin-admin-api" using the `config` method:
5965

6066
```js
61-
import { config } from "@mocks-server/admin-api-client";
67+
import { config } from "@mocks-server/admin-api-client-data-provider";
6268

6369
config({
6470
apiPath: "/foo-admin",
@@ -73,19 +79,19 @@ Please read the [contributing guidelines](.github/CONTRIBUTING.md) and [code of
7379

7480
[plugin-admin-api-url]: https://github.com/mocks-server/plugin-admin-api
7581

76-
[coveralls-image]: https://coveralls.io/repos/github/mocks-server/admin-api-client/badge.svg
77-
[coveralls-url]: https://coveralls.io/github/mocks-server/admin-api-client
78-
[travisci-image]: https://travis-ci.com/mocks-server/admin-api-client.svg?branch=master
79-
[travisci-url]: https://travis-ci.com/mocks-server/admin-api-client
80-
[last-commit-image]: https://img.shields.io/github/last-commit/mocks-server/admin-api-client.svg
81-
[last-commit-url]: https://github.com/mocks-server/admin-api-client/commits
82-
[license-image]: https://img.shields.io/npm/l/@mocks-server/admin-api-client.svg
83-
[license-url]: https://github.com/mocks-server/admin-api-client/blob/master/LICENSE
84-
[npm-downloads-image]: https://img.shields.io/npm/dm/@mocks-server/admin-api-client.svg
85-
[npm-downloads-url]: https://www.npmjs.com/package/@mocks-server/admin-api-client
86-
[npm-dependencies-image]: https://img.shields.io/david/mocks-server/admin-api-client.svg
87-
[npm-dependencies-url]: https://david-dm.org/mocks-server/admin-api-client
88-
[quality-gate-image]: https://sonarcloud.io/api/project_badges/measure?project=mocks-server-admin-api-client&metric=alert_status
89-
[quality-gate-url]: https://sonarcloud.io/dashboard?id=mocks-server-admin-api-client
90-
[release-image]: https://img.shields.io/github/release-date/mocks-server/admin-api-client.svg
91-
[release-url]: https://github.com/mocks-server/admin-api-client/releases
82+
[coveralls-image]: https://coveralls.io/repos/github/mocks-server/admin-api-client-data-provider/badge.svg
83+
[coveralls-url]: https://coveralls.io/github/mocks-server/admin-api-client-data-provider
84+
[travisci-image]: https://travis-ci.com/mocks-server/admin-api-client-data-provider.svg?branch=master
85+
[travisci-url]: https://travis-ci.com/mocks-server/admin-api-client-data-provider
86+
[last-commit-image]: https://img.shields.io/github/last-commit/mocks-server/admin-api-client-data-provider.svg
87+
[last-commit-url]: https://github.com/mocks-server/admin-api-client-data-provider/commits
88+
[license-image]: https://img.shields.io/npm/l/@mocks-server/admin-api-client-data-provider.svg
89+
[license-url]: https://github.com/mocks-server/admin-api-client-data-provider/blob/master/LICENSE
90+
[npm-downloads-image]: https://img.shields.io/npm/dm/@mocks-server/admin-api-client-data-provider.svg
91+
[npm-downloads-url]: https://www.npmjs.com/package/@mocks-server/admin-api-client-data-provider
92+
[npm-dependencies-image]: https://img.shields.io/david/mocks-server/admin-api-client-data-provider.svg
93+
[npm-dependencies-url]: https://david-dm.org/mocks-server/admin-api-client-data-provider
94+
[quality-gate-image]: https://sonarcloud.io/api/project_badges/measure?project=mocks-server-admin-api-client-data-provider&metric=alert_status
95+
[quality-gate-url]: https://sonarcloud.io/dashboard?id=mocks-server-admin-api-client-data-provider
96+
[release-image]: https://img.shields.io/github/release-date/mocks-server/admin-api-client-data-provider.svg
97+
[release-url]: https://github.com/mocks-server/admin-api-client-data-provider/releases

greenkeeper.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)