@sanity/cli 3.72.1-corel.567 → 3.72.1
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/lib/_chunks-cjs/cli.js +33 -25
- package/lib/_chunks-cjs/cli.js.map +1 -1
- package/package.json +7 -7
package/lib/_chunks-cjs/cli.js
CHANGED
@@ -37615,7 +37615,7 @@ function requireLib$1() {
|
|
37615
37615
|
StrictWith: "'with' in strict mode."
|
37616
37616
|
};
|
37617
37617
|
const UnparenthesizedPipeBodyDescriptions = /* @__PURE__ */ new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]);
|
37618
|
-
var PipelineOperatorErrors = {
|
37618
|
+
var PipelineOperatorErrors = Object.assign({
|
37619
37619
|
PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",
|
37620
37620
|
PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',
|
37621
37621
|
PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.",
|
@@ -37627,14 +37627,15 @@ function requireLib$1() {
|
|
37627
37627
|
type: type2
|
37628
37628
|
}) => `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({
|
37629
37629
|
type: type2
|
37630
|
-
})}; please wrap it in parentheses
|
37630
|
+
})}; please wrap it in parentheses.`
|
37631
|
+
}, {
|
37631
37632
|
PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
|
37632
37633
|
PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",
|
37633
37634
|
PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",
|
37634
37635
|
PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",
|
37635
37636
|
PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
|
37636
37637
|
PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'
|
37637
|
-
};
|
37638
|
+
});
|
37638
37639
|
const _excluded = ["message"];
|
37639
37640
|
function defineHidden(obj, key2, value) {
|
37640
37641
|
Object.defineProperty(obj, key2, {
|
@@ -37858,7 +37859,7 @@ function requireLib$1() {
|
|
37858
37859
|
const {
|
37859
37860
|
typeParameters
|
37860
37861
|
} = node;
|
37861
|
-
return typeParameters && (delete node.typeParameters, funcNode.typeParameters = typeParameters, funcNode
|
37862
|
+
return typeParameters && (delete node.typeParameters, funcNode.typeParameters = typeParameters, this.resetStartLocationFromNode(funcNode, typeParameters)), type2 === "ClassPrivateMethod" && (node.computed = !1), this.finishNode(node, "MethodDefinition");
|
37862
37863
|
}
|
37863
37864
|
nameIsConstructor(key2) {
|
37864
37865
|
return key2.type === "Literal" ? key2.value === "constructor" : super.nameIsConstructor(key2);
|
@@ -42776,19 +42777,28 @@ function requireLib$1() {
|
|
42776
42777
|
}
|
42777
42778
|
tsParseImportType() {
|
42778
42779
|
const node = this.startNode();
|
42779
|
-
return this.expect(83), this.expect(10), this.match(134) ? node.argument = this.parseStringLiteral(this.state.value) : (this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc), node.argument = super.parseExprAtom()), this.eat(12) && !this.match(11) ? (node.options = super.parseMaybeAssignAllowIn(), this.eat(12)) : node.options = null, this.expect(11), this.eat(16) && (node.qualifier = this.tsParseEntityName()), this.match(47) && (node.typeParameters = this.tsParseTypeArguments()), this.finishNode(node, "TSImportType");
|
42780
|
+
return this.expect(83), this.expect(10), this.match(134) ? node.argument = this.parseStringLiteral(this.state.value) : (this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc), node.argument = super.parseExprAtom()), this.eat(12) && !this.match(11) ? (node.options = super.parseMaybeAssignAllowIn(), this.eat(12)) : node.options = null, this.expect(11), this.eat(16) && (node.qualifier = this.tsParseEntityName(3)), this.match(47) && (node.typeParameters = this.tsParseTypeArguments()), this.finishNode(node, "TSImportType");
|
42780
42781
|
}
|
42781
|
-
tsParseEntityName(
|
42782
|
-
let entity
|
42782
|
+
tsParseEntityName(flags) {
|
42783
|
+
let entity;
|
42784
|
+
if (flags & 1 && this.match(78))
|
42785
|
+
if (flags & 2)
|
42786
|
+
entity = this.parseIdentifier(!0);
|
42787
|
+
else {
|
42788
|
+
const node = this.startNode();
|
42789
|
+
this.next(), entity = this.finishNode(node, "ThisExpression");
|
42790
|
+
}
|
42791
|
+
else
|
42792
|
+
entity = this.parseIdentifier(!!(flags & 1));
|
42783
42793
|
for (; this.eat(16); ) {
|
42784
42794
|
const node = this.startNodeAtNode(entity);
|
42785
|
-
node.left = entity, node.right = this.parseIdentifier(
|
42795
|
+
node.left = entity, node.right = this.parseIdentifier(!!(flags & 1)), entity = this.finishNode(node, "TSQualifiedName");
|
42786
42796
|
}
|
42787
42797
|
return entity;
|
42788
42798
|
}
|
42789
42799
|
tsParseTypeReference() {
|
42790
42800
|
const node = this.startNode();
|
42791
|
-
return node.typeName = this.tsParseEntityName(), !this.hasPrecedingLineBreak() && this.match(47) && (node.typeParameters = this.tsParseTypeArguments()), this.finishNode(node, "TSTypeReference");
|
42801
|
+
return node.typeName = this.tsParseEntityName(1), !this.hasPrecedingLineBreak() && this.match(47) && (node.typeParameters = this.tsParseTypeArguments()), this.finishNode(node, "TSTypeReference");
|
42792
42802
|
}
|
42793
42803
|
tsParseThisTypePredicate(lhs) {
|
42794
42804
|
this.next();
|
@@ -42801,7 +42811,7 @@ function requireLib$1() {
|
|
42801
42811
|
}
|
42802
42812
|
tsParseTypeQuery() {
|
42803
42813
|
const node = this.startNode();
|
42804
|
-
return this.expect(87), this.match(83) ? node.exprName = this.tsParseImportType() : node.exprName = this.tsParseEntityName(), !this.hasPrecedingLineBreak() && this.match(47) && (node.typeParameters = this.tsParseTypeArguments()), this.finishNode(node, "TSTypeQuery");
|
42814
|
+
return this.expect(87), this.match(83) ? node.exprName = this.tsParseImportType() : node.exprName = this.tsParseEntityName(3), !this.hasPrecedingLineBreak() && this.match(47) && (node.typeParameters = this.tsParseTypeArguments()), this.finishNode(node, "TSTypeQuery");
|
42805
42815
|
}
|
42806
42816
|
tsParseTypeParameter(parseModifiers) {
|
42807
42817
|
const node = this.startNode();
|
@@ -43187,7 +43197,7 @@ function requireLib$1() {
|
|
43187
43197
|
tsParseHeritageClause(token2) {
|
43188
43198
|
const originalStartLoc = this.state.startLoc, delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => {
|
43189
43199
|
const node = this.startNode();
|
43190
|
-
return node.expression = this.tsParseEntityName(), this.match(47) && (node.typeParameters = this.tsParseTypeArguments()), this.finishNode(node, "TSExpressionWithTypeArguments");
|
43200
|
+
return node.expression = this.tsParseEntityName(3), this.match(47) && (node.typeParameters = this.tsParseTypeArguments()), this.finishNode(node, "TSExpressionWithTypeArguments");
|
43191
43201
|
});
|
43192
43202
|
return delimitedList.length || this.raise(TSErrors.EmptyHeritageClauseType, originalStartLoc, {
|
43193
43203
|
token: token2
|
@@ -43292,7 +43302,7 @@ function requireLib$1() {
|
|
43292
43302
|
return this.isContextual(119) && this.lookaheadCharCode() === 40;
|
43293
43303
|
}
|
43294
43304
|
tsParseModuleReference() {
|
43295
|
-
return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(
|
43305
|
+
return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(0);
|
43296
43306
|
}
|
43297
43307
|
tsParseExternalModuleReference() {
|
43298
43308
|
const node = this.startNode();
|
@@ -44410,15 +44420,15 @@ function requireLib$1() {
|
|
44410
44420
|
switch (this.getPluginOption("pipelineOperator", "proposal")) {
|
44411
44421
|
case "hack":
|
44412
44422
|
return this.withTopicBindingContext(() => this.parseHackPipeBody());
|
44413
|
-
case "smart":
|
44414
|
-
return this.withTopicBindingContext(() => {
|
44415
|
-
if (this.prodParam.hasYield && this.isContextual(108))
|
44416
|
-
throw this.raise(Errors.PipeBodyIsTighter, this.state.startLoc);
|
44417
|
-
return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startLoc);
|
44418
|
-
});
|
44419
44423
|
case "fsharp":
|
44420
44424
|
return this.withSoloAwaitPermittingContext(() => this.parseFSharpPipelineBody(prec));
|
44421
44425
|
}
|
44426
|
+
if (this.getPluginOption("pipelineOperator", "proposal") === "smart")
|
44427
|
+
return this.withTopicBindingContext(() => {
|
44428
|
+
if (this.prodParam.hasYield && this.isContextual(108))
|
44429
|
+
throw this.raise(Errors.PipeBodyIsTighter, this.state.startLoc);
|
44430
|
+
return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startLoc);
|
44431
|
+
});
|
44422
44432
|
default:
|
44423
44433
|
return this.parseExprOpBaseRightExpr(op, prec);
|
44424
44434
|
}
|
@@ -44704,13 +44714,11 @@ function requireLib$1() {
|
|
44704
44714
|
return this.next(), this.finishTopicReference(node, startLoc, pipeProposal, tokenType);
|
44705
44715
|
}
|
44706
44716
|
finishTopicReference(node, startLoc, pipeProposal, tokenType) {
|
44707
|
-
if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType))
|
44708
|
-
|
44709
|
-
|
44710
|
-
|
44711
|
-
|
44712
|
-
token: tokenLabelName(tokenType)
|
44713
|
-
});
|
44717
|
+
if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType))
|
44718
|
+
return pipeProposal === "hack" ? (this.topicReferenceIsAllowedInCurrentContext() || this.raise(Errors.PipeTopicUnbound, startLoc), this.registerTopicReference(), this.finishNode(node, "TopicReference")) : (this.topicReferenceIsAllowedInCurrentContext() || this.raise(Errors.PrimaryTopicNotAllowed, startLoc), this.registerTopicReference(), this.finishNode(node, "PipelinePrimaryTopicReference"));
|
44719
|
+
throw this.raise(Errors.PipeTopicUnconfiguredToken, startLoc, {
|
44720
|
+
token: tokenLabelName(tokenType)
|
44721
|
+
});
|
44714
44722
|
}
|
44715
44723
|
testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType) {
|
44716
44724
|
switch (pipeProposal) {
|