Skip to content

Commit 41b4f78

Browse files
committed
initial commit
1 parent 5500e12 commit 41b4f78

File tree

32 files changed

+12757
-2
lines changed

32 files changed

+12757
-2
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.16
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": 10,
3+
"reporters": ["console", "badge"],
4+
"absolute": true,
5+
"gitignore": true,
6+
"output": "./assets"
7+
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 js-items
3+
Copyright (c) 2019 @js-items/ky
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
11
# ky
2-
Concrete implementation of js-items for ky
2+
3+
[![CircleCI](https://circleci.com/gh/js-items/ky.svg?style=svg)](https://circleci.com/gh/js-items/ky)
4+
[![codecov](https://codecov.io/gh/js-items/ky/branch/master/graph/badge.svg)](https://codecov.io/gh/js-items/ky)
5+
![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/js-items/ky.svg)
6+
![jscpd](assets/jscpd-badge.svg)
7+
8+
ky implementation of js-items
9+
10+
- cursor based pagination operates using `before` and `after`
11+
- optional `enveloping` response (envelope: boolean) for clients not capable of working with headers and JSONP
12+
- possibility to `override` each `request handler`
13+
- by default all methods request response to be `pretty` which improves readability, you can disable that by query param (pretty: boolean)
14+
15+
## Installation:
16+
17+
`npm i @js-items/ky --save`
18+
19+
Credits:
20+
21+
- [ryansmith94](https://github.com/ryansmith94)
22+
- [best-practices-for-a-pragmatic-restful-api](https://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api)

assets/jscpd-badge.svg

Lines changed: 19 additions & 0 deletions
Loading

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)