@inworld/cli 1.0.0-rc.1 → 1.0.0-rc.2
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/index.js +15 -15
- package/package.json +1 -1
- package/dist/package.json +0 -53
- package/dist/proto/generated/portal/ai/inworld/language_codes/language_codes.pb.d.ts +0 -10
- package/dist/proto/generated/portal/ai/inworld/language_codes/language_codes.pb.d.ts.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/language_codes/language_codes.pb.js +0 -15
- package/dist/proto/generated/portal/ai/inworld/language_codes/language_codes.pb.js.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1/errors.pb.d.ts +0 -13
- package/dist/proto/generated/portal/ai/inworld/studio/v1/errors.pb.d.ts.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1/errors.pb.js +0 -2
- package/dist/proto/generated/portal/ai/inworld/studio/v1/errors.pb.js.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1/operations.pb.d.ts +0 -7
- package/dist/proto/generated/portal/ai/inworld/studio/v1/operations.pb.d.ts.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1/operations.pb.js +0 -14
- package/dist/proto/generated/portal/ai/inworld/studio/v1/operations.pb.js.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1/remote/configuration/graph_configuration.pb.d.ts +0 -14
- package/dist/proto/generated/portal/ai/inworld/studio/v1/remote/configuration/graph_configuration.pb.d.ts.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1/remote/configuration/graph_configuration.pb.js +0 -6
- package/dist/proto/generated/portal/ai/inworld/studio/v1/remote/configuration/graph_configuration.pb.js.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1/remote/configuration/graphs.pb.d.ts +0 -116
- package/dist/proto/generated/portal/ai/inworld/studio/v1/remote/configuration/graphs.pb.d.ts.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1/remote/configuration/graphs.pb.js +0 -71
- package/dist/proto/generated/portal/ai/inworld/studio/v1/remote/configuration/graphs.pb.js.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1/remote/configuration/targeting.pb.d.ts +0 -14
- package/dist/proto/generated/portal/ai/inworld/studio/v1/remote/configuration/targeting.pb.d.ts.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1/remote/configuration/targeting.pb.js +0 -6
- package/dist/proto/generated/portal/ai/inworld/studio/v1/remote/configuration/targeting.pb.js.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/apikeys.pb.d.ts +0 -78
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/apikeys.pb.d.ts.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/apikeys.pb.js +0 -39
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/apikeys.pb.js.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/impression_event_data.pb.d.ts +0 -10
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/impression_event_data.pb.d.ts.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/impression_event_data.pb.js +0 -6
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/impression_event_data.pb.js.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/language_code.pb.d.ts +0 -7
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/language_code.pb.d.ts.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/language_code.pb.js +0 -12
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/language_code.pb.js.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/users.pb.d.ts +0 -115
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/users.pb.d.ts.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/users.pb.js +0 -85
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/users.pb.js.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/workspaces.pb.d.ts +0 -255
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/workspaces.pb.d.ts.map +0 -1
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/workspaces.pb.js +0 -87
- package/dist/proto/generated/portal/ai/inworld/studio/v1alpha/workspaces.pb.js.map +0 -1
- package/dist/proto/generated/portal/fetch.pb.d.ts +0 -26
- package/dist/proto/generated/portal/fetch.pb.d.ts.map +0 -1
- package/dist/proto/generated/portal/fetch.pb.js +0 -274
- package/dist/proto/generated/portal/fetch.pb.js.map +0 -1
- package/dist/src/auth/callback_server.d.ts +0 -41
- package/dist/src/auth/callback_server.d.ts.map +0 -1
- package/dist/src/auth/callback_server.js +0 -136
- package/dist/src/auth/callback_server.js.map +0 -1
- package/dist/src/auth/manager.d.ts +0 -97
- package/dist/src/auth/manager.d.ts.map +0 -1
- package/dist/src/auth/manager.js +0 -338
- package/dist/src/auth/manager.js.map +0 -1
- package/dist/src/auth/utils.d.ts +0 -45
- package/dist/src/auth/utils.d.ts.map +0 -1
- package/dist/src/auth/utils.js +0 -183
- package/dist/src/auth/utils.js.map +0 -1
- package/dist/src/commands/auth/disable_telemetry_command.d.ts +0 -3
- package/dist/src/commands/auth/disable_telemetry_command.d.ts.map +0 -1
- package/dist/src/commands/auth/disable_telemetry_command.js +0 -21
- package/dist/src/commands/auth/disable_telemetry_command.js.map +0 -1
- package/dist/src/commands/auth/enable_telemetry_command.d.ts +0 -3
- package/dist/src/commands/auth/enable_telemetry_command.d.ts.map +0 -1
- package/dist/src/commands/auth/enable_telemetry_command.js +0 -22
- package/dist/src/commands/auth/enable_telemetry_command.js.map +0 -1
- package/dist/src/commands/auth/login_ci_command.d.ts +0 -3
- package/dist/src/commands/auth/login_ci_command.d.ts.map +0 -1
- package/dist/src/commands/auth/login_ci_command.js +0 -41
- package/dist/src/commands/auth/login_ci_command.js.map +0 -1
- package/dist/src/commands/auth/login_command.d.ts +0 -4
- package/dist/src/commands/auth/login_command.d.ts.map +0 -1
- package/dist/src/commands/auth/login_command.js +0 -134
- package/dist/src/commands/auth/login_command.js.map +0 -1
- package/dist/src/commands/auth/logout_command.d.ts +0 -4
- package/dist/src/commands/auth/logout_command.d.ts.map +0 -1
- package/dist/src/commands/auth/logout_command.js +0 -54
- package/dist/src/commands/auth/logout_command.js.map +0 -1
- package/dist/src/commands/auth/print_access_token_command.d.ts +0 -3
- package/dist/src/commands/auth/print_access_token_command.d.ts.map +0 -1
- package/dist/src/commands/auth/print_access_token_command.js +0 -21
- package/dist/src/commands/auth/print_access_token_command.js.map +0 -1
- package/dist/src/commands/auth/print_api_key_command.d.ts +0 -3
- package/dist/src/commands/auth/print_api_key_command.d.ts.map +0 -1
- package/dist/src/commands/auth/print_api_key_command.js +0 -26
- package/dist/src/commands/auth/print_api_key_command.js.map +0 -1
- package/dist/src/commands/auth/status_command.d.ts +0 -4
- package/dist/src/commands/auth/status_command.d.ts.map +0 -1
- package/dist/src/commands/auth/status_command.js +0 -84
- package/dist/src/commands/auth/status_command.js.map +0 -1
- package/dist/src/commands/auth_command.d.ts +0 -3
- package/dist/src/commands/auth_command.d.ts.map +0 -1
- package/dist/src/commands/auth_command.js +0 -24
- package/dist/src/commands/auth_command.js.map +0 -1
- package/dist/src/commands/graph/graph_deploy_command.d.ts +0 -24
- package/dist/src/commands/graph/graph_deploy_command.d.ts.map +0 -1
- package/dist/src/commands/graph/graph_deploy_command.js +0 -204
- package/dist/src/commands/graph/graph_deploy_command.js.map +0 -1
- package/dist/src/commands/graph/graph_init_command.d.ts +0 -4
- package/dist/src/commands/graph/graph_init_command.d.ts.map +0 -1
- package/dist/src/commands/graph/graph_init_command.js +0 -335
- package/dist/src/commands/graph/graph_init_command.js.map +0 -1
- package/dist/src/commands/graph/graph_run_command.d.ts +0 -24
- package/dist/src/commands/graph/graph_run_command.d.ts.map +0 -1
- package/dist/src/commands/graph/graph_run_command.js +0 -50
- package/dist/src/commands/graph/graph_run_command.js.map +0 -1
- package/dist/src/commands/graph/graph_serve_command.d.ts +0 -4
- package/dist/src/commands/graph/graph_serve_command.d.ts.map +0 -1
- package/dist/src/commands/graph/graph_serve_command.js +0 -40
- package/dist/src/commands/graph/graph_serve_command.js.map +0 -1
- package/dist/src/commands/graph/graph_variant_command.d.ts +0 -3
- package/dist/src/commands/graph/graph_variant_command.d.ts.map +0 -1
- package/dist/src/commands/graph/graph_variant_command.js +0 -13
- package/dist/src/commands/graph/graph_variant_command.js.map +0 -1
- package/dist/src/commands/graph/graph_visualize_command.d.ts +0 -7
- package/dist/src/commands/graph/graph_visualize_command.d.ts.map +0 -1
- package/dist/src/commands/graph/graph_visualize_command.js +0 -35
- package/dist/src/commands/graph/graph_visualize_command.js.map +0 -1
- package/dist/src/commands/graph/variant/graph_variant_list_command.d.ts +0 -3
- package/dist/src/commands/graph/variant/graph_variant_list_command.d.ts.map +0 -1
- package/dist/src/commands/graph/variant/graph_variant_list_command.js +0 -26
- package/dist/src/commands/graph/variant/graph_variant_list_command.js.map +0 -1
- package/dist/src/commands/graph/variant/graph_variant_print_command.d.ts +0 -7
- package/dist/src/commands/graph/variant/graph_variant_print_command.d.ts.map +0 -1
- package/dist/src/commands/graph/variant/graph_variant_print_command.js +0 -46
- package/dist/src/commands/graph/variant/graph_variant_print_command.js.map +0 -1
- package/dist/src/commands/graph/variant/graph_variant_register_command.d.ts +0 -3
- package/dist/src/commands/graph/variant/graph_variant_register_command.d.ts.map +0 -1
- package/dist/src/commands/graph/variant/graph_variant_register_command.js +0 -46
- package/dist/src/commands/graph/variant/graph_variant_register_command.js.map +0 -1
- package/dist/src/commands/graph_command.d.ts +0 -3
- package/dist/src/commands/graph_command.d.ts.map +0 -1
- package/dist/src/commands/graph_command.js +0 -20
- package/dist/src/commands/graph_command.js.map +0 -1
- package/dist/src/commands/tts/tts_clone_command.d.ts +0 -6
- package/dist/src/commands/tts/tts_clone_command.d.ts.map +0 -1
- package/dist/src/commands/tts/tts_clone_command.js +0 -80
- package/dist/src/commands/tts/tts_clone_command.js.map +0 -1
- package/dist/src/commands/tts/tts_design_command.d.ts +0 -6
- package/dist/src/commands/tts/tts_design_command.d.ts.map +0 -1
- package/dist/src/commands/tts/tts_design_command.js +0 -216
- package/dist/src/commands/tts/tts_design_command.js.map +0 -1
- package/dist/src/commands/tts/tts_list_voices_command.d.ts +0 -6
- package/dist/src/commands/tts/tts_list_voices_command.d.ts.map +0 -1
- package/dist/src/commands/tts/tts_list_voices_command.js +0 -108
- package/dist/src/commands/tts/tts_list_voices_command.js.map +0 -1
- package/dist/src/commands/tts/tts_synthesize_command.d.ts +0 -6
- package/dist/src/commands/tts/tts_synthesize_command.d.ts.map +0 -1
- package/dist/src/commands/tts/tts_synthesize_command.js +0 -351
- package/dist/src/commands/tts/tts_synthesize_command.js.map +0 -1
- package/dist/src/commands/tts/tts_utils.d.ts +0 -14
- package/dist/src/commands/tts/tts_utils.d.ts.map +0 -1
- package/dist/src/commands/tts/tts_utils.js +0 -84
- package/dist/src/commands/tts/tts_utils.js.map +0 -1
- package/dist/src/commands/tts_commands.d.ts +0 -6
- package/dist/src/commands/tts_commands.d.ts.map +0 -1
- package/dist/src/commands/tts_commands.js +0 -18
- package/dist/src/commands/tts_commands.js.map +0 -1
- package/dist/src/commands/workspace_command.d.ts +0 -22
- package/dist/src/commands/workspace_command.d.ts.map +0 -1
- package/dist/src/commands/workspace_command.js +0 -72
- package/dist/src/commands/workspace_command.js.map +0 -1
- package/dist/src/constants.d.ts +0 -11
- package/dist/src/constants.d.ts.map +0 -1
- package/dist/src/constants.js +0 -48
- package/dist/src/constants.js.map +0 -1
- package/dist/src/grpc/core/InworldError.d.ts +0 -30
- package/dist/src/grpc/core/InworldError.d.ts.map +0 -1
- package/dist/src/grpc/core/InworldError.js +0 -46
- package/dist/src/grpc/core/InworldError.js.map +0 -1
- package/dist/src/grpc/core/statusCodes.d.ts +0 -122
- package/dist/src/grpc/core/statusCodes.d.ts.map +0 -1
- package/dist/src/grpc/core/statusCodes.js +0 -133
- package/dist/src/grpc/core/statusCodes.js.map +0 -1
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -139
- package/dist/src/index.js.map +0 -1
- package/dist/src/services/analytics.d.ts +0 -45
- package/dist/src/services/analytics.d.ts.map +0 -1
- package/dist/src/services/analytics.js +0 -139
- package/dist/src/services/analytics.js.map +0 -1
- package/dist/src/services/deploy_service.d.ts +0 -4
- package/dist/src/services/deploy_service.d.ts.map +0 -1
- package/dist/src/services/deploy_service.js +0 -128
- package/dist/src/services/deploy_service.js.map +0 -1
- package/dist/src/services/graph_loader.d.ts +0 -7
- package/dist/src/services/graph_loader.d.ts.map +0 -1
- package/dist/src/services/graph_loader.js +0 -103
- package/dist/src/services/graph_loader.js.map +0 -1
- package/dist/src/services/graph_variant_service.d.ts +0 -12
- package/dist/src/services/graph_variant_service.d.ts.map +0 -1
- package/dist/src/services/graph_variant_service.js +0 -66
- package/dist/src/services/graph_variant_service.js.map +0 -1
- package/dist/src/services/template_service.d.ts +0 -79
- package/dist/src/services/template_service.d.ts.map +0 -1
- package/dist/src/services/template_service.js +0 -299
- package/dist/src/services/template_service.js.map +0 -1
- package/dist/src/services/tts_service.d.ts +0 -340
- package/dist/src/services/tts_service.d.ts.map +0 -1
- package/dist/src/services/tts_service.js +0 -320
- package/dist/src/services/tts_service.js.map +0 -1
- package/dist/src/services/update_checker.d.ts +0 -37
- package/dist/src/services/update_checker.d.ts.map +0 -1
- package/dist/src/services/update_checker.js +0 -134
- package/dist/src/services/update_checker.js.map +0 -1
- package/dist/src/services/workspace_service.d.ts +0 -53
- package/dist/src/services/workspace_service.d.ts.map +0 -1
- package/dist/src/services/workspace_service.js +0 -324
- package/dist/src/services/workspace_service.js.map +0 -1
- package/dist/src/utils/array.d.ts +0 -2
- package/dist/src/utils/array.d.ts.map +0 -1
- package/dist/src/utils/array.js +0 -4
- package/dist/src/utils/array.js.map +0 -1
- package/dist/src/utils/audio_player.d.ts +0 -10
- package/dist/src/utils/audio_player.d.ts.map +0 -1
- package/dist/src/utils/audio_player.js +0 -34
- package/dist/src/utils/audio_player.js.map +0 -1
- package/dist/src/utils/confirm.d.ts +0 -62
- package/dist/src/utils/confirm.d.ts.map +0 -1
- package/dist/src/utils/confirm.js +0 -90
- package/dist/src/utils/confirm.js.map +0 -1
- package/dist/src/utils/long_running_operations.d.ts +0 -38
- package/dist/src/utils/long_running_operations.d.ts.map +0 -1
- package/dist/src/utils/long_running_operations.js +0 -62
- package/dist/src/utils/long_running_operations.js.map +0 -1
- package/dist/src/utils/resource_name_helper.d.ts +0 -17
- package/dist/src/utils/resource_name_helper.d.ts.map +0 -1
- package/dist/src/utils/resource_name_helper.js +0 -38
- package/dist/src/utils/resource_name_helper.js.map +0 -1
- package/dist/src/utils/selector.d.ts +0 -62
- package/dist/src/utils/selector.d.ts.map +0 -1
- package/dist/src/utils/selector.js +0 -76
- package/dist/src/utils/selector.js.map +0 -1
- package/dist/src/utils/spinner.d.ts +0 -75
- package/dist/src/utils/spinner.d.ts.map +0 -1
- package/dist/src/utils/spinner.js +0 -178
- package/dist/src/utils/spinner.js.map +0 -1
- package/dist/src/utils/ui.d.ts +0 -27
- package/dist/src/utils/ui.d.ts.map +0 -1
- package/dist/src/utils/ui.js +0 -89
- package/dist/src/utils/ui.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enable_telemetry_command.js","sourceRoot":"","sources":["../../../../src/commands/auth/enable_telemetry_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,MAAM,qBAAqB,GAAG,KAAK,IAAI,EAAE;IACvC,IAAI,CAAC;QACH,SAAS,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACpC,EAAE,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAClC,EAAE,CAAC,KAAK,CACN,mEAAmE,CACpE,CAAC;QACF,EAAE,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;QAChE,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,gCAAgC,CAAC,EAAE,CAAC,CAAC;QAC3D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,EAAE,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;QAC7C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,OAAO,CAAC,sBAAsB,CAAC;KACtE,WAAW,CAAC,sCAAsC,CAAC;KACnD,MAAM,CAAC,qBAAqB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"login_ci_command.d.ts","sourceRoot":"","sources":["../../../../src/commands/auth/login_ci_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkDpC,eAAO,MAAM,cAAc,SAQH,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import { authManager } from '@/auth/manager';
|
|
3
|
-
import { INWORLD_ENV } from '@/constants';
|
|
4
|
-
import { WorkspaceService } from '@/services/workspace_service.js';
|
|
5
|
-
import { setGlobalForceYes } from '@/utils/confirm.js';
|
|
6
|
-
import * as ui from '@/utils/ui';
|
|
7
|
-
const loginCiAction = async (options) => {
|
|
8
|
-
try {
|
|
9
|
-
// Enable auto-confirm for all prompts in CI mode
|
|
10
|
-
setGlobalForceYes(true);
|
|
11
|
-
console.log();
|
|
12
|
-
ui.printHeader('🎭 Authenticating with external Firebase token');
|
|
13
|
-
console.log();
|
|
14
|
-
const success = await authManager.authenticateAndSaveCredentials(options.token, options.refreshToken || options.token, // Use token as fallback if no refresh token
|
|
15
|
-
options.email,
|
|
16
|
-
/* workspace */ undefined, INWORLD_ENV);
|
|
17
|
-
if (!success) {
|
|
18
|
-
ui.printError('Failed to authenticate with provided token');
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|
|
21
|
-
console.log();
|
|
22
|
-
ui.success('✓ Authentication successful!');
|
|
23
|
-
ui.print(`Email: ${options.email}`);
|
|
24
|
-
await WorkspaceService.activateWorkspace({ forceFirst: true });
|
|
25
|
-
ui.print('\nAuthentication completed.');
|
|
26
|
-
process.exit(0);
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
console.log();
|
|
30
|
-
ui.printError('Token-based authentication failed:');
|
|
31
|
-
console.error(error);
|
|
32
|
-
process.exit(1);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
export const loginCiCommand = new Command('login-ci')
|
|
36
|
-
.description('Authenticate using Firebase token (for CI/testing)')
|
|
37
|
-
.requiredOption('-t, --token <token>', 'Firebase ID token')
|
|
38
|
-
.requiredOption('-e, --email <email>', 'Email address')
|
|
39
|
-
.option('-r, --refresh-token <refreshToken>', 'Firebase refresh token (optional, enables token refresh)')
|
|
40
|
-
.action(loginCiAction);
|
|
41
|
-
//# sourceMappingURL=login_ci_command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"login_ci_command.js","sourceRoot":"","sources":["../../../../src/commands/auth/login_ci_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAA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O,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;KAClD,WAAW,CAAC,oDAAoD,CAAC;KACjE,cAAc,CAAC,qBAAqB,EAAE,mBAAmB,CAAC;KAC1D,cAAc,CAAC,qBAAqB,EAAE,eAAe,CAAC;KACtD,MAAM,CACL,oCAAoC,EACpC,0DAA0D,CAC3D;KACA,MAAM,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"login_command.d.ts","sourceRoot":"","sources":["../../../../src/commands/auth/login_command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgLpC,eAAO,MAAM,YAAY,SAExB,CAAC;AAEF,eAAO,MAAM,iBAAiB,SAE7B,CAAC"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { exec } from 'child_process';
|
|
2
|
-
import { Command } from 'commander';
|
|
3
|
-
import * as readline from 'readline';
|
|
4
|
-
import { promisify } from 'util';
|
|
5
|
-
import { createCallbackServer, stopCallbackServer, } from '@/auth/callback_server';
|
|
6
|
-
import { authManager } from '@/auth/manager';
|
|
7
|
-
import { INWORLD_CLI_AUTH_CALLBACK_PORT, INWORLD_CLI_AUTH_URL, INWORLD_ENV, } from '@/constants';
|
|
8
|
-
import { WorkspaceService } from '@/services/workspace_service.js';
|
|
9
|
-
import * as ui from '@/utils/ui';
|
|
10
|
-
const execAsync = promisify(exec);
|
|
11
|
-
const loginAction = async (options) => {
|
|
12
|
-
let authServerResult = null;
|
|
13
|
-
try {
|
|
14
|
-
if (!options.force && (await authManager.isAuthenticated())) {
|
|
15
|
-
const credentials = await authManager.getCredentials();
|
|
16
|
-
const email = credentials?.email || 'Unknown';
|
|
17
|
-
console.log();
|
|
18
|
-
ui.print('⚠ You are already authenticated');
|
|
19
|
-
ui.print(`Current account: ${email}`);
|
|
20
|
-
console.log();
|
|
21
|
-
ui.print('Use --force flag to re-authenticate:');
|
|
22
|
-
ui.print(' inworld login --force');
|
|
23
|
-
// Check if token is still valid
|
|
24
|
-
const isValid = await authManager.isTokenValid();
|
|
25
|
-
if (!isValid) {
|
|
26
|
-
console.log();
|
|
27
|
-
ui.print('Note: Your token has expired but will be automatically refreshed when needed.');
|
|
28
|
-
}
|
|
29
|
-
process.exit(0);
|
|
30
|
-
}
|
|
31
|
-
console.log();
|
|
32
|
-
ui.printHeader('🎭 Welcome to Inworld CLI!');
|
|
33
|
-
// If forcing re-authentication, show current account
|
|
34
|
-
if (options.force && (await authManager.isAuthenticated())) {
|
|
35
|
-
const credentials = await authManager.getCredentials();
|
|
36
|
-
const email = credentials?.email || 'Unknown';
|
|
37
|
-
ui.print(`Currently logged in as: ${email}`);
|
|
38
|
-
ui.print('Proceeding with re-authentication...');
|
|
39
|
-
console.log();
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
ui.print("Let's get you authenticated.");
|
|
43
|
-
console.log();
|
|
44
|
-
}
|
|
45
|
-
const serverPromise = createCallbackServer({
|
|
46
|
-
port: INWORLD_CLI_AUTH_CALLBACK_PORT,
|
|
47
|
-
});
|
|
48
|
-
ui.print('Please visit the following URL to authenticate:');
|
|
49
|
-
ui.printLink(`${INWORLD_CLI_AUTH_URL}\n`);
|
|
50
|
-
const readlineInterface = readline.createInterface({
|
|
51
|
-
input: process.stdin,
|
|
52
|
-
output: process.stdout,
|
|
53
|
-
});
|
|
54
|
-
const enterPromise = new Promise((resolve) => {
|
|
55
|
-
readlineInterface.question('Press Enter to open your browser...', () => {
|
|
56
|
-
resolve();
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
const result = await Promise.race([
|
|
60
|
-
enterPromise.then(() => ({ type: 'enter' })),
|
|
61
|
-
serverPromise.then((result) => ({ type: 'auth', result })),
|
|
62
|
-
]);
|
|
63
|
-
readlineInterface.close();
|
|
64
|
-
if (result.type === 'auth') {
|
|
65
|
-
// Authentication completed before Enter was pressed
|
|
66
|
-
authServerResult = result.result;
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
// User pressed Enter, open browser
|
|
70
|
-
const openCommand = process.platform === 'darwin'
|
|
71
|
-
? 'open'
|
|
72
|
-
: process.platform === 'win32'
|
|
73
|
-
? 'start'
|
|
74
|
-
: 'xdg-open';
|
|
75
|
-
try {
|
|
76
|
-
await execAsync(`${openCommand} ${INWORLD_CLI_AUTH_URL}`);
|
|
77
|
-
ui.success('✓ Browser opened');
|
|
78
|
-
}
|
|
79
|
-
catch (_error) {
|
|
80
|
-
ui.print('⚠ Could not open browser automatically. Please open the URL manually.');
|
|
81
|
-
}
|
|
82
|
-
console.log();
|
|
83
|
-
ui.print('Waiting for authentication...');
|
|
84
|
-
authServerResult = await serverPromise;
|
|
85
|
-
}
|
|
86
|
-
console.log();
|
|
87
|
-
ui.success('✓ Authentication successful!');
|
|
88
|
-
console.log();
|
|
89
|
-
ui.print('User information:');
|
|
90
|
-
ui.printBright(`Email: ${authServerResult.email}\n`);
|
|
91
|
-
const success = await authManager.authenticateAndSaveCredentials(authServerResult.token, authServerResult.refreshToken, authServerResult.email,
|
|
92
|
-
/* workspace */ undefined, INWORLD_ENV);
|
|
93
|
-
if (!success) {
|
|
94
|
-
ui.printError('\nFailed to complete authentication setup');
|
|
95
|
-
ui.print('You may need to login again.');
|
|
96
|
-
}
|
|
97
|
-
// Close the server
|
|
98
|
-
stopCallbackServer(authServerResult.server);
|
|
99
|
-
console.log();
|
|
100
|
-
ui.print('You are now authenticated with Inworld services.');
|
|
101
|
-
ui.print('Your credentials have been securely stored.');
|
|
102
|
-
await WorkspaceService.activateWorkspace({ forceFirst: true });
|
|
103
|
-
ui.print('\nIf you want to change the workspace, you can run command:');
|
|
104
|
-
ui.printBright('inworld workspace select');
|
|
105
|
-
ui.print('\nIf you want to see authentication status, you can run command:');
|
|
106
|
-
ui.printBright('inworld auth status');
|
|
107
|
-
ui.print('\nAuthentication completed.');
|
|
108
|
-
process.exit(0);
|
|
109
|
-
}
|
|
110
|
-
catch (error) {
|
|
111
|
-
// Clean up server if it exists
|
|
112
|
-
if (authServerResult?.server) {
|
|
113
|
-
try {
|
|
114
|
-
await stopCallbackServer(authServerResult.server);
|
|
115
|
-
}
|
|
116
|
-
catch (_closeError) {
|
|
117
|
-
// Ignore close errors
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
console.log();
|
|
121
|
-
ui.printError('Authentication failed:');
|
|
122
|
-
console.error(error);
|
|
123
|
-
process.exit(1);
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
const makeLoginCommand = (description) => {
|
|
127
|
-
return new Command('login')
|
|
128
|
-
.description(description)
|
|
129
|
-
.option('-f, --force', 'Force re-authentication even if already logged in')
|
|
130
|
-
.action(loginAction);
|
|
131
|
-
};
|
|
132
|
-
export const loginCommand = makeLoginCommand('Authenticate with Inworld Platform');
|
|
133
|
-
export const loginCommandAlias = makeLoginCommand(`Alias for "${ui.bold('inworld auth login')}"`);
|
|
134
|
-
//# sourceMappingURL=login_command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"login_command.js","sourceRoot":"","sources":["../../../../src/commands/auth/login_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACL,8BAA8B,EAC9B,oBAAoB,EACpB,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAA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AW,CAAC;SACxB,MAAM,CAAC,aAAa,EAAE,mDAAmD,CAAC;SAC1E,MAAM,CAAC,WAAW,CAAC,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAC1C,oCAAoC,CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,gBAAgB,CAC/C,cAAc,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAC/C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logout_command.d.ts","sourceRoot":"","sources":["../../../../src/commands/auth/logout_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8DpC,eAAO,MAAM,kBAAkB,SAE9B,CAAC;AAEF,eAAO,MAAM,aAAa,SAEzB,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import { authManager } from '@/auth/manager';
|
|
3
|
-
import { confirm } from '@/utils/confirm';
|
|
4
|
-
import * as ui from '@/utils/ui';
|
|
5
|
-
const logoutAction = async (options) => {
|
|
6
|
-
try {
|
|
7
|
-
// Check if user is authenticated
|
|
8
|
-
const isAuthenticated = await authManager.isAuthenticated();
|
|
9
|
-
if (!isAuthenticated) {
|
|
10
|
-
ui.print('You are not currently authenticated.');
|
|
11
|
-
process.exit(0);
|
|
12
|
-
}
|
|
13
|
-
// Get stored credentials to show which account is being logged out
|
|
14
|
-
const credentials = await authManager.getCredentials();
|
|
15
|
-
const email = credentials?.email || 'Unknown user';
|
|
16
|
-
console.log();
|
|
17
|
-
ui.printHeader('🎭 Inworld CLI - Logout');
|
|
18
|
-
ui.print(`Current account: ${email}`);
|
|
19
|
-
// Ask for confirmation unless --force flag is used
|
|
20
|
-
if (!options.force) {
|
|
21
|
-
const confirmed = await confirm({
|
|
22
|
-
message: '\nAre you sure you want to logout? (y/N): ',
|
|
23
|
-
defaultValue: false,
|
|
24
|
-
});
|
|
25
|
-
if (!confirmed) {
|
|
26
|
-
console.log();
|
|
27
|
-
ui.print('Logout cancelled.');
|
|
28
|
-
process.exit(0);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
// Clear credentials
|
|
32
|
-
console.log();
|
|
33
|
-
ui.print('Clearing stored credentials...');
|
|
34
|
-
await authManager.clearCredentials();
|
|
35
|
-
ui.success('✓ Successfully logged out.');
|
|
36
|
-
ui.print('You will need to authenticate again to use Inworld services.');
|
|
37
|
-
process.exit(0);
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
console.log();
|
|
41
|
-
ui.printError('Failed to logout:');
|
|
42
|
-
console.error(error);
|
|
43
|
-
process.exit(1);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const makeLogoutCommand = (description) => {
|
|
47
|
-
return new Command('logout')
|
|
48
|
-
.description(description)
|
|
49
|
-
.option('-f, --force', 'Skip confirmation prompt')
|
|
50
|
-
.action(logoutAction);
|
|
51
|
-
};
|
|
52
|
-
export const logoutCommandAlias = makeLogoutCommand(`Alias for "${ui.bold('inworld auth logout')}"`);
|
|
53
|
-
export const logoutCommand = makeLogoutCommand('Clear stored authentication credentials');
|
|
54
|
-
//# sourceMappingURL=logout_command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logout_command.js","sourceRoot":"","sources":["../../../../src/commands/auth/logout_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,MAAM,YAAY,GAAG,KAAK,EAAE,OAA2B,EAAE,EAAE;IACzD,IAAI,CAAC;QACH,iCAAiC;QACjC,MAAM,eAAe,GAAG,MAAM,W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AC,mBAAmB,CAAC,CAAC;QACnC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,WAAmB,EAAE,EAAE;IAChD,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC;SACzB,WAAW,CAAC,WAAW,CAAC;SACxB,MAAM,CAAC,aAAa,EAAE,0BAA0B,CAAC;SACjD,MAAM,CAAC,YAAY,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CACjD,cAAc,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAChD,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAC5C,yCAAyC,CAC1C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"print_access_token_command.d.ts","sourceRoot":"","sources":["../../../../src/commands/auth/print_access_token_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBpC,eAAO,MAAM,uBAAuB,SAEH,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import { authManager } from '@/auth/manager';
|
|
3
|
-
const printAccessTokenAction = async () => {
|
|
4
|
-
try {
|
|
5
|
-
// Get valid token (this will refresh if needed)
|
|
6
|
-
const token = await authManager.getValidToken();
|
|
7
|
-
if (token) {
|
|
8
|
-
console.log(token);
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
// No token found or failed to refresh
|
|
12
|
-
process.exit(1);
|
|
13
|
-
}
|
|
14
|
-
catch (_error) {
|
|
15
|
-
process.exit(1);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export const printAccessTokenCommand = new Command('print-access-token')
|
|
19
|
-
.description('Print the current Inworld access token')
|
|
20
|
-
.action(printAccessTokenAction);
|
|
21
|
-
//# sourceMappingURL=print_access_token_command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"print_access_token_command.js","sourceRoot":"","sources":["../../../../src/commands/auth/print_access_token_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,sBAAsB,GAAG,KAAK,IAAI,EAAE;IACxC,IAAI,CAAC;QACH,gDAAgD;QAChD,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,aAAa,EAAE,CAAC;QAEhD,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO;QACT,CAAC;QAED,sCAAsC;QACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,OAAO,CAAC,oBAAoB,CAAC;KACrE,WAAW,CAAC,wCAAwC,CAAC;KACrD,MAAM,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"print_api_key_command.d.ts","sourceRoot":"","sources":["../../../../src/commands/auth/print_api_key_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0BpC,eAAO,MAAM,kBAAkB,SAEH,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import { authManager } from '@/auth/manager';
|
|
3
|
-
const printApiKeyAction = async () => {
|
|
4
|
-
try {
|
|
5
|
-
// Check environment variable first (takes precedence)
|
|
6
|
-
if (process.env.INWORLD_API_KEY) {
|
|
7
|
-
console.log(process.env.INWORLD_API_KEY);
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
// Check stored credentials
|
|
11
|
-
const credentials = await authManager.getCredentials();
|
|
12
|
-
if (credentials?.apiKey) {
|
|
13
|
-
console.log(credentials.apiKey);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
// No API key found
|
|
17
|
-
process.exit(1);
|
|
18
|
-
}
|
|
19
|
-
catch (_error) {
|
|
20
|
-
process.exit(1);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
export const printApiKeyCommand = new Command('print-api-key')
|
|
24
|
-
.description('Print the current API key')
|
|
25
|
-
.action(printApiKeyAction);
|
|
26
|
-
//# sourceMappingURL=print_api_key_command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"print_api_key_command.js","sourceRoot":"","sources":["../../../../src/commands/auth/print_api_key_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,iBAAiB,GAAG,KAAK,IAAI,EAAE;IACnC,IAAI,CAAC;QACH,sDAAsD;QACtD,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC;YAChC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;YACzC,OAAO;QACT,CAAC;QAED,2BAA2B;QAC3B,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,cAAc,EAAE,CAAC;QACvD,IAAI,WAAW,EAAE,MAAM,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YAChC,OAAO;QACT,CAAC;QAED,mBAAmB;QACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,OAAO,CAAC,eAAe,CAAC;KAC3D,WAAW,CAAC,2BAA2B,CAAC;KACxC,MAAM,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status_command.d.ts","sourceRoot":"","sources":["../../../../src/commands/auth/status_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoGpC,eAAO,MAAM,aAAa,SAEzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,SAE9B,CAAC"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import { authManager } from '@/auth/manager';
|
|
3
|
-
import * as ui from '@/utils/ui';
|
|
4
|
-
const statusAction = async () => {
|
|
5
|
-
try {
|
|
6
|
-
const credentials = await authManager.getCredentials();
|
|
7
|
-
ui.printHeader('\nInworld CLI Status\n');
|
|
8
|
-
if (!credentials) {
|
|
9
|
-
// credentials are ensured by requireAuth call.
|
|
10
|
-
ui.print('Not authenticated.');
|
|
11
|
-
ui.print(`Run \`${ui.bold('inworld auth login')}\` to authenticate.`);
|
|
12
|
-
if (process.env.INWORLD_API_KEY) {
|
|
13
|
-
ui.print(`\nINWORLD_API_KEY environment variable: ${ui.trimBase64Key(process.env.INWORLD_API_KEY)} (active)`);
|
|
14
|
-
}
|
|
15
|
-
process.exit(0);
|
|
16
|
-
}
|
|
17
|
-
// Authentication Status
|
|
18
|
-
ui.printBright('Authentication:');
|
|
19
|
-
ui.print(` Email: ${credentials.email}`);
|
|
20
|
-
if (credentials.env !== 'PROD') {
|
|
21
|
-
ui.print(` Environment: ${credentials.env}`);
|
|
22
|
-
}
|
|
23
|
-
// Token Status
|
|
24
|
-
if (credentials.inworldToken) {
|
|
25
|
-
const isExpired = credentials.expiresAt && Date.now() > credentials.expiresAt;
|
|
26
|
-
const expirationDate = credentials.expiresAt
|
|
27
|
-
? new Date(credentials.expiresAt).toLocaleString()
|
|
28
|
-
: 'Unknown';
|
|
29
|
-
console.log();
|
|
30
|
-
ui.printBright('Token Status:');
|
|
31
|
-
ui.print(` Inworld Token: ${ui.trimToken(credentials.inworldToken)}`);
|
|
32
|
-
ui.print(` Expires At: ${expirationDate}`);
|
|
33
|
-
ui.print(` Status: ${isExpired ? 'Expired' : 'Valid'}`);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
ui.printHeader('\nToken Status:');
|
|
37
|
-
ui.print(` Inworld Token: Not available`);
|
|
38
|
-
}
|
|
39
|
-
ui.print(` Refresh Token: ${ui.trimToken(credentials.refreshToken)}`);
|
|
40
|
-
ui.print(` Session Status: Active`);
|
|
41
|
-
// Workspace Status
|
|
42
|
-
ui.printBright('\nActive Workspace:');
|
|
43
|
-
if (credentials.workspace) {
|
|
44
|
-
ui.print(` Workspace id: ${credentials.workspace}`);
|
|
45
|
-
ui.print(` Workspace link: ${ui.workspaceLink(credentials.workspace)}`);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
ui.print(` No workspace activated`);
|
|
49
|
-
ui.print(` Run "inworld workspace activate" to select a workspace`);
|
|
50
|
-
}
|
|
51
|
-
// API Key Status
|
|
52
|
-
ui.printBright('\nAPI Key:');
|
|
53
|
-
if (process.env.INWORLD_API_KEY) {
|
|
54
|
-
ui.print(` INWORLD_API_KEY environment variable: ${ui.trimBase64Key(process.env.INWORLD_API_KEY)} (active)`);
|
|
55
|
-
}
|
|
56
|
-
if (credentials.apiKey) {
|
|
57
|
-
// Only show first and last few characters for security
|
|
58
|
-
const maskedKey = credentials.apiKey.length > 20
|
|
59
|
-
? `${ui.trimBase64Key(credentials.apiKey)}`
|
|
60
|
-
: '***';
|
|
61
|
-
ui.print(` Stored API Key: ${maskedKey}`);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
ui.print(` No API key configured`);
|
|
65
|
-
if (credentials.workspace) {
|
|
66
|
-
ui.print(` Run "inworld apikey select" to choose an API key`);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
console.log();
|
|
70
|
-
process.exit(0);
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
console.log();
|
|
74
|
-
ui.printError('Failed to get status:');
|
|
75
|
-
console.error(error);
|
|
76
|
-
process.exit(1);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
const makeStatusCommand = (description) => {
|
|
80
|
-
return new Command('status').description(description).action(statusAction);
|
|
81
|
-
};
|
|
82
|
-
export const statusCommand = makeStatusCommand('Display current authentication status and configuration');
|
|
83
|
-
export const statusCommandAlias = makeStatusCommand(`Alias for "${ui.bold('inworld auth status')}"`);
|
|
84
|
-
//# sourceMappingURL=status_command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status_command.js","sourceRoot":"","sources":["../../../../src/commands/auth/status_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,MAAM,YAAY,GAAG,KAAK,IAAI,EAAE;IAC9B,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,cAAc,EAAE,CAAC;QAEvD,EAAE,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;QAEzC,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,+CAA+C;YAC/C,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;YAC/B,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;YACtE,IAAI,OAAO,C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CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;YACpC,IAAI,WAAW,CAAC,SAAS,EAAE,CAAC;gBAC1B,EAAE,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;QAED,OAAO,CAAC,GAAG,EAAE,CAAC;QAEd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,EAAE,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;QACvC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,WAAmB,EAAE,EAAE;IAChD,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AAC7E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAC5C,yDAAyD,CAC1D,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CACjD,cAAc,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAChD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth_command.d.ts","sourceRoot":"","sources":["../../../src/commands/auth_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,eAAO,MAAM,WAAW,SAYpB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import { disableTelemetryCommand } from './auth/disable_telemetry_command';
|
|
3
|
-
import { enableTelemetryCommand } from './auth/enable_telemetry_command';
|
|
4
|
-
import { loginCiCommand } from './auth/login_ci_command';
|
|
5
|
-
import { loginCommand } from './auth/login_command';
|
|
6
|
-
import { logoutCommand } from './auth/logout_command';
|
|
7
|
-
import { printAccessTokenCommand } from './auth/print_access_token_command';
|
|
8
|
-
import { printApiKeyCommand } from './auth/print_api_key_command';
|
|
9
|
-
import { statusCommand } from './auth/status_command';
|
|
10
|
-
// Create the graph parent command
|
|
11
|
-
export const authCommand = new Command('auth')
|
|
12
|
-
.description('Manage Inworld authentication')
|
|
13
|
-
.addCommand(loginCommand)
|
|
14
|
-
.addCommand(loginCiCommand)
|
|
15
|
-
.addCommand(logoutCommand)
|
|
16
|
-
.addCommand(printAccessTokenCommand)
|
|
17
|
-
.addCommand(printApiKeyCommand)
|
|
18
|
-
.addCommand(statusCommand)
|
|
19
|
-
.addCommand(disableTelemetryCommand)
|
|
20
|
-
.addCommand(enableTelemetryCommand)
|
|
21
|
-
.action(() => {
|
|
22
|
-
authCommand.help();
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=auth_command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth_command.js","sourceRoot":"","sources":["../../../src/commands/auth_command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,kCAAkC;AAClC,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KAC3C,WAAW,CAAC,+BAA+B,CAAC;KAC5C,UAAU,CAAC,YAAY,CAAC;KACxB,UAAU,CAAC,cAAc,CAAC;KAC1B,UAAU,CAAC,aAAa,CAAC;KACzB,UAAU,CAAC,uBAAuB,CAAC;KACnC,UAAU,CAAC,kBAAkB,CAAC;KAC9B,UAAU,CAAC,aAAa,CAAC;KACzB,UAAU,CAAC,uBAAuB,CAAC;KACnC,UAAU,CAAC,sBAAsB,CAAC;KAClC,MAAM,CAAC,GAAG,EAAE;IACX,WAAW,CAAC,IAAI,EAAE,CAAC;AACrB,CAAC,CAAC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
/**
|
|
3
|
-
* User context attributes as key-value pairs.
|
|
4
|
-
*/
|
|
5
|
-
export interface UserContextAttributes {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* User context configuration.
|
|
10
|
-
*/
|
|
11
|
-
export interface UserContextInterface {
|
|
12
|
-
/** User attributes as key-value pairs. */
|
|
13
|
-
attributes: UserContextAttributes;
|
|
14
|
-
/** Targeting key for user identification. */
|
|
15
|
-
targetingKey: string;
|
|
16
|
-
}
|
|
17
|
-
export interface ExecutionContext {
|
|
18
|
-
executionId?: string;
|
|
19
|
-
userContext?: UserContextInterface;
|
|
20
|
-
dataStoreContent?: Record<string, any>;
|
|
21
|
-
}
|
|
22
|
-
export declare const deployCommand: Command;
|
|
23
|
-
export declare const deployCommandAlias: Command;
|
|
24
|
-
//# sourceMappingURL=graph_deploy_command.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graph_deploy_command.d.ts","sourceRoot":"","sources":["../../../../src/commands/graph/graph_deploy_command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,0CAA0C;IAC1C,UAAU,EAAE,qBAAqB,CAAC;IAClC,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACxC;AA+OD,eAAO,MAAM,aAAa,SAEzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,SAE9B,CAAC"}
|