@liquidmetal-ai/drizzle 0.4.7 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/.turbo/turbo-test.log +277 -83
  3. package/CHANGELOG.md +12 -0
  4. package/dist/liquidmetal/v1alpha1/catalog_pb.d.ts +1 -1
  5. package/dist/liquidmetal/v1alpha1/catalog_pb.d.ts.map +1 -1
  6. package/dist/liquidmetal/v1alpha1/catalog_pb.js +2 -2
  7. package/dist/liquidmetal/v1alpha1/events_connect.d.ts +39 -0
  8. package/dist/liquidmetal/v1alpha1/events_connect.d.ts.map +1 -0
  9. package/dist/liquidmetal/v1alpha1/events_connect.js +43 -0
  10. package/dist/liquidmetal/v1alpha1/events_pb.d.ts +175 -0
  11. package/dist/liquidmetal/v1alpha1/events_pb.d.ts.map +1 -0
  12. package/dist/liquidmetal/v1alpha1/events_pb.js +51 -0
  13. package/dist/liquidmetal/v1alpha1/logging_pb.d.ts +87 -0
  14. package/dist/liquidmetal/v1alpha1/logging_pb.d.ts.map +1 -0
  15. package/dist/liquidmetal/v1alpha1/logging_pb.js +25 -0
  16. package/dist/liquidmetal/v1alpha1/riverjack_pb.d.ts +74 -0
  17. package/dist/liquidmetal/v1alpha1/riverjack_pb.d.ts.map +1 -0
  18. package/dist/liquidmetal/v1alpha1/riverjack_pb.js +24 -0
  19. package/dist/unsafe/framework.d.ts.map +1 -1
  20. package/dist/unsafe/framework.js +48 -12
  21. package/dist/unsafe/framework.test.js +97 -62
  22. package/eslint.config.mjs +7 -4
  23. package/package.json +14 -15
  24. package/src/liquidmetal/v1alpha1/catalog_pb.ts +3 -3
  25. package/src/liquidmetal/v1alpha1/events_connect.ts +48 -0
  26. package/src/liquidmetal/v1alpha1/events_pb.ts +210 -0
  27. package/src/liquidmetal/v1alpha1/logging_pb.ts +108 -0
  28. package/src/liquidmetal/v1alpha1/riverjack_pb.ts +92 -0
  29. package/src/unsafe/framework.test.ts +96 -64
  30. package/src/unsafe/framework.ts +50 -10
  31. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,210 @@
1
+ // @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js"
2
+ // @generated from file liquidmetal/v1alpha1/events.proto (package liquidmetal.v1alpha1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
6
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
7
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
8
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
9
+ import type { Message } from "@bufbuild/protobuf";
10
+
11
+ /**
12
+ * Describes the file liquidmetal/v1alpha1/events.proto.
13
+ */
14
+ export const file_liquidmetal_v1alpha1_events: GenFile = /*@__PURE__*/
15
+ fileDesc("CiFsaXF1aWRtZXRhbC92MWFscGhhMS9ldmVudHMucHJvdG8SFGxpcXVpZG1ldGFsLnYxYWxwaGExIroCChJSZWNvcmRFdmVudFJlcXVlc3QSPgoGZXZlbnRzGAEgAygLMi4ubGlxdWlkbWV0YWwudjFhbHBoYTEuUmVjb3JkRXZlbnRSZXF1ZXN0LkV2ZW50EhcKD29yZ2FuaXphdGlvbl9pZBgCIAEoCRrKAQoFRXZlbnQSEgoKaWRlbnRpZmllchgBIAEoCRImCgJhdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASUgoKYXR0cmlidXRlcxgDIAMoCzI+LmxpcXVpZG1ldGFsLnYxYWxwaGExLlJlY29yZEV2ZW50UmVxdWVzdC5FdmVudC5BdHRyaWJ1dGVzRW50cnkaMQoPQXR0cmlidXRlc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEiFQoTUmVjb3JkRXZlbnRSZXNwb25zZSJ3ChFUYWlsRXZlbnRzUmVxdWVzdBIXCg9vcmdhbml6YXRpb25faWQYASABKAkSDwoHdXNlcl9pZBgCIAEoCRIYChBhcHBsaWNhdGlvbl9uYW1lGAMgASgJEh4KFmFwcGxpY2F0aW9uX3ZlcnNpb25faWQYBCABKAkioQIKElRhaWxFdmVudHNSZXNwb25zZRI+CgZldmVudHMYASADKAsyLi5saXF1aWRtZXRhbC52MWFscGhhMS5UYWlsRXZlbnRzUmVzcG9uc2UuRXZlbnQaygEKBUV2ZW50EhIKCmlkZW50aWZpZXIYASABKAkSJgoCYXQYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wElIKCmF0dHJpYnV0ZXMYAyADKAsyPi5saXF1aWRtZXRhbC52MWFscGhhMS5UYWlsRXZlbnRzUmVzcG9uc2UuRXZlbnQuQXR0cmlidXRlc0VudHJ5GjEKD0F0dHJpYnV0ZXNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBMnkKE0V2ZW50SW5ncmVzc1NlcnZpY2USYgoLUmVjb3JkRXZlbnQSKC5saXF1aWRtZXRhbC52MWFscGhhMS5SZWNvcmRFdmVudFJlcXVlc3QaKS5saXF1aWRtZXRhbC52MWFscGhhMS5SZWNvcmRFdmVudFJlc3BvbnNlMncKEkV2ZW50U3RyZWFtU2VydmljZRJhCgpUYWlsRXZlbnRzEicubGlxdWlkbWV0YWwudjFhbHBoYTEuVGFpbEV2ZW50c1JlcXVlc3QaKC5saXF1aWRtZXRhbC52MWFscGhhMS5UYWlsRXZlbnRzUmVzcG9uc2UwAULmAQoYY29tLmxpcXVpZG1ldGFsLnYxYWxwaGExQgtFdmVudHNQcm90b1ABWkxnaXRodWIuY29tL2xpcXVpZG1ldGFsLWFpL3Byb3RvZ2VuMi9saXF1aWRtZXRhbC92MWFscGhhMTtsaXF1aWRtZXRhbHYxYWxwaGExogIDTFhYqgIUTGlxdWlkbWV0YWwuVjFhbHBoYTHKAhRMaXF1aWRtZXRhbFxWMWFscGhhMeICIExpcXVpZG1ldGFsXFYxYWxwaGExXEdQQk1ldGFkYXRh6gIVTGlxdWlkbWV0YWw6OlYxYWxwaGExYgZwcm90bzM", [file_google_protobuf_timestamp]);
16
+
17
+ /**
18
+ * @generated from message liquidmetal.v1alpha1.RecordEventRequest
19
+ */
20
+ export type RecordEventRequest = Message<"liquidmetal.v1alpha1.RecordEventRequest"> & {
21
+ /**
22
+ * The events that are being recorded.
23
+ *
24
+ * @generated from field: repeated liquidmetal.v1alpha1.RecordEventRequest.Event events = 1;
25
+ */
26
+ events: RecordEventRequest_Event[];
27
+
28
+ /**
29
+ * The organization to which these events are being recorded.
30
+ *
31
+ * @generated from field: string organization_id = 2;
32
+ */
33
+ organizationId: string;
34
+ };
35
+
36
+ /**
37
+ * Describes the message liquidmetal.v1alpha1.RecordEventRequest.
38
+ * Use `create(RecordEventRequestSchema)` to create a new message.
39
+ */
40
+ export const RecordEventRequestSchema: GenMessage<RecordEventRequest> = /*@__PURE__*/
41
+ messageDesc(file_liquidmetal_v1alpha1_events, 0);
42
+
43
+ /**
44
+ * @generated from message liquidmetal.v1alpha1.RecordEventRequest.Event
45
+ */
46
+ export type RecordEventRequest_Event = Message<"liquidmetal.v1alpha1.RecordEventRequest.Event"> & {
47
+ /**
48
+ * A unique identifier for the event. If not provided, one will be
49
+ * generated. We recommend using a globally unique identifier for this.
50
+ * We’ll enforce uniqueness within the scope of an organization within a
51
+ * rolling 24 hour period.
52
+ *
53
+ * @generated from field: string identifier = 1;
54
+ */
55
+ identifier: string;
56
+
57
+ /**
58
+ * The time of the event. Must be within the past 35 calendar days or up to
59
+ * 5 minutes in the future. Defaults to current timestamp if not specified.
60
+ *
61
+ * @generated from field: google.protobuf.Timestamp at = 2;
62
+ */
63
+ at?: Timestamp;
64
+
65
+ /**
66
+ * Map of key-value pairs that describe the event.
67
+ *
68
+ * @generated from field: map<string, string> attributes = 3;
69
+ */
70
+ attributes: { [key: string]: string };
71
+ };
72
+
73
+ /**
74
+ * Describes the message liquidmetal.v1alpha1.RecordEventRequest.Event.
75
+ * Use `create(RecordEventRequest_EventSchema)` to create a new message.
76
+ */
77
+ export const RecordEventRequest_EventSchema: GenMessage<RecordEventRequest_Event> = /*@__PURE__*/
78
+ messageDesc(file_liquidmetal_v1alpha1_events, 0, 0);
79
+
80
+ /**
81
+ * @generated from message liquidmetal.v1alpha1.RecordEventResponse
82
+ */
83
+ export type RecordEventResponse = Message<"liquidmetal.v1alpha1.RecordEventResponse"> & {
84
+ };
85
+
86
+ /**
87
+ * Describes the message liquidmetal.v1alpha1.RecordEventResponse.
88
+ * Use `create(RecordEventResponseSchema)` to create a new message.
89
+ */
90
+ export const RecordEventResponseSchema: GenMessage<RecordEventResponse> = /*@__PURE__*/
91
+ messageDesc(file_liquidmetal_v1alpha1_events, 1);
92
+
93
+ /**
94
+ * TailEventsRequest opens a stream of events for a specific application
95
+ *
96
+ * @generated from message liquidmetal.v1alpha1.TailEventsRequest
97
+ */
98
+ export type TailEventsRequest = Message<"liquidmetal.v1alpha1.TailEventsRequest"> & {
99
+ /**
100
+ * @generated from field: string organization_id = 1;
101
+ */
102
+ organizationId: string;
103
+
104
+ /**
105
+ * @generated from field: string user_id = 2;
106
+ */
107
+ userId: string;
108
+
109
+ /**
110
+ * @generated from field: string application_name = 3;
111
+ */
112
+ applicationName: string;
113
+
114
+ /**
115
+ * @generated from field: string application_version_id = 4;
116
+ */
117
+ applicationVersionId: string;
118
+ };
119
+
120
+ /**
121
+ * Describes the message liquidmetal.v1alpha1.TailEventsRequest.
122
+ * Use `create(TailEventsRequestSchema)` to create a new message.
123
+ */
124
+ export const TailEventsRequestSchema: GenMessage<TailEventsRequest> = /*@__PURE__*/
125
+ messageDesc(file_liquidmetal_v1alpha1_events, 2);
126
+
127
+ /**
128
+ * @generated from message liquidmetal.v1alpha1.TailEventsResponse
129
+ */
130
+ export type TailEventsResponse = Message<"liquidmetal.v1alpha1.TailEventsResponse"> & {
131
+ /**
132
+ * @generated from field: repeated liquidmetal.v1alpha1.TailEventsResponse.Event events = 1;
133
+ */
134
+ events: TailEventsResponse_Event[];
135
+ };
136
+
137
+ /**
138
+ * Describes the message liquidmetal.v1alpha1.TailEventsResponse.
139
+ * Use `create(TailEventsResponseSchema)` to create a new message.
140
+ */
141
+ export const TailEventsResponseSchema: GenMessage<TailEventsResponse> = /*@__PURE__*/
142
+ messageDesc(file_liquidmetal_v1alpha1_events, 3);
143
+
144
+ /**
145
+ * @generated from message liquidmetal.v1alpha1.TailEventsResponse.Event
146
+ */
147
+ export type TailEventsResponse_Event = Message<"liquidmetal.v1alpha1.TailEventsResponse.Event"> & {
148
+ /**
149
+ * A unique identifier for the event.
150
+ *
151
+ * @generated from field: string identifier = 1;
152
+ */
153
+ identifier: string;
154
+
155
+ /**
156
+ * The time of the event.
157
+ *
158
+ * @generated from field: google.protobuf.Timestamp at = 2;
159
+ */
160
+ at?: Timestamp;
161
+
162
+ /**
163
+ * Map of key-value pairs that describe the event.
164
+ *
165
+ * @generated from field: map<string, string> attributes = 3;
166
+ */
167
+ attributes: { [key: string]: string };
168
+ };
169
+
170
+ /**
171
+ * Describes the message liquidmetal.v1alpha1.TailEventsResponse.Event.
172
+ * Use `create(TailEventsResponse_EventSchema)` to create a new message.
173
+ */
174
+ export const TailEventsResponse_EventSchema: GenMessage<TailEventsResponse_Event> = /*@__PURE__*/
175
+ messageDesc(file_liquidmetal_v1alpha1_events, 3, 0);
176
+
177
+ /**
178
+ * EventIngressService receives and processes events from various sources
179
+ *
180
+ * @generated from service liquidmetal.v1alpha1.EventIngressService
181
+ */
182
+ export const EventIngressService: GenService<{
183
+ /**
184
+ * @generated from rpc liquidmetal.v1alpha1.EventIngressService.RecordEvent
185
+ */
186
+ recordEvent: {
187
+ methodKind: "unary";
188
+ input: typeof RecordEventRequestSchema;
189
+ output: typeof RecordEventResponseSchema;
190
+ },
191
+ }> = /*@__PURE__*/
192
+ serviceDesc(file_liquidmetal_v1alpha1_events, 0);
193
+
194
+ /**
195
+ * EventStreamService provides a stream of events to clients
196
+ *
197
+ * @generated from service liquidmetal.v1alpha1.EventStreamService
198
+ */
199
+ export const EventStreamService: GenService<{
200
+ /**
201
+ * @generated from rpc liquidmetal.v1alpha1.EventStreamService.TailEvents
202
+ */
203
+ tailEvents: {
204
+ methodKind: "server_streaming";
205
+ input: typeof TailEventsRequestSchema;
206
+ output: typeof TailEventsResponseSchema;
207
+ },
208
+ }> = /*@__PURE__*/
209
+ serviceDesc(file_liquidmetal_v1alpha1_events, 1);
210
+
@@ -0,0 +1,108 @@
1
+ // @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js"
2
+ // @generated from file liquidmetal/v1alpha1/logging.proto (package liquidmetal.v1alpha1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
6
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
7
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
8
+ import { file_google_protobuf_struct, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
9
+ import type { JsonObject, Message } from "@bufbuild/protobuf";
10
+
11
+ /**
12
+ * Describes the file liquidmetal/v1alpha1/logging.proto.
13
+ */
14
+ export const file_liquidmetal_v1alpha1_logging: GenFile = /*@__PURE__*/
15
+ fileDesc("CiJsaXF1aWRtZXRhbC92MWFscGhhMS9sb2dnaW5nLnByb3RvEhRsaXF1aWRtZXRhbC52MWFscGhhMSK+AQoPU3RvcmVMb2dSZXF1ZXN0EhcKD29yZ2FuaXphdGlvbl9pZBgBIAEoCRIYChBhcHBsaWNhdGlvbl9uYW1lGAIgASgJEh4KFmFwcGxpY2F0aW9uX3ZlcnNpb25faWQYAyABKAkSKQoIbG9nX2RhdGEYBCABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Ei0KCXRpbWVzdGFtcBgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiNAoQU3RvcmVMb2dSZXNwb25zZRIPCgdzdWNjZXNzGAEgASgIEg8KB21lc3NhZ2UYAiABKAkyawoOTG9nZ2luZ1NlcnZpY2USWQoIU3RvcmVMb2cSJS5saXF1aWRtZXRhbC52MWFscGhhMS5TdG9yZUxvZ1JlcXVlc3QaJi5saXF1aWRtZXRhbC52MWFscGhhMS5TdG9yZUxvZ1Jlc3BvbnNlQucBChhjb20ubGlxdWlkbWV0YWwudjFhbHBoYTFCDExvZ2dpbmdQcm90b1ABWkxnaXRodWIuY29tL2xpcXVpZG1ldGFsLWFpL3Byb3RvZ2VuMi9saXF1aWRtZXRhbC92MWFscGhhMTtsaXF1aWRtZXRhbHYxYWxwaGExogIDTFhYqgIUTGlxdWlkbWV0YWwuVjFhbHBoYTHKAhRMaXF1aWRtZXRhbFxWMWFscGhhMeICIExpcXVpZG1ldGFsXFYxYWxwaGExXEdQQk1ldGFkYXRh6gIVTGlxdWlkbWV0YWw6OlYxYWxwaGExYgZwcm90bzM", [file_google_protobuf_struct, file_google_protobuf_timestamp]);
16
+
17
+ /**
18
+ * @generated from message liquidmetal.v1alpha1.StoreLogRequest
19
+ */
20
+ export type StoreLogRequest = Message<"liquidmetal.v1alpha1.StoreLogRequest"> & {
21
+ /**
22
+ * organization_id is the organization context for the log storage
23
+ *
24
+ * @generated from field: string organization_id = 1;
25
+ */
26
+ organizationId: string;
27
+
28
+ /**
29
+ * application_name is the name of the application generating the logs
30
+ *
31
+ * @generated from field: string application_name = 2;
32
+ */
33
+ applicationName: string;
34
+
35
+ /**
36
+ * application_version_id is the version of the application generating the logs
37
+ *
38
+ * @generated from field: string application_version_id = 3;
39
+ */
40
+ applicationVersionId: string;
41
+
42
+ /**
43
+ * log_data contains the structured log data to store
44
+ *
45
+ * @generated from field: google.protobuf.Struct log_data = 4;
46
+ */
47
+ logData?: JsonObject;
48
+
49
+ /**
50
+ * timestamp is when the log event occurred
51
+ *
52
+ * @generated from field: google.protobuf.Timestamp timestamp = 5;
53
+ */
54
+ timestamp?: Timestamp;
55
+ };
56
+
57
+ /**
58
+ * Describes the message liquidmetal.v1alpha1.StoreLogRequest.
59
+ * Use `create(StoreLogRequestSchema)` to create a new message.
60
+ */
61
+ export const StoreLogRequestSchema: GenMessage<StoreLogRequest> = /*@__PURE__*/
62
+ messageDesc(file_liquidmetal_v1alpha1_logging, 0);
63
+
64
+ /**
65
+ * @generated from message liquidmetal.v1alpha1.StoreLogResponse
66
+ */
67
+ export type StoreLogResponse = Message<"liquidmetal.v1alpha1.StoreLogResponse"> & {
68
+ /**
69
+ * success indicates if the log was successfully stored
70
+ *
71
+ * @generated from field: bool success = 1;
72
+ */
73
+ success: boolean;
74
+
75
+ /**
76
+ * message contains any relevant response message
77
+ *
78
+ * @generated from field: string message = 2;
79
+ */
80
+ message: string;
81
+ };
82
+
83
+ /**
84
+ * Describes the message liquidmetal.v1alpha1.StoreLogResponse.
85
+ * Use `create(StoreLogResponseSchema)` to create a new message.
86
+ */
87
+ export const StoreLogResponseSchema: GenMessage<StoreLogResponse> = /*@__PURE__*/
88
+ messageDesc(file_liquidmetal_v1alpha1_logging, 1);
89
+
90
+ /**
91
+ * LoggingService defines the interface for log storage and retrieval operations.
92
+ *
93
+ * @generated from service liquidmetal.v1alpha1.LoggingService
94
+ */
95
+ export const LoggingService: GenService<{
96
+ /**
97
+ * StoreLog stores log events to the log-store bucket.
98
+ *
99
+ * @generated from rpc liquidmetal.v1alpha1.LoggingService.StoreLog
100
+ */
101
+ storeLog: {
102
+ methodKind: "unary";
103
+ input: typeof StoreLogRequestSchema;
104
+ output: typeof StoreLogResponseSchema;
105
+ },
106
+ }> = /*@__PURE__*/
107
+ serviceDesc(file_liquidmetal_v1alpha1_logging, 0);
108
+
@@ -0,0 +1,92 @@
1
+ // @generated by protoc-gen-es v2.2.5 with parameter "target=ts,import_extension=.js"
2
+ // @generated from file liquidmetal/v1alpha1/riverjack.proto (package liquidmetal.v1alpha1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
6
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
7
+ import type { Message } from "@bufbuild/protobuf";
8
+
9
+ /**
10
+ * Describes the file liquidmetal/v1alpha1/riverjack.proto.
11
+ */
12
+ export const file_liquidmetal_v1alpha1_riverjack: GenFile = /*@__PURE__*/
13
+ fileDesc("CiRsaXF1aWRtZXRhbC92MWFscGhhMS9yaXZlcmphY2sucHJvdG8SFGxpcXVpZG1ldGFsLnYxYWxwaGExIncKEVN0cmVhbUxvZ3NSZXF1ZXN0EhcKD29yZ2FuaXphdGlvbl9pZBgBIAEoCRIPCgd1c2VyX2lkGAIgASgJEhgKEGFwcGxpY2F0aW9uX25hbWUYAyABKAkSHgoWYXBwbGljYXRpb25fdmVyc2lvbl9pZBgEIAEoCSIlChJTdHJlYW1Mb2dzUmVzcG9uc2USDwoHbWVzc2FnZRgBIAEoCTJ1ChBSaXZlcmphY2tTZXJ2aWNlEmEKClN0cmVhbUxvZ3MSJy5saXF1aWRtZXRhbC52MWFscGhhMS5TdHJlYW1Mb2dzUmVxdWVzdBooLmxpcXVpZG1ldGFsLnYxYWxwaGExLlN0cmVhbUxvZ3NSZXNwb25zZTABQukBChhjb20ubGlxdWlkbWV0YWwudjFhbHBoYTFCDlJpdmVyamFja1Byb3RvUAFaTGdpdGh1Yi5jb20vbGlxdWlkbWV0YWwtYWkvcHJvdG9nZW4yL2xpcXVpZG1ldGFsL3YxYWxwaGExO2xpcXVpZG1ldGFsdjFhbHBoYTGiAgNMWFiqAhRMaXF1aWRtZXRhbC5WMWFscGhhMcoCFExpcXVpZG1ldGFsXFYxYWxwaGEx4gIgTGlxdWlkbWV0YWxcVjFhbHBoYTFcR1BCTWV0YWRhdGHqAhVMaXF1aWRtZXRhbDo6VjFhbHBoYTFiBnByb3RvMw");
14
+
15
+ /**
16
+ * @generated from message liquidmetal.v1alpha1.StreamLogsRequest
17
+ */
18
+ export type StreamLogsRequest = Message<"liquidmetal.v1alpha1.StreamLogsRequest"> & {
19
+ /**
20
+ * organization_id is the organization context for the log storage
21
+ *
22
+ * @generated from field: string organization_id = 1;
23
+ */
24
+ organizationId: string;
25
+
26
+ /**
27
+ * user_id is the user context for the log storage
28
+ *
29
+ * @generated from field: string user_id = 2;
30
+ */
31
+ userId: string;
32
+
33
+ /**
34
+ * application_name is the name of the application generating the logs
35
+ *
36
+ * @generated from field: string application_name = 3;
37
+ */
38
+ applicationName: string;
39
+
40
+ /**
41
+ * application_version_id is the version of the application generating the logs
42
+ *
43
+ * @generated from field: string application_version_id = 4;
44
+ */
45
+ applicationVersionId: string;
46
+ };
47
+
48
+ /**
49
+ * Describes the message liquidmetal.v1alpha1.StreamLogsRequest.
50
+ * Use `create(StreamLogsRequestSchema)` to create a new message.
51
+ */
52
+ export const StreamLogsRequestSchema: GenMessage<StreamLogsRequest> = /*@__PURE__*/
53
+ messageDesc(file_liquidmetal_v1alpha1_riverjack, 0);
54
+
55
+ /**
56
+ * @generated from message liquidmetal.v1alpha1.StreamLogsResponse
57
+ */
58
+ export type StreamLogsResponse = Message<"liquidmetal.v1alpha1.StreamLogsResponse"> & {
59
+ /**
60
+ * message contains any relevant response message
61
+ *
62
+ * @generated from field: string message = 1;
63
+ */
64
+ message: string;
65
+ };
66
+
67
+ /**
68
+ * Describes the message liquidmetal.v1alpha1.StreamLogsResponse.
69
+ * Use `create(StreamLogsResponseSchema)` to create a new message.
70
+ */
71
+ export const StreamLogsResponseSchema: GenMessage<StreamLogsResponse> = /*@__PURE__*/
72
+ messageDesc(file_liquidmetal_v1alpha1_riverjack, 1);
73
+
74
+ /**
75
+ * Riverjack defines the interface for log storage and retrieval operations.
76
+ *
77
+ * @generated from service liquidmetal.v1alpha1.RiverjackService
78
+ */
79
+ export const RiverjackService: GenService<{
80
+ /**
81
+ * StreamLogs streams log events to the log-store bucket.
82
+ *
83
+ * @generated from rpc liquidmetal.v1alpha1.RiverjackService.StreamLogs
84
+ */
85
+ streamLogs: {
86
+ methodKind: "server_streaming";
87
+ input: typeof StreamLogsRequestSchema;
88
+ output: typeof StreamLogsResponseSchema;
89
+ },
90
+ }> = /*@__PURE__*/
91
+ serviceDesc(file_liquidmetal_v1alpha1_riverjack, 0);
92
+
@@ -27,17 +27,22 @@ describe('getPackageVersion', () => {
27
27
  await writeFile(join(tempDir, 'package-lock.json'), JSON.stringify({ name: 'test' }));
28
28
 
29
29
  // Mock npm list command output
30
- vi.mocked(exec).mockImplementation((command, callback) => {
30
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
+ vi.mocked(exec).mockImplementation((command: string, options: any, callback?: any) => {
32
+ // Handle both (command, callback) and (command, options, callback) signatures
33
+ const cb = typeof options === 'function' ? options : callback;
31
34
  if (command.includes('npm list')) {
32
- (callback as unknown as (error: null, result: { stdout: string; stderr: string }) => void)(null, {
33
- stdout: JSON.stringify({
34
- dependencies: {
35
- 'test-package': {
36
- version: '1.2.3',
35
+ process.nextTick(() => {
36
+ cb?.(null, {
37
+ stdout: JSON.stringify({
38
+ dependencies: {
39
+ 'test-package': {
40
+ version: '1.2.3',
41
+ },
37
42
  },
38
- },
39
- }),
40
- stderr: '',
43
+ }),
44
+ stderr: '',
45
+ });
41
46
  });
42
47
  }
43
48
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -53,20 +58,25 @@ describe('getPackageVersion', () => {
53
58
  await writeFile(join(tempDir, 'yarn.lock'), 'yarn lock contents');
54
59
 
55
60
  // Mock yarn list command output
56
- vi.mocked(exec).mockImplementation((command, callback) => {
61
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
62
+ vi.mocked(exec).mockImplementation((command: string, options: any, callback?: any) => {
63
+ // Handle both (command, callback) and (command, options, callback) signatures
64
+ const cb = typeof options === 'function' ? options : callback;
57
65
  if (command.includes('yarn list')) {
58
- (callback as unknown as (error: null, result: { stdout: string; stderr: string }) => void)(null, {
59
- stdout: JSON.stringify({
60
- data: {
61
- trees: [
62
- {
63
- name: 'test-package',
64
- version: '2.3.4',
65
- },
66
- ],
67
- },
68
- }),
69
- stderr: '',
66
+ process.nextTick(() => {
67
+ cb?.(null, {
68
+ stdout: JSON.stringify({
69
+ data: {
70
+ trees: [
71
+ {
72
+ name: 'test-package',
73
+ version: '2.3.4',
74
+ },
75
+ ],
76
+ },
77
+ }),
78
+ stderr: '',
79
+ });
70
80
  });
71
81
  }
72
82
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -82,17 +92,22 @@ describe('getPackageVersion', () => {
82
92
  await writeFile(join(tempDir, 'pnpm-lock.yaml'), 'pnpm lock contents');
83
93
 
84
94
  // Mock pnpm list command output
85
- vi.mocked(exec).mockImplementation((command, callback) => {
95
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
96
+ vi.mocked(exec).mockImplementation((command: string, options: any, callback?: any) => {
97
+ // Handle both (command, callback) and (command, options, callback) signatures
98
+ const cb = typeof options === 'function' ? options : callback;
86
99
  if (command.includes('pnpm list')) {
87
- (callback as unknown as (error: null, result: { stdout: string; stderr: string }) => void)(null, {
88
- stdout: JSON.stringify({
89
- dependencies: {
90
- 'test-package': {
91
- version: '3.4.5',
100
+ process.nextTick(() => {
101
+ cb?.(null, {
102
+ stdout: JSON.stringify({
103
+ dependencies: {
104
+ 'test-package': {
105
+ version: '3.4.5',
106
+ },
92
107
  },
93
- },
94
- }),
95
- stderr: '',
108
+ }),
109
+ stderr: '',
110
+ });
96
111
  });
97
112
  }
98
113
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -106,22 +121,27 @@ describe('getPackageVersion', () => {
106
121
  it('should handle nested dependencies', async () => {
107
122
  await writeFile(join(tempDir, 'package-lock.json'), JSON.stringify({ name: 'test' }));
108
123
 
109
- vi.mocked(exec).mockImplementation((command, callback) => {
124
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
125
+ vi.mocked(exec).mockImplementation((command: string, options: any, callback?: any) => {
126
+ // Handle both (command, callback) and (command, options, callback) signatures
127
+ const cb = typeof options === 'function' ? options : callback;
110
128
  if (command.includes('npm list')) {
111
- (callback as unknown as (error: null, result: { stdout: string; stderr: string }) => void)(null, {
112
- stdout: JSON.stringify({
113
- dependencies: {
114
- 'parent-package': {
115
- version: '1.0.0',
116
- dependencies: {
117
- 'test-package': {
118
- version: '4.5.6',
129
+ process.nextTick(() => {
130
+ cb?.(null, {
131
+ stdout: JSON.stringify({
132
+ dependencies: {
133
+ 'parent-package': {
134
+ version: '1.0.0',
135
+ dependencies: {
136
+ 'test-package': {
137
+ version: '4.5.6',
138
+ },
119
139
  },
120
140
  },
121
141
  },
122
- },
123
- }),
124
- stderr: '',
142
+ }),
143
+ stderr: '',
144
+ });
125
145
  });
126
146
  }
127
147
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -135,13 +155,18 @@ describe('getPackageVersion', () => {
135
155
  it('should return null when package is not found', async () => {
136
156
  await writeFile(join(tempDir, 'package-lock.json'), JSON.stringify({ name: 'test' }));
137
157
 
138
- vi.mocked(exec).mockImplementation((command, callback) => {
158
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
159
+ vi.mocked(exec).mockImplementation((command: string, options: any, callback?: any) => {
160
+ // Handle both (command, callback) and (command, options, callback) signatures
161
+ const cb = typeof options === 'function' ? options : callback;
139
162
  if (command.includes('npm list')) {
140
- (callback as unknown as (error: null, result: { stdout: string; stderr: string }) => void)(null, {
141
- stdout: JSON.stringify({
142
- dependencies: {},
143
- }),
144
- stderr: '',
163
+ process.nextTick(() => {
164
+ cb?.(null, {
165
+ stdout: JSON.stringify({
166
+ dependencies: {},
167
+ }),
168
+ stderr: '',
169
+ });
145
170
  });
146
171
  }
147
172
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -163,17 +188,22 @@ describe('getPackageVersion', () => {
163
188
  // Set cwd to nested directory
164
189
  vi.spyOn(process, 'cwd').mockReturnValue(nestedDir);
165
190
 
166
- vi.mocked(exec).mockImplementation((command, callback) => {
191
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
192
+ vi.mocked(exec).mockImplementation((command: string, options: any, callback?: any) => {
193
+ // Handle both (command, callback) and (command, options, callback) signatures
194
+ const cb = typeof options === 'function' ? options : callback;
167
195
  if (command.includes('npm list')) {
168
- (callback as unknown as (error: null, result: { stdout: string; stderr: string }) => void)(null, {
169
- stdout: JSON.stringify({
170
- dependencies: {
171
- 'test-package': {
172
- version: '5.6.7',
196
+ process.nextTick(() => {
197
+ cb?.(null, {
198
+ stdout: JSON.stringify({
199
+ dependencies: {
200
+ 'test-package': {
201
+ version: '5.6.7',
202
+ },
173
203
  },
174
- },
175
- }),
176
- stderr: '',
204
+ }),
205
+ stderr: '',
206
+ });
177
207
  });
178
208
  }
179
209
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -187,14 +217,16 @@ describe('getPackageVersion', () => {
187
217
  it('should handle command execution errors', async () => {
188
218
  await writeFile(join(tempDir, 'package-lock.json'), JSON.stringify({ name: 'test' }));
189
219
 
190
- vi.mocked(exec).mockImplementation((_command, callback) => {
191
- (callback as unknown as (error: Error, result: { stdout: string; stderr: string }) => void)(
192
- new Error('Command failed'),
193
- {
220
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
221
+ vi.mocked(exec).mockImplementation((command: string, options: any, callback?: any) => {
222
+ // Handle both (command, callback) and (command, options, callback) signatures
223
+ const cb = typeof options === 'function' ? options : callback;
224
+ process.nextTick(() => {
225
+ cb?.(new Error('Command failed'), {
194
226
  stdout: '',
195
227
  stderr: 'failure',
196
- },
197
- );
228
+ });
229
+ });
198
230
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
199
231
  return {} as any;
200
232
  });