Module: ReactOnRailsPro

Defined in:
lib/react_on_rails_pro/cache.rb,
lib/react_on_rails_pro/error.rb,
lib/react_on_rails_pro/utils.rb,
lib/react_on_rails_pro/engine.rb,
lib/react_on_rails_pro/routes.rb,
lib/react_on_rails_pro/request.rb,
lib/react_on_rails_pro/version.rb,
lib/react_on_rails_pro/constants.rb,
lib/react_on_rails_pro/async_value.rb,
lib/react_on_rails_pro/stream_cache.rb,
lib/react_on_rails_pro/configuration.rb,
lib/react_on_rails_pro/stream_request.rb,
lib/react_on_rails_pro/concerns/stream.rb,
lib/react_on_rails_pro/js_code_builder.rb,
lib/react_on_rails_pro/rendering_error.rb,
lib/react_on_rails_pro/v8_log_processor.rb,
lib/react_on_rails_pro/assets_precompile.rb,
lib/react_on_rails_pro/license_validator.rb,
lib/react_on_rails_pro/license_public_key.rb,
lib/react_on_rails_pro/async_props_emitter.rb,
lib/react_on_rails_pro/renderer_cache_path.rb,
lib/react_on_rails_pro/renderer_http_client.rb,
lib/react_on_rails_pro/immediate_async_value.rb,
lib/react_on_rails_pro/license_task_formatter.rb,
lib/react_on_rails_pro/renderer_cache_helpers.rb,
lib/react_on_rails_pro/rolling_deploy/tarball.rb,
lib/react_on_rails_pro/pre_seed_renderer_cache.rb,
lib/react_on_rails_pro/concerns/async_rendering.rb,
lib/react_on_rails_pro/server_rendering_js_code.rb,
lib/react_on_rails_pro/rolling_deploy_cache_stager.rb,
lib/react_on_rails_pro/compression_middleware_guard.rb,
lib/react_on_rails_pro/rolling_deploy_adapters/http.rb,
lib/react_on_rails_pro/concerns/rsc_payload_renderer.rb,
lib/react_on_rails_pro/prepare_node_renderer_bundles.rb,
lib/react_on_rails_pro/rendering_strategy/node_strategy.rb,
lib/react_on_rails_pro/rolling_deploy/safe_hash_pattern.rb,
app/controllers/react_on_rails_pro/rsc_payload_controller.rb,
lib/react_on_rails_pro/server_rendering_pool/pro_rendering.rb,
lib/react_on_rails_pro/server_rendering_pool/node_rendering_pool.rb,
app/controllers/react_on_rails_pro/rolling_deploy/bundles_controller.rb

Defined Under Namespace

Modules: AsyncRendering, LicensePublicKey, LicenseTaskFormatter, RSCPayloadRenderer, RendererCacheHelpers, RendererCachePath, RenderingStrategy, RollingDeploy, RollingDeployAdapters, RollingDeployCacheStager, Routes, ServerRenderingJsCode, ServerRenderingPool, Stream, Utils, V8LogProcessor Classes: AssetsPrecompile, AsyncPropsEmitter, AsyncValue, Cache, CompressionMiddlewareGuard, Configuration, Engine, Error, ImmediateAsyncValue, JsCodeBuilder, LicenseValidator, PreSeedRendererCache, PrepareNodeRenderBundles, RendererHttpClient, RenderingError, Request, RscPayloadController, StreamCache, StreamDecorator, StreamRequest

Constant Summary collapse

VERSION =
"17.0.0.rc.0"
PROTOCOL_VERSION =
"2.0.0"
STATUS_BAD_REQUEST =

Status code 400 indicates the renderer rejected the request payload or encountered an unhandled render error.

400
STATUS_SEND_BUNDLE =

Status code 410 means to resend the request with the updated bundle.

410
STATUS_INCOMPATIBLE =

Status code 412 means protocol versions are incompatible between the server and the renderer.

412

Class Method Summary collapse

Class Method Details

.configurationObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/react_on_rails_pro/configuration.rb', line 11

def self.configuration
  @configuration ||= Configuration.new(
    prerender_caching: Configuration::DEFAULT_PRERENDER_CACHING,
    server_renderer: Configuration::DEFAULT_RENDERER_METHOD,
    renderer_url: Configuration::DEFAULT_RENDERER_URL,
    renderer_use_fallback_exec_js: Configuration::DEFAULT_RENDERER_FALLBACK_EXEC_JS,
    renderer_http_pool_size: Configuration::DEFAULT_RENDERER_HTTP_POOL_SIZE,
    renderer_http_pool_timeout: Configuration::DEFAULT_RENDERER_HTTP_POOL_TIMEOUT,
    renderer_http_pool_warn_timeout: Configuration::DEFAULT_RENDERER_HTTP_POOL_WARN_TIMEOUT,
    renderer_http_keep_alive_timeout: Configuration::DEFAULT_RENDERER_HTTP_KEEP_ALIVE_TIMEOUT,
    renderer_password: nil,
    tracing: Configuration::DEFAULT_TRACING,
    dependency_globs: Configuration::DEFAULT_DEPENDENCY_GLOBS,
    excluded_dependency_globs: Configuration::DEFAULT_EXCLUDED_DEPENDENCY_GLOBS,
    remote_bundle_cache_adapter: Configuration::DEFAULT_REMOTE_BUNDLE_CACHE_ADAPTER,
    rolling_deploy_adapter: Configuration::DEFAULT_ROLLING_DEPLOY_ADAPTER,
    rolling_deploy_token: Configuration::DEFAULT_ROLLING_DEPLOY_TOKEN,
    rolling_deploy_previous_url: Configuration::DEFAULT_ROLLING_DEPLOY_PREVIOUS_URL,
    rolling_deploy_mount_path: Configuration::DEFAULT_ROLLING_DEPLOY_MOUNT_PATH,
    ssr_timeout: Configuration::DEFAULT_SSR_TIMEOUT,
    ssr_pre_hook_js: nil,
    assets_to_copy: nil,
    renderer_request_retry_limit: Configuration::DEFAULT_RENDERER_REQUEST_RETRY_LIMIT,
    throw_js_errors: Configuration::DEFAULT_THROW_JS_ERRORS,
    rendering_returns_promises: Configuration::DEFAULT_RENDERING_RETURNS_PROMISES,
    profile_server_rendering_js_code: Configuration::DEFAULT_PROFILE_SERVER_RENDERING_JS_CODE,
    raise_non_shell_server_rendering_errors: Configuration::DEFAULT_RAISE_NON_SHELL_SERVER_RENDERING_ERRORS,
    enable_rsc_support: Configuration::DEFAULT_ENABLE_RSC_SUPPORT,
    rsc_payload_generation_url_path: Configuration::DEFAULT_RSC_PAYLOAD_GENERATION_URL_PATH,
    rsc_bundle_js_file: Configuration::DEFAULT_RSC_BUNDLE_JS_FILE,
    react_client_manifest_file: Configuration::DEFAULT_REACT_CLIENT_MANIFEST_FILE,
    react_server_client_manifest_file: Configuration::DEFAULT_REACT_SERVER_CLIENT_MANIFEST_FILE,
    concurrent_component_streaming_buffer_size: Configuration::DEFAULT_CONCURRENT_COMPONENT_STREAMING_BUFFER_SIZE
  )
end

.configure {|configuration| ... } ⇒ Object

Yields:



6
7
8
9
# File 'lib/react_on_rails_pro/configuration.rb', line 6

def self.configure
  yield(configuration)
  configuration.setup_config_values
end