@2025-6-19/clawfight 1.1.1 → 1.1.3
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/dist/index.js +14 -7
- package/package.json +5 -4
- package/dist/chunk-ZXMDA7VB.js +0 -16
- package/dist/undici-A3SJYEQW.js +0 -16778
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-ZXMDA7VB.js";
|
|
3
2
|
|
|
4
3
|
// src/index.ts
|
|
5
4
|
import { Command } from "commander";
|
|
@@ -303,15 +302,23 @@ function statsHash(lobster) {
|
|
|
303
302
|
function getProxyUrl() {
|
|
304
303
|
return process.env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY || null;
|
|
305
304
|
}
|
|
305
|
+
var _cachedFetch = null;
|
|
306
306
|
async function getProxiedFetch() {
|
|
307
|
+
if (_cachedFetch) return _cachedFetch;
|
|
307
308
|
const proxyUrl = getProxyUrl();
|
|
308
|
-
if (!proxyUrl)
|
|
309
|
+
if (!proxyUrl) {
|
|
310
|
+
_cachedFetch = globalThis.fetch;
|
|
311
|
+
return _cachedFetch;
|
|
312
|
+
}
|
|
309
313
|
try {
|
|
310
|
-
const
|
|
311
|
-
const
|
|
312
|
-
|
|
314
|
+
const undici = await import("undici");
|
|
315
|
+
const agent = new undici.ProxyAgent(proxyUrl);
|
|
316
|
+
const undiciFetch = undici.fetch;
|
|
317
|
+
_cachedFetch = ((url, init) => undiciFetch(url, { ...init, dispatcher: agent }));
|
|
318
|
+
return _cachedFetch;
|
|
313
319
|
} catch {
|
|
314
|
-
|
|
320
|
+
_cachedFetch = globalThis.fetch;
|
|
321
|
+
return _cachedFetch;
|
|
315
322
|
}
|
|
316
323
|
}
|
|
317
324
|
async function apiPatrol(lobster) {
|
|
@@ -700,7 +707,7 @@ async function leaderboard() {
|
|
|
700
707
|
|
|
701
708
|
// src/index.ts
|
|
702
709
|
var program = new Command();
|
|
703
|
-
program.name("clawfight").description("\u{1F99E} ClawFight \u2014 \u9F99\u867E\u7535\u5B50\u5BA0\u7269\u5BF9\u6218").version("1.1.
|
|
710
|
+
program.name("clawfight").description("\u{1F99E} ClawFight \u2014 \u9F99\u867E\u7535\u5B50\u5BA0\u7269\u5BF9\u6218").version("1.1.3");
|
|
704
711
|
program.command("hatch").description("\u5B75\u5316\u4E00\u53EA\u65B0\u9F99\u867E").argument("[name]", "\u4E3A\u9F99\u867E\u53D6\u540D").action(async (name) => {
|
|
705
712
|
await hatch(name);
|
|
706
713
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2025-6-19/clawfight",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "ClawFight — raise and battle a unique lobster pet with evolving soul 🦞",
|
|
5
5
|
"author": "LIU",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,12 +26,13 @@
|
|
|
26
26
|
"prepublishOnly": "npm run build"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"commander": "^14.0.0"
|
|
29
|
+
"commander": "^14.0.0",
|
|
30
|
+
"https-proxy-agent": "^8.0.0"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
33
|
+
"@types/node": "^22.0.0",
|
|
32
34
|
"tsup": "^8.0.0",
|
|
33
|
-
"typescript": "^5.5.0"
|
|
34
|
-
"@types/node": "^22.0.0"
|
|
35
|
+
"typescript": "^5.5.0"
|
|
35
36
|
},
|
|
36
37
|
"keywords": [
|
|
37
38
|
"openclaw",
|
package/dist/chunk-ZXMDA7VB.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
4
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
5
|
-
}) : x)(function(x) {
|
|
6
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
7
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
8
|
-
});
|
|
9
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
10
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
__require,
|
|
15
|
-
__commonJS
|
|
16
|
-
};
|