@liquidmetal-ai/drizzle 0.0.2 → 0.0.4

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.
@@ -0,0 +1,298 @@
1
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
2
+ // @generated from file liquidmetal/v1alpha1/rainbow_public.proto (package liquidmetal.v1alpha1, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+ import { Message, proto3, Timestamp } from "@bufbuild/protobuf";
6
+ /**
7
+ * @generated from message liquidmetal.v1alpha1.TailRequest
8
+ */
9
+ export class TailRequest extends Message {
10
+ /**
11
+ * @generated from field: string user_id = 1;
12
+ */
13
+ userId = "";
14
+ /**
15
+ * @generated from field: string organization_id = 2;
16
+ */
17
+ organizationId = "";
18
+ constructor(data) {
19
+ super();
20
+ proto3.util.initPartial(data, this);
21
+ }
22
+ static runtime = proto3;
23
+ static typeName = "liquidmetal.v1alpha1.TailRequest";
24
+ static fields = proto3.util.newFieldList(() => [
25
+ { no: 1, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
26
+ { no: 2, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
27
+ ]);
28
+ static fromBinary(bytes, options) {
29
+ return new TailRequest().fromBinary(bytes, options);
30
+ }
31
+ static fromJson(jsonValue, options) {
32
+ return new TailRequest().fromJson(jsonValue, options);
33
+ }
34
+ static fromJsonString(jsonString, options) {
35
+ return new TailRequest().fromJsonString(jsonString, options);
36
+ }
37
+ static equals(a, b) {
38
+ return proto3.util.equals(TailRequest, a, b);
39
+ }
40
+ }
41
+ /**
42
+ * @generated from message liquidmetal.v1alpha1.TailResponse
43
+ */
44
+ export class TailResponse extends Message {
45
+ /**
46
+ * @generated from field: string websocket_url = 1;
47
+ */
48
+ websocketUrl = "";
49
+ constructor(data) {
50
+ super();
51
+ proto3.util.initPartial(data, this);
52
+ }
53
+ static runtime = proto3;
54
+ static typeName = "liquidmetal.v1alpha1.TailResponse";
55
+ static fields = proto3.util.newFieldList(() => [
56
+ { no: 1, name: "websocket_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
57
+ ]);
58
+ static fromBinary(bytes, options) {
59
+ return new TailResponse().fromBinary(bytes, options);
60
+ }
61
+ static fromJson(jsonValue, options) {
62
+ return new TailResponse().fromJson(jsonValue, options);
63
+ }
64
+ static fromJsonString(jsonString, options) {
65
+ return new TailResponse().fromJsonString(jsonString, options);
66
+ }
67
+ static equals(a, b) {
68
+ return proto3.util.equals(TailResponse, a, b);
69
+ }
70
+ }
71
+ /**
72
+ * @generated from message liquidmetal.v1alpha1.TailWebsocketMessage
73
+ */
74
+ export class TailWebsocketMessage extends Message {
75
+ /**
76
+ * @generated from field: liquidmetal.v1alpha1.TailWebsocketMessage.Outcome outcome = 1;
77
+ */
78
+ outcome = TailWebsocketMessage_Outcome.UNSPECIFIED;
79
+ /**
80
+ * @generated from field: optional string script_name = 2;
81
+ */
82
+ scriptName;
83
+ /**
84
+ * @generated from field: repeated liquidmetal.v1alpha1.TailWebsocketMessage.Exception exceptions = 3;
85
+ */
86
+ exceptions = [];
87
+ /**
88
+ * @generated from field: repeated liquidmetal.v1alpha1.TailWebsocketMessage.Log logs = 4;
89
+ */
90
+ logs = [];
91
+ /**
92
+ * @generated from field: google.protobuf.Timestamp event_timestamp = 5;
93
+ */
94
+ eventTimestamp;
95
+ /**
96
+ * @generated from oneof liquidmetal.v1alpha1.TailWebsocketMessage.event
97
+ */
98
+ event = { case: undefined };
99
+ constructor(data) {
100
+ super();
101
+ proto3.util.initPartial(data, this);
102
+ }
103
+ static runtime = proto3;
104
+ static typeName = "liquidmetal.v1alpha1.TailWebsocketMessage";
105
+ static fields = proto3.util.newFieldList(() => [
106
+ { no: 1, name: "outcome", kind: "enum", T: proto3.getEnumType(TailWebsocketMessage_Outcome) },
107
+ { no: 2, name: "script_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
108
+ { no: 3, name: "exceptions", kind: "message", T: TailWebsocketMessage_Exception, repeated: true },
109
+ { no: 4, name: "logs", kind: "message", T: TailWebsocketMessage_Log, repeated: true },
110
+ { no: 5, name: "event_timestamp", kind: "message", T: Timestamp },
111
+ { no: 6, name: "request_event", kind: "message", T: TailWebsocketMessage_RequestEvent, oneof: "event" },
112
+ ]);
113
+ static fromBinary(bytes, options) {
114
+ return new TailWebsocketMessage().fromBinary(bytes, options);
115
+ }
116
+ static fromJson(jsonValue, options) {
117
+ return new TailWebsocketMessage().fromJson(jsonValue, options);
118
+ }
119
+ static fromJsonString(jsonString, options) {
120
+ return new TailWebsocketMessage().fromJsonString(jsonString, options);
121
+ }
122
+ static equals(a, b) {
123
+ return proto3.util.equals(TailWebsocketMessage, a, b);
124
+ }
125
+ }
126
+ /**
127
+ * @generated from enum liquidmetal.v1alpha1.TailWebsocketMessage.Outcome
128
+ */
129
+ export var TailWebsocketMessage_Outcome;
130
+ (function (TailWebsocketMessage_Outcome) {
131
+ /**
132
+ * @generated from enum value: OUTCOME_UNSPECIFIED = 0;
133
+ */
134
+ TailWebsocketMessage_Outcome[TailWebsocketMessage_Outcome["UNSPECIFIED"] = 0] = "UNSPECIFIED";
135
+ /**
136
+ * @generated from enum value: OUTCOME_OK = 1;
137
+ */
138
+ TailWebsocketMessage_Outcome[TailWebsocketMessage_Outcome["OK"] = 1] = "OK";
139
+ /**
140
+ * @generated from enum value: OUTCOME_CANCELLED = 2;
141
+ */
142
+ TailWebsocketMessage_Outcome[TailWebsocketMessage_Outcome["CANCELLED"] = 2] = "CANCELLED";
143
+ /**
144
+ * @generated from enum value: OUTCOME_EXCEPTION = 3;
145
+ */
146
+ TailWebsocketMessage_Outcome[TailWebsocketMessage_Outcome["EXCEPTION"] = 3] = "EXCEPTION";
147
+ /**
148
+ * @generated from enum value: OUTCOME_EXCEEDED_CPU = 4;
149
+ */
150
+ TailWebsocketMessage_Outcome[TailWebsocketMessage_Outcome["EXCEEDED_CPU"] = 4] = "EXCEEDED_CPU";
151
+ /**
152
+ * @generated from enum value: OUTCOME_EXCEEDED_MEMORY = 5;
153
+ */
154
+ TailWebsocketMessage_Outcome[TailWebsocketMessage_Outcome["EXCEEDED_MEMORY"] = 5] = "EXCEEDED_MEMORY";
155
+ })(TailWebsocketMessage_Outcome || (TailWebsocketMessage_Outcome = {}));
156
+ // Retrieve enum metadata with: proto3.getEnumType(TailWebsocketMessage_Outcome)
157
+ proto3.util.setEnumType(TailWebsocketMessage_Outcome, "liquidmetal.v1alpha1.TailWebsocketMessage.Outcome", [
158
+ { no: 0, name: "OUTCOME_UNSPECIFIED" },
159
+ { no: 1, name: "OUTCOME_OK" },
160
+ { no: 2, name: "OUTCOME_CANCELLED" },
161
+ { no: 3, name: "OUTCOME_EXCEPTION" },
162
+ { no: 4, name: "OUTCOME_EXCEEDED_CPU" },
163
+ { no: 5, name: "OUTCOME_EXCEEDED_MEMORY" },
164
+ ]);
165
+ /**
166
+ * @generated from message liquidmetal.v1alpha1.TailWebsocketMessage.Exception
167
+ */
168
+ export class TailWebsocketMessage_Exception extends Message {
169
+ /**
170
+ * @generated from field: string name = 1;
171
+ */
172
+ name = "";
173
+ /**
174
+ * @generated from field: string message = 2;
175
+ */
176
+ message = "";
177
+ /**
178
+ * @generated from field: google.protobuf.Timestamp timestamp = 3;
179
+ */
180
+ timestamp;
181
+ constructor(data) {
182
+ super();
183
+ proto3.util.initPartial(data, this);
184
+ }
185
+ static runtime = proto3;
186
+ static typeName = "liquidmetal.v1alpha1.TailWebsocketMessage.Exception";
187
+ static fields = proto3.util.newFieldList(() => [
188
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
189
+ { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
190
+ { no: 3, name: "timestamp", kind: "message", T: Timestamp },
191
+ ]);
192
+ static fromBinary(bytes, options) {
193
+ return new TailWebsocketMessage_Exception().fromBinary(bytes, options);
194
+ }
195
+ static fromJson(jsonValue, options) {
196
+ return new TailWebsocketMessage_Exception().fromJson(jsonValue, options);
197
+ }
198
+ static fromJsonString(jsonString, options) {
199
+ return new TailWebsocketMessage_Exception().fromJsonString(jsonString, options);
200
+ }
201
+ static equals(a, b) {
202
+ return proto3.util.equals(TailWebsocketMessage_Exception, a, b);
203
+ }
204
+ }
205
+ /**
206
+ * @generated from message liquidmetal.v1alpha1.TailWebsocketMessage.Log
207
+ */
208
+ export class TailWebsocketMessage_Log extends Message {
209
+ /**
210
+ * @generated from field: string message = 1;
211
+ */
212
+ message = "";
213
+ /**
214
+ * @generated from field: liquidmetal.v1alpha1.TailWebsocketMessage.Log.LogLevel level = 2;
215
+ */
216
+ level = TailWebsocketMessage_Log_LogLevel.UNSPECIFIED;
217
+ /**
218
+ * @generated from field: google.protobuf.Timestamp timestamp = 3;
219
+ */
220
+ timestamp;
221
+ constructor(data) {
222
+ super();
223
+ proto3.util.initPartial(data, this);
224
+ }
225
+ static runtime = proto3;
226
+ static typeName = "liquidmetal.v1alpha1.TailWebsocketMessage.Log";
227
+ static fields = proto3.util.newFieldList(() => [
228
+ { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
229
+ { no: 2, name: "level", kind: "enum", T: proto3.getEnumType(TailWebsocketMessage_Log_LogLevel) },
230
+ { no: 3, name: "timestamp", kind: "message", T: Timestamp },
231
+ ]);
232
+ static fromBinary(bytes, options) {
233
+ return new TailWebsocketMessage_Log().fromBinary(bytes, options);
234
+ }
235
+ static fromJson(jsonValue, options) {
236
+ return new TailWebsocketMessage_Log().fromJson(jsonValue, options);
237
+ }
238
+ static fromJsonString(jsonString, options) {
239
+ return new TailWebsocketMessage_Log().fromJsonString(jsonString, options);
240
+ }
241
+ static equals(a, b) {
242
+ return proto3.util.equals(TailWebsocketMessage_Log, a, b);
243
+ }
244
+ }
245
+ /**
246
+ * @generated from enum liquidmetal.v1alpha1.TailWebsocketMessage.Log.LogLevel
247
+ */
248
+ export var TailWebsocketMessage_Log_LogLevel;
249
+ (function (TailWebsocketMessage_Log_LogLevel) {
250
+ /**
251
+ * @generated from enum value: LOG_LEVEL_UNSPECIFIED = 0;
252
+ */
253
+ TailWebsocketMessage_Log_LogLevel[TailWebsocketMessage_Log_LogLevel["UNSPECIFIED"] = 0] = "UNSPECIFIED";
254
+ })(TailWebsocketMessage_Log_LogLevel || (TailWebsocketMessage_Log_LogLevel = {}));
255
+ // Retrieve enum metadata with: proto3.getEnumType(TailWebsocketMessage_Log_LogLevel)
256
+ proto3.util.setEnumType(TailWebsocketMessage_Log_LogLevel, "liquidmetal.v1alpha1.TailWebsocketMessage.Log.LogLevel", [
257
+ { no: 0, name: "LOG_LEVEL_UNSPECIFIED" },
258
+ ]);
259
+ /**
260
+ * @generated from message liquidmetal.v1alpha1.TailWebsocketMessage.RequestEvent
261
+ */
262
+ export class TailWebsocketMessage_RequestEvent extends Message {
263
+ /**
264
+ * @generated from field: string url = 1;
265
+ */
266
+ url = "";
267
+ /**
268
+ * @generated from field: string method = 2;
269
+ */
270
+ method = "";
271
+ /**
272
+ * @generated from field: map<string, string> headers = 3;
273
+ */
274
+ headers = {};
275
+ constructor(data) {
276
+ super();
277
+ proto3.util.initPartial(data, this);
278
+ }
279
+ static runtime = proto3;
280
+ static typeName = "liquidmetal.v1alpha1.TailWebsocketMessage.RequestEvent";
281
+ static fields = proto3.util.newFieldList(() => [
282
+ { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
283
+ { no: 2, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */ },
284
+ { no: 3, name: "headers", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "scalar", T: 9 /* ScalarType.STRING */ } },
285
+ ]);
286
+ static fromBinary(bytes, options) {
287
+ return new TailWebsocketMessage_RequestEvent().fromBinary(bytes, options);
288
+ }
289
+ static fromJson(jsonValue, options) {
290
+ return new TailWebsocketMessage_RequestEvent().fromJson(jsonValue, options);
291
+ }
292
+ static fromJsonString(jsonString, options) {
293
+ return new TailWebsocketMessage_RequestEvent().fromJsonString(jsonString, options);
294
+ }
295
+ static equals(a, b) {
296
+ return proto3.util.equals(TailWebsocketMessage_RequestEvent, a, b);
297
+ }
298
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"codestore.d.ts","sourceRoot":"","sources":["../../src/unsafe/codestore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGrD,qBAAa,gBAAiB,SAAQ,UAAW,YAAW,MAAM;IAChE,OAAO,CAAC,IAAI,CAAS;gBAET,IAAI,EAAE,MAAM;IAKlB,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAazB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAInC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG1C"}
1
+ {"version":3,"file":"codestore.d.ts","sourceRoot":"","sources":["../../src/unsafe/codestore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGrD,qBAAa,gBAAiB,SAAQ,UAAW,YAAW,MAAM;IAChE,OAAO,CAAC,IAAI,CAAS;gBAET,IAAI,EAAE,MAAM;IAKlB,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAezB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAInC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG1C"}
@@ -18,6 +18,7 @@ export class FileSystemBundle extends BundleBase {
18
18
  files.push(ent);
19
19
  }
20
20
  }
21
+ files.sort();
21
22
  return files;
22
23
  }
23
24
  async read(name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liquidmetal-ai/drizzle",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Raindrop core operational libraries",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -22,7 +22,7 @@ application "app" {
22
22
  service "my-svc" {}
23
23
  }
24
24
  `;
25
- expect(mustManifestFromString(manifest)).rejects.toThrowError(ManifestError);
25
+ await expect(mustManifestFromString(manifest)).rejects.toThrowError(ManifestError);
26
26
  });
27
27
 
28
28
  test('mustManifestFromString with warnings', async () => {
@@ -55,14 +55,14 @@ test('read file from bundle', async () => {
55
55
 
56
56
  test('read missing file from bundle', async () => {
57
57
  const bundle = new MemoryBundle();
58
- expect(bundle.read('file1.txt')).rejects.toThrowError('File not found: file1.txt');
58
+ await expect(bundle.read('file1.txt')).rejects.toThrowError('File not found: file1.txt');
59
59
  });
60
60
 
61
61
  test('delete file from bundle', async () => {
62
62
  const bundle = new MemoryBundle();
63
63
  await bundle.write('file1.txt', Buffer.from('hello'));
64
64
  await bundle.delete('file1.txt');
65
- expect(bundle.read('file1.txt')).rejects.toThrowError('File not found: file1.txt');
65
+ await expect(bundle.read('file1.txt')).rejects.toThrowError('File not found: file1.txt');
66
66
  });
67
67
 
68
68
  test('for await of bundle', async () => {
@@ -86,7 +86,7 @@ test('stat file from bundle', async () => {
86
86
 
87
87
  test('stat missing file from bundle', async () => {
88
88
  const bundle = new MemoryBundle();
89
- expect(bundle.stat('file1.txt')).rejects.toThrowError('File not found: file1.txt');
89
+ await expect(bundle.stat('file1.txt')).rejects.toThrowError('File not found: file1.txt');
90
90
  });
91
91
 
92
92
  test('hash bundle', async () => {
@@ -174,6 +174,11 @@ export class ApplicationsResponse_Application extends Message<ApplicationsRespon
174
174
  */
175
175
  isActive = false;
176
176
 
177
+ /**
178
+ * @generated from field: string organization_id = 9;
179
+ */
180
+ organizationId = "";
181
+
177
182
  constructor(data?: PartialMessage<ApplicationsResponse_Application>) {
178
183
  super();
179
184
  proto3.util.initPartial(data, this);
@@ -190,6 +195,7 @@ export class ApplicationsResponse_Application extends Message<ApplicationsRespon
190
195
  { no: 6, name: "updated_at", kind: "message", T: Timestamp },
191
196
  { no: 7, name: "deleted_at", kind: "message", T: Timestamp, opt: true },
192
197
  { no: 8, name: "is_active", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
198
+ { no: 9, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
193
199
  ]);
194
200
 
195
201
  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ApplicationsResponse_Application {
@@ -0,0 +1,32 @@
1
+ // @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts,import_extension=.js"
2
+ // @generated from file liquidmetal/v1alpha1/rainbow_public.proto (package liquidmetal.v1alpha1, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+
6
+ import { TailRequest, TailResponse } from "./rainbow_public_pb.js";
7
+ import { MethodKind } from "@bufbuild/protobuf";
8
+
9
+ /**
10
+ * RainbowPublicService represents logic implemented centrally by rainbow
11
+ * service that may be accessed publicly.
12
+ *
13
+ * @generated from service liquidmetal.v1alpha1.RainbowPublicService
14
+ */
15
+ export const RainbowPublicService = {
16
+ typeName: "liquidmetal.v1alpha1.RainbowPublicService",
17
+ methods: {
18
+ /**
19
+ * Tail is able to return a websocket url which will stream logs from active
20
+ * applications.
21
+ *
22
+ * @generated from rpc liquidmetal.v1alpha1.RainbowPublicService.Tail
23
+ */
24
+ tail: {
25
+ name: "Tail",
26
+ I: TailRequest,
27
+ O: TailResponse,
28
+ kind: MethodKind.Unary,
29
+ },
30
+ }
31
+ } as const;
32
+