Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V2_UPGRADE enabled (#2482)
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com> Co-authored-by: Henry Mercer <henrymercer@github.com>
This commit is contained in:
parent
cf5b0a9041
commit
a196a714b8
5388 changed files with 2176737 additions and 71701 deletions
96
node_modules/@protobuf-ts/runtime/build/es2015/binary-format-contract.js
generated
vendored
Normal file
96
node_modules/@protobuf-ts/runtime/build/es2015/binary-format-contract.js
generated
vendored
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
/**
|
||||
* This handler implements the default behaviour for unknown fields.
|
||||
* When reading data, unknown fields are stored on the message, in a
|
||||
* symbol property.
|
||||
* When writing data, the symbol property is queried and unknown fields
|
||||
* are serialized into the output again.
|
||||
*/
|
||||
export var UnknownFieldHandler;
|
||||
(function (UnknownFieldHandler) {
|
||||
/**
|
||||
* The symbol used to store unknown fields for a message.
|
||||
* The property must conform to `UnknownFieldContainer`.
|
||||
*/
|
||||
UnknownFieldHandler.symbol = Symbol.for("protobuf-ts/unknown");
|
||||
/**
|
||||
* Store an unknown field during binary read directly on the message.
|
||||
* This method is compatible with `BinaryReadOptions.readUnknownField`.
|
||||
*/
|
||||
UnknownFieldHandler.onRead = (typeName, message, fieldNo, wireType, data) => {
|
||||
let container = is(message) ? message[UnknownFieldHandler.symbol] : message[UnknownFieldHandler.symbol] = [];
|
||||
container.push({ no: fieldNo, wireType, data });
|
||||
};
|
||||
/**
|
||||
* Write unknown fields stored for the message to the writer.
|
||||
* This method is compatible with `BinaryWriteOptions.writeUnknownFields`.
|
||||
*/
|
||||
UnknownFieldHandler.onWrite = (typeName, message, writer) => {
|
||||
for (let { no, wireType, data } of UnknownFieldHandler.list(message))
|
||||
writer.tag(no, wireType).raw(data);
|
||||
};
|
||||
/**
|
||||
* List unknown fields stored for the message.
|
||||
* Note that there may be multiples fields with the same number.
|
||||
*/
|
||||
UnknownFieldHandler.list = (message, fieldNo) => {
|
||||
if (is(message)) {
|
||||
let all = message[UnknownFieldHandler.symbol];
|
||||
return fieldNo ? all.filter(uf => uf.no == fieldNo) : all;
|
||||
}
|
||||
return [];
|
||||
};
|
||||
/**
|
||||
* Returns the last unknown field by field number.
|
||||
*/
|
||||
UnknownFieldHandler.last = (message, fieldNo) => UnknownFieldHandler.list(message, fieldNo).slice(-1)[0];
|
||||
const is = (message) => message && Array.isArray(message[UnknownFieldHandler.symbol]);
|
||||
})(UnknownFieldHandler || (UnknownFieldHandler = {}));
|
||||
/**
|
||||
* Merges binary write or read options. Later values override earlier values.
|
||||
*/
|
||||
export function mergeBinaryOptions(a, b) {
|
||||
return Object.assign(Object.assign({}, a), b);
|
||||
}
|
||||
/**
|
||||
* Protobuf binary format wire types.
|
||||
*
|
||||
* A wire type provides just enough information to find the length of the
|
||||
* following value.
|
||||
*
|
||||
* See https://developers.google.com/protocol-buffers/docs/encoding#structure
|
||||
*/
|
||||
export var WireType;
|
||||
(function (WireType) {
|
||||
/**
|
||||
* Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum
|
||||
*/
|
||||
WireType[WireType["Varint"] = 0] = "Varint";
|
||||
/**
|
||||
* Used for fixed64, sfixed64, double.
|
||||
* Always 8 bytes with little-endian byte order.
|
||||
*/
|
||||
WireType[WireType["Bit64"] = 1] = "Bit64";
|
||||
/**
|
||||
* Used for string, bytes, embedded messages, packed repeated fields
|
||||
*
|
||||
* Only repeated numeric types (types which use the varint, 32-bit,
|
||||
* or 64-bit wire types) can be packed. In proto3, such fields are
|
||||
* packed by default.
|
||||
*/
|
||||
WireType[WireType["LengthDelimited"] = 2] = "LengthDelimited";
|
||||
/**
|
||||
* Used for groups
|
||||
* @deprecated
|
||||
*/
|
||||
WireType[WireType["StartGroup"] = 3] = "StartGroup";
|
||||
/**
|
||||
* Used for groups
|
||||
* @deprecated
|
||||
*/
|
||||
WireType[WireType["EndGroup"] = 4] = "EndGroup";
|
||||
/**
|
||||
* Used for fixed32, sfixed32, float.
|
||||
* Always 4 bytes with little-endian byte order.
|
||||
*/
|
||||
WireType[WireType["Bit32"] = 5] = "Bit32";
|
||||
})(WireType || (WireType = {}));
|
||||
Loading…
Add table
Add a link
Reference in a new issue