Skip to content

Commit bcba789

Browse files
committed
initial commit
1 parent 1050992 commit bcba789

18 files changed

+12306
-1
lines changed

.circleci/config.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: 2
2+
machine:
3+
services:
4+
- docker
5+
jobs:
6+
build:
7+
docker:
8+
- image: circleci/node:8.15
9+
environment:
10+
- NPM_CONFIG_LOGLEVEL: warn
11+
working_directory: ~/repo
12+
steps:
13+
- checkout
14+
- setup_remote_docker:
15+
docker_layer_caching: true
16+
- restore_cache:
17+
keys:
18+
- v1-dependencies-{{ checksum "package-lock.json" }}
19+
- run:
20+
name: Installing dependencies
21+
command: npm install
22+
- run:
23+
name: Pruning dependencies
24+
command: npm prune
25+
- save_cache:
26+
paths:
27+
- node_modules
28+
key: v1-dependencies-{{ checksum "package-lock.json" }}
29+
- run:
30+
name: Compiling code
31+
command: npm run build
32+
- run:
33+
name: Testing code
34+
command: npm run test
35+
- run:
36+
name: Linting code
37+
command: npm run lint
38+
- run:
39+
name: Checking code duplication
40+
command: npm run duplication
41+
- deploy:
42+
name: Semantic release
43+
command: npm run semantic-release

.jscpd.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"threshold": 5,
3+
"reporters": ["console", "badge"],
4+
"absolute": true,
5+
"gitignore": true,
6+
"output": "./assets"
7+
}

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
11
# express
2-
Concrete implementation of js-items for express.
2+
3+
[![CircleCI](https://circleci.com/gh/js-items/express.svg?style=svg)](https://circleci.com/gh/js-items/express)
4+
[![codecov](https://codecov.io/gh/js-items/express/branch/master/graph/badge.svg)](https://codecov.io/gh/js-items/express)
5+
![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/js-items/express.svg)
6+
![jscpd](assets/jscpd-badge.svg)
7+
[![Known Vulnerabilities](https://snyk.io/test/github/js-items/express/badge.svg?targetFile=package.json)](https://snyk.io/test/github/js-items/express?targetFile=package.json)
8+
9+
express.js implementation of js-items
10+
11+
There is a fantastic alternative to this project (and @js-items/express is based on it):
12+
[js-entity-repos/express](https://github.com/js-entity-repos/express).
13+
14+
The main differences to the @js-entity-repos/express:
15+
- different naming convention: using `item` instead of `entity`
16+
- cursor based pagination operates using `before` and `after` instead of `cursor` and `direction`
17+
- enveloping response (GET /items) which allows client to more easily discover the pagination and metadata
18+
- transactions handlers for each request handler - this could be used for i.e. permissions checks
19+
- possibility to override each request handler
20+
- no /count route as not restful
21+
22+
## Installation:
23+
`npm i @js-items/express --save`
24+
25+
Credits:
26+
- [ryansmith94](https://github.com/ryansmith94)

jest.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const baseConfig = require("@kube-js/tscommons/configs/jest.config.js");
2+
3+
module.exports = {
4+
...baseConfig
5+
};

0 commit comments

Comments
 (0)