Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const reflectLogCmd = Cmd.of("log")
.desc("stream log events")
.opt(Opt.of("trace").flag("t").desc("stream trace log messages"))
.opt(Opt.of("debug").flag("d").desc("stream debug log messages"))
.opt(Opt.of("info").flag("i").desc("stream info log messages"))
.opt(Opt.of("warn").flag("w").desc("stream warning log messages"))
.opt(Opt.of("error").flag("e").desc("stream error log messages"))
.helpCmd()
.exec(runReflectLog);
const reflectCmd = Cmd.of("reflect")
.desc("stream introspection metadata")
.opt(Opt.of("edge").flag("e").arg("edgeUri").desc("endpoint to introspect"))
.opt(Opt.of("mesh").flag("m").arg(Arg.of("meshUri").optional(true)).desc("introspect default or specified mesh"))
.opt(Opt.of("part").flag("p").arg(Arg.of("partKey").optional(true)).desc("introspect default or specified partition"))
.opt(Opt.of("host").flag("h").arg(Arg.of("hostUri").optional(true)).desc("introspect default or specified host"))
.opt(Opt.of("node").flag("n").arg("nodeUri").desc("introspect specified node"))
.opt(Opt.of("lane").flag("l").arg("laneUri").desc("introspect specified lane"))
.opt(Opt.of("link").flag("k").desc("introspect link behavior"))
.opt(Opt.of("router").flag("r").desc("introspect router behavior"))
.opt(Opt.of("data").desc("introspect data behavior"))
.opt(Opt.of("system").desc("introspect system behavior"))
.opt(Opt.of("process").desc("introspect process behavior"))
.opt(Opt.of("stats").flag("s").desc("stream introspection statistics"))
.opt(Opt.of("format").flag("f").arg("json|recon").desc("event output format"))
.cmd(reflectLogCmd)
.helpCmd()
.exec(runReflect);
const cmd = Cmd.of("swim-cli")
.cmd(linkCmd)
.cmd(syncCmd)
.opt(Opt.of("tests").arg("pattern").desc("only run tests whose names match this pattern"))
.opt(Opt.of("doc").desc("build documentation after successful compilation"))
.exec(runWatch);
const updateCmd: Cmd = Cmd.of("update")
.desc("update package versions to match build config")
.opt(Opt.of("projects").flag("p").arg("project(,project)*").desc("comma-separated list of projects to update"))
.exec(runUpdate);
const cleanCmd: Cmd = Cmd.of("clean")
.desc("delete generated files")
.opt(Opt.of("projects").flag("p").arg("project(,project)*").desc("comma-separated list of projects to clean"))
.exec(runClean);
export const cli = Cmd.of("build")
.opt(Opt.of("config").flag("c").arg(Arg.of("build.config.js").value("build.config.js").optional(true)).desc("build config script path"))
.cmd(projectsCmd)
.cmd(targetsCmd)
.cmd(compileCmd)
.cmd(testCmd)
.cmd(docCmd)
.cmd(watchCmd)
.cmd(updateCmd)
.cmd(cleanCmd)
.helpCmd();
const reflectLogCmd = Cmd.of("log")
.desc("stream log events")
.opt(Opt.of("trace").flag("t").desc("stream trace log messages"))
.opt(Opt.of("debug").flag("d").desc("stream debug log messages"))
.opt(Opt.of("info").flag("i").desc("stream info log messages"))
.opt(Opt.of("warn").flag("w").desc("stream warning log messages"))
.opt(Opt.of("error").flag("e").desc("stream error log messages"))
.helpCmd()
.exec(runReflectLog);
const reflectCmd = Cmd.of("reflect")
.desc("stream introspection metadata")
.opt(Opt.of("edge").flag("e").arg("edgeUri").desc("endpoint to introspect"))
.opt(Opt.of("mesh").flag("m").arg(Arg.of("meshUri").optional(true)).desc("introspect default or specified mesh"))
.opt(Opt.of("part").flag("p").arg(Arg.of("partKey").optional(true)).desc("introspect default or specified partition"))
.opt(Opt.of("host").flag("h").arg(Arg.of("hostUri").optional(true)).desc("introspect default or specified host"))
.opt(Opt.of("node").flag("n").arg("nodeUri").desc("introspect specified node"))
.opt(Opt.of("lane").flag("l").arg("laneUri").desc("introspect specified lane"))
.opt(Opt.of("link").flag("k").desc("introspect link behavior"))
.opt(Opt.of("router").flag("r").desc("introspect router behavior"))
.opt(Opt.of("data").desc("introspect data behavior"))
.opt(Opt.of("system").desc("introspect system behavior"))
.opt(Opt.of("process").desc("introspect process behavior"))
.opt(Opt.of("stats").flag("s").desc("stream introspection statistics"))
.opt(Opt.of("format").flag("f").arg("json|recon").desc("event output format"))
.cmd(reflectLogCmd)
.helpCmd()
.exec(runReflect);
const cmd = Cmd.of("swim-cli")
.cmd(linkCmd)
.exec(runGet);
const reflectLogCmd = Cmd.of("log")
.desc("stream log events")
.opt(Opt.of("trace").flag("t").desc("stream trace log messages"))
.opt(Opt.of("debug").flag("d").desc("stream debug log messages"))
.opt(Opt.of("info").flag("i").desc("stream info log messages"))
.opt(Opt.of("warn").flag("w").desc("stream warning log messages"))
.opt(Opt.of("error").flag("e").desc("stream error log messages"))
.helpCmd()
.exec(runReflectLog);
const reflectCmd = Cmd.of("reflect")
.desc("stream introspection metadata")
.opt(Opt.of("edge").flag("e").arg("edgeUri").desc("endpoint to introspect"))
.opt(Opt.of("mesh").flag("m").arg(Arg.of("meshUri").optional(true)).desc("introspect default or specified mesh"))
.opt(Opt.of("part").flag("p").arg(Arg.of("partKey").optional(true)).desc("introspect default or specified partition"))
.opt(Opt.of("host").flag("h").arg(Arg.of("hostUri").optional(true)).desc("introspect default or specified host"))
.opt(Opt.of("node").flag("n").arg("nodeUri").desc("introspect specified node"))
.opt(Opt.of("lane").flag("l").arg("laneUri").desc("introspect specified lane"))
.opt(Opt.of("link").flag("k").desc("introspect link behavior"))
.opt(Opt.of("router").flag("r").desc("introspect router behavior"))
.opt(Opt.of("data").desc("introspect data behavior"))
.opt(Opt.of("system").desc("introspect system behavior"))
.opt(Opt.of("process").desc("introspect process behavior"))
.opt(Opt.of("stats").flag("s").desc("stream introspection statistics"))
.opt(Opt.of("format").flag("f").arg("json|recon").desc("event output format"))
.cmd(reflectLogCmd)
.helpCmd()
.exec(runReflect);
const cmd = Cmd.of("swim-cli")