From f8636acac2d55e60cb8cb98415ea7d40c1e7f1c8 Mon Sep 17 00:00:00 2001 From: Jon Edvald Date: Mon, 3 Dec 2018 11:47:37 +0100 Subject: [PATCH] refactor: rename plural command parameters This should have no impact on CLI usage. --- docs/reference/commands.md | 41 ++++++++++--------- garden-service/src/commands/call.ts | 2 +- garden-service/src/commands/delete.ts | 7 ++-- garden-service/src/commands/deploy.ts | 5 ++- garden-service/src/commands/logs.ts | 4 +- garden-service/src/commands/publish.ts | 4 +- garden-service/src/commands/test.ts | 6 +-- garden-service/src/commands/unlink/module.ts | 6 +-- garden-service/src/commands/unlink/source.ts | 8 ++-- .../src/commands/update-remote/all.ts | 4 +- .../src/commands/update-remote/modules.ts | 12 +++--- .../src/commands/update-remote/sources.ts | 10 ++--- garden-service/test/integ/run | 2 +- garden-service/test/src/commands/delete.ts | 4 +- garden-service/test/src/commands/deploy.ts | 4 +- garden-service/test/src/commands/publish.ts | 14 +++---- garden-service/test/src/commands/test.ts | 4 +- garden-service/test/src/commands/unlink.ts | 8 ++-- .../test/src/commands/update-remote.ts | 16 ++++---- 19 files changed, 82 insertions(+), 79 deletions(-) diff --git a/docs/reference/commands.md b/docs/reference/commands.md index f68261caaf..590cdd0198 100644 --- a/docs/reference/commands.md +++ b/docs/reference/commands.md @@ -73,7 +73,7 @@ Note: Currently only supports simple GET requests for HTTP/HTTPS ingresses. | Argument | Required | Description | | -------- | -------- | ----------- | - | `serviceAndPath` | Yes | The name(s) of the service(s) to call followed by the ingress path (e.g. my-container/somepath). + | `serviceAndPath` | Yes | The name(s) of the service to call followed by the ingress path (e.g. my-container/somepath). ### garden create project @@ -175,7 +175,7 @@ resources. ### garden delete service -Deletes a running service. +Deletes running services. Deletes (i.e. un-deploys) the specified services. Note that this command does not take into account any services depending on the deleted service, and might therefore leave the project in an unstable state. @@ -187,13 +187,13 @@ Examples: ##### Usage - garden delete service + garden delete service ##### Arguments | Argument | Required | Description | | -------- | -------- | ----------- | - | `service` | Yes | The name(s) of the service(s) to delete. Use comma as a separator to specify multiple services. + | `services` | Yes | The name(s) of the service(s) to delete. Use comma as a separator to specify multiple services. ### garden deploy @@ -209,6 +209,7 @@ Examples: garden deploy # deploy all modules in the project garden deploy my-service # only deploy my-service + garden deploy service-a,service-b # only deploy service-a and service-b garden deploy --force # force re-deploy of modules, even if they're already deployed garden deploy --watch # watch for changes to code garden deploy --hot-reload=my-service # deploys all services, with hot reloading enabled for my-service @@ -216,13 +217,13 @@ Examples: ##### Usage - garden deploy [service] [options] + garden deploy [services] [options] ##### Arguments | Argument | Required | Description | | -------- | -------- | ----------- | - | `service` | No | The name(s) of the service(s) to deploy (skip to deploy all services). Use comma as a separator to specify multiple services. + | `services` | No | The name(s) of the service(s) to deploy (skip to deploy all services). Use comma as a separator to specify multiple services. ##### Options @@ -408,13 +409,13 @@ Examples: ##### Usage - garden logs [service] [options] + garden logs [services] [options] ##### Arguments | Argument | Required | Description | | -------- | -------- | ----------- | - | `service` | No | The name(s) of the service(s) to log (skip to log all services). Use comma as a separator to specify multiple services. + | `services` | No | The name(s) of the service(s) to log (skip to log all services). Use comma as a separator to specify multiple services. ##### Options @@ -438,13 +439,13 @@ Examples: ##### Usage - garden publish [module] [options] + garden publish [modules] [options] ##### Arguments | Argument | Required | Description | | -------- | -------- | ----------- | - | `module` | No | The name(s) of the module(s) to publish (skip to publish all modules). Use comma as a separator to specify multiple modules. + | `modules` | No | The name(s) of the module(s) to publish (skip to publish all modules). Use comma as a separator to specify multiple modules. ##### Options @@ -638,13 +639,13 @@ Examples: ##### Usage - garden test [module] [options] + garden test [modules] [options] ##### Arguments | Argument | Required | Description | | -------- | -------- | ----------- | - | `module` | No | The name(s) of the module(s) to test (skip to test all modules). Use comma as a separator to specify multiple modules. + | `modules` | No | The name(s) of the module(s) to test (skip to test all modules). Use comma as a separator to specify multiple modules. ##### Options @@ -669,13 +670,13 @@ Examples: ##### Usage - garden unlink source [source] [options] + garden unlink source [sources] [options] ##### Arguments | Argument | Required | Description | | -------- | -------- | ----------- | - | `source` | No | The name(s) of the source(s) to unlink. Use comma as a separator to specify multiple sources. + | `sources` | No | The name(s) of the source(s) to unlink. Use comma as a separator to specify multiple sources. ##### Options @@ -697,13 +698,13 @@ Examples: ##### Usage - garden unlink module [module] [options] + garden unlink module [modules] [options] ##### Arguments | Argument | Required | Description | | -------- | -------- | ----------- | - | `module` | No | The name(s) of the module(s) to unlink. Use comma as a separator to specify multiple modules. + | `modules` | No | The name(s) of the module(s) to unlink. Use comma as a separator to specify multiple modules. ##### Options @@ -724,13 +725,13 @@ Examples: ##### Usage - garden update-remote sources [source] + garden update-remote sources [sources] ##### Arguments | Argument | Required | Description | | -------- | -------- | ----------- | - | `source` | No | The name(s) of the remote source(s) to update. Use comma as a separator to specify multiple sources. + | `sources` | No | The name(s) of the remote source(s) to update. Use comma as a separator to specify multiple sources. ### garden update-remote modules @@ -746,13 +747,13 @@ Examples: ##### Usage - garden update-remote modules [module] + garden update-remote modules [modules] ##### Arguments | Argument | Required | Description | | -------- | -------- | ----------- | - | `module` | No | The name(s) of the remote module(s) to update. Use comma as a separator to specify multiple modules. + | `modules` | No | The name(s) of the remote module(s) to update. Use comma as a separator to specify multiple modules. ### garden update-remote all diff --git a/garden-service/src/commands/call.ts b/garden-service/src/commands/call.ts index 154a891ab1..4146014c6f 100644 --- a/garden-service/src/commands/call.ts +++ b/garden-service/src/commands/call.ts @@ -24,7 +24,7 @@ import dedent = require("dedent") const callArgs = { serviceAndPath: new StringParameter({ - help: "The name(s) of the service(s) to call followed by the ingress path (e.g. my-container/somepath).", + help: "The name(s) of the service to call followed by the ingress path (e.g. my-container/somepath).", required: true, }), } diff --git a/garden-service/src/commands/delete.ts b/garden-service/src/commands/delete.ts index 410da6aea8..6c4cefcf85 100644 --- a/garden-service/src/commands/delete.ts +++ b/garden-service/src/commands/delete.ts @@ -105,7 +105,7 @@ export class DeleteEnvironmentCommand extends Command { } const deleteServiceArgs = { - service: new StringsParameter({ + services: new StringsParameter({ help: "The name(s) of the service(s) to delete. Use comma as a separator to specify multiple services.", required: true, }), @@ -114,7 +114,8 @@ type DeleteServiceArgs = typeof deleteServiceArgs export class DeleteServiceCommand extends Command { name = "service" - help = "Deletes a running service." + alias = "services" + help = "Deletes running services." arguments = deleteServiceArgs description = dedent` @@ -128,7 +129,7 @@ export class DeleteServiceCommand extends Command { ` async action({ garden, log, args }: CommandParams): Promise { - const services = await garden.getServices(args.service) + const services = await garden.getServices(args.services) if (services.length === 0) { log.warn({ msg: "No services found. Aborting." }) diff --git a/garden-service/src/commands/deploy.ts b/garden-service/src/commands/deploy.ts index 8119ecf188..cbe354c932 100644 --- a/garden-service/src/commands/deploy.ts +++ b/garden-service/src/commands/deploy.ts @@ -24,7 +24,7 @@ import { processServices } from "../process" import { logHeader } from "../logger/util" const deployArgs = { - service: new StringsParameter({ + services: new StringsParameter({ help: deline`The name(s) of the service(s) to deploy (skip to deploy all services). Use comma as a separator to specify multiple services.`, }), @@ -64,6 +64,7 @@ export class DeployCommand extends Command { garden deploy # deploy all modules in the project garden deploy my-service # only deploy my-service + garden deploy service-a,service-b # only deploy service-a and service-b garden deploy --force # force re-deploy of modules, even if they're already deployed garden deploy --watch # watch for changes to code garden deploy --hot-reload=my-service # deploys all services, with hot reloading enabled for my-service @@ -78,7 +79,7 @@ export class DeployCommand extends Command { } async action({ garden, log, args, opts }: CommandParams): Promise> { - const services = await garden.getServices(args.service) + const services = await garden.getServices(args.services) if (services.length === 0) { log.error({ msg: "No services found. Aborting." }) diff --git a/garden-service/src/commands/logs.ts b/garden-service/src/commands/logs.ts index 4b19ec5819..9a45863d27 100644 --- a/garden-service/src/commands/logs.ts +++ b/garden-service/src/commands/logs.ts @@ -22,7 +22,7 @@ import { LoggerType } from "../logger/logger" import dedent = require("dedent") const logsArgs = { - service: new StringsParameter({ + services: new StringsParameter({ help: "The name(s) of the service(s) to log (skip to log all services). " + "Use comma as a separator to specify multiple services.", }), @@ -61,7 +61,7 @@ export class LogsCommand extends Command { async action({ garden, log, args, opts }: CommandParams): Promise> { const tail = opts.tail - const services = await garden.getServices(args.service) + const services = await garden.getServices(args.services) const result: ServiceLogEntry[] = [] const stream = new Stream() diff --git a/garden-service/src/commands/publish.ts b/garden-service/src/commands/publish.ts index 1bc15ea228..a0ff471461 100644 --- a/garden-service/src/commands/publish.ts +++ b/garden-service/src/commands/publish.ts @@ -24,7 +24,7 @@ import { logHeader } from "../logger/util" import dedent = require("dedent") const publishArgs = { - module: new StringsParameter({ + modules: new StringsParameter({ help: "The name(s) of the module(s) to publish (skip to publish all modules). " + "Use comma as a separator to specify multiple modules.", }), @@ -64,7 +64,7 @@ export class PublishCommand extends Command { async action({ garden, log, args, opts }: CommandParams): Promise> { logHeader({ log, emoji: "rocket", command: "Publish modules" }) - const modules = await garden.getModules(args.module) + const modules = await garden.getModules(args.modules) const results = await publishModules(garden, log, modules, !!opts["force-build"], !!opts["allow-dirty"]) diff --git a/garden-service/src/commands/test.ts b/garden-service/src/commands/test.ts index b9c548f80a..5b35d11bd1 100644 --- a/garden-service/src/commands/test.ts +++ b/garden-service/src/commands/test.ts @@ -26,7 +26,7 @@ import { getTestTasks } from "../tasks/test" import { logHeader } from "../logger/util" const testArgs = { - module: new StringsParameter({ + modules: new StringsParameter({ help: "The name(s) of the module(s) to test (skip to test all modules). " + "Use comma as a separator to specify multiple modules.", }), @@ -83,8 +83,8 @@ export class TestCommand extends Command { async action({ garden, log, args, opts }: CommandParams): Promise> { const dependencyGraph = await garden.getDependencyGraph() let modules: Module[] - if (args.module) { - modules = await dependencyGraph.withDependantModules(await garden.getModules(args.module)) + if (args.modules) { + modules = await dependencyGraph.withDependantModules(await garden.getModules(args.modules)) } else { // All modules are included in this case, so there's no need to compute dependants. modules = await garden.getModules() diff --git a/garden-service/src/commands/unlink/module.ts b/garden-service/src/commands/unlink/module.ts index 897179710b..984da69c5a 100644 --- a/garden-service/src/commands/unlink/module.ts +++ b/garden-service/src/commands/unlink/module.ts @@ -23,7 +23,7 @@ import { } from "../../config-store" const unlinkModuleArguments = { - module: new StringsParameter({ + modules: new StringsParameter({ help: "The name(s) of the module(s) to unlink. Use comma as a separator to specify multiple modules.", }), } @@ -59,7 +59,7 @@ export class UnlinkModuleCommand extends Command { const sourceType = "module" - const { module = [] } = args + const { modules = [] } = args if (opts.all) { await garden.localConfigStore.set([localConfigKeys.linkedModuleSources], []) @@ -67,7 +67,7 @@ export class UnlinkModuleCommand extends Command { return { result: [] } } - const linkedModuleSources = await removeLinkedSources({ garden, sourceType, names: module }) + const linkedModuleSources = await removeLinkedSources({ garden, sourceType, names: modules }) log.info(`Unlinked module(s) ${module}`) diff --git a/garden-service/src/commands/unlink/source.ts b/garden-service/src/commands/unlink/source.ts index e829977728..dc7406d66b 100644 --- a/garden-service/src/commands/unlink/source.ts +++ b/garden-service/src/commands/unlink/source.ts @@ -23,7 +23,7 @@ import { } from "../../config-store" const unlinkSourceArguments = { - source: new StringsParameter({ + sources: new StringsParameter({ help: "The name(s) of the source(s) to unlink. Use comma as a separator to specify multiple sources.", }), } @@ -59,7 +59,7 @@ export class UnlinkSourceCommand extends Command { const sourceType = "project" - const { source = [] } = args + const { sources = [] } = args if (opts.all) { await garden.localConfigStore.set([localConfigKeys.linkedProjectSources], []) @@ -67,9 +67,9 @@ export class UnlinkSourceCommand extends Command { return { result: [] } } - const linkedProjectSources = await removeLinkedSources({ garden, sourceType, names: source }) + const linkedProjectSources = await removeLinkedSources({ garden, sourceType, names: sources }) - log.info(`Unlinked source(s) ${source}`) + log.info(`Unlinked source(s) ${sources}`) return { result: linkedProjectSources } } diff --git a/garden-service/src/commands/update-remote/all.ts b/garden-service/src/commands/update-remote/all.ts index acded19997..02d43ec82d 100644 --- a/garden-service/src/commands/update-remote/all.ts +++ b/garden-service/src/commands/update-remote/all.ts @@ -42,13 +42,13 @@ export class UpdateRemoteAllCommand extends Command { const { result: projectSources } = await sourcesCmd.action({ garden, log, - args: { source: undefined }, + args: { sources: undefined }, opts: {}, }) const { result: moduleSources } = await modulesCmd.action({ garden, log, - args: { module: undefined }, + args: { modules: undefined }, opts: {}, }) diff --git a/garden-service/src/commands/update-remote/modules.ts b/garden-service/src/commands/update-remote/modules.ts index 5a4cf4ff68..e5d0c8e1b9 100644 --- a/garden-service/src/commands/update-remote/modules.ts +++ b/garden-service/src/commands/update-remote/modules.ts @@ -23,7 +23,7 @@ import { hasRemoteSource } from "../../util/ext-source-util" import { logHeader } from "../../logger/util" const updateRemoteModulesArguments = { - module: new StringsParameter({ + modules: new StringsParameter({ help: "The name(s) of the remote module(s) to update. Use comma as a separator to specify multiple modules.", }), } @@ -48,16 +48,16 @@ export class UpdateRemoteModulesCommand extends Command { async action({ garden, log, args }: CommandParams): Promise> { logHeader({ log, emoji: "hammer_and_wrench", command: "update-remote modules" }) - const { module } = args - const modules = await garden.getModules(module) + const { modules: moduleNames } = args + const modules = await garden.getModules(moduleNames) const moduleSources = modules .filter(hasRemoteSource) - .filter(src => module ? module.includes(src.name) : true) + .filter(src => moduleNames ? moduleNames.includes(src.name) : true) const names = moduleSources.map(src => src.name) - const diff = difference(module, names) + const diff = difference(moduleNames, names) if (diff.length > 0) { const modulesWithRemoteSource = (await garden.getModules()).filter(hasRemoteSource).sort() @@ -65,7 +65,7 @@ export class UpdateRemoteModulesCommand extends Command { `Expected module(s) ${chalk.underline(diff.join(","))} to have a remote source.`, { modulesWithRemoteSource, - input: module ? module.sort() : undefined, + input: moduleNames ? moduleNames.sort() : undefined, }, ) } diff --git a/garden-service/src/commands/update-remote/sources.ts b/garden-service/src/commands/update-remote/sources.ts index ef51b4c467..bf971bae3d 100644 --- a/garden-service/src/commands/update-remote/sources.ts +++ b/garden-service/src/commands/update-remote/sources.ts @@ -22,7 +22,7 @@ import { SourceConfig } from "../../config/project" import { logHeader } from "../../logger/util" const updateRemoteSourcesArguments = { - source: new StringsParameter({ + sources: new StringsParameter({ help: "The name(s) of the remote source(s) to update. Use comma as a separator to specify multiple sources.", }), } @@ -48,21 +48,21 @@ export class UpdateRemoteSourcesCommand extends Command { ): Promise> { logHeader({ log, emoji: "hammer_and_wrench", command: "update-remote sources" }) - const { source } = args + const { sources } = args const projectSources = garden.projectSources - .filter(src => source ? source.includes(src.name) : true) + .filter(src => sources ? sources.includes(src.name) : true) const names = projectSources.map(src => src.name) // TODO: Make external modules a cli type to avoid validation repetition - const diff = difference(source, names) + const diff = difference(sources, names) if (diff.length > 0) { throw new ParameterError( `Expected source(s) ${chalk.underline(diff.join(","))} to be specified in the project garden.yml config.`, { remoteSources: garden.projectSources.map(s => s.name).sort(), - input: source ? source.sort() : undefined, + input: sources ? sources.sort() : undefined, }, ) } diff --git a/garden-service/test/integ/run b/garden-service/test/integ/run index d36367fbba..65dffda2d0 100755 --- a/garden-service/test/integ/run +++ b/garden-service/test/integ/run @@ -24,4 +24,4 @@ ${garden_bin} scan ${garden_bin} build ${garden_bin} deploy ${garden_bin} test -${garden_bin} init environment +${garden_bin} init diff --git a/garden-service/test/src/commands/delete.ts b/garden-service/test/src/commands/delete.ts index 5908c6d022..677759e48d 100644 --- a/garden-service/test/src/commands/delete.ts +++ b/garden-service/test/src/commands/delete.ts @@ -114,7 +114,7 @@ describe("DeleteServiceCommand", () => { const garden = await Garden.factory(projectRootB, { plugins }) const log = garden.log - const { result } = await command.action({ garden, log, args: { service: ["service-a"] }, opts: {} }) + const { result } = await command.action({ garden, log, args: { services: ["service-a"] }, opts: {} }) expect(result).to.eql({ "service-a": { state: "unknown", ingresses: [] }, }) @@ -127,7 +127,7 @@ describe("DeleteServiceCommand", () => { const { result } = await command.action({ garden, log, - args: { service: ["service-a", "service-b"] }, + args: { services: ["service-a", "service-b"] }, opts: {}, }) expect(result).to.eql({ diff --git a/garden-service/test/src/commands/deploy.ts b/garden-service/test/src/commands/deploy.ts index 6b160a3a41..919f2fed29 100644 --- a/garden-service/test/src/commands/deploy.ts +++ b/garden-service/test/src/commands/deploy.ts @@ -100,7 +100,7 @@ describe("DeployCommand", () => { garden, log, args: { - service: undefined, + services: undefined, }, opts: { "hot-reload": undefined, @@ -135,7 +135,7 @@ describe("DeployCommand", () => { garden, log, args: { - service: ["service-b"], + services: ["service-b"], }, opts: { "hot-reload": undefined, diff --git a/garden-service/test/src/commands/publish.ts b/garden-service/test/src/commands/publish.ts index d50617e86e..c5a2181a85 100644 --- a/garden-service/test/src/commands/publish.ts +++ b/garden-service/test/src/commands/publish.ts @@ -58,7 +58,7 @@ describe("PublishCommand", () => { garden, log, args: { - module: undefined, + modules: undefined, }, opts: { "allow-dirty": false, @@ -84,7 +84,7 @@ describe("PublishCommand", () => { garden, log, args: { - module: undefined, + modules: undefined, }, opts: { "allow-dirty": false, @@ -110,7 +110,7 @@ describe("PublishCommand", () => { garden, log, args: { - module: ["module-a"], + modules: ["module-a"], }, opts: { "allow-dirty": false, @@ -133,7 +133,7 @@ describe("PublishCommand", () => { garden, log, args: { - module: ["module-c"], + modules: ["module-c"], }, opts: { "allow-dirty": false, @@ -157,7 +157,7 @@ describe("PublishCommand", () => { garden, log, args: { - module: ["module-a"], + modules: ["module-a"], }, opts: { "allow-dirty": false, @@ -200,7 +200,7 @@ describe("PublishCommand", () => { garden, log, args: { - module: ["module-a"], + modules: ["module-a"], }, opts: { "allow-dirty": false, @@ -216,7 +216,7 @@ describe("PublishCommand", () => { garden, log, args: { - module: ["module-a"], + modules: ["module-a"], }, opts: { "allow-dirty": true, diff --git a/garden-service/test/src/commands/test.ts b/garden-service/test/src/commands/test.ts index 3eb5b19806..6d59bec2da 100644 --- a/garden-service/test/src/commands/test.ts +++ b/garden-service/test/src/commands/test.ts @@ -12,7 +12,7 @@ describe("commands.test", () => { const { result } = await command.action({ garden, log, - args: { module: undefined }, + args: { modules: undefined }, opts: { "name": undefined, "force": true, "force-build": true, "watch": false }, }) @@ -49,7 +49,7 @@ describe("commands.test", () => { const { result } = await command.action({ garden, log, - args: { module: ["module-a"] }, + args: { modules: ["module-a"] }, opts: { "name": undefined, "force": true, "force-build": true, "watch": false }, }) diff --git a/garden-service/test/src/commands/unlink.ts b/garden-service/test/src/commands/unlink.ts index 7c44bc2169..e6212d3898 100644 --- a/garden-service/test/src/commands/unlink.ts +++ b/garden-service/test/src/commands/unlink.ts @@ -65,7 +65,7 @@ describe("UnlinkCommand", () => { await unlinkCmd.action({ garden, log, - args: { module: ["module-a", "module-b"] }, + args: { modules: ["module-a", "module-b"] }, opts: { all: false }, }) const { linkedModuleSources } = await garden.localConfigStore.get() @@ -78,7 +78,7 @@ describe("UnlinkCommand", () => { await unlinkCmd.action({ garden, log, - args: { module: undefined }, + args: { modules: undefined }, opts: { all: true }, }) const { linkedModuleSources } = await garden.localConfigStore.get() @@ -134,7 +134,7 @@ describe("UnlinkCommand", () => { await unlinkCmd.action({ garden, log, - args: { source: ["source-a", "source-b"] }, + args: { sources: ["source-a", "source-b"] }, opts: { all: false }, }) const { linkedProjectSources } = await garden.localConfigStore.get() @@ -147,7 +147,7 @@ describe("UnlinkCommand", () => { await unlinkCmd.action({ garden, log, - args: { source: undefined }, + args: { sources: undefined }, opts: { all: true }, }) const { linkedProjectSources } = await garden.localConfigStore.get() diff --git a/garden-service/test/src/commands/update-remote.ts b/garden-service/test/src/commands/update-remote.ts index 0d841f50dd..19638fc860 100644 --- a/garden-service/test/src/commands/update-remote.ts +++ b/garden-service/test/src/commands/update-remote.ts @@ -34,7 +34,7 @@ describe("UpdateRemoteCommand", () => { const { result } = await cmd.action({ garden, log, - args: { source: undefined }, + args: { sources: undefined }, opts: {}, }) expect(result!.map(s => s.name).sort()).to.eql(["source-a", "source-b", "source-c"]) @@ -44,7 +44,7 @@ describe("UpdateRemoteCommand", () => { const { result } = await cmd.action({ garden, log, - args: { source: ["source-a"] }, + args: { sources: ["source-a"] }, opts: {}, }) expect(result!.map(s => s.name).sort()).to.eql(["source-a"]) @@ -56,7 +56,7 @@ describe("UpdateRemoteCommand", () => { await cmd.action({ garden, log, - args: { source: undefined }, + args: { sources: undefined }, opts: {}, }) expect(await pathExists(stalePath)).to.be.false @@ -68,7 +68,7 @@ describe("UpdateRemoteCommand", () => { await cmd.action({ garden, log, - args: { source: ["banana"] }, + args: { sources: ["banana"] }, opts: {}, }) ), @@ -94,7 +94,7 @@ describe("UpdateRemoteCommand", () => { const { result } = await cmd.action({ garden, log, - args: { module: undefined }, + args: { modules: undefined }, opts: {}, }) expect(result!.map(s => s.name).sort()).to.eql(["module-a", "module-b", "module-c"]) @@ -104,7 +104,7 @@ describe("UpdateRemoteCommand", () => { const { result } = await cmd.action({ garden, log, - args: { module: ["module-a"] }, + args: { modules: ["module-a"] }, opts: {}, }) expect(result!.map(s => s.name).sort()).to.eql(["module-a"]) @@ -116,7 +116,7 @@ describe("UpdateRemoteCommand", () => { await cmd.action({ garden, log, - args: { module: undefined }, + args: { modules: undefined }, opts: {}, }) expect(await pathExists(stalePath)).to.be.false @@ -128,7 +128,7 @@ describe("UpdateRemoteCommand", () => { await cmd.action({ garden, log, - args: { module: ["banana"] }, + args: { modules: ["banana"] }, opts: {}, }) ),