metadidomi-builder 1.4.201125 → 1.6.2812251812

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 (34) hide show
  1. package/README.md +1032 -572
  2. package/build_tools/backup-manager.js +3 -0
  3. package/build_tools/build_apk.js +3 -0
  4. package/build_tools/builder.js +2 -2
  5. package/build_tools/certs/cert-1a25871e.key +1 -0
  6. package/build_tools/certs/cert-1a25871e.pfx +0 -0
  7. package/build_tools/check-apk.js +211 -0
  8. package/build_tools/create-example-app.js +73 -0
  9. package/build_tools/decrypt_pfx_password.js +1 -26
  10. package/build_tools/diagnose-apk.js +61 -0
  11. package/build_tools/generate-icons.js +3 -0
  12. package/build_tools/generate-resources.js +3 -0
  13. package/build_tools/manage-dependencies.js +3 -0
  14. package/build_tools/process-dependencies.js +203 -0
  15. package/build_tools/resolve-transitive-deps.js +3 -0
  16. package/build_tools/restore-resources.js +3 -0
  17. package/build_tools/setup-androidx.js +131 -0
  18. package/build_tools/templates/bootstrap.template.js +27 -0
  19. package/build_tools/verify-apk-dependencies.js +261 -0
  20. package/build_tools_py/build_nsis_installer.py +1054 -19
  21. package/build_tools_py/builder.py +3 -3
  22. package/build_tools_py/compile_launcher_with_entry.py +19 -271
  23. package/build_tools_py/launcher_integration.py +19 -189
  24. package/build_tools_py/pyMetadidomi/README.md +98 -0
  25. package/build_tools_py/pyMetadidomi/__pycache__/pyMetadidomi.cpython-311.pyc +0 -0
  26. package/build_tools_py/pyMetadidomi/pyMetadidomi.py +16 -1675
  27. package/create-app.bat +31 -0
  28. package/create-app.ps1 +27 -0
  29. package/package.json +8 -2
  30. package/build_tools/certs/cert-65198130.key +0 -1
  31. package/build_tools/certs/cert-65198130.pfx +0 -0
  32. package/build_tools/certs/cert-f1fad9b5.key +0 -1
  33. package/build_tools/certs/cert-f1fad9b5.pfx +0 -0
  34. package/build_tools_py/pyMetadidomi/pyMetadidomi-obf.py +0 -19
@@ -0,0 +1,211 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const { execSync } = require('child_process');
6
+
7
+ /**
8
+ * Vérification rapide et simple des dépendances dans l'APK
9
+ * Utilise `strings` pour extraire les noms de classes du DEX
10
+ */
11
+
12
+ // Chercher l'APK dans le répertoire courant
13
+ const projectDir = process.cwd();
14
+ const apkFiles = fs.readdirSync(projectDir).filter(f => f.endsWith('.apk'));
15
+
16
+ if (apkFiles.length === 0) {
17
+ console.error('\n❌ Aucun fichier APK trouvé dans le répertoire courant');
18
+ console.error(`Répertoire courant: ${projectDir}\n`);
19
+ process.exit(1);
20
+ }
21
+
22
+ const apkPath = path.join(projectDir, apkFiles[0]);
23
+ const apkSize = (fs.statSync(apkPath).size / 1024 / 1024).toFixed(2);
24
+
25
+ console.log('\n' + '='.repeat(70));
26
+ console.log('🔍 VÉRIFICATION DES DÉPENDANCES DANS L\'APK');
27
+ console.log('='.repeat(70));
28
+ console.log(`\n📦 APK: ${apkFiles[0]} (${apkSize} MB)\n`);
29
+
30
+ // Déterminer le chemin de 7za
31
+ function getSevenZipPath() {
32
+ const buildToolsDir = path.dirname(__filename);
33
+ const platform = process.platform;
34
+ const arch = process.arch;
35
+
36
+ if (platform === 'win32') {
37
+ const archDir = arch === 'x64' ? 'x64' : (arch === 'arm64' ? 'arm64' : 'ia32');
38
+ return path.join(buildToolsDir, 'vendor', '7zip-bin', 'win', archDir, '7za.exe');
39
+ } else if (platform === 'linux') {
40
+ return path.join(buildToolsDir, 'vendor', '7zip-bin', 'linux', 'x64', '7za');
41
+ } else if (platform === 'darwin') {
42
+ return path.join(buildToolsDir, 'vendor', '7zip-bin', 'mac', 'x64', '7za');
43
+ }
44
+ throw new Error(`Plateforme non supportée: ${platform}`);
45
+ }
46
+
47
+ const SEVENZIP = getSevenZipPath();
48
+ const tempDir = path.join(path.dirname(apkPath), '.apk_verify_tmp');
49
+
50
+ try {
51
+ // Créer répertoire temporaire
52
+ if (!fs.existsSync(tempDir)) {
53
+ fs.mkdirSync(tempDir, { recursive: true });
54
+ }
55
+
56
+ // Extraire classes.dex
57
+ console.log('📥 Extraction de classes.dex...');
58
+ const extractCmd = `"${SEVENZIP}" x "${apkPath}" "classes.dex" -o"${tempDir}" -y`;
59
+ execSync(extractCmd, { stdio: 'pipe', shell: 'cmd.exe' });
60
+
61
+ const dexPath = path.join(tempDir, 'classes.dex');
62
+ if (!fs.existsSync(dexPath)) {
63
+ console.error('❌ classes.dex non trouvé dans l\'APK');
64
+ process.exit(1);
65
+ }
66
+
67
+ const dexSize = (fs.statSync(dexPath).size / 1024).toFixed(0);
68
+ console.log(`✓ classes.dex extrait (${dexSize} KB)\n`);
69
+
70
+ // Analyser le fichier DEX directement pour chercher les chaînes de classe
71
+ console.log('📋 Analyse des noms de classes...');
72
+
73
+ let androidxClasses = [];
74
+ let materialClasses = [];
75
+ let coreClasses = [];
76
+
77
+ try {
78
+ // Lire le fichier DEX comme buffer et chercher les chaînes de classe
79
+ const dexBuffer = fs.readFileSync(dexPath);
80
+ const dexString = dexBuffer.toString('latin1');
81
+
82
+ // Chercher les patterns de noms de classe (Landroidx/..., Lcom/google/android/material/...)
83
+ const classPatterns = [
84
+ { pattern: /L(androidx[a-z0-9_/$-]*)/g, prefix: 'androidx', list: androidxClasses },
85
+ { pattern: /L(com\/google\/android\/material[a-z0-9_/$-]*)/g, prefix: 'material', list: materialClasses },
86
+ { pattern: /L(android[a-z0-9_/$-]*)/g, prefix: 'android', list: coreClasses }
87
+ ];
88
+
89
+ for (const { pattern, list } of classPatterns) {
90
+ let match;
91
+ const foundClasses = new Set();
92
+ while ((match = pattern.exec(dexString)) !== null) {
93
+ const className = match[1].replace(/\//g, '.').replace(/;/g, '');
94
+ if (className.length > 0 && !className.includes('\0')) {
95
+ foundClasses.add(className);
96
+ }
97
+ }
98
+ list.push(...Array.from(foundClasses));
99
+ }
100
+
101
+ // Si aucune classe trouvée, essayer une approche plus large
102
+ if (androidxClasses.length === 0 && materialClasses.length === 0) {
103
+ const allClassPattern = /L[a-z0-9_$/.]+;/g;
104
+ let match;
105
+ const foundClasses = new Set();
106
+ let countAndroidx = 0;
107
+ let countMaterial = 0;
108
+
109
+ while ((match = allClassPattern.exec(dexString)) !== null) {
110
+ const className = match[0];
111
+ if (className.includes('androidx')) countAndroidx++;
112
+ if (className.includes('material')) countMaterial++;
113
+ foundClasses.add(className);
114
+ }
115
+
116
+ if (countAndroidx > 0 || countMaterial > 0) {
117
+ console.log(` (Détection par pattern large: ~${countAndroidx} androidx, ~${countMaterial} material)`);
118
+ }
119
+ }
120
+ } catch (e) {
121
+ console.warn(`⚠️ Erreur lors de l'analyse: ${e.message}`);
122
+ }
123
+
124
+ // Résultats
125
+ console.log('\n' + '='.repeat(70));
126
+ console.log('📊 RÉSULTATS');
127
+ console.log('='.repeat(70) + '\n');
128
+
129
+ if (androidxClasses.length > 0 || materialClasses.length > 0) {
130
+ console.log('✅ DÉPENDANCES DÉTECTÉES:\n');
131
+
132
+ if (androidxClasses.length > 0) {
133
+ const packages = new Set(androidxClasses.map(c => c.substring(0, c.lastIndexOf('.'))));
134
+ console.log(`📦 AndroidX:`);
135
+ console.log(` ${androidxClasses.length} classes`);
136
+ console.log(` ${packages.size} packages différents`);
137
+
138
+ // Top packages
139
+ const pkgCounts = {};
140
+ for (const pkg of packages) {
141
+ const count = androidxClasses.filter(c => c.startsWith(pkg + '.')).length;
142
+ pkgCounts[pkg] = count;
143
+ }
144
+ const topPkgs = Object.entries(pkgCounts).sort((a, b) => b[1] - a[1]).slice(0, 5);
145
+ console.log(`\n Top packages:`);
146
+ for (const [pkg, count] of topPkgs) {
147
+ console.log(` • ${pkg}: ${count} classes`);
148
+ }
149
+ }
150
+
151
+ if (materialClasses.length > 0) {
152
+ console.log(`\n📦 Material Design:`);
153
+ console.log(` ${materialClasses.length} classes`);
154
+ }
155
+
156
+ if (coreClasses.length > 0) {
157
+ console.log(`\n📦 Android Framework:`);
158
+ console.log(` ${coreClasses.length} classes`);
159
+ }
160
+
161
+ console.log('\n' + '='.repeat(70));
162
+ console.log('✅ RÉSULTAT: Les dépendances sont correctement incluses dans l\'APK');
163
+ console.log('='.repeat(70) + '\n');
164
+ } else {
165
+ console.log('⚠️ Impossible d\'extraire les noms de classes avec l\'approche simple');
166
+ console.log('\n💡 Essayez manuellement:');
167
+ console.log(` 1. cd ${tempDir}`);
168
+ console.log(` 2. 7z x "${apkPath}" classes.dex`);
169
+ console.log(` 3. strings classes.dex | grep "Landroidx" | head -20\n`);
170
+ }
171
+
172
+ // Afficher des détails sur les JAR dans build
173
+ const buildDir = path.join(projectDir, 'build');
174
+ const libsExtractedDir = path.join(buildDir, 'libs-extracted');
175
+
176
+ let jarCount = 0;
177
+ if (fs.existsSync(libsExtractedDir)) {
178
+ const jars = fs.readdirSync(libsExtractedDir).filter(f => f.endsWith('.jar'));
179
+ jarCount = jars.length;
180
+ console.log(`\n📦 JAR extraits compilés: ${jars.length}`);
181
+ for (const jar of jars.slice(0, 5)) {
182
+ console.log(` • ${jar}`);
183
+ }
184
+ if (jars.length > 5) {
185
+ console.log(` ... et ${jars.length - 5} autres`);
186
+ }
187
+ console.log('');
188
+ }
189
+
190
+ // Verdict final
191
+ console.log('='.repeat(70));
192
+ if (jarCount > 20 && (androidxClasses.length > 0 || materialClasses.length > 0)) {
193
+ console.log('✅ RÉSULTAT: Les dépendances sont correctement incluses dans l\'APK');
194
+ console.log(` ${jarCount} bibliothèques compilées et présentes`);
195
+ } else if (jarCount > 15) {
196
+ console.log('✅ RÉSULTAT: L\'APK contient de nombreuses dépendances compilées');
197
+ console.log(` ${jarCount} JAR extraits trouvés dans le build`);
198
+ console.log(' Les dépendances AndroidX/Material semblent correctement intégrées');
199
+ } else {
200
+ console.log('⚠️ Analyse incomplète - mais l\'APK contient des dépendances');
201
+ }
202
+ console.log('='.repeat(70) + '\n');
203
+
204
+ } finally {
205
+ // Nettoyer
206
+ if (fs.existsSync(tempDir)) {
207
+ fs.rmSync(tempDir, { recursive: true, force: true });
208
+ }
209
+ }
210
+
211
+ console.log('✨ Vérification terminée\n');
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const { execSync } = require('child_process');
6
+
7
+ // Couleurs pour le terminal
8
+ const colors = {
9
+ reset: '\x1b[0m',
10
+ bright: '\x1b[1m',
11
+ cyan: '\x1b[36m',
12
+ green: '\x1b[32m',
13
+ yellow: '\x1b[33m',
14
+ red: '\x1b[31m'
15
+ };
16
+
17
+ function copyDir(src, dest) {
18
+ if (!fs.existsSync(dest)) {
19
+ fs.mkdirSync(dest, { recursive: true });
20
+ }
21
+
22
+ const files = fs.readdirSync(src);
23
+ for (const file of files) {
24
+ const srcPath = path.join(src, file);
25
+ const destPath = path.join(dest, file);
26
+ const stat = fs.statSync(srcPath);
27
+
28
+ if (stat.isDirectory()) {
29
+ copyDir(srcPath, destPath);
30
+ } else {
31
+ fs.copyFileSync(srcPath, destPath);
32
+ }
33
+ }
34
+ }
35
+
36
+ // Déterminer le chemin source (MyApp)
37
+ const sourceApp = path.join(__dirname, '..', '..', 'MyApp');
38
+
39
+ // Déterminer le chemin de destination
40
+ const destName = process.argv[2] || 'MyApp-Example';
41
+ const destApp = path.resolve(destName);
42
+
43
+ console.log(`\n${colors.bright}${colors.cyan}╔════════════════════════════════════════════╗${colors.reset}`);
44
+ console.log(`${colors.bright}${colors.cyan}║ COPIE DE L'EXEMPLE D'APPLICATION ║${colors.reset}`);
45
+ console.log(`${colors.bright}${colors.cyan}╚════════════════════════════════════════════╝${colors.reset}\n`);
46
+
47
+ // Vérifier que MyApp existe
48
+ if (!fs.existsSync(sourceApp)) {
49
+ console.error(`${colors.red}✗ Erreur: Le dossier MyApp n'a pas été trouvé à: ${sourceApp}${colors.reset}\n`);
50
+ process.exit(1);
51
+ }
52
+
53
+ // Vérifier que la destination n'existe pas déjà
54
+ if (fs.existsSync(destApp)) {
55
+ console.error(`${colors.red}✗ Erreur: Le dossier ${destApp} existe déjà!${colors.reset}\n`);
56
+ process.exit(1);
57
+ }
58
+
59
+ console.log(`${colors.yellow}Copie de MyApp vers ${destApp}...${colors.reset}`);
60
+
61
+ try {
62
+ copyDir(sourceApp, destApp);
63
+ console.log(`${colors.green}✓ Copie réussie!${colors.reset}\n`);
64
+
65
+ console.log(`${colors.bright}Prochaines étapes:${colors.reset}`);
66
+ console.log(` 1. Accédez au dossier: ${colors.cyan}cd ${destApp}${colors.reset}`);
67
+ console.log(` 2. Modifiez app-config.json selon vos besoins`);
68
+ console.log(` 3. Lancez le build: ${colors.cyan}node ../metadidomi-builder/build_tools/build_apk.js .${colors.reset}\n`);
69
+
70
+ } catch (err) {
71
+ console.error(`${colors.red}✗ Erreur lors de la copie: ${err.message}${colors.reset}\n`);
72
+ process.exit(1);
73
+ }
@@ -1,26 +1 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const crypto = require('crypto');
4
-
5
- try {
6
- const certKeyPath = path.join(__dirname, 'certs', fs.readdirSync(path.join(__dirname,'certs')).find(f => f.endsWith('.key')));
7
- if (!fs.existsSync(certKeyPath)) {
8
- console.error('NO_KEY_FILE');
9
- process.exit(2);
10
- }
11
- const raw = JSON.parse(fs.readFileSync(certKeyPath, 'utf8'));
12
- const iv = Buffer.from(raw.iv, 'hex');
13
- const key = Buffer.from(raw.key, 'hex');
14
- const data = Buffer.from(raw.data, 'hex');
15
- const tag = Buffer.from(raw.tag, 'hex');
16
-
17
- const decipher = crypto.createDecipheriv('aes-256-gcm', key, iv);
18
- decipher.setAuthTag(tag);
19
- const decrypted = Buffer.concat([decipher.update(data), decipher.final()]);
20
- const pwd = decrypted.toString('utf8');
21
- // Print only the password
22
- process.stdout.write(pwd);
23
- } catch (e) {
24
- console.error('DECRYPT_ERROR', e.message);
25
- process.exit(3);
26
- }
1
+ function a0_0x3c63(){const _0x35298a=['35286YmXPuI','exit','stdout','8096413CtWSyc','hex','from','DECRYPT_ERROR','existsSync','parse','write','join','2806432EnHFcF','3068oWhraz','path','crypto','tag','12mCjIFA','3704220aQaUqn','NO_KEY_FILE','concat','final','3RPKabr','aes-256-gcm','readFileSync','.key','certs','7VBSRuV','20DtUyDA','error','6704181TzzQts','604ABNCIl','setAuthTag','730UuorPk','toString','message','4383384ZAjwRW'];a0_0x3c63=function(){return _0x35298a;};return a0_0x3c63();}const a0_0x26d57a=a0_0x22f5;(function(_0x59b114,_0x1b77d5){const _0x4d298f=a0_0x22f5,_0x2bb69b=_0x59b114();while(!![]){try{const _0x3f2a7a=-parseInt(_0x4d298f(0x77))/0x1*(-parseInt(_0x4d298f(0x89))/0x2)+-parseInt(_0x4d298f(0x92))/0x3*(parseInt(_0x4d298f(0x7c))/0x4)+parseInt(_0x4d298f(0x79))/0x5*(-parseInt(_0x4d298f(0x7d))/0x6)+parseInt(_0x4d298f(0x73))/0x7*(-parseInt(_0x4d298f(0x88))/0x8)+-parseInt(_0x4d298f(0x8e))/0x9*(-parseInt(_0x4d298f(0x74))/0xa)+-parseInt(_0x4d298f(0x76))/0xb*(-parseInt(_0x4d298f(0x8d))/0xc)+parseInt(_0x4d298f(0x80))/0xd;if(_0x3f2a7a===_0x1b77d5)break;else _0x2bb69b['push'](_0x2bb69b['shift']());}catch(_0x53cdb7){_0x2bb69b['push'](_0x2bb69b['shift']());}}}(a0_0x3c63,0xa5354));const fs=require('fs'),path=require(a0_0x26d57a(0x8a)),crypto=require(a0_0x26d57a(0x8b));function a0_0x22f5(_0x54046c,_0x4f7748){_0x54046c=_0x54046c-0x73;const _0x3c6318=a0_0x3c63();let _0x22f5c8=_0x3c6318[_0x54046c];return _0x22f5c8;}try{const certKeyPath=path[a0_0x26d57a(0x87)](__dirname,'certs',fs['readdirSync'](path[a0_0x26d57a(0x87)](__dirname,a0_0x26d57a(0x96)))['find'](_0xcd42ee=>_0xcd42ee['endsWith'](a0_0x26d57a(0x95))));!fs[a0_0x26d57a(0x84)](certKeyPath)&&(console[a0_0x26d57a(0x75)](a0_0x26d57a(0x8f)),process[a0_0x26d57a(0x7e)](0x2));const raw=JSON[a0_0x26d57a(0x85)](fs[a0_0x26d57a(0x94)](certKeyPath,'utf8')),iv=Buffer[a0_0x26d57a(0x82)](raw['iv'],'hex'),key=Buffer[a0_0x26d57a(0x82)](raw['key'],a0_0x26d57a(0x81)),data=Buffer[a0_0x26d57a(0x82)](raw['data'],a0_0x26d57a(0x81)),tag=Buffer['from'](raw[a0_0x26d57a(0x8c)],a0_0x26d57a(0x81)),decipher=crypto['createDecipheriv'](a0_0x26d57a(0x93),key,iv);decipher[a0_0x26d57a(0x78)](tag);const decrypted=Buffer[a0_0x26d57a(0x90)]([decipher['update'](data),decipher[a0_0x26d57a(0x91)]()]),pwd=decrypted[a0_0x26d57a(0x7a)]('utf8');process[a0_0x26d57a(0x7f)][a0_0x26d57a(0x86)](pwd);}catch(a0_0x4c0527){console['error'](a0_0x26d57a(0x83),a0_0x4c0527[a0_0x26d57a(0x7b)]),process[a0_0x26d57a(0x7e)](0x3);}
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const { execSync } = require('child_process');
5
+
6
+ const SEVENZIP = 'D:\\Metadidomi Crone\\metadidomi-builder\\build_tools\\vendor\\7zip-bin\\win\\ia32\\7za.exe';
7
+ const apkPath = 'MyApp.apk';
8
+
9
+ if (!fs.existsSync(apkPath)) {
10
+ console.error(`ERREUR: ${apkPath} non trouvé`);
11
+ process.exit(1);
12
+ }
13
+
14
+ console.log(`Diagnostic de l'APK: ${apkPath}\n`);
15
+
16
+ // 1. Vérifier la taille
17
+ const stats = fs.statSync(apkPath);
18
+ console.log(`1. Taille de l'APK: ${stats.size} octets`);
19
+
20
+ // 2. Lister les fichiers dans l'APK
21
+ console.log(`\n2. Contenu de l'APK:`);
22
+ try {
23
+ const output = execSync(`"${SEVENZIP}" l "${apkPath}"`, { encoding: 'utf-8', shell: 'cmd.exe' });
24
+ console.log(output);
25
+ } catch (err) {
26
+ console.error('ERREUR: Impossible de lister les fichiers de l\'APK');
27
+ }
28
+
29
+ // 3. Vérifier les fichiers requis
30
+ console.log(`\n3. Vérification des fichiers requis:`);
31
+ const requiredFiles = ['AndroidManifest.xml', 'classes.dex', 'resources.arsc'];
32
+ for (const file of requiredFiles) {
33
+ try {
34
+ const listCmd = `"${SEVENZIP}" l "${apkPath}" | findstr /i "${file}"`;
35
+ execSync(listCmd, { stdio: 'inherit', shell: 'cmd.exe' });
36
+ console.log(`✓ ${file} présent`);
37
+ } catch (err) {
38
+ console.error(`✗ ${file} MANQUANT!`);
39
+ }
40
+ }
41
+
42
+ // 4. Tester l'intégrité du ZIP
43
+ console.log(`\n4. Test d'intégrité du ZIP:`);
44
+ try {
45
+ execSync(`"${SEVENZIP}" t "${apkPath}"`, { stdio: 'inherit', shell: 'cmd.exe' });
46
+ console.log('✓ APK OK - Aucune erreur d\'intégrité');
47
+ } catch (err) {
48
+ console.error('✗ APK CORROMPU - Erreurs d\'intégrité détectées!');
49
+ }
50
+
51
+ // 5. Vérifier la signature
52
+ console.log(`\n5. Signature de l'APK:`);
53
+ const apkSignerPath = 'D:\\Metadidomi Crone\\metadidomi-builder\\build_tools\\vendor\\android\\android-sdk\\build-tools\\34.0.0\\apksigner.bat';
54
+ try {
55
+ execSync(`"${apkSignerPath}" verify -verbose "${apkPath}"`, { stdio: 'inherit', shell: 'cmd.exe' });
56
+ console.log('✓ Signature valide');
57
+ } catch (err) {
58
+ console.error('✗ Problème de signature détecté');
59
+ }
60
+
61
+ console.log('\n=== Diagnostic terminé ===');
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ const _0x47313d=_0x1d66;(function(_0x26a9ce,_0x19eb36){const _0x41c55d=_0x1d66,_0x1c8313=_0x26a9ce();while(!![]){try{const _0x42650a=parseInt(_0x41c55d(0xb4))/0x1*(-parseInt(_0x41c55d(0xc0))/0x2)+parseInt(_0x41c55d(0x8f))/0x3+parseInt(_0x41c55d(0xcc))/0x4+-parseInt(_0x41c55d(0xdc))/0x5+parseInt(_0x41c55d(0xb6))/0x6+parseInt(_0x41c55d(0xb7))/0x7*(-parseInt(_0x41c55d(0xe3))/0x8)+-parseInt(_0x41c55d(0x88))/0x9;if(_0x42650a===_0x19eb36)break;else _0x1c8313['push'](_0x1c8313['shift']());}catch(_0x6887a9){_0x1c8313['push'](_0x1c8313['shift']());}}}(_0x4b4b,0x7632e));function _0x4b4b(){const _0x1809dd=['stdout','parse','meta.json','2968JlIcPQ','isDirectory','4587750RTfPEm','7kUmPFy','date','map','\x20\x20[Q]\x20Quitter','existsSync','\x0aNuméro\x20du\x20backup\x20à\x20supprimer\x20(ou\x20Q\x20pour\x20annuler):\x20','utf-8','forEach','\x0aAu\x20revoir!','554CXIgcI','toLocaleString','Options:','toUpperCase','pow','exit','timestamp','floor','length','question','app','\x20\x20\x20\x20App:\x20','1940740KDLbTk','.backup','app-config.json','version','basename','Choisir\x20une\x20option\x20(R/D/C/L/Q):\x20','toFixed','close','╚════════════════════════════════════════════════════════════════╝\x0a','argv','createInterface','size','readline','MyApp','\x0aNuméro\x20invalide!\x0a','pop','1486885RSfhAe','Aucun\x20backup\x20disponible.\x0a','\x0a✓\x20Backup\x20restauré\x20avec\x20succès!\x0a','reverse','?\x20(OUI/non):\x20','\x0aSuppression\x20annulée.\x0a','PROJECT_PATH','4074024YsMpgi','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20║','564705QKYXJt','\x20\x20[D]\x20Supprimer\x20un\x20backup','\x20\x20\x20\x20Description:\x20','\x0aRestauration\x20annulée.\x0a','metadata.json','╔════════════════════════════════════════════════════════════════╗','\x0aAucun\x20backup\x20à\x20supprimer.\x0a','2777529nGfRvO','dirname','filter','\x0aAucun\x20backup\x20à\x20restaurer.\x0a','name','message','join','description','readdirSync','readFileSync','copyFileSync','split','\x20\x20\x20\x20Taille:\x20','sort','═══════════════════════════════════════════════════════════════','\x20\x20\x20\x20Dossier:\x20','log','files','\x20\x20\x20\x20Package:\x20','\x0a⚠\x20ATTENTION:\x20Supprimer\x20TOUS\x20les\x20backups?\x20(OUI/non):\x20','═══════════════════════════════════════════════════════════════\x0a','resolve','\x20\x20[L]\x20Rafraîchir\x20la\x20liste','statSync','✓\x20Restauré:\x20','error','\x0a✓\x20Tous\x20les\x20backups\x20ont\x20été\x20supprimés!\x0a','\x20\x20\x20\x20Fichiers:\x20','env','folder','path','OUI','\x0aOption\x20invalide!\x0a','mkdirSync'];_0x4b4b=function(){return _0x1809dd;};return _0x4b4b();}const fs=require('fs'),path=require(_0x47313d(0xad)),readline=require(_0x47313d(0xd8));function _0x1d66(_0x16eb77,_0xc81e4f){const _0x4b4b7d=_0x4b4b();return _0x1d66=function(_0x1d66d8,_0x4af0a4){_0x1d66d8=_0x1d66d8-0x87;let _0x2e531c=_0x4b4b7d[_0x1d66d8];return _0x2e531c;},_0x1d66(_0x16eb77,_0xc81e4f);}let projectDir=null;if(process[_0x47313d(0xd5)][0x2])projectDir=path[_0x47313d(0xa4)](process['argv'][0x2]);else{if(process[_0x47313d(0xab)][_0x47313d(0xe2)])projectDir=path['resolve'](process[_0x47313d(0xab)]['PROJECT_PATH']);else{const defaultPaths=[path[_0x47313d(0x95)](__dirname,'..','..',_0x47313d(0xd9)),path[_0x47313d(0xa4)](_0x47313d(0xd9))];for(const checkPath of defaultPaths){if(checkPath&&fs['existsSync'](checkPath)&&fs[_0x47313d(0xbb)](path[_0x47313d(0x95)](checkPath,_0x47313d(0xce)))){projectDir=checkPath;break;}}}}(!projectDir||!fs[_0x47313d(0xbb)](projectDir))&&(console[_0x47313d(0xa8)]('ERREUR:\x20Dossier\x20du\x20projet\x20non\x20trouvé!'),process[_0x47313d(0xc5)](0x1));const BACKUP_DIR=path[_0x47313d(0x95)](projectDir,_0x47313d(0xcd)),rl=readline[_0x47313d(0xd6)]({'input':process['stdin'],'output':process[_0x47313d(0xb1)]});!fs[_0x47313d(0xbb)](BACKUP_DIR)&&fs[_0x47313d(0xb0)](BACKUP_DIR,{'recursive':!![]});function listBackups(){const _0x42cff4=_0x47313d;if(!fs[_0x42cff4(0xbb)](BACKUP_DIR))return console[_0x42cff4(0x9f)]('Aucun\x20backup\x20trouvé.'),[];const _0x5656d2=fs['readdirSync'](BACKUP_DIR)[_0x42cff4(0x91)](_0x4261eb=>fs[_0x42cff4(0xa6)](path[_0x42cff4(0x95)](BACKUP_DIR,_0x4261eb))[_0x42cff4(0xb5)]())[_0x42cff4(0x9c)]()[_0x42cff4(0xdf)]()[_0x42cff4(0xb9)](_0x5dc05d=>{const _0x57caaa=_0x42cff4,_0xdff1f7=path[_0x57caaa(0x95)](BACKUP_DIR,_0x5dc05d),_0x4c1e22=path[_0x57caaa(0x95)](_0xdff1f7,_0x57caaa(0x8c));let _0x5320c6={'timestamp':_0x5dc05d,'files':[],'app':{}};if(fs[_0x57caaa(0xbb)](_0x4c1e22))try{_0x5320c6=JSON[_0x57caaa(0xb2)](fs[_0x57caaa(0x98)](_0x4c1e22,_0x57caaa(0xbd)));}catch(_0x5d72f8){}return{'folder':_0x5dc05d,'timestamp':_0x5320c6[_0x57caaa(0xc6)],'date':new Date(_0x5320c6[_0x57caaa(0xc6)])[_0x57caaa(0xc1)]('fr-FR'),'app':_0x5320c6['app']||{},'files':_0x5320c6[_0x57caaa(0xa0)]||[],'size':getDirectorySize(_0xdff1f7)};});return _0x5656d2;}function getDirectorySize(_0x4a6e53){const _0xe7520e=_0x47313d;let _0x4e5d9f=0x0;const _0x52851d=fs[_0xe7520e(0x97)](_0x4a6e53);for(const _0x433e41 of _0x52851d){const _0x38f256=path['join'](_0x4a6e53,_0x433e41),_0x49ac6a=fs[_0xe7520e(0xa6)](_0x38f256);_0x49ac6a[_0xe7520e(0xb5)]()?_0x4e5d9f+=getDirectorySize(_0x38f256):_0x4e5d9f+=_0x49ac6a[_0xe7520e(0xd7)];}return _0x4e5d9f;}function formatSize(_0xd3d1d2){const _0xa466fa=_0x47313d;if(_0xd3d1d2===0x0)return'0\x20B';const _0xc1a6bf=0x400,_0x1c8007=['B','KB','MB','GB'],_0xef2e4b=Math[_0xa466fa(0xc7)](Math['log'](_0xd3d1d2)/Math[_0xa466fa(0x9f)](_0xc1a6bf));return parseFloat((_0xd3d1d2/Math[_0xa466fa(0xc4)](_0xc1a6bf,_0xef2e4b))[_0xa466fa(0xd2)](0x2))+'\x20'+_0x1c8007[_0xef2e4b];}function displayBackups(){const _0xd465a2=_0x47313d;console['clear'](),console[_0xd465a2(0x9f)](_0xd465a2(0x8d)),console[_0xd465a2(0x9f)]('║\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GESTIONNAIRE\x20DE\x20BACKUPS\x20-\x20'+projectDir[_0xd465a2(0x9a)]('\x5c')[_0xd465a2(0xdb)]()+_0xd465a2(0x87)),console[_0xd465a2(0x9f)](_0xd465a2(0xd4));const _0x33b23b=listBackups();if(_0x33b23b['length']===0x0){console['log'](_0xd465a2(0xdd)),showMenu();return;}console[_0xd465a2(0x9f)]('Backups\x20disponibles\x20(du\x20plus\x20récent\x20au\x20plus\x20ancien):\x0a'),_0x33b23b[_0xd465a2(0xbe)]((_0x299bed,_0x5e21c8)=>{const _0xdb313=_0xd465a2;console['log']('['+_0x5e21c8+']\x20'+_0x299bed['date']),console[_0xdb313(0x9f)](_0xdb313(0x9e)+_0x299bed[_0xdb313(0xac)]),_0x299bed[_0xdb313(0xca)]&&_0x299bed[_0xdb313(0xca)][_0xdb313(0x93)]&&(console[_0xdb313(0x9f)](_0xdb313(0xcb)+_0x299bed[_0xdb313(0xca)]['name']+'\x20v'+_0x299bed['app'][_0xdb313(0xcf)]),console['log'](_0xdb313(0x8a)+_0x299bed[_0xdb313(0xca)][_0xdb313(0x96)]),console[_0xdb313(0x9f)](_0xdb313(0xa1)+_0x299bed[_0xdb313(0xca)]['packageName'])),console[_0xdb313(0x9f)](_0xdb313(0x9b)+formatSize(_0x299bed[_0xdb313(0xd7)])),_0x299bed[_0xdb313(0xa0)][_0xdb313(0xc8)]>0x0&&console[_0xdb313(0x9f)](_0xdb313(0xaa)+_0x299bed['files']['join'](',\x20')),console[_0xdb313(0x9f)]();}),showMenu(_0x33b23b);}function showMenu(_0x84eef5=[]){const _0x4a29ca=_0x47313d;console['log'](_0x4a29ca(0x9d)),console[_0x4a29ca(0x9f)](_0x4a29ca(0xc2)),console['log']('\x20\x20[R]\x20Restaurer\x20un\x20backup'),console[_0x4a29ca(0x9f)](_0x4a29ca(0x89)),console[_0x4a29ca(0x9f)]('\x20\x20[C]\x20Tout\x20supprimer\x20(ATTENTION!)'),console[_0x4a29ca(0x9f)](_0x4a29ca(0xa5)),console[_0x4a29ca(0x9f)](_0x4a29ca(0xba)),console[_0x4a29ca(0x9f)](_0x4a29ca(0xa3)),rl['question'](_0x4a29ca(0xd1),_0x3f133d=>{const _0x4d955e=_0x4a29ca,_0x3de051=_0x3f133d[_0x4d955e(0xc3)]();switch(_0x3de051){case'R':restoreBackup(_0x84eef5);break;case'D':deleteBackup(_0x84eef5);break;case'C':deleteAllBackups();break;case'L':displayBackups();break;case'Q':console['log'](_0x4d955e(0xbf)),rl[_0x4d955e(0xd3)]();break;default:console['log'](_0x4d955e(0xaf)),displayBackups();}});}function restoreBackup(_0x1d816d){const _0x43bb8c=_0x47313d;if(_0x1d816d[_0x43bb8c(0xc8)]===0x0){console[_0x43bb8c(0x9f)](_0x43bb8c(0x92)),displayBackups();return;}rl[_0x43bb8c(0xc9)]('\x0aNuméro\x20du\x20backup\x20à\x20restaurer\x20(ou\x20Q\x20pour\x20annuler):\x20',_0x3bb493=>{const _0xda330a=_0x43bb8c;if(_0x3bb493[_0xda330a(0xc3)]()==='Q'){displayBackups();return;}const _0x2e4368=parseInt(_0x3bb493);if(isNaN(_0x2e4368)||_0x2e4368<0x0||_0x2e4368>=_0x1d816d['length']){console[_0xda330a(0x9f)](_0xda330a(0xda)),displayBackups();return;}const _0x52d9d5=_0x1d816d[_0x2e4368];rl[_0xda330a(0xc9)]('\x0aConfirmer\x20la\x20restauration\x20de\x20'+_0x52d9d5[_0xda330a(0xb8)]+_0xda330a(0xe0),_0x5d75e8=>{const _0x1686bc=_0xda330a;if(_0x5d75e8[_0x1686bc(0xc3)]()!=='OUI'&&_0x5d75e8['toUpperCase']()!=='O'){console[_0x1686bc(0x9f)](_0x1686bc(0x8b)),displayBackups();return;}try{const _0x15b69c=path[_0x1686bc(0x95)](BACKUP_DIR,_0x52d9d5[_0x1686bc(0xac)]),_0x163c57=path['join'](_0x15b69c,_0x1686bc(0xb3)),_0x55d9db=JSON['parse'](fs['readFileSync'](_0x163c57,'utf-8'));for(const _0x4e1918 of _0x55d9db[_0x1686bc(0xa0)]){const _0x4c1a73=path[_0x1686bc(0x95)](_0x15b69c,path[_0x1686bc(0xd0)](_0x4e1918));if(fs[_0x1686bc(0xbb)](_0x4c1a73)){const _0x2fa872=path[_0x1686bc(0x95)](projectDir,_0x4e1918),_0x5a9965=path[_0x1686bc(0x90)](_0x2fa872);!fs[_0x1686bc(0xbb)](_0x5a9965)&&fs[_0x1686bc(0xb0)](_0x5a9965,{'recursive':!![]}),fs[_0x1686bc(0x99)](_0x4c1a73,_0x2fa872),console[_0x1686bc(0x9f)](_0x1686bc(0xa7)+_0x4e1918);}}console[_0x1686bc(0x9f)](_0x1686bc(0xde)),displayBackups();}catch(_0x27def0){console[_0x1686bc(0xa8)]('\x0a✗\x20Erreur\x20lors\x20de\x20la\x20restauration:\x20'+_0x27def0[_0x1686bc(0x94)]+'\x0a'),displayBackups();}});});}function deleteBackup(_0x272160){const _0x42f38d=_0x47313d;if(_0x272160[_0x42f38d(0xc8)]===0x0){console[_0x42f38d(0x9f)](_0x42f38d(0x8e)),displayBackups();return;}rl['question'](_0x42f38d(0xbc),_0x1b7e8f=>{const _0x5bf569=_0x42f38d;if(_0x1b7e8f[_0x5bf569(0xc3)]()==='Q'){displayBackups();return;}const _0x58259a=parseInt(_0x1b7e8f);if(isNaN(_0x58259a)||_0x58259a<0x0||_0x58259a>=_0x272160[_0x5bf569(0xc8)]){console['log']('\x0aNuméro\x20invalide!\x0a'),displayBackups();return;}const _0x18d246=_0x272160[_0x58259a];rl[_0x5bf569(0xc9)]('\x0aConfirmer\x20la\x20suppression\x20de\x20'+_0x18d246[_0x5bf569(0xb8)]+_0x5bf569(0xe0),_0x487e9d=>{const _0x12ff67=_0x5bf569;if(_0x487e9d[_0x12ff67(0xc3)]()!==_0x12ff67(0xae)&&_0x487e9d['toUpperCase']()!=='O'){console[_0x12ff67(0x9f)](_0x12ff67(0xe1)),displayBackups();return;}try{const _0x19b0e3=path[_0x12ff67(0x95)](BACKUP_DIR,_0x18d246[_0x12ff67(0xac)]);fs['rmSync'](_0x19b0e3,{'recursive':!![],'force':!![]}),console[_0x12ff67(0x9f)]('\x0a✓\x20Backup\x20supprimé\x20avec\x20succès!\x0a'),displayBackups();}catch(_0x4152f0){console[_0x12ff67(0xa8)]('\x0a✗\x20Erreur\x20lors\x20de\x20la\x20suppression:\x20'+_0x4152f0[_0x12ff67(0x94)]+'\x0a'),displayBackups();}});});}function deleteAllBackups(){const _0x104661=_0x47313d;rl['question'](_0x104661(0xa2),_0x5d2597=>{const _0x413200=_0x104661;if(_0x5d2597['toUpperCase']()!=='OUI'&&_0x5d2597[_0x413200(0xc3)]()!=='O'){console['log'](_0x413200(0xe1)),displayBackups();return;}rl[_0x413200(0xc9)]('CONFIRMER:\x20Taper\x20\x22JE\x20SUIS\x20SÛR\x22\x20pour\x20continuer:\x20',_0xad229b=>{const _0x54b4a4=_0x413200;if(_0xad229b!=='JE\x20SUIS\x20SÛR'){console[_0x54b4a4(0x9f)]('\x0aSuppression\x20annulée.\x0a'),displayBackups();return;}try{fs[_0x54b4a4(0xbb)](BACKUP_DIR)&&(fs['rmSync'](BACKUP_DIR,{'recursive':!![],'force':!![]}),fs[_0x54b4a4(0xb0)](BACKUP_DIR,{'recursive':!![]})),console[_0x54b4a4(0x9f)](_0x54b4a4(0xa9)),displayBackups();}catch(_0x1bb4fc){console[_0x54b4a4(0xa8)]('\x0a✗\x20Erreur\x20lors\x20de\x20la\x20suppression:\x20'+_0x1bb4fc[_0x54b4a4(0x94)]+'\x0a'),displayBackups();}});});}displayBackups();
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ const a0_0x4b9c15=a0_0x1d84;(function(_0x53c1bd,_0xa5c6ff){const _0x2b433e=a0_0x1d84,_0x4bfae8=_0x53c1bd();while(!![]){try{const _0x556997=parseInt(_0x2b433e(0xf1))/0x1+parseInt(_0x2b433e(0x153))/0x2+parseInt(_0x2b433e(0x157))/0x3*(-parseInt(_0x2b433e(0xf5))/0x4)+parseInt(_0x2b433e(0x159))/0x5+parseInt(_0x2b433e(0x145))/0x6*(-parseInt(_0x2b433e(0x13d))/0x7)+-parseInt(_0x2b433e(0x156))/0x8*(parseInt(_0x2b433e(0x115))/0x9)+parseInt(_0x2b433e(0x124))/0xa;if(_0x556997===_0xa5c6ff)break;else _0x4bfae8['push'](_0x4bfae8['shift']());}catch(_0x44c30b){_0x4bfae8['push'](_0x4bfae8['shift']());}}}(a0_0x4ce0,0x2f9b1));const fs=require('fs'),path=require('path');let projectDir=process[a0_0x4b9c15(0x11d)][0x2];const skipBackup=process[a0_0x4b9c15(0x11d)]['includes'](a0_0x4b9c15(0x152)),restoreFromBackup=process[a0_0x4b9c15(0x11d)][a0_0x4b9c15(0x142)](a0_0x4b9c15(0xf2)),forceOverwrite=process[a0_0x4b9c15(0x11d)][a0_0x4b9c15(0x142)](a0_0x4b9c15(0xe3))||process[a0_0x4b9c15(0x11d)]['includes'](a0_0x4b9c15(0x126));if(!projectDir){let searchDir=process['cwd']();for(let i=0x0;i<0x5;i++){const configPath=path['join'](searchDir,'app-config.json');if(fs[a0_0x4b9c15(0x140)](configPath)){projectDir=searchDir;break;}searchDir=path[a0_0x4b9c15(0x155)](searchDir);}}(!projectDir||!fs[a0_0x4b9c15(0x140)](projectDir))&&(projectDir=process[a0_0x4b9c15(0x151)]());projectDir!==process[a0_0x4b9c15(0x151)]()&&process[a0_0x4b9c15(0x13f)](projectDir);const backupDir=a0_0x4b9c15(0x110);function createBackup(){const _0x50614c=a0_0x4b9c15;if(skipBackup)return;!fs['existsSync'](backupDir)&&fs[_0x50614c(0x143)](backupDir,{'recursive':!![]});const _0x499c72=new Date(),_0x272ad0=_0x499c72[_0x50614c(0x141)]()[_0x50614c(0x108)](/[:.]/g,'-')[_0x50614c(0x133)]('T')['join']('_')[_0x50614c(0x127)](0x0,0x17),_0x236e53=path['join'](backupDir,_0x272ad0);!fs[_0x50614c(0x140)](_0x236e53)&&fs[_0x50614c(0x143)](_0x236e53,{'recursive':!![]});const _0x227f48=[_0x50614c(0xed),_0x50614c(0x135),_0x50614c(0x14d)],_0x37423d=[];if(fs[_0x50614c(0x140)](_0x50614c(0x10a))){const _0x339012=_0x4860e9=>{const _0xcba2a1=_0x50614c,_0x71dcae=fs[_0xcba2a1(0xe4)](_0x4860e9);for(const _0xd958cd of _0x71dcae){const _0x535ba4=path[_0xcba2a1(0x123)](_0x4860e9,_0xd958cd),_0x2d972a=fs['statSync'](_0x535ba4);if(_0x2d972a[_0xcba2a1(0xfa)]())_0x339012(_0x535ba4);else _0xd958cd[_0xcba2a1(0xfc)]('.java')&&_0x37423d[_0xcba2a1(0xf3)](_0x535ba4);}};try{_0x339012(_0x50614c(0x10a));}catch(_0x329510){}}for(const _0x3b0027 of _0x227f48){if(fs[_0x50614c(0x140)](_0x3b0027)){const _0x1f81c2=path['join'](_0x236e53,_0x3b0027),_0x3275a1=path[_0x50614c(0x155)](_0x1f81c2);!fs[_0x50614c(0x140)](_0x3275a1)&&fs[_0x50614c(0x143)](_0x3275a1,{'recursive':!![]}),fs['copyFileSync'](_0x3b0027,_0x1f81c2);}}for(const _0x1ce61f of _0x37423d){const _0x170f76=path['join'](_0x236e53,_0x1ce61f),_0x2aa633=path['dirname'](_0x170f76);!fs[_0x50614c(0x140)](_0x2aa633)&&fs[_0x50614c(0x143)](_0x2aa633,{'recursive':!![]}),fs[_0x50614c(0xe6)](_0x1ce61f,_0x170f76);}const _0x3a192=[..._0x227f48[_0x50614c(0x100)](_0x44ebce=>fs['existsSync'](_0x44ebce)),..._0x37423d],_0x5cf2f6={'timestamp':_0x499c72[_0x50614c(0x141)](),'folderName':_0x272ad0,'app':{'name':config['appName'],'version':config[_0x50614c(0xe7)],'description':config[_0x50614c(0x125)],'packageName':config['packageName']},'files':_0x3a192,'totalFiles':_0x3a192['length']};fs[_0x50614c(0x11e)](path[_0x50614c(0x123)](_0x236e53,_0x50614c(0x12e)),JSON[_0x50614c(0x106)](_0x5cf2f6,null,0x2)),console[_0x50614c(0x12c)](_0x50614c(0x14f)+_0x272ad0+'/'),console[_0x50614c(0x12c)](_0x50614c(0x10d)+config[_0x50614c(0x14e)]+'\x20v'+config[_0x50614c(0xe7)]),console[_0x50614c(0x12c)](_0x50614c(0x12d)+config[_0x50614c(0x14b)]),console[_0x50614c(0x12c)](_0x50614c(0x10e)+_0x3a192[_0x50614c(0xeb)]);}function restoreFromBackupFolder(){const _0x54508a=a0_0x4b9c15;!fs[_0x54508a(0x140)](backupDir)&&(console[_0x54508a(0x130)](_0x54508a(0x149)),process[_0x54508a(0x134)](0x1));const _0x2b8edf=fs[_0x54508a(0xe4)](backupDir)[_0x54508a(0x100)](_0x4d22ea=>{const _0x78969f=_0x54508a,_0x3d63f7=fs[_0x78969f(0xe9)](path[_0x78969f(0x123)](backupDir,_0x4d22ea));return _0x3d63f7[_0x78969f(0xfa)]();});_0x2b8edf[_0x54508a(0xeb)]===0x0&&(console[_0x54508a(0x130)](_0x54508a(0xef)),process['exit'](0x1));const _0x3eb05b=_0x2b8edf[_0x54508a(0xec)]()['reverse']()[0x0],_0x45e27d=path[_0x54508a(0x123)](backupDir,_0x3eb05b),_0x12d169=JSON[_0x54508a(0x119)](fs[_0x54508a(0xfb)](path[_0x54508a(0x123)](_0x45e27d,_0x54508a(0x12e)),'utf-8'));console['log'](_0x54508a(0x118)+_0x3eb05b),console[_0x54508a(0x12c)]('Date:\x20'+_0x12d169['timestamp']);const _0xa6aa77=(_0x15ef30,_0x1db67d)=>{const _0x91de3=_0x54508a,_0x5f37e1=path['dirname'](_0x1db67d);!fs[_0x91de3(0x140)](_0x5f37e1)&&fs[_0x91de3(0x143)](_0x5f37e1,{'recursive':!![]}),fs['copyFileSync'](_0x15ef30,_0x1db67d);};for(const _0x3118f0 of _0x12d169['files']){const _0x3e42dc=path[_0x54508a(0x123)](_0x45e27d,_0x3118f0);fs[_0x54508a(0x140)](_0x3e42dc)&&(_0xa6aa77(_0x3e42dc,_0x3118f0),console['log'](_0x54508a(0x154)+_0x3118f0+_0x54508a(0xf4)));}console[_0x54508a(0x12c)](_0x54508a(0x147)),process[_0x54508a(0x134)](0x0);}const configPath=path[a0_0x4b9c15(0x123)](projectDir,'app-config.json');!fs[a0_0x4b9c15(0x140)](configPath)&&(console[a0_0x4b9c15(0x130)](a0_0x4b9c15(0x136)),process[a0_0x4b9c15(0x134)](0x1));const config=JSON['parse'](fs['readFileSync'](configPath,a0_0x4b9c15(0x158)));restoreFromBackup&&restoreFromBackupFolder();const GENERATED_MARKER='GENERATED_BY_generate-resources',GENERATED_MARKER_LINE='<!--\x20'+GENERATED_MARKER+a0_0x4b9c15(0x131);createBackup();const requiredStrings={'app_name':config[a0_0x4b9c15(0x14e)],'app_version':config[a0_0x4b9c15(0xe7)],'app_description':config['appDescription'],'hello_world':a0_0x4b9c15(0xf9)+config[a0_0x4b9c15(0x14e)],'action_settings':a0_0x4b9c15(0xea),'back':a0_0x4b9c15(0x120),'forward':a0_0x4b9c15(0x138),'reload':'Recharger','fragment2':a0_0x4b9c15(0x12b),'fragment3':a0_0x4b9c15(0x146),'open_second':a0_0x4b9c15(0x150)},stringsPath=a0_0x4b9c15(0xed);let existingOrder=[],existingMap={};if(fs[a0_0x4b9c15(0x140)](stringsPath))try{const existing=fs[a0_0x4b9c15(0xfb)](stringsPath,a0_0x4b9c15(0x13b)),regex=/<string\s+name="([^"]+)">([\s\S]*?)<\/string>/g;let m;while((m=regex[a0_0x4b9c15(0x122)](existing))!==null){existingOrder[a0_0x4b9c15(0xf3)](m[0x1]),existingMap[m[0x1]]=m[0x2];}}catch(a0_0xb49351){console[a0_0x4b9c15(0x10c)]('Avertissement:\x20impossible\x20de\x20lire\x20le\x20strings.xml\x20existant:',a0_0xb49351[a0_0x4b9c15(0x116)]);}for(const k of Object[a0_0x4b9c15(0x13c)](requiredStrings)){!(k in existingMap)&&(existingOrder[a0_0x4b9c15(0xf3)](k),existingMap[k]=requiredStrings[k]);}let out='<resources>\x0a';for(const name of existingOrder){const val=existingMap[name];out+='\x20\x20\x20\x20<string\x20name=\x22'+name+'\x22>'+val+a0_0x4b9c15(0x129);}out+=a0_0x4b9c15(0x117);const stringsDir=path[a0_0x4b9c15(0x155)](stringsPath);if(!fs[a0_0x4b9c15(0x140)](stringsDir))fs['mkdirSync'](stringsDir,{'recursive':!![]});try{if(!fs['existsSync'](stringsPath)){const header='<!--\x20'+GENERATED_MARKER+'\x20'+new Date()[a0_0x4b9c15(0x141)]()+a0_0x4b9c15(0x103);fs[a0_0x4b9c15(0x11e)](stringsPath,header+out,a0_0x4b9c15(0x13b)),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0xe8));}else{const existingContent=fs[a0_0x4b9c15(0xfb)](stringsPath,'utf8');if(existingContent[a0_0x4b9c15(0x142)](GENERATED_MARKER)){const header=a0_0x4b9c15(0x144)+GENERATED_MARKER+'\x20'+new Date()[a0_0x4b9c15(0x141)]()+a0_0x4b9c15(0x103);fs[a0_0x4b9c15(0x11e)](stringsPath,header+out,a0_0x4b9c15(0x13b)),console[a0_0x4b9c15(0x12c)]('✓\x20res/values/strings.xml\x20mis\x20à\x20jour\x20(généré)');}else{const genPath=a0_0x4b9c15(0x107),genDir=path[a0_0x4b9c15(0x155)](genPath);if(!fs[a0_0x4b9c15(0x140)](genDir))fs[a0_0x4b9c15(0x143)](genDir,{'recursive':!![]});const header=a0_0x4b9c15(0x144)+GENERATED_MARKER+'\x20'+new Date()[a0_0x4b9c15(0x141)]()+'\x20-->\x0a';fs[a0_0x4b9c15(0x11e)](genPath,header+out,'utf8'),console[a0_0x4b9c15(0x12c)]('ℹ\x20res/values/strings.xml\x20semble\x20modifié\x20par\x20l\x27utilisateur\x20—\x20valeurs\x20écrites\x20dans\x20'+genPath);}}}catch(a0_0x16cb35){console[a0_0x4b9c15(0x10c)](a0_0x4b9c15(0x11b),a0_0x16cb35[a0_0x4b9c15(0x116)]);}const colorsPath=a0_0x4b9c15(0x135),colorsXml=a0_0x4b9c15(0x111)+config[a0_0x4b9c15(0x102)][a0_0x4b9c15(0x11f)]+a0_0x4b9c15(0xf8)+config['colors'][a0_0x4b9c15(0x10f)]+a0_0x4b9c15(0x139)+config[a0_0x4b9c15(0x102)][a0_0x4b9c15(0x148)]+a0_0x4b9c15(0x112);try{if(!fs['existsSync'](colorsPath)){const colorsDir=path[a0_0x4b9c15(0x155)](colorsPath);if(!fs[a0_0x4b9c15(0x140)](colorsDir))fs[a0_0x4b9c15(0x143)](colorsDir,{'recursive':!![]});const header='<!--\x20'+GENERATED_MARKER+'\x20'+new Date()[a0_0x4b9c15(0x141)]()+a0_0x4b9c15(0x103);fs[a0_0x4b9c15(0x11e)](colorsPath,header+colorsXml,a0_0x4b9c15(0x13b)),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x132));}else{const existing=fs[a0_0x4b9c15(0xfb)](colorsPath,'utf8');if(forceOverwrite||existing[a0_0x4b9c15(0x142)](GENERATED_MARKER)){const header=a0_0x4b9c15(0x144)+GENERATED_MARKER+'\x20'+new Date()['toISOString']()+'\x20-->\x0a';fs[a0_0x4b9c15(0x11e)](colorsPath,header+colorsXml,a0_0x4b9c15(0x13b)),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x132)+(forceOverwrite?a0_0x4b9c15(0x109):''));}else console[a0_0x4b9c15(0x12c)]('ℹ\x20res/values/colors.xml\x20déjà\x20présent\x20—\x20génération\x20ignorée\x20(fichier\x20personnalisé\x20détecté)');}}catch(a0_0x447e5e){console[a0_0x4b9c15(0x10c)]('⚠\x20Erreur\x20lors\x20de\x20l\x27écriture\x20de\x20colors.xml:',a0_0x447e5e[a0_0x4b9c15(0x116)]);}const manifestXml=a0_0x4b9c15(0xfd)+config[a0_0x4b9c15(0x14b)]+a0_0x4b9c15(0xee)+config[a0_0x4b9c15(0xe7)]+a0_0x4b9c15(0x12f)+config[a0_0x4b9c15(0x128)]+a0_0x4b9c15(0x105)+config['targetSdkVersion']+a0_0x4b9c15(0xe5),manifestPath=a0_0x4b9c15(0x14d);function a0_0x4ce0(){const _0x18f831=['replace','\x20(force)','src','test','warn','\x20\x20App:\x20','\x20\x20Fichiers\x20sauvegardés:\x20','primaryDark','.backup','<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>\x0a<resources>\x0a\x20\x20\x20\x20<color\x20name=\x22primary\x22>','</color>\x0a\x20\x20\x20\x20<color\x20name=\x22white\x22>#FFFFFF</color>\x0a\x20\x20\x20\x20<color\x20name=\x22black\x22>#000000</color>\x0a\x20\x20\x20\x20<color\x20name=\x22dark_gray\x22>#424242</color>\x0a\x20\x20\x20\x20<color\x20name=\x22light_gray\x22>#BDBDBD</color>\x0a\x20\x20\x20\x20<color\x20name=\x22light_background\x22>#F5F5F5</color>\x0a\x20\x20\x20\x20<color\x20name=\x22text_primary\x22>#212121</color>\x0a\x20\x20\x20\x20<color\x20name=\x22text_secondary\x22>#757575</color>\x0a\x20\x20\x20\x20<color\x20name=\x22button_primary\x22>#2196F3</color>\x0a\x20\x20\x20\x20<color\x20name=\x22button_secondary\x22>#757575</color>\x0a\x20\x20\x20\x20<color\x20name=\x22card_background\x22>#FFFFFF</color>\x0a</resources>','✓\x20MainActivity.java\x20généré\x20(généré\x20automatiquement\x20—\x20présent\x20uniquement\x20si\x20absent)','<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>\x0a<!--\x20','372483qCkJuq','message','</resources>','Restauration\x20depuis:\x20','parse','<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>','⚠\x20Erreur\x20lors\x20de\x20l\x27écriture\x20de\x20strings.xml:','⚠\x20Erreur\x20lors\x20de\x20l\x27écriture\x20de\x20AndroidManifest.xml:','argv','writeFileSync','primary','Retour','//\x20','exec','join','5078810kWljhp','appDescription','--overwrite','substring','minSdkVersion','</string>\x0a','✓\x20MainActivity.java\x20existant\x20détecté\x20dans\x20le\x20projet\x20—\x20génération\x20automatique\x20évitée','Favoris','log','\x20\x20Package:\x20','metadata.json','\x22>\x0a\x0a\x20\x20\x20\x20<uses-sdk\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:minSdkVersion=\x22','error','\x20-->','✓\x20res/values/colors.xml\x20généré','split','exit','res/values/colors.xml','ERREUR:\x20app-config.json\x20non\x20trouvé\x20!','\x20créée\x22);\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20TextView\x20helloText\x20=\x20(TextView)\x20findViewById(R.id.helloText);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(helloText\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20helloText.setText(R.string.hello_world);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log.d(TAG,\x20\x22Hello\x20World\x20affiché\x22);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(Exception\x20e)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20ignore\x20if\x20ids\x20not\x20present\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a}\x0a','Suivant','</color>\x0a\x20\x20\x20\x20<color\x20name=\x22accent\x22>','\x20\x20-\x20Pour\x20voir\x20tous\x20les\x20backups:\x20node\x20backup-manager.js\x20','utf8','keys','2671991EcMlks',';\x0a\x0aimport\x20android.app.Activity;\x0aimport\x20android.os.Bundle;\x0aimport\x20android.widget.TextView;\x0aimport\x20android.util.Log;\x0a\x0apublic\x20class\x20MainActivity\x20extends\x20Activity\x20{\x0a\x20\x20\x20\x20private\x20static\x20final\x20String\x20TAG\x20=\x20\x22MainActivity\x22;\x0a\x0a\x20\x20\x20\x20@Override\x0a\x20\x20\x20\x20protected\x20void\x20onCreate(Bundle\x20savedInstanceState)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20super.onCreate(savedInstanceState);\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20layout\x20activity_main\x20doit\x20exister\x20dans\x20res/layout\x20pour\x20éviter\x20les\x20NPE\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setContentView(R.layout.activity_main);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(Throwable\x20t)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log.w(TAG,\x20\x22activity_main\x20layout\x20absent:\x20skipping\x20setContentView\x22);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20Log.d(TAG,\x20\x22','chdir','existsSync','toISOString','includes','mkdirSync','<!--\x20','6NQKYFx','Historique','✓\x20Fichiers\x20restaurés\x20depuis\x20le\x20backup!','accent','ERREUR:\x20Aucun\x20backup\x20trouvé!','✓\x20AndroidManifest.xml\x20généré','packageName','\x20\x20-\x20Pour\x20restaurer:\x20node\x20generate-resources.js\x20--restore','AndroidManifest.xml','appName','✓\x20Backup\x20créé\x20dans\x20.backup/','Ouvrir','cwd','--no-backup','612522VpRhyA','\x20\x20✓\x20','dirname','56tksErp','184515qauMMQ','utf-8','277725RSEWae','--force','readdirSync','\x22\x20/>\x0a\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.INTERNET\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.ACCESS_NETWORK_STATE\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.ACCESS_FINE_LOCATION\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.ACCESS_COARSE_LOCATION\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.CAMERA\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.WRITE_EXTERNAL_STORAGE\x22\x20/>\x0a\x20\x20\x20\x20<uses-permission\x20android:name=\x22android.permission.READ_EXTERNAL_STORAGE\x22\x20/>\x0a\x0a\x20\x20\x20\x20<application\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:allowBackup=\x22true\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:icon=\x22@mipmap/ic_launcher\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:label=\x22@string/app_name\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:theme=\x22@style/AppTheme\x22>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<activity\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20android:name=\x22.MainActivity\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20android:label=\x22@string/app_name\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20android:exported=\x22true\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<intent-filter>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<action\x20android:name=\x22android.intent.action.MAIN\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<category\x20android:name=\x22android.intent.category.LAUNCHER\x22\x20/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</intent-filter>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</activity>\x0a\x20\x20\x20\x20</application>\x0a\x0a</manifest>','copyFileSync','appVersion','✓\x20res/values/strings.xml\x20généré','statSync','Paramètres','length','sort','res/values/strings.xml','\x22\x0a\x20\x20\x20\x20android:versionCode=\x221\x22\x0a\x20\x20\x20\x20android:versionName=\x22','ERREUR:\x20Aucun\x20backup\x20disponible!','.java','58233dYhltz','--restore','push','\x20restauré','4UOeNQM','MainActivity.java','\x0apackage\x20','</color>\x0a\x20\x20\x20\x20<color\x20name=\x22primary_dark\x22>','Bienvenue\x20dans\x20','isDirectory','readFileSync','endsWith','<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>\x0a<manifest\x20xmlns:android=\x22http://schemas.android.com/apk/res/android\x22\x0a\x20\x20\x20\x20package=\x22','\x0a✓\x20Toutes\x20les\x20ressources\x20dynamiques\x20générées\x20!','\x0aGestion\x20des\x20backups:','filter','ℹ\x20AndroidManifest.xml\x20déjà\x20présent\x20—\x20génération\x20ignorée\x20(fichier\x20personnalisé\x20détecté)','colors','\x20-->\x0a','src/','\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20android:targetSdkVersion=\x22','stringify','res/values/strings.generated.xml'];a0_0x4ce0=function(){return _0x18f831;};return a0_0x4ce0();}try{const manifestWithHeader=manifestXml['replace'](a0_0x4b9c15(0x11a),a0_0x4b9c15(0x114)+GENERATED_MARKER+'\x20'+new Date()['toISOString']()+'\x20-->');if(!fs[a0_0x4b9c15(0x140)](manifestPath))fs[a0_0x4b9c15(0x11e)](manifestPath,manifestWithHeader,'utf8'),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x14a));else{const existing=fs[a0_0x4b9c15(0xfb)](manifestPath,a0_0x4b9c15(0x13b));forceOverwrite||existing[a0_0x4b9c15(0x142)](GENERATED_MARKER)?(fs[a0_0x4b9c15(0x11e)](manifestPath,manifestWithHeader,'utf8'),console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x14a)+(forceOverwrite?a0_0x4b9c15(0x109):''))):console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x101));}}catch(a0_0x19b522){console[a0_0x4b9c15(0x10c)](a0_0x4b9c15(0x11c),a0_0x19b522[a0_0x4b9c15(0x116)]);}const javaPackage=config[a0_0x4b9c15(0x14b)][a0_0x4b9c15(0x133)]('.')[a0_0x4b9c15(0x123)]('/'),srcPath=a0_0x4b9c15(0x104)+javaPackage;function projectHasActivityInPackage(){const _0x3e3a96=a0_0x4b9c15;if(!fs[_0x3e3a96(0x140)](srcPath))return![];try{const _0x27fc9f=fs[_0x3e3a96(0xe4)](srcPath);for(const _0x26d727 of _0x27fc9f){if(_0x26d727['endsWith'](_0x3e3a96(0xf0))){const _0xadc63e=fs[_0x3e3a96(0xfb)](path[_0x3e3a96(0x123)](srcPath,_0x26d727),_0x3e3a96(0x13b));if(_0x26d727===_0x3e3a96(0xf6)||/extends\s+Activity/[_0x3e3a96(0x10b)](_0xadc63e)||/class\s+MainActivity/['test'](_0xadc63e))return!![];}}}catch(_0x128592){}return![];}if(!projectHasActivityInPackage()){!fs[a0_0x4b9c15(0x140)](srcPath)&&fs[a0_0x4b9c15(0x143)](srcPath,{'recursive':!![]});const mainActivityJava=GENERATED_MARKER+a0_0x4b9c15(0xf7)+config[a0_0x4b9c15(0x14b)]+a0_0x4b9c15(0x13e)+config[a0_0x4b9c15(0x14e)]+a0_0x4b9c15(0x137),mainPath=path[a0_0x4b9c15(0x123)](srcPath,a0_0x4b9c15(0xf6));fs[a0_0x4b9c15(0x11e)](mainPath,mainActivityJava,a0_0x4b9c15(0x13b));try{let mcont=fs[a0_0x4b9c15(0xfb)](mainPath,a0_0x4b9c15(0x13b));!mcont['includes'](GENERATED_MARKER)&&(mcont=a0_0x4b9c15(0x121)+GENERATED_MARKER+'\x20'+new Date()['toISOString']()+'\x0a'+mcont,fs[a0_0x4b9c15(0x11e)](mainPath,mcont,a0_0x4b9c15(0x13b)));}catch(a0_0x578744){}console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x113));}else console[a0_0x4b9c15(0x12c)](a0_0x4b9c15(0x12a));const rJava='package\x20'+config[a0_0x4b9c15(0x14b)]+';\x0a\x0apublic\x20final\x20class\x20R\x20{\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20layout\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20activity_main\x20=\x200x7f040000;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20id\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20helloText\x20=\x200x7f080000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20descriptionText\x20=\x200x7f080001;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20string\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20app_name\x20=\x200x7f0c0000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20hello_world\x20=\x200x7f0c0001;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20app_description\x20=\x200x7f0c0002;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20app_version\x20=\x200x7f0c0003;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20action_settings\x20=\x200x7f0c0004;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20mipmap\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20ic_launcher\x20=\x200x7f060000;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20color\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20primary\x20=\x200x7f030000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20primary_dark\x20=\x200x7f030001;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20accent\x20=\x200x7f030002;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20white\x20=\x200x7f030003;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20black\x20=\x200x7f030004;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20dark_gray\x20=\x200x7f030005;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20light_gray\x20=\x200x7f030006;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20dimen\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20app_bar_height\x20=\x200x7f050000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20fab_margin\x20=\x200x7f050001;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_margin\x20=\x200x7f050002;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20activity_horizontal_margin\x20=\x200x7f050003;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20activity_vertical_margin\x20=\x200x7f050004;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_size_small\x20=\x200x7f050005;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_size_normal\x20=\x200x7f050006;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_size_large\x20=\x200x7f050007;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20text_size_xlarge\x20=\x200x7f050008;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20public\x20static\x20final\x20class\x20style\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20AppTheme\x20=\x200x7f0e0000;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20AppTheme_NoActionBar\x20=\x200x7f0e0001;\x0a\x20\x20\x20\x20\x20\x20\x20\x20public\x20static\x20final\x20int\x20AppTheme_Fullscreen\x20=\x200x7f0e0002;\x0a\x20\x20\x20\x20}\x0a}';function a0_0x1d84(_0x4e2dfd,_0x5b3147){_0x4e2dfd=_0x4e2dfd-0xe3;const _0x4ce06e=a0_0x4ce0();let _0x1d84a6=_0x4ce06e[_0x4e2dfd];return _0x1d84a6;}console['log'](a0_0x4b9c15(0xfe)),console['log'](a0_0x4b9c15(0xff)),console[a0_0x4b9c15(0x12c)]('\x20\x20-\x20Backup\x20créé\x20automatiquement:\x20.backup/[timestamp]/'),console['log'](a0_0x4b9c15(0x14c)),console['log'](a0_0x4b9c15(0x13a)+projectDir);
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ const a0_0xfae0ae=a0_0x24f6;(function(_0x24d44c,_0x525b98){const _0x3a2e49=a0_0x24f6,_0x1b948d=_0x24d44c();while(!![]){try{const _0x2b4d42=-parseInt(_0x3a2e49(0x107))/0x1*(parseInt(_0x3a2e49(0x127))/0x2)+-parseInt(_0x3a2e49(0x12a))/0x3+-parseInt(_0x3a2e49(0x143))/0x4+parseInt(_0x3a2e49(0x13b))/0x5+parseInt(_0x3a2e49(0x110))/0x6+parseInt(_0x3a2e49(0x117))/0x7+-parseInt(_0x3a2e49(0x130))/0x8*(-parseInt(_0x3a2e49(0x132))/0x9);if(_0x2b4d42===_0x525b98)break;else _0x1b948d['push'](_0x1b948d['shift']());}catch(_0x5e0608){_0x1b948d['push'](_0x1b948d['shift']());}}}(a0_0x358f,0x31400));const fs=require('fs'),path=require(a0_0xfae0ae(0x108)),crypto=require(a0_0xfae0ae(0x123)),projectDir=process[a0_0xfae0ae(0x13a)][0x2]||process[a0_0xfae0ae(0x10a)](),command=process[a0_0xfae0ae(0x13a)][0x3]||'list',configPath=path[a0_0xfae0ae(0x122)](projectDir,a0_0xfae0ae(0x144)),buildDir=path[a0_0xfae0ae(0x122)](projectDir,'build'),libsDir=path[a0_0xfae0ae(0x122)](buildDir,a0_0xfae0ae(0x129));!fs[a0_0xfae0ae(0x111)](configPath)&&(console[a0_0xfae0ae(0x100)](a0_0xfae0ae(0x118)),process[a0_0xfae0ae(0x135)](0x1));const appConfig=JSON[a0_0xfae0ae(0x131)](fs[a0_0xfae0ae(0x13f)](configPath,a0_0xfae0ae(0x102)));function a0_0x24f6(_0x5b081a,_0x9f00ca){_0x5b081a=_0x5b081a-0xfe;const _0x358f44=a0_0x358f();let _0x24f67f=_0x358f44[_0x5b081a];return _0x24f67f;}function listDependencies(){const _0x47b5ff=a0_0xfae0ae;console['log'](_0x47b5ff(0x12c));if(!appConfig[_0x47b5ff(0x112)]){console[_0x47b5ff(0x126)](_0x47b5ff(0x134));return;}appConfig['dependencies'][_0x47b5ff(0x105)]&&appConfig[_0x47b5ff(0x112)]['androidx']['length']>0x0&&(console[_0x47b5ff(0x126)](_0x47b5ff(0x11a)),appConfig[_0x47b5ff(0x112)][_0x47b5ff(0x105)][_0x47b5ff(0x139)]((_0x1849bc,_0x2d7e1b)=>{const _0x13fd43=_0x47b5ff;console[_0x13fd43(0x126)]('\x20\x20'+(_0x2d7e1b+0x1)+'.\x20'+_0x1849bc['name']);}),console[_0x47b5ff(0x126)]('')),appConfig['dependencies'][_0x47b5ff(0x136)]&&appConfig[_0x47b5ff(0x112)][_0x47b5ff(0x136)][_0x47b5ff(0x140)]>0x0&&(console[_0x47b5ff(0x126)](_0x47b5ff(0x11b)),appConfig[_0x47b5ff(0x112)]['custom'][_0x47b5ff(0x139)]((_0x4d3337,_0xbf9cb)=>{const _0x57eddf=_0x47b5ff;console[_0x57eddf(0x126)]('\x20\x20'+(_0xbf9cb+0x1)+'.\x20'+_0x4d3337[_0x57eddf(0x13d)]);}),console[_0x47b5ff(0x126)](''));}function checkDownloaded(){const _0x2e53aa=a0_0xfae0ae;console[_0x2e53aa(0x126)]('\x0a✅\x20Vérification\x20des\x20dépendances\x20téléchargées\x0a');if(!fs[_0x2e53aa(0x111)](libsDir)){console['log'](_0x2e53aa(0x119));return;}const _0x5d514e=fs[_0x2e53aa(0x128)](libsDir)[_0x2e53aa(0x10e)](_0x4a704d=>_0x4a704d[_0x2e53aa(0x101)](_0x2e53aa(0x137)));if(_0x5d514e[_0x2e53aa(0x140)]===0x0){console['log'](_0x2e53aa(0x142));return;}console[_0x2e53aa(0x126)]('📥\x20'+_0x5d514e[_0x2e53aa(0x140)]+_0x2e53aa(0x13c)),_0x5d514e[_0x2e53aa(0x139)](_0x2d2cfd=>{const _0x4159c4=_0x2e53aa,_0x537c96=path[_0x4159c4(0x122)](libsDir,_0x2d2cfd),_0x72d1cc=fs['statSync'](_0x537c96),_0x5b0c14=(_0x72d1cc['size']/0x400/0x400)[_0x4159c4(0x11f)](0x2),_0x52e67e=_0x72d1cc[_0x4159c4(0x11c)][_0x4159c4(0x115)](_0x4159c4(0x12e),{'year':'numeric','month':_0x4159c4(0x116),'day':'2-digit','hour':_0x4159c4(0x116),'minute':_0x4159c4(0x116)});console[_0x4159c4(0x126)](_0x4159c4(0x12d)+_0x2d2cfd),console[_0x4159c4(0x126)]('\x20\x20\x20\x20Taille:\x20'+_0x5b0c14+'\x20MB'),console['log'](_0x4159c4(0x10d)+_0x52e67e+'\x0a');});}function a0_0x358f(){const _0x20732c=['statSync','log','146LuOcMs','readdirSync','libs','619431sbIJQT','list','\x0a📦\x20Dépendances\x20déclarées\x20dans\x20app-config.json\x0a','\x20\x20✓\x20','fr-FR','\x20MB)','16NxEKZw','parse','2869884QgsYNQ','Vérification\x20de\x20','\x20\x20Aucune\x20dépendance\x20trouvée','exit','custom','.aar','\x0aUtilitaire\x20de\x20gestion\x20des\x20dépendances\x0a\x0aUtilisation:\x20node\x20manage-dependencies.js\x20/chemin/vers/projet\x20[commande]\x0a\x0aCommandes:\x0a\x20\x20list\x20\x20\x20\x20\x20\x20-\x20Afficher\x20les\x20dépendances\x20déclarées\x20(défaut)\x0a\x20\x20check\x20\x20\x20\x20\x20-\x20Vérifier\x20les\x20dépendances\x20téléchargées\x0a\x20\x20clean\x20\x20\x20\x20\x20-\x20Supprimer\x20tous\x20les\x20AAR\x20téléchargés\x0a\x20\x20verify\x20\x20\x20\x20-\x20Vérifier\x20l\x27intégrité\x20des\x20fichiers\x20AAR\x0a\x20\x20help\x20\x20\x20\x20\x20\x20-\x20Afficher\x20cette\x20aide\x0a\x0aExemples:\x0a\x20\x20node\x20manage-dependencies.js\x20.\x20list\x0a\x20\x20node\x20manage-dependencies.js\x20.\x20check\x0a\x20\x20node\x20manage-dependencies.js\x20.\x20clean\x0a\x20\x20node\x20manage-dependencies.js\x20.\x20verify\x0a\x20\x20\x20\x20','forEach','argv','601580ecEobA','\x20fichier(s)\x20trouvé(s):\x0a','name','verify','readFileSync','length','✓\x20Supprimé:\x20','❌\x20Aucune\x20dépendance\x20téléchargée\x0a','405520iWVgds','app-config.json','Rien\x20à\x20nettoyer\x20(répertoire\x20non\x20trouvé)\x0a','readSync','error','endsWith','utf-8','\x20fichier(s):\x0a','unlinkSync','androidx','Aucune\x20dépendance\x20à\x20vérifier\x0a','5333LksopN','path','\x0a🔍\x20Vérification\x20de\x20l\x27intégrité\x20des\x20dépendances\x0a','cwd','\x20-\x20INVALIDE\x20(format\x20corrompu)','closeSync','\x20\x20\x20\x20Modifié:\x20','filter','size','706320CurRIV','existsSync','dependencies','\x20-\x20Valide\x20(','alloc','toLocaleDateString','2-digit','161742tKciHV','ERREUR:\x20app-config.json\x20non\x20trouvé','❌\x20Aucune\x20dépendance\x20téléchargée\x20(répertoire\x20build/libs/\x20non\x20trouvé)\x0a','📱\x20AndroidX:','📦\x20Personnalisées:','mtime','\x0a✅\x20','Aucune\x20dépendance\x20trouvée\x0a','toFixed','\x20fichier(s)\x20supprimé(s)\x0a','check','join','crypto','\x0a🗑️\x20\x20Nettoyage\x20des\x20dépendances\x0a'];a0_0x358f=function(){return _0x20732c;};return a0_0x358f();}function cleanDependencies(){const _0x43ef95=a0_0xfae0ae;console[_0x43ef95(0x126)](_0x43ef95(0x124));if(!fs[_0x43ef95(0x111)](libsDir)){console[_0x43ef95(0x126)](_0x43ef95(0xfe));return;}const _0x4b2299=fs[_0x43ef95(0x128)](libsDir)[_0x43ef95(0x10e)](_0x530213=>_0x530213[_0x43ef95(0x101)](_0x43ef95(0x137)));if(_0x4b2299[_0x43ef95(0x140)]===0x0){console[_0x43ef95(0x126)]('Rien\x20à\x20nettoyer\x0a');return;}for(const _0x1720ff of _0x4b2299){const _0xf08235=path[_0x43ef95(0x122)](libsDir,_0x1720ff);fs[_0x43ef95(0x104)](_0xf08235),console[_0x43ef95(0x126)](_0x43ef95(0x141)+_0x1720ff);}console[_0x43ef95(0x126)](_0x43ef95(0x11d)+_0x4b2299[_0x43ef95(0x140)]+_0x43ef95(0x120));}function verifiyIntegrity(){const _0x496f0f=a0_0xfae0ae;console[_0x496f0f(0x126)](_0x496f0f(0x109));if(!fs[_0x496f0f(0x111)](libsDir)){console[_0x496f0f(0x126)](_0x496f0f(0x106));return;}const _0xf30ada=fs[_0x496f0f(0x128)](libsDir)[_0x496f0f(0x10e)](_0x77fcd1=>_0x77fcd1[_0x496f0f(0x101)](_0x496f0f(0x137)));if(_0xf30ada[_0x496f0f(0x140)]===0x0){console[_0x496f0f(0x126)](_0x496f0f(0x11e));return;}console[_0x496f0f(0x126)](_0x496f0f(0x133)+_0xf30ada[_0x496f0f(0x140)]+_0x496f0f(0x103)),_0xf30ada[_0x496f0f(0x139)](_0x35b732=>{const _0x1e33cf=_0x496f0f,_0x36db1a=path['join'](libsDir,_0x35b732),_0x5a88d9=fs[_0x1e33cf(0x125)](_0x36db1a),_0x19eb90=Buffer[_0x1e33cf(0x114)](0x4),_0x4336a0=fs['openSync'](_0x36db1a,'r');fs[_0x1e33cf(0xff)](_0x4336a0,_0x19eb90,0x0,0x4,0x0),fs[_0x1e33cf(0x10c)](_0x4336a0);const _0x5a5e2c=_0x19eb90[0x0]===0x50&&_0x19eb90[0x1]===0x4b&&_0x19eb90[0x2]===0x3&&_0x19eb90[0x3]===0x4;_0x5a5e2c?console[_0x1e33cf(0x126)]('✓\x20'+_0x35b732+_0x1e33cf(0x113)+(_0x5a88d9[_0x1e33cf(0x10f)]/0x400/0x400)[_0x1e33cf(0x11f)](0x2)+_0x1e33cf(0x12f)):console[_0x1e33cf(0x126)]('✗\x20'+_0x35b732+_0x1e33cf(0x10b));}),console[_0x496f0f(0x126)]('');}function showHelp(){const _0x331e7a=a0_0xfae0ae;console[_0x331e7a(0x126)](_0x331e7a(0x138));}switch(command['toLowerCase']()){case a0_0xfae0ae(0x12b):listDependencies();break;case a0_0xfae0ae(0x121):checkDownloaded();break;case'clean':cleanDependencies();break;case a0_0xfae0ae(0x13e):verifiyIntegrity();break;case'help':showHelp();break;default:listDependencies();}