evernode-js-client 0.5.10 → 0.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "env": {
3
+ "browser": true,
4
+ "commonjs": true,
5
+ "es2021": true
6
+ },
7
+ "extends": "eslint:recommended",
8
+ "parserOptions": {
9
+ "ecmaVersion": 13
10
+ },
11
+ "rules": {
12
+ "no-async-promise-executor": "off"
13
+ }
14
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 HotPocketDev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,4 +1,26 @@
1
- # Evernode library for nodejs and browser.
2
- Evernode library contains helper methods to interact with Evernode ecosystem.
1
+ # Evernode js client
2
+ Javascript client library for Evernode.
3
+ (Only tested on NodeJS)
3
4
 
4
- - [Source code](https://github.com/HotPocketDev/evernode-js-client)
5
+ ## Prerequisites
6
+ ```
7
+ npm i -g @vercel/ncc
8
+ ```
9
+
10
+ ## Publish to npm
11
+ First, update the version in package.json.
12
+ ```
13
+ npm install
14
+ npm login
15
+ npm run publish
16
+ ```
17
+
18
+ ## Running tests
19
+ ```
20
+ cd test
21
+ npm install
22
+ node test.js
23
+ ```
24
+
25
+ ## NPM package
26
+ https://www.npmjs.com/package/evernode-js-client
package/clean-pkg.sh ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+ # Create a clean dist/package.json for publishing.
3
+ node -p "const pkg=require('./package.json'); delete pkg.scripts; delete pkg.devDependencies; JSON.stringify(pkg, null, 4)" \
4
+ > dist/package.json
package/npm-readme.md ADDED
@@ -0,0 +1,4 @@
1
+ # Evernode library for nodejs and browser.
2
+ Evernode library contains helper methods to interact with Evernode ecosystem.
3
+
4
+ - [Source code](https://github.com/HotPocketDev/evernode-js-client)
package/package.json CHANGED
@@ -6,7 +6,13 @@
6
6
  ],
7
7
  "homepage": "https://github.com/HotPocketDev/evernode-js-client",
8
8
  "license": "MIT",
9
- "version": "0.5.10",
9
+ "version": "0.5.11",
10
+ "scripts": {
11
+ "lint": "./node_modules/.bin/eslint src/**/*.js",
12
+ "build": "npm run lint && ncc build src/index.js -e elliptic -e xrpl -e ripple-address-codec -e ripple-keypairs -o dist/",
13
+ "bundle": "npm run build && ./clean-pkg.sh",
14
+ "publish": "npm run bundle && cp npm-readme.md dist/README.md && npm publish ./dist"
15
+ },
10
16
  "dependencies": {
11
17
  "elliptic": "6.5.4",
12
18
  "libsodium-wrappers": "0.7.10",
@@ -14,5 +20,8 @@
14
20
  "ripple-keypairs": "1.1.0",
15
21
  "xrpl": "2.2.1",
16
22
  "xrpl-binary-codec": "1.4.2"
23
+ },
24
+ "devDependencies": {
25
+ "eslint": "8.3.0"
17
26
  }
18
27
  }
@@ -0,0 +1,10 @@
1
+ #!/bin/bash
2
+ # This script removes previous npm package versions. (need to be logged into npm first)
3
+
4
+ for i in {0..36}
5
+ do
6
+ pkg="evernode-js-client@0.4.$i"
7
+ echo Unpublishing $pkg
8
+ npm unpublish $pkg
9
+ sleep 2
10
+ done