16#define native_runtime_finalize_strdup _strdup
18#define native_runtime_finalize_strdup strdup
28 char *error_report_path,
30 char *runtime_conf_path
38 free(error_report_path);
40 free(runtime_conf_path);
51 return value != NULL && value[0] !=
'\0';
124 char *local_conf_path;
135 if (local_conf_path != NULL) {
136 return local_conf_path;
142 char *app_root = NULL;
143 char *build_dir = NULL;
144 char *state_path = NULL;
145 char *base_path = NULL;
146 char *log_path = NULL;
147 char *log_format = NULL;
148 char *error_report_path = NULL;
150 char *runtime_conf_path = NULL;
168 if (base_path == NULL) {
172 if (((app_root_override != NULL || app->
app_root != NULL) && app_root == NULL) ||
173 ((build_dir_override != NULL || app->
build_dir != NULL) && build_dir == NULL) ||
174 state_path == NULL ||
177 log_format == NULL ||
178 error_report_path == NULL ||
180 free_finalize_fields(app_root, build_dir, state_path, base_path, log_path, log_format, error_report_path, debug, runtime_conf_path);
char * app_local_conf_path_native(const char *app_root)
Builds the path to an app-local runtime configuration file.
Declares app-local runtime configuration helpers and the app-local configuration record.
static void free_finalize_fields(char *app_root, char *build_dir, char *state_path, char *base_path, char *log_path, char *log_format, char *error_report_path, char *debug, char *runtime_conf_path)
static char * finalize_log_format_native(const AppRuntime *app, const char *app_root)
static char * finalize_debug_native(const AppRuntime *app, const ServeConfig *config, const char *app_root)
static char * finalize_base_path_native(const AppRuntime *app, const ServeConfig *config, const char *app_root)
static char * finalize_state_path_native(const AppRuntime *app, const ServeConfig *config, const char *app_root, const char *build_dir)
static char * finalize_error_report_path_native(const AppRuntime *app, const char *app_root)
#define native_runtime_finalize_strdup
char * resolved_runtime_conf_path_from_config_native(const ServeConfig *config, const char *app_root)
Resolves the runtime configuration path that should apply to an app.
int finalize_loaded_app_runtime_native(AppRuntime *app, const ServeConfig *config, const char *app_root_override, const char *build_dir_override)
Applies overrides and derived runtime paths to a loaded app runtime record.
static char * finalize_runtime_conf_path_native(const AppRuntime *app, const ServeConfig *config, const char *app_root)
static int has_override_value(const char *value)
static char * clone_or_empty_finalize(const char *value)
static char * finalize_log_path_native(const AppRuntime *app, const ServeConfig *config, const char *app_root)
Declares helpers that finalize loaded app runtime configuration.
char * effective_app_log_path_native(const char *app_root, const char *app_id, const char *log_path_override)
Resolves the effective log file path for an app.
char * effective_app_log_format_native(const char *app_root)
Resolves the effective log format for an app.
char * effective_app_debug_native(const char *app_root, const char *debug_override)
Resolves the effective debug setting for an app.
char * effective_app_error_report_path_native(const char *app_root, const char *app_id)
Resolves the effective error report path for an app.
char * effective_app_state_path_native(const char *app_root, const char *build_dir, const char *app_id, const char *state_path_override, const char *state_dir_override)
Resolves the effective state file path for an app.
char * effective_app_base_path_native(const char *app_root, const char *base_path_override)
Resolves the effective URL base path for an app.
Declares helpers for locating app roots and deriving runtime paths.
char * current_working_directory(void)
Returns the current working directory.
char * resolve_relative_to(const char *base_dir, const char *value)
Resolves a path value relative to a base directory when needed.
Declares shared low-level support helpers used across the Pharos native runtime.
Loaded runtime metadata for one Pharos app artifact.
Parsed native serve configuration used to bootstrap the runtime listener.