houdini-svelte 0.18.2 → 0.19.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/build/plugin/codegen/fragmentTypedefs/index.d.ts +2 -0
- package/build/plugin/codegen/stores/custom.d.ts +2 -2
- package/build/plugin/extract.d.ts +2 -2
- package/build/plugin/index.d.ts +5 -9
- package/build/plugin/kit.d.ts +2 -6
- package/build/plugin/transforms/query.d.ts +0 -4
- package/build/plugin-cjs/index.js +1211 -911
- package/build/plugin-esm/index.js +1211 -911
- package/build/preprocess-cjs/index.js +990 -780
- package/build/preprocess-esm/index.js +990 -780
- package/build/test-cjs/index.js +2634 -1891
- package/build/test-esm/index.js +2634 -1891
- package/package.json +8 -8
|
@@ -1975,12 +1975,12 @@ var require_parser3 = __commonJS({
|
|
|
1975
1975
|
return [];
|
|
1976
1976
|
}
|
|
1977
1977
|
if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {
|
|
1978
|
-
var
|
|
1978
|
+
var types13 = [];
|
|
1979
1979
|
this.expectOptionalToken(_tokenKind.TokenKind.AMP);
|
|
1980
1980
|
do {
|
|
1981
|
-
|
|
1981
|
+
types13.push(this.parseNamedType());
|
|
1982
1982
|
} while (this.expectOptionalToken(_tokenKind.TokenKind.AMP) || this.peek(_tokenKind.TokenKind.NAME));
|
|
1983
|
-
return
|
|
1983
|
+
return types13;
|
|
1984
1984
|
}
|
|
1985
1985
|
return this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType);
|
|
1986
1986
|
};
|
|
@@ -2059,13 +2059,13 @@ var require_parser3 = __commonJS({
|
|
|
2059
2059
|
this.expectKeyword("union");
|
|
2060
2060
|
var name2 = this.parseName();
|
|
2061
2061
|
var directives = this.parseDirectives(true);
|
|
2062
|
-
var
|
|
2062
|
+
var types13 = this.parseUnionMemberTypes();
|
|
2063
2063
|
return {
|
|
2064
2064
|
kind: _kinds.Kind.UNION_TYPE_DEFINITION,
|
|
2065
2065
|
description,
|
|
2066
2066
|
name: name2,
|
|
2067
2067
|
directives,
|
|
2068
|
-
types:
|
|
2068
|
+
types: types13,
|
|
2069
2069
|
loc: this.loc(start)
|
|
2070
2070
|
};
|
|
2071
2071
|
};
|
|
@@ -2223,15 +2223,15 @@ var require_parser3 = __commonJS({
|
|
|
2223
2223
|
this.expectKeyword("union");
|
|
2224
2224
|
var name2 = this.parseName();
|
|
2225
2225
|
var directives = this.parseDirectives(true);
|
|
2226
|
-
var
|
|
2227
|
-
if (directives.length === 0 &&
|
|
2226
|
+
var types13 = this.parseUnionMemberTypes();
|
|
2227
|
+
if (directives.length === 0 && types13.length === 0) {
|
|
2228
2228
|
throw this.unexpected();
|
|
2229
2229
|
}
|
|
2230
2230
|
return {
|
|
2231
2231
|
kind: _kinds.Kind.UNION_TYPE_EXTENSION,
|
|
2232
2232
|
name: name2,
|
|
2233
2233
|
directives,
|
|
2234
|
-
types:
|
|
2234
|
+
types: types13,
|
|
2235
2235
|
loc: this.loc(start)
|
|
2236
2236
|
};
|
|
2237
2237
|
};
|
|
@@ -3209,8 +3209,8 @@ var require_printer3 = __commonJS({
|
|
|
3209
3209
|
return join5(["interface", name2, wrap3("implements ", join5(interfaces, " & ")), join5(directives, " "), block3(fields)], " ");
|
|
3210
3210
|
}),
|
|
3211
3211
|
UnionTypeDefinition: addDescription3(function(_ref27) {
|
|
3212
|
-
var name2 = _ref27.name, directives = _ref27.directives,
|
|
3213
|
-
return join5(["union", name2, join5(directives, " "),
|
|
3212
|
+
var name2 = _ref27.name, directives = _ref27.directives, types13 = _ref27.types;
|
|
3213
|
+
return join5(["union", name2, join5(directives, " "), types13 && types13.length !== 0 ? "= " + join5(types13, " | ") : ""], " ");
|
|
3214
3214
|
}),
|
|
3215
3215
|
EnumTypeDefinition: addDescription3(function(_ref28) {
|
|
3216
3216
|
var name2 = _ref28.name, directives = _ref28.directives, values = _ref28.values;
|
|
@@ -3245,8 +3245,8 @@ var require_printer3 = __commonJS({
|
|
|
3245
3245
|
return join5(["extend interface", name2, wrap3("implements ", join5(interfaces, " & ")), join5(directives, " "), block3(fields)], " ");
|
|
3246
3246
|
},
|
|
3247
3247
|
UnionTypeExtension: function UnionTypeExtension(_ref36) {
|
|
3248
|
-
var name2 = _ref36.name, directives = _ref36.directives,
|
|
3249
|
-
return join5(["extend union", name2, join5(directives, " "),
|
|
3248
|
+
var name2 = _ref36.name, directives = _ref36.directives, types13 = _ref36.types;
|
|
3249
|
+
return join5(["extend union", name2, join5(directives, " "), types13 && types13.length !== 0 ? "= " + join5(types13, " | ") : ""], " ");
|
|
3250
3250
|
},
|
|
3251
3251
|
EnumTypeExtension: function EnumTypeExtension(_ref37) {
|
|
3252
3252
|
var name2 = _ref37.name, directives = _ref37.directives, values = _ref37.values;
|
|
@@ -3917,9 +3917,9 @@ var require_definition2 = __commonJS({
|
|
|
3917
3917
|
exports.GraphQLUnionType = GraphQLUnionType;
|
|
3918
3918
|
(0, _defineInspect.default)(GraphQLUnionType);
|
|
3919
3919
|
function defineTypes(config4) {
|
|
3920
|
-
var
|
|
3921
|
-
Array.isArray(
|
|
3922
|
-
return
|
|
3920
|
+
var types13 = resolveThunk(config4.types);
|
|
3921
|
+
Array.isArray(types13) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config4.name, "."));
|
|
3922
|
+
return types13;
|
|
3923
3923
|
}
|
|
3924
3924
|
var GraphQLEnumType = /* @__PURE__ */ function() {
|
|
3925
3925
|
function GraphQLEnumType2(config4) {
|
|
@@ -9757,7 +9757,7 @@ var require_graphql3 = __commonJS({
|
|
|
9757
9757
|
Object.defineProperty(exports, "__esModule", {
|
|
9758
9758
|
value: true
|
|
9759
9759
|
});
|
|
9760
|
-
exports.graphql =
|
|
9760
|
+
exports.graphql = graphql34;
|
|
9761
9761
|
exports.graphqlSync = graphqlSync;
|
|
9762
9762
|
var _isPromise = _interopRequireDefault(require_isPromise2());
|
|
9763
9763
|
var _parser = require_parser3();
|
|
@@ -9767,7 +9767,7 @@ var require_graphql3 = __commonJS({
|
|
|
9767
9767
|
function _interopRequireDefault(obj) {
|
|
9768
9768
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
9769
9769
|
}
|
|
9770
|
-
function
|
|
9770
|
+
function graphql34(argsOrSchema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) {
|
|
9771
9771
|
var _arguments = arguments;
|
|
9772
9772
|
return new Promise(function(resolve4) {
|
|
9773
9773
|
return resolve4(
|
|
@@ -11556,7 +11556,7 @@ var require_buildClientSchema2 = __commonJS({
|
|
|
11556
11556
|
return new _definition.GraphQLUnionType({
|
|
11557
11557
|
name: unionIntrospection.name,
|
|
11558
11558
|
description: unionIntrospection.description,
|
|
11559
|
-
types: function
|
|
11559
|
+
types: function types13() {
|
|
11560
11560
|
return unionIntrospection.possibleTypes.map(getObjectType);
|
|
11561
11561
|
}
|
|
11562
11562
|
});
|
|
@@ -11901,7 +11901,7 @@ var require_extendSchema2 = __commonJS({
|
|
|
11901
11901
|
var config4 = type.toConfig();
|
|
11902
11902
|
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config4.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
11903
11903
|
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config4), {}, {
|
|
11904
|
-
types: function
|
|
11904
|
+
types: function types13() {
|
|
11905
11905
|
return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
|
|
11906
11906
|
},
|
|
11907
11907
|
extensionASTNodes: config4.extensionASTNodes.concat(extensions)
|
|
@@ -12049,17 +12049,17 @@ var require_extendSchema2 = __commonJS({
|
|
|
12049
12049
|
return interfaces;
|
|
12050
12050
|
}
|
|
12051
12051
|
function buildUnionTypes(nodes) {
|
|
12052
|
-
var
|
|
12052
|
+
var types13 = [];
|
|
12053
12053
|
for (var _i32 = 0; _i32 < nodes.length; _i32++) {
|
|
12054
12054
|
var _node$types;
|
|
12055
12055
|
var node2 = nodes[_i32];
|
|
12056
12056
|
var typeNodes = (_node$types = node2.types) !== null && _node$types !== void 0 ? _node$types : [];
|
|
12057
12057
|
for (var _i34 = 0; _i34 < typeNodes.length; _i34++) {
|
|
12058
12058
|
var type = typeNodes[_i34];
|
|
12059
|
-
|
|
12059
|
+
types13.push(getNamedType(type));
|
|
12060
12060
|
}
|
|
12061
12061
|
}
|
|
12062
|
-
return
|
|
12062
|
+
return types13;
|
|
12063
12063
|
}
|
|
12064
12064
|
function buildType(astNode) {
|
|
12065
12065
|
var _typeExtensionsMap$na;
|
|
@@ -12116,7 +12116,7 @@ var require_extendSchema2 = __commonJS({
|
|
|
12116
12116
|
return new _definition.GraphQLUnionType({
|
|
12117
12117
|
name: name3,
|
|
12118
12118
|
description,
|
|
12119
|
-
types: function
|
|
12119
|
+
types: function types13() {
|
|
12120
12120
|
return buildUnionTypes(_allNodes3);
|
|
12121
12121
|
},
|
|
12122
12122
|
astNode,
|
|
@@ -12414,7 +12414,7 @@ var require_lexicographicSortSchema2 = __commonJS({
|
|
|
12414
12414
|
if ((0, _definition.isUnionType)(type)) {
|
|
12415
12415
|
var _config2 = type.toConfig();
|
|
12416
12416
|
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, _config2), {}, {
|
|
12417
|
-
types: function
|
|
12417
|
+
types: function types13() {
|
|
12418
12418
|
return sortTypes(_config2.types);
|
|
12419
12419
|
}
|
|
12420
12420
|
}));
|
|
@@ -12499,10 +12499,10 @@ var require_printSchema2 = __commonJS({
|
|
|
12499
12499
|
}
|
|
12500
12500
|
function printFilteredSchema(schema, directiveFilter, typeFilter, options) {
|
|
12501
12501
|
var directives = schema.getDirectives().filter(directiveFilter);
|
|
12502
|
-
var
|
|
12502
|
+
var types13 = (0, _objectValues.default)(schema.getTypeMap()).filter(typeFilter);
|
|
12503
12503
|
return [printSchemaDefinition(schema)].concat(directives.map(function(directive) {
|
|
12504
12504
|
return printDirective(directive, options);
|
|
12505
|
-
}),
|
|
12505
|
+
}), types13.map(function(type) {
|
|
12506
12506
|
return printType(type, options);
|
|
12507
12507
|
})).filter(Boolean).join("\n\n") + "\n";
|
|
12508
12508
|
}
|
|
@@ -12577,8 +12577,8 @@ var require_printSchema2 = __commonJS({
|
|
|
12577
12577
|
return printDescription(options, type) + "interface ".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type);
|
|
12578
12578
|
}
|
|
12579
12579
|
function printUnion(type, options) {
|
|
12580
|
-
var
|
|
12581
|
-
var possibleTypes =
|
|
12580
|
+
var types13 = type.getTypes();
|
|
12581
|
+
var possibleTypes = types13.length ? " = " + types13.join(" | ") : "";
|
|
12582
12582
|
return printDescription(options, type) + "union " + type.name + possibleTypes;
|
|
12583
12583
|
}
|
|
12584
12584
|
function printEnum(type, options) {
|
|
@@ -12641,8 +12641,8 @@ var require_printSchema2 = __commonJS({
|
|
|
12641
12641
|
if (scalar.specifiedByUrl == null) {
|
|
12642
12642
|
return "";
|
|
12643
12643
|
}
|
|
12644
|
-
var
|
|
12645
|
-
var urlAST = (0, _astFromValue.astFromValue)(
|
|
12644
|
+
var url2 = scalar.specifiedByUrl;
|
|
12645
|
+
var urlAST = (0, _astFromValue.astFromValue)(url2, _scalars.GraphQLString);
|
|
12646
12646
|
urlAST || (0, _invariant.default)(0, "Unexpected null value returned from `astFromValue` for specifiedByUrl");
|
|
12647
12647
|
return " @specifiedBy(url: " + (0, _printer.print)(urlAST) + ")";
|
|
12648
12648
|
}
|
|
@@ -15161,9 +15161,9 @@ var require_shared3 = __commonJS({
|
|
|
15161
15161
|
var tslib_1 = require_tslib3();
|
|
15162
15162
|
var types_110 = tslib_1.__importDefault(require_types3());
|
|
15163
15163
|
function default_1(fork) {
|
|
15164
|
-
var
|
|
15165
|
-
var Type =
|
|
15166
|
-
var builtin =
|
|
15164
|
+
var types13 = fork.use(types_110.default);
|
|
15165
|
+
var Type = types13.Type;
|
|
15166
|
+
var builtin = types13.builtInTypes;
|
|
15167
15167
|
var isNumber2 = builtin.number;
|
|
15168
15168
|
function geq(than) {
|
|
15169
15169
|
return Type.from(function(value2) {
|
|
@@ -15313,9 +15313,9 @@ var require_types3 = __commonJS({
|
|
|
15313
15313
|
}(BaseType);
|
|
15314
15314
|
var OrType = function(_super) {
|
|
15315
15315
|
tslib_1.__extends(OrType2, _super);
|
|
15316
|
-
function OrType2(
|
|
15316
|
+
function OrType2(types13) {
|
|
15317
15317
|
var _this = _super.call(this) || this;
|
|
15318
|
-
_this.types =
|
|
15318
|
+
_this.types = types13;
|
|
15319
15319
|
_this.kind = "OrType";
|
|
15320
15320
|
return _this;
|
|
15321
15321
|
}
|
|
@@ -15456,11 +15456,11 @@ var require_types3 = __commonJS({
|
|
|
15456
15456
|
function typesPlugin(_fork) {
|
|
15457
15457
|
var Type = {
|
|
15458
15458
|
or: function() {
|
|
15459
|
-
var
|
|
15459
|
+
var types13 = [];
|
|
15460
15460
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
15461
|
-
|
|
15461
|
+
types13[_i] = arguments[_i];
|
|
15462
15462
|
}
|
|
15463
|
-
return new OrType(
|
|
15463
|
+
return new OrType(types13.map(function(type) {
|
|
15464
15464
|
return Type.from(type);
|
|
15465
15465
|
}));
|
|
15466
15466
|
},
|
|
@@ -15905,9 +15905,9 @@ var require_path4 = __commonJS({
|
|
|
15905
15905
|
var Op = Object.prototype;
|
|
15906
15906
|
var hasOwn2 = Op.hasOwnProperty;
|
|
15907
15907
|
function pathPlugin(fork) {
|
|
15908
|
-
var
|
|
15909
|
-
var isArray2 =
|
|
15910
|
-
var isNumber2 =
|
|
15908
|
+
var types13 = fork.use(types_110.default);
|
|
15909
|
+
var isArray2 = types13.builtInTypes.array;
|
|
15910
|
+
var isNumber2 = types13.builtInTypes.number;
|
|
15911
15911
|
var Path = function Path2(value2, parentPath, name2) {
|
|
15912
15912
|
if (!(this instanceof Path2)) {
|
|
15913
15913
|
throw new Error("Path constructor cannot be invoked without 'new'");
|
|
@@ -16209,13 +16209,13 @@ var require_scope3 = __commonJS({
|
|
|
16209
16209
|
var types_110 = tslib_1.__importDefault(require_types3());
|
|
16210
16210
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
16211
16211
|
function scopePlugin(fork) {
|
|
16212
|
-
var
|
|
16213
|
-
var Type =
|
|
16214
|
-
var namedTypes =
|
|
16212
|
+
var types13 = fork.use(types_110.default);
|
|
16213
|
+
var Type = types13.Type;
|
|
16214
|
+
var namedTypes = types13.namedTypes;
|
|
16215
16215
|
var Node3 = namedTypes.Node;
|
|
16216
16216
|
var Expression = namedTypes.Expression;
|
|
16217
|
-
var isArray2 =
|
|
16218
|
-
var b =
|
|
16217
|
+
var isArray2 = types13.builtInTypes.array;
|
|
16218
|
+
var b = types13.builders;
|
|
16219
16219
|
var Scope3 = function Scope4(path3, parentScope) {
|
|
16220
16220
|
if (!(this instanceof Scope4)) {
|
|
16221
16221
|
throw new Error("Scope constructor cannot be invoked without 'new'");
|
|
@@ -16278,7 +16278,7 @@ var require_scope3 = __commonJS({
|
|
|
16278
16278
|
++index;
|
|
16279
16279
|
}
|
|
16280
16280
|
var name2 = prefix + index;
|
|
16281
|
-
return this.bindings[name2] =
|
|
16281
|
+
return this.bindings[name2] = types13.builders.identifier(name2);
|
|
16282
16282
|
};
|
|
16283
16283
|
Sp.injectTemporary = function(identifier, init) {
|
|
16284
16284
|
identifier || (identifier = this.declareTemporary());
|
|
@@ -16354,7 +16354,7 @@ var require_scope3 = __commonJS({
|
|
|
16354
16354
|
bindings
|
|
16355
16355
|
);
|
|
16356
16356
|
} else if (Node3.check(node2) && !Expression.check(node2)) {
|
|
16357
|
-
|
|
16357
|
+
types13.eachField(node2, function(name2, child) {
|
|
16358
16358
|
var childPath = path3.get(name2);
|
|
16359
16359
|
if (!pathHasValue(childPath, child)) {
|
|
16360
16360
|
throw new Error("");
|
|
@@ -16432,24 +16432,24 @@ var require_scope3 = __commonJS({
|
|
|
16432
16432
|
addPattern(patternPath.get("argument"), bindings);
|
|
16433
16433
|
}
|
|
16434
16434
|
}
|
|
16435
|
-
function addTypePattern(patternPath,
|
|
16435
|
+
function addTypePattern(patternPath, types14) {
|
|
16436
16436
|
var pattern = patternPath.value;
|
|
16437
16437
|
namedTypes.Pattern.assert(pattern);
|
|
16438
16438
|
if (namedTypes.Identifier.check(pattern)) {
|
|
16439
|
-
if (hasOwn2.call(
|
|
16440
|
-
|
|
16439
|
+
if (hasOwn2.call(types14, pattern.name)) {
|
|
16440
|
+
types14[pattern.name].push(patternPath);
|
|
16441
16441
|
} else {
|
|
16442
|
-
|
|
16442
|
+
types14[pattern.name] = [patternPath];
|
|
16443
16443
|
}
|
|
16444
16444
|
}
|
|
16445
16445
|
}
|
|
16446
|
-
function addTypeParameter(parameterPath,
|
|
16446
|
+
function addTypeParameter(parameterPath, types14) {
|
|
16447
16447
|
var parameter = parameterPath.value;
|
|
16448
16448
|
FlowOrTSTypeParameterType.assert(parameter);
|
|
16449
|
-
if (hasOwn2.call(
|
|
16450
|
-
|
|
16449
|
+
if (hasOwn2.call(types14, parameter.name)) {
|
|
16450
|
+
types14[parameter.name].push(parameterPath);
|
|
16451
16451
|
} else {
|
|
16452
|
-
|
|
16452
|
+
types14[parameter.name] = [parameterPath];
|
|
16453
16453
|
}
|
|
16454
16454
|
}
|
|
16455
16455
|
Sp.lookup = function(name2) {
|
|
@@ -16490,11 +16490,11 @@ var require_node_path3 = __commonJS({
|
|
|
16490
16490
|
var scope_1 = tslib_1.__importDefault(require_scope3());
|
|
16491
16491
|
var shared_1 = require_shared3();
|
|
16492
16492
|
function nodePathPlugin(fork) {
|
|
16493
|
-
var
|
|
16494
|
-
var n2 =
|
|
16495
|
-
var b =
|
|
16496
|
-
var isNumber2 =
|
|
16497
|
-
var isArray2 =
|
|
16493
|
+
var types13 = fork.use(types_110.default);
|
|
16494
|
+
var n2 = types13.namedTypes;
|
|
16495
|
+
var b = types13.builders;
|
|
16496
|
+
var isNumber2 = types13.builtInTypes.number;
|
|
16497
|
+
var isArray2 = types13.builtInTypes.array;
|
|
16498
16498
|
var Path = fork.use(path_1.default);
|
|
16499
16499
|
var Scope3 = fork.use(scope_1.default);
|
|
16500
16500
|
var NodePath = function NodePath2(value2, parentPath, name2) {
|
|
@@ -16585,7 +16585,7 @@ var require_node_path3 = __commonJS({
|
|
|
16585
16585
|
return scope2 || null;
|
|
16586
16586
|
};
|
|
16587
16587
|
NPp.getValueProperty = function(name2) {
|
|
16588
|
-
return
|
|
16588
|
+
return types13.getFieldValue(this.value, name2);
|
|
16589
16589
|
};
|
|
16590
16590
|
NPp.needsParens = function(assumeExpressionContext) {
|
|
16591
16591
|
var pp2 = this.parentPath;
|
|
@@ -16727,7 +16727,7 @@ var require_node_path3 = __commonJS({
|
|
|
16727
16727
|
return node2.some(containsCallExpression);
|
|
16728
16728
|
}
|
|
16729
16729
|
if (n2.Node.check(node2)) {
|
|
16730
|
-
return
|
|
16730
|
+
return types13.someField(node2, function(_name, child) {
|
|
16731
16731
|
return containsCallExpression(child);
|
|
16732
16732
|
});
|
|
16733
16733
|
}
|
|
@@ -16848,11 +16848,11 @@ var require_path_visitor3 = __commonJS({
|
|
|
16848
16848
|
var shared_1 = require_shared3();
|
|
16849
16849
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
16850
16850
|
function pathVisitorPlugin(fork) {
|
|
16851
|
-
var
|
|
16851
|
+
var types13 = fork.use(types_110.default);
|
|
16852
16852
|
var NodePath = fork.use(node_path_1.default);
|
|
16853
|
-
var isArray2 =
|
|
16854
|
-
var isObject2 =
|
|
16855
|
-
var isFunction2 =
|
|
16853
|
+
var isArray2 = types13.builtInTypes.array;
|
|
16854
|
+
var isObject2 = types13.builtInTypes.object;
|
|
16855
|
+
var isFunction2 = types13.builtInTypes.function;
|
|
16856
16856
|
var undefined2;
|
|
16857
16857
|
var PathVisitor = function PathVisitor2() {
|
|
16858
16858
|
if (!(this instanceof PathVisitor2)) {
|
|
@@ -16872,7 +16872,7 @@ var require_path_visitor3 = __commonJS({
|
|
|
16872
16872
|
typeNames[methodName.slice("visit".length)] = true;
|
|
16873
16873
|
}
|
|
16874
16874
|
}
|
|
16875
|
-
var supertypeTable =
|
|
16875
|
+
var supertypeTable = types13.computeSupertypeLookupTable(typeNames);
|
|
16876
16876
|
var methodNameTable = /* @__PURE__ */ Object.create(null);
|
|
16877
16877
|
var typeNameKeys = Object.keys(supertypeTable);
|
|
16878
16878
|
var typeNameCount = typeNameKeys.length;
|
|
@@ -16991,7 +16991,7 @@ var require_path_visitor3 = __commonJS({
|
|
|
16991
16991
|
path3.each(visitor.visitWithoutReset, visitor);
|
|
16992
16992
|
} else if (!isObject2.check(value2)) {
|
|
16993
16993
|
} else {
|
|
16994
|
-
var childNames =
|
|
16994
|
+
var childNames = types13.getFieldNames(value2);
|
|
16995
16995
|
if (visitor._shouldVisitComments && value2.comments && childNames.indexOf("comments") < 0) {
|
|
16996
16996
|
childNames.push("comments");
|
|
16997
16997
|
}
|
|
@@ -17000,7 +17000,7 @@ var require_path_visitor3 = __commonJS({
|
|
|
17000
17000
|
for (var i3 = 0; i3 < childCount; ++i3) {
|
|
17001
17001
|
var childName = childNames[i3];
|
|
17002
17002
|
if (!hasOwn2.call(value2, childName)) {
|
|
17003
|
-
value2[childName] =
|
|
17003
|
+
value2[childName] = types13.getFieldValue(value2, childName);
|
|
17004
17004
|
}
|
|
17005
17005
|
childPaths.push(path3.get(childName));
|
|
17006
17006
|
}
|
|
@@ -17143,13 +17143,13 @@ var require_equiv3 = __commonJS({
|
|
|
17143
17143
|
var shared_1 = require_shared3();
|
|
17144
17144
|
var types_110 = tslib_1.__importDefault(require_types3());
|
|
17145
17145
|
function default_1(fork) {
|
|
17146
|
-
var
|
|
17147
|
-
var getFieldNames =
|
|
17148
|
-
var getFieldValue =
|
|
17149
|
-
var isArray2 =
|
|
17150
|
-
var isObject2 =
|
|
17151
|
-
var isDate2 =
|
|
17152
|
-
var isRegExp2 =
|
|
17146
|
+
var types13 = fork.use(types_110.default);
|
|
17147
|
+
var getFieldNames = types13.getFieldNames;
|
|
17148
|
+
var getFieldValue = types13.getFieldValue;
|
|
17149
|
+
var isArray2 = types13.builtInTypes.array;
|
|
17150
|
+
var isObject2 = types13.builtInTypes.object;
|
|
17151
|
+
var isDate2 = types13.builtInTypes.Date;
|
|
17152
|
+
var isRegExp2 = types13.builtInTypes.RegExp;
|
|
17153
17153
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
17154
17154
|
function astNodesAreEquivalent(a, b, problemPath) {
|
|
17155
17155
|
if (isArray2.check(problemPath)) {
|
|
@@ -17302,24 +17302,24 @@ var require_fork3 = __commonJS({
|
|
|
17302
17302
|
var shared_1 = require_shared3();
|
|
17303
17303
|
function default_1(plugins) {
|
|
17304
17304
|
var fork = createFork();
|
|
17305
|
-
var
|
|
17305
|
+
var types13 = fork.use(types_110.default);
|
|
17306
17306
|
plugins.forEach(fork.use);
|
|
17307
|
-
|
|
17307
|
+
types13.finalize();
|
|
17308
17308
|
var PathVisitor = fork.use(path_visitor_1.default);
|
|
17309
17309
|
return {
|
|
17310
|
-
Type:
|
|
17311
|
-
builtInTypes:
|
|
17312
|
-
namedTypes:
|
|
17313
|
-
builders:
|
|
17314
|
-
defineMethod:
|
|
17315
|
-
getFieldNames:
|
|
17316
|
-
getFieldValue:
|
|
17317
|
-
eachField:
|
|
17318
|
-
someField:
|
|
17319
|
-
getSupertypeNames:
|
|
17320
|
-
getBuilderName:
|
|
17310
|
+
Type: types13.Type,
|
|
17311
|
+
builtInTypes: types13.builtInTypes,
|
|
17312
|
+
namedTypes: types13.namedTypes,
|
|
17313
|
+
builders: types13.builders,
|
|
17314
|
+
defineMethod: types13.defineMethod,
|
|
17315
|
+
getFieldNames: types13.getFieldNames,
|
|
17316
|
+
getFieldValue: types13.getFieldValue,
|
|
17317
|
+
eachField: types13.eachField,
|
|
17318
|
+
someField: types13.someField,
|
|
17319
|
+
getSupertypeNames: types13.getSupertypeNames,
|
|
17320
|
+
getBuilderName: types13.getBuilderName,
|
|
17321
17321
|
astNodesAreEquivalent: fork.use(equiv_1.default),
|
|
17322
|
-
finalize:
|
|
17322
|
+
finalize: types13.finalize,
|
|
17323
17323
|
Path: fork.use(path_1.default),
|
|
17324
17324
|
NodePath: fork.use(node_path_1.default),
|
|
17325
17325
|
PathVisitor,
|
|
@@ -17489,8 +17489,8 @@ var require_core5 = __commonJS({
|
|
|
17489
17489
|
var types_110 = tslib_1.__importDefault(require_types3());
|
|
17490
17490
|
var shared_1 = tslib_1.__importStar(require_shared3());
|
|
17491
17491
|
function default_1(fork) {
|
|
17492
|
-
var
|
|
17493
|
-
var Type =
|
|
17492
|
+
var types13 = fork.use(types_110.default);
|
|
17493
|
+
var Type = types13.Type;
|
|
17494
17494
|
var def = Type.def;
|
|
17495
17495
|
var or = Type.or;
|
|
17496
17496
|
var shared = fork.use(shared_1.default);
|
|
@@ -17582,9 +17582,9 @@ var require_es63 = __commonJS({
|
|
|
17582
17582
|
var shared_1 = tslib_1.__importStar(require_shared3());
|
|
17583
17583
|
function default_1(fork) {
|
|
17584
17584
|
fork.use(core_1.default);
|
|
17585
|
-
var
|
|
17586
|
-
var def =
|
|
17587
|
-
var or =
|
|
17585
|
+
var types13 = fork.use(types_110.default);
|
|
17586
|
+
var def = types13.Type.def;
|
|
17587
|
+
var or = types13.Type.or;
|
|
17588
17588
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
17589
17589
|
def("Function").field("generator", Boolean, defaults2["false"]).field("expression", Boolean, defaults2["false"]).field("defaults", [or(def("Expression"), null)], defaults2.emptyArray).field("rest", or(def("Identifier"), null), defaults2["null"]);
|
|
17590
17590
|
def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
|
|
@@ -17674,8 +17674,8 @@ var require_es20173 = __commonJS({
|
|
|
17674
17674
|
var shared_1 = tslib_1.__importStar(require_shared3());
|
|
17675
17675
|
function default_1(fork) {
|
|
17676
17676
|
fork.use(es2016_1.default);
|
|
17677
|
-
var
|
|
17678
|
-
var def =
|
|
17677
|
+
var types13 = fork.use(types_110.default);
|
|
17678
|
+
var def = types13.Type.def;
|
|
17679
17679
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
17680
17680
|
def("Function").field("async", Boolean, defaults2["false"]);
|
|
17681
17681
|
def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
|
|
@@ -17698,9 +17698,9 @@ var require_es20183 = __commonJS({
|
|
|
17698
17698
|
var shared_1 = tslib_1.__importStar(require_shared3());
|
|
17699
17699
|
function default_1(fork) {
|
|
17700
17700
|
fork.use(es2017_1.default);
|
|
17701
|
-
var
|
|
17702
|
-
var def =
|
|
17703
|
-
var or =
|
|
17701
|
+
var types13 = fork.use(types_110.default);
|
|
17702
|
+
var def = types13.Type.def;
|
|
17703
|
+
var or = types13.Type.or;
|
|
17704
17704
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
17705
17705
|
def("ForOfStatement").field("await", Boolean, defaults2["false"]);
|
|
17706
17706
|
def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
|
|
@@ -17731,9 +17731,9 @@ var require_es20193 = __commonJS({
|
|
|
17731
17731
|
var shared_1 = tslib_1.__importStar(require_shared3());
|
|
17732
17732
|
function default_1(fork) {
|
|
17733
17733
|
fork.use(es2018_1.default);
|
|
17734
|
-
var
|
|
17735
|
-
var def =
|
|
17736
|
-
var or =
|
|
17734
|
+
var types13 = fork.use(types_110.default);
|
|
17735
|
+
var def = types13.Type.def;
|
|
17736
|
+
var or = types13.Type.or;
|
|
17737
17737
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
17738
17738
|
def("CatchClause").field("param", or(def("Pattern"), null), defaults2["null"]);
|
|
17739
17739
|
}
|
|
@@ -17757,9 +17757,9 @@ var require_es20205 = __commonJS({
|
|
|
17757
17757
|
function default_1(fork) {
|
|
17758
17758
|
fork.use(es2020_1.default);
|
|
17759
17759
|
fork.use(es2019_1.default);
|
|
17760
|
-
var
|
|
17761
|
-
var def =
|
|
17762
|
-
var or =
|
|
17760
|
+
var types13 = fork.use(types_110.default);
|
|
17761
|
+
var def = types13.Type.def;
|
|
17762
|
+
var or = types13.Type.or;
|
|
17763
17763
|
var shared = fork.use(shared_1.default);
|
|
17764
17764
|
var defaults2 = shared.defaults;
|
|
17765
17765
|
def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
|
|
@@ -17809,8 +17809,8 @@ var require_es20223 = __commonJS({
|
|
|
17809
17809
|
var shared_1 = require_shared3();
|
|
17810
17810
|
function default_1(fork) {
|
|
17811
17811
|
fork.use(es2021_1.default);
|
|
17812
|
-
var
|
|
17813
|
-
var def =
|
|
17812
|
+
var types13 = fork.use(types_110.default);
|
|
17813
|
+
var def = types13.Type.def;
|
|
17814
17814
|
def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
|
|
17815
17815
|
}
|
|
17816
17816
|
exports.default = default_1;
|
|
@@ -17831,9 +17831,9 @@ var require_es_proposals3 = __commonJS({
|
|
|
17831
17831
|
var es2022_1 = tslib_1.__importDefault(require_es20223());
|
|
17832
17832
|
function default_1(fork) {
|
|
17833
17833
|
fork.use(es2022_1.default);
|
|
17834
|
-
var
|
|
17835
|
-
var Type =
|
|
17836
|
-
var def =
|
|
17834
|
+
var types13 = fork.use(types_110.default);
|
|
17835
|
+
var Type = types13.Type;
|
|
17836
|
+
var def = types13.Type.def;
|
|
17837
17837
|
var or = Type.or;
|
|
17838
17838
|
var shared = fork.use(shared_1.default);
|
|
17839
17839
|
var defaults2 = shared.defaults;
|
|
@@ -17873,9 +17873,9 @@ var require_jsx3 = __commonJS({
|
|
|
17873
17873
|
var shared_1 = tslib_1.__importStar(require_shared3());
|
|
17874
17874
|
function default_1(fork) {
|
|
17875
17875
|
fork.use(es_proposals_1.default);
|
|
17876
|
-
var
|
|
17877
|
-
var def =
|
|
17878
|
-
var or =
|
|
17876
|
+
var types13 = fork.use(types_110.default);
|
|
17877
|
+
var def = types13.Type.def;
|
|
17878
|
+
var or = types13.Type.or;
|
|
17879
17879
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
17880
17880
|
def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
|
|
17881
17881
|
def("Literal"),
|
|
@@ -17933,9 +17933,9 @@ var require_type_annotations3 = __commonJS({
|
|
|
17933
17933
|
var types_110 = tslib_1.__importDefault(require_types3());
|
|
17934
17934
|
var shared_1 = tslib_1.__importStar(require_shared3());
|
|
17935
17935
|
function default_1(fork) {
|
|
17936
|
-
var
|
|
17937
|
-
var def =
|
|
17938
|
-
var or =
|
|
17936
|
+
var types13 = fork.use(types_110.default);
|
|
17937
|
+
var def = types13.Type.def;
|
|
17938
|
+
var or = types13.Type.or;
|
|
17939
17939
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
17940
17940
|
var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
|
|
17941
17941
|
var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
|
|
@@ -17970,9 +17970,9 @@ var require_flow3 = __commonJS({
|
|
|
17970
17970
|
function default_1(fork) {
|
|
17971
17971
|
fork.use(es_proposals_1.default);
|
|
17972
17972
|
fork.use(type_annotations_1.default);
|
|
17973
|
-
var
|
|
17974
|
-
var def =
|
|
17975
|
-
var or =
|
|
17973
|
+
var types13 = fork.use(types_110.default);
|
|
17974
|
+
var def = types13.Type.def;
|
|
17975
|
+
var or = types13.Type.or;
|
|
17976
17976
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
17977
17977
|
def("Flow").bases("Node");
|
|
17978
17978
|
def("FlowType").bases("Flow");
|
|
@@ -18086,10 +18086,10 @@ var require_esprima5 = __commonJS({
|
|
|
18086
18086
|
var shared_1 = tslib_1.__importStar(require_shared3());
|
|
18087
18087
|
function default_1(fork) {
|
|
18088
18088
|
fork.use(es_proposals_1.default);
|
|
18089
|
-
var
|
|
18089
|
+
var types13 = fork.use(types_110.default);
|
|
18090
18090
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
18091
|
-
var def =
|
|
18092
|
-
var or =
|
|
18091
|
+
var def = types13.Type.def;
|
|
18092
|
+
var or = types13.Type.or;
|
|
18093
18093
|
def("VariableDeclaration").field("declarations", [or(
|
|
18094
18094
|
def("VariableDeclarator"),
|
|
18095
18095
|
def("Identifier")
|
|
@@ -18134,11 +18134,11 @@ var require_babel_core3 = __commonJS({
|
|
|
18134
18134
|
function default_1(fork) {
|
|
18135
18135
|
var _a, _b, _c, _d, _e;
|
|
18136
18136
|
fork.use(es_proposals_1.default);
|
|
18137
|
-
var
|
|
18137
|
+
var types13 = fork.use(types_110.default);
|
|
18138
18138
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
18139
|
-
var def =
|
|
18140
|
-
var or =
|
|
18141
|
-
var isUndefined =
|
|
18139
|
+
var def = types13.Type.def;
|
|
18140
|
+
var or = types13.Type.or;
|
|
18141
|
+
var isUndefined = types13.builtInTypes.undefined;
|
|
18142
18142
|
def("Noop").bases("Statement").build();
|
|
18143
18143
|
def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
|
|
18144
18144
|
def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
|
|
@@ -18163,7 +18163,7 @@ var require_babel_core3 = __commonJS({
|
|
|
18163
18163
|
raw: String
|
|
18164
18164
|
},
|
|
18165
18165
|
function getDefault() {
|
|
18166
|
-
var value2 =
|
|
18166
|
+
var value2 = types13.getFieldValue(this, "value");
|
|
18167
18167
|
return {
|
|
18168
18168
|
rawValue: value2,
|
|
18169
18169
|
raw: toRaw ? toRaw(value2) : String(value2)
|
|
@@ -18266,8 +18266,8 @@ var require_babel3 = __commonJS({
|
|
|
18266
18266
|
var flow_1 = tslib_1.__importDefault(require_flow3());
|
|
18267
18267
|
var shared_1 = require_shared3();
|
|
18268
18268
|
function default_1(fork) {
|
|
18269
|
-
var
|
|
18270
|
-
var def =
|
|
18269
|
+
var types13 = fork.use(types_110.default);
|
|
18270
|
+
var def = types13.Type.def;
|
|
18271
18271
|
fork.use(babel_core_1.default);
|
|
18272
18272
|
fork.use(flow_1.default);
|
|
18273
18273
|
def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
|
|
@@ -18293,12 +18293,12 @@ var require_typescript3 = __commonJS({
|
|
|
18293
18293
|
function default_1(fork) {
|
|
18294
18294
|
fork.use(babel_core_1.default);
|
|
18295
18295
|
fork.use(type_annotations_1.default);
|
|
18296
|
-
var
|
|
18297
|
-
var n2 =
|
|
18298
|
-
var def =
|
|
18299
|
-
var or =
|
|
18296
|
+
var types13 = fork.use(types_110.default);
|
|
18297
|
+
var n2 = types13.namedTypes;
|
|
18298
|
+
var def = types13.Type.def;
|
|
18299
|
+
var or = types13.Type.or;
|
|
18300
18300
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
18301
|
-
var StringLiteral =
|
|
18301
|
+
var StringLiteral = types13.Type.from(function(value2, deep) {
|
|
18302
18302
|
if (n2.StringLiteral && n2.StringLiteral.check(value2, deep)) {
|
|
18303
18303
|
return true;
|
|
18304
18304
|
}
|
|
@@ -18645,34 +18645,34 @@ var require_util4 = __commonJS({
|
|
|
18645
18645
|
}
|
|
18646
18646
|
exports.urlParse = urlParse;
|
|
18647
18647
|
function urlGenerate(aParsedUrl) {
|
|
18648
|
-
var
|
|
18648
|
+
var url2 = "";
|
|
18649
18649
|
if (aParsedUrl.scheme) {
|
|
18650
|
-
|
|
18650
|
+
url2 += aParsedUrl.scheme + ":";
|
|
18651
18651
|
}
|
|
18652
|
-
|
|
18652
|
+
url2 += "//";
|
|
18653
18653
|
if (aParsedUrl.auth) {
|
|
18654
|
-
|
|
18654
|
+
url2 += aParsedUrl.auth + "@";
|
|
18655
18655
|
}
|
|
18656
18656
|
if (aParsedUrl.host) {
|
|
18657
|
-
|
|
18657
|
+
url2 += aParsedUrl.host;
|
|
18658
18658
|
}
|
|
18659
18659
|
if (aParsedUrl.port) {
|
|
18660
|
-
|
|
18660
|
+
url2 += ":" + aParsedUrl.port;
|
|
18661
18661
|
}
|
|
18662
18662
|
if (aParsedUrl.path) {
|
|
18663
|
-
|
|
18663
|
+
url2 += aParsedUrl.path;
|
|
18664
18664
|
}
|
|
18665
|
-
return
|
|
18665
|
+
return url2;
|
|
18666
18666
|
}
|
|
18667
18667
|
exports.urlGenerate = urlGenerate;
|
|
18668
18668
|
function normalize(aPath) {
|
|
18669
18669
|
var path3 = aPath;
|
|
18670
|
-
var
|
|
18671
|
-
if (
|
|
18672
|
-
if (!
|
|
18670
|
+
var url2 = urlParse(aPath);
|
|
18671
|
+
if (url2) {
|
|
18672
|
+
if (!url2.path) {
|
|
18673
18673
|
return aPath;
|
|
18674
18674
|
}
|
|
18675
|
-
path3 =
|
|
18675
|
+
path3 = url2.path;
|
|
18676
18676
|
}
|
|
18677
18677
|
var isAbsolute3 = exports.isAbsolute(path3);
|
|
18678
18678
|
var parts = path3.split(/\/+/);
|
|
@@ -18696,9 +18696,9 @@ var require_util4 = __commonJS({
|
|
|
18696
18696
|
if (path3 === "") {
|
|
18697
18697
|
path3 = isAbsolute3 ? "/" : ".";
|
|
18698
18698
|
}
|
|
18699
|
-
if (
|
|
18700
|
-
|
|
18701
|
-
return urlGenerate(
|
|
18699
|
+
if (url2) {
|
|
18700
|
+
url2.path = path3;
|
|
18701
|
+
return urlGenerate(url2);
|
|
18702
18702
|
}
|
|
18703
18703
|
return path3;
|
|
18704
18704
|
}
|
|
@@ -19776,13 +19776,13 @@ var require_source_map_consumer3 = __commonJS({
|
|
|
19776
19776
|
if (this.sourceRoot != null) {
|
|
19777
19777
|
relativeSource = util2.relative(this.sourceRoot, relativeSource);
|
|
19778
19778
|
}
|
|
19779
|
-
var
|
|
19780
|
-
if (this.sourceRoot != null && (
|
|
19779
|
+
var url2;
|
|
19780
|
+
if (this.sourceRoot != null && (url2 = util2.urlParse(this.sourceRoot))) {
|
|
19781
19781
|
var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
|
|
19782
|
-
if (
|
|
19782
|
+
if (url2.scheme == "file" && this._sources.has(fileUriAbsPath)) {
|
|
19783
19783
|
return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
|
|
19784
19784
|
}
|
|
19785
|
-
if ((!
|
|
19785
|
+
if ((!url2.path || url2.path == "/") && this._sources.has("/" + relativeSource)) {
|
|
19786
19786
|
return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
|
|
19787
19787
|
}
|
|
19788
19788
|
}
|
|
@@ -20274,8 +20274,8 @@ var require_util5 = __commonJS({
|
|
|
20274
20274
|
exports.isTrailingCommaEnabled = exports.getParentExportDeclaration = exports.isExportDeclaration = exports.fixFaultyLocations = exports.getTrueLoc = exports.composeSourceMaps = exports.copyPos = exports.comparePos = exports.getUnionOfKeys = exports.getOption = exports.isBrowser = exports.getLineTerminator = void 0;
|
|
20275
20275
|
var tslib_1 = require_tslib3();
|
|
20276
20276
|
var assert_1 = tslib_1.__importDefault(require("assert"));
|
|
20277
|
-
var
|
|
20278
|
-
var n2 =
|
|
20277
|
+
var types13 = tslib_1.__importStar(require_main4());
|
|
20278
|
+
var n2 = types13.namedTypes;
|
|
20279
20279
|
var source_map_1 = tslib_1.__importDefault(require_source_map3());
|
|
20280
20280
|
var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
|
|
20281
20281
|
var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
|
|
@@ -27593,10 +27593,10 @@ var require_comments3 = __commonJS({
|
|
|
27593
27593
|
exports.printComments = exports.attach = void 0;
|
|
27594
27594
|
var tslib_1 = require_tslib3();
|
|
27595
27595
|
var assert_1 = tslib_1.__importDefault(require("assert"));
|
|
27596
|
-
var
|
|
27597
|
-
var n2 =
|
|
27598
|
-
var isArray2 =
|
|
27599
|
-
var isObject2 =
|
|
27596
|
+
var types13 = tslib_1.__importStar(require_main4());
|
|
27597
|
+
var n2 = types13.namedTypes;
|
|
27598
|
+
var isArray2 = types13.builtInTypes.array;
|
|
27599
|
+
var isObject2 = types13.builtInTypes.object;
|
|
27600
27600
|
var lines_1 = require_lines3();
|
|
27601
27601
|
var util_110 = require_util5();
|
|
27602
27602
|
var childNodesCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -27627,7 +27627,7 @@ var require_comments3 = __commonJS({
|
|
|
27627
27627
|
if (isArray2.check(node2)) {
|
|
27628
27628
|
names = Object.keys(node2);
|
|
27629
27629
|
} else if (isObject2.check(node2)) {
|
|
27630
|
-
names =
|
|
27630
|
+
names = types13.getFieldNames(node2);
|
|
27631
27631
|
} else {
|
|
27632
27632
|
return resultArray;
|
|
27633
27633
|
}
|
|
@@ -27805,7 +27805,7 @@ var require_comments3 = __commonJS({
|
|
|
27805
27805
|
function printComments(path3, print2) {
|
|
27806
27806
|
var value2 = path3.getValue();
|
|
27807
27807
|
var innerLines = print2(path3);
|
|
27808
|
-
var comments = n2.Node.check(value2) &&
|
|
27808
|
+
var comments = n2.Node.check(value2) && types13.getFieldValue(value2, "comments");
|
|
27809
27809
|
if (!comments || comments.length === 0) {
|
|
27810
27810
|
return innerLines;
|
|
27811
27811
|
}
|
|
@@ -27813,8 +27813,8 @@ var require_comments3 = __commonJS({
|
|
|
27813
27813
|
var trailingParts = [innerLines];
|
|
27814
27814
|
path3.each(function(commentPath) {
|
|
27815
27815
|
var comment = commentPath.getValue();
|
|
27816
|
-
var leading =
|
|
27817
|
-
var trailing =
|
|
27816
|
+
var leading = types13.getFieldValue(comment, "leading");
|
|
27817
|
+
var trailing = types13.getFieldValue(comment, "trailing");
|
|
27818
27818
|
if (leading || trailing && !(n2.Statement.check(value2) || comment.type === "Block" || comment.type === "CommentBlock")) {
|
|
27819
27819
|
leadingParts.push(printLeadingComment(commentPath, print2));
|
|
27820
27820
|
} else if (trailing) {
|
|
@@ -27836,10 +27836,10 @@ var require_parser5 = __commonJS({
|
|
|
27836
27836
|
exports.parse = void 0;
|
|
27837
27837
|
var tslib_1 = require_tslib3();
|
|
27838
27838
|
var assert_1 = tslib_1.__importDefault(require("assert"));
|
|
27839
|
-
var
|
|
27840
|
-
var b =
|
|
27841
|
-
var isObject2 =
|
|
27842
|
-
var isArray2 =
|
|
27839
|
+
var types13 = tslib_1.__importStar(require_main4());
|
|
27840
|
+
var b = types13.builders;
|
|
27841
|
+
var isObject2 = types13.builtInTypes.object;
|
|
27842
|
+
var isArray2 = types13.builtInTypes.array;
|
|
27843
27843
|
var options_1 = require_options3();
|
|
27844
27844
|
var lines_1 = require_lines3();
|
|
27845
27845
|
var comments_1 = require_comments3();
|
|
@@ -28025,11 +28025,11 @@ var require_fast_path3 = __commonJS({
|
|
|
28025
28025
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28026
28026
|
var tslib_1 = require_tslib3();
|
|
28027
28027
|
var assert_1 = tslib_1.__importDefault(require("assert"));
|
|
28028
|
-
var
|
|
28028
|
+
var types13 = tslib_1.__importStar(require_main4());
|
|
28029
28029
|
var util2 = tslib_1.__importStar(require_util5());
|
|
28030
|
-
var n2 =
|
|
28031
|
-
var isArray2 =
|
|
28032
|
-
var isNumber2 =
|
|
28030
|
+
var n2 = types13.namedTypes;
|
|
28031
|
+
var isArray2 = types13.builtInTypes.array;
|
|
28032
|
+
var isNumber2 = types13.builtInTypes.number;
|
|
28033
28033
|
var PRECEDENCE = {};
|
|
28034
28034
|
[
|
|
28035
28035
|
["??"],
|
|
@@ -28058,7 +28058,7 @@ var require_fast_path3 = __commonJS({
|
|
|
28058
28058
|
if (obj instanceof FastPath) {
|
|
28059
28059
|
return obj.copy();
|
|
28060
28060
|
}
|
|
28061
|
-
if (obj instanceof
|
|
28061
|
+
if (obj instanceof types13.NodePath) {
|
|
28062
28062
|
var copy = Object.create(FastPath.prototype);
|
|
28063
28063
|
var stack = [obj.value];
|
|
28064
28064
|
for (var pp2 = void 0; pp2 = obj.parentPath; obj = pp2)
|
|
@@ -28369,7 +28369,7 @@ var require_fast_path3 = __commonJS({
|
|
|
28369
28369
|
return node2.some(containsCallExpression);
|
|
28370
28370
|
}
|
|
28371
28371
|
if (n2.Node.check(node2)) {
|
|
28372
|
-
return
|
|
28372
|
+
return types13.someField(node2, function(_name, child) {
|
|
28373
28373
|
return containsCallExpression(child);
|
|
28374
28374
|
});
|
|
28375
28375
|
}
|
|
@@ -28459,16 +28459,16 @@ var require_patcher3 = __commonJS({
|
|
|
28459
28459
|
var tslib_1 = require_tslib3();
|
|
28460
28460
|
var assert_1 = tslib_1.__importDefault(require("assert"));
|
|
28461
28461
|
var linesModule = tslib_1.__importStar(require_lines3());
|
|
28462
|
-
var
|
|
28463
|
-
var Printable =
|
|
28464
|
-
var Expression =
|
|
28465
|
-
var ReturnStatement =
|
|
28466
|
-
var SourceLocation3 =
|
|
28462
|
+
var types13 = tslib_1.__importStar(require_main4());
|
|
28463
|
+
var Printable = types13.namedTypes.Printable;
|
|
28464
|
+
var Expression = types13.namedTypes.Expression;
|
|
28465
|
+
var ReturnStatement = types13.namedTypes.ReturnStatement;
|
|
28466
|
+
var SourceLocation3 = types13.namedTypes.SourceLocation;
|
|
28467
28467
|
var util_110 = require_util5();
|
|
28468
28468
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path3());
|
|
28469
|
-
var isObject2 =
|
|
28470
|
-
var isArray2 =
|
|
28471
|
-
var isString3 =
|
|
28469
|
+
var isObject2 = types13.builtInTypes.object;
|
|
28470
|
+
var isArray2 = types13.builtInTypes.array;
|
|
28471
|
+
var isString3 = types13.builtInTypes.string;
|
|
28472
28472
|
var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
|
|
28473
28473
|
var Patcher = function Patcher2(lines) {
|
|
28474
28474
|
assert_1.default.ok(this instanceof Patcher2);
|
|
@@ -28738,8 +28738,8 @@ var require_patcher3 = __commonJS({
|
|
|
28738
28738
|
if (k.charAt(0) === "_") {
|
|
28739
28739
|
continue;
|
|
28740
28740
|
}
|
|
28741
|
-
newPath.stack.push(k,
|
|
28742
|
-
oldPath.stack.push(k,
|
|
28741
|
+
newPath.stack.push(k, types13.getFieldValue(newNode, k));
|
|
28742
|
+
oldPath.stack.push(k, types13.getFieldValue(oldNode, k));
|
|
28743
28743
|
var canReprint = findAnyReprints(newPath, oldPath, reprints);
|
|
28744
28744
|
newPath.stack.length -= 2;
|
|
28745
28745
|
oldPath.stack.length -= 2;
|
|
@@ -28763,16 +28763,16 @@ var require_printer5 = __commonJS({
|
|
|
28763
28763
|
exports.Printer = void 0;
|
|
28764
28764
|
var tslib_1 = require_tslib3();
|
|
28765
28765
|
var assert_1 = tslib_1.__importDefault(require("assert"));
|
|
28766
|
-
var
|
|
28766
|
+
var types13 = tslib_1.__importStar(require_main4());
|
|
28767
28767
|
var comments_1 = require_comments3();
|
|
28768
28768
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path3());
|
|
28769
28769
|
var lines_1 = require_lines3();
|
|
28770
28770
|
var options_1 = require_options3();
|
|
28771
28771
|
var patcher_1 = require_patcher3();
|
|
28772
28772
|
var util2 = tslib_1.__importStar(require_util5());
|
|
28773
|
-
var namedTypes =
|
|
28774
|
-
var isString3 =
|
|
28775
|
-
var isObject2 =
|
|
28773
|
+
var namedTypes = types13.namedTypes;
|
|
28774
|
+
var isString3 = types13.builtInTypes.string;
|
|
28775
|
+
var isObject2 = types13.builtInTypes.object;
|
|
28776
28776
|
var PrintResult = function PrintResult2(code, sourceMap) {
|
|
28777
28777
|
assert_1.default.ok(this instanceof PrintResult2);
|
|
28778
28778
|
isString3.assert(code);
|
|
@@ -28934,7 +28934,7 @@ var require_printer5 = __commonJS({
|
|
|
28934
28934
|
case "OptionalMemberExpression": {
|
|
28935
28935
|
parts.push(path3.call(print2, "object"));
|
|
28936
28936
|
var property = path3.call(print2, "property");
|
|
28937
|
-
var optional =
|
|
28937
|
+
var optional = types13.getFieldValue(n2, "optional");
|
|
28938
28938
|
if (n2.computed) {
|
|
28939
28939
|
parts.push(optional ? "?.[" : "[", property, "]");
|
|
28940
28940
|
} else {
|
|
@@ -29205,7 +29205,7 @@ var require_printer5 = __commonJS({
|
|
|
29205
29205
|
if (n2.typeArguments) {
|
|
29206
29206
|
parts.push(path3.call(print2, "typeArguments"));
|
|
29207
29207
|
}
|
|
29208
|
-
if (
|
|
29208
|
+
if (types13.getFieldValue(n2, "optional")) {
|
|
29209
29209
|
parts.push("?.");
|
|
29210
29210
|
}
|
|
29211
29211
|
parts.push(printArgumentsList(path3, options, print2));
|
|
@@ -30884,8 +30884,8 @@ var require_printer5 = __commonJS({
|
|
|
30884
30884
|
});
|
|
30885
30885
|
}
|
|
30886
30886
|
function getPossibleRaw(node2) {
|
|
30887
|
-
var value2 =
|
|
30888
|
-
var extra =
|
|
30887
|
+
var value2 = types13.getFieldValue(node2, "value");
|
|
30888
|
+
var extra = types13.getFieldValue(node2, "extra");
|
|
30889
30889
|
if (extra && typeof extra.raw === "string" && value2 == extra.rawValue) {
|
|
30890
30890
|
return extra.raw;
|
|
30891
30891
|
}
|
|
@@ -30933,8 +30933,8 @@ var require_main5 = __commonJS({
|
|
|
30933
30933
|
exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
|
|
30934
30934
|
var tslib_1 = require_tslib3();
|
|
30935
30935
|
var fs_1 = tslib_1.__importDefault(require("fs"));
|
|
30936
|
-
var
|
|
30937
|
-
exports.types =
|
|
30936
|
+
var types13 = tslib_1.__importStar(require_main4());
|
|
30937
|
+
exports.types = types13;
|
|
30938
30938
|
var parser_1 = require_parser5();
|
|
30939
30939
|
Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
|
|
30940
30940
|
return parser_1.parse;
|
|
@@ -30948,10 +30948,10 @@ var require_main5 = __commonJS({
|
|
|
30948
30948
|
return new printer_1.Printer(options).print(node2);
|
|
30949
30949
|
}
|
|
30950
30950
|
exports.print = print2;
|
|
30951
|
-
function
|
|
30951
|
+
function prettyPrint2(node2, options) {
|
|
30952
30952
|
return new printer_1.Printer(options).printGenerically(node2);
|
|
30953
30953
|
}
|
|
30954
|
-
exports.prettyPrint =
|
|
30954
|
+
exports.prettyPrint = prettyPrint2;
|
|
30955
30955
|
function run(transformer, options) {
|
|
30956
30956
|
return runFile(process.argv[2], transformer, options);
|
|
30957
30957
|
}
|
|
@@ -43495,8 +43495,8 @@ var require_printSchema = __commonJS2({
|
|
|
43495
43495
|
if (scalar.specifiedByUrl == null) {
|
|
43496
43496
|
return "";
|
|
43497
43497
|
}
|
|
43498
|
-
var
|
|
43499
|
-
var urlAST = (0, _astFromValue.astFromValue)(
|
|
43498
|
+
var url2 = scalar.specifiedByUrl;
|
|
43499
|
+
var urlAST = (0, _astFromValue.astFromValue)(url2, _scalars.GraphQLString);
|
|
43500
43500
|
urlAST || (0, _invariant.default)(0, "Unexpected null value returned from `astFromValue` for specifiedByUrl");
|
|
43501
43501
|
return " @specifiedBy(url: " + (0, _printer.print)(urlAST) + ")";
|
|
43502
43502
|
}
|
|
@@ -51887,11 +51887,11 @@ var require_volume = __commonJS2({
|
|
|
51887
51887
|
var getStatOptsAndCb = function(options, callback) {
|
|
51888
51888
|
return typeof options === "function" ? [getStatOptions(), options] : [getStatOptions(options), validateCallback(callback)];
|
|
51889
51889
|
};
|
|
51890
|
-
function getPathFromURLPosix(
|
|
51891
|
-
if (
|
|
51890
|
+
function getPathFromURLPosix(url2) {
|
|
51891
|
+
if (url2.hostname !== "") {
|
|
51892
51892
|
throw new errors.TypeError("ERR_INVALID_FILE_URL_HOST", process_1.default.platform);
|
|
51893
51893
|
}
|
|
51894
|
-
var pathname =
|
|
51894
|
+
var pathname = url2.pathname;
|
|
51895
51895
|
for (var n2 = 0; n2 < pathname.length; n2++) {
|
|
51896
51896
|
if (pathname[n2] === "%") {
|
|
51897
51897
|
var third = pathname.codePointAt(n2 + 2) | 32;
|
|
@@ -76586,34 +76586,34 @@ var require_util = __commonJS2({
|
|
|
76586
76586
|
}
|
|
76587
76587
|
exports.urlParse = urlParse;
|
|
76588
76588
|
function urlGenerate(aParsedUrl) {
|
|
76589
|
-
var
|
|
76589
|
+
var url2 = "";
|
|
76590
76590
|
if (aParsedUrl.scheme) {
|
|
76591
|
-
|
|
76591
|
+
url2 += aParsedUrl.scheme + ":";
|
|
76592
76592
|
}
|
|
76593
|
-
|
|
76593
|
+
url2 += "//";
|
|
76594
76594
|
if (aParsedUrl.auth) {
|
|
76595
|
-
|
|
76595
|
+
url2 += aParsedUrl.auth + "@";
|
|
76596
76596
|
}
|
|
76597
76597
|
if (aParsedUrl.host) {
|
|
76598
|
-
|
|
76598
|
+
url2 += aParsedUrl.host;
|
|
76599
76599
|
}
|
|
76600
76600
|
if (aParsedUrl.port) {
|
|
76601
|
-
|
|
76601
|
+
url2 += ":" + aParsedUrl.port;
|
|
76602
76602
|
}
|
|
76603
76603
|
if (aParsedUrl.path) {
|
|
76604
|
-
|
|
76604
|
+
url2 += aParsedUrl.path;
|
|
76605
76605
|
}
|
|
76606
|
-
return
|
|
76606
|
+
return url2;
|
|
76607
76607
|
}
|
|
76608
76608
|
exports.urlGenerate = urlGenerate;
|
|
76609
76609
|
function normalize(aPath) {
|
|
76610
76610
|
var path22 = aPath;
|
|
76611
|
-
var
|
|
76612
|
-
if (
|
|
76613
|
-
if (!
|
|
76611
|
+
var url2 = urlParse(aPath);
|
|
76612
|
+
if (url2) {
|
|
76613
|
+
if (!url2.path) {
|
|
76614
76614
|
return aPath;
|
|
76615
76615
|
}
|
|
76616
|
-
path22 =
|
|
76616
|
+
path22 = url2.path;
|
|
76617
76617
|
}
|
|
76618
76618
|
var isAbsolute22 = exports.isAbsolute(path22);
|
|
76619
76619
|
var parts = path22.split(/\/+/);
|
|
@@ -76637,9 +76637,9 @@ var require_util = __commonJS2({
|
|
|
76637
76637
|
if (path22 === "") {
|
|
76638
76638
|
path22 = isAbsolute22 ? "/" : ".";
|
|
76639
76639
|
}
|
|
76640
|
-
if (
|
|
76641
|
-
|
|
76642
|
-
return urlGenerate(
|
|
76640
|
+
if (url2) {
|
|
76641
|
+
url2.path = path22;
|
|
76642
|
+
return urlGenerate(url2);
|
|
76643
76643
|
}
|
|
76644
76644
|
return path22;
|
|
76645
76645
|
}
|
|
@@ -77705,13 +77705,13 @@ var require_source_map_consumer = __commonJS2({
|
|
|
77705
77705
|
if (this.sourceRoot != null) {
|
|
77706
77706
|
relativeSource = util2.relative(this.sourceRoot, relativeSource);
|
|
77707
77707
|
}
|
|
77708
|
-
var
|
|
77709
|
-
if (this.sourceRoot != null && (
|
|
77708
|
+
var url2;
|
|
77709
|
+
if (this.sourceRoot != null && (url2 = util2.urlParse(this.sourceRoot))) {
|
|
77710
77710
|
var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
|
|
77711
|
-
if (
|
|
77711
|
+
if (url2.scheme == "file" && this._sources.has(fileUriAbsPath)) {
|
|
77712
77712
|
return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
|
|
77713
77713
|
}
|
|
77714
|
-
if ((!
|
|
77714
|
+
if ((!url2.path || url2.path == "/") && this._sources.has("/" + relativeSource)) {
|
|
77715
77715
|
return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
|
|
77716
77716
|
}
|
|
77717
77717
|
}
|
|
@@ -88849,10 +88849,10 @@ var require_main2 = __commonJS2({
|
|
|
88849
88849
|
return new printer_1.Printer(options).print(node2);
|
|
88850
88850
|
}
|
|
88851
88851
|
exports.print = print5;
|
|
88852
|
-
function
|
|
88852
|
+
function prettyPrint2(node2, options) {
|
|
88853
88853
|
return new printer_1.Printer(options).printGenerically(node2);
|
|
88854
88854
|
}
|
|
88855
|
-
exports.prettyPrint =
|
|
88855
|
+
exports.prettyPrint = prettyPrint2;
|
|
88856
88856
|
function run(transformer, options) {
|
|
88857
88857
|
return runFile(process.argv[2], transformer, options);
|
|
88858
88858
|
}
|
|
@@ -89674,6 +89674,44 @@ var ListCollection = class {
|
|
|
89674
89674
|
}
|
|
89675
89675
|
}
|
|
89676
89676
|
};
|
|
89677
|
+
var SchemaManager = class {
|
|
89678
|
+
cache;
|
|
89679
|
+
fieldTypes = {};
|
|
89680
|
+
constructor(cache) {
|
|
89681
|
+
this.cache = cache;
|
|
89682
|
+
}
|
|
89683
|
+
setFieldType({
|
|
89684
|
+
parent,
|
|
89685
|
+
key,
|
|
89686
|
+
type,
|
|
89687
|
+
nullable = false,
|
|
89688
|
+
link
|
|
89689
|
+
}) {
|
|
89690
|
+
let parensIndex = key.indexOf("(");
|
|
89691
|
+
if (parensIndex !== -1) {
|
|
89692
|
+
key = key.substring(0, parensIndex);
|
|
89693
|
+
}
|
|
89694
|
+
if (parent === rootID) {
|
|
89695
|
+
parent = "Query";
|
|
89696
|
+
} else if (parent.includes(":")) {
|
|
89697
|
+
parent = parent.substring(0, parent.indexOf(":"));
|
|
89698
|
+
}
|
|
89699
|
+
if (!this.fieldTypes[parent]) {
|
|
89700
|
+
this.fieldTypes[parent] = {};
|
|
89701
|
+
}
|
|
89702
|
+
this.fieldTypes[parent][key] = {
|
|
89703
|
+
type,
|
|
89704
|
+
nullable,
|
|
89705
|
+
link: !!link
|
|
89706
|
+
};
|
|
89707
|
+
}
|
|
89708
|
+
fieldType(type, field) {
|
|
89709
|
+
return this.fieldTypes[type]?.[field] || null;
|
|
89710
|
+
}
|
|
89711
|
+
get config() {
|
|
89712
|
+
return this.cache._internal_unstable.config;
|
|
89713
|
+
}
|
|
89714
|
+
};
|
|
89677
89715
|
var InMemoryStorage = class {
|
|
89678
89716
|
data;
|
|
89679
89717
|
idCount = 0;
|
|
@@ -90236,7 +90274,7 @@ var InMemorySubscriptions = class {
|
|
|
90236
90274
|
}
|
|
90237
90275
|
}
|
|
90238
90276
|
};
|
|
90239
|
-
var
|
|
90277
|
+
var Cache3 = class {
|
|
90240
90278
|
_internal_unstable;
|
|
90241
90279
|
constructor(config4) {
|
|
90242
90280
|
this._internal_unstable = new CacheInternal({
|
|
@@ -90244,7 +90282,8 @@ var Cache2 = class {
|
|
|
90244
90282
|
storage: new InMemoryStorage(),
|
|
90245
90283
|
subscriptions: new InMemorySubscriptions(this),
|
|
90246
90284
|
lists: new ListManager(this, rootID),
|
|
90247
|
-
lifetimes: new GarbageCollector(this)
|
|
90285
|
+
lifetimes: new GarbageCollector(this),
|
|
90286
|
+
schema: new SchemaManager(this)
|
|
90248
90287
|
});
|
|
90249
90288
|
if (config4) {
|
|
90250
90289
|
this.setConfig(defaultConfigValues(config4));
|
|
@@ -90330,18 +90369,21 @@ var CacheInternal = class {
|
|
|
90330
90369
|
lists;
|
|
90331
90370
|
cache;
|
|
90332
90371
|
lifetimes;
|
|
90372
|
+
schema;
|
|
90333
90373
|
constructor({
|
|
90334
90374
|
storage,
|
|
90335
90375
|
subscriptions,
|
|
90336
90376
|
lists,
|
|
90337
90377
|
cache,
|
|
90338
|
-
lifetimes
|
|
90378
|
+
lifetimes,
|
|
90379
|
+
schema
|
|
90339
90380
|
}) {
|
|
90340
90381
|
this.storage = storage;
|
|
90341
90382
|
this.subscriptions = subscriptions;
|
|
90342
90383
|
this.lists = lists;
|
|
90343
90384
|
this.cache = cache;
|
|
90344
90385
|
this.lifetimes = lifetimes;
|
|
90386
|
+
this.schema = schema;
|
|
90345
90387
|
this._disabled = typeof globalThis.window === "undefined";
|
|
90346
90388
|
try {
|
|
90347
90389
|
if (process.env.HOUDINI_TEST === "true") {
|
|
@@ -90357,7 +90399,6 @@ var CacheInternal = class {
|
|
|
90357
90399
|
data: data2,
|
|
90358
90400
|
selection,
|
|
90359
90401
|
variables = {},
|
|
90360
|
-
root = rootID,
|
|
90361
90402
|
parent = rootID,
|
|
90362
90403
|
applyUpdates = false,
|
|
90363
90404
|
layer,
|
|
@@ -90380,9 +90421,17 @@ var CacheInternal = class {
|
|
|
90380
90421
|
selection: fieldSelection,
|
|
90381
90422
|
operations,
|
|
90382
90423
|
abstract: isAbstract,
|
|
90383
|
-
update
|
|
90424
|
+
update,
|
|
90425
|
+
nullable
|
|
90384
90426
|
} = targetSelection[field];
|
|
90385
90427
|
const key = evaluateKey(keyRaw, variables);
|
|
90428
|
+
this.schema.setFieldType({
|
|
90429
|
+
parent,
|
|
90430
|
+
key: keyRaw,
|
|
90431
|
+
type: linkedType,
|
|
90432
|
+
nullable,
|
|
90433
|
+
link: !!fieldSelection
|
|
90434
|
+
});
|
|
90386
90435
|
const currentSubscribers = this.subscriptions.get(parent, key);
|
|
90387
90436
|
const { value: previousValue, displayLayers } = this.storage.get(parent, key);
|
|
90388
90437
|
const displayLayer = layer.isDisplayLayer(displayLayers);
|
|
@@ -90451,7 +90500,6 @@ var CacheInternal = class {
|
|
|
90451
90500
|
}
|
|
90452
90501
|
if (linkedID) {
|
|
90453
90502
|
this.writeSelection({
|
|
90454
|
-
root,
|
|
90455
90503
|
selection: fieldSelection,
|
|
90456
90504
|
parent: linkedID,
|
|
90457
90505
|
data: value2,
|
|
@@ -90840,7 +90888,7 @@ var CacheInternal = class {
|
|
|
90840
90888
|
}
|
|
90841
90889
|
};
|
|
90842
90890
|
var rootID = "_ROOT_";
|
|
90843
|
-
var cache_default = new
|
|
90891
|
+
var cache_default = new Cache3();
|
|
90844
90892
|
var ArtifactKind = /* @__PURE__ */ ((ArtifactKind2) => {
|
|
90845
90893
|
ArtifactKind2["Query"] = "HoudiniQuery";
|
|
90846
90894
|
ArtifactKind2["Subscription"] = "HoudiniSubscription";
|
|
@@ -91022,6 +91070,7 @@ async function writeFile(filepath, data2) {
|
|
|
91022
91070
|
return;
|
|
91023
91071
|
}
|
|
91024
91072
|
if (houdini_mode.is_testing) {
|
|
91073
|
+
import_memfs.fs.mkdirpSync(dirname(filepath));
|
|
91025
91074
|
return import_memfs.fs.writeFileSync(filepath, data2);
|
|
91026
91075
|
}
|
|
91027
91076
|
return await import_promises.default.writeFile(filepath, data2, "utf8");
|
|
@@ -91580,13 +91629,13 @@ var Response2 = class extends Body {
|
|
|
91580
91629
|
highWaterMark: this.highWaterMark
|
|
91581
91630
|
});
|
|
91582
91631
|
}
|
|
91583
|
-
static redirect(
|
|
91632
|
+
static redirect(url2, status = 302) {
|
|
91584
91633
|
if (!isRedirect(status)) {
|
|
91585
91634
|
throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');
|
|
91586
91635
|
}
|
|
91587
91636
|
return new Response2(null, {
|
|
91588
91637
|
headers: {
|
|
91589
|
-
location: new URL(
|
|
91638
|
+
location: new URL(url2).toString()
|
|
91590
91639
|
},
|
|
91591
91640
|
status
|
|
91592
91641
|
});
|
|
@@ -91809,6 +91858,33 @@ async function parseJS(str) {
|
|
|
91809
91858
|
}
|
|
91810
91859
|
var recast = __toESM2(require_main2(), 1);
|
|
91811
91860
|
var AST = recast.types.builders;
|
|
91861
|
+
function ensureImports({
|
|
91862
|
+
config: config4,
|
|
91863
|
+
body,
|
|
91864
|
+
import: importID,
|
|
91865
|
+
sourceModule,
|
|
91866
|
+
importKind
|
|
91867
|
+
}) {
|
|
91868
|
+
const idList = Array.isArray(importID) ? importID : [importID];
|
|
91869
|
+
const toImport = idList.filter(
|
|
91870
|
+
(identifier) => !body.find(
|
|
91871
|
+
(statement) => statement.type === "ImportDeclaration" && statement.specifiers.find(
|
|
91872
|
+
(importSpecifier) => importSpecifier.type === "ImportSpecifier" && importSpecifier.imported.type === "Identifier" && importSpecifier.imported.name === identifier && importSpecifier.local.name === identifier || importSpecifier.type === "ImportDefaultSpecifier" && importSpecifier.local.type === "Identifier" && importSpecifier.local.name === identifier
|
|
91873
|
+
)
|
|
91874
|
+
)
|
|
91875
|
+
);
|
|
91876
|
+
if (toImport.length > 0) {
|
|
91877
|
+
body.unshift({
|
|
91878
|
+
type: "ImportDeclaration",
|
|
91879
|
+
source: AST.stringLiteral(sourceModule),
|
|
91880
|
+
specifiers: toImport.map(
|
|
91881
|
+
(identifier) => !Array.isArray(importID) ? AST.importDefaultSpecifier(AST.identifier(identifier)) : AST.importSpecifier(AST.identifier(identifier), AST.identifier(identifier))
|
|
91882
|
+
),
|
|
91883
|
+
importKind
|
|
91884
|
+
});
|
|
91885
|
+
}
|
|
91886
|
+
return Array.isArray(importID) ? toImport : toImport[0];
|
|
91887
|
+
}
|
|
91812
91888
|
async function cleanupFiles(pathFolder, listOfObj) {
|
|
91813
91889
|
const listFile = await readdir(pathFolder);
|
|
91814
91890
|
const storeListFile = listFile.filter((c2) => c2.endsWith(".js") && c2 !== "index.js").map((c2) => c2.slice(0, -3)).sort();
|
|
@@ -91931,53 +92007,79 @@ var graphql4 = __toESM2(require_graphql2(), 1);
|
|
|
91931
92007
|
async function find_graphql(config4, parsedScript, walker) {
|
|
91932
92008
|
await asyncWalk(parsedScript, {
|
|
91933
92009
|
async enter(node2, parent) {
|
|
91934
|
-
if (node2.type
|
|
92010
|
+
if (node2.type !== "TaggedTemplateExpression" && node2.type !== "CallExpression") {
|
|
92011
|
+
return;
|
|
92012
|
+
}
|
|
92013
|
+
let documentString;
|
|
92014
|
+
if (node2.type === "TaggedTemplateExpression") {
|
|
91935
92015
|
const expr = node2;
|
|
91936
|
-
|
|
91937
|
-
const parsedTag = graphql4.parse(tagContent);
|
|
91938
|
-
if (walker.where && !walker.where(parsedTag)) {
|
|
92016
|
+
if (expr.tag.type !== "Identifier" || expr.tag.name !== "graphql") {
|
|
91939
92017
|
return;
|
|
91940
92018
|
}
|
|
91941
|
-
|
|
91942
|
-
|
|
91943
|
-
|
|
91944
|
-
|
|
92019
|
+
documentString = expr.quasi.quasis[0].value.raw;
|
|
92020
|
+
} else if (node2.type === "CallExpression") {
|
|
92021
|
+
const expr = node2;
|
|
92022
|
+
if (expr.callee.type !== "Identifier" || expr.callee.name !== "graphql" || expr.arguments.length !== 1) {
|
|
92023
|
+
return;
|
|
91945
92024
|
}
|
|
91946
|
-
|
|
91947
|
-
if (
|
|
91948
|
-
|
|
92025
|
+
const argument = expr.arguments[0];
|
|
92026
|
+
if (argument.type === "TemplateLiteral") {
|
|
92027
|
+
documentString = argument.quasis[0].value.raw;
|
|
92028
|
+
} else if (argument.type === "StringLiteral") {
|
|
92029
|
+
documentString = argument.value;
|
|
91949
92030
|
} else {
|
|
91950
|
-
|
|
91951
|
-
|
|
91952
|
-
|
|
91953
|
-
|
|
91954
|
-
|
|
91955
|
-
|
|
91956
|
-
|
|
92031
|
+
return;
|
|
92032
|
+
}
|
|
92033
|
+
} else {
|
|
92034
|
+
return;
|
|
92035
|
+
}
|
|
92036
|
+
const parsedTag = graphql4.parse(documentString);
|
|
92037
|
+
if (walker.where && !walker.where(parsedTag)) {
|
|
92038
|
+
return;
|
|
92039
|
+
}
|
|
92040
|
+
const definition = config4.extractDefinition(parsedTag);
|
|
92041
|
+
const name2 = definition.name?.value;
|
|
92042
|
+
if (!name2) {
|
|
92043
|
+
throw new Error("Could not find definition name");
|
|
92044
|
+
}
|
|
92045
|
+
let kind;
|
|
92046
|
+
if (definition.kind === "FragmentDefinition") {
|
|
92047
|
+
kind = CompiledFragmentKind;
|
|
92048
|
+
} else {
|
|
92049
|
+
if (definition.operation === "query") {
|
|
92050
|
+
kind = CompiledQueryKind;
|
|
92051
|
+
} else if (definition.operation === "mutation") {
|
|
92052
|
+
kind = CompiledMutationKind;
|
|
92053
|
+
} else {
|
|
92054
|
+
kind = CompiledSubscriptionKind;
|
|
91957
92055
|
}
|
|
91958
|
-
walker.dependency?.(config4.artifactPath(parsedTag));
|
|
91959
|
-
await walker.tag({
|
|
91960
|
-
parsedDocument: parsedTag,
|
|
91961
|
-
node: {
|
|
91962
|
-
...node2,
|
|
91963
|
-
...this,
|
|
91964
|
-
remove: this.remove,
|
|
91965
|
-
replaceWith: this.replace
|
|
91966
|
-
},
|
|
91967
|
-
artifact: {
|
|
91968
|
-
name: name2,
|
|
91969
|
-
kind
|
|
91970
|
-
},
|
|
91971
|
-
parent,
|
|
91972
|
-
tagContent
|
|
91973
|
-
});
|
|
91974
92056
|
}
|
|
92057
|
+
walker.dependency?.(config4.artifactPath(parsedTag));
|
|
92058
|
+
await walker.tag({
|
|
92059
|
+
parsedDocument: parsedTag,
|
|
92060
|
+
node: {
|
|
92061
|
+
...node2,
|
|
92062
|
+
...this,
|
|
92063
|
+
remove: this.remove,
|
|
92064
|
+
replaceWith: this.replace
|
|
92065
|
+
},
|
|
92066
|
+
artifact: {
|
|
92067
|
+
name: name2,
|
|
92068
|
+
kind
|
|
92069
|
+
},
|
|
92070
|
+
parent,
|
|
92071
|
+
tagContent: documentString
|
|
92072
|
+
});
|
|
91975
92073
|
}
|
|
91976
92074
|
});
|
|
91977
92075
|
}
|
|
91978
92076
|
|
|
92077
|
+
// src/plugin/index.ts
|
|
92078
|
+
var url = __toESM(require("url"), 1);
|
|
92079
|
+
var import_vite8 = require("vite");
|
|
92080
|
+
|
|
91979
92081
|
// src/plugin/kit.ts
|
|
91980
|
-
var
|
|
92082
|
+
var graphql31 = __toESM(require_graphql4(), 1);
|
|
91981
92083
|
|
|
91982
92084
|
// ../houdini/build/vite-esm/index.js
|
|
91983
92085
|
var import_module2 = require("module");
|
|
@@ -96615,7 +96717,7 @@ var require_kinds3 = __commonJS3({
|
|
|
96615
96717
|
value: true
|
|
96616
96718
|
});
|
|
96617
96719
|
exports.Kind = void 0;
|
|
96618
|
-
var
|
|
96720
|
+
var Kind30 = Object.freeze({
|
|
96619
96721
|
NAME: "Name",
|
|
96620
96722
|
DOCUMENT: "Document",
|
|
96621
96723
|
OPERATION_DEFINITION: "OperationDefinition",
|
|
@@ -96660,7 +96762,7 @@ var require_kinds3 = __commonJS3({
|
|
|
96660
96762
|
ENUM_TYPE_EXTENSION: "EnumTypeExtension",
|
|
96661
96763
|
INPUT_OBJECT_TYPE_EXTENSION: "InputObjectTypeExtension"
|
|
96662
96764
|
});
|
|
96663
|
-
exports.Kind =
|
|
96765
|
+
exports.Kind = Kind30;
|
|
96664
96766
|
}
|
|
96665
96767
|
});
|
|
96666
96768
|
var require_invariant3 = __commonJS3({
|
|
@@ -98032,12 +98134,12 @@ var require_parser4 = __commonJS3({
|
|
|
98032
98134
|
return [];
|
|
98033
98135
|
}
|
|
98034
98136
|
if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {
|
|
98035
|
-
var
|
|
98137
|
+
var types17 = [];
|
|
98036
98138
|
this.expectOptionalToken(_tokenKind.TokenKind.AMP);
|
|
98037
98139
|
do {
|
|
98038
|
-
|
|
98140
|
+
types17.push(this.parseNamedType());
|
|
98039
98141
|
} while (this.expectOptionalToken(_tokenKind.TokenKind.AMP) || this.peek(_tokenKind.TokenKind.NAME));
|
|
98040
|
-
return
|
|
98142
|
+
return types17;
|
|
98041
98143
|
}
|
|
98042
98144
|
return this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType);
|
|
98043
98145
|
};
|
|
@@ -98116,13 +98218,13 @@ var require_parser4 = __commonJS3({
|
|
|
98116
98218
|
this.expectKeyword("union");
|
|
98117
98219
|
var name2 = this.parseName();
|
|
98118
98220
|
var directives = this.parseDirectives(true);
|
|
98119
|
-
var
|
|
98221
|
+
var types17 = this.parseUnionMemberTypes();
|
|
98120
98222
|
return {
|
|
98121
98223
|
kind: _kinds.Kind.UNION_TYPE_DEFINITION,
|
|
98122
98224
|
description,
|
|
98123
98225
|
name: name2,
|
|
98124
98226
|
directives,
|
|
98125
|
-
types:
|
|
98227
|
+
types: types17,
|
|
98126
98228
|
loc: this.loc(start)
|
|
98127
98229
|
};
|
|
98128
98230
|
};
|
|
@@ -98280,15 +98382,15 @@ var require_parser4 = __commonJS3({
|
|
|
98280
98382
|
this.expectKeyword("union");
|
|
98281
98383
|
var name2 = this.parseName();
|
|
98282
98384
|
var directives = this.parseDirectives(true);
|
|
98283
|
-
var
|
|
98284
|
-
if (directives.length === 0 &&
|
|
98385
|
+
var types17 = this.parseUnionMemberTypes();
|
|
98386
|
+
if (directives.length === 0 && types17.length === 0) {
|
|
98285
98387
|
throw this.unexpected();
|
|
98286
98388
|
}
|
|
98287
98389
|
return {
|
|
98288
98390
|
kind: _kinds.Kind.UNION_TYPE_EXTENSION,
|
|
98289
98391
|
name: name2,
|
|
98290
98392
|
directives,
|
|
98291
|
-
types:
|
|
98393
|
+
types: types17,
|
|
98292
98394
|
loc: this.loc(start)
|
|
98293
98395
|
};
|
|
98294
98396
|
};
|
|
@@ -98456,7 +98558,7 @@ var require_visitor3 = __commonJS3({
|
|
|
98456
98558
|
Object.defineProperty(exports, "__esModule", {
|
|
98457
98559
|
value: true
|
|
98458
98560
|
});
|
|
98459
|
-
exports.visit =
|
|
98561
|
+
exports.visit = visit13;
|
|
98460
98562
|
exports.visitInParallel = visitInParallel;
|
|
98461
98563
|
exports.getVisitFn = getVisitFn;
|
|
98462
98564
|
exports.BREAK = exports.QueryDocumentKeys = void 0;
|
|
@@ -98519,7 +98621,7 @@ var require_visitor3 = __commonJS3({
|
|
|
98519
98621
|
exports.QueryDocumentKeys = QueryDocumentKeys;
|
|
98520
98622
|
var BREAK = Object.freeze({});
|
|
98521
98623
|
exports.BREAK = BREAK;
|
|
98522
|
-
function
|
|
98624
|
+
function visit13(root, visitor) {
|
|
98523
98625
|
var visitorKeys = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : QueryDocumentKeys;
|
|
98524
98626
|
var stack = void 0;
|
|
98525
98627
|
var inArray = Array.isArray(root);
|
|
@@ -99236,8 +99338,8 @@ var require_printer4 = __commonJS3({
|
|
|
99236
99338
|
return join32(["interface", name2, wrap22("implements ", join32(interfaces, " & ")), join32(directives, " "), block22(fields)], " ");
|
|
99237
99339
|
}),
|
|
99238
99340
|
UnionTypeDefinition: addDescription22(function(_ref27) {
|
|
99239
|
-
var name2 = _ref27.name, directives = _ref27.directives,
|
|
99240
|
-
return join32(["union", name2, join32(directives, " "),
|
|
99341
|
+
var name2 = _ref27.name, directives = _ref27.directives, types17 = _ref27.types;
|
|
99342
|
+
return join32(["union", name2, join32(directives, " "), types17 && types17.length !== 0 ? "= " + join32(types17, " | ") : ""], " ");
|
|
99241
99343
|
}),
|
|
99242
99344
|
EnumTypeDefinition: addDescription22(function(_ref28) {
|
|
99243
99345
|
var name2 = _ref28.name, directives = _ref28.directives, values = _ref28.values;
|
|
@@ -99272,8 +99374,8 @@ var require_printer4 = __commonJS3({
|
|
|
99272
99374
|
return join32(["extend interface", name2, wrap22("implements ", join32(interfaces, " & ")), join32(directives, " "), block22(fields)], " ");
|
|
99273
99375
|
},
|
|
99274
99376
|
UnionTypeExtension: function UnionTypeExtension(_ref36) {
|
|
99275
|
-
var name2 = _ref36.name, directives = _ref36.directives,
|
|
99276
|
-
return join32(["extend union", name2, join32(directives, " "),
|
|
99377
|
+
var name2 = _ref36.name, directives = _ref36.directives, types17 = _ref36.types;
|
|
99378
|
+
return join32(["extend union", name2, join32(directives, " "), types17 && types17.length !== 0 ? "= " + join32(types17, " | ") : ""], " ");
|
|
99277
99379
|
},
|
|
99278
99380
|
EnumTypeExtension: function EnumTypeExtension(_ref37) {
|
|
99279
99381
|
var name2 = _ref37.name, directives = _ref37.directives, values = _ref37.values;
|
|
@@ -99365,17 +99467,17 @@ var require_definition3 = __commonJS3({
|
|
|
99365
99467
|
});
|
|
99366
99468
|
exports.isType = isType;
|
|
99367
99469
|
exports.assertType = assertType;
|
|
99368
|
-
exports.isScalarType =
|
|
99470
|
+
exports.isScalarType = isScalarType13;
|
|
99369
99471
|
exports.assertScalarType = assertScalarType;
|
|
99370
|
-
exports.isObjectType =
|
|
99472
|
+
exports.isObjectType = isObjectType12;
|
|
99371
99473
|
exports.assertObjectType = assertObjectType;
|
|
99372
99474
|
exports.isInterfaceType = isInterfaceType12;
|
|
99373
99475
|
exports.assertInterfaceType = assertInterfaceType;
|
|
99374
99476
|
exports.isUnionType = isUnionType13;
|
|
99375
99477
|
exports.assertUnionType = assertUnionType;
|
|
99376
|
-
exports.isEnumType =
|
|
99478
|
+
exports.isEnumType = isEnumType10;
|
|
99377
99479
|
exports.assertEnumType = assertEnumType;
|
|
99378
|
-
exports.isInputObjectType =
|
|
99480
|
+
exports.isInputObjectType = isInputObjectType8;
|
|
99379
99481
|
exports.assertInputObjectType = assertInputObjectType;
|
|
99380
99482
|
exports.isListType = isListType8;
|
|
99381
99483
|
exports.assertListType = assertListType;
|
|
@@ -99389,7 +99491,7 @@ var require_definition3 = __commonJS3({
|
|
|
99389
99491
|
exports.assertLeafType = assertLeafType;
|
|
99390
99492
|
exports.isCompositeType = isCompositeType;
|
|
99391
99493
|
exports.assertCompositeType = assertCompositeType;
|
|
99392
|
-
exports.isAbstractType =
|
|
99494
|
+
exports.isAbstractType = isAbstractType3;
|
|
99393
99495
|
exports.assertAbstractType = assertAbstractType;
|
|
99394
99496
|
exports.GraphQLList = GraphQLList6;
|
|
99395
99497
|
exports.GraphQLNonNull = GraphQLNonNull6;
|
|
@@ -99444,7 +99546,7 @@ var require_definition3 = __commonJS3({
|
|
|
99444
99546
|
return Constructor;
|
|
99445
99547
|
}
|
|
99446
99548
|
function isType(type) {
|
|
99447
|
-
return
|
|
99549
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType10(type) || isInputObjectType8(type) || isListType8(type) || isNonNullType10(type);
|
|
99448
99550
|
}
|
|
99449
99551
|
function assertType(type) {
|
|
99450
99552
|
if (!isType(type)) {
|
|
@@ -99452,20 +99554,20 @@ var require_definition3 = __commonJS3({
|
|
|
99452
99554
|
}
|
|
99453
99555
|
return type;
|
|
99454
99556
|
}
|
|
99455
|
-
function
|
|
99557
|
+
function isScalarType13(type) {
|
|
99456
99558
|
return (0, _instanceOf.default)(type, GraphQLScalarType4);
|
|
99457
99559
|
}
|
|
99458
99560
|
function assertScalarType(type) {
|
|
99459
|
-
if (!
|
|
99561
|
+
if (!isScalarType13(type)) {
|
|
99460
99562
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Scalar type."));
|
|
99461
99563
|
}
|
|
99462
99564
|
return type;
|
|
99463
99565
|
}
|
|
99464
|
-
function
|
|
99566
|
+
function isObjectType12(type) {
|
|
99465
99567
|
return (0, _instanceOf.default)(type, GraphQLObjectType6);
|
|
99466
99568
|
}
|
|
99467
99569
|
function assertObjectType(type) {
|
|
99468
|
-
if (!
|
|
99570
|
+
if (!isObjectType12(type)) {
|
|
99469
99571
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Object type."));
|
|
99470
99572
|
}
|
|
99471
99573
|
return type;
|
|
@@ -99488,20 +99590,20 @@ var require_definition3 = __commonJS3({
|
|
|
99488
99590
|
}
|
|
99489
99591
|
return type;
|
|
99490
99592
|
}
|
|
99491
|
-
function
|
|
99593
|
+
function isEnumType10(type) {
|
|
99492
99594
|
return (0, _instanceOf.default)(type, GraphQLEnumType4);
|
|
99493
99595
|
}
|
|
99494
99596
|
function assertEnumType(type) {
|
|
99495
|
-
if (!
|
|
99597
|
+
if (!isEnumType10(type)) {
|
|
99496
99598
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Enum type."));
|
|
99497
99599
|
}
|
|
99498
99600
|
return type;
|
|
99499
99601
|
}
|
|
99500
|
-
function
|
|
99602
|
+
function isInputObjectType8(type) {
|
|
99501
99603
|
return (0, _instanceOf.default)(type, GraphQLInputObjectType4);
|
|
99502
99604
|
}
|
|
99503
99605
|
function assertInputObjectType(type) {
|
|
99504
|
-
if (!
|
|
99606
|
+
if (!isInputObjectType8(type)) {
|
|
99505
99607
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL Input Object type."));
|
|
99506
99608
|
}
|
|
99507
99609
|
return type;
|
|
@@ -99525,7 +99627,7 @@ var require_definition3 = __commonJS3({
|
|
|
99525
99627
|
return type;
|
|
99526
99628
|
}
|
|
99527
99629
|
function isInputType(type) {
|
|
99528
|
-
return
|
|
99630
|
+
return isScalarType13(type) || isEnumType10(type) || isInputObjectType8(type) || isWrappingType(type) && isInputType(type.ofType);
|
|
99529
99631
|
}
|
|
99530
99632
|
function assertInputType(type) {
|
|
99531
99633
|
if (!isInputType(type)) {
|
|
@@ -99534,7 +99636,7 @@ var require_definition3 = __commonJS3({
|
|
|
99534
99636
|
return type;
|
|
99535
99637
|
}
|
|
99536
99638
|
function isOutputType(type) {
|
|
99537
|
-
return
|
|
99639
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType10(type) || isWrappingType(type) && isOutputType(type.ofType);
|
|
99538
99640
|
}
|
|
99539
99641
|
function assertOutputType(type) {
|
|
99540
99642
|
if (!isOutputType(type)) {
|
|
@@ -99543,7 +99645,7 @@ var require_definition3 = __commonJS3({
|
|
|
99543
99645
|
return type;
|
|
99544
99646
|
}
|
|
99545
99647
|
function isLeafType4(type) {
|
|
99546
|
-
return
|
|
99648
|
+
return isScalarType13(type) || isEnumType10(type);
|
|
99547
99649
|
}
|
|
99548
99650
|
function assertLeafType(type) {
|
|
99549
99651
|
if (!isLeafType4(type)) {
|
|
@@ -99552,7 +99654,7 @@ var require_definition3 = __commonJS3({
|
|
|
99552
99654
|
return type;
|
|
99553
99655
|
}
|
|
99554
99656
|
function isCompositeType(type) {
|
|
99555
|
-
return
|
|
99657
|
+
return isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type);
|
|
99556
99658
|
}
|
|
99557
99659
|
function assertCompositeType(type) {
|
|
99558
99660
|
if (!isCompositeType(type)) {
|
|
@@ -99560,11 +99662,11 @@ var require_definition3 = __commonJS3({
|
|
|
99560
99662
|
}
|
|
99561
99663
|
return type;
|
|
99562
99664
|
}
|
|
99563
|
-
function
|
|
99665
|
+
function isAbstractType3(type) {
|
|
99564
99666
|
return isInterfaceType12(type) || isUnionType13(type);
|
|
99565
99667
|
}
|
|
99566
99668
|
function assertAbstractType(type) {
|
|
99567
|
-
if (!
|
|
99669
|
+
if (!isAbstractType3(type)) {
|
|
99568
99670
|
throw new Error("Expected ".concat((0, _inspect.default)(type), " to be a GraphQL abstract type."));
|
|
99569
99671
|
}
|
|
99570
99672
|
return type;
|
|
@@ -99631,7 +99733,7 @@ var require_definition3 = __commonJS3({
|
|
|
99631
99733
|
}
|
|
99632
99734
|
}
|
|
99633
99735
|
function isNamedType4(type) {
|
|
99634
|
-
return
|
|
99736
|
+
return isScalarType13(type) || isObjectType12(type) || isInterfaceType12(type) || isUnionType13(type) || isEnumType10(type) || isInputObjectType8(type);
|
|
99635
99737
|
}
|
|
99636
99738
|
function assertNamedType(type) {
|
|
99637
99739
|
if (!isNamedType4(type)) {
|
|
@@ -99940,9 +100042,9 @@ var require_definition3 = __commonJS3({
|
|
|
99940
100042
|
exports.GraphQLUnionType = GraphQLUnionType3;
|
|
99941
100043
|
(0, _defineInspect.default)(GraphQLUnionType3);
|
|
99942
100044
|
function defineTypes(config4) {
|
|
99943
|
-
var
|
|
99944
|
-
Array.isArray(
|
|
99945
|
-
return
|
|
100045
|
+
var types17 = resolveThunk(config4.types);
|
|
100046
|
+
Array.isArray(types17) || (0, _devAssert.default)(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config4.name, "."));
|
|
100047
|
+
return types17;
|
|
99946
100048
|
}
|
|
99947
100049
|
var GraphQLEnumType4 = /* @__PURE__ */ function() {
|
|
99948
100050
|
function GraphQLEnumType5(config4) {
|
|
@@ -105658,7 +105760,7 @@ var require_graphql5 = __commonJS3({
|
|
|
105658
105760
|
Object.defineProperty(exports, "__esModule", {
|
|
105659
105761
|
value: true
|
|
105660
105762
|
});
|
|
105661
|
-
exports.graphql =
|
|
105763
|
+
exports.graphql = graphql302;
|
|
105662
105764
|
exports.graphqlSync = graphqlSync;
|
|
105663
105765
|
var _isPromise = _interopRequireDefault(require_isPromise3());
|
|
105664
105766
|
var _parser = require_parser4();
|
|
@@ -105668,7 +105770,7 @@ var require_graphql5 = __commonJS3({
|
|
|
105668
105770
|
function _interopRequireDefault(obj) {
|
|
105669
105771
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
105670
105772
|
}
|
|
105671
|
-
function
|
|
105773
|
+
function graphql302(argsOrSchema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) {
|
|
105672
105774
|
var _arguments = arguments;
|
|
105673
105775
|
return new Promise(function(resolve22) {
|
|
105674
105776
|
return resolve22(
|
|
@@ -107425,7 +107527,7 @@ var require_buildClientSchema3 = __commonJS3({
|
|
|
107425
107527
|
return new _definition.GraphQLUnionType({
|
|
107426
107528
|
name: unionIntrospection.name,
|
|
107427
107529
|
description: unionIntrospection.description,
|
|
107428
|
-
types: function
|
|
107530
|
+
types: function types17() {
|
|
107429
107531
|
return unionIntrospection.possibleTypes.map(getObjectType);
|
|
107430
107532
|
}
|
|
107431
107533
|
});
|
|
@@ -107768,7 +107870,7 @@ var require_extendSchema3 = __commonJS3({
|
|
|
107768
107870
|
var config4 = type.toConfig();
|
|
107769
107871
|
var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config4.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
|
|
107770
107872
|
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, config4), {}, {
|
|
107771
|
-
types: function
|
|
107873
|
+
types: function types17() {
|
|
107772
107874
|
return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
|
|
107773
107875
|
},
|
|
107774
107876
|
extensionASTNodes: config4.extensionASTNodes.concat(extensions)
|
|
@@ -107916,17 +108018,17 @@ var require_extendSchema3 = __commonJS3({
|
|
|
107916
108018
|
return interfaces;
|
|
107917
108019
|
}
|
|
107918
108020
|
function buildUnionTypes(nodes) {
|
|
107919
|
-
var
|
|
108021
|
+
var types17 = [];
|
|
107920
108022
|
for (var _i32 = 0; _i32 < nodes.length; _i32++) {
|
|
107921
108023
|
var _node$types;
|
|
107922
108024
|
var node2 = nodes[_i32];
|
|
107923
108025
|
var typeNodes = (_node$types = node2.types) !== null && _node$types !== void 0 ? _node$types : [];
|
|
107924
108026
|
for (var _i34 = 0; _i34 < typeNodes.length; _i34++) {
|
|
107925
108027
|
var type = typeNodes[_i34];
|
|
107926
|
-
|
|
108028
|
+
types17.push(getNamedType5(type));
|
|
107927
108029
|
}
|
|
107928
108030
|
}
|
|
107929
|
-
return
|
|
108031
|
+
return types17;
|
|
107930
108032
|
}
|
|
107931
108033
|
function buildType(astNode) {
|
|
107932
108034
|
var _typeExtensionsMap$na;
|
|
@@ -107983,7 +108085,7 @@ var require_extendSchema3 = __commonJS3({
|
|
|
107983
108085
|
return new _definition.GraphQLUnionType({
|
|
107984
108086
|
name: name3,
|
|
107985
108087
|
description,
|
|
107986
|
-
types: function
|
|
108088
|
+
types: function types17() {
|
|
107987
108089
|
return buildUnionTypes(_allNodes3);
|
|
107988
108090
|
},
|
|
107989
108091
|
astNode,
|
|
@@ -108277,7 +108379,7 @@ var require_lexicographicSortSchema3 = __commonJS3({
|
|
|
108277
108379
|
if ((0, _definition.isUnionType)(type)) {
|
|
108278
108380
|
var _config22 = type.toConfig();
|
|
108279
108381
|
return new _definition.GraphQLUnionType(_objectSpread(_objectSpread({}, _config22), {}, {
|
|
108280
|
-
types: function
|
|
108382
|
+
types: function types17() {
|
|
108281
108383
|
return sortTypes(_config22.types);
|
|
108282
108384
|
}
|
|
108283
108385
|
}));
|
|
@@ -108360,10 +108462,10 @@ var require_printSchema3 = __commonJS3({
|
|
|
108360
108462
|
}
|
|
108361
108463
|
function printFilteredSchema(schema, directiveFilter, typeFilter, options) {
|
|
108362
108464
|
var directives = schema.getDirectives().filter(directiveFilter);
|
|
108363
|
-
var
|
|
108465
|
+
var types17 = (0, _objectValues.default)(schema.getTypeMap()).filter(typeFilter);
|
|
108364
108466
|
return [printSchemaDefinition(schema)].concat(directives.map(function(directive) {
|
|
108365
108467
|
return printDirective(directive, options);
|
|
108366
|
-
}),
|
|
108468
|
+
}), types17.map(function(type) {
|
|
108367
108469
|
return printType(type, options);
|
|
108368
108470
|
})).filter(Boolean).join("\n\n") + "\n";
|
|
108369
108471
|
}
|
|
@@ -108438,8 +108540,8 @@ var require_printSchema3 = __commonJS3({
|
|
|
108438
108540
|
return printDescription(options, type) + "interface ".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type);
|
|
108439
108541
|
}
|
|
108440
108542
|
function printUnion(type, options) {
|
|
108441
|
-
var
|
|
108442
|
-
var possibleTypes =
|
|
108543
|
+
var types17 = type.getTypes();
|
|
108544
|
+
var possibleTypes = types17.length ? " = " + types17.join(" | ") : "";
|
|
108443
108545
|
return printDescription(options, type) + "union " + type.name + possibleTypes;
|
|
108444
108546
|
}
|
|
108445
108547
|
function printEnum(type, options) {
|
|
@@ -108502,8 +108604,8 @@ var require_printSchema3 = __commonJS3({
|
|
|
108502
108604
|
if (scalar.specifiedByUrl == null) {
|
|
108503
108605
|
return "";
|
|
108504
108606
|
}
|
|
108505
|
-
var
|
|
108506
|
-
var urlAST = (0, _astFromValue.astFromValue)(
|
|
108607
|
+
var url2 = scalar.specifiedByUrl;
|
|
108608
|
+
var urlAST = (0, _astFromValue.astFromValue)(url2, _scalars.GraphQLString);
|
|
108507
108609
|
urlAST || (0, _invariant.default)(0, "Unexpected null value returned from `astFromValue` for specifiedByUrl");
|
|
108508
108610
|
return " @specifiedBy(url: " + (0, _printer.print)(urlAST) + ")";
|
|
108509
108611
|
}
|
|
@@ -116141,11 +116243,11 @@ var require_volume2 = __commonJS3({
|
|
|
116141
116243
|
var getStatOptsAndCb = function(options, callback) {
|
|
116142
116244
|
return typeof options === "function" ? [getStatOptions(), options] : [getStatOptions(options), validateCallback(callback)];
|
|
116143
116245
|
};
|
|
116144
|
-
function getPathFromURLPosix(
|
|
116145
|
-
if (
|
|
116246
|
+
function getPathFromURLPosix(url2) {
|
|
116247
|
+
if (url2.hostname !== "") {
|
|
116146
116248
|
throw new errors.TypeError("ERR_INVALID_FILE_URL_HOST", process_1.default.platform);
|
|
116147
116249
|
}
|
|
116148
|
-
var pathname =
|
|
116250
|
+
var pathname = url2.pathname;
|
|
116149
116251
|
for (var n2 = 0; n2 < pathname.length; n2++) {
|
|
116150
116252
|
if (pathname[n2] === "%") {
|
|
116151
116253
|
var third = pathname.codePointAt(n2 + 2) | 32;
|
|
@@ -123229,14 +123331,14 @@ var require_lib32 = __commonJS3({
|
|
|
123229
123331
|
this.preserveSpace = !!preserveSpace;
|
|
123230
123332
|
}
|
|
123231
123333
|
};
|
|
123232
|
-
var
|
|
123334
|
+
var types17 = {
|
|
123233
123335
|
brace: new TokContext3("{"),
|
|
123234
123336
|
j_oTag: new TokContext3("<tag"),
|
|
123235
123337
|
j_cTag: new TokContext3("</tag"),
|
|
123236
123338
|
j_expr: new TokContext3("<tag>...</tag>", true)
|
|
123237
123339
|
};
|
|
123238
123340
|
{
|
|
123239
|
-
|
|
123341
|
+
types17.template = new TokContext3("`", true);
|
|
123240
123342
|
}
|
|
123241
123343
|
var beforeExpr2 = true;
|
|
123242
123344
|
var startsExpr2 = true;
|
|
@@ -123768,17 +123870,17 @@ var require_lib32 = __commonJS3({
|
|
|
123768
123870
|
context.pop();
|
|
123769
123871
|
};
|
|
123770
123872
|
tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = (context) => {
|
|
123771
|
-
context.push(
|
|
123873
|
+
context.push(types17.brace);
|
|
123772
123874
|
};
|
|
123773
123875
|
tokenTypes[22].updateContext = (context) => {
|
|
123774
|
-
if (context[context.length - 1] ===
|
|
123876
|
+
if (context[context.length - 1] === types17.template) {
|
|
123775
123877
|
context.pop();
|
|
123776
123878
|
} else {
|
|
123777
|
-
context.push(
|
|
123879
|
+
context.push(types17.template);
|
|
123778
123880
|
}
|
|
123779
123881
|
};
|
|
123780
123882
|
tokenTypes[140].updateContext = (context) => {
|
|
123781
|
-
context.push(
|
|
123883
|
+
context.push(types17.j_expr, types17.j_oTag);
|
|
123782
123884
|
};
|
|
123783
123885
|
}
|
|
123784
123886
|
var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
|
|
@@ -124419,7 +124521,7 @@ var require_lib32 = __commonJS3({
|
|
|
124419
124521
|
this.lastTokEndLoc = null;
|
|
124420
124522
|
this.lastTokStartLoc = null;
|
|
124421
124523
|
this.lastTokStart = 0;
|
|
124422
|
-
this.context = [
|
|
124524
|
+
this.context = [types17.brace];
|
|
124423
124525
|
this.canStartJSXElement = true;
|
|
124424
124526
|
this.containsEsc = false;
|
|
124425
124527
|
this.firstInvalidTemplateEscapePos = null;
|
|
@@ -128343,7 +128445,7 @@ var require_lib32 = __commonJS3({
|
|
|
128343
128445
|
context
|
|
128344
128446
|
} = this.state;
|
|
128345
128447
|
const currentContext = context[context.length - 1];
|
|
128346
|
-
if (currentContext ===
|
|
128448
|
+
if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
|
|
128347
128449
|
context.pop();
|
|
128348
128450
|
}
|
|
128349
128451
|
}
|
|
@@ -129403,9 +129505,9 @@ var require_lib32 = __commonJS3({
|
|
|
129403
129505
|
switch (this.state.type) {
|
|
129404
129506
|
case 5:
|
|
129405
129507
|
node2 = this.startNode();
|
|
129406
|
-
this.setContext(
|
|
129508
|
+
this.setContext(types17.brace);
|
|
129407
129509
|
this.next();
|
|
129408
|
-
node2 = this.jsxParseExpressionContainer(node2,
|
|
129510
|
+
node2 = this.jsxParseExpressionContainer(node2, types17.j_oTag);
|
|
129409
129511
|
if (node2.expression.type === "JSXEmptyExpression") {
|
|
129410
129512
|
this.raise(JsxErrors.AttributeIsEmpty, {
|
|
129411
129513
|
at: node2
|
|
@@ -129428,7 +129530,7 @@ var require_lib32 = __commonJS3({
|
|
|
129428
129530
|
jsxParseSpreadChild(node2) {
|
|
129429
129531
|
this.next();
|
|
129430
129532
|
node2.expression = this.parseExpression();
|
|
129431
|
-
this.setContext(
|
|
129533
|
+
this.setContext(types17.j_expr);
|
|
129432
129534
|
this.state.canStartJSXElement = true;
|
|
129433
129535
|
this.expect(8);
|
|
129434
129536
|
return this.finishNode(node2, "JSXSpreadChild");
|
|
@@ -129448,11 +129550,11 @@ var require_lib32 = __commonJS3({
|
|
|
129448
129550
|
jsxParseAttribute() {
|
|
129449
129551
|
const node2 = this.startNode();
|
|
129450
129552
|
if (this.match(5)) {
|
|
129451
|
-
this.setContext(
|
|
129553
|
+
this.setContext(types17.brace);
|
|
129452
129554
|
this.next();
|
|
129453
129555
|
this.expect(21);
|
|
129454
129556
|
node2.argument = this.parseMaybeAssignAllowIn();
|
|
129455
|
-
this.setContext(
|
|
129557
|
+
this.setContext(types17.j_oTag);
|
|
129456
129558
|
this.state.canStartJSXElement = true;
|
|
129457
129559
|
this.expect(8);
|
|
129458
129560
|
return this.finishNode(node2, "JSXSpreadAttribute");
|
|
@@ -129511,12 +129613,12 @@ var require_lib32 = __commonJS3({
|
|
|
129511
129613
|
break;
|
|
129512
129614
|
case 5: {
|
|
129513
129615
|
const node22 = this.startNode();
|
|
129514
|
-
this.setContext(
|
|
129616
|
+
this.setContext(types17.brace);
|
|
129515
129617
|
this.next();
|
|
129516
129618
|
if (this.match(21)) {
|
|
129517
129619
|
children.push(this.jsxParseSpreadChild(node22));
|
|
129518
129620
|
} else {
|
|
129519
|
-
children.push(this.jsxParseExpressionContainer(node22,
|
|
129621
|
+
children.push(this.jsxParseExpressionContainer(node22, types17.j_expr));
|
|
129520
129622
|
}
|
|
129521
129623
|
break;
|
|
129522
129624
|
}
|
|
@@ -129587,10 +129689,10 @@ var require_lib32 = __commonJS3({
|
|
|
129587
129689
|
}
|
|
129588
129690
|
getTokenFromCode(code) {
|
|
129589
129691
|
const context = this.curContext();
|
|
129590
|
-
if (context ===
|
|
129692
|
+
if (context === types17.j_expr) {
|
|
129591
129693
|
return this.jsxReadToken();
|
|
129592
129694
|
}
|
|
129593
|
-
if (context ===
|
|
129695
|
+
if (context === types17.j_oTag || context === types17.j_cTag) {
|
|
129594
129696
|
if (isIdentifierStart2(code)) {
|
|
129595
129697
|
return this.jsxReadWord();
|
|
129596
129698
|
}
|
|
@@ -129598,7 +129700,7 @@ var require_lib32 = __commonJS3({
|
|
|
129598
129700
|
++this.state.pos;
|
|
129599
129701
|
return this.finishToken(141);
|
|
129600
129702
|
}
|
|
129601
|
-
if ((code === 34 || code === 39) && context ===
|
|
129703
|
+
if ((code === 34 || code === 39) && context === types17.j_oTag) {
|
|
129602
129704
|
return this.jsxReadString(code);
|
|
129603
129705
|
}
|
|
129604
129706
|
}
|
|
@@ -129614,17 +129716,17 @@ var require_lib32 = __commonJS3({
|
|
|
129614
129716
|
type
|
|
129615
129717
|
} = this.state;
|
|
129616
129718
|
if (type === 56 && prevType === 140) {
|
|
129617
|
-
context.splice(-2, 2,
|
|
129719
|
+
context.splice(-2, 2, types17.j_cTag);
|
|
129618
129720
|
this.state.canStartJSXElement = false;
|
|
129619
129721
|
} else if (type === 140) {
|
|
129620
|
-
context.push(
|
|
129722
|
+
context.push(types17.j_oTag);
|
|
129621
129723
|
} else if (type === 141) {
|
|
129622
129724
|
const out = context[context.length - 1];
|
|
129623
|
-
if (out ===
|
|
129725
|
+
if (out === types17.j_oTag && prevType === 56 || out === types17.j_cTag) {
|
|
129624
129726
|
context.pop();
|
|
129625
|
-
this.state.canStartJSXElement = context[context.length - 1] ===
|
|
129727
|
+
this.state.canStartJSXElement = context[context.length - 1] === types17.j_expr;
|
|
129626
129728
|
} else {
|
|
129627
|
-
this.setContext(
|
|
129729
|
+
this.setContext(types17.j_expr);
|
|
129628
129730
|
this.state.canStartJSXElement = true;
|
|
129629
129731
|
}
|
|
129630
129732
|
} else {
|
|
@@ -130631,14 +130733,14 @@ var require_lib32 = __commonJS3({
|
|
|
130631
130733
|
tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
|
|
130632
130734
|
const node2 = this.startNode();
|
|
130633
130735
|
const hasLeadingOperator = this.eat(operator);
|
|
130634
|
-
const
|
|
130736
|
+
const types18 = [];
|
|
130635
130737
|
do {
|
|
130636
|
-
|
|
130738
|
+
types18.push(parseConstituentType());
|
|
130637
130739
|
} while (this.eat(operator));
|
|
130638
|
-
if (
|
|
130639
|
-
return
|
|
130740
|
+
if (types18.length === 1 && !hasLeadingOperator) {
|
|
130741
|
+
return types18[0];
|
|
130640
130742
|
}
|
|
130641
|
-
node2.types =
|
|
130743
|
+
node2.types = types18;
|
|
130642
130744
|
return this.finishNode(node2, kind);
|
|
130643
130745
|
}
|
|
130644
130746
|
tsParseIntersectionTypeOrHigher() {
|
|
@@ -131854,7 +131956,7 @@ var require_lib32 = __commonJS3({
|
|
|
131854
131956
|
context
|
|
131855
131957
|
} = this.state;
|
|
131856
131958
|
const currentContext = context[context.length - 1];
|
|
131857
|
-
if (currentContext ===
|
|
131959
|
+
if (currentContext === types17.j_oTag || currentContext === types17.j_expr) {
|
|
131858
131960
|
context.pop();
|
|
131859
131961
|
}
|
|
131860
131962
|
}
|
|
@@ -137422,9 +137524,9 @@ var require_shared2 = __commonJS3({
|
|
|
137422
137524
|
var tslib_1 = require_tslib2();
|
|
137423
137525
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
137424
137526
|
function default_1(fork) {
|
|
137425
|
-
var
|
|
137426
|
-
var Type =
|
|
137427
|
-
var builtin =
|
|
137527
|
+
var types17 = fork.use(types_110.default);
|
|
137528
|
+
var Type = types17.Type;
|
|
137529
|
+
var builtin = types17.builtInTypes;
|
|
137428
137530
|
var isNumber2 = builtin.number;
|
|
137429
137531
|
function geq(than) {
|
|
137430
137532
|
return Type.from(function(value2) {
|
|
@@ -137572,9 +137674,9 @@ var require_types2 = __commonJS3({
|
|
|
137572
137674
|
}(BaseType);
|
|
137573
137675
|
var OrType = function(_super) {
|
|
137574
137676
|
tslib_1.__extends(OrType2, _super);
|
|
137575
|
-
function OrType2(
|
|
137677
|
+
function OrType2(types17) {
|
|
137576
137678
|
var _this = _super.call(this) || this;
|
|
137577
|
-
_this.types =
|
|
137679
|
+
_this.types = types17;
|
|
137578
137680
|
_this.kind = "OrType";
|
|
137579
137681
|
return _this;
|
|
137580
137682
|
}
|
|
@@ -137715,11 +137817,11 @@ var require_types2 = __commonJS3({
|
|
|
137715
137817
|
function typesPlugin(_fork) {
|
|
137716
137818
|
var Type = {
|
|
137717
137819
|
or: function() {
|
|
137718
|
-
var
|
|
137820
|
+
var types17 = [];
|
|
137719
137821
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
137720
|
-
|
|
137822
|
+
types17[_i] = arguments[_i];
|
|
137721
137823
|
}
|
|
137722
|
-
return new OrType(
|
|
137824
|
+
return new OrType(types17.map(function(type) {
|
|
137723
137825
|
return Type.from(type);
|
|
137724
137826
|
}));
|
|
137725
137827
|
},
|
|
@@ -138162,9 +138264,9 @@ var require_path22 = __commonJS3({
|
|
|
138162
138264
|
var Op = Object.prototype;
|
|
138163
138265
|
var hasOwn2 = Op.hasOwnProperty;
|
|
138164
138266
|
function pathPlugin(fork) {
|
|
138165
|
-
var
|
|
138166
|
-
var isArray2 =
|
|
138167
|
-
var isNumber2 =
|
|
138267
|
+
var types17 = fork.use(types_110.default);
|
|
138268
|
+
var isArray2 = types17.builtInTypes.array;
|
|
138269
|
+
var isNumber2 = types17.builtInTypes.number;
|
|
138168
138270
|
var Path = function Path2(value2, parentPath, name2) {
|
|
138169
138271
|
if (!(this instanceof Path2)) {
|
|
138170
138272
|
throw new Error("Path constructor cannot be invoked without 'new'");
|
|
@@ -138464,13 +138566,13 @@ var require_scope2 = __commonJS3({
|
|
|
138464
138566
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
138465
138567
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
138466
138568
|
function scopePlugin(fork) {
|
|
138467
|
-
var
|
|
138468
|
-
var Type =
|
|
138469
|
-
var namedTypes =
|
|
138569
|
+
var types17 = fork.use(types_110.default);
|
|
138570
|
+
var Type = types17.Type;
|
|
138571
|
+
var namedTypes = types17.namedTypes;
|
|
138470
138572
|
var Node3 = namedTypes.Node;
|
|
138471
138573
|
var Expression = namedTypes.Expression;
|
|
138472
|
-
var isArray2 =
|
|
138473
|
-
var b =
|
|
138574
|
+
var isArray2 = types17.builtInTypes.array;
|
|
138575
|
+
var b = types17.builders;
|
|
138474
138576
|
var Scope3 = function Scope22(path22, parentScope) {
|
|
138475
138577
|
if (!(this instanceof Scope22)) {
|
|
138476
138578
|
throw new Error("Scope constructor cannot be invoked without 'new'");
|
|
@@ -138533,7 +138635,7 @@ var require_scope2 = __commonJS3({
|
|
|
138533
138635
|
++index;
|
|
138534
138636
|
}
|
|
138535
138637
|
var name2 = prefix + index;
|
|
138536
|
-
return this.bindings[name2] =
|
|
138638
|
+
return this.bindings[name2] = types17.builders.identifier(name2);
|
|
138537
138639
|
};
|
|
138538
138640
|
Sp.injectTemporary = function(identifier, init) {
|
|
138539
138641
|
identifier || (identifier = this.declareTemporary());
|
|
@@ -138609,7 +138711,7 @@ var require_scope2 = __commonJS3({
|
|
|
138609
138711
|
bindings
|
|
138610
138712
|
);
|
|
138611
138713
|
} else if (Node3.check(node2) && !Expression.check(node2)) {
|
|
138612
|
-
|
|
138714
|
+
types17.eachField(node2, function(name2, child) {
|
|
138613
138715
|
var childPath = path22.get(name2);
|
|
138614
138716
|
if (!pathHasValue(childPath, child)) {
|
|
138615
138717
|
throw new Error("");
|
|
@@ -138687,24 +138789,24 @@ var require_scope2 = __commonJS3({
|
|
|
138687
138789
|
addPattern(patternPath.get("argument"), bindings);
|
|
138688
138790
|
}
|
|
138689
138791
|
}
|
|
138690
|
-
function addTypePattern(patternPath,
|
|
138792
|
+
function addTypePattern(patternPath, types18) {
|
|
138691
138793
|
var pattern = patternPath.value;
|
|
138692
138794
|
namedTypes.Pattern.assert(pattern);
|
|
138693
138795
|
if (namedTypes.Identifier.check(pattern)) {
|
|
138694
|
-
if (hasOwn2.call(
|
|
138695
|
-
|
|
138796
|
+
if (hasOwn2.call(types18, pattern.name)) {
|
|
138797
|
+
types18[pattern.name].push(patternPath);
|
|
138696
138798
|
} else {
|
|
138697
|
-
|
|
138799
|
+
types18[pattern.name] = [patternPath];
|
|
138698
138800
|
}
|
|
138699
138801
|
}
|
|
138700
138802
|
}
|
|
138701
|
-
function addTypeParameter(parameterPath,
|
|
138803
|
+
function addTypeParameter(parameterPath, types18) {
|
|
138702
138804
|
var parameter = parameterPath.value;
|
|
138703
138805
|
FlowOrTSTypeParameterType.assert(parameter);
|
|
138704
|
-
if (hasOwn2.call(
|
|
138705
|
-
|
|
138806
|
+
if (hasOwn2.call(types18, parameter.name)) {
|
|
138807
|
+
types18[parameter.name].push(parameterPath);
|
|
138706
138808
|
} else {
|
|
138707
|
-
|
|
138809
|
+
types18[parameter.name] = [parameterPath];
|
|
138708
138810
|
}
|
|
138709
138811
|
}
|
|
138710
138812
|
Sp.lookup = function(name2) {
|
|
@@ -138743,11 +138845,11 @@ var require_node_path2 = __commonJS3({
|
|
|
138743
138845
|
var scope_1 = tslib_1.__importDefault(require_scope2());
|
|
138744
138846
|
var shared_1 = require_shared2();
|
|
138745
138847
|
function nodePathPlugin(fork) {
|
|
138746
|
-
var
|
|
138747
|
-
var n2 =
|
|
138748
|
-
var b =
|
|
138749
|
-
var isNumber2 =
|
|
138750
|
-
var isArray2 =
|
|
138848
|
+
var types17 = fork.use(types_110.default);
|
|
138849
|
+
var n2 = types17.namedTypes;
|
|
138850
|
+
var b = types17.builders;
|
|
138851
|
+
var isNumber2 = types17.builtInTypes.number;
|
|
138852
|
+
var isArray2 = types17.builtInTypes.array;
|
|
138751
138853
|
var Path = fork.use(path_1.default);
|
|
138752
138854
|
var Scope3 = fork.use(scope_1.default);
|
|
138753
138855
|
var NodePath = function NodePath2(value2, parentPath, name2) {
|
|
@@ -138838,7 +138940,7 @@ var require_node_path2 = __commonJS3({
|
|
|
138838
138940
|
return scope2 || null;
|
|
138839
138941
|
};
|
|
138840
138942
|
NPp.getValueProperty = function(name2) {
|
|
138841
|
-
return
|
|
138943
|
+
return types17.getFieldValue(this.value, name2);
|
|
138842
138944
|
};
|
|
138843
138945
|
NPp.needsParens = function(assumeExpressionContext) {
|
|
138844
138946
|
var pp2 = this.parentPath;
|
|
@@ -138980,7 +139082,7 @@ var require_node_path2 = __commonJS3({
|
|
|
138980
139082
|
return node2.some(containsCallExpression);
|
|
138981
139083
|
}
|
|
138982
139084
|
if (n2.Node.check(node2)) {
|
|
138983
|
-
return
|
|
139085
|
+
return types17.someField(node2, function(_name, child) {
|
|
138984
139086
|
return containsCallExpression(child);
|
|
138985
139087
|
});
|
|
138986
139088
|
}
|
|
@@ -139099,11 +139201,11 @@ var require_path_visitor2 = __commonJS3({
|
|
|
139099
139201
|
var shared_1 = require_shared2();
|
|
139100
139202
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
139101
139203
|
function pathVisitorPlugin(fork) {
|
|
139102
|
-
var
|
|
139204
|
+
var types17 = fork.use(types_110.default);
|
|
139103
139205
|
var NodePath = fork.use(node_path_1.default);
|
|
139104
|
-
var isArray2 =
|
|
139105
|
-
var isObject2 =
|
|
139106
|
-
var isFunction2 =
|
|
139206
|
+
var isArray2 = types17.builtInTypes.array;
|
|
139207
|
+
var isObject2 = types17.builtInTypes.object;
|
|
139208
|
+
var isFunction2 = types17.builtInTypes.function;
|
|
139107
139209
|
var undefined2;
|
|
139108
139210
|
var PathVisitor = function PathVisitor2() {
|
|
139109
139211
|
if (!(this instanceof PathVisitor2)) {
|
|
@@ -139123,7 +139225,7 @@ var require_path_visitor2 = __commonJS3({
|
|
|
139123
139225
|
typeNames[methodName.slice("visit".length)] = true;
|
|
139124
139226
|
}
|
|
139125
139227
|
}
|
|
139126
|
-
var supertypeTable =
|
|
139228
|
+
var supertypeTable = types17.computeSupertypeLookupTable(typeNames);
|
|
139127
139229
|
var methodNameTable = /* @__PURE__ */ Object.create(null);
|
|
139128
139230
|
var typeNameKeys = Object.keys(supertypeTable);
|
|
139129
139231
|
var typeNameCount = typeNameKeys.length;
|
|
@@ -139165,7 +139267,7 @@ var require_path_visitor2 = __commonJS3({
|
|
|
139165
139267
|
}
|
|
139166
139268
|
return target;
|
|
139167
139269
|
}
|
|
139168
|
-
PathVisitor.visit = function
|
|
139270
|
+
PathVisitor.visit = function visit13(node2, methods) {
|
|
139169
139271
|
return PathVisitor.fromMethodsObject(methods).visit(node2);
|
|
139170
139272
|
};
|
|
139171
139273
|
var PVp = PathVisitor.prototype;
|
|
@@ -139242,7 +139344,7 @@ var require_path_visitor2 = __commonJS3({
|
|
|
139242
139344
|
path22.each(visitor.visitWithoutReset, visitor);
|
|
139243
139345
|
} else if (!isObject2.check(value2)) {
|
|
139244
139346
|
} else {
|
|
139245
|
-
var childNames =
|
|
139347
|
+
var childNames = types17.getFieldNames(value2);
|
|
139246
139348
|
if (visitor._shouldVisitComments && value2.comments && childNames.indexOf("comments") < 0) {
|
|
139247
139349
|
childNames.push("comments");
|
|
139248
139350
|
}
|
|
@@ -139251,7 +139353,7 @@ var require_path_visitor2 = __commonJS3({
|
|
|
139251
139353
|
for (var i22 = 0; i22 < childCount; ++i22) {
|
|
139252
139354
|
var childName = childNames[i22];
|
|
139253
139355
|
if (!hasOwn2.call(value2, childName)) {
|
|
139254
|
-
value2[childName] =
|
|
139356
|
+
value2[childName] = types17.getFieldValue(value2, childName);
|
|
139255
139357
|
}
|
|
139256
139358
|
childPaths.push(path22.get(childName));
|
|
139257
139359
|
}
|
|
@@ -139356,7 +139458,7 @@ var require_path_visitor2 = __commonJS3({
|
|
|
139356
139458
|
this.needToCallTraverse = false;
|
|
139357
139459
|
return visitChildren(path22, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
|
|
139358
139460
|
};
|
|
139359
|
-
sharedContextProtoMethods.visit = function
|
|
139461
|
+
sharedContextProtoMethods.visit = function visit13(path22, newVisitor) {
|
|
139360
139462
|
if (!(this instanceof this.Context)) {
|
|
139361
139463
|
throw new Error("");
|
|
139362
139464
|
}
|
|
@@ -139392,13 +139494,13 @@ var require_equiv2 = __commonJS3({
|
|
|
139392
139494
|
var shared_1 = require_shared2();
|
|
139393
139495
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
139394
139496
|
function default_1(fork) {
|
|
139395
|
-
var
|
|
139396
|
-
var getFieldNames =
|
|
139397
|
-
var getFieldValue =
|
|
139398
|
-
var isArray2 =
|
|
139399
|
-
var isObject2 =
|
|
139400
|
-
var isDate2 =
|
|
139401
|
-
var isRegExp2 =
|
|
139497
|
+
var types17 = fork.use(types_110.default);
|
|
139498
|
+
var getFieldNames = types17.getFieldNames;
|
|
139499
|
+
var getFieldValue = types17.getFieldValue;
|
|
139500
|
+
var isArray2 = types17.builtInTypes.array;
|
|
139501
|
+
var isObject2 = types17.builtInTypes.object;
|
|
139502
|
+
var isDate2 = types17.builtInTypes.Date;
|
|
139503
|
+
var isRegExp2 = types17.builtInTypes.RegExp;
|
|
139402
139504
|
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
139403
139505
|
function astNodesAreEquivalent(a, b, problemPath) {
|
|
139404
139506
|
if (isArray2.check(problemPath)) {
|
|
@@ -139549,24 +139651,24 @@ var require_fork2 = __commonJS3({
|
|
|
139549
139651
|
var shared_1 = require_shared2();
|
|
139550
139652
|
function default_1(plugins) {
|
|
139551
139653
|
var fork = createFork();
|
|
139552
|
-
var
|
|
139654
|
+
var types17 = fork.use(types_110.default);
|
|
139553
139655
|
plugins.forEach(fork.use);
|
|
139554
|
-
|
|
139656
|
+
types17.finalize();
|
|
139555
139657
|
var PathVisitor = fork.use(path_visitor_1.default);
|
|
139556
139658
|
return {
|
|
139557
|
-
Type:
|
|
139558
|
-
builtInTypes:
|
|
139559
|
-
namedTypes:
|
|
139560
|
-
builders:
|
|
139561
|
-
defineMethod:
|
|
139562
|
-
getFieldNames:
|
|
139563
|
-
getFieldValue:
|
|
139564
|
-
eachField:
|
|
139565
|
-
someField:
|
|
139566
|
-
getSupertypeNames:
|
|
139567
|
-
getBuilderName:
|
|
139659
|
+
Type: types17.Type,
|
|
139660
|
+
builtInTypes: types17.builtInTypes,
|
|
139661
|
+
namedTypes: types17.namedTypes,
|
|
139662
|
+
builders: types17.builders,
|
|
139663
|
+
defineMethod: types17.defineMethod,
|
|
139664
|
+
getFieldNames: types17.getFieldNames,
|
|
139665
|
+
getFieldValue: types17.getFieldValue,
|
|
139666
|
+
eachField: types17.eachField,
|
|
139667
|
+
someField: types17.someField,
|
|
139668
|
+
getSupertypeNames: types17.getSupertypeNames,
|
|
139669
|
+
getBuilderName: types17.getBuilderName,
|
|
139568
139670
|
astNodesAreEquivalent: fork.use(equiv_1.default),
|
|
139569
|
-
finalize:
|
|
139671
|
+
finalize: types17.finalize,
|
|
139570
139672
|
Path: fork.use(path_1.default),
|
|
139571
139673
|
NodePath: fork.use(node_path_1.default),
|
|
139572
139674
|
PathVisitor,
|
|
@@ -139726,8 +139828,8 @@ var require_core22 = __commonJS3({
|
|
|
139726
139828
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
139727
139829
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
139728
139830
|
function default_1(fork) {
|
|
139729
|
-
var
|
|
139730
|
-
var Type =
|
|
139831
|
+
var types17 = fork.use(types_110.default);
|
|
139832
|
+
var Type = types17.Type;
|
|
139731
139833
|
var def = Type.def;
|
|
139732
139834
|
var or = Type.or;
|
|
139733
139835
|
var shared = fork.use(shared_1.default);
|
|
@@ -139817,9 +139919,9 @@ var require_es62 = __commonJS3({
|
|
|
139817
139919
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
139818
139920
|
function default_1(fork) {
|
|
139819
139921
|
fork.use(core_1.default);
|
|
139820
|
-
var
|
|
139821
|
-
var def =
|
|
139822
|
-
var or =
|
|
139922
|
+
var types17 = fork.use(types_110.default);
|
|
139923
|
+
var def = types17.Type.def;
|
|
139924
|
+
var or = types17.Type.or;
|
|
139823
139925
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
139824
139926
|
def("Function").field("generator", Boolean, defaults2["false"]).field("expression", Boolean, defaults2["false"]).field("defaults", [or(def("Expression"), null)], defaults2.emptyArray).field("rest", or(def("Identifier"), null), defaults2["null"]);
|
|
139825
139927
|
def("RestElement").bases("Pattern").build("argument").field("argument", def("Pattern")).field(
|
|
@@ -139905,8 +140007,8 @@ var require_es20172 = __commonJS3({
|
|
|
139905
140007
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
139906
140008
|
function default_1(fork) {
|
|
139907
140009
|
fork.use(es2016_1.default);
|
|
139908
|
-
var
|
|
139909
|
-
var def =
|
|
140010
|
+
var types17 = fork.use(types_110.default);
|
|
140011
|
+
var def = types17.Type.def;
|
|
139910
140012
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
139911
140013
|
def("Function").field("async", Boolean, defaults2["false"]);
|
|
139912
140014
|
def("AwaitExpression").bases("Expression").build("argument").field("argument", def("Expression"));
|
|
@@ -139927,9 +140029,9 @@ var require_es20182 = __commonJS3({
|
|
|
139927
140029
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
139928
140030
|
function default_1(fork) {
|
|
139929
140031
|
fork.use(es2017_1.default);
|
|
139930
|
-
var
|
|
139931
|
-
var def =
|
|
139932
|
-
var or =
|
|
140032
|
+
var types17 = fork.use(types_110.default);
|
|
140033
|
+
var def = types17.Type.def;
|
|
140034
|
+
var or = types17.Type.or;
|
|
139933
140035
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
139934
140036
|
def("ForOfStatement").field("await", Boolean, defaults2["false"]);
|
|
139935
140037
|
def("SpreadProperty").bases("Node").build("argument").field("argument", def("Expression"));
|
|
@@ -139958,9 +140060,9 @@ var require_es20192 = __commonJS3({
|
|
|
139958
140060
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
139959
140061
|
function default_1(fork) {
|
|
139960
140062
|
fork.use(es2018_1.default);
|
|
139961
|
-
var
|
|
139962
|
-
var def =
|
|
139963
|
-
var or =
|
|
140063
|
+
var types17 = fork.use(types_110.default);
|
|
140064
|
+
var def = types17.Type.def;
|
|
140065
|
+
var or = types17.Type.or;
|
|
139964
140066
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
139965
140067
|
def("CatchClause").field("param", or(def("Pattern"), null), defaults2["null"]);
|
|
139966
140068
|
}
|
|
@@ -139982,9 +140084,9 @@ var require_es202022 = __commonJS3({
|
|
|
139982
140084
|
function default_1(fork) {
|
|
139983
140085
|
fork.use(es2020_1.default);
|
|
139984
140086
|
fork.use(es2019_1.default);
|
|
139985
|
-
var
|
|
139986
|
-
var def =
|
|
139987
|
-
var or =
|
|
140087
|
+
var types17 = fork.use(types_110.default);
|
|
140088
|
+
var def = types17.Type.def;
|
|
140089
|
+
var or = types17.Type.or;
|
|
139988
140090
|
var shared = fork.use(shared_1.default);
|
|
139989
140091
|
var defaults2 = shared.defaults;
|
|
139990
140092
|
def("ImportExpression").bases("Expression").build("source").field("source", def("Expression"));
|
|
@@ -140030,8 +140132,8 @@ var require_es20222 = __commonJS3({
|
|
|
140030
140132
|
var shared_1 = require_shared2();
|
|
140031
140133
|
function default_1(fork) {
|
|
140032
140134
|
fork.use(es2021_1.default);
|
|
140033
|
-
var
|
|
140034
|
-
var def =
|
|
140135
|
+
var types17 = fork.use(types_110.default);
|
|
140136
|
+
var def = types17.Type.def;
|
|
140035
140137
|
def("StaticBlock").bases("Declaration").build("body").field("body", [def("Statement")]);
|
|
140036
140138
|
}
|
|
140037
140139
|
exports.default = default_1;
|
|
@@ -140050,9 +140152,9 @@ var require_es_proposals2 = __commonJS3({
|
|
|
140050
140152
|
var es2022_1 = tslib_1.__importDefault(require_es20222());
|
|
140051
140153
|
function default_1(fork) {
|
|
140052
140154
|
fork.use(es2022_1.default);
|
|
140053
|
-
var
|
|
140054
|
-
var Type =
|
|
140055
|
-
var def =
|
|
140155
|
+
var types17 = fork.use(types_110.default);
|
|
140156
|
+
var Type = types17.Type;
|
|
140157
|
+
var def = types17.Type.def;
|
|
140056
140158
|
var or = Type.or;
|
|
140057
140159
|
var shared = fork.use(shared_1.default);
|
|
140058
140160
|
var defaults2 = shared.defaults;
|
|
@@ -140090,9 +140192,9 @@ var require_jsx2 = __commonJS3({
|
|
|
140090
140192
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
140091
140193
|
function default_1(fork) {
|
|
140092
140194
|
fork.use(es_proposals_1.default);
|
|
140093
|
-
var
|
|
140094
|
-
var def =
|
|
140095
|
-
var or =
|
|
140195
|
+
var types17 = fork.use(types_110.default);
|
|
140196
|
+
var def = types17.Type.def;
|
|
140197
|
+
var or = types17.Type.or;
|
|
140096
140198
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
140097
140199
|
def("JSXAttribute").bases("Node").build("name", "value").field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))).field("value", or(
|
|
140098
140200
|
def("Literal"),
|
|
@@ -140148,9 +140250,9 @@ var require_type_annotations2 = __commonJS3({
|
|
|
140148
140250
|
var types_110 = tslib_1.__importDefault(require_types2());
|
|
140149
140251
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
140150
140252
|
function default_1(fork) {
|
|
140151
|
-
var
|
|
140152
|
-
var def =
|
|
140153
|
-
var or =
|
|
140253
|
+
var types17 = fork.use(types_110.default);
|
|
140254
|
+
var def = types17.Type.def;
|
|
140255
|
+
var or = types17.Type.or;
|
|
140154
140256
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
140155
140257
|
var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null);
|
|
140156
140258
|
var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null);
|
|
@@ -140183,9 +140285,9 @@ var require_flow2 = __commonJS3({
|
|
|
140183
140285
|
function default_1(fork) {
|
|
140184
140286
|
fork.use(es_proposals_1.default);
|
|
140185
140287
|
fork.use(type_annotations_1.default);
|
|
140186
|
-
var
|
|
140187
|
-
var def =
|
|
140188
|
-
var or =
|
|
140288
|
+
var types17 = fork.use(types_110.default);
|
|
140289
|
+
var def = types17.Type.def;
|
|
140290
|
+
var or = types17.Type.or;
|
|
140189
140291
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
140190
140292
|
def("Flow").bases("Node");
|
|
140191
140293
|
def("FlowType").bases("Flow");
|
|
@@ -140297,10 +140399,10 @@ var require_esprima4 = __commonJS3({
|
|
|
140297
140399
|
var shared_1 = tslib_1.__importStar(require_shared2());
|
|
140298
140400
|
function default_1(fork) {
|
|
140299
140401
|
fork.use(es_proposals_1.default);
|
|
140300
|
-
var
|
|
140402
|
+
var types17 = fork.use(types_110.default);
|
|
140301
140403
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
140302
|
-
var def =
|
|
140303
|
-
var or =
|
|
140404
|
+
var def = types17.Type.def;
|
|
140405
|
+
var or = types17.Type.or;
|
|
140304
140406
|
def("VariableDeclaration").field("declarations", [or(
|
|
140305
140407
|
def("VariableDeclarator"),
|
|
140306
140408
|
def("Identifier")
|
|
@@ -140343,11 +140445,11 @@ var require_babel_core2 = __commonJS3({
|
|
|
140343
140445
|
function default_1(fork) {
|
|
140344
140446
|
var _a, _b, _c, _d, _e;
|
|
140345
140447
|
fork.use(es_proposals_1.default);
|
|
140346
|
-
var
|
|
140448
|
+
var types17 = fork.use(types_110.default);
|
|
140347
140449
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
140348
|
-
var def =
|
|
140349
|
-
var or =
|
|
140350
|
-
var isUndefined =
|
|
140450
|
+
var def = types17.Type.def;
|
|
140451
|
+
var or = types17.Type.or;
|
|
140452
|
+
var isUndefined = types17.builtInTypes.undefined;
|
|
140351
140453
|
def("Noop").bases("Statement").build();
|
|
140352
140454
|
def("DoExpression").bases("Expression").build("body").field("body", [def("Statement")]);
|
|
140353
140455
|
def("BindExpression").bases("Expression").build("object", "callee").field("object", or(def("Expression"), null)).field("callee", def("Expression"));
|
|
@@ -140372,7 +140474,7 @@ var require_babel_core2 = __commonJS3({
|
|
|
140372
140474
|
raw: String
|
|
140373
140475
|
},
|
|
140374
140476
|
function getDefault() {
|
|
140375
|
-
var value2 =
|
|
140477
|
+
var value2 = types17.getFieldValue(this, "value");
|
|
140376
140478
|
return {
|
|
140377
140479
|
rawValue: value2,
|
|
140378
140480
|
raw: toRaw ? toRaw(value2) : String(value2)
|
|
@@ -140473,8 +140575,8 @@ var require_babel2 = __commonJS3({
|
|
|
140473
140575
|
var flow_1 = tslib_1.__importDefault(require_flow2());
|
|
140474
140576
|
var shared_1 = require_shared2();
|
|
140475
140577
|
function default_1(fork) {
|
|
140476
|
-
var
|
|
140477
|
-
var def =
|
|
140578
|
+
var types17 = fork.use(types_110.default);
|
|
140579
|
+
var def = types17.Type.def;
|
|
140478
140580
|
fork.use(babel_core_1.default);
|
|
140479
140581
|
fork.use(flow_1.default);
|
|
140480
140582
|
def("V8IntrinsicIdentifier").bases("Expression").build("name").field("name", String);
|
|
@@ -140498,12 +140600,12 @@ var require_typescript2 = __commonJS3({
|
|
|
140498
140600
|
function default_1(fork) {
|
|
140499
140601
|
fork.use(babel_core_1.default);
|
|
140500
140602
|
fork.use(type_annotations_1.default);
|
|
140501
|
-
var
|
|
140502
|
-
var n2 =
|
|
140503
|
-
var def =
|
|
140504
|
-
var or =
|
|
140603
|
+
var types17 = fork.use(types_110.default);
|
|
140604
|
+
var n2 = types17.namedTypes;
|
|
140605
|
+
var def = types17.Type.def;
|
|
140606
|
+
var or = types17.Type.or;
|
|
140505
140607
|
var defaults2 = fork.use(shared_1.default).defaults;
|
|
140506
|
-
var StringLiteral =
|
|
140608
|
+
var StringLiteral = types17.Type.from(function(value2, deep) {
|
|
140507
140609
|
if (n2.StringLiteral && n2.StringLiteral.check(value2, deep)) {
|
|
140508
140610
|
return true;
|
|
140509
140611
|
}
|
|
@@ -140699,7 +140801,7 @@ var require_main3 = __commonJS3({
|
|
|
140699
140801
|
var someField = _a.someField;
|
|
140700
140802
|
var Type = _a.Type;
|
|
140701
140803
|
var use = _a.use;
|
|
140702
|
-
var
|
|
140804
|
+
var visit13 = _a.visit;
|
|
140703
140805
|
exports.astNodesAreEquivalent = astNodesAreEquivalent;
|
|
140704
140806
|
exports.builders = builders;
|
|
140705
140807
|
exports.builtInTypes = builtInTypes;
|
|
@@ -140716,7 +140818,7 @@ var require_main3 = __commonJS3({
|
|
|
140716
140818
|
exports.someField = someField;
|
|
140717
140819
|
exports.Type = Type;
|
|
140718
140820
|
exports.use = use;
|
|
140719
|
-
exports.visit =
|
|
140821
|
+
exports.visit = visit13;
|
|
140720
140822
|
Object.assign(namedTypes_1.namedTypes, n2);
|
|
140721
140823
|
}
|
|
140722
140824
|
});
|
|
@@ -140840,34 +140942,34 @@ var require_util3 = __commonJS3({
|
|
|
140840
140942
|
}
|
|
140841
140943
|
exports.urlParse = urlParse;
|
|
140842
140944
|
function urlGenerate(aParsedUrl) {
|
|
140843
|
-
var
|
|
140945
|
+
var url2 = "";
|
|
140844
140946
|
if (aParsedUrl.scheme) {
|
|
140845
|
-
|
|
140947
|
+
url2 += aParsedUrl.scheme + ":";
|
|
140846
140948
|
}
|
|
140847
|
-
|
|
140949
|
+
url2 += "//";
|
|
140848
140950
|
if (aParsedUrl.auth) {
|
|
140849
|
-
|
|
140951
|
+
url2 += aParsedUrl.auth + "@";
|
|
140850
140952
|
}
|
|
140851
140953
|
if (aParsedUrl.host) {
|
|
140852
|
-
|
|
140954
|
+
url2 += aParsedUrl.host;
|
|
140853
140955
|
}
|
|
140854
140956
|
if (aParsedUrl.port) {
|
|
140855
|
-
|
|
140957
|
+
url2 += ":" + aParsedUrl.port;
|
|
140856
140958
|
}
|
|
140857
140959
|
if (aParsedUrl.path) {
|
|
140858
|
-
|
|
140960
|
+
url2 += aParsedUrl.path;
|
|
140859
140961
|
}
|
|
140860
|
-
return
|
|
140962
|
+
return url2;
|
|
140861
140963
|
}
|
|
140862
140964
|
exports.urlGenerate = urlGenerate;
|
|
140863
140965
|
function normalize(aPath) {
|
|
140864
140966
|
var path22 = aPath;
|
|
140865
|
-
var
|
|
140866
|
-
if (
|
|
140867
|
-
if (!
|
|
140967
|
+
var url2 = urlParse(aPath);
|
|
140968
|
+
if (url2) {
|
|
140969
|
+
if (!url2.path) {
|
|
140868
140970
|
return aPath;
|
|
140869
140971
|
}
|
|
140870
|
-
path22 =
|
|
140972
|
+
path22 = url2.path;
|
|
140871
140973
|
}
|
|
140872
140974
|
var isAbsolute22 = exports.isAbsolute(path22);
|
|
140873
140975
|
var parts = path22.split(/\/+/);
|
|
@@ -140891,9 +140993,9 @@ var require_util3 = __commonJS3({
|
|
|
140891
140993
|
if (path22 === "") {
|
|
140892
140994
|
path22 = isAbsolute22 ? "/" : ".";
|
|
140893
140995
|
}
|
|
140894
|
-
if (
|
|
140895
|
-
|
|
140896
|
-
return urlGenerate(
|
|
140996
|
+
if (url2) {
|
|
140997
|
+
url2.path = path22;
|
|
140998
|
+
return urlGenerate(url2);
|
|
140897
140999
|
}
|
|
140898
141000
|
return path22;
|
|
140899
141001
|
}
|
|
@@ -141959,13 +142061,13 @@ var require_source_map_consumer2 = __commonJS3({
|
|
|
141959
142061
|
if (this.sourceRoot != null) {
|
|
141960
142062
|
relativeSource = util2.relative(this.sourceRoot, relativeSource);
|
|
141961
142063
|
}
|
|
141962
|
-
var
|
|
141963
|
-
if (this.sourceRoot != null && (
|
|
142064
|
+
var url2;
|
|
142065
|
+
if (this.sourceRoot != null && (url2 = util2.urlParse(this.sourceRoot))) {
|
|
141964
142066
|
var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
|
|
141965
|
-
if (
|
|
142067
|
+
if (url2.scheme == "file" && this._sources.has(fileUriAbsPath)) {
|
|
141966
142068
|
return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
|
|
141967
142069
|
}
|
|
141968
|
-
if ((!
|
|
142070
|
+
if ((!url2.path || url2.path == "/") && this._sources.has("/" + relativeSource)) {
|
|
141969
142071
|
return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
|
|
141970
142072
|
}
|
|
141971
142073
|
}
|
|
@@ -142451,8 +142553,8 @@ var require_util22 = __commonJS3({
|
|
|
142451
142553
|
exports.isTrailingCommaEnabled = exports.getParentExportDeclaration = exports.isExportDeclaration = exports.fixFaultyLocations = exports.getTrueLoc = exports.composeSourceMaps = exports.copyPos = exports.comparePos = exports.getUnionOfKeys = exports.getOption = exports.isBrowser = exports.getLineTerminator = void 0;
|
|
142452
142554
|
var tslib_1 = require_tslib2();
|
|
142453
142555
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
142454
|
-
var
|
|
142455
|
-
var n2 =
|
|
142556
|
+
var types17 = tslib_1.__importStar(require_main3());
|
|
142557
|
+
var n2 = types17.namedTypes;
|
|
142456
142558
|
var source_map_1 = tslib_1.__importDefault(require_source_map2());
|
|
142457
142559
|
var SourceMapConsumer = source_map_1.default.SourceMapConsumer;
|
|
142458
142560
|
var SourceMapGenerator = source_map_1.default.SourceMapGenerator;
|
|
@@ -149758,10 +149860,10 @@ var require_comments2 = __commonJS3({
|
|
|
149758
149860
|
exports.printComments = exports.attach = void 0;
|
|
149759
149861
|
var tslib_1 = require_tslib2();
|
|
149760
149862
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
149761
|
-
var
|
|
149762
|
-
var n2 =
|
|
149763
|
-
var isArray2 =
|
|
149764
|
-
var isObject2 =
|
|
149863
|
+
var types17 = tslib_1.__importStar(require_main3());
|
|
149864
|
+
var n2 = types17.namedTypes;
|
|
149865
|
+
var isArray2 = types17.builtInTypes.array;
|
|
149866
|
+
var isObject2 = types17.builtInTypes.object;
|
|
149765
149867
|
var lines_1 = require_lines2();
|
|
149766
149868
|
var util_110 = require_util22();
|
|
149767
149869
|
var childNodesCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -149792,7 +149894,7 @@ var require_comments2 = __commonJS3({
|
|
|
149792
149894
|
if (isArray2.check(node2)) {
|
|
149793
149895
|
names = Object.keys(node2);
|
|
149794
149896
|
} else if (isObject2.check(node2)) {
|
|
149795
|
-
names =
|
|
149897
|
+
names = types17.getFieldNames(node2);
|
|
149796
149898
|
} else {
|
|
149797
149899
|
return resultArray;
|
|
149798
149900
|
}
|
|
@@ -149970,7 +150072,7 @@ var require_comments2 = __commonJS3({
|
|
|
149970
150072
|
function printComments(path22, print12) {
|
|
149971
150073
|
var value2 = path22.getValue();
|
|
149972
150074
|
var innerLines = print12(path22);
|
|
149973
|
-
var comments = n2.Node.check(value2) &&
|
|
150075
|
+
var comments = n2.Node.check(value2) && types17.getFieldValue(value2, "comments");
|
|
149974
150076
|
if (!comments || comments.length === 0) {
|
|
149975
150077
|
return innerLines;
|
|
149976
150078
|
}
|
|
@@ -149978,8 +150080,8 @@ var require_comments2 = __commonJS3({
|
|
|
149978
150080
|
var trailingParts = [innerLines];
|
|
149979
150081
|
path22.each(function(commentPath) {
|
|
149980
150082
|
var comment = commentPath.getValue();
|
|
149981
|
-
var leading =
|
|
149982
|
-
var trailing =
|
|
150083
|
+
var leading = types17.getFieldValue(comment, "leading");
|
|
150084
|
+
var trailing = types17.getFieldValue(comment, "trailing");
|
|
149983
150085
|
if (leading || trailing && !(n2.Statement.check(value2) || comment.type === "Block" || comment.type === "CommentBlock")) {
|
|
149984
150086
|
leadingParts.push(printLeadingComment(commentPath, print12));
|
|
149985
150087
|
} else if (trailing) {
|
|
@@ -149999,10 +150101,10 @@ var require_parser22 = __commonJS3({
|
|
|
149999
150101
|
exports.parse = void 0;
|
|
150000
150102
|
var tslib_1 = require_tslib2();
|
|
150001
150103
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
150002
|
-
var
|
|
150003
|
-
var b =
|
|
150004
|
-
var isObject2 =
|
|
150005
|
-
var isArray2 =
|
|
150104
|
+
var types17 = tslib_1.__importStar(require_main3());
|
|
150105
|
+
var b = types17.builders;
|
|
150106
|
+
var isObject2 = types17.builtInTypes.object;
|
|
150107
|
+
var isArray2 = types17.builtInTypes.array;
|
|
150006
150108
|
var options_1 = require_options2();
|
|
150007
150109
|
var lines_1 = require_lines2();
|
|
150008
150110
|
var comments_1 = require_comments2();
|
|
@@ -150186,11 +150288,11 @@ var require_fast_path2 = __commonJS3({
|
|
|
150186
150288
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
150187
150289
|
var tslib_1 = require_tslib2();
|
|
150188
150290
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
150189
|
-
var
|
|
150291
|
+
var types17 = tslib_1.__importStar(require_main3());
|
|
150190
150292
|
var util2 = tslib_1.__importStar(require_util22());
|
|
150191
|
-
var n2 =
|
|
150192
|
-
var isArray2 =
|
|
150193
|
-
var isNumber2 =
|
|
150293
|
+
var n2 = types17.namedTypes;
|
|
150294
|
+
var isArray2 = types17.builtInTypes.array;
|
|
150295
|
+
var isNumber2 = types17.builtInTypes.number;
|
|
150194
150296
|
var PRECEDENCE = {};
|
|
150195
150297
|
[
|
|
150196
150298
|
["??"],
|
|
@@ -150219,7 +150321,7 @@ var require_fast_path2 = __commonJS3({
|
|
|
150219
150321
|
if (obj instanceof FastPath) {
|
|
150220
150322
|
return obj.copy();
|
|
150221
150323
|
}
|
|
150222
|
-
if (obj instanceof
|
|
150324
|
+
if (obj instanceof types17.NodePath) {
|
|
150223
150325
|
var copy = Object.create(FastPath.prototype);
|
|
150224
150326
|
var stack = [obj.value];
|
|
150225
150327
|
for (var pp2 = void 0; pp2 = obj.parentPath; obj = pp2)
|
|
@@ -150530,7 +150632,7 @@ var require_fast_path2 = __commonJS3({
|
|
|
150530
150632
|
return node2.some(containsCallExpression);
|
|
150531
150633
|
}
|
|
150532
150634
|
if (n2.Node.check(node2)) {
|
|
150533
|
-
return
|
|
150635
|
+
return types17.someField(node2, function(_name, child) {
|
|
150534
150636
|
return containsCallExpression(child);
|
|
150535
150637
|
});
|
|
150536
150638
|
}
|
|
@@ -150618,16 +150720,16 @@ var require_patcher2 = __commonJS3({
|
|
|
150618
150720
|
var tslib_1 = require_tslib2();
|
|
150619
150721
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
150620
150722
|
var linesModule = tslib_1.__importStar(require_lines2());
|
|
150621
|
-
var
|
|
150622
|
-
var Printable =
|
|
150623
|
-
var Expression =
|
|
150624
|
-
var ReturnStatement =
|
|
150625
|
-
var SourceLocation3 =
|
|
150723
|
+
var types17 = tslib_1.__importStar(require_main3());
|
|
150724
|
+
var Printable = types17.namedTypes.Printable;
|
|
150725
|
+
var Expression = types17.namedTypes.Expression;
|
|
150726
|
+
var ReturnStatement = types17.namedTypes.ReturnStatement;
|
|
150727
|
+
var SourceLocation3 = types17.namedTypes.SourceLocation;
|
|
150626
150728
|
var util_110 = require_util22();
|
|
150627
150729
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path2());
|
|
150628
|
-
var isObject2 =
|
|
150629
|
-
var isArray2 =
|
|
150630
|
-
var isString3 =
|
|
150730
|
+
var isObject2 = types17.builtInTypes.object;
|
|
150731
|
+
var isArray2 = types17.builtInTypes.array;
|
|
150732
|
+
var isString3 = types17.builtInTypes.string;
|
|
150631
150733
|
var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
|
|
150632
150734
|
var Patcher = function Patcher2(lines) {
|
|
150633
150735
|
assert_1.default.ok(this instanceof Patcher2);
|
|
@@ -150897,8 +150999,8 @@ var require_patcher2 = __commonJS3({
|
|
|
150897
150999
|
if (k.charAt(0) === "_") {
|
|
150898
151000
|
continue;
|
|
150899
151001
|
}
|
|
150900
|
-
newPath.stack.push(k,
|
|
150901
|
-
oldPath.stack.push(k,
|
|
151002
|
+
newPath.stack.push(k, types17.getFieldValue(newNode, k));
|
|
151003
|
+
oldPath.stack.push(k, types17.getFieldValue(oldNode, k));
|
|
150902
151004
|
var canReprint = findAnyReprints(newPath, oldPath, reprints);
|
|
150903
151005
|
newPath.stack.length -= 2;
|
|
150904
151006
|
oldPath.stack.length -= 2;
|
|
@@ -150920,16 +151022,16 @@ var require_printer22 = __commonJS3({
|
|
|
150920
151022
|
exports.Printer = void 0;
|
|
150921
151023
|
var tslib_1 = require_tslib2();
|
|
150922
151024
|
var assert_1 = tslib_1.__importDefault(__require2("assert"));
|
|
150923
|
-
var
|
|
151025
|
+
var types17 = tslib_1.__importStar(require_main3());
|
|
150924
151026
|
var comments_1 = require_comments2();
|
|
150925
151027
|
var fast_path_1 = tslib_1.__importDefault(require_fast_path2());
|
|
150926
151028
|
var lines_1 = require_lines2();
|
|
150927
151029
|
var options_1 = require_options2();
|
|
150928
151030
|
var patcher_1 = require_patcher2();
|
|
150929
151031
|
var util2 = tslib_1.__importStar(require_util22());
|
|
150930
|
-
var namedTypes =
|
|
150931
|
-
var isString3 =
|
|
150932
|
-
var isObject2 =
|
|
151032
|
+
var namedTypes = types17.namedTypes;
|
|
151033
|
+
var isString3 = types17.builtInTypes.string;
|
|
151034
|
+
var isObject2 = types17.builtInTypes.object;
|
|
150933
151035
|
var PrintResult = function PrintResult2(code, sourceMap) {
|
|
150934
151036
|
assert_1.default.ok(this instanceof PrintResult2);
|
|
150935
151037
|
isString3.assert(code);
|
|
@@ -151091,7 +151193,7 @@ var require_printer22 = __commonJS3({
|
|
|
151091
151193
|
case "OptionalMemberExpression": {
|
|
151092
151194
|
parts.push(path22.call(print12, "object"));
|
|
151093
151195
|
var property = path22.call(print12, "property");
|
|
151094
|
-
var optional =
|
|
151196
|
+
var optional = types17.getFieldValue(n2, "optional");
|
|
151095
151197
|
if (n2.computed) {
|
|
151096
151198
|
parts.push(optional ? "?.[" : "[", property, "]");
|
|
151097
151199
|
} else {
|
|
@@ -151362,7 +151464,7 @@ var require_printer22 = __commonJS3({
|
|
|
151362
151464
|
if (n2.typeArguments) {
|
|
151363
151465
|
parts.push(path22.call(print12, "typeArguments"));
|
|
151364
151466
|
}
|
|
151365
|
-
if (
|
|
151467
|
+
if (types17.getFieldValue(n2, "optional")) {
|
|
151366
151468
|
parts.push("?.");
|
|
151367
151469
|
}
|
|
151368
151470
|
parts.push(printArgumentsList(path22, options, print12));
|
|
@@ -153041,8 +153143,8 @@ var require_printer22 = __commonJS3({
|
|
|
153041
153143
|
});
|
|
153042
153144
|
}
|
|
153043
153145
|
function getPossibleRaw(node2) {
|
|
153044
|
-
var value2 =
|
|
153045
|
-
var extra =
|
|
153146
|
+
var value2 = types17.getFieldValue(node2, "value");
|
|
153147
|
+
var extra = types17.getFieldValue(node2, "extra");
|
|
153046
153148
|
if (extra && typeof extra.raw === "string" && value2 == extra.rawValue) {
|
|
153047
153149
|
return extra.raw;
|
|
153048
153150
|
}
|
|
@@ -153088,8 +153190,8 @@ var require_main22 = __commonJS3({
|
|
|
153088
153190
|
exports.run = exports.prettyPrint = exports.print = exports.visit = exports.types = exports.parse = void 0;
|
|
153089
153191
|
var tslib_1 = require_tslib2();
|
|
153090
153192
|
var fs_1 = tslib_1.__importDefault(__require2("fs"));
|
|
153091
|
-
var
|
|
153092
|
-
exports.types =
|
|
153193
|
+
var types17 = tslib_1.__importStar(require_main3());
|
|
153194
|
+
exports.types = types17;
|
|
153093
153195
|
var parser_1 = require_parser22();
|
|
153094
153196
|
Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
|
|
153095
153197
|
return parser_1.parse;
|
|
@@ -153103,10 +153205,10 @@ var require_main22 = __commonJS3({
|
|
|
153103
153205
|
return new printer_1.Printer(options).print(node2);
|
|
153104
153206
|
}
|
|
153105
153207
|
exports.print = print12;
|
|
153106
|
-
function
|
|
153208
|
+
function prettyPrint3(node2, options) {
|
|
153107
153209
|
return new printer_1.Printer(options).printGenerically(node2);
|
|
153108
153210
|
}
|
|
153109
|
-
exports.prettyPrint =
|
|
153211
|
+
exports.prettyPrint = prettyPrint3;
|
|
153110
153212
|
function run(transformer, options) {
|
|
153111
153213
|
return runFile(process.argv[2], transformer, options);
|
|
153112
153214
|
}
|
|
@@ -153259,7 +153361,7 @@ var import__ = __toESM3(require_safe_stable_stringify(), 1);
|
|
|
153259
153361
|
var configure = import__.default.configure;
|
|
153260
153362
|
var import_micromatch = __toESM3(require_micromatch(), 1);
|
|
153261
153363
|
var log = new Log("Watch-and-Run");
|
|
153262
|
-
var
|
|
153364
|
+
var graphql29 = __toESM3(require_graphql22(), 1);
|
|
153263
153365
|
var import_graphql162 = __toESM3(require_graphql22(), 1);
|
|
153264
153366
|
var import_graphql30 = __toESM3(require_graphql22(), 1);
|
|
153265
153367
|
var AggregateErrorImpl2;
|
|
@@ -153446,7 +153548,7 @@ var printDocASTReducer2 = {
|
|
|
153446
153548
|
leave: ({ name: name2, interfaces, directives, fields }) => join3(["interface", name2, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ")
|
|
153447
153549
|
},
|
|
153448
153550
|
UnionTypeDefinition: {
|
|
153449
|
-
leave: ({ name: name2, directives, types:
|
|
153551
|
+
leave: ({ name: name2, directives, types: types17 }) => join3(["union", name2, join3(directives, " "), wrap2("= ", join3(types17, " | "))], " ")
|
|
153450
153552
|
},
|
|
153451
153553
|
EnumTypeDefinition: {
|
|
153452
153554
|
leave: ({ name: name2, directives, values }) => join3(["enum", name2, join3(directives, " "), block2(values)], " ")
|
|
@@ -153473,7 +153575,7 @@ var printDocASTReducer2 = {
|
|
|
153473
153575
|
leave: ({ name: name2, interfaces, directives, fields }) => join3(["extend interface", name2, wrap2("implements ", join3(interfaces, " & ")), join3(directives, " "), block2(fields)], " ")
|
|
153474
153576
|
},
|
|
153475
153577
|
UnionTypeExtension: {
|
|
153476
|
-
leave: ({ name: name2, directives, types:
|
|
153578
|
+
leave: ({ name: name2, directives, types: types17 }) => join3(["extend union", name2, join3(directives, " "), wrap2("= ", join3(types17, " | "))], " ")
|
|
153477
153579
|
},
|
|
153478
153580
|
EnumTypeExtension: {
|
|
153479
153581
|
leave: ({ name: name2, directives, values }) => join3(["extend enum", name2, join3(directives, " "), block2(values)], " ")
|
|
@@ -154003,8 +154105,8 @@ var List2 = class {
|
|
|
154003
154105
|
} else {
|
|
154004
154106
|
entries = this.cache._internal_unstable.storage.get(value2, "edges").value;
|
|
154005
154107
|
}
|
|
154006
|
-
for (let
|
|
154007
|
-
yield
|
|
154108
|
+
for (let record2 of entries) {
|
|
154109
|
+
yield record2;
|
|
154008
154110
|
}
|
|
154009
154111
|
}
|
|
154010
154112
|
};
|
|
@@ -154052,6 +154154,44 @@ var ListCollection2 = class {
|
|
|
154052
154154
|
}
|
|
154053
154155
|
}
|
|
154054
154156
|
};
|
|
154157
|
+
var SchemaManager2 = class {
|
|
154158
|
+
cache;
|
|
154159
|
+
fieldTypes = {};
|
|
154160
|
+
constructor(cache) {
|
|
154161
|
+
this.cache = cache;
|
|
154162
|
+
}
|
|
154163
|
+
setFieldType({
|
|
154164
|
+
parent,
|
|
154165
|
+
key,
|
|
154166
|
+
type,
|
|
154167
|
+
nullable = false,
|
|
154168
|
+
link
|
|
154169
|
+
}) {
|
|
154170
|
+
let parensIndex = key.indexOf("(");
|
|
154171
|
+
if (parensIndex !== -1) {
|
|
154172
|
+
key = key.substring(0, parensIndex);
|
|
154173
|
+
}
|
|
154174
|
+
if (parent === rootID2) {
|
|
154175
|
+
parent = "Query";
|
|
154176
|
+
} else if (parent.includes(":")) {
|
|
154177
|
+
parent = parent.substring(0, parent.indexOf(":"));
|
|
154178
|
+
}
|
|
154179
|
+
if (!this.fieldTypes[parent]) {
|
|
154180
|
+
this.fieldTypes[parent] = {};
|
|
154181
|
+
}
|
|
154182
|
+
this.fieldTypes[parent][key] = {
|
|
154183
|
+
type,
|
|
154184
|
+
nullable,
|
|
154185
|
+
link: !!link
|
|
154186
|
+
};
|
|
154187
|
+
}
|
|
154188
|
+
fieldType(type, field) {
|
|
154189
|
+
return this.fieldTypes[type]?.[field] || null;
|
|
154190
|
+
}
|
|
154191
|
+
get config() {
|
|
154192
|
+
return this.cache._internal_unstable.config;
|
|
154193
|
+
}
|
|
154194
|
+
};
|
|
154055
154195
|
var InMemoryStorage2 = class {
|
|
154056
154196
|
data;
|
|
154057
154197
|
idCount = 0;
|
|
@@ -154614,7 +154754,7 @@ var InMemorySubscriptions2 = class {
|
|
|
154614
154754
|
}
|
|
154615
154755
|
}
|
|
154616
154756
|
};
|
|
154617
|
-
var
|
|
154757
|
+
var Cache32 = class {
|
|
154618
154758
|
_internal_unstable;
|
|
154619
154759
|
constructor(config4) {
|
|
154620
154760
|
this._internal_unstable = new CacheInternal2({
|
|
@@ -154622,7 +154762,8 @@ var Cache22 = class {
|
|
|
154622
154762
|
storage: new InMemoryStorage2(),
|
|
154623
154763
|
subscriptions: new InMemorySubscriptions2(this),
|
|
154624
154764
|
lists: new ListManager2(this, rootID2),
|
|
154625
|
-
lifetimes: new GarbageCollector2(this)
|
|
154765
|
+
lifetimes: new GarbageCollector2(this),
|
|
154766
|
+
schema: new SchemaManager2(this)
|
|
154626
154767
|
});
|
|
154627
154768
|
if (config4) {
|
|
154628
154769
|
this.setConfig(defaultConfigValues2(config4));
|
|
@@ -154708,18 +154849,21 @@ var CacheInternal2 = class {
|
|
|
154708
154849
|
lists;
|
|
154709
154850
|
cache;
|
|
154710
154851
|
lifetimes;
|
|
154852
|
+
schema;
|
|
154711
154853
|
constructor({
|
|
154712
154854
|
storage,
|
|
154713
154855
|
subscriptions,
|
|
154714
154856
|
lists,
|
|
154715
154857
|
cache,
|
|
154716
|
-
lifetimes
|
|
154858
|
+
lifetimes,
|
|
154859
|
+
schema
|
|
154717
154860
|
}) {
|
|
154718
154861
|
this.storage = storage;
|
|
154719
154862
|
this.subscriptions = subscriptions;
|
|
154720
154863
|
this.lists = lists;
|
|
154721
154864
|
this.cache = cache;
|
|
154722
154865
|
this.lifetimes = lifetimes;
|
|
154866
|
+
this.schema = schema;
|
|
154723
154867
|
this._disabled = typeof globalThis.window === "undefined";
|
|
154724
154868
|
try {
|
|
154725
154869
|
if (process.env.HOUDINI_TEST === "true") {
|
|
@@ -154735,7 +154879,6 @@ var CacheInternal2 = class {
|
|
|
154735
154879
|
data: data2,
|
|
154736
154880
|
selection: selection2,
|
|
154737
154881
|
variables = {},
|
|
154738
|
-
root = rootID2,
|
|
154739
154882
|
parent = rootID2,
|
|
154740
154883
|
applyUpdates = false,
|
|
154741
154884
|
layer,
|
|
@@ -154758,9 +154901,17 @@ var CacheInternal2 = class {
|
|
|
154758
154901
|
selection: fieldSelection,
|
|
154759
154902
|
operations,
|
|
154760
154903
|
abstract: isAbstract,
|
|
154761
|
-
update
|
|
154904
|
+
update,
|
|
154905
|
+
nullable
|
|
154762
154906
|
} = targetSelection[field];
|
|
154763
154907
|
const key = evaluateKey2(keyRaw, variables);
|
|
154908
|
+
this.schema.setFieldType({
|
|
154909
|
+
parent,
|
|
154910
|
+
key: keyRaw,
|
|
154911
|
+
type: linkedType,
|
|
154912
|
+
nullable,
|
|
154913
|
+
link: !!fieldSelection
|
|
154914
|
+
});
|
|
154764
154915
|
const currentSubscribers = this.subscriptions.get(parent, key);
|
|
154765
154916
|
const { value: previousValue, displayLayers } = this.storage.get(parent, key);
|
|
154766
154917
|
const displayLayer = layer.isDisplayLayer(displayLayers);
|
|
@@ -154829,7 +154980,6 @@ var CacheInternal2 = class {
|
|
|
154829
154980
|
}
|
|
154830
154981
|
if (linkedID) {
|
|
154831
154982
|
this.writeSelection({
|
|
154832
|
-
root,
|
|
154833
154983
|
selection: fieldSelection,
|
|
154834
154984
|
parent: linkedID,
|
|
154835
154985
|
data: value2,
|
|
@@ -155218,7 +155368,7 @@ var CacheInternal2 = class {
|
|
|
155218
155368
|
}
|
|
155219
155369
|
};
|
|
155220
155370
|
var rootID2 = "_ROOT_";
|
|
155221
|
-
var cache_default2 = new
|
|
155371
|
+
var cache_default2 = new Cache32();
|
|
155222
155372
|
var siteURL = "https://houdinigraphql.com";
|
|
155223
155373
|
var houdini_mode2 = {
|
|
155224
155374
|
get is_testing() {
|
|
@@ -155373,6 +155523,7 @@ async function writeFile2(filepath, data2) {
|
|
|
155373
155523
|
return;
|
|
155374
155524
|
}
|
|
155375
155525
|
if (houdini_mode2.is_testing) {
|
|
155526
|
+
import_memfs2.fs.mkdirpSync(dirname2(filepath));
|
|
155376
155527
|
return import_memfs2.fs.writeFileSync(filepath, data2);
|
|
155377
155528
|
}
|
|
155378
155529
|
return await import_promises2.default.writeFile(filepath, data2, "utf8");
|
|
@@ -155931,13 +156082,13 @@ var Response3 = class extends Body2 {
|
|
|
155931
156082
|
highWaterMark: this.highWaterMark
|
|
155932
156083
|
});
|
|
155933
156084
|
}
|
|
155934
|
-
static redirect(
|
|
156085
|
+
static redirect(url2, status = 302) {
|
|
155935
156086
|
if (!isRedirect2(status)) {
|
|
155936
156087
|
throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');
|
|
155937
156088
|
}
|
|
155938
156089
|
return new Response3(null, {
|
|
155939
156090
|
headers: {
|
|
155940
|
-
location: new URL(
|
|
156091
|
+
location: new URL(url2).toString()
|
|
155941
156092
|
},
|
|
155942
156093
|
status
|
|
155943
156094
|
});
|
|
@@ -156126,7 +156277,7 @@ var import_parser2 = __toESM3(require_lib32(), 1);
|
|
|
156126
156277
|
var recast2 = __toESM3(require_main22(), 1);
|
|
156127
156278
|
var AST2 = recast2.types.builders;
|
|
156128
156279
|
var graphql42 = __toESM3(require_graphql22(), 1);
|
|
156129
|
-
var
|
|
156280
|
+
var graphql14 = __toESM3(require_graphql22(), 1);
|
|
156130
156281
|
var recast5 = __toESM3(require_main22(), 1);
|
|
156131
156282
|
var graphql52 = __toESM3(require_graphql22(), 1);
|
|
156132
156283
|
var recast22 = __toESM3(require_main22(), 1);
|
|
@@ -156138,39 +156289,40 @@ var graphql8 = __toESM3(require_graphql22(), 1);
|
|
|
156138
156289
|
var graphql7 = __toESM3(require_graphql22(), 1);
|
|
156139
156290
|
var recast4 = __toESM3(require_main22(), 1);
|
|
156140
156291
|
var AST4 = recast4.types.builders;
|
|
156141
|
-
var
|
|
156142
|
-
var
|
|
156292
|
+
var graphql13 = __toESM3(require_graphql22(), 1);
|
|
156293
|
+
var graphql11 = __toESM3(require_graphql22(), 1);
|
|
156143
156294
|
var graphql9 = __toESM3(require_graphql22(), 1);
|
|
156295
|
+
var graphql10 = __toESM3(require_graphql22(), 1);
|
|
156144
156296
|
var pageInfoSelection = [
|
|
156145
156297
|
{
|
|
156146
|
-
kind:
|
|
156298
|
+
kind: graphql10.Kind.FIELD,
|
|
156147
156299
|
name: {
|
|
156148
|
-
kind:
|
|
156300
|
+
kind: graphql10.Kind.NAME,
|
|
156149
156301
|
value: "edges"
|
|
156150
156302
|
},
|
|
156151
156303
|
selectionSet: {
|
|
156152
|
-
kind:
|
|
156304
|
+
kind: graphql10.Kind.SELECTION_SET,
|
|
156153
156305
|
selections: [
|
|
156154
156306
|
{
|
|
156155
|
-
kind:
|
|
156307
|
+
kind: graphql10.Kind.FIELD,
|
|
156156
156308
|
name: {
|
|
156157
|
-
kind:
|
|
156309
|
+
kind: graphql10.Kind.NAME,
|
|
156158
156310
|
value: "cursor"
|
|
156159
156311
|
}
|
|
156160
156312
|
},
|
|
156161
156313
|
{
|
|
156162
|
-
kind:
|
|
156314
|
+
kind: graphql10.Kind.FIELD,
|
|
156163
156315
|
name: {
|
|
156164
|
-
kind:
|
|
156316
|
+
kind: graphql10.Kind.NAME,
|
|
156165
156317
|
value: "node"
|
|
156166
156318
|
},
|
|
156167
156319
|
selectionSet: {
|
|
156168
|
-
kind:
|
|
156320
|
+
kind: graphql10.Kind.SELECTION_SET,
|
|
156169
156321
|
selections: [
|
|
156170
156322
|
{
|
|
156171
|
-
kind:
|
|
156323
|
+
kind: graphql10.Kind.FIELD,
|
|
156172
156324
|
name: {
|
|
156173
|
-
kind:
|
|
156325
|
+
kind: graphql10.Kind.NAME,
|
|
156174
156326
|
value: "__typename"
|
|
156175
156327
|
}
|
|
156176
156328
|
}
|
|
@@ -156181,39 +156333,39 @@ var pageInfoSelection = [
|
|
|
156181
156333
|
}
|
|
156182
156334
|
},
|
|
156183
156335
|
{
|
|
156184
|
-
kind:
|
|
156336
|
+
kind: graphql10.Kind.FIELD,
|
|
156185
156337
|
name: {
|
|
156186
|
-
kind:
|
|
156338
|
+
kind: graphql10.Kind.NAME,
|
|
156187
156339
|
value: "pageInfo"
|
|
156188
156340
|
},
|
|
156189
156341
|
selectionSet: {
|
|
156190
|
-
kind:
|
|
156342
|
+
kind: graphql10.Kind.SELECTION_SET,
|
|
156191
156343
|
selections: [
|
|
156192
156344
|
{
|
|
156193
|
-
kind:
|
|
156345
|
+
kind: graphql10.Kind.FIELD,
|
|
156194
156346
|
name: {
|
|
156195
|
-
kind:
|
|
156347
|
+
kind: graphql10.Kind.NAME,
|
|
156196
156348
|
value: "hasPreviousPage"
|
|
156197
156349
|
}
|
|
156198
156350
|
},
|
|
156199
156351
|
{
|
|
156200
|
-
kind:
|
|
156352
|
+
kind: graphql10.Kind.FIELD,
|
|
156201
156353
|
name: {
|
|
156202
|
-
kind:
|
|
156354
|
+
kind: graphql10.Kind.NAME,
|
|
156203
156355
|
value: "hasNextPage"
|
|
156204
156356
|
}
|
|
156205
156357
|
},
|
|
156206
156358
|
{
|
|
156207
|
-
kind:
|
|
156359
|
+
kind: graphql10.Kind.FIELD,
|
|
156208
156360
|
name: {
|
|
156209
|
-
kind:
|
|
156361
|
+
kind: graphql10.Kind.NAME,
|
|
156210
156362
|
value: "startCursor"
|
|
156211
156363
|
}
|
|
156212
156364
|
},
|
|
156213
156365
|
{
|
|
156214
|
-
kind:
|
|
156366
|
+
kind: graphql10.Kind.FIELD,
|
|
156215
156367
|
name: {
|
|
156216
|
-
kind:
|
|
156368
|
+
kind: graphql10.Kind.NAME,
|
|
156217
156369
|
value: "endCursor"
|
|
156218
156370
|
}
|
|
156219
156371
|
}
|
|
@@ -156221,33 +156373,38 @@ var pageInfoSelection = [
|
|
|
156221
156373
|
}
|
|
156222
156374
|
}
|
|
156223
156375
|
];
|
|
156224
|
-
var
|
|
156376
|
+
var graphql12 = __toESM3(require_graphql22(), 1);
|
|
156225
156377
|
var AST5 = recast5.types.builders;
|
|
156226
|
-
var
|
|
156378
|
+
var recast6 = __toESM3(require_main22(), 1);
|
|
156379
|
+
var AST6 = recast6.types.builders;
|
|
156380
|
+
var recast12 = __toESM3(require_main22(), 1);
|
|
156381
|
+
var graphql17 = __toESM3(require_graphql22(), 1);
|
|
156382
|
+
var recast9 = __toESM3(require_main22(), 1);
|
|
156227
156383
|
var graphql16 = __toESM3(require_graphql22(), 1);
|
|
156228
156384
|
var recast8 = __toESM3(require_main22(), 1);
|
|
156229
156385
|
var graphql15 = __toESM3(require_graphql22(), 1);
|
|
156230
156386
|
var recast7 = __toESM3(require_main22(), 1);
|
|
156231
|
-
var graphql14 = __toESM3(require_graphql22(), 1);
|
|
156232
|
-
var recast6 = __toESM3(require_main22(), 1);
|
|
156233
|
-
var AST6 = recast6.types.builders;
|
|
156234
156387
|
var AST7 = recast7.types.builders;
|
|
156235
156388
|
var AST8 = recast8.types.builders;
|
|
156236
|
-
var graphql17 = __toESM3(require_graphql22(), 1);
|
|
156237
|
-
var recast9 = __toESM3(require_main22(), 1);
|
|
156238
156389
|
var AST9 = recast9.types.builders;
|
|
156239
|
-
var AST10 = recast10.types.builders;
|
|
156240
156390
|
var graphql18 = __toESM3(require_graphql22(), 1);
|
|
156391
|
+
var recast10 = __toESM3(require_main22(), 1);
|
|
156392
|
+
var AST10 = recast10.types.builders;
|
|
156241
156393
|
var graphql19 = __toESM3(require_graphql22(), 1);
|
|
156242
156394
|
var recast11 = __toESM3(require_main22(), 1);
|
|
156243
156395
|
var AST11 = recast11.types.builders;
|
|
156244
|
-
var
|
|
156396
|
+
var AST12 = recast12.types.builders;
|
|
156397
|
+
var graphql20 = __toESM3(require_graphql22(), 1);
|
|
156245
156398
|
var graphql21 = __toESM3(require_graphql22(), 1);
|
|
156246
|
-
var
|
|
156399
|
+
var recast13 = __toESM3(require_main22(), 1);
|
|
156400
|
+
var AST13 = recast13.types.builders;
|
|
156401
|
+
var import_graphql302 = __toESM3(require_graphql22(), 1);
|
|
156247
156402
|
var graphql23 = __toESM3(require_graphql22(), 1);
|
|
156248
156403
|
var graphql24 = __toESM3(require_graphql22(), 1);
|
|
156249
|
-
var GraphqlKinds2 = graphql24.Kind;
|
|
156250
156404
|
var graphql25 = __toESM3(require_graphql22(), 1);
|
|
156405
|
+
var graphql26 = __toESM3(require_graphql22(), 1);
|
|
156406
|
+
var GraphqlKinds2 = graphql26.Kind;
|
|
156407
|
+
var graphql27 = __toESM3(require_graphql22(), 1);
|
|
156251
156408
|
var invalidNodeFieldMessage = `\u26A0\uFE0F Your project defines a Node interface but it does not conform to the Global Identification Spec.
|
|
156252
156409
|
|
|
156253
156410
|
If you are trying to provide the Node interface and its field, they must look like the following:
|
|
@@ -156264,7 +156421,7 @@ For more information, please visit these links:
|
|
|
156264
156421
|
- https://graphql.org/learn/global-object-identification/
|
|
156265
156422
|
- ${siteURL}/guides/caching-data#custom-ids
|
|
156266
156423
|
`;
|
|
156267
|
-
var
|
|
156424
|
+
var graphql28 = __toESM3(require_graphql22(), 1);
|
|
156268
156425
|
function find_insert_index(script) {
|
|
156269
156426
|
let insert_index = script.body.findIndex((statement) => {
|
|
156270
156427
|
return statement.type !== "ImportDeclaration";
|
|
@@ -156306,8 +156463,8 @@ function find_exported_fn(body, name2) {
|
|
|
156306
156463
|
}
|
|
156307
156464
|
return exported2.declaration;
|
|
156308
156465
|
}
|
|
156309
|
-
var
|
|
156310
|
-
var
|
|
156466
|
+
var recast14 = __toESM3(require_main22(), 1);
|
|
156467
|
+
var AST14 = recast14.types.builders;
|
|
156311
156468
|
function ensure_imports({
|
|
156312
156469
|
config: config4,
|
|
156313
156470
|
script,
|
|
@@ -156323,13 +156480,13 @@ function ensure_imports({
|
|
|
156323
156480
|
if (!has_import) {
|
|
156324
156481
|
script.body.unshift({
|
|
156325
156482
|
type: "ImportDeclaration",
|
|
156326
|
-
source:
|
|
156483
|
+
source: AST14.stringLiteral(sourceModule),
|
|
156327
156484
|
importKind
|
|
156328
156485
|
});
|
|
156329
156486
|
}
|
|
156330
156487
|
return { ids: [], added: has_import ? 0 : 1 };
|
|
156331
156488
|
}
|
|
156332
|
-
const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) =>
|
|
156489
|
+
const idList = (Array.isArray(importID) ? importID : [importID]).map((id2) => AST14.identifier(id2));
|
|
156333
156490
|
const toImport = idList.filter(
|
|
156334
156491
|
(identifier) => !script.body.find(
|
|
156335
156492
|
(statement) => statement.type === "ImportDeclaration" && statement.specifiers?.find(
|
|
@@ -156340,16 +156497,16 @@ function ensure_imports({
|
|
|
156340
156497
|
if (toImport.length > 0) {
|
|
156341
156498
|
script.body.unshift({
|
|
156342
156499
|
type: "ImportDeclaration",
|
|
156343
|
-
source:
|
|
156500
|
+
source: AST14.stringLiteral(sourceModule),
|
|
156344
156501
|
specifiers: toImport.map(
|
|
156345
|
-
(identifier, i22) => !Array.isArray(importID) ?
|
|
156502
|
+
(identifier, i22) => !Array.isArray(importID) ? AST14.importDefaultSpecifier(identifier) : AST14.importSpecifier(identifier, as?.[i22] ? AST14.identifier(as[i22]) : identifier)
|
|
156346
156503
|
),
|
|
156347
156504
|
importKind
|
|
156348
156505
|
});
|
|
156349
156506
|
}
|
|
156350
156507
|
for (const [i22, target] of (as ?? []).entries()) {
|
|
156351
156508
|
if (target) {
|
|
156352
|
-
idList[i22] =
|
|
156509
|
+
idList[i22] = AST14.identifier(target);
|
|
156353
156510
|
}
|
|
156354
156511
|
}
|
|
156355
156512
|
return {
|
|
@@ -156357,6 +156514,20 @@ function ensure_imports({
|
|
|
156357
156514
|
added: toImport.length
|
|
156358
156515
|
};
|
|
156359
156516
|
}
|
|
156517
|
+
function artifact_import({
|
|
156518
|
+
config: config4,
|
|
156519
|
+
script,
|
|
156520
|
+
artifact,
|
|
156521
|
+
local
|
|
156522
|
+
}) {
|
|
156523
|
+
const { ids, added } = ensure_imports({
|
|
156524
|
+
config: config4,
|
|
156525
|
+
script,
|
|
156526
|
+
sourceModule: config4.artifactImportPath(artifact.name),
|
|
156527
|
+
import: local || `_${artifact.name}Artifact`
|
|
156528
|
+
});
|
|
156529
|
+
return { id: ids, added };
|
|
156530
|
+
}
|
|
156360
156531
|
|
|
156361
156532
|
// ../../node_modules/.pnpm/svelte@3.55.0/node_modules/svelte/compiler.mjs
|
|
156362
156533
|
var now = typeof process !== "undefined" && process.hrtime ? () => {
|
|
@@ -182748,9 +182919,9 @@ var OriginalSource = class {
|
|
|
182748
182919
|
};
|
|
182749
182920
|
var Url$1 = typeof URL !== "undefined" ? URL : require("url").URL;
|
|
182750
182921
|
var parentRegex = /(^|\/)\.\.(?=\/|$)/g;
|
|
182751
|
-
function isAbsoluteUrl(
|
|
182922
|
+
function isAbsoluteUrl(url2) {
|
|
182752
182923
|
try {
|
|
182753
|
-
return !!new Url$1(
|
|
182924
|
+
return !!new Url$1(url2);
|
|
182754
182925
|
} catch (e3) {
|
|
182755
182926
|
return false;
|
|
182756
182927
|
}
|
|
@@ -184293,18 +184464,15 @@ async function preprocess(source, preprocessor, options) {
|
|
|
184293
184464
|
}
|
|
184294
184465
|
|
|
184295
184466
|
// src/plugin/extract.ts
|
|
184296
|
-
async function extract_default(filepath, contents) {
|
|
184467
|
+
async function extract_default(config4, filepath, contents) {
|
|
184297
184468
|
const documents = [];
|
|
184298
184469
|
let parsedFile = await parseSvelte(contents);
|
|
184299
184470
|
if (!parsedFile) {
|
|
184300
184471
|
return documents;
|
|
184301
184472
|
}
|
|
184302
|
-
|
|
184303
|
-
|
|
184304
|
-
|
|
184305
|
-
const printedDoc = node2.quasi.quasis[0].value.raw;
|
|
184306
|
-
documents.push(printedDoc);
|
|
184307
|
-
}
|
|
184473
|
+
await find_graphql(config4, parsedFile.script, {
|
|
184474
|
+
tag({ tagContent }) {
|
|
184475
|
+
documents.push(tagContent);
|
|
184308
184476
|
}
|
|
184309
184477
|
});
|
|
184310
184478
|
return documents;
|
|
@@ -184370,8 +184538,39 @@ function findScriptInnerBounds({
|
|
|
184370
184538
|
return [greaterThanIndex + 1, lessThanIndex];
|
|
184371
184539
|
}
|
|
184372
184540
|
|
|
184541
|
+
// ../../node_modules/.pnpm/@kitql+helper@0.5.0/node_modules/@kitql/helper/index.mjs
|
|
184542
|
+
var config3 = {
|
|
184543
|
+
reset: {
|
|
184544
|
+
node: `\x1B[37m\x1B[0m`,
|
|
184545
|
+
browser: ""
|
|
184546
|
+
},
|
|
184547
|
+
green: {
|
|
184548
|
+
node: `\x1B[32m`,
|
|
184549
|
+
browser: "color: green"
|
|
184550
|
+
},
|
|
184551
|
+
magneta: {
|
|
184552
|
+
node: `\x1B[35m`,
|
|
184553
|
+
browser: "color: #ff00ff"
|
|
184554
|
+
},
|
|
184555
|
+
red: {
|
|
184556
|
+
node: `\x1B[31m`,
|
|
184557
|
+
browser: "color: red"
|
|
184558
|
+
},
|
|
184559
|
+
cyan: {
|
|
184560
|
+
node: `\x1B[36m`,
|
|
184561
|
+
browser: "color: cyan"
|
|
184562
|
+
},
|
|
184563
|
+
yellow: {
|
|
184564
|
+
node: `\x1B[33m`,
|
|
184565
|
+
browser: "color: yellow"
|
|
184566
|
+
}
|
|
184567
|
+
};
|
|
184568
|
+
function logYellow(str) {
|
|
184569
|
+
return `${config3.yellow.node}${str}${config3.reset.node}`;
|
|
184570
|
+
}
|
|
184571
|
+
|
|
184373
184572
|
// src/plugin/extractLoadFunction.ts
|
|
184374
|
-
var
|
|
184573
|
+
var graphql30 = __toESM(require_graphql4(), 1);
|
|
184375
184574
|
var import_vite = require("vite");
|
|
184376
184575
|
|
|
184377
184576
|
// src/plugin/naming.ts
|
|
@@ -184408,7 +184607,7 @@ async function extract_load_function(config4, filepath, mockArtifacts) {
|
|
|
184408
184607
|
return {
|
|
184409
184608
|
exports,
|
|
184410
184609
|
houdini_load: load.map(
|
|
184411
|
-
(query) =>
|
|
184610
|
+
(query) => graphql30.parse(query).definitions[0]
|
|
184412
184611
|
)
|
|
184413
184612
|
};
|
|
184414
184613
|
}
|
|
@@ -184425,10 +184624,7 @@ async function processScript(config4, filepath, program, mockArtifacts) {
|
|
|
184425
184624
|
for (const specifier of statement.specifiers ?? []) {
|
|
184426
184625
|
let name2 = specifier.local?.name || "";
|
|
184427
184626
|
let query = "";
|
|
184428
|
-
|
|
184429
|
-
if (store_prefix && name2.startsWith(store_prefix)) {
|
|
184430
|
-
query = name2.substring(store_prefix.length);
|
|
184431
|
-
} else if (name2.endsWith(store_suffix(config4))) {
|
|
184627
|
+
if (name2.endsWith(store_suffix(config4))) {
|
|
184432
184628
|
query = name2.substring(0, name2.length - store_suffix(config4).length);
|
|
184433
184629
|
} else if (source.startsWith("$houdini/" + stores_directory_name()) && specifier.type === "ImportDefaultSpecifier") {
|
|
184434
184630
|
query = source.substring(`$houdini/${stores_directory_name()}`.length - 1);
|
|
@@ -184475,7 +184671,8 @@ async function processScript(config4, filepath, program, mockArtifacts) {
|
|
|
184475
184671
|
load.push(result);
|
|
184476
184672
|
if (!result) {
|
|
184477
184673
|
throw new Error(
|
|
184478
|
-
`Could not find
|
|
184674
|
+
`Could not find ${logYellow(element.name)} for computing ${logYellow(houdini_load_fn)}. (if it was a global store, you need to instantiate the store manually.)
|
|
184675
|
+
filepath: ${filepath}`
|
|
184479
184676
|
);
|
|
184480
184677
|
}
|
|
184481
184678
|
} else if (element.type === "TaggedTemplateExpression") {
|
|
@@ -184485,6 +184682,27 @@ async function processScript(config4, filepath, program, mockArtifacts) {
|
|
|
184485
184682
|
);
|
|
184486
184683
|
}
|
|
184487
184684
|
load.push(element.quasi.quasis[0].value.raw);
|
|
184685
|
+
} else if (element.type === "CallExpression") {
|
|
184686
|
+
if (element.callee.type !== "Identifier" || element.callee.name !== "graphql" || element.arguments.length !== 1) {
|
|
184687
|
+
throw new Error(`only graphql function can be passed to ${houdini_load_fn}`);
|
|
184688
|
+
}
|
|
184689
|
+
let documentString;
|
|
184690
|
+
const argument = element.arguments[0];
|
|
184691
|
+
if (argument.type === "TemplateLiteral") {
|
|
184692
|
+
documentString = argument.quasis[0].value.raw;
|
|
184693
|
+
} else if (argument.type === "StringLiteral") {
|
|
184694
|
+
documentString = argument.value;
|
|
184695
|
+
} else {
|
|
184696
|
+
throw new Error("only strings can be passed to the graphql function");
|
|
184697
|
+
}
|
|
184698
|
+
load.push(documentString);
|
|
184699
|
+
} else if (element.type === "NewExpression") {
|
|
184700
|
+
const suffix = store_suffix(config4);
|
|
184701
|
+
if (element && element.callee.type === "Identifier" && element.callee.name.endsWith(suffix)) {
|
|
184702
|
+
load.push(globalImports[element.callee.name]);
|
|
184703
|
+
} else {
|
|
184704
|
+
throw new Error(`only query store classes can be passed to ${houdini_load_fn}`);
|
|
184705
|
+
}
|
|
184488
184706
|
}
|
|
184489
184707
|
}
|
|
184490
184708
|
}
|
|
@@ -184509,7 +184727,17 @@ function identifyQueryReference(imports, statement) {
|
|
|
184509
184727
|
if (value2.type === "Identifier" && value2.name in imports) {
|
|
184510
184728
|
return { local, query: imports[value2.name] };
|
|
184511
184729
|
}
|
|
184512
|
-
if (value2.type === "CallExpression" && value2.callee.type
|
|
184730
|
+
if (value2.type === "CallExpression" && value2.callee.type === "Identifier" && value2.callee.name in imports) {
|
|
184731
|
+
return { local, query: imports[value2.callee.name] };
|
|
184732
|
+
}
|
|
184733
|
+
if (value2.type === "CallExpression" && value2.callee.type === "Identifier" && value2.callee.name === "graphql" && value2.arguments.length === 1) {
|
|
184734
|
+
if (value2.arguments[0].type === "StringLiteral") {
|
|
184735
|
+
return { local, query: value2.arguments[0].value };
|
|
184736
|
+
} else if (value2.arguments[0].type === "TemplateLiteral") {
|
|
184737
|
+
return { local, query: value2.arguments[0].quasis[0].value.raw };
|
|
184738
|
+
}
|
|
184739
|
+
}
|
|
184740
|
+
if (value2.type === "NewExpression" && value2.callee.type == "Identifier") {
|
|
184513
184741
|
return { local, query: imports[value2.callee.name] };
|
|
184514
184742
|
}
|
|
184515
184743
|
if (value2.type === "TaggedTemplateExpression") {
|
|
@@ -184661,7 +184889,7 @@ async function walk_routes(config4, framework2, visitor, dirpath = config4.route
|
|
|
184661
184889
|
continue;
|
|
184662
184890
|
}
|
|
184663
184891
|
try {
|
|
184664
|
-
const query = config4.extractQueryDefinition(
|
|
184892
|
+
const query = config4.extractQueryDefinition(graphql31.parse(contents));
|
|
184665
184893
|
await visitor.routeLayoutQuery?.(query, childPath);
|
|
184666
184894
|
layoutQueries.push(query);
|
|
184667
184895
|
} catch (e3) {
|
|
@@ -184674,7 +184902,7 @@ async function walk_routes(config4, framework2, visitor, dirpath = config4.route
|
|
|
184674
184902
|
continue;
|
|
184675
184903
|
}
|
|
184676
184904
|
try {
|
|
184677
|
-
const query = config4.extractQueryDefinition(
|
|
184905
|
+
const query = config4.extractQueryDefinition(graphql31.parse(contents));
|
|
184678
184906
|
await visitor.routePageQuery?.(query, childPath);
|
|
184679
184907
|
pageQueries.push(query);
|
|
184680
184908
|
} catch (e3) {
|
|
@@ -184734,14 +184962,10 @@ function store_suffix(config4) {
|
|
|
184734
184962
|
function store_name({ config: config4, name: name2 }) {
|
|
184735
184963
|
return name2 + store_suffix(config4);
|
|
184736
184964
|
}
|
|
184737
|
-
function global_store_name({ config: config4, name: name2 }) {
|
|
184738
|
-
return plugin_config(config4).globalStorePrefix + name2;
|
|
184739
|
-
}
|
|
184740
184965
|
function plugin_config(config4) {
|
|
184741
184966
|
const cfg = config4.pluginConfig("houdini-svelte");
|
|
184742
184967
|
return {
|
|
184743
184968
|
client: "./src/client",
|
|
184744
|
-
globalStorePrefix: "GQL_",
|
|
184745
184969
|
pageQueryFilename: "+page.gql",
|
|
184746
184970
|
layoutQueryFilename: "+layout.gql",
|
|
184747
184971
|
quietQueryErrors: false,
|
|
@@ -184771,9 +184995,14 @@ function store_import({
|
|
|
184771
184995
|
config: page2.config,
|
|
184772
184996
|
script: page2.script,
|
|
184773
184997
|
sourceModule: store_import_path({ config: page2.config, name: artifact.name }),
|
|
184774
|
-
import:
|
|
184998
|
+
import: [
|
|
184999
|
+
store_name({
|
|
185000
|
+
config: page2.config,
|
|
185001
|
+
name: artifact.name
|
|
185002
|
+
})
|
|
185003
|
+
]
|
|
184775
185004
|
});
|
|
184776
|
-
return { id: ids, added };
|
|
185005
|
+
return { id: ids[0], added };
|
|
184777
185006
|
}
|
|
184778
185007
|
|
|
184779
185008
|
// src/plugin/codegen/components/index.ts
|
|
@@ -184854,6 +185083,121 @@ export type ${config4.variableFunctionName(
|
|
|
184854
185083
|
await fs_exports.writeFile(path_exports.join(relative3, "$houdini.d.ts"), typeFile);
|
|
184855
185084
|
}
|
|
184856
185085
|
|
|
185086
|
+
// src/plugin/codegen/fragmentTypedefs/index.ts
|
|
185087
|
+
var recast15 = __toESM(require_main5(), 1);
|
|
185088
|
+
var AST15 = recast15.types.builders;
|
|
185089
|
+
async function fragmentTypedefs(input) {
|
|
185090
|
+
let fragments = {};
|
|
185091
|
+
for (const doc of input.documents) {
|
|
185092
|
+
if (doc.kind === ArtifactKind.Fragment) {
|
|
185093
|
+
if (doc.refetch?.paginated) {
|
|
185094
|
+
fragments = {
|
|
185095
|
+
...fragments,
|
|
185096
|
+
["paginatedFragment"]: {
|
|
185097
|
+
...fragments["paginatedFragment"],
|
|
185098
|
+
[doc.originalString]: doc
|
|
185099
|
+
}
|
|
185100
|
+
};
|
|
185101
|
+
}
|
|
185102
|
+
fragments = {
|
|
185103
|
+
...fragments,
|
|
185104
|
+
["fragment"]: {
|
|
185105
|
+
...fragments["fragment"],
|
|
185106
|
+
[doc.originalString]: doc
|
|
185107
|
+
}
|
|
185108
|
+
};
|
|
185109
|
+
}
|
|
185110
|
+
}
|
|
185111
|
+
const target_path = path_exports.join(
|
|
185112
|
+
input.config.pluginRuntimeDirectory("houdini-svelte"),
|
|
185113
|
+
"fragments.d.ts"
|
|
185114
|
+
);
|
|
185115
|
+
const contents = await parseJS(await fs_exports.readFile(target_path) || "");
|
|
185116
|
+
if (!contents) {
|
|
185117
|
+
return;
|
|
185118
|
+
}
|
|
185119
|
+
function insert_exports(which, statements) {
|
|
185120
|
+
for (const [i3, expression] of [...contents.script.body ?? []].entries()) {
|
|
185121
|
+
if (expression.type !== "ExportNamedDeclaration" || expression.declaration?.type !== "TSDeclareFunction" || expression.declaration.id?.name !== which) {
|
|
185122
|
+
continue;
|
|
185123
|
+
}
|
|
185124
|
+
contents.script.body.splice(i3, 0, ...statements);
|
|
185125
|
+
break;
|
|
185126
|
+
}
|
|
185127
|
+
}
|
|
185128
|
+
for (const [which, docs] of Object.entries(fragments)) {
|
|
185129
|
+
insert_exports(
|
|
185130
|
+
which,
|
|
185131
|
+
Object.entries(docs).flatMap(([queryString, doc]) => {
|
|
185132
|
+
if (!doc.generateStore) {
|
|
185133
|
+
return [];
|
|
185134
|
+
}
|
|
185135
|
+
const store = store_name({ config: input.config, name: doc.name });
|
|
185136
|
+
const import_path3 = path_exports.join("..", stores_directory_name(), doc.name);
|
|
185137
|
+
const fragment_map = AST15.tsTypeLiteral([
|
|
185138
|
+
AST15.tsPropertySignature(
|
|
185139
|
+
AST15.identifier("$fragments"),
|
|
185140
|
+
AST15.tsTypeAnnotation(
|
|
185141
|
+
AST15.tsTypeLiteral([
|
|
185142
|
+
AST15.tsPropertySignature(
|
|
185143
|
+
AST15.identifier(doc.name),
|
|
185144
|
+
AST15.tsTypeAnnotation(
|
|
185145
|
+
AST15.tsLiteralType(AST15.booleanLiteral(true))
|
|
185146
|
+
)
|
|
185147
|
+
)
|
|
185148
|
+
])
|
|
185149
|
+
)
|
|
185150
|
+
)
|
|
185151
|
+
]);
|
|
185152
|
+
const initial_value_input = AST15.identifier("initialValue");
|
|
185153
|
+
initial_value_input.typeAnnotation = AST15.tsTypeAnnotation(fragment_map);
|
|
185154
|
+
const initial_value_or_null_input = AST15.identifier("initialValue");
|
|
185155
|
+
initial_value_or_null_input.typeAnnotation = AST15.tsTypeAnnotation(
|
|
185156
|
+
AST15.tsUnionType([fragment_map, AST15.tsNullKeyword()])
|
|
185157
|
+
);
|
|
185158
|
+
const document_input = AST15.identifier("document");
|
|
185159
|
+
document_input.typeAnnotation = AST15.tsTypeAnnotation(
|
|
185160
|
+
AST15.tsTypeReference(AST15.identifier(store))
|
|
185161
|
+
);
|
|
185162
|
+
const return_value = AST15.tsTypeReference(
|
|
185163
|
+
AST15.identifier("ReturnType"),
|
|
185164
|
+
AST15.tsTypeParameterInstantiation([
|
|
185165
|
+
AST15.tsIndexedAccessType(
|
|
185166
|
+
AST15.tsTypeReference(AST15.identifier(store)),
|
|
185167
|
+
AST15.tsLiteralType(AST15.stringLiteral("get"))
|
|
185168
|
+
)
|
|
185169
|
+
])
|
|
185170
|
+
);
|
|
185171
|
+
ensureImports({
|
|
185172
|
+
config: input.config,
|
|
185173
|
+
body: contents.script.body,
|
|
185174
|
+
sourceModule: import_path3,
|
|
185175
|
+
import: [store]
|
|
185176
|
+
});
|
|
185177
|
+
return [
|
|
185178
|
+
AST15.exportNamedDeclaration(
|
|
185179
|
+
AST15.tsDeclareFunction(
|
|
185180
|
+
AST15.identifier(which),
|
|
185181
|
+
[initial_value_input, document_input],
|
|
185182
|
+
AST15.tsTypeAnnotation(return_value)
|
|
185183
|
+
)
|
|
185184
|
+
),
|
|
185185
|
+
AST15.exportNamedDeclaration(
|
|
185186
|
+
AST15.tsDeclareFunction(
|
|
185187
|
+
AST15.identifier(which),
|
|
185188
|
+
[initial_value_or_null_input, document_input],
|
|
185189
|
+
AST15.tsTypeAnnotation(
|
|
185190
|
+
AST15.tsUnionType([return_value, AST15.tsNullKeyword()])
|
|
185191
|
+
)
|
|
185192
|
+
)
|
|
185193
|
+
)
|
|
185194
|
+
];
|
|
185195
|
+
})
|
|
185196
|
+
);
|
|
185197
|
+
}
|
|
185198
|
+
await fs_exports.writeFile(target_path, recast15.prettyPrint(contents.script).code);
|
|
185199
|
+
}
|
|
185200
|
+
|
|
184857
185201
|
// src/plugin/codegen/routes/index.ts
|
|
184858
185202
|
async function svelteKitGenerator(framework2, { config: config4 }) {
|
|
184859
185203
|
if (framework2 !== "kit") {
|
|
@@ -185068,7 +185412,6 @@ async function fragmentStore({ config: config4, plugin_root }, doc) {
|
|
|
185068
185412
|
const fileName = doc.name;
|
|
185069
185413
|
const artifactName = `${doc.name}`;
|
|
185070
185414
|
const storeName = store_name({ config: config4, name: doc.name });
|
|
185071
|
-
const globalStoreName = global_store_name({ config: config4, name: doc.name });
|
|
185072
185415
|
const paginationMethod = doc.refetch?.method;
|
|
185073
185416
|
let which = "fragment";
|
|
185074
185417
|
if (paginationMethod === "cursor") {
|
|
@@ -185086,8 +185429,8 @@ ${paginationMethod ? `import _PaginationArtifact from '${config4.artifactImportP
|
|
|
185086
185429
|
// create the fragment store
|
|
185087
185430
|
|
|
185088
185431
|
export class ${storeName} extends ${store_class} {
|
|
185089
|
-
|
|
185090
|
-
|
|
185432
|
+
constructor() {
|
|
185433
|
+
super({
|
|
185091
185434
|
artifact,
|
|
185092
185435
|
storeName: ${JSON.stringify(storeName)},
|
|
185093
185436
|
variables: ${JSON.stringify(true)},
|
|
@@ -185095,10 +185438,6 @@ export class ${storeName} extends ${store_class} {
|
|
|
185095
185438
|
})
|
|
185096
185439
|
}
|
|
185097
185440
|
}
|
|
185098
|
-
|
|
185099
|
-
export const ${globalStoreName} = new ${storeName}()
|
|
185100
|
-
|
|
185101
|
-
export default ${globalStoreName}
|
|
185102
185441
|
`;
|
|
185103
185442
|
const _data = `${artifactName}$data`;
|
|
185104
185443
|
const typeDefs = `import type { ${_data}, ${store_class}, QueryStoreFetchParams} from '$houdini'
|
|
@@ -185110,11 +185449,7 @@ export declare class ${storeName} extends ${store_class}<${_data}, {}> {
|
|
|
185110
185449
|
}
|
|
185111
185450
|
}
|
|
185112
185451
|
|
|
185113
|
-
export const ${globalStoreName}: ${storeName}
|
|
185114
|
-
|
|
185115
185452
|
export declare const load_${artifactName}: (params: QueryStoreFetchParams<${_data}, {}>) => Promise<${storeName}>
|
|
185116
|
-
|
|
185117
|
-
export default ${storeName}
|
|
185118
185453
|
`;
|
|
185119
185454
|
await Promise.all([
|
|
185120
185455
|
fs_exports.writeFile(path_exports.join(stores_directory(plugin_root), `${fileName}.d.ts`), typeDefs),
|
|
@@ -185127,7 +185462,6 @@ export default ${storeName}
|
|
|
185127
185462
|
async function mutationStore({ config: config4, plugin_root }, doc) {
|
|
185128
185463
|
const fileName = doc.name;
|
|
185129
185464
|
const storeName = store_name({ config: config4, name: doc.name });
|
|
185130
|
-
const globalStoreName = global_store_name({ config: config4, name: doc.name });
|
|
185131
185465
|
const artifactName = `${doc.name}`;
|
|
185132
185466
|
const { statement, store_class } = store_import2(config4, "mutation");
|
|
185133
185467
|
const storeData = `import artifact from '$houdini/artifacts/${artifactName}'
|
|
@@ -185140,10 +185474,6 @@ export class ${storeName} extends ${store_class} {
|
|
|
185140
185474
|
})
|
|
185141
185475
|
}
|
|
185142
185476
|
}
|
|
185143
|
-
|
|
185144
|
-
export const ${globalStoreName} = new ${storeName}()
|
|
185145
|
-
|
|
185146
|
-
export default ${globalStoreName}
|
|
185147
185477
|
`;
|
|
185148
185478
|
const _input = `${artifactName}$input`;
|
|
185149
185479
|
const _data = `${artifactName}$result`;
|
|
@@ -185156,10 +185486,6 @@ export declare class ${storeName} extends ${store_class}<${_data} | undefined, $
|
|
|
185156
185486
|
super({})
|
|
185157
185487
|
}
|
|
185158
185488
|
}
|
|
185159
|
-
|
|
185160
|
-
export const ${globalStoreName}: ${storeName}
|
|
185161
|
-
|
|
185162
|
-
export default ${storeName}
|
|
185163
185489
|
`;
|
|
185164
185490
|
await Promise.all([
|
|
185165
185491
|
fs_exports.writeFile(path_exports.join(stores_directory(plugin_root), `${fileName}.js`), storeData),
|
|
@@ -185173,7 +185499,6 @@ async function queryStore({ config: config4, plugin_root }, doc) {
|
|
|
185173
185499
|
const fileName = doc.name;
|
|
185174
185500
|
const artifactName = `${doc.name}`;
|
|
185175
185501
|
const storeName = store_name({ config: config4, name: doc.name });
|
|
185176
|
-
const globalStoreName = global_store_name({ config: config4, name: doc.name });
|
|
185177
185502
|
let variables = false;
|
|
185178
185503
|
const operation = doc.originalDocument.definitions.find(
|
|
185179
185504
|
(defn) => defn.kind === "OperationDefinition" && defn.operation === "query"
|
|
@@ -185211,10 +185536,6 @@ export async function load_${artifactName}(params) {
|
|
|
185211
185536
|
${artifactName}: store,
|
|
185212
185537
|
}
|
|
185213
185538
|
}
|
|
185214
|
-
|
|
185215
|
-
export const ${globalStoreName} = new ${storeName}()
|
|
185216
|
-
|
|
185217
|
-
export default ${globalStoreName}
|
|
185218
185539
|
`;
|
|
185219
185540
|
const _input = `${artifactName}$input`;
|
|
185220
185541
|
const _data = `${artifactName}$result`;
|
|
@@ -185224,26 +185545,26 @@ export declare class ${storeName} extends ${store_class}<${_data}, ${_input}> {
|
|
|
185224
185545
|
/**
|
|
185225
185546
|
* ### Route Loads
|
|
185226
185547
|
* In a route's load function, manually instantiating a store can be used to look at the result:
|
|
185227
|
-
*
|
|
185548
|
+
*
|
|
185228
185549
|
* \`\`\`js
|
|
185229
185550
|
* export async function load(event) {
|
|
185230
185551
|
* const store = new ${storeName}Store()
|
|
185231
185552
|
* const { data } = await store.fetch({event})
|
|
185232
185553
|
* console.log('do something with', data)
|
|
185233
|
-
*
|
|
185234
|
-
* return {
|
|
185554
|
+
*
|
|
185555
|
+
* return {
|
|
185235
185556
|
* ${storeName}: store,
|
|
185236
185557
|
* }
|
|
185237
185558
|
* }
|
|
185238
|
-
*
|
|
185559
|
+
*
|
|
185239
185560
|
* \`\`\`
|
|
185240
|
-
*
|
|
185561
|
+
*
|
|
185241
185562
|
* ### Client Side Loading
|
|
185242
185563
|
* When performing a client-side only fetch, the best practice to use a store _manually_ is to do the following:
|
|
185243
|
-
*
|
|
185564
|
+
*
|
|
185244
185565
|
* \`\`\`js
|
|
185245
185566
|
* const store = new ${storeName}Store()
|
|
185246
|
-
*
|
|
185567
|
+
*
|
|
185247
185568
|
* $: browser && store.fetch({ variables });
|
|
185248
185569
|
* \`\`\`
|
|
185249
185570
|
*/
|
|
@@ -185256,44 +185577,40 @@ export declare class ${storeName} extends ${store_class}<${_data}, ${_input}> {
|
|
|
185256
185577
|
/**
|
|
185257
185578
|
* ### Manual Loads
|
|
185258
185579
|
* Usually your load function will look like this:
|
|
185259
|
-
*
|
|
185580
|
+
*
|
|
185260
185581
|
* \`\`\`js
|
|
185261
185582
|
* import { load_${artifactName} } from '$houdini';
|
|
185262
185583
|
* import type { PageLoad } from './$types';
|
|
185263
|
-
*
|
|
185584
|
+
*
|
|
185264
185585
|
* export const load: PageLoad = async (event) => {
|
|
185265
185586
|
* const variables = {
|
|
185266
185587
|
* id: // Something like: event.url.searchParams.get('id')
|
|
185267
185588
|
* };
|
|
185268
|
-
*
|
|
185589
|
+
*
|
|
185269
185590
|
* return await load_${artifactName}({ event, variables });
|
|
185270
|
-
* };
|
|
185591
|
+
* };
|
|
185271
185592
|
* \`\`\`
|
|
185272
|
-
*
|
|
185593
|
+
*
|
|
185273
185594
|
* ### Multiple stores to load
|
|
185274
185595
|
* You can trigger them in parallel with \`loadAll\` function
|
|
185275
|
-
*
|
|
185596
|
+
*
|
|
185276
185597
|
* \`\`\`js
|
|
185277
185598
|
* import { loadAll, load_${artifactName} } from '$houdini';
|
|
185278
185599
|
* import type { PageLoad } from './$types';
|
|
185279
|
-
*
|
|
185600
|
+
*
|
|
185280
185601
|
* export const load: PageLoad = async (event) => {
|
|
185281
185602
|
* const variables = {
|
|
185282
185603
|
* id: // Something like: event.url.searchParams.get('id')
|
|
185283
185604
|
* };
|
|
185284
|
-
*
|
|
185605
|
+
*
|
|
185285
185606
|
* return await await loadAll(
|
|
185286
185607
|
* load_${artifactName}({ event, variables }),
|
|
185287
185608
|
* // load_ANOTHER_STORE
|
|
185288
185609
|
* );
|
|
185289
|
-
* };
|
|
185610
|
+
* };
|
|
185290
185611
|
* \`\`\`
|
|
185291
185612
|
*/
|
|
185292
185613
|
export declare const load_${artifactName}: (params: QueryStoreFetchParams<${_data}, ${_input}>) => Promise<{${artifactName}: ${storeName}}>
|
|
185293
|
-
|
|
185294
|
-
export const ${globalStoreName}: ${storeName}
|
|
185295
|
-
|
|
185296
|
-
export default ${storeName}
|
|
185297
185614
|
`;
|
|
185298
185615
|
await Promise.all([
|
|
185299
185616
|
fs_exports.writeFile(path_exports.join(stores_directory(plugin_root), `${fileName}.js`), storeData),
|
|
@@ -185306,7 +185623,6 @@ export default ${storeName}
|
|
|
185306
185623
|
async function subscriptionStore({ config: config4, plugin_root }, doc) {
|
|
185307
185624
|
const fileName = doc.name;
|
|
185308
185625
|
const storeName = store_name({ config: config4, name: doc.name });
|
|
185309
|
-
const globalStoreName = global_store_name({ config: config4, name: doc.name });
|
|
185310
185626
|
const artifactName = `${doc.name}`;
|
|
185311
185627
|
const { store_class, statement } = store_import2(config4, "subscription");
|
|
185312
185628
|
const storeContent = `import artifact from '$houdini/artifacts/${artifactName}'
|
|
@@ -185319,10 +185635,6 @@ export class ${storeName} extends ${store_class} {
|
|
|
185319
185635
|
})
|
|
185320
185636
|
}
|
|
185321
185637
|
}
|
|
185322
|
-
|
|
185323
|
-
export const ${globalStoreName} = new ${storeName}()
|
|
185324
|
-
|
|
185325
|
-
export default ${globalStoreName}
|
|
185326
185638
|
`;
|
|
185327
185639
|
const _input = `${artifactName}$input`;
|
|
185328
185640
|
const _data = `${artifactName}$result`;
|
|
@@ -185334,10 +185646,6 @@ export declare class ${storeName} extends ${store_class}<${_data} | undefined, $
|
|
|
185334
185646
|
super({})
|
|
185335
185647
|
}
|
|
185336
185648
|
}
|
|
185337
|
-
|
|
185338
|
-
export const ${globalStoreName}: ${storeName}
|
|
185339
|
-
|
|
185340
|
-
export default ${storeName}
|
|
185341
185649
|
`;
|
|
185342
185650
|
await Promise.all([
|
|
185343
185651
|
fs_exports.writeFile(path_exports.join(stores_directory(plugin_root), `${fileName}.d.ts`), typeDefs),
|
|
@@ -185394,7 +185702,8 @@ async function codegen_default(input) {
|
|
|
185394
185702
|
await Promise.all([
|
|
185395
185703
|
svelteKitGenerator(input.framework, input),
|
|
185396
185704
|
storesGenerator(input),
|
|
185397
|
-
componentTypesGenerator(input.framework, input)
|
|
185705
|
+
componentTypesGenerator(input.framework, input),
|
|
185706
|
+
fragmentTypedefs(input)
|
|
185398
185707
|
]);
|
|
185399
185708
|
}
|
|
185400
185709
|
|
|
@@ -185541,11 +185850,11 @@ function is_root_route(filepath) {
|
|
|
185541
185850
|
var empty_layout = "<slot />";
|
|
185542
185851
|
|
|
185543
185852
|
// src/plugin/transforms/index.ts
|
|
185544
|
-
var
|
|
185853
|
+
var recast23 = __toESM(require_main5(), 1);
|
|
185545
185854
|
|
|
185546
185855
|
// src/plugin/transforms/kit/init.ts
|
|
185547
|
-
var
|
|
185548
|
-
var
|
|
185856
|
+
var recast16 = __toESM(require_main5(), 1);
|
|
185857
|
+
var AST16 = recast16.types.builders;
|
|
185549
185858
|
async function kit_init(page2) {
|
|
185550
185859
|
if (!is_root_layout(page2.config, page2.filepath)) {
|
|
185551
185860
|
return;
|
|
@@ -185569,9 +185878,9 @@ async function kit_init(page2) {
|
|
|
185569
185878
|
import: ["extractSession", "setClientSession"]
|
|
185570
185879
|
}).ids;
|
|
185571
185880
|
page2.script.body.push(
|
|
185572
|
-
|
|
185573
|
-
|
|
185574
|
-
|
|
185881
|
+
AST16.expressionStatement(
|
|
185882
|
+
AST16.callExpression(on_mount, [
|
|
185883
|
+
AST16.arrowFunctionExpression([], AST16.callExpression(set_client_started, []))
|
|
185575
185884
|
])
|
|
185576
185885
|
)
|
|
185577
185886
|
);
|
|
@@ -185582,17 +185891,17 @@ async function kit_init(page2) {
|
|
|
185582
185891
|
import: ["page"]
|
|
185583
185892
|
}).ids[0];
|
|
185584
185893
|
page2.script.body.push(
|
|
185585
|
-
|
|
185586
|
-
|
|
185587
|
-
|
|
185588
|
-
[
|
|
185589
|
-
|
|
185590
|
-
|
|
185591
|
-
|
|
185592
|
-
|
|
185593
|
-
|
|
185594
|
-
|
|
185595
|
-
|
|
185894
|
+
AST16.expressionStatement(
|
|
185895
|
+
AST16.callExpression(AST16.memberExpression(store_id, AST16.identifier("subscribe")), [
|
|
185896
|
+
AST16.arrowFunctionExpression(
|
|
185897
|
+
[AST16.identifier("val")],
|
|
185898
|
+
AST16.blockStatement([
|
|
185899
|
+
AST16.expressionStatement(
|
|
185900
|
+
AST16.callExpression(set_session, [
|
|
185901
|
+
AST16.callExpression(extract_session, [
|
|
185902
|
+
AST16.memberExpression(
|
|
185903
|
+
AST16.identifier("val"),
|
|
185904
|
+
AST16.identifier("data")
|
|
185596
185905
|
)
|
|
185597
185906
|
])
|
|
185598
185907
|
])
|
|
@@ -185604,50 +185913,19 @@ async function kit_init(page2) {
|
|
|
185604
185913
|
);
|
|
185605
185914
|
}
|
|
185606
185915
|
|
|
185607
|
-
// ../../node_modules/.pnpm/@kitql+helper@0.5.0/node_modules/@kitql/helper/index.mjs
|
|
185608
|
-
var config3 = {
|
|
185609
|
-
reset: {
|
|
185610
|
-
node: `\x1B[37m\x1B[0m`,
|
|
185611
|
-
browser: ""
|
|
185612
|
-
},
|
|
185613
|
-
green: {
|
|
185614
|
-
node: `\x1B[32m`,
|
|
185615
|
-
browser: "color: green"
|
|
185616
|
-
},
|
|
185617
|
-
magneta: {
|
|
185618
|
-
node: `\x1B[35m`,
|
|
185619
|
-
browser: "color: #ff00ff"
|
|
185620
|
-
},
|
|
185621
|
-
red: {
|
|
185622
|
-
node: `\x1B[31m`,
|
|
185623
|
-
browser: "color: red"
|
|
185624
|
-
},
|
|
185625
|
-
cyan: {
|
|
185626
|
-
node: `\x1B[36m`,
|
|
185627
|
-
browser: "color: cyan"
|
|
185628
|
-
},
|
|
185629
|
-
yellow: {
|
|
185630
|
-
node: `\x1B[33m`,
|
|
185631
|
-
browser: "color: yellow"
|
|
185632
|
-
}
|
|
185633
|
-
};
|
|
185634
|
-
function logYellow(str) {
|
|
185635
|
-
return `${config3.yellow.node}${str}${config3.reset.node}`;
|
|
185636
|
-
}
|
|
185637
|
-
|
|
185638
185916
|
// src/plugin/transforms/kit/load.ts
|
|
185639
|
-
var
|
|
185640
|
-
var
|
|
185917
|
+
var graphql33 = __toESM(require_graphql4(), 1);
|
|
185918
|
+
var recast18 = __toESM(require_main5(), 1);
|
|
185641
185919
|
|
|
185642
185920
|
// src/plugin/transforms/query.ts
|
|
185643
|
-
var
|
|
185644
|
-
var
|
|
185921
|
+
var recast17 = __toESM(require_main5(), 1);
|
|
185922
|
+
var AST17 = recast17.types.builders;
|
|
185645
185923
|
async function QueryProcessor(config4, page2) {
|
|
185646
185924
|
if (!is_component(config4, page2.framework, page2.filepath)) {
|
|
185647
185925
|
return;
|
|
185648
185926
|
}
|
|
185649
185927
|
const store_id = (name2) => {
|
|
185650
|
-
return
|
|
185928
|
+
return AST17.identifier(`_houdini_` + name2);
|
|
185651
185929
|
};
|
|
185652
185930
|
const queries = await find_inline_queries(page2, page2.script, store_id);
|
|
185653
185931
|
if (queries.length === 0) {
|
|
@@ -185691,8 +185969,8 @@ async function QueryProcessor(config4, page2) {
|
|
|
185691
185969
|
page2.script.body.splice(
|
|
185692
185970
|
find_insert_index(page2.script),
|
|
185693
185971
|
0,
|
|
185694
|
-
|
|
185695
|
-
|
|
185972
|
+
AST17.variableDeclaration("const", [
|
|
185973
|
+
AST17.variableDeclarator(store_id(query.name), AST17.newExpression(factory, []))
|
|
185696
185974
|
])
|
|
185697
185975
|
);
|
|
185698
185976
|
}
|
|
@@ -185709,42 +185987,42 @@ async function QueryProcessor(config4, page2) {
|
|
|
185709
185987
|
});
|
|
185710
185988
|
}
|
|
185711
185989
|
return [
|
|
185712
|
-
|
|
185713
|
-
|
|
185714
|
-
|
|
185715
|
-
|
|
185716
|
-
|
|
185717
|
-
|
|
185718
|
-
|
|
185719
|
-
|
|
185720
|
-
|
|
185721
|
-
|
|
185990
|
+
AST17.labeledStatement(
|
|
185991
|
+
AST17.identifier("$"),
|
|
185992
|
+
AST17.expressionStatement(
|
|
185993
|
+
AST17.callExpression(
|
|
185994
|
+
AST17.memberExpression(
|
|
185995
|
+
AST17.callExpression(AST17.identifier("marshalInputs"), [
|
|
185996
|
+
AST17.objectExpression([
|
|
185997
|
+
AST17.objectProperty(
|
|
185998
|
+
AST17.identifier("artifact"),
|
|
185999
|
+
AST17.memberExpression(
|
|
185722
186000
|
store_id(query.name),
|
|
185723
|
-
|
|
186001
|
+
AST17.identifier("artifact")
|
|
185724
186002
|
)
|
|
185725
186003
|
),
|
|
185726
|
-
|
|
185727
|
-
|
|
185728
|
-
has_variables ?
|
|
185729
|
-
|
|
185730
|
-
|
|
185731
|
-
|
|
186004
|
+
AST17.objectProperty(
|
|
186005
|
+
AST17.identifier("input"),
|
|
186006
|
+
has_variables ? AST17.callExpression(
|
|
186007
|
+
AST17.memberExpression(
|
|
186008
|
+
AST17.identifier(variable_fn),
|
|
186009
|
+
AST17.identifier("call")
|
|
185732
186010
|
),
|
|
185733
186011
|
[
|
|
185734
|
-
|
|
185735
|
-
|
|
186012
|
+
AST17.newExpression(
|
|
186013
|
+
AST17.identifier("RequestContext"),
|
|
185736
186014
|
[]
|
|
185737
186015
|
),
|
|
185738
|
-
|
|
185739
|
-
|
|
185740
|
-
|
|
185741
|
-
|
|
186016
|
+
AST17.objectExpression([
|
|
186017
|
+
AST17.objectProperty(
|
|
186018
|
+
AST17.identifier("props"),
|
|
186019
|
+
AST17.objectExpression(
|
|
185742
186020
|
props.map(
|
|
185743
|
-
(prop) =>
|
|
185744
|
-
|
|
186021
|
+
(prop) => AST17.objectProperty(
|
|
186022
|
+
AST17.identifier(
|
|
185745
186023
|
prop
|
|
185746
186024
|
),
|
|
185747
|
-
|
|
186025
|
+
AST17.identifier(
|
|
185748
186026
|
prop
|
|
185749
186027
|
)
|
|
185750
186028
|
)
|
|
@@ -185753,27 +186031,27 @@ async function QueryProcessor(config4, page2) {
|
|
|
185753
186031
|
)
|
|
185754
186032
|
])
|
|
185755
186033
|
]
|
|
185756
|
-
) :
|
|
186034
|
+
) : AST17.objectExpression([])
|
|
185757
186035
|
)
|
|
185758
186036
|
])
|
|
185759
186037
|
]),
|
|
185760
|
-
|
|
186038
|
+
AST17.identifier("then")
|
|
185761
186039
|
),
|
|
185762
186040
|
[
|
|
185763
|
-
|
|
186041
|
+
AST17.arrowFunctionExpression(
|
|
185764
186042
|
[local_input_id(query.name)],
|
|
185765
|
-
|
|
186043
|
+
AST17.logicalExpression(
|
|
185766
186044
|
"&&",
|
|
185767
|
-
|
|
185768
|
-
|
|
185769
|
-
|
|
186045
|
+
AST17.identifier("isBrowser"),
|
|
186046
|
+
AST17.callExpression(
|
|
186047
|
+
AST17.memberExpression(
|
|
185770
186048
|
store_id(query.name),
|
|
185771
|
-
|
|
186049
|
+
AST17.identifier("fetch")
|
|
185772
186050
|
),
|
|
185773
186051
|
[
|
|
185774
|
-
|
|
185775
|
-
|
|
185776
|
-
|
|
186052
|
+
AST17.objectExpression([
|
|
186053
|
+
AST17.objectProperty(
|
|
186054
|
+
AST17.identifier("variables"),
|
|
185777
186055
|
local_input_id(query.name)
|
|
185778
186056
|
)
|
|
185779
186057
|
])
|
|
@@ -185821,23 +186099,25 @@ async function find_inline_queries(page2, parsed, store_id) {
|
|
|
185821
186099
|
});
|
|
185822
186100
|
return queries.map((query) => {
|
|
185823
186101
|
return {
|
|
185824
|
-
store_id:
|
|
186102
|
+
store_id: AST17.identifier(""),
|
|
185825
186103
|
name: query.name,
|
|
185826
186104
|
variables: query.variables
|
|
185827
186105
|
};
|
|
185828
186106
|
});
|
|
185829
186107
|
}
|
|
185830
|
-
var local_input_id = (name2) =>
|
|
186108
|
+
var local_input_id = (name2) => AST17.identifier(`_${name2}_Input`);
|
|
185831
186109
|
|
|
185832
186110
|
// src/plugin/transforms/kit/load.ts
|
|
185833
|
-
var
|
|
186111
|
+
var AST18 = recast18.types.builders;
|
|
185834
186112
|
async function kit_load_generator(page2) {
|
|
185835
186113
|
const route = is_route(page2.config, page2.framework, page2.filepath);
|
|
185836
186114
|
const script = is_route_script(page2.framework, page2.filepath);
|
|
185837
186115
|
if (!route && !script) {
|
|
185838
186116
|
return;
|
|
185839
186117
|
}
|
|
185840
|
-
const inline_query_store = (name2) => route ?
|
|
186118
|
+
const inline_query_store = (name2) => route ? AST18.memberExpression(AST18.identifier("data"), AST18.identifier(name2)) : artifact_import({
|
|
186119
|
+
config: page2.config,
|
|
186120
|
+
script: page2.script,
|
|
185841
186121
|
page: page2,
|
|
185842
186122
|
artifact: { name: name2 }
|
|
185843
186123
|
}).id;
|
|
@@ -185858,7 +186138,7 @@ async function kit_load_generator(page2) {
|
|
|
185858
186138
|
houdini_load_queries.push({
|
|
185859
186139
|
name: target.name.value,
|
|
185860
186140
|
variables: operation_requires_variables(target),
|
|
185861
|
-
store_id:
|
|
186141
|
+
store_id: AST18.memberExpression(AST18.identifier(houdini_load_fn), AST18.literal(i3))
|
|
185862
186142
|
});
|
|
185863
186143
|
}
|
|
185864
186144
|
if (script) {
|
|
@@ -185890,8 +186170,8 @@ async function kit_load_generator(page2) {
|
|
|
185890
186170
|
find_insert_index(page2.script),
|
|
185891
186171
|
0,
|
|
185892
186172
|
...!has_data ? [
|
|
185893
|
-
|
|
185894
|
-
|
|
186173
|
+
AST18.exportNamedDeclaration(
|
|
186174
|
+
AST18.variableDeclaration("let", [AST18.identifier("data")])
|
|
185895
186175
|
)
|
|
185896
186176
|
] : []
|
|
185897
186177
|
);
|
|
@@ -185936,43 +186216,43 @@ function add_load({
|
|
|
185936
186216
|
let before_load = page_info.exports.includes(houdini_before_load_fn);
|
|
185937
186217
|
let after_load = page_info.exports.includes(houdini_after_load_fn);
|
|
185938
186218
|
let on_error = page_info.exports.includes(houdini_on_error_fn);
|
|
185939
|
-
const request_context =
|
|
185940
|
-
const promise_list =
|
|
185941
|
-
const return_value =
|
|
185942
|
-
const result_obj =
|
|
185943
|
-
const input_obj =
|
|
185944
|
-
const preload_fn =
|
|
185945
|
-
|
|
185946
|
-
[
|
|
185947
|
-
|
|
185948
|
-
|
|
185949
|
-
|
|
186219
|
+
const request_context = AST18.identifier("houdini_context");
|
|
186220
|
+
const promise_list = AST18.identifier("promises");
|
|
186221
|
+
const return_value = AST18.memberExpression(request_context, AST18.identifier("returnValue"));
|
|
186222
|
+
const result_obj = AST18.identifier("result");
|
|
186223
|
+
const input_obj = AST18.identifier("inputs");
|
|
186224
|
+
const preload_fn = AST18.functionDeclaration(
|
|
186225
|
+
AST18.identifier("load"),
|
|
186226
|
+
[AST18.identifier("context")],
|
|
186227
|
+
AST18.blockStatement([
|
|
186228
|
+
AST18.variableDeclaration("const", [
|
|
186229
|
+
AST18.variableDeclarator(
|
|
185950
186230
|
request_context,
|
|
185951
|
-
|
|
186231
|
+
AST18.newExpression(AST18.identifier("RequestContext"), [AST18.identifier("context")])
|
|
185952
186232
|
)
|
|
185953
186233
|
]),
|
|
185954
|
-
|
|
185955
|
-
|
|
185956
|
-
|
|
185957
|
-
|
|
186234
|
+
AST18.variableDeclaration("const", [
|
|
186235
|
+
AST18.variableDeclarator(
|
|
186236
|
+
AST18.identifier("houdiniConfig"),
|
|
186237
|
+
AST18.awaitExpression(AST18.callExpression(AST18.identifier("getCurrentConfig"), []))
|
|
185958
186238
|
)
|
|
185959
186239
|
]),
|
|
185960
|
-
|
|
185961
|
-
|
|
186240
|
+
AST18.variableDeclaration("const", [
|
|
186241
|
+
AST18.variableDeclarator(promise_list, AST18.arrayExpression([]))
|
|
185962
186242
|
]),
|
|
185963
|
-
|
|
185964
|
-
|
|
186243
|
+
AST18.variableDeclaration("const", [
|
|
186244
|
+
AST18.variableDeclarator(input_obj, AST18.objectExpression([]))
|
|
185965
186245
|
]),
|
|
185966
|
-
|
|
185967
|
-
|
|
185968
|
-
|
|
185969
|
-
|
|
186246
|
+
AST18.returnStatement(
|
|
186247
|
+
AST18.objectExpression([
|
|
186248
|
+
AST18.spreadElement(return_value),
|
|
186249
|
+
AST18.spreadElement(result_obj)
|
|
185970
186250
|
])
|
|
185971
186251
|
)
|
|
185972
186252
|
])
|
|
185973
186253
|
);
|
|
185974
186254
|
preload_fn.async = true;
|
|
185975
|
-
page2.script.body.push(
|
|
186255
|
+
page2.script.body.push(AST18.exportNamedDeclaration(preload_fn));
|
|
185976
186256
|
let insert_index = 4;
|
|
185977
186257
|
for (const query of queries) {
|
|
185978
186258
|
const { ids } = ensure_imports({
|
|
@@ -185982,40 +186262,39 @@ function add_load({
|
|
|
185982
186262
|
sourceModule: store_import_path({ config: page2.config, name: query.name })
|
|
185983
186263
|
});
|
|
185984
186264
|
const load_fn = ids[0];
|
|
185985
|
-
const variables = page_info.exports.includes(query_variable_fn(query.name)) ?
|
|
185986
|
-
|
|
185987
|
-
|
|
186265
|
+
const variables = page_info.exports.includes(query_variable_fn(query.name)) ? AST18.awaitExpression(
|
|
186266
|
+
AST18.callExpression(
|
|
186267
|
+
AST18.memberExpression(request_context, AST18.identifier("computeInput")),
|
|
185988
186268
|
[
|
|
185989
|
-
|
|
185990
|
-
|
|
185991
|
-
|
|
185992
|
-
|
|
186269
|
+
AST18.objectExpression([
|
|
186270
|
+
AST18.objectProperty(
|
|
186271
|
+
AST18.literal("config"),
|
|
186272
|
+
AST18.identifier("houdiniConfig")
|
|
185993
186273
|
),
|
|
185994
|
-
|
|
185995
|
-
|
|
185996
|
-
|
|
186274
|
+
AST18.objectProperty(
|
|
186275
|
+
AST18.literal("variableFunction"),
|
|
186276
|
+
AST18.identifier(query_variable_fn(query.name))
|
|
185997
186277
|
),
|
|
185998
|
-
|
|
185999
|
-
|
|
186000
|
-
|
|
186001
|
-
|
|
186002
|
-
|
|
186003
|
-
|
|
186004
|
-
}
|
|
186005
|
-
|
|
186006
|
-
)
|
|
186278
|
+
AST18.objectProperty(
|
|
186279
|
+
AST18.literal("artifact"),
|
|
186280
|
+
artifact_import({
|
|
186281
|
+
config: page2.config,
|
|
186282
|
+
script: page2.script,
|
|
186283
|
+
page: page2,
|
|
186284
|
+
artifact: { name: query.name }
|
|
186285
|
+
}).id
|
|
186007
186286
|
)
|
|
186008
186287
|
])
|
|
186009
186288
|
]
|
|
186010
186289
|
)
|
|
186011
|
-
) :
|
|
186290
|
+
) : AST18.objectExpression([]);
|
|
186012
186291
|
preload_fn.body.body.splice(
|
|
186013
186292
|
insert_index++,
|
|
186014
186293
|
0,
|
|
186015
|
-
|
|
186016
|
-
|
|
186294
|
+
AST18.expressionStatement(
|
|
186295
|
+
AST18.assignmentExpression(
|
|
186017
186296
|
"=",
|
|
186018
|
-
|
|
186297
|
+
AST18.memberExpression(input_obj, AST18.literal(query.name)),
|
|
186019
186298
|
variables
|
|
186020
186299
|
)
|
|
186021
186300
|
)
|
|
@@ -186023,18 +186302,18 @@ function add_load({
|
|
|
186023
186302
|
preload_fn.body.body.splice(
|
|
186024
186303
|
insert_index++,
|
|
186025
186304
|
0,
|
|
186026
|
-
|
|
186027
|
-
|
|
186028
|
-
|
|
186029
|
-
|
|
186030
|
-
|
|
186031
|
-
|
|
186032
|
-
|
|
186305
|
+
AST18.expressionStatement(
|
|
186306
|
+
AST18.callExpression(AST18.memberExpression(promise_list, AST18.identifier("push")), [
|
|
186307
|
+
AST18.callExpression(load_fn, [
|
|
186308
|
+
AST18.objectExpression([
|
|
186309
|
+
AST18.objectProperty(
|
|
186310
|
+
AST18.literal("variables"),
|
|
186311
|
+
AST18.memberExpression(input_obj, AST18.literal(query.name))
|
|
186033
186312
|
),
|
|
186034
|
-
|
|
186035
|
-
|
|
186036
|
-
|
|
186037
|
-
|
|
186313
|
+
AST18.objectProperty(AST18.literal("event"), AST18.identifier("context")),
|
|
186314
|
+
AST18.objectProperty(
|
|
186315
|
+
AST18.literal("blocking"),
|
|
186316
|
+
AST18.booleanLiteral(after_load || on_error)
|
|
186038
186317
|
)
|
|
186039
186318
|
])
|
|
186040
186319
|
])
|
|
@@ -186046,28 +186325,28 @@ function add_load({
|
|
|
186046
186325
|
preload_fn.body.body.splice(
|
|
186047
186326
|
insert_index++,
|
|
186048
186327
|
0,
|
|
186049
|
-
|
|
186050
|
-
|
|
186328
|
+
AST18.variableDeclaration("let", [
|
|
186329
|
+
AST18.variableDeclarator(result_obj, AST18.objectExpression([]))
|
|
186051
186330
|
]),
|
|
186052
|
-
|
|
186053
|
-
|
|
186054
|
-
|
|
186055
|
-
|
|
186331
|
+
AST18.tryStatement(
|
|
186332
|
+
AST18.blockStatement([
|
|
186333
|
+
AST18.expressionStatement(
|
|
186334
|
+
AST18.assignmentExpression(
|
|
186056
186335
|
"=",
|
|
186057
186336
|
result_obj,
|
|
186058
|
-
|
|
186059
|
-
|
|
186060
|
-
|
|
186061
|
-
|
|
186337
|
+
AST18.callExpression(
|
|
186338
|
+
AST18.memberExpression(
|
|
186339
|
+
AST18.identifier("Object"),
|
|
186340
|
+
AST18.identifier("assign")
|
|
186062
186341
|
),
|
|
186063
186342
|
[
|
|
186064
|
-
|
|
186065
|
-
|
|
186066
|
-
|
|
186067
|
-
|
|
186068
|
-
|
|
186069
|
-
|
|
186070
|
-
|
|
186343
|
+
AST18.objectExpression([]),
|
|
186344
|
+
AST18.spreadElement(
|
|
186345
|
+
AST18.awaitExpression(
|
|
186346
|
+
AST18.callExpression(
|
|
186347
|
+
AST18.memberExpression(
|
|
186348
|
+
AST18.identifier("Promise"),
|
|
186349
|
+
AST18.identifier("all")
|
|
186071
186350
|
),
|
|
186072
186351
|
[promise_list]
|
|
186073
186352
|
)
|
|
@@ -186078,37 +186357,37 @@ function add_load({
|
|
|
186078
186357
|
)
|
|
186079
186358
|
)
|
|
186080
186359
|
]),
|
|
186081
|
-
|
|
186082
|
-
|
|
186360
|
+
AST18.catchClause(
|
|
186361
|
+
AST18.identifier("err"),
|
|
186083
186362
|
null,
|
|
186084
|
-
|
|
186085
|
-
on_error ?
|
|
186086
|
-
|
|
186087
|
-
|
|
186088
|
-
|
|
186363
|
+
AST18.blockStatement([
|
|
186364
|
+
on_error ? AST18.expressionStatement(
|
|
186365
|
+
AST18.awaitExpression(
|
|
186366
|
+
AST18.callExpression(
|
|
186367
|
+
AST18.memberExpression(
|
|
186089
186368
|
request_context,
|
|
186090
|
-
|
|
186369
|
+
AST18.identifier("invokeLoadHook")
|
|
186091
186370
|
),
|
|
186092
186371
|
[
|
|
186093
|
-
|
|
186094
|
-
|
|
186095
|
-
|
|
186096
|
-
|
|
186372
|
+
AST18.objectExpression([
|
|
186373
|
+
AST18.objectProperty(
|
|
186374
|
+
AST18.literal("variant"),
|
|
186375
|
+
AST18.stringLiteral("error")
|
|
186097
186376
|
),
|
|
186098
|
-
|
|
186099
|
-
|
|
186100
|
-
|
|
186377
|
+
AST18.objectProperty(
|
|
186378
|
+
AST18.literal("hookFn"),
|
|
186379
|
+
AST18.identifier(houdini_on_error_fn)
|
|
186101
186380
|
),
|
|
186102
|
-
|
|
186103
|
-
|
|
186104
|
-
|
|
186381
|
+
AST18.objectProperty(
|
|
186382
|
+
AST18.literal("error"),
|
|
186383
|
+
AST18.identifier("err")
|
|
186105
186384
|
),
|
|
186106
|
-
|
|
186385
|
+
AST18.objectProperty(AST18.literal("input"), input_obj)
|
|
186107
186386
|
])
|
|
186108
186387
|
]
|
|
186109
186388
|
)
|
|
186110
186389
|
)
|
|
186111
|
-
) :
|
|
186390
|
+
) : AST18.throwStatement(AST18.identifier("err"))
|
|
186112
186391
|
])
|
|
186113
186392
|
)
|
|
186114
186393
|
)
|
|
@@ -186132,7 +186411,7 @@ async function find_special_query(type, page2) {
|
|
|
186132
186411
|
if (!contents) {
|
|
186133
186412
|
return null;
|
|
186134
186413
|
}
|
|
186135
|
-
const parsed =
|
|
186414
|
+
const parsed = graphql33.parse(contents);
|
|
186136
186415
|
const definition = parsed.definitions.find(
|
|
186137
186416
|
(defn) => defn.kind === "OperationDefinition" && defn.operation === "query"
|
|
186138
186417
|
);
|
|
@@ -186140,33 +186419,28 @@ async function find_special_query(type, page2) {
|
|
|
186140
186419
|
formatErrors({ message: "gql file must contain a query.", filepath: query_path });
|
|
186141
186420
|
return null;
|
|
186142
186421
|
}
|
|
186143
|
-
const { id: id2 } = store_import({
|
|
186144
|
-
page: page2,
|
|
186145
|
-
artifact: { name: definition.name.value }
|
|
186146
|
-
});
|
|
186147
186422
|
return {
|
|
186148
|
-
store_id: id2,
|
|
186149
186423
|
name: definition.name.value,
|
|
186150
186424
|
variables: operation_requires_variables(definition)
|
|
186151
186425
|
};
|
|
186152
186426
|
}
|
|
186153
186427
|
function load_hook_statements(name2, request_context, input_id, result_id) {
|
|
186154
|
-
return
|
|
186155
|
-
|
|
186156
|
-
|
|
186157
|
-
|
|
186428
|
+
return AST18.expressionStatement(
|
|
186429
|
+
AST18.awaitExpression(
|
|
186430
|
+
AST18.callExpression(
|
|
186431
|
+
AST18.memberExpression(request_context, AST18.identifier("invokeLoadHook")),
|
|
186158
186432
|
[
|
|
186159
|
-
|
|
186160
|
-
|
|
186161
|
-
|
|
186162
|
-
|
|
186163
|
-
|
|
186433
|
+
AST18.objectExpression([
|
|
186434
|
+
AST18.objectProperty(AST18.literal("variant"), AST18.stringLiteral(name2)),
|
|
186435
|
+
AST18.objectProperty(
|
|
186436
|
+
AST18.literal("hookFn"),
|
|
186437
|
+
AST18.identifier(
|
|
186164
186438
|
name2 === "before" ? houdini_before_load_fn : houdini_after_load_fn
|
|
186165
186439
|
)
|
|
186166
186440
|
),
|
|
186167
186441
|
...name2 === "after" ? [
|
|
186168
|
-
|
|
186169
|
-
|
|
186442
|
+
AST18.objectProperty(AST18.literal("input"), input_id),
|
|
186443
|
+
AST18.objectProperty(AST18.literal("data"), result_id)
|
|
186170
186444
|
] : []
|
|
186171
186445
|
])
|
|
186172
186446
|
]
|
|
@@ -186195,8 +186469,8 @@ function unexported_data_error(filepath) {
|
|
|
186195
186469
|
}
|
|
186196
186470
|
|
|
186197
186471
|
// src/plugin/transforms/kit/session.ts
|
|
186198
|
-
var
|
|
186199
|
-
var
|
|
186472
|
+
var recast19 = __toESM(require_main5(), 1);
|
|
186473
|
+
var AST19 = recast19.types.builders;
|
|
186200
186474
|
function session_default(page2) {
|
|
186201
186475
|
if (is_root_layout_server(page2.config, page2.filepath)) {
|
|
186202
186476
|
process_root_layout_server(page2);
|
|
@@ -186212,12 +186486,12 @@ function process_root_layout_server(page2) {
|
|
|
186212
186486
|
sourceModule: "$houdini/plugins/houdini-svelte/runtime/session"
|
|
186213
186487
|
}).ids[0];
|
|
186214
186488
|
add_load_return(page2, (event_id) => [
|
|
186215
|
-
|
|
186489
|
+
AST19.spreadElement(AST19.callExpression(build_session_object, [event_id]))
|
|
186216
186490
|
]);
|
|
186217
186491
|
}
|
|
186218
186492
|
function process_root_layout_script(page2) {
|
|
186219
186493
|
add_load_return(page2, (event_id) => [
|
|
186220
|
-
|
|
186494
|
+
AST19.spreadElement(AST19.memberExpression(event_id, AST19.identifier("data")))
|
|
186221
186495
|
]);
|
|
186222
186496
|
}
|
|
186223
186497
|
function add_load_return(page2, properties) {
|
|
@@ -186229,48 +186503,48 @@ function add_load_return(page2, properties) {
|
|
|
186229
186503
|
if (return_statement_index !== -1) {
|
|
186230
186504
|
return_statement = body.body[return_statement_index];
|
|
186231
186505
|
} else {
|
|
186232
|
-
return_statement =
|
|
186506
|
+
return_statement = AST19.returnStatement(AST19.objectExpression([]));
|
|
186233
186507
|
body.body.push(return_statement);
|
|
186234
186508
|
return_statement_index = body.body.length - 1;
|
|
186235
186509
|
}
|
|
186236
|
-
const local_return_var =
|
|
186237
|
-
body.body[return_statement_index] =
|
|
186238
|
-
|
|
186510
|
+
const local_return_var = AST19.identifier("__houdini__vite__plugin__return__value__");
|
|
186511
|
+
body.body[return_statement_index] = AST19.variableDeclaration("const", [
|
|
186512
|
+
AST19.variableDeclarator(local_return_var, return_statement.argument)
|
|
186239
186513
|
]);
|
|
186240
186514
|
body.body.splice(
|
|
186241
186515
|
return_statement_index + 1,
|
|
186242
186516
|
0,
|
|
186243
|
-
|
|
186244
|
-
|
|
186517
|
+
AST19.returnStatement(
|
|
186518
|
+
AST19.objectExpression([...properties(event_id), AST19.spreadElement(local_return_var)])
|
|
186245
186519
|
)
|
|
186246
186520
|
);
|
|
186247
186521
|
});
|
|
186248
186522
|
}
|
|
186249
186523
|
function modify_load(page2, cb) {
|
|
186250
186524
|
let load_fn = find_exported_fn(page2.script.body, "load");
|
|
186251
|
-
let event_id =
|
|
186252
|
-
let body =
|
|
186525
|
+
let event_id = AST19.identifier("event");
|
|
186526
|
+
let body = AST19.blockStatement([]);
|
|
186253
186527
|
if (load_fn?.type === "ArrowFunctionExpression") {
|
|
186254
186528
|
if (load_fn.body.type === "BlockStatement") {
|
|
186255
186529
|
body = load_fn.body;
|
|
186256
186530
|
} else {
|
|
186257
|
-
body =
|
|
186531
|
+
body = AST19.blockStatement([AST19.returnStatement(load_fn.body)]);
|
|
186258
186532
|
load_fn.body = body;
|
|
186259
186533
|
}
|
|
186260
186534
|
} else if (load_fn) {
|
|
186261
186535
|
body = load_fn.body;
|
|
186262
186536
|
}
|
|
186263
186537
|
if (!load_fn) {
|
|
186264
|
-
load_fn =
|
|
186265
|
-
|
|
186538
|
+
load_fn = AST19.functionDeclaration(
|
|
186539
|
+
AST19.identifier("load"),
|
|
186266
186540
|
[event_id],
|
|
186267
|
-
|
|
186541
|
+
AST19.blockStatement([])
|
|
186268
186542
|
);
|
|
186269
186543
|
load_fn.async = true;
|
|
186270
186544
|
page2.script.body.splice(
|
|
186271
186545
|
find_insert_index(page2.script),
|
|
186272
186546
|
0,
|
|
186273
|
-
|
|
186547
|
+
AST19.exportNamedDeclaration(load_fn)
|
|
186274
186548
|
);
|
|
186275
186549
|
body = load_fn.body;
|
|
186276
186550
|
} else {
|
|
@@ -186282,7 +186556,7 @@ function modify_load(page2, cb) {
|
|
|
186282
186556
|
const pattern = load_fn.params[0];
|
|
186283
186557
|
load_fn.params[0] = event_id;
|
|
186284
186558
|
body.body.unshift(
|
|
186285
|
-
|
|
186559
|
+
AST19.variableDeclaration("let", [AST19.variableDeclarator(pattern, event_id)])
|
|
186286
186560
|
);
|
|
186287
186561
|
} else {
|
|
186288
186562
|
throw new Error(
|
|
@@ -186415,13 +186689,13 @@ function walk2(ast, { enter, leave }) {
|
|
|
186415
186689
|
}
|
|
186416
186690
|
|
|
186417
186691
|
// src/plugin/transforms/reactive.ts
|
|
186418
|
-
var
|
|
186419
|
-
var
|
|
186692
|
+
var recast20 = __toESM(require_main5(), 1);
|
|
186693
|
+
var AST20 = recast20.types.builders;
|
|
186420
186694
|
async function ReactiveProcessor(config4, page2) {
|
|
186421
186695
|
if (!is_component(config4, page2.framework, page2.filepath) && !is_route(config4, page2.framework, page2.filepath)) {
|
|
186422
186696
|
return;
|
|
186423
186697
|
}
|
|
186424
|
-
const magicFunctions = ["
|
|
186698
|
+
const magicFunctions = ["graphql", "fragment", "paginatedFragment"];
|
|
186425
186699
|
if (!magicFunctions.includes("graphql") || magicFunctions.length === 1) {
|
|
186426
186700
|
return;
|
|
186427
186701
|
}
|
|
@@ -186454,9 +186728,9 @@ async function ReactiveProcessor(config4, page2) {
|
|
|
186454
186728
|
declaration.id.typeAnnotation = null;
|
|
186455
186729
|
}
|
|
186456
186730
|
this.replace(
|
|
186457
|
-
|
|
186458
|
-
|
|
186459
|
-
|
|
186731
|
+
AST20.labeledStatement(
|
|
186732
|
+
AST20.identifier("$"),
|
|
186733
|
+
AST20.expressionStatement(AST20.assignmentExpression("=", declaration.id, value2))
|
|
186460
186734
|
)
|
|
186461
186735
|
);
|
|
186462
186736
|
}
|
|
@@ -186466,9 +186740,11 @@ function filterCallExpr(expr) {
|
|
|
186466
186740
|
if (expr.type !== "CallExpression" || expr.callee.type !== "Identifier") {
|
|
186467
186741
|
return;
|
|
186468
186742
|
}
|
|
186469
|
-
|
|
186470
|
-
|
|
186471
|
-
|
|
186743
|
+
if (expr.callee.type === "Identifier" && expr.callee.name === "graphql" && expr.arguments.length === 1 && (expr.arguments[0].type === "StringLiteral" || expr.arguments[0].type === "TemplateLiteral")) {
|
|
186744
|
+
return true;
|
|
186745
|
+
}
|
|
186746
|
+
const tag2 = expr.arguments.find(
|
|
186747
|
+
(arg) => arg.type === "TaggedTemplateExpression" && arg.tag.type === "Identifier" && arg.tag.name === "graphql" || arg.type === "CallExpression" && arg.callee.type === "Identifier" && arg.callee.name === "graphql" && arg.arguments.length === 1 && (arg.arguments[0].type === "StringLiteral" || arg.arguments[0].type === "TemplateLiteral")
|
|
186472
186748
|
);
|
|
186473
186749
|
if (!tag2) {
|
|
186474
186750
|
return;
|
|
@@ -186480,13 +186756,16 @@ function filterTaggedTemplate(expr) {
|
|
|
186480
186756
|
}
|
|
186481
186757
|
|
|
186482
186758
|
// src/plugin/transforms/tags.ts
|
|
186759
|
+
var recast21 = __toESM(require_main5(), 1);
|
|
186760
|
+
var AST21 = recast21.types.builders;
|
|
186483
186761
|
async function GraphQLTagProcessor(config4, page2) {
|
|
186484
186762
|
await find_graphql(config4, page2.script, {
|
|
186485
186763
|
dependency: page2.watch_file,
|
|
186486
186764
|
tag(tag2) {
|
|
186487
186765
|
const { node: node2, parsedDocument } = tag2;
|
|
186488
186766
|
const operation = config4.extractDefinition(parsedDocument);
|
|
186489
|
-
|
|
186767
|
+
const { id: id2 } = store_import({ page: page2, artifact: { name: operation.name.value } });
|
|
186768
|
+
node2.replaceWith(AST21.newExpression(id2, []));
|
|
186490
186769
|
}
|
|
186491
186770
|
});
|
|
186492
186771
|
}
|
|
@@ -186508,7 +186787,7 @@ async function apply_transforms(framework2, page2) {
|
|
|
186508
186787
|
script = {
|
|
186509
186788
|
start: 0,
|
|
186510
186789
|
end: 0,
|
|
186511
|
-
script:
|
|
186790
|
+
script: recast23.types.builders.program([])
|
|
186512
186791
|
};
|
|
186513
186792
|
}
|
|
186514
186793
|
if (!script) {
|
|
@@ -186525,7 +186804,7 @@ async function apply_transforms(framework2, page2) {
|
|
|
186525
186804
|
formatErrors({ message: e3.message, filepath: page2.filepath });
|
|
186526
186805
|
return { code: page2.content };
|
|
186527
186806
|
}
|
|
186528
|
-
const printedScript =
|
|
186807
|
+
const printedScript = recast23.print(result.script).code;
|
|
186529
186808
|
return {
|
|
186530
186809
|
code: !page2.filepath.endsWith(".svelte") ? printedScript : replace_tag_content(page2.content, script.start, script.end, printedScript)
|
|
186531
186810
|
};
|
|
@@ -186579,6 +186858,7 @@ async function validateDocuments({
|
|
|
186579
186858
|
// src/plugin/index.ts
|
|
186580
186859
|
var framework = "svelte";
|
|
186581
186860
|
var HoudiniSveltePlugin = async () => ({
|
|
186861
|
+
order: "core",
|
|
186582
186862
|
extensions: [".svelte"],
|
|
186583
186863
|
transform_runtime: {
|
|
186584
186864
|
"network.js": ({ config: config4, content }) => {
|
|
@@ -186619,6 +186899,19 @@ export const error = svelteKitError
|
|
|
186619
186899
|
framework
|
|
186620
186900
|
});
|
|
186621
186901
|
},
|
|
186902
|
+
graphql_tag_return({ config: config4, doc, ensure_import }) {
|
|
186903
|
+
if (doc.generateStore) {
|
|
186904
|
+
const store = store_name({ config: config4, name: doc.name });
|
|
186905
|
+
ensure_import({
|
|
186906
|
+
identifier: store,
|
|
186907
|
+
module: store_import_path({
|
|
186908
|
+
config: config4,
|
|
186909
|
+
name: doc.name
|
|
186910
|
+
}).replaceAll("$houdini", "..")
|
|
186911
|
+
});
|
|
186912
|
+
return store;
|
|
186913
|
+
}
|
|
186914
|
+
},
|
|
186622
186915
|
index_file({ config: config4, content, export_star_from, plugin_root }) {
|
|
186623
186916
|
const storesDir = "./" + path_exports.relative(config4.rootDir, stores_directory(plugin_root)).split(path_exports.sep).join("/");
|
|
186624
186917
|
return content + export_star_from({ module: storesDir });
|
|
@@ -186633,13 +186926,6 @@ export const error = svelteKitError
|
|
|
186633
186926
|
...fsPatch_default(() => framework)
|
|
186634
186927
|
},
|
|
186635
186928
|
async after_load(cfg) {
|
|
186636
|
-
if (store_name({ config: cfg, name: "QueryName" }) === global_store_name({ config: cfg, name: "QueryName" })) {
|
|
186637
|
-
throw new HoudiniError({
|
|
186638
|
-
filepath: cfg.filepath,
|
|
186639
|
-
message: 'Invalid cfg file: "globalStoreName" and "storeName" are overlapping',
|
|
186640
|
-
description: `Here, both gives: ${store_name({ config: cfg, name: "QueryName" })}`
|
|
186641
|
-
});
|
|
186642
|
-
}
|
|
186643
186929
|
const cfgPlugin = plugin_config(cfg);
|
|
186644
186930
|
let client_file_exists = false;
|
|
186645
186931
|
if (path_exports.extname(cfgPlugin.client)) {
|
|
@@ -186662,8 +186948,22 @@ export const error = svelteKitError
|
|
|
186662
186948
|
framework = "kit";
|
|
186663
186949
|
} catch {
|
|
186664
186950
|
}
|
|
186951
|
+
},
|
|
186952
|
+
async env({ config: config4 }) {
|
|
186953
|
+
if (_env) {
|
|
186954
|
+
return _env;
|
|
186955
|
+
}
|
|
186956
|
+
const config_file = path_exports.join(config4.projectRoot, "svelte.config.js");
|
|
186957
|
+
let svelte_kit_cfg = {};
|
|
186958
|
+
try {
|
|
186959
|
+
svelte_kit_cfg = !fs_exports.existsSync(config_file) ? {} : await import(`${url.pathToFileURL(config_file).href}?ts=${Date.now()}`);
|
|
186960
|
+
} catch {
|
|
186961
|
+
}
|
|
186962
|
+
_env = (0, import_vite8.loadEnv)("dev", svelte_kit_cfg.kit?.dir || ".", "");
|
|
186963
|
+
return _env;
|
|
186665
186964
|
}
|
|
186666
186965
|
});
|
|
186966
|
+
var _env;
|
|
186667
186967
|
var plugin_default = HoudiniSveltePlugin;
|
|
186668
186968
|
// Annotate the CommonJS export names for ESM import in node:
|
|
186669
186969
|
0 && (module.exports = {});
|