@tinacms/app 0.0.28 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/appFiles/node_modules/.package-lock.json +10 -10
- package/appFiles/node_modules/@babel/generator/lib/generators/base.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/generators/classes.js +1 -1
- package/appFiles/node_modules/@babel/generator/lib/generators/classes.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/generators/expressions.js +9 -15
- package/appFiles/node_modules/@babel/generator/lib/generators/expressions.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/generators/methods.js +9 -24
- package/appFiles/node_modules/@babel/generator/lib/generators/methods.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/generators/modules.js +6 -14
- package/appFiles/node_modules/@babel/generator/lib/generators/modules.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/generators/statements.js +1 -16
- package/appFiles/node_modules/@babel/generator/lib/generators/statements.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/lib/printer.js +89 -80
- package/appFiles/node_modules/@babel/generator/lib/printer.js.map +1 -1
- package/appFiles/node_modules/@babel/generator/package.json +3 -3
- package/appFiles/node_modules/@babel/parser/lib/index.js +1 -1
- package/appFiles/node_modules/@babel/parser/lib/index.js.map +1 -1
- package/appFiles/node_modules/@babel/parser/package.json +1 -1
- package/appFiles/node_modules/@babel/parser/typings/babel-parser.d.ts +92 -80
- package/appFiles/node_modules/@babel/parser/typings/babel-parser.source.d.ts +151 -0
- package/appFiles/node_modules/@babel/types/lib/asserts/assertNode.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/asserts/assertNode.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/asserts/generated/index.js +0 -303
- package/appFiles/node_modules/@babel/types/lib/asserts/generated/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +0 -11
- package/appFiles/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/generated/index.js +0 -253
- package/appFiles/node_modules/@babel/types/lib/builders/generated/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/generated/uppercase.js +0 -1
- package/appFiles/node_modules/@babel/types/lib/builders/generated/uppercase.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/react/buildChildren.js +0 -7
- package/appFiles/node_modules/@babel/types/lib/builders/react/buildChildren.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js +0 -5
- package/appFiles/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/builders/validateNode.js +0 -5
- package/appFiles/node_modules/@babel/types/lib/builders/validateNode.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/clone/clone.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/clone/clone.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/clone/cloneDeep.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/clone/cloneDeep.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/clone/cloneNode.js +4 -22
- package/appFiles/node_modules/@babel/types/lib/clone/cloneNode.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/addComment.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/comments/addComment.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/addComments.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/comments/addComments.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/inheritInnerComments.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/comments/inheritInnerComments.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/inheritLeadingComments.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/inheritTrailingComments.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/inheritsComments.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/comments/inheritsComments.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/comments/removeComments.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/comments/removeComments.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/constants/generated/index.js +0 -1
- package/appFiles/node_modules/@babel/types/lib/constants/generated/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/constants/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/ensureBlock.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/converters/ensureBlock.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +2 -12
- package/appFiles/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toBlock.js +0 -7
- package/appFiles/node_modules/@babel/types/lib/converters/toBlock.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toComputedKey.js +2 -4
- package/appFiles/node_modules/@babel/types/lib/converters/toComputedKey.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toExpression.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/converters/toExpression.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toIdentifier.js +2 -6
- package/appFiles/node_modules/@babel/types/lib/converters/toIdentifier.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toKeyAlias.js +0 -7
- package/appFiles/node_modules/@babel/types/lib/converters/toKeyAlias.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toSequenceExpression.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/toStatement.js +1 -7
- package/appFiles/node_modules/@babel/types/lib/converters/toStatement.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/converters/valueToNode.js +2 -18
- package/appFiles/node_modules/@babel/types/lib/converters/valueToNode.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/core.js +33 -61
- package/appFiles/node_modules/@babel/types/lib/definitions/core.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/experimental.js +3 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/experimental.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/flow.js +1 -3
- package/appFiles/node_modules/@babel/types/lib/definitions/flow.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/index.js +0 -18
- package/appFiles/node_modules/@babel/types/lib/definitions/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/jsx.js +0 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/jsx.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/misc.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/definitions/misc.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/placeholders.js +0 -5
- package/appFiles/node_modules/@babel/types/lib/definitions/placeholders.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/typescript.js +4 -15
- package/appFiles/node_modules/@babel/types/lib/definitions/typescript.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/definitions/utils.js +1 -65
- package/appFiles/node_modules/@babel/types/lib/definitions/utils.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/index.d.ts +0 -1
- package/appFiles/node_modules/@babel/types/lib/index.js +1 -75
- package/appFiles/node_modules/@babel/types/lib/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +3 -12
- package/appFiles/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/inherits.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/modifications/inherits.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/removeProperties.js +3 -8
- package/appFiles/node_modules/@babel/types/lib/modifications/removeProperties.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js +1 -10
- package/appFiles/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +4 -14
- package/appFiles/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/traverse/traverse.js +0 -7
- package/appFiles/node_modules/@babel/types/lib/traverse/traverse.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/traverse/traverseFast.js +2 -5
- package/appFiles/node_modules/@babel/types/lib/traverse/traverseFast.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/utils/inherit.js +0 -1
- package/appFiles/node_modules/@babel/types/lib/utils/inherit.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +1 -8
- package/appFiles/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/utils/shallowEqual.js +2 -4
- package/appFiles/node_modules/@babel/types/lib/utils/shallowEqual.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/generated/index.js +0 -906
- package/appFiles/node_modules/@babel/types/lib/validators/generated/index.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/is.js +0 -8
- package/appFiles/node_modules/@babel/types/lib/validators/is.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isBinding.js +4 -8
- package/appFiles/node_modules/@babel/types/lib/validators/isBinding.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isBlockScoped.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/validators/isBlockScoped.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isImmutable.js +0 -5
- package/appFiles/node_modules/@babel/types/lib/validators/isImmutable.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isLet.js +2 -4
- package/appFiles/node_modules/@babel/types/lib/validators/isLet.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isNode.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/validators/isNode.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +2 -16
- package/appFiles/node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isPlaceholderType.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isReferenced.js +0 -13
- package/appFiles/node_modules/@babel/types/lib/validators/isReferenced.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isScope.js +0 -3
- package/appFiles/node_modules/@babel/types/lib/validators/isScope.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +2 -3
- package/appFiles/node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isType.js +1 -5
- package/appFiles/node_modules/@babel/types/lib/validators/isType.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isValidIdentifier.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/isVar.js +2 -4
- package/appFiles/node_modules/@babel/types/lib/validators/isVar.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/matchesPattern.js +0 -8
- package/appFiles/node_modules/@babel/types/lib/validators/matchesPattern.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/react/isCompatTag.js +0 -1
- package/appFiles/node_modules/@babel/types/lib/validators/react/isCompatTag.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/react/isReactComponent.js +0 -2
- package/appFiles/node_modules/@babel/types/lib/validators/react/isReactComponent.js.map +1 -1
- package/appFiles/node_modules/@babel/types/lib/validators/validate.js +0 -4
- package/appFiles/node_modules/@babel/types/lib/validators/validate.js.map +1 -1
- package/appFiles/node_modules/@babel/types/package.json +3 -3
- package/package.json +4 -4
- package/appFiles/node_modules/@babel/types/lib/index.d.ts.map +0 -1
|
@@ -1,3 +1,85 @@
|
|
|
1
|
+
// This file is auto-generated! Do not modify it directly.
|
|
2
|
+
/* eslint-disable import/no-extraneous-dependencies, @typescript-eslint/consistent-type-imports, prettier/prettier */
|
|
3
|
+
import * as _babel_types from '@babel/types';
|
|
4
|
+
|
|
5
|
+
type Plugin =
|
|
6
|
+
| "asyncDoExpressions"
|
|
7
|
+
| "asyncGenerators"
|
|
8
|
+
| "bigInt"
|
|
9
|
+
| "classPrivateMethods"
|
|
10
|
+
| "classPrivateProperties"
|
|
11
|
+
| "classProperties"
|
|
12
|
+
| "classStaticBlock" // Enabled by default
|
|
13
|
+
| "decimal"
|
|
14
|
+
| "decorators-legacy"
|
|
15
|
+
| "decoratorAutoAccessors"
|
|
16
|
+
| "destructuringPrivate"
|
|
17
|
+
| "doExpressions"
|
|
18
|
+
| "dynamicImport"
|
|
19
|
+
| "explicitResourceManagement"
|
|
20
|
+
| "exportDefaultFrom"
|
|
21
|
+
| "exportNamespaceFrom" // deprecated
|
|
22
|
+
| "flow"
|
|
23
|
+
| "flowComments"
|
|
24
|
+
| "functionBind"
|
|
25
|
+
| "functionSent"
|
|
26
|
+
| "importMeta"
|
|
27
|
+
| "jsx"
|
|
28
|
+
| "logicalAssignment"
|
|
29
|
+
| "importAssertions"
|
|
30
|
+
| "importReflection"
|
|
31
|
+
| "moduleBlocks"
|
|
32
|
+
| "moduleStringNames"
|
|
33
|
+
| "nullishCoalescingOperator"
|
|
34
|
+
| "numericSeparator"
|
|
35
|
+
| "objectRestSpread"
|
|
36
|
+
| "optionalCatchBinding"
|
|
37
|
+
| "optionalChaining"
|
|
38
|
+
| "partialApplication"
|
|
39
|
+
| "placeholders"
|
|
40
|
+
| "privateIn" // Enabled by default
|
|
41
|
+
| "regexpUnicodeSets"
|
|
42
|
+
| "throwExpressions"
|
|
43
|
+
| "topLevelAwait"
|
|
44
|
+
| "v8intrinsic"
|
|
45
|
+
| ParserPluginWithOptions[0];
|
|
46
|
+
|
|
47
|
+
type ParserPluginWithOptions =
|
|
48
|
+
| ["decorators", DecoratorsPluginOptions]
|
|
49
|
+
| ["estree", { classFeatures?: boolean }]
|
|
50
|
+
// @deprecated
|
|
51
|
+
| ["moduleAttributes", { version: "may-2020" }]
|
|
52
|
+
| ["pipelineOperator", PipelineOperatorPluginOptions]
|
|
53
|
+
| ["recordAndTuple", RecordAndTuplePluginOptions]
|
|
54
|
+
| ["flow", FlowPluginOptions]
|
|
55
|
+
| ["typescript", TypeScriptPluginOptions];
|
|
56
|
+
|
|
57
|
+
type PluginConfig = Plugin | ParserPluginWithOptions;
|
|
58
|
+
|
|
59
|
+
interface DecoratorsPluginOptions {
|
|
60
|
+
decoratorsBeforeExport?: boolean;
|
|
61
|
+
allowCallParenthesized?: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface PipelineOperatorPluginOptions {
|
|
65
|
+
proposal: "minimal" | "fsharp" | "hack" | "smart";
|
|
66
|
+
topicToken?: "%" | "#" | "@@" | "^^" | "^";
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
interface RecordAndTuplePluginOptions {
|
|
70
|
+
syntaxType: "bar" | "hash";
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface FlowPluginOptions {
|
|
74
|
+
all?: boolean;
|
|
75
|
+
enums?: boolean;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
interface TypeScriptPluginOptions {
|
|
79
|
+
dts?: boolean;
|
|
80
|
+
disallowAmbiguousJSXLike?: boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
1
83
|
// Type definitions for @babel/parser
|
|
2
84
|
// Project: https://github.com/babel/babel/tree/main/packages/babel-parser
|
|
3
85
|
// Definitions by: Troy Gerwien <https://github.com/yortus>
|
|
@@ -8,20 +90,20 @@
|
|
|
8
90
|
/**
|
|
9
91
|
* Parse the provided code as an entire ECMAScript program.
|
|
10
92
|
*/
|
|
11
|
-
|
|
93
|
+
declare function parse(
|
|
12
94
|
input: string,
|
|
13
95
|
options?: ParserOptions
|
|
14
|
-
): ParseResult<
|
|
96
|
+
): ParseResult<_babel_types.File>;
|
|
15
97
|
|
|
16
98
|
/**
|
|
17
99
|
* Parse the provided code as a single expression.
|
|
18
100
|
*/
|
|
19
|
-
|
|
101
|
+
declare function parseExpression(
|
|
20
102
|
input: string,
|
|
21
103
|
options?: ParserOptions
|
|
22
|
-
): ParseResult<
|
|
104
|
+
): ParseResult<_babel_types.Expression>;
|
|
23
105
|
|
|
24
|
-
|
|
106
|
+
interface ParserOptions {
|
|
25
107
|
/**
|
|
26
108
|
* By default, import and export declarations can only appear at a program's top level.
|
|
27
109
|
* Setting this option to true allows them anywhere where a statement is allowed.
|
|
@@ -125,87 +207,15 @@ export interface ParserOptions {
|
|
|
125
207
|
createParenthesizedExpressions?: boolean;
|
|
126
208
|
}
|
|
127
209
|
|
|
128
|
-
|
|
129
|
-
| "asyncDoExpressions"
|
|
130
|
-
| "asyncGenerators"
|
|
131
|
-
| "bigInt"
|
|
132
|
-
| "classPrivateMethods"
|
|
133
|
-
| "classPrivateProperties"
|
|
134
|
-
| "classProperties"
|
|
135
|
-
| "classStaticBlock" // Enabled by default
|
|
136
|
-
| "decimal"
|
|
137
|
-
| "decorators"
|
|
138
|
-
| "decorators-legacy"
|
|
139
|
-
| "decoratorAutoAccessors"
|
|
140
|
-
| "destructuringPrivate"
|
|
141
|
-
| "doExpressions"
|
|
142
|
-
| "dynamicImport"
|
|
143
|
-
| "estree"
|
|
144
|
-
| "exportDefaultFrom"
|
|
145
|
-
| "exportNamespaceFrom" // deprecated
|
|
146
|
-
| "flow"
|
|
147
|
-
| "flowComments"
|
|
148
|
-
| "functionBind"
|
|
149
|
-
| "functionSent"
|
|
150
|
-
| "importMeta"
|
|
151
|
-
| "jsx"
|
|
152
|
-
| "logicalAssignment"
|
|
153
|
-
| "importAssertions"
|
|
154
|
-
| "moduleBlocks"
|
|
155
|
-
| "moduleStringNames"
|
|
156
|
-
| "nullishCoalescingOperator"
|
|
157
|
-
| "numericSeparator"
|
|
158
|
-
| "objectRestSpread"
|
|
159
|
-
| "optionalCatchBinding"
|
|
160
|
-
| "optionalChaining"
|
|
161
|
-
| "partialApplication"
|
|
162
|
-
| "pipelineOperator"
|
|
163
|
-
| "placeholders"
|
|
164
|
-
| "privateIn" // Enabled by default
|
|
165
|
-
| "recordAndTuple"
|
|
166
|
-
| "regexpUnicodeSets"
|
|
167
|
-
| "throwExpressions"
|
|
168
|
-
| "topLevelAwait"
|
|
169
|
-
| "typescript"
|
|
170
|
-
| "v8intrinsic"
|
|
171
|
-
| ParserPluginWithOptions;
|
|
172
|
-
|
|
173
|
-
export type ParserPluginWithOptions =
|
|
174
|
-
| ["decorators", DecoratorsPluginOptions]
|
|
175
|
-
| ["pipelineOperator", PipelineOperatorPluginOptions]
|
|
176
|
-
| ["recordAndTuple", RecordAndTuplePluginOptions]
|
|
177
|
-
| ["flow", FlowPluginOptions]
|
|
178
|
-
| ["typescript", TypeScriptPluginOptions];
|
|
179
|
-
|
|
180
|
-
export interface DecoratorsPluginOptions {
|
|
181
|
-
decoratorsBeforeExport?: boolean;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
export interface PipelineOperatorPluginOptions {
|
|
185
|
-
proposal: "minimal" | "fsharp" | "hack" | "smart";
|
|
186
|
-
topicToken?: "%" | "#" | "@@" | "^^" | "^";
|
|
187
|
-
}
|
|
210
|
+
type ParserPlugin = PluginConfig;
|
|
188
211
|
|
|
189
|
-
export interface RecordAndTuplePluginOptions {
|
|
190
|
-
syntaxType?: "bar" | "hash";
|
|
191
|
-
}
|
|
192
212
|
|
|
193
|
-
|
|
194
|
-
all?: boolean;
|
|
195
|
-
enums?: boolean;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export interface TypeScriptPluginOptions {
|
|
199
|
-
dts?: boolean;
|
|
200
|
-
disallowAmbiguousJSXLike?: boolean;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export const tokTypes: {
|
|
213
|
+
declare const tokTypes: {
|
|
204
214
|
// todo(flow->ts) real token type
|
|
205
215
|
[name: string]: any;
|
|
206
216
|
};
|
|
207
217
|
|
|
208
|
-
|
|
218
|
+
interface ParseError {
|
|
209
219
|
code: string;
|
|
210
220
|
reasonCode: string;
|
|
211
221
|
}
|
|
@@ -213,3 +223,5 @@ export interface ParseError {
|
|
|
213
223
|
type ParseResult<Result> = Result & {
|
|
214
224
|
errors: ParseError[];
|
|
215
225
|
};
|
|
226
|
+
|
|
227
|
+
export { DecoratorsPluginOptions, FlowPluginOptions, ParseError, ParserOptions, ParserPlugin, ParserPluginWithOptions, PipelineOperatorPluginOptions, RecordAndTuplePluginOptions, TypeScriptPluginOptions, parse, parseExpression, tokTypes };
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// Type definitions for @babel/parser
|
|
2
|
+
// Project: https://github.com/babel/babel/tree/main/packages/babel-parser
|
|
3
|
+
// Definitions by: Troy Gerwien <https://github.com/yortus>
|
|
4
|
+
// Marvin Hagemeister <https://github.com/marvinhagemeister>
|
|
5
|
+
// Avi Vahl <https://github.com/AviVahl>
|
|
6
|
+
// TypeScript Version: 2.9
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Parse the provided code as an entire ECMAScript program.
|
|
10
|
+
*/
|
|
11
|
+
export function parse(
|
|
12
|
+
input: string,
|
|
13
|
+
options?: ParserOptions
|
|
14
|
+
): ParseResult<import("@babel/types").File>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Parse the provided code as a single expression.
|
|
18
|
+
*/
|
|
19
|
+
export function parseExpression(
|
|
20
|
+
input: string,
|
|
21
|
+
options?: ParserOptions
|
|
22
|
+
): ParseResult<import("@babel/types").Expression>;
|
|
23
|
+
|
|
24
|
+
export interface ParserOptions {
|
|
25
|
+
/**
|
|
26
|
+
* By default, import and export declarations can only appear at a program's top level.
|
|
27
|
+
* Setting this option to true allows them anywhere where a statement is allowed.
|
|
28
|
+
*/
|
|
29
|
+
allowImportExportEverywhere?: boolean;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* By default, await use is not allowed outside of an async function.
|
|
33
|
+
* Set this to true to accept such code.
|
|
34
|
+
*/
|
|
35
|
+
allowAwaitOutsideFunction?: boolean;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* By default, a return statement at the top level raises an error.
|
|
39
|
+
* Set this to true to accept such code.
|
|
40
|
+
*/
|
|
41
|
+
allowReturnOutsideFunction?: boolean;
|
|
42
|
+
|
|
43
|
+
allowSuperOutsideMethod?: boolean;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* By default, exported identifiers must refer to a declared variable.
|
|
47
|
+
* Set this to true to allow export statements to reference undeclared variables.
|
|
48
|
+
*/
|
|
49
|
+
allowUndeclaredExports?: boolean;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* By default, Babel attaches comments to adjacent AST nodes.
|
|
53
|
+
* When this option is set to false, comments are not attached.
|
|
54
|
+
* It can provide up to 30% performance improvement when the input code has many comments.
|
|
55
|
+
* @babel/eslint-parser will set it for you.
|
|
56
|
+
* It is not recommended to use attachComment: false with Babel transform,
|
|
57
|
+
* as doing so removes all the comments in output code, and renders annotations such as
|
|
58
|
+
* /* istanbul ignore next *\/ nonfunctional.
|
|
59
|
+
*/
|
|
60
|
+
attachComment?: boolean;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* By default, Babel always throws an error when it finds some invalid code.
|
|
64
|
+
* When this option is set to true, it will store the parsing error and
|
|
65
|
+
* try to continue parsing the invalid input file.
|
|
66
|
+
*/
|
|
67
|
+
errorRecovery?: boolean;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Indicate the mode the code should be parsed in.
|
|
71
|
+
* Can be one of "script", "module", or "unambiguous". Defaults to "script".
|
|
72
|
+
* "unambiguous" will make @babel/parser attempt to guess, based on the presence
|
|
73
|
+
* of ES6 import or export statements.
|
|
74
|
+
* Files with ES6 imports and exports are considered "module" and are otherwise "script".
|
|
75
|
+
*/
|
|
76
|
+
sourceType?: "script" | "module" | "unambiguous";
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Correlate output AST nodes with their source filename.
|
|
80
|
+
* Useful when generating code and source maps from the ASTs of multiple input files.
|
|
81
|
+
*/
|
|
82
|
+
sourceFilename?: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* By default, the first line of code parsed is treated as line 1.
|
|
86
|
+
* You can provide a line number to alternatively start with.
|
|
87
|
+
* Useful for integration with other source tools.
|
|
88
|
+
*/
|
|
89
|
+
startLine?: number;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* By default, the parsed code is treated as if it starts from line 1, column 0.
|
|
93
|
+
* You can provide a column number to alternatively start with.
|
|
94
|
+
* Useful for integration with other source tools.
|
|
95
|
+
*/
|
|
96
|
+
startColumn?: number;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Array containing the plugins that you want to enable.
|
|
100
|
+
*/
|
|
101
|
+
plugins?: ParserPlugin[];
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Should the parser work in strict mode.
|
|
105
|
+
* Defaults to true if sourceType === 'module'. Otherwise, false.
|
|
106
|
+
*/
|
|
107
|
+
strictMode?: boolean;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Adds a ranges property to each node: [node.start, node.end]
|
|
111
|
+
*/
|
|
112
|
+
ranges?: boolean;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Adds all parsed tokens to a tokens property on the File node.
|
|
116
|
+
*/
|
|
117
|
+
tokens?: boolean;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* By default, the parser adds information about parentheses by setting
|
|
121
|
+
* `extra.parenthesized` to `true` as needed.
|
|
122
|
+
* When this option is `true` the parser creates `ParenthesizedExpression`
|
|
123
|
+
* AST nodes instead of using the `extra` property.
|
|
124
|
+
*/
|
|
125
|
+
createParenthesizedExpressions?: boolean;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type ParserPlugin = import("../src/typings").PluginConfig;
|
|
129
|
+
|
|
130
|
+
export type {
|
|
131
|
+
ParserPluginWithOptions,
|
|
132
|
+
DecoratorsPluginOptions,
|
|
133
|
+
PipelineOperatorPluginOptions,
|
|
134
|
+
RecordAndTuplePluginOptions,
|
|
135
|
+
FlowPluginOptions,
|
|
136
|
+
TypeScriptPluginOptions,
|
|
137
|
+
} from "../src/typings";
|
|
138
|
+
|
|
139
|
+
export const tokTypes: {
|
|
140
|
+
// todo(flow->ts) real token type
|
|
141
|
+
[name: string]: any;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export interface ParseError {
|
|
145
|
+
code: string;
|
|
146
|
+
reasonCode: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
type ParseResult<Result> = Result & {
|
|
150
|
+
errors: ParseError[];
|
|
151
|
+
};
|
|
@@ -4,13 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = assertNode;
|
|
7
|
-
|
|
8
7
|
var _isNode = require("../validators/isNode");
|
|
9
|
-
|
|
10
8
|
function assertNode(node) {
|
|
11
9
|
if (!(0, _isNode.default)(node)) {
|
|
12
10
|
var _node$type;
|
|
13
|
-
|
|
14
11
|
const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
|
|
15
12
|
throw new TypeError(`Not a valid node of type "${type}"`);
|
|
16
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["assertNode","node","isNode","type","JSON","stringify","TypeError"],"sources":["../../src/asserts/assertNode.ts"],"sourcesContent":["import isNode from \"../validators/isNode\";\nimport type * as t from \"..\";\n\nexport default function assertNode(node?: any): asserts node is t.Node {\n if (!isNode(node)) {\n const type = node?.type ?? JSON.stringify(node);\n throw new TypeError(`Not a valid node of type \"${type as any}\"`);\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["assertNode","node","isNode","type","JSON","stringify","TypeError"],"sources":["../../src/asserts/assertNode.ts"],"sourcesContent":["import isNode from \"../validators/isNode\";\nimport type * as t from \"..\";\n\nexport default function assertNode(node?: any): asserts node is t.Node {\n if (!isNode(node)) {\n const type = node?.type ?? JSON.stringify(node);\n throw new TypeError(`Not a valid node of type \"${type as any}\"`);\n }\n}\n"],"mappings":";;;;;;AAAA;AAGe,SAASA,UAAU,CAACC,IAAU,EAA0B;EACrE,IAAI,CAAC,IAAAC,eAAM,EAACD,IAAI,CAAC,EAAE;IAAA;IACjB,MAAME,IAAI,iBAAGF,IAAI,oBAAJA,IAAI,CAAEE,IAAI,yBAAIC,IAAI,CAACC,SAAS,CAACJ,IAAI,CAAC;IAC/C,MAAM,IAAIK,SAAS,CAAE,6BAA4BH,IAAY,GAAE,CAAC;EAClE;AACF"}
|