chore: project config changes for typescript migration

This commit is contained in:
Justin Starry 2021-03-15 11:00:43 +08:00 committed by Justin Starry
parent 3ea23fe736
commit 3eb9f7b3eb
33 changed files with 636 additions and 6274 deletions

View File

@ -1,47 +0,0 @@
{
"source": "src",
"destination": "doc",
"plugins": [
{
"name": "esdoc-standard-plugin",
"option": {
"lint": {"enable": true},
"undocumentIdentifier": {"enable": true},
"unexportedIdentifier": {"enable": false},
"coverage": {"enable": true},
"accessor": {"access": ["public", "protected"], "autoPrivate": true},
"undocumentIdentifier": {"enable": true},
"unexportedIdentifier": {"enable": false},
"typeInference": {"enable": true},
"brand": {
"title": "Solana Javascript API",
"repository": "https://github.com/solana-labs/solana-web3.js",
"site": "https://solana.com"
}
}
},
{
"name": "esdoc-importpath-plugin",
"option": {
"stripPackageName": true,
"replaces": [
{"from": ".*", "to": "@solana/web3"}
]
}
},
{
"name": "esdoc-flow-type-plugin",
"option": {"enable": true}
},
{
"name": "esdoc-ecmascript-proposal-plugin",
"option": {
"all": true
}
},
{
"name": "esdoc-inject-style-plugin",
"option": {"styles": ["css/theme.css"]}
}
]
}

View File

@ -9,14 +9,16 @@ module.exports = {
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
],
parser: 'babel-eslint', // upgrade to @babel/eslint-parser blocked on eslint-plugin-flowtype
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 8,
},
plugins: ['@typescript-eslint'],
rules: {
'no-trailing-spaces': ['error'],
'@typescript-eslint/no-unused-vars': ['error'],
'import/first': ['error'],
'import/no-commonjs': ['error'],
'import/order': [
@ -39,6 +41,8 @@ module.exports = {
],
'linebreak-style': ['error', 'unix'],
'no-console': [0],
'no-trailing-spaces': ['error'],
'no-unused-vars': 'off',
quotes: [
'error',
'single',
@ -47,25 +51,4 @@ module.exports = {
'require-await': ['error'],
semi: ['error', 'always'],
},
// Used to lint the TypeScript type declaration file
overrides: [
{
files: ['*.js'],
plugins: ['flowtype'],
extends: ['plugin:flowtype/recommended'],
rules: {
'flowtype/generic-spacing': [0],
},
},
{
files: ['*.d.ts'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
},
},
],
};

3
web3.js/.gitignore vendored
View File

@ -31,3 +31,6 @@ doc
# `solana-test-validator` ledger location
test-ledger/
# Flow
module.flow.js

View File

@ -19,13 +19,11 @@ All other commit types will trigger no new release.
## Reference
### Static Analysis
eslint and flow-type are used.
Helpful link: https://www.saltycrane.com/flow-type-cheat-sheet/latest/
eslint and TypeScript are used.
### Testing Framework
https://mochajs.org/
### API Documentation
ESDoc is used to document the public API. See
https://esdoc.org/manual/tags.html for details.
TypeDoc is used to document the public API. See
https://typedoc.org/ for details.

View File

@ -1,6 +1,5 @@
[![Build status][travis-image]][travis-url]
[![codecov][codecov-image]][codecov-url]
[![esdoc][esdoc-image]][esdoc-url]
<br>
[![npm][npm-image]][npm-url]
[![npm-downloads][npm-downloads-image]][npm-url]
@ -12,10 +11,8 @@
[travis-url]: https://travis-ci.org/solana-labs/solana-web3.js
[codecov-image]: https://codecov.io/gh/solana-labs/solana-web3.js/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/solana-labs/solana-web3.js
[esdoc-image]: https://solana-labs.github.io/solana-web3.js/badge.svg
[npm-image]: https://img.shields.io/npm/v/@solana/web3.js.svg?style=flat
[npm-downloads-image]: https://img.shields.io/npm/dm/@solana/web3.js.svg?style=flat
[esdoc-url]: https://solana-labs.github.io/solana-web3.js/
[npm-url]: https://www.npmjs.com/package/@solana/web3.js
[semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-release-url]: https://github.com/semantic-release/semantic-release

View File

@ -1,7 +1,7 @@
{
"presets": [
["@babel/preset-env"],
["@babel/preset-flow"]
["@babel/preset-typescript"]
],
"plugins": [
"@babel/plugin-proposal-class-properties"

View File

@ -1,159 +0,0 @@
html {
font-family: Lato, 'Helvetica Neue', 'Arial', sans-serif;
color: #333;
background-color: #f7f7f7;
text-size-adjust: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
margin: 0;
font-size: 1rem;
overflow-x: hidden;
font-family: Lato, 'Helvetica Neue', 'Arial', sans-serif;
font-size: 14px;
font-weight: 300;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif;
font-size: 13px;
/* please adjust the ace font size accordingly in editor.js */
line-height: 1.5;
}
p a {
color: #050505;
text-decoration: underline;
}
.layout-container>header {
background: #050505;
border-bottom: solid 1px rgba(255, 255, 255, .3);
}
.layout-container>header>a {
color: #fff;
}
.search-box.active .search-input {
color: #fff;
}
.navigation {
background: #050505;
padding-left: 0;
}
.navigation li {
margin: 0;
padding-left: 25px;
transition: .15s ease-in-out;
}
.navigation li:hover {
background: #00A670;
}
.navigation li .kind-class {
margin-left: 0;
}
.navigation li a {
color: #fff;
font-size: 13px;
font-weight: normal;
line-height: 2.2em;
padding-top: 0.3em;
padding-bottom: 0.3em;
}
.content {
background: #f7f7f7;
padding-left: 0;
padding-right: 0;
}
.content>.github-markdown>* {
padding-left: 28px;
padding-right: 28px;
}
.content>*:not(.github-markdown) {
padding-left: 28px;
padding-right: 28px;
}
.github-markdown h1 {
font-size: 28px;
font-weight: 300;
padding-top: 0.5em;
padding-bottom: 0.5em;
margin-bottom: 21px;
margin-top: 2em;
border-top: 1px solid #e5e5e5;
border-bottom: 1px solid #e5e5e5;
background-color: #fff;
font-family: Poppins, sans-serif;
}
.github-markdown h2 {
font-family: Poppins, sans-serif;
font-size: 26px;
font-weight: 300;
margin-top: 2em;
margin-bottom: 0;
padding-top: 1.2em;
padding-bottom: 1.2em;
border-bottom: none;
}
.github-markdown pre>code {
background-color: #262B26;
color: #fff;
margin: 0;
padding-top: 2em;
padding-bottom: 2em;
padding: 2em 28px;
font-size: 13px;
border-radius: 3px;
line-height: 1.5;
}
.pln {
color: #7d7d7d;
}
.tag {
color: #f92672;
}
.lit {
color: #f6aa11;
}
.str {
color: #60ac39;
}
p>code,
li>code {
background-color: rgba(0, 0, 0, 0.05);
padding: 3px;
border-radius: 3px;
font-size: 13px;
line-height: 1.5;
color: #333;
}
.import-path pre.prettyprint code {
background-color: rgba(0, 0, 0, 0.05);
padding: 3px;
border-radius: 3px;
font-size: 13px;
line-height: 1.5;
color: #333;
}

View File

@ -1,46 +0,0 @@
// flow-typed signature: 31deb8fc07c5ce70371c5efad579a253
// flow-typed version: <<STUB>>/@solana/spl-token_v^0.0.13/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* '@solana/spl-token'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module '@solana/spl-token' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module '@solana/spl-token/lib/index.cjs' {
declare module.exports: any;
}
declare module '@solana/spl-token/lib/index.esm' {
declare module.exports: any;
}
declare module '@solana/spl-token/module.flow' {
declare module.exports: any;
}
// Filename aliases
declare module '@solana/spl-token/lib/index.cjs.js' {
declare module.exports: $Exports<'@solana/spl-token/lib/index.cjs'>;
}
declare module '@solana/spl-token/lib/index.esm.js' {
declare module.exports: $Exports<'@solana/spl-token/lib/index.esm'>;
}
declare module '@solana/spl-token/module.flow.js' {
declare module.exports: $Exports<'@solana/spl-token/module.flow'>;
}

View File

@ -1,32 +0,0 @@
// flow-typed signature: 8da8649cde7e433ccfab3b776be3b79b
// flow-typed version: <<STUB>>/bn.js_v^5.0.0/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'bn.js'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'bn.js' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'bn.js/lib/bn' {
declare module.exports: any;
}
// Filename aliases
declare module 'bn.js/lib/bn.js' {
declare module.exports: $Exports<'bn.js/lib/bn'>;
}

View File

@ -1,33 +0,0 @@
// flow-typed signature: f3d56571af5a1fa4e9a01cf0c8719c35
// flow-typed version: <<STUB>>/bs58_v^4.0.1/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'bs58'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'bs58' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
// Filename aliases
declare module 'bs58/index' {
declare module.exports: $Exports<'bs58'>;
}
declare module 'bs58/index.js' {
declare module.exports: $Exports<'bs58'>;
}

View File

@ -1,53 +0,0 @@
// flow-typed signature: 1d431fcaaa378246e77473538c349228
// flow-typed version: <<STUB>>/buffer-layout_v^1.2.0/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'buffer-layout'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'buffer-layout' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'buffer-layout/jsdoc/custom/local' {
declare module.exports: any;
}
declare module 'buffer-layout/lib/Layout' {
declare module.exports: any;
}
declare module 'buffer-layout/test/examples' {
declare module.exports: any;
}
declare module 'buffer-layout/test/LayoutTest' {
declare module.exports: any;
}
// Filename aliases
declare module 'buffer-layout/jsdoc/custom/local.js' {
declare module.exports: $Exports<'buffer-layout/jsdoc/custom/local'>;
}
declare module 'buffer-layout/lib/Layout.js' {
declare module.exports: $Exports<'buffer-layout/lib/Layout'>;
}
declare module 'buffer-layout/test/examples.js' {
declare module.exports: $Exports<'buffer-layout/test/examples'>;
}
declare module 'buffer-layout/test/LayoutTest.js' {
declare module.exports: $Exports<'buffer-layout/test/LayoutTest'>;
}

View File

@ -1,33 +0,0 @@
// flow-typed signature: 8dedcebf9a48fa95d40824e83a7eef7d
// flow-typed version: <<STUB>>/buffer_v6.0.1/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'buffer'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'buffer' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
// Filename aliases
declare module 'buffer/index' {
declare module.exports: $Exports<'buffer'>;
}
declare module 'buffer/index.js' {
declare module.exports: $Exports<'buffer'>;
}

View File

@ -1,32 +0,0 @@
// flow-typed signature: 70e0166de5b4ddabe4c61a208b761844
// flow-typed version: <<STUB>>/chai-as-promised_v^7.1.1/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'chai-as-promised'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'chai-as-promised' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'chai-as-promised/lib/chai-as-promised' {
declare module.exports: any;
}
// Filename aliases
declare module 'chai-as-promised/lib/chai-as-promised.js' {
declare module.exports: $Exports<'chai-as-promised/lib/chai-as-promised'>;
}

View File

@ -1,304 +0,0 @@
// flow-typed signature: 055d97c4302b7989c7221251421dca7c
// flow-typed version: 673c7738c2/chai_v4.x.x/flow_>=v0.104.x
declare module "chai" {
declare type ExpectChain<T> = {
and: ExpectChain<T>,
at: ExpectChain<T>,
be: ExpectChain<T>,
been: ExpectChain<T>,
have: ExpectChain<T>,
has: ExpectChain<T>,
is: ExpectChain<T>,
of: ExpectChain<T>,
same: ExpectChain<T>,
that: ExpectChain<T>,
to: ExpectChain<T>,
which: ExpectChain<T>,
with: ExpectChain<T>,
not: ExpectChain<T>,
deep: ExpectChain<T>,
any: ExpectChain<T>,
all: ExpectChain<T>,
own: ExpectChain<T>,
a: ExpectChain<T> & ((type: string, message?: string) => ExpectChain<T>),
an: ExpectChain<T> & ((type: string, message?: string) => ExpectChain<T>),
include: ExpectChain<T> & ((value: mixed, message?: string) => ExpectChain<T>),
includes: ExpectChain<T> & ((value: mixed, message?: string) => ExpectChain<T>),
contain: ExpectChain<T> & ((value: mixed, message?: string) => ExpectChain<T>),
contains: ExpectChain<T> & ((value: mixed, message?: string) => ExpectChain<T>),
eq: (value: T, message?: string) => ExpectChain<T>,
eql: (value: T, message?: string) => ExpectChain<T>,
equal: (value: T, message?: string) => ExpectChain<T>,
equals: (value: T, message?: string) => ExpectChain<T>,
above: (value: T & number, message?: string) => ExpectChain<T>,
gt: (value: T & number, message?: string) => ExpectChain<T>,
greaterThan: (value: T & number, message?: string) => ExpectChain<T>,
least: (value: T & number, message?: string) => ExpectChain<T>,
below: (value: T & number, message?: string) => ExpectChain<T>,
lessThan: (value: T & number, message?: string) => ExpectChain<T>,
lt: (value: T & number, message?: string) => ExpectChain<T>,
most: (value: T & number, message?: string) => ExpectChain<T>,
within: (start: T & number, finish: T & number, message?: string) => ExpectChain<T>,
instanceof: (constructor: mixed, message?: string) => ExpectChain<T>,
instanceOf: (constructor: mixed, message?: string) => ExpectChain<T>,
nested: ExpectChain<T>,
property: <P>(
name: string,
value?: P,
message?: string
) => ExpectChain<P> & ((name: string) => ExpectChain<mixed>),
length: ExpectChain<number> & ((value: number, message?: string) => ExpectChain<T>),
lengthOf: (value: number, message?: string) => ExpectChain<T>,
match: (regex: RegExp, message?: string) => ExpectChain<T>,
matches: (regex: RegExp, message?: string) => ExpectChain<T>,
string: (string: string, message?: string) => ExpectChain<T>,
key: (key: string) => ExpectChain<T>,
keys: (
key: string | Array<string>,
...keys: Array<string>
) => ExpectChain<T>,
throw: <E>(
err?: Class<E> | Error | RegExp | string,
errMsgMatcher?: RegExp | string,
msg?: string
) => ExpectChain<T>,
respondTo: (method: string, message?: string) => ExpectChain<T>,
itself: ExpectChain<T>,
satisfy: (method: (value: T) => boolean, message?: string) => ExpectChain<T>,
closeTo: (expected: T & number, delta: number, message?: string) => ExpectChain<T>,
members: (set: mixed, message?: string) => ExpectChain<T>,
oneOf: (list: Array<T>, message?: string) => ExpectChain<T>,
change: (obj: mixed, key: string, message?: string) => ExpectChain<T>,
increase: (obj: mixed, key: string, message?: string) => ExpectChain<T>,
decrease: (obj: mixed, key: string, message?: string) => ExpectChain<T>,
by: (delta: number, message?: string) => ExpectChain<T>,
ordered: ExpectChain<T>,
// dirty-chai
ok: () => ExpectChain<T>,
true: () => ExpectChain<T>,
false: () => ExpectChain<T>,
null: () => ExpectChain<T>,
undefined: () => ExpectChain<T>,
exist: () => ExpectChain<T>,
empty: () => ExpectChain<T>,
extensible: () => ExpectChain<T>,
sealed: () => ExpectChain<T>,
frozen: () => ExpectChain<T>,
NaN: () => ExpectChain<T>,
// chai-immutable
size: (n: number) => ExpectChain<T>,
// sinon-chai
called: () => ExpectChain<T>,
callCount: (n: number) => ExpectChain<T>,
calledOnce: () => ExpectChain<T>,
calledTwice: () => ExpectChain<T>,
calledThrice: () => ExpectChain<T>,
calledBefore: (spy: mixed) => ExpectChain<T>,
calledAfter: (spy: mixed) => ExpectChain<T>,
calledImmediatelyBefore: (spy: mixed) => ExpectChain<T>,
calledImmediatelyAfter: (spy: mixed) => ExpectChain<T>,
calledWith: (...args: Array<mixed>) => ExpectChain<T>,
calledOnceWith: (...args: Array<mixed>) => ExpectChain<T>,
calledWithMatch: (...args: Array<mixed>) => ExpectChain<T>,
calledWithExactly: (...args: Array<mixed>) => ExpectChain<T>,
calledOnceWithExactly: (...args: Array<mixed>) => ExpectChain<T>,
returned: (returnVal: mixed) => ExpectChain<T>,
alwaysReturned: (returnVal: mixed) => ExpectChain<T>,
// chai-as-promised
eventually: ExpectChain<T>,
resolvedWith: (value: mixed) => Promise<mixed> & ExpectChain<T>,
resolved: () => Promise<mixed> & ExpectChain<T>,
rejectedWith: (
value: mixed,
errMsgMatcher?: RegExp | string,
msg?: string
) => Promise<mixed> & ExpectChain<T>,
rejected: () => Promise<mixed> & ExpectChain<T>,
notify: (callback: () => mixed) => ExpectChain<T>,
fulfilled: () => Promise<mixed> & ExpectChain<T>,
// chai-subset
containSubset: (obj: {...} | Array< {...} >) => ExpectChain<T>,
// chai-redux-mock-store
dispatchedActions: (
actions: Array<{...} | ((action: {...}) => any)>
) => ExpectChain<T>,
dispatchedTypes: (actions: Array<string>) => ExpectChain<T>,
// chai-enzyme
attr: (key: string, val?: any) => ExpectChain<T>,
data: (key: string, val?: any) => ExpectChain<T>,
prop: (key: string, val?: any) => ExpectChain<T>,
state: (key: string, val?: any) => ExpectChain<T>,
value: (val: string) => ExpectChain<T>,
className: (val: string) => ExpectChain<T>,
text: (val: string) => ExpectChain<T>,
// chai-karma-snapshot
matchSnapshot: (lang?: any, update?: boolean, msg?: any) => ExpectChain<T>,
...
};
declare var expect: {
<T>(actual: T, message?: string): ExpectChain<T>,
fail: ((message?: string) => void) & ((actual: any, expected: any, message?: string, operator?: string) => void),
...
};
declare function use(plugin: (chai: Object, utils: Object) => void): void;
declare class assert {
static (expression: mixed, message?: string): void;
static fail(
actual: mixed,
expected: mixed,
message?: string,
operator?: string
): void;
static isOk(object: mixed, message?: string): void;
static isNotOk(object: mixed, message?: string): void;
static empty(object: mixed, message?: string): void;
static isEmpty(object: mixed, message?: string): void;
static notEmpty(object: mixed, message?: string): void;
static isNotEmpty(object: mixed, message?: string): void;
static equal(actual: mixed, expected: mixed, message?: string): void;
static notEqual(actual: mixed, expected: mixed, message?: string): void;
static strictEqual(act: mixed, exp: mixed, msg?: string): void;
static notStrictEqual(act: mixed, exp: mixed, msg?: string): void;
static deepEqual(act: mixed, exp: mixed, msg?: string): void;
static notDeepEqual(act: mixed, exp: mixed, msg?: string): void;
static ok(val: mixed, msg?: string): void;
static isTrue(val: mixed, msg?: string): void;
static isNotTrue(val: mixed, msg?: string): void;
static isFalse(val: mixed, msg?: string): void;
static isNotFalse(val: mixed, msg?: string): void;
static isNull(val: mixed, msg?: string): void;
static isNotNull(val: mixed, msg?: string): void;
static isUndefined(val: mixed, msg?: string): void;
static isDefined(val: mixed, msg?: string): void;
static isNaN(val: mixed, msg?: string): void;
static isNotNaN(val: mixed, msg?: string): void;
static isAbove(val: number, abv: number, msg?: string): void;
static isBelow(val: number, blw: number, msg?: string): void;
static exists(val : mixed, msg? : string) : void;
static notExists(val : mixed, msg? : string) : void;
static isAtMost(val: number, atmst: number, msg?: string): void;
static isAtLeast(val: number, atlst: number, msg?: string): void;
static isFunction(val: mixed, msg?: string): void;
static isNotFunction(val: mixed, msg?: string): void;
static isObject(val: mixed, msg?: string): void;
static isNotObject(val: mixed, msg?: string): void;
static isArray(val: mixed, msg?: string): void;
static isNotArray(val: mixed, msg?: string): void;
static isString(val: mixed, msg?: string): void;
static isNotString(val: mixed, msg?: string): void;
static isNumber(val: mixed, msg?: string): void;
static isNotNumber(val: mixed, msg?: string): void;
static isBoolean(val: mixed, msg?: string): void;
static isNotBoolean(val: mixed, msg?: string): void;
static typeOf(val: mixed, type: string, msg?: string): void;
static notTypeOf(val: mixed, type: string, msg?: string): void;
static instanceOf(val: mixed, constructor: Class< * >, msg?: string): void;
static notInstanceOf(val: mixed, constructor: Class< * >, msg?: string): void;
static include(exp: string, inc: mixed, msg?: string): void;
static include<T>(exp: Array<T>, inc: T, msg?: string): void;
static notInclude(exp: string, inc: mixed, msg?: string): void;
static notInclude<T>(exp: Array<T>, inc: T, msg?: string): void;
static deepInclude<T>(haystack : T[] | string, needle : $Shape<T>, msg?: string) : void;
static notDeepInclude<T>(haystack : T[] | string, needle : $Shape<T>, msg?: string) : void;
static match(exp: mixed, re: RegExp, msg?: string): void;
static notMatch(exp: mixed, re: RegExp, msg?: string): void;
static property(obj: Object, prop: string, msg?: string): void;
static notProperty(obj: Object, prop: string, msg?: string): void;
static deepProperty(obj: Object, prop: string, msg?: string): void;
static notDeepProperty(obj: Object, prop: string, msg?: string): void;
static propertyVal(
obj: Object,
prop: string,
val: mixed,
msg?: string
): void;
static propertyNotVal(
obj: Object,
prop: string,
val: mixed,
msg?: string
): void;
static deepPropertyVal(
obj: Object,
prop: string,
val: mixed,
msg?: string
): void;
static deepPropertyNotVal(
obj: Object,
prop: string,
val: mixed,
msg?: string
): void;
static lengthOf(exp: mixed, len: number, msg?: string): void;
static throws<E>(
func: () => any,
err?: Class<E> | Error | RegExp | string,
errorMsgMatcher?: string | RegExp,
msg?: string
): void;
static doesNotThrow<E>(
func: () => any,
err?: Class<E> | Error | RegExp | string,
errorMsgMatcher?: string | RegExp,
msg?: string
): void;
static closeTo(
actual: number,
expected: number,
delta: number,
msg?: string
): void;
static approximately(
actual: number,
expected: number,
delta: number,
msg?: string
): void;
// chai-immutable
static sizeOf(val: mixed, length: number): void;
}
declare var config: {
includeStack: boolean,
showDiff: boolean,
truncateThreshold: number,
...
};
}

View File

@ -1,45 +0,0 @@
// flow-typed signature: c51ef53d90f82520f7f635d7c316e3ad
// flow-typed version: <<STUB>>/crypto-hash_v^1.2.2/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'crypto-hash'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'crypto-hash' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'crypto-hash/browser' {
declare module.exports: any;
}
declare module 'crypto-hash/thread' {
declare module.exports: any;
}
// Filename aliases
declare module 'crypto-hash/browser.js' {
declare module.exports: $Exports<'crypto-hash/browser'>;
}
declare module 'crypto-hash/index' {
declare module.exports: $Exports<'crypto-hash'>;
}
declare module 'crypto-hash/index.js' {
declare module.exports: $Exports<'crypto-hash'>;
}
declare module 'crypto-hash/thread.js' {
declare module.exports: $Exports<'crypto-hash/thread'>;
}

View File

@ -1,251 +0,0 @@
// flow-typed signature: 8403af7bdb08869a610e6cf3c8467ca2
// flow-typed version: <<STUB>>/jayson_v^3.4.4/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'jayson'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'jayson' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'jayson/bin/jayson' {
declare module.exports: any;
}
declare module 'jayson/lib/client/browser' {
declare module.exports: any;
}
declare module 'jayson/lib/client/http' {
declare module.exports: any;
}
declare module 'jayson/lib/client/https' {
declare module.exports: any;
}
declare module 'jayson/lib/client' {
declare module.exports: any;
}
declare module 'jayson/lib/client/tcp' {
declare module.exports: any;
}
declare module 'jayson/lib/client/tls' {
declare module.exports: any;
}
declare module 'jayson/lib/generateRequest' {
declare module.exports: any;
}
declare module 'jayson/lib' {
declare module.exports: any;
}
declare module 'jayson/lib/method' {
declare module.exports: any;
}
declare module 'jayson/lib/server/http' {
declare module.exports: any;
}
declare module 'jayson/lib/server/https' {
declare module.exports: any;
}
declare module 'jayson/lib/server' {
declare module.exports: any;
}
declare module 'jayson/lib/server/middleware' {
declare module.exports: any;
}
declare module 'jayson/lib/server/tcp' {
declare module.exports: any;
}
declare module 'jayson/lib/server/tls' {
declare module.exports: any;
}
declare module 'jayson/lib/utils' {
declare module.exports: any;
}
declare module 'jayson/promise' {
declare module.exports: any;
}
declare module 'jayson/promise/lib/client/browser' {
declare module.exports: any;
}
declare module 'jayson/promise/lib/client/http' {
declare module.exports: any;
}
declare module 'jayson/promise/lib/client/https' {
declare module.exports: any;
}
declare module 'jayson/promise/lib/client' {
declare module.exports: any;
}
declare module 'jayson/promise/lib/client/tcp' {
declare module.exports: any;
}
declare module 'jayson/promise/lib/client/tls' {
declare module.exports: any;
}
declare module 'jayson/promise/lib' {
declare module.exports: any;
}
declare module 'jayson/promise/lib/method' {
declare module.exports: any;
}
declare module 'jayson/promise/lib/server' {
declare module.exports: any;
}
declare module 'jayson/promise/lib/utils' {
declare module.exports: any;
}
// Filename aliases
declare module 'jayson/bin/jayson.js' {
declare module.exports: $Exports<'jayson/bin/jayson'>;
}
declare module 'jayson/index' {
declare module.exports: $Exports<'jayson'>;
}
declare module 'jayson/index.js' {
declare module.exports: $Exports<'jayson'>;
}
declare module 'jayson/lib/client/browser/index' {
declare module.exports: $Exports<'jayson/lib/client/browser'>;
}
declare module 'jayson/lib/client/browser/index.js' {
declare module.exports: $Exports<'jayson/lib/client/browser'>;
}
declare module 'jayson/lib/client/http.js' {
declare module.exports: $Exports<'jayson/lib/client/http'>;
}
declare module 'jayson/lib/client/https.js' {
declare module.exports: $Exports<'jayson/lib/client/https'>;
}
declare module 'jayson/lib/client/index' {
declare module.exports: $Exports<'jayson/lib/client'>;
}
declare module 'jayson/lib/client/index.js' {
declare module.exports: $Exports<'jayson/lib/client'>;
}
declare module 'jayson/lib/client/tcp.js' {
declare module.exports: $Exports<'jayson/lib/client/tcp'>;
}
declare module 'jayson/lib/client/tls.js' {
declare module.exports: $Exports<'jayson/lib/client/tls'>;
}
declare module 'jayson/lib/generateRequest.js' {
declare module.exports: $Exports<'jayson/lib/generateRequest'>;
}
declare module 'jayson/lib/index' {
declare module.exports: $Exports<'jayson/lib'>;
}
declare module 'jayson/lib/index.js' {
declare module.exports: $Exports<'jayson/lib'>;
}
declare module 'jayson/lib/method.js' {
declare module.exports: $Exports<'jayson/lib/method'>;
}
declare module 'jayson/lib/server/http.js' {
declare module.exports: $Exports<'jayson/lib/server/http'>;
}
declare module 'jayson/lib/server/https.js' {
declare module.exports: $Exports<'jayson/lib/server/https'>;
}
declare module 'jayson/lib/server/index' {
declare module.exports: $Exports<'jayson/lib/server'>;
}
declare module 'jayson/lib/server/index.js' {
declare module.exports: $Exports<'jayson/lib/server'>;
}
declare module 'jayson/lib/server/middleware.js' {
declare module.exports: $Exports<'jayson/lib/server/middleware'>;
}
declare module 'jayson/lib/server/tcp.js' {
declare module.exports: $Exports<'jayson/lib/server/tcp'>;
}
declare module 'jayson/lib/server/tls.js' {
declare module.exports: $Exports<'jayson/lib/server/tls'>;
}
declare module 'jayson/lib/utils.js' {
declare module.exports: $Exports<'jayson/lib/utils'>;
}
declare module 'jayson/promise/index' {
declare module.exports: $Exports<'jayson/promise'>;
}
declare module 'jayson/promise/index.js' {
declare module.exports: $Exports<'jayson/promise'>;
}
declare module 'jayson/promise/lib/client/browser/index' {
declare module.exports: $Exports<'jayson/promise/lib/client/browser'>;
}
declare module 'jayson/promise/lib/client/browser/index.js' {
declare module.exports: $Exports<'jayson/promise/lib/client/browser'>;
}
declare module 'jayson/promise/lib/client/http.js' {
declare module.exports: $Exports<'jayson/promise/lib/client/http'>;
}
declare module 'jayson/promise/lib/client/https.js' {
declare module.exports: $Exports<'jayson/promise/lib/client/https'>;
}
declare module 'jayson/promise/lib/client/index' {
declare module.exports: $Exports<'jayson/promise/lib/client'>;
}
declare module 'jayson/promise/lib/client/index.js' {
declare module.exports: $Exports<'jayson/promise/lib/client'>;
}
declare module 'jayson/promise/lib/client/tcp.js' {
declare module.exports: $Exports<'jayson/promise/lib/client/tcp'>;
}
declare module 'jayson/promise/lib/client/tls.js' {
declare module.exports: $Exports<'jayson/promise/lib/client/tls'>;
}
declare module 'jayson/promise/lib/index' {
declare module.exports: $Exports<'jayson/promise/lib'>;
}
declare module 'jayson/promise/lib/index.js' {
declare module.exports: $Exports<'jayson/promise/lib'>;
}
declare module 'jayson/promise/lib/method.js' {
declare module.exports: $Exports<'jayson/promise/lib/method'>;
}
declare module 'jayson/promise/lib/server.js' {
declare module.exports: $Exports<'jayson/promise/lib/server'>;
}
declare module 'jayson/promise/lib/utils.js' {
declare module.exports: $Exports<'jayson/promise/lib/utils'>;
}

View File

@ -1,39 +0,0 @@
// flow-typed signature: 3f5253ee300391e662d9c724d020a98e
// flow-typed version: <<STUB>>/js-sha3_v^0.8.0/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'js-sha3'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'js-sha3' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'js-sha3/build/sha3.min' {
declare module.exports: any;
}
declare module 'js-sha3/src/sha3' {
declare module.exports: any;
}
// Filename aliases
declare module 'js-sha3/build/sha3.min.js' {
declare module.exports: $Exports<'js-sha3/build/sha3.min'>;
}
declare module 'js-sha3/src/sha3.js' {
declare module.exports: $Exports<'js-sha3/src/sha3'>;
}

View File

@ -1,238 +0,0 @@
// flow-typed signature: 195cec6dc98ab7533f0eb927ee493f99
// flow-typed version: 1a6d5d1968/mocha_v8.x.x/flow_>=v0.104.x
declare interface $npm$mocha$SetupOptions {
slow?: number;
timeout?: number;
ui?: string;
globals?: Array<any>;
reporter?: any;
bail?: boolean;
ignoreLeaks?: boolean;
grep?: any;
}
declare type $npm$mocha$done = (error?: any) => any;
// declare interface $npm$mocha$SuiteCallbackContext {
// timeout(ms: number): void;
// retries(n: number): void;
// slow(ms: number): void;
// }
// declare interface $npm$mocha$TestCallbackContext {
// skip(): void;
// timeout(ms: number): void;
// retries(n: number): void;
// slow(ms: number): void;
// [index: string]: any;
// }
declare interface $npm$mocha$Suite {
parent: $npm$mocha$Suite;
title: string;
fullTitle(): string;
}
declare type $npm$mocha$ContextDefinition = {|
(description: string, callback: (/* this: $npm$mocha$SuiteCallbackContext */) => void): $npm$mocha$Suite;
only(description: string, callback: (/* this: $npm$mocha$SuiteCallbackContext */) => void): $npm$mocha$Suite;
skip(description: string, callback: (/* this: $npm$mocha$SuiteCallbackContext */) => void): void;
timeout(ms: number): void;
|}
declare type $npm$mocha$TestDefinition = {|
(expectation: string, callback?: (/* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done) => mixed): $npm$mocha$Test;
only(expectation: string, callback?: (/* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done) => mixed): $npm$mocha$Test;
skip(expectation: string, callback?: (/* this: $npm$mocha$TestCallbackContext, */ done: $npm$mocha$done) => mixed): void;
timeout(ms: number): void;
state: 'failed' | 'passed';
|}
declare interface $npm$mocha$Runner {}
declare class $npm$mocha$BaseReporter {
stats: {
suites: number,
tests: number,
passes: number,
pending: number,
failures: number,
...
};
constructor(runner: $npm$mocha$Runner): $npm$mocha$BaseReporter;
}
declare class $npm$mocha$DocReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$DotReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$HTMLReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$HTMLCovReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$JSONReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$JSONCovReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$JSONStreamReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$LandingReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$ListReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$MarkdownReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$MinReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$NyanReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$ProgressReporter extends $npm$mocha$BaseReporter {
constructor(runner: $npm$mocha$Runner, options?: {
open?: string,
complete?: string,
incomplete?: string,
close?: string,
...
}): $npm$mocha$ProgressReporter;
}
declare class $npm$mocha$SpecReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$TAPReporter extends $npm$mocha$BaseReporter {}
declare class $npm$mocha$XUnitReporter extends $npm$mocha$BaseReporter {
constructor(runner: $npm$mocha$Runner, options?: any): $npm$mocha$XUnitReporter;
}
declare class $npm$mocha$Mocha {
currentTest: $npm$mocha$TestDefinition;
constructor(options?: {
grep?: RegExp,
ui?: string,
reporter?: string,
timeout?: number,
reporterOptions?: any,
slow?: number,
bail?: boolean,
...
}): $npm$mocha$Mocha;
setup(options: $npm$mocha$SetupOptions): this;
bail(value?: boolean): this;
addFile(file: string): this;
reporter(name: string): this;
reporter(reporter: (runner: $npm$mocha$Runner, options: any) => any): this;
ui(value: string): this;
grep(value: string): this;
grep(value: RegExp): this;
invert(): this;
ignoreLeaks(value: boolean): this;
checkLeaks(): this;
throwError(error: Error): void;
growl(): this;
globals(value: string): this;
globals(values: Array<string>): this;
useColors(value: boolean): this;
useInlineDiffs(value: boolean): this;
timeout(value: number): this;
slow(value: number): this;
enableTimeouts(value: boolean): this;
asyncOnly(value: boolean): this;
noHighlighting(value: boolean): this;
run(onComplete?: (failures: number) => void): $npm$mocha$Runner;
static reporters: {
Doc: $npm$mocha$DocReporter,
Dot: $npm$mocha$DotReporter,
HTML: $npm$mocha$HTMLReporter,
HTMLCov: $npm$mocha$HTMLCovReporter,
JSON: $npm$mocha$JSONReporter,
JSONCov: $npm$mocha$JSONCovReporter,
JSONStream: $npm$mocha$JSONStreamReporter,
Landing: $npm$mocha$LandingReporter,
List: $npm$mocha$ListReporter,
Markdown: $npm$mocha$MarkdownReporter,
Min: $npm$mocha$MinReporter,
Nyan: $npm$mocha$NyanReporter,
Progress: $npm$mocha$ProgressReporter,
...
};
}
// declare interface $npm$mocha$HookCallbackContext {
// skip(): void;
// timeout(ms: number): void;
// [index: string]: any;
// }
declare interface $npm$mocha$Runnable {
title: string;
fn: Function;
async: boolean;
sync: boolean;
timedOut: boolean;
}
declare interface $npm$mocha$Test extends $npm$mocha$Runnable {
parent: $npm$mocha$Suite;
pending: boolean;
state: 'failed' | 'passed' | void;
fullTitle(): string;
timeout(ms: number): void;
}
// declare interface $npm$mocha$BeforeAndAfterContext extends $npm$mocha$HookCallbackContext {
// currentTest: $npm$mocha$Test;
// }
declare var mocha: $npm$mocha$Mocha;
declare var describe: $npm$mocha$ContextDefinition;
declare var xdescribe: $npm$mocha$ContextDefinition;
declare var context: $npm$mocha$ContextDefinition;
declare var suite: $npm$mocha$ContextDefinition;
declare var it: $npm$mocha$TestDefinition;
declare var xit: $npm$mocha$TestDefinition;
declare var test: $npm$mocha$TestDefinition;
declare var specify: $npm$mocha$TestDefinition;
type Run = () => void;
declare var run: Run;
type Setup = (callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed) => void;
type Teardown = (callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed) => void;
type SuiteSetup = (callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed) => void;
type SuiteTeardown = (callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed) => void;
type Before =
| (callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed) => void
| (description: string, callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed) => void;
type After =
| (callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed) => void
| (description: string, callback: (/* this: $npm$mocha$HookCallbackContext, */ done: $npm$mocha$done) => mixed) => void;
type BeforeEach =
| (callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed) => void
| (description: string, callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed) => void;
type AfterEach =
| (callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed) => void
| (description: string, callback: (/* this: $npm$mocha$BeforeAndAfterContext, */ done: $npm$mocha$done) => mixed) => void;
declare var setup: Setup;
declare var teardown: Teardown;
declare var suiteSetup: SuiteSetup;
declare var suiteTeardown;
declare var before: Before
declare var after: After;
declare var beforeEach: BeforeEach;
declare var afterEach: AfterEach;
declare module "mocha" {
declare export var mocha: $npm$mocha$TestDefinition;
declare export var describe: $npm$mocha$ContextDefinition;
declare export var xdescribe: $npm$mocha$ContextDefinition;
declare export var context: $npm$mocha$ContextDefinition;
declare export var suite: $npm$mocha$ContextDefinition;
declare export var it: $npm$mocha$TestDefinition;
declare export var xit: $npm$mocha$TestDefinition;
declare export var test: $npm$mocha$TestDefinition;
declare export var specify: $npm$mocha$TestDefinition;
declare export var run: Run;
declare export var setup: Setup;
declare export var teardown: Teardown;
declare export var suiteSetup: SuiteSetup;
declare export var suiteTeardown: SuiteTeardown;
declare export var before: Before;
declare export var after: After;
declare export var beforeEach: BeforeEach;
declare export var afterEach: AfterEach;
declare export default $npm$mocha$Mocha;
}

View File

@ -1,263 +0,0 @@
// flow-typed signature: e6c04a408e31a0534a8f15ba158400d1
// flow-typed version: <<STUB>>/mockttp_v^1.1.0/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'mockttp'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'mockttp' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'mockttp/dist/client/introspection-query' {
declare module.exports: any;
}
declare module 'mockttp/dist/client/mocked-endpoint-client' {
declare module.exports: any;
}
declare module 'mockttp/dist/client/mockttp-client' {
declare module.exports: any;
}
declare module 'mockttp/dist/main-browser' {
declare module.exports: any;
}
declare module 'mockttp/dist/main' {
declare module.exports: any;
}
declare module 'mockttp/dist/mockttp' {
declare module.exports: any;
}
declare module 'mockttp/dist/rules/base-rule-builder' {
declare module.exports: any;
}
declare module 'mockttp/dist/rules/completion-checkers' {
declare module.exports: any;
}
declare module 'mockttp/dist/rules/matchers' {
declare module.exports: any;
}
declare module 'mockttp/dist/rules/requests/request-handlers' {
declare module.exports: any;
}
declare module 'mockttp/dist/rules/requests/request-rule-builder' {
declare module.exports: any;
}
declare module 'mockttp/dist/rules/requests/request-rule' {
declare module.exports: any;
}
declare module 'mockttp/dist/rules/rule-serialization' {
declare module.exports: any;
}
declare module 'mockttp/dist/rules/websockets/websocket-handlers' {
declare module.exports: any;
}
declare module 'mockttp/dist/rules/websockets/websocket-rule-builder' {
declare module.exports: any;
}
declare module 'mockttp/dist/rules/websockets/websocket-rule' {
declare module.exports: any;
}
declare module 'mockttp/dist/server/http-combo-server' {
declare module.exports: any;
}
declare module 'mockttp/dist/server/mocked-endpoint' {
declare module.exports: any;
}
declare module 'mockttp/dist/server/mockttp-server' {
declare module.exports: any;
}
declare module 'mockttp/dist/standalone/mockttp-standalone' {
declare module.exports: any;
}
declare module 'mockttp/dist/standalone/standalone-bin' {
declare module.exports: any;
}
declare module 'mockttp/dist/standalone/standalone-model' {
declare module.exports: any;
}
declare module 'mockttp/dist/types' {
declare module.exports: any;
}
declare module 'mockttp/dist/util/destroyable-server' {
declare module.exports: any;
}
declare module 'mockttp/dist/util/fs' {
declare module.exports: any;
}
declare module 'mockttp/dist/util/normalize-url' {
declare module.exports: any;
}
declare module 'mockttp/dist/util/promise' {
declare module.exports: any;
}
declare module 'mockttp/dist/util/request-utils' {
declare module.exports: any;
}
declare module 'mockttp/dist/util/serialization' {
declare module.exports: any;
}
declare module 'mockttp/dist/util/socket-util' {
declare module.exports: any;
}
declare module 'mockttp/dist/util/tls' {
declare module.exports: any;
}
declare module 'mockttp/dist/util/type-utils' {
declare module.exports: any;
}
declare module 'mockttp/dist/util/util' {
declare module.exports: any;
}
declare module 'mockttp/docs/runkitExample' {
declare module.exports: any;
}
// Filename aliases
declare module 'mockttp/dist/client/introspection-query.js' {
declare module.exports: $Exports<'mockttp/dist/client/introspection-query'>;
}
declare module 'mockttp/dist/client/mocked-endpoint-client.js' {
declare module.exports: $Exports<'mockttp/dist/client/mocked-endpoint-client'>;
}
declare module 'mockttp/dist/client/mockttp-client.js' {
declare module.exports: $Exports<'mockttp/dist/client/mockttp-client'>;
}
declare module 'mockttp/dist/main-browser.js' {
declare module.exports: $Exports<'mockttp/dist/main-browser'>;
}
declare module 'mockttp/dist/main.js' {
declare module.exports: $Exports<'mockttp/dist/main'>;
}
declare module 'mockttp/dist/mockttp.js' {
declare module.exports: $Exports<'mockttp/dist/mockttp'>;
}
declare module 'mockttp/dist/rules/base-rule-builder.js' {
declare module.exports: $Exports<'mockttp/dist/rules/base-rule-builder'>;
}
declare module 'mockttp/dist/rules/completion-checkers.js' {
declare module.exports: $Exports<'mockttp/dist/rules/completion-checkers'>;
}
declare module 'mockttp/dist/rules/matchers.js' {
declare module.exports: $Exports<'mockttp/dist/rules/matchers'>;
}
declare module 'mockttp/dist/rules/requests/request-handlers.js' {
declare module.exports: $Exports<'mockttp/dist/rules/requests/request-handlers'>;
}
declare module 'mockttp/dist/rules/requests/request-rule-builder.js' {
declare module.exports: $Exports<'mockttp/dist/rules/requests/request-rule-builder'>;
}
declare module 'mockttp/dist/rules/requests/request-rule.js' {
declare module.exports: $Exports<'mockttp/dist/rules/requests/request-rule'>;
}
declare module 'mockttp/dist/rules/rule-serialization.js' {
declare module.exports: $Exports<'mockttp/dist/rules/rule-serialization'>;
}
declare module 'mockttp/dist/rules/websockets/websocket-handlers.js' {
declare module.exports: $Exports<'mockttp/dist/rules/websockets/websocket-handlers'>;
}
declare module 'mockttp/dist/rules/websockets/websocket-rule-builder.js' {
declare module.exports: $Exports<'mockttp/dist/rules/websockets/websocket-rule-builder'>;
}
declare module 'mockttp/dist/rules/websockets/websocket-rule.js' {
declare module.exports: $Exports<'mockttp/dist/rules/websockets/websocket-rule'>;
}
declare module 'mockttp/dist/server/http-combo-server.js' {
declare module.exports: $Exports<'mockttp/dist/server/http-combo-server'>;
}
declare module 'mockttp/dist/server/mocked-endpoint.js' {
declare module.exports: $Exports<'mockttp/dist/server/mocked-endpoint'>;
}
declare module 'mockttp/dist/server/mockttp-server.js' {
declare module.exports: $Exports<'mockttp/dist/server/mockttp-server'>;
}
declare module 'mockttp/dist/standalone/mockttp-standalone.js' {
declare module.exports: $Exports<'mockttp/dist/standalone/mockttp-standalone'>;
}
declare module 'mockttp/dist/standalone/standalone-bin.js' {
declare module.exports: $Exports<'mockttp/dist/standalone/standalone-bin'>;
}
declare module 'mockttp/dist/standalone/standalone-model.js' {
declare module.exports: $Exports<'mockttp/dist/standalone/standalone-model'>;
}
declare module 'mockttp/dist/types.js' {
declare module.exports: $Exports<'mockttp/dist/types'>;
}
declare module 'mockttp/dist/util/destroyable-server.js' {
declare module.exports: $Exports<'mockttp/dist/util/destroyable-server'>;
}
declare module 'mockttp/dist/util/fs.js' {
declare module.exports: $Exports<'mockttp/dist/util/fs'>;
}
declare module 'mockttp/dist/util/normalize-url.js' {
declare module.exports: $Exports<'mockttp/dist/util/normalize-url'>;
}
declare module 'mockttp/dist/util/promise.js' {
declare module.exports: $Exports<'mockttp/dist/util/promise'>;
}
declare module 'mockttp/dist/util/request-utils.js' {
declare module.exports: $Exports<'mockttp/dist/util/request-utils'>;
}
declare module 'mockttp/dist/util/serialization.js' {
declare module.exports: $Exports<'mockttp/dist/util/serialization'>;
}
declare module 'mockttp/dist/util/socket-util.js' {
declare module.exports: $Exports<'mockttp/dist/util/socket-util'>;
}
declare module 'mockttp/dist/util/tls.js' {
declare module.exports: $Exports<'mockttp/dist/util/tls'>;
}
declare module 'mockttp/dist/util/type-utils.js' {
declare module.exports: $Exports<'mockttp/dist/util/type-utils'>;
}
declare module 'mockttp/dist/util/util.js' {
declare module.exports: $Exports<'mockttp/dist/util/util'>;
}
declare module 'mockttp/docs/runkitExample.js' {
declare module.exports: $Exports<'mockttp/docs/runkitExample'>;
}

View File

@ -1,73 +0,0 @@
// flow-typed signature: 13be1c0af46f0b45a9b2f67afe924e06
// flow-typed version: <<STUB>>/mz_v^2.7.0/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'mz'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'mz' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'mz/child_process' {
declare module.exports: any;
}
declare module 'mz/crypto' {
declare module.exports: any;
}
declare module 'mz/dns' {
declare module.exports: any;
}
declare module 'mz/fs' {
declare module.exports: any;
}
declare module 'mz/readline' {
declare module.exports: any;
}
declare module 'mz/zlib' {
declare module.exports: any;
}
// Filename aliases
declare module 'mz/child_process.js' {
declare module.exports: $Exports<'mz/child_process'>;
}
declare module 'mz/crypto.js' {
declare module.exports: $Exports<'mz/crypto'>;
}
declare module 'mz/dns.js' {
declare module.exports: $Exports<'mz/dns'>;
}
declare module 'mz/fs.js' {
declare module.exports: $Exports<'mz/fs'>;
}
declare module 'mz/index' {
declare module.exports: $Exports<'mz'>;
}
declare module 'mz/index.js' {
declare module.exports: $Exports<'mz'>;
}
declare module 'mz/readline.js' {
declare module.exports: $Exports<'mz/readline'>;
}
declare module 'mz/zlib.js' {
declare module.exports: $Exports<'mz/zlib'>;
}

View File

@ -1,133 +0,0 @@
// flow-typed signature: 800c99f4687ac083d3ed2dd6b9ee9457
// flow-typed version: 711a5f887a/node-fetch_v2.x.x/flow_>=v0.104.x
declare module 'node-fetch' {
import type http from 'http';
import type https from 'https';
import type { URL } from 'url';
import type { Readable } from 'stream';
declare export type AbortSignal = {
+aborted: boolean;
+onabort: (event?: { ... }) => void;
+addEventListener: (name: string, cb: () => mixed) => void;
+removeEventListener: (name: string, cb: () => mixed) => void;
+dispatchEvent: (event: { ... }) => void;
...,
}
declare export class Request mixins Body {
constructor(input: string | { href: string, ... } | Request, init?: RequestInit): this;
context: RequestContext;
headers: Headers;
method: string;
redirect: RequestRedirect;
referrer: string;
url: string;
// node-fetch extensions
agent: http.Agent | https.Agent;
compress: boolean;
counter: number;
follow: number;
hostname: string;
port: number;
protocol: string;
size: number;
timeout: number;
}
declare type HeaderObject = { [index: string]: string, ... }
declare type RequestInit = {|
body?: BodyInit,
headers?: HeaderObject,
method?: string,
redirect?: RequestRedirect,
signal?: AbortSignal | null,
// node-fetch extensions
agent?: (URL => (http.Agent | https.Agent)) | http.Agent | https.Agent | null;
compress?: boolean,
follow?: number,
size?: number,
timeout?: number,
|};
declare export interface FetchError extends Error {
name: 'FetchError';
type: string;
code: ?number;
errno: ?number;
}
declare export interface AbortError extends Error {
name: 'AbortError';
type: 'aborted';
}
declare type RequestContext =
'audio' | 'beacon' | 'cspreport' | 'download' | 'embed' |
'eventsource' | 'favicon' | 'fetch' | 'font' | 'form' | 'frame' |
'hyperlink' | 'iframe' | 'image' | 'imageset' | 'import' |
'internal' | 'location' | 'manifest' | 'object' | 'ping' | 'plugin' |
'prefetch' | 'script' | 'serviceworker' | 'sharedworker' |
'subresource' | 'style' | 'track' | 'video' | 'worker' |
'xmlhttprequest' | 'xslt';
declare type RequestRedirect = 'error' | 'follow' | 'manual';
declare export class Headers {
append(name: string, value: string): void;
delete(name: string): void;
forEach(callback: (value: string, name: string) => void): void;
get(name: string): string;
getAll(name: string): Array<string>;
has(name: string): boolean;
raw(): { [k: string]: string[], ... };
set(name: string, value: string): void;
}
declare export class Body {
buffer(): Promise<Buffer>;
json(): Promise<any>;
json<T>(): Promise<T>;
text(): Promise<string>;
body: stream$Readable;
bodyUsed: boolean;
}
declare export class Response mixins Body {
constructor(body?: BodyInit, init?: ResponseInit): this;
clone(): Response;
error(): Response;
redirect(url: string, status: number): Response;
headers: Headers;
ok: boolean;
status: number;
statusText: string;
size: number;
timeout: number;
type: ResponseType;
url: string;
}
declare type ResponseType =
| 'basic'
| 'cors'
| 'default'
| 'error'
| 'opaque'
| 'opaqueredirect';
declare interface ResponseInit {
headers?: HeaderInit,
status: number,
statusText?: string,
}
declare type HeaderInit = Headers | Array<string>;
declare type BodyInit = string | null | Buffer | Blob | Readable;
declare export default function fetch(url: string | Request, init?: RequestInit): Promise<Response>
}

View File

@ -1,150 +0,0 @@
// flow-typed signature: f1593e42a1e3a50eb251415b72e1305b
// flow-typed version: <<STUB>>/rpc-websockets_v^7.4.2/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'rpc-websockets'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'rpc-websockets' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'rpc-websockets/build-ts/index.browser' {
declare module.exports: any;
}
declare module 'rpc-websockets/build-ts' {
declare module.exports: any;
}
declare module 'rpc-websockets/build-ts/lib/client' {
declare module.exports: any;
}
declare module 'rpc-websockets/build-ts/lib/client/client.types' {
declare module.exports: any;
}
declare module 'rpc-websockets/build-ts/lib/client/websocket.browser' {
declare module.exports: any;
}
declare module 'rpc-websockets/build-ts/lib/client/websocket' {
declare module.exports: any;
}
declare module 'rpc-websockets/build-ts/lib/server' {
declare module.exports: any;
}
declare module 'rpc-websockets/build-ts/lib/utils' {
declare module.exports: any;
}
declare module 'rpc-websockets/dist/index.browser-bundle' {
declare module.exports: any;
}
declare module 'rpc-websockets/dist/index.browser' {
declare module.exports: any;
}
declare module 'rpc-websockets/dist' {
declare module.exports: any;
}
declare module 'rpc-websockets/dist/lib/client' {
declare module.exports: any;
}
declare module 'rpc-websockets/dist/lib/client/client.types' {
declare module.exports: any;
}
declare module 'rpc-websockets/dist/lib/client/websocket.browser' {
declare module.exports: any;
}
declare module 'rpc-websockets/dist/lib/client/websocket' {
declare module.exports: any;
}
declare module 'rpc-websockets/dist/lib/server' {
declare module.exports: any;
}
declare module 'rpc-websockets/dist/lib/utils' {
declare module.exports: any;
}
// Filename aliases
declare module 'rpc-websockets/build-ts/index.browser.js' {
declare module.exports: $Exports<'rpc-websockets/build-ts/index.browser'>;
}
declare module 'rpc-websockets/build-ts/index' {
declare module.exports: $Exports<'rpc-websockets/build-ts'>;
}
declare module 'rpc-websockets/build-ts/index.js' {
declare module.exports: $Exports<'rpc-websockets/build-ts'>;
}
declare module 'rpc-websockets/build-ts/lib/client.js' {
declare module.exports: $Exports<'rpc-websockets/build-ts/lib/client'>;
}
declare module 'rpc-websockets/build-ts/lib/client/client.types.js' {
declare module.exports: $Exports<'rpc-websockets/build-ts/lib/client/client.types'>;
}
declare module 'rpc-websockets/build-ts/lib/client/websocket.browser.js' {
declare module.exports: $Exports<'rpc-websockets/build-ts/lib/client/websocket.browser'>;
}
declare module 'rpc-websockets/build-ts/lib/client/websocket.js' {
declare module.exports: $Exports<'rpc-websockets/build-ts/lib/client/websocket'>;
}
declare module 'rpc-websockets/build-ts/lib/server.js' {
declare module.exports: $Exports<'rpc-websockets/build-ts/lib/server'>;
}
declare module 'rpc-websockets/build-ts/lib/utils.js' {
declare module.exports: $Exports<'rpc-websockets/build-ts/lib/utils'>;
}
declare module 'rpc-websockets/dist/index.browser-bundle.js' {
declare module.exports: $Exports<'rpc-websockets/dist/index.browser-bundle'>;
}
declare module 'rpc-websockets/dist/index.browser.js' {
declare module.exports: $Exports<'rpc-websockets/dist/index.browser'>;
}
declare module 'rpc-websockets/dist/index' {
declare module.exports: $Exports<'rpc-websockets/dist'>;
}
declare module 'rpc-websockets/dist/index.js' {
declare module.exports: $Exports<'rpc-websockets/dist'>;
}
declare module 'rpc-websockets/dist/lib/client.js' {
declare module.exports: $Exports<'rpc-websockets/dist/lib/client'>;
}
declare module 'rpc-websockets/dist/lib/client/client.types.js' {
declare module.exports: $Exports<'rpc-websockets/dist/lib/client/client.types'>;
}
declare module 'rpc-websockets/dist/lib/client/websocket.browser.js' {
declare module.exports: $Exports<'rpc-websockets/dist/lib/client/websocket.browser'>;
}
declare module 'rpc-websockets/dist/lib/client/websocket.js' {
declare module.exports: $Exports<'rpc-websockets/dist/lib/client/websocket'>;
}
declare module 'rpc-websockets/dist/lib/server.js' {
declare module.exports: $Exports<'rpc-websockets/dist/lib/server'>;
}
declare module 'rpc-websockets/dist/lib/utils.js' {
declare module.exports: $Exports<'rpc-websockets/dist/lib/utils'>;
}

View File

@ -1,62 +0,0 @@
// flow-typed signature: 010ed80dfa77343a07cd101a9453f460
// flow-typed version: <<STUB>>/secp256k1_v^4.0.2/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'secp256k1'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'secp256k1' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'secp256k1/bindings' {
declare module.exports: any;
}
declare module 'secp256k1/elliptic' {
declare module.exports: any;
}
declare module 'secp256k1/lib/elliptic' {
declare module.exports: any;
}
declare module 'secp256k1/lib' {
declare module.exports: any;
}
// Filename aliases
declare module 'secp256k1/bindings.js' {
declare module.exports: $Exports<'secp256k1/bindings'>;
}
declare module 'secp256k1/elliptic.js' {
declare module.exports: $Exports<'secp256k1/elliptic'>;
}
declare module 'secp256k1/index' {
declare module.exports: $Exports<'secp256k1'>;
}
declare module 'secp256k1/index.js' {
declare module.exports: $Exports<'secp256k1'>;
}
declare module 'secp256k1/lib/elliptic.js' {
declare module.exports: $Exports<'secp256k1/lib/elliptic'>;
}
declare module 'secp256k1/lib/index' {
declare module.exports: $Exports<'secp256k1/lib'>;
}
declare module 'secp256k1/lib/index.js' {
declare module.exports: $Exports<'secp256k1/lib'>;
}

View File

@ -1,340 +0,0 @@
// flow-typed signature: be25eb3acc001250afea0eb7dacd26f6
// flow-typed version: <<STUB>>/sinon_v^9.2.4/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'sinon'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'sinon' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'sinon/lib/sinon-esm' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/assert' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/behavior' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/blob' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/collect-own-methods' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/color' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/create-sandbox' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/default-behaviors' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/fake' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/mock-expectation' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/mock' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/proxy-call-util' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/proxy-call' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/proxy-invoke' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/proxy' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/restore-object' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/sandbox' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/spy-formatters' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/spy' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/stub' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/throw-on-falsy-object' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/default-config' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/export-async-behaviors' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/extend' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/format' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/function-to-string' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/get-config' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/get-next-tick' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/get-property-descriptor' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/is-es-module' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/is-non-existent-property' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/is-property-configurable' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/is-restorable' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/next-tick' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/restore' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/times-in-words' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/use-promise-library' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/walk-object' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/walk' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/core/wrap-method' {
declare module.exports: any;
}
declare module 'sinon/lib/sinon/util/fake-timers' {
declare module.exports: any;
}
declare module 'sinon/pkg/sinon-esm' {
declare module.exports: any;
}
declare module 'sinon/pkg/sinon-no-sourcemaps' {
declare module.exports: any;
}
declare module 'sinon/pkg/sinon' {
declare module.exports: any;
}
// Filename aliases
declare module 'sinon/lib/sinon-esm.js' {
declare module.exports: $Exports<'sinon/lib/sinon-esm'>;
}
declare module 'sinon/lib/sinon.js' {
declare module.exports: $Exports<'sinon/lib/sinon'>;
}
declare module 'sinon/lib/sinon/assert.js' {
declare module.exports: $Exports<'sinon/lib/sinon/assert'>;
}
declare module 'sinon/lib/sinon/behavior.js' {
declare module.exports: $Exports<'sinon/lib/sinon/behavior'>;
}
declare module 'sinon/lib/sinon/blob.js' {
declare module.exports: $Exports<'sinon/lib/sinon/blob'>;
}
declare module 'sinon/lib/sinon/collect-own-methods.js' {
declare module.exports: $Exports<'sinon/lib/sinon/collect-own-methods'>;
}
declare module 'sinon/lib/sinon/color.js' {
declare module.exports: $Exports<'sinon/lib/sinon/color'>;
}
declare module 'sinon/lib/sinon/create-sandbox.js' {
declare module.exports: $Exports<'sinon/lib/sinon/create-sandbox'>;
}
declare module 'sinon/lib/sinon/default-behaviors.js' {
declare module.exports: $Exports<'sinon/lib/sinon/default-behaviors'>;
}
declare module 'sinon/lib/sinon/fake.js' {
declare module.exports: $Exports<'sinon/lib/sinon/fake'>;
}
declare module 'sinon/lib/sinon/mock-expectation.js' {
declare module.exports: $Exports<'sinon/lib/sinon/mock-expectation'>;
}
declare module 'sinon/lib/sinon/mock.js' {
declare module.exports: $Exports<'sinon/lib/sinon/mock'>;
}
declare module 'sinon/lib/sinon/proxy-call-util.js' {
declare module.exports: $Exports<'sinon/lib/sinon/proxy-call-util'>;
}
declare module 'sinon/lib/sinon/proxy-call.js' {
declare module.exports: $Exports<'sinon/lib/sinon/proxy-call'>;
}
declare module 'sinon/lib/sinon/proxy-invoke.js' {
declare module.exports: $Exports<'sinon/lib/sinon/proxy-invoke'>;
}
declare module 'sinon/lib/sinon/proxy.js' {
declare module.exports: $Exports<'sinon/lib/sinon/proxy'>;
}
declare module 'sinon/lib/sinon/restore-object.js' {
declare module.exports: $Exports<'sinon/lib/sinon/restore-object'>;
}
declare module 'sinon/lib/sinon/sandbox.js' {
declare module.exports: $Exports<'sinon/lib/sinon/sandbox'>;
}
declare module 'sinon/lib/sinon/spy-formatters.js' {
declare module.exports: $Exports<'sinon/lib/sinon/spy-formatters'>;
}
declare module 'sinon/lib/sinon/spy.js' {
declare module.exports: $Exports<'sinon/lib/sinon/spy'>;
}
declare module 'sinon/lib/sinon/stub.js' {
declare module.exports: $Exports<'sinon/lib/sinon/stub'>;
}
declare module 'sinon/lib/sinon/throw-on-falsy-object.js' {
declare module.exports: $Exports<'sinon/lib/sinon/throw-on-falsy-object'>;
}
declare module 'sinon/lib/sinon/util/core/default-config.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/default-config'>;
}
declare module 'sinon/lib/sinon/util/core/export-async-behaviors.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/export-async-behaviors'>;
}
declare module 'sinon/lib/sinon/util/core/extend.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/extend'>;
}
declare module 'sinon/lib/sinon/util/core/format.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/format'>;
}
declare module 'sinon/lib/sinon/util/core/function-to-string.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/function-to-string'>;
}
declare module 'sinon/lib/sinon/util/core/get-config.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/get-config'>;
}
declare module 'sinon/lib/sinon/util/core/get-next-tick.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/get-next-tick'>;
}
declare module 'sinon/lib/sinon/util/core/get-property-descriptor.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/get-property-descriptor'>;
}
declare module 'sinon/lib/sinon/util/core/is-es-module.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/is-es-module'>;
}
declare module 'sinon/lib/sinon/util/core/is-non-existent-property.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/is-non-existent-property'>;
}
declare module 'sinon/lib/sinon/util/core/is-property-configurable.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/is-property-configurable'>;
}
declare module 'sinon/lib/sinon/util/core/is-restorable.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/is-restorable'>;
}
declare module 'sinon/lib/sinon/util/core/next-tick.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/next-tick'>;
}
declare module 'sinon/lib/sinon/util/core/restore.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/restore'>;
}
declare module 'sinon/lib/sinon/util/core/times-in-words.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/times-in-words'>;
}
declare module 'sinon/lib/sinon/util/core/use-promise-library.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/use-promise-library'>;
}
declare module 'sinon/lib/sinon/util/core/walk-object.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/walk-object'>;
}
declare module 'sinon/lib/sinon/util/core/walk.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/walk'>;
}
declare module 'sinon/lib/sinon/util/core/wrap-method.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/core/wrap-method'>;
}
declare module 'sinon/lib/sinon/util/fake-timers.js' {
declare module.exports: $Exports<'sinon/lib/sinon/util/fake-timers'>;
}
declare module 'sinon/pkg/sinon-esm.js' {
declare module.exports: $Exports<'sinon/pkg/sinon-esm'>;
}
declare module 'sinon/pkg/sinon-no-sourcemaps.js' {
declare module.exports: $Exports<'sinon/pkg/sinon-no-sourcemaps'>;
}
declare module 'sinon/pkg/sinon.js' {
declare module.exports: $Exports<'sinon/pkg/sinon'>;
}

View File

@ -1,56 +0,0 @@
// flow-typed signature: 93e1c7b898500d4a0bfe05d7e7bdd0b9
// flow-typed version: <<STUB>>/superstruct_v^0.8.3/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'superstruct'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'superstruct' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'superstruct/lib/index.es' {
declare module.exports: any;
}
declare module 'superstruct/lib' {
declare module.exports: any;
}
declare module 'superstruct/umd/superstruct' {
declare module.exports: any;
}
declare module 'superstruct/umd/superstruct.min' {
declare module.exports: any;
}
// Filename aliases
declare module 'superstruct/lib/index.es.js' {
declare module.exports: $Exports<'superstruct/lib/index.es'>;
}
declare module 'superstruct/lib/index' {
declare module.exports: $Exports<'superstruct/lib'>;
}
declare module 'superstruct/lib/index.js' {
declare module.exports: $Exports<'superstruct/lib'>;
}
declare module 'superstruct/umd/superstruct.js' {
declare module.exports: $Exports<'superstruct/umd/superstruct'>;
}
declare module 'superstruct/umd/superstruct.min.js' {
declare module.exports: $Exports<'superstruct/umd/superstruct.min'>;
}

View File

@ -1,53 +0,0 @@
// flow-typed signature: 607d90b805d229d69250b382713c4087
// flow-typed version: <<STUB>>/tweetnacl_v^1.0.0/flow_v0.130.0
/**
* This is an autogenerated libdef stub for:
*
* 'tweetnacl'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/
declare module 'tweetnacl' {
declare module.exports: any;
}
/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'tweetnacl/nacl-fast' {
declare module.exports: any;
}
declare module 'tweetnacl/nacl-fast.min' {
declare module.exports: any;
}
declare module 'tweetnacl/nacl' {
declare module.exports: any;
}
declare module 'tweetnacl/nacl.min' {
declare module.exports: any;
}
// Filename aliases
declare module 'tweetnacl/nacl-fast.js' {
declare module.exports: $Exports<'tweetnacl/nacl-fast'>;
}
declare module 'tweetnacl/nacl-fast.min.js' {
declare module.exports: $Exports<'tweetnacl/nacl-fast.min'>;
}
declare module 'tweetnacl/nacl.js' {
declare module.exports: $Exports<'tweetnacl/nacl'>;
}
declare module 'tweetnacl/nacl.min.js' {
declare module.exports: $Exports<'tweetnacl/nacl.min'>;
}

1132
web3.js/module.d.ts vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2024
web3.js/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@
},
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"types": "lib/index.d.ts",
"types": "lib/types/index.d.ts",
"browserslist": [
"defaults",
"not IE 11",
@ -48,14 +48,14 @@
"scripts": {
"bpf-sdk:install": "npm run clean:fixtures; bin/bpf-sdk-install.sh .",
"bpf-sdk:remove-symlinks": "find bpf-sdk -type l -print -exec cp {} {}.tmp \\; -exec mv {}.tmp {} \\;",
"build": "cross-env NODE_ENV=production rollup -c",
"build": "cross-env NODE_ENV=production rollup -c; npx flowgen lib/types/index.d.ts -o module.flow.js",
"build:browser-test": "rollup -c test/rollup.config.js",
"build:fixtures": "set -ex; ./test/fixtures/noop-c/build.sh; ./test/fixtures/noop-rust/build.sh",
"clean:fixtures": "make -C examples/bpf-c-noop clean ",
"clean": "rimraf ./coverage ./lib",
"codecov": "set -ex; npm run test:cover; cat ./coverage/lcov.info | codecov",
"dev": "cross-env NODE_ENV=development rollup -c",
"doc": "set -ex; esdoc; node -p '\"\\nDocumentation coverage: \" + require(\"./doc/coverage.json\").coverage'",
"doc": "set -ex; typedoc",
"defs": "set -ex; flow check-contents < module.flow.js; tsc module.d.ts",
"doc:watch": "watch 'npm run doc' . --wait=1 --ignoreDirectoryPattern=/doc/",
"examples": "set -ex; for example in examples/*.js; do node $example; done",
@ -102,7 +102,7 @@
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/preset-flow": "^7.12.1",
"@babel/preset-typescript": "^7.12.16",
"@babel/register": "^7.12.13",
"@commitlint/config-conventional": "^12.0.1",
"@commitlint/travis-cli": "^12.0.1",
@ -114,20 +114,17 @@
"@rollup/plugin-node-resolve": "^11.1.1",
"@rollup/plugin-replace": "^2.3.4",
"@solana/spl-token": "^0.0.13",
"@types/bn.js": "^5.1.0",
"@types/bs58": "^4.0.1",
"@types/node": "^14.14.26",
"@types/node-fetch": "^2.5.8",
"@types/secp256k1": "^4.0.1",
"@typescript-eslint/eslint-plugin": "^4.14.2",
"@typescript-eslint/parser": "^4.14.2",
"babel-eslint": "^11.0.0-beta.2",
"chai": "^4.3.0",
"chai-as-promised": "^7.1.1",
"codecov": "^3.0.4",
"cross-env": "7.0.3",
"esdoc": "^1.1.0",
"esdoc-ecmascript-proposal-plugin": "^1.0.0",
"esdoc-flow-type-plugin": "^1.1.0",
"esdoc-importpath-plugin": "^1.0.2",
"esdoc-inject-style-plugin": "^1.0.0",
"esdoc-standard-plugin": "^1.0.0",
"eslint": "^7.19.0",
"eslint-config-prettier": "^8.0.0",
"eslint-plugin-flowtype": "^5.2.0",
@ -138,6 +135,7 @@
"flow-bin": "0.130.0",
"flow-remove-types": "^2.143.1",
"flow-typed": "3.3.1",
"flowgen": "^1.13.0",
"http-server": "^0.12.3",
"mocha": "^8.2.1",
"mocha-headless-chrome": "^3.1.0",
@ -147,13 +145,16 @@
"prettier": "^2.0.0",
"rimraf": "3.0.2",
"rollup": "2.40.0",
"rollup-plugin-copy": "^3.3.0",
"rollup-plugin-flat-dts": "^1.0.3",
"rollup-plugin-node-polyfills": "^0.2.1",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-ts": "^1.3.7",
"semantic-release": "^17.0.2",
"sinon": "^9.2.4",
"start-server-and-test": "^1.12.0",
"typescript": "^4.1.3",
"tslib": "^2.1.0",
"typedoc": "^0.20.31",
"typescript": "^4.1.5",
"watch": "^1.0.2"
}
}

View File

@ -1,31 +1,38 @@
import babel from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import copy from 'rollup-plugin-copy';
import flowRemoveTypes from 'flow-remove-types';
import json from '@rollup/plugin-json';
import typescript from 'rollup-plugin-ts';
import nodeResolve from '@rollup/plugin-node-resolve';
import nodePolyfills from 'rollup-plugin-node-polyfills';
import replace from '@rollup/plugin-replace';
import {terser} from 'rollup-plugin-terser';
const env = process.env.NODE_ENV;
const extensions = ['.js', '.ts'];
function generateConfig(configType, format) {
const browser = configType === 'browser';
const bundle = format === 'iife';
const generateTypescript = configType === 'typescript';
const config = {
input: 'src/index.js',
input: 'src/index.ts',
plugins: [
flow(),
commonjs(),
nodeResolve({
browser,
preferBuiltins: !browser,
dedupe: ['bn.js', 'buffer'],
extensions,
preferBuiltins: !browser,
}),
generateTypescript
? typescript({
browserslist: false,
})
: undefined,
babel({
exclude: '**/node_modules/**',
extensions,
babelHelpers: bundle ? 'bundled' : 'runtime',
plugins: bundle ? [] : ['@babel/plugin-transform-runtime'],
}),
@ -33,9 +40,6 @@ function generateConfig(configType, format) {
'process.env.NODE_ENV': JSON.stringify(env),
'process.env.BROWSER': JSON.stringify(browser),
}),
copy({
targets: [{src: 'module.d.ts', dest: 'lib', rename: 'index.d.ts'}],
}),
],
onwarn: function (warning, rollupWarn) {
if (warning.code !== 'CIRCULAR_DEPENDENCY') {
@ -47,6 +51,24 @@ function generateConfig(configType, format) {
},
};
if (configType !== 'browser') {
// Prevent dependencies from being bundled
config.external = [
/@babel\/runtime/,
'bn.js',
'bs58',
'buffer-layout',
'crypto-hash',
'jayson/lib/client/browser',
'js-sha3',
'node-fetch',
'rpc-websockets',
'secp256k1',
'superstruct',
'tweetnacl',
];
}
switch (configType) {
case 'browser':
switch (format) {
@ -121,22 +143,12 @@ function generateConfig(configType, format) {
sourcemap: true,
},
];
// Prevent dependencies from being bundled
config.external = [
/@babel\/runtime/,
'bn.js',
'bs58',
'buffer-layout',
'crypto-hash',
'jayson/lib/client/browser',
'js-sha3',
'node-fetch',
'rpc-websockets',
'secp256k1',
'superstruct',
'tweetnacl',
];
break;
case 'typescript':
config.output = {
file: 'lib/types/index.d.ts',
};
config.plugins.push(json());
break;
default:
throw new Error(`Unknown configType: ${configType}`);
@ -147,18 +159,7 @@ function generateConfig(configType, format) {
export default [
generateConfig('node'),
generateConfig('typescript'),
generateConfig('browser', 'esm'),
generateConfig('browser', 'iife'),
];
// Using this instead of rollup-plugin-flow due to
// https://github.com/leebyron/rollup-plugin-flow/issues/5
function flow() {
return {
name: 'flow-remove-types',
transform: code => ({
code: flowRemoveTypes(code).toString(),
map: null,
}),
};
}

22
web3.js/tsconfig.json Normal file
View File

@ -0,0 +1,22 @@
{
"compilerOptions": {
"target": "esnext",
"allowJs": true,
"skipLibCheck": true,
"declaration": true,
"declarationMap": true,
"declarationDir": "lib/types",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"baseUrl": "src",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true
},
"include": ["src"]
}

6
web3.js/typedoc.json Normal file
View File

@ -0,0 +1,6 @@
{
"entryPoints": ["src/index.ts"],
"excludeInternal": true,
"excludePrivate": true,
"out": "doc"
}