Skip to content

Commit

Permalink
fix(dev-cli): host -> bundler option #1000
Browse files Browse the repository at this point in the history
  • Loading branch information
TillaTheHun0 committed Sep 5, 2024
1 parent 314fad6 commit a4775ee
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions dev-cli/src/commands/bundler.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global Deno */

import { Command } from '../deps.js'
import { hostArgs, walletArgs } from '../utils.js'
import { bundlerArgs, walletArgs } from '../utils.js'
import { VERSION } from '../versions.js'

function amountArgs (amount) {
Expand All @@ -14,7 +14,7 @@ function amountArgs (amount) {
export async function balance ({ wallet, host }) {
const cmdArgs = [
...walletArgs(wallet),
...hostArgs(host)
...bundlerArgs(host)
]

const p = Deno.run({
Expand All @@ -32,10 +32,10 @@ export async function balance ({ wallet, host }) {
await p.status()
}

export async function fund ({ wallet, host }, amount) {
export async function fund ({ wallet, bundler }, amount) {
const cmdArgs = [
...walletArgs(wallet),
...hostArgs(host),
...bundlerArgs(bundler),
...amountArgs(amount)
]

Expand Down
6 changes: 3 additions & 3 deletions dev-cli/src/commands/publish.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global Deno */

import { Command, basename, resolve } from '../deps.js'
import { hostArgs, tagsArg } from '../utils.js'
import { bundlerArgs, tagsArg } from '../utils.js'
import { VERSION } from '../versions.js'

function walletArgs (wallet) {
Expand Down Expand Up @@ -49,10 +49,10 @@ function contractSourceArgs (contractWasmPath) {
* - allow using environment variables to set things like path to wallet
* - require confirmation and bypass with --yes
*/
export async function publish ({ wallet, host, tag, value }, contractWasmPath) {
export async function publish ({ wallet, bundler, tag, value }, contractWasmPath) {
const cmdArgs = [
...walletArgs(wallet),
...hostArgs(host),
...bundlerArgs(bundler),
...contractSourceArgs(contractWasmPath),
...tagsArg({ tags: tag, values: value })
]
Expand Down
6 changes: 3 additions & 3 deletions dev-cli/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export function tagsArg ({ tags, values }) {
return ['-e', `TAGS=${JSON.stringify([tags, values])}`]
}

export function hostArgs (host) {
return host
export function bundlerArgs (bundler) {
return bundler
? [
'-e',
`BUNDLER_HOST=${host}`
`BUNDLER_HOST=${bundler}`
]
: []
}

0 comments on commit a4775ee

Please sign in to comment.