node-csfd-api 5.0.0 → 5.1.0-beta.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.
@@ -2,7 +2,7 @@
2
2
  import { csfd } from "../index.mjs";
3
3
  import { writeFile } from "node:fs/promises";
4
4
 
5
- //#region src/tools/export-ratings.ts
5
+ //#region src/bin/export-ratings.ts
6
6
  /**
7
7
  * Runs the ratings export process for a given user.
8
8
  * @param userId - The CSFD user ID.
@@ -5,7 +5,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
5
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
6
6
  import { z } from "zod";
7
7
 
8
- //#region src/mcp-server/index.ts
8
+ //#region src/bin/mcp-server.ts
9
9
  const server = new McpServer({
10
10
  name,
11
11
  version
package/bin/server.mjs CHANGED
@@ -4,7 +4,7 @@ import { homepage, name, version } from "../package.mjs";
4
4
  import "dotenv/config";
5
5
  import express from "express";
6
6
 
7
- //#region src/server/index.ts
7
+ //#region src/bin/server.ts
8
8
  const LOG_COLORS = {
9
9
  info: "\x1B[36m",
10
10
  warn: "\x1B[33m",
package/cli.mjs CHANGED
@@ -1,20 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import path from "node:path";
3
- import { fileURLToPath } from "node:url";
4
-
5
2
  //#region src/cli.ts
6
3
  /**
7
4
  * Main CLI entry point for node-csfd-api.
8
5
  */
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = path.dirname(__filename);
11
6
  async function main() {
12
7
  const args = process.argv.slice(2);
13
8
  switch (args[0]) {
14
9
  case "server":
15
10
  case "api":
16
11
  try {
17
- await import(path.join(__dirname, "bin/server.mjs"));
12
+ await import("./bin/server.mjs");
18
13
  } catch (error) {
19
14
  console.error("Failed to start server:", error);
20
15
  process.exit(1);
@@ -22,7 +17,7 @@ async function main() {
22
17
  break;
23
18
  case "mcp":
24
19
  try {
25
- await import(path.join(__dirname, "bin/mcp-server.mjs"));
20
+ await import("./bin/mcp-server.mjs");
26
21
  } catch (error) {
27
22
  console.error("Failed to start MCP server:", error);
28
23
  process.exit(1);
@@ -45,7 +40,7 @@ async function main() {
45
40
  else if (isJson) format = "json";
46
41
  else if (isCsv) format = "csv";
47
42
  try {
48
- const { runRatingsExport } = await import(path.join(__dirname, "bin/export-ratings.mjs"));
43
+ const { runRatingsExport } = await import("./bin/export-ratings.mjs");
49
44
  await runRatingsExport(userId, {
50
45
  format,
51
46
  userRatingsOptions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-csfd-api",
3
- "version": "5.0.0",
3
+ "version": "5.1.0-beta.0",
4
4
  "description": "ČSFD API in JavaScript. Amazing NPM library for scrapping csfd.cz :)",
5
5
  "author": "BART! <bart@bartweb.cz>",
6
6
  "publishConfig": {
package/package.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  //#region package.json
3
3
  var name = "node-csfd-api";
4
- var version = "5.0.0";
4
+ var version = "5.1.0-beta.0";
5
5
  var homepage = "https://github.com/bartholomej/node-csfd-api#readme";
6
6
 
7
7
  //#endregion