agenter 0.0.2 → 0.0.4
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/agenter.js +1058 -1015
- package/package.json +1 -1
package/dist/agenter.js
CHANGED
|
@@ -48,6 +48,1002 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
48
48
|
var __promiseAll = (args) => Promise.all(args);
|
|
49
49
|
var __require = import.meta.require;
|
|
50
50
|
|
|
51
|
+
// node_modules/.bun/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js
|
|
52
|
+
var require_Reflect = __commonJS(() => {
|
|
53
|
+
/*! *****************************************************************************
|
|
54
|
+
Copyright (C) Microsoft. All rights reserved.
|
|
55
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
56
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
57
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
58
|
+
|
|
59
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
60
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
61
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
62
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
63
|
+
|
|
64
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
65
|
+
and limitations under the License.
|
|
66
|
+
***************************************************************************** */
|
|
67
|
+
var Reflect2;
|
|
68
|
+
(function(Reflect3) {
|
|
69
|
+
(function(factory) {
|
|
70
|
+
var root = typeof globalThis === "object" ? globalThis : typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : sloppyModeThis();
|
|
71
|
+
var exporter = makeExporter(Reflect3);
|
|
72
|
+
if (typeof root.Reflect !== "undefined") {
|
|
73
|
+
exporter = makeExporter(root.Reflect, exporter);
|
|
74
|
+
}
|
|
75
|
+
factory(exporter, root);
|
|
76
|
+
if (typeof root.Reflect === "undefined") {
|
|
77
|
+
root.Reflect = Reflect3;
|
|
78
|
+
}
|
|
79
|
+
function makeExporter(target, previous) {
|
|
80
|
+
return function(key, value) {
|
|
81
|
+
Object.defineProperty(target, key, { configurable: true, writable: true, value });
|
|
82
|
+
if (previous)
|
|
83
|
+
previous(key, value);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function functionThis() {
|
|
87
|
+
try {
|
|
88
|
+
return Function("return this;")();
|
|
89
|
+
} catch (_) {}
|
|
90
|
+
}
|
|
91
|
+
function indirectEvalThis() {
|
|
92
|
+
try {
|
|
93
|
+
return (undefined, eval)("(function() { return this; })()");
|
|
94
|
+
} catch (_) {}
|
|
95
|
+
}
|
|
96
|
+
function sloppyModeThis() {
|
|
97
|
+
return functionThis() || indirectEvalThis();
|
|
98
|
+
}
|
|
99
|
+
})(function(exporter, root) {
|
|
100
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
101
|
+
var supportsSymbol = typeof Symbol === "function";
|
|
102
|
+
var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
|
|
103
|
+
var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
|
|
104
|
+
var supportsCreate = typeof Object.create === "function";
|
|
105
|
+
var supportsProto = { __proto__: [] } instanceof Array;
|
|
106
|
+
var downLevel = !supportsCreate && !supportsProto;
|
|
107
|
+
var HashMap = {
|
|
108
|
+
create: supportsCreate ? function() {
|
|
109
|
+
return MakeDictionary(Object.create(null));
|
|
110
|
+
} : supportsProto ? function() {
|
|
111
|
+
return MakeDictionary({ __proto__: null });
|
|
112
|
+
} : function() {
|
|
113
|
+
return MakeDictionary({});
|
|
114
|
+
},
|
|
115
|
+
has: downLevel ? function(map, key) {
|
|
116
|
+
return hasOwn.call(map, key);
|
|
117
|
+
} : function(map, key) {
|
|
118
|
+
return key in map;
|
|
119
|
+
},
|
|
120
|
+
get: downLevel ? function(map, key) {
|
|
121
|
+
return hasOwn.call(map, key) ? map[key] : undefined;
|
|
122
|
+
} : function(map, key) {
|
|
123
|
+
return map[key];
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
var functionPrototype = Object.getPrototypeOf(Function);
|
|
127
|
+
var _Map = typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill();
|
|
128
|
+
var _Set = typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill();
|
|
129
|
+
var _WeakMap = typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
|
|
130
|
+
var registrySymbol = supportsSymbol ? Symbol.for("@reflect-metadata:registry") : undefined;
|
|
131
|
+
var metadataRegistry = GetOrCreateMetadataRegistry();
|
|
132
|
+
var metadataProvider = CreateMetadataProvider(metadataRegistry);
|
|
133
|
+
function decorate(decorators, target, propertyKey, attributes) {
|
|
134
|
+
if (!IsUndefined(propertyKey)) {
|
|
135
|
+
if (!IsArray(decorators))
|
|
136
|
+
throw new TypeError;
|
|
137
|
+
if (!IsObject(target))
|
|
138
|
+
throw new TypeError;
|
|
139
|
+
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))
|
|
140
|
+
throw new TypeError;
|
|
141
|
+
if (IsNull(attributes))
|
|
142
|
+
attributes = undefined;
|
|
143
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
144
|
+
return DecorateProperty(decorators, target, propertyKey, attributes);
|
|
145
|
+
} else {
|
|
146
|
+
if (!IsArray(decorators))
|
|
147
|
+
throw new TypeError;
|
|
148
|
+
if (!IsConstructor(target))
|
|
149
|
+
throw new TypeError;
|
|
150
|
+
return DecorateConstructor(decorators, target);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
exporter("decorate", decorate);
|
|
154
|
+
function metadata(metadataKey, metadataValue) {
|
|
155
|
+
function decorator(target, propertyKey) {
|
|
156
|
+
if (!IsObject(target))
|
|
157
|
+
throw new TypeError;
|
|
158
|
+
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))
|
|
159
|
+
throw new TypeError;
|
|
160
|
+
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
161
|
+
}
|
|
162
|
+
return decorator;
|
|
163
|
+
}
|
|
164
|
+
exporter("metadata", metadata);
|
|
165
|
+
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
166
|
+
if (!IsObject(target))
|
|
167
|
+
throw new TypeError;
|
|
168
|
+
if (!IsUndefined(propertyKey))
|
|
169
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
170
|
+
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
171
|
+
}
|
|
172
|
+
exporter("defineMetadata", defineMetadata);
|
|
173
|
+
function hasMetadata(metadataKey, target, propertyKey) {
|
|
174
|
+
if (!IsObject(target))
|
|
175
|
+
throw new TypeError;
|
|
176
|
+
if (!IsUndefined(propertyKey))
|
|
177
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
178
|
+
return OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
179
|
+
}
|
|
180
|
+
exporter("hasMetadata", hasMetadata);
|
|
181
|
+
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
182
|
+
if (!IsObject(target))
|
|
183
|
+
throw new TypeError;
|
|
184
|
+
if (!IsUndefined(propertyKey))
|
|
185
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
186
|
+
return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
187
|
+
}
|
|
188
|
+
exporter("hasOwnMetadata", hasOwnMetadata);
|
|
189
|
+
function getMetadata(metadataKey, target, propertyKey) {
|
|
190
|
+
if (!IsObject(target))
|
|
191
|
+
throw new TypeError;
|
|
192
|
+
if (!IsUndefined(propertyKey))
|
|
193
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
194
|
+
return OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
195
|
+
}
|
|
196
|
+
exporter("getMetadata", getMetadata);
|
|
197
|
+
function getOwnMetadata(metadataKey, target, propertyKey) {
|
|
198
|
+
if (!IsObject(target))
|
|
199
|
+
throw new TypeError;
|
|
200
|
+
if (!IsUndefined(propertyKey))
|
|
201
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
202
|
+
return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
|
|
203
|
+
}
|
|
204
|
+
exporter("getOwnMetadata", getOwnMetadata);
|
|
205
|
+
function getMetadataKeys(target, propertyKey) {
|
|
206
|
+
if (!IsObject(target))
|
|
207
|
+
throw new TypeError;
|
|
208
|
+
if (!IsUndefined(propertyKey))
|
|
209
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
210
|
+
return OrdinaryMetadataKeys(target, propertyKey);
|
|
211
|
+
}
|
|
212
|
+
exporter("getMetadataKeys", getMetadataKeys);
|
|
213
|
+
function getOwnMetadataKeys(target, propertyKey) {
|
|
214
|
+
if (!IsObject(target))
|
|
215
|
+
throw new TypeError;
|
|
216
|
+
if (!IsUndefined(propertyKey))
|
|
217
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
218
|
+
return OrdinaryOwnMetadataKeys(target, propertyKey);
|
|
219
|
+
}
|
|
220
|
+
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
|
|
221
|
+
function deleteMetadata(metadataKey, target, propertyKey) {
|
|
222
|
+
if (!IsObject(target))
|
|
223
|
+
throw new TypeError;
|
|
224
|
+
if (!IsUndefined(propertyKey))
|
|
225
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
226
|
+
if (!IsObject(target))
|
|
227
|
+
throw new TypeError;
|
|
228
|
+
if (!IsUndefined(propertyKey))
|
|
229
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
230
|
+
var provider = GetMetadataProvider(target, propertyKey, false);
|
|
231
|
+
if (IsUndefined(provider))
|
|
232
|
+
return false;
|
|
233
|
+
return provider.OrdinaryDeleteMetadata(metadataKey, target, propertyKey);
|
|
234
|
+
}
|
|
235
|
+
exporter("deleteMetadata", deleteMetadata);
|
|
236
|
+
function DecorateConstructor(decorators, target) {
|
|
237
|
+
for (var i = decorators.length - 1;i >= 0; --i) {
|
|
238
|
+
var decorator = decorators[i];
|
|
239
|
+
var decorated = decorator(target);
|
|
240
|
+
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
241
|
+
if (!IsConstructor(decorated))
|
|
242
|
+
throw new TypeError;
|
|
243
|
+
target = decorated;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return target;
|
|
247
|
+
}
|
|
248
|
+
function DecorateProperty(decorators, target, propertyKey, descriptor) {
|
|
249
|
+
for (var i = decorators.length - 1;i >= 0; --i) {
|
|
250
|
+
var decorator = decorators[i];
|
|
251
|
+
var decorated = decorator(target, propertyKey, descriptor);
|
|
252
|
+
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
253
|
+
if (!IsObject(decorated))
|
|
254
|
+
throw new TypeError;
|
|
255
|
+
descriptor = decorated;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return descriptor;
|
|
259
|
+
}
|
|
260
|
+
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
261
|
+
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
262
|
+
if (hasOwn2)
|
|
263
|
+
return true;
|
|
264
|
+
var parent = OrdinaryGetPrototypeOf(O);
|
|
265
|
+
if (!IsNull(parent))
|
|
266
|
+
return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
270
|
+
var provider = GetMetadataProvider(O, P, false);
|
|
271
|
+
if (IsUndefined(provider))
|
|
272
|
+
return false;
|
|
273
|
+
return ToBoolean(provider.OrdinaryHasOwnMetadata(MetadataKey, O, P));
|
|
274
|
+
}
|
|
275
|
+
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
276
|
+
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
277
|
+
if (hasOwn2)
|
|
278
|
+
return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
279
|
+
var parent = OrdinaryGetPrototypeOf(O);
|
|
280
|
+
if (!IsNull(parent))
|
|
281
|
+
return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
285
|
+
var provider = GetMetadataProvider(O, P, false);
|
|
286
|
+
if (IsUndefined(provider))
|
|
287
|
+
return;
|
|
288
|
+
return provider.OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
289
|
+
}
|
|
290
|
+
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
291
|
+
var provider = GetMetadataProvider(O, P, true);
|
|
292
|
+
provider.OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P);
|
|
293
|
+
}
|
|
294
|
+
function OrdinaryMetadataKeys(O, P) {
|
|
295
|
+
var ownKeys = OrdinaryOwnMetadataKeys(O, P);
|
|
296
|
+
var parent = OrdinaryGetPrototypeOf(O);
|
|
297
|
+
if (parent === null)
|
|
298
|
+
return ownKeys;
|
|
299
|
+
var parentKeys = OrdinaryMetadataKeys(parent, P);
|
|
300
|
+
if (parentKeys.length <= 0)
|
|
301
|
+
return ownKeys;
|
|
302
|
+
if (ownKeys.length <= 0)
|
|
303
|
+
return parentKeys;
|
|
304
|
+
var set = new _Set;
|
|
305
|
+
var keys = [];
|
|
306
|
+
for (var _i = 0, ownKeys_1 = ownKeys;_i < ownKeys_1.length; _i++) {
|
|
307
|
+
var key = ownKeys_1[_i];
|
|
308
|
+
var hasKey = set.has(key);
|
|
309
|
+
if (!hasKey) {
|
|
310
|
+
set.add(key);
|
|
311
|
+
keys.push(key);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
for (var _a = 0, parentKeys_1 = parentKeys;_a < parentKeys_1.length; _a++) {
|
|
315
|
+
var key = parentKeys_1[_a];
|
|
316
|
+
var hasKey = set.has(key);
|
|
317
|
+
if (!hasKey) {
|
|
318
|
+
set.add(key);
|
|
319
|
+
keys.push(key);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return keys;
|
|
323
|
+
}
|
|
324
|
+
function OrdinaryOwnMetadataKeys(O, P) {
|
|
325
|
+
var provider = GetMetadataProvider(O, P, false);
|
|
326
|
+
if (!provider) {
|
|
327
|
+
return [];
|
|
328
|
+
}
|
|
329
|
+
return provider.OrdinaryOwnMetadataKeys(O, P);
|
|
330
|
+
}
|
|
331
|
+
function Type(x) {
|
|
332
|
+
if (x === null)
|
|
333
|
+
return 1;
|
|
334
|
+
switch (typeof x) {
|
|
335
|
+
case "undefined":
|
|
336
|
+
return 0;
|
|
337
|
+
case "boolean":
|
|
338
|
+
return 2;
|
|
339
|
+
case "string":
|
|
340
|
+
return 3;
|
|
341
|
+
case "symbol":
|
|
342
|
+
return 4;
|
|
343
|
+
case "number":
|
|
344
|
+
return 5;
|
|
345
|
+
case "object":
|
|
346
|
+
return x === null ? 1 : 6;
|
|
347
|
+
default:
|
|
348
|
+
return 6;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
function IsUndefined(x) {
|
|
352
|
+
return x === undefined;
|
|
353
|
+
}
|
|
354
|
+
function IsNull(x) {
|
|
355
|
+
return x === null;
|
|
356
|
+
}
|
|
357
|
+
function IsSymbol(x) {
|
|
358
|
+
return typeof x === "symbol";
|
|
359
|
+
}
|
|
360
|
+
function IsObject(x) {
|
|
361
|
+
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
362
|
+
}
|
|
363
|
+
function ToPrimitive(input, PreferredType) {
|
|
364
|
+
switch (Type(input)) {
|
|
365
|
+
case 0:
|
|
366
|
+
return input;
|
|
367
|
+
case 1:
|
|
368
|
+
return input;
|
|
369
|
+
case 2:
|
|
370
|
+
return input;
|
|
371
|
+
case 3:
|
|
372
|
+
return input;
|
|
373
|
+
case 4:
|
|
374
|
+
return input;
|
|
375
|
+
case 5:
|
|
376
|
+
return input;
|
|
377
|
+
}
|
|
378
|
+
var hint = PreferredType === 3 ? "string" : PreferredType === 5 ? "number" : "default";
|
|
379
|
+
var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
380
|
+
if (exoticToPrim !== undefined) {
|
|
381
|
+
var result = exoticToPrim.call(input, hint);
|
|
382
|
+
if (IsObject(result))
|
|
383
|
+
throw new TypeError;
|
|
384
|
+
return result;
|
|
385
|
+
}
|
|
386
|
+
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
387
|
+
}
|
|
388
|
+
function OrdinaryToPrimitive(O, hint) {
|
|
389
|
+
if (hint === "string") {
|
|
390
|
+
var toString_1 = O.toString;
|
|
391
|
+
if (IsCallable(toString_1)) {
|
|
392
|
+
var result = toString_1.call(O);
|
|
393
|
+
if (!IsObject(result))
|
|
394
|
+
return result;
|
|
395
|
+
}
|
|
396
|
+
var valueOf = O.valueOf;
|
|
397
|
+
if (IsCallable(valueOf)) {
|
|
398
|
+
var result = valueOf.call(O);
|
|
399
|
+
if (!IsObject(result))
|
|
400
|
+
return result;
|
|
401
|
+
}
|
|
402
|
+
} else {
|
|
403
|
+
var valueOf = O.valueOf;
|
|
404
|
+
if (IsCallable(valueOf)) {
|
|
405
|
+
var result = valueOf.call(O);
|
|
406
|
+
if (!IsObject(result))
|
|
407
|
+
return result;
|
|
408
|
+
}
|
|
409
|
+
var toString_2 = O.toString;
|
|
410
|
+
if (IsCallable(toString_2)) {
|
|
411
|
+
var result = toString_2.call(O);
|
|
412
|
+
if (!IsObject(result))
|
|
413
|
+
return result;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
throw new TypeError;
|
|
417
|
+
}
|
|
418
|
+
function ToBoolean(argument) {
|
|
419
|
+
return !!argument;
|
|
420
|
+
}
|
|
421
|
+
function ToString(argument) {
|
|
422
|
+
return "" + argument;
|
|
423
|
+
}
|
|
424
|
+
function ToPropertyKey(argument) {
|
|
425
|
+
var key = ToPrimitive(argument, 3);
|
|
426
|
+
if (IsSymbol(key))
|
|
427
|
+
return key;
|
|
428
|
+
return ToString(key);
|
|
429
|
+
}
|
|
430
|
+
function IsArray(argument) {
|
|
431
|
+
return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]";
|
|
432
|
+
}
|
|
433
|
+
function IsCallable(argument) {
|
|
434
|
+
return typeof argument === "function";
|
|
435
|
+
}
|
|
436
|
+
function IsConstructor(argument) {
|
|
437
|
+
return typeof argument === "function";
|
|
438
|
+
}
|
|
439
|
+
function IsPropertyKey(argument) {
|
|
440
|
+
switch (Type(argument)) {
|
|
441
|
+
case 3:
|
|
442
|
+
return true;
|
|
443
|
+
case 4:
|
|
444
|
+
return true;
|
|
445
|
+
default:
|
|
446
|
+
return false;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
function SameValueZero(x, y) {
|
|
450
|
+
return x === y || x !== x && y !== y;
|
|
451
|
+
}
|
|
452
|
+
function GetMethod(V, P) {
|
|
453
|
+
var func = V[P];
|
|
454
|
+
if (func === undefined || func === null)
|
|
455
|
+
return;
|
|
456
|
+
if (!IsCallable(func))
|
|
457
|
+
throw new TypeError;
|
|
458
|
+
return func;
|
|
459
|
+
}
|
|
460
|
+
function GetIterator(obj) {
|
|
461
|
+
var method = GetMethod(obj, iteratorSymbol);
|
|
462
|
+
if (!IsCallable(method))
|
|
463
|
+
throw new TypeError;
|
|
464
|
+
var iterator = method.call(obj);
|
|
465
|
+
if (!IsObject(iterator))
|
|
466
|
+
throw new TypeError;
|
|
467
|
+
return iterator;
|
|
468
|
+
}
|
|
469
|
+
function IteratorValue(iterResult) {
|
|
470
|
+
return iterResult.value;
|
|
471
|
+
}
|
|
472
|
+
function IteratorStep(iterator) {
|
|
473
|
+
var result = iterator.next();
|
|
474
|
+
return result.done ? false : result;
|
|
475
|
+
}
|
|
476
|
+
function IteratorClose(iterator) {
|
|
477
|
+
var f = iterator["return"];
|
|
478
|
+
if (f)
|
|
479
|
+
f.call(iterator);
|
|
480
|
+
}
|
|
481
|
+
function OrdinaryGetPrototypeOf(O) {
|
|
482
|
+
var proto = Object.getPrototypeOf(O);
|
|
483
|
+
if (typeof O !== "function" || O === functionPrototype)
|
|
484
|
+
return proto;
|
|
485
|
+
if (proto !== functionPrototype)
|
|
486
|
+
return proto;
|
|
487
|
+
var prototype = O.prototype;
|
|
488
|
+
var prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
489
|
+
if (prototypeProto == null || prototypeProto === Object.prototype)
|
|
490
|
+
return proto;
|
|
491
|
+
var constructor = prototypeProto.constructor;
|
|
492
|
+
if (typeof constructor !== "function")
|
|
493
|
+
return proto;
|
|
494
|
+
if (constructor === O)
|
|
495
|
+
return proto;
|
|
496
|
+
return constructor;
|
|
497
|
+
}
|
|
498
|
+
function CreateMetadataRegistry() {
|
|
499
|
+
var fallback;
|
|
500
|
+
if (!IsUndefined(registrySymbol) && typeof root.Reflect !== "undefined" && !(registrySymbol in root.Reflect) && typeof root.Reflect.defineMetadata === "function") {
|
|
501
|
+
fallback = CreateFallbackProvider(root.Reflect);
|
|
502
|
+
}
|
|
503
|
+
var first;
|
|
504
|
+
var second;
|
|
505
|
+
var rest;
|
|
506
|
+
var targetProviderMap = new _WeakMap;
|
|
507
|
+
var registry = {
|
|
508
|
+
registerProvider,
|
|
509
|
+
getProvider,
|
|
510
|
+
setProvider
|
|
511
|
+
};
|
|
512
|
+
return registry;
|
|
513
|
+
function registerProvider(provider) {
|
|
514
|
+
if (!Object.isExtensible(registry)) {
|
|
515
|
+
throw new Error("Cannot add provider to a frozen registry.");
|
|
516
|
+
}
|
|
517
|
+
switch (true) {
|
|
518
|
+
case fallback === provider:
|
|
519
|
+
break;
|
|
520
|
+
case IsUndefined(first):
|
|
521
|
+
first = provider;
|
|
522
|
+
break;
|
|
523
|
+
case first === provider:
|
|
524
|
+
break;
|
|
525
|
+
case IsUndefined(second):
|
|
526
|
+
second = provider;
|
|
527
|
+
break;
|
|
528
|
+
case second === provider:
|
|
529
|
+
break;
|
|
530
|
+
default:
|
|
531
|
+
if (rest === undefined)
|
|
532
|
+
rest = new _Set;
|
|
533
|
+
rest.add(provider);
|
|
534
|
+
break;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
function getProviderNoCache(O, P) {
|
|
538
|
+
if (!IsUndefined(first)) {
|
|
539
|
+
if (first.isProviderFor(O, P))
|
|
540
|
+
return first;
|
|
541
|
+
if (!IsUndefined(second)) {
|
|
542
|
+
if (second.isProviderFor(O, P))
|
|
543
|
+
return first;
|
|
544
|
+
if (!IsUndefined(rest)) {
|
|
545
|
+
var iterator = GetIterator(rest);
|
|
546
|
+
while (true) {
|
|
547
|
+
var next = IteratorStep(iterator);
|
|
548
|
+
if (!next) {
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
var provider = IteratorValue(next);
|
|
552
|
+
if (provider.isProviderFor(O, P)) {
|
|
553
|
+
IteratorClose(iterator);
|
|
554
|
+
return provider;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
if (!IsUndefined(fallback) && fallback.isProviderFor(O, P)) {
|
|
561
|
+
return fallback;
|
|
562
|
+
}
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
function getProvider(O, P) {
|
|
566
|
+
var providerMap = targetProviderMap.get(O);
|
|
567
|
+
var provider;
|
|
568
|
+
if (!IsUndefined(providerMap)) {
|
|
569
|
+
provider = providerMap.get(P);
|
|
570
|
+
}
|
|
571
|
+
if (!IsUndefined(provider)) {
|
|
572
|
+
return provider;
|
|
573
|
+
}
|
|
574
|
+
provider = getProviderNoCache(O, P);
|
|
575
|
+
if (!IsUndefined(provider)) {
|
|
576
|
+
if (IsUndefined(providerMap)) {
|
|
577
|
+
providerMap = new _Map;
|
|
578
|
+
targetProviderMap.set(O, providerMap);
|
|
579
|
+
}
|
|
580
|
+
providerMap.set(P, provider);
|
|
581
|
+
}
|
|
582
|
+
return provider;
|
|
583
|
+
}
|
|
584
|
+
function hasProvider(provider) {
|
|
585
|
+
if (IsUndefined(provider))
|
|
586
|
+
throw new TypeError;
|
|
587
|
+
return first === provider || second === provider || !IsUndefined(rest) && rest.has(provider);
|
|
588
|
+
}
|
|
589
|
+
function setProvider(O, P, provider) {
|
|
590
|
+
if (!hasProvider(provider)) {
|
|
591
|
+
throw new Error("Metadata provider not registered.");
|
|
592
|
+
}
|
|
593
|
+
var existingProvider = getProvider(O, P);
|
|
594
|
+
if (existingProvider !== provider) {
|
|
595
|
+
if (!IsUndefined(existingProvider)) {
|
|
596
|
+
return false;
|
|
597
|
+
}
|
|
598
|
+
var providerMap = targetProviderMap.get(O);
|
|
599
|
+
if (IsUndefined(providerMap)) {
|
|
600
|
+
providerMap = new _Map;
|
|
601
|
+
targetProviderMap.set(O, providerMap);
|
|
602
|
+
}
|
|
603
|
+
providerMap.set(P, provider);
|
|
604
|
+
}
|
|
605
|
+
return true;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
function GetOrCreateMetadataRegistry() {
|
|
609
|
+
var metadataRegistry2;
|
|
610
|
+
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
611
|
+
metadataRegistry2 = root.Reflect[registrySymbol];
|
|
612
|
+
}
|
|
613
|
+
if (IsUndefined(metadataRegistry2)) {
|
|
614
|
+
metadataRegistry2 = CreateMetadataRegistry();
|
|
615
|
+
}
|
|
616
|
+
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
617
|
+
Object.defineProperty(root.Reflect, registrySymbol, {
|
|
618
|
+
enumerable: false,
|
|
619
|
+
configurable: false,
|
|
620
|
+
writable: false,
|
|
621
|
+
value: metadataRegistry2
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
return metadataRegistry2;
|
|
625
|
+
}
|
|
626
|
+
function CreateMetadataProvider(registry) {
|
|
627
|
+
var metadata2 = new _WeakMap;
|
|
628
|
+
var provider = {
|
|
629
|
+
isProviderFor: function(O, P) {
|
|
630
|
+
var targetMetadata = metadata2.get(O);
|
|
631
|
+
if (IsUndefined(targetMetadata))
|
|
632
|
+
return false;
|
|
633
|
+
return targetMetadata.has(P);
|
|
634
|
+
},
|
|
635
|
+
OrdinaryDefineOwnMetadata: OrdinaryDefineOwnMetadata2,
|
|
636
|
+
OrdinaryHasOwnMetadata: OrdinaryHasOwnMetadata2,
|
|
637
|
+
OrdinaryGetOwnMetadata: OrdinaryGetOwnMetadata2,
|
|
638
|
+
OrdinaryOwnMetadataKeys: OrdinaryOwnMetadataKeys2,
|
|
639
|
+
OrdinaryDeleteMetadata
|
|
640
|
+
};
|
|
641
|
+
metadataRegistry.registerProvider(provider);
|
|
642
|
+
return provider;
|
|
643
|
+
function GetOrCreateMetadataMap(O, P, Create) {
|
|
644
|
+
var targetMetadata = metadata2.get(O);
|
|
645
|
+
var createdTargetMetadata = false;
|
|
646
|
+
if (IsUndefined(targetMetadata)) {
|
|
647
|
+
if (!Create)
|
|
648
|
+
return;
|
|
649
|
+
targetMetadata = new _Map;
|
|
650
|
+
metadata2.set(O, targetMetadata);
|
|
651
|
+
createdTargetMetadata = true;
|
|
652
|
+
}
|
|
653
|
+
var metadataMap = targetMetadata.get(P);
|
|
654
|
+
if (IsUndefined(metadataMap)) {
|
|
655
|
+
if (!Create)
|
|
656
|
+
return;
|
|
657
|
+
metadataMap = new _Map;
|
|
658
|
+
targetMetadata.set(P, metadataMap);
|
|
659
|
+
if (!registry.setProvider(O, P, provider)) {
|
|
660
|
+
targetMetadata.delete(P);
|
|
661
|
+
if (createdTargetMetadata) {
|
|
662
|
+
metadata2.delete(O);
|
|
663
|
+
}
|
|
664
|
+
throw new Error("Wrong provider for target.");
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
return metadataMap;
|
|
668
|
+
}
|
|
669
|
+
function OrdinaryHasOwnMetadata2(MetadataKey, O, P) {
|
|
670
|
+
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
671
|
+
if (IsUndefined(metadataMap))
|
|
672
|
+
return false;
|
|
673
|
+
return ToBoolean(metadataMap.has(MetadataKey));
|
|
674
|
+
}
|
|
675
|
+
function OrdinaryGetOwnMetadata2(MetadataKey, O, P) {
|
|
676
|
+
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
677
|
+
if (IsUndefined(metadataMap))
|
|
678
|
+
return;
|
|
679
|
+
return metadataMap.get(MetadataKey);
|
|
680
|
+
}
|
|
681
|
+
function OrdinaryDefineOwnMetadata2(MetadataKey, MetadataValue, O, P) {
|
|
682
|
+
var metadataMap = GetOrCreateMetadataMap(O, P, true);
|
|
683
|
+
metadataMap.set(MetadataKey, MetadataValue);
|
|
684
|
+
}
|
|
685
|
+
function OrdinaryOwnMetadataKeys2(O, P) {
|
|
686
|
+
var keys = [];
|
|
687
|
+
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
688
|
+
if (IsUndefined(metadataMap))
|
|
689
|
+
return keys;
|
|
690
|
+
var keysObj = metadataMap.keys();
|
|
691
|
+
var iterator = GetIterator(keysObj);
|
|
692
|
+
var k = 0;
|
|
693
|
+
while (true) {
|
|
694
|
+
var next = IteratorStep(iterator);
|
|
695
|
+
if (!next) {
|
|
696
|
+
keys.length = k;
|
|
697
|
+
return keys;
|
|
698
|
+
}
|
|
699
|
+
var nextValue = IteratorValue(next);
|
|
700
|
+
try {
|
|
701
|
+
keys[k] = nextValue;
|
|
702
|
+
} catch (e) {
|
|
703
|
+
try {
|
|
704
|
+
IteratorClose(iterator);
|
|
705
|
+
} finally {
|
|
706
|
+
throw e;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
k++;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
function OrdinaryDeleteMetadata(MetadataKey, O, P) {
|
|
713
|
+
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
714
|
+
if (IsUndefined(metadataMap))
|
|
715
|
+
return false;
|
|
716
|
+
if (!metadataMap.delete(MetadataKey))
|
|
717
|
+
return false;
|
|
718
|
+
if (metadataMap.size === 0) {
|
|
719
|
+
var targetMetadata = metadata2.get(O);
|
|
720
|
+
if (!IsUndefined(targetMetadata)) {
|
|
721
|
+
targetMetadata.delete(P);
|
|
722
|
+
if (targetMetadata.size === 0) {
|
|
723
|
+
metadata2.delete(targetMetadata);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
return true;
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
function CreateFallbackProvider(reflect) {
|
|
731
|
+
var { defineMetadata: defineMetadata2, hasOwnMetadata: hasOwnMetadata2, getOwnMetadata: getOwnMetadata2, getOwnMetadataKeys: getOwnMetadataKeys2, deleteMetadata: deleteMetadata2 } = reflect;
|
|
732
|
+
var metadataOwner = new _WeakMap;
|
|
733
|
+
var provider = {
|
|
734
|
+
isProviderFor: function(O, P) {
|
|
735
|
+
var metadataPropertySet = metadataOwner.get(O);
|
|
736
|
+
if (!IsUndefined(metadataPropertySet) && metadataPropertySet.has(P)) {
|
|
737
|
+
return true;
|
|
738
|
+
}
|
|
739
|
+
if (getOwnMetadataKeys2(O, P).length) {
|
|
740
|
+
if (IsUndefined(metadataPropertySet)) {
|
|
741
|
+
metadataPropertySet = new _Set;
|
|
742
|
+
metadataOwner.set(O, metadataPropertySet);
|
|
743
|
+
}
|
|
744
|
+
metadataPropertySet.add(P);
|
|
745
|
+
return true;
|
|
746
|
+
}
|
|
747
|
+
return false;
|
|
748
|
+
},
|
|
749
|
+
OrdinaryDefineOwnMetadata: defineMetadata2,
|
|
750
|
+
OrdinaryHasOwnMetadata: hasOwnMetadata2,
|
|
751
|
+
OrdinaryGetOwnMetadata: getOwnMetadata2,
|
|
752
|
+
OrdinaryOwnMetadataKeys: getOwnMetadataKeys2,
|
|
753
|
+
OrdinaryDeleteMetadata: deleteMetadata2
|
|
754
|
+
};
|
|
755
|
+
return provider;
|
|
756
|
+
}
|
|
757
|
+
function GetMetadataProvider(O, P, Create) {
|
|
758
|
+
var registeredProvider = metadataRegistry.getProvider(O, P);
|
|
759
|
+
if (!IsUndefined(registeredProvider)) {
|
|
760
|
+
return registeredProvider;
|
|
761
|
+
}
|
|
762
|
+
if (Create) {
|
|
763
|
+
if (metadataRegistry.setProvider(O, P, metadataProvider)) {
|
|
764
|
+
return metadataProvider;
|
|
765
|
+
}
|
|
766
|
+
throw new Error("Illegal state.");
|
|
767
|
+
}
|
|
768
|
+
return;
|
|
769
|
+
}
|
|
770
|
+
function CreateMapPolyfill() {
|
|
771
|
+
var cacheSentinel = {};
|
|
772
|
+
var arraySentinel = [];
|
|
773
|
+
var MapIterator = function() {
|
|
774
|
+
function MapIterator2(keys, values, selector) {
|
|
775
|
+
this._index = 0;
|
|
776
|
+
this._keys = keys;
|
|
777
|
+
this._values = values;
|
|
778
|
+
this._selector = selector;
|
|
779
|
+
}
|
|
780
|
+
MapIterator2.prototype["@@iterator"] = function() {
|
|
781
|
+
return this;
|
|
782
|
+
};
|
|
783
|
+
MapIterator2.prototype[iteratorSymbol] = function() {
|
|
784
|
+
return this;
|
|
785
|
+
};
|
|
786
|
+
MapIterator2.prototype.next = function() {
|
|
787
|
+
var index = this._index;
|
|
788
|
+
if (index >= 0 && index < this._keys.length) {
|
|
789
|
+
var result = this._selector(this._keys[index], this._values[index]);
|
|
790
|
+
if (index + 1 >= this._keys.length) {
|
|
791
|
+
this._index = -1;
|
|
792
|
+
this._keys = arraySentinel;
|
|
793
|
+
this._values = arraySentinel;
|
|
794
|
+
} else {
|
|
795
|
+
this._index++;
|
|
796
|
+
}
|
|
797
|
+
return { value: result, done: false };
|
|
798
|
+
}
|
|
799
|
+
return { value: undefined, done: true };
|
|
800
|
+
};
|
|
801
|
+
MapIterator2.prototype.throw = function(error) {
|
|
802
|
+
if (this._index >= 0) {
|
|
803
|
+
this._index = -1;
|
|
804
|
+
this._keys = arraySentinel;
|
|
805
|
+
this._values = arraySentinel;
|
|
806
|
+
}
|
|
807
|
+
throw error;
|
|
808
|
+
};
|
|
809
|
+
MapIterator2.prototype.return = function(value) {
|
|
810
|
+
if (this._index >= 0) {
|
|
811
|
+
this._index = -1;
|
|
812
|
+
this._keys = arraySentinel;
|
|
813
|
+
this._values = arraySentinel;
|
|
814
|
+
}
|
|
815
|
+
return { value, done: true };
|
|
816
|
+
};
|
|
817
|
+
return MapIterator2;
|
|
818
|
+
}();
|
|
819
|
+
var Map2 = function() {
|
|
820
|
+
function Map3() {
|
|
821
|
+
this._keys = [];
|
|
822
|
+
this._values = [];
|
|
823
|
+
this._cacheKey = cacheSentinel;
|
|
824
|
+
this._cacheIndex = -2;
|
|
825
|
+
}
|
|
826
|
+
Object.defineProperty(Map3.prototype, "size", {
|
|
827
|
+
get: function() {
|
|
828
|
+
return this._keys.length;
|
|
829
|
+
},
|
|
830
|
+
enumerable: true,
|
|
831
|
+
configurable: true
|
|
832
|
+
});
|
|
833
|
+
Map3.prototype.has = function(key) {
|
|
834
|
+
return this._find(key, false) >= 0;
|
|
835
|
+
};
|
|
836
|
+
Map3.prototype.get = function(key) {
|
|
837
|
+
var index = this._find(key, false);
|
|
838
|
+
return index >= 0 ? this._values[index] : undefined;
|
|
839
|
+
};
|
|
840
|
+
Map3.prototype.set = function(key, value) {
|
|
841
|
+
var index = this._find(key, true);
|
|
842
|
+
this._values[index] = value;
|
|
843
|
+
return this;
|
|
844
|
+
};
|
|
845
|
+
Map3.prototype.delete = function(key) {
|
|
846
|
+
var index = this._find(key, false);
|
|
847
|
+
if (index >= 0) {
|
|
848
|
+
var size = this._keys.length;
|
|
849
|
+
for (var i = index + 1;i < size; i++) {
|
|
850
|
+
this._keys[i - 1] = this._keys[i];
|
|
851
|
+
this._values[i - 1] = this._values[i];
|
|
852
|
+
}
|
|
853
|
+
this._keys.length--;
|
|
854
|
+
this._values.length--;
|
|
855
|
+
if (SameValueZero(key, this._cacheKey)) {
|
|
856
|
+
this._cacheKey = cacheSentinel;
|
|
857
|
+
this._cacheIndex = -2;
|
|
858
|
+
}
|
|
859
|
+
return true;
|
|
860
|
+
}
|
|
861
|
+
return false;
|
|
862
|
+
};
|
|
863
|
+
Map3.prototype.clear = function() {
|
|
864
|
+
this._keys.length = 0;
|
|
865
|
+
this._values.length = 0;
|
|
866
|
+
this._cacheKey = cacheSentinel;
|
|
867
|
+
this._cacheIndex = -2;
|
|
868
|
+
};
|
|
869
|
+
Map3.prototype.keys = function() {
|
|
870
|
+
return new MapIterator(this._keys, this._values, getKey);
|
|
871
|
+
};
|
|
872
|
+
Map3.prototype.values = function() {
|
|
873
|
+
return new MapIterator(this._keys, this._values, getValue);
|
|
874
|
+
};
|
|
875
|
+
Map3.prototype.entries = function() {
|
|
876
|
+
return new MapIterator(this._keys, this._values, getEntry);
|
|
877
|
+
};
|
|
878
|
+
Map3.prototype["@@iterator"] = function() {
|
|
879
|
+
return this.entries();
|
|
880
|
+
};
|
|
881
|
+
Map3.prototype[iteratorSymbol] = function() {
|
|
882
|
+
return this.entries();
|
|
883
|
+
};
|
|
884
|
+
Map3.prototype._find = function(key, insert) {
|
|
885
|
+
if (!SameValueZero(this._cacheKey, key)) {
|
|
886
|
+
this._cacheIndex = -1;
|
|
887
|
+
for (var i = 0;i < this._keys.length; i++) {
|
|
888
|
+
if (SameValueZero(this._keys[i], key)) {
|
|
889
|
+
this._cacheIndex = i;
|
|
890
|
+
break;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
if (this._cacheIndex < 0 && insert) {
|
|
895
|
+
this._cacheIndex = this._keys.length;
|
|
896
|
+
this._keys.push(key);
|
|
897
|
+
this._values.push(undefined);
|
|
898
|
+
}
|
|
899
|
+
return this._cacheIndex;
|
|
900
|
+
};
|
|
901
|
+
return Map3;
|
|
902
|
+
}();
|
|
903
|
+
return Map2;
|
|
904
|
+
function getKey(key, _) {
|
|
905
|
+
return key;
|
|
906
|
+
}
|
|
907
|
+
function getValue(_, value) {
|
|
908
|
+
return value;
|
|
909
|
+
}
|
|
910
|
+
function getEntry(key, value) {
|
|
911
|
+
return [key, value];
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
function CreateSetPolyfill() {
|
|
915
|
+
var Set2 = function() {
|
|
916
|
+
function Set3() {
|
|
917
|
+
this._map = new _Map;
|
|
918
|
+
}
|
|
919
|
+
Object.defineProperty(Set3.prototype, "size", {
|
|
920
|
+
get: function() {
|
|
921
|
+
return this._map.size;
|
|
922
|
+
},
|
|
923
|
+
enumerable: true,
|
|
924
|
+
configurable: true
|
|
925
|
+
});
|
|
926
|
+
Set3.prototype.has = function(value) {
|
|
927
|
+
return this._map.has(value);
|
|
928
|
+
};
|
|
929
|
+
Set3.prototype.add = function(value) {
|
|
930
|
+
return this._map.set(value, value), this;
|
|
931
|
+
};
|
|
932
|
+
Set3.prototype.delete = function(value) {
|
|
933
|
+
return this._map.delete(value);
|
|
934
|
+
};
|
|
935
|
+
Set3.prototype.clear = function() {
|
|
936
|
+
this._map.clear();
|
|
937
|
+
};
|
|
938
|
+
Set3.prototype.keys = function() {
|
|
939
|
+
return this._map.keys();
|
|
940
|
+
};
|
|
941
|
+
Set3.prototype.values = function() {
|
|
942
|
+
return this._map.keys();
|
|
943
|
+
};
|
|
944
|
+
Set3.prototype.entries = function() {
|
|
945
|
+
return this._map.entries();
|
|
946
|
+
};
|
|
947
|
+
Set3.prototype["@@iterator"] = function() {
|
|
948
|
+
return this.keys();
|
|
949
|
+
};
|
|
950
|
+
Set3.prototype[iteratorSymbol] = function() {
|
|
951
|
+
return this.keys();
|
|
952
|
+
};
|
|
953
|
+
return Set3;
|
|
954
|
+
}();
|
|
955
|
+
return Set2;
|
|
956
|
+
}
|
|
957
|
+
function CreateWeakMapPolyfill() {
|
|
958
|
+
var UUID_SIZE = 16;
|
|
959
|
+
var keys = HashMap.create();
|
|
960
|
+
var rootKey = CreateUniqueKey();
|
|
961
|
+
return function() {
|
|
962
|
+
function WeakMap2() {
|
|
963
|
+
this._key = CreateUniqueKey();
|
|
964
|
+
}
|
|
965
|
+
WeakMap2.prototype.has = function(target) {
|
|
966
|
+
var table = GetOrCreateWeakMapTable(target, false);
|
|
967
|
+
return table !== undefined ? HashMap.has(table, this._key) : false;
|
|
968
|
+
};
|
|
969
|
+
WeakMap2.prototype.get = function(target) {
|
|
970
|
+
var table = GetOrCreateWeakMapTable(target, false);
|
|
971
|
+
return table !== undefined ? HashMap.get(table, this._key) : undefined;
|
|
972
|
+
};
|
|
973
|
+
WeakMap2.prototype.set = function(target, value) {
|
|
974
|
+
var table = GetOrCreateWeakMapTable(target, true);
|
|
975
|
+
table[this._key] = value;
|
|
976
|
+
return this;
|
|
977
|
+
};
|
|
978
|
+
WeakMap2.prototype.delete = function(target) {
|
|
979
|
+
var table = GetOrCreateWeakMapTable(target, false);
|
|
980
|
+
return table !== undefined ? delete table[this._key] : false;
|
|
981
|
+
};
|
|
982
|
+
WeakMap2.prototype.clear = function() {
|
|
983
|
+
this._key = CreateUniqueKey();
|
|
984
|
+
};
|
|
985
|
+
return WeakMap2;
|
|
986
|
+
}();
|
|
987
|
+
function CreateUniqueKey() {
|
|
988
|
+
var key;
|
|
989
|
+
do
|
|
990
|
+
key = "@@WeakMap@@" + CreateUUID();
|
|
991
|
+
while (HashMap.has(keys, key));
|
|
992
|
+
keys[key] = true;
|
|
993
|
+
return key;
|
|
994
|
+
}
|
|
995
|
+
function GetOrCreateWeakMapTable(target, create) {
|
|
996
|
+
if (!hasOwn.call(target, rootKey)) {
|
|
997
|
+
if (!create)
|
|
998
|
+
return;
|
|
999
|
+
Object.defineProperty(target, rootKey, { value: HashMap.create() });
|
|
1000
|
+
}
|
|
1001
|
+
return target[rootKey];
|
|
1002
|
+
}
|
|
1003
|
+
function FillRandomBytes(buffer, size) {
|
|
1004
|
+
for (var i = 0;i < size; ++i)
|
|
1005
|
+
buffer[i] = Math.random() * 255 | 0;
|
|
1006
|
+
return buffer;
|
|
1007
|
+
}
|
|
1008
|
+
function GenRandomBytes(size) {
|
|
1009
|
+
if (typeof Uint8Array === "function") {
|
|
1010
|
+
var array = new Uint8Array(size);
|
|
1011
|
+
if (typeof crypto !== "undefined") {
|
|
1012
|
+
crypto.getRandomValues(array);
|
|
1013
|
+
} else if (typeof msCrypto !== "undefined") {
|
|
1014
|
+
msCrypto.getRandomValues(array);
|
|
1015
|
+
} else {
|
|
1016
|
+
FillRandomBytes(array, size);
|
|
1017
|
+
}
|
|
1018
|
+
return array;
|
|
1019
|
+
}
|
|
1020
|
+
return FillRandomBytes(new Array(size), size);
|
|
1021
|
+
}
|
|
1022
|
+
function CreateUUID() {
|
|
1023
|
+
var data = GenRandomBytes(UUID_SIZE);
|
|
1024
|
+
data[6] = data[6] & 79 | 64;
|
|
1025
|
+
data[8] = data[8] & 191 | 128;
|
|
1026
|
+
var result = "";
|
|
1027
|
+
for (var offset = 0;offset < UUID_SIZE; ++offset) {
|
|
1028
|
+
var byte = data[offset];
|
|
1029
|
+
if (offset === 4 || offset === 6 || offset === 8)
|
|
1030
|
+
result += "-";
|
|
1031
|
+
if (byte < 16)
|
|
1032
|
+
result += "0";
|
|
1033
|
+
result += byte.toString(16).toLowerCase();
|
|
1034
|
+
}
|
|
1035
|
+
return result;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
function MakeDictionary(obj) {
|
|
1039
|
+
obj.__ = undefined;
|
|
1040
|
+
delete obj.__;
|
|
1041
|
+
return obj;
|
|
1042
|
+
}
|
|
1043
|
+
});
|
|
1044
|
+
})(Reflect2 || (Reflect2 = {}));
|
|
1045
|
+
});
|
|
1046
|
+
|
|
51
1047
|
// node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/core.js
|
|
52
1048
|
function $constructor(name, initializer, params) {
|
|
53
1049
|
function init(inst, def) {
|
|
@@ -14883,7 +15879,11 @@ var DAEMON_RUNTIME_DESCRIPTOR_FILENAME = "daemon.runtime.json", isRecord = (valu
|
|
|
14883
15879
|
homeDir: value.homeDir,
|
|
14884
15880
|
updatedAt: value.updatedAt
|
|
14885
15881
|
};
|
|
14886
|
-
}, resolveDaemonRuntimeDescriptorPath = (homeDir) => join2(resolve6(homeDir), ".agenter", DAEMON_RUNTIME_DESCRIPTOR_FILENAME),
|
|
15882
|
+
}, resolveDaemonRuntimeDescriptorPath = (homeDir) => join2(resolve6(homeDir), ".agenter", DAEMON_RUNTIME_DESCRIPTOR_FILENAME), resolveDaemonLogDir = (homeDir) => join2(resolve6(homeDir), ".agenter", "logs", "daemon"), resolveDaemonLogPath = (homeDir, authority, startedAt = new Date) => {
|
|
15883
|
+
const safeHost = authority.host.replace(/[^a-zA-Z0-9_.-]/gu, "_");
|
|
15884
|
+
const safeStartedAt = startedAt.toISOString().replace(/[:.]/gu, "-");
|
|
15885
|
+
return join2(resolveDaemonLogDir(homeDir), `${safeStartedAt}-${safeHost}-${authority.port}.log`);
|
|
15886
|
+
}, readDaemonRuntimeDescriptor = (homeDir) => {
|
|
14887
15887
|
const filePath = resolveDaemonRuntimeDescriptorPath(homeDir);
|
|
14888
15888
|
try {
|
|
14889
15889
|
return normalizeDaemonRuntimeDescriptor(JSON.parse(readFileSync4(filePath, "utf8")));
|
|
@@ -119939,1002 +120939,6 @@ var init_getCertificateInfo = __esm(() => {
|
|
|
119939
120939
|
};
|
|
119940
120940
|
});
|
|
119941
120941
|
|
|
119942
|
-
// node_modules/.bun/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js
|
|
119943
|
-
var require_Reflect = __commonJS(() => {
|
|
119944
|
-
/*! *****************************************************************************
|
|
119945
|
-
Copyright (C) Microsoft. All rights reserved.
|
|
119946
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
119947
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
119948
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
119949
|
-
|
|
119950
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
119951
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
119952
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
119953
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
119954
|
-
|
|
119955
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
119956
|
-
and limitations under the License.
|
|
119957
|
-
***************************************************************************** */
|
|
119958
|
-
var Reflect2;
|
|
119959
|
-
(function(Reflect3) {
|
|
119960
|
-
(function(factory) {
|
|
119961
|
-
var root = typeof globalThis === "object" ? globalThis : typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : sloppyModeThis();
|
|
119962
|
-
var exporter = makeExporter(Reflect3);
|
|
119963
|
-
if (typeof root.Reflect !== "undefined") {
|
|
119964
|
-
exporter = makeExporter(root.Reflect, exporter);
|
|
119965
|
-
}
|
|
119966
|
-
factory(exporter, root);
|
|
119967
|
-
if (typeof root.Reflect === "undefined") {
|
|
119968
|
-
root.Reflect = Reflect3;
|
|
119969
|
-
}
|
|
119970
|
-
function makeExporter(target, previous) {
|
|
119971
|
-
return function(key, value) {
|
|
119972
|
-
Object.defineProperty(target, key, { configurable: true, writable: true, value });
|
|
119973
|
-
if (previous)
|
|
119974
|
-
previous(key, value);
|
|
119975
|
-
};
|
|
119976
|
-
}
|
|
119977
|
-
function functionThis() {
|
|
119978
|
-
try {
|
|
119979
|
-
return Function("return this;")();
|
|
119980
|
-
} catch (_) {}
|
|
119981
|
-
}
|
|
119982
|
-
function indirectEvalThis() {
|
|
119983
|
-
try {
|
|
119984
|
-
return (undefined, eval)("(function() { return this; })()");
|
|
119985
|
-
} catch (_) {}
|
|
119986
|
-
}
|
|
119987
|
-
function sloppyModeThis() {
|
|
119988
|
-
return functionThis() || indirectEvalThis();
|
|
119989
|
-
}
|
|
119990
|
-
})(function(exporter, root) {
|
|
119991
|
-
var hasOwn4 = Object.prototype.hasOwnProperty;
|
|
119992
|
-
var supportsSymbol = typeof Symbol === "function";
|
|
119993
|
-
var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
|
|
119994
|
-
var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
|
|
119995
|
-
var supportsCreate = typeof Object.create === "function";
|
|
119996
|
-
var supportsProto = { __proto__: [] } instanceof Array;
|
|
119997
|
-
var downLevel = !supportsCreate && !supportsProto;
|
|
119998
|
-
var HashMap = {
|
|
119999
|
-
create: supportsCreate ? function() {
|
|
120000
|
-
return MakeDictionary(Object.create(null));
|
|
120001
|
-
} : supportsProto ? function() {
|
|
120002
|
-
return MakeDictionary({ __proto__: null });
|
|
120003
|
-
} : function() {
|
|
120004
|
-
return MakeDictionary({});
|
|
120005
|
-
},
|
|
120006
|
-
has: downLevel ? function(map2, key) {
|
|
120007
|
-
return hasOwn4.call(map2, key);
|
|
120008
|
-
} : function(map2, key) {
|
|
120009
|
-
return key in map2;
|
|
120010
|
-
},
|
|
120011
|
-
get: downLevel ? function(map2, key) {
|
|
120012
|
-
return hasOwn4.call(map2, key) ? map2[key] : undefined;
|
|
120013
|
-
} : function(map2, key) {
|
|
120014
|
-
return map2[key];
|
|
120015
|
-
}
|
|
120016
|
-
};
|
|
120017
|
-
var functionPrototype = Object.getPrototypeOf(Function);
|
|
120018
|
-
var _Map = typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill();
|
|
120019
|
-
var _Set = typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill();
|
|
120020
|
-
var _WeakMap = typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
|
|
120021
|
-
var registrySymbol = supportsSymbol ? Symbol.for("@reflect-metadata:registry") : undefined;
|
|
120022
|
-
var metadataRegistry = GetOrCreateMetadataRegistry();
|
|
120023
|
-
var metadataProvider = CreateMetadataProvider(metadataRegistry);
|
|
120024
|
-
function decorate(decorators, target, propertyKey, attributes) {
|
|
120025
|
-
if (!IsUndefined(propertyKey)) {
|
|
120026
|
-
if (!IsArray(decorators))
|
|
120027
|
-
throw new TypeError;
|
|
120028
|
-
if (!IsObject(target))
|
|
120029
|
-
throw new TypeError;
|
|
120030
|
-
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))
|
|
120031
|
-
throw new TypeError;
|
|
120032
|
-
if (IsNull(attributes))
|
|
120033
|
-
attributes = undefined;
|
|
120034
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
120035
|
-
return DecorateProperty(decorators, target, propertyKey, attributes);
|
|
120036
|
-
} else {
|
|
120037
|
-
if (!IsArray(decorators))
|
|
120038
|
-
throw new TypeError;
|
|
120039
|
-
if (!IsConstructor(target))
|
|
120040
|
-
throw new TypeError;
|
|
120041
|
-
return DecorateConstructor(decorators, target);
|
|
120042
|
-
}
|
|
120043
|
-
}
|
|
120044
|
-
exporter("decorate", decorate);
|
|
120045
|
-
function metadata(metadataKey, metadataValue) {
|
|
120046
|
-
function decorator(target, propertyKey) {
|
|
120047
|
-
if (!IsObject(target))
|
|
120048
|
-
throw new TypeError;
|
|
120049
|
-
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))
|
|
120050
|
-
throw new TypeError;
|
|
120051
|
-
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
120052
|
-
}
|
|
120053
|
-
return decorator;
|
|
120054
|
-
}
|
|
120055
|
-
exporter("metadata", metadata);
|
|
120056
|
-
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
120057
|
-
if (!IsObject(target))
|
|
120058
|
-
throw new TypeError;
|
|
120059
|
-
if (!IsUndefined(propertyKey))
|
|
120060
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
120061
|
-
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
120062
|
-
}
|
|
120063
|
-
exporter("defineMetadata", defineMetadata);
|
|
120064
|
-
function hasMetadata(metadataKey, target, propertyKey) {
|
|
120065
|
-
if (!IsObject(target))
|
|
120066
|
-
throw new TypeError;
|
|
120067
|
-
if (!IsUndefined(propertyKey))
|
|
120068
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
120069
|
-
return OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
120070
|
-
}
|
|
120071
|
-
exporter("hasMetadata", hasMetadata);
|
|
120072
|
-
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
120073
|
-
if (!IsObject(target))
|
|
120074
|
-
throw new TypeError;
|
|
120075
|
-
if (!IsUndefined(propertyKey))
|
|
120076
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
120077
|
-
return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
120078
|
-
}
|
|
120079
|
-
exporter("hasOwnMetadata", hasOwnMetadata);
|
|
120080
|
-
function getMetadata(metadataKey, target, propertyKey) {
|
|
120081
|
-
if (!IsObject(target))
|
|
120082
|
-
throw new TypeError;
|
|
120083
|
-
if (!IsUndefined(propertyKey))
|
|
120084
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
120085
|
-
return OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
120086
|
-
}
|
|
120087
|
-
exporter("getMetadata", getMetadata);
|
|
120088
|
-
function getOwnMetadata(metadataKey, target, propertyKey) {
|
|
120089
|
-
if (!IsObject(target))
|
|
120090
|
-
throw new TypeError;
|
|
120091
|
-
if (!IsUndefined(propertyKey))
|
|
120092
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
120093
|
-
return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
|
|
120094
|
-
}
|
|
120095
|
-
exporter("getOwnMetadata", getOwnMetadata);
|
|
120096
|
-
function getMetadataKeys(target, propertyKey) {
|
|
120097
|
-
if (!IsObject(target))
|
|
120098
|
-
throw new TypeError;
|
|
120099
|
-
if (!IsUndefined(propertyKey))
|
|
120100
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
120101
|
-
return OrdinaryMetadataKeys(target, propertyKey);
|
|
120102
|
-
}
|
|
120103
|
-
exporter("getMetadataKeys", getMetadataKeys);
|
|
120104
|
-
function getOwnMetadataKeys(target, propertyKey) {
|
|
120105
|
-
if (!IsObject(target))
|
|
120106
|
-
throw new TypeError;
|
|
120107
|
-
if (!IsUndefined(propertyKey))
|
|
120108
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
120109
|
-
return OrdinaryOwnMetadataKeys(target, propertyKey);
|
|
120110
|
-
}
|
|
120111
|
-
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
|
|
120112
|
-
function deleteMetadata(metadataKey, target, propertyKey) {
|
|
120113
|
-
if (!IsObject(target))
|
|
120114
|
-
throw new TypeError;
|
|
120115
|
-
if (!IsUndefined(propertyKey))
|
|
120116
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
120117
|
-
if (!IsObject(target))
|
|
120118
|
-
throw new TypeError;
|
|
120119
|
-
if (!IsUndefined(propertyKey))
|
|
120120
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
120121
|
-
var provider = GetMetadataProvider(target, propertyKey, false);
|
|
120122
|
-
if (IsUndefined(provider))
|
|
120123
|
-
return false;
|
|
120124
|
-
return provider.OrdinaryDeleteMetadata(metadataKey, target, propertyKey);
|
|
120125
|
-
}
|
|
120126
|
-
exporter("deleteMetadata", deleteMetadata);
|
|
120127
|
-
function DecorateConstructor(decorators, target) {
|
|
120128
|
-
for (var i = decorators.length - 1;i >= 0; --i) {
|
|
120129
|
-
var decorator = decorators[i];
|
|
120130
|
-
var decorated = decorator(target);
|
|
120131
|
-
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
120132
|
-
if (!IsConstructor(decorated))
|
|
120133
|
-
throw new TypeError;
|
|
120134
|
-
target = decorated;
|
|
120135
|
-
}
|
|
120136
|
-
}
|
|
120137
|
-
return target;
|
|
120138
|
-
}
|
|
120139
|
-
function DecorateProperty(decorators, target, propertyKey, descriptor) {
|
|
120140
|
-
for (var i = decorators.length - 1;i >= 0; --i) {
|
|
120141
|
-
var decorator = decorators[i];
|
|
120142
|
-
var decorated = decorator(target, propertyKey, descriptor);
|
|
120143
|
-
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
120144
|
-
if (!IsObject(decorated))
|
|
120145
|
-
throw new TypeError;
|
|
120146
|
-
descriptor = decorated;
|
|
120147
|
-
}
|
|
120148
|
-
}
|
|
120149
|
-
return descriptor;
|
|
120150
|
-
}
|
|
120151
|
-
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
120152
|
-
var hasOwn5 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
120153
|
-
if (hasOwn5)
|
|
120154
|
-
return true;
|
|
120155
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
120156
|
-
if (!IsNull(parent))
|
|
120157
|
-
return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
120158
|
-
return false;
|
|
120159
|
-
}
|
|
120160
|
-
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
120161
|
-
var provider = GetMetadataProvider(O, P, false);
|
|
120162
|
-
if (IsUndefined(provider))
|
|
120163
|
-
return false;
|
|
120164
|
-
return ToBoolean(provider.OrdinaryHasOwnMetadata(MetadataKey, O, P));
|
|
120165
|
-
}
|
|
120166
|
-
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
120167
|
-
var hasOwn5 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
120168
|
-
if (hasOwn5)
|
|
120169
|
-
return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
120170
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
120171
|
-
if (!IsNull(parent))
|
|
120172
|
-
return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
120173
|
-
return;
|
|
120174
|
-
}
|
|
120175
|
-
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
120176
|
-
var provider = GetMetadataProvider(O, P, false);
|
|
120177
|
-
if (IsUndefined(provider))
|
|
120178
|
-
return;
|
|
120179
|
-
return provider.OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
120180
|
-
}
|
|
120181
|
-
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
120182
|
-
var provider = GetMetadataProvider(O, P, true);
|
|
120183
|
-
provider.OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P);
|
|
120184
|
-
}
|
|
120185
|
-
function OrdinaryMetadataKeys(O, P) {
|
|
120186
|
-
var ownKeys = OrdinaryOwnMetadataKeys(O, P);
|
|
120187
|
-
var parent = OrdinaryGetPrototypeOf(O);
|
|
120188
|
-
if (parent === null)
|
|
120189
|
-
return ownKeys;
|
|
120190
|
-
var parentKeys = OrdinaryMetadataKeys(parent, P);
|
|
120191
|
-
if (parentKeys.length <= 0)
|
|
120192
|
-
return ownKeys;
|
|
120193
|
-
if (ownKeys.length <= 0)
|
|
120194
|
-
return parentKeys;
|
|
120195
|
-
var set2 = new _Set;
|
|
120196
|
-
var keys = [];
|
|
120197
|
-
for (var _i = 0, ownKeys_1 = ownKeys;_i < ownKeys_1.length; _i++) {
|
|
120198
|
-
var key = ownKeys_1[_i];
|
|
120199
|
-
var hasKey = set2.has(key);
|
|
120200
|
-
if (!hasKey) {
|
|
120201
|
-
set2.add(key);
|
|
120202
|
-
keys.push(key);
|
|
120203
|
-
}
|
|
120204
|
-
}
|
|
120205
|
-
for (var _a9 = 0, parentKeys_1 = parentKeys;_a9 < parentKeys_1.length; _a9++) {
|
|
120206
|
-
var key = parentKeys_1[_a9];
|
|
120207
|
-
var hasKey = set2.has(key);
|
|
120208
|
-
if (!hasKey) {
|
|
120209
|
-
set2.add(key);
|
|
120210
|
-
keys.push(key);
|
|
120211
|
-
}
|
|
120212
|
-
}
|
|
120213
|
-
return keys;
|
|
120214
|
-
}
|
|
120215
|
-
function OrdinaryOwnMetadataKeys(O, P) {
|
|
120216
|
-
var provider = GetMetadataProvider(O, P, false);
|
|
120217
|
-
if (!provider) {
|
|
120218
|
-
return [];
|
|
120219
|
-
}
|
|
120220
|
-
return provider.OrdinaryOwnMetadataKeys(O, P);
|
|
120221
|
-
}
|
|
120222
|
-
function Type2(x) {
|
|
120223
|
-
if (x === null)
|
|
120224
|
-
return 1;
|
|
120225
|
-
switch (typeof x) {
|
|
120226
|
-
case "undefined":
|
|
120227
|
-
return 0;
|
|
120228
|
-
case "boolean":
|
|
120229
|
-
return 2;
|
|
120230
|
-
case "string":
|
|
120231
|
-
return 3;
|
|
120232
|
-
case "symbol":
|
|
120233
|
-
return 4;
|
|
120234
|
-
case "number":
|
|
120235
|
-
return 5;
|
|
120236
|
-
case "object":
|
|
120237
|
-
return x === null ? 1 : 6;
|
|
120238
|
-
default:
|
|
120239
|
-
return 6;
|
|
120240
|
-
}
|
|
120241
|
-
}
|
|
120242
|
-
function IsUndefined(x) {
|
|
120243
|
-
return x === undefined;
|
|
120244
|
-
}
|
|
120245
|
-
function IsNull(x) {
|
|
120246
|
-
return x === null;
|
|
120247
|
-
}
|
|
120248
|
-
function IsSymbol(x) {
|
|
120249
|
-
return typeof x === "symbol";
|
|
120250
|
-
}
|
|
120251
|
-
function IsObject(x) {
|
|
120252
|
-
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
120253
|
-
}
|
|
120254
|
-
function ToPrimitive(input, PreferredType) {
|
|
120255
|
-
switch (Type2(input)) {
|
|
120256
|
-
case 0:
|
|
120257
|
-
return input;
|
|
120258
|
-
case 1:
|
|
120259
|
-
return input;
|
|
120260
|
-
case 2:
|
|
120261
|
-
return input;
|
|
120262
|
-
case 3:
|
|
120263
|
-
return input;
|
|
120264
|
-
case 4:
|
|
120265
|
-
return input;
|
|
120266
|
-
case 5:
|
|
120267
|
-
return input;
|
|
120268
|
-
}
|
|
120269
|
-
var hint = PreferredType === 3 ? "string" : PreferredType === 5 ? "number" : "default";
|
|
120270
|
-
var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
120271
|
-
if (exoticToPrim !== undefined) {
|
|
120272
|
-
var result = exoticToPrim.call(input, hint);
|
|
120273
|
-
if (IsObject(result))
|
|
120274
|
-
throw new TypeError;
|
|
120275
|
-
return result;
|
|
120276
|
-
}
|
|
120277
|
-
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
120278
|
-
}
|
|
120279
|
-
function OrdinaryToPrimitive(O, hint) {
|
|
120280
|
-
if (hint === "string") {
|
|
120281
|
-
var toString_1 = O.toString;
|
|
120282
|
-
if (IsCallable(toString_1)) {
|
|
120283
|
-
var result = toString_1.call(O);
|
|
120284
|
-
if (!IsObject(result))
|
|
120285
|
-
return result;
|
|
120286
|
-
}
|
|
120287
|
-
var valueOf = O.valueOf;
|
|
120288
|
-
if (IsCallable(valueOf)) {
|
|
120289
|
-
var result = valueOf.call(O);
|
|
120290
|
-
if (!IsObject(result))
|
|
120291
|
-
return result;
|
|
120292
|
-
}
|
|
120293
|
-
} else {
|
|
120294
|
-
var valueOf = O.valueOf;
|
|
120295
|
-
if (IsCallable(valueOf)) {
|
|
120296
|
-
var result = valueOf.call(O);
|
|
120297
|
-
if (!IsObject(result))
|
|
120298
|
-
return result;
|
|
120299
|
-
}
|
|
120300
|
-
var toString_2 = O.toString;
|
|
120301
|
-
if (IsCallable(toString_2)) {
|
|
120302
|
-
var result = toString_2.call(O);
|
|
120303
|
-
if (!IsObject(result))
|
|
120304
|
-
return result;
|
|
120305
|
-
}
|
|
120306
|
-
}
|
|
120307
|
-
throw new TypeError;
|
|
120308
|
-
}
|
|
120309
|
-
function ToBoolean(argument) {
|
|
120310
|
-
return !!argument;
|
|
120311
|
-
}
|
|
120312
|
-
function ToString(argument) {
|
|
120313
|
-
return "" + argument;
|
|
120314
|
-
}
|
|
120315
|
-
function ToPropertyKey(argument) {
|
|
120316
|
-
var key = ToPrimitive(argument, 3);
|
|
120317
|
-
if (IsSymbol(key))
|
|
120318
|
-
return key;
|
|
120319
|
-
return ToString(key);
|
|
120320
|
-
}
|
|
120321
|
-
function IsArray(argument) {
|
|
120322
|
-
return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]";
|
|
120323
|
-
}
|
|
120324
|
-
function IsCallable(argument) {
|
|
120325
|
-
return typeof argument === "function";
|
|
120326
|
-
}
|
|
120327
|
-
function IsConstructor(argument) {
|
|
120328
|
-
return typeof argument === "function";
|
|
120329
|
-
}
|
|
120330
|
-
function IsPropertyKey(argument) {
|
|
120331
|
-
switch (Type2(argument)) {
|
|
120332
|
-
case 3:
|
|
120333
|
-
return true;
|
|
120334
|
-
case 4:
|
|
120335
|
-
return true;
|
|
120336
|
-
default:
|
|
120337
|
-
return false;
|
|
120338
|
-
}
|
|
120339
|
-
}
|
|
120340
|
-
function SameValueZero(x, y) {
|
|
120341
|
-
return x === y || x !== x && y !== y;
|
|
120342
|
-
}
|
|
120343
|
-
function GetMethod(V, P) {
|
|
120344
|
-
var func = V[P];
|
|
120345
|
-
if (func === undefined || func === null)
|
|
120346
|
-
return;
|
|
120347
|
-
if (!IsCallable(func))
|
|
120348
|
-
throw new TypeError;
|
|
120349
|
-
return func;
|
|
120350
|
-
}
|
|
120351
|
-
function GetIterator(obj) {
|
|
120352
|
-
var method = GetMethod(obj, iteratorSymbol);
|
|
120353
|
-
if (!IsCallable(method))
|
|
120354
|
-
throw new TypeError;
|
|
120355
|
-
var iterator = method.call(obj);
|
|
120356
|
-
if (!IsObject(iterator))
|
|
120357
|
-
throw new TypeError;
|
|
120358
|
-
return iterator;
|
|
120359
|
-
}
|
|
120360
|
-
function IteratorValue(iterResult) {
|
|
120361
|
-
return iterResult.value;
|
|
120362
|
-
}
|
|
120363
|
-
function IteratorStep(iterator) {
|
|
120364
|
-
var result = iterator.next();
|
|
120365
|
-
return result.done ? false : result;
|
|
120366
|
-
}
|
|
120367
|
-
function IteratorClose(iterator) {
|
|
120368
|
-
var f = iterator["return"];
|
|
120369
|
-
if (f)
|
|
120370
|
-
f.call(iterator);
|
|
120371
|
-
}
|
|
120372
|
-
function OrdinaryGetPrototypeOf(O) {
|
|
120373
|
-
var proto = Object.getPrototypeOf(O);
|
|
120374
|
-
if (typeof O !== "function" || O === functionPrototype)
|
|
120375
|
-
return proto;
|
|
120376
|
-
if (proto !== functionPrototype)
|
|
120377
|
-
return proto;
|
|
120378
|
-
var prototype = O.prototype;
|
|
120379
|
-
var prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
120380
|
-
if (prototypeProto == null || prototypeProto === Object.prototype)
|
|
120381
|
-
return proto;
|
|
120382
|
-
var constructor = prototypeProto.constructor;
|
|
120383
|
-
if (typeof constructor !== "function")
|
|
120384
|
-
return proto;
|
|
120385
|
-
if (constructor === O)
|
|
120386
|
-
return proto;
|
|
120387
|
-
return constructor;
|
|
120388
|
-
}
|
|
120389
|
-
function CreateMetadataRegistry() {
|
|
120390
|
-
var fallback2;
|
|
120391
|
-
if (!IsUndefined(registrySymbol) && typeof root.Reflect !== "undefined" && !(registrySymbol in root.Reflect) && typeof root.Reflect.defineMetadata === "function") {
|
|
120392
|
-
fallback2 = CreateFallbackProvider(root.Reflect);
|
|
120393
|
-
}
|
|
120394
|
-
var first;
|
|
120395
|
-
var second;
|
|
120396
|
-
var rest;
|
|
120397
|
-
var targetProviderMap = new _WeakMap;
|
|
120398
|
-
var registry2 = {
|
|
120399
|
-
registerProvider,
|
|
120400
|
-
getProvider,
|
|
120401
|
-
setProvider
|
|
120402
|
-
};
|
|
120403
|
-
return registry2;
|
|
120404
|
-
function registerProvider(provider) {
|
|
120405
|
-
if (!Object.isExtensible(registry2)) {
|
|
120406
|
-
throw new Error("Cannot add provider to a frozen registry.");
|
|
120407
|
-
}
|
|
120408
|
-
switch (true) {
|
|
120409
|
-
case fallback2 === provider:
|
|
120410
|
-
break;
|
|
120411
|
-
case IsUndefined(first):
|
|
120412
|
-
first = provider;
|
|
120413
|
-
break;
|
|
120414
|
-
case first === provider:
|
|
120415
|
-
break;
|
|
120416
|
-
case IsUndefined(second):
|
|
120417
|
-
second = provider;
|
|
120418
|
-
break;
|
|
120419
|
-
case second === provider:
|
|
120420
|
-
break;
|
|
120421
|
-
default:
|
|
120422
|
-
if (rest === undefined)
|
|
120423
|
-
rest = new _Set;
|
|
120424
|
-
rest.add(provider);
|
|
120425
|
-
break;
|
|
120426
|
-
}
|
|
120427
|
-
}
|
|
120428
|
-
function getProviderNoCache(O, P) {
|
|
120429
|
-
if (!IsUndefined(first)) {
|
|
120430
|
-
if (first.isProviderFor(O, P))
|
|
120431
|
-
return first;
|
|
120432
|
-
if (!IsUndefined(second)) {
|
|
120433
|
-
if (second.isProviderFor(O, P))
|
|
120434
|
-
return first;
|
|
120435
|
-
if (!IsUndefined(rest)) {
|
|
120436
|
-
var iterator = GetIterator(rest);
|
|
120437
|
-
while (true) {
|
|
120438
|
-
var next = IteratorStep(iterator);
|
|
120439
|
-
if (!next) {
|
|
120440
|
-
return;
|
|
120441
|
-
}
|
|
120442
|
-
var provider = IteratorValue(next);
|
|
120443
|
-
if (provider.isProviderFor(O, P)) {
|
|
120444
|
-
IteratorClose(iterator);
|
|
120445
|
-
return provider;
|
|
120446
|
-
}
|
|
120447
|
-
}
|
|
120448
|
-
}
|
|
120449
|
-
}
|
|
120450
|
-
}
|
|
120451
|
-
if (!IsUndefined(fallback2) && fallback2.isProviderFor(O, P)) {
|
|
120452
|
-
return fallback2;
|
|
120453
|
-
}
|
|
120454
|
-
return;
|
|
120455
|
-
}
|
|
120456
|
-
function getProvider(O, P) {
|
|
120457
|
-
var providerMap = targetProviderMap.get(O);
|
|
120458
|
-
var provider;
|
|
120459
|
-
if (!IsUndefined(providerMap)) {
|
|
120460
|
-
provider = providerMap.get(P);
|
|
120461
|
-
}
|
|
120462
|
-
if (!IsUndefined(provider)) {
|
|
120463
|
-
return provider;
|
|
120464
|
-
}
|
|
120465
|
-
provider = getProviderNoCache(O, P);
|
|
120466
|
-
if (!IsUndefined(provider)) {
|
|
120467
|
-
if (IsUndefined(providerMap)) {
|
|
120468
|
-
providerMap = new _Map;
|
|
120469
|
-
targetProviderMap.set(O, providerMap);
|
|
120470
|
-
}
|
|
120471
|
-
providerMap.set(P, provider);
|
|
120472
|
-
}
|
|
120473
|
-
return provider;
|
|
120474
|
-
}
|
|
120475
|
-
function hasProvider(provider) {
|
|
120476
|
-
if (IsUndefined(provider))
|
|
120477
|
-
throw new TypeError;
|
|
120478
|
-
return first === provider || second === provider || !IsUndefined(rest) && rest.has(provider);
|
|
120479
|
-
}
|
|
120480
|
-
function setProvider(O, P, provider) {
|
|
120481
|
-
if (!hasProvider(provider)) {
|
|
120482
|
-
throw new Error("Metadata provider not registered.");
|
|
120483
|
-
}
|
|
120484
|
-
var existingProvider = getProvider(O, P);
|
|
120485
|
-
if (existingProvider !== provider) {
|
|
120486
|
-
if (!IsUndefined(existingProvider)) {
|
|
120487
|
-
return false;
|
|
120488
|
-
}
|
|
120489
|
-
var providerMap = targetProviderMap.get(O);
|
|
120490
|
-
if (IsUndefined(providerMap)) {
|
|
120491
|
-
providerMap = new _Map;
|
|
120492
|
-
targetProviderMap.set(O, providerMap);
|
|
120493
|
-
}
|
|
120494
|
-
providerMap.set(P, provider);
|
|
120495
|
-
}
|
|
120496
|
-
return true;
|
|
120497
|
-
}
|
|
120498
|
-
}
|
|
120499
|
-
function GetOrCreateMetadataRegistry() {
|
|
120500
|
-
var metadataRegistry2;
|
|
120501
|
-
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
120502
|
-
metadataRegistry2 = root.Reflect[registrySymbol];
|
|
120503
|
-
}
|
|
120504
|
-
if (IsUndefined(metadataRegistry2)) {
|
|
120505
|
-
metadataRegistry2 = CreateMetadataRegistry();
|
|
120506
|
-
}
|
|
120507
|
-
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
120508
|
-
Object.defineProperty(root.Reflect, registrySymbol, {
|
|
120509
|
-
enumerable: false,
|
|
120510
|
-
configurable: false,
|
|
120511
|
-
writable: false,
|
|
120512
|
-
value: metadataRegistry2
|
|
120513
|
-
});
|
|
120514
|
-
}
|
|
120515
|
-
return metadataRegistry2;
|
|
120516
|
-
}
|
|
120517
|
-
function CreateMetadataProvider(registry2) {
|
|
120518
|
-
var metadata2 = new _WeakMap;
|
|
120519
|
-
var provider = {
|
|
120520
|
-
isProviderFor: function(O, P) {
|
|
120521
|
-
var targetMetadata = metadata2.get(O);
|
|
120522
|
-
if (IsUndefined(targetMetadata))
|
|
120523
|
-
return false;
|
|
120524
|
-
return targetMetadata.has(P);
|
|
120525
|
-
},
|
|
120526
|
-
OrdinaryDefineOwnMetadata: OrdinaryDefineOwnMetadata2,
|
|
120527
|
-
OrdinaryHasOwnMetadata: OrdinaryHasOwnMetadata2,
|
|
120528
|
-
OrdinaryGetOwnMetadata: OrdinaryGetOwnMetadata2,
|
|
120529
|
-
OrdinaryOwnMetadataKeys: OrdinaryOwnMetadataKeys2,
|
|
120530
|
-
OrdinaryDeleteMetadata
|
|
120531
|
-
};
|
|
120532
|
-
metadataRegistry.registerProvider(provider);
|
|
120533
|
-
return provider;
|
|
120534
|
-
function GetOrCreateMetadataMap(O, P, Create) {
|
|
120535
|
-
var targetMetadata = metadata2.get(O);
|
|
120536
|
-
var createdTargetMetadata = false;
|
|
120537
|
-
if (IsUndefined(targetMetadata)) {
|
|
120538
|
-
if (!Create)
|
|
120539
|
-
return;
|
|
120540
|
-
targetMetadata = new _Map;
|
|
120541
|
-
metadata2.set(O, targetMetadata);
|
|
120542
|
-
createdTargetMetadata = true;
|
|
120543
|
-
}
|
|
120544
|
-
var metadataMap = targetMetadata.get(P);
|
|
120545
|
-
if (IsUndefined(metadataMap)) {
|
|
120546
|
-
if (!Create)
|
|
120547
|
-
return;
|
|
120548
|
-
metadataMap = new _Map;
|
|
120549
|
-
targetMetadata.set(P, metadataMap);
|
|
120550
|
-
if (!registry2.setProvider(O, P, provider)) {
|
|
120551
|
-
targetMetadata.delete(P);
|
|
120552
|
-
if (createdTargetMetadata) {
|
|
120553
|
-
metadata2.delete(O);
|
|
120554
|
-
}
|
|
120555
|
-
throw new Error("Wrong provider for target.");
|
|
120556
|
-
}
|
|
120557
|
-
}
|
|
120558
|
-
return metadataMap;
|
|
120559
|
-
}
|
|
120560
|
-
function OrdinaryHasOwnMetadata2(MetadataKey, O, P) {
|
|
120561
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
120562
|
-
if (IsUndefined(metadataMap))
|
|
120563
|
-
return false;
|
|
120564
|
-
return ToBoolean(metadataMap.has(MetadataKey));
|
|
120565
|
-
}
|
|
120566
|
-
function OrdinaryGetOwnMetadata2(MetadataKey, O, P) {
|
|
120567
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
120568
|
-
if (IsUndefined(metadataMap))
|
|
120569
|
-
return;
|
|
120570
|
-
return metadataMap.get(MetadataKey);
|
|
120571
|
-
}
|
|
120572
|
-
function OrdinaryDefineOwnMetadata2(MetadataKey, MetadataValue, O, P) {
|
|
120573
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, true);
|
|
120574
|
-
metadataMap.set(MetadataKey, MetadataValue);
|
|
120575
|
-
}
|
|
120576
|
-
function OrdinaryOwnMetadataKeys2(O, P) {
|
|
120577
|
-
var keys = [];
|
|
120578
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
120579
|
-
if (IsUndefined(metadataMap))
|
|
120580
|
-
return keys;
|
|
120581
|
-
var keysObj = metadataMap.keys();
|
|
120582
|
-
var iterator = GetIterator(keysObj);
|
|
120583
|
-
var k = 0;
|
|
120584
|
-
while (true) {
|
|
120585
|
-
var next = IteratorStep(iterator);
|
|
120586
|
-
if (!next) {
|
|
120587
|
-
keys.length = k;
|
|
120588
|
-
return keys;
|
|
120589
|
-
}
|
|
120590
|
-
var nextValue = IteratorValue(next);
|
|
120591
|
-
try {
|
|
120592
|
-
keys[k] = nextValue;
|
|
120593
|
-
} catch (e) {
|
|
120594
|
-
try {
|
|
120595
|
-
IteratorClose(iterator);
|
|
120596
|
-
} finally {
|
|
120597
|
-
throw e;
|
|
120598
|
-
}
|
|
120599
|
-
}
|
|
120600
|
-
k++;
|
|
120601
|
-
}
|
|
120602
|
-
}
|
|
120603
|
-
function OrdinaryDeleteMetadata(MetadataKey, O, P) {
|
|
120604
|
-
var metadataMap = GetOrCreateMetadataMap(O, P, false);
|
|
120605
|
-
if (IsUndefined(metadataMap))
|
|
120606
|
-
return false;
|
|
120607
|
-
if (!metadataMap.delete(MetadataKey))
|
|
120608
|
-
return false;
|
|
120609
|
-
if (metadataMap.size === 0) {
|
|
120610
|
-
var targetMetadata = metadata2.get(O);
|
|
120611
|
-
if (!IsUndefined(targetMetadata)) {
|
|
120612
|
-
targetMetadata.delete(P);
|
|
120613
|
-
if (targetMetadata.size === 0) {
|
|
120614
|
-
metadata2.delete(targetMetadata);
|
|
120615
|
-
}
|
|
120616
|
-
}
|
|
120617
|
-
}
|
|
120618
|
-
return true;
|
|
120619
|
-
}
|
|
120620
|
-
}
|
|
120621
|
-
function CreateFallbackProvider(reflect) {
|
|
120622
|
-
var { defineMetadata: defineMetadata2, hasOwnMetadata: hasOwnMetadata2, getOwnMetadata: getOwnMetadata2, getOwnMetadataKeys: getOwnMetadataKeys2, deleteMetadata: deleteMetadata2 } = reflect;
|
|
120623
|
-
var metadataOwner = new _WeakMap;
|
|
120624
|
-
var provider = {
|
|
120625
|
-
isProviderFor: function(O, P) {
|
|
120626
|
-
var metadataPropertySet = metadataOwner.get(O);
|
|
120627
|
-
if (!IsUndefined(metadataPropertySet) && metadataPropertySet.has(P)) {
|
|
120628
|
-
return true;
|
|
120629
|
-
}
|
|
120630
|
-
if (getOwnMetadataKeys2(O, P).length) {
|
|
120631
|
-
if (IsUndefined(metadataPropertySet)) {
|
|
120632
|
-
metadataPropertySet = new _Set;
|
|
120633
|
-
metadataOwner.set(O, metadataPropertySet);
|
|
120634
|
-
}
|
|
120635
|
-
metadataPropertySet.add(P);
|
|
120636
|
-
return true;
|
|
120637
|
-
}
|
|
120638
|
-
return false;
|
|
120639
|
-
},
|
|
120640
|
-
OrdinaryDefineOwnMetadata: defineMetadata2,
|
|
120641
|
-
OrdinaryHasOwnMetadata: hasOwnMetadata2,
|
|
120642
|
-
OrdinaryGetOwnMetadata: getOwnMetadata2,
|
|
120643
|
-
OrdinaryOwnMetadataKeys: getOwnMetadataKeys2,
|
|
120644
|
-
OrdinaryDeleteMetadata: deleteMetadata2
|
|
120645
|
-
};
|
|
120646
|
-
return provider;
|
|
120647
|
-
}
|
|
120648
|
-
function GetMetadataProvider(O, P, Create) {
|
|
120649
|
-
var registeredProvider = metadataRegistry.getProvider(O, P);
|
|
120650
|
-
if (!IsUndefined(registeredProvider)) {
|
|
120651
|
-
return registeredProvider;
|
|
120652
|
-
}
|
|
120653
|
-
if (Create) {
|
|
120654
|
-
if (metadataRegistry.setProvider(O, P, metadataProvider)) {
|
|
120655
|
-
return metadataProvider;
|
|
120656
|
-
}
|
|
120657
|
-
throw new Error("Illegal state.");
|
|
120658
|
-
}
|
|
120659
|
-
return;
|
|
120660
|
-
}
|
|
120661
|
-
function CreateMapPolyfill() {
|
|
120662
|
-
var cacheSentinel = {};
|
|
120663
|
-
var arraySentinel = [];
|
|
120664
|
-
var MapIterator = function() {
|
|
120665
|
-
function MapIterator2(keys, values2, selector) {
|
|
120666
|
-
this._index = 0;
|
|
120667
|
-
this._keys = keys;
|
|
120668
|
-
this._values = values2;
|
|
120669
|
-
this._selector = selector;
|
|
120670
|
-
}
|
|
120671
|
-
MapIterator2.prototype["@@iterator"] = function() {
|
|
120672
|
-
return this;
|
|
120673
|
-
};
|
|
120674
|
-
MapIterator2.prototype[iteratorSymbol] = function() {
|
|
120675
|
-
return this;
|
|
120676
|
-
};
|
|
120677
|
-
MapIterator2.prototype.next = function() {
|
|
120678
|
-
var index2 = this._index;
|
|
120679
|
-
if (index2 >= 0 && index2 < this._keys.length) {
|
|
120680
|
-
var result = this._selector(this._keys[index2], this._values[index2]);
|
|
120681
|
-
if (index2 + 1 >= this._keys.length) {
|
|
120682
|
-
this._index = -1;
|
|
120683
|
-
this._keys = arraySentinel;
|
|
120684
|
-
this._values = arraySentinel;
|
|
120685
|
-
} else {
|
|
120686
|
-
this._index++;
|
|
120687
|
-
}
|
|
120688
|
-
return { value: result, done: false };
|
|
120689
|
-
}
|
|
120690
|
-
return { value: undefined, done: true };
|
|
120691
|
-
};
|
|
120692
|
-
MapIterator2.prototype.throw = function(error53) {
|
|
120693
|
-
if (this._index >= 0) {
|
|
120694
|
-
this._index = -1;
|
|
120695
|
-
this._keys = arraySentinel;
|
|
120696
|
-
this._values = arraySentinel;
|
|
120697
|
-
}
|
|
120698
|
-
throw error53;
|
|
120699
|
-
};
|
|
120700
|
-
MapIterator2.prototype.return = function(value) {
|
|
120701
|
-
if (this._index >= 0) {
|
|
120702
|
-
this._index = -1;
|
|
120703
|
-
this._keys = arraySentinel;
|
|
120704
|
-
this._values = arraySentinel;
|
|
120705
|
-
}
|
|
120706
|
-
return { value, done: true };
|
|
120707
|
-
};
|
|
120708
|
-
return MapIterator2;
|
|
120709
|
-
}();
|
|
120710
|
-
var Map2 = function() {
|
|
120711
|
-
function Map3() {
|
|
120712
|
-
this._keys = [];
|
|
120713
|
-
this._values = [];
|
|
120714
|
-
this._cacheKey = cacheSentinel;
|
|
120715
|
-
this._cacheIndex = -2;
|
|
120716
|
-
}
|
|
120717
|
-
Object.defineProperty(Map3.prototype, "size", {
|
|
120718
|
-
get: function() {
|
|
120719
|
-
return this._keys.length;
|
|
120720
|
-
},
|
|
120721
|
-
enumerable: true,
|
|
120722
|
-
configurable: true
|
|
120723
|
-
});
|
|
120724
|
-
Map3.prototype.has = function(key) {
|
|
120725
|
-
return this._find(key, false) >= 0;
|
|
120726
|
-
};
|
|
120727
|
-
Map3.prototype.get = function(key) {
|
|
120728
|
-
var index2 = this._find(key, false);
|
|
120729
|
-
return index2 >= 0 ? this._values[index2] : undefined;
|
|
120730
|
-
};
|
|
120731
|
-
Map3.prototype.set = function(key, value) {
|
|
120732
|
-
var index2 = this._find(key, true);
|
|
120733
|
-
this._values[index2] = value;
|
|
120734
|
-
return this;
|
|
120735
|
-
};
|
|
120736
|
-
Map3.prototype.delete = function(key) {
|
|
120737
|
-
var index2 = this._find(key, false);
|
|
120738
|
-
if (index2 >= 0) {
|
|
120739
|
-
var size3 = this._keys.length;
|
|
120740
|
-
for (var i = index2 + 1;i < size3; i++) {
|
|
120741
|
-
this._keys[i - 1] = this._keys[i];
|
|
120742
|
-
this._values[i - 1] = this._values[i];
|
|
120743
|
-
}
|
|
120744
|
-
this._keys.length--;
|
|
120745
|
-
this._values.length--;
|
|
120746
|
-
if (SameValueZero(key, this._cacheKey)) {
|
|
120747
|
-
this._cacheKey = cacheSentinel;
|
|
120748
|
-
this._cacheIndex = -2;
|
|
120749
|
-
}
|
|
120750
|
-
return true;
|
|
120751
|
-
}
|
|
120752
|
-
return false;
|
|
120753
|
-
};
|
|
120754
|
-
Map3.prototype.clear = function() {
|
|
120755
|
-
this._keys.length = 0;
|
|
120756
|
-
this._values.length = 0;
|
|
120757
|
-
this._cacheKey = cacheSentinel;
|
|
120758
|
-
this._cacheIndex = -2;
|
|
120759
|
-
};
|
|
120760
|
-
Map3.prototype.keys = function() {
|
|
120761
|
-
return new MapIterator(this._keys, this._values, getKey);
|
|
120762
|
-
};
|
|
120763
|
-
Map3.prototype.values = function() {
|
|
120764
|
-
return new MapIterator(this._keys, this._values, getValue);
|
|
120765
|
-
};
|
|
120766
|
-
Map3.prototype.entries = function() {
|
|
120767
|
-
return new MapIterator(this._keys, this._values, getEntry);
|
|
120768
|
-
};
|
|
120769
|
-
Map3.prototype["@@iterator"] = function() {
|
|
120770
|
-
return this.entries();
|
|
120771
|
-
};
|
|
120772
|
-
Map3.prototype[iteratorSymbol] = function() {
|
|
120773
|
-
return this.entries();
|
|
120774
|
-
};
|
|
120775
|
-
Map3.prototype._find = function(key, insert) {
|
|
120776
|
-
if (!SameValueZero(this._cacheKey, key)) {
|
|
120777
|
-
this._cacheIndex = -1;
|
|
120778
|
-
for (var i = 0;i < this._keys.length; i++) {
|
|
120779
|
-
if (SameValueZero(this._keys[i], key)) {
|
|
120780
|
-
this._cacheIndex = i;
|
|
120781
|
-
break;
|
|
120782
|
-
}
|
|
120783
|
-
}
|
|
120784
|
-
}
|
|
120785
|
-
if (this._cacheIndex < 0 && insert) {
|
|
120786
|
-
this._cacheIndex = this._keys.length;
|
|
120787
|
-
this._keys.push(key);
|
|
120788
|
-
this._values.push(undefined);
|
|
120789
|
-
}
|
|
120790
|
-
return this._cacheIndex;
|
|
120791
|
-
};
|
|
120792
|
-
return Map3;
|
|
120793
|
-
}();
|
|
120794
|
-
return Map2;
|
|
120795
|
-
function getKey(key, _) {
|
|
120796
|
-
return key;
|
|
120797
|
-
}
|
|
120798
|
-
function getValue(_, value) {
|
|
120799
|
-
return value;
|
|
120800
|
-
}
|
|
120801
|
-
function getEntry(key, value) {
|
|
120802
|
-
return [key, value];
|
|
120803
|
-
}
|
|
120804
|
-
}
|
|
120805
|
-
function CreateSetPolyfill() {
|
|
120806
|
-
var Set3 = function() {
|
|
120807
|
-
function Set4() {
|
|
120808
|
-
this._map = new _Map;
|
|
120809
|
-
}
|
|
120810
|
-
Object.defineProperty(Set4.prototype, "size", {
|
|
120811
|
-
get: function() {
|
|
120812
|
-
return this._map.size;
|
|
120813
|
-
},
|
|
120814
|
-
enumerable: true,
|
|
120815
|
-
configurable: true
|
|
120816
|
-
});
|
|
120817
|
-
Set4.prototype.has = function(value) {
|
|
120818
|
-
return this._map.has(value);
|
|
120819
|
-
};
|
|
120820
|
-
Set4.prototype.add = function(value) {
|
|
120821
|
-
return this._map.set(value, value), this;
|
|
120822
|
-
};
|
|
120823
|
-
Set4.prototype.delete = function(value) {
|
|
120824
|
-
return this._map.delete(value);
|
|
120825
|
-
};
|
|
120826
|
-
Set4.prototype.clear = function() {
|
|
120827
|
-
this._map.clear();
|
|
120828
|
-
};
|
|
120829
|
-
Set4.prototype.keys = function() {
|
|
120830
|
-
return this._map.keys();
|
|
120831
|
-
};
|
|
120832
|
-
Set4.prototype.values = function() {
|
|
120833
|
-
return this._map.keys();
|
|
120834
|
-
};
|
|
120835
|
-
Set4.prototype.entries = function() {
|
|
120836
|
-
return this._map.entries();
|
|
120837
|
-
};
|
|
120838
|
-
Set4.prototype["@@iterator"] = function() {
|
|
120839
|
-
return this.keys();
|
|
120840
|
-
};
|
|
120841
|
-
Set4.prototype[iteratorSymbol] = function() {
|
|
120842
|
-
return this.keys();
|
|
120843
|
-
};
|
|
120844
|
-
return Set4;
|
|
120845
|
-
}();
|
|
120846
|
-
return Set3;
|
|
120847
|
-
}
|
|
120848
|
-
function CreateWeakMapPolyfill() {
|
|
120849
|
-
var UUID_SIZE = 16;
|
|
120850
|
-
var keys = HashMap.create();
|
|
120851
|
-
var rootKey = CreateUniqueKey();
|
|
120852
|
-
return function() {
|
|
120853
|
-
function WeakMap2() {
|
|
120854
|
-
this._key = CreateUniqueKey();
|
|
120855
|
-
}
|
|
120856
|
-
WeakMap2.prototype.has = function(target) {
|
|
120857
|
-
var table = GetOrCreateWeakMapTable(target, false);
|
|
120858
|
-
return table !== undefined ? HashMap.has(table, this._key) : false;
|
|
120859
|
-
};
|
|
120860
|
-
WeakMap2.prototype.get = function(target) {
|
|
120861
|
-
var table = GetOrCreateWeakMapTable(target, false);
|
|
120862
|
-
return table !== undefined ? HashMap.get(table, this._key) : undefined;
|
|
120863
|
-
};
|
|
120864
|
-
WeakMap2.prototype.set = function(target, value) {
|
|
120865
|
-
var table = GetOrCreateWeakMapTable(target, true);
|
|
120866
|
-
table[this._key] = value;
|
|
120867
|
-
return this;
|
|
120868
|
-
};
|
|
120869
|
-
WeakMap2.prototype.delete = function(target) {
|
|
120870
|
-
var table = GetOrCreateWeakMapTable(target, false);
|
|
120871
|
-
return table !== undefined ? delete table[this._key] : false;
|
|
120872
|
-
};
|
|
120873
|
-
WeakMap2.prototype.clear = function() {
|
|
120874
|
-
this._key = CreateUniqueKey();
|
|
120875
|
-
};
|
|
120876
|
-
return WeakMap2;
|
|
120877
|
-
}();
|
|
120878
|
-
function CreateUniqueKey() {
|
|
120879
|
-
var key;
|
|
120880
|
-
do
|
|
120881
|
-
key = "@@WeakMap@@" + CreateUUID();
|
|
120882
|
-
while (HashMap.has(keys, key));
|
|
120883
|
-
keys[key] = true;
|
|
120884
|
-
return key;
|
|
120885
|
-
}
|
|
120886
|
-
function GetOrCreateWeakMapTable(target, create) {
|
|
120887
|
-
if (!hasOwn4.call(target, rootKey)) {
|
|
120888
|
-
if (!create)
|
|
120889
|
-
return;
|
|
120890
|
-
Object.defineProperty(target, rootKey, { value: HashMap.create() });
|
|
120891
|
-
}
|
|
120892
|
-
return target[rootKey];
|
|
120893
|
-
}
|
|
120894
|
-
function FillRandomBytes(buffer, size3) {
|
|
120895
|
-
for (var i = 0;i < size3; ++i)
|
|
120896
|
-
buffer[i] = Math.random() * 255 | 0;
|
|
120897
|
-
return buffer;
|
|
120898
|
-
}
|
|
120899
|
-
function GenRandomBytes(size3) {
|
|
120900
|
-
if (typeof Uint8Array === "function") {
|
|
120901
|
-
var array2 = new Uint8Array(size3);
|
|
120902
|
-
if (typeof crypto !== "undefined") {
|
|
120903
|
-
crypto.getRandomValues(array2);
|
|
120904
|
-
} else if (typeof msCrypto !== "undefined") {
|
|
120905
|
-
msCrypto.getRandomValues(array2);
|
|
120906
|
-
} else {
|
|
120907
|
-
FillRandomBytes(array2, size3);
|
|
120908
|
-
}
|
|
120909
|
-
return array2;
|
|
120910
|
-
}
|
|
120911
|
-
return FillRandomBytes(new Array(size3), size3);
|
|
120912
|
-
}
|
|
120913
|
-
function CreateUUID() {
|
|
120914
|
-
var data = GenRandomBytes(UUID_SIZE);
|
|
120915
|
-
data[6] = data[6] & 79 | 64;
|
|
120916
|
-
data[8] = data[8] & 191 | 128;
|
|
120917
|
-
var result = "";
|
|
120918
|
-
for (var offset = 0;offset < UUID_SIZE; ++offset) {
|
|
120919
|
-
var byte = data[offset];
|
|
120920
|
-
if (offset === 4 || offset === 6 || offset === 8)
|
|
120921
|
-
result += "-";
|
|
120922
|
-
if (byte < 16)
|
|
120923
|
-
result += "0";
|
|
120924
|
-
result += byte.toString(16).toLowerCase();
|
|
120925
|
-
}
|
|
120926
|
-
return result;
|
|
120927
|
-
}
|
|
120928
|
-
}
|
|
120929
|
-
function MakeDictionary(obj) {
|
|
120930
|
-
obj.__ = undefined;
|
|
120931
|
-
delete obj.__;
|
|
120932
|
-
return obj;
|
|
120933
|
-
}
|
|
120934
|
-
});
|
|
120935
|
-
})(Reflect2 || (Reflect2 = {}));
|
|
120936
|
-
});
|
|
120937
|
-
|
|
120938
120942
|
// node_modules/.bun/@peculiar+asn1-cms@2.6.1/node_modules/@peculiar/asn1-cms/build/es2015/issuer_and_serial_number.js
|
|
120939
120943
|
class IssuerAndSerialNumber {
|
|
120940
120944
|
constructor(params = {}) {
|
|
@@ -343949,14 +343953,17 @@ var init_src25 = __esm(async () => {
|
|
|
343949
343953
|
await init_run_tui();
|
|
343950
343954
|
});
|
|
343951
343955
|
|
|
343956
|
+
// packages/agenter/src/bin/agenter.ts
|
|
343957
|
+
var import_reflect_metadata2 = __toESM(require_Reflect(), 1);
|
|
343958
|
+
|
|
343952
343959
|
// packages/cli/src/run-cli.ts
|
|
343953
343960
|
import { spawn as spawnChildProcess } from "child_process";
|
|
343954
|
-
import { existsSync as existsSync38 } from "fs";
|
|
343961
|
+
import { closeSync as closeSync3, existsSync as existsSync38, mkdirSync as mkdirSync38, openSync as openSync3, readFileSync as readFileSync30 } from "fs";
|
|
343955
343962
|
import { createRequire as createRequire5 } from "module";
|
|
343956
343963
|
import { request as httpRequest2 } from "http";
|
|
343957
343964
|
import { request as httpsRequest } from "https";
|
|
343958
343965
|
import { homedir as homedir25 } from "os";
|
|
343959
|
-
import { join as join64, resolve as resolve57 } from "path";
|
|
343966
|
+
import { dirname as dirname44, join as join64, resolve as resolve57 } from "path";
|
|
343960
343967
|
import { pathToFileURL as pathToFileURL3 } from "url";
|
|
343961
343968
|
import { suffix as suffix4 } from "bun:ffi";
|
|
343962
343969
|
|
|
@@ -349081,7 +349088,9 @@ var buildProductProcessCommand = (target, descriptor, productArgv, env2 = proces
|
|
|
349081
349088
|
init_daemon_runtime_descriptor();
|
|
349082
349089
|
var INTERNAL_DAEMON_FOREGROUND_ENV = "AGENTER_INTERNAL_DAEMON_FOREGROUND";
|
|
349083
349090
|
var BUNDLED_ASSETS_ROOT_ENV3 = "AGENTER_BUNDLED_ASSETS_ROOT";
|
|
349084
|
-
var
|
|
349091
|
+
var HEALTH_REQUEST_TIMEOUT_MS = 5000;
|
|
349092
|
+
var MANAGED_DAEMON_START_TIMEOUT_MS = 60000;
|
|
349093
|
+
var MANAGED_DAEMON_START_HEALTH_REQUEST_TIMEOUT_MS = 1000;
|
|
349085
349094
|
var packageJson = createRequire5(import.meta.url)("../package.json");
|
|
349086
349095
|
var waitForSignal = async (cleanup) => {
|
|
349087
349096
|
await new Promise((resolve58) => {
|
|
@@ -349103,6 +349112,13 @@ var resolveLauncherHomeDir = () => process.env.HOME || homedir25();
|
|
|
349103
349112
|
var resolveLauncherOwnedAuthServiceDataDir = () => join64(resolveLauncherHomeDir(), ".agenter", "launcher-auth-service");
|
|
349104
349113
|
var resolveDaemonHealthLabel = (args) => `http://${args.host}:${args.port}/health`;
|
|
349105
349114
|
var resolveCliEntryPath = () => resolve57(import.meta.dir, "bin", "agenter.ts");
|
|
349115
|
+
var resolveCurrentCliEntrypointArgv = () => {
|
|
349116
|
+
const entrypoint = process.argv[1];
|
|
349117
|
+
if (entrypoint && existsSync38(entrypoint)) {
|
|
349118
|
+
return [entrypoint];
|
|
349119
|
+
}
|
|
349120
|
+
return ["run", resolveCliEntryPath()];
|
|
349121
|
+
};
|
|
349106
349122
|
var resolveBunExecutable = () => Bun.which("bun") ?? process.execPath;
|
|
349107
349123
|
var resolveBundledAssetsRoot2 = () => process.env[BUNDLED_ASSETS_ROOT_ENV3]?.trim() || null;
|
|
349108
349124
|
var resolveBundledAssetPath2 = (...segments) => {
|
|
@@ -349113,13 +349129,13 @@ var resolveBundledAssetPath2 = (...segments) => {
|
|
|
349113
349129
|
const path7 = join64(root3, ...segments);
|
|
349114
349130
|
return existsSync38(path7) ? path7 : undefined;
|
|
349115
349131
|
};
|
|
349116
|
-
var isHttpHealthAlive = async (urlString) => {
|
|
349132
|
+
var isHttpHealthAlive = async (urlString, timeoutMs = HEALTH_REQUEST_TIMEOUT_MS) => {
|
|
349117
349133
|
const url2 = new URL(urlString);
|
|
349118
349134
|
const request = url2.protocol === "https:" ? httpsRequest : httpRequest2;
|
|
349119
349135
|
return await new Promise((resolve58) => {
|
|
349120
349136
|
const req = request(url2, {
|
|
349121
349137
|
method: "GET",
|
|
349122
|
-
timeout:
|
|
349138
|
+
timeout: timeoutMs
|
|
349123
349139
|
}, (response) => {
|
|
349124
349140
|
response.resume();
|
|
349125
349141
|
resolve58(response.statusCode !== undefined && response.statusCode >= 200 && response.statusCode < 300);
|
|
@@ -349132,7 +349148,7 @@ var isHttpHealthAlive = async (urlString) => {
|
|
|
349132
349148
|
req.end();
|
|
349133
349149
|
});
|
|
349134
349150
|
};
|
|
349135
|
-
var isDaemonAlive = async (args) => await isHttpHealthAlive(healthUrl(args));
|
|
349151
|
+
var isDaemonAlive = async (args, timeoutMs) => await isHttpHealthAlive(healthUrl(args), timeoutMs);
|
|
349136
349152
|
var isReusableDaemonDescriptorHealthy = async (descriptor) => await isHttpHealthAlive(`${descriptor.endpoint.replace(/\/$/u, "")}/health`);
|
|
349137
349153
|
var waitFor = async (predicate, timeoutMs, intervalMs = 100) => {
|
|
349138
349154
|
const startedAt = Date.now();
|
|
@@ -349163,7 +349179,7 @@ var sameDaemonAuthority = (descriptor, requested) => descriptor.host === request
|
|
|
349163
349179
|
var resolveDaemonCommandAction = (value) => value === "stop" || value === "restart" ? value : "start";
|
|
349164
349180
|
var isForegroundDaemonServeRequested = () => process.env[INTERNAL_DAEMON_FOREGROUND_ENV] === "1";
|
|
349165
349181
|
var buildDaemonServeArgv = (args) => {
|
|
349166
|
-
const argv = [
|
|
349182
|
+
const argv = [...resolveCurrentCliEntrypointArgv(), "daemon", "start", "--host", args.host, "--port", String(args.port)];
|
|
349167
349183
|
if (args.authServiceEndpoint) {
|
|
349168
349184
|
argv.push("--auth-service-endpoint", args.authServiceEndpoint);
|
|
349169
349185
|
}
|
|
@@ -349178,26 +349194,46 @@ var buildDaemonServeArgv = (args) => {
|
|
|
349178
349194
|
}
|
|
349179
349195
|
return argv;
|
|
349180
349196
|
};
|
|
349197
|
+
var readLogTail = (path7, maxBytes = 16384) => {
|
|
349198
|
+
try {
|
|
349199
|
+
const text4 = readFileSync30(path7, "utf8");
|
|
349200
|
+
return text4.length > maxBytes ? text4.slice(-maxBytes) : text4;
|
|
349201
|
+
} catch {
|
|
349202
|
+
return "";
|
|
349203
|
+
}
|
|
349204
|
+
};
|
|
349181
349205
|
var spawnManagedDaemonProcess = (args) => {
|
|
349182
|
-
const
|
|
349183
|
-
|
|
349184
|
-
|
|
349185
|
-
|
|
349186
|
-
|
|
349187
|
-
|
|
349188
|
-
|
|
349206
|
+
const logPath = resolveDaemonLogPath(resolveLauncherHomeDir(), args);
|
|
349207
|
+
mkdirSync38(dirname44(logPath), { recursive: true });
|
|
349208
|
+
const logFd = openSync3(logPath, "a");
|
|
349209
|
+
const child = (() => {
|
|
349210
|
+
try {
|
|
349211
|
+
return spawnChildProcess(resolveBunExecutable(), buildDaemonServeArgv(args), {
|
|
349212
|
+
cwd: process.cwd(),
|
|
349213
|
+
detached: true,
|
|
349214
|
+
stdio: ["ignore", logFd, logFd],
|
|
349215
|
+
env: {
|
|
349216
|
+
...process.env,
|
|
349217
|
+
[INTERNAL_DAEMON_FOREGROUND_ENV]: "1"
|
|
349218
|
+
}
|
|
349219
|
+
});
|
|
349220
|
+
} finally {
|
|
349221
|
+
closeSync3(logFd);
|
|
349189
349222
|
}
|
|
349190
|
-
});
|
|
349223
|
+
})();
|
|
349191
349224
|
child.unref();
|
|
349192
349225
|
if (typeof child.pid !== "number" || child.pid <= 0) {
|
|
349193
349226
|
throw new Error("failed to spawn background daemon process");
|
|
349194
349227
|
}
|
|
349195
|
-
return
|
|
349228
|
+
return {
|
|
349229
|
+
pid: child.pid,
|
|
349230
|
+
logPath
|
|
349231
|
+
};
|
|
349196
349232
|
};
|
|
349197
349233
|
var waitForManagedDaemonHealthy = async (authority, pid, timeoutMs = MANAGED_DAEMON_START_TIMEOUT_MS) => {
|
|
349198
349234
|
const startedAt = Date.now();
|
|
349199
349235
|
while (Date.now() - startedAt < timeoutMs) {
|
|
349200
|
-
if (await isDaemonAlive(authority)) {
|
|
349236
|
+
if (await isDaemonAlive(authority, MANAGED_DAEMON_START_HEALTH_REQUEST_TIMEOUT_MS)) {
|
|
349201
349237
|
return "healthy";
|
|
349202
349238
|
}
|
|
349203
349239
|
if (!isProcessAlive(pid)) {
|
|
@@ -349268,13 +349304,20 @@ var runDaemonStartCommand = async (args) => {
|
|
|
349268
349304
|
return;
|
|
349269
349305
|
}
|
|
349270
349306
|
}
|
|
349271
|
-
const pid = spawnManagedDaemonProcess(args);
|
|
349307
|
+
const { pid, logPath } = spawnManagedDaemonProcess(args);
|
|
349272
349308
|
const status = await waitForManagedDaemonHealthy(requested, pid);
|
|
349273
349309
|
if (status === "healthy") {
|
|
349274
349310
|
console.log(`agenter daemon started in background on ${requested.host}:${requested.port}`);
|
|
349311
|
+
console.log(`daemon log: ${logPath}`);
|
|
349275
349312
|
return;
|
|
349276
349313
|
}
|
|
349277
349314
|
console.error(status === "exited" ? `background daemon process ${pid} exited before becoming healthy on ${requested.host}:${requested.port}` : `timed out waiting for background daemon ${pid} to become healthy on ${requested.host}:${requested.port}`);
|
|
349315
|
+
console.error(`daemon log: ${logPath}`);
|
|
349316
|
+
const logTail = readLogTail(logPath).trim();
|
|
349317
|
+
if (logTail.length > 0) {
|
|
349318
|
+
console.error("daemon log tail:");
|
|
349319
|
+
console.error(logTail);
|
|
349320
|
+
}
|
|
349278
349321
|
process.exitCode = 1;
|
|
349279
349322
|
};
|
|
349280
349323
|
var runDaemonStopCommand = async () => {
|