From aeabc51f13ff8e3a959bc5e8e7d95354503587c9 Mon Sep 17 00:00:00 2001 From: benesjan Date: Tue, 7 May 2024 09:10:20 +0000 Subject: [PATCH] removed unused pxe option --- yarn-project/builder/src/cli.ts | 24 +++---------------- yarn-project/builder/src/cli/update/update.ts | 1 - 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/yarn-project/builder/src/cli.ts b/yarn-project/builder/src/cli.ts index 7f46ad798be..9dea06bba50 100644 --- a/yarn-project/builder/src/cli.ts +++ b/yarn-project/builder/src/cli.ts @@ -1,30 +1,13 @@ #!/usr/bin/env node import { createConsoleLogger } from '@aztec/foundation/log'; -import { Command, Option } from 'commander'; -import { lookup } from 'dns/promises'; +import { Command } from 'commander'; import { dirname } from 'path'; const program = new Command(); const log = createConsoleLogger('aztec:builder'); -/** - * If we can successfully resolve 'host.docker.internal', then we are running in a container, and we should treat - * localhost as being host.docker.internal. - */ -const getLocalhost = () => - lookup('host.docker.internal') - .then(() => 'host.docker.internal') - .catch(() => 'localhost'); - -const LOCALHOST = await getLocalhost(); - const main = async () => { - const pxeOption = new Option('-u, --rpc-url ', 'URL of the PXE') - .env('PXE_URL') - .default(`http://${LOCALHOST}:8080`) - .makeOptionMandatory(true); - program.name('aztec-builder'); program .command('codegen') @@ -43,11 +26,10 @@ const main = async () => { .argument('[projectPath]', 'Path to the project directory', process.cwd()) .option('--contract [paths...]', 'Paths to contracts to update dependencies', []) .option('--aztec-version ', 'The version to update Aztec packages to. Defaults to latest', 'latest') - .addOption(pxeOption) .action(async (projectPath: string, options) => { const { update } = await import('./cli/update/update.js'); - const { contract, aztecVersion, rpcUrl } = options; - await update(projectPath, contract, rpcUrl, aztecVersion, log); + const { contract, aztecVersion } = options; + await update(projectPath, contract, aztecVersion, log); }); await program.parseAsync(process.argv); diff --git a/yarn-project/builder/src/cli/update/update.ts b/yarn-project/builder/src/cli/update/update.ts index 0bbe96639ad..5d518839ebb 100644 --- a/yarn-project/builder/src/cli/update/update.ts +++ b/yarn-project/builder/src/cli/update/update.ts @@ -15,7 +15,6 @@ const UPDATE_DOCS_URL = 'https://docs.aztec.network/developers/updating'; export async function update( projectPath: string, contracts: string[], - pxeUrl: string, aztecVersion: string, log: LogFn, ): Promise {