mlbserver 2026.7.20 → 2026.7.22-2

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.
Files changed (4) hide show
  1. package/index.js +1088 -396
  2. package/package.json +1 -1
  3. package/session.js +15 -0
  4. package/style.css +1119 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mlbserver",
3
- "version": "2026.7.20",
3
+ "version": "2026.7.22-2",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
package/session.js CHANGED
@@ -3190,6 +3190,21 @@ class sessionClass {
3190
3190
  }
3191
3191
  }
3192
3192
 
3193
+ // Get stylesheet from local file
3194
+ async getCSS() {
3195
+ this.debuglog('getCSS style.css')
3196
+
3197
+ let cssPath = path.join(__dirname, 'style.css')
3198
+
3199
+ if (fs.existsSync(cssPath)) {
3200
+ this.debuglog('serving local stylesheet at ' + cssPath)
3201
+ return fs.readFileSync(cssPath, 'utf8')
3202
+ } else {
3203
+ this.debuglog('failed to get stylesheet at ' + cssPath)
3204
+ return
3205
+ }
3206
+ }
3207
+
3193
3208
  // Get gameday data for a game (play and pitch data)
3194
3209
  async getGamedayData(gamePk) {
3195
3210
  try {