@replit/protocol 0.4.29 → 0.4.32
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.
- package/dist/api/jetplane/repl/repl.client.d.ts +54 -8
- package/dist/api/jetplane/repl/repl.client.js +41 -12
- package/dist/api/jetplane/repl/repl.d.ts +345 -14
- package/dist/api/jetplane/repl/repl.js +663 -13
- package/dist/api/lore/lore.d.ts +6 -0
- package/dist/api/lore/lore.js +9 -1
- package/dist/api/lore/service.client.d.ts +134 -0
- package/dist/api/lore/service.client.js +107 -24
- package/dist/api/lore/service.d.ts +517 -0
- package/dist/api/lore/service.js +1155 -107
- package/dist/api/lore/transfer/org_transfer.client.d.ts +135 -0
- package/dist/api/lore/transfer/org_transfer.client.js +92 -0
- package/dist/api/lore/transfer/org_transfer.d.ts +636 -0
- package/dist/api/lore/transfer/org_transfer.js +1398 -0
- package/dist/api/oci/runtime_profile.d.ts +59 -0
- package/dist/api/oci/runtime_profile.js +105 -0
- package/dist/api/repl/repl.d.ts +7 -0
- package/dist/api/repl/repl.js +9 -1
- package/dist/api/signing.d.ts +21 -1
- package/dist/api/signing.js +25 -2
- package/dist/api/token/token.d.ts +13 -0
- package/dist/api/token/token.js +16 -1
- package/dist/api/types.d.ts +5 -0
- package/dist/api/types.js +9 -1
- package/dist/google/protobuf/any.d.ts +124 -0
- package/dist/google/protobuf/any.js +151 -0
- package/dist/google/protobuf/struct.d.ts +3 -3
- package/dist/google/protobuf/struct.js +3 -3
- package/dist/google/rpc/status.d.ts +35 -0
- package/dist/google/rpc/status.js +68 -0
- package/iotester/index.d.ts +8600 -2059
- package/iotester/index.js +22193 -5953
- package/main/index.d.ts +8600 -2059
- package/main/index.js +22193 -5953
- package/package.json +1 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
2
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
3
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
4
|
+
import { isJsonObject } from "@protobuf-ts/runtime";
|
|
5
|
+
import { typeofJsonValue } from "@protobuf-ts/runtime";
|
|
6
|
+
import { jsonWriteOptions } from "@protobuf-ts/runtime";
|
|
7
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
8
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
9
|
+
class Any$Type extends MessageType {
|
|
10
|
+
constructor() {
|
|
11
|
+
super("google.protobuf.Any", [
|
|
12
|
+
{ no: 1, name: "type_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
13
|
+
{ no: 2, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Pack the message into a new `Any`.
|
|
18
|
+
*
|
|
19
|
+
* Uses 'type.googleapis.com/full.type.name' as the type URL.
|
|
20
|
+
*/
|
|
21
|
+
pack(message, type) {
|
|
22
|
+
return {
|
|
23
|
+
typeUrl: this.typeNameToUrl(type.typeName), value: type.toBinary(message),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Unpack the message from the `Any`.
|
|
28
|
+
*/
|
|
29
|
+
unpack(any, type, options) {
|
|
30
|
+
if (!this.contains(any, type))
|
|
31
|
+
throw new Error("Cannot unpack google.protobuf.Any with typeUrl '" + any.typeUrl + "' as " + type.typeName + ".");
|
|
32
|
+
return type.fromBinary(any.value, options);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Does the given `Any` contain a packed message of the given type?
|
|
36
|
+
*/
|
|
37
|
+
contains(any, type) {
|
|
38
|
+
if (!any.typeUrl.length)
|
|
39
|
+
return false;
|
|
40
|
+
let wants = typeof type == "string" ? type : type.typeName;
|
|
41
|
+
let has = this.typeUrlToName(any.typeUrl);
|
|
42
|
+
return wants === has;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Convert the message to canonical JSON value.
|
|
46
|
+
*
|
|
47
|
+
* You have to provide the `typeRegistry` option so that the
|
|
48
|
+
* packed message can be converted to JSON.
|
|
49
|
+
*
|
|
50
|
+
* The `typeRegistry` option is also required to read
|
|
51
|
+
* `google.protobuf.Any` from JSON format.
|
|
52
|
+
*/
|
|
53
|
+
internalJsonWrite(any, options) {
|
|
54
|
+
if (any.typeUrl === "")
|
|
55
|
+
return {};
|
|
56
|
+
let typeName = this.typeUrlToName(any.typeUrl);
|
|
57
|
+
let opt = jsonWriteOptions(options);
|
|
58
|
+
let type = opt.typeRegistry?.find(t => t.typeName === typeName);
|
|
59
|
+
if (!type)
|
|
60
|
+
throw new globalThis.Error("Unable to convert google.protobuf.Any with typeUrl '" + any.typeUrl + "' to JSON. The specified type " + typeName + " is not available in the type registry.");
|
|
61
|
+
let value = type.fromBinary(any.value, { readUnknownField: false });
|
|
62
|
+
let json = type.internalJsonWrite(value, opt);
|
|
63
|
+
if (typeName.startsWith("google.protobuf.") || !isJsonObject(json))
|
|
64
|
+
json = { value: json };
|
|
65
|
+
json["@type"] = any.typeUrl;
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
internalJsonRead(json, options, target) {
|
|
69
|
+
if (!isJsonObject(json))
|
|
70
|
+
throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON " + typeofJsonValue(json) + ".");
|
|
71
|
+
if (typeof json["@type"] != "string" || json["@type"] == "")
|
|
72
|
+
return this.create();
|
|
73
|
+
let typeName = this.typeUrlToName(json["@type"]);
|
|
74
|
+
let type = options?.typeRegistry?.find(t => t.typeName == typeName);
|
|
75
|
+
if (!type)
|
|
76
|
+
throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON. The specified type " + typeName + " is not available in the type registry.");
|
|
77
|
+
let value;
|
|
78
|
+
if (typeName.startsWith("google.protobuf.") && json.hasOwnProperty("value"))
|
|
79
|
+
value = type.fromJson(json["value"], options);
|
|
80
|
+
else {
|
|
81
|
+
let copy = Object.assign({}, json);
|
|
82
|
+
delete copy["@type"];
|
|
83
|
+
value = type.fromJson(copy, options);
|
|
84
|
+
}
|
|
85
|
+
if (target === undefined)
|
|
86
|
+
target = this.create();
|
|
87
|
+
target.typeUrl = json["@type"];
|
|
88
|
+
target.value = type.toBinary(value);
|
|
89
|
+
return target;
|
|
90
|
+
}
|
|
91
|
+
typeNameToUrl(name) {
|
|
92
|
+
if (!name.length)
|
|
93
|
+
throw new Error("invalid type name: " + name);
|
|
94
|
+
return "type.googleapis.com/" + name;
|
|
95
|
+
}
|
|
96
|
+
typeUrlToName(url) {
|
|
97
|
+
if (!url.length)
|
|
98
|
+
throw new Error("invalid type url: " + url);
|
|
99
|
+
let slash = url.lastIndexOf("/");
|
|
100
|
+
let name = slash > 0 ? url.substring(slash + 1) : url;
|
|
101
|
+
if (!name.length)
|
|
102
|
+
throw new Error("invalid type url: " + url);
|
|
103
|
+
return name;
|
|
104
|
+
}
|
|
105
|
+
create(value) {
|
|
106
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
107
|
+
message.typeUrl = "";
|
|
108
|
+
message.value = new Uint8Array(0);
|
|
109
|
+
if (value !== undefined)
|
|
110
|
+
reflectionMergePartial(this, message, value);
|
|
111
|
+
return message;
|
|
112
|
+
}
|
|
113
|
+
internalBinaryRead(reader, length, options, target) {
|
|
114
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
115
|
+
while (reader.pos < end) {
|
|
116
|
+
let [fieldNo, wireType] = reader.tag();
|
|
117
|
+
switch (fieldNo) {
|
|
118
|
+
case /* string type_url */ 1:
|
|
119
|
+
message.typeUrl = reader.string();
|
|
120
|
+
break;
|
|
121
|
+
case /* bytes value */ 2:
|
|
122
|
+
message.value = reader.bytes();
|
|
123
|
+
break;
|
|
124
|
+
default:
|
|
125
|
+
let u = options.readUnknownField;
|
|
126
|
+
if (u === "throw")
|
|
127
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
128
|
+
let d = reader.skip(wireType);
|
|
129
|
+
if (u !== false)
|
|
130
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return message;
|
|
134
|
+
}
|
|
135
|
+
internalBinaryWrite(message, writer, options) {
|
|
136
|
+
/* string type_url = 1; */
|
|
137
|
+
if (message.typeUrl !== "")
|
|
138
|
+
writer.tag(1, WireType.LengthDelimited).string(message.typeUrl);
|
|
139
|
+
/* bytes value = 2; */
|
|
140
|
+
if (message.value.length)
|
|
141
|
+
writer.tag(2, WireType.LengthDelimited).bytes(message.value);
|
|
142
|
+
let u = options.writeUnknownFields;
|
|
143
|
+
if (u !== false)
|
|
144
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
145
|
+
return writer;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* @generated MessageType for protobuf message google.protobuf.Any
|
|
150
|
+
*/
|
|
151
|
+
export const Any = new Any$Type();
|
|
@@ -125,9 +125,9 @@ export interface ListValue {
|
|
|
125
125
|
* the null value for the `Value` type union.
|
|
126
126
|
*
|
|
127
127
|
* A field of type `NullValue` with any value other than `0` is considered
|
|
128
|
-
* invalid. Most ProtoJSON serializers will emit a Value with a `null_value`
|
|
129
|
-
* as a JSON `null` regardless of the integer value, and so will round trip
|
|
130
|
-
* a `0` value.
|
|
128
|
+
* invalid. Most ProtoJSON serializers will emit a `Value` with a `null_value`
|
|
129
|
+
* set as a JSON `null` regardless of the integer value, and so will round trip
|
|
130
|
+
* to a `0` value.
|
|
131
131
|
*
|
|
132
132
|
* @generated from protobuf enum google.protobuf.NullValue
|
|
133
133
|
*/
|
|
@@ -11,9 +11,9 @@ import { MessageType } from "@protobuf-ts/runtime";
|
|
|
11
11
|
* the null value for the `Value` type union.
|
|
12
12
|
*
|
|
13
13
|
* A field of type `NullValue` with any value other than `0` is considered
|
|
14
|
-
* invalid. Most ProtoJSON serializers will emit a Value with a `null_value`
|
|
15
|
-
* as a JSON `null` regardless of the integer value, and so will round trip
|
|
16
|
-
* a `0` value.
|
|
14
|
+
* invalid. Most ProtoJSON serializers will emit a `Value` with a `null_value`
|
|
15
|
+
* set as a JSON `null` regardless of the integer value, and so will round trip
|
|
16
|
+
* to a `0` value.
|
|
17
17
|
*
|
|
18
18
|
* @generated from protobuf enum google.protobuf.NullValue
|
|
19
19
|
*/
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
2
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
3
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
4
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
5
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
6
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
7
|
+
import { Any } from "../protobuf/any.js";
|
|
8
|
+
/**
|
|
9
|
+
* @generated from protobuf message google.rpc.Status
|
|
10
|
+
*/
|
|
11
|
+
export interface Status {
|
|
12
|
+
/**
|
|
13
|
+
* @generated from protobuf field: int32 code = 1
|
|
14
|
+
*/
|
|
15
|
+
code: number;
|
|
16
|
+
/**
|
|
17
|
+
* @generated from protobuf field: string message = 2
|
|
18
|
+
*/
|
|
19
|
+
message: string;
|
|
20
|
+
/**
|
|
21
|
+
* @generated from protobuf field: repeated google.protobuf.Any details = 3
|
|
22
|
+
*/
|
|
23
|
+
details: Any[];
|
|
24
|
+
}
|
|
25
|
+
declare class Status$Type extends MessageType<Status> {
|
|
26
|
+
constructor();
|
|
27
|
+
create(value?: PartialMessage<Status>): Status;
|
|
28
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Status): Status;
|
|
29
|
+
internalBinaryWrite(message: Status, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @generated MessageType for protobuf message google.rpc.Status
|
|
33
|
+
*/
|
|
34
|
+
export declare const Status: Status$Type;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { Any } from "../protobuf/any.js";
|
|
6
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
7
|
+
class Status$Type extends MessageType {
|
|
8
|
+
constructor() {
|
|
9
|
+
super("google.rpc.Status", [
|
|
10
|
+
{ no: 1, name: "code", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
11
|
+
{ no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
12
|
+
{ no: 3, name: "details", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Any }
|
|
13
|
+
]);
|
|
14
|
+
}
|
|
15
|
+
create(value) {
|
|
16
|
+
const message = globalThis.Object.create((this.messagePrototype));
|
|
17
|
+
message.code = 0;
|
|
18
|
+
message.message = "";
|
|
19
|
+
message.details = [];
|
|
20
|
+
if (value !== undefined)
|
|
21
|
+
reflectionMergePartial(this, message, value);
|
|
22
|
+
return message;
|
|
23
|
+
}
|
|
24
|
+
internalBinaryRead(reader, length, options, target) {
|
|
25
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
26
|
+
while (reader.pos < end) {
|
|
27
|
+
let [fieldNo, wireType] = reader.tag();
|
|
28
|
+
switch (fieldNo) {
|
|
29
|
+
case /* int32 code */ 1:
|
|
30
|
+
message.code = reader.int32();
|
|
31
|
+
break;
|
|
32
|
+
case /* string message */ 2:
|
|
33
|
+
message.message = reader.string();
|
|
34
|
+
break;
|
|
35
|
+
case /* repeated google.protobuf.Any details */ 3:
|
|
36
|
+
message.details.push(Any.internalBinaryRead(reader, reader.uint32(), options));
|
|
37
|
+
break;
|
|
38
|
+
default:
|
|
39
|
+
let u = options.readUnknownField;
|
|
40
|
+
if (u === "throw")
|
|
41
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
42
|
+
let d = reader.skip(wireType);
|
|
43
|
+
if (u !== false)
|
|
44
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return message;
|
|
48
|
+
}
|
|
49
|
+
internalBinaryWrite(message, writer, options) {
|
|
50
|
+
/* int32 code = 1; */
|
|
51
|
+
if (message.code !== 0)
|
|
52
|
+
writer.tag(1, WireType.Varint).int32(message.code);
|
|
53
|
+
/* string message = 2; */
|
|
54
|
+
if (message.message !== "")
|
|
55
|
+
writer.tag(2, WireType.LengthDelimited).string(message.message);
|
|
56
|
+
/* repeated google.protobuf.Any details = 3; */
|
|
57
|
+
for (let i = 0; i < message.details.length; i++)
|
|
58
|
+
Any.internalBinaryWrite(message.details[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
59
|
+
let u = options.writeUnknownFields;
|
|
60
|
+
if (u !== false)
|
|
61
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
62
|
+
return writer;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @generated MessageType for protobuf message google.rpc.Status
|
|
67
|
+
*/
|
|
68
|
+
export const Status = new Status$Type();
|