chore: nu 0.97.1 support
All checks were successful
/ test (push) Successful in 11m26s

This commit is contained in:
LordMZTE 2024-08-23 13:53:05 +02:00
parent d733ba7da5
commit f0dce8826b
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
2 changed files with 28 additions and 9 deletions

View file

@ -235,6 +235,11 @@ pub fn processOneEvent(self: *Connection, state: anytype) !bool {
cbptr.* = null;
}
},
.Signal => |act| {
if (@hasDecl(State, "signal")) {
try state.signal(state, self, act);
}
},
.Hello => return error.ProtocolViolation,
}

View file

@ -6,8 +6,8 @@ pub const calls = @import("proto/calls.zig");
pub const nu_target_version = std.SemanticVersion{
.major = 0,
.minor = 96,
.patch = 0,
.minor = 97,
.patch = 1,
};
pub const dbt = .{@import("blocks/union_de.zig")};
@ -18,6 +18,7 @@ pub const Message = union(enum) {
Call: Call,
Goodbye,
EngineCallResponse: struct { u64, EngineCallResponse },
Signal: enum { Interrupt, Reset },
/// Casts this message to a specific message type and returns an error if it is different.
pub fn cast(self: Message, comptime T: type) error{InvalidType}!T {
@ -428,19 +429,32 @@ pub const EvaluatedCall = struct {
pub const PipelineDataHeader = union(enum) {
Empty,
Value: Value,
Value: struct { Value, ?PipelineMetadata },
ListStream: ListStreamInfo,
ExternalStream: struct {
span: Span = .{},
stdout: ?RawStreamInfo,
stderr: ?RawStreamInfo,
exit_code: ?ListStreamInfo,
trim_end_newline: bool = false,
ByteStream: ByteStreamInfo,
};
pub const PipelineMetadata = struct {
data_source: union(enum) {
Ls,
HtmlThemes,
FilePath: []const u8,
None,
},
content_type: ?[]const u8 = null,
};
pub const ListStreamInfo = struct {
id: u64,
span: Span,
metadata: ?PipelineMetadata = null,
};
pub const ByteStreamInfo = struct {
id: u64,
span: Span = .{},
type: enum { Binary, String, Unknown },
metadata: ?PipelineMetadata = null,
};
pub const RawStreamInfo = struct {