/var/www/greso.tech/server/nsm/node_modules/@grpc/grpc-js/build/src
NameSizeModeActions
generated/-0755rm
admin.d.ts4470644editdlrm
admin.js12770644editdlrm
admin.js.map4710644editdlrm
backoff-timeout.d.ts21870644editdlrm
backoff-timeout.js50710644editdlrm
backoff-timeout.js.map29110644editdlrm
call-credentials-filter.d.ts6840644editdlrm
call-credentials-filter.js32740644editdlrm
call-credentials-filter.js.map17240644editdlrm
call-credentials.d.ts24070644editdlrm
call-credentials.js51780644editdlrm
call-credentials.js.map33630644editdlrm
call-interface.d.ts28340644editdlrm
call-interface.js31430644editdlrm
call-interface.js.map18880644editdlrm
call-number.d.ts530644editdlrm
call-number.js8850644editdlrm
call-number.js.map2400644editdlrm
call-stream.d.ts57950644editdlrm
call-stream.js301440644editdlrm
call-stream.js.map185160644editdlrm
call.d.ts36000644editdlrm
call.js50730644editdlrm
call.js.map28850644editdlrm
channel-credentials.d.ts38590644editdlrm
channel-credentials.js73160644editdlrm
channel-credentials.js.map36790644editdlrm
channel-options.d.ts27530644editdlrm
channel-options.js24300644editdlrm
channel-options.js.map13460644editdlrm
channel.d.ts37470644editdlrm
channel.js27290644editdlrm
channel.js.map14230644editdlrm
channelz.d.ts39000644editdlrm
channelz.js229800644editdlrm
channelz.js.map173670644editdlrm
client-interceptors.d.ts46110644editdlrm
client-interceptors.js177870644editdlrm
client-interceptors.js.map106010644editdlrm
client.d.ts58170644editdlrm
client.js189740644editdlrm
client.js.map118550644editdlrm
compression-algorithms.d.ts940644editdlrm
compression-algorithms.js11580644editdlrm
compression-algorithms.js.map3110644editdlrm
compression-filter.d.ts12150644editdlrm
compression-filter.js103070644editdlrm
compression-filter.js.map62650644editdlrm
connectivity-state.d.ts1350644editdlrm
connectivity-state.js12640644editdlrm
connectivity-state.js.map3270644editdlrm
constants.d.ts9440644editdlrm
constants.js31060644editdlrm
constants.js.map9500644editdlrm
control-plane-status.d.ts1690644editdlrm
control-plane-status.js15810644editdlrm
control-plane-status.js.map6700644editdlrm
deadline-filter.d.ts8250644editdlrm
deadline-filter.js36280644editdlrm
deadline-filter.js.map25790644editdlrm
deadline.d.ts7520644editdlrm
deadline.js33510644editdlrm
deadline.js.map19190644editdlrm
duration.d.ts2670644editdlrm
duration.js12530644editdlrm
duration.js.map6060644editdlrm
error.d.ts1340644editdlrm
error.js12360644editdlrm
error.js.map5200644editdlrm
events.d.ts5210644editdlrm
events.js7110644editdlrm
events.js.map1310644editdlrm
experimental.d.ts13140644editdlrm
experimental.js42110644editdlrm
experimental.js.map7640644editdlrm
filter-stack.d.ts9690644editdlrm
filter-stack.js25420644editdlrm
filter-stack.js.map20900644editdlrm
filter.d.ts11920644editdlrm
filter.js11110644editdlrm
filter.js.map4640644editdlrm
http_proxy.d.ts7270644editdlrm
http_proxy.js94240644editdlrm
http_proxy.js.map60840644editdlrm
index.d.ts53500644editdlrm
index.js92340644editdlrm
index.js.map30990644editdlrm
internal-channel.d.ts48890644editdlrm
internal-channel.js214740644editdlrm
internal-channel.js.map142310644editdlrm
load-balancer-child-handler.d.ts8150644editdlrm
load-balancer-child-handler.js52360644editdlrm
load-balancer-child-handler.js.map32460644editdlrm
load-balancer-outlier-detection.d.ts26630644editdlrm
load-balancer-outlier-detection.js257850644editdlrm
load-balancer-outlier-detection.js.map183100644editdlrm
load-balancer-pick-first.d.ts28280644editdlrm
load-balancer-pick-first.js175090644editdlrm
load-balancer-pick-first.js.map95060644editdlrm
load-balancer-round-robin.d.ts8040644editdlrm
load-balancer-round-robin.js78160644editdlrm
load-balancer-round-robin.js.map50190644editdlrm
load-balancer.d.ts44530644editdlrm
load-balancer.js48450644editdlrm
load-balancer.js.map24280644editdlrm
load-balancing-call.d.ts18470644editdlrm
load-balancing-call.js116470644editdlrm
load-balancing-call.js.map75310644editdlrm
logging.d.ts4770644editdlrm
logging.js40060644editdlrm
logging.js.map27950644editdlrm
make-client.d.ts30020644editdlrm
make-client.js54980644editdlrm
make-client.js.map31120644editdlrm
max-message-size-filter.d.ts7620644editdlrm
max-message-size-filter.js33600644editdlrm
max-message-size-filter.js.map15960644editdlrm
metadata.d.ts32410644editdlrm
metadata.js88390644editdlrm
metadata.js.map56450644editdlrm
object-stream.d.ts16040644editdlrm
object-stream.js7180644editdlrm
object-stream.js.map1450644editdlrm
picker.d.ts30390644editdlrm
picker.js31080644editdlrm
picker.js.map12520644editdlrm
resolver-dns.d.ts2320644editdlrm
resolver-dns.js133900644editdlrm
resolver-dns.js.map75580644editdlrm
resolver-ip.d.ts390644editdlrm
resolver-ip.js38330644editdlrm
resolver-ip.js.map25120644editdlrm
resolver-uds.d.ts390644editdlrm
resolver-uds.js15220644editdlrm
resolver-uds.js.map8230644editdlrm
resolver.d.ts42880644editdlrm
resolver.js32310644editdlrm
resolver.js.map13990644editdlrm
resolving-call.d.ts17540644editdlrm
resolving-call.js107110644editdlrm
resolving-call.js.map85510644editdlrm
resolving-load-balancer.d.ts28390644editdlrm
resolving-load-balancer.js120270644editdlrm
resolving-load-balancer.js.map62850644editdlrm
retrying-call.d.ts35280644editdlrm
retrying-call.js246580644editdlrm
retrying-call.js.map183180644editdlrm
server-call.d.ts82830644editdlrm
server-call.js242810644editdlrm
server-call.js.map195340644editdlrm
server-credentials.d.ts5110644editdlrm
server-credentials.js28340644editdlrm
server-credentials.js.map17870644editdlrm
server.d.ts22140644editdlrm
server.js382510644editdlrm
server.js.map268510644editdlrm
service-config.d.ts21630644editdlrm
service-config.js161610644editdlrm
service-config.js.map104750644editdlrm
status-builder.d.ts6570644editdlrm
status-builder.js17670644editdlrm
status-builder.js.map9720644editdlrm
stream-decoder.d.ts3130644editdlrm
stream-decoder.js42670644editdlrm
stream-decoder.js.map27150644editdlrm
subchannel-address.d.ts9500644editdlrm
subchannel-address.js22280644editdlrm
subchannel-address.js.map11950644editdlrm
subchannel-call.d.ts22580644editdlrm
subchannel-call.js200120644editdlrm
subchannel-call.js.map111560644editdlrm
subchannel-interface.d.ts18420644editdlrm
subchannel-interface.js17030644editdlrm
subchannel-interface.js.map9740644editdlrm
subchannel-pool.d.ts14720644editdlrm
subchannel-pool.js56740644editdlrm
subchannel-pool.js.map24940644editdlrm
subchannel.d.ts46540644editdlrm
subchannel.js145900644editdlrm
subchannel.js.map81870644editdlrm
tls-helpers.d.ts1490644editdlrm
tls-helpers.js12720644editdlrm
tls-helpers.js.map5020644editdlrm
transport.d.ts44730644editdlrm
transport.js268880644editdlrm
transport.js.map148010644editdlrm
uri-parser.d.ts3570644editdlrm
uri-parser.js32740644editdlrm
uri-parser.js.map20100644editdlrm
Edit: /var/www/greso.tech/server/nsm/node_modules/@grpc/grpc-js/build/src/metadata.js (8839B)
"use strict"; /* * Copyright 2019 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Metadata = void 0; const logging_1 = require("./logging"); const constants_1 = require("./constants"); const error_1 = require("./error"); const LEGAL_KEY_REGEX = /^[0-9a-z_.-]+$/; const LEGAL_NON_BINARY_VALUE_REGEX = /^[ -~]*$/; function isLegalKey(key) { return LEGAL_KEY_REGEX.test(key); } function isLegalNonBinaryValue(value) { return LEGAL_NON_BINARY_VALUE_REGEX.test(value); } function isBinaryKey(key) { return key.endsWith('-bin'); } function isCustomMetadata(key) { return !key.startsWith('grpc-'); } function normalizeKey(key) { return key.toLowerCase(); } function validate(key, value) { if (!isLegalKey(key)) { throw new Error('Metadata key "' + key + '" contains illegal characters'); } if (value !== null && value !== undefined) { if (isBinaryKey(key)) { if (!Buffer.isBuffer(value)) { throw new Error("keys that end with '-bin' must have Buffer values"); } } else { if (Buffer.isBuffer(value)) { throw new Error("keys that don't end with '-bin' must have String values"); } if (!isLegalNonBinaryValue(value)) { throw new Error('Metadata string value "' + value + '" contains illegal characters'); } } } } /** * A class for storing metadata. Keys are normalized to lowercase ASCII. */ class Metadata { constructor(options = {}) { this.internalRepr = new Map(); this.options = options; } /** * Sets the given value for the given key by replacing any other values * associated with that key. Normalizes the key. * @param key The key to whose value should be set. * @param value The value to set. Must be a buffer if and only * if the normalized key ends with '-bin'. */ set(key, value) { key = normalizeKey(key); validate(key, value); this.internalRepr.set(key, [value]); } /** * Adds the given value for the given key by appending to a list of previous * values associated with that key. Normalizes the key. * @param key The key for which a new value should be appended. * @param value The value to add. Must be a buffer if and only * if the normalized key ends with '-bin'. */ add(key, value) { key = normalizeKey(key); validate(key, value); const existingValue = this.internalRepr.get(key); if (existingValue === undefined) { this.internalRepr.set(key, [value]); } else { existingValue.push(value); } } /** * Removes the given key and any associated values. Normalizes the key. * @param key The key whose values should be removed. */ remove(key) { key = normalizeKey(key); // validate(key); this.internalRepr.delete(key); } /** * Gets a list of all values associated with the key. Normalizes the key. * @param key The key whose value should be retrieved. * @return A list of values associated with the given key. */ get(key) { key = normalizeKey(key); // validate(key); return this.internalRepr.get(key) || []; } /** * Gets a plain object mapping each key to the first value associated with it. * This reflects the most common way that people will want to see metadata. * @return A key/value mapping of the metadata. */ getMap() { const result = {}; for (const [key, values] of this.internalRepr) { if (values.length > 0) { const v = values[0]; result[key] = Buffer.isBuffer(v) ? Buffer.from(v) : v; } } return result; } /** * Clones the metadata object. * @return The newly cloned object. */ clone() { const newMetadata = new Metadata(this.options); const newInternalRepr = newMetadata.internalRepr; for (const [key, value] of this.internalRepr) { const clonedValue = value.map((v) => { if (Buffer.isBuffer(v)) { return Buffer.from(v); } else { return v; } }); newInternalRepr.set(key, clonedValue); } return newMetadata; } /** * Merges all key-value pairs from a given Metadata object into this one. * If both this object and the given object have values in the same key, * values from the other Metadata object will be appended to this object's * values. * @param other A Metadata object. */ merge(other) { for (const [key, values] of other.internalRepr) { const mergedValue = (this.internalRepr.get(key) || []).concat(values); this.internalRepr.set(key, mergedValue); } } setOptions(options) { this.options = options; } getOptions() { return this.options; } /** * Creates an OutgoingHttpHeaders object that can be used with the http2 API. */ toHttp2Headers() { // NOTE: Node <8.9 formats http2 headers incorrectly. const result = {}; for (const [key, values] of this.internalRepr) { // We assume that the user's interaction with this object is limited to // through its public API (i.e. keys and values are already validated). result[key] = values.map(bufToString); } return result; } // For compatibility with the other Metadata implementation _getCoreRepresentation() { return this.internalRepr; } /** * This modifies the behavior of JSON.stringify to show an object * representation of the metadata map. */ toJSON() { const result = {}; for (const [key, values] of this.internalRepr) { result[key] = values; } return result; } /** * Returns a new Metadata object based fields in a given IncomingHttpHeaders * object. * @param headers An IncomingHttpHeaders object. */ static fromHttp2Headers(headers) { const result = new Metadata(); for (const key of Object.keys(headers)) { // Reserved headers (beginning with `:`) are not valid keys. if (key.charAt(0) === ':') { continue; } const values = headers[key]; try { if (isBinaryKey(key)) { if (Array.isArray(values)) { values.forEach((value) => { result.add(key, Buffer.from(value, 'base64')); }); } else if (values !== undefined) { if (isCustomMetadata(key)) { values.split(',').forEach((v) => { result.add(key, Buffer.from(v.trim(), 'base64')); }); } else { result.add(key, Buffer.from(values, 'base64')); } } } else { if (Array.isArray(values)) { values.forEach((value) => { result.add(key, value); }); } else if (values !== undefined) { result.add(key, values); } } } catch (error) { const message = `Failed to add metadata entry ${key}: ${values}. ${(0, error_1.getErrorMessage)(error)}. For more information see https://github.com/grpc/grpc-node/issues/1173`; (0, logging_1.log)(constants_1.LogVerbosity.ERROR, message); } } return result; } } exports.Metadata = Metadata; const bufToString = (val) => { return Buffer.isBuffer(val) ? val.toString('base64') : val; }; //# sourceMappingURL=metadata.js.map