@lendle/classroomai 0.5.0 → 0.6.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendle/classroomai",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "AI Coding Classroom Student Relay (Node.js CLI; Data Plane)",
5
5
  "main": "main.js",
6
6
  "scripts": {
package/relay/log.js CHANGED
@@ -77,6 +77,12 @@ class RelayLogger {
77
77
  }
78
78
 
79
79
  _write(level, msg) {
80
+ // 每次寫入前確保目錄存在(執行中 .logs/relay 被刪除也能自動重建)
81
+ try {
82
+ fs.mkdirSync(path.dirname(this.file), { recursive: true });
83
+ } catch {
84
+ /* 忽略 */
85
+ }
80
86
  this._rotateIfNeeded();
81
87
  const line = `${timeStamp()} ${level} ${msg}\n`;
82
88
  try {
package/standalone.js CHANGED
File without changes