mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
Replace http/https with axios in CLI
This commit is contained in:
parent
ccb36aa90a
commit
2217c51a00
@ -42,6 +42,7 @@
|
|||||||
"@iov/encoding": "^2.1.0",
|
"@iov/encoding": "^2.1.0",
|
||||||
"@iov/utils": "^2.0.2",
|
"@iov/utils": "^2.0.2",
|
||||||
"argparse": "^1.0.10",
|
"argparse": "^1.0.10",
|
||||||
|
"axios": "^0.19.2",
|
||||||
"babylon": "^6.18.0",
|
"babylon": "^6.18.0",
|
||||||
"colors": "^1.3.3",
|
"colors": "^1.3.3",
|
||||||
"diff": "^4",
|
"diff": "^4",
|
||||||
|
@ -111,8 +111,7 @@ export function main(originalArgs: readonly string[]): void {
|
|||||||
|
|
||||||
console.info(colors.green("Initializing session for you. Have fun!"));
|
console.info(colors.green("Initializing session for you. Have fun!"));
|
||||||
console.info(colors.yellow("Available imports:"));
|
console.info(colors.yellow("Available imports:"));
|
||||||
console.info(colors.yellow(" * http"));
|
console.info(colors.yellow(" * axios"));
|
||||||
console.info(colors.yellow(" * https"));
|
|
||||||
console.info(colors.yellow(" * fs"));
|
console.info(colors.yellow(" * fs"));
|
||||||
for (const [moduleName, symbols] of imports.entries()) {
|
for (const [moduleName, symbols] of imports.entries()) {
|
||||||
console.info(colors.yellow(` * from ${moduleName}: ${symbols.join(", ")}`));
|
console.info(colors.yellow(` * from ${moduleName}: ${symbols.join(", ")}`));
|
||||||
@ -130,8 +129,7 @@ export function main(originalArgs: readonly string[]): void {
|
|||||||
console.info(colors.yellow(` * helper functions: ${encodingHelpers.join(", ")}`));
|
console.info(colors.yellow(` * helper functions: ${encodingHelpers.join(", ")}`));
|
||||||
|
|
||||||
let init = `
|
let init = `
|
||||||
import * as http from 'http';
|
import axios from "axios";
|
||||||
import * as https from 'https';
|
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
`;
|
`;
|
||||||
for (const [moduleName, symbols] of imports.entries()) {
|
for (const [moduleName, symbols] of imports.entries()) {
|
||||||
|
@ -1747,7 +1747,7 @@ aws4@^1.8.0:
|
|||||||
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e"
|
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e"
|
||||||
integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==
|
integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==
|
||||||
|
|
||||||
axios@^0.19.0:
|
axios@^0.19.0, axios@^0.19.2:
|
||||||
version "0.19.2"
|
version "0.19.2"
|
||||||
resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27"
|
resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27"
|
||||||
integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
|
integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
|
||||||
|
Loading…
x
Reference in New Issue
Block a user