Skip to content

Commit

Permalink
Removed @pigi/operator in favor of singular @pigi/core
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcontracts committed Jun 11, 2019
1 parent 8327614 commit 0917b38
Show file tree
Hide file tree
Showing 28 changed files with 63 additions and 253 deletions.
7 changes: 7 additions & 0 deletions packages/core/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
/* External Imports */
import path = require('path')

const rootPath = __dirname
const dbRootPath = path.join(__dirname, 'db')

export * from './src/interfaces'
export { rootPath, dbRootPath }
40 changes: 32 additions & 8 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,52 @@
{
"name": "@pigi/core",
"version": "0.0.2-alpha.1",
"description": "Plasma Group client",
"main": "build/index.js",
"files": [
"build/**/.js"
],
"scripts": {
},
"description": "Plasma Group generalized plasma client",
"keywords": [
"plasma",
"group",
"ethereum",
"client"
],
"author": "Plasma Group",
"homepage": "https://github.com/plasma-group/pigi/tree/master/packages/core#readme",
"bugs": "https://github.com/plasma-group/pigi/labels/%40pigi%2Fcore",
"license": "MIT",
"author": "Plasma Group",
"files": [
"build/**/.js"
],
"main": "build/index.js",
"repository": {
"type": "git",
"url": "https://github.com/plasma-group/pigi.git"
},
"scripts": {
"test": "mocha --require ts-node/register 'test/**/*.spec.ts'",
"lint": "tslint --format stylish --project .",
"fix": "prettier --config ./.prettierrc.js --write 'index.ts' '{src,test}/**/*.ts'",
"build": "tsc -p ."
},
"dependencies": {
"abstract-leveldown": "^6.0.3",
"axios": "^0.19.0",
"bn.js": "^4.11.8",
"body-parser": "^1.19.0",
"debug": "^4.1.1",
"eth-lib": "^0.2.8",
"express": "^4.17.1",
"uuid": "^3.3.2",
"web3": "^1.0.0-beta.55",
"web3-utils": "^1.0.0-beta.55"
},
"devDependencies": {
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.7",
"@types/node": "^12.0.7",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"mocha": "^6.1.4",
"ts-node": "^8.2.0",
"typescript": "^3.5.1"
},
"publishConfig": {
"access": "public"
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/app/common/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export * from './key/key'
export * from './bucket'
export * from './db'
export * from './iterator'
export * from './range-db'
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
RangeStore,
RangeEntry,
Endianness,
} from '../../interfaces/db/range-db.interface'
} from '../../../interfaces/common/db/range-db.interface'

/* Logging */
import debug from 'debug'
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/app/common/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './debug-logger'
export * from './misc'
export * from './range-store'
export * from './type-guards'
export * from './operator-utils'
File renamed without changes.
1 change: 1 addition & 0 deletions packages/core/src/interfaces/common/db/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './db.interface'
export * from './key.interface'
export * from './range-db.interface'
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { dbRootPath } from '../setup'

import { KeyValueStore } from '@pigi/core'

/* External Imports */
import debug from 'debug'
const log = debug('test:info:range-db')
import level = require('level')
import BigNum = require('bn.js')

/* Internal Imports */
import { LevelRangeStore } from '../../src/app/db/range-db'
import { RangeEntry } from '../../src/interfaces/db/range-db.interface'
import { dbRootPath } from '../../../setup'
import { KeyValueStore } from '../../../../src/interfaces'
import { LevelRangeStore } from '../../../../src/app/common/db/range-db'
import { RangeEntry } from '../../../../src/interfaces/common/db/range-db.interface'

const log = debug('test:info:range-db')

const addDefaultRangesToDB = async (rangeDB) => {
// Generate some ranges
Expand Down
17 changes: 14 additions & 3 deletions packages/core/test/setup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
import fs = require('fs')
import path = require('path')
import chai = require('chai')
import chaiAsPromised = require('chai-as-promised')
import { rootPath } from '../index'

const should = chai.should()
chai.use(chaiAsPromised)
const testArtifactsDir = path.join(rootPath, 'test', 'artifacts.test.tmp')
const testRootPath = path.join(testArtifactsDir, (+new Date()).toString())
const dbRootPath = path.join(testRootPath, 'db')

export { should }
// If these directories don't exist, create them.
fs.mkdirSync(testArtifactsDir, { recursive: true })
fs.mkdirSync(testRootPath, { recursive: true })
fs.mkdirSync(dbRootPath, { recursive: true })

// Exports
export { should, dbRootPath }
export { testRootPath as rootPath }
1 change: 0 additions & 1 deletion packages/operator/.prettierrc.js

This file was deleted.

39 changes: 0 additions & 39 deletions packages/operator/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions packages/operator/index.ts

This file was deleted.

50 changes: 0 additions & 50 deletions packages/operator/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/operator/src/app/constants/db-defaults.ts

This file was deleted.

15 changes: 0 additions & 15 deletions packages/operator/src/app/constants/db-prefixes.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/operator/src/app/constants/index.ts

This file was deleted.

16 changes: 0 additions & 16 deletions packages/operator/src/app/constants/rpc-methods.ts

This file was deleted.

10 changes: 0 additions & 10 deletions packages/operator/src/app/constants/serialization.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/operator/src/app/exceptions/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/operator/src/app/exceptions/messages.ts

This file was deleted.

16 changes: 0 additions & 16 deletions packages/operator/src/app/exceptions/runtime.exception.ts

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions packages/operator/src/app/state-manager/ownership-state.ts

This file was deleted.

18 changes: 0 additions & 18 deletions packages/operator/test/setup.ts

This file was deleted.

17 changes: 0 additions & 17 deletions packages/operator/test/unit/state.spec.ts

This file was deleted.

8 changes: 0 additions & 8 deletions packages/operator/tsconfig.json

This file was deleted.

6 changes: 0 additions & 6 deletions packages/operator/tslint.json

This file was deleted.

0 comments on commit 0917b38

Please sign in to comment.