@fraqjs/fraq 0.13.2 → 0.13.3

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/index.mjs +2 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -316,7 +316,7 @@ var Router = class Router {
316
316
  for (const branch of this.branchesFrom(session, [], { includeHidden: true })) {
317
317
  const literalActivationIndex = branch.type === "rawPattern" ? Object.values(branch.rawPattern.pattern).findIndex((parameter) => parameter.capturer.typeInstruction.type === "literal") : -1;
318
318
  let activationInputs = DEFAULT_ACTIVATIONS;
319
- if (branch.type === "command" || literalActivationIndex !== -1) {
319
+ if (branch.type === "command" || literalActivationIndex !== -1 || branch.path.length > 0) {
320
320
  const descriptor = this.describeBranch(branch);
321
321
  const activations = this.activationResolver(descriptor, session) ?? DEFAULT_ACTIVATIONS;
322
322
  activationInputs = Array.isArray(activations) ? activations : [activations];
@@ -373,7 +373,7 @@ var Router = class Router {
373
373
  }
374
374
  }
375
375
  matchBranch(branch, tokenizer, activation, session, literalActivationIndex) {
376
- if (branch.type === "command" && !this.consumeActivation(tokenizer, activation, session)) return;
376
+ if ((branch.type === "command" || branch.type === "rawPattern" && branch.path.length > 0 && literalActivationIndex === -1) && !this.consumeActivation(tokenizer, activation, session)) return;
377
377
  if (!this.matchPath(branch.path, tokenizer)) return;
378
378
  switch (branch.type) {
379
379
  case "command": return this.matchCommand(branch.command, tokenizer, branch.path, activation);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fraqjs/fraq",
3
3
  "type": "module",
4
- "version": "0.13.2",
4
+ "version": "0.13.3",
5
5
  "description": "Milky Bot framework",
6
6
  "files": [
7
7
  "dist"