esoftplay 0.0.107-u → 0.0.107-y

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
@@ -119,7 +119,7 @@ if (fs.existsSync(packjson)) {
119
119
 
120
120
  /* Create esp command line */
121
121
  if (args[0] == "install") {
122
- execSync('node ./bin/cli.js start', { stdio: ['inherit', 'inherit', 'inherit'] })
122
+ execSync('cd ../../ && node ./node_modules/esoftplay/bin/router.js', { stdio: ['inherit', 'inherit', 'inherit'] })
123
123
  }
124
124
 
125
125
  /* Update app.json */
@@ -354,7 +354,7 @@ export default function App() {
354
354
  cmd += "&& yarn add " + installDevLibs.join(" ") + " --dev "
355
355
  if (installExpoLibs.length > 0)
356
356
  cmd += "&& expo install " + installExpoLibs.join(" ")
357
- cmd += "&& node ./node_modules/esoftplay/bin/cli.js"
357
+ cmd += "&& node ./node_modules/esoftplay/bin/router.js"
358
358
  execSync(cmd, { stdio: ['inherit', 'inherit', 'inherit'] })
359
359
  console.log('App.js has been replace to App.tsx');
360
360
  if (fs.existsSync('../@expo/vector-icons')) {
@@ -363,7 +363,7 @@ export default function App() {
363
363
  const dfiles = files.filter((file) => file.includes('d.ts'))
364
364
  dfiles.map((dfile, i) => {
365
365
  const rdfile = fs.readFileSync('../@expo/vector-icons/build/' + dfile, { encoding: 'utf8' })
366
- const names = (/import\("\.\/createIconSet"\)\.Icon<((.*))>;/g).exec(rdfile);
366
+ const names = (/import\("\.\/createIconSet"\)\.Icon<((.*))\,.*>/g).exec(rdfile);
367
367
  if (names && names[1].includes('|')) {
368
368
  esoftplayIcon += 'export type ' + dfile.replace('.d.ts', 'Types') + ' = ' + names[1] + '\n';
369
369
  }
package/global.ts CHANGED
@@ -155,7 +155,7 @@ const n = () => {
155
155
  })
156
156
  }
157
157
  })
158
- }, 50)
158
+ }, 30)
159
159
  }
160
160
  return m
161
161
  }
@@ -32,6 +32,7 @@ export default class m extends Component<LibWorkerProps, LibWorkerState> {
32
32
  }
33
33
 
34
34
  static registerJob(name: string, func: Function): (params: any[], res: (data: any) => void) => void {
35
+ 'show source';
35
36
  const x = func.toString().replace('function', 'function ' + name)
36
37
  _global.injectedJavaScripts.push(x)
37
38
  m.dispatch(() => x, '', () => { })
@@ -54,6 +55,7 @@ export default class m extends Component<LibWorkerProps, LibWorkerState> {
54
55
  }
55
56
 
56
57
  static registerJobAsync(name: string, func: (...fparams: any[]) => Promise<any>): (params: any[], res: (data: any) => void) => void {
58
+ 'show source';
57
59
  const x = func.toString().replace('function', 'function ' + name)
58
60
  _global.injectedJavaScripts.push(x)
59
61
  m.dispatch(() => x, '', () => { })
@@ -86,6 +88,7 @@ export default class m extends Component<LibWorkerProps, LibWorkerState> {
86
88
  }
87
89
 
88
90
  static jobAsync(func: (...fparams: any[]) => Promise<any>, params: (string | number | boolean)[], res: (data: any) => void): void {
91
+ 'show source';
89
92
  if (Platform.OS == 'android')
90
93
  if (Platform.Version <= 22) {
91
94
  (async () => res(await func(...params)))()
@@ -105,6 +108,7 @@ export default class m extends Component<LibWorkerProps, LibWorkerState> {
105
108
  }
106
109
 
107
110
  static job(func: Function, params: (string | number | boolean)[], res: (data: any) => void): void {
111
+ 'show source';
108
112
  if (Platform.OS == 'android')
109
113
  if (Platform.Version <= 22) {
110
114
  return res(func(...params))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.107-u",
3
+ "version": "0.0.107-y",
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",