Skip to content

Commit

Permalink
Merge pull request #558 from FoalTS/v1-3-0
Browse files Browse the repository at this point in the history
v1.3.0
  • Loading branch information
LoicPoullain committed Dec 3, 2019
2 parents f711314 + 1a89b11 commit 2920e26
Show file tree
Hide file tree
Showing 393 changed files with 23,605 additions and 8,603 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.MD
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ You can also run the tests of only one package by going to its directory and run

### General guidelines

Do not install any new dependencies unless they have been approved.
Do not install any new dependencies unless they have been approved. Dependencies (except peer ones) should point to *minor* versions (`~1.2.0` instead of `^1.2.0`).

When writting code, use the *Test-Driven Developpement (TDD)* approach.
1. Write a test.
Expand Down
58 changes: 55 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,52 @@ jobs:
matrix:
node-version: [8.x, 10.x]

env:
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }}
AUTH0_AUDIENCE: ${{ secrets.AUTH0_AUDIENCE }}
AUTH0_TOKEN: ${{ secrets.AUTH0_TOKEN }}

services:
mysql:
image: mysql:5.7.10
ports:
# Another version of MySQL is installed on the vm and already uses the port 3306.
- 3308:3306
env:
MYSQL_ROOT_PASSWORD: admin
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_DATABASE: test

mariadb:
image: mariadb:10.1.16
ports:
- 3307:3306
env:
MYSQL_ROOT_PASSWORD: admin
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_DATABASE: test

postgres:
image: postgres:9.6.1
ports:
- 5432:5432
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test

mongodb:
image: mongo:3.4.1
ports:
- 27017:27017

redis:
image: redis:4.0.14
ports:
- 6379:6379

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -22,12 +68,18 @@ jobs:
- name: Install project dependencies
run: npm install
- name: Install package dependencies and build packages
run: |
lerna bootstrap
cd packages/cli && npm link && cd ../..
run: lerna bootstrap
- name: Create CLI symlink in the global folder
run: npm link
working-directory: packages/cli
- name: Check package linting
run: npm run lint
- name: Run unit and acceptance tests (TypeScript)
run: lerna run --no-bail test
- name: Run acceptance tests (Bash)
run: ./e2e_test.sh
- name: Send code coverage report to Codecov
uses: codecov/codecov-action@v1.0.3
with:
token: ${{secrets.CODECOV_TOKEN}}
file: packages/core/coverage/*.json
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<a href="https://badge.fury.io/js/%40foal%2Fcore">
<img src="https://badge.fury.io/js/%40foal%2Fcore.svg" alt="npm version">
</a>
<a href="https://travis-ci.org/FoalTS/foal">
<img src="https://travis-ci.org/FoalTS/foal.svg?branch=add-travis" alt="Build Status">
<a href="https://github.com/FoalTS/foal/actions">
<img src="https://github.com/FoalTS/foal/workflows/Test/badge.svg" alt="Build Status">
</a>
<a href="https://codecov.io/github/FoalTS/foal">
<img src="https://codecov.io/gh/FoalTS/foal/branch/master/graphs/badge.svg" alt="Code coverage">
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ services:
mysql:
image: "mysql:5.7.10"
ports:
- "3306:3306"
# Another version of MySQL is installed on the vm and already uses the port 3306.
- "3308:3306"
environment:
MYSQL_ROOT_PASSWORD: "admin"
MYSQL_USER: "test"
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)
![node version](https://img.shields.io/badge/node-%3E%3D8-brightgreen.svg)
![npm version](https://badge.fury.io/js/%40foal%2Fcore.svg)
![Build Status](https://travis-ci.org/FoalTS/foal.svg?branch=add-travis)
[![Actions Status](https://github.com/FoalTS/foal/workflows/Test/badge.svg)](https://github.com/FoalTS/foal/actions)
![Code coverage](https://codecov.io/gh/FoalTS/foal/branch/master/graphs/badge.svg)
![Known Vulnerabilities](https://snyk.io/test/github/foalts/foal/badge.svg)
![Commit activity](https://img.shields.io/github/commit-activity/y/FoalTS/foal.svg)
Expand Down
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
* [Passwords](./authentication-and-access-control/password-management.md)
* [Session Tokens (authentication)](./authentication-and-access-control/session-tokens.md)
* [JSON Web Tokens (authentication)](./authentication-and-access-control/jwt.md)
* [Social Auth](./authentication-and-access-control/social-auth.md)
* [Administrators & Roles](./authentication-and-access-control/administrators-and-roles.md)
* [Groups & Permissions](./authentication-and-access-control/groups-and-permissions.md)
* [Validation & Sanitization](./validation-and-sanitization.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Represent an object that was expected to be found but that does not exist.

**new ObjectDoesNotExist**(content?: *`any`*): [ObjectDoesNotExist](_common_errors_object_does_not_exist_.objectdoesnotexist.md)

*Defined in [common/errors/object-does-not-exist.ts:9](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/common/errors/object-does-not-exist.ts#L9)*
*Defined in [common/errors/object-does-not-exist.ts:9](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/common/errors/object-does-not-exist.ts#L9)*

**Parameters:**

Expand All @@ -61,7 +61,7 @@ ___

**● content**: *`any`*

*Defined in [common/errors/object-does-not-exist.ts:11](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/common/errors/object-does-not-exist.ts#L11)*
*Defined in [common/errors/object-does-not-exist.ts:11](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/common/errors/object-does-not-exist.ts#L11)*

___
<a id="isobjectdoesnotexist"></a>
Expand All @@ -70,7 +70,7 @@ ___

**● isObjectDoesNotExist**: *`true`* = true

*Defined in [common/errors/object-does-not-exist.ts:9](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/common/errors/object-does-not-exist.ts#L9)*
*Defined in [common/errors/object-does-not-exist.ts:9](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/common/errors/object-does-not-exist.ts#L9)*

___
<a id="message"></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Represent the prohibition to perform an action that was expected to be accessibl

**new PermissionDenied**(content?: *`any`*): [PermissionDenied](_common_errors_permission_denied_.permissiondenied.md)

*Defined in [common/errors/permission-denied.ts:9](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/common/errors/permission-denied.ts#L9)*
*Defined in [common/errors/permission-denied.ts:9](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/common/errors/permission-denied.ts#L9)*

**Parameters:**

Expand All @@ -61,7 +61,7 @@ ___

**● content**: *`any`*

*Defined in [common/errors/permission-denied.ts:11](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/common/errors/permission-denied.ts#L11)*
*Defined in [common/errors/permission-denied.ts:11](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/common/errors/permission-denied.ts#L11)*

___
<a id="ispermissiondenied"></a>
Expand All @@ -70,7 +70,7 @@ ___

**● isPermissionDenied**: *`true`* = true

*Defined in [common/errors/permission-denied.ts:9](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/common/errors/permission-denied.ts#L9)*
*Defined in [common/errors/permission-denied.ts:9](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/common/errors/permission-denied.ts#L9)*

___
<a id="message"></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Represent an incorrect data format.

**new ValidationError**(content?: *`any`*): [ValidationError](_common_errors_validation_error_.validationerror.md)

*Defined in [common/errors/validation-error.ts:9](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/common/errors/validation-error.ts#L9)*
*Defined in [common/errors/validation-error.ts:9](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/common/errors/validation-error.ts#L9)*

**Parameters:**

Expand All @@ -61,7 +61,7 @@ ___

**● content**: *`any`*

*Defined in [common/errors/validation-error.ts:11](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/common/errors/validation-error.ts#L11)*
*Defined in [common/errors/validation-error.ts:11](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/common/errors/validation-error.ts#L11)*

___
<a id="isvalidationerror"></a>
Expand All @@ -70,7 +70,7 @@ ___

**● isValidationError**: *`true`* = true

*Defined in [common/errors/validation-error.ts:9](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/common/errors/validation-error.ts#L9)*
*Defined in [common/errors/validation-error.ts:9](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/common/errors/validation-error.ts#L9)*

___
<a id="message"></a>
Expand Down
30 changes: 15 additions & 15 deletions docs/api/core/classes/_core_config_.config.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This class can also be used as a service.

**● yaml**: *`any`*

*Defined in [core/config.ts:91](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L91)*
*Defined in [core/config.ts:91](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L91)*

___

Expand All @@ -63,7 +63,7 @@ ___

**get**<`T`>(key: *`string`*, defaultValue?: *[T]()*): `T`

*Defined in [core/config.ts:225](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L225)*
*Defined in [core/config.ts:225](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L225)*

Access environment variables and configuration files.

Expand Down Expand Up @@ -102,7 +102,7 @@ ___

**clearCache**(): `void`

*Defined in [core/config.ts:83](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L83)*
*Defined in [core/config.ts:83](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L83)*

Clear the cache of the loaded files.

Expand All @@ -119,7 +119,7 @@ ___

**convertType**(value: *`string`*): `boolean` \| `number` \| `string`

*Defined in [core/config.ts:172](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L172)*
*Defined in [core/config.ts:172](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L172)*

**Parameters:**

Expand All @@ -136,7 +136,7 @@ ___

**dotToUnderscore**(str: *`string`*): `string`

*Defined in [core/config.ts:165](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L165)*
*Defined in [core/config.ts:165](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L165)*

**Parameters:**

Expand All @@ -153,7 +153,7 @@ ___

**get**<`T`>(key: *`string`*, defaultValue?: *[T]()*): `T`

*Defined in [core/config.ts:39](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L39)*
*Defined in [core/config.ts:39](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L39)*

Access environment variables and configuration files.

Expand Down Expand Up @@ -194,7 +194,7 @@ ___

**getValue**(config: *`object`*, propertyPath: *`string`*): `any`

*Defined in [core/config.ts:189](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L189)*
*Defined in [core/config.ts:189](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L189)*

**Parameters:**

Expand All @@ -212,7 +212,7 @@ ___

**getYAMLInstance**(): `false` \| `any`

*Defined in [core/config.ts:150](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L150)*
*Defined in [core/config.ts:150](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L150)*

**Returns:** `false` \| `any`

Expand All @@ -223,7 +223,7 @@ ___

**readDotEnvValue**(name: *`string`*): `string` \| `boolean` \| `number` \| `undefined`

*Defined in [core/config.ts:98](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L98)*
*Defined in [core/config.ts:98](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L98)*

**Parameters:**

Expand All @@ -240,7 +240,7 @@ ___

**readJSONValue**(path: *`string`*, key: *`string`*): `any`

*Defined in [core/config.ts:118](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L118)*
*Defined in [core/config.ts:118](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L118)*

**Parameters:**

Expand All @@ -258,7 +258,7 @@ ___

**readYAMLValue**(path: *`string`*, key: *`string`*): `any`

*Defined in [core/config.ts:131](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L131)*
*Defined in [core/config.ts:131](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L131)*

**Parameters:**

Expand All @@ -279,15 +279,15 @@ ___

**cache**: *`object`*

*Defined in [core/config.ts:92](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L92)*
*Defined in [core/config.ts:92](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L92)*

<a id="cache.dotenv"></a>

#### dotEnv

**● dotEnv**: *`undefined`* = undefined

*Defined in [core/config.ts:93](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L93)*
*Defined in [core/config.ts:93](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L93)*

___
<a id="cache.json"></a>
Expand All @@ -296,7 +296,7 @@ ___

**● json**: *`object`*

*Defined in [core/config.ts:94](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L94)*
*Defined in [core/config.ts:94](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L94)*

#### Type declaration

Expand All @@ -307,7 +307,7 @@ ___

**● yaml**: *`object`*

*Defined in [core/config.ts:95](https://github.com/FoalTS/foal/blob/538afb23/packages/core/src/core/config.ts#L95)*
*Defined in [core/config.ts:95](https://github.com/FoalTS/foal/blob/70cc46bd/packages/core/src/core/config.ts#L95)*

#### Type declaration

Expand Down

0 comments on commit 2920e26

Please sign in to comment.