esoftplay 0.0.128-b → 0.0.128-d

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/router.js CHANGED
@@ -535,19 +535,22 @@ declare module "esoftplay" {
535
535
  const [module, task] = clsName.split(/(?=[A-Z])/)
536
536
  const nav = module?.toLowerCase() + '/' + task?.toLowerCase()
537
537
 
538
- if (module && !fs.existsSync(tmpDir + module?.toLowerCase()))
539
- fs.mkdirSync(tmpDir + module.toLowerCase());
538
+ if (!nav.includes('.')) {
539
+
540
+ if (module && !fs.existsSync(tmpDir + module?.toLowerCase()))
541
+ fs.mkdirSync(tmpDir + module.toLowerCase());
540
542
 
541
- if (!fs.existsSync(tmpDir + nav))
542
- fs.mkdirSync(tmpDir + nav)
543
+ if (!fs.existsSync(tmpDir + nav))
544
+ fs.mkdirSync(tmpDir + nav)
543
545
 
544
- PreText += "import '" + tmpDir + nav + "/import.d';\n"
545
- if (isChange(tmpDir + nav + '/import.d.ts', ItemText)) {
546
- fs.writeFile(tmpDir + nav + '/import.d.ts', ItemText, { flag: 'w' }, function (err) {
547
- if (err) {
548
- return console.log(err);
549
- }
550
- });
546
+ PreText += "import '" + tmpDir + nav + "/import.d';\n"
547
+ if (isChange(tmpDir + nav + '/import.d.ts', ItemText)) {
548
+ fs.writeFile(tmpDir + nav + '/import.d.ts', ItemText, { flag: 'w' }, function (err) {
549
+ if (err) {
550
+ return console.log(err);
551
+ }
552
+ });
553
+ }
551
554
  }
552
555
  }
553
556
  Text += "\n\ttype LibNavigationRoutes = \"" + Navigations.join("\" |\n\t\t\t \"") + "\"\n"
@@ -638,7 +641,7 @@ function createRouter() {
638
641
  "import React from 'react'\n" +
639
642
  "const _" + ucword(module) + ucword(task) + " = React.lazy(() => import('../../../../." + Modules[module][task] + "')); \n" +
640
643
  "import * as " + ucword(module) + ucword(task) + SuffixHooksProperty + " from '../../../../." + Modules[module][task] + "';\n" +
641
- "const UpdatedComponent = (OriginalComponent) => { function "+ucword(module) + ucword(task)+"Component(props) { return ( <React.Suspense><OriginalComponent {...props} /></React.Suspense> ) } return "+ucword(module) + ucword(task)+"Component; };\n" +
644
+ "const UpdatedComponent = (OriginalComponent) => { function " + ucword(module) + ucword(task) + "Component(props) { return ( <React.Suspense><OriginalComponent {...props} /></React.Suspense> ) } return " + ucword(module) + ucword(task) + "Component; };\n" +
642
645
  "const " + ucword(module) + ucword(task) + " = stable(UpdatedComponent(_" + ucword(module) + ucword(task) + ")); \n" +
643
646
  "export { " + ucword(module) + ucword(task) + SuffixHooksProperty + ", " + ucword(module) + ucword(task) + " };\n"
644
647
  } else if (UseLibs.includes(nav)) {
@@ -652,18 +655,21 @@ function createRouter() {
652
655
  item += "export { _" + ucword(module) + ucword(task) + " as " + ucword(module) + ucword(task) + " };\n"
653
656
  }
654
657
 
655
- if (!fs.existsSync(tmpDir + module))
656
- fs.mkdirSync(tmpDir + module);
658
+ if (!nav.includes('.')) {
659
+ console.log(nav)
660
+ if (!fs.existsSync(tmpDir + module))
661
+ fs.mkdirSync(tmpDir + module);
657
662
 
658
- if (!fs.existsSync(tmpDir + nav))
659
- fs.mkdirSync(tmpDir + nav)
663
+ if (!fs.existsSync(tmpDir + nav))
664
+ fs.mkdirSync(tmpDir + nav)
660
665
 
661
- if (isChange(tmpDir + nav + "/import." + fileExt, item)) {
662
- fs.writeFile(tmpDir + nav + '/import.' + fileExt, item, { flag: 'w' }, function (err) {
663
- if (err) {
664
- return console.log(err);
665
- }
666
- });
666
+ if (isChange(tmpDir + nav + "/import." + fileExt, item)) {
667
+ fs.writeFile(tmpDir + nav + '/import.' + fileExt, item, { flag: 'w' }, function (err) {
668
+ if (err) {
669
+ return console.log(err);
670
+ }
671
+ });
672
+ }
667
673
  }
668
674
 
669
675
  // if (module == 'lib' && task == 'component') {
@@ -4,7 +4,8 @@ import { LibComponent } from 'esoftplay/cache/lib/component/import';
4
4
  import isEqual from 'react-fast-compare';
5
5
 
6
6
  export interface LibEffectProps {
7
- deps?: any[]
7
+ deps?: any[],
8
+ children: any
8
9
  }
9
10
  export interface LibEffectState {
10
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.128-b",
3
+ "version": "0.0.128-d",
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",