version.ts
1 import type { Command, LocalCommandCall } from '../types/command.js' 2 3 const call: LocalCommandCall = async () => { 4 return { 5 type: 'text', 6 value: MACRO.BUILD_TIME 7 ? `${MACRO.VERSION} (built ${MACRO.BUILD_TIME})` 8 : MACRO.VERSION, 9 } 10 } 11 12 const version = { 13 type: 'local', 14 name: 'version', 15 description: 16 'Print the version this session is running (not what autoupdate downloaded)', 17 isEnabled: () => process.env.USER_TYPE === 'ant', 18 supportsNonInteractive: true, 19 load: () => Promise.resolve({ call }), 20 } satisfies Command 21 22 export default version