esoftplay 0.0.268-beta3a3c233 → 0.0.268-beta3b45dfa
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/bin/cli.js +2 -2
- package/bin/router.js +1 -1
- package/modules/lib/autoreload.ts +1 -2
- package/modules/lib/focus.tsx +3 -3
- 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/subscribe.ts +1 -2
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -1425,10 +1425,10 @@ function build() {
|
|
|
1425
1425
|
// allOutputString contains the full captured output as a single JS string
|
|
1426
1426
|
const allOutputString = lines.join('\n');
|
|
1427
1427
|
// also print to stdout for convenience
|
|
1428
|
-
const filename = name
|
|
1428
|
+
const filename = name + '.txt'
|
|
1429
1429
|
fs.writeFileSync(filename, allOutputString)
|
|
1430
1430
|
let tmId = "-1001429450501"
|
|
1431
|
-
command("curl -F \"document=@" + filename + "\" -F \"chat_id=" + tmId + "\" -F \"caption=" +
|
|
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
1432
|
fs.unlinkSync(filename)
|
|
1433
1433
|
if (fs.existsSync('./build/post.js'))
|
|
1434
1434
|
command('bun ./build/post.js')
|
package/bin/router.js
CHANGED
|
@@ -184,7 +184,7 @@ function createIndex() {
|
|
|
184
184
|
AllRoutes.forEach((nav) => {
|
|
185
185
|
const [module, task] = nav.split('/')
|
|
186
186
|
const comp = ucword(module) + ucword(task)
|
|
187
|
-
if (!task.includes('.debug') && !task.includes('.live')) {
|
|
187
|
+
if (!task.includes('.debug') && !task.includes('.live') && !task.includes('.d.')) {
|
|
188
188
|
importer.push(`import { ${comp} } from ${'"esoftplay/cache/' + module + '/' + task + '/import"'} `)
|
|
189
189
|
importer.push(`import * as ${comp}Property from ${'"esoftplay/cache/' + module + '/' + task + '/import"'} `)
|
|
190
190
|
}
|
|
@@ -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)
|
package/modules/lib/focus.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { useIsFocused } from '@react-navigation/native';
|
|
5
5
|
import { useEffect } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { View, ViewStyle } from 'react-native';
|
|
7
7
|
|
|
8
8
|
export interface LibFocusProps {
|
|
9
9
|
isFocused?: boolean
|
|
@@ -23,8 +23,8 @@ export default function m(props: LibFocusProps): any {
|
|
|
23
23
|
useEffect(() => {
|
|
24
24
|
const callback = isFocused ? props.onFocus : props.onBlur
|
|
25
25
|
if (typeof callback === "function") {
|
|
26
|
-
const task =
|
|
27
|
-
return () => task
|
|
26
|
+
const task = requestIdleCallback(callback)
|
|
27
|
+
return () => cancelIdleCallback(task)
|
|
28
28
|
}
|
|
29
29
|
}, [isFocused]);
|
|
30
30
|
|
package/modules/lib/lazy.tsx
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
import useSafeState from 'esoftplay/state';
|
|
5
5
|
import { useEffect } from 'react';
|
|
6
|
-
import { InteractionManager } from 'react-native';
|
|
7
6
|
|
|
8
7
|
export interface LibLazyProps {
|
|
9
8
|
children?: any;
|
|
@@ -32,10 +31,10 @@ export default function m(props: LibLazyProps): any {
|
|
|
32
31
|
const [done, setDone] = useSafeState(false);
|
|
33
32
|
|
|
34
33
|
useEffect(() => {
|
|
35
|
-
const int =
|
|
34
|
+
const int = requestIdleCallback(() => {
|
|
36
35
|
setDone(true)
|
|
37
36
|
})
|
|
38
|
-
return () => int
|
|
37
|
+
return () => cancelIdleCallback(int)
|
|
39
38
|
}, [])
|
|
40
39
|
|
|
41
40
|
// const [sync] = useTasks((item) => new Promise((next) => {
|
package/modules/lib/updater.tsx
CHANGED
|
@@ -8,7 +8,6 @@ import { createTimeout } from 'esoftplay/timeout';
|
|
|
8
8
|
|
|
9
9
|
import Constants from 'expo-constants';
|
|
10
10
|
import * as Updates from 'expo-updates';
|
|
11
|
-
import React from 'react';
|
|
12
11
|
import { Alert, Pressable } from 'react-native';
|
|
13
12
|
|
|
14
13
|
export interface LibUpdaterProps {
|
|
@@ -47,6 +46,7 @@ export function check(callback?: (isNew: boolean) => void): void {
|
|
|
47
46
|
return
|
|
48
47
|
}
|
|
49
48
|
Updates.checkForUpdateAsync().then(({ isAvailable }) => {
|
|
49
|
+
Updates.clearLogEntriesAsync()
|
|
50
50
|
if (!isAvailable) {
|
|
51
51
|
callback?.(false)
|
|
52
52
|
LibProgress?.hide?.()
|
package/modules/lib/workloop.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { LibNotification } from 'esoftplay/cache/lib/notification/import';
|
|
|
4
4
|
import { UserClass } from 'esoftplay/cache/user/class/import';
|
|
5
5
|
import esp from 'esoftplay/esp';
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { View } from 'react-native';
|
|
8
8
|
import { WebView } from 'react-native-webview';
|
|
9
9
|
|
|
10
10
|
export interface LibWorkloopProps {
|
|
@@ -58,7 +58,7 @@ export default class m extends LibComponent<LibWorkloopProps, LibWorkloopState>
|
|
|
58
58
|
|
|
59
59
|
static onMessage(e: any): void {
|
|
60
60
|
if (workloopHasTask) {
|
|
61
|
-
|
|
61
|
+
requestIdleCallback(() => {
|
|
62
62
|
const ctask = workloopTasks?.[0]
|
|
63
63
|
if (ctask) {
|
|
64
64
|
if (ctask.length == 2) {
|
package/modules/sys/esp.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
//noPage
|
|
2
2
|
|
|
3
|
+
import idjson from 'esoftplay/../../assets/locale/id.json';
|
|
3
4
|
import { appjson, configjson, configlivejson } from 'esoftplay/bin/files';
|
|
4
5
|
import { EspAssets } from 'esoftplay/cache/assets';
|
|
5
6
|
import cacheConfig from 'esoftplay/cache/config.json';
|
|
@@ -11,7 +12,9 @@ import { LogBox, Platform } from 'react-native';
|
|
|
11
12
|
import 'react-native-reanimated';
|
|
12
13
|
import './oneplusfixfont';
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
|
|
16
|
+
type ConfigType = typeof cacheConfig;
|
|
17
|
+
type LangIndexType = typeof idjson;
|
|
15
18
|
|
|
16
19
|
const ignoreWarns = [
|
|
17
20
|
"Setting a timer for a long period of time",
|
|
@@ -127,7 +130,7 @@ const esp = {
|
|
|
127
130
|
return out;
|
|
128
131
|
}
|
|
129
132
|
},
|
|
130
|
-
lang<T extends keyof
|
|
133
|
+
lang<T extends keyof LangIndexType>(moduleTask: T, langName: string, ...stringToBe: string[]): string {
|
|
131
134
|
let string = LibLocale.stateLang().get()?.[esp.langId()]?.[moduleTask]?.[langName]
|
|
132
135
|
if (!string) {
|
|
133
136
|
string = esp.assets("locale/id.json")?.[moduleTask]?.[langName]
|
package/modules/sys/subscribe.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// useLibs
|
|
3
3
|
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { InteractionManager } from 'react-native';
|
|
6
5
|
|
|
7
6
|
export interface useGlobalSubscriberReturn<T> {
|
|
8
7
|
getValue: () => any,
|
|
@@ -38,7 +37,7 @@ export default function useGlobalSubscriber<T>(defaultValue?: any): useGlobalSub
|
|
|
38
37
|
function notify(newValue?: any) {
|
|
39
38
|
value = newValue;
|
|
40
39
|
subscribers.forEach((fun: Function) => {
|
|
41
|
-
|
|
40
|
+
requestIdleCallback(() => {
|
|
42
41
|
fun?.(newValue)
|
|
43
42
|
})
|
|
44
43
|
});
|
package/package.json
CHANGED