@wrangled/cli 0.3.157 → 0.3.159

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.
package/dist/guide.js CHANGED
@@ -120,7 +120,7 @@ To find content, such as "the 10 emails with the best click rate", "our 5 best v
120
120
 
121
121
  - \`--text "<words>"\` finds words in the current version's subject, headline and body, or in a video's or call recording's transcript. Words are stemmed ("guarantee" finds "guaranteed"); use "quotes" for a phrase and -word to leave a word out.
122
122
  - \`--mode meaning\` finds content that means something close to \`--text\`, even in other words: \`--text "saves time"\` also finds "done in five minutes". Results come nearest first, each with its distance (0 is the same meaning) and the closest passage as its words. It takes no \`--sort\` or \`--order\`, and finds only content embedded so far (each hour, new versions and transcripts are embedded).
123
- - \`--kind\` (ad, email, sms, landing_page, video, social_post, article, conversation, document, collection_item), \`--platform\` (meta, ghl, klaviyo, roezan, bayengage, activecampaign, mailchimp, hubspot, kit, instantly, kajabi, omnisend, google_ads, tiktok, microsoft_ads, pinterest, linkedin, web, wordpress, webflow, strapi, youtube, instagram, facebook_page, callrail, zoom, fathom, fireflies, gong, granola, tldv, google_drive, ad_library, workspace, upload) and \`--origin\` (discovered or made) narrow it, and \`--collection <slug>\` keeps one collection's items, each with its details. \`--from\` and \`--to\` keep content live on those days: from its first day with numbers (or the day the library first saw it) to its last.
123
+ - \`--kind\` (ad, email, sms, landing_page, video, social_post, article, conversation, document, collection_item), \`--platform\` (meta, ghl, klaviyo, roezan, bayengage, activecampaign, mailchimp, hubspot, kit, instantly, kajabi, omnisend, mailgun, google_ads, tiktok, microsoft_ads, pinterest, linkedin, web, wordpress, webflow, strapi, youtube, instagram, facebook_page, callrail, zoom, fathom, fireflies, gong, granola, tldv, google_drive, ad_library, workspace, upload) and \`--origin\` (discovered or made) narrow it, and \`--collection <slug>\` keeps one collection's items, each with its details. \`--from\` and \`--to\` keep content live on those days: from its first day with numbers (or the day the library first saw it) to its last.
124
124
  - \`--sort\` is \`recent\` (the default, newest first) or any number in the \`content_scorecard\` view, such as \`click_rate\`, \`open_rate\`, \`roas\`, \`spend\` or their \`_30d\` twins for the last 30 days. Content with money in several currencies has a number per currency and sorts by its best. Content without that number comes last. \`--order asc\` turns it around; \`--limit\` is 1 to 50 (default 10).
125
125
  - Each result has the item's id or SKU, its words, how many files it has, whether it has a transcript, and its scorecard numbers. \`${cli} content show <sku | item-id>\` prints one item in full: its words, how many versions it has, its transcript and every number; \`--format json\` adds every version, and links to its files.
126
126
  - To add marketing that lives somewhere no source connects to, such as a sales video, a webinar recording, a script or an email from another tool, run \`${cli} content capture --kind <kind> --name <name>\` with \`--body\`, \`--file\`, \`--source\` (where it came from) and \`--url\`. It is kept as found, with no SKU, so it is never approved or published; \`--platform upload\` finds these. Videos and audio are transcribed on their own; give \`--transcript @file\` when you already have one, so none is paid for.
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"];
@@ -4559,6 +4568,7 @@ function salesRows(label, sales, calls) {
4559
4568
  const messageLabel = (m) => excerpt(m.name ?? m.subject ?? (m.realSales === "available" ? m.messageKey : (m.itemId ?? "")), 40);
4560
4569
  const messageSubject = (m) => (m.subject === null ? "" : excerpt(m.subject, 40));
4561
4570
  const MESSAGE_WORDS_CHARS = 400;
4571
+ const MAILGUN_NO_WORDS = "No words on file: Mailgun's events carry the subject line but not the email's words, and Mailgun's stored copy is not read. Read them in the tool that sent it (GoHighLevel, for an et_ tag).";
4562
4572
  /** Each message's subject and words, cut short, under its label and item id, in the tables' order. */
4563
4573
  function printMessageWords(messages) {
4564
4574
  if (messages.length === 0)
@@ -4566,8 +4576,9 @@ function printMessageWords(messages) {
4566
4576
  console.log("\nWords of each message, in the order above:");
4567
4577
  for (const m of messages) {
4568
4578
  const lines = [...(m.subject === null ? [] : [`Subject: ${m.subject}`]), ...(m.bodyText === null ? [] : excerpt(m.bodyText, MESSAGE_WORDS_CHARS, { flat: false }).split("\n"))];
4579
+ const missing = m.bodyText !== null ? [] : m.platform === "mailgun" ? [MAILGUN_NO_WORDS] : lines.length === 0 ? ["No words on file."] : [];
4569
4580
  console.log(`\n${messageLabel(m)}${m.itemId === null ? "" : `, item ${m.itemId}`}`);
4570
- console.log((lines.length === 0 ? ["No words on file."] : lines).map((line) => ` ${line}`.trimEnd()).join("\n"));
4581
+ console.log([...lines, ...missing].map((line) => ` ${line}`.trimEnd()).join("\n"));
4571
4582
  }
4572
4583
  console.log("\n--format json gives every message's full words.");
4573
4584
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrangled/cli",
3
- "version": "0.3.157",
3
+ "version": "0.3.159",
4
4
  "description": "Command-line access to your marketing data warehouse, for people and coding agents",
5
5
  "type": "module",
6
6
  "bin": {