@happyvertical/smrt-messages 0.51.24 → 0.51.26

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 (43) hide show
  1. package/AGENTS.md +9 -0
  2. package/dist/chunks/{AccountCollection-5IchK-_S.js → AccountCollection-BmV1i0h_.js} +2 -1
  3. package/dist/chunks/AccountCollection-BmV1i0h_.js.map +1 -0
  4. package/dist/chunks/{Email-BIdbpXym.js → Email-DgzIxL59.js} +3 -2
  5. package/dist/chunks/Email-DgzIxL59.js.map +1 -0
  6. package/dist/chunks/{EmailFolder-D0o1z0_T.js → EmailFolder-CSOFlXiv.js} +2 -1
  7. package/dist/chunks/EmailFolder-CSOFlXiv.js.map +1 -0
  8. package/dist/chunks/{Message-BtsJ06xH.js → Message-BqkK3cZS.js} +4 -3
  9. package/dist/chunks/Message-BqkK3cZS.js.map +1 -0
  10. package/dist/chunks/{MessageCollection-CYEFYNMh.js → MessageCollection-BRCkkIyh.js} +2 -2
  11. package/dist/chunks/{MessageCollection-CYEFYNMh.js.map → MessageCollection-BRCkkIyh.js.map} +1 -1
  12. package/dist/chunks/__smrt-register__-B_Zw2Bpn.js +6 -0
  13. package/dist/chunks/__smrt-register__-B_Zw2Bpn.js.map +1 -0
  14. package/dist/index.js +9 -8
  15. package/dist/index.js.map +1 -1
  16. package/dist/manifest.json +2 -1
  17. package/dist/models/Account.d.ts.map +1 -1
  18. package/dist/models/Attachment.d.ts +1 -1
  19. package/dist/models/Attachment.d.ts.map +1 -1
  20. package/dist/models/Blacklist.d.ts.map +1 -1
  21. package/dist/models/Email.d.ts +2 -2
  22. package/dist/models/Email.d.ts.map +1 -1
  23. package/dist/models/EmailAccount.d.ts +1 -1
  24. package/dist/models/EmailAccount.d.ts.map +1 -1
  25. package/dist/models/EmailFolder.d.ts +3 -3
  26. package/dist/models/EmailFolder.d.ts.map +1 -1
  27. package/dist/models/Message.d.ts +3 -3
  28. package/dist/models/Message.d.ts.map +1 -1
  29. package/dist/models/MessagingEndpoint.d.ts.map +1 -1
  30. package/dist/models/PersonaMessageRoute.d.ts.map +1 -1
  31. package/dist/models/SlackAccount.d.ts.map +1 -1
  32. package/dist/models/SlackMessage.d.ts.map +1 -1
  33. package/dist/models/TelegramAccount.d.ts.map +1 -1
  34. package/dist/models/Tweet.d.ts.map +1 -1
  35. package/dist/models/TwitterAccount.d.ts.map +1 -1
  36. package/dist/models/Whitelist.d.ts.map +1 -1
  37. package/dist/models/ZulipAccount.d.ts.map +1 -1
  38. package/dist/smrt-knowledge.json +7 -5
  39. package/package.json +11 -8
  40. package/dist/chunks/AccountCollection-5IchK-_S.js.map +0 -1
  41. package/dist/chunks/Email-BIdbpXym.js.map +0 -1
  42. package/dist/chunks/EmailFolder-D0o1z0_T.js.map +0 -1
  43. package/dist/chunks/Message-BtsJ06xH.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__smrt-register__-B_Zw2Bpn.js","names":[],"sources":["../../src/__smrt-register__.ts"],"sourcesContent":["/**\n * Self-registers this package's build-time manifest before any @smrt() decorator\n * in the package fires. Fixes issue #1132: in consumer runtimes (tsx, SvelteKit\n * SSR, plain `vite dev`) the decorator's synchronous manifest lookup previously\n * missed because no step populated the global manifest cache — classes got\n * registered with zero fields and `save()` / `toJSON()` silently dropped every\n * declared property.\n *\n * Import this module as the first statement in `src/index.ts` so its top-level\n * side effect runs ahead of any class module's @smrt() decorator.\n *\n * Silent no-op in dev/test, where the vitest plugin already populates manifests\n * via a different path. Only needs to succeed in the published dist output.\n *\n * @see https://github.com/happyvertical/smrt/issues/1132\n */\nimport { ObjectRegistry } from '@happyvertical/smrt-core';\n\n// During library builds, smrtPlugin replaces this entire module with generated\n// code that embeds the scanned manifest inline (#1506/#1507) — published dists\n// never resolve this URL, so downstream bundlers cannot break registration by\n// relocating the compiled module away from dist/manifest.json. The runtime\n// lookup below is the fallback for source-mode runs without that transform.\nObjectRegistry.registerPackageManifest(\n new URL('./manifest.json', import.meta.url),\n);\n"],"mappings":""}
package/dist/index.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import { t as __exportAll } from "./chunks/rolldown-runtime-D7D4PA-g.js";
2
+ import "./chunks/__smrt-register__-B_Zw2Bpn.js";
2
3
  import { a as registerMessagingProvider, n as getMessagingProvider, o as ZulipSender, r as listMessagingProviders, s as TelegramSender, t as ensureBuiltinMessagingProvidersRegistered } from "./chunks/providers-4iLula-V.js";
3
- import { r as Account, t as AccountCollection } from "./chunks/AccountCollection-5IchK-_S.js";
4
- import { t as Message } from "./chunks/Message-BtsJ06xH.js";
5
- import { t as MessageCollection } from "./chunks/MessageCollection-CYEFYNMh.js";
6
- import { t as Email } from "./chunks/Email-BIdbpXym.js";
7
- import { t as EmailFolder } from "./chunks/EmailFolder-D0o1z0_T.js";
4
+ import { r as Account, t as AccountCollection } from "./chunks/AccountCollection-BmV1i0h_.js";
5
+ import { t as Message } from "./chunks/Message-BqkK3cZS.js";
6
+ import { t as MessageCollection } from "./chunks/MessageCollection-BRCkkIyh.js";
7
+ import { t as Email } from "./chunks/Email-DgzIxL59.js";
8
+ import { t as EmailFolder } from "./chunks/EmailFolder-CSOFlXiv.js";
8
9
  import { t as SlackSender } from "./chunks/SlackSender-CjSvwY1K.js";
9
10
  import { t as TweetSender } from "./chunks/TweetSender-CcLPNNi1.js";
10
11
  import { SmrtCollection, SmrtObject, crossPackageRef, field, foreignKey, importOptionalDependency, smrt } from "@happyvertical/smrt-core";
@@ -90,7 +91,7 @@ var Attachment = class extends SmrtObject {
90
91
  */
91
92
  async getMessage() {
92
93
  if (!this.messageId) return null;
93
- const { MessageCollection } = await import("./chunks/MessageCollection-CYEFYNMh.js").then((n) => n.n);
94
+ const { MessageCollection } = await import("./chunks/MessageCollection-BRCkkIyh.js").then((n) => n.n);
94
95
  return await (await MessageCollection.create(this.options)).get({ id: this.messageId });
95
96
  }
96
97
  /**
@@ -525,7 +526,7 @@ var EmailAccount = class extends Account {
525
526
  for (const folderName of foldersToSync) try {
526
527
  let folder = await folderCollection.getByPath(accountId, folderName);
527
528
  if (!folder) {
528
- const { EmailFolder } = await import("./chunks/EmailFolder-D0o1z0_T.js").then((n) => n.n);
529
+ const { EmailFolder } = await import("./chunks/EmailFolder-CSOFlXiv.js").then((n) => n.n);
529
530
  folder = new EmailFolder({
530
531
  ...this.childOptions(),
531
532
  accountId,
@@ -550,7 +551,7 @@ var EmailAccount = class extends Account {
550
551
  result.messagesSkipped++;
551
552
  continue;
552
553
  }
553
- const { Email } = await import("./chunks/Email-BIdbpXym.js").then((n) => n.n);
554
+ const { Email } = await import("./chunks/Email-DgzIxL59.js").then((n) => n.n);
554
555
  let email = existingEmail;
555
556
  if (!email) {
556
557
  email = new Email({