gtx-cli 2.5.29-alpha.1 → 2.5.29-bin.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # gtx-cli
2
2
 
3
+ ## 2.5.29
4
+
5
+ ### Patch Changes
6
+
7
+ - [#892](https://github.com/generaltranslation/gt/pull/892) [`48b2771`](https://github.com/generaltranslation/gt/commit/48b2771aa7666e8f94f485f86acf32525d26bd3f) Thanks [@fernando-aviles](https://github.com/fernando-aviles)! - Fixing handling of OpenAPI paths for Mintlify
8
+
3
9
  ## 2.5.28
4
10
 
5
11
  ### Patch Changes
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ // Entry point for binaries
2
+ import { main } from '../index.js';
3
+ import dotenv from 'dotenv';
4
+ import { program } from 'commander';
5
+ dotenv.config({ path: '.env' });
6
+ dotenv.config({ path: '.env.local', override: true });
7
+ dotenv.config({ path: '.env.production', override: true });
8
+ main(program);
9
+ program.parse();
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+ // Routes to proper binary based on platform
3
+ import { spawn } from 'child_process';
4
+ import { fileURLToPath } from 'url';
5
+ import { dirname, join } from 'path';
6
+ import { existsSync, chmodSync, statSync } from 'fs';
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = dirname(__filename);
9
+ function detectPlatform() {
10
+ const platform = process.platform;
11
+ const arch = process.arch;
12
+ // Map Node.js platform/arch to our binary names
13
+ const platformMap = {
14
+ darwin: {
15
+ x64: 'gtx-cli-darwin-x64',
16
+ arm64: 'gtx-cli-darwin-arm64',
17
+ },
18
+ linux: {
19
+ x64: 'gtx-cli-linux-x64',
20
+ arm64: 'gtx-cli-linux-arm64',
21
+ },
22
+ win32: {
23
+ x64: 'gtx-cli-win32-x64.exe',
24
+ },
25
+ };
26
+ return platformMap[platform]?.[arch] || null;
27
+ }
28
+ function routeToBinary() {
29
+ const binaryName = detectPlatform();
30
+ if (!binaryName) {
31
+ return;
32
+ }
33
+ const binaryPath = join(__dirname, '..', 'binaries', binaryName);
34
+ if (!existsSync(binaryPath)) {
35
+ return;
36
+ }
37
+ // Check and fix execute permissions if needed (Unix-like systems only)
38
+ if (process.platform !== 'win32') {
39
+ try {
40
+ const stats = statSync(binaryPath);
41
+ const isExecutable = !!(stats.mode & parseInt('100', 8)); // Check owner execute bit
42
+ if (!isExecutable) {
43
+ chmodSync(binaryPath, 0o755); // Make executable
44
+ }
45
+ }
46
+ catch (error) {
47
+ // If we can't check/fix permissions, continue anyway
48
+ // The spawn might still work or give a more meaningful error
49
+ }
50
+ }
51
+ // Spawn the appropriate binary with all arguments
52
+ const child = spawn(binaryPath, process.argv.slice(2), {
53
+ stdio: 'inherit',
54
+ });
55
+ child.on('close', (code) => {
56
+ process.exit(code);
57
+ });
58
+ child.on('error', () => {
59
+ process.exit(1);
60
+ });
61
+ return;
62
+ }
63
+ // Entry point
64
+ routeToBinary();
@@ -0,0 +1 @@
1
+ export declare const PACKAGE_VERSION = "2.5.30-alpha.10";
@@ -0,0 +1,2 @@
1
+ // This file is auto-generated. Do not edit manually.
2
+ export const PACKAGE_VERSION = '2.5.30-alpha.10';
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import { NextCLI } from './cli/next.js';
3
3
  import { ReactCLI } from './cli/react.js';
4
4
  import { determineLibrary } from './fs/determineFramework.js';
5
5
  export function main(program) {
6
+ program.name('gtx-cli');
6
7
  const { library, additionalModules } = determineLibrary();
7
8
  let cli;
8
9
  if (library === 'gt-next') {