Skip to content

Commit

Permalink
removed unused pxe option
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed May 7, 2024
1 parent 4b0d8be commit aeabc51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
24 changes: 3 additions & 21 deletions yarn-project/builder/src/cli.ts
Original file line number Diff line number Diff line change
@@ -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 <string>', 'URL of the PXE')
.env('PXE_URL')
.default(`http://${LOCALHOST}:8080`)
.makeOptionMandatory(true);

program.name('aztec-builder');
program
.command('codegen')
Expand All @@ -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 <semver>', '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);
Expand Down
1 change: 0 additions & 1 deletion yarn-project/builder/src/cli/update/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
Expand Down

0 comments on commit aeabc51

Please sign in to comment.