Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
Loading...
Searching...
No Matches
native_shell_bridge.h File Reference

Declares bridge helpers for invoking Pharos shell command surfaces. More...

Go to the source code of this file.

Functions

Shell bridge helpers
int exec_runtime_script_native (const char *repo_root, int argc, char **argv)
 Executes the shared Pharos runtime script with the supplied arguments.
int shell_status_or_build_native (const char *repo_root, const ServeConfig *config, int use_build, char **output)
 Runs the shell-side status or build flow for one native serve target.
int shell_runtime_command_capture_native (const char *repo_root, int argc, char *const argv[], char **output)
 Executes a runtime shell command and captures its combined output.

Detailed Description

Declares bridge helpers for invoking Pharos shell command surfaces.

Definition in file native_shell_bridge.h.

Function Documentation

◆ exec_runtime_script_native()

int exec_runtime_script_native ( const char * repo_root,
int argc,
char ** argv )

Executes the shared Pharos runtime script with the supplied arguments.

Parameters
repo_rootRepository root used to locate the script.
argcNumber of script arguments.
argvArgument vector passed through to the script.
Returns
Script exit status, or a non-zero launcher status on failure.

Definition at line 25 of file native_shell_bridge.c.

References runtime_script_path_native().

Referenced by main().

◆ shell_runtime_command_capture_native()

int shell_runtime_command_capture_native ( const char * repo_root,
int argc,
char *const argv[],
char ** output )

Executes a runtime shell command and captures its combined output.

Parameters
repo_rootRepository root used to locate runtime scripts.
argcNumber of command arguments.
argvArgument vector passed through to the shell command.
outputDestination for captured output text.
Returns
Shell command exit status, or a non-zero launcher status on failure.

Definition at line 71 of file native_shell_bridge.c.

References capture_execv_output_env_native(), and runtime_script_path_native().

Referenced by capture_migrate_verify_report_json(), and shell_status_or_build_native().

◆ shell_status_or_build_native()

int shell_status_or_build_native ( const char * repo_root,
const ServeConfig * config,
int use_build,
char ** output )

Runs the shell-side status or build flow for one native serve target.

Parameters
repo_rootRepository root used to locate runtime scripts.
configTarget serve configuration.
use_buildNon-zero to request a build flow instead of status.
outputDestination for captured command output.
Returns
Shell command exit status, or a non-zero launcher status on failure.

Definition at line 99 of file native_shell_bridge.c.

References ServeConfig::app_dir, ServeConfig::base_path, ServeConfig::build_dir, ServeConfig::conf_path, ServeConfig::debug, ServeConfig::kind, ServeConfig::log_path, shell_runtime_command_capture_native(), ServeConfig::state_dir, ServeConfig::state_path, and ServeConfig::target_id.

Referenced by load_app_runtime_for_single_app(), and resolve_website_root().