Skip to content

Commit

Permalink
feat: setup monorepo structure and refactor auth
Browse files Browse the repository at this point in the history
  • Loading branch information
yknl committed Jul 27, 2020
1 parent 3124e05 commit 03c7c92
Show file tree
Hide file tree
Showing 82 changed files with 8,041 additions and 3,126 deletions.
6 changes: 6 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"packages": [
"packages/*"
],
"version": "0.0.0"
}
8,847 changes: 6,404 additions & 2,443 deletions package-lock.json

Large diffs are not rendered by default.

40 changes: 11 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/preset-env": "^7.7.1",
"@babel/register": "^7.7.0",
"@peculiar/webcrypto": "^1.0.21",
"@types/jsdom": "^12.2.4",
"@babel/preset-typescript": "^7.7.0",
"@babel/register": "^7.7.0",
"@blockstack/prettier-config": "0.0.3",
"@peculiar/webcrypto": "^1.0.21",
"@types/cheerio": "^0.22.10",
"@types/fetch-mock": "^5.8.0",
"@types/form-data": "^2.2.1",
"@types/jsdom": "^12.2.4",
"@types/node": "^10",
"@types/proxyquire": "^1.3.28",
"@types/sha.js": "^2.4.0",
Expand All @@ -110,29 +110,33 @@
"@types/triplesec": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/parser": "^2.7.0",
"@types/bn.js": "^4.11.6",
"@types/elliptic": "^6.4.10",
"@types/randombytes": "^2.0.0",
"babel-loader": "^8.0.6",
"babel-plugin-istanbul": "^5.2.0",
"cheerio": "^0.22.0",
"codecov": "^3.6.1",
"cross-env": "^6.0.3",
"eslint": "^6.6.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-prettier": "^6.5.0",
"eslint-import-resolver-typescript": "^2.0.0",
"eslint-plugin-import": "^2.18.2",
"express": "^4.17.1",
"fetch-mock": "^8.1.0",
"jsdom": "^15.2.1",
"eslint-config-prettier": "^6.5.0",
"lerna": "^3.22.1",
"mock-local-storage": "^1.1.8",
"npm-run-all": "^4.1.5",
"nyc": "^14.1.1",
"opn": "^4.0.2",
"prettier": "^1.18.2",
"proxyquire": "^2.1.3",
"rimraf": "^3.0.0",
"semver": "^6.3.0",
"sinon": "^7.5.0",
"opn": "^4.0.2",
"prettier": "^1.18.2",
"shx": "^0.3.2",
"sinon": "^7.5.0",
"source-map-loader": "^0.2.4",
"source-map-support": "^0.5.16",
"tape": "^4.11.0",
Expand All @@ -148,28 +152,6 @@
"webpack-cli": "^3.3.10"
},
"dependencies": {
"@types/bn.js": "^4.11.6",
"@types/cheerio": "^0.22.13",
"@types/elliptic": "^6.4.10",
"@types/node": "^12.7.12",
"@types/randombytes": "^2.0.0",
"ajv": "^4.11.5",
"bip39": "^3.0.2",
"bitcoinjs-lib": "^5.1.6",
"bn.js": "^4.11.8",
"cross-fetch": "^3.0.4",
"elliptic": "^6.5.1",
"form-data": "^2.5.1",
"jsontokens": "3.0.0",
"query-string": "^6.8.3",
"randombytes": "^2.1.0",
"request": "^2.88.0",
"ripemd160-min": "0.0.5",
"schema-inspector": "^1.6.8",
"sha.js": "^2.4.11",
"tslib": "^1.10.0",
"uuid": "^3.3.3",
"zone-file": "^1.0.0"
},
"engines": {
"node": ">=8",
Expand Down
11 changes: 11 additions & 0 deletions packages/auth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# `auth`

> TODO: description
## Usage

```
const auth = require('auth');
// TODO: DEMONSTRATE API
```
7 changes: 7 additions & 0 deletions packages/auth/__tests__/auth.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

const auth = require('..');

describe('auth', () => {
it('needs tests');
});
181 changes: 181 additions & 0 deletions packages/auth/package-lock.json

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

42 changes: 42 additions & 0 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "@stacks/auth",
"version": "1.0.0",
"description": "Authentication for Stacks apps.",
"keywords": [
"Stacks",
"Blockstack",
"Blockchain",
"Authentication",
"Auth",
"Dapp"
],
"author": "yknl <yukanliao@gmail.com>",
"homepage": "https://blockstack.org",
"license": "GPL-3.0-or-later",
"main": "lib/index.js",
"directories": {
"lib": "lib",
"test": "__tests__"
},
"files": [
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/blockstack/blockstack.js.git"
},
"scripts": {
"build": "rimraf lib && tsc -b tsconfig.build.json",
"test": "echo \"Error: run tests from root\" && exit 1"
},
"bugs": {
"url": "https://github.com/blockstack/blockstack.js/issues"
},
"dependencies": {
"@stacks/common": "^1.0.0",
"@stacks/encryption": "^1.0.0",
"cross-fetch": "^3.0.5",
"jsontokens": "^3.0.0",
"query-string": "^6.13.1"
}
}
4 changes: 2 additions & 2 deletions src/auth/appConfig.ts → packages/auth/src/appConfig.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { DEFAULT_SCOPE, DEFAULT_BLOCKSTACK_HOST, AuthScope } from './authConstants'
import { getGlobalObject } from '../utils'
import { DEFAULT_SCOPE, DEFAULT_BLOCKSTACK_HOST, AuthScope } from './constants'
import { getGlobalObject } from '@stacks/common'

/**
* Configuration data for the current app.
Expand Down

0 comments on commit 03c7c92

Please sign in to comment.