devicely 2.2.12 → 2.2.13

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 (63) hide show
  1. package/README.md +182 -81
  2. package/bin/devicely.js +1 -1
  3. package/config/devices.conf +2 -2
  4. package/lib/.logging-backup/aiProviders.js.backup +654 -0
  5. package/lib/.logging-backup/appMappings.js.backup +337 -0
  6. package/lib/.logging-backup/commanderService.js.backup +4427 -0
  7. package/lib/.logging-backup/devices.js.backup +54 -0
  8. package/lib/.logging-backup/doctor.js.backup +94 -0
  9. package/lib/.logging-backup/encryption.js.backup +61 -0
  10. package/lib/.logging-backup/executor.js.backup +104 -0
  11. package/lib/.logging-backup/hybridAI.js.backup +154 -0
  12. package/lib/.logging-backup/intelligentLocatorService.js.backup +1541 -0
  13. package/lib/.logging-backup/locatorStrategy.js.backup +342 -0
  14. package/lib/.logging-backup/scriptLoader.js.backup +13 -0
  15. package/lib/.logging-backup/server.js.backup +6298 -0
  16. package/lib/.logging-backup/tensorflowAI.js.backup +714 -0
  17. package/lib/.logging-backup/universalSessionManager.js.backup +370 -0
  18. package/lib/.logging-enhanced-backup/server.js.enhanced-backup +6298 -0
  19. package/lib/advanced-logger.js +1 -0
  20. package/lib/aiProviders.js +154 -15
  21. package/lib/aiProviders.js.strategic-backup +657 -0
  22. package/lib/aiProvidersConfig.js +61 -151
  23. package/lib/aiProvidersConfig.js.backup +218 -0
  24. package/lib/androidDeviceDetection.js +1 -1
  25. package/lib/appMappings.js +1 -1
  26. package/lib/commanderService.js +1 -1
  27. package/lib/commanderService.js.backup +5552 -0
  28. package/lib/deviceDetection.js +1 -1
  29. package/lib/devices.js +1 -1
  30. package/lib/devices.js.strategic-backup +57 -0
  31. package/lib/doctor.js +1 -1
  32. package/lib/encryption.js +1 -1
  33. package/lib/encryption.js.strategic-backup +61 -0
  34. package/lib/executor.js +1 -1
  35. package/lib/executor.js.strategic-backup +107 -0
  36. package/lib/frontend/asset-manifest.json +5 -3
  37. package/lib/frontend/index.html +1 -1
  38. package/lib/hybridAI.js +1 -0
  39. package/lib/intelligentLocatorService.js +1 -0
  40. package/lib/lightweightAI.js +1 -0
  41. package/lib/localBuiltInAI.js +1 -0
  42. package/lib/localBuiltInAI_backup.js +1 -0
  43. package/lib/localBuiltInAI_simple.js +1 -0
  44. package/lib/locatorStrategy.js +1 -1
  45. package/lib/logger-demo.js +2 -0
  46. package/lib/logger-integration-examples.js +102 -0
  47. package/lib/logger.js +1 -1
  48. package/lib/package.json +5 -0
  49. package/lib/public/asset-manifest.json +3 -3
  50. package/lib/public/index.html +1 -1
  51. package/lib/quick-start-logger.js +2 -0
  52. package/lib/scriptLoader.js +1 -1
  53. package/lib/server.js +1 -1
  54. package/lib/server.js.strategic-backup +6298 -0
  55. package/lib/tensorflowAI.js +1 -0
  56. package/lib/tensorflowAI.js.strategic-backup +717 -0
  57. package/lib/tinyAI.js +1 -0
  58. package/lib/universalSessionManager.js +1 -0
  59. package/package.json +1 -1
  60. package/scripts/shell/android_device_control.enc +1 -1
  61. package/scripts/shell/connect_ios_usb_multi_final.enc +1 -1
  62. package/scripts/shell/connect_ios_wireless_multi_final.enc +1 -1
  63. package/lib/public/index.html.bak +0 -1
@@ -0,0 +1,337 @@
1
+ // Platform-specific app package mappings
2
+ // Maps common app names to their actual package IDs for iOS and Android
3
+
4
+ const APP_MAPPINGS = {
5
+ // Browsers
6
+ safari: {
7
+ ios: 'com.apple.mobilesafari',
8
+ android: null
9
+ },
10
+ chrome: {
11
+ ios: 'com.google.chrome.ios',
12
+ android: 'com.android.chrome'
13
+ },
14
+ firefox: {
15
+ ios: 'org.mozilla.ios.Firefox',
16
+ android: 'org.mozilla.firefox'
17
+ },
18
+ edge: {
19
+ ios: 'com.microsoft.msedge',
20
+ android: 'com.microsoft.emmx'
21
+ },
22
+ brave: {
23
+ ios: 'com.brave.ios.browser',
24
+ android: 'com.brave.browser'
25
+ },
26
+ opera: {
27
+ ios: 'com.opera.OperaTouch',
28
+ android: 'com.opera.browser'
29
+ },
30
+
31
+ // System Apps
32
+ settings: {
33
+ ios: 'com.apple.Preferences',
34
+ android: 'com.android.settings'
35
+ },
36
+ camera: {
37
+ ios: 'com.apple.camera',
38
+ android: 'com.android.camera2'
39
+ },
40
+ photos: {
41
+ ios: 'com.apple.mobileslideshow',
42
+ android: 'com.google.android.apps.photos'
43
+ },
44
+ gallery: {
45
+ ios: 'com.apple.mobileslideshow',
46
+ android: 'com.google.android.apps.photos'
47
+ },
48
+ messages: {
49
+ ios: 'com.apple.MobileSMS',
50
+ android: 'com.google.android.apps.messaging'
51
+ },
52
+ phone: {
53
+ ios: 'com.apple.mobilephone',
54
+ android: 'com.google.android.dialer'
55
+ },
56
+ contacts: {
57
+ ios: 'com.apple.MobileAddressBook',
58
+ android: 'com.google.android.contacts'
59
+ },
60
+ calendar: {
61
+ ios: 'com.apple.mobilecal',
62
+ android: 'com.google.android.calendar'
63
+ },
64
+ clock: {
65
+ ios: 'com.apple.mobiletimer',
66
+ android: 'com.google.android.deskclock'
67
+ },
68
+ calculator: {
69
+ ios: 'com.apple.calculator',
70
+ android: 'com.google.android.calculator'
71
+ },
72
+ notes: {
73
+ ios: 'com.apple.mobilenotes',
74
+ android: 'com.google.android.keep'
75
+ },
76
+ mail: {
77
+ ios: 'com.apple.mobilemail',
78
+ android: 'com.google.android.gm'
79
+ },
80
+ gmail: {
81
+ ios: 'com.google.Gmail',
82
+ android: 'com.google.android.gm'
83
+ },
84
+ maps: {
85
+ ios: 'com.apple.Maps',
86
+ android: 'com.google.android.apps.maps'
87
+ },
88
+
89
+ // Social Media
90
+ facebook: {
91
+ ios: 'com.facebook.Facebook',
92
+ android: 'com.facebook.katana'
93
+ },
94
+ instagram: {
95
+ ios: 'com.burbn.instagram',
96
+ android: 'com.instagram.android'
97
+ },
98
+ twitter: {
99
+ ios: 'com.atebits.Tweetie2',
100
+ android: 'com.twitter.android'
101
+ },
102
+ x: {
103
+ ios: 'com.atebits.Tweetie2',
104
+ android: 'com.twitter.android'
105
+ },
106
+ whatsapp: {
107
+ ios: 'net.whatsapp.WhatsApp',
108
+ android: 'com.whatsapp'
109
+ },
110
+ telegram: {
111
+ ios: 'ph.telegra.Telegraph',
112
+ android: 'org.telegram.messenger'
113
+ },
114
+ snapchat: {
115
+ ios: 'com.toyopagroup.picaboo',
116
+ android: 'com.snapchat.android'
117
+ },
118
+ tiktok: {
119
+ ios: 'com.zhiliaoapp.musically',
120
+ android: 'com.zhiliaoapp.musically'
121
+ },
122
+ linkedin: {
123
+ ios: 'com.linkedin.LinkedIn',
124
+ android: 'com.linkedin.android'
125
+ },
126
+ reddit: {
127
+ ios: 'com.reddit.Reddit',
128
+ android: 'com.reddit.frontpage'
129
+ },
130
+
131
+ // Entertainment
132
+ youtube: {
133
+ ios: 'com.google.ios.youtube',
134
+ android: 'com.google.android.youtube'
135
+ },
136
+ netflix: {
137
+ ios: 'com.netflix.Netflix',
138
+ android: 'com.netflix.mediaclient'
139
+ },
140
+ spotify: {
141
+ ios: 'com.spotify.client',
142
+ android: 'com.spotify.music'
143
+ },
144
+ amazonmusic: {
145
+ ios: 'com.amazon.mp3',
146
+ android: 'com.amazon.mp3'
147
+ },
148
+ applemusic: {
149
+ ios: 'com.apple.Music',
150
+ android: 'com.apple.android.music'
151
+ },
152
+ hulu: {
153
+ ios: 'com.hulu.plus',
154
+ android: 'com.hulu.plus'
155
+ },
156
+ disneyplus: {
157
+ ios: 'com.disney.disneyplus',
158
+ android: 'com.disney.disneyplus'
159
+ },
160
+ primevideo: {
161
+ ios: 'com.amazon.aiv.AIVApp',
162
+ android: 'com.amazon.avod.thirdpartyclient'
163
+ },
164
+
165
+ // Communication
166
+ zoom: {
167
+ ios: 'us.zoom.videomeetings',
168
+ android: 'us.zoom.videomeetings'
169
+ },
170
+ skype: {
171
+ ios: 'com.skype.skype',
172
+ android: 'com.skype.raider'
173
+ },
174
+ teams: {
175
+ ios: 'com.microsoft.skype.teams',
176
+ android: 'com.microsoft.teams'
177
+ },
178
+ slack: {
179
+ ios: 'com.tinyspeck.chatlyio',
180
+ android: 'com.Slack'
181
+ },
182
+ discord: {
183
+ ios: 'com.hammerandchisel.discord',
184
+ android: 'com.discord'
185
+ },
186
+
187
+ // Productivity
188
+ gmail: {
189
+ ios: 'com.google.Gmail',
190
+ android: 'com.google.android.gm'
191
+ },
192
+ outlook: {
193
+ ios: 'com.microsoft.Office.Outlook',
194
+ android: 'com.microsoft.office.outlook'
195
+ },
196
+ googledrive: {
197
+ ios: 'com.google.Drive',
198
+ android: 'com.google.android.apps.docs'
199
+ },
200
+ dropbox: {
201
+ ios: 'com.getdropbox.Dropbox',
202
+ android: 'com.dropbox.android'
203
+ },
204
+ onedrive: {
205
+ ios: 'com.microsoft.skydrive',
206
+ android: 'com.microsoft.skydrive'
207
+ },
208
+ notion: {
209
+ ios: 'notion.id',
210
+ android: 'notion.id'
211
+ },
212
+ evernote: {
213
+ ios: 'com.evernote.iPhone.Evernote',
214
+ android: 'com.evernote'
215
+ },
216
+
217
+ // Shopping
218
+ amazon: {
219
+ ios: 'com.amazon.Amazon',
220
+ android: 'com.amazon.mShop.android.shopping'
221
+ },
222
+ ebay: {
223
+ ios: 'com.ebay.iphone',
224
+ android: 'com.ebay.mobile'
225
+ },
226
+ walmart: {
227
+ ios: 'com.walmart.groceries',
228
+ android: 'com.walmart.android'
229
+ },
230
+ target: {
231
+ ios: 'com.target.mobile',
232
+ android: 'com.target.ui'
233
+ },
234
+
235
+ // Travel
236
+ uber: {
237
+ ios: 'com.ubercab.UberClient',
238
+ android: 'com.ubercab'
239
+ },
240
+ lyft: {
241
+ ios: 'com.ubercab.Lyft',
242
+ android: 'me.lyft.android'
243
+ },
244
+ airbnb: {
245
+ ios: 'com.airbnb.app',
246
+ android: 'com.airbnb.android'
247
+ },
248
+ booking: {
249
+ ios: 'com.booking.BookingApp',
250
+ android: 'com.booking'
251
+ },
252
+
253
+ // Finance
254
+ paypal: {
255
+ ios: 'com.yourcompany.PPClient',
256
+ android: 'com.paypal.android.p2pmobile'
257
+ },
258
+ venmo: {
259
+ ios: 'com.venmo.touch.Venmo',
260
+ android: 'com.venmo'
261
+ },
262
+ cashapp: {
263
+ ios: 'com.squareup.cash',
264
+ android: 'com.squareup.cash'
265
+ }
266
+ };
267
+
268
+ /**
269
+ * Get package ID for an app based on platform
270
+ * @param {string} appName - Common name of the app (e.g., 'chrome', 'settings')
271
+ * @param {string} platform - 'ios' or 'android'
272
+ * @returns {string|null} - Package ID or null if not found
273
+ */
274
+ function getPackageId(appName, platform) {
275
+ const normalizedName = appName.toLowerCase().trim();
276
+ const mapping = APP_MAPPINGS[normalizedName];
277
+
278
+ if (!mapping) {
279
+ return null;
280
+ }
281
+
282
+ return mapping[platform] || null;
283
+ }
284
+
285
+ /**
286
+ * Get all available apps for a platform
287
+ * @param {string} platform - 'ios' or 'android'
288
+ * @returns {Array} - Array of app objects with name and packageId
289
+ */
290
+ function getAvailableApps(platform) {
291
+ const apps = [];
292
+
293
+ for (const [appName, mapping] of Object.entries(APP_MAPPINGS)) {
294
+ if (mapping[platform]) {
295
+ apps.push({
296
+ name: appName,
297
+ packageId: mapping[platform]
298
+ });
299
+ }
300
+ }
301
+
302
+ return apps;
303
+ }
304
+
305
+ /**
306
+ * Check if an app is available for a platform
307
+ * @param {string} appName - Common name of the app
308
+ * @param {string} platform - 'ios' or 'android'
309
+ * @returns {boolean}
310
+ */
311
+ function isAppAvailable(appName, platform) {
312
+ return getPackageId(appName, platform) !== null;
313
+ }
314
+
315
+ /**
316
+ * Get platform-specific launch command
317
+ * @param {string} appName - Common name of the app
318
+ * @param {string} platform - 'ios' or 'android'
319
+ * @returns {string|null} - Launch command or null if not found
320
+ */
321
+ function getLaunchCommand(appName, platform) {
322
+ const packageId = getPackageId(appName, platform);
323
+
324
+ if (!packageId) {
325
+ return null;
326
+ }
327
+
328
+ return `launch ${packageId}`;
329
+ }
330
+
331
+ module.exports = {
332
+ APP_MAPPINGS,
333
+ getPackageId,
334
+ getAvailableApps,
335
+ isAppAvailable,
336
+ getLaunchCommand
337
+ };