@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.
Files changed (181) hide show
  1. package/appFiles/node_modules/.package-lock.json +10 -10
  2. package/appFiles/node_modules/@babel/generator/lib/generators/base.js.map +1 -1
  3. package/appFiles/node_modules/@babel/generator/lib/generators/classes.js +1 -1
  4. package/appFiles/node_modules/@babel/generator/lib/generators/classes.js.map +1 -1
  5. package/appFiles/node_modules/@babel/generator/lib/generators/expressions.js +9 -15
  6. package/appFiles/node_modules/@babel/generator/lib/generators/expressions.js.map +1 -1
  7. package/appFiles/node_modules/@babel/generator/lib/generators/methods.js +9 -24
  8. package/appFiles/node_modules/@babel/generator/lib/generators/methods.js.map +1 -1
  9. package/appFiles/node_modules/@babel/generator/lib/generators/modules.js +6 -14
  10. package/appFiles/node_modules/@babel/generator/lib/generators/modules.js.map +1 -1
  11. package/appFiles/node_modules/@babel/generator/lib/generators/statements.js +1 -16
  12. package/appFiles/node_modules/@babel/generator/lib/generators/statements.js.map +1 -1
  13. package/appFiles/node_modules/@babel/generator/lib/printer.js +89 -80
  14. package/appFiles/node_modules/@babel/generator/lib/printer.js.map +1 -1
  15. package/appFiles/node_modules/@babel/generator/package.json +3 -3
  16. package/appFiles/node_modules/@babel/parser/lib/index.js +1 -1
  17. package/appFiles/node_modules/@babel/parser/lib/index.js.map +1 -1
  18. package/appFiles/node_modules/@babel/parser/package.json +1 -1
  19. package/appFiles/node_modules/@babel/parser/typings/babel-parser.d.ts +92 -80
  20. package/appFiles/node_modules/@babel/parser/typings/babel-parser.source.d.ts +151 -0
  21. package/appFiles/node_modules/@babel/types/lib/asserts/assertNode.js +0 -3
  22. package/appFiles/node_modules/@babel/types/lib/asserts/assertNode.js.map +1 -1
  23. package/appFiles/node_modules/@babel/types/lib/asserts/generated/index.js +0 -303
  24. package/appFiles/node_modules/@babel/types/lib/asserts/generated/index.js.map +1 -1
  25. package/appFiles/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js +0 -4
  26. package/appFiles/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map +1 -1
  27. package/appFiles/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +0 -11
  28. package/appFiles/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map +1 -1
  29. package/appFiles/node_modules/@babel/types/lib/builders/generated/index.js +0 -253
  30. package/appFiles/node_modules/@babel/types/lib/builders/generated/index.js.map +1 -1
  31. package/appFiles/node_modules/@babel/types/lib/builders/generated/uppercase.js +0 -1
  32. package/appFiles/node_modules/@babel/types/lib/builders/generated/uppercase.js.map +1 -1
  33. package/appFiles/node_modules/@babel/types/lib/builders/react/buildChildren.js +0 -7
  34. package/appFiles/node_modules/@babel/types/lib/builders/react/buildChildren.js.map +1 -1
  35. package/appFiles/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js +0 -5
  36. package/appFiles/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map +1 -1
  37. package/appFiles/node_modules/@babel/types/lib/builders/validateNode.js +0 -5
  38. package/appFiles/node_modules/@babel/types/lib/builders/validateNode.js.map +1 -1
  39. package/appFiles/node_modules/@babel/types/lib/clone/clone.js +0 -2
  40. package/appFiles/node_modules/@babel/types/lib/clone/clone.js.map +1 -1
  41. package/appFiles/node_modules/@babel/types/lib/clone/cloneDeep.js +0 -2
  42. package/appFiles/node_modules/@babel/types/lib/clone/cloneDeep.js.map +1 -1
  43. package/appFiles/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js +0 -2
  44. package/appFiles/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map +1 -1
  45. package/appFiles/node_modules/@babel/types/lib/clone/cloneNode.js +4 -22
  46. package/appFiles/node_modules/@babel/types/lib/clone/cloneNode.js.map +1 -1
  47. package/appFiles/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +0 -2
  48. package/appFiles/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map +1 -1
  49. package/appFiles/node_modules/@babel/types/lib/comments/addComment.js +0 -2
  50. package/appFiles/node_modules/@babel/types/lib/comments/addComment.js.map +1 -1
  51. package/appFiles/node_modules/@babel/types/lib/comments/addComments.js +0 -3
  52. package/appFiles/node_modules/@babel/types/lib/comments/addComments.js.map +1 -1
  53. package/appFiles/node_modules/@babel/types/lib/comments/inheritInnerComments.js +0 -2
  54. package/appFiles/node_modules/@babel/types/lib/comments/inheritInnerComments.js.map +1 -1
  55. package/appFiles/node_modules/@babel/types/lib/comments/inheritLeadingComments.js +0 -2
  56. package/appFiles/node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map +1 -1
  57. package/appFiles/node_modules/@babel/types/lib/comments/inheritTrailingComments.js +0 -2
  58. package/appFiles/node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map +1 -1
  59. package/appFiles/node_modules/@babel/types/lib/comments/inheritsComments.js +0 -4
  60. package/appFiles/node_modules/@babel/types/lib/comments/inheritsComments.js.map +1 -1
  61. package/appFiles/node_modules/@babel/types/lib/comments/removeComments.js +0 -3
  62. package/appFiles/node_modules/@babel/types/lib/comments/removeComments.js.map +1 -1
  63. package/appFiles/node_modules/@babel/types/lib/constants/generated/index.js +0 -1
  64. package/appFiles/node_modules/@babel/types/lib/constants/generated/index.js.map +1 -1
  65. package/appFiles/node_modules/@babel/types/lib/constants/index.js.map +1 -1
  66. package/appFiles/node_modules/@babel/types/lib/converters/ensureBlock.js +0 -2
  67. package/appFiles/node_modules/@babel/types/lib/converters/ensureBlock.js.map +1 -1
  68. package/appFiles/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +2 -12
  69. package/appFiles/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map +1 -1
  70. package/appFiles/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js +0 -2
  71. package/appFiles/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map +1 -1
  72. package/appFiles/node_modules/@babel/types/lib/converters/toBlock.js +0 -7
  73. package/appFiles/node_modules/@babel/types/lib/converters/toBlock.js.map +1 -1
  74. package/appFiles/node_modules/@babel/types/lib/converters/toComputedKey.js +2 -4
  75. package/appFiles/node_modules/@babel/types/lib/converters/toComputedKey.js.map +1 -1
  76. package/appFiles/node_modules/@babel/types/lib/converters/toExpression.js +0 -4
  77. package/appFiles/node_modules/@babel/types/lib/converters/toExpression.js.map +1 -1
  78. package/appFiles/node_modules/@babel/types/lib/converters/toIdentifier.js +2 -6
  79. package/appFiles/node_modules/@babel/types/lib/converters/toIdentifier.js.map +1 -1
  80. package/appFiles/node_modules/@babel/types/lib/converters/toKeyAlias.js +0 -7
  81. package/appFiles/node_modules/@babel/types/lib/converters/toKeyAlias.js.map +1 -1
  82. package/appFiles/node_modules/@babel/types/lib/converters/toSequenceExpression.js +0 -3
  83. package/appFiles/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map +1 -1
  84. package/appFiles/node_modules/@babel/types/lib/converters/toStatement.js +1 -7
  85. package/appFiles/node_modules/@babel/types/lib/converters/toStatement.js.map +1 -1
  86. package/appFiles/node_modules/@babel/types/lib/converters/valueToNode.js +2 -18
  87. package/appFiles/node_modules/@babel/types/lib/converters/valueToNode.js.map +1 -1
  88. package/appFiles/node_modules/@babel/types/lib/definitions/core.js +33 -61
  89. package/appFiles/node_modules/@babel/types/lib/definitions/core.js.map +1 -1
  90. package/appFiles/node_modules/@babel/types/lib/definitions/experimental.js +3 -1
  91. package/appFiles/node_modules/@babel/types/lib/definitions/experimental.js.map +1 -1
  92. package/appFiles/node_modules/@babel/types/lib/definitions/flow.js +1 -3
  93. package/appFiles/node_modules/@babel/types/lib/definitions/flow.js.map +1 -1
  94. package/appFiles/node_modules/@babel/types/lib/definitions/index.js +0 -18
  95. package/appFiles/node_modules/@babel/types/lib/definitions/index.js.map +1 -1
  96. package/appFiles/node_modules/@babel/types/lib/definitions/jsx.js +0 -1
  97. package/appFiles/node_modules/@babel/types/lib/definitions/jsx.js.map +1 -1
  98. package/appFiles/node_modules/@babel/types/lib/definitions/misc.js +0 -2
  99. package/appFiles/node_modules/@babel/types/lib/definitions/misc.js.map +1 -1
  100. package/appFiles/node_modules/@babel/types/lib/definitions/placeholders.js +0 -5
  101. package/appFiles/node_modules/@babel/types/lib/definitions/placeholders.js.map +1 -1
  102. package/appFiles/node_modules/@babel/types/lib/definitions/typescript.js +4 -15
  103. package/appFiles/node_modules/@babel/types/lib/definitions/typescript.js.map +1 -1
  104. package/appFiles/node_modules/@babel/types/lib/definitions/utils.js +1 -65
  105. package/appFiles/node_modules/@babel/types/lib/definitions/utils.js.map +1 -1
  106. package/appFiles/node_modules/@babel/types/lib/index.d.ts +0 -1
  107. package/appFiles/node_modules/@babel/types/lib/index.js +1 -75
  108. package/appFiles/node_modules/@babel/types/lib/index.js.map +1 -1
  109. package/appFiles/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +0 -2
  110. package/appFiles/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map +1 -1
  111. package/appFiles/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +3 -12
  112. package/appFiles/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map +1 -1
  113. package/appFiles/node_modules/@babel/types/lib/modifications/inherits.js +0 -4
  114. package/appFiles/node_modules/@babel/types/lib/modifications/inherits.js.map +1 -1
  115. package/appFiles/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js +0 -4
  116. package/appFiles/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map +1 -1
  117. package/appFiles/node_modules/@babel/types/lib/modifications/removeProperties.js +3 -8
  118. package/appFiles/node_modules/@babel/types/lib/modifications/removeProperties.js.map +1 -1
  119. package/appFiles/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js +0 -3
  120. package/appFiles/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map +1 -1
  121. package/appFiles/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js +1 -10
  122. package/appFiles/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map +1 -1
  123. package/appFiles/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +4 -14
  124. package/appFiles/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map +1 -1
  125. package/appFiles/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +0 -3
  126. package/appFiles/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map +1 -1
  127. package/appFiles/node_modules/@babel/types/lib/traverse/traverse.js +0 -7
  128. package/appFiles/node_modules/@babel/types/lib/traverse/traverse.js.map +1 -1
  129. package/appFiles/node_modules/@babel/types/lib/traverse/traverseFast.js +2 -5
  130. package/appFiles/node_modules/@babel/types/lib/traverse/traverseFast.js.map +1 -1
  131. package/appFiles/node_modules/@babel/types/lib/utils/inherit.js +0 -1
  132. package/appFiles/node_modules/@babel/types/lib/utils/inherit.js.map +1 -1
  133. package/appFiles/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +1 -8
  134. package/appFiles/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map +1 -1
  135. package/appFiles/node_modules/@babel/types/lib/utils/shallowEqual.js +2 -4
  136. package/appFiles/node_modules/@babel/types/lib/utils/shallowEqual.js.map +1 -1
  137. package/appFiles/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +0 -2
  138. package/appFiles/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map +1 -1
  139. package/appFiles/node_modules/@babel/types/lib/validators/generated/index.js +0 -906
  140. package/appFiles/node_modules/@babel/types/lib/validators/generated/index.js.map +1 -1
  141. package/appFiles/node_modules/@babel/types/lib/validators/is.js +0 -8
  142. package/appFiles/node_modules/@babel/types/lib/validators/is.js.map +1 -1
  143. package/appFiles/node_modules/@babel/types/lib/validators/isBinding.js +4 -8
  144. package/appFiles/node_modules/@babel/types/lib/validators/isBinding.js.map +1 -1
  145. package/appFiles/node_modules/@babel/types/lib/validators/isBlockScoped.js +0 -3
  146. package/appFiles/node_modules/@babel/types/lib/validators/isBlockScoped.js.map +1 -1
  147. package/appFiles/node_modules/@babel/types/lib/validators/isImmutable.js +0 -5
  148. package/appFiles/node_modules/@babel/types/lib/validators/isImmutable.js.map +1 -1
  149. package/appFiles/node_modules/@babel/types/lib/validators/isLet.js +2 -4
  150. package/appFiles/node_modules/@babel/types/lib/validators/isLet.js.map +1 -1
  151. package/appFiles/node_modules/@babel/types/lib/validators/isNode.js +0 -2
  152. package/appFiles/node_modules/@babel/types/lib/validators/isNode.js.map +1 -1
  153. package/appFiles/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +2 -16
  154. package/appFiles/node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map +1 -1
  155. package/appFiles/node_modules/@babel/types/lib/validators/isPlaceholderType.js +0 -4
  156. package/appFiles/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map +1 -1
  157. package/appFiles/node_modules/@babel/types/lib/validators/isReferenced.js +0 -13
  158. package/appFiles/node_modules/@babel/types/lib/validators/isReferenced.js.map +1 -1
  159. package/appFiles/node_modules/@babel/types/lib/validators/isScope.js +0 -3
  160. package/appFiles/node_modules/@babel/types/lib/validators/isScope.js.map +1 -1
  161. package/appFiles/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +2 -3
  162. package/appFiles/node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map +1 -1
  163. package/appFiles/node_modules/@babel/types/lib/validators/isType.js +1 -5
  164. package/appFiles/node_modules/@babel/types/lib/validators/isType.js.map +1 -1
  165. package/appFiles/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +0 -2
  166. package/appFiles/node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map +1 -1
  167. package/appFiles/node_modules/@babel/types/lib/validators/isValidIdentifier.js +0 -4
  168. package/appFiles/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map +1 -1
  169. package/appFiles/node_modules/@babel/types/lib/validators/isVar.js +2 -4
  170. package/appFiles/node_modules/@babel/types/lib/validators/isVar.js.map +1 -1
  171. package/appFiles/node_modules/@babel/types/lib/validators/matchesPattern.js +0 -8
  172. package/appFiles/node_modules/@babel/types/lib/validators/matchesPattern.js.map +1 -1
  173. package/appFiles/node_modules/@babel/types/lib/validators/react/isCompatTag.js +0 -1
  174. package/appFiles/node_modules/@babel/types/lib/validators/react/isCompatTag.js.map +1 -1
  175. package/appFiles/node_modules/@babel/types/lib/validators/react/isReactComponent.js +0 -2
  176. package/appFiles/node_modules/@babel/types/lib/validators/react/isReactComponent.js.map +1 -1
  177. package/appFiles/node_modules/@babel/types/lib/validators/validate.js +0 -4
  178. package/appFiles/node_modules/@babel/types/lib/validators/validate.js.map +1 -1
  179. package/appFiles/node_modules/@babel/types/package.json +3 -3
  180. package/package.json +4 -4
  181. package/appFiles/node_modules/@babel/types/lib/index.d.ts.map +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babel/parser",
3
- "version": "7.20.1",
3
+ "version": "7.20.3",
4
4
  "description": "A JavaScript parser",
5
5
  "author": "The Babel Team (https://babel.dev/team)",
6
6
  "homepage": "https://babel.dev/docs/en/next/babel-parser",
@@ -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
- export function parse(
93
+ declare function parse(
12
94
  input: string,
13
95
  options?: ParserOptions
14
- ): ParseResult<import("@babel/types").File>;
96
+ ): ParseResult<_babel_types.File>;
15
97
 
16
98
  /**
17
99
  * Parse the provided code as a single expression.
18
100
  */
19
- export function parseExpression(
101
+ declare function parseExpression(
20
102
  input: string,
21
103
  options?: ParserOptions
22
- ): ParseResult<import("@babel/types").Expression>;
104
+ ): ParseResult<_babel_types.Expression>;
23
105
 
24
- export interface ParserOptions {
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
- export type ParserPlugin =
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
- export interface FlowPluginOptions {
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
- export interface ParseError {
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":";;;;;;;AAAA;;AAGe,SAASA,UAAT,CAAoBC,IAApB,EAAwD;EACrE,IAAI,CAAC,IAAAC,eAAA,EAAOD,IAAP,CAAL,EAAmB;IAAA;;IACjB,MAAME,IAAI,iBAAGF,IAAH,oBAAGA,IAAI,CAAEE,IAAT,yBAAiBC,IAAI,CAACC,SAAL,CAAeJ,IAAf,CAA3B;IACA,MAAM,IAAIK,SAAJ,CAAe,6BAA4BH,IAAY,GAAvD,CAAN;EACD;AACF"}
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"}