noninteractive 0.3.15 → 0.3.16

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.
@@ -347,7 +347,7 @@ var init_daemon = __esm(() => {
347
347
  var require_package = __commonJS((exports, module) => {
348
348
  module.exports = {
349
349
  name: "noninteractive",
350
- version: "0.3.15",
350
+ version: "0.3.16",
351
351
  type: "module",
352
352
  bin: {
353
353
  noninteractive: "./bin/noninteractive.js"
@@ -512,10 +512,21 @@ function getSelfCommand() {
512
512
  function deriveSessionName(cmd, args) {
513
513
  const parts = [cmd, ...args];
514
514
  let i = 0;
515
- if (parts[i] === "npx" || parts[i] === "bunx")
516
- i++;
517
- while (i < parts.length && parts[i].startsWith("-"))
518
- i++;
515
+ while (i < parts.length) {
516
+ if (parts[i] === "npx" || parts[i] === "bunx") {
517
+ i++;
518
+ continue;
519
+ }
520
+ if (parts[i] === "--") {
521
+ i++;
522
+ continue;
523
+ }
524
+ if (parts[i].startsWith("-")) {
525
+ i++;
526
+ continue;
527
+ }
528
+ break;
529
+ }
519
530
  const name = parts[i] || cmd;
520
531
  const stripped = name.replace(/(?<=.)@[^/].*$/, "");
521
532
  return (stripped || name).replace(/^@[^/]+\//, "").replace(/[^a-zA-Z0-9_-]/g, "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noninteractive",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "noninteractive": "./bin/noninteractive.js"