esoftplay 0.0.267 → 0.0.268-2e1c120
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/assets/plugins/withAndroidPermissionsFix.js +37 -0
- package/bin/build.js +19 -2
- package/bin/cli.js +1 -0
- package/modules/lib/crypt.js +22340 -2
- package/modules/sys/mmkv.ts +5 -3
- package/modules/sys/storage.ts +82 -53
- package/package.json +1 -1
- package/publisher.js +4 -8
- package/publisher_beta.js +12 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const { withAndroidManifest } = require('@expo/config-plugins');
|
|
2
|
+
|
|
3
|
+
module.exports = function withAndroidPermissionsFix(config) {
|
|
4
|
+
return withAndroidManifest(config, async (config) => {
|
|
5
|
+
const manifest = config.modResults.manifest;
|
|
6
|
+
|
|
7
|
+
// 1. Ensure the 'tools' namespace exists in the <manifest> tag
|
|
8
|
+
manifest.$['xmlns:tools'] = 'http://schemas.android.com/tools';
|
|
9
|
+
|
|
10
|
+
// 2. Find or create the READ_MEDIA_IMAGES permission entry
|
|
11
|
+
if (!manifest['uses-permission']) {
|
|
12
|
+
manifest['uses-permission'] = [];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const permissionName = 'android.permission.READ_MEDIA_IMAGES';
|
|
16
|
+
const existingPermission = manifest['uses-permission'].find(
|
|
17
|
+
(p) => p.$['android:name'] === permissionName
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
if (existingPermission) {
|
|
21
|
+
// Update existing entry to include the replace rule
|
|
22
|
+
existingPermission.$['android:maxSdkVersion'] = '34';
|
|
23
|
+
existingPermission.$['tools:replace'] = 'android:maxSdkVersion';
|
|
24
|
+
} else {
|
|
25
|
+
// Add new entry if it doesn't exist
|
|
26
|
+
manifest['uses-permission'].push({
|
|
27
|
+
$: {
|
|
28
|
+
'android:name': permissionName,
|
|
29
|
+
'android:maxSdkVersion': '34',
|
|
30
|
+
'tools:replace': 'android:maxSdkVersion',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return config;
|
|
36
|
+
});
|
|
37
|
+
};
|
package/bin/build.js
CHANGED
|
@@ -6,6 +6,7 @@ const DIR = "../../"
|
|
|
6
6
|
const packjson = DIR + "package.json"
|
|
7
7
|
const appjson = DIR + "app.json"
|
|
8
8
|
const easjson = DIR + "eas.json"
|
|
9
|
+
const metroconfigjs = DIR + "metro.config.js"
|
|
9
10
|
const confjson = DIR + "config.json"
|
|
10
11
|
const conflivejson = DIR + "config.live.json"
|
|
11
12
|
const gitignore = DIR + ".gitignore"
|
|
@@ -40,7 +41,8 @@ if (fs.existsSync(packjson)) {
|
|
|
40
41
|
|
|
41
42
|
if (args[0] == "install") {
|
|
42
43
|
$package.scripts.start = "esp start && bunx expo start --dev-client"
|
|
43
|
-
$package.trustedDependencies
|
|
44
|
+
const existedTrustedDependencies = $package.trustedDependencies
|
|
45
|
+
const trustedDependencies = [
|
|
44
46
|
"esoftplay",
|
|
45
47
|
"esoftplay-android-print",
|
|
46
48
|
"esoftplay-chatting",
|
|
@@ -54,6 +56,7 @@ if (fs.existsSync(packjson)) {
|
|
|
54
56
|
"esoftplay-web",
|
|
55
57
|
"esoftplay-web-pwa"
|
|
56
58
|
]
|
|
59
|
+
$package.trustedDependencies = trustedDependencies.concat(existedTrustedDependencies || []).reduce((acc, item) => acc.includes(item) ? acc : [...acc, item], []);
|
|
57
60
|
writeFileSyncWithLog(packjson, JSON.stringify($package, null, 2));
|
|
58
61
|
}
|
|
59
62
|
|
|
@@ -142,6 +145,7 @@ if (fs.existsSync(packjson)) {
|
|
|
142
145
|
"./raw/plugins/heapSize",
|
|
143
146
|
"./raw/plugins/fcmIcon",
|
|
144
147
|
"./raw/plugins/noDarkAndroid",
|
|
148
|
+
"./raw/plugins/withAndroidPermissionsFix",
|
|
145
149
|
"./raw/plugins/withAndroidVerifiedLinksWorkaround",
|
|
146
150
|
]
|
|
147
151
|
|
|
@@ -216,6 +220,19 @@ if (fs.existsSync(packjson)) {
|
|
|
216
220
|
|
|
217
221
|
writeFileSyncWithLog(easjson, easconfg);
|
|
218
222
|
|
|
223
|
+
|
|
224
|
+
const metroConfig = `// Learn more https://docs.expo.io/guides/customizing-metro
|
|
225
|
+
const { getDefaultConfig } = require('expo/metro-config');
|
|
226
|
+
const { wrapWithReanimatedMetroConfig } = require('react-native-reanimated/metro-config');
|
|
227
|
+
|
|
228
|
+
/** @type {import('expo/metro-config').MetroConfig} */
|
|
229
|
+
const config = getDefaultConfig(__dirname);
|
|
230
|
+
|
|
231
|
+
module.exports = wrapWithReanimatedMetroConfig(config);
|
|
232
|
+
`;
|
|
233
|
+
writeFileSyncWithLog(metroconfigjs, metroConfig)
|
|
234
|
+
|
|
235
|
+
|
|
219
236
|
const babelconf = `module.exports = function (api) {
|
|
220
237
|
api.cache(true);
|
|
221
238
|
let plugins = []
|
|
@@ -336,7 +353,7 @@ export default function App() {
|
|
|
336
353
|
'react-native-mmkv',
|
|
337
354
|
'react-native-reanimated',
|
|
338
355
|
'react-native-safe-area-context',
|
|
339
|
-
"react-native-worklets",
|
|
356
|
+
// "react-native-worklets",
|
|
340
357
|
'react-native-screens',
|
|
341
358
|
'react-native-webview',
|
|
342
359
|
'shorthash',
|
package/bin/cli.js
CHANGED
|
@@ -27,6 +27,7 @@ var args = process.argv.slice(2);
|
|
|
27
27
|
|
|
28
28
|
// console.log(modpath, "sdofsjdofjsd")
|
|
29
29
|
async function execution() {
|
|
30
|
+
command('bun ./node_modules/esoftplay/bin/connector.js')
|
|
30
31
|
const preload = await preload_api()
|
|
31
32
|
console.log("PRELOAD", preload)
|
|
32
33
|
if (preload) {
|