recker 1.0.92 → 1.0.93-next.40856cc
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/browser/utils/binary-manager.d.ts +3 -0
- package/dist/browser/utils/binary-manager.js +13 -0
- package/dist/cli/index.js +12 -1
- package/dist/cli/router.js +0 -1
- package/dist/utils/binary-manager.d.ts +3 -0
- package/dist/utils/binary-manager.js +13 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -3,4 +3,7 @@ export declare function getCurlPath(): string;
|
|
|
3
3
|
export declare function getLegacyCurlPath(): string;
|
|
4
4
|
export declare function resolveCurlPath(): Promise<string | null>;
|
|
5
5
|
export declare function hasImpersonate(): Promise<boolean>;
|
|
6
|
+
export declare function ensureCurlImpersonate(logger?: {
|
|
7
|
+
log: (...args: any[]) => void;
|
|
8
|
+
}): Promise<boolean>;
|
|
6
9
|
export declare function installCurlImpersonate(logger?: Console): Promise<void>;
|
|
@@ -84,6 +84,19 @@ function getDownloadUrl() {
|
|
|
84
84
|
}
|
|
85
85
|
throw new Error(`Unsupported platform: ${p} ${a}`);
|
|
86
86
|
}
|
|
87
|
+
export async function ensureCurlImpersonate(logger) {
|
|
88
|
+
if (await resolveCurlPath())
|
|
89
|
+
return true;
|
|
90
|
+
const log = logger ?? { log: () => { } };
|
|
91
|
+
try {
|
|
92
|
+
log.log('recker: curl-impersonate not found, installing...');
|
|
93
|
+
await installCurlImpersonate(log);
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
87
100
|
export async function installCurlImpersonate(logger = console) {
|
|
88
101
|
const url = getDownloadUrl();
|
|
89
102
|
const tarPath = join(PACKAGE_BIN_DIR, 'curl-impersonate.tar.gz');
|
package/dist/cli/index.js
CHANGED
|
@@ -286,7 +286,18 @@ ${formatColumns(PRESET_NAMES, { prefix: '@', indent: 2, minWidth: 16, transform:
|
|
|
286
286
|
process.exit(1);
|
|
287
287
|
}
|
|
288
288
|
});
|
|
289
|
-
program.command('version').alias('info').action(async () => {
|
|
289
|
+
program.command('version').alias('info').action(async (args) => {
|
|
290
|
+
const { getVersionInfo } = await import('../version.js');
|
|
291
|
+
const info = await getVersionInfo();
|
|
292
|
+
if (args.includes('short')) {
|
|
293
|
+
console.log(info.version);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
const formatArg = args.find(a => a.startsWith('format='));
|
|
297
|
+
if (formatArg?.split('=')[1] === 'json') {
|
|
298
|
+
console.log(JSON.stringify(info, null, 2));
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
290
301
|
const versionInfo = await formatVersionInfo(true);
|
|
291
302
|
console.log(theme.brand('recker') + ' ' + theme.version(version));
|
|
292
303
|
console.log(theme.muted(versionInfo));
|
package/dist/cli/router.js
CHANGED
|
@@ -3,4 +3,7 @@ export declare function getCurlPath(): string;
|
|
|
3
3
|
export declare function getLegacyCurlPath(): string;
|
|
4
4
|
export declare function resolveCurlPath(): Promise<string | null>;
|
|
5
5
|
export declare function hasImpersonate(): Promise<boolean>;
|
|
6
|
+
export declare function ensureCurlImpersonate(logger?: {
|
|
7
|
+
log: (...args: any[]) => void;
|
|
8
|
+
}): Promise<boolean>;
|
|
6
9
|
export declare function installCurlImpersonate(logger?: Console): Promise<void>;
|
|
@@ -84,6 +84,19 @@ function getDownloadUrl() {
|
|
|
84
84
|
}
|
|
85
85
|
throw new Error(`Unsupported platform: ${p} ${a}`);
|
|
86
86
|
}
|
|
87
|
+
export async function ensureCurlImpersonate(logger) {
|
|
88
|
+
if (await resolveCurlPath())
|
|
89
|
+
return true;
|
|
90
|
+
const log = logger ?? { log: () => { } };
|
|
91
|
+
try {
|
|
92
|
+
log.log('recker: curl-impersonate not found, installing...');
|
|
93
|
+
await installCurlImpersonate(log);
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
87
100
|
export async function installCurlImpersonate(logger = console) {
|
|
88
101
|
const url = getDownloadUrl();
|
|
89
102
|
const tarPath = join(PACKAGE_BIN_DIR, 'curl-impersonate.tar.gz');
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "recker",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.93-next.40856cc",
|
|
4
4
|
"description": "Multi-Protocol SDK for the AI Era - HTTP, WebSocket, DNS, FTP, SFTP, Telnet, HLS unified with AI providers and MCP tools",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|