Browse Source

fix exporting and doc generation missing types

master
nitowa 2 years ago
parent
commit
b78a1ca6bc
4 changed files with 150 additions and 1180 deletions
  1. 129
    1168
      package-lock.json
  2. 16
    10
      package.json
  3. 3
    0
      src/index.ts
  4. 2
    2
      test/CONSTANTS.ts

+ 129
- 1168
package-lock.json
File diff suppressed because it is too large
View File


+ 16
- 10
package.json View File

1
 {
1
 {
2
   "name": "xrpio",
2
   "name": "xrpio",
3
-  "version": "0.0.1",
3
+  "version": "0.0.2",
4
+  "repository": {
5
+    "type": "git",
6
+    "url": "https://gitea.nitowa.xyz/npm-packages/xrpio.git"
7
+  },
8
+  "bugs": {
9
+    "url": "https://gitea.nitowa.xyz/npm-packages/xrpio/issues",
10
+    "email": "peter.millauer@gmail.com"
11
+  },
12
+  "homepage": "https://gitea.nitowa.xyz/docs/xrpio",
4
   "description": "XRP arbitrary data writer and reader",
13
   "description": "XRP arbitrary data writer and reader",
5
-  "main": "lib/src/xrpIO/ripple-bindings.js",
14
+  "main": "lib/src/index.js",
6
   "scripts": {
15
   "scripts": {
7
     "clean": "rm -rf gui/main.js gui/index.html gateway/main.js build lib docs",
16
     "clean": "rm -rf gui/main.js gui/index.html gateway/main.js build lib docs",
8
     "start": "npm run build && npm run launch",
17
     "start": "npm run build && npm run launch",
14
     "webpack-gateway": "webpack --config webpack.gateway.js --progress && cp build/gateway/main.js gateway",
23
     "webpack-gateway": "webpack --config webpack.gateway.js --progress && cp build/gateway/main.js gateway",
15
     "test": "npm run build && mocha --bail=true ./lib/test/*.js",
24
     "test": "npm run build && mocha --bail=true ./lib/test/*.js",
16
     "deploy": "node ./lib/Deploy.js",
25
     "deploy": "node ./lib/Deploy.js",
17
-    "docs": "typedoc --out docs --readme ./README.md --plugin typedoc-plugin-markdown --hideBreadcrumbs ./src/xrpIO/ripple-binding.ts"
26
+    "docs": "typedoc --out docs --readme ./README.md --plugin typedoc-plugin-markdown --hideBreadcrumbs ./src/index.ts"
18
   },
27
   },
19
   "author": "nitowa",
28
   "author": "nitowa",
20
   "license": "MIT",
29
   "license": "MIT",
29
     "browserify-zlib": "^0.2.0",
38
     "browserify-zlib": "^0.2.0",
30
     "chai": "^4.3.4",
39
     "chai": "^4.3.4",
31
     "crypto-browserify": "^3.12.0",
40
     "crypto-browserify": "^3.12.0",
32
-    "mocha": "^8.3.2",
33
-    "node-fetch": "^2.6.1",
41
+    "mocha": "^9.2.0",
42
+    "node-fetch": "^2.6.2",
34
     "process": "^0.11.10",
43
     "process": "^0.11.10",
35
     "ts-loader": "^8.1.0",
44
     "ts-loader": "^8.1.0",
36
     "typedoc": "^0.22.11",
45
     "typedoc": "^0.22.11",
37
     "typedoc-plugin-markdown": "^3.11.12",
46
     "typedoc-plugin-markdown": "^3.11.12",
38
-    "typescript": "^3.9.5",
39
-    "utf8": "^3.0.0",
40
-    "webpack": "^5.30.0",
41
-    "webpack-bundle-analyzer": "^4.4.0",
42
-    "webpack-cli": "^4.6.0"
47
+    "typescript": "^4.5.0",
48
+    "utf8": "^3.0.0"
43
   }
49
   }
44
 }
50
 }

+ 3
- 0
src/index.ts View File

1
+export * from './xrpIO/ripple-binding'
2
+export * from './util/types'
3
+export * from './util/protocol.constants'

+ 2
- 2
test/CONSTANTS.ts View File

5
 }
5
 }
6
 export const TEST_DATA = "test123123"
6
 export const TEST_DATA = "test123123"
7
 
7
 
8
-const fetch = require('node-fetch')
8
+import fetch from 'node-fetch';
9
 
9
 
10
 export const makeTestnetWallet = () : Promise<Wallet> => fetch('https://faucet.altnet.rippletest.net/accounts', {
10
 export const makeTestnetWallet = () : Promise<Wallet> => fetch('https://faucet.altnet.rippletest.net/accounts', {
11
     method: 'POST',
11
     method: 'POST',
13
         'Accept': 'application/json',
13
         'Accept': 'application/json',
14
         'Content-Type': 'application/json'
14
         'Content-Type': 'application/json'
15
     },
15
     },
16
-}).then(raw => {
16
+}).then((raw:any) => {
17
     return raw.json().then(content => {
17
     return raw.json().then(content => {
18
         return({
18
         return({
19
             secret: content.account.secret,
19
             secret: content.account.secret,

Loading…
Cancel
Save