esoftplay 0.0.251 → 0.0.253

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/files.ts ADDED
@@ -0,0 +1,4 @@
1
+ let packagejson = require('../../../package.json');
2
+ let appjson = require('../../../app.json');
3
+
4
+ export { appjson, packagejson };
package/bin/router.js CHANGED
@@ -5,6 +5,7 @@ const fs = require('fs');
5
5
  var checks = ['./node_modules/esoftplay/modules/', './modules/', './templates/'];
6
6
  var pathAsset = "./assets";
7
7
  var tmpDir = "./node_modules/esoftplay/cache/";
8
+ var mainDir = "./node_modules/esoftplay/";
8
9
  var typesDir = "./"
9
10
  var replacer = new RegExp(/(?:\-|\.(?:ios|android))?\.(?:jsx|js|ts|tsx)$/);
10
11
  var Text = "";
@@ -312,21 +313,26 @@ export * as ${ucword(module) + ucword(task) + SuffixHooksProperty} from '../../.
312
313
 
313
314
  if (!fs.existsSync(tmpDir + nav))
314
315
  fs.mkdirSync(tmpDir + nav)
316
+ if (nav.startsWith('sys/')) {
317
+ const string = `export * from '${"../." + Modules[module][task]}';
318
+ export { default } from '${"../." + Modules[module][task]}';`
319
+ fs.writeFileSync(mainDir + task + ".ts", string)
320
+ } else {
321
+ if (isChange(tmpDir + nav + '/import.d.ts', deItem)) {
322
+ fs.writeFile(tmpDir + nav + '/import.d.ts', deItem, { flag: 'w' }, function (err) {
323
+ if (err) {
324
+ return console.log(err);
325
+ }
326
+ });
327
+ }
315
328
 
316
- if (isChange(tmpDir + nav + '/import.d.ts', deItem)) {
317
- fs.writeFile(tmpDir + nav + '/import.d.ts', deItem, { flag: 'w' }, function (err) {
318
- if (err) {
319
- return console.log(err);
320
- }
321
- });
322
- }
323
-
324
- if (isChange(tmpDir + nav + "/import.js", item)) {
325
- fs.writeFile(tmpDir + nav + '/import.js', item, { flag: 'w' }, function (err) {
326
- if (err) {
327
- return console.log(err);
328
- }
329
- });
329
+ if (isChange(tmpDir + nav + "/import.js", item)) {
330
+ fs.writeFile(tmpDir + nav + '/import.js', item, { flag: 'w' }, function (err) {
331
+ if (err) {
332
+ return console.log(err);
333
+ }
334
+ });
335
+ }
330
336
  }
331
337
  }
332
338
  }
@@ -1,4 +1,5 @@
1
1
  //noPage
2
+ import { appjson, packagejson } from 'esoftplay/bin/files';
2
3
  import { LibCurl } from 'esoftplay/cache/lib/curl/import';
3
4
  import { LibNavigationProperty } from 'esoftplay/cache/lib/navigation/import';
4
5
  import { UserClass } from 'esoftplay/cache/user/class/import';
@@ -9,8 +10,6 @@ import * as Application from 'expo-application';
9
10
  import Constants from 'expo-constants';
10
11
  import * as FileSystem from 'expo-file-system';
11
12
  import { Platform } from 'react-native';
12
- let pack = require('../../../../package.json');
13
- let app = require('../../../../app.json');
14
13
  const { expoConfig } = Constants;
15
14
 
16
15
  function getTime() {
@@ -60,7 +59,7 @@ export function reportApiError(fetch: any, error: any) {
60
59
  'error: ' + error,
61
60
  '\n\n\ndev: ' + Platform.OS + ' - ' + Constants.deviceName,
62
61
  'time: ' + getTime(),
63
- 'runtimeVersion:' + app.expo.runtimeVersion,
62
+ 'runtimeVersion:' + appjson.expo.runtimeVersion,
64
63
  'app/pub_id: ' + Constants.appOwnership + '/' + (config?.publish_id || '-'),
65
64
  'user_id: ' + user?.id || user?.user_id || '-',
66
65
  'username: ' + user?.username || '-',
@@ -118,11 +117,11 @@ export function getError() {
118
117
  let msg = [
119
118
  'slug: ' + "#" + expoConfig?.slug,
120
119
  'error: \n' + _e.error,
121
- '\n\nname: ' + expoConfig?.name + ' - sdk' + pack?.dependencies?.expo,
120
+ '\n\nname: ' + expoConfig?.name + ' - sdk' + packagejson?.dependencies?.expo,
122
121
  'time: \n' + _e?.time,
123
122
  'domain: ' + config.domain + config.uri,
124
- 'runtimeVersion:' + app.expo.runtimeVersion,
125
- 'package: ' + (Application.nativeBuildVersion) + ' - v' + (Platform.OS == 'ios' ? app.expo.ios.buildNumber : app.expo.android.versionCode),
123
+ 'runtimeVersion:' + appjson.expo.runtimeVersion,
124
+ 'package: ' + (Application.nativeBuildVersion) + ' - v' + (Platform.OS == 'ios' ? appjson.expo.ios.buildNumber : appjson.expo.android.versionCode),
126
125
  'device: ' + Platform.OS + ' | ' + Constants.deviceName,
127
126
  'native/pub_id: ' + expoConfig?.sdkVersion + '/' + (config?.publish_id || '-'),
128
127
  'user_id: ' + _e?.user?.id || _e?.user?.user_id || '-',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.251",
3
+ "version": "0.0.253",
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",