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.
- package/dist/cli/auth.js +19 -24
- 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
|
-
.
|
|
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
|
-
//
|
|
20
|
-
const instance =
|
|
21
|
-
const clientId =
|
|
22
|
-
const clientSecret =
|
|
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
|
|
26
|
-
authLogger.info('
|
|
27
|
-
authLogger.info('
|
|
28
|
-
authLogger.info('
|
|
29
|
-
authLogger.info('\nš”
|
|
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
|
-
|
|
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š
|
|
41
|
-
authLogger.info('
|
|
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
|
|
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š”
|
|
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.
|
|
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",
|