@liquidmetal-ai/drizzle 0.0.1

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 (76) hide show
  1. package/.changeset/README.md +4 -0
  2. package/.changeset/config.json +11 -0
  3. package/.changeset/odd-plums-dress.md +7 -0
  4. package/.turbo/turbo-build.log +6 -0
  5. package/dist/appify/build.d.ts +130 -0
  6. package/dist/appify/build.d.ts.map +1 -0
  7. package/dist/appify/build.js +703 -0
  8. package/dist/appify/build.test.d.ts +2 -0
  9. package/dist/appify/build.test.d.ts.map +1 -0
  10. package/dist/appify/build.test.js +111 -0
  11. package/dist/appify/index.d.ts +8 -0
  12. package/dist/appify/index.d.ts.map +1 -0
  13. package/dist/appify/index.js +28 -0
  14. package/dist/appify/index.test.d.ts +2 -0
  15. package/dist/appify/index.test.d.ts.map +1 -0
  16. package/dist/appify/index.test.js +40 -0
  17. package/dist/appify/parse.d.ts +151 -0
  18. package/dist/appify/parse.d.ts.map +1 -0
  19. package/dist/appify/parse.js +579 -0
  20. package/dist/appify/parse.test.d.ts +2 -0
  21. package/dist/appify/parse.test.d.ts.map +1 -0
  22. package/dist/appify/parse.test.js +319 -0
  23. package/dist/appify/validate.d.ts +22 -0
  24. package/dist/appify/validate.d.ts.map +1 -0
  25. package/dist/appify/validate.js +346 -0
  26. package/dist/appify/validate.test.d.ts +2 -0
  27. package/dist/appify/validate.test.d.ts.map +1 -0
  28. package/dist/appify/validate.test.js +327 -0
  29. package/dist/codestore.d.ts +34 -0
  30. package/dist/codestore.d.ts.map +1 -0
  31. package/dist/codestore.js +54 -0
  32. package/dist/codestore.test.d.ts +2 -0
  33. package/dist/codestore.test.d.ts.map +1 -0
  34. package/dist/codestore.test.js +84 -0
  35. package/dist/liquidmetal/v1alpha1/catalog_connect.d.ts +147 -0
  36. package/dist/liquidmetal/v1alpha1/catalog_connect.d.ts.map +1 -0
  37. package/dist/liquidmetal/v1alpha1/catalog_connect.js +150 -0
  38. package/dist/liquidmetal/v1alpha1/catalog_pb.d.ts +965 -0
  39. package/dist/liquidmetal/v1alpha1/catalog_pb.d.ts.map +1 -0
  40. package/dist/liquidmetal/v1alpha1/catalog_pb.js +1486 -0
  41. package/dist/liquidmetal/v1alpha1/rainbow_auth_connect.d.ts +49 -0
  42. package/dist/liquidmetal/v1alpha1/rainbow_auth_connect.d.ts.map +1 -0
  43. package/dist/liquidmetal/v1alpha1/rainbow_auth_connect.js +52 -0
  44. package/dist/liquidmetal/v1alpha1/rainbow_auth_pb.d.ts +271 -0
  45. package/dist/liquidmetal/v1alpha1/rainbow_auth_pb.d.ts.map +1 -0
  46. package/dist/liquidmetal/v1alpha1/rainbow_auth_pb.js +381 -0
  47. package/dist/liquidmetal/v1alpha1/raindrop_pb.d.ts +38 -0
  48. package/dist/liquidmetal/v1alpha1/raindrop_pb.d.ts.map +1 -0
  49. package/dist/liquidmetal/v1alpha1/raindrop_pb.js +52 -0
  50. package/dist/unsafe/codestore.d.ts +10 -0
  51. package/dist/unsafe/codestore.d.ts.map +1 -0
  52. package/dist/unsafe/codestore.js +23 -0
  53. package/dist/unsafe/codestore.test.d.ts +2 -0
  54. package/dist/unsafe/codestore.test.d.ts.map +1 -0
  55. package/dist/unsafe/codestore.test.js +27 -0
  56. package/eslint.config.mjs +4 -0
  57. package/package.json +45 -0
  58. package/src/appify/build.test.ts +116 -0
  59. package/src/appify/build.ts +783 -0
  60. package/src/appify/index.test.ts +43 -0
  61. package/src/appify/index.ts +33 -0
  62. package/src/appify/parse.test.ts +337 -0
  63. package/src/appify/parse.ts +744 -0
  64. package/src/appify/validate.test.ts +341 -0
  65. package/src/appify/validate.ts +435 -0
  66. package/src/codestore.test.ts +98 -0
  67. package/src/codestore.ts +93 -0
  68. package/src/liquidmetal/v1alpha1/catalog_connect.ts +153 -0
  69. package/src/liquidmetal/v1alpha1/catalog_pb.ts +1827 -0
  70. package/src/liquidmetal/v1alpha1/rainbow_auth_connect.ts +55 -0
  71. package/src/liquidmetal/v1alpha1/rainbow_auth_pb.ts +476 -0
  72. package/src/liquidmetal/v1alpha1/raindrop_pb.ts +63 -0
  73. package/src/unsafe/codestore.test.ts +34 -0
  74. package/src/unsafe/codestore.ts +29 -0
  75. package/tsconfig.json +31 -0
  76. package/tsconfig.tsbuildinfo +1 -0
@@ -0,0 +1,381 @@
1
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
2
+ // @generated from file liquidmetal/v1alpha1/rainbow_auth.proto (package liquidmetal.v1alpha1, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+ import { Duration, Message, proto3, Timestamp } from "@bufbuild/protobuf";
6
+ /**
7
+ * @generated from message liquidmetal.v1alpha1.DeviceAuthorizationRequest
8
+ */
9
+ export class DeviceAuthorizationRequest extends Message {
10
+ /**
11
+ * client_id should be the application name and version e.g. raindrop@v1.0.0
12
+ *
13
+ * @generated from field: string client_id = 1;
14
+ */
15
+ clientId = "";
16
+ constructor(data) {
17
+ super();
18
+ proto3.util.initPartial(data, this);
19
+ }
20
+ static runtime = proto3;
21
+ static typeName = "liquidmetal.v1alpha1.DeviceAuthorizationRequest";
22
+ static fields = proto3.util.newFieldList(() => [
23
+ { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
24
+ ]);
25
+ static fromBinary(bytes, options) {
26
+ return new DeviceAuthorizationRequest().fromBinary(bytes, options);
27
+ }
28
+ static fromJson(jsonValue, options) {
29
+ return new DeviceAuthorizationRequest().fromJson(jsonValue, options);
30
+ }
31
+ static fromJsonString(jsonString, options) {
32
+ return new DeviceAuthorizationRequest().fromJsonString(jsonString, options);
33
+ }
34
+ static equals(a, b) {
35
+ return proto3.util.equals(DeviceAuthorizationRequest, a, b);
36
+ }
37
+ }
38
+ /**
39
+ * @generated from message liquidmetal.v1alpha1.DeviceAuthorizationResponse
40
+ */
41
+ export class DeviceAuthorizationResponse extends Message {
42
+ /**
43
+ * device_code is a name from RFC8628 that will be used by the invoker of
44
+ * DeviceAuthorization to continuously poll to see if the authorization has
45
+ * been granted.
46
+ *
47
+ * @generated from field: string device_code = 1;
48
+ */
49
+ deviceCode = "";
50
+ /**
51
+ * verification_uri_complete is a URL that the caller should visit in order to
52
+ * initiate a login flow through a browser that will result in the device_code
53
+ * being associated with the login.
54
+ *
55
+ * as we do not support low-fidelity devices, we do not expose the RFC8628
56
+ * user_code nor the verification_uri. It is expected that the device can
57
+ * render a complex uri that the user can either click on or use a QR code
58
+ * scanner to complete rather than providing user-friendly small-length
59
+ * characters to type manually.
60
+ *
61
+ * @generated from field: string verification_uri_complete = 2;
62
+ */
63
+ verificationUriComplete = "";
64
+ /**
65
+ * expires_at is when the device code is marked as expired
66
+ *
67
+ * @generated from field: google.protobuf.Timestamp expires_at = 3;
68
+ */
69
+ expiresAt;
70
+ /**
71
+ * interval is the minimum amount of time that the client should wait between
72
+ * polling requests
73
+ *
74
+ * @generated from field: google.protobuf.Duration interval = 4;
75
+ */
76
+ interval;
77
+ constructor(data) {
78
+ super();
79
+ proto3.util.initPartial(data, this);
80
+ }
81
+ static runtime = proto3;
82
+ static typeName = "liquidmetal.v1alpha1.DeviceAuthorizationResponse";
83
+ static fields = proto3.util.newFieldList(() => [
84
+ { no: 1, name: "device_code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
85
+ { no: 2, name: "verification_uri_complete", kind: "scalar", T: 9 /* ScalarType.STRING */ },
86
+ { no: 3, name: "expires_at", kind: "message", T: Timestamp },
87
+ { no: 4, name: "interval", kind: "message", T: Duration },
88
+ ]);
89
+ static fromBinary(bytes, options) {
90
+ return new DeviceAuthorizationResponse().fromBinary(bytes, options);
91
+ }
92
+ static fromJson(jsonValue, options) {
93
+ return new DeviceAuthorizationResponse().fromJson(jsonValue, options);
94
+ }
95
+ static fromJsonString(jsonString, options) {
96
+ return new DeviceAuthorizationResponse().fromJsonString(jsonString, options);
97
+ }
98
+ static equals(a, b) {
99
+ return proto3.util.equals(DeviceAuthorizationResponse, a, b);
100
+ }
101
+ }
102
+ /**
103
+ * @generated from message liquidmetal.v1alpha1.DeviceAccessTokenRequest
104
+ */
105
+ export class DeviceAccessTokenRequest extends Message {
106
+ /**
107
+ * @generated from field: string device_code = 1;
108
+ */
109
+ deviceCode = "";
110
+ constructor(data) {
111
+ super();
112
+ proto3.util.initPartial(data, this);
113
+ }
114
+ static runtime = proto3;
115
+ static typeName = "liquidmetal.v1alpha1.DeviceAccessTokenRequest";
116
+ static fields = proto3.util.newFieldList(() => [
117
+ { no: 1, name: "device_code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
118
+ ]);
119
+ static fromBinary(bytes, options) {
120
+ return new DeviceAccessTokenRequest().fromBinary(bytes, options);
121
+ }
122
+ static fromJson(jsonValue, options) {
123
+ return new DeviceAccessTokenRequest().fromJson(jsonValue, options);
124
+ }
125
+ static fromJsonString(jsonString, options) {
126
+ return new DeviceAccessTokenRequest().fromJsonString(jsonString, options);
127
+ }
128
+ static equals(a, b) {
129
+ return proto3.util.equals(DeviceAccessTokenRequest, a, b);
130
+ }
131
+ }
132
+ /**
133
+ * @generated from message liquidmetal.v1alpha1.DeviceAccessTokenResponse
134
+ */
135
+ export class DeviceAccessTokenResponse extends Message {
136
+ /**
137
+ * @generated from oneof liquidmetal.v1alpha1.DeviceAccessTokenResponse.response
138
+ */
139
+ response = { case: undefined };
140
+ constructor(data) {
141
+ super();
142
+ proto3.util.initPartial(data, this);
143
+ }
144
+ static runtime = proto3;
145
+ static typeName = "liquidmetal.v1alpha1.DeviceAccessTokenResponse";
146
+ static fields = proto3.util.newFieldList(() => [
147
+ { no: 1, name: "authorization_pending", kind: "message", T: AuthorizationPending, oneof: "response" },
148
+ { no: 2, name: "bearer_token", kind: "message", T: BearerToken, oneof: "response" },
149
+ ]);
150
+ static fromBinary(bytes, options) {
151
+ return new DeviceAccessTokenResponse().fromBinary(bytes, options);
152
+ }
153
+ static fromJson(jsonValue, options) {
154
+ return new DeviceAccessTokenResponse().fromJson(jsonValue, options);
155
+ }
156
+ static fromJsonString(jsonString, options) {
157
+ return new DeviceAccessTokenResponse().fromJsonString(jsonString, options);
158
+ }
159
+ static equals(a, b) {
160
+ return proto3.util.equals(DeviceAccessTokenResponse, a, b);
161
+ }
162
+ }
163
+ /**
164
+ * @generated from message liquidmetal.v1alpha1.RefreshAccessTokenRequest
165
+ */
166
+ export class RefreshAccessTokenRequest extends Message {
167
+ /**
168
+ * @generated from field: string refresh_token = 1;
169
+ */
170
+ refreshToken = "";
171
+ /**
172
+ * @generated from field: string organization_id = 2;
173
+ */
174
+ organizationId = "";
175
+ constructor(data) {
176
+ super();
177
+ proto3.util.initPartial(data, this);
178
+ }
179
+ static runtime = proto3;
180
+ static typeName = "liquidmetal.v1alpha1.RefreshAccessTokenRequest";
181
+ static fields = proto3.util.newFieldList(() => [
182
+ { no: 1, name: "refresh_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
183
+ { no: 2, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
184
+ ]);
185
+ static fromBinary(bytes, options) {
186
+ return new RefreshAccessTokenRequest().fromBinary(bytes, options);
187
+ }
188
+ static fromJson(jsonValue, options) {
189
+ return new RefreshAccessTokenRequest().fromJson(jsonValue, options);
190
+ }
191
+ static fromJsonString(jsonString, options) {
192
+ return new RefreshAccessTokenRequest().fromJsonString(jsonString, options);
193
+ }
194
+ static equals(a, b) {
195
+ return proto3.util.equals(RefreshAccessTokenRequest, a, b);
196
+ }
197
+ }
198
+ /**
199
+ * @generated from message liquidmetal.v1alpha1.RefreshAccessTokenResponse
200
+ */
201
+ export class RefreshAccessTokenResponse extends Message {
202
+ /**
203
+ * @generated from field: liquidmetal.v1alpha1.BearerToken bearer_token = 1;
204
+ */
205
+ bearerToken;
206
+ constructor(data) {
207
+ super();
208
+ proto3.util.initPartial(data, this);
209
+ }
210
+ static runtime = proto3;
211
+ static typeName = "liquidmetal.v1alpha1.RefreshAccessTokenResponse";
212
+ static fields = proto3.util.newFieldList(() => [
213
+ { no: 1, name: "bearer_token", kind: "message", T: BearerToken },
214
+ ]);
215
+ static fromBinary(bytes, options) {
216
+ return new RefreshAccessTokenResponse().fromBinary(bytes, options);
217
+ }
218
+ static fromJson(jsonValue, options) {
219
+ return new RefreshAccessTokenResponse().fromJson(jsonValue, options);
220
+ }
221
+ static fromJsonString(jsonString, options) {
222
+ return new RefreshAccessTokenResponse().fromJsonString(jsonString, options);
223
+ }
224
+ static equals(a, b) {
225
+ return proto3.util.equals(RefreshAccessTokenResponse, a, b);
226
+ }
227
+ }
228
+ /**
229
+ * @generated from message liquidmetal.v1alpha1.AuthorizationPending
230
+ */
231
+ export class AuthorizationPending extends Message {
232
+ /**
233
+ * interval is the minimum amount of time that the client should wait between
234
+ * polling requests
235
+ *
236
+ * @generated from field: google.protobuf.Duration interval = 1;
237
+ */
238
+ interval;
239
+ constructor(data) {
240
+ super();
241
+ proto3.util.initPartial(data, this);
242
+ }
243
+ static runtime = proto3;
244
+ static typeName = "liquidmetal.v1alpha1.AuthorizationPending";
245
+ static fields = proto3.util.newFieldList(() => [
246
+ { no: 1, name: "interval", kind: "message", T: Duration },
247
+ ]);
248
+ static fromBinary(bytes, options) {
249
+ return new AuthorizationPending().fromBinary(bytes, options);
250
+ }
251
+ static fromJson(jsonValue, options) {
252
+ return new AuthorizationPending().fromJson(jsonValue, options);
253
+ }
254
+ static fromJsonString(jsonString, options) {
255
+ return new AuthorizationPending().fromJsonString(jsonString, options);
256
+ }
257
+ static equals(a, b) {
258
+ return proto3.util.equals(AuthorizationPending, a, b);
259
+ }
260
+ }
261
+ /**
262
+ * @generated from message liquidmetal.v1alpha1.BearerToken
263
+ */
264
+ export class BearerToken extends Message {
265
+ /**
266
+ * access_token is the string to be provided as a Bearer to APIs
267
+ *
268
+ * @generated from field: string access_token = 1;
269
+ */
270
+ accessToken = "";
271
+ /**
272
+ * access_token_expires_at is when the access token expires (though the
273
+ * access token happens to be a jwt and also includes an expires at field,
274
+ * this allows the client to use the access token without needing to know
275
+ * how to validate or parse it.)
276
+ *
277
+ * @generated from field: google.protobuf.Timestamp access_token_expires_at = 2;
278
+ */
279
+ accessTokenExpiresAt;
280
+ /**
281
+ * refresh_token is utilized when the access token expires to gain another
282
+ * access token. the value will be provided upon a new grant, and may be
283
+ * omitted upon refresh. whenever the value is provided, any previously stored
284
+ * refresh token must be discarded and replaced by this value.
285
+ *
286
+ * @generated from field: optional string refresh_token = 3;
287
+ */
288
+ refreshToken;
289
+ /**
290
+ * user_id, user_email, organization_id, and organization_name are surfaced
291
+ * for the client to present to the user for choosing which token to utilize
292
+ * or remove for cli use cases.
293
+ *
294
+ * @generated from field: string user_id = 4;
295
+ */
296
+ userId = "";
297
+ /**
298
+ * @generated from field: string user_email = 5;
299
+ */
300
+ userEmail = "";
301
+ /**
302
+ * @generated from field: string organization_id = 6;
303
+ */
304
+ organizationId = "";
305
+ /**
306
+ * @generated from field: string organization_name = 7;
307
+ */
308
+ organizationName = "";
309
+ /**
310
+ * catalog_service_base_url is used by the cli to determine which endpoint to
311
+ * address when speaking to this organization.
312
+ *
313
+ * @generated from field: string catalog_service_base_url = 8;
314
+ */
315
+ catalogServiceBaseUrl = "";
316
+ constructor(data) {
317
+ super();
318
+ proto3.util.initPartial(data, this);
319
+ }
320
+ static runtime = proto3;
321
+ static typeName = "liquidmetal.v1alpha1.BearerToken";
322
+ static fields = proto3.util.newFieldList(() => [
323
+ { no: 1, name: "access_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
324
+ { no: 2, name: "access_token_expires_at", kind: "message", T: Timestamp },
325
+ { no: 3, name: "refresh_token", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
326
+ { no: 4, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
327
+ { no: 5, name: "user_email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
328
+ { no: 6, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
329
+ { no: 7, name: "organization_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
330
+ { no: 8, name: "catalog_service_base_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
331
+ ]);
332
+ static fromBinary(bytes, options) {
333
+ return new BearerToken().fromBinary(bytes, options);
334
+ }
335
+ static fromJson(jsonValue, options) {
336
+ return new BearerToken().fromJson(jsonValue, options);
337
+ }
338
+ static fromJsonString(jsonString, options) {
339
+ return new BearerToken().fromJsonString(jsonString, options);
340
+ }
341
+ static equals(a, b) {
342
+ return proto3.util.equals(BearerToken, a, b);
343
+ }
344
+ }
345
+ /**
346
+ * AuthenticationState is serialized and provided to WorkOS when redirecting the
347
+ * user to complete authentication, this state is then copied forward by WorkOS
348
+ * to the redirectUrl so it can be read again upon successful authentication.
349
+ *
350
+ * @generated from message liquidmetal.v1alpha1.AuthenticationState
351
+ */
352
+ export class AuthenticationState extends Message {
353
+ /**
354
+ * device_code is the RFC8628 code that the cli is polling for and the browser
355
+ * needs to know about once authentication from WorkOS completes.
356
+ *
357
+ * @generated from field: string device_code = 1;
358
+ */
359
+ deviceCode = "";
360
+ constructor(data) {
361
+ super();
362
+ proto3.util.initPartial(data, this);
363
+ }
364
+ static runtime = proto3;
365
+ static typeName = "liquidmetal.v1alpha1.AuthenticationState";
366
+ static fields = proto3.util.newFieldList(() => [
367
+ { no: 1, name: "device_code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
368
+ ]);
369
+ static fromBinary(bytes, options) {
370
+ return new AuthenticationState().fromBinary(bytes, options);
371
+ }
372
+ static fromJson(jsonValue, options) {
373
+ return new AuthenticationState().fromJson(jsonValue, options);
374
+ }
375
+ static fromJsonString(jsonString, options) {
376
+ return new AuthenticationState().fromJsonString(jsonString, options);
377
+ }
378
+ static equals(a, b) {
379
+ return proto3.util.equals(AuthenticationState, a, b);
380
+ }
381
+ }
@@ -0,0 +1,38 @@
1
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
+ import { Message, proto3 } from "@bufbuild/protobuf";
3
+ import { BearerToken } from "./rainbow_auth_pb.js";
4
+ /**
5
+ * RaindropState represents the persisted state that raindrop utilizes to
6
+ * understand login information and current context.
7
+ *
8
+ * @generated from message liquidmetal.v1alpha1.RaindropState
9
+ */
10
+ export declare class RaindropState extends Message<RaindropState> {
11
+ /**
12
+ * organization_id_to_bearer_token is a map of BearerToken credentials by
13
+ * organizationId. As tokens are refreshed, the value is replaced in this map.
14
+ * It is not possible to log into a single organization using separate
15
+ * credentials on the CLI.
16
+ *
17
+ * @generated from field: map<string, liquidmetal.v1alpha1.BearerToken> organization_id_to_bearer_token = 1;
18
+ */
19
+ organizationIdToBearerToken: {
20
+ [key: string]: BearerToken;
21
+ };
22
+ /**
23
+ * current_organization_id is the organization that the cli is selected to
24
+ * operate against using the associated credentials.
25
+ *
26
+ * @generated from field: optional string current_organization_id = 2;
27
+ */
28
+ currentOrganizationId?: string;
29
+ constructor(data?: PartialMessage<RaindropState>);
30
+ static readonly runtime: typeof proto3;
31
+ static readonly typeName = "liquidmetal.v1alpha1.RaindropState";
32
+ static readonly fields: FieldList;
33
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RaindropState;
34
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RaindropState;
35
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RaindropState;
36
+ static equals(a: RaindropState | PlainMessage<RaindropState> | undefined, b: RaindropState | PlainMessage<RaindropState> | undefined): boolean;
37
+ }
38
+ //# sourceMappingURL=raindrop_pb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raindrop_pb.d.ts","sourceRoot":"","sources":["../../../src/liquidmetal/v1alpha1/raindrop_pb.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACjI,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,OAAO,CAAC,aAAa,CAAC;IACvD;;;;;;;OAOG;IACH,2BAA2B,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE,CAAM;IAEjE;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;gBAEnB,IAAI,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC;IAKhD,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,MAAM,CAAU;IAChD,MAAM,CAAC,QAAQ,CAAC,QAAQ,wCAAwC;IAChE,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAG9B;IAEH,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,aAAa;IAIzF,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,aAAa;IAIxF,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,aAAa;IAI5F,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC,aAAa,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC,aAAa,CAAC,GAAG,SAAS,GAAG,OAAO;CAG/I"}
@@ -0,0 +1,52 @@
1
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
2
+ // @generated from file liquidmetal/v1alpha1/raindrop.proto (package liquidmetal.v1alpha1, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+ import { Message, proto3 } from "@bufbuild/protobuf";
6
+ import { BearerToken } from "./rainbow_auth_pb.js";
7
+ /**
8
+ * RaindropState represents the persisted state that raindrop utilizes to
9
+ * understand login information and current context.
10
+ *
11
+ * @generated from message liquidmetal.v1alpha1.RaindropState
12
+ */
13
+ export class RaindropState extends Message {
14
+ /**
15
+ * organization_id_to_bearer_token is a map of BearerToken credentials by
16
+ * organizationId. As tokens are refreshed, the value is replaced in this map.
17
+ * It is not possible to log into a single organization using separate
18
+ * credentials on the CLI.
19
+ *
20
+ * @generated from field: map<string, liquidmetal.v1alpha1.BearerToken> organization_id_to_bearer_token = 1;
21
+ */
22
+ organizationIdToBearerToken = {};
23
+ /**
24
+ * current_organization_id is the organization that the cli is selected to
25
+ * operate against using the associated credentials.
26
+ *
27
+ * @generated from field: optional string current_organization_id = 2;
28
+ */
29
+ currentOrganizationId;
30
+ constructor(data) {
31
+ super();
32
+ proto3.util.initPartial(data, this);
33
+ }
34
+ static runtime = proto3;
35
+ static typeName = "liquidmetal.v1alpha1.RaindropState";
36
+ static fields = proto3.util.newFieldList(() => [
37
+ { no: 1, name: "organization_id_to_bearer_token", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "message", T: BearerToken } },
38
+ { no: 2, name: "current_organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
39
+ ]);
40
+ static fromBinary(bytes, options) {
41
+ return new RaindropState().fromBinary(bytes, options);
42
+ }
43
+ static fromJson(jsonValue, options) {
44
+ return new RaindropState().fromJson(jsonValue, options);
45
+ }
46
+ static fromJsonString(jsonString, options) {
47
+ return new RaindropState().fromJsonString(jsonString, options);
48
+ }
49
+ static equals(a, b) {
50
+ return proto3.util.equals(RaindropState, a, b);
51
+ }
52
+ }
@@ -0,0 +1,10 @@
1
+ import { Bundle, BundleBase } from '../codestore.js';
2
+ export declare class FileSystemBundle extends BundleBase implements Bundle {
3
+ private root;
4
+ constructor(root: string);
5
+ list(): Promise<string[]>;
6
+ read(name: string): Promise<Buffer>;
7
+ write(name: string, content: Buffer): Promise<void>;
8
+ delete(name: string): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=codestore.d.ts.map
@@ -0,0 +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;IAIzB,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"}
@@ -0,0 +1,23 @@
1
+ import * as fs from 'node:fs/promises';
2
+ import * as path from 'node:path';
3
+ import { BundleBase } from '../codestore.js';
4
+ // FileSystemBundle is a Bundle backed by the file system.
5
+ export class FileSystemBundle extends BundleBase {
6
+ root;
7
+ constructor(root) {
8
+ super();
9
+ this.root = root;
10
+ }
11
+ async list() {
12
+ return fs.readdir(this.root, { recursive: true });
13
+ }
14
+ async read(name) {
15
+ return fs.readFile(path.join(this.root, name));
16
+ }
17
+ async write(name, content) {
18
+ await fs.writeFile(path.join(this.root, name), content);
19
+ }
20
+ async delete(name) {
21
+ await fs.unlink(path.join(this.root, name));
22
+ }
23
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=codestore.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codestore.test.d.ts","sourceRoot":"","sources":["../../src/unsafe/codestore.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ import * as fs from 'node:fs/promises';
2
+ import * as path from 'node:path';
3
+ import * as os from 'os';
4
+ import { expect, test } from 'vitest';
5
+ import { FileSystemBundle } from './codestore.js';
6
+ test('FileSystemBundle maps to local files and their contents', async () => {
7
+ // Get a temporary directory.
8
+ const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'test'));
9
+ const bundle = new FileSystemBundle(tmpDir);
10
+ // Write
11
+ await bundle.write('a.txt', Buffer.from('a\n'));
12
+ await bundle.write('b.txt', Buffer.from('b\n'));
13
+ // List
14
+ const files = await bundle.list();
15
+ expect(files).toEqual(['a.txt', 'b.txt']);
16
+ // Read
17
+ const a = await bundle.read('a.txt');
18
+ expect(a.toString()).toEqual('a\n');
19
+ const b = await bundle.read('b.txt');
20
+ expect(b.toString()).toEqual('b\n');
21
+ // Delete
22
+ await bundle.delete('a.txt');
23
+ await bundle.delete('b.txt');
24
+ expect(await bundle.list()).toEqual([]);
25
+ // Cleanup
26
+ await fs.rmdir(tmpDir);
27
+ });
@@ -0,0 +1,4 @@
1
+ import repo_config from '@repo/eslint-config/eslint.config.mjs';
2
+
3
+ export default repo_config.concat([
4
+ ]);
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@liquidmetal-ai/drizzle",
3
+ "version": "0.0.1",
4
+ "description": "Raindrop core operational libraries",
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "shx rm -rf dist && tsc -b",
8
+ "format": "prettier --write \"**/*.{ts,tsx,md}\"",
9
+ "lint": "eslint . --max-warnings=0",
10
+ "prepare": "npm run build",
11
+ "posttest": "npm run lint",
12
+ "test": "vitest run",
13
+ "test:watch": "vitest"
14
+ },
15
+ "author": "Ian Sung-Schenck",
16
+ "license": "MIT",
17
+ "devDependencies": {
18
+ "@changesets/cli": "^2.27.9",
19
+ "@eslint/js": "^9.11.1",
20
+ "@repo/eslint-config": "*",
21
+ "@repo/typescript-config": "*",
22
+ "@types/node": "^22",
23
+ "@vitest/coverage-v8": "^2.1.1",
24
+ "chai": "^5",
25
+ "eslint": "^9.11.1",
26
+ "eslint-config-prettier": "^9",
27
+ "shx": "^0.3.4",
28
+ "typescript": "^5",
29
+ "typescript-eslint": "^8.7.0",
30
+ "vitest": "^2.1.1"
31
+ },
32
+ "exports": {
33
+ ".": {
34
+ "import": "./dist/index.js",
35
+ "types": "./dist/index.d.ts"
36
+ },
37
+ "./*": {
38
+ "import": "./dist/*.js",
39
+ "types": "./dist/*.d.ts"
40
+ }
41
+ },
42
+ "dependencies": {
43
+ "jszip": "^3.10.1"
44
+ }
45
+ }