houdini 1.0.0-next.5 → 1.0.0-next.7
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/cmd-cjs/index.js +484 -475
- package/build/cmd-esm/index.js +484 -475
- package/build/codegen/generators/artifacts/index.d.ts +2 -2
- package/build/codegen/generators/artifacts/indexFile.d.ts +2 -2
- package/build/codegen/generators/artifacts/selection.d.ts +2 -2
- package/build/codegen/generators/indexFile/index.d.ts +2 -2
- package/build/codegen/generators/persistedQueries/index.d.ts +2 -2
- package/build/codegen/generators/runtime/graphqlFunction.d.ts +2 -2
- package/build/codegen/generators/runtime/index.d.ts +2 -2
- package/build/codegen/generators/typescript/documentTypes.d.ts +2 -2
- package/build/codegen/generators/typescript/imperativeTypeDef.d.ts +2 -2
- package/build/codegen/generators/typescript/index.d.ts +2 -2
- package/build/codegen/index.d.ts +2 -2
- package/build/codegen/transforms/addID.d.ts +2 -2
- package/build/codegen/transforms/composeQueries.d.ts +4 -4
- package/build/codegen/transforms/fragmentVariables.d.ts +2 -2
- package/build/codegen/transforms/list.d.ts +2 -2
- package/build/codegen/transforms/paginate.d.ts +2 -2
- package/build/codegen/transforms/schema.d.ts +2 -2
- package/build/codegen/transforms/typename.d.ts +2 -2
- package/build/codegen/validators/noIDAlias.d.ts +2 -2
- package/build/codegen/validators/plugins.d.ts +2 -2
- package/build/codegen/validators/typeCheck.d.ts +2 -2
- package/build/codegen/validators/uniqueNames.d.ts +2 -2
- package/build/codegen-cjs/index.js +481 -472
- package/build/codegen-esm/index.js +481 -472
- package/build/lib/graphql.d.ts +2 -2
- package/build/lib/types.d.ts +35 -35
- package/build/lib-cjs/index.js +355 -355
- package/build/lib-esm/index.js +355 -355
- package/build/runtime/client/documentStore.d.ts +1 -1
- package/build/runtime/client/index.d.ts +7 -6
- package/build/runtime-cjs/client/documentStore.d.ts +1 -1
- package/build/runtime-cjs/client/index.d.ts +7 -6
- package/build/runtime-esm/client/documentStore.d.ts +1 -1
- package/build/runtime-esm/client/index.d.ts +7 -6
- package/build/test/index.d.ts +3 -3
- package/build/test-cjs/index.js +479 -470
- package/build/test-esm/index.js +479 -470
- package/build/vite-cjs/index.js +484 -475
- package/build/vite-esm/index.js +484 -475
- package/package.json +1 -1
package/build/cmd-cjs/index.js
CHANGED
|
@@ -4819,10 +4819,10 @@ var require_printer = __commonJS({
|
|
|
4819
4819
|
Object.defineProperty(exports, "__esModule", {
|
|
4820
4820
|
value: true
|
|
4821
4821
|
});
|
|
4822
|
-
exports.print =
|
|
4822
|
+
exports.print = print11;
|
|
4823
4823
|
var _visitor = require_visitor();
|
|
4824
4824
|
var _blockString = require_blockString();
|
|
4825
|
-
function
|
|
4825
|
+
function print11(ast) {
|
|
4826
4826
|
return (0, _visitor.visit)(ast, {
|
|
4827
4827
|
leave: printDocASTReducer2
|
|
4828
4828
|
});
|
|
@@ -56924,12 +56924,12 @@ var require_comments = __commonJS({
|
|
|
56924
56924
|
comment.trailing = true;
|
|
56925
56925
|
addCommentHelper(node, comment);
|
|
56926
56926
|
}
|
|
56927
|
-
function printLeadingComment(commentPath,
|
|
56927
|
+
function printLeadingComment(commentPath, print11) {
|
|
56928
56928
|
var comment = commentPath.getValue();
|
|
56929
56929
|
n.Comment.assert(comment);
|
|
56930
56930
|
var loc = comment.loc;
|
|
56931
56931
|
var lines = loc && loc.lines;
|
|
56932
|
-
var parts = [
|
|
56932
|
+
var parts = [print11(commentPath)];
|
|
56933
56933
|
if (comment.trailing) {
|
|
56934
56934
|
parts.push("\n");
|
|
56935
56935
|
} else if (lines instanceof lines_1.Lines) {
|
|
@@ -56944,7 +56944,7 @@ var require_comments = __commonJS({
|
|
|
56944
56944
|
}
|
|
56945
56945
|
return (0, lines_1.concat)(parts);
|
|
56946
56946
|
}
|
|
56947
|
-
function printTrailingComment(commentPath,
|
|
56947
|
+
function printTrailingComment(commentPath, print11) {
|
|
56948
56948
|
var comment = commentPath.getValue(commentPath);
|
|
56949
56949
|
n.Comment.assert(comment);
|
|
56950
56950
|
var loc = comment.loc;
|
|
@@ -56959,12 +56959,12 @@ var require_comments = __commonJS({
|
|
|
56959
56959
|
parts.push(new Array(leadingSpace.length).join("\n"));
|
|
56960
56960
|
}
|
|
56961
56961
|
}
|
|
56962
|
-
parts.push(
|
|
56962
|
+
parts.push(print11(commentPath));
|
|
56963
56963
|
return (0, lines_1.concat)(parts);
|
|
56964
56964
|
}
|
|
56965
|
-
function printComments(path2,
|
|
56965
|
+
function printComments(path2, print11) {
|
|
56966
56966
|
var value = path2.getValue();
|
|
56967
|
-
var innerLines =
|
|
56967
|
+
var innerLines = print11(path2);
|
|
56968
56968
|
var comments = n.Node.check(value) && types16.getFieldValue(value, "comments");
|
|
56969
56969
|
if (!comments || comments.length === 0) {
|
|
56970
56970
|
return innerLines;
|
|
@@ -56976,9 +56976,9 @@ var require_comments = __commonJS({
|
|
|
56976
56976
|
var leading = types16.getFieldValue(comment, "leading");
|
|
56977
56977
|
var trailing = types16.getFieldValue(comment, "trailing");
|
|
56978
56978
|
if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
|
|
56979
|
-
leadingParts.push(printLeadingComment(commentPath,
|
|
56979
|
+
leadingParts.push(printLeadingComment(commentPath, print11));
|
|
56980
56980
|
} else if (trailing) {
|
|
56981
|
-
trailingParts.push(printTrailingComment(commentPath,
|
|
56981
|
+
trailingParts.push(printTrailingComment(commentPath, print11));
|
|
56982
56982
|
}
|
|
56983
56983
|
}, "comments");
|
|
56984
56984
|
leadingParts.push.apply(leadingParts, trailingParts);
|
|
@@ -57669,7 +57669,7 @@ var require_patcher = __commonJS({
|
|
|
57669
57669
|
};
|
|
57670
57670
|
exports.Patcher = Patcher;
|
|
57671
57671
|
var Pp = Patcher.prototype;
|
|
57672
|
-
Pp.tryToReprintComments = function(newNode, oldNode,
|
|
57672
|
+
Pp.tryToReprintComments = function(newNode, oldNode, print11) {
|
|
57673
57673
|
var patcher = this;
|
|
57674
57674
|
if (!newNode.comments && !oldNode.comments) {
|
|
57675
57675
|
return true;
|
|
@@ -57686,7 +57686,7 @@ var require_patcher = __commonJS({
|
|
|
57686
57686
|
assert_1.default.ok(oldComment.leading || oldComment.trailing);
|
|
57687
57687
|
patcher.replace(
|
|
57688
57688
|
oldComment.loc,
|
|
57689
|
-
|
|
57689
|
+
print11(reprint.newPath).indentTail(oldComment.loc.indent)
|
|
57690
57690
|
);
|
|
57691
57691
|
});
|
|
57692
57692
|
}
|
|
@@ -57733,17 +57733,17 @@ var require_patcher = __commonJS({
|
|
|
57733
57733
|
var reprints = [];
|
|
57734
57734
|
if (!lines || !findReprints(path2, reprints))
|
|
57735
57735
|
return;
|
|
57736
|
-
return function(
|
|
57736
|
+
return function(print11) {
|
|
57737
57737
|
var patcher = new Patcher(lines);
|
|
57738
57738
|
reprints.forEach(function(reprint) {
|
|
57739
57739
|
var newNode = reprint.newPath.getValue();
|
|
57740
57740
|
var oldNode = reprint.oldPath.getValue();
|
|
57741
57741
|
SourceLocation.assert(oldNode.loc, true);
|
|
57742
|
-
var needToPrintNewPathWithComments = !patcher.tryToReprintComments(newNode, oldNode,
|
|
57742
|
+
var needToPrintNewPathWithComments = !patcher.tryToReprintComments(newNode, oldNode, print11);
|
|
57743
57743
|
if (needToPrintNewPathWithComments) {
|
|
57744
57744
|
patcher.deleteComments(oldNode);
|
|
57745
57745
|
}
|
|
57746
|
-
var newLines =
|
|
57746
|
+
var newLines = print11(reprint.newPath, {
|
|
57747
57747
|
includeComments: needToPrintNewPathWithComments,
|
|
57748
57748
|
avoidRootParens: oldNode.type === newNode.type && reprint.oldPath.hasParens()
|
|
57749
57749
|
}).indentTail(oldNode.loc.indent);
|
|
@@ -57960,10 +57960,10 @@ var require_printer2 = __commonJS({
|
|
|
57960
57960
|
function makePrintFunctionWith(options, overrides) {
|
|
57961
57961
|
options = Object.assign({}, options, overrides);
|
|
57962
57962
|
return function(path2) {
|
|
57963
|
-
return
|
|
57963
|
+
return print11(path2, options);
|
|
57964
57964
|
};
|
|
57965
57965
|
}
|
|
57966
|
-
function
|
|
57966
|
+
function print11(path2, options) {
|
|
57967
57967
|
assert_1.default.ok(path2 instanceof fast_path_1.default);
|
|
57968
57968
|
options = options || {};
|
|
57969
57969
|
if (options.includeComments) {
|
|
@@ -57979,7 +57979,7 @@ var require_printer2 = __commonJS({
|
|
|
57979
57979
|
}
|
|
57980
57980
|
}
|
|
57981
57981
|
var reprinter = (0, patcher_1.getReprinter)(path2);
|
|
57982
|
-
var lines = reprinter ? reprinter(
|
|
57982
|
+
var lines = reprinter ? reprinter(print11) : genericPrint(path2, config2, options, makePrintFunctionWith(options, {
|
|
57983
57983
|
includeComments: true,
|
|
57984
57984
|
avoidRootParens: false
|
|
57985
57985
|
}));
|
|
@@ -57990,7 +57990,7 @@ var require_printer2 = __commonJS({
|
|
|
57990
57990
|
if (!ast) {
|
|
57991
57991
|
return emptyPrintResult;
|
|
57992
57992
|
}
|
|
57993
|
-
var lines =
|
|
57993
|
+
var lines = print11(fast_path_1.default.from(ast), {
|
|
57994
57994
|
includeComments: true,
|
|
57995
57995
|
avoidRootParens: false
|
|
57996
57996
|
});
|
|
@@ -58043,7 +58043,7 @@ var require_printer2 = __commonJS({
|
|
|
58043
58043
|
}
|
|
58044
58044
|
return (0, lines_1.concat)(parts);
|
|
58045
58045
|
}
|
|
58046
|
-
function genericPrintNoParens(path2, options,
|
|
58046
|
+
function genericPrintNoParens(path2, options, print11) {
|
|
58047
58047
|
var n = path2.getValue();
|
|
58048
58048
|
if (!n) {
|
|
58049
58049
|
return (0, lines_1.fromString)("");
|
|
@@ -58055,45 +58055,45 @@ var require_printer2 = __commonJS({
|
|
|
58055
58055
|
var parts = [];
|
|
58056
58056
|
switch (n.type) {
|
|
58057
58057
|
case "File":
|
|
58058
|
-
return path2.call(
|
|
58058
|
+
return path2.call(print11, "program");
|
|
58059
58059
|
case "Program":
|
|
58060
58060
|
if (n.directives) {
|
|
58061
58061
|
path2.each(function(childPath) {
|
|
58062
|
-
parts.push(
|
|
58062
|
+
parts.push(print11(childPath), ";\n");
|
|
58063
58063
|
}, "directives");
|
|
58064
58064
|
}
|
|
58065
58065
|
if (n.interpreter) {
|
|
58066
|
-
parts.push(path2.call(
|
|
58066
|
+
parts.push(path2.call(print11, "interpreter"));
|
|
58067
58067
|
}
|
|
58068
58068
|
parts.push(path2.call(function(bodyPath) {
|
|
58069
|
-
return printStatementSequence(bodyPath, options,
|
|
58069
|
+
return printStatementSequence(bodyPath, options, print11);
|
|
58070
58070
|
}, "body"));
|
|
58071
58071
|
return (0, lines_1.concat)(parts);
|
|
58072
58072
|
case "Noop":
|
|
58073
58073
|
case "EmptyStatement":
|
|
58074
58074
|
return (0, lines_1.fromString)("");
|
|
58075
58075
|
case "ExpressionStatement":
|
|
58076
|
-
return (0, lines_1.concat)([path2.call(
|
|
58076
|
+
return (0, lines_1.concat)([path2.call(print11, "expression"), ";"]);
|
|
58077
58077
|
case "ParenthesizedExpression":
|
|
58078
|
-
return (0, lines_1.concat)(["(", path2.call(
|
|
58078
|
+
return (0, lines_1.concat)(["(", path2.call(print11, "expression"), ")"]);
|
|
58079
58079
|
case "BinaryExpression":
|
|
58080
58080
|
case "LogicalExpression":
|
|
58081
58081
|
case "AssignmentExpression":
|
|
58082
58082
|
return (0, lines_1.fromString)(" ").join([
|
|
58083
|
-
path2.call(
|
|
58083
|
+
path2.call(print11, "left"),
|
|
58084
58084
|
n.operator,
|
|
58085
|
-
path2.call(
|
|
58085
|
+
path2.call(print11, "right")
|
|
58086
58086
|
]);
|
|
58087
58087
|
case "AssignmentPattern":
|
|
58088
58088
|
return (0, lines_1.concat)([
|
|
58089
|
-
path2.call(
|
|
58089
|
+
path2.call(print11, "left"),
|
|
58090
58090
|
" = ",
|
|
58091
|
-
path2.call(
|
|
58091
|
+
path2.call(print11, "right")
|
|
58092
58092
|
]);
|
|
58093
58093
|
case "MemberExpression":
|
|
58094
58094
|
case "OptionalMemberExpression": {
|
|
58095
|
-
parts.push(path2.call(
|
|
58096
|
-
var property = path2.call(
|
|
58095
|
+
parts.push(path2.call(print11, "object"));
|
|
58096
|
+
var property = path2.call(print11, "property");
|
|
58097
58097
|
var optional = types16.getFieldValue(n, "optional");
|
|
58098
58098
|
if (n.computed) {
|
|
58099
58099
|
parts.push(optional ? "?.[" : "[", property, "]");
|
|
@@ -58103,18 +58103,18 @@ var require_printer2 = __commonJS({
|
|
|
58103
58103
|
return (0, lines_1.concat)(parts);
|
|
58104
58104
|
}
|
|
58105
58105
|
case "ChainExpression":
|
|
58106
|
-
return path2.call(
|
|
58106
|
+
return path2.call(print11, "expression");
|
|
58107
58107
|
case "MetaProperty":
|
|
58108
58108
|
return (0, lines_1.concat)([
|
|
58109
|
-
path2.call(
|
|
58109
|
+
path2.call(print11, "meta"),
|
|
58110
58110
|
".",
|
|
58111
|
-
path2.call(
|
|
58111
|
+
path2.call(print11, "property")
|
|
58112
58112
|
]);
|
|
58113
58113
|
case "BindExpression":
|
|
58114
58114
|
if (n.object) {
|
|
58115
|
-
parts.push(path2.call(
|
|
58115
|
+
parts.push(path2.call(print11, "object"));
|
|
58116
58116
|
}
|
|
58117
|
-
parts.push("::", path2.call(
|
|
58117
|
+
parts.push("::", path2.call(print11, "callee"));
|
|
58118
58118
|
return (0, lines_1.concat)(parts);
|
|
58119
58119
|
case "Path":
|
|
58120
58120
|
return (0, lines_1.fromString)(".").join(n.body);
|
|
@@ -58122,7 +58122,7 @@ var require_printer2 = __commonJS({
|
|
|
58122
58122
|
return (0, lines_1.concat)([
|
|
58123
58123
|
(0, lines_1.fromString)(n.name, options),
|
|
58124
58124
|
n.optional ? "?" : "",
|
|
58125
|
-
path2.call(
|
|
58125
|
+
path2.call(print11, "typeAnnotation")
|
|
58126
58126
|
]);
|
|
58127
58127
|
case "SpreadElement":
|
|
58128
58128
|
case "SpreadElementPattern":
|
|
@@ -58133,8 +58133,8 @@ var require_printer2 = __commonJS({
|
|
|
58133
58133
|
case "RestElement":
|
|
58134
58134
|
return (0, lines_1.concat)([
|
|
58135
58135
|
"...",
|
|
58136
|
-
path2.call(
|
|
58137
|
-
path2.call(
|
|
58136
|
+
path2.call(print11, "argument"),
|
|
58137
|
+
path2.call(print11, "typeAnnotation")
|
|
58138
58138
|
]);
|
|
58139
58139
|
case "FunctionDeclaration":
|
|
58140
58140
|
case "FunctionExpression":
|
|
@@ -58149,15 +58149,15 @@ var require_printer2 = __commonJS({
|
|
|
58149
58149
|
if (n.generator)
|
|
58150
58150
|
parts.push("*");
|
|
58151
58151
|
if (n.id) {
|
|
58152
|
-
parts.push(" ", path2.call(
|
|
58152
|
+
parts.push(" ", path2.call(print11, "id"), path2.call(print11, "typeParameters"));
|
|
58153
58153
|
} else {
|
|
58154
58154
|
if (n.typeParameters) {
|
|
58155
|
-
parts.push(path2.call(
|
|
58155
|
+
parts.push(path2.call(print11, "typeParameters"));
|
|
58156
58156
|
}
|
|
58157
58157
|
}
|
|
58158
|
-
parts.push("(", printFunctionParams(path2, options,
|
|
58158
|
+
parts.push("(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "returnType"));
|
|
58159
58159
|
if (n.body) {
|
|
58160
|
-
parts.push(" ", path2.call(
|
|
58160
|
+
parts.push(" ", path2.call(print11, "body"));
|
|
58161
58161
|
}
|
|
58162
58162
|
return (0, lines_1.concat)(parts);
|
|
58163
58163
|
case "ArrowFunctionExpression":
|
|
@@ -58165,44 +58165,44 @@ var require_printer2 = __commonJS({
|
|
|
58165
58165
|
parts.push("async ");
|
|
58166
58166
|
}
|
|
58167
58167
|
if (n.typeParameters) {
|
|
58168
|
-
parts.push(path2.call(
|
|
58168
|
+
parts.push(path2.call(print11, "typeParameters"));
|
|
58169
58169
|
}
|
|
58170
58170
|
if (!options.arrowParensAlways && n.params.length === 1 && !n.rest && n.params[0].type === "Identifier" && !n.params[0].typeAnnotation && !n.returnType) {
|
|
58171
|
-
parts.push(path2.call(
|
|
58171
|
+
parts.push(path2.call(print11, "params", 0));
|
|
58172
58172
|
} else {
|
|
58173
|
-
parts.push("(", printFunctionParams(path2, options,
|
|
58173
|
+
parts.push("(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "returnType"));
|
|
58174
58174
|
}
|
|
58175
|
-
parts.push(" => ", path2.call(
|
|
58175
|
+
parts.push(" => ", path2.call(print11, "body"));
|
|
58176
58176
|
return (0, lines_1.concat)(parts);
|
|
58177
58177
|
case "MethodDefinition":
|
|
58178
|
-
return printMethod(path2, options,
|
|
58178
|
+
return printMethod(path2, options, print11);
|
|
58179
58179
|
case "YieldExpression":
|
|
58180
58180
|
parts.push("yield");
|
|
58181
58181
|
if (n.delegate)
|
|
58182
58182
|
parts.push("*");
|
|
58183
58183
|
if (n.argument)
|
|
58184
|
-
parts.push(" ", path2.call(
|
|
58184
|
+
parts.push(" ", path2.call(print11, "argument"));
|
|
58185
58185
|
return (0, lines_1.concat)(parts);
|
|
58186
58186
|
case "AwaitExpression":
|
|
58187
58187
|
parts.push("await");
|
|
58188
58188
|
if (n.all)
|
|
58189
58189
|
parts.push("*");
|
|
58190
58190
|
if (n.argument)
|
|
58191
|
-
parts.push(" ", path2.call(
|
|
58191
|
+
parts.push(" ", path2.call(print11, "argument"));
|
|
58192
58192
|
return (0, lines_1.concat)(parts);
|
|
58193
58193
|
case "ModuleExpression":
|
|
58194
58194
|
return (0, lines_1.concat)([
|
|
58195
58195
|
"module {\n",
|
|
58196
|
-
path2.call(
|
|
58196
|
+
path2.call(print11, "body").indent(options.tabWidth),
|
|
58197
58197
|
"\n}"
|
|
58198
58198
|
]);
|
|
58199
58199
|
case "ModuleDeclaration":
|
|
58200
|
-
parts.push("module", path2.call(
|
|
58200
|
+
parts.push("module", path2.call(print11, "id"));
|
|
58201
58201
|
if (n.source) {
|
|
58202
58202
|
assert_1.default.ok(!n.body);
|
|
58203
|
-
parts.push("from", path2.call(
|
|
58203
|
+
parts.push("from", path2.call(print11, "source"));
|
|
58204
58204
|
} else {
|
|
58205
|
-
parts.push(path2.call(
|
|
58205
|
+
parts.push(path2.call(print11, "body"));
|
|
58206
58206
|
}
|
|
58207
58207
|
return (0, lines_1.fromString)(" ").join(parts);
|
|
58208
58208
|
case "ImportSpecifier":
|
|
@@ -58210,27 +58210,27 @@ var require_printer2 = __commonJS({
|
|
|
58210
58210
|
parts.push(n.importKind + " ");
|
|
58211
58211
|
}
|
|
58212
58212
|
if (n.imported) {
|
|
58213
|
-
parts.push(path2.call(
|
|
58213
|
+
parts.push(path2.call(print11, "imported"));
|
|
58214
58214
|
if (n.local && n.local.name !== n.imported.name) {
|
|
58215
|
-
parts.push(" as ", path2.call(
|
|
58215
|
+
parts.push(" as ", path2.call(print11, "local"));
|
|
58216
58216
|
}
|
|
58217
58217
|
} else if (n.id) {
|
|
58218
|
-
parts.push(path2.call(
|
|
58218
|
+
parts.push(path2.call(print11, "id"));
|
|
58219
58219
|
if (n.name) {
|
|
58220
|
-
parts.push(" as ", path2.call(
|
|
58220
|
+
parts.push(" as ", path2.call(print11, "name"));
|
|
58221
58221
|
}
|
|
58222
58222
|
}
|
|
58223
58223
|
return (0, lines_1.concat)(parts);
|
|
58224
58224
|
case "ExportSpecifier":
|
|
58225
58225
|
if (n.local) {
|
|
58226
|
-
parts.push(path2.call(
|
|
58226
|
+
parts.push(path2.call(print11, "local"));
|
|
58227
58227
|
if (n.exported && n.exported.name !== n.local.name) {
|
|
58228
|
-
parts.push(" as ", path2.call(
|
|
58228
|
+
parts.push(" as ", path2.call(print11, "exported"));
|
|
58229
58229
|
}
|
|
58230
58230
|
} else if (n.id) {
|
|
58231
|
-
parts.push(path2.call(
|
|
58231
|
+
parts.push(path2.call(print11, "id"));
|
|
58232
58232
|
if (n.name) {
|
|
58233
|
-
parts.push(" as ", path2.call(
|
|
58233
|
+
parts.push(" as ", path2.call(print11, "name"));
|
|
58234
58234
|
}
|
|
58235
58235
|
}
|
|
58236
58236
|
return (0, lines_1.concat)(parts);
|
|
@@ -58239,40 +58239,40 @@ var require_printer2 = __commonJS({
|
|
|
58239
58239
|
case "ImportNamespaceSpecifier":
|
|
58240
58240
|
parts.push("* as ");
|
|
58241
58241
|
if (n.local) {
|
|
58242
|
-
parts.push(path2.call(
|
|
58242
|
+
parts.push(path2.call(print11, "local"));
|
|
58243
58243
|
} else if (n.id) {
|
|
58244
|
-
parts.push(path2.call(
|
|
58244
|
+
parts.push(path2.call(print11, "id"));
|
|
58245
58245
|
}
|
|
58246
58246
|
return (0, lines_1.concat)(parts);
|
|
58247
58247
|
case "ImportDefaultSpecifier":
|
|
58248
58248
|
if (n.local) {
|
|
58249
|
-
return path2.call(
|
|
58249
|
+
return path2.call(print11, "local");
|
|
58250
58250
|
}
|
|
58251
|
-
return path2.call(
|
|
58251
|
+
return path2.call(print11, "id");
|
|
58252
58252
|
case "TSExportAssignment":
|
|
58253
|
-
return (0, lines_1.concat)(["export = ", path2.call(
|
|
58253
|
+
return (0, lines_1.concat)(["export = ", path2.call(print11, "expression")]);
|
|
58254
58254
|
case "ExportDeclaration":
|
|
58255
58255
|
case "ExportDefaultDeclaration":
|
|
58256
58256
|
case "ExportNamedDeclaration":
|
|
58257
|
-
return printExportDeclaration(path2, options,
|
|
58257
|
+
return printExportDeclaration(path2, options, print11);
|
|
58258
58258
|
case "ExportAllDeclaration":
|
|
58259
58259
|
parts.push("export *");
|
|
58260
58260
|
if (n.exported) {
|
|
58261
|
-
parts.push(" as ", path2.call(
|
|
58261
|
+
parts.push(" as ", path2.call(print11, "exported"));
|
|
58262
58262
|
}
|
|
58263
|
-
parts.push(" from ", path2.call(
|
|
58263
|
+
parts.push(" from ", path2.call(print11, "source"), ";");
|
|
58264
58264
|
return (0, lines_1.concat)(parts);
|
|
58265
58265
|
case "TSNamespaceExportDeclaration":
|
|
58266
|
-
parts.push("export as namespace ", path2.call(
|
|
58266
|
+
parts.push("export as namespace ", path2.call(print11, "id"));
|
|
58267
58267
|
return maybeAddSemicolon((0, lines_1.concat)(parts));
|
|
58268
58268
|
case "ExportNamespaceSpecifier":
|
|
58269
|
-
return (0, lines_1.concat)(["* as ", path2.call(
|
|
58269
|
+
return (0, lines_1.concat)(["* as ", path2.call(print11, "exported")]);
|
|
58270
58270
|
case "ExportDefaultSpecifier":
|
|
58271
|
-
return path2.call(
|
|
58271
|
+
return path2.call(print11, "exported");
|
|
58272
58272
|
case "Import":
|
|
58273
58273
|
return (0, lines_1.fromString)("import", options);
|
|
58274
58274
|
case "ImportExpression":
|
|
58275
|
-
return (0, lines_1.concat)(["import(", path2.call(
|
|
58275
|
+
return (0, lines_1.concat)(["import(", path2.call(print11, "source"), ")"]);
|
|
58276
58276
|
case "ImportDeclaration": {
|
|
58277
58277
|
parts.push("import ");
|
|
58278
58278
|
if (n.importKind && n.importKind !== "value") {
|
|
@@ -58284,9 +58284,9 @@ var require_printer2 = __commonJS({
|
|
|
58284
58284
|
path2.each(function(specifierPath) {
|
|
58285
58285
|
var spec = specifierPath.getValue();
|
|
58286
58286
|
if (spec.type === "ImportSpecifier") {
|
|
58287
|
-
bracedSpecifiers_1.push(
|
|
58287
|
+
bracedSpecifiers_1.push(print11(specifierPath));
|
|
58288
58288
|
} else if (spec.type === "ImportDefaultSpecifier" || spec.type === "ImportNamespaceSpecifier") {
|
|
58289
|
-
unbracedSpecifiers_1.push(
|
|
58289
|
+
unbracedSpecifiers_1.push(print11(specifierPath));
|
|
58290
58290
|
}
|
|
58291
58291
|
}, "specifiers");
|
|
58292
58292
|
unbracedSpecifiers_1.forEach(function(lines2, i2) {
|
|
@@ -58316,16 +58316,16 @@ var require_printer2 = __commonJS({
|
|
|
58316
58316
|
}
|
|
58317
58317
|
parts.push(" from ");
|
|
58318
58318
|
}
|
|
58319
|
-
parts.push(path2.call(
|
|
58319
|
+
parts.push(path2.call(print11, "source"), maybePrintImportAssertions(path2, options, print11), ";");
|
|
58320
58320
|
return (0, lines_1.concat)(parts);
|
|
58321
58321
|
}
|
|
58322
58322
|
case "ImportAttribute":
|
|
58323
|
-
return (0, lines_1.concat)([path2.call(
|
|
58323
|
+
return (0, lines_1.concat)([path2.call(print11, "key"), ": ", path2.call(print11, "value")]);
|
|
58324
58324
|
case "StaticBlock":
|
|
58325
58325
|
parts.push("static ");
|
|
58326
58326
|
case "BlockStatement": {
|
|
58327
58327
|
var naked_1 = path2.call(function(bodyPath) {
|
|
58328
|
-
return printStatementSequence(bodyPath, options,
|
|
58328
|
+
return printStatementSequence(bodyPath, options, print11);
|
|
58329
58329
|
}, "body");
|
|
58330
58330
|
if (naked_1.isEmpty()) {
|
|
58331
58331
|
if (!n.directives || n.directives.length === 0) {
|
|
@@ -58336,7 +58336,7 @@ var require_printer2 = __commonJS({
|
|
|
58336
58336
|
parts.push("{\n");
|
|
58337
58337
|
if (n.directives) {
|
|
58338
58338
|
path2.each(function(childPath) {
|
|
58339
|
-
parts.push(maybeAddSemicolon(
|
|
58339
|
+
parts.push(maybeAddSemicolon(print11(childPath).indent(options.tabWidth)), n.directives.length > 1 || !naked_1.isEmpty() ? "\n" : "");
|
|
58340
58340
|
}, "directives");
|
|
58341
58341
|
}
|
|
58342
58342
|
parts.push(naked_1.indent(options.tabWidth));
|
|
@@ -58346,7 +58346,7 @@ var require_printer2 = __commonJS({
|
|
|
58346
58346
|
case "ReturnStatement": {
|
|
58347
58347
|
parts.push("return");
|
|
58348
58348
|
if (n.argument) {
|
|
58349
|
-
var argLines = path2.call(
|
|
58349
|
+
var argLines = path2.call(print11, "argument");
|
|
58350
58350
|
if (argLines.startsWithComment() || argLines.length > 1 && namedTypes.JSXElement && namedTypes.JSXElement.check(n.argument)) {
|
|
58351
58351
|
parts.push(" (\n", argLines.indent(options.tabWidth), "\n)");
|
|
58352
58352
|
} else {
|
|
@@ -58358,17 +58358,17 @@ var require_printer2 = __commonJS({
|
|
|
58358
58358
|
}
|
|
58359
58359
|
case "CallExpression":
|
|
58360
58360
|
case "OptionalCallExpression":
|
|
58361
|
-
parts.push(path2.call(
|
|
58361
|
+
parts.push(path2.call(print11, "callee"));
|
|
58362
58362
|
if (n.typeParameters) {
|
|
58363
|
-
parts.push(path2.call(
|
|
58363
|
+
parts.push(path2.call(print11, "typeParameters"));
|
|
58364
58364
|
}
|
|
58365
58365
|
if (n.typeArguments) {
|
|
58366
|
-
parts.push(path2.call(
|
|
58366
|
+
parts.push(path2.call(print11, "typeArguments"));
|
|
58367
58367
|
}
|
|
58368
58368
|
if (types16.getFieldValue(n, "optional")) {
|
|
58369
58369
|
parts.push("?.");
|
|
58370
58370
|
}
|
|
58371
|
-
parts.push(printArgumentsList(path2, options,
|
|
58371
|
+
parts.push(printArgumentsList(path2, options, print11));
|
|
58372
58372
|
return (0, lines_1.concat)(parts);
|
|
58373
58373
|
case "RecordExpression":
|
|
58374
58374
|
parts.push("#");
|
|
@@ -58398,7 +58398,7 @@ var require_printer2 = __commonJS({
|
|
|
58398
58398
|
var i_1 = 0;
|
|
58399
58399
|
fields.forEach(function(field) {
|
|
58400
58400
|
path2.each(function(childPath) {
|
|
58401
|
-
var lines2 =
|
|
58401
|
+
var lines2 = print11(childPath);
|
|
58402
58402
|
if (!oneLine_1) {
|
|
58403
58403
|
lines2 = lines2.indent(options.tabWidth);
|
|
58404
58404
|
}
|
|
@@ -58435,32 +58435,32 @@ var require_printer2 = __commonJS({
|
|
|
58435
58435
|
parts[parts.length - 1] = " " + rightBrace;
|
|
58436
58436
|
}
|
|
58437
58437
|
if (n.typeAnnotation) {
|
|
58438
|
-
parts.push(path2.call(
|
|
58438
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
58439
58439
|
}
|
|
58440
58440
|
return (0, lines_1.concat)(parts);
|
|
58441
58441
|
}
|
|
58442
58442
|
case "PropertyPattern":
|
|
58443
58443
|
return (0, lines_1.concat)([
|
|
58444
|
-
path2.call(
|
|
58444
|
+
path2.call(print11, "key"),
|
|
58445
58445
|
": ",
|
|
58446
|
-
path2.call(
|
|
58446
|
+
path2.call(print11, "pattern")
|
|
58447
58447
|
]);
|
|
58448
58448
|
case "ObjectProperty":
|
|
58449
58449
|
case "Property": {
|
|
58450
58450
|
if (n.method || n.kind === "get" || n.kind === "set") {
|
|
58451
|
-
return printMethod(path2, options,
|
|
58451
|
+
return printMethod(path2, options, print11);
|
|
58452
58452
|
}
|
|
58453
58453
|
if (n.shorthand && n.value.type === "AssignmentPattern") {
|
|
58454
|
-
return path2.call(
|
|
58454
|
+
return path2.call(print11, "value");
|
|
58455
58455
|
}
|
|
58456
|
-
var key = path2.call(
|
|
58456
|
+
var key = path2.call(print11, "key");
|
|
58457
58457
|
if (n.computed) {
|
|
58458
58458
|
parts.push("[", key, "]");
|
|
58459
58459
|
} else {
|
|
58460
58460
|
parts.push(key);
|
|
58461
58461
|
}
|
|
58462
58462
|
if (!n.shorthand || n.key.name !== n.value.name) {
|
|
58463
|
-
parts.push(": ", path2.call(
|
|
58463
|
+
parts.push(": ", path2.call(print11, "value"));
|
|
58464
58464
|
}
|
|
58465
58465
|
return (0, lines_1.concat)(parts);
|
|
58466
58466
|
}
|
|
@@ -58468,18 +58468,18 @@ var require_printer2 = __commonJS({
|
|
|
58468
58468
|
case "ObjectMethod":
|
|
58469
58469
|
case "ClassPrivateMethod":
|
|
58470
58470
|
case "TSDeclareMethod":
|
|
58471
|
-
return printMethod(path2, options,
|
|
58471
|
+
return printMethod(path2, options, print11);
|
|
58472
58472
|
case "PrivateName":
|
|
58473
|
-
return (0, lines_1.concat)(["#", path2.call(
|
|
58473
|
+
return (0, lines_1.concat)(["#", path2.call(print11, "id")]);
|
|
58474
58474
|
case "Decorator":
|
|
58475
|
-
return (0, lines_1.concat)(["@", path2.call(
|
|
58475
|
+
return (0, lines_1.concat)(["@", path2.call(print11, "expression")]);
|
|
58476
58476
|
case "TupleExpression":
|
|
58477
58477
|
parts.push("#");
|
|
58478
58478
|
case "ArrayExpression":
|
|
58479
58479
|
case "ArrayPattern": {
|
|
58480
58480
|
var elems = n.elements;
|
|
58481
58481
|
var len_2 = elems.length;
|
|
58482
|
-
var printed_1 = path2.map(
|
|
58482
|
+
var printed_1 = path2.map(print11, "elements");
|
|
58483
58483
|
var joined = (0, lines_1.fromString)(", ").join(printed_1);
|
|
58484
58484
|
var oneLine_2 = joined.getLineLength(1) <= options.wrapColumn;
|
|
58485
58485
|
if (oneLine_2) {
|
|
@@ -58517,12 +58517,12 @@ var require_printer2 = __commonJS({
|
|
|
58517
58517
|
parts.push("]");
|
|
58518
58518
|
}
|
|
58519
58519
|
if (n.typeAnnotation) {
|
|
58520
|
-
parts.push(path2.call(
|
|
58520
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
58521
58521
|
}
|
|
58522
58522
|
return (0, lines_1.concat)(parts);
|
|
58523
58523
|
}
|
|
58524
58524
|
case "SequenceExpression":
|
|
58525
|
-
return (0, lines_1.fromString)(", ").join(path2.map(
|
|
58525
|
+
return (0, lines_1.fromString)(", ").join(path2.map(print11, "expressions"));
|
|
58526
58526
|
case "ThisExpression":
|
|
58527
58527
|
return (0, lines_1.fromString)("this");
|
|
58528
58528
|
case "Super":
|
|
@@ -58543,7 +58543,7 @@ var require_printer2 = __commonJS({
|
|
|
58543
58543
|
case "Literal":
|
|
58544
58544
|
return (0, lines_1.fromString)(getPossibleRaw(n) || (typeof n.value === "string" ? nodeStr(n.value, options) : n.value), options);
|
|
58545
58545
|
case "Directive":
|
|
58546
|
-
return path2.call(
|
|
58546
|
+
return path2.call(print11, "value");
|
|
58547
58547
|
case "DirectiveLiteral":
|
|
58548
58548
|
return (0, lines_1.fromString)(getPossibleRaw(n) || nodeStr(n.value, options), options);
|
|
58549
58549
|
case "InterpreterDirective":
|
|
@@ -58557,32 +58557,32 @@ var require_printer2 = __commonJS({
|
|
|
58557
58557
|
parts.push(n.operator);
|
|
58558
58558
|
if (/[a-z]$/.test(n.operator))
|
|
58559
58559
|
parts.push(" ");
|
|
58560
|
-
parts.push(path2.call(
|
|
58560
|
+
parts.push(path2.call(print11, "argument"));
|
|
58561
58561
|
return (0, lines_1.concat)(parts);
|
|
58562
58562
|
case "UpdateExpression":
|
|
58563
|
-
parts.push(path2.call(
|
|
58563
|
+
parts.push(path2.call(print11, "argument"), n.operator);
|
|
58564
58564
|
if (n.prefix)
|
|
58565
58565
|
parts.reverse();
|
|
58566
58566
|
return (0, lines_1.concat)(parts);
|
|
58567
58567
|
case "ConditionalExpression":
|
|
58568
58568
|
return (0, lines_1.concat)([
|
|
58569
|
-
path2.call(
|
|
58569
|
+
path2.call(print11, "test"),
|
|
58570
58570
|
" ? ",
|
|
58571
|
-
path2.call(
|
|
58571
|
+
path2.call(print11, "consequent"),
|
|
58572
58572
|
" : ",
|
|
58573
|
-
path2.call(
|
|
58573
|
+
path2.call(print11, "alternate")
|
|
58574
58574
|
]);
|
|
58575
58575
|
case "NewExpression": {
|
|
58576
|
-
parts.push("new ", path2.call(
|
|
58576
|
+
parts.push("new ", path2.call(print11, "callee"));
|
|
58577
58577
|
if (n.typeParameters) {
|
|
58578
|
-
parts.push(path2.call(
|
|
58578
|
+
parts.push(path2.call(print11, "typeParameters"));
|
|
58579
58579
|
}
|
|
58580
58580
|
if (n.typeArguments) {
|
|
58581
|
-
parts.push(path2.call(
|
|
58581
|
+
parts.push(path2.call(print11, "typeArguments"));
|
|
58582
58582
|
}
|
|
58583
58583
|
var args = n.arguments;
|
|
58584
58584
|
if (args) {
|
|
58585
|
-
parts.push(printArgumentsList(path2, options,
|
|
58585
|
+
parts.push(printArgumentsList(path2, options, print11));
|
|
58586
58586
|
}
|
|
58587
58587
|
return (0, lines_1.concat)(parts);
|
|
58588
58588
|
}
|
|
@@ -58593,7 +58593,7 @@ var require_printer2 = __commonJS({
|
|
|
58593
58593
|
parts.push(n.kind, " ");
|
|
58594
58594
|
var maxLen_1 = 0;
|
|
58595
58595
|
var printed = path2.map(function(childPath) {
|
|
58596
|
-
var lines2 =
|
|
58596
|
+
var lines2 = print11(childPath);
|
|
58597
58597
|
maxLen_1 = Math.max(lines2.length, maxLen_1);
|
|
58598
58598
|
return lines2;
|
|
58599
58599
|
}, "declarations");
|
|
@@ -58612,30 +58612,30 @@ var require_printer2 = __commonJS({
|
|
|
58612
58612
|
}
|
|
58613
58613
|
case "VariableDeclarator":
|
|
58614
58614
|
return n.init ? (0, lines_1.fromString)(" = ").join([
|
|
58615
|
-
path2.call(
|
|
58616
|
-
path2.call(
|
|
58617
|
-
]) : path2.call(
|
|
58615
|
+
path2.call(print11, "id"),
|
|
58616
|
+
path2.call(print11, "init")
|
|
58617
|
+
]) : path2.call(print11, "id");
|
|
58618
58618
|
case "WithStatement":
|
|
58619
58619
|
return (0, lines_1.concat)([
|
|
58620
58620
|
"with (",
|
|
58621
|
-
path2.call(
|
|
58621
|
+
path2.call(print11, "object"),
|
|
58622
58622
|
") ",
|
|
58623
|
-
path2.call(
|
|
58623
|
+
path2.call(print11, "body")
|
|
58624
58624
|
]);
|
|
58625
58625
|
case "IfStatement": {
|
|
58626
|
-
var con = adjustClause(path2.call(
|
|
58627
|
-
parts.push("if (", path2.call(
|
|
58626
|
+
var con = adjustClause(path2.call(print11, "consequent"), options);
|
|
58627
|
+
parts.push("if (", path2.call(print11, "test"), ")", con);
|
|
58628
58628
|
if (n.alternate)
|
|
58629
|
-
parts.push(endsWithBrace(con) ? " else" : "\nelse", adjustClause(path2.call(
|
|
58629
|
+
parts.push(endsWithBrace(con) ? " else" : "\nelse", adjustClause(path2.call(print11, "alternate"), options));
|
|
58630
58630
|
return (0, lines_1.concat)(parts);
|
|
58631
58631
|
}
|
|
58632
58632
|
case "ForStatement": {
|
|
58633
|
-
var init2 = path2.call(
|
|
58633
|
+
var init2 = path2.call(print11, "init");
|
|
58634
58634
|
var sep2 = init2.length > 1 ? ";\n" : "; ";
|
|
58635
58635
|
var forParen = "for (";
|
|
58636
|
-
var indented = (0, lines_1.fromString)(sep2).join([init2, path2.call(
|
|
58636
|
+
var indented = (0, lines_1.fromString)(sep2).join([init2, path2.call(print11, "test"), path2.call(print11, "update")]).indentTail(forParen.length);
|
|
58637
58637
|
var head = (0, lines_1.concat)([forParen, indented, ")"]);
|
|
58638
|
-
var clause = adjustClause(path2.call(
|
|
58638
|
+
var clause = adjustClause(path2.call(print11, "body"), options);
|
|
58639
58639
|
parts.push(head);
|
|
58640
58640
|
if (head.length > 1) {
|
|
58641
58641
|
parts.push("\n");
|
|
@@ -58647,18 +58647,18 @@ var require_printer2 = __commonJS({
|
|
|
58647
58647
|
case "WhileStatement":
|
|
58648
58648
|
return (0, lines_1.concat)([
|
|
58649
58649
|
"while (",
|
|
58650
|
-
path2.call(
|
|
58650
|
+
path2.call(print11, "test"),
|
|
58651
58651
|
")",
|
|
58652
|
-
adjustClause(path2.call(
|
|
58652
|
+
adjustClause(path2.call(print11, "body"), options)
|
|
58653
58653
|
]);
|
|
58654
58654
|
case "ForInStatement":
|
|
58655
58655
|
return (0, lines_1.concat)([
|
|
58656
58656
|
n.each ? "for each (" : "for (",
|
|
58657
|
-
path2.call(
|
|
58657
|
+
path2.call(print11, "left"),
|
|
58658
58658
|
" in ",
|
|
58659
|
-
path2.call(
|
|
58659
|
+
path2.call(print11, "right"),
|
|
58660
58660
|
")",
|
|
58661
|
-
adjustClause(path2.call(
|
|
58661
|
+
adjustClause(path2.call(print11, "body"), options)
|
|
58662
58662
|
]);
|
|
58663
58663
|
case "ForOfStatement":
|
|
58664
58664
|
case "ForAwaitStatement":
|
|
@@ -58666,122 +58666,122 @@ var require_printer2 = __commonJS({
|
|
|
58666
58666
|
if (n.await || n.type === "ForAwaitStatement") {
|
|
58667
58667
|
parts.push("await ");
|
|
58668
58668
|
}
|
|
58669
|
-
parts.push("(", path2.call(
|
|
58669
|
+
parts.push("(", path2.call(print11, "left"), " of ", path2.call(print11, "right"), ")", adjustClause(path2.call(print11, "body"), options));
|
|
58670
58670
|
return (0, lines_1.concat)(parts);
|
|
58671
58671
|
case "DoWhileStatement": {
|
|
58672
58672
|
var doBody = (0, lines_1.concat)([
|
|
58673
58673
|
"do",
|
|
58674
|
-
adjustClause(path2.call(
|
|
58674
|
+
adjustClause(path2.call(print11, "body"), options)
|
|
58675
58675
|
]);
|
|
58676
58676
|
parts.push(doBody);
|
|
58677
58677
|
if (endsWithBrace(doBody))
|
|
58678
58678
|
parts.push(" while");
|
|
58679
58679
|
else
|
|
58680
58680
|
parts.push("\nwhile");
|
|
58681
|
-
parts.push(" (", path2.call(
|
|
58681
|
+
parts.push(" (", path2.call(print11, "test"), ");");
|
|
58682
58682
|
return (0, lines_1.concat)(parts);
|
|
58683
58683
|
}
|
|
58684
58684
|
case "DoExpression": {
|
|
58685
58685
|
var statements = path2.call(function(bodyPath) {
|
|
58686
|
-
return printStatementSequence(bodyPath, options,
|
|
58686
|
+
return printStatementSequence(bodyPath, options, print11);
|
|
58687
58687
|
}, "body");
|
|
58688
58688
|
return (0, lines_1.concat)(["do {\n", statements.indent(options.tabWidth), "\n}"]);
|
|
58689
58689
|
}
|
|
58690
58690
|
case "BreakStatement":
|
|
58691
58691
|
parts.push("break");
|
|
58692
58692
|
if (n.label)
|
|
58693
|
-
parts.push(" ", path2.call(
|
|
58693
|
+
parts.push(" ", path2.call(print11, "label"));
|
|
58694
58694
|
parts.push(";");
|
|
58695
58695
|
return (0, lines_1.concat)(parts);
|
|
58696
58696
|
case "ContinueStatement":
|
|
58697
58697
|
parts.push("continue");
|
|
58698
58698
|
if (n.label)
|
|
58699
|
-
parts.push(" ", path2.call(
|
|
58699
|
+
parts.push(" ", path2.call(print11, "label"));
|
|
58700
58700
|
parts.push(";");
|
|
58701
58701
|
return (0, lines_1.concat)(parts);
|
|
58702
58702
|
case "LabeledStatement":
|
|
58703
58703
|
return (0, lines_1.concat)([
|
|
58704
|
-
path2.call(
|
|
58704
|
+
path2.call(print11, "label"),
|
|
58705
58705
|
":\n",
|
|
58706
|
-
path2.call(
|
|
58706
|
+
path2.call(print11, "body")
|
|
58707
58707
|
]);
|
|
58708
58708
|
case "TryStatement":
|
|
58709
|
-
parts.push("try ", path2.call(
|
|
58709
|
+
parts.push("try ", path2.call(print11, "block"));
|
|
58710
58710
|
if (n.handler) {
|
|
58711
|
-
parts.push(" ", path2.call(
|
|
58711
|
+
parts.push(" ", path2.call(print11, "handler"));
|
|
58712
58712
|
} else if (n.handlers) {
|
|
58713
58713
|
path2.each(function(handlerPath) {
|
|
58714
|
-
parts.push(" ",
|
|
58714
|
+
parts.push(" ", print11(handlerPath));
|
|
58715
58715
|
}, "handlers");
|
|
58716
58716
|
}
|
|
58717
58717
|
if (n.finalizer) {
|
|
58718
|
-
parts.push(" finally ", path2.call(
|
|
58718
|
+
parts.push(" finally ", path2.call(print11, "finalizer"));
|
|
58719
58719
|
}
|
|
58720
58720
|
return (0, lines_1.concat)(parts);
|
|
58721
58721
|
case "CatchClause":
|
|
58722
58722
|
parts.push("catch ");
|
|
58723
58723
|
if (n.param) {
|
|
58724
|
-
parts.push("(", path2.call(
|
|
58724
|
+
parts.push("(", path2.call(print11, "param"));
|
|
58725
58725
|
}
|
|
58726
58726
|
if (n.guard) {
|
|
58727
|
-
parts.push(" if ", path2.call(
|
|
58727
|
+
parts.push(" if ", path2.call(print11, "guard"));
|
|
58728
58728
|
}
|
|
58729
58729
|
if (n.param) {
|
|
58730
58730
|
parts.push(") ");
|
|
58731
58731
|
}
|
|
58732
|
-
parts.push(path2.call(
|
|
58732
|
+
parts.push(path2.call(print11, "body"));
|
|
58733
58733
|
return (0, lines_1.concat)(parts);
|
|
58734
58734
|
case "ThrowStatement":
|
|
58735
|
-
return (0, lines_1.concat)(["throw ", path2.call(
|
|
58735
|
+
return (0, lines_1.concat)(["throw ", path2.call(print11, "argument"), ";"]);
|
|
58736
58736
|
case "SwitchStatement":
|
|
58737
58737
|
return (0, lines_1.concat)([
|
|
58738
58738
|
"switch (",
|
|
58739
|
-
path2.call(
|
|
58739
|
+
path2.call(print11, "discriminant"),
|
|
58740
58740
|
") {\n",
|
|
58741
|
-
(0, lines_1.fromString)("\n").join(path2.map(
|
|
58741
|
+
(0, lines_1.fromString)("\n").join(path2.map(print11, "cases")),
|
|
58742
58742
|
"\n}"
|
|
58743
58743
|
]);
|
|
58744
58744
|
case "SwitchCase":
|
|
58745
58745
|
if (n.test)
|
|
58746
|
-
parts.push("case ", path2.call(
|
|
58746
|
+
parts.push("case ", path2.call(print11, "test"), ":");
|
|
58747
58747
|
else
|
|
58748
58748
|
parts.push("default:");
|
|
58749
58749
|
if (n.consequent.length > 0) {
|
|
58750
58750
|
parts.push("\n", path2.call(function(consequentPath) {
|
|
58751
|
-
return printStatementSequence(consequentPath, options,
|
|
58751
|
+
return printStatementSequence(consequentPath, options, print11);
|
|
58752
58752
|
}, "consequent").indent(options.tabWidth));
|
|
58753
58753
|
}
|
|
58754
58754
|
return (0, lines_1.concat)(parts);
|
|
58755
58755
|
case "DebuggerStatement":
|
|
58756
58756
|
return (0, lines_1.fromString)("debugger;");
|
|
58757
58757
|
case "JSXAttribute":
|
|
58758
|
-
parts.push(path2.call(
|
|
58758
|
+
parts.push(path2.call(print11, "name"));
|
|
58759
58759
|
if (n.value)
|
|
58760
|
-
parts.push("=", path2.call(
|
|
58760
|
+
parts.push("=", path2.call(print11, "value"));
|
|
58761
58761
|
return (0, lines_1.concat)(parts);
|
|
58762
58762
|
case "JSXIdentifier":
|
|
58763
58763
|
return (0, lines_1.fromString)(n.name, options);
|
|
58764
58764
|
case "JSXNamespacedName":
|
|
58765
58765
|
return (0, lines_1.fromString)(":").join([
|
|
58766
|
-
path2.call(
|
|
58767
|
-
path2.call(
|
|
58766
|
+
path2.call(print11, "namespace"),
|
|
58767
|
+
path2.call(print11, "name")
|
|
58768
58768
|
]);
|
|
58769
58769
|
case "JSXMemberExpression":
|
|
58770
58770
|
return (0, lines_1.fromString)(".").join([
|
|
58771
|
-
path2.call(
|
|
58772
|
-
path2.call(
|
|
58771
|
+
path2.call(print11, "object"),
|
|
58772
|
+
path2.call(print11, "property")
|
|
58773
58773
|
]);
|
|
58774
58774
|
case "JSXSpreadAttribute":
|
|
58775
|
-
return (0, lines_1.concat)(["{...", path2.call(
|
|
58775
|
+
return (0, lines_1.concat)(["{...", path2.call(print11, "argument"), "}"]);
|
|
58776
58776
|
case "JSXSpreadChild":
|
|
58777
|
-
return (0, lines_1.concat)(["{...", path2.call(
|
|
58777
|
+
return (0, lines_1.concat)(["{...", path2.call(print11, "expression"), "}"]);
|
|
58778
58778
|
case "JSXExpressionContainer":
|
|
58779
|
-
return (0, lines_1.concat)(["{", path2.call(
|
|
58779
|
+
return (0, lines_1.concat)(["{", path2.call(print11, "expression"), "}"]);
|
|
58780
58780
|
case "JSXElement":
|
|
58781
58781
|
case "JSXFragment": {
|
|
58782
58782
|
var openingPropName = "opening" + (n.type === "JSXElement" ? "Element" : "Fragment");
|
|
58783
58783
|
var closingPropName = "closing" + (n.type === "JSXElement" ? "Element" : "Fragment");
|
|
58784
|
-
var openingLines = path2.call(
|
|
58784
|
+
var openingLines = path2.call(print11, openingPropName);
|
|
58785
58785
|
if (n[openingPropName].selfClosing) {
|
|
58786
58786
|
assert_1.default.ok(!n[closingPropName], "unexpected " + closingPropName + " element in self-closing " + n.type);
|
|
58787
58787
|
return openingLines;
|
|
@@ -58795,16 +58795,16 @@ var require_printer2 = __commonJS({
|
|
|
58795
58795
|
return "\n";
|
|
58796
58796
|
}
|
|
58797
58797
|
}
|
|
58798
|
-
return
|
|
58798
|
+
return print11(childPath);
|
|
58799
58799
|
}, "children")).indentTail(options.tabWidth);
|
|
58800
|
-
var closingLines = path2.call(
|
|
58800
|
+
var closingLines = path2.call(print11, closingPropName);
|
|
58801
58801
|
return (0, lines_1.concat)([openingLines, childLines, closingLines]);
|
|
58802
58802
|
}
|
|
58803
58803
|
case "JSXOpeningElement": {
|
|
58804
|
-
parts.push("<", path2.call(
|
|
58804
|
+
parts.push("<", path2.call(print11, "name"));
|
|
58805
58805
|
var attrParts_1 = [];
|
|
58806
58806
|
path2.each(function(attrPath) {
|
|
58807
|
-
attrParts_1.push(" ",
|
|
58807
|
+
attrParts_1.push(" ", print11(attrPath));
|
|
58808
58808
|
}, "attributes");
|
|
58809
58809
|
var attrLines = (0, lines_1.concat)(attrParts_1);
|
|
58810
58810
|
var needLineWrap = attrLines.length > 1 || attrLines.getLineLength(1) > options.wrapColumn;
|
|
@@ -58821,7 +58821,7 @@ var require_printer2 = __commonJS({
|
|
|
58821
58821
|
return (0, lines_1.concat)(parts);
|
|
58822
58822
|
}
|
|
58823
58823
|
case "JSXClosingElement":
|
|
58824
|
-
return (0, lines_1.concat)(["</", path2.call(
|
|
58824
|
+
return (0, lines_1.concat)(["</", path2.call(print11, "name"), ">"]);
|
|
58825
58825
|
case "JSXOpeningFragment":
|
|
58826
58826
|
return (0, lines_1.fromString)("<>");
|
|
58827
58827
|
case "JSXClosingFragment":
|
|
@@ -58832,9 +58832,9 @@ var require_printer2 = __commonJS({
|
|
|
58832
58832
|
return (0, lines_1.fromString)("");
|
|
58833
58833
|
case "TypeAnnotatedIdentifier":
|
|
58834
58834
|
return (0, lines_1.concat)([
|
|
58835
|
-
path2.call(
|
|
58835
|
+
path2.call(print11, "annotation"),
|
|
58836
58836
|
" ",
|
|
58837
|
-
path2.call(
|
|
58837
|
+
path2.call(print11, "identifier")
|
|
58838
58838
|
]);
|
|
58839
58839
|
case "ClassBody":
|
|
58840
58840
|
if (n.body.length === 0) {
|
|
@@ -58843,12 +58843,12 @@ var require_printer2 = __commonJS({
|
|
|
58843
58843
|
return (0, lines_1.concat)([
|
|
58844
58844
|
"{\n",
|
|
58845
58845
|
path2.call(function(bodyPath) {
|
|
58846
|
-
return printStatementSequence(bodyPath, options,
|
|
58846
|
+
return printStatementSequence(bodyPath, options, print11);
|
|
58847
58847
|
}, "body").indent(options.tabWidth),
|
|
58848
58848
|
"\n}"
|
|
58849
58849
|
]);
|
|
58850
58850
|
case "ClassPropertyDefinition":
|
|
58851
|
-
parts.push("static ", path2.call(
|
|
58851
|
+
parts.push("static ", path2.call(print11, "definition"));
|
|
58852
58852
|
if (!namedTypes.MethodDefinition.check(n.definition))
|
|
58853
58853
|
parts.push(";");
|
|
58854
58854
|
return (0, lines_1.concat)(parts);
|
|
@@ -58869,12 +58869,12 @@ var require_printer2 = __commonJS({
|
|
|
58869
58869
|
if (n.readonly) {
|
|
58870
58870
|
parts.push("readonly ");
|
|
58871
58871
|
}
|
|
58872
|
-
var key = path2.call(
|
|
58872
|
+
var key = path2.call(print11, "key");
|
|
58873
58873
|
if (n.computed) {
|
|
58874
58874
|
key = (0, lines_1.concat)(["[", key, "]"]);
|
|
58875
58875
|
}
|
|
58876
58876
|
if (n.variance) {
|
|
58877
|
-
key = (0, lines_1.concat)([printVariance(path2,
|
|
58877
|
+
key = (0, lines_1.concat)([printVariance(path2, print11), key]);
|
|
58878
58878
|
}
|
|
58879
58879
|
parts.push(key);
|
|
58880
58880
|
if (n.optional) {
|
|
@@ -58884,10 +58884,10 @@ var require_printer2 = __commonJS({
|
|
|
58884
58884
|
parts.push("!");
|
|
58885
58885
|
}
|
|
58886
58886
|
if (n.typeAnnotation) {
|
|
58887
|
-
parts.push(path2.call(
|
|
58887
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
58888
58888
|
}
|
|
58889
58889
|
if (n.value) {
|
|
58890
|
-
parts.push(" = ", path2.call(
|
|
58890
|
+
parts.push(" = ", path2.call(print11, "value"));
|
|
58891
58891
|
}
|
|
58892
58892
|
parts.push(";");
|
|
58893
58893
|
return (0, lines_1.concat)(parts);
|
|
@@ -58896,21 +58896,21 @@ var require_printer2 = __commonJS({
|
|
|
58896
58896
|
if (n.static) {
|
|
58897
58897
|
parts.push("static ");
|
|
58898
58898
|
}
|
|
58899
|
-
parts.push(path2.call(
|
|
58899
|
+
parts.push(path2.call(print11, "key"));
|
|
58900
58900
|
if (n.typeAnnotation) {
|
|
58901
|
-
parts.push(path2.call(
|
|
58901
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
58902
58902
|
}
|
|
58903
58903
|
if (n.value) {
|
|
58904
|
-
parts.push(" = ", path2.call(
|
|
58904
|
+
parts.push(" = ", path2.call(print11, "value"));
|
|
58905
58905
|
}
|
|
58906
58906
|
parts.push(";");
|
|
58907
58907
|
return (0, lines_1.concat)(parts);
|
|
58908
58908
|
case "ClassAccessorProperty": {
|
|
58909
58909
|
parts.push.apply(parts, tslib_1.__spreadArray(tslib_1.__spreadArray([], printClassMemberModifiers(n), false), ["accessor "], false));
|
|
58910
58910
|
if (n.computed) {
|
|
58911
|
-
parts.push("[", path2.call(
|
|
58911
|
+
parts.push("[", path2.call(print11, "key"), "]");
|
|
58912
58912
|
} else {
|
|
58913
|
-
parts.push(path2.call(
|
|
58913
|
+
parts.push(path2.call(print11, "key"));
|
|
58914
58914
|
}
|
|
58915
58915
|
if (n.optional) {
|
|
58916
58916
|
parts.push("?");
|
|
@@ -58919,10 +58919,10 @@ var require_printer2 = __commonJS({
|
|
|
58919
58919
|
parts.push("!");
|
|
58920
58920
|
}
|
|
58921
58921
|
if (n.typeAnnotation) {
|
|
58922
|
-
parts.push(path2.call(
|
|
58922
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
58923
58923
|
}
|
|
58924
58924
|
if (n.value) {
|
|
58925
|
-
parts.push(" = ", path2.call(
|
|
58925
|
+
parts.push(" = ", path2.call(print11, "value"));
|
|
58926
58926
|
}
|
|
58927
58927
|
parts.push(";");
|
|
58928
58928
|
return (0, lines_1.concat)(parts);
|
|
@@ -58938,21 +58938,21 @@ var require_printer2 = __commonJS({
|
|
|
58938
58938
|
}
|
|
58939
58939
|
parts.push("class");
|
|
58940
58940
|
if (n.id) {
|
|
58941
|
-
parts.push(" ", path2.call(
|
|
58941
|
+
parts.push(" ", path2.call(print11, "id"));
|
|
58942
58942
|
}
|
|
58943
58943
|
if (n.typeParameters) {
|
|
58944
|
-
parts.push(path2.call(
|
|
58944
|
+
parts.push(path2.call(print11, "typeParameters"));
|
|
58945
58945
|
}
|
|
58946
58946
|
if (n.superClass) {
|
|
58947
|
-
parts.push(" extends ", path2.call(
|
|
58947
|
+
parts.push(" extends ", path2.call(print11, "superClass"), path2.call(print11, "superTypeParameters"));
|
|
58948
58948
|
}
|
|
58949
58949
|
if (n.extends && n.extends.length > 0) {
|
|
58950
|
-
parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(
|
|
58950
|
+
parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(print11, "extends")));
|
|
58951
58951
|
}
|
|
58952
58952
|
if (n["implements"] && n["implements"].length > 0) {
|
|
58953
|
-
parts.push(" implements ", (0, lines_1.fromString)(", ").join(path2.map(
|
|
58953
|
+
parts.push(" implements ", (0, lines_1.fromString)(", ").join(path2.map(print11, "implements")));
|
|
58954
58954
|
}
|
|
58955
|
-
parts.push(" ", path2.call(
|
|
58955
|
+
parts.push(" ", path2.call(print11, "body"));
|
|
58956
58956
|
if (n.type === "DeclareClass") {
|
|
58957
58957
|
return printFlowDeclaration(path2, parts);
|
|
58958
58958
|
} else {
|
|
@@ -58961,11 +58961,11 @@ var require_printer2 = __commonJS({
|
|
|
58961
58961
|
case "TemplateElement":
|
|
58962
58962
|
return (0, lines_1.fromString)(n.value.raw, options).lockIndentTail();
|
|
58963
58963
|
case "TemplateLiteral": {
|
|
58964
|
-
var expressions_1 = path2.map(
|
|
58964
|
+
var expressions_1 = path2.map(print11, "expressions");
|
|
58965
58965
|
parts.push("`");
|
|
58966
58966
|
path2.each(function(childPath) {
|
|
58967
58967
|
var i2 = childPath.getName();
|
|
58968
|
-
parts.push(
|
|
58968
|
+
parts.push(print11(childPath));
|
|
58969
58969
|
if (i2 < expressions_1.length) {
|
|
58970
58970
|
parts.push("${", expressions_1[i2], "}");
|
|
58971
58971
|
}
|
|
@@ -58974,7 +58974,7 @@ var require_printer2 = __commonJS({
|
|
|
58974
58974
|
return (0, lines_1.concat)(parts).lockIndentTail();
|
|
58975
58975
|
}
|
|
58976
58976
|
case "TaggedTemplateExpression":
|
|
58977
|
-
return (0, lines_1.concat)([path2.call(
|
|
58977
|
+
return (0, lines_1.concat)([path2.call(print11, "tag"), path2.call(print11, "quasi")]);
|
|
58978
58978
|
case "Node":
|
|
58979
58979
|
case "Printable":
|
|
58980
58980
|
case "SourceLocation":
|
|
@@ -59008,7 +59008,7 @@ var require_printer2 = __commonJS({
|
|
|
59008
59008
|
if (n.typeAnnotation.type !== "FunctionTypeAnnotation") {
|
|
59009
59009
|
parts.push(": ");
|
|
59010
59010
|
}
|
|
59011
|
-
parts.push(path2.call(
|
|
59011
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
59012
59012
|
return (0, lines_1.concat)(parts);
|
|
59013
59013
|
}
|
|
59014
59014
|
return (0, lines_1.fromString)("");
|
|
@@ -59022,9 +59022,9 @@ var require_printer2 = __commonJS({
|
|
|
59022
59022
|
case "MixedTypeAnnotation":
|
|
59023
59023
|
return (0, lines_1.fromString)("mixed", options);
|
|
59024
59024
|
case "ArrayTypeAnnotation":
|
|
59025
|
-
return (0, lines_1.concat)([path2.call(
|
|
59025
|
+
return (0, lines_1.concat)([path2.call(print11, "elementType"), "[]"]);
|
|
59026
59026
|
case "TupleTypeAnnotation": {
|
|
59027
|
-
var printed_2 = path2.map(
|
|
59027
|
+
var printed_2 = path2.map(print11, "types");
|
|
59028
59028
|
var joined = (0, lines_1.fromString)(", ").join(printed_2);
|
|
59029
59029
|
var oneLine_3 = joined.getLineLength(1) <= options.wrapColumn;
|
|
59030
59030
|
if (oneLine_3) {
|
|
@@ -59071,38 +59071,38 @@ var require_printer2 = __commonJS({
|
|
|
59071
59071
|
case "InterfaceTypeAnnotation":
|
|
59072
59072
|
parts.push("interface");
|
|
59073
59073
|
if (n.extends && n.extends.length > 0) {
|
|
59074
|
-
parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(
|
|
59074
|
+
parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(print11, "extends")));
|
|
59075
59075
|
}
|
|
59076
|
-
parts.push(" ", path2.call(
|
|
59076
|
+
parts.push(" ", path2.call(print11, "body"));
|
|
59077
59077
|
return (0, lines_1.concat)(parts);
|
|
59078
59078
|
case "DeclareFunction":
|
|
59079
59079
|
return printFlowDeclaration(path2, [
|
|
59080
59080
|
"function ",
|
|
59081
|
-
path2.call(
|
|
59081
|
+
path2.call(print11, "id"),
|
|
59082
59082
|
";"
|
|
59083
59083
|
]);
|
|
59084
59084
|
case "DeclareModule":
|
|
59085
59085
|
return printFlowDeclaration(path2, [
|
|
59086
59086
|
"module ",
|
|
59087
|
-
path2.call(
|
|
59087
|
+
path2.call(print11, "id"),
|
|
59088
59088
|
" ",
|
|
59089
|
-
path2.call(
|
|
59089
|
+
path2.call(print11, "body")
|
|
59090
59090
|
]);
|
|
59091
59091
|
case "DeclareModuleExports":
|
|
59092
59092
|
return printFlowDeclaration(path2, [
|
|
59093
59093
|
"module.exports",
|
|
59094
|
-
path2.call(
|
|
59094
|
+
path2.call(print11, "typeAnnotation")
|
|
59095
59095
|
]);
|
|
59096
59096
|
case "DeclareVariable":
|
|
59097
|
-
return printFlowDeclaration(path2, ["var ", path2.call(
|
|
59097
|
+
return printFlowDeclaration(path2, ["var ", path2.call(print11, "id"), ";"]);
|
|
59098
59098
|
case "DeclareExportDeclaration":
|
|
59099
59099
|
case "DeclareExportAllDeclaration":
|
|
59100
|
-
return (0, lines_1.concat)(["declare ", printExportDeclaration(path2, options,
|
|
59100
|
+
return (0, lines_1.concat)(["declare ", printExportDeclaration(path2, options, print11)]);
|
|
59101
59101
|
case "EnumDeclaration":
|
|
59102
59102
|
return (0, lines_1.concat)([
|
|
59103
59103
|
"enum ",
|
|
59104
|
-
path2.call(
|
|
59105
|
-
path2.call(
|
|
59104
|
+
path2.call(print11, "id"),
|
|
59105
|
+
path2.call(print11, "body")
|
|
59106
59106
|
]);
|
|
59107
59107
|
case "EnumBooleanBody":
|
|
59108
59108
|
case "EnumNumberBody":
|
|
@@ -59114,24 +59114,24 @@ var require_printer2 = __commonJS({
|
|
|
59114
59114
|
n.type.slice(4, -4).toLowerCase()
|
|
59115
59115
|
);
|
|
59116
59116
|
}
|
|
59117
|
-
parts.push(" {\n", (0, lines_1.fromString)("\n").join(path2.map(
|
|
59117
|
+
parts.push(" {\n", (0, lines_1.fromString)("\n").join(path2.map(print11, "members")).indent(options.tabWidth), "\n}");
|
|
59118
59118
|
return (0, lines_1.concat)(parts);
|
|
59119
59119
|
}
|
|
59120
59120
|
case "EnumDefaultedMember":
|
|
59121
|
-
return (0, lines_1.concat)([path2.call(
|
|
59121
|
+
return (0, lines_1.concat)([path2.call(print11, "id"), ","]);
|
|
59122
59122
|
case "EnumBooleanMember":
|
|
59123
59123
|
case "EnumNumberMember":
|
|
59124
59124
|
case "EnumStringMember":
|
|
59125
59125
|
return (0, lines_1.concat)([
|
|
59126
|
-
path2.call(
|
|
59126
|
+
path2.call(print11, "id"),
|
|
59127
59127
|
" = ",
|
|
59128
|
-
path2.call(
|
|
59128
|
+
path2.call(print11, "init"),
|
|
59129
59129
|
","
|
|
59130
59130
|
]);
|
|
59131
59131
|
case "InferredPredicate":
|
|
59132
59132
|
return (0, lines_1.fromString)("%checks", options);
|
|
59133
59133
|
case "DeclaredPredicate":
|
|
59134
|
-
return (0, lines_1.concat)(["%checks(", path2.call(
|
|
59134
|
+
return (0, lines_1.concat)(["%checks(", path2.call(print11, "value"), ")"]);
|
|
59135
59135
|
case "FunctionTypeAnnotation": {
|
|
59136
59136
|
var parent = path2.getParentNode(0);
|
|
59137
59137
|
var isArrowFunctionTypeAnnotation = !(namedTypes.ObjectTypeCallProperty.check(parent) || namedTypes.ObjectTypeInternalSlot.check(parent) && parent.method || namedTypes.DeclareFunction.check(path2.getParentNode(2)));
|
|
@@ -59141,14 +59141,14 @@ var require_printer2 = __commonJS({
|
|
|
59141
59141
|
}
|
|
59142
59142
|
var hasTypeParameters = !!n.typeParameters;
|
|
59143
59143
|
var needsParens = hasTypeParameters || n.params.length !== 1 || n.params[0].name;
|
|
59144
|
-
parts.push(hasTypeParameters ? path2.call(
|
|
59144
|
+
parts.push(hasTypeParameters ? path2.call(print11, "typeParameters") : "", needsParens ? "(" : "", printFunctionParams(path2, options, print11), needsParens ? ")" : "");
|
|
59145
59145
|
if (n.returnType) {
|
|
59146
|
-
parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path2.call(
|
|
59146
|
+
parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path2.call(print11, "returnType"));
|
|
59147
59147
|
}
|
|
59148
59148
|
return (0, lines_1.concat)(parts);
|
|
59149
59149
|
}
|
|
59150
59150
|
case "FunctionTypeParam": {
|
|
59151
|
-
var name = path2.call(
|
|
59151
|
+
var name = path2.call(print11, "name");
|
|
59152
59152
|
parts.push(name);
|
|
59153
59153
|
if (n.optional) {
|
|
59154
59154
|
parts.push("?");
|
|
@@ -59156,13 +59156,13 @@ var require_printer2 = __commonJS({
|
|
|
59156
59156
|
if (name.infos[0].line) {
|
|
59157
59157
|
parts.push(": ");
|
|
59158
59158
|
}
|
|
59159
|
-
parts.push(path2.call(
|
|
59159
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
59160
59160
|
return (0, lines_1.concat)(parts);
|
|
59161
59161
|
}
|
|
59162
59162
|
case "GenericTypeAnnotation":
|
|
59163
59163
|
return (0, lines_1.concat)([
|
|
59164
|
-
path2.call(
|
|
59165
|
-
path2.call(
|
|
59164
|
+
path2.call(print11, "id"),
|
|
59165
|
+
path2.call(print11, "typeParameters")
|
|
59166
59166
|
]);
|
|
59167
59167
|
case "DeclareInterface":
|
|
59168
59168
|
parts.push("declare ");
|
|
@@ -59171,24 +59171,24 @@ var require_printer2 = __commonJS({
|
|
|
59171
59171
|
if (n.declare) {
|
|
59172
59172
|
parts.push("declare ");
|
|
59173
59173
|
}
|
|
59174
|
-
parts.push("interface ", path2.call(
|
|
59174
|
+
parts.push("interface ", path2.call(print11, "id"), path2.call(print11, "typeParameters"), " ");
|
|
59175
59175
|
if (n["extends"] && n["extends"].length > 0) {
|
|
59176
|
-
parts.push("extends ", (0, lines_1.fromString)(", ").join(path2.map(
|
|
59176
|
+
parts.push("extends ", (0, lines_1.fromString)(", ").join(path2.map(print11, "extends")), " ");
|
|
59177
59177
|
}
|
|
59178
59178
|
if (n.body) {
|
|
59179
|
-
parts.push(path2.call(
|
|
59179
|
+
parts.push(path2.call(print11, "body"));
|
|
59180
59180
|
}
|
|
59181
59181
|
return (0, lines_1.concat)(parts);
|
|
59182
59182
|
case "ClassImplements":
|
|
59183
59183
|
case "InterfaceExtends":
|
|
59184
59184
|
return (0, lines_1.concat)([
|
|
59185
|
-
path2.call(
|
|
59186
|
-
path2.call(
|
|
59185
|
+
path2.call(print11, "id"),
|
|
59186
|
+
path2.call(print11, "typeParameters")
|
|
59187
59187
|
]);
|
|
59188
59188
|
case "IntersectionTypeAnnotation":
|
|
59189
|
-
return (0, lines_1.fromString)(" & ").join(path2.map(
|
|
59189
|
+
return (0, lines_1.fromString)(" & ").join(path2.map(print11, "types"));
|
|
59190
59190
|
case "NullableTypeAnnotation":
|
|
59191
|
-
return (0, lines_1.concat)(["?", path2.call(
|
|
59191
|
+
return (0, lines_1.concat)(["?", path2.call(print11, "typeAnnotation")]);
|
|
59192
59192
|
case "NullLiteralTypeAnnotation":
|
|
59193
59193
|
return (0, lines_1.fromString)("null", options);
|
|
59194
59194
|
case "ThisTypeAnnotation":
|
|
@@ -59196,40 +59196,40 @@ var require_printer2 = __commonJS({
|
|
|
59196
59196
|
case "NumberTypeAnnotation":
|
|
59197
59197
|
return (0, lines_1.fromString)("number", options);
|
|
59198
59198
|
case "ObjectTypeCallProperty":
|
|
59199
|
-
return path2.call(
|
|
59199
|
+
return path2.call(print11, "value");
|
|
59200
59200
|
case "ObjectTypeIndexer":
|
|
59201
59201
|
if (n.static) {
|
|
59202
59202
|
parts.push("static ");
|
|
59203
59203
|
}
|
|
59204
|
-
parts.push(printVariance(path2,
|
|
59204
|
+
parts.push(printVariance(path2, print11), "[");
|
|
59205
59205
|
if (n.id) {
|
|
59206
|
-
parts.push(path2.call(
|
|
59206
|
+
parts.push(path2.call(print11, "id"), ": ");
|
|
59207
59207
|
}
|
|
59208
|
-
parts.push(path2.call(
|
|
59208
|
+
parts.push(path2.call(print11, "key"), "]: ", path2.call(print11, "value"));
|
|
59209
59209
|
return (0, lines_1.concat)(parts);
|
|
59210
59210
|
case "ObjectTypeProperty":
|
|
59211
59211
|
return (0, lines_1.concat)([
|
|
59212
|
-
printVariance(path2,
|
|
59213
|
-
path2.call(
|
|
59212
|
+
printVariance(path2, print11),
|
|
59213
|
+
path2.call(print11, "key"),
|
|
59214
59214
|
n.optional ? "?" : "",
|
|
59215
59215
|
": ",
|
|
59216
|
-
path2.call(
|
|
59216
|
+
path2.call(print11, "value")
|
|
59217
59217
|
]);
|
|
59218
59218
|
case "ObjectTypeInternalSlot":
|
|
59219
59219
|
return (0, lines_1.concat)([
|
|
59220
59220
|
n.static ? "static " : "",
|
|
59221
59221
|
"[[",
|
|
59222
|
-
path2.call(
|
|
59222
|
+
path2.call(print11, "id"),
|
|
59223
59223
|
"]]",
|
|
59224
59224
|
n.optional ? "?" : "",
|
|
59225
59225
|
n.value.type !== "FunctionTypeAnnotation" ? ": " : "",
|
|
59226
|
-
path2.call(
|
|
59226
|
+
path2.call(print11, "value")
|
|
59227
59227
|
]);
|
|
59228
59228
|
case "QualifiedTypeIdentifier":
|
|
59229
59229
|
return (0, lines_1.concat)([
|
|
59230
|
-
path2.call(
|
|
59230
|
+
path2.call(print11, "qualification"),
|
|
59231
59231
|
".",
|
|
59232
|
-
path2.call(
|
|
59232
|
+
path2.call(print11, "id")
|
|
59233
59233
|
]);
|
|
59234
59234
|
case "StringLiteralTypeAnnotation":
|
|
59235
59235
|
return (0, lines_1.fromString)(nodeStr(n.value, options), options);
|
|
@@ -59246,36 +59246,36 @@ var require_printer2 = __commonJS({
|
|
|
59246
59246
|
case "TypeAlias":
|
|
59247
59247
|
return (0, lines_1.concat)([
|
|
59248
59248
|
"type ",
|
|
59249
|
-
path2.call(
|
|
59250
|
-
path2.call(
|
|
59249
|
+
path2.call(print11, "id"),
|
|
59250
|
+
path2.call(print11, "typeParameters"),
|
|
59251
59251
|
" = ",
|
|
59252
|
-
path2.call(
|
|
59252
|
+
path2.call(print11, "right"),
|
|
59253
59253
|
";"
|
|
59254
59254
|
]);
|
|
59255
59255
|
case "DeclareOpaqueType":
|
|
59256
59256
|
parts.push("declare ");
|
|
59257
59257
|
case "OpaqueType":
|
|
59258
|
-
parts.push("opaque type ", path2.call(
|
|
59258
|
+
parts.push("opaque type ", path2.call(print11, "id"), path2.call(print11, "typeParameters"));
|
|
59259
59259
|
if (n["supertype"]) {
|
|
59260
|
-
parts.push(": ", path2.call(
|
|
59260
|
+
parts.push(": ", path2.call(print11, "supertype"));
|
|
59261
59261
|
}
|
|
59262
59262
|
if (n["impltype"]) {
|
|
59263
|
-
parts.push(" = ", path2.call(
|
|
59263
|
+
parts.push(" = ", path2.call(print11, "impltype"));
|
|
59264
59264
|
}
|
|
59265
59265
|
parts.push(";");
|
|
59266
59266
|
return (0, lines_1.concat)(parts);
|
|
59267
59267
|
case "TypeCastExpression":
|
|
59268
59268
|
return (0, lines_1.concat)([
|
|
59269
59269
|
"(",
|
|
59270
|
-
path2.call(
|
|
59271
|
-
path2.call(
|
|
59270
|
+
path2.call(print11, "expression"),
|
|
59271
|
+
path2.call(print11, "typeAnnotation"),
|
|
59272
59272
|
")"
|
|
59273
59273
|
]);
|
|
59274
59274
|
case "TypeParameterDeclaration":
|
|
59275
59275
|
case "TypeParameterInstantiation":
|
|
59276
59276
|
return (0, lines_1.concat)([
|
|
59277
59277
|
"<",
|
|
59278
|
-
(0, lines_1.fromString)(", ").join(path2.map(
|
|
59278
|
+
(0, lines_1.fromString)(", ").join(path2.map(print11, "params")),
|
|
59279
59279
|
">"
|
|
59280
59280
|
]);
|
|
59281
59281
|
case "Variance":
|
|
@@ -59288,32 +59288,32 @@ var require_printer2 = __commonJS({
|
|
|
59288
59288
|
return (0, lines_1.fromString)("");
|
|
59289
59289
|
case "TypeParameter":
|
|
59290
59290
|
if (n.variance) {
|
|
59291
|
-
parts.push(printVariance(path2,
|
|
59291
|
+
parts.push(printVariance(path2, print11));
|
|
59292
59292
|
}
|
|
59293
|
-
parts.push(path2.call(
|
|
59293
|
+
parts.push(path2.call(print11, "name"));
|
|
59294
59294
|
if (n.bound) {
|
|
59295
|
-
parts.push(path2.call(
|
|
59295
|
+
parts.push(path2.call(print11, "bound"));
|
|
59296
59296
|
}
|
|
59297
59297
|
if (n["default"]) {
|
|
59298
|
-
parts.push("=", path2.call(
|
|
59298
|
+
parts.push("=", path2.call(print11, "default"));
|
|
59299
59299
|
}
|
|
59300
59300
|
return (0, lines_1.concat)(parts);
|
|
59301
59301
|
case "TypeofTypeAnnotation":
|
|
59302
59302
|
return (0, lines_1.concat)([
|
|
59303
59303
|
(0, lines_1.fromString)("typeof ", options),
|
|
59304
|
-
path2.call(
|
|
59304
|
+
path2.call(print11, "argument")
|
|
59305
59305
|
]);
|
|
59306
59306
|
case "IndexedAccessType":
|
|
59307
59307
|
case "OptionalIndexedAccessType":
|
|
59308
59308
|
return (0, lines_1.concat)([
|
|
59309
|
-
path2.call(
|
|
59309
|
+
path2.call(print11, "objectType"),
|
|
59310
59310
|
n.optional ? "?." : "",
|
|
59311
59311
|
"[",
|
|
59312
|
-
path2.call(
|
|
59312
|
+
path2.call(print11, "indexType"),
|
|
59313
59313
|
"]"
|
|
59314
59314
|
]);
|
|
59315
59315
|
case "UnionTypeAnnotation":
|
|
59316
|
-
return (0, lines_1.fromString)(" | ").join(path2.map(
|
|
59316
|
+
return (0, lines_1.fromString)(" | ").join(path2.map(print11, "types"));
|
|
59317
59317
|
case "VoidTypeAnnotation":
|
|
59318
59318
|
return (0, lines_1.fromString)("void", options);
|
|
59319
59319
|
case "NullTypeAnnotation":
|
|
@@ -59353,77 +59353,77 @@ var require_printer2 = __commonJS({
|
|
|
59353
59353
|
case "TSNeverKeyword":
|
|
59354
59354
|
return (0, lines_1.fromString)("never", options);
|
|
59355
59355
|
case "TSArrayType":
|
|
59356
|
-
return (0, lines_1.concat)([path2.call(
|
|
59356
|
+
return (0, lines_1.concat)([path2.call(print11, "elementType"), "[]"]);
|
|
59357
59357
|
case "TSLiteralType":
|
|
59358
|
-
return path2.call(
|
|
59358
|
+
return path2.call(print11, "literal");
|
|
59359
59359
|
case "TSUnionType":
|
|
59360
|
-
return (0, lines_1.fromString)(" | ").join(path2.map(
|
|
59360
|
+
return (0, lines_1.fromString)(" | ").join(path2.map(print11, "types"));
|
|
59361
59361
|
case "TSIntersectionType":
|
|
59362
|
-
return (0, lines_1.fromString)(" & ").join(path2.map(
|
|
59362
|
+
return (0, lines_1.fromString)(" & ").join(path2.map(print11, "types"));
|
|
59363
59363
|
case "TSConditionalType":
|
|
59364
|
-
parts.push(path2.call(
|
|
59364
|
+
parts.push(path2.call(print11, "checkType"), " extends ", path2.call(print11, "extendsType"), " ? ", path2.call(print11, "trueType"), " : ", path2.call(print11, "falseType"));
|
|
59365
59365
|
return (0, lines_1.concat)(parts);
|
|
59366
59366
|
case "TSInferType":
|
|
59367
|
-
parts.push("infer ", path2.call(
|
|
59367
|
+
parts.push("infer ", path2.call(print11, "typeParameter"));
|
|
59368
59368
|
return (0, lines_1.concat)(parts);
|
|
59369
59369
|
case "TSParenthesizedType":
|
|
59370
|
-
return (0, lines_1.concat)(["(", path2.call(
|
|
59370
|
+
return (0, lines_1.concat)(["(", path2.call(print11, "typeAnnotation"), ")"]);
|
|
59371
59371
|
case "TSFunctionType":
|
|
59372
59372
|
return (0, lines_1.concat)([
|
|
59373
|
-
path2.call(
|
|
59373
|
+
path2.call(print11, "typeParameters"),
|
|
59374
59374
|
"(",
|
|
59375
|
-
printFunctionParams(path2, options,
|
|
59375
|
+
printFunctionParams(path2, options, print11),
|
|
59376
59376
|
") => ",
|
|
59377
|
-
path2.call(
|
|
59377
|
+
path2.call(print11, "typeAnnotation", "typeAnnotation")
|
|
59378
59378
|
]);
|
|
59379
59379
|
case "TSConstructorType":
|
|
59380
59380
|
return (0, lines_1.concat)([
|
|
59381
59381
|
"new ",
|
|
59382
|
-
path2.call(
|
|
59382
|
+
path2.call(print11, "typeParameters"),
|
|
59383
59383
|
"(",
|
|
59384
|
-
printFunctionParams(path2, options,
|
|
59384
|
+
printFunctionParams(path2, options, print11),
|
|
59385
59385
|
") => ",
|
|
59386
|
-
path2.call(
|
|
59386
|
+
path2.call(print11, "typeAnnotation", "typeAnnotation")
|
|
59387
59387
|
]);
|
|
59388
59388
|
case "TSMappedType": {
|
|
59389
|
-
parts.push(n.readonly ? "readonly " : "", "[", path2.call(
|
|
59389
|
+
parts.push(n.readonly ? "readonly " : "", "[", path2.call(print11, "typeParameter"), "]", n.optional ? "?" : "");
|
|
59390
59390
|
if (n.typeAnnotation) {
|
|
59391
|
-
parts.push(": ", path2.call(
|
|
59391
|
+
parts.push(": ", path2.call(print11, "typeAnnotation"), ";");
|
|
59392
59392
|
}
|
|
59393
59393
|
return (0, lines_1.concat)(["{\n", (0, lines_1.concat)(parts).indent(options.tabWidth), "\n}"]);
|
|
59394
59394
|
}
|
|
59395
59395
|
case "TSTupleType":
|
|
59396
59396
|
return (0, lines_1.concat)([
|
|
59397
59397
|
"[",
|
|
59398
|
-
(0, lines_1.fromString)(", ").join(path2.map(
|
|
59398
|
+
(0, lines_1.fromString)(", ").join(path2.map(print11, "elementTypes")),
|
|
59399
59399
|
"]"
|
|
59400
59400
|
]);
|
|
59401
59401
|
case "TSNamedTupleMember":
|
|
59402
|
-
parts.push(path2.call(
|
|
59402
|
+
parts.push(path2.call(print11, "label"));
|
|
59403
59403
|
if (n.optional) {
|
|
59404
59404
|
parts.push("?");
|
|
59405
59405
|
}
|
|
59406
|
-
parts.push(": ", path2.call(
|
|
59406
|
+
parts.push(": ", path2.call(print11, "elementType"));
|
|
59407
59407
|
return (0, lines_1.concat)(parts);
|
|
59408
59408
|
case "TSRestType":
|
|
59409
|
-
return (0, lines_1.concat)(["...", path2.call(
|
|
59409
|
+
return (0, lines_1.concat)(["...", path2.call(print11, "typeAnnotation")]);
|
|
59410
59410
|
case "TSOptionalType":
|
|
59411
|
-
return (0, lines_1.concat)([path2.call(
|
|
59411
|
+
return (0, lines_1.concat)([path2.call(print11, "typeAnnotation"), "?"]);
|
|
59412
59412
|
case "TSIndexedAccessType":
|
|
59413
59413
|
return (0, lines_1.concat)([
|
|
59414
|
-
path2.call(
|
|
59414
|
+
path2.call(print11, "objectType"),
|
|
59415
59415
|
"[",
|
|
59416
|
-
path2.call(
|
|
59416
|
+
path2.call(print11, "indexType"),
|
|
59417
59417
|
"]"
|
|
59418
59418
|
]);
|
|
59419
59419
|
case "TSTypeOperator":
|
|
59420
59420
|
return (0, lines_1.concat)([
|
|
59421
|
-
path2.call(
|
|
59421
|
+
path2.call(print11, "operator"),
|
|
59422
59422
|
" ",
|
|
59423
|
-
path2.call(
|
|
59423
|
+
path2.call(print11, "typeAnnotation")
|
|
59424
59424
|
]);
|
|
59425
59425
|
case "TSTypeLiteral": {
|
|
59426
|
-
var members = (0, lines_1.fromString)("\n").join(path2.map(
|
|
59426
|
+
var members = (0, lines_1.fromString)("\n").join(path2.map(print11, "members").map(function(member) {
|
|
59427
59427
|
if (lastNonSpaceCharacter(member) !== ";") {
|
|
59428
59428
|
return member.concat(";");
|
|
59429
59429
|
}
|
|
@@ -59436,13 +59436,13 @@ var require_printer2 = __commonJS({
|
|
|
59436
59436
|
return (0, lines_1.concat)(parts);
|
|
59437
59437
|
}
|
|
59438
59438
|
case "TSEnumMember":
|
|
59439
|
-
parts.push(path2.call(
|
|
59439
|
+
parts.push(path2.call(print11, "id"));
|
|
59440
59440
|
if (n.initializer) {
|
|
59441
|
-
parts.push(" = ", path2.call(
|
|
59441
|
+
parts.push(" = ", path2.call(print11, "initializer"));
|
|
59442
59442
|
}
|
|
59443
59443
|
return (0, lines_1.concat)(parts);
|
|
59444
59444
|
case "TSTypeQuery":
|
|
59445
|
-
return (0, lines_1.concat)(["typeof ", path2.call(
|
|
59445
|
+
return (0, lines_1.concat)(["typeof ", path2.call(print11, "exprName")]);
|
|
59446
59446
|
case "TSParameterProperty":
|
|
59447
59447
|
if (n.accessibility) {
|
|
59448
59448
|
parts.push(n.accessibility, " ");
|
|
@@ -59456,119 +59456,119 @@ var require_printer2 = __commonJS({
|
|
|
59456
59456
|
if (n.readonly) {
|
|
59457
59457
|
parts.push("readonly ");
|
|
59458
59458
|
}
|
|
59459
|
-
parts.push(path2.call(
|
|
59459
|
+
parts.push(path2.call(print11, "parameter"));
|
|
59460
59460
|
return (0, lines_1.concat)(parts);
|
|
59461
59461
|
case "TSTypeReference":
|
|
59462
59462
|
return (0, lines_1.concat)([
|
|
59463
|
-
path2.call(
|
|
59464
|
-
path2.call(
|
|
59463
|
+
path2.call(print11, "typeName"),
|
|
59464
|
+
path2.call(print11, "typeParameters")
|
|
59465
59465
|
]);
|
|
59466
59466
|
case "TSQualifiedName":
|
|
59467
|
-
return (0, lines_1.concat)([path2.call(
|
|
59467
|
+
return (0, lines_1.concat)([path2.call(print11, "left"), ".", path2.call(print11, "right")]);
|
|
59468
59468
|
case "TSAsExpression":
|
|
59469
59469
|
case "TSSatisfiesExpression": {
|
|
59470
|
-
var expression = path2.call(
|
|
59471
|
-
parts.push(expression, n.type === "TSSatisfiesExpression" ? " satisfies " : " as ", path2.call(
|
|
59470
|
+
var expression = path2.call(print11, "expression");
|
|
59471
|
+
parts.push(expression, n.type === "TSSatisfiesExpression" ? " satisfies " : " as ", path2.call(print11, "typeAnnotation"));
|
|
59472
59472
|
return (0, lines_1.concat)(parts);
|
|
59473
59473
|
}
|
|
59474
59474
|
case "TSTypeCastExpression":
|
|
59475
59475
|
return (0, lines_1.concat)([
|
|
59476
|
-
path2.call(
|
|
59477
|
-
path2.call(
|
|
59476
|
+
path2.call(print11, "expression"),
|
|
59477
|
+
path2.call(print11, "typeAnnotation")
|
|
59478
59478
|
]);
|
|
59479
59479
|
case "TSNonNullExpression":
|
|
59480
|
-
return (0, lines_1.concat)([path2.call(
|
|
59480
|
+
return (0, lines_1.concat)([path2.call(print11, "expression"), "!"]);
|
|
59481
59481
|
case "TSTypeAnnotation":
|
|
59482
|
-
return (0, lines_1.concat)([": ", path2.call(
|
|
59482
|
+
return (0, lines_1.concat)([": ", path2.call(print11, "typeAnnotation")]);
|
|
59483
59483
|
case "TSIndexSignature":
|
|
59484
59484
|
return (0, lines_1.concat)([
|
|
59485
59485
|
n.readonly ? "readonly " : "",
|
|
59486
59486
|
"[",
|
|
59487
|
-
path2.map(
|
|
59487
|
+
path2.map(print11, "parameters"),
|
|
59488
59488
|
"]",
|
|
59489
|
-
path2.call(
|
|
59489
|
+
path2.call(print11, "typeAnnotation")
|
|
59490
59490
|
]);
|
|
59491
59491
|
case "TSPropertySignature":
|
|
59492
|
-
parts.push(printVariance(path2,
|
|
59492
|
+
parts.push(printVariance(path2, print11), n.readonly ? "readonly " : "");
|
|
59493
59493
|
if (n.computed) {
|
|
59494
|
-
parts.push("[", path2.call(
|
|
59494
|
+
parts.push("[", path2.call(print11, "key"), "]");
|
|
59495
59495
|
} else {
|
|
59496
|
-
parts.push(path2.call(
|
|
59496
|
+
parts.push(path2.call(print11, "key"));
|
|
59497
59497
|
}
|
|
59498
|
-
parts.push(n.optional ? "?" : "", path2.call(
|
|
59498
|
+
parts.push(n.optional ? "?" : "", path2.call(print11, "typeAnnotation"));
|
|
59499
59499
|
return (0, lines_1.concat)(parts);
|
|
59500
59500
|
case "TSMethodSignature":
|
|
59501
59501
|
if (n.computed) {
|
|
59502
|
-
parts.push("[", path2.call(
|
|
59502
|
+
parts.push("[", path2.call(print11, "key"), "]");
|
|
59503
59503
|
} else {
|
|
59504
|
-
parts.push(path2.call(
|
|
59504
|
+
parts.push(path2.call(print11, "key"));
|
|
59505
59505
|
}
|
|
59506
59506
|
if (n.optional) {
|
|
59507
59507
|
parts.push("?");
|
|
59508
59508
|
}
|
|
59509
|
-
parts.push(path2.call(
|
|
59509
|
+
parts.push(path2.call(print11, "typeParameters"), "(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "typeAnnotation"));
|
|
59510
59510
|
return (0, lines_1.concat)(parts);
|
|
59511
59511
|
case "TSTypePredicate":
|
|
59512
59512
|
if (n.asserts) {
|
|
59513
59513
|
parts.push("asserts ");
|
|
59514
59514
|
}
|
|
59515
|
-
parts.push(path2.call(
|
|
59515
|
+
parts.push(path2.call(print11, "parameterName"));
|
|
59516
59516
|
if (n.typeAnnotation) {
|
|
59517
|
-
parts.push(" is ", path2.call(
|
|
59517
|
+
parts.push(" is ", path2.call(print11, "typeAnnotation", "typeAnnotation"));
|
|
59518
59518
|
}
|
|
59519
59519
|
return (0, lines_1.concat)(parts);
|
|
59520
59520
|
case "TSCallSignatureDeclaration":
|
|
59521
59521
|
return (0, lines_1.concat)([
|
|
59522
|
-
path2.call(
|
|
59522
|
+
path2.call(print11, "typeParameters"),
|
|
59523
59523
|
"(",
|
|
59524
|
-
printFunctionParams(path2, options,
|
|
59524
|
+
printFunctionParams(path2, options, print11),
|
|
59525
59525
|
")",
|
|
59526
|
-
path2.call(
|
|
59526
|
+
path2.call(print11, "typeAnnotation")
|
|
59527
59527
|
]);
|
|
59528
59528
|
case "TSConstructSignatureDeclaration":
|
|
59529
59529
|
if (n.typeParameters) {
|
|
59530
|
-
parts.push("new", path2.call(
|
|
59530
|
+
parts.push("new", path2.call(print11, "typeParameters"));
|
|
59531
59531
|
} else {
|
|
59532
59532
|
parts.push("new ");
|
|
59533
59533
|
}
|
|
59534
|
-
parts.push("(", printFunctionParams(path2, options,
|
|
59534
|
+
parts.push("(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "typeAnnotation"));
|
|
59535
59535
|
return (0, lines_1.concat)(parts);
|
|
59536
59536
|
case "TSTypeAliasDeclaration":
|
|
59537
59537
|
return (0, lines_1.concat)([
|
|
59538
59538
|
n.declare ? "declare " : "",
|
|
59539
59539
|
"type ",
|
|
59540
|
-
path2.call(
|
|
59541
|
-
path2.call(
|
|
59540
|
+
path2.call(print11, "id"),
|
|
59541
|
+
path2.call(print11, "typeParameters"),
|
|
59542
59542
|
" = ",
|
|
59543
|
-
path2.call(
|
|
59543
|
+
path2.call(print11, "typeAnnotation"),
|
|
59544
59544
|
";"
|
|
59545
59545
|
]);
|
|
59546
59546
|
case "TSTypeParameter": {
|
|
59547
|
-
parts.push(path2.call(
|
|
59547
|
+
parts.push(path2.call(print11, "name"));
|
|
59548
59548
|
var parent = path2.getParentNode(0);
|
|
59549
59549
|
var isInMappedType = namedTypes.TSMappedType.check(parent);
|
|
59550
59550
|
if (n.constraint) {
|
|
59551
|
-
parts.push(isInMappedType ? " in " : " extends ", path2.call(
|
|
59551
|
+
parts.push(isInMappedType ? " in " : " extends ", path2.call(print11, "constraint"));
|
|
59552
59552
|
}
|
|
59553
59553
|
if (n["default"]) {
|
|
59554
|
-
parts.push(" = ", path2.call(
|
|
59554
|
+
parts.push(" = ", path2.call(print11, "default"));
|
|
59555
59555
|
}
|
|
59556
59556
|
return (0, lines_1.concat)(parts);
|
|
59557
59557
|
}
|
|
59558
59558
|
case "TSTypeAssertion": {
|
|
59559
|
-
parts.push("<", path2.call(
|
|
59559
|
+
parts.push("<", path2.call(print11, "typeAnnotation"), "> ", path2.call(print11, "expression"));
|
|
59560
59560
|
return (0, lines_1.concat)(parts);
|
|
59561
59561
|
}
|
|
59562
59562
|
case "TSTypeParameterDeclaration":
|
|
59563
59563
|
case "TSTypeParameterInstantiation":
|
|
59564
59564
|
return (0, lines_1.concat)([
|
|
59565
59565
|
"<",
|
|
59566
|
-
(0, lines_1.fromString)(", ").join(path2.map(
|
|
59566
|
+
(0, lines_1.fromString)(", ").join(path2.map(print11, "params")),
|
|
59567
59567
|
">"
|
|
59568
59568
|
]);
|
|
59569
59569
|
case "TSEnumDeclaration": {
|
|
59570
|
-
parts.push(n.declare ? "declare " : "", n.const ? "const " : "", "enum ", path2.call(
|
|
59571
|
-
var memberLines = (0, lines_1.fromString)(",\n").join(path2.map(
|
|
59570
|
+
parts.push(n.declare ? "declare " : "", n.const ? "const " : "", "enum ", path2.call(print11, "id"));
|
|
59571
|
+
var memberLines = (0, lines_1.fromString)(",\n").join(path2.map(print11, "members"));
|
|
59572
59572
|
if (memberLines.isEmpty()) {
|
|
59573
59573
|
parts.push(" {}");
|
|
59574
59574
|
} else {
|
|
@@ -59578,11 +59578,11 @@ var require_printer2 = __commonJS({
|
|
|
59578
59578
|
}
|
|
59579
59579
|
case "TSExpressionWithTypeArguments":
|
|
59580
59580
|
return (0, lines_1.concat)([
|
|
59581
|
-
path2.call(
|
|
59582
|
-
path2.call(
|
|
59581
|
+
path2.call(print11, "expression"),
|
|
59582
|
+
path2.call(print11, "typeParameters")
|
|
59583
59583
|
]);
|
|
59584
59584
|
case "TSInterfaceBody": {
|
|
59585
|
-
var lines = (0, lines_1.fromString)("\n").join(path2.map(
|
|
59585
|
+
var lines = (0, lines_1.fromString)("\n").join(path2.map(print11, "body").map(function(element) {
|
|
59586
59586
|
if (lastNonSpaceCharacter(element) !== ";") {
|
|
59587
59587
|
return element.concat(";");
|
|
59588
59588
|
}
|
|
@@ -59594,22 +59594,22 @@ var require_printer2 = __commonJS({
|
|
|
59594
59594
|
return (0, lines_1.concat)(["{\n", lines.indent(options.tabWidth), "\n}"]);
|
|
59595
59595
|
}
|
|
59596
59596
|
case "TSImportType":
|
|
59597
|
-
parts.push("import(", path2.call(
|
|
59597
|
+
parts.push("import(", path2.call(print11, "argument"), ")");
|
|
59598
59598
|
if (n.qualifier) {
|
|
59599
|
-
parts.push(".", path2.call(
|
|
59599
|
+
parts.push(".", path2.call(print11, "qualifier"));
|
|
59600
59600
|
}
|
|
59601
59601
|
if (n.typeParameters) {
|
|
59602
|
-
parts.push(path2.call(
|
|
59602
|
+
parts.push(path2.call(print11, "typeParameters"));
|
|
59603
59603
|
}
|
|
59604
59604
|
return (0, lines_1.concat)(parts);
|
|
59605
59605
|
case "TSImportEqualsDeclaration":
|
|
59606
59606
|
if (n.isExport) {
|
|
59607
59607
|
parts.push("export ");
|
|
59608
59608
|
}
|
|
59609
|
-
parts.push("import ", path2.call(
|
|
59609
|
+
parts.push("import ", path2.call(print11, "id"), " = ", path2.call(print11, "moduleReference"));
|
|
59610
59610
|
return maybeAddSemicolon((0, lines_1.concat)(parts));
|
|
59611
59611
|
case "TSExternalModuleReference":
|
|
59612
|
-
return (0, lines_1.concat)(["require(", path2.call(
|
|
59612
|
+
return (0, lines_1.concat)(["require(", path2.call(print11, "expression"), ")"]);
|
|
59613
59613
|
case "TSModuleDeclaration": {
|
|
59614
59614
|
var parent = path2.getParentNode();
|
|
59615
59615
|
if (parent.type === "TSModuleDeclaration") {
|
|
@@ -59634,16 +59634,16 @@ var require_printer2 = __commonJS({
|
|
|
59634
59634
|
}
|
|
59635
59635
|
}
|
|
59636
59636
|
}
|
|
59637
|
-
parts.push(path2.call(
|
|
59637
|
+
parts.push(path2.call(print11, "id"));
|
|
59638
59638
|
if (n.body) {
|
|
59639
59639
|
parts.push(" ");
|
|
59640
|
-
parts.push(path2.call(
|
|
59640
|
+
parts.push(path2.call(print11, "body"));
|
|
59641
59641
|
}
|
|
59642
59642
|
return (0, lines_1.concat)(parts);
|
|
59643
59643
|
}
|
|
59644
59644
|
case "TSModuleBlock": {
|
|
59645
59645
|
var naked = path2.call(function(bodyPath) {
|
|
59646
|
-
return printStatementSequence(bodyPath, options,
|
|
59646
|
+
return printStatementSequence(bodyPath, options, print11);
|
|
59647
59647
|
}, "body");
|
|
59648
59648
|
if (naked.isEmpty()) {
|
|
59649
59649
|
parts.push("{}");
|
|
@@ -59653,11 +59653,11 @@ var require_printer2 = __commonJS({
|
|
|
59653
59653
|
return (0, lines_1.concat)(parts);
|
|
59654
59654
|
}
|
|
59655
59655
|
case "TSInstantiationExpression": {
|
|
59656
|
-
parts.push(path2.call(
|
|
59656
|
+
parts.push(path2.call(print11, "expression"), path2.call(print11, "typeParameters"));
|
|
59657
59657
|
return (0, lines_1.concat)(parts);
|
|
59658
59658
|
}
|
|
59659
59659
|
case "V8IntrinsicIdentifier":
|
|
59660
|
-
return (0, lines_1.concat)(["%", path2.call(
|
|
59660
|
+
return (0, lines_1.concat)(["%", path2.call(print11, "name")]);
|
|
59661
59661
|
case "TopicReference":
|
|
59662
59662
|
return (0, lines_1.fromString)("#");
|
|
59663
59663
|
case "ClassHeritage":
|
|
@@ -59707,7 +59707,7 @@ var require_printer2 = __commonJS({
|
|
|
59707
59707
|
}
|
|
59708
59708
|
return (0, lines_1.concat)(parts);
|
|
59709
59709
|
}
|
|
59710
|
-
function printStatementSequence(path2, options,
|
|
59710
|
+
function printStatementSequence(path2, options, print11) {
|
|
59711
59711
|
var filtered = [];
|
|
59712
59712
|
var sawComment = false;
|
|
59713
59713
|
var sawStatement = false;
|
|
@@ -59728,7 +59728,7 @@ var require_printer2 = __commonJS({
|
|
|
59728
59728
|
}
|
|
59729
59729
|
filtered.push({
|
|
59730
59730
|
node: stmt,
|
|
59731
|
-
printed:
|
|
59731
|
+
printed: print11(stmtPath)
|
|
59732
59732
|
});
|
|
59733
59733
|
});
|
|
59734
59734
|
if (sawComment) {
|
|
@@ -59820,7 +59820,7 @@ var require_printer2 = __commonJS({
|
|
|
59820
59820
|
}
|
|
59821
59821
|
return parts;
|
|
59822
59822
|
}
|
|
59823
|
-
function printMethod(path2, options,
|
|
59823
|
+
function printMethod(path2, options, print11) {
|
|
59824
59824
|
var node = path2.getNode();
|
|
59825
59825
|
var kind = node.kind;
|
|
59826
59826
|
var parts = [];
|
|
@@ -59838,7 +59838,7 @@ var require_printer2 = __commonJS({
|
|
|
59838
59838
|
if (kind === "get" || kind === "set") {
|
|
59839
59839
|
parts.push(kind, " ");
|
|
59840
59840
|
}
|
|
59841
|
-
var key = path2.call(
|
|
59841
|
+
var key = path2.call(print11, "key");
|
|
59842
59842
|
if (node.computed) {
|
|
59843
59843
|
key = (0, lines_1.concat)(["[", key, "]"]);
|
|
59844
59844
|
}
|
|
@@ -59847,26 +59847,26 @@ var require_printer2 = __commonJS({
|
|
|
59847
59847
|
parts.push("?");
|
|
59848
59848
|
}
|
|
59849
59849
|
if (node === nodeValue) {
|
|
59850
|
-
parts.push(path2.call(
|
|
59850
|
+
parts.push(path2.call(print11, "typeParameters"), "(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "returnType"));
|
|
59851
59851
|
if (node.body) {
|
|
59852
|
-
parts.push(" ", path2.call(
|
|
59852
|
+
parts.push(" ", path2.call(print11, "body"));
|
|
59853
59853
|
} else {
|
|
59854
59854
|
parts.push(";");
|
|
59855
59855
|
}
|
|
59856
59856
|
} else {
|
|
59857
|
-
parts.push(path2.call(
|
|
59858
|
-
return printFunctionParams(valuePath, options,
|
|
59859
|
-
}, "value"), ")", path2.call(
|
|
59857
|
+
parts.push(path2.call(print11, "value", "typeParameters"), "(", path2.call(function(valuePath) {
|
|
59858
|
+
return printFunctionParams(valuePath, options, print11);
|
|
59859
|
+
}, "value"), ")", path2.call(print11, "value", "returnType"));
|
|
59860
59860
|
if (nodeValue.body) {
|
|
59861
|
-
parts.push(" ", path2.call(
|
|
59861
|
+
parts.push(" ", path2.call(print11, "value", "body"));
|
|
59862
59862
|
} else {
|
|
59863
59863
|
parts.push(";");
|
|
59864
59864
|
}
|
|
59865
59865
|
}
|
|
59866
59866
|
return (0, lines_1.concat)(parts);
|
|
59867
59867
|
}
|
|
59868
|
-
function printArgumentsList(path2, options,
|
|
59869
|
-
var printed = path2.map(
|
|
59868
|
+
function printArgumentsList(path2, options, print11) {
|
|
59869
|
+
var printed = path2.map(print11, "arguments");
|
|
59870
59870
|
var trailingComma = util.isTrailingCommaEnabled(options, "parameters");
|
|
59871
59871
|
var joined = (0, lines_1.fromString)(", ").join(printed);
|
|
59872
59872
|
if (joined.getLineLength(1) > options.wrapColumn) {
|
|
@@ -59879,28 +59879,28 @@ var require_printer2 = __commonJS({
|
|
|
59879
59879
|
}
|
|
59880
59880
|
return (0, lines_1.concat)(["(", joined, ")"]);
|
|
59881
59881
|
}
|
|
59882
|
-
function printFunctionParams(path2, options,
|
|
59882
|
+
function printFunctionParams(path2, options, print11) {
|
|
59883
59883
|
var fun = path2.getValue();
|
|
59884
59884
|
var params;
|
|
59885
59885
|
var printed = [];
|
|
59886
59886
|
if (fun.params) {
|
|
59887
59887
|
params = fun.params;
|
|
59888
|
-
printed = path2.map(
|
|
59888
|
+
printed = path2.map(print11, "params");
|
|
59889
59889
|
} else if (fun.parameters) {
|
|
59890
59890
|
params = fun.parameters;
|
|
59891
|
-
printed = path2.map(
|
|
59891
|
+
printed = path2.map(print11, "parameters");
|
|
59892
59892
|
}
|
|
59893
59893
|
if (fun.defaults) {
|
|
59894
59894
|
path2.each(function(defExprPath) {
|
|
59895
59895
|
var i2 = defExprPath.getName();
|
|
59896
59896
|
var p = printed[i2];
|
|
59897
59897
|
if (p && defExprPath.getValue()) {
|
|
59898
|
-
printed[i2] = (0, lines_1.concat)([p, " = ",
|
|
59898
|
+
printed[i2] = (0, lines_1.concat)([p, " = ", print11(defExprPath)]);
|
|
59899
59899
|
}
|
|
59900
59900
|
}, "defaults");
|
|
59901
59901
|
}
|
|
59902
59902
|
if (fun.rest) {
|
|
59903
|
-
printed.push((0, lines_1.concat)(["...", path2.call(
|
|
59903
|
+
printed.push((0, lines_1.concat)(["...", path2.call(print11, "rest")]));
|
|
59904
59904
|
}
|
|
59905
59905
|
var joined = (0, lines_1.fromString)(", ").join(printed);
|
|
59906
59906
|
if (joined.length > 1 || joined.getLineLength(1) > options.wrapColumn) {
|
|
@@ -59914,11 +59914,11 @@ var require_printer2 = __commonJS({
|
|
|
59914
59914
|
}
|
|
59915
59915
|
return joined;
|
|
59916
59916
|
}
|
|
59917
|
-
function maybePrintImportAssertions(path2, options,
|
|
59917
|
+
function maybePrintImportAssertions(path2, options, print11) {
|
|
59918
59918
|
var n = path2.getValue();
|
|
59919
59919
|
if (n.assertions && n.assertions.length > 0) {
|
|
59920
59920
|
var parts = [" assert {"];
|
|
59921
|
-
var printed = path2.map(
|
|
59921
|
+
var printed = path2.map(print11, "assertions");
|
|
59922
59922
|
var flat = (0, lines_1.fromString)(", ").join(printed);
|
|
59923
59923
|
if (flat.length > 1 || flat.getLineLength(1) > options.wrapColumn) {
|
|
59924
59924
|
parts.push("\n", (0, lines_1.fromString)(",\n").join(printed).indent(options.tabWidth), "\n}");
|
|
@@ -59929,7 +59929,7 @@ var require_printer2 = __commonJS({
|
|
|
59929
59929
|
}
|
|
59930
59930
|
return (0, lines_1.fromString)("");
|
|
59931
59931
|
}
|
|
59932
|
-
function printExportDeclaration(path2, options,
|
|
59932
|
+
function printExportDeclaration(path2, options, print11) {
|
|
59933
59933
|
var decl = path2.getValue();
|
|
59934
59934
|
var parts = ["export "];
|
|
59935
59935
|
if (decl.exportKind && decl.exportKind === "type") {
|
|
@@ -59943,7 +59943,7 @@ var require_printer2 = __commonJS({
|
|
|
59943
59943
|
parts.push("default ");
|
|
59944
59944
|
}
|
|
59945
59945
|
if (decl.declaration) {
|
|
59946
|
-
parts.push(path2.call(
|
|
59946
|
+
parts.push(path2.call(print11, "declaration"));
|
|
59947
59947
|
} else if (decl.specifiers) {
|
|
59948
59948
|
if (decl.specifiers.length === 1 && decl.specifiers[0].type === "ExportBatchSpecifier") {
|
|
59949
59949
|
parts.push("*");
|
|
@@ -59955,9 +59955,9 @@ var require_printer2 = __commonJS({
|
|
|
59955
59955
|
path2.each(function(specifierPath) {
|
|
59956
59956
|
var spec = specifierPath.getValue();
|
|
59957
59957
|
if (spec.type === "ExportDefaultSpecifier") {
|
|
59958
|
-
unbracedSpecifiers_2.push(
|
|
59958
|
+
unbracedSpecifiers_2.push(print11(specifierPath));
|
|
59959
59959
|
} else {
|
|
59960
|
-
bracedSpecifiers_2.push(
|
|
59960
|
+
bracedSpecifiers_2.push(print11(specifierPath));
|
|
59961
59961
|
}
|
|
59962
59962
|
}, "specifiers");
|
|
59963
59963
|
unbracedSpecifiers_2.forEach(function(lines2, i2) {
|
|
@@ -59986,10 +59986,10 @@ var require_printer2 = __commonJS({
|
|
|
59986
59986
|
}
|
|
59987
59987
|
}
|
|
59988
59988
|
} else {
|
|
59989
|
-
parts.push(shouldPrintSpaces ? "{ " : "{", (0, lines_1.fromString)(", ").join(path2.map(
|
|
59989
|
+
parts.push(shouldPrintSpaces ? "{ " : "{", (0, lines_1.fromString)(", ").join(path2.map(print11, "specifiers")), shouldPrintSpaces ? " }" : "}");
|
|
59990
59990
|
}
|
|
59991
59991
|
if (decl.source) {
|
|
59992
|
-
parts.push(" from ", path2.call(
|
|
59992
|
+
parts.push(" from ", path2.call(print11, "source"), maybePrintImportAssertions(path2, options, print11));
|
|
59993
59993
|
}
|
|
59994
59994
|
}
|
|
59995
59995
|
var lines = (0, lines_1.concat)(parts);
|
|
@@ -60007,7 +60007,7 @@ var require_printer2 = __commonJS({
|
|
|
60007
60007
|
}
|
|
60008
60008
|
return (0, lines_1.concat)(parts);
|
|
60009
60009
|
}
|
|
60010
|
-
function printVariance(path2,
|
|
60010
|
+
function printVariance(path2, print11) {
|
|
60011
60011
|
return path2.call(function(variancePath) {
|
|
60012
60012
|
var value = variancePath.getValue();
|
|
60013
60013
|
if (value) {
|
|
@@ -60017,7 +60017,7 @@ var require_printer2 = __commonJS({
|
|
|
60017
60017
|
if (value === "minus") {
|
|
60018
60018
|
return (0, lines_1.fromString)("-");
|
|
60019
60019
|
}
|
|
60020
|
-
return
|
|
60020
|
+
return print11(variancePath);
|
|
60021
60021
|
}
|
|
60022
60022
|
return (0, lines_1.fromString)("");
|
|
60023
60023
|
}, "variance");
|
|
@@ -60104,10 +60104,10 @@ var require_main2 = __commonJS({
|
|
|
60104
60104
|
Object.defineProperty(exports, "visit", { enumerable: true, get: function() {
|
|
60105
60105
|
return ast_types_1.visit;
|
|
60106
60106
|
} });
|
|
60107
|
-
function
|
|
60107
|
+
function print11(node, options) {
|
|
60108
60108
|
return new printer_1.Printer(options).print(node);
|
|
60109
60109
|
}
|
|
60110
|
-
exports.print =
|
|
60110
|
+
exports.print = print11;
|
|
60111
60111
|
function prettyPrint3(node, options) {
|
|
60112
60112
|
return new printer_1.Printer(options).printGenerically(node);
|
|
60113
60113
|
}
|
|
@@ -60131,7 +60131,7 @@ var require_main2 = __commonJS({
|
|
|
60131
60131
|
function runString(code, transformer, options) {
|
|
60132
60132
|
var writeback = options && options.writeback || defaultWriteback;
|
|
60133
60133
|
transformer((0, parser_1.parse)(code, options), function(node) {
|
|
60134
|
-
writeback(
|
|
60134
|
+
writeback(print11(node, options).code);
|
|
60135
60135
|
});
|
|
60136
60136
|
}
|
|
60137
60137
|
}
|
|
@@ -70504,7 +70504,7 @@ async function getConfig({
|
|
|
70504
70504
|
}
|
|
70505
70505
|
}
|
|
70506
70506
|
_config.plugins = orderedPlugins(plugins);
|
|
70507
|
-
await Promise.all(_config.plugins.map((plugin2) => plugin2.
|
|
70507
|
+
await Promise.all(_config.plugins.map((plugin2) => plugin2.afterLoad?.({ config: _config })));
|
|
70508
70508
|
resolve2(_config);
|
|
70509
70509
|
return _config;
|
|
70510
70510
|
} catch (e2) {
|
|
@@ -70651,8 +70651,8 @@ function getRootType(type) {
|
|
|
70651
70651
|
function hashDocument({
|
|
70652
70652
|
document
|
|
70653
70653
|
}) {
|
|
70654
|
-
const docString = typeof document === "string" ? document :
|
|
70655
|
-
return import_crypto.default.createHash("sha256").update(docString).digest("hex");
|
|
70654
|
+
const docString = typeof document === "string" ? document : document.artifact?.raw;
|
|
70655
|
+
return import_crypto.default.createHash("sha256").update(docString ?? "").digest("hex");
|
|
70656
70656
|
}
|
|
70657
70657
|
function parentTypeFromAncestors(schema, filepath, ancestors) {
|
|
70658
70658
|
const parents = [...ancestors];
|
|
@@ -71424,7 +71424,7 @@ async function fragmentVariables(config2, documents) {
|
|
|
71424
71424
|
name: "generated::fragmentVariables",
|
|
71425
71425
|
kind: "HoudiniFragment" /* Fragment */,
|
|
71426
71426
|
document: doc,
|
|
71427
|
-
|
|
71427
|
+
originalParsed: doc,
|
|
71428
71428
|
generateStore: false,
|
|
71429
71429
|
generateArtifact: false,
|
|
71430
71430
|
filename: "generated::fragmentVariables",
|
|
@@ -72347,7 +72347,7 @@ async function paginate(config2, documents) {
|
|
|
72347
72347
|
filename: doc.filename,
|
|
72348
72348
|
name: refetchQueryName,
|
|
72349
72349
|
document: queryDoc,
|
|
72350
|
-
|
|
72350
|
+
originalParsed: queryDoc,
|
|
72351
72351
|
generateArtifact: true,
|
|
72352
72352
|
generateStore: false,
|
|
72353
72353
|
refetch: doc.refetch,
|
|
@@ -72767,7 +72767,7 @@ async function addListFragments(config2, documents) {
|
|
|
72767
72767
|
generateArtifact: false,
|
|
72768
72768
|
generateStore: false,
|
|
72769
72769
|
document: generatedDoc,
|
|
72770
|
-
|
|
72770
|
+
originalParsed: generatedDoc,
|
|
72771
72771
|
filename: "generated::lists",
|
|
72772
72772
|
originalString: "",
|
|
72773
72773
|
artifact: null
|
|
@@ -73295,11 +73295,11 @@ function artifactGenerator(stats) {
|
|
|
73295
73295
|
};
|
|
73296
73296
|
const plugin_data = config2.plugins.reduce(
|
|
73297
73297
|
(prev, plugin2) => {
|
|
73298
|
-
if (!plugin2.
|
|
73298
|
+
if (!plugin2.artifactData) {
|
|
73299
73299
|
return prev;
|
|
73300
73300
|
}
|
|
73301
73301
|
const result = { ...prev };
|
|
73302
|
-
const dataToAdd = plugin2.
|
|
73302
|
+
const dataToAdd = plugin2.artifactData({ config: config2, document: doc }) ?? {};
|
|
73303
73303
|
if (Object.keys(dataToAdd).length > 0) {
|
|
73304
73304
|
result[plugin2.name] = dataToAdd;
|
|
73305
73305
|
}
|
|
@@ -73344,10 +73344,10 @@ function artifactGenerator(stats) {
|
|
|
73344
73344
|
}
|
|
73345
73345
|
doc.artifact = artifact;
|
|
73346
73346
|
for (const plugin2 of config2.plugins) {
|
|
73347
|
-
if (!plugin2.
|
|
73347
|
+
if (!plugin2.artifactEnd) {
|
|
73348
73348
|
continue;
|
|
73349
73349
|
}
|
|
73350
|
-
plugin2.
|
|
73350
|
+
plugin2.artifactEnd({ config: config2, document: doc });
|
|
73351
73351
|
}
|
|
73352
73352
|
const file = AST5.program([
|
|
73353
73353
|
moduleExport(config2, "default", serializeValue(artifact)),
|
|
@@ -73387,18 +73387,18 @@ async function generateGraphqlReturnTypes(config2, docs) {
|
|
|
73387
73387
|
const indexPath = path_exports.join(config2.runtimeDirectory, "index.d.ts");
|
|
73388
73388
|
const fileContent = await fs_exports.readFile(indexPath) || "";
|
|
73389
73389
|
const contents = await parseJS(fileContent);
|
|
73390
|
-
const
|
|
73391
|
-
(plugin2) => plugin2.
|
|
73392
|
-
)?.
|
|
73393
|
-
if (!
|
|
73390
|
+
const graphqlTagReturn = config2.plugins.find(
|
|
73391
|
+
(plugin2) => plugin2.graphqlTagReturn
|
|
73392
|
+
)?.graphqlTagReturn;
|
|
73393
|
+
if (!graphqlTagReturn || !contents) {
|
|
73394
73394
|
return fileContent;
|
|
73395
73395
|
}
|
|
73396
73396
|
const overloaded_returns = {};
|
|
73397
73397
|
for (const doc of docs) {
|
|
73398
|
-
const return_value =
|
|
73398
|
+
const return_value = graphqlTagReturn({
|
|
73399
73399
|
config: config2,
|
|
73400
73400
|
document: doc,
|
|
73401
|
-
|
|
73401
|
+
ensureImport({ identifier, module: module2 }) {
|
|
73402
73402
|
ensureImports({
|
|
73403
73403
|
config: config2,
|
|
73404
73404
|
body: contents.script.body,
|
|
@@ -73446,18 +73446,18 @@ async function injectPlugins({
|
|
|
73446
73446
|
importStatement,
|
|
73447
73447
|
exportStatement
|
|
73448
73448
|
}) {
|
|
73449
|
-
const
|
|
73450
|
-
let plugins = plugin2.
|
|
73449
|
+
const clientPlugins = config2.plugins.filter((plugin2) => plugin2.clientPlugins).reduce((acc, plugin2) => {
|
|
73450
|
+
let plugins = plugin2.clientPlugins;
|
|
73451
73451
|
if (typeof plugins === "function") {
|
|
73452
73452
|
plugins = plugins(config2, config2.pluginConfig(plugin2.name));
|
|
73453
73453
|
}
|
|
73454
73454
|
return [...acc, ...Object.entries(plugins)];
|
|
73455
73455
|
}, []);
|
|
73456
|
-
return
|
|
73457
|
-
${
|
|
73456
|
+
return clientPlugins.length > 0 ? `
|
|
73457
|
+
${clientPlugins.map((plugin2, i2) => importStatement(plugin2[0], `plugin${i2}`))}
|
|
73458
73458
|
|
|
73459
73459
|
const plugins = [
|
|
73460
|
-
${
|
|
73460
|
+
${clientPlugins.map((plugin2, i2) => {
|
|
73461
73461
|
const suffix = `(${JSON.stringify(plugin2[1])})`;
|
|
73462
73462
|
return `plugin${i2}${suffix}`;
|
|
73463
73463
|
}).join(",\n")}
|
|
@@ -73501,18 +73501,18 @@ ${exportStatement("config")}
|
|
|
73501
73501
|
},
|
|
73502
73502
|
[path_exports.join(config2.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config2, content, importStatement, exportStatement })
|
|
73503
73503
|
}),
|
|
73504
|
-
...config2.plugins.filter((plugin2) => plugin2.
|
|
73504
|
+
...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2, plugin2)),
|
|
73505
73505
|
generatePluginIndex({ config: config2, exportStatement: exportStar })
|
|
73506
73506
|
]);
|
|
73507
73507
|
await generateGraphqlReturnTypes(config2, docs);
|
|
73508
73508
|
}
|
|
73509
73509
|
async function generatePluginRuntime(config2, plugin2) {
|
|
73510
|
-
if (houdini_mode.is_testing || !plugin2.
|
|
73510
|
+
if (houdini_mode.is_testing || !plugin2.includeRuntime) {
|
|
73511
73511
|
return;
|
|
73512
73512
|
}
|
|
73513
73513
|
const runtime_path = path_exports.join(
|
|
73514
73514
|
path_exports.dirname(plugin2.filepath),
|
|
73515
|
-
typeof plugin2.
|
|
73515
|
+
typeof plugin2.includeRuntime === "string" ? plugin2.includeRuntime : plugin2.includeRuntime[config2.module]
|
|
73516
73516
|
);
|
|
73517
73517
|
try {
|
|
73518
73518
|
await fs_exports.stat(runtime_path);
|
|
@@ -73528,7 +73528,7 @@ async function generatePluginRuntime(config2, plugin2) {
|
|
|
73528
73528
|
runtime_path,
|
|
73529
73529
|
pluginDir,
|
|
73530
73530
|
Object.fromEntries(
|
|
73531
|
-
Object.entries(plugin2.
|
|
73531
|
+
Object.entries(plugin2.transformRuntime ?? {}).map(([key, value]) => [
|
|
73532
73532
|
path_exports.join(runtime_path, key),
|
|
73533
73533
|
(content) => value({ config: config2, content })
|
|
73534
73534
|
])
|
|
@@ -73922,7 +73922,7 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
73922
73922
|
const typePaths = [];
|
|
73923
73923
|
const fragmentDefinitions = {};
|
|
73924
73924
|
for (const document of docs) {
|
|
73925
|
-
for (const defn of document.
|
|
73925
|
+
for (const defn of document.originalParsed.definitions.filter(
|
|
73926
73926
|
({ kind }) => kind === "FragmentDefinition"
|
|
73927
73927
|
)) {
|
|
73928
73928
|
fragmentDefinitions[defn.name.value] = defn;
|
|
@@ -73930,47 +73930,54 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
73930
73930
|
}
|
|
73931
73931
|
const missingScalars = /* @__PURE__ */ new Set();
|
|
73932
73932
|
await Promise.all(
|
|
73933
|
-
docs.map(
|
|
73934
|
-
|
|
73935
|
-
|
|
73936
|
-
|
|
73937
|
-
|
|
73938
|
-
|
|
73939
|
-
|
|
73940
|
-
|
|
73941
|
-
|
|
73942
|
-
|
|
73943
|
-
|
|
73944
|
-
|
|
73945
|
-
|
|
73946
|
-
|
|
73947
|
-
|
|
73948
|
-
applyFragments: definition.kind === "OperationDefinition"
|
|
73949
|
-
});
|
|
73950
|
-
if (definition?.kind === "OperationDefinition") {
|
|
73951
|
-
await generateOperationTypeDefs(
|
|
73952
|
-
config2,
|
|
73953
|
-
filename,
|
|
73954
|
-
program3.body,
|
|
73955
|
-
definition,
|
|
73956
|
-
selections,
|
|
73957
|
-
visitedTypes,
|
|
73958
|
-
missingScalars
|
|
73959
|
-
);
|
|
73960
|
-
} else {
|
|
73961
|
-
await generateFragmentTypeDefs(
|
|
73962
|
-
config2,
|
|
73963
|
-
filename,
|
|
73964
|
-
program3.body,
|
|
73965
|
-
selections,
|
|
73966
|
-
originalDocument.definitions,
|
|
73967
|
-
visitedTypes,
|
|
73968
|
-
missingScalars
|
|
73933
|
+
docs.map(
|
|
73934
|
+
async ({
|
|
73935
|
+
originalParsed: originalDocument,
|
|
73936
|
+
name,
|
|
73937
|
+
filename,
|
|
73938
|
+
generateArtifact
|
|
73939
|
+
}) => {
|
|
73940
|
+
if (!generateArtifact) {
|
|
73941
|
+
return;
|
|
73942
|
+
}
|
|
73943
|
+
const typeDefPath = config2.artifactTypePath(originalDocument);
|
|
73944
|
+
const program3 = AST11.program([]);
|
|
73945
|
+
const visitedTypes = /* @__PURE__ */ new Set();
|
|
73946
|
+
let definition = originalDocument.definitions.find(
|
|
73947
|
+
(def) => (def.kind === "OperationDefinition" || def.kind === "FragmentDefinition") && def.name?.value === name
|
|
73969
73948
|
);
|
|
73949
|
+
const selections = flattenSelections({
|
|
73950
|
+
config: config2,
|
|
73951
|
+
filepath: filename,
|
|
73952
|
+
selections: definition.selectionSet.selections,
|
|
73953
|
+
fragmentDefinitions,
|
|
73954
|
+
applyFragments: definition.kind === "OperationDefinition"
|
|
73955
|
+
});
|
|
73956
|
+
if (definition?.kind === "OperationDefinition") {
|
|
73957
|
+
await generateOperationTypeDefs(
|
|
73958
|
+
config2,
|
|
73959
|
+
filename,
|
|
73960
|
+
program3.body,
|
|
73961
|
+
definition,
|
|
73962
|
+
selections,
|
|
73963
|
+
visitedTypes,
|
|
73964
|
+
missingScalars
|
|
73965
|
+
);
|
|
73966
|
+
} else {
|
|
73967
|
+
await generateFragmentTypeDefs(
|
|
73968
|
+
config2,
|
|
73969
|
+
filename,
|
|
73970
|
+
program3.body,
|
|
73971
|
+
selections,
|
|
73972
|
+
originalDocument.definitions,
|
|
73973
|
+
visitedTypes,
|
|
73974
|
+
missingScalars
|
|
73975
|
+
);
|
|
73976
|
+
}
|
|
73977
|
+
await fs_exports.writeFile(typeDefPath, recast11.print(program3).code);
|
|
73978
|
+
typePaths.push(typeDefPath);
|
|
73970
73979
|
}
|
|
73971
|
-
|
|
73972
|
-
typePaths.push(typeDefPath);
|
|
73973
|
-
})
|
|
73980
|
+
)
|
|
73974
73981
|
);
|
|
73975
73982
|
const typeIndex = AST11.program(
|
|
73976
73983
|
typePaths.sort((a, b) => a.localeCompare(b)).map((typePath) => {
|
|
@@ -73985,28 +73992,28 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
73985
73992
|
AST11.exportAllDeclaration(AST11.literal("./graphql"), null)
|
|
73986
73993
|
])
|
|
73987
73994
|
);
|
|
73988
|
-
const
|
|
73995
|
+
const exportDefaultAs = ({ module: module2, as }) => `
|
|
73989
73996
|
export { default as ${as} } from "${module2}"
|
|
73990
73997
|
`;
|
|
73991
|
-
const
|
|
73998
|
+
const exportStarFrom2 = ({ module: module2 }) => `
|
|
73992
73999
|
export * from "${module2}"
|
|
73993
74000
|
`;
|
|
73994
74001
|
let indexContent = recast11.print(typeIndex).code;
|
|
73995
74002
|
for (const plugin2 of config2.plugins) {
|
|
73996
|
-
if (!plugin2.
|
|
74003
|
+
if (!plugin2.indexFile) {
|
|
73997
74004
|
continue;
|
|
73998
74005
|
}
|
|
73999
|
-
indexContent = plugin2.
|
|
74006
|
+
indexContent = plugin2.indexFile({
|
|
74000
74007
|
config: config2,
|
|
74001
74008
|
content: indexContent,
|
|
74002
|
-
|
|
74003
|
-
|
|
74004
|
-
|
|
74009
|
+
exportDefaultAs,
|
|
74010
|
+
exportStarFrom: exportStarFrom2,
|
|
74011
|
+
pluginRoot: config2.pluginDirectory(plugin2.name),
|
|
74005
74012
|
typedef: true,
|
|
74006
74013
|
documents: docs
|
|
74007
74014
|
});
|
|
74008
|
-
if (plugin2.
|
|
74009
|
-
indexContent +=
|
|
74015
|
+
if (plugin2.includeRuntime) {
|
|
74016
|
+
indexContent += exportStarFrom2({
|
|
74010
74017
|
module: "./" + path_exports.relative(config2.rootDir, config2.pluginRuntimeDirectory(plugin2.name))
|
|
74011
74018
|
});
|
|
74012
74019
|
}
|
|
@@ -74253,10 +74260,10 @@ var graphql19 = __toESM(require_graphql2(), 1);
|
|
|
74253
74260
|
var recast12 = __toESM(require_main2(), 1);
|
|
74254
74261
|
var AST12 = recast12.types.builders;
|
|
74255
74262
|
async function imperativeCacheTypef(config2, docs) {
|
|
74256
|
-
const returnType = (doc) => config2.plugins.find((plugin2) => plugin2.
|
|
74263
|
+
const returnType = (doc) => config2.plugins.find((plugin2) => plugin2.graphqlTagReturn)?.graphqlTagReturn?.({
|
|
74257
74264
|
config: config2,
|
|
74258
74265
|
document: doc,
|
|
74259
|
-
|
|
74266
|
+
ensureImport({ identifier, module: module2 }) {
|
|
74260
74267
|
ensureImports({
|
|
74261
74268
|
config: config2,
|
|
74262
74269
|
body,
|
|
@@ -74627,27 +74634,30 @@ async function persistOutputGenerator(config2, docs) {
|
|
|
74627
74634
|
console.log("Can only write the queryMap to a json file");
|
|
74628
74635
|
return;
|
|
74629
74636
|
}
|
|
74630
|
-
const queryMap = docs.reduce(
|
|
74631
|
-
|
|
74632
|
-
|
|
74633
|
-
|
|
74634
|
-
|
|
74635
|
-
graphql20.
|
|
74636
|
-
|
|
74637
|
-
|
|
74638
|
-
|
|
74637
|
+
const queryMap = docs.reduce(
|
|
74638
|
+
(acc, { document, generateArtifact }) => {
|
|
74639
|
+
if (!generateArtifact) {
|
|
74640
|
+
return acc;
|
|
74641
|
+
}
|
|
74642
|
+
let rawString = graphql20.print(
|
|
74643
|
+
graphql20.visit(document, {
|
|
74644
|
+
Directive(node) {
|
|
74645
|
+
if (config2.isInternalDirective(node.name.value)) {
|
|
74646
|
+
return null;
|
|
74647
|
+
}
|
|
74639
74648
|
}
|
|
74640
|
-
}
|
|
74641
|
-
|
|
74642
|
-
|
|
74643
|
-
|
|
74644
|
-
|
|
74645
|
-
|
|
74646
|
-
|
|
74647
|
-
|
|
74648
|
-
|
|
74649
|
-
|
|
74650
|
-
|
|
74649
|
+
})
|
|
74650
|
+
);
|
|
74651
|
+
const operations = document.definitions.filter(
|
|
74652
|
+
({ kind }) => kind === graphql20.Kind.OPERATION_DEFINITION
|
|
74653
|
+
);
|
|
74654
|
+
if (operations.length > 0 && operations[0].kind === "OperationDefinition") {
|
|
74655
|
+
acc[hashDocument({ config: config2, document: rawString })] = rawString;
|
|
74656
|
+
}
|
|
74657
|
+
return acc;
|
|
74658
|
+
},
|
|
74659
|
+
{}
|
|
74660
|
+
);
|
|
74651
74661
|
if (Object.keys(queryMap).length === 0)
|
|
74652
74662
|
return;
|
|
74653
74663
|
await fs_exports.writeFile(config2.persistedQueryPath, JSON.stringify(queryMap, null, 4));
|
|
@@ -74716,32 +74726,32 @@ async function writeIndexFile2(config2, docs) {
|
|
|
74716
74726
|
const definitionsDir = relative2(config2.definitionsDirectory);
|
|
74717
74727
|
const cjs = config2.module === "commonjs";
|
|
74718
74728
|
let body = cjs ? cjsIndexFilePreamble : "";
|
|
74719
|
-
const
|
|
74720
|
-
const
|
|
74729
|
+
const exportStar = ({ module: module2 }) => "\n" + (cjs ? exportStarFrom(module2) : `export * from "${module2}"`) + "\n";
|
|
74730
|
+
const exportDefaultAs = ({ module: module2, as }) => "\n" + (cjs ? exportDefaultFrom(module2, as) : `export { default as ${as} } from "${module2}"`) + "\n";
|
|
74721
74731
|
body += [
|
|
74722
|
-
|
|
74723
|
-
|
|
74724
|
-
|
|
74725
|
-
|
|
74732
|
+
exportStar({ module: "./" + path_exports.join(runtimeDir, "client") }),
|
|
74733
|
+
exportStar({ module: runtimeDir }),
|
|
74734
|
+
exportStar({ module: artifactDir }),
|
|
74735
|
+
exportStar({ module: definitionsDir })
|
|
74726
74736
|
].join("");
|
|
74727
74737
|
for (const plugin2 of config2.plugins) {
|
|
74728
|
-
if (plugin2.
|
|
74729
|
-
body = plugin2.
|
|
74738
|
+
if (plugin2.indexFile) {
|
|
74739
|
+
body = plugin2.indexFile({
|
|
74730
74740
|
config: config2,
|
|
74731
74741
|
content: body,
|
|
74732
|
-
|
|
74733
|
-
|
|
74734
|
-
|
|
74742
|
+
exportDefaultAs,
|
|
74743
|
+
exportStarFrom: exportStar,
|
|
74744
|
+
pluginRoot: config2.pluginDirectory(plugin2.name),
|
|
74735
74745
|
typedef: false,
|
|
74736
74746
|
documents: docs
|
|
74737
74747
|
});
|
|
74738
74748
|
}
|
|
74739
|
-
if (plugin2.
|
|
74740
|
-
body +=
|
|
74749
|
+
if (plugin2.includeRuntime) {
|
|
74750
|
+
body += exportStar({
|
|
74741
74751
|
module: relative2(config2.pluginRuntimeDirectory(plugin2.name))
|
|
74742
74752
|
});
|
|
74743
74753
|
}
|
|
74744
|
-
if (!plugin2.
|
|
74754
|
+
if (!plugin2.indexFile) {
|
|
74745
74755
|
continue;
|
|
74746
74756
|
}
|
|
74747
74757
|
}
|
|
@@ -75789,10 +75799,10 @@ async function runPipeline2(config2, docs) {
|
|
|
75789
75799
|
deleted: []
|
|
75790
75800
|
};
|
|
75791
75801
|
const generatePlugins = config2.plugins.filter((plugin2) => plugin2.generate);
|
|
75792
|
-
const
|
|
75802
|
+
const afterValidate = config2.plugins.filter((plugin2) => plugin2.afterValidate).map((plugin2) => plugin2.afterValidate);
|
|
75793
75803
|
const validate2 = config2.plugins.filter((plugin2) => plugin2.validate).map((plugin2) => plugin2.validate);
|
|
75794
|
-
const
|
|
75795
|
-
const
|
|
75804
|
+
const beforeValidate = config2.plugins.filter((plugin2) => plugin2.beforeValidate).map((plugin2) => plugin2.beforeValidate);
|
|
75805
|
+
const beforeGenerate = config2.plugins.filter((plugin2) => plugin2.beforeGenerate).map((plugin2) => plugin2.beforeGenerate);
|
|
75796
75806
|
const wrapHook = (hooks) => hooks.map(
|
|
75797
75807
|
(fn) => (config3, docs2) => fn({
|
|
75798
75808
|
config: config3,
|
|
@@ -75805,20 +75815,20 @@ async function runPipeline2(config2, docs) {
|
|
|
75805
75815
|
config2,
|
|
75806
75816
|
[
|
|
75807
75817
|
graphqlExtensions,
|
|
75808
|
-
...wrapHook(
|
|
75818
|
+
...wrapHook(beforeValidate),
|
|
75809
75819
|
typeCheck,
|
|
75810
75820
|
uniqueDocumentNames,
|
|
75811
75821
|
noIDAlias,
|
|
75812
75822
|
validatePlugins,
|
|
75813
75823
|
...wrapHook(validate2),
|
|
75814
|
-
...wrapHook(
|
|
75824
|
+
...wrapHook(afterValidate),
|
|
75815
75825
|
addID,
|
|
75816
75826
|
addTypename,
|
|
75817
75827
|
addListFragments,
|
|
75818
75828
|
paginate,
|
|
75819
75829
|
fragmentVariables,
|
|
75820
75830
|
includeFragmentDefinitions,
|
|
75821
|
-
...wrapHook(
|
|
75831
|
+
...wrapHook(beforeGenerate),
|
|
75822
75832
|
artifactGenerator(artifactStats),
|
|
75823
75833
|
runtimeGenerator,
|
|
75824
75834
|
writeIndexFile2,
|
|
@@ -75829,14 +75839,13 @@ async function runPipeline2(config2, docs) {
|
|
|
75829
75839
|
(plugin2) => async (config3, docs2) => await plugin2.generate({
|
|
75830
75840
|
config: config3,
|
|
75831
75841
|
documents: docs2,
|
|
75832
|
-
|
|
75842
|
+
pluginRoot: config3.pluginDirectory(plugin2.name)
|
|
75833
75843
|
})
|
|
75834
75844
|
)
|
|
75835
75845
|
],
|
|
75836
75846
|
docs
|
|
75837
75847
|
);
|
|
75838
75848
|
} catch (e2) {
|
|
75839
|
-
console.log(e2);
|
|
75840
75849
|
error = e2;
|
|
75841
75850
|
}
|
|
75842
75851
|
const unchanged = artifactStats.total.length - artifactStats.changed.length - artifactStats.new.length - artifactStats.deleted.length;
|
|
@@ -75886,9 +75895,9 @@ async function collectDocuments(config2) {
|
|
|
75886
75895
|
".ts": []
|
|
75887
75896
|
};
|
|
75888
75897
|
for (const plugin2 of config2.plugins) {
|
|
75889
|
-
if (plugin2.extensions && plugin2.
|
|
75898
|
+
if (plugin2.extensions && plugin2.extractDocuments) {
|
|
75890
75899
|
for (const extension of plugin2.extensions) {
|
|
75891
|
-
extractors[extension] = [...extractors[extension] || [], plugin2.
|
|
75900
|
+
extractors[extension] = [...extractors[extension] || [], plugin2.extractDocuments];
|
|
75892
75901
|
}
|
|
75893
75902
|
}
|
|
75894
75903
|
}
|
|
@@ -75987,7 +75996,7 @@ async function processGraphQLDocument(config2, filepath, document) {
|
|
|
75987
75996
|
kind,
|
|
75988
75997
|
document: parsedDoc,
|
|
75989
75998
|
filename: filepath,
|
|
75990
|
-
|
|
75999
|
+
originalParsed: parsedDoc,
|
|
75991
76000
|
generateArtifact: true,
|
|
75992
76001
|
generateStore: true,
|
|
75993
76002
|
originalString: document,
|
|
@@ -76471,8 +76480,8 @@ async function updatePackageJSON(targetPath) {
|
|
|
76471
76480
|
}
|
|
76472
76481
|
packageJSON.devDependencies = {
|
|
76473
76482
|
...packageJSON.devDependencies,
|
|
76474
|
-
houdini: "^1.0.0-next.
|
|
76475
|
-
"houdini-svelte": "^1.0.0-next.
|
|
76483
|
+
houdini: "^1.0.0-next.7",
|
|
76484
|
+
"houdini-svelte": "^1.0.0-next.7"
|
|
76476
76485
|
};
|
|
76477
76486
|
await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
|
|
76478
76487
|
}
|