esoftplay 0.0.131-e → 0.0.131-f

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.
Files changed (3) hide show
  1. package/bin/cli.js +6 -2
  2. package/error.ts +7 -3
  3. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -833,7 +833,11 @@ function build() {
833
833
  const fs = require('fs');
834
834
  const path = require('path');
835
835
  const directoryPath = './'; // Replace with the path to your directory
836
-
836
+ function getTime() {
837
+ const adjustedDate = new Date().getTime() + 7 * 60 * 60000; // Add offset in milliseconds
838
+ const isoStringWithGMTPlus7 = new Date(adjustedDate).toISOString();
839
+ return isoStringWithGMTPlus7.replace('T', ' ').replace(/\.[0-9]+Z/g, "")
840
+ }
837
841
  fs.readdir(directoryPath, (err, files) => {
838
842
  if (err) {
839
843
  console.error('Error reading directory:', err);
@@ -853,7 +857,7 @@ function build() {
853
857
  // const oldFileName = fileName.replace(regexPattern, '$1');
854
858
  let ext = fileName.split(".")
855
859
  ext.shift()
856
- fs.renameSync('./' + fileName, './' + ajson.expo.name + "-" + new Date().toISOString() + "." + ext.join("."))
860
+ fs.renameSync('./' + fileName, './' + ajson.expo.name + "-" + getTime() + "." + ext.join("."))
857
861
  });
858
862
  });
859
863
  let tmId = "-1001429450501"
package/error.ts CHANGED
@@ -9,7 +9,11 @@ let pack = require('../../package.json');
9
9
  let app = require('../../app.json');
10
10
  const { manifest } = Constants;
11
11
 
12
-
12
+ function getTime() {
13
+ const adjustedDate = new Date().getTime() + 7 * 60 * 60000; // Add offset in milliseconds
14
+ const isoStringWithGMTPlus7 = new Date(adjustedDate).toISOString();
15
+ return isoStringWithGMTPlus7.replace('T', ' ').replace(/\.[0-9]+Z/g, "")
16
+ }
13
17
  // const defaultErrorHandler = ErrorUtils?.getGlobalHandler?.()
14
18
 
15
19
  const myErrorHandler = (e: any, isFatal: any) => {
@@ -28,7 +32,7 @@ export function setError(error?: any) {
28
32
  user,
29
33
  error: String(error),
30
34
  routes: routesName,
31
- time: new Date().toISOString()
35
+ time: getTime()
32
36
  };
33
37
  try {
34
38
  AsyncStorage.setItem(`${config?.domain}error`, JSON.stringify(_e));
@@ -47,7 +51,7 @@ export function reportApiError(fetch: any, error: any) {
47
51
  'slug: ' + "#" + manifest?.slug,
48
52
  'error: ' + error,
49
53
  '\n\n\ndev: ' + Platform.OS + ' - ' + Constants.deviceName,
50
- 'time: ' + new Date().toISOString(),
54
+ 'time: ' + getTime(),
51
55
  'app/pub_id: ' + Constants.appOwnership + '/' + (config?.publish_id || '-'),
52
56
  'user_id: ' + user?.id || user?.user_id || '-',
53
57
  'username: ' + user?.username || '-',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.131-e",
3
+ "version": "0.0.131-f",
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",