pinokiod 3.4.11 → 3.4.14
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/kernel/bin/cuda.js +3 -3
- package/kernel/bin/vs.js +2 -1
- package/package.json +1 -1
- package/server/index.js +23 -27
package/kernel/bin/cuda.js
CHANGED
package/kernel/bin/vs.js
CHANGED
|
@@ -161,7 +161,8 @@ class VS {
|
|
|
161
161
|
} else if (mode === "install") {
|
|
162
162
|
cmd = `${filename}`
|
|
163
163
|
}
|
|
164
|
-
const command = `start /wait ${cmd} --passive --wait --nocache --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended`
|
|
164
|
+
//const command = `start /wait ${cmd} --passive --wait --nocache --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended`
|
|
165
|
+
const command = `start /wait ${cmd} --passive --wait --nocache --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --includeRecommended`
|
|
165
166
|
return command
|
|
166
167
|
}
|
|
167
168
|
}
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -2023,34 +2023,30 @@ class Server {
|
|
|
2023
2023
|
}
|
|
2024
2024
|
if (homedir) {
|
|
2025
2025
|
console.log({ homedir })
|
|
2026
|
-
let
|
|
2027
|
-
console.log(
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
console.log("this.log", this.log)
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
console.
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
let
|
|
2044
|
-
|
|
2045
|
-
if (lines.length > 100000) {
|
|
2046
|
-
let str = lines.slice(-100000).join("\n")
|
|
2047
|
-
await fs.promises.writeFile(file, str)
|
|
2048
|
-
}
|
|
2049
|
-
} catch (e) {
|
|
2050
|
-
console.log("Log Error", e)
|
|
2026
|
+
let logsdir = path.resolve(homedir, "logs")
|
|
2027
|
+
console.log({ logsdir })
|
|
2028
|
+
await fs.promises.mkdir(logsdir, { recursive: true }).catch((e) => { console.log(e) })
|
|
2029
|
+
console.log("this.log", this.log)
|
|
2030
|
+
if (!this.log) {
|
|
2031
|
+
this.log = fs.createWriteStream(path.resolve(homedir, "logs/stdout.txt"))
|
|
2032
|
+
console.log("created this.log", this.log)
|
|
2033
|
+
process.stdout.write = process.stderr.write = this.log.write.bind(this.log)
|
|
2034
|
+
process.on('uncaughtException', (err) => {
|
|
2035
|
+
console.error((err && err.stack) ? err.stack : err);
|
|
2036
|
+
});
|
|
2037
|
+
this.logInterval = setInterval(async () => {
|
|
2038
|
+
try {
|
|
2039
|
+
let file = path.resolve(homedir, "logs/stdout.txt")
|
|
2040
|
+
let data = await fs.promises.readFile(file, 'utf8')
|
|
2041
|
+
let lines = data.split('\n')
|
|
2042
|
+
if (lines.length > 100000) {
|
|
2043
|
+
let str = lines.slice(-100000).join("\n")
|
|
2044
|
+
await fs.promises.writeFile(file, str)
|
|
2051
2045
|
}
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2046
|
+
} catch (e) {
|
|
2047
|
+
console.log("Log Error", e)
|
|
2048
|
+
}
|
|
2049
|
+
}, 1000 * 60 * 10) // 10 minutes
|
|
2054
2050
|
}
|
|
2055
2051
|
}
|
|
2056
2052
|
}
|