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,8 +1,17 @@
1 1
 {
2 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 13
   "description": "XRP arbitrary data writer and reader",
5
-  "main": "lib/src/xrpIO/ripple-bindings.js",
14
+  "main": "lib/src/index.js",
6 15
   "scripts": {
7 16
     "clean": "rm -rf gui/main.js gui/index.html gateway/main.js build lib docs",
8 17
     "start": "npm run build && npm run launch",
@@ -14,7 +23,7 @@
14 23
     "webpack-gateway": "webpack --config webpack.gateway.js --progress && cp build/gateway/main.js gateway",
15 24
     "test": "npm run build && mocha --bail=true ./lib/test/*.js",
16 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 28
   "author": "nitowa",
20 29
   "license": "MIT",
@@ -29,16 +38,13 @@
29 38
     "browserify-zlib": "^0.2.0",
30 39
     "chai": "^4.3.4",
31 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 43
     "process": "^0.11.10",
35 44
     "ts-loader": "^8.1.0",
36 45
     "typedoc": "^0.22.11",
37 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

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

Loading…
Cancel
Save