near-cli-rs 0.3.4
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.
- near-cli-rs-v0.3.4-npm-package/.gitignore +1 -0
- near-cli-rs-v0.3.4-npm-package/CHANGELOG.md +45 -0
- near-cli-rs-v0.3.4-npm-package/LICENSE-APACHE +201 -0
- near-cli-rs-v0.3.4-npm-package/LICENSE-MIT +21 -0
- near-cli-rs-v0.3.4-npm-package/README.md +93 -0
- near-cli-rs-v0.3.4-npm-package/binary.js +136 -0
- near-cli-rs-v0.3.4-npm-package/install.js +4 -0
- near-cli-rs-v0.3.4-npm-package/npm-shrinkwrap.json +354 -0
- near-cli-rs-v0.3.4-npm-package/package.json +35 -0
- near-cli-rs-v0.3.4-npm-package/run.js +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/node_modules
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.3.4](https://github.com/near/near-cli-rs/compare/v0.3.3...v0.3.4) - 2023-04-20
|
|
11
|
+
|
|
12
|
+
### Other
|
|
13
|
+
- Enable self-update on CI and NPM installer for binary releases (#183)
|
|
14
|
+
- release v0.3.3 (#182)
|
|
15
|
+
|
|
16
|
+
## [0.3.3](https://github.com/near/near-cli-rs/compare/v0.3.2...v0.3.3) - 2023-04-20
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- Added support for Contract Storage Management Standard (#179)
|
|
20
|
+
|
|
21
|
+
### Other
|
|
22
|
+
- update release-plz-action to v0.5 (#180)
|
|
23
|
+
|
|
24
|
+
## [0.3.2](https://github.com/near/near-cli-rs/compare/v0.3.1...v0.3.2) - 2023-04-11
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- Show contract function call result and make it usable in scripts by only writing the result to stdout, and everything else will be printed to stderr (#177)
|
|
28
|
+
- Use optimisticly latest nonce for the access key instead of the final one to avoid errors running commands one after the other (#176)
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
- fixed printing about saving the access key (#173)
|
|
32
|
+
|
|
33
|
+
### Other
|
|
34
|
+
- Added GitHub Actions installation instructions
|
|
35
|
+
|
|
36
|
+
## [0.3.1](https://github.com/near/near-cli-rs/compare/v0.3.0...v0.3.1) - 2023-04-06
|
|
37
|
+
|
|
38
|
+
### Other
|
|
39
|
+
- Use custom GITHUB_TOKEN to be able to trigger follow up CI jobs
|
|
40
|
+
- make a git tag with Release-plz, so it triggers binary release pipeline (#170)
|
|
41
|
+
|
|
42
|
+
## [0.3.0] - 2023-04-06
|
|
43
|
+
|
|
44
|
+
* Renamed `near-cli` binary to `near` as it has special handlers for the commands of near CLI JS, and can be used as a replacement to near CLI JS that will guide users on how to use the new commands when they type the old commands.
|
|
45
|
+
* Improved continuous integration pipelines to streamline releases (each push to `master` branch will trigger a pipeline that will create a PR suggesting to cut a new release, and once the version is ticked, crate will be published and tagged, and then binary release pipeline will kick in)
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2020-2022 Near Inc
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-2022 Near Inc
|
|
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.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# NEAR CLI
|
|
2
|
+
|
|
3
|
+
near CLI is your **human-friendly** companion that helps to interact with [NEAR Protocol](https://near.org) from command line.
|
|
4
|
+
|
|
5
|
+
Just run `near` and let it guide you through!
|
|
6
|
+
|
|
7
|
+
<p>
|
|
8
|
+
<img src="docs/media/create-account.svg" alt="" width="1200">
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
### Locally
|
|
14
|
+
|
|
15
|
+
Download pre-compiled version of `near` CLI for your OS from the [Releases page](https://github.com/near/near-cli-rs/releases/).
|
|
16
|
+
|
|
17
|
+
Alternatively, install it with `cargo` if you have [Rust](https://rustup.rs) installed on your computer:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
$ cargo install near-cli-rs
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Here is the expected output when you run it:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
$ near
|
|
27
|
+
|
|
28
|
+
? What are you up to? (select one of the options with the up-down arrows on your keyboard and press Enter)
|
|
29
|
+
> account - Manage accounts
|
|
30
|
+
tokens - Manage token assets such as NEAR, FT, NFT
|
|
31
|
+
contract - Manage smart-contracts: deploy code, call functions
|
|
32
|
+
transaction - Operate transactions
|
|
33
|
+
config - Manage connections in a configuration file (config.toml)
|
|
34
|
+
[↑↓ to move, enter to select, type to filter]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
or, install the most recent version from git repository:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
$ cargo install --git https://github.com/near/near-cli-rs
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### GitHub Actions
|
|
44
|
+
|
|
45
|
+
It is often desirable to use `near` CLI from CI to automate some actions, and so you can use this following script if you want to make a function call during CI:
|
|
46
|
+
|
|
47
|
+
```yml
|
|
48
|
+
name: Release
|
|
49
|
+
on:
|
|
50
|
+
push:
|
|
51
|
+
branches: [main]
|
|
52
|
+
|
|
53
|
+
jobs:
|
|
54
|
+
deploy-widgets:
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
name: Make a function call on mainnet
|
|
57
|
+
env:
|
|
58
|
+
NEAR_NETWORK_CONNECTION: mainnet
|
|
59
|
+
NEAR_CONTRACT_ACCOUNT_ID: ${{ vars.NEAR_CONTRACT_ACCOUNT_ID }}
|
|
60
|
+
NEAR_SIGNER_ACCOUNT_ID: ${{ vars.NEAR_SIGNER_ACCOUNT_ID }}
|
|
61
|
+
NEAR_SIGNER_ACCOUNT_PUBLIC_KEY: ${{ vars.NEAR_SIGNER_ACCOUNT_PUBLIC_KEY }}
|
|
62
|
+
NEAR_SIGNER_ACCOUNT_PRIVATE_KEY: ${{ secrets.NEAR_SIGNER_ACCOUNT_PRIVATE_KEY }}
|
|
63
|
+
|
|
64
|
+
steps:
|
|
65
|
+
- name: Checkout repository
|
|
66
|
+
uses: actions/checkout@v2
|
|
67
|
+
|
|
68
|
+
- name: Install near CLI
|
|
69
|
+
run: |
|
|
70
|
+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/download/v0.3.1/near-cli-rs-v0.3.1-installer.sh | sh
|
|
71
|
+
|
|
72
|
+
- name: Call some function
|
|
73
|
+
run: |
|
|
74
|
+
near contract call-function as-transaction "$NEAR_CONTRACT_ACCOUNT_ID" 'function_name_here' json-args '{}' prepaid-gas '100 TeraGas' attached-deposit '0 NEAR' sign-as "$NEAR_SIGNER_ACCOUNT_ID" network-config "$NEAR_NETWORK_CONNECTION" sign-with-plaintext-private-key --signer-public-key "$NEAR_SIGNER_ACCOUNT_PUBLIC_KEY" --signer-private-key "$NEAR_SIGNER_ACCOUNT_PRIVATE_KEY" send
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
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
|
+
|
|
79
|
+
See it in action used in [near/devgigsboard](https://github.com/near/devgigsboard).
|
|
80
|
+
|
|
81
|
+
## [README in English](docs/README.en.md)
|
|
82
|
+
- [Usage](docs/README.en.md#usage)
|
|
83
|
+
- [Installation](docs/README.en.md#installation)
|
|
84
|
+
- [User Guide](docs/README.en.md#user-guide)
|
|
85
|
+
- [Config](docs/README.en.md#config)
|
|
86
|
+
- [Building](docs/README.en.md#building)
|
|
87
|
+
|
|
88
|
+
## [README на Русском (in Russian)](docs/README.ru.md)
|
|
89
|
+
- [Применение](docs/README.ru.md#применение)
|
|
90
|
+
- [Установка](docs/README.ru.md#установка)
|
|
91
|
+
- [Инструкция](docs/README.ru.md#инструкция)
|
|
92
|
+
- [Конфигурационный файл](docs/README.ru.md#конфигурационный-файл)
|
|
93
|
+
- [Сборка](docs/README.ru.md#сборка)
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
const { Binary } = require("binary-install");
|
|
2
|
+
const os = require("os");
|
|
3
|
+
const cTable = require("console.table");
|
|
4
|
+
const libc = require("detect-libc");
|
|
5
|
+
const { configureProxy } = require("axios-proxy-builder");
|
|
6
|
+
|
|
7
|
+
const error = (msg) => {
|
|
8
|
+
console.error(msg);
|
|
9
|
+
process.exit(1);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const { version } = require("./package.json");
|
|
13
|
+
// These are injected by cargo-dist
|
|
14
|
+
const name = "near-cli-rs";
|
|
15
|
+
const artifact_download_url = "https://github.com/near/near-cli-rs/releases/download/v0.3.4";
|
|
16
|
+
|
|
17
|
+
// These are injected by cargo-dist
|
|
18
|
+
const supportedPlatforms = {
|
|
19
|
+
"aarch64-apple-darwin": {
|
|
20
|
+
"artifact_name": "near-cli-rs-v0.3.4-aarch64-apple-darwin.tar.gz",
|
|
21
|
+
"bins": ["near"],
|
|
22
|
+
"zip_ext": ".tar.gz"
|
|
23
|
+
},
|
|
24
|
+
"x86_64-apple-darwin": {
|
|
25
|
+
"artifact_name": "near-cli-rs-v0.3.4-x86_64-apple-darwin.tar.gz",
|
|
26
|
+
"bins": ["near"],
|
|
27
|
+
"zip_ext": ".tar.gz"
|
|
28
|
+
},
|
|
29
|
+
"x86_64-pc-windows-msvc": {
|
|
30
|
+
"artifact_name": "near-cli-rs-v0.3.4-x86_64-pc-windows-msvc.tar.gz",
|
|
31
|
+
"bins": ["near.exe"],
|
|
32
|
+
"zip_ext": ".tar.gz"
|
|
33
|
+
},
|
|
34
|
+
"x86_64-unknown-linux-gnu": {
|
|
35
|
+
"artifact_name": "near-cli-rs-v0.3.4-x86_64-unknown-linux-gnu.tar.gz",
|
|
36
|
+
"bins": ["near"],
|
|
37
|
+
"zip_ext": ".tar.gz"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const getPlatform = () => {
|
|
42
|
+
const raw_os_type = os.type();
|
|
43
|
+
const raw_architecture = os.arch();
|
|
44
|
+
|
|
45
|
+
// We want to use rust-style target triples as the canonical key
|
|
46
|
+
// for a platform, so translate the "os" library's concepts into rust ones
|
|
47
|
+
let os_type = "";
|
|
48
|
+
switch (raw_os_type) {
|
|
49
|
+
case "Windows_NT":
|
|
50
|
+
os_type = "pc-windows-msvc";
|
|
51
|
+
break;
|
|
52
|
+
case "Darwin":
|
|
53
|
+
os_type = "apple-darwin";
|
|
54
|
+
break;
|
|
55
|
+
case "Linux":
|
|
56
|
+
os_type = "unknown-linux-gnu"
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let arch = "";
|
|
61
|
+
switch (raw_architecture) {
|
|
62
|
+
case "x64":
|
|
63
|
+
arch = "x86_64";
|
|
64
|
+
break;
|
|
65
|
+
case "arm64":
|
|
66
|
+
arch = "aarch64";
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Assume the above succeeded and build a target triple to look things up with.
|
|
71
|
+
// If any of it failed, this lookup will fail and we'll handle it like normal.
|
|
72
|
+
let target_triple = `${arch}-${os_type}`;
|
|
73
|
+
let platform = supportedPlatforms[target_triple];
|
|
74
|
+
|
|
75
|
+
if (!platform) {
|
|
76
|
+
error(
|
|
77
|
+
`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(",")}`
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// These are both situation where you might toggle to unknown-linux-musl but we don't support that yet
|
|
82
|
+
if (raw_os_type === "Linux") {
|
|
83
|
+
if (libc.isNonGlibcLinuxSync()) {
|
|
84
|
+
error("This operating system does not support dynamic linking to glibc.");
|
|
85
|
+
} else {
|
|
86
|
+
let libc_version = libc.versionSync();
|
|
87
|
+
let split_libc_version = libc_version.split(".");
|
|
88
|
+
let libc_major_version = split_libc_version[0];
|
|
89
|
+
let libc_minor_version = split_libc_version[1];
|
|
90
|
+
let min_major_version = 2;
|
|
91
|
+
let min_minor_version = 17;
|
|
92
|
+
if (
|
|
93
|
+
libc_major_version < min_major_version ||
|
|
94
|
+
libc_minor_version < min_minor_version
|
|
95
|
+
) {
|
|
96
|
+
error(
|
|
97
|
+
`This operating system needs glibc >= ${min_major_version}.${min_minor_version}, but only has ${libc_version} installed.`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return platform;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const getBinary = () => {
|
|
107
|
+
const platform = getPlatform();
|
|
108
|
+
const url = `${artifact_download_url}/${platform.artifact_name}`;
|
|
109
|
+
|
|
110
|
+
if (platform.bins.length > 1) {
|
|
111
|
+
// Not yet supported
|
|
112
|
+
error("this app has multiple binaries, which isn't yet implemented");
|
|
113
|
+
}
|
|
114
|
+
let binary = new Binary(platform.bins[0], url);
|
|
115
|
+
|
|
116
|
+
return binary;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const install = () => {
|
|
120
|
+
const binary = getBinary();
|
|
121
|
+
const proxy = configureProxy(binary.url);
|
|
122
|
+
const suppressLogs = false;
|
|
123
|
+
|
|
124
|
+
return binary.install(proxy, suppressLogs);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const run = () => {
|
|
128
|
+
const binary = getBinary();
|
|
129
|
+
binary.run();
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
module.exports = {
|
|
133
|
+
install,
|
|
134
|
+
run,
|
|
135
|
+
getBinary,
|
|
136
|
+
};
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "near-cli-rs",
|
|
3
|
+
"version": "0.3.4",
|
|
4
|
+
"lockfileVersion": 3,
|
|
5
|
+
"requires": true,
|
|
6
|
+
"packages": {
|
|
7
|
+
"": {
|
|
8
|
+
"name": "near-cli-rs",
|
|
9
|
+
"version": "0.3.4",
|
|
10
|
+
"license": "MIT OR Apache-2.0",
|
|
11
|
+
"hasInstallScript": true,
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"axios-proxy-builder": "^0.1.1",
|
|
14
|
+
"binary-install": "^1.0.6",
|
|
15
|
+
"console.table": "^0.10.0",
|
|
16
|
+
"detect-libc": "^2.0.0"
|
|
17
|
+
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"rover": "run.js"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"prettier": "2.8.4"
|
|
23
|
+
},
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=14",
|
|
26
|
+
"npm": ">=6"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"node_modules/axios": {
|
|
30
|
+
"version": "0.26.1",
|
|
31
|
+
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
|
|
32
|
+
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"follow-redirects": "^1.14.8"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"node_modules/axios-proxy-builder": {
|
|
38
|
+
"version": "0.1.2",
|
|
39
|
+
"resolved": "https://registry.npmjs.org/axios-proxy-builder/-/axios-proxy-builder-0.1.2.tgz",
|
|
40
|
+
"integrity": "sha512-6uBVsBZzkB3tCC8iyx59mCjQckhB8+GQrI9Cop8eC7ybIsvs/KtnNgEBfRMSEa7GqK2VBGUzgjNYMdPIfotyPA==",
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"tunnel": "^0.0.6"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"node_modules/balanced-match": {
|
|
46
|
+
"version": "1.0.2",
|
|
47
|
+
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
|
48
|
+
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
|
49
|
+
},
|
|
50
|
+
"node_modules/binary-install": {
|
|
51
|
+
"version": "1.0.6",
|
|
52
|
+
"resolved": "https://registry.npmjs.org/binary-install/-/binary-install-1.0.6.tgz",
|
|
53
|
+
"integrity": "sha512-h3K4jaC4jEauK3csXI9GxGBJldkpuJlHCIBv8i+XBNhPuxnlERnD1PWVczQYDqvhJfv0IHUbB3lhDrZUMHvSgw==",
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"axios": "^0.26.1",
|
|
56
|
+
"rimraf": "^3.0.2",
|
|
57
|
+
"tar": "^6.1.11"
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=10"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"node_modules/brace-expansion": {
|
|
64
|
+
"version": "1.1.11",
|
|
65
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
|
66
|
+
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"balanced-match": "^1.0.0",
|
|
69
|
+
"concat-map": "0.0.1"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"node_modules/chownr": {
|
|
73
|
+
"version": "2.0.0",
|
|
74
|
+
"resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
|
|
75
|
+
"integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
|
|
76
|
+
"engines": {
|
|
77
|
+
"node": ">=10"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"node_modules/clone": {
|
|
81
|
+
"version": "1.0.4",
|
|
82
|
+
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
|
|
83
|
+
"integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
|
|
84
|
+
"optional": true,
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": ">=0.8"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"node_modules/concat-map": {
|
|
90
|
+
"version": "0.0.1",
|
|
91
|
+
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
|
92
|
+
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
|
93
|
+
},
|
|
94
|
+
"node_modules/console.table": {
|
|
95
|
+
"version": "0.10.0",
|
|
96
|
+
"resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz",
|
|
97
|
+
"integrity": "sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==",
|
|
98
|
+
"dependencies": {
|
|
99
|
+
"easy-table": "1.1.0"
|
|
100
|
+
},
|
|
101
|
+
"engines": {
|
|
102
|
+
"node": "> 0.10"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"node_modules/defaults": {
|
|
106
|
+
"version": "1.0.4",
|
|
107
|
+
"resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
|
|
108
|
+
"integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
|
|
109
|
+
"optional": true,
|
|
110
|
+
"dependencies": {
|
|
111
|
+
"clone": "^1.0.2"
|
|
112
|
+
},
|
|
113
|
+
"funding": {
|
|
114
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"node_modules/detect-libc": {
|
|
118
|
+
"version": "2.0.1",
|
|
119
|
+
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz",
|
|
120
|
+
"integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==",
|
|
121
|
+
"engines": {
|
|
122
|
+
"node": ">=8"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"node_modules/easy-table": {
|
|
126
|
+
"version": "1.1.0",
|
|
127
|
+
"resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz",
|
|
128
|
+
"integrity": "sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==",
|
|
129
|
+
"optionalDependencies": {
|
|
130
|
+
"wcwidth": ">=1.0.1"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"node_modules/follow-redirects": {
|
|
134
|
+
"version": "1.15.2",
|
|
135
|
+
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
|
136
|
+
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
|
137
|
+
"funding": [
|
|
138
|
+
{
|
|
139
|
+
"type": "individual",
|
|
140
|
+
"url": "https://github.com/sponsors/RubenVerborgh"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"engines": {
|
|
144
|
+
"node": ">=4.0"
|
|
145
|
+
},
|
|
146
|
+
"peerDependenciesMeta": {
|
|
147
|
+
"debug": {
|
|
148
|
+
"optional": true
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"node_modules/fs-minipass": {
|
|
153
|
+
"version": "2.1.0",
|
|
154
|
+
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
|
|
155
|
+
"integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
|
|
156
|
+
"dependencies": {
|
|
157
|
+
"minipass": "^3.0.0"
|
|
158
|
+
},
|
|
159
|
+
"engines": {
|
|
160
|
+
"node": ">= 8"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"node_modules/fs-minipass/node_modules/minipass": {
|
|
164
|
+
"version": "3.3.6",
|
|
165
|
+
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
|
|
166
|
+
"integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
|
|
167
|
+
"dependencies": {
|
|
168
|
+
"yallist": "^4.0.0"
|
|
169
|
+
},
|
|
170
|
+
"engines": {
|
|
171
|
+
"node": ">=8"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"node_modules/fs.realpath": {
|
|
175
|
+
"version": "1.0.0",
|
|
176
|
+
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
|
177
|
+
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
|
|
178
|
+
},
|
|
179
|
+
"node_modules/glob": {
|
|
180
|
+
"version": "7.2.3",
|
|
181
|
+
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
|
182
|
+
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
|
183
|
+
"dependencies": {
|
|
184
|
+
"fs.realpath": "^1.0.0",
|
|
185
|
+
"inflight": "^1.0.4",
|
|
186
|
+
"inherits": "2",
|
|
187
|
+
"minimatch": "^3.1.1",
|
|
188
|
+
"once": "^1.3.0",
|
|
189
|
+
"path-is-absolute": "^1.0.0"
|
|
190
|
+
},
|
|
191
|
+
"engines": {
|
|
192
|
+
"node": "*"
|
|
193
|
+
},
|
|
194
|
+
"funding": {
|
|
195
|
+
"url": "https://github.com/sponsors/isaacs"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"node_modules/inflight": {
|
|
199
|
+
"version": "1.0.6",
|
|
200
|
+
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
|
201
|
+
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
|
202
|
+
"dependencies": {
|
|
203
|
+
"once": "^1.3.0",
|
|
204
|
+
"wrappy": "1"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"node_modules/inherits": {
|
|
208
|
+
"version": "2.0.4",
|
|
209
|
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
|
210
|
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
|
211
|
+
},
|
|
212
|
+
"node_modules/minimatch": {
|
|
213
|
+
"version": "3.1.2",
|
|
214
|
+
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
|
215
|
+
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
|
216
|
+
"dependencies": {
|
|
217
|
+
"brace-expansion": "^1.1.7"
|
|
218
|
+
},
|
|
219
|
+
"engines": {
|
|
220
|
+
"node": "*"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"node_modules/minipass": {
|
|
224
|
+
"version": "4.2.4",
|
|
225
|
+
"resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.4.tgz",
|
|
226
|
+
"integrity": "sha512-lwycX3cBMTvcejsHITUgYj6Gy6A7Nh4Q6h9NP4sTHY1ccJlC7yKzDmiShEHsJ16Jf1nKGDEaiHxiltsJEvk0nQ==",
|
|
227
|
+
"engines": {
|
|
228
|
+
"node": ">=8"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"node_modules/minizlib": {
|
|
232
|
+
"version": "2.1.2",
|
|
233
|
+
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
|
|
234
|
+
"integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
|
|
235
|
+
"dependencies": {
|
|
236
|
+
"minipass": "^3.0.0",
|
|
237
|
+
"yallist": "^4.0.0"
|
|
238
|
+
},
|
|
239
|
+
"engines": {
|
|
240
|
+
"node": ">= 8"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"node_modules/minizlib/node_modules/minipass": {
|
|
244
|
+
"version": "3.3.6",
|
|
245
|
+
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
|
|
246
|
+
"integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
|
|
247
|
+
"dependencies": {
|
|
248
|
+
"yallist": "^4.0.0"
|
|
249
|
+
},
|
|
250
|
+
"engines": {
|
|
251
|
+
"node": ">=8"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"node_modules/mkdirp": {
|
|
255
|
+
"version": "1.0.4",
|
|
256
|
+
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
|
|
257
|
+
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
|
|
258
|
+
"bin": {
|
|
259
|
+
"mkdirp": "bin/cmd.js"
|
|
260
|
+
},
|
|
261
|
+
"engines": {
|
|
262
|
+
"node": ">=10"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"node_modules/once": {
|
|
266
|
+
"version": "1.4.0",
|
|
267
|
+
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
|
268
|
+
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
|
269
|
+
"dependencies": {
|
|
270
|
+
"wrappy": "1"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"node_modules/path-is-absolute": {
|
|
274
|
+
"version": "1.0.1",
|
|
275
|
+
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
|
276
|
+
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
|
|
277
|
+
"engines": {
|
|
278
|
+
"node": ">=0.10.0"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"node_modules/prettier": {
|
|
282
|
+
"version": "2.8.4",
|
|
283
|
+
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz",
|
|
284
|
+
"integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==",
|
|
285
|
+
"dev": true,
|
|
286
|
+
"bin": {
|
|
287
|
+
"prettier": "bin-prettier.js"
|
|
288
|
+
},
|
|
289
|
+
"engines": {
|
|
290
|
+
"node": ">=10.13.0"
|
|
291
|
+
},
|
|
292
|
+
"funding": {
|
|
293
|
+
"url": "https://github.com/prettier/prettier?sponsor=1"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"node_modules/rimraf": {
|
|
297
|
+
"version": "3.0.2",
|
|
298
|
+
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
|
|
299
|
+
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
|
|
300
|
+
"dependencies": {
|
|
301
|
+
"glob": "^7.1.3"
|
|
302
|
+
},
|
|
303
|
+
"bin": {
|
|
304
|
+
"rimraf": "bin.js"
|
|
305
|
+
},
|
|
306
|
+
"funding": {
|
|
307
|
+
"url": "https://github.com/sponsors/isaacs"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"node_modules/tar": {
|
|
311
|
+
"version": "6.1.13",
|
|
312
|
+
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
|
|
313
|
+
"integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
|
|
314
|
+
"dependencies": {
|
|
315
|
+
"chownr": "^2.0.0",
|
|
316
|
+
"fs-minipass": "^2.0.0",
|
|
317
|
+
"minipass": "^4.0.0",
|
|
318
|
+
"minizlib": "^2.1.1",
|
|
319
|
+
"mkdirp": "^1.0.3",
|
|
320
|
+
"yallist": "^4.0.0"
|
|
321
|
+
},
|
|
322
|
+
"engines": {
|
|
323
|
+
"node": ">=10"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"node_modules/tunnel": {
|
|
327
|
+
"version": "0.0.6",
|
|
328
|
+
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
|
329
|
+
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
|
|
330
|
+
"engines": {
|
|
331
|
+
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"node_modules/wcwidth": {
|
|
335
|
+
"version": "1.0.1",
|
|
336
|
+
"resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
|
|
337
|
+
"integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
|
|
338
|
+
"optional": true,
|
|
339
|
+
"dependencies": {
|
|
340
|
+
"defaults": "^1.0.3"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"node_modules/wrappy": {
|
|
344
|
+
"version": "1.0.2",
|
|
345
|
+
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
|
346
|
+
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
|
347
|
+
},
|
|
348
|
+
"node_modules/yallist": {
|
|
349
|
+
"version": "4.0.0",
|
|
350
|
+
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
|
351
|
+
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "near-cli-rs",
|
|
3
|
+
"version": "0.3.4",
|
|
4
|
+
"description": "human-friendly console utility that helps to interact with NEAR Protocol from command line.",
|
|
5
|
+
"repository": "https://github.com/near/near-cli-rs",
|
|
6
|
+
"homepage": "https://near.cli.rs",
|
|
7
|
+
"contributors": ["FroVolod <frol_off@meta.ua>","Near Inc <hello@nearprotocol.com>"],
|
|
8
|
+
"license": "MIT OR Apache-2.0",
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"bin": {
|
|
11
|
+
"near": "run.js"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"postinstall": "node ./install.js",
|
|
15
|
+
"fmt": "prettier --write **/*.js",
|
|
16
|
+
"fmt:check": "prettier --check **/*.js"
|
|
17
|
+
},
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=14",
|
|
20
|
+
"npm": ">=6"
|
|
21
|
+
},
|
|
22
|
+
"volta": {
|
|
23
|
+
"node": "18.14.1",
|
|
24
|
+
"npm": "9.5.0"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"axios-proxy-builder": "^0.1.1",
|
|
28
|
+
"binary-install": "^1.0.6",
|
|
29
|
+
"console.table": "^0.10.0",
|
|
30
|
+
"detect-libc": "^2.0.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"prettier": "2.8.4"
|
|
34
|
+
}
|
|
35
|
+
}
|