esoftplay 0.0.132-c → 0.0.132-e
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 +1 -0
- package/bin/cli.js +1 -1
- package/bin/router.js +10 -10
- package/bin/run.js +10 -0
- package/package.json +1 -7
package/bin/build.js
CHANGED
|
@@ -352,6 +352,7 @@ export default UserIndex`;
|
|
|
352
352
|
execSync(cmd + "|| true")
|
|
353
353
|
execSync("cd ../../ && bun ./node_modules/esoftplay/bin/router.js || true")
|
|
354
354
|
execSync("cd ../../ && bun ./node_modules/esoftplay/bin/locale.js || true")
|
|
355
|
+
execSync("cd ../../ && bun ./node_modules/esoftplay/bin/run.js || true")
|
|
355
356
|
console.log('App.js has been replace to App.tsx');
|
|
356
357
|
// /* bugfix AsyncStorage @firebase, remove this section if firebase has update the AsyncStorage */
|
|
357
358
|
// if (fs.existsSync('../@firebase/app/dist/index.rn.cjs.js')) {
|
package/bin/cli.js
CHANGED
|
@@ -23,7 +23,7 @@ var args = process.argv.slice(2);
|
|
|
23
23
|
|
|
24
24
|
// console.log(modpath, "sdofsjdofjsd")
|
|
25
25
|
function execution() {
|
|
26
|
-
const cmd = `watchman watch-del ./ && watchman watch ./ && watchman -j <<< '["trigger","./",{"name":"esp","expression":["allof",["not",["dirname","node_modules"]],["not",["name","index.d.ts"]]],"command":["node","./node_modules/esoftplay/bin/router.js"],"append_files":true}]' && bun ./node_modules/esoftplay/bin/router.js`
|
|
26
|
+
const cmd = `watchman watch-del ./ && watchman watch ./ && watchman -j <<< '["trigger","./",{"name":"esp","expression":["allof",["not",["dirname","node_modules"]],["not",["name","index.d.ts"]]],"command":["node","./node_modules/esoftplay/bin/router.js"],"append_files":true}]' && bun ./node_modules/esoftplay/bin/run.js && bun ./node_modules/esoftplay/bin/router.js`
|
|
27
27
|
command(cmd)
|
|
28
28
|
}
|
|
29
29
|
|
package/bin/router.js
CHANGED
|
@@ -398,7 +398,7 @@ Text = 'function assets(File) {' + "\n\t" +
|
|
|
398
398
|
'}' + "\n" +
|
|
399
399
|
'module.exports = assets;';
|
|
400
400
|
if (isChange(tmpDir + "assets.js", Text))
|
|
401
|
-
|
|
401
|
+
Bun.write(tmpDir + "assets.js", Text, { flag: 'w' }, function (err) {
|
|
402
402
|
if (err) {
|
|
403
403
|
return console.log(err);
|
|
404
404
|
}
|
|
@@ -608,7 +608,7 @@ declare module "esoftplay" {
|
|
|
608
608
|
|
|
609
609
|
PreText += "import '" + tmpDir + nav + "/import.d';\n"
|
|
610
610
|
if (isChange(tmpDir + nav + '/import.d.ts', ItemText)) {
|
|
611
|
-
|
|
611
|
+
Bun.write(tmpDir + nav + '/import.d.ts', ItemText, { flag: 'w' }, function (err) {
|
|
612
612
|
if (err) {
|
|
613
613
|
return console.log(err);
|
|
614
614
|
}
|
|
@@ -629,7 +629,7 @@ declare module "esoftplay" {
|
|
|
629
629
|
Text += "}\n"
|
|
630
630
|
Text = PreText + Text
|
|
631
631
|
if (isChange(typesDir + "index.d.ts", Text)) {
|
|
632
|
-
|
|
632
|
+
Bun.write(typesDir + "index.d.ts", Text, { flag: 'w' }, function (err) {
|
|
633
633
|
if (err) {
|
|
634
634
|
return console.log(err);
|
|
635
635
|
}
|
|
@@ -639,7 +639,7 @@ declare module "esoftplay" {
|
|
|
639
639
|
|
|
640
640
|
function isChange(path, compare) {
|
|
641
641
|
let hasChanged = true
|
|
642
|
-
let old = fs.existsSync(path) ?
|
|
642
|
+
let old = fs.existsSync(path) ? Bun.file(path, { encoding: 'utf8' }) : ""
|
|
643
643
|
hasChanged = old.length != compare.length
|
|
644
644
|
if (hasChanged) {
|
|
645
645
|
console.log(path, 'CHANGED', old.length, compare.length)
|
|
@@ -724,7 +724,7 @@ function createRouter() {
|
|
|
724
724
|
fs.mkdirSync(tmpDir + nav)
|
|
725
725
|
|
|
726
726
|
if (isChange(tmpDir + nav + "/import." + fileExt, item)) {
|
|
727
|
-
|
|
727
|
+
Bun.write(tmpDir + nav + '/import.' + fileExt, item, { flag: 'w' }, function (err) {
|
|
728
728
|
if (err) {
|
|
729
729
|
return console.log(err);
|
|
730
730
|
}
|
|
@@ -736,7 +736,7 @@ function createRouter() {
|
|
|
736
736
|
|
|
737
737
|
const x = staticImport.join('')
|
|
738
738
|
if (isChange(tmpDir + 'index.js', x))
|
|
739
|
-
|
|
739
|
+
Bun.write(tmpDir + 'index.js', x, { flag: 'w' }, function (err) {
|
|
740
740
|
if (err) {
|
|
741
741
|
return console.log(err);
|
|
742
742
|
}
|
|
@@ -751,7 +751,7 @@ function createRouter() {
|
|
|
751
751
|
'}' + "\n" +
|
|
752
752
|
'module.exports = properties;';
|
|
753
753
|
if (isChange(tmpDir + "properties.js", Props)) {
|
|
754
|
-
|
|
754
|
+
Bun.write(tmpDir + "properties.js", Props, { flag: 'w' }, function (err) {
|
|
755
755
|
if (err) {
|
|
756
756
|
return console.log(err);
|
|
757
757
|
}
|
|
@@ -767,7 +767,7 @@ function createRouter() {
|
|
|
767
767
|
'}' + "\n" +
|
|
768
768
|
'module.exports = routers;';
|
|
769
769
|
if (isChange(tmpDir + "routers.js", Text)) {
|
|
770
|
-
|
|
770
|
+
Bun.write(tmpDir + "routers.js", Text, { flag: 'w' }, function (err) {
|
|
771
771
|
if (err) {
|
|
772
772
|
return console.log(err);
|
|
773
773
|
}
|
|
@@ -775,7 +775,7 @@ function createRouter() {
|
|
|
775
775
|
}
|
|
776
776
|
/* CREATE NAVIGATION LIST */
|
|
777
777
|
Text = "export default [\"" + Navigations.join('", "') + "\"]";
|
|
778
|
-
|
|
778
|
+
Bun.write(tmpDir + "navigations.js", Text, { flag: 'w' }, function (err) {
|
|
779
779
|
if (err) {
|
|
780
780
|
return console.log(err);
|
|
781
781
|
}
|
|
@@ -796,7 +796,7 @@ function createRouter() {
|
|
|
796
796
|
|
|
797
797
|
let N = Nav5(importer.join("\n"), screens.join("\n"))
|
|
798
798
|
if (isChange(tmpDir + 'navs.tsx', N))
|
|
799
|
-
|
|
799
|
+
Bun.write(tmpDir + "navs.tsx", N, { flag: 'w' }, function (err) {
|
|
800
800
|
if (err) {
|
|
801
801
|
return console.log(err);
|
|
802
802
|
}
|
package/bin/run.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const shell = require('child_process').execSync;
|
|
3
|
+
|
|
4
|
+
if (fs.existsSync('./node_modules')) {
|
|
5
|
+
fs.readdirSync('./node_modules').forEach((module) => {
|
|
6
|
+
if (module.includes("esoftplay-")) {
|
|
7
|
+
shell(`cd ./node_modules/${module} && bun install && cd ../../`)
|
|
8
|
+
}
|
|
9
|
+
})
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esoftplay",
|
|
3
|
-
"version": "0.0.132-
|
|
3
|
+
"version": "0.0.132-e",
|
|
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",
|
|
7
|
-
"bun-create": {
|
|
8
|
-
"postinstall": [
|
|
9
|
-
"bun ./bin/build.js install"
|
|
10
|
-
],
|
|
11
|
-
"test": "bun ./bin/build.js install"
|
|
12
|
-
},
|
|
13
7
|
"scripts": {
|
|
14
8
|
"postinstall": "bun ./bin/build.js install",
|
|
15
9
|
"test": "bun ./bin/build.js install"
|