@powerhousedao/reactor-api 1.12.0 → 1.13.0
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/CHANGELOG.md +12 -6
- package/dist/index.d.ts +7 -1
- package/dist/index.js +528 -300
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/processors/index.ts +1 -0
- package/src/processors/operational-processor.ts +20 -0
- package/src/server.ts +1 -1
- package/src/subgraphs/manager.ts +1 -10
- package/src/types.ts +2 -2
- package/src/utils/index.ts +1 -1
- package/test/router.test.ts +1 -1
- /package/src/utils/{get-db-client.ts → db.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -1205,8 +1205,8 @@ var require_stream_readable = __commonJS({
|
|
|
1205
1205
|
var Duplex;
|
|
1206
1206
|
Readable.ReadableState = ReadableState;
|
|
1207
1207
|
__require("events").EventEmitter;
|
|
1208
|
-
var EElistenerCount = function(emitter,
|
|
1209
|
-
return emitter.listeners(
|
|
1208
|
+
var EElistenerCount = function(emitter, type13) {
|
|
1209
|
+
return emitter.listeners(type13).length;
|
|
1210
1210
|
};
|
|
1211
1211
|
var Stream = require_stream();
|
|
1212
1212
|
var Buffer2 = require_safe_buffer().Buffer;
|
|
@@ -2714,18 +2714,18 @@ var require_utils = __commonJS({
|
|
|
2714
2714
|
}
|
|
2715
2715
|
return stringToArrayLike(str, result);
|
|
2716
2716
|
}
|
|
2717
|
-
exports.newBlob = function(part,
|
|
2717
|
+
exports.newBlob = function(part, type13) {
|
|
2718
2718
|
exports.checkSupport("blob");
|
|
2719
2719
|
try {
|
|
2720
2720
|
return new Blob([part], {
|
|
2721
|
-
type:
|
|
2721
|
+
type: type13
|
|
2722
2722
|
});
|
|
2723
2723
|
} catch (e) {
|
|
2724
2724
|
try {
|
|
2725
2725
|
var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder;
|
|
2726
2726
|
var builder = new Builder();
|
|
2727
2727
|
builder.append(part);
|
|
2728
|
-
return builder.getBlob(
|
|
2728
|
+
return builder.getBlob(type13);
|
|
2729
2729
|
} catch (e2) {
|
|
2730
2730
|
throw new Error("Bug : can't construct the Blob.");
|
|
2731
2731
|
}
|
|
@@ -2750,13 +2750,13 @@ var require_utils = __commonJS({
|
|
|
2750
2750
|
* @return {String} the resulting string.
|
|
2751
2751
|
* @throws Error if the chunk is too big for the stack.
|
|
2752
2752
|
*/
|
|
2753
|
-
stringifyByChunk: function(array,
|
|
2753
|
+
stringifyByChunk: function(array, type13, chunk) {
|
|
2754
2754
|
var result = [], k = 0, len = array.length;
|
|
2755
2755
|
if (len <= chunk) {
|
|
2756
2756
|
return String.fromCharCode.apply(null, array);
|
|
2757
2757
|
}
|
|
2758
2758
|
while (k < len) {
|
|
2759
|
-
if (
|
|
2759
|
+
if (type13 === "array" || type13 === "nodebuffer") {
|
|
2760
2760
|
result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));
|
|
2761
2761
|
} else {
|
|
2762
2762
|
result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));
|
|
@@ -2803,16 +2803,16 @@ var require_utils = __commonJS({
|
|
|
2803
2803
|
}
|
|
2804
2804
|
};
|
|
2805
2805
|
function arrayLikeToString(array) {
|
|
2806
|
-
var chunk = 65536,
|
|
2807
|
-
if (
|
|
2806
|
+
var chunk = 65536, type13 = exports.getTypeOf(array), canUseApply = true;
|
|
2807
|
+
if (type13 === "uint8array") {
|
|
2808
2808
|
canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array;
|
|
2809
|
-
} else if (
|
|
2809
|
+
} else if (type13 === "nodebuffer") {
|
|
2810
2810
|
canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer;
|
|
2811
2811
|
}
|
|
2812
2812
|
if (canUseApply) {
|
|
2813
2813
|
while (chunk > 1) {
|
|
2814
2814
|
try {
|
|
2815
|
-
return arrayToStringHelper.stringifyByChunk(array,
|
|
2815
|
+
return arrayToStringHelper.stringifyByChunk(array, type13, chunk);
|
|
2816
2816
|
} catch (e) {
|
|
2817
2817
|
chunk = Math.floor(chunk / 2);
|
|
2818
2818
|
}
|
|
@@ -2941,10 +2941,10 @@ var require_utils = __commonJS({
|
|
|
2941
2941
|
return "arraybuffer";
|
|
2942
2942
|
}
|
|
2943
2943
|
};
|
|
2944
|
-
exports.checkSupport = function(
|
|
2945
|
-
var supported = support[
|
|
2944
|
+
exports.checkSupport = function(type13) {
|
|
2945
|
+
var supported = support[type13.toLowerCase()];
|
|
2946
2946
|
if (!supported) {
|
|
2947
|
-
throw new Error(
|
|
2947
|
+
throw new Error(type13 + " is not supported by this platform");
|
|
2948
2948
|
}
|
|
2949
2949
|
};
|
|
2950
2950
|
exports.MAX_VALUE_16BITS = 65535;
|
|
@@ -3502,22 +3502,22 @@ var require_StreamHelper = __commonJS({
|
|
|
3502
3502
|
} catch (e) {
|
|
3503
3503
|
}
|
|
3504
3504
|
}
|
|
3505
|
-
function transformZipOutput(
|
|
3506
|
-
switch (
|
|
3505
|
+
function transformZipOutput(type13, content, mimeType) {
|
|
3506
|
+
switch (type13) {
|
|
3507
3507
|
case "blob":
|
|
3508
3508
|
return utils2.newBlob(utils2.transformTo("arraybuffer", content), mimeType);
|
|
3509
3509
|
case "base64":
|
|
3510
3510
|
return base64.encode(content);
|
|
3511
3511
|
default:
|
|
3512
|
-
return utils2.transformTo(
|
|
3512
|
+
return utils2.transformTo(type13, content);
|
|
3513
3513
|
}
|
|
3514
3514
|
}
|
|
3515
|
-
function concat(
|
|
3515
|
+
function concat(type13, dataArray) {
|
|
3516
3516
|
var i, index2 = 0, res = null, totalLength = 0;
|
|
3517
3517
|
for (i = 0; i < dataArray.length; i++) {
|
|
3518
3518
|
totalLength += dataArray[i].length;
|
|
3519
3519
|
}
|
|
3520
|
-
switch (
|
|
3520
|
+
switch (type13) {
|
|
3521
3521
|
case "string":
|
|
3522
3522
|
return dataArray.join("");
|
|
3523
3523
|
case "array":
|
|
@@ -3532,7 +3532,7 @@ var require_StreamHelper = __commonJS({
|
|
|
3532
3532
|
case "nodebuffer":
|
|
3533
3533
|
return Buffer.concat(dataArray);
|
|
3534
3534
|
default:
|
|
3535
|
-
throw new Error("concat : unsupported type '" +
|
|
3535
|
+
throw new Error("concat : unsupported type '" + type13 + "'");
|
|
3536
3536
|
}
|
|
3537
3537
|
}
|
|
3538
3538
|
function accumulate(helper, updateCallback) {
|
|
@@ -3907,13 +3907,13 @@ var require_zipObject = __commonJS({
|
|
|
3907
3907
|
* @param {String} type the type of each chunk.
|
|
3908
3908
|
* @return StreamHelper the stream.
|
|
3909
3909
|
*/
|
|
3910
|
-
internalStream: function(
|
|
3910
|
+
internalStream: function(type13) {
|
|
3911
3911
|
var result = null, outputType = "string";
|
|
3912
3912
|
try {
|
|
3913
|
-
if (!
|
|
3913
|
+
if (!type13) {
|
|
3914
3914
|
throw new Error("No output type specified.");
|
|
3915
3915
|
}
|
|
3916
|
-
outputType =
|
|
3916
|
+
outputType = type13.toLowerCase();
|
|
3917
3917
|
var askUnicodeString = outputType === "string" || outputType === "text";
|
|
3918
3918
|
if (outputType === "binarystring" || outputType === "text") {
|
|
3919
3919
|
outputType = "string";
|
|
@@ -3938,8 +3938,8 @@ var require_zipObject = __commonJS({
|
|
|
3938
3938
|
* @param {Function} onUpdate a function to call on each internal update.
|
|
3939
3939
|
* @return Promise the promise of the result.
|
|
3940
3940
|
*/
|
|
3941
|
-
async: function(
|
|
3942
|
-
return this.internalStream(
|
|
3941
|
+
async: function(type13, onUpdate) {
|
|
3942
|
+
return this.internalStream(type13).accumulate(onUpdate);
|
|
3943
3943
|
},
|
|
3944
3944
|
/**
|
|
3945
3945
|
* Prepare the content as a nodejs stream.
|
|
@@ -3947,8 +3947,8 @@ var require_zipObject = __commonJS({
|
|
|
3947
3947
|
* @param {Function} onUpdate a function to call on each internal update.
|
|
3948
3948
|
* @return Stream the stream.
|
|
3949
3949
|
*/
|
|
3950
|
-
nodeStream: function(
|
|
3951
|
-
return this.internalStream(
|
|
3950
|
+
nodeStream: function(type13, onUpdate) {
|
|
3951
|
+
return this.internalStream(type13 || "nodebuffer").toNodejsStream(onUpdate);
|
|
3952
3952
|
},
|
|
3953
3953
|
/**
|
|
3954
3954
|
* Return a worker for the compressed content.
|
|
@@ -6546,7 +6546,7 @@ var require_inftrees = __commonJS({
|
|
|
6546
6546
|
64,
|
|
6547
6547
|
64
|
|
6548
6548
|
];
|
|
6549
|
-
module.exports = function inflate_table(
|
|
6549
|
+
module.exports = function inflate_table(type13, lens, lens_index, codes, table, table_index, work, opts) {
|
|
6550
6550
|
var bits = opts.bits;
|
|
6551
6551
|
var len = 0;
|
|
6552
6552
|
var sym = 0;
|
|
@@ -6607,7 +6607,7 @@ var require_inftrees = __commonJS({
|
|
|
6607
6607
|
return -1;
|
|
6608
6608
|
}
|
|
6609
6609
|
}
|
|
6610
|
-
if (left > 0 && (
|
|
6610
|
+
if (left > 0 && (type13 === CODES || max !== 1)) {
|
|
6611
6611
|
return -1;
|
|
6612
6612
|
}
|
|
6613
6613
|
offs[1] = 0;
|
|
@@ -6619,10 +6619,10 @@ var require_inftrees = __commonJS({
|
|
|
6619
6619
|
work[offs[lens[lens_index + sym]]++] = sym;
|
|
6620
6620
|
}
|
|
6621
6621
|
}
|
|
6622
|
-
if (
|
|
6622
|
+
if (type13 === CODES) {
|
|
6623
6623
|
base = extra = work;
|
|
6624
6624
|
end = 19;
|
|
6625
|
-
} else if (
|
|
6625
|
+
} else if (type13 === LENS) {
|
|
6626
6626
|
base = lbase;
|
|
6627
6627
|
base_index -= 257;
|
|
6628
6628
|
extra = lext;
|
|
@@ -6642,7 +6642,7 @@ var require_inftrees = __commonJS({
|
|
|
6642
6642
|
low = -1;
|
|
6643
6643
|
used = 1 << root;
|
|
6644
6644
|
mask = used - 1;
|
|
6645
|
-
if (
|
|
6645
|
+
if (type13 === LENS && used > ENOUGH_LENS || type13 === DISTS && used > ENOUGH_DISTS) {
|
|
6646
6646
|
return 1;
|
|
6647
6647
|
}
|
|
6648
6648
|
for (; ; ) {
|
|
@@ -6697,7 +6697,7 @@ var require_inftrees = __commonJS({
|
|
|
6697
6697
|
left <<= 1;
|
|
6698
6698
|
}
|
|
6699
6699
|
used += 1 << curr;
|
|
6700
|
-
if (
|
|
6700
|
+
if (type13 === LENS && used > ENOUGH_LENS || type13 === DISTS && used > ENOUGH_DISTS) {
|
|
6701
6701
|
return 1;
|
|
6702
6702
|
}
|
|
6703
6703
|
low = huff & mask;
|
|
@@ -9181,12 +9181,12 @@ var require_readerFor = __commonJS({
|
|
|
9181
9181
|
var NodeBufferReader = require_NodeBufferReader();
|
|
9182
9182
|
var Uint8ArrayReader = require_Uint8ArrayReader();
|
|
9183
9183
|
module.exports = function(data) {
|
|
9184
|
-
var
|
|
9185
|
-
utils2.checkSupport(
|
|
9186
|
-
if (
|
|
9184
|
+
var type13 = utils2.getTypeOf(data);
|
|
9185
|
+
utils2.checkSupport(type13);
|
|
9186
|
+
if (type13 === "string" && !support.uint8array) {
|
|
9187
9187
|
return new StringReader(data);
|
|
9188
9188
|
}
|
|
9189
|
-
if (
|
|
9189
|
+
if (type13 === "nodebuffer") {
|
|
9190
9190
|
return new NodeBufferReader(data);
|
|
9191
9191
|
}
|
|
9192
9192
|
if (support.uint8array) {
|
|
@@ -9829,6 +9829,7 @@ var src_exports = {};
|
|
|
9829
9829
|
__export(src_exports, {
|
|
9830
9830
|
AnalyticsProcessor: () => AnalyticsProcessor,
|
|
9831
9831
|
BaseProcessor: () => BaseProcessor,
|
|
9832
|
+
OperationalProcessor: () => OperationalProcessor,
|
|
9832
9833
|
Processor: () => Processor,
|
|
9833
9834
|
ProcessorManager: () => ProcessorManager,
|
|
9834
9835
|
Subgraph: () => Subgraph,
|
|
@@ -9849,6 +9850,7 @@ var processors_exports = {};
|
|
|
9849
9850
|
__export(processors_exports, {
|
|
9850
9851
|
AnalyticsProcessor: () => AnalyticsProcessor,
|
|
9851
9852
|
BaseProcessor: () => BaseProcessor,
|
|
9853
|
+
OperationalProcessor: () => OperationalProcessor,
|
|
9852
9854
|
Processor: () => Processor,
|
|
9853
9855
|
ProcessorManager: () => ProcessorManager,
|
|
9854
9856
|
isProcessorClass: () => isProcessorClass
|
|
@@ -9918,6 +9920,19 @@ var AnalyticsProcessor = class extends Processor {
|
|
|
9918
9920
|
// src/processors/index.ts
|
|
9919
9921
|
__reExport(processors_exports, analytics_processor_exports);
|
|
9920
9922
|
|
|
9923
|
+
// src/processors/operational-processor.ts
|
|
9924
|
+
var OperationalProcessor = class extends Processor {
|
|
9925
|
+
operationalStore;
|
|
9926
|
+
constructor(args, options) {
|
|
9927
|
+
super(args, options);
|
|
9928
|
+
this.operationalStore = args.operationalStore;
|
|
9929
|
+
}
|
|
9930
|
+
onSetup(args) {
|
|
9931
|
+
super.onSetup(args);
|
|
9932
|
+
this.operationalStore = args.operationalStore;
|
|
9933
|
+
}
|
|
9934
|
+
};
|
|
9935
|
+
|
|
9921
9936
|
// src/processors/manager.ts
|
|
9922
9937
|
var ProcessorManager = class {
|
|
9923
9938
|
constructor(driveServer, operationalStore, analyticsStore) {
|
|
@@ -10410,28 +10425,28 @@ function assertName(name) {
|
|
|
10410
10425
|
return name;
|
|
10411
10426
|
}
|
|
10412
10427
|
var GraphQLScalarType = class {
|
|
10413
|
-
constructor(
|
|
10428
|
+
constructor(config13) {
|
|
10414
10429
|
var _config$parseValue, _config$serialize, _config$parseLiteral, _config$extensionASTN;
|
|
10415
|
-
const parseValue = (_config$parseValue =
|
|
10416
|
-
this.name = assertName(
|
|
10417
|
-
this.description =
|
|
10418
|
-
this.specifiedByURL =
|
|
10419
|
-
this.serialize = (_config$serialize =
|
|
10430
|
+
const parseValue = (_config$parseValue = config13.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : identityFunc;
|
|
10431
|
+
this.name = assertName(config13.name);
|
|
10432
|
+
this.description = config13.description;
|
|
10433
|
+
this.specifiedByURL = config13.specifiedByURL;
|
|
10434
|
+
this.serialize = (_config$serialize = config13.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : identityFunc;
|
|
10420
10435
|
this.parseValue = parseValue;
|
|
10421
|
-
this.parseLiteral = (_config$parseLiteral =
|
|
10422
|
-
this.extensions = toObjMap(
|
|
10423
|
-
this.astNode =
|
|
10424
|
-
this.extensionASTNodes = (_config$extensionASTN =
|
|
10425
|
-
|
|
10436
|
+
this.parseLiteral = (_config$parseLiteral = config13.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : (node, variables) => parseValue(valueFromASTUntyped(node, variables));
|
|
10437
|
+
this.extensions = toObjMap(config13.extensions);
|
|
10438
|
+
this.astNode = config13.astNode;
|
|
10439
|
+
this.extensionASTNodes = (_config$extensionASTN = config13.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : [];
|
|
10440
|
+
config13.specifiedByURL == null || typeof config13.specifiedByURL === "string" || devAssert(
|
|
10426
10441
|
false,
|
|
10427
|
-
`${this.name} must provide "specifiedByURL" as a string, but got: ${inspect(
|
|
10442
|
+
`${this.name} must provide "specifiedByURL" as a string, but got: ${inspect(config13.specifiedByURL)}.`
|
|
10428
10443
|
);
|
|
10429
|
-
|
|
10444
|
+
config13.serialize == null || typeof config13.serialize === "function" || devAssert(
|
|
10430
10445
|
false,
|
|
10431
10446
|
`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`
|
|
10432
10447
|
);
|
|
10433
|
-
if (
|
|
10434
|
-
typeof
|
|
10448
|
+
if (config13.parseLiteral) {
|
|
10449
|
+
typeof config13.parseValue === "function" && typeof config13.parseLiteral === "function" || devAssert(
|
|
10435
10450
|
false,
|
|
10436
10451
|
`${this.name} must provide both "parseValue" and "parseLiteral" functions.`
|
|
10437
10452
|
);
|
|
@@ -12542,9 +12557,9 @@ var ZodArray = class _ZodArray extends ZodType {
|
|
|
12542
12557
|
return this.min(1, message);
|
|
12543
12558
|
}
|
|
12544
12559
|
};
|
|
12545
|
-
ZodArray.create = (
|
|
12560
|
+
ZodArray.create = (schema13, params) => {
|
|
12546
12561
|
return new ZodArray({
|
|
12547
|
-
type:
|
|
12562
|
+
type: schema13,
|
|
12548
12563
|
minLength: null,
|
|
12549
12564
|
maxLength: null,
|
|
12550
12565
|
exactLength: null,
|
|
@@ -12552,30 +12567,30 @@ ZodArray.create = (schema5, params) => {
|
|
|
12552
12567
|
...processCreateParams(params)
|
|
12553
12568
|
});
|
|
12554
12569
|
};
|
|
12555
|
-
function deepPartialify(
|
|
12556
|
-
if (
|
|
12570
|
+
function deepPartialify(schema13) {
|
|
12571
|
+
if (schema13 instanceof ZodObject) {
|
|
12557
12572
|
const newShape = {};
|
|
12558
|
-
for (const key in
|
|
12559
|
-
const fieldSchema =
|
|
12573
|
+
for (const key in schema13.shape) {
|
|
12574
|
+
const fieldSchema = schema13.shape[key];
|
|
12560
12575
|
newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));
|
|
12561
12576
|
}
|
|
12562
12577
|
return new ZodObject({
|
|
12563
|
-
...
|
|
12578
|
+
...schema13._def,
|
|
12564
12579
|
shape: () => newShape
|
|
12565
12580
|
});
|
|
12566
|
-
} else if (
|
|
12581
|
+
} else if (schema13 instanceof ZodArray) {
|
|
12567
12582
|
return new ZodArray({
|
|
12568
|
-
...
|
|
12569
|
-
type: deepPartialify(
|
|
12583
|
+
...schema13._def,
|
|
12584
|
+
type: deepPartialify(schema13.element)
|
|
12570
12585
|
});
|
|
12571
|
-
} else if (
|
|
12572
|
-
return ZodOptional.create(deepPartialify(
|
|
12573
|
-
} else if (
|
|
12574
|
-
return ZodNullable.create(deepPartialify(
|
|
12575
|
-
} else if (
|
|
12576
|
-
return ZodTuple.create(
|
|
12586
|
+
} else if (schema13 instanceof ZodOptional) {
|
|
12587
|
+
return ZodOptional.create(deepPartialify(schema13.unwrap()));
|
|
12588
|
+
} else if (schema13 instanceof ZodNullable) {
|
|
12589
|
+
return ZodNullable.create(deepPartialify(schema13.unwrap()));
|
|
12590
|
+
} else if (schema13 instanceof ZodTuple) {
|
|
12591
|
+
return ZodTuple.create(schema13.items.map((item) => deepPartialify(item)));
|
|
12577
12592
|
} else {
|
|
12578
|
-
return
|
|
12593
|
+
return schema13;
|
|
12579
12594
|
}
|
|
12580
12595
|
}
|
|
12581
12596
|
var ZodObject = class _ZodObject extends ZodType {
|
|
@@ -12791,8 +12806,8 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
12791
12806
|
// }) as any;
|
|
12792
12807
|
// return merged;
|
|
12793
12808
|
// }
|
|
12794
|
-
setKey(key,
|
|
12795
|
-
return this.augment({ [key]:
|
|
12809
|
+
setKey(key, schema13) {
|
|
12810
|
+
return this.augment({ [key]: schema13 });
|
|
12796
12811
|
}
|
|
12797
12812
|
// merge<Incoming extends AnyZodObject>(
|
|
12798
12813
|
// merging: Incoming
|
|
@@ -13007,33 +13022,33 @@ ZodUnion.create = (types2, params) => {
|
|
|
13007
13022
|
...processCreateParams(params)
|
|
13008
13023
|
});
|
|
13009
13024
|
};
|
|
13010
|
-
var getDiscriminator = (
|
|
13011
|
-
if (
|
|
13012
|
-
return getDiscriminator(
|
|
13013
|
-
} else if (
|
|
13014
|
-
return getDiscriminator(
|
|
13015
|
-
} else if (
|
|
13016
|
-
return [
|
|
13017
|
-
} else if (
|
|
13018
|
-
return
|
|
13019
|
-
} else if (
|
|
13020
|
-
return util.objectValues(
|
|
13021
|
-
} else if (
|
|
13022
|
-
return getDiscriminator(
|
|
13023
|
-
} else if (
|
|
13025
|
+
var getDiscriminator = (type13) => {
|
|
13026
|
+
if (type13 instanceof ZodLazy) {
|
|
13027
|
+
return getDiscriminator(type13.schema);
|
|
13028
|
+
} else if (type13 instanceof ZodEffects) {
|
|
13029
|
+
return getDiscriminator(type13.innerType());
|
|
13030
|
+
} else if (type13 instanceof ZodLiteral) {
|
|
13031
|
+
return [type13.value];
|
|
13032
|
+
} else if (type13 instanceof ZodEnum) {
|
|
13033
|
+
return type13.options;
|
|
13034
|
+
} else if (type13 instanceof ZodNativeEnum) {
|
|
13035
|
+
return util.objectValues(type13.enum);
|
|
13036
|
+
} else if (type13 instanceof ZodDefault) {
|
|
13037
|
+
return getDiscriminator(type13._def.innerType);
|
|
13038
|
+
} else if (type13 instanceof ZodUndefined) {
|
|
13024
13039
|
return [void 0];
|
|
13025
|
-
} else if (
|
|
13040
|
+
} else if (type13 instanceof ZodNull) {
|
|
13026
13041
|
return [null];
|
|
13027
|
-
} else if (
|
|
13028
|
-
return [void 0, ...getDiscriminator(
|
|
13029
|
-
} else if (
|
|
13030
|
-
return [null, ...getDiscriminator(
|
|
13031
|
-
} else if (
|
|
13032
|
-
return getDiscriminator(
|
|
13033
|
-
} else if (
|
|
13034
|
-
return getDiscriminator(
|
|
13035
|
-
} else if (
|
|
13036
|
-
return getDiscriminator(
|
|
13042
|
+
} else if (type13 instanceof ZodOptional) {
|
|
13043
|
+
return [void 0, ...getDiscriminator(type13.unwrap())];
|
|
13044
|
+
} else if (type13 instanceof ZodNullable) {
|
|
13045
|
+
return [null, ...getDiscriminator(type13.unwrap())];
|
|
13046
|
+
} else if (type13 instanceof ZodBranded) {
|
|
13047
|
+
return getDiscriminator(type13.unwrap());
|
|
13048
|
+
} else if (type13 instanceof ZodReadonly) {
|
|
13049
|
+
return getDiscriminator(type13.unwrap());
|
|
13050
|
+
} else if (type13 instanceof ZodCatch) {
|
|
13051
|
+
return getDiscriminator(type13._def.innerType);
|
|
13037
13052
|
} else {
|
|
13038
13053
|
return [];
|
|
13039
13054
|
}
|
|
@@ -13093,8 +13108,8 @@ var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {
|
|
|
13093
13108
|
*/
|
|
13094
13109
|
static create(discriminator, options, params) {
|
|
13095
13110
|
const optionsMap = /* @__PURE__ */ new Map();
|
|
13096
|
-
for (const
|
|
13097
|
-
const discriminatorValues = getDiscriminator(
|
|
13111
|
+
for (const type13 of options) {
|
|
13112
|
+
const discriminatorValues = getDiscriminator(type13.shape[discriminator]);
|
|
13098
13113
|
if (!discriminatorValues.length) {
|
|
13099
13114
|
throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
|
|
13100
13115
|
}
|
|
@@ -13102,7 +13117,7 @@ var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {
|
|
|
13102
13117
|
if (optionsMap.has(value)) {
|
|
13103
13118
|
throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
|
|
13104
13119
|
}
|
|
13105
|
-
optionsMap.set(value,
|
|
13120
|
+
optionsMap.set(value, type13);
|
|
13106
13121
|
}
|
|
13107
13122
|
}
|
|
13108
13123
|
return new _ZodDiscriminatedUnion({
|
|
@@ -13238,10 +13253,10 @@ var ZodTuple = class _ZodTuple extends ZodType {
|
|
|
13238
13253
|
status.dirty();
|
|
13239
13254
|
}
|
|
13240
13255
|
const items = [...ctx.data].map((item, itemIndex) => {
|
|
13241
|
-
const
|
|
13242
|
-
if (!
|
|
13256
|
+
const schema13 = this._def.items[itemIndex] || this._def.rest;
|
|
13257
|
+
if (!schema13)
|
|
13243
13258
|
return null;
|
|
13244
|
-
return
|
|
13259
|
+
return schema13._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
|
|
13245
13260
|
}).filter((x) => !!x);
|
|
13246
13261
|
if (ctx.common.async) {
|
|
13247
13262
|
return Promise.all(items).then((results) => {
|
|
@@ -13775,9 +13790,9 @@ var ZodPromise = class extends ZodType {
|
|
|
13775
13790
|
}));
|
|
13776
13791
|
}
|
|
13777
13792
|
};
|
|
13778
|
-
ZodPromise.create = (
|
|
13793
|
+
ZodPromise.create = (schema13, params) => {
|
|
13779
13794
|
return new ZodPromise({
|
|
13780
|
-
type:
|
|
13795
|
+
type: schema13,
|
|
13781
13796
|
typeName: ZodFirstPartyTypeKind.ZodPromise,
|
|
13782
13797
|
...processCreateParams(params)
|
|
13783
13798
|
});
|
|
@@ -13902,17 +13917,17 @@ var ZodEffects = class extends ZodType {
|
|
|
13902
13917
|
util.assertNever(effect);
|
|
13903
13918
|
}
|
|
13904
13919
|
};
|
|
13905
|
-
ZodEffects.create = (
|
|
13920
|
+
ZodEffects.create = (schema13, effect, params) => {
|
|
13906
13921
|
return new ZodEffects({
|
|
13907
|
-
schema:
|
|
13922
|
+
schema: schema13,
|
|
13908
13923
|
typeName: ZodFirstPartyTypeKind.ZodEffects,
|
|
13909
13924
|
effect,
|
|
13910
13925
|
...processCreateParams(params)
|
|
13911
13926
|
});
|
|
13912
13927
|
};
|
|
13913
|
-
ZodEffects.createWithPreprocess = (preprocess,
|
|
13928
|
+
ZodEffects.createWithPreprocess = (preprocess, schema13, params) => {
|
|
13914
13929
|
return new ZodEffects({
|
|
13915
|
-
schema:
|
|
13930
|
+
schema: schema13,
|
|
13916
13931
|
effect: { type: "preprocess", transform: preprocess },
|
|
13917
13932
|
typeName: ZodFirstPartyTypeKind.ZodEffects,
|
|
13918
13933
|
...processCreateParams(params)
|
|
@@ -13930,9 +13945,9 @@ var ZodOptional = class extends ZodType {
|
|
|
13930
13945
|
return this._def.innerType;
|
|
13931
13946
|
}
|
|
13932
13947
|
};
|
|
13933
|
-
ZodOptional.create = (
|
|
13948
|
+
ZodOptional.create = (type13, params) => {
|
|
13934
13949
|
return new ZodOptional({
|
|
13935
|
-
innerType:
|
|
13950
|
+
innerType: type13,
|
|
13936
13951
|
typeName: ZodFirstPartyTypeKind.ZodOptional,
|
|
13937
13952
|
...processCreateParams(params)
|
|
13938
13953
|
});
|
|
@@ -13949,9 +13964,9 @@ var ZodNullable = class extends ZodType {
|
|
|
13949
13964
|
return this._def.innerType;
|
|
13950
13965
|
}
|
|
13951
13966
|
};
|
|
13952
|
-
ZodNullable.create = (
|
|
13967
|
+
ZodNullable.create = (type13, params) => {
|
|
13953
13968
|
return new ZodNullable({
|
|
13954
|
-
innerType:
|
|
13969
|
+
innerType: type13,
|
|
13955
13970
|
typeName: ZodFirstPartyTypeKind.ZodNullable,
|
|
13956
13971
|
...processCreateParams(params)
|
|
13957
13972
|
});
|
|
@@ -13973,9 +13988,9 @@ var ZodDefault = class extends ZodType {
|
|
|
13973
13988
|
return this._def.innerType;
|
|
13974
13989
|
}
|
|
13975
13990
|
};
|
|
13976
|
-
ZodDefault.create = (
|
|
13991
|
+
ZodDefault.create = (type13, params) => {
|
|
13977
13992
|
return new ZodDefault({
|
|
13978
|
-
innerType:
|
|
13993
|
+
innerType: type13,
|
|
13979
13994
|
typeName: ZodFirstPartyTypeKind.ZodDefault,
|
|
13980
13995
|
defaultValue: typeof params.default === "function" ? params.default : () => params.default,
|
|
13981
13996
|
...processCreateParams(params)
|
|
@@ -14026,9 +14041,9 @@ var ZodCatch = class extends ZodType {
|
|
|
14026
14041
|
return this._def.innerType;
|
|
14027
14042
|
}
|
|
14028
14043
|
};
|
|
14029
|
-
ZodCatch.create = (
|
|
14044
|
+
ZodCatch.create = (type13, params) => {
|
|
14030
14045
|
return new ZodCatch({
|
|
14031
|
-
innerType:
|
|
14046
|
+
innerType: type13,
|
|
14032
14047
|
typeName: ZodFirstPartyTypeKind.ZodCatch,
|
|
14033
14048
|
catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
|
|
14034
14049
|
...processCreateParams(params)
|
|
@@ -14140,9 +14155,9 @@ var ZodReadonly = class extends ZodType {
|
|
|
14140
14155
|
return this._def.innerType;
|
|
14141
14156
|
}
|
|
14142
14157
|
};
|
|
14143
|
-
ZodReadonly.create = (
|
|
14158
|
+
ZodReadonly.create = (type13, params) => {
|
|
14144
14159
|
return new ZodReadonly({
|
|
14145
|
-
innerType:
|
|
14160
|
+
innerType: type13,
|
|
14146
14161
|
typeName: ZodFirstPartyTypeKind.ZodReadonly,
|
|
14147
14162
|
...processCreateParams(params)
|
|
14148
14163
|
});
|
|
@@ -14375,6 +14390,9 @@ var amountTokensValidation = (value) => {
|
|
|
14375
14390
|
if (typeof value !== "number") {
|
|
14376
14391
|
throw new GraphQLError(`Value is not number: ${JSON.stringify(value)}`);
|
|
14377
14392
|
}
|
|
14393
|
+
if (!Number.isFinite(value)) {
|
|
14394
|
+
throw new GraphQLError(`Value is not a finite number: ${value}`);
|
|
14395
|
+
}
|
|
14378
14396
|
const result = schema.safeParse(value);
|
|
14379
14397
|
if (result.success) return result.data;
|
|
14380
14398
|
throw new GraphQLError(result.error.message);
|
|
@@ -14388,7 +14406,8 @@ var config = {
|
|
|
14388
14406
|
if (value.kind !== Kind.FLOAT) {
|
|
14389
14407
|
throw new GraphQLError("some error message", { nodes: value });
|
|
14390
14408
|
}
|
|
14391
|
-
|
|
14409
|
+
const parsedValue = parseFloat(value.value);
|
|
14410
|
+
return amountTokensValidation(parsedValue);
|
|
14392
14411
|
}
|
|
14393
14412
|
};
|
|
14394
14413
|
new GraphQLScalarType(config);
|
|
@@ -14423,6 +14442,9 @@ var amountPercentageValidation = (value) => {
|
|
|
14423
14442
|
if (typeof value !== "number") {
|
|
14424
14443
|
throw new GraphQLError(`Value is not number: ${JSON.stringify(value)}`);
|
|
14425
14444
|
}
|
|
14445
|
+
if (!Number.isFinite(value)) {
|
|
14446
|
+
throw new GraphQLError(`Value is not a finite number: ${value}`);
|
|
14447
|
+
}
|
|
14426
14448
|
const result = schema3.safeParse(value);
|
|
14427
14449
|
if (result.success) return result.data;
|
|
14428
14450
|
throw new GraphQLError(result.error.message);
|
|
@@ -14436,7 +14458,8 @@ var config3 = {
|
|
|
14436
14458
|
if (value.kind !== Kind.FLOAT) {
|
|
14437
14459
|
throw new GraphQLError("some error message", { nodes: value });
|
|
14438
14460
|
}
|
|
14439
|
-
|
|
14461
|
+
const parsedValue = parseFloat(value.value);
|
|
14462
|
+
return amountPercentageValidation(parsedValue);
|
|
14440
14463
|
}
|
|
14441
14464
|
};
|
|
14442
14465
|
new GraphQLScalarType(config3);
|
|
@@ -14466,6 +14489,214 @@ var config4 = {
|
|
|
14466
14489
|
}
|
|
14467
14490
|
};
|
|
14468
14491
|
new GraphQLScalarType(config4);
|
|
14492
|
+
var typedef5 = "scalar Date";
|
|
14493
|
+
var schema5 = z.string().datetime();
|
|
14494
|
+
var datetimeValidation = (value) => {
|
|
14495
|
+
if (typeof value !== "string") {
|
|
14496
|
+
throw new GraphQLError(
|
|
14497
|
+
`Value is not iso string: ${JSON.stringify(value)}`
|
|
14498
|
+
);
|
|
14499
|
+
}
|
|
14500
|
+
const result = schema5.safeParse(value);
|
|
14501
|
+
if (result.success) return result.data;
|
|
14502
|
+
throw new GraphQLError(result.error.message);
|
|
14503
|
+
};
|
|
14504
|
+
var config5 = {
|
|
14505
|
+
name: "Date",
|
|
14506
|
+
description: "A custom scalar that represents a datetime in ISO 8601 format (Time: 00:00:00)",
|
|
14507
|
+
serialize: datetimeValidation,
|
|
14508
|
+
parseValue: datetimeValidation,
|
|
14509
|
+
parseLiteral: (value) => {
|
|
14510
|
+
if (value.kind !== Kind.STRING) {
|
|
14511
|
+
throw new GraphQLError("Value is not an string", { nodes: value });
|
|
14512
|
+
}
|
|
14513
|
+
return datetimeValidation(value.value);
|
|
14514
|
+
}
|
|
14515
|
+
};
|
|
14516
|
+
new GraphQLScalarType(config5);
|
|
14517
|
+
var typedef6 = "scalar DateTime";
|
|
14518
|
+
var schema6 = z.string().datetime();
|
|
14519
|
+
var datetimeValidation2 = (value) => {
|
|
14520
|
+
if (typeof value !== "string") {
|
|
14521
|
+
throw new GraphQLError(
|
|
14522
|
+
`Value is not iso string: ${JSON.stringify(value)}`
|
|
14523
|
+
);
|
|
14524
|
+
}
|
|
14525
|
+
const result = schema6.safeParse(value);
|
|
14526
|
+
if (result.success) return result.data;
|
|
14527
|
+
throw new GraphQLError(result.error.message);
|
|
14528
|
+
};
|
|
14529
|
+
var config6 = {
|
|
14530
|
+
name: "DateTime",
|
|
14531
|
+
description: "A custom scalar that represents a datetime in ISO 8601 format",
|
|
14532
|
+
serialize: datetimeValidation2,
|
|
14533
|
+
parseValue: datetimeValidation2,
|
|
14534
|
+
parseLiteral: (value) => {
|
|
14535
|
+
if (value.kind !== Kind.STRING) {
|
|
14536
|
+
throw new GraphQLError("Value is not an string", { nodes: value });
|
|
14537
|
+
}
|
|
14538
|
+
return datetimeValidation2(value.value);
|
|
14539
|
+
}
|
|
14540
|
+
};
|
|
14541
|
+
new GraphQLScalarType(config6);
|
|
14542
|
+
var typedef7 = "scalar URL";
|
|
14543
|
+
var schema7 = z.string().url();
|
|
14544
|
+
var urlValidation = (value) => {
|
|
14545
|
+
if (typeof value !== "string") {
|
|
14546
|
+
throw new GraphQLError(
|
|
14547
|
+
`Value is not iso string: ${JSON.stringify(value)}`
|
|
14548
|
+
);
|
|
14549
|
+
}
|
|
14550
|
+
const result = schema7.safeParse(value);
|
|
14551
|
+
if (result.success) return result.data;
|
|
14552
|
+
throw new GraphQLError(result.error.message);
|
|
14553
|
+
};
|
|
14554
|
+
var config7 = {
|
|
14555
|
+
name: "URL",
|
|
14556
|
+
description: "A custom scalar that represents a URL string",
|
|
14557
|
+
serialize: urlValidation,
|
|
14558
|
+
parseValue: urlValidation,
|
|
14559
|
+
parseLiteral: (value) => {
|
|
14560
|
+
if (value.kind !== Kind.STRING) {
|
|
14561
|
+
throw new GraphQLError("Value is not an string", { nodes: value });
|
|
14562
|
+
}
|
|
14563
|
+
return urlValidation(value.value);
|
|
14564
|
+
}
|
|
14565
|
+
};
|
|
14566
|
+
new GraphQLScalarType(config7);
|
|
14567
|
+
var typedef8 = "scalar Amount_Money";
|
|
14568
|
+
var schema8 = z.number();
|
|
14569
|
+
var amountMoneyValidation = (value) => {
|
|
14570
|
+
if (typeof value !== "number") {
|
|
14571
|
+
throw new GraphQLError(`Value is not number: ${JSON.stringify(value)}`);
|
|
14572
|
+
}
|
|
14573
|
+
if (!Number.isFinite(value)) {
|
|
14574
|
+
throw new GraphQLError(`Value is not a finite number: ${value}`);
|
|
14575
|
+
}
|
|
14576
|
+
const result = schema8.safeParse(value);
|
|
14577
|
+
if (result.success) return result.data;
|
|
14578
|
+
throw new GraphQLError(result.error.message);
|
|
14579
|
+
};
|
|
14580
|
+
var config8 = {
|
|
14581
|
+
name: "Amount_Money",
|
|
14582
|
+
description: "A custom scalar that represents a monetary amount in a currency",
|
|
14583
|
+
serialize: amountMoneyValidation,
|
|
14584
|
+
parseValue: amountMoneyValidation,
|
|
14585
|
+
parseLiteral: (value) => {
|
|
14586
|
+
if (value.kind !== Kind.FLOAT) {
|
|
14587
|
+
throw new GraphQLError("Value is not a float type", {
|
|
14588
|
+
nodes: value
|
|
14589
|
+
});
|
|
14590
|
+
}
|
|
14591
|
+
const parsedValue = parseFloat(value.value);
|
|
14592
|
+
return amountMoneyValidation(parsedValue);
|
|
14593
|
+
}
|
|
14594
|
+
};
|
|
14595
|
+
new GraphQLScalarType(config8);
|
|
14596
|
+
var typedef9 = "scalar OLabel";
|
|
14597
|
+
var schema9 = z.string();
|
|
14598
|
+
var oLabelValidation = (value) => {
|
|
14599
|
+
if (typeof value !== "string") {
|
|
14600
|
+
throw new GraphQLError(`Value is not string: ${JSON.stringify(value)}`);
|
|
14601
|
+
}
|
|
14602
|
+
const result = schema9.safeParse(value);
|
|
14603
|
+
if (result.success) return result.data;
|
|
14604
|
+
throw new GraphQLError(result.error.message);
|
|
14605
|
+
};
|
|
14606
|
+
var config9 = {
|
|
14607
|
+
name: "OLabel",
|
|
14608
|
+
description: "A custom scalar that represents a OLabel string",
|
|
14609
|
+
serialize: oLabelValidation,
|
|
14610
|
+
parseValue: oLabelValidation,
|
|
14611
|
+
parseLiteral: (value) => {
|
|
14612
|
+
if (value.kind !== Kind.STRING) {
|
|
14613
|
+
throw new GraphQLError(
|
|
14614
|
+
`Value is not a valid string: ${value.kind}`,
|
|
14615
|
+
{ nodes: value }
|
|
14616
|
+
);
|
|
14617
|
+
}
|
|
14618
|
+
return oLabelValidation(value.value);
|
|
14619
|
+
}
|
|
14620
|
+
};
|
|
14621
|
+
new GraphQLScalarType(config9);
|
|
14622
|
+
var typedef10 = "scalar Currency";
|
|
14623
|
+
var schema10 = z.string();
|
|
14624
|
+
var currencyValidation = (value) => {
|
|
14625
|
+
if (typeof value !== "string") {
|
|
14626
|
+
throw new GraphQLError(`Value is not string: ${JSON.stringify(value)}`);
|
|
14627
|
+
}
|
|
14628
|
+
const result = schema10.safeParse(value);
|
|
14629
|
+
if (result.success) return result.data;
|
|
14630
|
+
throw new GraphQLError(result.error.message);
|
|
14631
|
+
};
|
|
14632
|
+
var config10 = {
|
|
14633
|
+
name: "Currency",
|
|
14634
|
+
description: "A custom scalar that represents a Currency Code string",
|
|
14635
|
+
serialize: currencyValidation,
|
|
14636
|
+
parseValue: currencyValidation,
|
|
14637
|
+
parseLiteral: (value) => {
|
|
14638
|
+
if (value.kind !== Kind.STRING) {
|
|
14639
|
+
throw new GraphQLError(
|
|
14640
|
+
`Value is not a valid string: ${value.kind}`,
|
|
14641
|
+
{ nodes: value }
|
|
14642
|
+
);
|
|
14643
|
+
}
|
|
14644
|
+
return currencyValidation(value.value);
|
|
14645
|
+
}
|
|
14646
|
+
};
|
|
14647
|
+
new GraphQLScalarType(config10);
|
|
14648
|
+
var typedef11 = "scalar PHID";
|
|
14649
|
+
var schema11 = z.string();
|
|
14650
|
+
var phidlValidation = (value) => {
|
|
14651
|
+
if (typeof value !== "string") {
|
|
14652
|
+
throw new GraphQLError(`Value is not string: ${JSON.stringify(value)}`);
|
|
14653
|
+
}
|
|
14654
|
+
const result = schema11.safeParse(value);
|
|
14655
|
+
if (result.success) return result.data;
|
|
14656
|
+
throw new GraphQLError(result.error.message);
|
|
14657
|
+
};
|
|
14658
|
+
var config11 = {
|
|
14659
|
+
name: "PHID",
|
|
14660
|
+
description: "A custom scalar that represents a PowerhouseID string",
|
|
14661
|
+
serialize: phidlValidation,
|
|
14662
|
+
parseValue: phidlValidation,
|
|
14663
|
+
parseLiteral: (value) => {
|
|
14664
|
+
if (value.kind !== Kind.STRING) {
|
|
14665
|
+
throw new GraphQLError(
|
|
14666
|
+
`Value is not a valid string: ${value.kind}`,
|
|
14667
|
+
{ nodes: value }
|
|
14668
|
+
);
|
|
14669
|
+
}
|
|
14670
|
+
return phidlValidation(value.value);
|
|
14671
|
+
}
|
|
14672
|
+
};
|
|
14673
|
+
new GraphQLScalarType(config11);
|
|
14674
|
+
var typedef12 = "scalar OID";
|
|
14675
|
+
var schema12 = z.string();
|
|
14676
|
+
var oIdValidation = (value) => {
|
|
14677
|
+
if (typeof value !== "string") {
|
|
14678
|
+
throw new GraphQLError(`Value is not string: ${JSON.stringify(value)}`);
|
|
14679
|
+
}
|
|
14680
|
+
const result = schema12.safeParse(value);
|
|
14681
|
+
if (result.success) return result.data;
|
|
14682
|
+
throw new GraphQLError(result.error.message);
|
|
14683
|
+
};
|
|
14684
|
+
var config12 = {
|
|
14685
|
+
name: "OID",
|
|
14686
|
+
description: "A custom scalar that represents a OID string",
|
|
14687
|
+
serialize: oIdValidation,
|
|
14688
|
+
parseValue: oIdValidation,
|
|
14689
|
+
parseLiteral: (value) => {
|
|
14690
|
+
if (value.kind !== Kind.STRING) {
|
|
14691
|
+
throw new GraphQLError(
|
|
14692
|
+
`Value is not a valid string: ${value.kind}`,
|
|
14693
|
+
{ nodes: value }
|
|
14694
|
+
);
|
|
14695
|
+
}
|
|
14696
|
+
return oIdValidation(value.value);
|
|
14697
|
+
}
|
|
14698
|
+
};
|
|
14699
|
+
new GraphQLScalarType(config12);
|
|
14469
14700
|
|
|
14470
14701
|
// ../scalars/dist/es/src/scalars/index.js
|
|
14471
14702
|
var typeDefs = [
|
|
@@ -14474,14 +14705,14 @@ var typeDefs = [
|
|
|
14474
14705
|
typedef2,
|
|
14475
14706
|
typedef3,
|
|
14476
14707
|
typedef4,
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14708
|
+
typedef5,
|
|
14709
|
+
typedef6,
|
|
14710
|
+
typedef7,
|
|
14711
|
+
typedef8,
|
|
14712
|
+
typedef9,
|
|
14713
|
+
typedef10,
|
|
14714
|
+
typedef11,
|
|
14715
|
+
typedef12
|
|
14485
14716
|
];
|
|
14486
14717
|
|
|
14487
14718
|
// ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
|
|
@@ -14641,7 +14872,7 @@ var getDocumentModelTypeDefs = (documentDriveServer, typeDefs2) => {
|
|
|
14641
14872
|
}
|
|
14642
14873
|
`;
|
|
14643
14874
|
});
|
|
14644
|
-
const
|
|
14875
|
+
const schema13 = lib_default`
|
|
14645
14876
|
${typeDefs.join("\n").replaceAll(";", "")}
|
|
14646
14877
|
|
|
14647
14878
|
type Operation {
|
|
@@ -14662,7 +14893,7 @@ var getDocumentModelTypeDefs = (documentDriveServer, typeDefs2) => {
|
|
|
14662
14893
|
|
|
14663
14894
|
${typeDefs2}
|
|
14664
14895
|
`;
|
|
14665
|
-
return
|
|
14896
|
+
return schema13;
|
|
14666
14897
|
};
|
|
14667
14898
|
|
|
14668
14899
|
// src/subgraphs/analytics/index.ts
|
|
@@ -14671,7 +14902,7 @@ __export(analytics_exports, {
|
|
|
14671
14902
|
AnalyticsSubgraph: () => AnalyticsSubgraph
|
|
14672
14903
|
});
|
|
14673
14904
|
|
|
14674
|
-
// ../../node_modules/.pnpm/@powerhousedao+analytics-engine-graphql@0.2.
|
|
14905
|
+
// ../../node_modules/.pnpm/@powerhousedao+analytics-engine-graphql@0.2.1/node_modules/@powerhousedao/analytics-engine-graphql/dist/AnalyticsResolvers.js
|
|
14675
14906
|
var AnalyticsResolvers = {
|
|
14676
14907
|
Query: {
|
|
14677
14908
|
analytics: (_, __, { dataSources }) => {
|
|
@@ -15094,9 +15325,9 @@ function partsOffset(dtf, date) {
|
|
|
15094
15325
|
const formatted = dtf.formatToParts(date);
|
|
15095
15326
|
const filled = [];
|
|
15096
15327
|
for (let i = 0; i < formatted.length; i++) {
|
|
15097
|
-
const { type:
|
|
15098
|
-
const pos = typeToPos[
|
|
15099
|
-
if (
|
|
15328
|
+
const { type: type13, value } = formatted[i];
|
|
15329
|
+
const pos = typeToPos[type13];
|
|
15330
|
+
if (type13 === "era") {
|
|
15100
15331
|
filled[pos] = value;
|
|
15101
15332
|
} else if (!isUndefined(pos)) {
|
|
15102
15333
|
filled[pos] = parseInt(value, 10);
|
|
@@ -15358,7 +15589,7 @@ function intlConfigString(localeStr, numberingSystem, outputCalendar) {
|
|
|
15358
15589
|
function mapMonths(f) {
|
|
15359
15590
|
const ms = [];
|
|
15360
15591
|
for (let i = 1; i <= 12; i++) {
|
|
15361
|
-
const dt =
|
|
15592
|
+
const dt = DateTime2.utc(2009, i, 1);
|
|
15362
15593
|
ms.push(f(dt));
|
|
15363
15594
|
}
|
|
15364
15595
|
return ms;
|
|
@@ -15366,7 +15597,7 @@ function mapMonths(f) {
|
|
|
15366
15597
|
function mapWeekdays(f) {
|
|
15367
15598
|
const ms = [];
|
|
15368
15599
|
for (let i = 1; i <= 7; i++) {
|
|
15369
|
-
const dt =
|
|
15600
|
+
const dt = DateTime2.utc(2016, 11, 13 + i);
|
|
15370
15601
|
ms.push(f(dt));
|
|
15371
15602
|
}
|
|
15372
15603
|
return ms;
|
|
@@ -15597,7 +15828,7 @@ var Locale = class _Locale {
|
|
|
15597
15828
|
() => {
|
|
15598
15829
|
if (!this.meridiemCache) {
|
|
15599
15830
|
const intl = { hour: "numeric", hourCycle: "h12" };
|
|
15600
|
-
this.meridiemCache = [
|
|
15831
|
+
this.meridiemCache = [DateTime2.utc(2016, 11, 13, 9), DateTime2.utc(2016, 11, 13, 19)].map(
|
|
15601
15832
|
(dt) => this.extract(dt, intl, "dayperiod")
|
|
15602
15833
|
);
|
|
15603
15834
|
}
|
|
@@ -15609,7 +15840,7 @@ var Locale = class _Locale {
|
|
|
15609
15840
|
return listStuff(this, length, eras, () => {
|
|
15610
15841
|
const intl = { era: length };
|
|
15611
15842
|
if (!this.eraCache[length]) {
|
|
15612
|
-
this.eraCache[length] = [
|
|
15843
|
+
this.eraCache[length] = [DateTime2.utc(-40, 1, 1), DateTime2.utc(2017, 1, 1)].map(
|
|
15613
15844
|
(dt) => this.extract(dt, intl, "era")
|
|
15614
15845
|
);
|
|
15615
15846
|
}
|
|
@@ -16083,7 +16314,7 @@ var Settings = class {
|
|
|
16083
16314
|
static resetCaches() {
|
|
16084
16315
|
Locale.resetCache();
|
|
16085
16316
|
IANAZone.resetCache();
|
|
16086
|
-
|
|
16317
|
+
DateTime2.resetCache();
|
|
16087
16318
|
resetDigitRegexCache();
|
|
16088
16319
|
}
|
|
16089
16320
|
};
|
|
@@ -17276,16 +17507,16 @@ var Duration = class _Duration {
|
|
|
17276
17507
|
/**
|
|
17277
17508
|
* @private
|
|
17278
17509
|
*/
|
|
17279
|
-
constructor(
|
|
17280
|
-
const accurate =
|
|
17510
|
+
constructor(config13) {
|
|
17511
|
+
const accurate = config13.conversionAccuracy === "longterm" || false;
|
|
17281
17512
|
let matrix = accurate ? accurateMatrix : casualMatrix;
|
|
17282
|
-
if (
|
|
17283
|
-
matrix =
|
|
17513
|
+
if (config13.matrix) {
|
|
17514
|
+
matrix = config13.matrix;
|
|
17284
17515
|
}
|
|
17285
|
-
this.values =
|
|
17286
|
-
this.loc =
|
|
17516
|
+
this.values = config13.values;
|
|
17517
|
+
this.loc = config13.loc || Locale.create();
|
|
17287
17518
|
this.conversionAccuracy = accurate ? "longterm" : "casual";
|
|
17288
|
-
this.invalid =
|
|
17519
|
+
this.invalid = config13.invalid || null;
|
|
17289
17520
|
this.matrix = matrix;
|
|
17290
17521
|
this.isLuxonDuration = true;
|
|
17291
17522
|
}
|
|
@@ -17587,7 +17818,7 @@ var Duration = class _Duration {
|
|
|
17587
17818
|
...opts,
|
|
17588
17819
|
includeOffset: false
|
|
17589
17820
|
};
|
|
17590
|
-
const dateTime =
|
|
17821
|
+
const dateTime = DateTime2.fromMillis(millis, { zone: "UTC" });
|
|
17591
17822
|
return dateTime.toISOTime(opts);
|
|
17592
17823
|
}
|
|
17593
17824
|
/**
|
|
@@ -17946,10 +18177,10 @@ var Interval = class _Interval {
|
|
|
17946
18177
|
/**
|
|
17947
18178
|
* @private
|
|
17948
18179
|
*/
|
|
17949
|
-
constructor(
|
|
17950
|
-
this.s =
|
|
17951
|
-
this.e =
|
|
17952
|
-
this.invalid =
|
|
18180
|
+
constructor(config13) {
|
|
18181
|
+
this.s = config13.start;
|
|
18182
|
+
this.e = config13.end;
|
|
18183
|
+
this.invalid = config13.invalid || null;
|
|
17953
18184
|
this.isLuxonInterval = true;
|
|
17954
18185
|
}
|
|
17955
18186
|
/**
|
|
@@ -18020,14 +18251,14 @@ var Interval = class _Interval {
|
|
|
18020
18251
|
if (s2 && e) {
|
|
18021
18252
|
let start, startIsValid;
|
|
18022
18253
|
try {
|
|
18023
|
-
start =
|
|
18254
|
+
start = DateTime2.fromISO(s2, opts);
|
|
18024
18255
|
startIsValid = start.isValid;
|
|
18025
18256
|
} catch (e2) {
|
|
18026
18257
|
startIsValid = false;
|
|
18027
18258
|
}
|
|
18028
18259
|
let end, endIsValid;
|
|
18029
18260
|
try {
|
|
18030
|
-
end =
|
|
18261
|
+
end = DateTime2.fromISO(e, opts);
|
|
18031
18262
|
endIsValid = end.isValid;
|
|
18032
18263
|
} catch (e2) {
|
|
18033
18264
|
endIsValid = false;
|
|
@@ -18475,7 +18706,7 @@ var Info = class {
|
|
|
18475
18706
|
* @return {boolean}
|
|
18476
18707
|
*/
|
|
18477
18708
|
static hasDST(zone = Settings.defaultZone) {
|
|
18478
|
-
const proto =
|
|
18709
|
+
const proto = DateTime2.now().setZone(zone).set({ month: 12 });
|
|
18479
18710
|
return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset;
|
|
18480
18711
|
}
|
|
18481
18712
|
/**
|
|
@@ -18909,17 +19140,17 @@ var partTypeStyleToTokenVal = {
|
|
|
18909
19140
|
}
|
|
18910
19141
|
};
|
|
18911
19142
|
function tokenForPart(part, formatOpts, resolvedOpts) {
|
|
18912
|
-
const { type:
|
|
18913
|
-
if (
|
|
19143
|
+
const { type: type13, value } = part;
|
|
19144
|
+
if (type13 === "literal") {
|
|
18914
19145
|
const isSpace = /^\s+$/.test(value);
|
|
18915
19146
|
return {
|
|
18916
19147
|
literal: !isSpace,
|
|
18917
19148
|
val: isSpace ? " " : value
|
|
18918
19149
|
};
|
|
18919
19150
|
}
|
|
18920
|
-
const style = formatOpts[
|
|
18921
|
-
let actualType =
|
|
18922
|
-
if (
|
|
19151
|
+
const style = formatOpts[type13];
|
|
19152
|
+
let actualType = type13;
|
|
19153
|
+
if (type13 === "hour") {
|
|
18923
19154
|
if (formatOpts.hour12 != null) {
|
|
18924
19155
|
actualType = formatOpts.hour12 ? "hour12" : "hour24";
|
|
18925
19156
|
} else if (formatOpts.hourCycle != null) {
|
|
@@ -19040,7 +19271,7 @@ function dateTimeFromMatches(matches) {
|
|
|
19040
19271
|
var dummyDateTimeCache = null;
|
|
19041
19272
|
function getDummyDateTime() {
|
|
19042
19273
|
if (!dummyDateTimeCache) {
|
|
19043
|
-
dummyDateTimeCache =
|
|
19274
|
+
dummyDateTimeCache = DateTime2.fromMillis(1555555555555);
|
|
19044
19275
|
}
|
|
19045
19276
|
return dummyDateTimeCache;
|
|
19046
19277
|
}
|
|
@@ -19150,7 +19381,7 @@ function clone2(inst, alts) {
|
|
|
19150
19381
|
loc: inst.loc,
|
|
19151
19382
|
invalid: inst.invalid
|
|
19152
19383
|
};
|
|
19153
|
-
return new
|
|
19384
|
+
return new DateTime2({ ...current2, ...alts, old: current2 });
|
|
19154
19385
|
}
|
|
19155
19386
|
function fixOffset(localTS, o, tz) {
|
|
19156
19387
|
let utcGuess = localTS - o * 60 * 1e3;
|
|
@@ -19208,14 +19439,14 @@ function adjustTime(inst, dur) {
|
|
|
19208
19439
|
function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {
|
|
19209
19440
|
const { setZone, zone } = opts;
|
|
19210
19441
|
if (parsed && Object.keys(parsed).length !== 0 || parsedZone) {
|
|
19211
|
-
const interpretationZone = parsedZone || zone, inst =
|
|
19442
|
+
const interpretationZone = parsedZone || zone, inst = DateTime2.fromObject(parsed, {
|
|
19212
19443
|
...opts,
|
|
19213
19444
|
zone: interpretationZone,
|
|
19214
19445
|
specificOffset
|
|
19215
19446
|
});
|
|
19216
19447
|
return setZone ? inst : inst.setZone(zone);
|
|
19217
19448
|
} else {
|
|
19218
|
-
return
|
|
19449
|
+
return DateTime2.invalid(
|
|
19219
19450
|
new Invalid("unparsable", `the input "${text}" can't be parsed as ${format}`)
|
|
19220
19451
|
);
|
|
19221
19452
|
}
|
|
@@ -19371,7 +19602,7 @@ function guessOffsetForZone(zone) {
|
|
|
19371
19602
|
function quickDT(obj, opts) {
|
|
19372
19603
|
const zone = normalizeZone(opts.zone, Settings.defaultZone);
|
|
19373
19604
|
if (!zone.isValid) {
|
|
19374
|
-
return
|
|
19605
|
+
return DateTime2.invalid(unsupportedZone(zone));
|
|
19375
19606
|
}
|
|
19376
19607
|
const loc = Locale.fromObject(opts);
|
|
19377
19608
|
let ts, o;
|
|
@@ -19383,14 +19614,14 @@ function quickDT(obj, opts) {
|
|
|
19383
19614
|
}
|
|
19384
19615
|
const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);
|
|
19385
19616
|
if (invalid) {
|
|
19386
|
-
return
|
|
19617
|
+
return DateTime2.invalid(invalid);
|
|
19387
19618
|
}
|
|
19388
19619
|
const offsetProvis = guessOffsetForZone(zone);
|
|
19389
19620
|
[ts, o] = objToTS(obj, offsetProvis, zone);
|
|
19390
19621
|
} else {
|
|
19391
19622
|
ts = Settings.now();
|
|
19392
19623
|
}
|
|
19393
|
-
return new
|
|
19624
|
+
return new DateTime2({ ts, zone, loc, o });
|
|
19394
19625
|
}
|
|
19395
19626
|
function diffRelative(start, end, opts) {
|
|
19396
19627
|
const round = isUndefined(opts.round) ? true : opts.round, format = (c, unit) => {
|
|
@@ -19429,21 +19660,21 @@ function lastOpts(argList) {
|
|
|
19429
19660
|
}
|
|
19430
19661
|
var zoneOffsetTs;
|
|
19431
19662
|
var zoneOffsetGuessCache = {};
|
|
19432
|
-
var
|
|
19663
|
+
var DateTime2 = class _DateTime {
|
|
19433
19664
|
/**
|
|
19434
19665
|
* @access private
|
|
19435
19666
|
*/
|
|
19436
|
-
constructor(
|
|
19437
|
-
const zone =
|
|
19438
|
-
let invalid =
|
|
19439
|
-
this.ts = isUndefined(
|
|
19667
|
+
constructor(config13) {
|
|
19668
|
+
const zone = config13.zone || Settings.defaultZone;
|
|
19669
|
+
let invalid = config13.invalid || (Number.isNaN(config13.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null);
|
|
19670
|
+
this.ts = isUndefined(config13.ts) ? Settings.now() : config13.ts;
|
|
19440
19671
|
let c = null, o = null;
|
|
19441
19672
|
if (!invalid) {
|
|
19442
|
-
const unchanged =
|
|
19673
|
+
const unchanged = config13.old && config13.old.ts === this.ts && config13.old.zone.equals(zone);
|
|
19443
19674
|
if (unchanged) {
|
|
19444
|
-
[c, o] = [
|
|
19675
|
+
[c, o] = [config13.old.c, config13.old.o];
|
|
19445
19676
|
} else {
|
|
19446
|
-
const ot = isNumber(
|
|
19677
|
+
const ot = isNumber(config13.o) && !config13.old ? config13.o : zone.offset(this.ts);
|
|
19447
19678
|
c = tsToObj(this.ts, ot);
|
|
19448
19679
|
invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null;
|
|
19449
19680
|
c = invalid ? null : c;
|
|
@@ -19451,7 +19682,7 @@ var DateTime = class _DateTime {
|
|
|
19451
19682
|
}
|
|
19452
19683
|
}
|
|
19453
19684
|
this._zone = zone;
|
|
19454
|
-
this.loc =
|
|
19685
|
+
this.loc = config13.loc || Locale.create();
|
|
19455
19686
|
this.invalid = invalid;
|
|
19456
19687
|
this.weekData = null;
|
|
19457
19688
|
this.localWeekData = null;
|
|
@@ -21149,12 +21380,12 @@ var DateTime = class _DateTime {
|
|
|
21149
21380
|
}
|
|
21150
21381
|
};
|
|
21151
21382
|
function friendlyDateTime(dateTimeish) {
|
|
21152
|
-
if (
|
|
21383
|
+
if (DateTime2.isDateTime(dateTimeish)) {
|
|
21153
21384
|
return dateTimeish;
|
|
21154
21385
|
} else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {
|
|
21155
|
-
return
|
|
21386
|
+
return DateTime2.fromJSDate(dateTimeish);
|
|
21156
21387
|
} else if (dateTimeish && typeof dateTimeish === "object") {
|
|
21157
|
-
return
|
|
21388
|
+
return DateTime2.fromObject(dateTimeish);
|
|
21158
21389
|
} else {
|
|
21159
21390
|
throw new InvalidArgumentError(
|
|
21160
21391
|
`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`
|
|
@@ -21162,19 +21393,22 @@ function friendlyDateTime(dateTimeish) {
|
|
|
21162
21393
|
}
|
|
21163
21394
|
}
|
|
21164
21395
|
|
|
21165
|
-
// ../../node_modules/.pnpm/@powerhousedao+analytics-engine-graphql@0.2.
|
|
21396
|
+
// ../../node_modules/.pnpm/@powerhousedao+analytics-engine-graphql@0.2.1/node_modules/@powerhousedao/analytics-engine-graphql/dist/AnalyticsModel.js
|
|
21166
21397
|
var AnalyticsModel = class {
|
|
21167
21398
|
engine;
|
|
21168
|
-
|
|
21399
|
+
queryLogger;
|
|
21400
|
+
constructor(engine, queryLogger) {
|
|
21169
21401
|
this.engine = engine;
|
|
21402
|
+
this.queryLogger = queryLogger || (() => {
|
|
21403
|
+
});
|
|
21170
21404
|
}
|
|
21171
21405
|
async query(filter) {
|
|
21172
21406
|
if (!filter) {
|
|
21173
21407
|
return [];
|
|
21174
21408
|
}
|
|
21175
21409
|
const query = {
|
|
21176
|
-
start: filter.start ?
|
|
21177
|
-
end: filter.end ?
|
|
21410
|
+
start: filter.start ? DateTime2.fromISO(filter.start) : null,
|
|
21411
|
+
end: filter.end ? DateTime2.fromISO(filter.end) : null,
|
|
21178
21412
|
granularity: getGranularity(filter.granularity),
|
|
21179
21413
|
metrics: filter.metrics,
|
|
21180
21414
|
currency: getCurrency(filter.currency),
|
|
@@ -21197,6 +21431,7 @@ var AnalyticsModel = class {
|
|
|
21197
21431
|
query.lod[dimension.name] = Number(dimension.lod);
|
|
21198
21432
|
});
|
|
21199
21433
|
}
|
|
21434
|
+
this.queryLogger(query);
|
|
21200
21435
|
const results = await this.engine.execute(query);
|
|
21201
21436
|
return results;
|
|
21202
21437
|
}
|
|
@@ -21205,8 +21440,8 @@ var AnalyticsModel = class {
|
|
|
21205
21440
|
return [];
|
|
21206
21441
|
}
|
|
21207
21442
|
const query = {
|
|
21208
|
-
start: filter.start ?
|
|
21209
|
-
end: filter.end ?
|
|
21443
|
+
start: filter.start ? DateTime2.fromISO(filter.start) : null,
|
|
21444
|
+
end: filter.end ? DateTime2.fromISO(filter.end) : null,
|
|
21210
21445
|
granularity: getGranularity(filter.granularity),
|
|
21211
21446
|
metrics: filter.metrics,
|
|
21212
21447
|
currency: getCurrency(filter.currency),
|
|
@@ -21229,6 +21464,7 @@ var AnalyticsModel = class {
|
|
|
21229
21464
|
query.lod[dimension.name] = Number(dimension.lod);
|
|
21230
21465
|
});
|
|
21231
21466
|
}
|
|
21467
|
+
this.queryLogger(query);
|
|
21232
21468
|
return this.engine.executeMultiCurrency(query, {
|
|
21233
21469
|
targetCurrency: query.currency,
|
|
21234
21470
|
conversions: filter.conversions.map((c) => {
|
|
@@ -21281,7 +21517,7 @@ var getCurrency = (currency) => {
|
|
|
21281
21517
|
return currency ? AnalyticsPath.fromString(currency) : AnalyticsPath.fromString("");
|
|
21282
21518
|
};
|
|
21283
21519
|
|
|
21284
|
-
// ../../node_modules/.pnpm/@powerhousedao+analytics-engine-graphql@0.2.
|
|
21520
|
+
// ../../node_modules/.pnpm/@powerhousedao+analytics-engine-graphql@0.2.1/node_modules/@powerhousedao/analytics-engine-graphql/dist/schema.js
|
|
21285
21521
|
var typedefs = `
|
|
21286
21522
|
type AnalyticsQuery {
|
|
21287
21523
|
series(filter: AnalyticsFilter): [AnalyticsPeriod]
|
|
@@ -23563,9 +23799,9 @@ var ZodArray2 = class _ZodArray extends ZodType2 {
|
|
|
23563
23799
|
return this.min(1, message);
|
|
23564
23800
|
}
|
|
23565
23801
|
};
|
|
23566
|
-
ZodArray2.create = (
|
|
23802
|
+
ZodArray2.create = (schema13, params) => {
|
|
23567
23803
|
return new ZodArray2({
|
|
23568
|
-
type:
|
|
23804
|
+
type: schema13,
|
|
23569
23805
|
minLength: null,
|
|
23570
23806
|
maxLength: null,
|
|
23571
23807
|
exactLength: null,
|
|
@@ -23573,30 +23809,30 @@ ZodArray2.create = (schema5, params) => {
|
|
|
23573
23809
|
...processCreateParams2(params)
|
|
23574
23810
|
});
|
|
23575
23811
|
};
|
|
23576
|
-
function deepPartialify2(
|
|
23577
|
-
if (
|
|
23812
|
+
function deepPartialify2(schema13) {
|
|
23813
|
+
if (schema13 instanceof ZodObject2) {
|
|
23578
23814
|
const newShape = {};
|
|
23579
|
-
for (const key in
|
|
23580
|
-
const fieldSchema =
|
|
23815
|
+
for (const key in schema13.shape) {
|
|
23816
|
+
const fieldSchema = schema13.shape[key];
|
|
23581
23817
|
newShape[key] = ZodOptional2.create(deepPartialify2(fieldSchema));
|
|
23582
23818
|
}
|
|
23583
23819
|
return new ZodObject2({
|
|
23584
|
-
...
|
|
23820
|
+
...schema13._def,
|
|
23585
23821
|
shape: () => newShape
|
|
23586
23822
|
});
|
|
23587
|
-
} else if (
|
|
23823
|
+
} else if (schema13 instanceof ZodArray2) {
|
|
23588
23824
|
return new ZodArray2({
|
|
23589
|
-
...
|
|
23590
|
-
type: deepPartialify2(
|
|
23825
|
+
...schema13._def,
|
|
23826
|
+
type: deepPartialify2(schema13.element)
|
|
23591
23827
|
});
|
|
23592
|
-
} else if (
|
|
23593
|
-
return ZodOptional2.create(deepPartialify2(
|
|
23594
|
-
} else if (
|
|
23595
|
-
return ZodNullable2.create(deepPartialify2(
|
|
23596
|
-
} else if (
|
|
23597
|
-
return ZodTuple2.create(
|
|
23828
|
+
} else if (schema13 instanceof ZodOptional2) {
|
|
23829
|
+
return ZodOptional2.create(deepPartialify2(schema13.unwrap()));
|
|
23830
|
+
} else if (schema13 instanceof ZodNullable2) {
|
|
23831
|
+
return ZodNullable2.create(deepPartialify2(schema13.unwrap()));
|
|
23832
|
+
} else if (schema13 instanceof ZodTuple2) {
|
|
23833
|
+
return ZodTuple2.create(schema13.items.map((item) => deepPartialify2(item)));
|
|
23598
23834
|
} else {
|
|
23599
|
-
return
|
|
23835
|
+
return schema13;
|
|
23600
23836
|
}
|
|
23601
23837
|
}
|
|
23602
23838
|
var ZodObject2 = class _ZodObject extends ZodType2 {
|
|
@@ -23812,8 +24048,8 @@ var ZodObject2 = class _ZodObject extends ZodType2 {
|
|
|
23812
24048
|
// }) as any;
|
|
23813
24049
|
// return merged;
|
|
23814
24050
|
// }
|
|
23815
|
-
setKey(key,
|
|
23816
|
-
return this.augment({ [key]:
|
|
24051
|
+
setKey(key, schema13) {
|
|
24052
|
+
return this.augment({ [key]: schema13 });
|
|
23817
24053
|
}
|
|
23818
24054
|
// merge<Incoming extends AnyZodObject>(
|
|
23819
24055
|
// merging: Incoming
|
|
@@ -24028,33 +24264,33 @@ ZodUnion2.create = (types2, params) => {
|
|
|
24028
24264
|
...processCreateParams2(params)
|
|
24029
24265
|
});
|
|
24030
24266
|
};
|
|
24031
|
-
var getDiscriminator2 = (
|
|
24032
|
-
if (
|
|
24033
|
-
return getDiscriminator2(
|
|
24034
|
-
} else if (
|
|
24035
|
-
return getDiscriminator2(
|
|
24036
|
-
} else if (
|
|
24037
|
-
return [
|
|
24038
|
-
} else if (
|
|
24039
|
-
return
|
|
24040
|
-
} else if (
|
|
24041
|
-
return util2.objectValues(
|
|
24042
|
-
} else if (
|
|
24043
|
-
return getDiscriminator2(
|
|
24044
|
-
} else if (
|
|
24267
|
+
var getDiscriminator2 = (type13) => {
|
|
24268
|
+
if (type13 instanceof ZodLazy2) {
|
|
24269
|
+
return getDiscriminator2(type13.schema);
|
|
24270
|
+
} else if (type13 instanceof ZodEffects2) {
|
|
24271
|
+
return getDiscriminator2(type13.innerType());
|
|
24272
|
+
} else if (type13 instanceof ZodLiteral2) {
|
|
24273
|
+
return [type13.value];
|
|
24274
|
+
} else if (type13 instanceof ZodEnum2) {
|
|
24275
|
+
return type13.options;
|
|
24276
|
+
} else if (type13 instanceof ZodNativeEnum2) {
|
|
24277
|
+
return util2.objectValues(type13.enum);
|
|
24278
|
+
} else if (type13 instanceof ZodDefault2) {
|
|
24279
|
+
return getDiscriminator2(type13._def.innerType);
|
|
24280
|
+
} else if (type13 instanceof ZodUndefined2) {
|
|
24045
24281
|
return [void 0];
|
|
24046
|
-
} else if (
|
|
24282
|
+
} else if (type13 instanceof ZodNull2) {
|
|
24047
24283
|
return [null];
|
|
24048
|
-
} else if (
|
|
24049
|
-
return [void 0, ...getDiscriminator2(
|
|
24050
|
-
} else if (
|
|
24051
|
-
return [null, ...getDiscriminator2(
|
|
24052
|
-
} else if (
|
|
24053
|
-
return getDiscriminator2(
|
|
24054
|
-
} else if (
|
|
24055
|
-
return getDiscriminator2(
|
|
24056
|
-
} else if (
|
|
24057
|
-
return getDiscriminator2(
|
|
24284
|
+
} else if (type13 instanceof ZodOptional2) {
|
|
24285
|
+
return [void 0, ...getDiscriminator2(type13.unwrap())];
|
|
24286
|
+
} else if (type13 instanceof ZodNullable2) {
|
|
24287
|
+
return [null, ...getDiscriminator2(type13.unwrap())];
|
|
24288
|
+
} else if (type13 instanceof ZodBranded2) {
|
|
24289
|
+
return getDiscriminator2(type13.unwrap());
|
|
24290
|
+
} else if (type13 instanceof ZodReadonly2) {
|
|
24291
|
+
return getDiscriminator2(type13.unwrap());
|
|
24292
|
+
} else if (type13 instanceof ZodCatch2) {
|
|
24293
|
+
return getDiscriminator2(type13._def.innerType);
|
|
24058
24294
|
} else {
|
|
24059
24295
|
return [];
|
|
24060
24296
|
}
|
|
@@ -24114,8 +24350,8 @@ var ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 {
|
|
|
24114
24350
|
*/
|
|
24115
24351
|
static create(discriminator, options, params) {
|
|
24116
24352
|
const optionsMap = /* @__PURE__ */ new Map();
|
|
24117
|
-
for (const
|
|
24118
|
-
const discriminatorValues = getDiscriminator2(
|
|
24353
|
+
for (const type13 of options) {
|
|
24354
|
+
const discriminatorValues = getDiscriminator2(type13.shape[discriminator]);
|
|
24119
24355
|
if (!discriminatorValues.length) {
|
|
24120
24356
|
throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
|
|
24121
24357
|
}
|
|
@@ -24123,7 +24359,7 @@ var ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 {
|
|
|
24123
24359
|
if (optionsMap.has(value)) {
|
|
24124
24360
|
throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
|
|
24125
24361
|
}
|
|
24126
|
-
optionsMap.set(value,
|
|
24362
|
+
optionsMap.set(value, type13);
|
|
24127
24363
|
}
|
|
24128
24364
|
}
|
|
24129
24365
|
return new _ZodDiscriminatedUnion({
|
|
@@ -24259,10 +24495,10 @@ var ZodTuple2 = class _ZodTuple extends ZodType2 {
|
|
|
24259
24495
|
status.dirty();
|
|
24260
24496
|
}
|
|
24261
24497
|
const items = [...ctx.data].map((item, itemIndex) => {
|
|
24262
|
-
const
|
|
24263
|
-
if (!
|
|
24498
|
+
const schema13 = this._def.items[itemIndex] || this._def.rest;
|
|
24499
|
+
if (!schema13)
|
|
24264
24500
|
return null;
|
|
24265
|
-
return
|
|
24501
|
+
return schema13._parse(new ParseInputLazyPath2(ctx, item, ctx.path, itemIndex));
|
|
24266
24502
|
}).filter((x) => !!x);
|
|
24267
24503
|
if (ctx.common.async) {
|
|
24268
24504
|
return Promise.all(items).then((results) => {
|
|
@@ -24796,9 +25032,9 @@ var ZodPromise2 = class extends ZodType2 {
|
|
|
24796
25032
|
}));
|
|
24797
25033
|
}
|
|
24798
25034
|
};
|
|
24799
|
-
ZodPromise2.create = (
|
|
25035
|
+
ZodPromise2.create = (schema13, params) => {
|
|
24800
25036
|
return new ZodPromise2({
|
|
24801
|
-
type:
|
|
25037
|
+
type: schema13,
|
|
24802
25038
|
typeName: ZodFirstPartyTypeKind2.ZodPromise,
|
|
24803
25039
|
...processCreateParams2(params)
|
|
24804
25040
|
});
|
|
@@ -24923,17 +25159,17 @@ var ZodEffects2 = class extends ZodType2 {
|
|
|
24923
25159
|
util2.assertNever(effect);
|
|
24924
25160
|
}
|
|
24925
25161
|
};
|
|
24926
|
-
ZodEffects2.create = (
|
|
25162
|
+
ZodEffects2.create = (schema13, effect, params) => {
|
|
24927
25163
|
return new ZodEffects2({
|
|
24928
|
-
schema:
|
|
25164
|
+
schema: schema13,
|
|
24929
25165
|
typeName: ZodFirstPartyTypeKind2.ZodEffects,
|
|
24930
25166
|
effect,
|
|
24931
25167
|
...processCreateParams2(params)
|
|
24932
25168
|
});
|
|
24933
25169
|
};
|
|
24934
|
-
ZodEffects2.createWithPreprocess = (preprocess,
|
|
25170
|
+
ZodEffects2.createWithPreprocess = (preprocess, schema13, params) => {
|
|
24935
25171
|
return new ZodEffects2({
|
|
24936
|
-
schema:
|
|
25172
|
+
schema: schema13,
|
|
24937
25173
|
effect: { type: "preprocess", transform: preprocess },
|
|
24938
25174
|
typeName: ZodFirstPartyTypeKind2.ZodEffects,
|
|
24939
25175
|
...processCreateParams2(params)
|
|
@@ -24951,9 +25187,9 @@ var ZodOptional2 = class extends ZodType2 {
|
|
|
24951
25187
|
return this._def.innerType;
|
|
24952
25188
|
}
|
|
24953
25189
|
};
|
|
24954
|
-
ZodOptional2.create = (
|
|
25190
|
+
ZodOptional2.create = (type13, params) => {
|
|
24955
25191
|
return new ZodOptional2({
|
|
24956
|
-
innerType:
|
|
25192
|
+
innerType: type13,
|
|
24957
25193
|
typeName: ZodFirstPartyTypeKind2.ZodOptional,
|
|
24958
25194
|
...processCreateParams2(params)
|
|
24959
25195
|
});
|
|
@@ -24970,9 +25206,9 @@ var ZodNullable2 = class extends ZodType2 {
|
|
|
24970
25206
|
return this._def.innerType;
|
|
24971
25207
|
}
|
|
24972
25208
|
};
|
|
24973
|
-
ZodNullable2.create = (
|
|
25209
|
+
ZodNullable2.create = (type13, params) => {
|
|
24974
25210
|
return new ZodNullable2({
|
|
24975
|
-
innerType:
|
|
25211
|
+
innerType: type13,
|
|
24976
25212
|
typeName: ZodFirstPartyTypeKind2.ZodNullable,
|
|
24977
25213
|
...processCreateParams2(params)
|
|
24978
25214
|
});
|
|
@@ -24994,9 +25230,9 @@ var ZodDefault2 = class extends ZodType2 {
|
|
|
24994
25230
|
return this._def.innerType;
|
|
24995
25231
|
}
|
|
24996
25232
|
};
|
|
24997
|
-
ZodDefault2.create = (
|
|
25233
|
+
ZodDefault2.create = (type13, params) => {
|
|
24998
25234
|
return new ZodDefault2({
|
|
24999
|
-
innerType:
|
|
25235
|
+
innerType: type13,
|
|
25000
25236
|
typeName: ZodFirstPartyTypeKind2.ZodDefault,
|
|
25001
25237
|
defaultValue: typeof params.default === "function" ? params.default : () => params.default,
|
|
25002
25238
|
...processCreateParams2(params)
|
|
@@ -25047,9 +25283,9 @@ var ZodCatch2 = class extends ZodType2 {
|
|
|
25047
25283
|
return this._def.innerType;
|
|
25048
25284
|
}
|
|
25049
25285
|
};
|
|
25050
|
-
ZodCatch2.create = (
|
|
25286
|
+
ZodCatch2.create = (type13, params) => {
|
|
25051
25287
|
return new ZodCatch2({
|
|
25052
|
-
innerType:
|
|
25288
|
+
innerType: type13,
|
|
25053
25289
|
typeName: ZodFirstPartyTypeKind2.ZodCatch,
|
|
25054
25290
|
catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
|
|
25055
25291
|
...processCreateParams2(params)
|
|
@@ -25161,9 +25397,9 @@ var ZodReadonly2 = class extends ZodType2 {
|
|
|
25161
25397
|
return this._def.innerType;
|
|
25162
25398
|
}
|
|
25163
25399
|
};
|
|
25164
|
-
ZodReadonly2.create = (
|
|
25400
|
+
ZodReadonly2.create = (type13, params) => {
|
|
25165
25401
|
return new ZodReadonly2({
|
|
25166
|
-
innerType:
|
|
25402
|
+
innerType: type13,
|
|
25167
25403
|
typeName: ZodFirstPartyTypeKind2.ZodReadonly,
|
|
25168
25404
|
...processCreateParams2(params)
|
|
25169
25405
|
});
|
|
@@ -25486,8 +25722,8 @@ function get(target, key) {
|
|
|
25486
25722
|
return getType(target) === 2 ? target.get(key) : target[key];
|
|
25487
25723
|
}
|
|
25488
25724
|
function set(target, key, value) {
|
|
25489
|
-
const
|
|
25490
|
-
if (
|
|
25725
|
+
const type13 = getType(target);
|
|
25726
|
+
if (type13 === 2) {
|
|
25491
25727
|
target.set(key, value);
|
|
25492
25728
|
} else {
|
|
25493
25729
|
target[key] = value;
|
|
@@ -25680,8 +25916,8 @@ function deepFreeze(target, subKey, updatedValues, stack, keys) {
|
|
|
25680
25916
|
}
|
|
25681
25917
|
return;
|
|
25682
25918
|
}
|
|
25683
|
-
const
|
|
25684
|
-
switch (
|
|
25919
|
+
const type13 = getType(target);
|
|
25920
|
+
switch (type13) {
|
|
25685
25921
|
case 2:
|
|
25686
25922
|
for (const [key, value] of target) {
|
|
25687
25923
|
deepFreeze(key, key, updatedValues, stack, keys);
|
|
@@ -25716,12 +25952,12 @@ function deepFreeze(target, subKey, updatedValues, stack, keys) {
|
|
|
25716
25952
|
}
|
|
25717
25953
|
}
|
|
25718
25954
|
function forEach(target, iter) {
|
|
25719
|
-
const
|
|
25720
|
-
if (
|
|
25955
|
+
const type13 = getType(target);
|
|
25956
|
+
if (type13 === 0) {
|
|
25721
25957
|
Reflect.ownKeys(target).forEach((key) => {
|
|
25722
25958
|
iter(key, target[key], target);
|
|
25723
25959
|
});
|
|
25724
|
-
} else if (
|
|
25960
|
+
} else if (type13 === 1) {
|
|
25725
25961
|
let index2 = 0;
|
|
25726
25962
|
for (const entry of target) {
|
|
25727
25963
|
iter(index2, entry, target);
|
|
@@ -26380,9 +26616,9 @@ var proxyHandler = {
|
|
|
26380
26616
|
};
|
|
26381
26617
|
function createDraft(createDraftOptions) {
|
|
26382
26618
|
const { original, parentDraft, key, finalities, options } = createDraftOptions;
|
|
26383
|
-
const
|
|
26619
|
+
const type13 = getType(original);
|
|
26384
26620
|
const proxyDraft = {
|
|
26385
|
-
type:
|
|
26621
|
+
type: type13,
|
|
26386
26622
|
finalized: false,
|
|
26387
26623
|
parent: parentDraft,
|
|
26388
26624
|
original,
|
|
@@ -26391,12 +26627,12 @@ function createDraft(createDraftOptions) {
|
|
|
26391
26627
|
finalities,
|
|
26392
26628
|
options,
|
|
26393
26629
|
// Mapping of draft Set items to their corresponding draft values.
|
|
26394
|
-
setMap:
|
|
26630
|
+
setMap: type13 === 3 ? new Map(original.entries()) : void 0
|
|
26395
26631
|
};
|
|
26396
26632
|
if (key || "key" in createDraftOptions) {
|
|
26397
26633
|
proxyDraft.key = key;
|
|
26398
26634
|
}
|
|
26399
|
-
const { proxy, revoke } = Proxy.revocable(
|
|
26635
|
+
const { proxy, revoke } = Proxy.revocable(type13 === 1 ? Object.assign([], proxyDraft) : proxyDraft, proxyHandler);
|
|
26400
26636
|
finalities.revoke.push(revoke);
|
|
26401
26637
|
draftsCache.add(proxy);
|
|
26402
26638
|
proxyDraft.proxy = proxy;
|
|
@@ -26519,12 +26755,12 @@ function getCurrent(target) {
|
|
|
26519
26755
|
const proxyDraft = getProxyDraft(target);
|
|
26520
26756
|
if (!isDraftable(target, proxyDraft === null || proxyDraft === void 0 ? void 0 : proxyDraft.options))
|
|
26521
26757
|
return target;
|
|
26522
|
-
const
|
|
26758
|
+
const type13 = getType(target);
|
|
26523
26759
|
if (proxyDraft && !proxyDraft.operated)
|
|
26524
26760
|
return proxyDraft.original;
|
|
26525
26761
|
let currentValue;
|
|
26526
26762
|
function ensureShallowCopy2() {
|
|
26527
|
-
currentValue =
|
|
26763
|
+
currentValue = type13 === 2 ? !isBaseMapInstance(target) ? new (Object.getPrototypeOf(target)).constructor(target) : new Map(target) : type13 === 3 ? Array.from(proxyDraft.setMap.values()) : shallowCopy(target, proxyDraft === null || proxyDraft === void 0 ? void 0 : proxyDraft.options);
|
|
26528
26764
|
}
|
|
26529
26765
|
if (proxyDraft) {
|
|
26530
26766
|
proxyDraft.finalized = true;
|
|
@@ -26546,7 +26782,7 @@ function getCurrent(target) {
|
|
|
26546
26782
|
set(currentValue, key, newValue);
|
|
26547
26783
|
}
|
|
26548
26784
|
});
|
|
26549
|
-
if (
|
|
26785
|
+
if (type13 === 3) {
|
|
26550
26786
|
const value = (_a = proxyDraft === null || proxyDraft === void 0 ? void 0 : proxyDraft.original) !== null && _a !== void 0 ? _a : currentValue;
|
|
26551
26787
|
return !isBaseSetInstance(value) ? new (Object.getPrototypeOf(value)).constructor(currentValue) : new Set(currentValue);
|
|
26552
26788
|
}
|
|
@@ -27410,7 +27646,7 @@ function buildOperationSignatureParams({
|
|
|
27410
27646
|
operation,
|
|
27411
27647
|
previousStateHash
|
|
27412
27648
|
}) {
|
|
27413
|
-
const { timestamp, scope, id, type:
|
|
27649
|
+
const { timestamp, scope, id, type: type13 } = operation;
|
|
27414
27650
|
return [
|
|
27415
27651
|
getUnixTimestamp(timestamp),
|
|
27416
27652
|
// timestamp,
|
|
@@ -27418,7 +27654,7 @@ function buildOperationSignatureParams({
|
|
|
27418
27654
|
// signer public key
|
|
27419
27655
|
hash(
|
|
27420
27656
|
// hash (docID, scope, operationID, operationName, operationInput)
|
|
27421
|
-
[documentId, scope, id,
|
|
27657
|
+
[documentId, scope, id, type13, cjsModule(operation.input)].join("")
|
|
27422
27658
|
),
|
|
27423
27659
|
previousStateHash
|
|
27424
27660
|
// state hash that the operation was applied to
|
|
@@ -27523,29 +27759,29 @@ var Mime = class {
|
|
|
27523
27759
|
}
|
|
27524
27760
|
}
|
|
27525
27761
|
define(typeMap, force = false) {
|
|
27526
|
-
for (let [
|
|
27527
|
-
|
|
27762
|
+
for (let [type13, extensions] of Object.entries(typeMap)) {
|
|
27763
|
+
type13 = type13.toLowerCase();
|
|
27528
27764
|
extensions = extensions.map((ext) => ext.toLowerCase());
|
|
27529
|
-
if (!__classPrivateFieldGet3(this, _Mime_typeToExtensions, "f").has(
|
|
27530
|
-
__classPrivateFieldGet3(this, _Mime_typeToExtensions, "f").set(
|
|
27765
|
+
if (!__classPrivateFieldGet3(this, _Mime_typeToExtensions, "f").has(type13)) {
|
|
27766
|
+
__classPrivateFieldGet3(this, _Mime_typeToExtensions, "f").set(type13, /* @__PURE__ */ new Set());
|
|
27531
27767
|
}
|
|
27532
|
-
const allExtensions = __classPrivateFieldGet3(this, _Mime_typeToExtensions, "f").get(
|
|
27768
|
+
const allExtensions = __classPrivateFieldGet3(this, _Mime_typeToExtensions, "f").get(type13);
|
|
27533
27769
|
let first = true;
|
|
27534
27770
|
for (let extension of extensions) {
|
|
27535
27771
|
const starred = extension.startsWith("*");
|
|
27536
27772
|
extension = starred ? extension.slice(1) : extension;
|
|
27537
27773
|
allExtensions == null ? void 0 : allExtensions.add(extension);
|
|
27538
27774
|
if (first) {
|
|
27539
|
-
__classPrivateFieldGet3(this, _Mime_typeToExtension, "f").set(
|
|
27775
|
+
__classPrivateFieldGet3(this, _Mime_typeToExtension, "f").set(type13, extension);
|
|
27540
27776
|
}
|
|
27541
27777
|
first = false;
|
|
27542
27778
|
if (starred)
|
|
27543
27779
|
continue;
|
|
27544
27780
|
const currentType = __classPrivateFieldGet3(this, _Mime_extensionToType, "f").get(extension);
|
|
27545
|
-
if (currentType && currentType !=
|
|
27546
|
-
throw new Error(`"${
|
|
27781
|
+
if (currentType && currentType != type13 && !force) {
|
|
27782
|
+
throw new Error(`"${type13} -> ${extension}" conflicts with "${currentType} -> ${extension}". Pass \`force=true\` to override this definition.`);
|
|
27547
27783
|
}
|
|
27548
|
-
__classPrivateFieldGet3(this, _Mime_extensionToType, "f").set(extension,
|
|
27784
|
+
__classPrivateFieldGet3(this, _Mime_extensionToType, "f").set(extension, type13);
|
|
27549
27785
|
}
|
|
27550
27786
|
}
|
|
27551
27787
|
return this;
|
|
@@ -27561,17 +27797,17 @@ var Mime = class {
|
|
|
27561
27797
|
return null;
|
|
27562
27798
|
return __classPrivateFieldGet3(this, _Mime_extensionToType, "f").get(ext) ?? null;
|
|
27563
27799
|
}
|
|
27564
|
-
getExtension(
|
|
27800
|
+
getExtension(type13) {
|
|
27565
27801
|
var _a;
|
|
27566
|
-
if (typeof
|
|
27802
|
+
if (typeof type13 !== "string")
|
|
27567
27803
|
return null;
|
|
27568
|
-
|
|
27569
|
-
return (
|
|
27804
|
+
type13 = (_a = type13 == null ? void 0 : type13.split) == null ? void 0 : _a.call(type13, ";")[0];
|
|
27805
|
+
return (type13 && __classPrivateFieldGet3(this, _Mime_typeToExtension, "f").get(type13.trim().toLowerCase())) ?? null;
|
|
27570
27806
|
}
|
|
27571
|
-
getAllExtensions(
|
|
27572
|
-
if (typeof
|
|
27807
|
+
getAllExtensions(type13) {
|
|
27808
|
+
if (typeof type13 !== "string")
|
|
27573
27809
|
return null;
|
|
27574
|
-
return __classPrivateFieldGet3(this, _Mime_typeToExtensions, "f").get(
|
|
27810
|
+
return __classPrivateFieldGet3(this, _Mime_typeToExtensions, "f").get(type13.toLowerCase()) ?? null;
|
|
27575
27811
|
}
|
|
27576
27812
|
_freeze() {
|
|
27577
27813
|
this.define = () => {
|
|
@@ -28589,14 +28825,14 @@ function isUndo(action) {
|
|
|
28589
28825
|
function isBaseAction(action) {
|
|
28590
28826
|
return [SET_NAME, UNDO, REDO, PRUNE, LOAD_STATE].includes(action.type);
|
|
28591
28827
|
}
|
|
28592
|
-
function createAction(
|
|
28593
|
-
if (!
|
|
28828
|
+
function createAction(type13, input, attachments, validator, scope = "global") {
|
|
28829
|
+
if (!type13) {
|
|
28594
28830
|
throw new Error("Empty action type");
|
|
28595
28831
|
}
|
|
28596
|
-
if (typeof
|
|
28597
|
-
throw new Error(`Invalid action type: ${JSON.stringify(
|
|
28832
|
+
if (typeof type13 !== "string") {
|
|
28833
|
+
throw new Error(`Invalid action type: ${JSON.stringify(type13)}`);
|
|
28598
28834
|
}
|
|
28599
|
-
const action = { type:
|
|
28835
|
+
const action = { type: type13, input, scope };
|
|
28600
28836
|
if (attachments) {
|
|
28601
28837
|
action.attachments = attachments;
|
|
28602
28838
|
}
|
|
@@ -29408,12 +29644,6 @@ var SubgraphManager = class {
|
|
|
29408
29644
|
this.reactor = reactor;
|
|
29409
29645
|
this.operationalStore = operationalStore;
|
|
29410
29646
|
this.analyticsStore = analyticsStore;
|
|
29411
|
-
({
|
|
29412
|
-
reactor: this.reactor,
|
|
29413
|
-
operationalStore: this.operationalStore,
|
|
29414
|
-
analyticsStore: this.analyticsStore,
|
|
29415
|
-
subgraphManager: this
|
|
29416
|
-
});
|
|
29417
29647
|
this.registerSubgraph(SystemSubgraph);
|
|
29418
29648
|
this.registerSubgraph(DriveSubgraph);
|
|
29419
29649
|
this.registerSubgraph(AnalyticsSubgraph);
|
|
@@ -29422,9 +29652,7 @@ var SubgraphManager = class {
|
|
|
29422
29652
|
contextFields = {};
|
|
29423
29653
|
subgraphs = [];
|
|
29424
29654
|
async init() {
|
|
29425
|
-
console.log(
|
|
29426
|
-
`Initializing ReactorRouterManager with subgraphs: [${this.subgraphs.map((e) => e.name).join(", ")}]`
|
|
29427
|
-
);
|
|
29655
|
+
console.log(`Initializing ReactorRouterManager...`);
|
|
29428
29656
|
const models = this.reactor.getDocumentModels();
|
|
29429
29657
|
const driveModel = models.find(
|
|
29430
29658
|
(it) => it.documentModel.name === "DocumentDrive"
|
|
@@ -29448,13 +29676,13 @@ var SubgraphManager = class {
|
|
|
29448
29676
|
for (const subgraph of this.subgraphs) {
|
|
29449
29677
|
const subgraphConfig = this.#getLocalSubgraphConfig(subgraph.name);
|
|
29450
29678
|
if (!subgraphConfig) continue;
|
|
29451
|
-
const
|
|
29679
|
+
const schema13 = createSchema(
|
|
29452
29680
|
this.reactor,
|
|
29453
29681
|
subgraphConfig.resolvers,
|
|
29454
29682
|
subgraphConfig.typeDefs
|
|
29455
29683
|
);
|
|
29456
29684
|
const server = new ApolloServer({
|
|
29457
|
-
schema:
|
|
29685
|
+
schema: schema13,
|
|
29458
29686
|
introspection: true,
|
|
29459
29687
|
plugins: [ApolloServerPluginInlineTraceDisabled()]
|
|
29460
29688
|
});
|
|
@@ -29549,6 +29777,6 @@ function isSubgraphClass(candidate) {
|
|
|
29549
29777
|
return false;
|
|
29550
29778
|
}
|
|
29551
29779
|
|
|
29552
|
-
export { AnalyticsProcessor, BaseProcessor, Processor, ProcessorManager, Subgraph, SubgraphManager, analytics_exports as analyticsSubgraph, createSchema, drive_exports as driveSubgraph, getDbClient, getDocumentModelTypeDefs, isProcessorClass, isSubgraphClass, startAPI, system_exports as systemSubgraph };
|
|
29780
|
+
export { AnalyticsProcessor, BaseProcessor, OperationalProcessor, Processor, ProcessorManager, Subgraph, SubgraphManager, analytics_exports as analyticsSubgraph, createSchema, drive_exports as driveSubgraph, getDbClient, getDocumentModelTypeDefs, isProcessorClass, isSubgraphClass, startAPI, system_exports as systemSubgraph };
|
|
29553
29781
|
//# sourceMappingURL=index.js.map
|
|
29554
29782
|
//# sourceMappingURL=index.js.map
|