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.
@@ -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));
@@ -6,7 +6,6 @@ const KEYWORD_MAP = {
6
6
  quiet: '--quiet',
7
7
  json: '--json',
8
8
  help: '--help',
9
- version: '--version',
10
9
  secure: '--secure',
11
10
  implicit: '--implicit',
12
11
  };
@@ -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
@@ -1,4 +1,4 @@
1
- const VERSION = '1.0.92';
1
+ const VERSION = '1.0.93-next.40856cc';
2
2
  let _version = null;
3
3
  export async function getVersion() {
4
4
  if (_version)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "recker",
3
- "version": "1.0.92",
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",