|
|
@ -2,6 +2,11 @@ |
|
|
|
import { execSync, exec } from 'child_process' |
|
|
|
import { execSync, exec } from 'child_process' |
|
|
|
import { AO_MANUAL_PATH } from './manual.js' |
|
|
|
import { AO_MANUAL_PATH } from './manual.js' |
|
|
|
import { loadJsonFile } from './files.js' |
|
|
|
import { loadJsonFile } from './files.js' |
|
|
|
|
|
|
|
import path from 'path' |
|
|
|
|
|
|
|
import { fileURLToPath } from 'url' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const __filename = fileURLToPath(import.meta.url) |
|
|
|
|
|
|
|
const __dirname = path.dirname(__filename) |
|
|
|
|
|
|
|
|
|
|
|
// Adds a line to .bashrc to make 'ao' an alias for 'ao-cli', to simplify using the AO from the command line
|
|
|
|
// Adds a line to .bashrc to make 'ao' an alias for 'ao-cli', to simplify using the AO from the command line
|
|
|
|
export function installAoAlias() { |
|
|
|
export function installAoAlias() { |
|
|
@ -15,7 +20,7 @@ export function installAoAlias() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export async function getAoCliVersion() { |
|
|
|
export async function getAoCliVersion() { |
|
|
|
const packageJson = await loadJsonFile('./package.json') |
|
|
|
const packageJson = await loadJsonFile(path.join(__dirname, '../package.json')) |
|
|
|
return packageJson.version |
|
|
|
return packageJson.version |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|