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-esm/index.js
CHANGED
|
@@ -4825,10 +4825,10 @@ var require_printer = __commonJS({
|
|
|
4825
4825
|
Object.defineProperty(exports, "__esModule", {
|
|
4826
4826
|
value: true
|
|
4827
4827
|
});
|
|
4828
|
-
exports.print =
|
|
4828
|
+
exports.print = print11;
|
|
4829
4829
|
var _visitor = require_visitor();
|
|
4830
4830
|
var _blockString = require_blockString();
|
|
4831
|
-
function
|
|
4831
|
+
function print11(ast) {
|
|
4832
4832
|
return (0, _visitor.visit)(ast, {
|
|
4833
4833
|
leave: printDocASTReducer2
|
|
4834
4834
|
});
|
|
@@ -56930,12 +56930,12 @@ var require_comments = __commonJS({
|
|
|
56930
56930
|
comment.trailing = true;
|
|
56931
56931
|
addCommentHelper(node, comment);
|
|
56932
56932
|
}
|
|
56933
|
-
function printLeadingComment(commentPath,
|
|
56933
|
+
function printLeadingComment(commentPath, print11) {
|
|
56934
56934
|
var comment = commentPath.getValue();
|
|
56935
56935
|
n.Comment.assert(comment);
|
|
56936
56936
|
var loc = comment.loc;
|
|
56937
56937
|
var lines = loc && loc.lines;
|
|
56938
|
-
var parts = [
|
|
56938
|
+
var parts = [print11(commentPath)];
|
|
56939
56939
|
if (comment.trailing) {
|
|
56940
56940
|
parts.push("\n");
|
|
56941
56941
|
} else if (lines instanceof lines_1.Lines) {
|
|
@@ -56950,7 +56950,7 @@ var require_comments = __commonJS({
|
|
|
56950
56950
|
}
|
|
56951
56951
|
return (0, lines_1.concat)(parts);
|
|
56952
56952
|
}
|
|
56953
|
-
function printTrailingComment(commentPath,
|
|
56953
|
+
function printTrailingComment(commentPath, print11) {
|
|
56954
56954
|
var comment = commentPath.getValue(commentPath);
|
|
56955
56955
|
n.Comment.assert(comment);
|
|
56956
56956
|
var loc = comment.loc;
|
|
@@ -56965,12 +56965,12 @@ var require_comments = __commonJS({
|
|
|
56965
56965
|
parts.push(new Array(leadingSpace.length).join("\n"));
|
|
56966
56966
|
}
|
|
56967
56967
|
}
|
|
56968
|
-
parts.push(
|
|
56968
|
+
parts.push(print11(commentPath));
|
|
56969
56969
|
return (0, lines_1.concat)(parts);
|
|
56970
56970
|
}
|
|
56971
|
-
function printComments(path2,
|
|
56971
|
+
function printComments(path2, print11) {
|
|
56972
56972
|
var value = path2.getValue();
|
|
56973
|
-
var innerLines =
|
|
56973
|
+
var innerLines = print11(path2);
|
|
56974
56974
|
var comments = n.Node.check(value) && types16.getFieldValue(value, "comments");
|
|
56975
56975
|
if (!comments || comments.length === 0) {
|
|
56976
56976
|
return innerLines;
|
|
@@ -56982,9 +56982,9 @@ var require_comments = __commonJS({
|
|
|
56982
56982
|
var leading = types16.getFieldValue(comment, "leading");
|
|
56983
56983
|
var trailing = types16.getFieldValue(comment, "trailing");
|
|
56984
56984
|
if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
|
|
56985
|
-
leadingParts.push(printLeadingComment(commentPath,
|
|
56985
|
+
leadingParts.push(printLeadingComment(commentPath, print11));
|
|
56986
56986
|
} else if (trailing) {
|
|
56987
|
-
trailingParts.push(printTrailingComment(commentPath,
|
|
56987
|
+
trailingParts.push(printTrailingComment(commentPath, print11));
|
|
56988
56988
|
}
|
|
56989
56989
|
}, "comments");
|
|
56990
56990
|
leadingParts.push.apply(leadingParts, trailingParts);
|
|
@@ -57675,7 +57675,7 @@ var require_patcher = __commonJS({
|
|
|
57675
57675
|
};
|
|
57676
57676
|
exports.Patcher = Patcher;
|
|
57677
57677
|
var Pp = Patcher.prototype;
|
|
57678
|
-
Pp.tryToReprintComments = function(newNode, oldNode,
|
|
57678
|
+
Pp.tryToReprintComments = function(newNode, oldNode, print11) {
|
|
57679
57679
|
var patcher = this;
|
|
57680
57680
|
if (!newNode.comments && !oldNode.comments) {
|
|
57681
57681
|
return true;
|
|
@@ -57692,7 +57692,7 @@ var require_patcher = __commonJS({
|
|
|
57692
57692
|
assert_1.default.ok(oldComment.leading || oldComment.trailing);
|
|
57693
57693
|
patcher.replace(
|
|
57694
57694
|
oldComment.loc,
|
|
57695
|
-
|
|
57695
|
+
print11(reprint.newPath).indentTail(oldComment.loc.indent)
|
|
57696
57696
|
);
|
|
57697
57697
|
});
|
|
57698
57698
|
}
|
|
@@ -57739,17 +57739,17 @@ var require_patcher = __commonJS({
|
|
|
57739
57739
|
var reprints = [];
|
|
57740
57740
|
if (!lines || !findReprints(path2, reprints))
|
|
57741
57741
|
return;
|
|
57742
|
-
return function(
|
|
57742
|
+
return function(print11) {
|
|
57743
57743
|
var patcher = new Patcher(lines);
|
|
57744
57744
|
reprints.forEach(function(reprint) {
|
|
57745
57745
|
var newNode = reprint.newPath.getValue();
|
|
57746
57746
|
var oldNode = reprint.oldPath.getValue();
|
|
57747
57747
|
SourceLocation.assert(oldNode.loc, true);
|
|
57748
|
-
var needToPrintNewPathWithComments = !patcher.tryToReprintComments(newNode, oldNode,
|
|
57748
|
+
var needToPrintNewPathWithComments = !patcher.tryToReprintComments(newNode, oldNode, print11);
|
|
57749
57749
|
if (needToPrintNewPathWithComments) {
|
|
57750
57750
|
patcher.deleteComments(oldNode);
|
|
57751
57751
|
}
|
|
57752
|
-
var newLines =
|
|
57752
|
+
var newLines = print11(reprint.newPath, {
|
|
57753
57753
|
includeComments: needToPrintNewPathWithComments,
|
|
57754
57754
|
avoidRootParens: oldNode.type === newNode.type && reprint.oldPath.hasParens()
|
|
57755
57755
|
}).indentTail(oldNode.loc.indent);
|
|
@@ -57966,10 +57966,10 @@ var require_printer2 = __commonJS({
|
|
|
57966
57966
|
function makePrintFunctionWith(options, overrides) {
|
|
57967
57967
|
options = Object.assign({}, options, overrides);
|
|
57968
57968
|
return function(path2) {
|
|
57969
|
-
return
|
|
57969
|
+
return print11(path2, options);
|
|
57970
57970
|
};
|
|
57971
57971
|
}
|
|
57972
|
-
function
|
|
57972
|
+
function print11(path2, options) {
|
|
57973
57973
|
assert_1.default.ok(path2 instanceof fast_path_1.default);
|
|
57974
57974
|
options = options || {};
|
|
57975
57975
|
if (options.includeComments) {
|
|
@@ -57985,7 +57985,7 @@ var require_printer2 = __commonJS({
|
|
|
57985
57985
|
}
|
|
57986
57986
|
}
|
|
57987
57987
|
var reprinter = (0, patcher_1.getReprinter)(path2);
|
|
57988
|
-
var lines = reprinter ? reprinter(
|
|
57988
|
+
var lines = reprinter ? reprinter(print11) : genericPrint(path2, config2, options, makePrintFunctionWith(options, {
|
|
57989
57989
|
includeComments: true,
|
|
57990
57990
|
avoidRootParens: false
|
|
57991
57991
|
}));
|
|
@@ -57996,7 +57996,7 @@ var require_printer2 = __commonJS({
|
|
|
57996
57996
|
if (!ast) {
|
|
57997
57997
|
return emptyPrintResult;
|
|
57998
57998
|
}
|
|
57999
|
-
var lines =
|
|
57999
|
+
var lines = print11(fast_path_1.default.from(ast), {
|
|
58000
58000
|
includeComments: true,
|
|
58001
58001
|
avoidRootParens: false
|
|
58002
58002
|
});
|
|
@@ -58049,7 +58049,7 @@ var require_printer2 = __commonJS({
|
|
|
58049
58049
|
}
|
|
58050
58050
|
return (0, lines_1.concat)(parts);
|
|
58051
58051
|
}
|
|
58052
|
-
function genericPrintNoParens(path2, options,
|
|
58052
|
+
function genericPrintNoParens(path2, options, print11) {
|
|
58053
58053
|
var n = path2.getValue();
|
|
58054
58054
|
if (!n) {
|
|
58055
58055
|
return (0, lines_1.fromString)("");
|
|
@@ -58061,45 +58061,45 @@ var require_printer2 = __commonJS({
|
|
|
58061
58061
|
var parts = [];
|
|
58062
58062
|
switch (n.type) {
|
|
58063
58063
|
case "File":
|
|
58064
|
-
return path2.call(
|
|
58064
|
+
return path2.call(print11, "program");
|
|
58065
58065
|
case "Program":
|
|
58066
58066
|
if (n.directives) {
|
|
58067
58067
|
path2.each(function(childPath) {
|
|
58068
|
-
parts.push(
|
|
58068
|
+
parts.push(print11(childPath), ";\n");
|
|
58069
58069
|
}, "directives");
|
|
58070
58070
|
}
|
|
58071
58071
|
if (n.interpreter) {
|
|
58072
|
-
parts.push(path2.call(
|
|
58072
|
+
parts.push(path2.call(print11, "interpreter"));
|
|
58073
58073
|
}
|
|
58074
58074
|
parts.push(path2.call(function(bodyPath) {
|
|
58075
|
-
return printStatementSequence(bodyPath, options,
|
|
58075
|
+
return printStatementSequence(bodyPath, options, print11);
|
|
58076
58076
|
}, "body"));
|
|
58077
58077
|
return (0, lines_1.concat)(parts);
|
|
58078
58078
|
case "Noop":
|
|
58079
58079
|
case "EmptyStatement":
|
|
58080
58080
|
return (0, lines_1.fromString)("");
|
|
58081
58081
|
case "ExpressionStatement":
|
|
58082
|
-
return (0, lines_1.concat)([path2.call(
|
|
58082
|
+
return (0, lines_1.concat)([path2.call(print11, "expression"), ";"]);
|
|
58083
58083
|
case "ParenthesizedExpression":
|
|
58084
|
-
return (0, lines_1.concat)(["(", path2.call(
|
|
58084
|
+
return (0, lines_1.concat)(["(", path2.call(print11, "expression"), ")"]);
|
|
58085
58085
|
case "BinaryExpression":
|
|
58086
58086
|
case "LogicalExpression":
|
|
58087
58087
|
case "AssignmentExpression":
|
|
58088
58088
|
return (0, lines_1.fromString)(" ").join([
|
|
58089
|
-
path2.call(
|
|
58089
|
+
path2.call(print11, "left"),
|
|
58090
58090
|
n.operator,
|
|
58091
|
-
path2.call(
|
|
58091
|
+
path2.call(print11, "right")
|
|
58092
58092
|
]);
|
|
58093
58093
|
case "AssignmentPattern":
|
|
58094
58094
|
return (0, lines_1.concat)([
|
|
58095
|
-
path2.call(
|
|
58095
|
+
path2.call(print11, "left"),
|
|
58096
58096
|
" = ",
|
|
58097
|
-
path2.call(
|
|
58097
|
+
path2.call(print11, "right")
|
|
58098
58098
|
]);
|
|
58099
58099
|
case "MemberExpression":
|
|
58100
58100
|
case "OptionalMemberExpression": {
|
|
58101
|
-
parts.push(path2.call(
|
|
58102
|
-
var property = path2.call(
|
|
58101
|
+
parts.push(path2.call(print11, "object"));
|
|
58102
|
+
var property = path2.call(print11, "property");
|
|
58103
58103
|
var optional = types16.getFieldValue(n, "optional");
|
|
58104
58104
|
if (n.computed) {
|
|
58105
58105
|
parts.push(optional ? "?.[" : "[", property, "]");
|
|
@@ -58109,18 +58109,18 @@ var require_printer2 = __commonJS({
|
|
|
58109
58109
|
return (0, lines_1.concat)(parts);
|
|
58110
58110
|
}
|
|
58111
58111
|
case "ChainExpression":
|
|
58112
|
-
return path2.call(
|
|
58112
|
+
return path2.call(print11, "expression");
|
|
58113
58113
|
case "MetaProperty":
|
|
58114
58114
|
return (0, lines_1.concat)([
|
|
58115
|
-
path2.call(
|
|
58115
|
+
path2.call(print11, "meta"),
|
|
58116
58116
|
".",
|
|
58117
|
-
path2.call(
|
|
58117
|
+
path2.call(print11, "property")
|
|
58118
58118
|
]);
|
|
58119
58119
|
case "BindExpression":
|
|
58120
58120
|
if (n.object) {
|
|
58121
|
-
parts.push(path2.call(
|
|
58121
|
+
parts.push(path2.call(print11, "object"));
|
|
58122
58122
|
}
|
|
58123
|
-
parts.push("::", path2.call(
|
|
58123
|
+
parts.push("::", path2.call(print11, "callee"));
|
|
58124
58124
|
return (0, lines_1.concat)(parts);
|
|
58125
58125
|
case "Path":
|
|
58126
58126
|
return (0, lines_1.fromString)(".").join(n.body);
|
|
@@ -58128,7 +58128,7 @@ var require_printer2 = __commonJS({
|
|
|
58128
58128
|
return (0, lines_1.concat)([
|
|
58129
58129
|
(0, lines_1.fromString)(n.name, options),
|
|
58130
58130
|
n.optional ? "?" : "",
|
|
58131
|
-
path2.call(
|
|
58131
|
+
path2.call(print11, "typeAnnotation")
|
|
58132
58132
|
]);
|
|
58133
58133
|
case "SpreadElement":
|
|
58134
58134
|
case "SpreadElementPattern":
|
|
@@ -58139,8 +58139,8 @@ var require_printer2 = __commonJS({
|
|
|
58139
58139
|
case "RestElement":
|
|
58140
58140
|
return (0, lines_1.concat)([
|
|
58141
58141
|
"...",
|
|
58142
|
-
path2.call(
|
|
58143
|
-
path2.call(
|
|
58142
|
+
path2.call(print11, "argument"),
|
|
58143
|
+
path2.call(print11, "typeAnnotation")
|
|
58144
58144
|
]);
|
|
58145
58145
|
case "FunctionDeclaration":
|
|
58146
58146
|
case "FunctionExpression":
|
|
@@ -58155,15 +58155,15 @@ var require_printer2 = __commonJS({
|
|
|
58155
58155
|
if (n.generator)
|
|
58156
58156
|
parts.push("*");
|
|
58157
58157
|
if (n.id) {
|
|
58158
|
-
parts.push(" ", path2.call(
|
|
58158
|
+
parts.push(" ", path2.call(print11, "id"), path2.call(print11, "typeParameters"));
|
|
58159
58159
|
} else {
|
|
58160
58160
|
if (n.typeParameters) {
|
|
58161
|
-
parts.push(path2.call(
|
|
58161
|
+
parts.push(path2.call(print11, "typeParameters"));
|
|
58162
58162
|
}
|
|
58163
58163
|
}
|
|
58164
|
-
parts.push("(", printFunctionParams(path2, options,
|
|
58164
|
+
parts.push("(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "returnType"));
|
|
58165
58165
|
if (n.body) {
|
|
58166
|
-
parts.push(" ", path2.call(
|
|
58166
|
+
parts.push(" ", path2.call(print11, "body"));
|
|
58167
58167
|
}
|
|
58168
58168
|
return (0, lines_1.concat)(parts);
|
|
58169
58169
|
case "ArrowFunctionExpression":
|
|
@@ -58171,44 +58171,44 @@ var require_printer2 = __commonJS({
|
|
|
58171
58171
|
parts.push("async ");
|
|
58172
58172
|
}
|
|
58173
58173
|
if (n.typeParameters) {
|
|
58174
|
-
parts.push(path2.call(
|
|
58174
|
+
parts.push(path2.call(print11, "typeParameters"));
|
|
58175
58175
|
}
|
|
58176
58176
|
if (!options.arrowParensAlways && n.params.length === 1 && !n.rest && n.params[0].type === "Identifier" && !n.params[0].typeAnnotation && !n.returnType) {
|
|
58177
|
-
parts.push(path2.call(
|
|
58177
|
+
parts.push(path2.call(print11, "params", 0));
|
|
58178
58178
|
} else {
|
|
58179
|
-
parts.push("(", printFunctionParams(path2, options,
|
|
58179
|
+
parts.push("(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "returnType"));
|
|
58180
58180
|
}
|
|
58181
|
-
parts.push(" => ", path2.call(
|
|
58181
|
+
parts.push(" => ", path2.call(print11, "body"));
|
|
58182
58182
|
return (0, lines_1.concat)(parts);
|
|
58183
58183
|
case "MethodDefinition":
|
|
58184
|
-
return printMethod(path2, options,
|
|
58184
|
+
return printMethod(path2, options, print11);
|
|
58185
58185
|
case "YieldExpression":
|
|
58186
58186
|
parts.push("yield");
|
|
58187
58187
|
if (n.delegate)
|
|
58188
58188
|
parts.push("*");
|
|
58189
58189
|
if (n.argument)
|
|
58190
|
-
parts.push(" ", path2.call(
|
|
58190
|
+
parts.push(" ", path2.call(print11, "argument"));
|
|
58191
58191
|
return (0, lines_1.concat)(parts);
|
|
58192
58192
|
case "AwaitExpression":
|
|
58193
58193
|
parts.push("await");
|
|
58194
58194
|
if (n.all)
|
|
58195
58195
|
parts.push("*");
|
|
58196
58196
|
if (n.argument)
|
|
58197
|
-
parts.push(" ", path2.call(
|
|
58197
|
+
parts.push(" ", path2.call(print11, "argument"));
|
|
58198
58198
|
return (0, lines_1.concat)(parts);
|
|
58199
58199
|
case "ModuleExpression":
|
|
58200
58200
|
return (0, lines_1.concat)([
|
|
58201
58201
|
"module {\n",
|
|
58202
|
-
path2.call(
|
|
58202
|
+
path2.call(print11, "body").indent(options.tabWidth),
|
|
58203
58203
|
"\n}"
|
|
58204
58204
|
]);
|
|
58205
58205
|
case "ModuleDeclaration":
|
|
58206
|
-
parts.push("module", path2.call(
|
|
58206
|
+
parts.push("module", path2.call(print11, "id"));
|
|
58207
58207
|
if (n.source) {
|
|
58208
58208
|
assert_1.default.ok(!n.body);
|
|
58209
|
-
parts.push("from", path2.call(
|
|
58209
|
+
parts.push("from", path2.call(print11, "source"));
|
|
58210
58210
|
} else {
|
|
58211
|
-
parts.push(path2.call(
|
|
58211
|
+
parts.push(path2.call(print11, "body"));
|
|
58212
58212
|
}
|
|
58213
58213
|
return (0, lines_1.fromString)(" ").join(parts);
|
|
58214
58214
|
case "ImportSpecifier":
|
|
@@ -58216,27 +58216,27 @@ var require_printer2 = __commonJS({
|
|
|
58216
58216
|
parts.push(n.importKind + " ");
|
|
58217
58217
|
}
|
|
58218
58218
|
if (n.imported) {
|
|
58219
|
-
parts.push(path2.call(
|
|
58219
|
+
parts.push(path2.call(print11, "imported"));
|
|
58220
58220
|
if (n.local && n.local.name !== n.imported.name) {
|
|
58221
|
-
parts.push(" as ", path2.call(
|
|
58221
|
+
parts.push(" as ", path2.call(print11, "local"));
|
|
58222
58222
|
}
|
|
58223
58223
|
} else if (n.id) {
|
|
58224
|
-
parts.push(path2.call(
|
|
58224
|
+
parts.push(path2.call(print11, "id"));
|
|
58225
58225
|
if (n.name) {
|
|
58226
|
-
parts.push(" as ", path2.call(
|
|
58226
|
+
parts.push(" as ", path2.call(print11, "name"));
|
|
58227
58227
|
}
|
|
58228
58228
|
}
|
|
58229
58229
|
return (0, lines_1.concat)(parts);
|
|
58230
58230
|
case "ExportSpecifier":
|
|
58231
58231
|
if (n.local) {
|
|
58232
|
-
parts.push(path2.call(
|
|
58232
|
+
parts.push(path2.call(print11, "local"));
|
|
58233
58233
|
if (n.exported && n.exported.name !== n.local.name) {
|
|
58234
|
-
parts.push(" as ", path2.call(
|
|
58234
|
+
parts.push(" as ", path2.call(print11, "exported"));
|
|
58235
58235
|
}
|
|
58236
58236
|
} else if (n.id) {
|
|
58237
|
-
parts.push(path2.call(
|
|
58237
|
+
parts.push(path2.call(print11, "id"));
|
|
58238
58238
|
if (n.name) {
|
|
58239
|
-
parts.push(" as ", path2.call(
|
|
58239
|
+
parts.push(" as ", path2.call(print11, "name"));
|
|
58240
58240
|
}
|
|
58241
58241
|
}
|
|
58242
58242
|
return (0, lines_1.concat)(parts);
|
|
@@ -58245,40 +58245,40 @@ var require_printer2 = __commonJS({
|
|
|
58245
58245
|
case "ImportNamespaceSpecifier":
|
|
58246
58246
|
parts.push("* as ");
|
|
58247
58247
|
if (n.local) {
|
|
58248
|
-
parts.push(path2.call(
|
|
58248
|
+
parts.push(path2.call(print11, "local"));
|
|
58249
58249
|
} else if (n.id) {
|
|
58250
|
-
parts.push(path2.call(
|
|
58250
|
+
parts.push(path2.call(print11, "id"));
|
|
58251
58251
|
}
|
|
58252
58252
|
return (0, lines_1.concat)(parts);
|
|
58253
58253
|
case "ImportDefaultSpecifier":
|
|
58254
58254
|
if (n.local) {
|
|
58255
|
-
return path2.call(
|
|
58255
|
+
return path2.call(print11, "local");
|
|
58256
58256
|
}
|
|
58257
|
-
return path2.call(
|
|
58257
|
+
return path2.call(print11, "id");
|
|
58258
58258
|
case "TSExportAssignment":
|
|
58259
|
-
return (0, lines_1.concat)(["export = ", path2.call(
|
|
58259
|
+
return (0, lines_1.concat)(["export = ", path2.call(print11, "expression")]);
|
|
58260
58260
|
case "ExportDeclaration":
|
|
58261
58261
|
case "ExportDefaultDeclaration":
|
|
58262
58262
|
case "ExportNamedDeclaration":
|
|
58263
|
-
return printExportDeclaration(path2, options,
|
|
58263
|
+
return printExportDeclaration(path2, options, print11);
|
|
58264
58264
|
case "ExportAllDeclaration":
|
|
58265
58265
|
parts.push("export *");
|
|
58266
58266
|
if (n.exported) {
|
|
58267
|
-
parts.push(" as ", path2.call(
|
|
58267
|
+
parts.push(" as ", path2.call(print11, "exported"));
|
|
58268
58268
|
}
|
|
58269
|
-
parts.push(" from ", path2.call(
|
|
58269
|
+
parts.push(" from ", path2.call(print11, "source"), ";");
|
|
58270
58270
|
return (0, lines_1.concat)(parts);
|
|
58271
58271
|
case "TSNamespaceExportDeclaration":
|
|
58272
|
-
parts.push("export as namespace ", path2.call(
|
|
58272
|
+
parts.push("export as namespace ", path2.call(print11, "id"));
|
|
58273
58273
|
return maybeAddSemicolon((0, lines_1.concat)(parts));
|
|
58274
58274
|
case "ExportNamespaceSpecifier":
|
|
58275
|
-
return (0, lines_1.concat)(["* as ", path2.call(
|
|
58275
|
+
return (0, lines_1.concat)(["* as ", path2.call(print11, "exported")]);
|
|
58276
58276
|
case "ExportDefaultSpecifier":
|
|
58277
|
-
return path2.call(
|
|
58277
|
+
return path2.call(print11, "exported");
|
|
58278
58278
|
case "Import":
|
|
58279
58279
|
return (0, lines_1.fromString)("import", options);
|
|
58280
58280
|
case "ImportExpression":
|
|
58281
|
-
return (0, lines_1.concat)(["import(", path2.call(
|
|
58281
|
+
return (0, lines_1.concat)(["import(", path2.call(print11, "source"), ")"]);
|
|
58282
58282
|
case "ImportDeclaration": {
|
|
58283
58283
|
parts.push("import ");
|
|
58284
58284
|
if (n.importKind && n.importKind !== "value") {
|
|
@@ -58290,9 +58290,9 @@ var require_printer2 = __commonJS({
|
|
|
58290
58290
|
path2.each(function(specifierPath) {
|
|
58291
58291
|
var spec = specifierPath.getValue();
|
|
58292
58292
|
if (spec.type === "ImportSpecifier") {
|
|
58293
|
-
bracedSpecifiers_1.push(
|
|
58293
|
+
bracedSpecifiers_1.push(print11(specifierPath));
|
|
58294
58294
|
} else if (spec.type === "ImportDefaultSpecifier" || spec.type === "ImportNamespaceSpecifier") {
|
|
58295
|
-
unbracedSpecifiers_1.push(
|
|
58295
|
+
unbracedSpecifiers_1.push(print11(specifierPath));
|
|
58296
58296
|
}
|
|
58297
58297
|
}, "specifiers");
|
|
58298
58298
|
unbracedSpecifiers_1.forEach(function(lines2, i2) {
|
|
@@ -58322,16 +58322,16 @@ var require_printer2 = __commonJS({
|
|
|
58322
58322
|
}
|
|
58323
58323
|
parts.push(" from ");
|
|
58324
58324
|
}
|
|
58325
|
-
parts.push(path2.call(
|
|
58325
|
+
parts.push(path2.call(print11, "source"), maybePrintImportAssertions(path2, options, print11), ";");
|
|
58326
58326
|
return (0, lines_1.concat)(parts);
|
|
58327
58327
|
}
|
|
58328
58328
|
case "ImportAttribute":
|
|
58329
|
-
return (0, lines_1.concat)([path2.call(
|
|
58329
|
+
return (0, lines_1.concat)([path2.call(print11, "key"), ": ", path2.call(print11, "value")]);
|
|
58330
58330
|
case "StaticBlock":
|
|
58331
58331
|
parts.push("static ");
|
|
58332
58332
|
case "BlockStatement": {
|
|
58333
58333
|
var naked_1 = path2.call(function(bodyPath) {
|
|
58334
|
-
return printStatementSequence(bodyPath, options,
|
|
58334
|
+
return printStatementSequence(bodyPath, options, print11);
|
|
58335
58335
|
}, "body");
|
|
58336
58336
|
if (naked_1.isEmpty()) {
|
|
58337
58337
|
if (!n.directives || n.directives.length === 0) {
|
|
@@ -58342,7 +58342,7 @@ var require_printer2 = __commonJS({
|
|
|
58342
58342
|
parts.push("{\n");
|
|
58343
58343
|
if (n.directives) {
|
|
58344
58344
|
path2.each(function(childPath) {
|
|
58345
|
-
parts.push(maybeAddSemicolon(
|
|
58345
|
+
parts.push(maybeAddSemicolon(print11(childPath).indent(options.tabWidth)), n.directives.length > 1 || !naked_1.isEmpty() ? "\n" : "");
|
|
58346
58346
|
}, "directives");
|
|
58347
58347
|
}
|
|
58348
58348
|
parts.push(naked_1.indent(options.tabWidth));
|
|
@@ -58352,7 +58352,7 @@ var require_printer2 = __commonJS({
|
|
|
58352
58352
|
case "ReturnStatement": {
|
|
58353
58353
|
parts.push("return");
|
|
58354
58354
|
if (n.argument) {
|
|
58355
|
-
var argLines = path2.call(
|
|
58355
|
+
var argLines = path2.call(print11, "argument");
|
|
58356
58356
|
if (argLines.startsWithComment() || argLines.length > 1 && namedTypes.JSXElement && namedTypes.JSXElement.check(n.argument)) {
|
|
58357
58357
|
parts.push(" (\n", argLines.indent(options.tabWidth), "\n)");
|
|
58358
58358
|
} else {
|
|
@@ -58364,17 +58364,17 @@ var require_printer2 = __commonJS({
|
|
|
58364
58364
|
}
|
|
58365
58365
|
case "CallExpression":
|
|
58366
58366
|
case "OptionalCallExpression":
|
|
58367
|
-
parts.push(path2.call(
|
|
58367
|
+
parts.push(path2.call(print11, "callee"));
|
|
58368
58368
|
if (n.typeParameters) {
|
|
58369
|
-
parts.push(path2.call(
|
|
58369
|
+
parts.push(path2.call(print11, "typeParameters"));
|
|
58370
58370
|
}
|
|
58371
58371
|
if (n.typeArguments) {
|
|
58372
|
-
parts.push(path2.call(
|
|
58372
|
+
parts.push(path2.call(print11, "typeArguments"));
|
|
58373
58373
|
}
|
|
58374
58374
|
if (types16.getFieldValue(n, "optional")) {
|
|
58375
58375
|
parts.push("?.");
|
|
58376
58376
|
}
|
|
58377
|
-
parts.push(printArgumentsList(path2, options,
|
|
58377
|
+
parts.push(printArgumentsList(path2, options, print11));
|
|
58378
58378
|
return (0, lines_1.concat)(parts);
|
|
58379
58379
|
case "RecordExpression":
|
|
58380
58380
|
parts.push("#");
|
|
@@ -58404,7 +58404,7 @@ var require_printer2 = __commonJS({
|
|
|
58404
58404
|
var i_1 = 0;
|
|
58405
58405
|
fields.forEach(function(field) {
|
|
58406
58406
|
path2.each(function(childPath) {
|
|
58407
|
-
var lines2 =
|
|
58407
|
+
var lines2 = print11(childPath);
|
|
58408
58408
|
if (!oneLine_1) {
|
|
58409
58409
|
lines2 = lines2.indent(options.tabWidth);
|
|
58410
58410
|
}
|
|
@@ -58441,32 +58441,32 @@ var require_printer2 = __commonJS({
|
|
|
58441
58441
|
parts[parts.length - 1] = " " + rightBrace;
|
|
58442
58442
|
}
|
|
58443
58443
|
if (n.typeAnnotation) {
|
|
58444
|
-
parts.push(path2.call(
|
|
58444
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
58445
58445
|
}
|
|
58446
58446
|
return (0, lines_1.concat)(parts);
|
|
58447
58447
|
}
|
|
58448
58448
|
case "PropertyPattern":
|
|
58449
58449
|
return (0, lines_1.concat)([
|
|
58450
|
-
path2.call(
|
|
58450
|
+
path2.call(print11, "key"),
|
|
58451
58451
|
": ",
|
|
58452
|
-
path2.call(
|
|
58452
|
+
path2.call(print11, "pattern")
|
|
58453
58453
|
]);
|
|
58454
58454
|
case "ObjectProperty":
|
|
58455
58455
|
case "Property": {
|
|
58456
58456
|
if (n.method || n.kind === "get" || n.kind === "set") {
|
|
58457
|
-
return printMethod(path2, options,
|
|
58457
|
+
return printMethod(path2, options, print11);
|
|
58458
58458
|
}
|
|
58459
58459
|
if (n.shorthand && n.value.type === "AssignmentPattern") {
|
|
58460
|
-
return path2.call(
|
|
58460
|
+
return path2.call(print11, "value");
|
|
58461
58461
|
}
|
|
58462
|
-
var key = path2.call(
|
|
58462
|
+
var key = path2.call(print11, "key");
|
|
58463
58463
|
if (n.computed) {
|
|
58464
58464
|
parts.push("[", key, "]");
|
|
58465
58465
|
} else {
|
|
58466
58466
|
parts.push(key);
|
|
58467
58467
|
}
|
|
58468
58468
|
if (!n.shorthand || n.key.name !== n.value.name) {
|
|
58469
|
-
parts.push(": ", path2.call(
|
|
58469
|
+
parts.push(": ", path2.call(print11, "value"));
|
|
58470
58470
|
}
|
|
58471
58471
|
return (0, lines_1.concat)(parts);
|
|
58472
58472
|
}
|
|
@@ -58474,18 +58474,18 @@ var require_printer2 = __commonJS({
|
|
|
58474
58474
|
case "ObjectMethod":
|
|
58475
58475
|
case "ClassPrivateMethod":
|
|
58476
58476
|
case "TSDeclareMethod":
|
|
58477
|
-
return printMethod(path2, options,
|
|
58477
|
+
return printMethod(path2, options, print11);
|
|
58478
58478
|
case "PrivateName":
|
|
58479
|
-
return (0, lines_1.concat)(["#", path2.call(
|
|
58479
|
+
return (0, lines_1.concat)(["#", path2.call(print11, "id")]);
|
|
58480
58480
|
case "Decorator":
|
|
58481
|
-
return (0, lines_1.concat)(["@", path2.call(
|
|
58481
|
+
return (0, lines_1.concat)(["@", path2.call(print11, "expression")]);
|
|
58482
58482
|
case "TupleExpression":
|
|
58483
58483
|
parts.push("#");
|
|
58484
58484
|
case "ArrayExpression":
|
|
58485
58485
|
case "ArrayPattern": {
|
|
58486
58486
|
var elems = n.elements;
|
|
58487
58487
|
var len_2 = elems.length;
|
|
58488
|
-
var printed_1 = path2.map(
|
|
58488
|
+
var printed_1 = path2.map(print11, "elements");
|
|
58489
58489
|
var joined = (0, lines_1.fromString)(", ").join(printed_1);
|
|
58490
58490
|
var oneLine_2 = joined.getLineLength(1) <= options.wrapColumn;
|
|
58491
58491
|
if (oneLine_2) {
|
|
@@ -58523,12 +58523,12 @@ var require_printer2 = __commonJS({
|
|
|
58523
58523
|
parts.push("]");
|
|
58524
58524
|
}
|
|
58525
58525
|
if (n.typeAnnotation) {
|
|
58526
|
-
parts.push(path2.call(
|
|
58526
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
58527
58527
|
}
|
|
58528
58528
|
return (0, lines_1.concat)(parts);
|
|
58529
58529
|
}
|
|
58530
58530
|
case "SequenceExpression":
|
|
58531
|
-
return (0, lines_1.fromString)(", ").join(path2.map(
|
|
58531
|
+
return (0, lines_1.fromString)(", ").join(path2.map(print11, "expressions"));
|
|
58532
58532
|
case "ThisExpression":
|
|
58533
58533
|
return (0, lines_1.fromString)("this");
|
|
58534
58534
|
case "Super":
|
|
@@ -58549,7 +58549,7 @@ var require_printer2 = __commonJS({
|
|
|
58549
58549
|
case "Literal":
|
|
58550
58550
|
return (0, lines_1.fromString)(getPossibleRaw(n) || (typeof n.value === "string" ? nodeStr(n.value, options) : n.value), options);
|
|
58551
58551
|
case "Directive":
|
|
58552
|
-
return path2.call(
|
|
58552
|
+
return path2.call(print11, "value");
|
|
58553
58553
|
case "DirectiveLiteral":
|
|
58554
58554
|
return (0, lines_1.fromString)(getPossibleRaw(n) || nodeStr(n.value, options), options);
|
|
58555
58555
|
case "InterpreterDirective":
|
|
@@ -58563,32 +58563,32 @@ var require_printer2 = __commonJS({
|
|
|
58563
58563
|
parts.push(n.operator);
|
|
58564
58564
|
if (/[a-z]$/.test(n.operator))
|
|
58565
58565
|
parts.push(" ");
|
|
58566
|
-
parts.push(path2.call(
|
|
58566
|
+
parts.push(path2.call(print11, "argument"));
|
|
58567
58567
|
return (0, lines_1.concat)(parts);
|
|
58568
58568
|
case "UpdateExpression":
|
|
58569
|
-
parts.push(path2.call(
|
|
58569
|
+
parts.push(path2.call(print11, "argument"), n.operator);
|
|
58570
58570
|
if (n.prefix)
|
|
58571
58571
|
parts.reverse();
|
|
58572
58572
|
return (0, lines_1.concat)(parts);
|
|
58573
58573
|
case "ConditionalExpression":
|
|
58574
58574
|
return (0, lines_1.concat)([
|
|
58575
|
-
path2.call(
|
|
58575
|
+
path2.call(print11, "test"),
|
|
58576
58576
|
" ? ",
|
|
58577
|
-
path2.call(
|
|
58577
|
+
path2.call(print11, "consequent"),
|
|
58578
58578
|
" : ",
|
|
58579
|
-
path2.call(
|
|
58579
|
+
path2.call(print11, "alternate")
|
|
58580
58580
|
]);
|
|
58581
58581
|
case "NewExpression": {
|
|
58582
|
-
parts.push("new ", path2.call(
|
|
58582
|
+
parts.push("new ", path2.call(print11, "callee"));
|
|
58583
58583
|
if (n.typeParameters) {
|
|
58584
|
-
parts.push(path2.call(
|
|
58584
|
+
parts.push(path2.call(print11, "typeParameters"));
|
|
58585
58585
|
}
|
|
58586
58586
|
if (n.typeArguments) {
|
|
58587
|
-
parts.push(path2.call(
|
|
58587
|
+
parts.push(path2.call(print11, "typeArguments"));
|
|
58588
58588
|
}
|
|
58589
58589
|
var args = n.arguments;
|
|
58590
58590
|
if (args) {
|
|
58591
|
-
parts.push(printArgumentsList(path2, options,
|
|
58591
|
+
parts.push(printArgumentsList(path2, options, print11));
|
|
58592
58592
|
}
|
|
58593
58593
|
return (0, lines_1.concat)(parts);
|
|
58594
58594
|
}
|
|
@@ -58599,7 +58599,7 @@ var require_printer2 = __commonJS({
|
|
|
58599
58599
|
parts.push(n.kind, " ");
|
|
58600
58600
|
var maxLen_1 = 0;
|
|
58601
58601
|
var printed = path2.map(function(childPath) {
|
|
58602
|
-
var lines2 =
|
|
58602
|
+
var lines2 = print11(childPath);
|
|
58603
58603
|
maxLen_1 = Math.max(lines2.length, maxLen_1);
|
|
58604
58604
|
return lines2;
|
|
58605
58605
|
}, "declarations");
|
|
@@ -58618,30 +58618,30 @@ var require_printer2 = __commonJS({
|
|
|
58618
58618
|
}
|
|
58619
58619
|
case "VariableDeclarator":
|
|
58620
58620
|
return n.init ? (0, lines_1.fromString)(" = ").join([
|
|
58621
|
-
path2.call(
|
|
58622
|
-
path2.call(
|
|
58623
|
-
]) : path2.call(
|
|
58621
|
+
path2.call(print11, "id"),
|
|
58622
|
+
path2.call(print11, "init")
|
|
58623
|
+
]) : path2.call(print11, "id");
|
|
58624
58624
|
case "WithStatement":
|
|
58625
58625
|
return (0, lines_1.concat)([
|
|
58626
58626
|
"with (",
|
|
58627
|
-
path2.call(
|
|
58627
|
+
path2.call(print11, "object"),
|
|
58628
58628
|
") ",
|
|
58629
|
-
path2.call(
|
|
58629
|
+
path2.call(print11, "body")
|
|
58630
58630
|
]);
|
|
58631
58631
|
case "IfStatement": {
|
|
58632
|
-
var con = adjustClause(path2.call(
|
|
58633
|
-
parts.push("if (", path2.call(
|
|
58632
|
+
var con = adjustClause(path2.call(print11, "consequent"), options);
|
|
58633
|
+
parts.push("if (", path2.call(print11, "test"), ")", con);
|
|
58634
58634
|
if (n.alternate)
|
|
58635
|
-
parts.push(endsWithBrace(con) ? " else" : "\nelse", adjustClause(path2.call(
|
|
58635
|
+
parts.push(endsWithBrace(con) ? " else" : "\nelse", adjustClause(path2.call(print11, "alternate"), options));
|
|
58636
58636
|
return (0, lines_1.concat)(parts);
|
|
58637
58637
|
}
|
|
58638
58638
|
case "ForStatement": {
|
|
58639
|
-
var init2 = path2.call(
|
|
58639
|
+
var init2 = path2.call(print11, "init");
|
|
58640
58640
|
var sep2 = init2.length > 1 ? ";\n" : "; ";
|
|
58641
58641
|
var forParen = "for (";
|
|
58642
|
-
var indented = (0, lines_1.fromString)(sep2).join([init2, path2.call(
|
|
58642
|
+
var indented = (0, lines_1.fromString)(sep2).join([init2, path2.call(print11, "test"), path2.call(print11, "update")]).indentTail(forParen.length);
|
|
58643
58643
|
var head = (0, lines_1.concat)([forParen, indented, ")"]);
|
|
58644
|
-
var clause = adjustClause(path2.call(
|
|
58644
|
+
var clause = adjustClause(path2.call(print11, "body"), options);
|
|
58645
58645
|
parts.push(head);
|
|
58646
58646
|
if (head.length > 1) {
|
|
58647
58647
|
parts.push("\n");
|
|
@@ -58653,18 +58653,18 @@ var require_printer2 = __commonJS({
|
|
|
58653
58653
|
case "WhileStatement":
|
|
58654
58654
|
return (0, lines_1.concat)([
|
|
58655
58655
|
"while (",
|
|
58656
|
-
path2.call(
|
|
58656
|
+
path2.call(print11, "test"),
|
|
58657
58657
|
")",
|
|
58658
|
-
adjustClause(path2.call(
|
|
58658
|
+
adjustClause(path2.call(print11, "body"), options)
|
|
58659
58659
|
]);
|
|
58660
58660
|
case "ForInStatement":
|
|
58661
58661
|
return (0, lines_1.concat)([
|
|
58662
58662
|
n.each ? "for each (" : "for (",
|
|
58663
|
-
path2.call(
|
|
58663
|
+
path2.call(print11, "left"),
|
|
58664
58664
|
" in ",
|
|
58665
|
-
path2.call(
|
|
58665
|
+
path2.call(print11, "right"),
|
|
58666
58666
|
")",
|
|
58667
|
-
adjustClause(path2.call(
|
|
58667
|
+
adjustClause(path2.call(print11, "body"), options)
|
|
58668
58668
|
]);
|
|
58669
58669
|
case "ForOfStatement":
|
|
58670
58670
|
case "ForAwaitStatement":
|
|
@@ -58672,122 +58672,122 @@ var require_printer2 = __commonJS({
|
|
|
58672
58672
|
if (n.await || n.type === "ForAwaitStatement") {
|
|
58673
58673
|
parts.push("await ");
|
|
58674
58674
|
}
|
|
58675
|
-
parts.push("(", path2.call(
|
|
58675
|
+
parts.push("(", path2.call(print11, "left"), " of ", path2.call(print11, "right"), ")", adjustClause(path2.call(print11, "body"), options));
|
|
58676
58676
|
return (0, lines_1.concat)(parts);
|
|
58677
58677
|
case "DoWhileStatement": {
|
|
58678
58678
|
var doBody = (0, lines_1.concat)([
|
|
58679
58679
|
"do",
|
|
58680
|
-
adjustClause(path2.call(
|
|
58680
|
+
adjustClause(path2.call(print11, "body"), options)
|
|
58681
58681
|
]);
|
|
58682
58682
|
parts.push(doBody);
|
|
58683
58683
|
if (endsWithBrace(doBody))
|
|
58684
58684
|
parts.push(" while");
|
|
58685
58685
|
else
|
|
58686
58686
|
parts.push("\nwhile");
|
|
58687
|
-
parts.push(" (", path2.call(
|
|
58687
|
+
parts.push(" (", path2.call(print11, "test"), ");");
|
|
58688
58688
|
return (0, lines_1.concat)(parts);
|
|
58689
58689
|
}
|
|
58690
58690
|
case "DoExpression": {
|
|
58691
58691
|
var statements = path2.call(function(bodyPath) {
|
|
58692
|
-
return printStatementSequence(bodyPath, options,
|
|
58692
|
+
return printStatementSequence(bodyPath, options, print11);
|
|
58693
58693
|
}, "body");
|
|
58694
58694
|
return (0, lines_1.concat)(["do {\n", statements.indent(options.tabWidth), "\n}"]);
|
|
58695
58695
|
}
|
|
58696
58696
|
case "BreakStatement":
|
|
58697
58697
|
parts.push("break");
|
|
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 "ContinueStatement":
|
|
58703
58703
|
parts.push("continue");
|
|
58704
58704
|
if (n.label)
|
|
58705
|
-
parts.push(" ", path2.call(
|
|
58705
|
+
parts.push(" ", path2.call(print11, "label"));
|
|
58706
58706
|
parts.push(";");
|
|
58707
58707
|
return (0, lines_1.concat)(parts);
|
|
58708
58708
|
case "LabeledStatement":
|
|
58709
58709
|
return (0, lines_1.concat)([
|
|
58710
|
-
path2.call(
|
|
58710
|
+
path2.call(print11, "label"),
|
|
58711
58711
|
":\n",
|
|
58712
|
-
path2.call(
|
|
58712
|
+
path2.call(print11, "body")
|
|
58713
58713
|
]);
|
|
58714
58714
|
case "TryStatement":
|
|
58715
|
-
parts.push("try ", path2.call(
|
|
58715
|
+
parts.push("try ", path2.call(print11, "block"));
|
|
58716
58716
|
if (n.handler) {
|
|
58717
|
-
parts.push(" ", path2.call(
|
|
58717
|
+
parts.push(" ", path2.call(print11, "handler"));
|
|
58718
58718
|
} else if (n.handlers) {
|
|
58719
58719
|
path2.each(function(handlerPath) {
|
|
58720
|
-
parts.push(" ",
|
|
58720
|
+
parts.push(" ", print11(handlerPath));
|
|
58721
58721
|
}, "handlers");
|
|
58722
58722
|
}
|
|
58723
58723
|
if (n.finalizer) {
|
|
58724
|
-
parts.push(" finally ", path2.call(
|
|
58724
|
+
parts.push(" finally ", path2.call(print11, "finalizer"));
|
|
58725
58725
|
}
|
|
58726
58726
|
return (0, lines_1.concat)(parts);
|
|
58727
58727
|
case "CatchClause":
|
|
58728
58728
|
parts.push("catch ");
|
|
58729
58729
|
if (n.param) {
|
|
58730
|
-
parts.push("(", path2.call(
|
|
58730
|
+
parts.push("(", path2.call(print11, "param"));
|
|
58731
58731
|
}
|
|
58732
58732
|
if (n.guard) {
|
|
58733
|
-
parts.push(" if ", path2.call(
|
|
58733
|
+
parts.push(" if ", path2.call(print11, "guard"));
|
|
58734
58734
|
}
|
|
58735
58735
|
if (n.param) {
|
|
58736
58736
|
parts.push(") ");
|
|
58737
58737
|
}
|
|
58738
|
-
parts.push(path2.call(
|
|
58738
|
+
parts.push(path2.call(print11, "body"));
|
|
58739
58739
|
return (0, lines_1.concat)(parts);
|
|
58740
58740
|
case "ThrowStatement":
|
|
58741
|
-
return (0, lines_1.concat)(["throw ", path2.call(
|
|
58741
|
+
return (0, lines_1.concat)(["throw ", path2.call(print11, "argument"), ";"]);
|
|
58742
58742
|
case "SwitchStatement":
|
|
58743
58743
|
return (0, lines_1.concat)([
|
|
58744
58744
|
"switch (",
|
|
58745
|
-
path2.call(
|
|
58745
|
+
path2.call(print11, "discriminant"),
|
|
58746
58746
|
") {\n",
|
|
58747
|
-
(0, lines_1.fromString)("\n").join(path2.map(
|
|
58747
|
+
(0, lines_1.fromString)("\n").join(path2.map(print11, "cases")),
|
|
58748
58748
|
"\n}"
|
|
58749
58749
|
]);
|
|
58750
58750
|
case "SwitchCase":
|
|
58751
58751
|
if (n.test)
|
|
58752
|
-
parts.push("case ", path2.call(
|
|
58752
|
+
parts.push("case ", path2.call(print11, "test"), ":");
|
|
58753
58753
|
else
|
|
58754
58754
|
parts.push("default:");
|
|
58755
58755
|
if (n.consequent.length > 0) {
|
|
58756
58756
|
parts.push("\n", path2.call(function(consequentPath) {
|
|
58757
|
-
return printStatementSequence(consequentPath, options,
|
|
58757
|
+
return printStatementSequence(consequentPath, options, print11);
|
|
58758
58758
|
}, "consequent").indent(options.tabWidth));
|
|
58759
58759
|
}
|
|
58760
58760
|
return (0, lines_1.concat)(parts);
|
|
58761
58761
|
case "DebuggerStatement":
|
|
58762
58762
|
return (0, lines_1.fromString)("debugger;");
|
|
58763
58763
|
case "JSXAttribute":
|
|
58764
|
-
parts.push(path2.call(
|
|
58764
|
+
parts.push(path2.call(print11, "name"));
|
|
58765
58765
|
if (n.value)
|
|
58766
|
-
parts.push("=", path2.call(
|
|
58766
|
+
parts.push("=", path2.call(print11, "value"));
|
|
58767
58767
|
return (0, lines_1.concat)(parts);
|
|
58768
58768
|
case "JSXIdentifier":
|
|
58769
58769
|
return (0, lines_1.fromString)(n.name, options);
|
|
58770
58770
|
case "JSXNamespacedName":
|
|
58771
58771
|
return (0, lines_1.fromString)(":").join([
|
|
58772
|
-
path2.call(
|
|
58773
|
-
path2.call(
|
|
58772
|
+
path2.call(print11, "namespace"),
|
|
58773
|
+
path2.call(print11, "name")
|
|
58774
58774
|
]);
|
|
58775
58775
|
case "JSXMemberExpression":
|
|
58776
58776
|
return (0, lines_1.fromString)(".").join([
|
|
58777
|
-
path2.call(
|
|
58778
|
-
path2.call(
|
|
58777
|
+
path2.call(print11, "object"),
|
|
58778
|
+
path2.call(print11, "property")
|
|
58779
58779
|
]);
|
|
58780
58780
|
case "JSXSpreadAttribute":
|
|
58781
|
-
return (0, lines_1.concat)(["{...", path2.call(
|
|
58781
|
+
return (0, lines_1.concat)(["{...", path2.call(print11, "argument"), "}"]);
|
|
58782
58782
|
case "JSXSpreadChild":
|
|
58783
|
-
return (0, lines_1.concat)(["{...", path2.call(
|
|
58783
|
+
return (0, lines_1.concat)(["{...", path2.call(print11, "expression"), "}"]);
|
|
58784
58784
|
case "JSXExpressionContainer":
|
|
58785
|
-
return (0, lines_1.concat)(["{", path2.call(
|
|
58785
|
+
return (0, lines_1.concat)(["{", path2.call(print11, "expression"), "}"]);
|
|
58786
58786
|
case "JSXElement":
|
|
58787
58787
|
case "JSXFragment": {
|
|
58788
58788
|
var openingPropName = "opening" + (n.type === "JSXElement" ? "Element" : "Fragment");
|
|
58789
58789
|
var closingPropName = "closing" + (n.type === "JSXElement" ? "Element" : "Fragment");
|
|
58790
|
-
var openingLines = path2.call(
|
|
58790
|
+
var openingLines = path2.call(print11, openingPropName);
|
|
58791
58791
|
if (n[openingPropName].selfClosing) {
|
|
58792
58792
|
assert_1.default.ok(!n[closingPropName], "unexpected " + closingPropName + " element in self-closing " + n.type);
|
|
58793
58793
|
return openingLines;
|
|
@@ -58801,16 +58801,16 @@ var require_printer2 = __commonJS({
|
|
|
58801
58801
|
return "\n";
|
|
58802
58802
|
}
|
|
58803
58803
|
}
|
|
58804
|
-
return
|
|
58804
|
+
return print11(childPath);
|
|
58805
58805
|
}, "children")).indentTail(options.tabWidth);
|
|
58806
|
-
var closingLines = path2.call(
|
|
58806
|
+
var closingLines = path2.call(print11, closingPropName);
|
|
58807
58807
|
return (0, lines_1.concat)([openingLines, childLines, closingLines]);
|
|
58808
58808
|
}
|
|
58809
58809
|
case "JSXOpeningElement": {
|
|
58810
|
-
parts.push("<", path2.call(
|
|
58810
|
+
parts.push("<", path2.call(print11, "name"));
|
|
58811
58811
|
var attrParts_1 = [];
|
|
58812
58812
|
path2.each(function(attrPath) {
|
|
58813
|
-
attrParts_1.push(" ",
|
|
58813
|
+
attrParts_1.push(" ", print11(attrPath));
|
|
58814
58814
|
}, "attributes");
|
|
58815
58815
|
var attrLines = (0, lines_1.concat)(attrParts_1);
|
|
58816
58816
|
var needLineWrap = attrLines.length > 1 || attrLines.getLineLength(1) > options.wrapColumn;
|
|
@@ -58827,7 +58827,7 @@ var require_printer2 = __commonJS({
|
|
|
58827
58827
|
return (0, lines_1.concat)(parts);
|
|
58828
58828
|
}
|
|
58829
58829
|
case "JSXClosingElement":
|
|
58830
|
-
return (0, lines_1.concat)(["</", path2.call(
|
|
58830
|
+
return (0, lines_1.concat)(["</", path2.call(print11, "name"), ">"]);
|
|
58831
58831
|
case "JSXOpeningFragment":
|
|
58832
58832
|
return (0, lines_1.fromString)("<>");
|
|
58833
58833
|
case "JSXClosingFragment":
|
|
@@ -58838,9 +58838,9 @@ var require_printer2 = __commonJS({
|
|
|
58838
58838
|
return (0, lines_1.fromString)("");
|
|
58839
58839
|
case "TypeAnnotatedIdentifier":
|
|
58840
58840
|
return (0, lines_1.concat)([
|
|
58841
|
-
path2.call(
|
|
58841
|
+
path2.call(print11, "annotation"),
|
|
58842
58842
|
" ",
|
|
58843
|
-
path2.call(
|
|
58843
|
+
path2.call(print11, "identifier")
|
|
58844
58844
|
]);
|
|
58845
58845
|
case "ClassBody":
|
|
58846
58846
|
if (n.body.length === 0) {
|
|
@@ -58849,12 +58849,12 @@ var require_printer2 = __commonJS({
|
|
|
58849
58849
|
return (0, lines_1.concat)([
|
|
58850
58850
|
"{\n",
|
|
58851
58851
|
path2.call(function(bodyPath) {
|
|
58852
|
-
return printStatementSequence(bodyPath, options,
|
|
58852
|
+
return printStatementSequence(bodyPath, options, print11);
|
|
58853
58853
|
}, "body").indent(options.tabWidth),
|
|
58854
58854
|
"\n}"
|
|
58855
58855
|
]);
|
|
58856
58856
|
case "ClassPropertyDefinition":
|
|
58857
|
-
parts.push("static ", path2.call(
|
|
58857
|
+
parts.push("static ", path2.call(print11, "definition"));
|
|
58858
58858
|
if (!namedTypes.MethodDefinition.check(n.definition))
|
|
58859
58859
|
parts.push(";");
|
|
58860
58860
|
return (0, lines_1.concat)(parts);
|
|
@@ -58875,12 +58875,12 @@ var require_printer2 = __commonJS({
|
|
|
58875
58875
|
if (n.readonly) {
|
|
58876
58876
|
parts.push("readonly ");
|
|
58877
58877
|
}
|
|
58878
|
-
var key = path2.call(
|
|
58878
|
+
var key = path2.call(print11, "key");
|
|
58879
58879
|
if (n.computed) {
|
|
58880
58880
|
key = (0, lines_1.concat)(["[", key, "]"]);
|
|
58881
58881
|
}
|
|
58882
58882
|
if (n.variance) {
|
|
58883
|
-
key = (0, lines_1.concat)([printVariance(path2,
|
|
58883
|
+
key = (0, lines_1.concat)([printVariance(path2, print11), key]);
|
|
58884
58884
|
}
|
|
58885
58885
|
parts.push(key);
|
|
58886
58886
|
if (n.optional) {
|
|
@@ -58890,10 +58890,10 @@ var require_printer2 = __commonJS({
|
|
|
58890
58890
|
parts.push("!");
|
|
58891
58891
|
}
|
|
58892
58892
|
if (n.typeAnnotation) {
|
|
58893
|
-
parts.push(path2.call(
|
|
58893
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
58894
58894
|
}
|
|
58895
58895
|
if (n.value) {
|
|
58896
|
-
parts.push(" = ", path2.call(
|
|
58896
|
+
parts.push(" = ", path2.call(print11, "value"));
|
|
58897
58897
|
}
|
|
58898
58898
|
parts.push(";");
|
|
58899
58899
|
return (0, lines_1.concat)(parts);
|
|
@@ -58902,21 +58902,21 @@ var require_printer2 = __commonJS({
|
|
|
58902
58902
|
if (n.static) {
|
|
58903
58903
|
parts.push("static ");
|
|
58904
58904
|
}
|
|
58905
|
-
parts.push(path2.call(
|
|
58905
|
+
parts.push(path2.call(print11, "key"));
|
|
58906
58906
|
if (n.typeAnnotation) {
|
|
58907
|
-
parts.push(path2.call(
|
|
58907
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
58908
58908
|
}
|
|
58909
58909
|
if (n.value) {
|
|
58910
|
-
parts.push(" = ", path2.call(
|
|
58910
|
+
parts.push(" = ", path2.call(print11, "value"));
|
|
58911
58911
|
}
|
|
58912
58912
|
parts.push(";");
|
|
58913
58913
|
return (0, lines_1.concat)(parts);
|
|
58914
58914
|
case "ClassAccessorProperty": {
|
|
58915
58915
|
parts.push.apply(parts, tslib_1.__spreadArray(tslib_1.__spreadArray([], printClassMemberModifiers(n), false), ["accessor "], false));
|
|
58916
58916
|
if (n.computed) {
|
|
58917
|
-
parts.push("[", path2.call(
|
|
58917
|
+
parts.push("[", path2.call(print11, "key"), "]");
|
|
58918
58918
|
} else {
|
|
58919
|
-
parts.push(path2.call(
|
|
58919
|
+
parts.push(path2.call(print11, "key"));
|
|
58920
58920
|
}
|
|
58921
58921
|
if (n.optional) {
|
|
58922
58922
|
parts.push("?");
|
|
@@ -58925,10 +58925,10 @@ var require_printer2 = __commonJS({
|
|
|
58925
58925
|
parts.push("!");
|
|
58926
58926
|
}
|
|
58927
58927
|
if (n.typeAnnotation) {
|
|
58928
|
-
parts.push(path2.call(
|
|
58928
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
58929
58929
|
}
|
|
58930
58930
|
if (n.value) {
|
|
58931
|
-
parts.push(" = ", path2.call(
|
|
58931
|
+
parts.push(" = ", path2.call(print11, "value"));
|
|
58932
58932
|
}
|
|
58933
58933
|
parts.push(";");
|
|
58934
58934
|
return (0, lines_1.concat)(parts);
|
|
@@ -58944,21 +58944,21 @@ var require_printer2 = __commonJS({
|
|
|
58944
58944
|
}
|
|
58945
58945
|
parts.push("class");
|
|
58946
58946
|
if (n.id) {
|
|
58947
|
-
parts.push(" ", path2.call(
|
|
58947
|
+
parts.push(" ", path2.call(print11, "id"));
|
|
58948
58948
|
}
|
|
58949
58949
|
if (n.typeParameters) {
|
|
58950
|
-
parts.push(path2.call(
|
|
58950
|
+
parts.push(path2.call(print11, "typeParameters"));
|
|
58951
58951
|
}
|
|
58952
58952
|
if (n.superClass) {
|
|
58953
|
-
parts.push(" extends ", path2.call(
|
|
58953
|
+
parts.push(" extends ", path2.call(print11, "superClass"), path2.call(print11, "superTypeParameters"));
|
|
58954
58954
|
}
|
|
58955
58955
|
if (n.extends && n.extends.length > 0) {
|
|
58956
|
-
parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(
|
|
58956
|
+
parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(print11, "extends")));
|
|
58957
58957
|
}
|
|
58958
58958
|
if (n["implements"] && n["implements"].length > 0) {
|
|
58959
|
-
parts.push(" implements ", (0, lines_1.fromString)(", ").join(path2.map(
|
|
58959
|
+
parts.push(" implements ", (0, lines_1.fromString)(", ").join(path2.map(print11, "implements")));
|
|
58960
58960
|
}
|
|
58961
|
-
parts.push(" ", path2.call(
|
|
58961
|
+
parts.push(" ", path2.call(print11, "body"));
|
|
58962
58962
|
if (n.type === "DeclareClass") {
|
|
58963
58963
|
return printFlowDeclaration(path2, parts);
|
|
58964
58964
|
} else {
|
|
@@ -58967,11 +58967,11 @@ var require_printer2 = __commonJS({
|
|
|
58967
58967
|
case "TemplateElement":
|
|
58968
58968
|
return (0, lines_1.fromString)(n.value.raw, options).lockIndentTail();
|
|
58969
58969
|
case "TemplateLiteral": {
|
|
58970
|
-
var expressions_1 = path2.map(
|
|
58970
|
+
var expressions_1 = path2.map(print11, "expressions");
|
|
58971
58971
|
parts.push("`");
|
|
58972
58972
|
path2.each(function(childPath) {
|
|
58973
58973
|
var i2 = childPath.getName();
|
|
58974
|
-
parts.push(
|
|
58974
|
+
parts.push(print11(childPath));
|
|
58975
58975
|
if (i2 < expressions_1.length) {
|
|
58976
58976
|
parts.push("${", expressions_1[i2], "}");
|
|
58977
58977
|
}
|
|
@@ -58980,7 +58980,7 @@ var require_printer2 = __commonJS({
|
|
|
58980
58980
|
return (0, lines_1.concat)(parts).lockIndentTail();
|
|
58981
58981
|
}
|
|
58982
58982
|
case "TaggedTemplateExpression":
|
|
58983
|
-
return (0, lines_1.concat)([path2.call(
|
|
58983
|
+
return (0, lines_1.concat)([path2.call(print11, "tag"), path2.call(print11, "quasi")]);
|
|
58984
58984
|
case "Node":
|
|
58985
58985
|
case "Printable":
|
|
58986
58986
|
case "SourceLocation":
|
|
@@ -59014,7 +59014,7 @@ var require_printer2 = __commonJS({
|
|
|
59014
59014
|
if (n.typeAnnotation.type !== "FunctionTypeAnnotation") {
|
|
59015
59015
|
parts.push(": ");
|
|
59016
59016
|
}
|
|
59017
|
-
parts.push(path2.call(
|
|
59017
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
59018
59018
|
return (0, lines_1.concat)(parts);
|
|
59019
59019
|
}
|
|
59020
59020
|
return (0, lines_1.fromString)("");
|
|
@@ -59028,9 +59028,9 @@ var require_printer2 = __commonJS({
|
|
|
59028
59028
|
case "MixedTypeAnnotation":
|
|
59029
59029
|
return (0, lines_1.fromString)("mixed", options);
|
|
59030
59030
|
case "ArrayTypeAnnotation":
|
|
59031
|
-
return (0, lines_1.concat)([path2.call(
|
|
59031
|
+
return (0, lines_1.concat)([path2.call(print11, "elementType"), "[]"]);
|
|
59032
59032
|
case "TupleTypeAnnotation": {
|
|
59033
|
-
var printed_2 = path2.map(
|
|
59033
|
+
var printed_2 = path2.map(print11, "types");
|
|
59034
59034
|
var joined = (0, lines_1.fromString)(", ").join(printed_2);
|
|
59035
59035
|
var oneLine_3 = joined.getLineLength(1) <= options.wrapColumn;
|
|
59036
59036
|
if (oneLine_3) {
|
|
@@ -59077,38 +59077,38 @@ var require_printer2 = __commonJS({
|
|
|
59077
59077
|
case "InterfaceTypeAnnotation":
|
|
59078
59078
|
parts.push("interface");
|
|
59079
59079
|
if (n.extends && n.extends.length > 0) {
|
|
59080
|
-
parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(
|
|
59080
|
+
parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(print11, "extends")));
|
|
59081
59081
|
}
|
|
59082
|
-
parts.push(" ", path2.call(
|
|
59082
|
+
parts.push(" ", path2.call(print11, "body"));
|
|
59083
59083
|
return (0, lines_1.concat)(parts);
|
|
59084
59084
|
case "DeclareFunction":
|
|
59085
59085
|
return printFlowDeclaration(path2, [
|
|
59086
59086
|
"function ",
|
|
59087
|
-
path2.call(
|
|
59087
|
+
path2.call(print11, "id"),
|
|
59088
59088
|
";"
|
|
59089
59089
|
]);
|
|
59090
59090
|
case "DeclareModule":
|
|
59091
59091
|
return printFlowDeclaration(path2, [
|
|
59092
59092
|
"module ",
|
|
59093
|
-
path2.call(
|
|
59093
|
+
path2.call(print11, "id"),
|
|
59094
59094
|
" ",
|
|
59095
|
-
path2.call(
|
|
59095
|
+
path2.call(print11, "body")
|
|
59096
59096
|
]);
|
|
59097
59097
|
case "DeclareModuleExports":
|
|
59098
59098
|
return printFlowDeclaration(path2, [
|
|
59099
59099
|
"module.exports",
|
|
59100
|
-
path2.call(
|
|
59100
|
+
path2.call(print11, "typeAnnotation")
|
|
59101
59101
|
]);
|
|
59102
59102
|
case "DeclareVariable":
|
|
59103
|
-
return printFlowDeclaration(path2, ["var ", path2.call(
|
|
59103
|
+
return printFlowDeclaration(path2, ["var ", path2.call(print11, "id"), ";"]);
|
|
59104
59104
|
case "DeclareExportDeclaration":
|
|
59105
59105
|
case "DeclareExportAllDeclaration":
|
|
59106
|
-
return (0, lines_1.concat)(["declare ", printExportDeclaration(path2, options,
|
|
59106
|
+
return (0, lines_1.concat)(["declare ", printExportDeclaration(path2, options, print11)]);
|
|
59107
59107
|
case "EnumDeclaration":
|
|
59108
59108
|
return (0, lines_1.concat)([
|
|
59109
59109
|
"enum ",
|
|
59110
|
-
path2.call(
|
|
59111
|
-
path2.call(
|
|
59110
|
+
path2.call(print11, "id"),
|
|
59111
|
+
path2.call(print11, "body")
|
|
59112
59112
|
]);
|
|
59113
59113
|
case "EnumBooleanBody":
|
|
59114
59114
|
case "EnumNumberBody":
|
|
@@ -59120,24 +59120,24 @@ var require_printer2 = __commonJS({
|
|
|
59120
59120
|
n.type.slice(4, -4).toLowerCase()
|
|
59121
59121
|
);
|
|
59122
59122
|
}
|
|
59123
|
-
parts.push(" {\n", (0, lines_1.fromString)("\n").join(path2.map(
|
|
59123
|
+
parts.push(" {\n", (0, lines_1.fromString)("\n").join(path2.map(print11, "members")).indent(options.tabWidth), "\n}");
|
|
59124
59124
|
return (0, lines_1.concat)(parts);
|
|
59125
59125
|
}
|
|
59126
59126
|
case "EnumDefaultedMember":
|
|
59127
|
-
return (0, lines_1.concat)([path2.call(
|
|
59127
|
+
return (0, lines_1.concat)([path2.call(print11, "id"), ","]);
|
|
59128
59128
|
case "EnumBooleanMember":
|
|
59129
59129
|
case "EnumNumberMember":
|
|
59130
59130
|
case "EnumStringMember":
|
|
59131
59131
|
return (0, lines_1.concat)([
|
|
59132
|
-
path2.call(
|
|
59132
|
+
path2.call(print11, "id"),
|
|
59133
59133
|
" = ",
|
|
59134
|
-
path2.call(
|
|
59134
|
+
path2.call(print11, "init"),
|
|
59135
59135
|
","
|
|
59136
59136
|
]);
|
|
59137
59137
|
case "InferredPredicate":
|
|
59138
59138
|
return (0, lines_1.fromString)("%checks", options);
|
|
59139
59139
|
case "DeclaredPredicate":
|
|
59140
|
-
return (0, lines_1.concat)(["%checks(", path2.call(
|
|
59140
|
+
return (0, lines_1.concat)(["%checks(", path2.call(print11, "value"), ")"]);
|
|
59141
59141
|
case "FunctionTypeAnnotation": {
|
|
59142
59142
|
var parent = path2.getParentNode(0);
|
|
59143
59143
|
var isArrowFunctionTypeAnnotation = !(namedTypes.ObjectTypeCallProperty.check(parent) || namedTypes.ObjectTypeInternalSlot.check(parent) && parent.method || namedTypes.DeclareFunction.check(path2.getParentNode(2)));
|
|
@@ -59147,14 +59147,14 @@ var require_printer2 = __commonJS({
|
|
|
59147
59147
|
}
|
|
59148
59148
|
var hasTypeParameters = !!n.typeParameters;
|
|
59149
59149
|
var needsParens = hasTypeParameters || n.params.length !== 1 || n.params[0].name;
|
|
59150
|
-
parts.push(hasTypeParameters ? path2.call(
|
|
59150
|
+
parts.push(hasTypeParameters ? path2.call(print11, "typeParameters") : "", needsParens ? "(" : "", printFunctionParams(path2, options, print11), needsParens ? ")" : "");
|
|
59151
59151
|
if (n.returnType) {
|
|
59152
|
-
parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path2.call(
|
|
59152
|
+
parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path2.call(print11, "returnType"));
|
|
59153
59153
|
}
|
|
59154
59154
|
return (0, lines_1.concat)(parts);
|
|
59155
59155
|
}
|
|
59156
59156
|
case "FunctionTypeParam": {
|
|
59157
|
-
var name = path2.call(
|
|
59157
|
+
var name = path2.call(print11, "name");
|
|
59158
59158
|
parts.push(name);
|
|
59159
59159
|
if (n.optional) {
|
|
59160
59160
|
parts.push("?");
|
|
@@ -59162,13 +59162,13 @@ var require_printer2 = __commonJS({
|
|
|
59162
59162
|
if (name.infos[0].line) {
|
|
59163
59163
|
parts.push(": ");
|
|
59164
59164
|
}
|
|
59165
|
-
parts.push(path2.call(
|
|
59165
|
+
parts.push(path2.call(print11, "typeAnnotation"));
|
|
59166
59166
|
return (0, lines_1.concat)(parts);
|
|
59167
59167
|
}
|
|
59168
59168
|
case "GenericTypeAnnotation":
|
|
59169
59169
|
return (0, lines_1.concat)([
|
|
59170
|
-
path2.call(
|
|
59171
|
-
path2.call(
|
|
59170
|
+
path2.call(print11, "id"),
|
|
59171
|
+
path2.call(print11, "typeParameters")
|
|
59172
59172
|
]);
|
|
59173
59173
|
case "DeclareInterface":
|
|
59174
59174
|
parts.push("declare ");
|
|
@@ -59177,24 +59177,24 @@ var require_printer2 = __commonJS({
|
|
|
59177
59177
|
if (n.declare) {
|
|
59178
59178
|
parts.push("declare ");
|
|
59179
59179
|
}
|
|
59180
|
-
parts.push("interface ", path2.call(
|
|
59180
|
+
parts.push("interface ", path2.call(print11, "id"), path2.call(print11, "typeParameters"), " ");
|
|
59181
59181
|
if (n["extends"] && n["extends"].length > 0) {
|
|
59182
|
-
parts.push("extends ", (0, lines_1.fromString)(", ").join(path2.map(
|
|
59182
|
+
parts.push("extends ", (0, lines_1.fromString)(", ").join(path2.map(print11, "extends")), " ");
|
|
59183
59183
|
}
|
|
59184
59184
|
if (n.body) {
|
|
59185
|
-
parts.push(path2.call(
|
|
59185
|
+
parts.push(path2.call(print11, "body"));
|
|
59186
59186
|
}
|
|
59187
59187
|
return (0, lines_1.concat)(parts);
|
|
59188
59188
|
case "ClassImplements":
|
|
59189
59189
|
case "InterfaceExtends":
|
|
59190
59190
|
return (0, lines_1.concat)([
|
|
59191
|
-
path2.call(
|
|
59192
|
-
path2.call(
|
|
59191
|
+
path2.call(print11, "id"),
|
|
59192
|
+
path2.call(print11, "typeParameters")
|
|
59193
59193
|
]);
|
|
59194
59194
|
case "IntersectionTypeAnnotation":
|
|
59195
|
-
return (0, lines_1.fromString)(" & ").join(path2.map(
|
|
59195
|
+
return (0, lines_1.fromString)(" & ").join(path2.map(print11, "types"));
|
|
59196
59196
|
case "NullableTypeAnnotation":
|
|
59197
|
-
return (0, lines_1.concat)(["?", path2.call(
|
|
59197
|
+
return (0, lines_1.concat)(["?", path2.call(print11, "typeAnnotation")]);
|
|
59198
59198
|
case "NullLiteralTypeAnnotation":
|
|
59199
59199
|
return (0, lines_1.fromString)("null", options);
|
|
59200
59200
|
case "ThisTypeAnnotation":
|
|
@@ -59202,40 +59202,40 @@ var require_printer2 = __commonJS({
|
|
|
59202
59202
|
case "NumberTypeAnnotation":
|
|
59203
59203
|
return (0, lines_1.fromString)("number", options);
|
|
59204
59204
|
case "ObjectTypeCallProperty":
|
|
59205
|
-
return path2.call(
|
|
59205
|
+
return path2.call(print11, "value");
|
|
59206
59206
|
case "ObjectTypeIndexer":
|
|
59207
59207
|
if (n.static) {
|
|
59208
59208
|
parts.push("static ");
|
|
59209
59209
|
}
|
|
59210
|
-
parts.push(printVariance(path2,
|
|
59210
|
+
parts.push(printVariance(path2, print11), "[");
|
|
59211
59211
|
if (n.id) {
|
|
59212
|
-
parts.push(path2.call(
|
|
59212
|
+
parts.push(path2.call(print11, "id"), ": ");
|
|
59213
59213
|
}
|
|
59214
|
-
parts.push(path2.call(
|
|
59214
|
+
parts.push(path2.call(print11, "key"), "]: ", path2.call(print11, "value"));
|
|
59215
59215
|
return (0, lines_1.concat)(parts);
|
|
59216
59216
|
case "ObjectTypeProperty":
|
|
59217
59217
|
return (0, lines_1.concat)([
|
|
59218
|
-
printVariance(path2,
|
|
59219
|
-
path2.call(
|
|
59218
|
+
printVariance(path2, print11),
|
|
59219
|
+
path2.call(print11, "key"),
|
|
59220
59220
|
n.optional ? "?" : "",
|
|
59221
59221
|
": ",
|
|
59222
|
-
path2.call(
|
|
59222
|
+
path2.call(print11, "value")
|
|
59223
59223
|
]);
|
|
59224
59224
|
case "ObjectTypeInternalSlot":
|
|
59225
59225
|
return (0, lines_1.concat)([
|
|
59226
59226
|
n.static ? "static " : "",
|
|
59227
59227
|
"[[",
|
|
59228
|
-
path2.call(
|
|
59228
|
+
path2.call(print11, "id"),
|
|
59229
59229
|
"]]",
|
|
59230
59230
|
n.optional ? "?" : "",
|
|
59231
59231
|
n.value.type !== "FunctionTypeAnnotation" ? ": " : "",
|
|
59232
|
-
path2.call(
|
|
59232
|
+
path2.call(print11, "value")
|
|
59233
59233
|
]);
|
|
59234
59234
|
case "QualifiedTypeIdentifier":
|
|
59235
59235
|
return (0, lines_1.concat)([
|
|
59236
|
-
path2.call(
|
|
59236
|
+
path2.call(print11, "qualification"),
|
|
59237
59237
|
".",
|
|
59238
|
-
path2.call(
|
|
59238
|
+
path2.call(print11, "id")
|
|
59239
59239
|
]);
|
|
59240
59240
|
case "StringLiteralTypeAnnotation":
|
|
59241
59241
|
return (0, lines_1.fromString)(nodeStr(n.value, options), options);
|
|
@@ -59252,36 +59252,36 @@ var require_printer2 = __commonJS({
|
|
|
59252
59252
|
case "TypeAlias":
|
|
59253
59253
|
return (0, lines_1.concat)([
|
|
59254
59254
|
"type ",
|
|
59255
|
-
path2.call(
|
|
59256
|
-
path2.call(
|
|
59255
|
+
path2.call(print11, "id"),
|
|
59256
|
+
path2.call(print11, "typeParameters"),
|
|
59257
59257
|
" = ",
|
|
59258
|
-
path2.call(
|
|
59258
|
+
path2.call(print11, "right"),
|
|
59259
59259
|
";"
|
|
59260
59260
|
]);
|
|
59261
59261
|
case "DeclareOpaqueType":
|
|
59262
59262
|
parts.push("declare ");
|
|
59263
59263
|
case "OpaqueType":
|
|
59264
|
-
parts.push("opaque type ", path2.call(
|
|
59264
|
+
parts.push("opaque type ", path2.call(print11, "id"), path2.call(print11, "typeParameters"));
|
|
59265
59265
|
if (n["supertype"]) {
|
|
59266
|
-
parts.push(": ", path2.call(
|
|
59266
|
+
parts.push(": ", path2.call(print11, "supertype"));
|
|
59267
59267
|
}
|
|
59268
59268
|
if (n["impltype"]) {
|
|
59269
|
-
parts.push(" = ", path2.call(
|
|
59269
|
+
parts.push(" = ", path2.call(print11, "impltype"));
|
|
59270
59270
|
}
|
|
59271
59271
|
parts.push(";");
|
|
59272
59272
|
return (0, lines_1.concat)(parts);
|
|
59273
59273
|
case "TypeCastExpression":
|
|
59274
59274
|
return (0, lines_1.concat)([
|
|
59275
59275
|
"(",
|
|
59276
|
-
path2.call(
|
|
59277
|
-
path2.call(
|
|
59276
|
+
path2.call(print11, "expression"),
|
|
59277
|
+
path2.call(print11, "typeAnnotation"),
|
|
59278
59278
|
")"
|
|
59279
59279
|
]);
|
|
59280
59280
|
case "TypeParameterDeclaration":
|
|
59281
59281
|
case "TypeParameterInstantiation":
|
|
59282
59282
|
return (0, lines_1.concat)([
|
|
59283
59283
|
"<",
|
|
59284
|
-
(0, lines_1.fromString)(", ").join(path2.map(
|
|
59284
|
+
(0, lines_1.fromString)(", ").join(path2.map(print11, "params")),
|
|
59285
59285
|
">"
|
|
59286
59286
|
]);
|
|
59287
59287
|
case "Variance":
|
|
@@ -59294,32 +59294,32 @@ var require_printer2 = __commonJS({
|
|
|
59294
59294
|
return (0, lines_1.fromString)("");
|
|
59295
59295
|
case "TypeParameter":
|
|
59296
59296
|
if (n.variance) {
|
|
59297
|
-
parts.push(printVariance(path2,
|
|
59297
|
+
parts.push(printVariance(path2, print11));
|
|
59298
59298
|
}
|
|
59299
|
-
parts.push(path2.call(
|
|
59299
|
+
parts.push(path2.call(print11, "name"));
|
|
59300
59300
|
if (n.bound) {
|
|
59301
|
-
parts.push(path2.call(
|
|
59301
|
+
parts.push(path2.call(print11, "bound"));
|
|
59302
59302
|
}
|
|
59303
59303
|
if (n["default"]) {
|
|
59304
|
-
parts.push("=", path2.call(
|
|
59304
|
+
parts.push("=", path2.call(print11, "default"));
|
|
59305
59305
|
}
|
|
59306
59306
|
return (0, lines_1.concat)(parts);
|
|
59307
59307
|
case "TypeofTypeAnnotation":
|
|
59308
59308
|
return (0, lines_1.concat)([
|
|
59309
59309
|
(0, lines_1.fromString)("typeof ", options),
|
|
59310
|
-
path2.call(
|
|
59310
|
+
path2.call(print11, "argument")
|
|
59311
59311
|
]);
|
|
59312
59312
|
case "IndexedAccessType":
|
|
59313
59313
|
case "OptionalIndexedAccessType":
|
|
59314
59314
|
return (0, lines_1.concat)([
|
|
59315
|
-
path2.call(
|
|
59315
|
+
path2.call(print11, "objectType"),
|
|
59316
59316
|
n.optional ? "?." : "",
|
|
59317
59317
|
"[",
|
|
59318
|
-
path2.call(
|
|
59318
|
+
path2.call(print11, "indexType"),
|
|
59319
59319
|
"]"
|
|
59320
59320
|
]);
|
|
59321
59321
|
case "UnionTypeAnnotation":
|
|
59322
|
-
return (0, lines_1.fromString)(" | ").join(path2.map(
|
|
59322
|
+
return (0, lines_1.fromString)(" | ").join(path2.map(print11, "types"));
|
|
59323
59323
|
case "VoidTypeAnnotation":
|
|
59324
59324
|
return (0, lines_1.fromString)("void", options);
|
|
59325
59325
|
case "NullTypeAnnotation":
|
|
@@ -59359,77 +59359,77 @@ var require_printer2 = __commonJS({
|
|
|
59359
59359
|
case "TSNeverKeyword":
|
|
59360
59360
|
return (0, lines_1.fromString)("never", options);
|
|
59361
59361
|
case "TSArrayType":
|
|
59362
|
-
return (0, lines_1.concat)([path2.call(
|
|
59362
|
+
return (0, lines_1.concat)([path2.call(print11, "elementType"), "[]"]);
|
|
59363
59363
|
case "TSLiteralType":
|
|
59364
|
-
return path2.call(
|
|
59364
|
+
return path2.call(print11, "literal");
|
|
59365
59365
|
case "TSUnionType":
|
|
59366
|
-
return (0, lines_1.fromString)(" | ").join(path2.map(
|
|
59366
|
+
return (0, lines_1.fromString)(" | ").join(path2.map(print11, "types"));
|
|
59367
59367
|
case "TSIntersectionType":
|
|
59368
|
-
return (0, lines_1.fromString)(" & ").join(path2.map(
|
|
59368
|
+
return (0, lines_1.fromString)(" & ").join(path2.map(print11, "types"));
|
|
59369
59369
|
case "TSConditionalType":
|
|
59370
|
-
parts.push(path2.call(
|
|
59370
|
+
parts.push(path2.call(print11, "checkType"), " extends ", path2.call(print11, "extendsType"), " ? ", path2.call(print11, "trueType"), " : ", path2.call(print11, "falseType"));
|
|
59371
59371
|
return (0, lines_1.concat)(parts);
|
|
59372
59372
|
case "TSInferType":
|
|
59373
|
-
parts.push("infer ", path2.call(
|
|
59373
|
+
parts.push("infer ", path2.call(print11, "typeParameter"));
|
|
59374
59374
|
return (0, lines_1.concat)(parts);
|
|
59375
59375
|
case "TSParenthesizedType":
|
|
59376
|
-
return (0, lines_1.concat)(["(", path2.call(
|
|
59376
|
+
return (0, lines_1.concat)(["(", path2.call(print11, "typeAnnotation"), ")"]);
|
|
59377
59377
|
case "TSFunctionType":
|
|
59378
59378
|
return (0, lines_1.concat)([
|
|
59379
|
-
path2.call(
|
|
59379
|
+
path2.call(print11, "typeParameters"),
|
|
59380
59380
|
"(",
|
|
59381
|
-
printFunctionParams(path2, options,
|
|
59381
|
+
printFunctionParams(path2, options, print11),
|
|
59382
59382
|
") => ",
|
|
59383
|
-
path2.call(
|
|
59383
|
+
path2.call(print11, "typeAnnotation", "typeAnnotation")
|
|
59384
59384
|
]);
|
|
59385
59385
|
case "TSConstructorType":
|
|
59386
59386
|
return (0, lines_1.concat)([
|
|
59387
59387
|
"new ",
|
|
59388
|
-
path2.call(
|
|
59388
|
+
path2.call(print11, "typeParameters"),
|
|
59389
59389
|
"(",
|
|
59390
|
-
printFunctionParams(path2, options,
|
|
59390
|
+
printFunctionParams(path2, options, print11),
|
|
59391
59391
|
") => ",
|
|
59392
|
-
path2.call(
|
|
59392
|
+
path2.call(print11, "typeAnnotation", "typeAnnotation")
|
|
59393
59393
|
]);
|
|
59394
59394
|
case "TSMappedType": {
|
|
59395
|
-
parts.push(n.readonly ? "readonly " : "", "[", path2.call(
|
|
59395
|
+
parts.push(n.readonly ? "readonly " : "", "[", path2.call(print11, "typeParameter"), "]", n.optional ? "?" : "");
|
|
59396
59396
|
if (n.typeAnnotation) {
|
|
59397
|
-
parts.push(": ", path2.call(
|
|
59397
|
+
parts.push(": ", path2.call(print11, "typeAnnotation"), ";");
|
|
59398
59398
|
}
|
|
59399
59399
|
return (0, lines_1.concat)(["{\n", (0, lines_1.concat)(parts).indent(options.tabWidth), "\n}"]);
|
|
59400
59400
|
}
|
|
59401
59401
|
case "TSTupleType":
|
|
59402
59402
|
return (0, lines_1.concat)([
|
|
59403
59403
|
"[",
|
|
59404
|
-
(0, lines_1.fromString)(", ").join(path2.map(
|
|
59404
|
+
(0, lines_1.fromString)(", ").join(path2.map(print11, "elementTypes")),
|
|
59405
59405
|
"]"
|
|
59406
59406
|
]);
|
|
59407
59407
|
case "TSNamedTupleMember":
|
|
59408
|
-
parts.push(path2.call(
|
|
59408
|
+
parts.push(path2.call(print11, "label"));
|
|
59409
59409
|
if (n.optional) {
|
|
59410
59410
|
parts.push("?");
|
|
59411
59411
|
}
|
|
59412
|
-
parts.push(": ", path2.call(
|
|
59412
|
+
parts.push(": ", path2.call(print11, "elementType"));
|
|
59413
59413
|
return (0, lines_1.concat)(parts);
|
|
59414
59414
|
case "TSRestType":
|
|
59415
|
-
return (0, lines_1.concat)(["...", path2.call(
|
|
59415
|
+
return (0, lines_1.concat)(["...", path2.call(print11, "typeAnnotation")]);
|
|
59416
59416
|
case "TSOptionalType":
|
|
59417
|
-
return (0, lines_1.concat)([path2.call(
|
|
59417
|
+
return (0, lines_1.concat)([path2.call(print11, "typeAnnotation"), "?"]);
|
|
59418
59418
|
case "TSIndexedAccessType":
|
|
59419
59419
|
return (0, lines_1.concat)([
|
|
59420
|
-
path2.call(
|
|
59420
|
+
path2.call(print11, "objectType"),
|
|
59421
59421
|
"[",
|
|
59422
|
-
path2.call(
|
|
59422
|
+
path2.call(print11, "indexType"),
|
|
59423
59423
|
"]"
|
|
59424
59424
|
]);
|
|
59425
59425
|
case "TSTypeOperator":
|
|
59426
59426
|
return (0, lines_1.concat)([
|
|
59427
|
-
path2.call(
|
|
59427
|
+
path2.call(print11, "operator"),
|
|
59428
59428
|
" ",
|
|
59429
|
-
path2.call(
|
|
59429
|
+
path2.call(print11, "typeAnnotation")
|
|
59430
59430
|
]);
|
|
59431
59431
|
case "TSTypeLiteral": {
|
|
59432
|
-
var members = (0, lines_1.fromString)("\n").join(path2.map(
|
|
59432
|
+
var members = (0, lines_1.fromString)("\n").join(path2.map(print11, "members").map(function(member) {
|
|
59433
59433
|
if (lastNonSpaceCharacter(member) !== ";") {
|
|
59434
59434
|
return member.concat(";");
|
|
59435
59435
|
}
|
|
@@ -59442,13 +59442,13 @@ var require_printer2 = __commonJS({
|
|
|
59442
59442
|
return (0, lines_1.concat)(parts);
|
|
59443
59443
|
}
|
|
59444
59444
|
case "TSEnumMember":
|
|
59445
|
-
parts.push(path2.call(
|
|
59445
|
+
parts.push(path2.call(print11, "id"));
|
|
59446
59446
|
if (n.initializer) {
|
|
59447
|
-
parts.push(" = ", path2.call(
|
|
59447
|
+
parts.push(" = ", path2.call(print11, "initializer"));
|
|
59448
59448
|
}
|
|
59449
59449
|
return (0, lines_1.concat)(parts);
|
|
59450
59450
|
case "TSTypeQuery":
|
|
59451
|
-
return (0, lines_1.concat)(["typeof ", path2.call(
|
|
59451
|
+
return (0, lines_1.concat)(["typeof ", path2.call(print11, "exprName")]);
|
|
59452
59452
|
case "TSParameterProperty":
|
|
59453
59453
|
if (n.accessibility) {
|
|
59454
59454
|
parts.push(n.accessibility, " ");
|
|
@@ -59462,119 +59462,119 @@ var require_printer2 = __commonJS({
|
|
|
59462
59462
|
if (n.readonly) {
|
|
59463
59463
|
parts.push("readonly ");
|
|
59464
59464
|
}
|
|
59465
|
-
parts.push(path2.call(
|
|
59465
|
+
parts.push(path2.call(print11, "parameter"));
|
|
59466
59466
|
return (0, lines_1.concat)(parts);
|
|
59467
59467
|
case "TSTypeReference":
|
|
59468
59468
|
return (0, lines_1.concat)([
|
|
59469
|
-
path2.call(
|
|
59470
|
-
path2.call(
|
|
59469
|
+
path2.call(print11, "typeName"),
|
|
59470
|
+
path2.call(print11, "typeParameters")
|
|
59471
59471
|
]);
|
|
59472
59472
|
case "TSQualifiedName":
|
|
59473
|
-
return (0, lines_1.concat)([path2.call(
|
|
59473
|
+
return (0, lines_1.concat)([path2.call(print11, "left"), ".", path2.call(print11, "right")]);
|
|
59474
59474
|
case "TSAsExpression":
|
|
59475
59475
|
case "TSSatisfiesExpression": {
|
|
59476
|
-
var expression = path2.call(
|
|
59477
|
-
parts.push(expression, n.type === "TSSatisfiesExpression" ? " satisfies " : " as ", path2.call(
|
|
59476
|
+
var expression = path2.call(print11, "expression");
|
|
59477
|
+
parts.push(expression, n.type === "TSSatisfiesExpression" ? " satisfies " : " as ", path2.call(print11, "typeAnnotation"));
|
|
59478
59478
|
return (0, lines_1.concat)(parts);
|
|
59479
59479
|
}
|
|
59480
59480
|
case "TSTypeCastExpression":
|
|
59481
59481
|
return (0, lines_1.concat)([
|
|
59482
|
-
path2.call(
|
|
59483
|
-
path2.call(
|
|
59482
|
+
path2.call(print11, "expression"),
|
|
59483
|
+
path2.call(print11, "typeAnnotation")
|
|
59484
59484
|
]);
|
|
59485
59485
|
case "TSNonNullExpression":
|
|
59486
|
-
return (0, lines_1.concat)([path2.call(
|
|
59486
|
+
return (0, lines_1.concat)([path2.call(print11, "expression"), "!"]);
|
|
59487
59487
|
case "TSTypeAnnotation":
|
|
59488
|
-
return (0, lines_1.concat)([": ", path2.call(
|
|
59488
|
+
return (0, lines_1.concat)([": ", path2.call(print11, "typeAnnotation")]);
|
|
59489
59489
|
case "TSIndexSignature":
|
|
59490
59490
|
return (0, lines_1.concat)([
|
|
59491
59491
|
n.readonly ? "readonly " : "",
|
|
59492
59492
|
"[",
|
|
59493
|
-
path2.map(
|
|
59493
|
+
path2.map(print11, "parameters"),
|
|
59494
59494
|
"]",
|
|
59495
|
-
path2.call(
|
|
59495
|
+
path2.call(print11, "typeAnnotation")
|
|
59496
59496
|
]);
|
|
59497
59497
|
case "TSPropertySignature":
|
|
59498
|
-
parts.push(printVariance(path2,
|
|
59498
|
+
parts.push(printVariance(path2, print11), n.readonly ? "readonly " : "");
|
|
59499
59499
|
if (n.computed) {
|
|
59500
|
-
parts.push("[", path2.call(
|
|
59500
|
+
parts.push("[", path2.call(print11, "key"), "]");
|
|
59501
59501
|
} else {
|
|
59502
|
-
parts.push(path2.call(
|
|
59502
|
+
parts.push(path2.call(print11, "key"));
|
|
59503
59503
|
}
|
|
59504
|
-
parts.push(n.optional ? "?" : "", path2.call(
|
|
59504
|
+
parts.push(n.optional ? "?" : "", path2.call(print11, "typeAnnotation"));
|
|
59505
59505
|
return (0, lines_1.concat)(parts);
|
|
59506
59506
|
case "TSMethodSignature":
|
|
59507
59507
|
if (n.computed) {
|
|
59508
|
-
parts.push("[", path2.call(
|
|
59508
|
+
parts.push("[", path2.call(print11, "key"), "]");
|
|
59509
59509
|
} else {
|
|
59510
|
-
parts.push(path2.call(
|
|
59510
|
+
parts.push(path2.call(print11, "key"));
|
|
59511
59511
|
}
|
|
59512
59512
|
if (n.optional) {
|
|
59513
59513
|
parts.push("?");
|
|
59514
59514
|
}
|
|
59515
|
-
parts.push(path2.call(
|
|
59515
|
+
parts.push(path2.call(print11, "typeParameters"), "(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "typeAnnotation"));
|
|
59516
59516
|
return (0, lines_1.concat)(parts);
|
|
59517
59517
|
case "TSTypePredicate":
|
|
59518
59518
|
if (n.asserts) {
|
|
59519
59519
|
parts.push("asserts ");
|
|
59520
59520
|
}
|
|
59521
|
-
parts.push(path2.call(
|
|
59521
|
+
parts.push(path2.call(print11, "parameterName"));
|
|
59522
59522
|
if (n.typeAnnotation) {
|
|
59523
|
-
parts.push(" is ", path2.call(
|
|
59523
|
+
parts.push(" is ", path2.call(print11, "typeAnnotation", "typeAnnotation"));
|
|
59524
59524
|
}
|
|
59525
59525
|
return (0, lines_1.concat)(parts);
|
|
59526
59526
|
case "TSCallSignatureDeclaration":
|
|
59527
59527
|
return (0, lines_1.concat)([
|
|
59528
|
-
path2.call(
|
|
59528
|
+
path2.call(print11, "typeParameters"),
|
|
59529
59529
|
"(",
|
|
59530
|
-
printFunctionParams(path2, options,
|
|
59530
|
+
printFunctionParams(path2, options, print11),
|
|
59531
59531
|
")",
|
|
59532
|
-
path2.call(
|
|
59532
|
+
path2.call(print11, "typeAnnotation")
|
|
59533
59533
|
]);
|
|
59534
59534
|
case "TSConstructSignatureDeclaration":
|
|
59535
59535
|
if (n.typeParameters) {
|
|
59536
|
-
parts.push("new", path2.call(
|
|
59536
|
+
parts.push("new", path2.call(print11, "typeParameters"));
|
|
59537
59537
|
} else {
|
|
59538
59538
|
parts.push("new ");
|
|
59539
59539
|
}
|
|
59540
|
-
parts.push("(", printFunctionParams(path2, options,
|
|
59540
|
+
parts.push("(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "typeAnnotation"));
|
|
59541
59541
|
return (0, lines_1.concat)(parts);
|
|
59542
59542
|
case "TSTypeAliasDeclaration":
|
|
59543
59543
|
return (0, lines_1.concat)([
|
|
59544
59544
|
n.declare ? "declare " : "",
|
|
59545
59545
|
"type ",
|
|
59546
|
-
path2.call(
|
|
59547
|
-
path2.call(
|
|
59546
|
+
path2.call(print11, "id"),
|
|
59547
|
+
path2.call(print11, "typeParameters"),
|
|
59548
59548
|
" = ",
|
|
59549
|
-
path2.call(
|
|
59549
|
+
path2.call(print11, "typeAnnotation"),
|
|
59550
59550
|
";"
|
|
59551
59551
|
]);
|
|
59552
59552
|
case "TSTypeParameter": {
|
|
59553
|
-
parts.push(path2.call(
|
|
59553
|
+
parts.push(path2.call(print11, "name"));
|
|
59554
59554
|
var parent = path2.getParentNode(0);
|
|
59555
59555
|
var isInMappedType = namedTypes.TSMappedType.check(parent);
|
|
59556
59556
|
if (n.constraint) {
|
|
59557
|
-
parts.push(isInMappedType ? " in " : " extends ", path2.call(
|
|
59557
|
+
parts.push(isInMappedType ? " in " : " extends ", path2.call(print11, "constraint"));
|
|
59558
59558
|
}
|
|
59559
59559
|
if (n["default"]) {
|
|
59560
|
-
parts.push(" = ", path2.call(
|
|
59560
|
+
parts.push(" = ", path2.call(print11, "default"));
|
|
59561
59561
|
}
|
|
59562
59562
|
return (0, lines_1.concat)(parts);
|
|
59563
59563
|
}
|
|
59564
59564
|
case "TSTypeAssertion": {
|
|
59565
|
-
parts.push("<", path2.call(
|
|
59565
|
+
parts.push("<", path2.call(print11, "typeAnnotation"), "> ", path2.call(print11, "expression"));
|
|
59566
59566
|
return (0, lines_1.concat)(parts);
|
|
59567
59567
|
}
|
|
59568
59568
|
case "TSTypeParameterDeclaration":
|
|
59569
59569
|
case "TSTypeParameterInstantiation":
|
|
59570
59570
|
return (0, lines_1.concat)([
|
|
59571
59571
|
"<",
|
|
59572
|
-
(0, lines_1.fromString)(", ").join(path2.map(
|
|
59572
|
+
(0, lines_1.fromString)(", ").join(path2.map(print11, "params")),
|
|
59573
59573
|
">"
|
|
59574
59574
|
]);
|
|
59575
59575
|
case "TSEnumDeclaration": {
|
|
59576
|
-
parts.push(n.declare ? "declare " : "", n.const ? "const " : "", "enum ", path2.call(
|
|
59577
|
-
var memberLines = (0, lines_1.fromString)(",\n").join(path2.map(
|
|
59576
|
+
parts.push(n.declare ? "declare " : "", n.const ? "const " : "", "enum ", path2.call(print11, "id"));
|
|
59577
|
+
var memberLines = (0, lines_1.fromString)(",\n").join(path2.map(print11, "members"));
|
|
59578
59578
|
if (memberLines.isEmpty()) {
|
|
59579
59579
|
parts.push(" {}");
|
|
59580
59580
|
} else {
|
|
@@ -59584,11 +59584,11 @@ var require_printer2 = __commonJS({
|
|
|
59584
59584
|
}
|
|
59585
59585
|
case "TSExpressionWithTypeArguments":
|
|
59586
59586
|
return (0, lines_1.concat)([
|
|
59587
|
-
path2.call(
|
|
59588
|
-
path2.call(
|
|
59587
|
+
path2.call(print11, "expression"),
|
|
59588
|
+
path2.call(print11, "typeParameters")
|
|
59589
59589
|
]);
|
|
59590
59590
|
case "TSInterfaceBody": {
|
|
59591
|
-
var lines = (0, lines_1.fromString)("\n").join(path2.map(
|
|
59591
|
+
var lines = (0, lines_1.fromString)("\n").join(path2.map(print11, "body").map(function(element) {
|
|
59592
59592
|
if (lastNonSpaceCharacter(element) !== ";") {
|
|
59593
59593
|
return element.concat(";");
|
|
59594
59594
|
}
|
|
@@ -59600,22 +59600,22 @@ var require_printer2 = __commonJS({
|
|
|
59600
59600
|
return (0, lines_1.concat)(["{\n", lines.indent(options.tabWidth), "\n}"]);
|
|
59601
59601
|
}
|
|
59602
59602
|
case "TSImportType":
|
|
59603
|
-
parts.push("import(", path2.call(
|
|
59603
|
+
parts.push("import(", path2.call(print11, "argument"), ")");
|
|
59604
59604
|
if (n.qualifier) {
|
|
59605
|
-
parts.push(".", path2.call(
|
|
59605
|
+
parts.push(".", path2.call(print11, "qualifier"));
|
|
59606
59606
|
}
|
|
59607
59607
|
if (n.typeParameters) {
|
|
59608
|
-
parts.push(path2.call(
|
|
59608
|
+
parts.push(path2.call(print11, "typeParameters"));
|
|
59609
59609
|
}
|
|
59610
59610
|
return (0, lines_1.concat)(parts);
|
|
59611
59611
|
case "TSImportEqualsDeclaration":
|
|
59612
59612
|
if (n.isExport) {
|
|
59613
59613
|
parts.push("export ");
|
|
59614
59614
|
}
|
|
59615
|
-
parts.push("import ", path2.call(
|
|
59615
|
+
parts.push("import ", path2.call(print11, "id"), " = ", path2.call(print11, "moduleReference"));
|
|
59616
59616
|
return maybeAddSemicolon((0, lines_1.concat)(parts));
|
|
59617
59617
|
case "TSExternalModuleReference":
|
|
59618
|
-
return (0, lines_1.concat)(["require(", path2.call(
|
|
59618
|
+
return (0, lines_1.concat)(["require(", path2.call(print11, "expression"), ")"]);
|
|
59619
59619
|
case "TSModuleDeclaration": {
|
|
59620
59620
|
var parent = path2.getParentNode();
|
|
59621
59621
|
if (parent.type === "TSModuleDeclaration") {
|
|
@@ -59640,16 +59640,16 @@ var require_printer2 = __commonJS({
|
|
|
59640
59640
|
}
|
|
59641
59641
|
}
|
|
59642
59642
|
}
|
|
59643
|
-
parts.push(path2.call(
|
|
59643
|
+
parts.push(path2.call(print11, "id"));
|
|
59644
59644
|
if (n.body) {
|
|
59645
59645
|
parts.push(" ");
|
|
59646
|
-
parts.push(path2.call(
|
|
59646
|
+
parts.push(path2.call(print11, "body"));
|
|
59647
59647
|
}
|
|
59648
59648
|
return (0, lines_1.concat)(parts);
|
|
59649
59649
|
}
|
|
59650
59650
|
case "TSModuleBlock": {
|
|
59651
59651
|
var naked = path2.call(function(bodyPath) {
|
|
59652
|
-
return printStatementSequence(bodyPath, options,
|
|
59652
|
+
return printStatementSequence(bodyPath, options, print11);
|
|
59653
59653
|
}, "body");
|
|
59654
59654
|
if (naked.isEmpty()) {
|
|
59655
59655
|
parts.push("{}");
|
|
@@ -59659,11 +59659,11 @@ var require_printer2 = __commonJS({
|
|
|
59659
59659
|
return (0, lines_1.concat)(parts);
|
|
59660
59660
|
}
|
|
59661
59661
|
case "TSInstantiationExpression": {
|
|
59662
|
-
parts.push(path2.call(
|
|
59662
|
+
parts.push(path2.call(print11, "expression"), path2.call(print11, "typeParameters"));
|
|
59663
59663
|
return (0, lines_1.concat)(parts);
|
|
59664
59664
|
}
|
|
59665
59665
|
case "V8IntrinsicIdentifier":
|
|
59666
|
-
return (0, lines_1.concat)(["%", path2.call(
|
|
59666
|
+
return (0, lines_1.concat)(["%", path2.call(print11, "name")]);
|
|
59667
59667
|
case "TopicReference":
|
|
59668
59668
|
return (0, lines_1.fromString)("#");
|
|
59669
59669
|
case "ClassHeritage":
|
|
@@ -59713,7 +59713,7 @@ var require_printer2 = __commonJS({
|
|
|
59713
59713
|
}
|
|
59714
59714
|
return (0, lines_1.concat)(parts);
|
|
59715
59715
|
}
|
|
59716
|
-
function printStatementSequence(path2, options,
|
|
59716
|
+
function printStatementSequence(path2, options, print11) {
|
|
59717
59717
|
var filtered = [];
|
|
59718
59718
|
var sawComment = false;
|
|
59719
59719
|
var sawStatement = false;
|
|
@@ -59734,7 +59734,7 @@ var require_printer2 = __commonJS({
|
|
|
59734
59734
|
}
|
|
59735
59735
|
filtered.push({
|
|
59736
59736
|
node: stmt,
|
|
59737
|
-
printed:
|
|
59737
|
+
printed: print11(stmtPath)
|
|
59738
59738
|
});
|
|
59739
59739
|
});
|
|
59740
59740
|
if (sawComment) {
|
|
@@ -59826,7 +59826,7 @@ var require_printer2 = __commonJS({
|
|
|
59826
59826
|
}
|
|
59827
59827
|
return parts;
|
|
59828
59828
|
}
|
|
59829
|
-
function printMethod(path2, options,
|
|
59829
|
+
function printMethod(path2, options, print11) {
|
|
59830
59830
|
var node = path2.getNode();
|
|
59831
59831
|
var kind = node.kind;
|
|
59832
59832
|
var parts = [];
|
|
@@ -59844,7 +59844,7 @@ var require_printer2 = __commonJS({
|
|
|
59844
59844
|
if (kind === "get" || kind === "set") {
|
|
59845
59845
|
parts.push(kind, " ");
|
|
59846
59846
|
}
|
|
59847
|
-
var key = path2.call(
|
|
59847
|
+
var key = path2.call(print11, "key");
|
|
59848
59848
|
if (node.computed) {
|
|
59849
59849
|
key = (0, lines_1.concat)(["[", key, "]"]);
|
|
59850
59850
|
}
|
|
@@ -59853,26 +59853,26 @@ var require_printer2 = __commonJS({
|
|
|
59853
59853
|
parts.push("?");
|
|
59854
59854
|
}
|
|
59855
59855
|
if (node === nodeValue) {
|
|
59856
|
-
parts.push(path2.call(
|
|
59856
|
+
parts.push(path2.call(print11, "typeParameters"), "(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "returnType"));
|
|
59857
59857
|
if (node.body) {
|
|
59858
|
-
parts.push(" ", path2.call(
|
|
59858
|
+
parts.push(" ", path2.call(print11, "body"));
|
|
59859
59859
|
} else {
|
|
59860
59860
|
parts.push(";");
|
|
59861
59861
|
}
|
|
59862
59862
|
} else {
|
|
59863
|
-
parts.push(path2.call(
|
|
59864
|
-
return printFunctionParams(valuePath, options,
|
|
59865
|
-
}, "value"), ")", path2.call(
|
|
59863
|
+
parts.push(path2.call(print11, "value", "typeParameters"), "(", path2.call(function(valuePath) {
|
|
59864
|
+
return printFunctionParams(valuePath, options, print11);
|
|
59865
|
+
}, "value"), ")", path2.call(print11, "value", "returnType"));
|
|
59866
59866
|
if (nodeValue.body) {
|
|
59867
|
-
parts.push(" ", path2.call(
|
|
59867
|
+
parts.push(" ", path2.call(print11, "value", "body"));
|
|
59868
59868
|
} else {
|
|
59869
59869
|
parts.push(";");
|
|
59870
59870
|
}
|
|
59871
59871
|
}
|
|
59872
59872
|
return (0, lines_1.concat)(parts);
|
|
59873
59873
|
}
|
|
59874
|
-
function printArgumentsList(path2, options,
|
|
59875
|
-
var printed = path2.map(
|
|
59874
|
+
function printArgumentsList(path2, options, print11) {
|
|
59875
|
+
var printed = path2.map(print11, "arguments");
|
|
59876
59876
|
var trailingComma = util.isTrailingCommaEnabled(options, "parameters");
|
|
59877
59877
|
var joined = (0, lines_1.fromString)(", ").join(printed);
|
|
59878
59878
|
if (joined.getLineLength(1) > options.wrapColumn) {
|
|
@@ -59885,28 +59885,28 @@ var require_printer2 = __commonJS({
|
|
|
59885
59885
|
}
|
|
59886
59886
|
return (0, lines_1.concat)(["(", joined, ")"]);
|
|
59887
59887
|
}
|
|
59888
|
-
function printFunctionParams(path2, options,
|
|
59888
|
+
function printFunctionParams(path2, options, print11) {
|
|
59889
59889
|
var fun = path2.getValue();
|
|
59890
59890
|
var params;
|
|
59891
59891
|
var printed = [];
|
|
59892
59892
|
if (fun.params) {
|
|
59893
59893
|
params = fun.params;
|
|
59894
|
-
printed = path2.map(
|
|
59894
|
+
printed = path2.map(print11, "params");
|
|
59895
59895
|
} else if (fun.parameters) {
|
|
59896
59896
|
params = fun.parameters;
|
|
59897
|
-
printed = path2.map(
|
|
59897
|
+
printed = path2.map(print11, "parameters");
|
|
59898
59898
|
}
|
|
59899
59899
|
if (fun.defaults) {
|
|
59900
59900
|
path2.each(function(defExprPath) {
|
|
59901
59901
|
var i2 = defExprPath.getName();
|
|
59902
59902
|
var p = printed[i2];
|
|
59903
59903
|
if (p && defExprPath.getValue()) {
|
|
59904
|
-
printed[i2] = (0, lines_1.concat)([p, " = ",
|
|
59904
|
+
printed[i2] = (0, lines_1.concat)([p, " = ", print11(defExprPath)]);
|
|
59905
59905
|
}
|
|
59906
59906
|
}, "defaults");
|
|
59907
59907
|
}
|
|
59908
59908
|
if (fun.rest) {
|
|
59909
|
-
printed.push((0, lines_1.concat)(["...", path2.call(
|
|
59909
|
+
printed.push((0, lines_1.concat)(["...", path2.call(print11, "rest")]));
|
|
59910
59910
|
}
|
|
59911
59911
|
var joined = (0, lines_1.fromString)(", ").join(printed);
|
|
59912
59912
|
if (joined.length > 1 || joined.getLineLength(1) > options.wrapColumn) {
|
|
@@ -59920,11 +59920,11 @@ var require_printer2 = __commonJS({
|
|
|
59920
59920
|
}
|
|
59921
59921
|
return joined;
|
|
59922
59922
|
}
|
|
59923
|
-
function maybePrintImportAssertions(path2, options,
|
|
59923
|
+
function maybePrintImportAssertions(path2, options, print11) {
|
|
59924
59924
|
var n = path2.getValue();
|
|
59925
59925
|
if (n.assertions && n.assertions.length > 0) {
|
|
59926
59926
|
var parts = [" assert {"];
|
|
59927
|
-
var printed = path2.map(
|
|
59927
|
+
var printed = path2.map(print11, "assertions");
|
|
59928
59928
|
var flat = (0, lines_1.fromString)(", ").join(printed);
|
|
59929
59929
|
if (flat.length > 1 || flat.getLineLength(1) > options.wrapColumn) {
|
|
59930
59930
|
parts.push("\n", (0, lines_1.fromString)(",\n").join(printed).indent(options.tabWidth), "\n}");
|
|
@@ -59935,7 +59935,7 @@ var require_printer2 = __commonJS({
|
|
|
59935
59935
|
}
|
|
59936
59936
|
return (0, lines_1.fromString)("");
|
|
59937
59937
|
}
|
|
59938
|
-
function printExportDeclaration(path2, options,
|
|
59938
|
+
function printExportDeclaration(path2, options, print11) {
|
|
59939
59939
|
var decl = path2.getValue();
|
|
59940
59940
|
var parts = ["export "];
|
|
59941
59941
|
if (decl.exportKind && decl.exportKind === "type") {
|
|
@@ -59949,7 +59949,7 @@ var require_printer2 = __commonJS({
|
|
|
59949
59949
|
parts.push("default ");
|
|
59950
59950
|
}
|
|
59951
59951
|
if (decl.declaration) {
|
|
59952
|
-
parts.push(path2.call(
|
|
59952
|
+
parts.push(path2.call(print11, "declaration"));
|
|
59953
59953
|
} else if (decl.specifiers) {
|
|
59954
59954
|
if (decl.specifiers.length === 1 && decl.specifiers[0].type === "ExportBatchSpecifier") {
|
|
59955
59955
|
parts.push("*");
|
|
@@ -59961,9 +59961,9 @@ var require_printer2 = __commonJS({
|
|
|
59961
59961
|
path2.each(function(specifierPath) {
|
|
59962
59962
|
var spec = specifierPath.getValue();
|
|
59963
59963
|
if (spec.type === "ExportDefaultSpecifier") {
|
|
59964
|
-
unbracedSpecifiers_2.push(
|
|
59964
|
+
unbracedSpecifiers_2.push(print11(specifierPath));
|
|
59965
59965
|
} else {
|
|
59966
|
-
bracedSpecifiers_2.push(
|
|
59966
|
+
bracedSpecifiers_2.push(print11(specifierPath));
|
|
59967
59967
|
}
|
|
59968
59968
|
}, "specifiers");
|
|
59969
59969
|
unbracedSpecifiers_2.forEach(function(lines2, i2) {
|
|
@@ -59992,10 +59992,10 @@ var require_printer2 = __commonJS({
|
|
|
59992
59992
|
}
|
|
59993
59993
|
}
|
|
59994
59994
|
} else {
|
|
59995
|
-
parts.push(shouldPrintSpaces ? "{ " : "{", (0, lines_1.fromString)(", ").join(path2.map(
|
|
59995
|
+
parts.push(shouldPrintSpaces ? "{ " : "{", (0, lines_1.fromString)(", ").join(path2.map(print11, "specifiers")), shouldPrintSpaces ? " }" : "}");
|
|
59996
59996
|
}
|
|
59997
59997
|
if (decl.source) {
|
|
59998
|
-
parts.push(" from ", path2.call(
|
|
59998
|
+
parts.push(" from ", path2.call(print11, "source"), maybePrintImportAssertions(path2, options, print11));
|
|
59999
59999
|
}
|
|
60000
60000
|
}
|
|
60001
60001
|
var lines = (0, lines_1.concat)(parts);
|
|
@@ -60013,7 +60013,7 @@ var require_printer2 = __commonJS({
|
|
|
60013
60013
|
}
|
|
60014
60014
|
return (0, lines_1.concat)(parts);
|
|
60015
60015
|
}
|
|
60016
|
-
function printVariance(path2,
|
|
60016
|
+
function printVariance(path2, print11) {
|
|
60017
60017
|
return path2.call(function(variancePath) {
|
|
60018
60018
|
var value = variancePath.getValue();
|
|
60019
60019
|
if (value) {
|
|
@@ -60023,7 +60023,7 @@ var require_printer2 = __commonJS({
|
|
|
60023
60023
|
if (value === "minus") {
|
|
60024
60024
|
return (0, lines_1.fromString)("-");
|
|
60025
60025
|
}
|
|
60026
|
-
return
|
|
60026
|
+
return print11(variancePath);
|
|
60027
60027
|
}
|
|
60028
60028
|
return (0, lines_1.fromString)("");
|
|
60029
60029
|
}, "variance");
|
|
@@ -60110,10 +60110,10 @@ var require_main2 = __commonJS({
|
|
|
60110
60110
|
Object.defineProperty(exports, "visit", { enumerable: true, get: function() {
|
|
60111
60111
|
return ast_types_1.visit;
|
|
60112
60112
|
} });
|
|
60113
|
-
function
|
|
60113
|
+
function print11(node, options) {
|
|
60114
60114
|
return new printer_1.Printer(options).print(node);
|
|
60115
60115
|
}
|
|
60116
|
-
exports.print =
|
|
60116
|
+
exports.print = print11;
|
|
60117
60117
|
function prettyPrint3(node, options) {
|
|
60118
60118
|
return new printer_1.Printer(options).printGenerically(node);
|
|
60119
60119
|
}
|
|
@@ -60137,7 +60137,7 @@ var require_main2 = __commonJS({
|
|
|
60137
60137
|
function runString(code, transformer, options) {
|
|
60138
60138
|
var writeback = options && options.writeback || defaultWriteback;
|
|
60139
60139
|
transformer((0, parser_1.parse)(code, options), function(node) {
|
|
60140
|
-
writeback(
|
|
60140
|
+
writeback(print11(node, options).code);
|
|
60141
60141
|
});
|
|
60142
60142
|
}
|
|
60143
60143
|
}
|
|
@@ -70509,7 +70509,7 @@ async function getConfig({
|
|
|
70509
70509
|
}
|
|
70510
70510
|
}
|
|
70511
70511
|
_config.plugins = orderedPlugins(plugins);
|
|
70512
|
-
await Promise.all(_config.plugins.map((plugin2) => plugin2.
|
|
70512
|
+
await Promise.all(_config.plugins.map((plugin2) => plugin2.afterLoad?.({ config: _config })));
|
|
70513
70513
|
resolve2(_config);
|
|
70514
70514
|
return _config;
|
|
70515
70515
|
} catch (e2) {
|
|
@@ -70656,8 +70656,8 @@ function getRootType(type) {
|
|
|
70656
70656
|
function hashDocument({
|
|
70657
70657
|
document
|
|
70658
70658
|
}) {
|
|
70659
|
-
const docString = typeof document === "string" ? document :
|
|
70660
|
-
return crypto.createHash("sha256").update(docString).digest("hex");
|
|
70659
|
+
const docString = typeof document === "string" ? document : document.artifact?.raw;
|
|
70660
|
+
return crypto.createHash("sha256").update(docString ?? "").digest("hex");
|
|
70661
70661
|
}
|
|
70662
70662
|
function parentTypeFromAncestors(schema, filepath, ancestors) {
|
|
70663
70663
|
const parents = [...ancestors];
|
|
@@ -71429,7 +71429,7 @@ async function fragmentVariables(config2, documents) {
|
|
|
71429
71429
|
name: "generated::fragmentVariables",
|
|
71430
71430
|
kind: "HoudiniFragment" /* Fragment */,
|
|
71431
71431
|
document: doc,
|
|
71432
|
-
|
|
71432
|
+
originalParsed: doc,
|
|
71433
71433
|
generateStore: false,
|
|
71434
71434
|
generateArtifact: false,
|
|
71435
71435
|
filename: "generated::fragmentVariables",
|
|
@@ -72352,7 +72352,7 @@ async function paginate(config2, documents) {
|
|
|
72352
72352
|
filename: doc.filename,
|
|
72353
72353
|
name: refetchQueryName,
|
|
72354
72354
|
document: queryDoc,
|
|
72355
|
-
|
|
72355
|
+
originalParsed: queryDoc,
|
|
72356
72356
|
generateArtifact: true,
|
|
72357
72357
|
generateStore: false,
|
|
72358
72358
|
refetch: doc.refetch,
|
|
@@ -72772,7 +72772,7 @@ async function addListFragments(config2, documents) {
|
|
|
72772
72772
|
generateArtifact: false,
|
|
72773
72773
|
generateStore: false,
|
|
72774
72774
|
document: generatedDoc,
|
|
72775
|
-
|
|
72775
|
+
originalParsed: generatedDoc,
|
|
72776
72776
|
filename: "generated::lists",
|
|
72777
72777
|
originalString: "",
|
|
72778
72778
|
artifact: null
|
|
@@ -73300,11 +73300,11 @@ function artifactGenerator(stats) {
|
|
|
73300
73300
|
};
|
|
73301
73301
|
const plugin_data = config2.plugins.reduce(
|
|
73302
73302
|
(prev, plugin2) => {
|
|
73303
|
-
if (!plugin2.
|
|
73303
|
+
if (!plugin2.artifactData) {
|
|
73304
73304
|
return prev;
|
|
73305
73305
|
}
|
|
73306
73306
|
const result = { ...prev };
|
|
73307
|
-
const dataToAdd = plugin2.
|
|
73307
|
+
const dataToAdd = plugin2.artifactData({ config: config2, document: doc }) ?? {};
|
|
73308
73308
|
if (Object.keys(dataToAdd).length > 0) {
|
|
73309
73309
|
result[plugin2.name] = dataToAdd;
|
|
73310
73310
|
}
|
|
@@ -73349,10 +73349,10 @@ function artifactGenerator(stats) {
|
|
|
73349
73349
|
}
|
|
73350
73350
|
doc.artifact = artifact;
|
|
73351
73351
|
for (const plugin2 of config2.plugins) {
|
|
73352
|
-
if (!plugin2.
|
|
73352
|
+
if (!plugin2.artifactEnd) {
|
|
73353
73353
|
continue;
|
|
73354
73354
|
}
|
|
73355
|
-
plugin2.
|
|
73355
|
+
plugin2.artifactEnd({ config: config2, document: doc });
|
|
73356
73356
|
}
|
|
73357
73357
|
const file = AST5.program([
|
|
73358
73358
|
moduleExport(config2, "default", serializeValue(artifact)),
|
|
@@ -73392,18 +73392,18 @@ async function generateGraphqlReturnTypes(config2, docs) {
|
|
|
73392
73392
|
const indexPath = path_exports.join(config2.runtimeDirectory, "index.d.ts");
|
|
73393
73393
|
const fileContent = await fs_exports.readFile(indexPath) || "";
|
|
73394
73394
|
const contents = await parseJS(fileContent);
|
|
73395
|
-
const
|
|
73396
|
-
(plugin2) => plugin2.
|
|
73397
|
-
)?.
|
|
73398
|
-
if (!
|
|
73395
|
+
const graphqlTagReturn = config2.plugins.find(
|
|
73396
|
+
(plugin2) => plugin2.graphqlTagReturn
|
|
73397
|
+
)?.graphqlTagReturn;
|
|
73398
|
+
if (!graphqlTagReturn || !contents) {
|
|
73399
73399
|
return fileContent;
|
|
73400
73400
|
}
|
|
73401
73401
|
const overloaded_returns = {};
|
|
73402
73402
|
for (const doc of docs) {
|
|
73403
|
-
const return_value =
|
|
73403
|
+
const return_value = graphqlTagReturn({
|
|
73404
73404
|
config: config2,
|
|
73405
73405
|
document: doc,
|
|
73406
|
-
|
|
73406
|
+
ensureImport({ identifier, module }) {
|
|
73407
73407
|
ensureImports({
|
|
73408
73408
|
config: config2,
|
|
73409
73409
|
body: contents.script.body,
|
|
@@ -73451,18 +73451,18 @@ async function injectPlugins({
|
|
|
73451
73451
|
importStatement,
|
|
73452
73452
|
exportStatement
|
|
73453
73453
|
}) {
|
|
73454
|
-
const
|
|
73455
|
-
let plugins = plugin2.
|
|
73454
|
+
const clientPlugins = config2.plugins.filter((plugin2) => plugin2.clientPlugins).reduce((acc, plugin2) => {
|
|
73455
|
+
let plugins = plugin2.clientPlugins;
|
|
73456
73456
|
if (typeof plugins === "function") {
|
|
73457
73457
|
plugins = plugins(config2, config2.pluginConfig(plugin2.name));
|
|
73458
73458
|
}
|
|
73459
73459
|
return [...acc, ...Object.entries(plugins)];
|
|
73460
73460
|
}, []);
|
|
73461
|
-
return
|
|
73462
|
-
${
|
|
73461
|
+
return clientPlugins.length > 0 ? `
|
|
73462
|
+
${clientPlugins.map((plugin2, i2) => importStatement(plugin2[0], `plugin${i2}`))}
|
|
73463
73463
|
|
|
73464
73464
|
const plugins = [
|
|
73465
|
-
${
|
|
73465
|
+
${clientPlugins.map((plugin2, i2) => {
|
|
73466
73466
|
const suffix = `(${JSON.stringify(plugin2[1])})`;
|
|
73467
73467
|
return `plugin${i2}${suffix}`;
|
|
73468
73468
|
}).join(",\n")}
|
|
@@ -73506,18 +73506,18 @@ ${exportStatement("config")}
|
|
|
73506
73506
|
},
|
|
73507
73507
|
[path_exports.join(config2.runtimeSource, "client", "plugins", "injectedPlugins.js")]: (content) => injectPlugins({ config: config2, content, importStatement, exportStatement })
|
|
73508
73508
|
}),
|
|
73509
|
-
...config2.plugins.filter((plugin2) => plugin2.
|
|
73509
|
+
...config2.plugins.filter((plugin2) => plugin2.includeRuntime).map((plugin2) => generatePluginRuntime(config2, plugin2)),
|
|
73510
73510
|
generatePluginIndex({ config: config2, exportStatement: exportStar })
|
|
73511
73511
|
]);
|
|
73512
73512
|
await generateGraphqlReturnTypes(config2, docs);
|
|
73513
73513
|
}
|
|
73514
73514
|
async function generatePluginRuntime(config2, plugin2) {
|
|
73515
|
-
if (houdini_mode.is_testing || !plugin2.
|
|
73515
|
+
if (houdini_mode.is_testing || !plugin2.includeRuntime) {
|
|
73516
73516
|
return;
|
|
73517
73517
|
}
|
|
73518
73518
|
const runtime_path = path_exports.join(
|
|
73519
73519
|
path_exports.dirname(plugin2.filepath),
|
|
73520
|
-
typeof plugin2.
|
|
73520
|
+
typeof plugin2.includeRuntime === "string" ? plugin2.includeRuntime : plugin2.includeRuntime[config2.module]
|
|
73521
73521
|
);
|
|
73522
73522
|
try {
|
|
73523
73523
|
await fs_exports.stat(runtime_path);
|
|
@@ -73533,7 +73533,7 @@ async function generatePluginRuntime(config2, plugin2) {
|
|
|
73533
73533
|
runtime_path,
|
|
73534
73534
|
pluginDir,
|
|
73535
73535
|
Object.fromEntries(
|
|
73536
|
-
Object.entries(plugin2.
|
|
73536
|
+
Object.entries(plugin2.transformRuntime ?? {}).map(([key, value]) => [
|
|
73537
73537
|
path_exports.join(runtime_path, key),
|
|
73538
73538
|
(content) => value({ config: config2, content })
|
|
73539
73539
|
])
|
|
@@ -73927,7 +73927,7 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
73927
73927
|
const typePaths = [];
|
|
73928
73928
|
const fragmentDefinitions = {};
|
|
73929
73929
|
for (const document of docs) {
|
|
73930
|
-
for (const defn of document.
|
|
73930
|
+
for (const defn of document.originalParsed.definitions.filter(
|
|
73931
73931
|
({ kind }) => kind === "FragmentDefinition"
|
|
73932
73932
|
)) {
|
|
73933
73933
|
fragmentDefinitions[defn.name.value] = defn;
|
|
@@ -73935,47 +73935,54 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
73935
73935
|
}
|
|
73936
73936
|
const missingScalars = /* @__PURE__ */ new Set();
|
|
73937
73937
|
await Promise.all(
|
|
73938
|
-
docs.map(
|
|
73939
|
-
|
|
73940
|
-
|
|
73941
|
-
|
|
73942
|
-
|
|
73943
|
-
|
|
73944
|
-
|
|
73945
|
-
|
|
73946
|
-
|
|
73947
|
-
|
|
73948
|
-
|
|
73949
|
-
|
|
73950
|
-
|
|
73951
|
-
|
|
73952
|
-
|
|
73953
|
-
applyFragments: definition.kind === "OperationDefinition"
|
|
73954
|
-
});
|
|
73955
|
-
if (definition?.kind === "OperationDefinition") {
|
|
73956
|
-
await generateOperationTypeDefs(
|
|
73957
|
-
config2,
|
|
73958
|
-
filename,
|
|
73959
|
-
program3.body,
|
|
73960
|
-
definition,
|
|
73961
|
-
selections,
|
|
73962
|
-
visitedTypes,
|
|
73963
|
-
missingScalars
|
|
73964
|
-
);
|
|
73965
|
-
} else {
|
|
73966
|
-
await generateFragmentTypeDefs(
|
|
73967
|
-
config2,
|
|
73968
|
-
filename,
|
|
73969
|
-
program3.body,
|
|
73970
|
-
selections,
|
|
73971
|
-
originalDocument.definitions,
|
|
73972
|
-
visitedTypes,
|
|
73973
|
-
missingScalars
|
|
73938
|
+
docs.map(
|
|
73939
|
+
async ({
|
|
73940
|
+
originalParsed: originalDocument,
|
|
73941
|
+
name,
|
|
73942
|
+
filename,
|
|
73943
|
+
generateArtifact
|
|
73944
|
+
}) => {
|
|
73945
|
+
if (!generateArtifact) {
|
|
73946
|
+
return;
|
|
73947
|
+
}
|
|
73948
|
+
const typeDefPath = config2.artifactTypePath(originalDocument);
|
|
73949
|
+
const program3 = AST11.program([]);
|
|
73950
|
+
const visitedTypes = /* @__PURE__ */ new Set();
|
|
73951
|
+
let definition = originalDocument.definitions.find(
|
|
73952
|
+
(def) => (def.kind === "OperationDefinition" || def.kind === "FragmentDefinition") && def.name?.value === name
|
|
73974
73953
|
);
|
|
73954
|
+
const selections = flattenSelections({
|
|
73955
|
+
config: config2,
|
|
73956
|
+
filepath: filename,
|
|
73957
|
+
selections: definition.selectionSet.selections,
|
|
73958
|
+
fragmentDefinitions,
|
|
73959
|
+
applyFragments: definition.kind === "OperationDefinition"
|
|
73960
|
+
});
|
|
73961
|
+
if (definition?.kind === "OperationDefinition") {
|
|
73962
|
+
await generateOperationTypeDefs(
|
|
73963
|
+
config2,
|
|
73964
|
+
filename,
|
|
73965
|
+
program3.body,
|
|
73966
|
+
definition,
|
|
73967
|
+
selections,
|
|
73968
|
+
visitedTypes,
|
|
73969
|
+
missingScalars
|
|
73970
|
+
);
|
|
73971
|
+
} else {
|
|
73972
|
+
await generateFragmentTypeDefs(
|
|
73973
|
+
config2,
|
|
73974
|
+
filename,
|
|
73975
|
+
program3.body,
|
|
73976
|
+
selections,
|
|
73977
|
+
originalDocument.definitions,
|
|
73978
|
+
visitedTypes,
|
|
73979
|
+
missingScalars
|
|
73980
|
+
);
|
|
73981
|
+
}
|
|
73982
|
+
await fs_exports.writeFile(typeDefPath, recast11.print(program3).code);
|
|
73983
|
+
typePaths.push(typeDefPath);
|
|
73975
73984
|
}
|
|
73976
|
-
|
|
73977
|
-
typePaths.push(typeDefPath);
|
|
73978
|
-
})
|
|
73985
|
+
)
|
|
73979
73986
|
);
|
|
73980
73987
|
const typeIndex = AST11.program(
|
|
73981
73988
|
typePaths.sort((a, b) => a.localeCompare(b)).map((typePath) => {
|
|
@@ -73990,28 +73997,28 @@ async function generateDocumentTypes(config2, docs) {
|
|
|
73990
73997
|
AST11.exportAllDeclaration(AST11.literal("./graphql"), null)
|
|
73991
73998
|
])
|
|
73992
73999
|
);
|
|
73993
|
-
const
|
|
74000
|
+
const exportDefaultAs = ({ module, as }) => `
|
|
73994
74001
|
export { default as ${as} } from "${module}"
|
|
73995
74002
|
`;
|
|
73996
|
-
const
|
|
74003
|
+
const exportStarFrom2 = ({ module }) => `
|
|
73997
74004
|
export * from "${module}"
|
|
73998
74005
|
`;
|
|
73999
74006
|
let indexContent = recast11.print(typeIndex).code;
|
|
74000
74007
|
for (const plugin2 of config2.plugins) {
|
|
74001
|
-
if (!plugin2.
|
|
74008
|
+
if (!plugin2.indexFile) {
|
|
74002
74009
|
continue;
|
|
74003
74010
|
}
|
|
74004
|
-
indexContent = plugin2.
|
|
74011
|
+
indexContent = plugin2.indexFile({
|
|
74005
74012
|
config: config2,
|
|
74006
74013
|
content: indexContent,
|
|
74007
|
-
|
|
74008
|
-
|
|
74009
|
-
|
|
74014
|
+
exportDefaultAs,
|
|
74015
|
+
exportStarFrom: exportStarFrom2,
|
|
74016
|
+
pluginRoot: config2.pluginDirectory(plugin2.name),
|
|
74010
74017
|
typedef: true,
|
|
74011
74018
|
documents: docs
|
|
74012
74019
|
});
|
|
74013
|
-
if (plugin2.
|
|
74014
|
-
indexContent +=
|
|
74020
|
+
if (plugin2.includeRuntime) {
|
|
74021
|
+
indexContent += exportStarFrom2({
|
|
74015
74022
|
module: "./" + path_exports.relative(config2.rootDir, config2.pluginRuntimeDirectory(plugin2.name))
|
|
74016
74023
|
});
|
|
74017
74024
|
}
|
|
@@ -74258,10 +74265,10 @@ var graphql19 = __toESM(require_graphql2(), 1);
|
|
|
74258
74265
|
var recast12 = __toESM(require_main2(), 1);
|
|
74259
74266
|
var AST12 = recast12.types.builders;
|
|
74260
74267
|
async function imperativeCacheTypef(config2, docs) {
|
|
74261
|
-
const returnType = (doc) => config2.plugins.find((plugin2) => plugin2.
|
|
74268
|
+
const returnType = (doc) => config2.plugins.find((plugin2) => plugin2.graphqlTagReturn)?.graphqlTagReturn?.({
|
|
74262
74269
|
config: config2,
|
|
74263
74270
|
document: doc,
|
|
74264
|
-
|
|
74271
|
+
ensureImport({ identifier, module }) {
|
|
74265
74272
|
ensureImports({
|
|
74266
74273
|
config: config2,
|
|
74267
74274
|
body,
|
|
@@ -74632,27 +74639,30 @@ async function persistOutputGenerator(config2, docs) {
|
|
|
74632
74639
|
console.log("Can only write the queryMap to a json file");
|
|
74633
74640
|
return;
|
|
74634
74641
|
}
|
|
74635
|
-
const queryMap = docs.reduce(
|
|
74636
|
-
|
|
74637
|
-
|
|
74638
|
-
|
|
74639
|
-
|
|
74640
|
-
graphql20.
|
|
74641
|
-
|
|
74642
|
-
|
|
74643
|
-
|
|
74642
|
+
const queryMap = docs.reduce(
|
|
74643
|
+
(acc, { document, generateArtifact }) => {
|
|
74644
|
+
if (!generateArtifact) {
|
|
74645
|
+
return acc;
|
|
74646
|
+
}
|
|
74647
|
+
let rawString = graphql20.print(
|
|
74648
|
+
graphql20.visit(document, {
|
|
74649
|
+
Directive(node) {
|
|
74650
|
+
if (config2.isInternalDirective(node.name.value)) {
|
|
74651
|
+
return null;
|
|
74652
|
+
}
|
|
74644
74653
|
}
|
|
74645
|
-
}
|
|
74646
|
-
|
|
74647
|
-
|
|
74648
|
-
|
|
74649
|
-
|
|
74650
|
-
|
|
74651
|
-
|
|
74652
|
-
|
|
74653
|
-
|
|
74654
|
-
|
|
74655
|
-
|
|
74654
|
+
})
|
|
74655
|
+
);
|
|
74656
|
+
const operations = document.definitions.filter(
|
|
74657
|
+
({ kind }) => kind === graphql20.Kind.OPERATION_DEFINITION
|
|
74658
|
+
);
|
|
74659
|
+
if (operations.length > 0 && operations[0].kind === "OperationDefinition") {
|
|
74660
|
+
acc[hashDocument({ config: config2, document: rawString })] = rawString;
|
|
74661
|
+
}
|
|
74662
|
+
return acc;
|
|
74663
|
+
},
|
|
74664
|
+
{}
|
|
74665
|
+
);
|
|
74656
74666
|
if (Object.keys(queryMap).length === 0)
|
|
74657
74667
|
return;
|
|
74658
74668
|
await fs_exports.writeFile(config2.persistedQueryPath, JSON.stringify(queryMap, null, 4));
|
|
@@ -74721,32 +74731,32 @@ async function writeIndexFile2(config2, docs) {
|
|
|
74721
74731
|
const definitionsDir = relative2(config2.definitionsDirectory);
|
|
74722
74732
|
const cjs = config2.module === "commonjs";
|
|
74723
74733
|
let body = cjs ? cjsIndexFilePreamble : "";
|
|
74724
|
-
const
|
|
74725
|
-
const
|
|
74734
|
+
const exportStar = ({ module }) => "\n" + (cjs ? exportStarFrom(module) : `export * from "${module}"`) + "\n";
|
|
74735
|
+
const exportDefaultAs = ({ module, as }) => "\n" + (cjs ? exportDefaultFrom(module, as) : `export { default as ${as} } from "${module}"`) + "\n";
|
|
74726
74736
|
body += [
|
|
74727
|
-
|
|
74728
|
-
|
|
74729
|
-
|
|
74730
|
-
|
|
74737
|
+
exportStar({ module: "./" + path_exports.join(runtimeDir, "client") }),
|
|
74738
|
+
exportStar({ module: runtimeDir }),
|
|
74739
|
+
exportStar({ module: artifactDir }),
|
|
74740
|
+
exportStar({ module: definitionsDir })
|
|
74731
74741
|
].join("");
|
|
74732
74742
|
for (const plugin2 of config2.plugins) {
|
|
74733
|
-
if (plugin2.
|
|
74734
|
-
body = plugin2.
|
|
74743
|
+
if (plugin2.indexFile) {
|
|
74744
|
+
body = plugin2.indexFile({
|
|
74735
74745
|
config: config2,
|
|
74736
74746
|
content: body,
|
|
74737
|
-
|
|
74738
|
-
|
|
74739
|
-
|
|
74747
|
+
exportDefaultAs,
|
|
74748
|
+
exportStarFrom: exportStar,
|
|
74749
|
+
pluginRoot: config2.pluginDirectory(plugin2.name),
|
|
74740
74750
|
typedef: false,
|
|
74741
74751
|
documents: docs
|
|
74742
74752
|
});
|
|
74743
74753
|
}
|
|
74744
|
-
if (plugin2.
|
|
74745
|
-
body +=
|
|
74754
|
+
if (plugin2.includeRuntime) {
|
|
74755
|
+
body += exportStar({
|
|
74746
74756
|
module: relative2(config2.pluginRuntimeDirectory(plugin2.name))
|
|
74747
74757
|
});
|
|
74748
74758
|
}
|
|
74749
|
-
if (!plugin2.
|
|
74759
|
+
if (!plugin2.indexFile) {
|
|
74750
74760
|
continue;
|
|
74751
74761
|
}
|
|
74752
74762
|
}
|
|
@@ -75794,10 +75804,10 @@ async function runPipeline2(config2, docs) {
|
|
|
75794
75804
|
deleted: []
|
|
75795
75805
|
};
|
|
75796
75806
|
const generatePlugins = config2.plugins.filter((plugin2) => plugin2.generate);
|
|
75797
|
-
const
|
|
75807
|
+
const afterValidate = config2.plugins.filter((plugin2) => plugin2.afterValidate).map((plugin2) => plugin2.afterValidate);
|
|
75798
75808
|
const validate2 = config2.plugins.filter((plugin2) => plugin2.validate).map((plugin2) => plugin2.validate);
|
|
75799
|
-
const
|
|
75800
|
-
const
|
|
75809
|
+
const beforeValidate = config2.plugins.filter((plugin2) => plugin2.beforeValidate).map((plugin2) => plugin2.beforeValidate);
|
|
75810
|
+
const beforeGenerate = config2.plugins.filter((plugin2) => plugin2.beforeGenerate).map((plugin2) => plugin2.beforeGenerate);
|
|
75801
75811
|
const wrapHook = (hooks) => hooks.map(
|
|
75802
75812
|
(fn) => (config3, docs2) => fn({
|
|
75803
75813
|
config: config3,
|
|
@@ -75810,20 +75820,20 @@ async function runPipeline2(config2, docs) {
|
|
|
75810
75820
|
config2,
|
|
75811
75821
|
[
|
|
75812
75822
|
graphqlExtensions,
|
|
75813
|
-
...wrapHook(
|
|
75823
|
+
...wrapHook(beforeValidate),
|
|
75814
75824
|
typeCheck,
|
|
75815
75825
|
uniqueDocumentNames,
|
|
75816
75826
|
noIDAlias,
|
|
75817
75827
|
validatePlugins,
|
|
75818
75828
|
...wrapHook(validate2),
|
|
75819
|
-
...wrapHook(
|
|
75829
|
+
...wrapHook(afterValidate),
|
|
75820
75830
|
addID,
|
|
75821
75831
|
addTypename,
|
|
75822
75832
|
addListFragments,
|
|
75823
75833
|
paginate,
|
|
75824
75834
|
fragmentVariables,
|
|
75825
75835
|
includeFragmentDefinitions,
|
|
75826
|
-
...wrapHook(
|
|
75836
|
+
...wrapHook(beforeGenerate),
|
|
75827
75837
|
artifactGenerator(artifactStats),
|
|
75828
75838
|
runtimeGenerator,
|
|
75829
75839
|
writeIndexFile2,
|
|
@@ -75834,14 +75844,13 @@ async function runPipeline2(config2, docs) {
|
|
|
75834
75844
|
(plugin2) => async (config3, docs2) => await plugin2.generate({
|
|
75835
75845
|
config: config3,
|
|
75836
75846
|
documents: docs2,
|
|
75837
|
-
|
|
75847
|
+
pluginRoot: config3.pluginDirectory(plugin2.name)
|
|
75838
75848
|
})
|
|
75839
75849
|
)
|
|
75840
75850
|
],
|
|
75841
75851
|
docs
|
|
75842
75852
|
);
|
|
75843
75853
|
} catch (e2) {
|
|
75844
|
-
console.log(e2);
|
|
75845
75854
|
error = e2;
|
|
75846
75855
|
}
|
|
75847
75856
|
const unchanged = artifactStats.total.length - artifactStats.changed.length - artifactStats.new.length - artifactStats.deleted.length;
|
|
@@ -75891,9 +75900,9 @@ async function collectDocuments(config2) {
|
|
|
75891
75900
|
".ts": []
|
|
75892
75901
|
};
|
|
75893
75902
|
for (const plugin2 of config2.plugins) {
|
|
75894
|
-
if (plugin2.extensions && plugin2.
|
|
75903
|
+
if (plugin2.extensions && plugin2.extractDocuments) {
|
|
75895
75904
|
for (const extension of plugin2.extensions) {
|
|
75896
|
-
extractors[extension] = [...extractors[extension] || [], plugin2.
|
|
75905
|
+
extractors[extension] = [...extractors[extension] || [], plugin2.extractDocuments];
|
|
75897
75906
|
}
|
|
75898
75907
|
}
|
|
75899
75908
|
}
|
|
@@ -75992,7 +76001,7 @@ async function processGraphQLDocument(config2, filepath, document) {
|
|
|
75992
76001
|
kind,
|
|
75993
76002
|
document: parsedDoc,
|
|
75994
76003
|
filename: filepath,
|
|
75995
|
-
|
|
76004
|
+
originalParsed: parsedDoc,
|
|
75996
76005
|
generateArtifact: true,
|
|
75997
76006
|
generateStore: true,
|
|
75998
76007
|
originalString: document,
|
|
@@ -76476,8 +76485,8 @@ async function updatePackageJSON(targetPath) {
|
|
|
76476
76485
|
}
|
|
76477
76486
|
packageJSON.devDependencies = {
|
|
76478
76487
|
...packageJSON.devDependencies,
|
|
76479
|
-
houdini: "^1.0.0-next.
|
|
76480
|
-
"houdini-svelte": "^1.0.0-next.
|
|
76488
|
+
houdini: "^1.0.0-next.7",
|
|
76489
|
+
"houdini-svelte": "^1.0.0-next.7"
|
|
76481
76490
|
};
|
|
76482
76491
|
await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
|
|
76483
76492
|
}
|