@happyvertical/smrt-messages 0.53.0 → 0.53.4

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 (23) hide show
  1. package/dist/chunks/{AccountCollection-Dxrl0uwX.js → AccountCollection-BPCu2H5K.js} +2 -2
  2. package/dist/chunks/{AccountCollection-Dxrl0uwX.js.map → AccountCollection-BPCu2H5K.js.map} +1 -1
  3. package/dist/chunks/{Email-C7Bl3h_w.js → Email-C2k5DSjU.js} +3 -3
  4. package/dist/chunks/{Email-C7Bl3h_w.js.map → Email-C2k5DSjU.js.map} +1 -1
  5. package/dist/chunks/{EmailFolder-Bm7TaTxG.js → EmailFolder-BMUG7c4H.js} +2 -2
  6. package/dist/chunks/{EmailFolder-Bm7TaTxG.js.map → EmailFolder-BMUG7c4H.js.map} +1 -1
  7. package/dist/chunks/{Message-DvLVVNwK.js → Message-UN2ZZ-e3.js} +4 -4
  8. package/dist/chunks/{Message-DvLVVNwK.js.map → Message-UN2ZZ-e3.js.map} +1 -1
  9. package/dist/chunks/{MessageCollection-BQMb0aoj.js → MessageCollection-CANuQAG1.js} +2 -2
  10. package/dist/chunks/{MessageCollection-BQMb0aoj.js.map → MessageCollection-CANuQAG1.js.map} +1 -1
  11. package/dist/chunks/{__smrt-register__-gOnaS9i-.js → __smrt-register__-CjS95qah.js} +2 -2
  12. package/dist/chunks/{__smrt-register__-gOnaS9i-.js.map → __smrt-register__-CjS95qah.js.map} +1 -1
  13. package/dist/index.js +9 -9
  14. package/dist/manifest.json +1 -1
  15. package/dist/smrt-knowledge.json +3 -3
  16. package/package.json +10 -10
  17. package/dist/__tests__/fk-fixtures.d.ts +0 -9
  18. package/dist/__tests__/fk-fixtures.d.ts.map +0 -1
  19. package/dist/__tests__/helpers/ledger-coexistence.d.ts +0 -9
  20. package/dist/__tests__/helpers/ledger-coexistence.d.ts.map +0 -1
  21. package/dist/__tests__/helpers/postgres-scratch.d.ts +0 -13
  22. package/dist/__tests__/helpers/postgres-scratch.d.ts.map +0 -1
  23. package/dist/svelte/messaging-settings.test.js +0 -16
@@ -1 +1 @@
1
- {"version":3,"file":"__smrt-register__-gOnaS9i-.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":""}
1
+ {"version":3,"file":"__smrt-register__-CjS95qah.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,11 +1,11 @@
1
1
  import { t as __exportAll } from "./chunks/rolldown-runtime-D7D4PA-g.js";
2
- import "./chunks/__smrt-register__-gOnaS9i-.js";
2
+ import "./chunks/__smrt-register__-CjS95qah.js";
3
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";
4
- import { r as Account, t as AccountCollection } from "./chunks/AccountCollection-Dxrl0uwX.js";
5
- import { t as Message } from "./chunks/Message-DvLVVNwK.js";
6
- import { t as MessageCollection } from "./chunks/MessageCollection-BQMb0aoj.js";
7
- import { t as Email } from "./chunks/Email-C7Bl3h_w.js";
8
- import { t as EmailFolder } from "./chunks/EmailFolder-Bm7TaTxG.js";
4
+ import { r as Account, t as AccountCollection } from "./chunks/AccountCollection-BPCu2H5K.js";
5
+ import { t as Message } from "./chunks/Message-UN2ZZ-e3.js";
6
+ import { t as MessageCollection } from "./chunks/MessageCollection-CANuQAG1.js";
7
+ import { t as Email } from "./chunks/Email-C2k5DSjU.js";
8
+ import { t as EmailFolder } from "./chunks/EmailFolder-BMUG7c4H.js";
9
9
  import { t as SlackSender } from "./chunks/SlackSender-CjSvwY1K.js";
10
10
  import { t as TweetSender } from "./chunks/TweetSender-CcLPNNi1.js";
11
11
  import { SmrtCollection, SmrtObject, crossPackageRef, field, foreignKey, importOptionalDependency, isUniqueViolationError, smrt } from "@happyvertical/smrt-core";
@@ -91,7 +91,7 @@ var Attachment = class extends SmrtObject {
91
91
  */
92
92
  async getMessage() {
93
93
  if (!this.messageId) return null;
94
- const { MessageCollection } = await import("./chunks/MessageCollection-BQMb0aoj.js").then((n) => n.n);
94
+ const { MessageCollection } = await import("./chunks/MessageCollection-CANuQAG1.js").then((n) => n.n);
95
95
  return await (await MessageCollection.create(this.options)).get({ id: this.messageId });
96
96
  }
97
97
  /**
@@ -609,7 +609,7 @@ var EmailAccount = class extends Account {
609
609
  for (const folderName of foldersToSync) try {
610
610
  let folder = await folderCollection.getByPath(accountId, folderName);
611
611
  if (!folder) {
612
- const { EmailFolder } = await import("./chunks/EmailFolder-Bm7TaTxG.js").then((n) => n.n);
612
+ const { EmailFolder } = await import("./chunks/EmailFolder-BMUG7c4H.js").then((n) => n.n);
613
613
  folder = new EmailFolder({
614
614
  ...this.childOptions(),
615
615
  accountId,
@@ -634,7 +634,7 @@ var EmailAccount = class extends Account {
634
634
  result.messagesSkipped++;
635
635
  continue;
636
636
  }
637
- const { Email } = await import("./chunks/Email-C7Bl3h_w.js").then((n) => n.n);
637
+ const { Email } = await import("./chunks/Email-C2k5DSjU.js").then((n) => n.n);
638
638
  let email = existingEmail;
639
639
  if (!email) {
640
640
  email = new Email({
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-messages",
5
- "packageVersion": "0.53.0",
5
+ "packageVersion": "0.53.4",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-messages:AccountCollection": {
8
8
  "name": "accountcollection",
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-messages",
6
- "packageVersion": "0.53.0",
6
+ "packageVersion": "0.53.4",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "c3116c8e7997993e595ed201fc593cfd48ee2609f718f3448f2b9cd095b9b757",
11
- "packageJson": "47c3416acc49be27c48ec8dff871afd954a9367a043d005e386ca40d481db7f6",
10
+ "manifest": "e25dd99ddea88e933d5f8c782a8d834e2c6020513fb42f0b7a733caee8791000",
11
+ "packageJson": "8b0edbd2865f489ab6eee93d2aeaaf60451db632200835d186a37dbe0dd14391",
12
12
  "agents": "36405a8a9cefd4f831381d3670572dc3489d43fbc1787fb12b70814cc1e59f34"
13
13
  },
14
14
  "exports": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-messages",
3
- "version": "0.53.0",
3
+ "version": "0.53.4",
4
4
  "smrtJsdoc": "strict",
5
5
  "description": "Unified multi-channel messaging with STI-based hierarchies",
6
6
  "type": "module",
@@ -62,12 +62,12 @@
62
62
  "@happyvertical/files": "^0.98.0",
63
63
  "@happyvertical/logger": "^0.98.0",
64
64
  "@happyvertical/messages": "^0.98.0",
65
- "@happyvertical/smrt-core": "0.53.0",
66
- "@happyvertical/smrt-types": "0.53.0",
67
- "@happyvertical/smrt-secrets": "0.53.0",
68
- "@happyvertical/smrt-tenancy": "0.53.0",
69
- "@happyvertical/smrt-ui": "0.53.0",
70
- "@happyvertical/smrt-users": "0.53.0",
65
+ "@happyvertical/smrt-core": "0.53.4",
66
+ "@happyvertical/smrt-types": "0.53.4",
67
+ "@happyvertical/smrt-secrets": "0.53.4",
68
+ "@happyvertical/smrt-tenancy": "0.53.4",
69
+ "@happyvertical/smrt-ui": "0.53.4",
70
+ "@happyvertical/smrt-users": "0.53.4",
71
71
  "@happyvertical/sql": "^0.98.0",
72
72
  "@happyvertical/utils": "^0.98.0"
73
73
  },
@@ -84,8 +84,8 @@
84
84
  }
85
85
  },
86
86
  "devDependencies": {
87
- "@happyvertical/smrt-ledgers": "0.53.0",
88
- "@happyvertical/smrt-vitest": "0.53.0",
87
+ "@happyvertical/smrt-ledgers": "0.53.4",
88
+ "@happyvertical/smrt-vitest": "0.53.4",
89
89
  "@sveltejs/package": "^2.5.8",
90
90
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
91
91
  "@types/node": "24.13.6",
@@ -117,7 +117,7 @@
117
117
  "access": "public"
118
118
  },
119
119
  "scripts": {
120
- "build": "vite build --mode library && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json",
120
+ "build": "vite build --mode library && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json && node ../../scripts/prune-svelte-package-artifacts.js dist",
121
121
  "build:watch": "vite build --mode library --watch",
122
122
  "clean": "rm -rf dist",
123
123
  "dev": "vite",
@@ -1,9 +0,0 @@
1
- import type { DatabaseInterface } from '@happyvertical/sql';
2
- /**
3
- * Complete the same-package parent side of message test schemas and seed any
4
- * explicit account identifiers used by child fixtures.
5
- */
6
- export declare function prepareMessageParents(db: DatabaseInterface, accountIds?: string[]): Promise<void>;
7
- /** Seed real Message parents for Attachment fixtures with explicit IDs. */
8
- export declare function seedMessageParents(db: DatabaseInterface, messageIds: string[]): Promise<void>;
9
- //# sourceMappingURL=fk-fixtures.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fk-fixtures.d.ts","sourceRoot":"","sources":["../../src/__tests__/fk-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAK5D;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,EAAE,EAAE,iBAAiB,EACrB,UAAU,GAAE,MAAM,EAAO,GACxB,OAAO,CAAC,IAAI,CAAC,CAef;AAED,2EAA2E;AAC3E,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,iBAAiB,EACrB,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,IAAI,CAAC,CAef"}
@@ -1,9 +0,0 @@
1
- import type { DatabaseInterface } from '@happyvertical/sql';
2
- export declare function assertMessagingAndLedgerAccountsCoexist(dbOptions: {
3
- type: 'sqlite';
4
- url: string;
5
- } | {
6
- type: 'postgres';
7
- url: string;
8
- }): Promise<DatabaseInterface>;
9
- //# sourceMappingURL=ledger-coexistence.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ledger-coexistence.d.ts","sourceRoot":"","sources":["../../../src/__tests__/helpers/ledger-coexistence.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAK5D,wBAAsB,uCAAuC,CAC3D,SAAS,EACL;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACpC,OAAO,CAAC,iBAAiB,CAAC,CAoD5B"}
@@ -1,13 +0,0 @@
1
- import type { DatabaseInterface } from '@happyvertical/smrt-core/migrations';
2
- type Hook = (fn: () => Promise<void>, timeout?: number) => void;
3
- export declare function withScratchDatabase(beforeEach: Hook, afterEach: Hook): {
4
- url: () => string;
5
- /** Track a connection so it is closed before the database is dropped. */
6
- track(db: DatabaseInterface): DatabaseInterface;
7
- /** A connection to this test's database with every registered schema. */
8
- database(): Promise<DatabaseInterface>;
9
- };
10
- /** The tables a column's foreign-key constraints reference. */
11
- export declare function foreignKeyTargets(db: DatabaseInterface, table: string, column: string): Promise<string[]>;
12
- export {};
13
- //# sourceMappingURL=postgres-scratch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postgres-scratch.d.ts","sourceRoot":"","sources":["../../../src/__tests__/helpers/postgres-scratch.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,KAAK,IAAI,GAAG,CAAC,EAAE,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAKhE,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI;eA0BnD,MAAM;IAQpB,yEAAyE;cAC/D,iBAAiB,GAAG,iBAAiB;IAI/C,yEAAyE;gBACvD,OAAO,CAAC,iBAAiB,CAAC;EAM/C;AAED,+DAA+D;AAC/D,wBAAsB,iBAAiB,CACrC,EAAE,EAAE,iBAAiB,EACrB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,EAAE,CAAC,CAcnB"}
@@ -1,16 +0,0 @@
1
- import { describe, expect, it } from 'vitest';
2
- import { coerceMessagingProviderValues } from './messaging-settings.js';
3
- describe('coerceMessagingProviderValues', () => {
4
- it('omits unset optional fields before coercing typed values', () => {
5
- expect(coerceMessagingProviderValues({ chatId: '123', secure: 'true' }, [
6
- { id: 'chatId', label: 'Chat ID', type: 'string' },
7
- { id: 'threadId', label: 'Thread ID', type: 'number' },
8
- { id: 'secure', label: 'Secure', type: 'boolean' },
9
- ])).toEqual({ chatId: '123', secure: true });
10
- });
11
- it('coerces supplied number fields', () => {
12
- expect(coerceMessagingProviderValues({ threadId: '42' }, [
13
- { id: 'threadId', label: 'Thread ID', type: 'number' },
14
- ])).toEqual({ threadId: 42 });
15
- });
16
- });