near-cli-rs 0.7.0 → 0.7.8
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/CHANGELOG.md +63 -0
- package/README.md +51 -21
- package/binary.js +26 -22
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,69 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.8](https://github.com/near/near-cli-rs/compare/v0.7.7...v0.7.8) - 2024-02-03
|
|
11
|
+
|
|
12
|
+
### Other
|
|
13
|
+
- Updated binary releases pipeline to use cargo-dist v0.9.0 (previously v0.7.2) ([#294](https://github.com/near/near-cli-rs/pull/294))
|
|
14
|
+
- Updated send-ft command ([#283](https://github.com/near/near-cli-rs/pull/283))
|
|
15
|
+
|
|
16
|
+
## [0.7.7](https://github.com/near/near-cli-rs/compare/v0.7.6...v0.7.7) - 2024-01-19
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- Updated dialog for entering arguments to a function (as-read-only) ([#285](https://github.com/near/near-cli-rs/pull/285))
|
|
20
|
+
|
|
21
|
+
### Other
|
|
22
|
+
- Updated binary releases pipeline to use cargo-dist v0.7.2 (previously v0.3.0) ([#289](https://github.com/near/near-cli-rs/pull/289))
|
|
23
|
+
- Avoid unnecessary "interactive_clap::FromCli" implementations ([#288](https://github.com/near/near-cli-rs/pull/288))
|
|
24
|
+
|
|
25
|
+
## [0.7.6](https://github.com/near/near-cli-rs/compare/v0.7.5...v0.7.6) - 2023-12-21
|
|
26
|
+
|
|
27
|
+
### Other
|
|
28
|
+
- Removed excessive step during transaction status view to improve UX ([#280](https://github.com/near/near-cli-rs/pull/280))
|
|
29
|
+
- Updated reconstruct-transaction command ([#281](https://github.com/near/near-cli-rs/pull/281))
|
|
30
|
+
|
|
31
|
+
## [0.7.5](https://github.com/near/near-cli-rs/compare/v0.7.4...v0.7.5) - 2023-12-19
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- Improved self-update UX with more details ([#274](https://github.com/near/near-cli-rs/pull/274))
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
- Display NEAR token amounts precisely ([#278](https://github.com/near/near-cli-rs/pull/278))
|
|
38
|
+
|
|
39
|
+
### Other
|
|
40
|
+
- Updated the guide around the usage of system keychain on Linux, Windows, and macOS ([#277](https://github.com/near/near-cli-rs/pull/277))
|
|
41
|
+
- Added explicit installation instructions to README.md
|
|
42
|
+
|
|
43
|
+
## [0.7.4](https://github.com/near/near-cli-rs/compare/v0.7.3...v0.7.4) - 2023-12-06
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
- Removed the need for an additional network selection step if there is only one network connection in the config file ([#272](https://github.com/near/near-cli-rs/pull/272))
|
|
47
|
+
- Added the ability to interactively select access keys to remove from the list of public keys ([#269](https://github.com/near/near-cli-rs/pull/269))
|
|
48
|
+
|
|
49
|
+
### Other
|
|
50
|
+
- Cleaned up duplicative CI checks and renamed 'master' to 'main' default branch
|
|
51
|
+
- Automate publishing near-cli-rs to npmjs for `npx near-cli-rs` to use the latest released binary release by default ([#273](https://github.com/near/near-cli-rs/pull/273))
|
|
52
|
+
|
|
53
|
+
## [0.7.3](https://github.com/near/near-cli-rs/compare/v0.7.2...v0.7.3) - 2023-12-02
|
|
54
|
+
|
|
55
|
+
### Added
|
|
56
|
+
- Added support for blind signing with Ledger [requires updated Ledger app that is not yet published] ([#259](https://github.com/near/near-cli-rs/pull/259))
|
|
57
|
+
- New command to reconstruct NEAR CLI command from a historical transaction ([#266](https://github.com/near/near-cli-rs/pull/266))
|
|
58
|
+
|
|
59
|
+
### Other
|
|
60
|
+
- Addressed all default cargo clippy warnings ([#263](https://github.com/near/near-cli-rs/pull/263))
|
|
61
|
+
|
|
62
|
+
## [0.7.2](https://github.com/near/near-cli-rs/compare/v0.7.1...v0.7.2) - 2023-11-21
|
|
63
|
+
|
|
64
|
+
### Added
|
|
65
|
+
- Show hash-to-sign when using the sign_later transaction signature option ([#261](https://github.com/near/near-cli-rs/pull/261))
|
|
66
|
+
|
|
67
|
+
## [0.7.1](https://github.com/near/near-cli-rs/compare/v0.7.0...v0.7.1) - 2023-11-17
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
- add `--offline` for `sign-with-ledger` option ([#260](https://github.com/near/near-cli-rs/pull/260))
|
|
71
|
+
- Updated legacy command compatibility for near-cli (JS) for dev-deploy, validators, and staking commands ([#256](https://github.com/near/near-cli-rs/pull/256))
|
|
72
|
+
|
|
10
73
|
## [0.7.0](https://github.com/near/near-cli-rs/compare/v0.6.2...v0.7.0) - 2023-10-31
|
|
11
74
|
|
|
12
75
|
### Added
|
package/README.md
CHANGED
|
@@ -10,28 +10,38 @@ Just run `near` and let it guide you through!
|
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
You can find binary releases of `near` CLI for your OS on the [Releases page](https://github.com/near/near-cli-rs/releases/).
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### Install prebuilt binaries via shell script (macOS, Linux, WSL)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
```sh
|
|
18
|
+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh
|
|
19
|
+
```
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
### Install prebuilt binaries via powershell script (Windows)
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
irm https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.ps1 | iex
|
|
21
25
|
```
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
### Run prebuilt binaries with npx (Node.js)
|
|
24
28
|
|
|
25
|
-
```
|
|
26
|
-
|
|
29
|
+
```sh
|
|
30
|
+
npx near-cli-rs
|
|
31
|
+
```
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
### Install prebuilt binaries into your npm project (Node.js)
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
npm install near-cli-rs
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Install from source code (Cargo)
|
|
40
|
+
|
|
41
|
+
Install it with `cargo`, just make sure you have [Rust](https://rustup.rs) installed on your computer.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
cargo install near-cli-rs
|
|
35
45
|
```
|
|
36
46
|
|
|
37
47
|
or, install the most recent version from git repository:
|
|
@@ -40,9 +50,9 @@ or, install the most recent version from git repository:
|
|
|
40
50
|
$ cargo install --git https://github.com/near/near-cli-rs
|
|
41
51
|
```
|
|
42
52
|
|
|
43
|
-
### GitHub Actions
|
|
53
|
+
### Install on CI (GitHub Actions)
|
|
44
54
|
|
|
45
|
-
It is often desirable to use `near` CLI from CI to automate some actions,
|
|
55
|
+
It is often desirable to use `near` CLI from CI to automate some actions, so here is an example of how you can make a function call during CI:
|
|
46
56
|
|
|
47
57
|
```yml
|
|
48
58
|
name: Release
|
|
@@ -67,7 +77,7 @@ jobs:
|
|
|
67
77
|
|
|
68
78
|
- name: Install near CLI
|
|
69
79
|
run: |
|
|
70
|
-
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/download/v0.
|
|
80
|
+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/download/v0.7.4/near-cli-rs-installer.sh | sh
|
|
71
81
|
|
|
72
82
|
- name: Call some function
|
|
73
83
|
run: |
|
|
@@ -76,16 +86,36 @@ jobs:
|
|
|
76
86
|
|
|
77
87
|
You will need to configure GitHub Actions Secrets and Variables and once it is ready, this CI will only take a couple of _seconds_ to complete!
|
|
78
88
|
|
|
79
|
-
See it
|
|
89
|
+
See how it is used in [near/devgigsboard](https://github.com/near/devgigsboard).
|
|
90
|
+
|
|
91
|
+
## Run
|
|
92
|
+
|
|
93
|
+
Once installed, you just run it with `near` command:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
$ near
|
|
97
|
+
|
|
98
|
+
? What are you up to? (select one of the options with the up-down arrows on your keyboard and press Enter)
|
|
99
|
+
> account - Manage accounts
|
|
100
|
+
tokens - Manage token assets such as NEAR, FT, NFT
|
|
101
|
+
staking - Manage staking: view, add and withdraw stake
|
|
102
|
+
contract - Manage smart-contracts: deploy code, call functions
|
|
103
|
+
transaction - Operate transactions
|
|
104
|
+
config - Manage connections in a configuration file (config.toml)
|
|
105
|
+
extension - Manage near CLI and extensions
|
|
106
|
+
[↑↓ to move, enter to select, type to filter]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The CLI interactively guides you through some pretty complex topics, helping you make informed decisions along the way.
|
|
80
110
|
|
|
81
|
-
## [
|
|
111
|
+
## [Read more in English](docs/README.en.md)
|
|
82
112
|
- [Usage](docs/README.en.md#usage)
|
|
83
113
|
- [Installation](docs/README.en.md#installation)
|
|
84
114
|
- [User Guide](docs/README.en.md#user-guide)
|
|
85
115
|
- [Config](docs/README.en.md#config)
|
|
86
116
|
- [Building](docs/README.en.md#building)
|
|
87
117
|
|
|
88
|
-
## [
|
|
118
|
+
## [Больше информации на русском языке (in Russian)](docs/README.ru.md)
|
|
89
119
|
- [Применение](docs/README.ru.md#применение)
|
|
90
120
|
- [Установка](docs/README.ru.md#установка)
|
|
91
121
|
- [Инструкция](docs/README.ru.md#инструкция)
|
package/binary.js
CHANGED
|
@@ -11,7 +11,10 @@ const error = (msg) => {
|
|
|
11
11
|
|
|
12
12
|
const { version } = require("./package.json");
|
|
13
13
|
const name = "near-cli-rs";
|
|
14
|
-
const artifact_download_url = "https://github.com/near/near-cli-rs/releases/download/v0.7.
|
|
14
|
+
const artifact_download_url = "https://github.com/near/near-cli-rs/releases/download/v0.7.8";
|
|
15
|
+
|
|
16
|
+
const builder_glibc_major_version = 2;
|
|
17
|
+
const builder_glibc_minor_version = 31;
|
|
15
18
|
|
|
16
19
|
const supportedPlatforms = {
|
|
17
20
|
"aarch64-apple-darwin": {
|
|
@@ -65,39 +68,40 @@ const getPlatform = () => {
|
|
|
65
68
|
break;
|
|
66
69
|
}
|
|
67
70
|
|
|
68
|
-
// Assume the above succeeded and build a target triple to look things up with.
|
|
69
|
-
// If any of it failed, this lookup will fail and we'll handle it like normal.
|
|
70
|
-
let target_triple = `${arch}-${os_type}`;
|
|
71
|
-
let platform = supportedPlatforms[target_triple];
|
|
72
|
-
|
|
73
|
-
if (!platform) {
|
|
74
|
-
error(
|
|
75
|
-
`Platform with type "${raw_os_type}" and architecture "${raw_architecture}" is not supported by ${name}.\nYour system must be one of the following:\n\n${Object.keys(supportedPlatforms).join(",")}`
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// These are both situation where you might toggle to unknown-linux-musl but we don't support that yet
|
|
80
71
|
if (raw_os_type === "Linux") {
|
|
81
|
-
if (libc.
|
|
82
|
-
|
|
72
|
+
if (libc.familySync() == 'musl') {
|
|
73
|
+
os_type = "unknown-linux-musl-dynamic";
|
|
74
|
+
} else if (libc.isNonGlibcLinuxSync()) {
|
|
75
|
+
console.warn("Your libc is neither glibc nor musl; trying static musl binary instead");
|
|
76
|
+
os_type = "unknown-linux-musl-static";
|
|
83
77
|
} else {
|
|
84
78
|
let libc_version = libc.versionSync();
|
|
85
79
|
let split_libc_version = libc_version.split(".");
|
|
86
80
|
let libc_major_version = split_libc_version[0];
|
|
87
81
|
let libc_minor_version = split_libc_version[1];
|
|
88
|
-
let min_major_version = 2;
|
|
89
|
-
let min_minor_version = 17;
|
|
90
82
|
if (
|
|
91
|
-
libc_major_version
|
|
92
|
-
libc_minor_version <
|
|
83
|
+
libc_major_version != builder_glibc_major_version ||
|
|
84
|
+
libc_minor_version < builder_glibc_minor_version
|
|
93
85
|
) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
);
|
|
86
|
+
// We can't run the glibc binaries, but we can run the static musl ones
|
|
87
|
+
// if they exist
|
|
88
|
+
console.warn("Your glibc isn't compatible; trying static musl binary instead");
|
|
89
|
+
os_type = "unknown-linux-musl-static";
|
|
97
90
|
}
|
|
98
91
|
}
|
|
99
92
|
}
|
|
100
93
|
|
|
94
|
+
// Assume the above succeeded and build a target triple to look things up with.
|
|
95
|
+
// If any of it failed, this lookup will fail and we'll handle it like normal.
|
|
96
|
+
let target_triple = `${arch}-${os_type}`;
|
|
97
|
+
let platform = supportedPlatforms[target_triple];
|
|
98
|
+
|
|
99
|
+
if (!platform) {
|
|
100
|
+
error(
|
|
101
|
+
`Platform with type "${raw_os_type}" and architecture "${raw_architecture}" is not supported by ${name}.\nYour system must be one of the following:\n\n${Object.keys(supportedPlatforms).join(",")}`
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
101
105
|
return platform;
|
|
102
106
|
};
|
|
103
107
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "near-cli-rs",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "near-cli-rs",
|
|
9
|
-
"version": "0.7.
|
|
9
|
+
"version": "0.7.8",
|
|
10
10
|
"license": "MIT OR Apache-2.0",
|
|
11
11
|
"hasInstallScript": true,
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "near-cli-rs",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"description": "human-friendly console utility that helps to interact with NEAR Protocol from command line.",
|
|
5
5
|
"repository": "https://github.com/near/near-cli-rs",
|
|
6
6
|
"homepage": "https://near.cli.rs",
|