@sjawhar/pi-legion-envoy 5.17.5 → 5.17.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/legion.js +17 -12
  2. package/package.json +1 -1
package/dist/legion.js CHANGED
@@ -33473,7 +33473,7 @@ import { logger } from "@oh-my-pi/pi-utils";
33473
33473
  // package.json
33474
33474
  var package_default = {
33475
33475
  name: "@sjawhar/pi-legion-envoy",
33476
- version: "5.17.5",
33476
+ version: "5.17.6",
33477
33477
  type: "module",
33478
33478
  omp: {
33479
33479
  extensions: [
@@ -42139,7 +42139,7 @@ function commandOutput(only, invocation, text, st, ctx) {
42139
42139
  function substitutionInvocation(node, st, ctx) {
42140
42140
  if (node?.type !== "Command" || node.name === undefined || node.prefix.length !== 0)
42141
42141
  return;
42142
- const argv = args([node.name, ...node.suffix], st, ctx);
42142
+ const argv = commandArgs([node.name, ...node.suffix], st, ctx);
42143
42143
  const name = literalText(argv[0]?.exp);
42144
42144
  if (name === undefined)
42145
42145
  return;
@@ -42349,6 +42349,14 @@ function args(words, st, ctx) {
42349
42349
  });
42350
42350
  });
42351
42351
  }
42352
+ function commandArgs(words, st, ctx) {
42353
+ const argv = args(words, st, ctx);
42354
+ for (let index = argv.length - 1;index >= 0; index -= 1) {
42355
+ if (argv[index]?.fields === "none")
42356
+ argv.splice(index, 1);
42357
+ }
42358
+ return argv;
42359
+ }
42352
42360
  function positionalOf(list) {
42353
42361
  if (list.some((arg) => arg.fields === "unknown"))
42354
42362
  return;
@@ -43156,8 +43164,9 @@ function statementOutput(statement, st, ctx) {
43156
43164
  }
43157
43165
  if (command.name === undefined)
43158
43166
  return command.redirects.length === 0 ? "" : undefined;
43159
- const name = literalText(expandWord(command.name, st, ctx)[0]);
43160
- const rest = args(command.suffix, st, ctx);
43167
+ const argv = commandArgs([command.name, ...command.suffix], st, ctx);
43168
+ const name = literalText(argv[0]?.exp);
43169
+ const rest = argv.slice(1);
43161
43170
  if (name === "cat" && rest.length === 0) {
43162
43171
  const [heredoc, ...others] = command.redirects;
43163
43172
  if (heredoc === undefined || others.length > 0)
@@ -43300,7 +43309,7 @@ function handleCommand(command, st, ctx, pipeIn) {
43300
43309
  checkRedirects(command.redirects, undefined, site, st, ctx);
43301
43310
  return;
43302
43311
  }
43303
- const argv = args(words, st, ctx);
43312
+ const argv = commandArgs(words, st, ctx);
43304
43313
  checkRedirects(command.redirects, { name: literalText(argv[0]?.exp), args: argv.slice(1) }, site, st, ctx);
43305
43314
  dispatch({ args: argv, site, overlay, redirects: command.redirects, pipeIn }, st, ctx);
43306
43315
  }
@@ -43906,7 +43915,7 @@ function dispatch(invocation, outer, ctx) {
43906
43915
  "--remote-option",
43907
43916
  "--rsync-path",
43908
43917
  "--temp-dir"
43909
- ]).operands.filter(passesAnArgument).at(-1);
43918
+ ]).operands.at(-1);
43910
43919
  if (destination !== undefined) {
43911
43920
  checkTargets("rsync", "synchronize and delete into", [destination], ACTS_THROUGH_LINK, st, ctx, site);
43912
43921
  }
@@ -44416,9 +44425,6 @@ var LN_OPTIONS = {
44416
44425
  "--verbose": false,
44417
44426
  ...GNU_INFORMATION
44418
44427
  };
44419
- function passesAnArgument(arg) {
44420
- return arg.fields !== "none";
44421
- }
44422
44428
  function writeArguments(rest, valued, long) {
44423
44429
  const names = Object.keys(long);
44424
44430
  const operands2 = [];
@@ -44429,14 +44435,13 @@ function writeArguments(rest, valued, long) {
44429
44435
  const arg = rest[i];
44430
44436
  const { text, whole } = readableWord(arg);
44431
44437
  if (whole && text === "--") {
44432
- operands2.push(...rest.slice(i + 1).filter(passesAnArgument));
44438
+ operands2.push(...rest.slice(i + 1));
44433
44439
  break;
44434
44440
  }
44435
44441
  if (!whole || !text.startsWith("-") || text === "-") {
44436
44442
  if (!whole && mayBeSomeOption(text))
44437
44443
  uncertain = arg;
44438
- if (passesAnArgument(arg))
44439
- operands2.push(arg);
44444
+ operands2.push(arg);
44440
44445
  continue;
44441
44446
  }
44442
44447
  let takesValue = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-legion-envoy",
3
- "version": "5.17.5",
3
+ "version": "5.17.6",
4
4
  "type": "module",
5
5
  "omp": {
6
6
  "extensions": [