@stackedapp/utils 2.4.1 → 2.5.0

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.
@@ -603,6 +603,9 @@ function evaluateSocial(cond, ctx) {
603
603
  const platformMap = { tiktok: 'TikTok', instagram: 'Instagram', youtube: 'YouTube' };
604
604
  const platformText = cond.platforms.map((p) => platformMap[p] || p).join(' | ');
605
605
  const requiredWords = cond.requiredWords ?? [];
606
+ const afterText = cond.postedAfterMs
607
+ ? ` after ${new Date(cond.postedAfterMs).toLocaleDateString('en-GB', { day: '2-digit', month: '2-digit', year: 'numeric' })}`
608
+ : '';
606
609
  const details = [];
607
610
  if (mode === 'accumulate') {
608
611
  const matchCount = tSocialAccumulate?.matchCount || 0;
@@ -612,8 +615,8 @@ function evaluateSocial(cond, ctx) {
612
615
  text: hasContent
613
616
  ? `Found ${matchCount} matching ${platformText} post${matchCount !== 1 ? 's' : ''}`
614
617
  : requiredWords.length > 0
615
- ? `Post ${platformText} content with ${requiredWords.map((w) => `"${w}"`).join(', ')}`
616
- : `Post ${platformText} content`,
618
+ ? `Post ${platformText} content with ${requiredWords.map((w) => `"${w}"`).join(', ')}${afterText}`
619
+ : `Post ${platformText} content${afterText}`,
617
620
  });
618
621
  }
619
622
  else {
@@ -624,8 +627,8 @@ function evaluateSocial(cond, ctx) {
624
627
  percentCompleted: socialPercent,
625
628
  text: !hasContent
626
629
  ? requiredWords.length > 0
627
- ? `Attach a ${platformText} post with ${requiredWords.map((w) => `"${w}"`).join(', ')} in the title`
628
- : `Attach a ${platformText} post`
630
+ ? `Attach a ${platformText} post with ${requiredWords.map((w) => `"${w}"`).join(', ')} in the title${afterText}`
631
+ : `Attach a ${platformText} post${afterText}`
629
632
  : `Attached: ${title}`,
630
633
  });
631
634
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackedapp/utils",
3
- "version": "2.4.1",
3
+ "version": "2.5.0",
4
4
  "description": "Public utilities for Stacked platform SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",