@wagmi/cli
Advanced tools
Comparing version 2.0.0-alpha.10 to 2.0.0-alpha.11
@@ -29,3 +29,3 @@ #!/usr/bin/env node | ||
if (cli.args.length === 0) { | ||
if (!cli.options.help) | ||
if (!cli.options.help && !cli.options.version) | ||
cli.outputHelp(); | ||
@@ -32,0 +32,0 @@ } |
@@ -0,3 +1,5 @@ | ||
import {} from 'abitype'; | ||
import { Abi as AbiSchema } from 'abitype/zod'; | ||
import { camelCase } from 'change-case'; | ||
import {} from 'chokidar'; | ||
import { watch } from 'chokidar'; | ||
@@ -11,2 +13,3 @@ import { default as dedent } from 'dedent'; | ||
import { z } from 'zod'; | ||
import {} from '../config.js'; | ||
import { fromZodError } from '../errors.js'; | ||
@@ -13,0 +16,0 @@ import * as logger from '../logger.js'; |
@@ -27,3 +27,3 @@ import dedent from 'dedent'; | ||
} | ||
// Check for exisiting config file | ||
// Check for existing config file | ||
const configPath = await findConfig(options); | ||
@@ -30,0 +30,0 @@ if (configPath) { |
@@ -0,1 +1,4 @@ | ||
import {} from 'abitype'; | ||
import {} from 'viem'; | ||
import {} from './types.js'; | ||
export function defineConfig(config) { | ||
@@ -2,0 +5,0 @@ return config; |
@@ -0,1 +1,2 @@ | ||
import {} from 'zod'; | ||
class ValidationError extends Error { | ||
@@ -2,0 +3,0 @@ constructor(message, options) { |
import { camelCase } from 'change-case'; | ||
import {} from 'viem'; | ||
import { z } from 'zod'; | ||
import {} from '../config.js'; | ||
import { fromZodError } from '../errors.js'; | ||
import {} from '../types.js'; | ||
import { fetch } from './fetch.js'; | ||
@@ -6,0 +8,0 @@ const BlockExplorerResponse = z.discriminatedUnion('status', [ |
@@ -1,2 +0,2 @@ | ||
export const version = '2.0.0-alpha.10'; | ||
export const version = '2.0.0-alpha.11'; | ||
//# sourceMappingURL=version.js.map |
@@ -1,4 +0,4 @@ | ||
import type { Abi } from 'abitype'; | ||
import type { Address } from 'viem'; | ||
import type { Evaluate, MaybeArray, MaybePromise } from './types.js'; | ||
import { type Abi } from 'abitype'; | ||
import { type Address } from 'viem'; | ||
import { type Evaluate, type MaybeArray, type MaybePromise } from './types.js'; | ||
export type ContractConfig<chainId extends number = number, requiredChainId extends number | undefined = undefined> = { | ||
@@ -5,0 +5,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import type { z } from 'zod'; | ||
import { type z } from 'zod'; | ||
declare class ValidationError extends Error { | ||
@@ -3,0 +3,0 @@ details: Zod.ZodIssue[]; |
import { type Address } from 'viem'; | ||
import type { ContractConfig } from '../config.js'; | ||
import type { Evaluate } from '../types.js'; | ||
import { type ContractConfig } from '../config.js'; | ||
import { type Evaluate } from '../types.js'; | ||
export type BlockExplorerConfig = { | ||
@@ -5,0 +5,0 @@ /** |
@@ -78,5 +78,3 @@ import type { ContractConfig } from '../config.js'; | ||
outputs: readonly { | ||
plugin: Pick<import("../config.js").Plugin, "name">; /** | ||
* Fetches contract ABIs from Etherscan. | ||
*/ | ||
plugin: Pick<import("../config.js").Plugin, "name">; | ||
imports?: string | undefined; | ||
@@ -83,0 +81,0 @@ prepend?: string | undefined; |
@@ -37,2 +37,3 @@ import type * as chain from 'viem/chains'; | ||
addressName?: string | undefined; | ||
/** Fetches contract ABIs from Sourcify. */ | ||
configName?: string | undefined; | ||
@@ -39,0 +40,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
export declare const version = "2.0.0-alpha.10"; | ||
export declare const version = "2.0.0-alpha.11"; | ||
//# sourceMappingURL=version.d.ts.map |
{ | ||
"name": "@wagmi/cli", | ||
"description": "Manage and generate code from Ethereum ABIs", | ||
"version": "2.0.0-alpha.10", | ||
"version": "2.0.0-alpha.11", | ||
"license": "MIT", | ||
@@ -79,3 +79,3 @@ "repository": { | ||
"prettier": "^3.0.3", | ||
"viem": "2.0.0-alpha.17", | ||
"viem": "2.0.0-alpha.21", | ||
"zod": "^3.22.2" | ||
@@ -82,0 +82,0 @@ }, |
@@ -35,3 +35,3 @@ #!/usr/bin/env node | ||
if (cli.args.length === 0) { | ||
if (!cli.options.help) cli.outputHelp() | ||
if (!cli.options.help && !cli.options.version) cli.outputHelp() | ||
} else throw new Error(`Unknown command: ${cli.args.join(' ')}`) | ||
@@ -38,0 +38,0 @@ } |
@@ -1,5 +0,5 @@ | ||
import type { Abi } from 'abitype' | ||
import { type Abi } from 'abitype' | ||
import { Abi as AbiSchema } from 'abitype/zod' | ||
import { camelCase } from 'change-case' | ||
import type { FSWatcher, WatchOptions } from 'chokidar' | ||
import { type FSWatcher, type WatchOptions } from 'chokidar' | ||
import { watch } from 'chokidar' | ||
@@ -14,3 +14,8 @@ import { default as dedent } from 'dedent' | ||
import type { Contract, ContractConfig, Plugin, Watch } from '../config.js' | ||
import { | ||
type Contract, | ||
type ContractConfig, | ||
type Plugin, | ||
type Watch, | ||
} from '../config.js' | ||
import { fromZodError } from '../errors.js' | ||
@@ -17,0 +22,0 @@ import * as logger from '../logger.js' |
@@ -39,3 +39,3 @@ import dedent from 'dedent' | ||
// Check for exisiting config file | ||
// Check for existing config file | ||
const configPath = await findConfig(options) | ||
@@ -42,0 +42,0 @@ if (configPath) { |
@@ -1,5 +0,5 @@ | ||
import type { Abi } from 'abitype' | ||
import type { Address } from 'viem' | ||
import { type Abi } from 'abitype' | ||
import { type Address } from 'viem' | ||
import type { Evaluate, MaybeArray, MaybePromise } from './types.js' | ||
import { type Evaluate, type MaybeArray, type MaybePromise } from './types.js' | ||
@@ -6,0 +6,0 @@ export type ContractConfig< |
@@ -1,2 +0,2 @@ | ||
import type { z } from 'zod' | ||
import { type z } from 'zod' | ||
@@ -3,0 +3,0 @@ class ValidationError extends Error { |
@@ -5,5 +5,5 @@ import { camelCase } from 'change-case' | ||
import type { ContractConfig } from '../config.js' | ||
import { type ContractConfig } from '../config.js' | ||
import { fromZodError } from '../errors.js' | ||
import type { Evaluate } from '../types.js' | ||
import { type Evaluate } from '../types.js' | ||
import { fetch } from './fetch.js' | ||
@@ -10,0 +10,0 @@ |
@@ -1,1 +0,1 @@ | ||
export const version = '2.0.0-alpha.10' | ||
export const version = '2.0.0-alpha.11' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
536857
3840
+ Addedviem@2.0.0-alpha.21(transitive)
- Removedviem@2.0.0-alpha.17(transitive)
Updatedviem@2.0.0-alpha.21