@procedures/ios-backup 0.0.0-stage → 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/CHANGELOG.md +22 -0
- package/LICENSE +21 -0
- package/README.md +59 -2
- package/dist/.tsbuildinfo +1 -0
- package/dist/backup.d.ts +110 -0
- package/dist/backup.d.ts.map +1 -0
- package/dist/backup.js +296 -0
- package/dist/backup.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/module.d.ts +12 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +15 -0
- package/dist/module.js.map +1 -0
- package/dist/procedures.d.ts +10 -0
- package/dist/procedures.d.ts.map +1 -0
- package/dist/procedures.js +118 -0
- package/dist/procedures.js.map +1 -0
- package/dist/register.d.ts +6 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +8 -0
- package/dist/register.js.map +1 -0
- package/package.json +78 -3
- package/src/backup.ts +364 -0
- package/src/index.ts +4 -0
- package/src/module.ts +18 -0
- package/src/procedures.ts +170 -0
- package/src/register.ts +10 -0
package/dist/backup.js
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The reader of an iPhone backup in the MobileSync format, without a native dependency.
|
|
3
|
+
*
|
|
4
|
+
* A backup folder holds `Manifest.db` and the files of the phone. The name of each file is its
|
|
5
|
+
* `fileID`, in a subfolder with the first two characters of that name. `Manifest.db` gives the
|
|
6
|
+
* `fileID` of each domain and relative path. The module reads SQLite with `node:sqlite`.
|
|
7
|
+
*/
|
|
8
|
+
import { existsSync } from "node:fs";
|
|
9
|
+
import { copyFile, mkdtemp, readdir, rm, stat } from "node:fs/promises";
|
|
10
|
+
import { homedir, tmpdir } from "node:os";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
/** The start of the Apple epoch (`2001-01-01T00:00:00Z`), in milliseconds after the Unix epoch. */
|
|
13
|
+
export const APPLE_EPOCH_MS = 978_307_200_000;
|
|
14
|
+
/** The domain of the messages database in `Manifest.db`. */
|
|
15
|
+
export const SMS_DOMAIN = "HomeDomain";
|
|
16
|
+
/** The relative path of the messages database in `Manifest.db`. */
|
|
17
|
+
export const SMS_RELATIVE_PATH = "Library/SMS/sms.db";
|
|
18
|
+
/** An Apple time above this value is in nanoseconds. A time below it is in seconds. */
|
|
19
|
+
const NANOSECOND_THRESHOLD = 1_000_000_000_000;
|
|
20
|
+
/**
|
|
21
|
+
* The error of a backup that the module cannot read. The `code` tells the cause:
|
|
22
|
+
* `no-backup` (no backup folder), `encrypted` (`Manifest.db` is not a readable database),
|
|
23
|
+
* `no-file` (`Manifest.db` does not list the file) or `missing-file` (the folder does not hold the file).
|
|
24
|
+
*/
|
|
25
|
+
export class IosBackupError extends Error {
|
|
26
|
+
/** The cause of the error. */
|
|
27
|
+
code;
|
|
28
|
+
constructor(code, message, options) {
|
|
29
|
+
super(message, options);
|
|
30
|
+
this.name = "IosBackupError";
|
|
31
|
+
this.code = code;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* This function gives the default backup folders: the Apple Devices app and iTunes on Windows,
|
|
36
|
+
* and Finder on macOS. A folder that does not exist gives no backups.
|
|
37
|
+
*/
|
|
38
|
+
export function defaultBackupRoots(home = homedir()) {
|
|
39
|
+
return [
|
|
40
|
+
join(home, "Apple", "MobileSync", "Backup"),
|
|
41
|
+
join(home, "AppData", "Roaming", "Apple Computer", "MobileSync", "Backup"),
|
|
42
|
+
join(home, "Library", "Application Support", "MobileSync", "Backup"),
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* This function lists the backup folders in the roots, the newest first. A backup folder is a
|
|
47
|
+
* subfolder with a `Manifest.db`. The time of `Manifest.db` gives the order.
|
|
48
|
+
*/
|
|
49
|
+
export async function listBackups(roots = defaultBackupRoots()) {
|
|
50
|
+
const found = [];
|
|
51
|
+
for (const root of roots) {
|
|
52
|
+
let entries;
|
|
53
|
+
try {
|
|
54
|
+
entries = await readdir(root, { withFileTypes: true });
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
entries.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));
|
|
60
|
+
for (const entry of entries) {
|
|
61
|
+
if (!entry.isDirectory() && !entry.isSymbolicLink())
|
|
62
|
+
continue;
|
|
63
|
+
const path = join(root, entry.name);
|
|
64
|
+
const info = await stat(join(path, "Manifest.db")).catch(() => undefined);
|
|
65
|
+
if (info === undefined || !info.isFile())
|
|
66
|
+
continue;
|
|
67
|
+
found.push({ path, modifiedAt: info.mtime.toISOString(), mtime: info.mtimeMs });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// The sort is stable: of two folders with the same time, the first found stays first
|
|
71
|
+
found.sort((a, b) => b.mtime - a.mtime);
|
|
72
|
+
return found.map(({ path, modifiedAt }) => ({ path, modifiedAt }));
|
|
73
|
+
}
|
|
74
|
+
/** This function gives the newest backup folder in the roots, or `undefined` when there is none. */
|
|
75
|
+
export async function findLatestBackup(roots) {
|
|
76
|
+
return (await listBackups(roots))[0]?.path;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* This function changes an Apple time to an ISO 8601 string in UTC, to the second. The value is
|
|
80
|
+
* in nanoseconds after 2001-01-01 (iOS 11 and later), or in seconds (older databases).
|
|
81
|
+
*/
|
|
82
|
+
export function appleDateToIso(raw) {
|
|
83
|
+
let ms;
|
|
84
|
+
if (typeof raw === "bigint") {
|
|
85
|
+
ms = raw > BigInt(NANOSECOND_THRESHOLD) ? Number(raw / 1000000n) : Number(raw) * 1000;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
ms = raw > NANOSECOND_THRESHOLD ? raw / 1e6 : raw * 1000;
|
|
89
|
+
}
|
|
90
|
+
return new Date(ms + APPLE_EPOCH_MS).toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
91
|
+
}
|
|
92
|
+
/** This function changes an ISO 8601 time to an Apple time in nanoseconds. */
|
|
93
|
+
export function isoToAppleDate(iso) {
|
|
94
|
+
const ms = Date.parse(iso);
|
|
95
|
+
if (Number.isNaN(ms))
|
|
96
|
+
throw new RangeError(`Not a time: ${JSON.stringify(iso)}`);
|
|
97
|
+
return BigInt(ms - APPLE_EPOCH_MS) * 1000000n;
|
|
98
|
+
}
|
|
99
|
+
/** The class names of the string object in a typedstream. */
|
|
100
|
+
const STRING_CLASSES = ["NSString", "NSMutableString"];
|
|
101
|
+
/** The byte after the text of a string object in a typedstream. */
|
|
102
|
+
const END_OF_OBJECT = 0x86;
|
|
103
|
+
/**
|
|
104
|
+
* This function gets the plain text from the `attributedBody` column of a message: an
|
|
105
|
+
* `NSAttributedString` in the typedstream format. It gives `undefined` when the value has no text.
|
|
106
|
+
*/
|
|
107
|
+
export function extractTypedstreamText(body) {
|
|
108
|
+
const bytes = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
|
|
109
|
+
let marker = -1;
|
|
110
|
+
for (const name of STRING_CLASSES) {
|
|
111
|
+
const at = bytes.indexOf(name, 0, "latin1");
|
|
112
|
+
if (at !== -1 && (marker === -1 || at < marker))
|
|
113
|
+
marker = at;
|
|
114
|
+
}
|
|
115
|
+
if (marker === -1)
|
|
116
|
+
return undefined;
|
|
117
|
+
const plus = bytes.indexOf(0x2b, marker); // "+": the start of the bytes of the string
|
|
118
|
+
if (plus === -1 || plus + 1 >= bytes.length)
|
|
119
|
+
return undefined;
|
|
120
|
+
let start = plus + 1;
|
|
121
|
+
const first = bytes[start];
|
|
122
|
+
let length;
|
|
123
|
+
// A typedstream integer: one byte below 0x80, or 0x81 and 2 bytes, or 0x82 and 4 bytes (little-endian)
|
|
124
|
+
if (first === 0x81) {
|
|
125
|
+
length = start + 3 <= bytes.length ? bytes.readUInt16LE(start + 1) : undefined;
|
|
126
|
+
start += 3;
|
|
127
|
+
}
|
|
128
|
+
else if (first === 0x82) {
|
|
129
|
+
length = start + 5 <= bytes.length ? bytes.readUInt32LE(start + 1) : undefined;
|
|
130
|
+
start += 5;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
length = first < 0x80 ? first : undefined;
|
|
134
|
+
start += 1;
|
|
135
|
+
}
|
|
136
|
+
if (start > bytes.length)
|
|
137
|
+
return undefined;
|
|
138
|
+
let end;
|
|
139
|
+
if (length !== undefined && start + length <= bytes.length) {
|
|
140
|
+
end = start + length;
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
// No length that agrees with the value: the text stops at the end of the object
|
|
144
|
+
const stop = bytes.indexOf(END_OF_OBJECT, start);
|
|
145
|
+
end = stop === -1 ? bytes.length : stop;
|
|
146
|
+
}
|
|
147
|
+
const text = bytes.subarray(start, end).toString("utf8").trim();
|
|
148
|
+
return text.length > 0 ? text : undefined;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* This function loads `node:sqlite` at the first read. Thus an import of the package does not
|
|
152
|
+
* show the experimental warning of `node:sqlite`, and does not fail on an older Node.
|
|
153
|
+
*/
|
|
154
|
+
async function loadSqlite() {
|
|
155
|
+
try {
|
|
156
|
+
return await import("node:sqlite");
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
throw new Error("@procedures/ios-backup needs node:sqlite: use Node 22.13 or later", { cause: error });
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/** This function gives a new temporary folder to `use`, and deletes the folder after it. */
|
|
163
|
+
async function withScratch(use) {
|
|
164
|
+
const dir = await mkdtemp(join(tmpdir(), "ios-backup-"));
|
|
165
|
+
try {
|
|
166
|
+
return await use(dir);
|
|
167
|
+
}
|
|
168
|
+
finally {
|
|
169
|
+
// On Windows, a file can stay locked for some milliseconds after it closes
|
|
170
|
+
await rm(dir, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 }).catch(() => undefined);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* This function finds a file of a backup by its domain and its relative path in `Manifest.db`.
|
|
175
|
+
* It gives `undefined` when `Manifest.db` does not list the file. It reads a copy of
|
|
176
|
+
* `Manifest.db` in a temporary folder, and changes nothing in the backup.
|
|
177
|
+
*/
|
|
178
|
+
export async function findBackupFile(backup, domain, relativePath) {
|
|
179
|
+
const manifest = join(backup, "Manifest.db");
|
|
180
|
+
if (!existsSync(manifest))
|
|
181
|
+
throw new IosBackupError("no-backup", `The folder has no Manifest.db: ${backup}`);
|
|
182
|
+
const { DatabaseSync } = await loadSqlite();
|
|
183
|
+
const fileId = await withScratch(async (scratch) => {
|
|
184
|
+
const copy = join(scratch, "Manifest.db");
|
|
185
|
+
await copyFile(manifest, copy);
|
|
186
|
+
let db;
|
|
187
|
+
try {
|
|
188
|
+
db = new DatabaseSync(copy, { readOnly: true });
|
|
189
|
+
const row = db.prepare("SELECT fileID FROM Files WHERE domain = ? AND relativePath = ?").get(domain, relativePath);
|
|
190
|
+
const id = row?.["fileID"];
|
|
191
|
+
return typeof id === "string" ? id : undefined;
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
throw new IosBackupError("encrypted", "Cannot read Manifest.db. An encrypted backup gives this error: make a backup without encryption.", { cause: error });
|
|
195
|
+
}
|
|
196
|
+
finally {
|
|
197
|
+
db?.close();
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
if (fileId === undefined)
|
|
201
|
+
return undefined;
|
|
202
|
+
for (const path of [join(backup, fileId.slice(0, 2), fileId), join(backup, fileId)]) {
|
|
203
|
+
if (existsSync(path))
|
|
204
|
+
return { fileId, path };
|
|
205
|
+
}
|
|
206
|
+
throw new IosBackupError("missing-file", `Manifest.db lists ${domain}:${relativePath}, but the backup has no file ${fileId}`);
|
|
207
|
+
}
|
|
208
|
+
/** The time of a message in nanoseconds, for the two units of `message.date`. */
|
|
209
|
+
const MESSAGE_NS = `(CASE WHEN m.date > ${NANOSECOND_THRESHOLD} THEN m.date ELSE m.date * 1000000000 END)`;
|
|
210
|
+
/** This function gives the value when it is a string that is not empty. */
|
|
211
|
+
const present = (value) => (value === null || value.length === 0 ? undefined : value);
|
|
212
|
+
/**
|
|
213
|
+
* This function reads the messages of a messages database (`sms.db` of a backup, or `chat.db` of
|
|
214
|
+
* macOS), in time order. It opens the file read only. A message without text is not in the result.
|
|
215
|
+
*/
|
|
216
|
+
export async function readSmsDatabase(file, query = {}) {
|
|
217
|
+
const where = ["m.guid IS NOT NULL", "((m.text IS NOT NULL AND m.text != '') OR m.attributedBody IS NOT NULL)"];
|
|
218
|
+
const parameters = [];
|
|
219
|
+
if (query.since !== undefined) {
|
|
220
|
+
where.push(`${MESSAGE_NS} >= ?`);
|
|
221
|
+
parameters.push(isoToAppleDate(query.since));
|
|
222
|
+
}
|
|
223
|
+
if (query.until !== undefined) {
|
|
224
|
+
where.push(`${MESSAGE_NS} < ?`);
|
|
225
|
+
parameters.push(isoToAppleDate(query.until));
|
|
226
|
+
}
|
|
227
|
+
const limited = query.limit !== undefined;
|
|
228
|
+
if (limited)
|
|
229
|
+
parameters.push(Math.max(0, Math.floor(query.limit)));
|
|
230
|
+
const sql = `SELECT m.guid AS guid, m.text AS text, m.attributedBody AS body, m.date AS date,
|
|
231
|
+
m.is_from_me AS is_from_me, m.service AS service, h.id AS handle,
|
|
232
|
+
c.chat_identifier AS chat_id, c.display_name AS chat_name
|
|
233
|
+
FROM message m
|
|
234
|
+
LEFT JOIN handle h ON h.ROWID = m.handle_id
|
|
235
|
+
LEFT JOIN chat c ON c.ROWID = (
|
|
236
|
+
SELECT cmj.chat_id FROM chat_message_join cmj WHERE cmj.message_id = m.ROWID ORDER BY cmj.chat_id LIMIT 1
|
|
237
|
+
)
|
|
238
|
+
WHERE ${where.join(" AND ")}
|
|
239
|
+
ORDER BY ${MESSAGE_NS} ${limited ? "DESC" : "ASC"}, m.ROWID ${limited ? "DESC" : "ASC"}
|
|
240
|
+
${limited ? "LIMIT ?" : ""}`;
|
|
241
|
+
const { DatabaseSync } = await loadSqlite();
|
|
242
|
+
const db = new DatabaseSync(file, { readOnly: true });
|
|
243
|
+
let rows;
|
|
244
|
+
try {
|
|
245
|
+
const statement = db.prepare(sql);
|
|
246
|
+
statement.setReadBigInts(true);
|
|
247
|
+
rows = statement.all(...parameters);
|
|
248
|
+
}
|
|
249
|
+
finally {
|
|
250
|
+
db.close();
|
|
251
|
+
}
|
|
252
|
+
if (limited)
|
|
253
|
+
rows.reverse();
|
|
254
|
+
const messages = [];
|
|
255
|
+
for (const row of rows) {
|
|
256
|
+
let text = present(row.text);
|
|
257
|
+
let fromBody = false;
|
|
258
|
+
if (text === undefined && row.body !== null) {
|
|
259
|
+
text = extractTypedstreamText(row.body);
|
|
260
|
+
fromBody = text !== undefined;
|
|
261
|
+
}
|
|
262
|
+
if (text === undefined)
|
|
263
|
+
continue;
|
|
264
|
+
const handle = present(row.handle);
|
|
265
|
+
const service = present(row.service);
|
|
266
|
+
const chatId = present(row.chat_id);
|
|
267
|
+
const chatName = present(row.chat_name);
|
|
268
|
+
messages.push({
|
|
269
|
+
guid: row.guid,
|
|
270
|
+
date: appleDateToIso(row.date),
|
|
271
|
+
text,
|
|
272
|
+
is_from_me: Number(row.is_from_me ?? 0) === 1,
|
|
273
|
+
...(handle === undefined ? {} : { handle }),
|
|
274
|
+
...(service === undefined ? {} : { service }),
|
|
275
|
+
...(chatId === undefined ? {} : { chat_id: chatId }),
|
|
276
|
+
...(chatName === undefined ? {} : { chat_name: chatName }),
|
|
277
|
+
...(fromBody ? { from_attributed_body: true } : {}),
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
return messages;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* This function reads the messages of a backup folder, in time order. It copies `sms.db` to a
|
|
284
|
+
* temporary folder, reads the copy and deletes it. It changes nothing in the backup.
|
|
285
|
+
*/
|
|
286
|
+
export async function readMessages(backup, query = {}) {
|
|
287
|
+
const file = await findBackupFile(backup, SMS_DOMAIN, SMS_RELATIVE_PATH);
|
|
288
|
+
if (file === undefined)
|
|
289
|
+
throw new IosBackupError("no-file", `The backup has no messages database (${SMS_RELATIVE_PATH})`);
|
|
290
|
+
return withScratch(async (scratch) => {
|
|
291
|
+
const copy = join(scratch, "sms.db");
|
|
292
|
+
await copyFile(file.path, copy);
|
|
293
|
+
return readSmsDatabase(copy, query);
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
//# sourceMappingURL=backup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backup.js","sourceRoot":"","sources":["../src/backup.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,mGAAmG;AACnG,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AAE9C,4DAA4D;AAC5D,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEvC,mEAAmE;AACnE,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAEtD,uFAAuF;AACvF,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAK/C;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC,8BAA8B;IACrB,IAAI,CAAqB;IAElC,YAAY,IAAwB,EAAE,OAAe,EAAE,OAAsB;QAC3E,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;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KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,KAAK,GAAiB,EAAE;IACzE,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAC;IACzE,IAAI,IAAI,KAAK,SAAS;QAAE,MAAM,IAAI,cAAc,CAAC,SAAS,EAAE,wCAAwC,iBAAiB,GAAG,CAAC,CAAC;IAC1H,OAAO,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACnC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACrC,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAChC,OAAO,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The procedures of @procedures/ios-backup as data. Importing this file registers nothing.
|
|
3
|
+
*/
|
|
4
|
+
import { type ProcedureModule, type ProcedureRegistry } from "@procedures/client";
|
|
5
|
+
export declare const iosBackupModule: ProcedureModule;
|
|
6
|
+
export default iosBackupModule;
|
|
7
|
+
/**
|
|
8
|
+
* This function registers the procedures of @procedures/ios-backup in a registry. The default is the
|
|
9
|
+
* global registry.
|
|
10
|
+
*/
|
|
11
|
+
export declare function registerIosBackupProcedures(registry?: ProcedureRegistry): void;
|
|
12
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAqD,KAAK,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGrI,eAAO,MAAM,eAAe,EAAE,eAA6E,CAAC;eAE7F,eAAe;AAE9B;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,GAAE,iBAAsC,GAAG,IAAI,CAElG"}
|
package/dist/module.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The procedures of @procedures/ios-backup as data. Importing this file registers nothing.
|
|
3
|
+
*/
|
|
4
|
+
import { defineModule, registerModules, PROCEDURE_REGISTRY } from "@procedures/client";
|
|
5
|
+
import { iosBackupProcedures } from "./procedures.js";
|
|
6
|
+
export const iosBackupModule = defineModule("@procedures/ios-backup", iosBackupProcedures);
|
|
7
|
+
export default iosBackupModule;
|
|
8
|
+
/**
|
|
9
|
+
* This function registers the procedures of @procedures/ios-backup in a registry. The default is the
|
|
10
|
+
* global registry.
|
|
11
|
+
*/
|
|
12
|
+
export function registerIosBackupProcedures(registry = PROCEDURE_REGISTRY) {
|
|
13
|
+
registerModules(registry, [iosBackupModule]);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAgD,MAAM,oBAAoB,CAAC;AACrI,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,CAAC,MAAM,eAAe,GAAoB,YAAY,CAAC,wBAAwB,EAAE,mBAAmB,CAAC,CAAC;AAE5G,eAAe,eAAe,CAAC;AAE/B;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,QAAQ,GAAsB,kBAAkB;IAC1F,eAAe,CAAC,QAAQ,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The procedures of `@procedures/ios-backup`: `iosBackup.find`, `iosBackup.file` and
|
|
3
|
+
* `iosBackup.messages`. Each one reads files and changes nothing.
|
|
4
|
+
*/
|
|
5
|
+
import { type AnyProcedure } from "@procedures/client";
|
|
6
|
+
export declare const iosBackupFindProcedure: AnyProcedure;
|
|
7
|
+
export declare const iosBackupFileProcedure: AnyProcedure;
|
|
8
|
+
export declare const iosBackupMessagesProcedure: AnyProcedure;
|
|
9
|
+
export declare const iosBackupProcedures: AnyProcedure[];
|
|
10
|
+
//# sourceMappingURL=procedures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"procedures.d.ts","sourceRoot":"","sources":["../src/procedures.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA+B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAuDpF,eAAO,MAAM,sBAAsB,EAAE,YAgBX,CAAC;AA6B3B,eAAO,MAAM,sBAAsB,EAAE,YAeX,CAAC;AAgC3B,eAAO,MAAM,0BAA0B,EAAE,YAef,CAAC;AAE3B,eAAO,MAAM,mBAAmB,EAAE,YAAY,EAAiF,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The procedures of `@procedures/ios-backup`: `iosBackup.find`, `iosBackup.file` and
|
|
3
|
+
* `iosBackup.messages`. Each one reads files and changes nothing.
|
|
4
|
+
*/
|
|
5
|
+
import { createProcedure, zodAdapter } from "@procedures/client";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { IosBackupError, defaultBackupRoots, findBackupFile, findLatestBackup, listBackups, readMessages, } from "./backup.js";
|
|
8
|
+
/** The procedures read files and change nothing. A copy in a temporary folder is deleted after the read. */
|
|
9
|
+
const READS_FILES = { reads: ["fs"], writes: [] };
|
|
10
|
+
const rootsField = z
|
|
11
|
+
.array(z.string().min(1))
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("The folders that hold the backup folders (default: the MobileSync folders of Windows and macOS)");
|
|
14
|
+
const backupField = z.string().min(1).optional().describe("The backup folder (default: the newest backup in the roots)");
|
|
15
|
+
const timeField = z.string().refine((value) => !Number.isNaN(Date.parse(value)), { message: "Use an ISO 8601 time" });
|
|
16
|
+
const BackupFolderSchema = z.object({ path: z.string(), modifiedAt: z.string() });
|
|
17
|
+
/** This function gives the backup folder of the input, or the newest backup in the roots. */
|
|
18
|
+
async function resolveBackup(input) {
|
|
19
|
+
if (input.backup !== undefined)
|
|
20
|
+
return input.backup;
|
|
21
|
+
const roots = input.roots ?? defaultBackupRoots();
|
|
22
|
+
const latest = await findLatestBackup(roots);
|
|
23
|
+
if (latest === undefined) {
|
|
24
|
+
throw new IosBackupError("no-backup", `No iPhone backup in ${roots.join(", ")}. Make a backup without encryption first.`);
|
|
25
|
+
}
|
|
26
|
+
return latest;
|
|
27
|
+
}
|
|
28
|
+
// iosBackup.find
|
|
29
|
+
const FindInputSchema = z.object({ roots: rootsField });
|
|
30
|
+
const FindOutputSchema = z.object({
|
|
31
|
+
latest: BackupFolderSchema.optional(),
|
|
32
|
+
backups: z.array(BackupFolderSchema),
|
|
33
|
+
roots: z.array(z.string()),
|
|
34
|
+
});
|
|
35
|
+
export const iosBackupFindProcedure = createProcedure()
|
|
36
|
+
.path(["iosBackup", "find"])
|
|
37
|
+
.input(zodAdapter(FindInputSchema))
|
|
38
|
+
.output(zodAdapter(FindOutputSchema))
|
|
39
|
+
.meta({
|
|
40
|
+
description: "Find the iPhone backups (MobileSync) on this computer, the newest first",
|
|
41
|
+
args: [],
|
|
42
|
+
output: "json",
|
|
43
|
+
effects: READS_FILES,
|
|
44
|
+
})
|
|
45
|
+
.handler(async (input) => {
|
|
46
|
+
const roots = input.roots ?? defaultBackupRoots();
|
|
47
|
+
const backups = await listBackups(roots);
|
|
48
|
+
const latest = backups[0];
|
|
49
|
+
return { ...(latest === undefined ? {} : { latest }), backups, roots };
|
|
50
|
+
})
|
|
51
|
+
.build();
|
|
52
|
+
// iosBackup.file
|
|
53
|
+
const FileInputSchema = z.object({
|
|
54
|
+
domain: z.string().min(1).describe("The domain of the file in Manifest.db, for example HomeDomain"),
|
|
55
|
+
relativePath: z.string().min(1).describe("The relative path of the file in its domain, for example Library/SMS/sms.db"),
|
|
56
|
+
backup: backupField,
|
|
57
|
+
roots: rootsField,
|
|
58
|
+
});
|
|
59
|
+
const FileOutputSchema = z.object({
|
|
60
|
+
backup: z.string(),
|
|
61
|
+
found: z.boolean(),
|
|
62
|
+
fileId: z.string().optional(),
|
|
63
|
+
path: z.string().optional(),
|
|
64
|
+
});
|
|
65
|
+
export const iosBackupFileProcedure = createProcedure()
|
|
66
|
+
.path(["iosBackup", "file"])
|
|
67
|
+
.input(zodAdapter(FileInputSchema))
|
|
68
|
+
.output(zodAdapter(FileOutputSchema))
|
|
69
|
+
.meta({
|
|
70
|
+
description: "Find a file of an iPhone backup by its domain and relative path in Manifest.db",
|
|
71
|
+
args: ["domain", "relativePath"],
|
|
72
|
+
output: "json",
|
|
73
|
+
effects: READS_FILES,
|
|
74
|
+
})
|
|
75
|
+
.handler(async (input) => {
|
|
76
|
+
const backup = await resolveBackup(input);
|
|
77
|
+
const file = await findBackupFile(backup, input.domain, input.relativePath);
|
|
78
|
+
return file === undefined ? { backup, found: false } : { backup, found: true, ...file };
|
|
79
|
+
})
|
|
80
|
+
.build();
|
|
81
|
+
// iosBackup.messages
|
|
82
|
+
const MessagesInputSchema = z.object({
|
|
83
|
+
backup: backupField,
|
|
84
|
+
roots: rootsField,
|
|
85
|
+
since: timeField.optional().describe("Only the messages at this time or after it (ISO 8601)"),
|
|
86
|
+
until: timeField.optional().describe("Only the messages before this time (ISO 8601)"),
|
|
87
|
+
limit: z.number().int().positive().optional().describe("Only the newest messages, at most this number"),
|
|
88
|
+
});
|
|
89
|
+
const MessageSchema = z.object({
|
|
90
|
+
guid: z.string(),
|
|
91
|
+
date: z.string(),
|
|
92
|
+
text: z.string(),
|
|
93
|
+
is_from_me: z.boolean(),
|
|
94
|
+
handle: z.string().optional(),
|
|
95
|
+
service: z.string().optional(),
|
|
96
|
+
chat_id: z.string().optional(),
|
|
97
|
+
chat_name: z.string().optional(),
|
|
98
|
+
from_attributed_body: z.boolean().optional(),
|
|
99
|
+
});
|
|
100
|
+
const MessagesOutputSchema = z.object({ backup: z.string(), messages: z.array(MessageSchema) });
|
|
101
|
+
export const iosBackupMessagesProcedure = createProcedure()
|
|
102
|
+
.path(["iosBackup", "messages"])
|
|
103
|
+
.input(zodAdapter(MessagesInputSchema))
|
|
104
|
+
.output(zodAdapter(MessagesOutputSchema))
|
|
105
|
+
.meta({
|
|
106
|
+
description: "Read the messages (iMessage and SMS) of an iPhone backup, in time order",
|
|
107
|
+
args: [],
|
|
108
|
+
output: "json",
|
|
109
|
+
effects: READS_FILES,
|
|
110
|
+
})
|
|
111
|
+
.handler(async (input) => {
|
|
112
|
+
const backup = await resolveBackup(input);
|
|
113
|
+
const messages = await readMessages(backup, { since: input.since, until: input.until, limit: input.limit });
|
|
114
|
+
return { backup, messages };
|
|
115
|
+
})
|
|
116
|
+
.build();
|
|
117
|
+
export const iosBackupProcedures = [iosBackupFindProcedure, iosBackupFileProcedure, iosBackupMessagesProcedure];
|
|
118
|
+
//# sourceMappingURL=procedures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"procedures.js","sourceRoot":"","sources":["../src/procedures.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,UAAU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,CAAC;AACH,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;AAEhG,MAAM,CAAC,MAAM,0BAA0B,GAAiB,eAAe,EAAE;KACtE,IAAI,CAAC,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;KAC/B,KAAK,CAAC,UAAU,CAAgB,mBAAmB,CAAC,CAAC;KACrD,MAAM,CAAC,UAAU,CAAiB,oBAAoB,CAAC,CAAC;KACxD,IAAI,CAAC;IACJ,WAAW,EAAE,yEAAyE;IACtF,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,WAAW;CACrB,CAAC;KACD,OAAO,CAAC,KAAK,EAAE,KAAoB,EAA2B,EAAE;IAC/D,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;IAC5G,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAC9B,CAAC,CAAC;KACD,KAAK,EAAkB,CAAC;AAE3B,MAAM,CAAC,MAAM,mBAAmB,GAAmB,CAAC,sBAAsB,EAAE,sBAAsB,EAAE,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,cAAc,aAAa,CAAC"}
|
package/dist/register.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Importing this file registers the procedures of @procedures/ios-backup in the global registry:
|
|
3
|
+
* `import "@procedures/ios-backup/register"`. The package root registers nothing.
|
|
4
|
+
*/
|
|
5
|
+
import { registerIosBackupProcedures } from "./module.js";
|
|
6
|
+
export * from "./module.js";
|
|
7
|
+
registerIosBackupProcedures();
|
|
8
|
+
//# sourceMappingURL=register.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAE1D,cAAc,aAAa,CAAC;AAE5B,2BAA2B,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,81 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/package",
|
|
2
3
|
"name": "@procedures/ios-backup",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
4
|
+
"version": "0.4.0",
|
|
5
|
+
"description": "Read an iPhone backup (MobileSync): find the newest backup, find a file in Manifest.db, read the messages of sms.db. No native dependency.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"iphone",
|
|
8
|
+
"ios",
|
|
9
|
+
"backup",
|
|
10
|
+
"mobilesync",
|
|
11
|
+
"imessage",
|
|
12
|
+
"sms",
|
|
13
|
+
"procedures"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://mark1russell7.github.io/client/",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/mark1russell7/client/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/mark1russell7/client.git",
|
|
22
|
+
"directory": "packages/ios-backup"
|
|
23
|
+
},
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": "Mark Russell (https://github.com/mark1russell7)",
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"import": "./dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./module": {
|
|
35
|
+
"types": "./dist/module.d.ts",
|
|
36
|
+
"import": "./dist/module.js"
|
|
37
|
+
},
|
|
38
|
+
"./register": {
|
|
39
|
+
"types": "./dist/register.d.ts",
|
|
40
|
+
"import": "./dist/register.js"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"src",
|
|
46
|
+
"!src/**/*.test.ts",
|
|
47
|
+
"!src/**/*.test.tsx",
|
|
48
|
+
"!src/**/__tests__",
|
|
49
|
+
"CHANGELOG.md"
|
|
50
|
+
],
|
|
51
|
+
"sideEffects": [
|
|
52
|
+
"./dist/register.js"
|
|
53
|
+
],
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=22.13"
|
|
56
|
+
},
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public",
|
|
59
|
+
"provenance": true
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"@procedures/client": "0.4.0",
|
|
63
|
+
"zod": "^4.6.5"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"typescript": "^7.0.2",
|
|
67
|
+
"@types/node": "^22.0.0",
|
|
68
|
+
"@mark1russell7/cue": "^1.0.0",
|
|
69
|
+
"vitest": "^5.0.3"
|
|
70
|
+
},
|
|
71
|
+
"client": {
|
|
72
|
+
"procedures": "./dist/register.js"
|
|
73
|
+
},
|
|
74
|
+
"scripts": {
|
|
75
|
+
"build": "tsc -b",
|
|
76
|
+
"typecheck": "tsc --noEmit",
|
|
77
|
+
"clean": "rm -rf dist .tsbuildinfo",
|
|
78
|
+
"test": "vitest run",
|
|
79
|
+
"test:watch": "vitest"
|
|
80
|
+
}
|
|
6
81
|
}
|