Skip to content

Commit

Permalink
fix(eventual-send): also accept farName without mandatory prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jan 3, 2024
1 parent f9bd031 commit 5d92dd6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion packages/eventual-send/src/message-breakpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ const { hasOwn, freeze } = Object;

const BP_REGEXP = /(.+?)\.(\w+?|\*)=(\d+?|\*)/;

const tagMatches = (tag, objTag) =>
tag === '*' ||
tag === objTag ||
(objTag.endsWith(tag) &&
`Alleged: ${tag}` === objTag ||
`DebugName: ${tag}` === objTag
);

export const makeMessageBreakpointTester = optionName => {
const breakpointsList = getEnvironmentOption(optionName, '');

Expand Down Expand Up @@ -44,7 +52,7 @@ export const makeMessageBreakpointTester = optionName => {
if (patts) {
for (const patt of patts) {
const [tag, count] = patt;
if (tag === '*' || tag === obj[Symbol.toStringTag]) {
if (tagMatches(tag, obj[Symbol.toStringTag])) {
if (count === '*') {
return true;
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/pass-style/test/prepare-breakpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

process.env.ENDO_DELIVERY_BREAKPOINTS = [
// One line per breakpoint directive.
'Alleged: Bob.foo=*',
'Bob.foo=*',
'*.bar=0',
].join(',');

0 comments on commit 5d92dd6

Please sign in to comment.