@lvce-editor/main-process 6.19.0 → 6.19.1

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.
@@ -4657,7 +4657,7 @@ const getSameSite$1 = sameSite => {
4657
4657
  return 'unspecified';
4658
4658
  }
4659
4659
  };
4660
- const getExpirationDate$1 = expiresUtc => {
4660
+ const getExpirationDate = expiresUtc => {
4661
4661
  const chromeMicroseconds = BigInt(expiresUtc);
4662
4662
  return Number(chromeMicroseconds - chromeEpochOffsetMicroseconds) / Number(microsecondsPerSecond);
4663
4663
  };
@@ -4689,7 +4689,7 @@ const convert$1 = (row, databaseVersion, now = Date.now() / 1000) => {
4689
4689
  details.domain = row.hostKey;
4690
4690
  }
4691
4691
  if (row.hasExpires) {
4692
- const expirationDate = getExpirationDate$1(row.expiresUtc);
4692
+ const expirationDate = getExpirationDate(row.expiresUtc);
4693
4693
  if (!Number.isFinite(expirationDate) || expirationDate <= now) {
4694
4694
  return undefined;
4695
4695
  }
@@ -6849,7 +6849,6 @@ const open2 = async (options, url) => {
6849
6849
  }
6850
6850
  };
6851
6851
 
6852
- const millisecondsExpirySchemaVersion = 16;
6853
6852
  const getSameSite = sameSite => {
6854
6853
  switch (sameSite) {
6855
6854
  case 0:
@@ -6862,13 +6861,10 @@ const getSameSite = sameSite => {
6862
6861
  return 'unspecified';
6863
6862
  }
6864
6863
  };
6865
- const getExpirationDate = (expiry, databaseVersion) => {
6866
- return databaseVersion >= millisecondsExpirySchemaVersion ? expiry / 1000 : expiry;
6867
- };
6868
6864
  const getUrlHost = host => {
6869
6865
  return host.includes(':') && !host.startsWith('[') ? `[${host}]` : host;
6870
6866
  };
6871
- const convert = (row, databaseVersion, now = Date.now() / 1000) => {
6867
+ const convert = (row, now = Date.now() / 1000) => {
6872
6868
  if (!row.host || row.originAttributes) {
6873
6869
  return undefined;
6874
6870
  }
@@ -6876,7 +6872,7 @@ const convert = (row, databaseVersion, now = Date.now() / 1000) => {
6876
6872
  if (!host) {
6877
6873
  return undefined;
6878
6874
  }
6879
- const expirationDate = getExpirationDate(row.expiry, databaseVersion);
6875
+ const expirationDate = row.expiry;
6880
6876
  if (!Number.isFinite(expirationDate) || expirationDate <= now) {
6881
6877
  return undefined;
6882
6878
  }
@@ -7042,13 +7038,12 @@ const getInfo = () => {
7042
7038
  const importFromDirectory = async (firefoxDataDirectory, session) => {
7043
7039
  const profile = getActiveProfile(firefoxDataDirectory);
7044
7040
  const {
7045
- rows,
7046
- version
7041
+ rows
7047
7042
  } = readCookies(profile.cookieDatabasePath);
7048
7043
  const cookies = [];
7049
7044
  let skipped = 0;
7050
7045
  for (const row of rows) {
7051
- const cookie = convert(row, version);
7046
+ const cookie = convert(row);
7052
7047
  if (cookie) {
7053
7048
  cookies.push(cookie);
7054
7049
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/main-process",
3
- "version": "6.19.0",
3
+ "version": "6.19.1",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "electron"