/var/www/qr4y.com/server/delivery/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.map28960644editdlrm
call-credentials-filter.d.ts6840644editdlrm
call-credentials-filter.js32110644editdlrm
call-credentials-filter.js.map16850644editdlrm
call-credentials.d.ts24230644editdlrm
call-credentials.js49910644editdlrm
call-credentials.js.map32660644editdlrm
call-stream.d.ts57880644editdlrm
call-stream.js304230644editdlrm
call-stream.js.map186690644editdlrm
call.d.ts35830644editdlrm
call.js50730644editdlrm
call.js.map27790644editdlrm
channel-credentials.d.ts38360644editdlrm
channel-credentials.js73060644editdlrm
channel-credentials.js.map36640644editdlrm
channel-options.d.ts22150644editdlrm
channel-options.js21790644editdlrm
channel-options.js.map12080644editdlrm
channel.d.ts58080644editdlrm
channel.js289830644editdlrm
channel.js.map160580644editdlrm
channelz.d.ts39080644editdlrm
channelz.js229550644editdlrm
channelz.js.map172970644editdlrm
client-interceptors.d.ts47820644editdlrm
client-interceptors.js178680644editdlrm
client-interceptors.js.map106790644editdlrm
client.d.ts58280644editdlrm
client.js183280644editdlrm
client.js.map119090644editdlrm
compression-algorithms.d.ts940644editdlrm
compression-algorithms.js11580644editdlrm
compression-algorithms.js.map3110644editdlrm
compression-filter.d.ts12420644editdlrm
compression-filter.js103060644editdlrm
compression-filter.js.map62670644editdlrm
connectivity-state.d.ts1350644editdlrm
connectivity-state.js12640644editdlrm
connectivity-state.js.map3270644editdlrm
constants.d.ts9440644editdlrm
constants.js31060644editdlrm
constants.js.map9500644editdlrm
deadline-filter.d.ts8250644editdlrm
deadline-filter.js36280644editdlrm
deadline-filter.js.map25740644editdlrm
duration.d.ts2670644editdlrm
duration.js12530644editdlrm
duration.js.map6060644editdlrm
events.d.ts5210644editdlrm
events.js7110644editdlrm
events.js.map1310644editdlrm
experimental.d.ts12790644editdlrm
experimental.js35200644editdlrm
experimental.js.map7410644editdlrm
filter-stack.d.ts9760644editdlrm
filter-stack.js25890644editdlrm
filter-stack.js.map21240644editdlrm
filter.d.ts11060644editdlrm
filter.js11290644editdlrm
filter.js.map4850644editdlrm
http_proxy.d.ts6960644editdlrm
http_proxy.js93590644editdlrm
http_proxy.js.map60090644editdlrm
index.d.ts53350644editdlrm
index.js87670644editdlrm
index.js.map29450644editdlrm
load-balancer-child-handler.d.ts8150644editdlrm
load-balancer-child-handler.js52260644editdlrm
load-balancer-child-handler.js.map32310644editdlrm
load-balancer-outlier-detection.d.ts26630644editdlrm
load-balancer-outlier-detection.js227630644editdlrm
load-balancer-outlier-detection.js.map163500644editdlrm
load-balancer-pick-first.d.ts28280644editdlrm
load-balancer-pick-first.js173250644editdlrm
load-balancer-pick-first.js.map93590644editdlrm
load-balancer-round-robin.d.ts8040644editdlrm
load-balancer-round-robin.js78140644editdlrm
load-balancer-round-robin.js.map50110644editdlrm
load-balancer.d.ts44530644editdlrm
load-balancer.js48450644editdlrm
load-balancer.js.map23530644editdlrm
logging.d.ts5080644editdlrm
logging.js38790644editdlrm
logging.js.map26820644editdlrm
make-client.d.ts30100644editdlrm
make-client.js54980644editdlrm
make-client.js.map31120644editdlrm
max-message-size-filter.d.ts8320644editdlrm
max-message-size-filter.js33020644editdlrm
max-message-size-filter.js.map16750644editdlrm
metadata.d.ts31950644editdlrm
metadata.js89830644editdlrm
metadata.js.map57420644editdlrm
object-stream.d.ts16200644editdlrm
object-stream.js7180644editdlrm
object-stream.js.map1450644editdlrm
picker.d.ts33090644editdlrm
picker.js31240644editdlrm
picker.js.map12560644editdlrm
resolver-dns.d.ts2320644editdlrm
resolver-dns.js131130644editdlrm
resolver-dns.js.map73320644editdlrm
resolver-ip.d.ts390644editdlrm
resolver-ip.js38030644editdlrm
resolver-ip.js.map24770644editdlrm
resolver-uds.d.ts390644editdlrm
resolver-uds.js15170644editdlrm
resolver-uds.js.map8180644editdlrm
resolver.d.ts42850644editdlrm
resolver.js32160644editdlrm
resolver.js.map13840644editdlrm
resolving-load-balancer.d.ts27560644editdlrm
resolving-load-balancer.js119870644editdlrm
resolving-load-balancer.js.map62370644editdlrm
server-call.d.ts79410644editdlrm
server-call.js232440644editdlrm
server-call.js.map181680644editdlrm
server-credentials.d.ts4800644editdlrm
server-credentials.js28290644editdlrm
server-credentials.js.map17820644editdlrm
server.d.ts18400644editdlrm
server.js323200644editdlrm
server.js.map224670644editdlrm
service-config.d.ts15380644editdlrm
service-config.js108980644editdlrm
service-config.js.map66860644editdlrm
status-builder.d.ts6540644editdlrm
status-builder.js17670644editdlrm
status-builder.js.map9720644editdlrm
stream-decoder.d.ts3130644editdlrm
stream-decoder.js42670644editdlrm
stream-decoder.js.map27150644editdlrm
subchannel-address.d.ts9560644editdlrm
subchannel-address.js21000644editdlrm
subchannel-address.js.map10560644editdlrm
subchannel-interface.d.ts17170644editdlrm
subchannel-interface.js15990644editdlrm
subchannel-interface.js.map8840644editdlrm
subchannel-pool.d.ts14720644editdlrm
subchannel-pool.js55550644editdlrm
subchannel-pool.js.map24260644editdlrm
subchannel.d.ts70080644editdlrm
subchannel.js371880644editdlrm
subchannel.js.map208110644editdlrm
tls-helpers.d.ts1490644editdlrm
tls-helpers.js12720644editdlrm
tls-helpers.js.map5020644editdlrm
uri-parser.d.ts3570644editdlrm
uri-parser.js32740644editdlrm
uri-parser.js.map20100644editdlrm
Edit: /var/www/qr4y.com/server/delivery/node_modules/@grpc/grpc-js/build/src/metadata.js (8983B)
"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 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 (!(value instanceof Buffer)) { throw new Error("keys that end with '-bin' must have Buffer values"); } } else { if (value instanceof Buffer) { 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(); if (options === undefined) { this.options = {}; } else { 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 = {}; this.internalRepr.forEach((values, key) => { if (values.length > 0) { const v = values[0]; result[key] = v instanceof Buffer ? v.slice() : v; } }); return result; } /** * Clones the metadata object. * @return The newly cloned object. */ clone() { const newMetadata = new Metadata(this.options); const newInternalRepr = newMetadata.internalRepr; this.internalRepr.forEach((value, key) => { const clonedValue = value.map((v) => { if (v instanceof Buffer) { 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) { other.internalRepr.forEach((values, key) => { 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 = {}; this.internalRepr.forEach((values, key) => { // 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((value) => { if (value instanceof Buffer) { return value.toString('base64'); } else { return value; } }); }); 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.entries()) { 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(); Object.keys(headers).forEach((key) => { // Reserved headers (beginning with `:`) are not valid keys. if (key.charAt(0) === ':') { return; } 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}. ${error.message}. For more information see https://github.com/grpc/grpc-node/issues/1173`; logging_1.log(constants_1.LogVerbosity.ERROR, message); } }); return result; } } exports.Metadata = Metadata; //# sourceMappingURL=metadata.js.map