@cedarjs/web 8.0.0-canary.3637 → 8.0.0-canary.3641

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.
@@ -1059,6 +1059,435 @@ var escapeSequences = [
1059
1059
  "\\u009F"
1060
1060
  ];
1061
1061
 
1062
+ // ../../node_modules/graphql/language/reducer.mjs
1063
+ function reduce(root, reducer) {
1064
+ const stack = [];
1065
+ let frame = {
1066
+ parent: [root],
1067
+ keys: void 0,
1068
+ results: [],
1069
+ index: -1
1070
+ };
1071
+ let node;
1072
+ do {
1073
+ let kind;
1074
+ frame.index++;
1075
+ const length = frame.keys === void 0 ? frame.parent.length : frame.keys.length;
1076
+ if (frame.index === length) {
1077
+ node = frame.results;
1078
+ kind = frame.keys === void 0 ? void 0 : frame.results.kind;
1079
+ frame = stack.pop();
1080
+ } else {
1081
+ node = frame.keys === void 0 ? frame.parent[frame.index] : frame.parent[frame.keys[frame.index]];
1082
+ if (node == null && stack.length !== 0) {
1083
+ continue;
1084
+ }
1085
+ if (Array.isArray(node)) {
1086
+ if (node.length !== 0) {
1087
+ stack.push(frame);
1088
+ frame = {
1089
+ parent: node,
1090
+ keys: void 0,
1091
+ results: [],
1092
+ index: -1
1093
+ };
1094
+ continue;
1095
+ }
1096
+ } else {
1097
+ const parent = node;
1098
+ kind = parent === null || parent === void 0 ? void 0 : parent.kind;
1099
+ const keys = typeof kind === "string" ? QueryDocumentKeys[kind] : void 0;
1100
+ if (!Array.isArray(keys)) {
1101
+ throw new Error(`Invalid AST Node: ${inspect(node)}.`);
1102
+ }
1103
+ if (keys.length !== 0) {
1104
+ stack.push(frame);
1105
+ frame = {
1106
+ parent,
1107
+ keys,
1108
+ results: { ...parent },
1109
+ index: -1
1110
+ };
1111
+ continue;
1112
+ }
1113
+ }
1114
+ }
1115
+ if (kind !== void 0) {
1116
+ const reduceNode = reducer[kind];
1117
+ node = reduceNode === null || reduceNode === void 0 ? void 0 : reduceNode(node);
1118
+ }
1119
+ if (frame.keys === void 0) {
1120
+ frame.results.push(node);
1121
+ } else {
1122
+ frame.results[frame.keys[frame.index]] = node;
1123
+ }
1124
+ } while (stack.length !== 0);
1125
+ return node;
1126
+ }
1127
+
1128
+ // ../../node_modules/graphql/language/printer.mjs
1129
+ function print(ast, options) {
1130
+ var _options$maxIndentDep;
1131
+ return render(
1132
+ reduce(ast, printDocASTReducer),
1133
+ (_options$maxIndentDep = options === null || options === void 0 ? void 0 : options.maxIndentDepth) !== null && _options$maxIndentDep !== void 0 ? _options$maxIndentDep : Infinity
1134
+ );
1135
+ }
1136
+ var MAX_LINE_LENGTH = 80;
1137
+ var PrintBuffer = class _PrintBuffer {
1138
+ next = void 0;
1139
+ tail = this;
1140
+ indentBefore = false;
1141
+ dedentAfter = false;
1142
+ constructor(value = "", isBlockString = false) {
1143
+ this.length = value.length;
1144
+ this.lines = value.includes("\n") ? value.split("\n") : value;
1145
+ this.newlines = typeof this.lines === "string" ? 0 : this.lines.length - 1;
1146
+ this.isBlockString = isBlockString;
1147
+ }
1148
+ append(result) {
1149
+ if (result.length === 0) {
1150
+ return this;
1151
+ }
1152
+ const next = typeof result === "string" ? new _PrintBuffer(result) : result;
1153
+ this.tail.next = next;
1154
+ this.tail = next.tail;
1155
+ this.length += next.length;
1156
+ this.newlines += next.newlines;
1157
+ return this;
1158
+ }
1159
+ indent() {
1160
+ if (this.length === 0) {
1161
+ return this;
1162
+ }
1163
+ this.indentBefore = true;
1164
+ this.tail.dedentAfter = true;
1165
+ this.length += 2 * (this.newlines + 1);
1166
+ return this;
1167
+ }
1168
+ };
1169
+ var EMPTY2 = new PrintBuffer();
1170
+ function render(buffer, maxDepth) {
1171
+ let output = "";
1172
+ let text = "";
1173
+ let depth = 0;
1174
+ let indentation = "";
1175
+ let part = buffer;
1176
+ while (part !== void 0) {
1177
+ const lines = part.lines;
1178
+ if (part.indentBefore) {
1179
+ if (depth < maxDepth) {
1180
+ indentation += " ";
1181
+ text += " ";
1182
+ }
1183
+ depth++;
1184
+ }
1185
+ if (typeof lines === "string") {
1186
+ text += lines;
1187
+ } else {
1188
+ text += lines[0];
1189
+ const newline = !part.isBlockString && depth >= maxDepth ? " " : "\n" + indentation;
1190
+ for (let i = 1; i < lines.length; i++) {
1191
+ output += text;
1192
+ text = newline + lines[i];
1193
+ }
1194
+ }
1195
+ if (part.dedentAfter) {
1196
+ depth--;
1197
+ indentation = indentation.slice(0, depth * 2);
1198
+ }
1199
+ part = part.next;
1200
+ }
1201
+ return output + text;
1202
+ }
1203
+ var printDocASTReducer = {
1204
+ Name: (node) => new PrintBuffer(node.value),
1205
+ Variable: (node) => join(["$", node.name]),
1206
+ // Document
1207
+ Document: (node) => join(node.definitions, "\n\n"),
1208
+ OperationDefinition(node) {
1209
+ const varDefs = hasMultilineItems(node.variableDefinitions) ? wrap("(\n", join(node.variableDefinitions, "\n"), "\n)") : wrap("(", join(node.variableDefinitions, ", "), ")");
1210
+ const prefix = join([
1211
+ wrap("", node.description, "\n"),
1212
+ join(
1213
+ [
1214
+ node.operation,
1215
+ join([node.name, varDefs]),
1216
+ join(node.directives, " ")
1217
+ ],
1218
+ " "
1219
+ )
1220
+ ]);
1221
+ return join([
1222
+ node.operation === "query" && prefix.length === node.operation.length ? "" : join([prefix, " "]),
1223
+ node.selectionSet
1224
+ ]);
1225
+ },
1226
+ VariableDefinition: ({
1227
+ variable,
1228
+ type,
1229
+ defaultValue,
1230
+ directives,
1231
+ description
1232
+ }) => join([
1233
+ wrap("", description, "\n"),
1234
+ variable,
1235
+ ": ",
1236
+ type,
1237
+ wrap(" = ", defaultValue),
1238
+ wrap(" ", join(directives, " "))
1239
+ ]),
1240
+ SelectionSet: ({ selections }) => block(selections),
1241
+ Field({ alias, name, arguments: args, directives, selectionSet }) {
1242
+ const prefix = join([wrap("", alias, ": "), name], "");
1243
+ return join([
1244
+ wrappedLineAndArgs(prefix, args),
1245
+ wrap(" ", join(directives, " ")),
1246
+ wrap(" ", selectionSet)
1247
+ ]);
1248
+ },
1249
+ Argument: ({ name, value }) => join([name, ": ", value]),
1250
+ // Fragments
1251
+ FragmentSpread: ({ name, directives }) => join(["...", name, wrap(" ", join(directives, " "))]),
1252
+ InlineFragment: ({ typeCondition, directives, selectionSet }) => join(
1253
+ ["...", wrap("on ", typeCondition), join(directives, " "), selectionSet],
1254
+ " "
1255
+ ),
1256
+ FragmentDefinition: ({
1257
+ name,
1258
+ typeCondition,
1259
+ variableDefinitions,
1260
+ directives,
1261
+ selectionSet,
1262
+ description
1263
+ }) => join([
1264
+ wrap("", description, "\n"),
1265
+ // Note: fragment variable definitions are experimental and may be changed
1266
+ // or removed in the future.
1267
+ "fragment ",
1268
+ name,
1269
+ wrap("(", join(variableDefinitions, ", "), ")"),
1270
+ " on ",
1271
+ typeCondition,
1272
+ " ",
1273
+ wrap("", join(directives, " "), " "),
1274
+ selectionSet
1275
+ ]),
1276
+ // Value
1277
+ IntValue: ({ value }) => new PrintBuffer(value),
1278
+ FloatValue: ({ value }) => new PrintBuffer(value),
1279
+ StringValue: ({ value, block: isBlockString }) => new PrintBuffer(
1280
+ isBlockString === true ? printBlockString(value) : printString(value),
1281
+ isBlockString === true
1282
+ ),
1283
+ BooleanValue: ({ value }) => new PrintBuffer(value ? "true" : "false"),
1284
+ NullValue: () => new PrintBuffer("null"),
1285
+ EnumValue: ({ value }) => new PrintBuffer(value),
1286
+ ListValue: ({ values }) => join(["[", join(values, ", "), "]"]),
1287
+ ObjectValue: ({ fields }) => join(["{", join(fields, ", "), "}"]),
1288
+ ObjectField: ({ name, value }) => join([name, ": ", value]),
1289
+ // Directive
1290
+ Directive: ({ name, arguments: args }) => join(["@", name, wrap("(", join(args, ", "), ")")]),
1291
+ // Type
1292
+ NamedType: ({ name }) => name,
1293
+ ListType: ({ type }) => join(["[", type, "]"]),
1294
+ NonNullType: ({ type }) => join([type, "!"]),
1295
+ // Type System Definitions
1296
+ SchemaDefinition: ({ description, directives, operationTypes }) => join([
1297
+ wrap("", description, "\n"),
1298
+ join(["schema", join(directives, " "), block(operationTypes)], " ")
1299
+ ]),
1300
+ OperationTypeDefinition: ({ operation, type }) => join([operation, ": ", type]),
1301
+ ScalarTypeDefinition: ({ description, name, directives }) => join([
1302
+ wrap("", description, "\n"),
1303
+ join(["scalar", name, join(directives, " ")], " ")
1304
+ ]),
1305
+ ObjectTypeDefinition: ({
1306
+ description,
1307
+ name,
1308
+ interfaces,
1309
+ directives,
1310
+ fields
1311
+ }) => join([
1312
+ wrap("", description, "\n"),
1313
+ join(
1314
+ [
1315
+ "type",
1316
+ name,
1317
+ wrap("implements ", join(interfaces, " & ")),
1318
+ join(directives, " "),
1319
+ block(fields)
1320
+ ],
1321
+ " "
1322
+ )
1323
+ ]),
1324
+ FieldDefinition: ({ description, name, arguments: args, type, directives }) => join([
1325
+ wrap("", description, "\n"),
1326
+ name,
1327
+ hasMultilineItems(args) ? wrap("(\n", join(args, "\n").indent(), "\n)") : wrap("(", join(args, ", "), ")"),
1328
+ ": ",
1329
+ type,
1330
+ wrap(" ", join(directives, " "))
1331
+ ]),
1332
+ InputValueDefinition: ({
1333
+ description,
1334
+ name,
1335
+ type,
1336
+ defaultValue,
1337
+ directives
1338
+ }) => join([
1339
+ wrap("", description, "\n"),
1340
+ name,
1341
+ ": ",
1342
+ type,
1343
+ wrap(" = ", defaultValue),
1344
+ wrap(" ", join(directives, " "))
1345
+ ]),
1346
+ InterfaceTypeDefinition: ({
1347
+ description,
1348
+ name,
1349
+ interfaces,
1350
+ directives,
1351
+ fields
1352
+ }) => join([
1353
+ wrap("", description, "\n"),
1354
+ join(
1355
+ [
1356
+ "interface",
1357
+ name,
1358
+ wrap("implements ", join(interfaces, " & ")),
1359
+ join(directives, " "),
1360
+ block(fields)
1361
+ ],
1362
+ " "
1363
+ )
1364
+ ]),
1365
+ UnionTypeDefinition: ({ description, name, directives, types }) => join([
1366
+ wrap("", description, "\n"),
1367
+ join(
1368
+ ["union", name, join(directives, " "), wrap("= ", join(types, " | "))],
1369
+ " "
1370
+ )
1371
+ ]),
1372
+ EnumTypeDefinition: ({ description, name, directives, values }) => join([
1373
+ wrap("", description, "\n"),
1374
+ join(["enum", name, join(directives, " "), block(values)], " ")
1375
+ ]),
1376
+ EnumValueDefinition: ({ description, name, directives }) => join([
1377
+ wrap("", description, "\n"),
1378
+ join([name, join(directives, " ")], " ")
1379
+ ]),
1380
+ InputObjectTypeDefinition: ({ description, name, directives, fields }) => join([
1381
+ wrap("", description, "\n"),
1382
+ join(["input", name, join(directives, " "), block(fields)], " ")
1383
+ ]),
1384
+ DirectiveDefinition: ({
1385
+ description,
1386
+ name,
1387
+ arguments: args,
1388
+ directives,
1389
+ repeatable,
1390
+ locations
1391
+ }) => join([
1392
+ wrap("", description, "\n"),
1393
+ "directive @",
1394
+ name,
1395
+ hasMultilineItems(args) ? wrap("(\n", join(args, "\n").indent(), "\n)") : wrap("(", join(args, ", "), ")"),
1396
+ wrap(" ", join(directives, " ")),
1397
+ repeatable ? " repeatable" : "",
1398
+ " on ",
1399
+ join(locations, " | ")
1400
+ ]),
1401
+ SchemaExtension: ({ directives, operationTypes }) => join(["extend schema", join(directives, " "), block(operationTypes)], " "),
1402
+ ScalarTypeExtension: ({ name, directives }) => join(["extend scalar", name, join(directives, " ")], " "),
1403
+ ObjectTypeExtension: ({ name, interfaces, directives, fields }) => join(
1404
+ [
1405
+ "extend type",
1406
+ name,
1407
+ wrap("implements ", join(interfaces, " & ")),
1408
+ join(directives, " "),
1409
+ block(fields)
1410
+ ],
1411
+ " "
1412
+ ),
1413
+ InterfaceTypeExtension: ({ name, interfaces, directives, fields }) => join(
1414
+ [
1415
+ "extend interface",
1416
+ name,
1417
+ wrap("implements ", join(interfaces, " & ")),
1418
+ join(directives, " "),
1419
+ block(fields)
1420
+ ],
1421
+ " "
1422
+ ),
1423
+ UnionTypeExtension: ({ name, directives, types }) => join(
1424
+ [
1425
+ "extend union",
1426
+ name,
1427
+ join(directives, " "),
1428
+ wrap("= ", join(types, " | "))
1429
+ ],
1430
+ " "
1431
+ ),
1432
+ EnumTypeExtension: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " "),
1433
+ InputObjectTypeExtension: ({ name, directives, fields }) => join(["extend input", name, join(directives, " "), block(fields)], " "),
1434
+ DirectiveExtension: ({ name, directives }) => join([join(["extend directive @", name]), join(directives, " ")], " "),
1435
+ // Schema Coordinates
1436
+ TypeCoordinate: ({ name }) => name,
1437
+ MemberCoordinate: ({ name, memberName }) => join([name, wrap(".", memberName)]),
1438
+ ArgumentCoordinate: ({ name, fieldName, argumentName }) => join([name, wrap(".", fieldName), wrap("(", argumentName, ":)")]),
1439
+ DirectiveCoordinate: ({ name }) => join(["@", name]),
1440
+ DirectiveArgumentCoordinate: ({ name, argumentName }) => join(["@", name, wrap("(", argumentName, ":)")])
1441
+ };
1442
+ function join(maybeArray, separator = "") {
1443
+ if (maybeArray == null || maybeArray.length === 0) {
1444
+ return EMPTY2;
1445
+ }
1446
+ let result = EMPTY2;
1447
+ for (const item of maybeArray) {
1448
+ if (item === void 0 || item.length === 0) {
1449
+ continue;
1450
+ }
1451
+ if (result.length === 0) {
1452
+ result = typeof item === "string" ? new PrintBuffer(item) : item;
1453
+ } else {
1454
+ if (separator !== "") {
1455
+ result.append(separator);
1456
+ }
1457
+ result.append(item);
1458
+ }
1459
+ }
1460
+ return result;
1461
+ }
1462
+ function joinedLength(array, separator) {
1463
+ let length = 0;
1464
+ for (const item of array) {
1465
+ if (item.length !== 0) {
1466
+ length += (length === 0 ? 0 : separator.length) + item.length;
1467
+ }
1468
+ }
1469
+ return length;
1470
+ }
1471
+ function block(array) {
1472
+ return wrap("{\n", join(array, "\n").indent(), "\n}");
1473
+ }
1474
+ function wrap(start, maybeBuffer, end = "") {
1475
+ return maybeBuffer != null && maybeBuffer.length !== 0 ? start === "" ? maybeBuffer.append(end) : new PrintBuffer(start).append(maybeBuffer).append(end) : EMPTY2;
1476
+ }
1477
+ function hasMultilineItems(maybeArray) {
1478
+ var _maybeArray$some;
1479
+ return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((result) => result.newlines !== 0)) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
1480
+ }
1481
+ function wrappedLineAndArgs(prefix, args) {
1482
+ if (args == null || args.length === 0) {
1483
+ return prefix;
1484
+ }
1485
+ return join([
1486
+ prefix,
1487
+ prefix.length + joinedLength(args, ", ") + 2 > MAX_LINE_LENGTH ? wrap("(\n", join(args, "\n").indent(), "\n)") : wrap("(", join(args, ", "), ")")
1488
+ ]);
1489
+ }
1490
+
1062
1491
  // ../../node_modules/graphql/language/visitor.mjs
1063
1492
  var BREAK = Object.freeze({});
1064
1493
  function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
@@ -1188,280 +1617,6 @@ function getEnterLeaveForKind(visitor, kind) {
1188
1617
  };
1189
1618
  }
1190
1619
 
1191
- // ../../node_modules/graphql/language/printer.mjs
1192
- function print(ast) {
1193
- return visit(ast, printDocASTReducer);
1194
- }
1195
- var MAX_LINE_LENGTH = 80;
1196
- var printDocASTReducer = {
1197
- Name: {
1198
- leave: (node) => node.value
1199
- },
1200
- Variable: {
1201
- leave: (node) => "$" + node.name
1202
- },
1203
- // Document
1204
- Document: {
1205
- leave: (node) => join(node.definitions, "\n\n")
1206
- },
1207
- OperationDefinition: {
1208
- leave(node) {
1209
- const varDefs = hasMultilineItems(node.variableDefinitions) ? wrap("(\n", join(node.variableDefinitions, "\n"), "\n)") : wrap("(", join(node.variableDefinitions, ", "), ")");
1210
- const prefix = wrap("", node.description, "\n") + join(
1211
- [
1212
- node.operation,
1213
- join([node.name, varDefs]),
1214
- join(node.directives, " ")
1215
- ],
1216
- " "
1217
- );
1218
- return (prefix === "query" ? "" : prefix + " ") + node.selectionSet;
1219
- }
1220
- },
1221
- VariableDefinition: {
1222
- leave: ({ variable, type, defaultValue, directives, description }) => wrap("", description, "\n") + variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ", join(directives, " "))
1223
- },
1224
- SelectionSet: {
1225
- leave: ({ selections }) => block(selections)
1226
- },
1227
- Field: {
1228
- leave({ alias, name, arguments: args, directives, selectionSet }) {
1229
- const prefix = wrap("", alias, ": ") + name;
1230
- let argsLine = prefix + wrap("(", join(args, ", "), ")");
1231
- if (argsLine.length > MAX_LINE_LENGTH) {
1232
- argsLine = prefix + wrap("(\n", indent(join(args, "\n")), "\n)");
1233
- }
1234
- return join([argsLine, join(directives, " "), selectionSet], " ");
1235
- }
1236
- },
1237
- Argument: {
1238
- leave: ({ name, value }) => name + ": " + value
1239
- },
1240
- // Fragments
1241
- FragmentSpread: {
1242
- leave: ({ name, directives }) => "..." + name + wrap(" ", join(directives, " "))
1243
- },
1244
- InlineFragment: {
1245
- leave: ({ typeCondition, directives, selectionSet }) => join(
1246
- [
1247
- "...",
1248
- wrap("on ", typeCondition),
1249
- join(directives, " "),
1250
- selectionSet
1251
- ],
1252
- " "
1253
- )
1254
- },
1255
- FragmentDefinition: {
1256
- leave: ({
1257
- name,
1258
- typeCondition,
1259
- variableDefinitions,
1260
- directives,
1261
- selectionSet,
1262
- description
1263
- }) => wrap("", description, "\n") + // Note: fragment variable definitions are experimental and may be changed
1264
- // or removed in the future.
1265
- `fragment ${name}${wrap("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join(directives, " "), " ")}` + selectionSet
1266
- },
1267
- // Value
1268
- IntValue: {
1269
- leave: ({ value }) => value
1270
- },
1271
- FloatValue: {
1272
- leave: ({ value }) => value
1273
- },
1274
- StringValue: {
1275
- leave: ({ value, block: isBlockString }) => isBlockString ? printBlockString(value) : printString(value)
1276
- },
1277
- BooleanValue: {
1278
- leave: ({ value }) => value ? "true" : "false"
1279
- },
1280
- NullValue: {
1281
- leave: () => "null"
1282
- },
1283
- EnumValue: {
1284
- leave: ({ value }) => value
1285
- },
1286
- ListValue: {
1287
- leave: ({ values }) => "[" + join(values, ", ") + "]"
1288
- },
1289
- ObjectValue: {
1290
- leave: ({ fields }) => "{" + join(fields, ", ") + "}"
1291
- },
1292
- ObjectField: {
1293
- leave: ({ name, value }) => name + ": " + value
1294
- },
1295
- // Directive
1296
- Directive: {
1297
- leave: ({ name, arguments: args }) => "@" + name + wrap("(", join(args, ", "), ")")
1298
- },
1299
- // Type
1300
- NamedType: {
1301
- leave: ({ name }) => name
1302
- },
1303
- ListType: {
1304
- leave: ({ type }) => "[" + type + "]"
1305
- },
1306
- NonNullType: {
1307
- leave: ({ type }) => type + "!"
1308
- },
1309
- // Type System Definitions
1310
- SchemaDefinition: {
1311
- leave: ({ description, directives, operationTypes }) => wrap("", description, "\n") + join(["schema", join(directives, " "), block(operationTypes)], " ")
1312
- },
1313
- OperationTypeDefinition: {
1314
- leave: ({ operation, type }) => operation + ": " + type
1315
- },
1316
- ScalarTypeDefinition: {
1317
- leave: ({ description, name, directives }) => wrap("", description, "\n") + join(["scalar", name, join(directives, " ")], " ")
1318
- },
1319
- ObjectTypeDefinition: {
1320
- leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join(
1321
- [
1322
- "type",
1323
- name,
1324
- wrap("implements ", join(interfaces, " & ")),
1325
- join(directives, " "),
1326
- block(fields)
1327
- ],
1328
- " "
1329
- )
1330
- },
1331
- FieldDefinition: {
1332
- leave: ({ description, name, arguments: args, type, directives }) => wrap("", description, "\n") + name + (hasMultilineItems(args) ? wrap("(\n", indent(join(args, "\n")), "\n)") : wrap("(", join(args, ", "), ")")) + ": " + type + wrap(" ", join(directives, " "))
1333
- },
1334
- InputValueDefinition: {
1335
- leave: ({ description, name, type, defaultValue, directives }) => wrap("", description, "\n") + join(
1336
- [name + ": " + type, wrap("= ", defaultValue), join(directives, " ")],
1337
- " "
1338
- )
1339
- },
1340
- InterfaceTypeDefinition: {
1341
- leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join(
1342
- [
1343
- "interface",
1344
- name,
1345
- wrap("implements ", join(interfaces, " & ")),
1346
- join(directives, " "),
1347
- block(fields)
1348
- ],
1349
- " "
1350
- )
1351
- },
1352
- UnionTypeDefinition: {
1353
- leave: ({ description, name, directives, types }) => wrap("", description, "\n") + join(
1354
- ["union", name, join(directives, " "), wrap("= ", join(types, " | "))],
1355
- " "
1356
- )
1357
- },
1358
- EnumTypeDefinition: {
1359
- leave: ({ description, name, directives, values }) => wrap("", description, "\n") + join(["enum", name, join(directives, " "), block(values)], " ")
1360
- },
1361
- EnumValueDefinition: {
1362
- leave: ({ description, name, directives }) => wrap("", description, "\n") + join([name, join(directives, " ")], " ")
1363
- },
1364
- InputObjectTypeDefinition: {
1365
- leave: ({ description, name, directives, fields }) => wrap("", description, "\n") + join(["input", name, join(directives, " "), block(fields)], " ")
1366
- },
1367
- DirectiveDefinition: {
1368
- leave: ({
1369
- description,
1370
- name,
1371
- arguments: args,
1372
- directives,
1373
- repeatable,
1374
- locations
1375
- }) => wrap("", description, "\n") + "directive @" + name + (hasMultilineItems(args) ? wrap("(\n", indent(join(args, "\n")), "\n)") : wrap("(", join(args, ", "), ")")) + wrap(" ", join(directives, " ")) + (repeatable ? " repeatable" : "") + " on " + join(locations, " | ")
1376
- },
1377
- SchemaExtension: {
1378
- leave: ({ directives, operationTypes }) => join(
1379
- ["extend schema", join(directives, " "), block(operationTypes)],
1380
- " "
1381
- )
1382
- },
1383
- ScalarTypeExtension: {
1384
- leave: ({ name, directives }) => join(["extend scalar", name, join(directives, " ")], " ")
1385
- },
1386
- ObjectTypeExtension: {
1387
- leave: ({ name, interfaces, directives, fields }) => join(
1388
- [
1389
- "extend type",
1390
- name,
1391
- wrap("implements ", join(interfaces, " & ")),
1392
- join(directives, " "),
1393
- block(fields)
1394
- ],
1395
- " "
1396
- )
1397
- },
1398
- InterfaceTypeExtension: {
1399
- leave: ({ name, interfaces, directives, fields }) => join(
1400
- [
1401
- "extend interface",
1402
- name,
1403
- wrap("implements ", join(interfaces, " & ")),
1404
- join(directives, " "),
1405
- block(fields)
1406
- ],
1407
- " "
1408
- )
1409
- },
1410
- UnionTypeExtension: {
1411
- leave: ({ name, directives, types }) => join(
1412
- [
1413
- "extend union",
1414
- name,
1415
- join(directives, " "),
1416
- wrap("= ", join(types, " | "))
1417
- ],
1418
- " "
1419
- )
1420
- },
1421
- EnumTypeExtension: {
1422
- leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
1423
- },
1424
- InputObjectTypeExtension: {
1425
- leave: ({ name, directives, fields }) => join(["extend input", name, join(directives, " "), block(fields)], " ")
1426
- },
1427
- DirectiveExtension: {
1428
- leave: ({ name, directives }) => join(["extend directive @" + name, join(directives, " ")], " ")
1429
- },
1430
- // Schema Coordinates
1431
- TypeCoordinate: {
1432
- leave: ({ name }) => name
1433
- },
1434
- MemberCoordinate: {
1435
- leave: ({ name, memberName }) => join([name, wrap(".", memberName)])
1436
- },
1437
- ArgumentCoordinate: {
1438
- leave: ({ name, fieldName, argumentName }) => join([name, wrap(".", fieldName), wrap("(", argumentName, ":)")])
1439
- },
1440
- DirectiveCoordinate: {
1441
- leave: ({ name }) => join(["@", name])
1442
- },
1443
- DirectiveArgumentCoordinate: {
1444
- leave: ({ name, argumentName }) => join(["@", name, wrap("(", argumentName, ":)")])
1445
- }
1446
- };
1447
- function join(maybeArray, separator = "") {
1448
- var _maybeArray$filter$jo;
1449
- return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : "";
1450
- }
1451
- function block(array) {
1452
- return wrap("{\n", indent(join(array, "\n")), "\n}");
1453
- }
1454
- function wrap(start, maybeString, end = "") {
1455
- return maybeString != null && maybeString !== "" ? start + maybeString + end : "";
1456
- }
1457
- function indent(str) {
1458
- return wrap(" ", str.replace(/\n/g, "\n "));
1459
- }
1460
- function hasMultilineItems(maybeArray) {
1461
- var _maybeArray$some;
1462
- return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
1463
- }
1464
-
1465
1620
  // ../../node_modules/@apollo/client/utilities/environment/index.js
1466
1621
  var __DEV__ = globalThis.__DEV__ === true;
1467
1622
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/web",
3
- "version": "8.0.0-canary.3637",
3
+ "version": "8.0.0-canary.3641",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -82,12 +82,12 @@
82
82
  },
83
83
  "dependencies": {
84
84
  "@apollo/client": "4.3.6",
85
- "@cedarjs/server-store": "8.0.0-canary.3637",
85
+ "@cedarjs/server-store": "8.0.0-canary.3641",
86
86
  "@dr.pogodin/react-helmet": "2.0.4",
87
87
  "@whatwg-node/fetch": "0.12.1",
88
88
  "apollo-upload-client": "19.0.0",
89
89
  "cookie": "1.1.1",
90
- "graphql": "16.14.2",
90
+ "graphql": "16.15.0",
91
91
  "graphql-sse": "2.6.3",
92
92
  "graphql-tag": "2.12.7",
93
93
  "react-hot-toast": "2.6.1",
@@ -98,9 +98,9 @@
98
98
  "devDependencies": {
99
99
  "@apollo/client-react-streaming": "0.14.5",
100
100
  "@arethetypeswrong/cli": "0.18.5",
101
- "@cedarjs/auth": "8.0.0-canary.3637",
102
- "@cedarjs/framework-tools": "8.0.0-canary.3637",
103
- "@cedarjs/internal": "8.0.0-canary.3637",
101
+ "@cedarjs/auth": "8.0.0-canary.3641",
102
+ "@cedarjs/framework-tools": "8.0.0-canary.3641",
103
+ "@cedarjs/internal": "8.0.0-canary.3641",
104
104
  "@testing-library/dom": "10.4.2",
105
105
  "@testing-library/jest-dom": "6.9.1",
106
106
  "@testing-library/react": "16.3.3",
@@ -118,7 +118,7 @@
118
118
  "vitest": "5.1.0"
119
119
  },
120
120
  "peerDependencies": {
121
- "@cedarjs/auth": "8.0.0-canary.3637",
121
+ "@cedarjs/auth": "8.0.0-canary.3641",
122
122
  "react": "19.3.1",
123
123
  "react-dom": "19.3.1"
124
124
  },