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 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 };
@@ -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
- conf.config.domain = window.location.hostname
47
+ configjson.config.domain = window.location.hostname
49
48
  }
50
49
  }
51
50
  let lconf: any
52
51
  try {
53
- lconf = require('../../../../config.live.json');
52
+ lconf = configlivejson;
54
53
  } catch (error) {
55
54
 
56
55
  }
57
- if (conf?.config?.isDebug == 0)
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(app, conf)
83
+ return esp.mergeDeep(appjson, configjson)
85
84
  },
86
85
  assets(path: EspAssets): any {
87
- const _assets = require('../../cache/assets')
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 conf.config.domain != lconf.config.domain
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('../../cache/routers')
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('../../cache/properties')
166
+ const properties = require('esoftplay/cache/properties')
168
167
  return properties(modtast.join("/"));
169
168
  },
170
169
  _config(): typeof cacheConfig {
171
- app = esp.mergeDeep(app, conf)
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('../../cache/navs').default
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("isDebug") == 1) {
227
+ if (esp.config()?.isDebug == 1) {
229
228
  let out = [message]
230
229
  if (optionalParams)
231
230
  out.push(...optionalParams)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.253",
3
+ "version": "0.0.255",
4
4
  "description": "embedding data from esoftplay framework (web based) into mobile app",
5
5
  "main": "cache/index.js",
6
6
  "types": "../../index.d.ts",