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ACJ","file":"environment-modules.d.ts","sourcesContent":["import { PowerShellCommand } from '../data/powershell';\r\nimport { LogLevel } from '../diagnostics/log-level';\r\nimport { LogRecord } from '../diagnostics/log-record';\r\nimport { Logging } from '../diagnostics/logging';\r\nimport { Strings } from '../generated/strings';\r\n\r\n/**\r\n * Defines an object or property for other extensions to reference\r\n */\r\nexport interface EnvironmentModulePropertyDescriptor {\r\n    /**\r\n     * The type of value of this property.\r\n     * required if schema is not defined.\r\n     */\r\n    type?: 'array' | 'boolean' | 'null' | 'object' | 'number' | 'string';\r\n\r\n    /**\r\n     * A reference to a schema resource defining this property\r\n     */\r\n    schema?: string;\r\n\r\n    /**\r\n     * Tells other extension developers more information about this property\r\n     */\r\n    comment?: string;\r\n\r\n    /**\r\n     * Indicates if this field is required\r\n     */\r\n    required?: boolean;\r\n\r\n    /**\r\n     * The default value of this property\r\n     * The type should be of the same type defined in the 'type' property.\r\n     */\r\n    defaultsTo?: any;\r\n\r\n    /**\r\n     * The contract for the array items.\r\n     * Required if the type property is set to 'array'\r\n     */\r\n    items?: EnvironmentModulePropertyDescriptor;\r\n\r\n    /**\r\n     * The contract for the sub properties.\r\n     * Required if the type property is set to 'object'\r\n     */\r\n    properties?: MsftSme.StringMap<EnvironmentModulePropertyDescriptor>;\r\n}\r\n\r\nexport interface EnvironmentModuleDisplayable {\r\n    /**\r\n     * display name of module\r\n     */\r\n    displayName: string;\r\n\r\n    /**\r\n     * description of module\r\n     */\r\n    description: string;\r\n\r\n    /**\r\n     * icon url or smeIcon reference. Absolute or relative urls\r\n     */\r\n    icon: string;\r\n\r\n    /**\r\n     * The scale of icon. (1.0 is default if not specified)\r\n     */\r\n    iconScale?: number;\r\n\r\n    /**\r\n     * The dark theme data. (Optional)\r\n     */\r\n    darkTheme?: {\r\n        /**\r\n         * The icon path on the package.\r\n         */\r\n        icon: string;\r\n\r\n        /**\r\n         * The scale of icon. (1.0 is default if not specified)\r\n         */\r\n        iconScale?: number;\r\n    };\r\n\r\n    /**\r\n     * keywords for module search\r\n     */\r\n    keywords: string[];\r\n}\r\n\r\n/**\r\n * The type of entry point.\r\n */\r\nexport enum EnvironmentModuleEntryPointType {\r\n    ConnectionProvider = 'connectionProvider',\r\n    Solution = 'solution',\r\n    Tool = 'tool',\r\n    Service = 'service',\r\n    SettingsForm = 'settingsForm',\r\n    GroupProvider = 'groupProvider',\r\n    Worker = 'worker',\r\n    Dialog = 'dialog',\r\n    SnapIn = 'snapIn',\r\n    WacCopilot = \"wacCopilot\",\r\n    WacCopilotAngular = \"wacCopilotAngular\"\r\n}\r\n\r\n/**\r\n * The type of behavior to solution root navigation.\r\n */\r\nexport type SolutionRootNavigationBehaviorType = 'path' | 'connections' | 'tools';\r\n\r\n/**\r\n * The interface of condition check of server inventory data.\r\n */\r\nexport interface EnvironmentModuleConditionStatement {\r\n    /**\r\n     * The operator of the condition.\r\n     */\r\n    operator: 'gt' | 'ge' | 'lt' | 'le' | 'eq' | 'ne' | 'is' | 'not' | 'contains' | 'notContains'\r\n    | 'anyEq' | 'anyNe' | 'anyContains' | 'anyNotContains';\r\n\r\n    /**\r\n     * The data type of value.\r\n     */\r\n    type: 'version' | 'number' | 'string' | 'boolean' | 'numberArray' | 'stringArray';\r\n\r\n    /**\r\n     * The test value of the condition.\r\n     */\r\n    value: string | number | boolean | number[] | string[];\r\n}\r\n\r\n/**\r\n * The mapped inventory conditions.\r\n */\r\nexport type EnvironmentModuleConditionMap = MsftSme.StringMap<EnvironmentModuleConditionStatement>;\r\n\r\n/**\r\n * The requirement of entry point to be activated on the view.\r\n */\r\nexport interface EnvironmentModuleEntryPointRequirement {\r\n    /**\r\n     * The id of solutions of the connection type that satisfies this requirement.\r\n     */\r\n    solutionIds?: string[];\r\n\r\n    /**\r\n     * The id of the connection type that satisfies this requirement\r\n     */\r\n    connectionTypes?: string[];\r\n\r\n    /**\r\n     * The conditions of tool status.\r\n     */\r\n    conditions?: {\r\n        /**\r\n         * Check if app/desktop localhost. Only tested if it sets \"false\".\r\n         */\r\n        localhost?: boolean,\r\n\r\n        /**\r\n         * Check if specific condition against ServerInventory data.\r\n         */\r\n        inventory?: EnvironmentModuleConditionMap,\r\n\r\n        /**\r\n         * Check if specific condition against supported installation type data.\r\n         */\r\n        installationTypes?: string[],\r\n\r\n        /**\r\n         * Check if specific condition against Connection properties data.\r\n         */\r\n        properties?: EnvironmentModuleConditionMap,\r\n\r\n        /**\r\n         * @deprecated\r\n         * Check by using PowerShell script.\r\n         *\r\n         * must return the following format.\r\n         * {\r\n         *   state: 'Available', 'NotConfigured', 'NotSupported'\r\n         *   message: string\r\n         *   keyValuePairs: [ { name: string, value: string, type: string } ]\r\n         * }\r\n         */\r\n        script?: string\r\n\r\n        /**\r\n         * Check by using PowerShell script and command.\r\n         *\r\n         * must return the following format.\r\n         * {\r\n         *   state: 'Available', 'NotConfigured', 'NotSupported'\r\n         *   message: string\r\n         *   keyValuePairs: [ { name: string, value: string, type: string } ]\r\n         * }\r\n         */\r\n        powerShell?: PowerShellCommand;\r\n    }[];\r\n}\r\n\r\n/**\r\n * Defines an object that describes the identity of an extension method\r\n */\r\nexport interface ExtensionMethodIdentifier {\r\n    /**\r\n     * The name of the module in which the extension method can be found\r\n     */\r\n    module: string;\r\n    /**\r\n     * The name of the entry point in which the extension method can be found\r\n     */\r\n    name: string;\r\n    /**\r\n     * The method to find\r\n     */\r\n    method: string;\r\n    /**\r\n     * The version of the method to be found\r\n     */\r\n    version: number;\r\n}\r\n\r\n/**\r\n * Defines an object that describes the identity of an extension dialog\r\n */\r\nexport interface ExtensionDialogIdentifier {\r\n    /**\r\n     * The name of the module in which the extension dialog can be found\r\n     */\r\n    module: string;\r\n    /**\r\n     * The name of the entry point of the extension dialog\r\n     */\r\n    name: string;\r\n    /**\r\n     * The version of the dialog\r\n     */\r\n    version: number;\r\n}\r\n\r\nexport interface EnvironmentModuleConnectionStatusProvider {\r\n    /**\r\n     * If defined, powershell will be used to query a connections status\r\n     */\r\n    powerShell?: PowerShellCommand;\r\n\r\n    /**\r\n     * If defined, the gateways REST api will be used to query a connections status\r\n     */\r\n    relativeGatewayUrl?: string;\r\n\r\n    /**\r\n     * Specifies to get the connection status from a worker extension method.\r\n     * The worker method is expected to take a connection name as its only input\r\n     */\r\n    worker?: ExtensionMethodIdentifier;\r\n\r\n    /**\r\n     * Specifies to get the connection status from a service extension method.\r\n     * The service method is expected to take a connection name as its only input\r\n     */\r\n    service?: ExtensionMethodIdentifier;\r\n\r\n    /**\r\n     * If defined, will be used to look up display strings for the label and description of the status object\r\n     */\r\n    displayValueMap?: MsftSme.StringMap<string>;\r\n\r\n    /**\r\n     * If defined, will be used to skip status checks\r\n     */\r\n    skipStatusCheck?: boolean;\r\n}\r\n\r\nexport interface SolutionConnectionsViewConfiguration {\r\n    /**\r\n     * List of connections types to show in the view of the connections list\r\n     * each entry should be a valid connection type string identifier from any\r\n     * modules entrypoints of type @see EnvironmentModuleEntryPointType.ConnectionProvider\r\n     */\r\n    connectionTypes: string[];\r\n\r\n    /**\r\n     * The title of the connections list for this solution.\r\n     * Optional. A default header will be provided if this field is left out\r\n     */\r\n    header?: string;\r\n}\r\n\r\nexport interface SolutionToolsViewConfiguration {\r\n    /**\r\n     * Enables/Disable ths tools menu\r\n     */\r\n    enabled: boolean;\r\n\r\n    /**\r\n     * Sets the title of the tools menu\r\n     */\r\n    title: string;\r\n\r\n    /**\r\n     * Sets the title of the search field on the tools menu\r\n     */\r\n    searchTitle: string;\r\n\r\n    /**\r\n     * Indicates the default tool to open if no tool is provided. This value should be the name of an entrypoint in the same module\r\n     */\r\n    defaultTool: string;\r\n\r\n    /**\r\n     * The list of known tools that will be displayed at the first section of tool menu.\r\n     * 1) entry and group are mandatory.\r\n     * 2) create groups and sort members by priority then alphabetical.\r\n     * 3) sort the groups by highest priority number in the group members.\r\n     * 4) settings creates single group and sort members by priority then alphabetical.\r\n     */\r\n    predefined: {\r\n        /**\r\n         * The entry point ID with \"<module name>!<entry point name>\" format.\r\n         */\r\n        id: string;\r\n\r\n        /**\r\n         * The group display name.\r\n         */\r\n        group: string;\r\n\r\n        /**\r\n         * The ordering priority.\r\n         * (0 is highest)\r\n         */\r\n        priority?: number;\r\n\r\n        /**\r\n         * Indicating the tool is settings menu.\r\n         */\r\n        settings?: boolean;\r\n    }[];\r\n}\r\n\r\n/**\r\n * Defines the configuration for a connection provider experience\r\n */\r\nexport interface ConnectionProviderExperienceConfiguration {\r\n    /**\r\n     * The path to the experience.\r\n     */\r\n    path: string;\r\n\r\n    /**\r\n     * The label to display for the experience.\r\n     * ex) Add Server Connection, Create Failover Cluster Connection and so on.\r\n     */\r\n    label: string;\r\n\r\n    /**\r\n     * The dialog mode to use for the dialog that contains this experience\r\n     */\r\n    dialogMode?: 'normal' | 'wide' | 'compact' | 'fullscreen';\r\n}\r\n\r\n/**\r\n * The type of lifetime to implement when creating a worker\r\n */\r\nexport type WorkerLifetime = 'default' | 'long';\r\n\r\n/**\r\n * The type of startup type to implement when creating a service\r\n */\r\nexport type ServiceStartupType = 'automatic' | 'onDemand';\r\n\r\n/**\r\n * The type of cleanup type to implement when creating a service\r\n * 'never' means that that service will start and only be destroyed if specifically requested or the application ends\r\n * 'onIdle' means that the shell will clean up the service when no one has used it within a certain time limit.\r\n * This time limit is currently controlled by the shell.\r\n */\r\nexport type ServiceCleanupType = 'never' | 'onIdle';\r\n/**\r\n * Defines the target of an entry point\r\n */\r\nexport interface ExtenderDefinition {\r\n    /**\r\n     * The module to target\r\n     */\r\n    module: string;\r\n    /**\r\n     * The name of the extension target (within the 'module') to provide this entry point to\r\n     */\r\n    target: string;\r\n}\r\n\r\n/**\r\n * Defines the target of a worker entry point\r\n */\r\nexport interface WorkerExtenderDefinition extends ExtenderDefinition {\r\n    /**\r\n     * A map of method names to the versions that are implemented in this worker\r\n     */\r\n    methodVersions: MsftSme.StringMap<number>;\r\n}\r\n\r\n/**\r\n * Describes the method contract exposed by a worker for other modules to call.\r\n * When making breaking changes, make sure to use the version properties so dependent modules still work with an older contract\r\n */\r\nexport interface ExtensionMethodContract {\r\n    /**\r\n     * The version of this method. Create a new version for every breaking change\r\n     */\r\n    version?: number;\r\n    /**\r\n     * The name of the method\r\n     */\r\n    method: string;\r\n    /**\r\n     * a comment describing this method to consumers\r\n     */\r\n    comment?: string;\r\n    /**\r\n     * Defines the arguments expected to be passed to this method\r\n     */\r\n    arguments?: MsftSme.StringMap<EnvironmentModulePropertyDescriptor>;\r\n    /**\r\n     * Defines the contract that this method will return\r\n     */\r\n    returns: EnvironmentModulePropertyDescriptor;\r\n}\r\n\r\n/**\r\n * Describes the declaration for a dialog\r\n * When making breaking changes, make sure to use the version properties so dependent modules still work with an older contract\r\n */\r\nexport interface DialogExtensionDeclaration {\r\n    /**\r\n     * The version of this method. Create a new version for every breaking change\r\n     */\r\n    version?: number;\r\n    /**\r\n     * a comment describing this dialog to consumers\r\n     */\r\n    comment?: string;\r\n    /**\r\n    * The dialog mode to use for the dialog\r\n    */\r\n    dialogMode?: 'pane' | 'wide-pane' | 'compact' | 'compact-square' | 'fullscreen' | 'centered' | 'centered-large';\r\n    /**\r\n     * Defines the arguments expected to be passed to this method\r\n     */\r\n    arguments?: MsftSme.StringMap<EnvironmentModulePropertyDescriptor>;\r\n    /**\r\n     * Defines the contract that this dialog will return\r\n     */\r\n    returns: EnvironmentModulePropertyDescriptor;\r\n}\r\n\r\n/**\r\n * Define the minimum and maximum footprint of a snap in\r\n */\r\nexport interface SnapInSizeConstraints {\r\n    minWidth: number;\r\n    minHeight: number;\r\n    maxWidth: number;\r\n    maxHeight: number;\r\n}\r\n\r\n/**\r\n * Define the component interaction of inputs and outputs between the entry point and its consumer\r\n */\r\nexport interface ExtensionInteraction {\r\n    /**\r\n    * The version of this interaction. Create a new version for every breaking change\r\n    */\r\n    version?: number;\r\n    /**\r\n     * a comment describing this interaction model\r\n     */\r\n    comment?: string;\r\n    /**\r\n     * Defines the inputs that can be passed to this entry point\r\n     */\r\n    inputs?: MsftSme.StringMap<EnvironmentModulePropertyDescriptor>;\r\n    /**\r\n     * Defines the outputs that this entry point can return\r\n     */\r\n    outputs?: MsftSme.StringMap<EnvironmentModulePropertyDescriptor>;\r\n}\r\n\r\n/**\r\n * The type of lifetime to implement when creating a worker\r\n */\r\nexport enum ExtensionTargetType {\r\n    WorkerTarget = 'workerTarget'\r\n}\r\n\r\nexport interface ExtensionTarget {\r\n    /**\r\n     * The type of extension target\r\n     */\r\n    extensionTargetType: ExtensionTargetType;\r\n\r\n    /**\r\n     * Description of the workerTarget.\r\n     * This should tell the consumer what workers who target this are expected to do.\r\n     */\r\n    description: string;\r\n\r\n    /**\r\n     * The name of this extension target.\r\n     * Should be unique to this modules other extension targets\r\n     */\r\n    name: string;\r\n\r\n    /**\r\n     * Mapping to the parent module of this target\r\n     */\r\n    parentModule?: EnvironmentModule;\r\n}\r\n\r\nexport interface WorkerExtensionTarget extends ExtensionTarget {\r\n\r\n    /**\r\n     * The type of extension target\r\n     */\r\n    extensionTargetType: ExtensionTargetType.WorkerTarget;\r\n\r\n    /**\r\n     * worker only -- The contract that is expected to be fulfilled by worker entry points that extend this target\r\n     */\r\n    contract: ExtensionMethodContract[];\r\n}\r\n\r\n/**\r\n * Defines the provider for collecting active managing as information\r\n */\r\nexport interface ManagingAsProvider {\r\n    /**\r\n     * If Defined, Specifies to collect managing as data from a worker method\r\n     */\r\n    worker?: ExtensionMethodIdentifier;\r\n    /**\r\n     * If Defined, Specifies to collect managing as data from a service method\r\n     */\r\n    service?: ExtensionMethodIdentifier;\r\n}\r\n\r\n/**\r\n * Defines how to apply manage as scenarios to this connection type\r\n */\r\nexport interface EnvironmentModuleManageAsScheme {\r\n    /**\r\n     * If Defined, Specifies to configure manage as credentials from an extension dialog\r\n     */\r\n    configurationDialog: ExtensionDialogIdentifier;\r\n    /**\r\n     * If Defined, Specifies how to collect active managing as data\r\n     */\r\n    managingAsProvider: ManagingAsProvider;\r\n}\r\n\r\n/**\r\n * Defines a modules entry point\r\n */\r\nexport interface EnvironmentModuleEntryPoint extends EnvironmentModuleDisplayable {\r\n    /**\r\n     * The type of entry point.\r\n     */\r\n    entryPointType: EnvironmentModuleEntryPointType;\r\n\r\n    /**\r\n     * The name of entry point, unique to its parent module\r\n     */\r\n    name?: string;\r\n\r\n    /**\r\n     * The friendly url name to use to reference this entrypoint. This must be unique among all entrypoints\r\n     */\r\n    urlName?: string;\r\n\r\n    /**\r\n     * The path of entry point.\r\n     */\r\n    path: string;\r\n\r\n    /**\r\n     * The frame Id to share single iframe within the module.\r\n     */\r\n    iframeId?: string;\r\n\r\n    /**\r\n     * Experiment keys that must all be enabled to enable this entry point\r\n     */\r\n    experimentKeys?: string[];\r\n\r\n    /**\r\n     * The id of the group provider.\r\n     * Used to indicate which group provider should be used for grouping extensions\r\n     */\r\n    groupId?: string;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.ConnectionProvider types only.\r\n     * NOTE: This SHOULD be for SOLUTION types. since a connection type can exist in multiple solutions.\r\n     * If true, the search bar will shown the tools list for this connection type\r\n     * Otherwise, search bar will be hidden. Default is true.\r\n     */\r\n    searchBar?: boolean;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.ConnectionProvider types only.\r\n     * Alternative to providing \"path\".\r\n     * Configures the experiences for manipulating the connections provided by this entry point\r\n     */\r\n    experiences: {\r\n        add: ConnectionProviderExperienceConfiguration;\r\n        create: ConnectionProviderExperienceConfiguration;\r\n    };\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.ConnectionProvider types only.\r\n     * The id of the connection type that this entry point provides\r\n     */\r\n    connectionType?: string;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.ConnectionProvider types only.\r\n     * The friendly url name to use to reference the connection type that this entry point provides.\r\n     * This must be unique among all connection types\r\n     */\r\n    connectionTypeUrlName?: string;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.ConnectionProvider types only.\r\n     * The display name of the connection type that this entry point provides\r\n     */\r\n    connectionTypeName?: string;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.ConnectionProvider types only.\r\n     * The default solution to use when opening the connection type that this entry point provides\r\n     */\r\n    connectionTypeDefaultSolution?: string;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.ConnectionProvider types only.\r\n     * The status provider implementation for the connection type that this entry point provides\r\n     */\r\n    connectionStatusProvider?: EnvironmentModuleConnectionStatusProvider;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.ConnectionProvider types only.\r\n     * The manage as scheme to use for changing how the connection is managed\r\n     */\r\n    manageAsScheme?: EnvironmentModuleManageAsScheme;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.Tool types only.\r\n     * A list of requirements, if any requirement is met then this tool is applicable to a given connection\r\n     */\r\n    requirements?: EnvironmentModuleEntryPointRequirement[];\r\n\r\n    /**\r\n     * Mapping to the parent module of this entry point\r\n     */\r\n    parentModule?: EnvironmentModule;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.Solution types only.\r\n     * Defines how navigating to the root of this solution will behave.\r\n     * Setting this to 'path' will load this module to the 'path' property.\r\n     * Setting this to 'connections' will navigate instead to the connections list, customized for this solution\r\n     */\r\n    rootNavigationBehavior?: SolutionRootNavigationBehaviorType;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.Solution types only.\r\n     * Only applicable when 'rootNavigationBehavior' us set to 'connections'.\r\n     * Describes how to customize the view of the connections list.\r\n     */\r\n    connections?: SolutionConnectionsViewConfiguration;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.Solution types only. If provided, Configures the tools menu for this solution.\r\n     */\r\n    tools?: SolutionToolsViewConfiguration;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.Worker types only. If provided, Configures the lifetime of this worker.\r\n     */\r\n    lifetime?: WorkerLifetime;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.Service types only. If provided, Configures the startup type of this service.\r\n     */\r\n    startupType?: ServiceStartupType;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.Service types only. If provided, Configures the cleanup of this service.\r\n     */\r\n    cleanupType?: ServiceCleanupType;\r\n\r\n    /**\r\n     * Defines specific extensionTargets to provide this entry point to\r\n     */\r\n    extends?: ExtenderDefinition[];\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.Worker and @see EnvironmentModuleEntryPointType.Service types only.\r\n     * Describes the method contracts exposed by this worker or service for other modules to call.\r\n     */\r\n    exposes?: ExtensionMethodContract[];\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.Dialog types only\r\n     * Defines the declaration for this dialog - inputs and outputs.\r\n     */\r\n    declaration?: DialogExtensionDeclaration[];\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.SnapIn types only\r\n     * Defines the size requirements for this snap in\r\n     */\r\n    sizeConstrains?: SnapInSizeConstraints;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.SnapIn types only\r\n     * Defines the component interaction model for the snap in\r\n     */\r\n    interaction?: ExtensionInteraction;\r\n\r\n    /**\r\n     * @see EnvironmentModuleEntryPointType.SnapIn types only\r\n     * Defines the author of the snap in.\r\n     */\r\n    author?: string;\r\n}\r\n\r\n/**\r\n * The state definition of Tool condition.\r\n */\r\nexport enum EnvironmentModuleToolState {\r\n    /**\r\n     * Tool is available on the connection.\r\n     */\r\n    Available,\r\n\r\n    /**\r\n     * Tool is not available because it's not configured properly.\r\n     */\r\n    NotConfigured,\r\n\r\n    /**\r\n     * Tool it not supported on the connection.\r\n     */\r\n    NotSupported\r\n}\r\n\r\n/**\r\n * The result of Tool conditions.\r\n */\r\nexport interface EnvironmentModuleToolConditionResult {\r\n    /**\r\n     * Display the tool.\r\n     */\r\n    show: boolean;\r\n\r\n    /**\r\n     * The connection id of node.\r\n     */\r\n    connectionId?: string;\r\n\r\n    /**\r\n     * The state of tool condition.\r\n     */\r\n    detail?: EnvironmentModuleToolState;\r\n\r\n    /**\r\n     * The message of condition.\r\n     */\r\n    message?: string;\r\n}\r\n\r\n/**\r\n * Tool's combined entry point and inventory result.\r\n */\r\nexport interface EnvironmentModuleEntryPointWithToolConditionResult\r\n    extends EnvironmentModuleEntryPoint, EnvironmentModuleToolConditionResult {\r\n}\r\n\r\n/**\r\n * Environment module resource class.\r\n */\r\nexport interface EnvironmentModuleResource {\r\n    /**\r\n     * locale key string.\r\n     */\r\n    locale: string;\r\n\r\n    /**\r\n     * string map object.\r\n     */\r\n    strings: MsftSme.StringMap<string>;\r\n}\r\n\r\nexport const defaultEnvironmentConfiguration: MsftSme.EnvironmentConfiguration = {\r\n    gateway: {\r\n        disabled: false\r\n    },\r\n    appBar: {\r\n        title: {\r\n            hide: false\r\n        },\r\n        solution: {\r\n            hide: false,\r\n            hideDropdown: false\r\n        },\r\n        navigation: {\r\n            allowHistory: false,\r\n            allowRefresh: false,\r\n            allowUrlInput: false,\r\n            allowHome: false\r\n        },\r\n        urlField: {\r\n            hideSolutionUrl: true\r\n        },\r\n        rightMenu: {\r\n            showScripts: true,\r\n            showSettings: true,\r\n            showAbout: true,\r\n            showWindowControls: false,\r\n            showShareLink: false\r\n        },\r\n        aboutDialog: {\r\n            showFeedback: true,\r\n            feedbackLink: 'https://go.microsoft.com/fwlink/?linkid=2033442',\r\n            showDocumentation: true,\r\n            documentationLink: 'https://go.microsoft.com/fwlink/?linkid=2150525',\r\n            releaseNotesLink: 'https://aka.ms/honolulucurrent',\r\n            seeMoreReleaseDetailsLink: 'https://go.microsoft.com/fwlink/?linkid=2152971',\r\n            showLicense: true,\r\n            showScriptsUseRights: true,\r\n            showLicenseExtensions: true,\r\n            showPrivacyStatement: true,\r\n            privacyLink: 'https://aka.ms/winserverprivacy',\r\n            showSupportPolicy: true,\r\n            supportLink: 'https://aka.ms/wac-support-policy',\r\n            showThirdPartyNotice: true,\r\n            showShortcuts: true,\r\n            openLinkWithoutHref: false,\r\n            showAccessibilityCompliance: false,\r\n            accessibilityComplianceLink: 'https://go.microsoft.com/fwlink/?linkid=2121429',\r\n            extensionLicenseLink: 'https://aka.ms/wac-ga-extension-eula',\r\n            eulaLicenseLink: 'https://aka.ms/wac-product-ga-eula'\r\n        },\r\n        overview: {\r\n            gatewayStatusUpdateLink: 'settings/updates',\r\n            updateLearnMoreLink: 'https://aka.ms/honolulucurrent'\r\n        }\r\n    },\r\n    extensionsAutoUpdate: {\r\n        enable : true,\r\n        showAlert: true\r\n    },\r\n    gatewayAutoUpdate: {\r\n        enable: true\r\n    },\r\n    whatsNew: {\r\n        showDialog: true\r\n    },\r\n    tools: {\r\n        hide: false\r\n    },\r\n    connections: {\r\n        type: 'standard',\r\n        header: {\r\n            hide: false\r\n        }\r\n    },\r\n    telemetry: {\r\n        sourceLibraryCdnLink: 'https://js.monitor.azure.com/scripts/c/ms.analytics-web-3.0.2.min.js',\r\n        // Integrity hash generated via srihash.org\r\n        sourceLibraryCdnIntegrityHash: 'sha384-ZCsysyTvHb4xqC4BgJSay4nwlNIGlT1w5t5YQS5htghoD2XEL2b4SrkhRPhtr9GD'\r\n    },\r\n    settings: {\r\n        account: {\r\n            show: true\r\n        },\r\n        personalization: {\r\n            show: true\r\n        },\r\n        diagnostic: {\r\n            show: true\r\n        },\r\n        language: {\r\n            show: true\r\n        },\r\n        notification: {\r\n            show: true\r\n        },\r\n        extension: {\r\n            show: true\r\n        },\r\n        azure: {\r\n            show: true\r\n        },\r\n        access: {\r\n            show: true\r\n        },\r\n        sharedConnections: {\r\n            show: true\r\n        },\r\n        general: {\r\n            show: true\r\n        },\r\n        connectivity: {\r\n            show: true\r\n        },\r\n        updates: {\r\n            show: true\r\n        },\r\n        extensionUpdates: {\r\n            show: true\r\n        },\r\n        performance: {\r\n            show: true\r\n        },\r\n        advanced: {\r\n            show: true\r\n        },\r\n        proxy: {\r\n            show: true\r\n        }\r\n    }\r\n};\r\n\r\n/**\r\n * Defines an object that provides information about a connection type.\r\n */\r\nexport interface EnvironmentConnectionTypeInfo {\r\n    /**\r\n     * The provider entry point.\r\n     */\r\n    provider: EnvironmentModuleEntryPoint;\r\n\r\n    /**\r\n     * The solution entry point.\r\n     */\r\n    solution: EnvironmentModuleEntryPoint;\r\n}\r\n\r\nexport interface EnvironmentModuleFriendlyUrlMap {\r\n    to: MsftSme.StringMap<string>;\r\n    from: MsftSme.StringMap<string>;\r\n}\r\n\r\nexport interface EnvironmentModuleFriendlyUrlMaps {\r\n    connectionTypes: EnvironmentModuleFriendlyUrlMap;\r\n    solutions: EnvironmentModuleFriendlyUrlMap;\r\n    tools: EnvironmentModuleFriendlyUrlMap;\r\n    settingsForms: EnvironmentModuleFriendlyUrlMap;\r\n}\r\n\r\n/**\r\n * Environment module class.\r\n */\r\nexport class EnvironmentModule {\r\n    private static readonly logSourceName = 'ManifestLoader';\r\n\r\n    /**\r\n     * Static mapping for connection information.\r\n     */\r\n    private static connectionMap: { [name: string]: EnvironmentConnectionTypeInfo } = null;\r\n\r\n    /**\r\n     * Static mapping for extensionTargetTypes to a map of extensionTargetIds to entry point ids that fulfill that target\r\n     */\r\n    private static extensionTargetFulfillmentMap: MsftSme.StringMap<string[]>;\r\n\r\n    /**\r\n     * Static mapping for friendly url strings to entrypoint ids\r\n     */\r\n    private static friendlyUrlMap: EnvironmentModuleFriendlyUrlMaps = null;\r\n\r\n    /**\r\n     * The name of shell.\r\n     */\r\n    public static nameOfShell = 'msft.sme.shell';\r\n\r\n    /**\r\n     * The default signature if missing manifest.\r\n     */\r\n    public static defaultSignature = 'version 0.0.0';\r\n\r\n    /**\r\n     * The prefix for identifying an sme-icon reference\r\n     */\r\n    public static smeIconPrefix = 'sme-icon:';\r\n\r\n    /**\r\n     * All entry points from all modules\r\n     */\r\n    public static allEntryPoints: EnvironmentModuleEntryPoint[] = null;\r\n\r\n    /**\r\n     * All entry points by type\r\n     */\r\n    public static entryPointsByType: MsftSme.StringMap<EnvironmentModuleEntryPoint[]> = null;\r\n\r\n    /**\r\n     * All entry points by type\r\n     */\r\n    public static entryPointsById: MsftSme.StringMap<EnvironmentModuleEntryPoint> = null;\r\n\r\n    /**\r\n     * All extension targets from all modules\r\n     */\r\n    public static allExtensionTargets: ExtensionTarget[] = null;\r\n\r\n    /**\r\n     * All extension targets by type\r\n     */\r\n    public static extensionTargetsByType: MsftSme.StringMap<ExtensionTarget[]> = null;\r\n\r\n    /**\r\n     * All extension targets by type\r\n     */\r\n    public static extensionTargetsById: MsftSme.StringMap<ExtensionTarget> = null;\r\n\r\n    /**\r\n     * All extension targets by type\r\n     */\r\n    public static extensionOrigins: Set<String> = null;\r\n\r\n    /**\r\n     * schema file information.\r\n     */\r\n    public $schema?: string;\r\n\r\n    /**\r\n     * name of module.\r\n     */\r\n    public name: string;\r\n\r\n    /**\r\n     * display name of module.\r\n     */\r\n    public displayName: string;\r\n\r\n    /**\r\n     * description of set of tools.\r\n     */\r\n    public description?: string;\r\n\r\n    /**\r\n     * keywords of the module.\r\n     */\r\n    public keywords?: string[];\r\n\r\n    /**\r\n     * origin absolute url.\r\n     */\r\n    public origin: string;\r\n\r\n    /**\r\n     * target url to open the iframe.\r\n     */\r\n    public target?: string;\r\n\r\n    /**\r\n     * signature.\r\n     */\r\n    public signature: string;\r\n\r\n    /**\r\n     * The version of this module\r\n     */\r\n    public version: string;\r\n\r\n    /**\r\n     * icon url, absolute or relative to Shell url.\r\n     */\r\n    public icon?: string;\r\n\r\n    /**\r\n     * The support JEA endpoint with PowerShell module.\r\n     */\r\n    public jea?: boolean;\r\n\r\n    /**\r\n     * extension targets for this extension\r\n     * Defines things that can be extended in this module.\r\n     */\r\n    public extensionTargets?: ExtensionTarget[];\r\n\r\n    /**\r\n     * entry points to launch the tool.\r\n     */\r\n    public entryPoints: EnvironmentModuleEntryPoint[];\r\n\r\n    /**\r\n     * Assets shared by the module\r\n     */\r\n    public assets?: MsftSme.MsftSmeModuleAssets;\r\n\r\n    /**\r\n     * localized resources of strings.\r\n     */\r\n    public resources: EnvironmentModuleResource[];\r\n\r\n    /**\r\n     * Schemas provided for use in this manifest\r\n     */\r\n    public schemas?: MsftSme.StringMap<EnvironmentModulePropertyDescriptor>;\r\n\r\n    /**\r\n     * list of all other available modules for shell.\r\n     */\r\n    public modules?: EnvironmentModule[];\r\n\r\n    /**\r\n     * Indicates that this module is being sideLoaded\r\n     */\r\n    public isSideLoaded?: boolean;\r\n\r\n    /**\r\n     * The Environment configuration\r\n     */\r\n    public configuration: MsftSme.EnvironmentConfiguration;\r\n\r\n    /**\r\n     * returns true if the provided origin is a known extension origin\r\n     */\r\n    public static isExtensionOrigin(origin: string): boolean {\r\n        return this.extensionOrigins.has(origin);\r\n    }\r\n\r\n    /**\r\n     * Indicates if a given icon reference is an sme-icon or some other form\r\n     * @param iconRef the reference to check\r\n     */\r\n    public static isSmeIconRef(iconRef: string): boolean {\r\n        return (!MsftSme.isNullOrUndefined(iconRef) && iconRef.startsWith(EnvironmentModule.smeIconPrefix));\r\n    }\r\n\r\n    /**\r\n     * Gets the icon class from an iconRef or returns null if the iconRef is not an sme-icon reference\r\n     * @param iconRef the reference to check\r\n     */\r\n    public static getSmeIconClassFromRef(iconRef: string): string {\r\n        return (!MsftSme.isNullOrUndefined(iconRef) && EnvironmentModule.isSmeIconRef(iconRef))\r\n            ? iconRef.substring(EnvironmentModule.smeIconPrefix.length) : null;\r\n    }\r\n\r\n    /**\r\n     * Gets the icon url from an iconRef or returns null if the iconRef is an sme-icon reference\r\n     * @param iconRef the reference to check\r\n     */\r\n    public static getFormattedIconRefUrl(iconRef: string): string {\r\n        return (MsftSme.isNullOrUndefined(iconRef) || EnvironmentModule.isSmeIconRef(iconRef)) ? null : `url(${iconRef})`;\r\n    }\r\n\r\n    /**\r\n     * Processes an icon reference to resolve it to either a sme-icon or absolute url\r\n     * @param iconRef The icon reference\r\n     * @param module the module that the icon belongs to\r\n     */\r\n    public static processIconReference(iconRef: string, module: EnvironmentModule): string {\r\n        // leave icon ref alone if it is an sme-icon, absolute uri, or null/whitespace\r\n        if (MsftSme.isNullOrWhiteSpace(iconRef) || EnvironmentModule.isSmeIconRef(iconRef) || MsftSme.isUriAbsolute(iconRef)) {\r\n            return iconRef;\r\n        }\r\n\r\n        return this.toAbsolutePath(module, iconRef);\r\n    }\r\n\r\n    /**\r\n     * Converts relative module paths into absolute uris\r\n     */\r\n    private static toAbsolutePath(module: EnvironmentModule, relativePath: string): string {\r\n        const pathComponents = [relativePath];\r\n\r\n        if (module.target && !module.isSideLoaded) {\r\n            pathComponents.unshift(module.target);\r\n        }\r\n\r\n        pathComponents.unshift(module.origin);\r\n        return MsftSme.pathJoin('/', pathComponents);\r\n    }\r\n\r\n    /**\r\n     * Find resource string for the key.\r\n     *\r\n     * @param resources The resource.\r\n     * @param locale The locale.\r\n     * @param key The key string.\r\n     */\r\n    public static findResource(resources: EnvironmentModuleResource[], locale: string, key: string): string {\r\n        const prefix = 'resources:strings:';\r\n        if (!key.startsWith(prefix)) {\r\n            return key;\r\n        }\r\n\r\n        key = key.substring(prefix.length);\r\n        const en: EnvironmentModuleResource = resources.first((value: EnvironmentModuleResource) => value.locale === 'default');\r\n        const current: EnvironmentModuleResource = resources.first((value: EnvironmentModuleResource) => value.locale === locale);\r\n        if (current && current.strings[key]) {\r\n            return current.strings[key];\r\n        } else if (en && en.strings[key]) {\r\n            return en.strings[key];\r\n        }\r\n\r\n        return key;\r\n    }\r\n\r\n    /**\r\n     * Recursively processes manifest resources\r\n     *\r\n     * @param module the manifest object.\r\n     * @param locale the locale string such as 'en'.\r\n     * @param obj current object, defaults to the module itself\r\n     */\r\n    private static processModuleResources(module: EnvironmentModule, locale: string, obj: any = module): void {\r\n        if (!Array.isArray(module.resources)) {\r\n            module.resources = [];\r\n        }\r\n\r\n        const keys = Object.keys(obj);\r\n        keys.forEach(key => {\r\n            if (typeof obj[key] === 'string') {\r\n                // first check the string for localized values\r\n                obj[key] = EnvironmentModule.findResource(module.resources, locale, obj[key]);\r\n\r\n                // if the key is 'icon' treat this field as an icon\r\n                if (key === 'icon') {\r\n                    obj[key] = EnvironmentModule.processIconReference(obj[key], module);\r\n                }\r\n            } else if (typeof obj[key] === 'object') {\r\n                EnvironmentModule.processModuleResources(module, locale, obj[key]);\r\n            }\r\n        });\r\n    }\r\n\r\n    public static getModuleAssetUri(moduleName: string, resourceName: string, version: string): string {\r\n        const assets = MsftSme.self().Resources.moduleAssets;\r\n        if (assets[moduleName] && assets[moduleName][resourceName] && assets[moduleName][resourceName][version]) {\r\n            return assets[moduleName][resourceName][version];\r\n        }\r\n        return null;\r\n    }\r\n\r\n    /**\r\n     * Create environment object from the manifest.\r\n     *\r\n     * @param manifest the manifest object.\r\n     * @param locale the locale string such as 'en'.\r\n     */\r\n    public static createEnvironment(manifest: any, locale: string): any {\r\n        // use local origin automatically.\r\n        manifest.origin = MsftSme.getSafeOrigin();\r\n\r\n        // initialize tracking of known trusted origins\r\n        this.extensionOrigins = new Set<string>();\r\n        this.extensionOrigins.add(manifest.origin);\r\n\r\n        // use current time if version is missing so this enforce browser caching if v= option is used.\r\n        manifest.version = manifest.version ? manifest.version : Date.now().toString();\r\n\r\n        // merge manifest configuration with default configuration\r\n        manifest.configuration = MsftSme.deepAssign({}, defaultEnvironmentConfiguration, manifest.configuration);\r\n\r\n        const modules = manifest.modules || [];\r\n\r\n        // process manifest entry points separately from children modules\r\n        if (manifest.name === 'msft.sme.shell') {\r\n            const shellExtensionManifest = { ...manifest };\r\n            delete shellExtensionManifest.modules;\r\n            shellExtensionManifest.name = 'msft.sme.shell-extensions';\r\n            shellExtensionManifest.target = '/extensions';\r\n            modules.push(shellExtensionManifest);\r\n        }\r\n        // Initialize Module Assets\r\n        MsftSme.self().Resources.moduleAssets = {};\r\n\r\n        // process Modules\r\n        if (modules && modules.length > 0) {\r\n\r\n            // first process resources, signature, and origin\r\n            for (const module of modules) {\r\n                // TODO: signature is going to be removed from modules, for now always use default.\r\n                module.signature = EnvironmentModule.defaultSignature;\r\n\r\n                // if the module has no origin, use the global one.\r\n                module.origin = module.origin || manifest.origin;\r\n                this.extensionOrigins.add(module.origin);\r\n\r\n                // process module parts\r\n                EnvironmentModule.processModuleResources(module, locale);\r\n                delete module['resources'];\r\n\r\n                // add assets to module assets using absolute paths\r\n                if (module.assets) {\r\n                    const moduleAssets: MsftSme.MsftSmeModuleAssets = {};\r\n                    const assetKeys = Object.keys(module.assets);\r\n                    assetKeys.forEach(key => {\r\n                        moduleAssets[key] = {};\r\n                        const versionKeys = Object.keys(module.assets[key]);\r\n                        versionKeys.forEach(version => {\r\n                            moduleAssets[key][version] = this.toAbsolutePath(module, module.assets[key][version]);\r\n                        });\r\n                    });\r\n\r\n                    MsftSme.self().Resources.moduleAssets[module.name] = moduleAssets;\r\n                }\r\n            }\r\n\r\n            // now process extension targets\r\n            for (const module of modules) {\r\n                EnvironmentModule.processExtensionTargets(module);\r\n            }\r\n\r\n            // finally process entry points\r\n            for (const module of modules) {\r\n                EnvironmentModule.processEntryPoints(module);\r\n            }\r\n\r\n            // default entry point collections to be sorted alphabetically\r\n            const alphaSort = (a, b) => a.displayName ? a.displayName.localeCompareIgnoreCase(b.displayName) : -1;\r\n            if (this.allEntryPoints) {\r\n                this.allEntryPoints.sort(alphaSort);\r\n            } else {\r\n                this.allEntryPoints = [];\r\n            }\r\n\r\n            if (this.entryPointsByType) {\r\n                this.entryPointsByType[EnvironmentModuleEntryPointType.Solution].sort(alphaSort);\r\n                this.entryPointsByType[EnvironmentModuleEntryPointType.Tool].sort(alphaSort);\r\n            }\r\n\r\n            // TODO: do we want settings alphabetized?\r\n        }\r\n        return manifest;\r\n    }\r\n\r\n    /**\r\n     * Gets the environment module.\r\n     *\r\n     * @param name the name of module.\r\n     * @return EnvironmentModule the environment module.\r\n     */\r\n    public static checkEnvironmentInitialized(): void {\r\n        if (!MsftSme || !MsftSme.self().Environment) {\r\n            const message = MsftSme.getStrings<Strings>().MsftSmeShell.Core.Error.EnvironmentNotInitialized.message;\r\n            throw Error(message);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Gets the environment module.\r\n     *\r\n     * @param name the name of module.\r\n     * @return EnvironmentModule the environment module.\r\n     */\r\n    public static getEnvironmentModule(name: string): EnvironmentModule {\r\n        const shellEnvironment = MsftSme.self().Environment;\r\n        const modules = shellEnvironment && shellEnvironment.modules;\r\n        if (modules) {\r\n            for (const module of modules) {\r\n                if (module.name === name) {\r\n                    return <EnvironmentModule>module;\r\n                }\r\n            }\r\n        }\r\n\r\n        if (shellEnvironment.name === name) {\r\n            return <EnvironmentModule>shellEnvironment;\r\n        }\r\n\r\n        return null;\r\n    }\r\n\r\n    /**\r\n     * Process extension targets for quick and easy access later\r\n     * @param module the modules to process\r\n     */\r\n    private static processExtensionTargets(module: EnvironmentModule) {\r\n        // initialize tracking structures if they have not been\r\n        if (!EnvironmentModule.allExtensionTargets) {\r\n            EnvironmentModule.allExtensionTargets = [];\r\n            EnvironmentModule.extensionTargetsByType = {};\r\n            EnvironmentModule.extensionTargetsById = {};\r\n            EnvironmentModule.extensionTargetFulfillmentMap = {};\r\n            Object.keys(ExtensionTargetType).forEach(key => this.extensionTargetsByType[ExtensionTargetType[key]] = []);\r\n        }\r\n\r\n        // stop if there are no extension targets in this module\r\n        if (!module.extensionTargets) {\r\n            return;\r\n        }\r\n\r\n        module.extensionTargets.forEach(extensionTarget => {\r\n            // ignore invalid types in the manifest\r\n            if (!EnvironmentModule.extensionTargetsByType[extensionTarget.extensionTargetType]) {\r\n                Logging.log(<LogRecord>{\r\n                    source: EnvironmentModule.logSourceName,\r\n                    level: LogLevel.Warning,\r\n                    consoleGroupHeader: `Unable to determine extensionTargetType.`,\r\n                    message: `Entry point \"${extensionTarget.name}\" in module \"${module.displayName} has a extensionTargetType of: ${extensionTarget.extensionTargetType}`\r\n                });\r\n                return;\r\n            }\r\n            // save the module information into the extension target\r\n            extensionTarget.parentModule = module;\r\n\r\n            const extensionTargetId = EnvironmentModule.createFormattedExtensionTarget(extensionTarget);\r\n\r\n            // save the module information into the extension target\r\n            extensionTarget.parentModule = module;\r\n\r\n            // push to data structures\r\n            EnvironmentModule.allExtensionTargets.push(extensionTarget);\r\n            EnvironmentModule.extensionTargetsByType[extensionTarget.extensionTargetType].push(extensionTarget);\r\n            EnvironmentModule.extensionTargetsById[extensionTargetId] = extensionTarget;\r\n\r\n            // initialize fulfillment map\r\n            EnvironmentModule.extensionTargetFulfillmentMap[extensionTargetId] = [];\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Process Entry points for quick and easy access later\r\n     * @param module the modules to process\r\n     */\r\n    private static processEntryPoints(module: EnvironmentModule) {\r\n        // initialize tracking structures if they have not been\r\n        if (!EnvironmentModule.allEntryPoints) {\r\n            EnvironmentModule.allEntryPoints = [];\r\n            EnvironmentModule.entryPointsByType = {};\r\n            EnvironmentModule.entryPointsById = {};\r\n            Object.keys(EnvironmentModuleEntryPointType).forEach(key => this.entryPointsByType[EnvironmentModuleEntryPointType[key]] = []);\r\n            this.friendlyUrlMap = {\r\n                connectionTypes: { to: {}, from: {} },\r\n                solutions: { to: {}, from: {} },\r\n                tools: { to: {}, from: {} },\r\n                settingsForms: { to: {}, from: {} }\r\n            };\r\n        }\r\n\r\n        if (!module.entryPoints) {\r\n            return;\r\n        }\r\n\r\n        module.entryPoints.forEach(entryPoint => {\r\n            // ignore invalid types in the manifest\r\n            if (!EnvironmentModule.entryPointsByType[entryPoint.entryPointType]) {\r\n                Logging.log(<LogRecord>{\r\n                    source: EnvironmentModule.logSourceName,\r\n                    level: LogLevel.Warning,\r\n                    consoleGroupHeader: `Unable to determine entryPointType.`,\r\n                    message: `Entry point \"${entryPoint.displayName}\" in module \"${module.displayName} has a entryPointType of: ${entryPoint.entryPointType}`\r\n                });\r\n                return;\r\n            }\r\n\r\n            // if we have experiment keys, dont process the entry point if any key is not enabled\r\n            if (entryPoint.experimentKeys && entryPoint.experimentKeys.some(key => !MsftSme.isExperimentEnabledRaw(key))) {\r\n                return;\r\n            }\r\n\r\n            // save the module information into the entry point\r\n            entryPoint.parentModule = module;\r\n\r\n            const entryPointId = EnvironmentModule.createFormattedEntrypoint(entryPoint);\r\n\r\n            // push to data structures\r\n            EnvironmentModule.allEntryPoints.push(entryPoint);\r\n            EnvironmentModule.entryPointsByType[entryPoint.entryPointType].push(entryPoint);\r\n            EnvironmentModule.entryPointsById[entryPointId] = entryPoint;\r\n\r\n            // process url mappings\r\n            if (entryPoint.urlName) {\r\n\r\n                switch (entryPoint.entryPointType) {\r\n                    case EnvironmentModuleEntryPointType.Solution:\r\n                        this.friendlyUrlMap.solutions.to[entryPointId] = entryPoint.urlName;\r\n                        this.friendlyUrlMap.solutions.from[entryPoint.urlName] = entryPointId;\r\n                        break;\r\n                    case EnvironmentModuleEntryPointType.Tool:\r\n                        this.friendlyUrlMap.tools.to[entryPointId] = entryPoint.urlName;\r\n                        this.friendlyUrlMap.tools.from[entryPoint.urlName] = entryPointId;\r\n                        break;\r\n                    case EnvironmentModuleEntryPointType.SettingsForm:\r\n                        this.friendlyUrlMap.settingsForms.to[entryPointId] = entryPoint.urlName;\r\n                        this.friendlyUrlMap.settingsForms.from[entryPoint.urlName] = entryPointId;\r\n                        break;\r\n                    case EnvironmentModuleEntryPointType.ConnectionProvider:\r\n                        if (entryPoint.connectionTypeUrlName) {\r\n                            this.friendlyUrlMap.connectionTypes.to[entryPoint.connectionType] = entryPoint.connectionTypeUrlName;\r\n                            this.friendlyUrlMap.connectionTypes.from[entryPoint.connectionTypeUrlName] = entryPoint.connectionType;\r\n                        }\r\n                }\r\n            }\r\n\r\n            if (entryPoint.entryPointType === EnvironmentModuleEntryPointType.ConnectionProvider && entryPoint.connectionTypeUrlName) {\r\n                this.friendlyUrlMap.connectionTypes.to[entryPoint.connectionType] = entryPoint.connectionTypeUrlName;\r\n                this.friendlyUrlMap.connectionTypes.from[entryPoint.connectionTypeUrlName] = entryPoint.connectionType;\r\n            }\r\n\r\n            // process extension mappings\r\n            if (entryPoint.extends) {\r\n                entryPoint.extends.forEach(extender => {\r\n                    const extensionTarget = EnvironmentModule.getExtensionTargets(target => {\r\n                        return target.parentModule.name === extender.module\r\n                            && target.name === extender.target;\r\n                    }).first();\r\n\r\n                    if (MsftSme.isNullOrUndefined(extensionTarget)) {\r\n                        // if we get here, either that target is no longer supported or the target extension is not installed.\r\n                        return;\r\n                    }\r\n\r\n                    const extensionTargetId = EnvironmentModule.createFormattedExtensionTarget(extensionTarget);\r\n                    EnvironmentModule.extensionTargetFulfillmentMap[extensionTargetId].push(entryPointId);\r\n                });\r\n            }\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Evaluates all of the modules in the environment and returns a flat list of all of their entry points.\r\n     * optionally filtered by the 'filter' function\r\n     *\r\n     * @param filter the filter to apply to the entry points.\r\n     * @return a flat list of all module entry points\r\n     */\r\n    private static getExtensionTargets(filter?: (extensionTarget: ExtensionTarget) => boolean): ExtensionTarget[] {\r\n        return filter ? EnvironmentModule.allExtensionTargets.filter(filter) : EnvironmentModule.allExtensionTargets;\r\n    }\r\n\r\n    /**\r\n     * Evaluates all of the modules in the environment and returns a flat list of all of their entry points.\r\n     * optionally filtered by the 'filter' function\r\n     *\r\n     * @param filter the filter to apply to the entry points.\r\n     * @return a flat list of all module entry points\r\n     */\r\n    public static getEntryPoints(filter?: (entryPoint: EnvironmentModuleEntryPoint) => boolean): EnvironmentModuleEntryPoint[] {\r\n        EnvironmentModule.checkEnvironmentInitialized();\r\n        return filter ? EnvironmentModule.allEntryPoints.filter(filter) : EnvironmentModule.allEntryPoints;\r\n    }\r\n\r\n    /**\r\n     * Gets the available entry points from all of the modules in the environment, filtered by type.\r\n     *\r\n     * @param name the name of module.\r\n     * @return EnvironmentModule the environment module.\r\n     */\r\n    public static getEntryPointsByType(entryPointTypes: EnvironmentModuleEntryPointType[]): EnvironmentModuleEntryPoint[] {\r\n        EnvironmentModule.checkEnvironmentInitialized();\r\n        return entryPointTypes.mapMany<EnvironmentModuleEntryPoint>(type => EnvironmentModule.entryPointsByType[type]);\r\n    }\r\n\r\n    /**\r\n     * Gets the connection type mapping data.\r\n     *\r\n     * @return the mapping object.\r\n     */\r\n    public static fulfillExtensionTarget(extensionTargetId): string[] {\r\n        EnvironmentModule.checkEnvironmentInitialized();\r\n        return EnvironmentModule.extensionTargetFulfillmentMap[extensionTargetId];\r\n    }\r\n\r\n    /**\r\n     * Gets the connection type mapping data.\r\n     *\r\n     * @return the mapping object.\r\n     */\r\n    public static getConnectionMap(): { [name: string]: EnvironmentConnectionTypeInfo } {\r\n        if (!EnvironmentModule.connectionMap) {\r\n            EnvironmentModule.connectionMap = EnvironmentModule.createConnectionMap();\r\n        }\r\n\r\n        return EnvironmentModule.connectionMap;\r\n    }\r\n\r\n    /**\r\n     * Gets a friendly url segment from a connection type\r\n     * @param connectionType the connection type to map.\r\n     * @return string friendly url for the connection type or the connection type if no friendly name exists.\r\n     */\r\n    public static getFriendlyUrlSegmentForConnectionType(connectionType: string, fallbackToUnfriendlySegment = true): string {\r\n        return EnvironmentModule.friendlyUrlMap.connectionTypes.to[connectionType] || (fallbackToUnfriendlySegment ? connectionType : null);\r\n    }\r\n\r\n    /**\r\n     * Gets a connection type from a friendly url segment\r\n     * @param urlSegment the url segment to map\r\n     * @return string connection type found using the friendly url segment\r\n     */\r\n    public static getConnectionTypeFromFriendlyUrlSegment(urlSegment: string): string {\r\n        return EnvironmentModule.friendlyUrlMap.connectionTypes.from[urlSegment];\r\n    }\r\n\r\n    /**\r\n     * Gets a friendly url segment from an entry point id\r\n     * @param urlSegment the url segment.\r\n     * @param entryPointType the type of entry point to look for.\r\n     * @return string friendly url for the entry point id\r\n     */\r\n    public static getFriendlyUrlSegmentForEntryPoint(\r\n        entryPoint: string, entryPointType: EnvironmentModuleEntryPointType, fallbackToUnfriendlySegment = true): string {\r\n        switch (entryPointType) {\r\n            case EnvironmentModuleEntryPointType.Solution:\r\n                return EnvironmentModule.friendlyUrlMap.solutions.to[entryPoint] || (fallbackToUnfriendlySegment ? entryPoint : null);\r\n            case EnvironmentModuleEntryPointType.Tool:\r\n                return EnvironmentModule.friendlyUrlMap.tools.to[entryPoint] || (fallbackToUnfriendlySegment ? entryPoint : null);\r\n            case EnvironmentModuleEntryPointType.SettingsForm:\r\n                return EnvironmentModule.friendlyUrlMap.settingsForms.to[entryPoint] || (fallbackToUnfriendlySegment ? entryPoint : null);\r\n        }\r\n\r\n        return null;\r\n    }\r\n\r\n    /**\r\n     * Gets a friendly url segment for an entry point\r\n     * @param urlSegment the url segment.\r\n     * @param entryPointType the type of entry point to look for.\r\n     * @return string friendly url for the entry point\r\n     */\r\n    public static getEntryPointFromFriendlyUrlSegment(urlSegment: string, entryPointType: EnvironmentModuleEntryPointType): string {\r\n        switch (entryPointType) {\r\n            case EnvironmentModuleEntryPointType.Solution:\r\n                return EnvironmentModule.friendlyUrlMap.solutions.from[urlSegment];\r\n            case EnvironmentModuleEntryPointType.Tool:\r\n                return EnvironmentModule.friendlyUrlMap.tools.from[urlSegment];\r\n            case EnvironmentModuleEntryPointType.SettingsForm:\r\n                return EnvironmentModule.friendlyUrlMap.settingsForms.from[urlSegment];\r\n        }\r\n\r\n        return null;\r\n    }\r\n\r\n    /**\r\n     * Gets the connection type information.\r\n     *\r\n     * @param typeName the type name.\r\n     * @return EnvironmentConnectionTypeInfo the connection type information.\r\n     */\r\n    public static getConnectionTypeInfo(typeName: string): EnvironmentConnectionTypeInfo {\r\n        return EnvironmentModule.getConnectionMap()[typeName];\r\n    }\r\n\r\n    private static createConnectionMap(): { [name: string]: EnvironmentConnectionTypeInfo } {\r\n        const map: { [name: string]: EnvironmentConnectionTypeInfo } = {};\r\n        const providers = this.getEntryPointsByType([EnvironmentModuleEntryPointType.ConnectionProvider]);\r\n        providers.forEach(provider => {\r\n            if (!provider.connectionTypeDefaultSolution) {\r\n                const message = MsftSme.getStrings<Strings>().MsftSmeShell.Core.Error.EnvironmentMissingDefault.message;\r\n                throw new Error(message);\r\n            }\r\n\r\n            const solutionEntrypoint = EnvironmentModule.splitFormattedEntrypoint(provider.connectionTypeDefaultSolution);\r\n            const solution = this.getEntryPointsByType([EnvironmentModuleEntryPointType.Solution])\r\n                .first(ep => ep.parentModule.name === solutionEntrypoint.moduleName && ep.name === solutionEntrypoint.entrypointName);\r\n            map[provider.connectionType] = <EnvironmentConnectionTypeInfo>{ provider, solution };\r\n            if (solution && solution.parentModule && solution.parentModule.name) {\r\n                map[solution.parentModule.name] = map[provider.connectionType];\r\n            }\r\n        });\r\n\r\n        return map;\r\n    }\r\n\r\n    /**\r\n     * splits an entrypoint identifier string into its respective module and entrypoint names\r\n     * @param format the formatted entrypoint identifier string\r\n     */\r\n    public static splitFormattedEntrypoint(format: string) {\r\n        const parts = format.split('!');\r\n        return { moduleName: parts[0], entrypointName: parts[1] };\r\n    }\r\n\r\n    /**\r\n     * creates a formatted entrypoint identifier string from an entrypoint\r\n     * @param entryPoint the entrypoint to create the string from\r\n     */\r\n    public static createFormattedEntrypoint(entryPoint: EnvironmentModuleEntryPoint) {\r\n        return EnvironmentModule.createEntrypointId(entryPoint.parentModule.name, entryPoint.name);\r\n    }\r\n\r\n    public static createEntrypointId(moduleName: string, entryPointName: string) {\r\n        return `${moduleName}!${entryPointName}`;\r\n    }\r\n\r\n    /**\r\n     * Create a formatted iframe ID used to link iframes and their html element\r\n     * Replace . with - because . is not permitted in css selectors required for testing\r\n     * @param parentModuleName the name of the parent module of the iframe content\r\n     * @param entryPointName the name of the entry point loaded by the iframe\r\n     */\r\n    public static createFormattedIFrameId(parentModuleName: string, entryPointName: string): string {\r\n        const parentModuleId = MsftSme.replaceAll(parentModuleName, '.', '-');\r\n        return '{0}-{1}'.format(parentModuleId, entryPointName);\r\n    }\r\n\r\n    /**\r\n     * splits an extension target identifier string into its respective module and extension target names\r\n     * @param format the formatted extension target identifier string\r\n     */\r\n    public static splitFormattedExtensionTarget(format: string) {\r\n        const parts = format.split('!');\r\n        return { moduleName: parts[0], extensionTargetName: parts[1] };\r\n    }\r\n\r\n    /**\r\n     * creates a formatted extension target identifier string from an extension target\r\n     * @param entryPoint the extension target to create the string from\r\n     */\r\n    public static createFormattedExtensionTarget(extensionTarget: ExtensionTarget) {\r\n        return `${extensionTarget.parentModule.name}!${extensionTarget.name}`;\r\n    }\r\n\r\n    /**\r\n     * resolves an entrypoint from a formatted entrypoint identifier string\r\n     * @param formattedEntrypointIdentifier the formatted entrypoint identifier string\r\n     */\r\n    public static resolveEntrypoint(formattedEntrypointIdentifier: string): EnvironmentModuleEntryPoint {\r\n        if (!formattedEntrypointIdentifier) {\r\n            return null;\r\n        }\r\n        const parts = EnvironmentModule.splitFormattedEntrypoint(formattedEntrypointIdentifier);\r\n        if (!parts.moduleName || !parts.entrypointName) {\r\n            return null;\r\n        }\r\n        const entryPoints = this.getEntryPoints(ep => ep.name === parts.entrypointName && ep.parentModule.name === parts.moduleName);\r\n        return entryPoints[0] || null;\r\n    }\r\n\r\n    /**\r\n     * Gets the name of current shell or module.\r\n     */\r\n    public static getModuleName(): string {\r\n        const self = MsftSme.self();\r\n        return self.Init.moduleName;\r\n    }\r\n\r\n    /**\r\n     * Gets the version of current shell or module.\r\n     */\r\n    public static getModuleVersion(): string {\r\n        const self = MsftSme.self();\r\n        if (self.Environment.version) {\r\n            return self.Environment.version;\r\n        }\r\n\r\n        for (const module of self.Environment.modules) {\r\n            if (module.name === self.Init.moduleName && module.version) {\r\n                self.Environment.version = module.version;\r\n                return module.version;\r\n            }\r\n        }\r\n\r\n        return '0.0.0';\r\n    }\r\n\r\n    /**\r\n     * Compare the shell version with specified version.\r\n     * - this function must be called after NavigationService Init was called, otherwise it\r\n     * cannot get current shell version and return false.\r\n     * - Tag format is expected be like \"<Major>.<Minor>.<Patch>-<Tag>.<Tag version>\".\r\n     *   ex) 1.2.3-myTagName.123\r\n     *\r\n     * @param inputVersion the version to compare.\r\n     * @return true if shell has newer version running.\r\n     */\r\n    public static shellGreaterOrEqual(inputVersion: string): boolean {\r\n        if (MsftSme.isNullOrWhiteSpace(inputVersion)) {\r\n            // shell doesn't give version.\r\n            Logging.logError('EnvironmentModule.shellGreaterOrEqual', 'version is empty.');\r\n            return false;\r\n        }\r\n\r\n        const shellVersion = MsftSme.self().Init.shellVersion;\r\n        if (MsftSme.isNullOrWhiteSpace(shellVersion)) {\r\n            // shell doesn't give version.\r\n            Logging.logError('EnvironmentModule.shellGreaterOrEqual', 'shell version is not available.');\r\n            return false;\r\n        }\r\n\r\n        const tagSegments = inputVersion.split(\"-\");\r\n        let inputCoreVersion = inputVersion;\r\n        let inputTag = \"\";\r\n        let inputTagVersion = 0;\r\n        if (tagSegments.length === 2) {\r\n            inputCoreVersion = tagSegments[0];\r\n            const tag = tagSegments[1].split(\".\");\r\n            inputTag = tag[0];\r\n            if (tag.length === 2) {\r\n                const tagNumber = Number(tag[1]);\r\n                inputTagVersion = isNaN(tagNumber) ? 0: tagNumber;\r\n            }\r\n        }\r\n\r\n        const inputSegments = inputCoreVersion.split('.');\r\n        if (inputSegments.length !== 3) {\r\n            // shell doesn't give right version format.\r\n            Logging.logError('EnvironmentModule.shellGreaterOrEqual', 'version format is not right.');\r\n            return false;\r\n        }\r\n\r\n        const shellTagSegments = shellVersion.split(\"-\");\r\n        let shellCoreVersion = shellVersion;\r\n        let shellTag = \"\";\r\n        let shellTagVersion = 0;\r\n        if (shellTagSegments.length === 2) {\r\n            shellCoreVersion = shellTagSegments[0];\r\n            const tag = shellTagSegments[1].split(\".\");\r\n            shellTag = tag[0];\r\n            if (tag.length === 2) {\r\n                const tagNumber = Number(tag[1]);\r\n                shellTagVersion = isNaN(tagNumber) ? 0: tagNumber;\r\n            }\r\n        }\r\n\r\n        const shellSegments = shellCoreVersion.split('.');\r\n        if (shellSegments.length !== 3) {\r\n            // shell doesn't give right version format.\r\n            Logging.logError('EnvironmentModule.shellGreaterOrEqual', 'shell version is corrupted.');\r\n            return false;\r\n        }\r\n\r\n        const inputDigits = inputSegments.map(digit => {\r\n            const num = Number(digit);\r\n            return isNaN(num) ? 0 : num;\r\n        });\r\n        const shellDigits = shellSegments.map(digit => {\r\n            const num = Number(digit);\r\n            return isNaN(num) ? 0 : num;\r\n        });\r\n        if (shellDigits[0] < inputDigits[0]\r\n            || (shellDigits[0] === inputDigits[0] && shellDigits[1] < inputDigits[1])\r\n            || (shellDigits[0] === inputDigits[0] && shellDigits[1] === inputDigits[1] && shellDigits[2] < inputDigits[2])\r\n            || (shellDigits[0] === inputDigits[0] && shellDigits[1] === inputDigits[1] && shellDigits[2] === inputDigits[2]\r\n                && shellTag !== \"\" && shellTag.localeCompare(inputTag) < 0)\r\n            || (shellDigits[0] === inputDigits[0] && shellDigits[1] === inputDigits[1] && shellDigits[2] === inputDigits[2]\r\n                && shellTag !== \"\" && shellTag.localeCompare(inputTag) === 0) && shellTagVersion < inputTagVersion) {\r\n            return false;\r\n        }\r\n\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * Check if the gateway uses API set of version 2.0.0.\r\n     * @returns true if version 2.0.0\r\n     */\r\n    public static get isGatewayV200(): boolean {\r\n        return MsftSme.self().Init.gatewayApiVersion === '2.0.0';\r\n    }\r\n\r\n    /**\r\n     * check if the gateway runs on Windows platform.\r\n     * @returns true if Windows platform.\r\n     */\r\n    public static get isGatewayWindows(): boolean {\r\n        return MsftSme.self().Init.gatewayPlatform === 'Windows';\r\n    }\r\n\r\n    /**\r\n     * Check if the gateway runs on Linux platform.\r\n     * @returns true if Linux platform.\r\n     */\r\n    public static get isGatewayLinux(): boolean {\r\n        return MsftSme.self().Init.gatewayPlatform === 'Linux';\r\n    }\r\n}\r\n"]}