@osdk/cli 0.26.0-beta.2 → 0.26.0-beta.21
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/CHANGELOG.md +63 -0
- package/build/esm/{acorn-LQZJTRX7.js → acorn-6J2XFAF2.js} +33 -34
- package/build/esm/{acorn-LQZJTRX7.js.map → acorn-6J2XFAF2.js.map} +1 -1
- package/build/esm/{angular-VWUX447C.js → angular-FXKB67LX.js} +11 -11
- package/build/esm/{angular-VWUX447C.js.map → angular-FXKB67LX.js.map} +1 -1
- package/build/esm/{babel-7BWEVLBS.js → babel-P3PJ67NT.js} +67 -67
- package/build/esm/{babel-7BWEVLBS.js.map → babel-P3PJ67NT.js.map} +1 -1
- package/build/esm/{chunk-LR3YBME3.js → chunk-FNSPUDYX.js} +10 -10
- package/build/esm/{chunk-LR3YBME3.js.map → chunk-FNSPUDYX.js.map} +1 -1
- package/build/esm/{chunk-KHVWTBWA.js → chunk-G4YHZ22X.js} +8 -8
- package/build/esm/{chunk-KHVWTBWA.js.map → chunk-G4YHZ22X.js.map} +1 -1
- package/build/esm/{chunk-GVZBRYRL.js → chunk-GMSFWYOD.js} +3 -3
- package/build/esm/{chunk-GVZBRYRL.js.map → chunk-GMSFWYOD.js.map} +1 -1
- package/build/esm/{chunk-DMUWBIYY.js → chunk-HRFGJCX3.js} +4 -4
- package/build/esm/{chunk-DMUWBIYY.js.map → chunk-HRFGJCX3.js.map} +1 -1
- package/build/esm/{chunk-SAOPV5FF.js → chunk-MX6IUHH6.js} +3 -3
- package/build/esm/{chunk-SAOPV5FF.js.map → chunk-MX6IUHH6.js.map} +1 -1
- package/build/esm/{chunk-KXNCVDQG.js → chunk-SB26PVZG.js} +11 -11
- package/build/esm/{chunk-KXNCVDQG.js.map → chunk-SB26PVZG.js.map} +1 -1
- package/build/esm/{chunk-PXU2ECCD.js → chunk-WID24PKG.js} +23 -16
- package/build/esm/chunk-WID24PKG.js.map +1 -0
- package/build/esm/{chunk-HCWMXOMI.js → chunk-WJJGFC5B.js} +5 -4
- package/build/esm/chunk-WJJGFC5B.js.map +1 -0
- package/build/esm/{chunk-3XCF7EHX.js → chunk-YW7LQXZX.js} +47 -65
- package/build/esm/chunk-YW7LQXZX.js.map +1 -0
- package/build/esm/{estree-PI6JMQNR.js → estree-YZZ76ZCZ.js} +102 -118
- package/build/esm/{estree-PI6JMQNR.js.map → estree-YZZ76ZCZ.js.map} +1 -1
- package/build/esm/find-up-J6UG2A4A.js +4 -0
- package/build/esm/{find-up-QYNPYSRQ.js.map → find-up-J6UG2A4A.js.map} +1 -1
- package/build/esm/{flow-AP4DEOL5.js → flow-FLMB2WRS.js} +14 -14
- package/build/esm/{flow-AP4DEOL5.js.map → flow-FLMB2WRS.js.map} +1 -1
- package/build/esm/{glimmer-LM2ZFC5U.js → glimmer-QTYNZR7I.js} +53 -53
- package/build/esm/{glimmer-LM2ZFC5U.js.map → glimmer-QTYNZR7I.js.map} +1 -1
- package/build/esm/{graphql-U5CPDQKQ.js → graphql-RJWZIGAD.js} +22 -57
- package/build/esm/graphql-RJWZIGAD.js.map +1 -0
- package/build/esm/{handleGenerate-WWXANW5U.js → handleGenerate-SJCGFNLM.js} +364 -346
- package/build/esm/handleGenerate-SJCGFNLM.js.map +1 -0
- package/build/esm/{html-FNGHE355.js → html-CASQPPRX.js} +37 -66
- package/build/esm/html-CASQPPRX.js.map +1 -0
- package/build/esm/index.js +24 -24
- package/build/esm/index.js.map +1 -1
- package/build/esm/loginFlow-UZUROTUU.js +4 -0
- package/build/esm/{loginFlow-ESPJDVBX.js.map → loginFlow-UZUROTUU.js.map} +1 -1
- package/build/esm/{markdown-HUHOYR5Q.js → markdown-SVGJ3QZI.js} +49 -69
- package/build/esm/{markdown-HUHOYR5Q.js.map → markdown-SVGJ3QZI.js.map} +1 -1
- package/build/esm/{meriyah-WP7UQXC7.js → meriyah-YDXWEWLV.js} +36 -36
- package/build/esm/{meriyah-WP7UQXC7.js.map → meriyah-YDXWEWLV.js.map} +1 -1
- package/build/esm/{postcss-JMNG34CL.js → postcss-BBOQTN3X.js} +79 -115
- package/build/esm/{postcss-JMNG34CL.js.map → postcss-BBOQTN3X.js.map} +1 -1
- package/build/esm/{siteDeployCommand-MPU32NSO.js → siteDeployCommand-YLTZ3EMA.js} +60 -14
- package/build/esm/siteDeployCommand-YLTZ3EMA.js.map +1 -0
- package/build/esm/{typescript-A4QI3FB6.js → typescript-JGKMLQMS.js} +670 -668
- package/build/esm/{typescript-A4QI3FB6.js.map → typescript-JGKMLQMS.js.map} +1 -1
- package/build/esm/versionDeleteCommand-B7NYU34P.js +37 -0
- package/build/esm/versionDeleteCommand-B7NYU34P.js.map +1 -0
- package/build/esm/{versionDeleteCommand-DGFC2RVA.js → versionDeleteCommand-X6MIOXJX.js} +9 -8
- package/build/esm/versionDeleteCommand-X6MIOXJX.js.map +1 -0
- package/build/esm/{versionGetCommand-GAS2KI7X.js → versionGetCommand-O3YYZH2S.js} +6 -6
- package/build/esm/{versionGetCommand-GAS2KI7X.js.map → versionGetCommand-O3YYZH2S.js.map} +1 -1
- package/build/esm/{versionInfoCommand-D2I45O6W.js → versionInfoCommand-BWKY7FTE.js} +7 -7
- package/build/esm/versionInfoCommand-BWKY7FTE.js.map +1 -0
- package/build/esm/{versionListCommand-FOLF3MQJ.js → versionListCommand-6FLSCXT3.js} +9 -9
- package/build/esm/versionListCommand-6FLSCXT3.js.map +1 -0
- package/build/esm/{versionListCommand-LOJCLRAG.js → versionListCommand-J5XHJPFM.js} +6 -6
- package/build/esm/{versionListCommand-LOJCLRAG.js.map → versionListCommand-J5XHJPFM.js.map} +1 -1
- package/build/esm/{versionSetCommand-3PPJLHJU.js → versionSetCommand-IO56CZ7N.js} +6 -6
- package/build/esm/{versionSetCommand-3PPJLHJU.js.map → versionSetCommand-IO56CZ7N.js.map} +1 -1
- package/build/esm/{versionUnsetCommand-7A4RM25B.js → versionUnsetCommand-CBISKVJV.js} +9 -8
- package/build/esm/versionUnsetCommand-CBISKVJV.js.map +1 -0
- package/build/esm/{widgetSetDeployCommand-VLVRA7AB.js → widgetSetDeployCommand-K4ECXH3H.js} +13 -22
- package/build/esm/widgetSetDeployCommand-K4ECXH3H.js.map +1 -0
- package/build/esm/{yaml-IT3UOTAK.js → yaml-C7WVEV2M.js} +50 -63
- package/build/esm/yaml-C7WVEV2M.js.map +1 -0
- package/build/types/commands/site/deploy/index.d.ts.map +1 -1
- package/build/types/commands/site/deploy/siteDeployCommand.d.mts.map +1 -1
- package/build/types/commands/site/version/delete/versionDeleteCommand.d.mts.map +1 -1
- package/build/types/commands/site/version/get/versionGetCommand.d.mts.map +1 -1
- package/build/types/commands/site/version/list/versionListCommand.d.mts.map +1 -1
- package/build/types/commands/site/version/set/versionSetCommand.d.mts.map +1 -1
- package/build/types/commands/site/version/unset/versionUnsetCommand.d.mts.map +1 -1
- package/build/types/commands/widgetset/deploy/widgetSetDeployCommand.d.mts.map +1 -1
- package/build/types/commands/widgetset/version/delete/versionDeleteCommand.d.mts.map +1 -1
- package/build/types/commands/widgetset/version/info/versionInfoCommand.d.mts.map +1 -1
- package/build/types/commands/widgetset/version/list/versionListCommand.d.mts.map +1 -1
- package/build/types/consola/handlePromptCancel.d.ts.map +1 -1
- package/build/types/net/createFetch.d.mts.map +1 -1
- package/build/types/net/third-party-applications/index.d.mts +4 -4
- package/build/types/net/third-party-applications/index.d.mts.map +1 -1
- package/build/types/net/widget-registry/ListReleasesResponse.d.mts +5 -0
- package/build/types/net/widget-registry/ListReleasesResponse.d.mts.map +1 -0
- package/build/types/net/widget-registry/Release.d.mts +8 -0
- package/build/types/net/widget-registry/Release.d.mts.map +1 -0
- package/build/types/net/widget-registry/ReleaseLocator.d.mts +6 -0
- package/build/types/net/widget-registry/ReleaseLocator.d.mts.map +1 -0
- package/build/types/net/widget-registry/deleteRelease.d.mts +3 -0
- package/build/types/net/widget-registry/deleteRelease.d.mts.map +1 -0
- package/build/types/net/widget-registry/getRelease.d.mts +4 -0
- package/build/types/net/widget-registry/getRelease.d.mts.map +1 -0
- package/build/types/net/widget-registry/index.d.mts +7 -8
- package/build/types/net/widget-registry/index.d.mts.map +1 -1
- package/build/types/net/widget-registry/listReleases.d.mts +4 -0
- package/build/types/net/widget-registry/listReleases.d.mts.map +1 -0
- package/build/types/net/widget-registry/publishRelease.d.mts +4 -0
- package/build/types/net/widget-registry/publishRelease.d.mts.map +1 -0
- package/build/types/util/maybeUpdateJemmaCustomMetadata.d.ts +17 -0
- package/build/types/util/maybeUpdateJemmaCustomMetadata.d.ts.map +1 -0
- package/build/types/util/maybeUpdateJemmaCustomMetadata.test.d.ts +1 -0
- package/build/types/util/maybeUpdateJemmaCustomMetadata.test.d.ts.map +1 -0
- package/package.json +9 -9
- package/build/esm/chunk-3XCF7EHX.js.map +0 -1
- package/build/esm/chunk-HCWMXOMI.js.map +0 -1
- package/build/esm/chunk-PXU2ECCD.js.map +0 -1
- package/build/esm/find-up-QYNPYSRQ.js +0 -4
- package/build/esm/graphql-U5CPDQKQ.js.map +0 -1
- package/build/esm/handleGenerate-WWXANW5U.js.map +0 -1
- package/build/esm/html-FNGHE355.js.map +0 -1
- package/build/esm/loginFlow-ESPJDVBX.js +0 -4
- package/build/esm/siteDeployCommand-MPU32NSO.js.map +0 -1
- package/build/esm/versionDeleteCommand-DGFC2RVA.js.map +0 -1
- package/build/esm/versionDeleteCommand-YZVRSZFQ.js +0 -58
- package/build/esm/versionDeleteCommand-YZVRSZFQ.js.map +0 -1
- package/build/esm/versionInfoCommand-D2I45O6W.js.map +0 -1
- package/build/esm/versionListCommand-FOLF3MQJ.js.map +0 -1
- package/build/esm/versionUnsetCommand-7A4RM25B.js.map +0 -1
- package/build/esm/widgetSetDeployCommand-VLVRA7AB.js.map +0 -1
- package/build/esm/yaml-IT3UOTAK.js.map +0 -1
- package/build/types/net/widget-registry/ListWidgetSetReleasesResponse.d.mts +0 -5
- package/build/types/net/widget-registry/ListWidgetSetReleasesResponse.d.mts.map +0 -1
- package/build/types/net/widget-registry/WidgetSetLocator.d.mts +0 -16
- package/build/types/net/widget-registry/WidgetSetLocator.d.mts.map +0 -1
- package/build/types/net/widget-registry/WidgetSetRelease.d.mts +0 -13
- package/build/types/net/widget-registry/WidgetSetRelease.d.mts.map +0 -1
- package/build/types/net/widget-registry/deleteSiteVersion.d.mts +0 -4
- package/build/types/net/widget-registry/deleteSiteVersion.d.mts.map +0 -1
- package/build/types/net/widget-registry/deleteWidgetSetRelease.d.mts +0 -3
- package/build/types/net/widget-registry/deleteWidgetSetRelease.d.mts.map +0 -1
- package/build/types/net/widget-registry/getWidgetSetRelease.d.mts +0 -4
- package/build/types/net/widget-registry/getWidgetSetRelease.d.mts.map +0 -1
- package/build/types/net/widget-registry/listWidgetSetReleases.d.mts +0 -4
- package/build/types/net/widget-registry/listWidgetSetReleases.d.mts.map +0 -1
- package/build/types/net/widget-registry/publishManifest.d.mts +0 -4
- package/build/types/net/widget-registry/publishManifest.d.mts.map +0 -1
- package/build/types/net/widget-registry/uploadSiteVersion.d.mts +0 -4
- package/build/types/net/widget-registry/uploadSiteVersion.d.mts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { init_esm_shims } from './chunk-
|
|
1
|
+
import { init_esm_shims } from './chunk-HRFGJCX3.js';
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/.pnpm/prettier@3.2.5/node_modules/prettier/plugins/estree.mjs
|
|
4
4
|
init_esm_shims();
|
|
@@ -139,11 +139,11 @@ var $s = [{
|
|
|
139
139
|
aceMode: "javascript",
|
|
140
140
|
codemirrorMode: "jsx",
|
|
141
141
|
codemirrorMimeType: "text/jsx",
|
|
142
|
-
color:
|
|
143
|
-
aliases:
|
|
142
|
+
color: void 0,
|
|
143
|
+
aliases: void 0,
|
|
144
144
|
extensions: [".jsx"],
|
|
145
|
-
filenames:
|
|
146
|
-
interpreters:
|
|
145
|
+
filenames: void 0,
|
|
146
|
+
interpreters: void 0,
|
|
147
147
|
parsers: ["babel", "babel-flow", "babel-ts", "flow", "typescript", "espree", "meriyah"],
|
|
148
148
|
vscodeLanguageIds: ["javascriptreact"],
|
|
149
149
|
group: "JavaScript"
|
|
@@ -339,12 +339,12 @@ function ao(e, t) {
|
|
|
339
339
|
var at = ao;
|
|
340
340
|
function j(e) {
|
|
341
341
|
var n, s, u;
|
|
342
|
-
let t = ((n = e.range) == null ?
|
|
342
|
+
let t = ((n = e.range) == null ? void 0 : n[0]) ?? e.start, r = (u = ((s = e.declaration) == null ? void 0 : s.decorators) ?? e.decorators) == null ? void 0 : u[0];
|
|
343
343
|
return r ? Math.min(j(r), t) : t;
|
|
344
344
|
}
|
|
345
345
|
function I(e) {
|
|
346
346
|
var t;
|
|
347
|
-
return ((t = e.range) == null ?
|
|
347
|
+
return ((t = e.range) == null ? void 0 : t[1]) ?? e.end;
|
|
348
348
|
}
|
|
349
349
|
function gt(e, t) {
|
|
350
350
|
let r = j(e);
|
|
@@ -697,7 +697,7 @@ var lo = Sr(au);
|
|
|
697
697
|
var Br = lo;
|
|
698
698
|
function mo(e) {
|
|
699
699
|
let t = new Set(e);
|
|
700
|
-
return (r) => t.has(r == null ?
|
|
700
|
+
return (r) => t.has(r == null ? void 0 : r.type);
|
|
701
701
|
}
|
|
702
702
|
var M = mo;
|
|
703
703
|
var Do = M(["Block", "CommentBlock", "MultiLine"]);
|
|
@@ -806,7 +806,7 @@ function St(e, t) {
|
|
|
806
806
|
} else if ((e.arguments.length === 2 || e.arguments.length === 3) && (e.arguments[0].type === "TemplateLiteral" || te(e.arguments[0])) && go(e.callee)) return e.arguments[2] && !Pe(e.arguments[2]) ? false : (e.arguments.length === 2 ? Mt(e.arguments[1]) : Co(e.arguments[1]) && $(e.arguments[1]).length <= 1) || _n(e.arguments[1]);
|
|
807
807
|
return false;
|
|
808
808
|
}
|
|
809
|
-
var fu = (e) => (t) => ((t == null ?
|
|
809
|
+
var fu = (e) => (t) => ((t == null ? void 0 : t.type) === "ChainExpression" && (t = t.expression), e(t));
|
|
810
810
|
var w = fu(M(["CallExpression", "OptionalCallExpression"]));
|
|
811
811
|
var q = fu(M(["MemberExpression", "OptionalMemberExpression"]));
|
|
812
812
|
function Eu(e) {
|
|
@@ -920,7 +920,7 @@ function be(e, t = 2) {
|
|
|
920
920
|
}
|
|
921
921
|
function De(e) {
|
|
922
922
|
var t;
|
|
923
|
-
return ((t = e.extra) == null ?
|
|
923
|
+
return ((t = e.extra) == null ? void 0 : t.raw) ?? e.raw;
|
|
924
924
|
}
|
|
925
925
|
function du(e) {
|
|
926
926
|
return e;
|
|
@@ -993,7 +993,7 @@ function xu(e) {
|
|
|
993
993
|
var r;
|
|
994
994
|
if (e.rest) return true;
|
|
995
995
|
let t = $(e);
|
|
996
|
-
return ((r = v(false, t, -1)) == null ?
|
|
996
|
+
return ((r = v(false, t, -1)) == null ? void 0 : r.type) === "RestElement";
|
|
997
997
|
}
|
|
998
998
|
var Mn = /* @__PURE__ */ new WeakMap();
|
|
999
999
|
function $(e) {
|
|
@@ -1036,7 +1036,7 @@ function ir(e) {
|
|
|
1036
1036
|
return e.value.trim() === "prettier-ignore" && !e.unignore;
|
|
1037
1037
|
}
|
|
1038
1038
|
function Bt(e) {
|
|
1039
|
-
return (e == null ?
|
|
1039
|
+
return (e == null ? void 0 : e.prettierIgnore) || A(e, x.PrettierIgnore);
|
|
1040
1040
|
}
|
|
1041
1041
|
var x = {
|
|
1042
1042
|
Leading: 2,
|
|
@@ -1052,12 +1052,12 @@ var hu = (e, t) => {
|
|
|
1052
1052
|
if (typeof e == "function" && (t = e, e = 0), e || t) return (r, n, s) => !(e & x.Leading && !r.leading || e & x.Trailing && !r.trailing || e & x.Dangling && (r.leading || r.trailing) || e & x.Block && !ee(r) || e & x.Line && !Rt(r) || e & x.First && n !== 0 || e & x.Last && n !== s.length - 1 || e & x.PrettierIgnore && !ir(r) || t && !t(r));
|
|
1053
1053
|
};
|
|
1054
1054
|
function A(e, t, r) {
|
|
1055
|
-
if (!L(e == null ?
|
|
1055
|
+
if (!L(e == null ? void 0 : e.comments)) return false;
|
|
1056
1056
|
let n = hu(t, r);
|
|
1057
1057
|
return n ? e.comments.some(n) : true;
|
|
1058
1058
|
}
|
|
1059
1059
|
function ot(e, t, r) {
|
|
1060
|
-
if (!Array.isArray(e == null ?
|
|
1060
|
+
if (!Array.isArray(e == null ? void 0 : e.comments)) return [];
|
|
1061
1061
|
let n = hu(t, r);
|
|
1062
1062
|
return n ? e.comments.filter(n) : e.comments;
|
|
1063
1063
|
}
|
|
@@ -1084,7 +1084,7 @@ function Su(e, t, r) {
|
|
|
1084
1084
|
type: i,
|
|
1085
1085
|
expression: a
|
|
1086
1086
|
} of t.children) i === "JSXExpressionContainer" && a.type === "TemplateLiteral" && qt(a);
|
|
1087
|
-
e.type === "JSXAttribute" && e.name.name === "css" && e.value.type === "JSXExpressionContainer" && e.value.expression.type === "TemplateLiteral" && qt(t.value.expression), e.type === "JSXAttribute" && ((s = e.value) == null ?
|
|
1087
|
+
e.type === "JSXAttribute" && e.name.name === "css" && e.value.type === "JSXExpressionContainer" && e.value.expression.type === "TemplateLiteral" && qt(t.value.expression), e.type === "JSXAttribute" && ((s = e.value) == null ? void 0 : s.type) === "Literal" && /["']|"|'/.test(e.value.value) && (t.value.value = H(false, t.value.value, /["']|"|'/g, '"'));
|
|
1088
1088
|
let n = e.expression || e.callee;
|
|
1089
1089
|
if (e.type === "Decorator" && n.type === "CallExpression" && n.callee.name === "Component" && n.arguments.length === 1) {
|
|
1090
1090
|
let i = e.expression.arguments[0].properties;
|
|
@@ -1161,7 +1161,7 @@ function Lo(e, t, r, n) {
|
|
|
1161
1161
|
r && s.push(u, bu);
|
|
1162
1162
|
let i = nt(u);
|
|
1163
1163
|
if (!i) throw new Ft(u);
|
|
1164
|
-
if ((t == null ?
|
|
1164
|
+
if ((t == null ? void 0 : t(u)) !== false) switch (i) {
|
|
1165
1165
|
case Ne:
|
|
1166
1166
|
case de: {
|
|
1167
1167
|
let a = i === Ne ? u : u.parts;
|
|
@@ -1373,7 +1373,7 @@ function wu(e, t, r) {
|
|
|
1373
1373
|
function u(i) {
|
|
1374
1374
|
if (s) return false;
|
|
1375
1375
|
let a = t(i);
|
|
1376
|
-
a !==
|
|
1376
|
+
a !== void 0 && (s = true, n = a);
|
|
1377
1377
|
}
|
|
1378
1378
|
return Vn(e, u), n;
|
|
1379
1379
|
}
|
|
@@ -1559,7 +1559,7 @@ function Zn({
|
|
|
1559
1559
|
followingNode: n,
|
|
1560
1560
|
text: s
|
|
1561
1561
|
}) {
|
|
1562
|
-
if ((r == null ?
|
|
1562
|
+
if ((r == null ? void 0 : r.type) !== "IfStatement" || !n) return false;
|
|
1563
1563
|
if (Ke(s, I(e)) === ")") return K(t, e), true;
|
|
1564
1564
|
if (t === r.consequent && n === r.alternate) {
|
|
1565
1565
|
if (t.type === "BlockStatement") K(t, e);
|
|
@@ -1578,7 +1578,7 @@ function es({
|
|
|
1578
1578
|
followingNode: n,
|
|
1579
1579
|
text: s
|
|
1580
1580
|
}) {
|
|
1581
|
-
return (r == null ?
|
|
1581
|
+
return (r == null ? void 0 : r.type) !== "WhileStatement" || !n ? false : Ke(s, I(e)) === ")" ? (K(t, e), true) : n.type === "BlockStatement" ? (bt(n, e), true) : r.body === n ? (oe(n, e), true) : false;
|
|
1582
1582
|
}
|
|
1583
1583
|
function Ru({
|
|
1584
1584
|
comment: e,
|
|
@@ -1586,14 +1586,14 @@ function Ru({
|
|
|
1586
1586
|
enclosingNode: r,
|
|
1587
1587
|
followingNode: n
|
|
1588
1588
|
}) {
|
|
1589
|
-
return (r == null ?
|
|
1589
|
+
return (r == null ? void 0 : r.type) !== "TryStatement" && (r == null ? void 0 : r.type) !== "CatchClause" || !n ? false : r.type === "CatchClause" && t ? (K(t, e), true) : n.type === "BlockStatement" ? (bt(n, e), true) : n.type === "TryStatement" ? (Qn(n.finalizer, e), true) : n.type === "CatchClause" ? (Qn(n.body, e), true) : false;
|
|
1590
1590
|
}
|
|
1591
1591
|
function $o({
|
|
1592
1592
|
comment: e,
|
|
1593
1593
|
enclosingNode: t,
|
|
1594
1594
|
followingNode: r
|
|
1595
1595
|
}) {
|
|
1596
|
-
return q(t) && (r == null ?
|
|
1596
|
+
return q(t) && (r == null ? void 0 : r.type) === "Identifier" ? (oe(t, e), true) : false;
|
|
1597
1597
|
}
|
|
1598
1598
|
function Ho({
|
|
1599
1599
|
comment: e,
|
|
@@ -1601,7 +1601,7 @@ function Ho({
|
|
|
1601
1601
|
followingNode: r,
|
|
1602
1602
|
options: n
|
|
1603
1603
|
}) {
|
|
1604
|
-
return !n.experimentalTernaries || !((t == null ?
|
|
1604
|
+
return !n.experimentalTernaries || !((t == null ? void 0 : t.type) === "ConditionalExpression" || (t == null ? void 0 : t.type) === "ConditionalTypeAnnotation" || (t == null ? void 0 : t.type) === "TSConditionalType") ? false : (r == null ? void 0 : r.type) === "ConditionalExpression" || (r == null ? void 0 : r.type) === "ConditionalTypeAnnotation" || (r == null ? void 0 : r.type) === "TSConditionalType" ? (he(t, e), true) : false;
|
|
1605
1605
|
}
|
|
1606
1606
|
function Ju({
|
|
1607
1607
|
comment: e,
|
|
@@ -1612,7 +1612,7 @@ function Ju({
|
|
|
1612
1612
|
options: u
|
|
1613
1613
|
}) {
|
|
1614
1614
|
let i = t && !Te(s, I(t), j(e));
|
|
1615
|
-
return (!t || !i) && ((r == null ?
|
|
1615
|
+
return (!t || !i) && ((r == null ? void 0 : r.type) === "ConditionalExpression" || (r == null ? void 0 : r.type) === "ConditionalTypeAnnotation" || (r == null ? void 0 : r.type) === "TSConditionalType") && n ? u.experimentalTernaries && r.alternate === n && !(ee(e) && !Te(u.originalText, j(e), I(e))) ? (he(r, e), true) : (oe(n, e), true) : false;
|
|
1616
1616
|
}
|
|
1617
1617
|
function Ko({
|
|
1618
1618
|
comment: e,
|
|
@@ -1628,8 +1628,8 @@ function qu({
|
|
|
1628
1628
|
enclosingNode: r,
|
|
1629
1629
|
followingNode: n
|
|
1630
1630
|
}) {
|
|
1631
|
-
if (zo.has(r == null ?
|
|
1632
|
-
if (L(r.decorators) && (n == null ?
|
|
1631
|
+
if (zo.has(r == null ? void 0 : r.type)) {
|
|
1632
|
+
if (L(r.decorators) && (n == null ? void 0 : n.type) !== "Decorator") return K(v(false, r.decorators, -1), e), true;
|
|
1633
1633
|
if (r.body && n === r.body) return bt(r.body, e), true;
|
|
1634
1634
|
if (n) {
|
|
1635
1635
|
if (r.superClass && n === r.superClass && t && (t === r.id || t === r.typeParameters)) return K(t, e), true;
|
|
@@ -1645,7 +1645,7 @@ function Wu({
|
|
|
1645
1645
|
enclosingNode: r,
|
|
1646
1646
|
text: n
|
|
1647
1647
|
}) {
|
|
1648
|
-
return r && t && Ke(n, I(e)) === "(" && (r.type === "Property" || r.type === "TSDeclareMethod" || r.type === "TSAbstractMethodDefinition") && t.type === "Identifier" && r.key === t && Ke(n, I(t)) !== ":" ? (K(t, e), true) : (t == null ?
|
|
1648
|
+
return r && t && Ke(n, I(e)) === "(" && (r.type === "Property" || r.type === "TSDeclareMethod" || r.type === "TSAbstractMethodDefinition") && t.type === "Identifier" && r.key === t && Ke(n, I(t)) !== ":" ? (K(t, e), true) : (t == null ? void 0 : t.type) === "Decorator" && Qo.has(r == null ? void 0 : r.type) ? (K(t, e), true) : false;
|
|
1649
1649
|
}
|
|
1650
1650
|
var Zo = /* @__PURE__ */ new Set(["FunctionDeclaration", "FunctionExpression", "ClassMethod", "MethodDefinition", "ObjectMethod"]);
|
|
1651
1651
|
function ep({
|
|
@@ -1654,14 +1654,14 @@ function ep({
|
|
|
1654
1654
|
enclosingNode: r,
|
|
1655
1655
|
text: n
|
|
1656
1656
|
}) {
|
|
1657
|
-
return Ke(n, I(e)) !== "(" ? false : t && Zo.has(r == null ?
|
|
1657
|
+
return Ke(n, I(e)) !== "(" ? false : t && Zo.has(r == null ? void 0 : r.type) ? (K(t, e), true) : false;
|
|
1658
1658
|
}
|
|
1659
1659
|
function tp({
|
|
1660
1660
|
comment: e,
|
|
1661
1661
|
enclosingNode: t,
|
|
1662
1662
|
text: r
|
|
1663
1663
|
}) {
|
|
1664
|
-
if ((t == null ?
|
|
1664
|
+
if ((t == null ? void 0 : t.type) !== "ArrowFunctionExpression") return false;
|
|
1665
1665
|
let n = lt(r, I(e));
|
|
1666
1666
|
return n !== false && r.slice(n, n + 2) === "=>" ? (he(t, e), true) : false;
|
|
1667
1667
|
}
|
|
@@ -1670,7 +1670,7 @@ function rp({
|
|
|
1670
1670
|
enclosingNode: t,
|
|
1671
1671
|
text: r
|
|
1672
1672
|
}) {
|
|
1673
|
-
return Ke(r, I(e)) !== ")" ? false : t && (Xu(t) && $(t).length === 0 || pt(t) && ae(t).length === 0) ? (he(t, e), true) : ((t == null ?
|
|
1673
|
+
return Ke(r, I(e)) !== ")" ? false : t && (Xu(t) && $(t).length === 0 || pt(t) && ae(t).length === 0) ? (he(t, e), true) : ((t == null ? void 0 : t.type) === "MethodDefinition" || (t == null ? void 0 : t.type) === "TSAbstractMethodDefinition") && $(t.value).length === 0 ? (he(t.value, e), true) : false;
|
|
1674
1674
|
}
|
|
1675
1675
|
function Nu({
|
|
1676
1676
|
comment: e,
|
|
@@ -1679,19 +1679,19 @@ function Nu({
|
|
|
1679
1679
|
followingNode: n,
|
|
1680
1680
|
text: s
|
|
1681
1681
|
}) {
|
|
1682
|
-
return (t == null ?
|
|
1682
|
+
return (t == null ? void 0 : t.type) === "FunctionTypeParam" && (r == null ? void 0 : r.type) === "FunctionTypeAnnotation" && (n == null ? void 0 : n.type) !== "FunctionTypeParam" ? (K(t, e), true) : ((t == null ? void 0 : t.type) === "Identifier" || (t == null ? void 0 : t.type) === "AssignmentPattern" || (t == null ? void 0 : t.type) === "ObjectPattern" || (t == null ? void 0 : t.type) === "ArrayPattern" || (t == null ? void 0 : t.type) === "RestElement" || (t == null ? void 0 : t.type) === "TSParameterProperty") && Xu(r) && Ke(s, I(e)) === ")" ? (K(t, e), true) : !ee(e) && ((r == null ? void 0 : r.type) === "FunctionDeclaration" || (r == null ? void 0 : r.type) === "FunctionExpression" || (r == null ? void 0 : r.type) === "ObjectMethod") && (n == null ? void 0 : n.type) === "BlockStatement" && r.body === n && lt(s, I(e)) === j(n) ? (bt(n, e), true) : false;
|
|
1683
1683
|
}
|
|
1684
1684
|
function Gu({
|
|
1685
1685
|
comment: e,
|
|
1686
1686
|
enclosingNode: t
|
|
1687
1687
|
}) {
|
|
1688
|
-
return (t == null ?
|
|
1688
|
+
return (t == null ? void 0 : t.type) === "LabeledStatement" ? (oe(t, e), true) : false;
|
|
1689
1689
|
}
|
|
1690
1690
|
function ts({
|
|
1691
1691
|
comment: e,
|
|
1692
1692
|
enclosingNode: t
|
|
1693
1693
|
}) {
|
|
1694
|
-
return ((t == null ?
|
|
1694
|
+
return ((t == null ? void 0 : t.type) === "ContinueStatement" || (t == null ? void 0 : t.type) === "BreakStatement") && !t.label ? (K(t, e), true) : false;
|
|
1695
1695
|
}
|
|
1696
1696
|
function np({
|
|
1697
1697
|
comment: e,
|
|
@@ -1722,13 +1722,13 @@ function rs({
|
|
|
1722
1722
|
isLastComment: s
|
|
1723
1723
|
}) {
|
|
1724
1724
|
var u;
|
|
1725
|
-
return ((u = n == null ?
|
|
1725
|
+
return ((u = n == null ? void 0 : n.body) == null ? void 0 : u.length) === 0 ? (s ? he(n, e) : oe(n, e), true) : (t == null ? void 0 : t.type) === "Program" && t.body.length === 0 && !L(t.directives) ? (s ? he(t, e) : oe(t, e), true) : (r == null ? void 0 : r.type) === "Program" && r.body.length === 0 && (t == null ? void 0 : t.type) === "ModuleExpression" ? (he(r, e), true) : false;
|
|
1726
1726
|
}
|
|
1727
1727
|
function ip({
|
|
1728
1728
|
comment: e,
|
|
1729
1729
|
enclosingNode: t
|
|
1730
1730
|
}) {
|
|
1731
|
-
return (t == null ?
|
|
1731
|
+
return (t == null ? void 0 : t.type) === "ForInStatement" || (t == null ? void 0 : t.type) === "ForOfStatement" ? (oe(t, e), true) : false;
|
|
1732
1732
|
}
|
|
1733
1733
|
function Uu({
|
|
1734
1734
|
comment: e,
|
|
@@ -1736,15 +1736,15 @@ function Uu({
|
|
|
1736
1736
|
enclosingNode: r,
|
|
1737
1737
|
text: n
|
|
1738
1738
|
}) {
|
|
1739
|
-
if ((r == null ?
|
|
1740
|
-
let s = (t == null ?
|
|
1739
|
+
if ((r == null ? void 0 : r.type) === "ImportSpecifier" || (r == null ? void 0 : r.type) === "ExportSpecifier") return oe(r, e), true;
|
|
1740
|
+
let s = (t == null ? void 0 : t.type) === "ImportSpecifier" && (r == null ? void 0 : r.type) === "ImportDeclaration", u = (t == null ? void 0 : t.type) === "ExportSpecifier" && (r == null ? void 0 : r.type) === "ExportNamedDeclaration";
|
|
1741
1741
|
return (s || u) && Z(n, I(e)) ? (K(t, e), true) : false;
|
|
1742
1742
|
}
|
|
1743
1743
|
function ap({
|
|
1744
1744
|
comment: e,
|
|
1745
1745
|
enclosingNode: t
|
|
1746
1746
|
}) {
|
|
1747
|
-
return (t == null ?
|
|
1747
|
+
return (t == null ? void 0 : t.type) === "AssignmentPattern" ? (oe(t, e), true) : false;
|
|
1748
1748
|
}
|
|
1749
1749
|
var op = /* @__PURE__ */ new Set(["VariableDeclarator", "AssignmentExpression", "TypeAlias", "TSTypeAliasDeclaration"]);
|
|
1750
1750
|
var pp = /* @__PURE__ */ new Set(["ObjectExpression", "RecordExpression", "ArrayExpression", "TupleExpression", "TemplateLiteral", "TaggedTemplateExpression", "ObjectTypeAnnotation", "TSTypeLiteral"]);
|
|
@@ -1753,7 +1753,7 @@ function cp({
|
|
|
1753
1753
|
enclosingNode: t,
|
|
1754
1754
|
followingNode: r
|
|
1755
1755
|
}) {
|
|
1756
|
-
return op.has(t == null ?
|
|
1756
|
+
return op.has(t == null ? void 0 : t.type) && r && (pp.has(r.type) || ee(e)) ? (oe(r, e), true) : false;
|
|
1757
1757
|
}
|
|
1758
1758
|
function lp({
|
|
1759
1759
|
comment: e,
|
|
@@ -1761,14 +1761,14 @@ function lp({
|
|
|
1761
1761
|
followingNode: r,
|
|
1762
1762
|
text: n
|
|
1763
1763
|
}) {
|
|
1764
|
-
return !r && ((t == null ?
|
|
1764
|
+
return !r && ((t == null ? void 0 : t.type) === "TSMethodSignature" || (t == null ? void 0 : t.type) === "TSDeclareFunction" || (t == null ? void 0 : t.type) === "TSAbstractMethodDefinition") && Ke(n, I(e)) === ";" ? (K(t, e), true) : false;
|
|
1765
1765
|
}
|
|
1766
1766
|
function Yu({
|
|
1767
1767
|
comment: e,
|
|
1768
1768
|
enclosingNode: t,
|
|
1769
1769
|
followingNode: r
|
|
1770
1770
|
}) {
|
|
1771
|
-
if (ir(e) && (t == null ?
|
|
1771
|
+
if (ir(e) && (t == null ? void 0 : t.type) === "TSMappedType" && (r == null ? void 0 : r.type) === "TSTypeParameter" && r.constraint) return t.prettierIgnore = true, e.unignore = true, true;
|
|
1772
1772
|
}
|
|
1773
1773
|
function mp({
|
|
1774
1774
|
comment: e,
|
|
@@ -1776,7 +1776,7 @@ function mp({
|
|
|
1776
1776
|
enclosingNode: r,
|
|
1777
1777
|
followingNode: n
|
|
1778
1778
|
}) {
|
|
1779
|
-
return (r == null ?
|
|
1779
|
+
return (r == null ? void 0 : r.type) !== "TSMappedType" ? false : (n == null ? void 0 : n.type) === "TSTypeParameter" && n.name ? (oe(n.name, e), true) : (t == null ? void 0 : t.type) === "TSTypeParameter" && t.constraint ? (K(t.constraint, e), true) : false;
|
|
1780
1780
|
}
|
|
1781
1781
|
function Dp({
|
|
1782
1782
|
comment: e,
|
|
@@ -1799,7 +1799,7 @@ function fp({
|
|
|
1799
1799
|
precedingNode: r,
|
|
1800
1800
|
followingNode: n
|
|
1801
1801
|
}) {
|
|
1802
|
-
if (((t == null ?
|
|
1802
|
+
if (((t == null ? void 0 : t.type) === "ObjectPattern" || (t == null ? void 0 : t.type) === "ArrayPattern") && (n == null ? void 0 : n.type) === "TSTypeAnnotation") return r ? K(r, e) : he(t, e), true;
|
|
1803
1803
|
}
|
|
1804
1804
|
var Xu = M(["ArrowFunctionExpression", "FunctionExpression", "FunctionDeclaration", "ObjectMethod", "ClassMethod", "TSDeclareFunction", "TSCallSignatureDeclaration", "TSConstructSignatureDeclaration", "TSMethodSignature", "TSConstructorType", "TSFunctionType", "TSDeclareMethod"]);
|
|
1805
1805
|
var Ep = /* @__PURE__ */ new Set(["EmptyStatement", "TemplateElement", "Import", "TSEmptyBodyFunctionExpression", "ChainExpression"]);
|
|
@@ -1808,7 +1808,7 @@ function Fp(e) {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
function Cp(e, t) {
|
|
1810
1810
|
var r;
|
|
1811
|
-
if ((t.parser === "typescript" || t.parser === "flow" || t.parser === "acorn" || t.parser === "espree" || t.parser === "meriyah" || t.parser === "__babel_estree") && e.type === "MethodDefinition" && ((r = e.value) == null ?
|
|
1811
|
+
if ((t.parser === "typescript" || t.parser === "flow" || t.parser === "acorn" || t.parser === "espree" || t.parser === "meriyah" || t.parser === "__babel_estree") && e.type === "MethodDefinition" && ((r = e.value) == null ? void 0 : r.type) === "FunctionExpression" && $(e.value).length === 0 && !e.value.returnType && !L(e.value.typeParameters) && e.value.body) return [...e.decorators || [], e.key, e.value.body];
|
|
1812
1812
|
}
|
|
1813
1813
|
function ss(e) {
|
|
1814
1814
|
let {
|
|
@@ -2382,7 +2382,7 @@ function Ip({
|
|
|
2382
2382
|
parent: t,
|
|
2383
2383
|
grandparent: r
|
|
2384
2384
|
}) {
|
|
2385
|
-
return r && e.quasis && t.type === "JSXExpressionContainer" && r.type === "JSXElement" && r.openingElement.name.name === "style" && r.openingElement.attributes.some((n) => n.type === "JSXAttribute" && n.name.name === "jsx") || (t == null ?
|
|
2385
|
+
return r && e.quasis && t.type === "JSXExpressionContainer" && r.type === "JSXElement" && r.openingElement.name.name === "style" && r.openingElement.attributes.some((n) => n.type === "JSXAttribute" && n.name.name === "jsx") || (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && t.tag.type === "Identifier" && t.tag.name === "css" || (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && t.tag.type === "MemberExpression" && t.tag.object.name === "css" && (t.tag.property.name === "global" || t.tag.property.name === "resolve");
|
|
2386
2386
|
}
|
|
2387
2387
|
function Xr(e) {
|
|
2388
2388
|
return e.type === "Identifier" && e.name === "styled";
|
|
@@ -2410,7 +2410,7 @@ function wp({
|
|
|
2410
2410
|
parent: e,
|
|
2411
2411
|
grandparent: t
|
|
2412
2412
|
}) {
|
|
2413
|
-
return (t == null ?
|
|
2413
|
+
return (t == null ? void 0 : t.type) === "JSXAttribute" && e.type === "JSXExpressionContainer" && t.name.type === "JSXIdentifier" && t.name.name === "css";
|
|
2414
2414
|
}
|
|
2415
2415
|
function Op(e) {
|
|
2416
2416
|
if (Ip(e) || Lp(e) || wp(e) || Zu(e)) return Pp;
|
|
@@ -2481,8 +2481,8 @@ async function si(e, t, r, n, s) {
|
|
|
2481
2481
|
function Rp(e) {
|
|
2482
2482
|
return Yr(e, "HTML") || e.match((t) => t.type === "TemplateLiteral", (t, r) => t.type === "TaggedTemplateExpression" && t.tag.type === "Identifier" && t.tag.name === "html" && r === "quasi");
|
|
2483
2483
|
}
|
|
2484
|
-
var Jp = si.bind(
|
|
2485
|
-
var qp = si.bind(
|
|
2484
|
+
var Jp = si.bind(void 0, "html");
|
|
2485
|
+
var qp = si.bind(void 0, "angular");
|
|
2486
2486
|
function Wp(e) {
|
|
2487
2487
|
if (Rp(e)) return Jp;
|
|
2488
2488
|
if (ei(e)) return qp;
|
|
@@ -2510,7 +2510,7 @@ function Yp({
|
|
|
2510
2510
|
node: e,
|
|
2511
2511
|
parent: t
|
|
2512
2512
|
}) {
|
|
2513
|
-
return (t == null ?
|
|
2513
|
+
return (t == null ? void 0 : t.type) === "TaggedTemplateExpression" && e.quasis.length === 1 && t.tag.type === "Identifier" && (t.tag.name === "md" || t.tag.name === "markdown");
|
|
2514
2514
|
}
|
|
2515
2515
|
var ii = Up;
|
|
2516
2516
|
function Xp(e) {
|
|
@@ -2606,11 +2606,11 @@ function cs(e, t) {
|
|
|
2606
2606
|
if (r.type === "Identifier") {
|
|
2607
2607
|
if ((u = r.extra) != null && u.parenthesized && /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(r.name) || n === "left" && (r.name === "async" && !s.await || r.name === "let") && s.type === "ForOfStatement") return true;
|
|
2608
2608
|
if (r.name === "let") {
|
|
2609
|
-
let c = (i = e.findAncestor((f) => f.type === "ForOfStatement")) == null ?
|
|
2609
|
+
let c = (i = e.findAncestor((f) => f.type === "ForOfStatement")) == null ? void 0 : i.left;
|
|
2610
2610
|
if (c && ie(c, (f) => f === r)) return true;
|
|
2611
2611
|
}
|
|
2612
2612
|
if (n === "object" && r.name === "let" && s.type === "MemberExpression" && s.computed && !s.optional) {
|
|
2613
|
-
let c = e.findAncestor((l) => l.type === "ExpressionStatement" || l.type === "ForStatement" || l.type === "ForInStatement"), f = c ? c.type === "ExpressionStatement" ? c.expression : c.type === "ForStatement" ? c.init : c.left :
|
|
2613
|
+
let c = e.findAncestor((l) => l.type === "ExpressionStatement" || l.type === "ForStatement" || l.type === "ForInStatement"), f = c ? c.type === "ExpressionStatement" ? c.expression : c.type === "ForStatement" ? c.init : c.left : void 0;
|
|
2614
2614
|
if (f && ie(f, (l) => l === r)) return true;
|
|
2615
2615
|
}
|
|
2616
2616
|
if (n === "expression") switch (r.name) {
|
|
@@ -2628,11 +2628,11 @@ function cs(e, t) {
|
|
|
2628
2628
|
return false;
|
|
2629
2629
|
}
|
|
2630
2630
|
if (r.type === "ObjectExpression" || r.type === "FunctionExpression" || r.type === "ClassExpression" || r.type === "DoExpression") {
|
|
2631
|
-
let c = (a = e.findAncestor((f) => f.type === "ExpressionStatement")) == null ?
|
|
2631
|
+
let c = (a = e.findAncestor((f) => f.type === "ExpressionStatement")) == null ? void 0 : a.expression;
|
|
2632
2632
|
if (c && ie(c, (f) => f === r)) return true;
|
|
2633
2633
|
}
|
|
2634
2634
|
if (r.type === "ObjectExpression") {
|
|
2635
|
-
let c = (o = e.findAncestor((f) => f.type === "ArrowFunctionExpression")) == null ?
|
|
2635
|
+
let c = (o = e.findAncestor((f) => f.type === "ArrowFunctionExpression")) == null ? void 0 : o.body;
|
|
2636
2636
|
if (c && c.type !== "SequenceExpression" && c.type !== "AssignmentExpression" && ie(c, (f) => f === r)) return true;
|
|
2637
2637
|
}
|
|
2638
2638
|
switch (s.type) {
|
|
@@ -2667,7 +2667,7 @@ function cs(e, t) {
|
|
|
2667
2667
|
}
|
|
2668
2668
|
break;
|
|
2669
2669
|
case "TypeAnnotation":
|
|
2670
|
-
if (e.match(
|
|
2670
|
+
if (e.match(void 0, void 0, (c, f) => f === "returnType" && c.type === "ArrowFunctionExpression") && oc(r)) return true;
|
|
2671
2671
|
break;
|
|
2672
2672
|
case "BinaryExpression":
|
|
2673
2673
|
if (n === "left" && (s.operator === "in" || s.operator === "instanceof") && r.type === "UnaryExpression") return true;
|
|
@@ -2832,11 +2832,11 @@ function cs(e, t) {
|
|
|
2832
2832
|
case "NullableTypeAnnotation":
|
|
2833
2833
|
return s.type === "ArrayTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType");
|
|
2834
2834
|
case "FunctionTypeAnnotation": {
|
|
2835
|
-
if (e.match(
|
|
2835
|
+
if (e.match(void 0, (f, l) => l === "typeAnnotation" && f.type === "TypeAnnotation", (f, l) => l === "returnType" && f.type === "ArrowFunctionExpression") || e.match(void 0, (f, l) => l === "typeAnnotation" && f.type === "TypePredicate", (f, l) => l === "typeAnnotation" && f.type === "TypeAnnotation", (f, l) => l === "returnType" && f.type === "ArrowFunctionExpression")) return true;
|
|
2836
2836
|
let c = s.type === "NullableTypeAnnotation" ? e.grandparent : s;
|
|
2837
2837
|
return c.type === "UnionTypeAnnotation" || c.type === "IntersectionTypeAnnotation" || c.type === "ArrayTypeAnnotation" || n === "objectType" && (c.type === "IndexedAccessType" || c.type === "OptionalIndexedAccessType") || n === "checkType" && s.type === "ConditionalTypeAnnotation" || n === "extendsType" && s.type === "ConditionalTypeAnnotation" && r.returnType.type === "InferTypeAnnotation" && r.returnType.typeParameter.bound || c.type === "NullableTypeAnnotation" || s.type === "FunctionTypeParam" && s.name === null && $(r).some((f) => {
|
|
2838
2838
|
var l;
|
|
2839
|
-
return ((l = f.typeAnnotation) == null ?
|
|
2839
|
+
return ((l = f.typeAnnotation) == null ? void 0 : l.type) === "NullableTypeAnnotation";
|
|
2840
2840
|
});
|
|
2841
2841
|
}
|
|
2842
2842
|
case "ConditionalTypeAnnotation":
|
|
@@ -2901,7 +2901,7 @@ function cs(e, t) {
|
|
|
2901
2901
|
case "ArrowFunctionExpression":
|
|
2902
2902
|
switch (s.type) {
|
|
2903
2903
|
case "BinaryExpression":
|
|
2904
|
-
return s.operator !== "|>" || ((m = r.extra) == null ?
|
|
2904
|
+
return s.operator !== "|>" || ((m = r.extra) == null ? void 0 : m.parenthesized);
|
|
2905
2905
|
case "NewExpression":
|
|
2906
2906
|
case "CallExpression":
|
|
2907
2907
|
case "OptionalCallExpression":
|
|
@@ -2982,7 +2982,7 @@ function ac(e) {
|
|
|
2982
2982
|
} = e;
|
|
2983
2983
|
for (; r; ) {
|
|
2984
2984
|
let n = e.getParentNode(t++);
|
|
2985
|
-
if ((n == null ?
|
|
2985
|
+
if ((n == null ? void 0 : n.type) === "ForStatement" && n.init === r) return true;
|
|
2986
2986
|
r = n;
|
|
2987
2987
|
}
|
|
2988
2988
|
return false;
|
|
@@ -3032,7 +3032,7 @@ function cc(e) {
|
|
|
3032
3032
|
grandparent: n,
|
|
3033
3033
|
key: s
|
|
3034
3034
|
} = e;
|
|
3035
|
-
return !!((t.type === "OptionalMemberExpression" || t.type === "OptionalCallExpression") && (s === "object" && r.type === "MemberExpression" || s === "callee" && (r.type === "CallExpression" || r.type === "NewExpression") || r.type === "TSNonNullExpression" && n.type === "MemberExpression" && n.object === r) || e.match(() => t.type === "CallExpression" || t.type === "MemberExpression", (u, i) => i === "expression" && u.type === "ChainExpression") && (e.match(
|
|
3035
|
+
return !!((t.type === "OptionalMemberExpression" || t.type === "OptionalCallExpression") && (s === "object" && r.type === "MemberExpression" || s === "callee" && (r.type === "CallExpression" || r.type === "NewExpression") || r.type === "TSNonNullExpression" && n.type === "MemberExpression" && n.object === r) || e.match(() => t.type === "CallExpression" || t.type === "MemberExpression", (u, i) => i === "expression" && u.type === "ChainExpression") && (e.match(void 0, void 0, (u, i) => i === "callee" && (u.type === "CallExpression" && !u.optional || u.type === "NewExpression") || i === "object" && u.type === "MemberExpression" && !u.optional) || e.match(void 0, void 0, (u, i) => i === "expression" && u.type === "TSNonNullExpression", (u, i) => i === "object" && u.type === "MemberExpression")) || e.match(() => t.type === "CallExpression" || t.type === "MemberExpression", (u, i) => i === "expression" && u.type === "TSNonNullExpression", (u, i) => i === "expression" && u.type === "ChainExpression", (u, i) => i === "object" && u.type === "MemberExpression"));
|
|
3036
3036
|
}
|
|
3037
3037
|
var Be = cs;
|
|
3038
3038
|
function lc(e, t) {
|
|
@@ -3063,7 +3063,7 @@ function Dc(e, t) {
|
|
|
3063
3063
|
locStart: i,
|
|
3064
3064
|
locEnd: a
|
|
3065
3065
|
} = t;
|
|
3066
|
-
if ((m = s.isBlockComment) == null ?
|
|
3066
|
+
if ((m = s.isBlockComment) == null ? void 0 : m.call(s, r)) {
|
|
3067
3067
|
let y = Z(u, a(r)) ? Z(u, i(r), {
|
|
3068
3068
|
backwards: true
|
|
3069
3069
|
}) ? C : d : " ";
|
|
@@ -3078,7 +3078,7 @@ function yc(e, t, r) {
|
|
|
3078
3078
|
printer: u,
|
|
3079
3079
|
originalText: i,
|
|
3080
3080
|
locStart: a
|
|
3081
|
-
} = t, o = (p = u.isBlockComment) == null ?
|
|
3081
|
+
} = t, o = (p = u.isBlockComment) == null ? void 0 : p.call(u, n);
|
|
3082
3082
|
if (r != null && r.hasLineSuffix && !(r != null && r.isBlock) || Z(i, a(n), {
|
|
3083
3083
|
backwards: true
|
|
3084
3084
|
})) {
|
|
@@ -3103,7 +3103,7 @@ function J(e, t, r = {}) {
|
|
|
3103
3103
|
let {
|
|
3104
3104
|
node: n
|
|
3105
3105
|
} = e;
|
|
3106
|
-
if (!L(n == null ?
|
|
3106
|
+
if (!L(n == null ? void 0 : n.comments)) return "";
|
|
3107
3107
|
let {
|
|
3108
3108
|
indent: s = false,
|
|
3109
3109
|
marker: u,
|
|
@@ -3160,7 +3160,7 @@ function ys(e) {
|
|
|
3160
3160
|
var Me;
|
|
3161
3161
|
var fs = class {
|
|
3162
3162
|
constructor(t) {
|
|
3163
|
-
Xs(this, Me,
|
|
3163
|
+
Xs(this, Me, void 0);
|
|
3164
3164
|
Vs(this, Me, new Set(t));
|
|
3165
3165
|
}
|
|
3166
3166
|
getLeadingWhitespaceCount(t) {
|
|
@@ -3233,7 +3233,7 @@ function fc(e, t, r) {
|
|
|
3233
3233
|
value: " ",
|
|
3234
3234
|
raw: " "
|
|
3235
3235
|
} : T);
|
|
3236
|
-
let i = n.children.some(U), a = n.children.filter((T) => T.type === "JSXExpressionContainer").length > 1, o = n.type === "JSXElement" && n.openingElement.attributes.length > 1, p = re(s) || i || o || a, m = e.parent.rootMarker === "mdx", y = t.singleQuote ? "{' '}" : '{" "}', c = m ? " " : b([y, F], " "), f = ((R = (O = n.openingElement) == null ?
|
|
3236
|
+
let i = n.children.some(U), a = n.children.filter((T) => T.type === "JSXExpressionContainer").length > 1, o = n.type === "JSXElement" && n.openingElement.attributes.length > 1, p = re(s) || i || o || a, m = e.parent.rootMarker === "mdx", y = t.singleQuote ? "{' '}" : '{" "}', c = m ? " " : b([y, F], " "), f = ((R = (O = n.openingElement) == null ? void 0 : O.name) == null ? void 0 : R.name) === "fbt", l = Ec(e, t, r, c, f), h = n.children.some((T) => lr(T));
|
|
3237
3237
|
for (let T = l.length - 2; T >= 0; T--) {
|
|
3238
3238
|
let W = l[T] === "" && l[T + 1] === "", Fe = l[T] === C && l[T + 1] === "" && l[T + 2] === C, X = (l[T] === F || l[T] === C) && l[T + 1] === "" && l[T + 2] === c, ue = l[T] === c && l[T + 1] === "" && (l[T + 2] === F || l[T + 2] === C), z = l[T] === c && l[T + 1] === "" && l[T + 2] === c, wt = l[T] === F && l[T + 1] === "" && l[T + 2] === C || l[T] === C && l[T + 1] === "" && l[T + 2] === F;
|
|
3239
3239
|
Fe && h || W || X || z || wt ? l.splice(T, 2) : ue && l.splice(T + 1, 2);
|
|
@@ -3263,7 +3263,7 @@ function fc(e, t, r) {
|
|
|
3263
3263
|
let S = h ? Wt(g) : D(g, {
|
|
3264
3264
|
shouldBreak: true
|
|
3265
3265
|
});
|
|
3266
|
-
if (((_ = t.cursorNode) == null ?
|
|
3266
|
+
if (((_ = t.cursorNode) == null ? void 0 : _.type) === "JSXText" && n.children.includes(t.cursorNode) && (S = [Kn, S, Kn]), m) return S;
|
|
3267
3267
|
let B = D([s, E([C, S]), C, u]);
|
|
3268
3268
|
return p ? B : He([D([s, ...l, u]), B]);
|
|
3269
3269
|
}
|
|
@@ -3281,7 +3281,7 @@ function Ec(e, t, r, n, s) {
|
|
|
3281
3281
|
let m;
|
|
3282
3282
|
if (v(false, p, -1) === "" && (p.pop(), m = p.pop()), p.length === 0) return;
|
|
3283
3283
|
for (let [y, c] of p.entries()) y % 2 === 1 ? u.push(d) : u.push(c);
|
|
3284
|
-
m !==
|
|
3284
|
+
m !== void 0 ? /\n/.test(m) ? u.push(xi(s, v(false, u, -1), i, a)) : u.push(n) : u.push(Ti(s, v(false, u, -1), i, a));
|
|
3285
3285
|
} else /\n/.test(o) ? o.match(/\n/g).length > 1 && u.push("", C) : u.push("", n);
|
|
3286
3286
|
} else {
|
|
3287
3287
|
let o = r();
|
|
@@ -3293,10 +3293,10 @@ function Ec(e, t, r, n, s) {
|
|
|
3293
3293
|
}, "children"), u;
|
|
3294
3294
|
}
|
|
3295
3295
|
function Ti(e, t, r, n) {
|
|
3296
|
-
return e ? "" : r.type === "JSXElement" && !r.closingElement || (n == null ?
|
|
3296
|
+
return e ? "" : r.type === "JSXElement" && !r.closingElement || (n == null ? void 0 : n.type) === "JSXElement" && !n.closingElement ? t.length === 1 ? F : C : F;
|
|
3297
3297
|
}
|
|
3298
3298
|
function xi(e, t, r, n) {
|
|
3299
|
-
return e ? C : t.length === 1 ? r.type === "JSXElement" && !r.closingElement || (n == null ?
|
|
3299
|
+
return e ? C : t.length === 1 ? r.type === "JSXElement" && !r.closingElement || (n == null ? void 0 : n.type) === "JSXElement" && !n.closingElement ? C : F : C;
|
|
3300
3300
|
}
|
|
3301
3301
|
var Fc = /* @__PURE__ */ new Set(["ArrayExpression", "TupleExpression", "JSXAttribute", "JSXElement", "JSXExpressionContainer", "JSXFragment", "ExpressionStatement", "CallExpression", "OptionalCallExpression", "ConditionalExpression", "JsExpressionRoot"]);
|
|
3302
3302
|
function Cc(e, t, r) {
|
|
@@ -3304,7 +3304,7 @@ function Cc(e, t, r) {
|
|
|
3304
3304
|
parent: n
|
|
3305
3305
|
} = e;
|
|
3306
3306
|
if (Fc.has(n.type)) return t;
|
|
3307
|
-
let s = e.match(
|
|
3307
|
+
let s = e.match(void 0, (i) => i.type === "ArrowFunctionExpression", w, (i) => i.type === "JSXExpressionContainer"), u = Be(e, r);
|
|
3308
3308
|
return D([u ? "" : b("("), E([F, t]), F, u ? "" : b(")")], {
|
|
3309
3309
|
shouldBreak: s
|
|
3310
3310
|
});
|
|
@@ -3335,9 +3335,9 @@ function Tc(e, t, r) {
|
|
|
3335
3335
|
node: n
|
|
3336
3336
|
} = e, s = A(n.name) || A(n.typeParameters) || A(n.typeArguments);
|
|
3337
3337
|
if (n.selfClosing && n.attributes.length === 0 && !s) return ["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), " />"];
|
|
3338
|
-
if (((a = n.attributes) == null ?
|
|
3338
|
+
if (((a = n.attributes) == null ? void 0 : a.length) === 1 && n.attributes[0].value && te(n.attributes[0].value) && !n.attributes[0].value.value.includes(`
|
|
3339
3339
|
`) && !s && !A(n.attributes[0])) return D(["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), " ", ...e.map(r, "attributes"), n.selfClosing ? " />" : ">"]);
|
|
3340
|
-
let u = (o = n.attributes) == null ?
|
|
3340
|
+
let u = (o = n.attributes) == null ? void 0 : o.some((p) => p.value && te(p.value) && p.value.value.includes(`
|
|
3341
3341
|
`)), i = t.singleAttributePerLine && n.attributes.length > 1 ? C : d;
|
|
3342
3342
|
return D(["<", r("name"), n.typeArguments ? r("typeArguments") : r("typeParameters"), E(e.map(() => [i, r()], "attributes")), ...xc(n, t, s)], {
|
|
3343
3343
|
shouldBreak: u
|
|
@@ -3452,7 +3452,7 @@ function hi(e) {
|
|
|
3452
3452
|
break;
|
|
3453
3453
|
}
|
|
3454
3454
|
}
|
|
3455
|
-
return (u == null ?
|
|
3455
|
+
return (u == null ? void 0 : u.type) === "JSXExpressionContainer" && u.expression.type === "JSXEmptyExpression" && Bt(u.expression);
|
|
3456
3456
|
}
|
|
3457
3457
|
function Lc(e) {
|
|
3458
3458
|
return Bt(e.node) || hi(e);
|
|
@@ -3466,14 +3466,14 @@ function Hr(e, t, r) {
|
|
|
3466
3466
|
parent: s,
|
|
3467
3467
|
grandparent: u,
|
|
3468
3468
|
key: i
|
|
3469
|
-
} = e, a = i !== "body" && (s.type === "IfStatement" || s.type === "WhileStatement" || s.type === "SwitchStatement" || s.type === "DoWhileStatement"), o = n.operator === "|>" && ((R = e.root.extra) == null ?
|
|
3469
|
+
} = e, a = i !== "body" && (s.type === "IfStatement" || s.type === "WhileStatement" || s.type === "SwitchStatement" || s.type === "DoWhileStatement"), o = n.operator === "|>" && ((R = e.root.extra) == null ? void 0 : R.__isUsingHackPipeline), p = Fs(e, r, t, false, a);
|
|
3470
3470
|
if (a) return p;
|
|
3471
3471
|
if (o) return D(p);
|
|
3472
3472
|
if (w(s) && s.callee === n || s.type === "UnaryExpression" || q(s) && !s.computed) return D([E([F, ...p]), F]);
|
|
3473
3473
|
let m = s.type === "ReturnStatement" || s.type === "ThrowStatement" || s.type === "JSXExpressionContainer" && u.type === "JSXAttribute" || n.operator !== "|" && s.type === "JsExpressionRoot" || n.type !== "NGPipeExpression" && (s.type === "NGRoot" && t.parser === "__ng_binding" || s.type === "NGMicrosyntaxExpression" && u.type === "NGMicrosyntax" && u.body.length === 1) || n === s.body && s.type === "ArrowFunctionExpression" || n !== s.body && s.type === "ForStatement" || s.type === "ConditionalExpression" && u.type !== "ReturnStatement" && u.type !== "ThrowStatement" && !w(u) || s.type === "TemplateLiteral", y = s.type === "AssignmentExpression" || s.type === "VariableDeclarator" || s.type === "ClassProperty" || s.type === "PropertyDefinition" || s.type === "TSAbstractPropertyDefinition" || s.type === "ClassPrivateProperty" || Ce(s), c = me(n.left) && sr(n.operator, n.left.operator);
|
|
3474
3474
|
if (m || Ut(n) && !c || !Ut(n) && y) return D(p);
|
|
3475
3475
|
if (p.length === 0) return "";
|
|
3476
|
-
let f = U(n.right), l = p.findIndex((_) => typeof _ != "string" && !Array.isArray(_) && _.type === pe), h = p.slice(0, l === -1 ? 1 : l + 1), g = p.slice(h.length, f ? -1 :
|
|
3476
|
+
let f = U(n.right), l = p.findIndex((_) => typeof _ != "string" && !Array.isArray(_) && _.type === pe), h = p.slice(0, l === -1 ? 1 : l + 1), g = p.slice(h.length, f ? -1 : void 0), S = Symbol("logicalChain-" + ++wc), B = D([...h, E(g)], {
|
|
3477
3477
|
id: S
|
|
3478
3478
|
});
|
|
3479
3479
|
if (!f) return B;
|
|
@@ -3493,7 +3493,7 @@ function Fs(e, t, r, n, s) {
|
|
|
3493
3493
|
let a = Ut(u), o = (u.operator === "|>" || u.type === "NGPipeExpression" || Oc(e, r)) && !we(r.originalText, u.right), p = u.type === "NGPipeExpression" ? "|" : u.operator, m = u.type === "NGPipeExpression" && u.arguments.length > 0 ? D(E([F, ": ", P([d, ": "], e.map(() => ge(2, D(t())), "arguments"))])) : "", y;
|
|
3494
3494
|
if (a) y = [p, " ", t("right"), m];
|
|
3495
3495
|
else {
|
|
3496
|
-
let S = p === "|>" && ((h = e.root.extra) == null ?
|
|
3496
|
+
let S = p === "|>" && ((h = e.root.extra) == null ? void 0 : h.__isUsingHackPipeline) ? e.call((B) => Fs(B, t, r, true, s), "right") : t("right");
|
|
3497
3497
|
y = [o ? d : "", p, o ? " " : d, S, m];
|
|
3498
3498
|
}
|
|
3499
3499
|
let {
|
|
@@ -3586,7 +3586,7 @@ function Ii(e, t) {
|
|
|
3586
3586
|
function Li(e) {
|
|
3587
3587
|
var r;
|
|
3588
3588
|
if (e.type !== "ExportDefaultDeclaration" && e.type !== "ExportNamedDeclaration" && e.type !== "DeclareExportDeclaration") return false;
|
|
3589
|
-
let t = (r = e.declaration) == null ?
|
|
3589
|
+
let t = (r = e.declaration) == null ? void 0 : r.decorators;
|
|
3590
3590
|
return L(t) && gt(e, t[0]);
|
|
3591
3591
|
}
|
|
3592
3592
|
var mt = class extends Error {
|
|
@@ -3661,7 +3661,7 @@ function jc(e, t, r) {
|
|
|
3661
3661
|
let n = v(false, e, -1);
|
|
3662
3662
|
if (e.length === 1) {
|
|
3663
3663
|
let a = v(false, t, -1);
|
|
3664
|
-
if ((u = a.label) != null && u.embed && ((i = a.label) == null ?
|
|
3664
|
+
if ((u = a.label) != null && u.embed && ((i = a.label) == null ? void 0 : i.hug) !== false) return true;
|
|
3665
3665
|
}
|
|
3666
3666
|
let s = v(false, e, -2);
|
|
3667
3667
|
return !A(n, x.Leading) && !A(n, x.Trailing) && mr(n) && (!s || s.type !== n.type) && (e.length !== 2 || s.type !== "ArrowFunctionExpression" || !G(n)) && !(e.length > 1 && As(n, r));
|
|
@@ -3678,7 +3678,7 @@ function wi(e) {
|
|
|
3678
3678
|
let {
|
|
3679
3679
|
typeAnnotation: r
|
|
3680
3680
|
} = e;
|
|
3681
|
-
return r.type === "TypeAnnotation" && (r = r.typeAnnotation), r.type === "TSArrayType" && (r = r.elementType, r.type === "TSArrayType" && (r = r.elementType)), (r.type === "GenericTypeAnnotation" || r.type === "TSTypeReference") && ((t = r.typeParameters) == null ?
|
|
3681
|
+
return r.type === "TypeAnnotation" && (r = r.typeAnnotation), r.type === "TSArrayType" && (r = r.elementType, r.type === "TSArrayType" && (r = r.elementType)), (r.type === "GenericTypeAnnotation" || r.type === "TSTypeReference") && ((t = r.typeParameters) == null ? void 0 : t.params.length) === 1 && (r = r.typeParameters.params[0]), Jt(r) && be(e.expression, 1);
|
|
3682
3682
|
}
|
|
3683
3683
|
return pt(e) && ae(e).length > 1 ? false : me(e) ? be(e.left, 1) && be(e.right, 1) : Wn(e) || be(e);
|
|
3684
3684
|
}
|
|
@@ -3697,7 +3697,7 @@ function Oi(e, t, r) {
|
|
|
3697
3697
|
var p;
|
|
3698
3698
|
let n = r("object"), s = ds(e, t, r), {
|
|
3699
3699
|
node: u
|
|
3700
|
-
} = e, i = e.findAncestor((m) => !(q(m) || m.type === "TSNonNullExpression")), a = e.findAncestor((m) => !(m.type === "ChainExpression" || m.type === "TSNonNullExpression")), o = i && (i.type === "NewExpression" || i.type === "BindExpression" || i.type === "AssignmentExpression" && i.left.type !== "Identifier") || u.computed || u.object.type === "Identifier" && u.property.type === "Identifier" && !q(a) || (a.type === "AssignmentExpression" || a.type === "VariableDeclarator") && (Nc(u.object) || ((p = n.label) == null ?
|
|
3700
|
+
} = e, i = e.findAncestor((m) => !(q(m) || m.type === "TSNonNullExpression")), a = e.findAncestor((m) => !(m.type === "ChainExpression" || m.type === "TSNonNullExpression")), o = i && (i.type === "NewExpression" || i.type === "BindExpression" || i.type === "AssignmentExpression" && i.left.type !== "Identifier") || u.computed || u.object.type === "Identifier" && u.property.type === "Identifier" && !q(a) || (a.type === "AssignmentExpression" || a.type === "VariableDeclarator") && (Nc(u.object) || ((p = n.label) == null ? void 0 : p.memberChain));
|
|
3701
3701
|
return st(n.label, [n, o ? s : D(E([F, s]))]);
|
|
3702
3702
|
}
|
|
3703
3703
|
function ds(e, t, r) {
|
|
@@ -3772,7 +3772,7 @@ function vi(e, t, r) {
|
|
|
3772
3772
|
}
|
|
3773
3773
|
function h(k) {
|
|
3774
3774
|
var je;
|
|
3775
|
-
let N = (je = k[1][0]) == null ?
|
|
3775
|
+
let N = (je = k[1][0]) == null ? void 0 : je.node.computed;
|
|
3776
3776
|
if (k[0].length === 1) {
|
|
3777
3777
|
let xt = k[0][0].node;
|
|
3778
3778
|
return xt.type === "ThisExpression" || xt.type === "Identifier" && (f(xt.name) || s && l(xt.name) || N);
|
|
@@ -3925,7 +3925,7 @@ function Vc(e) {
|
|
|
3925
3925
|
let t = e.left || e.id;
|
|
3926
3926
|
return t.type === "ObjectPattern" && t.properties.length > 2 && t.properties.some((r) => {
|
|
3927
3927
|
var n;
|
|
3928
|
-
return Ce(r) && (!r.shorthand || ((n = r.value) == null ?
|
|
3928
|
+
return Ce(r) && (!r.shorthand || ((n = r.value) == null ? void 0 : n.type) === "AssignmentPattern");
|
|
3929
3929
|
});
|
|
3930
3930
|
}
|
|
3931
3931
|
return false;
|
|
@@ -3947,7 +3947,7 @@ function $c(e) {
|
|
|
3947
3947
|
var Hc = M(["TSTypeAliasDeclaration", "TypeAlias"]);
|
|
3948
3948
|
function Kc(e) {
|
|
3949
3949
|
var t;
|
|
3950
|
-
if (Hc(e)) return (t = e.typeParameters) == null ?
|
|
3950
|
+
if (Hc(e)) return (t = e.typeParameters) == null ? void 0 : t.params;
|
|
3951
3951
|
}
|
|
3952
3952
|
function zc(e) {
|
|
3953
3953
|
if (e.type !== "VariableDeclarator") return false;
|
|
@@ -3960,12 +3960,12 @@ function zc(e) {
|
|
|
3960
3960
|
}
|
|
3961
3961
|
function Ts(e) {
|
|
3962
3962
|
var t;
|
|
3963
|
-
return e.type === "VariableDeclarator" && ((t = e.init) == null ?
|
|
3963
|
+
return e.type === "VariableDeclarator" && ((t = e.init) == null ? void 0 : t.type) === "ArrowFunctionExpression";
|
|
3964
3964
|
}
|
|
3965
3965
|
var Qc = M(["TSTypeReference", "GenericTypeAnnotation"]);
|
|
3966
3966
|
function Mi(e) {
|
|
3967
3967
|
var t;
|
|
3968
|
-
if (Qc(e)) return (t = e.typeParameters) == null ?
|
|
3968
|
+
if (Qc(e)) return (t = e.typeParameters) == null ? void 0 : t.params;
|
|
3969
3969
|
}
|
|
3970
3970
|
function qi(e, t, r, n = false) {
|
|
3971
3971
|
var i;
|
|
@@ -3998,7 +3998,7 @@ function el(e, t) {
|
|
|
3998
3998
|
}
|
|
3999
3999
|
function tl(e) {
|
|
4000
4000
|
var t;
|
|
4001
|
-
return (t = e.typeParameters ?? e.typeArguments) == null ?
|
|
4001
|
+
return (t = e.typeParameters ?? e.typeArguments) == null ? void 0 : t.params;
|
|
4002
4002
|
}
|
|
4003
4003
|
function rl(e) {
|
|
4004
4004
|
function t(r) {
|
|
@@ -4047,7 +4047,7 @@ function kt(e, t) {
|
|
|
4047
4047
|
var s;
|
|
4048
4048
|
let r = nl(e);
|
|
4049
4049
|
if (!r) return false;
|
|
4050
|
-
let n = (s = e.typeParameters) == null ?
|
|
4050
|
+
let n = (s = e.typeParameters) == null ? void 0 : s.params;
|
|
4051
4051
|
if (n) {
|
|
4052
4052
|
if (n.length > 1) return false;
|
|
4053
4053
|
if (n.length === 1) {
|
|
@@ -4130,7 +4130,7 @@ function ol(e) {
|
|
|
4130
4130
|
node: t,
|
|
4131
4131
|
parent: r
|
|
4132
4132
|
} = e;
|
|
4133
|
-
return t.type === "FunctionTypeAnnotation" && (Lr(r) || !((r.type === "ObjectTypeProperty" || r.type === "ObjectTypeInternalSlot") && !r.variance && !r.optional && gt(r, t) || r.type === "ObjectTypeCallProperty" || ((n = e.getParentNode(2)) == null ?
|
|
4133
|
+
return t.type === "FunctionTypeAnnotation" && (Lr(r) || !((r.type === "ObjectTypeProperty" || r.type === "ObjectTypeInternalSlot") && !r.variance && !r.optional && gt(r, t) || r.type === "ObjectTypeCallProperty" || ((n = e.getParentNode(2)) == null ? void 0 : n.type) === "DeclareFunction"));
|
|
4134
4134
|
}
|
|
4135
4135
|
function rn(e, t, r) {
|
|
4136
4136
|
let {
|
|
@@ -4206,7 +4206,7 @@ function V(e) {
|
|
|
4206
4206
|
return !t.optional || t.type === "Identifier" && t === e.parent.key ? "" : w(t) || q(t) && t.computed || t.type === "OptionalIndexedAccessType" ? "?." : "?";
|
|
4207
4207
|
}
|
|
4208
4208
|
function mn(e) {
|
|
4209
|
-
return e.node.definite || e.match(
|
|
4209
|
+
return e.node.definite || e.match(void 0, (t, r) => r === "id" && t.type === "VariableDeclarator" && t.definite) ? "!" : "";
|
|
4210
4210
|
}
|
|
4211
4211
|
var cl = /* @__PURE__ */ new Set(["DeclareClass", "DeclareFunction", "DeclareVariable", "DeclareExportDeclaration", "DeclareExportAllDeclaration", "DeclareOpaqueType", "DeclareTypeAlias", "DeclareEnum", "DeclareInterface"]);
|
|
4212
4212
|
function ne(e) {
|
|
@@ -4251,8 +4251,8 @@ function Vt(e, t, r) {
|
|
|
4251
4251
|
} = e, s = [], u = n.type === "TupleExpression" ? "#[" : "[", i = "]", a = n.type === "TupleTypeAnnotation" && n.types ? "types" : n.type === "TSTupleType" || n.type === "TupleTypeAnnotation" ? "elementTypes" : "elements", o = n[a];
|
|
4252
4252
|
if (o.length === 0) s.push(ml(e, t, u, i));
|
|
4253
4253
|
else {
|
|
4254
|
-
let p = v(false, o, -1), m = (p == null ?
|
|
4255
|
-
let O = g == null ?
|
|
4254
|
+
let p = v(false, o, -1), m = (p == null ? void 0 : p.type) !== "RestElement", y = p === null, c = Symbol("array"), f = !t.__inJestEach && o.length > 1 && o.every((g, S, B) => {
|
|
4255
|
+
let O = g == null ? void 0 : g.type;
|
|
4256
4256
|
if (!G(g) && !se(g)) return false;
|
|
4257
4257
|
let R = B[S + 1];
|
|
4258
4258
|
if (R && O !== R.type) return false;
|
|
@@ -4477,7 +4477,7 @@ function Al(e, t, r, n) {
|
|
|
4477
4477
|
}
|
|
4478
4478
|
function dl(e, t, r) {
|
|
4479
4479
|
var n, s;
|
|
4480
|
-
return G(e) || se(e) || e.type === "ArrowFunctionExpression" || e.type === "DoExpression" || e.type === "BlockStatement" || U(e) || ((n = t.label) == null ?
|
|
4480
|
+
return G(e) || se(e) || e.type === "ArrowFunctionExpression" || e.type === "DoExpression" || e.type === "BlockStatement" || U(e) || ((n = t.label) == null ? void 0 : n.hug) !== false && (((s = t.label) == null ? void 0 : s.embed) || wr(e, r.originalText));
|
|
4481
4481
|
}
|
|
4482
4482
|
function Tl(e, t, {
|
|
4483
4483
|
signatureDocs: r,
|
|
@@ -4550,7 +4550,7 @@ function bs(e, t, r) {
|
|
|
4550
4550
|
} = e, s = L(n.directives), u = n.body.some((p) => p.type !== "EmptyStatement"), i = A(n, x.Dangling);
|
|
4551
4551
|
if (!s && !u && !i) return "";
|
|
4552
4552
|
let a = [];
|
|
4553
|
-
return s && (a.push(fr(e, t, r, "directives")), (u || i) && (a.push(C), fe(v(false, n.directives, -1), t) && a.push(C))), u && a.push(fr(e, t, r, "body")), i && a.push(J(e, t)), n.type === "Program" && ((o = e.parent) == null ?
|
|
4553
|
+
return s && (a.push(fr(e, t, r, "directives")), (u || i) && (a.push(C), fe(v(false, n.directives, -1), t) && a.push(C))), u && a.push(fr(e, t, r, "body")), i && a.push(J(e, t)), n.type === "Program" && ((o = e.parent) == null ? void 0 : o.type) !== "ModuleExpression" && a.push(C), a;
|
|
4554
4554
|
}
|
|
4555
4555
|
function hl(e) {
|
|
4556
4556
|
let t = /* @__PURE__ */ new WeakMap();
|
|
@@ -4601,7 +4601,7 @@ function It(e, t, r, n) {
|
|
|
4601
4601
|
} = e;
|
|
4602
4602
|
if (!s[n]) return "";
|
|
4603
4603
|
if (!Array.isArray(s[n])) return r(n);
|
|
4604
|
-
let u = e.getNode(2), i = u && St(u), a = e.match((m) => !(m[n].length === 1 && Le(m[n][0])),
|
|
4604
|
+
let u = e.getNode(2), i = u && St(u), a = e.match((m) => !(m[n].length === 1 && Le(m[n][0])), void 0, (m, y) => y === "typeAnnotation", (m) => m.type === "Identifier", Ts);
|
|
4605
4605
|
if (s[n].length === 0 || !a && (i || s[n].length === 1 && (s[n][0].type === "NullableTypeAnnotation" || gs(s[n][0])))) return ["<", P(", ", e.map(r, n)), bl(e, t), ">"];
|
|
4606
4606
|
let p = s.type === "TSTypeParameterInstantiation" ? "" : Bl(e, t, n) ? "," : ye(t) ? b(",") : "";
|
|
4607
4607
|
return D(["<", E([F, P([",", d], e.map(r, n))]), p, F, ">"], {
|
|
@@ -4693,7 +4693,7 @@ function Sn(e, t, r) {
|
|
|
4693
4693
|
} = e, s = [], u = t.semi ? ";" : "";
|
|
4694
4694
|
L(n.decorators) && s.push(Cs(e, t, r)), s.push(Xt(n), ne(e)), n.static && s.push("static "), s.push(Yt(e)), n.override && s.push("override "), n.readonly && s.push("readonly "), n.variance && s.push(r("variance")), (n.type === "ClassAccessorProperty" || n.type === "AccessorProperty" || n.type === "TSAbstractAccessorProperty") && s.push("accessor "), s.push(ft(e, t, r), V(e), mn(e), Y(e, r));
|
|
4695
4695
|
let i = n.type === "TSAbstractPropertyDefinition" || n.type === "TSAbstractAccessorProperty";
|
|
4696
|
-
return [dt(e, t, r, s, " =", i ?
|
|
4696
|
+
return [dt(e, t, r, s, " =", i ? void 0 : "value"), u];
|
|
4697
4697
|
}
|
|
4698
4698
|
function sa(e, t, r) {
|
|
4699
4699
|
let {
|
|
@@ -4716,7 +4716,7 @@ function Il(e, t) {
|
|
|
4716
4716
|
if (!e.computed && r === "Identifier" && (n === "static" || n === "get" || n === "set") && !e.value && !e.typeAnnotation) return true;
|
|
4717
4717
|
if (!t || t.static || t.accessibility) return false;
|
|
4718
4718
|
if (!t.computed) {
|
|
4719
|
-
let u = (s = t.key) == null ?
|
|
4719
|
+
let u = (s = t.key) == null ? void 0 : s.name;
|
|
4720
4720
|
if (u === "in" || u === "instanceof") return true;
|
|
4721
4721
|
}
|
|
4722
4722
|
if (ta(t) && t.variance && !t.static && !t.declare) return true;
|
|
@@ -4954,7 +4954,7 @@ function Ml(e, t) {
|
|
|
4954
4954
|
var n, s;
|
|
4955
4955
|
if ((n = e.extra) != null && n.deprecatedAssertSyntax) return "assert";
|
|
4956
4956
|
let r = Fr(t, I(e.source), (s = e.attributes) != null && s[0] ? j(e.attributes[0]) : I(e)).trimStart();
|
|
4957
|
-
return r.startsWith("assert") ? "assert" : r.startsWith("with") || L(e.attributes) ? "with" :
|
|
4957
|
+
return r.startsWith("assert") ? "assert" : r.startsWith("with") || L(e.attributes) ? "with" : void 0;
|
|
4958
4958
|
}
|
|
4959
4959
|
function Fa(e, t, r) {
|
|
4960
4960
|
let {
|
|
@@ -5018,14 +5018,14 @@ function Tt(e, t, r) {
|
|
|
5018
5018
|
} else T = ["..."];
|
|
5019
5019
|
S.push([...g, ...T]);
|
|
5020
5020
|
}
|
|
5021
|
-
let B = (_ = v(false, o, -1)) == null ?
|
|
5021
|
+
let B = (_ = v(false, o, -1)) == null ? void 0 : _.node, O = !(s.inexact || s.hasUnknownMembers || B && (B.type === "RestElement" || (B.type === "TSPropertySignature" || B.type === "TSCallSignatureDeclaration" || B.type === "TSMethodSignature" || B.type === "TSConstructSignatureDeclaration") && A(B, x.PrettierIgnore))), R;
|
|
5022
5022
|
if (S.length === 0) {
|
|
5023
5023
|
if (!A(s, x.Dangling)) return [l, h, Y(e, r)];
|
|
5024
5024
|
R = D([l, J(e, t, {
|
|
5025
5025
|
indent: true
|
|
5026
5026
|
}), F, h, V(e), Y(e, r)]);
|
|
5027
5027
|
} else R = [y && L(s.properties) ? Is(p) : "", l, E([t.bracketSpacing ? d : F, ...S]), b(O && (f !== "," || ye(t)) ? f : ""), t.bracketSpacing ? d : F, h, V(e), Y(e, r)];
|
|
5028
|
-
return e.match((T) => T.type === "ObjectPattern" && !L(T.decorators), Ms) || Le(s) && (e.match(
|
|
5028
|
+
return e.match((T) => T.type === "ObjectPattern" && !L(T.decorators), Ms) || Le(s) && (e.match(void 0, (T, W) => W === "typeAnnotation", (T, W) => W === "typeAnnotation", Ms) || e.match(void 0, (T, W) => T.type === "FunctionTypeParam" && W === "typeAnnotation", Ms)) || !c && e.match((T) => T.type === "ObjectPattern", (T) => T.type === "AssignmentExpression" || T.type === "VariableDeclarator") ? R : D(R, {
|
|
5029
5029
|
shouldBreak: c
|
|
5030
5030
|
});
|
|
5031
5031
|
}
|
|
@@ -5217,7 +5217,7 @@ function da(e, t, r, n) {
|
|
|
5217
5217
|
if (w(a) && a.callee === s || q(a) && a.object === s) {
|
|
5218
5218
|
i = [E([F, ...i]), F];
|
|
5219
5219
|
let o = e.findAncestor((p) => p.type === "AwaitExpression" || p.type === "BlockStatement");
|
|
5220
|
-
if ((o == null ?
|
|
5220
|
+
if ((o == null ? void 0 : o.type) !== "AwaitExpression" || !ie(o.argument, (p) => p === s)) return D(i);
|
|
5221
5221
|
}
|
|
5222
5222
|
}
|
|
5223
5223
|
return i;
|
|
@@ -5700,7 +5700,7 @@ function ha(e, t, r) {
|
|
|
5700
5700
|
case "TSModuleDeclaration": {
|
|
5701
5701
|
let {
|
|
5702
5702
|
parent: a
|
|
5703
|
-
} = e, o = a.type === "TSModuleDeclaration", p = ((i = n.body) == null ?
|
|
5703
|
+
} = e, o = a.type === "TSModuleDeclaration", p = ((i = n.body) == null ? void 0 : i.type) === "TSModuleDeclaration";
|
|
5704
5704
|
if (o) u.push(".");
|
|
5705
5705
|
else if (u.push(ne(e)), !(n.kind === "global" || n.global)) {
|
|
5706
5706
|
let y = n.kind ?? (te(n.id) || Fr(t, j(n), j(n.id)).trim().endsWith("module") ? "module" : "namespace");
|
|
@@ -5746,7 +5746,7 @@ function Xl(e, t, r, n) {
|
|
|
5746
5746
|
if ($r(e)) return Fi(e, t);
|
|
5747
5747
|
for (let s of [bi, gi, ga, ha, da]) {
|
|
5748
5748
|
let u = s(e, t, r, n);
|
|
5749
|
-
if (u !==
|
|
5749
|
+
if (u !== void 0) return u;
|
|
5750
5750
|
}
|
|
5751
5751
|
}
|
|
5752
5752
|
var Vl = M(["ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassAccessorProperty", "AccessorProperty", "TSAbstractAccessorProperty", "PropertyDefinition", "TSAbstractPropertyDefinition", "ClassPrivateProperty", "MethodDefinition", "TSAbstractMethodDefinition", "TSDeclareMethod"]);
|
|
@@ -5931,22 +5931,6 @@ var Cr = {
|
|
|
5931
5931
|
default: false,
|
|
5932
5932
|
description: "Use single quotes instead of double quotes."
|
|
5933
5933
|
},
|
|
5934
|
-
proseWrap: {
|
|
5935
|
-
category: "Common",
|
|
5936
|
-
type: "choice",
|
|
5937
|
-
default: "preserve",
|
|
5938
|
-
description: "How to wrap prose.",
|
|
5939
|
-
choices: [{
|
|
5940
|
-
value: "always",
|
|
5941
|
-
description: "Wrap prose if it exceeds the print width."
|
|
5942
|
-
}, {
|
|
5943
|
-
value: "never",
|
|
5944
|
-
description: "Do not wrap prose."
|
|
5945
|
-
}, {
|
|
5946
|
-
value: "preserve",
|
|
5947
|
-
description: "Wrap prose as-is."
|
|
5948
|
-
}]
|
|
5949
|
-
},
|
|
5950
5934
|
bracketSameLine: {
|
|
5951
5935
|
category: "Common",
|
|
5952
5936
|
type: "boolean",
|
|
@@ -6047,5 +6031,5 @@ var rm = [...$s, ...Ba];
|
|
|
6047
6031
|
var LT = qs;
|
|
6048
6032
|
|
|
6049
6033
|
export { LT as default, rm as languages, La as options, tm as printers };
|
|
6050
|
-
//# sourceMappingURL=estree-
|
|
6051
|
-
//# sourceMappingURL=estree-
|
|
6034
|
+
//# sourceMappingURL=estree-YZZ76ZCZ.js.map
|
|
6035
|
+
//# sourceMappingURL=estree-YZZ76ZCZ.js.map
|