vitess.io/vitess@v0.16.2/web/vtadmin/src/react-app-env.d.ts (about)

     1  /// <reference types="react-scripts" />
     2  declare namespace NodeJS {
     3      interface ProcessEnv {
     4          NODE_ENV: 'development' | 'production' | 'test';
     5          PUBLIC_URL: string;
     6  
     7          /* REQUIRED */
     8  
     9          // Required. The full address of vtadmin-api's HTTP interface.
    10          // Example: "http://127.0.0.1:12345"
    11          REACT_APP_VTADMIN_API_ADDRESS: string;
    12  
    13          /* OPTIONAL */
    14  
    15          // Optional. An API key for https://bugsnag.com. If defined,
    16          // the @bugsnag/js client will be initialized. Your Bugsnag API key
    17          // can be found in your Bugsnag Project Settings.
    18          REACT_APP_BUGSNAG_API_KEY?: string;
    19  
    20          // Optional. Build variables.
    21          REACT_APP_BUILD_BRANCH?: string;
    22          REACT_APP_BUILD_SHA?: string;
    23  
    24          // Optional, but recommended. When true, enables front-end components that query
    25          // vtadmin-api's /api/experimental/tablet/{tablet}/debug/vars endpoint.
    26          REACT_APP_ENABLE_EXPERIMENTAL_TABLET_DEBUG_VARS?: boolean | string;
    27  
    28          // Optional. Configures the `credentials` property for fetch requests.
    29          // made against vtadmin-api. If unspecified, uses fetch defaults.
    30          // See https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#sending_a_request_with_credentials_included
    31          REACT_APP_FETCH_CREDENTIALS?: RequestCredentials;
    32  
    33          // Optional.  Used for the document.title property. The default is "VTAdmin".
    34          // Overriding this can be useful to differentiate between multiple VTAdmin deployments,
    35          // e.g., "VTAdmin (staging)".
    36          REACT_APP_DOCUMENT_TITLE?: string;
    37  
    38          // Optional. Defaults to "false". If "true", UI controls that correspond to write actions (PUT, POST, DELETE) will be hidden.
    39          // Note that this *only* affects the UI. If write actions are a concern, Vitess operators are encouraged
    40          // to also configure vtadmin-api for role-based access control (RBAC) if needed;
    41          // see https://github.com/vitessio/vitess/blob/main/go/vt/vtadmin/rbac/rbac.go
    42          REACT_APP_READONLY_MODE?: string;
    43      }
    44  }
    45  
    46  interface Window {
    47      env: NodeJS.ProcessEnv;
    48  }