@replit/protocol 0.4.21 → 0.4.22

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 (55) hide show
  1. package/README.md +54 -0
  2. package/dist/api/client.d.ts +202 -0
  3. package/dist/api/client.d.ts.map +1 -0
  4. package/dist/api/client.js +394 -0
  5. package/dist/api/features/features.d.ts +112 -0
  6. package/dist/api/features/features.d.ts.map +1 -0
  7. package/dist/api/features/features.js +199 -0
  8. package/dist/api/lore/lore.d.ts +543 -0
  9. package/dist/api/lore/lore.d.ts.map +1 -0
  10. package/dist/api/lore/lore.js +982 -0
  11. package/dist/api/lore/service.client.d.ts +283 -0
  12. package/dist/api/lore/service.client.d.ts.map +1 -0
  13. package/dist/api/lore/service.client.js +172 -0
  14. package/dist/api/lore/service.d.ts +1100 -0
  15. package/dist/api/lore/service.d.ts.map +1 -0
  16. package/dist/api/lore/service.js +2279 -0
  17. package/dist/api/powerup.d.ts +147 -0
  18. package/dist/api/powerup.d.ts.map +1 -0
  19. package/dist/api/powerup.js +286 -0
  20. package/dist/api/repl/repl.d.ts +552 -0
  21. package/dist/api/repl/repl.d.ts.map +1 -0
  22. package/dist/api/repl/repl.js +787 -0
  23. package/dist/api/signing.d.ts +618 -0
  24. package/dist/api/signing.d.ts.map +1 -0
  25. package/dist/api/signing.js +785 -0
  26. package/dist/api/token/token.d.ts +335 -0
  27. package/dist/api/token/token.d.ts.map +1 -0
  28. package/dist/api/token/token.js +463 -0
  29. package/dist/api/types.d.ts +8629 -0
  30. package/dist/api/types.d.ts.map +1 -0
  31. package/dist/api/types.js +17225 -0
  32. package/dist/google/protobuf/empty.d.ts +31 -0
  33. package/dist/google/protobuf/empty.d.ts.map +1 -0
  34. package/dist/google/protobuf/empty.js +41 -0
  35. package/dist/google/protobuf/field_mask.d.ts +239 -0
  36. package/dist/google/protobuf/field_mask.d.ts.map +1 -0
  37. package/dist/google/protobuf/field_mask.js +83 -0
  38. package/dist/google/protobuf/struct.d.ts +186 -0
  39. package/dist/google/protobuf/struct.d.ts.map +1 -0
  40. package/dist/google/protobuf/struct.js +337 -0
  41. package/dist/google/protobuf/timestamp.d.ts +156 -0
  42. package/dist/google/protobuf/timestamp.d.ts.map +1 -0
  43. package/dist/google/protobuf/timestamp.js +132 -0
  44. package/dist/index.d.ts +13 -0
  45. package/dist/index.d.ts.map +1 -0
  46. package/dist/index.js +16 -0
  47. package/dist/package.json +3 -0
  48. package/iotester/index.d.ts +6 -6
  49. package/iotester/index.js +25 -12
  50. package/main/index.d.ts +6 -6
  51. package/main/index.js +25 -12
  52. package/package.json +43 -4
  53. package/gen.sh +0 -51
  54. package/jsdoc.js +0 -171
  55. package/pnpm-workspace.yaml +0 -6
@@ -0,0 +1,787 @@
1
+ import { WireType } from "@protobuf-ts/runtime";
2
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
3
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
4
+ import { MessageType } from "@protobuf-ts/runtime";
5
+ import { Feature } from "../features/features.js";
6
+ /**
7
+ * Organization type. There are legacy types, but we are not
8
+ * supporting them, and they should not be getting passed.
9
+ *
10
+ * @generated from protobuf enum replit.goval.api.repl.Org.OrgType
11
+ */
12
+ export var Org_OrgType;
13
+ (function (Org_OrgType) {
14
+ /**
15
+ * @generated from protobuf enum value: TYPE_UNSPECIFIED = 0;
16
+ */
17
+ Org_OrgType[Org_OrgType["TYPE_UNSPECIFIED"] = 0] = "TYPE_UNSPECIFIED";
18
+ /**
19
+ * @generated from protobuf enum value: PERSONAL = 1;
20
+ */
21
+ Org_OrgType[Org_OrgType["PERSONAL"] = 1] = "PERSONAL";
22
+ /**
23
+ * @generated from protobuf enum value: TEAM = 2;
24
+ */
25
+ Org_OrgType[Org_OrgType["TEAM"] = 2] = "TEAM";
26
+ })(Org_OrgType || (Org_OrgType = {}));
27
+ /**
28
+ * Whether these limits are cachable, and if they are, by what facet of the
29
+ * token.
30
+ *
31
+ * @generated from protobuf enum replit.goval.api.repl.ResourceLimits.Cachability
32
+ */
33
+ export var ResourceLimits_Cachability;
34
+ (function (ResourceLimits_Cachability) {
35
+ /**
36
+ * Do not cache these limits.
37
+ *
38
+ * @generated from protobuf enum value: NONE = 0;
39
+ */
40
+ ResourceLimits_Cachability[ResourceLimits_Cachability["NONE"] = 0] = "NONE";
41
+ /**
42
+ * These limits can be cached and applied to this and any of the user's
43
+ * other repls.
44
+ *
45
+ * @generated from protobuf enum value: USER = 1;
46
+ */
47
+ ResourceLimits_Cachability[ResourceLimits_Cachability["USER"] = 1] = "USER";
48
+ /**
49
+ * These limits can be cached and applied only to this repl.
50
+ *
51
+ * @generated from protobuf enum value: REPL = 2;
52
+ */
53
+ ResourceLimits_Cachability[ResourceLimits_Cachability["REPL"] = 2] = "REPL";
54
+ })(ResourceLimits_Cachability || (ResourceLimits_Cachability = {}));
55
+ /**
56
+ * Environment is used to namespace development Replit from production Replit
57
+ * since user ID collisions will occur between them.
58
+ *
59
+ * @generated from protobuf enum replit.goval.api.repl.Environment
60
+ */
61
+ export var Environment;
62
+ (function (Environment) {
63
+ /**
64
+ * @generated from protobuf enum value: DEVELOPMENT = 0;
65
+ */
66
+ Environment[Environment["DEVELOPMENT"] = 0] = "DEVELOPMENT";
67
+ /**
68
+ * @generated from protobuf enum value: PRODUCTION = 1;
69
+ */
70
+ Environment[Environment["PRODUCTION"] = 1] = "PRODUCTION";
71
+ })(Environment || (Environment = {}));
72
+ /**
73
+ * Whether to persist filesystem, metadata, or both.
74
+ *
75
+ * @generated from protobuf enum replit.goval.api.repl.Persistence
76
+ */
77
+ export var Persistence;
78
+ (function (Persistence) {
79
+ /**
80
+ * This is the usual mode of operation: both filesystem and metadata will be
81
+ * persisted.
82
+ *
83
+ * @generated from protobuf enum value: PERSISTENT = 0;
84
+ */
85
+ Persistence[Persistence["PERSISTENT"] = 0] = "PERSISTENT";
86
+ /**
87
+ * The ephemeral flag indicates the repl being connected to will have a time
88
+ * restriction (~1h) on stored metadata: the records in all controlplane
89
+ * tables. This has the consequence that repl will be forcibly terminated
90
+ * and completely evicted from the cluster as-if it never existed, and will
91
+ * then be unable to wakeup or serve static traffic. This option does NOT
92
+ * affect filesystem and other data persistence.
93
+ *
94
+ * For context, this value is used on the client when repls are created for:
95
+ * - replrun
96
+ * - guests
97
+ * - anon users
98
+ * - temp vnc repls
99
+ * - users with non-verified emails
100
+ *
101
+ * @generated from protobuf enum value: EPHEMERAL = 1;
102
+ */
103
+ Persistence[Persistence["EPHEMERAL"] = 1] = "EPHEMERAL";
104
+ /**
105
+ * This indicates that the repl being connected does not have the ability to
106
+ * persist files or be woken up after the lifetime of this repl expires.
107
+ *
108
+ * For context, this value is used on the client when repls are created for:
109
+ * - replrun
110
+ * - guests
111
+ * - language pages
112
+ *
113
+ * @generated from protobuf enum value: NONE = 2;
114
+ */
115
+ Persistence[Persistence["NONE"] = 2] = "NONE";
116
+ /**
117
+ * This indicates that the repl's filesystem should be mounted as read-only.
118
+ *
119
+ * @generated from protobuf enum value: READ_ONLY = 3;
120
+ */
121
+ Persistence[Persistence["READ_ONLY"] = 3] = "READ_ONLY";
122
+ })(Persistence || (Persistence = {}));
123
+ // @generated message type with reflection information, may provide speed optimized methods
124
+ class Buckets$Type extends MessageType {
125
+ constructor() {
126
+ super("replit.goval.api.repl.Buckets", [
127
+ { no: 1, name: "snapshots", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
128
+ { no: 2, name: "metadata", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
129
+ { no: 3, name: "disk_blocks", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
130
+ ]);
131
+ }
132
+ create(value) {
133
+ const message = globalThis.Object.create((this.messagePrototype));
134
+ message.snapshots = "";
135
+ message.metadata = "";
136
+ message.diskBlocks = "";
137
+ if (value !== undefined)
138
+ reflectionMergePartial(this, message, value);
139
+ return message;
140
+ }
141
+ internalBinaryRead(reader, length, options, target) {
142
+ let message = target ?? this.create(), end = reader.pos + length;
143
+ while (reader.pos < end) {
144
+ let [fieldNo, wireType] = reader.tag();
145
+ switch (fieldNo) {
146
+ case /* string snapshots */ 1:
147
+ message.snapshots = reader.string();
148
+ break;
149
+ case /* string metadata */ 2:
150
+ message.metadata = reader.string();
151
+ break;
152
+ case /* string disk_blocks */ 3:
153
+ message.diskBlocks = reader.string();
154
+ break;
155
+ default:
156
+ let u = options.readUnknownField;
157
+ if (u === "throw")
158
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
159
+ let d = reader.skip(wireType);
160
+ if (u !== false)
161
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
162
+ }
163
+ }
164
+ return message;
165
+ }
166
+ internalBinaryWrite(message, writer, options) {
167
+ /* string snapshots = 1; */
168
+ if (message.snapshots !== "")
169
+ writer.tag(1, WireType.LengthDelimited).string(message.snapshots);
170
+ /* string metadata = 2; */
171
+ if (message.metadata !== "")
172
+ writer.tag(2, WireType.LengthDelimited).string(message.metadata);
173
+ /* string disk_blocks = 3; */
174
+ if (message.diskBlocks !== "")
175
+ writer.tag(3, WireType.LengthDelimited).string(message.diskBlocks);
176
+ let u = options.writeUnknownFields;
177
+ if (u !== false)
178
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
179
+ return writer;
180
+ }
181
+ }
182
+ /**
183
+ * @generated MessageType for protobuf message replit.goval.api.repl.Buckets
184
+ */
185
+ export const Buckets = new Buckets$Type();
186
+ // @generated message type with reflection information, may provide speed optimized methods
187
+ class Repl$Type extends MessageType {
188
+ constructor() {
189
+ super("replit.goval.api.repl.Repl", [
190
+ { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
191
+ { no: 2, name: "language", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
192
+ { no: 3, name: "bucket", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
193
+ { no: 4, name: "slug", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
194
+ { no: 5, name: "user", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
195
+ { no: 14, name: "org", kind: "message", T: () => Org },
196
+ { no: 6, name: "sourceRepl", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
197
+ { no: 7, name: "database", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
198
+ { no: 8, name: "buckets", kind: "message", T: () => Buckets },
199
+ { no: 9, name: "user_id", kind: "message", T: () => UserId },
200
+ { no: 10, name: "is_team", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
201
+ { no: 11, name: "roles", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
202
+ { no: 13, name: "log_fields", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
203
+ { no: 15, name: "use_repl_shield", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
204
+ { no: 16, name: "connectors_host", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
205
+ ]);
206
+ }
207
+ create(value) {
208
+ const message = globalThis.Object.create((this.messagePrototype));
209
+ message.id = "";
210
+ message.language = "";
211
+ message.bucket = "";
212
+ message.slug = "";
213
+ message.user = "";
214
+ message.sourceRepl = "";
215
+ message.database = "";
216
+ message.isTeam = false;
217
+ message.roles = [];
218
+ message.logFields = "";
219
+ message.useReplShield = false;
220
+ message.connectorsHost = "";
221
+ if (value !== undefined)
222
+ reflectionMergePartial(this, message, value);
223
+ return message;
224
+ }
225
+ internalBinaryRead(reader, length, options, target) {
226
+ let message = target ?? this.create(), end = reader.pos + length;
227
+ while (reader.pos < end) {
228
+ let [fieldNo, wireType] = reader.tag();
229
+ switch (fieldNo) {
230
+ case /* string id */ 1:
231
+ message.id = reader.string();
232
+ break;
233
+ case /* string language */ 2:
234
+ message.language = reader.string();
235
+ break;
236
+ case /* string bucket */ 3:
237
+ message.bucket = reader.string();
238
+ break;
239
+ case /* string slug */ 4:
240
+ message.slug = reader.string();
241
+ break;
242
+ case /* string user */ 5:
243
+ message.user = reader.string();
244
+ break;
245
+ case /* replit.goval.api.repl.Org org */ 14:
246
+ message.org = Org.internalBinaryRead(reader, reader.uint32(), options, message.org);
247
+ break;
248
+ case /* string sourceRepl */ 6:
249
+ message.sourceRepl = reader.string();
250
+ break;
251
+ case /* string database */ 7:
252
+ message.database = reader.string();
253
+ break;
254
+ case /* replit.goval.api.repl.Buckets buckets */ 8:
255
+ message.buckets = Buckets.internalBinaryRead(reader, reader.uint32(), options, message.buckets);
256
+ break;
257
+ case /* replit.goval.api.repl.UserId user_id */ 9:
258
+ message.userId = UserId.internalBinaryRead(reader, reader.uint32(), options, message.userId);
259
+ break;
260
+ case /* bool is_team */ 10:
261
+ message.isTeam = reader.bool();
262
+ break;
263
+ case /* repeated string roles */ 11:
264
+ message.roles.push(reader.string());
265
+ break;
266
+ case /* string log_fields */ 13:
267
+ message.logFields = reader.string();
268
+ break;
269
+ case /* bool use_repl_shield */ 15:
270
+ message.useReplShield = reader.bool();
271
+ break;
272
+ case /* string connectors_host */ 16:
273
+ message.connectorsHost = reader.string();
274
+ break;
275
+ default:
276
+ let u = options.readUnknownField;
277
+ if (u === "throw")
278
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
279
+ let d = reader.skip(wireType);
280
+ if (u !== false)
281
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
282
+ }
283
+ }
284
+ return message;
285
+ }
286
+ internalBinaryWrite(message, writer, options) {
287
+ /* string id = 1; */
288
+ if (message.id !== "")
289
+ writer.tag(1, WireType.LengthDelimited).string(message.id);
290
+ /* string language = 2; */
291
+ if (message.language !== "")
292
+ writer.tag(2, WireType.LengthDelimited).string(message.language);
293
+ /* string bucket = 3; */
294
+ if (message.bucket !== "")
295
+ writer.tag(3, WireType.LengthDelimited).string(message.bucket);
296
+ /* string slug = 4; */
297
+ if (message.slug !== "")
298
+ writer.tag(4, WireType.LengthDelimited).string(message.slug);
299
+ /* string user = 5; */
300
+ if (message.user !== "")
301
+ writer.tag(5, WireType.LengthDelimited).string(message.user);
302
+ /* string sourceRepl = 6; */
303
+ if (message.sourceRepl !== "")
304
+ writer.tag(6, WireType.LengthDelimited).string(message.sourceRepl);
305
+ /* string database = 7; */
306
+ if (message.database !== "")
307
+ writer.tag(7, WireType.LengthDelimited).string(message.database);
308
+ /* replit.goval.api.repl.Buckets buckets = 8; */
309
+ if (message.buckets)
310
+ Buckets.internalBinaryWrite(message.buckets, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
311
+ /* replit.goval.api.repl.UserId user_id = 9; */
312
+ if (message.userId)
313
+ UserId.internalBinaryWrite(message.userId, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
314
+ /* bool is_team = 10; */
315
+ if (message.isTeam !== false)
316
+ writer.tag(10, WireType.Varint).bool(message.isTeam);
317
+ /* repeated string roles = 11; */
318
+ for (let i = 0; i < message.roles.length; i++)
319
+ writer.tag(11, WireType.LengthDelimited).string(message.roles[i]);
320
+ /* string log_fields = 13; */
321
+ if (message.logFields !== "")
322
+ writer.tag(13, WireType.LengthDelimited).string(message.logFields);
323
+ /* replit.goval.api.repl.Org org = 14; */
324
+ if (message.org)
325
+ Org.internalBinaryWrite(message.org, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
326
+ /* bool use_repl_shield = 15; */
327
+ if (message.useReplShield !== false)
328
+ writer.tag(15, WireType.Varint).bool(message.useReplShield);
329
+ /* string connectors_host = 16; */
330
+ if (message.connectorsHost !== "")
331
+ writer.tag(16, WireType.LengthDelimited).string(message.connectorsHost);
332
+ let u = options.writeUnknownFields;
333
+ if (u !== false)
334
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
335
+ return writer;
336
+ }
337
+ }
338
+ /**
339
+ * @generated MessageType for protobuf message replit.goval.api.repl.Repl
340
+ */
341
+ export const Repl = new Repl$Type();
342
+ // @generated message type with reflection information, may provide speed optimized methods
343
+ class Org$Type extends MessageType {
344
+ constructor() {
345
+ super("replit.goval.api.repl.Org", [
346
+ { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
347
+ { no: 2, name: "type", kind: "enum", T: () => ["replit.goval.api.repl.Org.OrgType", Org_OrgType] },
348
+ { no: 3, name: "slug", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
349
+ { no: 4, name: "is_enterprise", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
350
+ ]);
351
+ }
352
+ create(value) {
353
+ const message = globalThis.Object.create((this.messagePrototype));
354
+ message.id = "";
355
+ message.type = 0;
356
+ message.slug = "";
357
+ message.isEnterprise = false;
358
+ if (value !== undefined)
359
+ reflectionMergePartial(this, message, value);
360
+ return message;
361
+ }
362
+ internalBinaryRead(reader, length, options, target) {
363
+ let message = target ?? this.create(), end = reader.pos + length;
364
+ while (reader.pos < end) {
365
+ let [fieldNo, wireType] = reader.tag();
366
+ switch (fieldNo) {
367
+ case /* string id */ 1:
368
+ message.id = reader.string();
369
+ break;
370
+ case /* replit.goval.api.repl.Org.OrgType type */ 2:
371
+ message.type = reader.int32();
372
+ break;
373
+ case /* string slug */ 3:
374
+ message.slug = reader.string();
375
+ break;
376
+ case /* bool is_enterprise */ 4:
377
+ message.isEnterprise = reader.bool();
378
+ break;
379
+ default:
380
+ let u = options.readUnknownField;
381
+ if (u === "throw")
382
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
383
+ let d = reader.skip(wireType);
384
+ if (u !== false)
385
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
386
+ }
387
+ }
388
+ return message;
389
+ }
390
+ internalBinaryWrite(message, writer, options) {
391
+ /* string id = 1; */
392
+ if (message.id !== "")
393
+ writer.tag(1, WireType.LengthDelimited).string(message.id);
394
+ /* replit.goval.api.repl.Org.OrgType type = 2; */
395
+ if (message.type !== 0)
396
+ writer.tag(2, WireType.Varint).int32(message.type);
397
+ /* string slug = 3; */
398
+ if (message.slug !== "")
399
+ writer.tag(3, WireType.LengthDelimited).string(message.slug);
400
+ /* bool is_enterprise = 4; */
401
+ if (message.isEnterprise !== false)
402
+ writer.tag(4, WireType.Varint).bool(message.isEnterprise);
403
+ let u = options.writeUnknownFields;
404
+ if (u !== false)
405
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
406
+ return writer;
407
+ }
408
+ }
409
+ /**
410
+ * @generated MessageType for protobuf message replit.goval.api.repl.Org
411
+ */
412
+ export const Org = new Org$Type();
413
+ // @generated message type with reflection information, may provide speed optimized methods
414
+ class UserId$Type extends MessageType {
415
+ constructor() {
416
+ super("replit.goval.api.repl.UserId", [
417
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
418
+ { no: 2, name: "environment", kind: "enum", T: () => ["replit.goval.api.repl.Environment", Environment] }
419
+ ]);
420
+ }
421
+ create(value) {
422
+ const message = globalThis.Object.create((this.messagePrototype));
423
+ message.id = 0n;
424
+ message.environment = 0;
425
+ if (value !== undefined)
426
+ reflectionMergePartial(this, message, value);
427
+ return message;
428
+ }
429
+ internalBinaryRead(reader, length, options, target) {
430
+ let message = target ?? this.create(), end = reader.pos + length;
431
+ while (reader.pos < end) {
432
+ let [fieldNo, wireType] = reader.tag();
433
+ switch (fieldNo) {
434
+ case /* int64 id */ 1:
435
+ message.id = reader.int64().toBigInt();
436
+ break;
437
+ case /* replit.goval.api.repl.Environment environment */ 2:
438
+ message.environment = reader.int32();
439
+ break;
440
+ default:
441
+ let u = options.readUnknownField;
442
+ if (u === "throw")
443
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
444
+ let d = reader.skip(wireType);
445
+ if (u !== false)
446
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
447
+ }
448
+ }
449
+ return message;
450
+ }
451
+ internalBinaryWrite(message, writer, options) {
452
+ /* int64 id = 1; */
453
+ if (message.id !== 0n)
454
+ writer.tag(1, WireType.Varint).int64(message.id);
455
+ /* replit.goval.api.repl.Environment environment = 2; */
456
+ if (message.environment !== 0)
457
+ writer.tag(2, WireType.Varint).int32(message.environment);
458
+ let u = options.writeUnknownFields;
459
+ if (u !== false)
460
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
461
+ return writer;
462
+ }
463
+ }
464
+ /**
465
+ * @generated MessageType for protobuf message replit.goval.api.repl.UserId
466
+ */
467
+ export const UserId = new UserId$Type();
468
+ // @generated message type with reflection information, may provide speed optimized methods
469
+ class ResourceLimits$Type extends MessageType {
470
+ constructor() {
471
+ super("replit.goval.api.repl.ResourceLimits", [
472
+ { no: 1, name: "net", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
473
+ { no: 2, name: "memory", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
474
+ { no: 3, name: "threads", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ },
475
+ { no: 4, name: "shares", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ },
476
+ { no: 5, name: "disk", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
477
+ { no: 10, name: "minimum_disk", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
478
+ { no: 9, name: "scratch_disk", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
479
+ { no: 6, name: "cache", kind: "enum", T: () => ["replit.goval.api.repl.ResourceLimits.Cachability", ResourceLimits_Cachability] },
480
+ { no: 7, name: "restrictNetwork", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
481
+ ]);
482
+ }
483
+ create(value) {
484
+ const message = globalThis.Object.create((this.messagePrototype));
485
+ message.net = false;
486
+ message.memory = 0n;
487
+ message.threads = 0;
488
+ message.shares = 0;
489
+ message.disk = 0n;
490
+ message.minimumDisk = 0n;
491
+ message.scratchDisk = 0n;
492
+ message.cache = 0;
493
+ message.restrictNetwork = false;
494
+ if (value !== undefined)
495
+ reflectionMergePartial(this, message, value);
496
+ return message;
497
+ }
498
+ internalBinaryRead(reader, length, options, target) {
499
+ let message = target ?? this.create(), end = reader.pos + length;
500
+ while (reader.pos < end) {
501
+ let [fieldNo, wireType] = reader.tag();
502
+ switch (fieldNo) {
503
+ case /* bool net */ 1:
504
+ message.net = reader.bool();
505
+ break;
506
+ case /* int64 memory */ 2:
507
+ message.memory = reader.int64().toBigInt();
508
+ break;
509
+ case /* double threads */ 3:
510
+ message.threads = reader.double();
511
+ break;
512
+ case /* double shares */ 4:
513
+ message.shares = reader.double();
514
+ break;
515
+ case /* int64 disk */ 5:
516
+ message.disk = reader.int64().toBigInt();
517
+ break;
518
+ case /* int64 minimum_disk */ 10:
519
+ message.minimumDisk = reader.int64().toBigInt();
520
+ break;
521
+ case /* int64 scratch_disk */ 9:
522
+ message.scratchDisk = reader.int64().toBigInt();
523
+ break;
524
+ case /* replit.goval.api.repl.ResourceLimits.Cachability cache */ 6:
525
+ message.cache = reader.int32();
526
+ break;
527
+ case /* bool restrictNetwork */ 7:
528
+ message.restrictNetwork = reader.bool();
529
+ break;
530
+ default:
531
+ let u = options.readUnknownField;
532
+ if (u === "throw")
533
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
534
+ let d = reader.skip(wireType);
535
+ if (u !== false)
536
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
537
+ }
538
+ }
539
+ return message;
540
+ }
541
+ internalBinaryWrite(message, writer, options) {
542
+ /* bool net = 1; */
543
+ if (message.net !== false)
544
+ writer.tag(1, WireType.Varint).bool(message.net);
545
+ /* int64 memory = 2; */
546
+ if (message.memory !== 0n)
547
+ writer.tag(2, WireType.Varint).int64(message.memory);
548
+ /* double threads = 3; */
549
+ if (message.threads !== 0)
550
+ writer.tag(3, WireType.Bit64).double(message.threads);
551
+ /* double shares = 4; */
552
+ if (message.shares !== 0)
553
+ writer.tag(4, WireType.Bit64).double(message.shares);
554
+ /* int64 disk = 5; */
555
+ if (message.disk !== 0n)
556
+ writer.tag(5, WireType.Varint).int64(message.disk);
557
+ /* replit.goval.api.repl.ResourceLimits.Cachability cache = 6; */
558
+ if (message.cache !== 0)
559
+ writer.tag(6, WireType.Varint).int32(message.cache);
560
+ /* bool restrictNetwork = 7; */
561
+ if (message.restrictNetwork !== false)
562
+ writer.tag(7, WireType.Varint).bool(message.restrictNetwork);
563
+ /* int64 scratch_disk = 9; */
564
+ if (message.scratchDisk !== 0n)
565
+ writer.tag(9, WireType.Varint).int64(message.scratchDisk);
566
+ /* int64 minimum_disk = 10; */
567
+ if (message.minimumDisk !== 0n)
568
+ writer.tag(10, WireType.Varint).int64(message.minimumDisk);
569
+ let u = options.writeUnknownFields;
570
+ if (u !== false)
571
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
572
+ return writer;
573
+ }
574
+ }
575
+ /**
576
+ * @generated MessageType for protobuf message replit.goval.api.repl.ResourceLimits
577
+ */
578
+ export const ResourceLimits = new ResourceLimits$Type();
579
+ // @generated message type with reflection information, may provide speed optimized methods
580
+ class Metadata$Type extends MessageType {
581
+ constructor() {
582
+ super("replit.goval.api.repl.Metadata", [
583
+ { no: 7, name: "repl", kind: "message", T: () => Repl },
584
+ { no: 10, name: "resourceLimits", kind: "message", T: () => ResourceLimits },
585
+ { no: 17, name: "interactiveResourceLimits", kind: "message", T: () => ResourceLimits },
586
+ { no: 6, name: "persistence", kind: "enum", T: () => ["replit.goval.api.repl.Persistence", Persistence] },
587
+ { no: 14, name: "flags", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
588
+ { no: 16, name: "features", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Feature },
589
+ { no: 18, name: "build_info", kind: "message", T: () => BuildInfo }
590
+ ]);
591
+ }
592
+ create(value) {
593
+ const message = globalThis.Object.create((this.messagePrototype));
594
+ message.persistence = 0;
595
+ message.flags = [];
596
+ message.features = [];
597
+ if (value !== undefined)
598
+ reflectionMergePartial(this, message, value);
599
+ return message;
600
+ }
601
+ internalBinaryRead(reader, length, options, target) {
602
+ let message = target ?? this.create(), end = reader.pos + length;
603
+ while (reader.pos < end) {
604
+ let [fieldNo, wireType] = reader.tag();
605
+ switch (fieldNo) {
606
+ case /* replit.goval.api.repl.Repl repl */ 7:
607
+ message.repl = Repl.internalBinaryRead(reader, reader.uint32(), options, message.repl);
608
+ break;
609
+ case /* replit.goval.api.repl.ResourceLimits resourceLimits */ 10:
610
+ message.resourceLimits = ResourceLimits.internalBinaryRead(reader, reader.uint32(), options, message.resourceLimits);
611
+ break;
612
+ case /* replit.goval.api.repl.ResourceLimits interactiveResourceLimits */ 17:
613
+ message.interactiveResourceLimits = ResourceLimits.internalBinaryRead(reader, reader.uint32(), options, message.interactiveResourceLimits);
614
+ break;
615
+ case /* replit.goval.api.repl.Persistence persistence */ 6:
616
+ message.persistence = reader.int32();
617
+ break;
618
+ case /* repeated string flags */ 14:
619
+ message.flags.push(reader.string());
620
+ break;
621
+ case /* repeated replit.goval.api.features.Feature features */ 16:
622
+ message.features.push(Feature.internalBinaryRead(reader, reader.uint32(), options));
623
+ break;
624
+ case /* replit.goval.api.repl.BuildInfo build_info */ 18:
625
+ message.buildInfo = BuildInfo.internalBinaryRead(reader, reader.uint32(), options, message.buildInfo);
626
+ break;
627
+ default:
628
+ let u = options.readUnknownField;
629
+ if (u === "throw")
630
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
631
+ let d = reader.skip(wireType);
632
+ if (u !== false)
633
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
634
+ }
635
+ }
636
+ return message;
637
+ }
638
+ internalBinaryWrite(message, writer, options) {
639
+ /* replit.goval.api.repl.Persistence persistence = 6; */
640
+ if (message.persistence !== 0)
641
+ writer.tag(6, WireType.Varint).int32(message.persistence);
642
+ /* replit.goval.api.repl.Repl repl = 7; */
643
+ if (message.repl)
644
+ Repl.internalBinaryWrite(message.repl, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
645
+ /* replit.goval.api.repl.ResourceLimits resourceLimits = 10; */
646
+ if (message.resourceLimits)
647
+ ResourceLimits.internalBinaryWrite(message.resourceLimits, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
648
+ /* repeated string flags = 14; */
649
+ for (let i = 0; i < message.flags.length; i++)
650
+ writer.tag(14, WireType.LengthDelimited).string(message.flags[i]);
651
+ /* repeated replit.goval.api.features.Feature features = 16; */
652
+ for (let i = 0; i < message.features.length; i++)
653
+ Feature.internalBinaryWrite(message.features[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
654
+ /* replit.goval.api.repl.ResourceLimits interactiveResourceLimits = 17; */
655
+ if (message.interactiveResourceLimits)
656
+ ResourceLimits.internalBinaryWrite(message.interactiveResourceLimits, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
657
+ /* replit.goval.api.repl.BuildInfo build_info = 18; */
658
+ if (message.buildInfo)
659
+ BuildInfo.internalBinaryWrite(message.buildInfo, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
660
+ let u = options.writeUnknownFields;
661
+ if (u !== false)
662
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
663
+ return writer;
664
+ }
665
+ }
666
+ /**
667
+ * @generated MessageType for protobuf message replit.goval.api.repl.Metadata
668
+ */
669
+ export const Metadata = new Metadata$Type();
670
+ // @generated message type with reflection information, may provide speed optimized methods
671
+ class BuildInfo$Type extends MessageType {
672
+ constructor() {
673
+ super("replit.goval.api.repl.BuildInfo", [
674
+ { no: 1, name: "deployment_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
675
+ { no: 2, name: "url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
676
+ { no: 3, name: "build_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
677
+ { no: 4, name: "machine_tier", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
678
+ ]);
679
+ }
680
+ create(value) {
681
+ const message = globalThis.Object.create((this.messagePrototype));
682
+ message.deploymentId = "";
683
+ message.url = "";
684
+ message.buildId = "";
685
+ message.machineTier = "";
686
+ if (value !== undefined)
687
+ reflectionMergePartial(this, message, value);
688
+ return message;
689
+ }
690
+ internalBinaryRead(reader, length, options, target) {
691
+ let message = target ?? this.create(), end = reader.pos + length;
692
+ while (reader.pos < end) {
693
+ let [fieldNo, wireType] = reader.tag();
694
+ switch (fieldNo) {
695
+ case /* string deployment_id */ 1:
696
+ message.deploymentId = reader.string();
697
+ break;
698
+ case /* string url */ 2:
699
+ message.url = reader.string();
700
+ break;
701
+ case /* string build_id */ 3:
702
+ message.buildId = reader.string();
703
+ break;
704
+ case /* string machine_tier */ 4:
705
+ message.machineTier = reader.string();
706
+ break;
707
+ default:
708
+ let u = options.readUnknownField;
709
+ if (u === "throw")
710
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
711
+ let d = reader.skip(wireType);
712
+ if (u !== false)
713
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
714
+ }
715
+ }
716
+ return message;
717
+ }
718
+ internalBinaryWrite(message, writer, options) {
719
+ /* string deployment_id = 1; */
720
+ if (message.deploymentId !== "")
721
+ writer.tag(1, WireType.LengthDelimited).string(message.deploymentId);
722
+ /* string url = 2; */
723
+ if (message.url !== "")
724
+ writer.tag(2, WireType.LengthDelimited).string(message.url);
725
+ /* string build_id = 3; */
726
+ if (message.buildId !== "")
727
+ writer.tag(3, WireType.LengthDelimited).string(message.buildId);
728
+ /* string machine_tier = 4; */
729
+ if (message.machineTier !== "")
730
+ writer.tag(4, WireType.LengthDelimited).string(message.machineTier);
731
+ let u = options.writeUnknownFields;
732
+ if (u !== false)
733
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
734
+ return writer;
735
+ }
736
+ }
737
+ /**
738
+ * @generated MessageType for protobuf message replit.goval.api.repl.BuildInfo
739
+ */
740
+ export const BuildInfo = new BuildInfo$Type();
741
+ // @generated message type with reflection information, may provide speed optimized methods
742
+ class Pid2Binary$Type extends MessageType {
743
+ constructor() {
744
+ super("replit.goval.api.repl.Pid2Binary", [
745
+ { no: 1, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
746
+ ]);
747
+ }
748
+ create(value) {
749
+ const message = globalThis.Object.create((this.messagePrototype));
750
+ message.version = "";
751
+ if (value !== undefined)
752
+ reflectionMergePartial(this, message, value);
753
+ return message;
754
+ }
755
+ internalBinaryRead(reader, length, options, target) {
756
+ let message = target ?? this.create(), end = reader.pos + length;
757
+ while (reader.pos < end) {
758
+ let [fieldNo, wireType] = reader.tag();
759
+ switch (fieldNo) {
760
+ case /* string version */ 1:
761
+ message.version = reader.string();
762
+ break;
763
+ default:
764
+ let u = options.readUnknownField;
765
+ if (u === "throw")
766
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
767
+ let d = reader.skip(wireType);
768
+ if (u !== false)
769
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
770
+ }
771
+ }
772
+ return message;
773
+ }
774
+ internalBinaryWrite(message, writer, options) {
775
+ /* string version = 1; */
776
+ if (message.version !== "")
777
+ writer.tag(1, WireType.LengthDelimited).string(message.version);
778
+ let u = options.writeUnknownFields;
779
+ if (u !== false)
780
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
781
+ return writer;
782
+ }
783
+ }
784
+ /**
785
+ * @generated MessageType for protobuf message replit.goval.api.repl.Pid2Binary
786
+ */
787
+ export const Pid2Binary = new Pid2Binary$Type();