gtx-cli 2.5.30-alpha.6 → 2.5.30-alpha.8

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.
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,12 +1,11 @@
1
1
  import path from 'node:path';
2
2
  import { fileURLToPath } from 'node:url';
3
- import { logger } from '../console/logger.js';
4
3
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
4
  export function fromPackageRoot(relative) {
6
- logger.debug('fromPackageRoot __dirname' + __dirname);
5
+ console.log('fromPackageRoot __dirname' + __dirname);
7
6
  return path.resolve(__dirname, `../../`, relative);
8
7
  }
9
8
  export function fromBinariesRoot(relative) {
10
- logger.debug('fromBinariesRoot __dirname' + __dirname);
9
+ console.log('fromBinariesRoot __dirname' + __dirname);
11
10
  return path.resolve(__dirname, `../`, relative);
12
11
  }
@@ -33,6 +33,7 @@ export async function getPackageJson(cwd = process.cwd()) {
33
33
  }
34
34
  }
35
35
  export function getCLIVersion() {
36
+ console.log('getCLIVersion');
36
37
  let packageJsonPath = fromPackageRoot('package.json');
37
38
  if (!fs.existsSync(packageJsonPath)) {
38
39
  // Try binaries behavior instead
@@ -42,9 +43,12 @@ export function getCLIVersion() {
42
43
  }
43
44
  }
44
45
  try {
45
- return JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')).version;
46
+ const result = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')).version;
47
+ console.log('CLI version: ' + result);
48
+ return result;
46
49
  }
47
50
  catch (error) {
51
+ console.log(chalk.red('Error getting CLI version: ' + String(error)));
48
52
  return 'unknown';
49
53
  }
50
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtx-cli",
3
- "version": "2.5.30-alpha.6",
3
+ "version": "2.5.30-alpha.8",
4
4
  "main": "dist/index.js",
5
5
  "bin": "dist/router.js",
6
6
  "files": [
@@ -131,7 +131,7 @@
131
131
  },
132
132
  "scripts": {
133
133
  "build": "tsc && pnpm run build:exe",
134
- "build:clean": "sh ../../scripts/clean.sh && pnpm run build",
134
+ "build:clean": "sh ../../scripts/clean.sh && rm -rf binaries && pnpm run build",
135
135
  "build:release": "pnpm run build:clean",
136
136
  "build:exe": "sh scripts/build-exe.sh all",
137
137
  "build:exe:darwin-x64": "sh scripts/build-exe.sh darwin-x64",
@@ -146,6 +146,7 @@
146
146
  "release": "pnpm run build:clean && pnpm publish",
147
147
  "release:alpha": "pnpm run build:clean && pnpm publish --tag alpha",
148
148
  "release:beta": "pnpm run build:clean && pnpm publish --tag beta",
149
+ "release:bin": "pnpm run build:clean && pnpm publish --tag bin",
149
150
  "release:latest": "pnpm run build:clean && pnpm publish --tag latest"
150
151
  }
151
152
  }