rechrome 1.37.0 → 1.37.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.
- package/package.json +1 -1
- package/rechrome.js +10 -7
- package/rechrome.ts +10 -7
package/package.json
CHANGED
package/rechrome.js
CHANGED
|
@@ -1073,13 +1073,16 @@ async function findInstalledExtension(
|
|
|
1073
1073
|
// Read each profile's settings once so we can prioritize stable-ID matches over path fallbacks.
|
|
1074
1074
|
const perProfile: Array<{ prof: string; settings: Record<string, any> }> = [];
|
|
1075
1075
|
for (const prof of profiles) {
|
|
1076
|
-
const
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1076
|
+
const settings: Record<string, any> = {};
|
|
1077
|
+
// Chrome may store unpacked extensions in either preferences file.
|
|
1078
|
+
// Secure Preferences wins when both contain the same extension.
|
|
1079
|
+
for (const name of ["Preferences", "Secure Preferences"]) {
|
|
1080
|
+
try {
|
|
1081
|
+
const data = await file(join(userDataDir, prof, name)).json();
|
|
1082
|
+
Object.assign(settings, data?.extensions?.settings ?? {});
|
|
1083
|
+
} catch {}
|
|
1084
|
+
}
|
|
1085
|
+
perProfile.push({ prof, settings });
|
|
1083
1086
|
}
|
|
1084
1087
|
// Pass 1: stable ID match (manifest `key` set, path-independent). This must win over any path
|
|
1085
1088
|
// fallback so a stale legacy install sitting on a known path can't shadow the current extension.
|
package/rechrome.ts
CHANGED
|
@@ -1073,13 +1073,16 @@ async function findInstalledExtension(
|
|
|
1073
1073
|
// Read each profile's settings once so we can prioritize stable-ID matches over path fallbacks.
|
|
1074
1074
|
const perProfile: Array<{ prof: string; settings: Record<string, any> }> = [];
|
|
1075
1075
|
for (const prof of profiles) {
|
|
1076
|
-
const
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1076
|
+
const settings: Record<string, any> = {};
|
|
1077
|
+
// Chrome may store unpacked extensions in either preferences file.
|
|
1078
|
+
// Secure Preferences wins when both contain the same extension.
|
|
1079
|
+
for (const name of ["Preferences", "Secure Preferences"]) {
|
|
1080
|
+
try {
|
|
1081
|
+
const data = await file(join(userDataDir, prof, name)).json();
|
|
1082
|
+
Object.assign(settings, data?.extensions?.settings ?? {});
|
|
1083
|
+
} catch {}
|
|
1084
|
+
}
|
|
1085
|
+
perProfile.push({ prof, settings });
|
|
1083
1086
|
}
|
|
1084
1087
|
// Pass 1: stable ID match (manifest `key` set, path-independent). This must win over any path
|
|
1085
1088
|
// fallback so a stale legacy install sitting on a known path can't shadow the current extension.
|