mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
Implement SPICE-0009 External Readers (#660)
This adds a new feature, which allows Pkl to read resources and modules from external processes. Follows the design laid out in SPICE-0009. Also, this moves most of the messaging API into pkl-core
This commit is contained in:
@@ -91,6 +91,14 @@ rootDir: String?
|
||||
/// Configuration of outgoing HTTP requests.
|
||||
http: Http?
|
||||
|
||||
/// Configuration for external module reader processes.
|
||||
@Since { version = "0.27.0" }
|
||||
externalModuleReaders: Mapping<String, ExternalReader>?
|
||||
|
||||
/// Configuration for external resource reader processes.
|
||||
@Since { version = "0.27.0" }
|
||||
externalResourceReaders: Mapping<String, ExternalReader>?
|
||||
|
||||
/// Settings that control how Pkl talks to HTTP(S) servers.
|
||||
class Http {
|
||||
/// Configuration of the HTTP proxy to use.
|
||||
@@ -144,3 +152,20 @@ class Proxy {
|
||||
/// ```
|
||||
noProxy: Listing<String>(isDistinct)
|
||||
}
|
||||
|
||||
@Since { version = "0.27.0" }
|
||||
class ExternalReader {
|
||||
/// The external reader executable.
|
||||
///
|
||||
/// Will be spawned with the same environment variables and working directory as the Pkl process.
|
||||
/// Executable is resolved according to the operating system's process spawning rules.
|
||||
/// On macOS, Linux, and Windows platforms, this may be:
|
||||
///
|
||||
/// * An absolute path
|
||||
/// * A relative path (to the currrent working directory)
|
||||
/// * The name of the executable, to be resolved against the `PATH` environment variable
|
||||
executable: String
|
||||
|
||||
/// Additional command line arguments passed to the external reader process.
|
||||
arguments: Listing<String>?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user