@@ -5,6 +5,7 @@ import * as path from "node:path";
55
66import { window } from "vscode" ;
77
8+ import { readAuthToken } from "./authenticate.ts" ;
89import { parseIni , serializeIni , updateIniSection } from "./ini-parser.ts" ;
910import type { IniFile , IniSection } from "./ini-parser.ts" ;
1011import type { Telemetry } from "./telemetry.ts" ;
@@ -296,6 +297,8 @@ export async function configureAwsProfiles(options: {
296297 const credentialsNeedsOverride =
297298 checkIfCredentialsNeedsOverride ( credentialsSection ) ;
298299
300+ const authToken = await readAuthToken ( ) ;
301+
299302 // means sections exist, but we need to check what's inside
300303 if ( credentialsSection && configSection ) {
301304 if ( ! configNeedsOverride && ! credentialsNeedsOverride ) {
@@ -310,10 +313,11 @@ export async function configureAwsProfiles(options: {
310313 payload : {
311314 namespace : "onboarding" ,
312315 origin : trigger ,
313- position : 3 ,
316+ step_order : 3 ,
314317 started_at : startedAt ,
315318 ended_at : new Date ( ) . toISOString ( ) ,
316319 status : "COMPLETED" ,
320+ auth_token : authToken ,
317321 } ,
318322 } ) ;
319323 return ;
@@ -343,10 +347,11 @@ export async function configureAwsProfiles(options: {
343347 payload : {
344348 namespace : "onboarding" ,
345349 origin : trigger ,
346- position : 3 ,
350+ step_order : 3 ,
347351 started_at : startedAt ,
348352 ended_at : new Date ( ) . toISOString ( ) ,
349353 status : "SKIPPED" ,
354+ auth_token : authToken ,
350355 } ,
351356 } ) ;
352357 return ;
@@ -376,10 +381,11 @@ export async function configureAwsProfiles(options: {
376381 payload : {
377382 namespace : "onboarding" ,
378383 origin : trigger ,
379- position : 3 ,
384+ step_order : 3 ,
380385 started_at : startedAt ,
381386 ended_at : new Date ( ) . toISOString ( ) ,
382387 status : "COMPLETED" ,
388+ auth_token : authToken ,
383389 } ,
384390 } ) ;
385391 } else if ( configNeedsOverride ) {
@@ -398,10 +404,11 @@ export async function configureAwsProfiles(options: {
398404 payload : {
399405 namespace : "onboarding" ,
400406 origin : trigger ,
401- position : 3 ,
407+ step_order : 3 ,
402408 started_at : startedAt ,
403409 ended_at : new Date ( ) . toISOString ( ) ,
404410 status : "COMPLETED" ,
411+ auth_token : authToken ,
405412 } ,
406413 } ) ;
407414 } else if ( credentialsNeedsOverride ) {
@@ -420,10 +427,11 @@ export async function configureAwsProfiles(options: {
420427 payload : {
421428 namespace : "onboarding" ,
422429 origin : trigger ,
423- position : 3 ,
430+ step_order : 3 ,
424431 started_at : startedAt ,
425432 ended_at : new Date ( ) . toISOString ( ) ,
426433 status : "COMPLETED" ,
434+ auth_token : authToken ,
427435 } ,
428436 } ) ;
429437 }
0 commit comments