fix build system / types

This commit is contained in:
Florian Dold 2017-08-14 04:59:43 +02:00
parent d5bba630a3
commit 5634e77ad9
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
15 changed files with 1094 additions and 342 deletions

View File

@ -23,41 +23,43 @@
}, },
"devDependencies": { "devDependencies": {
"@types/moment": "^2.13.0", "@types/moment": "^2.13.0",
"@types/react": "^15.0.22", "ava": "^0.21.0",
"@types/react-dom": "^15.5.0", "awesome-typescript-loader": "^3.2.2",
"ava": "^0.19.1",
"glob": "^7.1.1", "glob": "^7.1.1",
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-concat": "^2.6.0", "gulp-concat": "^2.6.0",
"gulp-debug": "^2.1.2", "gulp-debug": "^3.1.0",
"gulp-gzip": "^1.2.0", "gulp-gzip": "^1.2.0",
"gulp-json-transform": "^0.4.2", "gulp-json-transform": "^0.4.2",
"gulp-rename": "^1.2.2", "gulp-rename": "^1.2.2",
"gulp-stream": "0.0.2", "gulp-stream": "0.0.2",
"gulp-sym": "0.0.14", "gulp-sym": "^1.0.2",
"gulp-tar": "^1.8.0", "gulp-tar": "^2.0.0",
"gulp-typescript": "^3.0.2", "gulp-typescript": "^3.0.2",
"gulp-zip": "^3.1.0", "gulp-zip": "^4.0.0",
"html-webpack-plugin": "^2.28.0", "html-webpack-plugin": "^2.28.0",
"jed": "^1.1.1", "jed": "^1.1.1",
"map-stream": "0.0.6", "map-stream": "^0.0.7",
"moment": "^2.18.1", "moment": "^2.18.1",
"nyc": "^10.3.2", "nyc": "^11.1.0",
"po2json": "git+https://github.com/mikeedwards/po2json", "po2json": "git+https://github.com/mikeedwards/po2json",
"pogen": "file:tooling/pogen/", "pogen": "file:tooling/pogen/",
"react": "^15.5.4", "react": "^15.5.4",
"react-dom": "^15.5.4", "react-dom": "^15.5.4",
"structured-clone": "^0.2.2", "structured-clone": "^0.2.2",
"through2": "^2.0.1", "through2": "^2.0.1",
"ts-loader": "^2.0.3",
"tslint": "^5.3.2", "tslint": "^5.3.2",
"typedoc": "^0.7.1", "typedoc": "^0.8.0",
"typescript": "next", "typescript": "^2.4.0",
"uglify-js": "^2.8.22", "uglify-js": "^3.0.27",
"urijs": "^1.18.10", "urijs": "^1.18.10",
"vinyl": "^2.0.0", "vinyl": "^2.0.0",
"vinyl-fs": "^2.4.3", "vinyl-fs": "^2.4.3",
"webpack": "^2.4.1", "webpack": "^3.5.4",
"webpack-merge": "^4.1.0" "webpack-merge": "^4.1.0"
},
"dependencies": {
"@types/react": "^16.0.2",
"@types/react-dom": "^15.5.2"
} }
} }

View File

@ -69,7 +69,7 @@ process.once("message", (obj: any) => {
} }
}); });
process.on("error", (err: any) => { process.on("uncaughtException", (err: any) => {
(g.onerror || g.self.onerror || (() => undefined))(err); (g.onerror || g.self.onerror || (() => undefined))(err);
}); });

View File

@ -112,7 +112,7 @@ interface TranslateProps {
* </Translate> * </Translate>
* ``` * ```
*/ */
export class Translate extends React.Component<TranslateProps, void> { export class Translate extends React.Component<TranslateProps, {}> {
render(): JSX.Element { render(): JSX.Element {
const s = stringifyChildren(this.props.children); const s = stringifyChildren(this.props.children);
const tr = jed.ngettext(s, s, 1).split(/%(\d+)\$s/).filter((e: any, i: number) => i % 2 === 0); const tr = jed.ngettext(s, s, 1).split(/%(\d+)\$s/).filter((e: any, i: number) => i % 2 === 0);

View File

@ -296,6 +296,21 @@ msgstr ""
msgid "Your wallet has no events recorded." msgid "Your wallet has no events recorded."
msgstr "Ihre Geldbörse verzeichnet keine Vorkommnisse." msgstr "Ihre Geldbörse verzeichnet keine Vorkommnisse."
#: src/webex/pages/return-coins.tsx:104
#, c-format
msgid "Wire to bank account"
msgstr ""
#: src/webex/pages/return-coins.tsx:172
#, fuzzy, c-format
msgid "Confirm"
msgstr "Bezahlung bestätigen"
#: src/webex/pages/return-coins.tsx:175
#, fuzzy, c-format
msgid "Cancel"
msgstr "Saldo"
#: src/webex/renderHtml.tsx:51 #: src/webex/renderHtml.tsx:51
#, fuzzy, c-format #, fuzzy, c-format
msgid "The merchant%1$swants to enter a contract over%2$s with you.\n" msgid "The merchant%1$swants to enter a contract over%2$s with you.\n"
@ -309,13 +324,30 @@ msgstr ""
msgid "You are about to purchase:" msgid "You are about to purchase:"
msgstr "Sie sind dabei, Folgendes zu kaufen:" msgstr "Sie sind dabei, Folgendes zu kaufen:"
#: src/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/wire.ts:43 src/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""
#, fuzzy #, fuzzy
#~ msgid "Withdrawal fees: %1$s" #~ msgid "Withdrawal fees: %1$s"
#~ msgstr "Abheben bei %1$s" #~ msgstr "Abheben bei %1$s"
#~ msgid "Confirm Payment"
#~ msgstr "Bezahlung bestätigen"
#~ msgid "Wallet depleted reserve (%1$s) at %2$s" #~ msgid "Wallet depleted reserve (%1$s) at %2$s"
#~ msgstr "Geldbörse hat die Reserve (%1$s) erschöpft" #~ msgstr "Geldbörse hat die Reserve (%1$s) erschöpft"

View File

@ -296,6 +296,21 @@ msgstr ""
msgid "Your wallet has no events recorded." msgid "Your wallet has no events recorded."
msgstr "" msgstr ""
#: src/webex/pages/return-coins.tsx:104
#, c-format
msgid "Wire to bank account"
msgstr ""
#: src/webex/pages/return-coins.tsx:172
#, c-format
msgid "Confirm"
msgstr ""
#: src/webex/pages/return-coins.tsx:175
#, c-format
msgid "Cancel"
msgstr ""
#: src/webex/renderHtml.tsx:51 #: src/webex/renderHtml.tsx:51
#, c-format #, c-format
msgid "The merchant%1$swants to enter a contract over%2$s with you.\n" msgid "The merchant%1$swants to enter a contract over%2$s with you.\n"
@ -306,6 +321,26 @@ msgstr ""
msgid "You are about to purchase:" msgid "You are about to purchase:"
msgstr "" msgstr ""
#: src/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/wire.ts:43 src/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""
#, fuzzy #, fuzzy
#~ msgid "DEBUG: Your balance on %1$s is %2$s KUDO. Get more at %3$s" #~ msgid "DEBUG: Your balance on %1$s is %2$s KUDO. Get more at %3$s"
#~ msgstr "DEBUG: Your balance is %2$s KUDO on %1$s. Get more at %3$s" #~ msgstr "DEBUG: Your balance is %2$s KUDO on %1$s. Get more at %3$s"

View File

@ -296,6 +296,21 @@ msgstr ""
msgid "Your wallet has no events recorded." msgid "Your wallet has no events recorded."
msgstr "" msgstr ""
#: src/webex/pages/return-coins.tsx:104
#, c-format
msgid "Wire to bank account"
msgstr ""
#: src/webex/pages/return-coins.tsx:172
#, c-format
msgid "Confirm"
msgstr ""
#: src/webex/pages/return-coins.tsx:175
#, c-format
msgid "Cancel"
msgstr ""
#: src/webex/renderHtml.tsx:51 #: src/webex/renderHtml.tsx:51
#, c-format #, c-format
msgid "The merchant%1$swants to enter a contract over%2$s with you.\n" msgid "The merchant%1$swants to enter a contract over%2$s with you.\n"
@ -305,3 +320,23 @@ msgstr ""
#, c-format #, c-format
msgid "You are about to purchase:" msgid "You are about to purchase:"
msgstr "" msgstr ""
#: src/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/wire.ts:43 src/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""

View File

@ -296,6 +296,21 @@ msgstr ""
msgid "Your wallet has no events recorded." msgid "Your wallet has no events recorded."
msgstr "" msgstr ""
#: src/webex/pages/return-coins.tsx:104
#, c-format
msgid "Wire to bank account"
msgstr ""
#: src/webex/pages/return-coins.tsx:172
#, c-format
msgid "Confirm"
msgstr ""
#: src/webex/pages/return-coins.tsx:175
#, c-format
msgid "Cancel"
msgstr ""
#: src/webex/renderHtml.tsx:51 #: src/webex/renderHtml.tsx:51
#, c-format #, c-format
msgid "The merchant%1$swants to enter a contract over%2$s with you.\n" msgid "The merchant%1$swants to enter a contract over%2$s with you.\n"
@ -305,3 +320,23 @@ msgstr ""
#, c-format #, c-format
msgid "You are about to purchase:" msgid "You are about to purchase:"
msgstr "" msgstr ""
#: src/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/wire.ts:43 src/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""

View File

@ -171,11 +171,32 @@ strings['de'] = {
"Your wallet has no events recorded.": [ "Your wallet has no events recorded.": [
"Ihre Geldbörse verzeichnet keine Vorkommnisse." "Ihre Geldbörse verzeichnet keine Vorkommnisse."
], ],
"Wire to bank account": [
""
],
"Confirm": [
"Bezahlung bestätigen"
],
"Cancel": [
"Saldo"
],
"The merchant%1$swants to enter a contract over%2$s with you.\n": [ "The merchant%1$swants to enter a contract over%2$s with you.\n": [
"%1$s\n möchte einen Vertrag über %2$s\n mit Ihnen abschließen." "%1$s\n möchte einen Vertrag über %2$s\n mit Ihnen abschließen."
], ],
"You are about to purchase:": [ "You are about to purchase:": [
"Sie sind dabei, Folgendes zu kaufen:" "Sie sind dabei, Folgendes zu kaufen:"
],
"Invalid Wire": [
""
],
"Invalid Test Wire Detail": [
""
],
"Test Wire Acct #%1$s on %2$s": [
""
],
"Unknown Wire Detail": [
""
] ]
} }
} }
@ -336,11 +357,32 @@ strings['en-US'] = {
"Your wallet has no events recorded.": [ "Your wallet has no events recorded.": [
"" ""
], ],
"Wire to bank account": [
""
],
"Confirm": [
""
],
"Cancel": [
""
],
"The merchant%1$swants to enter a contract over%2$s with you.\n": [ "The merchant%1$swants to enter a contract over%2$s with you.\n": [
"" ""
], ],
"You are about to purchase:": [ "You are about to purchase:": [
"" ""
],
"Invalid Wire": [
""
],
"Invalid Test Wire Detail": [
""
],
"Test Wire Acct #%1$s on %2$s": [
""
],
"Unknown Wire Detail": [
""
] ]
} }
} }
@ -501,11 +543,32 @@ strings['fr'] = {
"Your wallet has no events recorded.": [ "Your wallet has no events recorded.": [
"" ""
], ],
"Wire to bank account": [
""
],
"Confirm": [
""
],
"Cancel": [
""
],
"The merchant%1$swants to enter a contract over%2$s with you.\n": [ "The merchant%1$swants to enter a contract over%2$s with you.\n": [
"" ""
], ],
"You are about to purchase:": [ "You are about to purchase:": [
"" ""
],
"Invalid Wire": [
""
],
"Invalid Test Wire Detail": [
""
],
"Test Wire Acct #%1$s on %2$s": [
""
],
"Unknown Wire Detail": [
""
] ]
} }
} }
@ -666,11 +729,32 @@ strings['it'] = {
"Your wallet has no events recorded.": [ "Your wallet has no events recorded.": [
"" ""
], ],
"Wire to bank account": [
""
],
"Confirm": [
""
],
"Cancel": [
""
],
"The merchant%1$swants to enter a contract over%2$s with you.\n": [ "The merchant%1$swants to enter a contract over%2$s with you.\n": [
"" ""
], ],
"You are about to purchase:": [ "You are about to purchase:": [
"" ""
],
"Invalid Wire": [
""
],
"Invalid Test Wire Detail": [
""
],
"Test Wire Acct #%1$s on %2$s": [
""
],
"Unknown Wire Detail": [
""
] ]
} }
} }

View File

@ -296,6 +296,21 @@ msgstr ""
msgid "Your wallet has no events recorded." msgid "Your wallet has no events recorded."
msgstr "" msgstr ""
#: src/webex/pages/return-coins.tsx:104
#, c-format
msgid "Wire to bank account"
msgstr ""
#: src/webex/pages/return-coins.tsx:172
#, c-format
msgid "Confirm"
msgstr ""
#: src/webex/pages/return-coins.tsx:175
#, c-format
msgid "Cancel"
msgstr ""
#: src/webex/renderHtml.tsx:51 #: src/webex/renderHtml.tsx:51
#, c-format #, c-format
msgid "The merchant%1$swants to enter a contract over%2$s with you.\n" msgid "The merchant%1$swants to enter a contract over%2$s with you.\n"
@ -305,3 +320,23 @@ msgstr ""
#, c-format #, c-format
msgid "You are about to purchase:" msgid "You are about to purchase:"
msgstr "" msgstr ""
#: src/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/wire.ts:43 src/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""

View File

@ -106,7 +106,7 @@ export interface QueryStream<T> {
/** /**
* Reduce the stream, resulting in a single value. * Reduce the stream, resulting in a single value.
*/ */
reduce<S>(f: (v: T, acc: S) => S, start?: S): Promise<S>; reduce<S>(f: (v: T, acc?: S) => S, start?: S): Promise<S>;
/** /**
* Map each element of the stream using a function, resulting in another * Map each element of the stream using a function, resulting in another

View File

@ -30,7 +30,7 @@ interface ErrorProps {
message: string; message: string;
} }
class ErrorView extends React.Component<ErrorProps, void> { class ErrorView extends React.Component<ErrorProps, { }> {
render(): JSX.Element { render(): JSX.Element {
return ( return (
<div> <div>

View File

@ -32,7 +32,7 @@ interface LogViewProps {
log: LogEntry; log: LogEntry;
} }
class LogView extends React.Component<LogViewProps, void> { class LogView extends React.Component<LogViewProps, {}> {
render(): JSX.Element { render(): JSX.Element {
const e = this.props.log; const e = this.props.log;
return ( return (

View File

@ -51,7 +51,7 @@ interface ReserveViewProps {
reserve: ReserveRecord; reserve: ReserveRecord;
} }
class ReserveView extends React.Component<ReserveViewProps, void> { class ReserveView extends React.Component<ReserveViewProps, {}> {
render(): JSX.Element { render(): JSX.Element {
const r: ReserveRecord = this.props.reserve; const r: ReserveRecord = this.props.reserve;
return ( return (
@ -130,7 +130,7 @@ class RefreshDialog extends ImplicitStateComponent<RefreshDialogProps> {
} }
} }
class CoinView extends React.Component<CoinViewProps, void> { class CoinView extends React.Component<CoinViewProps, {}> {
render() { render() {
const c = this.props.coin; const c = this.props.coin;
return ( return (
@ -154,7 +154,7 @@ interface PreCoinViewProps {
precoin: PreCoinRecord; precoin: PreCoinRecord;
} }
class PreCoinView extends React.Component<PreCoinViewProps, void> { class PreCoinView extends React.Component<PreCoinViewProps, {}> {
render() { render() {
const c = this.props.precoin; const c = this.props.precoin;
return ( return (
@ -381,7 +381,7 @@ interface ExchangeProps {
exchange: ExchangeRecord; exchange: ExchangeRecord;
} }
class ExchangeView extends React.Component<ExchangeProps, void> { class ExchangeView extends React.Component<ExchangeProps, {}> {
render(): JSX.Element { render(): JSX.Element {
const e = this.props.exchange; const e = this.props.exchange;
return ( return (

View File

@ -1,6 +1,7 @@
const path = require('path'); const path = require('path');
const webpack = require('webpack'); const webpack = require('webpack');
const merge = require('webpack-merge'); const merge = require('webpack-merge');
const { CheckerPlugin } = require('awesome-typescript-loader')
function externalsCb(context, request, callback) { function externalsCb(context, request, callback) {
@ -24,7 +25,7 @@ module.exports = function (env) {
rules: [ rules: [
{ {
test: /\.tsx?$/, test: /\.tsx?$/,
loader: 'ts-loader', loader: 'awesome-typescript-loader',
exclude: /node_modules/, exclude: /node_modules/,
exclude: /taler-emscripten-lib/, exclude: /taler-emscripten-lib/,
} }
@ -34,7 +35,9 @@ module.exports = function (env) {
modules: [path.resolve(__dirname, "./"), "node_modules"], modules: [path.resolve(__dirname, "./"), "node_modules"],
extensions: [".tsx", ".ts", ".js"] extensions: [".tsx", ".ts", ".js"]
}, },
plugins: [], plugins: [
new CheckerPlugin(),
],
devtool: "source-map", devtool: "source-map",
externals: [ externals: [
externalsCb, externalsCb,

1119
yarn.lock

File diff suppressed because it is too large Load Diff