@psnext/slingcli 2.4.20260520-5 → 2.4.20260521-2
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/node_modules/@aws-sdk/core/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-websocket/package.json +6 -6
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +8 -8
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +213 -207
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/node_modules/@protobufjs/eventemitter/CHANGELOG.md +8 -0
- package/node_modules/@protobufjs/eventemitter/index.d.ts +10 -8
- package/node_modules/@protobufjs/eventemitter/index.js +17 -7
- package/node_modules/@protobufjs/eventemitter/package.json +2 -2
- package/node_modules/@protobufjs/eventemitter/tests/index.js +39 -3
- package/node_modules/@smithy/core/cbor.d.ts +1 -3
- package/node_modules/@smithy/core/cbor.js +0 -1
- package/node_modules/@smithy/core/checksum.d.ts +2 -2
- package/node_modules/@smithy/core/checksum.js +1 -1
- package/node_modules/@smithy/core/client.d.ts +1 -3
- package/node_modules/@smithy/core/client.js +0 -1
- package/node_modules/@smithy/core/config.d.ts +2 -2
- package/node_modules/@smithy/core/config.js +1 -1
- package/node_modules/@smithy/core/endpoints.d.ts +1 -3
- package/node_modules/@smithy/core/endpoints.js +0 -1
- package/node_modules/@smithy/core/event-streams.d.ts +1 -3
- package/node_modules/@smithy/core/event-streams.js +0 -1
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/core/protocols.d.ts +1 -3
- package/node_modules/@smithy/core/protocols.js +0 -1
- package/node_modules/@smithy/core/retry.d.ts +2 -2
- package/node_modules/@smithy/core/retry.js +1 -1
- package/node_modules/@smithy/core/schema.d.ts +1 -3
- package/node_modules/@smithy/core/schema.js +0 -1
- package/node_modules/@smithy/core/serde.d.ts +1 -3
- package/node_modules/@smithy/core/serde.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/protobufjs/dist/light/protobuf.js +127 -69
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +62 -25
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.js +148 -76
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/ext/descriptor/index.js +7 -2
- package/node_modules/protobufjs/index.d.ts +12 -3
- package/node_modules/protobufjs/package.json +2 -2
- package/node_modules/protobufjs/src/converter.js +8 -5
- package/node_modules/protobufjs/src/encoder.js +8 -5
- package/node_modules/protobufjs/src/enum.js +2 -2
- package/node_modules/protobufjs/src/field.js +1 -1
- package/node_modules/protobufjs/src/namespace.js +2 -0
- package/node_modules/protobufjs/src/object.js +6 -6
- package/node_modules/protobufjs/src/parse.js +19 -5
- package/node_modules/protobufjs/src/root.js +14 -8
- package/node_modules/protobufjs/src/type.js +8 -5
- package/node_modules/protobufjs/src/util/minimal.js +32 -7
- package/node_modules/protobufjs/src/util/patterns.js +0 -1
- package/node_modules/protobufjs/src/util.js +4 -3
- package/node_modules/protobufjs/src/wrappers.js +11 -7
- package/node_modules/protobufjs/src/writer.js +11 -9
- package/node_modules/semver/classes/range.js +7 -0
- package/node_modules/semver/package.json +1 -1
- package/node_modules/semver/ranges/subset.js +2 -2
- package/package.json +2 -2
- package/slingshot/index.js +234 -234
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* protobuf.js v7.6.
|
|
3
|
-
* compiled
|
|
2
|
+
* protobuf.js v7.6.1 (c) 2016, daniel wirtz
|
|
3
|
+
* compiled fri, 22 may 2026 02:52:08 utc
|
|
4
4
|
* licensed under the bsd-3-clause license
|
|
5
5
|
* see: https://github.com/dcodeio/protobuf.js for details
|
|
6
6
|
*/
|
|
@@ -363,15 +363,23 @@ function EventEmitter() {
|
|
|
363
363
|
* @type {Object.<string,*>}
|
|
364
364
|
* @private
|
|
365
365
|
*/
|
|
366
|
-
this._listeners =
|
|
366
|
+
this._listeners = Object.create(null);
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
+
/**
|
|
370
|
+
* Event listener as used by {@link util.EventEmitter}.
|
|
371
|
+
* @typedef EventEmitterListener
|
|
372
|
+
* @type {function}
|
|
373
|
+
* @param {...*} args Arguments
|
|
374
|
+
* @returns {undefined}
|
|
375
|
+
*/
|
|
376
|
+
|
|
369
377
|
/**
|
|
370
378
|
* Registers an event listener.
|
|
371
379
|
* @param {string} evt Event name
|
|
372
|
-
* @param {
|
|
380
|
+
* @param {EventEmitterListener} fn Listener
|
|
373
381
|
* @param {*} [ctx] Listener context
|
|
374
|
-
* @returns {
|
|
382
|
+
* @returns {this} `this`
|
|
375
383
|
*/
|
|
376
384
|
EventEmitter.prototype.on = function on(evt, fn, ctx) {
|
|
377
385
|
(this._listeners[evt] || (this._listeners[evt] = [])).push({
|
|
@@ -384,17 +392,19 @@ EventEmitter.prototype.on = function on(evt, fn, ctx) {
|
|
|
384
392
|
/**
|
|
385
393
|
* Removes an event listener or any matching listeners if arguments are omitted.
|
|
386
394
|
* @param {string} [evt] Event name. Removes all listeners if omitted.
|
|
387
|
-
* @param {
|
|
388
|
-
* @returns {
|
|
395
|
+
* @param {EventEmitterListener} [fn] Listener to remove. Removes all listeners of `evt` if omitted.
|
|
396
|
+
* @returns {this} `this`
|
|
389
397
|
*/
|
|
390
398
|
EventEmitter.prototype.off = function off(evt, fn) {
|
|
391
399
|
if (evt === undefined)
|
|
392
|
-
this._listeners =
|
|
400
|
+
this._listeners = Object.create(null);
|
|
393
401
|
else {
|
|
394
402
|
if (fn === undefined)
|
|
395
403
|
this._listeners[evt] = [];
|
|
396
404
|
else {
|
|
397
405
|
var listeners = this._listeners[evt];
|
|
406
|
+
if (!listeners)
|
|
407
|
+
return this;
|
|
398
408
|
for (var i = 0; i < listeners.length;)
|
|
399
409
|
if (listeners[i].fn === fn)
|
|
400
410
|
listeners.splice(i, 1);
|
|
@@ -409,7 +419,7 @@ EventEmitter.prototype.off = function off(evt, fn) {
|
|
|
409
419
|
* Emits an event by calling its listeners with the specified arguments.
|
|
410
420
|
* @param {string} evt Event name
|
|
411
421
|
* @param {...*} args Arguments
|
|
412
|
-
* @returns {
|
|
422
|
+
* @returns {this} `this`
|
|
413
423
|
*/
|
|
414
424
|
EventEmitter.prototype.emit = function emit(evt) {
|
|
415
425
|
var listeners = this._listeners[evt];
|
|
@@ -1618,14 +1628,14 @@ function genValuePartial_fromObject(gen, field, fieldIndex, prop) {
|
|
|
1618
1628
|
("m%s=d%s|0", prop, prop);
|
|
1619
1629
|
break;
|
|
1620
1630
|
case "uint64":
|
|
1631
|
+
case "fixed64":
|
|
1621
1632
|
isUnsigned = true;
|
|
1622
1633
|
// eslint-disable-next-line no-fallthrough
|
|
1623
1634
|
case "int64":
|
|
1624
1635
|
case "sint64":
|
|
1625
|
-
case "fixed64":
|
|
1626
1636
|
case "sfixed64": gen
|
|
1627
1637
|
("if(util.Long)")
|
|
1628
|
-
("
|
|
1638
|
+
("m%s=util.Long.fromValue(d%s,%j)", prop, prop, isUnsigned)
|
|
1629
1639
|
("else if(typeof d%s===\"string\")", prop)
|
|
1630
1640
|
("m%s=parseInt(d%s,10)", prop, prop)
|
|
1631
1641
|
("else if(typeof d%s===\"number\")", prop)
|
|
@@ -1729,7 +1739,7 @@ function genValuePartial_toObject(gen, field, fieldIndex, prop) {
|
|
|
1729
1739
|
if (field.resolvedType instanceof Enum) gen
|
|
1730
1740
|
("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s", prop, fieldIndex, prop, prop, fieldIndex, prop, prop);
|
|
1731
1741
|
else gen
|
|
1732
|
-
("d%s=types[%i].toObject(m%s,o)", prop, fieldIndex, prop);
|
|
1742
|
+
("d%s=types[%i].toObject(m%s,o,q+1)", prop, fieldIndex, prop);
|
|
1733
1743
|
} else {
|
|
1734
1744
|
var isUnsigned = false;
|
|
1735
1745
|
switch (field.type) {
|
|
@@ -1738,11 +1748,11 @@ function genValuePartial_toObject(gen, field, fieldIndex, prop) {
|
|
|
1738
1748
|
("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", prop, prop, prop, prop);
|
|
1739
1749
|
break;
|
|
1740
1750
|
case "uint64":
|
|
1751
|
+
case "fixed64":
|
|
1741
1752
|
isUnsigned = true;
|
|
1742
1753
|
// eslint-disable-next-line no-fallthrough
|
|
1743
1754
|
case "int64":
|
|
1744
1755
|
case "sint64":
|
|
1745
|
-
case "fixed64":
|
|
1746
1756
|
case "sfixed64": gen
|
|
1747
1757
|
("if(typeof BigInt!==\"undefined\"&&o.longs===BigInt)")
|
|
1748
1758
|
("d%s=typeof m%s===\"number\"?BigInt(m%s):util.Long.fromBits(m%s.low>>>0,m%s.high>>>0,%j).toBigInt()", prop, prop, prop, prop, prop, isUnsigned)
|
|
@@ -1773,9 +1783,12 @@ converter.toObject = function toObject(mtype) {
|
|
|
1773
1783
|
var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);
|
|
1774
1784
|
if (!fields.length)
|
|
1775
1785
|
return util.codegen()("return {}");
|
|
1776
|
-
var gen = util.codegen(["m", "o"], mtype.name + "$toObject")
|
|
1786
|
+
var gen = util.codegen(["m", "o", "q"], mtype.name + "$toObject")
|
|
1777
1787
|
("if(!o)")
|
|
1778
1788
|
("o={}")
|
|
1789
|
+
("if(q===undefined)q=0")
|
|
1790
|
+
("if(q>util.recursionLimit)")
|
|
1791
|
+
("throw Error(\"max depth exceeded\")")
|
|
1779
1792
|
("var d={}");
|
|
1780
1793
|
|
|
1781
1794
|
var repeatedFields = [],
|
|
@@ -2024,8 +2037,8 @@ var Enum = require(17),
|
|
|
2024
2037
|
*/
|
|
2025
2038
|
function genTypePartial(gen, field, fieldIndex, ref) {
|
|
2026
2039
|
return field.delimited
|
|
2027
|
-
? gen("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0)
|
|
2028
|
-
: gen("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0);
|
|
2040
|
+
? gen("types[%i].encode(%s,w.uint32(%i),q+1).uint32(%i)", fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0)
|
|
2041
|
+
: gen("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0);
|
|
2029
2042
|
}
|
|
2030
2043
|
|
|
2031
2044
|
/**
|
|
@@ -2035,9 +2048,12 @@ function genTypePartial(gen, field, fieldIndex, ref) {
|
|
|
2035
2048
|
*/
|
|
2036
2049
|
function encoder(mtype) {
|
|
2037
2050
|
/* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */
|
|
2038
|
-
var gen = util.codegen(["m", "w"], mtype.name + "$encode")
|
|
2051
|
+
var gen = util.codegen(["m", "w", "q"], mtype.name + "$encode")
|
|
2039
2052
|
("if(!w)")
|
|
2040
|
-
("w=Writer.create()")
|
|
2053
|
+
("w=Writer.create()")
|
|
2054
|
+
("if(q===undefined)q=0")
|
|
2055
|
+
("if(q>util.recursionLimit)")
|
|
2056
|
+
("throw Error(\"max depth exceeded\")");
|
|
2041
2057
|
|
|
2042
2058
|
var i, ref;
|
|
2043
2059
|
|
|
@@ -2058,7 +2074,7 @@ function encoder(mtype) {
|
|
|
2058
2074
|
("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", ref)
|
|
2059
2075
|
("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (field.id << 3 | 2) >>> 0, 8 | types.mapKey[field.keyType], field.keyType);
|
|
2060
2076
|
if (wireType === undefined) gen
|
|
2061
|
-
("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", index, ref); // can't be groups
|
|
2077
|
+
("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()", index, ref); // can't be groups
|
|
2062
2078
|
else gen
|
|
2063
2079
|
(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | wireType, type, ref);
|
|
2064
2080
|
gen
|
|
@@ -2196,8 +2212,8 @@ Enum.prototype._resolveFeatures = function _resolveFeatures(edition) {
|
|
|
2196
2212
|
ReflectionObject.prototype._resolveFeatures.call(this, edition);
|
|
2197
2213
|
|
|
2198
2214
|
Object.keys(this.values).forEach(key => {
|
|
2199
|
-
var parentFeaturesCopy =
|
|
2200
|
-
this._valuesFeatures[key] =
|
|
2215
|
+
var parentFeaturesCopy = util.merge({}, this._features);
|
|
2216
|
+
this._valuesFeatures[key] = util.merge(parentFeaturesCopy, this.valuesOptions && this.valuesOptions[key] && this.valuesOptions[key].features || {});
|
|
2201
2217
|
});
|
|
2202
2218
|
|
|
2203
2219
|
return this;
|
|
@@ -2666,7 +2682,7 @@ Field.prototype.resolve = function resolve() {
|
|
|
2666
2682
|
|
|
2667
2683
|
// convert to internal data type if necesssary
|
|
2668
2684
|
if (this.long) {
|
|
2669
|
-
this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.
|
|
2685
|
+
this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type === "uint64" || this.type === "fixed64");
|
|
2670
2686
|
|
|
2671
2687
|
/* istanbul ignore else */
|
|
2672
2688
|
if (Object.freeze)
|
|
@@ -3723,6 +3739,8 @@ Namespace.prototype.define = function define(path, json) {
|
|
|
3723
3739
|
throw TypeError("illegal path");
|
|
3724
3740
|
if (path && path.length && path[0] === "")
|
|
3725
3741
|
throw Error("path must be relative");
|
|
3742
|
+
if (path.length > util.recursionLimit)
|
|
3743
|
+
throw Error("max depth exceeded");
|
|
3726
3744
|
|
|
3727
3745
|
var ptr = this;
|
|
3728
3746
|
while (path.length > 0) {
|
|
@@ -4157,7 +4175,7 @@ ReflectionObject.prototype._resolveFeatures = function _resolveFeatures(edition)
|
|
|
4157
4175
|
throw new Error("Unknown edition for " + this.fullName);
|
|
4158
4176
|
}
|
|
4159
4177
|
|
|
4160
|
-
var protoFeatures =
|
|
4178
|
+
var protoFeatures = util.merge({}, this.options && this.options.features,
|
|
4161
4179
|
this._inferLegacyProtoFeatures(edition));
|
|
4162
4180
|
|
|
4163
4181
|
if (this._edition) {
|
|
@@ -4172,7 +4190,7 @@ ReflectionObject.prototype._resolveFeatures = function _resolveFeatures(edition)
|
|
|
4172
4190
|
} else {
|
|
4173
4191
|
throw new Error("Unknown edition: " + edition);
|
|
4174
4192
|
}
|
|
4175
|
-
this._features =
|
|
4193
|
+
this._features = util.merge(defaults, protoFeatures);
|
|
4176
4194
|
this._featuresResolved = true;
|
|
4177
4195
|
return;
|
|
4178
4196
|
}
|
|
@@ -4181,13 +4199,13 @@ ReflectionObject.prototype._resolveFeatures = function _resolveFeatures(edition)
|
|
|
4181
4199
|
// special-case it
|
|
4182
4200
|
/* istanbul ignore else */
|
|
4183
4201
|
if (this.partOf instanceof OneOf) {
|
|
4184
|
-
var lexicalParentFeaturesCopy =
|
|
4185
|
-
this._features =
|
|
4202
|
+
var lexicalParentFeaturesCopy = util.merge({}, this.partOf._features);
|
|
4203
|
+
this._features = util.merge(lexicalParentFeaturesCopy, protoFeatures);
|
|
4186
4204
|
} else if (this.declaringField) {
|
|
4187
4205
|
// Skip feature resolution of sister fields.
|
|
4188
4206
|
} else if (this.parent) {
|
|
4189
|
-
var parentFeaturesCopy =
|
|
4190
|
-
this._features =
|
|
4207
|
+
var parentFeaturesCopy = util.merge({}, this.parent._features);
|
|
4208
|
+
this._features = util.merge(parentFeaturesCopy, protoFeatures);
|
|
4191
4209
|
} else {
|
|
4192
4210
|
throw new Error("Unable to find a parent for " + this.fullName);
|
|
4193
4211
|
}
|
|
@@ -4854,7 +4872,9 @@ function parse(source, root, options) {
|
|
|
4854
4872
|
|
|
4855
4873
|
|
|
4856
4874
|
function parseCommon(parent, token, depth) {
|
|
4857
|
-
depth
|
|
4875
|
+
if (depth === undefined)
|
|
4876
|
+
depth = 0;
|
|
4877
|
+
// depth is checked by dispatched functions
|
|
4858
4878
|
switch (token) {
|
|
4859
4879
|
|
|
4860
4880
|
case "option":
|
|
@@ -4904,7 +4924,10 @@ function parse(source, root, options) {
|
|
|
4904
4924
|
}
|
|
4905
4925
|
|
|
4906
4926
|
function parseType(parent, token, depth) {
|
|
4907
|
-
depth
|
|
4927
|
+
if (depth === undefined)
|
|
4928
|
+
depth = 0;
|
|
4929
|
+
if (depth > util.nestingLimit)
|
|
4930
|
+
throw Error("max depth exceeded");
|
|
4908
4931
|
|
|
4909
4932
|
/* istanbul ignore if */
|
|
4910
4933
|
if (!nameRe.test(token = next()))
|
|
@@ -5030,7 +5053,10 @@ function parse(source, root, options) {
|
|
|
5030
5053
|
}
|
|
5031
5054
|
|
|
5032
5055
|
function parseGroup(parent, rule, depth) {
|
|
5033
|
-
depth
|
|
5056
|
+
if (depth === undefined)
|
|
5057
|
+
depth = 0;
|
|
5058
|
+
if (depth > util.nestingLimit)
|
|
5059
|
+
throw Error("max depth exceeded");
|
|
5034
5060
|
if (edition >= 2023) {
|
|
5035
5061
|
throw illegal("group");
|
|
5036
5062
|
}
|
|
@@ -5249,7 +5275,10 @@ function parse(source, root, options) {
|
|
|
5249
5275
|
}
|
|
5250
5276
|
|
|
5251
5277
|
function parseOptionValue(parent, name, depth) {
|
|
5252
|
-
depth
|
|
5278
|
+
if (depth === undefined)
|
|
5279
|
+
depth = 0;
|
|
5280
|
+
if (depth > util.recursionLimit)
|
|
5281
|
+
throw Error("max depth exceeded");
|
|
5253
5282
|
// { a: "foo" b { c: "bar" } }
|
|
5254
5283
|
if (skip("{", true)) {
|
|
5255
5284
|
var objectResult = {};
|
|
@@ -5338,7 +5367,10 @@ function parse(source, root, options) {
|
|
|
5338
5367
|
}
|
|
5339
5368
|
|
|
5340
5369
|
function parseService(parent, token, depth) {
|
|
5341
|
-
depth
|
|
5370
|
+
if (depth === undefined)
|
|
5371
|
+
depth = 0;
|
|
5372
|
+
if (depth > util.recursionLimit)
|
|
5373
|
+
throw Error("max depth exceeded");
|
|
5342
5374
|
|
|
5343
5375
|
/* istanbul ignore if */
|
|
5344
5376
|
if (!nameRe.test(token = next()))
|
|
@@ -6148,8 +6180,12 @@ Root.prototype.load = function load(filename, options, callback) {
|
|
|
6148
6180
|
}
|
|
6149
6181
|
|
|
6150
6182
|
// Processes a single file
|
|
6151
|
-
function process(filename, source) {
|
|
6183
|
+
function process(filename, source, depth) {
|
|
6184
|
+
if (depth === undefined)
|
|
6185
|
+
depth = 0;
|
|
6152
6186
|
try {
|
|
6187
|
+
if (depth > util.recursionLimit)
|
|
6188
|
+
throw Error("max depth exceeded");
|
|
6153
6189
|
if (util.isString(source) && source.charAt(0) === "{")
|
|
6154
6190
|
source = JSON.parse(source);
|
|
6155
6191
|
if (!util.isString(source))
|
|
@@ -6162,11 +6198,11 @@ Root.prototype.load = function load(filename, options, callback) {
|
|
|
6162
6198
|
if (parsed.imports)
|
|
6163
6199
|
for (; i < parsed.imports.length; ++i)
|
|
6164
6200
|
if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i]))
|
|
6165
|
-
fetch(resolved);
|
|
6201
|
+
fetch(resolved, false, depth + 1);
|
|
6166
6202
|
if (parsed.weakImports)
|
|
6167
6203
|
for (i = 0; i < parsed.weakImports.length; ++i)
|
|
6168
6204
|
if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i]))
|
|
6169
|
-
fetch(resolved, true);
|
|
6205
|
+
fetch(resolved, true, depth + 1);
|
|
6170
6206
|
}
|
|
6171
6207
|
} catch (err) {
|
|
6172
6208
|
finish(err);
|
|
@@ -6177,7 +6213,9 @@ Root.prototype.load = function load(filename, options, callback) {
|
|
|
6177
6213
|
}
|
|
6178
6214
|
|
|
6179
6215
|
// Fetches a single file
|
|
6180
|
-
function fetch(filename, weak) {
|
|
6216
|
+
function fetch(filename, weak, depth) {
|
|
6217
|
+
if (depth === undefined)
|
|
6218
|
+
depth = 0;
|
|
6181
6219
|
filename = getBundledFileName(filename) || filename;
|
|
6182
6220
|
|
|
6183
6221
|
// Skip if already loaded / attempted
|
|
@@ -6189,12 +6227,12 @@ Root.prototype.load = function load(filename, options, callback) {
|
|
|
6189
6227
|
// Shortcut bundled definitions
|
|
6190
6228
|
if (filename in common) {
|
|
6191
6229
|
if (sync) {
|
|
6192
|
-
process(filename, common[filename]);
|
|
6230
|
+
process(filename, common[filename], depth);
|
|
6193
6231
|
} else {
|
|
6194
6232
|
++queued;
|
|
6195
6233
|
setTimeout(function() {
|
|
6196
6234
|
--queued;
|
|
6197
|
-
process(filename, common[filename]);
|
|
6235
|
+
process(filename, common[filename], depth);
|
|
6198
6236
|
});
|
|
6199
6237
|
}
|
|
6200
6238
|
return;
|
|
@@ -6210,7 +6248,7 @@ Root.prototype.load = function load(filename, options, callback) {
|
|
|
6210
6248
|
finish(err);
|
|
6211
6249
|
return;
|
|
6212
6250
|
}
|
|
6213
|
-
process(filename, source);
|
|
6251
|
+
process(filename, source, depth);
|
|
6214
6252
|
} else {
|
|
6215
6253
|
++queued;
|
|
6216
6254
|
self.fetch(filename, function(err, source) {
|
|
@@ -6227,7 +6265,7 @@ Root.prototype.load = function load(filename, options, callback) {
|
|
|
6227
6265
|
finish(null, self);
|
|
6228
6266
|
return;
|
|
6229
6267
|
}
|
|
6230
|
-
process(filename, source);
|
|
6268
|
+
process(filename, source, depth);
|
|
6231
6269
|
});
|
|
6232
6270
|
}
|
|
6233
6271
|
}
|
|
@@ -7472,7 +7510,10 @@ function clearCache(type) {
|
|
|
7472
7510
|
* @returns {Type} Created message type
|
|
7473
7511
|
*/
|
|
7474
7512
|
Type.fromJSON = function fromJSON(name, json, depth) {
|
|
7475
|
-
depth
|
|
7513
|
+
if (depth === undefined)
|
|
7514
|
+
depth = 0;
|
|
7515
|
+
if (depth > util.nestingLimit)
|
|
7516
|
+
throw Error("max depth exceeded");
|
|
7476
7517
|
var type = new Type(name, json.options);
|
|
7477
7518
|
type.extensions = json.extensions;
|
|
7478
7519
|
type.reserved = json.reserved;
|
|
@@ -7750,8 +7791,8 @@ Type.prototype.setup = function setup() {
|
|
|
7750
7791
|
* @param {Writer} [writer] Writer to encode to
|
|
7751
7792
|
* @returns {Writer} writer
|
|
7752
7793
|
*/
|
|
7753
|
-
Type.prototype.encode = function encode_setup(message, writer) {
|
|
7754
|
-
return this.setup().encode(
|
|
7794
|
+
Type.prototype.encode = function encode_setup(message, writer) { // eslint-disable-line no-unused-vars
|
|
7795
|
+
return this.setup().encode.apply(this, arguments); // overrides this method
|
|
7755
7796
|
};
|
|
7756
7797
|
|
|
7757
7798
|
/**
|
|
@@ -7836,8 +7877,8 @@ Type.prototype.fromObject = function fromObject(object, depth) {
|
|
|
7836
7877
|
* @param {IConversionOptions} [options] Conversion options
|
|
7837
7878
|
* @returns {Object.<string,*>} Plain object
|
|
7838
7879
|
*/
|
|
7839
|
-
Type.prototype.toObject = function toObject(message, options) {
|
|
7840
|
-
return this.setup().toObject(
|
|
7880
|
+
Type.prototype.toObject = function toObject(message, options) { // eslint-disable-line no-unused-vars
|
|
7881
|
+
return this.setup().toObject.apply(this, arguments);
|
|
7841
7882
|
};
|
|
7842
7883
|
|
|
7843
7884
|
/**
|
|
@@ -8078,8 +8119,7 @@ util.fetch = require(5);
|
|
|
8078
8119
|
util.path = require(9);
|
|
8079
8120
|
util.patterns = require(43);
|
|
8080
8121
|
|
|
8081
|
-
var reservedRe = util.patterns.reservedRe
|
|
8082
|
-
unsafePropertyRe = util.patterns.unsafePropertyRe;
|
|
8122
|
+
var reservedRe = util.patterns.reservedRe;
|
|
8083
8123
|
|
|
8084
8124
|
/**
|
|
8085
8125
|
* Node's fs module if available.
|
|
@@ -8254,7 +8294,7 @@ util.decorateEnum = function decorateEnum(object) {
|
|
|
8254
8294
|
util.setProperty = function setProperty(dst, path, value, ifNotSet) {
|
|
8255
8295
|
function setProp(dst, path, value) {
|
|
8256
8296
|
var part = path.shift();
|
|
8257
|
-
if (
|
|
8297
|
+
if (util.isUnsafeProperty(part))
|
|
8258
8298
|
return dst;
|
|
8259
8299
|
if (path.length > 0) {
|
|
8260
8300
|
dst[part] = setProp(dst[part] || {}, path, value);
|
|
@@ -8275,6 +8315,8 @@ util.setProperty = function setProperty(dst, path, value, ifNotSet) {
|
|
|
8275
8315
|
throw TypeError("path must be specified");
|
|
8276
8316
|
|
|
8277
8317
|
path = path.split(".");
|
|
8318
|
+
if (path.length > util.recursionLimit)
|
|
8319
|
+
throw Error("max depth exceeded");
|
|
8278
8320
|
return setProp(dst, path, value);
|
|
8279
8321
|
};
|
|
8280
8322
|
|
|
@@ -8533,6 +8575,18 @@ util.pool = require(10);
|
|
|
8533
8575
|
// utility to work with the low and high bits of a 64 bit value
|
|
8534
8576
|
util.LongBits = require(41);
|
|
8535
8577
|
|
|
8578
|
+
/**
|
|
8579
|
+
* Tests if the specified key can affect object prototypes.
|
|
8580
|
+
* @memberof util
|
|
8581
|
+
* @param {string} key Key to test
|
|
8582
|
+
* @returns {boolean} `true` if the key is unsafe
|
|
8583
|
+
*/
|
|
8584
|
+
function isUnsafeProperty(key) {
|
|
8585
|
+
return key === "__proto__" || key === "prototype" || key === "constructor";
|
|
8586
|
+
}
|
|
8587
|
+
|
|
8588
|
+
util.isUnsafeProperty = isUnsafeProperty;
|
|
8589
|
+
|
|
8536
8590
|
/**
|
|
8537
8591
|
* Whether running within node or not.
|
|
8538
8592
|
* @memberof util
|
|
@@ -8746,26 +8800,39 @@ util.longFromHash = function longFromHash(hash, unsigned) {
|
|
|
8746
8800
|
* Merges the properties of the source object into the destination object.
|
|
8747
8801
|
* @memberof util
|
|
8748
8802
|
* @param {Object.<string,*>} dst Destination object
|
|
8749
|
-
* @param {Object.<string
|
|
8750
|
-
* @param {boolean} [ifNotSet=false] Merges only if the key is not already set
|
|
8803
|
+
* @param {...(Object.<string,*>|boolean)} src Source objects, optionally followed by an `ifNotSet` flag
|
|
8751
8804
|
* @returns {Object.<string,*>} Destination object
|
|
8752
8805
|
*/
|
|
8753
|
-
function merge(dst
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8806
|
+
function merge(dst) { // used by converters
|
|
8807
|
+
var ifNotSet = typeof arguments[arguments.length - 1] === "boolean",
|
|
8808
|
+
limit = ifNotSet ? arguments.length - 1 : arguments.length;
|
|
8809
|
+
ifNotSet = ifNotSet && arguments[arguments.length - 1];
|
|
8810
|
+
for (var a = 1; a < limit; ++a) {
|
|
8811
|
+
var src = arguments[a];
|
|
8812
|
+
if (!src)
|
|
8813
|
+
continue;
|
|
8814
|
+
for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
|
|
8815
|
+
if (!isUnsafeProperty(keys[i]) && (dst[keys[i]] === undefined || !ifNotSet))
|
|
8757
8816
|
dst[keys[i]] = src[keys[i]];
|
|
8817
|
+
}
|
|
8758
8818
|
return dst;
|
|
8759
8819
|
}
|
|
8760
8820
|
|
|
8761
8821
|
util.merge = merge;
|
|
8762
8822
|
|
|
8823
|
+
/**
|
|
8824
|
+
* Schema declaration nesting limit.
|
|
8825
|
+
* @memberof util
|
|
8826
|
+
* @type {number}
|
|
8827
|
+
*/
|
|
8828
|
+
util.nestingLimit = 32; // protoc: MaxMessageDeclarationNestingDepth
|
|
8829
|
+
|
|
8763
8830
|
/**
|
|
8764
8831
|
* Recursion limit.
|
|
8765
8832
|
* @memberof util
|
|
8766
8833
|
* @type {number}
|
|
8767
8834
|
*/
|
|
8768
|
-
util.recursionLimit = 100;
|
|
8835
|
+
util.recursionLimit = 100; // protoc: CodedInputStream::default_recursion_limit_
|
|
8769
8836
|
|
|
8770
8837
|
/**
|
|
8771
8838
|
* Makes a property safe for assignment as an own property.
|
|
@@ -8984,7 +9051,6 @@ var patterns = exports;
|
|
|
8984
9051
|
patterns.numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;
|
|
8985
9052
|
patterns.typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;
|
|
8986
9053
|
patterns.reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;
|
|
8987
|
-
patterns.unsafePropertyRe = /^(?:__proto__|prototype|constructor)$/;
|
|
8988
9054
|
|
|
8989
9055
|
},{}],44:[function(require,module,exports){
|
|
8990
9056
|
"use strict";
|
|
@@ -9178,7 +9244,8 @@ function verifier(mtype) {
|
|
|
9178
9244
|
*/
|
|
9179
9245
|
var wrappers = exports;
|
|
9180
9246
|
|
|
9181
|
-
var Message = require(23)
|
|
9247
|
+
var Message = require(23),
|
|
9248
|
+
util = require(42);
|
|
9182
9249
|
|
|
9183
9250
|
/**
|
|
9184
9251
|
* From object converter part of an {@link IWrapper}.
|
|
@@ -9225,10 +9292,9 @@ wrappers[".google.protobuf.Any"] = {
|
|
|
9225
9292
|
if (type_url.indexOf("/") === -1) {
|
|
9226
9293
|
type_url = "/" + type_url;
|
|
9227
9294
|
}
|
|
9228
|
-
var nextDepth = depth === undefined ? 1 : depth + 1;
|
|
9229
9295
|
return this.create({
|
|
9230
9296
|
type_url: type_url,
|
|
9231
|
-
value: type.encode(type.fromObject(object,
|
|
9297
|
+
value: type.encode(type.fromObject(object, depth === undefined ? 1 : depth + 1)).finish()
|
|
9232
9298
|
});
|
|
9233
9299
|
}
|
|
9234
9300
|
}
|
|
@@ -9236,7 +9302,11 @@ wrappers[".google.protobuf.Any"] = {
|
|
|
9236
9302
|
return this.fromObject(object, depth);
|
|
9237
9303
|
},
|
|
9238
9304
|
|
|
9239
|
-
toObject: function(message, options) {
|
|
9305
|
+
toObject: function(message, options, depth) {
|
|
9306
|
+
if (depth === undefined)
|
|
9307
|
+
depth = 0;
|
|
9308
|
+
if (depth > util.recursionLimit)
|
|
9309
|
+
throw Error("max depth exceeded");
|
|
9240
9310
|
|
|
9241
9311
|
// Default prefix
|
|
9242
9312
|
var googleApi = "type.googleapis.com/";
|
|
@@ -9252,12 +9322,12 @@ wrappers[".google.protobuf.Any"] = {
|
|
|
9252
9322
|
var type = this.lookup(name);
|
|
9253
9323
|
/* istanbul ignore else */
|
|
9254
9324
|
if (type)
|
|
9255
|
-
message = type.decode(message.value);
|
|
9325
|
+
message = type.decode(message.value, undefined, undefined, depth + 1);
|
|
9256
9326
|
}
|
|
9257
9327
|
|
|
9258
9328
|
// wrap value if unmapped
|
|
9259
9329
|
if (!(message instanceof this.ctor) && message instanceof Message) {
|
|
9260
|
-
var object = message.$type.toObject(message, options);
|
|
9330
|
+
var object = message.$type.toObject(message, options, depth + 1);
|
|
9261
9331
|
var messageName = message.$type.fullName[0] === "." ?
|
|
9262
9332
|
message.$type.fullName.slice(1) : message.$type.fullName;
|
|
9263
9333
|
// Default to type.googleapis.com prefix if no prefix is used
|
|
@@ -9269,11 +9339,11 @@ wrappers[".google.protobuf.Any"] = {
|
|
|
9269
9339
|
return object;
|
|
9270
9340
|
}
|
|
9271
9341
|
|
|
9272
|
-
return this.toObject(message, options);
|
|
9342
|
+
return this.toObject(message, options, depth);
|
|
9273
9343
|
}
|
|
9274
9344
|
};
|
|
9275
9345
|
|
|
9276
|
-
},{"23":23}],46:[function(require,module,exports){
|
|
9346
|
+
},{"23":23,"42":42}],46:[function(require,module,exports){
|
|
9277
9347
|
"use strict";
|
|
9278
9348
|
module.exports = Writer;
|
|
9279
9349
|
|
|
@@ -9501,7 +9571,7 @@ Writer.prototype.uint32 = function write_uint32(value) {
|
|
|
9501
9571
|
* @returns {Writer} `this`
|
|
9502
9572
|
*/
|
|
9503
9573
|
Writer.prototype.int32 = function write_int32(value) {
|
|
9504
|
-
return value < 0
|
|
9574
|
+
return (value |= 0) < 0
|
|
9505
9575
|
? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec
|
|
9506
9576
|
: this.uint32(value);
|
|
9507
9577
|
};
|
|
@@ -9516,16 +9586,18 @@ Writer.prototype.sint32 = function write_sint32(value) {
|
|
|
9516
9586
|
};
|
|
9517
9587
|
|
|
9518
9588
|
function writeVarint64(val, buf, pos) {
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9589
|
+
var lo = val.lo,
|
|
9590
|
+
hi = val.hi;
|
|
9591
|
+
while (hi) {
|
|
9592
|
+
buf[pos++] = lo & 127 | 128;
|
|
9593
|
+
lo = (lo >>> 7 | hi << 25) >>> 0;
|
|
9594
|
+
hi >>>= 7;
|
|
9595
|
+
}
|
|
9596
|
+
while (lo > 127) {
|
|
9597
|
+
buf[pos++] = lo & 127 | 128;
|
|
9598
|
+
lo = lo >>> 7;
|
|
9599
|
+
}
|
|
9600
|
+
buf[pos++] = lo;
|
|
9529
9601
|
}
|
|
9530
9602
|
|
|
9531
9603
|
/**
|