esoftplay 0.0.253 → 0.0.255
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/build.js +1 -1
- package/bin/files.ts +4 -1
- package/modules/sys/esp.ts +12 -13
- package/package.json +1 -1
package/bin/build.js
CHANGED
|
@@ -221,7 +221,7 @@ if (fs.existsSync(packjson)) {
|
|
|
221
221
|
const babelconf = `module.exports = function (api) {
|
|
222
222
|
api.cache(true);
|
|
223
223
|
let plugins = []
|
|
224
|
-
plugins.push("react-native-reanimated/plugin")
|
|
224
|
+
//plugins.push("react-native-reanimated/plugin")
|
|
225
225
|
return {
|
|
226
226
|
presets: ["babel-preset-expo"],
|
|
227
227
|
plugins
|
package/bin/files.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
let packagejson = require('../../../package.json');
|
|
2
2
|
let appjson = require('../../../app.json');
|
|
3
|
+
let configjson = require('../../../config.json');
|
|
4
|
+
let configlivejson = require('../../../config.live.json');
|
|
5
|
+
|
|
6
|
+
export { appjson, configjson, configlivejson, packagejson };
|
|
3
7
|
|
|
4
|
-
export { appjson, packagejson };
|
package/modules/sys/esp.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
//noPage
|
|
2
2
|
|
|
3
|
+
import { appjson, configjson, configlivejson } from 'esoftplay/bin/files';
|
|
3
4
|
import { EspAssets } from 'esoftplay/cache/assets';
|
|
4
5
|
import cacheConfig from 'esoftplay/cache/config.json';
|
|
5
6
|
import { LibLocale } from 'esoftplay/cache/lib/locale/import';
|
|
@@ -41,20 +42,18 @@ console.warn = (...arg) => {
|
|
|
41
42
|
};
|
|
42
43
|
LogBox.ignoreLogs(ignoreWarns);
|
|
43
44
|
|
|
44
|
-
let app = require('../../../../app.json');
|
|
45
|
-
let conf = require('../../../../config.json');
|
|
46
45
|
if (!__DEV__) {
|
|
47
46
|
if (Platform.OS == 'web') {
|
|
48
|
-
|
|
47
|
+
configjson.config.domain = window.location.hostname
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
let lconf: any
|
|
52
51
|
try {
|
|
53
|
-
lconf =
|
|
52
|
+
lconf = configlivejson;
|
|
54
53
|
} catch (error) {
|
|
55
54
|
|
|
56
55
|
}
|
|
57
|
-
if (
|
|
56
|
+
if (configjson?.config?.isDebug == 0)
|
|
58
57
|
LogBox.ignoreAllLogs();
|
|
59
58
|
/** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/esp.md) untuk melihat dokumentasi*/
|
|
60
59
|
const esp = {
|
|
@@ -81,10 +80,10 @@ const esp = {
|
|
|
81
80
|
return target;
|
|
82
81
|
},
|
|
83
82
|
appjson(): any {
|
|
84
|
-
return esp.mergeDeep(
|
|
83
|
+
return esp.mergeDeep(appjson, configjson)
|
|
85
84
|
},
|
|
86
85
|
assets(path: EspAssets): any {
|
|
87
|
-
const _assets = require('
|
|
86
|
+
const _assets = require('esoftplay/cache/assets')
|
|
88
87
|
return _assets(path)
|
|
89
88
|
},
|
|
90
89
|
versionName(): string {
|
|
@@ -110,7 +109,7 @@ const esp = {
|
|
|
110
109
|
if (!lconf) {
|
|
111
110
|
return false
|
|
112
111
|
}
|
|
113
|
-
return
|
|
112
|
+
return configjson.config.domain != lconf.config.domain
|
|
114
113
|
},
|
|
115
114
|
readDeepObj(obj: any) {
|
|
116
115
|
return function (param?: string, ...params: string[]): any {
|
|
@@ -156,7 +155,7 @@ const esp = {
|
|
|
156
155
|
if (modtast[1] == "") {
|
|
157
156
|
modtast[1] = "index";
|
|
158
157
|
}
|
|
159
|
-
const routers = require('
|
|
158
|
+
const routers = require('esoftplay/cache/routers')
|
|
160
159
|
return routers(modtast.join("/"));
|
|
161
160
|
},
|
|
162
161
|
modProp<T extends keyof EspRouterPropertyInterface>(path: T): EspRouterPropertyInterface[T] {
|
|
@@ -164,11 +163,11 @@ const esp = {
|
|
|
164
163
|
if (modtast[1] == "") {
|
|
165
164
|
modtast[1] = "index";
|
|
166
165
|
}
|
|
167
|
-
const properties = require('
|
|
166
|
+
const properties = require('esoftplay/cache/properties')
|
|
168
167
|
return properties(modtast.join("/"));
|
|
169
168
|
},
|
|
170
169
|
_config(): typeof cacheConfig {
|
|
171
|
-
app = esp.mergeDeep(
|
|
170
|
+
let app = esp.mergeDeep(appjson, configjson)
|
|
172
171
|
var msg = ''
|
|
173
172
|
if (!app.hasOwnProperty('config')) {
|
|
174
173
|
msg = "tidak ada config"
|
|
@@ -214,7 +213,7 @@ const esp = {
|
|
|
214
213
|
return config;
|
|
215
214
|
},
|
|
216
215
|
navigations(): string[] {
|
|
217
|
-
const navs = require('
|
|
216
|
+
const navs = require('esoftplay/cache/navs').default
|
|
218
217
|
return navs;
|
|
219
218
|
},
|
|
220
219
|
home(): any {
|
|
@@ -225,7 +224,7 @@ const esp = {
|
|
|
225
224
|
return UserRoutes.state().get();
|
|
226
225
|
},
|
|
227
226
|
log(message?: any, ...optionalParams: any[]) {
|
|
228
|
-
if (esp.config(
|
|
227
|
+
if (esp.config()?.isDebug == 1) {
|
|
229
228
|
let out = [message]
|
|
230
229
|
if (optionalParams)
|
|
231
230
|
out.push(...optionalParams)
|