snow-flow 4.3.2 → 4.3.3

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.
Files changed (2) hide show
  1. package/dist/cli/auth.js +19 -24
  2. package/package.json +1 -1
package/dist/cli/auth.js CHANGED
@@ -9,42 +9,37 @@ function registerAuthCommands(program) {
9
9
  const auth = program.command('auth').description('ServiceNow authentication management');
10
10
  auth
11
11
  .command('login')
12
- .description('Login to ServiceNow using OAuth 2.0')
13
- .option('--instance <instance>', 'ServiceNow instance (e.g., dev12345.service-now.com)')
14
- .option('--client-id <clientId>', 'OAuth Client ID')
15
- .option('--client-secret <clientSecret>', 'OAuth Client Secret')
16
- .action(async (options) => {
12
+ .description('Login to ServiceNow using OAuth 2.0 (opens browser automatically)')
13
+ .action(async () => {
17
14
  const oauth = new snow_oauth_js_1.ServiceNowOAuth();
18
15
  authLogger.info('šŸ”‘ Starting ServiceNow OAuth authentication...');
19
- // Get credentials from options or environment
20
- const instance = options.instance || process.env.SNOW_INSTANCE;
21
- const clientId = options.clientId || process.env.SNOW_CLIENT_ID;
22
- const clientSecret = options.clientSecret || process.env.SNOW_CLIENT_SECRET;
16
+ // Read credentials from .env file automatically
17
+ const instance = process.env.SNOW_INSTANCE;
18
+ const clientId = process.env.SNOW_CLIENT_ID;
19
+ const clientSecret = process.env.SNOW_CLIENT_SECRET;
23
20
  if (!instance || !clientId || !clientSecret) {
24
- console.error('āŒ Missing required OAuth credentials');
25
- authLogger.info('\nšŸ“ Please provide:');
26
- authLogger.info(' --instance: ServiceNow instance (e.g., dev12345.service-now.com)');
27
- authLogger.info(' --client-id: OAuth Client ID');
28
- authLogger.info(' --client-secret: OAuth Client Secret');
29
- authLogger.info('\nšŸ’” Or set environment variables:');
30
- authLogger.info(' export SNOW_INSTANCE=your-instance.service-now.com');
31
- authLogger.info(' export SNOW_CLIENT_ID=your-client-id');
32
- authLogger.info(' export SNOW_CLIENT_SECRET=your-client-secret');
21
+ console.error('āŒ Missing required OAuth credentials in .env file');
22
+ authLogger.info('\nšŸ“ Please add these to your .env file:');
23
+ authLogger.info(' SNOW_INSTANCE=your-instance.service-now.com');
24
+ authLogger.info(' SNOW_CLIENT_ID=your-client-id');
25
+ authLogger.info(' SNOW_CLIENT_SECRET=your-client-secret');
26
+ authLogger.info('\nšŸ’” Then run: snow-flow auth login');
33
27
  return;
34
28
  }
35
- // Start OAuth flow
29
+ authLogger.info(`🌐 Instance: ${instance}`);
30
+ authLogger.info('šŸš€ Opening ServiceNow OAuth page in browser...');
31
+ // Start OAuth flow (this opens browser automatically)
36
32
  const result = await oauth.authenticate(instance, clientId, clientSecret);
37
33
  if (result.success) {
38
34
  authLogger.info('\nāœ… Authentication successful!');
39
35
  authLogger.info('šŸŽ‰ Snow-Flow is now connected to ServiceNow!');
40
- authLogger.info('\nšŸ“‹ Next steps:');
41
- authLogger.info(' 1. Test connection: snow-flow auth status');
42
- authLogger.info(' 2. Start development: snow-flow swarm "create a widget for incident management"');
36
+ authLogger.info('\nšŸ“‹ Ready for ServiceNow development!');
37
+ authLogger.info(' Next: snow-flow swarm "your task here"');
43
38
  // Test connection
44
39
  const client = new servicenow_client_js_1.ServiceNowClient();
45
40
  const testResult = await client.testConnection();
46
41
  if (testResult.success) {
47
- authLogger.info(`\nšŸ” Connection test successful!`);
42
+ authLogger.info(`\nšŸ” Connection verified!`);
48
43
  authLogger.info(`šŸ‘¤ Logged in as: ${testResult.data.name} (${testResult.data.user_name})`);
49
44
  }
50
45
  }
@@ -98,7 +93,7 @@ function registerAuthCommands(program) {
98
93
  console.log(' ā”œā”€ā”€ Status: āŒ Not authenticated');
99
94
  console.log(' ā”œā”€ā”€ Instance: Not configured');
100
95
  console.log(' └── Method: Not set');
101
- console.log('\nšŸ’” Run "snow-flow auth login" to authenticate');
96
+ console.log('\nšŸ’” Create .env file and run "snow-flow auth login"');
102
97
  }
103
98
  });
104
99
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "4.3.2",
3
+ "version": "4.3.3",
4
4
  "description": "Conversational ServiceNow development platform using Claude Code. Multi-agent orchestration with 20+ MCP servers providing 200+ ServiceNow tools for comprehensive platform development.",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",