esoftplay 0.0.138-s → 0.0.138-u
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/cli.js +8 -2
- package/bin/connector.js +41 -0
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -723,7 +723,7 @@ Pastikan data sudah benar sebelum anda melanjutkan, lanjut publish ketikkan runt
|
|
|
723
723
|
console.error(`exec error: ${error}`);
|
|
724
724
|
return;
|
|
725
725
|
}
|
|
726
|
-
let accountName = stdout.trim();
|
|
726
|
+
let accountName = stdout.trim();
|
|
727
727
|
stringBuilder += "\npublisher: @" + accountName + "\n"
|
|
728
728
|
stringBuilder += (notes != '' ? ("\n\n- " + notes) : '')
|
|
729
729
|
tm(stringBuilder)
|
|
@@ -737,7 +737,13 @@ Pastikan data sudah benar sebelum anda melanjutkan, lanjut publish ketikkan runt
|
|
|
737
737
|
}
|
|
738
738
|
});
|
|
739
739
|
}
|
|
740
|
-
|
|
740
|
+
if (cjson.config.connected_modules) {
|
|
741
|
+
if (cjson.config.connected_modules.length > 0) {
|
|
742
|
+
consoleSucces("<== CONNECTED MODULE DETECTED ==>")
|
|
743
|
+
command('bun ./node_modules/esoftplay/bin/connector.js')
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}
|
|
741
747
|
}
|
|
742
748
|
|
|
743
749
|
function doctor() {
|
package/bin/connector.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const fs = require('fs')
|
|
2
|
+
|
|
3
|
+
if (fs.existsSync('./config.json')) {
|
|
4
|
+
const config = JSON.parse(fs.readFileSync('./config.json', { encoding: 'utf8' }))
|
|
5
|
+
const currentProject = './modules/';
|
|
6
|
+
|
|
7
|
+
if (config.config.connected_modules) {
|
|
8
|
+
if (config.config.connected_modules.length > 0) {
|
|
9
|
+
config.config.connected_modules.forEach((path) => {
|
|
10
|
+
const modules = JSON.parse(fs.readFileSync(path + '/raw/connected_modules.json', { encoding: 'utf8' }))
|
|
11
|
+
modules.forEach((module) => {
|
|
12
|
+
console.log('>_ connecting.. ' + module)
|
|
13
|
+
const ext = [
|
|
14
|
+
'.ts',
|
|
15
|
+
'.tsx',
|
|
16
|
+
'.js',
|
|
17
|
+
'.debug.ts',
|
|
18
|
+
'.debug.tsx',
|
|
19
|
+
'.debug.js',
|
|
20
|
+
'.live.ts',
|
|
21
|
+
'.live.tsx',
|
|
22
|
+
'.live.js',
|
|
23
|
+
]
|
|
24
|
+
ext.forEach((fext) => {
|
|
25
|
+
const source = currentProject + module + fext;
|
|
26
|
+
const destination = path + "/modules/" + module + fext;
|
|
27
|
+
|
|
28
|
+
if (fs.existsSync(source)) {
|
|
29
|
+
const file = fs.readFileSync(source, { encoding: 'utf8' })
|
|
30
|
+
const [mod, task] = module.split('/')
|
|
31
|
+
if (!fs.existsSync(path + '/modules/' + mod)) {
|
|
32
|
+
fs.mkdirSync(path + '/modules/' + mod)
|
|
33
|
+
}
|
|
34
|
+
fs.writeFileSync(destination, file, { encoding: 'utf8' })
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|