- Reorganized examples into osiris/, sal/, and utils/ folders - Moved hardcoded scripts to separate .rhai files - Added signature() method to JobBuilder for job signing - Updated OSIRIS context to use block_in_place instead of runtime - Removed runtime field from OsirisContext - Added typed save() methods for Note and Event objects - Updated all examples to use new structure and APIs
		
			
				
	
	
		
			22 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
print("Running a command using run().silent().execute()...\n");
 | 
						|
 | 
						|
// This command will print to standard output and standard error
 | 
						|
// However, because .silent() is used, the output will not appear in the console directly
 | 
						|
let result = run("echo 'This should be silent stdout.'; echo 'This should be silent stderr.' >&2; exit 0").silent().execute();
 | 
						|
 | 
						|
// The output is still captured in the CommandResult
 | 
						|
print(`Command finished.`);
 | 
						|
print(`Success: ${result.success}`);
 | 
						|
print(`Exit Code: ${result.code}`);
 | 
						|
print(`Captured Stdout:\\n${result.stdout}`);
 | 
						|
print(`Captured Stderr:\\n${result.stderr}`);
 | 
						|
 | 
						|
// Example of a silent command that fails (but won't halt because we only suppress output)
 | 
						|
// let fail_result = run("echo 'This is silent failure stderr.' >&2; exit 1").silent().execute();
 | 
						|
// print(`Failed command finished (silent):`);
 | 
						|
// print(`Success: ${fail_result.success}`);
 | 
						|
// print(`Exit Code: ${fail_result.code}`);
 | 
						|
// print(`Captured Stdout:\\n${fail_result.stdout}`);
 | 
						|
// print(`Captured Stderr:\\n${fail_result.stderr}`);
 | 
						|
 | 
						|
print("\nrun().silent() example finished."); |