@chronicle.app/imessage 0.3.0 → 0.4.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @chronicle.app/imessage
2
2
 
3
- Read `chat.db` with `ImessageExtractor`, then emit MessageAction/Message records with `ImessageTransformer`. `input` defaults to the macOS Messages database; use a consistent backup for exported data. The connection is read-only via built-in `node:sqlite`. Date windows are exclusive, records newest-first, and `limit: 0` means unlimited.
3
+ Read `chat.db` with `ImessageExtractor`, then emit MessageAction/Message records with `ImessageTransformer`. `input` defaults to the macOS Messages database; use a consistent backup for exported data. Reading it needs Full Disk Access for the app that runs Chronicle (Terminal, iTerm, your editor): System Settings → Privacy & Security → Full Disk Access. Without it the run stops with that hint, not SQLite's `unable to open database file`. The connection is read-only via built-in `node:sqlite`. Date windows are exclusive, records newest-first, and `limit: 0` means unlimited.
4
4
 
5
5
  Automatic iCloud account and AddressBook enrichment comes from `@chronicle.app/icloud`. `includeContactNames: false` skips contacts. An explicit `account` object (or null) lets callers describe exported data without host account lookup. Transformer config can inject `lookupContact` for exported contacts. Missing permissions/account/contact data fall back to source-local identity and unlabelled participants. When no identifier for the account owner is available, the owner is left out of the agent and recipients.
6
6
 
@@ -204,7 +204,7 @@ export default class ImessageTransformer extends ChronicleTransformer {
204
204
  const filePath = this.resolveAttachmentPath(attachment.filename);
205
205
  // Check if file exists
206
206
  if (!fs.existsSync(filePath)) {
207
- console.warn(`Attachment file not found: ${filePath}`);
207
+ this.logger.warn('Attachment file not found', { file: filePath });
208
208
  continue;
209
209
  }
210
210
  // MIME drives the media object @type (ImageObject vs DocumentObject…).
@@ -228,7 +228,10 @@ export default class ImessageTransformer extends ChronicleTransformer {
228
228
  mediaObjects.push(mediaObject);
229
229
  }
230
230
  catch (error) {
231
- console.warn(`Failed to process attachment ${attachment.filename}:`, error);
231
+ this.logger.warn('Failed to process attachment', {
232
+ file: attachment.filename,
233
+ error: String(error),
234
+ });
232
235
  }
233
236
  }
234
237
  return mediaObjects;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chronicle.app/imessage",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -19,9 +19,9 @@
19
19
  "type": "module",
20
20
  "description": "Chronicle imessage extraction plugin",
21
21
  "devDependencies": {
22
- "@chronicle.app/etl": "0.3.0",
23
- "@chronicle.app/schema": "0.3.0",
24
- "@chronicle.app/tsconfig": "0.3.0",
22
+ "@chronicle.app/etl": "0.4.0",
23
+ "@chronicle.app/schema": "0.4.0",
24
+ "@chronicle.app/tsconfig": "0.4.0",
25
25
  "@types/node": "^22.10.1",
26
26
  "typescript": "^5.7.2"
27
27
  },
@@ -36,8 +36,8 @@
36
36
  "registry": "https://registry.npmjs.org/"
37
37
  },
38
38
  "dependencies": {
39
- "@chronicle.app/etl-sqlite": "0.3.0",
40
- "@chronicle.app/icloud": "0.3.0",
39
+ "@chronicle.app/etl-sqlite": "0.4.0",
40
+ "@chronicle.app/icloud": "0.4.0",
41
41
  "zod": "^3.24.1"
42
42
  },
43
43
  "peerDependencies": {