@wrangled/cli 0.3.157 → 0.3.158

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/main.js +10 -1
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -4536,7 +4536,16 @@ function printPageResults(results) {
4536
4536
  console.log(renderTable(["page", "ad", "ad name", "currency", ...numbers], results.adPages.map((r) => ({ ...pageNumbers(r), ad: r.adId ?? "(no Meta ad)", "ad name": r.adName === null ? "" : excerpt(r.adName, 30) }))));
4537
4537
  console.log('\n"by ad link" counts sales whose buyer\'s landing page was not recorded, credited to the page the ad links to now.');
4538
4538
  console.log('"by last visit" counts sales whose buyer\'s first landing page was not recorded and whose ad links to no single page, credited to the page of their last visit.');
4539
- console.log('"(no page named)" holds payments recorded by hand in GoHighLevel, and buyers with no recorded page.');
4539
+ const unnamed = results.pages.filter((r) => r.pageKey === null);
4540
+ const reasons = unnamed.flatMap((r) => (r.noPage ?? []).map((reason) => ({ ...reason, currency: r.currency })));
4541
+ if (reasons.length === 0) {
4542
+ if (unnamed.some((r) => (r.sales ?? 0) > 0))
4543
+ console.log('"(no page named)" holds payments recorded by hand in GoHighLevel, and buyers with no recorded page.');
4544
+ return;
4545
+ }
4546
+ console.log('\nWhy the sales in "(no page named)" have no page:');
4547
+ for (const r of reasons)
4548
+ console.log(`(no page named), ${r.currency}: ${r.sales} ${r.sales === 1 ? "sale" : "sales"}, ${r.revenue} revenue: ${r.credit}, ${r.means}`);
4540
4549
  }
4541
4550
  const MESSAGE_NUMBERS = ["currency", "helped", "helped revenue", "last nudge", "last nudge revenue", "first from Facebook"];
4542
4551
  const BOOKED_CALL_NUMBERS = ["booked calls helped", "booked calls last nudge"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrangled/cli",
3
- "version": "0.3.157",
3
+ "version": "0.3.158",
4
4
  "description": "Command-line access to your marketing data warehouse, for people and coding agents",
5
5
  "type": "module",
6
6
  "bin": {