offcode 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # offcode-cli
1
+ # offcode
2
2
  Offline LeetCode,both cli and webui and docker free judge.
3
3
  Works on any platform .
4
4
 
5
5
  ## Install
6
6
  ```bash
7
- npm i -g offcode-cli
7
+ $ npm install offcode
8
8
  ```
9
9
 
10
10
  ## Use
package/dist/cli.js CHANGED
@@ -677,7 +677,7 @@ function startServer({ port = 3e3, host = "127.0.0.1" } = {}) {
677
677
  if (url.pathname === "/api/meta") return send(res, 200, { categories: allCategories(), progress: loadProgress() });
678
678
  if (url.pathname === "/api/problems") {
679
679
  const items = filterProblems({ q: url.searchParams.get("q") || "", difficulty: url.searchParams.get("difficulty") || "All", category: url.searchParams.get("category") || "" });
680
- return send(res, 200, { total: items.length, items: items.slice(0, 400) });
680
+ return send(res, 200, { total: items.length, items });
681
681
  }
682
682
  if (url.pathname.startsWith("/api/problem/")) {
683
683
  const p = loadProblem(decodeURIComponent(url.pathname.slice(13)));
@@ -729,7 +729,7 @@ var flag = (n, d) => {
729
729
  const i = args.indexOf(`--${n}`);
730
730
  return i > -1 ? args[i + 1] : d;
731
731
  };
732
- var HELP = `offcode by Limon Das (@withlimon/offcode-cli)
732
+ var HELP = `offcode by Limon Das (npm: offcode)
733
733
 
734
734
  offcode terminal UI
735
735
  offcode serve [--port 3000] web UI