@dongnanyang/deploy-cli 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -2,7 +2,7 @@
2
2
  const argv = process.argv.slice(2);
3
3
  if (argv.length === 0 || argv[0] === "tui") await import("./main.js");
4
4
  else {
5
- const cli = await import("./cli-Bxxkr9Qr.js");
5
+ const cli = await import("./cli-BmCyXTVr.js");
6
6
  process.exitCode = await cli.main(argv);
7
7
  }
8
8
  //#endregion
@@ -384,20 +384,20 @@ async function ps(args, options = {}) {
384
384
  error(USAGE$1);
385
385
  return 1;
386
386
  }
387
- let nameFilter;
388
- if (projectName !== void 0) {
389
- const project = (options.projects ?? (() => loadConfig().projects))().find((p) => p.name === projectName);
390
- if (!project) {
391
- error(`未找到项目: ${projectName}(请检查 ~/.deploy-cli/config.json 的 projects 注册表)`);
392
- return 1;
393
- }
394
- nameFilter = project.name;
395
- }
396
- const listOpts = {};
397
- if (all) listOpts.all = true;
398
- if (nameFilter) listOpts.name = nameFilter;
399
387
  const docker = options.docker ?? createDocker();
400
388
  try {
389
+ let nameFilter;
390
+ if (projectName !== void 0) {
391
+ const project = (options.projects ?? (() => loadConfig().projects))().find((p) => p.name === projectName);
392
+ if (!project) {
393
+ error(`未找到项目: ${projectName}(请检查 ~/.deploy-cli/config.json 的 projects 注册表)`);
394
+ return 1;
395
+ }
396
+ nameFilter = project.name;
397
+ }
398
+ const listOpts = {};
399
+ if (all) listOpts.all = true;
400
+ if (nameFilter) listOpts.name = nameFilter;
401
401
  const containers = await docker.listContainers(listOpts);
402
402
  log("NAME IMAGE STATE PORTS");
403
403
  for (const container of containers) log(`${container.name}\t${container.image}\t${container.state}\t${container.ports}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dongnanyang/deploy-cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Local CLI TUI for SSH tunnels & deploy scripts",
5
5
  "type": "module",
6
6
  "bin": {