-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
version: 2 | ||
machine: | ||
services: | ||
- docker | ||
|
||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:8.15 | ||
environment: | ||
- NPM_CONFIG_LOGLEVEL: warn | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
- setup_remote_docker: | ||
docker_layer_caching: true | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package-lock.json" }} | ||
- run: | ||
name: Installing Dependencies | ||
command: npm install | ||
- run: | ||
name: Pruning Dependencies | ||
command: npm prune | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "package-lock.json" }} | ||
- run: | ||
name: Compiling Code | ||
command: npm run build | ||
- run: | ||
name: Linting Code | ||
command: npm run lint | ||
- deploy: | ||
name: Semantic Release | ||
command: npm run semantic-release |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare module 'atob' { | ||
const x: (stringToEncode: string) => string; | ||
export = x; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare module 'btoa' { | ||
const x: (stringToEncode: string) => string; | ||
export = x; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
# foundation | ||
# foundation | ||
|
||
## Installation | ||
`npm i -D @js-items/foundation` | ||
|
||
This package is heavily inspired by: | ||
- [js-entity-repos](https://github.com/js-entity-repos) | ||
|
||
Credits: | ||
- [ryansmith94](https://github.com/ryansmith94) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { BaseError } from "make-error"; | ||
export default class ConflictingItemError extends BaseError { | ||
readonly itemName: string; | ||
readonly itemId: string; | ||
constructor(itemName: string, itemId: string); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { BaseError } from "make-error"; | ||
export default class ItemNotFoundError extends BaseError { | ||
readonly itemName: string; | ||
readonly itemId: string; | ||
constructor(itemName: string, itemId: string); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import CountItems from "./functions/countItems"; | ||
import CreateItem from "./functions/createItem"; | ||
import DeleteItem from "./functions/deleteItem"; | ||
import DeleteItems from "./functions/deleteItems"; | ||
import GetItem from "./functions/getItem"; | ||
import GetItems from "./functions/getItems"; | ||
import ReplaceItem from "./functions/replaceItem"; | ||
import UpdateItem from "./functions/updateItem"; | ||
import Item from "./interfaces/item"; | ||
export default interface Facade<I extends Item> { | ||
readonly createItem: CreateItem<I>; | ||
readonly getItem: GetItem<I>; | ||
readonly getItems: GetItems<I>; | ||
readonly deleteItem: DeleteItem<I>; | ||
readonly deleteItems: DeleteItems<I>; | ||
readonly updateItem: UpdateItem<I>; | ||
readonly replaceItem: ReplaceItem<I>; | ||
readonly countItems: CountItems<I>; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Filter from '../../interfaces/filter'; | ||
import Item from '../../interfaces/item'; | ||
export interface Options<I extends Item> { | ||
readonly filter?: Filter<I>; | ||
} | ||
export interface Result { | ||
readonly count: number; | ||
} | ||
export declare type CountItems<I extends Item> = (options: Options<I>) => Promise<Result>; | ||
export default CountItems; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Options from "../../interfaces/options"; | ||
import { TestItem } from "../utils/testItem"; | ||
declare const _default: ({ facade }: Options<TestItem>) => void; | ||
export default _default; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Item from '../../interfaces/item'; | ||
export interface Options<I extends Item> { | ||
readonly id: string; | ||
readonly item: I; | ||
} | ||
export interface Result<I extends Item> { | ||
readonly item: I; | ||
} | ||
export declare type CreateItems<I extends Item> = (options: Options<I>) => Promise<Result<I>>; | ||
export default CreateItems; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Options from "../../interfaces/options"; | ||
import { TestItem } from "../utils/testItem"; | ||
declare const _default: ({ facade }: Options<TestItem>) => void; | ||
export default _default; |