sqlite-cookie-parser 1.0.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.
Files changed (158) hide show
  1. package/README.md +164 -0
  2. package/dist/bravoLinuxCookie.d.ts +5 -0
  3. package/dist/bravoLinuxCookie.js +12 -0
  4. package/dist/bravoLinuxCookie.js.map +1 -0
  5. package/dist/bravoMacCookie.d.ts +5 -0
  6. package/dist/bravoMacCookie.js +12 -0
  7. package/dist/bravoMacCookie.js.map +1 -0
  8. package/dist/bravoWindowsCookie.d.ts +5 -0
  9. package/dist/bravoWindowsCookie.js +12 -0
  10. package/dist/bravoWindowsCookie.js.map +1 -0
  11. package/dist/browsers/bravo.d.ts +5 -0
  12. package/dist/browsers/bravo.js +17 -0
  13. package/dist/browsers/bravo.js.map +1 -0
  14. package/dist/browsers/chrome.d.ts +5 -0
  15. package/dist/browsers/chrome.js +17 -0
  16. package/dist/browsers/chrome.js.map +1 -0
  17. package/dist/browsers/edge.d.ts +5 -0
  18. package/dist/browsers/edge.js +17 -0
  19. package/dist/browsers/edge.js.map +1 -0
  20. package/dist/browsers/firefoxCookie.d.ts +12 -0
  21. package/dist/browsers/firefoxCookie.js +8 -0
  22. package/dist/browsers/firefoxCookie.js.map +1 -0
  23. package/dist/browsers/opera.d.ts +5 -0
  24. package/dist/browsers/opera.js +17 -0
  25. package/dist/browsers/opera.js.map +1 -0
  26. package/dist/browsers/safariCookie.d.ts +12 -0
  27. package/dist/browsers/safariCookie.js +8 -0
  28. package/dist/browsers/safariCookie.js.map +1 -0
  29. package/dist/browsers/vivaldi.d.ts +5 -0
  30. package/dist/browsers/vivaldi.js +17 -0
  31. package/dist/browsers/vivaldi.js.map +1 -0
  32. package/dist/chromeLinuxCookie.d.ts +5 -0
  33. package/dist/chromeLinuxCookie.js +12 -0
  34. package/dist/chromeLinuxCookie.js.map +1 -0
  35. package/dist/chromeMacCookie.d.ts +5 -0
  36. package/dist/chromeMacCookie.js +12 -0
  37. package/dist/chromeMacCookie.js.map +1 -0
  38. package/dist/chromeWindowsCookie.d.ts +5 -0
  39. package/dist/chromeWindowsCookie.js +12 -0
  40. package/dist/chromeWindowsCookie.js.map +1 -0
  41. package/dist/chunk-2ILP4UJD.js +69 -0
  42. package/dist/chunk-2ILP4UJD.js.map +1 -0
  43. package/dist/chunk-4G6NLIPV.js +98 -0
  44. package/dist/chunk-4G6NLIPV.js.map +1 -0
  45. package/dist/chunk-5AEUDMIX.js +68 -0
  46. package/dist/chunk-5AEUDMIX.js.map +1 -0
  47. package/dist/chunk-5AJFPLWB.js +98 -0
  48. package/dist/chunk-5AJFPLWB.js.map +1 -0
  49. package/dist/chunk-6OYYWSIJ.js +58 -0
  50. package/dist/chunk-6OYYWSIJ.js.map +1 -0
  51. package/dist/chunk-A3YGBITD.js +221 -0
  52. package/dist/chunk-A3YGBITD.js.map +1 -0
  53. package/dist/chunk-AR5Q6KM4.js +37 -0
  54. package/dist/chunk-AR5Q6KM4.js.map +1 -0
  55. package/dist/chunk-D23AYBOE.js +35 -0
  56. package/dist/chunk-D23AYBOE.js.map +1 -0
  57. package/dist/chunk-E6CQFEXM.js +98 -0
  58. package/dist/chunk-E6CQFEXM.js.map +1 -0
  59. package/dist/chunk-EPL3V4O3.js +41 -0
  60. package/dist/chunk-EPL3V4O3.js.map +1 -0
  61. package/dist/chunk-EZBYP7NP.js +58 -0
  62. package/dist/chunk-EZBYP7NP.js.map +1 -0
  63. package/dist/chunk-GRIZYEBN.js +58 -0
  64. package/dist/chunk-GRIZYEBN.js.map +1 -0
  65. package/dist/chunk-HOGGS6QP.js +35 -0
  66. package/dist/chunk-HOGGS6QP.js.map +1 -0
  67. package/dist/chunk-IXZPT56H.js +35 -0
  68. package/dist/chunk-IXZPT56H.js.map +1 -0
  69. package/dist/chunk-J2UYSXFG.js +69 -0
  70. package/dist/chunk-J2UYSXFG.js.map +1 -0
  71. package/dist/chunk-JTBFDYPY.js +244 -0
  72. package/dist/chunk-JTBFDYPY.js.map +1 -0
  73. package/dist/chunk-LTLRZZW3.js +41 -0
  74. package/dist/chunk-LTLRZZW3.js.map +1 -0
  75. package/dist/chunk-MLKERL3L.js +98 -0
  76. package/dist/chunk-MLKERL3L.js.map +1 -0
  77. package/dist/chunk-NGBAATI3.js +35 -0
  78. package/dist/chunk-NGBAATI3.js.map +1 -0
  79. package/dist/chunk-PT5JK5UI.js +98 -0
  80. package/dist/chunk-PT5JK5UI.js.map +1 -0
  81. package/dist/chunk-Q2LDNBEA.js +35 -0
  82. package/dist/chunk-Q2LDNBEA.js.map +1 -0
  83. package/dist/chunk-QCW7AUP6.js +62 -0
  84. package/dist/chunk-QCW7AUP6.js.map +1 -0
  85. package/dist/chunk-SRZIPU62.js +69 -0
  86. package/dist/chunk-SRZIPU62.js.map +1 -0
  87. package/dist/chunk-SSXWHBKV.js +69 -0
  88. package/dist/chunk-SSXWHBKV.js.map +1 -0
  89. package/dist/chunk-TWA6YYS5.js +58 -0
  90. package/dist/chunk-TWA6YYS5.js.map +1 -0
  91. package/dist/chunk-TYLH6G3Z.js +52 -0
  92. package/dist/chunk-TYLH6G3Z.js.map +1 -0
  93. package/dist/chunk-U4G74MHA.js +69 -0
  94. package/dist/chunk-U4G74MHA.js.map +1 -0
  95. package/dist/chunk-UR6BPQ2T.js +103 -0
  96. package/dist/chunk-UR6BPQ2T.js.map +1 -0
  97. package/dist/chunk-XDL34EPI.js +35 -0
  98. package/dist/chunk-XDL34EPI.js.map +1 -0
  99. package/dist/chunk-YD3PNZMV.js +447 -0
  100. package/dist/chunk-YD3PNZMV.js.map +1 -0
  101. package/dist/common.d.ts +15 -0
  102. package/dist/common.js +9 -0
  103. package/dist/common.js.map +1 -0
  104. package/dist/edgeLinuxCookie.d.ts +5 -0
  105. package/dist/edgeLinuxCookie.js +12 -0
  106. package/dist/edgeLinuxCookie.js.map +1 -0
  107. package/dist/edgeMacCookie.d.ts +5 -0
  108. package/dist/edgeMacCookie.js +12 -0
  109. package/dist/edgeMacCookie.js.map +1 -0
  110. package/dist/edgeWindowsCookie.d.ts +5 -0
  111. package/dist/edgeWindowsCookie.js +12 -0
  112. package/dist/edgeWindowsCookie.js.map +1 -0
  113. package/dist/index.d.ts +2 -0
  114. package/dist/index.js +38 -0
  115. package/dist/index.js.map +1 -0
  116. package/dist/operaLinuxCookie.d.ts +5 -0
  117. package/dist/operaLinuxCookie.js +12 -0
  118. package/dist/operaLinuxCookie.js.map +1 -0
  119. package/dist/operaMacCookie.d.ts +5 -0
  120. package/dist/operaMacCookie.js +12 -0
  121. package/dist/operaMacCookie.js.map +1 -0
  122. package/dist/operaWindowsCookie.d.ts +5 -0
  123. package/dist/operaWindowsCookie.js +12 -0
  124. package/dist/operaWindowsCookie.js.map +1 -0
  125. package/dist/publicApi.d.ts +20 -0
  126. package/dist/publicApi.js +38 -0
  127. package/dist/publicApi.js.map +1 -0
  128. package/dist/types.d.ts +98 -0
  129. package/dist/types.js +1 -0
  130. package/dist/types.js.map +1 -0
  131. package/dist/util/crypto.d.ts +9 -0
  132. package/dist/util/crypto.js +11 -0
  133. package/dist/util/crypto.js.map +1 -0
  134. package/dist/util/fileHelper.d.ts +4 -0
  135. package/dist/util/fileHelper.js +9 -0
  136. package/dist/util/fileHelper.js.map +1 -0
  137. package/dist/util/linuxKeyring.d.ts +11 -0
  138. package/dist/util/linuxKeyring.js +8 -0
  139. package/dist/util/linuxKeyring.js.map +1 -0
  140. package/dist/util/macKeyChain.d.ts +16 -0
  141. package/dist/util/macKeyChain.js +10 -0
  142. package/dist/util/macKeyChain.js.map +1 -0
  143. package/dist/util/processExecutor.d.ts +7 -0
  144. package/dist/util/processExecutor.js +7 -0
  145. package/dist/util/processExecutor.js.map +1 -0
  146. package/dist/util/windowsDpapi.d.ts +9 -0
  147. package/dist/util/windowsDpapi.js +8 -0
  148. package/dist/util/windowsDpapi.js.map +1 -0
  149. package/dist/vivaldiLinuxCookie.d.ts +5 -0
  150. package/dist/vivaldiLinuxCookie.js +12 -0
  151. package/dist/vivaldiLinuxCookie.js.map +1 -0
  152. package/dist/vivaldiMacCookie.d.ts +5 -0
  153. package/dist/vivaldiMacCookie.js +12 -0
  154. package/dist/vivaldiMacCookie.js.map +1 -0
  155. package/dist/vivaldiWindowsCookie.d.ts +5 -0
  156. package/dist/vivaldiWindowsCookie.js +12 -0
  157. package/dist/vivaldiWindowsCookie.js.map +1 -0
  158. package/package.json +56 -0
@@ -0,0 +1,447 @@
1
+ import {
2
+ normalizeExpiration
3
+ } from "./chunk-JTBFDYPY.js";
4
+
5
+ // src/browsers/firefoxCookie.ts
6
+ import { homedir, tmpdir } from "os";
7
+ import {
8
+ copyFileSync,
9
+ mkdtempSync,
10
+ rmSync,
11
+ existsSync,
12
+ readdirSync,
13
+ readFileSync,
14
+ statSync
15
+ } from "fs";
16
+ import path from "path";
17
+ import Database from "better-sqlite3";
18
+ import lz4 from "lz4";
19
+ async function getCookiesFromFirefoxSqlite(options, origins, cookieNames) {
20
+ const warnings = [];
21
+ const allCookies = [];
22
+ let hosts;
23
+ try {
24
+ hosts = origins.map((origin) => new URL(origin).hostname);
25
+ } catch (error) {
26
+ warnings.push(`Invalid URL: ${error.message}`);
27
+ return { cookies: [], warnings };
28
+ }
29
+ const sqlDBPath = resolveFirefoxDBPath(options.profile);
30
+ if (sqlDBPath) {
31
+ const fileOptions = {
32
+ cookieFilePath: sqlDBPath,
33
+ profile: options.profile,
34
+ includeExpired: options.includeExpired,
35
+ includePartitioned: options.includePartitioned
36
+ };
37
+ const { cookies: persistentCookies, warnings: dbWarnings } = await getCookiesFromFirefoxSqliteDB(fileOptions, origins, cookieNames);
38
+ allCookies.push(...persistentCookies);
39
+ warnings.push(...dbWarnings);
40
+ } else {
41
+ warnings.push("Could not resolve Firefox cookie database path.");
42
+ }
43
+ const profileDir = resolveFirefoxProfileDir(options.profile);
44
+ if (profileDir) {
45
+ const sessionStorePath = path.join(profileDir, "sessionstore-backups", "recovery.jsonlz4");
46
+ if (existsSync(sessionStorePath)) {
47
+ try {
48
+ const sessionData = readJsonLz4File(sessionStorePath);
49
+ if (sessionData.cookies && Array.isArray(sessionData.cookies)) {
50
+ const sessionCookies = parseSessionCookies(
51
+ sessionData.cookies,
52
+ hosts,
53
+ cookieNames,
54
+ sessionStorePath
55
+ );
56
+ const existingKeys = new Set(allCookies.map((c) => `${c.name}@${c.domain}`));
57
+ for (const sc of sessionCookies) {
58
+ const key = `${sc.name}@${sc.domain}`;
59
+ if (!existingKeys.has(key)) {
60
+ allCookies.push(sc);
61
+ }
62
+ }
63
+ }
64
+ } catch (error) {
65
+ warnings.push(`Failed to parse sessionstore: ${error.message}`);
66
+ }
67
+ }
68
+ }
69
+ if (allCookies.length === 0 && warnings.length === 0) {
70
+ warnings.push("No cookies found.");
71
+ }
72
+ return { cookies: allCookies, warnings };
73
+ }
74
+ async function getCookiesFromFirefoxSqliteDB(options, origins, cookieNames) {
75
+ const warnings = [];
76
+ const tmpdirPath = mkdtempSync(path.join(tmpdir(), "sqlite-cookie-firefox-db-"));
77
+ const tempDbPath = path.join(tmpdirPath, "cookies.sqlite");
78
+ try {
79
+ copyFileSync(options.cookieFilePath, tempDbPath);
80
+ } catch (error) {
81
+ rmSync(tmpdirPath, { recursive: true, force: true });
82
+ warnings.push(`Failed to copy cookie database: ${error.message}`);
83
+ return { cookies: [], warnings };
84
+ }
85
+ try {
86
+ const hosts = origins.map((origin) => new URL(origin).hostname);
87
+ const whereClause = buildHostWhereClause(hosts);
88
+ const rowsResult = await getRawCookiesFromFirefoxDb(tempDbPath, whereClause);
89
+ if (!rowsResult.success) {
90
+ rmSync(tmpdirPath, { recursive: true, force: true });
91
+ warnings.push(rowsResult.error);
92
+ return { cookies: [], warnings };
93
+ }
94
+ const cookies = parseFirefoxCookieRows(rowsResult.rows, options, hosts, cookieNames, warnings);
95
+ rmSync(tmpdirPath, { recursive: true, force: true });
96
+ return { cookies, warnings };
97
+ } catch (error) {
98
+ rmSync(tmpdirPath, { recursive: true, force: true });
99
+ warnings.push(`Failed to get cookies: ${error.message}`);
100
+ return { cookies: [], warnings };
101
+ }
102
+ }
103
+ function parseFirefoxCookieRows(rows, options, hosts, cookieNames, warnings = []) {
104
+ const cookies = [];
105
+ for (const row of rows) {
106
+ const name = typeof row.name === "string" ? row.name : "";
107
+ if (cookieNames && !cookieNames.has(name)) {
108
+ continue;
109
+ }
110
+ const hostString = typeof row.host === "string" ? row.host : "";
111
+ if (!hostString) {
112
+ continue;
113
+ }
114
+ const host = hostString.startsWith(".") ? hostString.substring(1) : hostString;
115
+ const domainLower = host.toLowerCase();
116
+ if (!hosts.some((h) => {
117
+ const hostLower = h.toLowerCase();
118
+ return hostLower === domainLower || hostLower.endsWith(`.${domainLower}`);
119
+ })) {
120
+ continue;
121
+ }
122
+ const partitionKey = parseFirefoxPartitionKey(row.originAttributes);
123
+ if (!options.includePartitioned && partitionKey) {
124
+ continue;
125
+ }
126
+ const value = typeof row.value === "string" ? row.value : null;
127
+ if (value === null) {
128
+ warnings.push(`Invalid cookie value for cookie "${name}" at host "${host}"`);
129
+ continue;
130
+ }
131
+ const expiry = typeof row.expiry === "number" || typeof row.expiry === "bigint" ? row.expiry : tryParseInt(row.expiry);
132
+ const expires = normalizeExpiration(expiry, "firefox");
133
+ if (!options.includeExpired && expires && expires < Date.now()) {
134
+ continue;
135
+ }
136
+ const secure = row.isSecure === 1 || row.isSecure === true || row.isSecure === 1n || row.isSecure === "1";
137
+ const httpOnly = row.isHttpOnly === 1 || row.isHttpOnly === true || row.isHttpOnly === 1n || row.isHttpOnly === "1";
138
+ const sameSite = normalizeSameSite(row.sameSite);
139
+ const rowPath = typeof row.path === "string" ? row.path : "";
140
+ const cookie = {
141
+ name,
142
+ value,
143
+ domain: host,
144
+ path: rowPath || "/",
145
+ expires,
146
+ secure,
147
+ httpOnly,
148
+ sameSite,
149
+ partitionKey,
150
+ source: {
151
+ browser: "firefox",
152
+ cookieFilePath: options.cookieFilePath
153
+ }
154
+ };
155
+ cookies.push(cookie);
156
+ }
157
+ return cookies;
158
+ }
159
+ function normalizeSameSite(value) {
160
+ if (typeof value === "bigint") {
161
+ const intValue = Number(value);
162
+ return Number.isFinite(intValue) ? normalizeSameSite(intValue) : void 0;
163
+ } else if (typeof value === "number") {
164
+ switch (value) {
165
+ case 0:
166
+ return "none";
167
+ case 1:
168
+ return "lax";
169
+ case 2:
170
+ return "strict";
171
+ default:
172
+ return void 0;
173
+ }
174
+ } else if (typeof value === "string") {
175
+ const parsed = Number.parseInt(value, 10);
176
+ if (!Number.isNaN(parsed)) {
177
+ return normalizeSameSite(parsed);
178
+ }
179
+ const lower = value.toLowerCase();
180
+ switch (lower) {
181
+ case "none":
182
+ return "none";
183
+ case "lax":
184
+ return "lax";
185
+ case "strict":
186
+ return "strict";
187
+ default:
188
+ return void 0;
189
+ }
190
+ }
191
+ return void 0;
192
+ }
193
+ function tryParseInt(value) {
194
+ if (typeof value === "string") {
195
+ const parsed = parseInt(value, 10);
196
+ return isNaN(parsed) ? null : parsed;
197
+ }
198
+ return null;
199
+ }
200
+ function parseFirefoxPartitionKey(originAttributes) {
201
+ if (typeof originAttributes !== "string" || !originAttributes) {
202
+ return void 0;
203
+ }
204
+ const partitionMatch = originAttributes.match(/\^partitionKey=\(([^,]+),([^)]+)\)/);
205
+ if (partitionMatch) {
206
+ const [, scheme, domain] = partitionMatch;
207
+ return `${scheme}://${domain}`;
208
+ }
209
+ return void 0;
210
+ }
211
+ function expandHostCandidates(hostname) {
212
+ const parts = hostname.split(".");
213
+ if (parts.length <= 1) {
214
+ return [hostname];
215
+ }
216
+ const candidates = /* @__PURE__ */ new Set();
217
+ for (let i = 0; i <= parts.length - 2; i++) {
218
+ const candidate = parts.slice(i).join(".");
219
+ candidates.add(candidate);
220
+ }
221
+ return Array.from(candidates);
222
+ }
223
+ function buildHostWhereClause(hosts) {
224
+ const clauses = [];
225
+ for (const host of hosts) {
226
+ const candidates = expandHostCandidates(host);
227
+ for (const candidate of candidates) {
228
+ const escaped = sqlEscape(candidate);
229
+ const escapedDot = sqlEscape(`.${candidate}`);
230
+ const escapedLike = sqlEscape(`%.${candidate}`);
231
+ clauses.push(`host = ${escaped}`);
232
+ clauses.push(`host = ${escapedDot}`);
233
+ clauses.push(`host LIKE ${escapedLike}`);
234
+ }
235
+ }
236
+ return clauses.length ? clauses.join(" OR ") : "1=0";
237
+ }
238
+ function sqlEscape(value) {
239
+ return `'${value.replace(/'/g, "''")}'`;
240
+ }
241
+ async function getRawCookiesFromFirefoxDb(dbPath, whereClause) {
242
+ try {
243
+ const db = new Database(dbPath, { readonly: true });
244
+ try {
245
+ const sql = `
246
+ SELECT
247
+ name,
248
+ value,
249
+ host,
250
+ path,
251
+ expiry,
252
+ isSecure,
253
+ isHttpOnly,
254
+ sameSite,
255
+ originAttributes,
256
+ isPartitionedAttributeSet
257
+ FROM moz_cookies
258
+ WHERE ${whereClause}
259
+ ORDER BY expiry DESC
260
+ `;
261
+ const stmt = db.prepare(sql);
262
+ const rows = stmt.all();
263
+ return { success: true, rows };
264
+ } catch (error) {
265
+ return { success: false, error: `SQL query failed: ${error.message}` };
266
+ } finally {
267
+ db.close();
268
+ }
269
+ } catch (error) {
270
+ return { success: false, error: `Failed to open database: ${error.message}` };
271
+ }
272
+ }
273
+ function resolveFirefoxDBPath(profile) {
274
+ profile = profile?.trim();
275
+ if (profile) {
276
+ const stat = statSync(profile, { throwIfNoEntry: false });
277
+ if (stat && stat.isFile()) {
278
+ return profile;
279
+ }
280
+ if (stat && stat.isDirectory()) {
281
+ const cookiePath = path.join(profile, "cookies.sqlite");
282
+ if (existsSync(cookiePath)) {
283
+ return cookiePath;
284
+ }
285
+ }
286
+ }
287
+ const profilesDir = getFirefoxProfilesDir();
288
+ if (!profilesDir || !existsSync(profilesDir)) {
289
+ return null;
290
+ }
291
+ const profileDirs = getFirefoxProfileDirs(profilesDir);
292
+ if (profile) {
293
+ const candidates = findFirefoxProfileDirs(profileDirs, profile);
294
+ for (const candidate of candidates) {
295
+ const cookiePath = path.join(candidate, "cookies.sqlite");
296
+ if (existsSync(cookiePath)) {
297
+ return cookiePath;
298
+ }
299
+ }
300
+ return null;
301
+ }
302
+ const defaultRelease = profileDirs.find((dir) => dir.endsWith(".default-release"));
303
+ if (defaultRelease) {
304
+ const cookiePath = path.join(defaultRelease, "cookies.sqlite");
305
+ if (existsSync(cookiePath)) {
306
+ return cookiePath;
307
+ }
308
+ }
309
+ const defaultProfile = profileDirs.find((dir) => dir.endsWith(".default"));
310
+ if (defaultProfile) {
311
+ const cookiePath = path.join(defaultProfile, "cookies.sqlite");
312
+ if (existsSync(cookiePath)) {
313
+ return cookiePath;
314
+ }
315
+ }
316
+ for (const profileDir of profileDirs) {
317
+ const cookiePath = path.join(profileDir, "cookies.sqlite");
318
+ if (existsSync(cookiePath)) {
319
+ return cookiePath;
320
+ }
321
+ }
322
+ return null;
323
+ }
324
+ function getFirefoxProfilesDir() {
325
+ const homeDir = homedir();
326
+ const platform = process.platform;
327
+ if (platform === "darwin") {
328
+ return path.join(homeDir, "Library", "Application Support", "Firefox", "Profiles");
329
+ } else if (platform === "linux") {
330
+ return path.join(homeDir, ".mozilla", "firefox");
331
+ } else if (platform === "win32") {
332
+ return path.join(
333
+ process.env.APPDATA || path.join(homeDir, "AppData", "Roaming"),
334
+ "Mozilla",
335
+ "Firefox",
336
+ "Profiles"
337
+ );
338
+ }
339
+ return null;
340
+ }
341
+ function getFirefoxProfileDirs(profilesDir) {
342
+ try {
343
+ const entries = readdirSync(profilesDir, { withFileTypes: true });
344
+ return entries.filter((entry) => entry.isDirectory()).map((entry) => path.join(profilesDir, entry.name));
345
+ } catch {
346
+ return [];
347
+ }
348
+ }
349
+ function findFirefoxProfileDirs(profileDirs, profileName) {
350
+ const lowerProfile = profileName.toLowerCase();
351
+ const matchDirs = profileDirs.filter((dir) => {
352
+ const dirName = path.basename(dir).toLowerCase();
353
+ return dirName === lowerProfile;
354
+ });
355
+ if (matchDirs.length > 0) {
356
+ return matchDirs;
357
+ }
358
+ return [];
359
+ }
360
+ function readJsonLz4File(filePath) {
361
+ const buffer = readFileSync(filePath);
362
+ const magic = buffer.subarray(0, 8).toString("ascii");
363
+ if (magic !== "mozLz40\0") {
364
+ throw new Error(`Invalid jsonlz4 magic header: ${magic}`);
365
+ }
366
+ const decompressedSize = buffer.readUInt32LE(8);
367
+ const compressed = buffer.subarray(12);
368
+ const outputBuffer = Buffer.alloc(decompressedSize);
369
+ lz4.decodeBlock(compressed, outputBuffer);
370
+ const jsonStr = outputBuffer.toString("utf8");
371
+ return JSON.parse(jsonStr);
372
+ }
373
+ function parseSessionCookies(sessionCookies, hosts, cookieNames, cookieFilePath) {
374
+ const cookies = [];
375
+ for (const sc of sessionCookies) {
376
+ const name = sc.name || "";
377
+ if (cookieNames && !cookieNames.has(name)) {
378
+ continue;
379
+ }
380
+ const hostString = sc.host || "";
381
+ if (!hostString) {
382
+ continue;
383
+ }
384
+ const host = hostString.startsWith(".") ? hostString.substring(1) : hostString;
385
+ const domainLower = host.toLowerCase();
386
+ if (!hosts.some((h) => {
387
+ const hostLower = h.toLowerCase();
388
+ return hostLower === domainLower || hostLower.endsWith(`.${domainLower}`);
389
+ })) {
390
+ continue;
391
+ }
392
+ const cookie = {
393
+ name,
394
+ value: sc.value || "",
395
+ domain: host,
396
+ path: sc.path || "/",
397
+ expires: void 0,
398
+ // Session cookies have no expiry
399
+ secure: sc.secure || false,
400
+ httpOnly: sc.httpOnly || false,
401
+ source: {
402
+ browser: "firefox",
403
+ cookieFilePath
404
+ }
405
+ };
406
+ cookies.push(cookie);
407
+ }
408
+ return cookies;
409
+ }
410
+ function resolveFirefoxProfileDir(profile) {
411
+ profile = profile?.trim();
412
+ if (profile) {
413
+ const stat = statSync(profile, { throwIfNoEntry: false });
414
+ if (stat && stat.isDirectory()) {
415
+ return profile;
416
+ }
417
+ if (stat && stat.isFile()) {
418
+ return path.dirname(profile);
419
+ }
420
+ }
421
+ const profilesDir = getFirefoxProfilesDir();
422
+ if (!profilesDir || !existsSync(profilesDir)) {
423
+ return null;
424
+ }
425
+ const profileDirs = getFirefoxProfileDirs(profilesDir);
426
+ if (profile) {
427
+ const candidates = findFirefoxProfileDirs(profileDirs, profile);
428
+ if (candidates.length > 0) {
429
+ return candidates[0];
430
+ }
431
+ return null;
432
+ }
433
+ const defaultRelease = profileDirs.find((dir) => dir.endsWith(".default-release"));
434
+ if (defaultRelease) {
435
+ return defaultRelease;
436
+ }
437
+ const defaultProfile = profileDirs.find((dir) => dir.endsWith(".default"));
438
+ if (defaultProfile) {
439
+ return defaultProfile;
440
+ }
441
+ return profileDirs.length > 0 ? profileDirs[0] : null;
442
+ }
443
+
444
+ export {
445
+ getCookiesFromFirefoxSqlite
446
+ };
447
+ //# sourceMappingURL=chunk-YD3PNZMV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/browsers/firefoxCookie.ts"],"sourcesContent":["import { homedir, tmpdir } from 'os';\nimport {\n copyFileSync,\n mkdtempSync,\n rmSync,\n existsSync,\n readdirSync,\n readFileSync,\n statSync,\n Dirent,\n} from 'fs';\nimport path from 'path';\nimport Database from 'better-sqlite3';\nimport lz4 from 'lz4';\nimport {\n GetCookiesOptions,\n GetCookiesResult,\n Cookie,\n SameSiteValue,\n GetCookiesFromFileOptions,\n} from '../types';\nimport { normalizeExpiration } from '../common';\n\ntype FirefoxCookieRow = {\n name?: unknown;\n value?: unknown;\n host?: unknown;\n path?: unknown;\n expiry?: unknown;\n isSecure?: unknown;\n isHttpOnly?: unknown;\n sameSite?: unknown;\n originAttributes?: unknown;\n isPartitionedAttributeSet?: unknown;\n};\n\n/**\n * Get cookies from Firefox (both persistent cookies from SQLite and session cookies from sessionstore)\n * @param options - Options for getting cookies\n * @param origins - List of origins to filter cookies by\n * @param cookieNames - Set of cookie names to filter (null for all)\n * @returns Promise resolving to cookies and warnings\n */\nexport async function getCookiesFromFirefoxSqlite(\n options: GetCookiesOptions,\n origins: string[],\n cookieNames: Set<string> | null\n): Promise<GetCookiesResult> {\n const warnings: string[] = [];\n const allCookies: Cookie[] = [];\n\n // Parse hosts from origins, catch invalid URLs\n let hosts: string[];\n try {\n hosts = origins.map((origin) => new URL(origin).hostname);\n } catch (error) {\n warnings.push(`Invalid URL: ${(error as Error).message}`);\n return { cookies: [], warnings };\n }\n\n // 1. Get persistent cookies from cookies.sqlite\n const sqlDBPath = resolveFirefoxDBPath(options.profile);\n if (sqlDBPath) {\n const fileOptions: GetCookiesFromFileOptions = {\n cookieFilePath: sqlDBPath,\n profile: options.profile,\n includeExpired: options.includeExpired,\n includePartitioned: options.includePartitioned,\n };\n\n const { cookies: persistentCookies, warnings: dbWarnings } =\n await getCookiesFromFirefoxSqliteDB(fileOptions, origins, cookieNames);\n allCookies.push(...persistentCookies);\n warnings.push(...dbWarnings);\n } else {\n warnings.push('Could not resolve Firefox cookie database path.');\n }\n\n // 2. Get session cookies from sessionstore (recovery.jsonlz4)\n const profileDir = resolveFirefoxProfileDir(options.profile);\n if (profileDir) {\n const sessionStorePath = path.join(profileDir, 'sessionstore-backups', 'recovery.jsonlz4');\n if (existsSync(sessionStorePath)) {\n try {\n const sessionData = readJsonLz4File(sessionStorePath);\n if (sessionData.cookies && Array.isArray(sessionData.cookies)) {\n const sessionCookies = parseSessionCookies(\n sessionData.cookies,\n hosts,\n cookieNames,\n sessionStorePath\n );\n // Avoid duplicates: only add session cookies that don't exist in persistent cookies\n const existingKeys = new Set(allCookies.map((c) => `${c.name}@${c.domain}`));\n for (const sc of sessionCookies) {\n const key = `${sc.name}@${sc.domain}`;\n if (!existingKeys.has(key)) {\n allCookies.push(sc);\n }\n }\n }\n } catch (error) {\n warnings.push(`Failed to parse sessionstore: ${(error as Error).message}`);\n }\n }\n }\n\n if (allCookies.length === 0 && warnings.length === 0) {\n warnings.push('No cookies found.');\n }\n\n return { cookies: allCookies, warnings };\n}\n\n/**\n * Get cookies from a Firefox SQLite database file\n */\nasync function getCookiesFromFirefoxSqliteDB(\n options: GetCookiesFromFileOptions,\n origins: string[],\n cookieNames: Set<string> | null\n): Promise<GetCookiesResult> {\n const warnings: string[] = [];\n\n // Create a temporary copy of the database to avoid lock issues\n const tmpdirPath = mkdtempSync(path.join(tmpdir(), 'sqlite-cookie-firefox-db-'));\n const tempDbPath = path.join(tmpdirPath, 'cookies.sqlite');\n try {\n copyFileSync(options.cookieFilePath, tempDbPath);\n } catch (error) {\n rmSync(tmpdirPath, { recursive: true, force: true });\n warnings.push(`Failed to copy cookie database: ${(error as Error).message}`);\n return { cookies: [], warnings };\n }\n\n try {\n const hosts = origins.map((origin) => new URL(origin).hostname);\n const whereClause = buildHostWhereClause(hosts);\n const rowsResult = await getRawCookiesFromFirefoxDb(tempDbPath, whereClause);\n\n if (!rowsResult.success) {\n rmSync(tmpdirPath, { recursive: true, force: true });\n warnings.push(rowsResult.error);\n return { cookies: [], warnings };\n }\n\n const cookies = parseFirefoxCookieRows(rowsResult.rows, options, hosts, cookieNames, warnings);\n\n rmSync(tmpdirPath, { recursive: true, force: true });\n return { cookies, warnings };\n } catch (error) {\n rmSync(tmpdirPath, { recursive: true, force: true });\n warnings.push(`Failed to get cookies: ${(error as Error).message}`);\n return { cookies: [], warnings };\n }\n}\n\n/**\n * Parse raw Firefox cookie rows into Cookie objects\n */\nfunction parseFirefoxCookieRows(\n rows: FirefoxCookieRow[],\n options: GetCookiesFromFileOptions,\n hosts: string[],\n cookieNames: Set<string> | null,\n warnings: string[] = []\n): Cookie[] {\n const cookies: Cookie[] = [];\n\n for (const row of rows) {\n const name = typeof row.name === 'string' ? row.name : '';\n if (cookieNames && !cookieNames.has(name)) {\n continue;\n }\n\n const hostString = typeof row.host === 'string' ? row.host : '';\n if (!hostString) {\n continue;\n }\n\n // Firefox uses host without leading dot for exact match, with leading dot for subdomain match\n const host = hostString.startsWith('.') ? hostString.substring(1) : hostString;\n const domainLower = host.toLowerCase();\n\n // Check if this cookie matches any of the requested hosts\n if (\n !hosts.some((h) => {\n const hostLower = h.toLowerCase();\n return hostLower === domainLower || hostLower.endsWith(`.${domainLower}`);\n })\n ) {\n continue;\n }\n\n // Parse partition key from originAttributes\n // Firefox stores partition info in originAttributes like \"^partitionKey=(https,example.com)\"\n const partitionKey = parseFirefoxPartitionKey(row.originAttributes);\n\n // Filter out partitioned cookies by default\n if (!options.includePartitioned && partitionKey) {\n continue;\n }\n\n // Firefox stores value as plain text (no encryption)\n const value = typeof row.value === 'string' ? row.value : null;\n if (value === null) {\n warnings.push(`Invalid cookie value for cookie \"${name}\" at host \"${host}\"`);\n continue;\n }\n\n const expiry =\n typeof row.expiry === 'number' || typeof row.expiry === 'bigint'\n ? row.expiry\n : tryParseInt(row.expiry);\n\n // Convert Firefox timestamp to JavaScript timestamp (milliseconds)\n // Firefox uses seconds since 1970-01-01\n const expires = normalizeExpiration(expiry, 'firefox');\n\n // Check if cookie is expired (if not including expired cookies)\n if (!options.includeExpired && expires && expires < Date.now()) {\n continue;\n }\n\n const secure =\n row.isSecure === 1 || row.isSecure === true || row.isSecure === 1n || row.isSecure === '1';\n const httpOnly =\n row.isHttpOnly === 1 ||\n row.isHttpOnly === true ||\n row.isHttpOnly === 1n ||\n row.isHttpOnly === '1';\n\n const sameSite = normalizeSameSite(row.sameSite);\n const rowPath = typeof row.path === 'string' ? row.path : '';\n\n const cookie: Cookie = {\n name,\n value,\n domain: host,\n path: rowPath || '/',\n expires,\n secure,\n httpOnly,\n sameSite,\n partitionKey,\n source: {\n browser: 'firefox',\n cookieFilePath: options.cookieFilePath,\n },\n };\n\n cookies.push(cookie);\n }\n\n return cookies;\n}\n\nfunction normalizeSameSite(value: unknown): SameSiteValue | undefined {\n if (typeof value === 'bigint') {\n const intValue = Number(value);\n return Number.isFinite(intValue) ? normalizeSameSite(intValue) : undefined;\n } else if (typeof value === 'number') {\n // Firefox sameSite values: 0=none, 1=lax, 2=strict\n switch (value) {\n case 0:\n return 'none';\n case 1:\n return 'lax';\n case 2:\n return 'strict';\n default:\n return undefined;\n }\n } else if (typeof value === 'string') {\n const parsed = Number.parseInt(value, 10);\n if (!Number.isNaN(parsed)) {\n return normalizeSameSite(parsed);\n }\n const lower = value.toLowerCase();\n switch (lower) {\n case 'none':\n return 'none';\n case 'lax':\n return 'lax';\n case 'strict':\n return 'strict';\n default:\n return undefined;\n }\n }\n return undefined;\n}\n\nfunction tryParseInt(value: unknown): number | null {\n if (typeof value === 'string') {\n const parsed = parseInt(value, 10);\n return isNaN(parsed) ? null : parsed;\n }\n return null;\n}\n\n/**\n * Parse partition key from Firefox originAttributes\n * Firefox stores partition info in originAttributes like \"^partitionKey=(https,example.com)\"\n * @param originAttributes - The originAttributes string from Firefox cookie\n * @returns The partition key URL or undefined if not partitioned\n */\nfunction parseFirefoxPartitionKey(originAttributes: unknown): string | undefined {\n if (typeof originAttributes !== 'string' || !originAttributes) {\n return undefined;\n }\n\n // Firefox originAttributes format: ^partitionKey=(scheme,domain)\n // Example: ^partitionKey=(https,example.com)\n const partitionMatch = originAttributes.match(/\\^partitionKey=\\(([^,]+),([^)]+)\\)/);\n if (partitionMatch) {\n const [, scheme, domain] = partitionMatch;\n return `${scheme}://${domain}`;\n }\n\n return undefined;\n}\n\nfunction expandHostCandidates(hostname: string): string[] {\n const parts = hostname.split('.');\n if (parts.length <= 1) {\n return [hostname];\n }\n const candidates: Set<string> = new Set();\n for (let i = 0; i <= parts.length - 2; i++) {\n const candidate = parts.slice(i).join('.');\n candidates.add(candidate);\n }\n return Array.from(candidates);\n}\n\nfunction buildHostWhereClause(hosts: string[]): string {\n const clauses: string[] = [];\n for (const host of hosts) {\n const candidates = expandHostCandidates(host);\n for (const candidate of candidates) {\n const escaped = sqlEscape(candidate);\n const escapedDot = sqlEscape(`.${candidate}`);\n const escapedLike = sqlEscape(`%.${candidate}`);\n clauses.push(`host = ${escaped}`);\n clauses.push(`host = ${escapedDot}`);\n clauses.push(`host LIKE ${escapedLike}`);\n }\n }\n return clauses.length ? clauses.join(' OR ') : '1=0';\n}\n\nfunction sqlEscape(value: string): string {\n return `'${value.replace(/'/g, \"''\")}'`;\n}\n\nasync function getRawCookiesFromFirefoxDb(\n dbPath: string,\n whereClause: string\n): Promise<{ success: true; rows: FirefoxCookieRow[] } | { success: false; error: string }> {\n try {\n const db = new Database(dbPath, { readonly: true });\n\n try {\n const sql = `\n SELECT\n name,\n value,\n host,\n path,\n expiry,\n isSecure,\n isHttpOnly,\n sameSite,\n originAttributes,\n isPartitionedAttributeSet\n FROM moz_cookies\n WHERE ${whereClause}\n ORDER BY expiry DESC\n `;\n\n const stmt = db.prepare(sql);\n const rows = stmt.all() as FirefoxCookieRow[];\n return { success: true, rows };\n } catch (error) {\n return { success: false, error: `SQL query failed: ${(error as Error).message}` };\n } finally {\n db.close();\n }\n } catch (error) {\n return { success: false, error: `Failed to open database: ${(error as Error).message}` };\n }\n}\n\n/**\n * Resolve Firefox cookie database path\n * Firefox profile structure:\n * - macOS: ~/Library/Application Support/Firefox/Profiles/<profile>/cookies.sqlite\n * - Linux: ~/.mozilla/firefox/<profile>/cookies.sqlite\n * - Windows: %APPDATA%\\Mozilla\\Firefox\\Profiles\\<profile>\\cookies.sqlite\n */\nfunction resolveFirefoxDBPath(profile?: string): string | null {\n profile = profile?.trim();\n // If profile is a direct file path\n if (profile) {\n const stat = statSync(profile, { throwIfNoEntry: false });\n if (stat && stat.isFile()) {\n return profile;\n }\n // Could be path to profile directory\n if (stat && stat.isDirectory()) {\n const cookiePath = path.join(profile, 'cookies.sqlite');\n if (existsSync(cookiePath)) {\n return cookiePath;\n }\n }\n }\n\n const profilesDir = getFirefoxProfilesDir();\n if (!profilesDir || !existsSync(profilesDir)) {\n return null;\n }\n\n const profileDirs = getFirefoxProfileDirs(profilesDir);\n\n // If profile name is specified, look for matching profile directory\n if (profile) {\n const candidates = findFirefoxProfileDirs(profileDirs, profile);\n for (const candidate of candidates) {\n const cookiePath = path.join(candidate, 'cookies.sqlite');\n if (existsSync(cookiePath)) {\n return cookiePath;\n }\n }\n return null;\n }\n\n // No profile specified, try to find the default profile\n // Prefer default-release profile, then default profile, then any profile\n const defaultRelease = profileDirs.find((dir) => dir.endsWith('.default-release'));\n if (defaultRelease) {\n const cookiePath = path.join(defaultRelease, 'cookies.sqlite');\n if (existsSync(cookiePath)) {\n return cookiePath;\n }\n }\n\n const defaultProfile = profileDirs.find((dir) => dir.endsWith('.default'));\n if (defaultProfile) {\n const cookiePath = path.join(defaultProfile, 'cookies.sqlite');\n if (existsSync(cookiePath)) {\n return cookiePath;\n }\n }\n\n // Try any profile that has cookies.sqlite\n for (const profileDir of profileDirs) {\n const cookiePath = path.join(profileDir, 'cookies.sqlite');\n if (existsSync(cookiePath)) {\n return cookiePath;\n }\n }\n\n return null;\n}\n\nfunction getFirefoxProfilesDir(): string | null {\n const homeDir = homedir();\n const platform = process.platform;\n\n if (platform === 'darwin') {\n return path.join(homeDir, 'Library', 'Application Support', 'Firefox', 'Profiles');\n } else if (platform === 'linux') {\n return path.join(homeDir, '.mozilla', 'firefox');\n } else if (platform === 'win32') {\n return path.join(\n process.env.APPDATA || path.join(homeDir, 'AppData', 'Roaming'),\n 'Mozilla',\n 'Firefox',\n 'Profiles'\n );\n }\n return null;\n}\n\nfunction getFirefoxProfileDirs(profilesDir: string): string[] {\n try {\n const entries = readdirSync(profilesDir, { withFileTypes: true });\n return entries\n .filter((entry: Dirent) => entry.isDirectory())\n .map((entry: Dirent) => path.join(profilesDir, entry.name));\n } catch {\n return [];\n }\n}\n\nfunction findFirefoxProfileDirs(profileDirs: string[], profileName: string): string[] {\n const lowerProfile = profileName.toLowerCase();\n\n const matchDirs = profileDirs.filter((dir) => {\n const dirName = path.basename(dir).toLowerCase();\n return dirName === lowerProfile;\n });\n\n if (matchDirs.length > 0) {\n return matchDirs;\n }\n\n return [];\n}\n\n// ============ Session Cookies from sessionstore ============\n\ninterface FirefoxSessionCookie {\n name?: string;\n value?: string;\n host?: string;\n path?: string;\n secure?: boolean;\n httpOnly?: boolean;\n}\n\ninterface FirefoxSessionData {\n cookies?: FirefoxSessionCookie[];\n}\n\n/**\n * Read and decompress a Firefox jsonlz4 file\n * Format: 8-byte magic header \"mozLz40\\0\" + 4-byte decompressed size (LE) + LZ4 block data\n */\nfunction readJsonLz4File(filePath: string): FirefoxSessionData {\n const buffer = readFileSync(filePath);\n\n // Check magic header\n const magic = buffer.subarray(0, 8).toString('ascii');\n if (magic !== 'mozLz40\\0') {\n throw new Error(`Invalid jsonlz4 magic header: ${magic}`);\n }\n\n // Read decompressed size from bytes 8-11 (little-endian)\n const decompressedSize = buffer.readUInt32LE(8);\n\n // Decompress LZ4 data (skip 8-byte header + 4-byte size = 12 bytes)\n const compressed = buffer.subarray(12);\n const outputBuffer = Buffer.alloc(decompressedSize);\n lz4.decodeBlock(compressed, outputBuffer);\n\n const jsonStr = outputBuffer.toString('utf8');\n return JSON.parse(jsonStr) as FirefoxSessionData;\n}\n\n/**\n * Parse session cookies and filter by hosts and cookie names\n */\nfunction parseSessionCookies(\n sessionCookies: FirefoxSessionCookie[],\n hosts: string[],\n cookieNames: Set<string> | null,\n cookieFilePath: string\n): Cookie[] {\n const cookies: Cookie[] = [];\n\n for (const sc of sessionCookies) {\n const name = sc.name || '';\n if (cookieNames && !cookieNames.has(name)) {\n continue;\n }\n\n const hostString = sc.host || '';\n if (!hostString) {\n continue;\n }\n\n const host = hostString.startsWith('.') ? hostString.substring(1) : hostString;\n const domainLower = host.toLowerCase();\n\n // Check if this cookie matches any of the requested hosts\n if (\n !hosts.some((h) => {\n const hostLower = h.toLowerCase();\n return hostLower === domainLower || hostLower.endsWith(`.${domainLower}`);\n })\n ) {\n continue;\n }\n\n const cookie: Cookie = {\n name,\n value: sc.value || '',\n domain: host,\n path: sc.path || '/',\n expires: undefined, // Session cookies have no expiry\n secure: sc.secure || false,\n httpOnly: sc.httpOnly || false,\n source: {\n browser: 'firefox',\n cookieFilePath,\n },\n };\n\n cookies.push(cookie);\n }\n\n return cookies;\n}\n\n/**\n * Resolve Firefox profile directory path\n */\nfunction resolveFirefoxProfileDir(profile?: string): string | null {\n profile = profile?.trim();\n // If profile is a directory path\n if (profile) {\n const stat = statSync(profile, { throwIfNoEntry: false });\n if (stat && stat.isDirectory()) {\n return profile;\n }\n if (stat && stat.isFile()) {\n return path.dirname(profile);\n }\n }\n\n const profilesDir = getFirefoxProfilesDir();\n if (!profilesDir || !existsSync(profilesDir)) {\n return null;\n }\n\n const profileDirs = getFirefoxProfileDirs(profilesDir);\n\n // If profile name is specified, look for matching profile directory\n if (profile) {\n const candidates = findFirefoxProfileDirs(profileDirs, profile);\n if (candidates.length > 0) {\n return candidates[0];\n }\n return null;\n }\n\n // No profile specified, try to find the default profile\n const defaultRelease = profileDirs.find((dir) => dir.endsWith('.default-release'));\n if (defaultRelease) {\n return defaultRelease;\n }\n\n const defaultProfile = profileDirs.find((dir) => dir.endsWith('.default'));\n if (defaultProfile) {\n return defaultProfile;\n }\n\n // Return first available profile\n return profileDirs.length > 0 ? profileDirs[0] : null;\n}\n"],"mappings":";;;;;AAAA,SAAS,SAAS,cAAc;AAChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,OAAO,UAAU;AACjB,OAAO,cAAc;AACrB,OAAO,SAAS;AA8BhB,eAAsB,4BACpB,SACA,SACA,aAC2B;AAC3B,QAAM,WAAqB,CAAC;AAC5B,QAAM,aAAuB,CAAC;AAG9B,MAAI;AACJ,MAAI;AACF,YAAQ,QAAQ,IAAI,CAAC,WAAW,IAAI,IAAI,MAAM,EAAE,QAAQ;AAAA,EAC1D,SAAS,OAAO;AACd,aAAS,KAAK,gBAAiB,MAAgB,OAAO,EAAE;AACxD,WAAO,EAAE,SAAS,CAAC,GAAG,SAAS;AAAA,EACjC;AAGA,QAAM,YAAY,qBAAqB,QAAQ,OAAO;AACtD,MAAI,WAAW;AACb,UAAM,cAAyC;AAAA,MAC7C,gBAAgB;AAAA,MAChB,SAAS,QAAQ;AAAA,MACjB,gBAAgB,QAAQ;AAAA,MACxB,oBAAoB,QAAQ;AAAA,IAC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AACxD,QAAI,QAAQ,KAAK,YAAY,GAAG;AAC9B,aAAO;AAAA,IACT;AACA,QAAI,QAAQ,KAAK,OAAO,GAAG;AACzB,aAAO,KAAK,QAAQ,OAAO;AAAA,IAC7B;AAAA,EACF;AAEA,QAAM,cAAc,sBAAsB;AAC1C,MAAI,CAAC,eAAe,CAAC,WAAW,WAAW,GAAG;AAC5C,WAAO;AAAA,EACT;AAEA,QAAM,cAAc,sBAAsB,WAAW;AAGrD,MAAI,SAAS;AACX,UAAM,aAAa,uBAAuB,aAAa,OAAO;AAC9D,QAAI,WAAW,SAAS,GAAG;AACzB,aAAO,WAAW,CAAC;AAAA,IACrB;AACA,WAAO;AAAA,EACT;AAGA,QAAM,iBAAiB,YAAY,KAAK,CAAC,QAAQ,IAAI,SAAS,kBAAkB,CAAC;AACjF,MAAI,gBAAgB;AAClB,WAAO;AAAA,EACT;AAEA,QAAM,iBAAiB,YAAY,KAAK,CAAC,QAAQ,IAAI,SAAS,UAAU,CAAC;AACzE,MAAI,gBAAgB;AAClB,WAAO;AAAA,EACT;AAGA,SAAO,YAAY,SAAS,IAAI,YAAY,CAAC,IAAI;AACnD;","names":[]}
@@ -0,0 +1,15 @@
1
+ import { GetCookiesFromFileOptions, BrowserName, GetCookiesResult, BrowserType } from './types.js';
2
+
3
+ declare function getCookiesFromChromiumSqliteDB(options: GetCookiesFromFileOptions, origins: string[], cookieNames: Set<string> | null, browser: BrowserName, decrypytFn: (encryptedValue: Uint8Array) => string | null): Promise<GetCookiesResult>;
4
+ /**
5
+ * Normalize browser-specific timestamp to JavaScript milliseconds (since 1970-01-01 UTC)
6
+ * @param timestamp - The raw timestamp value from the browser database
7
+ * @param browser - The browser type (determines timestamp format)
8
+ * - chrome/edge: microseconds since 1601-01-01
9
+ * - firefox: seconds since 1970-01-01
10
+ * - safari: seconds since 2001-01-01 (CFAbsoluteTime)
11
+ * @returns Milliseconds since epoch (1970-01-01), or undefined if conversion fails
12
+ */
13
+ declare function normalizeExpiration(timestamp: number | bigint | null, browser: BrowserType): number | undefined;
14
+
15
+ export { getCookiesFromChromiumSqliteDB, normalizeExpiration };
package/dist/common.js ADDED
@@ -0,0 +1,9 @@
1
+ import {
2
+ getCookiesFromChromiumSqliteDB,
3
+ normalizeExpiration
4
+ } from "./chunk-JTBFDYPY.js";
5
+ export {
6
+ getCookiesFromChromiumSqliteDB,
7
+ normalizeExpiration
8
+ };
9
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,5 @@
1
+ import { GetCookiesOptions, GetCookiesResult } from './types.js';
2
+
3
+ declare function getCookiesFromEdgeLinuxSqlite(options: GetCookiesOptions, origins: string[], cookieNames: Set<string> | null): Promise<GetCookiesResult>;
4
+
5
+ export { getCookiesFromEdgeLinuxSqlite };
@@ -0,0 +1,12 @@
1
+ import {
2
+ getCookiesFromEdgeLinuxSqlite
3
+ } from "./chunk-QCW7AUP6.js";
4
+ import "./chunk-EPL3V4O3.js";
5
+ import "./chunk-UR6BPQ2T.js";
6
+ import "./chunk-TYLH6G3Z.js";
7
+ import "./chunk-LTLRZZW3.js";
8
+ import "./chunk-JTBFDYPY.js";
9
+ export {
10
+ getCookiesFromEdgeLinuxSqlite
11
+ };
12
+ //# sourceMappingURL=edgeLinuxCookie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,5 @@
1
+ import { GetCookiesOptions, GetCookiesResult } from './types.js';
2
+
3
+ declare function getCookiesFromEdgeSqlite(options: GetCookiesOptions, origins: string[], cookieNames: Set<string> | null): Promise<GetCookiesResult>;
4
+
5
+ export { getCookiesFromEdgeSqlite };
@@ -0,0 +1,12 @@
1
+ import {
2
+ getCookiesFromEdgeSqlite
3
+ } from "./chunk-SRZIPU62.js";
4
+ import "./chunk-Q2LDNBEA.js";
5
+ import "./chunk-UR6BPQ2T.js";
6
+ import "./chunk-TYLH6G3Z.js";
7
+ import "./chunk-LTLRZZW3.js";
8
+ import "./chunk-JTBFDYPY.js";
9
+ export {
10
+ getCookiesFromEdgeSqlite
11
+ };
12
+ //# sourceMappingURL=edgeMacCookie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,5 @@
1
+ import { GetCookiesOptions, GetCookiesResult } from './types.js';
2
+
3
+ declare function getCookiesFromEdgeWindowsSqlite(options: GetCookiesOptions, origins: string[], cookieNames: Set<string> | null): Promise<GetCookiesResult>;
4
+
5
+ export { getCookiesFromEdgeWindowsSqlite };
@@ -0,0 +1,12 @@
1
+ import {
2
+ getCookiesFromEdgeWindowsSqlite
3
+ } from "./chunk-E6CQFEXM.js";
4
+ import "./chunk-AR5Q6KM4.js";
5
+ import "./chunk-UR6BPQ2T.js";
6
+ import "./chunk-TYLH6G3Z.js";
7
+ import "./chunk-LTLRZZW3.js";
8
+ import "./chunk-JTBFDYPY.js";
9
+ export {
10
+ getCookiesFromEdgeWindowsSqlite
11
+ };
12
+ //# sourceMappingURL=edgeWindowsCookie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,2 @@
1
+ export { getCookiesFromBrowser, toCookieHeader } from './publicApi.js';
2
+ export { BrowserName, Cookie, CookieHeaderOption, GetCookiesFromBrowserParams, GetCookiesResult, SameSiteValue } from './types.js';
package/dist/index.js ADDED
@@ -0,0 +1,38 @@
1
+ import {
2
+ getCookiesFromBrowser,
3
+ toCookieHeader
4
+ } from "./chunk-5AEUDMIX.js";
5
+ import "./chunk-A3YGBITD.js";
6
+ import "./chunk-IXZPT56H.js";
7
+ import "./chunk-GRIZYEBN.js";
8
+ import "./chunk-J2UYSXFG.js";
9
+ import "./chunk-4G6NLIPV.js";
10
+ import "./chunk-XDL34EPI.js";
11
+ import "./chunk-NGBAATI3.js";
12
+ import "./chunk-D23AYBOE.js";
13
+ import "./chunk-YD3PNZMV.js";
14
+ import "./chunk-HOGGS6QP.js";
15
+ import "./chunk-SRZIPU62.js";
16
+ import "./chunk-E6CQFEXM.js";
17
+ import "./chunk-TWA6YYS5.js";
18
+ import "./chunk-2ILP4UJD.js";
19
+ import "./chunk-5AJFPLWB.js";
20
+ import "./chunk-EZBYP7NP.js";
21
+ import "./chunk-SSXWHBKV.js";
22
+ import "./chunk-PT5JK5UI.js";
23
+ import "./chunk-6OYYWSIJ.js";
24
+ import "./chunk-U4G74MHA.js";
25
+ import "./chunk-Q2LDNBEA.js";
26
+ import "./chunk-MLKERL3L.js";
27
+ import "./chunk-AR5Q6KM4.js";
28
+ import "./chunk-QCW7AUP6.js";
29
+ import "./chunk-EPL3V4O3.js";
30
+ import "./chunk-UR6BPQ2T.js";
31
+ import "./chunk-TYLH6G3Z.js";
32
+ import "./chunk-LTLRZZW3.js";
33
+ import "./chunk-JTBFDYPY.js";
34
+ export {
35
+ getCookiesFromBrowser,
36
+ toCookieHeader
37
+ };
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,5 @@
1
+ import { GetCookiesOptions, GetCookiesResult } from './types.js';
2
+
3
+ declare function getCookiesFromOperaLinuxSqlite(options: GetCookiesOptions, origins: string[], cookieNames: Set<string> | null): Promise<GetCookiesResult>;
4
+
5
+ export { getCookiesFromOperaLinuxSqlite };