Skip to content

Commit

Permalink
Repo consolidation (#60)
Browse files Browse the repository at this point in the history
* test

* Linting

* Upgraded typescript version

* Updated tslint

* Upgraded husky

* Upgraded node version

* v0.20.0

* Upgraded lerna

* Small change to trigger release

* v0.21.0

* Upgraded jest
  • Loading branch information
ryanxyo committed Jan 30, 2019
1 parent 8a7b48e commit 3581b29
Show file tree
Hide file tree
Showing 157 changed files with 9,145 additions and 459 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,10 @@ dist/
# data
data/
archivist-db/
db.json
db.json
diviner-db/
ipfs/

# Scratch files
scratch.ts
scratch.js
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.13.0
10.15.1
19 changes: 17 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
{
"cSpell.words": [
"Deserializer",
"cSpell.words": [ 'Deserializer',
"Deserializers",
"Findables",
"ISCSC",
"IXyo",
"Multiaddr",
"SCSC",
"Serializables",
"Truthy",
"blockchain",
"bytecode",
"cryptographically",
"deserializable",
"deserialization",
"deserialize",
"deserialized",
"deserializing",
"ecdsa",
"ethereum",
"graphql",
"hasher",
"ipfs",
"keccak",
"kovan",
"lerna",
"leveldb",
"leveldown",
"openzeppelin",
"pojo",
"promisify",
"repo",
Expand All @@ -28,7 +36,10 @@
"serializable",
"serializer",
"serializers",
"struct",
"transpiled",
"transpiles",
"workspaces",
"xyfindables"
],
"typescript.tsdk": "node_modules/typescript/lib",
Expand All @@ -41,5 +52,9 @@
"**/dist": true,
"**/node_modules": true,
"**/.gitignore": true,
"**/archivist-db": true,
"**/diviner-db": true,
"**/logs": true,
"**/coverage": true
}
}
24 changes: 0 additions & 24 deletions .vscode/tasks.json

This file was deleted.

2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"packages": [
"packages/*"
],
"version": "0.19.1"
"version": "0.21.0"
}
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
"release": "lerna publish",
"test": "export NODE_ENV=test && jest --no-cache --forceExit --coverage --verbose --detectOpenHandles",
"tslint": "tslint -c tslint.json -p packages/tsconfig.json",
"clean": "node scripts/clean.js"
"clean": "node scripts/clean.js",
"start:diviner": "NODE_ENV=develop node packages/app-diviner/bin/xyo-diviner",
"start:archivist": "NODE_ENV=develop node packages/app-archivist/bin/xyo-archivist"
},
"devDependencies": {
"@xyo-network/config-tslint": "^0.1.6",
"husky": "^1.1.1",
"lerna": "^3.4.3",
"tslint": "^5.1.0",
"tslint-config-airbnb": "^5.11.1",
"typescript": "^3.1.6"
"husky": "^1.3.1",
"lerna": "^3.10.7",
"tslint": "^5.12.1",
"typescript": "^3.2.2"
},
"husky": {
"hooks": {
Expand Down
21 changes: 21 additions & 0 deletions packages/about-diviner/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[logo]: https://www.xy.company/img/home/logo_xy.png

![logo]

# Diviner Graphql API

Implements the the Diviner graphql API

## Install

Using yarn

```sh
yarn add @xyo-network/diviner-graphql-api
```

Using npm

```sh
npm install @xyo-network/diviner-graphql-api --save
```
21 changes: 21 additions & 0 deletions packages/about-diviner/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "@xyo-network/about-diviner",
"version": "0.21.0",
"description": "The about description for a diviner",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"author": "Ryan Pillsbury",
"license": "MIT",
"dependencies": {
"@xyo-network/scsc": "^0.21.0"
},
"devDependencies": {
"@types/jest": "^23.3.1",
"@types/node": "^10.7.1",
"jest": "^23.6.0",
"ts-jest": "^23.10.5",
"ts-node": "^7.0.1",
"tslint": "^5.12.1",
"typescript": "^3.2.2"
}
}
21 changes: 21 additions & 0 deletions packages/about-diviner/src/@types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* @Author: XY | The Findables Company <ryanxyo>
* @Date: Wednesday, 19th December 2018 1:17:53 pm
* @Email: developer@xyfindables.com
* @Filename: index.ts
* @Last modified by: ryanxyo
* @Last modified time: Monday, 28th January 2019 4:12:14 pm
* @License: All Rights Reserved
* @Copyright: Copyright XY | The Findables Company
*/

import { IXyoSCSCDescription } from '@xyo-network/scsc'

export interface IXyoAboutDiviner {
name: string
version: string,
url: string,
address: string,
seeds: string[],
scsc: IXyoSCSCDescription
}
13 changes: 13 additions & 0 deletions packages/about-diviner/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* @Author: XY | The Findables Company <ryanxyo>
* @Date: Wednesday, 19th December 2018 12:56:51 pm
* @Email: developer@xyfindables.com
* @Filename: index.ts
* @Last modified by: ryanxyo
* @Last modified time: Monday, 28th January 2019 4:12:20 pm
* @License: All Rights Reserved
* @Copyright: Copyright XY | The Findables Company
*/

export { IXyoAboutDiviner } from './@types'
export { XyoAboutDiviner } from './xyo-about-diviner'
26 changes: 26 additions & 0 deletions packages/about-diviner/src/xyo-about-diviner.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* @Author: XY | The Findables Company <ryanxyo>
* @Date: Wednesday, 19th December 2018 1:11:13 pm
* @Email: developer@xyfindables.com
* @Filename: xyo-about-diviner.ts
* @Last modified by: ryanxyo
* @Last modified time: Monday, 28th January 2019 4:12:27 pm
* @License: All Rights Reserved
* @Copyright: Copyright XY | The Findables Company
*/

import { IXyoAboutDiviner } from './@types'
import { IXyoSCSCDescription } from '@xyo-network/scsc'

export class XyoAboutDiviner implements IXyoAboutDiviner {

public readonly name = 'Diviner'

constructor(
public readonly version: string,
public readonly url: string,
public readonly address: string,
public readonly seeds: string[],
public readonly scsc: IXyoSCSCDescription
) {}
}
27 changes: 27 additions & 0 deletions packages/about-diviner/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"lib": ["esnext"],
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"strict": true,
"composite": true,
"esModuleInterop": true,
"noImplicitAny": true,
"moduleResolution": "node",
"outDir": "dist",
"rootDir": "src"
},
"exclude": [
"node_modules",
"src/**/test/*",
"src/**/spec",
"src/**/*.spec.ts"
],
"include": ["src/**/*"],
"references": [
{"path": "../scsc"}
]
}
16 changes: 8 additions & 8 deletions packages/about-me/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@xyo-network/about-me",
"version": "0.19.0",
"version": "0.21.0",
"description": "Provides a service for sharing information about oneself with other nodes in the XYO network",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"author": "Ryan Pillsbury",
"license": "MIT",
"dependencies": {
"@xyo-network/base": "^0.19.0",
"@xyo-network/ip-service": "^0.19.0",
"@xyo-network/peer-discovery": "^0.19.0",
"@xyo-network/signing": "^0.19.0",
"@xyo-network/base": "^0.21.0",
"@xyo-network/ip-service": "^0.21.0",
"@xyo-network/peer-discovery": "^0.21.0",
"@xyo-network/signing": "^0.21.0",
"lodash": "^4.17.11",
"uuid": "^3.3.2"
},
Expand All @@ -20,9 +20,9 @@
"@types/node": "^10.7.1",
"@types/uuid": "^3.4.4",
"jest": "^23.6.0",
"ts-jest": "^23.1.3",
"ts-jest": "^23.10.5",
"ts-node": "^7.0.1",
"tslint": "^5.11.0",
"typescript": "^3.1.6"
"tslint": "^5.12.1",
"typescript": "^3.2.2"
}
}
65 changes: 65 additions & 0 deletions packages/api-archivist-graphql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[logo]: https://www.xy.company/img/home/logo_xy.png

![logo]

# API Archivist GraphQL

This package provides a graphql service that implements the archivist API. This API is largely used by diviners to query the archivist's underlying data-set. Additionally, it can be used by other nodes in the XYO network for discovery in the peer to peer network.

## Getting started

### Clone repository

```sh
git clone https://github.com/XYOracleNetwork/api-archivist-graphql.git
```

### Install dependencies

After cloning the repository, change directory to the folder that houses the repository.

```sh
cd api-archivist-graphql
```

Once you've switched to the repository directory, install the dependencies. We prefer `yarn` but `npm` works just as well.

```sh
yarn install
```

## Using API Archivist GraphQL as a dependency

```sh
npm install @xyo-network/api-archivist-graphql
```

or with yarn

```sh
yarn add @xyo-network/api-archivist-graphql
```

## Developer Guide

Developers should conform to git flow workflow. Additionally, we should try to make sure
every commit builds. Commit messages should be meaningful serve as a meta history for the
repository. Please squash meaningless commits before submitting a pull-request.

There is git hook on commits to validate the project builds. If you'd like to commit your changes
while developing locally and want to skip this step you can use the `--no-verify` commit option.

i.e.

```sh
git commit --no-verify -m "COMMIT MSG"
```

## License

Only for internal XY Company use at this time

## Credits

Made with ❤️
by [XYO](https://xyo.network)
13 changes: 13 additions & 0 deletions packages/api-archivist-graphql/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
globals: {
"ts-jest": {
tsConfig: "tsconfig.json"
}
},
moduleFileExtensions: ["ts", "js"],
transform: {
"^.+\\.(ts|tsx)$": "ts-jest"
},
testMatch: ["**/spec/**/*.spec.(ts)"],
testEnvironment: "node"
};
Loading

0 comments on commit 3581b29

Please sign in to comment.