@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
package/dist/src/constants.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const INWORLD_ENV: 'DEV' | 'STAGE' | 'PROD';
|
|
2
|
-
export declare const WORKSPACES_LIST_SIZE = 100;
|
|
3
|
-
export declare const PLATFORM_URL: string;
|
|
4
|
-
export declare const FIREBASE_API_KEY: string;
|
|
5
|
-
export declare const INWORLD_CLI_AUTH_URL: string;
|
|
6
|
-
export declare const INWORLD_CLI_AUTH_CALLBACK_PORT: number;
|
|
7
|
-
export declare const MIXPANEL_TOKEN: string;
|
|
8
|
-
export declare const TEMPLATES_METADATA_URL: string;
|
|
9
|
-
export declare const RUNTIME_VERSION = "0.9.0-rc.17";
|
|
10
|
-
export declare const CLI_VERSION: string;
|
|
11
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,WAAW,EAAE,KAAK,GAAG,OAAO,GAAG,MACP,CAAC;AACtC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,YAAY,QAAuB,CAAC;AACjD,eAAO,MAAM,gBAAgB,QAEc,CAAC;AAC5C,eAAO,MAAM,oBAAoB,QACmC,CAAC;AACrE,eAAO,MAAM,8BAA8B,QAG1C,CAAC;AAEF,eAAO,MAAM,cAAc,QAC+C,CAAC;AAmB3E,eAAO,MAAM,sBAAsB,QAAgC,CAAC;AAEpE,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAC7C,eAAO,MAAM,WAAW,QAAsB,CAAC"}
|
package/dist/src/constants.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// @ts-ignore: used by bundler
|
|
2
|
-
import packageJson from '../package.json' assert { type: 'json' };
|
|
3
|
-
const DEFAULT_PLATFORM_ENDPOINT = 'https://platform.inworld.ai';
|
|
4
|
-
const resolvePlatformUrl = () => {
|
|
5
|
-
if (process.env.INWORLD_PLATFORM_URL) {
|
|
6
|
-
return process.env.INWORLD_PLATFORM_URL;
|
|
7
|
-
}
|
|
8
|
-
const env = (process.env.INWORLD_ENV || '').toUpperCase();
|
|
9
|
-
switch (env) {
|
|
10
|
-
case 'DEV':
|
|
11
|
-
return 'https://platform.dev.inworld.ai';
|
|
12
|
-
case 'STAGE':
|
|
13
|
-
return 'https://platform.stage.inworld.ai';
|
|
14
|
-
case 'PROD':
|
|
15
|
-
return 'https://platform.inworld.ai';
|
|
16
|
-
default:
|
|
17
|
-
return DEFAULT_PLATFORM_ENDPOINT;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
export const INWORLD_ENV = (process.env.INWORLD_ENV ||
|
|
21
|
-
'PROD');
|
|
22
|
-
export const WORKSPACES_LIST_SIZE = 100;
|
|
23
|
-
export const PLATFORM_URL = resolvePlatformUrl();
|
|
24
|
-
export const FIREBASE_API_KEY = process.env.INWORLD_FIREBASE_API_KEY ||
|
|
25
|
-
'AIzaSyAPVBLVid0xPwjuU4Gmn_6_GyqxBq-SwQs';
|
|
26
|
-
export const INWORLD_CLI_AUTH_URL = process.env.INWORLD_CLI_AUTH_URL || 'https://cli.inworld.ai/login';
|
|
27
|
-
export const INWORLD_CLI_AUTH_CALLBACK_PORT = parseInt(process.env.INWORLD_CLI_AUTH_CALLBACK_PORT || '8085', 10);
|
|
28
|
-
export const MIXPANEL_TOKEN = process.env.INWORLD_MIXPANEL_TOKEN || '2cf13116e9701343ac27ddc452adfbbc';
|
|
29
|
-
const resolveTemplatesMetadataUrl = () => {
|
|
30
|
-
if (process.env.INWORLD_TEMPLATES_METADATA_URL) {
|
|
31
|
-
return process.env.INWORLD_TEMPLATES_METADATA_URL;
|
|
32
|
-
}
|
|
33
|
-
const env = (process.env.INWORLD_ENV || '').toUpperCase();
|
|
34
|
-
switch (env) {
|
|
35
|
-
case 'DEV':
|
|
36
|
-
return 'https://storage.googleapis.com/assets-inworld-ai/files/dev/templates-info.json';
|
|
37
|
-
case 'STAGE':
|
|
38
|
-
return 'https://storage.googleapis.com/assets-inworld-ai/files/stage/templates-info.json';
|
|
39
|
-
case 'PROD':
|
|
40
|
-
return 'https://storage.googleapis.com/assets-inworld-ai/files/prod/templates-info.json';
|
|
41
|
-
default:
|
|
42
|
-
return 'https://storage.googleapis.com/assets-inworld-ai/files/prod/templates-info.json';
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
export const TEMPLATES_METADATA_URL = resolveTemplatesMetadataUrl();
|
|
46
|
-
export const RUNTIME_VERSION = '0.9.0-rc.17';
|
|
47
|
-
export const CLI_VERSION = packageJson.version;
|
|
48
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,WAAW,MAAM,iBAAiB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AAElE,MAAM,yBAAyB,GAAG,6BAA6B,CAAC;AAEhE,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,CAAC;QACrC,OAAO,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;IAC1C,CAAC;IACD,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1D,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,KAAK;YACR,OAAO,iCAAiC,CAAC;QAC3C,KAAK,OAAO;YACV,OAAO,mCAAmC,CAAC;QAC7C,KAAK,MAAM;YACT,OAAO,6BAA6B,CAAC;QACvC;YACE,OAAO,yBAAyB,CAAC;IACrC,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAA6B,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW;IAC3E,MAAM,CAA6B,CAAC;AACtC,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACxC,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,EAAE,CAAC;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAC3B,OAAO,CAAC,GAAG,CAAC,wBAAwB;IACpC,yCAAyC,CAAC;AAC5C,MAAM,CAAC,MAAM,oBAAoB,GAC/B,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,8BAA8B,CAAC;AACrE,MAAM,CAAC,MAAM,8BAA8B,GAAG,QAAQ,CACpD,OAAO,CAAC,GAAG,CAAC,8BAA8B,IAAI,MAAM,EACpD,EAAE,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GACzB,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,kCAAkC,CAAC;AAE3E,MAAM,2BAA2B,GAAG,GAAG,EAAE;IACvC,IAAI,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,CAAC;QAC/C,OAAO,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;IACpD,CAAC;IACD,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1D,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,KAAK;YACR,OAAO,gFAAgF,CAAC;QAC1F,KAAK,OAAO;YACV,OAAO,kFAAkF,CAAC;QAC5F,KAAK,MAAM;YACT,OAAO,iFAAiF,CAAC;QAC3F;YACE,OAAO,iFAAiF,CAAC;IAC7F,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,2BAA2B,EAAE,CAAC;AAEpE,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;AAC7C,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { BadRequest } from '@/proto/generated/portal/ai/inworld/studio/v1/errors.pb';
|
|
2
|
-
import { GrpcStatusCode } from './statusCodes';
|
|
3
|
-
export type ErrorStatus = {
|
|
4
|
-
code: number;
|
|
5
|
-
message: string;
|
|
6
|
-
details?: any[];
|
|
7
|
-
};
|
|
8
|
-
export interface InworldErrorContract {
|
|
9
|
-
code: GrpcStatusCode;
|
|
10
|
-
message: string;
|
|
11
|
-
details: BadRequestDetails[];
|
|
12
|
-
}
|
|
13
|
-
export interface BadRequestDetails extends Required<BadRequest> {
|
|
14
|
-
'@type': string;
|
|
15
|
-
}
|
|
16
|
-
export interface InworldErrorContract {
|
|
17
|
-
code: GrpcStatusCode;
|
|
18
|
-
message: string;
|
|
19
|
-
details: BadRequestDetails[];
|
|
20
|
-
}
|
|
21
|
-
export declare function isBadRequestDetails(obj: any): obj is BadRequestDetails;
|
|
22
|
-
export declare function isInworldErrorContract(obj: any): obj is InworldErrorContract;
|
|
23
|
-
export declare function isGrpcError(obj: any): obj is Partial<InworldError>;
|
|
24
|
-
export declare class InworldError extends Error {
|
|
25
|
-
code: GrpcStatusCode;
|
|
26
|
-
details: BadRequestDetails[];
|
|
27
|
-
metadata?: unknown;
|
|
28
|
-
constructor(error: InworldErrorContract | Error, metadata?: unknown);
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=InworldError.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InworldError.d.ts","sourceRoot":"","sources":["../../../../src/grpc/core/InworldError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yDAAyD,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAoB,MAAM,eAAe,CAAC;AAEjE,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAkB,SAAQ,QAAQ,CAAC,UAAU,CAAC;IAC7D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAC9B;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,iBAAiB,CAWtE;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,oBAAoB,CAS5E;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC,CAOlE;AAED,qBAAa,YAAa,SAAQ,KAAK;IACrC,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,oBAAoB,GAAG,KAAK,EAAE,QAAQ,CAAC,EAAE,OAAO;CAgBpE"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { isArrayOfType } from '@/utils/array';
|
|
2
|
-
import { GrpcStatusCode, isGrpcStatusCode } from './statusCodes';
|
|
3
|
-
export function isBadRequestDetails(obj) {
|
|
4
|
-
return (typeof obj === 'object' &&
|
|
5
|
-
obj !== null &&
|
|
6
|
-
'@type' in obj &&
|
|
7
|
-
typeof obj['@type'] === 'string' &&
|
|
8
|
-
'fieldViolations' in obj &&
|
|
9
|
-
(obj.fieldViolations === undefined || Array.isArray(obj.fieldViolations)) &&
|
|
10
|
-
(typeof obj.requestIndex === 'string' || obj.requestIndex === undefined) &&
|
|
11
|
-
(typeof obj.message === 'string' || obj.message === undefined));
|
|
12
|
-
}
|
|
13
|
-
export function isInworldErrorContract(obj) {
|
|
14
|
-
return ((typeof obj === 'object' || obj instanceof InworldError) &&
|
|
15
|
-
obj !== null &&
|
|
16
|
-
'code' in obj &&
|
|
17
|
-
'message' in obj &&
|
|
18
|
-
'details' in obj &&
|
|
19
|
-
isArrayOfType(obj.details, isBadRequestDetails));
|
|
20
|
-
}
|
|
21
|
-
export function isGrpcError(obj) {
|
|
22
|
-
return ((typeof obj === 'object' || obj instanceof InworldError) &&
|
|
23
|
-
obj !== null &&
|
|
24
|
-
'code' in obj &&
|
|
25
|
-
isGrpcStatusCode(obj.code));
|
|
26
|
-
}
|
|
27
|
-
export class InworldError extends Error {
|
|
28
|
-
code;
|
|
29
|
-
details;
|
|
30
|
-
metadata;
|
|
31
|
-
constructor(error, metadata) {
|
|
32
|
-
super(error.message);
|
|
33
|
-
if (isInworldErrorContract(error)) {
|
|
34
|
-
this.message = error.message;
|
|
35
|
-
this.code = error.code;
|
|
36
|
-
this.details = error.details;
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
this.code = GrpcStatusCode.UNKNOWN;
|
|
40
|
-
this.details = [];
|
|
41
|
-
}
|
|
42
|
-
this.metadata = metadata;
|
|
43
|
-
Object.setPrototypeOf(this, InworldError.prototype);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=InworldError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InworldError.js","sourceRoot":"","sources":["../../../../src/grpc/core/InworldError.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAwBjE,MAAM,UAAU,mBAAmB,CAAC,GAAQ;IAC1C,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,KAAK,IAAI;QACZ,OAAO,IAAI,GAAG;QACd,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,QAAQ;QAChC,iBAAiB,IAAI,GAAG;QACxB,CAAC,GAAG,CAAC,eAAe,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACzE,CAAC,OAAO,GAAG,CAAC,YAAY,KAAK,QAAQ,IAAI,GAAG,CAAC,YAAY,KAAK,SAAS,CAAC;QACxE,CAAC,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAC/D,CAAC;AACJ,CAAC;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
|
-
* @fileoverview gRPC status codes
|
|
3
|
-
* Reference https://grpc.github.io/grpc/core/md_doc_statuscodes.html
|
|
4
|
-
*/
|
|
5
|
-
export declare enum GrpcStatusCode {
|
|
6
|
-
/**
|
|
7
|
-
* Not an error; returned on success.
|
|
8
|
-
*/
|
|
9
|
-
OK = 0,
|
|
10
|
-
/**
|
|
11
|
-
* The operation was cancelled, typically by the caller.
|
|
12
|
-
*/
|
|
13
|
-
CANCELLED = 1,
|
|
14
|
-
/**
|
|
15
|
-
* Unknown error. For example, this error may be returned when a Status
|
|
16
|
-
* value received from another address space belongs to an error space
|
|
17
|
-
* that is not known in this address space. Also, errors raised by APIs
|
|
18
|
-
* that do not return enough error information may be converted to this error.
|
|
19
|
-
*/
|
|
20
|
-
UNKNOWN = 2,
|
|
21
|
-
/**
|
|
22
|
-
* The client specified an invalid argument. Note that this differs from
|
|
23
|
-
* FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are
|
|
24
|
-
* problematic regardless of the state of the system (e.g., a malformed file name).
|
|
25
|
-
*/
|
|
26
|
-
INVALID_ARGUMENT = 3,
|
|
27
|
-
/**
|
|
28
|
-
* The deadline expired before the operation could complete. For operations
|
|
29
|
-
* that change the state of the system, this error may be returned even if
|
|
30
|
-
* the operation has completed successfully. For example, a successful
|
|
31
|
-
* response from a server could have been delayed long.
|
|
32
|
-
*/
|
|
33
|
-
DEADLINE_EXCEEDED = 4,
|
|
34
|
-
/**
|
|
35
|
-
* Some requested entity (e.g., file or directory) was not found. Note to
|
|
36
|
-
* server developers: if a request is denied for an entire class of users,
|
|
37
|
-
* such as gradual feature rollout or undocumented allowlist, NOT_FOUND may be used.
|
|
38
|
-
* If a request is denied for some users within a class of users, such as user-based
|
|
39
|
-
* access control, PERMISSION_DENIED must be used. This error code does not imply the
|
|
40
|
-
* request is valid or the requested entity exists or satisfies other pre-conditions.
|
|
41
|
-
*/
|
|
42
|
-
NOT_FOUND = 5,
|
|
43
|
-
/**
|
|
44
|
-
* The entity that a client attempted to create (e.g., file or directory) already exists.
|
|
45
|
-
*/
|
|
46
|
-
ALREADY_EXISTS = 6,
|
|
47
|
-
/**
|
|
48
|
-
* The caller does not have permission to execute the specified operation.
|
|
49
|
-
* PERMISSION_DENIED must not be used for rejections caused by exhausting
|
|
50
|
-
* some resource (use RESOURCE_EXHAUSTED instead for those errors).
|
|
51
|
-
* PERMISSION_DENIED must not be used if the caller cannot be identified
|
|
52
|
-
* (use UNAUTHENTICATED instead for those errors). This error code does not
|
|
53
|
-
* imply the request is valid or the requested entity exists or satisfies other pre-conditions.
|
|
54
|
-
*/
|
|
55
|
-
PERMISSION_DENIED = 7,
|
|
56
|
-
/**
|
|
57
|
-
* Some resource has been exhausted, perhaps a per-user quota, or perhaps
|
|
58
|
-
* the entire file system is out of space.
|
|
59
|
-
*/
|
|
60
|
-
RESOURCE_EXHAUSTED = 8,
|
|
61
|
-
/**
|
|
62
|
-
* The operation was rejected because the system is not in a state required
|
|
63
|
-
* for the operation's execution. For example, the directory to be deleted is
|
|
64
|
-
* non-empty, an rmdir operation is applied to a non-directory, etc.
|
|
65
|
-
* Service implementors can use the following guidelines to decide between
|
|
66
|
-
* FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
|
|
67
|
-
* (a) Use UNAVAILABLE if the client can retry just the failing call.
|
|
68
|
-
* (b) Use ABORTED if the client should retry at a higher level (e.g.,
|
|
69
|
-
* when a client-specified test-and-set fails, indicating the client should
|
|
70
|
-
* restart a read-modify-write sequence).
|
|
71
|
-
* (c) Use FAILED_PRECONDITION if the client should not retry until the
|
|
72
|
-
* system state has been explicitly fixed. E.g., if an "rmdir" fails because
|
|
73
|
-
* the directory is non-empty, FAILED_PRECONDITION should be returned since
|
|
74
|
-
* the client should not retry unless the files are deleted from the directory.
|
|
75
|
-
*/
|
|
76
|
-
FAILED_PRECONDITION = 9,
|
|
77
|
-
/**
|
|
78
|
-
* The operation was aborted, typically due to a concurrency issue such as
|
|
79
|
-
* a sequencer check failure or transaction abort. See the guidelines above
|
|
80
|
-
* for deciding between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE.
|
|
81
|
-
*/
|
|
82
|
-
ABORTED = 10,
|
|
83
|
-
/**
|
|
84
|
-
* The operation was attempted past the valid range. E.g., seeking or
|
|
85
|
-
* reading past end-of-file. Unlike INVALID_ARGUMENT, this error indicates
|
|
86
|
-
* a problem that may be fixed if the system state changes. For example,
|
|
87
|
-
* a 32-bit file system will generate INVALID_ARGUMENT if asked to read at
|
|
88
|
-
* an offset that is not in the range [0,2^32-1], but it will generate
|
|
89
|
-
* OUT_OF_RANGE if asked to read from an offset past the current file size.
|
|
90
|
-
* There is a fair bit of overlap between FAILED_PRECONDITION and OUT_OF_RANGE.
|
|
91
|
-
* We recommend using OUT_OF_RANGE (the more specific error) when it applies
|
|
92
|
-
* so that callers who are iterating through a space can easily look for an
|
|
93
|
-
* OUT_OF_RANGE error to detect when they are done.
|
|
94
|
-
*/
|
|
95
|
-
OUT_OF_RANGE = 11,
|
|
96
|
-
/**
|
|
97
|
-
* The operation is not implemented or is not supported/enabled in this service.
|
|
98
|
-
*/
|
|
99
|
-
UNIMPLEMENTED = 12,
|
|
100
|
-
/**
|
|
101
|
-
* Internal errors. This means that some invariants expected by the underlying
|
|
102
|
-
* system have been broken. This error code is reserved for serious errors.
|
|
103
|
-
*/
|
|
104
|
-
INTERNAL = 13,
|
|
105
|
-
/**
|
|
106
|
-
* The service is currently unavailable. This is most likely a transient
|
|
107
|
-
* condition, which can be corrected by retrying with a backoff.
|
|
108
|
-
* Note that it is not always safe to retry non-idempotent operations.
|
|
109
|
-
*/
|
|
110
|
-
UNAVAILABLE = 14,
|
|
111
|
-
/**
|
|
112
|
-
* Unrecoverable data loss or corruption.
|
|
113
|
-
*/
|
|
114
|
-
DATA_LOSS = 15,
|
|
115
|
-
/**
|
|
116
|
-
* The request does not have valid authentication credentials for the operation.
|
|
117
|
-
*/
|
|
118
|
-
UNAUTHENTICATED = 16
|
|
119
|
-
}
|
|
120
|
-
export declare function isGrpcStatusCode(value: number): value is GrpcStatusCode;
|
|
121
|
-
export declare const CommonRetryableGrpcStatusCodes: GrpcStatusCode[];
|
|
122
|
-
//# sourceMappingURL=statusCodes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"statusCodes.d.ts","sourceRoot":"","sources":["../../../../src/grpc/core/statusCodes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,cAAc;IACxB;;OAEG;IACH,EAAE,IAAI;IAEN;;OAEG;IACH,SAAS,IAAI;IAEb;;;;;OAKG;IACH,OAAO,IAAI;IAEX;;;;OAIG;IACH,gBAAgB,IAAI;IAEpB;;;;;OAKG;IACH,iBAAiB,IAAI;IAErB;;;;;;;OAOG;IACH,SAAS,IAAI;IAEb;;OAEG;IACH,cAAc,IAAI;IAElB;;;;;;;OAOG;IACH,iBAAiB,IAAI;IAErB;;;OAGG;IACH,kBAAkB,IAAI;IAEtB;;;;;;;;;;;;;;OAcG;IACH,mBAAmB,IAAI;IAEvB;;;;OAIG;IACH,OAAO,KAAK;IAEZ;;;;;;;;;;;OAWG;IACH,YAAY,KAAK;IAEjB;;OAEG;IACH,aAAa,KAAK;IAElB;;;OAGG;IACH,QAAQ,KAAK;IAEb;;;;OAIG;IACH,WAAW,KAAK;IAEhB;;OAEG;IACH,SAAS,KAAK;IAEd;;OAEG;IACH,eAAe,KAAK;CACrB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,cAAc,CAEvE;AAED,eAAO,MAAM,8BAA8B,kBAQ1C,CAAC"}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview gRPC status codes
|
|
3
|
-
* Reference https://grpc.github.io/grpc/core/md_doc_statuscodes.html
|
|
4
|
-
*/
|
|
5
|
-
export var GrpcStatusCode;
|
|
6
|
-
(function (GrpcStatusCode) {
|
|
7
|
-
/**
|
|
8
|
-
* Not an error; returned on success.
|
|
9
|
-
*/
|
|
10
|
-
GrpcStatusCode[GrpcStatusCode["OK"] = 0] = "OK";
|
|
11
|
-
/**
|
|
12
|
-
* The operation was cancelled, typically by the caller.
|
|
13
|
-
*/
|
|
14
|
-
GrpcStatusCode[GrpcStatusCode["CANCELLED"] = 1] = "CANCELLED";
|
|
15
|
-
/**
|
|
16
|
-
* Unknown error. For example, this error may be returned when a Status
|
|
17
|
-
* value received from another address space belongs to an error space
|
|
18
|
-
* that is not known in this address space. Also, errors raised by APIs
|
|
19
|
-
* that do not return enough error information may be converted to this error.
|
|
20
|
-
*/
|
|
21
|
-
GrpcStatusCode[GrpcStatusCode["UNKNOWN"] = 2] = "UNKNOWN";
|
|
22
|
-
/**
|
|
23
|
-
* The client specified an invalid argument. Note that this differs from
|
|
24
|
-
* FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are
|
|
25
|
-
* problematic regardless of the state of the system (e.g., a malformed file name).
|
|
26
|
-
*/
|
|
27
|
-
GrpcStatusCode[GrpcStatusCode["INVALID_ARGUMENT"] = 3] = "INVALID_ARGUMENT";
|
|
28
|
-
/**
|
|
29
|
-
* The deadline expired before the operation could complete. For operations
|
|
30
|
-
* that change the state of the system, this error may be returned even if
|
|
31
|
-
* the operation has completed successfully. For example, a successful
|
|
32
|
-
* response from a server could have been delayed long.
|
|
33
|
-
*/
|
|
34
|
-
GrpcStatusCode[GrpcStatusCode["DEADLINE_EXCEEDED"] = 4] = "DEADLINE_EXCEEDED";
|
|
35
|
-
/**
|
|
36
|
-
* Some requested entity (e.g., file or directory) was not found. Note to
|
|
37
|
-
* server developers: if a request is denied for an entire class of users,
|
|
38
|
-
* such as gradual feature rollout or undocumented allowlist, NOT_FOUND may be used.
|
|
39
|
-
* If a request is denied for some users within a class of users, such as user-based
|
|
40
|
-
* access control, PERMISSION_DENIED must be used. This error code does not imply the
|
|
41
|
-
* request is valid or the requested entity exists or satisfies other pre-conditions.
|
|
42
|
-
*/
|
|
43
|
-
GrpcStatusCode[GrpcStatusCode["NOT_FOUND"] = 5] = "NOT_FOUND";
|
|
44
|
-
/**
|
|
45
|
-
* The entity that a client attempted to create (e.g., file or directory) already exists.
|
|
46
|
-
*/
|
|
47
|
-
GrpcStatusCode[GrpcStatusCode["ALREADY_EXISTS"] = 6] = "ALREADY_EXISTS";
|
|
48
|
-
/**
|
|
49
|
-
* The caller does not have permission to execute the specified operation.
|
|
50
|
-
* PERMISSION_DENIED must not be used for rejections caused by exhausting
|
|
51
|
-
* some resource (use RESOURCE_EXHAUSTED instead for those errors).
|
|
52
|
-
* PERMISSION_DENIED must not be used if the caller cannot be identified
|
|
53
|
-
* (use UNAUTHENTICATED instead for those errors). This error code does not
|
|
54
|
-
* imply the request is valid or the requested entity exists or satisfies other pre-conditions.
|
|
55
|
-
*/
|
|
56
|
-
GrpcStatusCode[GrpcStatusCode["PERMISSION_DENIED"] = 7] = "PERMISSION_DENIED";
|
|
57
|
-
/**
|
|
58
|
-
* Some resource has been exhausted, perhaps a per-user quota, or perhaps
|
|
59
|
-
* the entire file system is out of space.
|
|
60
|
-
*/
|
|
61
|
-
GrpcStatusCode[GrpcStatusCode["RESOURCE_EXHAUSTED"] = 8] = "RESOURCE_EXHAUSTED";
|
|
62
|
-
/**
|
|
63
|
-
* The operation was rejected because the system is not in a state required
|
|
64
|
-
* for the operation's execution. For example, the directory to be deleted is
|
|
65
|
-
* non-empty, an rmdir operation is applied to a non-directory, etc.
|
|
66
|
-
* Service implementors can use the following guidelines to decide between
|
|
67
|
-
* FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
|
|
68
|
-
* (a) Use UNAVAILABLE if the client can retry just the failing call.
|
|
69
|
-
* (b) Use ABORTED if the client should retry at a higher level (e.g.,
|
|
70
|
-
* when a client-specified test-and-set fails, indicating the client should
|
|
71
|
-
* restart a read-modify-write sequence).
|
|
72
|
-
* (c) Use FAILED_PRECONDITION if the client should not retry until the
|
|
73
|
-
* system state has been explicitly fixed. E.g., if an "rmdir" fails because
|
|
74
|
-
* the directory is non-empty, FAILED_PRECONDITION should be returned since
|
|
75
|
-
* the client should not retry unless the files are deleted from the directory.
|
|
76
|
-
*/
|
|
77
|
-
GrpcStatusCode[GrpcStatusCode["FAILED_PRECONDITION"] = 9] = "FAILED_PRECONDITION";
|
|
78
|
-
/**
|
|
79
|
-
* The operation was aborted, typically due to a concurrency issue such as
|
|
80
|
-
* a sequencer check failure or transaction abort. See the guidelines above
|
|
81
|
-
* for deciding between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE.
|
|
82
|
-
*/
|
|
83
|
-
GrpcStatusCode[GrpcStatusCode["ABORTED"] = 10] = "ABORTED";
|
|
84
|
-
/**
|
|
85
|
-
* The operation was attempted past the valid range. E.g., seeking or
|
|
86
|
-
* reading past end-of-file. Unlike INVALID_ARGUMENT, this error indicates
|
|
87
|
-
* a problem that may be fixed if the system state changes. For example,
|
|
88
|
-
* a 32-bit file system will generate INVALID_ARGUMENT if asked to read at
|
|
89
|
-
* an offset that is not in the range [0,2^32-1], but it will generate
|
|
90
|
-
* OUT_OF_RANGE if asked to read from an offset past the current file size.
|
|
91
|
-
* There is a fair bit of overlap between FAILED_PRECONDITION and OUT_OF_RANGE.
|
|
92
|
-
* We recommend using OUT_OF_RANGE (the more specific error) when it applies
|
|
93
|
-
* so that callers who are iterating through a space can easily look for an
|
|
94
|
-
* OUT_OF_RANGE error to detect when they are done.
|
|
95
|
-
*/
|
|
96
|
-
GrpcStatusCode[GrpcStatusCode["OUT_OF_RANGE"] = 11] = "OUT_OF_RANGE";
|
|
97
|
-
/**
|
|
98
|
-
* The operation is not implemented or is not supported/enabled in this service.
|
|
99
|
-
*/
|
|
100
|
-
GrpcStatusCode[GrpcStatusCode["UNIMPLEMENTED"] = 12] = "UNIMPLEMENTED";
|
|
101
|
-
/**
|
|
102
|
-
* Internal errors. This means that some invariants expected by the underlying
|
|
103
|
-
* system have been broken. This error code is reserved for serious errors.
|
|
104
|
-
*/
|
|
105
|
-
GrpcStatusCode[GrpcStatusCode["INTERNAL"] = 13] = "INTERNAL";
|
|
106
|
-
/**
|
|
107
|
-
* The service is currently unavailable. This is most likely a transient
|
|
108
|
-
* condition, which can be corrected by retrying with a backoff.
|
|
109
|
-
* Note that it is not always safe to retry non-idempotent operations.
|
|
110
|
-
*/
|
|
111
|
-
GrpcStatusCode[GrpcStatusCode["UNAVAILABLE"] = 14] = "UNAVAILABLE";
|
|
112
|
-
/**
|
|
113
|
-
* Unrecoverable data loss or corruption.
|
|
114
|
-
*/
|
|
115
|
-
GrpcStatusCode[GrpcStatusCode["DATA_LOSS"] = 15] = "DATA_LOSS";
|
|
116
|
-
/**
|
|
117
|
-
* The request does not have valid authentication credentials for the operation.
|
|
118
|
-
*/
|
|
119
|
-
GrpcStatusCode[GrpcStatusCode["UNAUTHENTICATED"] = 16] = "UNAUTHENTICATED";
|
|
120
|
-
})(GrpcStatusCode || (GrpcStatusCode = {}));
|
|
121
|
-
export function isGrpcStatusCode(value) {
|
|
122
|
-
return Object.values(GrpcStatusCode).includes(value);
|
|
123
|
-
}
|
|
124
|
-
export const CommonRetryableGrpcStatusCodes = [
|
|
125
|
-
GrpcStatusCode.UNKNOWN,
|
|
126
|
-
GrpcStatusCode.ABORTED,
|
|
127
|
-
GrpcStatusCode.CANCELLED,
|
|
128
|
-
GrpcStatusCode.DEADLINE_EXCEEDED,
|
|
129
|
-
GrpcStatusCode.INTERNAL,
|
|
130
|
-
GrpcStatusCode.RESOURCE_EXHAUSTED,
|
|
131
|
-
GrpcStatusCode.UNAVAILABLE,
|
|
132
|
-
];
|
|
133
|
-
//# sourceMappingURL=statusCodes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"statusCodes.js","sourceRoot":"","sources":["../../../../src/grpc/core/statusCodes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAN,IAAY,cAkIX;AAlID,WAAY,cAAc;IACxB;;OAEG;IACH,+CAAM,CAAA;IAEN;;OAEG;IACH,6DAAa,CAAA;IAEb;;;;;OAKG;IACH,yDAAW,CAAA;IAEX;;;;OAIG;IACH,2EAAoB,CAAA;IAEpB;;;;;OAKG;IACH,6EAAqB,CAAA;IAErB;;;;;;;OAOG;IACH,6DAAa,CAAA;IAEb;;OAEG;IACH,uEAAkB,CAAA;IAElB;;;;;;;OAOG;IACH,6EAAqB,CAAA;IAErB;;;OAGG;IACH,+EAAsB,CAAA;IAEtB;;;;;;;;;;;;;;OAcG;IACH,iFAAuB,CAAA;IAEvB;;;;OAIG;IACH,0DAAY,CAAA;IAEZ;;;;;;;;;;;OAWG;IACH,oEAAiB,CAAA;IAEjB;;OAEG;IACH,sEAAkB,CAAA;IAElB;;;OAGG;IACH,4DAAa,CAAA;IAEb;;;;OAIG;IACH,kEAAgB,CAAA;IAEhB;;OAEG;IACH,8DAAc,CAAA;IAEd;;OAEG;IACH,0EAAoB,CAAA;AACtB,CAAC,EAlIW,cAAc,KAAd,cAAc,QAkIzB;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,OAAO,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,cAAc,CAAC,OAAO;IACtB,cAAc,CAAC,OAAO;IACtB,cAAc,CAAC,SAAS;IACxB,cAAc,CAAC,iBAAiB;IAChC,cAAc,CAAC,QAAQ;IACvB,cAAc,CAAC,kBAAkB;IACjC,cAAc,CAAC,WAAW;CAC3B,CAAC"}
|
package/dist/src/index.d.ts
DELETED
package/dist/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":""}
|
package/dist/src/index.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { Command } from 'commander';
|
|
3
|
-
import { loginCommandAlias } from './commands/auth/login_command';
|
|
4
|
-
import { logoutCommandAlias } from './commands/auth/logout_command';
|
|
5
|
-
import { statusCommandAlias } from './commands/auth/status_command';
|
|
6
|
-
import { authCommand } from './commands/auth_command';
|
|
7
|
-
import { deployCommandAlias } from './commands/graph/graph_deploy_command';
|
|
8
|
-
import { initCommandAlias } from './commands/graph/graph_init_command';
|
|
9
|
-
import { runCommandAlias } from './commands/graph/graph_run_command';
|
|
10
|
-
import { serveCommandAlias } from './commands/graph/graph_serve_command';
|
|
11
|
-
import { graphCommand } from './commands/graph_command';
|
|
12
|
-
import { ttsCommand } from './commands/tts_commands';
|
|
13
|
-
import { workspaceCommand } from './commands/workspace_command';
|
|
14
|
-
import { CLI_VERSION } from './constants';
|
|
15
|
-
import { analytics } from './services/analytics';
|
|
16
|
-
import { updateChecker } from './services/update_checker';
|
|
17
|
-
const version = CLI_VERSION;
|
|
18
|
-
process.env.DISABLE_WELCOME_MESSAGE = 'true';
|
|
19
|
-
class InworldCLI {
|
|
20
|
-
program;
|
|
21
|
-
currentCommand = null;
|
|
22
|
-
constructor() {
|
|
23
|
-
this.program = new Command();
|
|
24
|
-
this.setupProgram();
|
|
25
|
-
this.registerCommands();
|
|
26
|
-
}
|
|
27
|
-
setupProgram() {
|
|
28
|
-
this.program
|
|
29
|
-
.name('inworld')
|
|
30
|
-
.description('Inworld Runtime CLI')
|
|
31
|
-
.version(version, '--version')
|
|
32
|
-
.configureOutput({
|
|
33
|
-
writeOut: (str) => process.stdout.write(str),
|
|
34
|
-
writeErr: (str) => process.stderr.write(str),
|
|
35
|
-
getOutHelpWidth: () => process.stdout.columns || 80,
|
|
36
|
-
getErrHelpWidth: () => process.stderr.columns || 80,
|
|
37
|
-
})
|
|
38
|
-
.hook('preAction', (_thisCommand, actionCommand) => {
|
|
39
|
-
// Track command execution
|
|
40
|
-
const commandName = this.getCommandName(actionCommand);
|
|
41
|
-
this.currentCommand = commandName;
|
|
42
|
-
const options = actionCommand.opts();
|
|
43
|
-
// Sanitize options to remove sensitive data
|
|
44
|
-
const sanitizedOptions = this.sanitizeOptions(options);
|
|
45
|
-
analytics.trackCommandExecution(commandName, sanitizedOptions);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Gets the full command name from a Command instance
|
|
50
|
-
*/
|
|
51
|
-
getCommandName(command) {
|
|
52
|
-
let name = command.name();
|
|
53
|
-
while (command.parent && command.parent.name() !== 'inworld') {
|
|
54
|
-
command = command.parent;
|
|
55
|
-
name = `${command.name()} ${name}`;
|
|
56
|
-
}
|
|
57
|
-
return name;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Sanitizes command options to remove sensitive data
|
|
61
|
-
*/
|
|
62
|
-
sanitizeOptions(options) {
|
|
63
|
-
const sanitized = {};
|
|
64
|
-
const sensitiveKeys = ['token', 'apikey', 'password', 'secret', 'key'];
|
|
65
|
-
for (const [key, value] of Object.entries(options)) {
|
|
66
|
-
const lowerKey = key.toLowerCase();
|
|
67
|
-
const isSensitive = sensitiveKeys.some((k) => lowerKey.includes(k));
|
|
68
|
-
if (isSensitive) {
|
|
69
|
-
sanitized[key] = '[REDACTED]';
|
|
70
|
-
}
|
|
71
|
-
else if (typeof value === 'string' ||
|
|
72
|
-
typeof value === 'number' ||
|
|
73
|
-
typeof value === 'boolean') {
|
|
74
|
-
sanitized[key] = value;
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
sanitized[key] = typeof value;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return sanitized;
|
|
81
|
-
}
|
|
82
|
-
registerCommands() {
|
|
83
|
-
this.program.addCommand(loginCommandAlias);
|
|
84
|
-
this.program.addCommand(logoutCommandAlias);
|
|
85
|
-
this.program.addCommand(statusCommandAlias);
|
|
86
|
-
this.program.addCommand(serveCommandAlias);
|
|
87
|
-
this.program.addCommand(runCommandAlias);
|
|
88
|
-
this.program.addCommand(deployCommandAlias);
|
|
89
|
-
this.program.addCommand(initCommandAlias);
|
|
90
|
-
this.program.addCommand(authCommand);
|
|
91
|
-
this.program.addCommand(graphCommand);
|
|
92
|
-
this.program.addCommand(ttsCommand);
|
|
93
|
-
this.program.addCommand(workspaceCommand);
|
|
94
|
-
// Add a default help command
|
|
95
|
-
this.program
|
|
96
|
-
.command('help')
|
|
97
|
-
.description('Display help information')
|
|
98
|
-
.action(() => {
|
|
99
|
-
this.program.help();
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
async run(args) {
|
|
103
|
-
try {
|
|
104
|
-
// Initialize analytics and update checker in parallel (non-blocking)
|
|
105
|
-
const initPromise = Promise.all([
|
|
106
|
-
analytics.initialize().catch(() => {
|
|
107
|
-
// Silently ignore analytics initialization errors
|
|
108
|
-
}),
|
|
109
|
-
updateChecker.checkAndNotify().catch(() => {
|
|
110
|
-
// Silently ignore update check errors
|
|
111
|
-
}),
|
|
112
|
-
]);
|
|
113
|
-
// Give initialization a reasonable time to complete, but don't block
|
|
114
|
-
const timeoutPromise = new Promise((resolve) => setTimeout(resolve, 1000));
|
|
115
|
-
await Promise.race([initPromise, timeoutPromise]);
|
|
116
|
-
await this.program.parseAsync(args);
|
|
117
|
-
// Flush analytics before exit
|
|
118
|
-
await analytics.flush();
|
|
119
|
-
}
|
|
120
|
-
catch (error) {
|
|
121
|
-
// Track command failure if we know which command was running
|
|
122
|
-
if (this.currentCommand) {
|
|
123
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
124
|
-
analytics.trackCommandResult(this.currentCommand, false, errorMessage);
|
|
125
|
-
}
|
|
126
|
-
console.error(chalk.red('Error:'), error instanceof Error ? error.message : String(error));
|
|
127
|
-
// Ensure analytics are flushed even on error
|
|
128
|
-
await analytics.flush();
|
|
129
|
-
process.exit(1);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// Create and run the CLI
|
|
134
|
-
const cli = new InworldCLI();
|
|
135
|
-
cli.run().catch((error) => {
|
|
136
|
-
console.error(chalk.red('Fatal error:'), error);
|
|
137
|
-
process.exit(1);
|
|
138
|
-
});
|
|
139
|
-
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,OAAO,GAAG,WAAW,CAAC;AAE5B,OAAO,CAAC,GAAG,CAAC,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,UAAU;IACN,OAAO,CAAU;IACjB,cAAc,GAAkB,IAAI,CAAC;IAE7C;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO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AC,CAAC;YAElD,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAEpC,8BAA8B;YAC9B,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,6DAA6D;YAC7D,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;gBACxB,MAAM,YAAY,GAChB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACzD,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;YACzE,CAAC;YAED,OAAO,CAAC,KAAK,CACX,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EACnB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACvD,CAAC;YAEF,6CAA6C;YAC7C,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;YACxB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CACF;AAED,yBAAyB;AACzB,MAAM,GAAG,GAAG,IAAI,UAAU,EAAE,CAAC;AAC7B,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACxB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,CAAC;IAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Analytics service handles tracking CLI usage via Mixpanel.
|
|
3
|
-
* Users can opt out using the 'inworld auth disable_telemetry' command.
|
|
4
|
-
*/
|
|
5
|
-
export declare class Analytics {
|
|
6
|
-
private static readonly CONF_ENTRY_NAME;
|
|
7
|
-
private conf;
|
|
8
|
-
private mixpanel;
|
|
9
|
-
private userId;
|
|
10
|
-
private initialized;
|
|
11
|
-
constructor();
|
|
12
|
-
/**
|
|
13
|
-
* Initializes Mixpanel with user context (email and CLI version).
|
|
14
|
-
* Only initializes if the user is authenticated and hasn't opted out.
|
|
15
|
-
*/
|
|
16
|
-
initialize(): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* Checks if telemetry is enabled (opt-in by default)
|
|
19
|
-
*/
|
|
20
|
-
isTelemetryEnabled(): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Enables or disables telemetry
|
|
23
|
-
*/
|
|
24
|
-
setTelemetryEnabled(enabled: boolean): void;
|
|
25
|
-
/**
|
|
26
|
-
* Tracks a command execution event
|
|
27
|
-
* @param command The command being executed (e.g., 'auth login', 'graph deploy')
|
|
28
|
-
* @param parameters Command parameters (sanitized, no sensitive data)
|
|
29
|
-
*/
|
|
30
|
-
trackCommandExecution(command: string, parameters?: Record<string, any>): void;
|
|
31
|
-
/**
|
|
32
|
-
* Tracks a command result event (success or failure)
|
|
33
|
-
* @param command The command that was executed
|
|
34
|
-
* @param success Whether the command succeeded
|
|
35
|
-
* @param errorMessage Optional error message (sanitized)
|
|
36
|
-
*/
|
|
37
|
-
trackCommandResult(command: string, success: boolean, errorMessage?: string): void;
|
|
38
|
-
/**
|
|
39
|
-
* Flushes any pending events to Mixpanel
|
|
40
|
-
* Should be called before the CLI exits
|
|
41
|
-
*/
|
|
42
|
-
flush(): Promise<void>;
|
|
43
|
-
}
|
|
44
|
-
export declare const analytics: Analytics;
|
|
45
|
-
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/services/analytics.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAe;IAEtD,OAAO,CAAC,IAAI,CAAwC;IACpD,OAAO,CAAC,QAAQ,CAAkC;IAClD,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,WAAW,CAAS;;IAQ5B;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAsCjC;;OAEG;IACH,kBAAkB,IAAI,OAAO;IAM7B;;OAEG;IACH,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAI3C;;;;OAIG;IACH,qBAAqB,CACnB,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC/B,IAAI;IAiBP;;;;;OAKG;IACH,kBAAkB,CAChB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,EAChB,YAAY,CAAC,EAAE,MAAM,GACpB,IAAI;IAkBP;;;OAGG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAkBvB;AAGD,eAAO,MAAM,SAAS,WAAkB,CAAC"}
|