@swarmcraftai/cli 0.1.5 → 0.1.6

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.
Files changed (2) hide show
  1. package/dist/main.cjs +6 -6
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -2993,7 +2993,7 @@ var import_packet_workflow3 = __toESM(require_dist(), 1);
2993
2993
  // package.json
2994
2994
  var package_default = {
2995
2995
  name: "@swarmcraftai/cli",
2996
- version: "0.1.5",
2996
+ version: "0.1.6",
2997
2997
  description: "Prepare repositories and run packet-based SwarmCraft agent workflows from the terminal.",
2998
2998
  license: "SEE LICENSE IN LICENSE.txt",
2999
2999
  type: "module",
@@ -4145,6 +4145,10 @@ var COMMANDS = [
4145
4145
  async function main(argv) {
4146
4146
  const parsed = parseArgs(argv);
4147
4147
  const command = findCommand(parsed.positionals);
4148
+ if (hasFlag(parsed, "version") || hasFlag(parsed, "v")) {
4149
+ console.log(VERSION);
4150
+ return 0;
4151
+ }
4148
4152
  if (parsed.positionals.length === 0 || hasFlag(parsed, "help") || hasFlag(parsed, "h")) {
4149
4153
  if (command) {
4150
4154
  printCommandHelp(command);
@@ -4153,10 +4157,6 @@ async function main(argv) {
4153
4157
  }
4154
4158
  return 0;
4155
4159
  }
4156
- if (hasFlag(parsed, "version") || hasFlag(parsed, "v")) {
4157
- console.log(VERSION);
4158
- return 0;
4159
- }
4160
4160
  if (parsed.positionals[0] === "help") {
4161
4161
  const helpCommand = findCommand(parsed.positionals.slice(1));
4162
4162
  if (helpCommand) {
@@ -4701,7 +4701,7 @@ if (isCliEntrypoint()) {
4701
4701
  }
4702
4702
  function isCliEntrypoint() {
4703
4703
  const invokedScript = process.argv[1] ? import_node_path5.default.basename(process.argv[1]) : "";
4704
- return invokedScript === "main.cjs" || invokedScript === "main.js" || invokedScript === "main.ts";
4704
+ return invokedScript === "swarmcraft" || invokedScript === "main.cjs" || invokedScript === "main.js" || invokedScript === "main.ts";
4705
4705
  }
4706
4706
  // Annotate the CommonJS export names for ESM import in node:
4707
4707
  0 && (module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swarmcraftai/cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Prepare repositories and run packet-based SwarmCraft agent workflows from the terminal.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "type": "module",