jira-ai 0.3.21 → 0.3.22
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/dist/cli.js +6 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -27,6 +27,7 @@ import { CliError } from './types/errors.js';
|
|
|
27
27
|
import { CommandError } from './lib/errors.js';
|
|
28
28
|
import { ui } from './lib/ui.js';
|
|
29
29
|
import { validateOptions, CreateTaskSchema, AddCommentSchema, UpdateDescriptionSchema, RunJqlSchema, IssueKeySchema, ProjectKeySchema } from './lib/validation.js';
|
|
30
|
+
import { realpathSync } from 'fs';
|
|
30
31
|
// Load environment variables
|
|
31
32
|
dotenv.config({ quiet: true });
|
|
32
33
|
// Create CLI program
|
|
@@ -34,7 +35,7 @@ const program = new Command();
|
|
|
34
35
|
program
|
|
35
36
|
.name('jira-ai')
|
|
36
37
|
.description('CLI tool for interacting with Atlassian Jira')
|
|
37
|
-
.version('0.3.
|
|
38
|
+
.version('0.3.22')
|
|
38
39
|
.option('-o, --organization <alias>', 'Override the active Jira organization');
|
|
39
40
|
// Hook to handle the global option before any command runs
|
|
40
41
|
program.on('option:organization', (alias) => {
|
|
@@ -289,7 +290,10 @@ export async function main() {
|
|
|
289
290
|
}
|
|
290
291
|
}
|
|
291
292
|
}
|
|
292
|
-
if
|
|
293
|
+
// Check if this file is being run directly (handles symlinks)
|
|
294
|
+
const scriptPath = process.argv[1] ? realpathSync(process.argv[1]) : '';
|
|
295
|
+
const isMainModule = scriptPath.endsWith('cli.ts') || scriptPath.endsWith('cli.js');
|
|
296
|
+
if (isMainModule) {
|
|
293
297
|
main();
|
|
294
298
|
}
|
|
295
299
|
export { program };
|