Skip to content

Commit

Permalink
feat: update dependencies (#438)
Browse files Browse the repository at this point in the history
* feat: update dependencies

* Apply automatic changes

---------

Co-authored-by: shamsartem <[email protected]>
  • Loading branch information
shamsartem and shamsartem authored Aug 30, 2023
1 parent 6ae4307 commit 84004ae
Show file tree
Hide file tree
Showing 4 changed files with 540 additions and 392 deletions.
4 changes: 2 additions & 2 deletions docs/commands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ DESCRIPTION
Display help for fluence.
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.17/src/commands/help.ts)_
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.18/src/commands/help.ts)_

## `fluence init [PATH]`

Expand Down Expand Up @@ -872,7 +872,7 @@ EXAMPLES
$ fluence update --available
```

_See code: [@oclif/plugin-update](https://github.com/oclif/plugin-update/blob/v3.1.32/src/commands/update.ts)_
_See code: [@oclif/plugin-update](https://github.com/oclif/plugin-update/blob/v3.2.0/src/commands/update.ts)_

## `fluence workers deploy [WORKER-NAMES]`

Expand Down
52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,27 @@
"@fluencelabs/aqua-api": "^0.12.0",
"@fluencelabs/deal-aurora": "0.1.8",
"@fluencelabs/fluence-network-environment": "^1.1.2",
"@fluencelabs/js-client": "^0.0.10",
"@fluencelabs/js-client": "^0.1.0",
"@iarna/toml": "^2.2.5",
"@mswjs/interceptors": "^0.23.0",
"@multiformats/multiaddr": "^12.1.6",
"@multiformats/multiaddr": "^12.1.7",
"@oclif/color": "^1.0.10",
"@oclif/core": "^2.11.5",
"@oclif/core": "^2.13.0",
"@oclif/plugin-autocomplete": "^2.3.6",
"@oclif/plugin-help": "^5.2.15",
"@oclif/plugin-not-found": "^2.3.34",
"@oclif/plugin-update": "^3.1.32",
"@oclif/plugin-help": "^5.2.18",
"@oclif/plugin-not-found": "^2.4.0",
"@oclif/plugin-update": "^3.2.0",
"@walletconnect/universal-provider": "^2.4.7",
"ajv": "^8.12.0",
"camelcase": "^7.0.1",
"camelcase": "^8.0.0",
"chokidar": "^3.5.3",
"countly-sdk-nodejs": "^22.6.0",
"decompress": "^4.2.1",
"dotenv": "^16.3.1",
"ethers": "^5.7.2",
"filenamify": "^6.0.0",
"get-random-values": "^2.1.0",
"inquirer": "^9.2.9",
"inquirer": "^9.2.10",
"ipfs-http-client": "^60.0.1",
"lodash-es": "^4.17.21",
"lokijs": "^1.5.12",
Expand All @@ -85,43 +85,43 @@
"platform": "^1.3.6",
"replace-homedir": "^2.0.0",
"semver": "^7.5.4",
"yaml": "^2.3.1",
"yaml": "^2.3.2",
"yaml-diff-patch": "^2.0.0"
},
"devDependencies": {
"@fluencelabs/installation-spell": "^0.5.16",
"@swc/core": "^1.3.74",
"@total-typescript/ts-reset": "^0.4.2",
"@swc/core": "^1.3.80",
"@total-typescript/ts-reset": "^0.5.1",
"@tsconfig/node18-strictest-esm": "^1.0.1",
"@types/decompress": "^4.2.4",
"@types/iarna__toml": "^2.0.2",
"@types/inquirer": "^9.0.3",
"@types/jest": "^29.5.3",
"@types/jest": "^29.5.4",
"@types/lodash-es": "^4.17.8",
"@types/node": "^18.17.2",
"@types/node": "^18.17.12",
"@types/platform": "^1.3.4",
"@types/semver": "^7.5.0",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"eslint": "^8.46.0",
"eslint-config-prettier": "^8.9.0",
"eslint-plugin-import": "^2.28.0",
"@types/semver": "^7.5.1",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-license-header": "^0.6.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-unused-imports": "^3.0.0",
"globby": "^13",
"jest": "^29.6.2",
"jest": "^29.6.4",
"madge": "^6.1.0",
"npm-check-updates": "^16.10.18",
"oclif": "^3.11.0",
"prettier": "^3.0.0",
"npm-check-updates": "^16.13.2",
"oclif": "^3.12.0",
"prettier": "^3.0.3",
"shx": "^0.3.4",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"ts-prune": "^0.10.3",
"ts-unused-exports": "^9.0.5",
"tslib": "^2.6.1",
"typescript": "^5.1.6",
"ts-unused-exports": "^10.0.0",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"undici": "^5.23.0"
},
"oclif": {
Expand Down
20 changes: 14 additions & 6 deletions src/lib/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type PromptOptions<T, U extends Answers> = DistinctQuestion<U> & {
flagName: string | undefined;
};

const prompt = async <T, U extends { [NAME]: T }>({
const prompt = async <T, U extends Answers>({
validateType,
flagName,
...question
Expand Down Expand Up @@ -111,12 +111,14 @@ export const confirm = ({
flagName,
...question
}: ConfirmArg): Promise<boolean> => {
// inquirer broke it's types so we have to cast it. "confirm" always returns boolean
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
return prompt({
...question,
type: "confirm",
validateType: validateBooleanPrompt,
flagName,
});
}) as Promise<boolean>;
};

export type InputArg = DistinctQuestion & {
Expand All @@ -125,12 +127,14 @@ export type InputArg = DistinctQuestion & {
};

export const input = ({ flagName, ...question }: InputArg): Promise<string> => {
// inquirer broke it's types so we have to cast it. "input" always returns string
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
return prompt({
...question,
type: "input",
validateType: validateStringPrompt,
flagName,
});
}) as Promise<string>;
};

type PasswordArg = DistinctQuestion & {
Expand All @@ -142,12 +146,14 @@ export const password = ({
flagName,
...question
}: PasswordArg): Promise<string> => {
// inquirer broke it's types so we have to cast it. "password" always returns string
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
return prompt({
...question,
type: "password",
validateType: validateStringPrompt,
flagName,
});
}) as Promise<string>;
};

type Separator = typeof inquirer.Separator;
Expand Down Expand Up @@ -263,15 +269,17 @@ export const list = async <T, U>(
return noChoicesResult;
}

const stringChoice = await prompt({
// inquirer broke it's types so we have to cast it. "list" always returns string
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const stringChoice = (await prompt({
...question,
type: "list",
validateType: validateStringPrompt,
choices: choices.map((choice): string | SeparatorObj => {
return choice instanceof Separator ? choice : choice.name;
}),
flagName,
});
})) as string;

const choice = choices.find((choice): boolean => {
return !(choice instanceof Separator) && choice.name === stringChoice;
Expand Down
Loading

0 comments on commit 84004ae

Please sign in to comment.