sync up old changes

This commit is contained in:
41666 2019-07-22 21:48:30 -04:00
parent 0f48567f17
commit e1befee236
No known key found for this signature in database
GPG key ID: BC51D07640DC10AF
12 changed files with 61 additions and 57 deletions

View file

@ -42,9 +42,9 @@
"stylelint-config-styled-components": "^0.1.1", "stylelint-config-styled-components": "^0.1.1",
"stylelint-processor-styled-components": "^1.8.0", "stylelint-processor-styled-components": "^1.8.0",
"ts-jest": "^24.0.2", "ts-jest": "^24.0.2",
"tslint": "^5.17.0", "tslint": "^5.18.0",
"typescript": "^3.5.1", "typescript": "^3.5.3",
"typescript-tslint-plugin": "^0.4.0" "typescript-tslint-plugin": "^0.5.4"
}, },
"lint-staged": { "lint-staged": {
"*.{ts,tsx}": [ "*.{ts,tsx}": [

View file

@ -15,7 +15,7 @@
"devDependencies": { "devDependencies": {
"@types/async-retry": "^1.4.1", "@types/async-retry": "^1.4.1",
"lint-staged": "^8.1.7", "lint-staged": "^8.1.7",
"tslint": "^5.17.0", "tslint": "^5.18.0",
"typescript": "^3.5.1" "typescript": "^3.5.3"
} }
} }

View file

@ -42,9 +42,9 @@
"react-test-renderer": "^16.8.6", "react-test-renderer": "^16.8.6",
"sinon": "^7.3.2", "sinon": "^7.3.2",
"stylelint": "^10.0.1", "stylelint": "^10.0.1",
"tslint": "^5.17.0", "tslint": "^5.18.0",
"tslint-config-standard": "^8.0.1", "tslint-config-standard": "^8.0.1",
"typescript": "^3.5.1" "typescript": "^3.5.3"
}, },
"scripts": { "scripts": {
"storybook": "start-storybook -p 6006", "storybook": "start-storybook -p 6006",

View file

@ -2,17 +2,21 @@
"name": "@roleypoly/rpc", "name": "@roleypoly/rpc",
"version": "2.0.0", "version": "2.0.0",
"devDependencies": { "devDependencies": {
"@types/superagent": "^4.1.1",
"@types/cookie": "^0.3.3", "@types/cookie": "^0.3.3",
"@types/superagent": "^4.1.1",
"lint-staged": "^8.1.7", "lint-staged": "^8.1.7",
"tslint": "^5.17.0", "tslint": "^5.18.0",
"typescript": "^3.5.1" "typescript": "^3.5.3"
}, },
"scripts": { "scripts": {
"generate": "bentoc ./**/*.proto", "generate": "bentoc ./**/*.proto",
"build": "tsc", "build": "tsc",
"precommit": "lint-staged" "precommit": "lint-staged"
}, },
"files": [
"lib"
],
"main": "lib/index.js",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@kayteh/bento": "^0.2.2", "@kayteh/bento": "^0.2.2",

View file

@ -1,2 +1,7 @@
export { default as NATSTransport } from './utils/NATSTransport' export { default as NATSTransport } from './utils/NATSTransport'
export { default as HTTPTransport } from './utils/HTTPTransport' export { default as HTTPTransport } from './utils/HTTPTransport'
import * as Servers from './services/servers.bento'
export {
Servers
}

View file

@ -36,7 +36,7 @@
"@types/nanoid": "^2.0.0", "@types/nanoid": "^2.0.0",
"chokidar": "^3.0.1", "chokidar": "^3.0.1",
"lint-staged": "^8.1.7", "lint-staged": "^8.1.7",
"tslint": "^5.17.0", "tslint": "^5.18.0",
"typescript": "^3.5.1" "typescript": "^3.5.3"
} }
} }

View file

@ -7,7 +7,7 @@
}, },
"devDependencies": { "devDependencies": {
"lint-staged": "^8.1.7", "lint-staged": "^8.1.7",
"tslint": "^5.17.0", "tslint": "^5.18.0",
"typescript": "^3.5.1" "typescript": "^3.5.3"
} }
} }

View file

@ -20,7 +20,7 @@
"chalk": "^2.4.2", "chalk": "^2.4.2",
"chokidar": "^3.0.1", "chokidar": "^3.0.1",
"lint-staged": "^8.1.7", "lint-staged": "^8.1.7",
"tslint": "^5.17.0", "tslint": "^5.18.0",
"typescript": "^3.5.1" "typescript": "^3.5.3"
} }
} }

View file

@ -1,23 +1,19 @@
// @flow import { Servers as ServersRPC, HTTPTransport } from '@roleypoly/rpc'
// import RPCClient from '@roleypoly/rpc-client' import Bento, { JSONSerializer } from '@kayteh/bento'
// const client = new RPCClient({ forceDev: false }) // const o = {
// getCurrentUser: async (..._: any) => null,
// export default client.rpc // getServerSlug: async (..._: any) => null,
// export const withCookies = (ctx: any) => { // checkAuthChallenge: async (..._: any) => false
// if (ctx.req != null) {
// return client.withCookies(ctx.req.headers.cookie)
// } else {
// return client.rpc
// }
// } // }
const o = {
getCurrentUser: async (..._: any) => null,
getServerSlug: async (..._: any) => null,
checkAuthChallenge: async (..._: any) => false
}
export default o export const bento = new Bento()
export function withCookies () { export const transport = new HTTPTransport(
return o bento,
} new JSONSerializer(),
process.env.RPC_URL || '/api/_rpc'
)
bento.transport = transport
export const Servers = bento.client(ServersRPC.ServersClient)

View file

@ -1,6 +1,5 @@
require('dotenv').config({ quiet: true }) require('dotenv').config({ quiet: true })
const withTypescript = require('@zeit/next-typescript') module.exports = {
module.exports = withTypescript({
publicRuntimeConfig: { publicRuntimeConfig: {
BOT_HANDLE: process.env.BOT_HANDLE BOT_HANDLE: process.env.BOT_HANDLE
}, },
@ -12,4 +11,4 @@ module.exports = withTypescript({
return config return config
} }
}) }

View file

@ -7,8 +7,8 @@
"precommit": "lint-staged" "precommit": "lint-staged"
}, },
"dependencies": { "dependencies": {
"@roleypoly/rpc": "^2.0.0", "@roleypoly/design": "2.0.0",
"@roleypoly/design": "^2.0.0", "@roleypoly/rpc": "2.0.0",
"color": "^3.1.2", "color": "^3.1.2",
"eventemitter3": "^3.1.2", "eventemitter3": "^3.1.2",
"fast-redux": "^0.7.1", "fast-redux": "^0.7.1",
@ -27,10 +27,10 @@
"superagent": "^5.0.5" "superagent": "^5.0.5"
}, },
"devDependencies": { "devDependencies": {
"@zeit/next-typescript": "^1.1.1",
"@roleypoly/types": "^2.0.0",
"@babel/plugin-transform-runtime": "^7.4.4", "@babel/plugin-transform-runtime": "^7.4.4",
"@roleypoly/types": "^2.0.0",
"@types/next": "^8.0.5", "@types/next": "^8.0.5",
"@zeit/next-typescript": "^1.1.1",
"babel-plugin-styled-components": "^1.10.0", "babel-plugin-styled-components": "^1.10.0",
"enzyme": "^3.10.0", "enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0", "enzyme-adapter-react-16": "^1.14.0",
@ -38,7 +38,7 @@
"lint-staged": "^8.1.7", "lint-staged": "^8.1.7",
"react-test-renderer": "^16.8.6", "react-test-renderer": "^16.8.6",
"standard": "12.0.1", "standard": "12.0.1",
"tslint": "^5.17.0", "tslint": "^5.18.0",
"typescript": "^3.5.1" "typescript": "^3.5.3"
} }
} }

View file

@ -15119,10 +15119,10 @@ tslint-eslint-rules@^5.3.1:
tslib "1.9.0" tslib "1.9.0"
tsutils "^3.0.0" tsutils "^3.0.0"
tslint@^5.17.0: tslint@^5.18.0:
version "5.17.0" version "5.18.0"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.17.0.tgz#f9f0ce2011d8e90debaa6e9b4975f24cd16852b8" resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.18.0.tgz#f61a6ddcf372344ac5e41708095bbf043a147ac6"
integrity sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w== integrity sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==
dependencies: dependencies:
"@babel/code-frame" "^7.0.0" "@babel/code-frame" "^7.0.0"
builtin-modules "^1.1.1" builtin-modules "^1.1.1"
@ -15231,19 +15231,19 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
typescript-tslint-plugin@^0.4.0: typescript-tslint-plugin@^0.5.4:
version "0.4.0" version "0.5.4"
resolved "https://registry.yarnpkg.com/typescript-tslint-plugin/-/typescript-tslint-plugin-0.4.0.tgz#af1729e72b770489b2b912809694f46c3281bb72" resolved "https://registry.yarnpkg.com/typescript-tslint-plugin/-/typescript-tslint-plugin-0.5.4.tgz#febe0cca1fe65133f4f688841eba68262a1d55a5"
integrity sha512-83zipyk5bCqu/LHifaWPmJ7Xnl6lLn/3KmWINgr+XND79BrVWmkV8CudKc+a9Jhjs2opvVKq0n0P4O4NhHOixw== integrity sha512-CQEfGC+p0SoBARI4N2LrGsWJsp4/OE+uKZ68xsWYKHWqMFq4DFQHqOVlK0deEricSN01NmDTqjap63Pw/DHieg==
dependencies: dependencies:
minimatch "^3.0.4" minimatch "^3.0.4"
mock-require "^3.0.2" mock-require "^3.0.2"
vscode-languageserver "^5.1.0" vscode-languageserver "^5.1.0"
typescript@^3.5.1: typescript@^3.5.3:
version "3.5.1" version "3.5.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.1.tgz#ba72a6a600b2158139c5dd8850f700e231464202" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
integrity sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw== integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==
ua-parser-js@^0.7.18: ua-parser-js@^0.7.18:
version "0.7.19" version "0.7.19"