Skip to content

Commit

Permalink
feat(deployment): initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon-mario committed Mar 3, 2019
1 parent 9ed1dad commit f4c19f2
Show file tree
Hide file tree
Showing 190 changed files with 15,497 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .circleci/config.yml
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
4 changes: 4 additions & 0 deletions @types/atob/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module 'atob' {
const x: (stringToEncode: string) => string;
export = x;
}
4 changes: 4 additions & 0 deletions @types/btoa/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module 'btoa' {
const x: (stringToEncode: string) => string;
export = x;
}
11 changes: 10 additions & 1 deletion README.md
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)
6 changes: 6 additions & 0 deletions dist/errors/conflictingItemError.d.ts
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);
}
28 changes: 28 additions & 0 deletions dist/errors/conflictingItemError.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/errors/conflictingItemError.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/errors/itemNotFoundError.d.ts
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);
}
28 changes: 28 additions & 0 deletions dist/errors/itemNotFoundError.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/errors/itemNotFoundError.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions dist/facade.d.ts
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>;
}
3 changes: 3 additions & 0 deletions dist/facade.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/facade.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions dist/functions/countItems/index.d.ts
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;
3 changes: 3 additions & 0 deletions dist/functions/countItems/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/functions/countItems/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions dist/functions/countItems/test.d.ts
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;
103 changes: 103 additions & 0 deletions dist/functions/countItems/test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/functions/countItems/test.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions dist/functions/createItem/index.d.ts
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;
3 changes: 3 additions & 0 deletions dist/functions/createItem/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/functions/createItem/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions dist/functions/createItem/test.d.ts
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;
Loading

0 comments on commit f4c19f2

Please sign in to comment.